summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-11-27 16:25:40 +0000
committerArmin Le Grand <alg@apache.org>2013-11-27 16:25:40 +0000
commit812e2a8bf64274e47db572b8ca592f49b1263ad7 (patch)
tree404f9a7432e94c42a09bb76b33eb7d38186ccff6
parent9818d8d1c64bd93adfaacb8a2f824a9db1f4987d (diff)
resync to trunk (after accessibility integration)
-rw-r--r--LICENSE66
-rw-r--r--RepositoryFixes.mk30
-rw-r--r--accessibility/inc/accessibility/extended/accessiblelistbox.hxx19
-rw-r--r--accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx35
-rw-r--r--accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx2
-rw-r--r--accessibility/inc/accessibility/extended/textwindowaccessibility.hxx23
-rw-r--r--accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx1
-rw-r--r--accessibility/inc/accessibility/helper/accessiblestrings.hrc13
-rw-r--r--accessibility/inc/accessibility/helper/listboxhelper.hxx5
-rw-r--r--accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx2
-rw-r--r--accessibility/inc/accessibility/standard/accessiblemenuitemcomponent.hxx2
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessiblebox.hxx23
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx12
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessiblelistitem.hxx5
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessiblemenu.hxx3
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessibleradiobutton.hxx2
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessiblescrollbar.hxx4
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx2
-rw-r--r--accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx2
-rw-r--r--accessibility/source/extended/accessibleeditbrowseboxcell.cxx14
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrl.cxx31
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrlentry.cxx3
-rw-r--r--accessibility/source/extended/accessiblelistbox.cxx265
-rw-r--r--accessibility/source/extended/accessiblelistboxentry.cxx365
-rw-r--r--accessibility/source/extended/accessibletablistboxtable.cxx60
-rw-r--r--accessibility/source/extended/textwindowaccessibility.cxx410
-rw-r--r--accessibility/source/helper/accessiblestrings.src51
-rw-r--r--accessibility/source/helper/characterattributeshelper.cxx5
-rw-r--r--accessibility/source/standard/accessiblemenubasecomponent.cxx15
-rw-r--r--accessibility/source/standard/accessiblemenuitemcomponent.cxx39
-rw-r--r--accessibility/source/standard/vclxaccessiblebox.cxx234
-rw-r--r--accessibility/source/standard/vclxaccessiblebutton.cxx17
-rw-r--r--accessibility/source/standard/vclxaccessiblecheckbox.cxx8
-rw-r--r--accessibility/source/standard/vclxaccessiblelist.cxx349
-rw-r--r--accessibility/source/standard/vclxaccessiblelistitem.cxx12
-rw-r--r--accessibility/source/standard/vclxaccessiblemenu.cxx11
-rw-r--r--accessibility/source/standard/vclxaccessiblemenuitem.cxx20
-rw-r--r--accessibility/source/standard/vclxaccessibleradiobutton.cxx3
-rw-r--r--accessibility/source/standard/vclxaccessiblescrollbar.cxx21
-rw-r--r--accessibility/source/standard/vclxaccessibletabcontrol.cxx3
-rw-r--r--accessibility/source/standard/vclxaccessibletextcomponent.cxx52
-rw-r--r--accessibility/source/standard/vclxaccessibletoolbox.cxx34
-rw-r--r--accessibility/source/standard/vclxaccessibletoolboxitem.cxx38
-rw-r--r--autodoc/source/ary/cpp/namechain.cxx4
-rw-r--r--autodoc/source/display/html/easywri.cxx2
-rw-r--r--autodoc/source/display/inc/toolkit/outputstack.hxx2
-rw-r--r--autodoc/source/exes/adc_uni/makefile.mk4
-rw-r--r--autodoc/source/parser/cpp/sownstck.hxx4
-rw-r--r--autodoc/source/parser_i/idl/distrib.cxx2
-rw-r--r--autodoc/source/parser_i/idl/pe_excp.cxx2
-rw-r--r--autodoc/source/parser_i/idl/pe_iface.cxx2
-rw-r--r--autodoc/source/parser_i/idl/pe_servi.cxx2
-rw-r--r--autodoc/source/parser_i/idl/pe_singl.cxx2
-rw-r--r--autodoc/source/parser_i/idl/pe_struc.cxx2
-rw-r--r--basebmp/test/makefile.mk7
-rw-r--r--basegfx/source/workbench/Makefile2
-rw-r--r--basegfx/test/makefile.mk9
-rw-r--r--chart2/source/controller/accessibility/AccessibleBase.cxx4
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx17
-rw-r--r--configmgr/source/partial.hxx2
-rw-r--r--configure.in165
-rw-r--r--connectivity/source/commontools/dbtools.cxx6
-rw-r--r--cosv/source/unittest/makefile.mk21
-rw-r--r--cpputools/source/unoexe/makefile.mk2
-rw-r--r--cui/source/customize/cfg.cxx6
-rw-r--r--cui/source/customize/cfg.src3
-rw-r--r--cui/source/customize/macropg.cxx3
-rw-r--r--cui/source/dialogs/cuicharmap.cxx10
-rw-r--r--cui/source/dialogs/cuigrfflt.cxx10
-rw-r--r--cui/source/dialogs/iconcdlg.cxx5
-rw-r--r--cui/source/inc/cuicharmap.hxx10
-rw-r--r--cui/source/inc/headertablistbox.hxx2
-rw-r--r--cui/source/tabpages/autocdlg.cxx21
-rw-r--r--cui/source/tabpages/autocdlg.src48
-rw-r--r--cui/source/tabpages/connect.hrc2
-rw-r--r--cui/source/tabpages/tabarea.src9
-rw-r--r--cui/source/tabpages/tparea.cxx5
-rw-r--r--desktop/source/app/app.cxx7
-rw-r--r--desktop/source/pagein/makefile.mk8
-rw-r--r--editeng/inc/editeng/AccessibleEditableTextPara.hxx15
-rw-r--r--editeng/inc/editeng/AccessibleSvxFindReplaceDialog.hxx65
-rw-r--r--editeng/inc/editeng/editdata.hxx5
-rw-r--r--editeng/inc/editeng/editeng.hxx10
-rw-r--r--editeng/inc/editeng/editrids.hrc4
-rw-r--r--editeng/inc/editeng/editview.hxx4
-rw-r--r--editeng/inc/editeng/splwrap.hxx9
-rw-r--r--editeng/inc/editeng/unoedhlp.hxx16
-rw-r--r--editeng/inc/editeng/unoedprx.hxx9
-rw-r--r--editeng/inc/editeng/unoedsrc.hxx17
-rw-r--r--editeng/inc/editeng/unofored.hxx5
-rw-r--r--editeng/inc/editeng/unoforou.hxx5
-rw-r--r--editeng/inc/editeng/unotext.hxx7
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx969
-rw-r--r--editeng/source/accessibility/AccessibleHyperlink.cxx307
-rw-r--r--editeng/source/accessibility/AccessibleParaManager.cxx6
-rw-r--r--editeng/source/accessibility/AccessibleStaticTextBase.cxx193
-rw-r--r--editeng/source/accessibility/accessibility.src10
-rw-r--r--editeng/source/editeng/editdoc.hxx2
-rw-r--r--editeng/source/editeng/edtspell.cxx3
-rw-r--r--editeng/source/editeng/impedit.cxx18
-rw-r--r--editeng/source/editeng/impedit.hxx5
-rw-r--r--editeng/source/editeng/impedit2.cxx1
-rw-r--r--editeng/source/editeng/impedit3.cxx14
-rw-r--r--editeng/source/misc/splwrap.cxx2
-rw-r--r--editeng/source/outliner/outliner.cxx7
-rw-r--r--editeng/source/outliner/outlvw.cxx1
-rw-r--r--editeng/source/uno/unoedhlp.cxx174
-rw-r--r--editeng/source/uno/unoedprx.cxx21
-rw-r--r--editeng/source/uno/unofored.cxx5
-rw-r--r--editeng/source/uno/unoforou.cxx5
-rw-r--r--editeng/source/uno/unoipset.cxx2
-rw-r--r--editeng/source/uno/unonrule.cxx5
-rw-r--r--editeng/source/uno/unotext.cxx2
-rw-r--r--external_deps.lst25
-rw-r--r--filter/source/pdf/impdialog.cxx2
-rw-r--r--formula/source/ui/dlg/ControlHelper.hxx1
-rw-r--r--formula/source/ui/dlg/formdlgs.src8
-rw-r--r--formula/source/ui/dlg/funcutl.cxx18
-rw-r--r--formula/source/ui/dlg/parawin.cxx4
-rw-r--r--framework/source/loadenv/loadenv.cxx5
-rw-r--r--graphite/graphite-2.3.1.patch4
-rw-r--r--instsetoo_native/data/releases.xml316
-rw-r--r--instsetoo_native/util/openoffice.lst46
-rw-r--r--libxmlsec/makefile.mk12
-rw-r--r--nss/makefile.mk10
-rw-r--r--nss/nspr-4.8.4-clang.patch194
-rw-r--r--nss/nss.patch100
-rw-r--r--nss/nss.patch.mingw64
-rw-r--r--nss/nss_linux.patch43
-rw-r--r--nss/nss_macosx.patch21
-rw-r--r--nss/readme.txt14
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile4
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/Makefile8
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile4
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile2
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile4
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile4
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile4
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/Lifetime/Makefile4
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/Makefile4
-rw-r--r--odk/pack/copying/makefile.mk7
-rw-r--r--odk/util/odk_rules.pmk4
-rw-r--r--offapi/com/sun/star/accessibility/AccessibleEventId.idl11
-rw-r--r--offapi/com/sun/star/accessibility/AccessibleRelationType.idl8
-rw-r--r--offapi/com/sun/star/accessibility/AccessibleStateType.idl21
-rw-r--r--offapi/com/sun/star/accessibility/MSAAService.idl40
-rw-r--r--offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl42
-rw-r--r--offapi/com/sun/star/accessibility/XAccessibleGetAccFlowTo.idl (renamed from scp2/source/ooo/mergemodules_ooo.scp)49
-rw-r--r--offapi/com/sun/star/accessibility/XAccessibleGroupPosition.idl45
-rw-r--r--offapi/com/sun/star/accessibility/XAccessibleTable.idl2
-rw-r--r--offapi/com/sun/star/accessibility/XAccessibleTableSelection.idl47
-rw-r--r--offapi/com/sun/star/accessibility/XAccessibleTextSelection.idl60
-rw-r--r--offapi/com/sun/star/accessibility/XAccessibleValue.idl2
-rw-r--r--offapi/com/sun/star/accessibility/XMSAAService.idl49
-rw-r--r--offapi/com/sun/star/accessibility/makefile.mk10
-rw-r--r--postprocess/packcomponents/makefile.mk1
-rw-r--r--postprocess/prj/build.lst2
-rw-r--r--postprocess/rebase/coffbase.txt2
-rw-r--r--sal/cppunittester/makefile.mk7
-rw-r--r--sal/inc/rtl/string.hxx4
-rw-r--r--sal/inc/sal/main.h2
-rw-r--r--sal/osl/w32/signal.cxx45
-rw-r--r--sal/rtl/source/alloc_arena.c15
-rw-r--r--sal/rtl/source/alloc_cache.c75
-rw-r--r--sal/rtl/source/bootstrap.cxx2
-rw-r--r--sal/util/makefile.mk14
-rw-r--r--sax/qa/cppunit/makefile.mk7
-rw-r--r--sc/inc/chgtrack.hxx19
-rw-r--r--sc/inc/detfunc.hxx3
-rw-r--r--sc/inc/document.hxx21
-rw-r--r--sc/inc/dptablecache.hxx3
-rw-r--r--sc/inc/drwlayer.hxx4
-rw-r--r--sc/inc/table.hxx5
-rw-r--r--sc/source/core/data/documen2.cxx163
-rw-r--r--sc/source/core/data/document.cxx9
-rw-r--r--sc/source/core/data/dpsave.cxx1
-rw-r--r--sc/source/core/data/dptablecache.cxx13
-rw-r--r--sc/source/core/data/drwlayer.cxx20
-rw-r--r--sc/source/core/data/table2.cxx11
-rw-r--r--sc/source/core/tool/detfunc.cxx7
-rw-r--r--sc/source/ui/Accessibility/AccessibleCell.cxx193
-rw-r--r--sc/source/ui/Accessibility/AccessibleCellBase.cxx333
-rw-r--r--sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx132
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx519
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentBase.cxx7
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx29
-rw-r--r--sc/source/ui/Accessibility/AccessibleEditObject.cxx208
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx1154
-rw-r--r--sc/source/ui/Accessibility/AccessibleTableBase.cxx77
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx31
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx38
-rw-r--r--sc/source/ui/docshell/docsh.cxx20
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx6
-rw-r--r--sc/source/ui/inc/AccessibleCell.hxx25
-rw-r--r--sc/source/ui/inc/AccessibleCellBase.hxx15
-rw-r--r--sc/source/ui/inc/AccessibleDocument.hxx41
-rw-r--r--sc/source/ui/inc/AccessibleDocumentBase.hxx3
-rw-r--r--sc/source/ui/inc/AccessibleDocumentPagePreview.hxx4
-rw-r--r--sc/source/ui/inc/AccessibleEditObject.hxx59
-rw-r--r--sc/source/ui/inc/AccessibleSpreadsheet.hxx64
-rw-r--r--sc/source/ui/inc/AccessibleTableBase.hxx16
-rw-r--r--sc/source/ui/inc/AccessibleText.hxx9
-rw-r--r--sc/source/ui/inc/content.hxx24
-rw-r--r--sc/source/ui/inc/dbnamdlg.hxx4
-rw-r--r--sc/source/ui/inc/docsh.hxx8
-rw-r--r--sc/source/ui/inc/drawview.hxx4
-rw-r--r--sc/source/ui/inc/gridwin.hxx7
-rw-r--r--sc/source/ui/inc/preview.hxx3
-rw-r--r--sc/source/ui/inc/scuitphfedit.hxx3
-rw-r--r--sc/source/ui/inc/tabview.hxx2
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx9
-rw-r--r--sc/source/ui/inc/tphfedit.hxx8
-rw-r--r--sc/source/ui/inc/validate.hxx3
-rw-r--r--sc/source/ui/inc/viewfunc.hxx5
-rw-r--r--sc/source/ui/miscdlgs/highred.cxx4
-rw-r--r--sc/source/ui/miscdlgs/solveroptions.cxx26
-rw-r--r--sc/source/ui/navipi/content.cxx303
-rw-r--r--sc/source/ui/navipi/navipi.cxx11
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx20
-rw-r--r--sc/source/ui/pagedlg/tphfedit.cxx15
-rw-r--r--sc/source/ui/view/drawview.cxx102
-rw-r--r--sc/source/ui/view/gridwin.cxx54
-rw-r--r--sc/source/ui/view/gridwin3.cxx4
-rw-r--r--sc/source/ui/view/gridwin5.cxx40
-rw-r--r--sc/source/ui/view/output.cxx5
-rw-r--r--sc/source/ui/view/preview.cxx35
-rw-r--r--sc/source/ui/view/select.cxx3
-rw-r--r--sc/source/ui/view/tabview2.cxx8
-rw-r--r--sc/source/ui/view/tabvwsh.cxx22
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx70
-rw-r--r--sc/source/ui/view/tabvwshe.cxx48
-rw-r--r--sc/source/ui/view/viewfun2.cxx13
-rw-r--r--scp2/inc/macros.inc5
-rw-r--r--scp2/source/ooo/file_library_ooo.scp15
-rw-r--r--scp2/source/ooo/makefile.mk4
-rw-r--r--scp2/source/ooo/module_hidden_ooo.scp4
-rw-r--r--scp2/source/ooo/registryitem_ooo.scp72
-rw-r--r--scp2/source/ooo/ure.scp112
-rw-r--r--scp2/source/winexplorerext/makefile.mk4
-rw-r--r--sd/inc/drawdoc.hxx15
-rw-r--r--sd/inc/glob.hxx3
-rw-r--r--sd/source/core/EffectMigration.cxx2
-rw-r--r--sd/source/core/drawdoc.cxx1
-rw-r--r--sd/source/core/drawdoc2.cxx11
-rw-r--r--sd/source/core/drawdoc3.cxx4
-rw-r--r--sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx177
-rw-r--r--sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx412
-rw-r--r--sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx13
-rw-r--r--sd/source/ui/accessibility/AccessibleOutlineView.cxx44
-rw-r--r--sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx7
-rw-r--r--sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx8
-rw-r--r--sd/source/ui/accessibility/AccessiblePresentationShape.cxx128
-rw-r--r--sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx4
-rw-r--r--sd/source/ui/accessibility/AccessibleSlideSorterView.cxx37
-rw-r--r--sd/source/ui/accessibility/accessibility.hrc40
-rw-r--r--sd/source/ui/accessibility/accessibility.src159
-rw-r--r--sd/source/ui/dlg/navigatr.cxx40
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx362
-rw-r--r--sd/source/ui/docshell/docshel4.cxx285
-rw-r--r--sd/source/ui/func/fudraw.cxx14
-rw-r--r--sd/source/ui/func/fuediglu.cxx112
-rw-r--r--sd/source/ui/func/fusel.cxx117
-rw-r--r--sd/source/ui/inc/AccessibleDocumentViewBase.hxx35
-rw-r--r--sd/source/ui/inc/AccessibleDrawDocumentView.hxx47
-rw-r--r--sd/source/ui/inc/AccessibleOutlineView.hxx6
-rw-r--r--sd/source/ui/inc/AccessiblePresentationGraphicShape.hxx7
-rw-r--r--sd/source/ui/inc/AccessiblePresentationOLEShape.hxx7
-rw-r--r--sd/source/ui/inc/AccessiblePresentationShape.hxx3
-rw-r--r--sd/source/ui/inc/AccessibleSlideSorterView.hxx3
-rw-r--r--sd/source/ui/inc/AccessibleSlideView.hxx39
-rw-r--r--sd/source/ui/inc/DrawController.hxx15
-rw-r--r--sd/source/ui/inc/DrawDocShell.hxx13
-rw-r--r--sd/source/ui/inc/DrawViewShell.hxx15
-rw-r--r--sd/source/ui/inc/OutlineViewShell.hxx3
-rw-r--r--sd/source/ui/inc/SdUnoDrawView.hxx4
-rw-r--r--sd/source/ui/inc/SlideSorterViewShell.hxx4
-rw-r--r--sd/source/ui/inc/SlideViewShell.hxx7
-rw-r--r--sd/source/ui/inc/TabControl.hxx4
-rw-r--r--sd/source/ui/inc/ViewShell.hxx8
-rw-r--r--sd/source/ui/inc/Window.hxx3
-rw-r--r--sd/source/ui/inc/fuediglu.hxx10
-rw-r--r--sd/source/ui/inc/fusel.hxx13
-rw-r--r--sd/source/ui/inc/navigatr.hxx7
-rw-r--r--sd/source/ui/inc/sdtreelb.hxx33
-rw-r--r--sd/source/ui/slideshow/showwin.cxx24
-rw-r--r--sd/source/ui/slideshow/showwindow.hxx5
-rw-r--r--sd/source/ui/slideshow/slideshow.cxx17
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx14
-rw-r--r--sd/source/ui/slidesorter/controller/SlsFocusManager.cxx5
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx20
-rw-r--r--sd/source/ui/unoidl/DrawController.cxx49
-rw-r--r--sd/source/ui/unoidl/SdUnoDrawView.cxx3
-rw-r--r--sd/source/ui/view/Outliner.cxx10
-rw-r--r--sd/source/ui/view/drviews4.cxx47
-rw-r--r--sd/source/ui/view/drviews5.cxx9
-rw-r--r--sd/source/ui/view/outlnvsh.cxx11
-rw-r--r--sd/source/ui/view/sdwindow.cxx39
-rw-r--r--sd/source/ui/view/tabcontr.cxx7
-rw-r--r--sd/source/ui/view/viewshel.cxx44
-rw-r--r--set_soenv.in54
-rw-r--r--setup_native/source/packinfo/finals_instsetoo.txt35
-rw-r--r--setup_native/source/win32/customactions/languagepacks/makefile.mk8
-rw-r--r--setup_native/source/win32/customactions/patch/makefile.mk8
-rw-r--r--setup_native/source/win32/customactions/quickstarter/makefile.mk8
-rw-r--r--setup_native/source/win32/customactions/rebase/makefile.mk8
-rw-r--r--setup_native/source/win32/customactions/reg4allmsdoc/makefile.mk7
-rw-r--r--setup_native/source/win32/customactions/reg4msdoc/makefile.mk7
-rw-r--r--setup_native/source/win32/customactions/reg64/makefile.mk4
-rw-r--r--setup_native/source/win32/customactions/regactivex/makefile.mk5
-rw-r--r--setup_native/source/win32/customactions/relnotes/makefile.mk7
-rw-r--r--setup_native/source/win32/customactions/shellextensions/makefile.mk8
-rw-r--r--setup_native/source/win32/customactions/tools/makefile.mk8
-rw-r--r--sfx2/inc/sfx2/dinfdlg.hxx2
-rw-r--r--sfx2/source/dialog/newstyle.cxx2
-rw-r--r--sfx2/source/dialog/tabdlg.cxx4
-rw-r--r--sfx2/source/dialog/templdlg.hrc5
-rw-r--r--sfx2/source/menu/mnuitem.cxx8
-rw-r--r--sfx2/source/view/viewfrm.cxx14
-rw-r--r--slideshow/source/engine/animationfactory.cxx4
-rw-r--r--soldep/source/soldep.cxx8
-rw-r--r--solenv/bin/make_installer.pl355
-rw-r--r--solenv/bin/modules/installer/control.pm4
-rw-r--r--solenv/bin/modules/installer/epmfile.pm2
-rw-r--r--solenv/bin/modules/installer/globals.pm22
-rw-r--r--solenv/bin/modules/installer/languages.pm47
-rw-r--r--solenv/bin/modules/installer/parameter.pm3
-rw-r--r--solenv/bin/modules/installer/patch/FileOperations.pm333
-rw-r--r--solenv/bin/modules/installer/patch/FileSequenceList.pm159
-rw-r--r--solenv/bin/modules/installer/patch/InstallationSet.pm467
-rw-r--r--solenv/bin/modules/installer/patch/Msi.pm342
-rw-r--r--solenv/bin/modules/installer/patch/MsiRow.pm160
-rw-r--r--solenv/bin/modules/installer/patch/MsiTable.pm274
-rw-r--r--solenv/bin/modules/installer/patch/ReleasesList.pm210
-rw-r--r--[-rwxr-xr-x]solenv/bin/modules/installer/patch/Tools.pm (renamed from stlport/win32_custom.sh)34
-rw-r--r--solenv/bin/modules/installer/patch/Version.pm74
-rw-r--r--solenv/bin/modules/installer/scriptitems.pm20
-rw-r--r--solenv/bin/modules/installer/windows/component.pm5
-rw-r--r--solenv/bin/modules/installer/windows/directory.pm15
-rw-r--r--solenv/bin/modules/installer/windows/file.pm193
-rw-r--r--solenv/bin/modules/installer/windows/media.pm143
-rw-r--r--solenv/bin/modules/installer/windows/mergemodule.pm1668
-rw-r--r--solenv/bin/modules/installer/windows/msiglobal.pm279
-rw-r--r--solenv/bin/modules/installer/windows/msp.pm1493
-rw-r--r--solenv/bin/modules/installer/windows/property.pm12
-rw-r--r--solenv/bin/modules/installer/windows/registry.pm11
-rw-r--r--solenv/bin/modules/installer/windows/update.pm595
-rw-r--r--solenv/bin/modules/installer/ziplist.pm134
-rw-r--r--solenv/bin/modules/par2script/globals.pm3
-rw-r--r--solenv/bin/modules/pre2par/globals.pm3
-rw-r--r--solenv/bin/patch_make_releases_xml.pl197
-rw-r--r--solenv/bin/release_prepare.pl226
-rw-r--r--solenv/doc/gbuild/solenv/gbuild/gbuild.mk1
-rw-r--r--solenv/gbuild/gbuild.mk6
-rw-r--r--solenv/gbuild/platform/macosx.mk10
-rw-r--r--solenv/inc/lldb4aoo.py4
-rw-r--r--solenv/inc/unxlng.mk21
-rw-r--r--solenv/inc/unxmacx.mk12
-rw-r--r--solenv/inc/wntmsci11.mk2
-rw-r--r--starmath/source/accessibility.cxx6
-rw-r--r--starmath/source/accessibility.hxx6
-rw-r--r--stlport/STLport-4.0-sunstudio12u1.patch21
-rw-r--r--stlport/STLport-4.0.patch4926
-rw-r--r--stlport/STLport-4.5-0119.patch1328
-rw-r--r--stlport/STLport-4.5-gcc43_warnings.patch113
-rw-r--r--stlport/STLport-4.5.patch964
-rw-r--r--stlport/dos_lineends.patch60
-rw-r--r--stlport/makefile.mk164
-rw-r--r--stlport/prj/d.lst21
-rw-r--r--stlport/win32_sdk.sh29
-rw-r--r--svl/inc/svl/smplhint.hxx4
-rw-r--r--svl/inc/svl/zformat.hxx4
-rw-r--r--svl/source/notify/smplhint.cxx9
-rw-r--r--svl/source/numbers/zformat.cxx4
-rw-r--r--svtools/AllLangResTarget_svt.mk1
-rw-r--r--svtools/Library_svt.mk3
-rw-r--r--svtools/Package_inc.mk1
-rw-r--r--svtools/inc/svtools/accessibleruler.hxx303
-rw-r--r--svtools/inc/svtools/embedhlp.hxx7
-rw-r--r--svtools/inc/svtools/headbar.hxx8
-rw-r--r--svtools/inc/svtools/ruler.hxx12
-rw-r--r--svtools/inc/svtools/svlbitm.hxx8
-rw-r--r--svtools/inc/svtools/svlbox.hxx5
-rw-r--r--svtools/inc/svtools/svtools.hrc2
-rw-r--r--svtools/inc/svtools/svtreebx.hxx22
-rw-r--r--svtools/inc/svtools/texteng.hxx2
-rw-r--r--svtools/inc/svtools/treelist.hxx10
-rw-r--r--svtools/inc/svtools/valueset.hxx23
-rw-r--r--svtools/inc/svtools/vclxaccessibleheaderbar.hxx86
-rw-r--r--svtools/inc/svtools/vclxaccessibleheaderbaritem.hxx127
-rw-r--r--svtools/source/brwbox/brwbox3.cxx26
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx5
-rw-r--r--svtools/source/contnr/imivctl1.cxx3
-rw-r--r--svtools/source/contnr/svimpbox.cxx27
-rw-r--r--svtools/source/contnr/svtabbx.cxx11
-rw-r--r--svtools/source/contnr/svtreebx.cxx159
-rw-r--r--svtools/source/control/accessibleruler.cxx547
-rw-r--r--svtools/source/control/headbar.cxx27
-rw-r--r--svtools/source/control/ruler.cxx45
-rw-r--r--svtools/source/control/ruler.src32
-rw-r--r--svtools/source/control/valueacc.cxx60
-rw-r--r--svtools/source/control/valueimp.hxx3
-rw-r--r--svtools/source/control/valueset.cxx76
-rw-r--r--svtools/source/control/vclxaccessibleheaderbar.cxx193
-rw-r--r--svtools/source/control/vclxaccessibleheaderbaritem.cxx404
-rw-r--r--svtools/source/edit/svmedit.cxx10
-rw-r--r--svtools/source/misc/acceleratorexecute.cxx21
-rw-r--r--svtools/source/misc/embedhlp.cxx105
-rw-r--r--svx/Library_svx.mk2
-rw-r--r--svx/inc/svx/AccessibleControlShape.hxx4
-rw-r--r--svx/inc/svx/AccessibleGraphicShape.hxx4
-rw-r--r--svx/inc/svx/AccessibleOLEShape.hxx5
-rw-r--r--svx/inc/svx/AccessibleShape.hxx120
-rw-r--r--svx/inc/svx/AccessibleSvxFindReplaceDialog.hxx66
-rw-r--r--svx/inc/svx/AccessibleTableShape.hxx137
-rw-r--r--svx/inc/svx/ChildrenManager.hxx4
-rw-r--r--svx/inc/svx/EnhancedCustomShapeTypeNames.hxx3
-rw-r--r--svx/inc/svx/IAccessibleParent.hxx18
-rw-r--r--svx/inc/svx/ctredlin.hxx4
-rw-r--r--svx/inc/svx/dlgctrl.hxx26
-rwxr-xr-xsvx/inc/svx/nbdtmg.hxx4
-rwxr-xr-xsvx/inc/svx/sdr/table/tablecontroller.hxx13
-rw-r--r--svx/inc/svx/srchdlg.hxx13
-rw-r--r--svx/inc/svx/svdmodel.hxx12
-rw-r--r--svx/inc/svx/svdmrkv.hxx3
-rw-r--r--svx/inc/svx/svdoashp.hxx4
-rw-r--r--svx/inc/svx/svdobj.hxx2
-rw-r--r--svx/inc/svx/svdoole2.hxx4
-rw-r--r--svx/source/accessibility/AccessibleControlShape.cxx102
-rw-r--r--svx/source/accessibility/AccessibleEmptyEditSource.cxx2
-rw-r--r--svx/source/accessibility/AccessibleFrameSelector.cxx39
-rw-r--r--svx/source/accessibility/AccessibleGraphicShape.cxx33
-rw-r--r--svx/source/accessibility/AccessibleOLEShape.cxx24
-rw-r--r--svx/source/accessibility/AccessibleShape.cxx685
-rw-r--r--svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx120
-rw-r--r--svx/source/accessibility/AccessibleTextHelper.cxx86
-rw-r--r--svx/source/accessibility/ChildrenManager.cxx15
-rw-r--r--svx/source/accessibility/ChildrenManagerImpl.cxx175
-rw-r--r--svx/source/accessibility/ChildrenManagerImpl.hxx18
-rw-r--r--svx/source/accessibility/ShapeTypeHandler.cxx40
-rw-r--r--svx/source/accessibility/charmapacc.cxx65
-rw-r--r--svx/source/accessibility/svxpixelctlaccessiblecontext.cxx1281
-rw-r--r--svx/source/accessibility/svxrectctaccessiblecontext.cxx191
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx256
-rw-r--r--svx/source/dialog/_bmpmask.cxx94
-rw-r--r--svx/source/dialog/charmap.cxx16
-rw-r--r--svx/source/dialog/ctredlin.cxx23
-rw-r--r--svx/source/dialog/ctredlin.src8
-rw-r--r--svx/source/dialog/dlgctrl.cxx265
-rw-r--r--svx/source/dialog/frmsel.cxx71
-rw-r--r--svx/source/dialog/srchdlg.cxx27
-rw-r--r--svx/source/inc/AccessibleFrameSelector.hxx5
-rw-r--r--svx/source/inc/svxpixelctlaccessiblecontext.hxx424
-rw-r--r--svx/source/inc/svxrectctaccessiblecontext.hxx45
-rwxr-xr-xsvx/source/sidebar/nbdtmg.cxx2
-rw-r--r--svx/source/svdraw/svdoashp.cxx17
-rw-r--r--svx/source/svdraw/svdoole2.cxx12
-rw-r--r--svx/source/table/accessiblecell.cxx106
-rw-r--r--svx/source/table/accessiblecell.hxx9
-rw-r--r--svx/source/table/accessibletableshape.cxx753
-rw-r--r--svx/source/table/tablecontroller.cxx84
-rw-r--r--svx/source/unodraw/unoprov.cxx3
-rw-r--r--svx/source/unodraw/unoshape.cxx1
-rw-r--r--svx/source/unodraw/unoshtxt.cxx29
-rw-r--r--sw/Library_sw.mk3
-rw-r--r--sw/inc/IDocumentContentOperations.hxx132
-rw-r--r--sw/inc/PostItMgr.hxx4
-rw-r--r--sw/inc/access.hrc5
-rw-r--r--sw/inc/accmap.hxx59
-rw-r--r--sw/inc/crsrsh.hxx50
-rw-r--r--sw/inc/doc.hxx40
-rw-r--r--sw/inc/docsh.hxx6
-rw-r--r--sw/inc/editsh.hxx7
-rw-r--r--sw/inc/expfld.hxx40
-rw-r--r--sw/inc/fesh.hxx4
-rw-r--r--sw/inc/fldbas.hxx21
-rw-r--r--sw/inc/fmtfld.hxx30
-rw-r--r--sw/inc/frmfmt.hxx18
-rw-r--r--sw/inc/hintids.hxx12
-rw-r--r--sw/inc/mdiexp.hxx2
-rw-r--r--sw/inc/ndole.hxx3
-rw-r--r--sw/inc/ndtxt.hxx102
-rw-r--r--sw/inc/node.hxx7
-rw-r--r--sw/inc/tblsel.hxx6
-rw-r--r--sw/inc/txatbase.hxx22
-rw-r--r--sw/inc/txtfld.hxx75
-rw-r--r--sw/inc/txtrfmrk.hxx1
-rw-r--r--sw/inc/txttxmrk.hxx1
-rw-r--r--sw/inc/viewsh.hxx4
-rw-r--r--sw/inc/viscrs.hxx20
-rw-r--r--sw/sdi/_textsh.sdi15
-rw-r--r--sw/sdi/_viewsh.sdi12
-rw-r--r--sw/source/core/access/acccell.cxx232
-rw-r--r--sw/source/core/access/acccell.hxx58
-rw-r--r--sw/source/core/access/acccontext.cxx112
-rw-r--r--sw/source/core/access/acccontext.hxx21
-rw-r--r--sw/source/core/access/accdoc.cxx538
-rw-r--r--sw/source/core/access/accdoc.hxx41
-rw-r--r--sw/source/core/access/accembedded.cxx64
-rw-r--r--sw/source/core/access/accembedded.hxx26
-rw-r--r--sw/source/core/access/accfield.cxx348
-rw-r--r--sw/source/core/access/accfield.hxx213
-rw-r--r--sw/source/core/access/accfootnote.cxx15
-rw-r--r--sw/source/core/access/accfootnote.hxx1
-rw-r--r--sw/source/core/access/accframe.cxx19
-rw-r--r--sw/source/core/access/accframe.hxx11
-rw-r--r--sw/source/core/access/accframebase.cxx174
-rw-r--r--sw/source/core/access/accframebase.hxx13
-rw-r--r--sw/source/core/access/accfrmobj.cxx23
-rw-r--r--sw/source/core/access/accfrmobj.hxx4
-rw-r--r--sw/source/core/access/accfrmobjmap.cxx94
-rw-r--r--sw/source/core/access/accfrmobjmap.hxx40
-rw-r--r--sw/source/core/access/accgraphic.cxx17
-rw-r--r--sw/source/core/access/accgraphic.hxx4
-rw-r--r--sw/source/core/access/accheaderfooter.cxx17
-rw-r--r--sw/source/core/access/accheaderfooter.hxx5
-rw-r--r--sw/source/core/access/acchyperlink.cxx116
-rw-r--r--sw/source/core/access/accmap.cxx1089
-rw-r--r--sw/source/core/access/accnotextframe.cxx167
-rw-r--r--sw/source/core/access/accnotextframe.hxx64
-rw-r--r--sw/source/core/access/accnotexthyperlink.cxx232
-rw-r--r--sw/source/core/access/accnotexthyperlink.hxx93
-rw-r--r--sw/source/core/access/accpara.cxx1793
-rw-r--r--sw/source/core/access/accpara.hxx69
-rw-r--r--sw/source/core/access/accportions.cxx126
-rw-r--r--sw/source/core/access/accportions.hxx19
-rw-r--r--sw/source/core/access/accpreview.cxx27
-rw-r--r--sw/source/core/access/accpreview.hxx6
-rw-r--r--sw/source/core/access/accselectionhelper.cxx105
-rw-r--r--sw/source/core/access/acctable.cxx340
-rw-r--r--sw/source/core/access/acctable.hxx33
-rw-r--r--sw/source/core/access/acctextframe.cxx140
-rw-r--r--sw/source/core/access/acctextframe.hxx44
-rw-r--r--sw/source/core/attr/format.cxx4
-rw-r--r--sw/source/core/bastyp/init.cxx6
-rw-r--r--sw/source/core/crsr/callnk.cxx2
-rw-r--r--sw/source/core/crsr/crsrsh.cxx101
-rw-r--r--sw/source/core/crsr/crstrvl.cxx439
-rw-r--r--sw/source/core/crsr/findattr.cxx4
-rw-r--r--sw/source/core/crsr/findtxt.cxx30
-rw-r--r--sw/source/core/crsr/overlayrangesoutline.cxx117
-rw-r--r--sw/source/core/crsr/overlayrangesoutline.hxx70
-rw-r--r--sw/source/core/crsr/swcrsr.cxx117
-rw-r--r--sw/source/core/crsr/viscrs.cxx133
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx4
-rw-r--r--sw/source/core/doc/doc.cxx31
-rw-r--r--sw/source/core/doc/docedt.cxx4
-rw-r--r--sw/source/core/doc/docfld.cxx26
-rw-r--r--sw/source/core/doc/docfmt.cxx58
-rw-r--r--sw/source/core/doc/doclay.cxx4
-rw-r--r--sw/source/core/doc/docnum.cxx28
-rw-r--r--sw/source/core/doc/docredln.cxx4
-rw-r--r--sw/source/core/doc/docruby.cxx4
-rw-r--r--sw/source/core/doc/doctxm.cxx6
-rw-r--r--sw/source/core/doc/tblcpy.cxx6
-rw-r--r--sw/source/core/doc/visiturl.cxx2
-rw-r--r--sw/source/core/docnode/node.cxx78
-rw-r--r--sw/source/core/docnode/nodes.cxx27
-rw-r--r--sw/source/core/draw/dview.cxx2
-rw-r--r--sw/source/core/edit/acorrect.cxx2
-rw-r--r--sw/source/core/edit/edatmisc.cxx4
-rw-r--r--sw/source/core/edit/edattr.cxx30
-rw-r--r--sw/source/core/edit/edfld.cxx100
-rw-r--r--sw/source/core/edit/edfldexp.cxx1
-rw-r--r--sw/source/core/edit/editsh.cxx4
-rw-r--r--sw/source/core/edit/edlingu.cxx6
-rw-r--r--sw/source/core/edit/ednumber.cxx16
-rw-r--r--sw/source/core/edit/edtox.cxx4
-rw-r--r--sw/source/core/fields/expfld.cxx409
-rw-r--r--sw/source/core/fields/fldbas.cxx29
-rw-r--r--sw/source/core/fields/reffld.cxx28
-rw-r--r--sw/source/core/frmedt/fefly1.cxx78
-rw-r--r--sw/source/core/frmedt/feshview.cxx36
-rw-r--r--sw/source/core/frmedt/tblsel.cxx13
-rw-r--r--sw/source/core/inc/SwPortionHandler.hxx4
-rw-r--r--sw/source/core/inc/docfld.hxx5
-rw-r--r--sw/source/core/inc/doctxm.hxx3
-rw-r--r--sw/source/core/inc/frame.hxx19
-rw-r--r--sw/source/core/inc/rolbck.hxx11
-rw-r--r--sw/source/core/inc/rootfrm.hxx5
-rw-r--r--sw/source/core/inc/swfont.hxx27
-rw-r--r--sw/source/core/inc/tabfrm.hxx61
-rw-r--r--sw/source/core/inc/txtfrm.hxx7
-rw-r--r--sw/source/core/inc/txttypes.hxx1
-rw-r--r--sw/source/core/inc/viewimp.hxx6
-rw-r--r--sw/source/core/layout/atrfrm.cxx16
-rw-r--r--sw/source/core/layout/flycnt.cxx24
-rw-r--r--sw/source/core/layout/laycache.cxx4
-rw-r--r--sw/source/core/layout/tabfrm.cxx93
-rw-r--r--sw/source/core/layout/trvlfrm.cxx4
-rw-r--r--sw/source/core/layout/wsfrm.cxx4
-rw-r--r--sw/source/core/ole/ndole.cxx9
-rw-r--r--sw/source/core/text/atrhndl.hxx2
-rw-r--r--sw/source/core/text/atrstck.cxx21
-rw-r--r--sw/source/core/text/frmform.cxx46
-rw-r--r--sw/source/core/text/inftxt.cxx58
-rw-r--r--sw/source/core/text/itrform2.cxx26
-rw-r--r--sw/source/core/text/porfld.cxx22
-rw-r--r--sw/source/core/text/porfld.hxx7
-rw-r--r--sw/source/core/text/porlay.cxx4
-rw-r--r--sw/source/core/text/pormulti.cxx36
-rw-r--r--sw/source/core/text/portxt.cxx118
-rw-r--r--sw/source/core/text/portxt.hxx18
-rw-r--r--sw/source/core/text/txtfld.cxx75
-rw-r--r--sw/source/core/text/txtfrm.cxx10
-rw-r--r--sw/source/core/tox/tox.cxx2
-rw-r--r--sw/source/core/tox/txmsrt.cxx14
-rw-r--r--sw/source/core/txtnode/atrfld.cxx294
-rw-r--r--sw/source/core/txtnode/ndhints.cxx18
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx535
-rw-r--r--sw/source/core/txtnode/swfont.cxx3
-rw-r--r--sw/source/core/txtnode/thints.cxx244
-rw-r--r--sw/source/core/txtnode/txatbase.cxx1
-rw-r--r--sw/source/core/txtnode/txatritr.cxx8
-rw-r--r--sw/source/core/txtnode/txtedt.cxx39
-rw-r--r--sw/source/core/undo/SwUndoField.cxx8
-rw-r--r--sw/source/core/undo/rolbck.cxx24
-rw-r--r--sw/source/core/undo/unsect.cxx7
-rw-r--r--sw/source/core/undo/untbl.cxx5
-rw-r--r--sw/source/core/undo/untblk.cxx2
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx387
-rw-r--r--sw/source/core/unocore/unodraw.cxx3
-rw-r--r--sw/source/core/unocore/unofield.cxx25
-rw-r--r--sw/source/core/unocore/unoframe.cxx25
-rw-r--r--sw/source/core/unocore/unoidx.cxx12
-rw-r--r--sw/source/core/unocore/unomap.cxx38
-rw-r--r--sw/source/core/unocore/unoportenum.cxx64
-rw-r--r--sw/source/core/unocore/unorefmk.cxx20
-rw-r--r--sw/source/core/view/viewimp.cxx18
-rw-r--r--sw/source/core/view/vprint.cxx17
-rw-r--r--sw/source/filter/ascii/ascatr.cxx52
-rw-r--r--sw/source/filter/ascii/parasc.cxx4
-rw-r--r--sw/source/filter/html/css1atr.cxx2
-rw-r--r--sw/source/filter/html/htmlatr.cxx14
-rw-r--r--sw/source/filter/html/swhtml.cxx5
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/rtf/rtffly.cxx2
-rw-r--r--sw/source/filter/ww1/fltshell.cxx19
-rw-r--r--sw/source/filter/ww1/w1filter.cxx4
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx2
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx5
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx23
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx25
-rw-r--r--sw/source/filter/ww8/ww8par.cxx43
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx156
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx8
-rw-r--r--sw/source/ui/app/applab.cxx2
-rw-r--r--sw/source/ui/app/docsh.cxx56
-rw-r--r--sw/source/ui/app/docst.cxx4
-rw-r--r--sw/source/ui/cctrl/actctrl.cxx5
-rw-r--r--sw/source/ui/cctrl/swlbox.cxx10
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx15
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx3
-rw-r--r--sw/source/ui/docvw/SidebarTxtControl.hxx2
-rw-r--r--sw/source/ui/docvw/edtdd.cxx4
-rw-r--r--sw/source/ui/docvw/edtwin.cxx85
-rw-r--r--sw/source/ui/docvw/edtwin2.cxx224
-rw-r--r--sw/source/ui/docvw/edtwin3.cxx28
-rw-r--r--sw/source/ui/envelp/envfmt.cxx2
-rw-r--r--sw/source/ui/fldui/fldedt.cxx38
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx12
-rw-r--r--sw/source/ui/frmdlg/column.cxx38
-rw-r--r--sw/source/ui/frmdlg/column.hrc7
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx22
-rw-r--r--sw/source/ui/inc/conttree.hxx17
-rw-r--r--sw/source/ui/inc/edtwin.hxx3
-rw-r--r--sw/source/ui/inc/pview.hxx11
-rw-r--r--sw/source/ui/inc/swlbox.hxx3
-rw-r--r--sw/source/ui/inc/swuicnttab.hxx15
-rw-r--r--sw/source/ui/inc/view.hxx5
-rw-r--r--sw/source/ui/inc/wrtsh.hxx5
-rw-r--r--sw/source/ui/index/cnttab.cxx159
-rw-r--r--sw/source/ui/index/cnttab.hrc7
-rw-r--r--sw/source/ui/index/cnttab.src18
-rw-r--r--sw/source/ui/lingu/hhcwrp.cxx6
-rw-r--r--sw/source/ui/misc/glossary.hrc4
-rw-r--r--sw/source/ui/misc/insfnote.cxx2
-rw-r--r--sw/source/ui/ribbar/inputwin.cxx8
-rw-r--r--sw/source/ui/ribbar/inputwin.hrc5
-rw-r--r--sw/source/ui/ribbar/inputwin.src16
-rw-r--r--sw/source/ui/ribbar/workctrl.cxx9
-rw-r--r--sw/source/ui/shells/annotsh.cxx36
-rw-r--r--sw/source/ui/shells/basesh.cxx72
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx44
-rw-r--r--sw/source/ui/shells/frmsh.cxx10
-rw-r--r--sw/source/ui/shells/grfsh.cxx25
-rw-r--r--sw/source/ui/shells/langhelper.cxx6
-rw-r--r--sw/source/ui/shells/listsh.cxx7
-rw-r--r--sw/source/ui/shells/tabsh.cxx7
-rw-r--r--sw/source/ui/shells/textfld.cxx148
-rw-r--r--sw/source/ui/shells/textidx.cxx11
-rw-r--r--sw/source/ui/shells/textsh.cxx164
-rw-r--r--sw/source/ui/shells/textsh1.cxx211
-rw-r--r--sw/source/ui/shells/txtattr.cxx22
-rw-r--r--sw/source/ui/shells/txtnum.cxx4
-rw-r--r--sw/source/ui/table/convert.hrc6
-rw-r--r--sw/source/ui/table/tabledlg.cxx2
-rw-r--r--sw/source/ui/table/tabledlg.hrc3
-rw-r--r--sw/source/ui/uiview/formatclipboard.cxx4
-rw-r--r--sw/source/ui/uiview/pview.cxx200
-rw-r--r--sw/source/ui/uiview/view.cxx20
-rw-r--r--sw/source/ui/uiview/view2.cxx38
-rw-r--r--sw/source/ui/uiview/viewmdi.cxx28
-rw-r--r--sw/source/ui/uiview/viewsrch.cxx53
-rw-r--r--sw/source/ui/uiview/viewstat.cxx83
-rw-r--r--sw/source/ui/uiview/viewtab.cxx10
-rw-r--r--sw/source/ui/utlui/content.cxx361
-rw-r--r--sw/source/ui/utlui/navipi.hrc5
-rw-r--r--sw/source/ui/wrtsh/delete.cxx2
-rw-r--r--sw/source/ui/wrtsh/select.cxx13
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx57
-rw-r--r--sw/source/ui/wrtsh/wrtsh2.cxx14
-rw-r--r--toolkit/inc/toolkit/awt/vclxwindows.hxx8
-rw-r--r--toolkit/source/awt/vclxaccessiblecomponent.cxx64
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx5
-rw-r--r--toolkit/source/awt/vclxwindows.cxx25
-rw-r--r--tools/Executable_mkunroll.mk8
-rw-r--r--tools/Executable_rscdep.mk8
-rw-r--r--tools/Executable_so_checksum.mk7
-rw-r--r--tools/Executable_sspretty.mk7
-rw-r--r--tools/source/generic/color.cxx2
-rw-r--r--ure/source/uretest/Makefile2
-rw-r--r--ure/source/uretest/Makefile.pln8
-rwxr-xr-xvcl/Library_vcl.mk10
-rw-r--r--vcl/inc/ilstbox.hxx21
-rw-r--r--vcl/inc/svdata.hxx3
-rw-r--r--vcl/inc/vcl/combobox.hxx10
-rw-r--r--vcl/inc/vcl/lstbox.hxx9
-rw-r--r--vcl/inc/vcl/menu.hxx14
-rw-r--r--vcl/inc/vcl/svapp.hxx27
-rw-r--r--vcl/inc/vcl/vclevent.hxx43
-rw-r--r--vcl/inc/vcl/window.hxx5
-rw-r--r--vcl/inc/win/g_msaasvc.h26
-rw-r--r--vcl/source/app/svapp.cxx73
-rw-r--r--vcl/source/app/svdata.cxx121
-rw-r--r--vcl/source/app/svmain.cxx11
-rw-r--r--vcl/source/control/combobox.cxx25
-rw-r--r--vcl/source/control/edit.cxx36
-rw-r--r--vcl/source/control/ilstbox.cxx33
-rw-r--r--vcl/source/control/lstbox.cxx38
-rw-r--r--vcl/source/control/morebtn.cxx5
-rw-r--r--vcl/source/control/tabctrl.cxx7
-rw-r--r--vcl/source/window/btndlg.cxx9
-rw-r--r--vcl/source/window/dlgctrl.cxx13
-rw-r--r--vcl/source/window/menu.cxx49
-rw-r--r--vcl/source/window/toolbox.cxx5
-rw-r--r--vcl/source/window/toolbox2.cxx6
-rw-r--r--vcl/source/window/window.cxx56
-rw-r--r--vcl/win/source/window/salframe.cxx95
-rw-r--r--winaccessibility/inc/AccComponentEventListener.hxx78
-rw-r--r--winaccessibility/inc/AccContainerEventListener.hxx98
-rw-r--r--winaccessibility/inc/AccDescendantManagerEventListener.hxx64
-rw-r--r--winaccessibility/inc/AccDialogEventListener.hxx63
-rw-r--r--winaccessibility/inc/AccEventListener.hxx90
-rw-r--r--winaccessibility/inc/AccFrameEventListener.hxx63
-rw-r--r--winaccessibility/inc/AccListEventListener.hxx54
-rw-r--r--winaccessibility/inc/AccMenuEventListener.hxx57
-rw-r--r--winaccessibility/inc/AccObject.hxx130
-rw-r--r--winaccessibility/inc/AccObjectContainerEventListener.hxx50
-rw-r--r--winaccessibility/inc/AccObjectManagerAgent.hxx102
-rw-r--r--winaccessibility/inc/AccObjectWinManager.hxx177
-rw-r--r--winaccessibility/inc/AccParagraphEventListener.hxx62
-rw-r--r--winaccessibility/inc/AccResource.hxx69
-rw-r--r--winaccessibility/inc/AccTableEventListener.hxx53
-rw-r--r--winaccessibility/inc/AccTextComponentEventListener.hxx48
-rw-r--r--winaccessibility/inc/AccTopWindowListener.hxx66
-rw-r--r--winaccessibility/inc/AccTreeEventListener.hxx50
-rw-r--r--winaccessibility/inc/AccWindowEventListener.hxx60
-rw-r--r--winaccessibility/inc/ResIDGenerator.hxx56
-rw-r--r--winaccessibility/inc/UAccCOM2.h30
-rw-r--r--winaccessibility/inc/accHelper.hxx145
-rw-r--r--winaccessibility/inc/act.hxx90
-rw-r--r--winaccessibility/inc/g_msacc.hxx27
-rw-r--r--winaccessibility/inc/unomsaaevent.hxx110
-rw-r--r--winaccessibility/prj/build.lst5
-rw-r--r--winaccessibility/prj/d.lst9
-rw-r--r--winaccessibility/source/UAccCOM/AccAction.cpp120
-rw-r--r--winaccessibility/source/UAccCOM/AccAction.h105
-rw-r--r--winaccessibility/source/UAccCOM/AccAction.rgs26
-rw-r--r--winaccessibility/source/UAccCOM/AccActionBase.cpp416
-rw-r--r--winaccessibility/source/UAccCOM/AccActionBase.h92
-rw-r--r--winaccessibility/source/UAccCOM/AccComponent.cpp72
-rw-r--r--winaccessibility/source/UAccCOM/AccComponent.h97
-rw-r--r--winaccessibility/source/UAccCOM/AccComponent.rgs23
-rw-r--r--winaccessibility/source/UAccCOM/AccComponentBase.cpp213
-rw-r--r--winaccessibility/source/UAccCOM/AccComponentBase.h78
-rw-r--r--winaccessibility/source/UAccCOM/AccContext.rgs23
-rw-r--r--winaccessibility/source/UAccCOM/AccEditableText.cpp508
-rw-r--r--winaccessibility/source/UAccCOM/AccEditableText.h115
-rw-r--r--winaccessibility/source/UAccCOM/AccEditableText.rgs23
-rw-r--r--winaccessibility/source/UAccCOM/AccExtendedComponent.rgs23
-rw-r--r--winaccessibility/source/UAccCOM/AccFont.rgs23
-rw-r--r--winaccessibility/source/UAccCOM/AccHyperLink.cpp296
-rw-r--r--winaccessibility/source/UAccCOM/AccHyperLink.h140
-rw-r--r--winaccessibility/source/UAccCOM/AccHyperLink.rgs23
-rw-r--r--winaccessibility/source/UAccCOM/AccHypertext.cpp409
-rw-r--r--winaccessibility/source/UAccCOM/AccHypertext.h161
-rw-r--r--winaccessibility/source/UAccCOM/AccHypertext.rgs23
-rw-r--r--winaccessibility/source/UAccCOM/AccImage.cpp102
-rw-r--r--winaccessibility/source/UAccCOM/AccImage.h101
-rw-r--r--winaccessibility/source/UAccCOM/AccImage.rgs23
-rw-r--r--winaccessibility/source/UAccCOM/AccKeyBinding.rgs23
-rw-r--r--winaccessibility/source/UAccCOM/AccRelation.cpp214
-rw-r--r--winaccessibility/source/UAccCOM/AccRelation.h88
-rw-r--r--winaccessibility/source/UAccCOM/AccRelation.rgs25
-rw-r--r--winaccessibility/source/UAccCOM/AccSelection.rgs23
-rw-r--r--winaccessibility/source/UAccCOM/AccTable.cpp1069
-rw-r--r--winaccessibility/source/UAccCOM/AccTable.h175
-rw-r--r--winaccessibility/source/UAccCOM/AccTable.rgs23
-rw-r--r--winaccessibility/source/UAccCOM/AccText.cpp282
-rw-r--r--winaccessibility/source/UAccCOM/AccText.h140
-rw-r--r--winaccessibility/source/UAccCOM/AccText.rgs23
-rw-r--r--winaccessibility/source/UAccCOM/AccTextBase.cpp995
-rw-r--r--winaccessibility/source/UAccCOM/AccTextBase.h122
-rw-r--r--winaccessibility/source/UAccCOM/AccValue.cpp224
-rw-r--r--winaccessibility/source/UAccCOM/AccValue.h104
-rw-r--r--winaccessibility/source/UAccCOM/AccValue.rgs23
-rw-r--r--winaccessibility/source/UAccCOM/AccessibleKeyStroke.h157
-rw-r--r--winaccessibility/source/UAccCOM/CheckEnableAccessible.cpp35
-rw-r--r--winaccessibility/source/UAccCOM/CheckEnableAccessible.h30
-rw-r--r--winaccessibility/source/UAccCOM/EnumVariant.cpp227
-rw-r--r--winaccessibility/source/UAccCOM/EnumVariant.h106
-rw-r--r--winaccessibility/source/UAccCOM/EnumVariant.rgs26
-rw-r--r--winaccessibility/source/UAccCOM/MAccessible.cpp3267
-rw-r--r--winaccessibility/source/UAccCOM/MAccessible.h294
-rw-r--r--winaccessibility/source/UAccCOM/MAccessible.rgs26
-rw-r--r--winaccessibility/source/UAccCOM/Resource.h70
-rw-r--r--winaccessibility/source/UAccCOM/StdAfx.cpp29
-rw-r--r--winaccessibility/source/UAccCOM/UAccCOM.cpp109
-rw-r--r--winaccessibility/source/UAccCOM/UAccCOM.def7
-rw-r--r--winaccessibility/source/UAccCOM/UAccCOM.rc149
-rw-r--r--winaccessibility/source/UAccCOM/UNOXWrapper.cpp27
-rw-r--r--winaccessibility/source/UAccCOM/UNOXWrapper.h72
-rw-r--r--winaccessibility/source/UAccCOM/UNOXWrapper.rgs26
-rw-r--r--winaccessibility/source/UAccCOM/acccommon.h95
-rw-r--r--winaccessibility/source/UAccCOM/makefile.mk136
-rw-r--r--winaccessibility/source/UAccCOM/stdafx.h64
-rw-r--r--winaccessibility/source/UAccCOMIDL/AccessibleKeyBinding.idl66
-rw-r--r--winaccessibility/source/UAccCOMIDL/AccessibleKeyStroke.idl149
-rw-r--r--winaccessibility/source/UAccCOMIDL/Charset.idl33
-rw-r--r--winaccessibility/source/UAccCOMIDL/UAccCOM.idl209
-rw-r--r--winaccessibility/source/UAccCOMIDL/defines.idl40
-rw-r--r--winaccessibility/source/UAccCOMIDL/ia2_api_all.idl5473
-rw-r--r--winaccessibility/source/UAccCOMIDL/makefile.mk101
-rw-r--r--winaccessibility/source/service/AccComponentEventListener.cxx336
-rw-r--r--winaccessibility/source/service/AccContainerEventListener.cxx573
-rw-r--r--winaccessibility/source/service/AccDescendantManagerEventListener.cxx226
-rw-r--r--winaccessibility/source/service/AccDialogEventListener.cxx150
-rw-r--r--winaccessibility/source/service/AccEventListener.cxx309
-rw-r--r--winaccessibility/source/service/AccFrameEventListener.cxx173
-rw-r--r--winaccessibility/source/service/AccListEventListener.cxx123
-rw-r--r--winaccessibility/source/service/AccMenuEventListener.cxx151
-rw-r--r--winaccessibility/source/service/AccObject.cxx1109
-rw-r--r--winaccessibility/source/service/AccObjectContainerEventListener.cxx72
-rw-r--r--winaccessibility/source/service/AccObjectManagerAgent.cxx386
-rw-r--r--winaccessibility/source/service/AccObjectWinManager.cxx1321
-rw-r--r--winaccessibility/source/service/AccParagraphEventListener.cxx145
-rw-r--r--winaccessibility/source/service/AccResource.cxx85
-rw-r--r--winaccessibility/source/service/AccTableEventListener.cxx146
-rw-r--r--winaccessibility/source/service/AccTextComponentEventListener.cxx65
-rw-r--r--winaccessibility/source/service/AccTopWindowListener.cxx321
-rw-r--r--winaccessibility/source/service/AccTreeEventListener.cxx87
-rw-r--r--winaccessibility/source/service/AccWindowEventListener.cxx152
-rw-r--r--winaccessibility/source/service/ResIDGenerator.cxx54
-rw-r--r--winaccessibility/source/service/checkmt.cxx36
-rw-r--r--winaccessibility/source/service/checkmt.hxx28
-rw-r--r--winaccessibility/source/service/exports.dxp2
-rw-r--r--winaccessibility/source/service/makefile.mk118
-rw-r--r--winaccessibility/source/service/msaaservice_impl.cxx289
-rw-r--r--winaccessibility/source/service/winaccessibility.component27
-rw-r--r--xmlhelp/util/main_transform.xsl2
-rw-r--r--xmlsecurity/source/xmlsec/nss/makefile.mk13
871 files changed, 60772 insertions, 17530 deletions
diff --git a/LICENSE b/LICENSE
index 7823118e3d3d..8773de7d6e4f 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1835,72 +1835,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
____
-For STLport - build in main/stlport/:
-
-Boris Fomitchev grants Licensee a non-exclusive, non-transferable,
-royalty-free license to use STLport and its documentation without fee.
-
-By downloading, using, or copying STLport or any portion thereof,
-Licensee agrees to abide by the intellectual property laws and all other
-applicable laws of the United States of America, and to all of the terms
-and conditions of this Agreement.
-
-Licensee shall maintain the following copyright and permission notices on
-STLport sources and its documentation unchanged:
-
-Copyright 1999, 2000 Boris Fomitchev
-
-This material is provided "as is", with absolutely no warranty expressed
-or implied. Any use is at your own risk. Permission to use or copy this
-software for any purpose is hereby granted without fee, provided the
-above notices are retained on all copies. Permission to modify the code
-and to distribute modified code is granted, provided the above notices
-are retained, and a notice that the code was modified is included with
-the above copyright notice.
-
-The Licensee may distribute binaries compiled with STLport (whether
-original or modified) without any royalties or restrictions.
-
-The Licensee may distribute original or modified STLport sources,
-provided that:
-
- - The conditions indicated in the above permission notice are met;
-
- - The following copyright notices are retained when present, and
- conditions provided in accompanying permission notices are met:
-
- Copyright 1994 Hewlett-Packard Company
-
- Permission to use, copy, modify, distribute and sell this software and
- its documentation for any purpose is hereby granted without fee, provided
- that the above copyright notice appear in all copies and that both that
- copyright notice and this permission notice appear in supporting
- documentation. Hewlett-Packard Company makes no representations about
- the suitability of this software for any purpose. It is provided "as is"
- without express or implied warranty.
-
- Copyright 1996,97 Silicon Graphics Computer Systems, Inc.
-
- Permission to use, copy, modify, distribute and sell this software and
- its documentation for any purpose is hereby granted without fee, provided
- that the above copyright notice appear in all copies and that both that
- copyright notice and this permission notice appear in supporting
- documentation. Silicon Graphics makes no representations about
- the suitability of this software for any purpose. It is provided "as is"
- without express or implied warranty.
-
- Copyright 1997 Moscow Center for SPARC Technology.
-
- Permission to use, copy, modify, distribute and sell this software and its
- documentation for any purpose is hereby granted without fee, provided that
- the above copyright notice appear in all copies and that both that
- copyright notice and this permission notice appear in supporting
- documentation. Moscow Center for SPARC Technology makes no representations
- about the suitability of this software for any purpose. It is provided
- "as is" without express or implied warranty.
-
-____
-
For C preprocessor - built in main/ucpp/:
- BSD license
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index 4d8ec806b26d..eaee8c789284 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -34,10 +34,8 @@ gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salh
gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salhelper%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst ucbhelper:libucbhelper%,ucbhelper:libucbhelper4%,$(gb_Library_FILENAMES))
-ifeq ($(USE_SYSTEM_STL),YES)
gb_Library_FILENAMES := $(patsubst stl:%,stl:libstdc++.so,$(gb_Library_FILENAMES))
gb_Library_TARGETS := $(filter-out stl,$(gb_Library_TARGETS))
-endif
endif
@@ -49,10 +47,12 @@ gb_Library_FILENAMES := $(patsubst jvmfwk:libuno_jvmfwk%,jvmfwk:libjvmfwk%,$(gb_
gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salhelper%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst ucbhelper:libucbhelper%,ucbhelper:libucbhelper4%,$(gb_Library_FILENAMES))
-ifeq ($(USE_SYSTEM_STL),YES)
+ifneq ($(MACOSX_DEPLOYMENT_TARGET),10.4) # default to use libc++
+gb_Library_FILENAMES := $(patsubst stl:%,stl:libc++.dylib,$(gb_Library_FILENAMES))
+else # use libstdc++ instead on ancient MacOSX targets
gb_Library_FILENAMES := $(patsubst stl:%,stl:libstdc++.dylib,$(gb_Library_FILENAMES))
-gb_Library_TARGETS := $(filter-out stl,$(gb_Library_TARGETS))
endif
+gb_Library_TARGETS := $(filter-out stl,$(gb_Library_TARGETS))
endif
@@ -75,15 +75,7 @@ gb_Library_FILENAMES := $(patsubst xslt:ixslt%,xslt:libxslt.dll$(gb_Library_IARC
gb_Library_FILENAMES := $(patsubst rdf:irdf%,rdf:librdf.dll$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst z:iz%,z:zlib%,$(gb_Library_FILENAMES))
-ifeq ($(USE_SYSTEM_STL),YES)
gb_Library_FILENAMES := $(patsubst stl:istl%,stl:msvcprt%,$(gb_Library_FILENAMES))
-else
-ifeq ($(gb_PRODUCT),$(true))
-gb_Library_FILENAMES := $(patsubst stl:istl%,stl:stlport_vc71%,$(gb_Library_FILENAMES))
-else
-gb_Library_FILENAMES := $(patsubst stl:istl%,stl:stlport_vc71_stldebug%,$(gb_Library_FILENAMES))
-endif
-endif
gb_Library_NOILIBFILENAMES:=\
icule \
@@ -108,10 +100,8 @@ gb_Library_DLLFILENAMES := $(patsubst jvmaccess:jvmaccess%,jvmaccess:jvmaccess$(
gb_Library_DLLFILENAMES := $(patsubst ucbhelper:ucbhelper%,ucbhelper:ucbhelper4%,$(gb_Library_DLLFILENAMES))
gb_Library_DLLFILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_DLLFILENAMES))
-ifeq ($(USE_SYSTEM_STL),YES)
gb_Library_FILENAMES := $(patsubst stl:%,stl:$(gb_Library_IARCSYSPRE)stdc++_s$(gb_Library_IARCSYSPRE),$(gb_Library_FILENAMES))
gb_Library_TARGETS := $(filter-out stl,$(gb_Library_TARGETS))
-endif
else
gb_Library_FILENAMES := $(patsubst comphelper:icomphelper%,comphelper:icomphelp%,$(gb_Library_FILENAMES))
@@ -131,15 +121,7 @@ gb_Library_FILENAMES := $(patsubst rdf:irdf%,rdf:librdf%,$(gb_Library_FILENAMES)
gb_Library_FILENAMES := $(patsubst z:iz%,z:zlib%,$(gb_Library_FILENAMES))
gb_StaticLibrary_FILENAMES := $(patsubst graphite:graphite%,graphite:graphite_dll%,$(gb_StaticLibrary_FILENAMES))
-ifeq ($(USE_SYSTEM_STL),YES)
gb_Library_FILENAMES := $(patsubst stl:istl%,stl:msvcprt%,$(gb_Library_FILENAMES))
-else
-ifeq ($(gb_PRODUCT),$(true))
-gb_Library_FILENAMES := $(patsubst stl:istl%,stl:stlport_vc71%,$(gb_Library_FILENAMES))
-else
-gb_Library_FILENAMES := $(patsubst stl:istl%,stl:stlport_vc71_stldebug%,$(gb_Library_FILENAMES))
-endif
-endif
gb_Library_NOILIBFILENAMES:=\
advapi32 \
@@ -248,18 +230,14 @@ gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salh
gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salhelper%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst ucbhelper:libucbhelper%,ucbhelper:libucbhelper4%,$(gb_Library_FILENAMES))
-ifeq ($(USE_SYSTEM_STL),YES)
gb_Library_FILENAMES := $(patsubst stl:%,stl:libstdc++.so,$(gb_Library_FILENAMES))
gb_Library_TARGETS := $(filter-out stl,$(gb_Library_TARGETS))
-endif
endif
# we do not require a known rule for these, when using system libs
-ifeq ($(USE_SYSTEM_STL),YES)
gb_Library_TARGETS := $(filter-out stl,$(gb_Library_TARGETS))
-endif
ifeq ($(SYSTEM_LIBXML),YES)
gb_Library_TARGETS := $(filter-out xml2,$(gb_Library_TARGETS))
diff --git a/accessibility/inc/accessibility/extended/accessiblelistbox.hxx b/accessibility/inc/accessibility/extended/accessiblelistbox.hxx
index 5b8b3b025fd0..d4beb371d8f2 100644
--- a/accessibility/inc/accessibility/extended/accessiblelistbox.hxx
+++ b/accessibility/inc/accessibility/extended/accessiblelistbox.hxx
@@ -30,14 +30,16 @@
#include <vcl/vclevent.hxx>
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#include <map>
// class AccessibleListBox -----------------------------------------------
class SvTreeListBox;
-
+class SvLBoxEntry;
//........................................................................
namespace accessibility
{
+ class AccessibleListBoxEntry;
//........................................................................
typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessible
@@ -66,6 +68,8 @@ namespace accessibility
SvTreeListBox* getListBox() const;
+ void RemoveChildEntries(SvLBoxEntry*);
+
public:
/** OAccessibleBase needs a valid view
@param _rListBox
@@ -111,6 +115,19 @@ namespace accessibility
sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // IA2 CWS
+ sal_Int32 SAL_CALL getRoleType();
+
+private:
+
+ typedef std::map< SvLBoxEntry*, ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > MAP_ENTRY;
+ MAP_ENTRY m_mapEntry;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xFocusedChild;
+
+ accessibility::AccessibleListBoxEntry* GetCurEventEntry( const VclWindowEvent& rVclWindowEvent );
+
};
//........................................................................
diff --git a/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx b/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx
index af83b2284f17..e78591a48d5d 100644
--- a/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx
+++ b/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx
@@ -35,7 +35,15 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+/*
#include <cppuhelper/compbase8.hxx>
+*/
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEVALUE_HPP_
+#include <com/sun/star/accessibility/XAccessibleValue.hpp>
+#endif
+#ifndef _CPPUHELPER_COMPBASE9_HXX_
+#include <cppuhelper/compbase9.hxx>
+#endif
#include <comphelper/broadcasthelper.hxx>
#include <comphelper/accessibletexthelper.hxx>
#include <tools/gen.hxx>
@@ -59,7 +67,7 @@ namespace accessibility
//........................................................................
// class AccessibleListBoxEntry ------------------------------------------
-
+/*
typedef ::cppu::WeakAggComponentImplHelper8< ::com::sun::star::accessibility::XAccessible
, ::com::sun::star::accessibility::XAccessibleContext
, ::com::sun::star::accessibility::XAccessibleComponent
@@ -68,6 +76,16 @@ namespace accessibility
, ::com::sun::star::accessibility::XAccessibleSelection
, ::com::sun::star::accessibility::XAccessibleText
, ::com::sun::star::lang::XServiceInfo > AccessibleListBoxEntry_BASE;
+*/
+ typedef ::cppu::WeakAggComponentImplHelper9< ::com::sun::star::accessibility::XAccessible
+ , ::com::sun::star::accessibility::XAccessibleContext
+ , ::com::sun::star::accessibility::XAccessibleComponent
+ , ::com::sun::star::accessibility::XAccessibleEventBroadcaster
+ , ::com::sun::star::accessibility::XAccessibleAction
+ , ::com::sun::star::accessibility::XAccessibleSelection
+ , ::com::sun::star::accessibility::XAccessibleText
+ , ::com::sun::star::accessibility::XAccessibleValue
+ , ::com::sun::star::lang::XServiceInfo > AccessibleListBoxEntry_BASE;
/** the class AccessibleListBoxEntry represents the class for an accessible object of a listbox entry */
class AccessibleListBoxEntry:public ::comphelper::OBaseMutex
@@ -81,6 +99,8 @@ namespace accessibility
/** The treelistbox control */
SvTreeListBox* m_pListBox;
::std::deque< sal_Int32 > m_aEntryPath;
+ SvLBoxEntry* m_pSvLBoxEntry; // IA2 CWS. Needed for focused item...
+
protected:
/// client id in the AccessibleEventNotifier queue
@@ -99,6 +119,8 @@ namespace accessibility
Rectangle GetBoundingBoxOnScreen() throw ( ::com::sun::star::lang::DisposedException );
void EnsureIsAlive() const throw ( ::com::sun::star::lang::DisposedException );
+ void NotifyAccessibleEvent( sal_Int16 _nEventId, const ::com::sun::star::uno::Any& _aOldValue, const ::com::sun::star::uno::Any& _aNewValue );
+
protected:
virtual ~AccessibleListBoxEntry();
@@ -127,6 +149,9 @@ namespace accessibility
const ::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible >& _xParent );
+ SvLBoxEntry* GetSvLBoxEntry() const { return m_pSvLBoxEntry; }
+
+
protected:
// XTypeProvider
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
@@ -206,9 +231,15 @@ namespace accessibility
sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-
+ virtual ::com::sun::star::uno::Any SAL_CALL getCurrentValue( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setCurrentValue( const ::com::sun::star::uno::Any& aNumber ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getMaximumValue( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getMinimumValue( ) throw (::com::sun::star::uno::RuntimeException);
private:
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > implGetParentAccessible( ) const;
+ SvLBoxEntry* GetRealChild(sal_Int32 nIndex);
+ public:
+ sal_Int32 SAL_CALL getRoleType();
};
//........................................................................
diff --git a/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx b/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx
index 3d8f169496e5..6f59aaa1b4fe 100644
--- a/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx
+++ b/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx
@@ -43,6 +43,8 @@ class AccessibleTabListBoxTable : public AccessibleBrowseBoxTable, public Access
private:
SvHeaderTabListBox* m_pTabListBox;
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xCurChild;
+
void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
DECL_LINK( WindowEventListener, VclSimpleEvent* );
diff --git a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
index fcdbcda9e04c..1b47dc681216 100644
--- a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
+++ b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
@@ -52,6 +52,22 @@
#include <comphelper/accessibletexthelper.hxx>
#include <rtl/ref.hxx>
+// IAccessible2 implementation, 2009
+#ifndef _SVTOOLS_HRC
+#include "svtools/svtools.hrc"
+#endif
+#ifndef _SVTOOLS_SVTDATA_HXX
+#include "svtools/svtdata.hxx"
+#endif
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _UTL_ACCESSIBLERELATIONSETHELPER_HXX_
+#include <unotools/accessiblerelationsethelper.hxx>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLERELATIONTYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#endif
#include <memory>
#include <queue>
#include <hash_map>
@@ -578,7 +594,9 @@ private:
virtual ::css::uno::Reference< ::css::accessibility::XAccessible >
SAL_CALL getAccessibleAtPoint(::css::awt::Point const & rPoint)
throw (::css::uno::RuntimeException);
-
+// IAccessible2 implementation, 2009
+ virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
+ virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet );
// ??? Will be called with both the external (Solar) and internal mutex
// locked:
virtual void SAL_CALL disposing();
@@ -630,6 +648,9 @@ private:
void handleSelectionChangeNotification();
void notifySelectionChange( sal_Int32 nFirst, sal_Int32 nLast );
+// IAccessible2 implementation, 2009
+ ::sal_Int32 getSelectionType(::sal_Int32 nNewFirstPara, ::sal_Int32 nNewFirstPos, ::sal_Int32 nNewLastPara, ::sal_Int32 nNewLastPos);
+ void sendEvent(::sal_Int32 start, ::sal_Int32 end, ::sal_Int16 nEventId);
void justifySelection( TextPaM& rTextStart, TextPaM& rTextEnd );
diff --git a/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx b/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx
index 011a9f17a89f..15afec59f5f7 100644
--- a/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx
+++ b/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx
@@ -42,6 +42,7 @@ namespace accessibility
virtual Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const = 0;
virtual Rectangle GetWindowExtentsRelative( Window* pRelativeWindow ) = 0;
virtual sal_Bool IsActive() const = 0;
+ virtual sal_Bool IsEnabled() const = 0;
virtual sal_Bool IsEntryVisible( sal_uInt16 nPos ) const = 0;
virtual sal_uInt16 GetDisplayLineCount() const = 0;
virtual void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const = 0;
diff --git a/accessibility/inc/accessibility/helper/accessiblestrings.hrc b/accessibility/inc/accessibility/helper/accessiblestrings.hrc
index cdaa2dc8916b..83b1dce1da6f 100644
--- a/accessibility/inc/accessibility/helper/accessiblestrings.hrc
+++ b/accessibility/inc/accessibility/helper/accessiblestrings.hrc
@@ -39,7 +39,18 @@
#define RID_STR_ACC_ACTION_DECLINE ( RID_TK_ACC_START + 4 )
#define RID_STR_ACC_ACTION_INCBLOCK ( RID_TK_ACC_START + 5 )
#define RID_STR_ACC_ACTION_DECBLOCK ( RID_TK_ACC_START + 6 )
-
+#define RID_STR_ACC_NAME_PREVIEW ( RID_TK_ACC_START + 7 )
+
+#define STR_SVT_ACC_ACTION_EXPAND ( RID_TK_ACC_START + 8 )
+#define STR_SVT_ACC_ACTION_COLLAPSE ( RID_TK_ACC_START + 9 )
+#define STR_SVT_ACC_LISTENTRY_SELCTED_STATE ( RID_TK_ACC_START + 10 )
+
+#define RID_STR_ACC_ACTION_CHECK ( RID_TK_ACC_START + 11 )
+#define RID_STR_ACC_ACTION_UNCHECK ( RID_TK_ACC_START + 12 )
+#define RID_STR_ACC_ACTION_DOUBLE_CLICK ( RID_TK_ACC_START + 13 )
+#define RID_STR_ACC_SCROLLBAR_NAME_VERTICAL ( RID_TK_ACC_START + 14 )
+#define RID_STR_ACC_SCROLLBAR_NAME_HORIZONTAL ( RID_TK_ACC_START + 15 )
+#define RID_STR_ACC_PANEL_DESCRIPTION ( RID_TK_ACC_START + 16 )
#define RID_STR_ACC_NAME_BROWSEBUTTON ( RID_TK_ACC_START + 100 )
#define RID_STR_ACC_DESC_PANELDECL_TABBAR ( RID_TK_ACC_START + 101 )
diff --git a/accessibility/inc/accessibility/helper/listboxhelper.hxx b/accessibility/inc/accessibility/helper/listboxhelper.hxx
index ce2eee1774bc..c046bca2bd94 100644
--- a/accessibility/inc/accessibility/helper/listboxhelper.hxx
+++ b/accessibility/inc/accessibility/helper/listboxhelper.hxx
@@ -90,6 +90,11 @@ public:
return m_aComboListBox.IsActive();
}
// -----------------------------------------------------------------------------
+ virtual sal_Bool IsEnabled() const
+ {
+ return m_aComboListBox.IsEnabled();
+ }
+ // -----------------------------------------------------------------------------
virtual sal_Bool IsEntryVisible( sal_uInt16 nPos ) const
{
sal_uInt16 nTopEntry = m_aComboListBox.GetTopEntry();
diff --git a/accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx b/accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx
index c821d6fac39d..9b5bb8e395d7 100644
--- a/accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx
+++ b/accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx
@@ -109,6 +109,8 @@ protected:
virtual sal_Bool IsHighlighted();
sal_Bool IsChildHighlighted();
+ virtual sal_Bool IsMenuHideDisabledEntries();
+
void SelectChild( sal_Int32 i );
void DeSelectAll();
sal_Bool IsChildSelected( sal_Int32 i );
diff --git a/accessibility/inc/accessibility/standard/accessiblemenuitemcomponent.hxx b/accessibility/inc/accessibility/standard/accessiblemenuitemcomponent.hxx
index 65ade115d200..74d8624f3f68 100644
--- a/accessibility/inc/accessibility/standard/accessiblemenuitemcomponent.hxx
+++ b/accessibility/inc/accessibility/standard/accessiblemenuitemcomponent.hxx
@@ -53,6 +53,8 @@ protected:
void SetItemText( const ::rtl::OUString& sItemText );
::rtl::OUString GetItemText();
+ virtual sal_Bool IsMenuHideDisabledEntries();
+
virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
// OCommonAccessibleComponent
diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblebox.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblebox.hxx
index 923109f54b69..f956f25a5177 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessiblebox.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessiblebox.hxx
@@ -30,13 +30,17 @@
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#endif
#include <com/sun/star/accessibility/XAccessibleKeyBinding.hpp>
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEVALUE_HPP_
+#include <com/sun/star/accessibility/XAccessibleValue.hpp>
+#endif
#ifndef _CPPUHELPER_IMPLBASE2_HXX
#include <cppuhelper/implbase2.hxx>
#endif
-typedef ::cppu::ImplHelper2<
+typedef ::cppu::ImplHelper3<
::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::accessibility::XAccessibleValue,
::com::sun::star::accessibility::XAccessibleAction
> VCLXAccessibleBox_BASE;
@@ -129,7 +133,22 @@ public:
*/
virtual void SAL_CALL disposing (void);
+ //===== XAccessibleValue ================================================
+
+ virtual ::com::sun::star::uno::Any SAL_CALL getCurrentValue( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL setCurrentValue(
+ const ::com::sun::star::uno::Any& aNumber )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Any SAL_CALL getMaximumValue( )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getMinimumValue( )
+ throw (::com::sun::star::uno::RuntimeException);
+ bool IsDropDownBox() {return m_bIsDropDownBox;};
+ BoxType GetBoxType() { return m_aBoxType;};
protected:
/** Specifies whether the box is a combo box or a list box. List boxes
have multi selection.
@@ -170,6 +189,8 @@ protected:
virtual void ProcessWindowChildEvent (const VclWindowEvent& rVclWindowEvent);
virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent);
+// IAccessible2 implementation, 2009
+ virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
private:
/// Index in parent. This is settable from the outside.
diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx
index ef1d7e8f3472..3e1866efb343 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx
@@ -76,6 +76,7 @@ public:
/** Process some of the events and delegate the rest to the base classes.
*/
virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent);
+ virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet );
/** Called on reception of selection events this method checks all known
list items for a possible change in their selection state and
@@ -143,7 +144,14 @@ public:
virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException);
-
+ sal_Bool IsInDropDown();
+ void HandleDropOpen();
+ virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent, bool b_IsDropDownList);
+ void UpdateSelection_Acc (::rtl::OUString sTextOfSelectedItem, bool b_IsDropDownList);
+ void UpdateSelection_Impl_Acc (bool b_IsDropDownList);
+
+ void UpdateFocus_Impl_Acc ( sal_uInt16 nPos, bool b_IsDropDownList) ;
+ void NotifyListItem(::com::sun::star::uno::Any& val);
protected:
BoxType m_aBoxType;
::accessibility::IComboListBoxHelper* m_pListBoxHelper;
@@ -155,7 +163,7 @@ protected:
sal_uInt16 m_nLastSelectedPos;
bool m_bDisableProcessEvent;
bool m_bVisible;
-
+ sal_uInt16 m_nCurSelectedPos;
/// The currently selected item.
diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblelistitem.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblelistitem.hxx
index 1a634e0d6611..853982a0bef2 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessiblelistitem.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessiblelistitem.hxx
@@ -91,9 +91,9 @@ private:
@param _aNewValue
is the new value
*/
- void NotifyAccessibleEvent( sal_Int16 _nEventId,
+ /*void NotifyAccessibleEvent( sal_Int16 _nEventId,
const ::com::sun::star::uno::Any& _aOldValue,
- const ::com::sun::star::uno::Any& _aNewValue );
+ const ::com::sun::star::uno::Any& _aNewValue );*/
protected:
virtual ~VCLXAccessibleListItem();
@@ -119,6 +119,7 @@ public:
sal_Int32 _nIndexInParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent );
+ void NotifyAccessibleEvent( sal_Int16 _nEventId, const ::com::sun::star::uno::Any& _aOldValue, const ::com::sun::star::uno::Any& _aNewValue );
inline sal_Bool IsSelected() const { return m_bSelected; }
void SetSelected( sal_Bool _bSelected );
diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblemenu.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblemenu.hxx
index 3dfa1b2a4604..1a8e59cae5d7 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessiblemenu.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessiblemenu.hxx
@@ -76,6 +76,9 @@ public:
virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleAction
+ virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
};
#endif // ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENU_HXX
diff --git a/accessibility/inc/accessibility/standard/vclxaccessibleradiobutton.hxx b/accessibility/inc/accessibility/standard/vclxaccessibleradiobutton.hxx
index c8cf1318c22a..335acd30a44e 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessibleradiobutton.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessibleradiobutton.hxx
@@ -31,7 +31,7 @@
#endif
#include <com/sun/star/accessibility/XAccessibleValue.hpp>
-#ifndef _CPPUHELPER_IMPLBASE2_HXX
+#ifndef _CPPUHELPER_IMPLBASE2_HXX_
#include <cppuhelper/implbase2.hxx>
#endif
diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblescrollbar.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblescrollbar.hxx
index ef0653dc6dfd..e972b0134d1d 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessiblescrollbar.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessiblescrollbar.hxx
@@ -77,6 +77,10 @@ public:
virtual sal_Bool SAL_CALL setCurrentValue( const ::com::sun::star::uno::Any& aNumber ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL getMaximumValue( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL getMinimumValue( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleContext
+ ::rtl::OUString SAL_CALL getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException);
+
};
#endif // ACCESSIBILITY_STANDARD_VCLXACCESSIBLESCROLLBAR_HXX
diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx
index c556f1314925..931d33f54871 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx
@@ -34,7 +34,7 @@
#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
#include <com/sun/star/accessibility/XAccessibleValue.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#ifndef _CPPUHELPER_IMPLBASE4_HXX
+#ifndef _CPPUHELPER_IMPLBASE4_HXX_
#include <cppuhelper/implbase4.hxx>
#endif
#include <comphelper/accessibletexthelper.hxx>
diff --git a/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx
index d2ee9547b99b..64c9be328a18 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx
@@ -65,7 +65,7 @@ AccessibleBrowseBoxHeaderCell::AccessibleBrowseBoxHeaderCell(sal_Int32 _nColumnR
// SHOWING done with mxParent
if( implIsShowing() )
pStateSetHelper->AddState( AccessibleStateType::SHOWING );
-
+ mpBrowseBox->FillAccessibleStateSet( *pStateSetHelper, getType() );
BBSolarGuard aSolarGuard;
pStateSetHelper->AddState( AccessibleStateType::VISIBLE );
pStateSetHelper->AddState( AccessibleStateType::FOCUSABLE );
diff --git a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
index 474078badcfa..1d72d51dbef0 100644
--- a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
+++ b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
@@ -130,13 +130,15 @@ namespace accessibility
SolarMethodGuard aGuard( *this );
// TODO: localize this!
- String sName = mpBrowseBox->GetColumnDescription( ::sal::static_int_cast< sal_uInt16 >( getColumnPos() ) );
- if ( 0 == sName.Len() )
- {
- sName = String::CreateFromAscii( "Column " );
- sName += String::CreateFromInt32( getColumnPos( ) );
- }
+// IAccessible2 implementation, 2009
+ //String sName = mpBrowseBox->GetColumnDescription( getColumnPos( ) );
+ //if ( 0 == sName.Len() )
+ //{
+ // sName = String::CreateFromAscii( "Column " );
+ String sName = String::CreateFromAscii( "Column " );
+ sName += String::CreateFromInt32( getColumnPos( ) - 1 );
+ //}
sName += String::CreateFromAscii( ", Row " );
sName += String::CreateFromInt32( getRowPos( ) );
diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx
index 014413cf2234..2598c92db75f 100644
--- a/accessibility/source/extended/accessibleiconchoicectrl.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx
@@ -79,11 +79,36 @@ namespace accessibility
// modified selection. The active descendant event is
// send after that so that the receiving AT has time to
// read the text or name of the active child.
- NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
+// NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
+
+ if ( getCtrl() && getCtrl()->HasFocus() )
+ {
+ SvxIconChoiceCtrlEntry* pEntry = static_cast< SvxIconChoiceCtrlEntry* >( rVclWindowEvent.GetData() );
+ if ( pEntry )
+ {
+ sal_uLong nPos = getCtrl()->GetEntryListPos( pEntry );
+ Reference< XAccessible > xChild = new AccessibleIconChoiceCtrlEntry( *getCtrl(), nPos, this );
+ uno::Any aOldValue, aNewValue;
+ aNewValue <<= xChild;
+ NotifyAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldValue, aNewValue );
+
+ NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, aOldValue, aNewValue );
+
+ }
+ }
+ break;
+ }
+ case VCLEVENT_WINDOW_GETFOCUS :
+ {
SvtIconChoiceCtrl* pCtrl = getCtrl();
if ( pCtrl && pCtrl->HasFocus() )
{
SvxIconChoiceCtrlEntry* pEntry = static_cast< SvxIconChoiceCtrlEntry* >( rVclWindowEvent.GetData() );
+ if ( pEntry == NULL )
+ {
+ sal_uLong nPos=0;
+ pEntry = getCtrl()->GetSelectedEntry ( nPos );
+ }
if ( pEntry )
{
sal_uLong nPos = pCtrl->GetEntryListPos( pEntry );
@@ -91,6 +116,7 @@ namespace accessibility
uno::Any aOldValue, aNewValue;
aNewValue <<= xChild;
NotifyAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldValue, aNewValue );
+ NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, aOldValue, aNewValue );
}
}
break;
@@ -190,7 +216,8 @@ namespace accessibility
// -----------------------------------------------------------------------------
sal_Int16 SAL_CALL AccessibleIconChoiceCtrl::getAccessibleRole( ) throw (RuntimeException)
{
- return AccessibleRole::TREE;
+ //return AccessibleRole::TREE;
+ return AccessibleRole::LIST;
}
// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL AccessibleIconChoiceCtrl::getAccessibleDescription( ) throw (RuntimeException)
diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
index 3703efadc442..d756bcf8aeab 100644
--- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
@@ -351,7 +351,8 @@ throw(RuntimeException)
// -----------------------------------------------------------------------------
sal_Int16 SAL_CALL AccessibleIconChoiceCtrlEntry::getAccessibleRole( ) throw (RuntimeException)
{
- return AccessibleRole::LABEL;
+ //return AccessibleRole::LABEL;
+ return AccessibleRole::LIST_ITEM;
}
// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL AccessibleIconChoiceCtrlEntry::getAccessibleDescription( ) throw (RuntimeException)
diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index 42ac4d06e109..159b76e4c086 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -89,19 +89,25 @@ namespace accessibility
{
case VCLEVENT_CHECKBOX_TOGGLE :
{
- if ( getListBox() && getListBox()->HasFocus() )
+ if ( !getListBox() || !getListBox()->HasFocus() )
{
- SvLBoxEntry* pEntry = static_cast< SvLBoxEntry* >( rVclWindowEvent.GetData() );
- if ( !pEntry )
- pEntry = getListBox()->GetCurEntry();
+ return;
+ }
+ AccessibleListBoxEntry* pCurOpEntry = GetCurEventEntry(rVclWindowEvent);
+ if(!pCurOpEntry)
+ {
+ return ;
+ }
+ uno::Any aValue;
+ aValue <<= AccessibleStateType::CHECKED;
- if ( pEntry )
- {
- Reference< XAccessible > xChild = new AccessibleListBoxEntry( *getListBox(), pEntry, this );
- uno::Any aOldValue, aNewValue;
- aNewValue <<= xChild;
- NotifyAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldValue, aNewValue );
- }
+ if ( getListBox()->GetCheckButtonState( pCurOpEntry->GetSvLBoxEntry() ) == SV_BUTTON_CHECKED )
+ {
+ pCurOpEntry->NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, uno::Any(), aValue );
+ }
+ else
+ {
+ pCurOpEntry->NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aValue,uno::Any() );
}
break;
}
@@ -112,17 +118,104 @@ namespace accessibility
// modified selection. The active descendant event is
// send after that so that the receiving AT has time to
// read the text or name of the active child.
- NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
- if ( getListBox() && getListBox()->HasFocus() )
+// NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
+ OSL_ASSERT(0 && "Debug: Treelist shouldn't use VCLEVENT_LISTBOX_SELECT");
+ }
+ case VCLEVENT_LISTBOX_TREESELECT:
+ {
+ if ( getListBox() && getListBox()->HasFocus() )
+ {
+ AccessibleListBoxEntry* pEntry =static_cast< AccessibleListBoxEntry* >(m_xFocusedChild.get());
+ if (pEntry)
+ {
+ pEntry->NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
+ }
+ }
+ }
+ break;
+ case VCLEVENT_LISTBOX_TREEFOCUS:
+ {
+ SvTreeListBox* pBox = getListBox();
+ sal_Bool bNeedFocus = sal_False;
+ if (pBox)
+ {
+ Window* pParent = ((Window*)pBox)->GetParent();
+ if (pParent && pParent->GetType() == WINDOW_FLOATINGWINDOW)
+ {
+ // MT: ImplGetAppSVData shouldn't be exported from VCL.
+ // In which scenario is this needed?
+ // If needed, we need to find an other solution
+ /*
+ ImplSVData* pSVData = ImplGetAppSVData();
+ if (pSVData && pSVData->maWinData.mpFirstFloat == (FloatingWindow*)pParent)
+ bNeedFocus = sal_True;
+ */
+ }
+ }
+ if( pBox && (pBox->HasFocus() || bNeedFocus) )
+ {
+ uno::Any aOldValue, aNewValue;
+ SvLBoxEntry* pEntry = static_cast< SvLBoxEntry* >( rVclWindowEvent.GetData() );
+ if ( pEntry )
+ {
+ AccessibleListBoxEntry* pEntryFocus =static_cast< AccessibleListBoxEntry* >(m_xFocusedChild.get());
+ if (pEntryFocus && pEntryFocus->GetSvLBoxEntry() == pEntry)
+ {
+ aOldValue <<= uno::Any();
+ aNewValue <<= m_xFocusedChild;
+ NotifyAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldValue, aNewValue );
+ return ;
+ }
+
+ aOldValue <<= m_xFocusedChild;
+
+ MAP_ENTRY::iterator mi = m_mapEntry.find(pEntry);
+ if(mi != m_mapEntry.end())
+ {
+ OSL_ASSERT(mi->second.get() != NULL);
+ m_xFocusedChild = mi->second;
+ }
+ else
+ {
+ AccessibleListBoxEntry *pEntNew = new AccessibleListBoxEntry( *getListBox(), pEntry, NULL );
+ m_xFocusedChild = pEntNew;
+ m_mapEntry.insert(MAP_ENTRY::value_type(pEntry,pEntNew));
+ }
+
+ aNewValue <<= m_xFocusedChild;
+ NotifyAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldValue, aNewValue );
+ }
+ else
+ {
+ aOldValue <<= uno::Any();
+ aNewValue <<= AccessibleStateType::FOCUSED;
+ NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
+ }
+ }
+ }
+ break;
+ case VCLEVENT_LISTBOX_ITEMREMOVED:
{
SvLBoxEntry* pEntry = static_cast< SvLBoxEntry* >( rVclWindowEvent.GetData() );
if ( pEntry )
{
- Reference< XAccessible > xChild = new AccessibleListBoxEntry( *getListBox(), pEntry, this );
- uno::Any aOldValue, aNewValue;
- aNewValue <<= xChild;
- NotifyAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldValue, aNewValue );
+ RemoveChildEntries(pEntry);
+ }
+ else
+ {
+ // NULL means Clear()
+ MAP_ENTRY::iterator mi = m_mapEntry.begin();
+ for ( ; mi != m_mapEntry.end() ; ++mi)
+ {
+ uno::Any aNewValue;
+ uno::Any aOldValue;
+ aOldValue <<= mi->second;
+ NotifyAccessibleEvent( AccessibleEventId::CHILD, aOldValue, aNewValue );
+ }
+ m_mapEntry.clear();
}
+
+
}
break;
@@ -148,15 +241,72 @@ namespace accessibility
NotifyAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, Any(), aListBoxEntry );
}
}
- break;
}
+ break;
// <--
- }
default:
VCLXAccessibleComponent::ProcessWindowEvent (rVclWindowEvent);
}
}
}
+
+ AccessibleListBoxEntry* AccessibleListBox::GetCurEventEntry( const VclWindowEvent& rVclWindowEvent )
+ {
+ SvLBoxEntry* pEntry = static_cast< SvLBoxEntry* >( rVclWindowEvent.GetData() );
+ if ( !pEntry )
+ pEntry = getListBox()->GetCurEntry();
+
+ AccessibleListBoxEntry* pEntryFocus =static_cast< AccessibleListBoxEntry* >(m_xFocusedChild.get());
+ if (pEntryFocus && pEntry && pEntry != pEntryFocus->GetSvLBoxEntry())
+ {
+ AccessibleListBoxEntry *pAccCurOptionEntry =NULL;
+ MAP_ENTRY::iterator mi = m_mapEntry.find(pEntry);
+ if (mi != m_mapEntry.end())
+ {
+ pAccCurOptionEntry= static_cast< AccessibleListBoxEntry* >(mi->second.get());
+ }
+ else
+ {
+ pAccCurOptionEntry =new AccessibleListBoxEntry( *getListBox(), pEntry, NULL );
+ std::pair<MAP_ENTRY::iterator, bool> pairMi = m_mapEntry.insert(MAP_ENTRY::value_type(pAccCurOptionEntry->GetSvLBoxEntry(),pAccCurOptionEntry));
+ mi = pairMi.first;
+ }
+
+ uno::Any aNewValue;
+ aNewValue <<= mi->second;//xAcc
+ NotifyAccessibleEvent( AccessibleEventId::CHILD, uno::Any(), aNewValue );//Add
+
+ return pAccCurOptionEntry;
+ }
+ else
+ {
+ return pEntryFocus;
+ }
+ return NULL;
+ }
+
+ void AccessibleListBox::RemoveChildEntries(SvLBoxEntry* pEntry)
+ {
+ MAP_ENTRY::iterator mi = m_mapEntry.find(pEntry);
+ if ( mi != m_mapEntry.end() )
+ {
+ uno::Any aNewValue;
+ uno::Any aOldValue;
+ aOldValue <<= mi->second;
+ NotifyAccessibleEvent( AccessibleEventId::CHILD, aOldValue, aNewValue );
+
+ m_mapEntry.erase(mi);
+ }
+
+ SvTreeListBox* pBox = getListBox();
+ SvLBoxEntry* pEntryChild = pBox->FirstChild(pEntry);
+ while (pEntryChild)
+ {
+ RemoveChildEntries(pEntryChild);
+ pEntryChild = pBox->NextSibling(pEntryChild);
+ }
+ }
+
// -----------------------------------------------------------------------------
void AccessibleListBox::ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent )
{
@@ -182,6 +332,7 @@ namespace accessibility
{
::osl::MutexGuard aGuard( m_aMutex );
+ m_mapEntry.clear();
VCLXAccessibleComponent::disposing();
m_xParent = NULL;
}
@@ -258,7 +409,9 @@ namespace accessibility
if ( !pEntry )
throw IndexOutOfBoundsException();
- return new AccessibleListBoxEntry( *getListBox(), pEntry, this );
+ // Solution: Set the parameter of the parent to null to let entry determine the parent by itself
+ //return new AccessibleListBoxEntry( *getListBox(), pEntry, this );
+ return new AccessibleListBoxEntry( *getListBox(), pEntry, NULL );
}
// -----------------------------------------------------------------------------
Reference< XAccessible > SAL_CALL AccessibleListBox::getAccessibleParent( ) throw (RuntimeException)
@@ -269,9 +422,54 @@ namespace accessibility
return m_xParent;
}
// -----------------------------------------------------------------------------
+ sal_Int32 SAL_CALL AccessibleListBox::getRoleType()
+ {
+ sal_Int32 nCase = 0;
+ SvLBoxEntry* pEntry = getListBox()->GetEntry(0);
+ if ( pEntry )
+ {
+ if( pEntry->HasChildsOnDemand() || getListBox()->GetChildCount(pEntry) > 0 )
+ {
+ nCase = 1;
+ return nCase;
+ }
+ }
+
+ sal_Bool bHasButtons = (getListBox()->GetStyle() & WB_HASBUTTONS)!=0;
+ if( !(getListBox()->GetTreeFlags() & TREEFLAG_CHKBTN) )
+ {
+ if( bHasButtons )
+ nCase = 1;
+ }
+ else
+ {
+ if( bHasButtons )
+ nCase = 2;
+ else
+ nCase = 3;
+ }
+ return nCase;
+ }
sal_Int16 SAL_CALL AccessibleListBox::getAccessibleRole( ) throw (RuntimeException)
{
- return AccessibleRole::TREE;
+ if(getListBox())
+ {
+ short nType = getListBox()->GetAllEntriesAccessibleRoleType();
+ if( nType == TREEBOX_ALLITEM_ACCROLE_TYPE_TREE)
+ return AccessibleRole::TREE;
+ else if( nType == TREEBOX_ALLITEM_ACCROLE_TYPE_LIST)
+ return AccessibleRole::LIST;
+ }
+
+ //o is: return AccessibleRole::TREE;
+ sal_Bool bHasButtons = (getListBox()->GetStyle() & WB_HASBUTTONS)!=0;
+ if(!bHasButtons && (getListBox()->GetTreeFlags() & TREEFLAG_CHKBTN))
+ return AccessibleRole::LIST;
+ else
+ if(getRoleType() == 0)
+ return AccessibleRole::LIST;
+ else
+ return AccessibleRole::TREE;
}
// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL AccessibleListBox::getAccessibleDescription( ) throw (RuntimeException)
@@ -356,16 +554,19 @@ namespace accessibility
ensureAlive();
- sal_Int32 i, nSelCount = 0, nCount = 0;
- nCount = getListBox()->GetLevelChildCount( NULL );
- for ( i = 0; i < nCount; ++i )
- {
- SvLBoxEntry* pEntry = getListBox()->GetEntry( i );
- if ( getListBox()->IsSelected( pEntry ) )
- ++nSelCount;
- }
- return nSelCount;
+// sal_Int32 i, nSelCount = 0, nCount = 0;
+// nCount = getListBox()->GetLevelChildCount( NULL );
+// for ( i = 0; i < nCount; ++i )
+// {
+// SvLBoxEntry* pEntry = getListBox()->GetEntry( i );
+// if ( getListBox()->IsSelected( pEntry ) )
+// ++nSelCount;
+// }
+// return nSelCount;
+
+ int nTestCount = getListBox()->GetSelectionCount();
+ return nTestCount;
}
// -----------------------------------------------------------------------------
Reference< XAccessible > SAL_CALL AccessibleListBox::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (IndexOutOfBoundsException, RuntimeException)
@@ -388,7 +589,9 @@ namespace accessibility
if ( nSelCount == ( nSelectedChildIndex + 1 ) )
{
- xChild = new AccessibleListBoxEntry( *getListBox(), pEntry, this );
+ // Solution: Set the parameter of the parent to null to let entry determine the parent by itself
+ //xChild = new AccessibleListBoxEntry( *getListBox(), pEntry, this );
+ xChild = new AccessibleListBoxEntry( *getListBox(), pEntry, NULL );
break;
}
}
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index d29ef1afd200..af7620c5c3ed 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -25,6 +25,7 @@
#include "precompiled_accessibility.hxx"
#include "accessibility/extended/accessiblelistboxentry.hxx"
#include <svtools/svtreebx.hxx>
+#include <accessibility/helper/accresmgr.hxx>
#include <svtools/stringtransfer.hxx>
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/awt/Rectangle.hpp>
@@ -44,7 +45,10 @@
#include <comphelper/sequence.hxx>
#include <comphelper/accessibleeventnotifier.hxx>
#include <toolkit/helper/vclunohelper.hxx>
-
+#include <accessibility/helper/accessiblestrings.hrc>
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEVALUE_HPP_
+#include <com/sun/star/accessibility/XAccessibleValue.hpp>
+#endif
#define ACCESSIBLE_ACTION_COUNT 1
namespace
@@ -76,7 +80,7 @@ namespace accessibility
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star;
-
+ using namespace ::comphelper;
DBG_NAME(AccessibleListBoxEntry)
// -----------------------------------------------------------------------------
@@ -89,6 +93,7 @@ namespace accessibility
AccessibleListBoxEntry_BASE ( m_aMutex ),
ListBoxAccessibleBase( _rListBox ),
+ m_pSvLBoxEntry ( _pEntry ),
m_nClientId ( 0 ),
m_aParent ( _xParent )
@@ -110,6 +115,19 @@ namespace accessibility
}
}
+ // IA2 CWS
+ void AccessibleListBoxEntry::NotifyAccessibleEvent( sal_Int16 _nEventId,
+ const ::com::sun::star::uno::Any& _aOldValue,
+ const ::com::sun::star::uno::Any& _aNewValue )
+ {
+ Reference< uno::XInterface > xSource( *this );
+ AccessibleEventObject aEventObj( xSource, _nEventId, _aNewValue, _aOldValue );
+
+ if (m_nClientId)
+ comphelper::AccessibleEventNotifier::addEvent( m_nClientId, aEventObj );
+ }
+
+
// -----------------------------------------------------------------------------
Rectangle AccessibleListBoxEntry::GetBoundingBox_Impl() const
{
@@ -196,8 +214,10 @@ namespace accessibility
{
::rtl::OUString sRet;
SvLBoxEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath );
+ //IAccessibility2 Implementation 2009-----
if ( pEntry )
- sRet = getListBox()->SearchEntryText( pEntry );
+ sRet = getListBox()->SearchEntryTextWithHeadTitle( pEntry );
+ //-----IAccessibility2 Implementation 2009
return sRet;
}
// -----------------------------------------------------------------------------
@@ -337,8 +357,9 @@ namespace accessibility
::osl::MutexGuard aGuard( m_aMutex );
EnsureIsAlive();
- SvLBoxEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath );
- SvLBoxEntry* pEntry = pParent ? getListBox()->GetEntry( pParent, i ) : NULL;
+// SvLBoxEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath );
+// SvLBoxEntry* pEntry = pParent ? getListBox()->GetEntry( pParent, i ) : NULL;
+ SvLBoxEntry* pEntry =GetRealChild(i);
if ( !pEntry )
throw IndexOutOfBoundsException();
@@ -369,6 +390,10 @@ namespace accessibility
SvLBoxEntry* pParentEntry = getListBox()->GetEntryFromPath( m_aEntryPath );
DBG_ASSERT( pParentEntry, "AccessibleListBoxEntry::implGetParentAccessible: could not obtain a parent entry!" );
+ //IAccessibility2 Implementation 2009-----
+ if ( pParentEntry )
+ pParentEntry = getListBox()->GetParent(pParentEntry);
+ //-----IAccessibility2 Implementation 2009
if ( pParentEntry )
xParent = new AccessibleListBoxEntry( *getListBox(), pParentEntry, NULL );
// note that we pass NULL here as parent-accessible:
@@ -398,15 +423,104 @@ namespace accessibility
return m_aEntryPath.empty() ? -1 : m_aEntryPath.back();
}
// -----------------------------------------------------------------------------
+ sal_Int32 SAL_CALL AccessibleListBoxEntry::getRoleType()
+ {
+ sal_Int32 nCase = 0;
+ SvLBoxEntry* pEntry = getListBox()->GetEntry(0);
+ if ( pEntry )
+ {
+ if( pEntry->HasChildsOnDemand() || getListBox()->GetChildCount(pEntry) > 0 )
+ {
+ nCase = 1;
+ return nCase;
+ }
+ }
+
+ sal_Bool bHasButtons = (getListBox()->GetStyle() & WB_HASBUTTONS)!=0;
+ if( !(getListBox()->GetTreeFlags() & TREEFLAG_CHKBTN) )
+ {
+ if( bHasButtons )
+ nCase = 1;
+ }
+ else
+ {
+ if( bHasButtons )
+ nCase = 2;
+ else
+ nCase = 3;
+ }
+ return nCase;
+ }
sal_Int16 SAL_CALL AccessibleListBoxEntry::getAccessibleRole( ) throw (RuntimeException)
{
- return AccessibleRole::LABEL;
+ SvTreeListBox* pBox = getListBox();
+ if(pBox)
+ {
+ short nType = pBox->GetAllEntriesAccessibleRoleType();
+ if( nType == TREEBOX_ALLITEM_ACCROLE_TYPE_TREE)
+ return AccessibleRole::TREE_ITEM;
+ else if( nType == TREEBOX_ALLITEM_ACCROLE_TYPE_LIST)
+ return AccessibleRole::LIST_ITEM;
+ }
+
+ sal_uInt16 treeFlag = pBox->GetTreeFlags();
+ if(treeFlag & TREEFLAG_CHKBTN )
+ {
+ SvLBoxEntry* pEntry = pBox->GetEntryFromPath( m_aEntryPath );
+ SvButtonState eState = pBox->GetCheckButtonState( pEntry );
+ switch( eState )
+ {
+ case SV_BUTTON_CHECKED:
+ case SV_BUTTON_UNCHECKED:
+ return AccessibleRole::CHECK_BOX;
+ case SV_BUTTON_TRISTATE:
+ default:
+ return AccessibleRole::LABEL;
+ }
+ }
+ else
+ {
+
+ if(getRoleType() == 0)
+ return AccessibleRole::LIST_ITEM;
+ else
+ //o is: return AccessibleRole::LABEL;
+ return AccessibleRole::TREE_ITEM;
+ }
}
// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL AccessibleListBoxEntry::getAccessibleDescription( ) throw (RuntimeException)
{
// no description for every item
- return ::rtl::OUString();
+ SvLBoxEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath );
+ if( getAccessibleRole() == AccessibleRole::TREE_ITEM )
+ {
+ return getListBox()->GetEntryLongDescription( pEntry );
+ }
+ //want to cout the real column nubmer in the list box.
+ sal_uInt16 iRealItemCount = 0;
+ sal_uInt16 iCount = 0;
+ sal_uInt16 iTotleItemCount = pEntry->ItemCount();
+ SvLBoxItem* pItem;
+ while( iCount < iTotleItemCount )
+ {
+ pItem = pEntry->GetItem( iCount );
+ if ( pItem->IsA() == SV_ITEM_ID_LBOXSTRING &&
+ static_cast<SvLBoxString*>( pItem )->GetText().Len() > 0 )
+ {
+ iRealItemCount++;
+ }
+ iCount++;
+ }
+ if(iRealItemCount<=1 )
+ {
+ return ::rtl::OUString();
+ }
+ else
+ {
+ return getListBox()->SearchEntryTextWithHeadTitle( pEntry );
+ }
+
}
// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL AccessibleListBoxEntry::getAccessibleName( ) throw (RuntimeException)
@@ -414,7 +528,24 @@ namespace accessibility
::osl::MutexGuard aGuard( m_aMutex );
EnsureIsAlive();
- return implGetText();
+
+ ::rtl::OUString sRet;
+ sRet = implGetText();
+
+ SvLBoxEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath );
+
+ String altText = getListBox()->GetEntryAltText( pEntry );
+ if( altText.Len() > 0 )
+ {
+ sRet += ::rtl::OUString(' ');
+ sRet += altText;
+ }
+
+ // IA2 CWS. Removed for now - only used in Sw/Sd/ScContentLBoxString, they should decide if they need this
+ // if ( pEntry && pEntry->IsMarked())
+ // sRet = sRet + ::rtl::OUString(TK_RES_STRING(STR_SVT_ACC_LISTENTRY_SELCTED_STATE));
+
+ return sRet;
}
// -----------------------------------------------------------------------------
Reference< XAccessibleRelationSet > SAL_CALL AccessibleListBoxEntry::getAccessibleRelationSet( ) throw (RuntimeException)
@@ -444,14 +575,25 @@ namespace accessibility
if ( IsAlive_Impl() )
{
- pStateSetHelper->AddState( AccessibleStateType::TRANSIENT );
- pStateSetHelper->AddState( AccessibleStateType::SELECTABLE );
- pStateSetHelper->AddState( AccessibleStateType::ENABLED );
- pStateSetHelper->AddState( AccessibleStateType::SENSITIVE );
- if ( getListBox()->IsInplaceEditingEnabled() )
- pStateSetHelper->AddState( AccessibleStateType::EDITABLE );
- if ( IsShowing_Impl() )
- pStateSetHelper->AddState( AccessibleStateType::SHOWING );
+ switch(getAccessibleRole())
+ {
+ case AccessibleRole::LABEL:
+ pStateSetHelper->AddState( AccessibleStateType::TRANSIENT );
+ pStateSetHelper->AddState( AccessibleStateType::SELECTABLE );
+ pStateSetHelper->AddState( AccessibleStateType::ENABLED );
+ if ( getListBox()->IsInplaceEditingEnabled() )
+ pStateSetHelper->AddState( AccessibleStateType::EDITABLE );
+ if ( IsShowing_Impl() )
+ pStateSetHelper->AddState( AccessibleStateType::SHOWING );
+ break;
+ case AccessibleRole::CHECK_BOX:
+ pStateSetHelper->AddState( AccessibleStateType::TRANSIENT );
+ pStateSetHelper->AddState( AccessibleStateType::SELECTABLE );
+ pStateSetHelper->AddState( AccessibleStateType::ENABLED );
+ if ( IsShowing_Impl() )
+ pStateSetHelper->AddState( AccessibleStateType::SHOWING );
+ break;
+ }
getListBox()->FillAccessibleEntryStateSet(
getListBox()->GetEntryFromPath( m_aEntryPath ), *pStateSetHelper );
}
@@ -586,6 +728,7 @@ namespace accessibility
ALBSolarGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
EnsureIsAlive();
+ if(aPoint.X==0 && aPoint.Y==0) return 0;
sal_Int32 nIndex = -1;
SvLBoxEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath );
@@ -660,7 +803,20 @@ namespace accessibility
::osl::MutexGuard aGuard( m_aMutex );
// three actions supported
- return ACCESSIBLE_ACTION_COUNT;
+ SvTreeListBox* pBox = getListBox();
+ sal_uInt16 treeFlag = pBox->GetTreeFlags();
+ sal_Bool bHasButtons = (getListBox()->GetStyle() & WB_HASBUTTONS)!=0;
+ if( (treeFlag & TREEFLAG_CHKBTN) && !bHasButtons)
+ {
+ sal_Int16 role = getAccessibleRole();
+ if ( role == AccessibleRole::CHECK_BOX )
+ return 2;
+ else if ( role == AccessibleRole::LABEL )
+ return 0;
+ }
+ else
+ return ACCESSIBLE_ACTION_COUNT;
+ return 0;
}
// -----------------------------------------------------------------------------
sal_Bool SAL_CALL AccessibleListBoxEntry::doAccessibleAction( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException)
@@ -671,17 +827,30 @@ namespace accessibility
sal_Bool bRet = sal_False;
checkActionIndex_Impl( nIndex );
EnsureIsAlive();
-
- SvLBoxEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath );
- if ( pEntry )
+ sal_uInt16 treeFlag = getListBox()->GetTreeFlags();
+ if( nIndex == 0 && (treeFlag & TREEFLAG_CHKBTN) )
{
- if ( getListBox()->IsExpanded( pEntry ) )
- getListBox()->Collapse( pEntry );
- else
- getListBox()->Expand( pEntry );
- bRet = sal_True;
+ if(getAccessibleRole() == AccessibleRole::CHECK_BOX)
+ {
+ SvLBoxEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath );
+ SvButtonState state = getListBox()->GetCheckButtonState( pEntry );
+ if ( state == SV_BUTTON_CHECKED )
+ getListBox()->SetCheckButtonState(pEntry, (SvButtonState)SV_BMP_UNCHECKED);
+ else if (state == SV_BMP_UNCHECKED)
+ getListBox()->SetCheckButtonState(pEntry, (SvButtonState)SV_BUTTON_CHECKED);
+ }
+ }else if( (nIndex == 1 && (treeFlag & TREEFLAG_CHKBTN) ) || (nIndex == 0) )
+ {
+ SvLBoxEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath );
+ if ( pEntry )
+ {
+ if ( getListBox()->IsExpanded( pEntry ) )
+ getListBox()->Collapse( pEntry );
+ else
+ getListBox()->Expand( pEntry );
+ bRet = sal_True;
+ }
}
-
return bRet;
}
// -----------------------------------------------------------------------------
@@ -694,7 +863,38 @@ namespace accessibility
EnsureIsAlive();
static const ::rtl::OUString sActionDesc( RTL_CONSTASCII_USTRINGPARAM( "toggleExpand" ) );
- return sActionDesc;
+ static const ::rtl::OUString sActionDesc1( RTL_CONSTASCII_USTRINGPARAM( "Check" ) );
+ static const ::rtl::OUString sActionDesc2( RTL_CONSTASCII_USTRINGPARAM( "UnCheck" ) );
+ // sal_Bool bHasButtons = (getListBox()->GetStyle() & WB_HASBUTTONS)!=0;
+ SvLBoxEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath );
+ SvButtonState state = getListBox()->GetCheckButtonState( pEntry );
+ sal_uInt16 treeFlag = getListBox()->GetTreeFlags();
+ if(nIndex == 0 && (treeFlag & TREEFLAG_CHKBTN))
+ {
+ if(getAccessibleRole() == AccessibleRole::CHECK_BOX)
+ {
+ if ( state == SV_BUTTON_CHECKED )
+ return sActionDesc2;
+ else if (state == SV_BMP_UNCHECKED)
+ return sActionDesc1;
+ }
+ else
+ {
+ //Sometimes, a List or Tree may have both checkbox and label at the same time
+ return ::rtl::OUString();
+ }
+ }else if( (nIndex == 1 && (treeFlag & TREEFLAG_CHKBTN)) || nIndex == 0 )
+ {
+ //IAccessibility2 Implementation 2009-----
+ if( pEntry->HasChilds() || pEntry->HasChildsOnDemand() )
+ //-----IAccessibility2 Implementation 2009
+ return getListBox()->IsExpanded( pEntry ) ? \
+ ::rtl::OUString(TK_RES_STRING(STR_SVT_ACC_ACTION_COLLAPSE)) :
+ ::rtl::OUString(TK_RES_STRING(STR_SVT_ACC_ACTION_EXPAND));
+ return ::rtl::OUString();
+
+ }
+ throw IndexOutOfBoundsException();
}
// -----------------------------------------------------------------------------
Reference< XAccessibleKeyBinding > AccessibleListBoxEntry::getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException)
@@ -715,9 +915,11 @@ namespace accessibility
::osl::MutexGuard aGuard( m_aMutex );
EnsureIsAlive();
+// IAccessible2 implementation, 2009
+// SvLBoxEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath );
+// SvLBoxEntry* pEntry = getListBox()->GetEntry( pParent, nChildIndex );
- SvLBoxEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath );
- SvLBoxEntry* pEntry = getListBox()->GetEntry( pParent, nChildIndex );
+ SvLBoxEntry* pEntry =GetRealChild(nChildIndex);
if ( !pEntry )
throw IndexOutOfBoundsException();
@@ -960,6 +1162,111 @@ namespace accessibility
return OCommonAccessibleText::getTextBehindIndex( nIndex ,aTextType);
}
+ // -----------------------------------------------------------------------------
+ // XAccessibleValue
+ // -----------------------------------------------------------------------------
+
+ Any AccessibleListBoxEntry::getCurrentValue( ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ Any aValue;
+ sal_Int32 level = ((sal_Int32) m_aEntryPath.size() - 1);
+ level = level < 0 ? 0: level;
+ aValue <<= level;
+ return aValue;
+ }
+
+ // -----------------------------------------------------------------------------
+
+ sal_Bool AccessibleListBoxEntry::setCurrentValue( const Any& aNumber ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+
+ sal_Bool bReturn = sal_False;
+ SvTreeListBox* pBox = getListBox();
+ if(getAccessibleRole() == AccessibleRole::CHECK_BOX)
+ {
+ SvLBoxEntry* pEntry = pBox->GetEntryFromPath( m_aEntryPath );
+ if ( pEntry )
+ {
+ sal_Int32 nValue(0), nValueMin(0), nValueMax(0);
+ aNumber >>= nValue;
+ getMinimumValue() >>= nValueMin;
+ getMaximumValue() >>= nValueMax;
+
+ if ( nValue < nValueMin )
+ nValue = nValueMin;
+ else if ( nValue > nValueMax )
+ nValue = nValueMax;
+
+ pBox->SetCheckButtonState(pEntry, (SvButtonState) nValue );
+ bReturn = sal_True;
+ }
+ }
+
+ return bReturn;
+ }
+
+ // -----------------------------------------------------------------------------
+
+ Any AccessibleListBoxEntry::getMaximumValue( ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ Any aValue;
+ // SvTreeListBox* pBox = getListBox();
+ switch(getAccessibleRole())
+ {
+ case AccessibleRole::CHECK_BOX:
+ aValue <<= (sal_Int32)1;
+ break;
+ case AccessibleRole::LABEL:
+ default:
+ break;
+ }
+
+ return aValue;
+ }
+
+ // -----------------------------------------------------------------------------
+
+ Any AccessibleListBoxEntry::getMinimumValue( ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ Any aValue;
+ // SvTreeListBox* pBox = getListBox();
+ switch(getAccessibleRole())
+ {
+ case AccessibleRole::CHECK_BOX:
+ aValue <<= (sal_Int32)0;
+ break;
+ case AccessibleRole::LABEL:
+ default:
+ break;
+ }
+
+ return aValue;
+ }
+
+ // -----------------------------------------------------------------------------
+
+ SvLBoxEntry * AccessibleListBoxEntry::GetRealChild(sal_Int32 nIndex)
+ {
+ SvLBoxEntry* pEntry =NULL;
+ SvLBoxEntry* pParent = getListBox()->GetEntryFromPath( m_aEntryPath );
+ if (pParent)
+ {
+ pEntry = getListBox()->GetEntry( pParent, nIndex );
+ if ( !pEntry && getAccessibleChildCount() > 0 )
+ {
+ getListBox()->RequestingChilds(pParent);
+ pEntry = getListBox()->GetEntry( pParent, nIndex );
+ }
+ }
+ return pEntry;
+ }
//........................................................................
}// namespace accessibility
//........................................................................
diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx b/accessibility/source/extended/accessibletablistboxtable.cxx
index 51766741d2a2..60cf7ef7a9f9 100644
--- a/accessibility/source/extended/accessibletablistboxtable.cxx
+++ b/accessibility/source/extended/accessibletablistboxtable.cxx
@@ -32,6 +32,9 @@
#include <svtools/svtabbx.hxx>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#ifndef _SVTOOLS_ACCESSIBILEBROWSEBOXTABLECELL_HXX
+#include "accessibility/extended/AccessibleBrowseBoxTableCell.hxx"
+#endif
//........................................................................
namespace accessibility
{
@@ -154,6 +157,63 @@ namespace accessibility
}
break;
}
+ case VCLEVENT_WINDOW_GETFOCUS :
+ {
+ uno::Any aOldValue, aNewValue;
+ aNewValue <<= AccessibleStateType::FOCUSED;
+ commitEvent( AccessibleEventId::STATE_CHANGED, aNewValue, aOldValue );
+ break;
+
+ }
+ case VCLEVENT_WINDOW_LOSEFOCUS :
+ {
+ uno::Any aOldValue, aNewValue;
+ aOldValue <<= AccessibleStateType::FOCUSED;
+ commitEvent( AccessibleEventId::STATE_CHANGED, aNewValue, aOldValue );
+ break;
+ }
+ case VCLEVENT_LISTBOX_TREESELECT:
+ {
+ SvLBoxEntry* pEntry = static_cast< SvLBoxEntry* >( rVclWindowEvent.GetData() );
+ if (pEntry)
+ {
+ sal_Int32 nRow = m_pTabListBox->GetEntryPos( pEntry );
+ Reference< XAccessible > xChild = m_pTabListBox->CreateAccessibleCell( nRow, m_pTabListBox->GetCurrColumn() );
+ TriState eState = STATE_DONTKNOW;
+ if ( m_pTabListBox->IsCellCheckBox( nRow, m_pTabListBox->GetCurrColumn(), eState ) )
+ {
+ AccessibleCheckBoxCell* pCell = static_cast< AccessibleCheckBoxCell* >( xChild.get() );
+ pCell->commitEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
+ }
+ else
+ {
+ AccessibleBrowseBoxTableCell* pCell = static_cast< AccessibleBrowseBoxTableCell* >( xChild.get() );
+ pCell->commitEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
+ }
+ }
+ }
+ break;
+ case VCLEVENT_LISTBOX_TREEFOCUS:
+ {
+ if ( m_pTabListBox && m_pTabListBox->HasFocus() )
+ {
+ uno::Any aOldValue, aNewValue;
+ SvLBoxEntry* pEntry = static_cast< SvLBoxEntry* >( rVclWindowEvent.GetData() );
+ if ( pEntry )
+ {
+ sal_Int32 nRow = m_pTabListBox->GetEntryPos( pEntry );
+ m_xCurChild = m_pTabListBox->CreateAccessibleCell( nRow, m_pTabListBox->GetCurrColumn() );
+ aNewValue <<= m_xCurChild;
+ commitEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aNewValue ,aOldValue);
+ }
+ else
+ {
+ aNewValue <<= AccessibleStateType::FOCUSED;
+ commitEvent( AccessibleEventId::STATE_CHANGED, aNewValue ,aOldValue);
+ }
+ }
+ }
+ break;
case VCLEVENT_CHECKBOX_TOGGLE :
{
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index dba8bcf555fb..3135145042d0 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -41,6 +41,8 @@ namespace css = ::com::sun::star;
namespace accessibility
{
+ ::sal_Int32 getSelectionType(::sal_Int32 nNewFirstPara, ::sal_Int32 nNewFirstPos, ::sal_Int32 nNewLastPara, ::sal_Int32 nNewLastPos);
+ void sendEvent(::sal_Int32 start, ::sal_Int32 end, ::sal_Int16 nEventId);
// Both ::osl::Mutex and ParagraphBase implement acquire and release, and thus
// ::rtl::Reference< Paragraph > does not work. So ParagraphImpl was factored
@@ -1012,16 +1014,114 @@ Document::retrieveCharacterBounds(ParagraphImpl const * pParagraph,
// XXX numeric overflow
}
+struct IndexCompare
+{
+ const ::css::beans::PropertyValue* pValues;
+ IndexCompare( const ::css::beans::PropertyValue* pVals ) : pValues(pVals) {}
+ bool operator() ( const sal_Int32& a, const sal_Int32& b ) const
+ {
+ return (pValues[a].Name < pValues[b].Name) ? true : false;
+ }
+};
+
::css::uno::Sequence< ::css::beans::PropertyValue >
Document::retrieveCharacterAttributes(
ParagraphImpl const * pParagraph, ::sal_Int32 nIndex,
const ::css::uno::Sequence< ::rtl::OUString >& aRequestedAttributes)
{
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
+
+ Font aFont = m_rEngine.GetFont();
+ const sal_Int32 AttributeCount = 9;
+ sal_Int32 i = 0;
+ ::css::uno::Sequence< ::css::beans::PropertyValue > aAttribs( AttributeCount );
+ //character background color
+ {
+ aAttribs[i].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharBackColor"));
+ aAttribs[i].Handle = -1;
+ aAttribs[i].Value = mapFontColor( aFont.GetFillColor() );
+ aAttribs[i].State = ::css::beans::PropertyState_DIRECT_VALUE;
+ i++;
+ }
+ //character color
+ {
+ aAttribs[i].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharColor"));
+ aAttribs[i].Handle = -1;
+ //aAttribs[i].Value = mapFontColor( aFont.GetColor() );
+ aAttribs[i].Value = mapFontColor( m_rEngine.GetTextColor() );
+ aAttribs[i].State = ::css::beans::PropertyState_DIRECT_VALUE;
+ i++;
+ }
+ //character font name
+ {
+ aAttribs[i].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharFontName"));
+ aAttribs[i].Handle = -1;
+ aAttribs[i].Value = ::css::uno::makeAny( (::rtl::OUString)aFont.GetName() );
+ aAttribs[i].State = ::css::beans::PropertyState_DIRECT_VALUE;
+ i++;
+ }
+ //character height
+ {
+ aAttribs[i].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharHeight"));
+ aAttribs[i].Handle = -1;
+ aAttribs[i].Value = ::css::uno::makeAny( (sal_Int16)aFont.GetHeight() );
+ aAttribs[i].State = ::css::beans::PropertyState_DIRECT_VALUE;
+ i++;
+ }
+ //character posture
+ {
+ aAttribs[i].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharPosture"));
+ aAttribs[i].Handle = -1;
+ aAttribs[i].Value = ::css::uno::makeAny( (sal_Int16)aFont.GetItalic() );
+ aAttribs[i].State = ::css::beans::PropertyState_DIRECT_VALUE;
+ i++;
+ }
+ //character relief
+ /*{
+ aAttribs[i].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharRelief"));
+ aAttribs[i].Handle = -1;
+ aAttribs[i].Value = ::css::uno::makeAny( (sal_Int16)aFont.GetRelief() );
+ aAttribs[i].State = ::css::beans::PropertyState_DIRECT_VALUE;
+ i++;
+ }*/
+ //character strikeout
+ {
+ aAttribs[i].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharStrikeout"));
+ aAttribs[i].Handle = -1;
+ aAttribs[i].Value = ::css::uno::makeAny( (sal_Int16)aFont.GetStrikeout() );
+ aAttribs[i].State = ::css::beans::PropertyState_DIRECT_VALUE;
+ i++;
+ }
+ //character underline
+ {
+ aAttribs[i].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharUnderline"));
+ aAttribs[i].Handle = -1;
+ aAttribs[i].Value = ::css::uno::makeAny( (sal_Int16)aFont.GetUnderline() );
+ aAttribs[i].State = ::css::beans::PropertyState_DIRECT_VALUE;
+ i++;
+ }
+ //character weight
+ {
+ aAttribs[i].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharWeight"));
+ aAttribs[i].Handle = -1;
+ aAttribs[i].Value = ::css::uno::makeAny( (float)aFont.GetWeight() );
+ aAttribs[i].State = ::css::beans::PropertyState_DIRECT_VALUE;
+ i++;
+ }
+ //character alignment
+ {
+ aAttribs[i].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParaAdjust"));
+ aAttribs[i].Handle = -1;
+ aAttribs[i].Value = ::css::uno::makeAny( (sal_Int16)m_rEngine.GetTextAlign() );
+ aAttribs[i].State = ::css::beans::PropertyState_DIRECT_VALUE;
+ i++;
+ }
::osl::MutexGuard aInternalGuard(GetMutex());
::sal_uLong nNumber = static_cast< ::sal_uLong >(pParagraph->getNumber());
// XXX numeric overflow
- if (nIndex < 0 || nIndex >= m_rEngine.GetText(nNumber).Len())
+ // nIndex can be equal to Len();
+ //if (nIndex < 0 || nIndex >= m_rEngine.GetText(nNumber).Len())
+ if (nIndex < 0 || nIndex > m_rEngine.GetText(nNumber).Len())
throw ::css::lang::IndexOutOfBoundsException(
::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
@@ -1045,7 +1145,31 @@ Document::retrieveCharacterAttributes(
aCharAttrSeq[ aRunIter->first ] = aRunIter->second;
}
- return convertHashMapToSequence( aCharAttrSeq );
+ ::css::beans::PropertyValue* pValues = aAttribs.getArray();
+ for (i = 0; i < AttributeCount; i++,pValues++)
+ {
+ aCharAttrSeq[ pValues->Name ] = *pValues;
+ }
+
+ ::css::uno::Sequence< ::css::beans::PropertyValue > aRes = convertHashMapToSequence( aCharAttrSeq );
+
+ // sort the attributes
+ sal_Int32 nLength = aRes.getLength();
+ const ::css::beans::PropertyValue* pPairs = aRes.getConstArray();
+ sal_Int32* pIndices = new sal_Int32[nLength];
+ for( i = 0; i < nLength; i++ )
+ pIndices[i] = i;
+ std::sort( &pIndices[0], &pIndices[nLength], IndexCompare(pPairs) );
+ // create sorted sequences accoring to index array
+ ::css::uno::Sequence< ::css::beans::PropertyValue > aNewValues( nLength );
+ ::css::beans::PropertyValue* pNewValues = aNewValues.getArray();
+ for( i = 0; i < nLength; i++ )
+ {
+ pNewValues[i] = pPairs[pIndices[i]];
+ }
+ delete[] pIndices;
+
+ return aNewValues;
}
void Document::retrieveDefaultAttributesImpl(
@@ -1416,7 +1540,8 @@ void Document::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
// #107179# if our parent is a compound control (e.g. MultiLineEdit),
// suppress the window focus events here
- if ( !m_bCompoundControlChild )
+// IAccessible2 implementation 2009
+ //if ( !m_bCompoundControlChild )
VCLXAccessibleComponent::ProcessWindowEvent( rVclWindowEvent );
}
break;
@@ -1483,7 +1608,26 @@ Document::getAccessibleAtPoint(::css::awt::Point const & rPoint)
}
return 0;
}
+void Document::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet )
+{
+ VCLXAccessibleComponent::FillAccessibleStateSet( rStateSet );
+ if (!m_rView.IsReadOnly())
+ rStateSet.AddState( ::css::accessibility::AccessibleStateType::EDITABLE );
+}
+void Document::FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet )
+{
+ if( getAccessibleParent()->getAccessibleContext()->getAccessibleRole() == ::css::accessibility::AccessibleRole::SCROLL_PANE )
+ {
+ ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > aSequence(1);
+ aSequence[0] = getAccessibleParent();
+ rRelationSet.AddRelation( ::css::accessibility::AccessibleRelation( ::css::accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
+ }
+ else
+ {
+ VCLXAccessibleComponent::FillAccessibleRelationSet(rRelationSet);
+ }
+}
// virtual
void SAL_CALL Document::disposing()
{
@@ -1626,9 +1770,25 @@ IMPL_LINK(Document, WindowEventHandler, ::VclSimpleEvent *, pEvent)
::osl::MutexGuard aInternalGuard(GetMutex());
if (!isAlive())
break;
-
- if (m_aFocused >= m_aVisibleBegin && m_aFocused < m_aVisibleEnd)
+ //to enable the PARAGRAPH to get focus for multiline edit
+ ::sal_Int32 count = getAccessibleChildCount();
+ ::sal_Bool bEmpty = m_aFocused == m_aVisibleEnd && count == 1;
+ if ((m_aFocused >= m_aVisibleBegin && m_aFocused < m_aVisibleEnd) || bEmpty)
{
+ Paragraphs::iterator m_aTemp = bEmpty ? m_aVisibleBegin : m_aFocused;
+ ::rtl::Reference< ParagraphImpl > xParagraph(getParagraph(m_aTemp));
+ if (xParagraph.is())
+ {
+ xParagraph->notifyEvent(
+ ::css::accessibility::AccessibleEventId::
+ STATE_CHANGED,
+ ::css::uno::Any(),
+ ::css::uno::makeAny(
+ ::css::accessibility::AccessibleStateType::
+ FOCUSED));
+ }
+ }
+ /*
::rtl::Reference< ParagraphImpl > xParagraph(
getParagraph(m_aFocused));
if (xParagraph.is())
@@ -1639,7 +1799,7 @@ IMPL_LINK(Document, WindowEventHandler, ::VclSimpleEvent *, pEvent)
::css::uno::makeAny(
::css::accessibility::AccessibleStateType::
FOCUSED));
- }
+ */
break;
}
case VCLEVENT_WINDOW_LOSEFOCUS:
@@ -1647,7 +1807,24 @@ IMPL_LINK(Document, WindowEventHandler, ::VclSimpleEvent *, pEvent)
::osl::MutexGuard aInternalGuard(GetMutex());
if (!isAlive())
break;
+ //to enable the PARAGRAPH to get focus for multiline edit
+ ::sal_Int32 count = getAccessibleChildCount();
+ ::sal_Bool bEmpty = m_aFocused == m_aVisibleEnd && count == 1;
+ if ((m_aFocused >= m_aVisibleBegin && m_aFocused < m_aVisibleEnd) || bEmpty)
+ {
+ Paragraphs::iterator m_aTemp = bEmpty ? m_aVisibleBegin : m_aFocused;
+ ::rtl::Reference< ParagraphImpl > xParagraph(getParagraph(m_aTemp));
+ if (xParagraph.is())
+ xParagraph->notifyEvent(
+ ::css::accessibility::AccessibleEventId::
+ STATE_CHANGED,
+ ::css::uno::makeAny(
+ ::css::accessibility::AccessibleStateType::
+ FOCUSED),
+ ::css::uno::Any());
+ }
+ /*
if (m_aFocused >= m_aVisibleBegin && m_aFocused < m_aVisibleEnd)
{
::rtl::Reference< ParagraphImpl > xParagraph(
@@ -1661,6 +1838,7 @@ IMPL_LINK(Document, WindowEventHandler, ::VclSimpleEvent *, pEvent)
FOCUSED),
::css::uno::Any());
}
+ */
break;
}
}
@@ -2007,6 +2185,124 @@ void Document::handleParagraphNotifications()
}
}
+::sal_Int32 Document::getSelectionType(::sal_Int32 nNewFirstPara, ::sal_Int32 nNewFirstPos, ::sal_Int32 nNewLastPara, ::sal_Int32 nNewLastPos)
+{
+ if (m_nSelectionFirstPara == -1)
+ return -1;
+ ::sal_Int32 Osp = m_nSelectionFirstPara, Osl = m_nSelectionFirstPos, Oep = m_nSelectionLastPara, Oel = m_nSelectionLastPos;
+ ::sal_Int32 Nsp = nNewFirstPara, Nsl = nNewFirstPos, Nep = nNewLastPara, Nel = nNewLastPos;
+ TextPaM Ns(Nsp, sal_uInt16(Nsl));
+ TextPaM Ne(Nep, sal_uInt16(Nel));
+ TextPaM Os(Osp, sal_uInt16(Osl));
+ TextPaM Oe(Oep, sal_uInt16(Oel));
+
+ if (Os == Oe && Ns == Ne)
+ {
+ //only caret moves.
+ return 1;
+ }
+ else if (Os == Oe && Ns != Ne)
+ {
+ //old has no selection but new has selection
+ return 2;
+ }
+ else if (Os != Oe && Ns == Ne)
+ {
+ //old has selection but new has no selection.
+ return 3;
+ }
+ else if (Os != Oe && Ns != Ne && Osp == Nsp && Osl == Nsl)
+ {
+ //both old and new have selections.
+ if (Oep == Nep )
+ {
+ //Send text_selection_change event on Nep
+
+ return 4;
+ }
+ else if (Oep < Nep)
+ {
+ //all the following examples like 1,2->1,3 means that old start select para is 1, old end select para is 2,
+ // then press shift up, the new start select para is 1, new end select para is 3;
+ //for example, 1, 2 -> 1, 3; 4,1 -> 4, 7; 4,1 -> 4, 2; 4,4->4,5
+ if (Nep >= Nsp)
+ {
+ // 1, 2 -> 1, 3; 4, 1 -> 4, 7; 4,4->4,5;
+ if (Oep < Osp)
+ {
+ // 4,1 -> 4,7;
+ return 5;
+ }
+ else if (Oep >= Osp)
+ {
+ // 1, 2 -> 1, 3; 4,4->4,5;
+ return 6;
+ }
+ }
+ else
+ {
+ // 4,1 -> 4,2,
+ if (Oep < Osp)
+ {
+ // 4,1 -> 4,2,
+ return 7;
+ }
+ else if (Oep >= Osp)
+ {
+ // no such condition. Oep > Osp = Nsp > Nep
+ }
+ }
+ }
+ else if (Oep > Nep)
+ {
+ // 3,2 -> 3,1; 4,7 -> 4,1; 4, 7 -> 4,6; 4,4 -> 4,3
+ if (Nep >= Nsp)
+ {
+ // 4,7 -> 4,6
+ if (Oep <= Osp)
+ {
+ //no such condition, Oep<Osp=Nsp <= Nep
+ }
+ else if (Oep > Osp)
+ {
+ // 4,7 ->4,6
+ return 8;
+ }
+ }
+ else
+ {
+ // 3,2 -> 3,1, 4,7 -> 4,1; 4,4->4,3
+ if (Oep <= Osp)
+ {
+ // 3,2 -> 3,1; 4,4->4,3
+ return 9;
+ }
+ else if (Oep > Osp)
+ {
+ // 4,7 -> 4,1
+ return 10;
+ }
+ }
+ }
+ }
+ return -1;
+}
+
+
+void Document::sendEvent(::sal_Int32 start, ::sal_Int32 end, ::sal_Int16 nEventId)
+{
+ Paragraphs::iterator aEnd = ::std::min(m_xParagraphs->begin() + end + 1, m_aVisibleEnd);
+ for (Paragraphs::iterator aIt = ::std::max(m_xParagraphs->begin() + start, m_aVisibleBegin);
+ aIt < aEnd; ++aIt)
+ {
+ ::rtl::Reference< ParagraphImpl > xParagraph(getParagraph(aIt));
+ if (xParagraph.is())
+ xParagraph->notifyEvent(
+ nEventId,
+ ::css::uno::Any(), ::css::uno::Any());
+ }
+}
+
void Document::handleSelectionChangeNotification()
{
::TextSelection const & rSelection = m_rView.GetSelection();
@@ -2048,7 +2344,11 @@ void Document::handleSelectionChangeNotification()
::rtl::Reference< ParagraphImpl > xParagraph(getParagraph(aIt));
if (xParagraph.is())
{
- if (aIt != m_aFocused)
+ //disable the first event when user types in empty field.
+ ::sal_Int32 count = getAccessibleChildCount();
+ ::sal_Bool bEmpty = count > 1;
+ //if (aIt != m_aFocused)
+ if (aIt != m_aFocused && bEmpty)
xParagraph->notifyEvent(
::css::accessibility::AccessibleEventId::
STATE_CHANGED,
@@ -2068,6 +2368,100 @@ void Document::handleSelectionChangeNotification()
}
m_aFocused = aIt;
+ ::sal_Int32 nMin;
+ ::sal_Int32 nMax;
+ ::sal_Int32 ret = getSelectionType(nNewFirstPara, nNewFirstPos, nNewLastPara, nNewLastPos);
+ switch (ret)
+ {
+ case -1:
+ {
+ //no event
+ }
+ break;
+ case 1:
+ {
+ //only caret moved, already handled in above
+ }
+ break;
+ case 2:
+ {
+ //old has no selection but new has selection
+ nMin = ::std::min(nNewFirstPara, nNewLastPara);
+ nMax = ::std::max(nNewFirstPara, nNewLastPara);
+ sendEvent(nMin, nMax, ::css::accessibility::AccessibleEventId::SELECTION_CHANGED);
+ sendEvent(nMin, nMax, ::css::accessibility::AccessibleEventId::TEXT_SELECTION_CHANGED);
+ }
+ break;
+ case 3:
+ {
+ //old has selection but new has no selection.
+ nMin = ::std::min(m_nSelectionFirstPara, m_nSelectionLastPara);
+ nMax = ::std::max(m_nSelectionFirstPara, m_nSelectionLastPara);
+ sendEvent(nMin, nMax, ::css::accessibility::AccessibleEventId::SELECTION_CHANGED);
+ sendEvent(nMin, nMax, ::css::accessibility::AccessibleEventId::TEXT_SELECTION_CHANGED);
+ }
+ break;
+ case 4:
+ {
+ //Send text_selection_change event on Nep
+ sendEvent(nNewLastPara, nNewLastPara, ::css::accessibility::AccessibleEventId::TEXT_SELECTION_CHANGED);
+ }
+ break;
+ case 5:
+ {
+ // 4, 1 -> 4, 7
+ sendEvent(m_nSelectionLastPara, m_nSelectionFirstPara-1, ::css::accessibility::AccessibleEventId::SELECTION_CHANGED);
+ sendEvent(nNewFirstPara+1, nNewLastPara, ::css::accessibility::AccessibleEventId::SELECTION_CHANGED);
+
+ sendEvent(m_nSelectionLastPara, nNewLastPara, ::css::accessibility::AccessibleEventId::TEXT_SELECTION_CHANGED);
+ }
+ break;
+ case 6:
+ {
+ // 1, 2 -> 1, 4; 4,4->4,5;
+ sendEvent(m_nSelectionLastPara+1, nNewLastPara, ::css::accessibility::AccessibleEventId::SELECTION_CHANGED);
+
+ sendEvent(m_nSelectionLastPara, nNewLastPara, ::css::accessibility::AccessibleEventId::TEXT_SELECTION_CHANGED);
+ }
+ break;
+ case 7:
+ {
+ // 4,1 -> 4,3,
+ sendEvent(m_nSelectionLastPara +1, nNewLastPara , ::css::accessibility::AccessibleEventId::SELECTION_CHANGED);
+
+ sendEvent(m_nSelectionLastPara, nNewLastPara, ::css::accessibility::AccessibleEventId::TEXT_SELECTION_CHANGED);
+ }
+ break;
+ case 8:
+ {
+ // 4,7 ->4,5;
+ sendEvent(nNewLastPara + 1, m_nSelectionLastPara, ::css::accessibility::AccessibleEventId::SELECTION_CHANGED);
+
+ sendEvent(nNewLastPara, m_nSelectionLastPara, ::css::accessibility::AccessibleEventId::TEXT_SELECTION_CHANGED);
+ }
+ break;
+ case 9:
+ {
+ // 3,2 -> 3,1; 4,4->4,3
+ sendEvent(nNewLastPara, m_nSelectionLastPara - 1, ::css::accessibility::AccessibleEventId::SELECTION_CHANGED);
+
+ sendEvent(nNewLastPara, m_nSelectionLastPara, ::css::accessibility::AccessibleEventId::TEXT_SELECTION_CHANGED);
+ }
+ break;
+ case 10:
+ {
+ // 4,7 -> 4,1
+ sendEvent(m_nSelectionFirstPara + 1, m_nSelectionLastPara, ::css::accessibility::AccessibleEventId::SELECTION_CHANGED);
+ sendEvent(nNewLastPara, nNewFirstPara - 1, ::css::accessibility::AccessibleEventId::SELECTION_CHANGED);
+
+ sendEvent(nNewLastPara, m_nSelectionLastPara, ::css::accessibility::AccessibleEventId::TEXT_SELECTION_CHANGED);
+ }
+ break;
+ default:
+ break;
+ }
+
+ /*
// Update both old and new selection. (Regardless of how the two selections
// look like, there will always be two ranges to the left and right of the
// overlap---the overlap and/or the range to the right of it possibly being
@@ -2143,7 +2537,7 @@ void Document::handleSelectionChangeNotification()
// notify selection changes
notifySelectionChange( nFirst1, nLast1 );
notifySelectionChange( nFirst2, nLast2 );
-
+ */
m_nSelectionFirstPara = nNewFirstPara;
m_nSelectionFirstPos = nNewFirstPos;
m_nSelectionLastPara = nNewLastPara;
diff --git a/accessibility/source/helper/accessiblestrings.src b/accessibility/source/helper/accessiblestrings.src
index bcff8eb8e9ea..31b6719097fa 100644
--- a/accessibility/source/helper/accessiblestrings.src
+++ b/accessibility/source/helper/accessiblestrings.src
@@ -25,11 +25,12 @@
#include <accessibility/helper/accessiblestrings.hrc>
#endif
-
+//IAccessibility2 Impplementaton 2009-----
String RID_STR_ACC_ACTION_CLICK
{
- Text = "click";
+ Text = "press";
};
+//-----IAccessibility2 Impplementaton 2009
String RID_STR_ACC_ACTION_TOGGLEPOPUP
{
@@ -66,6 +67,52 @@ String RID_STR_ACC_NAME_BROWSEBUTTON
Text [ en-US ] = "Browse";
};
+String STR_SVT_ACC_ACTION_EXPAND
+{
+ Text [ en-US ] = "Expand" ;
+};
+
+String STR_SVT_ACC_ACTION_COLLAPSE
+{
+ Text [ en-US ] = "Collapse";
+};
+String STR_SVT_ACC_LISTENTRY_SELCTED_STATE
+{
+ Text [ en-US ] = "(Selected)";
+};
+
+String RID_STR_ACC_NAME_PREVIEW
+{
+ Text [ en-US ] = "Preview";
+};
+
+String RID_STR_ACC_ACTION_CHECK
+{
+ Text [ en-US ] = "Check";
+};
+String RID_STR_ACC_ACTION_UNCHECK
+{
+ Text [ en-US ] = "Uncheck";
+};
+String RID_STR_ACC_ACTION_DOUBLE_CLICK
+{
+ Text [ en-US ] = "Double click";
+};
+
+String RID_STR_ACC_SCROLLBAR_NAME_VERTICAL
+{
+ Text [ en-US ] = "Vertical scroll bar";
+};
+String RID_STR_ACC_SCROLLBAR_NAME_HORIZONTAL
+{
+ Text [ en-US ] = "Horizontal scroll bar";
+};
+
+String RID_STR_ACC_PANEL_DESCRIPTION
+{
+ Text [ en-US ] = "Please press enter to go into child control for more operations";
+};
+
String RID_STR_ACC_DESC_PANELDECL_TABBAR
{
Text [ en-US ] = "Panel Deck Tab Bar";
diff --git a/accessibility/source/helper/characterattributeshelper.cxx b/accessibility/source/helper/characterattributeshelper.cxx
index f5e1fa6f5f9a..3a04c9a0d586 100644
--- a/accessibility/source/helper/characterattributeshelper.cxx
+++ b/accessibility/source/helper/characterattributeshelper.cxx
@@ -35,6 +35,8 @@ using namespace ::com::sun::star::beans;
CharacterAttributesHelper::CharacterAttributesHelper( const Font& rFont, sal_Int32 nBackColor, sal_Int32 nColor )
{
+ // MT: IA2 CWS commented out CharFontCharSet, CharFontFamily, CharFontPitch, CharFontStyleName, CharScaleWidth - any AT interested in this?
+
m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString::createFromAscii( "CharBackColor" ), makeAny( (sal_Int32) nBackColor ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString::createFromAscii( "CharColor" ), makeAny( (sal_Int32) nColor ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString::createFromAscii( "CharFontCharSet" ), makeAny( (sal_Int16) rFont.GetCharSet() ) ) );
@@ -47,6 +49,9 @@ CharacterAttributesHelper::CharacterAttributesHelper( const Font& rFont, sal_Int
m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString::createFromAscii( "CharStrikeout" ), makeAny( (sal_Int16) rFont.GetStrikeout() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString::createFromAscii( "CharUnderline" ), makeAny( (sal_Int16) rFont.GetUnderline() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString::createFromAscii( "CharWeight" ), makeAny( (float) rFont.GetWeight() ) ) );
+ m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString::createFromAscii( "CharPosture" ), makeAny( (sal_Int16)rFont.GetItalic() ) ) );
+ // MT: Introduced with IA2 CWS, but adjustment is not a char attr...
+ // m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString::createFromAscii( "ParaAdjust" ), makeAny( nAjust ) ) );
}
// -----------------------------------------------------------------------------
diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx
index e4e3b2f77b01..fee2909a24ba 100644
--- a/accessibility/source/standard/accessiblemenubasecomponent.cxx
+++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx
@@ -134,15 +134,20 @@ void OAccessibleMenuBaseComponent::SetEnabled( sal_Bool bEnabled )
{
if ( m_bEnabled != bEnabled )
{
+ sal_Int16 nStateType=AccessibleStateType::ENABLED;
+ if (IsMenuHideDisabledEntries())
+ {
+ nStateType = AccessibleStateType::VISIBLE;
+ }
Any aOldValue[2], aNewValue[2];
if ( m_bEnabled )
{
aOldValue[0] <<= AccessibleStateType::SENSITIVE;
- aOldValue[1] <<= AccessibleStateType::ENABLED;
+ aOldValue[1] <<= nStateType;
}
else
{
- aNewValue[0] <<= AccessibleStateType::ENABLED;
+ aNewValue[0] <<= nStateType;
aNewValue[1] <<= AccessibleStateType::SENSITIVE;
}
m_bEnabled = bEnabled;
@@ -779,3 +784,9 @@ Reference< XAccessibleStateSet > OAccessibleMenuBaseComponent::getAccessibleStat
}
// -----------------------------------------------------------------------------
+
+sal_Bool OAccessibleMenuBaseComponent::IsMenuHideDisabledEntries()
+{
+ return sal_False;
+}
+
diff --git a/accessibility/source/standard/accessiblemenuitemcomponent.cxx b/accessibility/source/standard/accessiblemenuitemcomponent.cxx
index ac46d893abdb..f288d64b5406 100644
--- a/accessibility/source/standard/accessiblemenuitemcomponent.cxx
+++ b/accessibility/source/standard/accessiblemenuitemcomponent.cxx
@@ -208,6 +208,18 @@ void OAccessibleMenuItemComponent::SetAccessibleName( const ::rtl::OUString& sAc
if ( sName.getLength() == 0 )
sName = m_pParent->GetItemText( nItemId );
sName = OutputDevice::GetNonMnemonicString( sName );
+
+ // IA2 CWS, MT: Is adding 5 blanks really before the accelname reasonable? And which Platform / Accessibility API does need it this way? ATK has API for this...
+ // Also, IAccessible2 has IAccessibleAction::keyBinding, so I doubt that this is needed.
+ // But if so, it needs to move to the IA2 bridge.
+ /*
+ ::rtl::OUString sAccName = m_pParent->GetAccelKey( nItemId ).GetName();
+ if ( sAccName.getLength() )
+ {
+ sName += ::rtl::OUString::createFromAscii(" ");
+ sName += aAccelName;
+ }
+ */
}
return sName;
@@ -240,7 +252,8 @@ void OAccessibleMenuItemComponent::SetItemText( const ::rtl::OUString& sItemText
void OAccessibleMenuItemComponent::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet )
{
- if ( IsEnabled() )
+ sal_Bool bEnabled = IsEnabled();
+ if ( bEnabled )
{
rStateSet.AddState( AccessibleStateType::ENABLED );
rStateSet.AddState( AccessibleStateType::SENSITIVE );
@@ -248,10 +261,10 @@ void OAccessibleMenuItemComponent::FillAccessibleStateSet( utl::AccessibleStateS
if ( IsVisible() )
{
- rStateSet.AddState( AccessibleStateType::VISIBLE );
rStateSet.AddState( AccessibleStateType::SHOWING );
+ if( !IsMenuHideDisabledEntries() || bEnabled )
+ rStateSet.AddState( AccessibleStateType::VISIBLE );
}
-
rStateSet.AddState( AccessibleStateType::OPAQUE );
}
@@ -497,3 +510,23 @@ Reference< awt::XFont > OAccessibleMenuItemComponent::getFont( ) throw (Runtime
}
// -----------------------------------------------------------------------------
+
+sal_Bool OAccessibleMenuItemComponent::IsMenuHideDisabledEntries()
+{
+ if (m_pParent )
+ {
+ if( m_pParent->GetMenuFlags() & MENU_FLAG_HIDEDISABLEDENTRIES)
+ {
+ return sal_True;
+ }
+ // IA2 CWS, but the menus shouldn't have different flags, and even if so, the GetStartedFromMenu shouldn't matter
+ /*
+ else if (m_pParent->GetStartedFromMenu() &&
+ m_pParent->GetStartedFromMenu()->GetMenuFlags() & MENU_FLAG_HIDEDISABLEDENTRIES)
+ {
+ return sal_True;
+ }
+ */
+ }
+ return sal_False;
+}
diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx
index 360673e0f41a..2ae5be1c1e7b 100644
--- a/accessibility/source/standard/vclxaccessiblebox.cxx
+++ b/accessibility/source/standard/vclxaccessiblebox.cxx
@@ -116,11 +116,98 @@ void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEven
{
switch ( rVclWindowEvent.GetId() )
{
+ case VCLEVENT_LISTBOX_SELECT:
+ case VCLEVENT_LISTBOX_FOCUSITEMCHANGED:
+
+ {
+ // Forward the call to the list child.
+ VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ if ( pList == NULL )
+ {
+ getAccessibleChild ( m_bHasTextChild ? 1 : 0 );
+ pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ }
+ if ( pList != NULL )
+ {
+ pList->ProcessWindowEvent (rVclWindowEvent, m_bIsDropDownBox);
+ if(m_bIsDropDownBox)
+ {
+ NotifyAccessibleEvent(AccessibleEventId::VALUE_CHANGED, Any(), Any());
+ Any aOldValue;
+ Any aNewValue;
+ aOldValue <<= AccessibleStateType::INDETERMINATE;
+ NotifyAccessibleEvent(AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue);
+
+ }
+ }
+ break;
+ }
case VCLEVENT_DROPDOWN_OPEN:
+ {
+ VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ if ( pList == NULL )
+ {
+ getAccessibleChild ( m_bHasTextChild ? 1 : 0 );
+ pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ }
+ if ( pList != NULL )
+ {
+ pList->ProcessWindowEvent (rVclWindowEvent);
+ pList->HandleDropOpen();
+ }
+ break;
+ }
case VCLEVENT_DROPDOWN_CLOSE:
+ {
+ VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ if ( pList == NULL )
+ {
+ getAccessibleChild ( m_bHasTextChild ? 1 : 0 );
+ pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ }
+ if ( pList != NULL )
+ {
+ pList->ProcessWindowEvent (rVclWindowEvent);
+ }
+ Window* pWindow = GetWindow();
+ if( pWindow && (pWindow->HasFocus() || pWindow->HasChildPathFocus()) )
+ {
+ Any aOldValue, aNewValue;
+ aNewValue <<= AccessibleStateType::FOCUSED;
+ NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
+ }
+ break;
+ }
+ case VCLEVENT_COMBOBOX_SELECT:
+ {
+ VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ if (pList != NULL)
+ {
+ Reference<XAccessibleText> xText (m_xText->getAccessibleContext(), UNO_QUERY);
+ if ( xText.is() )
+ {
+ ::rtl::OUString sText = xText->getSelectedText();
+ if ( !sText.getLength() )
+ sText = xText->getText();
+ pList->UpdateSelection_Acc (sText, m_bIsDropDownBox);
+ //if(m_bIsDropDownBox && !pList->IsInDropDown())
+ if (m_bIsDropDownBox || ( !m_bIsDropDownBox && m_aBoxType==COMBOBOX))
+ NotifyAccessibleEvent(AccessibleEventId::VALUE_CHANGED, Any(), Any());
+
+ Any aOldValue;
+ Any aNewValue;
+ aOldValue <<= AccessibleStateType::INDETERMINATE;
+ NotifyAccessibleEvent(AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue);
+
+ }
+ }
+ break;
+ }
+ //case VCLEVENT_DROPDOWN_OPEN:
+ //case VCLEVENT_DROPDOWN_CLOSE:
case VCLEVENT_LISTBOX_DOUBLECLICK:
case VCLEVENT_LISTBOX_SCROLLED:
- case VCLEVENT_LISTBOX_SELECT:
+ //case VCLEVENT_LISTBOX_SELECT:
case VCLEVENT_LISTBOX_ITEMADDED:
case VCLEVENT_LISTBOX_ITEMREMOVED:
case VCLEVENT_COMBOBOX_ITEMADDED:
@@ -139,7 +226,7 @@ void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEven
break;
}
- case VCLEVENT_COMBOBOX_SELECT:
+ //case VCLEVENT_COMBOBOX_SELECT:
case VCLEVENT_COMBOBOX_DESELECT:
{
// Selection is handled by VCLXAccessibleList which operates on
@@ -163,6 +250,7 @@ void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEven
case VCLEVENT_EDIT_MODIFY:
case VCLEVENT_EDIT_SELECTIONCHANGED:
+ // case VCLEVENT_EDIT_CARETCHANGED:
// Modify/Selection events are handled by the combo box instead of
// directly by the edit field (Why?). Therefore, delegate this
// call to the edit field.
@@ -177,7 +265,30 @@ void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEven
}
}
break;
-
+ /*
+ // MT: Not sending VCLEVENT_LISTBOX_STATEUPDATE, see comment in ListBox::SelectEntryPos
+ case VCLEVENT_LISTBOX_STATEUPDATE:
+ {
+ // Need to update the INDETERMINATE state sometimes
+ if (m_bIsDropDownBox && m_aBoxType==LISTBOX)
+ {
+ sal_Int32 nSelectedEntryCount = 0;
+ ListBox* pListBox = static_cast< ListBox* >( GetWindow() );
+ if (pListBox != NULL && pListBox->GetEntryCount() > 0)
+ {
+ nSelectedEntryCount = pListBox->GetSelectEntryCount();
+ Any aOldValue;
+ Any aNewValue;
+ if ( nSelectedEntryCount == 0)
+ aNewValue <<= AccessibleStateType::INDETERMINATE;
+ else
+ aOldValue <<= AccessibleStateType::INDETERMINATE;
+ NotifyAccessibleEvent(AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue);
+ }
+ }
+ break;
+ }
+ */
default:
VCLXAccessibleComponent::ProcessWindowEvent( rVclWindowEvent );
}
@@ -256,7 +367,11 @@ Reference<XAccessible> SAL_CALL VCLXAccessibleBox::getAccessibleChild (sal_Int32
{
ComboBox* pComboBox = static_cast<ComboBox*>(GetWindow());
if (pComboBox!=NULL && pComboBox->GetSubEdit()!=NULL)
+ //Set the edit's acc name the same as parent
+ {
+ pComboBox->GetSubEdit()->SetAccessibleName(getAccessibleName());
m_xText = pComboBox->GetSubEdit()->GetAccessible();
+ }
}
else if (m_bIsDropDownBox)
m_xText = new VCLXAccessibleTextField (GetVCLXWindow(),this);
@@ -275,7 +390,11 @@ sal_Int16 SAL_CALL VCLXAccessibleBox::getAccessibleRole (void) throw (RuntimeExc
// Return the role <const>COMBO_BOX</const> for both VCL combo boxes and
// VCL list boxes in DropDown-Mode else <const>PANEL</const>.
// This way the Java bridge has not to handle both independently.
- return m_bIsDropDownBox ? AccessibleRole::COMBO_BOX : AccessibleRole::PANEL;
+ //return m_bIsDropDownBox ? AccessibleRole::COMBO_BOX : AccessibleRole::PANEL;
+ if (m_bIsDropDownBox || (!m_bIsDropDownBox && m_aBoxType == COMBOBOX ))
+ return AccessibleRole::COMBO_BOX;
+ else
+ return AccessibleRole::PANEL;
}
sal_Int32 SAL_CALL VCLXAccessibleBox::getAccessibleIndexInParent (void)
@@ -296,7 +415,7 @@ sal_Int32 SAL_CALL VCLXAccessibleBox::getAccessibleActionCount (void)
// There is one action for drop down boxes (toggle popup) and none for
// the other boxes.
- return m_bIsDropDownBox ? 1 : 0;
+ return m_bIsDropDownBox ? 0 : 1;
}
sal_Bool SAL_CALL VCLXAccessibleBox::doAccessibleAction (sal_Int32 nIndex)
@@ -343,7 +462,11 @@ sal_Bool SAL_CALL VCLXAccessibleBox::doAccessibleAction (sal_Int32 nIndex)
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if (nIndex<0 || nIndex>=getAccessibleActionCount())
throw ::com::sun::star::lang::IndexOutOfBoundsException();
- return TK_RES_STRING( RID_STR_ACC_ACTION_TOGGLEPOPUP);
+ //Solution:When combo_box,it should not has action information.
+ //return TK_RES_STRING( RID_STR_ACC_ACTION_TOGGLEPOPUP);
+ if (m_aBoxType == LISTBOX)
+ return ::rtl::OUString();
+ return m_bIsDropDownBox?::rtl::OUString():TK_RES_STRING( RID_STR_ACC_ACTION_TOGGLEPOPUP);
}
Reference< XAccessibleKeyBinding > VCLXAccessibleBox::getAccessibleActionKeyBinding( sal_Int32 nIndex )
@@ -367,3 +490,102 @@ void SAL_CALL VCLXAccessibleBox::disposing (void)
VCLXAccessibleComponent::disposing();
}
+// ===== XAccessibleValue ===============================================
+Any VCLXAccessibleBox::getCurrentValue( )
+ throw( RuntimeException )
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+
+ Any aAny;
+ if( m_xList.is() && m_xText.is())
+ {
+ // VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ Reference<XAccessibleText> xText (m_xText->getAccessibleContext(), UNO_QUERY);
+ if ( xText.is() )
+ {
+ ::rtl::OUString sText = xText->getText();
+ aAny <<= sText;
+ }
+ }
+ if (m_aBoxType == LISTBOX && m_bIsDropDownBox && m_xList.is() )
+ {
+
+ VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ if(pList->IsInDropDown())
+ {
+ if(pList->getSelectedAccessibleChildCount()>0)
+ {
+ Reference<XAccessibleContext> xName (pList->getSelectedAccessibleChild((sal_Int32)(0)), UNO_QUERY);
+ if(xName.is())
+ {
+ aAny <<= xName->getAccessibleName();
+ }
+ }
+ }
+ }
+
+ return aAny;
+}
+
+sal_Bool VCLXAccessibleBox::setCurrentValue( const Any& aNumber )
+ throw( RuntimeException )
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+
+ ::rtl::OUString fValue;
+ sal_Bool bValid = (aNumber >>= fValue);
+ if( bValid )
+ {
+
+ }
+ return bValid;
+
+}
+
+Any VCLXAccessibleBox::getMaximumValue( )
+ throw( RuntimeException )
+{
+ Any aAny;
+ return aAny;
+}
+
+Any VCLXAccessibleBox::getMinimumValue( )
+ throw( RuntimeException )
+{
+ Any aAny;
+ return aAny;
+}
+
+// Set the INDETERMINATE state when there is no selected item for combobox
+void VCLXAccessibleBox::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet )
+{
+ VCLXAccessibleComponent::FillAccessibleStateSet(rStateSet);
+ if (m_aBoxType == COMBOBOX )
+ {
+ ::rtl::OUString sText;
+ sal_Int32 nEntryCount = 0;
+ ComboBox* pComboBox = static_cast<ComboBox*>(GetWindow());
+ if (pComboBox != NULL)
+ {
+ Edit* pSubEdit = pComboBox->GetSubEdit();
+ if ( pSubEdit)
+ sText = pSubEdit->GetText();
+ nEntryCount = pComboBox->GetEntryCount();
+ }
+ if (sText.getLength() == 0 && nEntryCount >0)
+ rStateSet.AddState(AccessibleStateType::INDETERMINATE);
+ }
+ else if (m_aBoxType == LISTBOX && m_bIsDropDownBox == true)
+ {
+ sal_Int32 nSelectedEntryCount = 0;
+ ListBox* pListBox = static_cast< ListBox* >( GetWindow() );
+ if (pListBox != NULL && pListBox->GetEntryCount() > 0)
+ {
+ nSelectedEntryCount = pListBox->GetSelectEntryCount();
+ if ( nSelectedEntryCount == 0)
+ rStateSet.AddState(AccessibleStateType::INDETERMINATE);
+ }
+ }
+}
diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx
index 8b08bef932ab..b8aad65dc52d 100644
--- a/accessibility/source/standard/vclxaccessiblebutton.cxx
+++ b/accessibility/source/standard/vclxaccessiblebutton.cxx
@@ -103,6 +103,16 @@ void VCLXAccessibleButton::FillAccessibleStateSet( utl::AccessibleStateSetHelper
if ( pButton->IsPressed() )
rStateSet.AddState( AccessibleStateType::PRESSED );
+
+ // IA2 CWS: If the button has a poppup menu,it should has the state EXPANDABLE
+ if( pButton->GetType() == WINDOW_MENUBUTTON )
+ {
+ rStateSet.AddState( AccessibleStateType::EXPANDABLE );
+ }
+ if( pButton->GetStyle() & WB_DEFBUTTON )
+ {
+ rStateSet.AddState( AccessibleStateType::DEFAULT );
+ }
}
}
@@ -145,6 +155,13 @@ Sequence< ::rtl::OUString > VCLXAccessibleButton::getSupportedServiceNames() thr
OExternalLockGuard aGuard( this );
::rtl::OUString aName( VCLXAccessibleTextComponent::getAccessibleName() );
+
+ // IA2 CWS: Removed special handling for browse/more buttons.
+ // Comment was "the '...' or '<<' or '>>' should be kepted per the requirements from AT"
+ // MT: We did introduce this special handling by intention.
+ // As the original text is still what you get via XAccessibleText,
+ // I think for the accessible name the stuff below is correct.
+
sal_Int32 nLength = aName.getLength();
if ( nLength >= 3 && aName.matchAsciiL( RTL_CONSTASCII_STRINGPARAM("..."), nLength - 3 ) )
diff --git a/accessibility/source/standard/vclxaccessiblecheckbox.cxx b/accessibility/source/standard/vclxaccessiblecheckbox.cxx
index f324a721cd3d..139a15e31699 100644
--- a/accessibility/source/standard/vclxaccessiblecheckbox.cxx
+++ b/accessibility/source/standard/vclxaccessiblecheckbox.cxx
@@ -238,7 +238,13 @@ sal_Bool VCLXAccessibleCheckBox::doAccessibleAction ( sal_Int32 nIndex ) throw (
if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
throw IndexOutOfBoundsException();
- return ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_CLICK ) );
+ //IAccessibility2 Implementation 2009-----
+ // return ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_CLICK ) );
+ //-----IAccessibility2 Implementation 2009
+ if(IsChecked())
+ return ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_UNCHECK ) );
+ else
+ return ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_CHECK ) );
}
// -----------------------------------------------------------------------------
diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx
index e48b3a141e77..624923f7009b 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -36,6 +36,12 @@
#include <vcl/lstbox.hxx>
#include <toolkit/helper/convert.hxx>
+#ifndef _UTL_ACCESSIBLERELATIONSETHELPER_HXX_
+#include <unotools/accessiblerelationsethelper.hxx>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLERELATIONTYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#endif
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -65,6 +71,7 @@ VCLXAccessibleList::VCLXAccessibleList (VCLXWindow* pVCLWindow, BoxType aBoxType
m_nLastSelectedPos ( LISTBOX_ENTRY_NOTFOUND ),
m_bDisableProcessEvent ( false ),
m_bVisible ( true ),
+ m_nCurSelectedPos ( LISTBOX_ENTRY_NOTFOUND ),
m_xParent ( _xParent )
{
// Because combo boxes and list boxes have the no common interface for
@@ -89,6 +96,7 @@ VCLXAccessibleList::VCLXAccessibleList (VCLXWindow* pVCLWindow, BoxType aBoxType
}
}
UpdateVisibleLineCount();
+ m_nCurSelectedPos=m_pListBoxHelper->GetSelectEntryPos();
sal_uInt16 nCount = static_cast<sal_uInt16>(getAccessibleChildCount());
m_aAccessibleChildren.reserve(nCount);
@@ -188,6 +196,218 @@ void VCLXAccessibleList::notifyVisibleStates(sal_Bool _bSetNew )
}
}
// -----------------------------------------------------------------------------
+void VCLXAccessibleList::UpdateSelection_Acc (::rtl::OUString sTextOfSelectedItem, bool b_IsDropDownList)
+{
+ if ( m_aBoxType == COMBOBOX )
+ {
+ ComboBox* pBox = static_cast<ComboBox*>(GetWindow());
+ if ( pBox != NULL )
+ {
+ // Find the index of the selected item inside the VCL control...
+ sal_uInt16 nIndex = pBox->GetEntryPos (XubString(sTextOfSelectedItem));
+ // ...and then find the associated accessibility object.
+ if ( nIndex == LISTBOX_ENTRY_NOTFOUND )
+ nIndex = 0;
+ UpdateSelection_Impl_Acc(b_IsDropDownList);
+ }
+ }
+}
+
+// -----------------------------------------------------------------------------
+void VCLXAccessibleList::UpdateSelection_Impl_Acc(bool b_IsDropDownList)
+{
+ uno::Any aOldValue, aNewValue;
+ VCLXAccessibleListItem* pCurItem =NULL;
+
+ {
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+ Reference< XAccessible > xNewAcc;
+ if ( m_pListBoxHelper )
+ {
+ sal_uInt16 i=0;
+ m_nCurSelectedPos = LISTBOX_ENTRY_NOTFOUND;
+ for ( ListItems::iterator aIter = m_aAccessibleChildren.begin();
+ aIter != m_aAccessibleChildren.end(); ++aIter,++i)
+ {
+ Reference< XAccessible > xHold = *aIter;
+ if ( xHold.is() )
+ {
+ VCLXAccessibleListItem* pItem = static_cast< VCLXAccessibleListItem* >( xHold.get() );
+ // Retrieve the item's index from the list entry.
+ sal_Bool bNowSelected = m_pListBoxHelper->IsEntryPosSelected (i);
+ if (bNowSelected)
+ m_nCurSelectedPos = i;
+
+ if ( bNowSelected && !pItem->IsSelected() )
+ {
+ xNewAcc = *aIter;
+ aNewValue <<= xNewAcc;
+
+ pCurItem = pItem;
+
+ }
+ else if ( pItem->IsSelected() )
+ m_nLastSelectedPos = i;
+
+ pItem->SetSelected( bNowSelected );
+ }
+ else
+ { // it could happen that a child was not created before
+ checkEntrySelected(i,aNewValue,xNewAcc);
+ }
+ }
+ sal_uInt16 nCount = m_pListBoxHelper->GetEntryCount();
+ if ( i < nCount ) // here we have to check the if any other listbox entry is selected
+ {
+ for (; i < nCount && !checkEntrySelected(i,aNewValue,xNewAcc) ;++i )
+ ;
+ }
+ if ( xNewAcc.is() && GetWindow()->HasFocus() )
+ {
+ if ( m_nLastSelectedPos != LISTBOX_ENTRY_NOTFOUND )
+ aOldValue <<= getAccessibleChild( (sal_Int32)m_nLastSelectedPos );
+ aNewValue <<= xNewAcc;
+ }
+ }
+ }
+ if (m_aBoxType == COMBOBOX && b_IsDropDownList)
+ {
+ //VCLXAccessibleDropDownComboBox
+ //when in list is dropped down, xText = NULL
+ if (m_pListBoxHelper->IsInDropDown())
+ {
+ if ( aNewValue.hasValue() || aOldValue.hasValue() )
+ {
+ NotifyAccessibleEvent(
+ AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
+ aOldValue,
+ aNewValue );
+
+ NotifyListItem(aNewValue);
+
+ }
+ }
+ }
+ else if (m_aBoxType == COMBOBOX && !b_IsDropDownList)
+ {
+ //VCLXAccessibleComboBox
+ NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, uno::Any(), uno::Any() );
+ }
+ else if (m_aBoxType == LISTBOX && b_IsDropDownList)
+ {
+ //VCLXAccessibleDropdownListBox
+ //when in list is dropped down, xText = NULL
+ if (m_pListBoxHelper->IsInDropDown())
+ {
+ if ( aNewValue.hasValue() || aOldValue.hasValue() )
+ {
+ NotifyAccessibleEvent(
+ AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
+ aOldValue,
+ aNewValue );
+
+ NotifyListItem(aNewValue);
+ }
+ }
+ }
+ else if (m_aBoxType == LISTBOX && !b_IsDropDownList)
+ {
+ //VCLXAccessibleListBox, xText = NULL.
+
+
+ if ( aNewValue.hasValue())
+ {
+ NotifyListItem(aNewValue);
+ }
+ }
+}
+void VCLXAccessibleList::NotifyListItem(::com::sun::star::uno::Any& val)
+{
+ Reference< XAccessible > xCurItem;
+ val >>= xCurItem;
+ if (xCurItem.is())
+ {
+ VCLXAccessibleListItem* pCurItem = static_cast< VCLXAccessibleListItem* >(xCurItem.get());
+ if (pCurItem)
+ {
+ pCurItem->NotifyAccessibleEvent(AccessibleEventId::SELECTION_CHANGED,Any(),Any());
+ }
+ }
+}
+
+
+void VCLXAccessibleList::UpdateFocus_Impl_Acc (sal_uInt16 nPos ,bool b_IsDropDownList)
+{
+ if (!(m_aBoxType == LISTBOX && !b_IsDropDownList))
+ {
+ return ;
+ }
+ Reference<XAccessible> xChild= CreateChild(nPos);
+ if ( !xChild.is() )
+ {
+ return ;
+ }
+ m_nCurSelectedPos = nPos;
+ uno::Any aOldValue, aNewValue;
+ aNewValue <<= xChild;
+
+ NotifyAccessibleEvent(
+ AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
+ aOldValue,
+ aNewValue );
+}
+
+// -----------------------------------------------------------------------------
+void VCLXAccessibleList::ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent, bool b_IsDropDownList)
+{
+ switch ( rVclWindowEvent.GetId() )
+ {
+ case VCLEVENT_LISTBOX_SELECT:
+ if ( !m_bDisableProcessEvent )
+ UpdateSelection_Impl_Acc(b_IsDropDownList);
+ break;
+ case VCLEVENT_LISTBOX_FOCUSITEMCHANGED:
+ if ( !m_bDisableProcessEvent )
+ UpdateFocus_Impl_Acc((sal_uInt16)reinterpret_cast<sal_uIntPtr>(rVclWindowEvent.GetData()),b_IsDropDownList);
+ break;
+ case VCLEVENT_WINDOW_GETFOCUS:
+ break;
+ case VCLEVENT_CONTROL_GETFOCUS:
+ {
+ VCLXAccessibleComponent::ProcessWindowEvent (rVclWindowEvent);
+ if (m_aBoxType == COMBOBOX && b_IsDropDownList)
+ {
+ //VCLXAccessibleDropDownComboBox
+ }
+ else if (m_aBoxType == LISTBOX && b_IsDropDownList)
+ {
+ }
+ else if ( m_aBoxType == LISTBOX && !b_IsDropDownList)
+ {
+ if ( m_pListBoxHelper )
+ {
+ uno::Any aOldValue,
+ aNewValue;
+ sal_uInt16 nPos = m_nCurSelectedPos; //m_pListBoxHelper->GetSelectEntryPos();
+
+ if ( nPos == LISTBOX_ENTRY_NOTFOUND )
+ nPos = m_pListBoxHelper->GetTopEntry();
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND )
+ aNewValue <<= CreateChild(nPos);
+ NotifyAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
+ aOldValue,
+ aNewValue );
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+
+}
+// -----------------------------------------------------------------------------
void VCLXAccessibleList::ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent)
{
// Create a reference to this object to prevent an early release of the
@@ -206,11 +426,13 @@ void VCLXAccessibleList::ProcessWindowEvent (const VclWindowEvent& rVclWindowEve
case VCLEVENT_COMBOBOX_SCROLLED:
UpdateEntryRange_Impl();
break;
-
+ // IAccessible2 implementation, 2009
+ /*
case VCLEVENT_LISTBOX_SELECT:
if ( !m_bDisableProcessEvent )
UpdateSelection_Impl();
break;
+ */
// The selection events VCLEVENT_COMBOBOX_SELECT and
// VCLEVENT_COMBOBOX_DESELECT are not handled here because here we
// have no access to the edit field. Its text is necessary to
@@ -236,20 +458,29 @@ void VCLXAccessibleList::ProcessWindowEvent (const VclWindowEvent& rVclWindowEve
rVclWindowEvent.GetData()));
break;
case VCLEVENT_CONTROL_GETFOCUS:
- VCLXAccessibleComponent::ProcessWindowEvent (rVclWindowEvent);
- if ( m_pListBoxHelper )
{
- uno::Any aOldValue,
- aNewValue;
- sal_uInt16 nPos = m_pListBoxHelper->GetSelectEntryPos();
- if ( nPos == LISTBOX_ENTRY_NOTFOUND )
- nPos = m_pListBoxHelper->GetTopEntry();
- if ( nPos != LISTBOX_ENTRY_NOTFOUND )
- aNewValue <<= CreateChild(nPos);
-
- NotifyAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
- aOldValue,
- aNewValue );
+ VCLXAccessibleComponent::ProcessWindowEvent (rVclWindowEvent);
+ // Added by IBM Symphony Acc team to handle the list item focus when List control get focus
+ sal_Bool b_IsDropDownList = sal_True;
+ if (m_pListBoxHelper)
+ b_IsDropDownList = ((m_pListBoxHelper->GetStyle() & WB_DROPDOWN ) == WB_DROPDOWN);
+ if ( m_aBoxType == LISTBOX && !b_IsDropDownList )
+ {
+ if ( m_pListBoxHelper )
+ {
+ uno::Any aOldValue,
+ aNewValue;
+ sal_uInt16 nPos = m_nCurSelectedPos;
+
+ if ( nPos == LISTBOX_ENTRY_NOTFOUND )
+ nPos = m_pListBoxHelper->GetTopEntry();
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND )
+ aNewValue <<= CreateChild(nPos);
+ NotifyAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
+ aOldValue,
+ aNewValue );
+ }
+ }
}
break;
@@ -257,6 +488,24 @@ void VCLXAccessibleList::ProcessWindowEvent (const VclWindowEvent& rVclWindowEve
VCLXAccessibleComponent::ProcessWindowEvent (rVclWindowEvent);
}
}
+
+ void VCLXAccessibleList::FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet )
+{
+ ListBox* pBox = static_cast<ListBox*>(GetWindow());
+ if( m_aBoxType == LISTBOX )
+ {
+ if (m_pListBoxHelper && (m_pListBoxHelper->GetStyle() & WB_DROPDOWN ) != WB_DROPDOWN)
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = pBox->GetAccessible();
+ rRelationSet.AddRelation( com::sun::star::accessibility::AccessibleRelation( com::sun::star::accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
+ }
+ }
+ else
+ {
+ VCLXAccessibleComponent::FillAccessibleRelationSet(rRelationSet);
+ }
+}
// -----------------------------------------------------------------------------
/** To find out which item is currently selected and to update the SELECTED
@@ -315,9 +564,12 @@ Reference<XAccessible> VCLXAccessibleList::CreateChild (sal_Int32 i)
// check if position is empty and can be used else we have to adjust all entries behind this
if ( xChild.is() )
{
+ // IAccessible2 implementation, 2009
+ /*
ListItems::iterator aIter = m_aAccessibleChildren.begin() + nPos;
::std::mem_fun_t<bool, VCLXAccessibleListItem> aTemp(&VCLXAccessibleListItem::IncrementIndexInParent);
adjustEntriesIndexInParent( aIter, aTemp);
+ */
}
else
{
@@ -332,6 +584,9 @@ Reference<XAccessible> VCLXAccessibleList::CreateChild (sal_Int32 i)
sal_Bool bNowSelected = sal_False;
if ( m_pListBoxHelper )
bNowSelected = m_pListBoxHelper->IsEntryPosSelected ((sal_uInt16)i);
+ // IAccessible2 implementation 2009
+ if (bNowSelected)
+ m_nCurSelectedPos = sal_uInt16(i);
VCLXAccessibleListItem* pItem = static_cast< VCLXAccessibleListItem* >(xChild.get());
pItem->SetSelected( bNowSelected );
@@ -350,6 +605,8 @@ Reference<XAccessible> VCLXAccessibleList::CreateChild (sal_Int32 i)
void VCLXAccessibleList::HandleChangedItemList (bool bItemInserted, sal_Int32 nIndex)
{
+ // IAccessible2 implementation 2009
+ /*
if ( !bItemInserted )
{
if ( nIndex == -1 ) // special handling here
@@ -368,7 +625,8 @@ void VCLXAccessibleList::HandleChangedItemList (bool bItemInserted, sal_Int32 nI
}
else
getAccessibleChild(nIndex);
-
+ */
+ clearItems();
NotifyAccessibleEvent (
AccessibleEventId::INVALIDATE_ALL_CHILDREN,
Any(), Any());
@@ -415,7 +673,7 @@ Reference<XAccessible> SAL_CALL VCLXAccessibleList::getAccessibleChild (sal_Int3
Reference< XAccessible > xChild;
// search for the child
- if ( static_cast<sal_uInt16>(i) >= m_aAccessibleChildren.size() )
+ if ( i >= static_cast<sal_Int32>(m_aAccessibleChildren.size()) )
xChild = CreateChild (i);
else
{
@@ -600,6 +858,7 @@ void VCLXAccessibleList::UpdateSelection_Impl(sal_uInt16)
if ( m_pListBoxHelper )
{
sal_uInt16 i=0;
+ m_nCurSelectedPos = LISTBOX_ENTRY_NOTFOUND;
for ( ListItems::iterator aIter = m_aAccessibleChildren.begin();
aIter != m_aAccessibleChildren.end(); ++aIter,++i)
{
@@ -609,6 +868,8 @@ void VCLXAccessibleList::UpdateSelection_Impl(sal_uInt16)
VCLXAccessibleListItem* pItem = static_cast< VCLXAccessibleListItem* >( xHold.get() );
// Retrieve the item's index from the list entry.
sal_Bool bNowSelected = m_pListBoxHelper->IsEntryPosSelected (i);
+ if (bNowSelected)
+ m_nCurSelectedPos = i;
if ( bNowSelected && !pItem->IsSelected() )
{
@@ -639,14 +900,19 @@ void VCLXAccessibleList::UpdateSelection_Impl(sal_uInt16)
}
}
}
-
- if ( aNewValue.hasValue() || aOldValue.hasValue() )
- NotifyAccessibleEvent(
- AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
- aOldValue,
- aNewValue );
-
- NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
+ if (!m_pListBoxHelper->IsInDropDown())
+ {
+ }
+ else
+ {
+ if ( aNewValue.hasValue() || aOldValue.hasValue() )
+ NotifyAccessibleEvent(
+ AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
+ aOldValue,
+ aNewValue );
+ //the SELECTION_CHANGED is not necessary
+ //NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
+ }
}
// -----------------------------------------------------------------------------
@@ -808,10 +1074,12 @@ awt::Rectangle VCLXAccessibleList::implGetBounds() throw (uno::RuntimeException)
if ( pBox )
{
Size aSize = pBox->GetSubEdit()->GetSizePixel();
- aBounds.X += aSize.Height();
- aBounds.Y += aSize.Width();
+ // IAccessible2 implementation, 2009
+ //aBounds.X += aSize.Height();
+ //aBounds.Y += aSize.Width();
+ aBounds.Y += aSize.Height();
aBounds.Height -= aSize.Height();
- aBounds.Width -= aSize.Width();
+ //aBounds.Width -= aSize.Width();
}
}
}
@@ -839,12 +1107,33 @@ awt::Point VCLXAccessibleList::getLocationOnScreen( ) throw (uno::RuntimeExcept
ComboBox* pBox = static_cast<ComboBox*>(GetWindow());
if ( pBox )
{
- aPos.X += pBox->GetSubEdit()->GetSizePixel().Height();
- aPos.Y += pBox->GetSubEdit()->GetSizePixel().Width();
+ //aPos.X += pBox->GetSubEdit()->GetSizePixel().Height();
+ //aPos.Y += pBox->GetSubEdit()->GetSizePixel().Width();
+ aPos.Y += pBox->GetSubEdit()->GetSizePixel().Height();
}
}
}
return aPos;
}
// -----------------------------------------------------------------------------
-
+sal_Bool VCLXAccessibleList::IsInDropDown()
+{
+ return m_pListBoxHelper->IsInDropDown();
+}
+// -----------------------------------------------------------------------------
+void VCLXAccessibleList::HandleDropOpen()
+{
+ if ( !m_bDisableProcessEvent )
+ UpdateSelection_Impl();
+ if (m_nCurSelectedPos != LISTBOX_ENTRY_NOTFOUND &&
+ m_nLastSelectedPos != LISTBOX_ENTRY_NOTFOUND)
+ {
+ Reference< XAccessible > xChild = getAccessibleChild(m_nCurSelectedPos);
+ if(xChild.is())
+ {
+ uno::Any aNewValue;
+ aNewValue <<= xChild;
+ NotifyAccessibleEvent(AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, uno::Any(), aNewValue );
+ }
+ }
+}
diff --git a/accessibility/source/standard/vclxaccessiblelistitem.cxx b/accessibility/source/standard/vclxaccessiblelistitem.cxx
index d20f03910bfd..9c3351126bb9 100644
--- a/accessibility/source/standard/vclxaccessiblelistitem.cxx
+++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx
@@ -317,9 +317,15 @@ Reference< XAccessibleStateSet > SAL_CALL VCLXAccessibleListItem::getAccessibleS
if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
{
pStateSetHelper->AddState( AccessibleStateType::TRANSIENT );
- pStateSetHelper->AddState( AccessibleStateType::SELECTABLE );
- pStateSetHelper->AddState( AccessibleStateType::ENABLED );
- pStateSetHelper->AddState( AccessibleStateType::SENSITIVE );
+
+ // IAccessible2 implementation, 2009
+ if(m_pListBoxHelper->IsEnabled())
+ {
+ pStateSetHelper->AddState( AccessibleStateType::SELECTABLE );
+ pStateSetHelper->AddState( AccessibleStateType::ENABLED );
+ pStateSetHelper->AddState( AccessibleStateType::SENSITIVE );
+ }
+
if ( m_bSelected )
pStateSetHelper->AddState( AccessibleStateType::SELECTED );
if ( m_bVisible )
diff --git a/accessibility/source/standard/vclxaccessiblemenu.cxx b/accessibility/source/standard/vclxaccessiblemenu.cxx
index 45e860118d74..9ee230f5758c 100644
--- a/accessibility/source/standard/vclxaccessiblemenu.cxx
+++ b/accessibility/source/standard/vclxaccessiblemenu.cxx
@@ -249,3 +249,14 @@ void VCLXAccessibleMenu::deselectAccessibleChild( sal_Int32 nChildIndex ) throw
}
// -----------------------------------------------------------------------------
+
+::rtl::OUString VCLXAccessibleMenu::getAccessibleActionDescription ( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ throw IndexOutOfBoundsException();
+
+ return ::rtl::OUString( );
+}
+
diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx b/accessibility/source/standard/vclxaccessiblemenuitem.cxx
index ac1bc4af924c..e8bc42e834e6 100644
--- a/accessibility/source/standard/vclxaccessiblemenuitem.cxx
+++ b/accessibility/source/standard/vclxaccessiblemenuitem.cxx
@@ -191,8 +191,19 @@ Sequence< ::rtl::OUString > VCLXAccessibleMenuItem::getSupportedServiceNames() t
sal_Int16 VCLXAccessibleMenuItem::getAccessibleRole( ) throw (RuntimeException)
{
OExternalLockGuard aGuard( this );
-
- return AccessibleRole::MENU_ITEM;
+ // IA2 CWS. MT: We had the aditional roles in UAA for ever, but never used them anywhere.
+ // Looks reasonable, but need to verify in Orca and VoiceOver.
+ sal_Int16 nRole = AccessibleRole::MENU_ITEM;
+ if ( m_pParent )
+ {
+ sal_uInt16 nItemId = m_pParent->GetItemId( m_nItemPos );
+ MenuItemBits nItemBits = m_pParent->GetItemBits(nItemId);
+ if( nItemBits & MIB_RADIOCHECK)
+ nRole = AccessibleRole::RADIO_MENU_ITEM;
+ else if( nItemBits & MIB_CHECKABLE)
+ nRole = AccessibleRole::CHECK_MENU_ITEM;
+ }
+ return nRole;
}
// -----------------------------------------------------------------------------
@@ -454,8 +465,9 @@ sal_Bool VCLXAccessibleMenuItem::doAccessibleAction ( sal_Int32 nIndex ) throw (
if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
throw IndexOutOfBoundsException();
-
- return ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_CLICK ) );
+ //IAccessibility2 Impplementaton 2009-----
+ return ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_SELECT ) );
+ //-----IAccessibility2 Impplementaton 2009
}
// -----------------------------------------------------------------------------
diff --git a/accessibility/source/standard/vclxaccessibleradiobutton.cxx b/accessibility/source/standard/vclxaccessibleradiobutton.cxx
index 1fe1f2423bf2..5c411797f3ed 100644
--- a/accessibility/source/standard/vclxaccessibleradiobutton.cxx
+++ b/accessibility/source/standard/vclxaccessibleradiobutton.cxx
@@ -197,8 +197,7 @@ sal_Bool VCLXAccessibleRadioButton::doAccessibleAction ( sal_Int32 nIndex ) thro
if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
throw IndexOutOfBoundsException();
-
- return ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_CLICK ) );
+ return ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_SELECT ) );
}
// -----------------------------------------------------------------------------
diff --git a/accessibility/source/standard/vclxaccessiblescrollbar.cxx b/accessibility/source/standard/vclxaccessiblescrollbar.cxx
index 021a603c4757..8384a1f9e0ec 100644
--- a/accessibility/source/standard/vclxaccessiblescrollbar.cxx
+++ b/accessibility/source/standard/vclxaccessiblescrollbar.cxx
@@ -88,7 +88,8 @@ void VCLXAccessibleScrollBar::FillAccessibleStateSet( utl::AccessibleStateSetHel
VCLXScrollBar* pVCLXScrollBar = static_cast< VCLXScrollBar* >( GetVCLXWindow() );
if ( pVCLXScrollBar )
{
- rStateSet.AddState( AccessibleStateType::FOCUSABLE );
+ // IA2 CWS: scroll bar should not have FOCUSABLE state.
+ // rStateSet.AddState( AccessibleStateType::FOCUSABLE );
if ( pVCLXScrollBar->getOrientation() == ScrollBarOrientation::HORIZONTAL )
rStateSet.AddState( AccessibleStateType::HORIZONTAL );
else if ( pVCLXScrollBar->getOrientation() == ScrollBarOrientation::VERTICAL )
@@ -274,3 +275,21 @@ Any VCLXAccessibleScrollBar::getMinimumValue( ) throw (RuntimeException)
}
// -----------------------------------------------------------------------------
+
+// IAccessible2 implementation, 2009
+::rtl::OUString VCLXAccessibleScrollBar::getAccessibleName( ) throw (uno::RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ ::rtl::OUString aName;
+ VCLXScrollBar* pVCLXScrollBar = static_cast< VCLXScrollBar* >( GetVCLXWindow() );
+ if ( pVCLXScrollBar )
+ {
+ if ( pVCLXScrollBar->getOrientation() == ScrollBarOrientation::HORIZONTAL )
+ aName = TK_RES_STRING( RID_STR_ACC_SCROLLBAR_NAME_HORIZONTAL );
+ else if ( pVCLXScrollBar->getOrientation() == ScrollBarOrientation::VERTICAL )
+ aName = TK_RES_STRING( RID_STR_ACC_SCROLLBAR_NAME_VERTICAL );
+ }
+ return aName;
+}
+
diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
index c8671e371e1e..1718a137ba67 100644
--- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx
+++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
@@ -81,7 +81,8 @@ void VCLXAccessibleTabControl::UpdateFocused()
void VCLXAccessibleTabControl::UpdateSelected( sal_Int32 i, bool bSelected )
{
- NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
+ // IAccessible2 implementation, 2009
+ //NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
if ( i >= 0 && i < (sal_Int32)m_aAccessibleChildren.size() )
{
diff --git a/accessibility/source/standard/vclxaccessibletextcomponent.cxx b/accessibility/source/standard/vclxaccessibletextcomponent.cxx
index 71ad6ebe472e..2d185dbf6626 100644
--- a/accessibility/source/standard/vclxaccessibletextcomponent.cxx
+++ b/accessibility/source/standard/vclxaccessibletextcomponent.cxx
@@ -190,9 +190,61 @@ Sequence< PropertyValue > VCLXAccessibleTextComponent::getCharacterAttributes( s
if ( GetWindow() )
{
Font aFont = GetWindow()->GetControlFont();
+
sal_Int32 nBackColor = GetWindow()->GetControlBackground().GetColor();
sal_Int32 nColor = GetWindow()->GetControlForeground().GetColor();
+
+ // MT: Code with default font was introduced with the IA2 CWS, but I am not convinced that this is the correct font...
+ // Decide what to do when we have a concrete issue.
+ /*
+ Font aDefaultVCLFont;
+ OutputDevice* pDev = Application::GetDefaultDevice();
+ if ( pDev )
+ {
+ aDefaultVCLFont = pDev->GetSettings().GetStyleSettings().GetAppFont();
+ if ( !aFont.GetName().Len() )
+ {
+ String aDefaultName = aDefaultVCLFont.GetName();
+ aFont.SetName( aDefaultName );
+ }
+ if ( !aFont.GetHeight() )
+ {
+ aFont.SetHeight( aDefaultVCLFont.GetHeight() );
+ }
+ if ( aFont.GetWeight() == WEIGHT_DONTKNOW )
+ {
+ aFont.SetWeight( aDefaultVCLFont.GetWeight() );
+ }
+
+ //if nColor is -1, it may indicate that the default color black is using.
+ if ( nColor == -1)
+ {
+ nColor = aDefaultVCLFont.GetColor().GetColor();
+ }
+ }
+ */
+
+ // MT: Adjustment stuff was introduced with the IA2 CWS, but adjustment is not a character attribute...
+ // In case we reintroduce it, use adjustment as extra parameter for the CharacterAttributesHelper...
+ /*
+ WinBits aBits = GetWindow()->GetStyle();
+ sal_Int16 nAdjust = -1;
+ if ( aBits & WB_LEFT )
+ {
+ nAdjust = style::ParagraphAdjust_LEFT;
+ }
+ else if ( aBits & WB_RIGHT )
+ {
+ nAdjust = style::ParagraphAdjust_RIGHT;
+ }
+ else if ( aBits & WB_CENTER )
+ {
+ nAdjust = style::ParagraphAdjust_CENTER;
+ }
+ */
+
::std::auto_ptr< CharacterAttributesHelper > pHelper( new CharacterAttributesHelper( aFont, nBackColor, nColor ) );
+
aValues = pHelper->GetCharacterAttributes( aRequestedAttributes );
}
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index a58163c818a6..e4cebc53f461 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -208,7 +208,7 @@ VCLXAccessibleToolBoxItem* VCLXAccessibleToolBox::GetItem_Impl( sal_Int32 _nPos,
{
ToolBoxItemsMap::iterator aIter = m_aAccessibleChildren.find( _nPos );
// returns only toolbox buttons, not windows
- if ( aIter != m_aAccessibleChildren.end() && !aIter->second.is())
+ if ( aIter != m_aAccessibleChildren.end() && aIter->second.is())
pItem = static_cast< VCLXAccessibleToolBoxItem* >( aIter->second.get() );
}
@@ -284,11 +284,14 @@ void VCLXAccessibleToolBox::ReleaseFocus_Impl( sal_Int32 _nPos )
}
}
// -----------------------------------------------------------------------------
-void VCLXAccessibleToolBox::UpdateChecked_Impl( sal_Int32 )
+void VCLXAccessibleToolBox::UpdateChecked_Impl( sal_Int32 _nPos )
{
ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
if ( pToolBox )
{
+ sal_uInt16 nFocusId = pToolBox->GetItemId( (sal_uInt16)_nPos );
+ VCLXAccessibleToolBoxItem* pFocusItem = NULL;
+
for ( ToolBoxItemsMap::iterator aIter = m_aAccessibleChildren.begin();
aIter != m_aAccessibleChildren.end(); ++aIter )
{
@@ -297,7 +300,12 @@ void VCLXAccessibleToolBox::UpdateChecked_Impl( sal_Int32 )
VCLXAccessibleToolBoxItem* pItem =
static_cast< VCLXAccessibleToolBoxItem* >( aIter->second.get() );
pItem->SetChecked( pToolBox->IsItemChecked( nItemId ) );
+ if ( nItemId == nFocusId )
+ pFocusItem = pItem;
}
+ //Solution:If the position is not a child item,the focus should not be called
+ if ( pFocusItem && (sal_uInt16)_nPos != TOOLBOX_ITEM_NOTFOUND )
+ pFocusItem->SetFocus( sal_True );
}
}
// -----------------------------------------------------------------------------
@@ -535,23 +543,41 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const VclWindowEvent& rVclWindow
// to prevent an early release of the toolbox (VCLEVENT_OBJECT_DYING)
Reference< XAccessibleContext > xTemp = this;
+ ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
switch ( rVclWindowEvent.GetId() )
{
case VCLEVENT_TOOLBOX_CLICK:
+ case VCLEVENT_TOOLBOX_SELECT:
{
if ( rVclWindowEvent.GetData() )
{
UpdateChecked_Impl( (sal_Int32)(sal_IntPtr)rVclWindowEvent.GetData() );
UpdateIndeterminate_Impl( (sal_Int32)(sal_IntPtr)rVclWindowEvent.GetData() );
}
+ else if( pToolBox->GetItemPos(pToolBox->GetCurItemId()) != TOOLBOX_ITEM_NOTFOUND )
+ {
+ UpdateChecked_Impl( pToolBox->GetItemPos(pToolBox->GetCurItemId()) );
+ UpdateIndeterminate_Impl( pToolBox->GetItemPos(pToolBox->GetCurItemId()) );
+ }
break;
}
case VCLEVENT_TOOLBOX_DOUBLECLICK:
case VCLEVENT_TOOLBOX_ACTIVATE:
case VCLEVENT_TOOLBOX_DEACTIVATE:
- case VCLEVENT_TOOLBOX_SELECT:
+ //case VCLEVENT_TOOLBOX_SELECT:
break;
-
+ // IA2 CWS. MT: Still using VCLEVENT_TOOLBOX_CLICK, see comment in vcl/source/window/toolbox2.cxx
+ /*
+ case VCLEVENT_TOOLBOX_ITEMUPDATED:
+ {
+ if ( rVclWindowEvent.GetData() )
+ {
+ UpdateChecked_Impl( TOOLBOX_ITEM_NOTFOUND );
+ UpdateIndeterminate_Impl( (sal_Int32)rVclWindowEvent.GetData() );
+ }
+ break;
+ }
+ */
case VCLEVENT_TOOLBOX_HIGHLIGHT:
UpdateFocus_Impl();
break;
diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
index 40215e9157fc..759afe1bc73a 100644
--- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
@@ -97,6 +97,10 @@ VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_In
else if (( ( nBits & TIB_CHECKABLE ) == TIB_CHECKABLE ) ||
( ( nBits & TIB_AUTOCHECK ) == TIB_AUTOCHECK ) )
m_nRole = AccessibleRole::TOGGLE_BUTTON;
+ else if ( (nBits & TIB_DROPDOWN) == TIB_DROPDOWN )
+ {
+ m_nRole = AccessibleRole::BUTTON_DROPDOWN;
+ }
else if ( m_pToolBox->GetItemWindow( m_nItemId ) )
m_nRole = AccessibleRole::PANEL;
break;
@@ -144,6 +148,18 @@ VCLXAccessibleToolBoxItem::~VCLXAccessibleToolBoxItem()
// sRet += String( RTL_CONSTASCII_USTRINGPARAM( " " ) );
// sRet += sWinText;
// }
+ if ( sRet.getLength() == 0 )
+ {
+ Window* pItemWindow = m_pToolBox->GetItemWindow( m_nItemId );
+ if ( m_nRole == AccessibleRole::PANEL && pItemWindow && pItemWindow->GetAccessible().is() &&
+ pItemWindow->GetAccessible()->getAccessibleContext().is() )
+ {
+ ::rtl::OUString sWinText = pItemWindow->GetAccessible()->getAccessibleContext()->getAccessibleName();
+ if ( sWinText.getLength() > 0 )
+ sRet = sWinText;
+ }
+ }
+
}
return sRet;
}
@@ -165,6 +181,8 @@ void VCLXAccessibleToolBoxItem::SetFocus( sal_Bool _bFocus )
// -----------------------------------------------------------------------------
void VCLXAccessibleToolBoxItem::SetChecked( sal_Bool _bCheck )
{
+ if( m_nRole == AccessibleRole::PANEL)
+ return;
if ( m_bIsChecked != _bCheck )
{
Any aOldValue;
@@ -370,11 +388,19 @@ sal_Int16 SAL_CALL VCLXAccessibleToolBoxItem::getAccessibleRole( ) throw (Runti
{
OExternalLockGuard aGuard( this );
- ::rtl::OUString sDescription;
- if ( m_pToolBox )
+
+ if(m_nRole == AccessibleRole::PANEL && getAccessibleChildCount() > 0 )
+ {
+ return ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_PANEL_DESCRIPTION ) );
+ }
+ else
+ {
+ ::rtl::OUString sDescription;
+ if ( m_pToolBox )
sDescription = m_pToolBox->GetHelpText( m_nItemId );
- return sDescription;
+ return sDescription;
+ }
}
// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL VCLXAccessibleToolBoxItem::getAccessibleName( ) throw (RuntimeException)
@@ -404,11 +430,11 @@ Reference< XAccessibleStateSet > SAL_CALL VCLXAccessibleToolBoxItem::getAccessib
if ( m_pToolBox && !rBHelper.bDisposed && !rBHelper.bInDispose )
{
pStateSetHelper->AddState( AccessibleStateType::FOCUSABLE );
- if ( m_bIsChecked )
+ if ( m_bIsChecked && m_nRole != AccessibleRole::PANEL )
pStateSetHelper->AddState( AccessibleStateType::CHECKED );
if ( m_bIndeterminate )
pStateSetHelper->AddState( AccessibleStateType::INDETERMINATE );
- if ( m_pToolBox->IsItemEnabled( m_nItemId ) )
+ if ( m_pToolBox->IsEnabled() && m_pToolBox->IsItemEnabled( m_nItemId ) )
{
pStateSetHelper->AddState( AccessibleStateType::ENABLED );
pStateSetHelper->AddState( AccessibleStateType::SENSITIVE );
@@ -674,6 +700,8 @@ Any VCLXAccessibleToolBoxItem::getCurrentValue( ) throw (RuntimeException)
if ( m_pToolBox )
aValue <<= (sal_Int32)m_pToolBox->IsItemChecked( m_nItemId );
+ if( m_nRole == AccessibleRole::PANEL )
+ aValue <<= (sal_Int32)0;
return aValue;
}
// -----------------------------------------------------------------------------
diff --git a/autodoc/source/ary/cpp/namechain.cxx b/autodoc/source/ary/cpp/namechain.cxx
index 9a8df2e21331..549a5c82c930 100644
--- a/autodoc/source/ary/cpp/namechain.cxx
+++ b/autodoc/source/ary/cpp/namechain.cxx
@@ -129,7 +129,7 @@ NameChain::Add_Segment( const char * i_sSeg )
List_TplParameter &
NameChain::Templatize_LastSegment()
{
- csv_assert( aSegments.size() > 0 );
+ csv_assert( ! aSegments.empty() );
return aSegments.back().AddTemplate();
}
@@ -158,7 +158,7 @@ NameChain::Compare( const NameChain & i_rChain ) const
const String &
NameChain::LastSegment() const
{
- if ( aSegments.size() > 0 )
+ if ( ! aSegments.empty() )
return aSegments.back().Name();
return String::Null_();
}
diff --git a/autodoc/source/display/html/easywri.cxx b/autodoc/source/display/html/easywri.cxx
index ee9a58de5238..e6e4c432fa68 100644
--- a/autodoc/source/display/html/easywri.cxx
+++ b/autodoc/source/display/html/easywri.cxx
@@ -53,7 +53,7 @@ EasyWriter::Finish_OutputNode()
csi::xml::Element &
EasyWriter::Out()
{
- csv_assert( aCurDestination.size() > 0);
+ csv_assert( ! aCurDestination.empty() );
return *aCurDestination.top();
}
diff --git a/autodoc/source/display/inc/toolkit/outputstack.hxx b/autodoc/source/display/inc/toolkit/outputstack.hxx
index e43bcd9f4023..ab7309a5f407 100644
--- a/autodoc/source/display/inc/toolkit/outputstack.hxx
+++ b/autodoc/source/display/inc/toolkit/outputstack.hxx
@@ -57,7 +57,7 @@ class OutputStack
inline csi::xml::Element &
OutputStack::Out() const
{
- csv_assert( aCurDestination.size() > 0 );
+ csv_assert( ! aCurDestination.empty() );
return *aCurDestination.top();
}
diff --git a/autodoc/source/exes/adc_uni/makefile.mk b/autodoc/source/exes/adc_uni/makefile.mk
index 5dd0bfbf1991..06a507a6148f 100644
--- a/autodoc/source/exes/adc_uni/makefile.mk
+++ b/autodoc/source/exes/adc_uni/makefile.mk
@@ -72,11 +72,11 @@ APP1OBJS= $(OBJ)$/main.obj
APP1RPATH=SDK
.IF "$(GUI)"=="WNT"
-APP1STDLIBS= $(LIBSTLPORT) $(COSVLIB) $(UDMLIB)
+APP1STDLIBS= $(COSVLIB) $(UDMLIB)
.ELSE
.IF "$(OS)"=="MACOSX"
# See <http://porting.openoffice.org/servlets/ReadMsg?list=mac&msgNo=6911>:
-APP1STDLIBS= $(LIBSTLPORT) -Wl,-all_load -ludm -lcosv
+APP1STDLIBS= -Wl,-all_load -ludm -lcosv
.ELSE
APP1STDLIBS= -lcosv -ludm
.ENDIF
diff --git a/autodoc/source/parser/cpp/sownstck.hxx b/autodoc/source/parser/cpp/sownstck.hxx
index ca3a1fa2b05a..d0abb22caab5 100644
--- a/autodoc/source/parser/cpp/sownstck.hxx
+++ b/autodoc/source/parser/cpp/sownstck.hxx
@@ -113,7 +113,7 @@ inline ary::cpp::Namespace &
ContextForAry::
S_OwnerStack::CurNamespace() const
{
- csv_assert( aStack_Namespaces.size() > 0 );
+ csv_assert( ! aStack_Namespaces.empty() );
return *aStack_Namespaces.top();
}
@@ -204,7 +204,7 @@ inline void
ContextForAry::
S_OwnerStack::SetCurProtection( ary::cpp::E_Protection i_eProtection )
{
- csv_assert( aStack_Classes.size() > 0 );
+ csv_assert( ! aStack_Classes.empty() );
aStack_Classes.top().second = i_eProtection;
}
diff --git a/autodoc/source/parser_i/idl/distrib.cxx b/autodoc/source/parser_i/idl/distrib.cxx
index ee1a7efaa324..392331a9650d 100644
--- a/autodoc/source/parser_i/idl/distrib.cxx
+++ b/autodoc/source/parser_i/idl/distrib.cxx
@@ -129,7 +129,7 @@ if (DEBUG_ShowTokens())
UnoIDL_PE &
TokenDistributor::ProcessingData::CurEnvironment() const
{
- csv_assert(aEnvironments.size() > 0);
+ csv_assert(!aEnvironments.empty());
csv_assert(aEnvironments.back().first != 0);
return *aEnvironments.back().first;
diff --git a/autodoc/source/parser_i/idl/pe_excp.cxx b/autodoc/source/parser_i/idl/pe_excp.cxx
index bfb2b820baa9..6ee412059900 100644
--- a/autodoc/source/parser_i/idl/pe_excp.cxx
+++ b/autodoc/source/parser_i/idl/pe_excp.cxx
@@ -83,7 +83,7 @@ PE_Exception::TransferData()
{
if (NOT Work().bIsPreDeclaration)
{
- csv_assert(Work().sData_Name.size() > 0);
+ csv_assert(! Work().sData_Name.empty());
csv_assert(Work().nCurStruct.IsValid());
}
Stati().pCurStatus = &Stati().aNone;
diff --git a/autodoc/source/parser_i/idl/pe_iface.cxx b/autodoc/source/parser_i/idl/pe_iface.cxx
index d7f6369bb6d2..64e0b9127f71 100644
--- a/autodoc/source/parser_i/idl/pe_iface.cxx
+++ b/autodoc/source/parser_i/idl/pe_iface.cxx
@@ -395,7 +395,7 @@ PE_Interface::TransferData()
{
if (NOT bIsPreDeclaration)
{
- csv_assert(sData_Name.size() > 0);
+ csv_assert(!sData_Name.empty());
csv_assert(nCurInterface.IsValid());
}
else
diff --git a/autodoc/source/parser_i/idl/pe_servi.cxx b/autodoc/source/parser_i/idl/pe_servi.cxx
index 8801ed65cb65..2de2044c71ee 100644
--- a/autodoc/source/parser_i/idl/pe_servi.cxx
+++ b/autodoc/source/parser_i/idl/pe_servi.cxx
@@ -304,7 +304,7 @@ PE_Service::TransferData()
{
if (NOT bIsPreDeclaration)
{
- csv_assert(sData_Name.size() > 0);
+ csv_assert(! sData_Name.empty());
csv_assert( (pCurService != 0) != (pCurSiService != 0) );
}
diff --git a/autodoc/source/parser_i/idl/pe_singl.cxx b/autodoc/source/parser_i/idl/pe_singl.cxx
index 4856e7f42393..262eaa201a3d 100644
--- a/autodoc/source/parser_i/idl/pe_singl.cxx
+++ b/autodoc/source/parser_i/idl/pe_singl.cxx
@@ -225,7 +225,7 @@ PE_Singleton::TransferData()
{
if (NOT bIsPreDeclaration)
{
- csv_assert(sData_Name.size() > 0);
+ csv_assert(! sData_Name.empty());
csv_assert( (pCurSingleton != 0) != (pCurSiSingleton != 0) );
}
diff --git a/autodoc/source/parser_i/idl/pe_struc.cxx b/autodoc/source/parser_i/idl/pe_struc.cxx
index 455596d9be95..9ba039a18da4 100644
--- a/autodoc/source/parser_i/idl/pe_struc.cxx
+++ b/autodoc/source/parser_i/idl/pe_struc.cxx
@@ -82,7 +82,7 @@ PE_Struct::TransferData()
{
if (NOT Work().bIsPreDeclaration)
{
- csv_assert(Work().sData_Name.size() > 0);
+ csv_assert(! Work().sData_Name.empty());
csv_assert(Work().nCurStruct.IsValid());
}
Stati().pCurStatus = &Stati().aNone;
diff --git a/basebmp/test/makefile.mk b/basebmp/test/makefile.mk
index ec94b28d4daa..08bcb5444fed 100644
--- a/basebmp/test/makefile.mk
+++ b/basebmp/test/makefile.mk
@@ -63,13 +63,6 @@ CDEFS+=-xalias_level=compatible
.ENDIF
.ENDIF
-#building with stlport, but cppunit was not built with stlport
-.IF "$(USE_SYSTEM_STL)"!="YES"
-.IF "$(SYSTEM_CPPUNIT)"=="YES"
-CFLAGSCXX+=-DADAPT_EXT_STL
-.ENDIF
-.ENDIF
-
CFLAGSCXX += $(CPPUNIT_CFLAGS)
# --- Common ----------------------------------------------------------
diff --git a/basegfx/source/workbench/Makefile b/basegfx/source/workbench/Makefile
index e39f15e79638..34f1edb86371 100644
--- a/basegfx/source/workbench/Makefile
+++ b/basegfx/source/workbench/Makefile
@@ -63,7 +63,7 @@
#test : bezierclip.cxx convexhull.cxx
# g++ -Wall -g \
# -I. -I. -I../inc -I./inc -I./unx/inc -I./unxlngi4/inc -I. -I/develop4/update/SRX644/unxlngi4/inc.m4/stl -I/develop4/update/SRX644/unxlngi4/inc.m4/external -I/develop4/update/SRX644/unxlngi4/inc.m4 -I/develop4/update/SRX644/src.m4/solenv/unxlngi4/inc -I/net/grande/develop6/update/dev/gcc_3.0.1_linux_libc2.11_turbolinux/include -I/develop4/update/SRX644/src.m4/solenv/inc -I/develop4/update/SRX644/unxlngi4/inc.m4/stl -I/net/grande.germany/develop6/update/dev/gcc_3.0.1_linux_libc2.11_turbolinux/redhat60/usr/include -I/net/grande.germany/develop6/update/dev/gcc_3.0.1_linux_libc2.11_turbolinux/redhat60/usr/include/X11 -I/develop4/update/SRX644/src.m4/res -I/net/grande/develop6/update/dev/Linux_JDK_1.4.0/include -I/net/grande/develop6/update/dev/Linux_JDK_1.4.0/include/linux -I. -I./res -I. \
-# -include preinclude.h -D_USE_NAMESPACE -DGLIBC=2 -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400 -D_STLP_DEBUG \
+# -include preinclude.h -D_USE_NAMESPACE -DGLIBC=2 -D_USE_NAMESPACE=1 -D_STLP_DEBUG \
# bezierclip.cxx convexhull.cxx -o bezierclip
prog : bezierclip.cxx convexhull.cxx
diff --git a/basegfx/test/makefile.mk b/basegfx/test/makefile.mk
index 402b820a2741..7eb234ac5257 100644
--- a/basegfx/test/makefile.mk
+++ b/basegfx/test/makefile.mk
@@ -37,14 +37,7 @@ ENABLE_EXCEPTIONS=TRUE
@all:
@echo "cppunit disabled. nothing do do."
-.ELSE # "$(WITH_CPPUNIT)" != "YES"
-
-#building with stlport, but cppunit was not built with stlport
-.IF "$(USE_SYSTEM_STL)"!="YES"
-.IF "$(SYSTEM_CPPUNIT)"=="YES"
-CFLAGSCXX+=-DADAPT_EXT_STL
-.ENDIF
-.ENDIF
+.ELSE
CFLAGSCXX += $(CPPUNIT_CFLAGS)
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx
index 28bd455e92f8..b8c5014058c1 100644
--- a/chart2/source/controller/accessibility/AccessibleBase.cxx
+++ b/chart2/source/controller/accessibility/AccessibleBase.cxx
@@ -651,7 +651,9 @@ sal_Int32 SAL_CALL AccessibleBase::getAccessibleIndexInParent()
sal_Int16 SAL_CALL AccessibleBase::getAccessibleRole()
throw (RuntimeException)
{
- return AccessibleRole::LIST_ITEM; // #i73747# role SHAPE seems more appropriate, but is not read
+ //IAccessibility2 Implementation 2009-----
+ return AccessibleRole::SHAPE/*LIST_ITEM*/; // #i73747# role SHAPE seems more appropriate, but is not read
+ //-----IAccessibility2 Implementation 2009
}
Reference< XAccessibleRelationSet > SAL_CALL AccessibleBase::getAccessibleRelationSet()
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index e7253d83cfab..08fd8eb6815d 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -69,10 +69,13 @@ const OUString lcl_aLabelRole( RTL_CONSTASCII_USTRINGPARAM( "label" ));
String lcl_GetRoleLBEntry(
const OUString & rRole, const OUString & rRange )
{
- String aEntry( rRole );
- aEntry += '\t';
- aEntry += String(
- ::chart::DialogModel::ConvertRoleFromInternalToUI( rRole ));
+//IAccessibility2 Implementation 2009-----
+ //String aEntry( rRole );
+ //aEntry += '\t';
+ //aEntry += String(
+ // ::chart::DialogModel::ConvertRoleFromInternalToUI( rRole ));
+ String aEntry(::chart::DialogModel::ConvertRoleFromInternalToUI( rRole ));
+ //-----IAccessibility2 Implementation 2009
aEntry += '\t';
aEntry += String( rRange );
@@ -139,10 +142,12 @@ OUString lcl_GetSequenceNameForLabel( ::chart::SeriesEntry * pEntry )
return aResult;
}
+//IAccessibility2 Implementation 2009-----
static long lcl_pRoleListBoxTabs[] =
- { 3, // Number of Tabs
- 0, 0, 75
+ { 2, // Number of Tabs
+ 0, 75
};
+//-----IAccessibility2 Implementation 2009
void lcl_ShowChooserButton(
::chart::RangeSelectionButton & rChooserButton,
diff --git a/configmgr/source/partial.hxx b/configmgr/source/partial.hxx
index 6cdb5178ac7a..1d2c4dfb22fe 100644
--- a/configmgr/source/partial.hxx
+++ b/configmgr/source/partial.hxx
@@ -50,7 +50,7 @@ public:
private:
struct Node {
- typedef boost::unordered_map< rtl::OUString, Node > Children;
+ typedef boost::unordered_map< rtl::OUString, Node, rtl::OUStringHash > Children;
Node(): startInclude(false) {}
void clear() { startInclude=false; children.clear(); }
diff --git a/configure.in b/configure.in
index dbdf400c678c..a93c1cd54d5b 100644
--- a/configure.in
+++ b/configure.in
@@ -322,7 +322,7 @@ AC_ARG_ENABLE(static-gtk,
AC_ARG_ENABLE(layout,
[ --enable-layout Enable the compilation and use of layout dialogs
],,)
-AC_ARG_ENABLE(nss_module,
+AC_ARG_ENABLE(nss-module,
[ --disable-nss-module Whether to use the NSS module that is used for xml-security
],,enable_nss_module=yes)
AC_ARG_ENABLE(kde,
@@ -643,17 +643,8 @@ AC_ARG_WITH(system-redland,
[ --with-system-redland Use redland library already on system
],,)
AC_ARG_WITH(stlport,
-[ --with-stlport The location that STLport is installed in. The STL
- header files are assumed to be in
- stlport-home/stlport and the STLPort library in
- stlport-home/lib.
-
- Usage: --with-stlport=<absolute path to stlport home>
-
- Warning: disabling using --without-stlport or
- enabling using --with-stlport on a platform that
- defaults to the opposite will break ABI compatibility
-], WITH_STLPORT=$withval , WITH_STLPORT=auto)
+[ --with-stlport Only building --without-stlport is supported.
+], WITH_STLPORT=$withval , WITH_STLPORT=no)
AC_ARG_WITH(jdk-home,
[ --with-jdk-home if you have installed JDK 1.3 or later on your system
please supply the path here.
@@ -1388,7 +1379,7 @@ dnl ===================================================================
dnl Build options
dnl ===================================================================
-# Disable or enable libraries seamonkey, nss, hunspell, hyphen, saxon,
+# Disable or enable category-B librariets: nss, hunspell, hyphen, saxon,
# rhino, silgraphite, beanshell.
# Note that further below they may be enabled or disabled again by
@@ -1416,7 +1407,7 @@ if test "$enable_category_b" = "yes"; then
enable_coinmp="yes"
enable_category_b_fonts="yes"
- AC_MSG_RESULT([yes: allow modules, nss, hunspell, hyphen, saxon, rhino, beanshell, graphite, coinmp to be built])
+ AC_MSG_RESULT([yes: allow modules nss, hunspell, hyphen, saxon, rhino, beanshell, graphite, coinmp to be built])
else
# Disable libaries.
enable_nss_module="no"
@@ -1429,7 +1420,7 @@ else
enable_coinmp="no"
enable_category_b_fonts="no"
- AC_MSG_RESULT([no: disabled modules, nss, hunspell, hyphen, saxon, rhino, beanshell, graphite, coinmp])
+ AC_MSG_RESULT([no: disabled modules nss, hunspell, hyphen, saxon, rhino, beanshell, graphite, coinmp])
fi
AC_SUBST(ENABLE_CATEGORY_B)
@@ -2417,7 +2408,7 @@ dnl ===================================================================
dnl Set the gcc/gxx include directories
dnl ===================================================================
# Removed the special FreeBSD treatment. The problem was that with_gxx_include_path
-# often contains an i386 which is expanded as a macro. Solved in stlport.
+# often contains an i386 which is expanded as a macro.
if test "$GXX" = "yes"; then
AC_MSG_CHECKING([for g++ include path])
if test -z "$with_gxx_include_path"; then
@@ -2704,115 +2695,12 @@ dnl Checks for what the default STL should be
dnl ===================================================================
AC_MSG_CHECKING([what the default STL should be])
DEFAULT_TO_STLPORT="no"
- if test "$_os" = "Linux"; then
- case "$build_cpu" in
- i?86)
- case "$build_os" in k*bsd*-gnu*)
- DEFAULT_TO_STLPORT="no"
- ;;
- *)
- DEFAULT_TO_STLPORT="yes"
- ;;
- esac
- ;;
- *)
- DEFAULT_TO_STLPORT="no"
- ;;
- esac
- elif test "$_os" = "SunOS"; then
- DEFAULT_TO_STLPORT="yes"
- elif test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
- DEFAULT_TO_STLPORT="yes"
- elif test "$_os" = "OS2"; then
- DEFAULT_TO_STLPORT="yes"
- elif test "$_os" = "FreeBSD"; then
- DEFAULT_TO_STLPORT="yes"
- fi
- if test "$DEFAULT_TO_STLPORT" = "yes"; then
- AC_MSG_RESULT([stlport])
- else
- AC_MSG_RESULT([system])
- fi
- if test "$WITH_STLPORT" = "auto"; then
- WITH_STLPORT=$DEFAULT_TO_STLPORT
- fi
-
-dnl ===================================================================
-dnl Checks for STLPORT
-dnl ===================================================================
- AC_MSG_CHECKING([for STL providing headers])
- STLPORT4=""
- USE_SYSTEM_STL=""
- if test "$WITH_STLPORT" = "yes"; then
- AC_MSG_RESULT([using internal stlport.])
- if test "$DEFAULT_TO_STLPORT" != "yes"; then
- AC_MSG_WARN([using stlport. Warning, breaks your ABI compatibility!])
- echo "using stlport. Warning: breaks your ABI compatibility!" >>warn
- fi
- elif test "$WITH_STLPORT" = "no"; then
- AC_MSG_RESULT([using system STL])
- USE_SYSTEM_STL="YES"
- if test "$DEFAULT_TO_STLPORT" != "no"; then
- AC_MSG_WARN([using system STL. Warning, breaks your ABI compatibility!])
- echo "using system STL. Warning: breaks your ABI compatibility!" >>warn
- fi
- else
- STLPORT4=$WITH_STLPORT
- if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
- AC_TRY_CPP($STLPORT4/stlport/hash_map, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([STLport headers not found.]))
- else
- dnl AC_TRY_CPP doesn't work for MSVC because C++ preprocessor is not found by autoconf.
- if test -f "$STLPORT4/stlport/hash_map"; then
- AC_MSG_RESULT([checked.])
- else
- AC_MSG_ERROR([STLport headers not found.])
- fi
- fi
- if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
- AC_MSG_CHECKING([for STLport libraries])
- if test "$_os" = "SunOS"; then
- if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then
- AC_MSG_RESULT([checked])
- elif test -f "$STLPORT4/lib/libstlport.so"; then
- AC_MSG_RESULT([checked])
- STLPORT_VER=500
- else
- AC_MSG_ERROR([STLport libraries not found])
- fi
- elif test "$_os" = "Darwin"; then
- if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then
- AC_MSG_RESULT([checked])
- elif test -f "$STLPORT4/lib/libstlport.dylib"; then
- AC_MSG_RESULT([checked])
- STLPORT_VER=500
- else
- AC_MSG_ERROR([STLport libraries not found])
- fi
- else
- if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
- AC_MSG_RESULT([checked])
- elif test -f "$STLPORT4/lib/libstlport.so"; then
- AC_MSG_RESULT([checked])
- STLPORT_VER=500
- else
- AC_MSG_ERROR([STLport libraries not found])
- fi
- fi
- fi
- if test "$DEFAULT_TO_STLPORT" != "yes"; then
- AC_MSG_WARN([using stlport. Warning: breaks your ABI compatibility!])
- echo "using stlport. Warning: breaks your ABI compatibility!" >>warn
- fi
- fi
-
-if test -z "$STLPORT4"; then
- STLPORT4="NO_STLPORT4"
-fi
-if test -z "$STLPORT_VER"; then
- STLPORT_VER=400
+if test "$WITH_STLPORT" != "no"; then
+ AC_MSG_ERROR([Option --with-stlport is no longer available.])
+else
+ USE_SYSTEM_STL="YES"
fi
-AC_SUBST(STLPORT4)
-AC_SUBST(STLPORT_VER)
+
AC_SUBST(USE_SYSTEM_STL)
dnl ===================================================================
@@ -2883,6 +2771,7 @@ fi
dnl ===================================================================
dnl system stl sanity tests
dnl ===================================================================
+if false ; then # TODO: update TR1 compliant STLs
if test "$USE_SYSTEM_STL" = "YES"; then
AC_MSG_CHECKING([system stl sanity])
AC_LANG_PUSH([C++])
@@ -2958,6 +2847,7 @@ _ACEOF
AC_LANG_POP([C++])
fi
+fi # endof TODO: update TR1 compliant STLs
AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
@@ -4048,15 +3938,27 @@ if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then
with_system_python=yes
_python="/Library/Frameworks/Python.framework/Versions/Current/bin/python"
+ if test ! -f $_python; then
+ _python="/usr/bin/python"
+ fi
+ AC_MSG_RESULT([compiling against system python ($_python)])
+
_python_hexversion=`$_python -c "import sys; print(sys.hexversion);"`
-
+
dnl hex version of Python 2.7.1 = 34013680
if test $_python_hexversion -ge 34013680 ; then
+ _python_version=`$_python -c "import sys; print sys.version;" | head -n 1`
AC_MSG_RESULT([compiling against system python (version $_python_version)])
_python_ver=`$_python -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"`
- PYTHON_CFLAGS="-I/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"
+ if test -d "/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"; then
+ PYTHON_CFLAGS="-I/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"
+ elif test -d "/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"; then
+ PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"
+ else
+ PYTHON_CFLAGS="-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"
+ fi
else
AC_MSG_ERROR([Python 2.7.1 or higher is required])
fi
@@ -4774,7 +4676,7 @@ fi
AC_SUBST(WITH_LDAP)
AC_SUBST(WITH_OPENLDAP)
-AC_MSG_CHECKING([whether to build provided NSS module])
+AC_MSG_CHECKING([whether to build the internal NSS module])
if test "$enable_nss_module" != "no"; then
ENABLE_NSS_MODULE="YES"
BUILD_TYPE="$BUILD_TYPE NSS"
@@ -4782,9 +4684,12 @@ if test "$enable_nss_module" != "no"; then
if test "$_os" = "WINNT"; then
AC_MSG_CHECKING([for Mozilla build tooling])
if test -z "$MOZILLABUILD" ; then
-AC_MSG_ERROR([Mozilla build tooling not found. It is needed for NSS.
-Use the --with-mozilla-build option after installling the tools obtained
-from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32])
+AC_MSG_ERROR([
+Mozilla build tooling not found!
+ It is required for NSS that is needed for AOO's security facilities.
+ Either disable NSS using the option --disable-nss-module
+ or use the --with-mozilla-build option after installing the tool obtained
+ from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32])
else
if test \( "$WITH_MINGWIN" = "yes" \) ; then
if test ! -d "$MOZILLABUILD" ; then
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 076d764c2865..72b0acee6f71 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1766,14 +1766,14 @@ namespace
{
if ( m_aSet.empty() )
return m_xSource->hasElements();
- return ::std::count(m_aSet.begin(),m_aSet.end(),false) != 0;
+ return (::std::find(m_aSet.begin(),m_aSet.end(),false) != m_aSet.end());
}
// ::com::sun::star::container::XIndexAccess
virtual sal_Int32 SAL_CALL getCount( ) throw(RuntimeException)
{
if ( m_aSet.empty() )
return m_xSource->getCount();
- return ::std::count(m_aSet.begin(),m_aSet.end(),false);
+ return std_bitset_count(m_aSet.begin(),m_aSet.end(),false);
}
virtual Any SAL_CALL getByIndex( sal_Int32 Index ) throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
{
@@ -1818,7 +1818,7 @@ void askForParameters(const Reference< XSingleSelectQueryComposer >& _xComposer,
Reference<XNameAccess> xParamsAsNames(xParamsAsIndicies, UNO_QUERY);
sal_Int32 nParamCount = xParamsAsIndicies.is() ? xParamsAsIndicies->getCount() : 0;
::std::bit_vector aNewParameterSet( _aParametersSet );
- if ( nParamCount || ::std::count(aNewParameterSet.begin(),aNewParameterSet.end(),true) != nParamCount )
+ if ( nParamCount || std_bitset_count(aNewParameterSet.begin(),aNewParameterSet.end(),true) != nParamCount )
{
static const ::rtl::OUString PROPERTY_NAME(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME));
aNewParameterSet.resize(nParamCount ,false);
diff --git a/cosv/source/unittest/makefile.mk b/cosv/source/unittest/makefile.mk
index f56b6ed75de8..f3365400c90c 100644
--- a/cosv/source/unittest/makefile.mk
+++ b/cosv/source/unittest/makefile.mk
@@ -19,8 +19,6 @@
#
#**************************************************************
-
-
PRJ=..$/..
PRJNAME=cosv
@@ -37,40 +35,21 @@ PRJINC=$(PRJ)$/source
.INCLUDE : $(PRJ)$/source$/fullcpp.mk
-
-
-
# --- Files --------------------------------------------------------
OBJFILES= \
$(OBJ)$/file_ut.obj \
$(OBJ)$/simplestring_ut.obj
-
-
-
APP1TARGET= $(TARGET)
APP1STACK= 1000000
APP1OBJS= $(OBJ)$/ut_main.obj
-.IF "$(GUI)"=="WNT"
-APP1STDLIBS= $(LIBSTLPORT)
-.ELSE
-.IF "$(OS)"=="MACOSX"
-APP1STDLIBS= $(LIBSTLPORT)
-.ENDIF
-.ENDIF
-
-
APP1LIBS= $(LB)$/$(TARGET).lib $(LB)$/cosv.lib
-
APP1DEPN= $(LB)$/$(TARGET).lib $(LB)$/cosv.lib
-
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
-
-
diff --git a/cpputools/source/unoexe/makefile.mk b/cpputools/source/unoexe/makefile.mk
index bb2ab81d22fe..e2f33f0a4b5b 100644
--- a/cpputools/source/unoexe/makefile.mk
+++ b/cpputools/source/unoexe/makefile.mk
@@ -70,7 +70,7 @@ APP1RPATH=UREBIN
# Include all relevant (see ure/source/README) dynamic libraries, so that C++
# UNO components running in the uno executable have a defined environment
-# (stlport, unxlngi6 libstdc++.so.6, and wntmsci10 uwinapi.dll are already
+# (unxlngi6 libstdc++.so.6, and wntmsci10 uwinapi.dll are already
# included via APP1STDLIB, unxlngi6 libgcc_s.so.1 and wntmsci10 msvcr71.dll and
# msvcp71.dll are magic---TODO):
APP1STDLIBS= \
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 206e9f18ee73..53b57bda5b84 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1662,7 +1662,7 @@ SvxConfigPage::SvxConfigPage(
aDescriptionField.SetControlBackground( GetSettings().GetStyleSettings().GetDialogColor() );
aDescriptionField.SetAutoScroll( sal_True );
aDescriptionField.EnableCursor( sal_False );
-
+ //IAccessibility2 Implementation 2009-----
aMoveUpButton.SetAccessibleName(String(CUI_RES(BUTTON_STR_UP)));
aMoveDownButton.SetAccessibleName(String(CUI_RES(BUTTON_STR_DOWN)));
aMoveUpButton.SetAccessibleRelationMemberOf(&aContentsSeparator);
@@ -1671,6 +1671,7 @@ SvxConfigPage::SvxConfigPage(
aModifyTopLevelButton.SetAccessibleRelationMemberOf(&aTopLevelSeparator);
aAddCommandsButton.SetAccessibleRelationMemberOf(&aContentsSeparator);
aModifyCommandButton.SetAccessibleRelationMemberOf(&aContentsSeparator);
+ //-----IAccessibility2 Implementation 2009
}
SvxConfigPage::~SvxConfigPage()
@@ -2929,9 +2930,10 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog(
LINK( this, SvxMainMenuOrganizerDialog, MoveHdl) );
aMoveDownButton.SetClickHdl (
LINK( this, SvxMainMenuOrganizerDialog, MoveHdl) );
-
+ //IAccessibility2 Implementation 2009-----
aMoveUpButton.SetAccessibleName(String(CUI_RES(BUTTON_STR_UP)));
aMoveDownButton.SetAccessibleName(String(CUI_RES(BUTTON_STR_DOWN)));
+ //-----IAccessibility2 Implementation 2009
}
IMPL_LINK(SvxMainMenuOrganizerDialog, ModifyHdl, Edit*, pEdit)
diff --git a/cui/source/customize/cfg.src b/cui/source/customize/cfg.src
index 1b212d47cfd4..d3850e483377 100644
--- a/cui/source/customize/cfg.src
+++ b/cui/source/customize/cfg.src
@@ -822,7 +822,7 @@ String RID_SVXSTR_RENAME_TOOLBAR
{
Text [ en-US ] = "Rename Toolbar";
};
-
+//IAccessibility2 Implementation 2009-----
String BUTTON_STR_UP
{
Text [ en-US ] = "Up";
@@ -831,4 +831,5 @@ String BUTTON_STR_DOWN
{
Text [ en-US ] = "Down";
};
+//-----IAccessibility2 Implementation 2009
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index e6320ac878d3..f8834ab600be 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -166,6 +166,9 @@ _HeaderTabListBox::_HeaderTabListBox( Window* pParent, const ResId& rId ) :
maHeaderBar( this, WB_BUTTONSTYLE | WB_BOTTOMBORDER )
{
maListBox.SetHelpId( HID_MACRO_HEADERTABLISTBOX );
+
+ // enable the cell focus to show visible focus
+ maListBox.EnableCellFocus();
}
_HeaderTabListBox::~_HeaderTabListBox()
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index 66fbc4d0d585..dace3fa50295 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -257,7 +257,12 @@ SvxShowText::~SvxShowText()
SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, sal_Bool bOne_, ResMgr* pResContext )
: mpDialog( pDialog ),
+ aFontText ( pDialog, ResId( FT_FONT, *pResContext ) ),
+ aFontLB ( pDialog, ResId( LB_FONT, *pResContext ) ),
+ aSubsetText ( pDialog, ResId( FT_SUBSET, *pResContext ) ),
+ aSubsetLB ( pDialog, ResId( LB_SUBSET, *pResContext ) ),
aShowSet ( pDialog, ResId( CT_SHOWSET, *pResContext ) ),
+ aSymbolText ( pDialog, ResId( FT_SYMBOLE, *pResContext ) ),
aShowText ( pDialog, ResId( CT_SHOWTEXT, *pResContext ) ),
// aShowShortcut ( pDialog, ResId( CT_ASSIGN, *pResContext ) ),
aOKBtn ( pDialog, ResId( BTN_CHAR_OK, *pResContext ) ),
@@ -265,11 +270,6 @@ SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, sal_Bool bOne_, ResMgr*
aHelpBtn ( pDialog, ResId( BTN_CHAR_HELP, *pResContext ) ),
aDeleteBtn ( pDialog, ResId( BTN_DELETE, *pResContext ) ),
// aAssignBtn ( pDialog, ResId( BT_ASSIGN, *pResContext ) ),
- aFontText ( pDialog, ResId( FT_FONT, *pResContext ) ),
- aFontLB ( pDialog, ResId( LB_FONT, *pResContext ) ),
- aSubsetText ( pDialog, ResId( FT_SUBSET, *pResContext ) ),
- aSubsetLB ( pDialog, ResId( LB_SUBSET, *pResContext ) ),
- aSymbolText ( pDialog, ResId( FT_SYMBOLE, *pResContext ) ),
aShowChar ( pDialog, ResId( CT_SHOWCHAR, *pResContext ), sal_True ),
aCharCodeText ( pDialog, ResId( FT_CHARCODE, *pResContext ) ),
// aAssignText ( pDialog, ResId( FT_ASSIGN, *pResContext ) ),
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index de801fb140ba..79d493c65c21 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -535,7 +535,8 @@ GraphicFilterSolarize::GraphicFilterSolarize( Window* pParent, const Graphic& rG
maCbxInvert.Check( bInvert );
maCbxInvert.SetToggleHdl( GetModifyHdl() );
- maMtrThreshold.GrabFocus();
+ // IAccessibility2 Implementation 2009
+ // maMtrThreshold.GrabFocus();
}
// -----------------------------------------------------------------------------
@@ -595,7 +596,8 @@ GraphicFilterSepia::GraphicFilterSepia( Window* pParent, const Graphic& rGraphic
maMtrSepia.SetValue( nSepiaPercent );
maMtrSepia.SetModifyHdl( GetModifyHdl() );
- maMtrSepia.GrabFocus();
+ // IAccessibility2 Implementation 2009
+ // maMtrSepia.GrabFocus();
}
// -----------------------------------------------------------------------------
@@ -646,7 +648,9 @@ GraphicFilterPoster::GraphicFilterPoster( Window* pParent, const Graphic& rGraph
maNumPoster.SetLast( rGraphic.GetBitmapEx().GetBitCount() );
maNumPoster.SetValue( nPosterCount );
maNumPoster.SetModifyHdl( GetModifyHdl() );
- maNumPoster.GrabFocus();
+
+ // IAccessibility2 Implementation 2009
+ // maNumPoster.GrabFocus();
}
// -----------------------------------------------------------------------------
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 53e071402706..bb2962d3f692 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -456,6 +456,11 @@ void IconChoiceDialog::ShowPage( sal_uInt16 nId )
ActivatePageImpl( );
if(bInvalidate)
Invalidate();
+
+ // IA2 CWS. MT: I guess we want the event now, and not in Paint()?
+ IconChoicePageData* pData = GetPageData ( mnCurrentPageId );
+ if(pData)
+ ShowPageImpl ( pData );
}
/**********************************************************************
diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx
index 197c58a82873..a4d072f8cc9c 100644
--- a/cui/source/inc/cuicharmap.hxx
+++ b/cui/source/inc/cuicharmap.hxx
@@ -82,7 +82,12 @@ private:
friend class SvxCharacterMap;
SfxModalDialog* mpDialog;
+ FixedText aFontText;
+ ListBox aFontLB;
+ FixedText aSubsetText;
+ ListBox aSubsetLB;
SvxShowCharSet aShowSet;
+ FixedText aSymbolText;
SvxShowText aShowText;
// SvxShowText aShowShortcut;
OKButton aOKBtn;
@@ -90,11 +95,6 @@ friend class SvxCharacterMap;
HelpButton aHelpBtn;
PushButton aDeleteBtn;
// PushButton aAssignBtn;
- FixedText aFontText;
- ListBox aFontLB;
- FixedText aSubsetText;
- ListBox aSubsetLB;
- FixedText aSymbolText;
SvxShowText aShowChar;
FixedText aCharCodeText;
// FixedText aAssignText;
diff --git a/cui/source/inc/headertablistbox.hxx b/cui/source/inc/headertablistbox.hxx
index dbb5f3064e3e..66d33df0882d 100644
--- a/cui/source/inc/headertablistbox.hxx
+++ b/cui/source/inc/headertablistbox.hxx
@@ -31,8 +31,8 @@
class _HeaderTabListBox : public Control
{
private:
- SvHeaderTabListBox maListBox;
HeaderBar maHeaderBar;
+ SvHeaderTabListBox maListBox;
protected:
DECL_LINK( HeaderEndDrag_Impl, HeaderBar* );
virtual long Notify( NotifyEvent& rNEvt );
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 3e81fe13e260..fa807f33dd88 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -2052,12 +2052,12 @@ OfaQuoteTabPage::OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ) :
sStandard(CUI_RES(ST_STANDARD))
{
- aSglStandardPB.SetAccessibleName(String(CUI_RES(STR_PB_SGL_STD) ) );
- aDblStandardPB.SetAccessibleName(String(CUI_RES(STR_PB_DBL_STD) ) );
- aStartQuotePB.SetAccessibleName( String(CUI_RES(STR_PB_DBL_START) ));
- aEndQuotePB.SetAccessibleName(String(CUI_RES(STR_PB_DBL_END) ));
- aSglStartQuotePB.SetAccessibleName(String(CUI_RES(STR_PB_SGL_START) ));
- aSglEndQuotePB.SetAccessibleName(String(CUI_RES(STR_PB_SGL_END) ) );
+ //aSglStandardPB.SetAccessibleName(String(CUI_RES(STR_PB_SGL_STD) ) );
+ //aDblStandardPB.SetAccessibleName(String(CUI_RES(STR_PB_DBL_STD) ) );
+ //aStartQuotePB.SetAccessibleName( String(CUI_RES(STR_PB_DBL_START) ));
+ //aEndQuotePB.SetAccessibleName(String(CUI_RES(STR_PB_DBL_END) ));
+ //aSglStartQuotePB.SetAccessibleName(String(CUI_RES(STR_PB_SGL_START) ));
+ //aSglEndQuotePB.SetAccessibleName(String(CUI_RES(STR_PB_SGL_END) ) );
FreeResource();
@@ -2100,6 +2100,15 @@ OfaQuoteTabPage::OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ) :
aDblStandardPB.SetClickHdl(LINK(this, OfaQuoteTabPage, StdQuoteHdl));
aSglStandardPB.SetClickHdl(LINK(this, OfaQuoteTabPage, StdQuoteHdl));
+ //IAccessibility2 Implementation 2009-----
+ // Move down from the position before FreeResource()
+ // For lost help ID issue
+ aSglStandardPB.SetAccessibleName(String(CUI_RES(STR_PB_SGL_STD) ) );
+ aDblStandardPB.SetAccessibleName(String(CUI_RES(STR_PB_DBL_STD) ) );
+ aStartQuotePB.SetAccessibleName( String(CUI_RES(STR_PB_DBL_START) ));
+ aEndQuotePB.SetAccessibleName(String(CUI_RES(STR_PB_DBL_END) ));
+ aSglStartQuotePB.SetAccessibleName(String(CUI_RES(STR_PB_SGL_START) ));
+ aSglEndQuotePB.SetAccessibleName(String(CUI_RES(STR_PB_SGL_END) ) );
aSglStartQuotePB.SetAccessibleRelationLabeledBy( &aSglStartQuoteFT );
aSglEndQuotePB.SetAccessibleRelationLabeledBy( &aSglEndQuoteFT );
aSglStartQuotePB.SetAccessibleRelationMemberOf( &aSingleFL );
diff --git a/cui/source/tabpages/autocdlg.src b/cui/source/tabpages/autocdlg.src
index 5a39343b86f3..a25a2b34c9d5 100644
--- a/cui/source/tabpages/autocdlg.src
+++ b/cui/source/tabpages/autocdlg.src
@@ -493,6 +493,30 @@ TabPage RID_OFAPAGE_AUTOCORR_EXCEPT
{
Text [ en-US ] = "Delete words with two initial capitals" ;
};
+ String STR_PB_SGL_STD
+ {
+ Text [ en-US ] = "Single quotes default" ;
+ };
+ String STR_PB_DBL_STD
+ {
+ Text [ en-US ] = "Double quotes default" ;
+ };
+ String STR_PB_SGL_START
+ {
+ Text [ en-US ] = "Start quote of single quotes" ;
+ };
+ String STR_PB_DBL_START
+ {
+ Text [ en-US ] = "Start quote of double quotes" ;
+ };
+ String STR_PB_SGL_END
+ {
+ Text [ en-US ] = "End quote of single quotes" ;
+ };
+ String STR_PB_DBL_END
+ {
+ Text [ en-US ] = "End quote of double quotes" ;
+ };
};
/**************************************************************************/
/* */
@@ -661,30 +685,6 @@ TabPage RID_OFAPAGE_AUTOCORR_QUOTE
{
Text [ en-US ] = "Default" ;
};
- String STR_PB_SGL_STD
- {
- Text [ en-US ] = "Single quotes default" ;
- };
- String STR_PB_DBL_STD
- {
- Text [ en-US ] = "Double quotes default" ;
- };
- String STR_PB_SGL_START
- {
- Text [ en-US ] = "Start quote of single quotes" ;
- };
- String STR_PB_DBL_START
- {
- Text [ en-US ] = "Start quote of double quotes" ;
- };
- String STR_PB_SGL_END
- {
- Text [ en-US ] = "End quote of single quotes" ;
- };
- String STR_PB_DBL_END
- {
- Text [ en-US ] = "End quote of double quotes" ;
- };
};
/**************************************************************************/
diff --git a/cui/source/tabpages/connect.hrc b/cui/source/tabpages/connect.hrc
index dfe19df51c1a..b208ada25bfb 100644
--- a/cui/source/tabpages/connect.hrc
+++ b/cui/source/tabpages/connect.hrc
@@ -39,3 +39,5 @@
#define FT_TYPE 8
#define LB_TYPE 1
#define CTL_PREVIEW 1
+//IAccessibility2 Implementation 2009-----
+#define STR_EXAMPLE 1
diff --git a/cui/source/tabpages/tabarea.src b/cui/source/tabpages/tabarea.src
index e648d543eed8..8de441b5ef09 100644
--- a/cui/source/tabpages/tabarea.src
+++ b/cui/source/tabpages/tabarea.src
@@ -875,6 +875,9 @@ TabPage RID_SVXPAGE_BITMAP
Pos = MAP_APPFONT ( 12 , 25 ) ;
Size = MAP_APPFONT ( 72 , 72 ) ;
TabStop = TRUE ;
+ //IAccessibility2 Implementation 2009-----
+ Text [ en-US ] = "Pattern Editor";
+ //-----IAccessibility2 Implementation 2009
};
FixedText FT_COLOR
{
@@ -1316,12 +1319,18 @@ TabPage RID_SVXPAGE_COLOR
Border = TRUE;
Pos = MAP_APPFONT ( 157 , 14 ) ;
Size = MAP_APPFONT ( 34 , 25 ) ;
+ // IAccessibility2 implementation 2009. ------
+ Text [ en-US ] = "Old Color" ;
+ // ------ IAccessibility2 implementation 2009.
};
Control CTL_PREVIEW_NEW
{
Border = TRUE;
Pos = MAP_APPFONT ( 157, 39 ) ;
Size = MAP_APPFONT ( 34 , 25 ) ;
+ // IAccessibility2 implementation 2009. ------
+ Text [ en-US ] = "New Color" ;
+ // ------ IAccessibility2 implementation 2009.
};
ListBox LB_COLORMODEL
{
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 2a2a79b4277b..3a4d54dd87e4 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -2213,6 +2213,11 @@ IMPL_LINK( SvxAreaTabPage, ClickBitmapHdl_Impl, void *, EMPTYARG )
aMtrFldYOffset.Show();
aFlPosition.Show();
aRbtRow.Show();
+//IAccessible2 Implementation 2009-----
+ //Solution:Check one when initializing.
+ if(!aRbtRow.IsChecked()&&!aRbtColumn.IsChecked())
+ aRbtRow.Check();
+//-----IAccessible2 Implementation 2009
aRbtColumn.Show();
aMtrFldOffset.Show();
aFlOffset.Show();
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 6689f0498c18..17ccb9f64b20 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1935,11 +1935,8 @@ void Desktop::Main()
// set static variable to enabled/disable crash reporter
retrieveCrashReporterState();
- if ( !isCrashReporterEnabled() )
- {
- osl_setErrorReporting( sal_False );
- // disable stack trace feature
- }
+ const bool bCrashReporterEnabled = isCrashReporterEnabled();
+ osl_setErrorReporting( !bCrashReporterEnabled );
// create title string
sal_Bool bCheckOk = sal_False;
diff --git a/desktop/source/pagein/makefile.mk b/desktop/source/pagein/makefile.mk
index e7fe19f0f34a..fdf2988001fa 100644
--- a/desktop/source/pagein/makefile.mk
+++ b/desktop/source/pagein/makefile.mk
@@ -137,14 +137,6 @@ $(MISC)$/$(TARGET)-common : makefile.mk
@-echo $(URELIBPATH)$/bootstrap$(UNODLLPOST) >> $@
@-echo $(URELIBPATH)$/$(DLLPRE)reg$(UDKDLLPOST) >> $@
@-echo $(URELIBPATH)$/$(DLLPRE)store$(UDKDLLPOST) >> $@
-.IF "$(USE_SYSTEM_STL)"!="YES"
-.IF "$(COMNAME)" == "gcc2" || "$(COMNAME)" == "gcc3"
- @-echo $(URELIBPATH)$/$(DLLPRE)stlport_gcc$(DLLPOST) >> $@
-.ENDIF # gcc
-.IF "$(COMNAME)" == "sunpro5"
- @-echo $(URELIBPATH)$/$(DLLPRE)stlport_sunpro$(DLLPOST) >> $@
-.ENDIF # sunpro5
-.ENDIF # SYSTEM_STL
@-echo $(URELIBPATH)$/$(DLLPRE)uno_cppuhelper$(COMID)$(UDKDLLPOST) >> $@
@-echo $(URELIBPATH)$/$(DLLPRE)uno_cppu$(UDKDLLPOST) >> $@
@-echo $(URELIBPATH)$/$(DLLPRE)uno_sal$(UDKDLLPOST) >> $@
diff --git a/editeng/inc/editeng/AccessibleEditableTextPara.hxx b/editeng/inc/editeng/AccessibleEditableTextPara.hxx
index 453055e73cef..fc09080c05c9 100644
--- a/editeng/inc/editeng/AccessibleEditableTextPara.hxx
+++ b/editeng/inc/editeng/AccessibleEditableTextPara.hxx
@@ -373,6 +373,13 @@ namespace accessibility
/// Check whether 0<=nStart<=n and 0<=nEnd<=n
void CheckRange( sal_Int32 nStart, sal_Int32 nEnd ) SAL_THROW((::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException));
+//IAccessibility2 Implementation 2009-----
+ void _correctValues( const sal_Int32 nIndex, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rValues );
+ sal_Int32 SkipField(sal_Int32 nIndex, sal_Bool bForward);
+ // get overlapped field, extend return string. Only extend forward for now
+ sal_Bool ExtendByField( ::com::sun::star::accessibility::TextSegment& Segment );
+ String GetFieldTypeNameAtIndex(sal_Int32 nIndex);
+//-----IAccessibility2 Implementation 2009
// the paragraph index in the edit engine (guarded by solar mutex)
sal_Int32 mnParagraphIndex;
@@ -400,6 +407,14 @@ namespace accessibility
/// Our listeners (guarded by maMutex)
int mnNotifierClientId;
+ //IAccessibility2 Implementation 2009-----
+public:
+ void SetParagraphBackColorAccessible(const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > & ref)
+ { m_xAccInfo = ref ;}
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xAccInfo;
+ //virtual sal_Bool IsShapeParaFocusable( );
+ //-----IAccessibility2 Implementation 2009
// --> OD 2006-01-11 #i27138#
// the paragraph manager, which created this instance - is NULL, if
diff --git a/editeng/inc/editeng/AccessibleSvxFindReplaceDialog.hxx b/editeng/inc/editeng/AccessibleSvxFindReplaceDialog.hxx
new file mode 100644
index 000000000000..5d4031a19693
--- /dev/null
+++ b/editeng/inc/editeng/AccessibleSvxFindReplaceDialog.hxx
@@ -0,0 +1,65 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_
+#define _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_
+#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_
+#include <toolkit/awt/vclxwindow.hxx>
+#endif
+#ifndef _TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX_
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#endif
+
+#ifndef _TOOLKIT_AWT_VCLXWINDOWS_HXX_
+#include <toolkit/awt/vclxwindows.hxx>
+#endif
+
+
+class VCLXAccessibleSvxFindReplaceDialog : public VCLXAccessibleComponent
+{
+public:
+ VCLXAccessibleSvxFindReplaceDialog(VCLXWindow* pVCLXindow);
+ virtual ~VCLXAccessibleSvxFindReplaceDialog();
+ virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet );
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+
+class VCLXSvxFindReplaceDialog : public VCLXDialog
+{
+public:
+ VCLXSvxFindReplaceDialog(Window* pSplDlg)
+ {
+ SetWindow(pSplDlg);
+ }
+ virtual ~VCLXSvxFindReplaceDialog()
+ {};
+private:
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext()
+ {
+ return new VCLXAccessibleSvxFindReplaceDialog(this);
+ }
+};
+#endif // _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_
diff --git a/editeng/inc/editeng/editdata.hxx b/editeng/inc/editeng/editdata.hxx
index cbd61a5e67fe..99537eb3b789 100644
--- a/editeng/inc/editeng/editdata.hxx
+++ b/editeng/inc/editeng/editdata.hxx
@@ -363,7 +363,10 @@ enum EENotifyType
EE_NOTIFY_INPUT_START,
/// Denotes the end of a high-level action triggered by a key press
- EE_NOTIFY_INPUT_END
+ EE_NOTIFY_INPUT_END,
+//IAccessibility2 Implementation 2009-----
+ EE_NOTIFY_TEXTVIEWSELECTIONCHANGED_ENDD_PARA
+//-----IAccessibility2 Implementation 2009
};
struct EENotify
diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx
index 42ede62bbd8a..3e80b4b8b152 100644
--- a/editeng/inc/editeng/editeng.hxx
+++ b/editeng/inc/editeng/editeng.hxx
@@ -106,6 +106,9 @@ const sal_uInt8 EditEngineAttribs_OnlyHard = 2; /// returns only attributes
#define GETATTRIBS_CHARATTRIBS (sal_uInt8)0x04
#define GETATTRIBS_ALL (sal_uInt8)0xFF
+//IAccessibility2 Implementation 2009-----
+class SdrObject;
+//-----IAccessibility2 Implementation 2009
class EDITENG_DLLPUBLIC EditEngine
{
friend class EditView;
@@ -143,6 +146,9 @@ public:
void SetUpdateMode( sal_Bool bUpdate );
sal_Bool GetUpdateMode() const;
+ //IAccessible2 migration fix
+ void SetUpdateModeForAcc( sal_Bool bUp);
+ sal_Bool GetUpdateModeForAcc( ) const;
void SetBackgroundColor( const Color& rColor );
Color GetBackgroundColor() const;
@@ -467,7 +473,9 @@ public:
static void ImportBulletItem( SvxNumBulletItem& rNumBullet, sal_uInt16 nLevel, const SvxBulletItem* pOldBullet, const SvxLRSpaceItem* pOldLRSpace );
static sal_Bool IsPrintable( sal_Unicode c ) { return ( ( c >= 32 ) && ( c != 127 ) ); }
static sal_Bool HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable );
-
+ //IAccessibility2 Implementation 2009-----
+ virtual SdrObject* GetCurTextObj() { return NULL; }
+ //-----IAccessibility2 Implementation 2009
/** sets a link that is called at the beginning of a drag operation at an edit view */
void SetBeginDropHdl( const Link& rLink );
Link GetBeginDropHdl() const;
diff --git a/editeng/inc/editeng/editrids.hrc b/editeng/inc/editeng/editrids.hrc
index 98f9395acc4f..80d5940eee7a 100644
--- a/editeng/inc/editeng/editrids.hrc
+++ b/editeng/inc/editeng/editrids.hrc
@@ -373,8 +373,10 @@
#define RID_STR_WORD (RID_EDIT_START + 313)
#define RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION (RID_EDIT_START + 314)
#define RID_SVXSTR_A11Y_IMAGEBULLET_NAME (RID_EDIT_START + 315)
+#define RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION (RID_EDIT_START + 316)
+#define RID_SVXSTR_A11Y_PARAGRAPH_NAME (RID_EDIT_START + 317)
-#if 315 > (RID_EDIT_END-RID_EDIT_START)
+#if 317 > (RID_EDIT_END-RID_EDIT_START)
#error Resource-Ueberlauf in #line, #file
#endif
diff --git a/editeng/inc/editeng/editview.hxx b/editeng/inc/editeng/editview.hxx
index 1b03942f0494..76b804b5af32 100644
--- a/editeng/inc/editeng/editview.hxx
+++ b/editeng/inc/editeng/editview.hxx
@@ -219,6 +219,10 @@ public:
sal_Bool IsCursorAtWrongSpelledWord( sal_Bool bMarkIfWrong = sal_False );
sal_Bool IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMarkIfWrong = sal_False );
+ //IAccessibility2 Implementation 2009-----
+ sal_Bool IsShapeParaFocusable( ) ;
+ sal_Bool WrongSpelledBreakPara(sal_Int32 nPara,sal_uInt16& nStartIndex, sal_uInt16& nEndIndex,sal_Int32 nIndex);
+ //-----IAccessibility2 Implementation 2009
void SpellIgnoreWord();
void ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack = 0 );
diff --git a/editeng/inc/editeng/splwrap.hxx b/editeng/inc/editeng/splwrap.hxx
index 3910c6111312..29ac9249d966 100644
--- a/editeng/inc/editeng/splwrap.hxx
+++ b/editeng/inc/editeng/splwrap.hxx
@@ -39,7 +39,8 @@ namespace com { namespace sun { namespace star { namespace linguistic2 {
}}}}
class Window;
-
+//IAccessibility2 Impplementaton 2009-----
+class SdrObject;
// misc functions ---------------------------------------------------------------
void EDITENG_DLLPUBLIC SvxPrepareAutoCorrect( String &rOldText, String &rNewText );
@@ -61,6 +62,8 @@ private:
::com::sun::star::linguistic2::XSpellChecker1 > xSpell;
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XHyphenator > xHyph;
+//IAccessibility2 Impplementaton 2009-----
+ SdrObject* mpTextObj;
sal_uInt16 nOldLang; // Sprache merken, nur bei Aenderung SetLanguage rufen
sal_Bool bOtherCntnt : 1; // gesetzt => Sonderbereiche zunaechst pruefen
sal_Bool bDialog : 1; // Ist pWin der Svx...Dialog?
@@ -151,6 +154,10 @@ protected:
virtual void AutoCorrect( const String& rAktStr, const String& rNewStr );
virtual void InsertHyphen( const sal_uInt16 nPos ); // Hyphen einfuegen
+//IAccessibility2 Impplementaton 2009-----
+ void SetCurTextObj( SdrObject* pObj ) { mpTextObj = pObj; }
+ SdrObject* GetCurTextObj() { return mpTextObj; }
+//-----IAccessibility2 Impplementaton 2009
};
#endif
diff --git a/editeng/inc/editeng/unoedhlp.hxx b/editeng/inc/editeng/unoedhlp.hxx
index 6ab481bb0049..45a4ba945f78 100644
--- a/editeng/inc/editeng/unoedhlp.hxx
+++ b/editeng/inc/editeng/unoedhlp.hxx
@@ -59,7 +59,16 @@ public:
void SetStartValue( sal_uLong n );
void SetEndValue( sal_uLong n );
};
-
+//IAccessibility2 Implementation 2009-----
+class SvxEditSourceHintEndPara :public SvxEditSourceHint
+{
+public:
+ SvxEditSourceHintEndPara( sal_uInt32 nId )
+ :SvxEditSourceHint(nId) {}
+ SvxEditSourceHintEndPara( sal_uInt32 nId, sal_uInt32 nValue, sal_uInt32 nStart=0, sal_uInt32 nEnd=0 )
+ :SvxEditSourceHint(nId,nValue,nStart){ (void)nEnd; }
+};
+//-----IAccessibility2 Implementation 2009
/** Helper class for common functionality in edit sources
*/
class EDITENG_DLLPUBLIC SvxEditSourceHelper
@@ -96,7 +105,10 @@ public:
@return sal_True, if the range has been successfully determined
*/
- static sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, const EditEngine& rEE, sal_uInt16 nPara, sal_uInt16 nIndex );
+ //IAccessibility2 Implementation 2009-----
+ //static sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, const EditEngine& rEE, USHORT nPara, USHORT nIndex );
+ static sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, const EditEngine& rEE, sal_uInt16 nPara, sal_uInt16 nIndex, sal_Bool bInCell=sal_False );
+ //-----IAccessibility2 Implementation 2009
/** Convert point from edit engine to user coordinate space
diff --git a/editeng/inc/editeng/unoedprx.hxx b/editeng/inc/editeng/unoedprx.hxx
index 269375b710e4..87a37b72551a 100644
--- a/editeng/inc/editeng/unoedprx.hxx
+++ b/editeng/inc/editeng/unoedprx.hxx
@@ -74,9 +74,12 @@ public:
virtual OutputDevice* GetRefDevice() const;
virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const;
virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
- virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const;
- virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const;
- virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const;
+ //IAccessibility2 Implementation 2009-----
+ virtual void SetUpdateModeForAcc( sal_Bool bUp);
+ virtual sal_Bool GetUpdateModeForAcc() const;
+ virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex, sal_Bool bInCell = sal_False ) const;
+ virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const;
+ virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const;
virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
diff --git a/editeng/inc/editeng/unoedsrc.hxx b/editeng/inc/editeng/unoedsrc.hxx
index 9b61340ecf42..860af10c293b 100644
--- a/editeng/inc/editeng/unoedsrc.hxx
+++ b/editeng/inc/editeng/unoedsrc.hxx
@@ -219,7 +219,12 @@ public:
Index of paragraph to query bullet info on
*/
virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const = 0;
-
+//IAccessibility2 Implementation 2009-----
+ virtual String GetNumStr(sal_uInt16) const { return XubString();};
+ //IAccessible2 migration fix
+ virtual void SetUpdateModeForAcc( sal_Bool ) {};
+ virtual sal_Bool GetUpdateModeForAcc() const { return sal_True; };
+//-----IAccessibility2 Implementation 2009
/** Query the bounding rectangle of the given character
@param nPara[0 .. n]
@@ -331,7 +336,10 @@ public:
@return sal_True, if the range has been successfully determined
*/
- virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0;
+ //IAccessibility2 Implementation 2009-----
+// virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0;
+ virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex, sal_Bool bInCell = sal_False ) const = 0;
+ //-----IAccessibility2 Implementation 2009
/** Query number of lines in the formatted paragraph
@@ -542,6 +550,11 @@ public:
*/
virtual sal_Bool Paste() = 0;
+//IAccessibility2 Implementation 2009-----
+ virtual sal_Bool IsWrongSpelledWordAtPos( sal_Int32, sal_Int32 ) { return sal_False; };
+ virtual sal_Bool IsShapeParaFocusable( ) { return sal_True; };
+ virtual sal_Bool BreakParaWrongList(sal_Int32, sal_uInt16&, sal_uInt16&, sal_Int32){ return sal_False; };
+//-----IAccessibility2 Implementation 2009
};
#endif
diff --git a/editeng/inc/editeng/unofored.hxx b/editeng/inc/editeng/unofored.hxx
index 6c636eb0a8d7..ca3f2370b7f5 100644
--- a/editeng/inc/editeng/unofored.hxx
+++ b/editeng/inc/editeng/unofored.hxx
@@ -72,7 +72,10 @@ public:
virtual OutputDevice* GetRefDevice() const;
virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const;
virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
- virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+ //IAccessibility2 Implementation 2009-----
+// virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+ virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex, sal_Bool bInCell = sal_False ) const;
+ //-----IAccessibility2 Implementation 2009
virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const;
virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const;
virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
diff --git a/editeng/inc/editeng/unoforou.hxx b/editeng/inc/editeng/unoforou.hxx
index 0e4eef35028b..0ce314d5ae67 100644
--- a/editeng/inc/editeng/unoforou.hxx
+++ b/editeng/inc/editeng/unoforou.hxx
@@ -93,7 +93,10 @@ public:
virtual OutputDevice* GetRefDevice() const;
virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const;
virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
- virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+ //IAccessibility2 Implementation 2009-----
+// virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+ virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex, sal_Bool bInCell = sal_False ) const;
+ //-----IAccessibility2 Implementation 2009
virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const;
virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const;
virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nPara, sal_uInt16 nLine ) const;
diff --git a/editeng/inc/editeng/unotext.hxx b/editeng/inc/editeng/unotext.hxx
index da473283b48f..80058988147f 100644
--- a/editeng/inc/editeng/unotext.hxx
+++ b/editeng/inc/editeng/unotext.hxx
@@ -218,7 +218,10 @@ public:
virtual OutputDevice* GetRefDevice() const;
virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const;
virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
- virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+ //IAccessibility2 Implementation 2009-----
+// virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+ virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex, sal_Bool bInCell = sal_False ) const;
+ //-----IAccessibility2 Implementation 2009
virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const;
virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const;
virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
@@ -255,7 +258,7 @@ class EDITENG_DLLPUBLIC SvxUnoTextRangeBase : public ::com::sun::star::text::XTe
{
friend class SvxUnoTextRangeEnumeration;
- friend class accessibility::AccessibleEditableTextPara;
+ friend class ::accessibility::AccessibleEditableTextPara;
protected:
SvxEditSource* mpEditSource;
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 49da2a2e4861..daa39bd4bcbb 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -56,6 +56,7 @@
#include <editeng/unoprnms.hxx>
#include <editeng/unoipset.hxx>
#include <editeng/outliner.hxx>
+#include <svl/intitem.hxx>
//------------------------------------------------------------------------
//
@@ -75,7 +76,13 @@
#include "AccessibleHyperlink.hxx"
#include <svtools/colorcfg.hxx>
-
+//IAccessibility2 Implementation 2009-----
+#include <algorithm>
+using namespace std;
+#include "editeng.hrc"
+#include <editeng/eerdll.hxx>
+#include <editeng/numitem.hxx>
+//-----IAccessibility2 Implementation 2009
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans;
@@ -90,12 +97,14 @@ using namespace ::com::sun::star::accessibility;
namespace accessibility
{
+//IAccessibility2 Implementation 2009-----
const SvxItemPropertySet* ImplGetSvxCharAndParaPropertiesSet()
{
// PropertyMap for character and paragraph properties
static const SfxItemPropertyMapEntry aPropMap[] =
{
+ SVX_UNOEDIT_OUTLINER_PROPERTIES,
SVX_UNOEDIT_CHAR_PROPERTIES,
SVX_UNOEDIT_PARA_PROPERTIES,
SVX_UNOEDIT_NUMBERING_PROPERTIE,
@@ -215,7 +224,12 @@ namespace accessibility
DBG_WARNING( "AccessibleEditableTextPara::implGetParagraphBoundary: only a base implementation, ignoring the index" );
rBoundary.startPos = 0;
- rBoundary.endPos = GetTextLen();
+ //IAccessibility2 Implementation 2009-----
+ //rBoundary.endPos = GetTextLen();
+ ::rtl::OUString sText( implGetText() );
+ sal_Int32 nLength = sText.getLength();
+ rBoundary.endPos = nLength;
+ //-----IAccessibility2 Implementation 2009
}
void AccessibleEditableTextPara::implGetLineBoundary( ::com::sun::star::i18n::Boundary& rBoundary, sal_Int32 nIndex )
@@ -359,13 +373,11 @@ namespace accessibility
{
DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
- mpEditSource = pEditSource;
-
WeakBullet::HardRefType aChild( maImageBullet.get() );
if( aChild.is() )
aChild->SetEditSource(pEditSource);
- if( !mpEditSource )
+ if( !pEditSource )
{
// going defunc
UnSetState( AccessibleStateType::SHOWING );
@@ -375,7 +387,9 @@ namespace accessibility
Dispose();
}
-
+//IAccessibility2 Implementation 2009-----
+ mpEditSource = pEditSource;
+//-----IAccessibility2 Implementation 2009
// #108900# Init last text content
try
{
@@ -751,7 +765,11 @@ namespace accessibility
!pStateSet->contains(nStateId) )
{
pStateSet->AddState( nStateId );
+//IAccessibility2 Implementation 2009-----
+ // MT: Removed method IsShapeParaFocusable which was introduced with IA2 - basically it was only about figuring out wether or not the window has the focus, should be solved differently
+ // if(IsShapeParaFocusable())
GotPropertyEvent( uno::makeAny( nStateId ), AccessibleEventId::STATE_CHANGED );
+//-----IAccessibility2 Implementation 2009
}
}
@@ -806,7 +824,10 @@ namespace accessibility
// must provide XAccesibleText by hand, since it comes publicly inherited by XAccessibleEditableText
if ( rType == ::getCppuType((uno::Reference< XAccessibleText > *)0) )
{
+ //IAccessibility2 Implementation 2009-----
+ // uno::Reference< XAccessibleText > aAccText = this;
uno::Reference< XAccessibleText > aAccText = static_cast< XAccessibleEditableText * >(this);
+ //-----IAccessibility2 Implementation 2009
aRet <<= aAccText;
}
else if ( rType == ::getCppuType((uno::Reference< XAccessibleEditableText > *)0) )
@@ -814,11 +835,13 @@ namespace accessibility
uno::Reference< XAccessibleEditableText > aAccEditText = this;
aRet <<= aAccEditText;
}
- else if ( rType == ::getCppuType((uno::Reference< XAccessibleHypertext > *)0) )
+ //IAccessibility2 Implementation 2009-----
+ else if ( rType == ::getCppuType((uno::Reference< XAccessibleHypertext > *)0) )
{
uno::Reference< XAccessibleHypertext > aAccHyperText = this;
aRet <<= aAccHyperText;
}
+ //-----IAccessibility2 Implementation 2009
else
{
aRet = AccessibleTextParaInterfaceBase::queryInterface(rType);
@@ -916,19 +939,67 @@ namespace accessibility
::rtl::OUString SAL_CALL AccessibleEditableTextPara::getAccessibleDescription() throw (uno::RuntimeException)
{
DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
+ //IAccessibility2 Implementation 2009-----
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
+ // append first 40 characters from text, or first line, if shorter
+ // (writer takes first sentence here, but that's not supported
+ // from EditEngine)
+ // throws if defunc
+ ::rtl::OUString aLine;
+
+ if( getCharacterCount() )
+ aLine = getTextAtIndex(0, AccessibleTextType::LINE).SegmentText;
-// ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ // Get the string from the resource for the specified id.
+ String sStr = ::rtl::OUString( String( EditResId (RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION ) ) );
+ String sParaIndex = ::rtl::OUString::valueOf( GetParagraphIndex() );
+ sStr.SearchAndReplace( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "$(ARG)" )),
+ sParaIndex );
+
+ if( aLine.getLength() > MaxDescriptionLen )
+ {
+ ::rtl::OUString aCurrWord;
+ sal_Int32 i;
+
+ // search backward from MaxDescriptionLen for previous word start
+ for( aCurrWord=getTextAtIndex(MaxDescriptionLen, AccessibleTextType::WORD).SegmentText,
+ i=MaxDescriptionLen,
+ aLine=::rtl::OUString();
+ i>=0;
+ --i )
+ {
+ if( getTextAtIndex(i, AccessibleTextType::WORD).SegmentText != aCurrWord )
+ {
+ if( i == 0 )
+ // prevent completely empty string
+ aLine = getTextAtIndex(0, AccessibleTextType::WORD).SegmentText;
+ else
+ aLine = getTextRange(0, i);
+ }
+ }
+ }
- return ::rtl::OUString();
+ return ::rtl::OUString( sStr ) + aLine;
+ //-----IAccessibility2 Implementation 2009
}
::rtl::OUString SAL_CALL AccessibleEditableTextPara::getAccessibleName() throw (uno::RuntimeException)
{
DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
-// ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
+ // throws if defunc
+ sal_Int32 nPara( GetParagraphIndex() );
- return ::rtl::OUString();
+ // Get the string from the resource for the specified id.
+ String sStr = ::rtl::OUString( String( EditResId (RID_SVXSTR_A11Y_PARAGRAPH_NAME) ) );
+ String sParaIndex = ::rtl::OUString::valueOf( nPara );
+ sStr.SearchAndReplace( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "$(ARG)" )),
+ sParaIndex );
+
+ return ::rtl::OUString( sStr );
}
uno::Reference< XAccessibleRelationSet > SAL_CALL AccessibleEditableTextPara::getAccessibleRelationSet() throw (uno::RuntimeException)
@@ -987,7 +1058,18 @@ namespace accessibility
if( !pStateSet )
return uno::Reference<XAccessibleStateSet>();
-
+//IAccessibility2 Implementation 2009-----
+ uno::Reference<XAccessibleStateSet> xParentStates;
+ if (getAccessibleParent().is())
+ {
+ uno::Reference<XAccessibleContext> xParentContext = getAccessibleParent()->getAccessibleContext();
+ xParentStates = xParentContext->getAccessibleStateSet();
+ }
+ if (xParentStates.is() && xParentStates->contains(AccessibleStateType::EDITABLE) )
+ {
+ pStateSet->AddState(AccessibleStateType::EDITABLE);
+ }
+//-----IAccessibility2 Implementation 2009
return uno::Reference<XAccessibleStateSet>( new ::utl::AccessibleStateSetHelper (*pStateSet) );
}
@@ -1209,6 +1291,17 @@ namespace accessibility
GetParagraphIndex() == aSelection.nEndPara )
{
// caret is always nEndPara,nEndPos
+ //IAccessibility2 Implementation 2009-----
+ EBulletInfo aBulletInfo = GetTextForwarder().GetBulletInfo( static_cast< sal_uInt16 >(GetParagraphIndex()) );
+ if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND &&
+ aBulletInfo.bVisible &&
+ aBulletInfo.nType != SVX_NUM_BITMAP )
+ {
+ sal_Int32 nBulletLen = aBulletInfo.aText.Len();
+ if( aSelection.nEndPos - nBulletLen >= 0 )
+ return aSelection.nEndPos - nBulletLen;
+ }
+ //-----IAccessibility2 Implementation 2009
return aSelection.nEndPos;
}
@@ -1234,19 +1327,172 @@ namespace accessibility
return OCommonAccessibleText::getCharacter( nIndex );
}
+ //IAccessibility2 Implementation 2009-----
+ static uno::Sequence< ::rtl::OUString > getAttributeNames()
+ {
+ static uno::Sequence< ::rtl::OUString >* pNames = NULL;
+
+ if( pNames == NULL )
+ {
+ uno::Sequence< ::rtl::OUString >* pSeq = new uno::Sequence< ::rtl::OUString >( 21 );
+ ::rtl::OUString* pStrings = pSeq->getArray();
+ sal_Int32 i = 0;
+ #define STR(x) pStrings[i++] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(x))
+ //STR("CharBackColor");
+ STR("CharColor");
+ STR("CharContoured");
+ STR("CharEmphasis");
+ STR("CharEscapement");
+ STR("CharFontName");
+ STR("CharHeight");
+ STR("CharPosture");
+ STR("CharShadowed");
+ STR("CharStrikeout");
+ STR("CharUnderline");
+ STR("CharUnderlineColor");
+ STR("CharWeight");
+ STR("NumberingLevel");
+ STR("NumberingRules");
+ STR("ParaAdjust");
+ STR("ParaBottomMargin");
+ STR("ParaFirstLineIndent");
+ STR("ParaLeftMargin");
+ STR("ParaLineSpacing");
+ STR("ParaRightMargin");
+ STR("ParaTabStops");
+ #undef STR
+ DBG_ASSERT( i == pSeq->getLength(), "Please adjust length" );
+ if( i != pSeq->getLength() )
+ pSeq->realloc( i );
+ pNames = pSeq;
+ }
+ return *pNames;
+ }
+//-----IAccessibility2 Implementation 2009
+ struct IndexCompare
+ {
+ const PropertyValue* pValues;
+ IndexCompare( const PropertyValue* pVals ) : pValues(pVals) {}
+ bool operator() ( const sal_Int32& a, const sal_Int32& b ) const
+ {
+ return (pValues[a].Name < pValues[b].Name) ? true : false;
+ }
+ };
+
+ String AccessibleEditableTextPara::GetFieldTypeNameAtIndex(sal_Int32 nIndex)
+ {
+ String strFldType;
+ SvxAccessibleTextAdapter& rCacheTF = GetTextForwarder();
+ //For field object info
+ sal_Int32 nParaIndex = GetParagraphIndex();
+ sal_Int32 nAllFieldLen = 0;
+ sal_Int32 nField = rCacheTF.GetFieldCount(sal_uInt16(nParaIndex)), nFoundFieldIndex = -1;
+ EFieldInfo ree;
+ sal_Int32 reeBegin, reeEnd;
+ sal_Int32 nFieldType = -1;
+ for(sal_uInt16 j = 0; j < nField; j++)
+ {
+ ree = rCacheTF.GetFieldInfo(sal_uInt16(nParaIndex), j);
+ reeBegin = ree.aPosition.nIndex + nAllFieldLen;
+ reeEnd = reeBegin + ree.aCurrentText.Len();
+ nAllFieldLen += (ree.aCurrentText.Len() - 1);
+ if( reeBegin > nIndex )
+ {
+ break;
+ }
+ if( nIndex >= reeBegin && nIndex < reeEnd )
+ {
+ nFoundFieldIndex = j;
+ break;
+ }
+ }
+ if( nFoundFieldIndex >= 0 )
+ {
+ // So we get a field, check its type now.
+ nFieldType = ree.pFieldItem->GetField()->GetClassId() ;
+ }
+ switch(nFieldType)
+ {
+ case SVX_DATEFIELD:
+ {
+ const SvxDateField* pDateField = static_cast< const SvxDateField* >(ree.pFieldItem->GetField());
+ if (pDateField)
+ {
+ if (pDateField->GetType() == SVXDATETYPE_FIX)
+ strFldType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("date (fixed)"));
+ else if (pDateField->GetType() == SVXDATETYPE_VAR)
+ strFldType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("date (variable)"));
+ }
+ }
+ break;
+ case SVX_PAGEFIELD:
+ strFldType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("page-number"));
+ break;
+ //support the sheet name & pages fields
+ case SVX_PAGESFIELD:
+ strFldType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("page-count"));
+ break;
+ case SVX_TABLEFIELD:
+ strFldType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sheet-name"));
+ break;
+ //End
+ case SVX_TIMEFIELD:
+ strFldType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("time"));
+ break;
+ case SVX_EXT_TIMEFIELD:
+ {
+ const SvxExtTimeField* pTimeField = static_cast< const SvxExtTimeField* >(ree.pFieldItem->GetField());
+ if (pTimeField)
+ {
+ if (pTimeField->GetType() == SVXTIMETYPE_FIX)
+ strFldType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("time (fixed)"));
+ else if (pTimeField->GetType() == SVXTIMETYPE_VAR)
+ strFldType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("time (variable)"));
+ }
+ }
+ break;
+ case SVX_AUTHORFIELD:
+ strFldType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("author"));
+ break;
+ case SVX_EXT_FILEFIELD:
+ case SVX_FILEFIELD:
+ strFldType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file name"));
+ default:
+ break;
+ }
+ return strFldType;
+ }
uno::Sequence< beans::PropertyValue > SAL_CALL AccessibleEditableTextPara::getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rRequestedAttributes ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
::vos::OGuard aGuard( Application::GetSolarMutex() );
- CheckIndex(nIndex); // may throw IndexOutOfBoundsException
-
+ //IAccessibility2 Implementation 2009-----
+ //Skip the bullet range to ingnore the bullet text
+ SvxTextForwarder& rCacheTF = GetTextForwarder();
+ EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< sal_uInt16 >(GetParagraphIndex()) );
+ if (aBulletInfo.bVisible)
+ nIndex += aBulletInfo.aText.Len();
+ if (nIndex != 0 && nIndex >= getCharacterCount())
+ nIndex = getCharacterCount()-1;
+ //
+ if (nIndex != 0)
+ CheckIndex(nIndex); // may throw IndexOutOfBoundsException
+
+ bool bSupplementalMode = false;
+ uno::Sequence< ::rtl::OUString > aPropertyNames = rRequestedAttributes;
+ if (aPropertyNames.getLength() == 0)
+ {
+ bSupplementalMode = true;
+ aPropertyNames = getAttributeNames();
+ }
// get default attribues...
- ::comphelper::SequenceAsHashMap aPropHashMap( getDefaultAttributes( rRequestedAttributes ) );
+ ::comphelper::SequenceAsHashMap aPropHashMap( getDefaultAttributes( aPropertyNames ) );
// ... and override them with the direct attributes from the specific position
- uno::Sequence< beans::PropertyValue > aRunAttribs( getRunAttributes( nIndex, rRequestedAttributes ) );
+ uno::Sequence< beans::PropertyValue > aRunAttribs( getRunAttributes( nIndex, aPropertyNames ) );
+ //-----IAccessibility2 Implementation 2009
sal_Int32 nRunAttribs = aRunAttribs.getLength();
const beans::PropertyValue *pRunAttrib = aRunAttribs.getConstArray();
for (sal_Int32 k = 0; k < nRunAttribs; ++k)
@@ -1294,7 +1540,57 @@ namespace accessibility
rRes.Handle = -1;
rRes.State = bIsDirectVal ? PropertyState_DIRECT_VALUE : PropertyState_DEFAULT_VALUE;
}
-
+ //IAccessibility2 Implementation 2009-----
+ if( bSupplementalMode )
+ {
+ _correctValues( nIndex, aRes );
+ // NumberingPrefix
+ nRes = aRes.getLength();
+ aRes.realloc( nRes + 1 );
+ pRes = aRes.getArray();
+ beans::PropertyValue &rRes = pRes[nRes];
+ rRes.Name = rtl::OUString::createFromAscii("NumberingPrefix");
+ ::rtl::OUString numStr;
+ if (aBulletInfo.nType != SVX_NUM_CHAR_SPECIAL && aBulletInfo.nType != SVX_NUM_BITMAP)
+ numStr = (::rtl::OUString)aBulletInfo.aText;
+ rRes.Value <<= numStr;
+ rRes.Handle = -1;
+ rRes.State = PropertyState_DIRECT_VALUE;
+ //-----IAccessibility2 Implementation 2009
+ //For field object.
+ String strFieldType = GetFieldTypeNameAtIndex(nIndex);
+ if (strFieldType.Len() > 0)
+ {
+ nRes = aRes.getLength();
+ aRes.realloc( nRes + 1 );
+ pRes = aRes.getArray();
+ beans::PropertyValue &rResField = pRes[nRes];
+ beans::PropertyValue aFieldType;
+ rResField.Name = rtl::OUString::createFromAscii("FieldType");
+ rResField.Value <<= rtl::OUString(strFieldType.ToLowerAscii());
+ rResField.Handle = -1;
+ rResField.State = PropertyState_DIRECT_VALUE;
+ }
+ //sort property values
+ // build sorted index array
+ sal_Int32 nLength = aRes.getLength();
+ const beans::PropertyValue* pPairs = aRes.getConstArray();
+ sal_Int32* pIndices = new sal_Int32[nLength];
+ sal_Int32 i = 0;
+ for( i = 0; i < nLength; i++ )
+ pIndices[i] = i;
+ sort( &pIndices[0], &pIndices[nLength], IndexCompare(pPairs) );
+ // create sorted sequences accoring to index array
+ uno::Sequence<beans::PropertyValue> aNewValues( nLength );
+ beans::PropertyValue* pNewValues = aNewValues.getArray();
+ for( i = 0; i < nLength; i++ )
+ {
+ pNewValues[i] = pPairs[pIndices[i]];
+ }
+ delete[] pIndices;
+ //
+ return aNewValues;
+ }
return aRes;
}
@@ -1350,7 +1646,10 @@ namespace accessibility
DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
::vos::OGuard aGuard( Application::GetSolarMutex() );
-
+ //IAccessibility2 Implementation 2009-----
+ if ((rPoint.X <= 0) && (rPoint.Y <= 0))
+ return 0;
+ //-----IAccessibility2 Implementation 2009
sal_uInt16 nPara, nIndex;
// offset from surrounding cell/shape
@@ -1482,7 +1781,277 @@ namespace accessibility
return OCommonAccessibleText::getTextRange(nStartIndex, nEndIndex);
}
-
+//IAccessibility2 Implementation 2009-----
+ void AccessibleEditableTextPara::_correctValues( const sal_Int32 /* nIndex */,
+ uno::Sequence< PropertyValue >& rValues)
+ {
+ SvxTextForwarder& rCacheTF = GetTextForwarder();
+ sal_Int32 nRes = rValues.getLength();
+ beans::PropertyValue *pRes = rValues.getArray();
+ for (sal_Int32 i = 0; i < nRes; ++i)
+ {
+ beans::PropertyValue &rRes = pRes[i];
+ // Char color
+ if (rRes.Name.compareTo(::rtl::OUString::createFromAscii("CharColor"))==0)
+ {
+ uno::Any &anyChar = rRes.Value;
+ sal_uInt32 crChar = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved));
+ if (COL_AUTO == crChar )
+ {
+ uno::Reference< ::com::sun::star::accessibility::XAccessibleComponent > xComponent;
+ if (mxParent.is())
+ {
+ xComponent.set(mxParent,uno::UNO_QUERY);
+ }
+ else
+ {
+ xComponent.set(m_xAccInfo,uno::UNO_QUERY);
+ }
+ if (xComponent.is())
+ {
+ uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > xContext(xComponent,uno::UNO_QUERY);
+ if (xContext->getAccessibleRole() == AccessibleRole::SHAPE
+ || xContext->getAccessibleRole() == AccessibleRole::TABLE_CELL)
+ {
+ anyChar <<= COL_BLACK;
+ }
+ else
+ {
+ Color cr(xComponent->getBackground());
+ crChar = cr.IsDark() ? COL_WHITE : COL_BLACK;
+ anyChar <<= crChar;
+ }
+ }
+ }
+ continue;
+ }
+ // Underline
+ if(rRes.Name.compareTo(::rtl::OUString::createFromAscii("CharUnderline"))==0)
+ {
+ /*
+ // MT: Implement XAccessibleTextMarkup, mark with TextMarkupType::SPELLCHECK. This way done in SW.
+ if (IsCurrentEditorEnableAutoSpell( mxParent ))
+ {
+ try
+ {
+ SvxEditViewForwarder& rCacheVF = GetEditViewForwarder( sal_False );
+ sal_Bool bWrong = rCacheVF.IsWrongSpelledWordAtPos( GetParagraphIndex(), nIndex );
+ if ( bWrong )
+ {
+ uno::Any &anyUnderLine = pRes[9].Value;
+ // MT IA2: Not needed? sal_uInt16 crUnderLine = (sal_uInt16)(anyUnderLine.pReserved);
+ anyUnderLine <<= (sal_uInt16)UNDERLINE_WAVE;
+ }
+ }
+ catch( const uno::RuntimeException& )
+ {
+ }
+ }
+ */
+ continue;
+ }
+ // Underline color && Mis-spell
+ if(rRes.Name.compareTo(::rtl::OUString::createFromAscii("CharUnderlineColor"))==0)
+ {
+ uno::Any &anyCharUnderLine = rRes.Value;
+ sal_uInt32 crCharUnderLine = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>( anyCharUnderLine.pReserved));
+ if (COL_AUTO == crCharUnderLine )
+ {
+ uno::Reference< ::com::sun::star::accessibility::XAccessibleComponent > xComponent;
+ if (mxParent.is())
+ {
+ xComponent.set(mxParent,uno::UNO_QUERY);
+ }
+ else
+ {
+ xComponent.set(m_xAccInfo,uno::UNO_QUERY);
+ }
+ if (xComponent.is())
+ {
+ uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > xContext(xComponent,uno::UNO_QUERY);
+ if (xContext->getAccessibleRole() == AccessibleRole::SHAPE
+ || xContext->getAccessibleRole() == AccessibleRole::TABLE_CELL)
+ {
+ anyCharUnderLine <<= COL_BLACK;
+ }
+ else
+ {
+ Color cr(xComponent->getBackground());
+ crCharUnderLine = cr.IsDark() ? COL_WHITE : COL_BLACK;
+ anyCharUnderLine <<= crCharUnderLine;
+ }
+ }
+ }
+ // MT: Implement XAccessibleTextMarkup, mark with TextMarkupType::SPELLCHECK. This way done in SW.
+ /*
+ if (IsCurrentEditorEnableAutoSpell( mxParent ))
+ {
+ try
+ {
+ SvxEditViewForwarder& rCacheVF = GetEditViewForwarder( sal_False );
+ sal_Bool bWrong = rCacheVF.IsWrongSpelledWordAtPos( GetParagraphIndex(), nIndex );
+ if ( bWrong )
+ {
+ uno::Any &anyUnderLineColor = rRes.Value;
+ // MT IA2: Not needed? sal_uInt16 crUnderLineColor = (sal_uInt16)(anyUnderLineColor.pReserved);
+ anyUnderLineColor <<= COL_LIGHTRED;
+ }
+ }
+ catch( const uno::RuntimeException& )
+ {
+ }
+ }
+ */
+ continue;
+ }
+ // NumberingLevel
+ if(rRes.Name.compareTo(::rtl::OUString::createFromAscii("NumberingLevel"))==0)
+ {
+ const SvxNumBulletItem& rNumBullet = ( SvxNumBulletItem& )rCacheTF.GetParaAttribs(static_cast< sal_uInt16 >(GetParagraphIndex())).Get(EE_PARA_NUMBULLET);
+ if(rNumBullet.GetNumRule()->GetLevelCount()==0)
+ {
+ rRes.Value <<= (sal_Int16)-1;
+ rRes.Handle = -1;
+ rRes.State = PropertyState_DIRECT_VALUE;
+ }
+ else
+ {
+// SvxAccessibleTextPropertySet aPropSet( &GetEditSource(),
+// ImplGetSvxCharAndParaPropertiesMap() );
+ // MT IA2 TODO: Check if this is the correct replacement for ImplGetSvxCharAndParaPropertiesMap
+ SvxAccessibleTextPropertySet aPropSet( &GetEditSource(), ImplGetSvxTextPortionSvxPropertySet() );
+
+ aPropSet.SetSelection( MakeSelection( 0, GetTextLen() ) );
+ rRes.Value = aPropSet._getPropertyValue( rRes.Name, mnParagraphIndex );
+ rRes.State = aPropSet._getPropertyState( rRes.Name, mnParagraphIndex );
+ rRes.Handle = -1;
+ }
+ continue;
+ }
+ // NumberingRules
+ if(rRes.Name.compareTo(::rtl::OUString::createFromAscii("NumberingRules"))==0)
+ {
+ SfxItemSet aAttribs = rCacheTF.GetParaAttribs( static_cast< sal_uInt16 >(GetParagraphIndex()) );
+ sal_Bool bVis = ((const SfxUInt16Item&)aAttribs.Get( EE_PARA_BULLETSTATE )).GetValue() ? sal_True : sal_False;
+ if(bVis)
+ {
+ rRes.Value <<= (sal_Int16)-1;
+ rRes.Handle = -1;
+ rRes.State = PropertyState_DIRECT_VALUE;
+ }
+ else
+ {
+ // MT IA2 TODO: Check if this is the correct replacement for ImplGetSvxCharAndParaPropertiesMap
+ SvxAccessibleTextPropertySet aPropSet( &GetEditSource(), ImplGetSvxTextPortionSvxPropertySet() );
+ aPropSet.SetSelection( MakeSelection( 0, GetTextLen() ) );
+ rRes.Value = aPropSet._getPropertyValue( rRes.Name, mnParagraphIndex );
+ rRes.State = aPropSet._getPropertyState( rRes.Name, mnParagraphIndex );
+ rRes.Handle = -1;
+ }
+ continue;
+ }
+ }
+ }
+ sal_Int32 AccessibleEditableTextPara::SkipField(sal_Int32 nIndex, sal_Bool bForward)
+ {
+ sal_Int32 nParaIndex = GetParagraphIndex();
+ SvxAccessibleTextAdapter& rCacheTF = GetTextForwarder();
+ sal_Int32 nAllFieldLen = 0;
+ sal_Int32 nField = rCacheTF.GetFieldCount(sal_uInt16(nParaIndex)), nFoundFieldIndex = -1;
+ EFieldInfo ree;
+ sal_Int32 reeBegin=0, reeEnd=0;
+ for(sal_uInt16 j = 0; j < nField; j++)
+ {
+ ree = rCacheTF.GetFieldInfo(sal_uInt16(nParaIndex), j);
+ reeBegin = ree.aPosition.nIndex + nAllFieldLen;
+ reeEnd = reeBegin + ree.aCurrentText.Len();
+ nAllFieldLen += (ree.aCurrentText.Len() - 1);
+ if( reeBegin > nIndex )
+ {
+ break;
+ }
+ if( nIndex >= reeBegin && nIndex < reeEnd )
+ {
+ if(ree.pFieldItem->GetField()->GetClassId() != SVX_URLFIELD)
+ {
+ nFoundFieldIndex = j;
+ break;
+ }
+ }
+ }
+ if( nFoundFieldIndex >= 0 )
+ {
+ if( bForward )
+ return reeEnd - 1;
+ else
+ return reeBegin;
+ }
+ return nIndex;
+ }
+ sal_Bool AccessibleEditableTextPara::ExtendByField( ::com::sun::star::accessibility::TextSegment& Segment )
+ {
+ sal_Int32 nParaIndex = GetParagraphIndex();
+ SvxAccessibleTextAdapter& rCacheTF = GetTextForwarder();
+ sal_Int32 nAllFieldLen = 0;
+ sal_Int32 nField = rCacheTF.GetFieldCount(sal_uInt16(nParaIndex)), nFoundFieldIndex = -1;
+ EFieldInfo ree;
+ sal_Int32 reeBegin=0, reeEnd=0;
+ for(sal_uInt16 j = 0; j < nField; j++)
+ {
+ ree = rCacheTF.GetFieldInfo(sal_uInt16(nParaIndex), j);
+ reeBegin = ree.aPosition.nIndex + nAllFieldLen;
+ reeEnd = reeBegin + ree.aCurrentText.Len();
+ nAllFieldLen += (ree.aCurrentText.Len() - 1);
+ if( reeBegin > Segment.SegmentEnd )
+ {
+ break;
+ }
+ if( (Segment.SegmentEnd > reeBegin && Segment.SegmentEnd <= reeEnd) ||
+ (Segment.SegmentStart >= reeBegin && Segment.SegmentStart < reeEnd) )
+ {
+ if(ree.pFieldItem->GetField()->GetClassId() != SVX_URLFIELD)
+ {
+ nFoundFieldIndex = j;
+ break;
+ }
+ }
+ }
+ sal_Bool bExtend = sal_False;
+ if( nFoundFieldIndex >= 0 )
+ {
+ if( Segment.SegmentEnd < reeEnd )
+ {
+ Segment.SegmentEnd = reeEnd;
+ bExtend = sal_True;
+ }
+ if( Segment.SegmentStart > reeBegin )
+ {
+ Segment.SegmentStart = reeBegin;
+ bExtend = sal_True;
+ }
+ if( bExtend )
+ {
+ //If there is a bullet before the field, should add the bullet length into the segment.
+ EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo(sal_uInt16(nParaIndex));
+ int nBulletLen = aBulletInfo.aText.Len();
+ if (nBulletLen > 0)
+ {
+ Segment.SegmentEnd += nBulletLen;
+ if (nFoundFieldIndex > 0)
+ Segment.SegmentStart += nBulletLen;
+ Segment.SegmentText = GetTextRange(Segment.SegmentStart, Segment.SegmentEnd);
+ //After get the correct field name, should restore the offset value which don't contain the bullet.
+ Segment.SegmentEnd -= nBulletLen;
+ if (nFoundFieldIndex > 0)
+ Segment.SegmentStart -= nBulletLen;
+ }
+ else
+ Segment.SegmentText = GetTextRange(Segment.SegmentStart, Segment.SegmentEnd);
+ }
+ }
+ return bExtend;
+ }
+//-----IAccessibility2 Implementation 2009
::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleEditableTextPara::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
@@ -1498,6 +2067,15 @@ namespace accessibility
switch( aTextType )
{
+ //IAccessibility2 Implementation 2009-----
+ case AccessibleTextType::CHARACTER:
+ case AccessibleTextType::WORD:
+ {
+ aResult = OCommonAccessibleText::getTextAtIndex( nIndex, aTextType );
+ ExtendByField( aResult );
+ break;
+ }
+ //-----IAccessibility2 Implementation 2009
// Not yet handled by OCommonAccessibleText. Missing
// implGetAttributeRunBoundary() method there
case AccessibleTextType::ATTRIBUTE_RUN:
@@ -1512,17 +2090,86 @@ namespace accessibility
else
{
sal_uInt16 nStartIndex, nEndIndex;
-
+ //For the bullet paragraph, the bullet string is ingnored for IAText::attributes() function.
+ SvxTextForwarder& rCacheTF = GetTextForwarder();
+ // MT IA2: Not used? sal_Int32 nBulletLen = 0;
+ EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< sal_uInt16 >(GetParagraphIndex()) );
+ if (aBulletInfo.bVisible)
+ nIndex += aBulletInfo.aText.Len();
+ if (nIndex != 0 && nIndex >= getCharacterCount())
+ nIndex = getCharacterCount()-1;
+ CheckPosition(nIndex);
if( GetAttributeRun(nStartIndex, nEndIndex, nIndex) )
{
aResult.SegmentText = GetTextRange(nStartIndex, nEndIndex);
+ if (aBulletInfo.bVisible)
+ {
+ nStartIndex -= aBulletInfo.aText.Len();
+ nEndIndex -= aBulletInfo.aText.Len();
+ }
aResult.SegmentStart = nStartIndex;
aResult.SegmentEnd = nEndIndex;
}
+ }
+ break;
+ }
+//IAccessibility2 Implementation 2009-----
+ case AccessibleTextType::LINE:
+ {
+ SvxTextForwarder& rCacheTF = GetTextForwarder();
+ sal_Int32 nParaIndex = GetParagraphIndex();
+ // MT IA2: Not needed? sal_Int32 nTextLen = rCacheTF.GetTextLen( static_cast< sal_uInt16 >( nParaIndex ) );
+ CheckPosition(nIndex);
+ if (nIndex != 0 && nIndex == getCharacterCount())
+ --nIndex;
+ sal_uInt16 nLine, nLineCount=rCacheTF.GetLineCount( static_cast< sal_uInt16 >( nParaIndex ) );
+ sal_Int32 nCurIndex;
+ //the problem is that rCacheTF.GetLineLen() will include the bullet length. But for the bullet line,
+ //the text value doesn't contain the bullet characters. all of the bullet and numbering info are exposed
+ //by the IAText::attributes(). So here must do special support for bullet line.
+ sal_Int32 nBulletLen = 0;
+ for( nLine=0, nCurIndex=0; nLine<nLineCount; ++nLine )
+ {
+ if (nLine == 0)
+ {
+ EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< sal_uInt16 >(nParaIndex) );
+ if (aBulletInfo.bVisible)
+ {
+ //in bullet or numbering;
+ nBulletLen = aBulletInfo.aText.Len();
+ }
+ }
+ //nCurIndex += rCacheTF.GetLineLen( static_cast< sal_uInt16 >( nParaIndex ), nLine);
+ sal_Int32 nLineLen = rCacheTF.GetLineLen( static_cast< sal_uInt16 >( nParaIndex ), nLine);
+ if (nLine == 0)
+ nCurIndex += nLineLen - nBulletLen;
+ else
+ nCurIndex += nLineLen;
+ if( nCurIndex > nIndex )
+ {
+ if (nLine ==0)
+ {
+ //aResult.SegmentStart = nCurIndex - rCacheTF.GetLineLen(static_cast< sal_uInt16 >( nParaIndex ), nLine);
+ aResult.SegmentStart = 0;
+ aResult.SegmentEnd = nCurIndex;
+ //aResult.SegmentText = GetTextRange( aResult.SegmentStart, aResult.SegmentEnd );
+ aResult.SegmentText = GetTextRange( aResult.SegmentStart, aResult.SegmentEnd + nBulletLen);
+ break;
+ }
+ else
+ {
+ //aResult.SegmentStart = nCurIndex - rCacheTF.GetLineLen(static_cast< sal_uInt16 >( nParaIndex ), nLine);
+ aResult.SegmentStart = nCurIndex - nLineLen;
+ aResult.SegmentEnd = nCurIndex;
+ //aResult.SegmentText = GetTextRange( aResult.SegmentStart, aResult.SegmentEnd );
+ aResult.SegmentText = GetTextRange( aResult.SegmentStart + nBulletLen, aResult.SegmentEnd + nBulletLen);
+ break;
+ }
+ }
}
break;
}
-
+//-----IAccessibility2 Implementation 2009
default:
aResult = OCommonAccessibleText::getTextAtIndex( nIndex, aTextType );
break;
@@ -1543,7 +2190,9 @@ namespace accessibility
::com::sun::star::accessibility::TextSegment aResult;
aResult.SegmentStart = -1;
aResult.SegmentEnd = -1;
-
+//IAccessibility2 Implementation 2009-----
+ i18n::Boundary aBoundary;
+//-----IAccessibility2 Implementation 2009
switch( aTextType )
{
// Not yet handled by OCommonAccessibleText. Missing
@@ -1581,7 +2230,118 @@ namespace accessibility
}
break;
}
+ //IAccessibility2 Implementation 2009-----
+ case AccessibleTextType::LINE:
+ {
+ SvxTextForwarder& rCacheTF = GetTextForwarder();
+ sal_Int32 nParaIndex = GetParagraphIndex();
+ // MT IA2 not needed? sal_Int32 nTextLen = rCacheTF.GetTextLen( static_cast< sal_uInt16 >( nParaIndex ) );
+
+ CheckPosition(nIndex);
+
+ sal_uInt16 nLine, nLineCount=rCacheTF.GetLineCount( static_cast< sal_uInt16 >( nParaIndex ) );
+ //the problem is that rCacheTF.GetLineLen() will include the bullet length. But for the bullet line,
+ //the text value doesn't contain the bullet characters. all of the bullet and numbering info are exposed
+ //by the IAText::attributes(). So here must do special support for bullet line.
+ sal_Int32 nCurIndex=0, nLastIndex=0, nCurLineLen=0;
+ sal_Int32 nLastLineLen = 0, nBulletLen = 0;;
+ // get the line before the line the index points into
+ for( nLine=0, nCurIndex=0, nLastIndex=0; nLine<nLineCount; ++nLine )
+ {
+ nLastIndex = nCurIndex;
+ if (nLine == 0)
+ {
+ EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< sal_uInt16 >(nParaIndex) );
+ if (aBulletInfo.bVisible)
+ {
+ //in bullet or numbering;
+ nBulletLen = aBulletInfo.aText.Len();
+ }
+ }
+ if (nLine == 1)
+ nLastLineLen = nCurLineLen - nBulletLen;
+ else
+ nLastLineLen = nCurLineLen;
+ nCurLineLen = rCacheTF.GetLineLen(static_cast< sal_uInt16 >( nParaIndex ), nLine);
+ //nCurIndex += nCurLineLen;
+ if (nLine == 0)
+ nCurIndex += nCurLineLen - nBulletLen;
+ else
+ nCurIndex += nCurLineLen;
+
+ //if( nCurIndex > nIndex &&
+ //nLastIndex > nCurLineLen )
+ if (nCurIndex > nIndex)
+ {
+ if (nLine == 0)
+ {
+ break;
+ }
+ else if (nLine == 1)
+ {
+ aResult.SegmentStart = 0;
+ aResult.SegmentEnd = static_cast< sal_uInt16 >( nLastIndex );
+ aResult.SegmentText = GetTextRange( aResult.SegmentStart, aResult.SegmentEnd + nBulletLen);
+ break;
+ }
+ else
+ {
+ //aResult.SegmentStart = nLastIndex - nCurLineLen;
+ aResult.SegmentStart = nLastIndex - nLastLineLen;
+ aResult.SegmentEnd = static_cast< sal_uInt16 >( nLastIndex );
+ aResult.SegmentText = GetTextRange( aResult.SegmentStart + nBulletLen, aResult.SegmentEnd + nBulletLen);
+ break;
+ }
+ }
+ }
+
+ break;
+ }
+ case AccessibleTextType::WORD:
+ {
+ nIndex = SkipField( nIndex, sal_False);
+ ::rtl::OUString sText( implGetText() );
+ sal_Int32 nLength = sText.getLength();
+
+ // get word at index
+ implGetWordBoundary( aBoundary, nIndex );
+
+
+ //sal_Int32 curWordStart = aBoundary.startPos;
+ //sal_Int32 preWordStart = curWordStart;
+ sal_Int32 curWordStart , preWordStart;
+ if( aBoundary.startPos == -1 || aBoundary.startPos > nIndex)
+ curWordStart = preWordStart = nIndex;
+ else
+ curWordStart = preWordStart = aBoundary.startPos;
+
+ // get previous word
+
+ sal_Bool bWord = sal_False;
+ //while ( preWordStart > 0 && aBoundary.startPos == curWordStart)
+ while ( (preWordStart >= 0 && !bWord ) || ( aBoundary.endPos > curWordStart ) )
+ {
+ preWordStart--;
+ bWord = implGetWordBoundary( aBoundary, preWordStart );
+ }
+ if ( bWord && implIsValidBoundary( aBoundary, nLength ) )
+ {
+ aResult.SegmentText = sText.copy( aBoundary.startPos, aBoundary.endPos - aBoundary.startPos );
+ aResult.SegmentStart = aBoundary.startPos;
+ aResult.SegmentEnd = aBoundary.endPos;
+ ExtendByField( aResult );
+ }
+ }
+ break;
+ case AccessibleTextType::CHARACTER:
+ {
+ nIndex = SkipField( nIndex, sal_False);
+ aResult = OCommonAccessibleText::getTextBeforeIndex( nIndex, aTextType );
+ ExtendByField( aResult );
+ break;
+ }
+ //-----IAccessibility2 Implementation 2009
default:
aResult = OCommonAccessibleText::getTextBeforeIndex( nIndex, aTextType );
break;
@@ -1602,7 +2362,9 @@ namespace accessibility
::com::sun::star::accessibility::TextSegment aResult;
aResult.SegmentStart = -1;
aResult.SegmentEnd = -1;
-
+//IAccessibility2 Implementation 2009-----
+ i18n::Boundary aBoundary;
+//-----IAccessibility2 Implementation 2009
switch( aTextType )
{
case AccessibleTextType::ATTRIBUTE_RUN:
@@ -1625,6 +2387,93 @@ namespace accessibility
break;
}
+//IAccessibility2 Implementation 2009-----
+ case AccessibleTextType::LINE:
+ {
+ SvxTextForwarder& rCacheTF = GetTextForwarder();
+ sal_Int32 nParaIndex = GetParagraphIndex();
+ // MT IA2 not needed? sal_Int32 nTextLen = rCacheTF.GetTextLen( static_cast< sal_uInt16 >( nParaIndex ) );
+
+ CheckPosition(nIndex);
+
+ sal_uInt16 nLine, nLineCount=rCacheTF.GetLineCount( static_cast< sal_uInt16 >( nParaIndex ) );
+ sal_Int32 nCurIndex;
+ //the problem is that rCacheTF.GetLineLen() will include the bullet length. But for the bullet line,
+ //the text value doesn't contain the bullet characters. all of the bullet and numbering info are exposed
+ //by the IAText::attributes(). So here must do special support for bullet line.
+ sal_Int32 nBulletLen = 0;
+ // get the line after the line the index points into
+ for( nLine=0, nCurIndex=0; nLine<nLineCount; ++nLine )
+ {
+ if (nLine == 0)
+ {
+ EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< sal_uInt16 >(nParaIndex) );
+ if (aBulletInfo.bVisible)
+ {
+ //in bullet or numbering;
+ nBulletLen = aBulletInfo.aText.Len();
+ }
+ }
+ //nCurIndex += rCacheTF.GetLineLen(static_cast< sal_uInt16 >( nParaIndex ), nLine);
+ sal_Int32 nLineLen = rCacheTF.GetLineLen( static_cast< sal_uInt16 >( nParaIndex ), nLine);
+
+ if (nLine == 0)
+ nCurIndex += nLineLen - nBulletLen;
+ else
+ nCurIndex += nLineLen;
+
+ if( nCurIndex > nIndex &&
+ nLine < nLineCount-1 )
+ {
+ aResult.SegmentStart = nCurIndex;
+ aResult.SegmentEnd = nCurIndex + rCacheTF.GetLineLen(static_cast< sal_uInt16 >( nParaIndex ), nLine+1);
+ aResult.SegmentText = GetTextRange( aResult.SegmentStart + nBulletLen, aResult.SegmentEnd + nBulletLen);
+ break;
+ }
+ }
+
+ break;
+ }
+ case AccessibleTextType::WORD:
+ {
+ nIndex = SkipField( nIndex, sal_True);
+ ::rtl::OUString sText( implGetText() );
+ sal_Int32 nLength = sText.getLength();
+
+ // get word at index
+ sal_Bool bWord = implGetWordBoundary( aBoundary, nIndex );
+
+ // real current world
+ sal_Int32 nextWord = nIndex;
+ //if( nIndex >= aBoundary.startPos && nIndex <= aBoundary.endPos )
+ if( nIndex <= aBoundary.endPos )
+ {
+ nextWord = aBoundary.endPos;
+ if( sText.getStr()[nextWord] == sal_Unicode(' ') ) nextWord++;
+ bWord = implGetWordBoundary( aBoundary, nextWord );
+ }
+
+ if ( bWord && implIsValidBoundary( aBoundary, nLength ) )
+ {
+ aResult.SegmentText = sText.copy( aBoundary.startPos, aBoundary.endPos - aBoundary.startPos );
+ aResult.SegmentStart = aBoundary.startPos;
+ aResult.SegmentEnd = aBoundary.endPos;
+
+ // If the end position of aBoundary is inside a field, extend the result to the end of the field
+
+ ExtendByField( aResult );
+ }
+ }
+ break;
+
+ case AccessibleTextType::CHARACTER:
+ {
+ nIndex = SkipField( nIndex, sal_True);
+ aResult = OCommonAccessibleText::getTextBehindIndex( nIndex, aTextType );
+ ExtendByField( aResult );
+ break;
+ }
+ //-----IAccessibility2 Implementation 2009
default:
aResult = OCommonAccessibleText::getTextBehindIndex( nIndex, aTextType );
break;
@@ -1656,11 +2505,17 @@ namespace accessibility
CheckRange(nStartIndex, nEndIndex);
+ //Because bullet may occupy one or more characters, the TextAdapter will include bullet to calculate the selection. Add offset to handle bullet
+ sal_Int32 nBulletLen = 0;
+ EBulletInfo aBulletInfo = GetTextForwarder().GetBulletInfo( static_cast< sal_uInt16 >(GetParagraphIndex()) );
+ if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND && aBulletInfo.bVisible )
+ nBulletLen = aBulletInfo.aText.Len();
// save current selection
ESelection aOldSelection;
rCacheVF.GetSelection( aOldSelection );
- rCacheVF.SetSelection( MakeSelection(nStartIndex, nEndIndex) );
+ //rCacheVF.SetSelection( MakeSelection(nStartIndex, nEndIndex) );
+ rCacheVF.SetSelection( MakeSelection(nStartIndex + nBulletLen, nEndIndex + nBulletLen) );
aRetVal = rCacheVF.Copy();
rCacheVF.SetSelection( aOldSelection ); // restore
@@ -1689,11 +2544,19 @@ namespace accessibility
CheckRange(nStartIndex, nEndIndex);
- if( !rCacheTF.IsEditable( MakeSelection(nStartIndex, nEndIndex) ) )
+ // Because bullet may occupy one or more characters, the TextAdapter will include bullet to calculate the selection. Add offset to handle bullet
+ sal_Int32 nBulletLen = 0;
+ EBulletInfo aBulletInfo = GetTextForwarder().GetBulletInfo( static_cast< sal_uInt16 >(GetParagraphIndex()) );
+ if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND && aBulletInfo.bVisible )
+ nBulletLen = aBulletInfo.aText.Len();
+ ESelection aSelection = MakeSelection (nStartIndex + nBulletLen, nEndIndex + nBulletLen);
+ //if( !rCacheTF.IsEditable( MakeSelection(nStartIndex, nEndIndex) ) )
+ if( !rCacheTF.IsEditable( aSelection ) )
return sal_False; // non-editable area selected
// don't save selection, might become invalid after cut!
- rCacheVF.SetSelection( MakeSelection(nStartIndex, nEndIndex) );
+ //rCacheVF.SetSelection( MakeSelection(nStartIndex, nEndIndex) );
+ rCacheVF.SetSelection( aSelection );
return rCacheVF.Cut();
}
@@ -1719,11 +2582,18 @@ namespace accessibility
CheckPosition(nIndex);
- if( !rCacheTF.IsEditable( MakeSelection(nIndex) ) )
+ // Because bullet may occupy one or more characters, the TextAdapter will include bullet to calculate the selection. Add offset to handle bullet
+ sal_Int32 nBulletLen = 0;
+ EBulletInfo aBulletInfo = GetTextForwarder().GetBulletInfo( static_cast< sal_uInt16 >(GetParagraphIndex()) );
+ if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND && aBulletInfo.bVisible )
+ nBulletLen = aBulletInfo.aText.Len();
+ //if( !rCacheTF.IsEditable( MakeSelection(nIndex) ) )
+ if( !rCacheTF.IsEditable( MakeSelection(nIndex + nBulletLen) ) )
return sal_False; // non-editable area selected
// #104400# set empty selection (=> cursor) to given index
- rCacheVF.SetSelection( MakeCursor(nIndex) );
+ //rCacheVF.SetSelection( MakeCursor(nIndex) );
+ rCacheVF.SetSelection( MakeCursor(nIndex + nBulletLen) );
return rCacheVF.Paste();
}
@@ -1751,10 +2621,19 @@ namespace accessibility
CheckRange(nStartIndex, nEndIndex);
- if( !rCacheTF.IsEditable( MakeSelection(nStartIndex, nEndIndex) ) )
+ // Because bullet may occupy one or more characters, the TextAdapter will include bullet to calculate the selection. Add offset to handle bullet
+ sal_Int32 nBulletLen = 0;
+ EBulletInfo aBulletInfo = GetTextForwarder().GetBulletInfo( static_cast< sal_uInt16 >(GetParagraphIndex()) );
+ if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND && aBulletInfo.bVisible )
+ nBulletLen = aBulletInfo.aText.Len();
+ ESelection aSelection = MakeSelection (nStartIndex + nBulletLen, nEndIndex + nBulletLen);
+
+ //if( !rCacheTF.IsEditable( MakeSelection(nStartIndex, nEndIndex) ) )
+ if( !rCacheTF.IsEditable( aSelection ) )
return sal_False; // non-editable area selected
- sal_Bool bRet = rCacheTF.Delete( MakeSelection(nStartIndex, nEndIndex) );
+ //sal_Bool bRet = rCacheTF.Delete( MakeSelection(nStartIndex, nEndIndex) );
+ sal_Bool bRet = rCacheTF.Delete( aSelection );
GetEditSource().UpdateData();
@@ -1784,11 +2663,19 @@ namespace accessibility
CheckPosition(nIndex);
- if( !rCacheTF.IsEditable( MakeSelection(nIndex) ) )
+ // Because bullet may occupy one or more characters, the TextAdapter will include bullet to calculate the selection. Add offset to handle bullet
+ sal_Int32 nBulletLen = 0;
+ EBulletInfo aBulletInfo = GetTextForwarder().GetBulletInfo( static_cast< sal_uInt16 >(GetParagraphIndex()) );
+ if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND && aBulletInfo.bVisible )
+ nBulletLen = aBulletInfo.aText.Len();
+
+ //if( !rCacheTF.IsEditable( MakeSelection(nIndex) ) )
+ if( !rCacheTF.IsEditable( MakeSelection(nIndex + nBulletLen) ) )
return sal_False; // non-editable area selected
// #104400# insert given text at empty selection (=> cursor)
- sal_Bool bRet = rCacheTF.InsertText( sText, MakeCursor(nIndex) );
+ //sal_Bool bRet = rCacheTF.InsertText( sText, MakeCursor(nIndex) );
+ sal_Bool bRet = rCacheTF.InsertText( sText, MakeCursor(nIndex + nBulletLen) );
rCacheTF.QuickFormatDoc();
GetEditSource().UpdateData();
@@ -1819,11 +2706,20 @@ namespace accessibility
CheckRange(nStartIndex, nEndIndex);
- if( !rCacheTF.IsEditable( MakeSelection(nStartIndex, nEndIndex) ) )
+ // Because bullet may occupy one or more characters, the TextAdapter will include bullet to calculate the selection. Add offset to handle bullet
+ sal_Int32 nBulletLen = 0;
+ EBulletInfo aBulletInfo = GetTextForwarder().GetBulletInfo( static_cast< sal_uInt16 >(GetParagraphIndex()) );
+ if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND && aBulletInfo.bVisible )
+ nBulletLen = aBulletInfo.aText.Len();
+ ESelection aSelection = MakeSelection (nStartIndex + nBulletLen, nEndIndex + nBulletLen);
+
+ //if( !rCacheTF.IsEditable( MakeSelection(nStartIndex, nEndIndex) ) )
+ if( !rCacheTF.IsEditable( aSelection ) )
return sal_False; // non-editable area selected
// insert given text into given range => replace
- sal_Bool bRet = rCacheTF.InsertText( sReplacement, MakeSelection(nStartIndex, nEndIndex) );
+ //sal_Bool bRet = rCacheTF.InsertText( sReplacement, MakeSelection(nStartIndex, nEndIndex) );
+ sal_Bool bRet = rCacheTF.InsertText( sReplacement, aSelection );
rCacheTF.QuickFormatDoc();
GetEditSource().UpdateData();
@@ -2024,7 +2920,10 @@ namespace accessibility
DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX,
"AccessibleEditableTextPara::getCharacterAttributes: index value overflow");
- CheckIndex(nIndex);
+ if( getCharacterCount() > 0 )
+ CheckIndex(nIndex);
+ else
+ CheckPosition(nIndex);
SvxAccessibleTextPropertySet aPropSet( &GetEditSource(),
ImplGetSvxCharAndParaPropertiesSet() );
diff --git a/editeng/source/accessibility/AccessibleHyperlink.cxx b/editeng/source/accessibility/AccessibleHyperlink.cxx
index b55ecfc47c06..ef03ad530da2 100644
--- a/editeng/source/accessibility/AccessibleHyperlink.cxx
+++ b/editeng/source/accessibility/AccessibleHyperlink.cxx
@@ -137,3 +137,310 @@ namespace accessibility
} // end of namespace accessibility
//------------------------------------------------------------------------
+
+// MT IA2: Accessiblehyperlink.hxx from IA2 CWS - meanwhile we also introduced one in DEV300 (above)
+// Keeping this for reference - we probably should get support for image maps in our implementation...
+
+//IAccessibility2 Implementation 2009-----
+
+/*
+
+class SVX_DLLPUBLIC SvxAccessibleHyperlink :
+ public ::cppu::WeakImplHelper1<
+ ::com::sun::star::accessibility::XAccessibleHyperlink >
+{
+ SvxURLField* mpField;
+ sal_Int32 nStartIdx;
+ sal_Int32 nEndIdx;
+
+ ImageMap* mpImageMap;
+ SdrObject* m_pShape;
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > shapeParent;
+
+public:
+
+ SvxAccessibleHyperlink(){};
+ //SvxAccessibleHyperlink(::rtl::OUString name, const Imagemap* pImageMap);
+ SvxAccessibleHyperlink(const SvxURLField* p, sal_Int32 nStt, sal_Int32 nEnd);
+ SvxAccessibleHyperlink(SdrObject* p, ::accessibility::AccessibleShape* pAcc);
+ virtual ~SvxAccessibleHyperlink();
+ //void setImageMap(ImageMap* pMap);
+ //void setXAccessibleImage(::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > parent);
+ ::rtl::OUString GetHyperlinkURL(sal_Int32 nIndex) throw (::com::sun::star::lang::IndexOutOfBoundsException);
+ sal_Bool IsValidHyperlink();
+
+ // XAccessibleAction
+ virtual sal_Int32 SAL_CALL getAccessibleActionCount()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription(
+ sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL
+ getAccessibleActionKeyBinding( sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleHyperlink
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionAnchor(
+ sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionObject(
+ sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getStartIndex()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getEndIndex()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isValid( )
+ throw (::com::sun::star::uno::RuntimeException);
+};
+
+
+SvxAccessibleHyperlink::SvxAccessibleHyperlink( const SvxURLField *p,
+ sal_Int32 nStt, sal_Int32 nEnd ) :
+ nStartIdx( nStt ),
+ nEndIdx( nEnd ),
+ m_pShape(NULL),
+ shapeParent(NULL)
+{
+ if(p)
+ mpField = (SvxURLField*)p->Clone();
+ else
+ mpField = NULL;
+}
+
+SvxAccessibleHyperlink::SvxAccessibleHyperlink(SdrObject* p,
+ ::accessibility::AccessibleShape* pAcc) :
+ nStartIdx( -1 ),
+ nEndIdx( -1 ),
+ mpField(NULL),
+ m_pShape(p)
+{
+ mpImageMap = m_pShape->GetModel()->GetImageMapForObject(m_pShape);
+ shapeParent = dynamic_cast< XAccessible* >(pAcc);
+}
+
+SvxAccessibleHyperlink::~SvxAccessibleHyperlink()
+{
+ if(mpField)
+ delete mpField;
+}
+
+::rtl::OUString SvxAccessibleHyperlink::GetHyperlinkURL(sal_Int32 nIndex) throw (::com::sun::star::lang::IndexOutOfBoundsException)
+{
+ if( mpField )
+ {
+ if (nIndex != 0)
+ throw ::com::sun::star::lang::IndexOutOfBoundsException();
+ return ::rtl::OUString( mpField->GetURL() );
+ }
+ else if (mpImageMap)
+ {
+ if (nIndex < 0 || nIndex >=mpImageMap->GetIMapObjectCount())
+ throw IndexOutOfBoundsException();
+
+ IMapObject* pMapObj = mpImageMap->GetIMapObject(sal_uInt16(nIndex));
+ if (pMapObj->GetURL().Len())
+ return ::rtl::OUString( pMapObj->GetURL() );
+ }
+ else
+ {
+ if (nIndex != 0)
+ throw ::com::sun::star::lang::IndexOutOfBoundsException();
+
+ SdrUnoObj* pUnoCtrl = dynamic_cast< SdrUnoObj* >( m_pShape );
+
+ if(pUnoCtrl)
+ {
+ try
+ {
+ uno::Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySetInfo > xPropInfo( xPropSet->getPropertySetInfo(), uno::UNO_QUERY_THROW );
+
+ form::FormButtonType eButtonType = form::FormButtonType_URL;
+ const ::rtl::OUString sButtonType( RTL_CONSTASCII_USTRINGPARAM( "ButtonType" ) );
+ if(xPropInfo->hasPropertyByName( sButtonType ) && (xPropSet->getPropertyValue( sButtonType ) >>= eButtonType ) )
+ {
+ ::rtl::OUString aString;
+
+ // URL
+ const ::rtl::OUString sTargetURL(RTL_CONSTASCII_USTRINGPARAM( "TargetURL" ));
+ if(xPropInfo->hasPropertyByName(sTargetURL))
+ {
+ if( xPropSet->getPropertyValue(sTargetURL) >>= aString )
+ return aString;
+ }
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+ // If hyperlink can't be got from sdrobject, query the corresponding document to retrieve the link info
+ uno::Reference< XAccessibleGroupPosition > xGroupPosition (shapeParent, uno::UNO_QUERY);
+ if (xGroupPosition.is())
+ return xGroupPosition->getObjectLink( uno::makeAny( shapeParent ) );
+ }
+ return ::rtl::OUString();
+}
+
+// Just check whether the first hyperlink is valid
+sal_Bool SvxAccessibleHyperlink::IsValidHyperlink()
+{
+ ::rtl::OUString url = GetHyperlinkURL(0);
+ if (url.getLength() > 0)
+ return sal_True;
+ else
+ return sal_False;
+}
+// XAccessibleAction
+sal_Int32 SAL_CALL SvxAccessibleHyperlink::getAccessibleActionCount()
+ throw (RuntimeException)
+{
+ if (mpImageMap)
+ return mpImageMap->GetIMapObjectCount();
+ else
+ return 1; // only shape link or url field
+
+ //return mpField ? 1 : (mpImageMap ? mpImageMap->GetIMapObjectCount() : 0);
+}
+
+sal_Bool SAL_CALL SvxAccessibleHyperlink::doAccessibleAction( sal_Int32 nIndex )
+ throw (IndexOutOfBoundsException, RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ sal_Bool bRet = sal_False;
+
+ OUString url = GetHyperlinkURL(nIndex);
+
+ if( url.getLength() > 0 )
+ {
+ SfxStringItem aStrItem(SID_FILE_NAME, url);
+ const SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ if( pDocSh )
+ {
+ SfxMedium* pSfxMedium = pDocSh->GetMedium();
+ if( pSfxMedium)
+ {
+ SfxStringItem aReferer(SID_REFERER, pSfxMedium->GetName());
+ SfxBoolItem aBrowseItem( SID_BROWSE, TRUE );
+ SfxViewFrame* pFrame = SfxViewFrame::Current();
+ if( pFrame )
+ {
+ pFrame->GetDispatcher()->Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
+ &aStrItem, &aBrowseItem, &aReferer, 0L);
+ bRet = sal_True;
+ }
+ }
+ }
+ }
+
+ return bRet;
+}
+
+OUString SAL_CALL SvxAccessibleHyperlink::getAccessibleActionDescription(
+ sal_Int32 nIndex )
+ throw (IndexOutOfBoundsException, RuntimeException)
+{
+ return GetHyperlinkURL(nIndex);
+}
+
+::com::sun::star::uno::Reference< XAccessibleKeyBinding > SAL_CALL
+ SvxAccessibleHyperlink::getAccessibleActionKeyBinding( sal_Int32 )
+ throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::com::sun::star::uno::Reference< XAccessibleKeyBinding > xKeyBinding;
+
+ if( mpField || m_pShape)
+ {
+ ::comphelper::OAccessibleKeyBindingHelper* pKeyBindingHelper =
+ new ::comphelper::OAccessibleKeyBindingHelper();
+ xKeyBinding = pKeyBindingHelper;
+
+ ::com::sun::star::awt::KeyStroke aKeyStroke;
+ aKeyStroke.Modifiers = 0;
+ aKeyStroke.KeyCode = KEY_RETURN;
+ aKeyStroke.KeyChar = 0;
+ aKeyStroke.KeyFunc = 0;
+ pKeyBindingHelper->AddKeyBinding( aKeyStroke );
+ }
+
+ return xKeyBinding;
+}
+
+// XAccessibleHyperlink
+Any SAL_CALL SvxAccessibleHyperlink::getAccessibleActionAnchor(
+ sal_Int32 nIndex )
+ throw (IndexOutOfBoundsException, RuntimeException)
+{
+ Any aRet;
+
+ ::rtl::OUString retText;
+ if(mpField && nIndex == 0)
+ {
+ retText = mpField->GetRepresentation();
+ aRet <<= retText;
+ return aRet;
+ }
+ else if(mpImageMap)
+ {
+ IMapObject* pMapObj = mpImageMap->GetIMapObject(sal_uInt16(nIndex));
+ if(pMapObj && pMapObj->GetURL().Len())
+ aRet <<= shapeParent;
+ return aRet;
+ }
+ else if (nIndex == 0)
+ {
+ aRet <<= shapeParent;
+ return aRet;
+ }
+ return aRet;
+}
+
+Any SAL_CALL SvxAccessibleHyperlink::getAccessibleActionObject(
+ sal_Int32 nIndex )
+ throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::rtl::OUString retText = GetHyperlinkURL(nIndex);
+ Any aRet;
+ aRet <<= retText;
+ return aRet;
+}
+
+sal_Int32 SAL_CALL SvxAccessibleHyperlink::getStartIndex()
+ throw (RuntimeException)
+{
+ return nStartIdx;
+}
+
+sal_Int32 SAL_CALL SvxAccessibleHyperlink::getEndIndex()
+ throw (RuntimeException)
+{
+ return nEndIdx;
+}
+
+sal_Bool SAL_CALL SvxAccessibleHyperlink::isValid( )
+ throw (RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ //return mpField ? sal_True: ( mpImageMap ? sal_True : sal_False );
+ if (mpField || m_pShape)
+ return sal_True;
+ else
+ return sal_False;
+}
+
+*/
+
+//-----IAccessibility2 Implementation 2009
+
+
diff --git a/editeng/source/accessibility/AccessibleParaManager.cxx b/editeng/source/accessibility/AccessibleParaManager.cxx
index 16d4f121dd6b..799fbbacdefa 100644
--- a/editeng/source/accessibility/AccessibleParaManager.cxx
+++ b/editeng/source/accessibility/AccessibleParaManager.cxx
@@ -356,10 +356,10 @@ namespace accessibility
const uno::Any& rOldValue ) const
{
DBG_ASSERT( maChildren.size() > nStartPara &&
- maChildren.size() >= nEndPara , "AccessibleParaManager::FireEvent: invalid index" );
+ maChildren.size() >= nEndPara &&
+ nEndPara >= nStartPara , "AccessibleParaManager::FireEvent: invalid index" );
- if( maChildren.size() > nStartPara &&
- maChildren.size() >= nEndPara )
+ if( maChildren.size() > nStartPara && maChildren.size() >= nEndPara && nEndPara >= nStartPara)
{
VectorOfChildren::const_iterator front = maChildren.begin();
VectorOfChildren::const_iterator back = front;
diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
index 098fe13b4272..b9eb69ab8f61 100644
--- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx
+++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
@@ -83,7 +83,9 @@ namespace accessibility
return ( lhs.Name == rhs.Name && lhs.Value == rhs.Value );
}
};
-
+//IAccessibility2 Implementation 2009-----
+sal_Unicode cNewLine(0x0a);
+//-----IAccessibility2 Implementation 2009
//------------------------------------------------------------------------
//
// Static Helper
@@ -120,7 +122,9 @@ namespace accessibility
*/
class AccessibleStaticTextBase_Impl
{
-
+ //IAccessibility2 Implementation 2009-----
+ friend class AccessibleStaticTextBase;
+ //-----IAccessibility2 Implementation 2009
public:
// receive pointer to our frontend class and view window
@@ -194,6 +198,9 @@ namespace accessibility
sal_Int32 nEndPara, sal_Int32 nEndIndex );
Rectangle GetParagraphBoundingBox() const;
+ //IAccessibility2 Implementation 2009-----
+ sal_Bool RemoveLineBreakCount( sal_Int32& rIndex );
+ //-----IAccessibility2 Implementation 2009
private:
@@ -386,8 +393,9 @@ namespace accessibility
{
nCurrCount = GetParagraph( nCurrPara ).getCharacterCount();
nCurrIndex += nCurrCount;
-
- if( nCurrIndex > nFlatIndex )
+ //IAccessibility2 Implementation 2009-----
+ if( nCurrIndex >= nFlatIndex )
+ //-----IAccessibility2 Implementation 2009
{
// check overflow
DBG_ASSERT(nCurrPara >= 0 && nCurrPara <= USHRT_MAX &&
@@ -477,7 +485,59 @@ namespace accessibility
}
return aRect;
}
+ //IAccessibility2 Implementation 2009-----
+ //the input argument is the index(including "\n" ) in the string.
+ //the function will calculate the actual index(not including "\n") in the string.
+ //and return true if the index is just at a "\n"
+ sal_Bool AccessibleStaticTextBase_Impl::RemoveLineBreakCount( sal_Int32& rIndex )
+ {
+ // get the total char number inside the cell.
+ sal_Int32 i, nCount, nParas;
+ for( i=0, nCount=0, nParas=GetParagraphCount(); i<nParas; ++i )
+ nCount += GetParagraph(i).getCharacterCount();
+ nCount = nCount + (nParas-1);
+ if( nCount == 0 && rIndex == 0) return sal_False;
+
+ sal_Int32 nCurrPara, nCurrCount;
+ sal_Int32 nLineBreakPos = 0, nLineBreakCount = 0;
+ sal_Int32 nParaCount = GetParagraphCount();
+ for ( nCurrCount = 0, nCurrPara = 0; nCurrPara < nParaCount; nCurrPara++ )
+ {
+ nCurrCount += GetParagraph( nCurrPara ).getCharacterCount();
+ nLineBreakPos = nCurrCount++;
+ if ( rIndex == nLineBreakPos )
+ {
+ rIndex -= (++nLineBreakCount);//(++nLineBreakCount);
+ if ( rIndex < 0)
+ {
+ rIndex = 0;
+ }
+ //if the index is at the last position of the last paragraph
+ //there is no "\n" , so we should increase rIndex by 1 and return false.
+ if ( (nCurrPara+1) == nParaCount )
+ {
+ rIndex++;
+ return sal_False;
+ }
+ else
+ {
+ return sal_True;
+ }
+ }
+ else if ( rIndex < nLineBreakPos )
+ {
+ rIndex -= nLineBreakCount;
+ return sal_False;
+ }
+ else
+ {
+ nLineBreakCount++;
+ }
+ }
+ return sal_False;
+ }
+ //-----IAccessibility2 Implementation 2009
//------------------------------------------------------------------------
//
// AccessibleStaticTextBase implementation
@@ -666,6 +726,10 @@ namespace accessibility
uno::Sequence< beans::PropertyValue > SAL_CALL AccessibleStaticTextBase::getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
+ //IAccessibility2 Implementation 2009-----
+ //get the actual index without "\n"
+ mpImpl->RemoveLineBreakCount( nIndex );
+ //IAccessibility2 Implementation 2009-----
EPosition aPos( mpImpl->Index2Internal(nIndex) );
@@ -697,7 +761,10 @@ namespace accessibility
sal_Int32 i, nCount, nParas;
for( i=0, nCount=0, nParas=mpImpl->GetParagraphCount(); i<nParas; ++i )
nCount += mpImpl->GetParagraph(i).getCharacterCount();
-
+ //IAccessibility2 Implementation 2009-----
+ //count on the number of "\n" which equals number of paragraphs decrease 1.
+ nCount = nCount + (nParas-1);
+ //IAccessibility2 Implementation 2009-----
return nCount;
}
@@ -800,37 +867,99 @@ namespace accessibility
if( nStartIndex > nEndIndex )
::std::swap(nStartIndex, nEndIndex);
-
+ //IAccessibility2 Implementation 2009-----
+ //if startindex equals endindex we will get nothing. So return an empty string directly.
+ if ( nStartIndex == nEndIndex )
+ {
+ ::rtl::OUString sEmptyStr;
+ return sEmptyStr;
+ }
+ sal_Bool bStart = mpImpl->RemoveLineBreakCount( nStartIndex );
+ //if the start index is just at a "\n", we need to begin from the next char
+ if ( bStart )
+ {
+ nStartIndex++;
+ }
+ //we need to find out whether the previous position of the current endindex is at "\n" or not
+ //if yes we need to mark it and add "\n" at the end of the result
+ sal_Int32 nTemp = nEndIndex - 1;
+ sal_Bool bEnd = mpImpl->RemoveLineBreakCount( nTemp );
+ sal_Bool bTemp = mpImpl->RemoveLineBreakCount( nEndIndex );
+ //if the below condition is true it indicates an empty paragraph with just a "\n"
+ //so we need to set one "\n" flag to avoid duplication.
+ if ( bStart && bEnd && ( nStartIndex == nEndIndex) )
+ {
+ bEnd = sal_False;
+ }
+ //if the current endindex is at a "\n", we need to increase endindex by 1 to make sure
+ //the char before "\n" is included. Because string returned by this function will not include
+ //the char at the endindex.
+ if ( bTemp )
+ {
+ nEndIndex++;
+ }
+ ::rtl::OUString aRes;
EPosition aStartIndex( mpImpl->Range2Internal(nStartIndex) );
EPosition aEndIndex( mpImpl->Range2Internal(nEndIndex) );
// #102170# Special case: start and end paragraph are identical
if( aStartIndex.nPara == aEndIndex.nPara )
{
- return mpImpl->GetParagraph( aStartIndex.nPara ).getTextRange( aStartIndex.nIndex, aEndIndex.nIndex );
+ //we don't return the string directly now for that we have to do some further process for "\n"
+ aRes = mpImpl->GetParagraph( aStartIndex.nPara ).getTextRange( aStartIndex.nIndex, aEndIndex.nIndex );
+ //return mpImpl->GetParagraph( aStartIndex.nPara ).getTextRange( aStartIndex.nIndex, aEndIndex.nIndex );
+ //-----IAccessibility2 Implementation 2009
}
else
{
sal_Int32 i( aStartIndex.nPara );
- ::rtl::OUString aRes( mpImpl->GetParagraph(i).getTextRange( aStartIndex.nIndex,
- mpImpl->GetParagraph(i).getCharacterCount()-1) );
+ //IAccessibility2 Implementation 2009-----
+ aRes = mpImpl->GetParagraph(i).getTextRange( aStartIndex.nIndex,
+ mpImpl->GetParagraph(i).getCharacterCount()/*-1*/);
+ //-----IAccessibility2 Implementation 2009
++i;
// paragraphs inbetween are fully included
for( ; i<aEndIndex.nPara; ++i )
+ //IAccessibility2 Implementation 2009-----
+ {
+ aRes += rtl::OUString(cNewLine);
aRes += mpImpl->GetParagraph(i).getText();
+ }
if( i<=aEndIndex.nPara )
+ {
+ //if the below condition is mathed it means the endindex is at mid of the last paragraph
+ //we need to add a "\n" before we add the last part of the string.
+ if ( !bEnd && aEndIndex.nIndex )
+ {
+ aRes += rtl::OUString(cNewLine);
+ }
aRes += mpImpl->GetParagraph(i).getTextRange( 0, aEndIndex.nIndex );
-
- return aRes;
+ }
+ //return aRes;
+ }
+ //According the the flag we marked before, we have to add "\n" at the beginning
+ //or at the end of the result string.
+ if ( bStart )
+ {
+ aRes = rtl::OUString(cNewLine) + aRes;
}
+ if ( bEnd )
+ {
+ aRes += rtl::OUString(cNewLine);
+ }
+ return aRes;
+ //-----IAccessibility2 Implementation 2009
}
::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleStaticTextBase::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
+ //IAccessibility2 Implementation 2009-----
::vos::OGuard aGuard( Application::GetSolarMutex() );
+ sal_Bool bLineBreak = mpImpl->RemoveLineBreakCount( nIndex );
+ //-----IAccessibility2 Implementation 2009
EPosition aPos( mpImpl->Range2Internal(nIndex) );
::com::sun::star::accessibility::TextSegment aResult;
@@ -850,6 +979,19 @@ namespace accessibility
aResult.SegmentStart = mpImpl->Internal2Index( EPosition( aPos.nPara, 0 ) );
aResult.SegmentEnd = aResult.SegmentStart + aResult.SegmentText.getLength();
}
+ //IAccessibility2 Implementation 2009-----
+ else if ( AccessibleTextType::ATTRIBUTE_RUN == aTextType )
+ {
+ SvxAccessibleTextAdapter& rTextForwarder = mpImpl->GetParagraph( aPos.nIndex ).GetTextForwarder();
+ sal_uInt16 nStartIndex, nEndIndex;
+ if ( rTextForwarder.GetAttributeRun( nStartIndex, nEndIndex, aPos.nPara, aPos.nIndex, sal_True ) )
+ {
+ aResult.SegmentText = getTextRange( nStartIndex, nEndIndex );
+ aResult.SegmentStart = nStartIndex;
+ aResult.SegmentEnd = nEndIndex;
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
else
{
// No special handling required, forward to wrapped class
@@ -857,6 +999,12 @@ namespace accessibility
// #112814# Adapt the start index with the paragraph offset
mpImpl->CorrectTextSegment( aResult, aPos.nPara );
+ //IAccessibility2 Implementation 2009-----
+ if ( bLineBreak )
+ {
+ aResult.SegmentText = rtl::OUString(cNewLine);
+ }
+ //-----IAccessibility2 Implementation 2009
}
return aResult;
@@ -865,7 +1013,10 @@ namespace accessibility
::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleStaticTextBase::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
-
+ //IAccessibility2 Implementation 2009-----
+ sal_Int32 nOldIdx = nIndex;
+ sal_Bool bLineBreak = mpImpl->RemoveLineBreakCount( nIndex );
+ //-----IAccessibility2 Implementation 2009
EPosition aPos( mpImpl->Range2Internal(nIndex) );
::com::sun::star::accessibility::TextSegment aResult;
@@ -897,6 +1048,12 @@ namespace accessibility
// #112814# Adapt the start index with the paragraph offset
mpImpl->CorrectTextSegment( aResult, aPos.nPara );
+ //IAccessibility2 Implementation 2009-----
+ if ( bLineBreak && (nOldIdx-1) >= 0)
+ {
+ aResult = getTextAtIndex( nOldIdx-1, aTextType );
+ }
+ //-----IAccessibility2 Implementation 2009
}
return aResult;
@@ -905,7 +1062,11 @@ namespace accessibility
::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleStaticTextBase::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
-
+ //IAccessibility2 Implementation 2009-----
+ sal_Int32 nTemp = nIndex+1;
+ sal_Bool bLineBreak = mpImpl->RemoveLineBreakCount( nTemp );
+ mpImpl->RemoveLineBreakCount( nIndex );
+ //-----IAccessibility2 Implementation 2009
EPosition aPos( mpImpl->Range2Internal(nIndex) );
::com::sun::star::accessibility::TextSegment aResult;
@@ -931,6 +1092,12 @@ namespace accessibility
// #112814# Adapt the start index with the paragraph offset
mpImpl->CorrectTextSegment( aResult, aPos.nPara );
+ //IAccessibility2 Implementation 2009-----
+ if ( bLineBreak )
+ {
+ aResult.SegmentText = rtl::OUString(cNewLine) + aResult.SegmentText;
+ }
+ //-----IAccessibility2 Implementation 2009
}
return aResult;
diff --git a/editeng/source/accessibility/accessibility.src b/editeng/source/accessibility/accessibility.src
index d37a443c7afb..76b28a1b3689 100644
--- a/editeng/source/accessibility/accessibility.src
+++ b/editeng/source/accessibility/accessibility.src
@@ -33,4 +33,14 @@ String RID_SVXSTR_A11Y_IMAGEBULLET_NAME
Text [ en-US ] = "Image bullet" ;
};
+String RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION
+{
+ Text [ en-US ] = "Paragraph: $(ARG) " ;
+};
+
+String RID_SVXSTR_A11Y_PARAGRAPH_NAME
+{
+ Text [ en-US ] = "Paragraph $(ARG)" ;
+};
+
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index 4f2bebca16e3..6da7ab0b8b19 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -451,7 +451,7 @@ private:
sal_uInt16 nEndPortion;
sal_uInt16 nHeight; // Gesamthoehe der Zeile
sal_uInt16 nTxtHeight; // Reine Texthoehe
- sal_uInt16 nCrsrHeight; // Bei Konturfluss hohe Zeilen => Cursor zu gro�.
+ sal_uInt16 nCrsrHeight; // Bei Konturfluss hohe Zeilen => Cursor zu gro?.
sal_uInt16 nMaxAscent;
sal_Bool bHangingPunctuation;
sal_Bool bInvalid; // fuer geschickte Formatierung
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx
index 7c539f7d8501..a4aba342f4a7 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -140,6 +140,9 @@ sal_Bool __EXPORT EditSpellWrapper::SpellMore()
if ( pSpellInfo->bMultipleDoc )
{
bMore = pImpEE->GetEditEnginePtr()->SpellNextDocument();
+ //IAccessibility2 Implementation 2009-----
+ SetCurTextObj( pImpEE->GetEditEnginePtr()->GetCurTextObj() );
+ //-----IAccessibility2 Implementation 2009
if ( bMore )
{
// Der Text wurde in diese Engine getreten, bei Rueckwaerts
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index b50e93348351..82cee2c4acf9 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -122,7 +122,23 @@ void ImpEditView::SetEditSelection( const EditSelection& rEditSelection )
if ( pEditEngine->pImpEditEngine->GetNotifyHdl().IsSet() )
{
- EENotify aNotify( EE_NOTIFY_TEXTVIEWSELECTIONCHANGED );
+ //IAccessibility2 Implementation 2009-----
+ const EditDoc& rDoc = pEditEngine->pImpEditEngine->GetEditDoc();
+ const EditPaM pmEnd = rDoc.GetEndPaM();
+ EENotifyType eNotifyType;
+ if (rDoc.Count() > 1 &&
+ pmEnd == rEditSelection.Min() &&
+ pmEnd == rEditSelection.Max())//if move cursor to the last para.
+ {
+ eNotifyType = EE_NOTIFY_TEXTVIEWSELECTIONCHANGED_ENDD_PARA;
+ }
+ else
+ {
+ eNotifyType = EE_NOTIFY_TEXTVIEWSELECTIONCHANGED;
+ }
+ //EENotify aNotify( EE_NOTIFY_TEXTVIEWSELECTIONCHANGED );
+ EENotify aNotify( eNotifyType );
+ //-----IAccessibility2 Implementation 2009
aNotify.pEditEngine = pEditEngine;
aNotify.pEditView = GetEditViewPtr();
pEditEngine->pImpEditEngine->CallNotify( aNotify );
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 8a789e0917fa..0b7138ffb0c7 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -480,6 +480,8 @@ private:
sal_Bool bInSelection;
sal_Bool bIsInUndo;
sal_Bool bUpdate;
+ // IAccessible2 migration fix
+ sal_Bool bUpdateForAcc;
sal_Bool bUndoEnabled;
sal_Bool bOwnerOfRefDev;
sal_Bool bDowning;
@@ -713,6 +715,9 @@ public:
void SetUpdateMode( sal_Bool bUp, EditView* pCurView = 0, sal_Bool bForceUpdate = sal_False );
sal_Bool GetUpdateMode() const { return bUpdate; }
+ // IAccessible2 migration fix
+ void SetUpdateModeForAcc( sal_Bool bUp);
+ sal_Bool GetUpdateModeForAcc();
const ParaPortionList& GetParaPortions() const { return aParaPortionList; }
ParaPortionList& GetParaPortions() { return aParaPortionList; }
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 92b0eeb1ae1f..815c69e2fddb 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -136,6 +136,7 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) :
bIsFormatting = sal_False;
bFormatted = sal_False;
bUpdate = sal_True;
+ bUpdateForAcc = TRUE; //IAccessible2 implementation 2009
bUseAutoColor = sal_True;
bForceAutoColor = sal_False;
bAddExtLeading = sal_False;
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 5793bfc5b753..e4b053d0751d 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -368,7 +368,9 @@ void ImpEditEngine::FormatFullDoc()
void ImpEditEngine::FormatDoc()
{
- if ( !GetUpdateMode() || IsFormatting() )
+ // IAccessible2 migration fix
+ //if ( !GetUpdateMode() || IsFormatting() )
+ if ( !GetUpdateMode() || IsFormatting() || !GetUpdateModeForAcc())
return;
EnterBlockNotifications();
@@ -3860,6 +3862,16 @@ EditPaM ImpEditEngine::ConnectContents( sal_uInt16 nLeftNode, sal_Bool bBackward
DBG_ASSERT( IsInUndo(), "ConnectContent nur fuer Undo()!" );
return ImpConnectParagraphs( pLeftNode, pRightNode, bBackward );
}
+//IAccessible2 migration fix
+void ImpEditEngine::SetUpdateModeForAcc( sal_Bool bUp)
+{
+ bUpdateForAcc = bUp;
+}
+sal_Bool ImpEditEngine::GetUpdateModeForAcc()
+{
+ return bUpdateForAcc;
+}
+//End
void ImpEditEngine::SetUpdateMode( sal_Bool bUp, EditView* pCurView, sal_Bool bForceUpdate )
{
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index 1c431114788f..ca385c87073f 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -164,6 +164,7 @@ SvxSpellWrapper::SvxSpellWrapper( Window* pWn,
pWin ( pWn ),
xSpell ( xSpellChecker ),
+ mpTextObj( NULL),
bOtherCntnt ( bOther ),
bDialog ( sal_False ),
bHyphen ( sal_False ),
@@ -189,6 +190,7 @@ SvxSpellWrapper::SvxSpellWrapper( Window* pWn,
const sal_Bool bStart, const sal_Bool bOther ) :
pWin ( pWn ),
xHyph ( xHyphenator ),
+ mpTextObj( NULL),
bOtherCntnt ( bOther ),
bDialog ( sal_False ),
bHyphen ( sal_False ),
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 6a824dafb188..de0966ca5398 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -1519,6 +1519,13 @@ sal_Bool Outliner::HasChilds( Paragraph* pParagraph ) const
bool Outliner::ImplHasNumberFormat( sal_uInt16 nPara ) const
{
return GetNumberFormat(nPara) != 0;
+ if ( GetNumberFormat(nPara) )
+ {
+ const SfxBoolItem& rBulletState = (const SfxBoolItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_BULLETSTATE );
+ return rBulletState.GetValue();
+ }
+ else
+ return sal_False;
}
const SvxNumberFormat* Outliner::GetNumberFormat( sal_uInt16 nPara ) const
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index 64c4a4bb7bf8..7d4a40e3cff3 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1825,7 +1825,6 @@ sal_Bool OutlinerView::IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool
return pEditView->IsWrongSpelledWordAtPos( rPosPixel, bMarkIfWrong );
}
-
void OutlinerView::SpellIgnoreWord()
{
DBG_CHKTHIS(OutlinerView,0);
diff --git a/editeng/source/uno/unoedhlp.cxx b/editeng/source/uno/unoedhlp.cxx
index d1e47eec0999..2068e1903602 100644
--- a/editeng/source/uno/unoedhlp.cxx
+++ b/editeng/source/uno/unoedhlp.cxx
@@ -28,7 +28,10 @@
#include <editeng/unoedhlp.hxx>
#include <editeng/editdata.hxx>
#include <editeng/editeng.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <svl/itemset.hxx>
+//-----IAccessibility2 Implementation 2009
//------------------------------------------------------------------------
SvxEditSourceHint::SvxEditSourceHint( sal_uLong _nId ) :
@@ -74,7 +77,8 @@ void SvxEditSourceHint::SetEndValue( sal_uLong n )
{
mnEnd = n;
}
-
+//IAccessibility2 Implementation 2009-----
+//-----IAccessibility2 Implementation 2009
//------------------------------------------------------------------------
::std::auto_ptr<SfxHint> SvxEditSourceHelper::EENotification2Hint( EENotify* aNotify )
@@ -115,7 +119,10 @@ void SvxEditSourceHint::SetEndValue( sal_uLong n )
case EE_NOTIFY_INPUT_END:
return ::std::auto_ptr<SfxHint>( new TextHint( TEXT_HINT_INPUT_END, 0 ) );
-
+ //IAccessibility2 Implementation 2009-----
+ case EE_NOTIFY_TEXTVIEWSELECTIONCHANGED_ENDD_PARA:
+ return ::std::auto_ptr<SfxHint>( new SvxEditSourceHintEndPara( EDITSOURCE_HINT_SELECTIONCHANGED ) );
+ //-----IAccessibility2 Implementation 2009
default:
DBG_ERROR( "SvxEditSourceHelper::EENotification2Hint unknown notification" );
break;
@@ -124,9 +131,166 @@ void SvxEditSourceHint::SetEndValue( sal_uLong n )
return ::std::auto_ptr<SfxHint>( new SfxHint() );
}
-
-sal_Bool SvxEditSourceHelper::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, const EditEngine& rEE, sal_uInt16 nPara, sal_uInt16 nIndex )
+sal_Bool SvxEditSourceHelper::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, const EditEngine& rEE, sal_uInt16 nPara, sal_uInt16 nIndex, sal_Bool bInCell )
{
+ // IA2 CWS introduced bInCell, but also did many other changes here.
+ // Need to verify implementation with AT (IA2 and ATK)
+ // Old implementation at the end of the method for reference...
+
+#if 1 // IA2 CWS
+
+ //added dummy attributes for the default text
+ EECharAttribArray aCharAttribs, aTempCharAttribs;
+ rEE.GetCharAttribs( nPara, aTempCharAttribs );
+ if ( aTempCharAttribs.Count() )
+ {
+ sal_uInt32 nIndex2 = 0;
+ sal_uInt32 nParaLen = rEE.GetTextLen(nPara);
+ for ( sal_uInt16 nAttr = 0; nAttr < aTempCharAttribs.Count(); nAttr++ )
+ {
+ if ( nIndex2 < aTempCharAttribs[nAttr].nStart )
+ {
+ EECharAttrib aEEAttr;
+ aEEAttr.nStart = sal_uInt16(nIndex2);
+ aEEAttr.nEnd = aTempCharAttribs[nAttr].nStart;
+ aCharAttribs.Insert( aEEAttr, nAttr );
+ }
+ nIndex2 = aTempCharAttribs[nAttr].nEnd;
+ aCharAttribs.Insert( aTempCharAttribs[nAttr], aCharAttribs.Count() );
+ }
+ if ( nIndex2 != nParaLen )
+ {
+ EECharAttrib aEEAttr;
+ aEEAttr.nStart = sal_uInt16(nIndex2);
+ aEEAttr.nEnd = sal_uInt16(nParaLen);
+ aCharAttribs.Insert( aEEAttr, aCharAttribs.Count() );
+ }
+ }
+ // find closest index in front of nIndex
+ sal_uInt16 nAttr, nCurrIndex;
+ sal_Int32 nClosestStartIndex;
+ sal_Int32 nClosestStartIndex_s, nClosestStartIndex_e;
+ for( nAttr=0, nClosestStartIndex_s=0, nClosestStartIndex_e=0; nAttr<aCharAttribs.Count(); ++nAttr )
+ {
+ nCurrIndex = aCharAttribs[nAttr].nStart;
+
+ //if( nCurrIndex > nIndex )
+ // break; // aCharAttribs array is sorted in increasing order for nStart values
+
+ if( nCurrIndex > nClosestStartIndex_s &&
+ nCurrIndex <= nIndex)
+ {
+ nClosestStartIndex_s = nCurrIndex;
+ }
+ nCurrIndex = aCharAttribs[nAttr].nEnd;
+ if ( nCurrIndex > nClosestStartIndex_e &&
+ nCurrIndex < nIndex )
+ {
+ nClosestStartIndex_e = nCurrIndex;
+ }
+ }
+ nClosestStartIndex = nClosestStartIndex_s > nClosestStartIndex_e ? nClosestStartIndex_s : nClosestStartIndex_e;
+
+ // find closest index behind of nIndex
+ sal_Int32 nClosestEndIndex;
+ sal_Int32 nClosestEndIndex_s, nClosestEndIndex_e;
+ for( nAttr=0, nClosestEndIndex_s=nClosestEndIndex_e=rEE.GetTextLen(nPara); nAttr<aCharAttribs.Count(); ++nAttr )
+ {
+ nCurrIndex = aCharAttribs[nAttr].nEnd;
+
+ if( nCurrIndex > nIndex &&
+ nCurrIndex < nClosestEndIndex_e )
+ {
+ nClosestEndIndex_e = nCurrIndex;
+ }
+ nCurrIndex = aCharAttribs[nAttr].nStart;
+ if ( nCurrIndex > nIndex &&
+ nCurrIndex < nClosestEndIndex_s)
+ {
+ nClosestEndIndex_s = nCurrIndex;
+ }
+ }
+ nClosestEndIndex = nClosestEndIndex_s < nClosestEndIndex_e ? nClosestEndIndex_s : nClosestEndIndex_e;
+
+ nStartIndex = static_cast<sal_uInt16>( nClosestStartIndex );
+ nEndIndex = static_cast<sal_uInt16>( nClosestEndIndex );
+ if ( bInCell )
+ {
+ EPosition aStartPos( nPara, nStartIndex ), aEndPos( nPara, nEndIndex );
+ sal_uInt32 nParaCount = rEE.GetParagraphCount();
+ sal_uInt32 nCrrntParaLen = rEE.GetTextLen(nPara);
+ //need to find closest index in front of nIndex in the previous paragraphs
+ if ( aStartPos.nIndex == 0 )
+ {
+ SfxItemSet aCrrntSet = rEE.GetAttribs( nPara, 0, 1, GETATTRIBS_CHARATTRIBS );
+ for ( sal_Int32 nParaIdx = nPara-1; nParaIdx >= 0; nParaIdx-- )
+ {
+ sal_uInt32 nLen = rEE.GetTextLen( sal_uInt16(nParaIdx) );
+ if ( nLen )
+ {
+ sal_uInt16 nStartIdx, nEndIdx;
+ GetAttributeRun( nStartIdx, nEndIdx, rEE, sal_uInt16(nParaIdx), sal_uInt16(nLen), sal_False );
+ SfxItemSet aSet = rEE.GetAttribs( sal_uInt16(nParaIdx), sal_uInt16(nLen-1), sal_uInt16(nLen), GETATTRIBS_CHARATTRIBS );
+ if ( aSet == aCrrntSet )
+ {
+ aStartPos.nPara = sal_uInt16(nParaIdx);
+ aStartPos.nIndex = nStartIdx;
+ if ( aStartPos.nIndex != 0 )
+ {
+ break;
+ }
+ }
+ }
+ }
+ }
+ //need find closest index behind nIndex in the following paragrphs
+ if ( aEndPos.nIndex == nCrrntParaLen )
+ {
+ SfxItemSet aCrrntSet = rEE.GetAttribs( nPara, sal_uInt16(nCrrntParaLen-1), sal_uInt16(nCrrntParaLen), GETATTRIBS_CHARATTRIBS );
+ for ( sal_uInt32 nParaIdx = nPara+1; nParaIdx < nParaCount; nParaIdx++ )
+ {
+ sal_uInt32 nLen = rEE.GetTextLen( sal_uInt16(nParaIdx) );
+ if ( nLen )
+ {
+ sal_uInt16 nStartIdx, nEndIdx;
+ GetAttributeRun( nStartIdx, nEndIdx, rEE, sal_uInt16(nParaIdx), 0, sal_False );
+ SfxItemSet aSet = rEE.GetAttribs( sal_uInt16(nParaIdx), 0, 1, GETATTRIBS_CHARATTRIBS );
+ if ( aSet == aCrrntSet )
+ {
+ aEndPos.nPara = sal_uInt16(nParaIdx);
+ aEndPos.nIndex = nEndIdx;
+ if ( aEndPos.nIndex != nLen )
+ {
+ break;
+ }
+ }
+ }
+ }
+ }
+ nStartIndex = 0;
+ if ( aStartPos.nPara > 0 )
+ {
+ for ( sal_uInt16 i = 0; i < aStartPos.nPara; i++ )
+ {
+ nStartIndex += rEE.GetTextLen(i)+1;
+ }
+ }
+ nStartIndex += aStartPos.nIndex;
+ nEndIndex = 0;
+ if ( aEndPos.nPara > 0 )
+ {
+ for ( sal_uInt16 i = 0; i < aEndPos.nPara; i++ )
+ {
+ nEndIndex += rEE.GetTextLen(i)+1;
+ }
+ }
+ nEndIndex += aEndPos.nIndex;
+ }
+
+ return sal_True;
+
+#else // old implementation
+
EECharAttribArray aCharAttribs;
rEE.GetCharAttribs( nPara, aCharAttribs );
@@ -164,6 +328,8 @@ sal_Bool SvxEditSourceHelper::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt
nEndIndex = static_cast<sal_uInt16>( nClosestEndIndex );
return sal_True;
+
+#endif
}
Point SvxEditSourceHelper::EEToUserSpace( const Point& rPoint, const Size& rEESize, bool bIsVertical )
diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx
index c37fdfa79d0e..29acfb04973f 100644
--- a/editeng/source/uno/unoedprx.cxx
+++ b/editeng/source/uno/unoedprx.cxx
@@ -508,6 +508,9 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const
EBulletInfo aBulletInfo1 = GetBulletInfo( static_cast< sal_uInt16 >(aStartIndex.GetParagraph()) );
EBulletInfo aBulletInfo2 = GetBulletInfo( static_cast< sal_uInt16 >(aEndIndex.GetParagraph()) );
+ //IAccessibility2 Implementation 2009-----
+ // MT: This was done in OOo, commented out in IA2 CWS...
+ /*
if( aStartIndex.InBullet() )
{
// prepend leading bullet
@@ -521,8 +524,8 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const
sBullet += sStr;
sStr = sBullet;
- }
-
+ }*/
+ //-----IAccessibility2 Implementation 2009
if( aEndIndex.InBullet() )
{
// append trailing bullet
@@ -751,7 +754,16 @@ EBulletInfo SvxAccessibleTextAdapter::GetBulletInfo( sal_uInt16 nPara ) const
return mrTextForwarder->GetBulletInfo( nPara );
}
-
+//IAccessible2 Implementation 2009----
+void SvxAccessibleTextAdapter::SetUpdateModeForAcc( sal_Bool bUp)
+{
+ return mrTextForwarder->SetUpdateModeForAcc( bUp );
+}
+sal_Bool SvxAccessibleTextAdapter::GetUpdateModeForAcc( ) const
+{
+ return mrTextForwarder->GetUpdateModeForAcc( );
+}
+//-----IAccessible2 Implementation 2009
Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
@@ -976,8 +988,7 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( sal_uInt16 nPara, sal_uInt16
return sal_True;
}
-
-sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const
+sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex, sal_Bool /* bInCell */) const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx
index dad2b9eb8863..dbb0f6bea2a7 100644
--- a/editeng/source/uno/unofored.cxx
+++ b/editeng/source/uno/unofored.cxx
@@ -453,10 +453,9 @@ sal_Bool SvxEditEngineForwarder::GetWordIndices( sal_uInt16 nPara, sal_uInt16 nI
return sal_False;
}
-
-sal_Bool SvxEditEngineForwarder::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const
+sal_Bool SvxEditEngineForwarder::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex, sal_Bool bInCell ) const
{
- return SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, rEditEngine, nPara, nIndex );
+ return SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, rEditEngine, nPara, nIndex, bInCell );
}
sal_uInt16 SvxEditEngineForwarder::GetLineCount( sal_uInt16 nPara ) const
diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx
index 5e5bcef1638c..613787f309fb 100644
--- a/editeng/source/uno/unoforou.cxx
+++ b/editeng/source/uno/unoforou.cxx
@@ -411,10 +411,9 @@ sal_Bool SvxOutlinerForwarder::GetWordIndices( sal_uInt16 nPara, sal_uInt16 nInd
return sal_False;
}
-
-sal_Bool SvxOutlinerForwarder::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const
+sal_Bool SvxOutlinerForwarder::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex, sal_Bool bInCell ) const
{
- return SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, rOutliner.GetEditEngine(), nPara, nIndex );
+ return SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, rOutliner.GetEditEngine(), nPara, nIndex, bInCell );
}
sal_uInt16 SvxOutlinerForwarder::GetLineCount( sal_uInt16 nPara ) const
diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index 358351cdbcb3..5e78407710dd 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -27,8 +27,6 @@
#include <svl/eitem.hxx>
#include <tools/list.hxx>
-#include <hash_map>
-#include <vector>
#include <svl/itemprop.hxx>
#include <editeng/unoipset.hxx>
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index 37389f6b9e42..1d753ab0ea4d 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -221,11 +221,16 @@ Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex( sa
}
{
+ //IAccessibility2 Implementation 2009-----
+ if(SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType())
+ //-----IAccessibility2 Implementation 2009
+ {
sal_Unicode nCode = rFmt.GetBulletChar();
OUString aStr( &nCode, 1 );
aVal <<= aStr;
beans::PropertyValue aBulletProp( OUString(RTL_CONSTASCII_USTRINGPARAM("BulletChar")), -1, aVal, beans::PropertyState_DIRECT_VALUE);
pArray[nIdx++] = aBulletProp;
+ }
}
if( rFmt.GetBulletFont() )
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index d6cd88edc309..00491fd7f519 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -2650,7 +2650,7 @@ sal_Bool SvxDummyTextSource::GetWordIndices( sal_uInt16, sal_uInt16, sal_uInt16&
return sal_False;
}
-sal_Bool SvxDummyTextSource::GetAttributeRun( sal_uInt16&, sal_uInt16&, sal_uInt16, sal_uInt16 ) const
+sal_Bool SvxDummyTextSource::GetAttributeRun( sal_uInt16&, sal_uInt16&, sal_uInt16, sal_uInt16, sal_Bool ) const
{
return sal_False;
}
diff --git a/external_deps.lst b/external_deps.lst
index 78b694a31c5a..2aaafd4a49b5 100644
--- a/external_deps.lst
+++ b/external_deps.lst
@@ -168,24 +168,6 @@ if ( true )
URL1 = http://archive.apache.org/dist/apr/$(name)
URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
-if ( USE_SYSTEM_STL != YES )
- MD5 = c441926f3a552ed3e5b274b62e86af16
- name = STLport-4.0.tar.gz
- # This seems to be the original host, but the MD5 sum does not match.
- # URL1 = http://sourceforge.net/projects/stlport/files/STLport%20archive/STLport%204/STLport-4.0.tar.gz/download
- URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
-
-if ( USE_SYSTEM_STL != YES )
- MD5 = 18f577b374d60b3c760a3a3350407632
- name = STLport-4.5.tar.gz
- URL1 = http://sourceforge.net/projects/stlport/files/STLport%20archive/STLport%204/STLport-4.5.tar.gz/download
- URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
-
-if ( USE_SYSTEM_STL != YES )
- MD5 = 7376930b0d3f3d77a685d94c4a3acda8
- name = STLport-4.5-0119.tar.gz
- URL1 = $(OOO_EXTRAS)$(MD5)-$(name)
-
if (SYSTEM_LIBXML != YES)
MD5 = 8127a65e8c3b08856093099b52599c86
name = libxml2-2.7.8.tar.gz
@@ -305,9 +287,10 @@ if (ENABLE_CATEGORY_B==YES && SOLAR_JAVA==TRUE && ENABLE_JAVASCRIPT==YES)
URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
if (ENABLE_CATEGORY_B==YES && ENABLE_NSS_MODULE==YES)
- MD5 = b92261a5679276c400555004937af965
- name = nss-3.12.6-with-nspr-4.8.4.tar.gz
- URL1 = $(OOO_EXTRAS)$(MD5)-$(name)
+ MD5 = 067a04150b1d8b64f7da3019688a7547
+ name = nss-3.14.4-with-nspr-4.9.5.tar.gz
+ URL1 = ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_14_4_RTM/src/nss-3.14.4-with-nspr-4.9.5.tar.gz
+ URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
if (ENABLE_CATEGORY_B==YES && SYSTEM_SAXON!=YES && DISABLE_SAXON!=YES && SOLAR_JAVA==TRUE)
MD5 = 24be19595acad0a2cae931af77a0148a
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 61474c1a8a64..7dd5408375cc 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -643,7 +643,7 @@ SfxTabPage* ImpPDFTabGeneralPage::Create( Window* pParent,
IMPL_LINK( ImpPDFTabGeneralPage, TogglePagesHdl, void*, EMPTYARG )
{
maEdPages.Enable( maRbRange.IsChecked() );
- //Sym2_5805, When the control is disabled, it is also readonly. So here, it is not necessary to set it as readonly.
+ //When the control is disabled, it is also readonly. So here, it is not necessary to set it as readonly.
//maEdPages.SetReadOnly( !maRbRange.IsChecked() );
return 0;
}
diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx
index 9ebcc194b693..ed1224130305 100644
--- a/formula/source/ui/dlg/ControlHelper.hxx
+++ b/formula/source/ui/dlg/ControlHelper.hxx
@@ -183,6 +183,7 @@ public:
void Hide();
void Show();
+ void UpdateAccessibleNames();
};
}
diff --git a/formula/source/ui/dlg/formdlgs.src b/formula/source/ui/dlg/formdlgs.src
index 194c5e46b559..891c9178f845 100644
--- a/formula/source/ui/dlg/formdlgs.src
+++ b/formula/source/ui/dlg/formdlgs.src
@@ -225,11 +225,17 @@ ModalDialog RID_FORMULADLG_FORMULA_MODAL
Right = TRUE ;
Text [ en-US ] = "Function result" ;
};
- Window WND_RESULT
+//IAccessibility2 Implementation 2009-----
+ //Window WND_RESULT
+ FixedText WND_RESULT
+//-----IAccessibility2 Implementation 2009
{
Border = TRUE ;
Pos = MAP_APPFONT ( 255 , 4 ) ;
Size = MAP_APPFONT ( 60 , 12 ) ;
+//IAccessibility2 Implementation 2009-----
+ Text [ en-US ] = "Function result" ;
+//-----IAccessibility2 Implementation 2009
};
FixedText FT_FORMULA_RESULT
{
diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx
index 9b5924a8423f..94162a28ea6d 100644
--- a/formula/source/ui/dlg/funcutl.cxx
+++ b/formula/source/ui/dlg/funcutl.cxx
@@ -34,6 +34,9 @@
#include "ControlHelper.hxx"
#include "ModuleHelper.hxx"
#include "ForResId.hrc"
+// IAccessibility2 implementation 2009. ------
+#include "com/sun/star/accessibility/AccessibleRole.hpp"
+// ------ IAccessibility2 implementation 2009.
namespace formula
@@ -69,6 +72,7 @@ ValWnd::ValWnd( Window* pParent, const ResId& rId ) : Window( pParent, rId )
aRectOut = Rectangle( Point( 1, ( nDiff<2 ) ? 1 : nDiff/2),
Size ( aSzWnd.Width()-2, nHeight ) );
SetClipRegion( Region( aRectOut ) );
+ SetAccessibleRole( ::com::sun::star::accessibility::AccessibleRole::LABEL );
}
//----------------------------------------------------------------------------
@@ -472,6 +476,20 @@ void ArgInput::Show()
pRefBtn->Show();
}
}
+//IAccessibility2 Implementation 2009-----
+void ArgInput::UpdateAccessibleNames()
+{
+ String aArgName = String::CreateFromAscii(":");
+ aArgName += pFtArg->GetText();
+
+ String aName = pBtnFx->GetQuickHelpText();
+ aName += aArgName;
+ pBtnFx->SetAccessibleName(aName);
+
+ aName = pRefBtn->GetQuickHelpText();
+ aName += aArgName;
+ pRefBtn->SetAccessibleName(aName);
+}
/*************************************************************************
#* Member: FxClick Datum:13.01.97
diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx
index fbe71e087281..7ea14b2d9971 100644
--- a/formula/source/ui/dlg/parawin.cxx
+++ b/formula/source/ui/dlg/parawin.cxx
@@ -374,6 +374,7 @@ void ParaWin::SetEditDesc(const String& aText)
void ParaWin::SetArgName(sal_uInt16 no,const String& aText)
{
aArgInput[no].SetArgName(aText);
+ aArgInput[no].UpdateAccessibleNames();
}
void ParaWin::SetArgNameFont(sal_uInt16 no,const Font& aFont)
@@ -419,6 +420,7 @@ void ParaWin::InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, ImageButton& rBt
aArgInput[nPos].SetFxFocusHdl ( LINK( this, ParaWin, GetFxFocusHdl ) );
aArgInput[nPos].SetEdFocusHdl ( LINK( this, ParaWin, GetEdFocusHdl ) );
aArgInput[nPos].SetEdModifyHdl ( LINK( this, ParaWin, ModifyHdl ) );
+ aArgInput[nPos].UpdateAccessibleNames();
}
void ParaWin::ClearAll()
@@ -516,6 +518,7 @@ void ParaWin::SliderMoved()
aArgInput[nEdFocus].SetArgSelection(Selection(0,SELECTION_MAX ));
nActiveLine=nEdFocus+nOffset;
ArgumentModified();
+ aArgInput[nEdFocus].UpdateAccessibleNames();
}
aScrollLink.Call(this);
}
@@ -596,6 +599,7 @@ IMPL_LINK( ParaWin, GetEdFocusHdl, ArgInput*, pPtr )
UpdateArgDesc( nEdFocus );
nActiveLine=nEdFocus+nOffset;
ArgumentModified();
+ aArgInput[nEdFocus].UpdateAccessibleNames();
}
return 0;
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 5f1bd8a68326..a86fa8aac743 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -187,6 +187,11 @@ css::uno::Reference< css::lang::XComponent > LoadEnv::loadComponentFromURL(const
css::io::IOException ,
css::uno::RuntimeException )
{
+ //IAccessibility2 Implementation 2009-----
+#ifdef WNT
+ CEnableAccessInterface e;
+#endif
+ //-----IAccessibility2 Implementation 2009
css::uno::Reference< css::lang::XComponent > xComponent;
try
diff --git a/graphite/graphite-2.3.1.patch b/graphite/graphite-2.3.1.patch
index 7adbd0eed2e5..508226a66bfb 100644
--- a/graphite/graphite-2.3.1.patch
+++ b/graphite/graphite-2.3.1.patch
@@ -2347,7 +2347,7 @@
}
- ~GrSlotAbstract()
-+ virtual ~GrSlotAbstract()
++ virtual ~GrSlotAbstract()
{
// the table manager is responsible for destroying the contents of m_prgnVarLenBuf
}
@@ -2356,7 +2356,7 @@
}
- ~GrSlotState()
-+ virtual ~GrSlotState()
++ virtual ~GrSlotState()
{
}
diff --git a/instsetoo_native/data/releases.xml b/instsetoo_native/data/releases.xml
new file mode 100644
index 000000000000..34c4d079bab6
--- /dev/null
+++ b/instsetoo_native/data/releases.xml
@@ -0,0 +1,316 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--***********************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ ***********************************************************-->
+<releases>
+ <release>
+ <version>4.0.0</version>
+ <download>
+ <package-format>msi</package-format>
+ <url-template>
+ http://archive.apache.org/dist/openoffice/4.0.0/binaries/%L/Apache_OpenOffice_4.0.0_Win_x86_install_%L.exe
+ </url-template>
+ <item>
+ <language>ast</language>
+ <checksum type="sha256">415e2f3cf4d99a3f6ad495e33b89c716ef6966c9c4d7df90ad6e004fcf0222f4</checksum>
+ <size>154219869</size>
+ </item>
+ <item>
+ <language>cs</language>
+ <checksum type="sha256">a90a2c00c58f3e30654b89b4a363b099b0a7d1f829ebf9c7c18333d387f4bf41</checksum>
+ <size>130773239</size>
+ </item>
+ <item>
+ <language>de</language>
+ <checksum type="sha256">5569634ac40b42a710c666d0511f6aa4dbcb05d1a525e06f6be038e828c507f0</checksum>
+ <size>162401424</size>
+ </item>
+ <item>
+ <language>el</language>
+ <checksum type="sha256">cc5cde6314cea634200da6861da527c11ca7d74338074cdd4e5a22e1ffd9ef7c</checksum>
+ <size>139633387</size>
+ </item>
+ <item>
+ <language>en-GB</language>
+ <checksum type="sha256">7f83397877b72e7f2da38f11b76c3f46e30b93713b40becba699d21f913847e0</checksum>
+ <size>136201626</size>
+ </item>
+ <item>
+ <language>en-US</language>
+ <checksum type="sha256">8db246183f549c298d731cf61771f8f8adb37028d8ecc737fe1ad452899adb2d</checksum>
+ <size>143436858</size>
+ </item>
+ <item>
+ <language>es</language>
+ <checksum type="sha256">eb991c71b436c4d740f3d2b5441716fc321bb57eb7f36c7019ec86feebb7f5d4</checksum>
+ <size>132424454</size>
+ </item>
+ <item>
+ <language>fi</language>
+ <checksum type="sha256">fa2b9015864651be44afc940988ed20c6093bc8707aea72ab1b75cf147d81ed2</checksum>
+ <size>138474963</size>
+ </item>
+ <item>
+ <language>fr</language>
+ <checksum type="sha256">b4b20eac7f6220a4a6250e79d950a328d08b927b8856d762b0b1e033833e198f</checksum>
+ <size>133397214</size>
+ </item>
+ <item>
+ <language>gd</language>
+ <checksum type="sha256">c2e5ac75f899efab61f039a193a68ec2f4d092fd43c6eb46d8b2d34d8166ce6e</checksum>
+ <size>154472734</size>
+ </item>
+ <item>
+ <language>gl</language>
+ <checksum type="sha256">bac4915fd47b9e219d72a02a268fa590096c0884ebafd966b10e9b77fe16eee0</checksum>
+ <size>137952793</size>
+ </item>
+ <item>
+ <language>hu</language>
+ <checksum type="sha256">2e01d00431692cb6071cf520e71b900dba28a846dccf4ed3a85c245761c98906</checksum>
+ <size>133240224</size>
+ </item>
+ <item>
+ <language>it</language>
+ <checksum type="sha256">8663c01de8f62b26a7864ac4da6abd316a1c2e00b35c60372cad5287120fe409</checksum>
+ <size>138823014</size>
+ </item>
+ <item>
+ <language>ja</language>
+ <checksum type="sha256">559f165ee9ff516a80573befaf7d0936ca81fa89aca655213b4f265eb7c7059a</checksum>
+ <size>136416679</size>
+ </item>
+ <item>
+ <language>ko</language>
+ <checksum type="sha256">daa7f3b51e6ffb0b541a98fbcdc0bad53eea579a7d74c9acbdd73ad660b117b1</checksum>
+ <size>131617051</size>
+ </item>
+ <item>
+ <language>nl</language>
+ <checksum type="sha256">fcc6e55c7a1407be8e8f2faf7305ebb9a8f7e1bea882e5d917b5846a2c0ee955</checksum>
+ <size>138526756</size>
+ </item>
+ <item>
+ <language>pt</language>
+ <checksum type="sha256">58307e0eeb485840e1462a23f8741e793422ccdc468123f85876ae287482a987</checksum>
+ <size>130929247</size>
+ </item>
+ <item>
+ <language>pt-BR</language>
+ <checksum type="sha256">08ef83f28e138dc0bc6bdf761e4676eb13c2b30717ce47e0becec2de90c73f7a</checksum>
+ <size>130814647</size>
+ </item>
+ <item>
+ <language>ru</language>
+ <checksum type="sha256">dda689b273eb9ddadfb156a08df8e73c3b41e3cc8178a16546e282f8e1c54d77</checksum>
+ <size>137558077</size>
+ </item>
+ <item>
+ <language>sk</language>
+ <checksum type="sha256">d2722d2569178838a57705e76062603f995f71d5219e8f910bc7a6b46fa6039a</checksum>
+ <size>131199460</size>
+ </item>
+ <item>
+ <language>sl</language>
+ <checksum type="sha256">eecea1c75833a873a3cc00f81c85f411319b085728224c716ac90159622c0c3e</checksum>
+ <size>132340393</size>
+ </item>
+ <item>
+ <language>ta</language>
+ <checksum type="sha256">4051b4831a960a8f27a3f56f32d7bd5a7bbdfcf859238a149aca9cd69ae0121c</checksum>
+ <size>136961005</size>
+ </item>
+ <item>
+ <language>zh-CN</language>
+ <checksum type="sha256">94424b9c24d3237e70d6452da8366cf9c6617a46fa171901db093b1a1166934d</checksum>
+ <size>131840961</size>
+ </item>
+ </download>
+ </release>
+ <release>
+ <version>4.0.1</version>
+ <download>
+ <package-format>msi</package-format>
+ <url-template>
+ http://archive.apache.org/dist/openoffice/4.0.1/binaries/%L/Apache_OpenOffice_4.0.1_Win_x86_install_%L.exe
+ </url-template>
+ <item>
+ <language>ast</language>
+ <checksum type="sha256">9854b6a99c6e56902e30ec01009e294aafe091e4733e9b8933690ee0365d6754</checksum>
+ <size>154320289</size>
+ </item>
+ <item>
+ <language>cs</language>
+ <checksum type="sha256">b23c5dc07a6e521a7ad24e7c1d131c96ea3a6fdf3a2f96020b5cad2e7ebe0253</checksum>
+ <size>130785256</size>
+ </item>
+ <item>
+ <language>de</language>
+ <checksum type="sha256">fbbe39def767e6ecd16c7b6802f35d6e4b035c4b72328bbf0a8f045cf585aaa7</checksum>
+ <size>163606685</size>
+ </item>
+ <item>
+ <language>el</language>
+ <checksum type="sha256">e59f47b986c4bcd8f21062446b299f68ac7ed941356813b0e2dbd651fb59c847</checksum>
+ <size>139717373</size>
+ </item>
+ <item>
+ <language>en-GB</language>
+ <checksum type="sha256">75f06dbe9f13804ea9f3ef20d831e300a55df1bf1a5b656d2422206a8a0d8bda</checksum>
+ <size>136295104</size>
+ </item>
+ <item>
+ <language>en-US</language>
+ <checksum type="sha256">3b68145a33fa83d246febb3b7551fb0cbf57363bc772401ac0c37cfc1cde21b3</checksum>
+ <size>143485940</size>
+ </item>
+ <item>
+ <language>es</language>
+ <checksum type="sha256">5136276a370378d11327b9a0bd074d269a49e797c7186f2e3cc9cf6c0bbc20fc</checksum>
+ <size>132478227</size>
+ </item>
+ <item>
+ <language>eu</language>
+ <checksum type="sha256">aae1ff61af9ac117637842ccc1c28221620c79b05ffbb1fb47d8a6fcbe3b1700</checksum>
+ <size>131476228</size>
+ </item>
+ <item>
+ <language>fi</language>
+ <checksum type="sha256">65ff3209a51afefde11dd1326921340ebe035f09626d8884f37a0f72f8c2785b</checksum>
+ <size>138523539</size>
+ </item>
+ <item>
+ <language>fr</language>
+ <checksum type="sha256">70c97dc59412a8e4aeb87e51e8714cbba776397beb6a774804591653150e78d5</checksum>
+ <size>134622711</size>
+ </item>
+ <item>
+ <language>gd</language>
+ <checksum type="sha256">a57115a636f4004de2df9599e72bc4d07937b65a6bb99fe126dc18a788a57142</checksum>
+ <size>154574682</size>
+ </item>
+ <item>
+ <language>gl</language>
+ <checksum type="sha256">4c8fe9b42193dc37dc6a2b979b790ea6317ea25a6fa27fcb9007036c5725111d</checksum>
+ <size>138019151</size>
+ </item>
+ <item>
+ <language>hu</language>
+ <checksum type="sha256">97765ef536ed1e3f07220fe4cb90520efdfb376fab751ad2cac7390316f14e65</checksum>
+ <size>133302800</size>
+ </item>
+ <item>
+ <language>it</language>
+ <checksum type="sha256">c6fa3e0e9bef615d804b5d24d3f2cc49f7655aee01ef34cecb9b520a47249d02</checksum>
+ <size>138894766</size>
+ </item>
+ <item>
+ <language>ja</language>
+ <checksum type="sha256">93d20ae5f96f4a93c705894849f01b6501604bf003e9b66f7d0dbdc6f2282965</checksum>
+ <size>136444096</size>
+ </item>
+ <item>
+ <language>km</language>
+ <checksum type="sha256">4fc263c631d4ba797633d28ca529202b600d5fe676a8c215904d12d08ed8cc49</checksum>
+ <size>151866955</size>
+ </item>
+ <item>
+ <language>ko</language>
+ <checksum type="sha256">2abd13afe2978c4300d872a06dcec00ae23592ed563be3d0d046ef81738d7a87</checksum>
+ <size>131671507</size>
+ </item>
+ <item>
+ <language>lt</language>
+ <checksum type="sha256">4ac6c2c88edb5254e0cf93f49daaf5e411ea0168d6c431d11da5d89638977cff</checksum>
+ <size>136935582</size>
+ </item>
+ <item>
+ <language>nl</language>
+ <checksum type="sha256">85292dad5aa80711c126091d3565dc9cd2219d818a59cbd5c7c9a4bc5282ebb8</checksum>
+ <size>139734741</size>
+ </item>
+ <item>
+ <language>pl</language>
+ <checksum type="sha256">c71c63d0c0e76f28b7d3bebb39e1cb9c0ca35e29557c53528f631e6c1aeca04c</checksum>
+ <size>133661993</size>
+ </item>
+ <item>
+ <language>pt-BR</language>
+ <checksum type="sha256">e6baed3d30d4b18e32e21ab4fcd22446ac1f8a40efe49a4f105e9c3fc0ba1611</checksum>
+ <size>130866989</size>
+ </item>
+ <item>
+ <language>pt</language>
+ <checksum type="sha256">dd855dc99fc41fd509e938881397798fa2e9ed92e663cb8b9ea6c356d5d5a096</checksum>
+ <size>130989882</size>
+ </item>
+ <item>
+ <language>ru</language>
+ <checksum type="sha256">7e965822f8dfb0aa4a67bf5bff8ddb852901c672886bb9f2ee275c5c976c0a48</checksum>
+ <size>137584051</size>
+ </item>
+ <item>
+ <language>sk</language>
+ <checksum type="sha256">4400eb30ca5072b175da7963049bb0ecca761af73b7dbccb9a0b4cd789b26042</checksum>
+ <size>131265676</size>
+ </item>
+ <item>
+ <language>sl</language>
+ <checksum type="sha256">83d384d9e50ddcb9c1d74069d8796e5f37bed55b5da6f43c326c0784a6e61cef</checksum>
+ <size>132368586</size>
+ </item>
+ <item>
+ <language>sr</language>
+ <checksum type="sha256">a2d2e043c1c3fa9a90924ae29138641b238d7749984f873a8672e2844a55e3d9</checksum>
+ <size>136961170</size>
+ </item>
+ <item>
+ <language>sv</language>
+ <checksum type="sha256">15cbdb4f5a7ecf253f31981d0203c08e279a26603ca737e64f740524e1d672ca</checksum>
+ <size>131330363</size>
+ </item>
+ <item>
+ <language>ta</language>
+ <checksum type="sha256">352083d6d2fc6c39027a03fbbb6449d4a67955b370c5a8efba0407b74a456bc9</checksum>
+ <size>137001517</size>
+ </item>
+ <item>
+ <language>tr</language>
+ <checksum type="sha256">bdfbf83cc905bf44f086ea51295899a042667fa6334e6378ef5b5b354843ba37</checksum>
+ <size>130397087</size>
+ </item>
+ <item>
+ <language>vi</language>
+ <checksum type="sha256">0483c20036f47738ae86a19d0ab4e66eff8d8f5226f716970a4ec7f56a78bff6</checksum>
+ <size>131526617</size>
+ </item>
+ <item>
+ <language>zh-CN</language>
+ <checksum type="sha256">f2966f3c251cf31a24d7931950838c04e410935dd15a6fdd9241acf81bc5e784</checksum>
+ <size>131863915</size>
+ </item>
+ <item>
+ <language>zh-TW</language>
+ <checksum type="sha256">a194cfb2dc2cbcae2e89740485ebfcbf605b7c80a5bbdffb699e447c53698e53</checksum>
+ <size>131990994</size>
+ </item>
+ </download>
+ </release>
+</releases> \ No newline at end of file
diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst
index 82ac49b0dc32..0d82994621d0 100644
--- a/instsetoo_native/util/openoffice.lst
+++ b/instsetoo_native/util/openoffice.lst
@@ -27,9 +27,7 @@ Globals
NATIVEPROGRESS false
REGISTRYLAYERNAME Layers
SERVICEPACK 1
- UPDATE_DATABASE 1
CREATE_MSP_INSTALLSET 0
- UPDATE_DATABASE_LISTNAME finals_instsetoo.txt
PACKAGEMAP package_names.txt,package_names_ext.txt
WINDOWSPATCHLEVEL 8
OOOVENDOR Apache Software Foundation
@@ -241,48 +239,6 @@ Apache_OpenOffice_Dev
}
}
-URE
-{
- Settings
- {
- downloadname URE_{productversion}_{os}_install_{languages}
- variables
- {
- FULLPRODUCTNAME URE
- PRODUCTNAME URE
- PRODUCTVERSION 4.1.0
- PACKAGEVERSION 4.1
- PACKAGEREVISION 1
- PRODUCTEXTENSION
- LONG_PRODUCTEXTENSION
- SHORT_PRODUCTEXTENSION
- LICENSENAME ALv2
- SETSTATICPATH 1
- NOVERSIONINDIRNAME 1
- PCPFILENAME ure.pcp
- POOLPRODUCT 0
- GLOBALFILEGID gid_File_Dl_Cppu
- DOWNLOADBANNER urebanner.bmp
- DOWNLOADBITMAP urebitmap.bmp
- DOWNLOADSETUPICO ooosetup.ico
- DONTUSESTARTMENUFOLDER 1
- RELATIVE_PATHES_IN_DDF 1
- NOLANGUAGESELECTIONPRODUCT 1
- AOODOWNLOADNAMEPREFIX Apache_OpenOffice-URE
- STARTCENTER_ADDFEATURE_URL http://extensions.openoffice.org/
- STARTCENTER_INFO_URL http://www.openoffice.org
- STARTCENTER_TEMPLREP_URL http://templates.openoffice.org
- STARTCENTER_LAYOUT_STYLE 0
- ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk,version.lst
- PACKAGEMAP package_names_ext.txt
- DICT_REPO_URL http://extensions.openoffice.org/dictionaries
- }
- active 1
- compression 5
- script ure
- include {solarenvpath}/{os}/loader2,{solarpath}/bin.{minor}/ure,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/xml.{minor},{solarenvpath}/{os}/MS
- }
-}
Apache_OpenOffice_SDK
{
@@ -309,7 +265,6 @@ Apache_OpenOffice_SDK
NO_README_IN_ROOTDIR 1
LICENSENAME ALv2
IGNOREDIRECTORYLAYER 1
- NOVERSIONINDIRNAME 0
NOSPACEINDIRECTORYNAME 1
NOLANGUAGESELECTIONPRODUCT 1
CHANGETARGETDIR 1
@@ -364,7 +319,6 @@ Apache_OpenOffice_Dev_SDK
NO_README_IN_ROOTDIR 1
LICENSENAME ALv2
IGNOREDIRECTORYLAYER 1
- NOVERSIONINDIRNAME 0
NOSPACEINDIRECTORYNAME 1
NOLANGUAGESELECTIONPRODUCT 1
CHANGETARGETDIR 1
diff --git a/libxmlsec/makefile.mk b/libxmlsec/makefile.mk
index 70b74e418415..37c280b35203 100644
--- a/libxmlsec/makefile.mk
+++ b/libxmlsec/makefile.mk
@@ -31,9 +31,9 @@ EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
.INCLUDE : settings.mk
-.IF "$(WITH_MOZILLA)" == "NO"
+.IF "$(ENABLE_NSS_MODULE)" == "NO"
@all:
- @echo "Mozilla disabled -> no nss -> no libxmlsec...."
+ @echo "No nss -> no libxmlsec...."
.ENDIF
# --- Files --------------------------------------------------------
@@ -95,9 +95,9 @@ xmlsec_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
.ENDIF
CONFIGURE_DIR=
CONFIGURE_ACTION=.$/configure
-CONFIGURE_FLAGS=--with-libxslt=no --with-openssl=no --with-gnutls=no --with-mozilla_ver=1.7.5 --enable-mscrypto --disable-crypto-dl --build=i586-pc-mingw32 --host=i586-pc-mingw32 CC="$(xmlsec_CC)" LDFLAGS="-no-undefined -L$(ILIB:s/;/ -L/)" LIBS="$(xmlsec_LIBS)" LIBXML2LIB=$(LIBXML2LIB) ZLIB3RDLIB=$(ZLIB3RDLIB) OBJDUMP="$(WRAPCMD) objdump"
+CONFIGURE_FLAGS=--with-libxslt=no --with-openssl=no --with-gnutls=no --enable-mscrypto --disable-crypto-dl --build=i586-pc-mingw32 --host=i586-pc-mingw32 CC="$(xmlsec_CC)" LDFLAGS="-no-undefined -L$(ILIB:s/;/ -L/)" LIBS="$(xmlsec_LIBS)" LIBXML2LIB=$(LIBXML2LIB) ZLIB3RDLIB=$(ZLIB3RDLIB) OBJDUMP="$(WRAPCMD) objdump"
-.IF "$(SYSTEM_MOZILLA)" != "YES"
+.IF "$(SYSTEM_NSS)" != "YES"
CONFIGURE_FLAGS+=--enable-pkgconfig=no
.ENDIF
BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
@@ -148,7 +148,7 @@ LDFLAGS:=$(xmlsec_LDFLAGS)
CONFIGURE_DIR=
CONFIGURE_ACTION=.$/configure ADDCFLAGS="$(xmlsec_CFLAGS)" CPPFLAGS="$(xmlsec_CPPFLAGS)"
CONFIGURE_FLAGS=--with-pic --disable-shared --disable-crypto-dl --with-libxslt=no --with-openssl=no --with-gnutls=no LIBXML2LIB="$(LIBXML2LIB)"
-# system-mozilla needs pkgconfig to get the information about nss
+# system-nss needs pkgconfig to get the information about nss
# FIXME: This also will enable pkg-config usage for libxml2. It *seems*
# that the internal headers still are used when they are there but....
# (and that pkg-config is allowed to fail...)
@@ -157,7 +157,7 @@ CONFIGURE_FLAGS=--with-pic --disable-shared --disable-crypto-dl --with-libxslt=n
# --with-nss or parse -pkg-config --libs / cflags mozilla-nss since
# the lib may a) be in /usr/lib (Debian) and be not in $with_nss/include
# $with_nss/lib.
-.IF "$(SYSTEM_MOZILLA)" != "YES"
+.IF "$(SYSTEM_NSS)" != "YES"
CONFIGURE_FLAGS+=--enable-pkgconfig=no
.ENDIF
BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
diff --git a/nss/makefile.mk b/nss/makefile.mk
index 824008234393..b9e482fd6d84 100644
--- a/nss/makefile.mk
+++ b/nss/makefile.mk
@@ -39,9 +39,9 @@ all:
.ELSE
-TARFILE_NAME=nss-3.12.6-with-nspr-4.8.4
-TARFILE_MD5=b92261a5679276c400555004937af965
-TARFILE_ROOTDIR=nss-3.12.6
+TARFILE_NAME=nss-3.14.4-with-nspr-4.9.5
+TARFILE_MD5=067a04150b1d8b64f7da3019688a7547
+TARFILE_ROOTDIR=nss-3.14.4
PATCH_FILES=nss.patch
.IF "$(OS)"=="MACOSX"
@@ -88,8 +88,8 @@ BUILD_DIR=mozilla$/security$/nss
BUILD_ACTION= $(GNUMAKE) nss_build_all
#See #i105566# && moz#513024#
.IF "$(OS)"=="LINUX"
-BUILD_ACTION+=FREEBL_NO_DEPEND=1
-PATCH_FILES+=nss_linux.patch nspr-4.8.4-clang.patch
+BUILD_ACTION+=FREEBL_NO_DEPEND=1 FREEBL_LOWHASH=1
+PATCH_FILES+=nss_linux.patch
.ENDIF
.ENDIF # "$(GUI)"=="UNX"
diff --git a/nss/nspr-4.8.4-clang.patch b/nss/nspr-4.8.4-clang.patch
deleted file mode 100644
index 974ec688743d..000000000000
--- a/nss/nspr-4.8.4-clang.patch
+++ /dev/null
@@ -1,194 +0,0 @@
---- misc/nss-3.12.6/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86.s 2006-12-11 10:45:30.000000000 +0100
-+++ misc/build/nss-3.12.6/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86.s 2013-03-28 17:11:50.919079879 +0100
-@@ -1,4 +1,4 @@
--/ -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- /
- / ***** BEGIN LICENSE BLOCK *****
- / Version: MPL 1.1/GPL 2.0/LGPL 2.1
-@@ -40,7 +40,8 @@
- /
- / Atomically increment the integer pointed to by 'val' and return
- / the result of the increment.
--/
-+/ */
-+
- .text
- .globl _PR_x86_AtomicIncrement
- .align 4
-@@ -52,11 +53,11 @@
- incl %eax
- ret
-
--/ PRInt32 _PR_x86_AtomicDecrement(PRInt32 *val)
-+/* PRInt32 _PR_x86_AtomicDecrement(PRInt32 *val)
- /
- / Atomically decrement the integer pointed to by 'val' and return
- / the result of the decrement.
--/
-+/ */
- .text
- .globl _PR_x86_AtomicDecrement
- .align 4
-@@ -68,7 +69,7 @@
- decl %eax
- ret
-
--/ PRInt32 _PR_x86_AtomicSet(PRInt32 *val, PRInt32 newval)
-+/* PRInt32 _PR_x86_AtomicSet(PRInt32 *val, PRInt32 newval)
- /
- / Atomically set the integer pointed to by 'val' to the new
- / value 'newval' and return the old value.
-@@ -86,7 +87,7 @@
- / cmpxchgl %edx, (%ecx)
- / jne retry
- / ret
--/
-+/ */
- .text
- .globl _PR_x86_AtomicSet
- .align 4
-@@ -96,11 +97,11 @@
- xchgl %eax, (%ecx)
- ret
-
--/ PRInt32 _PR_x86_AtomicAdd(PRInt32 *ptr, PRInt32 val)
-+/* PRInt32 _PR_x86_AtomicAdd(PRInt32 *ptr, PRInt32 val)
- /
- / Atomically add 'val' to the integer pointed to by 'ptr'
- / and return the result of the addition.
--/
-+/ */
- .text
- .globl _PR_x86_AtomicAdd
- .align 4
-@@ -113,5 +114,5 @@
- addl %edx, %eax
- ret
-
--/ Magic indicating no need for an executable stack
-+/* Magic indicating no need for an executable stack */
- .section .note.GNU-stack, "", @progbits ; .previous
---- misc/nss-3.12.6/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86_64.s 2006-12-11 10:45:30.000000000 +0100
-+++ misc/build/nss-3.12.6/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86_64.s 2013-03-28 17:12:00.215016941 +0100
-@@ -1,4 +1,4 @@
--/ -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- /
- / ***** BEGIN LICENSE BLOCK *****
- / Version: MPL 1.1/GPL 2.0/LGPL 2.1
-@@ -40,7 +40,8 @@
- /
- / Atomically increment the integer pointed to by 'val' and return
- / the result of the increment.
--/
-+/ */
-+
- .text
- .globl _PR_x86_64_AtomicIncrement
- .align 4
-@@ -51,11 +52,11 @@
- incl %eax
- ret
-
--/ PRInt32 _PR_x86_64_AtomicDecrement(PRInt32 *val)
-+/* PRInt32 _PR_x86_64_AtomicDecrement(PRInt32 *val)
- /
- / Atomically decrement the integer pointed to by 'val' and return
- / the result of the decrement.
--/
-+/ */
- .text
- .globl _PR_x86_64_AtomicDecrement
- .align 4
-@@ -66,11 +67,11 @@
- decl %eax
- ret
-
--/ PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval)
-+/* PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval)
- /
- / Atomically set the integer pointed to by 'val' to the new
- / value 'newval' and return the old value.
--/
-+/ */
- .text
- .globl _PR_x86_64_AtomicSet
- .align 4
-@@ -79,11 +80,11 @@
- xchgl %eax, (%rdi)
- ret
-
--/ PRInt32 _PR_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val)
-+/* PRInt32 _PR_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val)
- /
- / Atomically add 'val' to the integer pointed to by 'ptr'
- / and return the result of the addition.
--/
-+/ */
- .text
- .globl _PR_x86_64_AtomicAdd
- .align 4
-@@ -94,5 +95,5 @@
- addl %esi, %eax
- ret
-
--/ Magic indicating no need for an executable stack
-+/* Magic indicating no need for an executable stack */
- .section .note.GNU-stack, "", @progbits ; .previous
---- misc/nss-3.12.6/mozilla/security/nss/lib/freebl/mpi/mp_comba.c 2008-03-09 07:06:27.000000000 +0100
-+++ misc/build/nss-3.12.6/mozilla/security/nss/lib/freebl/mpi/mp_comba.c 2013-03-28 17:17:58.895379167 +0100
-@@ -49,7 +49,7 @@
- "addq %%rax,%0 \n\t" \
- "adcq %%rdx,%1 \n\t" \
- "adcq $0,%2 \n\t" \
-- :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) :"%rax","%rdx","%cc");
-+ :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) :"%rax","%rdx");
-
-
-
-@@ -76,7 +76,7 @@
- "addq %%rax,%0 \n\t" \
- "adcq %%rdx,%1 \n\t" \
- "adcq $0,%2 \n\t" \
-- :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "g"(i) :"%rax","%rdx","%cc");
-+ :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "g"(i) :"%rax","%rdx");
-
- #define SQRADD2(i, j) \
- __asm__ ( \
-@@ -88,7 +88,7 @@
- "addq %%rax,%0 \n\t" \
- "adcq %%rdx,%1 \n\t" \
- "adcq $0,%2 \n\t" \
-- :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) :"%rax","%rdx","%cc");
-+ :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) :"%rax","%rdx");
-
- #define SQRADDSC(i, j) \
- __asm__ ( \
-@@ -97,7 +97,7 @@
- "movq %%rax,%0 \n\t" \
- "movq %%rdx,%1 \n\t" \
- "xorq %2,%2 \n\t" \
-- :"=r"(sc0), "=r"(sc1), "=r"(sc2): "g"(i), "g"(j) :"%rax","%rdx","%cc");
-+ :"=r"(sc0), "=r"(sc1), "=r"(sc2): "g"(i), "g"(j) :"%rax","%rdx");
-
- #define SQRADDAC(i, j) \
- __asm__ ( \
-@@ -106,7 +106,7 @@
- "addq %%rax,%0 \n\t" \
- "adcq %%rdx,%1 \n\t" \
- "adcq $0,%2 \n\t" \
-- :"=r"(sc0), "=r"(sc1), "=r"(sc2): "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) :"%rax","%rdx","%cc");
-+ :"=r"(sc0), "=r"(sc1), "=r"(sc2): "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) :"%rax","%rdx");
-
- #define SQRADDDB \
- __asm__ ( \
-@@ -116,7 +116,7 @@
- "addq %6,%0 \n\t" \
- "adcq %7,%1 \n\t" \
- "adcq %8,%2 \n\t" \
-- :"=&r"(c0), "=&r"(c1), "=&r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) : "%cc");
-+ :"=&r"(c0), "=&r"(c1), "=&r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2));
-
-
-
diff --git a/nss/nss.patch b/nss/nss.patch
index b5f871dd1ecc..d27de91b250a 100644
--- a/nss/nss.patch
+++ b/nss/nss.patch
@@ -1,12 +1,12 @@
---- misc/nss-3.12.6/mozilla/nsprpub/config/rules.mk 2009-12-09 22:24:37.000000000 +0100
-+++ misc/build/nss-3.12.6/mozilla/nsprpub/config/rules.mk 2010-06-11 16:35:54.946870871 +0200
-@@ -345,7 +345,12 @@
+--- misc/nss-3.14.4/mozilla/nsprpub/config/rules.mk 2009-12-09 22:24:37.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/nsprpub/config/rules.mk 2010-06-11 16:35:54.946870871 +0200
+@@ -377,7 +377,12 @@
ifdef NS_USE_GCC
$(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $<
else
- $(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $<
-+ #We remove stl from the paths to avoid that rc.exe finds the stlport of
-+ #OOo. stlport includes the system stl which will fail. By removing it,
++ #We remove stl from the paths to avoid that rc.exe finds the stl wrapper
++ #of AOO. stlport includes the system stl which will fail. By removing it,
+ #rc will use the stl from the system if the path is in the INCLUDE
+ #variable.
+ INCLUDE="$(subst /stl,,$(INCLUDE))" $(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $<
@@ -14,9 +14,9 @@
endif # GCC
@echo $(RES) finished
endif
---- misc/nss-3.12.6/mozilla/nsprpub/configure 2010-02-08 19:41:35.000000000 +0100
-+++ misc/build/nss-3.12.6/mozilla/nsprpub/configure 2010-06-11 16:35:54.960188991 +0200
-@@ -3900,7 +3900,7 @@
+--- misc/nss-3.14.4/mozilla/nsprpub/configure 2010-02-08 19:41:35.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/nsprpub/configure 2010-06-11 16:35:54.960188991 +0200
+@@ -4443,7 +4443,7 @@
PR_MD_CSRCS=linux.c
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
DSO_CFLAGS=-fPIC
@@ -25,26 +25,27 @@
_OPTIMIZE_FLAGS=-O2
_DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
# combo is not yet good at debugging inlined
---- misc/nss-3.12.6/mozilla/security/coreconf/Darwin.mk 2010-02-04 19:59:10.000000000 +0100
-+++ misc/build/nss-3.12.6/mozilla/security/coreconf/Darwin.mk 2010-06-11 16:35:54.966185975 +0200
-@@ -39,8 +39,12 @@
+--- misc/nss-3.14.4/mozilla/security/coreconf/Darwin.mk 2010-02-04 19:59:10.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/security/coreconf/Darwin.mk 2010-06-11 16:35:54.966185975 +0200
+@@ -5,10 +5,12 @@
- DEFAULT_COMPILER = cc
+ include $(CORE_DEPTH)/coreconf/UNIX.mk
--CC = cc
--CCC = c++
+-DEFAULT_COMPILER = gcc
++DEFAULT_COMPILER = cc
++
+# CC is taken from environment automatically.
+#CC = cc
-+# Use CCC from environment.
-+#CCC = c++
+CCC = $(CXX)
-+
+
+-CC = gcc
+-CCC = g++
RANLIB = ranlib
ifndef CPU_ARCH
---- misc/nss-3.12.6/mozilla/security/coreconf/Linux.mk 2010-01-15 23:19:00.000000000 +0100
-+++ misc/build/nss-3.12.6/mozilla/security/coreconf/Linux.mk 2010-06-11 16:35:54.981151732 +0200
-@@ -46,8 +46,11 @@
+--- misc/nss-3.14.4/mozilla/security/coreconf/Linux.mk 2010-01-15 23:19:00.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/security/coreconf/Linux.mk 2010-06-11 16:35:54.981151732 +0200
+@@ -16,8 +16,11 @@
IMPL_STRATEGY = _PTH
endif
@@ -58,7 +59,7 @@
RANLIB = ranlib
DEFAULT_COMPILER = gcc
-@@ -147,7 +150,7 @@
+@@ -143,7 +146,7 @@
# incorrectly reports undefined references in the libraries we link with, so
# we don't use -z defs there.
ZDEFS_FLAG = -Wl,-z,defs
@@ -66,10 +67,10 @@
+DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) '-Wl,-rpath,$$ORIGIN'
LDFLAGS += $(ARCHFLAG)
- # INCLUDES += -I/usr/include -Y/usr/include/linux
-@@ -158,8 +161,13 @@
- #
- CPU_TAG = _$(CPU_ARCH)
+ # On Maemo, we need to use the -rpath-link flag for even the standard system
+@@ -174,8 +177,13 @@
+ endif
+ endif
+ifeq ($(SYSTEM_ZLIB),YES)
+# Currently (3.12.4) only the tools modutil and signtool are linked with libz
@@ -81,9 +82,9 @@
# The -rpath '$$ORIGIN' linker option instructs this library to search for its
# dependencies in the same directory where it resides.
---- misc/nss-3.12.6/mozilla/security/coreconf/SunOS5.mk 2009-06-11 02:55:32.000000000 +0200
-+++ misc/build/nss-3.12.6/mozilla/security/coreconf/SunOS5.mk 2010-06-11 16:35:54.985571182 +0200
-@@ -89,8 +89,12 @@
+--- misc/nss-3.14.4/mozilla/security/coreconf/SunOS5.mk 2009-06-11 02:55:32.000000000 +0200
++++ misc/build/nss-3.14.4/mozilla/security/coreconf/SunOS5.mk 2010-06-11 16:35:54.985571182 +0200
+@@ -48,8 +48,12 @@
# OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
endif
else
@@ -98,9 +99,9 @@
ASFLAGS += -Wa,-P
OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG)
ifndef BUILD_OPT
---- misc/nss-3.12.6/mozilla/security/coreconf/arch.mk 2009-06-05 04:14:49.000000000 +0200
-+++ misc/build/nss-3.12.6/mozilla/security/coreconf/arch.mk 2010-06-11 16:35:54.990913282 +0200
-@@ -324,7 +324,12 @@
+--- misc/nss-3.14.4/mozilla/security/coreconf/arch.mk 2009-06-05 04:14:49.000000000 +0200
++++ misc/build/nss-3.14.4/mozilla/security/coreconf/arch.mk 2010-06-11 16:35:54.990913282 +0200
+@@ -302,7 +302,12 @@
# IMPL_STRATEGY may be defined too.
#
@@ -114,9 +115,9 @@
ifeq (,$(filter-out WIN%,$(OS_TARGET)))
ifndef BUILD_OPT
---- misc/nss-3.12.6/mozilla/security/coreconf/rules.mk 2009-12-08 02:33:36.000000000 +0100
-+++ misc/build/nss-3.12.6/mozilla/security/coreconf/rules.mk 2010-06-11 16:35:54.996448704 +0200
-@@ -355,7 +355,12 @@
+--- misc/nss-3.14.4/mozilla/security/coreconf/rules.mk 2009-12-08 02:33:36.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/security/coreconf/rules.mk 2010-06-11 16:35:54.996448704 +0200
+@@ -318,7 +318,12 @@
ifdef NS_USE_GCC
$(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $<
else
@@ -130,27 +131,22 @@
endif
@echo $(RES) finished
endif
---- misc/nss-3.12.6/mozilla/security/nss/cmd/platlibs.mk 2010-02-04 19:59:10.000000000 +0100
-+++ misc/build/nss-3.12.6/mozilla/security/nss/cmd/platlibs.mk 2010-06-11 16:35:55.004869805 +0200
-@@ -41,27 +41,28 @@
+--- misc/nss-3.14.4/mozilla/security/nss/cmd/platlibs.mk 2010-02-04 19:59:10.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/security/nss/cmd/platlibs.mk 2010-06-11 16:35:55.004869805 +0200
+@@ -10,17 +10,18 @@
+
ifeq ($(OS_ARCH), SunOS)
- ifeq ($(BUILD_SUN_PKG), 1)
ifeq ($(USE_64), 1)
-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
-+#In OOo we would probable put the executables next to libs
++#In AOO we would probable put the executables next to libs
+EXTRA_SHARED_LIBS += -R '$$ORIGIN'
else
-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps'
+EXTRA_SHARED_LIBS += -R '$$ORIGIN'
endif
- else
--EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib'
-+EXTRA_SHARED_LIBS += -R '$$ORIGIN'
- endif
endif
ifeq ($(OS_ARCH), Linux)
- ifeq ($(BUILD_SUN_PKG), 1)
ifeq ($(USE_64), 1)
-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
@@ -158,19 +154,11 @@
-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
endif
- else
- ifeq ($(USE_64), 1)
--EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:$$ORIGIN/../lib'
-+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
- else
--EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib'
-+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN'
- endif
endif
- endif
---- misc/nss-3.12.6/mozilla/security/nss/cmd/shlibsign/Makefile 2009-08-07 21:06:37.000000000 +0200
-+++ misc/build/nss-3.12.6/mozilla/security/nss/cmd/shlibsign/Makefile 2010-06-11 16:35:55.009851148 +0200
-@@ -78,10 +78,15 @@
+
+--- misc/nss-3.14.4/mozilla/security/nss/cmd/shlibsign/Makefile 2009-08-07 21:06:37.000000000 +0200
++++ misc/build/nss-3.14.4/mozilla/security/nss/cmd/shlibsign/Makefile 2010-06-11 16:35:55.009851148 +0200
+@@ -46,10 +46,15 @@
# sign any and all shared libraries that contain the word freebl
diff --git a/nss/nss.patch.mingw b/nss/nss.patch.mingw
index 89edd5638e20..bc1375c470e3 100644
--- a/nss/nss.patch.mingw
+++ b/nss/nss.patch.mingw
@@ -1,5 +1,5 @@
---- misc/nss-3.12.6/mozilla/nsprpub/config/autoconf.mk.in 2009-03-04 07:04:23.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/nsprpub/config/autoconf.mk.in 2010-06-17 08:42:08.010625000 +0900
+--- misc/nss-3.13.6/mozilla/nsprpub/config/autoconf.mk.in 2009-03-04 07:04:23.000000000 +0900
++++ misc/build/nss-3.13.6/mozilla/nsprpub/config/autoconf.mk.in 2010-06-17 08:42:08.010625000 +0900
@@ -22,6 +22,7 @@
RELEASE_OBJDIR_NAME = @RELEASE_OBJDIR_NAME@
OBJDIR_NAME = @OBJDIR_NAME@
@@ -8,8 +8,8 @@
OBJ_SUFFIX = @OBJ_SUFFIX@
LIB_SUFFIX = @LIB_SUFFIX@
DLL_SUFFIX = @DLL_SUFFIX@
---- misc/nss-3.12.6/mozilla/nsprpub/config/rules.mk 2009-12-10 06:24:37.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/nsprpub/config/rules.mk 2010-06-17 08:42:08.057500000 +0900
+--- misc/nss-3.13.6/mozilla/nsprpub/config/rules.mk 2009-12-10 06:24:37.000000000 +0900
++++ misc/build/nss-3.13.6/mozilla/nsprpub/config/rules.mk 2010-06-17 08:42:08.057500000 +0900
@@ -113,9 +113,9 @@
# other platforms do not.
#
@@ -22,8 +22,8 @@
SHARED_LIB_PDB = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb
else
LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
---- misc/nss-3.12.6/mozilla/nsprpub/configure 2010-02-09 03:41:35.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/nsprpub/configure 2010-06-17 08:42:10.000000000 +0900
+--- misc/nss-3.13.6/mozilla/nsprpub/configure 2010-02-09 03:41:35.000000000 +0900
++++ misc/build/nss-3.13.6/mozilla/nsprpub/configure 2010-06-17 08:42:10.000000000 +0900
@@ -2770,6 +2770,7 @@
LIB_SUFFIX=a
DLL_SUFFIX=so
@@ -48,8 +48,8 @@
s%@MKSHLIB@%$MKSHLIB%g
s%@DSO_CFLAGS@%$DSO_CFLAGS%g
s%@DSO_LDOPTS@%$DSO_LDOPTS%g
---- misc/nss-3.12.6/mozilla/nsprpub/pr/src/Makefile.in 2009-12-19 18:06:07.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/nsprpub/pr/src/Makefile.in 2010-06-17 08:42:08.151250000 +0900
+--- misc/nss-3.13.6/mozilla/nsprpub/pr/src/Makefile.in 2009-12-19 18:06:07.000000000 +0900
++++ misc/build/nss-3.13.6/mozilla/nsprpub/pr/src/Makefile.in 2010-06-17 08:42:08.151250000 +0900
@@ -195,7 +195,7 @@
ifeq ($(OS_ARCH),WINNT)
@@ -59,8 +59,8 @@
else
OS_LIBS = advapi32.lib wsock32.lib winmm.lib
endif
---- misc/nss-3.12.6/mozilla/security/coreconf/WIN32.mk 2009-07-29 09:15:46.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/security/coreconf/WIN32.mk 2010-06-17 08:42:08.198125000 +0900
+--- misc/nss-3.13.6/mozilla/security/coreconf/WIN32.mk 2009-07-29 09:15:46.000000000 +0900
++++ misc/build/nss-3.13.6/mozilla/security/coreconf/WIN32.mk 2010-06-17 08:42:08.198125000 +0900
@@ -43,8 +43,8 @@
DEFAULT_COMPILER = cl
@@ -72,8 +72,8 @@
LINK = ld
AR = ar
AR += cr $@
---- misc/nss-3.12.6/mozilla/security/coreconf/WIN95.mk 2009-02-14 14:51:10.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/security/coreconf/WIN95.mk 2010-06-17 08:42:08.245000000 +0900
+--- misc/nss-3.13.6/mozilla/security/coreconf/WIN95.mk 2009-02-14 14:51:10.000000000 +0900
++++ misc/build/nss-3.13.6/mozilla/security/coreconf/WIN95.mk 2010-06-17 08:42:08.245000000 +0900
@@ -44,4 +44,8 @@
DEFINES += -DWIN95
@@ -85,8 +85,8 @@
+ NSPR31_LIB_PREFIX = $(NULL)
+endif
\ No newline at end of file
---- misc/nss-3.12.6/mozilla/security/coreconf/rules.mk 2009-12-08 10:33:36.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/security/coreconf/rules.mk 2010-06-17 08:42:08.291875000 +0900
+--- misc/nss-3.13.6/mozilla/security/coreconf/rules.mk 2009-12-08 10:33:36.000000000 +0900
++++ misc/build/nss-3.13.6/mozilla/security/coreconf/rules.mk 2010-06-17 08:42:08.291875000 +0900
@@ -281,8 +281,12 @@
fi
endif # MSVC with manifest tool
@@ -100,8 +100,8 @@
get_objs:
@echo $(OBJS)
---- misc/nss-3.12.6/mozilla/security/nss/Makefile 2009-12-09 01:47:03.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/security/nss/Makefile 2010-06-17 08:42:08.338750000 +0900
+--- misc/nss-3.13.6/mozilla/security/nss/Makefile 2009-12-09 01:47:03.000000000 +0900
++++ misc/build/nss-3.13.6/mozilla/security/nss/Makefile 2010-06-17 08:42:08.338750000 +0900
@@ -108,7 +108,7 @@
NSPR_CONFIGURE_OPTS += --enable-debug-rtl
endif
@@ -111,8 +111,8 @@
endif
#
---- misc/nss-3.12.6/mozilla/security/nss/cmd/crmftest/Makefile 2005-11-14 09:17:21.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/security/nss/cmd/crmftest/Makefile 2010-06-17 08:42:08.370000000 +0900
+--- misc/nss-3.13.6/mozilla/security/nss/cmd/crmftest/Makefile 2005-11-14 09:17:21.000000000 +0900
++++ misc/build/nss-3.13.6/mozilla/security/nss/cmd/crmftest/Makefile 2010-06-17 08:42:08.370000000 +0900
@@ -90,7 +90,7 @@
LDDIST = $(DIST)/lib
@@ -122,8 +122,8 @@
endif
include ../platrules.mk
---- misc/nss-3.12.6/mozilla/security/nss/cmd/shlibsign/Makefile 2009-08-08 04:06:37.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/security/nss/cmd/shlibsign/Makefile 2010-06-17 08:42:10.000000000 +0900
+--- misc/nss-3.13.6/mozilla/security/nss/cmd/shlibsign/Makefile 2009-08-08 04:06:37.000000000 +0900
++++ misc/build/nss-3.13.6/mozilla/security/nss/cmd/shlibsign/Makefile 2010-06-17 08:42:10.000000000 +0900
@@ -115,10 +115,16 @@
$(call core_abspath,$(OBJDIR)) $(OS_TARGET) \
$(call core_abspath,$(NSPR_LIB_DIR)) $(call core_abspath,$<)
@@ -141,27 +141,3 @@
libs install :: $(CHECKLOC)
---- misc/nss-3.12.6/mozilla/security/nss/lib/freebl/config.mk 2009-04-12 06:18:42.000000000 +0900
-+++ misc/build/nss-3.12.6/mozilla/security/nss/lib/freebl/config.mk 2010-06-17 08:42:08.557500000 +0900
-@@ -84,10 +84,6 @@
- RES = $(OBJDIR)/$(LIBRARY_NAME).res
- RESNAME = freebl.rc
-
--ifndef WINCE
--OS_LIBS += shell32.lib
--endif
--
- ifdef NS_USE_GCC
- EXTRA_SHARED_LIBS += \
- -L$(DIST)/lib \
-@@ -97,6 +93,10 @@
- -lnspr4 \
- $(NULL)
- else # ! NS_USE_GCC
-+ifndef WINCE
-+OS_LIBS += shell32.lib
-+endif
-+
- EXTRA_SHARED_LIBS += \
- $(DIST)/lib/nssutil3.lib \
- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.lib \
diff --git a/nss/nss_linux.patch b/nss/nss_linux.patch
index 0464b381f9d9..80dd2294c27a 100644
--- a/nss/nss_linux.patch
+++ b/nss/nss_linux.patch
@@ -1,34 +1,11 @@
-diff -uNrp misc/nss-3.12.6/mozilla/security/coreconf/config.mk misc/build/nss-3.12.6/mozilla/security/coreconf/config.mk
---- misc/nss-3.12.6/mozilla/security/coreconf/config.mk 2009-08-25 19:35:11.000000000 -0300
-+++ misc/build/nss-3.12.6/mozilla/security/coreconf/config.mk 2011-12-14 14:07:30.979358265 -0300
-@@ -63,7 +63,7 @@ endif
- #######################################################################
+--- misc/nss-3.14.4/mozilla/security/coreconf/Linux.mk 2013-11-01 14:39:28.195966851 +0100
++++ misc/build/nss-3.14.4/mozilla/security/coreconf/Linux.mk 2013-11-01 14:39:10.246610849 +0100
+@@ -131,7 +131,7 @@
+ # -ansi on platforms like Android where the system headers are C99 and do
+ # not build with -ansi.
+ STANDARDS_CFLAGS = -D_POSIX_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE
+-OS_CFLAGS = $(STANDARDS_CFLAGS) $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -DLINUX -Dlinux -DHAVE_STRERROR
++OS_CFLAGS = $(STANDARDS_CFLAGS) $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -DLINUX -Dlinux -DHAVE_STRERROR -DHAVE_UNISTD_H
+ OS_LIBS = $(OS_PTHREAD) -ldl -lc
- TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \
-- AIX RISCOS WINNT WIN95 WINCE
-+ AIX RISCOS WINNT WIN95 WINCE Linux
-
- ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET)))
- include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk
-diff -uNrp misc/nss-3.12.6/mozilla/security/coreconf/Linux.mk misc/build/nss-3.12.6/mozilla/security/coreconf/Linux.mk
---- misc/nss-3.12.6/mozilla/security/coreconf/Linux.mk 2011-12-14 14:06:50.112354384 -0300
-+++ misc/build/nss-3.12.6/mozilla/security/coreconf/Linux.mk 2011-12-14 14:07:30.978358265 -0300
-@@ -179,3 +179,18 @@ RPATH = -Wl,-rpath,'$$ORIGIN:/opt/sun/pr
- endif
- endif
-
-+OS_REL_CFLAGS += -DLINUX2_1
-+MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) $(RPATH)
-+
-+ifdef MAPFILE
-+ MKSHLIB += -Wl,--version-script,$(MAPFILE)
-+endif
-+PROCESS_MAP_FILE = grep -v ';-' $< | \
-+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
-+
-+ifeq ($(OS_RELEASE),2.4)
-+# Softoken 3.13 uses NO_FORK_CHECK only.
-+# Softoken 3.12 uses NO_FORK_CHECK and NO_CHECK_FORK.
-+# Don't use NO_CHECK_FORK in new code.
-+DEFINES += -DNO_FORK_CHECK -DNO_CHECK_FORK
-+endif
+ ifdef USE_PTHREADS
diff --git a/nss/nss_macosx.patch b/nss/nss_macosx.patch
index 5a0228355748..3fdf0208fd10 100644
--- a/nss/nss_macosx.patch
+++ b/nss/nss_macosx.patch
@@ -1,6 +1,6 @@
---- misc/nss-3.12.6/mozilla/security/nss/Makefile 2008-12-03 00:24:39.000000000 +0100
-+++ misc/build/nss-3.12.6/mozilla/security/nss/Makefile 2009-11-27 13:36:22.662753328 +0100
-@@ -104,6 +104,9 @@
+--- misc/nss-3.14.4/mozilla/security/nss/Makefile 2008-12-03 00:24:39.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/security/nss/Makefile 2009-11-27 13:36:22.662753328 +0100
+@@ -73,6 +73,9 @@
ifeq ($(OS_TARGET),WIN95)
NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
endif
@@ -10,3 +10,18 @@
ifdef USE_DEBUG_RTL
NSPR_CONFIGURE_OPTS += --enable-debug-rtl
endif
+--- misc/nss-3.14.4/mozilla/security/nss/lib/sqlite/config.mk 2012-12-12 13:30:51.000000000 +0100
++++ misc/build/nss-3.14.4/mozilla/security/nss/lib/sqlite/config.mk 2013-10-31 15:45:49.000000000 +0100
+@@ -39,9 +39,9 @@
+ # OSAtomicCompareAndSwapPtrBarrier, which is only available on Mac OS X 10.5
+ # (Darwin 9.0) and later. Define SQLITE_WITHOUT_ZONEMALLOC to disable
+ # that code for older versions of Mac OS X. See bug 820374.
+-DARWIN_VER_MAJOR := $(shell uname -r | cut -f1 -d.)
+-DARWIN_LT_9 := $(shell [ $(DARWIN_VER_MAJOR) -lt 9 ] && echo true)
+-ifeq ($(DARWIN_LT_9),true)
++OSX_TARGET_MINOR := $(shell echo $(MACOSX_DEPLOYMENT_TARGET) | cut -f2 -d.)
++OSX_MINOR_LT_5 := $(shell [ $(OSX_TARGET_MINOR) -lt 5 ] && echo true)
++ifeq ($(OSX_MINOR_LT_5),true)
+ OS_CFLAGS += -DSQLITE_WITHOUT_ZONEMALLOC
+ endif # Darwin
+ endif
diff --git a/nss/readme.txt b/nss/readme.txt
index df65908204c4..3dbe118e2886 100644
--- a/nss/readme.txt
+++ b/nss/readme.txt
@@ -1,13 +1,13 @@
Relation between nss, moz, moz_prebuilt
---------------------------------------
-nss containes the security libraries which are also part of moz. However nss is
-meant to be more current, that is it to be updated more often. This should be
-easier than doing this with moz.
+nss contains the security libraries which are also part of moz. However nss is
+meant to be more current, that is, it to be updated more often. This
+should be easier than updating moz.
-If nss is build depends on an environment variable (ENABLE_NSS_MODULE=YES) which
-is per default set to YES. In this case nss is build before moz. The nss
+When nss is build, it depends on an environment variable (ENABLE_NSS_MODULE)
+which is by default set to YES. In this case nss is build before moz. The nss
libraries/lib files/headers built in moz are then not delivered. Otherwise they
-would overwrite those from nss. That is, the nss libraries build in moz are
+would overwrite those from nss. The nss libraries build in moz are then
removed from mozruntime.zip (build in moz/solver/bin), they are removed from the
lib directory (for example moz/unxlngi6.pro/lib), and the nss and nspr headers
are also removed (inc/nss and inc/nspr). The nss libraries from the nss module
@@ -27,7 +27,7 @@ checksums for the cryptographic module are not delivered into solver and will
not be part of the OOo installation sets.
Signing has been turned off because
-- we change the rpath (install names) after signing which breaks the signatures
+- we change the rpath (install names) after signing which breaks the signatures
(Mac)
- sqlite conflicts with the system sqlite when signing which breaks the build
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile
index a05090d824a1..06d9a1474722 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile
@@ -71,14 +71,14 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
/MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) 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) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS) $@
endif
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/Makefile b/odk/examples/DevelopersGuide/Components/CppComponent/Makefile
index d489cbecc9f8..cc55d879f75c 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/Makefile
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/Makefile
@@ -104,14 +104,14 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
/MAP:$(SAMPLE_GEN_OUT)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) 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) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS) $@
endif
@@ -176,10 +176,10 @@ $(OUT_BIN)/_$(APP1_NAME)$(EXE_EXT) : $(SAMPLE_OBJ_OUT)/$(APP1_NAME).$(OBJ_EXT)
-$(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) $(STLPORTLIB)
+ $< $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB)
else
$(LINK) $(EXE_LINK_FLAGS) $(LINK_LIBS) -o $@ $< \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STLPORTLIB) $(STDC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALHELPERDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STDC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALHELPERDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS_BIN) $@
endif
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile b/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile
index b876f65145f1..0ce3328746cb 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile
@@ -79,13 +79,13 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_MISC))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
/MAP:$(OUT_COMP_MISC)/$(COMP_NAME).map $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) 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) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS) $@
endif
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile
index 5793d2b411b6..abd78270a53f 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile
+++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile
@@ -52,7 +52,7 @@ $(OUT_SHL_SLO)/%.$(OBJ_EXT) : %.c
$(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) $(STLPORTLIB) $(STDC++LIB)
+ -ljawt $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STDC++LIB)
.PHONY: clean
clean :
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile
index bb16d0f41d2e..f77c8c9c0cd7 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile
@@ -73,13 +73,13 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
/MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) 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) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS) $@
endif
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile
index 94e4db598e5b..95b1412e5025 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile
@@ -70,13 +70,13 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
/MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) 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) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS) $@
endif
diff --git a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile
index e4195a214db0..21d6e493535f 100644
--- a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile
+++ b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile
@@ -62,10 +62,10 @@ $(OUT_BIN)/%$(EXE_EXT) : $(SAMPLE_OBJ_OUT)/%.$(OBJ_EXT)
-$(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) $(STLPORTLIB)
+ $< $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB)
else
$(LINK) $(EXE_LINK_FLAGS) $(LINK_LIBS) -o $@ $< \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STLPORTLIB) $(STDC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALHELPERDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STDC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALHELPERDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS_BIN) $@
endif
diff --git a/odk/examples/DevelopersGuide/ProfUNO/Lifetime/Makefile b/odk/examples/DevelopersGuide/ProfUNO/Lifetime/Makefile
index 6fc72c5935f4..aad42a277bed 100644
--- a/odk/examples/DevelopersGuide/ProfUNO/Lifetime/Makefile
+++ b/odk/examples/DevelopersGuide/ProfUNO/Lifetime/Makefile
@@ -68,10 +68,10 @@ $(OUT_BIN)/$(COMPONENT_NAME)$(EXE_EXT) : $(OBJFILES)
-$(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) $(STLPORTLIB)
+ $(OBJFILES) $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB)
else
$(LINK) $(EXE_LINK_FLAGS) $(LINK_LIBS) -o $@ $(OBJFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STLPORTLIB) $(STDC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALHELPERDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STDC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALHELPERDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS_BIN) $@
endif
diff --git a/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/Makefile b/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/Makefile
index 6c590b8663f9..a817c9b97034 100644
--- a/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/Makefile
+++ b/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/Makefile
@@ -55,10 +55,10 @@ $(OUT_BIN)/_$(APP_NAME)$(EXE_EXT) : $(OUT_APP_OBJ)/$(APP_NAME).$(OBJ_EXT)
-$(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) $(STLPORTLIB)
+ $< $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB)
else
$(LINK) $(EXE_LINK_FLAGS) $(LINK_LIBS) -o $@ $< \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STLPORTLIB) $(STDC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALHELPERDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STDC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALHELPERDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS_BIN) $@
endif
diff --git a/odk/pack/copying/makefile.mk b/odk/pack/copying/makefile.mk
index dc0141788096..a64a174ca798 100644
--- a/odk/pack/copying/makefile.mk
+++ b/odk/pack/copying/makefile.mk
@@ -82,13 +82,6 @@ LIBLIST = \
$(DESTDIRLIB)/irmcxt.lib \
$(DESTDIRLIB)/ipurpenvhelper3MSC.lib
-.IF "$(COMEX)"=="8"
- LIBLIST += $(DESTDIRLIB)/stlport_vc7.lib
-.ELIF "$(COMEX)"=="10" || "$(COMEX)"=="11" || "$(COMEX)"=="12"
- LIBLIST += $(DESTDIRLIB)/stlport_vc71.lib
-.ELSE
- LIBLIST += $(DESTDIRLIB)/stlport_vc6.lib
-.ENDIF
.ENDIF
.IF "$(OS)"=="LINUX"
diff --git a/odk/util/odk_rules.pmk b/odk/util/odk_rules.pmk
index 69ce30412190..d04a9f7b0350 100644
--- a/odk/util/odk_rules.pmk
+++ b/odk/util/odk_rules.pmk
@@ -84,11 +84,7 @@ $(DESTDIR)/cfgWin.js : $(PRJ)/cfgWin.js
$(DESTDIRSETTINGS)/%.mk : $(PRJ)/settings/%.mk
@@-rm -f $@
-.IF "$(COMEX)"=="7"
- $(MY_TEXTCOPY) $< | $(SED) -e 's/stlport_vc7/stlport_vc6/' $@
-.ELSE
$(MY_TEXTCOPY) $< $@
-.ENDIF
$(DESTDIRXML)/module-description.dtd : $(XMLOUT)/module-description.dtd
@@-rm -f $@
diff --git a/offapi/com/sun/star/accessibility/AccessibleEventId.idl b/offapi/com/sun/star/accessibility/AccessibleEventId.idl
index f8606ba98ece..8b483c4335d7 100644
--- a/offapi/com/sun/star/accessibility/AccessibleEventId.idl
+++ b/offapi/com/sun/star/accessibility/AccessibleEventId.idl
@@ -376,6 +376,17 @@ published constants AccessibleEventId
@since OOo 3.2
*/
const short LISTBOX_ENTRY_COLLAPSED = 33;
+
+ //IAccessibility2 Implementation 2009-----
+ const short ACTIVE_DESCENDANT_CHANGED_NOFOCUS = 34;
+ const short SELECTION_CHANGED_ADD =35;
+ const short SELECTION_CHANGED_REMOVE =36;
+ const short SELECTION_CHANGED_WITHIN =37;
+ const short PAGE_CHANGED =38;
+ const short SECTION_CHANGED =39;
+ const short COLUMN_CHANGED =40;
+ //-----IAccessibility2 Implementation 2009
+
};
}; }; }; };
diff --git a/offapi/com/sun/star/accessibility/AccessibleRelationType.idl b/offapi/com/sun/star/accessibility/AccessibleRelationType.idl
index 637abb756eea..280561012dd4 100644
--- a/offapi/com/sun/star/accessibility/AccessibleRelationType.idl
+++ b/offapi/com/sun/star/accessibility/AccessibleRelationType.idl
@@ -110,6 +110,14 @@ published constants AccessibleRelationType
@since OOo 3.0
*/
const short NODE_CHILD_OF = 9;
+
+ /** Described-by relation type.
+
+ <p>Indicates an object is described by the target object.</p>
+
+ @since OOo 3.5
+ */
+ const short DESCRIBED_BY = 10;
};
}; }; }; };
diff --git a/offapi/com/sun/star/accessibility/AccessibleStateType.idl b/offapi/com/sun/star/accessibility/AccessibleStateType.idl
index 8a3d5740dc53..8ed85cc80134 100644
--- a/offapi/com/sun/star/accessibility/AccessibleStateType.idl
+++ b/offapi/com/sun/star/accessibility/AccessibleStateType.idl
@@ -214,6 +214,27 @@ published constants AccessibleStateType
partly in the visible area of its parent.</p>
*/
const short VISIBLE = 30;
+
+ // The following constants have been introduced with the IA2 CWS:
+
+ // MOVEABLE only exists in MSAA/IA2, but not in ATK/JAA/NSAccessibility.
+ /** Indicates the position of the object is not fixed.
+ */
+ const short MOVEABLE = 31;
+
+ // DEFAULT exists in MSAA/IA2, and now also in ATK and NSAccessibility.
+ /** Indicates the object is the default button in a window
+ */
+ const short DEFAULT = 32;
+
+ // OFFSCREEN only exists in MSAA/IA2, but not in ATK/JAA/NSAccessibility.
+ // MT: Shouldn't this be the same like !SHOWING in UAA/ATK?
+ const short OFFSCREEN = 33;
+
+ // COLLAPSED exists in MSAA/IA2, and now also in JAA, but not in ATK/NSAccessibility. In NSAccessibility, there is a notification for collapse.
+ // In opposite to MSAA, UAA has EXPANDABLE, so EXPANDABLE && !EXPANDED should be the same like COLLAPSED.
+ const short COLLAPSE = 34;
+
};
}; }; }; };
diff --git a/offapi/com/sun/star/accessibility/MSAAService.idl b/offapi/com/sun/star/accessibility/MSAAService.idl
new file mode 100644
index 000000000000..da07150c8515
--- /dev/null
+++ b/offapi/com/sun/star/accessibility/MSAAService.idl
@@ -0,0 +1,40 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __com_sun_star_accessibility_Accessible_idl__
+#define __com_sun_star_accessibility_Accessible_idl__
+
+#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/lang/XInitialization.idl>
+#include "XMSAAService.idl"
+
+module com { module sun { module star { module accessibility {
+
+service MSAAService
+{
+ interface XMSAAService;
+ interface com::sun::star::lang::XInitialization;
+};
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl b/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl
new file mode 100644
index 000000000000..e9fd849b26f0
--- /dev/null
+++ b/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl
@@ -0,0 +1,42 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __com_sun_star_accessibility_XAccessibleAttribute_idl__
+#define __com_sun_star_accessibility_XAccessibleAttribute_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
+#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
+#endif
+
+module com { module sun { module star { module accessibility {
+
+interface XAccessibleExtendedAttributes : ::com::sun::star::uno::XInterface
+{
+ /* Returns the attribute of this object' formula */ // MT: I guess it's not formula only?
+ any getExtendedAttributes() raises (::com::sun::star::lang::IndexOutOfBoundsException);
+};
+
+}; }; }; };
+
+#endif
diff --git a/scp2/source/ooo/mergemodules_ooo.scp b/offapi/com/sun/star/accessibility/XAccessibleGetAccFlowTo.idl
index ffa7abe682c0..3b9fd9ea7632 100644
--- a/scp2/source/ooo/mergemodules_ooo.scp
+++ b/offapi/com/sun/star/accessibility/XAccessibleGetAccFlowTo.idl
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,46 +7,35 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
+#ifndef __com_sun_star_accessibility_XAccessibleGetAccFlowTo_idl_
+#define __com_sun_star_accessibility_XAccessibleGetAccFlowTo_idl_
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
-#include "macros.inc"
+module com { module sun { module star { module accessibility {
-#ifdef M1500
-MergeModule gid_Mergemodule_Microsoft_Vc90_Crt_X86
-#ifdef _STLP_DEBUG
- Name = "Microsoft_VC90_DebugCRT_x86.msm";
-#else
- Name = "Microsoft_VC90_CRT_x86.msm";
-#endif
- Cabfilename = "openoffice.org-vc90crt.cab";
- Feature = "gm_Root";
- RootDir = "TARGETDIR";
- Styles = (REMOVE_FILE_TABLE);
-End
-#endif
+// !!!
+// MT: When integrating this, interface and method names should be renamed somehow. Of course, file name also need to change then...
+// !!!
+interface XAccessibleGetAccFlowTo : ::com::sun::star::uno::XInterface
+{
+ sequence<any> get_AccFlowTo([in] any aXShape, [in] long nType);
+};
+
+}; }; }; };
-#ifdef M1500
-MergeModule gid_Mergemodule_Policy_Microsoft_Vc90_Crt_X86
-#ifdef _STLP_DEBUG
- Name = "policy_9_0_Microsoft_VC90_DebugCRT_x86.msm";
-#else
- Name = "policy_9_0_Microsoft_VC90_CRT_x86.msm";
-#endif
- Cabfilename = "openoffice.org-policy-vc90crt.cab";
- Feature = "gm_Root";
- RootDir = "TARGETDIR";
- Styles = (REMOVE_FILE_TABLE);
-End
#endif
diff --git a/offapi/com/sun/star/accessibility/XAccessibleGroupPosition.idl b/offapi/com/sun/star/accessibility/XAccessibleGroupPosition.idl
new file mode 100644
index 000000000000..5a77d3ab9266
--- /dev/null
+++ b/offapi/com/sun/star/accessibility/XAccessibleGroupPosition.idl
@@ -0,0 +1,45 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __com_sun_star_accessibility_XAccessibleGroupPosition_idl__
+#define __com_sun_star_accessibility_XAccessibleGroupPosition_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
+#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
+#endif
+
+module com { module sun { module star { module accessibility {
+
+interface XAccessibleGroupPosition : ::com::sun::star::uno::XInterface
+{
+ /* Returns the group position of the object */
+ sequence<long> getGroupPosition( [in] any accoject ) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /* Returns the hyperlink URL info of the object */
+ string getObjectLink( [in] any accoject ) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/accessibility/XAccessibleTable.idl b/offapi/com/sun/star/accessibility/XAccessibleTable.idl
index 75942155f32d..e012c0b369f0 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleTable.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleTable.idl
@@ -19,8 +19,6 @@
*
*************************************************************/
-
-
#ifndef __com_sun_star_accessibility_XAccessibleTable_idl__
#define __com_sun_star_accessibility_XAccessibleTable_idl__
diff --git a/offapi/com/sun/star/accessibility/XAccessibleTableSelection.idl b/offapi/com/sun/star/accessibility/XAccessibleTableSelection.idl
new file mode 100644
index 000000000000..4b8f43ef5fc1
--- /dev/null
+++ b/offapi/com/sun/star/accessibility/XAccessibleTableSelection.idl
@@ -0,0 +1,47 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __com_sun_star_accessibility_XAccessibleTableSelection_idl__
+#define __com_sun_star_accessibility_XAccessibleTableSelection_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
+#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
+#endif
+
+module com { module sun { module star { module accessibility {
+
+interface XAccessible;
+
+interface XAccessibleTableSelection : ::com::sun::star::uno::XInterface
+{
+ boolean selectRow ([in] long row) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+ boolean unselectRow ([in] long row) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+
+ boolean selectColumn ([in] long column) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+ boolean unselectColumn ([in] long column) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/accessibility/XAccessibleTextSelection.idl b/offapi/com/sun/star/accessibility/XAccessibleTextSelection.idl
new file mode 100644
index 000000000000..ed0735be2d49
--- /dev/null
+++ b/offapi/com/sun/star/accessibility/XAccessibleTextSelection.idl
@@ -0,0 +1,60 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __com_sun_star_accessibility_XAccessibleTextSelection_idl__
+#define __com_sun_star_accessibility_XAccessibleTextSelection_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+#ifndef __com_sun_star_awt_Point_idl__
+#include <com/sun/star/awt/Point.idl>
+#endif
+#ifndef __com_sun_star_awt_Rectangle_idl__
+#include <com/sun/star/awt/Rectangle.idl>
+#endif
+#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
+#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
+#endif
+#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#endif
+
+module com { module sun { module star { module accessibility {
+
+interface XAccessibleTextSelection : ::com::sun::star::uno::XInterface
+{
+ boolean scrollToPosition ([in] ::com::sun::star::awt::Point aPoint, [in] boolean isLeftTop) raises (::com::sun::star::lang::IllegalArgumentException);
+
+ long getSelectedPortionCount();
+
+ long getSeletedPositionStart ([in] long nSelectedPortionIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+
+ long getSeletedPositionEnd ([in] long nSelectedPortionIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+
+ long addSelection( [in] long selectionIndex, [in]long startOffset, [in] long endOffset) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+
+ boolean removeSelection( [in] long selectionIndex ) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/accessibility/XAccessibleValue.idl b/offapi/com/sun/star/accessibility/XAccessibleValue.idl
index 4bc66c7b2bdd..786275b6bad0 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleValue.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleValue.idl
@@ -19,8 +19,6 @@
*
*************************************************************/
-
-
#ifndef __com_sun_star_accessibility_XAccessibleValue_idl__
#define __com_sun_star_accessibility_XAccessibleValue_idl__
diff --git a/offapi/com/sun/star/accessibility/XMSAAService.idl b/offapi/com/sun/star/accessibility/XMSAAService.idl
new file mode 100644
index 000000000000..439754140725
--- /dev/null
+++ b/offapi/com/sun/star/accessibility/XMSAAService.idl
@@ -0,0 +1,49 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __com_sun_star_accessibility_XMSAASERVICE_idl__
+#define __com_sun_star_accessibility_XMSAASERVICE_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+module com { module sun { module star { module accessibility {
+
+/** The interface must be implemented for a server that can support MSAA com objects and send win32 accessible events
+*/
+interface XMSAAService : ::com::sun::star::uno::XInterface
+{
+ /** Return com object pointer.
+
+ @return
+ A reference to the object that contains the actual accessibility information.
+
+ @see AccessibleContext
+ */
+ long getAccObjectPtr ([in] long hWnd, [in] long lParam, [in] long wParam);
+
+ [oneway] void handleWindowOpened ([in] long i);
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/accessibility/makefile.mk b/offapi/com/sun/star/accessibility/makefile.mk
index c30f17b167d6..db4dc85805bc 100644
--- a/offapi/com/sun/star/accessibility/makefile.mk
+++ b/offapi/com/sun/star/accessibility/makefile.mk
@@ -47,15 +47,18 @@ IDLFILES=\
AccessibleTableModelChangeType.idl \
AccessibleTextType.idl \
IllegalAccessibleComponentStateException.idl \
+ MSAAService.idl \
TextSegment.idl \
XAccessible.idl \
XAccessibleAction.idl \
XAccessibleComponent.idl \
XAccessibleContext.idl \
XAccessibleEditableText.idl \
+ XAccessibleExtendedAttributes.idl \
XAccessibleEventBroadcaster.idl \
XAccessibleEventListener.idl \
XAccessibleExtendedComponent.idl \
+ XAccessibleGroupPosition.idl \
XAccessibleHyperlink.idl \
XAccessibleHypertext.idl \
XAccessibleImage.idl \
@@ -65,10 +68,15 @@ IDLFILES=\
XAccessibleSelection.idl \
XAccessibleStateSet.idl \
XAccessibleTable.idl \
+ XAccessibleTableSelection.idl \
XAccessibleText.idl \
XAccessibleTextAttributes.idl \
XAccessibleTextMarkup.idl \
- XAccessibleValue.idl
+ XAccessibleTextSelection.idl \
+ XAccessibleGetAccFlowTo.idl \
+ XAccessibleValue.idl \
+ XMSAAService.idl
+
# ------------------------------------------------------------------
diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk
index a6be1cc7e241..52c78006e1a3 100644
--- a/postprocess/packcomponents/makefile.mk
+++ b/postprocess/packcomponents/makefile.mk
@@ -328,6 +328,7 @@ my_components += \
java_uno_accessbridge \
sysmail \
sysdtrans \
+ winaccessibility \
wininetbe1
.END
diff --git a/postprocess/prj/build.lst b/postprocess/prj/build.lst
index 04608ec5c92b..ce2a2f5e9ff6 100644
--- a/postprocess/prj/build.lst
+++ b/postprocess/prj/build.lst
@@ -1,4 +1,4 @@
-po postprocess :: svgio accessibility automation basctl bean chart2 configmgr CRASHREP:crashrep COINMP:coinmp cui dbaccess desktop dtrans embeddedobj embedserv EPM:epm eventattacher extensions extras fileaccess filter forms fpicker helpcontent2 hwpfilter io JAVAINSTALLER2:javainstaller2 lingucomponent MATHMLDTD:MathMLDTD ODK:odk officecfg package padmin psprint_config remotebridges sc scaddins sccomp scp2 scripting sd setup_native slideshow starmath sw sysui testtools ucb UnoControls unoxml ure wizards xmerge xmlsecurity MORE_FONTS:more_fonts OOo:pyuno OOo:readlicense_oo SO:top unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder reportdesign sdext SWEXT:swext smoketestdoc uui writerfilter oox MYSQLC:mysqlc LIBXSLT:libxslt NULL
+po postprocess :: svgio accessibility automation basctl bean chart2 configmgr CRASHREP:crashrep COINMP:coinmp cui dbaccess desktop dtrans embeddedobj embedserv EPM:epm eventattacher extensions extras fileaccess filter forms fpicker helpcontent2 hwpfilter io JAVAINSTALLER2:javainstaller2 lingucomponent MATHMLDTD:MathMLDTD ODK:odk officecfg package padmin psprint_config remotebridges sc scaddins sccomp scp2 scripting sd setup_native slideshow starmath sw sysui testtools ucb UnoControls unoxml ure wizards xmerge xmlsecurity MORE_FONTS:more_fonts OOo:pyuno OOo:readlicense_oo SO:top unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder reportdesign sdext SWEXT:swext smoketestdoc uui writerfilter winaccessibility oox MYSQLC:mysqlc LIBXSLT:libxslt NULL
po postprocess usr1 - all po_mkout NULL
po postprocess\checkxml nmake - all po_checkxml NULL
po postprocess\checkdeliver nmake - all po_checkdlv NULL
diff --git a/postprocess/rebase/coffbase.txt b/postprocess/rebase/coffbase.txt
index ce0fdfc99dc1..b198d77d4d44 100644
--- a/postprocess/rebase/coffbase.txt
+++ b/postprocess/rebase/coffbase.txt
@@ -246,8 +246,6 @@ spellmi.dll 0x000000005e5e0000 0x00030000
splmi.dll 0x000000005e5a0000 0x00030000
srtrs1.dll 0x000000005e570000 0x00020000
ssleay32.dll 0x000000005e520000 0x00040000
-stlport_vc7145.dll 0x000000005e470000 0x000a0000
-stlport_vc71_stldebug45.dll 0x000000005e340000 0x00120000
stocservices.uno.dll 0x000000005e310000 0x00020000
store3.dll 0x000000005e2e0000 0x00020000
streams.uno.dll 0x000000005e2b0000 0x00020000
diff --git a/sal/cppunittester/makefile.mk b/sal/cppunittester/makefile.mk
index acf01d189f5d..3e03321a5184 100644
--- a/sal/cppunittester/makefile.mk
+++ b/sal/cppunittester/makefile.mk
@@ -35,13 +35,6 @@ all:
.ELSE
-#building with stlport, but cppunit was not built with stlport
-.IF "$(USE_SYSTEM_STL)"!="YES"
-.IF "$(SYSTEM_CPPUNIT)"=="YES"
-CFLAGSCXX+=-DADAPT_EXT_STL
-.ENDIF
-.ENDIF
-
CFLAGSCXX += $(CPPUNIT_CFLAGS)
OBJFILES = $(APP1OBJS)
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index ebf3e3058428..32a2392a45a0 100644
--- a/sal/inc/rtl/string.hxx
+++ b/sal/inc/rtl/string.hxx
@@ -419,7 +419,7 @@ public:
@return a hash code value for this object.
- @see rtl::OStringHash for convenient use of STLPort's hash_map
+ @see rtl::OStringHash for convenient use of hash_map / unordered_map
*/
sal_Int32 hashCode() const SAL_THROW(())
{
@@ -911,7 +911,7 @@ public:
/** A helper to use OStrings with hash maps.
Instances of this class are unary function objects that can be used as
- hash function arguments to STLPort's hash_map and similar constructs.
+ hash function arguments to unordered_map, hash_map and similar constructs.
*/
struct OStringHash
{
diff --git a/sal/inc/sal/main.h b/sal/inc/sal/main.h
index 51ceea5fd2a6..9051b6833b07 100644
--- a/sal/inc/sal/main.h
+++ b/sal/inc/sal/main.h
@@ -43,6 +43,8 @@ void SAL_CALL sal_detail_deinitialize();
#define INCL_LOADEXCEPTQ
#include <exceptq.h>
+#include <osl/process.h>
+
#define sal_detail_initialize(a,b) \
EXCEPTIONREGISTRATIONRECORD exRegRec = {0}; \
LoadExceptq(&exRegRec, NULL, NULL); \
diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx
index 1b7179626032..019f8ebb7d42 100644
--- a/sal/osl/w32/signal.cxx
+++ b/sal/osl/w32/signal.cxx
@@ -36,6 +36,8 @@
#endif
#include <ErrorRep.h>
#include <systools/win32/uwinapi.h>
+#include <eh.h>
+#include <stdexcept>
typedef struct _oslSignalHandlerImpl
{
@@ -423,10 +425,53 @@ oslSignalAction SAL_CALL osl_raiseSignal(sal_Int32 UserSignal, void* UserData)
/*****************************************************************************/
/* osl_setErrorReporting */
/*****************************************************************************/
+
+void win_seh_translator( unsigned nSEHCode, _EXCEPTION_POINTERS* pExcPtrs)
+{
+ (void*)pExcPtrs; // currently unused, but useful inside a debugger
+ const char* pSEHName = NULL;
+ switch( nSEHCode)
+ {
+ case EXCEPTION_ACCESS_VIOLATION: pSEHName = "SEH Exception: ACCESS VIOLATION"; break;
+ case EXCEPTION_DATATYPE_MISALIGNMENT: pSEHName = "SEH Exception: DATATYPE MISALIGNMENT"; break;
+ case EXCEPTION_BREAKPOINT: /*pSEHName = "SEH Exception: BREAKPOINT";*/ break;
+ case EXCEPTION_SINGLE_STEP: /*pSEHName = "SEH Exception: SINGLE STEP";*/ break;
+ case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: pSEHName = "SEH Exception: ARRAY BOUNDS EXCEEDED"; break;
+ case EXCEPTION_FLT_DENORMAL_OPERAND: pSEHName = "SEH Exception: DENORMAL FLOAT OPERAND"; break;
+ case EXCEPTION_FLT_DIVIDE_BY_ZERO: pSEHName = "SEH Exception: FLOAT DIVIDE_BY_ZERO"; break;
+ case EXCEPTION_FLT_INEXACT_RESULT: pSEHName = "SEH Exception: FLOAT INEXACT RESULT"; break;
+ case EXCEPTION_FLT_INVALID_OPERATION: pSEHName = "SEH Exception: INVALID FLOAT OPERATION"; break;
+ case EXCEPTION_FLT_OVERFLOW: pSEHName = "SEH Exception: FLOAT OVERFLOW"; break;
+ case EXCEPTION_FLT_STACK_CHECK: pSEHName = "SEH Exception: FLOAT STACK_CHECK"; break;
+ case EXCEPTION_FLT_UNDERFLOW: pSEHName = "SEH Exception: FLOAT UNDERFLOW"; break;
+ case EXCEPTION_INT_DIVIDE_BY_ZERO: pSEHName = "SEH Exception: INTEGER DIVIDE_BY_ZERO"; break;
+ case EXCEPTION_INT_OVERFLOW: pSEHName = "SEH Exception: INTEGER OVERFLOW"; break;
+ case EXCEPTION_PRIV_INSTRUCTION: pSEHName = "SEH Exception: PRIVILEDGED INSTRUCTION"; break;
+ case EXCEPTION_IN_PAGE_ERROR: pSEHName = "SEH Exception: IN_PAGE_ERROR"; break;
+ case EXCEPTION_ILLEGAL_INSTRUCTION: pSEHName = "SEH Exception: ILLEGAL INSTRUCTION"; break;
+ case EXCEPTION_NONCONTINUABLE_EXCEPTION: pSEHName = "SEH Exception: NONCONTINUABLE EXCEPTION"; break;
+ case EXCEPTION_STACK_OVERFLOW: pSEHName = "SEH Exception: STACK OVERFLOW"; break;
+ case EXCEPTION_INVALID_DISPOSITION: pSEHName = "SEH Exception: INVALID DISPOSITION"; break;
+ case EXCEPTION_GUARD_PAGE: pSEHName = "SEH Exception: GUARD PAGE"; break;
+ case EXCEPTION_INVALID_HANDLE: pSEHName = "SEH Exception: INVALID HANDLE"; break;
+// case EXCEPTION_POSSIBLE_DEADLOCK: pSEHName = "SEH Exception: POSSIBLE DEADLOCK"; break;
+ default: pSEHName = "Unknown SEH Exception"; break;
+ }
+
+ if( pSEHName)
+ throw std::runtime_error( pSEHName);
+}
+
sal_Bool SAL_CALL osl_setErrorReporting( sal_Bool bEnable )
{
sal_Bool bOld = bErrorReportingEnabled;
bErrorReportingEnabled = bEnable;
+ if( !bEnable) // if the crash reporter is disabled
+ {
+ // fall back to handle Window's SEH events as C++ exceptions
+ _set_se_translator( win_seh_translator);
+ }
+
return bOld;
}
diff --git a/sal/rtl/source/alloc_arena.c b/sal/rtl/source/alloc_arena.c
index 790220d5691d..571926c385b2 100644
--- a/sal/rtl/source/alloc_arena.c
+++ b/sal/rtl/source/alloc_arena.c
@@ -1212,16 +1212,9 @@ SAL_CALL rtl_machdep_alloc (
#elif defined(SAL_W32)
addr = VirtualAlloc (NULL, (SIZE_T)(size), MEM_COMMIT, PAGE_READWRITE);
#elif defined(SAL_OS2)
- {
- APIRET rc;
- addr = 0;
- // Use DosAlloc* to get a 4KB page aligned address.
- rc = DosAllocMem( &addr, size, PAG_COMMIT | PAG_READ | PAG_WRITE | OBJ_ANY);
- if (rc) {
- fprintf( stderr, "sal3::DosAllocMem failed rc=%d\n", rc);
- addr = 0;
- }
- }
+ /* Use valloc() to use libc 16MB chunks when allocating high memory, to reduce
+ virtual address fragmentation. */
+ addr = valloc( size);
#endif /* (SAL_UNX || SAL_W32 || SAL_OS2) */
if (addr != MAP_FAILED)
@@ -1256,7 +1249,7 @@ SAL_CALL rtl_machdep_free (
#elif defined(SAL_W32)
(void) VirtualFree ((LPVOID)(pAddr), (SIZE_T)(0), MEM_RELEASE);
#elif defined(SAL_OS2)
- (void) DosFreeMem( pAddr);
+ free(pAddr);
#endif /* (SAL_UNX || SAL_W32) */
}
diff --git a/sal/rtl/source/alloc_cache.c b/sal/rtl/source/alloc_cache.c
index 390955fa8b5f..dccbb2097799 100644
--- a/sal/rtl/source/alloc_cache.c
+++ b/sal/rtl/source/alloc_cache.c
@@ -39,6 +39,10 @@
#ifdef OS2
#undef OSL_TRACE
#define OSL_TRACE 1 ? ((void)0) : _OSL_GLOBAL osl_trace
+
+#define INCL_DOS
+#include <os2.h>
+
#endif
/* ================================================================= *
@@ -55,9 +59,12 @@ struct rtl_cache_list_st
rtl_memory_lock_type m_lock;
rtl_cache_type m_cache_head;
-#if defined(SAL_UNX) || defined(SAL_OS2)
+#if defined(SAL_UNX)
pthread_t m_update_thread;
pthread_cond_t m_update_cond;
+#elif defined(SAL_OS2)
+ TID m_update_thread;
+ HEV m_update_cond;
#elif defined(SAL_W32)
HANDLE m_update_thread;
HANDLE m_update_cond;
@@ -1376,7 +1383,7 @@ rtl_cache_wsupdate_fini (void);
/* ================================================================= */
-#if defined(SAL_UNX) || defined(SAL_OS2)
+#if defined(SAL_UNX)
#include <sys/time.h>
@@ -1431,6 +1438,62 @@ rtl_cache_wsupdate_fini (void)
/* ================================================================= */
+#elif defined(SAL_OS2)
+
+static void
+rtl_cache_wsupdate_all (void * arg);
+
+static void rtl_cache_fini (void);
+
+static void
+rtl_cache_wsupdate_init (void)
+{
+ ULONG ulThreadId;
+ APIRET rc;
+
+ RTL_MEMORY_LOCK_ACQUIRE(&(g_cache_list.m_lock));
+ g_cache_list.m_update_done = 0;
+
+ // we use atexit() because this allows CRT exit to process handler before
+ // threads are killed. Otherwise with __attribute__(destructor) this
+ // function is called when DosExit starts processing DLL destruction
+ // which happens after ALL threads have been killed...
+ atexit( rtl_cache_fini);
+
+ //g_cache_list.m_update_cond = CreateEvent (0, TRUE, FALSE, 0);
+ /* Warp3 FP29 or Warp4 FP4 or better required */
+ rc = DosCreateEventSem( NULL, &g_cache_list.m_update_cond, 0x0800, 0);
+
+ g_cache_list.m_update_thread = (ULONG) _beginthread( rtl_cache_wsupdate_all, NULL,
+ 65*1024, (void*) 10);
+ RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock));
+}
+
+static void
+rtl_cache_wsupdate_wait (unsigned int seconds)
+{
+ APIRET rc;
+ if (seconds > 0)
+ {
+ RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock));
+ rc = DosWaitEventSem(g_cache_list.m_update_cond, seconds*1000);
+ RTL_MEMORY_LOCK_ACQUIRE(&(g_cache_list.m_lock));
+ }
+}
+
+static void
+rtl_cache_wsupdate_fini (void)
+{
+ APIRET rc;
+ RTL_MEMORY_LOCK_ACQUIRE(&(g_cache_list.m_lock));
+ g_cache_list.m_update_done = 1;
+ rc = DosPostEventSem(g_cache_list.m_update_cond);
+ RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock));
+ rc = DosWaitThread(&g_cache_list.m_update_thread, DCWW_WAIT);
+}
+
+/* ================================================================= */
+
#elif defined(SAL_W32)
static DWORD WINAPI
@@ -1542,8 +1605,10 @@ rtl_cache_wsupdate (
/** rtl_cache_wsupdate_all()
*
*/
-#if defined(SAL_UNX) || defined(SAL_OS2)
+#if defined(SAL_UNX)
static void *
+#elif defined(SAL_OS2)
+static void
#elif defined(SAL_W32)
static DWORD WINAPI
#endif /* SAL_UNX || SAL_W32 */
@@ -1570,7 +1635,9 @@ rtl_cache_wsupdate_all (void * arg)
}
RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock));
+#if !defined(SAL_OS2)
return (0);
+#endif
}
/* ================================================================= *
@@ -1699,7 +1766,7 @@ rtl_cache_init (void)
Delegated the call to "rtl_cache_fini()" into a dummy C++ object,
see alloc_fini.cxx .
*/
-#if defined(__GNUC__) && !defined(MACOSX)
+#if defined(__GNUC__) && !defined(MACOSX) && !defined(SAL_OS2)
static void rtl_cache_fini (void) __attribute__((destructor));
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
#pragma fini(rtl_cache_fini)
diff --git a/sal/rtl/source/bootstrap.cxx b/sal/rtl/source/bootstrap.cxx
index 13f417ec6301..2c93d9897f13 100644
--- a/sal/rtl/source/bootstrap.cxx
+++ b/sal/rtl/source/bootstrap.cxx
@@ -605,8 +605,6 @@ void Bootstrap_Impl::expandValue(
namespace {
struct bootstrap_map {
- // map<> may be preferred here, but hash_map<> is implemented fully inline,
- // thus there is no need to link against the stlport:
typedef std::hash_map<
rtl::OUString, Bootstrap_Impl *,
rtl::OUStringHash, std::equal_to< rtl::OUString >,
diff --git a/sal/util/makefile.mk b/sal/util/makefile.mk
index 3e30be18b480..bb1601882453 100644
--- a/sal/util/makefile.mk
+++ b/sal/util/makefile.mk
@@ -125,20 +125,6 @@ SHL1STDLIBS+= -z allextract -staticlib=Crun -z defaultextract
SHL1STDLIBS=-lmmap -lpthread
.ENDIF # OS2
-# If we compile sal with STLport checking iterators
-# we need to link against the STLport
-.IF "$(USE_STLP_DEBUG)" != ""
-SHL1STDLIBS+=$(LIBSTLPORT)
-.ENDIF
-
-#The irony that using the system STL instead of
-#stlport requires that we link libsal with the
-#LIBSTLPORT alias which is not required when using
-#stlport is not lost on me
-.IF "$(USE_SYSTEM_STL)"=="YES"
-SHL1STDLIBS+=$(LIBSTLPORT)
-.ENDIF
-
.IF "$(OS)"=="MACOSX"
SHL1STDLIBS+=-framework CoreFoundation -framework Carbon
.ENDIF
diff --git a/sax/qa/cppunit/makefile.mk b/sax/qa/cppunit/makefile.mk
index 69770cbd869f..711dc6fc75af 100644
--- a/sax/qa/cppunit/makefile.mk
+++ b/sax/qa/cppunit/makefile.mk
@@ -38,13 +38,6 @@ ENABLE_EXCEPTIONS=TRUE
.ELSE # "$(WITH_CPPUNIT)" != "YES"
-#building with stlport, but cppunit was not built with stlport
-.IF "$(USE_SYSTEM_STL)"!="YES"
-.IF "$(SYSTEM_CPPUNIT)"=="YES"
-CFLAGSCXX+=-DADAPT_EXT_STL
-.ENDIF
-.ENDIF
-
CFLAGSCXX += $(CPPUNIT_CFLAGS)
DLLPRE = # no leading "lib" on .so files
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index bba7f97519eb..5b03676fd2fa 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -44,8 +44,25 @@
#endif
#define DEBUG_CHANGETRACK 0
+//IAccessibility2 Implementation 2009-----
+class ScChangeAction;
+class ScAppOptions;
+class ScActionColorChanger
+{
+private:
+ const ScAppOptions& rOpt;
+ const ScStrCollection& rUsers;
+ String aLastUserName;
+ sal_uInt16 nLastUserIndex;
+ ColorData nColor;
-
+public:
+ ScActionColorChanger( const ScChangeTrack& rTrack );
+ ~ScActionColorChanger() {}
+ void Update( const ScChangeAction& rAction );
+ ColorData GetColor() const { return nColor; }
+};
+//-----IAccessibility2 Implementation 2009
class ScBaseCell;
class ScDocument;
diff --git a/sc/inc/detfunc.hxx b/sc/inc/detfunc.hxx
index b0d3df16952d..f3c2b4bc1260 100644
--- a/sc/inc/detfunc.hxx
+++ b/sc/inc/detfunc.hxx
@@ -155,6 +155,9 @@ public:
static ColorData GetCommentColor();
static void InitializeColors();
static sal_Bool IsColorsInitialized();
+//IAccessibility2 Implementation 2009-----
+ static void AppendChangTrackNoteSeparator(String &str);
+//-----IAccessibility2 Implementation 2009
};
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index d67bb09e3027..7e6479724ce9 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -443,7 +443,23 @@ private:
sal_Int16 mnNamedRangesLockCount;
+//IAccessibility2 Implementation 2009-----
+ String msDocAccTitle;
public:
+ // SC_DLLPUBLIC sal_Bool RowHidden( SCROW nRow, SCTAB nTab );
+ //inline sal_Bool RowHidden( SCROW nRow, SCTAB nTab ); // FillInfo
+ virtual void setDocAccTitle( const String& rTitle ) { msDocAccTitle = rTitle; }
+ virtual const String getDocAccTitle() const { return msDocAccTitle; }
+
+private:
+ sal_Bool bReadOnly; // MT: Really needed???
+
+public:
+ virtual void setDocReadOnly( sal_Bool b){ bReadOnly = b; }
+ virtual sal_Bool getDocReadOnly() const { return bReadOnly; }
+ sal_Bool IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBoder);
+ void GetCellChangeTrackNote( const ScAddress &cell,String &strTrackText,sal_Bool &pbLeftEdge);
+//-----IAccessibility2 Implementation 2009
SC_DLLPUBLIC sal_uLong GetCellCount() const; // alle Zellen
SCSIZE GetCellCount(SCTAB nTab, SCCOL nCol) const;
sal_uLong GetWeightedCount() const; // Formeln und Edit staerker gewichtet
@@ -454,7 +470,7 @@ public:
public:
SC_DLLPUBLIC ScDocument( ScDocumentMode eMode = SCDOCMODE_DOCUMENT,
SfxObjectShell* pDocShell = NULL );
- SC_DLLPUBLIC ~ScDocument();
+ SC_DLLPUBLIC virtual ~ScDocument();
inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
GetServiceManager() const { return xServiceManager; }
@@ -469,6 +485,9 @@ public:
SC_DLLPUBLIC void InitDrawLayer( SfxObjectShell* pDocShell = NULL );
XColorListSharedPtr GetColorTable();
+//IAccessibility2 Implementation 2009-----
+ ScTable* GetTableByIndex(sal_Int32 nIndex);
+//-----IAccessibility2 Implementation 2009
SC_DLLPUBLIC sfx2::LinkManager* GetLinkManager() const;
SC_DLLPUBLIC const ScDocOptions& GetDocOptions() const;
diff --git a/sc/inc/dptablecache.hxx b/sc/inc/dptablecache.hxx
index b9b85aa56385..315c734846fd 100644
--- a/sc/inc/dptablecache.hxx
+++ b/sc/inc/dptablecache.hxx
@@ -22,14 +22,11 @@
#ifndef DPTABLECACHE_HXX
#define DPTABLECACHE_HXX
-// Wang Xu Ming -- 12/21/2008
// Add Data Cache Support.
#ifndef SC_SCGLOB_HXX
#include "global.hxx"
#endif
-//Added by PengYunQuan for SODC_16015
#include <svl/zforlist.hxx>
-//end
#include <vector>
#include "dpglobal.hxx"
diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx
index d6de6d209222..b80671a74755 100644
--- a/sc/inc/drwlayer.hxx
+++ b/sc/inc/drwlayer.hxx
@@ -228,6 +228,10 @@ public:
static IMapObject* GetHitIMapObject(SdrObject& rObject, const basegfx::B2DPoint& rWinPoint, const Window& rCmpWnd);
static ScMacroInfo* GetMacroInfo( SdrObject* pObj, sal_Bool bCreate = sal_False );
+//IAccessibility2 Implementation 2009-----
+ virtual ImageMap* GetImageMapForObject(SdrObject* pObj);
+ virtual sal_Int32 GetHyperlinkCount(SdrObject* pObj);
+//-----IAccessibility2 Implementation 2009
private:
static SfxObjectShell* pGlobalDrawPersist; // fuer AllocModel
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index ade9b38cc1db..d7553513bc7b 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -937,6 +937,11 @@ private:
SCROW mnCurRow;
SCROW mnUBound;
};
+
+//IAccessibility2 Implementation 2009-----
+public :
+ ScColumn* GetColumnByIndex(sal_Int32 index);
+//-----IAccessibility2 Implementation 2009
};
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 85c9ca658746..bcc0a9dea205 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -87,6 +87,11 @@
#include "recursionhelper.hxx"
#include "lookupcache.hxx"
#include "externalrefmgr.hxx"
+//IAccessibility2 Implementation 2009-----
+#include "appoptio.hxx"
+#include "scmod.hxx"
+#include "../../ui/inc/viewutil.hxx"
+//-----IAccessibility2 Implementation 2009
#include "tabprotection.hxx"
#include "formulaparserpool.hxx"
#include "clipparam.hxx"
@@ -211,6 +216,9 @@ ScDocument::ScDocument( ScDocumentMode eMode,
eGrammar( formula::FormulaGrammar::GRAM_NATIVE ),
bStyleSheetUsageInvalid( sal_True ),
mbUndoEnabled( true ),
+//IAccessibility2 Implementation 2009-----
+ bReadOnly(sal_False),
+//-----IAccessibility2 Implementation 2009
mbAdjustHeightEnabled( true ),
mbExecuteLinkEnabled( true ),
mbChangeReadOnlyEnabled( false ),
@@ -1295,3 +1303,158 @@ void ScDocument::ClearLookupCaches()
if( pLookupCacheMapImpl )
pLookupCacheMapImpl->clear();
}
+//IAccessibility2 Implementation 2009-----
+sal_Bool ScDocument::IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBoder)
+{
+ ScChangeTrack* pTrack = GetChangeTrack();
+ ScChangeViewSettings* pSettings = GetChangeViewSettings();
+ if ( !pTrack || !pTrack->GetFirst() || !pSettings || !pSettings->ShowChanges() )
+ return sal_False; // nix da oder abgeschaltet
+ ScActionColorChanger aColorChanger(*pTrack);
+ // Clipping passiert von aussen
+ //! ohne Clipping, nur betroffene Zeilen painten ??!??!?
+ const ScChangeAction* pAction = pTrack->GetFirst();
+ while (pAction)
+ {
+ ScChangeActionType eType;
+ if ( pAction->IsVisible() )
+ {
+ eType = pAction->GetType();
+ const ScBigRange& rBig = pAction->GetBigRange();
+ if ( rBig.aStart.Tab() == cell.Tab())
+ {
+ ScRange aRange = rBig.MakeRange();
+ if ( eType == SC_CAT_DELETE_ROWS )
+ aRange.aEnd.SetRow( aRange.aStart.Row() );
+ else if ( eType == SC_CAT_DELETE_COLS )
+ aRange.aEnd.SetCol( aRange.aStart.Col() );
+ if (ScViewUtil::IsActionShown( *pAction, *pSettings, *this ) )
+ {
+ if (aRange.In(cell))
+ {
+ if (pColCellBoder != NULL)
+ {
+ aColorChanger.Update( *pAction );
+ Color aColor( aColorChanger.GetColor() );
+ *pColCellBoder = aColor;
+ }
+ return sal_True;
+ }
+ }
+ }
+ if ( eType == SC_CAT_MOVE &&
+ ((const ScChangeActionMove*)pAction)->
+ GetFromRange().aStart.Tab() == cell.Col() )
+ {
+ ScRange aRange = ((const ScChangeActionMove*)pAction)->
+ GetFromRange().MakeRange();
+ if (ScViewUtil::IsActionShown( *pAction, *pSettings, *this ) )
+ {
+ if (aRange.In(cell))
+ {
+ if (pColCellBoder != NULL)
+ {
+ aColorChanger.Update( *pAction );
+ Color aColor( aColorChanger.GetColor() );
+ *pColCellBoder = aColor;
+ }
+ return sal_True;
+ }
+ }
+ }
+ }
+ pAction = pAction->GetNext();
+ }
+ return sal_False;
+}
+void ScDocument::GetCellChangeTrackNote( const ScAddress &aCellPos,String &aTrackText,sal_Bool &bLeftEdge)
+{
+ aTrackText=String();
+ // Change-Tracking
+ ScChangeTrack* pTrack = GetChangeTrack();
+ ScChangeViewSettings* pSettings = GetChangeViewSettings();
+ if ( pTrack && pTrack->GetFirst() && pSettings && pSettings->ShowChanges())
+ {
+ const ScChangeAction* pFound = NULL;
+ const ScChangeAction* pFoundContent = NULL;
+ const ScChangeAction* pFoundMove = NULL;
+ long nModified = 0;
+ const ScChangeAction* pAction = pTrack->GetFirst();
+ while (pAction)
+ {
+ if ( pAction->IsVisible() &&
+ ScViewUtil::IsActionShown( *pAction, *pSettings, *this ) )
+ {
+ ScChangeActionType eType = pAction->GetType();
+ const ScBigRange& rBig = pAction->GetBigRange();
+ if ( rBig.aStart.Tab() == aCellPos.Tab())
+ {
+ ScRange aRange = rBig.MakeRange();
+ if ( eType == SC_CAT_DELETE_ROWS )
+ aRange.aEnd.SetRow( aRange.aStart.Row() );
+ else if ( eType == SC_CAT_DELETE_COLS )
+ aRange.aEnd.SetCol( aRange.aStart.Col() );
+ if ( aRange.In( aCellPos ) )
+ {
+ pFound = pAction; // der letzte gewinnt
+ switch ( eType )
+ {
+ case SC_CAT_CONTENT :
+ pFoundContent = pAction;
+ break;
+ case SC_CAT_MOVE :
+ pFoundMove = pAction;
+ break;
+ default:
+ break;
+ }
+ ++nModified;
+ }
+ }
+ if ( eType == SC_CAT_MOVE )
+ {
+ ScRange aRange =
+ ((const ScChangeActionMove*)pAction)->
+ GetFromRange().MakeRange();
+ if ( aRange.In( aCellPos ) )
+ {
+ pFound = pAction;
+ ++nModified;
+ }
+ }
+ }
+ pAction = pAction->GetNext();
+ }
+ if ( pFound )
+ {
+ if ( pFoundContent && pFound->GetType() != SC_CAT_CONTENT )
+ pFound = pFoundContent; // Content gewinnt
+ if ( pFoundMove && pFound->GetType() != SC_CAT_MOVE &&
+ pFoundMove->GetActionNumber() >
+ pFound->GetActionNumber() )
+ pFound = pFoundMove; // Move gewinnt
+ // bei geloeschten Spalten: Pfeil auf die linke Seite der Zelle
+ if ( pFound->GetType() == SC_CAT_DELETE_COLS )
+ bLeftEdge = sal_True;
+ DateTime aDT = pFound->GetDateTime();
+ aTrackText = pFound->GetUser();
+ aTrackText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ", " ));
+ aTrackText += ScGlobal::pLocaleData->getDate(aDT);
+ aTrackText += ' ';
+ aTrackText += ScGlobal::pLocaleData->getTime(aDT);
+ aTrackText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ":\n" ));
+ String aComStr=pFound->GetComment();
+ if(aComStr.Len()>0)
+ {
+ aTrackText += aComStr;
+ aTrackText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "\n( " ));
+ }
+ pFound->GetDescription( aTrackText, this );
+ if(aComStr.Len()>0)
+ {
+ aTrackText +=')';
+ }
+ }
+ }
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 644521eb8054..f613f5b6c3de 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -200,6 +200,15 @@ sal_Bool ScDocument::GetTable( const String& rName, SCTAB& rTab ) const
return sal_False;
}
+//IAccessibility2 Implementation 2009-----
+ScTable* ScDocument::GetTableByIndex(sal_Int32 nIndex)
+{
+ if ( nIndex <= MAXTAB && nIndex >= 0)
+ return pTab[nIndex];
+
+ return NULL;
+}
+//-----IAccessibility2 Implementation 2009
sal_Bool ScDocument::ValidTabName( const String& rName ) const
{
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index c7315fbbddc2..0f444dafdafc 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -1506,7 +1506,6 @@ void ScDPSaveDimension::Refresh( const com::sun::star::uno::Reference<
};
//remove unused members
- //SODC_19124
for (MemberList::iterator i=maMemberList.begin(); i != maMemberList.end() ; )
{
rtl::OUString aMemberName = (*i)->GetName();
diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx
index e2d3ea340e03..a1b07ca2fd91 100644
--- a/sc/source/core/data/dptablecache.cxx
+++ b/sc/source/core/data/dptablecache.cxx
@@ -196,8 +196,8 @@ ScDPItemData::ScDPItemData( ScDocument* pDoc, SCROW nRow, sal_uInt16 nCol, sal_u
if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA && ((ScFormulaCell*)pCell)->GetErrCode() )
{
- SetString ( aDocStr ); //[SODC_19347] add liyi
- //bErr = sal_True; //[SODC_19347] del liyi
+ SetString ( aDocStr );
+ //bErr = sal_True;
mbFlag |= MK_ERR;
}
else if ( pDoc->HasValueData( nCol, nRow, nDocTab ) )
@@ -293,8 +293,7 @@ sal_Int32 ScDPItemData::Compare( const ScDPItemData& rA,
else
return ScGlobal::GetCollator()->compareString( rA.aString, rB.aString );
}
-//
-//Wang Xu Ming SODC_17561
+
#ifdef DEBUG
void ScDPItemData::dump() const
{
@@ -304,7 +303,6 @@ void ScDPItemData::dump() const
DBG_TRACE1( "mbFlag= %d", mbFlag);
}
#endif
-//End
TypedStrData* ScDPItemData::CreateTypeString( )
{
@@ -740,9 +738,8 @@ bool ScDPTableDataCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam, sal
if ( bMatchWholeCell )
{
bOk = pTransliteration->isEqual( aCellStr, *rEntry.pStr );
- //Added by zhaosz,for sodc_2702,20060808
+
String aStr = *rEntry.pStr;//"f*"
- //modified by weihuaw,for SODC_16698
//use another way to find "*" in aStr
sal_Bool bHasStar = sal_False;
xub_StrLen nIndex;
@@ -1044,7 +1041,7 @@ const ScDPItemData* ScDPTableDataCache::GetSortedItemData(SCCOL nDim, SCROW nOrd
SCCOL ScDPTableDataCache::GetDimensionIndex(String sName) const
{
- for ( size_t n = 1; n < mrLabelNames.size(); n ++ ) //defects, label name map wrong SODC_17590, SODC_18932,SODC_18827,SODC_18960,SODC_18923
+ for ( size_t n = 1; n < mrLabelNames.size(); n ++ ) //defects, label name map wrong
{
if ( mrLabelNames[n]->GetString() == sName )
return (SCCOL)(n-1);
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index f8773bff6fdb..65824727cdcf 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -2059,7 +2059,27 @@ ScMacroInfo* ScDrawLayer::GetMacroInfo( SdrObject* pObj, sal_Bool bCreate )
}
return 0;
}
+//IAccessibility2 Implementation 2009-----
+ImageMap* ScDrawLayer::GetImageMapForObject(SdrObject* pObj)
+{
+ ScIMapInfo* pIMapInfo = const_cast<ScIMapInfo*>( GetIMapInfo( pObj ) );
+ if ( pIMapInfo )
+ {
+ return const_cast<ImageMap*>( &(pIMapInfo->GetImageMap()) );
+ }
+ return NULL;
+}
+sal_Int32 ScDrawLayer::GetHyperlinkCount(SdrObject* pObj)
+{
+ sal_Int32 nHLCount = 0;
+ ScMacroInfo* pMacroInfo = GetMacroInfo(pObj, sal_False);
+ if (pMacroInfo)
+ // MT IA2: GetHlink*( doesn|t exist in DEV300 anymore...
+ nHLCount = 0; // pMacroInfo->GetHlink().getLength() > 0 ? 1 : 0;
+ return nHLCount;
+}
+//-----IAccessibility2 Implementation 2009
void ScDrawLayer::SetGlobalDrawPersist(SfxObjectShell* pPersist) // static
{
DBG_ASSERT(!pGlobalDrawPersist,"SetGlobalDrawPersist mehrfach");
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 509e51b401c7..a91932fb1ecd 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -3308,3 +3308,14 @@ sal_uLong ScTable::GetColOffset( SCCOL nCol ) const
return n;
}
+//IAccessibility2 Implementation 2009-----
+ScColumn* ScTable::GetColumnByIndex(sal_Int32 index)
+{
+ if( index <= MAXCOL && index >= 0 )
+ {
+ return &(aCol[index]);
+ }
+ return NULL;
+}
+//-----IAccessibility2 Implementation 2009
+
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index a138b1bb0c20..a752ed3645b3 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -1723,3 +1723,10 @@ sal_Bool ScDetectiveFunc::IsColorsInitialized()
return bColorsInitialized;
}
+//IAccessibility2 Implementation 2009-----
+void ScDetectiveFunc::AppendChangTrackNoteSeparator(String &aDisplay)
+{
+ aDisplay.AppendAscii( RTL_CONSTASCII_STRINGPARAM("\n--------\n") );
+}
+//-----IAccessibility2 Implementation 2009
+
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index 2d50fd18c1e2..04b0c3602b61 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -40,7 +40,9 @@
#include "editsrc.hxx"
#include "dociter.hxx"
#include "cell.hxx"
-
+//IAccessibility2 Implementation 2009-----
+#include "validat.hxx"
+//-----IAccessibility2 Implementation 2009
#ifndef _UTL_ACCESSIBLESTATESETHELPER_HXX
#include <unotools/accessiblestatesethelper.hxx>
#endif
@@ -58,6 +60,9 @@
#include <comphelper/sequence.hxx>
#include <float.h>
+//IAccessibility2 Implementation 2009-----
+#include "AccessibleSpreadsheet.hxx"
+//-----IAccessibility2 Implementation 2009
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -117,11 +122,11 @@ void SAL_CALL ScAccessibleCell::disposing()
//===== XInterface =====================================================
-IMPLEMENT_FORWARD_XINTERFACE2( ScAccessibleCell, ScAccessibleCellBase, AccessibleStaticTextBase )
+IMPLEMENT_FORWARD_XINTERFACE3( ScAccessibleCell, ScAccessibleCellBase, AccessibleStaticTextBase, ScAccessibleCellAttributeImpl )
//===== XTypeProvider ===================================================
-IMPLEMENT_FORWARD_XTYPEPROVIDER2( ScAccessibleCell, ScAccessibleCellBase, AccessibleStaticTextBase )
+IMPLEMENT_FORWARD_XTYPEPROVIDER3( ScAccessibleCell, ScAccessibleCellBase, AccessibleStaticTextBase, ScAccessibleCellAttributeImpl )
//===== XAccessibleComponent ============================================
@@ -240,6 +245,25 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
pStateSet->AddState(AccessibleStateType::DEFUNC);
else
{
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ pStateSet->AddState(AccessibleStateType::ENABLED);
+ pStateSet->AddState(AccessibleStateType::MULTI_LINE);
+ pStateSet->AddState(AccessibleStateType::MULTI_SELECTABLE);
+ if (IsOpaque(xParentStates))
+ pStateSet->AddState(AccessibleStateType::OPAQUE);
+ pStateSet->AddState(AccessibleStateType::SELECTABLE);
+ if (IsSelected())
+ pStateSet->AddState(AccessibleStateType::SELECTED);
+ if (isShowing())
+ pStateSet->AddState(AccessibleStateType::SHOWING);
+ pStateSet->AddState(AccessibleStateType::TRANSIENT);
+ if (isVisible())
+ pStateSet->AddState(AccessibleStateType::VISIBLE);
+ return pStateSet;
+ }
+//-----IAccessibility2 Implementation 2009
if (IsEditable(xParentStates))
{
pStateSet->AddState(AccessibleStateType::EDITABLE);
@@ -248,6 +272,9 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
pStateSet->AddState(AccessibleStateType::ENABLED);
pStateSet->AddState(AccessibleStateType::MULTI_LINE);
pStateSet->AddState(AccessibleStateType::MULTI_SELECTABLE);
+//IAccessibility2 Implementation 2009-----
+ pStateSet->AddState(AccessibleStateType::FOCUSABLE);
+//-----IAccessibility2 Implementation 2009
if (IsOpaque(xParentStates))
pStateSet->AddState(AccessibleStateType::OPAQUE);
pStateSet->AddState(AccessibleStateType::SELECTABLE);
@@ -344,6 +371,17 @@ sal_Bool ScAccessibleCell::IsOpaque(
sal_Bool ScAccessibleCell::IsSelected()
{
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ const ScAccessibleSpreadsheet *pSheet =static_cast<const ScAccessibleSpreadsheet*>(mxParent.get());
+ if (pSheet)
+ {
+ return pSheet->IsScAddrFormulaSel(maCellAddress);
+ }
+ return sal_False;
+ }
+//-----IAccessibility2 Implementation 2009
sal_Bool bResult(sal_False);
if (mpViewShell && mpViewShell->GetViewData())
{
@@ -363,6 +401,12 @@ ScDocument* ScAccessibleCell::GetDocument(ScTabViewShell* pViewShell)
::std::auto_ptr< SvxEditSource > ScAccessibleCell::CreateEditSource(ScTabViewShell* pViewShell, ScAddress aCell, ScSplitPos eSplitPos)
{
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ return ::std::auto_ptr< SvxEditSource >();
+ }
+//-----IAccessibility2 Implementation 2009
::std::auto_ptr < ScAccessibleTextData > pAccessibleCellTextData
( new ScAccessibleCellTextData( pViewShell, aCell, eSplitPos, this ) );
::std::auto_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(pAccessibleCellTextData));
@@ -453,3 +497,146 @@ void ScAccessibleCell::AddRelation(const ScRange& rRange,
pRelationSet->AddRelation(aRelation);
}
}
+//IAccessibility2 Implementation 2009-----
+::rtl::OUString ReplaceOneChar(::rtl::OUString oldOUString, ::rtl::OUString replacedChar, ::rtl::OUString replaceStr)
+{
+ int iReplace = -1;
+ iReplace = oldOUString.lastIndexOf(replacedChar);
+ if (iReplace > -1)
+ {
+ for(;iReplace>-1;)
+ {
+ oldOUString = oldOUString.replaceAt(iReplace,1, replaceStr);
+ iReplace=oldOUString.lastIndexOf(replacedChar,iReplace);
+ }
+ }
+ return oldOUString;
+}
+::rtl::OUString ReplaceFourChar(::rtl::OUString oldOUString)
+{
+ oldOUString = ReplaceOneChar(oldOUString,::rtl::OUString::createFromAscii("\\"),::rtl::OUString::createFromAscii("\\\\"));
+ oldOUString = ReplaceOneChar(oldOUString,::rtl::OUString::createFromAscii(";"),::rtl::OUString::createFromAscii("\\;"));
+ oldOUString = ReplaceOneChar(oldOUString,::rtl::OUString::createFromAscii("="),::rtl::OUString::createFromAscii("\\="));
+ oldOUString = ReplaceOneChar(oldOUString,::rtl::OUString::createFromAscii(","),::rtl::OUString::createFromAscii("\\,"));
+ oldOUString = ReplaceOneChar(oldOUString,::rtl::OUString::createFromAscii(":"),::rtl::OUString::createFromAscii("\\:"));
+ return oldOUString;
+}
+
+uno::Any SAL_CALL ScAccessibleCell::getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ uno::Any strRet;
+ if (mpViewShell)
+ {
+ const ::rtl::OUString strAttr(::rtl::OUString::createFromAscii(":"));
+ const ::rtl::OUString strSplit(::rtl::OUString::createFromAscii(";"));
+ ::rtl::OUString strFor = mpViewShell->GetFormula(maCellAddress) ;
+ strFor = strFor.replaceAt(0,1,::rtl::OUString::createFromAscii(""));
+ strFor = ReplaceFourChar(strFor);
+ strFor =::rtl::OUString::createFromAscii("Formula:") + strFor;
+ strFor +=strSplit;
+ strFor +=::rtl::OUString::createFromAscii("Note:");
+ strFor +=ReplaceFourChar(GetAllDisplayNote());
+ strFor +=strSplit;
+ strFor += getShadowAttrs();//the string returned contains the spliter ";"
+ strFor += getBorderAttrs();//the string returned contains the spliter ";"
+ //end of cell attributes
+ if( mpDoc )
+ {
+ strFor += ::rtl::OUString::createFromAscii("isdropdown:");
+ if( IsDropdown() )
+ strFor+= ::rtl::OUString::createFromAscii("true");
+ else
+ strFor+= ::rtl::OUString::createFromAscii("false");
+ strFor += ::rtl::OUString::createFromAscii(";");
+ }
+ strRet <<= strFor ;
+ }
+ return strRet;
+}
+
+// cell has its own ParaIndent property, so when calling character attributes on cell, the ParaIndent should replace the ParaLeftMargin if its value is not zero.
+uno::Sequence< beans::PropertyValue > SAL_CALL ScAccessibleCell::getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ uno::Sequence< beans::PropertyValue > aAttribs = AccessibleStaticTextBase::getCharacterAttributes( nIndex, aRequestedAttributes );
+ beans::PropertyValue *pAttribs = aAttribs.getArray();
+
+ sal_uInt16 nParaIndent = static_cast< const SfxUInt16Item* >( mpDoc->GetAttr( maCellAddress.Col(), maCellAddress.Row(), maCellAddress.Tab(), ATTR_INDENT ) )->GetValue();
+ if (nParaIndent > 0)
+ {
+ ::rtl::OUString sLeftMarginName (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParaLeftMargin")));
+ for (int i = 0; i < aAttribs.getLength(); ++i)
+ {
+ if (sLeftMarginName == pAttribs[i].Name)
+ {
+ pAttribs[i].Value = uno::makeAny( nParaIndent );
+ break;
+ }
+ }
+ }
+ return aAttribs;
+}
+
+sal_Bool ScAccessibleCell::IsFormulaMode()
+{
+ ScAccessibleSpreadsheet* pSheet =static_cast<ScAccessibleSpreadsheet*>(mxParent.get());
+ if (pSheet)
+ {
+ return pSheet->IsFormulaMode();
+ }
+ return sal_False;
+}
+sal_Bool ScAccessibleCell::IsDropdown()
+{
+ sal_uInt16 nPosX = maCellAddress.Col();
+ sal_uInt16 nPosY = sal_uInt16(maCellAddress.Row());
+ sal_uInt16 nTab = maCellAddress.Tab();
+ //IAccessibility2 Implementation 2009-----
+ sal_uInt32 nValidation = static_cast< const SfxUInt32Item* >( mpDoc->GetAttr( nPosX, nPosY, nTab, ATTR_VALIDDATA ) )->GetValue();
+ if( nValidation )
+ {
+ const ScValidationData* pData = mpDoc->GetValidationEntry( nValidation );
+ if( pData && pData->HasSelectionList() )
+ return sal_True;
+ }
+ //-----IAccessibility2 Implementation 2009
+ ScMergeFlagAttr* pAttr;
+ pAttr = (ScMergeFlagAttr*)mpDoc->GetAttr( nPosX, nPosY, nTab, ATTR_MERGE_FLAG );
+ if( pAttr->HasAutoFilter() )
+ {
+ return sal_True;
+ }
+ else
+ {
+ sal_uInt16 nTabCount = mpDoc->GetTableCount();
+ if ( nTab+1<nTabCount && mpDoc->IsScenario(nTab+1) && !mpDoc->IsScenario(nTab) )
+ {
+ sal_uInt16 i;
+ ScMarkData aMarks;
+ for (i=nTab+1; i<nTabCount && mpDoc->IsScenario(i); i++)
+ mpDoc->MarkScenario( i, nTab, aMarks, sal_False, SC_SCENARIO_SHOWFRAME );
+ ScRangeList aRanges;
+ aMarks.FillRangeListWithMarks( &aRanges, sal_False );
+ sal_Bool bHasScenario;
+ sal_uInt16 nRangeCount = (sal_uInt16)aRanges.Count();
+ for (i=0; i<nRangeCount; i++)
+ {
+ ScRange aRange = *aRanges.GetObject(i);
+ mpDoc->ExtendTotalMerge( aRange );
+ sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 );
+ // MT IA2: Not used: sal_Bool bIsInScen = sal_False;
+ if ( bTextBelow )
+ {
+ bHasScenario = (aRange.aStart.Col() == nPosX && aRange.aEnd.Row() == nPosY-1);
+ }
+ else
+ {
+ bHasScenario = (aRange.aStart.Col() == nPosX && aRange.aStart.Row() == nPosY+1);
+ }
+ if( bHasScenario ) return sal_True;
+ }
+ }
+ }
+ return sal_False;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
index 5d28e071ce45..5b245286b3db 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -38,7 +38,10 @@
#include "sc.hrc"
#endif
#include "unonames.hxx"
-
+//IAccessibility2 Implementation 2009-----
+#include "detfunc.hxx"
+#include "chgtrack.hxx"
+//-----IAccessibility2 Implementation 2009
#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEROLE_HPP_
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#endif
@@ -52,6 +55,11 @@
#include <rtl/uuid.h>
#include <comphelper/sequence.hxx>
#include <sfx2/objsh.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/sheet/XSheetAnnotation.hpp>
+#include <com/sun/star/sheet/XSheetAnnotationAnchor.hpp>
+#include <com/sun/star/text/XSimpleText.hpp>
+//-----IAccessibility2 Implementation 2009
#include <float.h>
@@ -226,17 +234,20 @@ sal_Int32
ScAccessibleCellBase::createAccessibleName(void)
throw (uno::RuntimeException)
{
- String sName( ScResId(STR_ACC_CELL_NAME) );
+//IAccessibility2 Implementation 2009-----
+ //String sName( ScResId(STR_ACC_CELL_NAME) );
String sAddress;
// Document not needed, because only the cell address, but not the tablename is needed
// always us OOO notation
maCellAddress.Format( sAddress, SCA_VALID, NULL );
- sName.SearchAndReplaceAscii("%1", sAddress);
+ //sName.SearchAndReplaceAscii("%1", sAddress);
/* #i65103# ZoomText merges cell address and contents, e.g. if value 2 is
contained in cell A1, ZT reads "cell A twelve" instead of "cell A1 - 2".
Simple solution: Append a space character to the cell address. */
- sName.Append( ' ' );
- return rtl::OUString(sName);
+ //sName.Append( ' ' );
+ //return rtl::OUString(sName);
+ return rtl::OUString(sAddress);
+//-----IAccessibility2 Implementation 2009
}
//===== XAccessibleValue ================================================
@@ -249,8 +260,14 @@ uno::Any SAL_CALL
IsObjectValid();
uno::Any aAny;
if (mpDoc)
- aAny <<= mpDoc->GetValue(maCellAddress);
-
+//IAccessibility2 Implementation 2009-----
+ //aAny <<= mpDoc->GetValue(maCellAddress);
+ {
+ String valStr;
+ mpDoc->GetString(maCellAddress.Col(),maCellAddress.Row(),maCellAddress.Tab(), valStr);
+ aAny <<= rtl::OUString(valStr);
+ }
+//-----IAccessibility2 Implementation 2009
return aAny;
}
@@ -339,3 +356,305 @@ sal_Bool ScAccessibleCellBase::IsEditable(
bEditable = sal_True;
return bEditable;
}
+//IAccessibility2 Implementation 2009-----
+::rtl::OUString SAL_CALL ScAccessibleCellBase::GetNote(void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ScUnoGuard aGuard;
+ IsObjectValid();
+ rtl::OUString msNote;
+ if (mpDoc)
+ {
+ SfxObjectShell* pObjSh = mpDoc->GetDocumentShell();
+ if ( pObjSh )
+ {
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( pObjSh->GetModel(), uno::UNO_QUERY );
+ if ( xSpreadDoc.is() )
+ {
+ uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
+ uno::Reference<container::XIndexAccess> xIndex( xSheets, uno::UNO_QUERY );
+ if ( xIndex.is() )
+ {
+ uno::Any aTable = xIndex->getByIndex(maCellAddress.Tab());
+ uno::Reference<sheet::XSpreadsheet> xTable;
+ if (aTable>>=xTable)
+ {
+ uno::Reference<table::XCell> xCell = xTable->getCellByPosition(maCellAddress.Col(), maCellAddress.Row());
+ if (xCell.is())
+ {
+ uno::Reference <sheet::XSheetAnnotationAnchor> xAnnotationAnchor ( xCell, uno::UNO_QUERY);
+ if(xAnnotationAnchor.is())
+ {
+ uno::Reference <sheet::XSheetAnnotation> xSheetAnnotation = xAnnotationAnchor->getAnnotation();
+ if (xSheetAnnotation.is())
+ {
+ uno::Reference <text::XSimpleText> xText (xSheetAnnotation, uno::UNO_QUERY);
+ if (xText.is())
+ {
+ msNote = xText->getString();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return msNote;
+}
+#ifndef _COM_SUN_STAR_TABLE_SHADOWFORMAT_HPP_
+#include <com/sun/star/table/ShadowFormat.hpp>
+#endif
+::rtl::OUString SAL_CALL ScAccessibleCellBase::getShadowAttrs(void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ScUnoGuard aGuard;
+ IsObjectValid();
+ table::ShadowFormat aShadowFmt;
+ if (mpDoc)
+ {
+ SfxObjectShell* pObjSh = mpDoc->GetDocumentShell();
+ if ( pObjSh )
+ {
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( pObjSh->GetModel(), uno::UNO_QUERY );
+ if ( xSpreadDoc.is() )
+ {
+ uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
+ uno::Reference<container::XIndexAccess> xIndex( xSheets, uno::UNO_QUERY );
+ if ( xIndex.is() )
+ {
+ uno::Any aTable = xIndex->getByIndex(maCellAddress.Tab());
+ uno::Reference<sheet::XSpreadsheet> xTable;
+ if (aTable>>=xTable)
+ {
+ uno::Reference<table::XCell> xCell = xTable->getCellByPosition(maCellAddress.Col(), maCellAddress.Row());
+ if (xCell.is())
+ {
+ uno::Reference<beans::XPropertySet> xCellProps(xCell, uno::UNO_QUERY);
+ if (xCellProps.is())
+ {
+ uno::Any aAny = xCellProps->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_SHADOW)));
+ aAny >>= aShadowFmt;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ //construct shadow attributes string
+ rtl::OUString sShadowAttrs( RTL_CONSTASCII_USTRINGPARAM("Shadow:") );
+ rtl::OUString sInnerSplit( RTL_CONSTASCII_USTRINGPARAM(",") );
+ rtl::OUString sOuterSplit( RTL_CONSTASCII_USTRINGPARAM(";") );
+ sal_Int32 nLocationVal = 0;
+ switch( aShadowFmt.Location )
+ {
+ case table::ShadowLocation_TOP_LEFT:
+ nLocationVal = 1;
+ break;
+ case table::ShadowLocation_TOP_RIGHT:
+ nLocationVal = 2;
+ break;
+ case table::ShadowLocation_BOTTOM_LEFT:
+ nLocationVal = 3;
+ break;
+ case table::ShadowLocation_BOTTOM_RIGHT:
+ nLocationVal = 4;
+ break;
+ default:
+ break;
+ }
+ //if there is no shadow property for the cell
+ if ( nLocationVal == 0 )
+ {
+ sShadowAttrs += sOuterSplit;
+ return sShadowAttrs;
+ }
+ //else return all the shadow properties
+ sShadowAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Location=") );
+ sShadowAttrs += rtl::OUString::valueOf( (sal_Int32)nLocationVal );
+ sShadowAttrs += sInnerSplit;
+ sShadowAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ShadowWidth=") );
+ sShadowAttrs += rtl::OUString::valueOf( (sal_Int32)aShadowFmt.ShadowWidth ) ;
+ sShadowAttrs += sInnerSplit;
+ sShadowAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsTransparent=") );
+ sShadowAttrs += rtl::OUString::valueOf( (sal_Bool)aShadowFmt.IsTransparent ) ;
+ sShadowAttrs += sInnerSplit;
+ sShadowAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Color=") );
+ sShadowAttrs += rtl::OUString::valueOf( (sal_Int32)aShadowFmt.Color );
+ sShadowAttrs += sOuterSplit;
+ return sShadowAttrs;
+}
+#ifndef _COM_SUN_STAR_TABLE_BORDERLINE_HPP_
+#include <com/sun/star/table/BorderLine.hpp>
+#endif
+::rtl::OUString SAL_CALL ScAccessibleCellBase::getBorderAttrs(void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ScUnoGuard aGuard;
+ IsObjectValid();
+ table::BorderLine aTopBorder;
+ table::BorderLine aBottomBorder;
+ table::BorderLine aLeftBorder;
+ table::BorderLine aRightBorder;
+ if (mpDoc)
+ {
+ SfxObjectShell* pObjSh = mpDoc->GetDocumentShell();
+ if ( pObjSh )
+ {
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( pObjSh->GetModel(), uno::UNO_QUERY );
+ if ( xSpreadDoc.is() )
+ {
+ uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
+ uno::Reference<container::XIndexAccess> xIndex( xSheets, uno::UNO_QUERY );
+ if ( xIndex.is() )
+ {
+ uno::Any aTable = xIndex->getByIndex(maCellAddress.Tab());
+ uno::Reference<sheet::XSpreadsheet> xTable;
+ if (aTable>>=xTable)
+ {
+ uno::Reference<table::XCell> xCell = xTable->getCellByPosition(maCellAddress.Col(), maCellAddress.Row());
+ if (xCell.is())
+ {
+ uno::Reference<beans::XPropertySet> xCellProps(xCell, uno::UNO_QUERY);
+ if (xCellProps.is())
+ {
+ uno::Any aAny = xCellProps->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_TOPBORDER)));
+ aAny >>= aTopBorder;
+ aAny = xCellProps->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_BOTTBORDER)));
+ aAny >>= aBottomBorder;
+ aAny = xCellProps->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_LEFTBORDER)));
+ aAny >>= aLeftBorder;
+ aAny = xCellProps->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_RIGHTBORDER)));
+ aAny >>= aRightBorder;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ Color aColor;
+ sal_Bool bIn = mpDoc ? mpDoc->IsCellInChangeTrack(maCellAddress,&aColor) : sal_False;
+ if (bIn)
+ {
+ aTopBorder.Color = aColor.GetColor();
+ aBottomBorder.Color = aColor.GetColor();
+ aLeftBorder.Color = aColor.GetColor();
+ aRightBorder.Color = aColor.GetColor();
+ aTopBorder.OuterLineWidth =2;
+ aBottomBorder.OuterLineWidth =2;
+ aLeftBorder.OuterLineWidth =2;
+ aRightBorder.OuterLineWidth =2;
+ }
+
+ //construct border attributes string
+ rtl::OUString sBorderAttrs;
+ rtl::OUString sInnerSplit( RTL_CONSTASCII_USTRINGPARAM(",") );
+ rtl::OUString sOuterSplit( RTL_CONSTASCII_USTRINGPARAM(";") );
+ //top border
+ //if top of the cell has no border
+ if ( aTopBorder.InnerLineWidth == 0 && aTopBorder.OuterLineWidth == 0 )
+ {
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopBorder:;") );
+ }
+ else//add all the border properties to the return string.
+ {
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopBorder:Color=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aTopBorder.Color );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("InnerLineWidth=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aTopBorder.InnerLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OuterLineWidth=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aTopBorder.OuterLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LineDistance=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aTopBorder.LineDistance );
+ sBorderAttrs += sOuterSplit;
+ }
+ //bottom border
+ if ( aBottomBorder.InnerLineWidth == 0 && aBottomBorder.OuterLineWidth == 0 )
+ {
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomBorde:;") );
+ }
+ else
+ {
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomBorder:Color=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aBottomBorder.Color );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("InnerLineWidth=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aBottomBorder.InnerLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OuterLineWidth=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aBottomBorder.OuterLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LineDistance=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aBottomBorder.LineDistance );
+ sBorderAttrs += sOuterSplit;
+ }
+ //left border
+ if ( aLeftBorder.InnerLineWidth == 0 && aLeftBorder.OuterLineWidth == 0 )
+ {
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftBorder:;") );
+ }
+ else
+ {
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftBorder:Color=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aLeftBorder.Color );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("InnerLineWidth=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aLeftBorder.InnerLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OuterLineWidth=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aLeftBorder.OuterLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LineDistance=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aLeftBorder.LineDistance );
+ sBorderAttrs += sOuterSplit;
+ }
+ //right border
+ if ( aRightBorder.InnerLineWidth == 0 && aRightBorder.OuterLineWidth == 0 )
+ {
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightBorder:;") );
+ }
+ else
+ {
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightBorder:Color=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aRightBorder.Color );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("InnerLineWidth=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aRightBorder.InnerLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OuterLineWidth=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aRightBorder.OuterLineWidth );
+ sBorderAttrs += sInnerSplit;
+ sBorderAttrs += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LineDistance=") );
+ sBorderAttrs += rtl::OUString::valueOf( (sal_Int32)aRightBorder.LineDistance );
+ sBorderAttrs += sOuterSplit;
+ }
+ return sBorderAttrs;
+}
+//end of cell attributes
+
+::rtl::OUString SAL_CALL ScAccessibleCellBase::GetAllDisplayNote(void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ::rtl::OUString strNote;
+ String strTrackText;
+ if (mpDoc)
+ {
+ sal_Bool bLeftedge=sal_False;
+ mpDoc->GetCellChangeTrackNote(maCellAddress,strTrackText,bLeftedge);
+ }
+ if (strTrackText.Len() > 0 )
+ {
+ ScDetectiveFunc::AppendChangTrackNoteSeparator(strTrackText);
+ strNote = strTrackText;
+ }
+ strNote += GetNote();
+ return strNote;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
index f5708cf6b31d..df37633000ea 100644
--- a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
@@ -31,17 +31,32 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+#include <comphelper/accessiblekeybindinghelper.hxx>
+#include <com/sun/star/awt/KeyModifier.hpp>
+#include <vcl/keycodes.hxx>
+//-----IAccessibility2 Implementation 2009
+#ifndef _UTL_ACCESSIBLESTATESETHELPER_HXX
#include <unotools/accessiblestatesethelper.hxx>
+#endif
#include <rtl/uuid.h>
#include <tools/gen.hxx>
#include <toolkit/helper/convert.hxx>
#include <tools/debug.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#include <unotools/accessiblerelationsethelper.hxx>
+//-----IAccessibility2 Implementation 2009
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
class ScAccessibleDataPilotButton
: public ScAccessibleContextBase
+//IAccessibility2 Implementation 2009-----
+ , public ::com::sun::star::accessibility::XAccessibleAction
+//-----IAccessibility2 Implementation 2009
{
public:
//===== internal ========================================================
@@ -63,6 +78,19 @@ public:
protected:
virtual ~ScAccessibleDataPilotButton(void);
public:
+//IAccessibility2 Implementation 2009-----
+ // XAccessibleAction
+ virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ ///===== XInterface =====================================================
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ ::com::sun::star::uno::Type const & rType )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+//-----IAccessibility2 Implementation 2009
///===== XAccessibleComponent ============================================
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
@@ -104,7 +132,10 @@ public:
::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
getAccessibleStateSet(void)
throw (::com::sun::star::uno::RuntimeException);
-
+//IAccessibility2 Implementation 2009-----
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet >
+ SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException);
+//-----IAccessibility2 Implementation 2009
///===== XServiceInfo ====================================================
/** Returns an identifier for the implementation of this object.
@@ -296,6 +327,10 @@ void ScAccessibleDataPilotControl::GotFocus()
{
DBG_ASSERT(mpFieldWindow->GetFieldCount() == maChildren.size(), "did not recognize a child count change");
+//IAccessibility2 Implementation 2009-----
+ if(maChildren.size()==0)
+ return ;
+//-----IAccessibility2 Implementation 2009
sal_Int32 nIndex(mpFieldWindow->GetSelectedIndex());
uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
if (xTempAcc.is() && maChildren[nIndex].pAcc)
@@ -308,7 +343,10 @@ void ScAccessibleDataPilotControl::LostFocus()
if (mpFieldWindow)
{
DBG_ASSERT(mpFieldWindow->GetFieldCount() == maChildren.size(), "did not recognize a child count change");
-
+//IAccessibility2 Implementation 2009-----
+ if(maChildren.size()==0)
+ return ;
+//-----IAccessibility2 Implementation 2009
sal_Int32 nIndex(mpFieldWindow->GetSelectedIndex());
uno::Reference < XAccessible > xTempAcc = maChildren[nIndex].xWeakAcc;
if (xTempAcc.is() && maChildren[nIndex].pAcc)
@@ -518,7 +556,11 @@ ScAccessibleDataPilotButton::ScAccessibleDataPilotButton(
::com::sun::star::accessibility::XAccessible>& rxParent,
ScPivotFieldWindow* pFieldWindow,
sal_Int32 nIndex)
- : ScAccessibleContextBase(rxParent, AccessibleRole::PUSH_BUTTON),
+//IAccessibility2 Implementation 2009-----
+//change role frome PUSH_BUTTON to BUTTON_MENU
+ //: ScAccessibleContextBase(rxParent, AccessibleRole::PUSH_BUTTON),
+ : ScAccessibleContextBase(rxParent, AccessibleRole::BUTTON_MENU),
+//-----IAccessibility2 Implementation 2009
mpFieldWindow(pFieldWindow),
mnIndex(nIndex)
{
@@ -657,7 +699,23 @@ uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessibleDataPilotButton::getAcc
return pStateSet;
}
+//IAccessibility2 Implementation 2009-----
+::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet >
+ SAL_CALL ScAccessibleDataPilotButton::getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException)
+{
+ utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
+ uno::Reference< accessibility::XAccessibleRelationSet > xSet = pRelationSetHelper;
+ if(mxParent.is())
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = mxParent;
+ pRelationSetHelper->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
+ }
+ return xSet;
+
+}
+//-----IAccessibility2 Implementation 2009
///===== XServiceInfo ====================================================
::rtl::OUString SAL_CALL ScAccessibleDataPilotButton::getImplementationName(void)
@@ -685,6 +743,10 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotButton::getImplementationI
::rtl::OUString SAL_CALL ScAccessibleDataPilotButton::createAccessibleDescription(void)
throw (::com::sun::star::uno::RuntimeException)
{
+//IAccessibility2 Implementation 2009-----
+ if (mpFieldWindow)
+ return mpFieldWindow->GetHelpText();
+//-----IAccessibility2 Implementation 2009
return rtl::OUString();
}
@@ -721,3 +783,67 @@ Rectangle ScAccessibleDataPilotButton::GetBoundingBox(void) const
else
return Rectangle();
}
+//IAccessibility2 Implementation 2009-----
+// -----------------------------------------------------------------------------
+// XAccessibleAction
+// -----------------------------------------------------------------------------
+sal_Int32 ScAccessibleDataPilotButton::getAccessibleActionCount( ) throw (uno::RuntimeException)
+{
+ return 1;
+}
+// -----------------------------------------------------------------------------
+sal_Bool ScAccessibleDataPilotButton::doAccessibleAction ( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ throw lang::IndexOutOfBoundsException();
+ return sal_True;
+}
+// -----------------------------------------------------------------------------
+::rtl::OUString ScAccessibleDataPilotButton::getAccessibleActionDescription ( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ throw lang::IndexOutOfBoundsException();
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "press" ) );
+}
+// -----------------------------------------------------------------------------
+::com::sun::star::uno::Reference< XAccessibleKeyBinding > ScAccessibleDataPilotButton::getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ throw lang::IndexOutOfBoundsException();
+ comphelper::OAccessibleKeyBindingHelper* pKeyBindingHelper = new comphelper::OAccessibleKeyBindingHelper();
+ ::com::sun::star::uno::Reference< XAccessibleKeyBinding > xKeyBinding = pKeyBindingHelper;
+ ScPivotFieldWindow* pWindow = mpFieldWindow;
+ if ( pWindow )
+ {
+ awt::KeyStroke aKeyStroke;
+ aKeyStroke.Modifiers = 0;
+ aKeyStroke.KeyCode = KEY_SPACE;
+ pKeyBindingHelper->AddKeyBinding( aKeyStroke );
+ }
+ return xKeyBinding;
+}
+//===== XInterface =====================================================
+uno::Any SAL_CALL ScAccessibleDataPilotButton::queryInterface( uno::Type const & rType )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ uno::Any aAny (ScAccessibleContextBase::queryInterface(rType));
+ if(!aAny.hasValue())
+ {
+ aAny = ::cppu::queryInterface (rType,
+ static_cast<XAccessibleAction*>(this)
+ );
+ }
+ return aAny;
+}
+void SAL_CALL ScAccessibleDataPilotButton::acquire()
+ throw ()
+{
+ ScAccessibleContextBase::acquire();
+}
+void SAL_CALL ScAccessibleDataPilotButton::release()
+ throw ()
+{
+ ScAccessibleContextBase::release();
+}
+//-----IAccessibility2 Implementation 2009
+
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index a25e29feb3b5..a069a787ee64 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -70,9 +70,23 @@
#include <unotools/accessiblerelationsethelper.hxx>
#include <toolkit/helper/convert.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <svx/AccessibleControlShape.hxx>
+#include <svx/AccessibleShape.hxx>
+#include <svx/ShapeTypeHandler.hxx>
+#include <svx/SvxShapeTypes.hxx>
+#include <sfx2/objsh.hxx>
+#include <editeng/editview.hxx>
+#include <editeng/editeng.hxx>
+//-----IAccessibility2 Implementation 2009
#include <list>
#include <algorithm>
+//IAccessibility2 Implementation 2009-----
+#include "AccessibleCell.hxx"
+#include "svx/unoapi.hxx"
+#include "scmod.hxx"
+//-----IAccessibility2 Implementation 2009
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
using ::std::for_each;
@@ -245,6 +259,16 @@ public:
const ::accessibility::AccessibleShapeTreeInfo& _rShapeTreeInfo
) throw (::com::sun::star::uno::RuntimeException);
+//IAccessibility2 Implementation 2009-----
+ virtual ::accessibility::AccessibleControlShape* GetAccControlShapeFromModel
+ (::com::sun::star::beans::XPropertySet* pSet)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>
+ GetAccessibleCaption (const ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape>& xShape)
+ throw (::com::sun::star::uno::RuntimeException);
+//-----IAccessibility2 Implementation 2009
///===== Internal ========================================================
void SetDrawBroadcaster();
@@ -466,6 +490,45 @@ sal_Bool ScChildrenShapes::ReplaceChild (::accessibility::AccessibleShape* pCurr
return bResult;
}
+//IAccessibility2 Implementation 2009-----
+::accessibility::AccessibleControlShape * ScChildrenShapes::GetAccControlShapeFromModel(::com::sun::star::beans::XPropertySet* pSet) throw (::com::sun::star::uno::RuntimeException)
+{
+ sal_Int32 count = GetCount();
+ for (sal_Int32 index=0;index<count;index++)
+ {
+ ScAccessibleShapeData* pShape = maZOrderedShapes[index];
+ if (pShape)
+ {
+ ::accessibility::AccessibleShape* pAccShape = pShape->pAccShape;
+ if (pAccShape && ::accessibility::ShapeTypeHandler::Instance().GetTypeId (pAccShape->GetXShape()) == ::accessibility::DRAWING_CONTROL)
+ {
+ ::accessibility::AccessibleControlShape *pCtlAccShape = static_cast < ::accessibility::AccessibleControlShape* >(pAccShape);
+ if (pCtlAccShape && pCtlAccShape->GetControlModel() == pSet)
+ return pCtlAccShape;
+ }
+ }
+ }
+ return NULL;
+}
+::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible >
+ScChildrenShapes::GetAccessibleCaption (const ::com::sun::star::uno::Reference < ::com::sun::star::drawing::XShape>& xShape)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ sal_Int32 count = GetCount();
+ for (sal_Int32 index=0;index<count;index++)
+ {
+ ScAccessibleShapeData* pShape = maZOrderedShapes[index];
+ if (pShape && pShape->xShape == xShape )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xNewChild( pShape->pAccShape );
+// uno::Reference<XAccessible> xNewChild( pShape->pAccShape , uno::UNO_QUERY );
+ if(xNewChild.get())
+ return xNewChild;
+ }
+ }
+ return NULL;
+}
+//-----IAccessibility2 Implementation 2009
sal_Int32 ScChildrenShapes::GetCount() const
{
SdrPage* pDrawPage = GetDrawPage();
@@ -744,6 +807,9 @@ uno::Reference< XAccessible > ScChildrenShapes::GetSelected(sal_Int32 nSelectedC
std::vector < uno::Reference < drawing::XShape > > aShapes;
FillShapes(aShapes);
+//IAccessibility2 Implementation 2009-----
+ if(aShapes.size()<=0) return xAccessible;
+//-----IAccessibility2 Implementation 2009
SortedShapes::iterator aItr;
if (FindShape(aShapes[nSelectedChildIndex], aItr))
xAccessible = Get(aItr - maZOrderedShapes.begin());
@@ -888,9 +954,20 @@ sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawin
}
else
mnShapesSelected = 0;
+//IAccessibility2 Implementation 2009-----
+ SdrObject *pFocusedObj = NULL;
+ if( mnShapesSelected == 1 && aShapesList.size() == 1)
+ {
+ pFocusedObj = GetSdrObjectFromXShape(aShapesList[0]->xShape);
+ }
+//-----IAccessibility2 Implementation 2009
ScShapeDataLess aLess;
std::sort(aShapesList.begin(), aShapesList.end(), aLess);
-
+//IAccessibility2 Implementation 2009-----
+ SortedShapes vecSelectedShapeAdd;
+ SortedShapes vecSelectedShapeRemove;
+ sal_Bool bHasSelect=sal_False;
+//-----IAccessibility2 Implementation 2009
SortedShapes::iterator aXShapesItr(aShapesList.begin());
SortedShapes::const_iterator aXShapesEndItr(aShapesList.end());
SortedShapes::iterator aDataItr(maZOrderedShapes.begin());
@@ -915,9 +992,18 @@ sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawin
(*aDataItr)->pAccShape->SetState(AccessibleStateType::SELECTED);
(*aDataItr)->pAccShape->ResetState(AccessibleStateType::FOCUSED);
bResult = sal_True;
+//IAccessibility2 Implementation 2009-----
+ vecSelectedShapeAdd.push_back((*aDataItr));
+//-----IAccessibility2 Implementation 2009
}
aFocusedItr = aDataItr;
}
+//IAccessibility2 Implementation 2009-----
+ else
+ {
+ bHasSelect = sal_True;
+ }
+//-----IAccessibility2 Implementation 2009
++aDataItr;
++aXShapesItr;
}
@@ -931,6 +1017,9 @@ sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawin
(*aDataItr)->pAccShape->ResetState(AccessibleStateType::SELECTED);
(*aDataItr)->pAccShape->ResetState(AccessibleStateType::FOCUSED);
bResult = sal_True;
+//IAccessibility2 Implementation 2009-----
+ vecSelectedShapeRemove.push_back(*aDataItr);
+//-----IAccessibility2 Implementation 2009
}
}
++aDataItr;
@@ -945,9 +1034,124 @@ sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawin
else
++aDataItr;
}
- if ((aFocusedItr != aDataEndItr) && (*aFocusedItr)->pAccShape && (mnShapesSelected == 1))
+//IAccessibility2 Implementation 2009-----
+ bool bWinFocus=false;
+ ScGridWindow* pWin = static_cast<ScGridWindow*>(mpViewShell->GetWindowByPos(meSplitPos));
+ if (pWin)
+ {
+ bWinFocus = pWin->HasFocus();
+ }
+
+ SdrObject* pMarkedObj = NULL;
+ SdrObject* pUpObj = NULL;
+ bool bIsFocuseMarked = true;
+
+ if( mpViewShell && mnShapesSelected == 1 && bWinFocus)
+ {
+ ScDrawView* pScDrawView = mpViewShell->GetViewData()->GetScDrawView();
+
+ if(pScDrawView)
+ {
+ pMarkedObj = pScDrawView->getSelectedIfSingle();
+
+ if(pMarkedObj)
+ {
+ uno::Reference< drawing::XShape > xMarkedXShape (pMarkedObj->getUnoShape(), uno::UNO_QUERY);
+ if( aFocusedItr != aDataEndItr &&
+ (*aFocusedItr)->xShape.is() &&
+ xMarkedXShape.is() &&
+ (*aFocusedItr)->xShape != xMarkedXShape )
+ bIsFocuseMarked = false;
+ }
+ }
+ }
+ //if ((aFocusedItr != aDataEndItr) && (*aFocusedItr)->pAccShape && (mnShapesSelected == 1))
+ if ( bIsFocuseMarked && (aFocusedItr != aDataEndItr) && (*aFocusedItr)->pAccShape && (mnShapesSelected == 1) && bWinFocus)
+ {
(*aFocusedItr)->pAccShape->SetState(AccessibleStateType::FOCUSED);
+ }
+ else if( pFocusedObj && bWinFocus && pMarkedObj && mnShapesSelected == 1 )
+ {
+ if( pMarkedObj )
+ {
+ uno::Reference< drawing::XShape > xMarkedXShape (pMarkedObj->getUnoShape(), uno::UNO_QUERY);
+ pUpObj = pMarkedObj->GetParentSdrObject();
+ if( pMarkedObj == pFocusedObj )
+ {
+ if( pUpObj )
+ {
+ uno::Reference< drawing::XShape > xUpGroupXShape (pUpObj->getUnoShape(), uno::UNO_QUERY);
+ uno::Reference < XAccessible > xAccGroupShape =
+ const_cast<ScChildrenShapes*>(this)->GetAccessibleCaption( xUpGroupXShape );
+ if( xAccGroupShape.is() )
+ {
+ ::accessibility::AccessibleShape* pAccGroupShape =
+ static_cast< ::accessibility::AccessibleShape* >(xAccGroupShape.get());
+ if( pAccGroupShape )
+ {
+ sal_Int32 nCount = pAccGroupShape->getAccessibleChildCount();
+ for( sal_Int32 i = 0; i < nCount; i++ )
+ {
+ uno::Reference<XAccessible> xAccShape = pAccGroupShape->getAccessibleChild(i);
+ if (xAccShape.is())
+ {
+ ::accessibility::AccessibleShape* pChildAccShape = static_cast< ::accessibility::AccessibleShape* >(xAccShape.get());
+ uno::Reference< drawing::XShape > xChildShape = pChildAccShape->GetXShape();
+ if (xChildShape == xMarkedXShape)
+ {
+ pChildAccShape->SetState(AccessibleStateType::FOCUSED);
+ }
+ else
+ {
+ pChildAccShape->ResetState(AccessibleStateType::FOCUSED);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if (vecSelectedShapeAdd.size() >= 10 )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_WITHIN;
+ aEvent.Source = uno::Reference< XAccessible >(mpAccessibleDocument);
+ mpAccessibleDocument->CommitChange(aEvent);
+ }
+ else
+ {
+ SortedShapes::iterator vi = vecSelectedShapeAdd.begin();
+ for (; vi != vecSelectedShapeAdd.end() ; ++vi )
+ {
+ AccessibleEventObject aEvent;
+ if (bHasSelect)
+ {
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_ADD;
+ }
+ else
+ {
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
+ }
+ aEvent.Source = uno::Reference< XAccessible >(mpAccessibleDocument);
+ uno::Reference< XAccessible > xChild( (*vi)->pAccShape);
+ aEvent.NewValue <<= xChild;
+ mpAccessibleDocument->CommitChange(aEvent);
+ }
+ }
+ SortedShapes::iterator vi = vecSelectedShapeRemove.begin();
+ for (; vi != vecSelectedShapeRemove.end() ; ++vi )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_REMOVE;
+ aEvent.Source = uno::Reference< XAccessible >(mpAccessibleDocument);
+ uno::Reference< XAccessible > xChild( (*vi)->pAccShape);
+ aEvent.NewValue <<= xChild;
+ mpAccessibleDocument->CommitChange(aEvent);
+ }
+//-----IAccessibility2 Implementation 2009
std::for_each(aShapesList.begin(), aShapesList.end(), Destroy());
return bResult;
@@ -1363,12 +1567,32 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if (rScAccGridWinFocusGotHint->GetNewGridWin() == meSplitPos)
{
+//IAccessibility2 Implementation 2009-----
+ uno::Reference<XAccessible> xAccessible;
+ if (mpChildrenShapes)
+ {
+ sal_Bool bTabMarked(IsTableSelected());
+ xAccessible = mpChildrenShapes->GetSelected(0, bTabMarked);
+ }
+ if( xAccessible.is() )
+ {
+ uno::Any aNewValue;
+ aNewValue<<=AccessibleStateType::FOCUSED;
+ static_cast< ::accessibility::AccessibleShape* >(xAccessible.get())->
+ CommitChange(AccessibleEventId::STATE_CHANGED,
+ aNewValue,
+ uno::Any() );
+ }
+ else
+ {
if (mxTempAcc.is() && mpTempAccEdit)
mpTempAccEdit->GotFocus();
else if (mpAccessibleSpreadsheet)
mpAccessibleSpreadsheet->GotFocus();
else
CommitFocusGained();
+ }
+//-----IAccessibility2 Implementation 2009
}
}
else
@@ -1390,11 +1614,18 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
mpChildrenShapes = new ScChildrenShapes( this, mpViewShell, meSplitPos );
}
-
+//IAccessibility2 Implementation 2009-----
+ //Invoke Init() to rebuild the mpChildrenShapes variable
+ this->Init();
+//-----IAccessibility2 Implementation 2009
AccessibleEventObject aEvent;
aEvent.EventId = AccessibleEventId::INVALIDATE_ALL_CHILDREN;
aEvent.Source = uno::Reference< XAccessibleContext >(this);
CommitChange(aEvent); // all childs changed
+//IAccessibility2 Implementation 2009-----
+ if (mpAccessibleSpreadsheet)
+ mpAccessibleSpreadsheet->FireFirstCellFocus();
+//-----IAccessibility2 Implementation 2009
}
else if (pSfxSimpleHint->GetId() == SC_HINT_ACC_MAKEDRAWLAYER)
{
@@ -1405,19 +1636,25 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if (mpViewShell && mpViewShell->GetViewData()->HasEditView(meSplitPos))
{
- mpTempAccEdit = new ScAccessibleEditObject(this, mpViewShell->GetViewData()->GetEditView(meSplitPos),
- mpViewShell->GetWindowByPos(meSplitPos), GetCurrentCellName(),
- rtl::OUString(String(ScResId(STR_ACC_EDITLINE_DESCR))), CellInEditMode);
- uno::Reference<XAccessible> xAcc = mpTempAccEdit;
+ //IAccessibility2 Implementation 2009------
+ EditEngine* pEditEng = mpViewShell->GetViewData()->GetEditView(meSplitPos)->GetEditEngine();
+ if (pEditEng && pEditEng->GetUpdateMode())
+ {
+ mpTempAccEdit = new ScAccessibleEditObject(this, mpViewShell->GetViewData()->GetEditView(meSplitPos),
+ mpViewShell->GetWindowByPos(meSplitPos), GetCurrentCellName(),
+ rtl::OUString(String(ScResId(STR_ACC_EDITLINE_DESCR))), CellInEditMode);
+ uno::Reference<XAccessible> xAcc = mpTempAccEdit;
- AddChild(xAcc, sal_True);
+ AddChild(xAcc, sal_True);
- if (mpAccessibleSpreadsheet)
- mpAccessibleSpreadsheet->LostFocus();
- else
- CommitFocusLost();
+ if (mpAccessibleSpreadsheet)
+ mpAccessibleSpreadsheet->LostFocus();
+ else
+ CommitFocusLost();
- mpTempAccEdit->GotFocus();
+ mpTempAccEdit->GotFocus();
+ }
+ //------IAccessibility2 Implementation 2009
}
}
else if (pSfxSimpleHint->GetId() == SC_HINT_ACC_LEAVEEDITMODE)
@@ -1429,10 +1666,15 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
mpTempAccEdit = NULL;
RemoveChild(mxTempAcc, sal_True);
-
- if (mpAccessibleSpreadsheet)
+//IAccessibility2 Implementation 2009-----
+ //if (mpAccessibleSpreadsheet)
+ if (mpAccessibleSpreadsheet && mpViewShell->IsActive())
+//-----IAccessibility2 Implementation 2009
mpAccessibleSpreadsheet->GotFocus();
- else
+//IAccessibility2 Implementation 2009-----
+ //else
+ else if( mpViewShell->IsActive())
+//-----IAccessibility2 Implementation 2009
CommitFocusGained();
}
}
@@ -1495,6 +1737,12 @@ void SAL_CALL ScAccessibleDocument::selectionChanged( const lang::EventObject& /
CommitChange(aEvent);
}
+//IAccessibility2 Implementation 2009-----
+ if(mpChildrenShapes )
+ {
+ mpChildrenShapes->SelectionChanged();
+ }
+//-----IAccessibility2 Implementation 2009
}
//===== XInterface =====================================================
@@ -1502,6 +1750,15 @@ void SAL_CALL ScAccessibleDocument::selectionChanged( const lang::EventObject& /
uno::Any SAL_CALL ScAccessibleDocument::queryInterface( uno::Type const & rType )
throw (uno::RuntimeException)
{
+//IAccessibility2 Implementation 2009-----
+ uno::Any aAnyTmp;
+ if(rType == ::getCppuType((com::sun::star::uno::Reference<XAccessibleGetAccFlowTo> *)NULL) )
+ {
+ com::sun::star::uno::Reference<XAccessibleGetAccFlowTo> AccFromXShape = this;
+ aAnyTmp <<= AccFromXShape;
+ return aAnyTmp;
+ }
+//-----IAccessibility2 Implementation 2009
uno::Any aAny (ScAccessibleDocumentImpl::queryInterface(rType));
return aAny.hasValue() ? aAny : ScAccessibleContextBase::queryInterface(rType);
}
@@ -1653,6 +1910,37 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
return pStateSet;
}
+//IAccessibility2 Implementation 2009-----
+::rtl::OUString SAL_CALL
+ ScAccessibleDocument::getAccessibleName(void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ rtl::OUString sName = String(ScResId(STR_ACC_DOC_SPREADSHEET));
+ ScDocument* pScDoc = GetDocument();
+ if ( pScDoc )
+ {
+ rtl::OUString sFileName = pScDoc->getDocAccTitle();
+ if ( !sFileName.getLength() )
+ {
+ SfxObjectShell* pObjSh = pScDoc->GetDocumentShell();
+ if ( pObjSh )
+ {
+ sFileName = pObjSh->GetTitle( SFX_TITLE_APINAME );
+ }
+ }
+ rtl::OUString sReadOnly;
+ if (pScDoc->getDocReadOnly())
+ {
+ sReadOnly = String(ScResId(STR_ACC_DOC_SPREADSHEET_READONLY));
+ }
+ if ( sFileName.getLength() )
+ {
+ sName = sFileName + sReadOnly + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - ")) + sName;
+ }
+ }
+ return sName;
+}
+//-----IAccessibility2 Implementation 2009
///===== XAccessibleSelection ===========================================
void SAL_CALL
@@ -2125,3 +2413,202 @@ rtl::OUString ScAccessibleDocument::GetCurrentCellDescription() const
{
return rtl::OUString();
}
+//IAccessibility2 Implementation 2009-----
+ScDocument *ScAccessibleDocument::GetDocument() const
+{
+ return mpViewShell ? mpViewShell->GetViewData()->GetDocument() : NULL;
+}
+ScAddress ScAccessibleDocument::GetCurCellAddress() const
+{
+ return mpViewShell ? mpViewShell->GetViewData()->GetCurPos() :ScAddress();
+}
+uno::Any SAL_CALL ScAccessibleDocument::getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+
+ uno::Any anyAtrribute;
+
+ rtl::OUString sName;
+ rtl::OUString sValue;
+ sal_uInt16 sheetIndex;
+ String sSheetName;
+ sheetIndex = getVisibleTable();
+ if(GetDocument()==NULL)
+ return anyAtrribute;
+ GetDocument()->GetName(sheetIndex,sSheetName);
+ sName = rtl::OUString::createFromAscii("page-name:");
+ sValue = sName + sSheetName ;
+ sName = rtl::OUString::createFromAscii(";page-number:");
+ sValue += sName;
+ sValue += String::CreateFromInt32(sheetIndex+1) ;
+ sName = rtl::OUString::createFromAscii(";total-pages:");
+ sValue += sName;
+ sValue += String::CreateFromInt32(GetDocument()->GetTableCount());
+ sValue += rtl::OUString::createFromAscii(";");
+ anyAtrribute <<= sValue;
+ return anyAtrribute;
+}
+com::sun::star::uno::Sequence< com::sun::star::uno::Any > ScAccessibleDocument::GetScAccFlowToSequence()
+{
+ if ( getAccessibleChildCount() )
+ {
+ uno::Reference < XAccessible > xSCTableAcc = getAccessibleChild( 0 ); // table
+ if ( xSCTableAcc.is() )
+ {
+ uno::Reference < XAccessibleSelection > xAccSelection( xSCTableAcc, uno::UNO_QUERY );
+ sal_Int32 nSelCount = xAccSelection->getSelectedAccessibleChildCount();
+ if( nSelCount )
+ {
+ uno::Reference < XAccessible > xSel = xAccSelection->getSelectedAccessibleChild( 0 ); // selected cell
+ if ( xSel.is() )
+ {
+ uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() );
+ if ( xSelContext.is() )
+ {
+ if ( xSelContext->getAccessibleRole() == AccessibleRole::TABLE_CELL )
+ {
+ sal_Int32 nParaCount = 0;
+ uno::Sequence <uno::Any> aSequence(nSelCount);
+ for ( sal_Int32 i = 0; i < nSelCount; i++ )
+ {
+ xSel = xAccSelection->getSelectedAccessibleChild( i ) ;
+ if ( xSel.is() )
+ {
+ xSelContext = xSel->getAccessibleContext();
+ if ( xSelContext.is() )
+ {
+ if ( xSelContext->getAccessibleRole() == AccessibleRole::TABLE_CELL )
+ {
+ aSequence[nParaCount] = uno::makeAny( xSel );
+ nParaCount++;
+ }
+ }
+ }
+ }
+ return aSequence;
+ }
+ }
+ }
+ }
+ }
+ }
+ uno::Sequence <uno::Any> aEmpty;
+ return aEmpty;
+}
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+ SAL_CALL ScAccessibleDocument::get_AccFlowTo(const ::com::sun::star::uno::Any& rAny, sal_Int32 nType)
+ throw ( ::com::sun::star::uno::RuntimeException )
+{
+ const sal_Int32 SPELLCHECKFLOWTO = 1;
+ const sal_Int32 FINDREPLACEFLOWTO = 2;
+ if ( nType == SPELLCHECKFLOWTO )
+ {
+ uno::Reference< ::com::sun::star::drawing::XShape > xShape;
+ rAny >>= xShape;
+ if ( xShape.is() )
+ {
+ uno::Reference < XAccessible > xAcc = mpChildrenShapes->GetAccessibleCaption(xShape);
+ uno::Reference < XAccessibleSelection > xAccSelection( xAcc, uno::UNO_QUERY );
+ if ( xAccSelection.is() )
+ {
+ if ( xAccSelection->getSelectedAccessibleChildCount() )
+ {
+ uno::Reference < XAccessible > xSel = xAccSelection->getSelectedAccessibleChild( 0 );
+ if ( xSel.is() )
+ {
+ uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() );
+ if ( xSelContext.is() )
+ {
+ //if in sw we find the selected paragraph here
+ if ( xSelContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
+ {
+ uno::Sequence<uno::Any> aRet( 1 );
+ aRet[0] = uno::makeAny( xSel );
+ return aRet;
+ }
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ if ( getSelectedAccessibleChildCount() )
+ {
+ uno::Reference < XAccessible > xSel = getSelectedAccessibleChild( 0 );
+ if ( xSel.is() )
+ {
+ uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() );
+ if ( xSelContext.is() )
+ {
+ uno::Reference < XAccessibleSelection > xAccChildSelection( xSel, uno::UNO_QUERY );
+ if ( xAccChildSelection.is() )
+ {
+ if ( xAccChildSelection->getSelectedAccessibleChildCount() )
+ {
+ uno::Reference < XAccessible > xChildSel = xAccChildSelection->getSelectedAccessibleChild( 0 );
+ if ( xChildSel.is() )
+ {
+ uno::Reference < ::com::sun::star::accessibility::XAccessibleContext > xChildSelContext( xChildSel->getAccessibleContext() );
+ if ( xChildSelContext.is() &&
+ xChildSelContext->getAccessibleRole() == ::com::sun::star::accessibility::AccessibleRole::PARAGRAPH )
+ {
+ uno::Sequence<uno::Any> aRet( 1 );
+ aRet[0] = uno::makeAny( xChildSel );
+ return aRet;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ else if ( nType == FINDREPLACEFLOWTO )
+ {
+ sal_Bool bSuccess;
+ rAny >>= bSuccess;
+ if ( bSuccess )
+ {
+ uno::Sequence< uno::Any> aSeq = GetScAccFlowToSequence();
+ if ( aSeq.getLength() )
+ {
+ return aSeq;
+ }
+ else if( mpAccessibleSpreadsheet )
+ {
+ uno::Reference < XAccessible > xFindCellAcc = mpAccessibleSpreadsheet->GetActiveCell();
+ // add xFindCellAcc to the return the Sequence
+ uno::Sequence< uno::Any> aSeq2(1);
+ aSeq2[0] = uno::makeAny( xFindCellAcc );
+ return aSeq2;
+ }
+ }
+ }
+ uno::Sequence< uno::Any> aEmpty;
+ return aEmpty;
+}
+void ScAccessibleDocument::SwitchViewFireFocus()
+{
+ if (mpAccessibleSpreadsheet)
+ {
+ mpAccessibleSpreadsheet->FireFirstCellFocus();
+ }
+}
+
+sal_Int32 SAL_CALL ScAccessibleDocument::getForeground( )
+ throw (uno::RuntimeException)
+{
+ return COL_BLACK;
+}
+
+sal_Int32 SAL_CALL ScAccessibleDocument::getBackground( )
+ throw (uno::RuntimeException)
+{
+ ScUnoGuard aGuard;
+ IsObjectValid();
+ return SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor;
+}
+//-----IAccessibility2 Implementation 2009
+
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx b/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx
index 605dc6f6464b..90b38dd5e52f 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx
@@ -45,3 +45,10 @@ ScAccessibleDocumentBase::ScAccessibleDocumentBase(
ScAccessibleDocumentBase::~ScAccessibleDocumentBase(void)
{
}
+//IAccessibility2 Implementation 2009-----
+void ScAccessibleDocumentBase::SwitchViewFireFocus()
+{
+ CommitFocusGained();
+}
+//-----IAccessibility2 Implementation 2009
+
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 8fb01e9ea61b..82502b13d83f 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1902,6 +1902,35 @@ ScShapeChilds* ScAccessibleDocumentPagePreview::GetShapeChilds()
return mpShapeChilds;
}
+//IAccessibility2 Implementation 2009-----
+::rtl::OUString ScAccessibleDocumentPagePreview::getAccessibleName(void)
+throw (::com::sun::star::uno::RuntimeException)
+{
+ rtl::OUString sName = String(ScResId(STR_ACC_DOC_SPREADSHEET));
+ ScDocument* pScDoc = mpViewShell->GetDocument();
+ if ( pScDoc )
+ {
+ rtl::OUString sFileName = pScDoc->getDocAccTitle();
+ if ( !sFileName.getLength() )
+ {
+ SfxObjectShell* pObjSh = pScDoc->GetDocumentShell();
+ if ( pObjSh )
+ {
+ sFileName = pObjSh->GetTitle( SFX_TITLE_APINAME );
+ }
+ }
+ if ( sFileName.getLength() )
+ {
+ sName = sFileName + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - ")) + sName;
+ sName += String(ScResId(STR_ACC_DOC_PREVIEW_SUFFIX));
+
+ }
+ }
+
+ return sName;
+}
+//-----IAccessibility2 Implementation 2009=======
+
//UNUSED2009-05 uno::Reference < XAccessible > ScAccessibleDocumentPagePreview::GetCurrentAccessibleTable()
//UNUSED2009-05 {
//UNUSED2009-05 if (!mpTable)
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index a8d9007e3393..8073dfda3aae 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -44,10 +44,23 @@
#include <rtl/uuid.h>
#include <tools/debug.hxx>
#include <svx/AccessibleTextHelper.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
+#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <editeng/editview.hxx>
#include <editeng/editeng.hxx>
#include <svx/svdmodel.hxx>
-
+#include <sfx2/objsh.hxx>
+
+#include "unonames.hxx"
+#include "document.hxx"
+#include "AccessibleDocument.hxx"
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#include <unotools/accessiblerelationsethelper.hxx>
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+using ::com::sun::star::lang::IndexOutOfBoundsException;
+using ::com::sun::star::uno::RuntimeException;
+//-----IAccessibility2 Implementation 2009
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -68,6 +81,23 @@ ScAccessibleEditObject::ScAccessibleEditObject(
CreateTextHelper();
SetName(rName);
SetDescription(rDescription);
+//IAccessibility2 Implementation 2009-----
+ if( meObjectType == CellInEditMode)
+ {
+ const ScAccessibleDocument *pAccDoc = const_cast<ScAccessibleDocument*>(static_cast<ScAccessibleDocument*>(rxParent.get())) ;
+ if (pAccDoc)
+ {
+ m_pScDoc = pAccDoc->GetDocument();
+ m_curCellAddress =pAccDoc->GetCurCellAddress();
+ }
+ else
+ {
+ m_pScDoc=NULL;
+ }
+ }
+ else
+ m_pScDoc=NULL;
+//-----IAccessibility2 Implementation 2009
}
ScAccessibleEditObject::~ScAccessibleEditObject()
@@ -106,6 +136,33 @@ void ScAccessibleEditObject::GotFocus()
mpTextHelper->SetFocus(sal_True);
}
+//IAccessibility2 Implementation 2009-----
+//===== XInterface ==========================================================
+
+com::sun::star::uno::Any SAL_CALL
+ ScAccessibleEditObject::queryInterface (const com::sun::star::uno::Type & rType)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Any aReturn = ScAccessibleContextBase::queryInterface (rType);
+ if ( ! aReturn.hasValue())
+ aReturn = ::cppu::queryInterface (rType,
+ static_cast< ::com::sun::star::accessibility::XAccessibleSelection* >(this)
+ );
+ return aReturn;
+}
+void SAL_CALL
+ ScAccessibleEditObject::acquire (void)
+ throw ()
+{
+ ScAccessibleContextBase::acquire ();
+}
+void SAL_CALL
+ ScAccessibleEditObject::release (void)
+ throw ()
+{
+ ScAccessibleContextBase::release ();
+}
+//-----IAccessibility2 Implementation 2009
//===== XAccessibleComponent ============================================
uno::Reference< XAccessible > SAL_CALL ScAccessibleEditObject::getAccessibleAtPoint(
@@ -350,4 +407,153 @@ void ScAccessibleEditObject::CreateTextHelper()
}
}
}
+//IAccessibility2 Implementation 2009-----
+sal_Int32 SAL_CALL ScAccessibleEditObject::getForeground( )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ return GetFgBgColor(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CCOLOR)));
+}
+
+sal_Int32 SAL_CALL ScAccessibleEditObject::getBackground( )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ return GetFgBgColor(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CELLBACK)));
+}
+sal_Int32 ScAccessibleEditObject::GetFgBgColor( const rtl::OUString &strPropColor)
+{
+ ScUnoGuard aGuard;
+ sal_Int32 nColor(0);
+ if (m_pScDoc)
+ {
+ SfxObjectShell* pObjSh = m_pScDoc->GetDocumentShell();
+ if ( pObjSh )
+ {
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( pObjSh->GetModel(), uno::UNO_QUERY );
+ if ( xSpreadDoc.is() )
+ {
+ uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
+ uno::Reference<container::XIndexAccess> xIndex( xSheets, uno::UNO_QUERY );
+ if ( xIndex.is() )
+ {
+ uno::Any aTable = xIndex->getByIndex(m_curCellAddress.Tab());
+ uno::Reference<sheet::XSpreadsheet> xTable;
+ if (aTable>>=xTable)
+ {
+ uno::Reference<table::XCell> xCell = xTable->getCellByPosition(m_curCellAddress.Col(), m_curCellAddress.Row());
+ if (xCell.is())
+ {
+ uno::Reference<beans::XPropertySet> xCellProps(xCell, uno::UNO_QUERY);
+ if (xCellProps.is())
+ {
+ uno::Any aAny = xCellProps->getPropertyValue(strPropColor);
+ aAny >>= nColor;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return nColor;
+}
+//===== XAccessibleSelection ============================================
+//--------------------------------------------------------------------------------
+void SAL_CALL ScAccessibleEditObject::selectAccessibleChild( sal_Int32 )
+throw ( IndexOutOfBoundsException, RuntimeException )
+{
+}
+//----------------------------------------------------------------------------------
+sal_Bool SAL_CALL ScAccessibleEditObject::isAccessibleChildSelected( sal_Int32 nChildIndex )
+throw ( IndexOutOfBoundsException,
+ RuntimeException )
+{
+ uno::Reference<XAccessible> xAcc = getAccessibleChild( nChildIndex );
+ uno::Reference<XAccessibleContext> xContext;
+ if( xAcc.is() )
+ xContext = xAcc->getAccessibleContext();
+ if( xContext.is() )
+ {
+ if( xContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
+ {
+ uno::Reference< ::com::sun::star::accessibility::XAccessibleText >
+ xText(xAcc, uno::UNO_QUERY);
+ if( xText.is() )
+ {
+ if( xText->getSelectionStart() >= 0 ) return sal_True;
+ }
+ }
+ }
+ return sal_False;
+}
+//---------------------------------------------------------------------
+void SAL_CALL ScAccessibleEditObject::clearAccessibleSelection( )
+throw ( RuntimeException )
+{
+}
+//-------------------------------------------------------------------------
+void SAL_CALL ScAccessibleEditObject::selectAllAccessibleChildren( )
+throw ( RuntimeException )
+{
+}
+//----------------------------------------------------------------------------
+sal_Int32 SAL_CALL ScAccessibleEditObject::getSelectedAccessibleChildCount()
+throw ( RuntimeException )
+{
+ sal_Int32 nCount = 0;
+ sal_Int32 TotalCount = getAccessibleChildCount();
+ for( sal_Int32 i = 0; i < TotalCount; i++ )
+ if( isAccessibleChildSelected(i) ) nCount++;
+ return nCount;
+}
+//--------------------------------------------------------------------------------------
+uno::Reference<XAccessible> SAL_CALL ScAccessibleEditObject::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
+throw ( IndexOutOfBoundsException, RuntimeException)
+{
+ if ( nSelectedChildIndex > getSelectedAccessibleChildCount() )
+ throw IndexOutOfBoundsException();
+ sal_Int32 i1, i2;
+ for( i1 = 0, i2 = 0; i1 < getAccessibleChildCount(); i1++ )
+ if( isAccessibleChildSelected(i1) )
+ {
+ if( i2 == nSelectedChildIndex )
+ return getAccessibleChild( i1 );
+ i2++;
+ }
+ return uno::Reference<XAccessible>();
+}
+//----------------------------------------------------------------------------------
+void SAL_CALL ScAccessibleEditObject::deselectAccessibleChild(
+ sal_Int32 )
+ throw ( IndexOutOfBoundsException,
+ RuntimeException )
+{
+}
+uno::Reference< XAccessibleRelationSet > ScAccessibleEditObject::getAccessibleRelationSet( )
+ throw (uno::RuntimeException)
+{
+ ScUnoGuard aGuard;
+ Window* pWindow = mpWindow;
+ utl::AccessibleRelationSetHelper* rRelationSet = new utl::AccessibleRelationSetHelper;
+ uno::Reference< XAccessibleRelationSet > rSet = rRelationSet;
+ if ( pWindow )
+ {
+ Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
+ if ( pLabeledBy && pLabeledBy != pWindow )
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = pLabeledBy->GetAccessible();
+ rRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::LABELED_BY, aSequence ) );
+ }
+ Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf();
+ if ( pMemberOf && pMemberOf != pWindow )
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = pMemberOf->GetAccessible();
+ rRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::MEMBER_OF, aSequence ) );
+ }
+ return rSet;
+ }
+ return uno::Reference< XAccessibleRelationSet >();
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 1bfb282a380c..571f19832b39 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -50,12 +50,212 @@
#include <tools/debug.hxx>
#include <tools/gen.hxx>
#include <svtools/colorcfg.hxx>
-
+//IAccessibility2 Implementation 2009-----
+#include "scresid.hxx"
+#include "sc.hrc"
+//-----IAccessibility2 Implementation 2009
#include <algorithm>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
+//IAccessibility2 Implementation 2009-----
+bool CompMinCol(const std::pair<sal_uInt16,sal_uInt16> & pc1,const std::pair<sal_uInt16,sal_uInt16> &pc2)
+{
+ return pc1.first < pc2.first;
+}
+ScMyAddress ScAccessibleSpreadsheet::CalcScAddressFromRangeList(ScRangeList *pMarkedRanges,sal_Int32 nSelectedChildIndex)
+{
+ if (pMarkedRanges->Count() <= 1)
+ {
+ ScRange* pRange = pMarkedRanges->First();
+ if (pRange)
+ {
+ // MT IA2: Not used.
+ // const int nRowNum = pRange->aEnd.Row() - pRange->aStart.Row() + 1;
+ const int nColNum = pRange->aEnd.Col() - pRange->aStart.Col() + 1;
+ const int nCurCol = nSelectedChildIndex % nColNum;
+ const int nCurRow = (nSelectedChildIndex - nCurCol)/nColNum;
+ return ScMyAddress(static_cast<SCCOL>(pRange->aStart.Col() + nCurCol), pRange->aStart.Row() + nCurRow, maActiveCell.Tab());
+ }
+ }
+ else
+ {
+ sal_Int32 nMinRow = MAXROW;
+ sal_Int32 nMaxRow = 0;
+ m_vecTempRange.clear();
+ ScRange* pRange = pMarkedRanges->First();
+ while (pRange)
+ {
+ if (pRange->aStart.Tab() != pRange->aEnd.Tab())
+ {
+ if ((maActiveCell.Tab() >= pRange->aStart.Tab()) ||
+ maActiveCell.Tab() <= pRange->aEnd.Tab())
+ {
+ m_vecTempRange.push_back(pRange);
+ nMinRow = std::min(pRange->aStart.Row(),nMinRow);
+ nMaxRow = std::max(pRange->aEnd.Row(),nMaxRow);
+ }
+ else
+ DBG_ERROR("Range of wrong table");
+ }
+ else if(pRange->aStart.Tab() == maActiveCell.Tab())
+ {
+ m_vecTempRange.push_back(pRange);
+ nMinRow = std::min(pRange->aStart.Row(),nMinRow);
+ nMaxRow = std::max(pRange->aEnd.Row(),nMaxRow);
+ }
+ else
+ DBG_ERROR("Range of wrong table");
+ pRange = pMarkedRanges->Next();
+ }
+ int nCurrentIndex = 0 ;
+ for(sal_Int32 row = nMinRow ; row <= nMaxRow ; ++row)
+ {
+ m_vecTempCol.clear();
+ {
+ VEC_RANGE::const_iterator vi = m_vecTempRange.begin();
+ for (; vi < m_vecTempRange.end(); ++vi)
+ {
+ ScRange *p = *vi;
+ if ( row >= p->aStart.Row() && row <= p->aEnd.Row())
+ {
+ m_vecTempCol.push_back(std::make_pair(p->aStart.Col(),p->aEnd.Col()));
+ }
+ }
+ }
+ std::sort(m_vecTempCol.begin(),m_vecTempCol.end(),CompMinCol);
+ {
+ VEC_COL::const_iterator vic = m_vecTempCol.begin();
+ for(; vic != m_vecTempCol.end(); ++vic)
+ {
+ const PAIR_COL &pariCol = *vic;
+ sal_uInt16 nCol = pariCol.second - pariCol.first + 1;
+ if (nCol + nCurrentIndex > nSelectedChildIndex)
+ {
+ return ScMyAddress(static_cast<SCCOL>(pariCol.first + nSelectedChildIndex - nCurrentIndex), row, maActiveCell.Tab());
+ }
+ nCurrentIndex += nCol;
+ }
+ }
+ }
+ }
+ return ScMyAddress(0,0,maActiveCell.Tab());
+}
+sal_Bool ScAccessibleSpreadsheet::CalcScRangeDifferenceMax(ScRange *pSrc,ScRange *pDest,int nMax,VEC_MYADDR &vecRet,int &nSize)
+{
+ //Src Must be :Src > Dest
+ if (pDest->In(*pSrc))
+ {//Here is Src In Dest,Src <= Dest
+ return sal_False;
+ }
+ if (!pDest->Intersects(*pSrc))
+ {
+ int nCellCount = sal_uInt32(pDest->aEnd.Col() - pDest->aStart.Col() + 1)
+ * sal_uInt32(pDest->aEnd.Row() - pDest->aStart.Row() + 1)
+ * sal_uInt32(pDest->aEnd.Tab() - pDest->aStart.Tab() + 1);
+ if (nCellCount + nSize > nMax)
+ {
+ return sal_True;
+ }
+ else if(nCellCount > 0)
+ {
+ nCellCount +=nSize;
+ for (sal_Int32 row = pDest->aStart.Row(); row <= pDest->aEnd.Row();++row)
+ {
+ for (sal_uInt16 col = pDest->aStart.Col(); col <= pDest->aEnd.Col();++col)
+ {
+ vecRet.push_back(ScMyAddress(col,row,pDest->aStart.Tab()));
+ }
+ }
+ }
+ return sal_False;
+ }
+ sal_Int32 nMinRow = pSrc->aStart.Row();
+ sal_Int32 nMaxRow = pSrc->aEnd.Row();
+ for (; nMinRow <= nMaxRow ; ++nMinRow,--nMaxRow)
+ {
+ for (sal_uInt16 col = pSrc->aStart.Col(); col <= pSrc->aEnd.Col();++col)
+ {
+ if (nSize > nMax)
+ {
+ return sal_True;
+ }
+ ScMyAddress cell(col,nMinRow,pSrc->aStart.Tab());
+ if(!pDest->In(cell))
+ {//In Src ,Not In Dest
+ vecRet.push_back(cell);
+ ++nSize;
+ }
+ }
+ if (nMinRow != nMaxRow)
+ {
+ for (sal_uInt16 col = pSrc->aStart.Col(); col <= pSrc->aEnd.Col();++col)
+ {
+ if (nSize > nMax)
+ {
+ return sal_True;
+ }
+ ScMyAddress cell(col,nMaxRow,pSrc->aStart.Tab());
+ if(!pDest->In(cell))
+ {//In Src ,Not In Dest
+ vecRet.push_back(cell);
+ ++nSize;
+ }
+ }
+ }
+ }
+ return sal_False;
+}
+//In Src , Not in Dest
+sal_Bool ScAccessibleSpreadsheet::CalcScRangeListDifferenceMax(ScRangeList *pSrc,ScRangeList *pDest,int nMax,VEC_MYADDR &vecRet)
+{
+ if (pSrc == NULL || pDest == NULL)
+ {
+ return sal_False;
+ }
+ int nSize =0;
+ if (pDest->GetCellCount() == 0)//if the Dest Rang List is empty
+ {
+ if (pSrc->GetCellCount() > sal_uInt32(nMax))//if the Src Cell count is greater then nMax
+ {
+ return sal_True;
+ }
+ //now the cell count is less then nMax
+ vecRet.reserve(10);
+ ScRange* pRange = pSrc->First();
+ while (pRange)
+ {
+ for (sal_Int32 row = pRange->aStart.Row(); row <= pRange->aEnd.Row();++row)
+ {
+ for (sal_uInt16 col = pRange->aStart.Col(); col <= pRange->aEnd.Col();++col)
+ {
+ vecRet.push_back(ScMyAddress(col,row,pRange->aStart.Tab()));
+ }
+ }
+ pRange = pSrc->Next();
+ }
+ return sal_False;
+ }
+ //the Dest Rang List is not empty
+ vecRet.reserve(10);
+ ScRange* pRange = pSrc->First();
+ while (pRange)
+ {
+ ScRange* pRangeDest = pDest->First();
+ while (pRangeDest)
+ {
+ if (CalcScRangeDifferenceMax(pRange,pRangeDest,nMax,vecRet,nSize))
+ {
+ return sal_True;
+ }
+ pRangeDest = pDest->Next();
+ }
+ pRange = pSrc->Next();
+ }
+ return sal_False;
+}
+//-----IAccessibility2 Implementation 2009
//===== internal ============================================================
ScAccessibleSpreadsheet::ScAccessibleSpreadsheet(
@@ -66,7 +266,13 @@ ScAccessibleSpreadsheet::ScAccessibleSpreadsheet(
:
ScAccessibleTableBase (pAccDoc, GetDocument(pViewShell),
ScRange(ScAddress(0, 0, nTab),ScAddress(MAXCOL, MAXROW, nTab))),
- mbIsSpreadsheet( sal_True )
+ mbIsSpreadsheet( sal_True ),
+//IAccessibility2 Implementation 2009-----
+ m_bFormulaMode(sal_False),
+ m_bFormulaLastMode(sal_False),
+ m_pAccFormulaCell(NULL),
+ m_nMinX(0),m_nMaxX(0),m_nMinY(0),m_nMaxY(0)
+//-----IAccessibility2 Implementation 2009
{
ConstructScAccessibleSpreadsheet( pAccDoc, pViewShell, nTab, eSplitPos );
}
@@ -83,8 +289,10 @@ ScAccessibleSpreadsheet::~ScAccessibleSpreadsheet()
{
if (mpMarkedRanges)
delete mpMarkedRanges;
- if (mpSortedMarkedCells)
- delete mpSortedMarkedCells;
+//IAccessibility2 Implementation 2009-----
+ //if (mpSortedMarkedCells)
+ // delete mpSortedMarkedCells;
+//-----IAccessibility2 Implementation 2009
if (mpViewShell)
mpViewShell->RemoveAccessibilityObject(*this);
}
@@ -118,6 +326,13 @@ void ScAccessibleSpreadsheet::ConstructScAccessibleSpreadsheet(
mpAccCell = GetAccessibleCellAt(maActiveCell.Row(), maActiveCell.Col());
mpAccCell->acquire();
mpAccCell->Init();
+ //IAccessibility2 Implementation 2009-----
+ ScDocument* pScDoc= GetDocument(mpViewShell);
+ if (pScDoc)
+ {
+ pScDoc->GetName( maActiveCell.Tab(), m_strOldTabName );
+ }
+ //-----IAccessibility2 Implementation 2009
}
}
@@ -140,11 +355,18 @@ void SAL_CALL ScAccessibleSpreadsheet::disposing()
void ScAccessibleSpreadsheet::CompleteSelectionChanged(sal_Bool bNewState)
{
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ return ;
+ }
+//-----IAccessibility2 Implementation 2009
if (mpMarkedRanges)
DELETEZ(mpMarkedRanges);
- if (mpSortedMarkedCells)
- DELETEZ(mpSortedMarkedCells);
-
+//IAccessibility2 Implementation 2009-----
+ //if (mpSortedMarkedCells)
+ // DELETEZ(mpSortedMarkedCells);
+//-----IAccessibility2 Implementation 2009
mbHasSelection = bNewState;
AccessibleEventObject aEvent;
@@ -173,12 +395,46 @@ void ScAccessibleSpreadsheet::LostFocus()
void ScAccessibleSpreadsheet::GotFocus()
{
- CommitFocusGained();
-
+//IAccessibility2 Implementation 2009-----
+ //CommitFocusGained();
+//-----IAccessibility2 Implementation 2009
AccessibleEventObject aEvent;
aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
aEvent.Source = uno::Reference< XAccessibleContext >(this);
- uno::Reference< XAccessible > xNew = mpAccCell;
+//IAccessibility2 Implementation 2009-----
+ //uno::Reference< XAccessible > xNew = mpAccCell;
+ uno::Reference< XAccessible > xNew;
+ if (IsFormulaMode())
+ {
+ if (!m_pAccFormulaCell || !m_bFormulaLastMode)
+ {
+ ScAddress aFormulaAddr;
+ if(!GetFormulaCurrentFocusCell(aFormulaAddr))
+ {
+ return;
+ }
+ m_pAccFormulaCell = GetAccessibleCellAt(aFormulaAddr.Row(),aFormulaAddr.Col());
+
+ m_pAccFormulaCell->acquire();
+ m_pAccFormulaCell->Init();
+
+
+ }
+ xNew = m_pAccFormulaCell;
+ }
+ else
+ {
+ if(mpAccCell->GetCellAddress() == maActiveCell)
+ {
+ xNew = mpAccCell;
+ }
+ else
+ {
+ CommitFocusCell(maActiveCell);
+ return ;
+ }
+ }
+//-----IAccessibility2 Implementation 2009
aEvent.NewValue <<= xNew;
CommitChange(aEvent);
@@ -211,58 +467,247 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
if (pSfxSimpleHint)
{
// only notify if child exist, otherwise it is not necessary
+//IAccessibility2 Implementation 2009-----
+ //if ((pSfxSimpleHint->GetId() == SC_HINT_ACC_CURSORCHANGED))
+ //{
+ // if (mpViewShell)
+ // {
+ // ScAddress aNewCell = mpViewShell->GetViewData()->GetCurPos();
+ // sal_Bool bNewMarked(mpViewShell->GetViewData()->GetMarkData().GetTableSelect(aNewCell.Tab()) &&
+ // (mpViewShell->GetViewData()->GetMarkData().IsMarked() ||
+ // mpViewShell->GetViewData()->GetMarkData().IsMultiMarked()));
+ // sal_Bool bNewCellSelected(isAccessibleSelected(aNewCell.Row(), aNewCell.Col()));
+ // if ((bNewMarked != mbHasSelection) ||
+ // (!bNewCellSelected && bNewMarked) ||
+ // (bNewCellSelected && mbHasSelection))
+ // {
+ // if (mpMarkedRanges)
+ // DELETEZ(mpMarkedRanges);
+ // if (mpSortedMarkedCells)
+ // DELETEZ(mpSortedMarkedCells);
+ // AccessibleEventObject aEvent;
+ // aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
+ // aEvent.Source = uno::Reference< XAccessibleContext >(this);
+
+ // mbHasSelection = bNewMarked;
+
+ // CommitChange(aEvent);
+ // }
+
+ // // active descendant changed event (new cell selected)
+ // bool bFireActiveDescChanged = (aNewCell != maActiveCell) &&
+ // (aNewCell.Tab() == maActiveCell.Tab()) && IsFocused();
+
+ // /* Remember old active cell and set new active cell.
+ // #i82409# always update the class members mpAccCell and
+ // maActiveCell, even if the sheet is not focused, e.g. when
+ // using the name box in the toolbar. */
+ // uno::Reference< XAccessible > xOld = mpAccCell;
+ // mpAccCell->release();
+ // mpAccCell = GetAccessibleCellAt(aNewCell.Row(), aNewCell.Col());
+ // mpAccCell->acquire();
+ // mpAccCell->Init();
+ // uno::Reference< XAccessible > xNew = mpAccCell;
+ // maActiveCell = aNewCell;
+
+ // // #i14108# fire event only if sheet is focused
+ // if( bFireActiveDescChanged )
+ // {
+ // AccessibleEventObject aEvent;
+ // aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
+ // aEvent.Source = uno::Reference< XAccessibleContext >(this);
+ // aEvent.OldValue <<= xOld;
+ // aEvent.NewValue <<= xNew;
+ // CommitChange(aEvent);
+ // }
+ // }
+ //}
+ //else if ((rRef.GetId() == SC_HINT_DATACHANGED))
+ //{
+ // if (!mbDelIns)
+ // CommitTableModelChange(maRange.aStart.Row(), maRange.aStart.Col(), maRange.aEnd.Row(), maRange.aEnd.Col(), AccessibleTableModelChangeType::UPDATE);
+ // else
+ // mbDelIns = sal_False;
+ //}
if ((pSfxSimpleHint->GetId() == SC_HINT_ACC_CURSORCHANGED))
{
if (mpViewShell)
{
- ScAddress aNewCell = mpViewShell->GetViewData()->GetCurPos();
- sal_Bool bNewMarked(mpViewShell->GetViewData()->GetMarkData().GetTableSelect(aNewCell.Tab()) &&
- (mpViewShell->GetViewData()->GetMarkData().IsMarked() ||
- mpViewShell->GetViewData()->GetMarkData().IsMultiMarked()));
- sal_Bool bNewCellSelected(isAccessibleSelected(aNewCell.Row(), aNewCell.Col()));
- if ((bNewMarked != mbHasSelection) ||
- (!bNewCellSelected && bNewMarked) ||
- (bNewCellSelected && mbHasSelection))
- {
- if (mpMarkedRanges)
- DELETEZ(mpMarkedRanges);
- if (mpSortedMarkedCells)
- DELETEZ(mpSortedMarkedCells);
- AccessibleEventObject aEvent;
- aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
- aEvent.Source = uno::Reference< XAccessibleContext >(this);
+ ScViewData *pViewData = mpViewShell->GetViewData();
- mbHasSelection = bNewMarked;
+ m_bFormulaMode = pViewData->IsRefMode() || SC_MOD()->IsFormulaMode();
+ if ( m_bFormulaMode )
+ {
+ NotifyRefMode();
+ m_bFormulaLastMode = true;
+ return ;
+ }
+ if (m_bFormulaLastMode)
+ {//Last Notify Mode Is Formula Mode.
+ m_vecFormulaLastMyAddr.clear();
+ RemoveFormulaSelection(sal_True);
+ if(m_pAccFormulaCell)
+ {
+ m_pAccFormulaCell->release();
+ m_pAccFormulaCell =NULL;
+ }
+ //Remove All Selection
+ }
+ m_bFormulaLastMode = m_bFormulaMode;
+ AccessibleEventObject aEvent;
+ aEvent.Source = uno::Reference< XAccessible >(this);
+ ScAddress aNewCell = pViewData->GetCurPos();
+ if(aNewCell.Tab() != maActiveCell.Tab())
+ {
+ aEvent.EventId = AccessibleEventId::PAGE_CHANGED;
+ ScAccessibleDocument *pAccDoc =
+ static_cast<ScAccessibleDocument*>(getAccessibleParent().get());
+ if(pAccDoc)
+ {
+ pAccDoc->CommitChange(aEvent);
+ }
+ }
+ sal_Bool bNewPosCell = (aNewCell != maActiveCell);
+ sal_Bool bNewPosCellFocus=sal_False;
+ if ( bNewPosCell && IsFocused() && aNewCell.Tab() == maActiveCell.Tab() )
+ {//single Focus
+ bNewPosCellFocus=sal_True;
+ }
+ ScMarkData &refScMarkData = pViewData->GetMarkData();
+ // MT IA2: Not used
+ // int nSelCount = refScMarkData.GetSelectCount();
+ sal_Bool bIsMark =refScMarkData.IsMarked();
+ sal_Bool bIsMultMark = refScMarkData.IsMultiMarked();
+ sal_Bool bNewMarked = refScMarkData.GetTableSelect(aNewCell.Tab()) && ( bIsMark || bIsMultMark );
+// sal_Bool bNewCellSelected = isAccessibleSelected(aNewCell.Row(), aNewCell.Col());
+ sal_uInt16 nTab = pViewData->GetTabNo();
+ ScRange aMarkRange;
+ refScMarkData.GetMarkArea(aMarkRange);
+ aEvent.OldValue <<= ::com::sun::star::uno::Any();
+ //Mark All
+ if ( !bNewPosCellFocus &&
+ (bNewMarked || bIsMark || bIsMultMark ) &&
+ aMarkRange == ScRange( 0,0,nTab, MAXCOL,MAXROW,nTab ) )
+ {
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_WITHIN;
+ aEvent.NewValue <<= ::com::sun::star::uno::Any();
CommitChange(aEvent);
+ return ;
}
+ if (!mpMarkedRanges)
+ {
+ mpMarkedRanges = new ScRangeList();
+ }
+ refScMarkData.FillRangeListWithMarks(mpMarkedRanges, sal_True);
- // active descendant changed event (new cell selected)
- bool bFireActiveDescChanged = (aNewCell != maActiveCell) &&
- (aNewCell.Tab() == maActiveCell.Tab()) && IsFocused();
-
- /* Remember old active cell and set new active cell.
- #i82409# always update the class members mpAccCell and
- maActiveCell, even if the sheet is not focused, e.g. when
- using the name box in the toolbar. */
- uno::Reference< XAccessible > xOld = mpAccCell;
- mpAccCell->release();
- mpAccCell = GetAccessibleCellAt(aNewCell.Row(), aNewCell.Col());
- mpAccCell->acquire();
- mpAccCell->Init();
- uno::Reference< XAccessible > xNew = mpAccCell;
- maActiveCell = aNewCell;
-
- // #i14108# fire event only if sheet is focused
- if( bFireActiveDescChanged )
+ //For Whole Col Row
+ sal_Bool bWholeRow = ::labs(aMarkRange.aStart.Row() - aMarkRange.aEnd.Row()) == MAXROW ;
+ sal_Bool bWholeCol = ::abs(aMarkRange.aStart.Col() - aMarkRange.aEnd.Col()) == MAXCOL ;
+ if ((bNewMarked || bIsMark || bIsMultMark ) && (bWholeCol || bWholeRow))
{
- AccessibleEventObject aEvent;
- aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
- aEvent.Source = uno::Reference< XAccessibleContext >(this);
- aEvent.OldValue <<= xOld;
- aEvent.NewValue <<= xNew;
+ if ( aMarkRange != m_aLastWithInMarkRange )
+ {
+ RemoveSelection(refScMarkData);
+ if(bNewPosCell)
+ {
+ CommitFocusCell(aNewCell);
+ }
+ sal_Bool bLastIsWholeColRow =
+ ::labs(m_aLastWithInMarkRange.aStart.Row() - m_aLastWithInMarkRange.aEnd.Row()) == MAXROW && bWholeRow ||
+ ::abs(m_aLastWithInMarkRange.aStart.Col() - m_aLastWithInMarkRange.aEnd.Col()) == MAXCOL && bWholeCol ;
+ sal_Bool bSelSmaller=
+ bLastIsWholeColRow &&
+ !aMarkRange.In(m_aLastWithInMarkRange) &&
+ aMarkRange.Intersects(m_aLastWithInMarkRange);
+ if( !bSelSmaller )
+ {
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_WITHIN;
+ aEvent.NewValue <<= ::com::sun::star::uno::Any();
+ CommitChange(aEvent);
+ }
+ m_aLastWithInMarkRange = aMarkRange;
+ }
+ return ;
+ }
+ m_aLastWithInMarkRange = aMarkRange;
+ int nNewMarkCount = mpMarkedRanges->GetCellCount();
+ sal_Bool bSendSingle= (0 == nNewMarkCount) && bNewPosCell;
+ if (bSendSingle)
+ {
+ RemoveSelection(refScMarkData);
+ if(bNewPosCellFocus)
+ {
+ CommitFocusCell(aNewCell);
+ }
+ uno::Reference< XAccessible > xChild ;
+ if (bNewPosCellFocus)
+ {
+ xChild = mpAccCell;
+ }
+ else
+ {
+ xChild = getAccessibleCellAt(aNewCell.Row(),aNewCell.Col());
+
+ maActiveCell = aNewCell;
+ aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS;
+ aEvent.NewValue <<= xChild;
+ aEvent.OldValue <<= uno::Reference< XAccessible >();
+ CommitChange(aEvent);
+ }
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
+ aEvent.NewValue <<= xChild;
CommitChange(aEvent);
+ OSL_ASSERT(m_mapSelectionSend.count(aNewCell) == 0 );
+ m_mapSelectionSend.insert(MAP_ADDR_XACC::value_type(aNewCell,xChild));
+
+ }
+ else
+ {
+ ScRange aDelRange;
+ sal_Bool bIsDel = pViewData->GetDelMark( aDelRange );
+ if ( (!bIsDel || (bIsDel && aMarkRange != aDelRange)) &&
+ bNewMarked &&
+ nNewMarkCount > 0 &&
+ !IsSameMarkCell() )
+ {
+ RemoveSelection(refScMarkData);
+ if(bNewPosCellFocus)
+ {
+ CommitFocusCell(aNewCell);
+ }
+ VEC_MYADDR vecNew;
+ if(CalcScRangeListDifferenceMax(mpMarkedRanges,&m_LastMarkedRanges,10,vecNew))
+ {
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_WITHIN;
+ aEvent.NewValue <<= ::com::sun::star::uno::Any();
+ CommitChange(aEvent);
+ }
+ else
+ {
+ VEC_MYADDR::iterator viAddr = vecNew.begin();
+ for(; viAddr < vecNew.end() ; ++viAddr )
+ {
+ uno::Reference< XAccessible > xChild = getAccessibleCellAt(viAddr->Row(),viAddr->Col());
+ if (!(bNewPosCellFocus && *viAddr == aNewCell) )
+ {
+ aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS;
+ aEvent.NewValue <<= xChild;
+ CommitChange(aEvent);
+ }
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_ADD;
+ aEvent.NewValue <<= xChild;
+ CommitChange(aEvent);
+ m_mapSelectionSend.insert(MAP_ADDR_XACC::value_type(*viAddr,xChild));
+ }
+ }
+ }
+ }
+ if (bNewPosCellFocus && maActiveCell != aNewCell)
+ {
+ CommitFocusCell(aNewCell);
}
+ m_LastMarkedRanges = *mpMarkedRanges;
}
}
else if ((pSfxSimpleHint->GetId() == SC_HINT_DATACHANGED))
@@ -271,7 +716,41 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
CommitTableModelChange(maRange.aStart.Row(), maRange.aStart.Col(), maRange.aEnd.Row(), maRange.aEnd.Col(), AccessibleTableModelChangeType::UPDATE);
else
mbDelIns = sal_False;
+ ScViewData *pViewData = mpViewShell->GetViewData();
+ ScAddress aNewCell = pViewData->GetCurPos();
+ if( maActiveCell == aNewCell)
+ {
+ ScDocument* pScDoc= GetDocument(mpViewShell);
+ if (pScDoc)
+ {
+ String valStr;
+ pScDoc->GetString(aNewCell.Col(),aNewCell.Row(),aNewCell.Tab(), valStr);
+ if(m_strCurCellValue != valStr)
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::VALUE_CHANGED;
+ mpAccCell->CommitChange(aEvent);
+ m_strCurCellValue=valStr;
+ }
+ String tabName;
+ pScDoc->GetName( maActiveCell.Tab(), tabName );
+ if( m_strOldTabName != tabName )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::NAME_CHANGED;
+ String sOldName(ScResId(STR_ACC_TABLE_NAME));
+ sOldName.SearchAndReplaceAscii("%1", m_strOldTabName);
+ aEvent.OldValue <<= ::rtl::OUString( sOldName );
+ String sNewName(ScResId(STR_ACC_TABLE_NAME));
+ sNewName.SearchAndReplaceAscii("%1", tabName);
+ aEvent.NewValue <<= ::rtl::OUString( sNewName );
+ CommitChange( aEvent );
+ m_strOldTabName = tabName;
+ }
+ }
+ }
}
+//-----IAccessibility2 Implementation 2009
// no longer needed, because the document calls the VisAreaChanged method
/* else if (pSfxSimpleHint->GetId() == SC_HINT_ACC_VISAREACHANGED)
{
@@ -376,7 +855,62 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
ScAccessibleTableBase::Notify(rBC, rHint);
}
-
+//IAccessibility2 Implementation 2009-----
+void ScAccessibleSpreadsheet::RemoveSelection(ScMarkData &refScMarkData)
+{
+ AccessibleEventObject aEvent;
+ aEvent.Source = uno::Reference< XAccessible >(this);
+ aEvent.OldValue <<= ::com::sun::star::uno::Any();
+ MAP_ADDR_XACC::iterator miRemove = m_mapSelectionSend.begin();
+ for(; miRemove != m_mapSelectionSend.end() ;)
+ {
+ if (refScMarkData.IsCellMarked(miRemove->first.Col(),miRemove->first.Row(),sal_True) ||
+ refScMarkData.IsCellMarked(miRemove->first.Col(),miRemove->first.Row(),sal_False) )
+ {
+ ++miRemove;
+ continue;
+ }
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_REMOVE;
+ aEvent.NewValue <<= miRemove->second;
+ CommitChange(aEvent);
+ MAP_ADDR_XACC::iterator miNext = miRemove;
+ ++miNext;
+ m_mapSelectionSend.erase(miRemove);
+ miRemove = miNext;
+ }
+}
+void ScAccessibleSpreadsheet::CommitFocusCell(const ScAddress &aNewCell)
+{
+ OSL_ASSERT(!IsFormulaMode());
+ if(IsFormulaMode())
+ {
+ return ;
+ }
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
+ aEvent.Source = uno::Reference< XAccessible >(this);
+ uno::Reference< XAccessible > xOld = mpAccCell;
+ mpAccCell->release();
+ mpAccCell=NULL;
+ aEvent.OldValue <<= xOld;
+ mpAccCell = GetAccessibleCellAt(aNewCell.Row(), aNewCell.Col());
+ mpAccCell->acquire();
+ mpAccCell->Init();
+ uno::Reference< XAccessible > xNew = mpAccCell;
+ aEvent.NewValue <<= xNew;
+ maActiveCell = aNewCell;
+ ScDocument* pScDoc= GetDocument(mpViewShell);
+ if (pScDoc)
+ {
+ pScDoc->GetString(maActiveCell.Col(),maActiveCell.Row(),maActiveCell.Tab(), m_strCurCellValue);
+ }
+ CommitChange(aEvent);
+}
+sal_Bool ScAccessibleSpreadsheet::IsSameMarkCell()
+{
+ return m_LastMarkedRanges == *mpMarkedRanges;
+}
+//-----IAccessibility2 Implementation 2009
//===== XAccessibleTable ================================================
uno::Reference< XAccessibleTable > SAL_CALL ScAccessibleSpreadsheet::getAccessibleRowHeaders( )
@@ -423,6 +957,12 @@ uno::Sequence< sal_Int32 > SAL_CALL ScAccessibleSpreadsheet::getSelectedAccessib
ScUnoGuard aGuard;
IsObjectValid();
uno::Sequence<sal_Int32> aSequence;
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ return aSequence;
+ }
+//-----IAccessibility2 Implementation 2009
if (mpViewShell && mpViewShell->GetViewData())
{
aSequence.realloc(maRange.aEnd.Row() - maRange.aStart.Row() + 1);
@@ -450,6 +990,12 @@ uno::Sequence< sal_Int32 > SAL_CALL ScAccessibleSpreadsheet::getSelectedAccessib
ScUnoGuard aGuard;
IsObjectValid();
uno::Sequence<sal_Int32> aSequence;
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ return aSequence;
+ }
+//-----IAccessibility2 Implementation 2009
if (mpViewShell && mpViewShell->GetViewData())
{
aSequence.realloc(maRange.aEnd.Col() - maRange.aStart.Col() + 1);
@@ -476,6 +1022,12 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleRowSelected( sal_Int32 nR
{
ScUnoGuard aGuard;
IsObjectValid();
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ return sal_False;
+ }
+//-----IAccessibility2 Implementation 2009
if ((nRow > (maRange.aEnd.Row() - maRange.aStart.Row())) || (nRow < 0))
throw lang::IndexOutOfBoundsException();
@@ -495,6 +1047,12 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleColumnSelected( sal_Int32
ScUnoGuard aGuard;
IsObjectValid();
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ return sal_False;
+ }
+//-----IAccessibility2 Implementation 2009
if ((nColumn > (maRange.aEnd.Col() - maRange.aStart.Col())) || (nColumn < 0))
throw lang::IndexOutOfBoundsException();
@@ -510,6 +1068,20 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleColumnSelected( sal_Int32
ScAccessibleCell* ScAccessibleSpreadsheet::GetAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn)
{
ScAccessibleCell* pAccessibleCell = NULL;
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ ScAddress aCellAddress(static_cast<SCCOL>(nColumn), nRow, mpViewShell->GetViewData()->GetTabNo());
+ if ((aCellAddress == m_aFormulaActiveCell) && m_pAccFormulaCell)
+ {
+ pAccessibleCell = m_pAccFormulaCell;
+ }
+ else
+ pAccessibleCell = new ScAccessibleCell(this, mpViewShell, aCellAddress, GetAccessibleIndexFormula(nRow, nColumn), meSplitPos, mpAccDoc);
+ }
+ else
+ {
+//-----IAccessibility2 Implementation 2009
ScAddress aCellAddress(static_cast<SCCOL>(maRange.aStart.Col() + nColumn),
static_cast<SCROW>(maRange.aStart.Row() + nRow), maRange.aStart.Tab());
if ((aCellAddress == maActiveCell) && mpAccCell)
@@ -518,6 +1090,7 @@ ScAccessibleCell* ScAccessibleSpreadsheet::GetAccessibleCellAt(sal_Int32 nRow, s
}
else
pAccessibleCell = new ScAccessibleCell(this, mpViewShell, aCellAddress, getAccessibleIndex(nRow, nColumn), meSplitPos, mpAccDoc);
+ }
return pAccessibleCell;
}
@@ -527,12 +1100,16 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleSpreadsheet::getAccessibleCel
{
ScUnoGuard aGuard;
IsObjectValid();
+//IAccessibility2 Implementation 2009-----
+ if (!IsFormulaMode())
+ {
if (nRow > (maRange.aEnd.Row() - maRange.aStart.Row()) ||
nRow < 0 ||
nColumn > (maRange.aEnd.Col() - maRange.aStart.Col()) ||
nColumn < 0)
throw lang::IndexOutOfBoundsException();
-
+ }
+//-----IAccessibility2 Implementation 2009
uno::Reference<XAccessible> xAccessible;
ScAccessibleCell* pAccessibleCell = GetAccessibleCellAt(nRow, nColumn);
xAccessible = pAccessibleCell;
@@ -546,6 +1123,13 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleSelected( sal_Int32 nRow,
ScUnoGuard aGuard;
IsObjectValid();
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ ScAddress addr(static_cast<SCCOL>(nColumn), nRow, 0);
+ return IsScAddrFormulaSel(addr);
+ }
+//-----IAccessibility2 Implementation 2009
if ((nColumn > (maRange.aEnd.Col() - maRange.aStart.Col())) || (nColumn < 0) ||
(nRow > (maRange.aEnd.Row() - maRange.aStart.Row())) || (nRow < 0))
throw lang::IndexOutOfBoundsException();
@@ -575,7 +1159,15 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleSpreadsheet::getAccessibleAtP
SCsCOL nX;
SCsROW nY;
mpViewShell->GetViewData()->GetPosFromPixel( rPoint.X, rPoint.Y, meSplitPos, nX, nY);
+//IAccessibility2 Implementation 2009-----
+ try{
xAccessible = getAccessibleCellAt(nY, nX);
+ }
+ catch( ::com::sun::star::lang::IndexOutOfBoundsException e)
+ {
+ return NULL;
+ }
+//-----IAccessibility2 Implementation 2009
}
}
return xAccessible;
@@ -683,6 +1275,9 @@ void SAL_CALL
IsObjectValid();
if (mpViewShell)
{
+//IAccessibility2 Implementation 2009-----
+ if (!IsFormulaMode())
+//-----IAccessibility2 Implementation 2009
mpViewShell->Unmark();
}
}
@@ -695,6 +1290,17 @@ void SAL_CALL
IsObjectValid();
if (mpViewShell)
{
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ ScViewData *pViewData = mpViewShell->GetViewData();
+ mpViewShell->InitRefMode( 0, 0, pViewData->GetTabNo(), SC_REFTYPE_REF );
+ pViewData->SetRefStart(0,0,pViewData->GetTabNo());
+ pViewData->SetRefStart(MAXCOL,MAXROW,pViewData->GetTabNo());
+ mpViewShell->UpdateRef(MAXCOL, MAXROW, pViewData->GetTabNo());
+ }
+ else
+//-----IAccessibility2 Implementation 2009
mpViewShell->SelectAll();
}
}
@@ -708,16 +1314,27 @@ sal_Int32 SAL_CALL
sal_Int32 nResult(0);
if (mpViewShell)
{
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ nResult = GetRowAll() * GetColAll() ;
+ }
+ else
+ {
+//-----IAccessibility2 Implementation 2009
if (!mpMarkedRanges)
{
mpMarkedRanges = new ScRangeList();
ScMarkData aMarkData(mpViewShell->GetViewData()->GetMarkData());
- aMarkData.MarkToMulti();
+//IAccessibility2 Implementation 2009-----
+ //aMarkData.MarkToMulti();
+//-----IAccessibility2 Implementation 2009
aMarkData.FillRangeListWithMarks(mpMarkedRanges, sal_False);
}
// is possible, because there shouldn't be overlapped ranges in it
if (mpMarkedRanges)
nResult = mpMarkedRanges->GetCellCount();
+ }
}
return nResult;
}
@@ -729,6 +1346,17 @@ uno::Reference<XAccessible > SAL_CALL
ScUnoGuard aGuard;
IsObjectValid();
uno::Reference < XAccessible > xAccessible;
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ if(CheckChildIndex(nSelectedChildIndex))
+ {
+ ScAddress addr = GetChildIndexAddress(nSelectedChildIndex);
+ xAccessible = getAccessibleCellAt(addr.Row(), addr.Col());
+ }
+ return xAccessible;
+ }
+//-----IAccessibility2 Implementation 2009
if (mpViewShell)
{
if (!mpMarkedRanges)
@@ -738,16 +1366,27 @@ uno::Reference<XAccessible > SAL_CALL
}
if (mpMarkedRanges)
{
- if (!mpSortedMarkedCells)
- CreateSortedMarkedCells();
- if (mpSortedMarkedCells)
+//IAccessibility2 Implementation 2009-----
+ //if (!mpSortedMarkedCells)
+ // CreateSortedMarkedCells();
+ //if (mpSortedMarkedCells)
+ //{
+ // if ((nSelectedChildIndex < 0) ||
+ // (mpSortedMarkedCells->size() <= static_cast<sal_uInt32>(nSelectedChildIndex)))
+ // throw lang::IndexOutOfBoundsException();
+ // else
+ // xAccessible = getAccessibleCellAt((*mpSortedMarkedCells)[nSelectedChildIndex].Row(), (*mpSortedMarkedCells)[nSelectedChildIndex].Col());
+ if ((nSelectedChildIndex < 0) ||
+ (mpMarkedRanges->GetCellCount() <= static_cast<sal_uInt32>(nSelectedChildIndex)))
{
- if ((nSelectedChildIndex < 0) ||
- (mpSortedMarkedCells->size() <= static_cast<sal_uInt32>(nSelectedChildIndex)))
- throw lang::IndexOutOfBoundsException();
- else
- xAccessible = getAccessibleCellAt((*mpSortedMarkedCells)[nSelectedChildIndex].Row(), (*mpSortedMarkedCells)[nSelectedChildIndex].Col());
+ throw lang::IndexOutOfBoundsException();
}
+ ScMyAddress addr = CalcScAddressFromRangeList(mpMarkedRanges,nSelectedChildIndex);
+ if( m_mapSelectionSend.find(addr) != m_mapSelectionSend.end() )
+ xAccessible = m_mapSelectionSend[addr];
+ else
+ xAccessible = getAccessibleCellAt(addr.Row(), addr.Col());
+//-----IAccessibility2 Implementation 2009
}
}
return xAccessible;
@@ -768,6 +1407,18 @@ void SAL_CALL
sal_Int32 nCol(getAccessibleColumn(nChildIndex));
sal_Int32 nRow(getAccessibleRow(nChildIndex));
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ if(IsScAddrFormulaSel(
+ ScAddress(static_cast<SCCOL>(nCol), nRow,mpViewShell->GetViewData()->GetTabNo()))
+ )
+ {
+ SelectCell(nRow, nCol, sal_True);
+ }
+ return ;
+ }
+//-----IAccessibility2 Implementation 2009
if (mpViewShell->GetViewData()->GetMarkData().IsCellMarked(static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow)))
SelectCell(nRow, nCol, sal_True);
}
@@ -775,48 +1426,65 @@ void SAL_CALL
void ScAccessibleSpreadsheet::SelectCell(sal_Int32 nRow, sal_Int32 nCol, sal_Bool bDeselect)
{
- mpViewShell->SetTabNo( maRange.aStart.Tab() );
-
- mpViewShell->DoneBlockMode( sal_True ); // continue selecting
- mpViewShell->InitBlockMode( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), maRange.aStart.Tab(), bDeselect, sal_False, sal_False );
-
- mpViewShell->SelectionChanged();
-}
-
-void ScAccessibleSpreadsheet::CreateSortedMarkedCells()
-{
- mpSortedMarkedCells = new std::vector<ScMyAddress>();
- mpSortedMarkedCells->reserve(mpMarkedRanges->GetCellCount());
- ScRange* pRange = mpMarkedRanges->First();
- while (pRange)
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
{
- if (pRange->aStart.Tab() != pRange->aEnd.Tab())
- {
- if ((maActiveCell.Tab() >= pRange->aStart.Tab()) ||
- maActiveCell.Tab() <= pRange->aEnd.Tab())
- {
- ScRange aRange(*pRange);
- aRange.aStart.SetTab(maActiveCell.Tab());
- aRange.aEnd.SetTab(maActiveCell.Tab());
- AddMarkedRange(aRange);
- }
- else
- {
- DBG_ERROR("Range of wrong table");
- }
+ if (bDeselect)
+ {//??
+ return ;
}
- else if(pRange->aStart.Tab() == maActiveCell.Tab())
- AddMarkedRange(*pRange);
else
{
- DBG_ERROR("Range of wrong table");
+ ScViewData *pViewData = mpViewShell->GetViewData();
+
+ mpViewShell->InitRefMode( static_cast<SCCOL>(nCol), nRow, pViewData->GetTabNo(), SC_REFTYPE_REF );
+ mpViewShell->UpdateRef(static_cast<SCCOL>(nCol), nRow, pViewData->GetTabNo());
}
- pRange = mpMarkedRanges->Next();
+ return ;
}
- std::sort(mpSortedMarkedCells->begin(), mpSortedMarkedCells->end());
-}
+//-----IAccessibility2 Implementation 2009
+ mpViewShell->SetTabNo( maRange.aStart.Tab() );
-void ScAccessibleSpreadsheet::AddMarkedRange(const ScRange& rRange)
+ mpViewShell->DoneBlockMode( sal_True ); // continue selecting
+ mpViewShell->InitBlockMode( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), maRange.aStart.Tab(), bDeselect, sal_False, sal_False );
+
+ mpViewShell->SelectionChanged();
+}
+//IAccessibility2 Implementation 2009-----
+//void ScAccessibleSpreadsheet::CreateSortedMarkedCells()
+//{
+// mpSortedMarkedCells = new std::vector<ScMyAddress>();
+// mpSortedMarkedCells->reserve(mpMarkedRanges->GetCellCount());
+// ScRange* pRange = mpMarkedRanges->First();
+// while (pRange)
+// {
+// if (pRange->aStart.Tab() != pRange->aEnd.Tab())
+// {
+// if ((maActiveCell.Tab() >= pRange->aStart.Tab()) ||
+// maActiveCell.Tab() <= pRange->aEnd.Tab())
+// {
+// ScRange aRange(*pRange);
+// aRange.aStart.SetTab(maActiveCell.Tab());
+// aRange.aEnd.SetTab(maActiveCell.Tab());
+// AddMarkedRange(aRange);
+// }
+// else
+// {
+// DBG_ERROR("Range of wrong table");
+// }
+// }
+// else if(pRange->aStart.Tab() == maActiveCell.Tab())
+// AddMarkedRange(*pRange);
+// else
+// {
+// DBG_ERROR("Range of wrong table");
+// }
+// pRange = mpMarkedRanges->Next();
+// }
+// std::sort(mpSortedMarkedCells->begin(), mpSortedMarkedCells->end());
+//}
+
+/*void ScAccessibleSpreadsheet::AddMarkedRange(const ScRange& rRange)
{
for (SCROW nRow = rRange.aStart.Row(); nRow <= rRange.aEnd.Row(); ++nRow)
{
@@ -826,7 +1494,8 @@ void ScAccessibleSpreadsheet::AddMarkedRange(const ScRange& rRange)
mpSortedMarkedCells->push_back(aCell);
}
}
-}
+}*/
+//-----IAccessibility2 Implementation 2009
//===== XServiceInfo ====================================================
@@ -876,7 +1545,8 @@ void SAL_CALL ScAccessibleSpreadsheet::addEventListener(const uno::Reference<XAc
IsObjectValid();
ScAccessibleTableBase::addEventListener(xListener);
- if (!mbIsFocusSend)
+//IAccessibility2 Implementation 2009-----
+/* if (!mbIsFocusSend)
{
mbIsFocusSend = sal_True;
CommitFocusGained();
@@ -888,6 +1558,8 @@ void SAL_CALL ScAccessibleSpreadsheet::addEventListener(const uno::Reference<XAc
CommitChange(aEvent);
}
+*/
+//-----IAccessibility2 Implementation 2009
}
//==== internal =========================================================
@@ -929,6 +1601,12 @@ sal_Bool ScAccessibleSpreadsheet::IsDefunc(
sal_Bool ScAccessibleSpreadsheet::IsEditable(
const uno::Reference<XAccessibleStateSet>& /* rxParentStates */)
{
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ return sal_False;
+ }
+//-----IAccessibility2 Implementation 2009
sal_Bool bProtected(sal_False);
if (mpDoc && mpDoc->IsTabProtected(maRange.aStart.Tab()))
bProtected = sal_True;
@@ -948,6 +1626,12 @@ sal_Bool ScAccessibleSpreadsheet::IsFocused()
sal_Bool ScAccessibleSpreadsheet::IsCompleteSheetSelected()
{
+//IAccessibility2 Implementation 2009-----
+ if (IsFormulaMode())
+ {
+ return sal_False;
+ }
+//-----IAccessibility2 Implementation 2009
sal_Bool bResult(sal_False);
if(mpViewShell)
{
@@ -998,3 +1682,277 @@ Rectangle ScAccessibleSpreadsheet::GetVisCells(const Rectangle& rVisArea)
else
return Rectangle();
}
+//IAccessibility2 Implementation 2009-----
+sal_Bool SAL_CALL ScAccessibleSpreadsheet::selectRow( sal_Int32 row )
+throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ if (IsFormulaMode())
+ {
+ return sal_False;
+ }
+
+ mpViewShell->SetTabNo( maRange.aStart.Tab() );
+ mpViewShell->DoneBlockMode( sal_True ); // continue selecting
+ mpViewShell->InitBlockMode( 0, row, maRange.aStart.Tab(), sal_False, sal_False, sal_True );
+ mpViewShell->MarkCursor( MAXCOL, row, maRange.aStart.Tab(), sal_False, sal_True );
+ mpViewShell->SelectionChanged();
+ return sal_True;
+}
+
+sal_Bool SAL_CALL ScAccessibleSpreadsheet::selectColumn( sal_Int32 column )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ if (IsFormulaMode())
+ {
+ return sal_False;
+ }
+
+ mpViewShell->SetTabNo( maRange.aStart.Tab() );
+ mpViewShell->DoneBlockMode( sal_True ); // continue selecting
+ mpViewShell->InitBlockMode( static_cast<SCCOL>(column), 0, maRange.aStart.Tab(), sal_False, sal_True, sal_False );
+ mpViewShell->MarkCursor( static_cast<SCCOL>(column), MAXROW, maRange.aStart.Tab(), sal_True, sal_False );
+ mpViewShell->SelectionChanged();
+ return sal_True;
+}
+
+sal_Bool SAL_CALL ScAccessibleSpreadsheet::unselectRow( sal_Int32 row )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ if (IsFormulaMode())
+ {
+ return sal_False;
+ }
+
+ mpViewShell->SetTabNo( maRange.aStart.Tab() );
+ mpViewShell->DoneBlockMode( sal_True ); // continue selecting
+ mpViewShell->InitBlockMode( 0, row, maRange.aStart.Tab(), sal_False, sal_False, sal_True, sal_True );
+ mpViewShell->MarkCursor( MAXCOL, row, maRange.aStart.Tab(), sal_False, sal_True );
+ mpViewShell->SelectionChanged();
+ mpViewShell->DoneBlockMode( sal_True );
+ return sal_True;
+}
+
+sal_Bool SAL_CALL ScAccessibleSpreadsheet::unselectColumn( sal_Int32 column )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ if (IsFormulaMode())
+ {
+ return sal_False;
+ }
+
+ mpViewShell->SetTabNo( maRange.aStart.Tab() );
+ mpViewShell->DoneBlockMode( sal_True ); // continue selecting
+ mpViewShell->InitBlockMode( static_cast<SCCOL>(column), 0, maRange.aStart.Tab(), sal_False, sal_True, sal_False, sal_True );
+ mpViewShell->MarkCursor( static_cast<SCCOL>(column), MAXROW, maRange.aStart.Tab(), sal_True, sal_False );
+ mpViewShell->SelectionChanged();
+ mpViewShell->DoneBlockMode( sal_True );
+ return sal_True;
+}
+
+void ScAccessibleSpreadsheet::FireFirstCellFocus()
+{
+ if (IsFormulaMode())
+ {
+ return ;
+ }
+ if (mbIsFocusSend)
+ {
+ return ;
+ }
+ mbIsFocusSend = sal_True;
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
+ aEvent.Source = uno::Reference< XAccessible >(this);
+ aEvent.NewValue <<= getAccessibleCellAt(maActiveCell.Row(), maActiveCell.Col());
+ CommitChange(aEvent);
+}
+void ScAccessibleSpreadsheet::NotifyRefMode()
+{
+ ScViewData *pViewData = mpViewShell->GetViewData();
+ sal_uInt16 nRefStartX =pViewData->GetRefStartX();
+ sal_Int32 nRefStartY=pViewData->GetRefStartY();
+ sal_uInt16 nRefEndX=pViewData->GetRefEndX();
+ sal_Int32 nRefEndY=pViewData->GetRefEndY();
+ ScAddress aFormulaAddr;
+ if(!GetFormulaCurrentFocusCell(aFormulaAddr))
+ {
+ return ;
+ }
+ if (m_aFormulaActiveCell != aFormulaAddr)
+ {//New Focus
+ m_nMinX =std::min(nRefStartX,nRefEndX);
+ m_nMaxX =std::max(nRefStartX,nRefEndX);
+ m_nMinY = std::min(nRefStartY,nRefEndY);
+ m_nMaxY = std::max(nRefStartY,nRefEndY);
+ RemoveFormulaSelection();
+ AccessibleEventObject aEvent;
+ aEvent.Source = uno::Reference< XAccessible >(this);
+ aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
+ aEvent.Source = uno::Reference< XAccessible >(this);
+ uno::Reference< XAccessible > xOld = m_pAccFormulaCell;
+ aEvent.OldValue <<= xOld;
+ m_pAccFormulaCell = GetAccessibleCellAt(aFormulaAddr.Row(), aFormulaAddr.Col());
+ m_pAccFormulaCell->acquire();
+ m_pAccFormulaCell->Init();
+ uno::Reference< XAccessible > xNew = m_pAccFormulaCell;
+ aEvent.NewValue <<= xNew;
+ CommitChange(aEvent);
+ if (nRefStartX == nRefEndX && nRefStartY == nRefEndY)
+ {//Selection Single
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
+ aEvent.NewValue <<= xNew;
+ CommitChange(aEvent);
+ m_mapFormulaSelectionSend.insert(MAP_ADDR_XACC::value_type(aFormulaAddr,xNew));
+ m_vecFormulaLastMyAddr.clear();
+ m_vecFormulaLastMyAddr.push_back(aFormulaAddr);
+ }
+ else
+ {
+ VEC_MYADDR vecCurSel;
+ int nCurSize = (m_nMaxX - m_nMinX +1)*(m_nMaxY - m_nMinY +1) ;
+ vecCurSel.reserve(nCurSize);
+ for (sal_uInt16 x = m_nMinX ; x <= m_nMaxX ; ++x)
+ {
+ for (sal_Int32 y = m_nMinY ; y <= m_nMaxY ; ++y)
+ {
+ ScMyAddress aAddr(x,y,0);
+ vecCurSel.push_back(aAddr);
+ }
+ }
+ std::sort(vecCurSel.begin(), vecCurSel.end());
+ VEC_MYADDR vecNew;
+ std::set_difference(vecCurSel.begin(),vecCurSel.end(),
+ m_vecFormulaLastMyAddr.begin(),m_vecFormulaLastMyAddr.end(),
+ std::back_insert_iterator<VEC_MYADDR>(vecNew));
+ int nNewSize = vecNew.size();
+ if ( nNewSize > 10 )
+ {
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_WITHIN;
+ aEvent.NewValue <<= ::com::sun::star::uno::Any();
+ CommitChange(aEvent);
+ }
+ else
+ {
+ VEC_MYADDR::iterator viAddr = vecNew.begin();
+ for(; viAddr != vecNew.end() ; ++viAddr )
+ {
+ uno::Reference< XAccessible > xChild;
+ if (*viAddr == aFormulaAddr)
+ {
+ xChild = m_pAccFormulaCell;
+ }
+ else
+ {
+ xChild = getAccessibleCellAt(viAddr->Row(),viAddr->Col());
+ aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS;
+ aEvent.NewValue <<= xChild;
+ CommitChange(aEvent);
+ }
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_ADD;
+ aEvent.NewValue <<= xChild;
+ CommitChange(aEvent);
+ m_mapFormulaSelectionSend.insert(MAP_ADDR_XACC::value_type(*viAddr,xChild));
+ }
+ }
+ m_vecFormulaLastMyAddr.swap(vecCurSel);
+ }
+ }
+ m_aFormulaActiveCell = aFormulaAddr;
+}
+void ScAccessibleSpreadsheet::RemoveFormulaSelection(sal_Bool bRemoveAll )
+{
+ AccessibleEventObject aEvent;
+ aEvent.Source = uno::Reference< XAccessible >(this);
+ aEvent.OldValue <<= ::com::sun::star::uno::Any();
+ MAP_ADDR_XACC::iterator miRemove = m_mapFormulaSelectionSend.begin();
+ for(; miRemove != m_mapFormulaSelectionSend.end() ;)
+ {
+ if( !bRemoveAll && IsScAddrFormulaSel(miRemove->first) )
+ {
+ ++miRemove;
+ continue;
+ }
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_REMOVE;
+ aEvent.NewValue <<= miRemove->second;
+ CommitChange(aEvent);
+ MAP_ADDR_XACC::iterator miNext = miRemove;
+ ++miNext;
+ m_mapFormulaSelectionSend.erase(miRemove);
+ miRemove = miNext;
+ }
+}
+sal_Bool ScAccessibleSpreadsheet::IsScAddrFormulaSel(const ScAddress &addr) const
+{
+ if( addr.Col() >= m_nMinX && addr.Col() <= m_nMaxX &&
+ addr.Row() >= m_nMinY && addr.Row() <= m_nMaxY &&
+ addr.Tab() == mpViewShell->GetViewData()->GetTabNo() )
+ {
+ return sal_True;
+ }
+ return sal_False;
+}
+sal_Bool ScAccessibleSpreadsheet::CheckChildIndex(sal_Int32 nIndex) const
+{
+ sal_Int32 nMaxIndex = (m_nMaxX - m_nMinX +1)*(m_nMaxY - m_nMinY +1) -1 ;
+ return nIndex <= nMaxIndex && nIndex >= 0 ;
+}
+ScAddress ScAccessibleSpreadsheet::GetChildIndexAddress(sal_Int32 nIndex) const
+{
+ sal_Int32 nRowAll = GetRowAll();
+ sal_uInt16 nColAll = GetColAll();
+ if (nIndex < 0 || nIndex >= nRowAll * nColAll )
+ {
+ return ScAddress();
+ }
+ return ScAddress(
+ static_cast<SCCOL>((nIndex - nIndex % nRowAll) / nRowAll + + m_nMinX),
+ nIndex % nRowAll + m_nMinY,
+ mpViewShell->GetViewData()->GetTabNo()
+ );
+}
+sal_Int32 ScAccessibleSpreadsheet::GetAccessibleIndexFormula( sal_Int32 nRow, sal_Int32 nColumn )
+{
+ sal_uInt16 nColRelative = sal_uInt16(nColumn) - GetColAll();
+ sal_Int32 nRowRelative = nRow - GetRowAll();
+ if (nRow < 0 || nColumn < 0 || nRowRelative >= GetRowAll() || nColRelative >= GetColAll() )
+ {
+ return -1;
+ }
+ return GetRowAll() * nRowRelative + nColRelative;
+}
+sal_Bool ScAccessibleSpreadsheet::IsFormulaMode()
+{
+ ScViewData *pViewData = mpViewShell->GetViewData();
+ m_bFormulaMode = pViewData->IsRefMode() || SC_MOD()->IsFormulaMode();
+ return m_bFormulaMode ;
+}
+sal_Bool ScAccessibleSpreadsheet::GetFormulaCurrentFocusCell(ScAddress &addr)
+{
+ ScViewData *pViewData = mpViewShell->GetViewData();
+ sal_uInt16 nRefX=0;
+ sal_Int32 nRefY=0;
+ if(m_bFormulaLastMode)
+ {
+ nRefX=pViewData->GetRefEndX();
+ nRefY=pViewData->GetRefEndY();
+ }
+ else
+ {
+ nRefX=pViewData->GetRefStartX();
+ nRefY=pViewData->GetRefStartY();
+ }
+ if( /* Always true: nRefX >= 0 && */ nRefX <= MAXCOL && nRefY >= 0 && nRefY <= MAXROW)
+ {
+ addr = ScAddress(nRefX,nRefY,pViewData->GetTabNo());
+ return sal_True;
+ }
+ return sal_False;
+}
+uno::Reference < XAccessible > ScAccessibleSpreadsheet::GetActiveCell()
+{
+ if( m_mapSelectionSend.find( maActiveCell ) != m_mapSelectionSend.end() )
+ return m_mapSelectionSend[maActiveCell];
+ else
+ return getAccessibleCellAt(maActiveCell.Row(), maActiveCell .Col());
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
index a6e6b740a814..d05b88e725b5 100644
--- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
@@ -77,8 +77,23 @@ void SAL_CALL ScAccessibleTableBase::disposing()
uno::Any SAL_CALL ScAccessibleTableBase::queryInterface( uno::Type const & rType )
throw (uno::RuntimeException)
{
- uno::Any aAny (ScAccessibleTableBaseImpl::queryInterface(rType));
- return aAny.hasValue() ? aAny : ScAccessibleContextBase::queryInterface(rType);
+//IAccessibility2 Implementation 2009-----
+ //uno::Any aAny (ScAccessibleTableBaseImpl::queryInterface(rType));
+ //return aAny.hasValue() ? aAny : ScAccessibleContextBase::queryInterface(rType);
+ uno::Any aRet;
+ if ( rType == ::getCppuType((uno::Reference<XAccessibleTableSelection> *)0) )
+ {
+ uno::Reference<XAccessibleTableSelection> xThis( this );
+ aRet <<= xThis;
+ return aRet;
+ }
+ else
+ {
+ uno::Any aAny (ScAccessibleTableBaseImpl::queryInterface(rType));
+ return aAny.hasValue() ? aAny : ScAccessibleContextBase::queryInterface(rType);
+ }
+ return aRet;
+//-----IAccessibility2 Implementation 2009
}
void SAL_CALL ScAccessibleTableBase::acquire()
@@ -153,12 +168,18 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleRowExtentAt( sal_Int32 nR
{
SCROW nEndRow(0);
SCCOL nEndCol(0);
- if (mpDoc->ExtendMerge(static_cast<SCCOL>(nColumn), static_cast<SCROW>(nRow),
- nEndCol, nEndRow, maRange.aStart.Tab()))
- {
- if (nEndRow > nRow)
- nCount = nEndRow - nRow + 1;
- }
+//IAccessibility2 Implementation 2009-----
+ mpDoc->GetTableByIndex(maRange.aStart.Tab())->GetColumnByIndex(nColumn)->
+ ExtendMerge( static_cast<SCCOL>(nColumn), static_cast<SCROW>(nRow), nRow, nEndCol, nEndRow, sal_False, sal_False );
+ if (nEndRow > nRow)
+ nCount = nEndRow - nRow + 1;
+ // if (mpDoc->ExtendMerge(static_cast<SCCOL>(nColumn), static_cast<SCROW>(nRow),
+ // nEndCol, nEndRow, maRange.aStart.Tab()))
+ //{
+ // if (nEndRow > nRow)
+ // nCount = nEndRow - nRow + 1;
+ //}
+//-----IAccessibility2 Implementation 2009
}
return nCount;
@@ -182,12 +203,18 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleColumnExtentAt( sal_Int32
{
SCROW nEndRow(0);
SCCOL nEndCol(0);
- if (mpDoc->ExtendMerge(static_cast<SCCOL>(nColumn), static_cast<SCROW>(nRow),
- nEndCol, nEndRow, maRange.aStart.Tab()))
- {
- if (nEndCol > nColumn)
+//IAccessibility2 Implementation 2009-----
+ mpDoc->GetTableByIndex(maRange.aStart.Tab())->GetColumnByIndex(nColumn)->
+ ExtendMerge( static_cast<SCCOL>(nColumn), static_cast<SCROW>(nRow), nRow, nEndCol, nEndRow, sal_False, sal_False );
+ if (nEndCol > nColumn)
nCount = nEndCol - nColumn + 1;
- }
+ // if (mpDoc->ExtendMerge(static_cast<SCCOL>(nColumn), static_cast<SCROW>(nRow),
+ // nEndCol, nEndRow, maRange.aStart.Tab()))
+ //{
+ // if (nEndCol > nColumn)
+ // nCount = nEndCol - nColumn + 1;
+ //}
+//-----IAccessibility2 Implementation 2009
}
return nCount;
@@ -489,3 +516,27 @@ void ScAccessibleTableBase::CommitTableModelChange(sal_Int32 nStartRow, sal_Int3
CommitChange(aEvent);
}
+//IAccessibility2 Implementation 2009-----
+sal_Bool SAL_CALL ScAccessibleTableBase::selectRow( sal_Int32 )
+throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ return sal_True;
+}
+sal_Bool SAL_CALL ScAccessibleTableBase::selectColumn( sal_Int32 )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ return sal_True;
+}
+sal_Bool SAL_CALL ScAccessibleTableBase::unselectRow( sal_Int32 )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ return sal_True;
+}
+sal_Bool SAL_CALL ScAccessibleTableBase::unselectColumn( sal_Int32 )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ return sal_True;
+}
+//-----IAccessibility2 Implementation 2009
+
+
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index a3d3f6f0aa5d..55738d5a66bc 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -1060,8 +1060,10 @@ ScDocShell* ScAccessibleCellTextData::GetDocShell(ScTabViewShell* pViewShell)
// ============================================================================
-
-ScAccessibleEditObjectTextData::ScAccessibleEditObjectTextData(EditView* pEditView, Window* pWin)
+//IAccessibility2 Implementation 2009-----
+//ScAccessibleEditObjectTextData::ScAccessibleEditObjectTextData(EditView* pEditView, Window* pWin)
+ScAccessibleEditObjectTextData::ScAccessibleEditObjectTextData(EditView* pEditView, Window* pWin, sal_Bool isClone)
+//-----IAccessibility2 Implementation 2009
:
mpViewForwarder(NULL),
mpEditViewForwarder(NULL),
@@ -1070,13 +1072,22 @@ ScAccessibleEditObjectTextData::ScAccessibleEditObjectTextData(EditView* pEditVi
mpForwarder(NULL),
mpWindow(pWin)
{
- if (mpEditEngine)
+//IAccessibility2 Implementation 2009-----
+ // Solution: If the object is cloned, do NOT add notify hdl.
+ mbIsCloned = isClone;
+ //if (mpEditEngine)
+ if (mpEditEngine && !mbIsCloned)
+//-----IAccessibility2 Implementation 2009
mpEditEngine->SetNotifyHdl( LINK(this, ScAccessibleEditObjectTextData, NotifyHdl) );
}
ScAccessibleEditObjectTextData::~ScAccessibleEditObjectTextData()
{
- if (mpEditEngine)
+//IAccessibility2 Implementation 2009-----
+ // Solution: If the object is cloned, do NOT set notify hdl.
+ //if (mpEditEngine)
+ if (mpEditEngine && !mbIsCloned)
+//-----IAccessibility2 Implementation 2009
mpEditEngine->SetNotifyHdl(Link());
if (mpViewForwarder)
delete mpViewForwarder;
@@ -1110,7 +1121,11 @@ void ScAccessibleEditObjectTextData::Notify( SfxBroadcaster& rBC, const SfxHint&
ScAccessibleTextData* ScAccessibleEditObjectTextData::Clone() const
{
- return new ScAccessibleEditObjectTextData(mpEditView, mpWindow);
+//IAccessibility2 Implementation 2009-----
+ // Solution: Add para to indicate the object is cloned
+ //return new ScAccessibleEditObjectTextData(mpEditView, mpWindow);
+ return new ScAccessibleEditObjectTextData(mpEditView, mpWindow,sal_True);
+//-----IAccessibility2 Implementation 2009
}
SvxTextForwarder* ScAccessibleEditObjectTextData::GetTextForwarder()
@@ -1119,7 +1134,11 @@ SvxTextForwarder* ScAccessibleEditObjectTextData::GetTextForwarder()
{
if (!mpEditEngine)
mpEditEngine = mpEditView->GetEditEngine();
- if (mpEditEngine && !mpEditEngine->GetNotifyHdl().IsSet())
+//IAccessibility2 Implementation 2009-----
+ // Solution: If the object is cloned, do NOT add notify hdl.
+ //if (mpEditEngine && !mpEditEngine->GetNotifyHdl().IsSet())
+ if (mpEditEngine && !mpEditEngine->GetNotifyHdl().IsSet()&&!mbIsCloned)
+//-----IAccessibility2 Implementation 2009
mpEditEngine->SetNotifyHdl( LINK(this, ScAccessibleEditObjectTextData, NotifyHdl) );
if(!mpForwarder)
mpForwarder = new SvxEditEngineForwarder(*mpEditEngine);
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index 7652853b1856..a67efafd72ea 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -180,6 +180,11 @@ ScDbNameDlg::ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
aBtnDoSize, aBtnKeepFmt, aBtnStripData, theCurArea );
Init();
FreeResource();
+ //IAccessibility2 Implementation 2009-----
+ SynFocusTimer.SetTimeout(150);
+ SynFocusTimer.SetTimeoutHdl(LINK( this, ScDbNameDlg, FocusToComoboxHdl));
+ SynFocusTimer.Start();
+ //-----IAccessibility2 Implementation 2009
aRbAssign.SetAccessibleRelationMemberOf(&aFlAssign);
}
@@ -716,8 +721,37 @@ IMPL_LINK( ScDbNameDlg, AssModifyHdl, void *, EMPTYARG )
String aText = aEdAssign.GetText();
if ( aTmpRange.ParseAny( aText, pDoc, aAddrDetails ) & SCA_VALID )
theCurArea = aTmpRange;
-
+//IAccessibility2 Implementation 2009-----
+ if( aText.Len() > 0 && aEdName.GetText().Len() > 0 )
+ {
+ aBtnAdd.Enable();
+ aBtnHeader.Enable();
+ aBtnDoSize.Enable();
+ aBtnKeepFmt.Enable();
+ aBtnStripData.Enable();
+ aFTSource.Enable();
+ aFTOperations.Enable();
+ }
+ else
+ {
+ aBtnAdd.Disable();
+ aBtnHeader.Disable();
+ aBtnDoSize.Disable();
+ aBtnKeepFmt.Disable();
+ aBtnStripData.Disable();
+ aFTSource.Disable();
+ aFTOperations.Disable();
+ }
+//-----IAccessibility2 Implementation 2009
return 0;
}
-
+//IAccessibility2 Implementation 2009-----
+IMPL_LINK( ScDbNameDlg, FocusToComoboxHdl, Timer*, pTi)
+{
+ (void)pTi;
+ // CallEventListeners is still protected - figure out if we need to make it public, or if the focus stuff can be handled better in VCL directly. First see what AT is expecting...
+ // aEdName.CallEventListeners( VCLEVENT_CONTROL_GETFOCUS );
+ return 0;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 6224120b2a41..8b406e412dac 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -121,6 +121,9 @@
#include "docsh.hxx"
#include "docshimp.hxx"
+//IAccessibility2 Implementation 2009-----
+#include <sfx2/viewfrm.hxx>
+//-----IAccessibility2 Implementation 2009
#include <rtl/logfile.hxx>
#include <comphelper/processfactory.hxx>
@@ -1592,6 +1595,23 @@ sal_Bool __EXPORT ScDocShell::SaveAs( SfxMedium& rMedium )
PrepareSaveGuard aPrepareGuard( *this);
+//IAccessibility2 Implementation 2009-----
+ aDocument.setDocAccTitle(String());
+ // SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this, TYPE(SfxTopViewFrame));
+ SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this );
+ if (pFrame1)
+ {
+ Window* pWindow = &pFrame1->GetWindow();
+ if ( pWindow )
+ {
+ Window* pSysWin = pWindow->GetSystemWindow();
+ if ( pSysWin )
+ {
+ pSysWin->SetAccessibleName(String());
+ }
+ }
+ }
+//-----IAccessibility2 Implementation 2009
// wait cursor is handled with progress bar
sal_Bool bRet = SfxObjectShell::SaveAs( rMedium );
if( bRet )
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index 4b4ad10a09e7..54821516d5fd 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -381,10 +381,16 @@ sal_Bool __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt)
// changeover to the next object
if(!pView->MarkNextObj( !aCode.IsShift() ))
{
+//IAccessibility2 Implementation 2009-----
+ //If there is only one object, don't do the UnmarkAlllObj() & MarkNextObj().
+ if ( pView->GetMarkableObjCount() > 1 && pView->HasMarkableObj() )
+ {
+//-----IAccessibility2 Implementation 2009
// #97016# No next object: go over open end and
// get first from the other side
pView->UnmarkAllObj();
pView->MarkNextObj(!aCode.IsShift());
+ }
}
// #97016# II
diff --git a/sc/source/ui/inc/AccessibleCell.hxx b/sc/source/ui/inc/AccessibleCell.hxx
index 51d0aba81a89..576853840973 100644
--- a/sc/source/ui/inc/AccessibleCell.hxx
+++ b/sc/source/ui/inc/AccessibleCell.hxx
@@ -32,17 +32,28 @@
#include <unotools/accessiblerelationsethelper.hxx>
#include <editeng/AccessibleStaticTextBase.hxx>
#include <comphelper/uno3.hxx>
+//IAccessibility2 Implementation 2009-----
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XAccessibleExtendedAttributes_HPP_
+#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
+#endif
+//-----IAccessibility2 Implementation 2009
class ScTabViewShell;
class ScAccessibleDocument;
+typedef cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessibleExtendedAttributes>
+ ScAccessibleCellAttributeImpl;
+
/** @descr
This base class provides an implementation of the
<code>AccessibleCell</code> service.
*/
class ScAccessibleCell
: public ScAccessibleCellBase,
- public accessibility::AccessibleStaticTextBase
+ public accessibility::AccessibleStaticTextBase,
+//IAccessibility2 Implementation 2009-----
+ public ScAccessibleCellAttributeImpl
+//-----IAccessibility2 Implementation 2009
{
public:
//===== internal ========================================================
@@ -134,6 +145,14 @@ public:
getSupportedServiceNames(void)
throw (::com::sun::star::uno::RuntimeException);
+//IAccessibility2 Implementation 2009-----
+ virtual ::com::sun::star::uno::Any SAL_CALL getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+
+ // Override this method to handle cell's ParaIndent attribute specially.
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+//-----IAccessibility2 Implementation 2009
private:
ScTabViewShell* mpViewShell;
ScAccessibleDocument* mpAccDoc;
@@ -163,6 +182,10 @@ private:
void AddRelation(const ScRange& rRange,
const sal_uInt16 aRelationType,
::utl::AccessibleRelationSetHelper* pRelationSet);
+//IAccessibility2 Implementation 2009-----
+ sal_Bool IsFormulaMode();
+ sal_Bool IsDropdown();
+//-----IAccessibility2 Implementation 2009
};
diff --git a/sc/source/ui/inc/AccessibleCellBase.hxx b/sc/source/ui/inc/AccessibleCellBase.hxx
index d14f7953b425..d2287f460e63 100644
--- a/sc/source/ui/inc/AccessibleCellBase.hxx
+++ b/sc/source/ui/inc/AccessibleCellBase.hxx
@@ -142,6 +142,21 @@ private:
virtual sal_Bool IsEditable(
const com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+//IAccessibility2 Implementation 2009-----
+protected:
+ virtual ::rtl::OUString SAL_CALL GetNote(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::rtl::OUString SAL_CALL GetAllDisplayNote(void)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getShadowAttrs(void)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getBorderAttrs(void)
+ throw (::com::sun::star::uno::RuntimeException);
+public:
+ const ScAddress& GetCellAddress() const { return maCellAddress; }
+ sal_Bool IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBoder);
+//-----IAccessibility2 Implementation 2009
};
diff --git a/sc/source/ui/inc/AccessibleDocument.hxx b/sc/source/ui/inc/AccessibleDocument.hxx
index 35794a608c51..f13c4e3b7762 100644
--- a/sc/source/ui/inc/AccessibleDocument.hxx
+++ b/sc/source/ui/inc/AccessibleDocument.hxx
@@ -29,7 +29,12 @@
#include "viewdata.hxx"
#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
#include <com/sun/star/view/XSelectionChangeListener.hpp>
-#include <cppuhelper/implbase2.hxx>
+//IAccessibility2 Implementation 2009-----
+//#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
+#include <com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp>
+//-----IAccessibility2 Implementation 2009
#include <svx/IAccessibleViewForwarder.hxx>
class ScTabViewShell;
@@ -51,13 +56,19 @@ namespace utl
<code>AccessibleContext</code> service.
*/
-typedef cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessibleSelection,
+//IAccessibility2 Implementation 2009-----
+typedef cppu::ImplHelper3< ::com::sun::star::accessibility::XAccessibleSelection,
+ ::com::sun::star::accessibility::XAccessibleExtendedAttributes,
+//-----IAccessibility2 Implementation 2009
::com::sun::star::view::XSelectionChangeListener >
ScAccessibleDocumentImpl;
class ScAccessibleDocument
: public ScAccessibleDocumentBase,
public ScAccessibleDocumentImpl,
+//IAccessibility2 Implementation 2009-----
+ public com::sun::star::accessibility::XAccessibleGetAccFlowTo,
+//-----IAccessibility2 Implementation 2009
public accessibility::IAccessibleViewForwarder
{
public:
@@ -124,6 +135,14 @@ public:
getAccessibleStateSet(void)
throw (::com::sun::star::uno::RuntimeException);
+//IAccessibility2 Implementation 2009-----
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Any SAL_CALL getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+//-----IAccessibility2 Implementation 2009
///===== XAccessibleSelection ===========================================
virtual void SAL_CALL
@@ -318,6 +337,24 @@ private:
rtl::OUString GetCurrentCellDescription() const;
Rectangle GetVisibleArea_Impl() const;
+//IAccessibility2 Implementation 2009-----
+ com::sun::star::uno::Sequence< com::sun::star::uno::Any > GetScAccFlowToSequence();
+public:
+ ScDocument *GetDocument() const ;
+ ScAddress GetCurCellAddress() const;
+ //===== XAccessibleGetAccFromXShape ============================================
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+ SAL_CALL get_AccFlowTo(const ::com::sun::star::uno::Any& rAny, sal_Int32 nType)
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Int32 SAL_CALL getForeground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL getBackground( )
+ throw (::com::sun::star::uno::RuntimeException);
+protected:
+ void SwitchViewFireFocus();
+//-----IAccessibility2 Implementation 2009
};
diff --git a/sc/source/ui/inc/AccessibleDocumentBase.hxx b/sc/source/ui/inc/AccessibleDocumentBase.hxx
index 9ffe9c0e7b66..11c8feda9490 100644
--- a/sc/source/ui/inc/AccessibleDocumentBase.hxx
+++ b/sc/source/ui/inc/AccessibleDocumentBase.hxx
@@ -37,6 +37,9 @@ public:
ScAccessibleDocumentBase(
const ::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible>& rxParent);
+//IAccessibility2 Implementation 2009-----
+ virtual void SwitchViewFireFocus();
+//-----IAccessibility2 Implementation 2009
protected:
virtual ~ScAccessibleDocumentBase (void);
};
diff --git a/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx b/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx
index 2f4a2657321c..8adb777991be 100644
--- a/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx
+++ b/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx
@@ -85,6 +85,10 @@ public:
getAccessibleStateSet(void)
throw (::com::sun::star::uno::RuntimeException);
+//IAccessibility2 Implementation 2009-----
+ virtual ::rtl::OUString SAL_CALL getAccessibleName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+//-----IAccessibility2 Implementation 2009
///===== XServiceInfo ====================================================
/** Returns an identifier for the implementation of this object.
diff --git a/sc/source/ui/inc/AccessibleEditObject.hxx b/sc/source/ui/inc/AccessibleEditObject.hxx
index 35f7af068ad3..34faf108cc91 100644
--- a/sc/source/ui/inc/AccessibleEditObject.hxx
+++ b/sc/source/ui/inc/AccessibleEditObject.hxx
@@ -27,6 +27,10 @@
#include "AccessibleContextBase.hxx"
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include "global.hxx"
+//-----IAccessibility2 Implementation 2009
namespace accessibility
{
class AccessibleTextHelper;
@@ -46,7 +50,10 @@ enum EditObjectType
<code>AccessibleCell</code> service.
*/
class ScAccessibleEditObject
- : public ScAccessibleContextBase
+ : public ScAccessibleContextBase,
+//IAccessibility2 Implementation 2009-----
+ public ::com::sun::star::accessibility::XAccessibleSelection
+//-----IAccessibility2 Implementation 2009
{
public:
//===== internal ========================================================
@@ -71,7 +78,17 @@ public:
virtual void LostFocus();
virtual void GotFocus();
+//IAccessibility2 Implementation 2009-----
+///===== XInterface =====================================================
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ ::com::sun::star::uno::Type const & rType )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL acquire() throw ();
+
+ virtual void SAL_CALL release() throw ();
+//-----IAccessibility2 Implementation 2009
///===== XAccessibleComponent ============================================
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
@@ -110,6 +127,32 @@ public:
getAccessibleStateSet(void)
throw (::com::sun::star::uno::RuntimeException);
+ //===== XAccessibleSelection ============================================
+
+ virtual void SAL_CALL selectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL isAccessibleChildSelected(
+ sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL clearAccessibleSelection( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL selectAllAccessibleChildren( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(
+ sal_Int32 nSelectedChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL deselectAccessibleChild(
+ sal_Int32 nSelectedChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException);
+//-----IAccessibility2 Implementation 2009
protected:
/// Return this object's description.
virtual ::rtl::OUString SAL_CALL
@@ -168,6 +211,20 @@ private:
::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
void CreateTextHelper();
+//IAccessibility2 Implementation 2009-----
+ ScDocument *m_pScDoc;
+ ScAddress m_curCellAddress;
+
+
+ ///===== XAccessibleComponent ============================================
+ virtual sal_Int32 SAL_CALL getForeground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL getBackground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ sal_Int32 GetFgBgColor( const rtl::OUString &strPropColor) ;
+//-----IAccessibility2 Implementation 2009
};
diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx
index 170af5477490..f3dc86a655b6 100644
--- a/sc/source/ui/inc/AccessibleSpreadsheet.hxx
+++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx
@@ -30,6 +30,10 @@
#include <vector>
+//IAccessibility2 Implementation 2009-----
+#include "rangelst.hxx"
+#include <map>
+//-----IAccessibility2 Implementation 2009
class ScMyAddress : public ScAddress
{
public:
@@ -239,6 +243,17 @@ public:
const ::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessibleEventListener>& xListener)
throw (com::sun::star::uno::RuntimeException);
+//IAccessibility2 Implementation 2009-----
+ //===== XAccessibleTableSelection ============================================
+ virtual sal_Bool SAL_CALL selectRow( sal_Int32 row )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Bool SAL_CALL selectColumn( sal_Int32 column )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Bool SAL_CALL unselectRow( sal_Int32 row )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Bool SAL_CALL unselectColumn( sal_Int32 column )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+//-----IAccessibility2 Implementation 2009
protected:
/// Return the object's current bounding box relative to the desktop.
@@ -279,6 +294,55 @@ private:
ScDocument* GetDocument(ScTabViewShell* pViewShell);
Rectangle GetVisArea(ScTabViewShell* pViewShell, ScSplitPos eSplitPos);
Rectangle GetVisCells(const Rectangle& rVisArea);
+//IAccessibility2 Implementation 2009-----
+ //void CreateSortedMarkedCells();
+ //void AddMarkedRange(const ScRange& rRange);
+ typedef std::vector<ScMyAddress> VEC_MYADDR;
+
+ typedef std::map<ScMyAddress,com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > >
+ MAP_ADDR_XACC;
+ MAP_ADDR_XACC m_mapSelectionSend;
+ void RemoveSelection(ScMarkData &refScMarkData);
+ sal_Bool IsSameMarkCell();
+ void CommitFocusCell(const ScAddress &aNewCell);
+public:
+ void FireFirstCellFocus();
+private:
+ sal_Bool m_bFormulaMode;
+ sal_Bool m_bFormulaLastMode;
+ ScAddress m_aFormulaActiveCell;
+ MAP_ADDR_XACC m_mapFormulaSelectionSend;
+ VEC_MYADDR m_vecFormulaLastMyAddr;
+ ScAccessibleCell* m_pAccFormulaCell;
+ sal_uInt16 m_nMinX;
+ sal_uInt16 m_nMaxX;
+ sal_Int32 m_nMinY;
+ sal_Int32 m_nMaxY;
+ sal_Int32 GetRowAll() const { return m_nMaxY - m_nMinY + 1 ; }
+ sal_uInt16 GetColAll() const { return m_nMaxX - m_nMinX + 1; }
+ void NotifyRefMode();
+ void RemoveFormulaSelection(sal_Bool bRemoveAll =sal_False);
+ sal_Bool CheckChildIndex(sal_Int32)const ;
+ ScAddress GetChildIndexAddress(sal_Int32) const;
+ sal_Int32 GetAccessibleIndexFormula( sal_Int32 nRow, sal_Int32 nColumn );
+ sal_Bool GetFormulaCurrentFocusCell(ScAddress &addr);
+public:
+ sal_Bool IsScAddrFormulaSel (const ScAddress &addr) const ;
+ sal_Bool IsFormulaMode() ;
+ ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > GetActiveCell();
+ ScRange m_aLastWithInMarkRange;
+ String m_strCurCellValue;
+ ScRangeList m_LastMarkedRanges;
+ typedef std::vector<ScRange*> VEC_RANGE;
+ VEC_RANGE m_vecTempRange;
+ typedef std::pair<sal_uInt16,sal_uInt16> PAIR_COL;
+ typedef std::vector<PAIR_COL> VEC_COL;
+ VEC_COL m_vecTempCol;
+ ScMyAddress CalcScAddressFromRangeList(ScRangeList *pMarkedRanges,sal_Int32 nSelectedChildIndex);
+ sal_Bool CalcScRangeDifferenceMax(ScRange *pSrc,ScRange *pDest,int nMax,VEC_MYADDR &vecRet,int &nSize);
+ sal_Bool CalcScRangeListDifferenceMax(ScRangeList *pSrc,ScRangeList *pDest,int nMax,VEC_MYADDR &vecRet);
+ String m_strOldTabName;
+//-----IAccessibility2 Implementation 2009
};
diff --git a/sc/source/ui/inc/AccessibleTableBase.hxx b/sc/source/ui/inc/AccessibleTableBase.hxx
index dc303ed50cd6..a6f4f080d956 100644
--- a/sc/source/ui/inc/AccessibleTableBase.hxx
+++ b/sc/source/ui/inc/AccessibleTableBase.hxx
@@ -30,6 +30,9 @@
#include "address.hxx"
#include <com/sun/star/accessibility/XAccessibleTable.hpp>
#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/XAccessibleTableSelection.hpp>
+//-----IAccessibility2 Implementation 2009
#include <cppuhelper/implbase2.hxx>
class ScTabViewShell;
@@ -45,6 +48,9 @@ typedef cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessibleTable,
class ScAccessibleTableBase :
public ScAccessibleContextBase,
+//IAccessibility2 Implementation 2009-----
+ public ::com::sun::star::accessibility::XAccessibleTableSelection,
+//-----IAccessibility2 Implementation 2009
public ScAccessibleTableBaseImpl
{
public:
@@ -199,6 +205,16 @@ public:
getAccessibleChild(sal_Int32 nIndex)
throw (::com::sun::star::uno::RuntimeException,
::com::sun::star::lang::IndexOutOfBoundsException);
+//IAccessibility2 Implementation 2009-----
+ virtual sal_Bool SAL_CALL selectRow( sal_Int32 row )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Bool SAL_CALL selectColumn( sal_Int32 column )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Bool SAL_CALL unselectRow( sal_Int32 row )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Bool SAL_CALL unselectColumn( sal_Int32 column )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+//-----IAccessibility2 Implementation 2009
protected:
/// Return this object's description.
diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx
index b33f00b90921..9664a6d84688 100644
--- a/sc/source/ui/inc/AccessibleText.hxx
+++ b/sc/source/ui/inc/AccessibleText.hxx
@@ -132,7 +132,11 @@ private:
class ScAccessibleEditObjectTextData : public ScAccessibleTextData
{
public:
- ScAccessibleEditObjectTextData(EditView* pEditView, Window* pWin);
+//IAccessibility2 Implementation 2009-----
+ // Solution: Add a para to indicate whether the object is cloned
+ //ScAccessibleEditObjectTextData(EditView* pEditView, Window* pWin);
+ ScAccessibleEditObjectTextData(EditView* pEditView, Window* pWin, sal_Bool isClone=sal_False);
+//-----IAccessibility2 Implementation 2009
virtual ~ScAccessibleEditObjectTextData();
virtual ScAccessibleTextData* Clone() const;
@@ -155,6 +159,9 @@ protected:
EditEngine* mpEditEngine;
SvxEditEngineForwarder* mpForwarder;
Window* mpWindow;
+//IAccessibility2 Implementation 2009-----
+ sal_Bool mbIsCloned;
+//-----IAccessibility2 Implementation 2009
};
diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
index aafd55717cc6..88d65e1121f6 100644
--- a/sc/source/ui/inc/content.hxx
+++ b/sc/source/ui/inc/content.hxx
@@ -34,6 +34,9 @@ class ScNavigatorSettings;
class ScDocument;
class ScDocShell;
class ScAreaLink;
+//IAccessibility2 Implementation 2009-----
+class SdrPage;
+//-----IAccessibility2 Implementation 2009
#define SC_CONTENT_ROOT 0
#define SC_CONTENT_TABLE 1
@@ -64,6 +67,10 @@ class ScContentTree : public SvTreeListBox
String aHiddenName; // URL zum Laden
String aHiddenTitle; // fuer Anzeige
ScDocument* pHiddenDocument; // temporaer
+//IAccessibility2 Implementation 2009-----
+ sal_Bool bisInNavigatoeDlg;
+ String sKeyString;
+//-----IAccessibility2 Implementation 2009
sal_uInt16 pPosList[SC_CONTENT_COUNT]; // fuer die Reihenfolge
@@ -112,7 +119,12 @@ class ScContentTree : public SvTreeListBox
DECL_LINK( ContentDoubleClickHdl, ScContentTree* );
DECL_STATIC_LINK( ScContentTree, ExecDragHdl, void* );
+//IAccessibility2 Implementation 2009-----
+public:
+ SvLBoxEntry* pTmpEntry;
+ bool m_bFirstPaint;
+//-----IAccessibility2 Implementation 2009
protected:
// virtual sal_Bool Drop( const DropEvent& rEvt );
// virtual sal_Bool QueryDrop( DropEvent& rEvt );
@@ -126,11 +138,21 @@ protected:
virtual void Command( const CommandEvent& rCEvt );
virtual void RequestHelp( const HelpEvent& rHEvt );
-
+//IAccessibility2 Implementation 2009-----
+ virtual void InitEntry(SvLBoxEntry*,const XubString&,const Image&,const Image&, SvLBoxButtonKind);
+//-----IAccessibility2 Implementation 2009
public:
ScContentTree( Window* pParent, const ResId& rResId );
~ScContentTree();
+//IAccessibility2 Implementation 2009-----
+ String getAltLongDescText( SvLBoxEntry* pEntry , sal_Bool isAltText) const;
+ String GetEntryAltText( SvLBoxEntry* pEntry ) const;
+ String GetEntryLongDescription( SvLBoxEntry* pEntry ) const;
+
+ void ObjectFresh( sal_uInt16 nType,SvLBoxEntry* pEntry = NULL);
+ sal_Bool SetNavigatorDlgFlag(sal_Bool isInNavigatoeDlg){ return bisInNavigatoeDlg=isInNavigatoeDlg;};
+//-----IAccessibility2 Implementation 2009
virtual void MouseButtonDown( const MouseEvent& rMEvt );
virtual void KeyInput( const KeyEvent& rKEvt );
diff --git a/sc/source/ui/inc/dbnamdlg.hxx b/sc/source/ui/inc/dbnamdlg.hxx
index 680804ce40e2..3ee3dae45fd8 100644
--- a/sc/source/ui/inc/dbnamdlg.hxx
+++ b/sc/source/ui/inc/dbnamdlg.hxx
@@ -100,6 +100,10 @@ private:
ScDBCollection aLocalDbCol;
ScRange theCurArea;
List aRemoveList;
+ //IAccessibility2 Implementation 2009-----
+ Timer SynFocusTimer;
+ DECL_LINK( FocusToComoboxHdl, Timer* );
+ //-----IAccessibility2 Implementation 2009
#ifdef _DBNAMDLG_CXX
private:
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 2d549f767703..e2d8769f3286 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -404,6 +404,14 @@ public:
const ScOptSolverSave* GetSolverSaveData() const { return pSolverSaveData; } // may be null
void SetSolverSaveData( const ScOptSolverSave& rData );
+
+//IAccessibility2 Implementation 2009-----
+ virtual void setDocAccTitle( const String& rTitle ) { aDocument.setDocAccTitle( rTitle ); }
+ virtual const String getDocAccTitle() const { return aDocument.getDocAccTitle(); }
+ void setDocReadOnly( sal_Bool b){ aDocument.setDocReadOnly(b);}
+ sal_Bool getDocReadOnly() const { return aDocument.getDocReadOnly(); }
+//-----IAccessibility2 Implementation 2009
+
//<!--Added by PengYunQuan for Validity Cell Range Picker
sal_Bool AcceptStateUpdate() const;
//-->Added by PengYunQuan for Validity Cell Range Picker
diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx
index 1759e6c8e7e6..caf61e219fd0 100644
--- a/sc/source/ui/inc/drawview.hxx
+++ b/sc/source/ui/inc/drawview.hxx
@@ -151,6 +151,10 @@ public:
SdrEndTextEditKind ScEndTextEdit(); // ruft SetDrawTextUndo(0)
//UNUSED2009-05 void CaptionTextDirection(sal_uInt16 nSlot);
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > CopyToTransferable();
+//IAccessibility2 Implementation 2009-----
+ SdrObject* GetObjectByName(const String& rName);
+ sal_Bool SelectCurrentViewObject( const String& rName );
+//-----IAccessibility2 Implementation 2009
};
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 127f72b73e26..d7077fb0f991 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -239,7 +239,9 @@ private:
void ExecPageFieldSelect( SCCOL nCol, SCROW nRow, sal_Bool bHasSelection, const String& rStr );
sal_Bool HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange );
-
+//IAccessibility2 Implementation 2009-----
+ sal_Bool HasScenarioRange( sal_uInt16 nCol, sal_Int32 nRow, ScRange& rScenRange );
+//-----IAccessibility2 Implementation 2009
sal_Bool DropScroll( const Point& rMousePos );
sal_Int8 AcceptPrivateDrop( const AcceptDropEvent& rEvt );
@@ -388,6 +390,9 @@ public:
void DoInvertRect( const Rectangle& rPixel );
void CheckNeedsRepaint();
+//IAccessibility2 Implementation 2009-----
+ virtual void SwitchView();
+//-----IAccessibility2 Implementation 2009
void UpdateDPFromFieldPopupMenu();
diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx
index 4788dde2115f..bb469189161e 100644
--- a/sc/source/ui/inc/preview.hxx
+++ b/sc/source/ui/inc/preview.hxx
@@ -158,6 +158,9 @@ public:
static void StaticInvalidate();
FmFormView* GetDrawView() { return pDrawView; }
+//IAccessibility2 Implementation 2009-----
+ virtual void SwitchView();
+//-----IAccessibility2 Implementation 2009
};
diff --git a/sc/source/ui/inc/scuitphfedit.hxx b/sc/source/ui/inc/scuitphfedit.hxx
index 7770b27eec0f..a297bab5d356 100644
--- a/sc/source/ui/inc/scuitphfedit.hxx
+++ b/sc/source/ui/inc/scuitphfedit.hxx
@@ -91,6 +91,9 @@ private:
sal_uInt16 nWhich;
String aCmdArr[6];
+ //IAccessibility2 Implementation 2009-----
+ DECL_LINK( ObjectSelectHdl, ScEditWindow* );
+ //-----IAccessibility2 Implementation 2009
private:
#ifdef _TPHFEDIT_CXX
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index d1b6c3017fbe..2efdcb0a0404 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -471,7 +471,7 @@ public:
sal_Bool bCols = sal_False, sal_Bool bRows = sal_False, sal_Bool bCellSelection = sal_False );
void InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
sal_Bool bTestNeg = sal_False,
- sal_Bool bCols = sal_False, sal_Bool bRows = sal_False );
+ sal_Bool bCols = sal_False, sal_Bool bRows = sal_False, sal_Bool bForceNeg = sal_False );
void InitOwnBlockMode();
void DoneBlockMode( sal_Bool bContinue = sal_False );
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 4fc864018956..e93b6d55369c 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -161,7 +161,9 @@ private:
sal_Bool bPrintSelected; // for result of SvxPrtQryBox
sal_Bool bReadOnly; // um Status-Aenderungen zu erkennen
-
+//IAccessibility2 Implementation 2009-----
+ sal_Bool bIsActive;
+//-----IAccessibility2 Implementation 2009
SbxObject* pScSbxObject;
//UNUSED2008-05 sal_Bool bChartDlgIsEdit; // Datenbereich aendern
@@ -421,6 +423,11 @@ public:
bool ExecuteRetypePassDlg(ScPasswordHash eDesiredHash);
using ScTabView::ShowCursor;
+//IAccessibility2 Implementation 2009-----
+ sal_Bool IsActive(){ return bIsActive; }
+ rtl::OUString GetFormula(ScAddress& rAddress);
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & GetForms() const;
+//-----IAccessibility2 Implementation 2009
};
//==================================================================
diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx
index 8fe160f4f8e2..8a87b5252bed 100644
--- a/sc/source/ui/inc/tphfedit.hxx
+++ b/sc/source/ui/inc/tphfedit.hxx
@@ -78,6 +78,9 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
inline ScHeaderEditEngine* GetEditEngine() const {return pEdEngine;}
+ //IAccessibility2 Implementation 2009-----
+ void SetObjectSelectHdl( const Link& aLink){ aObjectSelectLink = aLink; };
+ //-----IAccessibility2 Implementation 2009
protected:
virtual void Paint( const Rectangle& rRec );
virtual void MouseMove( const MouseEvent& rMEvt );
@@ -96,6 +99,11 @@ private:
com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible > xAcc;
ScAccessibleEditObject* pAcc;
+
+ //IAccessibility2 Implementation 2009-----
+ Link aObjectSelectLink;
+ //-----IAccessibility2 Implementation 2009
+
};
//===================================================================
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 21f4652fdda5..1d0fc5e2af36 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -93,9 +93,8 @@ class ScValidationDlg :public ScRefHdlrImpl<ScValidationDlg, SfxTabDialog, false
//<!--Added by PengYunQuan for Validity Cell Range Picker
typedef ScRefHdlrImpl<ScValidationDlg, SfxTabDialog, false> ScValidationDlgBase;
- //Start_Moddify by liliang 03/26/2008 SODC_13677_2
DECL_LINK( OkHdl, Button * );
- //End_Moddify by liliang 03/26/2008 SODC_13677_2
+
bool m_bOwnRefHdlr:1;
ScTabViewShell *m_pTabVwSh;
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 3f2d1f9b0867..262f16e4c551 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -251,8 +251,11 @@ public:
ScAutoFormatData* CreateAutoFormatData();
void AutoFormat( sal_uInt16 nFormatNo, sal_Bool bRecord = sal_True );
- void SearchAndReplace( const SvxSearchItem* pSearchItem,
+//IAccessibility2 Implementation 2009-----
+// void SearchAndReplace( const SvxSearchItem* pSearchItem,
+ sal_Bool SearchAndReplace( const SvxSearchItem* pSearchItem,
sal_Bool bAddUndo, sal_Bool bIsApi );
+//-----IAccessibility2 Implementation 2009
void Solve( const ScSolveParam& rParam );
void TabOp( const ScTabOpParam& rParam, sal_Bool bRecord = sal_True );
diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx
index 564caec25d37..af135722b3a6 100644
--- a/sc/source/ui/miscdlgs/highred.cxx
+++ b/sc/source/ui/miscdlgs/highred.cxx
@@ -105,6 +105,7 @@ ScHighlightChgDlg::ScHighlightChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Wind
Init();
+ aFilterCtr.SetAccessibleRelationMemberOf(&aFlFilter);
}
ScHighlightChgDlg::~ScHighlightChgDlg()
@@ -257,6 +258,9 @@ IMPL_LINK( ScHighlightChgDlg, RefHandle, SvxTPFilter*, pRef )
aEdAssign.Show();
aRbAssign.Show();
aEdAssign.SetText(aFilterCtr.GetRange());
+ //IAccessibility2 Implementation 2009-----
+ aEdAssign.GrabFocus();
+ //-----IAccessibility2 Implementation 2009
ScAnyRefDlg::RefInputStart(&aEdAssign,&aRbAssign);
}
return 0;
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index 172fb0547c38..f572efa57cf4 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -84,10 +84,34 @@ public:
void SetDoubleValue( double fNew ) { mbIsDouble = true; mfDoubleValue = fNew; }
void SetIntValue( sal_Int32 nNew ) { mbIsDouble = false; mnIntValue = nNew; }
-
+ //IAccessibility2 Implementation 2009-----
+// MT: Commented out SV_ITEM_ID_EXTENDRLBOXSTRING and GetExtendText() in svlbitem.hxx - needed?
+// virtual USHORT IsA() {return SV_ITEM_ID_EXTENDRLBOXSTRING;}
+// virtual XubString GetExtendText() const;
+ //-----IAccessibility2 Implementation 2009
virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry );
};
+//IAccessibility2 Implementation 2009-----
+// MT: Commented out SV_ITEM_ID_EXTENDRLBOXSTRING and GetExtendText() in svlbitem.hxx - needed?
+/*
+XubString ScSolverOptionsString::GetExtendText() const
+{
+ String aNormalStr( GetText() );
+ aNormalStr.Append( (sal_Unicode) ':' );
+ String sTxt( ' ' );
+ if ( mbIsDouble )
+ sTxt += (String)rtl::math::doubleToUString( mfDoubleValue,
+ rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max,
+ ScGlobal::GetpLocaleData()->getNumDecimalSep().GetChar(0), true );
+ else
+ sTxt += String::CreateFromInt32( mnIntValue );
+ aNormalStr.Append(sTxt);
+ return aNormalStr;
+}
+*/
+//-----IAccessibility2 Implementation 2009
+
void ScSolverOptionsString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* /* pEntry */ )
{
//! move position? (SvxLinguTabPage: aPos.X() += 20)
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index f0de273cbbc8..c212cdeb1e08 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -64,6 +64,10 @@
#include "navicfg.hxx"
#include "navsett.hxx"
#include "postit.hxx"
+//IAccessibility2 Implementation 2009-----
+#include "tabvwsh.hxx"
+#include "drawview.hxx"
+//-----IAccessibility2 Implementation 2009
#include "clipparam.hxx"
using namespace com::sun::star;
@@ -125,7 +129,10 @@ ScContentTree::ScContentTree( Window* pParent, const ResId& rResId ) :
aHCEntryImages ( ScResId( RID_IMAGELIST_H_NAVCONT ) ),
nRootType ( SC_CONTENT_ROOT ),
bHiddenDoc ( sal_False ),
- pHiddenDocument ( NULL )
+ pHiddenDocument ( NULL ),
+//IAccessibility2 Implementation 2009-----
+ bisInNavigatoeDlg ( sal_False )
+//-----IAccessibility2 Implementation 2009
{
sal_uInt16 i;
for (i=0; i<SC_CONTENT_COUNT; i++)
@@ -141,12 +148,80 @@ ScContentTree::ScContentTree( Window* pParent, const ResId& rResId ) :
SetDoubleClickHdl( LINK( this, ScContentTree, ContentDoubleClickHdl ) );
+ //IAccessibility2 Implementation 2009-----
+ pTmpEntry= NULL;
+ m_bFirstPaint=true;
+ //-----IAccessibility2 Implementation 2009
+
SetStyle( GetStyle() | WB_QUICK_SEARCH );
}
ScContentTree::~ScContentTree()
{
}
+//IAccessibility2 Implementation 2009-----
+// helper function for GetEntryAltText and GetEntryLongDescription
+String ScContentTree::getAltLongDescText( SvLBoxEntry* pEntry , sal_Bool isAltText) const
+{
+ SdrObject* pFound = NULL;
+
+ sal_uInt16 nType;
+ sal_uLong nChild;
+ GetEntryIndexes( nType, nChild, pEntry );
+ switch( nType )
+ {
+ case SC_CONTENT_OLEOBJECT:
+ case SC_CONTENT_GRAPHIC:
+ case SC_CONTENT_DRAWING:
+ {
+ ScDocument* pDoc = ( const_cast< ScContentTree* >(this) )->GetSourceDocument();
+ SdrIterMode eIter = ( nType == SC_CONTENT_DRAWING ) ? IM_FLAT : IM_DEEPNOGROUPS;
+ ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
+ SfxObjectShell* pShell = pDoc->GetDocumentShell();
+ if (pDrawLayer && pShell)
+ {
+ sal_uInt16 nTabCount = pDoc->GetTableCount();
+ for (sal_uInt16 nTab=0; nTab<nTabCount; nTab++)
+ {
+ SdrPage* pPage = pDrawLayer->GetPage(nTab);
+ DBG_ASSERT(pPage,"Page ?");
+ if (pPage)
+ {
+ SdrObjListIter aIter( *pPage, eIter );
+ SdrObject* pObject = aIter.Next();
+ while (pObject)
+ {
+ if( ScDrawLayer::GetVisibleName( pObject ) == GetEntryText( pEntry ) )
+ {
+ pFound = pObject;
+ break;
+ }
+ pObject = aIter.Next();
+ }
+ }
+ }
+ }
+ if( pFound )
+ {
+ if( isAltText )
+ return pFound->GetTitle();
+ else
+ return pFound->GetDescription();
+ }
+ }
+ break;
+ }
+ return String();
+}
+String ScContentTree::GetEntryAltText( SvLBoxEntry* pEntry ) const
+{
+ return getAltLongDescText( pEntry, sal_True );
+}
+String ScContentTree::GetEntryLongDescription( SvLBoxEntry* pEntry ) const
+{
+ return getAltLongDescText( pEntry, sal_False);
+}
+//-----IAccessibility2 Implementation 2009
void ScContentTree::InitRoot( sal_uInt16 nType )
{
@@ -174,7 +249,17 @@ void ScContentTree::InitRoot( sal_uInt16 nType )
void ScContentTree::ClearAll()
{
+//IAccessibility2 Implementation 2009-----
+ //There are one method in Control::SetUpdateMode(), and one override method SvTreeListBox::SetUpdateMode(). Here although
+ //SvTreeListBox::SetUpdateMode() is called in refresh method, it only call SvTreeListBox::SetUpdateMode(), not Control::SetUpdateMode().
+ //In SvTreeList::Clear(), Broadcast( LISTACTION_CLEARED ) will be called and finally, it will be trapped into the event yield() loop. And
+ //the InitRoot() method won't be called. Then if a user click or press key to update the navigator tree, crash happens.
+ //So the solution is to disable the UpdateMode of Control, then call Clear(), then recover the update mode
+ sal_Bool bOldUpdate = Control::IsUpdateMode();
+ Control::SetUpdateMode(sal_False);
Clear();
+ Control::SetUpdateMode(bOldUpdate);
+//-----IAccessibility2 Implementation 2009
for (sal_uInt16 i=1; i<SC_CONTENT_COUNT; i++)
InitRoot(i);
}
@@ -402,10 +487,90 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt )
break;
}
}
- StoreSettings();
+//IAccessibility2 Implementation 2009-----
+ //Solution: Make KEY_SPACE has same function as DoubleClick
+ if ( bisInNavigatoeDlg )
+ {
+ if(aCode.GetCode() == KEY_SPACE )
+ {
+ bUsed = sal_True;
+ sal_uInt16 nType;
+ sal_uLong nChild;
+ SvLBoxEntry* pEntry = GetCurEntry();
+ GetEntryIndexes( nType, nChild, pEntry );
+ if( pEntry && (nType != SC_CONTENT_ROOT) && (nChild != SC_CONTENT_NOCHILD) )
+ {
+ if ( bHiddenDoc )
+ return ; //! spaeter...
+ String aText( GetEntryText( pEntry ) );
+ sKeyString = aText;
+ if ( aManualDoc.Len() )
+ pParentWindow->SetCurrentDoc( aManualDoc );
+ switch( nType )
+ {
+ case SC_CONTENT_OLEOBJECT:
+ case SC_CONTENT_GRAPHIC:
+ case SC_CONTENT_DRAWING:
+ {
+ Window* pWindow=(Window*)GetParent(pEntry);
+ ScNavigatorDlg* pScNavigatorDlg = (ScNavigatorDlg*)pWindow;
+ ScTabViewShell* pScTabViewShell = NULL;
+ ScDrawView* pScDrawView = NULL;
+ if (pScNavigatorDlg!=NULL)
+ pScTabViewShell=pScNavigatorDlg->GetTabViewShell();
+ if(pScTabViewShell !=NULL)
+ pScDrawView =pScTabViewShell->GetViewData()->GetScDrawView();
+ if(pScDrawView!=NULL)
+ {
+ pScDrawView->SelectCurrentViewObject(aText );
+ bool bHasMakredObject(false);
+ SvLBoxEntry* pParent = pRootNodes[nType];
+ SvLBoxEntry* pBeginEntry = NULL;
+ if( pParent )
+ pBeginEntry = FirstChild(pParent);
+
+ while( pBeginEntry )
+ {
+ const String aTempText(GetEntryText(pBeginEntry));
+ const SdrObject* pCandidate = pScDrawView->GetObjectByName(aTempText);
+
+ if(pCandidate && pScDrawView->isSdrObjectSelected(*pCandidate))
+ {
+ bHasMakredObject = true;
+ break;
+ }
+
+ pBeginEntry = Next( pBeginEntry );
+ }
+
+ if( !bHasMakredObject && pScTabViewShell)
+ pScTabViewShell->SetDrawShell(sal_False);
+ ObjectFresh( nType,pEntry );
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+ //StoreSettings();
+ //-----IAccessibility2 Implementation 2009
if( !bUsed )
+ //IAccessibility2 Implementation 2009-----
+ {
+ if(aCode.GetCode() == KEY_F5 )
+ {
+ StoreSettings();
SvTreeListBox::KeyInput(rKEvt);
+ }
+ else
+ {
+ SvTreeListBox::KeyInput(rKEvt);
+ StoreSettings();
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
}
//sal_Bool __EXPORT ScContentTree::Drop( const DropEvent& rEvt )
@@ -606,6 +771,56 @@ ScDocument* ScContentTree::GetSourceDocument()
return NULL;
}
+//IAccessibility2 Implementation 2009-----
+//Solution: move along and draw "*" sign .
+void ScContentTree::ObjectFresh( sal_uInt16 nType,SvLBoxEntry* pEntry )
+{
+ if ( bHiddenDoc && !pHiddenDocument )
+ return; // anderes Dokument angezeigt
+ if(nType ==SC_CONTENT_GRAPHIC||nType ==SC_CONTENT_OLEOBJECT||nType ==SC_CONTENT_DRAWING)
+ {
+ SetUpdateMode(sal_False);
+ ClearType( nType );
+ /*sal_uInt16 nId = OBJ_GRAF;
+ switch( nType )
+ {
+ case SC_CONTENT_OLEOBJECT:
+ nId = OBJ_OLE2;
+ break;
+ case SC_CONTENT_DRAWING:
+ nId = OBJ_GRUP;
+ break;
+ }*/
+ GetDrawNames( nType/*, nId*/ );
+ if( !pEntry )
+ ApplySettings();
+ SetUpdateMode(sal_True);
+ if( pEntry )
+ {
+ SvLBoxEntry* pParent = pRootNodes[nType];
+ SvLBoxEntry* pBeginEntry = NULL;
+ SvLBoxEntry* pOldEntry = NULL;
+ if( pParent )
+ pBeginEntry = FirstChild(pParent);
+ while( pBeginEntry )
+ {
+ String aTempText( GetEntryText( pBeginEntry ) );
+ if( aTempText == sKeyString )
+ {
+ pOldEntry = pBeginEntry;
+ break;
+ }
+ pBeginEntry = Next( pBeginEntry );
+ }
+ if( pOldEntry )
+ {
+ Expand(pParent);
+ Select( pOldEntry,sal_True);
+ }
+ }
+ }
+}
+//-----IAccessibility2 Implementation 2009
void ScContentTree::Refresh( sal_uInt16 nType )
{
if ( bHiddenDoc && !pHiddenDocument )
@@ -792,9 +1007,46 @@ void ScContentTree::GetDrawNames( sal_uInt16 nType )
{
String aName = ScDrawLayer::GetVisibleName( pObject );
if (aName.Len())
- InsertContent( nType, aName );
+ {
+ //IAccessibility2 Implementation 2009-----
+ //InsertContent( nType, aName );
+ if( bisInNavigatoeDlg )
+ {
+ if (nType >= SC_CONTENT_COUNT)
+ {
+ DBG_ERROR("ScContentTree::InsertContent mit falschem Typ");
+ return;
}
-
+ SvLBoxEntry* pParent = pRootNodes[nType];
+ if (pParent)
+ {
+ SvLBoxEntry* pChild=InsertEntry( aName, pParent );
+ if(pChild)
+ pChild->SetMarked( sal_False);
+ Window* pWindow=NULL;
+ ScTabViewShell* pScTabViewShell=NULL;
+ ScDrawView* pScDrawView=NULL;
+ ScNavigatorDlg* pScNavigatorDlg=NULL;
+ if(pChild)
+ pWindow=(Window*)GetParent(pChild);
+ if(pWindow)
+ pScNavigatorDlg = (ScNavigatorDlg*)pWindow;
+ if (pScNavigatorDlg!=NULL)
+ pScTabViewShell=pScNavigatorDlg->GetTabViewShell();
+ if(pScTabViewShell !=NULL)
+ pScDrawView =pScTabViewShell->GetViewData()->GetScDrawView();
+
+ if(pScDrawView)
+ {
+ pChild->SetMarked(pScDrawView->isSdrObjectSelected(*pObject));
+ }
+ }//end if parent
+ else
+ DBG_ERROR("InsertContent ohne Parent");
+ }
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
pObject = aIter.Next();
}
}
@@ -1517,7 +1769,50 @@ void ScContentTree::StoreSettings() const
}
}
+//IAccessibility2 Implementation 2009-----
+class ScContentLBoxString : public SvLBoxString
+{
+public:
+ ScContentLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags,
+ const String& rStr ) : SvLBoxString(pEntry,nFlags,rStr) {}
+ virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
+ SvLBoxEntry* pEntry);
+};
+void ScContentTree::InitEntry(SvLBoxEntry* pEntry,
+ const XubString& rStr ,const Image& rImg1,const Image& rImg2, SvLBoxButtonKind eButtonKind)
+{
+ sal_uInt16 nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2"
+ SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind );
+ SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nColToHilite );
+ ScContentLBoxString* pStr = new ScContentLBoxString( pEntry, 0, pCol->GetText() );
+ pEntry->ReplaceItem( pStr, nColToHilite );
+}
+void ScContentLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
+ SvLBoxEntry* pEntry )
+{
+ // IA2 CWS. MT: Removed for now (also in SvLBoxEntry) - only used in Sw/Sd/ScContentLBoxString, they should decide if they need this
+ /*
+ if (pEntry->IsMarked())
+ {
+ rDev.DrawText( rPos, GetText() );
+ XubString str;
+ str = XubString::CreateFromAscii("*");
+ Point rPosStar(rPos.X()-6,rPos.Y());
+ Font aOldFont( rDev.GetFont());
+ Font aFont(aOldFont);
+ Color aCol( aOldFont.GetColor() );
+ aCol.DecreaseLuminance( 200 );
+ aFont.SetColor( aCol );
+ rDev.SetFont( aFont );
+ rDev.DrawText( rPosStar, str);
+ rDev.SetFont( aOldFont );
+ }
+ else
+ */
+ SvLBoxString::Paint( rPos, rDev, nFlags, pEntry);
+}
+//-----IAccessibility2 Implementation 2009
//
//------------------------------------------------------------------------
//
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 6f6faddbd7f0..3259bebae44e 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -785,6 +785,9 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win
aTbxCmd.Select(IID_ZOOMOUT);
aTbxCmd.RemoveItem(aTbxCmd.GetItemPos(IID_ZOOMOUT));
}
+ //IAccessibility2 Implementation 2009-----
+ aLbEntries.SetNavigatorDlgFlag(sal_True);
+ //-----IAccessibility2 Implementation 2009
}
//------------------------------------------------------------------------
@@ -985,7 +988,13 @@ void __EXPORT ScNavigatorDlg::Notify( SfxBroadcaster&, const SfxHint& rHint )
case FID_ANYDATACHANGED:
aContentTimer.Start(); // Notizen nicht sofort suchen
break;
-
+ //IAccessibility2 Implementation 2009-----
+ case FID_KILLEDITVIEW:
+ aLbEntries.ObjectFresh( SC_CONTENT_OLEOBJECT );
+ aLbEntries.ObjectFresh( SC_CONTENT_DRAWING );
+ aLbEntries.ObjectFresh( SC_CONTENT_GRAPHIC );
+ break;
+ //-----IAccessibility2 Implementation 2009
default:
break;
}
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 8b828bff93df..d614ff0bed3e 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -166,6 +166,18 @@ ScHFEditPage::ScHFEditPage( Window* pParent,
aWndCenter. SetFont( aPatAttr );
aWndRight. SetFont( aPatAttr );
+ //IAccessibility2 Implementation 2009-----
+ aWndLeft.SetObjectSelectHdl( LINK(this,ScHFEditPage,ObjectSelectHdl) );
+ aWndCenter.SetObjectSelectHdl( LINK(this,ScHFEditPage,ObjectSelectHdl) );
+ aWndRight.SetObjectSelectHdl( LINK(this,ScHFEditPage,ObjectSelectHdl) );
+ aBtnText.SetAccessibleRelationMemberOf( &maFtCustomHF );
+ aBtnFile.SetAccessibleRelationMemberOf( &maFtCustomHF );
+ aBtnTable.SetAccessibleRelationMemberOf( &maFtCustomHF );
+ aBtnPage.SetAccessibleRelationMemberOf( &maFtCustomHF );
+ aBtnLastPage.SetAccessibleRelationMemberOf( &maFtCustomHF );
+ aBtnDate.SetAccessibleRelationMemberOf( &maFtCustomHF );
+ aBtnTime.SetAccessibleRelationMemberOf( &maFtCustomHF );
+ //-----IAccessibility2 Implementation 2009
FillCmdArr();
aWndLeft.GrabFocus();
@@ -174,6 +186,14 @@ ScHFEditPage::ScHFEditPage( Window* pParent,
FreeResource();
}
+ //IAccessibility2 Implementation 2009-----
+ IMPL_LINK( ScHFEditPage, ObjectSelectHdl, ScEditWindow*, pEdit )
+ {
+ (void)pEdit;
+ aBtnText.GrabFocus();
+ return NULL;
+ }
+ //-----IAccessibility2 Implementation 2009
// -----------------------------------------------------------------------
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index dd389f8e9563..f99a21760543 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -564,6 +564,10 @@ void __EXPORT ScEditWindow::Paint( const Rectangle& rRec )
Control::Paint( rRec );
pEdView->Paint( rRec );
+ //IAccessibility2 Implementation 2009-----
+ if( HasFocus() )
+ pEdView->ShowCursor(sal_True,sal_True);
+ //-----IAccessibility2 Implementation 2009
}
// -----------------------------------------------------------------------
@@ -605,6 +609,14 @@ void __EXPORT ScEditWindow::KeyInput( const KeyEvent& rKEvt )
{
Control::KeyInput( rKEvt );
}
+ //IAccessibility2 Implementation 2009-----
+ else if ( !rKEvt.GetKeyCode().IsMod1() && !rKEvt.GetKeyCode().IsShift() &&
+ rKEvt.GetKeyCode().IsMod2() && rKEvt.GetKeyCode().GetCode() == KEY_DOWN )
+ {
+ if (aObjectSelectLink.IsSet() )
+ aObjectSelectLink.Call(this);
+ }
+ //-----IAccessibility2 Implementation 2009
}
// -----------------------------------------------------------------------
@@ -618,6 +630,9 @@ void ScEditWindow::Command( const CommandEvent& rCEvt )
void __EXPORT ScEditWindow::GetFocus()
{
+ //IAccessibility2 Implementation 2009-----
+ pEdView->ShowCursor(sal_True,sal_True);
+ //-----IAccessibility2 Implementation 2009
pActiveEdWnd = this;
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xTemp = xAcc;
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 9d58c6d1f266..c5469aefc31b 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -703,6 +703,89 @@ void __EXPORT ScDrawView::UpdateUserViewOptions()
#pragma optimize ( "", on )
#endif
+//IAccessibility2 Implementation 2009-----
+SdrObject* ScDrawView::GetObjectByName(const String& rName)
+{
+ SfxObjectShell* pShell = pDoc->GetDocumentShell();
+ if (pShell)
+ {
+ SdrModel& rDrawLayer = getSdrModelFromSdrView();
+ sal_uInt16 nTabCount = pDoc->GetTableCount();
+ for (sal_uInt16 i=0; i<nTabCount; i++)
+ {
+ SdrPage* pPage = rDrawLayer.GetPage(i);
+ DBG_ASSERT(pPage,"Page ?");
+ if (pPage)
+ {
+ SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
+ SdrObject* pObject = aIter.Next();
+ while (pObject)
+ {
+ if ( ScDrawLayer::GetVisibleName( pObject ) == rName )
+ {
+ return pObject;
+ }
+ pObject = aIter.Next();
+ }
+ }
+ }
+ }
+ return 0;
+}
+//Solution: realize multi-selection of objects
+//==================================================
+sal_Bool ScDrawView::SelectCurrentViewObject( const String& rName )
+{
+ sal_uInt16 nObjectTab = 0;
+ SdrObject* pFound = NULL;
+ sal_Bool bUnMark=sal_False;
+ SfxObjectShell* pShell = pDoc->GetDocumentShell();
+ if (pShell)
+ {
+ SdrModel& rDrawLayer = getSdrModelFromSdrView();
+ sal_uInt16 nTabCount = pDoc->GetTableCount();
+ for (sal_uInt16 i=0; i<nTabCount && !pFound; i++)
+ {
+ SdrPage* pPage = rDrawLayer.GetPage(i);
+ DBG_ASSERT(pPage,"Page ?");
+ if (pPage)
+ {
+ SdrObjListIter aIter( *pPage, IM_DEEPWITHGROUPS );
+ SdrObject* pObject = aIter.Next();
+ while (pObject && !pFound)
+ {
+ if ( ScDrawLayer::GetVisibleName( pObject ) == rName )
+ {
+ pFound = pObject;
+ nObjectTab = i;
+ }
+ pObject = aIter.Next();
+ }
+ }
+ }
+ }
+ if ( pFound )
+ {
+ ScTabView* pView = pViewData->GetView();
+ if ( nObjectTab != nTab ) // Tabelle umschalten
+ pView->SetTabNo( nObjectTab );
+ DBG_ASSERT( nTab == nObjectTab, "Tabellen umschalten hat nicht geklappt" );
+ pView->ScrollToObject( pFound );
+ if ( pFound->GetLayer() == SC_LAYER_BACK &&
+ !pViewData->GetViewShell()->IsDrawSelMode() &&
+ !pDoc->IsTabProtected( nTab ) &&
+ !pViewData->GetSfxDocShell()->IsReadOnly() )
+ {
+ SdrLayer* pLayer = getSdrModelFromSdrView().GetModelLayerAdmin().GetLayerPerID(SC_LAYER_BACK);
+ if (pLayer)
+ SetLayerLocked( pLayer->GetName(), sal_False );
+ }
+ bUnMark = isSdrObjectSelected(*pFound);
+ MarkObj(*pFound, bUnMark);
+ }
+ return ( bUnMark );
+}
+//-----IAccessibility2 Implementation 2009
sal_Bool ScDrawView::SelectObject( const String& rName )
{
UnmarkAll();
@@ -761,6 +844,23 @@ sal_Bool ScDrawView::SelectObject( const String& rName )
return ( pFound != NULL );
}
+//UNUSED2008-05 String ScDrawView::GetSelectedChartName() const
+//UNUSED2008-05 {
+//UNUSED2008-05 // used for modifying a chart's data area - PersistName must always be used
+//UNUSED2008-05 // (as in ScDocument::FindChartData and UpdateChartArea)
+//UNUSED2008-05
+//UNUSED2008-05 const SdrMarkList& rMarkList = GetMarkedObjectList();
+//UNUSED2008-05 if (rMarkList.GetMarkCount() == 1)
+//UNUSED2008-05 {
+//UNUSED2008-05 SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+//UNUSED2008-05 if (pObj->GetObjIdentifier() == OBJ_OLE2)
+//UNUSED2008-05 if ( pDoc->IsChart(pObj) )
+//UNUSED2008-05 return static_cast<SdrOle2Obj*>(pObj)->GetPersistName();
+//UNUSED2008-05 }
+//UNUSED2008-05
+//UNUSED2008-05 return EMPTY_STRING; // nichts gefunden
+//UNUSED2008-05 }
+
bool ScDrawView::InsertObjectSafe(SdrObject& rObj, sal_uLong nOptions)
{
// Markierung nicht aendern, wenn Ole-Objekt aktiv
@@ -820,7 +920,7 @@ void ScDrawView::DeleteMarked()
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
ScDocShell* pDocShell = pViewData ? pViewData->GetDocShell() : 0;
::svl::IUndoManager* pUndoMgr = pDocShell ? pDocShell->GetUndoManager() : 0;
- bool bUndo = pDrawLayer && pDocShell && pUndoMgr && pDoc->IsUndoEnabled();
+ bool bUndo = pDocShell && pUndoMgr && pDoc->IsUndoEnabled();
// remove the cell note from document, we are its owner now
ScPostIt* pNote = pDoc->ReleaseNote( pCaptData->maStart );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index c8b346c04083..b3e512063c15 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -867,6 +867,45 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
CaptureMouse();
}
+//IAccessibility2 Implementation 2009-----
+sal_Bool ScGridWindow::HasScenarioRange( sal_uInt16 nCol, sal_Int32 nRow, ScRange& rScenRange )
+{
+ ScDocument* pDoc = pViewData->GetDocument();
+ sal_uInt16 nTab = pViewData->GetTabNo();
+ sal_uInt16 nTabCount = pDoc->GetTableCount();
+ if ( nTab+1<nTabCount && pDoc->IsScenario(nTab+1) && !pDoc->IsScenario(nTab) )
+ {
+ sal_uInt16 i;
+ ScMarkData aMarks;
+ for (i=nTab+1; i<nTabCount && pDoc->IsScenario(i); i++)
+ pDoc->MarkScenario( i, nTab, aMarks, sal_False, SC_SCENARIO_SHOWFRAME );
+ ScRangeList aRanges;
+ aMarks.FillRangeListWithMarks( &aRanges, sal_False );
+ sal_uInt16 nRangeCount = (sal_uInt16)aRanges.Count();
+ for (i=0; i<nRangeCount; i++)
+ {
+ ScRange aRange = *aRanges.GetObject(i);
+ pDoc->ExtendTotalMerge( aRange );
+ sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 );
+ sal_Bool bIsInScen = sal_False;
+ if ( bTextBelow )
+ {
+ bIsInScen = (aRange.aStart.Col() == nCol && aRange.aEnd.Row() == nRow-1);
+ }
+ else
+ {
+ bIsInScen = (aRange.aStart.Col() == nCol && aRange.aStart.Row() == nRow+1);
+ }
+ if (bIsInScen)
+ {
+ rScenRange = aRange;
+ return sal_True;
+ }
+ }
+ }
+ return sal_False;
+}
+//-----IAccessibility2 Implementation 2009
void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, sal_Bool bDataSelect )
{
delete pFilterBox;
@@ -2233,6 +2272,9 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
pViewData->GetView()->InvalidateAttribs();
}
+//IAccessibility2 Implementation 2009-----
+ pViewData->GetViewShell()->SelectionChanged();
+//-----IAccessibility2 Implementation 2009
return;
}
}
@@ -3073,7 +3115,9 @@ void __EXPORT ScGridWindow::KeyInput(const KeyEvent& rKEvt)
if( !rKeyCode.GetModifier() && (rKeyCode.GetCode() == KEY_F2) )
{
SC_MOD()->EndReference();
- return;
+//IAccessibility2 Implementation 2009-----
+ //return;
+//-----IAccessibility2 Implementation 2009
}
else if( pViewData->GetViewShell()->MoveCursorKeyInput( rKEvt ) )
{
@@ -3081,8 +3125,14 @@ void __EXPORT ScGridWindow::KeyInput(const KeyEvent& rKEvt)
pViewData->GetRefStartX(), pViewData->GetRefStartY(), pViewData->GetRefStartZ(),
pViewData->GetRefEndX(), pViewData->GetRefEndY(), pViewData->GetRefEndZ() );
SC_MOD()->SetReference( aRef, pViewData->GetDocument() );
- return;
+//IAccessibility2 Implementation 2009-----
+ //return;
+//-----IAccessibility2 Implementation 2009
}
+//IAccessibility2 Implementation 2009-----
+ pViewData->GetViewShell()->SelectionChanged();
+ return ;
+//-----IAccessibility2 Implementation 2009
}
// wenn semi-Modeless-SfxChildWindow-Dialog oben, keine KeyInputs:
else if( !pViewData->IsAnyFillMode() )
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 73dc2554b2b6..d1341d2cf5e5 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -180,6 +180,10 @@ sal_Bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt)
if ( !bOldMarked &&
rKEvt.GetKeyCode().GetCode() == KEY_DELETE )
bUsed = sal_False; // nichts geloescht
+//IAccessibility2 Implementation 2009-----
+ if(bOldMarked)
+ GetFocus();
+//-----IAccessibility2 Implementation 2009
}
if (!bLeaveDraw)
UpdateStatusPosSize(); // #108137# for moving/resizing etc. by keyboard
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index ec3ddc0aae09..44e5e354dade 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -59,6 +59,9 @@
#include "tabvwsh.hxx"
#include "userdat.hxx"
#include "postit.hxx"
+//IAccessibility2 Implementation 2009-----
+#include <vcl/svapp.hxx>
+//-----IAccessibility2 Implementation 2009
// -----------------------------------------------------------------------
@@ -422,13 +425,42 @@ void ScGridWindow::HideNoteMarker()
com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
ScGridWindow::CreateAccessible()
{
+//IAccessibility2 Implementation 2009-----
+ com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc= GetAccessible(sal_False);
+ if (xAcc.is())
+ {
+ return xAcc;
+ }
+//-----IAccessibility2 Implementation 2009
ScAccessibleDocument* pAccessibleDocument =
new ScAccessibleDocument(GetAccessibleParentWindow()->GetAccessible(),
pViewData->GetViewShell(), eWhich);
-
- com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > xAccessible = pAccessibleDocument;
+//IAccessibility2 Implementation 2009-----
+ //com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > xAccessible = pAccessibleDocument;
+ xAcc = pAccessibleDocument;
+ SetAccessible(xAcc);
+//-----IAccessibility2 Implementation 2009
pAccessibleDocument->Init();
-
- return xAccessible;
+//IAccessibility2 Implementation 2009-----
+ //return xAccessible;
+ return xAcc;
+//-----IAccessibility2 Implementation 2009
}
+//IAccessibility2 Implementation 2009-----
+// MT: Removed Windows::SwitchView() introduced with IA2 CWS.
+// There are other notifications for this when the active view has chnaged, so please update the code to use that event mechanism
+void ScGridWindow::SwitchView()
+{
+ if (!Application::IsAccessibilityEnabled())
+ {
+ return ;
+ }
+ ScAccessibleDocumentBase* pAccDoc = static_cast<ScAccessibleDocumentBase*>(GetAccessible(sal_False).get());
+ if (pAccDoc)
+ {
+ pAccDoc->SwitchViewFireFocus();
+ }
+}
+//-----IAccessibility2 Implementation 2009
+
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 00727f2c7465..bd70337bb60d 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -80,6 +80,9 @@ static ColorData nAuthorColor[ SC_AUTHORCOLORCOUNT ] = {
// Hilfsklasse, fuer die Farbzuordnung,
// um nicht mehrfach hintereinander denselben User aus der Liste zu suchen
+//IAccessibility2 Implementation 2009-----
+//Move this class declare to Chgtrack.hxx
+/*
class ScActionColorChanger
{
private:
@@ -96,6 +99,8 @@ public:
void Update( const ScChangeAction& rAction );
ColorData GetColor() const { return nColor; }
};
+*/
+//-----IAccessibility2 Implementation 2009
//------------------------------------------------------------------
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index ab10d9c6dc1d..7c190084af8b 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -1467,13 +1467,42 @@ void ScPreview::LoseFocus()
com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> ScPreview::CreateAccessible()
{
+//IAccessibility2 Implementation 2009-----
+ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> xAcc= GetAccessible(sal_False);
+ if (xAcc.is())
+ {
+ return xAcc;
+ }
+//-----IAccessibility2 Implementation 2009
ScAccessibleDocumentPagePreview* pAccessible =
new ScAccessibleDocumentPagePreview( GetAccessibleParentWindow()->GetAccessible(), pViewShell );
- com::sun::star::uno::Reference < com::sun::star::accessibility::XAccessible > xAccessible = pAccessible;
+//IAccessibility2 Implementation 2009-----
+ //com::sun::star::uno::Reference < com::sun::star::accessibility::XAccessible > xAccessible = pAccessible;
+ xAcc = pAccessible;
+ SetAccessible(xAcc);
+//-----IAccessibility2 Implementation 2009
pAccessible->Init();
- return xAccessible;
+//IAccessibility2 Implementation 2009-----
+ //return xAccessible;
+ return xAcc;
+//-----IAccessibility2 Implementation 2009
}
-
+//IAccessibility2 Implementation 2009-----
+// MT: Removed Windows::SwitchView() introduced with IA2 CWS.
+// There are other notifications for this when the active view has chnaged, so please update the code to use that event mechanism
+void ScPreview::SwitchView()
+{
+ if (!Application::IsAccessibilityEnabled())
+ {
+ return ;
+ }
+ ScAccessibleDocumentBase* pAccDoc = static_cast<ScAccessibleDocumentBase*>(GetAccessible(sal_False).get());
+ if (pAccDoc)
+ {
+ pAccDoc->SwitchViewFireFocus();
+ }
+}
+//-----IAccessibility2 Implementation 2009
//Issue51656 Add resizeable margin on page preview from maoyg
void ScPreview::DragMove( long nDragMovePos, sal_uInt16 nFlags )
{
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index eb36e9b92efb..f6d1a4c8f43f 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -369,6 +369,9 @@ sal_Bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, sal_Boo
}
pView->UpdateRef( nPosX, nPosY, pViewData->GetTabNo() );
+//IAccessibility2 Implementation 2009-----
+ pView->SelectionChanged();
+//-----IAccessibility2 Implementation 2009
}
}
else if (pViewData->IsFillMode() ||
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index 73ae6658e6db..ae126d86c1b3 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -118,7 +118,7 @@ void ScTabView::InitOwnBlockMode()
}
void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
- sal_Bool bTestNeg, sal_Bool bCols, sal_Bool bRows )
+ sal_Bool bTestNeg, sal_Bool bCols, sal_Bool bRows, sal_Bool bForceNeg )
{
if (!bIsBlockMode)
{
@@ -129,7 +129,11 @@ void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
SCTAB nTab = aViewData.GetTabNo();
// Teil von Markierung aufheben?
- if (bTestNeg)
+//IAccessibility2 Implementation 2009-----
+ if (bForceNeg)
+ bBlockNeg = sal_True;
+//-----IAccessibility2 Implementation 2009
+ else if (bTestNeg)
{
if ( bCols )
bBlockNeg = rMark.IsColumnMarked( nCurX );
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index b37a8b5ca3f9..382574ba3621 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -41,6 +41,11 @@
#include <sfx2/sidebar/SidebarChildWindow.hxx>
#include <avmedia/mediaplayer.hxx>
+//IAccessibility2 Implementation 2009-----
+#include "cell.hxx"
+#include "docoptio.hxx"
+//-----IAccessibility2 Implementation 2009
+
#include "tabvwsh.hxx"
#include "docsh.hxx"
#include "reffact.hxx"
@@ -105,3 +110,20 @@ IMPL_LINK( ScTabViewShell, HtmlOptionsHdl, void*, EMPTYARG )
GetViewFrame()->GetBindings().Invalidate(SID_DRAW_TEXT_MARQUEE);
return 0;
}
+
+//IAccessibility2 Implementation 2009-----
+rtl::OUString ScTabViewShell::GetFormula(ScAddress& rAddress)
+{
+ String sFormula;
+ ScDocument* pDoc = GetViewData()->GetDocument();
+ ScBaseCell* pCell = pDoc->GetCell(rAddress);
+ if (pCell && pCell->GetCellType()==CELLTYPE_FORMULA)
+ {
+ static_cast<ScFormulaCell*>(pCell)->GetFormula(sFormula);
+ }
+ return sFormula;
+}
+//-----IAccessibility2 Implementation 2009
+
+
+
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 8f041791e80b..5021e7effdbd 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -93,6 +93,9 @@
#include "sc.hrc" //CHINA001
#include "scabstdlg.hxx" //CHINA001
#include "externalrefmgr.hxx"
+//IAccessibility2 Implementation 2009-----
+#include <svx/fmpage.hxx>
+//-----IAccessibility2 Implementation 2009
void ActivateOlk( ScViewData* pViewData );
void DeActivateOlk( ScViewData* pViewData );
@@ -112,7 +115,9 @@ sal_uInt16 ScTabViewShell::nInsObjCtrlState = SID_INSERT_DIAGRAM;
void __EXPORT ScTabViewShell::Activate(sal_Bool bMDI)
{
SfxViewShell::Activate(bMDI);
-
+//IAccessibility2 Implementation 2009-----
+ bIsActive = sal_True;
+//-----IAccessibility2 Implementation 2009
// hier kein GrabFocus, sonst gibt's Probleme wenn etwas inplace editiert wird!
if ( bMDI )
@@ -240,7 +245,9 @@ void __EXPORT ScTabViewShell::Deactivate(sal_Bool bMDI)
}
SfxViewShell::Deactivate(bMDI);
-
+//IAccessibility2 Implementation 2009-----
+ bIsActive = sal_False;
+//-----IAccessibility2 Implementation 2009
ScInputHandler* pHdl = SC_MOD()->GetInputHdl(this);
if( bMDI )
@@ -1479,6 +1486,52 @@ sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
}
}
+//IAccessibility2 Implementation 2009-----
+ // use Ctrl+Alt+Shift+arrow keys to move the cursor in cells
+ // while keeping the last selection
+ if ( !bUsed && bAlt && bControl && bShift)
+ {
+ sal_uInt16 nSlotId = 0;
+ switch (nCode)
+ {
+ case KEY_UP:
+ nSlotId = SID_CURSORUP;
+ break;
+ case KEY_DOWN:
+ nSlotId = SID_CURSORDOWN;
+ break;
+ case KEY_LEFT:
+ nSlotId = SID_CURSORLEFT;
+ break;
+ case KEY_RIGHT:
+ nSlotId = SID_CURSORRIGHT;
+ break;
+ case KEY_PAGEUP:
+ nSlotId = SID_CURSORPAGEUP;
+ break;
+ case KEY_PAGEDOWN:
+ nSlotId = SID_CURSORPAGEDOWN;
+ break;
+ case KEY_HOME:
+ nSlotId = SID_CURSORHOME;
+ break;
+ case KEY_END:
+ nSlotId = SID_CURSOREND;
+ break;
+ default:
+ nSlotId = 0;
+ break;
+ }
+ if ( nSlotId )
+ {
+ sal_uInt16 nMode = GetLockedModifiers();
+ LockModifiers(KEY_MOD1);
+ GetViewData()->GetDispatcher().Execute( nSlotId, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD );
+ LockModifiers(nMode);
+ bUsed = sal_True;
+ }
+ }
+//-----IAccessibility2 Implementation 2009
if (bHideCursor)
ShowAllCursors();
@@ -1554,6 +1607,9 @@ void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode )
ScDocument* pDoc = pDocSh->GetDocument();
bReadOnly = pDocSh->IsReadOnly();
+//IAccessibility2 Implementation 2009-----
+ bIsActive = sal_False;
+//-----IAccessibility2 Implementation 2009
SetName( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("View")) ); // fuer SBX
Color aColBlack( COL_BLACK );
@@ -1979,3 +2035,13 @@ void ScTabViewShell::GetTbxState( SfxItemSet& rSet )
+//IAccessibility2 Implementation 2009-----
+const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & ScTabViewShell::GetForms() const
+{
+ if( !pFormShell || !pFormShell->GetCurPage() ){
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > aRef;
+ return aRef;
+ }
+ return pFormShell->GetCurPage()->GetForms();
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index a5df77919b01..21a3518ff8ae 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -48,6 +48,9 @@
#include "editsh.hxx"
#include "dociter.hxx"
#include "inputhdl.hxx"
+//IAccessibility2 Implementation 2009-----
+#include <svx/srchdlg.hxx>
+//-----IAccessibility2 Implementation 2009
#include "document.hxx"
//==================================================================
@@ -254,7 +257,29 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
const SvxSearchItem* pSearchItem = (const SvxSearchItem*) pItem;
ScGlobal::SetSearchItem( *pSearchItem );
- SearchAndReplace( pSearchItem, sal_True, rReq.IsAPI() );
+ //IAccessibility2 Implementation 2009-----
+ //SearchAndReplace( pSearchItem, sal_True, rReq.IsAPI() );
+ sal_Bool bSuccess = SearchAndReplace( pSearchItem, sal_True, rReq.IsAPI() );
+ if ( Application::IsAccessibilityEnabled() )
+ {
+ SvxSearchDialog* pSearchDlg =
+ ((SvxSearchDialog*)(SfxViewFrame::Current()->GetChildWindow(
+ SvxSearchDialogWrapper::GetChildWindowId())->GetWindow()));
+ if( pSearchDlg )
+ {
+ ScTabView* pTabView = GetViewData()->GetView();
+ if( pTabView )
+ {
+ Window* pWin = pTabView->GetActiveWin();
+ if( pWin )
+ {
+ pSearchDlg->SetDocWin( pWin );
+ pSearchDlg->SetSrchFlag( bSuccess );
+ }
+ }
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
rReq.Done();
}
}
@@ -306,6 +331,27 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
rReq.IsAPI() ? SFX_CALLMODE_API|SFX_CALLMODE_SYNCHRON :
SFX_CALLMODE_STANDARD,
&aSearchItem, 0L );
+ //IAccessibility2 Implementation 2009-----
+ if ( Application::IsAccessibilityEnabled() )
+ {
+ SvxSearchDialog* pSearchDlg =
+ ((SvxSearchDialog*)(SfxViewFrame::Current()->GetChildWindow(
+ SvxSearchDialogWrapper::GetChildWindowId())->GetWindow()));
+ if( pSearchDlg )
+ {
+ ScTabView* pTabView = GetViewData()->GetView();
+ if( pTabView )
+ {
+ Window* pWin = pTabView->GetActiveWin();
+ if( pWin )
+ {
+ pSearchDlg->SetDocWin( pWin );
+ pSearchDlg->SetSrchFlag();
+ }
+ }
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
}
else
{
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 0b39383b84b4..bc4a60ffa713 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1616,8 +1616,11 @@ void ScViewFunc::AutoFormat( sal_uInt16 nFormatNo, sal_Bool bRecord )
//----------------------------------------------------------------------------
// Suchen & Ersetzen
-void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
+//IAccessibility2 Implementation 2009-----
+//void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
+sal_Bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
sal_Bool bAddUndo, sal_Bool bIsApi )
+//-----IAccessibility2 Implementation 2009
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
@@ -1669,7 +1672,10 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
if ( pOldSelectedTables )
delete [] pOldSelectedTables;
ErrorMessage(STR_PROTECTIONERR);
- return;
+ //IAccessibility2 Implementation 2009-----
+ //return;
+ return sal_False;
+ //-----IAccessibility2 Implementation 2009
}
}
}
@@ -1843,6 +1849,9 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
delete pUndoDoc; // loeschen wenn nicht benutzt
delete pUndoMark; // kann immer geloescht werden
+//IAccessibility2 Implementation 2009-----
+ return bFound;
+//-----IAccessibility2 Implementation 2009
}
diff --git a/scp2/inc/macros.inc b/scp2/inc/macros.inc
index e1b3cfac1188..467dee59034c 100644
--- a/scp2/inc/macros.inc
+++ b/scp2/inc/macros.inc
@@ -541,11 +541,6 @@ End
#define SCP2_URE_DL_UNO_VER(n, v) n v ".dll"
#define SCP2_URE_DL_UNO_COMID_VER(n, v) n v STRING(COMID) ".dll"
#define SCP2_URE_SHARE_DIR gid_Dir_Common_Ure
-#if defined _STLP_DEBUG
-#define SCP2_STDLP_DEBUG "d"
-#else
-#define SCP2_STDLP_DEBUG ""
-#endif
#else
#define SCP2_URE_DL_DIR gid_Dir_Ure_Lib
#define SCP2_URE_DL_NORMAL(n) "lib" n STRING(UNXSUFFIX)
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index 726783b9b3d0..cd94075d8f27 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -22,6 +22,21 @@
#include "macros.inc"
+// IAccessible2 implementation
+#if defined(WNT) && !defined(DISABLE_ATL)
+File gid_File_Lib_Winaccessibility
+ TXT_FILE_BODY;
+ Styles = (PACKED);
+ Dir = SCP2_OOO_BIN_DIR;
+ Name = "winaccessibility.dll";
+End
+File gid_File_Lib_UAccCOM
+ BIN_FILE_BODY;
+ Styles = (PACKED);
+ Dir = SCP2_OOO_BIN_DIR;
+ Name = "UAccCOM.dll";
+End
+#endif
#ifdef WNT
File gid_File_Lib_Accessbridge
BIN_FILE_BODY;
diff --git a/scp2/source/ooo/makefile.mk b/scp2/source/ooo/makefile.mk
index dc076f1068eb..857012a279f4 100644
--- a/scp2/source/ooo/makefile.mk
+++ b/scp2/source/ooo/makefile.mk
@@ -116,10 +116,6 @@ SCPDEFS+=-DSYSTEM_LIBXSLT
SCPDEFS+=-DLIBXSLT_MAJOR=$(LIBXSLT_MAJOR)
.ENDIF
-.IF "$(USE_SYSTEM_STL)" == "YES" || "$(STLPORT4)" != "NO_STLPORT4"
-SCPDEFS+=-DUSE_SYSTEM_STL
-.ENDIF
-
.IF "$(WITH_MYSPELL_DICTS)" == "NO"
SCPDEFS+=-DWITHOUT_MYSPELL_DICTS
.ENDIF
diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp
index d014a3a1b40a..a296f32f4dea 100644
--- a/scp2/source/ooo/module_hidden_ooo.scp
+++ b/scp2/source/ooo/module_hidden_ooo.scp
@@ -388,6 +388,8 @@ Module gid_Module_Root_Files_5
gid_File_Lib_Stdc_3,
gid_File_Lib_Stdc_5,
gid_File_Lib_Accessbridge,
+ gid_File_Lib_Winaccessibility,
+ gid_File_Lib_UAccCOM,
gid_File_Lib_Ado,
gid_File_Lib_Dl,
gid_File_Lib_Dnd,
@@ -415,8 +417,6 @@ Module gid_Module_Root_Files_5
gid_File_Lib_Wininetbe,
gid_File_Lib_Macbe,
gid_File_Lib_Gdiplus,
- gid_File_Lib_Stlport_Vc6,
- gid_File_Lib_Stlport_Vc7,
gid_File_Tabaction,
gid_File_Lib_Fps_Office,
gid_File_Lib_Fpicker,
diff --git a/scp2/source/ooo/registryitem_ooo.scp b/scp2/source/ooo/registryitem_ooo.scp
index b36c6b944f9d..67c2a4940bb8 100644
--- a/scp2/source/ooo/registryitem_ooo.scp
+++ b/scp2/source/ooo/registryitem_ooo.scp
@@ -325,78 +325,6 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Officeinstall
Styles = (ALWAYS_REQUIRED);
End
-//RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Productcode_Basisinstall
-// ParentID = PREDEFINED_HKEY_LOCAL_MACHINE;
-// Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%PRODUCTCODE";
-// ModuleID = gid_Module_Root;
-// Name = "BASISINSTALLLOCATION";
-// Value = "[INSTALLLOCATION]Basis\\";
-// Styles = (LANGUAGEPACK,ALWAYS_REQUIRED);
-//End
-
-//RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgradecode_Basisinstall
-// ParentID = PREDEFINED_HKEY_LOCAL_MACHINE;
-// Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%UPGRADECODE";
-// ModuleID = gid_Module_Root;
-// Name = "BASISINSTALLLOCATION";
-// Value = "[INSTALLLOCATION]Basis\\";
-// Styles = (LANGUAGEPACK,ALWAYS_REQUIRED);
-//End
-
-//RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Basisinstall
-// ParentID = PREDEFINED_HKEY_LOCAL_MACHINE;
-// Subkey = "Software\OpenOffice\${REGISTRYLAYERNAME}\Basis\%OOOBASEVERSION";
-// ModuleID = gid_Module_Root;
-// Name = "BASISINSTALLLOCATION";
-// Value = "[INSTALLLOCATION]Basis\\";
-// Styles = (ALWAYS_REQUIRED,LAYER_REGISTRY,USE_OOOBASEVERSION);
-//End
-
-//RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Layer_Basisinstall
-// ParentID = PREDEFINED_HKEY_LOCAL_MACHINE;
-// Subkey = "Software\OpenOffice\${REGISTRYLAYERNAME}\%PRODUCTNAME\%BRANDPACKAGEVERSION";
-// ModuleID = gid_Module_Root;
-// Name = "BASISINSTALLLOCATION";
-// Value = "[INSTALLLOCATION]Basis\\";
-// Styles = (ALWAYS_REQUIRED);
-//End
-
-//RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Productcode_Ureinstall
-// ParentID = PREDEFINED_HKEY_LOCAL_MACHINE;
-// Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%PRODUCTCODE";
-// ModuleID = gid_Module_Root;
-// Name = "UREINSTALLLOCATION";
-// Value = "[INSTALLLOCATION]URE\\";
-// Styles = (LANGUAGEPACK,ALWAYS_REQUIRED);
-//End
-
-//RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgradecode_Ureinstall
-// ParentID = PREDEFINED_HKEY_LOCAL_MACHINE;
-// Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%UPGRADECODE";
-// ModuleID = gid_Module_Root;
-// Name = "UREINSTALLLOCATION";
-// Value = "[INSTALLLOCATION]URE\\";
-// Styles = (LANGUAGEPACK,ALWAYS_REQUIRED);
-//End
-
-//RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Ureinstall
-// ParentID = PREDEFINED_HKEY_LOCAL_MACHINE;
-// Subkey = "Software\OpenOffice\${REGISTRYLAYERNAME}\URE\%URELAYERVERSION";
-// ModuleID = gid_Module_Root;
-// Name = "UREINSTALLLOCATION";
-// Value = "[INSTALLLOCATION]URE\\";
-// Styles = (ALWAYS_REQUIRED,LAYER_REGISTRY,USE_URELAYERVERSION);
-//End
-
-//RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Layer_Ureinstall
-// ParentID = PREDEFINED_HKEY_LOCAL_MACHINE;
-// Subkey = "Software\OpenOffice\${REGISTRYLAYERNAME}\%PRODUCTNAME\%BRANDPACKAGEVERSION";
-// ModuleID = gid_Module_Root;
-// Name = "UREINSTALLLOCATION";
-// Value = "[INSTALLLOCATION]URE\\";
-// Styles = (ALWAYS_REQUIRED);
-//End
-
RegistryItem gid_Regitem_Sog
ParentID = PREDEFINED_HKEY_CLASSES_ROOT;
Subkey = ".sog";
diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp
index 5545ab8eed01..5263b27f41ff 100644
--- a/scp2/source/ooo/ure.scp
+++ b/scp2/source/ooo/ure.scp
@@ -66,7 +66,6 @@ File gid_File_Exe_Uno
// Dir = gid_Dir_Ure_Bin;
Name = EXENAME(uno);
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "C66A9E2B-B16D-46A9-B9EC-772D9D3837F5";
End
#endif
@@ -91,7 +90,6 @@ File gid_File_Exe_Regcomp
// Dir = gid_Dir_Ure_Bin;
Name = EXENAME(regcomp);
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "D51FA672-7C24-4E24-A282-872C4BF690A1";
End
#endif
@@ -119,7 +117,6 @@ File gid_File_Exe_Regmerge
// Dir = gid_Dir_Ure_Bin;
Name = EXENAME(regmerge);
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "881BCC1D-BA4A-4527-9C7D-D89157C2D03B";
End
File gid_File_Exe_Regview
@@ -132,7 +129,6 @@ File gid_File_Exe_Regview
// Dir = gid_Dir_Ure_Bin;
Name = EXENAME(regview);
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "DAB09DCD-8491-4DC8-B153-2BA81A830AC2";
End
#if !defined MACOSX && !defined WNT && defined SOLAR_JAVA && !defined OS2
@@ -142,7 +138,6 @@ File gid_File_Exe_Javaldx
// Dir = gid_Dir_Ure_Bin;
Name = EXENAME(javaldx);
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "291B5981-3E41-40E2-9C3F-115A7DF1C6A1";
End
#endif
@@ -159,7 +154,6 @@ File gid_File_Exe_StartupSh
// Dir = gid_Dir_Ure_Bin;
Name = "/ure/startup.sh";
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "C86E816A-4EAE-47E9-BD1F-3E23C80F4EAE";
End
#endif
@@ -174,7 +168,6 @@ File gid_File_Exe_UnoBin
// Dir = gid_Dir_Ure_Bin;
Name = "uno.bin";
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "4AE33B3E-B33E-4BA4-AADC-8D7ED303FDE9";
End
#endif
@@ -189,7 +182,6 @@ File gid_File_Exe_RegcompBin
// Dir = gid_Dir_Ure_Bin;
Name = "regcomp.bin";
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "70FBE546-A228-455F-BCBB-716BF03AD5C6";
End
#endif
@@ -200,7 +192,6 @@ File gid_File_Dl_Cppu
Dir = SCP2_URE_DL_DIR;
Name = SCP2_URE_DL_UNO_VER("cppu", "3");
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "36C01AC6-BB0A-4181-A8B8-50B793ADEDB7";
End
File gid_File_Dl_Cppuhelper
@@ -212,7 +203,6 @@ File gid_File_Dl_Cppuhelper
Name = SCP2_URE_DL_UNO_COMID_VER("cppuhelper", "3");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "D2A191E6-2023-41F5-9032-B98C50C37964";
End
File gid_File_Dl_PurpEnvHelper
@@ -224,7 +214,6 @@ File gid_File_Dl_PurpEnvHelper
Name = SCP2_URE_DL_UNO_COMID_VER("purpenvhelper", "3");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "C80146A8-A14C-44D1-AB9F-D9D8BF22277E";
End
File gid_File_Dl_Sal
@@ -232,7 +221,6 @@ File gid_File_Dl_Sal
Dir = SCP2_URE_DL_DIR;
Name = SCP2_URE_DL_UNO_VER("sal", "3");
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "B1EF3AB6-611E-4027-958A-736583EB82E6";
End
File gid_File_Dl_Salhelper
@@ -244,25 +232,15 @@ File gid_File_Dl_Salhelper
Name = SCP2_URE_DL_UNO_COMID_VER("salhelper", "3");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "879B80E0-F6E1-4931-8EE6-7CF867CB6AA5";
End
// Private Dynamic Libraries:
-//File gid_File_Dl_Profile_Uno
-// TXT_FILE_BODY;
-// Dir = SCP2_URE_DL_DIR;
-// Name = PROFILENAME(/ure/uno);
-// Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-// // CompID = "4681F5C1-8F64-486F-B804-03B4D8CEB41F";
-//End
-
File gid_File_Dl_Reg
TXT_FILE_BODY;
Dir = SCP2_URE_DL_DIR;
Name = SCP2_URE_DL_VER("reg", "3");
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "D5313B1F-D09F-401F-B180-891F70D489ED";
End
File gid_File_Dl_Store
@@ -270,7 +248,6 @@ File gid_File_Dl_Store
Dir = SCP2_URE_DL_DIR;
Name = SCP2_URE_DL_VER("store", "3");
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "A5477BD7-89A3-44AF-8B42-9E28D55C8066";
End
File gid_File_Dl_Xmlreader
@@ -293,7 +270,6 @@ File gid_File_Dl_Jvmaccess
Name = SCP2_URE_DL_COMID_VER("jvmaccess", "3");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "F3D6F794-DA6F-4522-B3A7-C15593C1A577";
End
File gid_File_Dl_Jvmfwk
@@ -301,7 +277,6 @@ File gid_File_Dl_Jvmfwk
Dir = SCP2_URE_DL_DIR;
Name = SCP2_URE_DL_VER("jvmfwk", "3");
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "4E128F82-FA30-4077-88DC-F745C3330093";
End
#if defined SOLAR_JAVA
@@ -314,7 +289,6 @@ File gid_File_Dl_Sunjavaplugin
Name = SCP2_URE_DL_BARE("sunjavaplugin");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "0AC6C688-876C-40C5-B24E-9257003FDC3E";
End
#endif
@@ -324,7 +298,6 @@ File gid_File_Dl_JrepropertiesClass
Dir = SCP2_URE_DL_DIR;
Name = "JREProperties.class";
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "0C4B8DCF-18D1-47D9-8BB7-A5C1D9268016";
End
#endif
@@ -333,7 +306,6 @@ File gid_File_Dl_Profile_Jvmfwk3rc
Dir = SCP2_URE_DL_DIR;
Name = PROFILENAME(/ure/jvmfwk3);
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "1124A984-F905-47DC-ACEF-EDEC037F9B38";
End
File gid_File_Dl_ComnameUno
@@ -341,7 +313,6 @@ File gid_File_Dl_ComnameUno
Dir = SCP2_URE_DL_DIR;
Name = SCP2_URE_DL_NORMAL(STRING(COMNAME) "_uno");
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "3FAFBDCB-96FE-4D9E-B655-CA86FE674711";
End
#if defined SOLAR_JAVA
@@ -350,7 +321,6 @@ File gid_File_Dl_JavaUno
Dir = SCP2_URE_DL_DIR;
Name = SCP2_URE_DL_NORMAL("java_uno");
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "5425A018-DAFD-4BC6-A550-377C899DC98A";
End
#endif
@@ -372,7 +342,6 @@ File gid_File_Dl_UnsafeUnoUno
Name = SCP2_URE_DL_NORMAL("unsafe_uno_uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "74C2909A-FDCF-430A-B0F4-CA6D15690D76";
End
File gid_File_Dl_AffineUnoUno
@@ -384,7 +353,6 @@ File gid_File_Dl_AffineUnoUno
Name = SCP2_URE_DL_NORMAL("affine_uno_uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "CF542EC3-7A51-4EAA-8480-65D5E8906D05";
End
File gid_File_Dl_LogUnoUno
@@ -614,7 +582,6 @@ File gid_File_Dl_Jpipe
Dir = SCP2_URE_DL_DIR;
Name = SCP2_URE_JDL_NORMAL("jpipe");
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "B1A60DD4-51D7-4898-B899-9BD05DE2DA8F";
End
#endif
@@ -633,7 +600,6 @@ File gid_File_Dl_Juh
Dir = SCP2_URE_DL_DIR;
Name = SCP2_URE_DL_NORMAL("juh");
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "1A001FB0-C469-4517-A3D1-3FA56AD607AF";
End
#endif
@@ -643,7 +609,6 @@ File gid_File_Dl_Juhx
Dir = SCP2_URE_DL_DIR;
Name = SCP2_URE_DL_NORMAL("juhx");
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "B152234F-A46A-40BE-B632-48F35A33A29A";
End
#endif
@@ -656,7 +621,6 @@ File gid_File_Dl_Acceptor
Name = SCP2_URE_DL_BARE("acceptor.uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "31183C51-C9A4-4D7A-A2F4-103252E1FEB0";
End
File gid_File_Dl_Binaryurp
@@ -679,7 +643,6 @@ File gid_File_Dl_Bootstrap
Name = SCP2_URE_DL_BARE("bootstrap.uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "2620B307-25DB-498F-B2B8-46D928165331";
End
File gid_File_Dl_Connector
@@ -691,7 +654,6 @@ File gid_File_Dl_Connector
Name = SCP2_URE_DL_BARE("connector.uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "EBCE77E7-E244-40F6-96E2-5319D6571C5D";
End
File gid_File_Dl_Introspection
@@ -703,7 +665,6 @@ File gid_File_Dl_Introspection
Name = SCP2_URE_DL_BARE("introspection.uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "E99960CF-FE59-4332-A2AC-47418C3A17C1";
End
File gid_File_Dl_Invocadapt
@@ -715,7 +676,6 @@ File gid_File_Dl_Invocadapt
Name = SCP2_URE_DL_BARE("invocadapt.uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "77DDC112-1994-49D5-A086-FB16D4328AB9";
End
File gid_File_Dl_Invocation
@@ -727,7 +687,6 @@ File gid_File_Dl_Invocation
Name = SCP2_URE_DL_BARE("invocation.uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "A79ACB80-DA65-47CA-81BA-7CD9E191C84C";
End
@@ -741,7 +700,6 @@ File gid_File_Dl_Javaloader
Name = SCP2_URE_DL_BARE("javaloader.uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "19A20968-E654-4E2C-9F58-7B66F07CA346";
End
#endif
@@ -755,7 +713,6 @@ File gid_File_Dl_Javavm
Name = SCP2_URE_DL_BARE("javavm.uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "F1266B2B-80AD-4248-A921-9161759FA4DA";
End
#endif
@@ -768,7 +725,6 @@ File gid_File_Dl_Namingservice
Name = SCP2_URE_DL_BARE("namingservice.uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "DD22BE3A-AD21-447D-B3A3-89B0FCDB0B31";
End
File gid_File_Dl_Stocservices
@@ -780,7 +736,6 @@ File gid_File_Dl_Stocservices
Name = SCP2_URE_DL_BARE("stocservices.uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "EBF6BBDE-EC50-4FB8-A0D4-BEC58F1C8C07";
End
File gid_File_Dl_Proxyfac
@@ -792,7 +747,6 @@ File gid_File_Dl_Proxyfac
Name = SCP2_URE_DL_BARE("proxyfac.uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "A2CDDEC3-B9C7-48C9-AB35-65008777BC2F";
End
File gid_File_Dl_Reflection
@@ -804,7 +758,6 @@ File gid_File_Dl_Reflection
Name = SCP2_URE_DL_BARE("reflection.uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "601C7946-CFEB-4F56-9429-6D5963188DF3";
End
File gid_File_Dl_Streams
@@ -816,7 +769,6 @@ File gid_File_Dl_Streams
Name = SCP2_URE_DL_BARE("streams.uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "6028CF43-A9B7-40A8-8216-509CAB256A2B";
End
File gid_File_Dl_Textinstream
@@ -828,7 +780,6 @@ File gid_File_Dl_Textinstream
Name = SCP2_URE_DL_BARE("textinstream.uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "DAA39D01-D9C5-40C4-94EC-9E4B2F94EABA";
End
File gid_File_Dl_Textoutstream
@@ -840,7 +791,6 @@ File gid_File_Dl_Textoutstream
Name = SCP2_URE_DL_BARE("textoutstream.uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "DD01EB0C-A119-43AE-9100-F7A595D099E4";
End
File gid_File_Dl_Uuresolver
@@ -852,7 +802,6 @@ File gid_File_Dl_Uuresolver
Name = SCP2_URE_DL_BARE("uuresolver.uno");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "377090E1-5008-424F-B0F6-A9EFC9F11206";
End
#if !defined SYSTEM_LIBXML
@@ -871,48 +820,6 @@ File gid_File_Dl_Libxml2
Name = SCP2_URE_DL_VER("xml2", "2");
#endif
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "BE6FAD97-F84C-43E3-8392-6FE2CDA04D8E";
-End
-#endif
-
-#if !defined USE_SYSTEM_STL || \
- (defined USE_SYSTEM_STL && defined _C52 && defined IS_LP64)
-File gid_File_Dl_Stlport
- TXT_FILE_BODY;
- Dir = SCP2_URE_DL_DIR;
-#if defined _gcc3 && defined WNT
-#if defined _STLP_DEBUG
- Name = SCP2_URE_DL_NORMAL("libstlport_gcc_stldebug");
-#else
- Name = SCP2_URE_DL_NORMAL("libstlport_gcc");
-#endif
-#elif defined _gcc3
-#if defined _STLP_DEBUG
- Name = SCP2_URE_DL_NORMAL("stlport_gcc_stldebug");
-#else
- Name = SCP2_URE_DL_NORMAL("stlport_gcc");
-#endif
-#elif defined SOLARIS
-#if defined IS_LP64
- Name = SCP2_URE_DL_VER("stlport", "1");
-#else
-#if defined _STLP_DEBUG
- Name = SCP2_URE_DL_NORMAL("stlport_sunpro_debug");
-#else
- Name = SCP2_URE_DL_NORMAL("stlport_sunpro");
-#endif
-#endif
-#elif defined WNT && (defined(M1310) || defined(M1400) || defined(M1500) )
-#if defined _STLP_DEBUG
- Name = SCP2_URE_DL_NORMAL("stlport_vc71_stldebug45");
-#else
- Name = SCP2_URE_DL_NORMAL("stlport_vc7145");
-#endif
-#else
-#error "stlport dynamic library: unsupported platform"
-#endif
- Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "D976338D-D2A5-4D29-B765-D3AC43181C7F";
End
#endif
@@ -923,7 +830,6 @@ File gid_File_Dl_GccS
Dir = SCP2_URE_DL_DIR;
Name = SCP2_URE_DL_VER("gcc_s", STRING(SHORTSTDC3));
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "C601D04B-2194-4F1B-BB09-7B4930D6E1DB";
End
#endif
@@ -934,7 +840,6 @@ File gid_File_Dl_Stdcpp
TXT_FILE_BODY;
Name = SCP2_URE_DL_VER("stdc++", STRING(SHORTSTDCPP3));
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "89740D6A-38EE-41AF-A6A2-A8F7ABBE4996";
End
#endif
@@ -944,7 +849,6 @@ File gid_File_Lib_Mingwm10_Ure
Dir = SCP2_URE_DL_DIR;
Name = SCP2_URE_DL_NORMAL("mingwm10");
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "601FEC1D-8665-4476-9911-83BDCCE83025";
End
#endif
@@ -980,7 +884,6 @@ File gid_File_Dl_Uwinapi
Dir = SCP2_URE_DL_DIR;
Name = SCP2_URE_DL_NORMAL("uwinapi");
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "EABC9FE3-B296-430F-8513-A3617FFB630D";
End
#endif
@@ -992,7 +895,6 @@ File gid_File_Java_UnoloaderJar
Dir = gid_Dir_Ure_Java;
Name = "unoloader.jar";
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "90F99ED3-814C-4B45-894B-D9248848CEB4";
End
#endif
@@ -1002,7 +904,6 @@ File gid_File_Java_JuhJar
Dir = gid_Dir_Ure_Java;
Name = "juh.jar";
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "E77CC8B5-0345-4B7F-ABED-5EB9DC94E492";
End
#endif
@@ -1012,7 +913,6 @@ File gid_File_Java_JurtJar
Dir = gid_Dir_Ure_Java;
Name = "jurt.jar";
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "EA63EDCC-9152-4560-AB7A-BFC367442E50";
End
#endif
@@ -1022,7 +922,6 @@ File gid_File_Java_RidlJar
Dir = gid_Dir_Ure_Java;
Name = "ridl.jar";
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "4A915C83-6BE3-41B9-BAF9-13AA27034955";
End
#endif
@@ -1034,7 +933,6 @@ File gid_File_Java_JavaUnoJar
Dir = gid_Dir_Ure_Java;
Name = "java_uno.jar";
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "ABDC8DDA-5D2B-424C-ABD8-FD22D59658FE";
End
#endif
@@ -1050,18 +948,9 @@ File gid_File_Misc_JavavendorsXml
#endif
Name = "javavendors.xml";
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
- // CompID = "403FCCFE-545B-44F6-91D1-5C75F846E587";
End
#endif
-//#if defined MACOSX
-//Unixlink gid_Unixlink_Ure_Bin_Urelibs
-// Dir = gid_Dir_Ure_Bin;
-// Name = "urelibs";
-// Target = "../lib";
-//End
-//#endif
-
//Module
Module gid_Module_Root_Ure_Hidden
@@ -1143,7 +1032,6 @@ Module gid_Module_Root_Ure_Hidden
gid_File_Dl_Textoutstream,
gid_File_Dl_Uuresolver,
gid_File_Dl_Libxml2,
- gid_File_Dl_Stlport,
gid_File_Dl_GccS,
gid_File_Dl_Stdcpp,
gid_File_Lib_Mingw_GccS_Ure,
diff --git a/scp2/source/winexplorerext/makefile.mk b/scp2/source/winexplorerext/makefile.mk
index 0e591b4cc80c..f179e350e8da 100644
--- a/scp2/source/winexplorerext/makefile.mk
+++ b/scp2/source/winexplorerext/makefile.mk
@@ -46,10 +46,6 @@ PARFILES= \
registryitem_winexplorerext.par
.ENDIF
-.IF "$(USE_SYSTEM_STL)" == "YES" || "$(STLPORT4)" != "NO_STLPORT4"
-SCPDEFS+=-DUSE_SYSTEM_STL
-.ENDIF
-
ULFFILES= \
module_winexplorerext.ulf
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 6e5857d05383..a4d677c2e56a 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -157,6 +157,18 @@ namespace sd
class SdDrawDocument : public FmFormModel
{
private:
+//IAccessibility2 Implementation 2009-----
+ String msDocAccTitle;
+public:
+ virtual void setDocAccTitle( const String& rTitle ) { msDocAccTitle = rTitle; }
+ virtual const String getDocAccTitle() const { return msDocAccTitle; }
+private:
+ sal_Bool bReadOnly;
+public:
+ virtual void setDocReadOnly( sal_Bool b){ bReadOnly = b; }
+ virtual sal_Bool getDocReadOnly() const { return bReadOnly; }
+private:
+//IAccessibility2 Implementation 2009-----
::sd::Outliner* mpOutliner; // local outliner for outline mode
::sd::Outliner* mpInternalOutliner; // internal outliner for creation of text objects
Timer* mpWorkStartupTimer;
@@ -663,6 +675,9 @@ private:
// #109538#
// virtual void PageListChanged();
// virtual void MasterPageListChanged();
+//IAccessibility2 Implementation 2009-----
+ virtual ImageMap* GetImageMapForObject(SdrObject* pObj);
+//-----IAccessibility2 Implementation 2009
};
namespace sd
diff --git a/sd/inc/glob.hxx b/sd/inc/glob.hxx
index ba6ba2caedf5..57d29eeb599b 100644
--- a/sd/inc/glob.hxx
+++ b/sd/inc/glob.hxx
@@ -38,6 +38,9 @@
#define SD_IF_SDDRAWDOCSHELL SFX_INTERFACE_SD_START + 1
#define SD_IF_SDVIEWSHELL SFX_INTERFACE_SD_START + 2
#define SD_IF_SDDRAWVIEWSHELL SFX_INTERFACE_SD_START + 3
+//IAccessibility2 Implementation 2009-----
+#define SD_IF_SDSLIDEVIEWSHELL SFX_INTERFACE_SD_START + 4
+//-----IAccessibility2 Implementation 2009
#define SD_IF_SDOUTLINEVIEWSHELL SFX_INTERFACE_SD_START + 5
#define SD_IF_SDDRAWSTDOBJECTBAR SFX_INTERFACE_SD_START + 6
#define SD_IF_SDDRAWTEXTOBJECTBAR SFX_INTERFACE_SD_START + 7
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx
index 0b9be90f4bb0..09de6e99adc4 100644
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -425,7 +425,7 @@ EffectSequence::iterator ImplFindEffect( MainSequencePtr& pMainSequence, const R
static bool implIsInsideGroup( SdrObject* pObj )
{
- return pObj && pObj->getParentOfSdrObject() && pObj->getParentOfSdrObject()->getSdrObjectFromSdrObjList();
+ return pObj && pObj->GetParentSdrObject();
}
void EffectMigration::SetAnimationEffect( SvxShape* pShape, AnimationEffect eEffect )
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index f12d71aebeb8..9c788555affe 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -146,6 +146,7 @@ PresentationSettings::PresentationSettings( const PresentationSettings& r )
SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
: FmFormModel( SvtPathOptions().GetPalettePath(), NULL, pDrDocSh )
+, bReadOnly(sal_False)
, mpOutliner(NULL)
, mpInternalOutliner(NULL)
, mpWorkStartupTimer(NULL)
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index cb781e1cb1e8..21b2f1e29e0a 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -1210,6 +1210,17 @@ IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj,
return pIMapObj;
}
+//IAccessibility2 Implementation 2009-----
+ImageMap* SdDrawDocument::GetImageMapForObject(SdrObject* pObj)
+{
+ SdIMapInfo* pIMapInfo = GetIMapInfo( pObj );
+ if ( pIMapInfo )
+ {
+ return const_cast<ImageMap*>( &(pIMapInfo->GetImageMap()) );
+ }
+ return NULL;
+}
+//-----IAccessibility2 Implementation 2009
/** this method enforces that the masterpages are in the currect order,
that is at position 1 is a PK_STANDARD masterpage followed by a
PK_NOTES masterpage and so on. #
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 20d62eee5ffd..5405d08bd494 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -1842,8 +1842,8 @@ void SdDrawDocument::SetMasterPage(
//{
// // Aus dem Source-Dokument austragen
// SdrPage* pTest = NULL;
- // pTest = pSourceDoc->RemoveMasterPage(pNotesMaster->GetPageNum());
- // pTest = pSourceDoc->RemoveMasterPage(pMaster->GetPageNum());
+ // pTest = pSourceDoc->RemoveMasterPage(pNotesMaster->GetPageNumber());
+ // pTest = pSourceDoc->RemoveMasterPage(pMaster->GetPageNumber());
//}
/*********************************************************************
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 404cd0c723fd..17afa37455ca 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -37,7 +37,10 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <rtl/ustring.h>
#include<sfx2/viewfrm.hxx>
-
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <sfx2/objsh.hxx>
+//-----IAccessibility2 Implementation 2009
#include <svx/AccessibleShape.hxx>
#include <svx/svdobj.hxx>
@@ -46,8 +49,16 @@
#include <toolkit/helper/vclunohelper.hxx>
#include "Window.hxx"
#include <vcl/svapp.hxx>
+//IAccessibility2 Implementation 2009-----
+#include "OutlineViewShell.hxx"
+#include "SlideViewShell.hxx"
+#include <svx/svdlayer.hxx>
+#include <editeng/editobj.hxx>
+#include "LayerTabBar.hxx"
+#include <svtools/colorcfg.hxx>
+//-----IAccessibility2 Implementation 2009
#include "ViewShell.hxx"
#include "View.hxx"
#include <memory>
@@ -88,6 +99,9 @@ AccessibleDocumentViewBase::AccessibleDocumentViewBase (
maShapeTreeInfo.SetViewForwarder (&maViewForwarder);
mxWindow = ::VCLUnoHelper::GetInterface (pSdWindow);
+//IAccessibility2 Implementation 2009-----
+ mpViewShell = pViewShell;
+//-----IAccessibility2 Implementation 2009
}
@@ -159,6 +173,11 @@ void AccessibleDocumentViewBase::Init (void)
}
}
}
+//IAccessibility2 Implementation 2009-----
+ SfxObjectShell* pObjShell = mpViewShell->GetViewFrame()->GetObjectShell();
+ if(!pObjShell->IsReadOnly())
+ SetState(AccessibleStateType::EDITABLE);
+//-----IAccessibility2 Implementation 2009
}
@@ -434,6 +453,10 @@ uno::Any SAL_CALL
static_cast<beans::XPropertyChangeListener*>(this),
static_cast<awt::XWindowListener*>(this),
static_cast<awt::XFocusListener*>(this)
+//IAccessibility2 Implementation 2009-----
+ ,static_cast<XAccessibleExtendedAttributes*>(this)
+ ,static_cast<XAccessibleGetAccFlowTo*>(this)
+//-----IAccessibility2 Implementation 2009
);
return aReturn;
}
@@ -835,4 +858,156 @@ void
{
}
+//IAccessibility2 Implementation 2009-----
+uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ uno::Any anyAtrribute;
+ rtl::OUString sValue;
+ ::sd::DrawViewShell* pDrViewSh = dynamic_cast< ::sd::DrawViewShell* >(mpViewShell);
+
+ if(pDrViewSh)
+ {
+ rtl::OUString sName;
+ String sDisplay;
+ sName = rtl::OUString::createFromAscii("page-name:");
+ // MT IA2: Not used...
+ // SdPage* pCurrPge = pDrViewSh->getCurrentPage();
+ SdDrawDocument* pDoc = pDrViewSh->GetDoc();
+ sDisplay = pDrViewSh->getCurrentPage()->GetName();
+ sDisplay.SearchAndReplace( String::CreateFromAscii( "\\" ), String::CreateFromAscii("\\\\" ));
+ sDisplay.SearchAndReplace( String::CreateFromAscii( "=" ), String::CreateFromAscii("\\=" ) );
+ sDisplay.SearchAndReplace( String::CreateFromAscii( ";" ), String::CreateFromAscii("\\;" ) );
+ sDisplay.SearchAndReplace( String::CreateFromAscii( "," ), String::CreateFromAscii("\\," ) );
+ sDisplay.SearchAndReplace( String::CreateFromAscii( ":" ), String::CreateFromAscii("\\:" ) );
+ sValue = sName + sDisplay ;
+ sName = rtl::OUString::createFromAscii(";page-number:");
+ sValue += sName;
+ sValue += String::CreateFromInt32((sal_Int16)((sal_uInt16)((pDrViewSh->getCurrentPage()->GetPageNumber()-1)>>1) + 1)) ;
+ sName = rtl::OUString::createFromAscii(";total-pages:");
+ sValue += sName;
+ sValue += String::CreateFromInt32(pDrViewSh->GetPageTabControl()->GetPageCount()) ;
+ sValue += rtl::OUString::createFromAscii(";");
+ if(pDrViewSh->IsLayerModeActive() )
+ {
+ sName = rtl::OUString::createFromAscii("page-name:");
+ sValue = sName;
+ sDisplay = pDrViewSh->GetLayerTabControl()->GetPageText(pDrViewSh->GetLayerTabControl()->GetCurPageId());
+ if( pDoc )
+ {
+ SdrLayerAdmin& rLayerAdmin = pDoc->GetModelLayerAdmin();
+ SdrLayer* aSdrLayer = rLayerAdmin.GetLayer(sDisplay, sal_False);
+ if( aSdrLayer )
+ {
+ String layerAltText = aSdrLayer->GetTitle();
+ if( layerAltText.Len() > 0)
+ {
+ sName = rtl::OUString::createFromAscii(" ");
+ sDisplay = sDisplay + sName;
+ sDisplay += layerAltText;
+ }
+ }
+ }
+ sDisplay.SearchAndReplace( String::CreateFromAscii( "\\" ), String::CreateFromAscii("\\\\" ));
+ sDisplay.SearchAndReplace( String::CreateFromAscii( "=" ), String::CreateFromAscii("\\=" ));
+ sDisplay.SearchAndReplace( String::CreateFromAscii( ";" ), String::CreateFromAscii("\\;" ));
+ sDisplay.SearchAndReplace( String::CreateFromAscii( "," ), String::CreateFromAscii("\\," ));
+ sDisplay.SearchAndReplace( String::CreateFromAscii( ":" ), String::CreateFromAscii("\\:" ));
+ sValue += sDisplay;
+ sName = rtl::OUString::createFromAscii(";page-number:");
+ sValue += sName;
+ sValue += String::CreateFromInt32(pDrViewSh->GetActiveTabLayerIndex()+1) ;
+ sName = rtl::OUString::createFromAscii(";total-pages:");
+ sValue += sName;
+ sValue += String::CreateFromInt32(pDrViewSh->GetLayerTabControl()->GetPageCount()) ;
+ sValue += rtl::OUString::createFromAscii(";");
+ }
+ }
+
+ ::sd::PresentationViewShell* pPresViewSh = dynamic_cast< ::sd::PresentationViewShell* >(mpViewShell);
+
+ if(pPresViewSh)
+ {
+ SdPage* pCurrPge = pPresViewSh->getCurrentPage();
+ SdDrawDocument* pDoc = pPresViewSh->GetDoc();
+ SdPage* pNotesPge = (SdPage*)pDoc->GetSdPage((pCurrPge->GetPageNumber()-1)>>1, PK_NOTES);
+ if (pNotesPge)
+ {
+ SdrObject* pNotesObj = pNotesPge->GetPresObj(PRESOBJ_NOTES);
+ if (pNotesObj)
+ {
+ OutlinerParaObject* pPara = pNotesObj->GetOutlinerParaObject();
+ if (pPara)
+ {
+ sValue += rtl::OUString::createFromAscii("note:");
+ const EditTextObject& rEdit = pPara->GetTextObject();
+ for (sal_uInt16 i=0;i<rEdit.GetParagraphCount();i++)
+ {
+ String strNote = rEdit.GetText(i);
+ strNote.SearchAndReplace( String::CreateFromAscii( "\\" ), String::CreateFromAscii("\\\\" ));
+ strNote.SearchAndReplace( String::CreateFromAscii( "=" ), String::CreateFromAscii("\\=" ));
+ strNote.SearchAndReplace( String::CreateFromAscii( ";" ), String::CreateFromAscii("\\;" ));
+ strNote.SearchAndReplace( String::CreateFromAscii( "," ), String::CreateFromAscii("\\," ));
+ strNote.SearchAndReplace( String::CreateFromAscii( ":" ), String::CreateFromAscii("\\:" ));
+ sValue += rtl::OUString( strNote );
+ sValue += rtl::OUString::createFromAscii(";");//to divide each paragraph
+ }
+ }
+ }
+ }
+ }
+
+ ::sd::OutlineViewShell* pOutlineViewSh = dynamic_cast< ::sd::OutlineViewShell* >(mpViewShell);
+
+ if(pOutlineViewSh)
+ {
+ rtl::OUString sName;
+ String sDisplay;
+ SdPage* pCurrPge = mpViewShell->GetActualPage();
+ SdDrawDocument* pDoc = mpViewShell->GetDoc();
+ if(pCurrPge && pDoc)
+ {
+ sName = rtl::OUString::createFromAscii("page-name:");
+ sDisplay = pCurrPge->GetName();
+ sDisplay.SearchAndReplace( String::CreateFromAscii( "=" ), String::CreateFromAscii("\\=" ) );
+ sDisplay.SearchAndReplace( String::CreateFromAscii( ";" ), String::CreateFromAscii("\\;" ) );
+ sDisplay.SearchAndReplace( String::CreateFromAscii( "," ), String::CreateFromAscii("\\," ) );
+ sDisplay.SearchAndReplace( String::CreateFromAscii( ":" ), String::CreateFromAscii("\\:" ) );
+ sValue = sName + sDisplay ;
+ sName = rtl::OUString::createFromAscii(";page-number:");
+ sValue += sName;
+ sValue += String::CreateFromInt32((sal_Int16)((sal_uInt16)((pCurrPge->GetPageNumber()-1)>>1) + 1)) ;
+ sName = rtl::OUString::createFromAscii(";total-pages:");
+ sValue += sName;
+ sValue += String::CreateFromInt32(pDoc->GetSdPageCount(PK_STANDARD)) ;
+ sValue += rtl::OUString::createFromAscii(";");
+ }
+ }
+ if (sValue.getLength())
+ anyAtrribute <<= sValue;
+ return anyAtrribute;
+}
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+ SAL_CALL AccessibleDocumentViewBase::get_AccFlowTo(const ::com::sun::star::uno::Any&, sal_Int32 )
+ throw ( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Sequence< uno::Any> aRet;
+
+ return aRet;
+}
+
+sal_Int32 SAL_CALL AccessibleDocumentViewBase::getForeground( )
+ throw (uno::RuntimeException)
+{
+ return COL_BLACK;
+}
+
+sal_Int32 SAL_CALL AccessibleDocumentViewBase::getBackground( )
+ throw (uno::RuntimeException)
+{
+ ThrowIfDisposed ();
+ ::osl::MutexGuard aGuard (maMutex);
+ return mpViewShell->GetView()->getColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor;
+}
+//-----IAccessibility2 Implementation 2009
} // end of namespace accessibility
diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index 00d42fa3a7db..4484d69eb7e8 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -52,6 +52,14 @@
#include "ViewShell.hxx"
#include "View.hxx"
+//IAccessibility2 Implementation 2009-----
+#include "DrawDocShell.hxx"
+#include <drawdoc.hxx>
+#include <algorithm>
+#include "sdpage.hxx"
+#include "slideshow.hxx"
+#include "anminfo.hxx"
+//-----IAccessibility2 Implementation 2009
#include <memory>
#include "accessibility.hrc"
@@ -70,6 +78,22 @@ class SfxViewFrame;
namespace accessibility {
+//IAccessibility2 Implementation 2009-----
+struct XShapePosCompareHelper
+{
+ bool operator() ( const uno::Reference<drawing::XShape>& xshape1,
+ const uno::Reference<drawing::XShape>& xshape2 ) const
+ {
+ // modify the compare method to return the Z-Order, not layout order
+ SdrObject* pObj1 = GetSdrObjectFromXShape(xshape1);
+ SdrObject* pObj2 = GetSdrObjectFromXShape(xshape2);
+ if(pObj1 && pObj2)
+ return pObj1->GetNavigationPosition() < pObj2->GetNavigationPosition();
+ else
+ return 0;
+ }
+};
+//-----IAccessibility2 Implementation 2009
//===== internal ============================================================
AccessibleDrawDocumentView::AccessibleDrawDocumentView (
@@ -78,6 +102,7 @@ AccessibleDrawDocumentView::AccessibleDrawDocumentView (
const uno::Reference<frame::XController>& rxController,
const uno::Reference<XAccessible>& rxParent)
: AccessibleDocumentViewBase (pSdWindow, pViewShell, rxController, rxParent),
+ mpSdViewSh( pViewShell ),
mpChildrenManager (NULL)
{
OSL_TRACE ("AccessibleDrawDocumentView");
@@ -260,9 +285,44 @@ uno::Reference<XAccessible> SAL_CALL
static_cast<uno::XWeak*>(this));
}
+//IAccessibility2 Implementation 2009-----
+OUString SAL_CALL
+ AccessibleDrawDocumentView::getAccessibleName(void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ OUString sName = String( SdResId(SID_SD_A11Y_D_PRESENTATION) );
+ ::sd::View* pSdView = static_cast< ::sd::View* >( maShapeTreeInfo.GetSdrView() );
+ if ( pSdView )
+ {
+ SdDrawDocument* pDoc = pSdView->GetDoc();
+ if ( pDoc )
+ {
+ rtl::OUString sFileName = pDoc->getDocAccTitle();
+ if ( !sFileName.getLength() )
+ {
+ ::sd::DrawDocShell* pDocSh = pSdView->GetDocSh();
+ if ( pDocSh )
+ {
+ sFileName = pDocSh->GetTitle( SFX_TITLE_APINAME );
+ }
+ }
+ OUString sReadOnly;
+ if(pDoc->getDocReadOnly())
+ {
+ sReadOnly = String(SdResId(SID_SD_A11Y_D_PRESENTATION_READONLY));
+ }
+ if ( sFileName.getLength() )
+ {
+ sName = sFileName + sReadOnly + OUString(RTL_CONSTASCII_USTRINGPARAM(" - ")) + sName;
+ }
+ }
+ }
+ return sName;
+}
+//-----IAccessibility2 Implementation 2009
//===== XEventListener ======================================================
void SAL_CALL
@@ -295,7 +355,9 @@ void SAL_CALL
AccessibleDocumentViewBase::propertyChange (rEventObject);
OSL_TRACE ("AccessibleDrawDocumentView::propertyChange");
- if (rEventObject.PropertyName == OUString (RTL_CONSTASCII_USTRINGPARAM("CurrentPage")))
+ // add page switch event for slide show mode
+ if (rEventObject.PropertyName == OUString (RTL_CONSTASCII_USTRINGPARAM("CurrentPage")) ||
+ rEventObject.PropertyName == OUString (RTL_CONSTASCII_USTRINGPARAM("PageChange")) )
{
OSL_TRACE (" current page changed");
@@ -329,6 +391,9 @@ void SAL_CALL
}
else
OSL_TRACE ("View invalid");
+//IAccessibility2 Implementation 2009-----
+ CommitChange(AccessibleEventId::PAGE_CHANGED,rEventObject.NewValue,rEventObject.OldValue);
+//-----IAccessibility2 Implementation 2009
}
else if (rEventObject.PropertyName == OUString (RTL_CONSTASCII_USTRINGPARAM("VisibleArea")))
{
@@ -338,6 +403,59 @@ void SAL_CALL
IAccessibleViewForwarderListener::VISIBLE_AREA,
&maViewForwarder);
}
+//IAccessibility2 Implementation 2009-----
+ else if (rEventObject.PropertyName == OUString (RTL_CONSTASCII_USTRINGPARAM("ActiveLayer")))
+ {
+ CommitChange(AccessibleEventId::PAGE_CHANGED,rEventObject.NewValue,rEventObject.OldValue);
+ }
+ else if (rEventObject.PropertyName == OUString (RTL_CONSTASCII_USTRINGPARAM("UpdateAcc")))
+ {
+ OSL_TRACE (" acc on current page should be updated");
+
+ // The current page changed. Update the children manager accordingly.
+ uno::Reference<drawing::XDrawView> xView (mxController, uno::UNO_QUERY);
+ if (xView.is() && mpChildrenManager!=NULL)
+ {
+ // Inform the children manager to forget all children and give
+ // him the new ones.
+ mpChildrenManager->ClearAccessibleShapeList ();
+ // update the slide show page's accessible info
+ //mpChildrenManager->SetShapeList (uno::Reference<drawing::XShapes> (
+ // xView->getCurrentPage(), uno::UNO_QUERY));
+ rtl::Reference< sd::SlideShow > xSlideshow( sd::SlideShow::GetSlideShow( mpSdViewSh->GetViewShellBase() ) );
+ if( xSlideshow.is() && xSlideshow->isRunning() && xSlideshow->isFullScreen() )
+ {
+ ::com::sun::star::uno::Reference< drawing::XDrawPage > xSlide;
+ // MT IA2: Not used...
+ // sal_Int32 currentPageIndex = xSlideshow->getCurrentPageIndex();
+ ::com::sun::star::uno::Reference< ::com::sun::star::presentation::XSlideShowController > mpSlideController = xSlideshow->getController();
+ if( mpSlideController.is() )
+ {
+ xSlide = mpSlideController->getCurrentSlide();
+ if (xSlide.is())
+ {
+ mpChildrenManager->SetShapeList (uno::Reference<drawing::XShapes> (
+ xSlide, uno::UNO_QUERY));
+ }
+ }
+ }
+ // Create the page shape and initialize it. The shape is
+ // acquired before initialization and released after
+ // transferring ownership to the children manager to prevent
+ // premature disposing of the shape.
+ AccessiblePageShape* pPage = CreateDrawPageShape ();
+ if (pPage != NULL)
+ {
+ pPage->acquire();
+ pPage->Init();
+ mpChildrenManager->AddAccessibleShape (
+ std::auto_ptr<AccessibleShape>(pPage));
+ mpChildrenManager->Update (false);
+ pPage->release();
+ }
+ }
+ }
+//-----IAccessibility2 Implementation 2009
else
{
OSL_TRACE (" unhandled");
@@ -379,9 +497,135 @@ void SAL_CALL
return aServiceNames;
}
+//IAccessibility2 Implementation 2009-----
+//===== XInterface ==========================================================
+uno::Any SAL_CALL
+ AccessibleDrawDocumentView::queryInterface (const uno::Type & rType)
+ throw (uno::RuntimeException)
+{
+ uno::Any aReturn = AccessibleDocumentViewBase::queryInterface (rType);
+ if ( ! aReturn.hasValue())
+ aReturn = ::cppu::queryInterface (rType,
+ static_cast<XAccessibleGroupPosition*>(this)
+ );
+ return aReturn;
+}
-
+void SAL_CALL
+ AccessibleDrawDocumentView::acquire (void)
+ throw ()
+{
+ AccessibleDocumentViewBase::acquire ();
+}
+void SAL_CALL
+ AccessibleDrawDocumentView::release (void)
+ throw ()
+{
+ AccessibleDocumentViewBase::release ();
+}
+//===== XAccessibleGroupPosition =========================================
+uno::Sequence< sal_Int32 > SAL_CALL
+ AccessibleDrawDocumentView::getGroupPosition( const uno::Any& rAny )
+ throw (uno::RuntimeException)
+{
+ // we will return the:
+ // [0] group level(always be 0 now)
+ // [1] similar items counts in the group
+ // [2] the position of the object in the group
+ uno::Sequence< sal_Int32 > aRet( 3 );
+ //get the xShape of the current selected drawing object
+ uno::Reference<XAccessibleContext> xAccContent;
+ rAny >>= xAccContent;
+ if ( !xAccContent.is() )
+ {
+ return aRet;
+ }
+ AccessibleShape* pAcc = AccessibleShape::getImplementation( xAccContent );
+ if ( !pAcc )
+ {
+ return aRet;
+ }
+ uno::Reference< drawing::XShape > xCurShape = pAcc->GetXShape();
+ if ( !xCurShape.is() )
+ {
+ return aRet;
+ }
+ //find all the child in the page, insert them into a vector and sort
+ if ( mpChildrenManager == NULL )
+ {
+ return aRet;
+ }
+ std::vector< uno::Reference<drawing::XShape> > vXShapes;
+ sal_Int32 nCount = mpChildrenManager->GetChildCount();
+ //get pointer of SdView & SdrPageView for further use.
+ ::sd::View* pSdView = NULL;
+ if ( mpSdViewSh )
+ {
+ pSdView = mpSdViewSh->GetView();
+ }
+ for ( sal_Int32 i = 0; i < nCount; i++ )
+ {
+ uno::Reference< drawing::XShape > xShape = mpChildrenManager->GetChildShape(i);
+ if ( xShape.is() )
+ {
+ //if the object is visable in the page, we add it into the group list.
+ SdrObject* pObj = GetSdrObjectFromXShape(xShape);
+ if(pObj && pSdView && pSdView->IsObjMarkable(*pObj))
+ {
+ vXShapes.push_back( xShape );
+ }
+ }
+ }
+ std::sort( vXShapes.begin(), vXShapes.end(), XShapePosCompareHelper() );
+ //get the the index of the selected object in the group
+ std::vector< uno::Reference<drawing::XShape> >::iterator aIter;
+ //we start counting position from 1
+ sal_Int32 nPos = 1;
+ for ( aIter = vXShapes.begin(); aIter != vXShapes.end(); aIter++, nPos++ )
+ {
+ if ( (*aIter).get() == xCurShape.get() )
+ {
+ sal_Int32* pArray = aRet.getArray();
+ pArray[0] = 1; //it should be 1 based, not 0 based.
+ pArray[1] = vXShapes.size();
+ pArray[2] = nPos;
+ break;
+ }
+ }
+ return aRet;
+}
+::rtl::OUString AccessibleDrawDocumentView::getObjectLink( const uno::Any& rAny )
+ throw (uno::RuntimeException)
+{
+ ::rtl::OUString aRet;
+ //get the xShape of the current selected drawing object
+ uno::Reference<XAccessibleContext> xAccContent;
+ rAny >>= xAccContent;
+ if ( !xAccContent.is() )
+ {
+ return aRet;
+ }
+ AccessibleShape* pAcc = AccessibleShape::getImplementation( xAccContent );
+ if ( !pAcc )
+ {
+ return aRet;
+ }
+ uno::Reference< drawing::XShape > xCurShape = pAcc->GetXShape();
+ if ( !xCurShape.is() )
+ {
+ return aRet;
+ }
+ SdrObject* pObj = GetSdrObjectFromXShape(xCurShape);
+ if (pObj)
+ {
+ SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pObj);
+ if( pInfo && (pInfo->meClickAction == presentation::ClickAction_DOCUMENT) )
+ aRet = (::rtl::OUString)pInfo->GetBookmark();
+ }
+ return aRet;
+}
+//-----IAccessibility2 Implementation 2009
/// Create a name for this view.
::rtl::OUString
AccessibleDrawDocumentView::CreateAccessibleName (void)
@@ -637,13 +881,25 @@ void AccessibleDrawDocumentView::Activated (void)
{
if (mpChildrenManager != NULL)
{
- mpChildrenManager->UpdateSelection();
+//IAccessibility2 Implementation 2009-----
+ //mpChildrenManager->UpdateSelection();
+ sal_Bool bChange = sal_False;
+//-----IAccessibility2 Implementation 2009
// When none of the children has the focus then claim it for the
// view.
if ( ! mpChildrenManager->HasFocus())
+ {
SetState (AccessibleStateType::FOCUSED);
+ bChange = sal_True;
+ }
else
ResetState (AccessibleStateType::FOCUSED);
+//IAccessibility2 Implementation 2009-----
+ mpChildrenManager->UpdateSelection();
+ // if the child gets focus in UpdateSelection(), needs to reset the focus on document.
+ if (mpChildrenManager->HasFocus() && bChange)
+ ResetState (AccessibleStateType::FOCUSED);
+//-----IAccessibility2 Implementation 2009
}
}
@@ -690,8 +946,158 @@ void SAL_CALL AccessibleDrawDocumentView::disposing (void)
AccessibleDocumentViewBase::disposing ();
}
+//IAccessibility2 Implementation 2009-----
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+ SAL_CALL AccessibleDrawDocumentView::get_AccFlowTo(const ::com::sun::star::uno::Any& rAny, sal_Int32 nType)
+ throw ( ::com::sun::star::uno::RuntimeException )
+{
+ const sal_Int32 SPELLCHECKFLOWTO = 1;
+ const sal_Int32 FINDREPLACEFLOWTO = 2;
+ if ( nType == SPELLCHECKFLOWTO )
+ {
+ uno::Reference< ::com::sun::star::drawing::XShape > xShape;
+ rAny >>= xShape;
+ if ( mpChildrenManager && xShape.is() )
+ {
+ uno::Reference < XAccessible > xAcc = mpChildrenManager->GetChild(xShape);
+ uno::Reference < XAccessibleSelection > xAccSelection( xAcc, uno::UNO_QUERY );
+ if ( xAccSelection.is() )
+ {
+ if ( xAccSelection->getSelectedAccessibleChildCount() )
+ {
+ uno::Reference < XAccessible > xSel = xAccSelection->getSelectedAccessibleChild( 0 );
+ if ( xSel.is() )
+ {
+ uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() );
+ if ( xSelContext.is() )
+ {
+ //if in sw we find the selected paragraph here
+ if ( xSelContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
+ {
+ uno::Sequence<uno::Any> aRet( 1 );
+ aRet[0] = uno::makeAny( xSel );
+ return aRet;
+ }
+ }
+ }
+ }
+ }
+ uno::Reference<XAccessible> xPara = GetSelAccContextInTable();
+ if ( xPara.is() )
+ {
+ uno::Sequence<uno::Any> aRet( 1 );
+ aRet[0] = uno::makeAny( xPara );
+ return aRet;
+ }
+ }
+ else
+ {
+ goto Rt;
+ }
+ }
+ else if ( nType == FINDREPLACEFLOWTO )
+ {
+ sal_Int32 nChildCount = getSelectedAccessibleChildCount();
+ if ( nChildCount )
+ {
+ uno::Reference < XAccessible > xSel = getSelectedAccessibleChild( 0 );
+ if ( xSel.is() )
+ {
+ uno::Reference < XAccessibleSelection > xAccChildSelection( xSel, uno::UNO_QUERY );
+ if ( xAccChildSelection.is() )
+ {
+ if ( xAccChildSelection->getSelectedAccessibleChildCount() )
+ {
+ uno::Reference < XAccessible > xChildSel = xAccChildSelection->getSelectedAccessibleChild( 0 );
+ if ( xChildSel.is() )
+ {
+ uno::Reference < XAccessibleContext > xChildSelContext( xChildSel->getAccessibleContext() );
+ if ( xChildSelContext.is() &&
+ xChildSelContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
+ {
+ uno::Sequence<uno::Any> aRet( 1 );
+ aRet[0] = uno::makeAny( xChildSel );
+ return aRet;
+ }
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ uno::Reference<XAccessible> xPara = GetSelAccContextInTable();
+ if ( xPara.is() )
+ {
+ uno::Sequence<uno::Any> aRet( 1 );
+ aRet[0] = uno::makeAny( xPara );
+ return aRet;
+ }
+ }
+ }
+Rt:
+ ::com::sun::star::uno::Sequence< uno::Any> aRet;
+ return aRet;
+}
+uno::Reference<XAccessible> AccessibleDrawDocumentView::GetSelAccContextInTable()
+{
+ uno::Reference<XAccessible> xRet;
+ sal_Int32 nCount = mpChildrenManager ? mpChildrenManager->GetChildCount() : 0;
+ if ( nCount )
+ {
+ for ( sal_Int32 i = 0; i < nCount; i++ )
+ {
+ try
+ {
+ uno::Reference<XAccessible> xObj = mpChildrenManager->GetChild(i);
+ if ( xObj.is() )
+ {
+ uno::Reference<XAccessibleContext> xObjContext( xObj, uno::UNO_QUERY );
+ if ( xObjContext.is() && xObjContext->getAccessibleRole() == AccessibleRole::TABLE )
+ {
+ uno::Reference<XAccessibleSelection> xObjSelection( xObj, uno::UNO_QUERY );
+ if ( xObjSelection.is() && xObjSelection->getSelectedAccessibleChildCount() )
+ {
+ uno::Reference<XAccessible> xCell = xObjSelection->getSelectedAccessibleChild(0);
+ if ( xCell.is() )
+ {
+ uno::Reference<XAccessibleSelection> xCellSel( xCell, uno::UNO_QUERY );
+ if ( xCellSel.is() && xCellSel->getSelectedAccessibleChildCount() )
+ {
+ uno::Reference<XAccessible> xPara = xCellSel->getSelectedAccessibleChild( 0 );
+ if ( xPara.is() )
+ {
+ uno::Reference<XAccessibleContext> xParaContext( xPara, uno::UNO_QUERY );
+ if ( xParaContext.is() &&
+ xParaContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
+ {
+ xRet = xPara;
+ return xRet;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ catch ( lang::IndexOutOfBoundsException )
+ {
+ uno::Reference<XAccessible> xEmpty;
+ return xEmpty;
+ }
+ catch ( uno::RuntimeException )
+ {
+ uno::Reference<XAccessible> xEmpty;
+ return xEmpty;
+ }
+ }
+ }
+ return xRet;
+}
+//-----IAccessibility2 Implementation 2009
void AccessibleDrawDocumentView::UpdateAccessibleName (void)
{
diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
index 2eee9155a864..2bd2a285729e 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
@@ -48,7 +48,8 @@ namespace accessibility
mViewForwarder( rOutlView )
{
// register as listener - need to broadcast state change messages
- rOutliner.SetNotifyHdl( LINK(this, AccessibleOutlineEditSource, NotifyHdl) );
+ // Moved to ::GetTextForwarder()
+ //rOutliner.SetNotifyHdl( LINK(this, AccessibleOutlineEditSource, NotifyHdl) );
StartListening(rOutliner);
}
@@ -61,14 +62,22 @@ namespace accessibility
SvxEditSource* AccessibleOutlineEditSource::Clone() const
{
- return NULL;
+ //IAccessibility2 Implementation 2009-----
+ /*return NULL;*/
+ return new AccessibleOutlineEditSource(*mpOutliner, mrView, *mpOutlinerView, mrWindow);
+ //-----IAccessibility2 Implementation 2009
}
SvxTextForwarder* AccessibleOutlineEditSource::GetTextForwarder()
{
// TODO: maybe suboptimal
if( IsValid() )
+ {
+ // Moved here to make sure that
+ // the NotifyHandler was set on the current object.
+ mpOutliner->SetNotifyHdl( LINK(this, AccessibleOutlineEditSource, NotifyHdl) );
return &mTextForwarder;
+ }
else
return NULL;
}
diff --git a/sd/source/ui/accessibility/AccessibleOutlineView.cxx b/sd/source/ui/accessibility/AccessibleOutlineView.cxx
index 1308c78f6f2f..aa1847e9b630 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineView.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineView.cxx
@@ -148,6 +148,37 @@ uno::Reference<XAccessible> SAL_CALL
return maTextHelper.GetChild(nIndex);
}
+//IAccessibility2 Implementation 2009-----
+#include <drawdoc.hxx>
+::rtl::OUString SAL_CALL
+ AccessibleOutlineView::getAccessibleName(void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ::rtl::OUString sName = String( SdResId(SID_SD_A11Y_D_PRESENTATION) );
+ ::sd::View* pSdView = static_cast< ::sd::View* >( maShapeTreeInfo.GetSdrView() );
+ if ( pSdView )
+ {
+ SdDrawDocument* pDoc = pSdView->GetDoc();
+ if ( pDoc )
+ {
+ rtl::OUString sFileName = pDoc->getDocAccTitle();
+ if ( !sFileName.getLength() )
+ {
+ ::sd::DrawDocShell* pDocSh = pSdView->GetDocSh();
+ if ( pDocSh )
+ {
+ sFileName = pDocSh->GetTitle( SFX_TITLE_APINAME );
+ }
+ }
+ if ( sFileName.getLength() )
+ {
+ sName = sFileName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - ")) + sName;
+ }
+ }
+ }
+ return sName;
+}
+//-----IAccessibility2 Implementation 2009
//===== XAccessibleEventBroadcaster ========================================
void SAL_CALL AccessibleOutlineView::addEventListener( const uno::Reference< XAccessibleEventListener >& xListener ) throw (uno::RuntimeException)
@@ -155,6 +186,9 @@ void SAL_CALL AccessibleOutlineView::addEventListener( const uno::Reference< XAc
// delegate listener handling to children manager.
if ( ! IsDisposed())
maTextHelper.AddEventListener(xListener);
+//IAccessibility2 Implementation 2009-----
+ AccessibleContextBase::addEventListener(xListener);
+//-----IAccessibility2 Implementation 2009
}
void SAL_CALL AccessibleOutlineView::removeEventListener( const uno::Reference< XAccessibleEventListener >& xListener ) throw (uno::RuntimeException)
@@ -162,6 +196,9 @@ void SAL_CALL AccessibleOutlineView::removeEventListener( const uno::Reference<
// forward
if ( ! IsDisposed())
maTextHelper.RemoveEventListener(xListener);
+//IAccessibility2 Implementation 2009-----
+ AccessibleContextBase::removeEventListener(xListener);
+//-----IAccessibility2 Implementation 2009
}
//===== XServiceInfo ========================================================
@@ -226,12 +263,17 @@ void SAL_CALL
AccessibleDocumentViewBase::propertyChange (rEventObject);
OSL_TRACE ("AccessibleOutlineView::propertyChange");
- if (rEventObject.PropertyName == ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("CurrentPage")))
+ //add page switch event for slide show mode
+ if (rEventObject.PropertyName == ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("CurrentPage")) ||
+ rEventObject.PropertyName == ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("PageChange")) )
{
OSL_TRACE (" current page changed");
// The current page changed. Update the children accordingly.
UpdateChildren();
+//IAccessibility2 Implementation 2009-----
+ CommitChange(AccessibleEventId::PAGE_CHANGED,rEventObject.NewValue,rEventObject.OldValue);
+//-----IAccessibility2 Implementation 2009
}
else if (rEventObject.PropertyName == ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("VisibleArea")))
{
diff --git a/sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx b/sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx
index 384146f6b0d8..bec31f035e12 100644
--- a/sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx
+++ b/sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx
@@ -119,5 +119,12 @@ AccessiblePresentationGraphicShape::~AccessiblePresentationGraphicShape (void)
return aDG();
}
+//IAccessibility2 Implementation 2009-----
+sal_Int16 SAL_CALL AccessiblePresentationGraphicShape::getAccessibleRole ()
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ return AccessibleRole::GRAPHIC ;
+}
+//-----IAccessibility2 Implementation 2009
} // end of namespace accessibility
diff --git a/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx b/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx
index 5769d83ed195..41c853e2a052 100644
--- a/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx
+++ b/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx
@@ -140,5 +140,13 @@ AccessiblePresentationOLEShape::~AccessiblePresentationOLEShape (void)
return aDG();
}
+//IAccessibility2 Implementation 2009-----
+// Return this object's role.
+sal_Int16 SAL_CALL AccessiblePresentationOLEShape::getAccessibleRole ()
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ return AccessibleRole::EMBEDDED_OBJECT ;
+}
+//-----IAccessibility2 Implementation 2009
} // end of namespace accessibility
diff --git a/sd/source/ui/accessibility/AccessiblePresentationShape.cxx b/sd/source/ui/accessibility/AccessiblePresentationShape.cxx
index 7e2cfa7f3cc9..57ce9fe30b36 100644
--- a/sd/source/ui/accessibility/AccessiblePresentationShape.cxx
+++ b/sd/source/ui/accessibility/AccessiblePresentationShape.cxx
@@ -27,6 +27,11 @@
#include "SdShapeTypes.hxx"
+//IAccessibility2 Implementation 2009-----
+#include "accessibility.hrc"
+#include "sdresid.hxx"
+#include <tools/string.hxx>
+//-----IAccessibility2 Implementation 2009
#include <svx/DescriptionGenerator.hxx>
#include <rtl/ustring.h>
@@ -77,38 +82,51 @@ AccessiblePresentationShape::~AccessiblePresentationShape (void)
ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId (mxShape);
switch (nShapeType)
{
+ //IAccessibility2 Implementation 2009-----
case PRESENTATION_TITLE:
- sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressTitle"));
+ //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressTitle"));
+ sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_TITLE_N)));
break;
case PRESENTATION_OUTLINER:
- sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressOutliner"));
+ //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressOutliner"));
+ sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_OUTLINER_N)));
break;
case PRESENTATION_SUBTITLE:
- sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressSubtitle"));
+ //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressSubtitle"));
+ sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_SUBTITLE_N)));
break;
case PRESENTATION_PAGE:
- sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressPage"));
+ //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressPage"));
+ sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_PAGE_N)));
break;
case PRESENTATION_NOTES:
- sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressNotes"));
+ //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressNotes"));
+ sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_NOTES_N)));
break;
case PRESENTATION_HANDOUT:
- sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressHandout"));
+ //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressHandout"));
+ sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_HANDOUT_N)));
break;
case PRESENTATION_HEADER:
- sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressHeader"));
+ //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressHeader"));
+ sName = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_HEADER_N)) );
break;
case PRESENTATION_FOOTER:
- sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressFooter"));
+ //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressFooter"));
+ sName = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_FOOTER_N)) );
break;
case PRESENTATION_DATETIME:
- sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressDateAndTime"));
+ //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressDateAndTime"));
+ sName = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_DATE_N)) );
break;
case PRESENTATION_PAGENUMBER:
- sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressPageNumber"));
+ //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressPageNumber"));
+ sName = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_NUMBER_N)) );
break;
default:
- sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("UnknownAccessibleImpressShape"));
+ //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("UnknownAccessibleImpressShape"));
+ sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_UNKNOWN_N)));
+ //-----IAccessibility2 Implementation 2009
uno::Reference<drawing::XShapeDescriptor> xDescriptor (mxShape, uno::UNO_QUERY);
if (xDescriptor.is())
sName += ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM(": "))
@@ -126,42 +144,67 @@ AccessiblePresentationShape::~AccessiblePresentationShape (void)
throw (::com::sun::star::uno::RuntimeException)
{
// return createAccessibleName ();
+ ::rtl::OUString sDescription;
DescriptionGenerator aDG (mxShape);
ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId (mxShape);
switch (nShapeType)
{
+ //IAccessibility2 Implementation 2009-----
case PRESENTATION_TITLE:
- aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationTitleShape"));
+ //aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationTitleShape"));
+ sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_TITLE_D)) );
+ aDG.Initialize (sDescription);
break;
case PRESENTATION_OUTLINER:
- aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationOutlinerShape"));
+ //aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationOutlinerShape"));
+ sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_OUTLINER_D)) );
+ aDG.Initialize (sDescription); //PresentationOutlinerShape
break;
case PRESENTATION_SUBTITLE:
aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationSubtitleShape"));
+ sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_SUBTITLE_D)) );
+ aDG.Initialize (sDescription); //PresentationSubtitleShape
break;
case PRESENTATION_PAGE:
aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationPageShape"));
+ sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_PAGE_D)) );
+ aDG.Initialize (sDescription); //PresentationPageShape
break;
case PRESENTATION_NOTES:
aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationNotesShape"));
+ sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_NOTES_D)) );
+ aDG.Initialize (sDescription); //PresentationNotesShape
break;
case PRESENTATION_HANDOUT:
aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationHandoutShape"));
+ sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_HANDOUT_D)) );
+ aDG.Initialize (sDescription); //PresentationHandoutShape
break;
case PRESENTATION_HEADER:
- aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationHeaderShape"));
+ //aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationHeaderShape"));
+ sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_HEADER_D)) );
+ aDG.Initialize (sDescription); //PresentationHeaderShape
break;
case PRESENTATION_FOOTER:
- aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationFooterShape"));
+ //aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationFooterShape"));
+ sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_FOOTER_D)) );
+ aDG.Initialize (sDescription); //PresentationFooterShape
break;
case PRESENTATION_DATETIME:
- aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationDateAndTimeShape"));
+ //aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationDateAndTimeShape"));
+ sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_DATE_D)) );
+ aDG.Initialize (sDescription); //PresentationDateShape
break;
case PRESENTATION_PAGENUMBER:
- aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationPageNumberShape"));
+ //aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationPageNumberShape"));
+ sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_NUMBER_D)) );
+ aDG.Initialize (sDescription); //PresentationNumberShape
break;
default:
- aDG.Initialize (::rtl::OUString::createFromAscii ("Unknown accessible presentation shape"));
+ //aDG.Initialize (::rtl::OUString::createFromAscii ("Unknown accessible presentation shape"));
+ sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_UNKNOWN_D)) );
+ aDG.Initialize (sDescription); //Unknown accessible presentation shape
+ //-----IAccessibility2 Implementation 2009
uno::Reference<drawing::XShapeDescriptor> xDescriptor (mxShape, uno::UNO_QUERY);
if (xDescriptor.is())
{
@@ -172,5 +215,54 @@ AccessiblePresentationShape::~AccessiblePresentationShape (void)
return aDG();
}
+//IAccessibility2 Implementation 2009-----
+::rtl::OUString AccessiblePresentationShape::GetStyle()
+{
+ ::rtl::OUString sName;
+
+ ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId (mxShape);
+ switch (nShapeType)
+ {
+ case PRESENTATION_TITLE:
+ sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_TITLE_N_STYLE)));
+ break;
+ case PRESENTATION_OUTLINER:
+ sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_OUTLINER_N_STYLE)));
+ break;
+ case PRESENTATION_SUBTITLE:
+ sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_SUBTITLE_N_STYLE)));
+ break;
+ case PRESENTATION_PAGE:
+ sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_PAGE_N_STYLE)));
+ break;
+ case PRESENTATION_NOTES:
+ sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_NOTES_N_STYLE)));
+ break;
+ case PRESENTATION_HANDOUT:
+ sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_HANDOUT_N_STYLE)));
+ break;
+ case PRESENTATION_FOOTER:
+ sName = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_FOOTER_N_STYLE)) );
+ break;
+ case PRESENTATION_HEADER:
+ sName = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_HEADER_N_STYLE)) );
+ break;
+ case PRESENTATION_DATETIME:
+ sName = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_DATE_N_STYLE)) );
+ break;
+ case PRESENTATION_PAGENUMBER:
+ sName = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_NUMBER_N_STYLE)) );
+ break;
+ default:
+ sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_UNKNOWN_N_STYLE)));
+ uno::Reference<drawing::XShapeDescriptor> xDescriptor (mxShape, uno::UNO_QUERY);
+ if (xDescriptor.is())
+ sName += ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM(": "))
+ + xDescriptor->getShapeType();
+ }
+
+ return sName;
+}
+//-----IAccessibility2 Implementation 2009
} // end of namespace accessibility
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
index 1a34101bb8a8..5c78b76ebd71 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
@@ -199,7 +199,9 @@ sal_Int16 SAL_CALL AccessibleSlideSorterObject::getAccessibleRole (void)
throw (uno::RuntimeException)
{
ThrowIfDisposed();
- static sal_Int16 nRole = AccessibleRole::LIST_ITEM;
+ //set Role = Shape
+ //static sal_Int16 nRole = AccessibleRole::LIST_ITEM;
+ static sal_Int16 nRole = AccessibleRole::SHAPE;
return nRole;
}
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
index 9b3cf9af5fad..efa4f69c8356 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
@@ -91,6 +91,7 @@ public:
DECL_LINK(FocusChangeListener, void*);
DECL_LINK(UpdateChildrenCallback, void*);
+ void Activated(void);
private:
AccessibleSlideSorterView& mrAccessibleSlideSorter;
::sd::slidesorter::SlideSorter& mrSlideSorter;
@@ -832,6 +833,11 @@ void AccessibleSlideSorterView::Implementation::RequestUpdateChildren (void)
void AccessibleSlideSorterView::Implementation::UpdateChildren (void)
{
+ //By default, all children should be accessable. So here workaround is to make all children visible.
+ // MT: THis was in UpdateVisibility, which has some similarity, and hg merge automatically has put it here. Correct?!
+ // In the IA2 CWS, also setting mnFirst/LastVisibleChild was commented out!
+ mnLastVisibleChild = maPageObjects.size();
+
if (mbModelChangeLocked)
{
// Do nothing right now. When the flag is reset, this method is
@@ -1023,6 +1029,22 @@ void AccessibleSlideSorterView::Implementation::Notify (
}
+void AccessibleSlideSorterView::SwitchViewActivated (void)
+{
+ // Firstly, set focus to view
+ this->FireAccessibleEvent(AccessibleEventId::STATE_CHANGED,
+ Any(),
+ Any(AccessibleStateType::FOCUSED));
+
+ mpImpl->Activated();
+}
+
+void AccessibleSlideSorterView::Implementation::Activated()
+{
+ mrSlideSorter.GetController().GetFocusManager().ShowFocus();
+
+}
+
IMPL_LINK(AccessibleSlideSorterView::Implementation, WindowEventListener, VclWindowEvent*, pEvent)
@@ -1079,27 +1101,40 @@ IMPL_LINK(AccessibleSlideSorterView::Implementation, FocusChangeListener, void*,
sal_Int32 nNewFocusedIndex (
mrSlideSorter.GetController().GetFocusManager().GetFocusedPageIndex());
+ sal_Bool bHasFocus = mrSlideSorter.GetController().GetFocusManager().IsFocusShowing();
+ if (!bHasFocus)
+ nNewFocusedIndex = -1;
+
+ // add a checker whether the focus event is sent out. Only after sent, the mnFocusedIndex should be updated.
+ sal_Bool bSentFocus = sal_False;
if (nNewFocusedIndex != mnFocusedIndex)
{
if (mnFocusedIndex >= 0)
{
AccessibleSlideSorterObject* pObject = GetAccessibleChild(mnFocusedIndex);
if (pObject != NULL)
+ {
pObject->FireAccessibleEvent(
AccessibleEventId::STATE_CHANGED,
Any(AccessibleStateType::FOCUSED),
Any());
+ bSentFocus = sal_True;
+ }
}
if (nNewFocusedIndex >= 0)
{
AccessibleSlideSorterObject* pObject = GetAccessibleChild(nNewFocusedIndex);
if (pObject != NULL)
+ {
pObject->FireAccessibleEvent(
AccessibleEventId::STATE_CHANGED,
Any(),
Any(AccessibleStateType::FOCUSED));
+ bSentFocus = sal_True;
+ }
}
- mnFocusedIndex = nNewFocusedIndex;
+ if (bSentFocus == sal_True)
+ mnFocusedIndex = nNewFocusedIndex;
}
return 1;
}
diff --git a/sd/source/ui/accessibility/accessibility.hrc b/sd/source/ui/accessibility/accessibility.hrc
index 5578b323da69..b408de19710d 100644
--- a/sd/source/ui/accessibility/accessibility.hrc
+++ b/sd/source/ui/accessibility/accessibility.hrc
@@ -44,6 +44,46 @@
#define SID_SD_A11Y_I_HANDOUTVIEW_N (SID_SD_A11Y_START + 10)
#define SID_SD_A11Y_I_HANDOUTVIEW_D (SID_SD_A11Y_START + 11)
+//IAccessibility2 Implementation 2009-----
+#define SID_SD_A11Y_P_TITLE_N (SID_SD_A11Y_START + 12)
+#define SID_SD_A11Y_P_TITLE_D (SID_SD_A11Y_START + 13)
+#define SID_SD_A11Y_P_OUTLINER_N (SID_SD_A11Y_START + 14)
+#define SID_SD_A11Y_P_OUTLINER_D (SID_SD_A11Y_START + 15)
+#define SID_SD_A11Y_P_SUBTITLE_N (SID_SD_A11Y_START + 16)
+#define SID_SD_A11Y_P_SUBTITLE_D (SID_SD_A11Y_START + 17)
+#define SID_SD_A11Y_P_PAGE_N (SID_SD_A11Y_START + 18)
+#define SID_SD_A11Y_P_PAGE_D (SID_SD_A11Y_START + 19)
+#define SID_SD_A11Y_P_NOTES_N (SID_SD_A11Y_START + 20)
+#define SID_SD_A11Y_P_NOTES_D (SID_SD_A11Y_START + 21)
+#define SID_SD_A11Y_P_HANDOUT_N (SID_SD_A11Y_START + 22)
+#define SID_SD_A11Y_P_HANDOUT_D (SID_SD_A11Y_START + 23)
+#define SID_SD_A11Y_P_UNKNOWN_N (SID_SD_A11Y_START + 24)
+#define SID_SD_A11Y_P_UNKNOWN_D (SID_SD_A11Y_START + 25)
+#define SID_SD_A11Y_P_FOOTER_N (SID_SD_A11Y_START + 26)
+#define SID_SD_A11Y_P_FOOTER_D (SID_SD_A11Y_START + 27)
+#define SID_SD_A11Y_P_HEADER_N (SID_SD_A11Y_START + 28)
+#define SID_SD_A11Y_P_HEADER_D (SID_SD_A11Y_START + 29)
+#define SID_SD_A11Y_P_DATE_N (SID_SD_A11Y_START + 30)
+#define SID_SD_A11Y_P_DATE_D (SID_SD_A11Y_START + 31)
+#define SID_SD_A11Y_P_NUMBER_N (SID_SD_A11Y_START + 32)
+#define SID_SD_A11Y_P_NUMBER_D (SID_SD_A11Y_START + 33)
+#define SID_SD_A11Y_D_PRESENTATION (SID_SD_A11Y_START + 34)
+#define SID_SD_A11Y_P_TITLE_N_STYLE (SID_SD_A11Y_START + 35)
+#define SID_SD_A11Y_P_OUTLINER_N_STYLE (SID_SD_A11Y_START + 36)
+#define SID_SD_A11Y_P_SUBTITLE_N_STYLE (SID_SD_A11Y_START + 37)
+#define SID_SD_A11Y_P_PAGE_N_STYLE (SID_SD_A11Y_START + 38)
+#define SID_SD_A11Y_P_NOTES_N_STYLE (SID_SD_A11Y_START + 39)
+#define SID_SD_A11Y_P_HANDOUT_N_STYLE (SID_SD_A11Y_START + 40)
+#define SID_SD_A11Y_P_UNKNOWN_N_STYLE (SID_SD_A11Y_START + 41)
+#define SID_SD_A11Y_P_FOOTER_N_STYLE (SID_SD_A11Y_START + 42)
+#define SID_SD_A11Y_P_HEADER_N_STYLE (SID_SD_A11Y_START + 43)
+#define SID_SD_A11Y_P_DATE_N_STYLE (SID_SD_A11Y_START + 44)
+#define SID_SD_A11Y_P_NUMBER_N_STYLE (SID_SD_A11Y_START + 45)
+#define SID_SD_A11Y_I_PREVIEW_N (SID_SD_A11Y_START + 46)
+#define SID_SD_A11Y_I_PREVIEW_D (SID_SD_A11Y_START + 47)
+#define SID_SD_A11Y_I_PREVIEW_SUFFIX (SID_SD_A11Y_START + 48)
+#define SID_SD_A11Y_D_PRESENTATION_READONLY (SID_SD_A11Y_START + 49)
+//-----IAccessibility2 Implementation 2009
#endif /* _SD_ACCESSIBILITY_HRC */
diff --git a/sd/source/ui/accessibility/accessibility.src b/sd/source/ui/accessibility/accessibility.src
index 39d3e5e3aa0b..43bc07e470c6 100644
--- a/sd/source/ui/accessibility/accessibility.src
+++ b/sd/source/ui/accessibility/accessibility.src
@@ -87,25 +87,174 @@ String SID_SD_A11Y_I_HANDOUTVIEW_D
Text [ en-US ] = "This is where you decide on the layout for handouts.";
};
+//IAccessibility2 Implementation 2009-----
+String SID_SD_A11Y_P_TITLE_N
+{
+ Text [ en-US ] = "PresentationTitle";
+};
+String SID_SD_A11Y_P_OUTLINER_N
+{
+ Text [ en-US ] = "PresentationOutliner";
+};
+String SID_SD_A11Y_P_SUBTITLE_N
+{
+ Text [ en-US ] = "PresentationSubtitle";
+};
+String SID_SD_A11Y_P_PAGE_N
+{
+ Text [ en-US ] = "PresentationPage";
+};
+String SID_SD_A11Y_P_NOTES_N
+{
+ Text [ en-US ] = "PresentationNotes";
+};
+String SID_SD_A11Y_P_HANDOUT_N
+{
+ Text [ en-US ] = "Handout";
+};
+String SID_SD_A11Y_P_UNKNOWN_N
+{
+ Text [ en-US ] = "UnknownAccessiblePresentationShape";
+};
+String SID_SD_A11Y_P_TITLE_D
+{
+ Text [ en-US ] = "PresentationTitleShape";
+};
+String SID_SD_A11Y_P_OUTLINER_D
+{
+ Text [ en-US ] = "PresentationOutlinerShape";
+};
+String SID_SD_A11Y_P_SUBTITLE_D
+{
+ Text [ en-US ] = "PresentationSubtitleShape";
+};
+String SID_SD_A11Y_P_PAGE_D
+{
+ Text [ en-US ] = "PresentationPageShape";
+};
+String SID_SD_A11Y_P_NOTES_D
+{
+ Text [ en-US ] = "PresentationNotesShape";
+};
+String SID_SD_A11Y_P_HANDOUT_D
+{
+ Text [ en-US ] = "PresentationHandoutShape";
+};
+String SID_SD_A11Y_P_UNKNOWN_D
+{
+ Text [ en-US ] = "Unknown accessible presentation shape";
+};
+String SID_SD_A11Y_P_FOOTER_N
+{
+ Text [ en-US ] = "PresentationFooter";
+};
+String SID_SD_A11Y_P_FOOTER_D
+{
+ Text [ en-US ] = "PresentationFooterShape";
+};
+String SID_SD_A11Y_P_HEADER_N
+{
+ Text [ en-US ] = "PresentationHeader";
+};
+String SID_SD_A11Y_P_HEADER_D
+{
+ Text [ en-US ] = "PresentationHeaderShape";
+};
+String SID_SD_A11Y_P_DATE_N
+{
+ Text [ en-US ] = "PresentationDateAndTime";
+};
+String SID_SD_A11Y_P_DATE_D
+{
+ Text [ en-US ] = "PresentationDateAndTimeShape";
+};
+String SID_SD_A11Y_P_NUMBER_N
+{
+ Text [ en-US ] = "PresentationPageNumber";
+};
+String SID_SD_A11Y_P_NUMBER_D
+{
+ Text [ en-US ] = "PresentationPageNumberShape";
+};
+String SID_SD_A11Y_D_PRESENTATION
+{
+ Text [ en-US ] = "%PRODUCTNAME Presentation";
+};
+String SID_SD_A11Y_P_TITLE_N_STYLE
+{
+ Text [ en-US ] = "Title";
+};
+String SID_SD_A11Y_P_OUTLINER_N_STYLE
+{
+ Text [ en-US ] = "Outliner";
+};
+String SID_SD_A11Y_P_SUBTITLE_N_STYLE
+{
+ Text [ en-US ] = "Sub Title";
+};
+String SID_SD_A11Y_P_PAGE_N_STYLE
+{
+ Text [ en-US ] = "Page";
+};
+String SID_SD_A11Y_P_NOTES_N_STYLE
+{
+ Text [ en-US ] = "Notes";
+};
+String SID_SD_A11Y_P_HANDOUT_N_STYLE
+{
+ Text [ en-US ] = "Handout";
+};
+String SID_SD_A11Y_P_UNKNOWN_N_STYLE
+{
+ Text [ en-US ] = "Unknown Accessible Presentation Shape";
+};
+String SID_SD_A11Y_P_FOOTER_N_STYLE
+{
+ Text [ en-US ] = "Footer";
+};
+String SID_SD_A11Y_P_HEADER_N_STYLE
+{
+ Text [ en-US ] = "Header";
+};
+String SID_SD_A11Y_P_DATE_N_STYLE
+{
+ Text [ en-US ] = "Date";
+};
+String SID_SD_A11Y_P_NUMBER_N_STYLE
+{
+ Text [ en-US ] = "Number";
+};
+String SID_SD_A11Y_I_PREVIEW_N
+{
+ Text [ en-US ] = "Preview View";
+};
+String SID_SD_A11Y_I_PREVIEW_D
+{
+ Text [ en-US ] = "This is where you print preview pages.";
+};
+String SID_SD_A11Y_I_PREVIEW_SUFFIX
+{
+ Text [ en-US ] = "(Preview mode)";
+};
-
-
-
-
-
+String SID_SD_A11Y_D_PRESENTATION_READONLY
+{
+ Text [ en-US ] = "(read-only)";
+};
+//-----IAccessibility2 Implementation 2009
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index aec9d61a63d1..f0138525df43 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -119,6 +119,9 @@ SdNavigatorWin::SdNavigatorWin(
// set focus to listbox, otherwise it is in the toolbox which is only useful
// for keyboard navigation
maTlbObjects.GrabFocus();
+//IAccessibility2 Implementation 2009-----
+ maTlbObjects.SetSdNavigatorWinFlag(sal_True);
+//-----IAccessibility2 Implementation 2009
// DragTypeListBox
maLbDocs.SetSelectHdl( LINK( this, SdNavigatorWin, SelectDocumentHdl ) );
@@ -175,6 +178,28 @@ SdNavigatorWin::~SdNavigatorWin()
// -----------------------------------------------------------------------
+//IAccessibility2 Implementation 2009-----
+//Solution: when object is marked , fresh the corresponding entry tree .
+//==================================================
+void SdNavigatorWin::FreshTree( const SdDrawDocument* pDoc )
+{
+ SdDrawDocument* pNonConstDoc = (SdDrawDocument*) pDoc; // const as const can...
+ sd::DrawDocShell* pDocShell = pNonConstDoc->GetDocSh();
+ String aDocShName( pDocShell->GetName() );
+ String aDocName = pDocShell->GetMedium()->GetName();
+ maTlbObjects.SetSaveTreeItemStateFlag(sal_True); //Added by yanjun for sym2_6385
+ maTlbObjects.Clear();
+ maTlbObjects.Fill( pDoc, false, aDocName ); // Nur normale Seiten
+ maTlbObjects.SetSaveTreeItemStateFlag(sal_False); //Added by yanjun for sym2_6385
+ RefreshDocumentLB();
+ maLbDocs.SelectEntry( aDocShName );
+}
+void SdNavigatorWin::FreshEntry( )
+{
+ maTlbObjects.FreshCurEntry();
+}
+//==================================================
+//-----IAccessibility2 Implementation 2009
void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc )
{
SdDrawDocument* pNonConstDoc = (SdDrawDocument*) pDoc; // const as const can...
@@ -245,7 +270,16 @@ NavigatorDragType SdNavigatorWin::GetNavigatorDragType()
}
// -----------------------------------------------------------------------
-
+//IAccessibility2 Implementation 2009-----
+//Solution: Get SdDrawDocShell
+sd::DrawDocShell* SdNavigatorWin::GetDrawDocShell( const SdDrawDocument* pDoc )
+{
+ if( !pDoc )
+ return NULL; // const as const can...
+ sd::DrawDocShell* pDocShell = pDoc->GetDocSh();
+ return pDocShell;
+}
+//-----IAccessibility2 Implementation 2009
IMPL_LINK( SdNavigatorWin, SelectToolboxHdl, void *, EMPTYARG )
{
@@ -403,6 +437,10 @@ IMPL_LINK( SdNavigatorWin, ClickObjectHdl, void *, EMPTYARG )
SfxStringItem aItem( SID_NAVIGATOR_OBJECT, aStr );
mpBindings->GetDispatcher()->Execute(
SID_NAVIGATOR_OBJECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, &aItem, 0L );
+//IAccessibility2 Implementation 2009-----
+ //Solution: set sign variable
+ maTlbObjects.MarkCurEntry(aStr);
+//-----IAccessibility2 Implementation 2009
// #98821# moved here from SetGetFocusHdl. Reset the
// focus only if something has been selected in the
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index e49181d35717..b57a860126de 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -252,6 +252,7 @@ sal_uInt32 SdPageObjsTLB::SdPageObjsTransferable::GetListBoxDropFormatId (void)
SdPageObjsTLB::SdPageObjsTLB( Window* pParentWin, const SdResId& rSdResId )
: SvTreeListBox ( pParentWin, rSdResId )
+, bisInSdNavigatorWin ( sal_False )
, mpParent ( pParentWin )
, mpDoc ( NULL )
, mpBookmarkDoc ( NULL )
@@ -265,7 +266,6 @@ SdPageObjsTLB::SdPageObjsTLB( Window* pParentWin, const SdResId& rSdResId )
, mpDropNavWin ( NULL )
, mbShowAllShapes ( false )
, mbShowAllPages ( false )
-
{
// Tree-ListBox mit Linien versehen
SetStyle( GetStyle() | WB_TABSTOP | WB_BORDER | WB_HASLINES |
@@ -300,6 +300,184 @@ SdPageObjsTLB::~SdPageObjsTLB()
delete mpMedium;
}
+//IAccessibility2 Implementation 2009-----
+// helper function for GetEntryAltText and GetEntryLongDescription
+String SdPageObjsTLB::getAltLongDescText( SvLBoxEntry* pEntry , sal_Bool isAltText) const
+{
+ sal_uInt16 maxPages = mpDoc->GetPageCount();
+ sal_uInt16 pageNo;
+ SdrObject* pObj = NULL;
+ SdPage* pPage = NULL;
+
+
+ String ParentName = GetEntryText( GetRootLevelParent( pEntry ) );
+
+ for( pageNo = 0; pageNo < maxPages; pageNo++ )
+ {
+ pPage = (SdPage*) mpDoc->GetPage( pageNo );
+ if( pPage->GetPageKind() != PK_STANDARD ) continue;
+ if( pPage->GetName() != ParentName ) continue;
+ SdrObjListIter aIter( *pPage, IM_FLAT );
+ while( aIter.IsMore() )
+ {
+ pObj = aIter.Next();
+ if( GetEntryText(pEntry) == GetObjectName( pObj ) )
+ {
+ if( isAltText )
+ return pObj->GetTitle();
+ else
+ return pObj->GetDescription();
+ }
+ }
+ }
+ return String();
+
+}
+
+String SdPageObjsTLB::GetEntryAltText( SvLBoxEntry* pEntry ) const
+{
+ return getAltLongDescText( pEntry, sal_True );
+}
+
+String SdPageObjsTLB::GetEntryLongDescription( SvLBoxEntry* pEntry ) const
+{
+ return getAltLongDescText( pEntry, sal_False);
+}
+
+void SdPageObjsTLB::MarkCurEntry( const String& rName )
+{
+
+ if( rName.Len() )
+ {
+ SvLBoxEntry* pCurEntry =GetCurEntry();
+ SvLBoxEntry* pEntry =NULL;
+ String aTmp1;
+ String aTmp2;
+
+ if( GetParent(pCurEntry)==NULL )
+ {
+ aTmp1 = GetEntryText( pCurEntry );
+ for( pEntry = First(); pEntry ; pEntry = Next( pEntry ) )
+ {
+ if(GetParent( pEntry )==NULL)
+ continue;
+ aTmp2 = GetEntryText( GetParent( pEntry ));
+ if( aTmp1 != aTmp2)
+ {
+ // IA2 CWS. MT: Removed in SvLBoxEntry for now - only used in Sw/Sd/ScContentLBoxString, they should decide if they need this
+ pEntry->SetMarked(sal_False);
+ }
+ }
+
+ }
+ else
+ {
+ for( pEntry = First(); pEntry ; pEntry = Next( pEntry ) )
+ {
+ aTmp2 = GetEntryText( pEntry );
+ if( aTmp2 == rName)
+ {
+ pEntry->SetMarked(sal_True);
+ }
+ else
+ {
+ pEntry->SetMarked(sal_False);
+ }
+ }
+ }
+ }
+ Invalidate();
+}
+
+void SdPageObjsTLB:: FreshCurEntry()
+{
+ SvLBoxEntry* pEntry =NULL;
+ for( pEntry = First(); pEntry ; pEntry = Next( pEntry ) )
+ {
+ pEntry->SetMarked(sal_False);
+ }
+ Invalidate();
+}
+
+class SdContentLBoxString : public SvLBoxString
+{
+public:
+ SdContentLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags,
+ const String& rStr ) : SvLBoxString(pEntry,nFlags,rStr) {}
+
+ virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
+ SvLBoxEntry* pEntry);
+};
+
+void SdPageObjsTLB::InitEntry(SvLBoxEntry* pEntry,
+ const XubString& rStr ,const Image& rImg1,const Image& rImg2,SvLBoxButtonKind eButtonKind)
+{
+ sal_uInt16 nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2"
+ SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind );
+ SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nColToHilite );
+ SdContentLBoxString* pStr = new SdContentLBoxString( pEntry, 0, pCol->GetText() );
+ pEntry->ReplaceItem( pStr, nColToHilite );
+}
+
+void SdContentLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
+ SvLBoxEntry* pEntry )
+{
+ // IA2 CWS. MT: Removed for now (also in SvLBoxEntry) - only used in Sw/Sd/ScContentLBoxString, they should decide if they need this
+ /*
+ if (pEntry->IsMarked())
+ {
+ rDev.DrawText( rPos, GetText() );
+ XubString str;
+ str = XubString::CreateFromAscii("*");
+ Point rPosStar(rPos.X()-6,rPos.Y());
+ Font aOldFont( rDev.GetFont());
+ Font aFont(aOldFont);
+ Color aCol( aOldFont.GetColor() );
+ aCol.DecreaseLuminance( 200 );
+ aFont.SetColor( aCol );
+ rDev.SetFont( aFont );
+ rDev.DrawText( rPosStar, str);
+ rDev.SetFont( aOldFont );
+ }
+ else
+ */
+ SvLBoxString::Paint( rPos, rDev, nFlags, pEntry);
+
+}
+
+void SdPageObjsTLB::SaveExpandedTreeItemState(SvLBoxEntry* pEntry, vector<String>& vectTreeItem)
+{
+ if (pEntry)
+ {
+ SvLBoxEntry* pListEntry = pEntry;
+ while (pListEntry)
+ {
+ if (pListEntry->HasChilds())
+ {
+ if (IsExpanded(pListEntry))
+ vectTreeItem.push_back(GetEntryText(pListEntry));
+ SvLBoxEntry* pChildEntry = FirstChild(pListEntry);
+ SaveExpandedTreeItemState(pChildEntry, vectTreeItem);
+ }
+ pListEntry = NextSibling(pListEntry);
+ }
+ }
+}
+void SdPageObjsTLB::Clear()
+{
+ //Save the expanded tree item
+ if (mbSaveTreeItemState)
+ {
+ maSelectionEntryText = String();
+ maTreeItem.clear();
+ if (GetCurEntry())
+ maSelectionEntryText = GetSelectEntry();
+ SvLBoxEntry* pEntry = FirstChild(NULL);
+ SaveExpandedTreeItemState(pEntry, maTreeItem);
+ }
+ return SvTreeListBox::Clear();
+}
+//-----IAccessibility2 Implementation 2009
/*************************************************************************
|*
|* return name of object
@@ -458,6 +636,10 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, bool bAllPages, const St
}
if( aSelection.Len() )
SelectEntry( aSelection );
+ else if (mbSaveTreeItemState && maSelectionEntryText.Len())
+ {
+ SelectEntry(maSelectionEntryText);
+ }
}
/*************************************************************************
@@ -537,6 +719,30 @@ void SdPageObjsTLB::AddShapeList (
IM_FLAT,
false /*not reverse*/);
+ //IAccessibility2 Implementation 2009-----
+ sal_Bool bMarked=sal_False;
+ if(bisInSdNavigatorWin)
+ {
+ Window* pWindow=NULL;
+ SdNavigatorWin* pSdNavigatorWin=NULL;
+ sd::DrawDocShell* pSdDrawDocShell = NULL;
+ if(pEntry)
+ pWindow=(Window*)GetParent(pEntry);
+ if(pWindow)
+ pSdNavigatorWin = (SdNavigatorWin*)pWindow;
+ if( pSdNavigatorWin )
+ pSdDrawDocShell = pSdNavigatorWin->GetDrawDocShell(mpDoc);
+ if(pSdDrawDocShell)
+ bMarked=pSdDrawDocShell->IsMarked(pShape);
+ if(pEntry)
+ {
+ if(bMarked)
+ pEntry->SetMarked(sal_True);
+ else
+ pEntry->SetMarked( sal_False );
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
while( aIter.IsMore() )
{
SdrObject* pObj = aIter.Next();
@@ -551,7 +757,29 @@ void SdPageObjsTLB::AddShapeList (
{
SvLBoxEntry* pNewEntry = InsertEntry( aStr, maImgOle, maImgOle, pEntry,
false, LIST_APPEND, pObj);
-
+ //IAccessibility2 Implementation 2009-----
+ if(bisInSdNavigatorWin)
+ {
+ Window* pWindow=NULL;
+ SdNavigatorWin* pSdNavigatorWin=NULL;
+ sd::DrawDocShell* pSdDrawDocShell = NULL;
+ if(pNewEntry)
+ pWindow=(Window*)GetParent(pNewEntry);
+ if(pWindow)
+ pSdNavigatorWin = (SdNavigatorWin*)pWindow;
+ if( pSdNavigatorWin )
+ pSdDrawDocShell = pSdNavigatorWin->GetDrawDocShell(mpDoc);
+ if(pSdDrawDocShell)
+ bMarked=pSdDrawDocShell->IsMarked((SdrObject*)pObj);
+ if(pNewEntry)
+ {
+ if(bMarked)
+ pNewEntry->SetMarked(sal_True);
+ else
+ pNewEntry->SetMarked( sal_False );
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
SetExpandedEntryBmp( pNewEntry, maImgOleH, BMP_COLOR_HIGHCONTRAST );
SetCollapsedEntryBmp( pNewEntry, maImgOleH, BMP_COLOR_HIGHCONTRAST );
}
@@ -559,7 +787,33 @@ void SdPageObjsTLB::AddShapeList (
{
SvLBoxEntry* pNewEntry = InsertEntry( aStr, maImgGraphic, maImgGraphic, pEntry,
false, LIST_APPEND, pObj );
-
+ //IAccessibility2 Implementation 2009-----
+ if(bisInSdNavigatorWin)
+ {
+ Window* pWindow=NULL;
+ SdNavigatorWin* pSdNavigatorWin=NULL;
+ sd::DrawDocShell* pSdDrawDocShell = NULL;
+ if(pNewEntry)
+ pWindow=(Window*)GetParent(pNewEntry);
+ if(pWindow)
+ pSdNavigatorWin = (SdNavigatorWin*)pWindow;
+ if( pSdNavigatorWin )
+ pSdDrawDocShell = pSdNavigatorWin->GetDrawDocShell(mpDoc);
+ if(pSdDrawDocShell)
+ bMarked=pSdDrawDocShell->IsMarked((SdrObject*)pObj);
+ if(pNewEntry)
+ {
+ if(bMarked)
+ {
+ pNewEntry->SetMarked(sal_True);
+ }
+ else
+ {
+ pNewEntry->SetMarked( sal_False );
+ }
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
SetExpandedEntryBmp( pNewEntry, maImgGraphicH, BMP_COLOR_HIGHCONTRAST );
SetCollapsedEntryBmp( pNewEntry, maImgGraphicH, BMP_COLOR_HIGHCONTRAST );
}
@@ -577,7 +831,33 @@ void SdPageObjsTLB::AddShapeList (
{
SvLBoxEntry* pNewEntry = InsertEntry( aStr, rIconProvider.maImgObjects, rIconProvider.maImgObjects, pEntry,
false, LIST_APPEND, pObj );
-
+ //IAccessibility2 Implementation 2009-----
+ if(bisInSdNavigatorWin)
+ {
+ Window* pWindow=NULL;
+ SdNavigatorWin* pSdNavigatorWin=NULL;
+ sd::DrawDocShell* pSdDrawDocShell = NULL;
+ if(pNewEntry)
+ pWindow=(Window*)GetParent(pNewEntry);
+ if(pWindow)
+ pSdNavigatorWin = (SdNavigatorWin*)pWindow;
+ if( pSdNavigatorWin )
+ pSdDrawDocShell = pSdNavigatorWin->GetDrawDocShell(mpDoc);
+ if(pSdDrawDocShell)
+ bMarked=pSdDrawDocShell->IsMarked((SdrObject*)pObj);
+ if(pNewEntry)
+ {
+ if(bMarked)
+ {
+ pNewEntry->SetMarked(sal_True);
+ }
+ else
+ {
+ pNewEntry->SetMarked( sal_False );
+ }
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
SetExpandedEntryBmp( pNewEntry, rIconProvider.maImgObjectsH, BMP_COLOR_HIGHCONTRAST );
SetCollapsedEntryBmp( pNewEntry, rIconProvider.maImgObjectsH, BMP_COLOR_HIGHCONTRAST );
}
@@ -600,6 +880,24 @@ void SdPageObjsTLB::AddShapeList (
pEntry,
bIsExcluded ? rIconProvider.maImgPageObjsExclH : rIconProvider.maImgPageObjsH,
BMP_COLOR_HIGHCONTRAST);
+ //IAccessibility2 Implementation 2009-----
+ if (mbSaveTreeItemState)
+ {
+ vector<String>:: iterator iteStart = maTreeItem.begin();
+ while (iteStart != maTreeItem.end())
+ {
+ String strEntry = GetEntryText(pEntry);
+ if (*iteStart == strEntry)
+ {
+ Expand( pEntry );
+ break;
+ }
+ ++iteStart;
+ }
+ }
+ else
+ Expand( pEntry );
+ //-----IAccessibility2 Implementation 2009
}
}
@@ -976,6 +1274,62 @@ void SdPageObjsTLB::KeyInput( const KeyEvent& rKEvt )
DoubleClickHdl();
}
+//IAccessibility2 Implementation 2009-----
+ else if (rKEvt.GetKeyCode().GetCode() == KEY_SPACE)
+ {
+ if(bisInSdNavigatorWin)
+ {
+ sal_Bool bMarked=sal_False;
+ SvLBoxEntry* pNewEntry = GetCurEntry();
+ if( GetParent(pNewEntry) == NULL )
+ return;
+ String aStr=GetSelectEntry();
+ Window* pWindow=NULL;
+ SdNavigatorWin* pSdNavigatorWin=NULL;
+ sd::DrawDocShell* pSdDrawDocShell = NULL;
+ if(pNewEntry)
+ pWindow=(Window*)GetParent(pNewEntry);
+ if(pWindow)
+ pSdNavigatorWin = (SdNavigatorWin*)pWindow;
+ if( pSdNavigatorWin )
+ pSdDrawDocShell = pSdNavigatorWin->GetDrawDocShell(mpDoc);
+ if(pSdDrawDocShell)
+ {
+ pSdDrawDocShell->GotoTreeBookmark(aStr);
+ bMarked=pSdDrawDocShell->GetObjectIsmarked(aStr);
+ }
+ //Removed by yanjun for sym2_6385
+ //The symphony2.0 can support morn than one level tree list, also support to select tow or more items in different level.
+ /*
+ SvLBoxEntry* pBeginEntry = First();
+ if( pBeginEntry )
+ {
+ if( GetParent(pBeginEntry) != GetParent(pNewEntry) )
+ pBeginEntry->SetMarked( sal_False );
+ SvLBoxEntry* pNextEntry = Next( pBeginEntry );
+ while( pNextEntry )
+ {
+ if( GetParent(pNextEntry) != GetParent(pNewEntry) )
+ pNextEntry->SetMarked( sal_False );
+ pNextEntry = Next( pNextEntry );
+ }
+ }
+ End*/
+ if(pNewEntry)
+ {
+ if(bMarked)
+ {
+ pNewEntry->SetMarked(sal_True);
+ }
+ else
+ {
+ pNewEntry->SetMarked( sal_False );
+ }
+ }
+ Invalidate();
+ }
+ }
+//-----IAccessibility2 Implementation 2009
else
SvTreeListBox::KeyInput( rKEvt );
}
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 022573ca85c4..97f49ff3cd07 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -95,6 +95,10 @@
#include "framework/FrameworkHelper.hxx"
#include <tools/urlobj.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <sfx2/viewfrm.hxx>
+#include "SdUnoDrawView.hxx"
+//-----IAccessibility2 Implementation 2009
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using ::sd::framework::FrameworkHelper;
@@ -578,6 +582,22 @@ sal_Bool DrawDocShell::Save()
sal_Bool DrawDocShell::SaveAs( SfxMedium& rMedium )
{
+//IAccessibility2 Implementation 2009-----
+ mpDoc->setDocAccTitle(String());
+ SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this );
+ if (pFrame1)
+ {
+ ::Window* pWindow = &pFrame1->GetWindow();
+ if ( pWindow )
+ {
+ ::Window* pSysWin = pWindow->GetSystemWindow();
+ if ( pSysWin )
+ {
+ pSysWin->SetAccessibleName(String());
+ }
+ }
+ }
+//-----IAccessibility2 Implementation 2009
mpDoc->StopWorkStartupDelay();
//TODO/LATER: why this?!
@@ -915,6 +935,236 @@ bool DrawDocShell::GotoBookmark(const String& rBookmark)
return (bFound);
}
+//IAccessibility2 Implementation 2009-----
+//Solution: If object is marked , return true , else return false .
+sal_Bool DrawDocShell::IsMarked( SdrObject* pObject )
+{
+ sal_Bool bisMarked =sal_False;
+ DrawViewShell* pDrViewSh = dynamic_cast< DrawViewShell* >(mpViewShell);
+
+ if(pDrViewSh && pObject)
+ {
+ bisMarked = pDrViewSh->GetView()->isSdrObjectSelected(*pObject);
+ }
+
+ return bisMarked;
+}
+//Solution: If object is marked , return true , else return false .
+sal_Bool DrawDocShell::GetObjectIsmarked(const String& rBookmark)
+{
+ OSL_TRACE("GotoBookmark %s", ::rtl::OUStringToOString(rBookmark, RTL_TEXTENCODING_UTF8).getStr());
+ sal_Bool bUnMark = sal_False;
+ DrawViewShell* pDrViewSh = dynamic_cast< DrawViewShell* >(mpViewShell);
+
+ if(pDrViewSh)
+ {
+ String aBookmark( rBookmark );
+
+ if( rBookmark.Len() && rBookmark.GetChar( 0 ) == sal_Unicode('#') )
+ aBookmark = rBookmark.Copy( 1 );
+
+ // Ist das Bookmark eine Seite?
+ bool bIsMasterPage;
+ sal_uInt32 nPgNum(mpDoc->GetPageByName(aBookmark, bIsMasterPage));
+ SdrObject* pObj = NULL;
+
+ if (nPgNum == SDRPAGE_NOTFOUND)
+ {
+ // Ist das Bookmark ein Objekt?
+ pObj = mpDoc->GetObj(aBookmark);
+
+ if (pObj)
+ {
+ nPgNum = pObj->getSdrPageFromSdrObject()->GetPageNumber();
+ }
+ }
+
+ if (nPgNum != SDRPAGE_NOTFOUND)
+ {
+ /**********************************************************
+ * Zur Seite springen
+ **********************************************************/
+
+ SdPage* pPage = (SdPage*) mpDoc->GetPage(nPgNum);
+
+ PageKind eNewPageKind = pPage->GetPageKind();
+
+ if (eNewPageKind != pDrViewSh->GetPageKind())
+ {
+ // Arbeitsbereich wechseln
+ GetFrameView()->SetPageKind(eNewPageKind);
+ ( ( mpViewShell && mpViewShell->GetViewFrame() ) ?
+ mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->
+ GetDispatcher()->Execute( SID_VIEWSHELL0, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD );
+
+ // Die aktuelle ViewShell hat sich geaendert!
+ pDrViewSh = (DrawViewShell*) mpViewShell;
+ }
+
+ EditMode eNewEditMode = EM_PAGE;
+
+ if( bIsMasterPage )
+ {
+ eNewEditMode = EM_MASTERPAGE;
+ }
+
+ if (eNewEditMode != pDrViewSh->GetEditMode())
+ {
+ // EditMode setzen
+ pDrViewSh->ChangeEditMode(eNewEditMode, sal_False);
+ }
+
+ // Jump to the page. This is done by using the API because this
+ // takes care of all the little things to be done. Especially
+ // writing the view data to the frame view (see bug #107803#).
+ sal_uInt16 nSdPgNum = (nPgNum - 1) / 2;
+ SdUnoDrawView* pUnoDrawView = new SdUnoDrawView (
+ pDrViewSh->GetViewShellBase().GetDrawController(),
+ *pDrViewSh,
+ *pDrViewSh->GetView());
+ if (pUnoDrawView != NULL)
+ {
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XDrawPage> xDrawPage (
+ pPage->getUnoPage(), ::com::sun::star::uno::UNO_QUERY);
+ pUnoDrawView->setCurrentPage (xDrawPage);
+ }
+ else
+ {
+ // As a fall back switch to the page via the core.
+ DBG_ASSERT (pUnoDrawView!=NULL,
+ "SdDrawDocShell::GotoBookmark: can't switch page via API");
+ pDrViewSh->SwitchPage(nSdPgNum);
+ }
+ delete pUnoDrawView;
+
+
+ if(pObj)
+ {
+ // Objekt einblenden und selektieren
+ pDrViewSh->MakeVisibleAtView(
+ pObj->getObjectRange(pDrViewSh->GetView()),
+ *pDrViewSh->GetActiveWindow());
+
+ bUnMark = pDrViewSh->GetView()->isSdrObjectSelected(*pObj);
+ }
+ }
+ }
+
+ return ( bUnMark);
+}
+//Solution: realize multi-selection of objects
+sal_Bool DrawDocShell::GotoTreeBookmark(const String& rBookmark)
+{
+ OSL_TRACE("GotoBookmark %s", ::rtl::OUStringToOString(rBookmark, RTL_TEXTENCODING_UTF8).getStr());
+ sal_Bool bFound = sal_False;
+ DrawViewShell* pDrViewSh = dynamic_cast< DrawViewShell* >(mpViewShell);
+
+ if(pDrViewSh)
+ {
+ String aBookmark( rBookmark );
+
+ if( rBookmark.Len() && rBookmark.GetChar( 0 ) == sal_Unicode('#') )
+ aBookmark = rBookmark.Copy( 1 );
+
+ // Ist das Bookmark eine Seite?
+ bool bIsMasterPage;
+ sal_uInt32 nPgNum(mpDoc->GetPageByName(aBookmark, bIsMasterPage));
+ SdrObject* pObj = NULL;
+
+ if (nPgNum == SDRPAGE_NOTFOUND)
+ {
+ // Ist das Bookmark ein Objekt?
+ pObj = mpDoc->GetObj(aBookmark);
+
+ if (pObj)
+ {
+ nPgNum = pObj->getSdrPageFromSdrObject()->GetPageNumber();
+ }
+ }
+
+ if (nPgNum != SDRPAGE_NOTFOUND)
+ {
+ /**********************************************************
+ * Zur Seite springen
+ **********************************************************/
+ bFound = sal_True;
+ SdPage* pPage = (SdPage*) mpDoc->GetPage(nPgNum);
+
+ PageKind eNewPageKind = pPage->GetPageKind();
+
+ if (eNewPageKind != pDrViewSh->GetPageKind())
+ {
+ // Arbeitsbereich wechseln
+ GetFrameView()->SetPageKind(eNewPageKind);
+ ( ( mpViewShell && mpViewShell->GetViewFrame() ) ?
+ mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->
+ GetDispatcher()->Execute( SID_VIEWSHELL0, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD );
+
+ // Die aktuelle ViewShell hat sich geaendert!
+ pDrViewSh = (DrawViewShell*) mpViewShell;
+ }
+
+ EditMode eNewEditMode = EM_PAGE;
+
+ if( bIsMasterPage )
+ {
+ eNewEditMode = EM_MASTERPAGE;
+ }
+
+ if (eNewEditMode != pDrViewSh->GetEditMode())
+ {
+ // EditMode setzen
+ pDrViewSh->ChangeEditMode(eNewEditMode, sal_False);
+ }
+
+ // Jump to the page. This is done by using the API because this
+ // takes care of all the little things to be done. Especially
+ // writing the view data to the frame view (see bug #107803#).
+ sal_uInt16 nSdPgNum = (nPgNum - 1) / 2;
+ SdUnoDrawView* pUnoDrawView = new SdUnoDrawView (
+ pDrViewSh->GetViewShellBase().GetDrawController(),
+ *pDrViewSh,
+ *pDrViewSh->GetView());
+ if (pUnoDrawView != NULL)
+ {
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XDrawPage> xDrawPage (
+ pPage->getUnoPage(), ::com::sun::star::uno::UNO_QUERY);
+ pUnoDrawView->setCurrentPage (xDrawPage);
+ }
+ else
+ {
+ // As a fall back switch to the page via the core.
+ DBG_ASSERT (pUnoDrawView!=NULL,
+ "SdDrawDocShell::GotoBookmark: can't switch page via API");
+ pDrViewSh->SwitchPage(nSdPgNum);
+ }
+ delete pUnoDrawView;
+
+
+ if (pObj)
+ {
+ // Objekt einblenden und selektieren
+ pDrViewSh->MakeVisibleAtView(
+ pObj->getObjectRange(pDrViewSh->GetView()),
+ *pDrViewSh->GetActiveWindow());
+ const bool bUnMark(pDrViewSh->GetView()->isSdrObjectSelected(*pObj));
+
+ pDrViewSh->GetView()->MarkObj(*pObj, bUnMark);
+ }
+ }
+
+ SfxBindings& rBindings = ( ( mpViewShell && mpViewShell->GetViewFrame() ) ?
+ mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->GetBindings();
+
+ rBindings.Invalidate(SID_NAVIGATOR_STATE, sal_True, sal_False);
+ rBindings.Invalidate(SID_NAVIGATOR_PAGENAME);
+ }
+
+ return (bFound);
+}
+//-----IAccessibility2 Implementation 2009
/*************************************************************************
|*
|* SaveAsOwnFormat: wenn es eine Dokumentvorlage werden soll,
@@ -1037,4 +1287,39 @@ void DrawDocShell::OpenBookmark( const String& rBookmarkURL )
( mpViewShell ? mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->GetBindings().Execute( SID_OPENHYPERLINK, ppArgs );
}
+//IAccessibility2 Implementation 2009-----
+void DrawDocShell::setDocAccTitle( const String& rTitle )
+{
+ if (mpDoc )
+ {
+ mpDoc->setDocAccTitle( rTitle );
+ }
+}
+const String DrawDocShell::getDocAccTitle() const
+{
+ String sRet;
+ if (mpDoc)
+ {
+ sRet = mpDoc->getDocAccTitle();
+ }
+
+ return sRet;
+}
+void DrawDocShell::setDocReadOnly( sal_Bool bReadOnly)
+{
+ if (mpDoc )
+ {
+ mpDoc->setDocReadOnly( bReadOnly );
+ }
+}
+sal_Bool DrawDocShell::getDocReadOnly() const
+{
+ if (mpDoc)
+ {
+ return mpDoc->getDocReadOnly();
+ }
+
+ return sal_False;
+}
+//-----IAccessibility2 Implementation 2009
} // end of namespace sd
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index 56b10cf8e707..3351da18056a 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -456,10 +456,16 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
// changeover to the next object
if(!mpView->MarkNextObj( !aCode.IsShift() ))
{
- // #97016# No next object: go over open end and
- // get first from the other side
- mpView->UnmarkAllObj();
- mpView->MarkNextObj(!aCode.IsShift());
+ //IAccessibility2 Implementation 2009-----
+ //If there is only one object, don't do the UnmarkAlllObj() & MarkNextObj().
+ if ( mpView->getSelectedSdrObjectCount() > 1 )
+ {
+ // #97016# No next object: go over open end and
+ // get first from the other side
+ mpView->UnmarkAllObj();
+ mpView->MarkNextObj(!aCode.IsShift());
+ }
+ //-----IAccessibility2 Implementation 2009
}
// #97016# II
diff --git a/sd/source/ui/func/fuediglu.cxx b/sd/source/ui/func/fuediglu.cxx
index 5bf8dd9eb21a..665ac4d1bb5f 100644
--- a/sd/source/ui/func/fuediglu.cxx
+++ b/sd/source/ui/func/fuediglu.cxx
@@ -58,8 +58,14 @@ FuEditGluePoints::FuEditGluePoints (
::sd::View* pView,
SdDrawDocument* pDoc,
SfxRequest& rReq)
- : FuDraw(pViewSh, pWin, pView, pDoc, rReq),
- meLastSdrViewEditMode(SDREDITMODE_EDIT)
+: FuDraw(pViewSh, pWin, pView, pDoc, rReq),
+ meLastSdrViewEditMode(SDREDITMODE_EDIT),
+//IAccessibility2 Implementation 2009-----
+ //Solution: Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point,
+ //and SHIFT+ENTER key to decide the postion and draw the new insert point
+ maOldPoint(0, 0),
+ mbBeginInsertPoint(false)
+//-----IAccessibility2 Implementation 2009
{
}
@@ -315,11 +321,113 @@ bool FuEditGluePoints::KeyInput(const KeyEvent& rKEvt)
{
mpView->SetActualOutDev( mpWindow );
+//IAccessibility2 Implementation 2009-----
+ //Solution: Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point,
+ //and SHIFT+ENTER key to decide the postion and draw the new insert point
+ //sal_Bool bReturn = FuDraw::KeyInput(rKEvt);
+
bool bReturn = FuDraw::KeyInput(rKEvt);
+ switch (rKEvt.GetKeyCode().GetCode())
+ {
+ case KEY_UP:
+ case KEY_DOWN:
+ case KEY_LEFT:
+ case KEY_RIGHT:
+ {
+ if(rKEvt.GetKeyCode().IsShift()&& mpView->IsInsGluePointMode() ){
+ long nX = 0;
+ long nY = 0;
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
+ if (nCode == KEY_UP)
+ {
+ // Scroll nach oben
+ nX = 0;
+ nY =-1;
+ }
+ else if (nCode == KEY_DOWN)
+ {
+ // Scroll nach unten
+ nX = 0;
+ nY = 1;
+ }
+ else if (nCode == KEY_LEFT)
+ {
+ // Scroll nach links
+ nX =-1;
+ nY = 0;
+ }
+ else if (nCode == KEY_RIGHT)
+ {
+ // Scroll nach rechts
+ nX = 1;
+ nY = 0;
+ }
+
+ const basegfx::B2DPoint aSelectCenterPixel(
+ mpWindow->GetViewTransformation() * mpView->getMarkedObjectSnapRange().getCenter());
+ const Point aPoint(mbBeginInsertPoint
+ ? maOldPoint
+ : Point(basegfx::fround(aSelectCenterPixel.getX()), basegfx::fround(aSelectCenterPixel.getY())));
+ const Point ePoint(aPoint + Point(nX, nY));
+
+ mpWindow->SetPointerPosPixel(ePoint);
+
+ //simulate mouse move action
+ MouseEvent eMevt(ePoint, 1, 2, MOUSE_LEFT, 0);
+ MouseMove(eMevt);
+
+ // ??? Point aPix(eMevt.GetPosPixel());
+ maOldPoint = ePoint;
+ mbBeginInsertPoint = true;
+ bReturn = true;
+ }
+ }
+ break;
+ case KEY_RETURN:
+ if(rKEvt.GetKeyCode().IsShift() && mpView->IsInsGluePointMode() )
+ {
+ if(mbBeginInsertPoint)
+ {
+ mpWindow->SetPointerPosPixel(maOldPoint);
+ //simulate mouse button down action
+ MouseEvent aMevt(maOldPoint, 1, 3, MOUSE_LEFT, KEY_SHIFT);
+ // MT IA2: Not used?
+ // sal_uInt16 ubuttons = aMevt.GetButtons();
+ // sal_uInt16 uMod = aMevt.GetModifier();
+ MouseButtonDown(aMevt);
+ mpWindow->CaptureMouse();
+ //simulate mouse button up action
+ MouseEvent rMEvt(maOldPoint, 1, 17, MOUSE_LEFT, KEY_SHIFT);
+ MouseButtonUp(rMEvt);
+ bReturn= sal_True;
+ }
+ }
+ break;
+ }
+ if(!bReturn)
+ bReturn = FuDraw::KeyInput(rKEvt);
+//-----IAccessibility2 Implementation 2009
return bReturn;
}
+//IAccessibility2 Implementation 2009-----
+ //Solution: Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point,
+ //and SHIFT+ENTER key to decide the postion and draw the new insert point
+void FuEditGluePoints::ForcePointer(const MouseEvent* pMEvt)
+{
+ if(mbBeginInsertPoint && pMEvt)
+ {
+ MouseEvent aMEvt(pMEvt->GetPosPixel(), pMEvt->GetClicks(),
+ pMEvt->GetMode(), pMEvt->GetButtons(), pMEvt->GetModifier() & ~KEY_SHIFT);
+ FuDraw::ForcePointer(&aMEvt);
+ }
+ else
+ {
+ FuDraw::ForcePointer(pMEvt);
+ }
+}
+//-----IAccessibility2 Implementation 2009
/*************************************************************************
|*
|* Command-event
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 9c5da26e695c..a77827f95928 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -96,15 +96,22 @@ FuSelection::FuSelection (
::sd::View* pView,
SdDrawDocument* pDoc,
SfxRequest& rReq)
- : FuDraw(pViewSh, pWin, pView, pDoc, rReq),
- bTempRotation(false),
- bSelectionChanged(false),
- bHideAndAnimate(false),
- pHdl(NULL),
- bSuppressChangesOfSelection(false),
- bMirrorSide0(false),
- nEditMode(SID_BEZIER_MOVE),
- pWaterCanCandidate(NULL)
+: FuDraw(pViewSh, pWin, pView, pDoc, rReq),
+ bTempRotation(false),
+ bSelectionChanged(false),
+ bHideAndAnimate(false),
+ pHdl(NULL),
+ bSuppressChangesOfSelection(false),
+ bMirrorSide0(false),
+ nEditMode(SID_BEZIER_MOVE),
+ pWaterCanCandidate(NULL),
+//IAccessibility2 Implementation 2009-----
+ //Solution: Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point,
+ //and SHIFT+ENTER key to decide the postion and draw the new insert point
+ maOldPoint(0, 0),
+ mbBeginInsertPoint(false),
+ mbMovedToCenterPoint(false)
+//-----IAccessibility2 Implementation 2009
{
}
@@ -965,8 +972,85 @@ bool FuSelection::KeyInput(const KeyEvent& rKEvt)
bReturn = FuSelection::cancel();
}
break;
+//IAccessibility2 Implementation 2009-----
+ //Solution: add keyboard operation for insert points in drawing curve
+ case KEY_UP:
+ case KEY_DOWN:
+ case KEY_LEFT:
+ case KEY_RIGHT:
+ {
+ if(rKEvt.GetKeyCode().IsShift()&&(nEditMode == SID_BEZIER_INSERT))
+ {
+ long nX = 0;
+ long nY = 0;
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
+ if (nCode == KEY_UP)
+ {
+ // Scroll nach oben
+ nX = 0;
+ nY =-1;
}
+ else if (nCode == KEY_DOWN)
+ {
+ // Scroll nach unten
+ nX = 0;
+ nY = 1;
+ }
+ else if (nCode == KEY_LEFT)
+ {
+ // Scroll nach links
+ nX =-1;
+ nY = 0;
+ }
+ else if (nCode == KEY_RIGHT)
+ {
+ // Scroll nach rechts
+ nX = 1;
+ nY = 0;
+ }
+
+ const basegfx::B2DPoint aSelectCenterPixel(
+ mpWindow->GetViewTransformation() * mpView->getMarkedObjectSnapRange().getCenter());
+ const Point aPoint(mbMovedToCenterPoint
+ ? maOldPoint
+ : Point(basegfx::fround(aSelectCenterPixel.getX()), basegfx::fround(aSelectCenterPixel.getY())));
+ const Point ePoint(aPoint + Point(nX, nY));
+
+ mpWindow->SetPointerPosPixel(ePoint);
+
+ //simulate mouse move action
+ MouseEvent eMevt(ePoint, 1, 2, MOUSE_LEFT, 0);
+ MouseMove(eMevt);
+ maOldPoint = ePoint;
+ mbMovedToCenterPoint = true;
+ bReturn = true;
+ }
+ }
+ break;
+ case KEY_RETURN:
+ if(rKEvt.GetKeyCode().IsShift()&&(nEditMode == SID_BEZIER_INSERT))
+ {
+ if(!mbBeginInsertPoint)
+ {
+ //simulate mouse button down action
+ MouseEvent aMevt(maOldPoint, 1, 3, MOUSE_LEFT, KEY_SHIFT);
+ MouseButtonDown(aMevt);
+ mpWindow->CaptureMouse();
+ mbBeginInsertPoint = true;
+ }
+ else
+ {
+ //simulate mouse button up action
+ MouseEvent rMEvt(maOldPoint, 1, 17, MOUSE_LEFT, KEY_SHIFT);
+ MouseButtonUp(rMEvt);
+ mbBeginInsertPoint = false;
+ }
+ bReturn= sal_True;
+ }
+ break;
+ }
+//-----IAccessibility2 Implementation 2009
if (!bReturn)
{
bReturn = FuDraw::KeyInput(rKEvt);
@@ -984,6 +1068,21 @@ bool FuSelection::KeyInput(const KeyEvent& rKEvt)
}
+//IAccessibility2 Implementation 2009-----
+void FuSelection::ForcePointer(const MouseEvent* pMEvt)
+{
+ if(mbMovedToCenterPoint && !mbBeginInsertPoint && pMEvt)
+ {
+ MouseEvent aMEvt(pMEvt->GetPosPixel(), pMEvt->GetClicks(),
+ pMEvt->GetMode(), pMEvt->GetButtons(), pMEvt->GetModifier() & ~KEY_SHIFT);
+ FuDraw::ForcePointer(&aMEvt);
+ }
+ else
+ {
+ FuDraw::ForcePointer(pMEvt);
+ }
+}
+//-----IAccessibility2 Implementation 2009
/*************************************************************************
|*
|* Function aktivieren
diff --git a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
index b356ea2f31f2..7000c4dce24e 100644
--- a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
+++ b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
@@ -38,6 +38,17 @@
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <tools/link.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
+#include "DrawViewShell.hxx"
+#include "sdpage.hxx"
+#include "drawdoc.hxx"
+#include "FrameView.hxx"
+#include "PresentationViewShell.hxx"
+#include <editeng/outlobj.hxx>
+#include <com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp>
+class SdViewShell;
+//-----IAccessibility2 Implementation 2009
namespace sd {
class ViewShell;
class Window;
@@ -86,6 +97,10 @@ class AccessibleDocumentViewBase
public ::com::sun::star::beans::XPropertyChangeListener,
public ::com::sun::star::awt::XWindowListener,
public ::com::sun::star::awt::XFocusListener
+//IAccessibility2 Implementation 2009-----
+ ,public ::com::sun::star::accessibility::XAccessibleExtendedAttributes
+ ,public com::sun::star::accessibility::XAccessibleGetAccFlowTo
+//-----IAccessibility2 Implementation 2009
{
public:
//===== internal ========================================================
@@ -250,7 +265,12 @@ public:
throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL focusLost (const ::com::sun::star::awt::FocusEvent& e)
throw (::com::sun::star::uno::RuntimeException);
-
+//IAccessibility2 Implementation 2009-----
+ //----------------------------xAttribute----------------------------
+ virtual com::sun::star::uno::Any SAL_CALL getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ ::sd::ViewShell* mpViewShell;
+//-----IAccessibility2 Implementation 2009
private:
// return the member maMutex;
@@ -359,7 +379,20 @@ protected:
virtual void SetAccessibleOLEObject (
const ::com::sun::star::uno::Reference <
::com::sun::star::accessibility::XAccessible>& xOLEObject);
+//IAccessibility2 Implementation 2009-----
+ //===== XAccessibleGetAccFromXShape ============================================
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+ SAL_CALL get_AccFlowTo(const ::com::sun::star::uno::Any& rAny, sal_Int32 nType)
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+public:
+ virtual void SwitchViewActivated (void) { Activated(); }
+ virtual sal_Int32 SAL_CALL getForeground( )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getBackground( )
+ throw (::com::sun::star::uno::RuntimeException);
+//-----IAccessibility2 Implementation 2009
virtual void impl_dispose (void);
};
diff --git a/sd/source/ui/inc/AccessibleDrawDocumentView.hxx b/sd/source/ui/inc/AccessibleDrawDocumentView.hxx
index 2b683e47d3ae..0354243a350f 100644
--- a/sd/source/ui/inc/AccessibleDrawDocumentView.hxx
+++ b/sd/source/ui/inc/AccessibleDrawDocumentView.hxx
@@ -26,6 +26,10 @@
#include "AccessibleDocumentViewBase.hxx"
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/XAccessibleGroupPosition.hpp>
+//-----IAccessibility2 Implementation 2009
+
namespace accessibility {
@@ -39,6 +43,9 @@ namespace accessibility {
*/
class AccessibleDrawDocumentView :
public AccessibleDocumentViewBase
+//IAccessibility2 Implementation 2009-----
+ ,public ::com::sun::star::accessibility::XAccessibleGroupPosition
+//-----IAccessibility2 Implementation 2009
{
public:
//===== internal ========================================================
@@ -73,6 +80,11 @@ public:
throw (::com::sun::star::uno::RuntimeException,
::com::sun::star::lang::IndexOutOfBoundsException);
+//IAccessibility2 Implementation 2009-----
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+//-----IAccessibility2 Implementation 2009
//===== lang::XEventListener ============================================
@@ -86,6 +98,28 @@ public:
virtual void SAL_CALL
propertyChange (const ::com::sun::star::beans::PropertyChangeEvent& rEventObject)
throw (::com::sun::star::uno::RuntimeException);
+//IAccessibility2 Implementation 2009-----
+ //===== 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 (void)
+ throw ();
+
+ virtual void SAL_CALL
+ release (void)
+ throw ();
+
+ //===== XAccessibleGroupPosition =========================================
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getGroupPosition( const ::com::sun::star::uno::Any& rAny )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getObjectLink( const ::com::sun::star::uno::Any& accoject )
+ throw (::com::sun::star::uno::RuntimeException);
+//-----IAccessibility2 Implementation 2009
protected:
@@ -120,6 +154,10 @@ protected:
virtual void
implSelect( sal_Int32 nAccessibleChildIndex, sal_Bool bSelect )
throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+//IAccessibility2 Implementation 2009-----
+private:
+ ::sd::ViewShell* mpSdViewSh;
+//-----IAccessibility2 Implementation 2009
protected:
/** This object manages the shapes of the represented draw page. It is
@@ -160,6 +198,15 @@ protected:
virtual void impl_dispose (void);
+//IAccessibility2 Implementation 2009-----
+ //===== XAccessibleGetAccFromXShape ============================================
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+ SAL_CALL get_AccFlowTo(const ::com::sun::star::uno::Any& rAny, sal_Int32 nType)
+ throw ( ::com::sun::star::uno::RuntimeException );
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ GetSelAccContextInTable();
+//-----IAccessibility2 Implementation 2009
+
private:
void UpdateAccessibleName (void);
};
diff --git a/sd/source/ui/inc/AccessibleOutlineView.hxx b/sd/source/ui/inc/AccessibleOutlineView.hxx
index d1188e37cbd4..f265deb7add2 100644
--- a/sd/source/ui/inc/AccessibleOutlineView.hxx
+++ b/sd/source/ui/inc/AccessibleOutlineView.hxx
@@ -75,7 +75,11 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
getAccessibleChild (sal_Int32 nIndex)
throw (::com::sun::star::uno::RuntimeException);
-
+//IAccessibility2 Implementation 2009-----
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+//-----IAccessibility2 Implementation 2009
//===== XAccessibleEventBroadcaster ========================================
virtual void SAL_CALL
diff --git a/sd/source/ui/inc/AccessiblePresentationGraphicShape.hxx b/sd/source/ui/inc/AccessiblePresentationGraphicShape.hxx
index 457e1ed4348f..53a6eb570d5b 100644
--- a/sd/source/ui/inc/AccessiblePresentationGraphicShape.hxx
+++ b/sd/source/ui/inc/AccessiblePresentationGraphicShape.hxx
@@ -27,6 +27,9 @@
#include <svx/AccessibleGraphicShape.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+//-----IAccessibility2 Implementation 2009
namespace accessibility {
/** This class makes Impress shapes accessible.
@@ -60,6 +63,10 @@ public:
virtual ::rtl::OUString
CreateAccessibleDescription ()
throw (::com::sun::star::uno::RuntimeException);
+//IAccessibility2 Implementation 2009-----
+ /// Return this object's role.
+ virtual sal_Int16 SAL_CALL getAccessibleRole () throw (::com::sun::star::uno::RuntimeException);
+//-----IAccessibility2 Implementation 2009
};
} // end of namespace accessibility
diff --git a/sd/source/ui/inc/AccessiblePresentationOLEShape.hxx b/sd/source/ui/inc/AccessiblePresentationOLEShape.hxx
index 0339c4f9aeb2..9445f03ab191 100644
--- a/sd/source/ui/inc/AccessiblePresentationOLEShape.hxx
+++ b/sd/source/ui/inc/AccessiblePresentationOLEShape.hxx
@@ -27,6 +27,9 @@
#include <svx/AccessibleOLEShape.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+//-----IAccessibility2 Implementation 2009
namespace accessibility {
/** This class makes Impress shapes accessible.
@@ -60,6 +63,10 @@ public:
virtual ::rtl::OUString
CreateAccessibleDescription ()
throw (::com::sun::star::uno::RuntimeException);
+//IAccessibility2 Implementation 2009-----
+ /// Return this object's role.
+ virtual sal_Int16 SAL_CALL getAccessibleRole () throw (::com::sun::star::uno::RuntimeException);
+//-----IAccessibility2 Implementation 2009
};
} // end of namespace accessibility
diff --git a/sd/source/ui/inc/AccessiblePresentationShape.hxx b/sd/source/ui/inc/AccessiblePresentationShape.hxx
index cbad99926a19..68ef10925883 100644
--- a/sd/source/ui/inc/AccessiblePresentationShape.hxx
+++ b/sd/source/ui/inc/AccessiblePresentationShape.hxx
@@ -59,6 +59,9 @@ public:
virtual ::rtl::OUString
CreateAccessibleDescription ()
throw (::com::sun::star::uno::RuntimeException);
+//IAccessibility2 Implementation 2009-----
+ ::rtl::OUString GetStyle();
+//-----IAccessibility2 Implementation 2009
private:
/** Don't use the default constructor. Use the public constructor that
diff --git a/sd/source/ui/inc/AccessibleSlideSorterView.hxx b/sd/source/ui/inc/AccessibleSlideSorterView.hxx
index 7839e911be57..8637472c2dbe 100644
--- a/sd/source/ui/inc/AccessibleSlideSorterView.hxx
+++ b/sd/source/ui/inc/AccessibleSlideSorterView.hxx
@@ -286,7 +286,8 @@ public:
getSupportedServiceNames (void)
throw (::com::sun::star::uno::RuntimeException);
-
+ // IAccessibility2 Implementation 2009
+ virtual void SwitchViewActivated (void);
private:
class Implementation;
::std::auto_ptr<Implementation> mpImpl;
diff --git a/sd/source/ui/inc/AccessibleSlideView.hxx b/sd/source/ui/inc/AccessibleSlideView.hxx
index 4ff94d19c223..e6fe1ed02f14 100644
--- a/sd/source/ui/inc/AccessibleSlideView.hxx
+++ b/sd/source/ui/inc/AccessibleSlideView.hxx
@@ -25,7 +25,10 @@
#define SD_ACCESSIBILITY_ACCESSIBLE_SLIDE_VIEW_HXX
#include <cppuhelper/implbase6.hxx>
-#include <cppuhelper/implbase7.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <cppuhelper/implbase9.hxx>
+//#include <cppuhelper/implbase7.hxx>
+//-----IAccessibility2 Implementation 2009
#include "SlideView.hxx"
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
@@ -35,6 +38,9 @@
#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
+//-----IAccessibility2 Implementation 2009
#include <vector>
class SdDrawDocument;
@@ -156,14 +162,18 @@ public:
// - AccessibleSlideView -
// -----------------------
-class AccessibleSlideView : public ::cppu::WeakImplHelper7<
+class AccessibleSlideView : public ::cppu::WeakImplHelper9<
::com::sun::star::lang::XUnoTunnel,
::com::sun::star::accessibility::XAccessible,
::com::sun::star::accessibility::XAccessibleEventBroadcaster,
::com::sun::star::accessibility::XAccessibleContext,
::com::sun::star::accessibility::XAccessibleComponent,
::com::sun::star::accessibility::XAccessibleSelection,
- ::com::sun::star::lang::XServiceInfo >
+ ::com::sun::star::lang::XServiceInfo
+//IAccessibility2 Implementation 2009-----
+ ,::com::sun::star::accessibility::XAccessibleExtendedAttributes
+ ,::com::sun::star::awt::XFocusListener >
+//-----IAccessibility2 Implementation 2009
{
public:
@@ -189,8 +199,18 @@ public:
void SetPageVisible( sal_uInt16 nPage, sal_Bool bVisible );
void Reset();
void FocusHasChanged( sal_uInt16 nOldFocusPage, sal_uInt16 nNewFocusPage );
-
-
+//IAccessibility2 Implementation 2009-----
+ void SelectionHasChanged (sal_uInt16 nPage, sal_Bool bSelect );
+ //===== XFocusListener =================================================
+ virtual void SAL_CALL focusGained (const ::com::sun::star::awt::FocusEvent& e)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL focusLost (const ::com::sun::star::awt::FocusEvent& e)
+ throw (::com::sun::star::uno::RuntimeException);
+ //===== lang::XEventListener ============================================
+ virtual void SAL_CALL disposing (const struct com::sun::star::lang::EventObject &) throw (::com::sun::star::uno::RuntimeException);
+ // This method is called from the component helper base class while disposing.
+ virtual void SAL_CALL disposing (void);
+//-----IAccessibility2 Implementation 2009
private:
::osl::Mutex maMutex;
::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > maSlidePageObjects;
@@ -199,6 +219,10 @@ private:
::sd::Window* mpParentWindow;
/// client id in the AccessibleEventNotifier queue
sal_uInt32 mnClientId;
+//IAccessibility2 Implementation 2009-----
+ sal_uInt32 nFocusPageIndex;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow> mxWindow;
+//-----IAccessibility2 Implementation 2009
// internal
static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
@@ -253,6 +277,11 @@ private:
//===== XServiceInfo ====================================================
+//IAccessibility2 Implementation 2009-----
+ //----------------------------xAttribute----------------------------
+ virtual com::sun::star::uno::Any SAL_CALL getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+//-----IAccessibility2 Implementation 2009
/** Returns an identifier for the implementation of this object.
*/
virtual ::rtl::OUString SAL_CALL
diff --git a/sd/source/ui/inc/DrawController.hxx b/sd/source/ui/inc/DrawController.hxx
index 2e52299d4153..10de941da6b0 100644
--- a/sd/source/ui/inc/DrawController.hxx
+++ b/sd/source/ui/inc/DrawController.hxx
@@ -44,6 +44,9 @@
#include <memory>
#include <vector>
#include <boost/scoped_ptr.hpp>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/drawing/XLayer.hpp>
+//-----IAccessibility2 Implementation 2009
class SfxViewShell;
class SdXImpressDocument;
@@ -102,6 +105,10 @@ public:
PROPERTY_ZOOMVALUE = 7,
PROPERTY_VIEWOFFSET = 8,
PROPERTY_DRAWVIEWMODE = 9
+ //IAccessibility2 Implementation 2009-----
+ ,PROPERTY_UPDATEACC = 10
+ ,PROPERTY_PAGE_CHANGE = 11
+ //-----IAccessibility2 Implementation 2009
};
/** Create a new DrawController object for the given ViewShellBase.
@@ -147,6 +154,14 @@ public:
switch.
*/
void BroadcastContextChange (void) const;
+//IAccessibility2 Implementation 2009-----
+ void NotifyAccUpdate();
+ void fireChangeLayer( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XLayer>* pCurrentLayer ) throw();
+ // change the parameter to int
+ //void fireSwitchCurrentPage( String pageName) throw();
+ void fireSwitchCurrentPage( sal_Int32 pageIndex) throw();
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XLayer>* mpCurrentLayer;
+//-----IAccessibility2 Implementation 2009
/** Return a pointer to the ViewShellBase object that the DrawController
is connected to.
diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx
index 3082d7f262bc..476b15b5a3cf 100644
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -135,6 +135,12 @@ public:
bool GotoBookmark(const String& rBookmark);
+//IAccessibility2 Implementation 2009-----
+ //Solution: realize multi-selection of objects
+ sal_Bool GotoTreeBookmark(const String& rBookmark);
+ sal_Bool IsMarked( SdrObject* pObject );
+ sal_Bool GetObjectIsmarked(const String& rBookmark);
+//-----IAccessibility2 Implementation 2009
Bitmap GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixel);
/** checks, if the given name is a valid new name for a slide
@@ -224,6 +230,13 @@ protected:
bool mbOwnDocument; // if true, we own mpDoc and will delete it in our d'tor
void Construct(bool bClipboard);
virtual void InPlaceActivate( sal_Bool bActive );
+//IAccessibility2 Implementation 2009-----
+public:
+ virtual void setDocAccTitle( const String& rTitle );
+ virtual const String getDocAccTitle() const;
+ virtual void setDocReadOnly( sal_Bool bReadOnly);
+ virtual sal_Bool getDocReadOnly() const;
+//-----IAccessibility2 Implementation 2009
};
#ifndef SV_DECL_DRAW_DOC_SHELL_DEFINED
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index ad01d51d54cb..4073f476c999 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -250,6 +250,13 @@ public:
bool GotoBookmark(const String& rBookmark);
void MakeVisibleAtView(const basegfx::B2DRange& rRange, ::Window& rWin);
+//IAccessibility2 Implementation 2009-----
+ //Solution: realize multi-selection of objects ,If object is marked ,
+ //the corresponding entry is set true ,else the corresponding entry is set false .
+ void FreshNavigatrEntry();
+ void FreshNavigatrTree();
+//-----IAccessibility2 Implementation 2009
+
virtual void ReadFrameViewData(FrameView* pView);
virtual void WriteFrameViewData();
@@ -368,6 +375,10 @@ public:
::rtl::OUString GetSidebarContextName (void) const;
+//IAccessibility2 Implementation 2009-----
+ //move this method to ViewShell.
+ //void NotifyAccUpdate();
+//-----IAccessibility2 Implementation 2009
protected:
DrawView* mpDrawView;
SdPage* mpActualPage;
@@ -494,6 +505,10 @@ private:
using ViewShell::Notify;
+//IAccessibility2 Implementation 2009-----
+ //const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & GetForms() const;
+//-----IAccessibility2 Implementation 2009
+
::std::auto_ptr< AnnotationManager > mpAnnotationManager;
::std::auto_ptr< ViewOverlayManager > mpViewOverlayManager;
};
diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx
index 2ab4f28101d2..2a2bc934f5d7 100644
--- a/sd/source/ui/inc/OutlineViewShell.hxx
+++ b/sd/source/ui/inc/OutlineViewShell.hxx
@@ -137,6 +137,9 @@ public:
::com::sun::star::accessibility::XAccessible>
CreateAccessibleDocumentView (::sd::Window* pWindow);
+//IAccessibility2 Implementation 2009-----
+ String m_StrOldPageName;
+//-----IAccessibility2 Implementation 2009
/** Update the preview to show the specified page.
*/
virtual void UpdatePreview (SdPage* pPage, bool bInit = false);
diff --git a/sd/source/ui/inc/SdUnoDrawView.hxx b/sd/source/ui/inc/SdUnoDrawView.hxx
index 12975e07f521..0be24403003c 100644
--- a/sd/source/ui/inc/SdUnoDrawView.hxx
+++ b/sd/source/ui/inc/SdUnoDrawView.hxx
@@ -112,14 +112,14 @@ protected:
void setMasterPageMode(sal_Bool MasterPageMode_) throw();
sal_Bool getLayerMode(void) const throw();
void setLayerMode(sal_Bool LayerMode_) throw();
-
+public:
/** Return a reference to the active layer object.
@return
The returned value may be empty when the internal state of this
view is not valid (like during destruction.)
*/
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XLayer> getActiveLayer (void) throw ();
-
+protected:
/** Make the specified object the active layer.
@param rxLayer
The new layer object.
diff --git a/sd/source/ui/inc/SlideSorterViewShell.hxx b/sd/source/ui/inc/SlideSorterViewShell.hxx
index e360097dc17f..6898d895c09d 100644
--- a/sd/source/ui/inc/SlideSorterViewShell.hxx
+++ b/sd/source/ui/inc/SlideSorterViewShell.hxx
@@ -173,6 +173,10 @@ public:
virtual ::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible>
CreateAccessibleDocumentView (::sd::Window* pWindow);
+ //IAccessibility2 Implementation 2009-----
+ // handle SlideSorterView specially because AccessibleSlideSorterView doesn't inherit from AccessibleDocumentViewBase
+ virtual void SwitchViewFireFocus( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc );
+ //-----IAccessibility2 Implementation 2009
SlideSorter& GetSlideSorter (void) const;
diff --git a/sd/source/ui/inc/SlideViewShell.hxx b/sd/source/ui/inc/SlideViewShell.hxx
index bdfda8df19e1..c94ef13ee8b8 100644
--- a/sd/source/ui/inc/SlideViewShell.hxx
+++ b/sd/source/ui/inc/SlideViewShell.hxx
@@ -138,6 +138,10 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> CreateAccessibleDocumentView( ::sd::Window* pWindow );
void SelectionHasChanged();
+//IAccessibility2 Implementation 2009-----
+ //Notify the SELECTION_CHANGE, SELECTION_ADD, SELECTION_REMOVE events
+ void SelectionHasChanged(sal_uInt16 nPage, sal_Bool bSelect);
+//-----IAccessibility2 Implementation 2009
void PageLayoutHasChanged();
void FocusHasChanged( sal_uInt16 nOldFocusPage, sal_uInt16 nNewFocusPage );
void PageVisibilityHasChanged( sal_uInt16 nPage, bool bVisible );
@@ -146,6 +150,9 @@ public:
*/
virtual void Activate (sal_Bool IsMDIActivate);
+//IAccessibility2 Implementation 2009-----
+ void SwitchViewFireFocus(::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc );
+//-----IAccessibility2 Implementation 2009
protected:
virtual Size GetOptimalSizePixel() const;
virtual long VirtHScrollHdl(ScrollBar* pHScroll);
diff --git a/sd/source/ui/inc/TabControl.hxx b/sd/source/ui/inc/TabControl.hxx
index 0d27f5511218..f64434f17bbd 100644
--- a/sd/source/ui/inc/TabControl.hxx
+++ b/sd/source/ui/inc/TabControl.hxx
@@ -42,6 +42,10 @@ class TabControl
public DragSourceHelper,
public DropTargetHelper
{
+//IAccessibility2 Implementation 2009-----
+ //Solution: declare bIsMarked variable
+ sal_uInt16 RrePageID;
+//-----IAccessibility2 Implementation 2009
public:
TabControl (DrawViewShell* pDrViewSh, ::Window* pParent);
virtual ~TabControl (void);
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 0fb63d5c008a..64de86829a87 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -304,6 +304,14 @@ public:
basegfx::B2DPoint GetWinViewPos() const;
basegfx::B2DPoint GetViewOrigin() const;
+//IAccessibility2 Implementation 2009-----
+ virtual void SwitchViewFireFocus( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc );
+ virtual void SwitchActiveViewFireFocus( );
+ // Move these two methods from DrawViewShell to enable slide show view
+ void NotifyAccUpdate();
+ void fireSwitchCurrentPage(sal_Int32 pageIndex);
+//-----IAccessibility2 Implementation 2009
+
/** Return the window updater of this view shell.
@return
In rare circumstances the returned pointer may be <null/>,
diff --git a/sd/source/ui/inc/Window.hxx b/sd/source/ui/inc/Window.hxx
index 30c8f6937846..8d2e38655aa7 100644
--- a/sd/source/ui/inc/Window.hxx
+++ b/sd/source/ui/inc/Window.hxx
@@ -202,6 +202,9 @@ protected:
virtual ::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible>
CreateAccessible (void);
+//IAccessibility2 Implementation 2009-----
+ virtual void SwitchView();
+//-----IAccessibility2 Implementation 2009
XubString GetSurroundingText() const;
Selection GetSurroundingTextSelection() const;
diff --git a/sd/source/ui/inc/fuediglu.hxx b/sd/source/ui/inc/fuediglu.hxx
index 03302a068389..17b3ae9b419b 100644
--- a/sd/source/ui/inc/fuediglu.hxx
+++ b/sd/source/ui/inc/fuediglu.hxx
@@ -53,6 +53,16 @@ public:
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
+//IAccessibility2 Implementation 2009-----
+ //Solution: Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point,
+ //and SHIFT+ENTER key to decide the postion and draw the new insert point
+ virtual void ForcePointer(const MouseEvent* pMEvt = NULL);
+private:
+ Point maOldPoint;
+
+ /// bitfield
+ bool mbBeginInsertPoint : 1;
+//-----IAccessibility2 Implementation 2009
protected:
FuEditGluePoints (
ViewShell* pViewSh,
diff --git a/sd/source/ui/inc/fusel.hxx b/sd/source/ui/inc/fusel.hxx
index 3106a71e1cb6..053d7d8c9878 100644
--- a/sd/source/ui/inc/fusel.hxx
+++ b/sd/source/ui/inc/fusel.hxx
@@ -66,6 +66,10 @@ public:
*/
virtual bool cancel();
+//IAccessibility2 Implementation 2009-----
+ //Solution: let mouse cursor move
+ virtual void ForcePointer(const MouseEvent* pMEvt = NULL);
+//-----IAccessibility2 Implementation 2009
protected:
FuSelection (ViewShell* pViewSh,
::sd::Window* pWin,
@@ -98,6 +102,15 @@ private:
position then NULL is returned.
*/
SdrObject* pickObject (const basegfx::B2DPoint& rTestPoint);
+//IAccessibility2 Implementation 2009-----
+ //Solution: Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point,
+ //and SHIFT+ENTER key to decide the postion and draw the new insert point
+ Point maOldPoint;
+
+ /// bitfield
+ bool mbBeginInsertPoint : 1;
+ bool mbMovedToCenterPoint : 1;
+//-----IAccessibility2 Implementation 2009
};
} // end of namespace sd
diff --git a/sd/source/ui/inc/navigatr.hxx b/sd/source/ui/inc/navigatr.hxx
index f00c9791bf0c..ffeaf8ac8e71 100644
--- a/sd/source/ui/inc/navigatr.hxx
+++ b/sd/source/ui/inc/navigatr.hxx
@@ -165,6 +165,13 @@ private:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
void SetDragImage();
void ApplyImageList();
+//IAccessibility2 Implementation 2009-----
+public:
+ //Solution: when object is marked , fresh the corresponding entry tree .
+ sd::DrawDocShell* GetDrawDocShell(const SdDrawDocument*);
+ void FreshTree ( const SdDrawDocument* pDoc );
+ void FreshEntry( );
+//-----IAccessibility2 Implementation 2009
};
diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx
index f321dedee24a..dc4150cec16d 100644
--- a/sd/source/ui/inc/sdtreelb.hxx
+++ b/sd/source/ui/inc/sdtreelb.hxx
@@ -36,6 +36,10 @@
#include <svl/urlbmk.hxx>
#include <tools/ref.hxx>
#include "sdxfer.hxx"
+//IAccessibility2 Implementation 2009-----
+#include <vector>
+using namespace std;
+//-----IAccessibility2 Implementation 2009
#include <boost/scoped_ptr.hpp>
#include <boost/function.hpp>
@@ -69,6 +73,10 @@ class SD_DLLPUBLIC SdPageObjsTLB : public SvTreeListBox
private:
static bool SD_DLLPRIVATE bIsInDrag; // static, falls der Navigator im ExecuteDrag geloescht wird
+//IAccessibility2 Implementation 2009-----
+ //Solution: set contenttree in SdNavigatorWin
+ sal_Bool bisInSdNavigatorWin;
+//-----IAccessibility2 Implementation 2009
public:
// nested class to implement the TransferableHelper
@@ -143,6 +151,11 @@ protected:
::sd::DrawDocShell* mpDropDocSh;
SdNavigatorWin* mpDropNavWin;
SfxViewFrame* mpFrame;
+ //IAccessibility2 Implementation 2009-----
+ vector<String> maTreeItem;
+ sal_Bool mbSaveTreeItemState;
+ String maSelectionEntryText;
+ //-----IAccessibility2 Implementation 2009
// DragSourceHelper
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
@@ -187,12 +200,20 @@ protected:
using Window::GetDropTarget;
virtual SvLBoxEntry* GetDropTarget (const Point& rLocation);
+//IAccessibility2 Implementation 2009-----
+ virtual void InitEntry(SvLBoxEntry*,const XubString&,const Image&,const Image&,SvLBoxButtonKind );
+//-----IAccessibility2 Implementation 2009
public:
SdPageObjsTLB( Window* pParent, const SdResId& rSdResId );
~SdPageObjsTLB();
-
+//IAccessibility2 Implementation 2009-----
+ // helper function for GetEntryAltText and GetEntryLongDescription
+ String getAltLongDescText( SvLBoxEntry* pEntry , sal_Bool isAltText) const;
+ String GetEntryAltText( SvLBoxEntry* pEntry ) const;
+ String GetEntryLongDescription( SvLBoxEntry* pEntry ) const;
+//-----IAccessibility2 Implementation 2009
virtual void SelectHdl();
virtual void KeyInput( const KeyEvent& rKEvt );
@@ -207,6 +228,16 @@ public:
bool HasSelectedChilds( const String& rName );
bool SelectEntry( const String& rName );
String GetSelectEntry();
+//IAccessibility2 Implementation 2009-----
+ //Solution: Mark Current Entry
+ void MarkCurEntry( const String& rName );
+ void SetSdNavigatorWinFlag(sal_Bool isInSdNavigatorWin){bisInSdNavigatorWin =isInSdNavigatorWin;};
+ void FreshCurEntry();
+
+ void Clear();
+ void SetSaveTreeItemStateFlag(sal_Bool bState){mbSaveTreeItemState = bState;}
+ void SaveExpandedTreeItemState(SvLBoxEntry* pEntry, vector<String>& vectTreeItem);
+//-----IAccessibility2 Implementation 2009
List* GetSelectEntryList( sal_uInt16 nDepth );
SdDrawDocument* GetBookmarkDoc(SfxMedium* pMedium = NULL);
::sd::DrawDocShell* GetDropDocSh() { return(mpDropDocSh); }
diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx
index aa1d7c36d9cb..853162b612ab 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -727,4 +727,28 @@ void ShowWindow::AddWindowToPaintView()
GetChild( nChild )->Show( true );
}
+//IAccessibility2 Implementation 2009-----
+// Overload the sd::Window's CreateAccessible to create a different accessible object
+::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>
+ ShowWindow::CreateAccessible (void)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc = GetAccessible(sal_False);
+ if (xAcc.get())
+ {
+ return xAcc;
+ }
+ if (mpViewShell != NULL)
+ {
+ xAcc = mpViewShell->CreateAccessibleDocumentView (this);
+ SetAccessible(xAcc);
+ return xAcc;
+ }
+ else
+ {
+ OSL_TRACE ("::sd::Window::CreateAccessible: no view shell");
+ return ::Window::CreateAccessible ();
+ }
+}
+//-----IAccessibility2 Implementation 2009
} // end of namespace sd
diff --git a/sd/source/ui/slideshow/showwindow.hxx b/sd/source/ui/slideshow/showwindow.hxx
index 2db511087035..0d62e62d9816 100644
--- a/sd/source/ui/slideshow/showwindow.hxx
+++ b/sd/source/ui/slideshow/showwindow.hxx
@@ -102,6 +102,11 @@ public:
virtual void MouseButtonDown(const MouseEvent& rMEvt);
virtual void Paint(const Rectangle& rRect);
virtual long Notify(NotifyEvent& rNEvt);
+ //IAccessibility2 Implementation 2009-----
+ //Overload the sd::Window's CreateAccessible to create a different accessible object
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>
+ CreateAccessible (void);
void TerminateShow();
void RestartShow();
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index 29f4e53e19a7..a7658ceea78d 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -819,6 +819,12 @@ void SAL_CALL SlideShow::end() throw(RuntimeException)
}
}
}
+ //IAccessibility2 Implementation 2009-----
+ //Fire the acc focus event when focus is switched back. The above method mpCurrentViewShellBase->GetWindow()->GrabFocus() will
+ //set focus to WorkWindow instead of the sd::window, so here call Shell's method to fire the focus event
+ if (pViewShell)
+ pViewShell->SwitchActiveViewFireFocus();
+ //-----IAccessibility2 Implementation 2009
}
mpCurrentViewShellBase = 0;
}
@@ -1045,6 +1051,10 @@ void SlideShow::activate( ViewShellBase& rBase )
if( mxController->startShow(mxCurrentSettings.get()) )
{
pShell->Resize();
+ //IAccessibility2 Implementation 2009-----
+ // Defer the sd::ShowWindow's GrabFocus to here. so that the accessible event can be fired correctly.
+ pShell->GetActiveWindow()->GrabFocus();
+ //-----IAccessibility2 Implementation 2009
}
else
{
@@ -1219,6 +1229,13 @@ void SlideShow::StartInPlacePresentation()
if( !bSuccess )
end();
+ //IAccessibility2 Implementation 2009-----
+ else
+ {
+ if(mpCurrentViewShellBase)
+ mpCurrentViewShellBase->GetWindow()->GrabFocus();
+ }
+ //-----IAccessibility2 Implementation 2009
}
}
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 2a20eed5daea..248bdc547104 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1096,7 +1096,10 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
pBindings->Invalidate( SID_REHEARSE_TIMINGS );
}
- mpShowWindow->GrabFocus();
+ //IAccessibility2 Implementation 2009-----
+ // Defer the sd::ShowWindow's GrabFocus to SlideShow::activate. so that the accessible event can be fired correctly.
+ //mpShowWindow->GrabFocus();
+ //-----IAccessibility2 Implementation 2009
std::vector<beans::PropertyValue> aProperties;
aProperties.reserve( 4 );
@@ -1472,6 +1475,15 @@ void SlideshowImpl::displayCurrentSlide (const bool bSkipAllMainSequenceEffects)
pBindings->Invalidate( SID_NAVIGATOR_PAGENAME );
}
}
+ //IAccessibility2 Implementation 2009-----
+ // send out page change event and notity to update all acc info for current page
+ if (mpViewShell)
+ {
+ sal_Int32 currentPageIndex = getCurrentSlideIndex();
+ mpViewShell->fireSwitchCurrentPage(currentPageIndex);
+ mpViewShell->NotifyAccUpdate();
+ }
+ //-----IAccessibility2 Implementation 2009
}
// ---------------------------------------------------------
diff --git a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
index d83863a24986..b6e420a680ee 100644
--- a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
@@ -284,6 +284,11 @@ void FocusManager::HideFocusIndicator (const model::SharedPageDescriptor& rpDesc
if (rpDescriptor.get() != NULL)
{
mrSlideSorter.GetView().SetState(rpDescriptor, model::PageDescriptor::ST_Focused, false);
+
+ //IAccessibility2 Implementation 2009-----
+ // Hide focus should also fire the focus event, Currently, only accessibility add the focus listener
+ NotifyFocusChangeListeners();
+ //-----IAccessibility2 Implementation 2009
}
}
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index a1cc87db9fac..1e755c76905a 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -211,6 +211,12 @@ void SlideSorterViewShell::Init (bool bIsMainViewShell)
{
ViewShell::Init(bIsMainViewShell);
+//IAccessibility2 Implementation 2009-----
+ // since the updatePageList will show focus, the window.show() must be called ahead. This show is deferred from Init()
+ ::sd::Window* pActiveWindow = GetActiveWindow();
+ if (pActiveWindow)
+ pActiveWindow->Show();
+//-----IAccessibility2 Implementation 2009
mpSlideSorter->GetModel().UpdatePageList();
if (mpContentWindow.get() != NULL)
@@ -292,7 +298,19 @@ Reference<drawing::XDrawSubController> SlideSorterViewShell::CreateSubController
pWindow);
}
-
+//IAccessibility2 Implementation 2009-----
+void SlideSorterViewShell::SwitchViewFireFocus(::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc )
+{
+ if (xAcc.get())
+ {
+ ::accessibility::AccessibleSlideSorterView* pBase = static_cast< ::accessibility::AccessibleSlideSorterView* >(xAcc.get());
+ if (pBase)
+ {
+ pBase->SwitchViewActivated();
+ }
+ }
+}
+//-----IAccessibility2 Implementation 2009
SlideSorter& SlideSorterViewShell::GetSlideSorter (void) const
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 47e3692e9f7e..5a24710dd6d0 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -539,9 +539,45 @@ void DrawController::FireSwitchCurrentPage (SdPage* pNewCurrentPage) throw()
}
}
}
+//IAccessibility2 Implementation 2009-----
+void DrawController::NotifyAccUpdate()
+{
+ sal_Int32 nHandle = PROPERTY_UPDATEACC;
+ Any aNewValue, aOldValue;
+ fire (&nHandle, &aNewValue, &aOldValue, 1, sal_False);
+}
+
+void DrawController::fireChangeLayer( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XLayer>* pCurrentLayer ) throw()
+{
+ if( pCurrentLayer != mpCurrentLayer )
+ {
+ sal_Int32 nHandle = PROPERTY_ACTIVE_LAYER;
+ Any aNewValue (makeAny( *pCurrentLayer) );
+
+ Any aOldValue ;
+
+ fire (&nHandle, &aNewValue, &aOldValue, 1, sal_False);
+
+ mpCurrentLayer = pCurrentLayer;
+ }
+}
+// This method is only called in slide show and outline view
+//void DrawController::fireSwitchCurrentPage(String pageName ) throw()
+void DrawController::fireSwitchCurrentPage(sal_Int32 pageIndex ) throw()
+{
+ Any aNewValue;
+ Any aOldValue;
+ //OUString aPageName( pageName );
+ //aNewValue <<= aPageName ;
+ aNewValue <<= pageIndex;
+ // Use new property to handle page change event
+ sal_Int32 nHandles = PROPERTY_PAGE_CHANGE;
+ fire( &nHandles, &aNewValue, &aOldValue, 1, sal_False );
+}
+//-----IAccessibility2 Implementation 2009
void DrawController::FirePropertyChange (
sal_Int32 nHandle,
@@ -750,6 +786,19 @@ void DrawController::FillPropertyTable (
PROPERTY_DRAWVIEWMODE,
::getCppuType((const ::com::sun::star::awt::Point*)0),
beans::PropertyAttribute::BOUND|beans::PropertyAttribute::READONLY|beans::PropertyAttribute::MAYBEVOID ));
+ //IAccessibility2 Implementation 2009-----
+ // add new property to update current page's acc information
+ rProperties.push_back(
+ beans::Property( OUString( RTL_CONSTASCII_USTRINGPARAM("UpdateAcc") ),
+ PROPERTY_UPDATEACC,
+ ::getCppuType((const sal_Int16*)0),
+ beans::PropertyAttribute::BOUND ));
+ rProperties.push_back(
+ beans::Property( OUString( RTL_CONSTASCII_USTRINGPARAM("PageChange") ),
+ PROPERTY_PAGE_CHANGE,
+ ::getCppuType((const sal_Int16*)0),
+ beans::PropertyAttribute::BOUND ));
+ //-----IAccessibility2 Implementation 2009
}
diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx
index 297684961d2f..bcea595a591e 100644
--- a/sd/source/ui/unoidl/SdUnoDrawView.cxx
+++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx
@@ -151,6 +151,9 @@ Reference<drawing::XLayer> SdUnoDrawView::getActiveLayer (void) throw ()
xCurrentLayer = pManager->GetLayer (pLayer);
}
while (false);
+//IAccessibility2 Implementation 2009-----
+ mrController.mpCurrentLayer = &(xCurrentLayer) ;
+//-----IAccessibility2 Implementation 2009
return xCurrentLayer;
}
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index d2790b87321e..06de7ac1f91a 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -553,7 +553,17 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem)
else
mnStartPageIndex = (sal_uInt16)-1;
}
+//IAccessibility2 Implementation 2009-----
+ if ( Application::IsAccessibilityEnabled() )
+ {
+ SvxSearchDialog* pSearchDlg =
+ ((SvxSearchDialog*)(SfxViewFrame::Current()->GetChildWindow(
+ SvxSearchDialogWrapper::GetChildWindowId())->GetWindow()));
+ pSearchDlg->SetDocWin( pViewShell->GetActiveWindow() );
+ pSearchDlg->SetSrchFlag();
}
+//-----IAccessibility2 Implementation 2009
+ }
else
mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False );
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index ecbbf4377073..2bcc1fe3fbd2 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -68,6 +68,9 @@
#include <svx/svdlegacy.hxx>
#include <svx/svditer.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <navigatr.hxx>
+//-----IAccessibility2 Implementation 2009
namespace sd {
#define PIPETTE_RANGE 0
@@ -211,6 +214,14 @@ bool DrawViewShell::KeyInput (const KeyEvent& rKEvt, ::sd::Window* pWin)
else
{
bRet = ViewShell::KeyInput(rKEvt, pWin);
+//IAccessibility2 Implementation 2009-----
+ //Solution: If object is marked , the corresponding entry is set true ,
+ //else the corresponding entry is set false .
+ if(KEY_TAB == rKEvt.GetKeyCode().GetCode())
+ {
+ FreshNavigatrTree();
+ }
+//-----IAccessibility2 Implementation 2009
}
}
@@ -256,7 +267,33 @@ void DrawViewShell::StartRulerDrag (
mbIsRulerDrag = true;
}
}
+//IAccessibility2 Implementation 2009-----
+//Solution: If object is marked , the corresponding entry is set true ,
+//else the corresponding entry is set false .
+void DrawViewShell::FreshNavigatrEntry()
+{
+ sal_uInt16 nId = SID_NAVIGATOR;
+ SfxChildWindow* pWindow = GetViewFrame()->GetChildWindow( nId );
+ if( pWindow )
+ {
+ SdNavigatorWin* pNavWin = (SdNavigatorWin*)( pWindow->GetContextWindow( SD_MOD() ) );
+ if( pNavWin )
+ pNavWin->FreshEntry();
+ }
+}
+void DrawViewShell::FreshNavigatrTree()
+{
+ sal_uInt16 nId = SID_NAVIGATOR;
+ SfxChildWindow* pWindow = GetViewFrame()->GetChildWindow( nId );
+ if( pWindow )
+ {
+ SdNavigatorWin* pNavWin = (SdNavigatorWin*)( pWindow->GetContextWindow( SD_MOD() ) );
+ if( pNavWin )
+ pNavWin->FreshTree( GetDoc() );
+ }
+}
+//-----IAccessibility2 Implementation 2009
/*************************************************************************
|*
|* MouseButtonDown event
@@ -283,6 +320,11 @@ void DrawViewShell::MouseButtonDown(const MouseEvent& rMEvt,
{
ViewShell::MouseButtonDown(rMEvt, pWin);
+//IAccessibility2 Implementation 2009-----
+ //Solution: If object is marked , the corresponding entry is set true ,
+ //else the corresponding entry is set false .
+ FreshNavigatrTree();
+//-----IAccessibility2 Implementation 2009
if ( mbPipette )
( (SvxBmpMask*) GetViewFrame()->GetChildWindow( SvxBmpMaskChildWindow::GetChildWindowId() )->GetWindow() )->PipetteClicked();
}
@@ -458,6 +500,11 @@ void DrawViewShell::MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin)
}
else
ViewShell::MouseButtonUp(rMEvt, pWin);
+//IAccessibility2 Implementation 2009-----
+ //Solution: If object is marked , the corresponding entry is set true ,
+ //else the corresponding entry is set false .
+ FreshNavigatrTree();
+//-----IAccessibility2 Implementation 2009
}
}
diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx
index b1d362d29c04..24794a217f43 100644
--- a/sd/source/ui/view/drviews5.cxx
+++ b/sd/source/ui/view/drviews5.cxx
@@ -705,6 +705,15 @@ void DrawViewShell::SetActiveTabLayerIndex (int nIndex)
// Tell the draw view and the tab control of the new active layer.
mpDrawView->SetActiveLayer (pBar->GetPageText (pBar->GetPageId ((sal_uInt16)nIndex)));
pBar->SetCurPageId(static_cast< sal_uInt16 >(pBar->GetPageId(nIndex)));
+ //IAccessibility2 Implementation 2009-----
+ SdUnoDrawView* pUnoDrawView = new SdUnoDrawView (
+ GetViewShellBase().GetDrawController(),
+ *this,
+ *GetView());
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XLayer> rLayer = pUnoDrawView->getActiveLayer();
+ GetViewShellBase().GetDrawController().fireChangeLayer( &rLayer );
+ delete pUnoDrawView;
+ //-----IAccessibility2 Implementation 2009
}
}
}
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index b3acc2823830..4d53a07c4cd6 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -232,6 +232,9 @@ OutlineViewShell::OutlineViewShell (
Construct(GetDocSh());
SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_OutlineText));
+//IAccessibility2 Implementation 2009-----
+ m_StrOldPageName.EmptyString();
+//-----IAccessibility2 Implementation 2009
}
/*************************************************************************
@@ -1467,6 +1470,14 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
aLayoutStr = pPage->GetLayoutName();
aLayoutStr.Erase( aLayoutStr.SearchAscii( SD_LT_SEPARATOR ) );
+ //IAccessibility2 Implementation 2009-----
+ //Now, CurrentPage property change is already sent for DrawView and OutlineView, so it is not necessary to send again here
+ if(m_StrOldPageName!=aPageStr)
+ {
+ GetViewShellBase().GetDrawController().fireSwitchCurrentPage(nPos);
+ m_StrOldPageName = aPageStr;
+ }
+ //-----IAccessibility2 Implementation 2009
}
rSet.Put( SfxStringItem( SID_STATUS_PAGE, aPageStr ) );
rSet.Put( SfxStringItem( SID_STATUS_LAYOUT, aLayoutStr ) );
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index 8728e96d1736..f12e3fd1cde1 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -45,6 +45,10 @@
#include "AccessibleDrawDocumentView.hxx"
#include "WindowUpdater.hxx"
+//IAccessibility2 Implementation 2009-----
+#include <vcl/svapp.hxx>
+//-----IAccessibility2 Implementation 2009
+
namespace sd {
#define SCROLL_LINE_FACT 0.05 // Faktor fuer Zeilenscrolling
@@ -1170,8 +1174,25 @@ void Window::DropScroll(const basegfx::B2DPoint& rMousePos)
::com::sun::star::accessibility::XAccessible>
Window::CreateAccessible (void)
{
+//IAccessibility2 Implementation 2009-----
+ // If current viewshell is PresentationViewShell, just return empty because the correct ShowWin will be created later.
+ if (mpViewShell && dynamic_cast< PresentationViewShell* >(mpViewShell))
+ {
+ return ::Window::CreateAccessible ();
+ }
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc = GetAccessible(sal_False);
+ if (xAcc.get())
+ {
+ return xAcc;
+ }
if (mpViewShell != NULL)
- return mpViewShell->CreateAccessibleDocumentView (this);
+ //return mpViewShell->CreateAccessibleDocumentView (this);
+ {
+ xAcc = mpViewShell->CreateAccessibleDocumentView (this);
+ SetAccessible(xAcc);
+ return xAcc;
+ }
+//-----IAccessibility2 Implementation 2009
else
{
OSL_TRACE ("::sd::Window::CreateAccessible: no view shell");
@@ -1179,6 +1200,22 @@ void Window::DropScroll(const basegfx::B2DPoint& rMousePos)
}
}
+//IAccessibility2 Implementation 2009-----
+// MT: Removed Windows::SwitchView() introduced with IA2 CWS.
+// There are other notifications for this when the active view has chnaged, so please update the code to use that event mechanism
+void Window::SwitchView()
+{
+ if (!Application::IsAccessibilityEnabled())
+ {
+ return ;
+ }
+ if (mpViewShell)
+ {
+ mpViewShell->SwitchViewFireFocus(GetAccessible(sal_False));
+ }
+}
+//-----IAccessibility2 Implementation 2009
+
XubString Window::GetSurroundingText() const
{
if ( mpViewShell->GetShellType() == ViewShell::ST_OUTLINE )
diff --git a/sd/source/ui/view/tabcontr.cxx b/sd/source/ui/view/tabcontr.cxx
index d54db2812066..d63b71b77df7 100644
--- a/sd/source/ui/view/tabcontr.cxx
+++ b/sd/source/ui/view/tabcontr.cxx
@@ -92,6 +92,7 @@ TabControl::TabControl(DrawViewShell* pViewSh, Window* pParent) :
TabBar( pParent, WinBits( WB_BORDER | WB_3DLOOK | WB_SCROLL | WB_SIZEABLE | WB_DRAG) ),
DragSourceHelper( this ),
DropTargetHelper( this ),
+ RrePageID(1),
pDrViewSh(pViewSh),
bInternalMove(false)
{
@@ -136,6 +137,12 @@ void TabControl::MouseButtonDown(const MouseEvent& rMEvt)
Point aPos = PixelToLogic( rMEvt.GetPosPixel() );
sal_uInt16 aPageId = GetPageId(aPos);
+//IAccessibility2 Implementation 2009-----
+ //Solution: initialize
+ if(RrePageID!=aPageId)
+ pDrViewSh->FreshNavigatrEntry();
+ RrePageID=aPageId;
+//-----IAccessibility2 Implementation 2009
if (aPageId == 0)
{
SfxDispatcher* pDispatcher = pDrViewSh->GetViewFrame()->GetDispatcher();
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 7010a93f66fb..0cbd0aaeb31d 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -95,7 +95,9 @@
#include <editeng/eeitem.hxx>
#include <svl/poolitem.hxx>
#include <glob.hrc>
-
+//IAccessibility2 Implementation 2009-----
+#include "AccessibleDocumentViewBase.hxx"
+//-----IAccessibility2 Implementation 2009
#ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED
#define SO2_DECL_SVINPLACEOBJECT_DEFINED
SO2_DECL_REF(SvInPlaceObject)
@@ -470,6 +472,9 @@ bool ViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin)
bReturn = GetViewShell()->KeyInput(rKEvt);
}
+//IAccessibility2 Implementation 2009-----
+ const sal_uInt32 OriCount(GetView()->getSelectedSdrObjectCount());
+//-----IAccessibility2 Implementation 2009
if(!bReturn)
{
rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( GetViewShellBase() ) );
@@ -499,6 +504,14 @@ bool ViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin)
}
}
}
+//IAccessibility2 Implementation 2009-----
+ const sal_uInt32 EndCount(GetView()->getSelectedSdrObjectCount());
+ // Here, oriCount or endCount must have one value=0, another value > 0, then to switch focus between Document and shape objects
+ if(bReturn && (OriCount + EndCount > 0) && (OriCount * EndCount == 0))
+ {
+ SwitchActiveViewFireFocus();
+ }
+//-----IAccessibility2 Implementation 2009
if(!bReturn && GetActiveWindow())
{
@@ -1604,7 +1617,36 @@ bool ViewShell::RelocateToParentWindow (::Window* pParentWindow)
return true;
}
+//IAccessibility2 Implementation 2009-----
+void ViewShell::SwitchViewFireFocus(::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc )
+{
+ if (xAcc.get())
+ {
+ ::accessibility::AccessibleDocumentViewBase* pBase = static_cast< ::accessibility::AccessibleDocumentViewBase* >(xAcc.get());
+ if (pBase)
+ {
+ pBase->SwitchViewActivated();
+ }
+ }
+}
+void ViewShell::SwitchActiveViewFireFocus()
+{
+ if (mpContentWindow)
+ {
+ SwitchViewFireFocus(mpContentWindow->GetAccessible(sal_False));
+ }
+}
+// move these two methods from DrawViewShell.
+void ViewShell::fireSwitchCurrentPage(sal_Int32 pageIndex)
+{
+ GetViewShellBase().GetDrawController().fireSwitchCurrentPage(pageIndex);
+}
+void ViewShell::NotifyAccUpdate( )
+{
+ GetViewShellBase().GetDrawController().NotifyAccUpdate();
+}
+//-----IAccessibility2 Implementation 2009
} // end of namespace sd
diff --git a/set_soenv.in b/set_soenv.in
index 76363e42c561..1e797ad3b32e 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -94,8 +94,7 @@ my ( $BIG_SVX, $COM, $ARCH, $CPU, $CPUNAME, $CVER, $GLIBC, $GUI, $GUIBASE,
my ( $USR, $ETC, $BIN, $LIB, $LIB64, $INC, $INCLUDE, $DEV, $OPT, $LOCAL, $SOLENV, $SOLVER, $CONFIG,
$USR_BIN, $USR_LIB, $USR_LOCAL, $USR_CCS, $JAVA_BIN, $JAVA_LIB, $JAVA_INCLUDE,
$SOLARENVINC, $USR_DT, $USR_OPENWIN, $XLIB, $XINC,
- $CYGWIN_PATH, $language, $dict, $ASM_PATH, $NSIS_PATH, $ps_STLPORT_LIB, $L_STLPORT_LIB,
- $STLPORT_stlport, $STLPORT_inc_stlport, $PERL_PATH );
+ $CYGWIN_PATH, $language, $dict, $ASM_PATH, $NSIS_PATH, $PERL_PATH );
# Environment variables.
my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAVA_HOME, $JDK, $JAVAFLAGS, $OOO_SHELL,
@@ -109,7 +108,7 @@ my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAVA_HOME, $JDK, $JAVAFLAGS, $OOO_SHELL,
$COMP_ENV, $ILIB, $JAVAHOME, $PSDK_HOME, $DIRECTXSDK_LIB, $USE_NEW_SDK, $FRAME_HOME,
$USE_DIRECTX5, $ATL_LIB, $ATL_LIB_X64, $HAVE_ATLTHUNK, $ATL_INCLUDE, $MFC_LIB, $MFC_INCLUDE, $TMPDIR,
$COMMON_BUILD_TOOLS, $WIN_GREP, $WIN_FIND, $WIN_LS,
- $WIN_GNUCOPY, $WIN_TOUCH, $STLPORT4, $MOZILLABUILD,
+ $WIN_GNUCOPY, $WIN_TOUCH, $MOZILLABUILD,
$PROEXT, $TARFILE_LOCATION,
$ENABLE_HUNSPELL, $ENABLE_HYPHEN,
$SYSTEM_PYTHON, $EPM_FLAGS);
@@ -145,10 +144,8 @@ $I = " -I"; # include search path
$L = " -L"; # library search path
$D = " -D"; # define search path
$empty = ""; # used as argument
-$no_stl = "NO_STLPORT4"; # possible argument
$warnfile = "warn"; # logfile configure warnings.
$Warning = ""; # container for warning messages
-$STLPORT4 = '@STLPORT4@'; # Location of STLport4
$SYSTEM_PYTHON = '@SYSTEM_PYTHON@';
$JDK = '@JDK@';
$JAVAFLAGS = '@JAVAFLAGS@';
@@ -857,11 +854,6 @@ else
$OOO_SHELL = '@SHELLPATH@'."\/bash";
}
-if ( '@STLPORT4@' eq $no_stl )
-{
- $STLPORT4 = "$no_stl";
-}
-
# ml.exe assembler path for Windows users.
if ($platform =~ m/cygwin/)
{ $ASM_PATH = PathFormat('@ASM_HOME@');
@@ -909,19 +901,6 @@ if ($GUI eq "OS2")
$outfile_bat =~ s/set$/cmd/i;
}
-if ($STLPORT4 ne $no_stl) {
- $ps_STLPORT_LIB = $ps.'$STLPORT4'.$LIB64;
- $L_STLPORT_LIB = $L.'$STLPORT4'.$LIB64;
- $STLPORT_stlport = $I.'$STLPORT4'.$ds.'stlport';
- $STLPORT_inc_stlport = $I.'$STLPORT4'.$ds.'include'.$ds.'stlport';
-} else {
- $ps_STLPORT_LIB = "";
- $L_STLPORT_LIB = "";
- $STLPORT_stlport = $I.$SRC_ROOT.$SOLVER.$ds.$UPD.$ds.$INPATH.$INC.$ds."stl";
- $STLPORT_inc_stlport = "";
-}
-
-
# Windows NT only variables
if ($platform =~ m/cygwin/)
{
@@ -1061,10 +1040,6 @@ if ($platform =~ m/cygwin|os2/)
$ILIB = $cur_dir;
- if ($STLPORT4 ne $no_stl) {
- $ILIB .= $wps.$STLPORT4.$LIB64;
- }
-
# Mingw is different
if ( $COM eq "MSC" )
{ $ILIB .= $wps.$SOLARVER.$ds.$INPATH.$LIB.
@@ -1219,7 +1194,6 @@ elsif ($platform =~ m/cygwin/)
if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
$PATH .= $ps.$tmppath;
}
- $PATH .= $ps_STLPORT_LIB;
# nsis path for Windows users.
$NSIS_PATH = PathFormat('@NSIS_PATH@');
$tmppath = CygFormat($NSIS_PATH);
@@ -1334,7 +1308,6 @@ if ($platform =~ m/solaris/)
$L.$JRELIBDIR.
$L.$JRETOOLKITDIR.
$L.$JRETHREADDIR.
- $L_STLPORT_LIB.
$L.$XLIB;
}
elsif ($platform =~ m/linux|netbasd|osf1|aix|freebsd/)
@@ -1346,18 +1319,15 @@ elsif ($platform =~ m/linux|netbasd|osf1|aix|freebsd/)
$L.$JRELIBDIR.
$L.$JRETOOLKITDIR.
$L.$JRETHREADDIR.
- $L_STLPORT_LIB.
$L.$XLIB;
}
elsif ($platform =~ m/cygwin|os2/)
{ $SOLARLIB = $L.'$SOLARVER'.$ds.'$INPATH'.$LIB.
$L.$par_dir.$LIB.
- $L_STLPORT_LIB.
$L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB;
}
elsif ($platform =~ m/darwin/)
{ $SOLARLIB = $L.'$SOLARVER'.$ds.'$INPATH'.$LIB.
- $L_STLPORT_LIB.
$L.$USR_LIB;
# [ed] 6/15/02 Add in X11 libraries onto the library path
if ($GUIBASE eq "unx") {
@@ -1378,11 +1348,9 @@ $SOLARINC = $I.$cur_dir.
if ($platform =~ m/solaris|linux|osf1|freebsd|netbsd/)
{
-$SOLARINC .= $STLPORT_stlport;
if ($platform =~ m/linux|freebsd|netbsd/)
{
# This simply adds an include path, so even cases that break the FHS work
-$SOLARINC .= $STLPORT_inc_stlport;
}
if ($platform =~ m/solaris/ && ! $CC =~ "gcc")
{
@@ -1396,7 +1364,6 @@ if ($platform =~ m/solaris/)
if ($platform =~ m/linux/)
{
# This simply adds an include path, so even cases that break the FHS work
- $SOLARINC .= $STLPORT_inc_stlport;
}
@@ -1436,8 +1403,7 @@ if ($platform =~ m/linux/)
}
}
elsif ($platform =~ m/cygwin/)
-{ $SOLARINC .= $STLPORT_stlport.
- $I.'$JAVA_HOME'.$ds."include".$ds."win32".
+{ $SOLARINC .= $I.'$JAVA_HOME'.$ds."include".$ds."win32".
$I.'$JAVA_HOME'.$ds."include";
# Mingw is different
if ( $COM eq "MSC" )
@@ -1477,14 +1443,8 @@ elsif ($platform =~ m/cygwin/)
}
}
elsif ($platform =~ m/darwin/)
-{ $SOLARINC .= $STLPORT_stlport.
- $I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Versions".$ds."Current".$ds."Headers".
- $I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Headers";
- # [ed] 6/15/02 Add in X11 headers as appropriate for the build
- if ($GUIBASE eq "unx") {
- $SOLARINC .= $I.$XINC.
- $I.$XINC.$ds."freetype2";
- }
+{
+ $SOLARINC .= " " . $I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Headers";
}
else
{ AddWarning( "set_soenv", "$platform not configured for system dependant include dir" );
@@ -1550,8 +1510,6 @@ ToFile( "ANT_HOME", PathFormat("@ANT_HOME@"), "e" );
ToFile( "ANT_LIB", PathFormat("@ANT_LIB@"), "e" );
ToFile( "ANT", PathFormat("@ANT@"), "e" );
ToFile( "JDKLIB", $JAVA_LIB, "e" );
-ToFile( "STLPORT4", $STLPORT4, "e" );
-ToFile( "STLPORT_VER", "@STLPORT_VER@", "e" );
ToFile( "ASM_PATH", $ASM_PATH, "e" );
ToFile( "BUILD_SOSL", $BUILD_SOSL, "e" );
ToFile( "FRAMEWORKSHOME", $FRAMEWORKSHOME, "e" );
@@ -1716,7 +1674,7 @@ if ( $platform =~ m/darwin/ )
{
# MAXOSX_DEPLOYMENT_TARGET : The minimum version required to run the build,
# build can assume functions/libraries of that version to be available
-# unless you want to do runtime checks for 10.5 api, you also want to use the 10.4 sdk
+# unless you want to do runtime checks for 10.5 api, you also want to use the 10.7 sdk
# (safer/easier than dealing with the MAC_OS_X_VERSION_MAX_ALLOWED macro)
# http://developer.apple.com/technotes/tn2002/tn2064.html
ToFile( "MACOSX_DEPLOYMENT_TARGET", "10.4", "e" );
diff --git a/setup_native/source/packinfo/finals_instsetoo.txt b/setup_native/source/packinfo/finals_instsetoo.txt
deleted file mode 100644
index d37a921cf33c..000000000000
--- a/setup_native/source/packinfo/finals_instsetoo.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# *************************************************************
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-# *************************************************************
-
-# Comment line
-# Syntax:
-# Column 1: Product
-# Column 2: pro or nonpro
-# Column 3: languages, comma separated list
-# Column 4: path to msi database in installation set
-# Separator between columns is one or more than one tabulator
-
-# Examples:
-# OpenOffice pro en-US \\<server>\<path>\msi\OOO300_m6_native_packed-1_en-US.9352\openofficeorg30.msi
-# OpenOffice pro en-US,de,es \\<server>\<path>\msi\OOO300_m6_native_packed-1_en-US_de_es.9352\openofficeorg30.msi
-# OpenOffice pro de \\<server>\<path>\msi\OOO300_m6_native_packed-1_de.9352\openofficeorg30.msi
-# OpenOfficeLanguagePack pro es \\<server>\<path>\msi\OOO300_m6_native_packed-1_es.9352\openofficeorg30.msi
-# URE pro en-US \\<server>\<path>\msi\OOO300_m6_native_packed-1_en-US.9352\ure14.msi
diff --git a/setup_native/source/win32/customactions/languagepacks/makefile.mk b/setup_native/source/win32/customactions/languagepacks/makefile.mk
index b9f45d8c7832..ce5fcece5928 100644
--- a/setup_native/source/win32/customactions/languagepacks/makefile.mk
+++ b/setup_native/source/win32/customactions/languagepacks/makefile.mk
@@ -35,10 +35,6 @@ USE_DEFFILE=TRUE
.INCLUDE : settings.mk
-.IF "$(USE_SYSTEM_STL)" != "YES"
-CFLAGS+=-D_STLP_USE_STATIC_LIB
-.ENDIF
-
#Disable precompiled header
CDEFS+=-Dnot_used_define_to_disable_pch
@@ -61,10 +57,6 @@ STDSHL+= \
$(MSILIB) \
$(SHELL32LIB)
-.IF "$(USE_SYSTEM_STL)" != "YES"
-STDSHL+=$(LIBSTLPORTST)
-.ENDIF
-
SHL1OBJS = $(SLOFILES) \
$(SLO)$/seterror.obj
diff --git a/setup_native/source/win32/customactions/patch/makefile.mk b/setup_native/source/win32/customactions/patch/makefile.mk
index 9df592856bf6..3a10402ad530 100644
--- a/setup_native/source/win32/customactions/patch/makefile.mk
+++ b/setup_native/source/win32/customactions/patch/makefile.mk
@@ -34,10 +34,6 @@ USE_DEFFILE=TRUE
.INCLUDE : settings.mk
-.IF "$(USE_SYSTEM_STL)" != "YES"
-CFLAGS+=-D_STLP_USE_STATIC_LIB
-.ENDIF
-
#Disable precompiled header
CDEFS+=-Dnot_used_define_to_disable_pch
@@ -59,10 +55,6 @@ STDSHL += \
$(MSILIB)\
$(SHELL32LIB)
-.IF "$(USE_SYSTEM_STL)" != "YES"
-STDSHL += $(LIBSTLPORTST)
-.ENDIF
-
.IF "$(COM)"=="GCC"
STDSHL+= \
$(KERNEL32LIB)\
diff --git a/setup_native/source/win32/customactions/quickstarter/makefile.mk b/setup_native/source/win32/customactions/quickstarter/makefile.mk
index 0175b330fa48..134e006a4d2d 100644
--- a/setup_native/source/win32/customactions/quickstarter/makefile.mk
+++ b/setup_native/source/win32/customactions/quickstarter/makefile.mk
@@ -37,10 +37,6 @@ USE_DEFFILE=TRUE
.INCLUDE : settings.mk
-.IF "$(USE_SYSTEM_STL)" != "YES"
-CFLAGS+=-D_STLP_USE_STATIC_LIB
-.ENDIF
-
UWINAPILIB=
# --- Files --------------------------------------------------------
@@ -56,10 +52,6 @@ STDSHL += \
$(SHELL32LIB)\
$(MSILIB)
-.IF "$(USE_SYSTEM_STL)" != "YES"
-STDSHL += $(LIBSTLPORTST)
-.ENDIF
-
.IF "$(COM)"=="GCC"
STDSHL+= \
$(KERNEL32LIB)\
diff --git a/setup_native/source/win32/customactions/rebase/makefile.mk b/setup_native/source/win32/customactions/rebase/makefile.mk
index 5e3cc1cf12fc..4b871f8e64d6 100644
--- a/setup_native/source/win32/customactions/rebase/makefile.mk
+++ b/setup_native/source/win32/customactions/rebase/makefile.mk
@@ -36,10 +36,6 @@ MINGW_NODLL=YES
.INCLUDE : settings.mk
-.IF "$(USE_SYSTEM_STL)" != "YES"
-CFLAGS+=-D_STLP_USE_STATIC_LIB
-.ENDIF
-
UWINAPILIB=
# --- Files --------------------------------------------------------
@@ -55,10 +51,6 @@ STDSHL += \
$(SHELL32LIB)\
$(MSILIB)
-.IF "$(USE_SYSTEM_STL)" != "YES"
-STDSHL += $(LIBSTLPORTST)
-.ENDIF
-
.IF "$(COM)"=="GCC"
STDSHL+= \
$(KERNEL32LIB)\
diff --git a/setup_native/source/win32/customactions/reg4allmsdoc/makefile.mk b/setup_native/source/win32/customactions/reg4allmsdoc/makefile.mk
index c00b8aabf432..08fd4a515377 100644
--- a/setup_native/source/win32/customactions/reg4allmsdoc/makefile.mk
+++ b/setup_native/source/win32/customactions/reg4allmsdoc/makefile.mk
@@ -35,9 +35,6 @@ USE_DEFFILE=TRUE
.INCLUDE : settings.mk
CFLAGS+=-DUNICODE -D_UNICODE
-.IF "$(USE_SYSTEM_STL)" != "YES"
-CFLAGS+=-D_STLP_USE_STATIC_LIB
-.ENDIF
# --- Files --------------------------------------------------------
@@ -58,10 +55,6 @@ SHL1STDLIBS= $(KERNEL32LIB)\
$(MSILIB)\
$(SHLWAPILIB)
-.IF "$(USE_SYSTEM_STL)" != "YES"
-SHL1STDLIBS+=$(LIBSTLPORTST)
-.ENDIF
-
SHL1LIBS = $(SLB)$/$(TARGET).lib
SHL1TARGET = $(TARGET)
diff --git a/setup_native/source/win32/customactions/reg4msdoc/makefile.mk b/setup_native/source/win32/customactions/reg4msdoc/makefile.mk
index 0b2cac58ccd9..0c8a18b34e16 100644
--- a/setup_native/source/win32/customactions/reg4msdoc/makefile.mk
+++ b/setup_native/source/win32/customactions/reg4msdoc/makefile.mk
@@ -36,9 +36,6 @@ MINGW_NODLL=YES
.INCLUDE : settings.mk
CFLAGS+=-DUNICODE -D_UNICODE
-.IF "$(USE_SYSTEM_STL)" != "YES"
-CFLAGS+=-D_STLP_USE_STATIC_LIB
-.ENDIF
# --- Files --------------------------------------------------------
@@ -67,10 +64,6 @@ SHL1STDLIBS= $(KERNEL32LIB)\
$(MSILIB)\
$(SHLWAPILIB)
-.IF "$(USE_SYSTEM_STL)" != "YES"
-SHL1STDLIBS+=$(LIBSTLPORTST)
-.ENDIF
-
SHL1LIBS = $(SLB)$/$(TARGET).lib
SHL1TARGET = $(TARGET)
diff --git a/setup_native/source/win32/customactions/reg64/makefile.mk b/setup_native/source/win32/customactions/reg64/makefile.mk
index 071c0f85a36e..93182d51e0ad 100644
--- a/setup_native/source/win32/customactions/reg64/makefile.mk
+++ b/setup_native/source/win32/customactions/reg64/makefile.mk
@@ -35,10 +35,6 @@ EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
.INCLUDE : settings.mk
-.IF "$(USE_SYSTEM_STL)" != "YES"
-CFLAGS+=-D_STLP_USE_STATIC_LIB
-.ENDIF
-
#Disable precompiled header
CDEFS+=-Dnot_used_define_to_disable_pch
diff --git a/setup_native/source/win32/customactions/regactivex/makefile.mk b/setup_native/source/win32/customactions/regactivex/makefile.mk
index 00f6ed431bb4..90b872ad94b1 100644
--- a/setup_native/source/win32/customactions/regactivex/makefile.mk
+++ b/setup_native/source/win32/customactions/regactivex/makefile.mk
@@ -38,11 +38,6 @@ USE_DEFFILE=TRUE
.IF "$(GUI)"=="WNT"
-.IF "$(USE_SYSTEM_STL)" != "YES" && "$(PRODUCT)" = ""
-CDEFS+=-D_DEBUG
-.ENDIF
-
-
UWINAPILIB=
SLOFILES = $(SLO)$/regactivex.obj
diff --git a/setup_native/source/win32/customactions/relnotes/makefile.mk b/setup_native/source/win32/customactions/relnotes/makefile.mk
index 9484cc6d7221..0f77f4c295cf 100644
--- a/setup_native/source/win32/customactions/relnotes/makefile.mk
+++ b/setup_native/source/win32/customactions/relnotes/makefile.mk
@@ -36,9 +36,6 @@ USE_DEFFILE=TRUE
.INCLUDE : settings.mk
CDEFS+=-DUNICODE
-.IF "$(USE_SYSTEM_STL)" != "YES"
-CDEFS+=-D_STLP_USE_STATIC_LIB
-.ENDIF
UWINAPILIB=
@@ -57,10 +54,6 @@ STDSHL+= \
$(SHELL32LIB)\
$(MSILIB)
-.IF "$(USE_SYSTEM_STL)" != "YES"
-STDSHL+=$(LIBSTLPORTST)
-.ENDIF
-
SHL1LIBS = $(SLB)$/$(TARGET).lib
SHL1TARGET = $(TARGET)
diff --git a/setup_native/source/win32/customactions/shellextensions/makefile.mk b/setup_native/source/win32/customactions/shellextensions/makefile.mk
index a6f702cf31bc..ddac3dd8f0bf 100644
--- a/setup_native/source/win32/customactions/shellextensions/makefile.mk
+++ b/setup_native/source/win32/customactions/shellextensions/makefile.mk
@@ -34,10 +34,6 @@ USE_DEFFILE=TRUE
.INCLUDE : settings.mk
-.IF "$(USE_SYSTEM_STL)" != "YES"
-CFLAGS+=-D_STLP_USE_STATIC_LIB
-.ENDIF
-
#Disable precompiled header
CDEFS+=-Dnot_used_define_to_disable_pch
@@ -75,10 +71,6 @@ STDSHL += \
$(MSILIB)\
$(SHELL32LIB)
-.IF "$(USE_SYSTEM_STL)" != "YES"
-STDSHL += $(LIBSTLPORTST)
-.ENDIF
-
.IF "$(COM)"=="GCC"
STDSHL+= \
$(KERNEL32LIB)\
diff --git a/setup_native/source/win32/customactions/tools/makefile.mk b/setup_native/source/win32/customactions/tools/makefile.mk
index ff8ba6a50f77..a9a40f01565e 100644
--- a/setup_native/source/win32/customactions/tools/makefile.mk
+++ b/setup_native/source/win32/customactions/tools/makefile.mk
@@ -35,10 +35,6 @@ USE_DEFFILE=TRUE
.INCLUDE : settings.mk
-.IF "$(USE_SYSTEM_STL)" != "YES"
-CFLAGS+=-D_STLP_USE_STATIC_LIB
-.ENDIF
-
# --- Files --------------------------------------------------------
.IF "$(GUI)"=="WNT"
@@ -58,10 +54,6 @@ STDSHL+= \
$(ADVAPI32LIB)\
$(MSILIB)
-.IF "$(USE_SYSTEM_STL)" != "YES"
-STDSHL+=$(LIBSTLPORTST)
-.ENDIF
-
#SHL1LIBS = $(SLB)$/$(TARGET).lib
SHL1TARGET = $(TARGET)
diff --git a/sfx2/inc/sfx2/dinfdlg.hxx b/sfx2/inc/sfx2/dinfdlg.hxx
index a47ab9200059..7e199a823aa6 100644
--- a/sfx2/inc/sfx2/dinfdlg.hxx
+++ b/sfx2/inc/sfx2/dinfdlg.hxx
@@ -548,7 +548,7 @@ class SfxCustomPropertiesPage : public SfxTabPage
private:
CustomPropertiesControl m_aPropertiesCtrl;
PushButton m_aAddBtn;
- FixedText m_aPropertiesFT; // Sym2_5121----, Moved by Steve Yin
+ FixedText m_aPropertiesFT;
DECL_LINK( AddHdl, PushButton* );
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index 6422e3c600f0..3e9cd03cabb6 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -87,7 +87,7 @@ SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& rInPool
aOKBtn.SetClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
aColBox.SetModifyHdl(LINK(this, SfxNewStyleDlg, ModifyHdl));
aColBox.SetDoubleClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
- // aColBox.SetAccessibleName(SfxResId(FL_COL));
+ aColBox.SetAccessibleName(SfxResId(FL_COL));
SfxStyleSheetBase *pStyle = rPool.First();
while ( pStyle )
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 87bb670c0362..af4fee6f6617 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -745,6 +745,10 @@ void SfxTabDialog::Start( sal_Bool bShow )
if ( bShow )
Show();
+
+// IAccessibility2 implementation 2009
+ if ( IsVisible() && ( !HasChildPathFocus() || HasFocus() ) )
+ GrabFocusToFirstControl();
}
// -----------------------------------------------------------------------
diff --git a/sfx2/source/dialog/templdlg.hrc b/sfx2/source/dialog/templdlg.hrc
index 6d048030b231..3d2c85ed1e27 100644
--- a/sfx2/source/dialog/templdlg.hrc
+++ b/sfx2/source/dialog/templdlg.hrc
@@ -44,3 +44,8 @@
#define BT_FLIST 8
#define BT_VLIST 9
#define BT_TOOL 10
+
+//IAccessibility2 Implementation 2009-----
+#define STR_STYLE_ELEMTLIST 18
+//-----IAccessibility2 Implementation 2009
+
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
index 2bd2be583d5f..85e713ff1cd2 100644
--- a/sfx2/source/menu/mnuitem.cxx
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -291,6 +291,10 @@ void SfxMenuControl::StateChanged
DBG_ASSERT( GetId() < SID_OBJECTMENU0 || GetId() > SID_OBJECTMENU_LAST,
"SfxBoolItem not allowed for SID_OBJECTMENUx" );
bCheck = ((const SfxBoolItem*)pState)->GetValue();
+ // IAccessibility2 implementation 2009. ------
+ Menu* pMenu = pOwnMenu->GetSVMenu();
+ pMenu->SetItemBits( GetId() , pMenu->GetItemBits( GetId() ) | MIB_CHECKABLE);
+ // ------ IAccessibility2 implementation 2009.
}
else if ( dynamic_cast< const SfxEnumItemInterface* >(pState) &&
((SfxEnumItemInterface *)pState)->HasBoolValue() )
@@ -299,6 +303,10 @@ void SfxMenuControl::StateChanged
DBG_ASSERT( GetId() < SID_OBJECTMENU0 || GetId() > SID_OBJECTMENU_LAST,
"SfxEnumItem not allowed for SID_OBJECTMENUx" );
bCheck = ((SfxEnumItemInterface *)pState)->GetBoolValue();
+ // IAccessibility2 implementation 2009. ------
+ Menu* pMenu = pOwnMenu->GetSVMenu();
+ pMenu->SetItemBits( GetId() , pMenu->GetItemBits( GetId() ) | MIB_CHECKABLE);
+ // ------ IAccessibility2 implementation 2009.
}
else if ( ( b_ShowStrings || bIsObjMenu ) && dynamic_cast< const SfxStringItem* >(pState) )
{
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index f861e9c0a378..8614ad640faf 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -676,7 +676,13 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
if( pSalvageItem )
{
aURL = pSalvageItem->GetValue();
- pNewSet->ClearItem( SID_DOC_SALVAGE );
+ // IAccessibility2 implementation 2009. ------
+ if (pNewSet)
+ {
+ pNewSet->ClearItem( SID_ORIGURL );
+ pNewSet->ClearItem( SID_DOC_SALVAGE );
+ }
+ // ------ IAccessibility2 implementation 2009.
}
// TODO/LATER: Temporary solution, the SfxMedium must know the original URL as aLogicName
@@ -3373,13 +3379,17 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
sal_Bool bShow = sal_False;
sal_Bool bHasChild = HasChildWindow(nSID);
bShow = pShowItem ? pShowItem->GetValue() : !bHasChild;
+ // IAccessibility2 implementation 2009. ------
+ GetDispatcher()->Update_Impl( sal_True );
// ausf"uhren
if ( !pShowItem || bShow != bHasChild )
ToggleChildWindow( nSID );
GetBindings().Invalidate( nSID );
- GetDispatcher()->Update_Impl( sal_True );
+ // Move to the before show()
+ //GetDispatcher()->Update_Impl( sal_True );
+ // ------ IAccessibility2 implementation 2009.
// ggf. recorden
if ( nSID == SID_HYPERLINK_DIALOG || nSID == SID_SEARCH_DLG )
diff --git a/slideshow/source/engine/animationfactory.cxx b/slideshow/source/engine/animationfactory.cxx
index 8157119c00a1..b948325c2e4f 100644
--- a/slideshow/source/engine/animationfactory.cxx
+++ b/slideshow/source/engine/animationfactory.cxx
@@ -611,8 +611,8 @@ namespace slideshow
pGetValue,
pSetValue,
// no modification necessary, use identity functor here
- ::std::identity< typename AnimationBase::ValueType >(),
- ::std::identity< typename AnimationBase::ValueType >() ) );
+ std::identity< typename AnimationBase::ValueType >(),
+ std::identity< typename AnimationBase::ValueType >()));
}
class Scaler
diff --git a/soldep/source/soldep.cxx b/soldep/source/soldep.cxx
index e4bd782cc936..7489b70ecee0 100644
--- a/soldep/source/soldep.cxx
+++ b/soldep/source/soldep.cxx
@@ -981,7 +981,7 @@ sal_Bool SolDep::MarkObjects( ObjectWin* pObjectWin )
void SolDep::Resize()
{
-//funzt! mu aber von der applikation aufgerufen werden.
+//funzt! mu?aber von der applikation aufgerufen werden.
Point aOutPos = Point( 0, 0 );
Size aOutSize = mpProcessWin->GetOutputSizePixel();
// calculate output size
@@ -993,7 +993,7 @@ void SolDep::Resize()
Point aGraphWinPos = Point(0,0);
Size aGraphWinSize = Size(0,0);
-//wei nicht wie: nMenuHeight = aMenuBar.GetWindow()->GetSizePixel().Height(); //Hhe des Menues
+//wei?nicht wie: nMenuHeight = aMenuBar.GetWindow()->GetSizePixel().Height(); //Hhe des Menues
//aInRect = pTBManager->Resize( Rectangle( aOutPos, aOutSize );
// Set Docking-Rectangle for ToolBar
@@ -1716,7 +1716,7 @@ sal_uInt16 SolDep::OptimizePos(SolIdMapper* pIdMapper, ObjectList* pObjLst, sal_
sal_uIntPtr nNewXSize = ( DEPPER_MAX_WIDTH + 1 ) * ( OBJWIN_X_SPACING + GetDefSize().Width() );
- // sal_uIntPtr aObjID = GetStart(pIdMapper, pObjLst) //hier mu man switchen GetStart/GetPrjStart oder so
+ // sal_uIntPtr aObjID = GetStart(pIdMapper, pObjLst) //hier mu?man switchen GetStart/GetPrjStart oder so
ObjectWin* pObjWin = ObjIdToPtr( pObjLst, aObjID);
@@ -1765,7 +1765,7 @@ sal_uInt16 SolDep::OptimizePos(SolIdMapper* pIdMapper, ObjectList* pObjLst, sal_
aWorkList.Clear();
GetDepWin()->EnablePaint( sal_True );
GetDepWin()->Invalidate();
-//LevelListen loeschen H? Welche Levellisten?
+//LevelListen loeschen H? Welche Levellisten?
//Update all Connectors
// --> To be done: Don't call twice Object1-Connector-Object2
diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl
index 60f700688ed9..463f2d4f9f63 100644
--- a/solenv/bin/make_installer.pl
+++ b/solenv/bin/make_installer.pl
@@ -74,9 +74,7 @@ use installer::windows::idtglobal;
use installer::windows::inifile;
use installer::windows::java;
use installer::windows::media;
-use installer::windows::mergemodule;
use installer::windows::msiglobal;
-use installer::windows::msp;
use installer::windows::patch;
use installer::windows::property;
use installer::windows::removefile;
@@ -84,12 +82,63 @@ use installer::windows::registry;
use installer::windows::selfreg;
use installer::windows::shortcut;
use installer::windows::strip;
-use installer::windows::update;
use installer::windows::upgrade;
use installer::worker;
use installer::xpdinstaller;
use installer::ziplist;
+use strict;
+
+sub GetSetupScriptLines ($$$)
+{
+ my ($allsettingsarrayref, $allvariableshashref, $includepatharrayref) = @_;
+
+ if ($installer::globals::setupscript_defined_in_productlist)
+ {
+ installer::setupscript::set_setupscript_name($allsettingsarrayref, $includepatharrayref);
+ }
+
+ $installer::logger::Info->print( "... analyzing script: $installer::globals::setupscriptname ... \n" );
+ installer::logger::globallog("setup script file: $installer::globals::setupscriptname");
+ $installer::logger::Info->print( "... analyzing script: $installer::globals::setupscriptname ... \n" );
+
+ # Reading the setup script file
+ my $setupscriptref = installer::files::read_file($installer::globals::setupscriptname);
+
+ # Resolving variables defined in the zip list file into setup
+ # script. All the variables are defined in $allvariablesarrayref
+ installer::scpzipfiles::replace_all_ziplistvariables_in_file($setupscriptref, $allvariableshashref);
+
+ # Resolving %variables defined in the installation object
+ my $allscriptvariablesref = installer::setupscript::get_all_scriptvariables_from_installation_object(
+ $setupscriptref,
+ $installer::globals::setupscriptname);
+ installer::setupscript::add_lowercase_productname_setupscriptvariable($allscriptvariablesref);
+ installer::setupscript::resolve_lowercase_productname_setupscriptvariable($allscriptvariablesref);
+
+ $setupscriptref = installer::setupscript::replace_all_setupscriptvariables_in_script(
+ $setupscriptref,
+ $allscriptvariablesref);
+
+ # Adding all variables defined in the installation object into the
+ # hash of all variables. This is needed if variables are defined
+ # in the installation object, but not in the zip list file. If
+ # there is a definition in the zip list file and in the
+ # installation object, the installation object is more important
+ installer::setupscript::add_installationobject_to_variables($allvariableshashref, $allscriptvariablesref);
+
+ # Adding also all variables, that must be included into the $allvariableshashref.
+ installer::setupscript::add_forced_properties($allvariableshashref);
+
+ # Replacing preset properties, not using the default mechanisms (for example for UNIXPRODUCTNAME)
+ installer::setupscript::replace_preset_properties($allvariableshashref);
+
+ # We did this already. Can this or the other one be removed.
+ installer::scpzipfiles::replace_all_ziplistvariables_in_file($setupscriptref, $allvariableshashref);
+
+ return $setupscriptref;
+}
+
#################################################
# Main program
#################################################
@@ -127,8 +176,6 @@ installer::parameter::saveparameter();
installer::parameter::getparameter();
# debugging can start after function "getparameter"
-if ( $installer::globals::debug ) { installer::logger::debuginfo("\nPart 1: The platform independent part\n"); }
-if ( $installer::globals::debug ) { installer::logger::debuginfo("\nPart 1a: The language independent part\n"); }
installer::parameter::control_fundamental_parameter();
installer::parameter::setglobalvariables();
@@ -180,22 +227,16 @@ my $ziplistref = installer::files::read_file($installer::globals::ziplistname);
$installer::logger::Info->print( "... analyzing $installer::globals::ziplistname ... \n" );
my ($productblockref, $parent) = installer::ziplist::getproductblock($ziplistref, $installer::globals::product, 1); # product block from zip.lst
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "productblock.log" ,$productblockref); }
my ($settingsblockref, undef) = installer::ziplist::getproductblock($productblockref, "Settings", 0); # settings block from zip.lst
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "settingsblock1.log" ,$settingsblockref); }
$settingsblockref = installer::ziplist::analyze_settings_block($settingsblockref); # select data from settings block in zip.lst
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "settingsblock2.log" ,$settingsblockref); }
my $allsettingsarrayref = installer::ziplist::get_settings_from_ziplist($settingsblockref);
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "allsettings1.log" ,$allsettingsarrayref); }
my $allvariablesarrayref = installer::ziplist::get_variables_from_ziplist($settingsblockref);
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "allvariables1.log" ,$allvariablesarrayref); }
my ($globalproductblockref, undef) = installer::ziplist::getproductblock($ziplistref, $installer::globals::globalblock, 0); # global product block from zip.lst
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "globalproductblock.log" ,$globalproductblockref); }
while (defined $parent)
{
@@ -223,41 +264,30 @@ while (defined $parent)
if ( $#{$globalproductblockref} > -1 )
{
my ($globalsettingsblockref, undef) = installer::ziplist::getproductblock($globalproductblockref, "Settings", 0); # settings block from zip.lst
- if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "globalsettingsblock1.log" ,$globalsettingsblockref); }
$globalsettingsblockref = installer::ziplist::analyze_settings_block($globalsettingsblockref); # select data from settings block in zip.lst
- if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "globalsettingsblock2.log" ,$globalsettingsblockref); }
my $allglobalsettingsarrayref = installer::ziplist::get_settings_from_ziplist($globalsettingsblockref);
- if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "allglobalsettings1.log" ,$allglobalsettingsarrayref); }
my $allglobalvariablesarrayref = installer::ziplist::get_variables_from_ziplist($globalsettingsblockref);
- if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "allglobalvariables1.log" ,$allglobalvariablesarrayref); }
if ( $#{$allglobalsettingsarrayref} > -1 ) { $allsettingsarrayref = installer::converter::combine_arrays_from_references_first_win($allsettingsarrayref, $allglobalsettingsarrayref); }
if ( $#{$allglobalvariablesarrayref} > -1 ) { $allvariablesarrayref = installer::converter::combine_arrays_from_references_first_win($allvariablesarrayref, $allglobalvariablesarrayref); }
}
$allsettingsarrayref = installer::ziplist::remove_multiples_from_ziplist($allsettingsarrayref); # the settings from the zip.lst
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "allsettings2.log" ,$allsettingsarrayref); }
$allvariablesarrayref = installer::ziplist::remove_multiples_from_ziplist($allvariablesarrayref);
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "allvariables2.log" ,$allvariablesarrayref); }
installer::ziplist::replace_variables_in_ziplist_variables($allvariablesarrayref);
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "allvariables2a.log" ,$allvariablesarrayref); }
my $allvariableshashref = installer::converter::convert_array_to_hash($allvariablesarrayref); # the variables from the zip.lst
-if ( $installer::globals::globallogging ) { installer::files::save_hash($loggingdir . "allvariables3.log", $allvariableshashref); }
installer::ziplist::set_default_productversion_if_required($allvariableshashref);
-if ( $installer::globals::globallogging ) { installer::files::save_hash($loggingdir . "allvariables3a.log", $allvariableshashref); }
installer::ziplist::add_variables_to_allvariableshashref($allvariableshashref);
-if ( $installer::globals::globallogging ) { installer::files::save_hash($loggingdir . "allvariables3b.log", $allvariableshashref); }
installer::ziplist::overwrite_ooovendor( $allvariableshashref );
-if ( $installer::globals::globallogging ) { installer::files::save_hash($loggingdir . "allvariables3c.log", $allvariableshashref); }
########################################################
# Check if this is simple packaging mechanism
@@ -304,22 +334,16 @@ if ( $$includepathref eq "" )
}
my $includepatharrayref = installer::converter::convert_stringlist_into_array($includepathref, ",");
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "allpatharray1.log" ,$includepatharrayref); }
installer::ziplist::replace_all_variables_in_pathes($includepatharrayref, $pathvariableshashref);
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "allpatharray2.log" ,$includepatharrayref); }
installer::ziplist::replace_minor_in_pathes($includepatharrayref);
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "allpatharray3.log" ,$includepatharrayref); }
installer::ziplist::replace_packagetype_in_pathes($includepatharrayref);
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "allpatharray3a.log" ,$includepatharrayref); }
installer::ziplist::resolve_relative_pathes($includepatharrayref);
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "allpatharray3b.log" ,$includepatharrayref); }
installer::ziplist::remove_ending_separator($includepatharrayref);
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "allpatharray3c.log" ,$includepatharrayref); }
##############################################
# Collecting all files from all include
@@ -362,52 +386,7 @@ installer::control::check_java_for_xpd($allvariableshashref);
# Analyzing the setup script
#####################################
-if ($installer::globals::setupscript_defined_in_productlist) { installer::setupscript::set_setupscript_name($allsettingsarrayref, $includepatharrayref); }
-
-installer::logger::globallog("setup script file: $installer::globals::setupscriptname");
-
-$installer::logger::Info->print( "... analyzing script: $installer::globals::setupscriptname ... \n" );
-
-my $setupscriptref = installer::files::read_file($installer::globals::setupscriptname); # Reading the setup script file
-
-# Resolving variables defined in the zip list file into setup script
-# All the variables are defined in $allvariablesarrayref
-
-installer::scpzipfiles::replace_all_ziplistvariables_in_file($setupscriptref, $allvariableshashref);
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "setupscript1.log" ,$setupscriptref); }
-
-# Resolving %variables defined in the installation object
-
-my $allscriptvariablesref = installer::setupscript::get_all_scriptvariables_from_installation_object($setupscriptref);
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "setupscriptvariables1.log" ,$allscriptvariablesref); }
-
-installer::setupscript::add_lowercase_productname_setupscriptvariable($allscriptvariablesref);
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "setupscriptvariables2.log" ,$allscriptvariablesref); }
-
-installer::setupscript::resolve_lowercase_productname_setupscriptvariable($allscriptvariablesref);
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "setupscriptvariables3.log" ,$allscriptvariablesref); }
-
-$setupscriptref = installer::setupscript::replace_all_setupscriptvariables_in_script($setupscriptref, $allscriptvariablesref);
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "setupscript2.log" ,$setupscriptref); }
-
-# Adding all variables defined in the installation object into the hash of all variables.
-# This is needed if variables are defined in the installation object, but not in the zip list file.
-# If there is a definition in the zip list file and in the installation object, the installation object is more important
-
-installer::setupscript::add_installationobject_to_variables($allvariableshashref, $allscriptvariablesref);
-if ( $installer::globals::globallogging ) { installer::files::save_hash($loggingdir . "allvariables4.log", $allvariableshashref); }
-
-# Adding also all variables, that must be included into the $allvariableshashref.
-installer::setupscript::add_forced_properties($allvariableshashref);
-if ( $installer::globals::globallogging ) { installer::files::save_hash($loggingdir . "allvariables5.log", $allvariableshashref); }
-
-# Replacing preset properties, not using the default mechanisms (for example for UNIXPRODUCTNAME)
-installer::setupscript::replace_preset_properties($allvariableshashref);
-if ( $installer::globals::globallogging ) { installer::files::save_hash($loggingdir . "allvariables6.log", $allvariableshashref); }
-
-installer::scpzipfiles::replace_all_ziplistvariables_in_file($setupscriptref, $allvariableshashref);
-if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "setupscript3.log" ,$setupscriptref); }
-
+my $setupscriptref = GetSetupScriptLines($allsettingsarrayref, $allvariableshashref, $includepatharrayref);
installer::logger::log_hashref($allvariableshashref);
@@ -416,28 +395,21 @@ $installer::logger::Info->print( "... analyzing directories ... \n" );
# Collect all directories in the script to get the destination dirs
my $dirsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Directory");
-if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories1.log", $dirsinproductarrayref); }
if ( $installer::globals::languagepack ) { installer::scriptitems::use_langpack_hostname($dirsinproductarrayref); }
if ( $installer::globals::patch ) { installer::scriptitems::use_patch_hostname($dirsinproductarrayref); }
-if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories1a.log", $dirsinproductarrayref); }
if ( $allvariableshashref->{'SHIFT_BASIS_INTO_BRAND_LAYER'} ) { $dirsinproductarrayref = installer::scriptitems::shift_basis_directory_parents($dirsinproductarrayref); }
-if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories1b.log", $dirsinproductarrayref); }
if ( $allvariableshashref->{'OFFICEDIRECTORYNAME'} ) { installer::scriptitems::set_officedirectory_name($dirsinproductarrayref, $allvariableshashref->{'OFFICEDIRECTORYNAME'}); }
-if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories1b.log", $dirsinproductarrayref); }
installer::scriptitems::resolve_all_directory_names($dirsinproductarrayref);
-if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories2.log", $dirsinproductarrayref); }
$installer::logger::Info->print( "... analyzing files ... \n" );
my $filesinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "File");
-if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles1.log", $filesinproductarrayref); }
$filesinproductarrayref = installer::scriptitems::remove_delete_only_files_from_productlists($filesinproductarrayref);
-if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles2.log", $filesinproductarrayref); }
if (( ! $installer::globals::iswindowsbuild ) &&
( ! $installer::globals::islinuxrpmbuild ) &&
@@ -449,118 +421,90 @@ if (( ! $installer::globals::iswindowsbuild ) &&
{ installer::control::check_oxtfiles($filesinproductarrayref); }
if ($installer::globals::product =~ /suite/i ) { $filesinproductarrayref = installer::scriptitems::remove_notinsuite_files_from_productlists($filesinproductarrayref); }
-if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles2aa.log", $filesinproductarrayref); }
if (! $installer::globals::languagepack)
{
$filesinproductarrayref = installer::scriptitems::remove_Languagepacklibraries_from_Installset($filesinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles2b.log", $filesinproductarrayref); }
}
if (! $installer::globals::patch)
{
$filesinproductarrayref = installer::scriptitems::remove_patchonlyfiles_from_Installset($filesinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles2c.log", $filesinproductarrayref); }
}
if (! $installer::globals::tab)
{
$filesinproductarrayref = installer::scriptitems::remove_tabonlyfiles_from_Installset($filesinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles2c.log", $filesinproductarrayref); }
}
if (( $installer::globals::packageformat ne "installed" ) && ( $installer::globals::packageformat ne "archive" ))
{
$filesinproductarrayref = installer::scriptitems::remove_installedproductonlyfiles_from_Installset($filesinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles2cc.log", $filesinproductarrayref); }
}
$installer::logger::Info->print( "... analyzing scpactions ... \n" );
my $scpactionsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "ScpAction");
-if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions1.log", $scpactionsinproductarrayref); }
if (( ! $allvariableshashref->{'XPDINSTALLER'} ) || ( ! $installer::globals::isxpdplatform ))
{
$scpactionsinproductarrayref = installer::scriptitems::remove_Xpdonly_Items($scpactionsinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions1a.log", $scpactionsinproductarrayref); }
}
if ( $installer::globals::languagepack ) { installer::scriptitems::use_langpack_copy_scpaction($scpactionsinproductarrayref); }
if ( $installer::globals::patch ) { installer::scriptitems::use_patch_copy_scpaction($scpactionsinproductarrayref); }
if (($installer::globals::devsnapshotbuild)) { installer::scriptitems::use_dev_copy_scpaction($scpactionsinproductarrayref); }
-if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions1b.log", $scpactionsinproductarrayref); }
# $scpactionsinproductarrayref = installer::scriptitems::remove_scpactions_without_name($scpactionsinproductarrayref);
-# if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions2.log", $scpactionsinproductarrayref); }
installer::scriptitems::change_keys_of_scpactions($scpactionsinproductarrayref);
-if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions2.log", $scpactionsinproductarrayref); }
$installer::logger::Info->print( "... analyzing shortcuts ... \n" );
my $linksinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Shortcut");
-if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productlinks1.log", $linksinproductarrayref); }
$installer::logger::Info->print( "... analyzing unix links ... \n" );
my $unixlinksinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Unixlink");
-if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "unixlinks1.log", $unixlinksinproductarrayref); }
# $unixlinksinproductarrayref = installer::scriptitems::filter_layerlinks_from_unixlinks($unixlinksinproductarrayref);
-# if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "unixlinks1b.log", $unixlinksinproductarrayref); }
$installer::logger::Info->print( "... analyzing profile ... \n" );
my $profilesinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Profile");
-if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "profiles1.log", $profilesinproductarrayref); }
$installer::logger::Info->print( "... analyzing profileitems ... \n" );
my $profileitemsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "ProfileItem");
-if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "profileitems1.log", $profileitemsinproductarrayref); }
my $folderinproductarrayref;
my $folderitemsinproductarrayref;
my $registryitemsinproductarrayref;
my $windowscustomactionsarrayref;
-my $mergemodulesarrayref;
if ( $installer::globals::iswindowsbuild ) # Windows specific items: Folder, FolderItem, RegistryItem, WindowsCustomAction
{
$installer::logger::Info->print( "... analyzing folders ... \n" );
$folderinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Folder");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "folder1.log", $folderinproductarrayref); }
$installer::logger::Info->print( "... analyzing folderitems ... \n" );
$folderitemsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "FolderItem");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "folderitems1.log", $folderitemsinproductarrayref); }
installer::setupscript::add_predefined_folder($folderitemsinproductarrayref, $folderinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "folder1b.log", $folderinproductarrayref); }
installer::setupscript::prepare_non_advertised_files($folderitemsinproductarrayref, $filesinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles2d.log", $filesinproductarrayref); }
$installer::logger::Info->print( "... analyzing registryitems ... \n" );
$registryitemsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "RegistryItem");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "registryitems1.log", $registryitemsinproductarrayref); }
$registryitemsinproductarrayref = installer::scriptitems::remove_uninstall_regitems_from_script($registryitemsinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "registryitems1b.log", $registryitemsinproductarrayref); }
$installer::logger::Info->print( "... analyzing Windows custom actions ... \n" );
$windowscustomactionsarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "WindowsCustomAction");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "windowscustomactions1.log", $windowscustomactionsarrayref); }
-
- $installer::logger::Info->print( "... analyzing Windows merge modules ... \n" );
-
- $mergemodulesarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "MergeModule");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "mergemodules1.log", $mergemodulesarrayref); }
}
my $modulesinproductarrayref;
@@ -570,38 +514,29 @@ if (!($installer::globals::is_copy_only_project))
$installer::logger::Info->print( "... analyzing modules ... \n" );
$modulesinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Module");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "modules1.log", $modulesinproductarrayref); }
if (( ! $allvariableshashref->{'XPDINSTALLER'} ) || ( ! $installer::globals::isxpdplatform ))
{
$modulesinproductarrayref = installer::scriptitems::remove_Xpdonly_Items($modulesinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "modules1a.log", $modulesinproductarrayref); }
}
installer::scriptitems::resolve_assigned_modules($modulesinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "modules1b.log", $modulesinproductarrayref); }
$modulesinproductarrayref = installer::scriptitems::remove_template_modules($modulesinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "modules1c.log", $modulesinproductarrayref); }
installer::scriptitems::set_children_flag($modulesinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "modules1d.log", $modulesinproductarrayref); }
installer::scriptitems::collect_all_languagemodules($modulesinproductarrayref);
# Assigning the modules to the items
installer::scriptitems::assigning_modules_to_items($modulesinproductarrayref, $filesinproductarrayref, "Files");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles3.log", $filesinproductarrayref); }
installer::scriptitems::assigning_modules_to_items($modulesinproductarrayref, $unixlinksinproductarrayref, "Unixlinks");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "unixlinks2.log", $unixlinksinproductarrayref); }
installer::scriptitems::assigning_modules_to_items($modulesinproductarrayref, $dirsinproductarrayref, "Dirs");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories2aa.log", $dirsinproductarrayref); }
}
-if ( $installer::globals::debug ) { installer::logger::debuginfo("\nEnd of part 1a: The language independent part\n"); }
# saving debug info, before staring part 1b
if ( $installer::globals::debug ) { installer::logger::savedebug($installer::globals::exitlog); }
@@ -619,13 +554,12 @@ if ( $installer::globals::debug ) { installer::logger::savedebug($installer::glo
# The for iterates over all products, separated by an # in the language list
###############################################################################
-if ( $installer::globals::debug ) { installer::logger::debuginfo("\nPart 1b: The language dependent part\n"); }
-
-for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
+# Run the following code block exactly once.
+# This strange version of a do{}while(false) loop exists only to allow (legacy) next statements.
+for (;1;last)
{
- my $languagesarrayref = installer::languages::get_all_languages_for_one_product($installer::globals::languageproducts[$n], $allvariableshashref);
- if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "languages.log" ,$languagesarrayref); }
+ my $languagesarrayref = installer::languages::get_all_languages_for_one_product($installer::globals::languageproduct, $allvariableshashref);
$installer::globals::alllanguagesinproductarrayref = $languagesarrayref;
my $languagestringref = installer::languages::get_language_string($languagesarrayref);
@@ -716,31 +650,11 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
my $uniquefilename = "";
my $revuniquefilename = "";
my $revshortfilename = "";
- my $allupdatesequences = "";
- my $allupdatecomponents = "";
- my $allupdatefileorder = "";
my $allupdatecomponentorder = "";
my $shortdirname = "";
my $componentid = "";
my $componentidkeypath = "";
my $alloldproperties = "";
- my $allupdatelastsequences = "";
- my $allupdatediskids = "";
-
- if ( $installer::globals::iswindowsbuild )
- {
- if ( $allvariableshashref->{'UPDATE_DATABASE'} )
- {
- $installer::logger::Info->print( "... analyzing update database ...\n" );
- $refdatabase = installer::windows::update::readdatabase($allvariableshashref, $languagestringref, $includepatharrayref);
-
- if ( $installer::globals::updatedatabase )
- {
- ($uniquefilename, $revuniquefilename, $revshortfilename, $allupdatesequences, $allupdatecomponents, $allupdatefileorder, $allupdatecomponentorder, $shortdirname, $componentid, $componentidkeypath, $alloldproperties, $allupdatelastsequences, $allupdatediskids) = installer::windows::update::create_database_hashes($refdatabase);
- if ( $mergemodulesarrayref > -1 ) { installer::windows::update::readmergedatabase($mergemodulesarrayref, $languagestringref, $includepatharrayref); }
- }
- }
- }
##############################################
# Setting global code variables for Windows
@@ -758,8 +672,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
# Resolving include paths (language dependent)
################################################
- $includepatharrayref_lang = installer::ziplist::replace_languages_in_pathes($includepatharrayref, $languagesarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "allpatharray4.log" ,$includepatharrayref_lang); }
+ my $includepatharrayref_lang = installer::ziplist::replace_languages_in_pathes($includepatharrayref, $languagesarrayref);
if ( $installer::globals::refresh_includepathes ) { installer::worker::collect_all_files_from_includepathes($includepatharrayref_lang); }
@@ -776,14 +689,11 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
#####################################
my $dirsinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($dirsinproductarrayref, $languagesarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories3.log", $dirsinproductlanguageresolvedarrayref); }
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories2a.log", $dirsinproductarrayref); }
# A new directory array is needed ($dirsinproductlanguageresolvedarrayref instead of $dirsinproductarrayref)
# because $dirsinproductarrayref is needed in get_Destination_Directory_For_Item_From_Directorylist
installer::scriptitems::changing_name_of_language_dependent_keys($dirsinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories4.log", $dirsinproductlanguageresolvedarrayref); }
installer::scriptitems::checking_directories_with_corrupt_hostname($dirsinproductlanguageresolvedarrayref, $languagesarrayref);
@@ -796,59 +706,44 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
$installer::logger::Info->print( "... analyzing files ...\n" );
my $filesinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($filesinproductarrayref, $languagesarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles4.log", $filesinproductlanguageresolvedarrayref); }
if ( ! $installer::globals::set_office_start_language )
{
$filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_office_start_language_files($filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles4b.log", $filesinproductlanguageresolvedarrayref); }
}
installer::scriptitems::changing_name_of_language_dependent_keys($filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles5.log", $filesinproductlanguageresolvedarrayref); }
if ( $installer::globals::iswin and $^O =~ /MSWin/i ) { installer::converter::convert_slash_to_backslash($filesinproductlanguageresolvedarrayref); }
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles6.log", $filesinproductlanguageresolvedarrayref); }
$filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_non_existent_languages_in_productlists($filesinproductlanguageresolvedarrayref, $languagestringref, "Name", "file");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles7.log", $filesinproductlanguageresolvedarrayref); }
installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist($filesinproductlanguageresolvedarrayref, $includepatharrayref_lang, $dirsinproductlanguageresolvedarrayref, "Files");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles8a.log", $filesinproductlanguageresolvedarrayref); }
$filesinproductlanguageresolvedarrayref = installer::scriptitems::add_bundled_extension_blobs( $filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles8b.log", $filesinproductlanguageresolvedarrayref); }
($filesinproductlanguageresolvedarrayref,$dirsinproductarrayref) = installer::scriptitems::add_bundled_prereg_extensions(
$filesinproductlanguageresolvedarrayref, $dirsinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles8c.log", $filesinproductlanguageresolvedarrayref); }
installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist($filesinproductlanguageresolvedarrayref, $dirsinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles9.log", $filesinproductlanguageresolvedarrayref); }
$filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_Files_Without_Sourcedirectory($filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles10.log", $filesinproductlanguageresolvedarrayref); }
if ($installer::globals::languagepack)
{
$filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_Files_For_Languagepacks($filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles10c.log", $filesinproductlanguageresolvedarrayref); }
}
if ( ! $allvariableshashref->{'NO_README_IN_ROOTDIR'} )
{
$filesinproductlanguageresolvedarrayref = installer::scriptitems::add_License_Files_into_Installdir($filesinproductlanguageresolvedarrayref, $dirsinproductlanguageresolvedarrayref, $languagesarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles10b.log", $filesinproductlanguageresolvedarrayref); }
}
$filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_onlyasialanguage_files_from_productlists($filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles10d.log", $filesinproductlanguageresolvedarrayref); }
$filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_onlywesternlanguage_files_from_productlists($filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles10e.log", $filesinproductlanguageresolvedarrayref); }
installer::scriptitems::make_filename_language_specific($filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles10f.log", $filesinproductlanguageresolvedarrayref); }
######################################################################################
# Unzipping files with flag ARCHIVE and putting all included files into the file list
@@ -859,15 +754,12 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
my @additional_paths_from_zipfiles = ();
$filesinproductlanguageresolvedarrayref = installer::archivefiles::resolving_archive_flag($filesinproductlanguageresolvedarrayref, \@additional_paths_from_zipfiles, $languagestringref, $loggingdir);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles11.log", $filesinproductlanguageresolvedarrayref); }
- if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "additional_paths.log" ,\@additional_paths_from_zipfiles); }
# packed files sometimes contain a "$" in their name: HighlightText$1.class. For epm the "$" has to be quoted by "$$"
if (!( $installer::globals::iswindowsbuild || $installer::globals::simple ) )
{
installer::scriptitems::quoting_illegal_filenames($filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles12.log", $filesinproductlanguageresolvedarrayref); }
}
#####################################
@@ -877,7 +769,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
$installer::logger::Info->print( "... analyzing files with flag SUBST_FILENAME ...\n" );
installer::substfilenamefiles::resolving_subst_filename_flag($filesinproductlanguageresolvedarrayref, $allvariableshashref, $languagestringref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles12d.log", $filesinproductlanguageresolvedarrayref); }
#####################################
# Files with flag SCPZIP_REPLACE
@@ -888,7 +779,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
# Editing files with flag SCPZIP_REPLACE.
installer::scpzipfiles::resolving_scpzip_replace_flag($filesinproductlanguageresolvedarrayref, $allvariableshashref, "File", $languagestringref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles13.log", $filesinproductlanguageresolvedarrayref); }
#####################################
# Files with flag PATCH_SO_NAME
@@ -899,7 +789,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
# Editing files with flag PATCH_SO_NAME.
installer::scppatchsoname::resolving_patchsoname_flag($filesinproductlanguageresolvedarrayref, $allvariableshashref, "File", $languagestringref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles13b.log", $filesinproductlanguageresolvedarrayref); }
#####################################
# Files with flag HIDDEN
@@ -908,7 +797,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
$installer::logger::Info->print( "... analyzing files with flag HIDDEN ...\n" );
installer::worker::resolving_hidden_flag($filesinproductlanguageresolvedarrayref, $allvariableshashref, "File", $languagestringref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles13c.log", $filesinproductlanguageresolvedarrayref); }
############################################
# Collecting directories for epm list file
@@ -924,34 +812,26 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
# that have a CREATE flag. All other directories are created, if they contain at least one file.
my ($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_from_filesarray($filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforepmlist1.log", $directoriesforepmarrayref); }
($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_with_create_flag_from_directoryarray($dirsinproductlanguageresolvedarrayref, $alldirectoryhash);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforepmlist2.log", $directoriesforepmarrayref); }
# installer::sorter::sorting_array_of_hashes($directoriesforepmarrayref, "HostName");
- # if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforepmlist3.log", $directoriesforepmarrayref); }
#########################################################
# language dependent scpactions part
#########################################################
my $scpactionsinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($scpactionsinproductarrayref, $languagesarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions3.log", $scpactionsinproductlanguageresolvedarrayref); }
installer::scriptitems::changing_name_of_language_dependent_keys($scpactionsinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions4.log", $scpactionsinproductlanguageresolvedarrayref); }
installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist($scpactionsinproductlanguageresolvedarrayref, $includepatharrayref_lang, $dirsinproductlanguageresolvedarrayref, "ScpActions");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions5.log", $scpactionsinproductlanguageresolvedarrayref); }
# Editing scpactions with flag SCPZIP_REPLACE and PATCH_SO_NAME.
installer::scpzipfiles::resolving_scpzip_replace_flag($scpactionsinproductlanguageresolvedarrayref, $allvariableshashref, "ScpAction", $languagestringref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions6.log", $scpactionsinproductlanguageresolvedarrayref); }
installer::scppatchsoname::resolving_patchsoname_flag($scpactionsinproductlanguageresolvedarrayref, $allvariableshashref, "ScpAction", $languagestringref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions6a.log", $scpactionsinproductlanguageresolvedarrayref); }
#########################################################
# language dependent links part
@@ -960,27 +840,20 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
$installer::logger::Info->print( "... analyzing links ...\n" );
my $linksinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($linksinproductarrayref, $languagesarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productlinks2.log", $linksinproductlanguageresolvedarrayref); }
installer::scriptitems::changing_name_of_language_dependent_keys($linksinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productlinks3.log", $linksinproductlanguageresolvedarrayref); }
installer::scriptitems::get_destination_file_path_for_links($linksinproductlanguageresolvedarrayref, $filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productlinks4.log", $linksinproductlanguageresolvedarrayref); }
installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist($linksinproductlanguageresolvedarrayref, $dirsinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productlinks5.log", $linksinproductlanguageresolvedarrayref); }
# Now taking all links that have no FileID but a ShortcutID, linking to another link
installer::scriptitems::get_destination_link_path_for_links($linksinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productlinks6.log", $linksinproductlanguageresolvedarrayref); }
$linksinproductlanguageresolvedarrayref = installer::scriptitems::remove_workstation_only_items($linksinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productlinks7.log", $linksinproductlanguageresolvedarrayref); }
installer::scriptitems::resolve_links_with_flag_relative($linksinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productlinks8.log", $linksinproductlanguageresolvedarrayref); }
#########################################################
# language dependent unix links part
@@ -989,13 +862,10 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
$installer::logger::Info->print( "... analyzing unix links ...\n" );
my $unixlinksinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($unixlinksinproductarrayref, $languagesarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "unixlinks3.log", $unixlinksinproductlanguageresolvedarrayref); }
installer::scriptitems::changing_name_of_language_dependent_keys($unixlinksinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "unixlinks4.log", $unixlinksinproductlanguageresolvedarrayref); }
installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist($unixlinksinproductlanguageresolvedarrayref, $dirsinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "unixlinks5.log", $unixlinksinproductlanguageresolvedarrayref); }
#########################################################
# language dependent part for profiles and profileitems
@@ -1009,33 +879,25 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
$installer::logger::Info->print( "... creating profiles ...\n" );
$profilesinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($profilesinproductarrayref, $languagesarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "profiles2.log", $profilesinproductlanguageresolvedarrayref); }
$profileitemsinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($profileitemsinproductarrayref, $languagesarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "profileitems2.log", $profilesinproductlanguageresolvedarrayref); }
installer::scriptitems::changing_name_of_language_dependent_keys($profilesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "profiles3.log", $profilesinproductlanguageresolvedarrayref); }
installer::scriptitems::changing_name_of_language_dependent_keys($profileitemsinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "profileitems3.log", $profileitemsinproductlanguageresolvedarrayref); }
installer::scriptitems::replace_setup_variables($profileitemsinproductlanguageresolvedarrayref, $languagestringref, $allvariableshashref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "profileitems4.log", $profileitemsinproductlanguageresolvedarrayref); }
if ( $installer::globals::patch_user_dir )
{
installer::scriptitems::replace_userdir_variable($profileitemsinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "profileitems4a.log", $profileitemsinproductlanguageresolvedarrayref); }
}
installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist($profilesinproductlanguageresolvedarrayref, $dirsinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "profiles4.log", $profilesinproductlanguageresolvedarrayref); }
# Now the Profiles can be created
installer::profiles::create_profiles($profilesinproductlanguageresolvedarrayref, $profileitemsinproductlanguageresolvedarrayref, $filesinproductlanguageresolvedarrayref, $languagestringref, $allvariableshashref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles15.log", $filesinproductlanguageresolvedarrayref); }
}
my $registryitemsinproductlanguageresolvedarrayref; # cannot be defined in the following "if ( $installer::globals::iswindowsbuild )"
@@ -1051,10 +913,8 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
$installer::logger::Info->print( "... analyzing folder ...\n" );
$folderinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($folderinproductarrayref, $languagesarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "folder2.log", $folderinproductlanguageresolvedarrayref); }
installer::scriptitems::changing_name_of_language_dependent_keys($folderinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "folder3.log", $folderinproductlanguageresolvedarrayref); }
#########################################################
# language dependent part for folderitems
@@ -1063,10 +923,8 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
$installer::logger::Info->print( "... analyzing folderitems ...\n" );
$folderitemsinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($folderitemsinproductarrayref, $languagesarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "folderitems2.log", $folderitemsinproductlanguageresolvedarrayref); }
installer::scriptitems::changing_name_of_language_dependent_keys($folderitemsinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "folderitems3.log", $folderitemsinproductlanguageresolvedarrayref); }
#########################################################
# language dependent part for registryitems
@@ -1075,10 +933,8 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
$installer::logger::Info->print( "... analyzing registryitems ...\n" );
$registryitemsinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($registryitemsinproductarrayref, $languagesarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "registryitems2.log", $registryitemsinproductlanguageresolvedarrayref); }
installer::scriptitems::changing_name_of_language_dependent_keys($registryitemsinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "registryitems3.log", $registryitemsinproductlanguageresolvedarrayref); }
}
#########################################################
@@ -1092,13 +948,10 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
$installer::logger::Info->print( "... analyzing modules ...\n" );
$modulesinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($modulesinproductarrayref, $languagesarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes_modules($loggingdir . "modules2.log", $modulesinproductlanguageresolvedarrayref); }
$modulesinproductlanguageresolvedarrayref = installer::scriptitems::remove_not_required_language_modules($modulesinproductlanguageresolvedarrayref, $languagesarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes_modules($loggingdir . "modules2a.log", $modulesinproductlanguageresolvedarrayref); }
installer::scriptitems::changing_name_of_language_dependent_keys($modulesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes_modules($loggingdir . "modules3a.log", $modulesinproductlanguageresolvedarrayref); }
# installer::scriptitems::collect_language_specific_names($modulesinproductlanguageresolvedarrayref);
installer::scriptitems::select_required_language_strings($modulesinproductlanguageresolvedarrayref); # using english strings
@@ -1111,27 +964,19 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
if ( $installer::globals::languagepack )
{
$filesinproductlanguageresolvedarrayref = installer::languagepack::select_language_items($filesinproductlanguageresolvedarrayref, $languagesarrayref, "File");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles16b.log", $filesinproductlanguageresolvedarrayref); }
$scpactionsinproductlanguageresolvedarrayref = installer::languagepack::select_language_items($scpactionsinproductlanguageresolvedarrayref, $languagesarrayref, "ScpAction");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions6b.log", $scpactionsinproductlanguageresolvedarrayref); }
$linksinproductlanguageresolvedarrayref = installer::languagepack::select_language_items($linksinproductlanguageresolvedarrayref, $languagesarrayref, "Shortcut");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productlinks8b.log", $linksinproductlanguageresolvedarrayref); }
$unixlinksinproductlanguageresolvedarrayref = installer::languagepack::select_language_items($unixlinksinproductlanguageresolvedarrayref, $languagesarrayref, "Unixlink");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "unixlinks5.log", $unixlinksinproductlanguageresolvedarrayref); }
@{$folderitemsinproductlanguageresolvedarrayref} = (); # no folderitems in languagepacks
# Collecting the directories again, to include only the language specific directories
($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_from_filesarray($filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforepmlist3alangpack.log", $directoriesforepmarrayref); }
($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_with_create_flag_from_directoryarray($dirsinproductlanguageresolvedarrayref, $alldirectoryhash);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforepmlist3blangpack.log", $directoriesforepmarrayref); }
installer::sorter::sorting_array_of_hashes($directoriesforepmarrayref, "HostName");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforepmlist3clangpack.log", $directoriesforepmarrayref); }
if ( $installer::globals::iswindowsbuild )
{
$registryitemsinproductlanguageresolvedarrayref = installer::worker::select_langpack_items($registryitemsinproductlanguageresolvedarrayref, "RegistryItem");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "registryitems3aa.log", $registryitemsinproductlanguageresolvedarrayref); }
}
}
@@ -1143,31 +988,22 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
if (( $installer::globals::patch ) && (( $installer::globals::issolarispkgbuild ) || ( $installer::globals::iswindowsbuild )))
{
$filesinproductlanguageresolvedarrayref = installer::worker::select_patch_items($filesinproductlanguageresolvedarrayref, "File");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles16patch.log", $filesinproductlanguageresolvedarrayref); }
$scpactionsinproductlanguageresolvedarrayref = installer::worker::select_patch_items($scpactionsinproductlanguageresolvedarrayref, "ScpAction");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions6patch.log", $scpactionsinproductlanguageresolvedarrayref); }
$linksinproductlanguageresolvedarrayref = installer::worker::select_patch_items($linksinproductlanguageresolvedarrayref, "Shortcut");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productlinks8patch.log", $linksinproductlanguageresolvedarrayref); }
$unixlinksinproductlanguageresolvedarrayref = installer::worker::select_patch_items($unixlinksinproductlanguageresolvedarrayref, "Unixlink");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "unixlinks6patch.log", $unixlinksinproductlanguageresolvedarrayref); }
$folderitemsinproductlanguageresolvedarrayref = installer::worker::select_patch_items($folderitemsinproductlanguageresolvedarrayref, "FolderItem");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfolderitems1patch.log", $folderitemsinproductlanguageresolvedarrayref); }
# @{$folderitemsinproductlanguageresolvedarrayref} = (); # no folderitems in languagepacks
if ( $installer::globals::iswindowsbuild )
{
$registryitemsinproductlanguageresolvedarrayref = installer::worker::select_patch_items_without_name($registryitemsinproductlanguageresolvedarrayref, "RegistryItem");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "registryitems3a.log", $registryitemsinproductlanguageresolvedarrayref); }
installer::worker::prepare_windows_patchfiles($filesinproductlanguageresolvedarrayref, $languagestringref, $allvariableshashref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles16bpatch.log", $filesinproductlanguageresolvedarrayref); }
# For Windows patches, the directories can now be collected again
($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_from_filesarray($filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforepmlist4_patch.log", $directoriesforepmarrayref); }
installer::sorter::sorting_array_of_hashes($directoriesforepmarrayref, "HostName");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforepmlist5_patch.log", $directoriesforepmarrayref); }
}
}
@@ -1185,7 +1021,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
{
$installer::logger::Info->print( "... creating inf files ...\n" );
installer::worker::create_inf_file($filesinproductlanguageresolvedarrayref, $registryitemsinproductlanguageresolvedarrayref, $folderinproductlanguageresolvedarrayref, $folderitemsinproductlanguageresolvedarrayref, $modulesinproductlanguageresolvedarrayref, $languagesarrayref, $languagestringref, $allvariableshashref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles16c.log", $filesinproductlanguageresolvedarrayref); }
}
###########################################
@@ -1196,7 +1031,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
if ( $allvariableshashref->{'UPXPRODUCT'} )
{
installer::upx::upx_on_libraries($filesinproductlanguageresolvedarrayref, $languagestringref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles16d.log", $filesinproductlanguageresolvedarrayref); }
}
###########################################################
@@ -1228,7 +1062,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
installer::packagelist::log_packages_content($packages);
installer::packagelist::create_module_destination_hash($packages, $allvariableshashref);
- if ( $installer::globals::debug ) { installer::logger::debuginfo("\nEnd of part 1b: The language dependent part\n"); }
# saving debug info, before starting part 2
if ( $installer::globals::debug ) { installer::logger::savedebug($installer::globals::exitlog); }
@@ -1237,13 +1070,11 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
# Part 2: The platform dependent part
#################################################
- if ( $installer::globals::debug ) { installer::logger::debuginfo("\nPart 2: The platform dependent part\n"); }
#################################################
# Part 2a: All non-Windows platforms
#################################################
- if ( $installer::globals::debug ) { installer::logger::debuginfo("\nPart 2a: All non-Windows platforms\n"); }
#########################################################
# ... creating epm list file ...
@@ -1394,39 +1225,27 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
#############################################
my $filesinpackage = installer::converter::copy_collector($filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "files1_" . $packagename . ".log", $filesinpackage); }
my $linksinpackage = installer::converter::copy_collector($linksinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "links1_" . $packagename . ".log", $linksinpackage); }
my $unixlinksinpackage = installer::converter::copy_collector($unixlinksinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "unixlinks1_" . $packagename . ".log", $unixlinksinpackage); }
my $dirsinpackage = installer::converter::copy_collector($directoriesforepmarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "dirs1_" . $packagename . ".log", $dirsinpackage); }
###########################################
# setting the root path for the packages
###########################################
installer::scriptitems::add_rootpath_to_directories($dirsinpackage, $packagerootpath);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "dirs2_" . $packagename . ".log", $dirsinpackage); }
installer::scriptitems::add_rootpath_to_files($filesinpackage, $packagerootpath);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "files2_" . $packagename . ".log", $filesinpackage); }
installer::scriptitems::add_rootpath_to_links($linksinpackage, $packagerootpath);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "links2_" . $packagename . ".log", $linksinpackage); }
installer::scriptitems::add_rootpath_to_files($unixlinksinpackage, $packagerootpath);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "unixlinks2_" . $packagename . ".log", $unixlinksinpackage); }
#################################
# collecting items for package
#################################
$filesinpackage = installer::packagelist::find_files_for_package($filesinpackage, $onepackage);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "files3_" . $packagename . ".log", $filesinpackage); }
$unixlinksinpackage = installer::packagelist::find_files_for_package($unixlinksinpackage, $onepackage);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "unixlinks3_" . $packagename . ".log", $unixlinksinpackage); }
$linksinpackage = installer::packagelist::find_links_for_package($linksinpackage, $filesinpackage);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "links3_" . $packagename . ".log", $linksinpackage); }
$dirsinpackage = installer::packagelist::find_dirs_for_package($dirsinpackage, $onepackage);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "dirs3_" . $packagename . ".log", $dirsinpackage); }
###############################################
# nothing to do, if $filesinpackage is empty
@@ -1470,7 +1289,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
if ( $installer::globals::strip )
{
installer::strip::strip_libraries($filesinpackage, $languagestringref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . $packagename ."_files.log", $filesinpackage); }
}
###############################################################
@@ -1494,9 +1312,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
if ( $installer::globals::patch ) { $installer::globals::call_epm = 1; } # enabling packing again
$run = 1;
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "files3b_" . $packagename . ".log", $filesinpackage); }
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "links3b_" . $packagename . ".log", $linksinpackage); }
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "dirs3b_" . $packagename . ".log", $dirsinpackage); }
}
if (( ! $installer::globals::makelinuxlinkrpm ) && ( ! $run ))
@@ -1509,9 +1324,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
$shellscriptsfilename = ""; # shell scripts only need to be included into the link rpm
$run = 1;
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "files3a_" . $packagename . ".log", $filesinpackage); }
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "links3a_" . $packagename . ".log", $linksinpackage); }
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "dirs3a_" . $packagename . ".log", $dirsinpackage); }
}
}
}
@@ -1560,7 +1372,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
if (( $installer::globals::patch ) && ( $installer::globals::issolarispkgbuild ))
{
$filesinpackage = installer::worker::analyze_patch_files($filesinpackage);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "files4_" . $packagename . ".log", $filesinpackage); }
if ( ! ( $#{$filesinpackage} > -1 ))
{
@@ -1865,13 +1676,11 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
} # end of "if (!( $installer::globals::iswindowsbuild ))"
- if ( $installer::globals::debug ) { installer::logger::debuginfo("\nEnd of part 2a: All non-Windows platforms\n"); }
#################################################
# Part 2b: The Windows platform
#################################################
- if ( $installer::globals::debug ) { installer::logger::debuginfo("\nPart 2b: The Windows platform\n"); }
#####################################################################
# ... creating idt files ...
@@ -1891,7 +1700,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
if ( $installer::globals::compiler =~ /wntgcci/ )
{
installer::windows::strip::strip_binaries($filesinproductlanguageresolvedarrayref, $languagestringref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles16e.log", $filesinproductlanguageresolvedarrayref); }
}
$installdir = installer::worker::create_installation_directory($shipinstalldir, $languagestringref, \$current_install_number);
@@ -1930,7 +1738,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
# Removing all files with flag "BINARYTABLE_ONLY"
@installer::globals::binarytableonlyfiles = ();
$filesinproductlanguageresolvedarrayref = installer::worker::remove_all_items_with_special_flag($filesinproductlanguageresolvedarrayref ,"BINARYTABLE_ONLY");
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles17.log", $filesinproductlanguageresolvedarrayref); }
# Collecting all profileitems with flag "INIFILETABLE" for table "IniFile"
my $inifiletableentries = installer::worker::collect_all_items_with_special_flag($profileitemsinproductlanguageresolvedarrayref ,"INIFILETABLE");
@@ -1941,41 +1748,28 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
# Add cabinet assignments to files
installer::windows::file::assign_cab_to_files($filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles17a.log", $filesinproductlanguageresolvedarrayref); }
installer::windows::file::assign_sequencenumbers_to_files($filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles17b.log", $filesinproductlanguageresolvedarrayref); }
# Collection all available directory trees
installer::windows::directory::collectdirectorytrees($directoriesforepmarrayref);
- $filesinproductlanguageresolvedarrayref = installer::windows::file::create_files_table($filesinproductlanguageresolvedarrayref, \@allfilecomponents, $newidtdir, $allvariableshashref, $uniquefilename, $allupdatesequences, $allupdatecomponents, $allupdatefileorder);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles17c.log", $filesinproductlanguageresolvedarrayref); }
- if ( $installer::globals::updatedatabase ) { installer::windows::file::check_file_sequences($allupdatefileorder, $allupdatecomponentorder); }
+ $filesinproductlanguageresolvedarrayref = installer::windows::file::create_files_table($filesinproductlanguageresolvedarrayref, \@allfilecomponents, $newidtdir, $allvariableshashref, $uniquefilename);
installer::windows::directory::create_directory_table($directoriesforepmarrayref, $newidtdir, $allvariableshashref, $shortdirname, $loggingdir);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles18.log", $filesinproductlanguageresolvedarrayref); }
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt1.log", $directoriesforepmarrayref); }
# Attention: The table "Registry.idt" contains language specific strings -> parameter: $languagesarrayref !
installer::windows::registry::create_registry_table($registryitemsinproductlanguageresolvedarrayref, \@allregistrycomponents, $newidtdir, $languagesarrayref, $allvariableshashref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "registryitems4.log", $registryitemsinproductlanguageresolvedarrayref); }
installer::windows::component::create_component_table($filesinproductlanguageresolvedarrayref, $registryitemsinproductlanguageresolvedarrayref, $directoriesforepmarrayref, \@allfilecomponents, \@allregistrycomponents, $newidtdir, $componentid, $componentidkeypath, $allvariableshashref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles19.log", $filesinproductlanguageresolvedarrayref); }
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "registryitems5.log", $registryitemsinproductlanguageresolvedarrayref); }
# Attention: The table "Feature.idt" contains language specific strings -> parameter: $languagesarrayref !
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "modules4.log", $modulesinproductlanguageresolvedarrayref); }
installer::windows::feature::add_uniquekey($modulesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "modules4a.log", $modulesinproductlanguageresolvedarrayref); }
$modulesinproductlanguageresolvedarrayref = installer::windows::feature::sort_feature($modulesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "modules4b.log", $modulesinproductlanguageresolvedarrayref); }
installer::windows::feature::create_feature_table($modulesinproductlanguageresolvedarrayref, $newidtdir, $languagesarrayref, $allvariableshashref);
installer::windows::featurecomponent::create_featurecomponent_table($filesinproductlanguageresolvedarrayref, $registryitemsinproductlanguageresolvedarrayref, $newidtdir);
- installer::windows::media::create_media_table($filesinproductlanguageresolvedarrayref, $newidtdir, $allvariableshashref, $allupdatelastsequences, $allupdatediskids);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles20.log", $filesinproductlanguageresolvedarrayref); }
+ installer::windows::media::create_media_table($filesinproductlanguageresolvedarrayref, $newidtdir, $allvariableshashref);
installer::windows::font::create_font_table($filesinproductlanguageresolvedarrayref, $newidtdir);
@@ -1984,7 +1778,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
my @iconfilecollector = ();
installer::windows::shortcut::create_shortcut_table($filesinproductlanguageresolvedarrayref, $linksinproductlanguageresolvedarrayref, $folderinproductlanguageresolvedarrayref, $folderitemsinproductlanguageresolvedarrayref, $directoriesforepmarrayref, $newidtdir, $languagesarrayref, $includepatharrayref, \@iconfilecollector);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "folderitems4.log", $folderitemsinproductlanguageresolvedarrayref); }
installer::windows::inifile::create_inifile_table($inifiletableentries, $filesinproductlanguageresolvedarrayref, $newidtdir);
@@ -2181,12 +1974,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
installer::windows::msiglobal::write_summary_into_msi_database($msifilename, $onelanguage, $languagefile, $allvariableshashref);
- # if there are Merge Modules, they have to be integrated now
- $filesinproductlanguageresolvedarrayref = installer::windows::mergemodule::merge_mergemodules_into_msi_database($mergemodulesarrayref, $filesinproductlanguageresolvedarrayref, $msifilename, $languagestringref, $onelanguage, $languagefile, $allvariableshashref, $includepatharrayref, $allupdatesequences, $allupdatelastsequences, $allupdatediskids);
- if (( $installer::globals::globallogging ) && ($installer::globals::globalloggingform21)) { installer::files::save_array_of_hashes($loggingdir . "productfiles21_" . $onelanguage . ".log", $filesinproductlanguageresolvedarrayref); }
- $installer::globals::globalloggingform21 = 0;
- if ( $installer::globals::use_packages_for_cabs ) { installer::windows::media::create_media_table($filesinproductlanguageresolvedarrayref, $newidtdir, $allvariableshashref, $allupdatelastsequences, $allupdatediskids); }
-
# copy msi database into installation directory
my $msidestfilename = $installdir . $installer::globals::separator . $msidatabasename;
@@ -2227,10 +2014,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
installer::windows::msiglobal::copy_windows_installer_files_into_installset($installdir, $includepatharrayref, $allvariableshashref);
- # ... copying MergeModules into installation set
-
- if ( ! $installer::globals::fix_number_of_cab_files ) { installer::windows::msiglobal::copy_merge_modules_into_installset($installdir); }
-
# ... copying the child projects
if ($installer::globals::addchildprojects)
@@ -2273,20 +2056,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
installer::worker::clean_output_tree(); # removing directories created in the output tree
($is_success, $finalinstalldir) = installer::worker::analyze_and_save_logfile($loggingdir, $installdir, $installlogdir, $allsettingsarrayref, $languagestringref, $current_install_number);
- #######################################################
- # Creating Windows msp patches
- #######################################################
-
- if (( $is_success ) && ( $installer::globals::updatedatabase ) && ( $allvariableshashref->{'CREATE_MSP_INSTALLSET'} ))
- {
- # Required:
- # Temp path for administrative installations: $installer::globals::temppath
- # Path of new installation set: $finalinstalldir
- # Path of old installation set: $installer::globals::updatedatabasepath
- my $mspdir = installer::windows::msp::create_msp_patch($finalinstalldir, $includepatharrayref, $allvariableshashref, $languagestringref, $languagesarrayref, $filesinproductlanguageresolvedarrayref);
- ($is_success, $finalinstalldir) = installer::worker::analyze_and_save_logfile($loggingdir, $mspdir, $installlogdir, $allsettingsarrayref, $languagestringref, $current_install_number);
- installer::worker::clean_output_tree(); # removing directories created in the output tree
- }
#######################################################
# Creating download installation set
@@ -2308,13 +2077,11 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
} # end of "if ( $installer::globals::iswindowsbuild )"
- if ( $installer::globals::debug ) { installer::logger::debuginfo("\nEnd of part 2b: The Windows platform\n"); }
# saving file_info file for later analysis
my $speciallogfilename = "fileinfo_" . $installer::globals::product . "\.log";
installer::files::save_array_of_hashes($loggingdir . $speciallogfilename, $filesinproductlanguageresolvedarrayref);
-
-} # end of iteration for one language group
+}
# saving debug info at end
if ( $installer::globals::debug ) { installer::logger::savedebug($installer::globals::exitlog); }
diff --git a/solenv/bin/modules/installer/control.pm b/solenv/bin/modules/installer/control.pm
index 2974b949e5f1..51edf8d3b8e8 100644
--- a/solenv/bin/modules/installer/control.pm
+++ b/solenv/bin/modules/installer/control.pm
@@ -321,7 +321,7 @@ sub filter_log_error ($$$$)
# Remove all filenames that contain the word "Error".
my $work_string = $message;
- $work_string =~ s/Error\.(idt|mlf|ulf|html|hpp|ipp)//g;
+ $work_string =~ s/Error\.(idt|mlf|ulf|idl|html|hpp|ipp)//g;
if ($work_string =~ /\bError\b/i)
{
@@ -497,7 +497,7 @@ sub check_updatepack
# try to write into $shipdrive
- my $directory = $installer::globals::product . "_" . $installer::globals::compiler . "_" . $installer::globals::buildid . "_" . $installer::globals::languageproducts[0] . "_test_$$";
+ my $directory = $installer::globals::product . "_" . $installer::globals::compiler . "_" . $installer::globals::buildid . "_" . $installer::globals::languageproduct . "_test_$$";
$directory =~ s/\,/\_/g; # for the list of languages
$directory =~ s/\-/\_/g; # for en-US, pt-BR, ...
$directory = $shipdrive . $installer::globals::separator . $directory;
diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm
index e877595b35ac..38cff5d3569c 100644
--- a/solenv/bin/modules/installer/epmfile.pm
+++ b/solenv/bin/modules/installer/epmfile.pm
@@ -2312,7 +2312,7 @@ sub log_rpm_info
$infoline = "$rpmout\n";
$infoline =~ s/error/e_r_r_o_r/gi; # avoiding log problems
- $installer::logger::Lang->printf($infoline);
+ $installer::logger::Lang->print($infoline);
}
}
else
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index f4dcd0ff382f..04d14ea6d735 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -113,7 +113,7 @@ BEGIN
$required_dotnet_version = "2.0.0.0";
$productextension = "";
- @languageproducts = ();
+ $languageproduct = undef;
$build = "";
$minor = "";
$lastminor = "";
@@ -226,24 +226,14 @@ BEGIN
@linkrpms = ();
$archiveformat = "";
$minorupgradekey = "";
- $updatelastsequence = 0;
- $updatesequencecounter = 0;
- $updatedatabase = 0;
- $updatedatabasepath = "";
$pfffileexists = 0;
$pffcabfilename = "ooobasis3.0_pff.cab";
- $mergemodulenumber = 0;
- %allmergemodulefilesequences = ();
- %newupdatefiles = ();
- %allusedupdatesequences = ();
- %mergemodulefiles = ();
$mergefiles_added_into_collector = 0;
$creating_windows_installer_patch = 0;
$strip = 1;
$globallogging = 0;
- $globalloggingform21 = 1;
$logfilename = "logfile.log"; # the default logfile name for global errors
# @logfileinfo = ();
# @errorlogfileinfo = ();
@@ -273,7 +263,6 @@ BEGIN
$isopensourceproduct = 1;
$manufacturer = "";
$longmanufacturer = "";
- $sundirname = "Oracle";
$codefilename = "codes.txt";
$componentfilename = "components.txt";
$productcode = "";
@@ -292,7 +281,6 @@ BEGIN
$pwfile = "";
$pfxfile = "";
- %mergemodules = ();
%merge_media_line = ();
%merge_allfeature_hash = ();
%merge_alldirectory_hash = ();
@@ -375,7 +363,6 @@ BEGIN
@pcfdiffcomment = ();
@epmdifflist = ();
$desktoplinkexists = 0;
- $sundirexists = 0;
$analyze_spellcheckerlanguage = 0;
%spellcheckerlanguagehash = ();
%spellcheckerfilehash = ();
@@ -403,11 +390,8 @@ BEGIN
$officedirhostname = "";
$basisdirhostname = "";
$uredirhostname = "";
- $sundirhostname = "";
$officedirgid = "";
$basisdirgid = "";
- $uredirgid = "";
- $sundirgid = "";
%sign_extensions = ("dll" => "1", "exe" => "1", "cab" => "1");
%treestyles = ();
@@ -418,13 +402,10 @@ BEGIN
%usedtreeconditions = ();
%moduledestination = ();
- $one_cab_file = 0;
$fix_number_of_cab_files = 1;
- $cab_file_per_component = 0;
$cabfilecompressionlevel = 2;
$number_of_cabfiles = 1; # only for $fix_number_of_cab_files = 1
$include_cab_in_msi = 0;
- $use_packages_for_cabs = 0;
$msidatabasename = "";
$prepare_winpatch = 0;
$previous_idt_dir = "";
@@ -451,7 +432,6 @@ BEGIN
$postprocess_specialepm = 0;
$postprocess_standardepm = 0;
- $mergemodules_analyzed = 0;
$starttime = "";
diff --git a/solenv/bin/modules/installer/languages.pm b/solenv/bin/modules/installer/languages.pm
index d184ff7f66ee..030956d0c529 100644
--- a/solenv/bin/modules/installer/languages.pm
+++ b/solenv/bin/modules/installer/languages.pm
@@ -30,31 +30,46 @@ use installer::globals;
use installer::remover;
use installer::ziplist;
-#############################################################################
-# Analyzing the laguage list parameter and language list from zip list file
-#############################################################################
+=head2 analyze_languagelist()
-sub analyze_languagelist
-{
- my $first = $installer::globals::languagelist;
+ Convert $installer::globals::languagelist into $installer::globals::languageproduct.
+
+ That is now just a replacement of '_' with ','.
+
+ $installer::globals::languageproduct (specified by the -l option
+ on the command line) can contain multiple languages separated by
+ '_' to specify multilingual builds.
- $first =~ s/\_/\,/g; # substituting "_" by ",", in case of dmake definition 01_49
+ Separation by '#' to build multiple languages (single or
+ multilingual) in one make_installer.pl run is not supported
+ anymore. Call make_installer.pl with all languages separately instead:
+ make_installer.pl -l L1#L2
+ ->
+ make_installer.pl -l L1
+ make_installer.pl -l L2
- # Products are separated by a "#", if defined in zip-list by a "|". But "get_info_about_languages"
- # substitutes already "|" to "#". This procedure only knows "#" as product separator.
- # Different languages for one product are separated by ",". But on the command line the "_" is used.
- # Therefore "_" is replaced by "," at the beginning of this procedure.
+=cut
+sub analyze_languagelist()
+{
+ my $languageproduct = $installer::globals::languagelist;
+
+ $languageproduct =~ s/\_/\,/g; # substituting "_" by ",", in case of dmake definition 01_49
- while ($first =~ /^(\S+)\#(\S+?)$/) # Minimal matching, to keep the order of languages
+ if ($languageproduct =~ /\#/)
{
- $first = $1;
- my $last = $2;
- unshift(@installer::globals::languageproducts, $last);
+ installer::exiter::exit_program(
+ "building more than one language (or language set) is not supported anymore\n"
+ ."please replace one call of 'make_installer.pl -l language1#language2'\n"
+ ."with two calls 'make_installer.pl -l language1' and 'make_installer.pl -l language2'",
+ "installer::language::analyze_languagelist");
}
- unshift(@installer::globals::languageproducts, $first);
+ $installer::globals::languageproduct = $languageproduct;
}
+
+
+
####################################################
# Reading languages from zip list file
####################################################
diff --git a/solenv/bin/modules/installer/parameter.pm b/solenv/bin/modules/installer/parameter.pm
index faa3cc1fde2a..eb4209b82c7d 100644
--- a/solenv/bin/modules/installer/parameter.pm
+++ b/solenv/bin/modules/installer/parameter.pm
@@ -618,8 +618,7 @@ sub outputparameter ()
else { push(@output, "Not unzipping ARCHIVE files\n"); }
if (!($installer::globals::languages_defined_in_productlist))
{
- push(@output, "Languages:\n");
- foreach my $element (@installer::globals::languageproducts) { push(@output, "\t$element\n"); }
+ push(@output, sprintf("Languages: %s\n", $installer::globals::languageproduct));
}
else
{
diff --git a/solenv/bin/modules/installer/patch/FileOperations.pm b/solenv/bin/modules/installer/patch/FileOperations.pm
new file mode 100644
index 000000000000..931db2eca654
--- /dev/null
+++ b/solenv/bin/modules/installer/patch/FileOperations.pm
@@ -0,0 +1,333 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+package installer::patch::FileOperations;
+
+use File::Basename;
+use File::Copy;
+use IO::Compress::Bzip2;
+use IO::Uncompress::Bunzip2;
+
+my $CompressionMethod = "bzip2";
+
+
+=head1 NAME
+
+ package installer::patch::FileOperations - Class for collecting, checking and executing file operations.
+
+=cut
+
+
+sub new ($)
+{
+ my ($class) = (@_);
+
+ my $self = {
+ 'operations' => []
+ };
+ bless($self, $class);
+
+ return $self;
+}
+
+
+
+
+sub AddCopyOperation ($$$)
+{
+ my ($self, $source_name, $target_name) = @_;
+
+ push
+ @{$self->{'operations'}},
+ [
+ 'copy',
+ $source_name,
+ $target_name
+ ];
+}
+
+
+
+
+sub AddMakeDirectoryOperation ($$)
+{
+ my ($self, $path) = @_;
+
+ push
+ @{$self->{'operations'}},
+ [
+ 'mkdir',
+ $path
+ ];
+}
+
+
+
+
+sub AddCompressOperation ($$)
+{
+ my ($self, $filename) = @_;
+
+ push
+ @{$self->{'operations'}},
+ [
+ 'compress',
+ $filename
+ ];
+}
+
+
+
+
+sub AddUncompressOperation ($$$)
+{
+ my ($self, $source_name, $target_name) = @_;
+
+ push
+ @{$self->{'operations'}},
+ [
+ 'uncompress',
+ $source_name,
+ $target_name
+ ];
+}
+
+
+
+
+sub Check ($)
+{
+ my ($self) = @_;
+
+ # Keep track of which directories or files would be created to check if
+ # operations that depend on these files will succeed.
+ my %files = ();
+ my %directories = ();
+
+ my @error_messages = ();
+ foreach my $operation (@{$self->{'operations'}})
+ {
+ my $command = $operation->[0];
+
+ if ($command eq "copy")
+ {
+ my ($source_name, $destination_name) = ($operation->[1], $operation->[2]);
+ if ( ! -f $source_name)
+ {
+ push @error_messages, sprintf("%s is not a regular file and can not be copied", $source_name);
+ }
+ my $destination_path = dirname($destination_name);
+ if ( ! -d $destination_path && ! defined $directories{$destination_path})
+ {
+ push @error_messages, sprintf("destination path %s does not exist", $destination_path);
+ }
+ if ( -f $destination_name)
+ {
+ # The destination file already exists. We have to overwrite it.
+ if ( ! -w $destination_name)
+ {
+ push @error_messges, sprintf("destination file %s exists but can not be overwritten", $destination_name);
+ }
+ }
+ $files{$destination_name} = 1;
+ }
+ elsif ($command eq "mkdir")
+ {
+ my $path = $operation->[1];
+ if ( -d $path)
+ {
+ # Directory already exists. That is OK, the mkdir command will be silently ignored.
+ }
+ else
+ {
+ $directories{$path} = 1;
+ }
+ }
+ elsif ($command eq "compress")
+ {
+ my $filename = $operation->[1];
+ if ( ! -f $filename && ! defined $files{$filename})
+ {
+ # File does not exist and will not be created by an earlier operation.
+ push @error_messages, sprintf("file %s does not exist and can not be compressed", $filename);
+ }
+ }
+ elsif ($command eq "uncompress")
+ {
+ my ($source_filename, $destination_filename) = ($operation->[1], $operation->[2]);
+ if ($CompressionMethod eq "bzip2")
+ {
+ $source_filename .= ".bz2";
+ }
+ if ( ! -f $source_filename && ! defined $files{$source_filename})
+ {
+ # File does not exist and will not be created by an earlier operation.
+ push @error_messages, sprintf("file %s does not exist and can not be decompressed", $source_filename);
+ }
+ if ( -f $destination_filename && ! -w $destination_filename)
+ {
+ # Destination file aleady exists but can not be replaced.
+ push @error_messages, sprintf("compress destination file %s exists but can not be replaced", $destination_filename);
+ }
+ }
+ else
+ {
+ push @error_messages, sprintf("unknown operation %s", $command);
+ }
+ }
+
+ return @error_messages;
+}
+
+
+
+
+sub CheckAndExecute ($)
+{
+ my ($self) = @_;
+
+ my @error_messages = $self->Check();
+ if (scalar @error_messages > 0)
+ {
+ $installer::logger::Lang->printf("can not execute all operations:\n");
+ for my $message (@error_messages)
+ {
+ $installer::logger::Lang->printf("ERROR: %s\n", $message);
+ }
+ return 0;
+ }
+ else
+ {
+ return $self->Execute();
+ }
+}
+
+
+
+
+sub Execute ($)
+{
+ my ($self) = @_;
+
+ foreach my $operation (@{$self->{'operations'}})
+ {
+ my $command = $operation->[0];
+
+ if ($command eq "copy")
+ {
+ my ($source_name, $destination_name) = ($operation->[1], $operation->[2]);
+ $installer::logger::Lang->printf("copy from %s\n to %s\n", $source_name, $destination_name);
+ if ( ! $DryRun)
+ {
+ my $result = copy($source_name, $destination_name);
+ if ( ! $result)
+ {
+ $installer::logger::Lang->printf("ERROR: copying from %s to %s failed",
+ $source_name, $destination_name);
+ }
+ }
+ }
+ elsif ($command eq "mkdir")
+ {
+ my $path = $operation->[1];
+ if ( -d $path)
+ {
+ # Path exists already. Do nothing.
+ }
+ else
+ {
+ $installer::logger::Lang->printf("creating directory %s\n", $path);
+ if ( ! $DryRun)
+ {
+ if (File::Path::make_path($path, {'mode' => 0775}) == 0)
+ {
+ $installer::logger::Lang->printf("could not create directory %s\n", $path);
+ }
+ }
+ }
+ }
+ elsif ($command eq "compress")
+ {
+ my $filename = $operation->[1];
+ $installer::logger::Lang->printf("compressing %s\n", $filename);
+ if ( ! $DryRun)
+ {
+ my $result = 0;
+ if ($CompressionMethod eq "bzip2")
+ {
+ $result = IO::Compress::Bzip2::bzip2($filename => $filename.".bz2");
+ }
+ if ($result == 0)
+ {
+ $installer::logger::Lang->printf("ERROR: could not compress %s\n", $filename);
+ }
+ else
+ {
+ unlink($filename);
+ }
+ }
+ }
+ elsif ($command eq "uncompress")
+ {
+ my ($source_name, $destination_name) = ($operation->[1], $operation->[2]);
+ if ($CompressionMethod eq "bzip2")
+ {
+ $source_name .= ".bz2";
+ }
+ $installer::logger::Lang->printf("uncompressing %s to %s\n", $source_name, $destination_name);
+
+ my $destination_base_name = basename($destination_name);
+
+ if ( ! $DryRun)
+ {
+ my $result = 0;
+ if ($CompressionMethod eq "bzip2")
+ {
+ $result = IO::Uncompress::Bunzip2::bunzip2($source_name => $destination_name);
+ }
+ if ($result == 0)
+ {
+ $installer::logger::Lang->printf("ERROR: failed to extract content of '%s' from '%s'\n",
+ $destination_name, $source_name);
+ return 0;
+ }
+ }
+ }
+
+ else
+ {
+ die "unknown operation $command\n";
+ }
+ }
+
+ return 1;
+}
+
+
+
+sub GetOperationCount ($)
+{
+ my ($self) = @_;
+ return scalar @{$self->{'operations'}};
+}
+
+
+1;
diff --git a/solenv/bin/modules/installer/patch/FileSequenceList.pm b/solenv/bin/modules/installer/patch/FileSequenceList.pm
new file mode 100644
index 000000000000..6c607d8314e8
--- /dev/null
+++ b/solenv/bin/modules/installer/patch/FileSequenceList.pm
@@ -0,0 +1,159 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+package installer::patch::FileSequenceList;
+
+use XML::LibXML;
+use strict;
+
+=head1 NAME
+
+ FileSequenceList.pm - Class for retrieving and processing the 'Sequence' values of the MSI 'File' table.
+
+=cut
+
+=head2 new($class)
+
+ Create a new FileSequenceList object.
+
+=cut
+sub new ($)
+{
+ my ($class) = @_;
+
+ my $self = {
+ 'data' => undef
+ };
+ bless($self, $class);
+
+ return $self;
+}
+
+
+
+
+sub SetFromFileList ($$)
+{
+ my ($self, $files) = @_;
+
+ my %data = map {$_->{'uniquename'} => $_->{'sequencenumber'}} @$files;
+ $self->{'data'} = \%data;
+}
+
+
+
+
+sub SetFromMap ($$)
+{
+ my ($self, $map) = @_;
+
+ $self->{'data'} = $map;
+}
+
+
+
+
+sub GetFileCount ($)
+{
+ my ($self) = @_;
+
+ return scalar keys %{$self->{'data'}};
+}
+
+
+
+
+=head2 GetSequenceNumbers ($files)
+
+ $files is a hash that maps unique file names (File->File) to sequence
+ numbers (File->Sequence). The later is (expected to be) initially unset and
+ is set in this method.
+
+ For new files -- entries in the given $files that do not exist in the 'data'
+ member -- no sequence numbers are defined.
+
+ When there are removed files -- entries in the 'data' member that do not
+ exist in the given $files -- then a list of these files is returned. In
+ that case the given $files remain unmodified.
+
+ The returned list is empty when everyting is OK.
+
+=cut
+sub GetSequenceNumbers ($$)
+{
+ my ($self, $files) = @_;
+
+ # Check if files have been removed.
+ my @missing = ();
+ foreach my $name (keys %{$self->{'data'}})
+ {
+ if ( ! defined $files->{$name})
+ {
+ push @missing, $name;
+ }
+ }
+ if (scalar @missing > 0)
+ {
+ # Yes. Return the names of the removed files.
+ return @missing;
+ }
+
+ # No files where removed. Set the sequence numbers.
+ foreach my $name (keys %$files)
+ {
+ $files->{$name} = $self->{'data'}->{$name};
+ }
+ return ();
+}
+
+
+
+
+sub GetDifference ($$)
+{
+ my ($self, $other) = @_;
+
+ # Create maps for easy reference.
+ my (@files_in_both, @files_in_self, @files_in_other);
+ foreach my $name (keys %{$self->{'data'}})
+ {
+ if (defined $other->{'data'}->{$name})
+ {
+ push @files_in_both, $name;
+ }
+ else
+ {
+ push @files_in_self, $name;
+ }
+ }
+ foreach my $name (keys %{$self->{'data'}})
+ {
+ if ( ! defined $self->{'data'}->{$name})
+ {
+ push @files_in_other, $name;
+ }
+ }
+
+ return (\@files_in_both, \@files_in_self, \@files_in_other);
+}
+
+
+1;
diff --git a/solenv/bin/modules/installer/patch/InstallationSet.pm b/solenv/bin/modules/installer/patch/InstallationSet.pm
new file mode 100644
index 000000000000..67ff1fe4e0b7
--- /dev/null
+++ b/solenv/bin/modules/installer/patch/InstallationSet.pm
@@ -0,0 +1,467 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+package installer::patch::InstallationSet;
+
+use installer::patch::Tools;
+use installer::patch::Version;
+use installer::logger;
+
+
+my $Unpacker = "/c/Program\\ Files/7-Zip/7z.exe";
+
+=head1 NAME
+
+ package installer::patch::InstallationSet - Functions for handling installation sets
+
+=head1 DESCRIPTION
+
+ This package contains functions for unpacking the .exe files that
+ are created by the NSIS installer creator and the .cab files in
+ the installation sets.
+
+=cut
+
+sub UnpackExe ($$)
+{
+ my ($filename, $destination_path) = @_;
+
+ $installer::logger::Info->printf("unpacking installation set to '%s'\n", $destination_path);
+
+ # Unpack to a temporary path and change its name to the destination path
+ # only when the unpacking has completed successfully.
+ my $temporary_destination_path = $destination_path . ".tmp";
+ File::Path::make_path($temporary_destination_path);
+
+ my $windows_filename = installer::patch::Tools::CygpathToWindows($filename);
+ my $windows_destination_path = installer::patch::Tools::CygpathToWindows($temporary_destination_path);
+ my $command = join(" ",
+ $Unpacker,
+ "x", "-o".$windows_destination_path,
+ $windows_filename);
+ my $result = qx($command);
+
+ # Check the existence of the .cab files.
+ my $cab_filename = File::Spec->catfile($temporary_destination_path, "openoffice1.cab");
+ if ( ! -f $cab_filename)
+ {
+ installer::logger::PrintError("cab file '%s' was not extracted from installation set\n", $cab_filename);
+ return 0;
+ }
+ if (rename($temporary_destination_path, $destination_path) == 0)
+ {
+ installer::logger::PrintError("can not rename temporary extraction directory\n");
+ return 0;
+ }
+ return 1;
+}
+
+
+
+
+=head2 UnpackCab($cab_filename, $destination_path)
+
+ Unpacking the cabinet file inside an .exe installation set is a
+ three step process because there is no directory information stored
+ inside the cab file. This has to be taken from the 'File' and
+ 'Directory' tables in the .msi file.
+
+ 1. Setup the directory structure of all files in the cab from the 'File' and 'Directory' tables in the msi.
+
+ 2. Unpack the cab file.
+
+ 3. Move the files to their destination directories.
+
+=cut
+sub UnpackCab ($$$)
+{
+ my ($cab_filename, $msi, $destination_path) = @_;
+
+ # Step 1
+ # Extract the directory structure from the 'File' and 'Directory' tables in the given msi.
+ $installer::logger::Info->printf("setting up directory tree\n");
+ my $file_table = $msi->GetTable("File");
+ my $file_to_directory_map = $msi->GetFileToDirectoryMap();
+
+ # Step 2
+ # Unpack the .cab file to a temporary path.
+ my $temporary_destination_path = $destination_path . ".tmp";
+ if ( -d $temporary_destination_path)
+ {
+ # Temporary directory already exists => cab file has already been unpacked (flat), nothing to do.
+ $installer::logger::Info->printf("cab file has already been unpacked to flat structure\n");
+ }
+ else
+ {
+ UnpackCabFlat($cab_filename, $temporary_destination_path, $file_table);
+ }
+
+ # Step 3
+ # Move the files to their destinations.
+ File::Path::make_path($destination_path);
+ $installer::logger::Info->printf("moving files to their directories\n");
+ my $count = 0;
+ foreach my $file_row (@{$file_table->GetAllRows()})
+ {
+ my $unique_name = $file_row->GetValue('File');
+ my $directory_full_names = $file_to_directory_map->{$unique_name};
+ my ($source_full_name, $target_full_name) = @$directory_full_names;
+
+ my $flat_filename = File::Spec->catfile($temporary_destination_path, $unique_name);
+ my $dir_path = File::Spec->catfile($destination_path, $source_full_name);
+ my $dir_filename = File::Spec->catfile($dir_path, $unique_name);
+
+ printf("%d: making path %s and copying %s to %s\n",
+ $count,
+ $dir_path,
+ $unique_name,
+ $dir_filename);
+ File::Path::make_path($dir_path);
+ File::Copy::move($flat_filename, $dir_filename);
+
+ ++$count;
+ }
+
+ # Cleanup. Remove the temporary directory. It should be empty by now.
+ rmdir($temporary_destination_path);
+}
+
+
+
+
+=head2 UnpackCabFlat ($cab_filename, $destination_path, $file_table)
+
+ Unpack the flat file structure of the $cab_filename to $destination_path.
+
+ In order to detect and handle an incomplete (arborted) previous
+ extraction, the cab file is unpacked to a temprorary directory
+ that after successful extraction is renamed to $destination_path.
+
+=cut
+sub UnpackCabFlat ($$$)
+{
+ my ($cab_filename, $destination_path, $file_table) = @_;
+
+ # Unpack the .cab file to a temporary path (note that
+ # $destination_path may alreay bee a temporary path). Using a
+ # second one prevents the lengthy flat unpacking to be repeated
+ # when another step fails.
+
+ $installer::logger::Info->printf("unpacking cab file\n");
+ my $temporary_destination_path = $destination_path . ".tmp";
+ File::Path::make_path($temporary_destination_path);
+ my $windows_cab_filename = installer::patch::Tools::CygpathToWindows($cab_filename);
+ my $windows_destination_path = installer::patch::Tools::CygpathToWindows($temporary_destination_path);
+ my $command = join(" ",
+ $Unpacker,
+ "x", "-o".$windows_destination_path,
+ $windows_cab_filename,
+ "-y");
+ printf("running command '%s'\n", $command);
+ open my $cmd, $command."|";
+ my $extraction_count = 0;
+ my $file_count = $file_table->GetRowCount();
+ while (<$cmd>)
+ {
+ my $message = $_;
+ chomp($message);
+ ++$extraction_count;
+ printf("%4d/%4d %3.2f%% \r",
+ $extraction_count,
+ $file_count,
+ $extraction_count*100/$file_count);
+ }
+ close $cmd;
+ printf("extraction done \n");
+
+ rename($temporary_destination_path, $destination_path)
+ || installer::logger::PrintError(
+ "can not rename the temporary directory '%s' to '%s'\n",
+ $temporary_destination_path,
+ $destination_path);
+}
+
+
+
+
+=head GetUnpackedMsiPath ($version, $language, $package_format, $product)
+
+ Convenience function that returns where a downloadable installation set is extracted to.
+
+=cut
+sub GetUnpackedMsiPath ($$$$)
+{
+ my ($version, $language, $package_format, $product) = @_;
+
+ return File::Spec->catfile(
+ GetUnpackedPath($version, $language, $package_format, $product),
+ "unpacked_msi");
+}
+
+
+
+
+=head GetUnpackedCabPath ($version, $language, $package_format, $product)
+
+ Convenience function that returns where a cab file is extracted
+ (with injected directory structure from the msi file) to.
+
+=cut
+sub GetUnpackedCabPath ($$$$)
+{
+ my ($version, $language, $package_format, $product) = @_;
+
+ return File::Spec->catfile(
+ GetUnpackedPath($version, $language, $package_format, $product),
+ "unpacked_cab");
+}
+
+
+
+
+=head2 GetUnpackedPath($version, $language, $package_format, $product)
+
+ Internal function for creating paths to where archives are unpacked.
+
+=cut
+sub GetUnpackedPath ($$$$)
+{
+ my ($version, $language, $package_format, $product) = @_;
+
+ return File::Spec->catfile(
+ $ENV{'SRC_ROOT'},
+ "instsetoo_native",
+ $ENV{'INPATH'},
+ $product,
+ $package_format,
+ installer::patch::Version::ArrayToDirectoryName(installer::patch::Version::StringToNumberArray($version)),
+ $language);
+}
+
+
+
+
+=head2 Download($language, $release_data, $filename)
+
+ Download an installation set to $filename. The URL for the
+ download is taken from $release_data, a snippet from the
+ instsetoo_native/data/releases.xml file.
+
+=cut
+sub Download ($$$)
+{
+ my ($language, $release_data, $filename) = @_;
+
+ my $url = $release_data->{'URL'};
+ $release_data->{'URL'} =~ /^(.*)\/([^\/]+)$/;
+ my ($location, $basename) = ($1,$2);
+
+ $installer::logger::Info->printf("downloading %s\n", $basename);
+ $installer::logger::Info->printf(" from '%s'\n", $location);
+ my $filesize = $release_data->{'file-size'};
+ $installer::logger::Info->printf(" expected size is %d\n", $filesize);
+ my $temporary_filename = $filename . ".part";
+ my $resume_size = 0;
+ if ( -f $temporary_filename)
+ {
+ $resume_size = -s $temporary_filename;
+ $installer::logger::Info->printf(" trying to resume at %d/%d bytes\n", $resume_size, $filesize);
+ }
+
+ # Prepare checksum.
+ my $checksum = undef;
+ my $checksum_type = $release_data->{'checksum-type'};
+ my $checksum_value = $release_data->{'checksum-value'};
+ my $digest = undef;
+ if ($checksum_type eq "sha256")
+ {
+ $digest = Digest->new("SHA-256");
+ }
+ elsif ($checksum_type eq "md5")
+ {
+ $digest = Digest->new("md5");
+ }
+ else
+ {
+ installer::logger::PrintError(
+ "checksum type %s is not supported. Supported checksum types are: sha256,md5\n",
+ $checksum_type);
+ return 0;
+ }
+
+ # Download the extension.
+ open my $out, ">>$temporary_filename";
+ binmode($out);
+
+ my $mode = $|;
+ my $handle = select STDOUT;
+ $| = 1;
+ select $handle;
+
+ my $agent = LWP::UserAgent->new();
+ $agent->timeout(120);
+ $agent->show_progress(0);
+ my $last_was_redirect = 0;
+ my $bytes_read = 0;
+ $agent->add_handler('response_redirect'
+ => sub{
+ $last_was_redirect = 1;
+ return;
+ });
+ $agent->add_handler('response_data'
+ => sub{
+ if ($last_was_redirect)
+ {
+ $last_was_redirect = 0;
+ # Throw away the data we got so far.
+ $digest->reset();
+ close $out;
+ open $out, ">$temporary_filename";
+ binmode($out);
+ }
+ my($response,$agent,$h,$data)=@_;
+ print $out $data;
+ $digest->add($data);
+ $bytes_read += length($data);
+ printf("read %*d / %d %d%% \r",
+ length($filesize),
+ $bytes_read,
+ $filesize,
+ $bytes_read*100/$filesize);
+ });
+ my $response;
+ if ($resume_size > 0)
+ {
+ $response = $agent->get($url, 'Range' => "bytes=$resume_size-");
+ }
+ else
+ {
+ $response = $agent->get($url);
+ }
+ close $out;
+
+ $handle = select STDOUT;
+ $| = $mode;
+ select $handle;
+
+ $installer::logger::Info->print(" \r");
+
+ if ($response->is_success())
+ {
+ if ($digest->hexdigest() eq $checksum_value)
+ {
+ $installer::logger::Info->PrintInfo("download was successfull\n");
+ if ( ! rename($temporary_filename, $filename))
+ {
+ installer::logger::PrintError("can not rename '%s' to '%s'\n", $temporary_filename, $filename);
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+ }
+ else
+ {
+ installer::logger::PrintError("%s checksum is wrong\n", $checksum_type);
+ return 0;
+ }
+ }
+ else
+ {
+ installer::logger::PrintError("there was a download error\n");
+ return 0;
+ }
+}
+
+
+
+
+=head2 ProvideDownloadSet ($version, $language, $package_format)
+
+ Download an installation set when it is not yet present to
+ $ENV{'TARFILE_LOCATION'}. Verify the downloaded file with the
+ checksum that is extracted from the
+ instsetoo_native/data/releases.xml file.
+
+=cut
+sub ProvideDownloadSet ($$$)
+{
+ my ($version, $language, $package_format) = @_;
+
+ my $release_item = installer::patch::ReleasesList::Instance()->{$version}->{$package_format}->{$language};
+
+ # Get basename of installation set from URL.
+ $release_item->{'URL'} =~ /^(.*)\/([^\/]+)$/;
+ my ($location, $basename) = ($1,$2);
+
+ # Is the installation set already present in ext_sources/ ?
+ my $need_download = 0;
+ my $ext_sources_filename = File::Spec->catfile(
+ $ENV{'TARFILE_LOCATION'},
+ $basename);
+ if ( ! -f $ext_sources_filename)
+ {
+ $installer::logger::Info->printf("download set is not in ext_sources/ (%s)\n", $ext_sources_filename);
+ $need_download = 1;
+ }
+ else
+ {
+ $installer::logger::Info->printf("download set exists at '%s'\n", $ext_sources_filename);
+ if ($release_item->{'checksum-type'} eq 'sha256')
+ {
+ $installer::logger::Info->printf("checking SHA256 checksum\n");
+ my $digest = Digest->new("SHA-256");
+ open my $in, "<", $ext_sources_filename;
+ $digest->addfile($in);
+ close $in;
+ if ($digest->hexdigest() ne $release_item->{'checksum-value'})
+ {
+ $installer::logger::Info->printf(" mismatch\n", $ext_sources_filename);
+ $need_download = 1;
+ }
+ else
+ {
+ $installer::logger::Info->printf(" match\n");
+ }
+ }
+ }
+
+ if ($need_download)
+ {
+ if ( ! installer::patch::InstallationSet::Download(
+ $language,
+ $release_item,
+ $ext_sources_filename))
+ {
+ return 0;
+ }
+ if ( ! -f $ext_sources_filename)
+ {
+ $installer::logger::Info->printf("download set could not be downloaded\n");
+ return 0;
+ }
+ }
+
+ return $ext_sources_filename;
+}
+
+1;
diff --git a/solenv/bin/modules/installer/patch/Msi.pm b/solenv/bin/modules/installer/patch/Msi.pm
new file mode 100644
index 000000000000..c5c650a82c47
--- /dev/null
+++ b/solenv/bin/modules/installer/patch/Msi.pm
@@ -0,0 +1,342 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+package installer::patch::Msi;
+
+use installer::patch::MsiTable;
+use installer::patch::Tools;
+use strict;
+
+
+=head1 NAME
+
+ package installer::patch::Msi - Class represents a single MSI file and gives access to its tables.
+
+=cut
+
+
+
+=head2 new($class, $version, $language, $product_name)
+
+ Create a new object of the Msi class. The values of $version, $language, and $product_name define
+ where to look for the msi file.
+
+ If construction fails then IsValid() will return false.
+
+=cut
+sub new ($$$$)
+{
+ my ($class, $version, $language, $product_name) = @_;
+
+ my $path = installer::patch::InstallationSet::GetUnpackedMsiPath(
+ $version,
+ $language,
+ "msi",
+ $product_name);
+
+ # Find the msi in the path.
+ my $filename = undef;
+ if ( -d $path)
+ {
+ my @msi_files = glob(File::Spec->catfile($path, "*.msi"));
+ if (scalar @msi_files != 1)
+ {
+ printf STDERR ("there are %d msi files in %s, should be 1", scalar @msi_files, $filename);
+ $filename = "";
+ }
+ else
+ {
+ $filename = $msi_files[0];
+ }
+ }
+ else
+ {
+ installer::logger::PrintError("can not access path '%s' to find msi\n", $path);
+ return undef;
+ }
+
+ if ( ! -f $filename)
+ {
+ installer::logger::PrintError("can not access MSI file at '%s'\n", $filename);
+ return undef;
+ }
+
+ my $self = {
+ 'filename' => $filename,
+ 'path' => $path,
+ 'version' => $version,
+ 'language' => $language,
+ 'package_format' => "msi",
+ 'product_name' => $product_name,
+ 'tmpdir' => File::Temp->newdir(CLEANUP => 1),
+ 'is_valid' => -f $filename
+ };
+ bless($self, $class);
+
+ return $self;
+}
+
+
+
+
+sub IsValid ($)
+{
+ my ($self) = @_;
+
+ return $self->{'is_valid'};
+}
+
+
+
+
+=head2 GetTable($seld, $table_name)
+
+ Return an MsiTable object for $table_name. Table objects are kept
+ alive for the life time of the Msi object. Therefore the second
+ call for the same table is very cheap.
+
+=cut
+sub GetTable ($$)
+{
+ my ($self, $table_name) = @_;
+
+ my $table = $self->{'tables'}->{$table_name};
+ if ( ! defined $table)
+ {
+ my $table_filename = File::Spec->catfile($self->{'tmpdir'}, $table_name .".idt");
+ if ( ! -f $table_filename
+ || ! EnsureAYoungerThanB($table_filename, $self->{'fullname'}))
+ {
+ # Extract table from database to text file on disk.
+ my $truncated_table_name = length($table_name)>8 ? substr($table_name,0,8) : $table_name;
+ my $command = join(" ",
+ "msidb.exe",
+ "-d", installer::patch::Tools::CygpathToWindows($self->{'filename'}),
+ "-f", installer::patch::Tools::CygpathToWindows($self->{'tmpdir'}),
+ "-e", $table_name);
+ my $result = qx($command);
+ print $result;
+ }
+
+ # Read table into memory.
+ $table = new installer::patch::MsiTable($table_filename, $table_name);
+ $self->{'tables'}->{$table_name} = $table;
+ }
+
+ return $table;
+}
+
+
+
+
+=head2 EnsureAYoungerThanB ($filename_a, $filename_b)
+
+ Internal function (not a method) that compares to files according
+ to their last modification times (mtime).
+
+=cut
+sub EnsureAYoungerThanB ($$)
+{
+ my ($filename_a, $filename_b) = @_;
+
+ die("file $filename_a does not exist") unless -f $filename_a;
+ die("file $filename_b does not exist") unless -f $filename_b;
+
+ my @stat_a = stat($filename_a);
+ my @stat_b = stat($filename_b);
+
+ if ($stat_a[9] <= $stat_b[9])
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+
+
+
+
+=head2 SplitLongShortName($name)
+
+ Split $name (typically from the 'FileName' column in the 'File'
+ table or 'DefaultDir' column in the 'Directory' table) at the '|'
+ into short (8.3) and long names. If there is no '|' in $name then
+ $name is returned as both short and long name.
+
+ Returns long and short name (in this order) as array.
+
+=cut
+sub SplitLongShortName ($)
+{
+ my ($name) = @_;
+
+ if ($name =~ /^([^\|]*)\|(.*)$/)
+ {
+ return ($2,$1);
+ }
+ else
+ {
+ return ($name,$name);
+ }
+}
+
+
+
+=head2 SplitTargetSourceLongShortName ($name)
+
+ Split $name first at the ':' into target and source parts and each
+ of those at the '|'s into long and short parts. Names that follow
+ this pattern come from the 'DefaultDir' column in the 'Directory'
+ table.
+
+=cut
+sub SplitTargetSourceLongShortName ($)
+{
+ my ($name) = @_;
+
+ if ($name =~ /^([^:]*):(.*)$/)
+ {
+ return (installer::patch::Msi::SplitLongShortName($1), installer::patch::Msi::SplitLongShortName($2));
+ }
+ else
+ {
+ my ($long,$short) = installer::patch::Msi::SplitLongShortName($name);
+ return ($long,$short,$long,$short);
+ }
+}
+
+
+
+
+=head2 GetFileToDirectoryMap ($)
+
+ Return a map (hash) that maps the unique name (column 'File' in
+ the 'File' table) to its directory names. Each value is a
+ reference to an array of two elements: the source path and the
+ target path.
+
+ The map is kept alive for the lifetime of the Msi object. All
+ calls but the first are cheap.
+
+=cut
+sub GetFileToDirectoryMap ($)
+{
+ my ($self) = @_;
+
+ if (defined $self->{'FileToDirectoryMap'})
+ {
+ return $self->{'FileToDirectoryMap'};
+ }
+
+ my $file_table = $self->GetTable("File");
+ my $directory_table = $self->GetTable("Directory");
+ my $component_table = $self->GetTable("Component");
+ $installer::logger::Info->printf("got access to tables File, Directory, Component\n");
+
+ my %dir_map = ();
+ foreach my $row (@{$directory_table->GetAllRows()})
+ {
+ my ($target_name, undef, $source_name, undef)
+ = installer::patch::Msi::SplitTargetSourceLongShortName($row->GetValue("DefaultDir"));
+ $dir_map{$row->GetValue("Directory")} = {
+ 'parent' => $row->GetValue("Directory_Parent"),
+ 'source_name' => $source_name,
+ 'target_name' => $target_name};
+ }
+
+ # Set up full names for all directories.
+ my @todo = map {$_} (keys %dir_map);
+ my $process_count = 0;
+ my $push_count = 0;
+ while (scalar @todo > 0)
+ {
+ ++$process_count;
+
+ my $key = shift @todo;
+ my $item = $dir_map{$key};
+ next if defined $item->{'full_source_name'};
+
+ if ($item->{'parent'} eq "")
+ {
+ # Directory has no parent => full names are the same as the name.
+ $item->{'full_source_name'} = $item->{'source_name'};
+ $item->{'full_target_name'} = $item->{'target_name'};
+ }
+ else
+ {
+ my $parent = $dir_map{$item->{'parent'}};
+ if ( defined $parent->{'full_source_name'})
+ {
+ # Parent aleady has full names => we can create the full name of the current item.
+ $item->{'full_source_name'} = $parent->{'full_source_name'} . "/" . $item->{'source_name'};
+ $item->{'full_target_name'} = $parent->{'full_target_name'} . "/" . $item->{'target_name'};
+ }
+ else
+ {
+ # Parent has to be processed before the current item can be processed.
+ # Push both to the head of the list.
+ unshift @todo, $key;
+ unshift @todo, $item->{'parent'};
+
+ ++$push_count;
+ }
+ }
+ }
+
+ foreach my $key (keys %dir_map)
+ {
+ $dir_map{$key}->{'full_source_name'} =~ s/\/(\.\/)+/\//g;
+ $dir_map{$key}->{'full_source_name'} =~ s/^SourceDir\///;
+ $dir_map{$key}->{'full_target_name'} =~ s/\/(\.\/)+/\//g;
+ $dir_map{$key}->{'full_target_name'} =~ s/^SourceDir\///;
+ }
+ $installer::logger::Info->printf("for %d directories there where %d processing steps and %d pushes\n",
+ $directory_table->GetRowCount(),
+ $process_count,
+ $push_count);
+
+ # Setup a map from component names to directory items.
+ my %component_to_directory_map = map {$_->GetValue('Component') => $_->GetValue('Directory_')} @{$component_table->GetAllRows()};
+
+ # Finally, create the map from files to directories.
+ my $map = {};
+ my $file_component_index = $file_table->GetColumnIndex("Component_");
+ my $file_file_index = $file_table->GetColumnIndex("File");
+ foreach my $file_row (@{$file_table->GetAllRows()})
+ {
+ my $component_name = $file_row->GetValue($file_component_index);
+ my $directory_name = $component_to_directory_map{$component_name};
+ my $dir_item = $dir_map{$directory_name};
+ my $unique_name = $file_row->GetValue($file_file_index);
+ $map->{$unique_name} = [$dir_item->{'full_source_name'},$dir_item->{'full_target_name'}];
+ }
+
+ $installer::logger::Info->printf("got full paths for %d files\n",
+ $file_table->GetRowCount());
+
+ $self->{'FileToDirectoryMap'} = $map;
+ return $map;
+}
+
+
+1;
diff --git a/solenv/bin/modules/installer/patch/MsiRow.pm b/solenv/bin/modules/installer/patch/MsiRow.pm
new file mode 100644
index 000000000000..24a6fd22bc68
--- /dev/null
+++ b/solenv/bin/modules/installer/patch/MsiRow.pm
@@ -0,0 +1,160 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+package installer::patch::MsiRow;
+
+=head1 NAME
+
+ package installer::patch::MsiRow - Class that represents a single row of an Msi table.
+
+=cut
+
+
+=head2 new ($class, $table, @data)
+
+ Create a new MsiRow object for the given table row data. Each row
+ stores a reference to its $table so that it can access global
+ values like column names.
+
+=cut
+sub new ($$@)
+{
+ my ($class, $table, @data) = @_;
+
+ my $self = {
+ 'table' => $table,
+ 'values' => [@data]
+ };
+ bless($self, $class);
+
+ my $column_count = $table->GetColumnCount();
+ while (scalar @{$self->{'values'}} < $column_count)
+ {
+ push @{$self->{'values'}}, "";
+ }
+
+ return $self;
+}
+
+
+
+=head2 GetValue($self, $column)
+
+ Return the value in the column specified by $column, which can be
+ either the column name or the index of the column.
+
+=cut
+sub GetValue ($$)
+{
+ my ($self, $column) = @_;
+
+ if ($column =~ /^\d+$/)
+ {
+ return $self->{'values'}->[$column];
+ }
+ else
+ {
+ my $column_index = $self->{'table'}->GetColumnIndex($column);
+ return $self->{'values'}->[$column_index];
+ }
+}
+
+
+
+
+sub SetValue ($$$)
+{
+ my ($self, $column, $value) = @_;
+
+ if ($column =~ /^\d+$/)
+ {
+ $self->{'values'}->[$column] = $value;
+ }
+ else
+ {
+ my $column_index = $self->{'table'}->GetColumnIndex($column);
+ $self->{'values'}->[$column_index] = $value;
+ }
+ $self->{'table'}->MarkAsModified();
+}
+
+
+
+
+sub Format ($$)
+{
+ my $self = shift;
+ my $concatenation = shift;
+
+ my $result = "";
+ my $first = 1;
+ my $index = 0;
+ my $column_count = $self->{'table'}->GetColumnCount();
+ foreach my $item (@{$self->{'values'}})
+ {
+ ++$index;
+
+ if ( ! $first)
+ {
+ $result .= $concatenation;
+ }
+ else
+ {
+ $first = 0;
+ }
+ $result .= $item;
+ }
+ return $result;
+}
+
+
+
+
+sub Clone ($$)
+{
+ my ($self, $new_table) = @_;
+
+ my $clone = { %$self };
+ $clone->{'values'} = [ @{$self->{'values'}} ];
+ $clone->{'table'} = $new_table;
+ bless($clone, "MsiRow");
+
+ return $clone;
+}
+
+
+
+
+sub SetTable ($$)
+{
+ my ($self, $new_table) = @_;
+
+ if (defined $self->{'table'} && $self->{'table'} != $new_table)
+ {
+ MsiTools::Die("can not reset table of row");
+ }
+ else
+ {
+ $self->{'table'} = $new_table;
+ }
+}
+
+1;
diff --git a/solenv/bin/modules/installer/patch/MsiTable.pm b/solenv/bin/modules/installer/patch/MsiTable.pm
new file mode 100644
index 000000000000..a95b94af17bc
--- /dev/null
+++ b/solenv/bin/modules/installer/patch/MsiTable.pm
@@ -0,0 +1,274 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+package installer::patch::MsiTable;
+
+=head1 NAME
+
+ package installer::patch::MsiTable - Class that represents one table of an Msi file.
+
+=cut
+
+use installer::patch::MsiRow;
+
+use strict;
+
+=head new ($class, $filename, $table_name)
+
+ Create a new MsiTable object from the output of a previous
+ msidb.exe run. The table is named $table_name, its data is read
+ from $filename.
+
+=cut
+sub new ($$$)
+{
+ my ($class, $filename, $table_name) = @_;
+
+ my $self = {
+ 'name' => $table_name,
+ 'is_valid' => 1
+ };
+ bless($self, $class);
+
+ if ( -f $filename)
+ {
+ $self->ReadFile($filename);
+ }
+ return $self;
+}
+
+
+
+
+sub IsValid ($)
+{
+ my ($self) = @_;
+ return $self->{'is_valid'};
+}
+
+
+
+
+sub Trim ($)
+{
+ my $line = shift;
+
+ $line =~ s/(^\s+|\s+$)//g;
+
+ return $line;
+}
+
+
+
+=head2 ReadFile($self, $filename)
+
+ Read the content of the table from the specified .idt file.
+ For each row a MsiRow object is appended to $self->{'rows'}.
+
+=cut
+sub ReadFile ($$)
+{
+ my ($self, $filename) = @_;
+
+ if ( ! (-f $filename && -r $filename))
+ {
+ printf STDERR ("can not open idt file %s for reading\n", $filename);
+ $self->{'is_valid'} = 0;
+ return;
+ }
+
+ open my $in, "<", $filename;
+
+ my $columns = Trim(<$in>);
+ $self->{'columns'} = [split(/\t/, $columns)];
+
+ my $column_specs = Trim(<$in>);
+ $self->{'column_specs'} = [split(/\t/, $column_specs)];
+
+ # Table name, index columns.
+ my $line = Trim(<$in>);
+ my @items = split(/\t/, $line);
+ if (scalar @items == 3)
+ {
+ $self->{'codepage'} = shift @items;
+ }
+ my $table_name = shift @items;
+ if ($table_name ne $self->{'name'})
+ {
+ printf STDERR ("reading wrong table data for table '%s' (got %s)\n", $self->{'name'}, $table_name);
+ $self->{'is_valid'} = 0;
+ return;
+ }
+ $self->{'index_columns'} = [@items];
+ $self->{'index_column_index'} = $self->GetColumnIndex($items[0]);
+
+ my $rows = [];
+ while (<$in>)
+ {
+ # Remove all trailing returns and newlines. Keep trailing spaces and tabs.
+ s/[\r\n]+$//g;
+
+ my @items = split(/\t/, $_);
+ push @$rows, new installer::patch::MsiRow($self, @items);
+ }
+ $self->{'rows'} = $rows;
+
+ return $self;
+}
+
+
+
+=head2 GetColumnCount($self)
+
+ Return the number of columns in the table.
+
+=cut
+sub GetColumnCount ($)
+{
+ my ($self) = @_;
+
+ return scalar @{$self->{'columns'}};
+}
+
+
+
+
+=head2 GetRowCount($self)
+
+ Return the number of rows in the table.
+
+=cut
+sub GetRowCount ($)
+{
+ my ($self) = @_;
+
+ return scalar @{$self->{'rows'}};
+}
+
+
+
+
+=head2 GetColumnIndx($self, $column_name)
+
+ Return the 0 based index of the column named $column_name. Use
+ this to speed up (slightly) access to column values when accessing
+ many or all rows of a table.
+
+=cut
+sub GetColumnIndex ($$)
+{
+ my ($self, $column_name) = @_;
+
+ my $index = 0;
+ foreach my $name (@{$self->{'columns'}})
+ {
+ if ($name eq $column_name)
+ {
+ return $index;
+ }
+ ++$index;
+ }
+
+ printf STDERR ("did not find column %s in %s\n", $column_name, join(" and ", @{$self->{'columns'}}));
+ return -1;
+}
+
+
+
+
+=head2 GetValue($self, $selector_column, $selector_column_value, $value_column)
+
+ Find the row in which the $selector_column has value
+ $selector_column_value and return its value in the $value_column.
+
+=cut
+
+sub GetValue ($$$$)
+{
+ my ($self, $selector_column, $selector_column_value, $value_column) = @_;
+
+ my $row = $self->GetRow($selector_column, $selector_column_value);
+ if (defined $row)
+ {
+ return $row->GetValue($value_column);
+ }
+ else
+ {
+ return undef;
+ }
+}
+
+
+
+
+=head2 GetRow($self, $column, $value)
+
+ Return the (first) row which has $value in $column.
+
+=cut
+sub GetRow ($$$)
+{
+ my ($self, $column, $value) = @_;
+
+ my $column_index = $self->GetColumnIndex($column);
+ if ($column_index<0)
+ {
+ printf STDERR "ERROR: unknown column $column in table $self->{'name'}\n";
+ return undef;
+ }
+
+ foreach my $row (@{$self->{'rows'}})
+ {
+ if ($row->GetValue($column_index) eq $value)
+ {
+ return $row;
+ }
+ }
+
+ printf STDERR ("ERROR: did not find row for %s->%s in %s\n",
+ $column,
+ $value,
+ table $self->{'name'});
+
+ return undef;
+}
+
+
+
+
+=head2 GetAllRows ($self)
+
+ Return the reference to an array that contains all rows of the table.
+
+=cut
+
+sub GetAllRows ($)
+{
+ my $self = shift;
+
+ return $self->{'rows'};
+}
+
+
+
+
+
+1;
diff --git a/solenv/bin/modules/installer/patch/ReleasesList.pm b/solenv/bin/modules/installer/patch/ReleasesList.pm
new file mode 100644
index 000000000000..320e86400998
--- /dev/null
+++ b/solenv/bin/modules/installer/patch/ReleasesList.pm
@@ -0,0 +1,210 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+package installer::patch::ReleasesList;
+
+use XML::LibXML;
+use File::Spec;
+use strict;
+
+=head1 NAME
+
+ package installer::patch::ReleasesList - Functions for accessing the instsetoo_native/data/releases.xml file
+
+=cut
+
+
+my $Instance = undef;
+
+=head2 Instance()
+
+ Return the singleton instance.
+
+=cut
+sub Instance()
+{
+ if ( ! defined $Instance)
+ {
+ $Instance = new installer::patch::ReleasesList();
+ }
+ return $Instance;
+}
+
+
+
+
+=head2 new($class)
+
+ Internal constructor. Don't call.
+
+=cut
+sub new ($)
+{
+ my ($class) = @_;
+
+ my $self = {};
+ bless($self, $class);
+
+ $self->Read();
+
+ return $self;
+}
+
+
+
+
+=head2 GetFirstChild ($node, $child_name)
+
+ Internal function that returns the first child. Use only when the
+ first child is the (expected) only child in a list.
+
+=cut
+sub GetFirstChild ($$)
+{
+ my ($node, $child_name) = @_;
+
+ if ( ! defined $node)
+ {
+ return undef;
+ }
+ else
+ {
+ my @child_nodes = $node->getElementsByTagName($child_name);
+ if (scalar @child_nodes == 0)
+ {
+ return undef;
+ }
+ else
+ {
+ return $child_nodes[0];
+ }
+ }
+}
+
+
+
+
+=head2 GetText ($node)
+
+ Internal function that returns the trimmed text content of a node.
+
+=cut
+sub GetText ($)
+{
+ my ($node) = @_;
+
+ if ( ! defined $node)
+ {
+ return "";
+ }
+ else
+ {
+ my $text = $node->textContent();
+ $text =~ s/(^\s+|\s+$)//g;
+ return $text;
+ }
+}
+
+
+
+
+=head2 Read($self)
+
+ Read the releases.xml file as doctree and parse its content.
+
+=cut
+sub Read ($)
+{
+ my ($self) = @_;
+
+ my $filename = File::Spec->catfile($ENV{'SRC_ROOT'}, "instsetoo_native", "data", "releases.xml");
+ my $parser = XML::LibXML->new();
+ my $document = $parser->parse_file($filename);
+ foreach my $release_node ($document->getElementsByTagName("release"))
+ {
+ my $version_node = GetFirstChild($release_node, "version");
+ my $version = GetText($version_node);
+ next if $version eq "";
+
+ foreach my $download_node (GetFirstChild($release_node, "download"))
+ {
+ my $package_node = GetFirstChild($download_node, "package-format");
+ my $package_format = GetText($package_node);
+ next if $package_format eq "";
+
+ my $download_data = ParseDownloadData($download_node);
+ if (defined $download_data)
+ {
+ $self->{$version}->{$package_format} = $download_data;
+ }
+ }
+ }
+
+}
+
+
+
+
+=head2 ParseDownloadData ($download_node)
+
+ Parse the data for one set of download data (there is one per release and package format).
+
+=cut
+sub ParseDownloadData ($)
+{
+ my ($download_node) = @_;
+
+ my $url_node = GetFirstChild($download_node, "url-template");
+ my $url_template = GetText($url_node);
+ if ($url_template eq "")
+ {
+ print STDERR "releases data file corrupt (no URL template)\n";
+ return undef;
+ }
+
+ my $download_data = {};
+ foreach my $item_node (@{$download_node->getElementsByTagName("item")})
+ {
+ my $language = GetText(GetFirstChild($item_node, "language"));
+ my $checksum_node = GetFirstChild($item_node, "checksum");
+ if ( ! defined $checksum_node)
+ {
+ print STDERR "releases data file corrupt (item has no 'checksum' node)\n";
+ return undef;
+ }
+ my $checksum_type = $checksum_node->getAttribute("type");
+ my $checksum_value = GetText($checksum_node);
+ my $file_size = GetText(GetFirstChild($item_node, "size"));
+
+ my $url = $url_template;
+ $url =~ s/\%L/$language/g;
+ $download_data->{$language} = {
+ 'URL' => $url,
+ 'checksum-type' => $checksum_type,
+ 'checksum-value' => $checksum_value,
+ 'file-size' => $file_size
+ };
+ }
+
+ return $download_data;
+}
+
+1;
diff --git a/stlport/win32_custom.sh b/solenv/bin/modules/installer/patch/Tools.pm
index f0bde26da768..b29b5596b381 100755..100644
--- a/stlport/win32_custom.sh
+++ b/solenv/bin/modules/installer/patch/Tools.pm
@@ -1,5 +1,4 @@
-#!/bin/sh
-# *************************************************************
+#**************************************************************
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -18,12 +17,31 @@
# specific language governing permissions and limitations
# under the License.
#
-# *************************************************************
-#rem parameters in order of their apearance:
-#rem - path to unpacked tarball
-#rem - relative path back to module root
+#**************************************************************
-cd $1
+package installer::patch::Tools;
-patch -i $2/dos_lineends.patch -b -p2
+=head1 NAME
+ package installer::patch::Tools - Collection of functions that don't fit anywhere else
+
+=cut
+
+
+
+
+=head2 CygpathToWindows ($path)
+
+ Convert the given path with the 'cygpath' command into Windows format. Quote backslashes.
+
+=cut
+sub CygpathToWindows($)
+{
+ my ($path) = @_;
+ my $windows_path = qx(cygpath -w "$path");
+ $windows_path =~ s/(^\s+|\s+$)//g;
+ $windows_path =~ s/\\/\\\\/g;
+ return $windows_path;
+}
+
+1;
diff --git a/solenv/bin/modules/installer/patch/Version.pm b/solenv/bin/modules/installer/patch/Version.pm
new file mode 100644
index 000000000000..685df6dc5c58
--- /dev/null
+++ b/solenv/bin/modules/installer/patch/Version.pm
@@ -0,0 +1,74 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+package installer::patch::Version;
+
+
+=head1 NAME
+
+ package installer::patch::Version - Functions for handling version numbers.
+
+=cut
+
+
+
+# We handle version numbers that consist of three parts: major, minor and micro version number.
+my $VersionPartCount = 3;
+
+
+
+=head StringToNumberArray($version_string)
+
+ Convert a version string (where the individual parts are separated by '.') into an array of three numbers.
+ Missing numbers are filled with 0.
+
+ Returns an array with three elements (major, minor, micro).
+=cut
+sub StringToNumberArray ($)
+{
+ my ($version_string) = @_;
+
+ my @version_parts = split(/\./, $version_string);
+ while (scalar @version_parts < $VersionPartCount)
+ {
+ push @version_parts, "0";
+ }
+ return @version_parts;
+}
+
+
+
+
+=head ArrayToDirectoryName (@)
+
+ Return a directory name (without any path) for the given array of version numbers.
+
+=cut
+sub ArrayToDirectoryName (@)
+{
+ return "v-".join("-", @_);
+}
+
+
+
+
+
+1;
diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm
index d07498bdbafc..127bcff2c876 100644
--- a/solenv/bin/modules/installer/scriptitems.pm
+++ b/solenv/bin/modules/installer/scriptitems.pm
@@ -534,7 +534,7 @@ sub add_bundled_extension_blobs
{
# Add the default extensions for the current language set.
# http:// extensions are taken from ext_sources/.
- for my $name (ExtensionsLst::GetExtensionList("http|https", @installer::globals::languageproducts))
+ for my $name (ExtensionsLst::GetExtensionList("http|https", ($installer::globals::languageproduct)))
{
push @bundle_files, $bundlehttpsrc . $name;
}
@@ -542,11 +542,10 @@ sub add_bundled_extension_blobs
}
$installer::logger::Info->printf(
- "preparing %d extension blob%s for language%s %s:\n",
+ "preparing %d extension blob%s for language %s:\n",
$#bundle_files + 1,
$#bundle_files!=0 ? "s" : "",
- $#installer::globals::languageproducts!=0 ? "s" : "",
- join(" ", @installer::globals::languageproducts));
+ $installer::globals::languageproduct);
foreach my $filename ( @bundle_files)
{
@@ -602,18 +601,17 @@ sub add_bundled_prereg_extensions
else
{
# Add extensions from file:// URLs.
- for my $name (ExtensionsLst::GetExtensionList("file", @installer::globals::languageproducts))
+ for my $name (ExtensionsLst::GetExtensionList("file", ($installer::globals::languageproduct)))
{
push @bundle_files, $name;
}
}
$installer::logger::Info->printf(
- "preparing %d bundled extension%s for language%s %s:\n",
+ "preparing %d bundled extension%s for language %s:\n",
$#bundle_files + 1,
$#bundle_files!=0 ? "s" : "",
- $#installer::globals::languageproducts!=0 ? "s" : "",
- join(" ", @installer::globals::languageproducts));
+ $installer::globals::languageproduct);
foreach my $filename (@bundle_files)
{
$installer::logger::Info->printf(" %s\n", $filename);
@@ -717,12 +715,6 @@ sub set_global_directory_hostnames
$installer::globals::officedirgid = $onedir->{'gid'};
$allvariables->{'OFFICEDIRECTORYHOSTNAME'} = $installer::globals::officedirhostname;
}
- if ( $styles =~ /\bSUNDIRECTORY\b/ )
- {
- $installer::globals::sundirhostname = $onedir->{'HostName'};
- $installer::globals::sundirgid = $onedir->{'gid'};
- $allvariables->{'SUNDIRECTORYHOSTNAME'} = $installer::globals::sundirhostname;
- }
}
}
diff --git a/solenv/bin/modules/installer/windows/component.pm b/solenv/bin/modules/installer/windows/component.pm
index 2804cb5a31a1..f285197cd7cd 100644
--- a/solenv/bin/modules/installer/windows/component.pm
+++ b/solenv/bin/modules/installer/windows/component.pm
@@ -46,11 +46,6 @@ sub get_component_guid
# At this time only a template
my $returnvalue = "\{COMPONENTGUID\}";
- if (( $installer::globals::updatedatabase ) && ( exists($componentidhashref->{$componentname}) ))
- {
- $returnvalue = $componentidhashref->{$componentname};
- }
-
# Returning a ComponentID, that is assigned in scp project
if ( exists($installer::globals::componentid{$componentname}) )
{
diff --git a/solenv/bin/modules/installer/windows/directory.pm b/solenv/bin/modules/installer/windows/directory.pm
index 86be8a214d70..5c0368fb8aa4 100644
--- a/solenv/bin/modules/installer/windows/directory.pm
+++ b/solenv/bin/modules/installer/windows/directory.pm
@@ -269,7 +269,6 @@ sub create_unique_directorynames
if ( $installer::globals::installlocationdirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag ISINSTALLLOCATION alread set: \"$installer::globals::installlocationdirectory\".", "create_unique_directorynames"); }
$installer::globals::installlocationdirectory = $uniquename;
$installer::globals::installlocationdirectoryset = 1;
- if ( $installer::globals::installlocationdirectory =~ /oracle_/i ) { $installer::globals::sundirexists = 1; }
}
# setting the sundirectory
@@ -358,8 +357,7 @@ sub create_defaultdir_directorynames
my ($directoryref, $shortdirnamehashref) = @_;
my @shortnames = ();
- if ( $installer::globals::updatedatabase ) { @shortnames = values(%{$shortdirnamehashref}); }
- elsif ( $installer::globals::prepare_winpatch ) { @shortnames = values(%installer::globals::saved83dirmapping); }
+ if ( $installer::globals::prepare_winpatch ) { @shortnames = values(%installer::globals::saved83dirmapping); }
for ( my $i = 0; $i <= $#{$directoryref}; $i++ )
{
@@ -371,11 +369,7 @@ sub create_defaultdir_directorynames
# installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$hostname); # making program/classes to classes
my $uniquename = $onedir->{'uniquename'};
my $shortstring;
- if (( $installer::globals::updatedatabase ) && ( exists($shortdirnamehashref->{$uniquename}) ))
- {
- $shortstring = $shortdirnamehashref->{$uniquename};
- }
- elsif (( $installer::globals::prepare_winpatch ) && ( exists($installer::globals::saved83dirmapping{$uniquename}) ))
+ if (( $installer::globals::prepare_winpatch ) && ( exists($installer::globals::saved83dirmapping{$uniquename}) ))
{
$shortstring = $installer::globals::saved83dirmapping{$uniquename};
}
@@ -473,11 +467,6 @@ sub add_root_directories
$productkey = $productkey . " " . $allvariableshashref->{'POSTVERSIONEXTENSION'};
$realproductkey = $realproductkey . " " . $allvariableshashref->{'POSTVERSIONEXTENSION'};
}
- if ( $allvariableshashref->{'NOVERSIONINDIRNAME'} )
- {
- $productkey = $productname;
- $realproductkey = $realproductname;
- }
if ( $allvariableshashref->{'NOSPACEINDIRECTORYNAME'} )
{
$productkey =~ s/\ /\_/g;
diff --git a/solenv/bin/modules/installer/windows/file.pm b/solenv/bin/modules/installer/windows/file.pm
index 00a23d12a2cd..9e0169d052b8 100644
--- a/solenv/bin/modules/installer/windows/file.pm
+++ b/solenv/bin/modules/installer/windows/file.pm
@@ -377,16 +377,7 @@ sub generate_unique_filename_for_filetable
installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$uniquefilename); # making /registry/schema/org/openoffice/VCL.xcs to VCL.xcs
# Reading unique filename with help of "Component_" in File table from old database
- if (( $installer::globals::updatedatabase ) && ( exists($uniquefilenamehashref->{"$component/$uniquefilename"}) ))
- {
- $uniquefilename = $uniquefilenamehashref->{"$component/$uniquefilename"}; # syntax of $value: ($uniquename;$shortname)
- if ( $uniquefilename =~ /^\s*(.*?)\;\s*(.*?)\s*$/ ) { $uniquefilename = $1; }
- $lcuniquefilename = lc($uniquefilename);
- $installer::globals::alluniquefilenames{$uniquefilename} = 1;
- $installer::globals::alllcuniquefilenames{$lcuniquefilename} = 1;
- return $uniquefilename;
- }
- elsif (( $installer::globals::prepare_winpatch ) && ( exists($installer::globals::savedmapping{"$component/$uniquefilename"}) ))
+ if (( $installer::globals::prepare_winpatch ) && ( exists($installer::globals::savedmapping{"$component/$uniquefilename"}) ))
{
# If we have a FTK mapping for this component/file, use it.
$installer::globals::savedmapping{"$component/$uniquefilename"} =~ m/^(.*);/;
@@ -473,13 +464,7 @@ sub generate_filename_for_filetable
my $shortstring;
# Reading short string with help of "FileName" in File table from old database
- if (( $installer::globals::updatedatabase ) && ( exists($uniquefilenamehashref->{"$fileref->{'componentname'}/$filename"}) ))
- {
- my $value = $uniquefilenamehashref->{"$fileref->{'componentname'}/$filename"}; # syntax of $value: ($uniquename;$shortname)
- if ( $value =~ /^\s*(.*?)\;\s*(.*?)\s*$/ ) { $shortstring = $2; } # already collected in function "collect_shortnames_from_old_database"
- else { $shortstring = $filename; }
- }
- elsif (( $installer::globals::prepare_winpatch ) && ( exists($installer::globals::savedmapping{"$fileref->{'componentname'}/$filename"}) ))
+ if (( $installer::globals::prepare_winpatch ) && ( exists($installer::globals::savedmapping{"$fileref->{'componentname'}/$filename"}) ))
{
$installer::globals::savedmapping{"$fileref->{'componentname'}/$filename"} =~ m/.*;(.*)/;
if ($1 ne '')
@@ -567,89 +552,6 @@ sub get_fileversion
}
#############################################
-# Returning the sequence for a file
-#############################################
-
-sub get_sequence_for_file
-{
- my ($number, $onefile, $fileentry, $allupdatesequenceshashref, $allupdatecomponentshashref, $allupdatefileorderhashref, $allfilecomponents) = @_;
-
- my $sequence = "";
- my $infoline = "";
- my $pffcomponentname = $onefile->{'componentname'} . "_pff";
-
- if ( $installer::globals::updatedatabase )
- {
- if (( exists($allupdatesequenceshashref->{$onefile->{'uniquename'}}) ) &&
- (( $onefile->{'componentname'} eq $allupdatecomponentshashref->{$onefile->{'uniquename'}} ) ||
- ( $pffcomponentname eq $allupdatecomponentshashref->{$onefile->{'uniquename'}} )))
- {
- # The second condition is necessary to find shifted files, that have same "uniquename", but are now
- # located in another directory. This can be seen at the component name.
- $sequence = $allupdatesequenceshashref->{$onefile->{'uniquename'}};
- $onefile->{'assignedsequencenumber'} = $sequence;
- # Collecting all used sequences, to guarantee, that no number is unused
- $installer::globals::allusedupdatesequences{$sequence} = 1;
- # Special help for files, that already have a "pff" component name (for example after ServicePack 1)
- if ( $pffcomponentname eq $allupdatecomponentshashref->{$onefile->{'uniquename'}} )
- {
- $infoline = "Warning: Special handling for component \"$pffcomponentname\". This file was added after the final, but before this ServicePack.\n";
- $installer::logger::Lang->print($infoline);
- $onefile->{'componentname'} = $pffcomponentname; # pff for "post final file"
- $fileentry->{'Component_'} = $onefile->{'componentname'};
- if ( ! exists($allfilecomponents->{$fileentry->{'Component_'}}) ) { $allfilecomponents->{$fileentry->{'Component_'}} = 1; }
- }
- }
- else
- {
- $installer::globals::updatesequencecounter++;
- $sequence = $installer::globals::updatesequencecounter;
- $onefile->{'assignedsequencenumber'} = $sequence;
- # $onefile->{'assignedcabinetfile'} = $installer::globals::pffcabfilename; # assigning to cabinet file for "post final files"
- # Collecting all new files
- $installer::globals::newupdatefiles{$sequence} = $onefile;
- # Saving in sequence hash
- $allupdatefileorderhashref->{$sequence} = $onefile->{'uniquename'};
-
- # If the new file is part of an existing component, this must be changed now. All files
- # of one component have to be included in one cabinet file. But because the order must
- # not change, all new files have to be added to new components.
- # $onefile->{'componentname'} = $file{'Component_'};
-
- $onefile->{'componentname'} = $onefile->{'componentname'} . "_pff"; # pff for "post final file"
- $fileentry->{'Component_'} = $onefile->{'componentname'};
- if ( ! exists($allfilecomponents->{$fileentry->{'Component_'}}) ) { $allfilecomponents->{$fileentry->{'Component_'}} = 1; }
- $onefile->{'PostFinalFile'} = 1;
- # $installer::globals::pfffileexists = 1;
- # The sequence for this file has changed. It has to be inserted at the end of the files collector.
- $installer::globals::insert_file_at_end = 1;
- $installer::globals::newfilescollector{$sequence} = $onefile; # Adding new files to the end of the filescollector
- $installer::globals::newfilesexist = 1;
- }
- }
- elsif (( $onefile->{'assignedsequencenumber'} ) && ( $installer::globals::use_packages_for_cabs ))
- {
- $sequence = $onefile->{'assignedsequencenumber'};
- }
- else
- {
- $sequence = $number;
- # my $sequence = $number + 1;
-
- # Idea: Each component is packed into a cab file.
- # This requires that all files in one cab file have sequences directly follwing each other,
- # for instance from 1456 to 1466. Then in the media table the LastSequence for this cab file
- # is 1466.
- # Because all files belonging to one component are directly behind each other in the file
- # collector, it is possible to use simply an increasing number as sequence value.
- # If files belonging to one component are not directly behind each other in the files collector
- # this mechanism will no longer work.
- }
-
- return $sequence;
-}
-
-#############################################
# Returning the Windows language of a file
#############################################
@@ -693,91 +595,6 @@ sub generate_registry_keypath
return $keypath;
}
-####################################################################
-# Check, if in an update process files are missing. No removal
-# of files allowed for Windows Patch creation.
-# Also logging all new files, that have to be included in extra
-# components and cab files.
-####################################################################
-
-sub check_file_sequences
-{
- my ($allupdatefileorderhashref, $allupdatecomponentorderhashref) = @_;
-
- # All used sequences stored in %installer::globals::allusedupdatesequences
- # Maximum sequence number of old database stored in $installer::globals::updatelastsequence
- # All new files stored in %installer::globals::newupdatefiles
-
- my $infoline = "";
-
- my @missing_sequences = ();
- my @really_missing_sequences = ();
-
- for ( my $i = 1; $i <= $installer::globals::updatelastsequence; $i++ )
- {
- if ( ! exists($installer::globals::allusedupdatesequences{$i}) ) { push(@missing_sequences, $i); }
- }
-
- if ( $#missing_sequences > -1 )
- {
- # Missing sequences can also be caused by files included in merge modules. This files are added later into the file table.
- # Therefore now it is time to check the content of the merge modules.
-
- for ( my $j = 0; $j <= $#missing_sequences; $j++ )
- {
- my $filename = $allupdatefileorderhashref->{$missing_sequences[$j]};
-
- # Is this a file from a merge module? Then this is no error.
- if ( ! exists($installer::globals::mergemodulefiles{$filename}) )
- {
- push(@really_missing_sequences, $missing_sequences[$j]);
- }
- }
- }
-
- if ( $#really_missing_sequences > -1 )
- {
- my $errorstring = "";
- for ( my $j = 0; $j <= $#really_missing_sequences; $j++ )
- {
- my $filename = $allupdatefileorderhashref->{$really_missing_sequences[$j]};
- my $comp = $allupdatecomponentorderhashref->{$really_missing_sequences[$j]};
- $errorstring = "$errorstring$filename (Sequence: $really_missing_sequences[$j], Component: \"$comp\")\n";
- }
-
- $infoline = "ERROR: Files are removed compared with update database.\nThe following files are missing:\n$errorstring";
- $installer::logger::Lang->print($infoline);
- installer::exiter::exit_program($infoline, "check_file_sequences");
- }
-
- # Searching for new files
-
- my $counter = 0;
-
- foreach my $key ( keys %installer::globals::newupdatefiles )
- {
- my $onefile = $installer::globals::newupdatefiles{$key};
- $counter++;
- if ( $counter == 1 )
- {
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->print("New files compared to the update database:\n");
- }
-
- $installer::logger::Lang->printf("%s (%s) Sequence: %s\n",
- $onefile->{'Name'},
- $onefile->{'gid'},
- $onefile->{'assignedsequencenumber'});
- }
-
- if ( $counter == 0 )
- {
- $infoline = "Info: No new file compared with update database!\n";
- $installer::logger::Lang->print($infoline);
- }
-
-}
-
###################################################################
# Collecting further conditions for the component table.
# This is used by multilayer products, to enable installation
@@ -844,7 +661,7 @@ sub collect_shortnames_from_old_database
sub create_files_table
{
- my ($filesref, $allfilecomponentsref, $basedir, $allvariables, $uniquefilenamehashref, $allupdatesequenceshashref, $allupdatecomponentshashref, $allupdatefileorderhashref) = @_;
+ my ($filesref, $allfilecomponentsref, $basedir, $allvariables, $uniquefilenamehashref) = @_;
$installer::logger::Lang->add_timestamp("Performance Info: File Table start");
@@ -869,8 +686,6 @@ sub create_files_table
# my @shortnames = ();
my %shortnames = ();
- if ( $installer::globals::updatedatabase ) { collect_shortnames_from_old_database($uniquefilenamehashref, \%shortnames); }
-
installer::windows::idtglobal::write_idt_header(\@filetable, "file");
installer::windows::idtglobal::write_idt_header(\@filehashtable, "filehash");
@@ -911,7 +726,7 @@ sub create_files_table
$installer::globals::insert_file_at_end = 0;
$counter++;
- $file{'Sequence'} = get_sequence_for_file($counter, $onefile, \%file, $allupdatesequenceshashref, $allupdatecomponentshashref, $allupdatefileorderhashref, \%allfilecomponents);
+ $file{'Sequence'} = $counter;
$onefile->{'sequencenumber'} = $file{'Sequence'};
diff --git a/solenv/bin/modules/installer/windows/media.pm b/solenv/bin/modules/installer/windows/media.pm
index 0dc57b39485e..42c42ae0d6dc 100644
--- a/solenv/bin/modules/installer/windows/media.pm
+++ b/solenv/bin/modules/installer/windows/media.pm
@@ -210,16 +210,7 @@ sub get_last_sequence
{
my ( $cabfilename, $alludpatelastsequences ) = @_;
- my $sequence = 0;
-
- if (( $installer::globals::updatedatabase ) && ( exists($alludpatelastsequences->{$cabfilename}) ))
- {
- $sequence = $alludpatelastsequences->{$cabfilename};
- }
- else
- {
- $sequence = $installer::globals::lastsequence{$cabfilename};
- }
+ my $sequence = $installer::globals::lastsequence{$cabfilename};
return $sequence;
}
@@ -233,7 +224,7 @@ sub get_last_sequence
sub create_media_table
{
- my ($filesref, $basedir, $allvariables, $alludpatelastsequences, $allupdatediskids) = @_;
+ my ($filesref, $basedir, $allvariables) = @_;
my @mediatable = ();
@@ -243,105 +234,7 @@ sub create_media_table
if ( $allvariables->{'INCLUDE_CAB_IN_MSI'} ) { $installer::globals::include_cab_in_msi = 1; }
- if ( $installer::globals::use_packages_for_cabs )
- {
- my $cabfile;
- foreach $cabfile ( sort keys %installer::globals::lastsequence )
- {
- my %media = ();
- $diskid++;
-
- $media{'DiskId'} = get_media_diskid($diskid);
- $media{'LastSequence'} = get_last_sequence($cabfile, $alludpatelastsequences);
- $media{'DiskPrompt'} = get_media_diskprompt();
- $media{'Cabinet'} = get_cabfilename($cabfile);
- $media{'VolumeLabel'} = get_media_volumelabel();
- $media{'Source'} = get_media_source();
-
- my $oneline = $media{'DiskId'} . "\t" . $media{'LastSequence'} . "\t" . $media{'DiskPrompt'} . "\t"
- . $media{'Cabinet'} . "\t" . $media{'VolumeLabel'} . "\t" . $media{'Source'} . "\n";
-
- push(@mediatable, $oneline);
-
- # Comparing the disk id with the disk id from update database. Both have to be identical. New files have to be added
- # to the new pff cabinet file. And existing cab files must not be removed.
- if ( $installer::globals::updatedatabase )
- {
- # Comparing lines in new media table with line from media table in udpate database.
- if ( exists($allupdatediskids->{$media{'Cabinet'}}) )
- {
- if ( $media{'DiskId'} != $allupdatediskids->{$media{'Cabinet'}} )
- {
- installer::exiter::exit_program("ERROR: Different DiskIDs for cab file \"$media{'Cabinet'}\".\nCurrent installation set: \"$media{'DiskId'}\", but update database used \"$allupdatediskids->{$media{'Cabinet'}}\".\nWere cabinet files removed or added?", "create_media_table");
- }
- }
- else
- {
- $installer::logger::Lang->printf(
- "Warning: Could not find cabinet file \"%s}\" in update database. This seems to be an new cabinet file!?\n",
- $media{'Cabinet'});
- }
- }
- }
-
- # one new cabinet file for all files added after the final release
- if (( $installer::globals::updatedatabase ) && ( $installer::globals::pfffileexists ))
- {
- my %media = ();
- $diskid++;
-
- $media{'DiskId'} = get_media_diskid($diskid) + $installer::globals::mergemodulenumber; # Adding mergemodulenumber, because this files are included later
- $media{'LastSequence'} = $installer::globals::updatesequencecounter;
- $media{'DiskPrompt'} = get_media_diskprompt();
- $media{'Cabinet'} = get_cabfilename($installer::globals::pffcabfilename);
- $media{'VolumeLabel'} = get_media_volumelabel();
- $media{'Source'} = get_media_source();
-
- my $oneline = $media{'DiskId'} . "\t" . $media{'LastSequence'} . "\t" . $media{'DiskPrompt'} . "\t"
- . $media{'Cabinet'} . "\t" . $media{'VolumeLabel'} . "\t" . $media{'Source'} . "\n";
-
- push(@mediatable, $oneline);
- }
-
- }
- elsif ( $installer::globals::cab_file_per_component )
- {
- for ( my $i = 0; $i <= $#{$filesref}; $i++ )
- {
- my $onefile = ${$filesref}[$i];
- my $nextfile = ${$filesref}[$i+1];
-
- my $filecomponent = "";
- my $nextcomponent = "";
-
- if ( $onefile->{'componentname'} ) { $filecomponent = $onefile->{'componentname'}; }
- if ( $nextfile->{'componentname'} ) { $nextcomponent = $nextfile->{'componentname'}; }
-
- if ( $filecomponent eq $nextcomponent )
- {
- next; # nothing to do, this is not the last file of a component
- }
-
- my %media = ();
- $diskid++;
-
- $media{'DiskId'} = get_media_diskid($diskid);
- $media{'LastSequence'} = get_media_lastsequence($onefile);
- $media{'DiskPrompt'} = get_media_diskprompt();
- $media{'Cabinet'} = get_media_cabinet($diskid);
- $media{'VolumeLabel'} = get_media_volumelabel();
- $media{'Source'} = get_media_source();
-
- my $oneline = $media{'DiskId'} . "\t" . $media{'LastSequence'} . "\t" . $media{'DiskPrompt'} . "\t"
- . $media{'Cabinet'} . "\t" . $media{'VolumeLabel'} . "\t" . $media{'Source'} . "\n";
-
- push(@mediatable, $oneline);
-
- $media{'Cabinet'} =~ s/^\s*\#//; # removing leading hash
- set_cabinetfilename_for_component_in_file_collector($media{'Cabinet'}, $filesref, $filecomponent, $i);
- }
- }
- elsif ( $installer::globals::fix_number_of_cab_files )
+ if ( $installer::globals::fix_number_of_cab_files )
{
# number of cabfiles
my $maxcabfilenumber = $installer::globals::number_of_cabfiles;
@@ -409,36 +302,6 @@ sub create_media_table
}
}
}
- elsif ( $installer::globals::one_cab_file )
- {
- my %media = ();
- $diskid++;
-
- my $maximumfile = $#{$filesref};
-
- $media{'DiskId'} = get_media_diskid($diskid);
- # $media{'LastSequence'} = ${$filesref}[$maximumfile]->{'sequencenumber'}; # sequence number of the last file
- $media{'LastSequence'} = $maximumfile + 1; # This works also for unsorted file collector
- $media{'DiskPrompt'} = get_media_diskprompt();
- $media{'Cabinet'} = generate_cab_filename($allvariables);
- $media{'VolumeLabel'} = get_media_volumelabel();
- $media{'Source'} = get_media_source();
-
- my $oneline = $media{'DiskId'} . "\t" . $media{'LastSequence'} . "\t" . $media{'DiskPrompt'} . "\t"
- . $media{'Cabinet'} . "\t" . $media{'VolumeLabel'} . "\t" . $media{'Source'} . "\n";
-
- push(@mediatable, $oneline);
-
- # Saving the cabinet file name in the file collector
-
- $media{'Cabinet'} =~ s/^\s*\#//; # removing leading hash
-
- for ( my $i = 0; $i <= $#{$filesref}; $i++ )
- {
- my $onefile = ${$filesref}[$i];
- $onefile->{'cabinet'} = $media{'Cabinet'};
- }
- }
else
{
installer::exiter::exit_program("ERROR: No cab file specification in globals.pm !", "create_media_table");
diff --git a/solenv/bin/modules/installer/windows/mergemodule.pm b/solenv/bin/modules/installer/windows/mergemodule.pm
deleted file mode 100644
index 2ed2781d9747..000000000000
--- a/solenv/bin/modules/installer/windows/mergemodule.pm
+++ /dev/null
@@ -1,1668 +0,0 @@
-#**************************************************************
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#**************************************************************
-
-
-
-package installer::windows::mergemodule;
-
-use Cwd;
-use Digest::MD5;
-use installer::converter;
-use installer::exiter;
-use installer::files;
-use installer::globals;
-use installer::logger;
-use installer::pathanalyzer;
-use installer::remover;
-use installer::scriptitems;
-use installer::systemactions;
-use installer::worker;
-use installer::windows::idtglobal;
-use installer::windows::language;
-
-#################################################################
-# Merging the Windows MergeModules into the msi database.
-#################################################################
-
-sub merge_mergemodules_into_msi_database
-{
- my ($mergemodules, $filesref, $msifilename, $languagestringref, $language, $languagefile, $allvariables, $includepatharrayref, $allupdatesequences, $allupdatelastsequences, $allupdatediskids) = @_;
-
- my $domerge = 0;
- if (( $#{$mergemodules} > -1 ) && ( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack )) { $domerge = 1; }
-
- if ( $domerge )
- {
- installer::logger::include_header_into_logfile("Merging merge modules into msi database");
- $installer::logger::Info->printf("... merging msm files into msi database ... \n");
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: MergeModule into msi database, start");
-
- my $msidb = "msidb.exe"; # Has to be in the path
- my $cabinetfile = "MergeModule.CABinet"; # the name of each cabinet file in a merge file
- my $infoline = "";
- my $systemcall = "";
- my $returnvalue = "";
-
- # 1. Analyzing the MergeModule (has only to be done once)
- # a. -> Extracting cabinet file: msidb.exe -d <msmfile> -x MergeModule.CABinet
- # b. -> Number of files in cabinet file: msidb.exe -d <msmfile> -f <directory> -e File
- # c. -> List of components: msidb.exe -d <msmfile> -f <directory> -e Component
-
- if ( ! $installer::globals::mergemodules_analyzed )
- {
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Analyzing MergeModules, start");
- $installer::logger::Lang->print("Analyzing all Merge Modules\n");
- $installer::logger::Lang->print("\n");
-
- %installer::globals::mergemodules = ();
-
- my $mergemoduledir = installer::systemactions::create_directories("mergefiles", $languagestringref);
- # push(@installer::globals::removedirs, $mergemoduledir);
-
- my $mergemodule;
- foreach $mergemodule ( @{$mergemodules} )
- {
- my $filename = $mergemodule->{'Name'};
- my $mergefile = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$filename, $includepatharrayref, 1);
-
- if ( ! -f $$mergefile ) { installer::exiter::exit_program("ERROR: msm file not found: $filename !", "merge_mergemodules_into_msi_database"); }
- my $completesource = $$mergefile;
-
- my $mergegid = $mergemodule->{'gid'};
- my $workdir = $mergemoduledir . $installer::globals::separator . $mergegid;
- if ( ! -d $workdir ) { installer::systemactions::create_directory($workdir); }
-
- $infoline = "Analyzing Merge Module: $filename\n";
- $installer::logger::Lang->print($infoline);
-
- # copy msm file into working directory
- my $completedest = $workdir . $installer::globals::separator . $filename;
- installer::systemactions::copy_one_file($completesource, $completedest);
- if ( ! -f $completedest ) { installer::exiter::exit_program("ERROR: msm file not found: $completedest !", "merge_mergemodules_into_msi_database"); }
-
- # changing directory
- my $from = cwd();
- my $to = $workdir;
- chdir($to);
-
- # remove an existing cabinet file
- if ( -f $cabinetfile ) { unlink($cabinetfile); }
-
- # exclude cabinet file
- $systemcall = $msidb . " -d " . $filename . " -x " . $cabinetfile;
- $returnvalue = system($systemcall);
-
- $infoline = "Systemcall: $systemcall\n";
- $installer::logger::Lang->print($infoline);
-
- if ($returnvalue)
- {
- $infoline = "ERROR: Could not execute $systemcall !\n";
- $installer::logger::Lang->print($infoline);
- installer::exiter::exit_program("ERROR: Could not extract cabinet file from merge file: $completedest !", "merge_mergemodules_into_msi_database");
- }
- else
- {
- $infoline = "Success: Executed $systemcall successfully!\n";
- $installer::logger::Lang->print($infoline);
- }
-
- # exclude tables from mergefile
- # Attention: All listed tables have to exist in the database. If they not exist, an error window pops up
- # and the return value of msidb.exe is not zero. The error window makes it impossible to check the existence
- # of a table with the help of the return value.
- # Solution: Export of all tables by using "*" . Some tables must exist (File Component Directory), other
- # tables do not need to exist (MsiAssembly).
-
- if ( $^O =~ /cygwin/i ) {
- # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
- my $localworkdir = $workdir;
- $localworkdir =~ s/\//\\\\/g;
- $systemcall = $msidb . " -d " . $filename . " -f " . $localworkdir . " -e \\\*";
- }
- else
- {
- # $systemcall = $msidb . " -d " . $filename . " -f " . $workdir . " -e File Component MsiAssembly Directory";
- $systemcall = $msidb . " -d " . $filename . " -f " . $workdir . " -e \*";
- }
-
- $returnvalue = system($systemcall);
-
- $infoline = "Systemcall: $systemcall\n";
- $installer::logger::Lang->print($infoline);
-
- if ($returnvalue)
- {
- $infoline = "ERROR: Could not execute $systemcall !\n";
- $installer::logger::Lang->print($infoline);
- installer::exiter::exit_program("ERROR: Could not exclude tables from merge file: $completedest !", "merge_mergemodules_into_msi_database");
- }
- else
- {
- $infoline = "Success: Executed $systemcall successfully!\n";
- $installer::logger::Lang->print($infoline);
- }
-
- # Determining files
- my $idtfilename = "File.idt"; # must exist
- if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: File \"$idtfilename\" not found in directory \"$workdir\" !", "merge_mergemodules_into_msi_database"); }
- my $filecontent = installer::files::read_file($idtfilename);
- my @file_idt_content = ();
- my $filecounter = 0;
- my %mergefilesequence = ();
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- if ( $i <= 2 ) { next; } # ignoring first three lines
- if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
- $filecounter++;
- push(@file_idt_content, ${$filecontent}[$i]);
- if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.+?)\t(.+?)\t(.+?)\t(.*?)\t(.*?)\t(.*?)\t(\d+?)\s*$/ )
- {
- my $filename = $1;
- my $filesequence = $8;
- $mergefilesequence{$filename} = $filesequence;
- }
- else
- {
- my $linecount = $i + 1;
- installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "merge_mergemodules_into_msi_database");
- }
- }
-
- # Determining components
- $idtfilename = "Component.idt"; # must exist
- if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: File \"$idtfilename\" not found in directory \"$workdir\" !", "merge_mergemodules_into_msi_database"); }
- $filecontent = installer::files::read_file($idtfilename);
- my %componentnames = ();
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- if ( $i <= 2 ) { next; } # ignoring first three lines
- if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
- if ( ${$filecontent}[$i] =~ /^\s*(\S+)\s+/ ) { $componentnames{$1} = 1; }
- }
-
- # Determining directories
- $idtfilename = "Directory.idt"; # must exist
- if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: File \"$idtfilename\" not found in directory \"$workdir\" !", "merge_mergemodules_into_msi_database"); }
- $filecontent = installer::files::read_file($idtfilename);
- my %mergedirectories = ();
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- if ( $i <= 2 ) { next; } # ignoring first three lines
- if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
- if ( ${$filecontent}[$i] =~ /^\s*(\S+)\s+/ ) { $mergedirectories{$1} = 1; }
- }
-
- # Determining assemblies
- $idtfilename = "MsiAssembly.idt"; # does not need to exist
- my $hasmsiassemblies = 0;
- my %mergeassemblies = ();
- if ( -f $idtfilename )
- {
- $filecontent = installer::files::read_file($idtfilename);
- $hasmsiassemblies = 1;
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- if ( $i <= 2 ) { next; } # ignoring first three lines
- if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
- if ( ${$filecontent}[$i] =~ /^\s*(\S+)\s+/ ) { $mergeassemblies{$1} = 1; }
- }
- }
-
- # It is possible, that other tables have to be checked here. This happens, if tables in the
- # merge module have to know the "Feature" or the "Directory", under which the content of the
- # msm file is integrated into the msi database.
-
- # Determining name of cabinet file in installation set
- my $cabfilename = $mergemodule->{'Cabfilename'};
- installer::packagelist::resolve_packagevariables(\$cabfilename, $allvariables, 0);
-
- # Analyzing styles
- # Flag REMOVE_FILE_TABLE is required for msvc9 Merge-Module, because otherwise msidb.exe
- # fails during integration of msm file into msi database.
-
- my $styles = "";
- my $removefiletable = 0;
- if ( $mergemodule->{'Styles'} ) { $styles = $mergemodule->{'Styles'}; }
- if ( $styles =~ /\bREMOVE_FILE_TABLE\b/ ) { $removefiletable = 1; }
-
- if ( $removefiletable )
- {
- my $removeworkdir = $workdir . $installer::globals::separator . "remove_file_idt";
- if ( ! -d $removeworkdir ) { installer::systemactions::create_directory($removeworkdir); }
- my $completeremovedest = $removeworkdir . $installer::globals::separator . $filename;
- installer::systemactions::copy_one_file($completedest, $completeremovedest);
- if ( ! -f $completeremovedest ) { installer::exiter::exit_program("ERROR: msm file not found: $completeremovedest !", "merge_mergemodules_into_msi_database"); }
-
- # Unpacking msm file
- if ( $^O =~ /cygwin/i ) {
- # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
- my $localcompleteremovedest = $completeremovedest;
- my $localremoveworkdir = $removeworkdir;
- $localcompleteremovedest =~ s/\//\\\\/g;
- $localremoveworkdir =~ s/\//\\\\/g;
- $systemcall = $msidb . " -d " . $localcompleteremovedest . " -f " . $localremoveworkdir . " -e \\\*";
- }
- else
- {
- $systemcall = $msidb . " -d " . $completeremovedest . " -f " . $removeworkdir . " -e \*";
- }
-
- $returnvalue = system($systemcall);
-
- my $idtfilename = $removeworkdir . $installer::globals::separator . "File.idt";
- if ( -f $idtfilename ) { unlink $idtfilename; }
- unlink $completeremovedest;
-
- # Packing msm file without "File.idt"
- if ( $^O =~ /cygwin/i ) {
- # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
- my $localcompleteremovedest = $completeremovedest;
- my $localremoveworkdir = $removeworkdir;
- $localcompleteremovedest =~ s/\//\\\\/g;
- $localremoveworkdir =~ s/\//\\\\/g;
- $systemcall = $msidb . " -c -d " . $localcompleteremovedest . " -f " . $localremoveworkdir . " -i \\\*";
- }
- else
- {
- $systemcall = $msidb . " -c -d " . $completeremovedest . " -f " . $removeworkdir . " -i \*";
- }
- $returnvalue = system($systemcall);
-
- # Using this msm file for merging
- if ( -f $completeremovedest ) { $completedest = $completeremovedest; }
- else { installer::exiter::exit_program("ERROR: Could not find msm file without File.idt: $completeremovedest !", "merge_mergemodules_into_msi_database"); }
- }
-
- # Saving MergeModule info
-
- my %onemergemodulehash = ();
- $onemergemodulehash{'mergefilepath'} = $completedest;
- $onemergemodulehash{'workdir'} = $workdir;
- $onemergemodulehash{'cabinetfile'} = $workdir . $installer::globals::separator . $cabinetfile;
- $onemergemodulehash{'filenumber'} = $filecounter;
- $onemergemodulehash{'componentnames'} = \%componentnames;
- $onemergemodulehash{'cabfilename'} = $cabfilename;
- $onemergemodulehash{'feature'} = $mergemodule->{'Feature'};
- $onemergemodulehash{'rootdir'} = $mergemodule->{'RootDir'};
- $onemergemodulehash{'name'} = $mergemodule->{'Name'};
- $onemergemodulehash{'mergefilesequence'} = \%mergefilesequence;
- $onemergemodulehash{'mergeassemblies'} = \%mergeassemblies;
- $onemergemodulehash{'mergedirectories'} = \%mergedirectories;
- $onemergemodulehash{'hasmsiassemblies'} = $hasmsiassemblies;
- $onemergemodulehash{'removefiletable'} = $removefiletable;
- $onemergemodulehash{'fileidtcontent'} = \@file_idt_content;
-
- $installer::globals::mergemodules{$mergegid} = \%onemergemodulehash;
-
- # Collecting all cab files, to copy them into installation set
- $installer::globals::copy_msm_files{$cabfilename} = $onemergemodulehash{'cabinetfile'};
-
- chdir($from);
- }
-
- $infoline = "All Merge Modules successfully analyzed\n";
- $installer::logger::Lang->print($infoline);
-
- $installer::globals::mergemodules_analyzed = 1;
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Analyzing MergeModules, stop");
-
- $infoline = "\n";
- $installer::logger::Lang->print($infoline);
- }
-
- # 2. Change msi database (has to be done for every msi database -> for every language)
- # a. Merge msm file into msi database: msidb.exe -d <msifile> -m <mergefile>
- # b. Extracting tables from msi database: msidb.exe -d <msifile> -f <directory> -e File Media, ...
- # c. Changing content of msi database in tables: File, Media, Directory, FeatureComponent
- # d. Including tables into msi database: msidb.exe -d <msifile> -f <directory> -i File Media, ...
- # e. Copying cabinet file into installation set (later)
-
- my $counter = 0;
- my $mergemodulegid;
- foreach $mergemodulegid (keys %installer::globals::mergemodules)
- {
- my $mergemodulehash = $installer::globals::mergemodules{$mergemodulegid};
- $counter++;
-
- installer::logger::include_header_into_logfile("Merging Module: $mergemodulehash->{'name'}");
- $installer::logger::Info->printf("\t... %s ... \n", $mergemodulehash->{'name'});
-
- $msifilename = installer::converter::make_path_conform($msifilename);
- my $workdir = $msifilename;
- installer::pathanalyzer::get_path_from_fullqualifiedname(\$workdir);
-
- # changing directory
- my $from = cwd();
- my $to = $workdir;
- chdir($to);
-
- # Saving original msi database
- installer::systemactions::copy_one_file($msifilename, "$msifilename\.$counter");
-
- # Merging msm file, this is the "real" merge command
-
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Before merging database");
-
- if ( $^O =~ /cygwin/i ) {
- # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
- my $localmergemodulepath = $mergemodulehash->{'mergefilepath'};
- my $localmsifilename = $msifilename;
- $localmergemodulepath =~ s/\//\\\\/g;
- $localmsifilename =~ s/\//\\\\/g;
- $systemcall = $msidb . " -d " . $localmsifilename . " -m " . $localmergemodulepath;
- }
- else
- {
- $systemcall = $msidb . " -d " . $msifilename . " -m " . $mergemodulehash->{'mergefilepath'};
- }
- $returnvalue = system($systemcall);
-
- $infoline = "Systemcall: $systemcall\n";
- $installer::logger::Lang->print($infoline);
-
- if ($returnvalue)
- {
- $infoline = "ERROR: Could not execute $systemcall . Returnvalue: $returnvalue!\n";
- $installer::logger::Lang->print($infoline);
- installer::exiter::exit_program("ERROR: Could not merge msm file into database: $mergemodulehash->{'mergefilepath'} !", "merge_mergemodules_into_msi_database");
- }
- else
- {
- $infoline = "Success: Executed $systemcall successfully!\n";
- $installer::logger::Lang->print($infoline);
- }
-
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: After merging database");
-
- # Saving original idt files
- if ( -f "File.idt" ) { installer::systemactions::rename_one_file("File.idt", "File.idt.$counter"); }
- if ( -f "Media.idt" ) { installer::systemactions::rename_one_file("Media.idt", "Media.idt.$counter"); }
- if ( -f "Directory.idt" ) { installer::systemactions::rename_one_file("Directory.idt", "Directory.idt.$counter"); }
- if ( -f "Director.idt" ) { installer::systemactions::rename_one_file("Director.idt", "Director.idt.$counter"); }
- if ( -f "FeatureComponents.idt" ) { installer::systemactions::rename_one_file("FeatureComponents.idt", "FeatureComponents.idt.$counter"); }
- if ( -f "FeatureC.idt" ) { installer::systemactions::rename_one_file("FeatureC.idt", "FeatureC.idt.$counter"); }
- if ( -f "MsiAssembly.idt" ) { installer::systemactions::rename_one_file("MsiAssembly.idt", "MsiAssembly.idt.$counter"); }
- if ( -f "MsiAssem.idt" ) { installer::systemactions::rename_one_file("MsiAssem.idt", "MsiAssem.idt.$counter"); }
-
- # Extracting tables
-
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Before extracting tables");
-
- my $workingtables = "File Media Directory FeatureComponents"; # required tables
- # Optional tables can be added now
- if ( $mergemodulehash->{'hasmsiassemblies'} ) { $workingtables = $workingtables . " MsiAssembly"; }
-
- # Table "Feature" has to be exported, but it is not necessary to import it.
- if ( $^O =~ /cygwin/i ) {
- # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
- my $localmsifilename = $msifilename;
- my $localworkdir = $workdir;
- $localmsifilename =~ s/\//\\\\/g;
- $localworkdir =~ s/\//\\\\/g;
- $systemcall = $msidb . " -d " . $localmsifilename . " -f " . $localworkdir . " -e " . "Feature " . $workingtables;
- }
- else
- {
- $systemcall = $msidb . " -d " . $msifilename . " -f " . $workdir . " -e " . "Feature " . $workingtables;
- }
- $returnvalue = system($systemcall);
-
- $infoline = "Systemcall: $systemcall\n";
- $installer::logger::Lang->print($infoline);
-
- if ($returnvalue)
- {
- $infoline = "ERROR: Could not execute $systemcall !\n";
- $installer::logger::Lang->print($infoline);
- installer::exiter::exit_program("ERROR: Could not exclude tables from msi database: $msifilename !", "merge_mergemodules_into_msi_database");
- }
- else
- {
- $infoline = "Success: Executed $systemcall successfully!\n";
- $installer::logger::Lang->print($infoline);
- }
-
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: After extracting tables");
-
- # Using 8+3 table names, that are used, when tables are integrated into database. The export of tables
- # creates idt-files, that have long names.
-
- if ( -f "Directory.idt" ) { installer::systemactions::rename_one_file("Directory.idt", "Director.idt"); }
- if ( -f "FeatureComponents.idt" ) { installer::systemactions::rename_one_file("FeatureComponents.idt", "FeatureC.idt"); }
- if ( -f "MsiAssembly.idt" ) { installer::systemactions::rename_one_file("MsiAssembly.idt", "MsiAssem.idt"); }
-
- # Changing content of tables: File, Media, Directory, FeatureComponent, MsiAssembly
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Changing Media table");
- change_media_table($mergemodulehash, $workdir, $mergemodulegid, $allupdatelastsequences, $allupdatediskids);
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Changing File table");
- $filesref = change_file_table($mergemodulehash, $workdir, $allupdatesequences, $includepatharrayref, $filesref, $mergemodulegid);
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Changing FeatureComponent table");
- change_featurecomponent_table($mergemodulehash, $workdir);
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Changing Directory table");
- change_directory_table($mergemodulehash, $workdir);
- if ( $mergemodulehash->{'hasmsiassemblies'} )
- {
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Changing MsiAssembly table");
- change_msiassembly_table($mergemodulehash, $workdir);
- }
-
- # msidb.exe does not merge InstallExecuteSequence, AdminExecuteSequence and AdvtExecuteSequence. Instead it creates
- # new tables ModuleInstallExecuteSequence, ModuleAdminExecuteSequence and ModuleAdvtExecuteSequence that need to be
- # merged into the three ExecuteSequences with the following process (also into InstallUISequence.idt).
-
- # Saving original idt files
- if ( -f "InstallE.idt" ) { installer::systemactions::rename_one_file("InstallE.idt", "InstallE.idt.$counter"); }
- if ( -f "InstallU.idt" ) { installer::systemactions::rename_one_file("InstallU.idt", "InstallU.idt.$counter"); }
- if ( -f "AdminExe.idt" ) { installer::systemactions::rename_one_file("AdminExe.idt", "AdminExe.idt.$counter"); }
- if ( -f "AdvtExec.idt" ) { installer::systemactions::rename_one_file("AdvtExec.idt", "AdvtExec.idt.$counter"); }
- if ( -f "ModuleInstallExecuteSequence.idt" ) { installer::systemactions::rename_one_file("ModuleInstallExecuteSequence.idt", "ModuleInstallExecuteSequence.idt.$counter"); }
- if ( -f "ModuleAdminExecuteSequence.idt" ) { installer::systemactions::rename_one_file("ModuleAdminExecuteSequence.idt", "ModuleAdminExecuteSequence.idt.$counter"); }
- if ( -f "ModuleAdvtExecuteSequence.idt" ) { installer::systemactions::rename_one_file("ModuleAdvtExecuteSequence.idt", "ModuleAdvtExecuteSequence.idt.$counter"); }
-
- # Extracting tables
- my $moduleexecutetables = "ModuleInstallExecuteSequence ModuleAdminExecuteSequence ModuleAdvtExecuteSequence"; # new tables
- my $executetables = "InstallExecuteSequence InstallUISequence AdminExecuteSequence AdvtExecuteSequence"; # tables to be merged
-
-
- if ( $^O =~ /cygwin/i ) {
- # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
- my $localmsifilename = $msifilename;
- my $localworkdir = $workdir;
- $localmsifilename =~ s/\//\\\\/g;
- $localworkdir =~ s/\//\\\\/g;
- $systemcall = $msidb . " -d " . $localmsifilename . " -f " . $localworkdir . " -e " . "Feature " . $moduleexecutetables;
- }
- else
- {
- $systemcall = $msidb . " -d " . $msifilename . " -f " . $workdir . " -e " . "Feature " . $moduleexecutetables;
- }
- $returnvalue = system($systemcall);
-
- if ( $^O =~ /cygwin/i ) {
- # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
- my $localmsifilename = $msifilename;
- my $localworkdir = $workdir;
- $localmsifilename =~ s/\//\\\\/g;
- $localworkdir =~ s/\//\\\\/g;
- $systemcall = $msidb . " -d " . $localmsifilename . " -f " . $localworkdir . " -e " . "Feature " . $executetables;
- }
- else
- {
- $systemcall = $msidb . " -d " . $msifilename . " -f " . $workdir . " -e " . "Feature " . $executetables;
- }
- $returnvalue = system($systemcall);
-
- # Using 8+3 table names, that are used, when tables are integrated into database. The export of tables
- # creates idt-files, that have long names.
-
- if ( -f "InstallExecuteSequence.idt" ) { installer::systemactions::rename_one_file("InstallExecuteSequence.idt", "InstallE.idt"); }
- if ( -f "InstallUISequence.idt" ) { installer::systemactions::rename_one_file("InstallUISequence.idt", "InstallU.idt"); }
- if ( -f "AdminExecuteSequence.idt" ) { installer::systemactions::rename_one_file("AdminExecuteSequence.idt", "AdminExe.idt"); }
- if ( -f "AdvtExecuteSequence.idt" ) { installer::systemactions::rename_one_file("AdvtExecuteSequence.idt", "AdvtExec.idt"); }
-
- # Merging content of tables ModuleInstallExecuteSequence, ModuleAdminExecuteSequence and ModuleAdvtExecuteSequence
- # into tables InstallExecuteSequence, AdminExecuteSequence and AdvtExecuteSequence
- if ( -f "ModuleInstallExecuteSequence.idt" )
- {
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Changing InstallExecuteSequence table");
- change_executesequence_table($mergemodulehash, $workdir, "InstallE.idt", "ModuleInstallExecuteSequence.idt");
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Changing InstallUISequence table");
- change_executesequence_table($mergemodulehash, $workdir, "InstallU.idt", "ModuleInstallExecuteSequence.idt");
- }
-
- if ( -f "ModuleAdminExecuteSequence.idt" )
- {
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Changing AdminExecuteSequence table");
- change_executesequence_table($mergemodulehash, $workdir, "AdminExe.idt", "ModuleAdminExecuteSequence.idt");
- }
-
- if ( -f "ModuleAdvtExecuteSequence.idt" )
- {
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Changing AdvtExecuteSequence table");
- change_executesequence_table($mergemodulehash, $workdir, "AdvtExec.idt", "ModuleAdvtExecuteSequence.idt");
- }
-
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: All tables edited");
-
- # Including tables into msi database
-
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Before including tables");
-
- if ( $^O =~ /cygwin/i ) {
- # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
- my $localmsifilename = $msifilename;
- my $localworkdir = $workdir;
- $localmsifilename =~ s/\//\\\\/g;
- $localworkdir =~ s/\//\\\\/g;
- $systemcall = $msidb . " -d " . $localmsifilename . " -f " . $localworkdir . " -i " . $workingtables. " " . $executetables;
- }
- else
- {
- $systemcall = $msidb . " -d " . $msifilename . " -f " . $workdir . " -i " . $workingtables. " " . $executetables;
- }
- $returnvalue = system($systemcall);
-
- $infoline = "Systemcall: $systemcall\n";
- $installer::logger::Lang->print($infoline);
-
- if ($returnvalue)
- {
- $infoline = "ERROR: Could not execute $systemcall !\n";
- $installer::logger::Lang->print($infoline);
- installer::exiter::exit_program("ERROR: Could not include tables into msi database: $msifilename !", "merge_mergemodules_into_msi_database");
- }
- else
- {
- $infoline = "Success: Executed $systemcall successfully!\n";
- $installer::logger::Lang->print($infoline);
- }
-
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: After including tables");
-
- chdir($from);
- }
-
- if ( ! $installer::globals::mergefiles_added_into_collector ) { $installer::globals::mergefiles_added_into_collector = 1; } # Now all mergemodules are merged for one language.
-
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: MergeModule into msi database, stop");
- }
-
- return $filesref;
-}
-
-#########################################################################
-# Analyzing the content of the media table.
-#########################################################################
-
-sub analyze_media_file
-{
- my ($filecontent, $workdir) = @_;
-
- my %filehash = ();
- my $linecount = 0;
- my $counter = 0;
- my $filename = "Media.idt";
-
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- if ( $i <= 2 ) { next; } # ignoring first three lines
- if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
- if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.+?)\t(.+?)\t(.+?)\t(.+?)\t(.*?)\s*$/ )
- {
- my %line = ();
- # Format: DiskId LastSequence DiskPrompt Cabinet VolumeLabel Source
- $line{'DiskId'} = $1;
- $line{'LastSequence'} = $2;
- $line{'DiskPrompt'} = $3;
- $line{'Cabinet'} = $4;
- $line{'VolumeLabel'} = $5;
- $line{'Source'} = $6;
-
- $counter++;
- $filehash{$counter} = \%line;
- }
- else
- {
- $linecount = $i + 1;
- installer::exiter::exit_program("ERROR: Unknown line format in table \"$filename\" in \"$workdir\" (line $linecount) !", "analyze_media_file");
- }
- }
-
- return \%filehash;
-}
-
-#########################################################################
-# Setting the DiskID for the new cabinet file
-#########################################################################
-
-sub get_diskid
-{
- my ($mediafile, $allupdatediskids, $cabfilename) = @_;
-
- my $diskid = 0;
- my $line;
-
- if (( $installer::globals::updatedatabase ) && ( exists($allupdatediskids->{$cabfilename}) ))
- {
- $diskid = $allupdatediskids->{$cabfilename};
- }
- else
- {
- foreach $line ( keys %{$mediafile} )
- {
- if ( $mediafile->{$line}->{'DiskId'} > $diskid ) { $diskid = $mediafile->{$line}->{'DiskId'}; }
- }
-
- $diskid++;
- }
-
- return $diskid;
-}
-
-#########################################################################
-# Setting the global LastSequence variable
-#########################################################################
-
-sub set_current_last_sequence
-{
- my ($mediafile) = @_;
-
- my $lastsequence = 0;
- my $line;
- foreach $line ( keys %{$mediafile} )
- {
- if ( $mediafile->{$line}->{'LastSequence'} > $lastsequence ) { $lastsequence = $mediafile->{$line}->{'LastSequence'}; }
- }
-
- $installer::globals::lastsequence_before_merge = $lastsequence;
-}
-
-#########################################################################
-# Setting the LastSequence for the new cabinet file
-#########################################################################
-
-sub get_lastsequence
-{
- my ($mergemodulehash, $allupdatelastsequences) = @_;
-
- my $lastsequence = 0;
-
- if (( $installer::globals::updatedatabase ) && ( exists($allupdatelastsequences->{$mergemodulehash->{'cabfilename'}}) ))
- {
- $lastsequence = $allupdatelastsequences->{$mergemodulehash->{'cabfilename'}};
- }
- else
- {
- $lastsequence = $installer::globals::lastsequence_before_merge + $mergemodulehash->{'filenumber'};
- }
-
- return $lastsequence;
-}
-
-#########################################################################
-# Setting the DiskPrompt for the new cabinet file
-#########################################################################
-
-sub get_diskprompt
-{
- my ($mediafile) = @_;
-
- my $diskprompt = "";
- my $line;
- foreach $line ( keys %{$mediafile} )
- {
- if ( exists($mediafile->{$line}->{'DiskPrompt'}) )
- {
- $diskprompt = $mediafile->{$line}->{'DiskPrompt'};
- last;
- }
- }
-
- return $diskprompt;
-}
-
-#########################################################################
-# Setting the VolumeLabel for the new cabinet file
-#########################################################################
-
-sub get_volumelabel
-{
- my ($mediafile) = @_;
-
- my $volumelabel = "";
- my $line;
- foreach $line ( keys %{$mediafile} )
- {
- if ( exists($mediafile->{$line}->{'VolumeLabel'}) )
- {
- $volumelabel = $mediafile->{$line}->{'VolumeLabel'};
- last;
- }
- }
-
- return $volumelabel;
-}
-
-#########################################################################
-# Setting the Source for the new cabinet file
-#########################################################################
-
-sub get_source
-{
- my ($mediafile) = @_;
-
- my $source = "";
- my $line;
- foreach $line ( keys %{$mediafile} )
- {
- if ( exists($mediafile->{$line}->{'Source'}) )
- {
- $diskprompt = $mediafile->{$line}->{'Source'};
- last;
- }
- }
-
- return $source;
-}
-
-#########################################################################
-# For each Merge Module one new line has to be included into the
-# media table.
-#########################################################################
-
-sub create_new_media_line
-{
- my ($mergemodulehash, $mediafile, $allupdatelastsequences, $allupdatediskids) = @_;
-
- my $diskid = get_diskid($mediafile, $allupdatediskids, $mergemodulehash->{'cabfilename'});
- my $lastsequence = get_lastsequence($mergemodulehash, $allupdatelastsequences);
- my $diskprompt = get_diskprompt($mediafile);
- my $cabinet = $mergemodulehash->{'cabfilename'};
- my $volumelabel = get_volumelabel($mediafile);
- my $source = get_source($mediafile);
-
- if ( $installer::globals::include_cab_in_msi ) { $cabinet = "\#" . $cabinet; }
-
- my $newline = "$diskid\t$lastsequence\t$diskprompt\t$cabinet\t$volumelabel\t$source\n";
-
- return $newline;
-}
-
-#########################################################################
-# Setting the last diskid in media table.
-#########################################################################
-
-sub get_last_diskid
-{
- my ($mediafile) = @_;
-
- my $lastdiskid = 0;
- my $line;
- foreach $line ( keys %{$mediafile} )
- {
- if ( $mediafile->{$line}->{'DiskId'} > $lastdiskid ) { $lastdiskid = $mediafile->{$line}->{'DiskId'}; }
- }
-
- return $lastdiskid;
-}
-
-#########################################################################
-# Setting global variable for last cab file name.
-#########################################################################
-
-sub set_last_cabfile_name
-{
- my ($mediafile, $lastdiskid) = @_;
-
- my $line;
- foreach $line ( keys %{$mediafile} )
- {
- if ( $mediafile->{$line}->{'DiskId'} == $lastdiskid ) { $installer::globals::lastcabfilename = $mediafile->{$line}->{'Cabinet'}; }
- }
- my $infoline = "Setting last cabinet file: $installer::globals::lastcabfilename\n";
- $installer::logger::Lang->print($infoline);
-}
-
-#########################################################################
-# In the media table the new cabinet file has to be added or the
-# number of the last cabinet file has to be increased.
-#########################################################################
-
-sub change_media_table
-{
- my ( $mergemodulehash, $workdir, $mergemodulegid, $allupdatelastsequences, $allupdatediskids ) = @_;
-
- my $infoline = "Changing content of table \"Media\"\n";
- $installer::logger::Lang->print($infoline);
-
- my $filename = "Media.idt";
- if ( ! -f $filename ) { installer::exiter::exit_program("ERROR: Could not find file \"$filename\" in \"$workdir\" !", "change_media_table"); }
-
- my $filecontent = installer::files::read_file($filename);
- my $mediafile = analyze_media_file($filecontent, $workdir);
- set_current_last_sequence($mediafile);
-
- if ( $installer::globals::fix_number_of_cab_files )
- {
- # Determining the line with the highest sequencenumber. That file needs to be updated.
- my $lastdiskid = get_last_diskid($mediafile);
- if ( $installer::globals::lastcabfilename eq "" ) { set_last_cabfile_name($mediafile, $lastdiskid); }
- my $newmaxsequencenumber = $installer::globals::lastsequence_before_merge + $mergemodulehash->{'filenumber'};
-
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- if ( $i <= 2 ) { next; } # ignoring first three lines
- if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
- if ( ${$filecontent}[$i] =~ /^\s*(\Q$lastdiskid\E\t)\Q$installer::globals::lastsequence_before_merge\E(\t.*)$/ )
- {
- my $start = $1;
- my $final = $2;
- $infoline = "Merge: Old line in media table: ${$filecontent}[$i]\n";
- $installer::logger::Lang->print($infoline);
- my $newline = $start . $newmaxsequencenumber . $final . "\n";
- ${$filecontent}[$i] = $newline;
- $infoline = "Merge: Changed line in media table: ${$filecontent}[$i]\n";
- $installer::logger::Lang->print($infoline);
- }
- }
- }
- else
- {
- # the new line is identical for all localized databases, but has to be created for each MergeModule ($mergemodulegid)
- if ( ! exists($installer::globals::merge_media_line{$mergemodulegid}) )
- {
- $installer::globals::merge_media_line{$mergemodulegid} = create_new_media_line($mergemodulehash, $mediafile, $allupdatelastsequences, $allupdatediskids);
- }
-
- $infoline = "Adding line: $installer::globals::merge_media_line{$mergemodulegid}\n";
- $installer::logger::Lang->print($infoline);
-
- # adding new line
- push(@{$filecontent}, $installer::globals::merge_media_line{$mergemodulegid});
- }
-
- # saving file
- installer::files::save_file($filename, $filecontent);
-}
-
-#########################################################################
-# Putting the directory table content into a hash.
-#########################################################################
-
-sub analyze_directorytable_file
-{
- my ($filecontent, $idtfilename) = @_;
-
- my %dirhash = ();
- # Iterating over the file content
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- if ( $i <= 2 ) { next; } # ignoring first three lines
- if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
- if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.*?)\t(.*?)\s*$/ )
- {
- my %line = ();
- # Format: Directory Directory_Parent DefaultDir
- $line{'Directory'} = $1;
- $line{'Directory_Parent'} = $2;
- $line{'DefaultDir'} = $3;
- $line{'linenumber'} = $i; # saving also the line number for direct access
-
- my $uniquekey = $line{'Directory'};
- $dirhash{$uniquekey} = \%line;
- }
- else
- {
- my $linecount = $i + 1;
- installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "analyze_directorytable_file");
- }
- }
-
- return \%dirhash;
-}
-
-#########################################################################
-# Putting the msi assembly table content into a hash.
-#########################################################################
-
-sub analyze_msiassemblytable_file
-{
- my ($filecontent, $idtfilename) = @_;
-
- my %assemblyhash = ();
- # Iterating over the file content
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- if ( $i <= 2 ) { next; } # ignoring first three lines
- if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
- if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.+?)\t(.+?)\t(.*?)\t(.*?)\s*$/ )
- {
- my %line = ();
- # Format: Component_ Feature_ File_Manifest File_Application Attributes
- $line{'Component'} = $1;
- $line{'Feature'} = $2;
- $line{'File_Manifest'} = $3;
- $line{'File_Application'} = $4;
- $line{'Attributes'} = $5;
- $line{'linenumber'} = $i; # saving also the line number for direct access
-
- my $uniquekey = $line{'Component'};
- $assemblyhash{$uniquekey} = \%line;
- }
- else
- {
- my $linecount = $i + 1;
- installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "analyze_msiassemblytable_file");
- }
- }
-
- return \%assemblyhash;
-}
-
-#########################################################################
-# Putting the file table content into a hash.
-#########################################################################
-
-sub analyze_filetable_file
-{
- my ( $filecontent, $idtfilename ) = @_;
-
- my %filehash = ();
- # Iterating over the file content
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- if ( $i <= 2 ) { next; } # ignoring first three lines
- if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
- if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.+?)\t(.+?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.+?)\s*$/ )
- {
- my %line = ();
- # Format: File Component_ FileName FileSize Version Language Attributes Sequence
- $line{'File'} = $1;
- $line{'Component'} = $2;
- $line{'FileName'} = $3;
- $line{'FileSize'} = $4;
- $line{'Version'} = $5;
- $line{'Language'} = $6;
- $line{'Attributes'} = $7;
- $line{'Sequence'} = $8;
- $line{'linenumber'} = $i; # saving also the line number for direct access
-
- my $uniquekey = $line{'File'};
- $filehash{$uniquekey} = \%line;
- }
- else
- {
- my $linecount = $i + 1;
- installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "analyze_filetable_file");
- }
- }
-
- return \%filehash;
-}
-
-#########################################################################
-# Creating a new line for the directory table.
-#########################################################################
-
-sub get_new_line_for_directory_table
-{
- my ($dir) = @_;
-
- my $newline = "$dir->{'Directory'}\t$dir->{'Directory_Parent'}\t$dir->{'DefaultDir'}\n";
-
- return $newline;
-}
-
-#########################################################################
-# Creating a new line for the file table.
-#########################################################################
-
-sub get_new_line_for_file_table
-{
- my ($file) = @_;
-
- my $newline = "$file->{'File'}\t$file->{'Component'}\t$file->{'FileName'}\t$file->{'FileSize'}\t$file->{'Version'}\t$file->{'Language'}\t$file->{'Attributes'}\t$file->{'Sequence'}\n";
-
- return $newline;
-}
-
-#########################################################################
-# Creating a new line for the msiassembly table.
-#########################################################################
-
-sub get_new_line_for_msiassembly_table
-{
- my ($assembly) = @_;
-
- my $newline = "$assembly->{'Component'}\t$assembly->{'Feature'}\t$assembly->{'File_Manifest'}\t$assembly->{'File_Application'}\t$assembly->{'Attributes'}\n";
-
- return $newline;
-}
-
-#########################################################################
-# Sorting the files collector, if there are files, following
-# the merge module files.
-#########################################################################
-
-sub sort_files_collector_for_sequence
-{
- my ($filesref) = @_;
-
- my @sortarray = ();
- my %helphash = ();
-
- for ( my $i = 0; $i <= $#{$filesref}; $i++ )
- {
- my $onefile = ${$filesref}[$i];
- if ( ! exists($onefile->{'sequencenumber'}) ) { installer::exiter::exit_program("ERROR: Could not find sequencenumber for file: $onefile->{'uniquename'} !", "sort_files_collector_for_sequence"); }
- my $sequence = $onefile->{'sequencenumber'};
- $helphash{$sequence} = $onefile;
- }
-
- foreach my $seq ( sort { $a <=> $b } keys %helphash ) { push(@sortarray, $helphash{$seq}); }
-
- return \@sortarray;
-}
-
-#########################################################################
-# In the file table "Sequence" and "Attributes" have to be changed.
-#########################################################################
-
-sub change_file_table
-{
- my ($mergemodulehash, $workdir, $allupdatesequenceshashref, $includepatharrayref, $filesref, $mergemodulegid) = @_;
-
- my $infoline = "Changing content of table \"File\"\n";
- $installer::logger::Lang->print($infoline);
-
- my $idtfilename = "File.idt";
- if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: Could not find file \"$idtfilename\" in \"$workdir\" !", "change_file_table"); }
-
- my $filecontent = installer::files::read_file($idtfilename);
-
- # If File.idt needed to be removed before the msm database was merged into the msi database,
- # now it is time to add the content into File.idt
- if ( $mergemodulehash->{'removefiletable'} )
- {
- for ( my $i = 0; $i <= $#{$mergemodulehash->{'fileidtcontent'}}; $i++ )
- {
- push(@{$filecontent}, ${$mergemodulehash->{'fileidtcontent'}}[$i]);
- }
- }
-
- # Unpacking the MergeModule.CABinet (only once)
- # Unpacking into temp directory. Warning: expand.exe has problems with very long unpack directories.
-
- my $unpackdir = installer::systemactions::create_directories("cab", "");
- push(@installer::globals::removedirs, $unpackdir);
- $unpackdir = $unpackdir . $installer::globals::separator . $mergemodulegid;
-
- my %newfileshash = ();
- if (( $installer::globals::fix_number_of_cab_files ) && ( ! $installer::globals::mergefiles_added_into_collector ))
- {
- if ( ! -d $unpackdir ) { installer::systemactions::create_directory($unpackdir); }
-
- # Unpack the cab file, so that in can be included into the last office cabinet file. Attention: cararc.exe from cabsdk required.
- # cabarc.exe -o X <fullcabfilepath>
-
- # my $cabarcfilename = "cabarc.exe";
- # my $cabarcfile = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$cabarcfilename, $includepatharrayref, 1);
-
- # if ( ! -f $$cabarcfile )
- # {
- # $cabarcfilename = "CABARC.EXE";
- # $cabarcfile = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$cabarcfilename, $includepatharrayref, 1);
- # if ( ! -f $$cabarcfile )
- # {
- # installer::exiter::exit_program("ERROR: cabarc.exe not found !", "change_file_table");
- # }
- # }
- # my $cabarc = $$cabarcfile;
-
- # changing directory
- my $from = cwd();
- my $to = $mergemodulehash->{'workdir'};
- if ( $^O =~ /cygwin/i ) {
- $to = qx(cygpath -u "$to");
- chomp $to;
- }
-
- chdir($to) || die "Could not chdir to \"$to\"\n";
-
- # Unpack the cab file, so that in can be included into the last office cabinet file.
- # Not using cabarc.exe from cabsdk for unpacking cabinet files, but "expand.exe" that
- # should be available on every Windows system.
-
- $infoline = "Unpacking cabinet file: $mergemodulehash->{'cabinetfile'}\n";
- $installer::logger::Lang->print($infoline);
-
- # Avoid the Cygwin expand command
- my $expandfile = "expand.exe"; # Has to be in the path
- if ( $^O =~ /cygwin/i ) {
- $expandfile = qx(cygpath -u "$ENV{WINDIR}"/System32/expand.exe);
- chomp $expandfile;
- }
-
- my $cabfilename = "MergeModule.CABinet";
-
- # exclude cabinet file
- # my $systemcall = $cabarc . " -o X " . $mergemodulehash->{'cabinetfile'};
-
- my $systemcall = "";
- if ( $^O =~ /cygwin/i ) {
- my $localunpackdir = qx(cygpath -m "$unpackdir");
- chomp $localunpackdir;
- $systemcall = $expandfile . " " . $cabfilename . " -F:\\\* " . $localunpackdir;
- }
- else
- {
- $systemcall = $expandfile . " " . $cabfilename . " -F:\* " . $unpackdir . " 2\>\&1";
- }
-
- my $returnvalue = system($systemcall);
-
- $infoline = "Systemcall: $systemcall\n";
- $installer::logger::Lang->print($infoline);
-
- if ($returnvalue)
- {
- $infoline = "ERROR: Could not execute $systemcall !\n";
- $installer::logger::Lang->print($infoline);
- installer::exiter::exit_program("ERROR: Could not extract cabinet file: $mergemodulehash->{'cabinetfile'} !", "change_file_table");
- }
- else
- {
- $infoline = "Success: Executed $systemcall successfully!\n";
- $installer::logger::Lang->print($infoline);
- }
-
- chdir($from);
- }
-
- # For performance reasons creating a hash with file names and rows
- # The content of File.idt is changed after every merge -> content cannot be saved in global hash
- $merge_filetablehashref = analyze_filetable_file($filecontent, $idtfilename);
-
- my $attributes = "16384"; # Always
-
- my $filename;
- foreach $filename (keys %{$mergemodulehash->{'mergefilesequence'}} )
- {
- my $mergefilesequence = $mergemodulehash->{'mergefilesequence'}->{$filename};
-
- if ( ! exists($merge_filetablehashref->{$filename}) ) { installer::exiter::exit_program("ERROR: Could not find file \"$filename\" in \"$idtfilename\" !", "change_file_table"); }
- my $filehash = $merge_filetablehashref->{$filename};
- my $linenumber = $filehash->{'linenumber'};
-
- # <- this line has to be changed concerning "Sequence" and "Attributes"
- $filehash->{'Attributes'} = $attributes;
-
- # If this is an update process, the sequence numbers have to be reused.
- if ( $installer::globals::updatedatabase )
- {
- if ( ! exists($allupdatesequenceshashref->{$filehash->{'File'}}) ) { installer::exiter::exit_program("ERROR: Sequence not defined for file \"$filehash->{'File'}\" !", "change_file_table"); }
- $filehash->{'Sequence'} = $allupdatesequenceshashref->{$filehash->{'File'}};
- # Saving all mergemodule sequence numbers. This is important for creating ddf files
- $installer::globals::allmergemodulefilesequences{$filehash->{'Sequence'}} = 1;
- }
- else
- {
- # Important saved data: $installer::globals::lastsequence_before_merge.
- # This mechanism keeps the correct order inside the new cabinet file.
- $filehash->{'Sequence'} = $filehash->{'Sequence'} + $installer::globals::lastsequence_before_merge;
- }
-
- my $oldline = ${$filecontent}[$linenumber];
- my $newline = get_new_line_for_file_table($filehash);
- ${$filecontent}[$linenumber] = $newline;
-
- $infoline = "Merge, replacing line:\n";
- $installer::logger::Lang->print($infoline);
- $infoline = "Old: $oldline\n";
- $installer::logger::Lang->print($infoline);
- $infoline = "New: $newline\n";
- $installer::logger::Lang->print($infoline);
-
- # Adding files to the files collector (but only once)
- if (( $installer::globals::fix_number_of_cab_files ) && ( ! $installer::globals::mergefiles_added_into_collector ))
- {
- # If the number of cabinet files is kept constant,
- # all files from the mergemodule cabinet files will
- # be integrated into the last office cabinet file
- # (installer::globals::lastcabfilename).
- # Therefore the files must now be added to the filescollector,
- # so that they will be integrated into the ddf files.
-
- # Problem with very long filenames -> copying to shorter filenames
- my $newfilename = "f" . $filehash->{'Sequence'};
- my $completesource = $unpackdir . $installer::globals::separator . $filehash->{'File'};
- my $completedest = $unpackdir . $installer::globals::separator . $newfilename;
- installer::systemactions::copy_one_file($completesource, $completedest);
-
- my $locallastcabfilename = $installer::globals::lastcabfilename;
- if ( $locallastcabfilename =~ /^\s*\#/ ) { $locallastcabfilename =~ s/^\s*\#//; } # removing beginning hashes
-
- # Create new file hash for file collector
- my %newfile = ();
- $newfile{'sequencenumber'} = $filehash->{'Sequence'};
- $newfile{'assignedsequencenumber'} = $filehash->{'Sequence'};
- $newfile{'cabinet'} = $locallastcabfilename;
- $newfile{'sourcepath'} = $completedest;
- $newfile{'componentname'} = $filehash->{'Component'};
- $newfile{'uniquename'} = $filehash->{'File'};
- $newfile{'Name'} = $filehash->{'File'};
-
- # Saving in globals sequence hash
- $installer::globals::uniquefilenamesequence{$filehash->{'File'}} = $filehash->{'Sequence'};
-
- if ( ! -f $newfile{'sourcepath'} ) { installer::exiter::exit_program("ERROR: File \"$newfile{'sourcepath'}\" must exist!", "change_file_table"); }
-
- # Collecting all new files. Attention: This files must be included into files collector in correct order!
- $newfileshash{$filehash->{'Sequence'}} = \%newfile;
- # push(@{$filesref}, \%newfile); -> this is not the correct order
- }
- }
-
- # Now the files can be added to the files collector
- # In the case of an update process, there can be new files, that have to be added after the merge module files.
- # Warning: In multilingual installation sets, the files only have to be added once to the files collector!
-
- if ( ! $installer::globals::mergefiles_added_into_collector )
- {
- foreach my $localsequence ( sort { $a <=> $b } keys %newfileshash ) { push(@{$filesref}, $newfileshash{$localsequence}); }
- if ( $installer::globals::newfilesexist ) { $filesref = sort_files_collector_for_sequence($filesref); }
- # $installer::globals::mergefiles_added_into_collector = 1; -> Not yet. Only if all mergemodules are merged for one language.
- }
-
- # Saving the idt file (for every language)
- installer::files::save_file($idtfilename, $filecontent);
-
- return $filesref;
-}
-
-#########################################################################
-# Reading the file "Director.idt". The Directory, that is defined in scp
-# has to be defined in this table.
-#########################################################################
-
-sub collect_directories
-{
- my $idtfilename = "Director.idt";
- my $filecontent = installer::files::read_file($idtfilename);
-
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- if ( $i <= 2 ) { next; } # ignoring first three lines
- if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
- # Format: Directory Directory_Parent DefaultDir
- if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.*?)\t(.*?)\s*$/ )
- {
- $installer::globals::merge_alldirectory_hash{$1} = 1;
- }
- else
- {
- my $linecount = $i + 1;
- installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "collect_directories");
- }
- }
-}
-
-#########################################################################
-# Reading the file "Feature.idt". The Feature, that is defined in scp
-# has to be defined in this table.
-#########################################################################
-
-sub collect_feature
-{
- my $idtfilename = "Feature.idt";
- if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: Could not find file \"$idtfilename\" in \"$workdir\" !", "collect_feature"); }
- my $filecontent = installer::files::read_file($idtfilename);
-
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- if ( $i <= 2 ) { next; } # ignoring first three lines
- if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
- # Format: Feature Feature_Parent Title Description Display Level Directory_ Attributes
- if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\s*$/ )
- {
- $installer::globals::merge_allfeature_hash{$1} = 1;
- }
- else
- {
- my $linecount = $i + 1;
- installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "collect_feature");
- }
- }
-}
-
-#########################################################################
-# In the featurecomponent table, the new connections have to be added.
-#########################################################################
-
-sub change_featurecomponent_table
-{
- my ($mergemodulehash, $workdir) = @_;
-
- my $infoline = "Changing content of table \"FeatureComponents\"\n";
- $installer::logger::Lang->print($infoline);
-
- my $idtfilename = "FeatureC.idt";
- if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: Could not find file \"$idtfilename\" in \"$workdir\" !", "change_featurecomponent_table"); }
-
- my $filecontent = installer::files::read_file($idtfilename);
-
- # Simply adding for each new component one line. The Feature has to be defined in scp project.
- my $feature = $mergemodulehash->{'feature'};
-
- if ( ! $installer::globals::mergefeaturecollected )
- {
- collect_feature(); # putting content into hash %installer::globals::merge_allfeature_hash
- $installer::globals::mergefeaturecollected = 1;
- }
-
- if ( ! exists($installer::globals::merge_allfeature_hash{$feature}) )
- {
- installer::exiter::exit_program("ERROR: Unknown feature defined in scp: \"$feature\" . Not defined in table \"Feature\" !", "change_featurecomponent_table");
- }
-
- my $component;
- foreach $component ( keys %{$mergemodulehash->{'componentnames'}} )
- {
- my $line = "$feature\t$component\n";
- push(@{$filecontent}, $line);
- $infoline = "Adding line: $line\n";
- $installer::logger::Lang->print($infoline);
- }
-
- # saving file
- installer::files::save_file($idtfilename, $filecontent);
-}
-
-#########################################################################
-# In the directory table, the directory parent has to be changed,
-# if it is not TARGETDIR.
-#########################################################################
-
-sub change_directory_table
-{
- my ($mergemodulehash, $workdir) = @_;
-
- # directory for MergeModule has to be defined in scp project
- my $scpdirectory = $mergemodulehash->{'rootdir'};
-
- if ( $scpdirectory ne "TARGETDIR" ) # TARGETDIR works fine, when using msidb.exe
- {
- my $infoline = "Changing content of table \"Directory\"\n";
- $installer::logger::Lang->print($infoline);
-
- my $idtfilename = "Director.idt";
- if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: Could not find file \"$idtfilename\" in \"$workdir\" !", "change_directory_table"); }
-
- my $filecontent = installer::files::read_file($idtfilename);
-
- if ( ! $installer::globals::mergedirectoriescollected )
- {
- collect_directories(); # putting content into %installer::globals::merge_alldirectory_hash, only first column!
- $installer::globals::mergedirectoriescollected = 1;
- }
-
- if ( ! exists($installer::globals::merge_alldirectory_hash{$scpdirectory}) )
- {
- installer::exiter::exit_program("ERROR: Unknown directory defined in scp: \"$scpdirectory\" . Not defined in table \"Directory\" !", "change_directory_table");
- }
-
- # If the definition in scp is okay, now the complete content of "Director.idt" can be analyzed
- my $merge_directorytablehashref = analyze_directorytable_file($filecontent, $idtfilename);
-
- my $directory;
- foreach $directory (keys %{$mergemodulehash->{'mergedirectories'}} )
- {
- if ( ! exists($merge_directorytablehashref->{$directory}) ) { installer::exiter::exit_program("ERROR: Could not find directory \"$directory\" in \"$idtfilename\" !", "change_directory_table"); }
- my $dirhash = $merge_directorytablehashref->{$directory};
- my $linenumber = $dirhash->{'linenumber'};
-
- # <- this line has to be changed concerning "Directory_Parent",
- # if the current value is "TARGETDIR", which is the default value from msidb.exe
-
- if ( $dirhash->{'Directory_Parent'} eq "TARGETDIR" )
- {
- $dirhash->{'Directory_Parent'} = $scpdirectory;
-
- my $oldline = ${$filecontent}[$linenumber];
- my $newline = get_new_line_for_directory_table($dirhash);
- ${$filecontent}[$linenumber] = $newline;
-
- $infoline = "Merge, replacing line:\n";
- $installer::logger::Lang->print($infoline);
- $infoline = "Old: $oldline\n";
- $installer::logger::Lang->print($infoline);
- $infoline = "New: $newline\n";
- $installer::logger::Lang->print($infoline);
- }
- }
-
- # saving file
- installer::files::save_file($idtfilename, $filecontent);
- }
-}
-
-#########################################################################
-# In the msiassembly table, the feature has to be changed.
-#########################################################################
-
-sub change_msiassembly_table
-{
- my ($mergemodulehash, $workdir) = @_;
-
- my $infoline = "Changing content of table \"MsiAssembly\"\n";
- $installer::logger::Lang->print($infoline);
-
- my $idtfilename = "MsiAssem.idt";
- if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: Could not find file \"$idtfilename\" in \"$workdir\" !", "change_msiassembly_table"); }
-
- my $filecontent = installer::files::read_file($idtfilename);
-
- # feature has to be defined in scp project
- my $feature = $mergemodulehash->{'feature'};
-
- if ( ! $installer::globals::mergefeaturecollected )
- {
- collect_feature(); # putting content into hash %installer::globals::merge_allfeature_hash
- $installer::globals::mergefeaturecollected = 1;
- }
-
- if ( ! exists($installer::globals::merge_allfeature_hash{$feature}) )
- {
- installer::exiter::exit_program("ERROR: Unknown feature defined in scp: \"$feature\" . Not defined in table \"Feature\" !", "change_msiassembly_table");
- }
-
- my $merge_msiassemblytablehashref = analyze_msiassemblytable_file($filecontent, $idtfilename);
-
- my $component;
- foreach $component (keys %{$mergemodulehash->{'mergeassemblies'}} )
- {
- if ( ! exists($merge_msiassemblytablehashref->{$component}) ) { installer::exiter::exit_program("ERROR: Could not find component \"$component\" in \"$idtfilename\" !", "change_msiassembly_table"); }
- my $assemblyhash = $merge_msiassemblytablehashref->{$component};
- my $linenumber = $assemblyhash->{'linenumber'};
-
- # <- this line has to be changed concerning "Feature"
- $assemblyhash->{'Feature'} = $feature;
-
- my $oldline = ${$filecontent}[$linenumber];
- my $newline = get_new_line_for_msiassembly_table($assemblyhash);
- ${$filecontent}[$linenumber] = $newline;
-
- $infoline = "Merge, replacing line:\n";
- $installer::logger::Lang->print($infoline);
- $infoline = "Old: $oldline\n";
- $installer::logger::Lang->print($infoline);
- $infoline = "New: $newline\n";
- $installer::logger::Lang->print($infoline);
- }
-
- # saving file
- installer::files::save_file($idtfilename, $filecontent);
-}
-
-#########################################################################
-# Creating file content hash
-#########################################################################
-
-sub make_executeidtcontent_hash
-{
- my ($filecontent, $idtfilename) = @_;
-
- my %newhash = ();
-
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- if ( $i <= 2 ) { next; } # ignoring first three lines
- if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
- # Format for all sequence tables: Action Condition Sequence
- if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.*?)\t(.*?)\s*$/ )
- {
- my %onehash = ();
- $onehash{'Action'} = $1;
- $onehash{'Condition'} = $2;
- $onehash{'Sequence'} = $3;
- $newhash{$onehash{'Action'}} = \%onehash;
- }
- else
- {
- my $linecount = $i + 1;
- installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "make_executeidtcontent_hash");
- }
- }
-
- return \%newhash;
-}
-
-#########################################################################
-# Creating file content hash
-#########################################################################
-
-sub make_moduleexecuteidtcontent_hash
-{
- my ($filecontent, $idtfilename) = @_;
-
- my %newhash = ();
-
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- if ( $i <= 2 ) { next; } # ignoring first three lines
- if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
- # Format for all module sequence tables: Action Sequence BaseAction After Condition
- if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\s*$/ )
- {
- my %onehash = ();
- $onehash{'Action'} = $1;
- $onehash{'Sequence'} = $2;
- $onehash{'BaseAction'} = $3;
- $onehash{'After'} = $4;
- $onehash{'Condition'} = $5;
- $newhash{$onehash{'Action'}} = \%onehash;
- }
- else
- {
- my $linecount = $i + 1;
- installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "make_executeidtcontent_hash");
- }
- }
-
- return \%newhash;
-}
-
-#########################################################################
-# ExecuteSequence tables need to be merged with
-# ModuleExecuteSequence tables created by msidb.exe.
-#########################################################################
-
-sub change_executesequence_table
-{
- my ($mergemodulehash, $workdir, $idtfilename, $moduleidtfilename) = @_;
-
- my $infoline = "Changing content of table \"$idtfilename\"\n";
- $installer::logger::Lang->print($infoline);
-
- if ( ! -f $idtfilename ) { installer::exiter::exit_program("ERROR: Could not find file \"$idtfilename\" in \"$workdir\" !", "change_executesequence_table"); }
- if ( ! -f $moduleidtfilename ) { installer::exiter::exit_program("ERROR: Could not find file \"$moduleidtfilename\" in \"$workdir\" !", "change_executesequence_table"); }
-
- # Reading file content
- my $idtfilecontent = installer::files::read_file($idtfilename);
- my $moduleidtfilecontent = installer::files::read_file($moduleidtfilename);
-
- # Converting to hash
- my $idtcontenthash = make_executeidtcontent_hash($idtfilecontent, $idtfilename);
- my $moduleidtcontenthash = make_moduleexecuteidtcontent_hash($moduleidtfilecontent, $moduleidtfilename);
-
- # Merging
- foreach my $action ( keys %{$moduleidtcontenthash} )
- {
- if ( exists($idtcontenthash->{$action}) ) { next; } # Action already exists, can be ignored
-
- if (( $idtfilename eq "InstallU.idt" ) && ( ! ( $action =~ /^\s*WindowsFolder\./ ))) { next; } # Only "WindowsFolder.*" CustomActions for UI Sequence table
-
- my $actionhashref = $moduleidtcontenthash->{$action};
- if ( $actionhashref->{'Sequence'} ne "" )
- {
- # Format for all sequence tables: Action Condition Sequence
- my $newline = $actionhashref->{'Action'} . "\t" . $actionhashref->{'Condition'} . "\t" . $actionhashref->{'Sequence'} . "\n";
- # Adding to table
- push(@{$idtfilecontent}, $newline);
- # Also adding to hash
- my %idttablehash = ();
- $idttablehash{'Action'} = $actionhashref->{'Action'};
- $idttablehash{'Condition'} = $actionhashref->{'Condition'};
- $idttablehash{'Sequence'} = $actionhashref->{'Sequence'};
- $idtcontenthash->{$action} = \%idttablehash;
-
- }
- else # no sequence defined, using syntax "BaseAction" and "After"
- {
- my $baseactionname = $actionhashref->{'BaseAction'};
- # If this baseactionname is not defined in execute idt file, it is not possible to merge
- if ( ! exists($idtcontenthash->{$baseactionname}) ) { installer::exiter::exit_program("ERROR: Merge problem: Could not find action \"$baseactionname\" in file \"$idtfilename\" !", "change_executesequence_table"); }
-
- my $baseaction = $idtcontenthash->{$baseactionname};
- my $sequencenumber = $baseaction->{'Sequence'};
- if ( $actionhashref->{'After'} == 1 ) { $sequencenumber = $sequencenumber + 1; }
- else { $sequencenumber = $sequencenumber - 1; }
-
- # Format for all sequence tables: Action Condition Sequence
- my $newline = $actionhashref->{'Action'} . "\t" . $actionhashref->{'Condition'} . "\t" . $sequencenumber . "\n";
- # Adding to table
- push(@{$idtfilecontent}, $newline);
- # Also adding to hash
- my %idttablehash = ();
- $idttablehash{'Action'} = $actionhashref->{'Action'};
- $idttablehash{'Condition'} = $actionhashref->{'Condition'};
- $idttablehash{'Sequence'} = $sequencenumber;
- $idtcontenthash->{$action} = \%idttablehash;
- }
- }
-
- # saving file
- installer::files::save_file($idtfilename, $idtfilecontent);
-}
-
-
-1;
diff --git a/solenv/bin/modules/installer/windows/msiglobal.pm b/solenv/bin/modules/installer/windows/msiglobal.pm
index 24342935643f..a02f20b3a982 100644
--- a/solenv/bin/modules/installer/windows/msiglobal.pm
+++ b/solenv/bin/modules/installer/windows/msiglobal.pm
@@ -166,193 +166,7 @@ sub generate_cab_file_list
if ( $^O =~ /cygwin/i ) { installer::worker::generate_cygwin_pathes($filesref); }
- if ( $installer::globals::use_packages_for_cabs )
- {
- my $sequenceorder = get_sequenceorder($filesref);
-
- my $counter = 1;
- my $currentcabfile = "";
-
- while ( ( exists($sequenceorder->{$counter}) ) || ( exists($installer::globals::allmergemodulefilesequences{$counter}) ) ) # Taking care of files from merge modules
- {
- if ( exists($installer::globals::allmergemodulefilesequences{$counter}) )
- {
- # Skipping this sequence, it is not included in $filesref, because it is assigned to a file from a merge module.\n";
- $counter++;
- next;
- }
-
- # Files with increasing sequencerorder are included in one cab file
- my $onefile = ${$filesref}[$sequenceorder->{$counter}];
- my $cabinetfile = $onefile->{'assignedcabinetfile'};
- my $sourcepath = $onefile->{'sourcepath'};
- if ( $^O =~ /cygwin/i ) { $sourcepath = $onefile->{'cyg_sourcepath'}; }
- my $uniquename = $onefile->{'uniquename'};
-
- my $styles = "";
- my $doinclude = 1;
- if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; };
- if ( $styles =~ /\bDONT_PACK\b/ ) { $doinclude = 0; }
-
- # to avoid lines with more than 256 characters, it can be useful to use relative pathes
- if ( $allvariables->{'RELATIVE_PATHES_IN_DDF'} ) { $sourcepath = make_relative_ddf_path($sourcepath); }
-
- # all files with the same cabinetfile have increasing sequencenumbers
-
- my @ddffile = ();
-
- write_ddf_file_header(\@ddffile, $cabinetfile, $installdir);
-
- my $ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
- if ( $doinclude ) { push(@ddffile, $ddfline); }
-
- $counter++; # increasing the counter
- my $nextfile = "";
- my $nextcabinetfile = "";
- if ( exists($sequenceorder->{$counter}) ) { $nextfile = ${$filesref}[$sequenceorder->{$counter}]; }
- if ( $nextfile->{'assignedcabinetfile'} ) { $nextcabinetfile = $nextfile->{'assignedcabinetfile'}; }
-
- while ( $nextcabinetfile eq $cabinetfile )
- {
- $sourcepath = $nextfile->{'sourcepath'};
- if ( $^O =~ /cygwin/i ) { $sourcepath = $nextfile->{'cyg_sourcepath'}; }
- # to avoid lines with more than 256 characters, it can be useful to use relative pathes
- if ( $allvariables->{'RELATIVE_PATHES_IN_DDF'} ) { $sourcepath = make_relative_ddf_path($sourcepath); }
- $uniquename = $nextfile->{'uniquename'};
- my $localdoinclude = 1;
- my $nextfilestyles = "";
- if ( $nextfile->{'Styles'} ) { $nextfilestyles = $nextfile->{'Styles'}; }
- if ( $nextfilestyles =~ /\bDONT_PACK\b/ ) { $localdoinclude = 0; }
- $ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
- if ( $localdoinclude ) { push(@ddffile, $ddfline); }
-
- $counter++; # increasing the counter!
- $nextcabinetfile = "_lastfile_";
- if ( exists($sequenceorder->{$counter}) )
- {
- $nextfile = ${$filesref}[$sequenceorder->{$counter}];
- $nextcabinetfile = $nextfile->{'assignedcabinetfile'};
- }
- }
-
- # creating the DDF file
-
- my $ddffilename = $cabinetfile;
- $ddffilename =~ s/.cab/.ddf/;
- $ddfdir =~ s/\Q$installer::globals::separator\E\s*$//;
- $ddffilename = $ddfdir . $installer::globals::separator . $ddffilename;
-
- installer::files::save_file($ddffilename ,\@ddffile);
- my $infoline = "Created ddf file: $ddffilename\n";
- $installer::logger::Lang->print($infoline);
-
- # lines in ddf files must not be longer than 256 characters
- check_ddf_file(\@ddffile, $ddffilename);
-
- # Writing the makecab system call
-
- my $oneline = "makecab.exe /V3 /F " . $ddffilename . " 2\>\&1 |" . "\n";
-
- push(@cabfilelist, $oneline);
-
- # collecting all ddf files
- push(@installer::globals::allddffiles, $ddffilename);
- }
- }
- elsif ((( $installer::globals::cab_file_per_component ) || ( $installer::globals::fix_number_of_cab_files )) && ( $installer::globals::updatedatabase ))
- {
- my $sequenceorder = get_sequenceorder($filesref);
-
- my $counter = 1;
- my $currentcabfile = "";
-
- while ( ( exists($sequenceorder->{$counter}) ) || ( exists($installer::globals::allmergemodulefilesequences{$counter}) ) ) # Taking care of files from merge modules
- {
-# if ( exists($installer::globals::allmergemodulefilesequences{$counter}) )
-# {
-# # Skipping this sequence, it is not included in $filesref, because it is assigned to a file from a merge module.\n";
-# $counter++;
-# next;
-# }
-
- my $onefile = ${$filesref}[$sequenceorder->{$counter}];
- $counter++;
-
- my $cabinetfile = $onefile->{'cabinet'};
- my $sourcepath = $onefile->{'sourcepath'};
- if ( $^O =~ /cygwin/i ) { $sourcepath = $onefile->{'cyg_sourcepath'}; }
- my $uniquename = $onefile->{'uniquename'};
-
- my $styles = "";
- my $doinclude = 1;
- if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; };
- if ( $styles =~ /\bDONT_PACK\b/ ) { $doinclude = 0; }
-
- # to avoid lines with more than 256 characters, it can be useful to use relative pathes
- if ( $allvariables->{'RELATIVE_PATHES_IN_DDF'} ) { $sourcepath = make_relative_ddf_path($sourcepath); }
-
- my @ddffile = ();
-
- write_ddf_file_header(\@ddffile, $cabinetfile, $installdir);
-
- my $ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
- if ( $doinclude ) { push(@ddffile, $ddfline); }
-
- my $nextfile = "";
- if ( ${$filesref}[$sequenceorder->{$counter}] ) { $nextfile = ${$filesref}[$sequenceorder->{$counter}]; }
-
- my $nextcabinetfile = "";
-
- if ( $nextfile->{'cabinet'} ) { $nextcabinetfile = $nextfile->{'cabinet'}; }
-
- while ( $nextcabinetfile eq $cabinetfile )
- {
- $sourcepath = $nextfile->{'sourcepath'};
- if ( $^O =~ /cygwin/i ) { $sourcepath = $nextfile->{'cyg_sourcepath'}; }
- # to avoid lines with more than 256 characters, it can be useful to use relative pathes
- if ( $allvariables->{'RELATIVE_PATHES_IN_DDF'} ) { $sourcepath = make_relative_ddf_path($sourcepath); }
- $uniquename = $nextfile->{'uniquename'};
- my $localdoinclude = 1;
- my $nextfilestyles = "";
- if ( $nextfile->{'Styles'} ) { $nextfilestyles = $nextfile->{'Styles'}; }
- if ( $nextfilestyles =~ /\bDONT_PACK\b/ ) { $localdoinclude = 0; }
- $ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
- if ( $localdoinclude ) { push(@ddffile, $ddfline); }
- $counter++; # increasing the counter!
- $nextfile = "";
- $nextcabinetfile = "_lastfile_";
- if (( exists($sequenceorder->{$counter}) ) && ( ${$filesref}[$sequenceorder->{$counter}] ))
- {
- $nextfile = ${$filesref}[$sequenceorder->{$counter}];
- $nextcabinetfile = $nextfile->{'cabinet'};
- }
- }
-
- # creating the DDF file
-
- my $ddffilename = $cabinetfile;
- $ddffilename =~ s/.cab/.ddf/;
- $ddfdir =~ s/\Q$installer::globals::separator\E\s*$//;
- $ddffilename = $ddfdir . $installer::globals::separator . $ddffilename;
-
- installer::files::save_file($ddffilename ,\@ddffile);
- my $infoline = "Created ddf file: $ddffilename\n";
- $installer::logger::Lang->print($infoline);
-
- # lines in ddf files must not be longer than 256 characters
- check_ddf_file(\@ddffile, $ddffilename);
-
- # Writing the makecab system call
-
- my $oneline = "makecab.exe /V3 /F " . $ddffilename . " 2\>\&1 |" . "\n";
-
- push(@cabfilelist, $oneline);
-
- # collecting all ddf files
- push(@installer::globals::allddffiles, $ddffilename);
- }
- }
- elsif (( $installer::globals::cab_file_per_component ) || ( $installer::globals::fix_number_of_cab_files ))
+ if ( $installer::globals::fix_number_of_cab_files )
{
for ( my $i = 0; $i <= $#{$filesref}; $i++ )
{
@@ -428,69 +242,6 @@ sub generate_cab_file_list
push(@installer::globals::allddffiles, $ddffilename);
}
}
- elsif (( $installer::globals::one_cab_file ) && ( $installer::globals::updatedatabase ))
- {
- my $sequenceorder = get_sequenceorder($filesref);
-
- my $counter = 1;
- my $currentcabfile = "";
-
- while ( ( exists($sequenceorder->{$counter}) ) || ( exists($installer::globals::allmergemodulefilesequences{$counter}) ) ) # Taking care of files from merge modules
- {
- if ( exists($installer::globals::allmergemodulefilesequences{$counter}) )
- {
- # Skipping this sequence, it is not included in $filesref, because it is assigned to a file from a merge module.\n";
- $counter++;
- next;
- }
-
- my $onefile = ${$filesref}[$sequenceorder->{$counter}];
-
- $cabinetfile = $onefile->{'cabinet'};
- my $sourcepath = $onefile->{'sourcepath'};
- if ( $^O =~ /cygwin/i ) { $sourcepath = $onefile->{'cyg_sourcepath'}; }
- my $uniquename = $onefile->{'uniquename'};
-
- # to avoid lines with more than 256 characters, it can be useful to use relative pathes
- if ( $allvariables->{'RELATIVE_PATHES_IN_DDF'} ) { $sourcepath = make_relative_ddf_path($sourcepath); }
-
- if ( $counter == 1 ) { write_ddf_file_header(\@ddffile, $cabinetfile, $installdir); }
-
- my $styles = "";
- my $doinclude = 1;
- if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; };
- if ( $styles =~ /\bDONT_PACK\b/ ) { $doinclude = 0; }
-
- my $ddfline = "\"" . $sourcepath . "\"" . " " . $uniquename . "\n";
- if ( $doinclude ) { push(@ddffile, $ddfline); }
-
- $counter++; # increasing the counter
- }
-
- # creating the DDF file
-
- my $ddffilename = $cabinetfile;
- $ddffilename =~ s/.cab/.ddf/;
- $ddfdir =~ s/[\/\\]\s*$//;
- $ddffilename = $ddfdir . $installer::globals::separator . $ddffilename;
-
- installer::files::save_file($ddffilename ,\@ddffile);
- my $infoline = "Created ddf file: $ddffilename\n";
- $installer::logger::Lang->print($infoline);
-
- # lines in ddf files must not be longer than 256 characters
- check_ddf_file(\@ddffile, $ddffilename);
-
- # Writing the makecab system call
-
- # my $oneline = "makecab.exe /F " . $ddffilename . "\n";
- my $oneline = "makecab.exe /V3 /F " . $ddffilename . " 2\>\&1 |" . "\n";
-
- push(@cabfilelist, $oneline);
-
- # collecting all ddf files
- push(@installer::globals::allddffiles, $ddffilename);
- }
elsif ( $installer::globals::one_cab_file )
{
my @ddffile = ();
@@ -1405,28 +1156,6 @@ sub copy_windows_installer_files_into_installset
}
#################################################################
-# Copying MergeModules for the Windows installer into the
-# installation set. The list of MergeModules is located
-# in %installer::globals::copy_msm_files
-#################################################################
-
-sub copy_merge_modules_into_installset
-{
- my ($installdir) = @_;
-
- installer::logger::include_header_into_logfile("Copying Merge files into installation set");
-
- my $cabfile;
- foreach $cabfile ( keys %installer::globals::copy_msm_files )
- {
- my $sourcefile = $installer::globals::copy_msm_files{$cabfile};
- my $destfile = $installdir . $installer::globals::separator . $cabfile;
-
- installer::systemactions::copy_one_file($sourcefile, $destfile);
- }
-}
-
-#################################################################
# Copying the child projects into the
# installation set
#################################################################
@@ -2016,11 +1745,7 @@ sub set_global_code_variables
}
# ProductCode must not change, if Windows patches shall be applied
- if ( $installer::globals::updatedatabase )
- {
- $installer::globals::productcode = $alloldproperties->{'ProductCode'};
- }
- elsif ( $installer::globals::prepare_winpatch )
+ if ( $installer::globals::prepare_winpatch )
{
# ProductCode has to be specified in each language
my $searchstring = "PRODUCTCODE";
diff --git a/solenv/bin/modules/installer/windows/msp.pm b/solenv/bin/modules/installer/windows/msp.pm
deleted file mode 100644
index 735377439fc5..000000000000
--- a/solenv/bin/modules/installer/windows/msp.pm
+++ /dev/null
@@ -1,1493 +0,0 @@
-#**************************************************************
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#**************************************************************
-
-
-
-package installer::windows::msp;
-
-use File::Copy;
-use installer::control;
-use installer::converter;
-use installer::exiter;
-use installer::files;
-use installer::globals;
-use installer::logger;
-use installer::pathanalyzer;
-use installer::systemactions;
-use installer::windows::admin;
-use installer::windows::idtglobal;
-use installer::windows::update;
-
-#################################################################################
-# Making all required administrative installations
-#################################################################################
-
-sub install_installation_sets
-{
- my ($installationdir) = @_;
-
- # Finding the msi database in the new installation set, that is located in $installationdir
-
- my $msifiles = installer::systemactions::find_file_with_file_extension("msi", $installationdir);
-
- if ( $#{$msifiles} < 0 ) { installer::exiter::exit_program("ERROR: Did not find msi database in directory $installationdir", "create_msp_patch"); }
- if ( $#{$msifiles} > 0 ) { installer::exiter::exit_program("ERROR: Did find more than one msi database in directory $installationdir", "create_msp_patch"); }
-
- my $newinstallsetdatabasepath = $installationdir . $installer::globals::separator . ${$msifiles}[0];
- my $oldinstallsetdatabasepath = $installer::globals::updatedatabasepath;
-
- # Creating temp directory again
- installer::systemactions::create_directory_structure($installer::globals::temppath);
-
- # Creating old installation directory
- my $dirname = "admin";
- my $installpath = $installer::globals::temppath . $installer::globals::separator . $dirname;
- if ( ! -d $installpath) { installer::systemactions::create_directory($installpath); }
-
- my $oldinstallpath = $installpath . $installer::globals::separator . "old";
- my $newinstallpath = $installpath . $installer::globals::separator . "new";
-
- if ( ! -d $oldinstallpath) { installer::systemactions::create_directory($oldinstallpath); }
- if ( ! -d $newinstallpath) { installer::systemactions::create_directory($newinstallpath); }
-
- my $olddatabase = installer::windows::admin::make_admin_install($oldinstallsetdatabasepath, $oldinstallpath);
- my $newdatabase = installer::windows::admin::make_admin_install($newinstallsetdatabasepath, $newinstallpath);
-
- if ( $^O =~ /cygwin/i ) {
- $olddatabase = qx{cygpath -w "$olddatabase"};
- $olddatabase =~ s/\s*$//g;
- $newdatabase = qx{cygpath -w "$newdatabase"};
- $newdatabase =~ s/\s*$//g;
- }
-
- return ($olddatabase, $newdatabase);
-}
-
-#################################################################################
-# Collecting the destinations of all files with flag PATCH in a hash.
-#################################################################################
-
-sub collect_patch_file_destinations
-{
- my ( $filesarray ) = @_;
-
- my %patchfiledestinations = ();
- my %nopatchfiledestinations = ();
- my $patchcounter = 0;
- my $nopatchcounter = 0;
-
- for ( my $i = 0; $i <= $#{$filesarray}; $i++ )
- {
- my $onefile = ${$filesarray}[$i];
- my $styles = "";
-
- if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'} };
-
- if ( $styles =~ /\bPATCH\b/ )
- {
- $patchfiledestinations{$onefile->{'destination'}} = 1;
- $patchcounter++;
- }
- else
- {
- $nopatchfiledestinations{$onefile->{'destination'}} = 1;
- $nopatchcounter++;
- }
- }
-
- return (\%patchfiledestinations, \%nopatchfiledestinations, $patchcounter, $nopatchcounter);
-}
-
-#################################################################################
-# Returning the first path segment of a path
-#################################################################################
-
-sub get_first_path_segment
-{
- my ( $path ) = @_;
-
- my $firstsegment = "";
- my $remainder = $path;
-
- if ( $path =~ /^\s*(.*?)[\/\\](.*)\s*$/ )
- {
- $firstsegment = $1;
- $remainder = $2;
- }
-
- return ($firstsegment, $remainder);
-}
-
-#################################################################################
-# Finding the flexible path in the destinations, that are saved in
-# the hash $nopatchfiledestinations.
-#################################################################################
-
-sub prepare_path_in_nopatchfilehash
-{
- my ($nopatchfiledestinations, $newpath) = @_;
-
- my $infoline = "";
- my $flexiblepath = "";
- my $found = 0;
- my %checked_destinations = ();
-
- foreach my $onedestination ( keys %{$nopatchfiledestinations} )
- {
- $flexiblepath = "";
- $found = 0;
-
- my $found_first_segement = 1;
- my $firstsegement = "";
- my $fixedpath = $onedestination;
- my $testfile = $newpath . $installer::globals::separator . $fixedpath;
-
- while (( ! -f $testfile ) && ( $found_first_segement ))
- {
- $firstsegement = "";
- ( $firstsegement, $fixedpath ) = get_first_path_segment($fixedpath);
-
- if ( $firstsegement ne "" )
- {
- $found_first_segement = 1;
- $flexiblepath = $flexiblepath . $firstsegement . $installer::globals::separator;
- }
- else
- {
- $found_first_segement = 0;
- }
-
- $testfile = $newpath . $installer::globals::separator . $fixedpath;
- }
-
- if ( -f $testfile ) { $found = 1; }
-
- if ( $found ) { last; }
- }
-
- if ( ! $found ) { installer::exiter::exit_program("ERROR: Could not determine flexible destination path for msp patch creation!", "prepare_path_in_nopatchfilehash"); }
-
- $infoline = "Setting flexible path for msp creation: $flexiblepath\n";
- $installer::logger::Lang->print($infoline);
-
- foreach my $onedestination ( keys %{$nopatchfiledestinations} )
- {
- $onedestination =~ s/^\s*\Q$flexiblepath\E//;
- $checked_destinations{$onedestination} = 1;
- }
-
- return \%checked_destinations;
-}
-
-#################################################################################
-# Synchronizing the two installed products in that way, that only
-# files with flag PATCH are different.
-#################################################################################
-
-sub synchronize_installation_sets
-{
- my ($olddatabase, $newdatabase, $filesarray) = @_;
-
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->print("Synchronizing installed products because of PATCH flag\n");
- $infoline = "Old product: $olddatabase\n";
- $installer::logger::Lang->print($infoline);
- $infoline = "New product: $newdatabase\n";
- $installer::logger::Lang->print($infoline);
-
- my ( $patchfiledestinations, $nopatchfiledestinations, $patchfilecounter, $nopatchfilecounter ) = collect_patch_file_destinations($filesarray);
-
- $infoline = "Number of files with PATCH flag: $patchfilecounter\n";
- $installer::logger::Lang->print($infoline);
-
- $infoline = "Number of files without PATCH flag: $nopatchfilecounter\n";
- $installer::logger::Lang->print($infoline);
-
- foreach my $localfile ( sort keys %{$patchfiledestinations} )
- {
- $infoline = "\tPATCH file: $localfile\n";
- $installer::logger::Lang->print($infoline);
- }
-
- my $oldpath = $olddatabase;
- if ( $^O =~ /cygwin/i ) { $oldpath =~ s/\\/\//g; }
- installer::pathanalyzer::get_path_from_fullqualifiedname(\$oldpath);
- $oldpath =~ s/\\\s*$//;
- $oldpath =~ s/\/\s*$//;
-
- my $newpath = $newdatabase;
- if ( $^O =~ /cygwin/i ) { $newpath =~ s/\\/\//g; }
- installer::pathanalyzer::get_path_from_fullqualifiedname(\$newpath);
- $newpath =~ s/\\\s*$//;
- $newpath =~ s/\/\s*$//;
-
- # The destination path is not correct. destinations in the hash contain
- # the flexible installation path, that is not part in the administrative installation
- $nopatchfiledestinations = prepare_path_in_nopatchfilehash($nopatchfiledestinations, $newpath);
-
- foreach my $onedestination ( keys %{$nopatchfiledestinations} )
- {
- my $source = $oldpath . $installer::globals::separator . $onedestination;
- my $dest = $newpath . $installer::globals::separator . $onedestination;
-
- if ( -f $source )
- {
- if ( -f $dest )
- {
- my $copyreturn = copy($source, $dest);
- # installer::systemactions::copy_one_file($source, $dest);
- # $infoline = "Synchronizing file: $source to $dest\n";
- # $installer::logger::Lang->print($infoline);
- }
- else
- {
- $infoline = "Not synchronizing. Destination file \"$dest\" does not exist.\n";
- $installer::logger::Lang->print($infoline);
- }
- }
- else
- {
- $infoline = "Not synchronizing. Source file \"$source\" does not exist.\n";
- $installer::logger::Lang->print($infoline);
- }
- }
-}
-
-#################################################################################
-# Extracting all tables from a pcp file
-#################################################################################
-
-sub extract_all_tables_from_pcpfile
-{
- my ($fullpcpfilepath, $workdir) = @_;
-
- my $msidb = "msidb.exe"; # Has to be in the path
- my $infoline = "";
- my $systemcall = "";
- my $returnvalue = "";
- my $extraslash = ""; # Has to be set for non-ActiveState perl
-
- my $localfullpcpfile = $fullpcpfilepath;
- my $localworkdir = $workdir;
-
- if ( $^O =~ /cygwin/i ) {
- # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
- $localfullpcpfile =~ s/\//\\\\/g;
- $localworkdir =~ s/\//\\\\/g;
- $extraslash = "\\";
- }
-
- # Export of all tables by using "*"
-
- $systemcall = $msidb . " -d " . $localfullpcpfile . " -f " . $localworkdir . " -e " . $extraslash . "*";
- $returnvalue = system($systemcall);
-
- $infoline = "Systemcall: $systemcall\n";
- $installer::logger::Lang->print($infoline);
-
- if ($returnvalue)
- {
- $infoline = "ERROR: Could not execute $systemcall !\n";
- $installer::logger::Lang->print($infoline);
- installer::exiter::exit_program("ERROR: Could not exclude tables from pcp file: $fullpcpfilepath !", "extract_all_tables_from_msidatabase");
- }
- else
- {
- $infoline = "Success: Executed $systemcall successfully!\n";
- $installer::logger::Lang->print($infoline);
- }
-}
-
-#################################################################################
-# Include tables into a pcp file
-#################################################################################
-
-sub include_tables_into_pcpfile
-{
- my ($fullpcpfilepath, $workdir, $tables) = @_;
-
- my $msidb = "msidb.exe"; # Has to be in the path
- my $infoline = "";
- my $systemcall = "";
- my $returnvalue = "";
-
- # Make all table 8+3 conform
- my $alltables = installer::converter::convert_stringlist_into_array(\$tables, " ");
-
- for ( my $i = 0; $i <= $#{$alltables}; $i++ )
- {
- my $tablename = ${$alltables}[$i];
- $tablename =~ s/\s*$//;
- my $namelength = length($tablename);
- if ( $namelength > 8 )
- {
- my $newtablename = substr($tablename, 0, 8); # name, offset, length
- my $oldfile = $workdir . $installer::globals::separator . $tablename . ".idt";
- my $newfile = $workdir . $installer::globals::separator . $newtablename . ".idt";
- if ( -f $newfile ) { unlink $newfile; }
- installer::systemactions::copy_one_file($oldfile, $newfile);
- }
- }
-
- # Import of tables
-
- my $localworkdir = $workdir;
- my $localfullpcpfilepath = $fullpcpfilepath;
-
- if ( $^O =~ /cygwin/i ) {
- # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
- $localfullpcpfilepath =~ s/\//\\\\/g;
- $localworkdir =~ s/\//\\\\/g;
- }
-
- $systemcall = $msidb . " -d " . $localfullpcpfilepath . " -f " . $localworkdir . " -i " . $tables;
-
- $returnvalue = system($systemcall);
-
- $infoline = "Systemcall: $systemcall\n";
- $installer::logger::Lang->print($infoline);
-
- if ($returnvalue)
- {
- $infoline = "ERROR: Could not execute $systemcall !\n";
- $installer::logger::Lang->print($infoline);
- installer::exiter::exit_program("ERROR: Could not include tables into pcp file: $fullpcpfilepath !", "include_tables_into_pcpfile");
- }
- else
- {
- $infoline = "Success: Executed $systemcall successfully!\n";
- $installer::logger::Lang->print($infoline);
- }
-}
-
-#################################################################################
-# Calling msimsp.exe
-#################################################################################
-
-sub execute_msimsp
-{
- my ($fullpcpfilename, $mspfilename, $localmspdir) = @_;
-
- my $msimsp = "msimsp.exe"; # Has to be in the path
- my $infoline = "";
- my $systemcall = "";
- my $returnvalue = "";
- my $logfilename = $localmspdir . $installer::globals::separator . "msimsp.log";
-
- # Using a specific temp for each msimsp.exe process
- # Creating temp directory again (should already have happened)
- installer::systemactions::create_directory_structure($installer::globals::temppath);
-
- # Creating old installation directory
- my $dirname = "msimsptemp";
- my $msimsptemppath = $installer::globals::temppath . $installer::globals::separator . $dirname;
- if ( ! -d $msimsptemppath) { installer::systemactions::create_directory($msimsptemppath); }
-
- # r:\msvc9p\PlatformSDK\v6.1\bin\msimsp.exe -s c:\patch\hotfix_qfe1.pcp -p c:\patch\patch_ooo3_m2_m3.msp -l c:\patch\patch_ooo3_m2_m3.log
-
- if ( -f $logfilename ) { unlink $logfilename; }
-
- my $localfullpcpfilename = $fullpcpfilename;
- my $localmspfilename = $mspfilename;
- my $locallogfilename = $logfilename;
- my $localmsimsptemppath = $msimsptemppath;
-
- if ( $^O =~ /cygwin/i ) {
- # msimsp.exe really wants backslashes. (And double escaping because system() expands the string.)
- $localfullpcpfilename =~ s/\//\\\\/g;
- $locallogfilename =~ s/\//\\\\/g;
-
- $localmspfilename =~ s/\\/\\\\/g; # path already contains backslash
- # $localmspfilename =~ s/\//\\\\/g;
-
- $localmsimsptemppath = qx{cygpath -w "$localmsimsptemppath"};
- $localmsimsptemppath =~ s/\\/\\\\/g;
- $localmsimsptemppath =~ s/\s*$//g;
- }
-
- $systemcall = $msimsp . " -s " . $localfullpcpfilename . " -p " . $localmspfilename . " -l " . $locallogfilename . " -f " . $localmsimsptemppath;
- $installer::logger::Info->printf("... %s ...\n", $systemcall);
-
- $returnvalue = system($systemcall);
-
- $infoline = "Systemcall: $systemcall\n";
- $installer::logger::Lang->print($infoline);
-
- if ($returnvalue)
- {
- $infoline = "ERROR: Could not execute $systemcall !\n";
- $installer::logger::Lang->print($infoline);
- installer::exiter::exit_program("ERROR: Could not execute $systemcall !", "execute_msimsp");
- }
- else
- {
- $infoline = "Success: Executed $systemcall successfully!\n";
- $installer::logger::Lang->print($infoline);
- }
-
- return $logfilename;
-}
-
-####################################################################
-# Checking existence and saving all tables, that need to be edited
-####################################################################
-
-sub check_and_save_tables
-{
- my ($tablelist, $workdir) = @_;
-
- my $tables = installer::converter::convert_stringlist_into_array(\$tablelist, " ");
-
- for ( my $i = 0; $i <= $#{$tables}; $i++ )
- {
- my $filename = ${$tables}[$i];
- $filename =~ s/\s*$//;
- my $fullfilename = $workdir . $installer::globals::separator . $filename . ".idt";
-
- if ( ! -f $fullfilename ) { installer::exiter::exit_program("ERROR: Required idt file could not be found: \"$fullfilename\"!", "check_and_save_tables"); }
-
- my $savfilename = $fullfilename . ".sav";
- installer::systemactions::copy_one_file($fullfilename, $savfilename);
- }
-}
-
-####################################################################
-# Setting the languages for the service packs
-####################################################################
-
-sub create_langstring
-{
- my ( $languagesarrayref ) = @_;
-
- my $langstring = "";
- for ( my $i = 0; $i <= $#{$languagesarrayref}; $i++ ) { $langstring = $langstring . "_" . ${$languagesarrayref}[$i]; }
-
- return $langstring;
-}
-
-####################################################################
-# Setting the name of the msp database
-####################################################################
-
-sub set_mspfilename
-{
- my ($allvariables, $mspdir, $languagesarrayref) = @_;
-
- my $databasename = $allvariables->{'PRODUCTNAME'};
- $databasename = lc($databasename);
- $databasename =~ s/\.//g;
- $databasename =~ s/\-//g;
- $databasename =~ s/\s//g;
-
- if ( $allvariables->{'MSPPRODUCTVERSION'} ) { $databasename = $databasename . $allvariables->{'MSPPRODUCTVERSION'}; }
-
- # possibility to overwrite the name with variable DATABASENAME
- # if ( $allvariables->{'DATABASENAME'} ) { $databasename = $allvariables->{'DATABASENAME'}; }
-
- # Adding patch info to database name
- # if ( $installer::globals::buildid ) { $databasename = $databasename . "_" . $installer::globals::buildid; }
-
- # if ( $allvariables->{'VENDORPATCHVERSION'} ) { $databasename = $databasename . "_" . $allvariables->{'VENDORPATCHVERSION'}; }
-
-
- if (( $allvariables->{'SERVICEPACK'} ) && ( $allvariables->{'SERVICEPACK'} == 1 ))
- {
- my $windowspatchlevel = 0;
- if ( $allvariables->{'MSPPATCHLEVEL'} ) { $windowspatchlevel = $allvariables->{'MSPPATCHLEVEL'}; }
- $databasename = $databasename . "_servicepack_" . $windowspatchlevel;
- my $languagestring = create_langstring($languagesarrayref);
- $databasename = $databasename . $languagestring;
- }
- else
- {
- my $hotfixaddon = "hotfix_";
- $hotfixaddon = $hotfixaddon . $installer::globals::buildid;
- my $cwsname = "";
- if ( $ENV{'CWS_WORK_STAMP'} ) { $hotfixaddon = $ENV{'CWS_WORK_STAMP'}; }
- if ( $allvariables->{'OVERWRITE_CWSNAME'} ) { $hotfixaddon = $allvariables->{'OVERWRITE_CWSNAME'}; }
- $databasename = $databasename . "_" . $hotfixaddon;
- }
-
- $databasename = $databasename . ".msp";
-
- my $fullmspname = $mspdir . $installer::globals::separator . $databasename;
-
- if ( $^O =~ /cygwin/i ) { $fullmspname =~ s/\//\\/g; }
-
- return $fullmspname;
-}
-
-####################################################################
-# Editing table Properties
-####################################################################
-
-sub change_properties_table
-{
- my ($localmspdir, $mspfilename) = @_;
-
- my $infoline = "Changing content of table \"Properties\"\n";
- $installer::logger::Lang->print($infoline);
-
- my $filename = $localmspdir . $installer::globals::separator . "Properties.idt";
- if ( ! -f $filename ) { installer::exiter::exit_program("ERROR: Could not find file \"$filename\" !", "change_properties_table"); }
-
- my $filecontent = installer::files::read_file($filename);
-
-
- my $guidref = installer::windows::msiglobal::get_guid_list(1, 1);
- ${$guidref}[0] =~ s/\s*$//; # removing ending spaces
- my $patchcode = "\{" . ${$guidref}[0] . "\}";
-
- # Setting "PatchOutputPath"
- my $found_patchoutputpath = 0;
- my $found_patchguid = 0;
-
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- if ( ${$filecontent}[$i] =~ /^\s*PatchOutputPath\t(.*?)\s*$/ )
- {
- my $oldvalue = $1;
- ${$filecontent}[$i] =~ s/\Q$oldvalue\E/$mspfilename/;
- $found_patchoutputpath = 1;
- }
-
- if ( ${$filecontent}[$i] =~ /^\s*PatchGUID\t(.*?)\s*$/ )
- {
- my $oldvalue = $1;
- ${$filecontent}[$i] =~ s/\Q$oldvalue\E/$patchcode/;
- $found_patchguid = 1;
- }
- }
-
- if ( ! $found_patchoutputpath )
- {
- my $newline = "PatchOutputPath\t$mspfilename\n";
- push(@{$filecontent}, $newline);
- }
-
- if ( ! $found_patchguid )
- {
- my $newline = "PatchGUID\t$patchcode\n";
- push(@{$filecontent}, $newline);
- }
-
- # saving file
- installer::files::save_file($filename, $filecontent);
-}
-
-####################################################################
-# Editing table TargetImages
-####################################################################
-
-sub change_targetimages_table
-{
- my ($localmspdir, $olddatabase) = @_;
-
- my $infoline = "Changing content of table \"TargetImages\"\n";
- $installer::logger::Lang->print($infoline);
-
- my $filename = $localmspdir . $installer::globals::separator . "TargetImages.idt";
- if ( ! -f $filename ) { installer::exiter::exit_program("ERROR: Could not find file \"$filename\" !", "change_targetimages_table"); }
-
- my $filecontent = installer::files::read_file($filename);
- my @newcontent = ();
-
- # Copying the header
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ ) { if ( $i < 3 ) { push(@newcontent, ${$filecontent}[$i]); } }
-
- #Adding all targets
- my $newline = "T1\t$olddatabase\t\tU1\t1\t0x00000922\t1\n";
- push(@newcontent, $newline);
-
- # saving file
- installer::files::save_file($filename, \@newcontent);
-}
-
-####################################################################
-# Editing table UpgradedImages
-####################################################################
-
-sub change_upgradedimages_table
-{
- my ($localmspdir, $newdatabase) = @_;
-
- my $infoline = "Changing content of table \"UpgradedImages\"\n";
- $installer::logger::Lang->print($infoline);
-
- my $filename = $localmspdir . $installer::globals::separator . "UpgradedImages.idt";
- if ( ! -f $filename ) { installer::exiter::exit_program("ERROR: Could not find file \"$filename\" !", "change_upgradedimages_table"); }
-
- my $filecontent = installer::files::read_file($filename);
- my @newcontent = ();
-
- # Copying the header
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ ) { if ( $i < 3 ) { push(@newcontent, ${$filecontent}[$i]); } }
-
- # Syntax: Upgraded MsiPath PatchMsiPath SymbolPaths Family
-
- # default values
- my $upgraded = "U1";
- my $msipath = $newdatabase;
- my $patchmsipath = "";
- my $symbolpaths = "";
- my $family = "22334455";
-
- if ( $#{$filecontent} >= 3 )
- {
- my $line = ${$filecontent}[3];
- if ( $line =~ /^\s*(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\s*$/ )
- {
- $upgraded = $1;
- $patchmsipath = $3;
- $symbolpaths = $4;
- $family = $5;
- }
- }
-
- #Adding sequence line, saving PatchFamily
- my $newline = "$upgraded\t$msipath\t$patchmsipath\t$symbolpaths\t$family\n";
- push(@newcontent, $newline);
-
- # saving file
- installer::files::save_file($filename, \@newcontent);
-}
-
-####################################################################
-# Editing table ImageFamilies
-####################################################################
-
-sub change_imagefamilies_table
-{
- my ($localmspdir) = @_;
-
- my $infoline = "Changing content of table \"ImageFamilies\"\n";
- $installer::logger::Lang->print($infoline);
-
- my $filename = $localmspdir . $installer::globals::separator . "ImageFamilies.idt";
- if ( ! -f $filename ) { installer::exiter::exit_program("ERROR: Could not find file \"$filename\" !", "change_imagefamilies_table"); }
-
- my $filecontent = installer::files::read_file($filename);
- my @newcontent = ();
-
- # Copying the header
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ ) { if ( $i < 3 ) { push(@newcontent, ${$filecontent}[$i]); } }
-
- # Syntax: Family MediaSrcPropName MediaDiskId FileSequenceStart DiskPrompt VolumeLabel
- # "FileSequenceStart has to be set
-
- # Default values:
-
- my $family = "22334455";
- my $mediasrcpropname = "MediaSrcPropName";
- my $mediadiskid = "2";
- my $filesequencestart = get_filesequencestart();
- my $diskprompt = "";
- my $volumelabel = "";
-
- if ( $#{$filecontent} >= 3 )
- {
- my $line = ${$filecontent}[3];
- if ( $line =~ /^\s*(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\s*$/ )
- {
- $family = $1;
- $mediasrcpropname = $2;
- $mediadiskid = $3;
- $diskprompt = $5;
- $volumelabel = $6;
- }
- }
-
- #Adding sequence line
- my $newline = "$family\t$mediasrcpropname\t$mediadiskid\t$filesequencestart\t$diskprompt\t$volumelabel\n";
- push(@newcontent, $newline);
-
- # saving file
- installer::files::save_file($filename, \@newcontent);
-}
-
-####################################################################
-# Setting start sequence for patch
-####################################################################
-
-sub get_filesequencestart
-{
- my $sequence = 1000; # default
-
- if ( $installer::globals::updatelastsequence ) { $sequence = $installer::globals::updatelastsequence + 500; }
-
- return $sequence;
-}
-
-####################################################################
-# Setting time value into pcp file
-# Format mm/dd/yyyy hh:mm
-####################################################################
-
-sub get_patchtime_value
-{
- # Syntax: 8/8/2008 11:55
- my $minute = (localtime())[1];
- my $hour = (localtime())[2];
- my $day = (localtime())[3];
- my $month = (localtime())[4];
- my $year = 1900 + (localtime())[5];
-
- $month++; # zero based month
- if ( $minute < 10 ) { $minute = "0" . $minute; }
- if ( $hour < 10 ) { $hour = "0" . $hour; }
-
- my $timestring = $month . "/" . $day . "/" . $year . " " . $hour . ":" . $minute;
-
- return $timestring;
-}
-
-#################################################################################
-# Checking, if this is the correct database.
-#################################################################################
-
-sub correct_langs
-{
- my ($langs, $languagestringref) = @_;
-
- my $correct_langs = 0;
-
- # Comparing $langs with $languagestringref
-
- my $langlisthash = installer::converter::convert_stringlist_into_hash(\$langs, ",");
- my $langstringhash = installer::converter::convert_stringlist_into_hash($languagestringref, "_");
-
- my $not_included = 0;
- foreach my $onelang ( keys %{$langlisthash} )
- {
- if ( ! exists($langstringhash->{$onelang}) )
- {
- $not_included = 1;
- last;
- }
- }
-
- if ( ! $not_included )
- {
- foreach my $onelanguage ( keys %{$langstringhash} )
- {
- if ( ! exists($langlisthash->{$onelanguage}) )
- {
- $not_included = 1;
- last;
- }
- }
-
- if ( ! $not_included ) { $correct_langs = 1; }
- }
-
- return $correct_langs;
-}
-
-#################################################################################
-# Searching for the path to the reference database for this special product.
-#################################################################################
-
-sub get_patchid_from_list
-{
- my ($filecontent, $languagestringref, $filename) = @_;
-
- my $patchid = "";
-
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- my $line = ${$filecontent}[$i];
- if ( $line =~ /^\s*$/ ) { next; } # empty line
- if ( $line =~ /^\s*\#/ ) { next; } # comment line
-
- if ( $line =~ /^\s*(.+?)\s*=\s*(.+?)\s*$/ )
- {
- my $langs = $1;
- my $localpatchid = $2;
-
- if ( correct_langs($langs, $languagestringref) )
- {
- $patchid = $localpatchid;
- last;
- }
- }
- else
- {
- installer::exiter::exit_program("ERROR: Wrong syntax in file: $filename! Line: \"$line\"", "get_patchid_from_list");
- }
- }
-
- return $patchid;
-}
-
-####################################################################
-# Editing table PatchMetadata
-####################################################################
-
-sub change_patchmetadata_table
-{
- my ($localmspdir, $allvariables, $languagestringref) = @_;
-
- my $infoline = "Changing content of table \"PatchMetadata\"\n";
- $installer::logger::Lang->print($infoline);
-
- my $filename = $localmspdir . $installer::globals::separator . "PatchMetadata.idt";
- if ( ! -f $filename ) { installer::exiter::exit_program("ERROR: Could not find file \"$filename\" !", "change_patchmetadata_table"); }
-
- my $filecontent = installer::files::read_file($filename);
- my @newcontent = ();
-
- # Syntax: Company Property Value
- # Interesting properties: "Classification" and "CreationTimeUTC"
-
- my $classification_set = 0;
- my $creationtime_set = 0;
- my $targetproductname_set = 0;
- my $manufacturer_set = 0;
- my $displayname_set = 0;
- my $description_set = 0;
- my $allowremoval_set = 0;
-
- my $defaultcompany = "";
-
- my $classificationstring = "Classification";
- my $classificationvalue = "Hotfix";
- if (( $allvariables->{'SERVICEPACK'} ) && ( $allvariables->{'SERVICEPACK'} == 1 )) { $classificationvalue = "ServicePack"; }
-
- my $allowremovalstring = "AllowRemoval";
- my $allowremovalvalue = "1";
- if (( exists($allvariables->{'MSPALLOWREMOVAL'}) ) && ( $allvariables->{'MSPALLOWREMOVAL'} == 0 )) { $allowremovalvalue = 0; }
-
- my $timestring = "CreationTimeUTC";
- # Syntax: 8/8/2008 11:55
- my $timevalue = get_patchtime_value();
-
- my $targetproductnamestring = "TargetProductName";
- my $targetproductnamevalue = $allvariables->{'PRODUCTNAME'};
- if ( $allvariables->{'PROPERTYTABLEPRODUCTNAME'} ) { $targetproductnamevalue = $allvariables->{'PROPERTYTABLEPRODUCTNAME'}; }
-
- my $manufacturerstring = "ManufacturerName";
- my $manufacturervalue = "Apache OpenOffice";
- if ( $installer::globals::longmanufacturer ) { $manufacturervalue = $installer::globals::longmanufacturer; }
-
- my $displaynamestring = "DisplayName";
- my $descriptionstring = "Description";
- my $displaynamevalue = "";
- my $descriptionvalue = "";
-
- my $base = $allvariables->{'PRODUCTNAME'} . " " . $allvariables->{'PRODUCTVERSION'};
- if ( $installer::globals::languagepack ) { $base = $targetproductnamevalue; }
-
- my $windowspatchlevel = 0;
- if ( $allvariables->{'WINDOWSPATCHLEVEL'} ) { $windowspatchlevel = $allvariables->{'WINDOWSPATCHLEVEL'}; }
-
- my $displayaddon = "";
- if ( $allvariables->{'PATCHDISPLAYADDON'} ) { $displayaddon = $allvariables->{'PATCHDISPLAYADDON'}; }
-
- my $cwsname = "";
- if ( $ENV{'CWS_WORK_STAMP'} ) { $cwsname = $ENV{'CWS_WORK_STAMP'}; }
- if (( $cwsname ne "" ) && ( $allvariables->{'OVERWRITE_CWSNAME'} )) { $cwsname = $allvariables->{'OVERWRITE_CWSNAME'}; }
-
- my $patchsequence = get_patchsequence($allvariables);
-
- if (( $allvariables->{'SERVICEPACK'} ) && ( $allvariables->{'SERVICEPACK'} == 1 ))
- {
- $displaynamevalue = $base . " ServicePack " . $windowspatchlevel . " " . $patchsequence . " Build: " . $installer::globals::buildid;
- $descriptionvalue = $base . " ServicePack " . $windowspatchlevel . " " . $patchsequence . " Build: " . $installer::globals::buildid;
- }
- else
- {
- $displaynamevalue = $base . " Hotfix " . $cwsname . " " . $displayaddon . " " . $patchsequence . " Build: " . $installer::globals::buildid;
- $descriptionvalue = $base . " Hotfix " . $cwsname . " " . $displayaddon . " " . $patchsequence . " Build: " . $installer::globals::buildid;
- $displaynamevalue =~ s/ / /g;
- $descriptionvalue =~ s/ / /g;
- $displaynamevalue =~ s/ / /g;
- $descriptionvalue =~ s/ / /g;
- $displaynamevalue =~ s/ / /g;
- $descriptionvalue =~ s/ / /g;
- }
-
- if ( $allvariables->{'MSPPATCHNAMELIST'} )
- {
- my $patchnamelistfile = $allvariables->{'MSPPATCHNAMELIST'};
- $patchnamelistfile = $installer::globals::idttemplatepath . $installer::globals::separator . $patchnamelistfile;
- if ( ! -f $patchnamelistfile ) { installer::exiter::exit_program("ERROR: Could not find file \"$patchnamelistfile\".", "change_patchmetadata_table"); }
- my $filecontent = installer::files::read_file($patchnamelistfile);
-
- # Get name and path of reference database
- my $patchid = get_patchid_from_list($filecontent, $languagestringref, $patchnamelistfile);
-
- if ( $patchid eq "" ) { installer::exiter::exit_program("ERROR: Could not find file patchid in file \"$patchnamelistfile\" for language(s) \"$$languagestringref\".", "change_patchmetadata_table"); }
-
- # Setting language specific patch id
- }
-
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- if ( ${$filecontent}[$i] =~ /^\s*(.*?)\t(.*?)\t(.*?)\s*$/ )
- {
- my $company = $1;
- my $property = $2;
- my $value = $3;
-
- if ( $property eq $classificationstring )
- {
- ${$filecontent}[$i] = "$company\t$property\t$classificationvalue\n";
- $classification_set = 1;
- }
-
- if ( $property eq $allowremovalstring )
- {
- ${$filecontent}[$i] = "$company\t$property\t$allowremovalvalue\n";
- $allowremoval_set = 1;
- }
-
- if ( $property eq $timestring )
- {
- ${$filecontent}[$i] = "$company\t$property\t$timevalue\n";
- $creationtime_set = 1;
- }
-
- if ( $property eq $targetproductnamestring )
- {
- ${$filecontent}[$i] = "$company\t$property\t$targetproductnamevalue\n";
- $targetproductname_set = 1;
- }
-
- if ( $property eq $manufacturerstring )
- {
- ${$filecontent}[$i] = "$company\t$property\t$manufacturervalue\n";
- $manufacturer_set = 1;
- }
-
- if ( $property eq $displaynamestring )
- {
- ${$filecontent}[$i] = "$company\t$property\t$displaynamevalue\n";
- $displayname_set = 1;
- }
-
- if ( $property eq $descriptionstring )
- {
- ${$filecontent}[$i] = "$company\t$property\t$descriptionvalue\n";
- $description_set = 1;
- }
- }
-
- push(@newcontent, ${$filecontent}[$i]);
- }
-
- if ( ! $classification_set )
- {
- my $line = "$defaultcompany\t$classificationstring\t$classificationvalue\n";
- push(@newcontent, $line);
- }
-
- if ( ! $allowremoval_set )
- {
- my $line = "$defaultcompany\t$classificationstring\t$allowremovalvalue\n";
- push(@newcontent, $line);
- }
-
- if ( ! $allowremoval_set )
- {
- my $line = "$defaultcompany\t$classificationstring\t$allowremovalvalue\n";
- push(@newcontent, $line);
- }
-
- if ( ! $creationtime_set )
- {
- my $line = "$defaultcompany\t$timestring\t$timevalue\n";
- push(@newcontent, $line);
- }
-
- if ( ! $targetproductname_set )
- {
- my $line = "$defaultcompany\t$targetproductnamestring\t$targetproductnamevalue\n";
- push(@newcontent, $line);
- }
-
- if ( ! $manufacturer_set )
- {
- my $line = "$defaultcompany\t$manufacturerstring\t$manufacturervalue\n";
- push(@newcontent, $line);
- }
-
- if ( ! $displayname_set )
- {
- my $line = "$defaultcompany\t$displaynamestring\t$displaynamevalue\n";
- push(@newcontent, $line);
- }
-
- if ( ! $description_set )
- {
- my $line = "$defaultcompany\t$descriptionstring\t$descriptionvalue\n";
- push(@newcontent, $line);
- }
-
- # saving file
- installer::files::save_file($filename, \@newcontent);
-}
-
-####################################################################
-# Editing table PatchSequence
-####################################################################
-
-sub change_patchsequence_table
-{
- my ($localmspdir, $allvariables) = @_;
-
- my $infoline = "Changing content of table \"PatchSequence\"\n";
- $installer::logger::Lang->print($infoline);
-
- my $filename = $localmspdir . $installer::globals::separator . "PatchSequence.idt";
- if ( ! -f $filename ) { installer::exiter::exit_program("ERROR: Could not find file \"$filename\" !", "change_patchsequence_table"); }
-
- my $filecontent = installer::files::read_file($filename);
- my @newcontent = ();
-
- # Copying the header
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ ) { if ( $i < 3 ) { push(@newcontent, ${$filecontent}[$i]); } }
-
- # Syntax: PatchFamily Target Sequence Supersede
-
- my $patchfamily = "SO";
- my $target = "";
- my $patchsequence = get_patchsequence($allvariables);
- my $supersede = get_supersede($allvariables);
-
- if ( $#{$filecontent} >= 3 )
- {
- my $line = ${$filecontent}[3];
- if ( $line =~ /^\s*(.*?)\t(.*?)\t(.*?)\t(.*?)\s$/ )
- {
- $patchfamily = $1;
- $target = $2;
- }
- }
-
- #Adding sequence line, saving PatchFamily
- my $newline = "$patchfamily\t$target\t$patchsequence\t$supersede\n";
- push(@newcontent, $newline);
-
- # saving file
- installer::files::save_file($filename, \@newcontent);
-}
-
-####################################################################
-# Setting supersede, "0" for Hotfixes, "1" for ServicePack
-####################################################################
-
-sub get_supersede
-{
- my ( $allvariables ) = @_;
-
- my $supersede = 0; # if not defined, this is a Hotfix
-
- if (( $allvariables->{'SERVICEPACK'} ) && ( $allvariables->{'SERVICEPACK'} == 1 )) { $supersede = 1; }
-
- return $supersede;
-}
-
-####################################################################
-# Setting the sequence of the patch
-####################################################################
-
-sub get_patchsequence
-{
- my ( $allvariables ) = @_;
-
- my $patchsequence = "1.0";
-
- if ( ! $allvariables->{'PACKAGEVERSION'} ) { installer::exiter::exit_program("ERROR: PACKAGEVERSION must be set for msp patch creation!", "get_patchsequence"); }
-
- my $packageversion = $allvariables->{'PACKAGEVERSION'};
-
- if ( $packageversion =~ /^\s*(\d+)\.(\d+)\.(\d+)\s*$/ )
- {
- my $major = $1;
- my $minor = $2;
- my $micro = $3;
- my $concat = 100 * $minor + $micro;
- $packageversion = $major . "\." . $concat;
- }
- my $vendornumber = 0;
- if ( $allvariables->{'VENDORPATCHVERSION'} ) { $vendornumber = $allvariables->{'VENDORPATCHVERSION'}; }
- $patchsequence = $packageversion . "\." . $installer::globals::buildid . "\." . $vendornumber;
-
- if ( $allvariables->{'PATCHSEQUENCE'} ) { $patchsequence = $allvariables->{'PATCHSEQUENCE'}; }
-
- return $patchsequence;
-}
-
-####################################################################
-# Editing all tables from pcp file, that need to be edited
-####################################################################
-
-sub edit_tables
-{
- my ($tablelist, $localmspdir, $olddatabase, $newdatabase, $mspfilename, $allvariables, $languagestringref) = @_;
-
- # table list contains: my $tablelist = "Properties TargetImages UpgradedImages ImageFamilies PatchMetadata PatchSequence";
-
- change_properties_table($localmspdir, $mspfilename);
- change_targetimages_table($localmspdir, $olddatabase);
- change_upgradedimages_table($localmspdir, $newdatabase);
- change_imagefamilies_table($localmspdir);
- change_patchmetadata_table($localmspdir, $allvariables, $languagestringref);
- change_patchsequence_table($localmspdir, $allvariables);
-}
-
-#################################################################################
-# Checking, if this is the correct database.
-#################################################################################
-
-sub correct_patch
-{
- my ($product, $pro, $langs, $languagestringref) = @_;
-
- my $correct_patch = 0;
-
- # Comparing $product with $installer::globals::product and
- # $pro with $installer::globals::pro and
- # $langs with $languagestringref
-
- my $product_is_good = 0;
-
- my $localproduct = $installer::globals::product;
- if ( $installer::globals::languagepack ) { $localproduct = $localproduct . "LanguagePack"; }
-
- if ( $product eq $localproduct ) { $product_is_good = 1; }
-
- if ( $product_is_good )
- {
- my $pro_is_good = 0;
-
- if ((( $pro eq "pro" ) && ( $installer::globals::pro )) || (( $pro eq "nonpro" ) && ( ! $installer::globals::pro ))) { $pro_is_good = 1; }
-
- if ( $pro_is_good )
- {
- my $langlisthash = installer::converter::convert_stringlist_into_hash(\$langs, ",");
- my $langstringhash = installer::converter::convert_stringlist_into_hash($languagestringref, "_");
-
- my $not_included = 0;
- foreach my $onelang ( keys %{$langlisthash} )
- {
- if ( ! exists($langstringhash->{$onelang}) )
- {
- $not_included = 1;
- last;
- }
- }
-
- if ( ! $not_included )
- {
- foreach my $onelanguage ( keys %{$langstringhash} )
- {
- if ( ! exists($langlisthash->{$onelanguage}) )
- {
- $not_included = 1;
- last;
- }
- }
-
- if ( ! $not_included ) { $correct_patch = 1; }
- }
- }
- }
-
- return $correct_patch;
-}
-
-#################################################################################
-# Searching for the path to the required patch for this special product.
-#################################################################################
-
-sub get_requiredpatchfile_from_list
-{
- my ($filecontent, $languagestringref, $filename) = @_;
-
- my $patchpath = "";
-
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- my $line = ${$filecontent}[$i];
- if ( $line =~ /^\s*$/ ) { next; } # empty line
- if ( $line =~ /^\s*\#/ ) { next; } # comment line
-
- if ( $line =~ /^\s*(.+?)\s*\t+\s*(.+?)\s*\t+\s*(.+?)\s*\t+\s*(.+?)\s*$/ )
- {
- my $product = $1;
- my $pro = $2;
- my $langs = $3;
- my $path = $4;
-
- if (( $pro ne "pro" ) && ( $pro ne "nonpro" )) { installer::exiter::exit_program("ERROR: Wrong syntax in file: $filename. Only \"pro\" or \"nonpro\" allowed in column 1! Line: \"$line\"", "get_databasename_from_list"); }
-
- if ( correct_patch($product, $pro, $langs, $languagestringref) )
- {
- $patchpath = $path;
- last;
- }
- }
- else
- {
- installer::exiter::exit_program("ERROR: Wrong syntax in file: $filename! Line: \"$line\"", "get_requiredpatchfile_from_list");
- }
- }
-
- return $patchpath;
-}
-
-##################################################################
-# Converting unicode file to ascii
-# to be more precise: uft-16 little endian to ascii
-##################################################################
-
-sub convert_unicode_to_ascii
-{
- my ( $filename ) = @_;
-
- my @localfile = ();
-
- my $savfilename = $filename . "_before.unicode";
- installer::systemactions::copy_one_file($filename, $savfilename);
-
-# open( IN, "<:utf16", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_unicode_to_ascii");
-# open( IN, "<:para:crlf:uni", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_unicode_to_ascii");
- open( IN, "<:encoding(UTF16-LE)", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_unicode_to_ascii");
-# open( IN, "<:encoding(UTF-8)", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_unicode_to_ascii");
- while ( $line = <IN> ) {
- push @localfile, $line;
- }
- close( IN );
-
- if ( open( OUT, ">", $filename ) )
- {
- print OUT @localfile;
- close(OUT);
- }
-}
-
-####################################################################
-# Analyzing the log file created by msimsp.exe to find all
-# files included into the patch.
-####################################################################
-
-sub analyze_msimsp_logfile
-{
- my ($logfile, $filesarray) = @_;
-
- # Reading log file after converting from utf-16 (LE) to ascii
- convert_unicode_to_ascii($logfile);
- my $logfilecontent = installer::files::read_file($logfile);
-
- # Creating hash from $filesarray: unique file name -> destination of file
- my %filehash = ();
- my %destinationcollector = ();
-
- for ( my $i = 0; $i <= $#{$filesarray}; $i++ )
- {
- my $onefile = ${$filesarray}[$i];
-
- # Only collecting files with "uniquename" and "destination"
- if (( exists($onefile->{'uniquename'}) ) && ( exists($onefile->{'uniquename'}) ))
- {
- my $uniquefilename = $onefile->{'uniquename'};
- my $destpath = $onefile->{'destination'};
- $filehash{$uniquefilename} = $destpath;
- }
- }
-
- # Analyzing log file of msimsp.exe, finding all changed files
- # and searching all destinations of unique file names.
- # Content in log file: "INFO File Key: <file key> is modified"
- # Collecting content in @installer::globals::patchfilecollector
-
- for ( my $i = 0; $i <= $#{$logfilecontent}; $i++ )
- {
- if ( ${$logfilecontent}[$i] =~ /Key\:\s*(.*?) is modified\s*$/ )
- {
- my $filekey = $1;
- if ( exists($filehash{$filekey}) ) { $destinationcollector{$filehash{$filekey}} = 1; }
- else { installer::exiter::exit_program("ERROR: Could not find file key \"$filekey\" in file collector.", "analyze_msimsp_logfile"); }
- }
- }
-
- foreach my $onedest ( sort keys %destinationcollector ) { push(@installer::globals::patchfilecollector, "$onedest\n"); }
-
-}
-
-####################################################################
-# Creating msp patch files for Windows
-####################################################################
-
-sub create_msp_patch
-{
- my ($installationdir, $includepatharrayref, $allvariables, $languagestringref, $languagesarrayref, $filesarray) = @_;
-
- # print this message even in 'quiet' mode
- $installer::logger::Info->print("\n");
- $installer::logger::Info->print("******************************************\n");
- $installer::logger::Info->print("... creating msp installation set ...\n", 1);
- $installer::logger::Info->print("******************************************\n");
-
- $installer::globals::creating_windows_installer_patch = 1;
-
- my @needed_files = ("msimsp.exe"); # only required for patch creation process
- installer::control::check_needed_files_in_path(\@needed_files);
-
- installer::logger::include_header_into_logfile("Creating msp installation sets:");
-
- my $firstdir = $installationdir;
- installer::pathanalyzer::get_path_from_fullqualifiedname(\$firstdir);
-
- my $lastdir = $installationdir;
- installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$lastdir);
-
- if ( $lastdir =~ /\./ ) { $lastdir =~ s/\./_msp_inprogress\./ }
- else { $lastdir = $lastdir . "_msp_inprogress"; }
-
- # Removing existing directory "_native_packed_inprogress" and "_native_packed_witherror" and "_native_packed"
-
- my $mspdir = $firstdir . $lastdir;
- if ( -d $mspdir ) { installer::systemactions::remove_complete_directory($mspdir); }
-
- my $olddir = $mspdir;
- $olddir =~ s/_inprogress/_witherror/;
- if ( -d $olddir ) { installer::systemactions::remove_complete_directory($olddir); }
-
- $olddir = $mspdir;
- $olddir =~ s/_inprogress//;
- if ( -d $olddir ) { installer::systemactions::remove_complete_directory($olddir); }
-
- # Creating the new directory for new installation set
- installer::systemactions::create_directory($mspdir);
-
- $installer::globals::saveinstalldir = $mspdir;
-
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Starting product installation");
-
- # Installing both installation sets
- $installer::logger::Info->printf("... installing products ...\n");
- my ($olddatabase, $newdatabase) = install_installation_sets($installationdir);
-
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Starting synchronization of installation sets");
-
- # Synchronizing installed products, allowing only different files with PATCH flag
- $installer::logger::Info->printf("... synchronizing installation sets ...\n");
- synchronize_installation_sets($olddatabase, $newdatabase, $filesarray);
-
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Starting pcp file creation");
-
- # Create pcp file
- $installer::logger::Info->printf("... creating pcp file ...\n");
-
- my $localmspdir = installer::systemactions::create_directories("msp", $languagestringref);
-
- if ( ! $allvariables->{'PCPFILENAME'} ) { installer::exiter::exit_program("ERROR: Property \"PCPFILENAME\" has to be defined.", "create_msp_patch"); }
- my $pcpfilename = $allvariables->{'PCPFILENAME'};
-
- if ( $installer::globals::languagepack ) { $pcpfilename =~ s/.pcp\s*$/languagepack.pcp/; }
-
- # Searching the pcp file in the include pathes
- my $fullpcpfilenameref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$pcpfilename, $includepatharrayref, 1);
- if ( $$fullpcpfilenameref eq "" ) { installer::exiter::exit_program("ERROR: pcp file not found: $pcpfilename !", "create_msp_patch"); }
- my $fullpcpfilenamesource = $$fullpcpfilenameref;
-
- # Copying pcp file
- my $fullpcpfilename = $localmspdir . $installer::globals::separator . $pcpfilename;
- installer::systemactions::copy_one_file($fullpcpfilenamesource, $fullpcpfilename);
-
- # a. Extracting tables from msi database: msidb.exe -d <msifile> -f <directory> -e File Media, ...
- # b. Changing content of msi database in tables: File, Media, Directory, FeatureComponent
- # c. Including tables into msi database: msidb.exe -d <msifile> -f <directory> -i File Media, ...
-
- # Unpacking tables from pcp file
- extract_all_tables_from_pcpfile($fullpcpfilename, $localmspdir);
-
- # Tables, that need to be edited
- my $tablelist = "Properties TargetImages UpgradedImages ImageFamilies PatchMetadata PatchSequence"; # required tables
-
- # Saving all tables
- check_and_save_tables($tablelist, $localmspdir);
-
- # Setting the name of the new msp file
- my $mspfilename = set_mspfilename($allvariables, $mspdir, $languagesarrayref);
-
- # Editing tables
- edit_tables($tablelist, $localmspdir, $olddatabase, $newdatabase, $mspfilename, $allvariables, $languagestringref);
-
- # Adding edited tables into pcp file
- include_tables_into_pcpfile($fullpcpfilename, $localmspdir, $tablelist);
-
- # Start msimsp.exe
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Starting msimsp.exe");
- my $msimsplogfile = execute_msimsp($fullpcpfilename, $mspfilename, $localmspdir);
-
- # Copy final installation set next to msp file
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: Copying installation set");
- $installer::logger::Info->printf("... copying installation set ...\n");
-
- my $oldinstallationsetpath = $installer::globals::updatedatabasepath;
-
- if ( $^O =~ /cygwin/i ) { $oldinstallationsetpath =~ s/\\/\//g; }
-
- installer::pathanalyzer::get_path_from_fullqualifiedname(\$oldinstallationsetpath);
- installer::systemactions::copy_complete_directory($oldinstallationsetpath, $mspdir);
-
- # Copying additional patches into the installation set, if required
- if (( $allvariables->{'ADDITIONALREQUIREDPATCHES'} ) && ( $allvariables->{'ADDITIONALREQUIREDPATCHES'} ne "" ) && ( ! $installer::globals::languagepack ))
- {
- my $filename = $allvariables->{'ADDITIONALREQUIREDPATCHES'};
-
- my $fullfilenameref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$filename, $includepatharrayref, 1);
- if ( $$fullfilenameref eq "" ) { installer::exiter::exit_program("ERROR: Could not find file with required patches, although it is defined: $filename !", "create_msp_patch"); }
- my $fullfilename = $$fullfilenameref;
-
- # Reading list file
- my $listfile = installer::files::read_file($fullfilename);
-
- # Get name and path of reference database
- my $requiredpatchfile = get_requiredpatchfile_from_list($listfile, $languagestringref, $fullfilename);
- if ( $requiredpatchfile eq "" ) { installer::exiter::exit_program("ERROR: Could not find path to required patch in file $fullfilename for language(s) $$languagestringref!", "create_msp_patch"); }
-
- # Copying patch file
- installer::systemactions::copy_one_file($requiredpatchfile, $mspdir);
- # my $infoline = "Copy $requiredpatchfile to $mspdir\n";
- # $installer::logger::Lang->print($infoline);
- }
-
- # Find all files included into the patch
- # Analyzing the msimsp log file $msimsplogfile
- analyze_msimsp_logfile($msimsplogfile, $filesarray);
-
- # Done
- $installer::logger::Lang->print("\n");
- $installer::logger::Lang->add_timestamp("Performance Info: msp creation done");
-
- return $mspdir;
-}
-
-1;
diff --git a/solenv/bin/modules/installer/windows/property.pm b/solenv/bin/modules/installer/windows/property.pm
index eddce824633b..e93ad0491950 100644
--- a/solenv/bin/modules/installer/windows/property.pm
+++ b/solenv/bin/modules/installer/windows/property.pm
@@ -308,12 +308,6 @@ sub set_important_properties
$onepropertyline = "DONTOPTIMIZELIBS" . "\t" . "0" . "\n";
push(@{$propertyfile}, $onepropertyline);
- if ( $installer::globals::sundirexists )
- {
- my $onepropertyline = "SUNDIREXISTS" . "\t" . "1" . "\n";
- push(@{$propertyfile}, $onepropertyline);
- }
-
if ( $installer::globals::officedirhostname )
{
my $onepropertyline = "OFFICEDIRHOSTNAME" . "\t" . $installer::globals::officedirhostname . "\n";
@@ -325,12 +319,6 @@ sub set_important_properties
push(@{$propertyfile}, $onepropertyline);
}
- if ( $installer::globals::sundirhostname )
- {
- my $onepropertyline = "SUNDIRHOSTNAME" . "\t" . $installer::globals::sundirhostname . "\n";
- push(@{$propertyfile}, $onepropertyline);
- }
-
if ( $installer::globals::desktoplinkexists )
{
my $onepropertyline = "DESKTOPLINKEXISTS" . "\t" . "1" . "\n";
diff --git a/solenv/bin/modules/installer/windows/registry.pm b/solenv/bin/modules/installer/windows/registry.pm
index 3e26b03810d6..6469ee1b536a 100644
--- a/solenv/bin/modules/installer/windows/registry.pm
+++ b/solenv/bin/modules/installer/windows/registry.pm
@@ -77,17 +77,6 @@ sub get_registry_component_name
my $styles = "";
if ( $registryref->{'Styles'} ) { $styles = $registryref->{'Styles'}; }
- # Layer links must have unique Component GUID for all products. This is necessary, because only the
- # uninstallation of the last product has to delete registry keys.
- if ( $styles =~ /\bLAYER_REGISTRY\b/ )
- {
- $componentname = "g_m_root_registry_layer_ooo_reglayer";
- # Styles USE_URELAYERVERSION, USE_OOOBASEVERSION
- if ( $styles =~ /\bUSE_URELAYERVERSION\b/ ) { $addon = "_ure_" . $allvariables->{'URELAYERVERSION'}; }
- if ( $styles =~ /\bUSE_OOOBASEVERSION\b/ ) { $addon = "_basis_" . $allvariables->{'OOOBASEVERSION'}; }
- $addon =~ s/\.//g;
- }
-
$componentname = $componentname . $addon;
if (( $styles =~ /\bLANGUAGEPACK\b/ ) && ( $installer::globals::languagepack )) { $componentname = $componentname . "_lang"; }
diff --git a/solenv/bin/modules/installer/windows/update.pm b/solenv/bin/modules/installer/windows/update.pm
deleted file mode 100644
index 974ac6b760f8..000000000000
--- a/solenv/bin/modules/installer/windows/update.pm
+++ /dev/null
@@ -1,595 +0,0 @@
-#**************************************************************
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#**************************************************************
-
-
-
-package installer::windows::update;
-
-use installer::converter;
-use installer::exiter;
-use installer::files;
-use installer::globals;
-use installer::pathanalyzer;
-use installer::systemactions;
-
-#################################################################################
-# Extracting all tables from an msi database
-#################################################################################
-
-sub extract_all_tables_from_msidatabase
-{
- my ($fulldatabasepath, $workdir) = @_;
-
- my $msidb = "msidb.exe"; # Has to be in the path
- my $infoline = "";
- my $systemcall = "";
- my $returnvalue = "";
- my $extraslash = ""; # Has to be set for non-ActiveState perl
-
- # Export of all tables by using "*"
-
- if ( $^O =~ /cygwin/i ) {
- # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
- $fulldatabasepath =~ s/\//\\\\/g;
- $workdir =~ s/\//\\\\/g;
- $extraslash = "\\";
- }
-
- $systemcall = $msidb . " -d " . $fulldatabasepath . " -f " . $workdir . " -e " . $extraslash . "*";
- $returnvalue = system($systemcall);
-
- $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
-
- if ($returnvalue)
- {
- $installer::logger::Lang->printf("ERROR: Could not execute %s !\n", $systemcall);
- installer::exiter::exit_program("ERROR: Could not exclude tables from msi database: $fulldatabasepath !", "extract_all_tables_from_msidatabase");
- }
- else
- {
- $installer::logger::Lang->printf("Success: Executed %s successfully!\n", $systemcall);
- }
-}
-
-#################################################################################
-# Collecting the keys from the first line of the idt file
-#################################################################################
-
-sub collect_all_keys
-{
- my ($line) = @_;
-
- my @allkeys = ();
- my $rownumber = 0;
- my $onekey = "";
-
- while ( $line =~ /^\s*(\S+?)\t(.*)$/ )
- {
- $onekey = $1;
- $line = $2;
- $rownumber++;
- push(@allkeys, $onekey);
- }
-
- # and the last key
-
- $onekey = $line;
- $onekey =~ s/^\s*//g;
- $onekey =~ s/\s*$//g;
-
- $rownumber++;
- push(@allkeys, $onekey);
-
- return (\@allkeys, $rownumber);
-}
-
-#################################################################################
-# Analyzing the content of one line of an idt file
-#################################################################################
-
-sub get_oneline_hash
-{
- my ($line, $allkeys, $rownumber) = @_;
-
- my $counter = 0;
- my %linehash = ();
-
- $line =~ s/^\s*//;
- $line =~ s/\s*$//;
-
- my $value = "";
- my $onekey = "";
-
- while ( $line =~ /^(.*?)\t(.*)$/ )
- {
- $value = $1;
- $line = $2;
- $onekey = ${$allkeys}[$counter];
- $linehash{$onekey} = $value;
- $counter++;
- }
-
- # the last column
-
- $value = $line;
- $onekey = ${$allkeys}[$counter];
-
- $linehash{$onekey} = $value;
-
- return \%linehash;
-}
-
-#################################################################################
-# Analyzing the content of an idt file
-#################################################################################
-
-sub analyze_idt_file
-{
- my ($filecontent) = @_;
-
- my %table = ();
- # keys are written in first line
- my ($allkeys, $rownumber) = collect_all_keys(${$filecontent}[0]);
-
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- if (( $i == 0 ) || ( $i == 1 ) || ( $i == 2 )) { next; }
-
- my $onelinehash = get_oneline_hash(${$filecontent}[$i], $allkeys, $rownumber);
- my $linekey = $i - 2; # ! : The linenumber is the unique key !? Always decrease by two, because of removed first three lines.
- $table{$linekey} = $onelinehash;
- }
-
- return \%table;
-}
-
-#################################################################################
-# Reading all idt files in a specified directory
-#################################################################################
-
-sub read_all_tables_from_msidatabase
-{
- my ($workdir) = @_;
-
- my %database = ();
-
- my $ext = "idt";
-
- my $allidtfiles = installer::systemactions::find_file_with_file_extension($ext, $workdir);
-
- for ( my $i = 0; $i <= $#{$allidtfiles}; $i++ )
- {
- my $onefilename = ${$allidtfiles}[$i];
- my $longonefilename = $workdir . $installer::globals::separator . $onefilename;
- if ( ! -f $longonefilename ) { installer::exiter::exit_program("ERROR: Could not find idt file: $longonefilename!", "read_all_tables_from_msidatabase"); }
- my $filecontent = installer::files::read_file($longonefilename);
- my $idtcontent = analyze_idt_file($filecontent);
- my $key = $onefilename;
- $key =~ s/\.idt\s*$//;
- $database{$key} = $idtcontent;
- }
-
- return \%database;
-}
-
-#################################################################################
-# Checking, if this is the correct database.
-#################################################################################
-
-sub correct_database
-{
- my ($product, $pro, $langs, $languagestringref) = @_;
-
- my $correct_database = 0;
-
- # Comparing $product with $installer::globals::product and
- # $pro with $installer::globals::pro and
- # $langs with $languagestringref
-
- my $product_is_good = 0;
-
- my $localproduct = $installer::globals::product;
- if ( $installer::globals::languagepack ) { $localproduct = $localproduct . "LanguagePack"; }
-
- if ( $product eq $localproduct ) { $product_is_good = 1; }
-
- if ( $product_is_good )
- {
- my $pro_is_good = 0;
-
- if ((( $pro eq "pro" ) && ( $installer::globals::pro )) || (( $pro eq "nonpro" ) && ( ! $installer::globals::pro ))) { $pro_is_good = 1; }
-
- if ( $pro_is_good )
- {
- my $langlisthash = installer::converter::convert_stringlist_into_hash(\$langs, ",");
- my $langstringhash = installer::converter::convert_stringlist_into_hash($languagestringref, "_");
-
- my $not_included = 0;
- foreach my $onelang ( keys %{$langlisthash} )
- {
- if ( ! exists($langstringhash->{$onelang}) )
- {
- $not_included = 1;
- last;
- }
- }
-
- if ( ! $not_included )
- {
- foreach my $onelanguage ( keys %{$langstringhash} )
- {
- if ( ! exists($langlisthash->{$onelanguage}) )
- {
- $not_included = 1;
- last;
- }
- }
-
- if ( ! $not_included ) { $correct_database = 1; }
- }
- }
- }
-
- return $correct_database;
-}
-
-#################################################################################
-# Searching for the path to the reference database for this special product.
-#################################################################################
-
-sub get_databasename_from_list
-{
- my ($filecontent, $languagestringref, $filename) = @_;
-
- my $databasepath = "";
-
- for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
- {
- my $line = ${$filecontent}[$i];
- if ( $line =~ /^\s*$/ ) { next; } # empty line
- if ( $line =~ /^\s*\#/ ) { next; } # comment line
-
- if ( $line =~ /^\s*(.+?)\s*\t+\s*(.+?)\s*\t+\s*(.+?)\s*\t+\s*(.+?)\s*$/ )
- {
- my $product = $1;
- my $pro = $2;
- my $langs = $3;
- my $path = $4;
-
- if (( $pro ne "pro" ) && ( $pro ne "nonpro" )) { installer::exiter::exit_program("ERROR: Wrong syntax in file: $filename. Only \"pro\" or \"nonpro\" allowed in column 1! Line: \"$line\"", "get_databasename_from_list"); }
-
- if ( correct_database($product, $pro, $langs, $languagestringref) )
- {
- $databasepath = $path;
- last;
- }
- }
- else
- {
- installer::exiter::exit_program("ERROR: Wrong syntax in file: $filename! Line: \"$line\"", "get_databasename_from_list");
- }
- }
-
- return $databasepath;
-}
-
-#################################################################################
-# Reading an existing database completely
-#################################################################################
-
-sub readdatabase
-{
- my ($allvariables, $languagestringref, $includepatharrayref) = @_;
-
- my $database = "";
- my $infoline = "";
-
- if ( ! $allvariables->{'UPDATE_DATABASE_LISTNAME'} ) { installer::exiter::exit_program("ERROR: If \"UPDATE_DATABASE\" is set, \"UPDATE_DATABASE_LISTNAME\" is required.", "Main"); }
- my $listfilename = $allvariables->{'UPDATE_DATABASE_LISTNAME'};
-
- # Searching the list in the include pathes
- my $listname = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$listfilename, $includepatharrayref, 1);
- if ( $$listname eq "" ) { installer::exiter::exit_program("ERROR: List file not found: $listfilename !", "readdatabase"); }
- my $completelistname = $$listname;
-
- # Reading list file
- my $listfile = installer::files::read_file($completelistname);
-
- # Get name and path of reference database
- my $databasename = get_databasename_from_list($listfile, $languagestringref, $completelistname);
-
- # If the correct database was not found, this is not necessarily an error. But in this case, this is not an update packaging process!
- if (( $databasename ) && ( $databasename ne "" )) # This is an update packaging process!
- {
- $installer::globals::updatedatabase = 1;
- $installer::logger::Info->printf("... update process, using database %s ...\n", $databasename);
- $installer::logger::Lang->printf("\n");
- $installer::logger::Lang->printf("Database found in %s: \"%s\"\n", $completelistname, $databasename);
- $installer::logger::Lang->printf("\n");
- # Saving in global variable
- $installer::globals::updatedatabasepath = $databasename;
- }
- else
- {
- $installer::logger::Lang->printf("\n");
- $installer::logger::Lang->printf("No database found in %s. This is no update process!\n", $completelistname);
- $installer::logger::Lang->printf("\n");
- }
-
- if ( $installer::globals::updatedatabase )
- {
- if ( ! -f $databasename ) { installer::exiter::exit_program("ERROR: Could not find reference database: $databasename!", "readdatabase"); }
-
- my $msifilename = $databasename;
- installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$msifilename);
-
- $installer::logger::Lang->add_timestamp("Performance Info: readdatabase start");
-
- # create directory for unpacking
- my $databasedir = installer::systemactions::create_directories("database", $languagestringref);
-
- # copy database
- my $fulldatabasepath = $databasedir . $installer::globals::separator . $msifilename;
- installer::systemactions::copy_one_file($databasename, $fulldatabasepath);
-
- $installer::logger::Lang->add_timestamp("Performance Info: readdatabase: before extracting tables");
-
- # extract all tables from database
- extract_all_tables_from_msidatabase($fulldatabasepath, $databasedir);
-
- $installer::logger::Lang->add_timestamp("Performance Info: readdatabase: before reading tables");
-
- # read all tables
- $database = read_all_tables_from_msidatabase($databasedir);
-
- # Test output:
-
- # foreach my $key1 ( keys %{$database} )
- # {
- # print "Test1: $key1\n";
- # foreach my $key2 ( keys %{$database->{$key1}} )
- # {
- # print "\tTest2: $key2\n";
- # foreach my $key3 ( keys %{$database->{$key1}->{$key2}} )
- # {
- # print "\t\tTest3: $key3: $database->{$key1}->{$key2}->{$key3}\n";
- # }
- # }
- # }
-
- # Example: File table
-
- # my $filetable = $database->{'File'};
- # foreach my $linenumber ( keys %{$filetable} )
- # {
- # print "Test Filenumber: $linenumber\n";
- # foreach my $key ( keys %{$filetable->{$linenumber}} )
- # {
- # print "\t\tTest: $key: $filetable->{$linenumber}->{$key}\n";
- # }
- # }
-
- # Example: Searching for ProductCode in table Property
-
- # my $column1 = "Property";
- # my $column2 = "Value";
- # my $searchkey = "ProductCode";
- # my $propertytable = $database->{'Property'};
- # foreach my $linenumber ( keys %{$propertytable} )
- # {
- # if ( $propertytable->{$linenumber}->{$column1} eq $searchkey )
- # {
- # print("Test: $searchkey : $propertytable->{$linenumber}->{$column2}\n");
- # }
- # }
-
- $installer::logger::Lang->add_timestamp("Performance Info: readdatabase end");
- }
-
- return $database;
-}
-
-#################################################################################
-# Files can be included in merge modules. This is also important for update.
-#################################################################################
-
-sub readmergedatabase
-{
- my ( $mergemodules, $languagestringref, $includepatharrayref ) = @_;
-
- $installer::logger::Lang->add_timestamp("Performance Info: readmergedatabase start");
-
- my $mergemoduledir = installer::systemactions::create_directories("mergedatabase", $languagestringref);
-
- my %allmergefiles = ();
-
- $installer::globals::mergemodulenumber = $#{$mergemodules} + 1;
-
- foreach my $mergemodule ( @{$mergemodules} )
- {
- my $filename = $mergemodule->{'Name'};
- my $mergefile = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$filename, $includepatharrayref, 1);
-
- if ( $$mergefile eq "" ) { installer::exiter::exit_program("ERROR: msm file not found: $filename !", "readmergedatabase"); }
- my $completesource = $$mergefile;
-
- my $mergegid = $mergemodule->{'gid'};
- my $workdir = $mergemoduledir . $installer::globals::separator . $mergegid;
- if ( ! -d $workdir ) { installer::systemactions::create_directory($workdir); }
-
- my $completedest = $workdir . $installer::globals::separator . $filename;
- installer::systemactions::copy_one_file($completesource, $completedest);
- if ( ! -f $completedest ) { installer::exiter::exit_program("ERROR: msm file not found: $completedest !", "readmergedatabase"); }
-
- # extract all tables from database
- extract_all_tables_from_msidatabase($completedest, $workdir);
-
- # read all tables
- my $onemergefile = read_all_tables_from_msidatabase($workdir);
-
- $allmergefiles{$mergegid} = $onemergefile;
- }
-
- foreach my $mergefilegid ( keys %allmergefiles )
- {
- my $onemergefile = $allmergefiles{$mergefilegid};
- my $filetable = $onemergefile->{'File'};
-
- foreach my $linenumber ( keys %{$filetable} )
- {
- # Collecting all files from merge modules in global hash
- $installer::globals::mergemodulefiles{$filetable->{$linenumber}->{'File'}} = 1;
- }
- }
-
- $installer::logger::Lang->add_timestamp("Performance Info: readmergedatabase end");
-}
-
-#################################################################################
-# Creating several useful hashes from old database
-#################################################################################
-
-sub create_database_hashes
-{
- my ( $database ) = @_;
-
- # 1. Hash ( Component -> UniqueFileName ), required in File table.
- # Read from File table.
-
- my %uniquefilename = ();
- my %allupdatesequences = ();
- my %allupdatecomponents = ();
- my %allupdatefileorder = ();
- my %allupdatecomponentorder = ();
- my %revuniquefilename = ();
- my %revshortfilename = ();
- my %shortdirname = ();
- my %componentid = ();
- my %componentidkeypath = ();
- my %alloldproperties = ();
- my %allupdatelastsequences = ();
- my %allupdatediskids = ();
-
- my $filetable = $database->{'File'};
-
- foreach my $linenumber ( keys %{$filetable} )
- {
- my $comp = $filetable->{$linenumber}->{'Component_'};
- my $uniquename = $filetable->{$linenumber}->{'File'};
- my $filename = $filetable->{$linenumber}->{'FileName'};
- my $sequence = $filetable->{$linenumber}->{'Sequence'};
-
- my $shortname = "";
- if ( $filename =~ /^\s*(.*?)\|\s*(.*?)\s*$/ )
- {
- $shortname = $1;
- $filename = $2;
- }
-
- # unique is the combination of $component and $filename
- my $key = "$comp/$filename";
-
- if ( exists($uniquefilename{$key}) ) { installer::exiter::exit_program("ERROR: Component/FileName \"$key\" is not unique in table \"File\" !", "create_database_hashes"); }
-
- my $value = $uniquename;
- if ( $shortname ne "" ) { $value = "$uniquename;$shortname"; }
- $uniquefilename{$key} = $value; # saving the unique keys and short names in hash
-
- # Saving reverse keys too
- $revuniquefilename{$uniquename} = $key;
- if ( $shortname ne "" ) { $revshortfilename{$shortname} = $key; }
-
- # Saving Sequences for unique names (and also components)
- $allupdatesequences{$uniquename} = $sequence;
- $allupdatecomponents{$uniquename} = $comp;
-
- # Saving unique names and components for sequences
- $allupdatefileorder{$sequence} = $uniquename;
- $allupdatecomponentorder{$sequence} = $comp;
- }
-
- # 2. Hash, required in Directory table.
-
- my $dirtable = $database->{'Directory'};
-
- foreach my $linenumber ( keys %{$dirtable} )
- {
- my $dir = $dirtable->{$linenumber}->{'Directory'}; # this is a unique name
- my $defaultdir = $dirtable->{$linenumber}->{'DefaultDir'};
-
- my $shortname = "";
- if ( $defaultdir =~ /^\s*(.*?)\|\s*(.*?)\s*$/ )
- {
- $shortname = $1;
- $shortdirname{$dir} = $shortname; # collecting only the short names
- }
- }
-
- # 3. Hash, collecting info from Component table.
- # ComponentID and KeyPath have to be reused.
-
- my $comptable = $database->{'Component'};
-
- foreach my $linenumber ( keys %{$comptable} )
- {
- my $comp = $comptable->{$linenumber}->{'Component'};
- my $compid = $comptable->{$linenumber}->{'ComponentId'};
- my $keypath = $comptable->{$linenumber}->{'KeyPath'};
-
- $componentid{$comp} = $compid;
- $componentidkeypath{$comp} = $keypath;
- }
-
- # 4. Hash, property table, required for ProductCode and Installlocation.
-
- my $proptable = $database->{'Property'};
-
- foreach my $linenumber ( keys %{$proptable} )
- {
- my $prop = $proptable->{$linenumber}->{'Property'};
- my $value = $proptable->{$linenumber}->{'Value'};
-
- $alloldproperties{$prop} = $value;
- }
-
- # 5. Media table, getting last sequence
-
- my $mediatable = $database->{'Media'};
- $installer::globals::updatelastsequence = 0;
-
- foreach my $linenumber ( keys %{$mediatable} )
- {
- my $cabname = $mediatable->{$linenumber}->{'Cabinet'};
- my $lastsequence = $mediatable->{$linenumber}->{'LastSequence'};
- my $diskid = $mediatable->{$linenumber}->{'DiskId'};
- $allupdatelastsequences{$cabname} = $lastsequence;
- $allupdatediskids{$cabname} = $diskid;
-
- if ( $lastsequence > $installer::globals::updatelastsequence ) { $installer::globals::updatelastsequence = $lastsequence; }
- }
-
- $installer::globals::updatesequencecounter = $installer::globals::updatelastsequence;
-
- return (\%uniquefilename, \%revuniquefilename, \%revshortfilename, \%allupdatesequences, \%allupdatecomponents, \%allupdatefileorder, \%allupdatecomponentorder, \%shortdirname, \%componentid, \%componentidkeypath, \%alloldproperties, \%allupdatelastsequences, \%allupdatediskids);
-}
-
-
-1;
diff --git a/solenv/bin/modules/installer/ziplist.pm b/solenv/bin/modules/installer/ziplist.pm
index 6673c3236feb..7c66cdd6851c 100644
--- a/solenv/bin/modules/installer/ziplist.pm
+++ b/solenv/bin/modules/installer/ziplist.pm
@@ -30,6 +30,121 @@ use installer::logger;
use installer::parameter;
use installer::remover;
use installer::systemactions;
+use strict;
+
+=head2 read_openoffice_lst_file (#loggingdir)
+ Read the settings and variables from the settings file (typically 'openoffice.lst').
+=cut
+sub read_openoffice_lst_file ($$;$)
+{
+ my ($filename, $product_name, $loggingdir) = @_;
+
+ # Read all lines from the settings file.
+ my $ziplistref = installer::files::read_file($filename);
+
+ # Extract the lines of the settings block for the current product.
+ my ($productblockref, $parent) = installer::ziplist::getproductblock(
+ $ziplistref, $product_name, 1);
+ my ($settingsblockref, undef) = installer::ziplist::getproductblock($productblockref, "Settings", 0);
+ $settingsblockref = installer::ziplist::analyze_settings_block($settingsblockref);
+
+ # Split into settings and variables.
+ my $allsettingsarrayref = installer::ziplist::get_settings_from_ziplist($settingsblockref);
+ my $allvariablesarrayref = installer::ziplist::get_variables_from_ziplist($settingsblockref);
+
+ # global product block from zip.lst
+ my ($globalproductblockref, undef) = installer::ziplist::getproductblock(
+ $ziplistref, $installer::globals::globalblock, 0);
+
+ if ($installer::globals::globallogging && defined $loggingdir)
+ {
+ installer::files::save_file($loggingdir . "productblock.log", $productblockref);
+ installer::files::save_file($loggingdir . "settingsblock.log", $settingsblockref);
+ installer::files::save_file($loggingdir . "allsettings1.log", $allsettingsarrayref);
+ installer::files::save_file($loggingdir . "allvariables1.log", $allvariablesarrayref);
+ installer::files::save_file($loggingdir . "globalproductblock.log", $globalproductblockref);
+ }
+
+ # Integrate parent values.
+ while (defined $parent)
+ {
+ my $parentproductblockref;
+ ($parentproductblockref, $parent) = installer::ziplist::getproductblock($ziplistref, $parent, 1);
+ my ($parentsettingsblockref, undef) = installer::ziplist::getproductblock(
+ $parentproductblockref, "Settings", 0);
+ $parentsettingsblockref = installer::ziplist::analyze_settings_block($parentsettingsblockref);
+ my $allparentsettingsarrayref = installer::ziplist::get_settings_from_ziplist($parentsettingsblockref);
+ my $allparentvariablesarrayref = installer::ziplist::get_variables_from_ziplist($parentsettingsblockref);
+ if (scalar @$allparentsettingsarrayref > 0)
+ {
+ $allsettingsarrayref = installer::converter::combine_arrays_from_references_first_win(
+ $allsettingsarrayref,
+ $allparentsettingsarrayref)
+ }
+ if (scalar @$allparentvariablesarrayref)
+ {
+ $allvariablesarrayref = installer::converter::combine_arrays_from_references_first_win(
+ $allvariablesarrayref,
+ $allparentvariablesarrayref)
+ }
+ }
+
+ # Integrate global values.
+ if (scalar @$globalproductblockref)
+ {
+ # settings block from zip.lst
+ my ($globalsettingsblockref, undef) = installer::ziplist::getproductblock(
+ $globalproductblockref, "Settings", 0);
+
+ # select data from settings block in zip.lst
+ $globalsettingsblockref = installer::ziplist::analyze_settings_block($globalsettingsblockref);
+
+ my $allglobalsettingsarrayref = installer::ziplist::get_settings_from_ziplist($globalsettingsblockref);
+ my $allglobalvariablesarrayref = installer::ziplist::get_variables_from_ziplist($globalsettingsblockref);
+
+ if ($installer::globals::globallogging && defined $loggingdir)
+ {
+ installer::files::save_file($loggingdir . "globalsettingsblock1.log", $globalsettingsblockref);
+ installer::files::save_file($loggingdir . "globalsettingsblock2.log", $globalsettingsblockref);
+ installer::files::save_file($loggingdir . "allglobalsettings1.log", $allglobalsettingsarrayref);
+ installer::files::save_file($loggingdir . "allglobalvariables1.log", $allglobalvariablesarrayref);
+ }
+
+ if (scalar @$allglobalsettingsarrayref > 0)
+ {
+ $allsettingsarrayref = installer::converter::combine_arrays_from_references_first_win(
+ $allsettingsarrayref, $allglobalsettingsarrayref);
+ }
+ if (scalar @$allglobalvariablesarrayref > 0)
+ {
+ $allvariablesarrayref = installer::converter::combine_arrays_from_references_first_win(
+ $allvariablesarrayref, $allglobalvariablesarrayref);
+ }
+ }
+
+ # Remove multiples (and the trailing ##%##).
+ $allsettingsarrayref = installer::ziplist::remove_multiples_from_ziplist($allsettingsarrayref);
+ $allvariablesarrayref = installer::ziplist::remove_multiples_from_ziplist($allvariablesarrayref);
+ installer::ziplist::replace_variables_in_ziplist_variables($allvariablesarrayref);
+
+ # Transform array into hash.
+ my $allvariableshashref = installer::converter::convert_array_to_hash($allvariablesarrayref);
+
+ # Postprocess the variables.
+ installer::ziplist::set_default_productversion_if_required($allvariableshashref);
+ installer::ziplist::add_variables_to_allvariableshashref($allvariableshashref);
+ installer::ziplist::overwrite_ooovendor($allvariableshashref);
+
+ if ($installer::globals::globallogging && defined $loggingdir)
+ {
+ installer::files::save_file($loggingdir . "allsettings2.log" ,$allsettingsarrayref);
+ installer::files::save_file($loggingdir . "allvariables2.log" ,$allvariablesarrayref);
+ }
+
+ # Eventually we should fix this so that we don't have to return the raw arrays, only the resulting hashes.
+ return ($allvariableshashref, $allsettingsarrayref);
+}
+
#################################################
# Getting data from path file and zip list file
@@ -571,7 +686,7 @@ sub replace_languages_in_pathes
my $language = ${$languagesref}[$j];
$line =~ s/\$\(LANG\)/$language/g;
push(@patharray ,$line);
- $newdir = $line;
+ my $newdir = $line;
$line = $originalline;
installer::remover::remove_leading_and_ending_whitespaces(\$newline);
@@ -627,8 +742,6 @@ sub list_all_files_from_include_path
}
$installer::logger::Lang->print("\n");
-
- return \@filesarray;
}
#####################################################
@@ -780,9 +893,18 @@ sub add_variables_to_allvariableshashref
$variableshashref->{'LCPRODUCTEXTENSION'} = "";
}
- if ( $installer::globals::patch ) { $variableshashref->{'PRODUCTADDON'} = $installer::globals::patchaddon; }
- elsif ( $installer::globals::languagepack ) { $variableshashref->{'PRODUCTADDON'} = $installer::globals::languagepackaddon; }
- else { $variableshashref->{'PRODUCTADDON'} = ""; }
+ if ($installer::globals::patch)
+ {
+ $variableshashref->{'PRODUCTADDON'} = $installer::globals::patchaddon;
+ }
+ elsif ($installer::globals::languagepack)
+ {
+ $variableshashref->{'PRODUCTADDON'} = $installer::globals::languagepackaddon;
+ }
+ else
+ {
+ $variableshashref->{'PRODUCTADDON'} = "";
+ }
my $localbuild = $installer::globals::build;
if ( $localbuild =~ /^\s*(\w+?)(\d+)\s*$/ ) { $localbuild = $2; } # using "680" instead of "src680"
diff --git a/solenv/bin/modules/par2script/globals.pm b/solenv/bin/modules/par2script/globals.pm
index dc52b98d03a5..ecc2976f65f3 100644
--- a/solenv/bin/modules/par2script/globals.pm
+++ b/solenv/bin/modules/par2script/globals.pm
@@ -39,8 +39,7 @@ BEGIN
@allitems = ("Installation", "ScpAction", "Directory", "File",
"Shortcut", "Unixlink", "Module", "Profile", "ProfileItem",
- "Folder", "FolderItem", "RegistryItem", "WindowsCustomAction",
- "MergeModule");
+ "Folder", "FolderItem", "RegistryItem", "WindowsCustomAction");
@items_assigned_at_modules = ("File", "Directory", "Unixlink");
@items_with_directories = ("File", "Profile", "Shortcut", "Unixlink");
diff --git a/solenv/bin/modules/pre2par/globals.pm b/solenv/bin/modules/pre2par/globals.pm
index 6eb5b3d1146e..11e4544c1321 100644
--- a/solenv/bin/modules/pre2par/globals.pm
+++ b/solenv/bin/modules/pre2par/globals.pm
@@ -38,8 +38,7 @@ BEGIN
@allitems = ("Installation", "ScpAction", "HelpText", "Directory", "DataCarrier", "StarRegistry", "File",
"Shortcut", "Custom", "Unixlink", "Procedure", "Module", "Profile", "ProfileItem",
- "Folder", "FolderItem", "RegistryItem", "StarRegistryItem", "WindowsCustomAction",
- "MergeModule");
+ "Folder", "FolderItem", "RegistryItem", "StarRegistryItem", "WindowsCustomAction");
$logging = 0;
$logfilename = "logfile.log"; # the default logfile name for global errors
diff --git a/solenv/bin/patch_make_releases_xml.pl b/solenv/bin/patch_make_releases_xml.pl
new file mode 100644
index 000000000000..b75046b9b4e7
--- /dev/null
+++ b/solenv/bin/patch_make_releases_xml.pl
@@ -0,0 +1,197 @@
+#!/usr/bin/perl -w
+
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+use LWP::UserAgent;
+
+use strict;
+
+=head1 NAME
+
+ patch_make_releases_xml.pl - Create a section for the instsetoo_native/data/releases.xml file.
+
+=head1 SYNOPSIS
+
+ patch_make_releases_xml.pl <version-number>
+
+ version-number is the version number (eg 4.0.1) for which to create the releases.xml file.
+
+=head1 DESCRIPTION
+
+ Will contact http://archive.apache.org/dist/openoffice/<version-number>/binaries/ and
+ a) determine the set of languages
+ b) collect sizes and sha256 check sums for all Windows installation sets.
+
+ The result is printed to the console. It has to be added manually to releases.xml.
+
+=cut
+
+
+if (scalar @ARGV != 1)
+{
+ print STDERR "usage: $0 <version-number>\n";
+ die;
+}
+
+my $version = $ARGV[0];
+
+print <<EOT;
+<?xml version='1.0' encoding='UTF-8'?>
+<!--***********************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ ***********************************************************-->
+EOT
+
+sub DownloadFile ($)
+{
+ my $url = shift;
+
+ my $agent = LWP::UserAgent->new();
+ $agent->timeout(120);
+ $agent->show_progress(0);
+
+ my $file_content = "";
+ my $last_was_redirect = 0;
+ my $bytes_read = 0;
+ $agent->add_handler('response_redirect'
+ => sub{
+ $last_was_redirect = 1;
+ return;
+ });
+ $agent->add_handler('response_data'
+ => sub{
+ if ($last_was_redirect)
+ {
+ $last_was_redirect = 0;
+ # Throw away the data we got so far.
+ $file_content = "";
+ }
+ my($response,$agent,$h,$data)=@_;
+ $file_content .= $data;
+ });
+ $agent->get($url);
+
+ return $file_content;
+}
+
+
+
+
+sub GetResponse ($)
+{
+ my $url = shift;
+
+ my $agent = LWP::UserAgent->new();
+ $agent->timeout(120);
+ $agent->show_progress(0);
+
+ my $file_content = "";
+ my $last_was_redirect = 0;
+ my $bytes_read = 0;
+ $agent->add_handler('response_redirect'
+ => sub{
+ $last_was_redirect = 1;
+ return;
+ });
+ $agent->add_handler('response_data'
+ => sub{
+ if ($last_was_redirect)
+ {
+ $last_was_redirect = 0;
+ # Throw away the data we got so far.
+ $file_content = "";
+ }
+ my($response,$agent,$h,$data)=@_;
+ $file_content .= $data;
+ });
+ return $agent->get($url, 'Range' => "bytes=0-0");
+}
+
+my @languages = ();
+my @lines = split(/\n/, DownloadFile("http://archive.apache.org/dist/openoffice/".$version."/binaries/"));
+foreach my $line (@lines)
+{
+ next unless $line =~ /folder.gif/;
+ if ($line =~ /a href=\"([^\"\/]+)\/\"/)
+ {
+ my $language = $1;
+ next if $language eq "SDK";
+ next if $language =~ /^[A-Z]/;
+ push @languages, $language;
+ }
+}
+
+print "<releases>\n";
+print " <release>\n";
+printf " <version>%s</version>\n", $version;
+print " <download>\n";
+print " <package-format>msi</package-format>\n";
+print " <url-template>\n";
+printf " http://archive.apache.org/dist/openoffice/%s/binaries/%%L/Apache_OpenOffice_%s_Win_x86_install_%%L.exe\n",$version, $version;
+print " </url-template>\n";
+foreach my $language (sort @languages)
+{
+ print " <item>\n";
+ printf " <language>%s</language>\n", $language;
+ my $name = sprintf(
+ "Apache_OpenOffice_%s_Win_x86_install_%s.exe",
+ $version,
+ $language,
+ $version,
+ $language);
+
+ my $content = DownloadFile(
+ sprintf("http://archive.apache.org/dist/openoffice/%s/binaries/%s/%s.sha256", $version, $language, $name));
+ if ($content =~ /^([a-f0-9]+)/)
+ {
+ printf(" <checksum type=\"sha256\">%s</checksum>\n", $1);
+ }
+ my $response = GetResponse(
+ sprintf("http://archive.apache.org/dist/openoffice/%s/binaries/%s/%s", $version, $language, $name));
+ my $content_range = $response->{'_headers'}->{'content-range'};
+ if ($content_range =~ /bytes 0-0\/(\d+)/)
+ {
+ printf(" <size>%s</size>\n", $1);
+ }
+ print " </item>\n";
+}
+
+print " </download>\n";
+print " </release>\n";
+print "</releases>\n";
diff --git a/solenv/bin/release_prepare.pl b/solenv/bin/release_prepare.pl
new file mode 100644
index 000000000000..129358a8a3cd
--- /dev/null
+++ b/solenv/bin/release_prepare.pl
@@ -0,0 +1,226 @@
+#!/usr/bin/perl -w
+
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+use lib ("$ENV{SOLARENV}/bin/modules");
+use installer::patch::InstallationSet;
+use installer::patch::Msi;
+use installer::patch::ReleasesList;
+use installer::ziplist;
+use installer::logger;
+
+use Getopt::Long;
+use Pod::Usage;
+use Digest;
+
+use strict;
+
+=head1 NAME
+
+ release_prepare.pl - Several functions to prepare release builds
+
+=head1 SYNOPSIS
+
+ release_prepare.pl [options] <language1> <language2> ...
+
+ Options:
+ --lst-file <filename>
+ Path to the .lst file, eg ../util/openoffice.lst
+ --product-name <product-name>
+ The product name, eg Apache_OpenOffice
+ --output-path <path>
+ Path to the instsetoo_native platform output tree
+ --source-version <major>.<minor>.<micro>
+ Override version number of the source. If not given it is computed from the target version.
+
+=head1 DESCRIPTION
+
+ Prepare a release build:
+
+ - Provide installation sets of the previous version.
+ If they are not in ext_sources/ then they are downloaded.
+
+ - Unpack the installation sets.
+
+=cut
+
+
+sub ProcessCommandline ()
+{
+ my $arguments = {
+ 'lst-file' => undef,
+ 'product-name' => undef,
+ 'output-path' => undef,
+ 'source-version' => undef};
+
+ if ( ! GetOptions(
+ "lst-file=s", \$arguments->{'lst-file'},
+ "product-name=s", \$arguments->{'product-name'},
+ "output-path=s", \$arguments->{'output-path'},
+ "source-version:s" => \$arguments->{'source-version'}
+ ))
+ {
+ pod2usage(1);
+ }
+
+ if ( ! defined $arguments->{'lst-file'})
+ {
+ print STDERR "lst-file missing, please provide --lst-file\n";
+ pod2usage(2);
+ }
+ if ( ! defined $arguments->{'product-name'})
+ {
+ print STDERR "product name missing, please provide --product-name\n";
+ pod2usage(2);
+ }
+ if ( ! defined $arguments->{'output-path'})
+ {
+ print STDERR "output path missing, please provide --output-path\n";
+ pod2usage(2);
+ }
+
+ $arguments->{'languages'} = \@ARGV;
+
+ return $arguments;
+}
+
+
+
+
+sub ProcessLanguage ($$$$)
+{
+ my ($source_version, $language, $package_format, $product_name) = @_;
+
+ $installer::logger::Info->printf("%s\n", $language);
+ $installer::logger::Info->increase_indentation();
+
+ # For every language we need
+ # 1. have downloadable installation set available (download if missing)
+ # 2. unpack it to get access to .cab and .msi
+ # 3. unpack .cab so that msimsp.exe can be run
+
+ # Create paths to unpacked contents of .exe and .cab and determine if they exist.
+ # The existence of these paths is taken as flag whether the unpacking has already taken place.
+ my $unpacked_exe_path = installer::patch::InstallationSet::GetUnpackedMsiPath(
+ $source_version,
+ $language,
+ $package_format,
+ $product_name);
+ my $unpacked_cab_path = installer::patch::InstallationSet::GetUnpackedCabPath(
+ $source_version,
+ $language,
+ $package_format,
+ $product_name);
+ my $exe_is_unpacked = -d $unpacked_exe_path;
+ my $cab_is_unpacked = -d $unpacked_cab_path;
+
+ if ( ! $exe_is_unpacked)
+ {
+ # Interpret existence of path as proof that the installation
+ # set and the cab file have been successfully unpacked.
+ # Nothing to do.
+ my $filename = installer::patch::InstallationSet::ProvideDownloadSet(
+ $source_version,
+ $language,
+ $package_format);
+ if (defined $filename)
+ {
+ if ( ! -d $unpacked_exe_path)
+ {
+ installer::patch::InstallationSet::UnpackExe($filename, $unpacked_exe_path);
+ }
+ }
+ else
+ {
+ installer::logger::PrintError("could not provide .exe installation set at '%s'\n", $filename);
+ }
+ }
+ else
+ {
+ $installer::logger::Info->printf("downloadable installation set has already been unpacked to '%s'\n",
+ $unpacked_exe_path);
+ }
+
+ if ( ! $cab_is_unpacked)
+ {
+ my $cab_filename = File::Spec->catfile($unpacked_exe_path, "openoffice1.cab");
+ if ( ! -f $cab_filename)
+ {
+ # Cab file does not exist.
+ installer::logger::PrintError(
+ "could not find .cab file at '%s'. Extraction of .exe seems to have failed.\n",
+ $cab_filename);
+ }
+
+ # Unpack the cab file.
+ my $msi = new installer::patch::Msi(
+ $source_version,
+ $language,
+ $product_name);
+
+ $installer::logger::Info->printf("unpacking cab file '%s' to '%s'\n",
+ $cab_filename, $unpacked_cab_path);
+ installer::patch::InstallationSet::UnpackCab(
+ $cab_filename,
+ $msi,
+ $unpacked_cab_path);
+ }
+ else
+ {
+ $installer::logger::Info->printf("cab has already been unpacked to\n");
+ $installer::logger::Info->printf(" %s\n", $unpacked_cab_path);
+ }
+
+ $installer::logger::Info->decrease_indentation();
+}
+
+
+
+
+installer::logger::SetupSimpleLogging("c:/tmp/log");
+
+my $arguments = ProcessCommandline();
+$arguments->{'package-format'} = 'msi';
+
+print "preparing release build\n";
+my ($variables, undef, undef)
+ = installer::ziplist::read_openoffice_lst_file(
+ $arguments->{'lst-file'},
+ $arguments->{'product-name'},
+ undef);
+if ( ! defined $arguments->{'source-version'})
+{
+ $arguments->{'source-version'} = $variables->{'PREVIOUS_VERSION'};
+}
+$installer::logger::Info->printf(" reading data from '%s'\n", $arguments->{'lst-file'});
+$installer::logger::Info->printf(" product name is '%s'\n", $arguments->{'product-name'});
+$installer::logger::Info->printf(" output path is '%s'\n", $arguments->{'output-path'});
+$installer::logger::Info->printf(" source version is '%s'\n", $arguments->{'source-version'});
+
+foreach my $language (@{$arguments->{'languages'}})
+{
+ ProcessLanguage(
+ $arguments->{'source-version'},
+ $language,
+ $arguments->{'package-format'},
+ $arguments->{'product-name'});
+}
diff --git a/solenv/doc/gbuild/solenv/gbuild/gbuild.mk b/solenv/doc/gbuild/solenv/gbuild/gbuild.mk
index 78d6753de2cf..e221d3904a65 100644
--- a/solenv/doc/gbuild/solenv/gbuild/gbuild.mk
+++ b/solenv/doc/gbuild/solenv/gbuild/gbuild.mk
@@ -43,7 +43,6 @@ static const Path UPD;
static const String CVER;
static const String LIBXML_CFLAGS;
static const String OS;
-static const String STLPORT_VER;
static const Bool DEBUG;
static const Bool PRODUCT;
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 848ced3ba24a..7f1fe75c2f37 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -34,7 +34,6 @@
# PRODUCT
# SOLARINC
# SOLARLIB
-# STLPORT_VER
# UPD
# GXX_INCLUDE_PATH (Linux)
@@ -163,11 +162,6 @@ gb_GLOBALDEFS := \
$(gb_COMPILERDEFS) \
$(gb_CPUDEFS) \
-ifneq ($(USE_SYSTEM_STL),YES)
-gb_GLOBALDEFS += \
- -DSTLPORT_VERSION=$(STLPORT_VER)
-endif
-
ifeq ($(gb_PRODUCT),$(true))
gb_GLOBALDEFS += \
-DPRODUCT \
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 7f6ce104d605..a0ab8cec7cad 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -301,19 +301,9 @@ gb_Library_SYSPRE := lib
gb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_
gb_Library_PLAINEXT := .dylib
gb_Library_RTEXT := gcc3$(gb_Library_PLAINEXT)
-ifeq ($(gb_PRODUCT),$(true))
-gb_Library_STLEXT := port_gcc$(gb_Library_PLAINEXT)
-else
-gb_Library_STLEXT := port_gcc_stldebug$(gb_Library_PLAINEXT)
-endif
-ifeq ($(CPUNAME),INTEL)
gb_Library_OOOEXT := $(gb_Library_PLAINEXT)
gb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT)
-else # ifeq ($(CPUNAME),POWERPC)
-gb_Library_OOOEXT := $(gb_Library_PLAINEXT)
-gb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT)
-endif
gb_Library__FRAMEWORKS := \
Cocoa \
diff --git a/solenv/inc/lldb4aoo.py b/solenv/inc/lldb4aoo.py
index e380e61e3aa3..a9bc3fc998b8 100644
--- a/solenv/inc/lldb4aoo.py
+++ b/solenv/inc/lldb4aoo.py
@@ -5,9 +5,9 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git a/solenv/inc/unxlng.mk b/solenv/inc/unxlng.mk
index 187946e6c79f..032f01356488 100644
--- a/solenv/inc/unxlng.mk
+++ b/solenv/inc/unxlng.mk
@@ -39,7 +39,8 @@ JAVAFLAGSDEBUG=-g
#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter"
# _PTHREADS is needed for the stl
-CDEFS+=-DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER)
+CDEFS+=-DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1
+CDEFS+=-DBOOST_DETAIL_NO_CONTAINER_FWD
# enable visibility define in "sal/types.h"
.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
@@ -226,24 +227,6 @@ X11LINK_DYNAMIC = -Wl,--as-needed -lXext -lX11 -Wl,--no-as-needed
LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
-.IF "$(USE_STLP_DEBUG)" != ""
-.IF "$(STLPORT_VER)" >= "500"
-LIBSTLPORT=$(DYNAMIC) -lstlportstlg
-LIBSTLPORTST=$(STATIC) -lstlportstlg $(DYNAMIC)
-.ELSE
-LIBSTLPORT=$(DYNAMIC) -lstlport_gcc_stldebug
-LIBSTLPORTST=$(STATIC) -lstlport_gcc_stldebug $(DYNAMIC)
-.ENDIF
-.ELSE # "$(USE_STLP_DEBUG)" != ""
-.IF "$(STLPORT_VER)" >= "500"
-LIBSTLPORT=$(DYNAMIC) -lstlport
-LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
-.ELSE
-LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
-LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
-.ENDIF
-.ENDIF # "$(USE_STLP_DEBUG)" != ""
-
#FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
# name of library manager
diff --git a/solenv/inc/unxmacx.mk b/solenv/inc/unxmacx.mk
index 007f24ab2284..8169c14b83a5 100644
--- a/solenv/inc/unxmacx.mk
+++ b/solenv/inc/unxmacx.mk
@@ -34,14 +34,9 @@ LINKOUTPUT_FILTER=
# Definitions that we may need on the compile line.
# -D_PTHREADS and -D_REENTRANT are needed for STLport, and must be specified when
# compiling STLport sources too, either internally or externally.
-CDEFS+=-DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNO_PTHREAD_PRIORITY $(PROCESSOR_DEFINES) -DSTLPORT_VERSION=$(STLPORT_VER) -D_USE_NAMESPACE=1
-.IF "$(GUIBASE)"=="unx" && "$(USE_SYSTEM_STL)"!="YES"
-CDEFS+=-DX_LOCALE
-.ENDIF
-.IF "$(GUIBASE)"=="aqua"
-# MAXOSX_DEPLOYMENT_TARGET : The minimum version required to run the build,
-# build can assume functions/libraries of that version to be available
-# unless you want to do runtime checks for 10.5 api, you also want to use the 10.4 sdk
+CDEFS+=-DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNO_PTHREAD_PRIORITY $(PROCESSOR_DEFINES) -D_USE_NAMESPACE=1
+
+# MAXOSX_DEPLOYMENT_TARGET : The minimum version required to run the build result
# (safer/easier than dealing with the MAC_OS_X_VERSION_MAX_ALLOWED macro)
# http://developer.apple.com/technotes/tn2002/tn2064.html
# done in setsolar/configure now. left here for documentation
@@ -49,7 +44,6 @@ CDEFS+=-DX_LOCALE
#.EXPORT: MACOSX_DEPLOYMENT_TARGET
CDEFS+=-DQUARTZ
EXTRA_CDEFS*=-isysroot /Developer/SDKs/MacOSX10.4u.sdk
-.ENDIF
# Name of library where static data members are initialized
# STATICLIBNAME=static$(DLLPOSTFIX)
diff --git a/solenv/inc/wntmsci11.mk b/solenv/inc/wntmsci11.mk
index 7270adfc439f..db9d0fb5abbc 100644
--- a/solenv/inc/wntmsci11.mk
+++ b/solenv/inc/wntmsci11.mk
@@ -219,7 +219,7 @@ CFLAGSWERRCC=-WX
MODULES_WITH_WARNINGS := \
soldep
-CDEFS+=-DSTLPORT_VERSION=400 -D_MT -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500
+CDEFS+=-D_MT -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500
.IF "$(COMEX)" == "11"
_VC_MANIFEST_BASENAME=__VC80
.ELSE
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index 0be98916f5f5..d037387c44dd 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -1421,12 +1421,12 @@ sal_Bool SmTextForwarder::GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, s
return bRes;
}
-sal_Bool SmTextForwarder::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const
+sal_Bool SmTextForwarder::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex, sal_Bool bInCell ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ?
- SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, *pEditEngine, nPara, nIndex )
- : sal_False;
+ SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, *pEditEngine, nPara, nIndex, bInCell )
+ : sal_False;
}
sal_uInt16 SmTextForwarder::GetLineCount( sal_uInt16 nPara ) const
diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx
index 50cdc5012e43..bc74166b3dcd 100644
--- a/starmath/source/accessibility.hxx
+++ b/starmath/source/accessibility.hxx
@@ -245,9 +245,9 @@ public:
virtual OutputDevice* GetRefDevice() const;
virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const;
virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
- virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const;
- virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const;
- virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const;
+ virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex, sal_Bool bInCell = sal_False ) const;
+ virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const;
+ virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const;
virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nLine ) const;
virtual sal_Bool Delete( const ESelection& );
diff --git a/stlport/STLport-4.0-sunstudio12u1.patch b/stlport/STLport-4.0-sunstudio12u1.patch
deleted file mode 100644
index 49d76abbd836..000000000000
--- a/stlport/STLport-4.0-sunstudio12u1.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- misc/STLport-4.0/stlport/config/stl_sunpro.h Mon Jul 6 13:43:35 2009
-+++ misc/build/STLport-4.0/stlport/config/stl_sunpro.h Mon Jul 6 13:56:56 2009
-@@ -31,7 +31,8 @@
- # endif
- # endif
-
--# if (__SUNPRO_CC < 0x600)
-+// support SunStudio compiler 12u1 version 5.10 (which results in 0x5100)
-+# if (__SUNPRO_CC < 0x600 || ((__SUNPRO_CC | 0x0FFF) > 0x0FFF && __SUNPRO_CC < 0x6000))
- // those are tested and proved not to work...
- # define __STL_STATIC_ARRAY_BUG 1
- # define __STL_STATIC_CONST_INIT_BUG 1
-@@ -57,7 +58,7 @@
- # define __STL_NO_FRIEND_TEMPLATES 1
- #endif
-
--# if (__SUNPRO_CC < 0x600)
-+# if (__SUNPRO_CC < 0x600 || ((__SUNPRO_CC | 0x0FFF) > 0x0FFF && __SUNPRO_CC < 0x6000))
- # define __STL_HAS_NO_NEW_C_HEADERS 1
- # define __STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS
- # define __STL_NON_TYPE_TMPL_PARAM_BUG 1
diff --git a/stlport/STLport-4.0.patch b/stlport/STLport-4.0.patch
deleted file mode 100644
index 0d262b5455cf..000000000000
--- a/stlport/STLport-4.0.patch
+++ /dev/null
@@ -1,4926 +0,0 @@
-*** misc/STLport-4.0/src/gcc.mak Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/src/gcc.mak Tue Sep 6 18:38:04 2005
-***************
-*** 5,12 ****
- #
- # compiler
- #
-! CC = gcc
-! CXX = c++
-
- #
- # Basename for libraries
---- 5,12 ----
- #
- # compiler
- #
-! CC *= gcc
-! CXX *= c++
-
- #
- # Basename for libraries
-***************
-*** 19,25 ****
- #
- LINK=ar cr
- # 2.95 flag
-! DYN_LINK=gcc -shared -o
-
- OBJEXT=o
- DYNEXT=so
---- 19,25 ----
- #
- LINK=ar cr
- # 2.95 flag
-! DYN_LINK=$(CC) -shared -o
-
- OBJEXT=o
- DYNEXT=so
-*** misc/STLport-4.0/src/sunpro.mak Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/src/sunpro.mak Tue Sep 6 18:38:04 2005
-***************
-*** 30,35 ****
---- 30,40 ----
-
- include common_macros.mak
-
-+ # override because STLDEBUG breaks...
-+ ALL_STATIC_LIBS=$(OUTDIR)$(PATH_SEP)$(RELEASE_LIB) $(OUTDIR)$(PATH_SEP)$(DEBUG_LIB)
-+
-+ ALL_DYNAMIC_LIBS=$(OUTDIR)$(PATH_SEP)$(RELEASE_DYNLIB) $(OUTDIR)$(PATH_SEP)$(DEBUG_DYNLIB)
-+
- CXXFLAGS_COMMON = -mt -pta +w2 -features=rtti -xildoff ${STL_INCL} -D__SGI_STL_OWN_IOSTREAMS
-
- SHCXXFLAGS = -PIC
-***************
-*** 70,75 ****
---- 75,88 ----
- LDFLAGS_STLDEBUG_static = ${CXXFLAGS_STLDEBUG_static}
- LDFLAGS_STLDEBUG_dynamic = ${CXXFLAGS_STLDEBUG_dynamic}
-
-+ LDLIBS_RELEASE_dynamic = -lm
-+ LDLIBS_DEBUG_dynamic = -lm
-+ LDLIBS_STLDEBUG_dynamic = -lm
-+
-+ LDFLAGS_RELEASE_dynamic += -norunpath
-+ LDFLAGS_DEBUG_dynamic += -norunpath
-+ LDFLAGS_STLDEBUG_dynamic += -norunpath
-+
- include common_percent_rules.mak
- include common_rules.mak
-
-*** misc/STLport-4.0/src/sunpro11.mak Mon Dec 5 17:22:32 2005
---- misc/build/STLport-4.0/src/sunpro11.mak Mon Dec 5 17:25:03 2005
-***************
-*** 1 ****
-! dummy
---- 1,82 ----
-! #
-! # Basename for libraries
-! #
-! LIB_BASENAME = libstlport_sunpro
-!
-! STL_INCL= -I. -I${PWD}/../stlport/SC5 -I${SYSBASE}/usr/include
-! # STL_INCL= -I. -I${PWD}/../stlport
-!
-! CC = CC
-! CXX = CC
-!
-! #
-! # guts for common stuff
-! #
-! #
-! LINK=$(CC) -mt -xar -o
-! DYN_LINK=$(CC) -mt -G -o
-!
-! OBJEXT=o
-! DYNEXT=so
-! STEXT=a
-! RM=rm -rf
-! PATH_SEP=/
-! MKDIR=mkdir -p
-! COMP=SUN
-!
-! # LINK_OUT=-xar -o
-! # DYNLINK_OUT=-o
-!
-! all: all_static all_dynamic
-!
-! include common_macros.mak
-!
-! # override because STLDEBUG breaks...
-! ALL_STATIC_LIBS=$(OUTDIR)$(PATH_SEP)$(RELEASE_LIB) $(OUTDIR)$(PATH_SEP)$(DEBUG_LIB)
-!
-! ALL_DYNAMIC_LIBS=$(OUTDIR)$(PATH_SEP)$(RELEASE_DYNLIB) $(OUTDIR)$(PATH_SEP)$(DEBUG_DYNLIB)
-!
-! CXXFLAGS_COMMON = -mt -library=%none,Crun ${STL_INCL} -D__SGI_STL_OWN_IOSTREAMS
-!
-! SHCXXFLAGS = -KPIC
-!
-! #
-! # Try those flags to see if they help to get maximum efficiency :
-! # -Qoption iropt -R,-Ml30,-Ms30,-Mi1000000,-Mm1000000,-Mr1000000,-Ma1000000,-Mc1000000,-Mt1000000
-! # Note, these flags don't work anymore with the SunStudio 11 compiler. Let the compiler
-! # decide how to optimize
-! RELEASE_FLAGS = -O3
-!
-!
-! # install: $(TARGETS)
-! # cp -p $(TARGETS) ${INSTALLDIR}
-!
-! CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) ${RELEASE_FLAGS}
-! CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) ${RELEASE_FLAGS} $(SHCXXFLAGS)
-!
-! CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -g
-! CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -g $(SHCXXFLAGS)
-!
-! CXXFLAGS_STLDEBUG_static = $(CXXFLAGS_COMMON) -g -D__STL_DEBUG
-! CXXFLAGS_STLDEBUG_dynamic = $(CXXFLAGS_COMMON) -g -D__STL_DEBUG $(SHCXXFLAGS)
-!
-! LDFLAGS_RELEASE_static = ${CXXFLAGS_RELEASE_static}
-! LDFLAGS_RELEASE_dynamic = ${CXXFLAGS_RELEASE_dynamic}
-!
-! LDFLAGS_DEBUG_static = ${CXXFLAGS_DEBUG_static}
-! LDFLAGS_DEBUG_dynamic = ${CXXFLAGS_DEBUG_dynamic}
-!
-! LDFLAGS_STLDEBUG_static = ${CXXFLAGS_STLDEBUG_static}
-! LDFLAGS_STLDEBUG_dynamic = ${CXXFLAGS_STLDEBUG_dynamic}
-!
-! LDLIBS_RELEASE_dynamic = -lm
-! LDLIBS_DEBUG_dynamic = -lm
-! LDLIBS_STLDEBUG_dynamic = -lm
-!
-! LDFLAGS_RELEASE_dynamic += -norunpath
-! LDFLAGS_DEBUG_dynamic += -norunpath
-! LDFLAGS_STLDEBUG_dynamic += -norunpath
-!
-! include common_percent_rules.mak
-! include common_rules.mak
-!
-*** misc/STLport-4.0/src/sunpro6.mak Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/src/sunpro6.mak Tue Sep 6 18:38:04 2005
-***************
-*** 3,10 ****
- #
- LIB_BASENAME = libstlport_sunpro
-
-! # STL_INCL= -I. -I${PWD}/../stlport/SC5
-! STL_INCL= -I. -I${PWD}/../stlport
-
- CC = CC
- CXX = CC
---- 3,10 ----
- #
- LIB_BASENAME = libstlport_sunpro
-
-! STL_INCL= -I. -I${PWD}/../stlport/SC5
-! # STL_INCL= -I. -I${PWD}/../stlport
-
- CC = CC
- CXX = CC
-***************
-*** 30,35 ****
---- 30,40 ----
- all: all_static all_dynamic
-
- include common_macros.mak
-+
-+ # override because STLDEBUG breaks...
-+ ALL_STATIC_LIBS=$(OUTDIR)$(PATH_SEP)$(RELEASE_LIB) $(OUTDIR)$(PATH_SEP)$(DEBUG_LIB)
-+
-+ ALL_DYNAMIC_LIBS=$(OUTDIR)$(PATH_SEP)$(RELEASE_DYNLIB) $(OUTDIR)$(PATH_SEP)$(DEBUG_DYNLIB)
-
- CXXFLAGS_COMMON = -mt -library=%none,Crun -template=wholeclass ${STL_INCL} -D__SGI_STL_OWN_IOSTREAMS
-
-***************
-*** 62,67 ****
---- 67,80 ----
- LDFLAGS_STLDEBUG_static = ${CXXFLAGS_STLDEBUG_static}
- LDFLAGS_STLDEBUG_dynamic = ${CXXFLAGS_STLDEBUG_dynamic}
-
-+ LDLIBS_RELEASE_dynamic = -lm
-+ LDLIBS_DEBUG_dynamic = -lm
-+ LDLIBS_STLDEBUG_dynamic = -lm
-+
-+ LDFLAGS_RELEASE_dynamic += -norunpath
-+ LDFLAGS_DEBUG_dynamic += -norunpath
-+ LDFLAGS_STLDEBUG_dynamic += -norunpath
-+
- include common_percent_rules.mak
- include common_rules.mak
-
-*** misc/STLport-4.0/src/sunpro8.mak Tue Sep 6 19:11:15 2005
---- misc/build/STLport-4.0/src/sunpro8.mak Tue Sep 6 19:10:31 2005
-***************
-*** 1 ****
-! dummy
---- 1,80 ----
-! #
-! # Basename for libraries
-! #
-! LIB_BASENAME = libstlport_sunpro
-!
-! STL_INCL= -I. -I${PWD}/../stlport/SC5 -I${SYSBASE}/usr/include
-! # STL_INCL= -I. -I${PWD}/../stlport
-!
-! CC = CC
-! CXX = CC
-!
-! #
-! # guts for common stuff
-! #
-! #
-! LINK=$(CC) -mt -xar -o
-! DYN_LINK=$(CC) -mt -G -o
-!
-! OBJEXT=o
-! DYNEXT=so
-! STEXT=a
-! RM=rm -rf
-! PATH_SEP=/
-! MKDIR=mkdir -p
-! COMP=SUN
-!
-! # LINK_OUT=-xar -o
-! # DYNLINK_OUT=-o
-!
-! all: all_static all_dynamic
-!
-! include common_macros.mak
-!
-! # override because STLDEBUG breaks...
-! ALL_STATIC_LIBS=$(OUTDIR)$(PATH_SEP)$(RELEASE_LIB) $(OUTDIR)$(PATH_SEP)$(DEBUG_LIB)
-!
-! ALL_DYNAMIC_LIBS=$(OUTDIR)$(PATH_SEP)$(RELEASE_DYNLIB) $(OUTDIR)$(PATH_SEP)$(DEBUG_DYNLIB)
-!
-! CXXFLAGS_COMMON = -DSYSBASE="$(SYSBASE)" -mt -library=%none,Crun ${STL_INCL} -D__SGI_STL_OWN_IOSTREAMS
-!
-! SHCXXFLAGS = -KPIC
-!
-! #
-! # Try those flags to see if they help to get maximum efficiency :
-! # -Qoption iropt -R,-Ml30,-Ms30,-Mi1000000,-Mm1000000,-Mr1000000,-Ma1000000,-Mc1000000,-Mt1000000
-! RELEASE_FLAGS = -O2 -Qoption iropt -R,-Ml30,-Ms30,-Mi1000000,-Mm1000000,-Mr1000000,-Ma1000000,-Mc1000000,-Mt1000000
-!
-!
-! # install: $(TARGETS)
-! # cp -p $(TARGETS) ${INSTALLDIR}
-!
-! CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) ${RELEASE_FLAGS}
-! CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) ${RELEASE_FLAGS} $(SHCXXFLAGS)
-!
-! CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -g
-! CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -g $(SHCXXFLAGS)
-!
-! CXXFLAGS_STLDEBUG_static = $(CXXFLAGS_COMMON) -g -D__STL_DEBUG
-! CXXFLAGS_STLDEBUG_dynamic = $(CXXFLAGS_COMMON) -g -D__STL_DEBUG $(SHCXXFLAGS)
-!
-! LDFLAGS_RELEASE_static = ${CXXFLAGS_RELEASE_static}
-! LDFLAGS_RELEASE_dynamic = ${CXXFLAGS_RELEASE_dynamic} -L$(SYSBASE)/usr/lib
-!
-! LDFLAGS_DEBUG_static = ${CXXFLAGS_DEBUG_static}
-! LDFLAGS_DEBUG_dynamic = ${CXXFLAGS_DEBUG_dynamic} -L$(SYSBASE)/usr/lib
-!
-! LDFLAGS_STLDEBUG_static = ${CXXFLAGS_STLDEBUG_static}
-! LDFLAGS_STLDEBUG_dynamic = ${CXXFLAGS_STLDEBUG_dynamic} -L$(SYSBASE)/usr/lib
-!
-! LDLIBS_RELEASE_dynamic = -lm
-! LDLIBS_DEBUG_dynamic = -lm
-! LDLIBS_STLDEBUG_dynamic = -lm
-!
-! LDFLAGS_RELEASE_dynamic += -norunpath
-! LDFLAGS_DEBUG_dynamic += -norunpath
-! LDFLAGS_STLDEBUG_dynamic += -norunpath
-!
-! include common_percent_rules.mak
-! include common_rules.mak
-!
-*** misc/STLport-4.0/src/vc6.mak Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/src/vc6.mak Tue Sep 6 18:38:04 2005
-***************
-*** 8,14 ****
- LIB_BASENAME=stlport_vc6
- COMP=VC6
-
-! EXTRA_COMMON_FLAGS=/D "_MBCS"
-
- all: platform all_static all_dynamic
-
---- 8,14 ----
- LIB_BASENAME=stlport_vc6
- COMP=VC6
-
-! EXTRA_COMMON_FLAGS=/D "_MBCS" /D "_NTSDK"
-
- all: platform all_static all_dynamic
-
-*** misc/STLport-4.0/stlport/SC5/config/stl_sunpro.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/SC5/config/stl_sunpro.h Wed Oct 10 16:11:29 2007
-***************
-*** 42,53 ****
-
- # define __STL_NO_QUALIFIED_FRIENDS 1
-
-- // <locale> constructor problem
-- # define __STL_NO_MEMBER_TEMPLATES 1
-- # define __STL_NO_MEMBER_TEMPLATE_KEYWORD 1
-- # define __STL_NO_MEMBER_TEMPLATE_CLASSES 1
-- # define __STL_NO_FRIEND_TEMPLATES 1
--
- // ambiguity problems
- # define __STL_NO_CLASS_PARTIAL_SPECIALIZATION 1
- # define __STL_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
---- 42,47 ----
-***************
-*** 55,62 ****
- # endif
-
-
- # if (__SUNPRO_CC < 0x600)
-- # define __STL_NO_TYPENAME_ON_RETURN_TYPE 1
- # define __STL_HAS_NO_NEW_C_HEADERS 1
- # define __STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS
- # define __STL_NON_TYPE_TMPL_PARAM_BUG 1
---- 49,63 ----
- # endif
-
-
-+ # if (__SUNPRO_CC < 0x530)
-+ // <locale> constructor problem
-+ # define __STL_NO_MEMBER_TEMPLATES 1
-+ # define __STL_NO_MEMBER_TEMPLATE_KEYWORD 1
-+ # define __STL_NO_MEMBER_TEMPLATE_CLASSES 1
-+ # define __STL_NO_FRIEND_TEMPLATES 1
-+ #endif
-+
- # if (__SUNPRO_CC < 0x600)
- # define __STL_HAS_NO_NEW_C_HEADERS 1
- # define __STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS
- # define __STL_NON_TYPE_TMPL_PARAM_BUG 1
-***************
-*** 63,68 ****
---- 64,73 ----
- # define __STL_NONTEMPL_BASE_MATCH_BUG 1
- # endif
-
-+ # if (__SUNPRO_CC < 0x510)
-+ # define __STL_NO_TYPENAME_ON_RETURN_TYPE 1
-+ # endif
-+
- // Features that depend on compatibility switch
- # if ( __SUNPRO_CC < 0x500 ) || (defined (__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT < 5))
- # define __STL_HAS_NO_NEW_IOSTREAMS 1
-***************
-*** 73,84 ****
- # define __STL_NO_BAD_ALLOC 1
- # define __STL_NO_EXCEPTION_HEADER 1
- # define __STL_NATIVE_C_INCLUDE_PATH ../include
-! # elif (__SUNPRO_CC < 0x600)
- # define __STL_NATIVE_C_HEADER(header) <../CC/##header##.SUNWCCh>
- # define __STL_NATIVE_CPP_C_HEADER(header) <../CC/##header##.SUNWCCh>
- # else
-! # define __STL_NATIVE_C_INCLUDE_PATH ../CC/std
-! # define __STL_NATIVE_CPP_C_INCLUDE_PATH ../CC/std
- # endif
-
- # if ( __SUNPRO_CC < 0x500 )
---- 78,94 ----
- # define __STL_NO_BAD_ALLOC 1
- # define __STL_NO_EXCEPTION_HEADER 1
- # define __STL_NATIVE_C_INCLUDE_PATH ../include
-! # elif (__SUNPRO_CC < 0x520)
- # define __STL_NATIVE_C_HEADER(header) <../CC/##header##.SUNWCCh>
- # define __STL_NATIVE_CPP_C_HEADER(header) <../CC/##header##.SUNWCCh>
- # else
-! # if defined SYSBASE
-! # define __STL_NATIVE_C_INCLUDE_PATH SYSBASE/usr/include
-! # define __STL_NATIVE_CPP_C_INCLUDE_PATH SYSBASE/usr/include
-! # else
-! # define __STL_NATIVE_C_INCLUDE_PATH /usr/include
-! # define __STL_NATIVE_CPP_C_INCLUDE_PATH /usr/include
-! # endif
- # endif
-
- # if ( __SUNPRO_CC < 0x500 )
-*** misc/STLport-4.0/stlport/cctype Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/cctype Thu Aug 25 15:54:53 2005
-***************
-*** 48,53 ****
---- 48,56 ----
-
- # if ! defined (__STL_NO_CSTD_FUNCTION_IMPORTS)
- # if defined ( __STL_IMPORT_VENDOR_CSTD )
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- using __STL_VENDOR_CSTD::isalnum;
- using __STL_VENDOR_CSTD::isalpha;
-***************
-*** 63,68 ****
---- 66,74 ----
- using __STL_VENDOR_CSTD::tolower;
- using __STL_VENDOR_CSTD::toupper;
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_IMPORT_VENDOR_CSTD*/
- # endif /* __STL_NO_CSTD_FUNCTION_IMPORTS */
-
-*** misc/STLport-4.0/stlport/cerrno Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/cerrno Thu Aug 25 15:54:53 2005
-***************
-*** 30,38 ****
---- 30,44 ----
- #ifndef errno
-
- # ifdef __STL_IMPORT_VENDOR_CSTD
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- using __STL_VENDOR_CSTD::errno;
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_IMPORT_VENDOR_CSTD */
-
- #endif
-*** misc/STLport-4.0/stlport/clocale Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/clocale Thu Aug 25 15:54:53 2005
-***************
-*** 28,33 ****
---- 28,36 ----
- # endif
-
- # ifdef __STL_IMPORT_VENDOR_CSTD
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- using __STL_VENDOR_CSTD::lconv;
- # if ! defined (__STL_NO_CSTD_FUNCTION_IMPORTS)
-***************
-*** 35,40 ****
---- 38,46 ----
- using __STL_VENDOR_CSTD::setlocale;
- # endif
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_IMPORT_VENDOR_CSTD */
-
- # if (__STL_OUTERMOST_HEADER_ID == 0x108 )
-*** misc/STLport-4.0/stlport/cmath Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/cmath Thu Aug 25 15:54:53 2005
-***************
-*** 40,45 ****
---- 40,48 ----
- # endif
-
- # ifdef __STL_IMPORT_VENDOR_CSTD
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # if ! defined (__STL_NO_CSTD_FUNCTION_IMPORTS)
- using __STL_VENDOR_CSTD::acos;
-***************
-*** 66,73 ****
---- 69,82 ----
- using __STL_VENDOR_CSTD::tanh;
- # endif /* BUG */
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_IMPORT_VENDOR_CSTD */
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # ifdef __STL_SAME_FUNCTION_NAME_RESOLUTION_BUG
-***************
-*** 135,140 ****
---- 144,152 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if (__STL_OUTERMOST_HEADER_ID == 0x109 )
- # include <stl/_epilog.h>
-*** misc/STLport-4.0/stlport/csetjmp Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/csetjmp Thu Aug 25 15:54:54 2005
-***************
-*** 31,36 ****
---- 31,39 ----
- # endif
-
- # ifdef __STL_IMPORT_VENDOR_CSTD
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- using __STL_VENDOR_CSTD::jmp_buf;
- # ifndef __STL_NO_CSTD_FUNCTION_IMPORTS
-***************
-*** 40,45 ****
---- 43,51 ----
- using __STL_VENDOR_CSTD::longjmp;
- # endif
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- #endif /* __STL_IMPORT_VENDOR_CSTD */
-
- # if (__STL_OUTERMOST_HEADER_ID == 0x111 )
-*** misc/STLport-4.0/stlport/csignal Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/csignal Thu Aug 25 15:54:54 2005
-***************
-*** 28,33 ****
---- 28,36 ----
- # endif
-
- # ifdef __STL_IMPORT_VENDOR_CSTD
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # ifndef __STL_NO_CSTD_FUNCTION_IMPORTS
- using __STL_VENDOR_CSTD::signal;
-***************
-*** 35,40 ****
---- 38,46 ----
- # endif /* __STL_NO_CSTD_FUNCTION_IMPORTS */
- using __STL_VENDOR_CSTD::sig_atomic_t;
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_IMPORT_VENDOR_CSTD */
-
- # if (__STL_OUTERMOST_HEADER_ID == 0x112 )
-*** misc/STLport-4.0/stlport/cstdarg Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/cstdarg Thu Aug 25 15:54:54 2005
-***************
-*** 28,36 ****
---- 28,42 ----
- # endif
-
- # ifdef __STL_IMPORT_VENDOR_CSTD
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- using __STL_VENDOR_CSTD::va_list;
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- #endif /* __STL_IMPORT_VENDOR_CSTD */
-
- # if (__STL_OUTERMOST_HEADER_ID == 0x113 )
-*** misc/STLport-4.0/stlport/cstddef Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/cstddef Thu Aug 25 15:54:54 2005
-***************
-*** 30,39 ****
---- 30,45 ----
- # endif
-
- # ifdef __STL_IMPORT_VENDOR_CSTD
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- using __STL_VENDOR_CSTD::ptrdiff_t;
- using __STL_VENDOR_CSTD::size_t;
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- #endif /* __STL_IMPORT_VENDOR_CSTD */
-
- # if (__STL_OUTERMOST_HEADER_ID == 0x114 )
-*** misc/STLport-4.0/stlport/cstdio Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/cstdio Thu Aug 25 15:54:54 2005
-***************
-*** 47,52 ****
---- 47,55 ----
- # endif
-
- # ifdef __STL_IMPORT_VENDOR_CSTD
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- using __STL_VENDOR_CSTD::FILE;
- using __STL_VENDOR_CSTD::fpos_t;
-***************
-*** 108,113 ****
---- 111,119 ----
- # endif
- # endif /* __STL_NO_CSTD_FUNCTION_IMPORTS */
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_IMPORT_VENDOR_CSTD */
-
- # if (__STL_OUTERMOST_HEADER_ID == 15)
-*** misc/STLport-4.0/stlport/cstdlib Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/cstdlib Thu Aug 25 15:54:54 2005
-***************
-*** 42,47 ****
---- 42,50 ----
- # endif
-
- # ifdef __STL_IMPORT_VENDOR_CSTD
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- using __STL_VENDOR_CSTD::div_t;
- using __STL_VENDOR_CSTD::ldiv_t;
-***************
-*** 83,88 ****
---- 86,94 ----
- using __STL_VENDOR_CSTD::srand;
- # endif /* __STL_NO_CSTD_FUNCTION_IMPORTS */
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- #endif /* __STL_IMPORT_VENDOR_CSTD */
-
- # if (__STL_OUTERMOST_HEADER_ID == 0x116)
-*** misc/STLport-4.0/stlport/cstring Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/cstring Thu Aug 25 15:54:54 2005
-***************
-*** 28,36 ****
---- 28,42 ----
- # endif
-
- # ifdef __STL_IMPORT_VENDOR_CSTD
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/cstring>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- #endif /* __STL_IMPORT_VENDOR_CSTD */
-
- # if (__STL_OUTERMOST_HEADER_ID == 0x117)
-*** misc/STLport-4.0/stlport/ctime Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/ctime Thu Aug 25 15:54:54 2005
-***************
-*** 28,33 ****
---- 28,36 ----
- # endif
-
- # ifdef __STL_IMPORT_VENDOR_CSTD
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- using __STL_VENDOR_CSTD::size_t;
- using __STL_VENDOR_CSTD::clock_t;
-***************
-*** 45,50 ****
---- 48,56 ----
- using __STL_VENDOR_CSTD::time;
- # endif /* __STL_NO_CSTD_FUNCTION_IMPORTS */
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- #endif /* __STL_IMPORT_VENDOR_CSTD */
-
- # if (__STL_OUTERMOST_HEADER_ID == 0x118)
-*** misc/STLport-4.0/stlport/cwchar Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/cwchar Thu Aug 25 15:54:54 2005
-***************
-*** 79,84 ****
---- 79,87 ----
-
- # ifdef __STL_USE_OWN_MBSTATE_T
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- struct __stl_mbstate_t {
-***************
-*** 109,114 ****
---- 112,120 ----
- typedef __stl_mbstate_t mbstate_t;
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # endif
-
-***************
-*** 119,124 ****
---- 125,133 ----
-
-
- # ifdef __STL_IMPORT_VENDOR_CSTD
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- using __STL_VENDOR_CSTD::wint_t;
- using __STL_VENDOR_CSTD::size_t;
-***************
-*** 230,235 ****
---- 239,247 ----
-
- # endif /* __STL_NO_NATIVE_WIDE_FUNCTIONS */
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_IMPORT_VENDOR_CSTD */
-
- # undef __STL_WCHAR_SUNPRO_EXCLUDE
-*** misc/STLport-4.0/stlport/cwctype Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/cwctype Thu Aug 25 15:54:54 2005
-***************
-*** 39,44 ****
---- 39,47 ----
- # endif
-
- # ifdef __STL_IMPORT_VENDOR_CSTD
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- using __STL_VENDOR_CSTD::wctype_t;
- using __STL_VENDOR_CSTD::wint_t;
-***************
-*** 67,72 ****
---- 70,78 ----
- using __STL_VENDOR_CSTD::towupper;
- # endif /* __STL_NO_CSTD_FUNCTION_IMPORTS */
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- #endif /* __STL_IMPORT_VENDOR_CSTD */
-
- # if (__STL_OUTERMOST_HEADER_ID == 0x121)
-*** misc/STLport-4.0/stlport/exception Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/exception Thu Aug 25 15:54:54 2005
-***************
-*** 60,65 ****
---- 60,68 ----
-
- # ifdef __STL_USE_OWN_NAMESPACE
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- using __STL_VENDOR_EXCEPT_STD::exception;
-***************
-*** 90,95 ****
---- 93,101 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # endif /* __STL_OWN_NAMESPACE */
-
-***************
-*** 98,103 ****
---- 104,112 ----
- # ifndef __SGI_STL_EXCEPTION_H
- # define __SGI_STL_EXCEPTION_H
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // section 18.6
-***************
-*** 140,152 ****
---- 149,170 ----
- # define __STL_EXCEPTION_BASE exception
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_NO_EXCEPTION_HEADER */
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- // forward declaration
- class __Named_exception;
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- #endif /* __SGI_STL_EXCEPTION_H */
-
- # if (__STL_OUTERMOST_HEADER_ID == 0x423)
-*** misc/STLport-4.0/stlport/iomanip Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/iomanip Thu Aug 25 15:54:54 2005
-***************
-*** 32,37 ****
---- 32,40 ----
-
- # include <istream> // Includes <ostream> and <ios>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- //----------------------------------------------------------------------
-***************
-*** 177,182 ****
---- 180,188 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # elif !defined (__STL_USE_NO_IOSTREAMS)
- # include <wrap_std/iomanip>
-*** misc/STLport-4.0/stlport/iomanip.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/iomanip.h Thu Aug 25 15:54:54 2005
-***************
-*** 43,51 ****
---- 43,57 ----
- # include __STL_NATIVE_OLD_STREAMS_HEADER(iomanip.h)
-
- # if defined (__STL_USE_NAMESPACES) && ! defined (__STL_BROKEN_USING_DIRECTIVE)
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/h/iomanip.h>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_USE_NAMESPACES */
-
- # endif
-*** misc/STLport-4.0/stlport/ios.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/ios.h Thu Aug 25 15:54:54 2005
-***************
-*** 33,41 ****
---- 33,47 ----
-
- # include __STL_NATIVE_OLD_STREAMS_HEADER(ios.h)
- # if defined (__STL_USE_NAMESPACES) && !defined (__STL_BROKEN_USING_DIRECTIVE)
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- using __STL_OLD_IO_NAMESPACE::ios;
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_USE_OWN_NAMESPACE */
-
- # endif
-*** misc/STLport-4.0/stlport/iosfwd Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/iosfwd Thu Aug 25 15:54:54 2005
-***************
-*** 38,46 ****
---- 38,52 ----
-
- # else
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- template <class _Tp> class allocator;
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # include <wrap_std/iosfwd>
-
-*** misc/STLport-4.0/stlport/iostream Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/iostream Thu Aug 25 15:54:54 2005
-***************
-*** 34,39 ****
---- 34,42 ----
- #include <istream>
- #include <ostream>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // Note: cin and wcin are both associated with stdio. The C standard
-***************
-*** 62,67 ****
---- 65,73 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # elif defined ( __STL_USE_NO_IOSTREAMS )
- # include <stl/_null_stream.h>
-*** misc/STLport-4.0/stlport/istream.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/istream.h Thu Aug 25 15:54:54 2005
-***************
-*** 46,54 ****
---- 46,60 ----
- # include __STL_NATIVE_OLD_STREAMS_HEADER(istream.h)
-
- # if defined (__STL_USE_NAMESPACES) && !defined (__STL_BROKEN_USING_DIRECTIVE)
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- using __STL_OLD_IO_NAMESPACE::istream;
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_USE_OWN_NAMESPACE */
-
- # endif /* __SGI_STL_OWN_IOSTREAMS */
-*** misc/STLport-4.0/stlport/locale Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/locale Thu Aug 25 15:54:54 2005
-***************
-*** 59,64 ****
---- 59,67 ----
- #undef toupper
- #undef tolower
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _CharT>
-***************
-*** 133,138 ****
---- 136,144 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # elif !defined (__STL_USE_NO_IOSTREAMS)
- # include <wrap_std/locale>
-*** misc/STLport-4.0/stlport/math.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/math.h Thu Aug 25 15:55:17 2005
-***************
-*** 24,30 ****
---- 24,36 ----
- # define exception __math_exception
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- # include __STL_NATIVE_C_HEADER(math.h)
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if defined (__STL_HAS_NO_NAMESPACES)
- # undef exception
-*** misc/STLport-4.0/stlport/memory Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/memory Thu Aug 25 15:54:55 2005
-***************
-*** 51,56 ****
---- 51,59 ----
-
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- // implementation primitive
- class __ptr_base {
-***************
-*** 188,193 ****
---- 191,199 ----
-
- };
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if (__STL_OUTERMOST_HEADER_ID == 0x46)
- # include <stl/_epilog.h>
-*** misc/STLport-4.0/stlport/memory.new Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/memory.new Thu Aug 25 15:54:55 2005
-***************
-*** 58,63 ****
---- 58,66 ----
-
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // implementation primitive
-***************
-*** 223,228 ****
---- 226,234 ----
- };
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_MEMORY */
-
-*** misc/STLport-4.0/stlport/new Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/new Thu Aug 25 15:54:55 2005
-***************
-*** 58,63 ****
---- 58,66 ----
-
- # ifndef __STL_NO_BAD_ALLOC
- # ifdef __STL_USE_OWN_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- using __STL_VENDOR_EXCEPT_STD::bad_alloc;
- using __STL_VENDOR_EXCEPT_STD::nothrow_t;
-***************
-*** 72,77 ****
---- 75,83 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # endif /* __STL_OWN_NAMESPACE */
- # else /* __STL_NO_BAD_ALLOC */
-***************
-*** 78,83 ****
---- 84,92 ----
-
- # include <exception>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- class nothrow_t {};
-***************
-*** 98,106 ****
---- 107,121 ----
- };
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_NO_BAD_ALLOC */
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- inline void* __STL_CALL __stl_new(size_t __n) {
- #if (( defined(__IBMCPP__)|| defined(__OS400__) || defined (__xlC__) || defined (qTidyHeap)) && defined(__DEBUG_ALLOC__) )
-***************
-*** 118,123 ****
---- 133,141 ----
- #endif
- }
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* WINCE */
-
-*** misc/STLport-4.0/stlport/ostream.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/ostream.h Thu Aug 25 15:54:56 2005
-***************
-*** 33,41 ****
---- 33,47 ----
-
- # include __STL_NATIVE_OLD_STREAMS_HEADER(ostream.h)
- # if defined (__STL_USE_NAMESPACES) && !defined (__STL_BROKEN_USING_DIRECTIVE)
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/h/ostream.h>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_USE_NAMESPACES */
-
- # endif /* __STL_USE_NO_IOSTREAMS */
-*** misc/STLport-4.0/stlport/pthread_alloc Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/pthread_alloc Thu Aug 25 15:54:56 2005
-***************
-*** 51,56 ****
---- 51,59 ----
- # define __RESTRICT
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- #define __STL_DATA_ALIGNMENT 8
-***************
-*** 516,521 ****
---- 519,527 ----
- #endif /* __STL_MEMBER_TEMPLATE_CLASSES */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if (__STL_OUTERMOST_HEADER_ID == 0x52)
- # include <stl/_epilog.h>
-*** misc/STLport-4.0/stlport/stdexcept Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stdexcept Thu Aug 25 15:54:56 2005
-***************
-*** 45,50 ****
---- 45,53 ----
- # include <stl/_string_fwd.h>
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- class __STL_CLASS_DECLSPEC __Named_exception : public __STL_EXCEPTION_BASE {
-***************
-*** 106,111 ****
---- 109,117 ----
- };
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* Not o32, and no exceptions */
- # endif /* __STL_STDEXCEPT_SEEN */
-*** misc/STLport-4.0/stlport/typeinfo Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/typeinfo Thu Aug 25 15:55:00 2005
-***************
-*** 35,40 ****
---- 35,43 ----
-
- # if defined (__STL_USE_NAMESPACES) \
- && ( defined (__STL_VENDOR_GLOBAL_EXCEPT_STD) || defined (__STL_USE_OWN_NAMESPACE) || defined (__STL_DEBUG))
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // VC++ 6 has only this guy in ::
-***************
-*** 48,61 ****
---- 51,73 ----
-
- using __STL_VENDOR_EXCEPT_STD::bad_cast;
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- #endif /* __STL_OWN_NAMESPACE */
-
- #else
-
- # include <exception>
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- struct bad_cast : exception {};
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- #endif /* NO_TYPEINFO */
-
- # if (__STL_OUTERMOST_HEADER_ID == 0x473)
-*** misc/STLport-4.0/stlport/typeinfo.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/typeinfo.h Thu Aug 25 15:55:00 2005
-***************
-*** 31,36 ****
---- 31,39 ----
-
- # if defined (__STL_USE_OWN_NAMESPACE)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- using /* __STL_VENDOR_EXCEPT_STD */ ::type_info;
-***************
-*** 38,43 ****
---- 41,49 ----
- using /* __STL_VENDOR_EXCEPT_STD */ ::bad_cast;
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_OWN_NAMESPACE */
-
-*** misc/STLport-4.0/stlport/old_hp/alloc.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/old_hp/alloc.h Thu Aug 25 15:54:55 2005
-***************
-*** 49,54 ****
---- 49,57 ----
- #endif
-
- // Old SGI names
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- typedef __sgi_alloc alloc;
-***************
-*** 62,67 ****
---- 65,73 ----
- typedef __multithreaded_alloc multithreaded_alloc;
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #ifdef __STL_USE_NAMESPACES
- # ifdef __STL_BROKEN_USING_DIRECTIVE
-*** misc/STLport-4.0/stlport/old_hp/iterator.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/old_hp/iterator.h Thu Aug 25 15:54:55 2005
-***************
-*** 82,87 ****
---- 82,90 ----
-
- # if 0 // defined (__STL_USE_OWN_NAMESPACE) && defined (__STL_IMPORT_VENDOR_STD) && !defined (__STL_BROKEN_USING_DIRECTIVE)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- using __STL_VENDOR_STD::istream_iterator;
-***************
-*** 88,93 ****
---- 91,99 ----
- using __STL_VENDOR_STD::ostream_iterator;
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # endif
-
-*** misc/STLport-4.0/stlport/stl/_algo.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_algo.c Thu Aug 25 15:54:57 2005
-***************
-*** 26,31 ****
---- 26,34 ----
- #ifndef __STL_ALGO_C
- # define __STL_ALGO_C
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _BidirectionalIter, class _Distance>
-***************
-*** 2663,2668 ****
---- 2666,2674 ----
- # endif /* __STL_NO_EXTENSIONS */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef __stl_threshold
-
-*** misc/STLport-4.0/stlport/stl/_algo.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_algo.h Thu Aug 25 15:54:57 2005
-***************
-*** 51,56 ****
---- 51,59 ----
- # include <cstdio>
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // for_each. Apply a function to every element of a range.
-***************
-*** 1039,1044 ****
---- 1042,1050 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_algo.c>
-*** misc/STLport-4.0/stlport/stl/_algobase.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_algobase.c Thu Aug 25 15:54:57 2005
-***************
-*** 25,30 ****
---- 25,33 ----
- #ifndef __SGI_STL_ALGOBASE_C
- #define __SGI_STL_ALGOBASE_C
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _InputIter1, class _InputIter2>
-***************
-*** 89,94 ****
---- 92,100 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_ALGOBASE_C */
-
-*** misc/STLport-4.0/stlport/stl/_algobase.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_algobase.h Thu Aug 25 15:54:57 2005
-***************
-*** 67,72 ****
---- 67,75 ----
- # include <stl/_iterator_base.h>
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- // swap and iter_swap
- template <class _Tp>
-***************
-*** 679,684 ****
---- 682,690 ----
- _InputIter2 __first2, _InputIter2 __last2);
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_algobase.c>
-*** misc/STLport-4.0/stlport/stl/_alloc.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_alloc.c Thu Aug 25 15:54:57 2005
-***************
-*** 40,45 ****
---- 40,48 ----
-
- #define _S_FREELIST_INDEX(__bytes) ((__bytes-size_t(1))>>(int)_ALIGN_SHIFT)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <int __inst>
-***************
-*** 355,360 ****
---- 358,366 ----
- # endif /* __STL_STATIC_TEMPLATE_DATA */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef _S_FREELIST_INDEX
-
-*** misc/STLport-4.0/stlport/stl/_alloc.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_alloc.h Thu Aug 25 15:54:57 2005
-***************
-*** 115,120 ****
---- 115,123 ----
- // conformance.
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _Tp, class _Alloc>
-***************
-*** 893,898 ****
---- 896,904 ----
- # endif /* __STL_USE_TEMPLATE_EXPORT */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_alloc.c>
-*** misc/STLport-4.0/stlport/stl/_bitset.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_bitset.c Thu Aug 25 15:54:57 2005
-***************
-*** 26,31 ****
---- 26,34 ----
- # define bitset __bitset
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- //
-***************
-*** 396,401 ****
---- 399,407 ----
- }; // end _First_one
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef __BITS_PER_WORD
- # undef __BITSET_WORDS
-*** misc/STLport-4.0/stlport/stl/_bitset.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_bitset.h Thu Aug 25 15:54:57 2005
-***************
-*** 67,72 ****
---- 67,75 ----
- #define __BITS_PER_WORD (CHAR_BIT*sizeof(unsigned long))
- #define __BITSET_WORDS(__n) ((__n) < 1 ? 1 : ((__n) + __BITS_PER_WORD - 1)/__BITS_PER_WORD)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // structure to aid in counting bits
-***************
-*** 753,758 ****
---- 756,764 ----
- # undef bitset
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef __BITS_PER_WORD
- # undef __BITSET_WORDS
-*** misc/STLport-4.0/stlport/stl/_bvector.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_bvector.h Thu Aug 25 15:54:57 2005
-***************
-*** 44,49 ****
---- 44,52 ----
- # include <stl/_range_errors.h>
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- struct _Bit_reference {
-***************
-*** 72,77 ****
---- 75,83 ----
- };
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if defined (__SGI_STL_NO_ARROW_OPERATOR) && ! defined (__STL_NO_PROXY_ARROW_OPERATOR)
-
-***************
-*** 87,92 ****
---- 93,101 ----
-
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- inline void swap(_Bit_reference __x, _Bit_reference __y)
-***************
-*** 827,832 ****
---- 836,844 ----
- #endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #undef _Alloc
- #undef __SGI_STL_VECBOOL_TEMPLATE
-*** misc/STLport-4.0/stlport/stl/_codecvt.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_codecvt.h Thu Aug 25 15:54:57 2005
-***************
-*** 26,31 ****
---- 26,34 ----
- #include <stl/c_locale.h>
- #include <stl/_locale.h>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- class __STL_CLASS_DECLSPEC codecvt_base {
-***************
-*** 295,300 ****
---- 298,306 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_INTERNAL_CODECVT_H */
-
-*** misc/STLport-4.0/stlport/stl/_collate.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_collate.h Thu Aug 25 15:54:57 2005
-***************
-*** 26,31 ****
---- 26,34 ----
- #include <stl/_string_fwd.h>
- #include <stl/_locale.h>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
-
-***************
-*** 154,159 ****
---- 157,165 ----
-
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_INTERNAL_COLLATE_H */
-
-*** misc/STLport-4.0/stlport/stl/_complex.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_complex.c Thu Aug 25 15:54:57 2005
-***************
-*** 18,23 ****
---- 18,26 ----
- #ifndef __STL_COMPLEX_C
- #define __STL_COMPLEX_C
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // Non-inline member functions.
-***************
-*** 154,158 ****
---- 157,164 ----
- #endif /* __STL_USE_NEW_IOSTREAMS */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_COMPLEX_C */
-*** misc/STLport-4.0/stlport/stl/_complex.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_complex.h Thu Aug 25 15:54:57 2005
-***************
-*** 52,57 ****
---- 52,60 ----
- #include <istream>
- #include <sstream>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- #if !defined(__STL_NO_COMPLEX_SPECIALIZATIONS) //*TY 02/25/2000 - added for MPW compiler workaround
-***************
-*** 656,661 ****
---- 659,667 ----
- # endif /* SPECIALIZATIONS */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
-
- #if defined (__sgi) && !defined(__GNUC__)
-***************
-*** 721,726 ****
---- 727,735 ----
- # define __STL_HYPOT __STL_DO_HYPOT(double)
-
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // Unary non-member arithmetic operators.
-***************
-*** 1051,1056 ****
---- 1060,1068 ----
- __STL_DECLSPEC complex<long double> __STL_CALL tanh(const complex<long double>&);
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
-
- # ifndef __STL_LINK_TIME_INSTANTIATION
-*** misc/STLport-4.0/stlport/stl/_config.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_config.h Thu Aug 25 15:55:22 2005
-***************
-*** 540,547 ****
---- 540,553 ----
-
- # define __STL_USING_NAMESPACE(x) using namespace x ;
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- namespace std { }
- namespace __std_alias = std;
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- /* assume std:: namespace for C++ std library if not being told otherwise */
- # ifdef __STL_VENDOR_GLOBAL_STD
-*** misc/STLport-4.0/stlport/stl/_construct.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_construct.h Thu Aug 25 15:54:57 2005
-***************
-*** 46,51 ****
---- 46,54 ----
- # include <stl/_iterator_base.h>
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # ifdef __STL_TRIVIAL_DESTRUCTOR_BUG
-***************
-*** 159,164 ****
---- 162,170 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_INTERNAL_CONSTRUCT_H */
-
-*** misc/STLport-4.0/stlport/stl/_ctraits_fns.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_ctraits_fns.h Thu Aug 25 15:54:57 2005
-***************
-*** 25,30 ****
---- 25,33 ----
- // This file contains a few small adapters that allow a character
- // traits class to be used as a function object.
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _Traits>
-***************
-*** 61,66 ****
---- 64,72 ----
- };
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_INTERNAL_CTRAITS_FUNCTIONS_H */
-
-*** misc/STLport-4.0/stlport/stl/_ctype.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_ctype.h Thu Aug 25 15:54:57 2005
-***************
-*** 28,33 ****
---- 28,36 ----
- # include <stl/_algobase.h>
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- class __STL_CLASS_DECLSPEC ctype_base {
-***************
-*** 264,269 ****
---- 267,275 ----
-
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_INTERNAL_CTYPE_H */
-
-*** misc/STLport-4.0/stlport/stl/_deque.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_deque.c Thu Aug 25 15:54:57 2005
-***************
-*** 26,31 ****
---- 26,34 ----
- #ifndef __STL_DEQUE_C
- #define __STL_DEQUE_C
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // Non-inline member functions from _Deque_base.
-***************
-*** 778,783 ****
---- 781,789 ----
- # endif /* __STL_MEMBER_TEMPLATES */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef __iterator__
- # undef iterator
-*** misc/STLport-4.0/stlport/stl/_deque.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_deque.h Thu Aug 25 15:54:57 2005
-***************
-*** 96,101 ****
---- 96,104 ----
- # undef deque
- # define deque __WORKAROUND_DBG_RENAME(deque)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # if defined ( __STL_USE_ABBREVS )
-***************
-*** 1058,1063 ****
---- 1061,1069 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- // do a cleanup
- # undef deque
-*** misc/STLport-4.0/stlport/stl/_fstream.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_fstream.c Thu Aug 25 15:54:57 2005
-***************
-*** 20,25 ****
---- 20,28 ----
-
- # if defined (__STL_DESIGNATED_DLL) || ! defined (__STL_NO_CUSTOM_IO)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # if defined ( __STL_NESTED_TYPE_PARAM_BUG )
-***************
-*** 732,737 ****
---- 735,743 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef __BF_int_type__
- # undef __BF_pos_type__
-*** misc/STLport-4.0/stlport/stl/_fstream.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_fstream.h Thu Aug 25 15:54:57 2005
-***************
-*** 61,66 ****
---- 61,69 ----
- #endif
-
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- //----------------------------------------------------------------------
-***************
-*** 644,654 ****
---- 647,663 ----
- };
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_fstream.c>
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # if defined (__STL_USE_TEMPLATE_EXPORT)
-***************
-*** 663,668 ****
---- 672,680 ----
- # endif /* __STL_USE_TEMPLATE_EXPORT */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_FSTREAM */
-
-*** misc/STLport-4.0/stlport/stl/_function.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_function.h Thu Aug 25 15:54:57 2005
-***************
-*** 30,35 ****
---- 30,38 ----
- #ifndef __SGI_STL_INTERNAL_FUNCTION_H
- #define __SGI_STL_INTERNAL_FUNCTION_H
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _Arg, class _Result>
-***************
-*** 805,810 ****
---- 808,816 ----
- # endif /* __STL_MEMBER_POINTER_PARAM_BUG */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_INTERNAL_FUNCTION_H */
-
-*** misc/STLport-4.0/stlport/stl/_hash_fun.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_hash_fun.h Thu Aug 25 15:54:58 2005
-***************
-*** 35,40 ****
---- 35,43 ----
- # include <cstddef>
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _Key> struct hash { };
-***************
-*** 99,104 ****
---- 102,110 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_HASH_FUN_H */
-
-*** misc/STLport-4.0/stlport/stl/_hash_map.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_hash_map.h Thu Aug 25 15:54:58 2005
-***************
-*** 30,35 ****
---- 30,38 ----
- #ifndef __SGI_STL_INTERNAL_HASH_MAP_H
- #define __SGI_STL_INTERNAL_HASH_MAP_H
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # define hash_map __WORKAROUND_RENAME(hash_map)
-***************
-*** 489,494 ****
---- 492,500 ----
-
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if defined (__STL_USE_WRAPPER_FOR_ALLOC_PARAM)
- # include <stl/wrappers/_hash_map.h>
-*** misc/STLport-4.0/stlport/stl/_hash_set.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_hash_set.h Thu Aug 25 15:54:58 2005
-***************
-*** 33,38 ****
---- 33,41 ----
- # define hash_set __WORKAROUND_RENAME(hash_set)
- # define hash_multiset __WORKAROUND_RENAME(hash_multiset)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _Value, __DFL_TMPL_PARAM(_HashFcn,hash<_Value>),
-***************
-*** 468,473 ****
---- 471,479 ----
-
- #endif /* __STL_CLASS_PARTIAL_SPECIALIZATION */
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- // do a cleanup
- # undef hash_set
-*** misc/STLport-4.0/stlport/stl/_hashtable.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_hashtable.c Thu Aug 25 15:54:58 2005
-***************
-*** 30,35 ****
---- 30,38 ----
- # define hashtable __WORKAROUND_DBG_RENAME(hashtable)
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # define __PRIME_LIST_BODY { \
-***************
-*** 441,446 ****
---- 444,452 ----
- # undef hashtable
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_HASHTABLE_C */
-
-*** misc/STLport-4.0/stlport/stl/_hashtable.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_hashtable.h Thu Aug 25 15:54:58 2005
-***************
-*** 57,62 ****
---- 57,65 ----
- # define hashtable __WORKAROUND_DBG_RENAME(hashtable)
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # if defined ( __STL_USE_ABBREVS )
-***************
-*** 606,611 ****
---- 609,617 ----
- #endif /* __STL_USE_SEPARATE_RELOPS_NAMESPACE */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef __stl_prime_list
- # undef hashtable
-*** misc/STLport-4.0/stlport/stl/_heap.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_heap.c Thu Aug 25 15:54:58 2005
-***************
-*** 30,35 ****
---- 30,38 ----
- # include <stl/_iterator_base.h>
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _RandomAccessIterator, class _Distance, class _Tp>
-***************
-*** 234,239 ****
---- 237,245 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_HEAP_C */
-
-*** misc/STLport-4.0/stlport/stl/_heap.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_heap.h Thu Aug 25 15:54:58 2005
-***************
-*** 34,39 ****
---- 34,42 ----
- #include <stl/_config.h>
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // Heap-manipulation functions: push_heap, pop_heap, make_heap, sort_heap.
-***************
-*** 117,122 ****
---- 120,128 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_heap.c>
-*** misc/STLport-4.0/stlport/stl/_ios.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_ios.c Thu Aug 25 15:54:58 2005
-***************
-*** 20,25 ****
---- 20,28 ----
-
- # include <stl/_streambuf.h>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // basic_ios<>'s non-inline member functions
-***************
-*** 107,111 ****
---- 110,117 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_IOS_C */
-*** misc/STLport-4.0/stlport/stl/_ios.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_ios.h Thu Aug 25 15:54:58 2005
-***************
-*** 26,31 ****
---- 26,34 ----
- #include <stl/_locale.h>
- #include <stl/_ctype.h>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // ----------------------------------------------------------------------
-***************
-*** 171,176 ****
---- 174,182 ----
-
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_ios.c>
-*** misc/STLport-4.0/stlport/stl/_ios_base.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_ios_base.h Thu Aug 25 15:54:58 2005
-***************
-*** 24,29 ****
---- 24,32 ----
- #include <iosfwd>
- #include <stl/_locale.h>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // ----------------------------------------------------------------------
-***************
-*** 365,370 ****
---- 368,376 ----
- { __s.setf(ios_base::scientific, ios_base::floatfield); return __s; }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_IOS_BASE */
-
-*** misc/STLport-4.0/stlport/stl/_iosfwd.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_iosfwd.h Thu Aug 25 15:54:58 2005
-***************
-*** 28,33 ****
---- 28,36 ----
- #endif /* __unix */
-
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _Tp> class allocator;
-***************
-*** 110,118 ****
---- 113,127 ----
- typedef fpos<mbstate_t> wstreampos;
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #include <stl/char_traits.h>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- class __STL_CLASS_DECLSPEC ios_base;
-***************
-*** 245,250 ****
---- 254,262 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif
-
-*** misc/STLport-4.0/stlport/stl/_istream.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_istream.c Thu Aug 25 15:54:58 2005
-***************
-*** 32,37 ****
---- 32,40 ----
- # define __BIS_off_type__ __STL_TYPENAME_ON_RETURN_TYPE basic_istream<_CharT, _Traits>::off_type
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
-
-***************
-*** 1269,1274 ****
---- 1272,1280 ----
- {}
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef __BIS_int_type__
- # undef __BIS_pos_type__
-*** misc/STLport-4.0/stlport/stl/_istream.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_istream.h Thu Aug 25 15:54:58 2005
-***************
-*** 27,32 ****
---- 27,35 ----
- #include <stl/_ctraits_fns.h> // Helper functions that allow char traits
- // to be used as function objects.
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _CharT, class _Traits, class _Number>
-***************
-*** 470,475 ****
---- 473,481 ----
- # endif /* __STL_USE_TEMPLATE_EXPORT */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_istream.c>
-*** misc/STLport-4.0/stlport/stl/_iterator.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_iterator.h Thu Aug 25 15:54:58 2005
-***************
-*** 34,39 ****
---- 34,42 ----
- # include <stl/_iterator_base.h>
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # if defined (__STL_NO_CLASS_PARTIAL_SPECIALIZATION) || ! defined (__STL_NO_ANACHRONISMS)
-***************
-*** 574,579 ****
---- 577,585 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_INTERNAL_ITERATOR_H */
-
-*** misc/STLport-4.0/stlport/stl/_iterator_base.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_iterator_base.h Thu Aug 25 15:54:58 2005
-***************
-*** 57,62 ****
---- 57,65 ----
- # define _Nonconst_traits _N_Tr
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- struct input_iterator_tag {};
-***************
-*** 143,149 ****
---- 146,158 ----
- # define __STL_POINTERS_SPECIALIZE( _TpP )
- # else
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # include <stl/_ptrs_specialize.h>
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # endif
-
-***************
-*** 421,426 ****
---- 430,438 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if defined (__STL_DEBUG) && ! defined (__STLPORT_DEBUG_H)
- # include <stl/debug/_debug.h>
-*** misc/STLport-4.0/stlport/stl/_limits.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_limits.c Thu Aug 25 15:54:58 2005
-***************
-*** 24,29 ****
---- 24,32 ----
- // numeric_limits static members
- //==========================================================
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # ifdef __STL_NO_STATIC_TEMPLATE_DATA
-***************
-*** 362,366 ****
---- 365,372 ----
- # undef __STL_LDOUBLE_SNAN_REP
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STLPORT_LIMITS_C_INCLUDED */
-*** misc/STLport-4.0/stlport/stl/_limits.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_limits.h Thu Aug 25 15:54:58 2005
-***************
-*** 26,31 ****
---- 26,34 ----
-
- #define __SGI_CPP_LIMITS
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- enum float_round_style {
-***************
-*** 379,384 ****
---- 382,390 ----
- // We write special values (Inf and NaN) as bit patterns and
- // cast the the appropriate floating-point types.
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_limits.c>
-*** misc/STLport-4.0/stlport/stl/_list.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_list.c Thu Aug 25 15:54:58 2005
-***************
-*** 34,39 ****
---- 34,42 ----
- # undef list
- # define list __WORKAROUND_DBG_RENAME(list)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _Dummy>
-***************
-*** 334,339 ****
---- 337,345 ----
- # undef __iterator__
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_LIST_C */
-
-*** misc/STLport-4.0/stlport/stl/_list.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_list.h Thu Aug 25 15:54:58 2005
-***************
-*** 46,51 ****
---- 46,54 ----
- # include <stl/_construct.h>
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # undef list
-***************
-*** 268,274 ****
-
- reference front() { return *begin(); }
- const_reference front() const { return *begin(); }
-! reference back() { return *(--end()); }
- const_reference back() const { return *(--end()); }
-
- void swap(list<_Tp, _Alloc>& __x) {
---- 271,277 ----
-
- reference front() { return *begin(); }
- const_reference front() const { return *begin(); }
-! reference back() { iterator i(end()); --i; return *i; }
- const_reference back() const { return *(--end()); }
-
- void swap(list<_Tp, _Alloc>& __x) {
-***************
-*** 588,593 ****
---- 591,599 ----
- #endif /* __STL_USE_SEPARATE_RELOPS_NAMESPACE */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_list.c>
-*** misc/STLport-4.0/stlport/stl/_locale.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_locale.c Thu Aug 25 15:54:58 2005
-***************
-*** 23,28 ****
---- 23,31 ----
- #include <stl/_string.h>
- #include <stl/_collate.h>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- //----------------------------------------------------------------------
-***************
-*** 66,70 ****
---- 69,76 ----
- # endif /* MEMBER_TEMPLATES */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif
-*** misc/STLport-4.0/stlport/stl/_locale.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_locale.h Thu Aug 25 15:54:58 2005
-***************
-*** 28,33 ****
---- 28,36 ----
- #include <stl/_threads.h>
- #include <stl/_string_fwd.h>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- class __STL_CLASS_DECLSPEC _Locale_impl; // Forward declaration of opaque type.
-***************
-*** 212,217 ****
---- 215,223 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # ifndef __STL_LINK_TIME_INSTANTIATION
- # include <stl/_locale.c>
-*** misc/STLport-4.0/stlport/stl/_map.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_map.h Thu Aug 25 15:54:58 2005
-***************
-*** 33,38 ****
---- 33,41 ----
- #define map __WORKAROUND_RENAME(map)
- #define multimap __WORKAROUND_RENAME(multimap)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _Key, class _Tp, __DFL_TMPL_PARAM(_Compare, less<_Key> ),
-***************
-*** 384,389 ****
---- 387,395 ----
- # undef __STL_TEMPLATE_HEADER
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- // do a cleanup
- # undef map
-*** misc/STLport-4.0/stlport/stl/_messages_facets.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_messages_facets.h Thu Aug 25 15:54:58 2005
-***************
-*** 24,29 ****
---- 24,32 ----
- #ifndef __SGI_STL_INTERNAL_MESSAGES_H
- #define __SGI_STL_INTERNAL_MESSAGES_H
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // Forward declaration of an opaque type.
-***************
-*** 150,155 ****
---- 153,161 ----
- # endif /* WCHAR_T */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_INTERNAL_MESSAGES_H */
-
-*** misc/STLport-4.0/stlport/stl/_monetary.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_monetary.c Thu Aug 25 15:54:58 2005
-***************
-*** 18,23 ****
---- 18,26 ----
- #ifndef __STL_MONETARY_C
- #define __STL_MONETARY_C
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _CharT, class _InputIterator>
-***************
-*** 557,561 ****
---- 560,567 ----
- # endif /* defined (__STL_NO_CUSTOM_IO) && ! defined (__STL_DESIGNATED_DLL) */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_MONETARY_C */
-*** misc/STLport-4.0/stlport/stl/_monetary.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_monetary.h Thu Aug 25 15:54:58 2005
-***************
-*** 25,30 ****
---- 25,33 ----
-
- # include <stl/_numeric_facets.h>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- class money_base {
-***************
-*** 441,446 ****
---- 444,452 ----
- };
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_monetary.c>
-*** misc/STLport-4.0/stlport/stl/_null_stream.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_null_stream.h Thu Aug 25 15:54:58 2005
-***************
-*** 16,21 ****
---- 16,24 ----
- #ifndef __STL_NULL_STREAM_H
- # define __STL_NULL_STREAM_H
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- struct __null_stream
-***************
-*** 38,42 ****
---- 41,48 ----
- extern __null_stream cin, cout, cerr, endl, ws, hex, dec;
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # endif
-*** misc/STLport-4.0/stlport/stl/_numeric.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_numeric.c Thu Aug 25 15:54:58 2005
-***************
-*** 34,39 ****
---- 34,42 ----
- # include <stl/_iterator_base.h>
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _InputIterator, class _OutputIterator, class _Tp>
-***************
-*** 181,186 ****
---- 184,192 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_NUMERIC_C */
-
-*** misc/STLport-4.0/stlport/stl/_numeric.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_numeric.h Thu Aug 25 15:54:58 2005
-***************
-*** 36,41 ****
---- 36,44 ----
- # include <stl/debug/_debug.h>
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _InputIterator, class _Tp>
-***************
-*** 141,146 ****
---- 144,152 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_numeric.c>
-*** misc/STLport-4.0/stlport/stl/_numeric_facets.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_numeric_facets.c Thu Aug 25 15:54:58 2005
-***************
-*** 21,26 ****
---- 21,29 ----
- #include <stl/_pair.h>
- # include <stl/_stream_iterator.h>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
-
-***************
-*** 1083,1088 ****
---- 1086,1094 ----
- # endif /* __STL_NO_CUSTOM_IO */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
-
- #endif /* __STL_NUMERIC_FACETS_C */
-*** misc/STLport-4.0/stlport/stl/_numeric_facets.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_numeric_facets.h Thu Aug 25 15:54:58 2005
-***************
-*** 27,32 ****
---- 27,35 ----
- # include <stl/_locale.h>
- # include <stl/_string.h>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- //----------------------------------------------------------------------
-***************
-*** 524,529 ****
---- 527,535 ----
- # endif /* CUSTOM_IO */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # ifndef __STL_LINK_TIME_INSTANTIATION
- # include <stl/_numeric_facets.c>
-*** misc/STLport-4.0/stlport/stl/_ostream.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_ostream.c Thu Aug 25 15:54:58 2005
-***************
-*** 20,25 ****
---- 20,28 ----
-
- #include <stl/_numeric_facets.h> // For num_put<>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- //----------------------------------------------------------------------
-***************
-*** 346,351 ****
---- 349,357 ----
-
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
-
- #endif /* __STL_OSTREAM_C */
-*** misc/STLport-4.0/stlport/stl/_ostream.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_ostream.h Thu Aug 25 15:54:58 2005
-***************
-*** 24,29 ****
---- 24,32 ----
- #include <limits> // Needed for class numeric_limits<>.
- #include <streambuf> // For basic_streambuf.
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _CharT, class _Traits, class _Number>
-***************
-*** 309,314 ****
---- 312,320 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef __STL_MANIP_INLINE
-
-*** misc/STLport-4.0/stlport/stl/_pair.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_pair.h Thu Aug 25 15:54:58 2005
-***************
-*** 32,37 ****
---- 32,40 ----
- #define __SGI_STL_INTERNAL_PAIR_H
-
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _T1, class _T2>
-***************
-*** 127,132 ****
---- 130,138 ----
-
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_INTERNAL_PAIR_H */
-
-*** misc/STLport-4.0/stlport/stl/_ptrs_specialize.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_ptrs_specialize.h Thu Aug 25 15:54:58 2005
-***************
-*** 107,112 ****
---- 107,115 ----
- __STL_ITERATOR_TRAITS_SPECIALIZE(_Type**, _Type**) \
- __STL_ITERATOR_TRAITS_SPECIALIZE(_Type** const, _Type** const) \
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif
-
- # define __STL_TYPE_TRAITS_POD_SPECIALIZE_V(_Type) \
-*** misc/STLport-4.0/stlport/stl/_queue.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_queue.h Thu Aug 25 15:54:58 2005
-***************
-*** 46,51 ****
---- 46,54 ----
- # include <stl/_function.h>
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # if ! defined ( __STL_LIMITED_DEFAULT_TEMPLATES )
-***************
-*** 197,202 ****
---- 200,208 ----
- };
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef __STL_QUEUE_ARGS
- # undef __STL_QUEUE_HEADER_ARGS
-*** misc/STLport-4.0/stlport/stl/_range_errors.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_range_errors.h Thu Aug 25 15:54:59 2005
-***************
-*** 37,47 ****
---- 37,53 ----
-
- #if defined (__STL_EXTERN_RANGE_ERRORS)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- void __STL_DECLSPEC __STL_CALL __stl_throw_range_error(const char* __msg);
- void __STL_DECLSPEC __STL_CALL __stl_throw_out_of_range(const char* __msg);
- void __STL_DECLSPEC __STL_CALL __stl_throw_length_error(const char* __msg);
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- // For other compilers where we're throwing range errors, include the
- // stdexcept header and throw the appropriate exceptions directly.
-***************
-*** 55,60 ****
---- 61,69 ----
- # include <string>
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- inline void __STL_DECLSPEC __STL_CALL __stl_throw_range_error(const char* __msg) {
-***************
-*** 70,75 ****
---- 79,87 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- // Otherwise, define inline functions that do nothing.
- #else
-***************
-*** 76,81 ****
---- 88,96 ----
-
- # include <cstdlib>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- inline void __STL_DECLSPEC __STL_CALL __stl_throw_range_error(const char*) { abort(); }
-***************
-*** 82,87 ****
---- 97,105 ----
- inline void __STL_DECLSPEC __STL_CALL __stl_throw_length_error(const char*) { abort();}
- inline void __STL_DECLSPEC __STL_CALL __stl_throw_out_of_range(const char*) { abort(); }
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif
-
-*** misc/STLport-4.0/stlport/stl/_raw_storage_iter.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_raw_storage_iter.h Thu Aug 25 15:54:59 2005
-***************
-*** 30,35 ****
---- 30,38 ----
- #ifndef __SGI_STL_INTERNAL_RAW_STORAGE_ITERATOR_H
- #define __SGI_STL_INTERNAL_RAW_STORAGE_ITERATOR_H
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _ForwardIterator, class _Tp>
-***************
-*** 70,75 ****
---- 73,81 ----
- inline output_iterator_tag __ITERATOR_CATEGORY(const raw_storage_iterator<_ForwardIterator, _Tp>&) { return output_iterator_tag(); }
- #endif
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_INTERNAL_RAW_STORAGE_ITERATOR_H */
-
-*** misc/STLport-4.0/stlport/stl/_rope.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_rope.c Thu Aug 25 15:54:59 2005
-***************
-*** 37,42 ****
---- 37,45 ----
-
- # include <stl/_range_errors.h>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # if defined ( __STL_NESTED_TYPE_PARAM_BUG )
-***************
-*** 1529,1534 ****
---- 1532,1540 ----
- # undef size_type
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* ROPEIMPL_H */
-
- // Local Variables:
-*** misc/STLport-4.0/stlport/stl/_rope.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_rope.h Thu Aug 25 15:54:59 2005
-***************
-*** 75,80 ****
---- 75,83 ----
- # include <mutex.h>
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
-
-***************
-*** 2491,2496 ****
---- 2494,2502 ----
- }
- }
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_rope.c>
-*** misc/STLport-4.0/stlport/stl/_set.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_set.h Thu Aug 25 15:54:59 2005
-***************
-*** 37,42 ****
---- 37,45 ----
- #define set __WORKAROUND_RENAME(set)
- #define multiset __WORKAROUND_RENAME(multiset)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _Key, __DFL_TMPL_PARAM(_Compare,less<_Key>),
-***************
-*** 341,346 ****
---- 344,352 ----
- # undef __STL_TEMPLATE_HEADER
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- // do a cleanup
- # undef set
-*** misc/STLport-4.0/stlport/stl/_slist.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_slist.c Thu Aug 25 15:54:59 2005
-***************
-*** 25,30 ****
---- 25,33 ----
- # define size_type size_t
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _Tp, class _Alloc>
-***************
-*** 255,260 ****
---- 258,266 ----
- # undef size_type
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_SLIST_C */
-
-*** misc/STLport-4.0/stlport/stl/_slist.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_slist.h Thu Aug 25 15:54:59 2005
-***************
-*** 55,60 ****
---- 55,63 ----
- # undef slist
- # define slist __WORKAROUND_DBG_RENAME(slist)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _Tp>
-***************
-*** 730,735 ****
---- 733,741 ----
- #endif /* __STL_FUNCTION_TMPL_PARTIAL_ORDER */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_slist.c>
-***************
-*** 742,747 ****
---- 748,756 ----
- # include <stl/debug/_slist.h>
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- // Specialization of insert_iterator so that insertions will be constant
- // time rather than linear time.
-***************
-*** 783,788 ****
---- 792,800 ----
- #endif /* __STL_CLASS_PARTIAL_SPECIALIZATION */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
-
- # if defined ( __STL_USE_WRAPPER_FOR_ALLOC_PARAM )
-*** misc/STLport-4.0/stlport/stl/_slist_base.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_slist_base.c Thu Aug 25 15:54:59 2005
-***************
-*** 26,31 ****
---- 26,34 ----
- #ifndef __STL_SLIST_BASE_C
- #define __STL_SLIST_BASE_C
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _Dummy>
-***************
-*** 92,97 ****
---- 95,103 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_SLIST_BASE_C */
-
-*** misc/STLport-4.0/stlport/stl/_slist_base.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_slist_base.h Thu Aug 25 15:54:59 2005
-***************
-*** 31,36 ****
---- 31,39 ----
- #include <cstddef>
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- struct _Slist_node_base
-***************
-*** 71,76 ****
---- 74,82 ----
- typedef _Sl_global<bool> _Sl_global_inst;
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_slist_base.c>
-*** misc/STLport-4.0/stlport/stl/_sstream.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_sstream.c Thu Aug 25 15:54:59 2005
-***************
-*** 29,34 ****
---- 29,37 ----
- # define __BSB_pos_type__ __STL_TYPENAME_ON_RETURN_TYPE basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- //----------------------------------------------------------------------
-***************
-*** 529,534 ****
---- 532,540 ----
- {}
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
-
- # undef __BSB_int_type__
-*** misc/STLport-4.0/stlport/stl/_sstream.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_sstream.h Thu Aug 25 15:54:59 2005
-***************
-*** 28,33 ****
---- 28,36 ----
- #include <istream> // Includes <ostream>, <ios>, <iosfwd>
- #include <string>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- //----------------------------------------------------------------------
-***************
-*** 230,235 ****
---- 233,241 ----
- # endif /* __STL_USE_TEMPLATE_EXPORT */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_sstream.c>
-*** misc/STLport-4.0/stlport/stl/_stack.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_stack.h Thu Aug 25 15:54:59 2005
-***************
-*** 30,35 ****
---- 30,38 ----
- #ifndef __SGI_STL_INTERNAL_STACK_H
- #define __SGI_STL_INTERNAL_STACK_H
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # if !defined ( __STL_LIMITED_DEFAULT_TEMPLATES )
-***************
-*** 90,95 ****
---- 93,101 ----
- __STL_RELOPS_OPERATORS(template < __STL_STACK_HEADER_ARGS >, stack< __STL_STACK_ARGS >)
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef __STL_STACK_ARGS
- # undef __STL_STACK_HEADER_ARGS
-*** misc/STLport-4.0/stlport/stl/_stdio_file.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_stdio_file.h Thu Aug 25 15:54:59 2005
-***************
-*** 71,76 ****
---- 71,79 ----
- # include <unix.h> // get the definition of fileno
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- //----------------------------------------------------------------------
-***************
-*** 89,95 ****
- typedef unsigned char* _File_ptr_type;
- #endif
-
-! inline int _FILE_fd(const FILE& __f) { return __f._file; }
- inline char* _FILE_I_begin(const FILE& __f) { return (char*) __f._base; }
- inline char* _FILE_I_next(const FILE& __f) { return (char*) __f._ptr; }
- inline char* _FILE_I_end(const FILE& __f)
---- 92,98 ----
- typedef unsigned char* _File_ptr_type;
- #endif
-
-! inline int _FILE_fd(const FILE& __f) { return fileno(__CONST_CAST(FILE*,&__f)); }
- inline char* _FILE_I_begin(const FILE& __f) { return (char*) __f._base; }
- inline char* _FILE_I_next(const FILE& __f) { return (char*) __f._ptr; }
- inline char* _FILE_I_end(const FILE& __f)
-***************
-*** 377,382 ****
---- 380,388 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_STDIO_FILE_H */
-
-*** misc/STLport-4.0/stlport/stl/_stream_iterator.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_stream_iterator.h Thu Aug 25 15:54:59 2005
-***************
-*** 46,51 ****
---- 46,54 ----
-
- # include <streambuf>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // We do not read any characters until operator* is called. The first
-***************
-*** 214,222 ****
---- 217,231 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # include <stl/_istream.h>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _CharT, class _Traits>
-***************
-*** 242,247 ****
---- 251,259 ----
- : _M_buf(__o.rdbuf()), _M_ok(__o.rdbuf()!=0) {}
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # endif /* SGI_OWN_IOSTREAMS */
-
-***************
-*** 251,256 ****
---- 263,271 ----
-
- # if defined (__STL_USE_NEW_IOSTREAMS)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # ifndef __STL_LIMITED_DEFAULT_TEMPLATES
-***************
-*** 388,397 ****
---- 403,418 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
-
- # elif ! defined(__STL_USE_NO_IOSTREAMS)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # if defined (__STL_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && ! defined (__STL_DEFAULT_TYPE_PARAM)
-***************
-*** 479,488 ****
---- 500,515 ----
- #endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_USE_NEW_IOSTREAMS */
-
- // form-independent definiotion of stream iterators
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template < __ISI_TMPL_HEADER_ARGUMENTS >
-***************
-*** 525,530 ****
---- 552,560 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef __ISI_TMPL_HEADER_ARGUMENTS
- # undef __ISI_TMPL_ARGUMENTS
-*** misc/STLport-4.0/stlport/stl/_streambuf.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_streambuf.c Thu Aug 25 15:54:59 2005
-***************
-*** 24,29 ****
---- 24,32 ----
-
- # if defined (__STL_DESIGNATED_DLL) || ! defined (__STL_NO_CUSTOM_IO)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- //----------------------------------------------------------------------
- // Non-inline basic_streambuf<> member functions.
-***************
-*** 210,215 ****
---- 213,221 ----
- # endif /* __STL_USE_TEMPLATE_EXPORT */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # endif /* NO_CUSTOM_IO */
-
-*** misc/STLport-4.0/stlport/stl/_streambuf.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_streambuf.h Thu Aug 25 15:54:59 2005
-***************
-*** 23,28 ****
---- 23,31 ----
- #include <stl/_stdio_file.h> // Declaration of struct FILE, and of
- // functions to manipulate it.
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- //----------------------------------------------------------------------
-***************
-*** 479,484 ****
---- 482,490 ----
- # endif
- };
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_streambuf.c>
-*** misc/STLport-4.0/stlport/stl/_string.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_string.c Thu Aug 25 15:54:59 2005
-***************
-*** 42,47 ****
---- 42,50 ----
- # define __iterator__ __STL_TYPENAME_ON_RETURN_TYPE basic_string<_CharT,_Traits,_Alloc>::iterator
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- #if defined (__STL_MEMBER_TEMPLATES) && ! defined (__STL_INLINE_MEMBER_TEMPLATES)
-***************
-*** 664,669 ****
---- 667,675 ----
- }
- }
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- // _string_fwd has to see clean basic_string
- # undef basic_string
-***************
-*** 678,683 ****
---- 684,692 ----
-
- # include <stl/_range_errors.h>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // _String_base methods
-***************
-*** 692,697 ****
---- 701,709 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef basic_string
- # undef __size_type__
-*** misc/STLport-4.0/stlport/stl/_string.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_string.h Thu Aug 25 15:54:59 2005
-***************
-*** 78,83 ****
---- 78,86 ----
- // a user-defined non-POD type. However, _CharT must still have a
- // default constructor.
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # ifdef __STL_DEBUG
-***************
-*** 1520,1525 ****
---- 1523,1531 ----
- # undef basic_string
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # ifdef __STL_DEBUG
- # include <stl/debug/_string.h>
-*** misc/STLport-4.0/stlport/stl/_string_fwd.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_string_fwd.c Thu Aug 25 15:54:59 2005
-***************
-*** 26,31 ****
---- 26,34 ----
- #if !defined ( __STL_STRING_FWD_C) && ! defined (__SGI_STL_OWN_IOSTREAMS)
- #define __STL_STRING_FWD_C
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _CharT, class _Traits, class _Alloc>
-***************
-*** 35,40 ****
---- 38,46 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_STRING_FWD_C */
-
-*** misc/STLport-4.0/stlport/stl/_string_fwd.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_string_fwd.h Thu Aug 25 15:54:59 2005
-***************
-*** 21,26 ****
---- 21,29 ----
-
- # include <iosfwd>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # if !defined (__STL_LIMITED_DEFAULT_TEMPLATES)
-***************
-*** 51,56 ****
---- 54,62 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_STRING_FWD_H */
-
-*** misc/STLport-4.0/stlport/stl/_string_hash.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_string_hash.h Thu Aug 25 15:54:59 2005
-***************
-*** 23,28 ****
---- 23,31 ----
- # include <stl/_hash_fun.h>
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _CharT, class _Traits, class _Alloc>
-***************
-*** 62,66 ****
---- 65,72 ----
- #endif /* __STL_CLASS_PARTIAL_SPECIALIZATION */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif
-*** misc/STLport-4.0/stlport/stl/_string_io.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_string_io.c Thu Aug 25 15:54:59 2005
-***************
-*** 5,10 ****
---- 5,13 ----
- # define basic_string _Nondebug_string
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- #if defined (__STL_USE_NEW_IOSTREAMS)
-***************
-*** 322,327 ****
---- 325,333 ----
- # endif /* __STL_NEW_IOSTREAMS */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef basic_string
-
-*** misc/STLport-4.0/stlport/stl/_string_io.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_string_io.h Thu Aug 25 15:54:59 2005
-***************
-*** 29,34 ****
---- 29,37 ----
- # endif
-
- // I/O.
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- #if defined (__STL_USE_NEW_IOSTREAMS)
-***************
-*** 108,113 ****
---- 111,119 ----
- #endif /* __STL_USE_NEW_IOSTREAMS */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef basic_string
-
-*** misc/STLport-4.0/stlport/stl/_strstream.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_strstream.h Thu Aug 25 15:54:59 2005
-***************
-*** 6,11 ****
---- 6,14 ----
- #include <istream> // Includes <ostream>, <ios>, <iosfwd>
- #include <string>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- //----------------------------------------------------------------------
-***************
-*** 129,131 ****
---- 132,137 ----
- };
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-*** misc/STLport-4.0/stlport/stl/_tempbuf.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_tempbuf.c Thu Aug 25 15:54:59 2005
-***************
-*** 26,31 ****
---- 26,34 ----
- #ifndef __STL_TEMPBUF_C
- #define __STL_TEMPBUF_C
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _Tp>
-***************
-*** 45,50 ****
---- 48,56 ----
- return pair<_Tp*, ptrdiff_t>((_Tp*)0, 0);
- }
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_TEMPBUF_C */
-
-*** misc/STLport-4.0/stlport/stl/_tempbuf.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_tempbuf.h Thu Aug 25 15:54:59 2005
-***************
-*** 40,45 ****
---- 40,48 ----
- # include <stl/_uninitialized.h>
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _Tp>
-***************
-*** 157,162 ****
---- 160,168 ----
- # endif /* __STL_NO_EXTENSIONS */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # ifndef __STL_LINK_TIME_INSTANTIATION
- # include <stl/_tempbuf.c>
-*** misc/STLport-4.0/stlport/stl/_threads.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_threads.c Thu Aug 25 15:54:59 2005
-***************
-*** 28,33 ****
---- 28,36 ----
-
- # if defined (__BUILDING_STLPORT) || ! defined (__SGI_STL_OWN_IOSTREAMS)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # if ( __STL_STATIC_TEMPLATE_DATA > 0 )
-***************
-*** 127,132 ****
---- 130,138 ----
- # endif /* if SGI or WIN */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # endif /* BUILDING_STLPORT */
- #endif /* __STL_THREADS_C */
-*** misc/STLport-4.0/stlport/stl/_threads.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_threads.h Thu Aug 25 15:54:59 2005
-***************
-*** 124,129 ****
---- 124,132 ----
- # define __STL_MUTEX_INITIALIZER
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
-
-***************
-*** 406,411 ****
---- 409,417 ----
- };
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_threads.c>
-*** misc/STLport-4.0/stlport/stl/_time_facets.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_time_facets.c Thu Aug 25 15:54:59 2005
-***************
-*** 18,23 ****
---- 18,26 ----
- #ifndef __STL_TIME_FACETS_C
- #define __STL_TIME_FACETS_C
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- //----------------------------------------------------------------------
-***************
-*** 452,456 ****
---- 455,462 ----
- # endif /* CUSTOM_IO */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_TIME_FACETS_C */
-*** misc/STLport-4.0/stlport/stl/_time_facets.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_time_facets.h Thu Aug 25 15:54:59 2005
-***************
-*** 23,28 ****
---- 23,31 ----
- #ifndef __SGI_STL_INTERNAL_TIME_FACETS_H
- #define __SGI_STL_INTERNAL_TIME_FACETS_H
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- _Locale_time* __STL_CALL __acquire_time(const char* __name);
-***************
-*** 288,293 ****
---- 291,299 ----
- };
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_time_facets.c>
-*** misc/STLport-4.0/stlport/stl/_tree.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_tree.c Thu Aug 25 15:55:00 2005
-***************
-*** 42,47 ****
---- 42,50 ----
- # define _Rb_tree __WORKAROUND_DBG_RENAME(Rb_tree)
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- inline void
-***************
-*** 728,733 ****
---- 731,739 ----
- return true;
- }
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef __iterator__
- # undef __const_iterator__
-*** misc/STLport-4.0/stlport/stl/_tree.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_tree.h Thu Aug 25 15:55:00 2005
-***************
-*** 83,88 ****
---- 83,91 ----
- # define _Rb_tree __WORKAROUND_DBG_RENAME(Rb_tree)
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- typedef bool _Rb_tree_Color_type;
-***************
-*** 557,562 ****
---- 560,568 ----
- #endif /* __STL_FUNCTION_TMPL_PARTIAL_ORDER */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_tree.c>
-***************
-*** 568,573 ****
---- 574,582 ----
- # include <stl/debug/_tree.h>
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- // Class rb_tree is not part of the C++ standard. It is provided for
- // compatibility with the HP STL.
-***************
-*** 587,592 ****
---- 596,604 ----
- ~rb_tree() {}
- };
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_INTERNAL_TREE_H */
-
-*** misc/STLport-4.0/stlport/stl/_uninitialized.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_uninitialized.h Thu Aug 25 15:55:00 2005
-***************
-*** 46,51 ****
---- 46,54 ----
- # include <stl/_algobase.h>
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // uninitialized_copy
-***************
-*** 324,329 ****
---- 327,335 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_INTERNAL_UNINITIALIZED_H */
-
-*** misc/STLport-4.0/stlport/stl/_valarray.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_valarray.c Thu Aug 25 15:55:00 2005
-***************
-*** 26,31 ****
---- 26,34 ----
- #ifndef __STL_VALARRAY_C
- #define __STL_VALARRAY_C
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // Behavior is undefined if __x and *this have different sizes
-***************
-*** 177,182 ****
---- 180,188 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_VALARRAY_C */
-
-*** misc/STLport-4.0/stlport/stl/_valarray.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_valarray.h Thu Aug 25 15:55:00 2005
-***************
-*** 42,47 ****
---- 42,50 ----
- #endif
-
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- class slice;
-***************
-*** 1655,1660 ****
---- 1658,1666 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_valarray.c>
-*** misc/STLport-4.0/stlport/stl/_vector.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_vector.c Thu Aug 25 15:55:00 2005
-***************
-*** 44,49 ****
---- 44,52 ----
- # undef vector
- # define vector __WORKAROUND_DBG_RENAME(vector)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _Tp, class _Alloc>
-***************
-*** 266,271 ****
---- 269,277 ----
-
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef __pointer__
- # undef __const_pointer__
-*** misc/STLport-4.0/stlport/stl/_vector.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/_vector.h Thu Aug 25 15:55:00 2005
-***************
-*** 53,58 ****
---- 53,61 ----
- # undef vector
- # define vector __WORKAROUND_DBG_RENAME(vector)
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // The vector base class serves two purposes. First, its constructor
-***************
-*** 562,567 ****
---- 565,573 ----
- # define __vector__ __WORKAROUND_RENAME(vector)
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # if !defined (__STL_LINK_TIME_INSTANTIATION)
- # include <stl/_vector.c>
-*** misc/STLport-4.0/stlport/stl/c_locale.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/c_locale.h Thu Aug 25 15:54:56 2005
-***************
-*** 115,120 ****
---- 115,123 ----
- struct _Locale_messages;
-
- #ifdef __cplusplus
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- extern "C" {
- #endif
-***************
-*** 652,657 ****
---- 655,663 ----
- # ifdef __cplusplus
- }
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif
-
- # endif /* __STL_C_LOCALE_H */
-*** misc/STLport-4.0/stlport/stl/char_traits.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/char_traits.h Thu Aug 25 15:54:56 2005
-***************
-*** 40,45 ****
---- 40,48 ----
- # include <stl/type_traits.h>
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // Class __char_traits_base.
-***************
-*** 178,183 ****
---- 181,189 ----
- # endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # else /* OWN_IOSTREAMS */
-
-*** misc/STLport-4.0/stlport/stl/concept_checks.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/concept_checks.h Thu Aug 25 15:54:56 2005
-***************
-*** 490,498 ****
---- 490,504 ----
-
- /* Associated Type Requirements */
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- template <class _Iterator> struct iterator_traits;
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- template <class _Iter>
- struct __value_type_type_definition_requirement_violation {
-*** misc/STLport-4.0/stlport/stl/type_traits.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/type_traits.h Thu Aug 25 15:55:29 2005
-***************
-*** 56,61 ****
---- 56,64 ----
- */
-
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- struct __true_type {
- };
-
-***************
-*** 88,93 ****
---- 91,99 ----
- typedef __false_type has_trivial_destructor;
- typedef __false_type is_POD_type;
- };
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- // Provide some specializations. This is harmless for compilers that
- // have built-in __types_traits support, and essential for compilers
-*** misc/STLport-4.0/stlport/stl/debug/_debug.c Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/debug/_debug.c Thu Aug 25 15:54:56 2005
-***************
-*** 56,61 ****
---- 56,64 ----
- extern void __stl_debug_terminate(void);
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # ifndef __STL_STRING_LITERAL
-***************
-*** 101,106 ****
---- 104,112 ----
-
- # endif
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- // abort()
- # include <cstdlib>
-***************
-*** 110,115 ****
---- 116,124 ----
- # include <cstdarg>
- # include <cstdio>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- template <class _Dummy>
-***************
-*** 141,149 ****
---- 150,164 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # endif /* __STL_DEBUG_MESSAGE */
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
-
-***************
-*** 191,201 ****
---- 206,222 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # endif /* __STL_ASSERTIONS */
-
- #ifdef __STL_DEBUG
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # ifdef __STL_THREADS
-***************
-*** 447,452 ****
---- 468,476 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __STL_DEBUG */
-
-*** misc/STLport-4.0/stlport/stl/debug/_debug.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/debug/_debug.h Thu Aug 25 15:54:56 2005
-***************
-*** 69,74 ****
---- 69,77 ----
- /* have to hardcode that ;() */
- # define _StlMsg_MAX 27
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // This class is unique (not inherited from exception),
-***************
-*** 136,141 ****
---- 139,147 ----
- typedef __stl_debug_engine<bool> __stl_debugger;
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # ifndef __STL_ASSERT
- # define __STL_ASSERT(expr) \
-***************
-*** 179,184 ****
---- 185,193 ----
- # include <stl/_iterator_base.h>
- #endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- //=============================================================
-***************
-*** 384,389 ****
---- 393,401 ----
- }
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # endif /* __STL_DEBUG */
-
-*** misc/STLport-4.0/stlport/stl/debug/_deque.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/debug/_deque.h Thu Aug 25 15:54:56 2005
-***************
-*** 41,46 ****
---- 41,49 ----
-
- # define __STL_DEQUE_SUPER __WORKAROUND_DBG_RENAME(deque) <_Tp,_Alloc>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # ifdef __STL_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS
-***************
-*** 314,319 ****
---- 317,325 ----
- #endif
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef _DBG_deque
- # undef __STL_DEQUE_SUPER
-*** misc/STLport-4.0/stlport/stl/debug/_hashtable.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/debug/_hashtable.h Thu Aug 25 15:54:56 2005
-***************
-*** 42,47 ****
---- 42,50 ----
- # define __STL_DBG_HT_SUPER \
- __WORKAROUND_DBG_RENAME(hashtable) <_Val, _Key, _HF, _ExK, _EqK, _All>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # ifdef __STL_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS
-***************
-*** 245,250 ****
---- 248,256 ----
- }
- #endif
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # undef hashtable
-
- #endif /* __SGI_STL_INTERNAL_HASHTABLE_H */
-*** misc/STLport-4.0/stlport/stl/debug/_iterator.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/debug/_iterator.h Thu Aug 25 15:54:56 2005
-***************
-*** 31,36 ****
---- 31,39 ----
- # define __STL_DBG_IDENTITY( __base )
- # endif
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- //============================================================
-***************
-*** 409,414 ****
---- 412,420 ----
- };
- # endif
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* INTERNAL_H */
-
-*** misc/STLport-4.0/stlport/stl/debug/_list.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/debug/_list.h Thu Aug 25 15:54:56 2005
-***************
-*** 40,45 ****
---- 40,48 ----
- # define __STL_DBG_LIST_BASE \
- __WORKAROUND_DBG_RENAME(list) <_Tp, _Alloc>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # ifdef __STL_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS
-***************
-*** 267,272 ****
---- 270,278 ----
- #endif /* __STL_USE_SEPARATE_RELOPS_NAMESPACE */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_INTERNAL_LIST_H */
-
-*** misc/STLport-4.0/stlport/stl/debug/_slist.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/debug/_slist.h Thu Aug 25 15:54:56 2005
-***************
-*** 36,41 ****
---- 36,44 ----
-
- # define __STL_DBG_SLIST_BASE __WORKAROUND_DBG_RENAME(slist) <_Tp, _Alloc>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # ifdef __STL_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS
-***************
-*** 423,428 ****
---- 426,434 ----
- #endif /* __STL_FUNCTION_TMPL_PARTIAL_ORDER */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_INTERNAL_DBG_SLIST_H */
-
-*** misc/STLport-4.0/stlport/stl/debug/_string.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/debug/_string.h Thu Aug 25 15:54:56 2005
-***************
-*** 23,28 ****
---- 23,31 ----
-
- # define __STL_DBG_STRING_BASE _Nondebug_string <_CharT, _Traits, _Alloc>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # ifdef __STL_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS
-***************
-*** 727,732 ****
---- 730,738 ----
-
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- #endif /* __SGI_STL_DBG_STRING */
-
-*** misc/STLport-4.0/stlport/stl/debug/_tree.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/debug/_tree.h Thu Aug 25 15:54:56 2005
-***************
-*** 39,44 ****
---- 39,47 ----
-
- # define __STL_DBG_TREE_SUPER __WORKAROUND_DBG_RENAME(Rb_tree) <_Key, _Value, _KeyOfValue, _Compare, _Alloc>
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # ifdef __STL_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS
-***************
-*** 288,293 ****
---- 291,299 ----
- #endif /* __STL_FUNCTION_TMPL_PARTIAL_ORDER */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef __STL_DBG_TREE_SUPER
-
-*** misc/STLport-4.0/stlport/stl/debug/_vector.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/debug/_vector.h Thu Aug 25 15:54:56 2005
-***************
-*** 40,45 ****
---- 40,48 ----
- # define __STL_DBG_VECTOR_BASE __WORKAROUND_DBG_RENAME(vector) <_Tp, _Alloc>
-
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- # ifdef __STL_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS
-***************
-*** 335,340 ****
---- 338,346 ----
- # endif /* __STL_USE_TEMPLATE_EXPORT */
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- # undef __STL_DBG_VECTOR_BASE
- # undef _DBG_vector
-*** misc/STLport-4.0/stlport/stl/wrappers/_deque.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/stl/wrappers/_deque.h Thu Aug 25 15:54:57 2005
-***************
-*** 35,40 ****
---- 35,43 ----
-
- # define _DEQUE_SUPER _DEQUE_SUPER_NAME<_Tp, __STL_DEFAULT_ALLOCATOR(_Tp) >
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- // provide a "default" deque adaptor
-***************
-*** 70,75 ****
---- 73,81 ----
- # undef _DEQUE_SUPER
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- // Local Variables:
- // mode:C++
-*** misc/STLport-4.0/stlport/wrap_std/complex Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/wrap_std/complex Thu Aug 25 15:55:01 2005
-***************
-*** 16,21 ****
---- 16,24 ----
- # include __STL_NATIVE_HEADER(complex)
-
- # if defined (__STL_USE_OWN_NAMESPACE)
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
-
- using __STL_COMPLEX_NAMESPACE::complex;
-***************
-*** 42,47 ****
---- 45,53 ----
- using __STL_COMPLEX_NAMESPACE::tanh;
-
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* USE_OWN_NAMESPACE */
-
- // Local Variables:
-*** misc/STLport-4.0/stlport/wrap_std/fstream Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/wrap_std/fstream Thu Aug 25 15:55:01 2005
-***************
-*** 16,24 ****
---- 16,30 ----
- # if defined (__STL_USE_NEW_IOSTREAMS)
- # include __STL_NATIVE_HEADER(fstream)
- # if defined (__STL_USE_OWN_NAMESPACE)
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/fstream>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_OWN_NAMESPACE */
- # else
- # include <wrap_std/h/fstream.h>
-*** misc/STLport-4.0/stlport/wrap_std/iomanip Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/wrap_std/iomanip Thu Aug 25 15:55:01 2005
-***************
-*** 18,26 ****
---- 18,32 ----
- # include __STL_NATIVE_HEADER(iomanip)
-
- # ifdef __STL_USE_OWN_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/iomanip>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_OWN_NAMESPACE */
-
- # else
-***************
-*** 28,36 ****
---- 34,48 ----
- # include __STL_NATIVE_HEADER(iomanip.h)
-
- # if defined (__STL_USE_NAMESPACES) && ! defined (__STL_BROKEN_USING_DIRECTIVE)
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/h/iomanip.h>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_USE_OWN_NAMESPACE */
-
- # endif /* __STL_USE_NEW_IOSTREAMS */
-*** misc/STLport-4.0/stlport/wrap_std/ios Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/wrap_std/ios Thu Aug 25 15:55:01 2005
-***************
-*** 16,24 ****
---- 16,30 ----
- # if defined (__STL_USE_NEW_IOSTREAMS)
- # include __STL_NATIVE_HEADER(ios)
- # ifdef __STL_USE_OWN_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/ios>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- #endif /* __STL_OWN_NAMESPACE */
- # else
- # include <wrap_std/h/iostream.h>
-*** misc/STLport-4.0/stlport/wrap_std/iosfwd Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/wrap_std/iosfwd Thu Aug 25 15:55:01 2005
-***************
-*** 56,64 ****
---- 56,70 ----
-
- # else
-
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- template <class _Tp> class allocator;
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
-
- // use old-style iostreams
- # include <iostream.h>
-***************
-*** 77,85 ****
---- 83,97 ----
- # endif
-
- # if defined (__STL_USE_OWN_NAMESPACE)
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/iosfwd>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif
-
- // Local Variables:
-*** misc/STLport-4.0/stlport/wrap_std/iostream Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/wrap_std/iostream Thu Aug 25 15:55:01 2005
-***************
-*** 22,30 ****
---- 22,36 ----
- # if defined (__STL_USE_NEW_IOSTREAMS)
- # include __STL_NATIVE_HEADER(iostream)
- # if defined (__STL_USE_OWN_NAMESPACE)
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/iostream>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif
- # else
- # include <wrap_std/h/iostream.h>
-*** misc/STLport-4.0/stlport/wrap_std/istream Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/wrap_std/istream Thu Aug 25 15:55:01 2005
-***************
-*** 24,32 ****
---- 24,38 ----
- # include __STL_NATIVE_HEADER(istream)
-
- # if defined (__STL_USE_OWN_NAMESPACE)
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/istream>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_OWN_NAMESPACE */
-
- # else
-***************
-*** 33,42 ****
---- 39,54 ----
-
- # include __STL_NATIVE_OLD_STREAMS_HEADER(iostream.h)
- # if defined (__STL_USE_NAMESPACES)
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- using ::istream;
- // using ::ws;
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* NAMESPACES */
-
- # endif /* if defined (__STL_USE_NEW_IOSTREAMS) */
-*** misc/STLport-4.0/stlport/wrap_std/locale Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/wrap_std/locale Thu Aug 25 15:55:01 2005
-***************
-*** 20,28 ****
---- 20,34 ----
- # include __STL_NATIVE_HEADER(locale)
-
- # ifdef __STL_USE_OWN_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/locale>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- #endif /* __STL_OWN_NAMESPACE */
-
- // Local Variables:
-*** misc/STLport-4.0/stlport/wrap_std/ostream Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/wrap_std/ostream Thu Aug 25 15:55:01 2005
-***************
-*** 24,32 ****
---- 24,38 ----
- # include __STL_NATIVE_HEADER(ostream)
-
- # if defined (__STL_USE_OWN_NAMESPACE)
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/ostream>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_OWN_NAMESPACE */
-
- # else
-***************
-*** 34,42 ****
---- 40,54 ----
- # include __STL_NATIVE_OLD_STREAMS_HEADER(iostream.h)
-
- # if defined (__STL_USE_NAMESPACES) && ! defined (__STL_BROKEN_USING_DIRECTIVE)
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/h/ostream.h>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_NAMESPACE */
- # endif /* if defined (__STL_USE_NEW_IOSTREAMS) */
- // Local Variables:
-*** misc/STLport-4.0/stlport/wrap_std/sstream Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/wrap_std/sstream Thu Aug 25 15:55:01 2005
-***************
-*** 15,23 ****
---- 15,29 ----
-
- # include __STL_NATIVE_HEADER(sstream)
- # ifdef __STL_USE_OWN_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/sstream>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- #endif /* __STL_OWN_NAMESPACE */
-
- // Local Variables:
-*** misc/STLport-4.0/stlport/wrap_std/streambuf Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/wrap_std/streambuf Thu Aug 25 15:55:01 2005
-***************
-*** 20,28 ****
---- 20,34 ----
- # endif
-
- # if defined (__STL_USE_OWN_NAMESPACE) && defined (__STL_USE_NEW_IOSTREAMS)
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/streambuf>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_OWN_NAMESPACE */
-
- // Local Variables:
-*** misc/STLport-4.0/stlport/wrap_std/strstream Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/wrap_std/strstream Thu Aug 25 15:55:01 2005
-***************
-*** 16,24 ****
---- 16,30 ----
- # include __STL_NATIVE_HEADER(strstream)
-
- # ifdef __STL_USE_OWN_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/strstream>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- #endif /* __STL_OWN_NAMESPACE */
-
-
-*** misc/STLport-4.0/stlport/wrap_std/h/fstream.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/wrap_std/h/fstream.h Thu Aug 25 15:55:01 2005
-***************
-*** 1,7 ****
---- 1,13 ----
- # include __STL_NATIVE_OLD_STREAMS_HEADER(fstream.h)
- # if defined (__STL_USE_NAMESPACES) && ! defined (__STL_BROKEN_USING_DIRECTIVE)
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/h/fstream.h>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_OWN_NAMESPACE */
-
-*** misc/STLport-4.0/stlport/wrap_std/h/iostream.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/wrap_std/h/iostream.h Thu Aug 25 15:55:01 2005
-***************
-*** 1,7 ****
---- 1,13 ----
- # include __STL_NATIVE_OLD_STREAMS_HEADER(iostream.h)
-
- # if defined (__STL_USE_OWN_NAMESPACE)
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/h/iostream.h>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- # endif /* __STL_USE_OWN_NAMESPACE */
-*** misc/STLport-4.0/stlport/wrap_std/h/strstream.h Fri Jul 14 03:53:26 2000
---- misc/build/STLport-4.0/stlport/wrap_std/h/strstream.h Thu Aug 25 15:55:01 2005
-***************
-*** 20,28 ****
---- 20,34 ----
- # endif
-
- # ifdef __STL_USE_OWN_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma disable_warn
-+ #endif
- __STL_BEGIN_NAMESPACE
- # include <using/h/strstream.h>
- __STL_END_NAMESPACE
-+ #if defined __SUNPRO_CC
-+ #pragma enable_warn
-+ #endif
- #endif /* __STL_OWN_NAMESPACE */
-
-
diff --git a/stlport/STLport-4.5-0119.patch b/stlport/STLport-4.5-0119.patch
deleted file mode 100644
index db2c62b22ad3..000000000000
--- a/stlport/STLport-4.5-0119.patch
+++ /dev/null
@@ -1,1328 +0,0 @@
---- misc/STLport-4.5-0119/src/vc7.mak Sun Jul 29 22:02:16 2001
-+++ misc/build/STLport-4.5-0119/src/vc7.mak Mon Jun 2 10:32:02 2008
-@@ -1,5 +1,5 @@
- #
--# STLport makefile for VC++ 7 (.NET)
-+# STLport makefile for VC++ 7/8/9 (.NET)
- #
-
- CXX=cl.exe
-@@ -6,15 +6,16 @@
- CC=cl.exe
- RC=rc
-
--LIB_BASENAME=stlport_vc7
-+LIB_BASENAME=stlport_vc71
-+
- COMP=VC7
-
- # EXTRA_COMMON_FLAGS=/D "_MBCS"
--EXTRA_COMMON_FLAGS=/FI "vc_warning_disable.h" /D "_MBCS"
-+EXTRA_COMMON_FLAGS=/TP /FI "vc_warning_disable.h" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE"
- EXTRA_DEBUG_FLAGS=
- EXTRA_NDEBUG_FLAGS=
-
--all: platform all_static all_dynamic
-+all: platform all_static all_dynamic
-
- !INCLUDE vc_common.mak
-
---- misc/STLport-4.5-0119/src/vc_common.mak Wed Apr 10 05:55:31 2002
-+++ misc/build/STLport-4.5-0119/src/vc_common.mak Mon Jun 2 10:32:02 2008
-@@ -27,7 +27,7 @@
- DYNEXT=dll
- STEXT=lib
-
--PATH_SEP=\\
-+PATH_SEP=\
-
- MKDIR=-mkdir
- LINK_OUT=/out:
-@@ -51,7 +51,7 @@
- #
-
- # FLAGS_COMMON =/nologo /c /W3 /GR /GX /D "WIN32" /D "_WINDOWS" /I "$(STLPORT_DIR)" $(EXTRA_COMMON_FLAGS)
--FLAGS_COMMON =/nologo /c /Zi /W3 /GR /GX /D "WIN32" /D "_WINDOWS" /I "$(STLPORT_DIR)" $(EXTRA_COMMON_FLAGS)
-+FLAGS_COMMON =/nologo /c /Zi /W3 /GR $(EXFLAGS) /D "WIN32" /D "_WINDOWS" /I "$(STLPORT_DIR)" $(EXTRA_COMMON_FLAGS)
- FLAGS_COMMON_static = $(FLAGS_COMMON) /FD /D "_STLP_NO_FORCE_INSTANTIATE"
- FLAGS_COMMON_dynamic = $(FLAGS_COMMON)
-
---- misc/STLport-4.5-0119/stlport/config/_epilog.h Thu Sep 6 00:11:36 2001
-+++ misc/build/STLport-4.5-0119/stlport/config/_epilog.h Mon Jun 2 10:32:02 2008
-@@ -4,6 +4,7 @@
- # pragma option pop
- # pragma option -w-8062
- # else
-+# pragma pack(push,8)
- # if !(defined (_STLP_MSVC) && (_STLP_MSVC < 1200))
- # pragma warning (pop)
- # endif
---- misc/STLport-4.5-0119/stlport/config/_prolog.h Sun Oct 28 21:26:44 2001
-+++ misc/build/STLport-4.5-0119/stlport/config/_prolog.h Mon Jun 2 10:32:02 2008
-@@ -7,10 +7,17 @@
- # endif
- # else
- # if !(defined (_STLP_MSVC) && (_STLP_MSVC < 1200))
--# pragma warning(push)
-+ // Disable "warning C4702: unreachable code" and "warning C4710: function not
-+ // inlined" globally, as they are only issued at the end of the compilation
-+ // unit. Then locally disable as many warnings as possible, plus "warning
-+ // C4555: expression has no effect; expected expression with side-effect":
-+# pragma warning(disable:4702 4710)
-+# pragma warning(push,1)
-+# pragma warning(disable:4555)
- # endif
- # pragma pack(push,8)
- # include <config/_msvc_warnings_off.h>
-+# pragma pack(pop)
- # endif
-
-
---- misc/STLport-4.5-0119/stlport/config/stl_msvc.h Sat Dec 28 07:12:58 2002
-+++ misc/build/STLport-4.5-0119/stlport/config/stl_msvc.h Mon Jun 2 10:34:54 2008
-@@ -66,10 +66,15 @@
- # define _STLP_DEFAULTCHAR __stl_char
- # endif /* (_STLP_MSVC < 1100 ) */
-
--# define _STLP_NO_TYPENAME_ON_RETURN_TYPE 1
-+# if (_STLP_MSVC <= 1300)
-+# define _STLP_NO_TYPENAME_ON_RETURN_TYPE 1
-+# endif
-+# if (_STLP_MSVC > 1300)
-+# define _STLP_NO_METHOD_SPECIALIZATION 1
-+# endif
- // using ::func_name results in ambiguity
-
--# if (_STLP_MSVC <= 1300)
-+# if (_STLP_MSVC <= 1310)
-
- // boris : not defining this macro for SP5 causes other problems
- // # if !defined (_MSC_FULL_VER) || (_MSC_FULL_VER < 12008804 )
-@@ -94,7 +99,7 @@
- # endif /* _STLP_MSVC */
-
-
--# if (_MSC_VER <= 1300)
-+# if (_MSC_VER <= 1500)
-
- # define _STLP_VENDOR_GLOBAL_CSTD
- // They included the necessary coding,
-@@ -129,7 +134,7 @@
- # if defined (_STLP_MSVC) && ( _STLP_MSVC < 1200 ) /* VC++ 6.0 */
- // # define _STLP_NO_MEMBER_TEMPLATES 1
- // # define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
--# define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
-+# define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
- # define _STLP_THROW_RETURN_BUG 1
- # endif
-
-@@ -178,8 +183,8 @@
- # ifdef __ICL
- # define _STLP_LIB_BASENAME "stlport_icl"
- # else
--# if (_MSC_VER >= 1300)
--# define _STLP_LIB_BASENAME "stlport_vc7"
-+# if (_MSC_VER > 1300)
-+# define _STLP_LIB_BASENAME "stlport_vc71"
- # elif (_MSC_VER >= 1200)
- //# ifdef _UNICODE
- //# define _STLP_LIB_BASENAME "stlport_vc6_unicode"
---- misc/STLport-4.5-0119/stlport/cstdio Sun Dec 2 23:17:40 2001
-+++ misc/build/STLport-4.5-0119/stlport/cstdio Mon Jun 2 10:32:02 2008
-@@ -42,7 +42,7 @@
- # define stderr (&_STLP_VENDOR_CSTD::__files[2])
- # endif
-
--# if defined (_STLP_MSVC) || defined (__ICL)
-+# if defined (_STLP_MSVC) && (_MSC_VER <= 1310) || defined (__ICL)
- inline
- int vsnprintf(char *s1, size_t n, const char *s2, va_list v)
- {
-@@ -110,7 +110,7 @@
- using _STLP_VENDOR_CSTD::vfprintf;
- using _STLP_VENDOR_CSTD::vprintf;
- using _STLP_VENDOR_CSTD::vsprintf;
--# if (defined (__MWERKS__) || defined (_STLP_MSVC) || defined (__ICL) || \
-+# if (defined (__MWERKS__) || (defined (_STLP_MSVC) && (_MSC_VER <= 1310)) || defined (__ICL) || \
- ( defined (__BORLANDC__) && __BORLANDC__ > 0x530))
- using _STLP_VENDOR_CSTD::vsnprintf;
- # endif
---- misc/STLport-4.5-0119/stlport/list Wed Apr 10 05:55:34 2002
-+++ misc/build/STLport-4.5-0119/stlport/list Mon Jun 2 10:32:02 2008
-@@ -37,7 +37,14 @@
-
- #ifndef _STLP_INTERNAL_LIST_H
- # include <stl/_list.h>
-+#if ( _MSC_VER > 1200 )
-+_STLP_BEGIN_NAMESPACE
-+# if defined (_STLP_USE_TEMPLATE_EXPORT)
-+_STLP_EXPORT_TEMPLATE_CLASS allocator<void*>;
-+# endif
-+_STLP_END_NAMESPACE
- #endif
-+#endif
-
- #if defined (_STLP_WHOLE_VENDOR_STD)
- # include _STLP_NATIVE_HEADER(list)
---- misc/STLport-4.5-0119/stlport/stl/_cmath.h Mon Oct 28 17:18:49 2002
-+++ misc/build/STLport-4.5-0119/stlport/stl/_cmath.h Mon Jun 2 10:32:02 2008
-@@ -50,7 +50,7 @@
- static inline _Tp _do_tan(const _Tp& __x) { return _STLP_VENDOR_CSTD::tan(__x); }
- static inline _Tp _do_tanh(const _Tp& __x) { return _STLP_VENDOR_CSTD::tanh(__x); }
- static inline _Tp _do_exp(const _Tp& __x) { return _STLP_VENDOR_CSTD::exp(__x); }
-- static inline _Tp _do_hypot(const _Tp& __x, const _Tp& __y) { return _STLP_VENDOR_CSTD::hypot(__x, __y); }
-+ static inline _Tp _do_hypot(const _Tp& __x, const _Tp& __y) { return hypot(__x, __y); }
- };
-
- # define _STLP_DO_ABS(_Tp) _STL_math_proxy<_Tp>::_do_abs
---- misc/STLport-4.5-0119/stlport/stl/_deque.c Thu Sep 12 22:46:59 2002
-+++ misc/build/STLport-4.5-0119/stlport/stl/_deque.c Mon Jun 2 10:32:02 2008
-@@ -26,6 +26,10 @@
- #ifndef _STLP_DEQUE_C
- # define _STLP_DEQUE_C
-
-+#if defined(_MSC_VER) && (_MSC_VER > 1310)
-+#pragma warning(disable:4701)
-+#endif
-+
- # ifndef _STLP_INTERNAL_DEQUE_H
- # include <stl/_deque.h>
- # endif
---- misc/STLport-4.5-0119/stlport/stl/_hashtable.h Thu Sep 12 22:46:59 2002
-+++ misc/build/STLport-4.5-0119/stlport/stl/_hashtable.h Mon Jun 2 10:32:02 2008
-@@ -9,13 +9,13 @@
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
-- * Copyright (c) 1999
-+ * Copyright (c) 1999
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
-- * Permission to use or copy this software for any purpose is hereby granted
-+ * Permission to use or copy this software for any purpose is hereby granted
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
-@@ -66,7 +66,7 @@
- _Self* _M_next;
- _Val _M_val;
- __TRIVIAL_STUFF(_Hashtable_node)
--};
-+};
-
- // some compilers require the names of template parameters to be the same
- template <class _Val, class _Key, class _HF,
-@@ -84,7 +84,7 @@
- _Node* _M_cur;
- _Hashtable* _M_ht;
-
-- _Hashtable_iterator(_Node* __n, _Hashtable* __tab)
-+ _Hashtable_iterator(_Node* __n, _Hashtable* __tab)
- : _M_cur(__n), _M_ht(__tab) {}
- _Hashtable_iterator() {}
-
-@@ -96,7 +96,7 @@
- class _ExK, class _EqK, class _All>
- struct _Ht_iterator : public _Hashtable_iterator< _Val, _Key,_HF, _ExK,_EqK,_All>
- {
--
-+
- typedef _Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All> _Base;
-
- // typedef _Ht_iterator<_Val, _Nonconst_traits<_Val>,_Key,_HF,_ExK,_EqK,_All> iterator;
-@@ -116,11 +116,11 @@
- _Ht_iterator(const _Node* __n, const _Hashtable* __tab) :
- _Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>((_Node*)__n, (_Hashtable*)__tab) {}
- _Ht_iterator() {}
-- _Ht_iterator(const _Ht_iterator<_Val, _Nonconst_traits<_Val>,_Key,_HF,_ExK,_EqK,_All>& __it) :
-+ _Ht_iterator(const _Ht_iterator<_Val, _Nonconst_traits<_Val>,_Key,_HF,_ExK,_EqK,_All>& __it) :
- _Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>(__it) {}
-
-- reference operator*() const {
-- return this->_M_cur->_M_val;
-+ reference operator*() const {
-+ return this->_M_cur->_M_val;
- }
- _STLP_DEFINE_ARROW_OPERATOR
-
-@@ -138,19 +138,19 @@
-
- template <class _Val, class _Traits, class _Traits1, class _Key, class _HF,
- class _ExK, class _EqK, class _All>
--inline bool
--operator==(const _Ht_iterator<_Val, _Traits,_Key,_HF,_ExK,_EqK,_All>& __x,
-- const _Ht_iterator<_Val, _Traits1,_Key,_HF,_ExK,_EqK,_All>& __y) {
-- return __x._M_cur == __y._M_cur;
-+inline bool
-+operator==(const _Ht_iterator<_Val, _Traits,_Key,_HF,_ExK,_EqK,_All>& __x,
-+ const _Ht_iterator<_Val, _Traits1,_Key,_HF,_ExK,_EqK,_All>& __y) {
-+ return __x._M_cur == __y._M_cur;
- }
-
- #ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
- template <class _Val, class _Key, class _HF,
- class _ExK, class _EqK, class _All>
--inline bool
--operator!=(const _Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>& __x,
-- const _Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>& __y) {
-- return __x._M_cur != __y._M_cur;
-+inline bool
-+operator!=(const _Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>& __x,
-+ const _Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>& __y) {
-+ return __x._M_cur != __y._M_cur;
- }
- #else
-
-@@ -166,10 +166,10 @@
-
- template <class _Val, class _Key, class _HF,
- class _ExK, class _EqK, class _All>
--inline bool
--operator!=(const _Ht_iterator<_Val, _Nonconst_traits<_Val>,_Key,_HF,_ExK,_EqK,_All>& __x,
-- const _Ht_iterator<_Val, _Const_traits<_Val>,_Key,_HF,_ExK,_EqK,_All>& __y) {
-- return __x._M_cur != __y._M_cur;
-+inline bool
-+operator!=(const _Ht_iterator<_Val, _Nonconst_traits<_Val>,_Key,_HF,_ExK,_EqK,_All>& __x,
-+ const _Ht_iterator<_Val, _Const_traits<_Val>,_Key,_HF,_ExK,_EqK,_All>& __y) {
-+ return __x._M_cur != __y._M_cur;
- }
- #endif
-
-@@ -189,8 +189,10 @@
- static const size_t _M_list[__stl_num_primes];
- };
-
--# if defined (_STLP_USE_TEMPLATE_EXPORT)
-+# if defined (_STLP_USE_TEMPLATE_EXPORT)
-+#if ( _MSC_VER < 1300 )
- _STLP_EXPORT_TEMPLATE_CLASS _Stl_prime<bool>;
-+#endif
- # endif
-
- typedef _Stl_prime<bool> _Stl_prime_type;
-@@ -200,8 +202,8 @@
- // do. If we're using standard-conforming allocators, then a hashtable
- // unconditionally has a member variable to hold its allocator, even if
- // it so happens that all instances of the allocator type are identical.
--// This is because, for hashtables, this extra storage is negligible.
--// Additionally, a base class wouldn't serve any other purposes; it
-+// This is because, for hashtables, this extra storage is negligible.
-+// Additionally, a base class wouldn't serve any other purposes; it
- // wouldn't, for example, simplify the exception-handling code.
- template <class _Val, class _Key, class _HF,
- class _ExK, class _EqK, class _All>
---- misc/STLport-4.5-0119/stlport/stl/_istream.h Sun Apr 7 04:35:42 2002
-+++ misc/build/STLport-4.5-0119/stlport/stl/_istream.h Mon Jun 2 10:32:02 2008
-@@ -257,44 +257,44 @@
-
- template <class _CharT, class _Traits>
- inline basic_istream<_CharT, _Traits>& _STLP_CALL
--operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) {
-- __in._M_formatted_get(__c);
-- return __in;
-+operator>>(basic_istream<_CharT, _Traits>& ___in, _CharT& __c) {
-+ ___in._M_formatted_get(__c);
-+ return ___in;
- }
-
- template <class _Traits>
- inline basic_istream<char, _Traits>& _STLP_CALL
--operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) {
-- __in._M_formatted_get(__REINTERPRET_CAST(char&,__c));
-- return __in;
-+operator>>(basic_istream<char, _Traits>& ___in, unsigned char& __c) {
-+ ___in._M_formatted_get(__REINTERPRET_CAST(char&,__c));
-+ return ___in;
- }
-
- template <class _Traits>
- inline basic_istream<char, _Traits>& _STLP_CALL
--operator>>(basic_istream<char, _Traits>& __in, signed char& __c) {
-- __in._M_formatted_get(__REINTERPRET_CAST(char&,__c));
-- return __in;
-+operator>>(basic_istream<char, _Traits>& ___in, signed char& __c) {
-+ ___in._M_formatted_get(__REINTERPRET_CAST(char&,__c));
-+ return ___in;
- }
-
- template <class _CharT, class _Traits>
- inline basic_istream<_CharT, _Traits>& _STLP_CALL
--operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) {
-- __in._M_formatted_get(__s);
-- return __in;
-+operator>>(basic_istream<_CharT, _Traits>& ___in, _CharT* __s) {
-+ ___in._M_formatted_get(__s);
-+ return ___in;
- }
-
- template <class _Traits>
- inline basic_istream<char, _Traits>& _STLP_CALL
--operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) {
-- __in._M_formatted_get(__REINTERPRET_CAST(char*,__s));
-- return __in;
-+operator>>(basic_istream<char, _Traits>& ___in, unsigned char* __s) {
-+ ___in._M_formatted_get(__REINTERPRET_CAST(char*,__s));
-+ return ___in;
- }
-
- template <class _Traits>
- inline basic_istream<char, _Traits>& _STLP_CALL
--operator>>(basic_istream<char, _Traits>& __in, signed char* __s) {
-- __in._M_formatted_get(__REINTERPRET_CAST(char*,__s));
-- return __in;
-+operator>>(basic_istream<char, _Traits>& ___in, signed char* __s) {
-+ ___in._M_formatted_get(__REINTERPRET_CAST(char*,__s));
-+ return ___in;
- }
-
- //----------------------------------------------------------------------
---- misc/STLport-4.5-0119/stlport/stl/_monetary.c Thu Sep 12 22:47:00 2002
-+++ misc/build/STLport-4.5-0119/stlport/stl/_monetary.c Mon Jun 2 10:32:02 2008
-@@ -86,7 +86,7 @@
-
- template <class _InIt, class _OuIt, class _CharT>
- bool
--__get_monetary_value(_InIt& __first, _InIt __last, _OuIt __out,
-+__get_monetary_value(_InIt& __first, _InIt __last, _OuIt ___out,
- const ctype<_CharT>& _c_type,
- _CharT __point,
- int __frac_digits,
-@@ -104,7 +104,7 @@
- while (__first != __last) {
- if (_c_type.is(ctype_base::digit, *__first)) {
- ++__current_group_size;
-- *__out++ = *__first++;
-+ *___out++ = *__first++;
- }
- else if (__group_sizes_end) {
- if (*__first == __sep) {
-@@ -129,7 +129,7 @@
-
- if (__first == __last || *__first != __point) {
- for (int __digits = 0; __digits != __frac_digits; ++__digits)
-- *__out++ = _CharT('0');
-+ *___out++ = _CharT('0');
- return true; // OK not to have decimal point
- }
- }
-@@ -139,7 +139,7 @@
- size_t __digits = 0;
-
- while (__first != __last && _c_type.is(ctype_base::digit, *__first)) {
-- *__out++ = *__first++;
-+ *___out++ = *__first++;
- ++__digits;
- }
-
-@@ -202,7 +202,7 @@
- bool __is_positive = true;
- bool __symbol_required = (__str.flags() & ios_base::showbase) !=0;
- string_type __buf;
-- back_insert_iterator<string_type> __out(__buf);
-+ back_insert_iterator<string_type> ___out(__buf);
- // pair<iter_type, bool> __result;
-
- for (__i = 0; __i < 4; ++__i) {
-@@ -293,7 +293,7 @@
- _CharT __sep = __grouping.size() == 0 ? _CharT() :
- __intl ? __punct_intl.thousands_sep() : __punct.thousands_sep();
-
-- __result = __get_monetary_value(__s, __end, __out, __c_type,
-+ __result = __get_monetary_value(__s, __end, ___out, __c_type,
- __point, __frac_digits,
- __sep,
- __grouping, __syntax_ok);
---- misc/STLport-4.5-0119/stlport/stl/_num_get.c Thu Sep 12 22:47:00 2002
-+++ misc/build/STLport-4.5-0119/stlport/stl/_num_get.c Mon Jun 2 10:32:02 2008
-@@ -60,7 +60,7 @@
-
- template <class _InputIter, class _CharT>
- int
--_M_get_base_or_zero(_InputIter& __in, _InputIter& __end, ios_base& __str, _CharT*)
-+_M_get_base_or_zero(_InputIter& ___in, _InputIter& __end, ios_base& __str, _CharT*)
- {
- _CharT __atoms[5];
- const ctype<_CharT>& __c_type = *(const ctype<_CharT>*)__str._M_ctype_facet();
-@@ -68,14 +68,14 @@
- __c_type.widen(__narrow_atoms, __narrow_atoms + 5, __atoms);
-
- bool __negative = false;
-- _CharT __c = *__in;
-+ _CharT __c = *___in;
-
- if (__c == __atoms[1] /* __xminus_char */ ) {
- __negative = true;
-- ++__in;
-+ ++___in;
- }
- else if (__c == __atoms[0] /* __xplus_char */ )
-- ++__in;
-+ ++___in;
-
-
- int __base;
-@@ -92,21 +92,21 @@
- break;
- case ios_base::hex:
- __base = 16;
-- if (__in != __end && *__in == __atoms[2] /* __zero_char */ ) {
-- ++__in;
-- if (__in != __end &&
-- (*__in == __atoms[3] /* __x_char */ || *__in == __atoms[4] /* __X_char */ ))
-- ++__in;
-+ if (___in != __end && *___in == __atoms[2] /* __zero_char */ ) {
-+ ++___in;
-+ if (___in != __end &&
-+ (*___in == __atoms[3] /* __x_char */ || *___in == __atoms[4] /* __X_char */ ))
-+ ++___in;
- else
- __valid_zero = 1; // That zero is valid by itself.
- }
- break;
- default:
-- if (__in != __end && *__in == __atoms[2] /* __zero_char */ ) {
-- ++__in;
-- if (__in != __end &&
-- (*__in == __atoms[3] /* __x_char */ || *__in == __atoms[4] /* __X_char */ )) {
-- ++__in;
-+ if (___in != __end && *___in == __atoms[2] /* __zero_char */ ) {
-+ ++___in;
-+ if (___in != __end &&
-+ (*___in == __atoms[3] /* __x_char */ || *___in == __atoms[4] /* __X_char */ )) {
-+ ++___in;
- __base = 16;
- }
- else
-@@ -252,7 +252,7 @@
-
- template <class _InputIter, class _Integer, class _CharT>
- _InputIter _STLP_CALL
--_M_do_get_integer(_InputIter& __in, _InputIter& __end, ios_base& __str,
-+_M_do_get_integer(_InputIter& ___in, _InputIter& __end, ios_base& __str,
- ios_base::iostate& __err, _Integer& __val, _CharT* __pc)
- {
-
-@@ -265,12 +265,12 @@
- const numpunct<_CharT>& __numpunct = *(const numpunct<_CharT>*)__str._M_numpunct_facet();
- const string& __grouping = __str._M_grouping(); // cached copy
-
-- const int __base_or_zero = _M_get_base_or_zero(__in, __end, __str, __pc);
-+ const int __base_or_zero = _M_get_base_or_zero(___in, __end, __str, __pc);
- int __got = __base_or_zero & 1;
-
- bool __result;
-
-- if (__in == __end) { // We may have already read a 0. If so,
-+ if (___in == __end) { // We may have already read a 0. If so,
-
- if (__got > 0) { // the result is 0 even if we're at eof.
- __val = 0;
-@@ -285,19 +285,19 @@
-
- #if defined(__HP_aCC) && (__HP_aCC == 1)
- if (_IsSigned)
-- __result = __get_integer(__in, __end, __base, __val, __got, __negative, __numpunct.thousands_sep(), __grouping, __true_type() );
-+ __result = __get_integer(___in, __end, __base, __val, __got, __negative, __numpunct.thousands_sep(), __grouping, __true_type() );
- else
-- __result = __get_integer(__in, __end, __base, __val, __got, __negative, __numpunct.thousands_sep(), __grouping, __false_type() );
-+ __result = __get_integer(___in, __end, __base, __val, __got, __negative, __numpunct.thousands_sep(), __grouping, __false_type() );
- #else
-- __result = __get_integer(__in, __end, __base, __val, __got, __negative, __numpunct.thousands_sep(), __grouping, _IsSigned());
-+ __result = __get_integer(___in, __end, __base, __val, __got, __negative, __numpunct.thousands_sep(), __grouping, _IsSigned());
- # endif
- }
-
- __err = __STATIC_CAST(ios_base::iostate, __result ? ios_base::goodbit : ios_base::failbit);
-
-- if (__in == __end)
-+ if (___in == __end)
- __err |= ios_base::eofbit;
-- return __in;
-+ return ___in;
- }
-
- // _M_read_float and its helper functions.
-@@ -376,7 +376,7 @@
-
- template <class _InputIter, class _CharT>
- bool _STLP_CALL
--_M_read_float(string& __buf, _InputIter& __in, _InputIter& __end, ios_base& __s, _CharT*)
-+_M_read_float(string& __buf, _InputIter& ___in, _InputIter& __end, ios_base& __s, _CharT*)
- {
- // Create a string, copying characters of the form
- // [+-]? [0-9]* .? [0-9]* ([eE] [+-]? [0-9]+)?
-@@ -404,20 +404,20 @@
- _Initialize_get_float(__ct, __xplus, __xminus, __pow_e, __pow_E, __digits);
-
- // Get an optional sign
-- __in = __copy_sign(__in, __end, __buf, __xplus, __xminus);
-+ ___in = __copy_sign(___in, __end, __buf, __xplus, __xminus);
-
- // Get an optional string of digits.
- if (__grouping.size() != 0)
-- __digits_before_dot = __copy_grouped_digits(__in, __end, __buf, __digits,
-+ __digits_before_dot = __copy_grouped_digits(___in, __end, __buf, __digits,
- __sep, __grouping, __grouping_ok);
- else
-- __digits_before_dot = __copy_digits(__in, __end, __buf, __digits);
-+ __digits_before_dot = __copy_digits(___in, __end, __buf, __digits);
-
- // Get an optional decimal point, and an optional string of digits.
-- if (__in != __end && *__in == __dot) {
-+ if (___in != __end && *___in == __dot) {
- __buf.push_back('.');
-- ++__in;
-- __digits_after_dot = __copy_digits(__in, __end, __buf, __digits);
-+ ++___in;
-+ __digits_after_dot = __copy_digits(___in, __end, __buf, __digits);
- }
-
- // There have to be some digits, somewhere.
-@@ -424,11 +424,11 @@
- __ok = __digits_before_dot || __digits_after_dot;
-
- // Get an optional exponent.
-- if (__ok && __in != __end && (*__in == __pow_e || *__in == __pow_E)) {
-+ if (__ok && ___in != __end && (*___in == __pow_e || *___in == __pow_E)) {
- __buf.push_back('e');
-- ++__in;
-- __in = __copy_sign(__in, __end, __buf, __xplus, __xminus);
-- __ok = __copy_digits(__in, __end, __buf, __digits);
-+ ++___in;
-+ ___in = __copy_sign(___in, __end, __buf, __xplus, __xminus);
-+ __ok = __copy_digits(___in, __end, __buf, __digits);
- // If we have an exponent then the sign
- // is optional but the digits aren't.
- }
-@@ -466,7 +466,7 @@
- # ifndef _STLP_NO_BOOL
- template <class _CharT, class _InputIter>
- _InputIter
--num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end,
-+num_get<_CharT, _InputIter>::do_get(_InputIter ___in, _InputIter __end,
- ios_base& __s,
- ios_base::iostate& __err, bool& __x) const
- {
-@@ -482,8 +482,8 @@
- bool __false_ok = true;
-
- size_t __n = 0;
-- for ( ; __in != __end; ++__in) {
-- _CharT __c = *__in;
-+ for ( ; ___in != __end; ++___in) {
-+ _CharT __c = *___in;
- __true_ok = __true_ok && (__c == __truename[__n]);
- __false_ok = __false_ok && (__c == __falsename[__n]);
- ++__n;
-@@ -491,7 +491,7 @@
- if ((!__true_ok && !__false_ok) ||
- (__true_ok && __n >= __truename.size()) ||
- (__false_ok && __n >= __falsename.size())) {
-- ++__in;
-+ ++___in;
- break;
- }
- }
-@@ -505,15 +505,15 @@
- else
- __err = ios_base::failbit;
-
-- if (__in == __end)
-+ if (___in == __end)
- __err |= ios_base::eofbit;
-
-- return __in;
-+ return ___in;
- }
-
- else {
- long __lx;
-- _InputIter __tmp = this->do_get(__in, __end, __s, __err, __lx);
-+ _InputIter __tmp = this->do_get(___in, __end, __s, __err, __lx);
- if (!(__err & ios_base::failbit)) {
- if (__lx == 0)
- __x = false;
-@@ -531,16 +531,16 @@
- # ifdef _STLP_FIX_LIBRARY_ISSUES
- template <class _CharT, class _InputIter>
- _InputIter
--num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+num_get<_CharT, _InputIter>::do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, short& __val) const {
-- return _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-+ return _M_do_get_integer(___in, __end, __str, __err, __val, (_CharT*)0 );
- }
-
- template <class _CharT, class _InputIter>
- _InputIter
--num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+num_get<_CharT, _InputIter>::do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, int& __val) const {
-- return _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-+ return _M_do_get_integer(___in, __end, __str, __err, __val, (_CharT*)0 );
- }
-
- # endif
-@@ -547,83 +547,83 @@
-
- template <class _CharT, class _InputIter>
- _InputIter
--num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+num_get<_CharT, _InputIter>::do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, long& __val) const {
-- return _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-+ return _M_do_get_integer(___in, __end, __str, __err, __val, (_CharT*)0 );
- }
-
- template <class _CharT, class _InputIter>
- _InputIter
--num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+num_get<_CharT, _InputIter>::do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err,
- unsigned short& __val) const {
-- return _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-+ return _M_do_get_integer(___in, __end, __str, __err, __val, (_CharT*)0 );
- }
-
- template <class _CharT, class _InputIter>
- _InputIter
--num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+num_get<_CharT, _InputIter>::do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err,
- unsigned int& __val) const {
-- return _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-+ return _M_do_get_integer(___in, __end, __str, __err, __val, (_CharT*)0 );
- }
-
- template <class _CharT, class _InputIter>
- _InputIter
--num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+num_get<_CharT, _InputIter>::do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err,
- unsigned long& __val) const {
-- return _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-+ return _M_do_get_integer(___in, __end, __str, __err, __val, (_CharT*)0 );
- }
-
-
- template <class _CharT, class _InputIter>
- _InputIter
--num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+num_get<_CharT, _InputIter>::do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err,
- float& __val) const {
- string __buf ;
-- bool __ok = _M_read_float(__buf, __in, __end, __str, (_CharT*)0 );
-+ bool __ok = _M_read_float(__buf, ___in, __end, __str, (_CharT*)0 );
- __string_to_float(__buf, __val);
- __err = __STATIC_CAST(ios_base::iostate, __ok ? ios_base::goodbit : ios_base::failbit);
-- if (__in == __end)
-+ if (___in == __end)
- __err |= ios_base::eofbit;
-- return __in;
-+ return ___in;
- }
-
- template <class _CharT, class _InputIter>
- _InputIter
--num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+num_get<_CharT, _InputIter>::do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err,
- double& __val) const {
- string __buf ;
-- bool __ok = _M_read_float(__buf, __in, __end, __str, (_CharT*)0 );
-+ bool __ok = _M_read_float(__buf, ___in, __end, __str, (_CharT*)0 );
- __string_to_float(__buf, __val);
- __err = __STATIC_CAST(ios_base::iostate, __ok ? ios_base::goodbit : ios_base::failbit);
-- if (__in == __end)
-+ if (___in == __end)
- __err |= ios_base::eofbit;
-- return __in;
-+ return ___in;
- }
-
- #ifndef _STLP_NO_LONG_DOUBLE
- template <class _CharT, class _InputIter>
- _InputIter
--num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+num_get<_CharT, _InputIter>::do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err,
- long double& __val) const {
- string __buf ;
-- bool __ok = _M_read_float(__buf, __in, __end, __str, (_CharT*)0 );
-+ bool __ok = _M_read_float(__buf, ___in, __end, __str, (_CharT*)0 );
- __string_to_float(__buf, __val);
- __err = __STATIC_CAST(ios_base::iostate, __ok ? ios_base::goodbit : ios_base::failbit);
-- if (__in == __end)
-+ if (___in == __end)
- __err |= ios_base::eofbit;
-- return __in;
-+ return ___in;
- }
- #endif /* _STLP_LONG_DOUBLE */
-
- template <class _CharT, class _InputIter>
- _InputIter
--num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+num_get<_CharT, _InputIter>::do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err,
- void*& __p) const {
- # if defined(_STLP_LONG_LONG)&&!defined(__MRC__) //*ty 12/07/2001 - MrCpp can not cast from long long to void*
-@@ -631,7 +631,7 @@
- # else
- unsigned long __val;
- # endif
-- iter_type __tmp = _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-+ iter_type __tmp = _M_do_get_integer(___in, __end, __str, __err, __val, (_CharT*)0 );
- if (!(__err & ios_base::failbit))
- __p = __REINTERPRET_CAST(void*,__val);
- return __tmp;
-@@ -642,18 +642,18 @@
-
- template <class _CharT, class _InputIter>
- _InputIter
--num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+num_get<_CharT, _InputIter>::do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err,
- _STLP_LONG_LONG& __val) const {
-- return _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-+ return _M_do_get_integer(___in, __end, __str, __err, __val, (_CharT*)0 );
- }
-
- template <class _CharT, class _InputIter>
- _InputIter
--num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+num_get<_CharT, _InputIter>::do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err,
- unsigned _STLP_LONG_LONG& __val) const {
-- return _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-+ return _M_do_get_integer(___in, __end, __str, __err, __val, (_CharT*)0 );
- }
-
- #endif /* _STLP_LONG_LONG */
---- misc/STLport-4.5-0119/stlport/stl/_num_get.h Mon Nov 26 19:37:00 2001
-+++ misc/build/STLport-4.5-0119/stlport/stl/_num_get.h Mon Jun 2 10:32:02 2008
-@@ -58,79 +58,79 @@
- explicit num_get(size_t __refs = 0): locale::facet(__refs) {}
-
- # ifndef _STLP_NO_BOOL
-- _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ _InputIter get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, bool& __val) const {
-- return do_get(__in, __end, __str, __err, __val);
-+ return do_get(___in, __end, __str, __err, __val);
- }
- # endif
-
- # ifdef _STLP_FIX_LIBRARY_ISSUES
-- _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ _InputIter get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, short& __val) const {
-- return do_get(__in, __end, __str, __err, __val);
-+ return do_get(___in, __end, __str, __err, __val);
- }
-
-- _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ _InputIter get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, int& __val) const {
-- return do_get(__in, __end, __str, __err, __val);
-+ return do_get(___in, __end, __str, __err, __val);
- }
- # endif
-
-- _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ _InputIter get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, long& __val) const {
-- return do_get(__in, __end, __str, __err, __val);
-+ return do_get(___in, __end, __str, __err, __val);
- }
-
-- _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ _InputIter get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, unsigned short& __val) const {
-- return do_get(__in, __end, __str, __err, __val);
-+ return do_get(___in, __end, __str, __err, __val);
- }
-
-- _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ _InputIter get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, unsigned int& __val) const {
-- return do_get(__in, __end, __str, __err, __val);
-+ return do_get(___in, __end, __str, __err, __val);
- }
-
-- _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ _InputIter get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, unsigned long& __val) const {
-- return do_get(__in, __end, __str, __err, __val);
-+ return do_get(___in, __end, __str, __err, __val);
- }
-
- #ifdef _STLP_LONG_LONG
-
-- _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ _InputIter get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, _STLP_LONG_LONG& __val) const {
-- return do_get(__in, __end, __str, __err, __val);
-+ return do_get(___in, __end, __str, __err, __val);
- }
-
-- _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ _InputIter get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, unsigned _STLP_LONG_LONG& __val) const {
-- return do_get(__in, __end, __str, __err, __val);
-+ return do_get(___in, __end, __str, __err, __val);
- }
-
- #endif /* _STLP_LONG_LONG */
-
-- _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ _InputIter get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, float& __val) const {
-- return do_get(__in, __end, __str, __err, __val);
-+ return do_get(___in, __end, __str, __err, __val);
- }
-
-- _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ _InputIter get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, double& __val) const {
-- return do_get(__in, __end, __str, __err, __val);
-+ return do_get(___in, __end, __str, __err, __val);
- }
-
- # ifndef _STLP_NO_LONG_DOUBLE
-
-- _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ _InputIter get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, long double& __val) const {
-- return do_get(__in, __end, __str, __err, __val);
-+ return do_get(___in, __end, __str, __err, __val);
- }
- # endif
-
-- _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ _InputIter get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, void*& __val) const {
-- return do_get(__in, __end, __str, __err, __val);
-+ return do_get(___in, __end, __str, __err, __val);
- }
-
- _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-@@ -143,43 +143,43 @@
- typedef numpunct<_CharT> _Numpunct;
-
- # ifndef _STLP_NO_BOOL
-- virtual _InputIter do_get(_InputIter __in, _InputIter __end,
-+ virtual _InputIter do_get(_InputIter ___in, _InputIter __end,
- ios_base& __str, ios_base::iostate& __err, bool& __val) const;
- # endif
-
-- virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ virtual _InputIter do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, long& __val) const;
-- virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ virtual _InputIter do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, unsigned short& __val) const;
-- virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ virtual _InputIter do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, unsigned int& __val) const;
-- virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ virtual _InputIter do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, unsigned long& __val) const;
- # ifdef _STLP_FIX_LIBRARY_ISSUES
- // issue 118 : those are actually not supposed to be here
-- virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ virtual _InputIter do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, short& __val) const;
-- virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ virtual _InputIter do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, int& __val) const;
- # endif
-- virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ virtual _InputIter do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, float& __val) const;
-- virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ virtual _InputIter do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, double& __val) const;
-- virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ virtual _InputIter do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err,
- void*& __p) const;
-
- #ifndef _STLP_NO_LONG_DOUBLE
-- virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ virtual _InputIter do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, long double& __val) const;
- #endif /* _STLP_LONG_DOUBLE */
-
- #ifdef _STLP_LONG_LONG
-
-- virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ virtual _InputIter do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, _STLP_LONG_LONG& __val) const;
-- virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-+ virtual _InputIter do_get(_InputIter ___in, _InputIter __end, ios_base& __str,
- ios_base::iostate& __err, unsigned _STLP_LONG_LONG& __val) const;
- #endif /* _STLP_LONG_LONG */
-
---- misc/STLport-4.5-0119/stlport/stl/_num_put.c Thu Sep 12 22:47:01 2002
-+++ misc/build/STLport-4.5-0119/stlport/stl/_num_put.c Mon Jun 2 10:32:02 2008
-@@ -45,29 +45,29 @@
- template <class _CharT, class _OutputIter>
- _OutputIter _STLP_CALL
- __copy_float_and_fill(const _CharT* __first, const _CharT* __last,
-- _OutputIter __out,
-+ _OutputIter ___out,
- ios_base::fmtflags __flags,
- streamsize __width, _CharT __fill,
- _CharT __xplus, _CharT __xminus) {
- if (__width <= __last - __first)
-- return copy(__first, __last, __out);
-+ return copy(__first, __last, ___out);
- else {
- streamsize __pad = __width - (__last - __first);
- ios_base::fmtflags __dir = __flags & ios_base::adjustfield;
-
- if (__dir == ios_base::left) {
-- __out = copy(__first, __last, __out);
-- return fill_n(__out, __pad, __fill);
-+ ___out = copy(__first, __last, ___out);
-+ return fill_n(___out, __pad, __fill);
- }
- else if (__dir == ios_base::internal && __first != __last &&
- (*__first == __xplus || *__first == __xminus)) {
-- *__out++ = *__first++;
-- __out = fill_n(__out, __pad, __fill);
-- return copy(__first, __last, __out);
-+ *___out++ = *__first++;
-+ ___out = fill_n(___out, __pad, __fill);
-+ return copy(__first, __last, ___out);
- }
- else {
-- __out = fill_n(__out, __pad, __fill);
-- return copy(__first, __last, __out);
-+ ___out = fill_n(___out, __pad, __fill);
-+ return copy(__first, __last, ___out);
- }
- }
- }
-@@ -76,7 +76,7 @@
- // Helper routine for wchar_t
- template <class _OutputIter>
- _OutputIter _STLP_CALL
--__put_float(char* __ibuf, char* __iend, _OutputIter __out,
-+__put_float(char* __ibuf, char* __iend, _OutputIter ___out,
- ios_base& __f, wchar_t __fill,
- wchar_t __decimal_point,
- wchar_t __sep, const string& __grouping)
-@@ -107,7 +107,7 @@
- __eend = __wbuf + __len;
- }
-
-- return __copy_float_and_fill(__wbuf, __eend, __out,
-+ return __copy_float_and_fill(__wbuf, __eend, ___out,
- __f.flags(), __f.width(0), __fill,
- __ct.widen('+'), __ct.widen('-'));
- }
-@@ -116,7 +116,7 @@
- // Helper routine for char
- template <class _OutputIter>
- _OutputIter _STLP_CALL
--__put_float(char* __ibuf, char* __iend, _OutputIter __out,
-+__put_float(char* __ibuf, char* __iend, _OutputIter ___out,
- ios_base& __f, char __fill,
- char __decimal_point,
- char __sep, const string& __grouping)
-@@ -133,7 +133,7 @@
- __iend = __ibuf + __len;
- }
-
-- return __copy_float_and_fill(__ibuf, __iend, __out,
-+ return __copy_float_and_fill(__ibuf, __iend, ___out,
- __f.flags(), __f.width(0), __fill, '+', '-');
- }
-
-@@ -158,37 +158,37 @@
- template <class _CharT, class _OutputIter>
- _OutputIter _STLP_CALL
- __copy_integer_and_fill(const _CharT* __buf, ptrdiff_t __len,
-- _OutputIter __out,
-+ _OutputIter ___out,
- ios_base::fmtflags __flg, streamsize __wid, _CharT __fill,
- _CharT __xplus, _CharT __xminus)
- {
- if (__len >= __wid)
-- return copy(__buf, __buf + __len, __out);
-+ return copy(__buf, __buf + __len, ___out);
- else {
- ptrdiff_t __pad = __wid - __len;
- ios_base::fmtflags __dir = __flg & ios_base::adjustfield;
-
- if (__dir == ios_base::left) {
-- __out = copy(__buf, __buf + __len, __out);
-- return fill_n(__out, __pad, __fill);
-+ ___out = copy(__buf, __buf + __len, ___out);
-+ return fill_n(___out, __pad, __fill);
- }
- else if (__dir == ios_base::internal && __len != 0 &&
- (__buf[0] == __xplus || __buf[0] == __xminus)) {
-- *__out++ = __buf[0];
-- __out = fill_n(__out, __pad, __fill);
-- return copy(__buf + 1, __buf + __len, __out);
-+ *___out++ = __buf[0];
-+ ___out = fill_n(___out, __pad, __fill);
-+ return copy(__buf + 1, __buf + __len, ___out);
- }
- else if (__dir == ios_base::internal && __len >= 2 &&
- (__flg & ios_base::showbase) &&
- (__flg & ios_base::basefield) == ios_base::hex) {
-- *__out++ = __buf[0];
-- *__out++ = __buf[1];
-- __out = fill_n(__out, __pad, __fill);
-- return copy(__buf + 2, __buf + __len, __out);
-+ *___out++ = __buf[0];
-+ *___out++ = __buf[1];
-+ ___out = fill_n(___out, __pad, __fill);
-+ return copy(__buf + 2, __buf + __len, ___out);
- }
- else {
-- __out = fill_n(__out, __pad, __fill);
-- return copy(__buf, __buf + __len, __out);
-+ ___out = fill_n(___out, __pad, __fill);
-+ return copy(__buf, __buf + __len, ___out);
- }
- }
- }
---- misc/STLport-4.5-0119/stlport/stl/_sstream.c Thu Sep 12 22:47:04 2002
-+++ misc/build/STLport-4.5-0119/stlport/stl/_sstream.c Mon Jun 2 10:32:02 2008
-@@ -337,22 +337,22 @@
- ios_base::seekdir __dir,
- ios_base::openmode __mode)
- {
-- bool __in = false;
-- bool __out = false;
-+ bool ___in = false;
-+ bool ___out = false;
-
- if ((__mode & (ios_base::in | ios_base::out)) == (ios_base::in | ios_base::out) ) {
- if (__dir == ios_base::beg || __dir == ios_base::end)
-- __in = __out = true;
-+ ___in = ___out = true;
- }
- else if (__mode & ios_base::in)
-- __in = true;
-+ ___in = true;
- else if (__mode & ios_base::out)
-- __out = true;
-+ ___out = true;
-
-- if (!__in && !__out)
-+ if (!___in && !___out)
- return pos_type(off_type(-1));
-- else if ((__in && (!(_M_mode & ios_base::in) || this->gptr() == 0)) ||
-- (__out && (!(_M_mode & ios_base::out) || this->pptr() == 0)))
-+ else if ((___in && (!(_M_mode & ios_base::in) || this->gptr() == 0)) ||
-+ (___out && (!(_M_mode & ios_base::out) || this->pptr() == 0)))
- return pos_type(off_type(-1));
-
- if ((_M_mode & ios_base::out) && !(_M_mode & ios_base::in))
-@@ -367,7 +367,7 @@
- __newoff = _M_str.size();
- break;
- case ios_base::cur:
-- __newoff = __in ? this->gptr() - this->eback()
-+ __newoff = ___in ? this->gptr() - this->eback()
- : this->pptr() - this->pbase();
- break;
- default:
-@@ -376,7 +376,7 @@
-
- __off += __newoff;
-
-- if (__in) {
-+ if (___in) {
- ptrdiff_t __n = this->egptr() - this->eback();
-
- if (__off < 0 || __off > __n)
-@@ -385,7 +385,7 @@
- this->setg(this->eback(), this->eback() + __off, this->eback() + __n);
- }
-
-- if (__out) {
-+ if (___out) {
- ptrdiff_t __n = this->epptr() - this->pbase();
-
- if (__off < 0 || __off > __n)
-@@ -404,11 +404,11 @@
- basic_stringbuf<_CharT, _Traits, _Alloc>
- ::seekpos(pos_type __pos, ios_base::openmode __mode)
- {
-- bool __in = (__mode & ios_base::in) != 0;
-- bool __out = (__mode & ios_base::out) != 0;
-+ bool ___in = (__mode & ios_base::in) != 0;
-+ bool ___out = (__mode & ios_base::out) != 0;
-
-- if ((__in && (!(_M_mode & ios_base::in) || this->gptr() == 0)) ||
-- (__out && (!(_M_mode & ios_base::out) || this->pptr() == 0)))
-+ if ((___in && (!(_M_mode & ios_base::in) || this->gptr() == 0)) ||
-+ (___out && (!(_M_mode & ios_base::out) || this->pptr() == 0)))
- return pos_type(off_type(-1));
-
- const off_type __n = __pos - pos_type(off_type(0));
-@@ -415,13 +415,13 @@
- if ((_M_mode & ios_base::out) && !(_M_mode & ios_base::in))
- _M_append_buffer();
-
-- if (__in) {
-+ if (___in) {
- if (__n < 0 || __n > this->egptr() - this->eback())
- return pos_type(off_type(-1));
- this->setg(this->eback(), this->eback() + __n, this->egptr());
- }
-
-- if (__out) {
-+ if (___out) {
- if (__n < 0 || size_t(__n) > _M_str.size())
- return pos_type(off_type(-1));
-
---- misc/STLport-4.5-0119/stlport/stl/_time_facets.c Thu Sep 12 22:47:07 2002
-+++ misc/build/STLport-4.5-0119/stlport/stl/_time_facets.c Mon Jun 2 10:32:02 2008
-@@ -328,7 +328,7 @@
- # ifndef _STLP_NO_WCHAR_T
- template <class _OuIt>
- _OuIt _STLP_CALL
--__put_time(char * __first, char * __last, _OuIt __out,
-+__put_time(char * __first, char * __last, _OuIt ___out,
- const ios_base& __s, wchar_t) {
- const ctype<wchar_t>& __ct = *(ctype<wchar_t>*)__s._M_ctype_facet();
- wchar_t __wbuf[64];
-@@ -335,7 +335,7 @@
- __ct.widen(__first, __last, __wbuf);
- ptrdiff_t __len = __last - __first;
- wchar_t * __eend = __wbuf + __len;
-- return copy((wchar_t*)__wbuf, __eend, __out);
-+ return copy((wchar_t*)__wbuf, __eend, ___out);
- }
- # endif
-
---- misc/STLport-4.5-0119/stlport/stl/_time_facets.h Wed Aug 29 00:55:47 2001
-+++ misc/build/STLport-4.5-0119/stlport/stl/_time_facets.h Mon Jun 2 10:32:02 2008
-@@ -198,14 +198,14 @@
- const _Time_Info& __table, const tm* __t);
-
- template <class _OuIt>
--inline _OuIt _STLP_CALL __put_time(char * __first, char * __last, _OuIt __out,
-+inline _OuIt _STLP_CALL __put_time(char * __first, char * __last, _OuIt ___out,
- const ios_base& /* __loc */, char) {
-- return copy(__first, __last, __out);
-+ return copy(__first, __last, ___out);
- }
-
- # ifndef _STLP_NO_WCHAR_T
- template <class _OuIt>
--_OuIt _STLP_CALL __put_time(char * __first, char * __last, _OuIt __out,
-+_OuIt _STLP_CALL __put_time(char * __first, char * __last, _OuIt ___out,
- const ios_base& __s, wchar_t);
- # endif
-
---- misc/STLport-4.5-0119/stlport/stl/debug/_debug.c Thu Sep 12 22:47:08 2002
-+++ misc/build/STLport-4.5-0119/stlport/stl/debug/_debug.c Mon Jun 2 10:32:02 2008
-@@ -82,7 +82,7 @@
- template <class _Iterator>
- bool _STLP_CALL __check_range(const _Iterator& __it,
- const _Iterator& __start, const _Iterator& __finish) {
-- _STLP_VERBOSE_RETURN(__in_range(__it,__start, __finish),
-+ _STLP_VERBOSE_RETURN(___in_range(__it,__start, __finish),
- _StlMsg_NOT_IN_RANGE_1)
- return true;
- }
-@@ -90,7 +90,7 @@
- template <class _Iterator>
- bool _STLP_CALL __check_range(const _Iterator& __first, const _Iterator& __last,
- const _Iterator& __start, const _Iterator& __finish) {
-- _STLP_VERBOSE_RETURN(__in_range(__first, __last, __start, __finish),
-+ _STLP_VERBOSE_RETURN(___in_range(__first, __last, __start, __finish),
- _StlMsg_NOT_IN_RANGE_2)
- return true;
- }
---- misc/STLport-4.5-0119/stlport/stl/debug/_debug.h Thu Sep 12 22:47:09 2002
-+++ misc/build/STLport-4.5-0119/stlport/stl/debug/_debug.h Mon Jun 2 10:32:03 2008
-@@ -227,7 +227,7 @@
-
- // Note : that means in range [i1, i2].
- template <class _Iterator>
--inline bool _STLP_CALL __in_range(const _Iterator& _It, const _Iterator& __i1,
-+inline bool _STLP_CALL ___in_range(const _Iterator& _It, const _Iterator& __i1,
- const _Iterator& __i2) {
- return __valid_range(__i1,_It,_STLP_ITERATOR_CATEGORY(__i1, _Iterator)) &&
- __valid_range(_It,__i2,_STLP_ITERATOR_CATEGORY(_It, _Iterator));
-@@ -234,7 +234,7 @@
- }
-
- template <class _Iterator>
--inline bool _STLP_CALL __in_range(const _Iterator& __first, const _Iterator& __last,
-+inline bool _STLP_CALL ___in_range(const _Iterator& __first, const _Iterator& __last,
- const _Iterator& __start, const _Iterator& __finish) {
- return __valid_range(__first,__last,_STLP_ITERATOR_CATEGORY(__first, _Iterator)) &&
- __valid_range(__start,__first,_STLP_ITERATOR_CATEGORY(__first, _Iterator)) &&
---- misc/STLport-4.5-0119/stlport/stl/debug/_deque.h Fri May 4 04:11:54 2001
-+++ misc/build/STLport-4.5-0119/stlport/stl/debug/_deque.h Mon Jun 2 10:32:03 2008
-@@ -121,9 +121,9 @@
- explicit _DBG_deque(const allocator_type& __a = allocator_type()) :
- _STLP_DEQUE_SUPER(__a), _M_iter_list(_Get_base()) {}
- _DBG_deque(const _Self& __x) : _STLP_DEQUE_SUPER(__x), _M_iter_list(_Get_base()) {}
-- _DBG_deque(size_type __n, const value_type& __value,
-+ _DBG_deque(size_type __n, const value_type& ___value,
- const allocator_type& __a = allocator_type()) :
-- _STLP_DEQUE_SUPER(__n, __value, __a), _M_iter_list(_Get_base()) {}
-+ _STLP_DEQUE_SUPER(__n, ___value, __a), _M_iter_list(_Get_base()) {}
- explicit _DBG_deque(size_type __n) : _STLP_DEQUE_SUPER(__n), _M_iter_list(_Get_base()) {}
-
- #ifdef _STLP_MEMBER_TEMPLATES
---- misc/STLport-4.5-0119/stlport/stl/debug/_list.h Wed May 30 05:45:43 2001
-+++ misc/build/STLport-4.5-0119/stlport/stl/debug/_list.h Mon Jun 2 10:32:03 2008
-@@ -79,9 +79,9 @@
- _Base* _Get_base() { return (_Base*)this; }
- explicit _DBG_list(const allocator_type& __a = allocator_type()) :
- _STLP_DBG_LIST_BASE(__a), _M_iter_list(_Get_base()) {}
-- _DBG_list(size_type __n, const _Tp& __value,
-+ _DBG_list(size_type __n, const _Tp& ___value,
- const allocator_type& __a = allocator_type())
-- : _STLP_DBG_LIST_BASE(__n, __value, __a), _M_iter_list(_Get_base()) {}
-+ : _STLP_DBG_LIST_BASE(__n, ___value, __a), _M_iter_list(_Get_base()) {}
- explicit _DBG_list(size_type __n)
- : _STLP_DBG_LIST_BASE(__n), _M_iter_list(_Get_base()) {}
-
-@@ -219,13 +219,13 @@
-
- void resize(size_type __new_size) { this->resize(__new_size, _Tp()); }
-
-- void remove(const _Tp& __value) {
-+ void remove(const _Tp& ___value) {
- typename _Base::iterator __first = _Base::begin();
- typename _Base::iterator __last = _Base::end();
- while (__first != __last) {
- typename _Base::iterator __next = __first;
- ++__next;
-- if (__value == *__first) erase(iterator(&_M_iter_list,__first));
-+ if (___value == *__first) erase(iterator(&_M_iter_list,__first));
- __first = __next;
- }
- }
---- misc/STLport-4.5-0119/stlport/stl/debug/_vector.h Mon Oct 28 16:09:32 2002
-+++ misc/build/STLport-4.5-0119/stlport/stl/debug/_vector.h Mon Jun 2 10:32:03 2008
-@@ -141,9 +141,9 @@
- explicit _DBG_vector(const allocator_type& __a = allocator_type())
- : _STLP_DBG_VECTOR_BASE(__a), _M_iter_list((const _Base*)this) {}
-
-- _DBG_vector(size_type __n, const _Tp& __value,
-+ _DBG_vector(size_type __n, const _Tp& ___value,
- const allocator_type& __a = allocator_type())
-- : _STLP_DBG_VECTOR_BASE(__n, __value, __a), _M_iter_list((const _Base*)this) {}
-+ : _STLP_DBG_VECTOR_BASE(__n, ___value, __a), _M_iter_list((const _Base*)this) {}
-
- explicit _DBG_vector(size_type __n)
- : _STLP_DBG_VECTOR_BASE(__n), _M_iter_list((const _Base*)this) {}
diff --git a/stlport/STLport-4.5-gcc43_warnings.patch b/stlport/STLport-4.5-gcc43_warnings.patch
deleted file mode 100644
index f5e1d4b5c088..000000000000
--- a/stlport/STLport-4.5-gcc43_warnings.patch
+++ /dev/null
@@ -1,113 +0,0 @@
---- misc/STLport-4.5/src/num_get_float.cpp 2001-05-03 09:40:43.000000000 +0200
-+++ misc/build/STLport-4.5/src/num_get_float.cpp 2009-03-22 17:31:30.000000000 +0100
-@@ -484,7 +484,7 @@
- else { /* not zero or denorm */
- /* Round to 53 bits */
-
-- rest = value & (1<<10)-1;
-+ rest = value & ((1<<10)-1);
- value >>= 10;
- #if !defined(__SC__)
- guard = (uint32) value & 1;
---- misc/STLport-4.5/src/strstream.cpp 2001-01-27 02:39:29.000000000 +0100
-+++ misc/build/STLport-4.5/src/strstream.cpp 2009-03-22 17:26:32.000000000 +0100
-@@ -284,11 +284,12 @@
-
- void strstreambuf::_M_free(char* p)
- {
-- if (p)
-+ if (p) {
- if (_M_free_fun)
- _M_free_fun(p);
- else
- delete[] p;
-+ }
- }
-
- void strstreambuf::_M_setup(char* get, char* put, streamsize n)
---- misc/STLport-4.5/stlport/stl/_list.c 2001-05-11 04:20:07.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stl/_list.c 2009-03-22 17:26:32.000000000 +0100
-@@ -82,7 +82,7 @@
- {
- iterator __i = begin();
- size_type __len = 0;
-- for ( ; __i != end() && __len < __new_size; ++__i, ++__len);
-+ for ( ; __i != end() && __len < __new_size; ++__i, ++__len) ;
-
- if (__len == __new_size)
- erase(__i, end());
---- misc/STLport-4.5/stlport/stl/_time_facets.c 2001-03-19 08:01:09.000000000 +0100
-+++ misc/build/STLport-4.5/stlport/stl/_time_facets.c 2009-03-22 17:26:32.000000000 +0100
-@@ -101,7 +101,7 @@
-
- while (__first != __last) {
- for (__i = 0; __i < __n; ++__i)
-- if (__do_check[__i])
-+ if (__do_check[__i]) {
- if (*__first == __name[__i][__pos]) {
- if (__pos == _DiffType(__name[__i].size()) - 1) {
- __do_check[__i] = 0;
-@@ -119,6 +119,7 @@
- if (__check_count == 0)
- return __matching_name[__pos];
- }
-+ }
-
- ++__first; ++__pos;
- }
---- misc/STLport-4.5/stlport/stl/_tree.c 2009-03-22 17:04:36.000000000 +0100
-+++ misc/build/STLport-4.5/stlport/stl/_tree.c 2009-03-22 17:26:32.000000000 +0100
-@@ -186,18 +186,20 @@
- __z->_M_parent->_M_left = __x;
- else
- __z->_M_parent->_M_right = __x;
-- if (__leftmost == __z)
-+ if (__leftmost == __z) {
- if (__z->_M_right == 0) // __z->_M_left must be null also
- __leftmost = __z->_M_parent;
- // makes __leftmost == _M_header if __z == __root
- else
- __leftmost = _Rb_tree_node_base::_S_minimum(__x);
-- if (__rightmost == __z)
-+ }
-+ if (__rightmost == __z) {
- if (__z->_M_left == 0) // __z->_M_right must be null also
- __rightmost = __z->_M_parent;
- // makes __rightmost == _M_header if __z == __root
- else // __x == __z->_M_left
- __rightmost = _Rb_tree_node_base::_S_maximum(__x);
-+ }
- }
- if (__y->_M_color != _S_rb_tree_red) {
- while (__x != __root && (__x == 0 || __x->_M_color == _S_rb_tree_black))
---- misc/STLport-4.5/stlport/stl/debug/_debug.c 2001-05-30 05:45:43.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stl/debug/_debug.c 2009-03-22 17:26:32.000000000 +0100
-@@ -58,7 +58,7 @@
- # endif
- const _Iterator& __last, const forward_iterator_tag &) {
- _Iterator1 __i(__first);
-- for (; __i != __last && __i != __it; ++__i);
-+ for (; __i != __last && __i != __it; ++__i) ;
- return (__i!=__last);
- }
-
-@@ -68,7 +68,7 @@
- __in_range_aux(const _Iterator1& __it, const _Iterator& __first,
- const _Iterator& __last, const bidirectional_iterator_tag &) {
- _Iterator1 __i(__first);
-- for (; __i != __last && __i != __it; ++__i);
-+ for (; __i != __last && __i != __it; ++__i) ;
- return (__i !=__last);
- }
- # endif
---- misc/STLport-4.5/stlport/stl/debug/_list.h 2001-05-30 05:45:43.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stl/debug/_list.h 2009-03-22 17:26:32.000000000 +0100
-@@ -209,7 +209,7 @@
- void resize(size_type __new_size, const _Tp& __x) {
- typename _Base::iterator __i = _Base::begin();
- size_type __len = 0;
-- for ( ; __i != _Base::end() && __len < __new_size; ++__i, ++__len);
-+ for ( ; __i != _Base::end() && __len < __new_size; ++__i, ++__len) ;
-
- if (__len == __new_size)
- erase(iterator(&_M_iter_list,__i), end());
diff --git a/stlport/STLport-4.5.patch b/stlport/STLport-4.5.patch
deleted file mode 100644
index 5843c1fa3e23..000000000000
--- a/stlport/STLport-4.5.patch
+++ /dev/null
@@ -1,964 +0,0 @@
---- misc/STLport-4.5/src/common_macros_os2.mak 2008-07-18 14:14:27.000000000 +0200
-+++ misc/build/STLport-4.5/src/common_macros_os2.mak 2008-07-18 14:14:05.000000000 +0200
-@@ -1 +1,37 @@
--dummy
-+SHELL=/bin/sh
-+
-+# INSTALLDIR=/usr/local
-+# INSTALLDIR_INC=$(INSTALLDIR)/include/stlport
-+# INSTALLDIR_LIB=$(INSTALLDIR)/lib
-+
-+# RM = rm -fr
-+
-+# INSTALL = ./install.sh -c
-+# INSTALL_LIB = $(INSTALL)
-+# INSTALL_H = $(INSTALL) -m 444
-+
-+#
-+#
-+# Targets
-+#
-+
-+VERSION_SUFFIX= $(VERSION_MAJOR)$(VERSION_MINOR)$(BETA_SUFFIX)
-+DYNAMIC_SUFFIX= $(VERSION_SUFFIX)$(PATCH_SUFFIX)
-+DYNAMIC_SUFFIX= $(VERSION_SUFFIX)$(PATCH_SUFFIX)
-+
-+# those are defined "Unix way" in common_macros.mak; redefine them here
-+RELEASE_DYNLIB=$(RELEASE_NAME)$(DYNAMIC_SUFFIX).$(DYNEXT)
-+DEBUG_DYNLIB=$(DEBUG_NAME)$(DYNAMIC_SUFFIX).$(DYNEXT)
-+STLDEBUG_DYNLIB=$(STLDEBUG_NAME)$(DYNAMIC_SUFFIX).$(DYNEXT)
-+
-+RELEASE_DYNLIB_SONAME=$(RELEASE_NAME)$(VERSION_SUFFIX).$(DYNEXT)
-+DEBUG_DYNLIB_SONAME=$(DEBUG_NAME)$(VERSION_SUFFIX).$(DYNEXT)
-+STLDEBUG_DYNLIB_SONAME=$(STLDEBUG_NAME)$(VERSION_SUFFIX).$(DYNEXT)
-+
-+ALL_DYNAMIC_LIBS=$(OUTDIR)$(PATH_SEP)$(RELEASE_DYNLIB) $(OUTDIR)$(PATH_SEP)$(STLDEBUG_DYNLIB)
-+ALL_DYNAMIC_LIBS=$(OUTDIR)$(PATH_SEP)$(RELEASE_DYNLIB)
-+DEBUG_DYNAMIC_LIBS=$(OUTDIR)$(PATH_SEP)$(RELEASE_DYNLIB) $(OUTDIR)$(PATH_SEP)$(STLDEBUG_DYNLIB)
-+
-+RELEASE_LIB=$(RELEASE_NAME)$(STATIC_SUFFIX).$(STEXT)
-+DEBUG_LIB=$(DEBUG_NAME)$(STATIC_SUFFIX).$(STEXT)
-+STLDEBUG_LIB=$(STLDEBUG_NAME)$(STATIC_SUFFIX).$(STEXT)
---- misc/STLport-4.5/src/common_percent_rules.mak 2001-05-19 05:04:20.000000000 +0200
-+++ misc/build/STLport-4.5/src/common_percent_rules.mak 2008-07-18 14:13:49.000000000 +0200
-@@ -1,45 +1,52 @@
-
- .SUFFIXES: .cpp .c .o .so .a
-
-+CFLAGS_RELEASE_static*= $(CXXFLAGS_RELEASE_static)
-+CFLAGS_RELEASE_dynamic*= $(CXXFLAGS_RELEASE_dynamic)
-+CFLAGS_DEBUG_static*= $(CXXFLAGS_DEBUG_static)
-+CFLAGS_DEBUG_dynamic*= $(CXXFLAGS_DEBUG_dynamic)
-+CFLAGS_STLDEBUG_static*= $(CXXFLAGS_STLDEBUG_static)
-+CFLAGS_STLDEBUG_dynamic*= $(CXXFLAGS_STLDEBUG_dynamic)
-+
- $(RELEASE_OBJDIR_static)/%.o: %.cpp
- $(CXX) $(CXXFLAGS_RELEASE_static) $< -c -o $@
- $(RELEASE_OBJDIR_static)/%.o: %.c
-- $(CC) $(CXXFLAGS_RELEASE_static) $< -c -o $@
-+ $(CC) $(CFLAGS_RELEASE_static) $< -c -o $@
- $(RELEASE_OBJDIR_static)/%.i : %.cpp
- $(CXX) $(CXXFLAGS_RELEASE_static) $< -E $@
-
- $(RELEASE_OBJDIR_dynamic)/%.o : %.cpp
- $(CXX) $(CXXFLAGS_RELEASE_dynamic) $< -c -o $@
- $(RELEASE_OBJDIR_dynamic)/%.o : %.c
-- $(CC) $(CXXFLAGS_RELEASE_dynamic) $< -c -o $@
-+ $(CC) $(CFLAGS_RELEASE_dynamic) $< -c -o $@
- $(RELEASE_OBJDIR_dynamic)/%.i : %.cpp
- $(CXX) $(CXXFLAGS_RELEASE_dynamic) $< -E $@
-
- $(DEBUG_OBJDIR_static)/%.o : %.cpp
- $(CXX) $(CXXFLAGS_DEBUG_static) $< -c -o $@
- $(DEBUG_OBJDIR_static)/%.o : %.c
-- $(CC) $(CXXFLAGS_DEBUG_static) $< -c -o $@
-+ $(CC) $(CFLAGS_DEBUG_static) $< -c -o $@
- $(DEBUG_OBJDIR_static)/%.i : %.cpp
- $(CXX) $(CXXFLAGS_DEBUG_static) $< -E $@
-
- $(DEBUG_OBJDIR_dynamic)/%.o : %.cpp
- $(CXX) $(CXXFLAGS_DEBUG_dynamic) $< -c -o $@
- $(DEBUG_OBJDIR_dynamic)/%.o : %.c
-- $(CC) $(CXXFLAGS_DEBUG_dynamic) $< -c -o $@
-+ $(CC) $(CFLAGS_DEBUG_dynamic) $< -c -o $@
- $(DEBUG_OBJDIR_dynamic)/%.i : %.cpp
- $(CXX) $(CXXFLAGS_DEBUG_dynamic) $< -E $@
-
- $(STLDEBUG_OBJDIR_static)/%.o : %.cpp
- $(CXX) $(CXXFLAGS_STLDEBUG_static) $< -c -o $@
- $(STLDEBUG_OBJDIR_static)/%.o : %.c
-- $(CC) $(CXXFLAGS_STLDEBUG_static) $< -c -o $@
-+ $(CC) $(CFLAGS_STLDEBUG_static) $< -c -o $@
- $(STLDEBUG_OBJDIR_static)/%.i : %.cpp
- $(CXX) $(CXXFLAGS_STLDEBUG_static) $< -E $@
-
- $(STLDEBUG_OBJDIR_dynamic)/%.o : %.cpp
- $(CXX) $(CXXFLAGS_STLDEBUG_dynamic) $< -c -o $@
- $(STLDEBUG_OBJDIR_dynamic)/%.o : %.c
-- $(CC) $(CXXFLAGS_STLDEBUG_dynamic) $< -c -o $@
-+ $(CC) $(CFLAGS_STLDEBUG_dynamic) $< -c -o $@
- $(STLDEBUG_OBJDIR_dynamic)/%.i : %.cpp
- $(CXX) $(CXXFLAGS_STLDEBUG_dynamic) $< -E $@
-
---- misc/STLport-4.5/src/dll_main.cpp 2001-08-25 03:14:19.000000000 +0200
-+++ misc/build/STLport-4.5/src/dll_main.cpp 2008-07-18 14:13:49.000000000 +0200
-@@ -147,6 +147,10 @@
- template struct _STLP_CLASS_DECLSPEC __stl_debug_engine<bool>;
- # endif
-
-+#ifdef __APPLE__
-+template class _STLP_CLASS_DECLSPEC _Node_Alloc_Lock<false,0>;
-+template class _STLP_CLASS_DECLSPEC _Node_Alloc_Lock<true,0>;
-+#endif
- template class _STLP_CLASS_DECLSPEC __node_alloc<false,0>;
- template class _STLP_CLASS_DECLSPEC __node_alloc<true,0>;
- template class _STLP_CLASS_DECLSPEC __debug_alloc< __node_alloc<true,0> >;
---- misc/STLport-4.5/src/gcc-3.0-freebsd.mak 2008-07-18 14:14:26.000000000 +0200
-+++ misc/build/STLport-4.5/src/gcc-3.0-freebsd.mak 2008-07-18 14:13:49.000000000 +0200
-@@ -1 +1,69 @@
--dummy
-+#
-+# Note : this makefile is for gcc-3 !
-+#
-+
-+#
-+# compiler
-+# take these from the OOo build environment
-+CC*= gcc
-+CXX*= g++
-+
-+#
-+# Basename for libraries
-+#
-+LIB_BASENAME = libstlport_gcc
-+
-+#
-+# guts for common stuff
-+#
-+#
-+LINK=ar cr
-+DYN_LINK=${CXX} -Wl,-z,origin -Wl,-rpath,'$$ORIGIN' ${PTHREAD_LIBS} -fexceptions -shared -o
-+
-+OBJEXT=o
-+DYNEXT=so
-+STEXT=a
-+RM=rm -rf
-+PATH_SEP=/
-+MKDIR=mkdir -p
-+COMP=GCC$(ARCH)
-+INSTALL_STEP = install_unix
-+
-+all: all_dynamic all_static symbolic_links
-+
-+include common_macros.mak
-+
-+WARNING_FLAGS= -Wall -W -Wno-sign-compare -Wno-unused -Wno-uninitialized
-+
-+CXXFLAGS_COMMON = ${PTHREAD_CFLAGS} -DGXX_INCLUDE_PATH=${GXX_INCLUDE_PATH} -fexceptions -ftemplate-depth-32 -I${STLPORT_DIR} ${WARNING_FLAGS} ${ARCH_FLAGS}
-+CFLAGS_COMMON = ${PTHREAD_CFLAGS} -DGXX_INCLUDE_PATH=${GXX_INCLUDE_PATH} -fexceptions -I${STLPORT_DIR} ${WARNING_FLAGS} ${ARCH_FLAGS}
-+
-+CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) -O2 -fPIC
-+CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) -O2 -fPIC
-+
-+CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -g -fPIC
-+CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -g -fPIC
-+
-+CXXFLAGS_STLDEBUG_static = $(CXXFLAGS_DEBUG_static) -D_STLP_DEBUG
-+CXXFLAGS_STLDEBUG_dynamic = $(CXXFLAGS_DEBUG_dynamic) -D_STLP_DEBUG
-+
-+CFLAGS_RELEASE_static = $(CFLAGS_COMMON) -O2 -fPIC
-+CFLAGS_RELEASE_dynamic = $(CFLAGS_COMMON) -O2 -fPIC
-+
-+CFLAGS_DEBUG_static = $(CFLAGS_COMMON) -g -fPIC
-+CFLAGS_DEBUG_dynamic = $(CFLAGS_COMMON) -g -fPIC
-+
-+CFLAGS_STLDEBUG_static = $(CFLAGS_DEBUG_static) -D_STLP_DEBUG
-+CFLAGS_STLDEBUG_dynamic = $(CFLAGS_DEBUG_dynamic) -D_STLP_DEBUG
-+
-+include common_percent_rules.mak
-+include common_rules.mak
-+
-+
-+#install: all
-+# cp -p $(LIB_TARGET) ${D_LIB_TARGET} ../lib
-+
-+#%.s: %.cpp
-+# $(CXX) $(CXXFLAGS) -O4 -S -pto $< -o $@
-+
-+
---- misc/STLport-4.5/src/gcc-3.0-mingw.mak 2008-07-18 14:14:26.000000000 +0200
-+++ misc/build/STLport-4.5/src/gcc-3.0-mingw.mak 2008-07-18 14:13:49.000000000 +0200
-@@ -1 +1,108 @@
--dummy
-+#
-+# Note : this makefile is for gcc-3 !
-+#
-+
-+#
-+# compiler
-+# take these from the OOo build environment
-+CC*= gcc
-+CXX*= g++
-+
-+#
-+# Basename for libraries
-+#
-+LIB_BASENAME = libstlport_gcc
-+
-+#
-+# guts for common stuff
-+#
-+#
-+LINK=ar crv
-+DYN_LINK=$(CXX) -fexceptions -shared -o
-+
-+OBJEXT=o
-+DYNEXT=dll
-+STEXT=a
-+RM=rm -rf
-+PATH_SEP=/
-+MKDIR=mkdir -p
-+COMP=MINGW32
-+STATIC_SUFFIX=_static
-+
-+
-+all: all_dynamic debug_dynamic all_static debug_static
-+
-+include common_macros.mak
-+
-+# those are defined "Unix way" in common_macros.mak; redefine them here
-+RELEASE_DYNLIB=$(RELEASE_NAME).$(DYNEXT)
-+DEBUG_DYNLIB=$(DEBUG_NAME).$(DYNEXT)
-+STLDEBUG_DYNLIB=$(STLDEBUG_NAME).$(DYNEXT)
-+
-+RELEASE_DYNLIB_SONAME=$(RELEASE_DYNLIB)
-+DEBUG_DYNLIB_SONAME=$(DEBUG_DYNLIB)
-+STLDEBUG_DYNLIB_SONAME=$(STLDEBUG_DYNLIB)
-+
-+ALL_DYNAMIC_LIBS=$(OUTDIR)$(PATH_SEP)$(RELEASE_DYNLIB) $(OUTDIR)$(PATH_SEP)$(STLDEBUG_DYNLIB)
-+DEBUG_DYNAMIC_LIBS=$(OUTDIR)$(PATH_SEP)$(RELEASE_DYNLIB) $(OUTDIR)$(PATH_SEP)$(STLDEBUG_DYNLIB)
-+
-+RESFILE=$(RELEASE_OBJDIR_dynamic)$(PATH_SEP)stlport.o
-+RESFILE_debug=$(DEBUG_OBJDIR_dynamic)$(PATH_SEP)stlport.o
-+RESFILE_stldebug=$(STLDEBUG_OBJDIR_dynamic)$(PATH_SEP)stlport.o
-+
-+WARNING_FLAGS= -Wall -W -Wno-sign-compare -Wno-unused -Wno-uninitialized
-+
-+CXXFLAGS_COMMON = -mthreads -fexceptions -ftemplate-depth-32 -I${STLPORT_DIR} -DGXX_INCLUDE_PATH=${GXX_INCLUDE_PATH} ${WARNING_FLAGS}
-+CFLAGS_COMMON = -mthreads -fexceptions -I${STLPORT_DIR} -DGXX_INCLUDE_PATH=${GXX_INCLUDE_PATH} ${WARNING_FLAGS}
-+
-+LDFLAGS_COMMON_dynamic+= -enable-runtime-pseudo-reloc -Wl,--export-all-symbols -Wl,-d -mthreads
-+
-+CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) -O2
-+CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) -shared -O2 -D_DLL -D_STLP_USE_DYNAMIC_LIB -D_STLP_DLLEXPORT_NEEDS_PREDECLARATION
-+
-+CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -g
-+CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -shared -g -D_DLL -D_STLP_USE_DYNAMIC_LIB -D_STLP_DLLEXPORT_NEEDS_PREDECLARATION
-+
-+CXXFLAGS_STLDEBUG_static = $(CXXFLAGS_DEBUG_static) -D_STLP_DEBUG
-+CXXFLAGS_STLDEBUG_dynamic = $(CXXFLAGS_DEBUG_dynamic) -D_STLP_DEBUG
-+
-+CFLAGS_RELEASE_static = $(CFLAGS_COMMON) -O2
-+CFLAGS_RELEASE_dynamic = $(CFLAGS_COMMON) -shared -O2 -D_DLL -D_STLP_USE_DYNAMIC_LIB -D_STLP_DLLEXPORT_NEEDS_PREDECLARATION
-+
-+CFLAGS_DEBUG_static = $(CFLAGS_COMMON) -g
-+CFLAGS_DEBUG_dynamic = $(CFLAGS_COMMON) -shared -g -D_DLL -D_STLP_USE_DYNAMIC_LIB -D_STLP_DLLEXPORT_NEEDS_PREDECLARATION
-+
-+CFLAGS_STLDEBUG_static = $(CFLAGS_DEBUG_static) -D_STLP_DEBUG
-+CFLAGS_STLDEBUG_dynamic = $(CFLAGS_DEBUG_dynamic) -D_STLP_DEBUG
-+
-+LDLIBS_RELEASE_dynamic = ${LDLIBS_COMMON_dynamic}
-+LDFLAGS_RELEASE_dynamic = ${CXXFLAGS_RELEASE_dynamic} ${LDFLAGS_COMMON_dynamic} -Wl,-Map,${OUTDIR}/${RELEASE_NAME}.map -Wl,--out-implib,${OUTDIR}/${RELEASE_NAME}.a
-+
-+LDLIBS_DEBUG_dynamic = ${LDLIBS_COMMON_dynamic}
-+LDFLAGS_DEBUG_dynamic = ${CXXFLAGS_DEBUG_dynamic} ${LDFLAGS_COMMON_dynamic} -Wl,-Map,${OUTDIR}/${DEBUG_NAME}.map -Wl,--out-implib,${OUTDIR}/${DEBUG_NAME}.a
-+
-+LDLIBS_STLDEBUG_dynamic = ${LDLIBS_COMMON_dynamic}
-+LDFLAGS_STLDEBUG_dynamic = ${CXXFLAGS_STLDEBUG_dynamic} ${LDFLAGS_COMMON_dynamic} -Wl,-Map,${OUTDIR}/${STLDEBUG_NAME}.map -Wl,--out-implib,${OUTDIR}/${STLDEBUG_NAME}.a
-+
-+
-+include common_percent_rules.mak
-+include common_rules.mak
-+
-+
-+
-+${RESFILE}: stlport.rc
-+ windres -O coff --define COMP=${COMP} --define BUILD= -o $(RELEASE_OBJDIR_dynamic)$(PATH_SEP)stlport.o stlport.rc
-+
-+${RESFILE_debug}: stlport.rc
-+ windres -O coff --define COMP=${COMP} --define BUILD=_DEBUG -o $(DEBUG_OBJDIR_dynamic)$(PATH_SEP)stlport.o stlport.rc
-+
-+${RESFILE_stldebug}: stlport.rc
-+ windres -O coff --define COMP=${COMP} --define BUILD=_STLDEBUG -o $(STLDEBUG_OBJDIR_dynamic)$(PATH_SEP)stlport.o stlport.rc
-+
-+#install: all
-+# cp -p $(LIB_TARGET) ${D_LIB_TARGET} ../lib
-+
-+#%.s: %.cpp
-+# $(CXX) $(CXXFLAGS) -O4 -S -pto $< -o $@
-+
-+
---- misc/STLport-4.5/src/gcc-3.0-os2.def 2008-11-26 12:40:40.000000000 +0100
-+++ misc/build/STLport-4.5/src/gcc-3.0-os2.def 2008-10-10 15:05:36.000000000 +0200
-@@ -1 +1,42 @@
--dummy
-+LIBRARY stlp45 INITINSTANCE TERMINSTANCE
-+DATA MULTIPLE
-+EXPORTS
-+;exports manually added for transex3 project
-+__ZN4_STL15basic_streambufIcNS_11char_traitsIcEEE10_M_xsputncEci
-+__ZN4_STL8numpunctIcE2idE
-+__ZN4_STL15basic_streambufIcNS_11char_traitsIcEEE6xsgetnEPci
-+__ZN4_STL15basic_streambufIcNS_11char_traitsIcEEEC2Ev
-+__ZN4_STL15basic_streambufIcNS_11char_traitsIcEEE8pubimbueERKNS_6localeE
-+__ZN4_STL15basic_streambufIcNS_11char_traitsIcEEE6xsputnEPKci
-+__ZN4_STL15basic_streambufIcNS_11char_traitsIcEEE5uflowEv
-+__ZN4_STL15basic_streambufIcNS_11char_traitsIcEEED2Ev
-+__ZN4_STL7codecvtIcc15__stl_mbstate_tE2idE
-+__ZN4_STL5ctypeIcE2idE
-+__ZN4_STL5_LimGIbE6_D_infE
-+;hwpfilter
-+ __ZN4_STL15basic_streambufIcNS_11char_traitsIcEEE4syncEv
-+ __ZN4_STL15basic_streambufIcNS_11char_traitsIcEEE9showmanycEv
-+ __ZN4_STL15basic_streambufIcNS_11char_traitsIcEEE5imbueERKNS_6localeE
-+;testshl2
-+__ZNK4_STL5ctypeIcE8scan_notENS_10ctype_base4maskEPKcS5_
-+;xml2cmp
-+__ZN4_STL15basic_streambufIcNS_11char_traitsIcEEE13_M_snextc_auxEv
-+__ZNK4_STL5ctypeIcE7scan_isENS_10ctype_base4maskEPKcS5_
-+__ZN4_STL10_UnderflowIcNS_11char_traitsIcEEE7_M_doitEPNS_13basic_filebufIcS2_EE
-+__ZN4_STL13_Filebuf_base12_M_page_sizeE
-+
-+;cppu
-+__ZN4_STL12__node_allocILb1ELi0EE11_M_allocateEj
-+__ZN4_STL12__node_allocILb1ELi0EE13_M_deallocateEPvj
-+__ZN4_STL10_Rb_globalIbE12_M_decrementEPNS_18_Rb_tree_node_baseE
-+__ZN4_STL10_Rb_globalIbE10_RebalanceEPNS_18_Rb_tree_node_baseERS3_
-+__ZN4_STL10_Rb_globalIbE12_M_incrementEPNS_18_Rb_tree_node_baseE
-+__ZN4_STL10_Rb_globalIbE20_Rebalance_for_eraseEPNS_18_Rb_tree_node_baseERS3_S4_S4_
-+
-+;vcl
-+__ZN4_STL12_List_globalIbE9_TransferEPNS_15_List_node_baseES3_S3_
-+
-+;comphelper
-+__ZTVN4_STL13runtime_errorE
-+;sw
-+__ZN4_STL10_Sl_globalIbE10__previousEPNS_16_Slist_node_baseEPKS2_
---- misc/STLport-4.5/src/gcc-3.0-os2.mak 2008-11-26 12:40:40.000000000 +0100
-+++ misc/build/STLport-4.5/src/gcc-3.0-os2.mak 2008-11-03 15:56:24.000000000 +0100
-@@ -1 +1,79 @@
--dummy
-+#
-+# Note : this makefile is for gcc-3 !
-+#
-+
-+#
-+# compiler
-+# take these from the OOo build environment
-+CC*= gcc
-+CXX*= g++
-+
-+#
-+# Basename for libraries
-+#
-+LIB_BASENAME = stlp
-+STATIC_SUFFIX=_s
-+
-+#
-+# guts for common stuff
-+#
-+#
-+LINK=emxomfar cr
-+DYN_LINK=$(CXX) -g -Zlinker "DISABLE 1121" -Zomf -Zmap -Zhigh-mem -Zdll gcc-3.0-os2.def -o
-+
-+OBJEXT=o
-+DYNEXT=so
-+DYNEXT=dll
-+STEXT=a
-+RM=rm -rf
-+PATH_SEP=/
-+MKDIR=mkdir -p
-+COMP=GCC$(ARCH)
-+INSTALL_STEP = install_unix
-+LN_S = cp
-+LDLIBS_RELEASE_dynamic = -lstdc444 -lgcc_eh
-+LDLIBS_RELEASE_static = -lstdc444 -lgcc_eh
-+
-+#all_static symbolic_links
-+all: all_dynamic all_import
-+
-+include common_macros.mak
-+include common_macros_os2.mak
-+
-+WARNING_FLAGS= -Wall -W -Wno-sign-compare -Wno-unused -Wno-uninitialized -ftemplate-depth-32
-+
-+CXXFLAGS_COMMON = -Zomf -D_REENTRANT -DGXX_INCLUDE_PATH=${GXX_INCLUDE_PATH} -fexceptions -I${STLPORT_DIR} ${WARNING_FLAGS} ${ARCH_FLAGS}
-+CFLAGS_COMMON = -Zomf -D_REENTRANT -DGXX_INCLUDE_PATH=${GXX_INCLUDE_PATH} -fexceptions -I${STLPORT_DIR} ${WARNING_FLAGS} ${ARCH_FLAGS}
-+
-+CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) -g -DOS2 -DSTL_OS2_BUILDING -O3 -march=pentium -mtune=pentium4
-+CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) -g -DOS2 -DSTL_OS2_BUILDING -O3 -march=pentium -mtune=pentium4
-+
-+CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -g
-+CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -g
-+
-+CXXFLAGS_STLDEBUG_static = $(CXXFLAGS_DEBUG_static) -D_STLP_DEBUG
-+CXXFLAGS_STLDEBUG_dynamic = $(CXXFLAGS_DEBUG_dynamic) -D_STLP_DEBUG
-+
-+CFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) -DSTL_OS2_BUILDING -O3 -march=pentium -mtune=pentium4
-+CFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) -DSTL_OS2_BUILDING -O3 -march=pentium -mtune=pentium4
-+
-+CFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -g
-+CFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -g
-+
-+CFLAGS_STLDEBUG_static = $(CXXFLAGS_DEBUG_static) -D_STLP_DEBUG
-+CFLAGS_STLDEBUG_dynamic = $(CXXFLAGS_DEBUG_dynamic) -D_STLP_DEBUG
-+
-+include common_percent_rules.mak
-+include common_rules.mak
-+
-+all_import:
-+ emximp -o ..\lib\$(RELEASE_NAME)$(DYNAMIC_SUFFIX).a ..\lib\$(RELEASE_NAME)$(DYNAMIC_SUFFIX).$(DYNEXT)
-+ emximp -o ..\lib\$(RELEASE_NAME)$(DYNAMIC_SUFFIX).lib ..\lib\$(RELEASE_NAME)$(DYNAMIC_SUFFIX).$(DYNEXT)
-+
-+#install: all
-+# cp -p $(LIB_TARGET) ${D_LIB_TARGET} ../lib
-+
-+#%.s: %.cpp
-+# $(CXX) $(CXXFLAGS) -O4 -S -pto $< -o $@
-+
-+
---- misc/STLport-4.5/src/gcc-3.0.mak 2008-07-18 14:14:26.000000000 +0200
-+++ misc/build/STLport-4.5/src/gcc-3.0.mak 2008-07-18 14:13:49.000000000 +0200
-@@ -1 +1,69 @@
--dummy
-+#
-+# Note : this makefile is for gcc-3 !
-+#
-+
-+#
-+# compiler
-+# take these from the OOo build environment
-+CC*= gcc
-+CXX*= g++
-+
-+#
-+# Basename for libraries
-+#
-+LIB_BASENAME = libstlport_gcc
-+
-+#
-+# guts for common stuff
-+#
-+#
-+LINK=ar cr
-+DYN_LINK=$(CXX) -Wl,-rpath,'$$ORIGIN' -fexceptions -shared -o
-+
-+OBJEXT=o
-+DYNEXT=so
-+STEXT=a
-+RM=rm -rf
-+PATH_SEP=/
-+MKDIR=mkdir -p
-+COMP=GCC$(ARCH)
-+INSTALL_STEP = install_unix
-+
-+all: all_dynamic all_static symbolic_links
-+
-+include common_macros.mak
-+
-+WARNING_FLAGS= -Wall -W -Wno-sign-compare -Wno-unused -Wno-uninitialized
-+
-+CXXFLAGS_COMMON = -D_REENTRANT -DGXX_INCLUDE_PATH=${GXX_INCLUDE_PATH} -fexceptions -ftemplate-depth-32 -I${STLPORT_DIR} ${WARNING_FLAGS} ${ARCH_FLAGS}
-+CFLAGS_COMMON = -D_REENTRANT -DGXX_INCLUDE_PATH=${GXX_INCLUDE_PATH} -fexceptions -I${STLPORT_DIR} ${WARNING_FLAGS} ${ARCH_FLAGS}
-+
-+CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) -O2 -fPIC
-+CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) -O2 -fPIC
-+
-+CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -g -fPIC
-+CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -g -fPIC
-+
-+CXXFLAGS_STLDEBUG_static = $(CXXFLAGS_DEBUG_static) -D_STLP_DEBUG
-+CXXFLAGS_STLDEBUG_dynamic = $(CXXFLAGS_DEBUG_dynamic) -D_STLP_DEBUG
-+
-+CFLAGS_RELEASE_static = $(CFLAGS_COMMON) -O2 -fPIC
-+CFLAGS_RELEASE_dynamic = $(CFLAGS_COMMON) -O2 -fPIC
-+
-+CFLAGS_DEBUG_static = $(CFLAGS_COMMON) -g -fPIC
-+CFLAGS_DEBUG_dynamic = $(CFLAGS_COMMON) -g -fPIC
-+
-+CFLAGS_STLDEBUG_static = $(CFLAGS_DEBUG_static) -D_STLP_DEBUG
-+CFLAGS_STLDEBUG_dynamic = $(CFLAGS_DEBUG_dynamic) -D_STLP_DEBUG
-+
-+include common_percent_rules.mak
-+include common_rules.mak
-+
-+
-+#install: all
-+# cp -p $(LIB_TARGET) ${D_LIB_TARGET} ../lib
-+
-+#%.s: %.cpp
-+# $(CXX) $(CXXFLAGS) -O4 -S -pto $< -o $@
-+
-+
---- misc/STLport-4.5/src/gcc-freebsd.mak 2001-07-29 05:36:25.000000000 +0200
-+++ misc/build/STLport-4.5/src/gcc-freebsd.mak 2008-07-18 14:13:49.000000000 +0200
-@@ -5,8 +5,8 @@
- #
- # compiler
- #
--CC = gcc -pthread
--CXX = c++ -pthread -fexceptions
-+CC+= ${PTHREAD_CFLAGS} -D_REENTRANT
-+CXX+= ${PTHREAD_CFLAGS} -D_REENTRANT -fexceptions
-
- #
- # Basename for libraries
-@@ -19,7 +19,7 @@
- #
- LINK=ar cr
- # 2.95 flag
--DYN_LINK=c++ -pthread -fexceptions -shared -o
-+DYN_LINK=${CXX} ${PTHREAD_LIBS} -fexceptions -shared -o
-
- OBJEXT=o
- DYNEXT=so
-@@ -39,10 +39,10 @@
-
- WARNING_FLAGS= -Wall -W -Wno-sign-compare -Wno-unused -Wno-uninitialized -ftemplate-depth-32
-
--CXXFLAGS_COMMON = -I${STLPORT_DIR} ${WARNING_FLAGS}
-+CXXFLAGS_COMMON = -I${STLPORT_DIR} -DGXX_INCLUDE_PATH=${GXX_INCLUDE_PATH} ${WARNING_FLAGS} ${ARCH_FLAGS}
-
--CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) -O2
--CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) -O2 -fPIC
-+CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) ${CXXFLAGS}
-+CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) ${CXXFLAGS} -fPIC
-
- CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -g
- CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -g -fPIC
---- misc/STLport-4.5/stlport/config/stl_gcc.h 2001-09-04 19:10:16.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/config/stl_gcc.h 2008-11-14 17:23:02.000000000 +0100
-@@ -7,7 +7,9 @@
- # define _STLP_USE_GLIBC
- #endif
-
-+# if (__GNUC_MINOR__ < 4) && (__GNUC__ == 3)
- # define _STLP_NO_MEMBER_TEMPLATE_KEYWORD
-+# endif
-
- # if defined(__FreeBSD__) || defined (__hpux)
- # define _STLP_NO_WCHAR_T
-@@ -51,13 +53,42 @@
- # define _STLP_CLASS_EXPORT_DECLSPEC __attribute__((dllexport))
- # define _STLP_CALL
-
--# if defined (_STLP_USE_DYNAMIC_LIB)
--# define _STLP_USE_DECLSPEC 1
--# define _STLP_USE_TEMPLATE_EXPORT 1
--# endif
-+# if !defined (_STLP_NO_OWN_IOSTREAMS)
-+
-+# if ( defined (__DLL) || defined (_DLL) || defined (_WINDLL) || defined (_RTLDLL) \
-+ || defined(_AFXDLL) || defined (_STLP_USE_DYNAMIC_LIB) ) \
-+ && ! defined (_STLP_USE_STATIC_LIB)
-+# undef _STLP_USE_DECLSPEC
-+# define _STLP_USE_DECLSPEC 1
-+/* Using dynamic library in MinGW requires _STLP_NO_CUSTOM_IO */
-+# define _STLP_NO_CUSTOM_IO
-+# endif
-+
-+# ifndef _STLP_IMPORT_TEMPLATE_KEYWORD
-+# define _STLP_IMPORT_TEMPLATE_KEYWORD extern
-+# endif
-+# define _STLP_EXPORT_TEMPLATE_KEYWORD
-+
-+# endif /* _STLP_OWN_IOSTREAMS */
-
- # endif
-
-+# if defined(__EMX__)
-+# define _STLP_EXPORT_DECLSPEC __declspec(dllexport)
-+# define _STLP_IMPORT_DECLSPEC __declspec(dllimport)
-+# define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport)
-+# define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport)
-+# define _STLP_CALL
-+//YD 29/03/2006 disable automatic export (generate too many exports/imports)
-+//YD 13/04/2006 back again
-+//# define _STLP_EXPORT_DECLSPEC
-+//# define _STLP_IMPORT_DECLSPEC
-+//# define _STLP_CLASS_IMPORT_DECLSPEC
-+//# define _STLP_CLASS_EXPORT_DECLSPEC
-+//# define _STLP_CALL
-+# define _STLP_USE_DECLSPEC 1
-+# endif
-+
- #if (defined(__linux__) /* && ! defined (_GNU_SOURCE) */ ) || \
- defined (__CYGWIN__) || defined (__MINGW32__) || !(defined (_STLP_USE_GLIBC) || defined (__sun))
- # define _STLP_NO_NATIVE_MBSTATE_T 1
-@@ -226,8 +257,45 @@
-
- # if (__GNUC__ >= 3)
-
--# define _STLP_NATIVE_INCLUDE_PATH ../g++-v3
--# define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH ../g++-v3/backward
-+/* properly determine the STLP_NATIVE_INCLUDE_PATH */
-+#ifdef i386
-+#undef i386
-+#define i386 i386
-+#endif
-+
-+#ifdef linux
-+#undef linux
-+#define linux linux
-+#endif
-+
-+#ifdef mips
-+#undef mips
-+#define mips mips
-+#endif
-+
-+#ifdef sgi
-+#undef sgi
-+#define sgi sgi
-+#endif
-+
-+#ifdef sun
-+#undef sun
-+#define sun sun
-+#endif
-+
-+#ifdef sparc
-+#undef sparc
-+#define sparc sparc
-+#endif
-+
-+#ifdef powerpc
-+#undef powerpc
-+#define powerpc powerpc
-+#endif
-+
-+# define _STLP_NATIVE_INCLUDE_PATH GXX_INCLUDE_PATH
-+# define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH \
-+ GXX_INCLUDE_PATH/backward
-
- # elif (__GNUC_MINOR__ < 8)
-
-@@ -312,6 +380,7 @@
- # define _STLP_STATIC_TEMPLATE_DATA 1
- # endif
-
--
--
--
-+#if defined(__sun__) && defined(__GNUC__)
-+# undef _STLP_HAS_NATIVE_FLOAT_ABS
-+# define _STLP_VENDOR_GLOBAL_CSTD 1
-+#endif
---- misc/STLport-4.5/stlport/cwchar 2001-01-27 02:39:42.000000000 +0100
-+++ misc/build/STLport-4.5/stlport/cwchar 2008-07-18 14:13:49.000000000 +0200
-@@ -21,6 +21,9 @@
- # include <stl/_prolog.h>
- # endif
-
-+#ifdef __FreeBSD__
-+#include _STLP_NATIVE_C_HEADER(wchar.h)
-+#endif
- # include <stl/_cwchar.h>
-
- # if (_STLP_OUTERMOST_HEADER_ID == 0x120)
---- misc/STLport-4.5/stlport/stdexcept 2001-05-22 02:50:21.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stdexcept 2008-07-18 14:13:49.000000000 +0200
-@@ -49,6 +49,13 @@
-
- _STLP_BEGIN_NAMESPACE
-
-+
-+#if defined( __GNUC__)
-+#undef _STLP_NOTHROW_INHERENTLY
-+#define _STLP_NOTHROW_INHERENTLY throw()
-+#endif
-+
-+
- class _STLP_CLASS_DECLSPEC __Named_exception : public _STLP_EXCEPTION_BASE {
- public:
- __Named_exception(const string& __str)
---- misc/STLport-4.5/stlport/stl/_bvector.h 2001-05-30 05:45:41.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stl/_bvector.h 2008-07-18 14:13:49.000000000 +0200
-@@ -34,7 +34,9 @@
- # include <stl/_vector.h>
- # endif
-
-+#ifndef __WORD_BIT
- #define __WORD_BIT (int(CHAR_BIT*sizeof(unsigned int)))
-+#endif
-
- _STLP_BEGIN_NAMESPACE
-
---- misc/STLport-4.5/stlport/stl/_complex.h 2001-07-06 06:16:17.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stl/_complex.h 2008-07-18 14:13:49.000000000 +0200
-@@ -18,6 +18,10 @@
- #ifndef _STLP_internal_complex_h
- #define _STLP_internal_complex_h
-
-+#if defined __GNUC__
-+#pragma GCC system_header
-+#endif
-+
- // This header declares the template class complex, as described in
- // in the draft C++ standard. Single-precision complex numbers
- // are complex<float>, double-precision are complex<double>, and
---- misc/STLport-4.5/stlport/stl/_config.h 2001-09-04 19:10:18.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stl/_config.h 2008-07-18 14:14:05.000000000 +0200
-@@ -938,7 +938,7 @@
-
- # define _STLP_EXPORT_TEMPLATE_CLASS _STLP_EXPORT template class _STLP_CLASS_DECLSPEC
-
--# if defined (_STLP_MSVC) || defined (__ICL)
-+# if defined (_STLP_MSVC) || defined (__ICL) || defined (__EMX__)
- # define _STLP_STATIC_MEMBER_DECLSPEC
- # else
- # define _STLP_STATIC_MEMBER_DECLSPEC _STLP_DECLSPEC
---- misc/STLport-4.5/stlport/stl/_fstream.h 2001-05-29 01:29:41.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stl/_fstream.h 2008-07-18 14:14:05.000000000 +0200
-@@ -45,7 +45,7 @@
- #if !defined (_STLP_USE_UNIX_IO) && !defined(_STLP_USE_WIN32_IO) \
- && ! defined (_STLP_USE_UNIX_EMULATION_IO) && !defined (_STLP_USE_STDIO_IO)
-
--# if defined (_STLP_UNIX) || defined (__CYGWIN__)
-+# if defined (_STLP_UNIX) || defined (__CYGWIN__) || defined (__EMX__)
- // open/close/read/write
- # define _STLP_USE_UNIX_IO
- # elif defined (_STLP_WIN32) && ! defined (__CYGWIN__)
-@@ -107,7 +107,7 @@
- streamoff _M_get_offset(char* __first, char* __last) {
- #if defined (_STLP_UNIX) || defined (_STLP_MAC)
- return __last - __first;
--#else // defined (_STLP_WIN32) || defined (_STLP_WIN16) || defined (_STLP_DOS)
-+#else // defined (_STLP_WIN32) || defined (_STLP_WIN16) || defined (_STLP_DOS) || defined (__EMX__)
- return ( (_M_openmode & ios_base::binary) != 0 )
- ? (__last - __first)
- : count(__first, __last, '\n') + (__last - __first);
-@@ -119,7 +119,7 @@
- bool _M_in_binary_mode() const {
- # if defined (_STLP_UNIX) || defined (_STLP_MAC) || defined(__BEOS__)
- return true;
--# elif defined (_STLP_WIN32) || defined (_STLP_WIN16) || defined (_STLP_DOS) || defined (_STLP_VM)
-+# elif defined (_STLP_WIN32) || defined (_STLP_WIN16) || defined (_STLP_DOS) || defined (_STLP_VM) || defined (__EMX__)
- return (_M_openmode & ios_base::binary) != 0;
- # else
- # error "Port!"
---- misc/STLport-4.5/stlport/stl/_ios_base.h 2001-09-04 19:10:18.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stl/_ios_base.h 2008-07-18 14:13:49.000000000 +0200
-@@ -291,7 +291,7 @@
- template <class Facet>
- locale::facet* _M_get_facet(ios_base& __i, Facet*)
- {
--
-+ return NULL;
- }
-
- // ----------------------------------------------------------------------
---- misc/STLport-4.5/stlport/stl/_rope.h 2001-08-06 04:21:25.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stl/_rope.h 2008-07-18 14:13:49.000000000 +0200
-@@ -1470,7 +1470,7 @@
- rope<_CharT,_Alloc> __remainder_rope;
-
- // gcc-2.7.2 bugs
-- typedef _Rope_Concat_fn<_CharT,_Alloc> _Concat_fn;
-+ typedef _Rope_Concat_fn<_CharT,_Alloc> __Concat_fn;
-
- if (0 == __n)
- return;
-@@ -1510,7 +1510,7 @@
- // One each for base_rope and __result
- # endif
- } else {
-- __result = power(__base_rope, __exponent, _Concat_fn());
-+ __result = power(__base_rope, __exponent, __Concat_fn());
- }
- if (0 != __remainder) {
- __result += __remainder_rope;
---- misc/STLport-4.5/stlport/stl/_stdio_file.h 2001-03-19 08:01:09.000000000 +0100
-+++ misc/build/STLport-4.5/stlport/stl/_stdio_file.h 2008-07-18 14:14:05.000000000 +0200
-@@ -154,8 +154,45 @@
-
- # define _STLP_FILE_I_O_IDENTICAL
-
-+#elif defined(__EMX__)
-+
-+inline int _FILE_fd(const FILE& __f) { return __f._handle; }
-+inline char* _FILE_I_begin(const FILE& __f) { return (char*) __f._buffer; }
-+inline char* _FILE_I_next(const FILE& __f) { return (char*) __f._ptr; }
-+inline char* _FILE_I_end(const FILE& __f) { return (char *) __f._ptr + __f._rcount; }
-+inline ptrdiff_t _FILE_I_avail(const FILE& __f) { return __f._rcount; }
-+inline char& _FILE_I_preincr(FILE& __f) { --__f._rcount; return *(char*) (++__f._ptr); }
-+inline char& _FILE_I_postincr(FILE& __f) { --__f._rcount; return *(char*) (__f._ptr++); }
-+inline char& _FILE_I_predecr(FILE& __f) { ++__f._rcount; return *(char*) (--__f._ptr); }
-+inline char& _FILE_I_postdecr(FILE& __f) { ++__f._rcount; return *(char*) (__f._ptr--); }
-+inline void _FILE_I_bump(FILE& __f, int __n) { __f._ptr += __n; __f._rcount -= __n; }
-+inline void _FILE_I_set(FILE& __f, char* __begin, char* __next, char* __end) {
-+ __f._buffer = __begin;
-+ __f._ptr = __next;
-+ __f._rcount = __end - __next;
-+}
-+
-+inline char* _FILE_O_begin(const FILE& __f) { return (char*) __f._buffer; }
-+inline char* _FILE_O_next(const FILE& __f) { return (char*) __f._ptr; }
-+inline char* _FILE_O_end(const FILE& __f) { return (char*) __f._ptr + __f._wcount; }
-+inline ptrdiff_t _FILE_O_avail(const FILE& __f) { return __f._wcount; }
-+inline char& _FILE_O_preincr(FILE& __f) { --__f._wcount; return *(char*) (++__f._ptr); }
-+inline char& _FILE_O_postincr(FILE& __f) { --__f._wcount; return *(char*) (__f._ptr++); }
-+inline char& _FILE_O_predecr(FILE& __f) { ++__f._wcount; return *(char*) (--__f._ptr); }
-+inline char& _FILE_O_postdecr(FILE& __f) { ++__f._wcount; return *(char*) (__f._ptr--); }
-+inline void _FILE_O_bump(FILE& __f, int __n) { __f._ptr += __n; __f._wcount -= __n; }
-+inline void _FILE_O_set(FILE& __f, char* __begin, char* __next, char* __end) {
-+ __f._buffer = __begin;
-+ __f._ptr = __next;
-+ __f._wcount = __end - __next;
-+}
-+
-+
-+# undef _STLP_FILE_I_O_IDENTICAL
-+
- #elif defined (__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) || ( defined(__GNUC__) && defined(__APPLE__) )
-
-+#include <stdio.h>
- # if 0
- inline int _FILE_fd(const FILE& __f) { return __f._file; }
- inline char* _FILE_I_begin(const FILE& __f) { return (char*) __f._bf._base; }
---- misc/STLport-4.5/stlport/stl/_threads.h 2001-09-04 19:10:20.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stl/_threads.h 2008-07-18 14:14:05.000000000 +0200
-@@ -164,6 +164,15 @@
- #include <stdio.h>
- # define _STLP_MUTEX_INITIALIZER = { 0 }
- #elif defined(_STLP_OS2THREADS)
-+
-+#define INCL_DOSSEMAPHORES
-+#ifndef STL_OS2_BUILDING
-+#include <svpm.h>
-+#else
-+#include <os2.h>
-+#endif
-+
-+#if 0 // YD
- // This section serves to replace os2.h for VisualAge C++
- typedef unsigned long ULONG;
- #ifndef __HEV__ /* INCL_SEMAPHORE may also define HEV */
-@@ -181,6 +190,8 @@
- APIRET _System DosRequestMutexSem(HMTX hmtx, ULONG ulTimeout);
- APIRET _System DosReleaseMutexSem(HMTX hmtx);
- APIRET _System DosCloseMutexSem(HMTX hmtx);
-+#endif
-+
- # define _STLP_MUTEX_INITIALIZER = { 0 };
-
- # endif
-@@ -296,7 +307,7 @@
- inline void _M_destroy() { DosCloseMutexSem(_M_lock); }
- inline void _M_acquire_lock() {
- if(!_M_lock) _M_initialize();
-- DosRequestMutexSem(_M_lock, -1);
-+ DosRequestMutexSem(_M_lock, ((ULONG)-1));
- }
- inline void _M_release_lock() { DosReleaseMutexSem(_M_lock); }
- #elif defined(_STLP_BETHREADS)
-@@ -372,7 +383,7 @@
- }
- inline void _M_acquire_lock() {
- if(!_M_lock) _M_initialize();
-- DosRequestMutexSem(*(HMTX*)_M_lock, -1);
-+ DosRequestMutexSem(*(HMTX*)_M_lock, ((ULONG)-1));
- }
- inline void _M_release_lock() { DosReleaseMutexSem(*(HMTX*)_M_lock); }
- # else /* No threads */
---- misc/STLport-4.5/stlport/stl/_tree.c 2001-08-25 03:14:30.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stl/_tree.c 2008-12-02 17:14:29.035425872 +0100
-@@ -404,10 +404,12 @@
- }
- iterator __j = iterator(__y);
- if (__comp)
-+ {
- if (__j == begin())
- return pair<iterator,bool>(_M_insert(__x, __y, __v), true);
- else
- --__j;
-+ }
- if (_M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v)))
- return pair<iterator,bool>(_M_insert(__x, __y, __v), true);
- return pair<iterator,bool>(__j, false);
---- misc/STLport-4.5/stlport/stl/_valarray.h 2001-05-30 05:45:42.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stl/_valarray.h 2008-07-18 14:13:49.000000000 +0200
-@@ -19,6 +19,10 @@
- #ifndef _STLP_VALARRAY_H
- #define _STLP_VALARRAY_H
-
-+#if defined __GNUC__
-+#pragma GCC system_header
-+#endif
-+
- #ifndef _STLP_CMATH
- #include <cmath>
- #endif
---- misc/STLport-4.5/stlport/stl/c_locale.h 2001-05-31 05:24:41.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stl/c_locale.h 2008-07-18 14:14:05.000000000 +0200
-@@ -167,6 +167,18 @@
- # define _Locale_ALPHA (_Locale_UPPER | _Locale_LOWER)
- # define _Locale_PRINT (_Locale_ALPHA | _Locale_DIGIT | _Locale_PUNCT | 0200 )
-
-+# elif defined (__EMX__) // YD
-+
-+# define _Locale_CNTRL __CT_CNTRL
-+# define _Locale_UPPER __CT_UPPER
-+# define _Locale_LOWER __CT_LOWER
-+# define _Locale_DIGIT __CT_DIGIT
-+# define _Locale_XDIGIT __CT_XDIGIT
-+# define _Locale_PUNCT __CT_PUNCT
-+# define _Locale_SPACE __CT_SPACE
-+# define _Locale_PRINT __CT_PRINT
-+# define _Locale_ALPHA __CT_ALPHA
-+
- # elif defined (__FreeBSD__)
-
- # define _Locale_CNTRL _CTYPE_C
---- misc/STLport-4.5/stlport/stl/_iosfwd.h 2001-03-28 03:19:00.000000000 +0200
-+++ misc/build/STLport-4.5/stlport/stl/_iosfwd.h 2011-11-15 18:03:16.000000000 +0100
-@@ -100,21 +100,39 @@
- template <class _CharT> class collate;
- template <class _CharT> class collate_byname;
-
-+#ifdef OS2
-+_STLP_TEMPLATE_NULL class ctype<char>;
-+_STLP_TEMPLATE_NULL class ctype_byname<char>;
-+_STLP_TEMPLATE_NULL class collate<char>;
-+_STLP_TEMPLATE_NULL class collate_byname<char>;
-+#else
- _STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC ctype<char>;
- _STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC ctype_byname<char>;
- _STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC collate<char>;
- _STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC collate_byname<char>;
-+#endif
-
- # ifndef _STLP_NO_WCHAR_T
-+#ifdef OS2
-+_STLP_TEMPLATE_NULL class ctype<wchar_t>;
-+_STLP_TEMPLATE_NULL class ctype_byname<wchar_t>;
-+_STLP_TEMPLATE_NULL class collate<wchar_t>;
-+_STLP_TEMPLATE_NULL class collate_byname<wchar_t>;
-+#else
- _STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC ctype<wchar_t>;
- _STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC ctype_byname<wchar_t>;
- _STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC collate<wchar_t>;
- _STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC collate_byname<wchar_t>;
-+#endif
- # endif
-
- # if !(defined (__SUNPRO_CC) && __SUNPRO_CC < 0x500 )
- // Typedefs for ordinary (narrow-character) streams.
-+#ifdef OS2
-+_STLP_TEMPLATE_NULL class basic_streambuf<char, char_traits<char> >;
-+#else
- _STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC basic_streambuf<char, char_traits<char> >;
-+#endif
- # endif
-
- typedef basic_istream<char, char_traits<char> > istream;
diff --git a/stlport/dos_lineends.patch b/stlport/dos_lineends.patch
deleted file mode 100644
index 572c158c4290..000000000000
--- a/stlport/dos_lineends.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-*** ./unxsols3.pro/misc/STLport-4.0/src/vc_common.mak Fri Jul 14 03:53:26 2000
---- build/unxsols3.pro/STLport-4.0/src/vc_common.mak Fri Oct 5 15:34:10 2001
-***************
-*** 42,48 ****
-
-
- LDFLAGS_COMMON_static=/nologo /machine:I386
-! LDFLAGS_COMMON_dynamic=/nologo /dll /incremental:no /machine:I386
-
- CXXFLAGS_DEBUG_static=$(FLAGS_COMMON_static) /MTd /Zi /Yd /Gm /Od /D "_DEBUG" /Fo"$(DEBUG_OBJDIR_static)\\" /Fd"$(DEBUG_OBJDIR_static)\\" /YXstlport_prefix.h /Fp$(DEBUG_OBJDIR_static)\stlport.pch /c
-
---- 42,48 ----
-
-
- LDFLAGS_COMMON_static=/nologo /machine:I386
-! LDFLAGS_COMMON_dynamic=/nologo /nodefaultlib oldnames.lib kernel32.lib /dll /incremental:no /machine:I386
-
- CXXFLAGS_DEBUG_static=$(FLAGS_COMMON_static) /MTd /Zi /Yd /Gm /Od /D "_DEBUG" /Fo"$(DEBUG_OBJDIR_static)\\" /Fd"$(DEBUG_OBJDIR_static)\\" /YXstlport_prefix.h /Fp$(DEBUG_OBJDIR_static)\stlport.pch /c
-
-***************
-*** 53,62 ****
- CXXFLAGS_STLDEBUG_dynamic=$(FLAGS_COMMON_dynamic) /MDd /Zi /Yd /Gm /Od /D "_DEBUG" /D "__STL_DEBUG" /Fo"$(STLDEBUG_OBJDIR_dynamic)\\" /Fd"$(STLDEBUG_OBJDIR_dynamic)\\" /YXstlport_prefix.h /Fp$(STLDEBUG_OBJDIR_dynamic)\stlport.pch /c
-
- LDFLAGS_DEBUG_static=$(LDFLAGS_COMMON_static) /NODEFAULTLIB:MTD /DEBUGTYPE:CV
-! LDFLAGS_DEBUG_dynamic=$(LDFLAGS_COMMON_dynamic) /DEBUG /DEBUGTYPE:CV /implib:"$(OUTDIR)\$(DEBUG_NAME).$(STEXT)"
-
- LDFLAGS_STLDEBUG_static=$(LDFLAGS_COMMON_static) /NODEFAULTLIB:MTD /DEBUGTYPE:CV
-! LDFLAGS_STLDEBUG_dynamic=$(LDFLAGS_COMMON_dynamic) /DEBUG /DEBUGTYPE:CV /implib:"$(OUTDIR)\$(STLDEBUG_NAME).$(STEXT)"
-
- CXXFLAGS_RELEASE_static=$(FLAGS_COMMON_static) /O2 /MT /D "NDEBUG" /Fo"$(RELEASE_OBJDIR_static)\\" /Fd"$(RELEASE_OBJDIR_static)\\" /YXstlport_prefix.h /Fp$(RELEASE_OBJDIR_static)\stlport.pch /c
-
---- 53,62 ----
- CXXFLAGS_STLDEBUG_dynamic=$(FLAGS_COMMON_dynamic) /MDd /Zi /Yd /Gm /Od /D "_DEBUG" /D "__STL_DEBUG" /Fo"$(STLDEBUG_OBJDIR_dynamic)\\" /Fd"$(STLDEBUG_OBJDIR_dynamic)\\" /YXstlport_prefix.h /Fp$(STLDEBUG_OBJDIR_dynamic)\stlport.pch /c
-
- LDFLAGS_DEBUG_static=$(LDFLAGS_COMMON_static) /NODEFAULTLIB:MTD /DEBUGTYPE:CV
-! LDFLAGS_DEBUG_dynamic=$(LDFLAGS_COMMON_dynamic) msvcrtd.lib /DEBUG /DEBUGTYPE:CV /implib:"$(OUTDIR)\$(DEBUG_NAME).$(STEXT)"
-
- LDFLAGS_STLDEBUG_static=$(LDFLAGS_COMMON_static) /NODEFAULTLIB:MTD /DEBUGTYPE:CV
-! LDFLAGS_STLDEBUG_dynamic=$(LDFLAGS_COMMON_dynamic) msvcrtd.lib /DEBUG /DEBUGTYPE:CV /implib:"$(OUTDIR)\$(STLDEBUG_NAME).$(STEXT)"
-
- CXXFLAGS_RELEASE_static=$(FLAGS_COMMON_static) /O2 /MT /D "NDEBUG" /Fo"$(RELEASE_OBJDIR_static)\\" /Fd"$(RELEASE_OBJDIR_static)\\" /YXstlport_prefix.h /Fp$(RELEASE_OBJDIR_static)\stlport.pch /c
-
-***************
-*** 63,69 ****
- CXXFLAGS_RELEASE_dynamic=$(FLAGS_COMMON_dynamic) /O2 /MD /D "NDEBUG" /Fo"$(RELEASE_OBJDIR_dynamic)\\" /Fd"$(RELEASE_OBJDIR_dynamic)\\" /YXstlport_prefix.h /Fp$(RELEASE_OBJDIR_dynamic)\stlport.pch /c
-
- LDFLAGS_RELEASE_static=$(LDFLAGS_COMMON_static)
-! LDFLAGS_RELEASE_dynamic=$(LDFLAGS_COMMON_dynamic) /implib:"$(OUTDIR)\$(RELEASE_NAME).$(STEXT)"
-
- RESFILE=$(RELEASE_OBJDIR_dynamic)$(PATH_SEP)stlport.res
- RESFILE_debug=$(DEBUG_OBJDIR_dynamic)$(PATH_SEP)stlport.res
---- 63,69 ----
- CXXFLAGS_RELEASE_dynamic=$(FLAGS_COMMON_dynamic) /O2 /MD /D "NDEBUG" /Fo"$(RELEASE_OBJDIR_dynamic)\\" /Fd"$(RELEASE_OBJDIR_dynamic)\\" /YXstlport_prefix.h /Fp$(RELEASE_OBJDIR_dynamic)\stlport.pch /c
-
- LDFLAGS_RELEASE_static=$(LDFLAGS_COMMON_static)
-! LDFLAGS_RELEASE_dynamic=$(LDFLAGS_COMMON_dynamic) msvcrt.lib /implib:"$(OUTDIR)\$(RELEASE_NAME).$(STEXT)"
-
- RESFILE=$(RELEASE_OBJDIR_dynamic)$(PATH_SEP)stlport.res
- RESFILE_debug=$(DEBUG_OBJDIR_dynamic)$(PATH_SEP)stlport.res
-
diff --git a/stlport/makefile.mk b/stlport/makefile.mk
index deb441e39284..aac984e99623 100644
--- a/stlport/makefile.mk
+++ b/stlport/makefile.mk
@@ -30,17 +30,7 @@ TARGET=so_stlport
.INCLUDE : settings.mk
-.IF "$(USE_SYSTEM_STL)"=="YES"
-
-.IF "$(OS)"=="SOLARIS" && "$(COM)"!="GCC"
-# System STL when building with SunStudio is just a version of STLport
-# which comes with the compiler
-all:
- @echo "Nothing to do"
-.ELSE #"$(OS)"=="SOLARIS" && "$(COM)"!="GCC"
-#
-# If you choose to build without stlport, some headers will be used to bring the
-# sgi extensions into the std namespace:
+# Wrap STL headers to get them into the std namespace:
$(INCCOM)$/stlport$/functional \
$(INCCOM)$/stlport$/hash_map \
$(INCCOM)$/stlport$/hash_set \
@@ -52,156 +42,4 @@ $(INCCOM)$/stlport$/set \
$(INCCOM)$/stlport$/vector: systemstl$/$$(@:f)
$(MKDIRHIER) $(@:d)
$(COPY) $< $@
-.ENDIF #"$(OS)"=="SOLARIS" && "$(COM)"!="GCC"
-
-.ELSE # "$(USE_SYSTEM_STL)"
-
-# --- Files --------------------------------------------------------
-.EXPORT : CC CXX
-.IF "$(COMID)"=="gcc3"
- TARFILE_NAME=STLport-4.5
- TARFILE_MD5=18f577b374d60b3c760a3a3350407632
- PATCH_FILES=STLport-4.5.patch STLport-4.5-gcc43_warnings.patch
-.ELIF "$(GUI)"=="WNT"
- TARFILE_NAME=STLport-4.5-0119
- TARFILE_MD5=7376930b0d3f3d77a685d94c4a3acda8
- PATCH_FILES=STLport-4.5-0119.patch
-.ELSE
- TARFILE_NAME=STLport-4.0
- TARFILE_MD5=c441926f3a552ed3e5b274b62e86af16
- PATCH_FILES=STLport-4.0.patch STLport-4.0-sunstudio12u1.patch
- # To disable warnings from within STLport headers on unxsoli4 and
- # unxsols4, STLport-4.0.patch had to be extended mechanically by
- #
- # cd unxsol.../misc/build/STLport-4.0/stlport && \
- # find . -type f -exec sed -i \
- # -e 's/^\([ \t]*__STL_BEGIN_NAMESPACE[ \t]*\)$/#if defined \
- # __SUNPRO_CC\n#pragma disable_warn\n#endif\n&/' \
- # -e 's/^\([ \t]*__STL_END_NAMESPACE[ \t]*\)$/&\n#if defined \
- # __SUNPRO_CC\n#pragma enable_warn\n#endif/' {} \;
- #
- # (causing lots of files to become modified) and by additionally
- # changing unxsol.../misc/build/STLport-4.0/stlport/math.h,
- # unxsol.../misc/build/STLport-4.0/stlport/stl/_config.h,
- # unxsol.../misc/build/STLport-4.0/stlport/stl/_list.h, and
- # unxsol.../misc/build/STLport-4.0/stlport/stl/type_traits.h manually.
- # (Obviously due to the way the C++ compiler generates code for
- # instantiations of inline function templates from STLport headers, it
- # does not work to simply add "#pragma disable_warn" to stl/_prolog.h
- # and "#pragma enable_warn" to stl/_epilog.h, as seemingly some internal
- # STLport headers are read in by the compiler only at the end of a
- # compilation unit, outside the scope of stl/_prolog.h and
- # stl/_epilog.h.)
-.ENDIF
-
-ADDITIONAL_FILES=src$/gcc-3.0.mak src$/gcc-3.0-freebsd.mak src$/sunpro8.mak src$/sunpro11.mak src$/gcc-3.0-mingw.mak \
- src$/gcc-3.0-os2.mak src$/gcc-3.0-os2.def src$/common_macros_os2.mak
-
-
-CONFIGURE_ACTION=none
-CONFIGURE_FLAGS=
-
-BUILD_DIR=src
-
-.IF "$(COM)"=="MSC"
-BUILD_ACTION=nmake
-BUILD_FLAGS=-f vc7.mak EXFLAGS="/EHa /Zc:wchar_t-" CCNUMVER=$(CCNUMVER)
-.ENDIF
-
-.IF "$(COM)"=="GCC"
- .IF "$(COMID)"=="gcc3"
- # FreeBSD needs a special makefile
- .IF "$(OS)"=="FREEBSD"
- BUILD_FLAGS=-f gcc-3.0-freebsd.mak
- .ELIF "$(OS)"=="OS2"
- BUILD_FLAGS=-f gcc-3.0-os2.mak
- .ELIF "$(GUI)"=="WNT"
- BUILD_FLAGS=-f gcc-3.0-mingw.mak
- .ELSE
- BUILD_FLAGS=-f gcc-3.0.mak
- .ENDIF
- .ELSE # "$(COMID)"=="gcc3"
- .IF "$(OS)"=="FREEBSD"
- BUILD_FLAGS=-f gcc-freebsd.mak
- .ELSE
- BUILD_FLAGS=-f gcc.mak
- .ENDIF
- .ENDIF # "$(COMID)"=="gcc3"
- BUILD_ACTION=$(GNUMAKE)
- # build in parallel
- BUILD_FLAGS+= -j$(MAXPROCESS)
-.ENDIF
-.IF "$(HAVE_LD_HASH_STYLE)" == "TRUE"
-CXX+= -Wl,--hash-style=both
-.ENDIF
-
-.IF "$(HAVE_LD_BSYMBOLIC_FUNCTIONS)" == "TRUE"
-CXX+= -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo
-.ENDIF
-
-.IF "$(COM)"=="C52"
-BUILD_ACTION=make
-.IF "$(CCNUMVER)">="00050008"
-BUILD_FLAGS=-f sunpro11.mak
-.ELIF "$(CCNUMVER)">="00050005"
-BUILD_FLAGS=-f sunpro8.mak
-.ELSE
-BUILD_FLAGS=-f sunpro6.mak
-.ENDIF # "$(CCNUMVER)">="00050008"
-
-OUT2INC= \
- stlport$/SC5$/*.SUNWCCh
-.ENDIF
-
-OUTDIR2INC= \
- stlport
-
-.IF "$(GUI)"=="WNT"
-.IF "$(COM)"=="GCC"
-
-OUT2LIB= \
- lib$/lib*_static.a
-
-OUT2BIN= \
- lib$/*.dll
-
-.ELSE
-
-OUT2LIB= \
- lib$/*.lib
-
-OUT2BIN= \
- lib$/*.dll \
- lib$/*.pdb
-
-.ENDIF # "$(COM)"=="GCC"
-
-.ELIF "$(GUI)"=="OS2"
-
-OUT2LIB= lib$/*.lib
-OUT2BIN= lib$/*.dll
-
-.ELSE # "$(GUI)"=="WNT"
-
-OUT2LIB= \
- lib$/lib*
-
-.ENDIF # "$(GUI)"=="WNT"
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(STLPORT4)"!="NO_STLPORT4"
-all :
- @echo " An already available installation of STLport has been chosen in the configure process."
- @echo " Therefore the version provided here does not need to be built in addition."
-.ELIF "$(OS)"=="MACOSX"
-all:
- @echo '--with-stlport=yes is not supported on Mac OS X'
- false
-.ENDIF
-
-.INCLUDE : set_ext.mk
-.INCLUDE : target.mk
-.INCLUDE : tg_ext.mk
-.ENDIF # "$(USE_SYSTEM_STL)"
diff --git a/stlport/prj/d.lst b/stlport/prj/d.lst
index 29848a6475e3..a6df427ad180 100644
--- a/stlport/prj/d.lst
+++ b/stlport/prj/d.lst
@@ -1,25 +1,4 @@
mkdir: %_DEST%\inc%_EXT%\stl
-mkdir: %_DEST%\inc%_EXT%\stl\stl
-mkdir: %_DEST%\inc%_EXT%\stl\stl\debug
-mkdir: %_DEST%\inc%_EXT%\stl\stl\wrappers
-mkdir: %_DEST%\inc%_EXT%\stl\config
-mkdir: %_DEST%\inc%_EXT%\stl\using
-mkdir: %_DEST%\inc%_EXT%\stl\using\h
-mkdir: %_DEST%\inc%_EXT%\stl\wrap_std
-mkdir: %_DEST%\inc%_EXT%\stl\wrap_std\h
-..\%__SRC%\inc\*.SUNWCCH %_DEST%\inc%_EXT%\stl\*
..\%__SRC%\inc\stlport\* %_DEST%\inc%_EXT%\stl\*
-..\%__SRC%\inc\stlport\stl\* %_DEST%\inc%_EXT%\stl\stl\*
-..\%__SRC%\inc\stlport\stl\debug\* %_DEST%\inc%_EXT%\stl\stl\debug\*
-..\%__SRC%\inc\stlport\stl\wrappers\* %_DEST%\inc%_EXT%\stl\stl\wrappers\*
-..\%__SRC%\inc\stlport\config\* %_DEST%\inc%_EXT%\stl\config\*
-..\%__SRC%\inc\stlport\using\* %_DEST%\inc%_EXT%\stl\using\*
-..\%__SRC%\inc\stlport\using\h\* %_DEST%\inc%_EXT%\stl\using\h\*
-..\%__SRC%\inc\stlport\wrap_std\* %_DEST%\inc%_EXT%\stl\wrap_std\*
-..\%__SRC%\inc\stlport\wrap_std\h\* %_DEST%\inc%_EXT%\stl\wrap_std\h\*
..\systemstlguards\*.h %_DEST%\inc%_EXT%\stl\*.h
-..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so
-..\%__SRC%\lib\lib*.a %_DEST%\lib%_EXT%\lib*.a
-..\%__SRC%\lib\*.lib %_DEST%\lib%_EXT%\*.lib
-..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll
diff --git a/stlport/win32_sdk.sh b/stlport/win32_sdk.sh
deleted file mode 100644
index 4c2572ee2869..000000000000
--- a/stlport/win32_sdk.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-# *************************************************************
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-# *************************************************************
-#rem parameters in order of their apearance:
-#rem - path to unpacked tarball
-#rem - relative path back to module root
-
-cd $1
-
-patch -i $2/STLport-4.0_SDK.patch -b -p2
-
diff --git a/svl/inc/svl/smplhint.hxx b/svl/inc/svl/smplhint.hxx
index bd64a92f6be6..6c0ebc8f5a23 100644
--- a/svl/inc/svl/smplhint.hxx
+++ b/svl/inc/svl/smplhint.hxx
@@ -64,10 +64,10 @@
class SVL_DLLPUBLIC SfxSimpleHint: public SfxHint
{
private:
- sal_uLong nId;
+ sal_uLong mnId;
public:
SfxSimpleHint( sal_uLong nId );
- sal_uLong GetId() const { return nId; }
+ sal_uLong GetId() const { return mnId; }
};
//--------------------------------------------------------------------
diff --git a/svl/inc/svl/zformat.hxx b/svl/inc/svl/zformat.hxx
index 1f0becdda7af..cae9f54b4b14 100644
--- a/svl/inc/svl/zformat.hxx
+++ b/svl/inc/svl/zformat.hxx
@@ -160,7 +160,7 @@ public:
const SvNumberNatNum& GetNatNum() const { return aNatNum; }
// check, if the format code contains a subformat for text
- const bool HasTextFormatCode() const;
+ bool HasTextFormatCode() const;
private:
ImpSvNumberformatInfo aI; // Hilfsstruct fuer die restlichen Infos
@@ -336,7 +336,7 @@ public:
sal_Bool HasNewCurrency() const;
// check, if the format code contains a subformat for text
- const bool HasTextFormatCode() const;
+ bool HasTextFormatCode() const;
// Build string from NewCurrency for saving it SO50 compatible
void Build50Formatstring( String& rStr ) const;
diff --git a/svl/source/notify/smplhint.cxx b/svl/source/notify/smplhint.cxx
index ffde8a6d1d19..e4548d0e3a71 100644
--- a/svl/source/notify/smplhint.cxx
+++ b/svl/source/notify/smplhint.cxx
@@ -19,22 +19,17 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svl.hxx"
-#ifndef GCC
-#endif
#include <svl/smplhint.hxx>
//====================================================================
// creates a SimpleHint with the type nId
-
SfxSimpleHint::SfxSimpleHint( sal_uLong nIdP )
{
- nId = nIdP;
+ mnId = nIdP;
}
-
+// eof
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index e8df25ed6b72..c5db1344e310 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -406,7 +406,7 @@ sal_Bool ImpSvNumFor::HasNewCurrency() const
return sal_False;
}
-const bool ImpSvNumFor::HasTextFormatCode() const
+bool ImpSvNumFor::HasTextFormatCode() const
{
return aI.eScannedType == NUMBERFORMAT_TEXT;
}
@@ -1722,7 +1722,7 @@ sal_Bool SvNumberformat::HasNewCurrency() const
return sal_False;
}
-const bool SvNumberformat::HasTextFormatCode() const
+bool SvNumberformat::HasTextFormatCode() const
{
for ( sal_uInt16 j=0; j<4; j++ )
{
diff --git a/svtools/AllLangResTarget_svt.mk b/svtools/AllLangResTarget_svt.mk
index 69cc2143f003..50cd2b14a663 100644
--- a/svtools/AllLangResTarget_svt.mk
+++ b/svtools/AllLangResTarget_svt.mk
@@ -49,6 +49,7 @@ $(eval $(call gb_SrsTarget_add_files,svt/res,\
svtools/source/control/ctrlbox.src \
svtools/source/control/ctrltool.src \
svtools/source/control/filectrl.src \
+ svtools/source/control/ruler.src \
svtools/source/dialogs/addresstemplate.src \
svtools/source/dialogs/filedlg2.src \
svtools/source/dialogs/formats.src \
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index dbdfe7455cad..a5013c932dbc 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -126,6 +126,7 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
svtools/source/contnr/templwin \
svtools/source/contnr/tooltiplbox \
svtools/source/contnr/treelist \
+ svtools/source/control/accessibleruler \
svtools/source/control/asynclink \
svtools/source/control/calendar \
svtools/source/control/collatorres \
@@ -157,6 +158,8 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
svtools/source/control/urlcontrol \
svtools/source/control/valueacc \
svtools/source/control/valueset \
+ svtools/source/control/vclxaccessibleheaderbar \
+ svtools/source/control/vclxaccessibleheaderbaritem \
svtools/source/dialogs/addresstemplate \
svtools/source/dialogs/colrdlg \
svtools/source/dialogs/filedlg \
diff --git a/svtools/Package_inc.mk b/svtools/Package_inc.mk
index f52ef38348fe..3a42713d8430 100644
--- a/svtools/Package_inc.mk
+++ b/svtools/Package_inc.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/QueryFolderName.hxx,sv
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/acceleratorexecute.hxx,svtools/acceleratorexecute.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibilityoptions.hxx,svtools/accessibilityoptions.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessiblefactory.hxx,svtools/accessiblefactory.hxx))
+$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibleruler.hxx,svtools/accessibleruler.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibletable.hxx,svtools/accessibletable.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibletableprovider.hxx,svtools/accessibletableprovider.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/addresstemplate.hxx,svtools/addresstemplate.hxx))
diff --git a/svtools/inc/svtools/accessibleruler.hxx b/svtools/inc/svtools/accessibleruler.hxx
new file mode 100644
index 000000000000..f2cbe697a6ce
--- /dev/null
+++ b/svtools/inc/svtools/accessibleruler.hxx
@@ -0,0 +1,303 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+//IAccessibility2 Implementation 2009-----
+#ifndef _SVTRULERACCESSIBLE_HXX
+#define _SVTRULERACCESSIBLE_HXX
+
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLECOMPONENT_HPP_
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLECONTEXT_HPP_
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEEVENTBROADCASTER_HPP_
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ILLEGALACCESSIBLECOMPONENTSTATEEXCEPTION_HPP_
+#include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
+#include <com/sun/star/uno/Reference.hxx>
+#endif
+#ifndef _CPPUHELPER_WEAK_HXX_
+#include <cppuhelper/weak.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XTYPEPROVIDER_HPP_
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICENAME_HPP_
+#include <com/sun/star/lang/XServiceName.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_INDEXOUTOFBOUNDSEXCEPTION_HPP_
+#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
+#include <com/sun/star/lang/DisposedException.hpp>
+#endif
+#ifndef _VOS_MUTEX_HXX_
+#include <vos/mutex.hxx>
+#endif
+#ifndef _CPPUHELPER_INTERFACECONTAINER_H_
+#include <cppuhelper/interfacecontainer.h>
+#endif
+#ifndef _CPPUHELPER_COMPBASE5_HXX_
+#include <cppuhelper/compbase5.hxx>
+#endif
+#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
+#include <comphelper/broadcasthelper.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE5_HXX_
+#include <cppuhelper/implbase5.hxx>
+#endif
+#ifndef _UTL_SERVICEHELPER_HXX_
+#include <comphelper/servicehelper.hxx>
+#endif
+
+namespace com { namespace sun { namespace star { namespace awt {
+ struct Point;
+ struct Rectangle;
+ struct Size;
+ class XFocusListener;
+} } } }
+
+class Rectangle;
+class Ruler;
+class Window;
+
+
+typedef ::cppu::WeakAggComponentImplHelper5<
+ ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::accessibility::XAccessibleComponent,
+ ::com::sun::star::accessibility::XAccessibleContext,
+ ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
+ ::com::sun::star::lang::XServiceInfo >
+ SvtRulerAccessible_Base;
+
+class SvtRulerAccessible : public ::comphelper::OBaseMutex, public SvtRulerAccessible_Base
+{
+public:
+ //===== internal ========================================================
+ SvtRulerAccessible(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxParent, Ruler& rRepresentation, const ::rtl::OUString& rName );
+protected:
+ virtual ~SvtRulerAccessible();
+public:
+ //===== XAccessible =====================================================
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL
+ getAccessibleContext( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ //===== XAccessibleComponent ============================================
+
+ virtual sal_Bool SAL_CALL
+ containsPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL
+ getBounds() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::awt::Point SAL_CALL
+ getLocation() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::awt::Point SAL_CALL
+ getLocationOnScreen() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::awt::Size SAL_CALL
+ getSize() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Bool SAL_CALL
+ isShowing() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Bool SAL_CALL
+ isVisible() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Bool SAL_CALL
+ isFocusTraversable() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL
+ addFocusListener(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL
+ removeFocusListener(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL
+ grabFocus() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Any SAL_CALL
+ getAccessibleKeyBinding() throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Int32 SAL_CALL
+ getForeground( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL
+ getBackground( ) throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleContext ==============================================
+
+ virtual sal_Int32 SAL_CALL
+ getAccessibleChildCount( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleChild( sal_Int32 nIndex )
+ throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleParent( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Int32 SAL_CALL
+ getAccessibleIndexInParent( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Int16 SAL_CALL
+ getAccessibleRole( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleDescription( void ) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleName( void ) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL
+ getAccessibleRelationSet( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
+ getAccessibleStateSet( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::lang::Locale SAL_CALL
+ getLocale( void )
+ throw( ::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::accessibility::IllegalAccessibleComponentStateException );
+ //===== XAccessibleEventBroadcaster =====================================
+
+ virtual void SAL_CALL
+ addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )throw( com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL
+ removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw( com::sun::star::uno::RuntimeException );
+
+ // Needed, because some compilers would complain about virtual functions above would hide cppu::WeakAggComponentImplHelperBase::add/removeEventListener(const Reference<lang::XEventListener>&)...
+ virtual void SAL_CALL
+ addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener )throw( com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL
+ removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw( com::sun::star::uno::RuntimeException );
+
+
+ //===== XServiceInfo ====================================================
+
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Bool SAL_CALL
+ supportsService( const ::rtl::OUString& sServiceName ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ //===== XTypeProvider ===================================================
+
+ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
+ getImplementationId( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+
+
+
+public:
+
+ /// Sets the name
+ void setName( const ::rtl::OUString& rName );
+
+ /// Sets the description
+ void setDescription( const ::rtl::OUString& rDescr );
+private:
+ static ::com::sun::star::uno::Sequence< sal_Int8 > getUniqueId( void );
+protected:
+
+ /// @Return the object's current bounding box relative to the desktop.
+ virtual Rectangle GetBoundingBoxOnScreen( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ /// @Return the object's current bounding box relative to the parent object.
+ virtual Rectangle GetBoundingBox( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+
+ virtual void SAL_CALL disposing();
+
+ /// @returns true if it's disposed or in disposing
+ inline sal_Bool IsAlive( void ) const;
+
+ /// @returns true if it's not disposed and no in disposing
+ inline sal_Bool IsNotAlive( void ) const;
+
+ /// throws the exception DisposedException if it's not alive
+ void ThrowExceptionIfNotAlive( void ) throw( ::com::sun::star::lang::DisposedException );
+
+private:
+ /** Description of this object. This is not a constant because it can
+ be set from the outside.
+ */
+ ::rtl::OUString msDescription;
+
+ /** Name of this object.
+ */
+ ::rtl::OUString msName;
+
+ /// Reference to the parent object.
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ mxParent;
+
+ /// pointer to internal representation
+ Ruler* mpRepr;
+
+ /// client id in the AccessibleEventNotifier queue
+ sal_uInt32 mnClientId;
+
+
+};
+
+inline sal_Bool SvtRulerAccessible::IsAlive( void ) const
+{
+ return !rBHelper.bDisposed && !rBHelper.bInDispose;
+}
+
+inline sal_Bool SvtRulerAccessible::IsNotAlive( void ) const
+{
+ return rBHelper.bDisposed || rBHelper.bInDispose;
+}
+
+
+
+#endif
+//-----IAccessibility2 Implementation 2009
+
diff --git a/svtools/inc/svtools/embedhlp.hxx b/svtools/inc/svtools/embedhlp.hxx
index 37f010a9694a..d5919e103360 100644
--- a/svtools/inc/svtools/embedhlp.hxx
+++ b/svtools/inc/svtools/embedhlp.hxx
@@ -117,11 +117,12 @@ namespace svt
void UpdateReplacementOnDemand();
MapUnit GetMapUnit() const;
void Lock( sal_Bool bLock = sal_True );
- sal_Bool IsLocked() const;
+ sal_Bool IsLocked() const;
void Clear();
- sal_Bool is() const { return mxObj.is(); }
+ sal_Bool is() const { return mxObj.is(); }
- sal_Bool IsChart() const;
+ sal_Bool IsChart() const;
+ rtl::OUString GetChartType();
// #i104867#
// Provides a graphic version number for the fetchable Graphic during this object's lifetime. Internally,
diff --git a/svtools/inc/svtools/headbar.hxx b/svtools/inc/svtools/headbar.hxx
index 8f6c5793631d..b08645d59aad 100644
--- a/svtools/inc/svtools/headbar.hxx
+++ b/svtools/inc/svtools/headbar.hxx
@@ -233,6 +233,8 @@ typedef sal_uInt16 HeaderBarItemBits;
// - HeaderBar -
// -------------
+class VCLXHeaderBar; // IAccessibility2 Implementation 2009
+
class SVT_DLLPUBLIC HeaderBar : public Window
{
private:
@@ -261,6 +263,9 @@ private:
Link maDoubleClickHdl;
Link maCreateAccessibleHdl;
+ VCLXHeaderBar* m_pVCLXHeaderBar; // IAccessibility2 Implementation 2009
+
+
::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible >
mxAccessible;
@@ -385,6 +390,9 @@ public:
virtual ::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible > CreateAccessible();
void SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > );
+ // IAccessibility2 Implementation 2009
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > GetComponentInterface( sal_Bool bCreate );
+
};
#endif // _HEADBAR_HXX
diff --git a/svtools/inc/svtools/ruler.hxx b/svtools/inc/svtools/ruler.hxx
index df7654b24c91..901be3d5de27 100644
--- a/svtools/inc/svtools/ruler.hxx
+++ b/svtools/inc/svtools/ruler.hxx
@@ -32,6 +32,10 @@
#endif
#include <vcl/field.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <svtools/accessibleruler.hxx>
+//-----IAccessibility2 Implementation 2009
+
class MouseEvent;
class TrackingEvent;
class DataChangedEvent;
@@ -706,6 +710,10 @@ private:
Link maDoubleClickHdl;
Link maExtraDownHdl;
+//IAccessibility2 Implementation 2009-----
+ SvtRulerAccessible* pAccContext;
+//-----IAccessibility2 Implementation 2009
+
#ifdef _SV_RULER_CXX
SVT_DLLPRIVATE void ImplVDrawLine( long nX1, long nY1, long nX2, long nY2 );
SVT_DLLPRIVATE void ImplVDrawRect( long nX1, long nY1, long nX2, long nY2 );
@@ -865,6 +873,10 @@ public:
//set text direction right-to-left
void SetTextRTL(sal_Bool bRTL);
+
+//IAccessibility2 Implementation 2009-----
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+//-----IAccessibility2 Implementation 2009
};
#endif // _RULER_HXX
diff --git a/svtools/inc/svtools/svlbitm.hxx b/svtools/inc/svtools/svlbitm.hxx
index 11f8bfd266cf..bc25bbd8c884 100644
--- a/svtools/inc/svtools/svlbitm.hxx
+++ b/svtools/inc/svtools/svlbitm.hxx
@@ -42,6 +42,9 @@ class SvLBoxEntry;
#define SV_ITEM_ID_LBOXBMP 2
#define SV_ITEM_ID_LBOXBUTTON 3
#define SV_ITEM_ID_LBOXCONTEXTBMP 4
+//IAccessibility2 Implementation 2009-----
+#define SV_ITEM_ID_EXTENDRLBOXSTRING 5
+//-----IAccessibility2 Implementation 2009
enum SvButtonState { SV_BUTTON_UNCHECKED, SV_BUTTON_CHECKED, SV_BUTTON_TRISTATE };
@@ -130,6 +133,9 @@ public:
virtual sal_uInt16 IsA();
void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
XubString GetText() const { return aStr; }
+ //IAccessibility2 Implementation 2009-----
+ virtual XubString GetExtendText() const {return XubString();}
+ //-----IAccessibility2 Implementation 2009
void SetText( SvLBoxEntry*, const XubString& rStr );
void Paint( const Point&, SvLBox& rDev, sal_uInt16 nFlags,SvLBoxEntry* );
SvLBoxItem* Create() const;
@@ -210,6 +216,8 @@ public:
// Check whether this button can be modified via UI, sounding a beep if it
// cannot be modified:
bool CheckModification() const;
+ //IAccessible2 implementation 2009
+ SvLBoxButtonData* GetButtonData() const{ return pData;}
};
inline void SvLBoxButton::SetStateChecked()
diff --git a/svtools/inc/svtools/svlbox.hxx b/svtools/inc/svtools/svlbox.hxx
index b310a009e340..c9ca8734ab09 100644
--- a/svtools/inc/svtools/svlbox.hxx
+++ b/svtools/inc/svtools/svlbox.hxx
@@ -189,6 +189,8 @@ class SVT_DLLPUBLIC SvLBoxEntry : public SvListEntry
friend class SvLBox;
SvPtrarr aItems;
+ // IAccessible2 implementation in 2009
+ sal_Bool bIsMarked;
void* pUserData;
sal_uInt16 nEntryFlags;
//#if 0 // _SOLAR__PRIVATE
@@ -217,6 +219,9 @@ public:
sal_uInt16 GetFlags() const { return nEntryFlags; }
void SetFlags( sal_uInt16 nFlags ) { nEntryFlags = nFlags; }
+ // IAccessible2 implementation in 2009
+ sal_Bool GetIsMarked() const { return bIsMarked ; }
+ void SetMarked( sal_Bool IsMarked ) { bIsMarked =IsMarked ; }
};
// *********************************************************************
diff --git a/svtools/inc/svtools/svtools.hrc b/svtools/inc/svtools/svtools.hrc
index 7a7575b98ab0..6327958ce7ea 100644
--- a/svtools/inc/svtools/svtools.hrc
+++ b/svtools/inc/svtools/svtools.hrc
@@ -247,7 +247,7 @@
#define STR_SVT_ACC_LISTENTRY_SELCTED_STATE (STR_SVT_ACC_BEGIN+7)
#define STR_SVT_ACC_RULER_VERT_NAME (STR_SVT_ACC_BEGIN+8)
#define STR_SVT_ACC_RULER_HORZ_NAME (STR_SVT_ACC_BEGIN+9)
-#define STR_SVT_ACC_END (STR_SVT_ACC_EMPTY_FIELD)
+#define STR_SVT_ACC_END (STR_SVT_ACC_RULER_HORZ_NAME)
#define STR_SVT_INDEXENTRY_START (STR_SVT_ACC_END + 1)
#define STR_SVT_INDEXENTRY_ALPHANUMERIC (STR_SVT_INDEXENTRY_START+0)
diff --git a/svtools/inc/svtools/svtreebx.hxx b/svtools/inc/svtools/svtreebx.hxx
index 7622c7907752..f4ff31a14267 100644
--- a/svtools/inc/svtools/svtreebx.hxx
+++ b/svtools/inc/svtools/svtreebx.hxx
@@ -43,6 +43,11 @@ class TabBar;
#define TREEFLAG_MANINS 0x0004
#define TREEFLAG_RECALCTABS 0x0008
+#define TREEBOX_ALLITEM_ACCROLE_TYPE_NOTSET 0x00
+#define TREEBOX_ALLITEM_ACCROLE_TYPE_LIST 0x01
+#define TREEBOX_ALLITEM_ACCROLE_TYPE_TREE 0x02
+
+
typedef sal_Int64 ExtendedWinBits;
// disable the behavior of automatically selecting a "CurEntry" upon painting the control
@@ -71,7 +76,9 @@ class SVT_DLLPUBLIC SvTreeListBox : public SvLBox
short nEntryHeightOffs;
short nIndent;
short nFocusWidth;
- sal_uInt16 aContextBmpMode;
+ sal_uInt16 aContextBmpMode;
+
+ short nAllItemAccRoleType;
#ifdef _SVTREEBX_CXX
DECL_DLLPRIVATE_LINK( CheckButtonClick, SvLBoxButtonData * );
@@ -400,6 +407,19 @@ public:
/** Enables, that one cell of a tablistbox entry can be focused */
void EnableCellFocus();
+// IAccessible2 implementation in 2009-----------
+ // For overwriting accessible role for all entries - normally 0, so each entry can be different
+ void SetAllEntriesAccessibleRoleType( short n ) { nAllItemAccRoleType = n; }
+ short GetAllEntriesAccessibleRoleType() const { return nAllItemAccRoleType; }
+
+ sal_uInt16 GetTreeFlags() const {return nTreeFlags;}
+
+ XubString headString ;
+ String SearchEntryTextWithHeadTitle( SvLBoxEntry* pEntry ) ;
+ virtual String GetEntryAltText( SvLBoxEntry* pEntry) const;
+ virtual String GetEntryLongDescription( SvLBoxEntry* pEntry) const;
+// -----------IAccessible2 implementation in 2009
+
protected:
using SvListView::Expand;
using SvListView::Collapse;
diff --git a/svtools/inc/svtools/texteng.hxx b/svtools/inc/svtools/texteng.hxx
index 2833a1af9834..9306be5c9014 100644
--- a/svtools/inc/svtools/texteng.hxx
+++ b/svtools/inc/svtools/texteng.hxx
@@ -324,6 +324,8 @@ public:
static sal_Bool DoesKeyChangeText( const KeyEvent& rKeyEvent );
static sal_Bool DoesKeyMoveCursor( const KeyEvent& rKeyEvent );
static sal_Bool IsSimpleCharInput( const KeyEvent& rKeyEvent );
+// IAccessible2 implementation in 2009
+ Color GetTextColor() {return maTextColor; };
};
#endif // _TEXTENG_HXX
diff --git a/svtools/inc/svtools/treelist.hxx b/svtools/inc/svtools/treelist.hxx
index 3cd9ab28c4b3..8ca9b9db868a 100644
--- a/svtools/inc/svtools/treelist.hxx
+++ b/svtools/inc/svtools/treelist.hxx
@@ -56,6 +56,8 @@
#define SVLISTENTRYFLAG_FOCUSED 0x0004
#define SVLISTENTRYFLAG_CURSORED 0x0008
#define SVLISTENTRYFLAG_NOT_SELECTABLE 0x0010
+// IAccessible2 implementation
+#define SVLISTENTRYFLAG_OBJSELECTED 0x0040
class SvListEntry;
@@ -152,6 +154,14 @@ public:
nFlags |= SVLISTENTRYFLAG_NOT_SELECTABLE;
}
bool IsSelectable() const { return (bool)(nFlags&SVLISTENTRYFLAG_NOT_SELECTABLE)==0; }
+ // IAccessible2 implementation
+ void SetObjectSelected(sal_Bool bSelected)
+ {
+ if ( !bSelected )
+ nFlags &= (~SVLISTENTRYFLAG_OBJSELECTED);
+ else
+ nFlags |= SVLISTENTRYFLAG_OBJSELECTED;
+ }
};
enum SvSortMode { SortAscending, SortDescending, SortNone };
diff --git a/svtools/inc/svtools/valueset.hxx b/svtools/inc/svtools/valueset.hxx
index 8a81c15f3e3c..f52710c78f64 100644
--- a/svtools/inc/svtools/valueset.hxx
+++ b/svtools/inc/svtools/valueset.hxx
@@ -317,7 +317,7 @@ protected:
sal_Bool StartDrag( const CommandEvent& rCEvt, Region& rRegion );
sal_uInt16 ShowDropPos( const Point& rPos );
- void HideDropPos();
+ void HideDropPos();
protected:
@@ -358,6 +358,9 @@ public:
sal_uInt16 nPos = VALUESET_APPEND );
void InsertItem( sal_uInt16 nItemId,
sal_uInt16 nPos = VALUESET_APPEND );
+ // IA2 implementation in 2009 - method to set accessible when the style is user draw.
+ void InsertItem( sal_uInt16 nItemId, const XubString& rStr, sal_uInt16 nPos = VALUESET_APPEND );
+
void InsertSpace( sal_uInt16 nItemId,
sal_uInt16 nPos = VALUESET_APPEND );
void RemoveItem( sal_uInt16 nItemId );
@@ -365,24 +368,24 @@ public:
void CopyItems( const ValueSet& rValueSet );
void Clear();
- sal_uInt16 GetItemCount() const;
- sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const;
- sal_uInt16 GetItemId( sal_uInt16 nPos ) const;
- sal_uInt16 GetItemId( const Point& rPos ) const;
+ sal_uInt16 GetItemCount() const;
+ sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const;
+ sal_uInt16 GetItemId( sal_uInt16 nPos ) const;
+ sal_uInt16 GetItemId( const Point& rPos ) const;
Rectangle GetItemRect( sal_uInt16 nItemId ) const;
void EnableFullItemMode( bool bFullMode = true );
bool IsFullItemModeEnabled() const { return mbFullMode; }
void SetColCount( sal_uInt16 nNewCols = 1 );
- sal_uInt16 GetColCount() const { return mnUserCols; }
+ sal_uInt16 GetColCount() const { return mnUserCols; }
void SetLineCount( sal_uInt16 nNewLines = 0 );
- sal_uInt16 GetLineCount() const { return mnUserVisLines; }
+ sal_uInt16 GetLineCount() const { return mnUserVisLines; }
void SetItemWidth( long nItemWidth = 0 );
long GetItemWidth() const { return mnUserItemWidth; }
void SetItemHeight( long nLineHeight = 0 );
long GetItemHeight() const { return mnUserItemHeight; }
void SetFirstLine( sal_uInt16 nNewLine = 0 );
- sal_uInt16 GetFirstLine() const { return mnFirstLine; }
+ sal_uInt16 GetFirstLine() const { return mnFirstLine; }
void SelectItem( sal_uInt16 nItemId );
sal_uInt16 GetSelectItemId() const { return mnSelItemId; }
@@ -392,7 +395,7 @@ public:
bool IsNoSelection() const { return mbNoSelection; }
void SetItemBits( sal_uInt16 nItemId, sal_uInt16 nBits );
- sal_uInt16 GetItemBits( sal_uInt16 nItemId ) const;
+ sal_uInt16 GetItemBits( sal_uInt16 nItemId ) const;
void SetItemImage( sal_uInt16 nItemId, const Image& rImage );
Image GetItemImage( sal_uInt16 nItemId ) const;
void SetItemColor( sal_uInt16 nItemId, const Color& rColor );
@@ -407,7 +410,7 @@ public:
bool IsColor() const { return maColor.GetTransparency() == 0; }
void SetExtraSpacing( sal_uInt16 nNewSpacing );
- sal_uInt16 GetExtraSpacing() { return mnSpacing; }
+ sal_uInt16 GetExtraSpacing() { return mnSpacing; }
void Format();
diff --git a/svtools/inc/svtools/vclxaccessibleheaderbar.hxx b/svtools/inc/svtools/vclxaccessibleheaderbar.hxx
new file mode 100644
index 000000000000..8e9c34cacdcb
--- /dev/null
+++ b/svtools/inc/svtools/vclxaccessibleheaderbar.hxx
@@ -0,0 +1,86 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef _SVTOOLS_VCLXACCESSIBLEHEADERBAR_HXX_
+#define _SVTOOLS_VCLXACCESSIBLEHEADERBAR_HXX_
+
+#ifndef _TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX_
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#endif
+#ifndef _HEADBAR_HXX
+#include <svtools/headbar.hxx>
+#endif
+#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_
+#include "toolkit/awt/vclxwindow.hxx"
+#endif
+class HeaderBar;
+
+// ----------------------------------------------------
+// class VCLXAccessibleHeaderBar
+// ----------------------------------------------------
+
+typedef std::vector< ::com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible > >
+ ListItems;
+
+class VCLXAccessibleHeaderBar : public VCLXAccessibleComponent
+{
+
+public:
+ HeaderBar* m_pHeadBar;
+ virtual ~VCLXAccessibleHeaderBar();
+
+ virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+ virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
+
+ VCLXAccessibleHeaderBar( VCLXWindow* pVCLXindow );
+
+ // XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException);
+
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
+
+public:
+ virtual void SAL_CALL disposing (void);
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateChild(sal_Int32 i);
+
+private:
+ ListItems m_aAccessibleChildren;
+
+
+};
+
+class VCLXHeaderBar : public VCLXWindow
+{
+public:
+ VCLXHeaderBar(Window* pHeaderBar);
+ virtual ~VCLXHeaderBar();
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext();
+
+};
+
+#endif // _SVTOOLS_VCLXACCESSIBLEHEADERBAR_HXX_
+
diff --git a/svtools/inc/svtools/vclxaccessibleheaderbaritem.hxx b/svtools/inc/svtools/vclxaccessibleheaderbaritem.hxx
new file mode 100644
index 000000000000..a108691adc09
--- /dev/null
+++ b/svtools/inc/svtools/vclxaccessibleheaderbaritem.hxx
@@ -0,0 +1,127 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef _SVTOOLS_VCLACCESSIBLEHEADBARITEM_HXX_
+#define _SVTOOLS_VCLACCESSIBLEHEADBARITEM_HXX_
+
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef COMPHELPER_ACCESSIBLE_COMPONENT_HELPER_HXX
+#include <comphelper/accessiblecomponenthelper.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE2_HXX_
+#include <cppuhelper/implbase2.hxx>
+#endif
+
+#ifndef _LINK_HXX
+#include <tools/link.hxx>
+#endif
+
+#include <vector>
+
+class HeaderBar;
+class VCLExternalSolarLock;
+class VclSimpleEvent;
+class VclWindowEvent;
+
+namespace utl {
+class AccessibleStateSetHelper;
+}
+
+
+// ----------------------------------------------------
+// class VCLXAccessibleHeaderBarItem
+// ----------------------------------------------------
+
+typedef ::comphelper::OAccessibleExtendedComponentHelper AccessibleExtendedComponentHelper_BASE;
+
+typedef ::cppu::ImplHelper2<
+::com::sun::star::accessibility::XAccessible,
+::com::sun::star::lang::XServiceInfo > VCLXAccessibleHeaderBarItem_BASE;
+
+class VCLXAccessibleHeaderBarItem : public AccessibleExtendedComponentHelper_BASE,
+ public VCLXAccessibleHeaderBarItem_BASE
+{
+private:
+ VCLExternalSolarLock* m_pExternalLock;
+ HeaderBar* m_pHeadBar;
+ sal_Int32 m_nIndexInParent;
+
+protected:
+ DECL_LINK( WindowEventListener, VclSimpleEvent* );
+
+ virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+ virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
+
+ // OCommonAccessibleComponent
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL disposing();
+
+public:
+ VCLXAccessibleHeaderBarItem( HeaderBar* pHeadBar, sal_Int32 _nIndexInParent );
+ ~VCLXAccessibleHeaderBarItem();
+
+ // XInterface
+ DECLARE_XINTERFACE()
+
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER()
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& rServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::lang::Locale SAL_CALL getLocale( ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException){};
+ virtual sal_Int32 SAL_CALL getForeground() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getBackground() throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleExtendedComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getToolTipText( ) throw (::com::sun::star::uno::RuntimeException);
+};
+
+#endif // _SVTOOLS_VCLACCESSIBLEHEADBARITEM_HXX_
+
diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx
index ed58255d72d2..daaa6848057d 100644
--- a/svtools/source/brwbox/brwbox3.cxx
+++ b/svtools/source/brwbox/brwbox3.cxx
@@ -215,7 +215,9 @@ sal_Bool BrowseBox::ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point
// Object data and state ------------------------------------------------------
-OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType eObjType,sal_Int32 ) const
+//IAccessibility2 Implementation 2009-----
+OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType eObjType,sal_Int32 _nPosition) const
+//-----IAccessibility2 Implementation 2009
{
OUString aRetText;
switch( eObjType )
@@ -233,7 +235,18 @@ OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType e
aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnHeaderBar" ) );
break;
case ::svt::BBTYPE_TABLECELL:
- aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "TableCell" ) );
+//IAccessibility2 Implementation 2009-----
+ if( ColCount() !=0 && GetRowCount()!=0)
+ {
+
+ sal_Int32 columnId = _nPosition % ColCount() +1;
+ aRetText = OUString( GetColumnDescription( sal_Int16( columnId ) ) );
+ sal_Int32 rowId = _nPosition / GetRowCount() + 1;
+ aRetText += OUString::valueOf(rowId);
+ }
+ else
+//-----IAccessibility2 Implementation 2009
+ aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "TableCell" ) );
#if OSL_DEBUG_LEVEL > 1
aRetText += OUString( RTL_CONSTASCII_USTRINGPARAM( " [" ) );
aRetText += OUString::valueOf(sal_Int32(GetCurRow()));
@@ -243,7 +256,11 @@ OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType e
#endif
break;
case ::svt::BBTYPE_ROWHEADERCELL:
- aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "RowHeaderCell" ) );
+ {
+ sal_Int32 rowId = _nPosition + 1;
+ aRetText = OUString::valueOf( rowId );
+ }
+ //aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "RowHeaderCell" ) );
#if OSL_DEBUG_LEVEL > 1
aRetText += OUString( RTL_CONSTASCII_USTRINGPARAM( " [" ) );
aRetText += OUString::valueOf(sal_Int32(GetCurRow()));
@@ -253,7 +270,8 @@ OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType e
#endif
break;
case ::svt::BBTYPE_COLUMNHEADERCELL:
- aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnHeaderCell" ) );
+ //aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnHeaderCell" ) );
+ aRetText = OUString( GetColumnDescription( sal_Int16( _nPosition ) ) );
#if OSL_DEBUG_LEVEL > 1
aRetText += OUString( RTL_CONSTASCII_USTRINGPARAM( " [" ) );
aRetText += OUString::valueOf(sal_Int32(GetCurRow()));
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 2207ba735206..7e5fe4859c6e 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -1072,7 +1072,10 @@ namespace svt
{
commitTableEvent(
ACTIVE_DESCENDANT_CHANGED,
- makeAny( CreateAccessibleCell( nRow, GetColumnPos( nCol ) ) ),
+//IAccessibility2 Implementation 2009-----
+ //makeAny( CreateAccessibleCell( nRow, GetColumnPos( nCol ) ) ),
+ makeAny( CreateAccessibleCell( nRow, GetColumnPos( nCol -1) ) ),
+//-----IAccessibility2 Implementation 2009
Any()
);
}
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 8522143ad155..ae788c2003e8 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -1180,6 +1180,9 @@ void SvxIconChoiceCtrl_Impl::SetCursor_Impl( SvxIconChoiceCtrlEntry* pOldCursor,
{
SelectEntry( pCursor, sal_True, sal_True, sal_False, bPaintSync );
aCurSelectionRect = GetEntryBoundRect( pCursor );
+ //IAccessibility2 Implementation 2009-----
+ CallEventListeners( VCLEVENT_LISTBOX_SELECT, pCursor );
+ //-----IAccessibility2 Implementation 2009
}
}
}
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 009a2e9743fe..40c16c11dbe9 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -299,6 +299,10 @@ void SvImpLBox::Clear()
// #97680# ---------
aContextBmpWidthVector.clear();
+
+//IAccessibility2 Implementation 2009-----
+ CallEventListeners( VCLEVENT_LISTBOX_ITEMREMOVED, NULL );
+//-----IAccessibility2 Implementation 2009
}
// *********************************************************************
@@ -646,6 +650,9 @@ void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, sal_Bool bForceNoSelect )
if(!bForceNoSelect && bSimpleTravel && !(nFlags & F_DESEL_ALL) && GetUpdateMode())
{
pView->Select( pCursor, sal_True );
+ //IAccessibility2 Implementation 2009-----
+ CallEventListeners( VCLEVENT_LISTBOX_TREEFOCUS, pCursor );
+ //-----IAccessibility2 Implementation 2009
}
// Mehrfachselektion: Im Cursor-Move selektieren, wenn
// nicht im Add-Mode (Ctrl-F8)
@@ -655,10 +662,19 @@ void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, sal_Bool bForceNoSelect )
!bForceNoSelect )
{
pView->Select( pCursor, sal_True );
+ //IAccessibility2 Implementation 2009-----
+ CallEventListeners( VCLEVENT_LISTBOX_TREEFOCUS, pCursor );
+ //-----IAccessibility2 Implementation 2009
}
else
{
ShowCursor( sal_True );
+ //IAccessibility2 Implementation 2009-----
+ if (bForceNoSelect && GetUpdateMode())
+ {
+ CallEventListeners( VCLEVENT_LISTBOX_TREEFOCUS, pCursor);
+ }
+ //-----IAccessibility2 Implementation 2009
}
if( pAnchor )
@@ -1700,6 +1716,10 @@ void SvImpLBox::EntrySelected( SvLBoxEntry* pEntry, sal_Bool bSelect )
void SvImpLBox::RemovingEntry( SvLBoxEntry* pEntry )
{
+ //IAccessibility2 Implementation 2009-----
+ CallEventListeners( VCLEVENT_LISTBOX_ITEMREMOVED , pEntry );
+ //-----IAccessibility2 Implementation 2009
+
DestroyAnchor();
if( !pView->IsEntryVisible( pEntry ) )
@@ -2359,7 +2379,10 @@ sal_Bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
case KEY_LEFT:
{
- if ( bIsCellFocusEnabled )
+ //IAccessibility2 Implementation 2009-----
+ // if ( bIsCellFocusEnabled )
+ if ( bIsCellFocusEnabled && pCursor )
+ //-----IAccessibility2 Implementation 2009
{
if ( nCurTabPos > FIRST_ENTRY_TAB )
{
@@ -2677,7 +2700,7 @@ sal_Bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
// is from SvTreeListBox::KeyInput. If we set bKeyUsed to sal_True here, then the key input
// is just silenced. However, we want SvLBox::KeyInput to get a chance, to do the QuickSelection
// handling.
- // (The old code here which intentionally set bKeyUsed to TRUE said this was because of "quick search"
+ // (The old code here which intentionally set bKeyUsed to sal_True said this was because of "quick search"
// handling, but actually there was no quick search handling anymore. We just re-implemented it.)
// #i31275# / 2009-06-16 / frank.schoenheit@sun.com
bKeyUsed = sal_False;
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index a103929930ef..273a287a3e4e 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -1182,6 +1182,10 @@ void SvHeaderTabListBox::FillAccessibleStateSet( ::utl::AccessibleStateSetHelper
sal_uInt16 nCurColumn = GetCurrColumn();
if ( IsCellVisible( nCurRow, nCurColumn ) )
_rStateSet.AddState( AccessibleStateType::VISIBLE );
+ //IAccessibility2 Implementation 2009-----
+ if ( IsEnabled() )
+ _rStateSet.AddState( AccessibleStateType::ENABLED );
+ //-----IAccessibility2 Implementation 2009
_rStateSet.AddState( AccessibleStateType::TRANSIENT );
break;
}
@@ -1192,6 +1196,10 @@ void SvHeaderTabListBox::FillAccessibleStateSet( ::utl::AccessibleStateSetHelper
_rStateSet.AddState( AccessibleStateType::VISIBLE );
_rStateSet.AddState( AccessibleStateType::FOCUSABLE );
_rStateSet.AddState( AccessibleStateType::TRANSIENT );
+ //IAccessibility2 Implementation 2009-----
+ if ( IsEnabled() )
+ _rStateSet.AddState( AccessibleStateType::ENABLED );
+ //-----IAccessibility2 Implementation 2009
break;
}
default:
@@ -1216,6 +1224,9 @@ void SvHeaderTabListBox::FillAccessibleStateSetForCell( ::utl::AccessibleStateSe
_rStateSet.AddState( AccessibleStateType::ACTIVE );
_rStateSet.AddState( AccessibleStateType::SELECTED );
}
+ //IAccessibility2 Implementation 2009-----
+ if ( IsEnabled() )
+ _rStateSet.AddState( AccessibleStateType::ENABLED );
}
// -----------------------------------------------------------------------
void SvHeaderTabListBox::GrabTableFocus()
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx
index 83defe03a84f..cce2107a13d4 100644
--- a/svtools/source/contnr/svtreebx.cxx
+++ b/svtools/source/contnr/svtreebx.cxx
@@ -91,6 +91,7 @@ void SvTreeListBox::InitTreeView()
nFirstSelTab = 0;
nLastSelTab = 0;
nFocusWidth = -1;
+ nAllItemAccRoleType = 0;
Link* pLink = new Link( LINK(this,SvTreeListBox, DefaultCompare) );
pLBoxImpl->m_pLink = pLink;
@@ -345,6 +346,89 @@ String SvTreeListBox::GetEntryText(SvLBoxEntry* pEntry) const
return pItem->GetText();
}
+//IAccessibility2 Implementation 2009-----
+String SvTreeListBox::GetEntryAltText( SvLBoxEntry* ) const
+{
+ String tmp;
+ return tmp;
+}
+String SvTreeListBox::GetEntryLongDescription( SvLBoxEntry* ) const
+{
+ String tmp;
+ return tmp;
+}
+
+String SvTreeListBox::SearchEntryTextWithHeadTitle( SvLBoxEntry* pEntry )
+{
+ DBG_CHKTHIS(SvTreeListBox,0);
+ DBG_ASSERT( pEntry, "SvTreeListBox::SearchEntryText(): no entry" );
+ String sRet;
+
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCur = 0;
+ sal_uInt16 nHeaderCur = 0;
+ SvLBoxItem* pItem;
+ while( nCur < nCount )
+ {
+ // MT: SV_ITEM_ID_EXTENDRLBOXSTRING / GetExtendText() was in use in IA2 cws, but only used in sc: ScSolverOptionsString. Needed?
+ pItem = pEntry->GetItem( nCur );
+ if ( (pItem->IsA() == SV_ITEM_ID_LBOXSTRING /* || pItem->IsA() == SV_ITEM_ID_EXTENDRLBOXSTRING */ ) &&
+ static_cast<SvLBoxString*>( pItem )->GetText().Len() > 0 )
+ {
+
+ //want to the column header
+ if( headString.Len() > 0)
+ {
+ xub_StrLen nEnd = headString.Search( sal_Unicode( '\t' ) );
+ if( nEnd == STRING_NOTFOUND )
+ {
+ if(sRet.Len()>0)
+ {
+ sRet += ',';
+ }
+ if(headString.Len()>0)
+ {
+ sRet += headString ;
+ sRet += ':' ;
+ }
+ }
+ else
+ {
+ String aString=headString.GetToken(nHeaderCur, sal_Unicode( '\t' ) );
+ if(sRet.Len()>0)
+ {
+ sRet += ',';
+ }
+ if( aString.Len() > 0)
+ {
+ sRet += aString ;
+ sRet += ':' ;
+ }
+ nHeaderCur++;
+ }
+ // if (pItem->IsA() == SV_ITEM_ID_LBOXSTRING)
+ sRet += static_cast<SvLBoxString*>( pItem )->GetText();
+ // else
+ // sRet += static_cast<SvLBoxString*>( pItem )->GetExtendText();
+ }
+ else
+ {
+ // if (pItem->IsA() == SV_ITEM_ID_LBOXSTRING)
+ sRet += static_cast<SvLBoxString*>( pItem )->GetText();
+ // else
+ // sRet += static_cast<SvLBoxString*>( pItem )->GetExtendText();
+ sRet += ',';
+ }
+ //end want to the column header
+ }
+ nCur++;
+ }
+
+ if (sRet.Len() > 0)
+ sRet = sRet.Erase(sRet.Len() - 1);
+ return sRet;
+}
+//-----IAccessibility2 Implementation 2009
String SvTreeListBox::SearchEntryText( SvLBoxEntry* pEntry ) const
{
DBG_CHKTHIS(SvTreeListBox,0);
@@ -806,18 +890,45 @@ void SvTreeListBox::RequestingChilds( SvLBoxEntry* pParent )
void SvTreeListBox::GetFocus()
{
DBG_CHKTHIS(SvTreeListBox,0);
+ //IAccessibility2 Implementation 2009-----
+ //Solution:If there is no item in the tree,draw focus.
+ if( !SvLBox::First())
+ {
+ Invalidate();
+ }
+ //-----IAccessibility2 Implementation 2009
pImp->GetFocus();
SvLBox::GetFocus();
SvLBoxEntry* pEntry = FirstSelected();
+ //IAccessibility2 Implementation 2009-----
+ if ( !pEntry )
+ {
+ pEntry = pImp->GetCurrentEntry();
+ }
+ if (pImp->pCursor)
+ {
+ if (pEntry != pImp->pCursor)
+ pEntry = pImp->pCursor;
+ }
+ //IAccessibility2 Implementation 2009-----
if ( pEntry )
- pImp->CallEventListeners( VCLEVENT_LISTBOX_SELECT, pEntry );
+ //pImp->CallEventListeners( VCLEVENT_LISTBOX_SELECT, pEntry );
+ pImp->CallEventListeners( VCLEVENT_LISTBOX_TREEFOCUS, pEntry );
+ //-----IAccessibility2 Implementation 2009
}
void SvTreeListBox::LoseFocus()
{
DBG_CHKTHIS(SvTreeListBox,0);
+ //IAccessibility2 Implementation 2009-----
+ //Solution:If there is no item in the tree,delete visual focus.
+ if( !SvLBox::First())
+ {
+ Invalidate();
+ }
+ //-----IAccessibility2 Implementation 2009
pImp->LoseFocus();
SvLBox::LoseFocus();
}
@@ -1064,7 +1175,9 @@ sal_Bool SvTreeListBox::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
if( bSelect )
{
SelectHdl();
- pImp->CallEventListeners( VCLEVENT_LISTBOX_SELECT, pEntry );
+ // IA2 CWS
+ // pImp->CallEventListeners( VCLEVENT_LISTBOX_SELECT, pEntry );
+ CallEventListeners( VCLEVENT_LISTBOX_TREESELECT, pEntry);
}
else
DeselectHdl();
@@ -1185,6 +1298,24 @@ void SvTreeListBox::Paint( const Rectangle& rRect )
if( nTreeFlags & TREEFLAG_RECALCTABS )
SetTabs();
pImp->Paint( rRect );
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Add visual focus draw
+ if( !SvLBox::First() )
+ {
+ if( HasFocus() )
+ {
+ long tempHeight = GetTextHeight();
+ Rectangle tempRect(
+ Point(0,0),Size(GetSizePixel().Width(),tempHeight)
+ );
+ ShowFocus(tempRect);
+ }
+
+ else{
+ HideFocus();
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
}
void SvTreeListBox::MouseButtonDown( const MouseEvent& rMEvt )
@@ -2644,6 +2775,14 @@ void SvTreeListBox::FillAccessibleEntryStateSet( SvLBoxEntry* pEntry, ::utl::Acc
rStateSet.AddState( AccessibleStateType::EXPANDABLE );
if ( IsExpanded( pEntry ) )
rStateSet.AddState( (sal_Int16)AccessibleStateType::EXPANDED );
+ // IA2 CWS
+ /*
+ else
+ {
+ // MT: COLLAPSE == EXPANDABLE & !EXPANDED
+ rStateSet.AddState( (sal_Int16)AccessibleStateType::COLLAPSE );
+ }
+ */
}
if ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED )
@@ -2652,6 +2791,21 @@ void SvTreeListBox::FillAccessibleEntryStateSet( SvLBoxEntry* pEntry, ::utl::Acc
rStateSet.AddState( AccessibleStateType::VISIBLE );
if ( IsSelected( pEntry ) )
rStateSet.AddState( AccessibleStateType::SELECTED );
+ //IAccessibility2 Implementation 2009-----
+ if ( IsEnabled() )
+ {
+ rStateSet.AddState( AccessibleStateType::ENABLED );
+ rStateSet.AddState( AccessibleStateType::FOCUSABLE );
+ rStateSet.AddState( AccessibleStateType::SELECTABLE );
+ SvViewDataEntry* pViewDataNewCur = 0;
+ if( pEntry )
+ {
+ pViewDataNewCur= GetViewDataEntry(pEntry);
+ if(pViewDataNewCur->HasFocus())
+ rStateSet.AddState( AccessibleStateType::FOCUSED );
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
}
Rectangle SvTreeListBox::GetBoundingRect( SvLBoxEntry* pEntry )
@@ -2675,3 +2829,4 @@ void SvTreeListBox::FillAccessibleStateSet( ::utl::AccessibleStateSetHelper& rSt
{
SvLBox::FillAccessibleStateSet( rStateSet );
}
+
diff --git a/svtools/source/control/accessibleruler.cxx b/svtools/source/control/accessibleruler.cxx
new file mode 100644
index 000000000000..dbb2dc3491f9
--- /dev/null
+++ b/svtools/source/control/accessibleruler.cxx
@@ -0,0 +1,547 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svtools.hxx"
+
+#ifndef _SVTRULERACCESSIBLE_HXX
+#include <svtools/accessibleruler.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTID_HPP_
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#endif
+#ifndef _UTL_ACCESSIBLESTATESETHELPER_HXX_
+#include <unotools/accessiblestatesethelper.hxx>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYCHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
+#include <com/sun/star/awt/XWindow.hpp>
+#endif
+
+#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
+#include <cppuhelper/typeprovider.hxx>
+#endif
+
+#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
+#include <toolkit/helper/vclunohelper.hxx>
+#endif
+#ifndef _TOOLKIT_HELPER_CONVERT_HXX_
+#include <toolkit/helper/convert.hxx>
+#endif
+
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+
+#ifndef _OSL_MUTEX_HXX_
+#include <osl/mutex.hxx>
+#endif
+#ifndef _RTL_UUID_H_
+#include <rtl/uuid.h>
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _SV_GEN_HXX
+#include <tools/gen.hxx>
+#endif
+
+#include "ruler.hxx"
+
+#ifndef COMPHELPER_ACCESSIBLE_EVENT_NOTIFIER
+#include <comphelper/accessibleeventnotifier.hxx>
+#endif
+
+using namespace ::cppu;
+using namespace ::osl;
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::accessibility;
+
+DBG_NAME( SvtRulerAccessible )
+
+
+//===== internal ============================================================
+
+SvtRulerAccessible::SvtRulerAccessible(
+ const uno::Reference< XAccessible >& rxParent, Ruler& rRepr, const OUString& rName ) :
+
+ SvtRulerAccessible_Base( m_aMutex ),
+ msName( rName ),
+ mxParent( rxParent ),
+ mpRepr( &rRepr ),
+ mnClientId( 0 )
+{
+ DBG_CTOR( SvtRulerAccessible, NULL );
+}
+
+SvtRulerAccessible::~SvtRulerAccessible()
+{
+ DBG_DTOR( SvtRulerAccessible, NULL );
+
+ if( IsAlive() )
+ {
+ osl_incrementInterlockedCount( &m_refCount );
+ dispose(); // set mpRepr = NULL & release all childs
+ }
+}
+
+//===== XAccessible =========================================================
+
+uno::Reference< XAccessibleContext > SAL_CALL SvtRulerAccessible::getAccessibleContext( void ) throw( RuntimeException )
+{
+ return this;
+}
+
+//===== XAccessibleComponent ================================================
+
+sal_Bool SAL_CALL SvtRulerAccessible::containsPoint( const awt::Point& rPoint ) throw( RuntimeException )
+{
+ // no guard -> done in getBounds()
+// return GetBoundingBox().IsInside( VCLPoint( rPoint ) );
+ return Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) );
+}
+
+uno::Reference< XAccessible > SAL_CALL SvtRulerAccessible::getAccessibleAtPoint( const awt::Point& ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ThrowExceptionIfNotAlive();
+
+ uno::Reference< XAccessible > xRet;
+
+
+ return xRet;
+}
+
+awt::Rectangle SAL_CALL SvtRulerAccessible::getBounds() throw( RuntimeException )
+{
+ // no guard -> done in GetBoundingBox()
+ return AWTRectangle( GetBoundingBox() );
+}
+
+awt::Point SAL_CALL SvtRulerAccessible::getLocation() throw( RuntimeException )
+{
+ // no guard -> done in GetBoundingBox()
+ return AWTPoint( GetBoundingBox().TopLeft() );
+}
+
+awt::Point SAL_CALL SvtRulerAccessible::getLocationOnScreen() throw( RuntimeException )
+{
+ // no guard -> done in GetBoundingBoxOnScreen()
+ return AWTPoint( GetBoundingBoxOnScreen().TopLeft() );
+}
+
+awt::Size SAL_CALL SvtRulerAccessible::getSize() throw( RuntimeException )
+{
+ // no guard -> done in GetBoundingBox()
+ return AWTSize( GetBoundingBox().GetSize() );
+}
+
+sal_Bool SAL_CALL SvtRulerAccessible::isShowing() throw( RuntimeException )
+{
+ return sal_True;
+}
+
+sal_Bool SAL_CALL SvtRulerAccessible::isVisible() throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ThrowExceptionIfNotAlive();
+
+ return mpRepr->IsVisible();
+}
+
+sal_Bool SAL_CALL SvtRulerAccessible::isFocusTraversable() throw( RuntimeException )
+{
+ return sal_True;
+}
+
+//===== XAccessibleContext ==================================================
+
+sal_Int32 SAL_CALL SvtRulerAccessible::getAccessibleChildCount( void ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ThrowExceptionIfNotAlive();
+
+ return 0;
+}
+
+uno::Reference< XAccessible > SAL_CALL SvtRulerAccessible::getAccessibleChild( sal_Int32 )
+ throw( RuntimeException, lang::IndexOutOfBoundsException )
+{
+ uno::Reference< XAccessible > xChild ;
+
+ return xChild;
+}
+
+uno::Reference< XAccessible > SAL_CALL SvtRulerAccessible::getAccessibleParent( void ) throw( RuntimeException )
+{
+ return mxParent;
+}
+
+sal_Int32 SAL_CALL SvtRulerAccessible::getAccessibleIndexInParent( void ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ // Use a simple but slow solution for now. Optimize later.
+
+ // Iterate over all the parent's children and search for this object.
+ if( mxParent.is() )
+ {
+ uno::Reference< XAccessibleContext > xParentContext( mxParent->getAccessibleContext() );
+ if( xParentContext.is() )
+ {
+ sal_Int32 nChildCount = xParentContext->getAccessibleChildCount();
+ for( sal_Int32 i = 0 ; i < nChildCount ; ++i )
+ {
+ uno::Reference< XAccessible > xChild( xParentContext->getAccessibleChild( i ) );
+ if( xChild.get() == ( XAccessible* ) this )
+ return i;
+ }
+ }
+ }
+
+ // Return -1 to indicate that this object's parent does not know about the
+ // object.
+ return -1;
+}
+
+sal_Int16 SAL_CALL SvtRulerAccessible::getAccessibleRole( void ) throw( RuntimeException )
+{
+ return AccessibleRole::RULER;
+}
+
+OUString SAL_CALL SvtRulerAccessible::getAccessibleDescription( void ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ return msDescription;
+}
+
+OUString SAL_CALL SvtRulerAccessible::getAccessibleName( void ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ return msName;
+}
+
+/** Return empty uno::Reference to indicate that the relation set is not
+ supported.
+*/
+uno::Reference< XAccessibleRelationSet > SAL_CALL SvtRulerAccessible::getAccessibleRelationSet( void ) throw( RuntimeException )
+{
+ return uno::Reference< XAccessibleRelationSet >();
+}
+
+
+uno::Reference< XAccessibleStateSet > SAL_CALL SvtRulerAccessible::getAccessibleStateSet( void ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper;
+
+ if( IsAlive() )
+ {
+ pStateSetHelper->AddState( AccessibleStateType::ENABLED );
+
+ if( isShowing() )
+ pStateSetHelper->AddState( AccessibleStateType::SHOWING );
+
+ if( isVisible() )
+ pStateSetHelper->AddState( AccessibleStateType::VISIBLE );
+
+
+ if ( mpRepr )
+ {
+ if ( mpRepr->GetStyle() & WB_HORZ )
+ pStateSetHelper->AddState( AccessibleStateType::HORIZONTAL );
+ else
+ pStateSetHelper->AddState( AccessibleStateType::VERTICAL );
+ }
+ if(pStateSetHelper->contains(AccessibleStateType::FOCUSABLE))
+ {
+ pStateSetHelper->RemoveState( AccessibleStateType::FOCUSABLE );
+ }
+
+ }
+
+
+ return pStateSetHelper;
+}
+
+lang::Locale SAL_CALL SvtRulerAccessible::getLocale( void ) throw( IllegalAccessibleComponentStateException, RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if( mxParent.is() )
+ {
+ uno::Reference< XAccessibleContext > xParentContext( mxParent->getAccessibleContext() );
+ if( xParentContext.is() )
+ return xParentContext->getLocale();
+ }
+
+ // No parent. Therefore throw exception to indicate this cluelessness.
+ throw IllegalAccessibleComponentStateException();
+}
+
+void SAL_CALL SvtRulerAccessible::addEventListener( const uno::Reference< XAccessibleEventListener >& xListener )
+ throw( RuntimeException )
+{
+ if (xListener.is())
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if (!mnClientId)
+ mnClientId = comphelper::AccessibleEventNotifier::registerClient( );
+ comphelper::AccessibleEventNotifier::addEventListener( mnClientId, xListener );
+ }
+}
+
+void SAL_CALL SvtRulerAccessible::removeEventListener( const uno::Reference< XAccessibleEventListener >& xListener )
+ throw( RuntimeException )
+{
+ if (xListener.is())
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ sal_Int32 nListenerCount = comphelper::AccessibleEventNotifier::removeEventListener( mnClientId, xListener );
+ if ( !nListenerCount )
+ {
+ // no listeners anymore
+ // -> revoke ourself. This may lead to the notifier thread dying (if we were the last client),
+ // and at least to us not firing any events anymore, in case somebody calls
+ // NotifyAccessibleEvent, again
+ comphelper::AccessibleEventNotifier::revokeClient( mnClientId );
+ mnClientId = 0;
+ }
+ }
+}
+
+void SAL_CALL SvtRulerAccessible::addFocusListener( const uno::Reference< awt::XFocusListener >& xListener )
+ throw( RuntimeException )
+{
+ if( xListener.is() )
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ThrowExceptionIfNotAlive();
+
+ uno::Reference< awt::XWindow > xWindow = VCLUnoHelper::GetInterface( mpRepr );
+ if( xWindow.is() )
+ xWindow->addFocusListener( xListener );
+ }
+}
+
+void SAL_CALL SvtRulerAccessible::removeFocusListener( const uno::Reference< awt::XFocusListener >& xListener )
+ throw (RuntimeException)
+{
+ if( xListener.is() )
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ThrowExceptionIfNotAlive();
+
+ uno::Reference< awt::XWindow > xWindow = VCLUnoHelper::GetInterface( mpRepr );
+ if( xWindow.is() )
+ xWindow->removeFocusListener( xListener );
+ }
+}
+
+void SAL_CALL SvtRulerAccessible::grabFocus() throw( RuntimeException )
+{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ThrowExceptionIfNotAlive();
+
+ mpRepr->GrabFocus();
+}
+
+Any SAL_CALL SvtRulerAccessible::getAccessibleKeyBinding() throw( RuntimeException )
+{
+ // here is no implementation, because here are no KeyBindings for every object
+ return Any();
+}
+
+sal_Int32 SvtRulerAccessible::getForeground( )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ThrowExceptionIfNotAlive();
+
+ return mpRepr->GetControlForeground().GetColor();
+}
+sal_Int32 SvtRulerAccessible::getBackground( )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ThrowExceptionIfNotAlive();
+
+ return mpRepr->GetControlBackground().GetColor();
+}
+
+//===== XServiceInfo ========================================================
+
+OUString SAL_CALL SvtRulerAccessible::getImplementationName( void ) throw( RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.ui.SvtRulerAccessible" ) );
+}
+
+sal_Bool SAL_CALL SvtRulerAccessible::supportsService( const OUString& sServiceName ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ // Iterate over all supported service names and return true if on of them
+ // matches the given name.
+ Sequence< OUString > aSupportedServices( getSupportedServiceNames() );
+ int nLength = aSupportedServices.getLength();
+ const OUString* pStr = aSupportedServices.getConstArray();
+
+ for( int i = nLength ; i ; --i, ++pStr )
+ {
+ if( sServiceName == *pStr )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+Sequence< OUString > SAL_CALL SvtRulerAccessible::getSupportedServiceNames( void ) throw( RuntimeException )
+{
+ const OUString sServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.accessibility.AccessibleContext" ) );
+ return Sequence< OUString >( &sServiceName, 1 );
+}
+
+//===== XTypeProvider =======================================================
+
+Sequence< sal_Int8 > SAL_CALL SvtRulerAccessible::getImplementationId( void ) throw( RuntimeException )
+{
+ return getUniqueId();
+}
+
+
+//===== internals ========================================================
+
+void SvtRulerAccessible::setName( const OUString& rName )
+{
+ msName = rName;
+
+}
+
+void SvtRulerAccessible::setDescription( const OUString& rDescr )
+{
+
+ msDescription = rDescr;
+
+}
+
+
+
+void SAL_CALL SvtRulerAccessible::disposing()
+{
+ if( !rBHelper.bDisposed )
+ {
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ mpRepr = NULL; // object dies with representation
+
+ }
+
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ // Send a disposing to all listeners.
+ if ( mnClientId )
+ {
+ comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing( mnClientId, *this );
+ mnClientId = 0;
+ }
+ mxParent = uno::Reference< XAccessible >();
+ }
+ }
+}
+
+Rectangle SvtRulerAccessible::GetBoundingBoxOnScreen( void ) throw( RuntimeException )
+{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ThrowExceptionIfNotAlive();
+//IAccessibility2 Implementation 2009-----
+ //the absolute on screen pixel is wrong
+ //return Rectangle( mpRepr->GetParent()->OutputToScreenPixel( mpRepr->GetPosPixel() ), mpRepr->GetSizePixel() );
+ return Rectangle( mpRepr->GetParent()->OutputToAbsoluteScreenPixel( mpRepr->GetPosPixel() ), mpRepr->GetSizePixel() );
+//-----IAccessibility2 Implementation 2009
+}
+
+Rectangle SvtRulerAccessible::GetBoundingBox( void ) throw( RuntimeException )
+{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ThrowExceptionIfNotAlive();
+
+ return Rectangle( mpRepr->GetPosPixel(), mpRepr->GetSizePixel() );
+}
+
+Sequence< sal_Int8 > SvtRulerAccessible::getUniqueId( void )
+{
+ static OImplementationId* pId = 0;
+ if( !pId )
+ {
+ MutexGuard aGuard( Mutex::getGlobalMutex() );
+ if( !pId)
+ {
+ static OImplementationId aId;
+ pId = &aId;
+ }
+ }
+ return pId->getImplementationId();
+}
+
+void SvtRulerAccessible::ThrowExceptionIfNotAlive( void ) throw( lang::DisposedException )
+{
+ if( IsNotAlive() )
+ throw lang::DisposedException();
+}
+
+void SvtRulerAccessible::addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener )throw( com::sun::star::uno::RuntimeException )
+{
+ cppu::WeakAggComponentImplHelperBase::addEventListener( xListener );
+}
+
+void SvtRulerAccessible::removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw( com::sun::star::uno::RuntimeException )
+{
+ cppu::WeakAggComponentImplHelperBase::removeEventListener( xListener );
+}
+
+
+// -------------------------------------------------------------------------------------------------
+
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index e3b0c599056d..fca97ba5f065 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -42,6 +42,10 @@
#endif
#include <com/sun/star/accessibility/XAccessible.hpp>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <vclxaccessibleheaderbar.hxx>
+//-----IAccessibility2 Implementation 2009
// =======================================================================
struct ImplHeadItem
@@ -95,6 +99,9 @@ void HeaderBar::ImplInit( WinBits nWinStyle )
mbOutDrag = sal_False;
mbItemMode = sal_False;
+ //IAccessibility2 Implementation 2009-----
+ m_pVCLXHeaderBar = NULL;
+ //-----IAccessibility2 Implementation 2009
// StyleBits auswerten
if ( nWinStyle & WB_DRAG )
mbDragable = sal_True;
@@ -116,6 +123,9 @@ void HeaderBar::ImplInit( WinBits nWinStyle )
}
ImplInitSettings( sal_True, sal_True, sal_True );
+ //IAccessibility2 Implementation 2009-----
+ //SetAccessibleRole(com::sun::star::accessibility::AccessibleRole::COLUMN_HEADER);
+ //-----IAccessibility2 Implementation 2009
}
// -----------------------------------------------------------------------
@@ -1645,3 +1655,20 @@ void HeaderBar::SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::sta
mxAccessible = _xAccessible;
}
+//IAccessibility2 Implementation 2009-----
+::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > HeaderBar::GetComponentInterface( sal_Bool bCreate )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xPeer
+ (Window::GetComponentInterface(false));
+ if ( !xPeer.is() && bCreate )
+ {
+ ::com::sun::star::awt::XWindowPeer* mxPeer = new VCLXHeaderBar(this);
+ m_pVCLXHeaderBar = (VCLXHeaderBar*)(mxPeer);
+ SetComponentInterface(mxPeer);
+ return mxPeer;
+ }
+ else
+ return xPeer;
+}
+//-----IAccessibility2 Implementation 2009
+
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index fa75681c8cc6..04830ff28395 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -32,7 +32,15 @@
#define _SV_RULER_CXX
#include <svtools/ruler.hxx>
-
+//IAccessibility2 Implementation 2009-----
+#include <svtools/svtdata.hxx>
+#include <svtools/svtools.hrc>
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::accessibility;
+//-----IAccessibility2 Implementation 2009
// =======================================================================
#define RULER_OFF 3
@@ -299,7 +307,10 @@ void Ruler::ImplInit( WinBits nWinBits )
else
aDefSize.Width() = nDefHeight;
SetOutputSizePixel( aDefSize );
+ //IAccessibility2 Implementation 2009-----
SetType(WINDOW_RULER);
+ pAccContext = NULL;
+ //-----IAccessibility2 Implementation 2009
}
// -----------------------------------------------------------------------
@@ -323,6 +334,10 @@ Ruler::~Ruler()
Application::RemoveUserEvent( mnUpdateEvtId );
delete mpSaveData;
delete mpDragData;
+ //IAccessibility2 Implementation 2009-----
+ if( pAccContext )
+ pAccContext->release();
+ //-----IAccessibility2 Implementation 2009
}
// -----------------------------------------------------------------------
@@ -3179,3 +3194,31 @@ const RulerBorder* Ruler::GetBorders() const { return mpData->pBorders; }
sal_uInt16 Ruler::GetIndentCount() const { return mpData->nIndents; }
const RulerIndent* Ruler::GetIndents() const { return mpData->pIndents; }
+//IAccessibility2 Implementation 2009-----
+uno::Reference< XAccessible > Ruler::CreateAccessible()
+{
+ Window* pParent = GetAccessibleParentWindow();
+ DBG_ASSERT( pParent, "-SvxRuler::CreateAccessible(): No Parent!" );
+ uno::Reference< XAccessible > xAccParent = pParent->GetAccessible();
+ if( xAccParent.is() )
+ {
+ // MT: Fixed compiler issue because the address from a temporary object was used.
+ // BUT: Shoudl it really be a Pointer, instead of const&???
+ OUString aStr;
+ if ( mnWinStyle & WB_HORZ )
+ {
+ aStr = OUString(XubString(SvtResId(STR_SVT_ACC_RULER_HORZ_NAME)));
+ }
+ else
+ {
+ aStr = OUString(XubString(SvtResId(STR_SVT_ACC_RULER_VERT_NAME)));
+ }
+ pAccContext = new SvtRulerAccessible( xAccParent, *this, aStr );
+ pAccContext->acquire();
+ this->SetAccessible(pAccContext);
+ return pAccContext;
+ }
+ else
+ return uno::Reference< XAccessible >();
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/svtools/source/control/ruler.src b/svtools/source/control/ruler.src
new file mode 100644
index 000000000000..98698d0292f0
--- /dev/null
+++ b/svtools/source/control/ruler.src
@@ -0,0 +1,32 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "svtools/svtools.hrc"
+
+String STR_SVT_ACC_RULER_HORZ_NAME
+{
+ Text[ en-US ] = "Horizontal Ruler";
+};
+String STR_SVT_ACC_RULER_VERT_NAME
+{
+ Text[ en-US ] = "Vertical Ruler";
+};
+
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx
index d60b94d49143..e70841b22442 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -34,6 +34,15 @@
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLERELATIONTYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#endif
+#ifndef _UTL_ACCESSIBLERELATIONSETHELPER_HXX_
+#include <unotools/accessiblerelationsethelper.hxx>
+#endif
+//-----IAccessibility2 Implementation 2009
using namespace ::com::sun::star;
// ----------------
@@ -316,6 +325,9 @@ sal_Int16 SAL_CALL ValueSetAcc::getAccessibleRole()
Window* pLabel = mpParent->GetAccessibleRelationLabeledBy();
if ( pLabel && pLabel != mpParent )
aRet = OutputDevice::GetNonMnemonicString( pLabel->GetText() );
+
+ if ( !aRet.Len() )
+ aRet = mpParent->GetQuickHelpText();
}
return aRet;
@@ -327,7 +339,32 @@ uno::Reference< accessibility::XAccessibleRelationSet > SAL_CALL ValueSetAcc::ge
throw (uno::RuntimeException)
{
ThrowIfDisposed();
- return uno::Reference< accessibility::XAccessibleRelationSet >();
+//IAccessibility2 Implementation 2009-----
+ uno::Reference< accessibility::XAccessibleRelationSet > xRelSet;
+ Window* pWindow = (Window*)mpParent;
+ if ( pWindow )
+ {
+ utl::AccessibleRelationSetHelper* pRelationSet = new utl::AccessibleRelationSetHelper;
+ xRelSet = pRelationSet;
+
+ Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
+ if ( pLabeledBy && pLabeledBy != pWindow )
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = pLabeledBy->GetAccessible();
+ pRelationSet->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABELED_BY, aSequence ) );
+ }
+
+ Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf();
+ if ( pMemberOf && pMemberOf != pWindow )
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = pMemberOf->GetAccessible();
+ pRelationSet->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
+ }
+ }
+ return xRelSet;
+//-----IAccessibility2 Implementation 2009
}
// -----------------------------------------------------------------------------
@@ -755,7 +792,10 @@ ValueSetItem* ValueSetAcc::getItem (sal_uInt16 nIndex) const
nIndex -= 1;
}
if (pItem == NULL)
- pItem = mpParent->ImplGetVisibleItem (static_cast<sal_uInt16>(nIndex));
+//IAccessibility2 Implementation 2009-----
+ //pItem = mpParent->ImplGetVisibleItem (static_cast<sal_uInt16>(nIndex));
+ pItem = mpParent->ImplGetItem (static_cast<sal_uInt16>(nIndex));
+//-----IAccessibility2 Implementation 2009
return pItem;
}
@@ -939,7 +979,10 @@ sal_Int32 SAL_CALL ValueItemAcc::getAccessibleIndexInParent()
// just in case the number of children changes in the mean time.
try
{
- pItem = mpParent->mrParent.ImplGetVisibleItem (i);
+//IAccessibility2 Implementation 2009-----
+ //pItem = mpParent->mrParent.ImplGetVisibleItem (i);
+ pItem = mpParent->mrParent.ImplGetItem(i);
+//-----IAccessibility2 Implementation 2009
}
catch (lang::IndexOutOfBoundsException aException)
{
@@ -956,6 +999,17 @@ sal_Int32 SAL_CALL ValueItemAcc::getAccessibleIndexInParent()
}
}
+//IAccessibility2 Implementation 2009-----
+ //if this valueset contain a none field(common value is default), then we should increase the real index and set the noitem index value equal 0.
+ if ( mpParent && ( (mpParent->mrParent.GetStyle() & WB_NONEFIELD) != 0 ) )
+ {
+ ValueSetItem* pFirstItem = mpParent->mrParent.ImplGetItem (VALUESET_ITEM_NONEITEM);
+ if( pFirstItem && pFirstItem ->GetAccessible(mbIsTransientChildrenDisabled).get() == this )
+ nIndexInParent = 0;
+ else
+ nIndexInParent++;
+ }
+//-----IAccessibility2 Implementation 2009
return nIndexInParent;
}
diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx
index 947985d0102e..301ac7965400 100644
--- a/svtools/source/control/valueimp.hxx
+++ b/svtools/source/control/valueimp.hxx
@@ -87,6 +87,9 @@ struct ValueSetItem
XubString maText;
void* mpData;
Rectangle maRect;
+ //IAccessibility2 Implementation 2009-----
+ sal_Bool bSelected:1;
+ //-----IAccessibility2 Implementation 2009
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >* mpxAcc;
ValueSetItem( ValueSet& rParent );
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 819bcb5346e2..834cda0b470a 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -1219,7 +1219,9 @@ sal_uInt16 ValueSet::ImplGetVisibleItemCount() const
{
ValueSetItem* pItem = mpImpl->mpItemList->GetObject( n );
- if( pItem->meType != VALUESETITEM_SPACE && !pItem->maRect.IsEmpty() )
+ //IAccessible2 implementation - also count empty rectangles as visible...
+ // if( pItem->meType != VALUESETITEM_SPACE && !pItem->maRect.IsEmpty() )
+ if( pItem->meType != VALUESETITEM_SPACE )
nRet++;
}
@@ -1905,6 +1907,24 @@ void ValueSet::InsertItem( sal_uInt16 nItemId, const Color& rColor,
Invalidate();
}
+//IAccessibility2 Implementation 2009-----
+//method to set accessible when the style is user draw.
+void ValueSet::InsertItem( sal_uInt16 nItemId, const XubString& rText, sal_uInt16 nPos )
+{
+ DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" );
+ DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND,
+ "ValueSet::InsertItem(): ItemId already exists" );
+ ValueSetItem* pItem = new ValueSetItem( *this );
+ pItem->mnId = nItemId;
+ pItem->meType = VALUESETITEM_USERDRAW;
+ pItem->maText = rText;
+ mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
+ mbFormat = sal_True;
+ if ( IsReallyVisible() && IsUpdateMode() )
+ Invalidate();
+}
+//-----IAccessibility2 Implementation 2009
+
// -----------------------------------------------------------------------
void ValueSet::InsertItem( sal_uInt16 nItemId, sal_uInt16 nPos )
@@ -2779,6 +2799,60 @@ void ValueSet::SetEdgeBlending(bool bNew)
}
}
}
+//IAccessibility2 Implementation 2009-----
+//For sending out the focused event on the first focused item when this valueset is first focused.
+// MT: Focus notifications changed in DEV300 meanwhile, so this is not used for now.
+// Just keeping it here for reference, in case something in out implementation doesn't work as expected...
+/*
+void ValueSet::SetFocusedItem(sal_Bool bFocused)
+{
+ if( ImplHasAccessibleListeners() )
+ {
+ // selection event
+ ::com::sun::star::uno::Any aSelOldAny, aSelNewAny;
+ if ( mnSelItemId >= 0)
+ {
+ // focus event (select)
+ sal_uInt16 nPos = GetItemPos( mnSelItemId );
+
+ ValueSetItem* pItem;
+ if ((GetStyle() & WB_NONEFIELD) != 0
+ && nPos == VALUESET_ITEM_NOTFOUND
+ && mnSelItemId == 0)
+ {
+ // When present the first item is the then allways visible none field.
+ pItem = ImplGetItem (VALUESET_ITEM_NONEITEM);
+ }
+ else
+ {
+ if (nPos == VALUESET_ITEM_NOTFOUND)
+ nPos = 0;
+ pItem = mpImpl->mpItemList->GetObject(nPos);
+ }
+ ValueItemAcc* pItemAcc = NULL;
+ if (pItem != NULL)
+ pItemAcc = ValueItemAcc::getImplementation(pItem->GetAccessible(mpImpl->mbIsTransientChildrenDisabled) );
+ if( pItemAcc )
+ {
+ if (bFocused)
+ aSelNewAny <<= pItem->GetAccessible(mpImpl->mbIsTransientChildrenDisabled);
+ else
+ aSelOldAny <<= pItem->GetAccessible(mpImpl->mbIsTransientChildrenDisabled);
+ }
+ ImplFireAccessibleEvent( ::com::sun::star::accessibility::AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aSelOldAny, aSelNewAny );
+ if (pItemAcc && bFocused)
+ {
+ pItemAcc->FireAccessibleEvent(
+ ::com::sun::star::accessibility::AccessibleEventId::SELECTION_CHANGED,
+ ::com::sun::star::uno::Any(),::com::sun::star::uno::Any());
+ }
+ }
+ }
+}
+*/
+//end
+//-----IAccessibility2 Implementation 2009
+
// -----------------------------------------------------------------------
// eof
diff --git a/svtools/source/control/vclxaccessibleheaderbar.cxx b/svtools/source/control/vclxaccessibleheaderbar.cxx
new file mode 100644
index 000000000000..9e4744c3e99e
--- /dev/null
+++ b/svtools/source/control/vclxaccessibleheaderbar.cxx
@@ -0,0 +1,193 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+//IAccessibility2 Implementation 2009-----
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svtools.hxx"
+
+#ifndef _SVTOOLS_VCLXACCESSIBLEHEADERBAR_HXX_
+#include <svtools/vclxaccessibleheaderbar.hxx>
+#endif
+#ifndef _SVTOOLS_VCLACCESSIBLEHEADBARITEM_HXX_
+#include <svtools/vclxaccessibleheaderbaritem.hxx>
+#endif
+
+#ifndef _TOOLKIT_AWT_VCLXWINDOWS_HXX_
+#include <toolkit/awt/vclxwindows.hxx>
+#endif
+#ifndef _HEADBAR_HXX
+#include <headbar.hxx>
+#endif
+#ifndef _UTL_ACCESSIBLESTATESETHELPER_HXX_
+#include <unotools/accessiblestatesethelper.hxx>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTID_HPP_
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#endif
+#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
+#include <cppuhelper/typeprovider.hxx>
+#endif
+#ifndef _COMPHELPER_SEQUENCE_HXX_
+#include <comphelper/sequence.hxx>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::accessibility;
+using namespace ::comphelper;
+
+VCLXHeaderBar::VCLXHeaderBar(Window* pHeaderBar)
+{
+ SetWindow(pHeaderBar);
+}
+
+VCLXHeaderBar::~VCLXHeaderBar()
+{
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > VCLXHeaderBar::CreateAccessibleContext()
+{
+ return new VCLXAccessibleHeaderBar(this);
+}
+
+
+VCLXAccessibleHeaderBar::VCLXAccessibleHeaderBar( VCLXWindow* pVCLWindow )
+ :VCLXAccessibleComponent( pVCLWindow )
+ ,m_pHeadBar(NULL)
+{
+ m_pHeadBar = static_cast< HeaderBar* >( GetWindow() );
+}
+
+// -----------------------------------------------------------------------------
+
+VCLXAccessibleHeaderBar::~VCLXAccessibleHeaderBar()
+{
+}
+
+// -----------------------------------------------------------------------------
+
+void VCLXAccessibleHeaderBar::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
+{
+ VCLXAccessibleComponent::ProcessWindowEvent( rVclWindowEvent );
+}
+
+// -----------------------------------------------------------------------------
+
+void VCLXAccessibleHeaderBar::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet )
+{
+ VCLXAccessibleComponent::FillAccessibleStateSet( rStateSet );
+}
+
+// -----------------------------------------------------------------------------
+// XServiceInfo
+// -----------------------------------------------------------------------------
+
+::rtl::OUString VCLXAccessibleHeaderBar::getImplementationName() throw (RuntimeException)
+{
+ return ::rtl::OUString::createFromAscii( "com.sun.star.comp.toolkit.AccessibleHeaderBar" );
+}
+
+// -----------------------------------------------------------------------------
+
+Sequence< ::rtl::OUString > VCLXAccessibleHeaderBar::getSupportedServiceNames() throw (RuntimeException)
+{
+ Sequence< ::rtl::OUString > aNames(1);
+ aNames[0] = ::rtl::OUString::createFromAscii( "com.sun.star.awt.AccessibleHeaderBar" );
+ return aNames;
+}
+
+// =======XAccessibleContext=======
+
+sal_Int32 SAL_CALL VCLXAccessibleHeaderBar::getAccessibleChildCount( )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ sal_Int32 nCount = 0;
+ if ( m_pHeadBar )
+ nCount = m_pHeadBar->GetItemCount();
+
+ return nCount;
+}
+::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ VCLXAccessibleHeaderBar::getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ if ( i < 0 || i >= getAccessibleChildCount() )
+ throw IndexOutOfBoundsException();
+
+ Reference< XAccessible > xChild;
+ // search for the child
+ if ( static_cast<sal_uInt16>(i) >= m_aAccessibleChildren.size() )
+ xChild = CreateChild (i);
+ else
+ {
+ xChild = m_aAccessibleChildren[i];
+ if ( !xChild.is() )
+ xChild = CreateChild (i);
+ }
+ return xChild;
+}
+
+sal_Int16 SAL_CALL VCLXAccessibleHeaderBar::getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException)
+{
+ return com::sun::star::accessibility::AccessibleRole::LIST;
+}
+
+void SAL_CALL VCLXAccessibleHeaderBar::disposing (void)
+{
+ ListItems().swap(m_aAccessibleChildren);
+ VCLXAccessibleComponent::disposing();
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > VCLXAccessibleHeaderBar::CreateChild (sal_Int32 i)
+{
+ Reference<XAccessible> xChild;
+
+ sal_uInt16 nPos = static_cast<sal_uInt16>(i);
+ if ( nPos >= m_aAccessibleChildren.size() )
+ {
+ m_aAccessibleChildren.resize(nPos + 1);
+
+ // insert into the container
+ xChild = new VCLXAccessibleHeaderBarItem(m_pHeadBar, i);
+ m_aAccessibleChildren[nPos] = xChild;
+ }
+ else
+ {
+ xChild = m_aAccessibleChildren[nPos];
+ // check if position is empty and can be used else we have to adjust all entries behind this
+ if ( !xChild.is() )
+ {
+ xChild = new VCLXAccessibleHeaderBarItem(m_pHeadBar, i);
+ m_aAccessibleChildren[nPos] = xChild;
+ }
+ }
+ return xChild;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/svtools/source/control/vclxaccessibleheaderbaritem.cxx b/svtools/source/control/vclxaccessibleheaderbaritem.cxx
new file mode 100644
index 000000000000..1072a3b81a9a
--- /dev/null
+++ b/svtools/source/control/vclxaccessibleheaderbaritem.cxx
@@ -0,0 +1,404 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+//IAccessibility2 Implementation 2009-----
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svtools.hxx"
+
+#ifndef _SVTOOLS_VCLXACCESSIBLEHEADERBAR_HXX_
+#include <svtools/vclxaccessibleheaderbaritem.hxx>
+#endif
+
+#ifndef _HEADBAR_HXX
+#include <svtools/headbar.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTID_HPP_
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#endif
+
+#ifndef _UTL_ACCESSIBLESTATESETHELPER_HXX_
+#include <unotools/accessiblestatesethelper.hxx>
+#endif
+#ifndef _UTL_ACCESSIBLERELATIONSETHELPER_HXX_
+#include <unotools/accessiblerelationsethelper.hxx>
+#endif
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _TOOLKIT_AWT_VCLXFONT_HXX_
+#include <toolkit/awt/vclxfont.hxx>
+#endif
+#ifndef _TOOLKIT_HELPER_EXTERNALLOCK_HXX_
+#include <toolkit/helper/externallock.hxx>
+#endif
+#ifndef _TOOLKIT_HELPER_CONVERT_HXX_
+#include <toolkit/helper/convert.hxx>
+#endif
+
+#include <vector>
+
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::accessibility;
+using namespace ::comphelper;
+
+DBG_NAME( VCLXAccessibleHeaderBarItem )
+
+// ----------------------------------------------------
+// class AccessibleTabBar
+// ----------------------------------------------------
+
+VCLXAccessibleHeaderBarItem::VCLXAccessibleHeaderBarItem( HeaderBar* pHeadBar, sal_Int32 _nIndexInParent )
+ :AccessibleExtendedComponentHelper_BASE( new VCLExternalSolarLock() )
+ ,m_pHeadBar( pHeadBar )
+ ,m_nIndexInParent(_nIndexInParent + 1)
+
+{
+ DBG_CTOR( VCLXAccessibleHeaderBarItem, NULL );
+ m_pExternalLock = static_cast< VCLExternalSolarLock* >( getExternalLock() );
+}
+
+// -----------------------------------------------------------------------------
+
+VCLXAccessibleHeaderBarItem::~VCLXAccessibleHeaderBarItem()
+{
+ delete m_pExternalLock;
+ m_pExternalLock = NULL;
+}
+
+// -----------------------------------------------------------------------------
+
+IMPL_LINK( VCLXAccessibleHeaderBarItem, WindowEventListener, VclSimpleEvent*, pEvent )
+{
+ DBG_CHKTHIS( VCLXAccessibleHeaderBarItem, 0 );
+ VclWindowEvent* pVclWindowEvent = dynamic_cast< VclWindowEvent* >(pEvent);
+ DBG_ASSERT(pVclWindowEvent , "VCLXAccessibleHeaderBarItem::WindowEventListener: unknown window event!" );
+
+ if ( pVclWindowEvent )
+ {
+ DBG_ASSERT( ((VclWindowEvent*)pEvent)->GetWindow(), "VCLXAccessibleHeaderBarItem::WindowEventListener: no window!" );
+ if ( !((VclWindowEvent*)pEvent)->GetWindow()->IsAccessibilityEventsSuppressed() || ( pEvent->GetId() == VCLEVENT_OBJECT_DYING ) )
+ {
+ ProcessWindowEvent( *(VclWindowEvent*)pEvent );
+ }
+ }
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------------
+
+void VCLXAccessibleHeaderBarItem::ProcessWindowEvent( const VclWindowEvent& )
+{
+ Any aOldValue, aNewValue;
+}
+
+// -----------------------------------------------------------------------------
+
+void VCLXAccessibleHeaderBarItem::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet )
+{
+ if ( m_pHeadBar )
+ {
+ if ( m_pHeadBar->IsEnabled() )
+ rStateSet.AddState( AccessibleStateType::ENABLED );
+
+ if ( m_pHeadBar->IsVisible() )
+ {
+ rStateSet.AddState( AccessibleStateType::VISIBLE );
+ }
+ rStateSet.AddState( AccessibleStateType::SELECTABLE );
+ rStateSet.AddState( AccessibleStateType::RESIZABLE );
+ }
+}
+
+// -----------------------------------------------------------------------------
+// OCommonAccessibleComponent
+// -----------------------------------------------------------------------------
+
+awt::Rectangle VCLXAccessibleHeaderBarItem::implGetBounds() throw (RuntimeException)
+{
+ awt::Rectangle aBounds;
+ OExternalLockGuard aGuard( this );
+
+ ::com::sun::star::awt::Size aSize;
+
+ if ( m_pHeadBar )
+ aBounds = AWTRectangle( m_pHeadBar->GetItemRect( sal_uInt16( m_nIndexInParent ) ) );
+
+ return aBounds;
+}
+
+// -----------------------------------------------------------------------------
+// XInterface
+// -----------------------------------------------------------------------------
+
+IMPLEMENT_FORWARD_XINTERFACE2( VCLXAccessibleHeaderBarItem, AccessibleExtendedComponentHelper_BASE, VCLXAccessibleHeaderBarItem_BASE )
+
+// -----------------------------------------------------------------------------
+// XTypeProvider
+// -----------------------------------------------------------------------------
+
+IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXAccessibleHeaderBarItem, AccessibleExtendedComponentHelper_BASE, VCLXAccessibleHeaderBarItem_BASE )
+
+// -----------------------------------------------------------------------------
+// XComponent
+// -----------------------------------------------------------------------------
+
+void VCLXAccessibleHeaderBarItem::disposing()
+{
+ AccessibleExtendedComponentHelper_BASE::disposing();
+}
+
+// -----------------------------------------------------------------------------
+// XServiceInfo
+// -----------------------------------------------------------------------------
+
+::rtl::OUString VCLXAccessibleHeaderBarItem::getImplementationName() throw (RuntimeException)
+{
+ return ::rtl::OUString::createFromAscii( "com.sun.star.comp.svtools.AccessibleHeaderBarItem" );
+}
+
+// -----------------------------------------------------------------------------
+
+sal_Bool VCLXAccessibleHeaderBarItem::supportsService( const ::rtl::OUString& rServiceName ) throw (RuntimeException)
+{
+ Sequence< ::rtl::OUString > aNames( getSupportedServiceNames() );
+ const ::rtl::OUString* pNames = aNames.getConstArray();
+ const ::rtl::OUString* pEnd = pNames + aNames.getLength();
+ for ( ; pNames != pEnd && !pNames->equals( rServiceName ); ++pNames )
+ ;
+
+ return pNames != pEnd;
+}
+
+// -----------------------------------------------------------------------------
+
+Sequence< ::rtl::OUString > VCLXAccessibleHeaderBarItem::getSupportedServiceNames() throw (RuntimeException)
+{
+ Sequence< ::rtl::OUString > aNames(1);
+ aNames[0] = ::rtl::OUString::createFromAscii( "com.sun.star.awt.AccessibleHeaderBarItem" );
+ return aNames;
+}
+
+// -----------------------------------------------------------------------------
+// XAccessible
+// -----------------------------------------------------------------------------
+
+Reference< XAccessibleContext > VCLXAccessibleHeaderBarItem::getAccessibleContext() throw (RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ return this;
+}
+
+// -----------------------------------------------------------------------------
+// XAccessibleContext
+// -----------------------------------------------------------------------------
+
+sal_Int32 VCLXAccessibleHeaderBarItem::getAccessibleChildCount() throw (RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------------
+
+Reference< XAccessible > VCLXAccessibleHeaderBarItem::getAccessibleChild( sal_Int32 i ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ if ( i < 0 || i >= getAccessibleChildCount() )
+ throw IndexOutOfBoundsException();
+
+ return Reference< XAccessible >();
+}
+
+// -----------------------------------------------------------------------------
+
+Reference< XAccessible > VCLXAccessibleHeaderBarItem::getAccessibleParent() throw (RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ Reference< XAccessible > xParent;
+ if ( m_pHeadBar )
+ {
+ xParent = m_pHeadBar->GetAccessible();
+ }
+
+ return xParent;
+}
+
+// -----------------------------------------------------------------------------
+
+sal_Int32 VCLXAccessibleHeaderBarItem::getAccessibleIndexInParent() throw (RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+ return m_nIndexInParent - 1;
+}
+
+// -----------------------------------------------------------------------------
+
+sal_Int16 VCLXAccessibleHeaderBarItem::getAccessibleRole() throw (RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ return AccessibleRole::COLUMN_HEADER;
+}
+
+// -----------------------------------------------------------------------------
+
+::rtl::OUString VCLXAccessibleHeaderBarItem::getAccessibleDescription() throw (RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+ ::rtl::OUString sDescription;
+ return sDescription;
+}
+
+// -----------------------------------------------------------------------------
+
+::rtl::OUString VCLXAccessibleHeaderBarItem::getAccessibleName() throw (RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ ::rtl::OUString sName;
+ if(m_pHeadBar)
+ sName = m_pHeadBar->GetItemText( sal_uInt16( m_nIndexInParent ) );
+ return sName;
+}
+
+// -----------------------------------------------------------------------------
+
+Reference< XAccessibleRelationSet > VCLXAccessibleHeaderBarItem::getAccessibleRelationSet( ) throw (RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
+ Reference< XAccessibleRelationSet > xSet = pRelationSetHelper;
+ return xSet;
+}
+
+// -----------------------------------------------------------------------------
+
+Reference< XAccessibleStateSet > VCLXAccessibleHeaderBarItem::getAccessibleStateSet( ) throw (RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper;
+ Reference< XAccessibleStateSet > xSet = pStateSetHelper;
+
+ if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
+ {
+ FillAccessibleStateSet( *pStateSetHelper );
+ }
+ else
+ {
+ pStateSetHelper->AddState( AccessibleStateType::DEFUNC );
+ }
+
+ return xSet;
+}
+
+// -----------------------------------------------------------------------------
+
+com::sun::star::lang::Locale VCLXAccessibleHeaderBarItem::getLocale() throw (IllegalAccessibleComponentStateException, RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ return Application::GetSettings().GetLocale();
+}
+
+// -----------------------------------------------------------------------------
+// XAccessibleComponent
+// -----------------------------------------------------------------------------
+
+Reference< XAccessible > VCLXAccessibleHeaderBarItem::getAccessibleAtPoint( const awt::Point& ) throw (RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ return Reference< XAccessible >();
+}
+
+// -----------------------------------------------------------------------------
+
+sal_Int32 VCLXAccessibleHeaderBarItem::getForeground() throw (RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ sal_Int32 nColor = 0;
+ return nColor;
+}
+
+// -----------------------------------------------------------------------------
+
+sal_Int32 VCLXAccessibleHeaderBarItem::getBackground() throw (RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ sal_Int32 nColor = 0;
+ return nColor;
+}
+
+// -----------------------------------------------------------------------------
+// XAccessibleExtendedComponent
+// -----------------------------------------------------------------------------
+
+Reference< awt::XFont > VCLXAccessibleHeaderBarItem::getFont() throw (RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ Reference< awt::XFont > xFont;
+ return xFont;
+}
+
+// -----------------------------------------------------------------------------
+
+::rtl::OUString VCLXAccessibleHeaderBarItem::getTitledBorderText() throw (RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ ::rtl::OUString sText;
+ return sText;
+}
+
+// -----------------------------------------------------------------------------
+
+::rtl::OUString VCLXAccessibleHeaderBarItem::getToolTipText() throw (RuntimeException)
+{
+ OExternalLockGuard aGuard( this );
+
+ ::rtl::OUString sText;
+ if ( m_pHeadBar )
+ sText = m_pHeadBar->GetQuickHelpText();
+
+ return sText;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/svtools/source/edit/svmedit.cxx b/svtools/source/edit/svmedit.cxx
index e9837e17ed61..527dc0d871b6 100644
--- a/svtools/source/edit/svmedit.cxx
+++ b/svtools/source/edit/svmedit.cxx
@@ -942,7 +942,9 @@ void TextWindow::Command( const CommandEvent& rCEvt )
void TextWindow::GetFocus()
{
- Window::GetFocus();
+//IAccessibility2 Implementation 2009-----
+ //Window::GetFocus();
+//-----IAccessibility2 Implementation 2009
if ( !mbActivePopup )
{
sal_Bool bGotoCursor = !mpExtTextView->IsReadOnly();
@@ -1249,8 +1251,10 @@ void MultiLineEdit::GetFocus()
{
if ( !pImpSvMEdit ) // might be called from within the dtor, when pImpSvMEdit == NULL is a valid state
return;
-
- Edit::GetFocus();
+ //IAccessibility2 Implementation 2009-----
+ //Disable the focused event on scroll pane
+ //Edit::GetFocus();
+ //-----IAccessibility2 Implementation 2009
pImpSvMEdit->GetFocus();
}
diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx
index fd7d3ff2b9cc..908caaecafab 100644
--- a/svtools/source/misc/acceleratorexecute.cxx
+++ b/svtools/source/misc/acceleratorexecute.cxx
@@ -72,6 +72,9 @@
#include <vcl/window.hxx>
#include <vcl/svapp.hxx>
#include <vos/mutex.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <comphelper/uieventslogger.hxx>
+//-----IAccessibility2 Implementation 2009
//===============================================
// namespace
@@ -249,6 +252,24 @@ sal_Bool AcceleratorExecute::execute(const css::awt::KeyEvent& aAWTKey)
sal_Bool bRet = xDispatch.is();
if ( bRet )
{
+//IAccessibility2 Implementation 2009-----
+ if(::comphelper::UiEventsLogger::isEnabled() && m_xSMGR.is() && m_xDispatcher.is()) //#i88653#
+ {
+ try
+ {
+ css::uno::Reference< css::frame::XModuleManager > xModuleDetection(
+ m_xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager")),
+ css::uno::UNO_QUERY_THROW);
+
+ const ::rtl::OUString sModule = xModuleDetection->identify(m_xDispatcher);
+ css::uno::Sequence<css::beans::PropertyValue> source;
+ ::comphelper::UiEventsLogger::appendDispatchOrigin(source, sModule, ::rtl::OUString::createFromAscii("AcceleratorExecute"));
+ ::comphelper::UiEventsLogger::logDispatch(aURL, source);
+ }
+ catch(const css::uno::Exception&)
+ { }
+ }
+//-----IAccessibility2 Implementation 2009
// Note: Such instance can be used one times only and destroy itself afterwards .-)
AsyncAccelExec* pExec = AsyncAccelExec::createOnShotInstance(xDispatch, aURL);
pExec->execAsync();
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 61a87c436085..92c3f2cfddaf 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -34,7 +34,14 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/streamwrap.hxx>
-
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/chart2/XCoordinateSystem.hpp>
+#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
+#include <com/sun/star/chart2/XDiagram.hpp>
+#include <com/sun/star/chart2/XChartTypeContainer.hpp>
+#include <com/sun/star/chart2/XChartType.hpp>
+//-----IAccessibility2 Implementation 2009
#include <tools/globname.hxx>
#include <sot/clsids.hxx>
#include <com/sun/star/util/XModifyListener.hpp>
@@ -937,6 +944,102 @@ sal_Bool EmbeddedObjectRef::IsChart() const
return sal_False;
}
+//IAccessibility2 Implementation 2009-----
+// MT: Only used for getting accessible attributes, which are not localized
+rtl::OUString EmbeddedObjectRef::GetChartType()
+{
+ rtl::OUString Style;
+ if ( mxObj.is() )
+ {
+ if ( IsChart() )
+ {
+ if ( svt::EmbeddedObjectRef::TryRunningState( mxObj ) )
+ {
+ uno::Reference< chart2::XChartDocument > xChart( mxObj->getComponent(), uno::UNO_QUERY );
+ if (xChart.is())
+ {
+ uno::Reference< chart2::XDiagram > xDiagram( xChart->getFirstDiagram());
+ if( ! xDiagram.is())
+ return String();
+ uno::Reference< chart2::XCoordinateSystemContainer > xCooSysCnt( xDiagram, uno::UNO_QUERY_THROW );
+ uno::Sequence< uno::Reference< chart2::XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems());
+ // IA2 CWS. Unused: int nCoordinateCount = aCooSysSeq.getLength();
+ sal_Bool bGetChartType = sal_False;
+ for( sal_Int32 nCooSysIdx=0; nCooSysIdx<aCooSysSeq.getLength(); ++nCooSysIdx )
+ {
+ uno::Reference< chart2::XChartTypeContainer > xCTCnt( aCooSysSeq[nCooSysIdx], uno::UNO_QUERY_THROW );
+ uno::Sequence< uno::Reference< chart2::XChartType > > aChartTypes( xCTCnt->getChartTypes());
+ int nDimesionCount = aCooSysSeq[nCooSysIdx]->getDimension();
+ if( nDimesionCount == 3 )
+ Style += rtl::OUString::createFromAscii("3D ");
+ else
+ Style += rtl::OUString::createFromAscii("2D ");
+ for( sal_Int32 nCTIdx=0; nCTIdx<aChartTypes.getLength(); ++nCTIdx )
+ {
+ rtl::OUString strChartType = aChartTypes[nCTIdx]->getChartType();
+ if (strChartType.equals(::rtl::OUString::createFromAscii("com.sun.star.chart2.AreaChartType")))
+ {
+ Style += rtl::OUString::createFromAscii("Areas");
+ bGetChartType = sal_True;
+ }
+ else if (strChartType.equals(::rtl::OUString::createFromAscii("com.sun.star.chart2.BarChartType")))
+ {
+ Style += rtl::OUString::createFromAscii("Bars");
+ bGetChartType = sal_True;
+ }
+ else if (strChartType.equals(::rtl::OUString::createFromAscii("com.sun.star.chart2.ColumnChartType")))
+ {
+ uno::Reference< beans::XPropertySet > xProp( aCooSysSeq[nCooSysIdx], uno::UNO_QUERY );
+ if( xProp.is())
+ {
+ bool bCurrent = false;
+ if( xProp->getPropertyValue( rtl::OUString::createFromAscii("SwapXAndYAxis") ) >>= bCurrent )
+ {
+ if (bCurrent)
+ Style += rtl::OUString::createFromAscii("Bars");
+ else
+ Style += rtl::OUString::createFromAscii("Columns");
+ bGetChartType = sal_True;
+ }
+ }
+ }
+ else if (strChartType.equals(::rtl::OUString::createFromAscii("com.sun.star.chart2.LineChartType")))
+ {
+ Style += rtl::OUString::createFromAscii("Lines");
+ bGetChartType = sal_True;
+ }
+ else if (strChartType.equals(::rtl::OUString::createFromAscii("com.sun.star.chart2.ScatterChartType")))
+ {
+ Style += rtl::OUString::createFromAscii("XY Chart");
+ bGetChartType = sal_True;
+ }
+ else if (strChartType.equals(::rtl::OUString::createFromAscii("com.sun.star.chart2.PieChartType")))
+ {
+ Style += rtl::OUString::createFromAscii("Pies");
+ bGetChartType = sal_True;
+ }
+ else if (strChartType.equals(::rtl::OUString::createFromAscii("com.sun.star.chart2.NetChartType")))
+ {
+ Style += rtl::OUString::createFromAscii("Radar");
+ bGetChartType = sal_True;
+ }
+ else if (strChartType.equals(::rtl::OUString::createFromAscii("com.sun.star.chart2.CandleStickChartType")))
+ {
+ Style += rtl::OUString::createFromAscii("Candle Stick Chart");
+ bGetChartType = sal_True;
+ }
+ if (bGetChartType)
+ return Style;
+ }
+ }
+ }
+ }
+ }
+ }
+ return Style;
+}
+//-----IAccessibility2 Implementation 2009
+
// #i104867#
sal_uInt32 EmbeddedObjectRef::getGraphicVersion() const
{
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index 6b33e6830003..b4bbb7683c49 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -78,6 +78,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
svx/source/accessibility/AccessibleShape \
svx/source/accessibility/AccessibleShapeInfo \
svx/source/accessibility/AccessibleShapeTreeInfo \
+ svx/source/accessibility/AccessibleSvxFindReplaceDialog \
svx/source/accessibility/AccessibleTextEventQueue \
svx/source/accessibility/AccessibleTextHelper \
svx/source/accessibility/charmapacc \
@@ -87,6 +88,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
svx/source/accessibility/DGColorNameLookUp \
svx/source/accessibility/GraphCtlAccessibleContext \
svx/source/accessibility/ShapeTypeHandler \
+ svx/source/accessibility/svxpixelctlaccessiblecontext \
svx/source/accessibility/svxrectctaccessiblecontext \
svx/source/accessibility/SvxShapeTypes \
svx/source/customshapes/EnhancedCustomShape3d \
diff --git a/svx/inc/svx/AccessibleControlShape.hxx b/svx/inc/svx/AccessibleControlShape.hxx
index e78c667ebd54..77ce0b295d13 100644
--- a/svx/inc/svx/AccessibleControlShape.hxx
+++ b/svx/inc/svx/AccessibleControlShape.hxx
@@ -63,6 +63,10 @@ public:
const AccessibleShapeTreeInfo& rShapeTreeInfo);
virtual ~AccessibleControlShape( );
+ //IAccessibility2 Implementation 2009-----
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL GetControlModel( ) { return m_xControlModel;} ;
+ AccessibleControlShape* SAL_CALL GetLabeledByControlShape();
+ //-----IAccessibility2 Implementation 2009
protected:
//--- XAccessible ----------------------------------------
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL getAccessibleContext( ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/svx/inc/svx/AccessibleGraphicShape.hxx b/svx/inc/svx/AccessibleGraphicShape.hxx
index 20a560b6d3c0..c91ed1abccdb 100644
--- a/svx/inc/svx/AccessibleGraphicShape.hxx
+++ b/svx/inc/svx/AccessibleGraphicShape.hxx
@@ -89,7 +89,9 @@ public:
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL
getTypes (void)
throw (::com::sun::star::uno::RuntimeException);
-
+/// Return this object's role.
+ virtual sal_Int16 SAL_CALL getAccessibleRole (void) throw (::com::sun::star::uno::RuntimeException);
+//-----IAccessibility2 Implementation 2009
protected:
/// Create a name string that contains the accessible name.
virtual ::rtl::OUString
diff --git a/svx/inc/svx/AccessibleOLEShape.hxx b/svx/inc/svx/AccessibleOLEShape.hxx
index 656fc306d363..5c3011d89955 100644
--- a/svx/inc/svx/AccessibleOLEShape.hxx
+++ b/svx/inc/svx/AccessibleOLEShape.hxx
@@ -99,7 +99,10 @@ public:
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL
getTypes (void)
throw (::com::sun::star::uno::RuntimeException);
-
+//IAccessibility2 Implementation 2009-----
+// ====== XAccessibleExtendedAttributes =====================================
+ virtual ::com::sun::star::uno::Any SAL_CALL getExtendedAttributes() throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+//-----IAccessibility2 Implementation 2009
protected:
/// Create a name string that contains the accessible name.
virtual ::rtl::OUString
diff --git a/svx/inc/svx/AccessibleShape.hxx b/svx/inc/svx/AccessibleShape.hxx
index cbcee52be4c9..279f4ba15c32 100644
--- a/svx/inc/svx/AccessibleShape.hxx
+++ b/svx/inc/svx/AccessibleShape.hxx
@@ -37,6 +37,30 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <svx/AccessibleTextHelper.hxx>
#include "svx/svxdllapi.h"
+//IAccessibility2 Implementation 2009-----
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLESELECTION_HPP_
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLETEXT_HPP_
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XAccessibleExtendedAttributes_HPP_
+#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEGROUPPOSITION_HPP_
+#include <com/sun/star/accessibility/XAccessibleGroupPosition.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEHYPERTEXT_HPP_
+#include <com/sun/star/accessibility/XAccessibleHypertext.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEHYPERTEXT_HPP_
+#include <com/sun/star/accessibility/XAccessibleHypertext.hpp>
+#endif
+#ifndef INCLUDED_COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEHYPERLINK_HPP
+#include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
+#endif
+//-----IAccessibility2 Implementation 2009
+
#include "ChildrenManager.hxx"
class SdrObject;
@@ -74,6 +98,12 @@ class IAccessibleParent;
class SVX_DLLPUBLIC AccessibleShape
: public AccessibleContextBase,
public AccessibleComponentBase,
+ //IAccessibility2 Implementation 2009-----
+ public ::com::sun::star::accessibility::XAccessibleSelection,
+ public ::com::sun::star::accessibility::XAccessibleExtendedAttributes,
+ public ::com::sun::star::accessibility::XAccessibleGroupPosition,
+ public com::sun::star::accessibility::XAccessibleHypertext,
+ //-----IAccessibility2 Implementation 2009
public IAccessibleViewForwarderListener,
public ::com::sun::star::document::XEventListener,
public ::com::sun::star::lang::XUnoTunnel
@@ -99,7 +129,56 @@ public:
AccessibleShape (
const AccessibleShapeInfo& rShapeInfo,
const AccessibleShapeTreeInfo& rShapeTreeInfo);
-
+ //IAccessibility2 Implementation 2009-----
+ AccessibleShape (
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape>& rxShape, const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxParent, const AccessibleShapeTreeInfo& rShapeTreeInfo, sal_Int32 nIndex = -1);
+ //Solution: Overwrite the object's current name.
+ virtual ::rtl::OUString SAL_CALL getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL getAccessibleRelationSet (void) throw (::com::sun::star::uno::RuntimeException);
+//===== XAccessibleSelection ============================================
+
+ virtual void SAL_CALL selectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Bool SAL_CALL isAccessibleChildSelected(
+ sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL clearAccessibleSelection( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL selectAllAccessibleChildren( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(
+ sal_Int32 nSelectedChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL deselectAccessibleChild(
+ sal_Int32 nSelectedChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ // ====== XAccessibleExtendedAttributes =====================================
+ virtual ::com::sun::star::uno::Any SAL_CALL getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ /// Return this object's role.
+ virtual sal_Int16 SAL_CALL getAccessibleRole (void) throw (::com::sun::star::uno::RuntimeException);
+ //===== XAccessibleGroupPosition =========================================
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getGroupPosition( const ::com::sun::star::uno::Any& rAny )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getObjectLink( const ::com::sun::star::uno::Any& accoject )
+ throw (::com::sun::star::uno::RuntimeException);
+ //-----IAccessibility2 Implementation 2009
/** The destructor releases its children manager and text engine if
still existent. These are responsible to send appropriate events.
*/
@@ -312,6 +391,32 @@ public:
static AccessibleShape* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxIFace ) throw();
sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+ //===== XAccessibleHypertext ========================================================
+ virtual sal_Int32 SAL_CALL getHyperLinkCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleHyperlink >
+ SAL_CALL getHyperLink( sal_Int32 nLinkIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getHyperLinkIndex( sal_Int32 nCharIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ //===== XAccesibleText ==================================================
+ virtual sal_Int32 SAL_CALL getCaretPosition( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);//Shen Zhen Jie changed sal_Unicode to sal_uInt32; change back to sal_Unicode
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getCharacterCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSelectedText( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionStart( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionEnd( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getText( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
//===== Misc ========================================================
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
@@ -378,7 +483,14 @@ protected:
virtual ::rtl::OUString
CreateAccessibleDescription (void)
throw (::com::sun::star::uno::RuntimeException);
-
+ //IAccessibility2 Implementation 2009-----
+ virtual ::rtl::OUString
+ GetFullAccessibleName(AccessibleShape *shape)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual::rtl::OUString GetStyle();
+ void UpdateDocumentAllSelState(::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet > &xStateSet);
+ //-----IAccessibility2 Implementation 2009
/** Update the <const>OPAQUE</const> and <const>SELECTED</const> state.
*/
virtual void UpdateStates (void);
@@ -392,6 +504,10 @@ private:
SVX_DLLPRIVATE explicit AccessibleShape (const AccessibleShape&);
/// Don't use the assignment operator. Do we need this?
SVX_DLLPRIVATE AccessibleShape& operator= (const AccessibleShape&);
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Old accessible name
+ ::rtl::OUString aAccName;
+ //-----IAccessibility2 Implementation 2009
/** Call this method when the title, name, or description of the mxShape
member (may) have been changed.
diff --git a/svx/inc/svx/AccessibleSvxFindReplaceDialog.hxx b/svx/inc/svx/AccessibleSvxFindReplaceDialog.hxx
new file mode 100644
index 000000000000..99efa9a5499a
--- /dev/null
+++ b/svx/inc/svx/AccessibleSvxFindReplaceDialog.hxx
@@ -0,0 +1,66 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+
+#ifndef _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_
+#define _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_
+#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_
+#include <toolkit/awt/vclxwindow.hxx>
+#endif
+#ifndef _TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX_
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#endif
+
+#ifndef _TOOLKIT_AWT_VCLXWINDOWS_HXX_
+#include <toolkit/awt/vclxwindows.hxx>
+#endif
+
+
+class VCLXAccessibleSvxFindReplaceDialog : public VCLXAccessibleComponent
+{
+public:
+ VCLXAccessibleSvxFindReplaceDialog(VCLXWindow* pVCLXindow);
+ virtual ~VCLXAccessibleSvxFindReplaceDialog();
+ virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet );
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+
+class VCLXSvxFindReplaceDialog : public VCLXDialog
+{
+public:
+ VCLXSvxFindReplaceDialog(Window* pSplDlg)
+ {
+ SetWindow(pSplDlg);
+ }
+ virtual ~VCLXSvxFindReplaceDialog()
+ {};
+private:
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext()
+ {
+ return new VCLXAccessibleSvxFindReplaceDialog(this);
+ }
+};
+#endif // _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_
diff --git a/svx/inc/svx/AccessibleTableShape.hxx b/svx/inc/svx/AccessibleTableShape.hxx
index 34e714603096..bc8ec8b0af18 100644
--- a/svx/inc/svx/AccessibleTableShape.hxx
+++ b/svx/inc/svx/AccessibleTableShape.hxx
@@ -34,6 +34,11 @@
#include <cppuhelper/implbase2.hxx>
#include <svx/AccessibleShape.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/view/XSelectionChangeListener.hpp>
+#include <com/sun/star/accessibility/XAccessibleTableSelection.hpp>
+#include <cppuhelper/compbase5.hxx>
+//-----IAccessibility2 Implementation 2009
#include <boost/noncopyable.hpp>
@@ -44,14 +49,22 @@ namespace sdr { namespace table {
namespace accessibility
{
class AccessibleTableShapeImpl;
+ //IAccessibility2 Implementation 2009
+ class AccessibleCell;
- typedef ::cppu::ImplInheritanceHelper2< AccessibleShape,
+ //IAccessibility2 Implementation 2009-----
+ /*typedef ::cppu::ImplInheritanceHelper2< AccessibleShape,
::com::sun::star::accessibility::XAccessibleSelection,
::com::sun::star::accessibility::XAccessibleTable
+ > AccessibleTableShape_Base;*/
+ typedef ::cppu::ImplInheritanceHelper2< AccessibleShape,
+ ::com::sun::star::accessibility::XAccessibleTable,
+ ::com::sun::star::view::XSelectionChangeListener
> AccessibleTableShape_Base;
+ //-----IAccessibility2 Implementation 2009
/** @descr
*/
-class AccessibleTableShape : boost::noncopyable, public AccessibleTableShape_Base
+class AccessibleTableShape : boost::noncopyable, public AccessibleTableShape_Base, public ::com::sun::star::accessibility::XAccessibleTableSelection
{
public:
AccessibleTableShape( const AccessibleShapeInfo& rShapeInfo, const AccessibleShapeTreeInfo& rShapeTreeInfo );
@@ -102,6 +115,17 @@ public:
virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw ( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw ( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw ( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+ //IAccessibility2 Implementation 2009-----
+ //===== XAccessibleTableSelection ============================================
+ virtual sal_Bool SAL_CALL selectRow( sal_Int32 row )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Bool SAL_CALL selectColumn( sal_Int32 column )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Bool SAL_CALL unselectRow( sal_Int32 row )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Bool SAL_CALL unselectColumn( sal_Int32 column )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ //-----IAccessibility2 Implementation 2009
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
@@ -109,7 +133,28 @@ public:
// XComponent
virtual void SAL_CALL disposing( );
+ // XSelectionChangeListener
+ virtual void SAL_CALL
+ disposing (const ::com::sun::star::lang::EventObject& Source)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL
+ selectionChanged (const ::com::sun::star::lang::EventObject& rEvent)
+ throw (::com::sun::star::uno::RuntimeException);
+ sal_Int32 mnPreviousSelectionCount;
using AccessibleShape::disposing;
+ //IAccessibility2 Implementation 2009-----
+ friend class AccessibleTableHeaderShape;
+
+ void getColumnAndRow( sal_Int32 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException );
+ // overwrite the SetState & ResetState to do special operation for table cell's internal text
+ virtual sal_Bool SetState (sal_Int16 aState);
+ virtual sal_Bool ResetState (sal_Int16 aState);
+ // The following two methods are used to set state directly on table object, instread of the internal cell or paragraph.
+ sal_Bool SetStateDirectly (sal_Int16 aState);
+ sal_Bool ResetStateDirectly (sal_Int16 aState);
+ // Get the currently active cell which is text editing
+ AccessibleCell* GetActiveAccessibleCell();
+ //-----IAccessibility2 Implementation 2009
protected:
virtual ::rtl::OUString CreateAccessibleBaseName(void) throw (::com::sun::star::uno::RuntimeException);
@@ -117,11 +162,97 @@ protected:
sdr::table::SvxTableController* getTableController();
void checkCellPosition( sal_Int32 nCol, sal_Int32 nRow ) throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
- void getColumnAndRow( sal_Int32 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException );
+ //IAccessibility2 Implementation 2009, move to public
+ //void getColumnAndRow( sal_Int32 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException );
private:
rtl::Reference< AccessibleTableShapeImpl > mxImpl;
+ //IAccessibility2 Implementation 2009-----
+ sal_Int32 GetIndexOfSelectedChild( sal_Int32 nSelectedChildIndex ) const;
+ //-----IAccessibility2 Implementation 2009
+};
+
+//IAccessibility2 Implementation 2009-----
+typedef ::cppu::WeakImplHelper5<
+ ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::accessibility::XAccessibleComponent,
+ ::com::sun::star::accessibility::XAccessibleContext,
+ ::com::sun::star::accessibility::XAccessibleTable,
+ ::com::sun::star::accessibility::XAccessibleTableSelection >
+ AccessibleTableHeaderShape_BASE;
+
+class AccessibleTableHeaderShape : boost::noncopyable,
+ public MutexOwner,
+ public AccessibleTableHeaderShape_BASE
+{
+public:
+ // bRow, sal_True means rowheader, sal_False means columnheader
+ AccessibleTableHeaderShape( AccessibleTableShape* pTable, sal_Bool bRow );
+ virtual ~AccessibleTableHeaderShape();
+
+ // XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL getAccessibleContext( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::lang::Locale SAL_CALL getLocale( ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
+
+ //XAccessibleComponent
+ virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocation( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleTable
+ virtual sal_Int32 SAL_CALL getAccessibleRowCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleColumnCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleCaption( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleSummary( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleTableSelection ============================================
+ virtual sal_Bool SAL_CALL selectRow( sal_Int32 row )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Bool SAL_CALL selectColumn( sal_Int32 column )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Bool SAL_CALL unselectRow( sal_Int32 row )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Bool SAL_CALL unselectColumn( sal_Int32 column )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+private:
+ SVX_DLLPRIVATE explicit AccessibleTableHeaderShape( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent );
+ sal_Bool mbRow;
+ rtl::Reference< AccessibleTableShape > mpTable;
};
+//-----IAccessibility2 Implementation 2009
} // end of namespace accessibility
diff --git a/svx/inc/svx/ChildrenManager.hxx b/svx/inc/svx/ChildrenManager.hxx
index 43c140c66ca3..ee662e1f06cb 100644
--- a/svx/inc/svx/ChildrenManager.hxx
+++ b/svx/inc/svx/ChildrenManager.hxx
@@ -130,6 +130,10 @@ public:
GetChild (long nIndex)
throw (::com::sun::star::uno::RuntimeException,
::com::sun::star::lang::IndexOutOfBoundsException);
+//IAccessibility2 Implementation 2009-----
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> GetChild (const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape>& xShape) throw (::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape> GetChildShape (long nIndex) throw (::com::sun::star::uno::RuntimeException);
+//-----IAccessibility2 Implementation 2009
/** Update the child manager. Take care of a modified set of children
and modified visible area. This method can optimize the update
diff --git a/svx/inc/svx/EnhancedCustomShapeTypeNames.hxx b/svx/inc/svx/EnhancedCustomShapeTypeNames.hxx
index 035680c911c9..01111ef9ab99 100644
--- a/svx/inc/svx/EnhancedCustomShapeTypeNames.hxx
+++ b/svx/inc/svx/EnhancedCustomShapeTypeNames.hxx
@@ -30,6 +30,9 @@ namespace EnhancedCustomShapeTypeNames
{
SVX_DLLPUBLIC MSO_SPT Get( const rtl::OUString& );
SVX_DLLPUBLIC rtl::OUString Get( const MSO_SPT );
+
+ //IAccessibility2 Implementation 2009
+ rtl::OUString GetAccName( const rtl::OUString& );
}
#endif
diff --git a/svx/inc/svx/IAccessibleParent.hxx b/svx/inc/svx/IAccessibleParent.hxx
index 26e8702f3678..e5706481bd61 100644
--- a/svx/inc/svx/IAccessibleParent.hxx
+++ b/svx/inc/svx/IAccessibleParent.hxx
@@ -27,7 +27,11 @@
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/drawing/XShape.hpp>
#include <sal/types.h>
-
+//IAccessibility2 Implementation 2009-----
+#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_MANAGER_HXX
+#include "AccessibleControlShape.hxx"
+#endif
+//-----IAccessibility2 Implementation 2009
namespace accessibility {
class AccessibleShape;
@@ -84,6 +88,18 @@ public:
const long _nIndex,
const AccessibleShapeTreeInfo& _rShapeTreeInfo
) throw (::com::sun::star::uno::RuntimeException) = 0;
+ //IAccessibility2 Implementation 2009-----
+ //Add this method to support Form Controls
+ virtual AccessibleControlShape* GetAccControlShapeFromModel
+ (::com::sun::star::beans::XPropertySet*)
+ throw (::com::sun::star::uno::RuntimeException){return NULL;};
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>
+ GetAccessibleCaption (const ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape>&)
+ throw (::com::sun::star::uno::RuntimeException){return NULL;};
+ virtual sal_Bool IsDocumentSelAll(){ return sal_False; }
+ //-----IAccessibility2 Implementation 2009
};
} // end of namespace accessibility
diff --git a/svx/inc/svx/ctredlin.hxx b/svx/inc/svx/ctredlin.hxx
index f47072f55ada..ac85bda98df3 100644
--- a/svx/inc/svx/ctredlin.hxx
+++ b/svx/inc/svx/ctredlin.hxx
@@ -299,6 +299,10 @@ public:
void Enable( bool bEnable = true, bool bChild = true );
void Disable( bool bChild = true );
+ //IAccessibility2 Implementation 2009-----
+ void SetAccessibleRelationMemberOf( Window* pWindow);
+ //-----IAccessibility2 Implementation 2009
+
// } Methoden fuer Calc
};
diff --git a/svx/inc/svx/dlgctrl.hxx b/svx/inc/svx/dlgctrl.hxx
index cd246c3cab51..8836cafb4efb 100644
--- a/svx/inc/svx/dlgctrl.hxx
+++ b/svx/inc/svx/dlgctrl.hxx
@@ -78,6 +78,7 @@ typedef sal_uInt16 CTL_STATE;
#define CS_NOVERT 2 // no vertikal input information is used
class SvxRectCtlAccessibleContext;
+class SvxPixelCtlAccessible; // IAccessibility2 implementation 2009
class SVX_DLLPUBLIC SvxRectCtl : public Control
{
@@ -214,7 +215,11 @@ protected:
Size aRectSize;
sal_uInt16* pPixel;
sal_Bool bPaintable;
-
+ // IAccessibility2 implementation 2009. ------
+ //Solution:Add member identifying position
+ Point aFocusPosition;
+ Rectangle implCalFocusRect( const Point& aPosition );
+ // ------ IAccessibility2 implementation 2009.
void ChangePixel( sal_uInt16 nPixel );
public:
@@ -240,6 +245,25 @@ public:
void SetPaintable( sal_Bool bTmp ) { bPaintable = bTmp; }
void Reset();
+ // IAccessibility2 implementation 2009. ------
+ SvxPixelCtlAccessible* m_pAccess;
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xAccess;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+ long GetSquares() const { return nSquares ; }
+ long GetWidth() const { return aRectSize.getWidth() ; }
+ long GetHeight() const { return aRectSize.getHeight() ; }
+
+ //Device Pixel .
+ long ShowPosition( const Point &pt);
+
+ long PointToIndex(const Point &pt) const;
+ Point IndexToPoint(long nIndex) const ;
+ long GetFoucsPosIndex() const ;
+ //Solution:Keyboard fucntion for key input and focus handling function
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ virtual void GetFocus();
+ virtual void LoseFocus();
+ // ------ IAccessibility2 implementation 2009.
};
/*************************************************************************
diff --git a/svx/inc/svx/nbdtmg.hxx b/svx/inc/svx/nbdtmg.hxx
index 8f2f29830e4c..b97a9e8dece1 100755
--- a/svx/inc/svx/nbdtmg.hxx
+++ b/svx/inc/svx/nbdtmg.hxx
@@ -199,7 +199,7 @@ class SVX_DLLPUBLIC NBOTypeMgrBase
private:
const SfxItemSet* pSet;
SfxMapUnit eCoreUnit;
- //Sym3_2508 store the attributes passed from pSet
+ // store the attributes passed from pSet
String aNumCharFmtName;
void StoreBulCharFmtName_impl();
void StoreMapUnit_impl();
@@ -217,7 +217,7 @@ class SVX_DLLPUBLIC NBOTypeMgrBase
virtual sal_Bool IsCustomized(sal_uInt16 nIndex)=0;
sal_uInt16 IsSingleLevel(sal_uInt16 nCurLevel);
const SfxItemSet* GetItems() { return pSet;}
- //Sym3_2508 store the attributes passed from pSet
+ // store the attributes passed from pSet
void SetItems(const SfxItemSet* pArg) { pSet = pArg;StoreBulCharFmtName_impl();StoreMapUnit_impl();}
protected:
String GetBulCharFmtName();
diff --git a/svx/inc/svx/sdr/table/tablecontroller.hxx b/svx/inc/svx/sdr/table/tablecontroller.hxx
index f6494ed6027e..4a82ef6dbd19 100755
--- a/svx/inc/svx/sdr/table/tablecontroller.hxx
+++ b/svx/inc/svx/sdr/table/tablecontroller.hxx
@@ -102,6 +102,19 @@ public:
SVX_DLLPRIVATE void onTableModified();
+//IAccessibility2 Implementation 2009-----
+ sal_Bool selectRow( sal_Int32 row );
+ sal_Bool selectColumn( sal_Int32 column );
+ sal_Bool deselectRow( sal_Int32 row );
+ sal_Bool deselectColumn( sal_Int32 column );
+ sal_Bool isRowSelected( sal_Int32 nRow );
+ sal_Bool isColumnSelected( sal_Int32 nColumn );
+ sal_Bool isRowHeader();
+ sal_Bool isColumnHeader();
+ ::sdr::table::SdrTableObj* GetTableObj() { return dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() ); }
+ //declare event notification method
+ void NotifySelection( const CellPos& firstPos, const CellPos& lastPos, const CellPos& newPos );
+//-----IAccessibility2 Implementation 2009
private:
SvxTableController(SvxTableController &); // not defined
void operator =(SvxTableController &); // not defined
diff --git a/svx/inc/svx/srchdlg.hxx b/svx/inc/svx/srchdlg.hxx
index c9fea638ebe3..72f66deeeab8 100644
--- a/svx/inc/svx/srchdlg.hxx
+++ b/svx/inc/svx/srchdlg.hxx
@@ -155,8 +155,19 @@ public:
PushButton& GetReplaceBtn() { return aReplaceBtn; }
sal_Int32 GetTransliterationFlags() const;
-
+//IAccessibility2 Impplementaton 2009-----
+ void SetDocWin( Window* pDocWin ) { mpDocWin = pDocWin; }
+ Window* GetDocWin() { return mpDocWin; }
+ void SetSrchFlag( sal_Bool bSuccess = sal_False ) { mbSuccess = bSuccess; }
+ sal_Bool GetSrchFlag() { return mbSuccess; }
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
+ GetComponentInterface( sal_Bool bCreate );
+//-----IAccessibility2 Impplementaton 2009
private:
+//IAccessibility2 Impplementaton 2009-----
+ Window* mpDocWin;
+ sal_Bool mbSuccess;
+//-----IAccessibility2 Impplementaton 2009
FixedText aSearchText;
ComboBox aSearchLB;
ListBox aSearchTmplLB;
diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx
index ba257e72bc45..efde64111f60 100644
--- a/svx/inc/svx/svdmodel.hxx
+++ b/svx/inc/svx/svdmodel.hxx
@@ -81,6 +81,13 @@ namespace comphelper { class IEmbeddedHelper; }
namespace sfx2 { class LinkManager; }
class SdrView;
+//IAccessibility2 Implementation 2009-----
+class ImageMap;
+//-----IAccessibility2 Implementation 2009
+
+namespace sfx2{
+ class LinkManager;
+}
////////////////////////////////////////////////////////////////////////////////////////////////////
#define SDR_SWAPGRAPHICSMODE_NONE 0x00000000
@@ -560,6 +567,11 @@ public:
static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelImplementationId();
+ //IAccessibility2 Implementation 2009-----
+ virtual ImageMap* GetImageMapForObject(SdrObject*){return NULL;};
+ virtual sal_Int32 GetHyperlinkCount(SdrObject*){return 0;}
+ //-----IAccessibility2 Implementation 2009
+
/** enables (true) or disables (false) recording of undo actions
If undo actions are added while undo is disabled, they are deleted.
Disabling undo does not clear the current undo buffer! */
diff --git a/svx/inc/svx/svdmrkv.hxx b/svx/inc/svx/svdmrkv.hxx
index b3b84913407c..4fd990f59acd 100644
--- a/svx/inc/svx/svdmrkv.hxx
+++ b/svx/inc/svx/svdmrkv.hxx
@@ -446,6 +446,9 @@ public:
// Endpunkt der Spiegelachse
const basegfx::B2DPoint& GetRef2() const { return maRef2; }
void SetRef2(const basegfx::B2DPoint& rPt);
+//IAccessibility2 Implementation 2009-----
+ void UnmarkObj(SdrObject* pObj);
+//-----IAccessibility2 Implementation 2009
};
#endif //_SVDMRKV_HXX
diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx
index b95a28d606fd..b3919367d3e0 100644
--- a/svx/inc/svx/svdoashp.hxx
+++ b/svx/inc/svx/svdoashp.hxx
@@ -219,6 +219,10 @@ public:
static bool doConstructOrthogonal(const ::rtl::OUString& rName);
virtual void setSdrObjectTransformation(const basegfx::B2DHomMatrix& rTransformation);
+
+ //IAccessibility2 Implementation 2009-----
+ ::rtl::OUString GetCustomShapeName();
+ //-----IAccessibility2 Implementation 2009
};
#endif //_SVDOASHP_HXX
diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx
index 5fecf89c5d21..a405cd4a6396 100644
--- a/svx/inc/svx/svdobj.hxx
+++ b/svx/inc/svx/svdobj.hxx
@@ -19,8 +19,6 @@
*
*************************************************************/
-
-
#ifndef _SVDOBJ_HXX
#define _SVDOBJ_HXX
diff --git a/svx/inc/svx/svdoole2.hxx b/svx/inc/svx/svdoole2.hxx
index c627df640bd3..4325ba76f384 100644
--- a/svx/inc/svx/svdoole2.hxx
+++ b/svx/inc/svx/svdoole2.hxx
@@ -90,6 +90,10 @@ public:
/// create a copy, evtl. with a different target model (if given)
virtual SdrObject* CloneSdrObject(SdrModel* pTargetModel = 0) const;
+//IAccessibility2 Implementation 2009-----
+ String GetStyleString();
+//-----IAccessibility2 Implementation 2009
+
// react on model/page change
virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage);
virtual bool IsClosedObj() const;
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx
index 9e7dbf622657..17f633f9b354 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -44,7 +44,23 @@
#include <svx/svdpagv.hxx>
#include "svx/svdstr.hrc"
#include <algorithm>
-
+//IAccessibility2 Implementation 2009-----
+#ifndef _COMPHELPER_PROPERTY_HXX_
+#include <comphelper/property.hxx>
+#endif
+#ifndef _COMPHELPER_TYPES_HXX_
+#include <comphelper/types.hxx>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
+#include <com/sun/star/container/XChild.hpp>
+#endif
+#ifndef _UTL_ACCESSIBLERELATIONSETHELPER_HXX_
+#include <unotools/accessiblerelationsethelper.hxx>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLERELATIONTYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#endif
+//-----IAccessibility2 Implementation 2009
using namespace ::comphelper;
using namespace ::accessibility;
using namespace ::com::sun::star::accessibility;
@@ -78,6 +94,14 @@ namespace
static ::rtl::OUString s_sLabelPropertyLabel( RTL_CONSTASCII_USTRINGPARAM( "Label" ) );
return s_sLabelPropertyLabel;
}
+ //IAccessibility2 Implementation 2009-----
+ //................................................................
+ const ::rtl::OUString& lcl_getLabelControlPropertyName( )
+ {
+ static ::rtl::OUString s_sLabelControlPropertyLabel( RTL_CONSTASCII_USTRINGPARAM( "LabelControl" ) );
+ return s_sLabelControlPropertyLabel;
+ }
+ //-----IAccessibility2 Implementation 2009
//................................................................
// return the property which should be used as AccessibleName
const ::rtl::OUString& lcl_getPreferredAccNameProperty( const Reference< XPropertySetInfo >& _rxPSI )
@@ -636,23 +660,57 @@ Reference< XAccessible > SAL_CALL AccessibleControlShape::getAccessibleChild( sa
Reference< XAccessibleRelationSet > SAL_CALL AccessibleControlShape::getAccessibleRelationSet( ) throw (RuntimeException)
{
// TODO
- return AccessibleShape::getAccessibleRelationSet( );
+ // return AccessibleShape::getAccessibleRelationSet( );
+ //IAccessibility2 Implementation 2009-----
+ utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
+ ensureControlModelAccess();
+ AccessibleControlShape* pCtlAccShape = GetLabeledByControlShape();
+ if(pCtlAccShape)
+ {
+ Reference < XAccessible > xAcc (pCtlAccShape->getAccessibleContext(), UNO_QUERY);
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > aSequence(1);
+ aSequence[0] = xAcc;
+ if( getAccessibleRole() == AccessibleRole::RADIO_BUTTON )
+ {
+ pRelationSetHelper->AddRelation( AccessibleRelation( AccessibleRelationType::MEMBER_OF, aSequence ) );
+ }
+ else
+ {
+ pRelationSetHelper->AddRelation( AccessibleRelation( AccessibleRelationType::LABELED_BY, aSequence ) );
+ }
+ }
+ Reference< XAccessibleRelationSet > xSet = pRelationSetHelper;
+ return xSet;
+ //-----IAccessibility2 Implementation 2009
}
//--------------------------------------------------------------------
::rtl::OUString AccessibleControlShape::CreateAccessibleName (void) throw (RuntimeException)
{
ensureControlModelAccess();
-
- // check if we can obtain the "Name" resp. "Label" property from the model
- const ::rtl::OUString& rAccNameProperty = lcl_getPreferredAccNameProperty( m_xModelPropsMeta );
-
- ::rtl::OUString sName( getControlModelStringProperty( rAccNameProperty ) );
- if ( !sName.getLength() )
- { // no -> use the default
- sName = AccessibleShape::CreateAccessibleName();
+ //IAccessibility2 Implementation 2009-----
+ ::rtl::OUString sName;
+ if ( getAccessibleRole() != AccessibleRole::SHAPE
+ && getAccessibleRole() != AccessibleRole::RADIO_BUTTON )
+ {
+ AccessibleControlShape* pCtlAccShape = GetLabeledByControlShape();
+ if(pCtlAccShape)
+ {
+ sName = pCtlAccShape->CreateAccessibleName();
+ }
}
-
+ if(sName.getLength() == 0)
+ {
+ // check if we can obtain the "Name" resp. "Label" property from the model
+ const ::rtl::OUString& rAccNameProperty = lcl_getPreferredAccNameProperty( m_xModelPropsMeta );
+ sName = getControlModelStringProperty( rAccNameProperty );
+ if ( !sName.getLength() )
+ { // no -> use the default
+ sName = AccessibleShape::CreateAccessibleName();
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
// now that somebody first asked us for our name, ensure that we are listening to name changes on the model
m_bListeningForName = ensureListeningState( m_bListeningForName, sal_True, lcl_getPreferredAccNameProperty( m_xModelPropsMeta ) );
@@ -914,3 +972,25 @@ void SAL_CALL AccessibleControlShape::elementReplaced( const ::com::sun::star::c
{
// not interested in
}
+//IAccessibility2 Implementation 2009-----
+AccessibleControlShape* SAL_CALL AccessibleControlShape::GetLabeledByControlShape( )
+{
+ if(m_xControlModel.is())
+ {
+ const ::rtl::OUString& rAccLabelControlProperty = lcl_getLabelControlPropertyName();
+ Any sCtlLabelBy;
+ // get the "label by" property value of the control
+ if (::comphelper::hasProperty(rAccLabelControlProperty, m_xControlModel))
+ {
+ m_xControlModel->getPropertyValue( rAccLabelControlProperty ) >>= sCtlLabelBy;
+ if( sCtlLabelBy.hasValue() )
+ {
+ Reference< XPropertySet > xAsSet (sCtlLabelBy, UNO_QUERY);
+ AccessibleControlShape* pCtlAccShape = mpParent->GetAccControlShapeFromModel(xAsSet.get());
+ return pCtlAccShape;
+ }
+ }
+ }
+ return NULL;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
index d83d490e1d36..4434bfa98a4a 100644
--- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx
+++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
@@ -154,7 +154,7 @@ namespace accessibility
OutputDevice* GetRefDevice() const { return NULL; }
sal_Bool GetIndexAtPoint( const Point&, sal_uInt16&, sal_uInt16& ) const { return sal_False; }
sal_Bool GetWordIndices( sal_uInt16, sal_uInt16, sal_uInt16&, sal_uInt16& ) const { return sal_False; }
- sal_Bool GetAttributeRun( sal_uInt16&, sal_uInt16&, sal_uInt16, sal_uInt16 ) const { return sal_False; }
+ sal_Bool GetAttributeRun( sal_uInt16&, sal_uInt16&, sal_uInt16, sal_uInt16, sal_Bool) const { return sal_False; }
sal_uInt16 GetLineCount( sal_uInt16 nPara ) const { return nPara == 0 ? 1 : 0; }
sal_uInt16 GetLineLen( sal_uInt16, sal_uInt16 ) const { return 0; }
void GetLineBoundaries( /*out*/sal_uInt16 & rStart, /*out*/sal_uInt16 & rEnd, sal_uInt16 /*nParagraph*/, sal_uInt16 /*nLine*/ ) const { rStart = rEnd = 0; }
diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx
index a7572be358ad..13fd7f98be23 100644
--- a/svx/source/accessibility/AccessibleFrameSelector.cxx
+++ b/svx/source/accessibility/AccessibleFrameSelector.cxx
@@ -190,7 +190,10 @@ sal_Int32 AccFrameSelector::getAccessibleIndexInParent( )
sal_Int16 AccFrameSelector::getAccessibleRole( ) throw (RuntimeException)
{
- return AccessibleRole::OPTION_PANE;
+ // return AccessibleRole::OPTION_PANE;
+ //IAccessibility2 Implementation 2009-----
+ return meBorder == FRAMEBORDER_NONE ? AccessibleRole::OPTION_PANE : AccessibleRole::CHECK_BOX;
+ //-----IAccessibility2 Implementation 2009
}
// ----------------------------------------------------------------------------
@@ -222,19 +225,43 @@ Reference< XAccessibleRelationSet > AccFrameSelector::getAccessibleRelationSet(
IsValid();
utl::AccessibleRelationSetHelper* pHelper;
Reference< XAccessibleRelationSet > xRet = pHelper = new utl::AccessibleRelationSetHelper;
+ //if(meBorder == FRAMEBORDER_NONE)
+ //{
+ // //add the label relation
+ // Window* pPrev = mpFrameSel->GetWindow( WINDOW_PREV );
+ // if(pPrev && WINDOW_FIXEDTEXT == pPrev->GetType())
+ // {
+ // AccessibleRelation aLabelRelation;
+ // aLabelRelation.RelationType = AccessibleRelationType::LABELED_BY;
+ // aLabelRelation.TargetSet.realloc(1);
+ // aLabelRelation.TargetSet.getArray()[0] = pPrev->GetAccessible();
+ // pHelper->AddRelation(aLabelRelation);
+ // }
+ //}
+ //IAccessibility2 Implementation 2009-----
if(meBorder == FRAMEBORDER_NONE)
{
//add the label relation
- Window* pPrev = mpFrameSel->GetWindow( WINDOW_PREV );
- if(pPrev && WINDOW_FIXEDTEXT == pPrev->GetType())
+ Window *pLabeledBy = mpFrameSel->GetAccessibleRelationLabeledBy();
+ if ( pLabeledBy && pLabeledBy != mpFrameSel )
{
AccessibleRelation aLabelRelation;
aLabelRelation.RelationType = AccessibleRelationType::LABELED_BY;
aLabelRelation.TargetSet.realloc(1);
- aLabelRelation.TargetSet.getArray()[0] = pPrev->GetAccessible();
+ aLabelRelation.TargetSet.getArray()[0] = pLabeledBy->GetAccessible();
pHelper->AddRelation(aLabelRelation);
}
+ Window* pMemberOf = mpFrameSel->GetAccessibleRelationMemberOf();
+ if ( pMemberOf && pMemberOf != mpFrameSel )
+ {
+ AccessibleRelation aMemberOfRelation;
+ aMemberOfRelation.RelationType = AccessibleRelationType::MEMBER_OF;
+ aMemberOfRelation.TargetSet.realloc(1);
+ aMemberOfRelation.TargetSet.getArray()[0] = pMemberOf->GetAccessible();
+ pHelper->AddRelation(aMemberOfRelation);
+ }
}
+ //-----IAccessibility2 Implementation 2009
return xRet;
}
@@ -721,6 +748,10 @@ void AccFrameSelector::NotifyAccessibleEvent( const sal_Int16 _nEventId,
void AccFrameSelector::Invalidate()
{
+ if ( mpFrameSel )
+ {
+ mpFrameSel->RemoveEventListener( LINK( this, AccFrameSelector, WindowEventListener ) );
+ }
mpFrameSel = 0;
EventObject aEvent;
Reference < XAccessibleContext > xThis( this );
diff --git a/svx/source/accessibility/AccessibleGraphicShape.cxx b/svx/source/accessibility/AccessibleGraphicShape.cxx
index 2e0d3fb79ce2..2068922dd9ba 100644
--- a/svx/source/accessibility/AccessibleGraphicShape.cxx
+++ b/svx/source/accessibility/AccessibleGraphicShape.cxx
@@ -29,6 +29,8 @@
#include <svx/ShapeTypeHandler.hxx>
#include <svx/SvxShapeTypes.hxx>
+#include <svx/svdobj.hxx>
+#include <svx/svdmodel.hxx>
using namespace ::accessibility;
using namespace ::rtl;
@@ -59,6 +61,10 @@ AccessibleGraphicShape::~AccessibleGraphicShape (void)
::rtl::OUString SAL_CALL AccessibleGraphicShape::getAccessibleImageDescription (void)
throw (::com::sun::star::uno::RuntimeException)
{
+//IAccessibility2 Implementation 2009-----
+ if(m_pShape)
+ return m_pShape->GetTitle();
+//-----IAccessibility2 Implementation 2009
return AccessibleShape::getAccessibleDescription ();
}
@@ -204,5 +210,30 @@ uno::Sequence<uno::Type> SAL_CALL
AccessibleGraphicShape::CreateAccessibleDescription (void)
throw (::com::sun::star::uno::RuntimeException)
{
- return CreateAccessibleName ();
+//IAccessibility2 Implementation 2009-----
+ //Solution: Don't use the same information for accessible name and accessible description.
+ //return CreateAccessibleName ();
+ ::rtl::OUString sDesc;
+ if(m_pShape)
+ sDesc = m_pShape->GetTitle();
+ if(sDesc.getLength() > 0)
+ return sDesc;
+ return CreateAccessibleBaseName();
+//-----IAccessibility2 Implementation 2009
}
+//IAccessibility2 Implementation 2009-----
+// Return this object's role.
+sal_Int16 SAL_CALL AccessibleGraphicShape::getAccessibleRole (void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ sal_Int16 nAccessibleRole = AccessibleRole::SHAPE;
+ if( m_pShape->getSdrModelFromSdrObject().GetImageMapForObject(m_pShape) != NULL )
+ return AccessibleRole::IMAGE_MAP;
+ else
+ //return AccessibleRole::SHAPE;
+ return AccessibleShape::getAccessibleRole();
+ return nAccessibleRole;
+}
+//-----IAccessibility2 Implementation 2009
+
+
diff --git a/svx/source/accessibility/AccessibleOLEShape.cxx b/svx/source/accessibility/AccessibleOLEShape.cxx
index 213fd68a79ae..18cd5bc30949 100644
--- a/svx/source/accessibility/AccessibleOLEShape.cxx
+++ b/svx/source/accessibility/AccessibleOLEShape.cxx
@@ -29,7 +29,9 @@
#include <svx/ShapeTypeHandler.hxx>
#include <svx/SvxShapeTypes.hxx>
-
+//IAccessibility2 Implementation 2009-----
+#include <svx/svdoole2.hxx>
+//-----IAccessibility2 Implementation 2009
using namespace accessibility;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -179,8 +181,24 @@ uno::Sequence<uno::Type> SAL_CALL
return aTypeList;
}
-
-
+//IAccessibility2 Implementation 2009-----
+//===== XAccessibleExtendedAttributes ========================================================
+uno::Any SAL_CALL AccessibleOLEShape::getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ uno::Any strRet;
+ ::rtl::OUString style;
+ if( m_pShape )
+ {
+ //style = ::rtl::OUString::createFromAscii("style=");
+ style = ::rtl::OUString::createFromAscii("style:");
+ style += ((SdrOle2Obj*)m_pShape)->GetStyleString();
+ }
+ style += ::rtl::OUString::createFromAscii(";");
+ strRet <<= style;
+ return strRet;
+}
+//-----IAccessibility2 Implementation 2009
/// Set this object's name if is different to the current name.
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index 33d7e440a1de..dd20c1f4f672 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -31,6 +31,11 @@
#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLE_ROLE_HPP_
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#endif
+//IAccessibility2 Implementation 2009-----
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLETEXTTYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleTextType.hpp>
+#endif
+//-----IAccessibility2 Implementation 2009
#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLE_STATE_TYPE_HPP_
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#endif
@@ -61,12 +66,28 @@
#include <unotools/accessiblestatesethelper.hxx>
#include <svx/svdview.hxx>
#include "AccessibleEmptyEditSource.hxx"
-
+//IAccessibility2 Implementation 2009-----
+#include <svx/svdpage.hxx>
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLERELATIONTYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#endif
+#ifndef _UTL_ACCESSIBLERELATIONSETHELPER_HXX_
+#include <unotools/accessiblerelationsethelper.hxx>
+#endif
+//-----IAccessibility2 Implementation 2009
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
+//IAccessibility2 Implementation 2009-----
+using ::com::sun::star::lang::IndexOutOfBoundsException;
+using ::com::sun::star::uno::RuntimeException;
+//-----IAccessibility2 Implementation 2009
using ::com::sun::star::uno::Reference;
using ::rtl::OUString;
+//IAccessibility2 Implementation 2009-----
+#include <algorithm>
+// #include <Accessiblehyperlink.hxx>
+//-----IAccessibility2 Implementation 2009
namespace accessibility {
namespace {
@@ -107,7 +128,9 @@ OUString GetOptionalProperty (
AccessibleShape::AccessibleShape (
const AccessibleShapeInfo& rShapeInfo,
const AccessibleShapeTreeInfo& rShapeTreeInfo)
- : AccessibleContextBase (rShapeInfo.mxParent,AccessibleRole::LIST_ITEM),
+ //IAccessibility2 Implementation 2009-----
+ : AccessibleContextBase (rShapeInfo.mxParent,AccessibleRole::SHAPE),
+ //-----IAccessibility2 Implementation 2009
mpChildrenManager(NULL),
mxShape (rShapeInfo.mxShape),
maShapeTreeInfo (rShapeTreeInfo),
@@ -119,10 +142,26 @@ AccessibleShape::AccessibleShape (
m_pShape = GetSdrObjectFromXShape(mxShape);
UpdateNameAndDescription();
}
-
-
-
-
+//IAccessibility2 Implementation 2009-----
+AccessibleShape::AccessibleShape (
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape>& rxShape,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent,
+ const AccessibleShapeTreeInfo& rShapeTreeInfo,
+ sal_Int32 nIndex)
+ : AccessibleContextBase (rxParent,AccessibleRole::SHAPE),
+ mpChildrenManager(NULL),
+ mxShape (rxShape),
+ maShapeTreeInfo (rShapeTreeInfo),
+ mnIndex (nIndex),
+ m_nIndexInParent(-1),
+ mpText (NULL),
+ mpParent (NULL)
+{
+ m_pShape = GetSdrObjectFromXShape(mxShape);
+}
+//-----IAccessibility2 Implementation 2009
AccessibleShape::~AccessibleShape (void)
{
if (mpChildrenManager != NULL)
@@ -258,10 +297,13 @@ void AccessibleShape::UpdateStates (void)
else
pStateSet->RemoveState (AccessibleStateType::SELECTED);
}
+//IAccessibility2 Implementation 2009-----
+ ::rtl::OUString AccessibleShape::GetStyle()
+ {
+ return ShapeTypeHandler::CreateAccessibleBaseName( mxShape );
+ }
-
-
-
+//-----IAccessibility2 Implementation 2009
bool AccessibleShape::operator== (const AccessibleShape& rShape)
{
return this==&rShape;
@@ -323,10 +365,28 @@ sal_Bool AccessibleShape::GetState (sal_Int16 aState)
else
return AccessibleContextBase::GetState (aState);
}
+//IAccessibility2 Implementation 2009-----
+// Solution: OverWrite the parent's getAccessibleName method
+::rtl::OUString SAL_CALL AccessibleShape::getAccessibleName (void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ThrowIfDisposed ();
+ if( m_pShape && m_pShape->GetTitle().Len() > 0)
+ return CreateAccessibleName() + ::rtl::OUString(' ') + m_pShape->GetTitle();
+ else
+ return CreateAccessibleName();
+}
-
-
-
+::rtl::OUString SAL_CALL AccessibleShape::getAccessibleDescription (void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ThrowIfDisposed ();
+ if( m_pShape && m_pShape->GetDescription().Len() > 0)
+ return m_pShape->GetDescription() ;
+ else
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( " " ));
+}
+//-----IAccessibility2 Implementation 2009
//===== XAccessibleContext ==================================================
/** The children of this shape come from two sources: The children from
@@ -386,8 +446,36 @@ uno::Reference<XAccessible> SAL_CALL
return xChild;
}
+//IAccessibility2 Implementation 2009-----
+uno::Reference<XAccessibleRelationSet> SAL_CALL
+ AccessibleShape::getAccessibleRelationSet (void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard (maMutex);
+ ::utl::AccessibleRelationSetHelper* pRelationSet = new utl::AccessibleRelationSetHelper;
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = mpParent->GetAccessibleCaption(mxShape);
+
+ //this mxshape is the captioned shape, only for sw
+ if(aSequence[0].get())
+ {
+ pRelationSet->AddRelation(
+ AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) );
+ }
+ if (pRelationSet != NULL)
+ {
+ return uno::Reference<XAccessibleRelationSet> (
+ new ::utl::AccessibleRelationSetHelper (*pRelationSet));
+ }
+ else
+ {
+ return uno::Reference<XAccessibleRelationSet>(NULL);
+ }
+ return uno::Reference<XAccessibleRelationSet>();
+}
+//-----IAccessibility2 Implementation 2009
/** Return a copy of the state set.
Possible states are:
@@ -404,8 +492,41 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
if (rBHelper.bDisposed || mpText == NULL)
// Return a minimal state set that only contains the DEFUNC state.
+ //IAccessibility2 Implementation 2009-----
+ //xStateSet = AccessibleContextBase::getAccessibleStateSet ();
+ {
xStateSet = AccessibleContextBase::getAccessibleStateSet ();
- else
+ ::utl::AccessibleStateSetHelper* pStateSet =
+ static_cast< ::utl::AccessibleStateSetHelper*>(mxStateSet.get());
+ ::com::sun::star::uno::Reference<XAccessible> xTempAcc = getAccessibleParent();
+ if( xTempAcc.is() )
+ {
+ ::com::sun::star::uno::Reference<XAccessibleContext>
+ xTempAccContext = xTempAcc->getAccessibleContext();
+ if( xTempAccContext.is() )
+ {
+ ::com::sun::star::uno::Reference<XAccessibleStateSet> rState =
+ xTempAccContext->getAccessibleStateSet();
+ if( rState.is() ) {
+ com::sun::star::uno::Sequence<short> pStates = rState->getStates();
+ int count = pStates.getLength();
+ for( int iIndex = 0;iIndex < count;iIndex++ )
+ {
+ if( pStates[iIndex] == AccessibleStateType::EDITABLE )
+ {
+ pStateSet->AddState (AccessibleStateType::EDITABLE);
+ pStateSet->AddState (AccessibleStateType::RESIZABLE);
+ pStateSet->AddState (AccessibleStateType::MOVEABLE);
+ break;
+ }
+ }
+ }
+ }
+ }
+ xStateSet = Reference<XAccessibleStateSet>(
+ new ::utl::AccessibleStateSetHelper (*pStateSet));
+ //-----IAccessibility2 Implementation 2009
+ }else
{
::utl::AccessibleStateSetHelper* pStateSet =
static_cast< ::utl::AccessibleStateSetHelper*>(mxStateSet.get());
@@ -420,14 +541,43 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
else
pStateSet->RemoveState (AccessibleStateType::FOCUSED);
}
-
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Just when the document is not read-only,set states EDITABLE,RESIZABLE,MOVEABLE
+ ::com::sun::star::uno::Reference<XAccessible> xTempAcc = getAccessibleParent();
+ if( xTempAcc.is() )
+ {
+ ::com::sun::star::uno::Reference<XAccessibleContext>
+ xTempAccContext = xTempAcc->getAccessibleContext();
+ if( xTempAccContext.is() )
+ {
+ ::com::sun::star::uno::Reference<XAccessibleStateSet> rState =
+ xTempAccContext->getAccessibleStateSet();
+ if( rState.is() ) {
+ com::sun::star::uno::Sequence<short> pStates = rState->getStates();
+ int count = pStates.getLength();
+ for( int iIndex = 0;iIndex < count;iIndex++ )
+ {
+ if( pStates[iIndex] == AccessibleStateType::EDITABLE )
+ {
+ pStateSet->AddState (AccessibleStateType::EDITABLE);
+ pStateSet->AddState (AccessibleStateType::RESIZABLE);
+ pStateSet->AddState (AccessibleStateType::MOVEABLE);
+ break;
+ }
+ }
+ }
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
// Create a copy of the state set that may be modified by the
// caller without affecting the current state set.
xStateSet = Reference<XAccessibleStateSet>(
new ::utl::AccessibleStateSetHelper (*pStateSet));
}
}
-
+//IAccessibility2 Implementation 2009-----
+ UpdateDocumentAllSelState(xStateSet);
+//-----IAccessibility2 Implementation 2009
return xStateSet;
}
@@ -705,6 +855,22 @@ sal_Int32 SAL_CALL AccessibleShape::getBackground (void)
uno::Any aColor;
aColor = aSet->getPropertyValue (OUString::createFromAscii ("FillColor"));
aColor >>= nColor;
+ //IAccessibility2 Implementation 2009-----
+ aColor = aSet->getPropertyValue (OUString::createFromAscii ("FillTransparence"));
+ short nTrans=0;
+ aColor >>= nTrans;
+ Color crBk(nColor);
+ if (nTrans == 0 )
+ {
+ crBk.SetTransparency(0xff);
+ }
+ else
+ {
+ nTrans = short(256 - nTrans / 100. * 256);
+ crBk.SetTransparency(sal_uInt8(nTrans));
+ }
+ nColor = crBk.GetColor();
+ //-----IAccessibility2 Implementation 2009
}
}
catch (::com::sun::star::beans::UnknownPropertyException)
@@ -763,9 +929,18 @@ com::sun::star::uno::Any SAL_CALL
aReturn = ::cppu::queryInterface (rType,
static_cast<XAccessibleComponent*>(this),
static_cast<XAccessibleExtendedComponent*>(this),
+ //IAccessibility2 Implementation 2009-----
+ static_cast< ::com::sun::star::accessibility::XAccessibleSelection* >(this),
+
+ static_cast< ::com::sun::star::accessibility::XAccessibleExtendedAttributes* >(this),
+ //-----IAccessibility2 Implementation 2009
static_cast<lang::XEventListener*>(this),
static_cast<document::XEventListener*>(this),
- static_cast<lang::XUnoTunnel*>(this)
+ static_cast<lang::XUnoTunnel*>(this),
+ //IAccessibility2 Implementation 2009-----
+ static_cast<XAccessibleGroupPosition*>(this),
+ static_cast<XAccessibleHypertext*>(this)
+ //-----IAccessibility2 Implementation 2009
);
return aReturn;
}
@@ -789,10 +964,127 @@ void SAL_CALL
{
AccessibleContextBase::release ();
}
+//IAccessibility2 Implementation 2009-----
+//
+//===== XAccessibleSelection ============================================
+//
+
+//--------------------------------------------------------------------------------
+void SAL_CALL AccessibleShape::selectAccessibleChild( sal_Int32 )
+throw ( IndexOutOfBoundsException, RuntimeException )
+{
+}
+
+//----------------------------------------------------------------------------------
+sal_Bool SAL_CALL AccessibleShape::isAccessibleChildSelected( sal_Int32 nChildIndex )
+throw ( IndexOutOfBoundsException,
+ RuntimeException )
+{
+ uno::Reference<XAccessible> xAcc = getAccessibleChild( nChildIndex );
+ uno::Reference<XAccessibleContext> xContext;
+ if( xAcc.is() )
+ {
+ xContext = xAcc->getAccessibleContext();
+ }
+
+ if( xContext.is() )
+ {
+ if( xContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
+ {
+ uno::Reference< ::com::sun::star::accessibility::XAccessibleText >
+ xText(xAcc, uno::UNO_QUERY);
+ if( xText.is() )
+ {
+ if( xText->getSelectionStart() >= 0 ) return sal_True;
+ }
+ }
+ else if( xContext->getAccessibleRole() == AccessibleRole::SHAPE )
+ {
+ Reference< XAccessibleStateSet > pRState = xContext->getAccessibleStateSet();
+ if( !pRState.is() )
+ return sal_False;
+
+ uno::Sequence<short> pStates = pRState->getStates();
+ int nCount = pStates.getLength();
+ for( int i = 0; i < nCount; i++ )
+ {
+ if(pStates[i] == AccessibleStateType::SELECTED)
+ return sal_True;
+ }
+ return sal_False;
+ }
+ }
+
+ return sal_False;
+}
+
+//---------------------------------------------------------------------
+void SAL_CALL AccessibleShape::clearAccessibleSelection( )
+throw ( RuntimeException )
+{
+}
+
+//-------------------------------------------------------------------------
+void SAL_CALL AccessibleShape::selectAllAccessibleChildren( )
+throw ( RuntimeException )
+{
+}
+//----------------------------------------------------------------------------
+sal_Int32 SAL_CALL AccessibleShape::getSelectedAccessibleChildCount()
+throw ( RuntimeException )
+{
+ sal_Int32 nCount = 0;
+ sal_Int32 TotalCount = getAccessibleChildCount();
+ for( sal_Int32 i = 0; i < TotalCount; i++ )
+ if( isAccessibleChildSelected(i) ) nCount++;
+
+ return nCount;
+}
+
+//--------------------------------------------------------------------------------------
+Reference<XAccessible> SAL_CALL AccessibleShape::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
+throw ( IndexOutOfBoundsException, RuntimeException)
+{
+ if ( nSelectedChildIndex > getSelectedAccessibleChildCount() )
+ throw IndexOutOfBoundsException();
+ sal_Int32 i1, i2;
+ for( i1 = 0, i2 = 0; i1 < getAccessibleChildCount(); i1++ )
+ if( isAccessibleChildSelected(i1) )
+ {
+ if( i2 == nSelectedChildIndex )
+ return getAccessibleChild( i1 );
+ i2++;
+ }
+ return Reference<XAccessible>();
+}
+//----------------------------------------------------------------------------------
+void SAL_CALL AccessibleShape::deselectAccessibleChild( sal_Int32 )
+ throw ( IndexOutOfBoundsException,
+ RuntimeException )
+{
+}
+//===== XAccessibleExtendedAttributes ========================================================
+uno::Any SAL_CALL AccessibleShape::getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ uno::Any strRet;
+ ::rtl::OUString style;
+ if( getAccessibleRole() != AccessibleRole::SHAPE ) return strRet;
+ if( m_pShape )
+ {
+ //style = ::rtl::OUString::createFromAscii("style=");
+ style = ::rtl::OUString::createFromAscii("style:");
+ style += GetStyle();
+ }
+ style += ::rtl::OUString::createFromAscii(";");
+ strRet <<= style;
+ return strRet;
+}
+//-----IAccessibility2 Implementation 2009
//===== XServiceInfo ========================================================
::rtl::OUString SAL_CALL
@@ -917,6 +1209,11 @@ void SAL_CALL
{
if (rEventObject.EventName.equals (sShapeModified))
{
+ //Need to update text children when receiving ShapeModified hint when exiting edit mode for text box
+ if (mpText)
+ mpText->UpdateChildren();
+
+
// Some property of a shape has been modified. Send an event
// that indicates a change of the visible data to all listeners.
CommitChange (
@@ -1021,47 +1318,103 @@ void AccessibleShape::ViewForwarderChanged (ChangeType aChangeType,
AccessibleShape::CreateAccessibleName (void)
throw (::com::sun::star::uno::RuntimeException)
{
- OUString sName (CreateAccessibleBaseName());
+ //OUString sName (CreateAccessibleBaseName());
+//IAccessibility2 Implementation 2009-----
+ OUString sName;
+ sName = GetFullAccessibleName(this);
+ return sName;
+}
+::rtl::OUString
+ AccessibleShape::GetFullAccessibleName (AccessibleShape *shape)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ OUString sName (shape->CreateAccessibleBaseName());
// Append the shape's index to the name to disambiguate between shapes
// of the same type. If such an index where not given to the
// constructor then use the z-order instead. If even that does not exist
// we throw an exception.
- long nIndex = mnIndex;
- if (nIndex == -1)
+ //long nIndex = mnIndex;
+ //if (nIndex == -1)
+ //{
+ // try
+ // {
+ // uno::Reference<beans::XPropertySet> xSet (mxShape, uno::UNO_QUERY);
+ // if (xSet.is())
+ // {
+ // uno::Any aZOrder (xSet->getPropertyValue (::rtl::OUString::createFromAscii ("ZOrder")));
+ // aZOrder >>= nIndex;
+
+ // // Add one to be not zero based.
+ // nIndex += 1;
+ // }
+ // }
+ // catch (beans::UnknownPropertyException)
+ // {
+ // // We throw our own exception that is a bit more informative.
+ // throw uno::RuntimeException (::rtl::OUString (
+ // RTL_CONSTASCII_USTRINGPARAM("AccessibleShape has invalid index and no ZOrder property")),
+ // static_cast<uno::XWeak*>(this));
+ // }
+
+ //}
+
+ //// Put a space between name and index because of Gnopernicus othewise
+ //// spells the name.
+ //sName += OUString (RTL_CONSTASCII_USTRINGPARAM(" ")) + OUString::valueOf (nIndex);
+
+ //return sName;
+
+ XubString nameStr;
+ if(shape->m_pShape)
+ nameStr = shape->m_pShape->GetName();
+ if(nameStr.Len() == 0)
{
- try
+ sName += OUString( RTL_CONSTASCII_USTRINGPARAM( " " ));
+ }
+ else
+ {
+ sName = nameStr;
+ }
+ /*
+ sal_Int32 nChildCount = shape->getAccessibleChildCount();
+ if(nChildCount > 0)
+ {
+ for (sal_Int32 i=0; i<nChildCount; ++i)
{
- uno::Reference<beans::XPropertySet> xSet (mxShape, uno::UNO_QUERY);
- if (xSet.is())
+ Reference<XAccessible> xChild (shape->getAccessibleChild (i));
+ if (xChild.is())
{
- uno::Any aZOrder (xSet->getPropertyValue (::rtl::OUString::createFromAscii ("ZOrder")));
- aZOrder >>= nIndex;
-
- // Add one to be not zero based.
- nIndex += 1;
+ uno::Reference <XAccessibleContext> xChildContext(xChild->getAccessibleContext());
+ if (xChildContext->getAccessibleRole() == AccessibleRole::PARAGRAPH)
+ {
+ uno::Reference<XAccessibleText> xText = uno::Reference<XAccessibleText> ( xChild, uno::UNO_QUERY );
+ sName += OUString( RTL_CONSTASCII_USTRINGPARAM( " " )) + xText->getText();
+ }
+ else if (xChildContext->getAccessibleRole() == AccessibleRole::SHAPE)
+ {
+ sName += OUString( RTL_CONSTASCII_USTRINGPARAM( " " )) + GetFullAccessibleName(static_cast< AccessibleShape*>( xChild.get()));
+ }
}
}
- catch (beans::UnknownPropertyException)
- {
- // We throw our own exception that is a bit more informative.
- throw uno::RuntimeException (::rtl::OUString (
- RTL_CONSTASCII_USTRINGPARAM("AccessibleShape has invalid index and no ZOrder property")),
- static_cast<uno::XWeak*>(this));
- }
-
+ }
+ */
+ //Solution:If the new produced name if not the same with last,notify name changed
+ // Event
+ if( aAccName != sName && aAccName.getLength() != 0 )
+ {
+ uno::Any aOldValue, aNewValue;
+ aOldValue <<= aAccName;
+ aNewValue <<= sName;
+ CommitChange(
+ AccessibleEventId::NAME_CHANGED,
+ aNewValue,
+ aOldValue);
}
-
- // Put a space between name and index because of Gnopernicus othewise
- // spells the name.
- sName += OUString (RTL_CONSTASCII_USTRINGPARAM(" ")) + OUString::valueOf (nIndex);
-
+ aAccName = sName;
return sName;
}
-
-
-
-
+//-----IAccessibility2 Implementation 2009
::rtl::OUString
AccessibleShape::CreateAccessibleDescription (void)
throw (::com::sun::star::uno::RuntimeException)
@@ -1231,8 +1584,252 @@ void AccessibleShape::UpdateNameAndDescription (void)
{
}
}
+//IAccessibility2 Implementation 2009-----
+// Return this object's role.
+sal_Int16 SAL_CALL AccessibleShape::getAccessibleRole (void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ sal_Int16 nAccessibleRole = AccessibleRole::SHAPE ;
+ switch (ShapeTypeHandler::Instance().GetTypeId (mxShape))
+ {
+ case DRAWING_GRAPHIC_OBJECT:
+ nAccessibleRole = AccessibleRole::GRAPHIC ; break;
+ case DRAWING_OLE:
+ nAccessibleRole = AccessibleRole::EMBEDDED_OBJECT ; break;
+ default:
+ nAccessibleRole = AccessibleContextBase::getAccessibleRole();
+ break;
+ }
+
+ return nAccessibleRole;
+}
+
+
+void AccessibleShape::UpdateDocumentAllSelState(Reference<XAccessibleStateSet> &xStateSet)
+{
+ if (mpParent && mpParent->IsDocumentSelAll())
+ {
+ ::utl::AccessibleStateSetHelper* pStateSet =
+ static_cast< ::utl::AccessibleStateSetHelper*>(xStateSet.get());
+ pStateSet->AddState (AccessibleStateType::SELECTED);
+
+ //uno::Any NewValue;
+ //NewValue <<= AccessibleStateType::SELECTED;
+
+ //CommitChange(AccessibleEventId::STATE_CHANGED,NewValue,uno::Any());
+ }
+}
+
+//sort the drawing objects from up to down, from left to right
+struct XShapePosCompareHelper
+{
+ bool operator() ( const uno::Reference<drawing::XShape>& xshape1,
+ const uno::Reference<drawing::XShape>& xshape2 ) const
+ {
+ SdrObject* pObj1 = GetSdrObjectFromXShape(xshape1);
+ SdrObject* pObj2 = GetSdrObjectFromXShape(xshape2);
+ if(pObj1 && pObj2)
+ return pObj1->GetNavigationPosition() < pObj2->GetNavigationPosition();
+ else
+ return 0;
+ }
+};
+//end of group position
+
+//===== XAccessibleGroupPosition =========================================
+uno::Sequence< sal_Int32 > SAL_CALL
+AccessibleShape::getGroupPosition( const uno::Any& )
+throw (uno::RuntimeException)
+{
+ // we will return the:
+ // [0] group level
+ // [1] similar items counts in the group
+ // [2] the position of the object in the group
+ uno::Sequence< sal_Int32 > aRet( 3 );
+ aRet[0] = 0;
+ aRet[1] = 0;
+ aRet[2] = 0;
+
+ ::com::sun::star::uno::Reference<XAccessible> xParent = getAccessibleParent();
+ if (!xParent.is())
+ {
+ return aRet;
+ }
+ SdrObject *pObj = GetSdrObjectFromXShape(mxShape);
+ if(pObj == NULL )
+ {
+ return aRet;
+ }
+
+ // Compute object's group level.
+ sal_Int32 nGroupLevel = 0;
+ SdrObject * pUper = pObj->GetParentSdrObject();
+ while( pUper )
+ {
+ ++nGroupLevel;
+ pUper = pUper->GetParentSdrObject();
+ }
+
+ ::com::sun::star::uno::Reference<XAccessibleContext> xParentContext = xParent->getAccessibleContext();
+ if( xParentContext->getAccessibleRole() == AccessibleRole::DOCUMENT)//Document
+ {
+ Reference< XAccessibleGroupPosition > xGroupPosition( xParent,uno::UNO_QUERY );
+ if ( xGroupPosition.is() )
+ {
+ aRet = xGroupPosition->getGroupPosition( uno::makeAny( getAccessibleContext() ) );
+ }
+ return aRet;
+ }
+ if (xParentContext->getAccessibleRole() != AccessibleRole::SHAPE)
+ {
+ return aRet;
+ }
+
+ SdrObjList *pGrpList = pObj->getParentOfSdrObject();
+
+ if(!dynamic_cast< SdrObject* >(pGrpList))
+ {
+ // not inserted or parent is page
+ return aRet;
+ }
+
+ std::vector< uno::Reference<drawing::XShape> > vXShapes;
+ if (pGrpList)
+ {
+ const sal_Int32 nObj = pGrpList->GetObjCount();
+ for(sal_Int32 i = 0 ; i < nObj ; ++i)
+ {
+ SdrObject *pSubObj = pGrpList->GetObj(i);
+ //IAccessibility2 Implementation 2009-----
+ if (pSubObj &&
+ xParentContext->getAccessibleChild(i)->getAccessibleContext()->getAccessibleRole() != AccessibleRole::GROUP_BOX)
+ //-----IAccessibility2 Implementation 2009
+ {
+ vXShapes.push_back( GetXShapeForSdrObject(pSubObj) );
+ }
+ }
+ }
+
+ std::sort( vXShapes.begin(), vXShapes.end(), XShapePosCompareHelper() );
+
+ //get the the index of the selected object in the group
+ std::vector< uno::Reference<drawing::XShape> >::iterator aIter;
+ //we start counting position from 1
+ sal_Int32 nPos = 1;
+ for ( aIter = vXShapes.begin(); aIter != vXShapes.end(); aIter++, nPos++ )
+ {
+ if ( (*aIter).get() == mxShape.get() )
+ {
+ sal_Int32* pArray = aRet.getArray();
+ pArray[0] = nGroupLevel;
+ pArray[1] = vXShapes.size();
+ pArray[2] = nPos;
+ break;
+ }
+ }
+
+ return aRet;
+}
+
+::rtl::OUString AccessibleShape::getObjectLink( const uno::Any& )
+ throw (uno::RuntimeException)
+{
+ ::rtl::OUString aRet;
+
+ SdrObject *pObj = GetSdrObjectFromXShape(mxShape);
+ if(pObj == NULL )
+ {
+ return aRet;
+ }
+ if (maShapeTreeInfo.GetDocumentWindow().is())
+ {
+ Reference< XAccessibleGroupPosition > xGroupPosition( maShapeTreeInfo.GetDocumentWindow(), uno::UNO_QUERY );
+ if (xGroupPosition.is())
+ {
+ aRet = xGroupPosition->getObjectLink( uno::makeAny( getAccessibleContext() ) );
+ }
+ }
+ return aRet;
+}
+
+//===== XAccesibleHypertext ==================================================
+sal_Int32 SAL_CALL AccessibleShape::getHyperLinkCount()
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ // MT: Introduced with IA2 CWS, but SvxAccessibleHyperlink was redundant to svx::AccessibleHyperlink which we introduced meanwhile.
+ // Code need to be adapted....
+ return 0;
+
+ /*
+ SvxAccessibleHyperlink* pLink = new SvxAccessibleHyperlink(m_pShape,this);
+ if (pLink->IsValidHyperlink())
+ return 1;
+ else
+ return 0;
+ */
+}
+uno::Reference< XAccessibleHyperlink > SAL_CALL
+ AccessibleShape::getHyperLink( sal_Int32 )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ uno::Reference< XAccessibleHyperlink > xRet;
+ // MT: Introduced with IA2 CWS, but SvxAccessibleHyperlink was redundant to svx::AccessibleHyperlink which we introduced meanwhile.
+ // Code need to be adapted....
+ /*
+ SvxAccessibleHyperlink* pLink = new SvxAccessibleHyperlink(m_pShape,this);
+ if (pLink->IsValidHyperlink())
+ xRet = pLink;
+ if( !xRet.is() )
+ throw ::com::sun::star::lang::IndexOutOfBoundsException();
+ */
+ return xRet;
+}
+sal_Int32 SAL_CALL AccessibleShape::getHyperLinkIndex( sal_Int32 )
+throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ sal_Int32 nRet = 0;
+ return nRet;
+}
+//===== XAccesibleText ==================================================
+sal_Int32 SAL_CALL AccessibleShape::getCaretPosition( ) throw (::com::sun::star::uno::RuntimeException){return 0;}
+sal_Bool SAL_CALL AccessibleShape::setCaretPosition( sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException){return 0;}
+sal_Unicode SAL_CALL AccessibleShape::getCharacter( sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException){return 0;}
+::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL AccessibleShape::getCharacterAttributes( sal_Int32, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ uno::Sequence< ::com::sun::star::beans::PropertyValue > aValues(0);
+ return aValues;
+}
+::com::sun::star::awt::Rectangle SAL_CALL AccessibleShape::getCharacterBounds( sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ return com::sun::star::awt::Rectangle(0, 0, 0, 0 );
+}
+sal_Int32 SAL_CALL AccessibleShape::getCharacterCount( ) throw (::com::sun::star::uno::RuntimeException){return 0;}
+sal_Int32 SAL_CALL AccessibleShape::getIndexAtPoint( const ::com::sun::star::awt::Point& ) throw (::com::sun::star::uno::RuntimeException){return 0;}
+::rtl::OUString SAL_CALL AccessibleShape::getSelectedText( ) throw (::com::sun::star::uno::RuntimeException){return OUString();}
+sal_Int32 SAL_CALL AccessibleShape::getSelectionStart( ) throw (::com::sun::star::uno::RuntimeException){return 0;}
+sal_Int32 SAL_CALL AccessibleShape::getSelectionEnd( ) throw (::com::sun::star::uno::RuntimeException){return 0;}
+sal_Bool SAL_CALL AccessibleShape::setSelection( sal_Int32, sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException){return sal_True;}
+::rtl::OUString SAL_CALL AccessibleShape::getText( ) throw (::com::sun::star::uno::RuntimeException){return OUString();}
+::rtl::OUString SAL_CALL AccessibleShape::getTextRange( sal_Int32, sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException){return OUString();}
+::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleShape::getTextAtIndex( sal_Int32, sal_Int16 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::accessibility::TextSegment aResult;
+ return aResult;
+}
+::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleShape::getTextBeforeIndex( sal_Int32, sal_Int16 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::accessibility::TextSegment aResult;
+ return aResult;
+}
+::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleShape::getTextBehindIndex( sal_Int32, sal_Int16 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::accessibility::TextSegment aResult;
+ return aResult;
+}
+sal_Bool SAL_CALL AccessibleShape::copyText( sal_Int32, sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException){return sal_True;}
+//-----IAccessibility2 Implementation 2009
} // end of namespace accessibility
diff --git a/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx b/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
new file mode 100644
index 000000000000..4a8430dd4921
--- /dev/null
+++ b/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
@@ -0,0 +1,120 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svx.hxx"
+
+#include <svx/AccessibleSvxFindReplaceDialog.hxx>
+
+
+#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_
+#include "toolkit/awt/vclxwindow.hxx"
+#endif
+
+#ifndef _SVX_SRCHDLG_HXX
+#include <svx/srchdlg.hxx>
+#endif
+
+#ifndef _UTL_ACCESSIBLERELATIONSETHELPER_HXX_
+#include <unotools/accessiblerelationsethelper.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLERELATIONTYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEGETACCFLOWTO_HPP_
+#include <com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp>
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+VCLXAccessibleSvxFindReplaceDialog::VCLXAccessibleSvxFindReplaceDialog(VCLXWindow* pVCLXindow)
+ :VCLXAccessibleComponent( pVCLXindow )
+{
+
+}
+
+VCLXAccessibleSvxFindReplaceDialog::~VCLXAccessibleSvxFindReplaceDialog()
+{
+}
+
+void VCLXAccessibleSvxFindReplaceDialog::FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet )
+{
+ VCLXAccessibleComponent::FillAccessibleRelationSet( rRelationSet );
+ Window* pDlg = GetWindow();
+ if ( pDlg )
+ {
+ SvxSearchDialog* pSrchDlg = static_cast<SvxSearchDialog*>( pDlg );
+ Window* pDocWin = pSrchDlg->GetDocWin();
+ if ( !pDocWin )
+ {
+ return;
+ }
+ Reference < accessibility::XAccessible > xDocAcc = pDocWin->GetAccessible();
+ if ( !xDocAcc.is() )
+ {
+ return;
+ }
+ Reference< accessibility::XAccessibleGetAccFlowTo > xGetAccFlowTo( xDocAcc, UNO_QUERY );
+ if ( !xGetAccFlowTo.is() )
+ {
+ return;
+ }
+ Any aAny;
+ aAny <<= ( pSrchDlg->GetSrchFlag() );
+
+ const sal_Int32 FORFINDREPLACEFLOWTO = 2;
+ uno::Sequence<uno::Any> aAnySeq = xGetAccFlowTo->get_AccFlowTo( aAny, FORFINDREPLACEFLOWTO );
+
+ sal_Int32 nLen = aAnySeq.getLength();
+ if ( nLen )
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence( nLen );
+ for ( sal_Int32 i = 0; i < nLen; i++ )
+ {
+ uno::Reference < accessibility::XAccessible > xAcc;
+ aAnySeq[i] >>= xAcc;
+ aSequence[i] = xAcc;
+ }
+ rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::CONTENT_FLOWS_TO, aSequence ) );
+ }
+ }
+}
+// -----------------------------------------------------------------------------
+// XServiceInfo
+// -----------------------------------------------------------------------------
+
+::rtl::OUString VCLXAccessibleSvxFindReplaceDialog::getImplementationName() throw (RuntimeException)
+{
+ return ::rtl::OUString::createFromAscii( "VCLXAccessibleSvxFindReplaceDialog" );
+}
+
+// -----------------------------------------------------------------------------
+
+Sequence< ::rtl::OUString > VCLXAccessibleSvxFindReplaceDialog::getSupportedServiceNames() throw (RuntimeException)
+{
+ Sequence< ::rtl::OUString > aNames(1);
+ aNames[0] = ::rtl::OUString::createFromAscii( "VCLXAccessibleSvxFindReplaceDialog" );
+ return aNames;
+}
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx
index 71ba898f0690..689488f6cb24 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -50,7 +50,15 @@
#include <unotools/accessiblestatesethelper.hxx>
#include <vcl/unohelp.hxx>
#include <vcl/svapp.hxx>
+//IAccessibility2 Implementation 2009-----
+//add TEXT_SELECTION_CHANGED event
+#ifndef _TEXTDATA_HXX
+#include <svtools/textdata.hxx>
+#endif
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/viewsh.hxx>
+//-----IAccessibility2 Implementation 2009
//------------------------------------------------------------------------
//
// Project-local header
@@ -68,6 +76,10 @@
#include "editeng/AccessibleEditableTextPara.hxx"
#include <svx/svdmodel.hxx>
#include <svx/svdpntv.hxx>
+//IAccessibility2 Implementation 2009-----
+#include "../table/cell.hxx"
+#include "../table/accessiblecell.hxx"
+//-----IAccessibility2 Implementation 2009
#include <editeng/editdata.hxx>
#include <editeng/editeng.hxx>
#include <editeng/editview.hxx>
@@ -77,6 +89,22 @@ using namespace ::com::sun::star::accessibility;
namespace accessibility
{
+//IAccessibility2 Implementation 2009-----
+ Window* GetCurrentEditorWnd()
+ {
+ Window* pWin = NULL;
+ SfxViewFrame* pFrame = SfxViewFrame::Current();
+ if (pFrame)
+ {
+ const SfxViewShell * pViewShell = pFrame->GetViewShell();
+ if(pViewShell)
+ {
+ pWin = pViewShell->GetWindow();
+ }
+ }
+ return pWin;
+ }
+//-----IAccessibility2 Implementation 2009
//------------------------------------------------------------------------
//
@@ -456,12 +484,38 @@ namespace accessibility
{
if( bHaveFocus )
{
- GotPropertyEvent( uno::makeAny(AccessibleStateType::FOCUSED), AccessibleEventId::STATE_CHANGED );
+ //IAccessibility2 Implementation 2009-----
+ if( mxFrontEnd.is() )
+ {
+ AccessibleCell* pAccessibleCell = dynamic_cast< AccessibleCell* > ( mxFrontEnd.get() );
+ if ( !pAccessibleCell )
+ GotPropertyEvent( uno::makeAny(AccessibleStateType::FOCUSED), AccessibleEventId::STATE_CHANGED );
+ else // the focus event on cell should be fired on table directly
+ {
+ AccessibleTableShape* pAccTable = pAccessibleCell->GetParentTable();
+ if (pAccTable)
+ pAccTable->SetStateDirectly(AccessibleStateType::FOCUSED);
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
DBG_TRACE("AccessibleTextHelper_Impl::SetShapeFocus(): Parent object received focus" );
}
else
{
- LostPropertyEvent( uno::makeAny(AccessibleStateType::FOCUSED), AccessibleEventId::STATE_CHANGED );
+ // The focus state should be reset directly on table.
+ //LostPropertyEvent( uno::makeAny(AccessibleStateType::FOCUSED), AccessibleEventId::STATE_CHANGED );
+ if( mxFrontEnd.is() )
+ {
+ AccessibleCell* pAccessibleCell = dynamic_cast< AccessibleCell* > ( mxFrontEnd.get() );
+ if ( !pAccessibleCell )
+ LostPropertyEvent( uno::makeAny(AccessibleStateType::FOCUSED), AccessibleEventId::STATE_CHANGED );
+ else
+ {
+ AccessibleTableShape* pAccTable = pAccessibleCell->GetParentTable();
+ if (pAccTable)
+ pAccTable->ResetStateDirectly(AccessibleStateType::FOCUSED);
+ }
+ }
DBG_TRACE("AccessibleTextHelper_Impl::SetShapeFocus(): Parent object lost focus" );
}
}
@@ -509,6 +563,18 @@ namespace accessibility
if( !pViewForwarder )
return sal_False;
+ //IAccessibility2 Implementation 2009-----
+ if( mxFrontEnd.is() )
+ {
+ AccessibleCell* pAccessibleCell = dynamic_cast< AccessibleCell* > ( mxFrontEnd.get() );
+ if ( pAccessibleCell )
+ {
+ sdr::table::CellRef xCell = pAccessibleCell->getCellRef();
+ if ( xCell.is() )
+ return xCell->IsTextEditActive();
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
if( pViewForwarder->IsValid() )
return sal_True;
else
@@ -817,9 +883,12 @@ namespace accessibility
// convert to screen coordinates
aParaBB = ::accessibility::AccessibleEditableTextPara::LogicToPixel( aTmpBB, rCacheTF.GetMapMode(), rCacheVF );
-
+ //IAccessibility2 Implementation 2009-----
+ /*
if( aParaBB.IsOver( aViewArea ) )
{
+ */
+ //-----IAccessibility2 Implementation 2009
// at least partially visible
if( bFirstChild )
{
@@ -840,6 +909,8 @@ namespace accessibility
mxFrontEnd, GetEditSource(), nCurrPara ).first ),
AccessibleEventId::CHILD );
}
+ //IAccessibility2 Implementation 2009-----
+ /*
}
else
{
@@ -853,7 +924,8 @@ namespace accessibility
// clear reference
maParaManager.Release( nCurrPara );
}
- }
+ }*/
+ //-----IAccessibility2 Implementation 2009
}
}
catch( const uno::Exception& )
@@ -1326,6 +1398,12 @@ namespace accessibility
{
case HINT_BEGEDIT:
{
+ //IAccessibility2 Implementation 2009-----
+ if(!IsActive())
+ {
+ break;
+ }
+//-----IAccessibility2 Implementation 2009
// change children state
maParaManager.SetActive();
diff --git a/svx/source/accessibility/ChildrenManager.cxx b/svx/source/accessibility/ChildrenManager.cxx
index 2022b9105dbb..3705d89c34f7 100644
--- a/svx/source/accessibility/ChildrenManager.cxx
+++ b/svx/source/accessibility/ChildrenManager.cxx
@@ -86,7 +86,22 @@ long ChildrenManager::GetChildCount (void) const throw ()
return mpImpl->GetChild (nIndex);
}
+//IAccessibility2 Implementation 2009-----
+Reference<XAccessible> ChildrenManager::GetChild (const Reference<drawing::XShape>& xShape)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ OSL_ASSERT (mpImpl != NULL);
+ return mpImpl->GetChild (xShape);
+}
+::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape> ChildrenManager::GetChildShape(long nIndex)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ OSL_ASSERT (mpImpl != NULL);
+ return mpImpl->GetChildShape(nIndex);
+}
+//-----IAccessibility2 Implementation 2009
void ChildrenManager::Update (bool bCreateNewObjectsOnDemand)
diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx
index 92b457e4219f..832b1d2e9dbf 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -37,7 +37,18 @@
#include <rtl/ustring.hxx>
#include <tools/debug.hxx>
+//IAccessibility2 Implementation 2009-----
+#ifndef _SVX_ACCESSIBILITY_SVX_SHAPE_TYPES_HXX
+#include <svx/SvxShapeTypes.hxx>
+#endif
+#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
+#include <toolkit/unohlp.hxx>
+#endif
+#ifndef _SV_WINDOW_HXX
+#include <vcl/window.hxx>
+#endif
+//-----IAccessibility2 Implementation 2009
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
using ::com::sun::star::uno::Reference;
@@ -117,7 +128,21 @@ long ChildrenManagerImpl::GetChildCount (void) const throw ()
}
-
+//IAccessibility2 Implementation 2009-----
+::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape> ChildrenManagerImpl::GetChildShape(long nIndex)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ uno::Reference<XAccessible> xAcc = GetChild(nIndex);
+ ChildDescriptorListType::iterator I, aEnd = maVisibleChildren.end();
+ for (I = maVisibleChildren.begin(); I != aEnd; ++I)
+ {
+ if (I->mxAccessibleShape == xAcc)
+ return I->mxShape;
+ }
+ return uno::Reference< drawing::XShape > ();
+}
+//-----IAccessibility2 Implementation 2009
/** Return the requested accessible child object. Create it if it is not
yet in the cache.
@@ -871,9 +896,36 @@ sal_Bool ChildrenManagerImpl::ReplaceChild (
return bResult;
}
-
-
-
+//IAccessibility2 Implementation 2009-----
+// Add the impl method for IAccessibleParent interface
+AccessibleControlShape * ChildrenManagerImpl::GetAccControlShapeFromModel(::com::sun::star::beans::XPropertySet* pSet) throw (::com::sun::star::uno::RuntimeException)
+{
+ sal_Int32 count = GetChildCount();
+ for (sal_Int32 index=0;index<count;index++)
+ {
+ AccessibleShape* pAccShape = maVisibleChildren[index].GetAccessibleShape();
+ if (pAccShape && ::accessibility::ShapeTypeHandler::Instance().GetTypeId (pAccShape->GetXShape()) == DRAWING_CONTROL)
+ {
+ ::accessibility::AccessibleControlShape *pCtlAccShape = static_cast < ::accessibility::AccessibleControlShape* >(pAccShape);
+ if (pCtlAccShape && pCtlAccShape->GetControlModel() == pSet)
+ return pCtlAccShape;
+ }
+ }
+ return NULL;
+}
+uno::Reference<XAccessible>
+ ChildrenManagerImpl::GetAccessibleCaption (const uno::Reference<drawing::XShape>& xShape)
+ throw (uno::RuntimeException)
+{
+ ChildDescriptorListType::iterator I, aEnd = maVisibleChildren.end();
+ for (I = maVisibleChildren.begin(); I != aEnd; ++I)
+ {
+ if ( I->mxShape.get() == xShape.get() )
+ return I->mxAccessibleShape;
+ }
+ return uno::Reference<XAccessible> ();
+}
+//-----IAccessibility2 Implementation 2009
/** Update the <const>SELECTED</const> and the <const>FOCUSED</const> state
of all visible children. Maybe this should be changed to all children.
@@ -906,13 +958,30 @@ void ChildrenManagerImpl::UpdateSelection (void)
// Remember the current and new focused shape.
AccessibleShape* pCurrentlyFocusedShape = NULL;
AccessibleShape* pNewFocusedShape = NULL;
-
+//IAccessibility2 Implementation 2009-----
+ typedef std::pair< AccessibleShape* , sal_Bool > PAIR_SHAPE;//sal_Bool Selected,UnSelected.
+ typedef std::vector< PAIR_SHAPE > VEC_SHAPE;
+ VEC_SHAPE vecSelect;
+ int nAddSelect=0;
+ int nRemoveSelect=0;
+ sal_Bool bHasSelectedShape=sal_False;
+//-----IAccessibility2 Implementation 2009
ChildDescriptorListType::iterator I, aEnd = maVisibleChildren.end();
for (I=maVisibleChildren.begin(); I != aEnd; ++I)
{
AccessibleShape* pAccessibleShape = I->GetAccessibleShape();
if (I->mxAccessibleShape.is() && I->mxShape.is() && pAccessibleShape!=NULL)
{
+ //IAccessibility2 Implementation 2009-----
+ short nRole = pAccessibleShape->getAccessibleRole();
+ bool bDrawShape = (
+ nRole == AccessibleRole::GRAPHIC ||
+ nRole == AccessibleRole::EMBEDDED_OBJECT ||
+ nRole == AccessibleRole::SHAPE ||
+ nRole == AccessibleRole::IMAGE_MAP ||
+ nRole == AccessibleRole::TABLE_CELL ||
+ nRole == AccessibleRole::TABLE );
+//-----IAccessibility2 Implementation 2009
bool bShapeIsSelected = false;
// Look up the shape in the (single or multi-) selection.
@@ -939,16 +1008,42 @@ void ChildrenManagerImpl::UpdateSelection (void)
// Set or reset the SELECTED state.
if (bShapeIsSelected)
- pAccessibleShape->SetState (AccessibleStateType::SELECTED);
+ //IAccessibility2 Implementation 2009-----
+ //pAccessibleShape->SetState (AccessibleStateType::SELECTED);
+ {
+ if (pAccessibleShape->SetState (AccessibleStateType::SELECTED))
+ {
+ if (bDrawShape)
+ {
+ vecSelect.push_back(std::make_pair(pAccessibleShape,sal_True));
+ ++nAddSelect;
+ }
+ }
+ else
+ {//Selected not change,has selected shape before
+ bHasSelectedShape=sal_True;
+ }
+ }
else
- pAccessibleShape->ResetState (AccessibleStateType::SELECTED);
-
+ //pAccessibleShape->ResetState (AccessibleStateType::SELECTED);
+ {
+ if(pAccessibleShape->ResetState (AccessibleStateType::SELECTED))
+ {
+ if(bDrawShape)
+ {
+ vecSelect.push_back(std::make_pair(pAccessibleShape,sal_False));
+ ++nRemoveSelect;
+ }
+ }
+ }
+//-----IAccessibility2 Implementation 2009
// Does the shape have the current selection?
if (pAccessibleShape->GetState (AccessibleStateType::FOCUSED))
pCurrentlyFocusedShape = pAccessibleShape;
}
}
-
+//IAccessibility2 Implementation 2009-----
+ /*
// Check if the frame we are in is currently active. If not then make
// sure to not send a FOCUSED state change.
if (xController.is())
@@ -958,15 +1053,73 @@ void ChildrenManagerImpl::UpdateSelection (void)
if ( ! xFrame->isActive())
pNewFocusedShape = NULL;
}
-
+ */
+ Window *pParentWidow = maShapeTreeInfo.GetWindow();
+ bool bShapeActive= false;
+ // For table cell, the table's parent must be checked to make sure it has focus.
+ Window *pPWindow = pParentWidow->GetParent();
+ if (pParentWidow && ( pParentWidow->HasFocus() || (pPWindow && pPWindow->HasFocus())))
+ {
+ bShapeActive =true;
+ }
+//-----IAccessibility2 Implementation 2009
// Move focus from current to newly focused shape.
if (pCurrentlyFocusedShape != pNewFocusedShape)
{
if (pCurrentlyFocusedShape != NULL)
pCurrentlyFocusedShape->ResetState (AccessibleStateType::FOCUSED);
- if (pNewFocusedShape != NULL)
+ //IAccessibility2 Implementation 2009-----
+ //if (pNewFocusedShape != NULL)
+ //-----IAccessibility2 Implementation 2009
+ if (pNewFocusedShape != NULL && bShapeActive)
pNewFocusedShape->SetState (AccessibleStateType::FOCUSED);
}
+//IAccessibility2 Implementation 2009-----
+
+ if (nAddSelect >= 10 )//fire selection within
+ {
+ mrContext.CommitChange(AccessibleEventId::SELECTION_CHANGED_WITHIN,uno::Any(),uno::Any());
+ nAddSelect =0 ;//not fire selection event
+ }
+ //VEC_SHAPE::iterator vi = vecSelect.begin();
+ //for (; vi != vecSelect.end() ;++vi)
+ VEC_SHAPE::reverse_iterator vi = vecSelect.rbegin();
+ for (; vi != vecSelect.rend() ;++vi)
+
+ {
+ PAIR_SHAPE &pairShape= *vi;
+ Reference< XAccessible > xShape(pairShape.first);
+ uno::Any anyShape;
+ anyShape <<= xShape;
+
+ if (pairShape.second)//Selection add
+ {
+ if (bHasSelectedShape)
+ {
+ if ( nAddSelect > 0 )
+ {
+ mrContext.CommitChange(AccessibleEventId::SELECTION_CHANGED_ADD,anyShape,uno::Any());
+ }
+ }
+ else
+ {
+ //if has not selected shape ,first selected shape is fire selection event;
+ if (nAddSelect > 0 )
+ {
+ mrContext.CommitChange(AccessibleEventId::SELECTION_CHANGED,anyShape,uno::Any());
+ }
+ if (nAddSelect > 1 )//check other selected shape fire selection add event
+ {
+ bHasSelectedShape=sal_True;
+ }
+ }
+ }
+ else //selection remove
+ {
+ mrContext.CommitChange(AccessibleEventId::SELECTION_CHANGED_REMOVE,anyShape,uno::Any());
+ }
+ }
+//-----IAccessibility2 Implementation 2009
// Remember whether there is a shape that now has the focus.
mpFocusedShape = pNewFocusedShape;
diff --git a/svx/source/accessibility/ChildrenManagerImpl.hxx b/svx/source/accessibility/ChildrenManagerImpl.hxx
index 0d7a08cd213b..20f5a70bbe00 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.hxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.hxx
@@ -126,6 +126,11 @@ public:
*/
long GetChildCount (void) const throw ();
+//IAccessibility2 Implementation 2009-----
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape> GetChildShape(long nIndex)
+ throw (::com::sun::star::uno::RuntimeException);
+//-----IAccessibility2 Implementation 2009
/** Return the requested accessible child or throw and
IndexOutOfBoundsException if the given index is invalid.
@param nIndex
@@ -298,8 +303,17 @@ public:
const long _nIndex,
const AccessibleShapeTreeInfo& _rShapeTreeInfo
) throw (::com::sun::star::uno::RuntimeException);
-
-
+ //IAccessibility2 Implementation 2009-----
+ // Add the impl method for IAccessibleParent interface
+ virtual AccessibleControlShape* GetAccControlShapeFromModel
+ (::com::sun::star::beans::XPropertySet* pSet)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>
+ GetAccessibleCaption (const ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape>& xShape)
+ throw (::com::sun::star::uno::RuntimeException);
+ //-----IAccessibility2 Implementation 2009
protected:
/** This list holds the descriptors of all currently visible shapes and
associated accessible object.
diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx
index ad6a633215c5..e8f9c693ac0b 100644
--- a/svx/source/accessibility/ShapeTypeHandler.cxx
+++ b/svx/source/accessibility/ShapeTypeHandler.cxx
@@ -31,8 +31,14 @@
#include <vos/mutex.hxx>
#include <vcl/svapp.hxx>
#include <svx/dialmgr.hxx>
-#include "svx/svdstr.hrc"
+//IAccessibility2 Implementation 2009-----
+#include <svx/unoshape.hxx>
+#include <svx/svdoashp.hxx>
+#include "svx/unoapi.hxx"
+//-----IAccessibility2 Implementation 2009
+
+#include "svx/svdstr.hrc"
using namespace ::rtl;
using namespace ::com::sun::star;
@@ -303,6 +309,38 @@ long ShapeTypeHandler::GetSlotId (const uno::Reference<drawing::XShape>& rxShape
case DRAWING_RECTANGLE:
nResourceId = STR_ObjNameSingulRECT;
break;
+ //IAccessibility2 Implementation 2009-----
+ case DRAWING_CUSTOM:
+ {
+ nResourceId = STR_ObjNameSingulCUSTOMSHAPE;
+
+ SvxShape* pShape = SvxShape::getImplementation( rxShape );
+ if (pShape)
+ {
+ SdrObject *pSdrObj = pShape->GetSdrObject();
+ if (pSdrObj)
+ {
+ String aTmp;
+ pSdrObj->TakeObjNameSingul( aTmp );
+ SdrObjCustomShape* pCustomShape = dynamic_cast< SdrObjCustomShape* >(pSdrObj);
+
+ if(pCustomShape)
+ {
+ if (pCustomShape->IsTextPath())
+ {
+ nResourceId = STR_ObjNameSingulFONTWORK;
+ }
+ else
+ {
+ nResourceId = -1;
+ sName = pCustomShape->GetCustomShapeName();
+ }
+ }
+ }
+ }
+ break;
+ }
+ //-----IAccessibility2 Implementation 2009
case DRAWING_TEXT:
nResourceId = STR_ObjNameSingulTEXT;
break;
diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx
index df148894c21e..96d23b5017b2 100644
--- a/svx/source/accessibility/charmapacc.cxx
+++ b/svx/source/accessibility/charmapacc.cxx
@@ -166,7 +166,8 @@ Reference< XAccessible > SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleParent(
// -----------------------------------------------------------------------------
::com::sun::star::awt::Rectangle SAL_CALL SvxShowCharSetVirtualAcc::implGetBounds( ) throw (RuntimeException)
{
- const Point aOutPos( mpParent->GetPosPixel() );
+//IAccessibility2 Implementation 2009-----
+/* const Point aOutPos( mpParent->GetPosPixel() );
Size aOutSize( mpParent->GetOutputSizePixel() );
if ( mpParent->getScrollBar()->IsVisible() )
{
@@ -183,6 +184,24 @@ Reference< XAccessible > SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleParent(
aRet.Height = aOutSize.Height();
return aRet;
+*/
+ ::com::sun::star::awt::Rectangle aBounds ( 0, 0, 0, 0 );
+ Window* pWindow = mpParent;
+ if ( pWindow )
+ {
+ Rectangle aRect = pWindow->GetWindowExtentsRelative( NULL );
+ aBounds = AWTRectangle( aRect );
+ Window* pParent = pWindow->GetAccessibleParentWindow();
+ if ( pParent )
+ {
+ Rectangle aParentRect = pParent->GetWindowExtentsRelative( NULL );
+ ::com::sun::star::awt::Point aParentScreenLoc = AWTPoint( aParentRect.TopLeft() );
+ aBounds.X -= aParentScreenLoc.X;
+ aBounds.Y -= aParentScreenLoc.Y;
+ }
+ }
+ return aBounds;
+ //-----IAccessibility2 Implementation 2009
}
// -----------------------------------------------------------------------------
sal_Int16 SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleRole( ) throw (RuntimeException)
@@ -346,13 +365,15 @@ void SvxShowCharSetAcc::implSelect( sal_Int32 nAccessibleChildIndex, sal_Bool bS
// -----------------------------------------------------------------------------
::com::sun::star::awt::Rectangle SAL_CALL SvxShowCharSetAcc::implGetBounds( ) throw (RuntimeException)
{
- const Point aOutPos( m_pParent->getCharSetControl()->GetPosPixel() );
+//IAccessibility2 Implementation 2009-----
+ const Point aOutPos;//( m_pParent->getCharSetControl()->GetPosPixel() );
Size aOutSize( m_pParent->getCharSetControl()->GetOutputSizePixel());
if ( m_pParent->getCharSetControl()->getScrollBar()->IsVisible() )
{
const Size aScrollBar = m_pParent->getCharSetControl()->getScrollBar()->GetOutputSizePixel();
aOutSize.Width() -= aScrollBar.Width();
- aOutSize.Height() -= aScrollBar.Height();
+ //aOutSize.Height() -= aScrollBar.Height();
+ //-----IAccessibility2 Implementation 2009
}
awt::Rectangle aRet;
@@ -694,7 +715,10 @@ uno::Reference< accessibility::XAccessible > SAL_CALL SvxShowCharSetItemAcc::get
sal_Int16 SAL_CALL SvxShowCharSetItemAcc::getAccessibleRole()
throw (uno::RuntimeException)
{
- return accessibility::AccessibleRole::LABEL;
+ //return accessibility::AccessibleRole::LABEL;
+//IAccessibility2 Implementation 2009-----
+ return accessibility::AccessibleRole::TABLE_CELL;
+//-----IAccessibility2 Implementation 2009
}
// -----------------------------------------------------------------------------
@@ -709,14 +733,30 @@ sal_Int16 SAL_CALL SvxShowCharSetItemAcc::getAccessibleRole()
sal_Unicode c = mpParent->maText.GetChar(0);
char buf[16] = "0x0000";
sal_Unicode c_Shifted = c;
+//IAccessibility2 Implementation 2009-----
+/*
for( int i = 0; i < 4; ++i )
{
char h = (char)(c_Shifted & 0x0F);
buf[5-i] = (h > 9) ? (h - 10 + 'A') : (h + '0');
c_Shifted >>= 4;
}
+*/
+ int tmp_len = 4;
+ if(c_Shifted>0xFFFF) tmp_len = 8;
+ for( int i = 0; i < tmp_len; ++i )
+ {
+ char h = c_Shifted & 0x0F;
+ //buf[9-i] = (h > 9) ? (h - 10 + 'A') : (h + '0');
+ buf[tmp_len+1-i] = (h > 9) ? (h - 10 + 'A') : (h + '0');
+ c_Shifted >>= 4;
+ }
+//-----IAccessibility2 Implementation 2009
if( c < 256 )
snprintf( buf+6, 10, " (%d)", c );
+ //IAccessibility2 Implementation 2009-----
+ sDescription.AppendAscii(" ");
+ //-----IAccessibility2 Implementation 2009
sDescription.AppendAscii(buf);
return sDescription;
@@ -762,9 +802,15 @@ uno::Reference< accessibility::XAccessibleStateSet > SAL_CALL SvxShowCharSetItem
if( mpParent )
{
- // SELECTABLE
- pStateSet->AddState( accessibility::AccessibleStateType::SELECTABLE );
- pStateSet->AddState( accessibility::AccessibleStateType::FOCUSABLE );
+ //IAccessibility2 Implementation 2009-----
+ if(mpParent->mrParent.IsEnabled())
+ {
+ pStateSet->AddState( accessibility::AccessibleStateType::ENABLED );
+ // SELECTABLE
+ pStateSet->AddState( accessibility::AccessibleStateType::SELECTABLE );
+ pStateSet->AddState( accessibility::AccessibleStateType::FOCUSABLE );
+ }
+ //-----IAccessibility2 Implementation 2009
// SELECTED
if( mpParent->mrParent.GetSelectIndexId() == mpParent->mnId )
@@ -773,7 +819,12 @@ uno::Reference< accessibility::XAccessibleStateSet > SAL_CALL SvxShowCharSetItem
pStateSet->AddState( accessibility::AccessibleStateType::FOCUSED );
}
if ( mpParent->mnId >= mpParent->mrParent.FirstInView() && mpParent->mnId <= mpParent->mrParent.LastInView() )
+ //IAccessibility2 Implementation 2009-----
+ {
pStateSet->AddState( AccessibleStateType::VISIBLE );
+ pStateSet->AddState( AccessibleStateType::SHOWING );
+ }
+ //-----IAccessibility2 Implementation 2009
pStateSet->AddState( AccessibleStateType::TRANSIENT );
}
diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
new file mode 100644
index 000000000000..f80c488f5ffb
--- /dev/null
+++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
@@ -0,0 +1,1281 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svx.hxx"
+
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTID_HPP_
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#endif
+#ifndef _UTL_ACCESSIBLESTATESETHELPER_HXX_
+#include <unotools/accessiblestatesethelper.hxx>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYCHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
+#include <com/sun/star/awt/XWindow.hpp>
+#endif
+
+#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
+#include <cppuhelper/typeprovider.hxx>
+#endif
+
+#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
+#include <toolkit/helper/vclunohelper.hxx>
+#endif
+#ifndef _TOOLKIT_HELPER_CONVERT_HXX_
+#include <toolkit/helper/convert.hxx>
+#endif
+
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+
+#ifndef _OSL_MUTEX_HXX_
+#include <osl/mutex.hxx>
+#endif
+#ifndef _RTL_UUID_H_
+#include <rtl/uuid.h>
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _SV_GEN_HXX
+#include <tools/gen.hxx>
+#endif
+
+#include <svx/dialogs.hrc>
+#include "accessibility.hrc"
+#include <svx/dlgctrl.hxx>
+
+#ifndef _SVX_DIALMGR_HXX
+#include <svx/dialmgr.hxx>
+#endif
+#ifndef COMPHELPER_ACCESSIBLE_EVENT_NOTIFIER
+#include <comphelper/accessibleeventnotifier.hxx>
+#endif
+
+#include <unotools/accessiblerelationsethelper.hxx>
+
+#ifndef _SVXPIXELACCESSIBLECONTEXT_HXX
+#include "svxpixelctlaccessiblecontext.hxx"
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLERELATIONTYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#endif
+using namespace ::cppu;
+using namespace ::osl;
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::accessibility;
+
+SvxPixelCtlAccessible::SvxPixelCtlAccessible( SvxPixelCtl& rControl) :
+ SvxPixelCtlAccessible_BASE(m_aMutex),
+ pPixelCtl(&rControl),
+ mnClientId(0)
+{
+ //FreeResource();
+}
+
+SvxPixelCtlAccessible::~SvxPixelCtlAccessible()
+{
+// DBG_DTOR( SvxPixelCtlAccessible, NULL );
+
+ if( IsAlive() )
+ {
+ osl_incrementInterlockedCount( &m_refCount );
+ dispose(); // set mpRepr = NULL & release all childs
+ }
+}
+/*-- 04.02.2002 14:11:55---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+uno::Reference< XAccessibleContext > SvxPixelCtlAccessible::getAccessibleContext( )
+ throw (uno::RuntimeException)
+{
+ return this;
+}
+
+sal_Int32 SvxPixelCtlAccessible::getAccessibleChildCount( ) throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ IsValid();
+ if(pPixelCtl)
+ {
+ return pPixelCtl->GetSquares();
+ }
+ else
+ return 0;
+}
+/*-- 04.02.2002 14:11:56---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+uno::Reference< XAccessible > SvxPixelCtlAccessible::getAccessibleChild( sal_Int32 i )
+ throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ IsValid();
+ if ( i < 0 || i >= getAccessibleChildCount())
+ throw lang::IndexOutOfBoundsException();
+ uno::Reference <XAccessible> xAcc;
+ if(pPixelCtl)
+ {
+ return CreateChild(i, pPixelCtl->IndexToPoint(i));
+ }
+ else
+ return xAcc;
+ /*
+ throw lang::IndexOutOfBoundsException (
+ ::rtl::OUString::createFromAscii ("no child with index " + i),
+ NULL);
+ */
+}
+
+
+
+uno::Reference< XAccessible > SvxPixelCtlAccessible::getAccessibleParent( )
+ throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ IsValid();
+ uno::Reference< XAccessible > xRet;
+ if(pPixelCtl)
+ xRet = pPixelCtl->GetParent()->GetAccessible( sal_True );
+ return xRet;
+}
+
+sal_Int32 SvxPixelCtlAccessible::getAccessibleIndexInParent( )
+ throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ IsValid();
+ sal_uInt16 nIdx = 0;
+ if(pPixelCtl)
+ {
+ Window* pTabPage = pPixelCtl->GetParent();
+ sal_uInt16 nChildren = pTabPage->GetChildCount();
+ for(nIdx = 0; nIdx < nChildren; nIdx++)
+ if(pTabPage->GetChild( nIdx ) == pPixelCtl)
+ break;
+ }
+ return nIdx;
+}
+/*-- 04.02.2002 14:11:57---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+sal_Int16 SvxPixelCtlAccessible::getAccessibleRole( ) throw (uno::RuntimeException)
+{
+ return AccessibleRole::LIST;
+}
+
+::rtl::OUString SvxPixelCtlAccessible::getAccessibleDescription( )
+ throw (uno::RuntimeException)
+{
+
+ ::osl::MutexGuard aGuard( m_aMutex );
+ IsValid();
+ if(pPixelCtl)
+ return pPixelCtl->GetAccessibleDescription();
+ else
+ return String();
+
+}
+
+::rtl::OUString SvxPixelCtlAccessible::getAccessibleName( )
+ throw (uno::RuntimeException)
+{
+
+ ::osl::MutexGuard aGuard( m_aMutex );
+ IsValid();
+ if(pPixelCtl)
+ return pPixelCtl->GetAccessibleName();
+ else
+ return String();
+
+}
+
+uno::Reference< XAccessibleRelationSet > SvxPixelCtlAccessible::getAccessibleRelationSet( )
+ throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ IsValid();
+ Window* pWindow = (Window*)pPixelCtl;
+ utl::AccessibleRelationSetHelper* rRelationSet = new utl::AccessibleRelationSetHelper;
+ uno::Reference< accessibility::XAccessibleRelationSet > rSet = rRelationSet;
+ if ( pWindow )
+ {
+ Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
+ if ( pLabeledBy && pLabeledBy != pWindow )
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = pLabeledBy->GetAccessible();
+ rRelationSet->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABELED_BY, aSequence ) );
+ }
+
+ Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf();
+ if ( pMemberOf && pMemberOf != pWindow )
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = pMemberOf->GetAccessible();
+ rRelationSet->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
+ }
+ return rSet;
+ }
+
+ return new utl::AccessibleRelationSetHelper;
+}
+
+
+uno::Reference< XAccessibleStateSet > SvxPixelCtlAccessible::getAccessibleStateSet( )
+ throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper;
+ uno::Reference< XAccessibleStateSet > xRet = pStateSetHelper;
+
+ if(!pPixelCtl)
+ pStateSetHelper->AddState(AccessibleStateType::DEFUNC);
+ else
+ {
+ const sal_Int16 aStandardStates[] =
+ {
+ AccessibleStateType::FOCUSABLE,
+ AccessibleStateType::SELECTABLE,
+ AccessibleStateType::SHOWING,
+ AccessibleStateType::VISIBLE,
+ AccessibleStateType::OPAQUE,
+ 0};
+
+ sal_Int16 nState = 0;
+ while(aStandardStates[nState])
+ {
+ pStateSetHelper->AddState(aStandardStates[nState++]);
+ }
+ if(pPixelCtl->IsEnabled())
+ pStateSetHelper->AddState(AccessibleStateType::ENABLED);
+ if(pPixelCtl->HasFocus())
+ pStateSetHelper->AddState(AccessibleStateType::FOCUSED);
+ pStateSetHelper->AddState(AccessibleStateType::MANAGES_DESCENDANTS);
+ }
+ return xRet;
+}
+
+
+com::sun::star::lang::Locale SvxPixelCtlAccessible::getLocale( )
+ throw (IllegalAccessibleComponentStateException, uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if( getAccessibleParent().is() )
+ {
+ uno::Reference< XAccessibleContext > xParentContext( getAccessibleParent()->getAccessibleContext() );
+ if( xParentContext.is() )
+ return xParentContext->getLocale();
+ }
+
+ // No locale and no parent. Therefore throw exception to indicate this
+ // cluelessness.
+ throw IllegalAccessibleComponentStateException();
+}
+
+
+sal_Bool SvxPixelCtlAccessible::containsPoint( const awt::Point& aPt )
+ throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ IsValid();
+ Point aPoint(aPt.X, aPt.Y);
+ if(pPixelCtl)
+ return (aPoint.X() >= 0)
+ && (aPoint.X() < pPixelCtl->GetSizePixel().getWidth())
+ && (aPoint.Y() >= 0)
+ && (aPoint.Y() < pPixelCtl->GetSizePixel().getHeight());
+ else
+ return sal_False;
+}
+uno::Reference<XAccessible > SAL_CALL SvxPixelCtlAccessible::getAccessibleAtPoint (
+ const awt::Point& aPoint)
+ throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ensureIsAlive();
+ uno::Reference <XAccessible> xAcc;
+
+ Point childPoint;
+ childPoint.X() = aPoint.X;
+ childPoint.Y() = aPoint.Y;
+
+ if(pPixelCtl)
+ {
+ Point pt= pPixelCtl->PixelToLogic(childPoint);
+ long nIndex = pPixelCtl->PointToIndex(pt);
+ return CreateChild(nIndex,pPixelCtl->IndexToPoint(nIndex));
+ }
+ else
+ return xAcc;
+
+}
+
+awt::Rectangle SvxPixelCtlAccessible::getBounds( ) throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ IsValid();
+ Size aSz;
+ Point aPos(0,0);
+ awt::Rectangle aRet;
+ if(pPixelCtl)
+ {
+ aSz = pPixelCtl->GetSizePixel();
+ aPos = pPixelCtl->GetPosPixel();
+ aRet.X = aPos.X();
+ aRet.Y = aPos.Y();
+ aRet.Width = aSz.Width();
+ aRet.Height = aSz.Height();
+ }
+ return aRet;
+}
+
+awt::Point SvxPixelCtlAccessible::getLocation( ) throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ IsValid();
+ Point aPos;
+ aPos = pPixelCtl->GetPosPixel();
+ awt::Point aRet(aPos.X(), aPos.Y());
+ return aRet;
+}
+
+awt::Point SvxPixelCtlAccessible::getLocationOnScreen( ) throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ IsValid();
+ Rectangle rect;
+ rect = pPixelCtl->GetWindowExtentsRelative(NULL);
+ awt::Point aRet(rect.Left(),rect.Top() );
+ return aRet;
+}
+
+awt::Size SvxPixelCtlAccessible::getSize( ) throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ IsValid();
+ Size aSz;
+ aSz = pPixelCtl->GetSizePixel();
+ awt::Size aRet(aSz.Width(),aSz.Height());
+ return aRet;
+}
+void SvxPixelCtlAccessible::grabFocus( ) throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ IsValid();
+ if(pPixelCtl)
+ pPixelCtl->GrabFocus();
+}
+
+sal_Int32 SvxPixelCtlAccessible::getForeground( )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ uno::Any aRet;
+ ::osl::MutexGuard aGuard( m_aMutex );
+ IsValid();
+ return pPixelCtl->GetControlForeground().GetColor();
+}
+
+sal_Int32 SvxPixelCtlAccessible::getBackground( )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ uno::Any aRet;
+ ::osl::MutexGuard aGuard( m_aMutex );
+ IsValid();
+ return pPixelCtl->GetControlBackground().GetColor();
+}
+
+::rtl::OUString SvxPixelCtlAccessible::getImplementationName( ) throw (uno::RuntimeException)
+{
+ return rtl::OUString::createFromAscii("SvxPixelCtlAccessible");
+}
+/*-- 04.02.2002 14:12:05---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+const sal_Char sAccessible[] = "Accessible";
+const sal_Char sAccessibleContext[] = "AccessibleContext";
+const sal_Char sAccessibleComponent[] = "AccessibleComponent";
+//const sal_Char sAccessibleTable[] = "AccessibleTable";
+
+sal_Bool SvxPixelCtlAccessible::supportsService( const ::rtl::OUString& rServiceName )
+ throw (uno::RuntimeException)
+{
+ return rServiceName.equalsAsciiL( sAccessible , sizeof(sAccessible )-1 ) ||
+ rServiceName.equalsAsciiL( sAccessibleContext , sizeof(sAccessibleContext )-1 ) ||
+ rServiceName.equalsAsciiL( sAccessibleComponent, sizeof(sAccessibleComponent)-1 );// ||
+// rServiceName.equalsAsciiL( sAccessibleTable, sizeof(sAccessibleTable)-1 );
+}
+/*-- 04.02.2002 14:12:05---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+uno::Sequence< ::rtl::OUString > SvxPixelCtlAccessible::getSupportedServiceNames( )
+ throw (uno::RuntimeException)
+{
+ uno::Sequence< OUString > aRet(2);
+ OUString* pArray = aRet.getArray();
+ pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessible ) );
+ pArray[1] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleContext ) );
+ pArray[2] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleComponent) );
+// pArray[3] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleTable) );
+ return aRet;
+}
+
+// -----------------------------------------------------------------------------
+// XAccessibleSelection
+// -----------------------------------------------------------------------------
+void SAL_CALL SvxPixelCtlAccessible::selectAccessibleChild( sal_Int32 nChildIndex ) throw (lang::IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ IsValid();
+
+ if ( nChildIndex < 0 || nChildIndex >= getAccessibleChildCount())
+ throw lang::IndexOutOfBoundsException();
+
+ long nIndex = pPixelCtl->ShowPosition(pPixelCtl->IndexToPoint(nChildIndex));
+ NotifyChild(nIndex,sal_True,sal_False);
+}
+// -----------------------------------------------------------------------------
+sal_Bool SAL_CALL SvxPixelCtlAccessible::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (lang::IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ IsValid();
+
+ return pPixelCtl->GetFoucsPosIndex() == nChildIndex;
+}
+// -----------------------------------------------------------------------------
+void SAL_CALL SvxPixelCtlAccessible::clearAccessibleSelection( ) throw (RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ IsValid();
+
+}
+// -----------------------------------------------------------------------------
+void SAL_CALL SvxPixelCtlAccessible::selectAllAccessibleChildren( ) throw (RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ IsValid();
+
+}
+// -----------------------------------------------------------------------------
+sal_Int32 SAL_CALL SvxPixelCtlAccessible::getSelectedAccessibleChildCount( ) throw (RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ IsValid();
+
+ return 1;
+}
+// -----------------------------------------------------------------------------
+uno::Reference< XAccessible > SAL_CALL SvxPixelCtlAccessible::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (lang::IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ IsValid();
+
+ if ( nSelectedChildIndex >= 1)
+ throw lang::IndexOutOfBoundsException();
+
+ uno::Reference< XAccessible > xChild;
+ if(pPixelCtl)
+ {
+ if(m_xCurChild.is())
+ {
+ xChild = m_xCurChild;
+ }
+ }
+ return xChild;
+}
+// -----------------------------------------------------------------------------
+void SAL_CALL SvxPixelCtlAccessible::deselectAccessibleChild( sal_Int32 ) throw (lang::IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ IsValid();
+
+
+}
+
+// Added by lq
+void SvxPixelCtlAccessible::ensureIsAlive() const
+ throw ( lang::DisposedException )
+{
+ if( !IsAlive() )
+ throw lang::DisposedException();
+}
+
+void SvxPixelCtlAccessible::ensureIsValidRow( sal_Int32 nRow )
+ throw ( lang::IndexOutOfBoundsException )
+{
+ if( nRow >= pPixelCtl->GetHeight() || nRow <0)
+ throw lang::IndexOutOfBoundsException(
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "row index is invalid" ) ), *this );
+}
+
+void SvxPixelCtlAccessible::ensureIsValidColumn( sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException )
+{
+ if( nColumn >= pPixelCtl->GetWidth() || nColumn <0 )
+ throw lang::IndexOutOfBoundsException(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("column index is invalid") ), *this );
+}
+
+void SvxPixelCtlAccessible::ensureIsValidAddress(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException )
+{
+ ensureIsValidRow( nRow );
+ ensureIsValidColumn( nColumn );
+}
+
+void SvxPixelCtlAccessible::ensureIsValidIndex( sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException )
+{
+ if( nChildIndex >= pPixelCtl->GetSquares())
+ throw lang::IndexOutOfBoundsException(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("child index is invalid") ), *this );
+}
+
+// XAccessibleTable -----------------------------------------------------------
+/*
+sal_Int32 SAL_CALL SvxPixelCtlAccessible::getAccessibleRowCount()
+ throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ensureIsAlive();
+ return pPixelCtl->GetLineCount();
+}
+
+sal_Int32 SAL_CALL SvxPixelCtlAccessible::getAccessibleColumnCount()
+ throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ensureIsAlive();
+ return pPixelCtl->GetLineCount();
+}
+
+sal_Int32 SAL_CALL SvxPixelCtlAccessible::getAccessibleRowExtentAt(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ensureIsAlive();
+ return 1; // merged cells not supported
+}
+
+sal_Int32 SAL_CALL SvxPixelCtlAccessible::getAccessibleColumnExtentAt(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ensureIsAlive();
+ return 1; // merged cells not supported
+}
+
+uno::Reference< XAccessible > SAL_CALL SvxPixelCtlAccessible::getAccessibleCaption()
+ throw ( uno::RuntimeException )
+{
+ uno::Reference< XAccessible > xAccessble;
+ ensureIsAlive();
+ return xAccessble; // not supported
+}
+
+uno::Reference< XAccessible > SAL_CALL SvxPixelCtlAccessible::getAccessibleSummary()
+ throw ( uno::RuntimeException )
+{
+ uno::Reference< XAccessible > xAccessble;
+ ensureIsAlive();
+ return xAccessble; // not supported
+}
+
+sal_Int32 SAL_CALL SvxPixelCtlAccessible::getAccessibleIndex(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ensureIsAlive();
+ ensureIsValidAddress(nRow,nColumn);
+ return nRow + nColumn * pPixelCtl->GetLineCount() ;
+}
+
+sal_Int32 SAL_CALL SvxPixelCtlAccessible::getAccessibleRow( sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ensureIsAlive();
+ ensureIsValidIndex( nChildIndex );
+ return nChildIndex/pPixelCtl->GetLineCount();
+}
+
+sal_Int32 SAL_CALL SvxPixelCtlAccessible::getAccessibleColumn( sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ensureIsAlive();
+ ensureIsValidIndex( nChildIndex );
+ return nChildIndex%pPixelCtl->GetLineCount();
+}
+
+::rtl::OUString SAL_CALL SvxPixelCtlAccessible::getAccessibleRowDescription( sal_Int32 nRow )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ensureIsAlive();
+ ensureIsValidRow( nRow );
+ return ::rtl::OUString::createFromAscii ("");
+}
+
+::rtl::OUString SAL_CALL SvxPixelCtlAccessible::getAccessibleColumnDescription( sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ensureIsAlive();
+ ensureIsValidColumn( nColumn );
+ return ::rtl::OUString::createFromAscii ("");
+}
+
+uno::Reference< XAccessibleTable > SAL_CALL SvxPixelCtlAccessible::getAccessibleRowHeaders()
+ throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ uno::Reference< XAccessibleTable > xAccessble;
+ ensureIsAlive();
+ return xAccessble;
+}
+
+uno::Reference< XAccessibleTable > SAL_CALL SvxPixelCtlAccessible::getAccessibleColumnHeaders()
+ throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ uno::Reference< XAccessibleTable > xAccessble;
+ ensureIsAlive();
+ return xAccessble;
+}
+
+Sequence< sal_Int32 > SAL_CALL SvxPixelCtlAccessible::getSelectedAccessibleRows()
+ throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ Sequence< sal_Int32 > accRows;
+ ensureIsAlive();
+
+ return accRows;
+}
+
+Sequence< sal_Int32 > SAL_CALL SvxPixelCtlAccessible::getSelectedAccessibleColumns()
+ throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ Sequence< sal_Int32 > accColumns;
+ ensureIsAlive();
+
+ return accColumns;
+}
+
+sal_Bool SAL_CALL SvxPixelCtlAccessible::isAccessibleRowSelected( sal_Int32 nRow )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ensureIsAlive();
+ ensureIsValidRow( nRow );
+ return sal_False;
+}
+
+sal_Bool SAL_CALL SvxPixelCtlAccessible::isAccessibleColumnSelected( sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ensureIsAlive();
+ ensureIsValidColumn( nColumn );
+ return sal_False;
+}
+
+uno::Reference< XAccessible > SAL_CALL SvxPixelCtlAccessible::getAccessibleCellAt(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ensureIsAlive();
+ ensureIsValidAddress( nRow, nColumn );
+ return getAccessibleChild(nRow*pPixelCtl->GetLineCount()+nColumn);
+}
+
+sal_Bool SAL_CALL SvxPixelCtlAccessible::isAccessibleSelected(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ensureIsAlive();
+ ensureIsValidAddress( nRow, nColumn );
+ return isAccessibleChildSelected(nRow*pPixelCtl->GetLineCount()+nColumn);
+}
+// Added by lq end
+*/
+
+//XAccessibleEventBroadcaster
+void SAL_CALL SvxPixelCtlAccessible::addEventListener( const uno::Reference< XAccessibleEventListener >& xListener ) throw( RuntimeException )
+{
+ if (xListener.is())
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if (!mnClientId)
+ mnClientId = comphelper::AccessibleEventNotifier::registerClient( );
+ comphelper::AccessibleEventNotifier::addEventListener( mnClientId, xListener );
+ }
+}
+
+void SAL_CALL SvxPixelCtlAccessible::removeEventListener( const uno::Reference< XAccessibleEventListener >& xListener )
+ throw( RuntimeException )
+{
+ if (xListener.is())
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ sal_Int32 nListenerCount = comphelper::AccessibleEventNotifier::removeEventListener( mnClientId, xListener );
+ if ( !nListenerCount )
+ {
+ comphelper::AccessibleEventNotifier::revokeClient( mnClientId );
+ mnClientId = 0;
+ }
+ }
+}
+void SvxPixelCtlAccessible::CommitChange( const AccessibleEventObject& rEvent )
+{
+ if (mnClientId)
+ comphelper::AccessibleEventNotifier::addEvent( mnClientId, rEvent );
+}
+
+//Solution:Add the event handling method
+void SvxPixelCtlAccessible::FireAccessibleEvent (short nEventId, const ::com::sun::star::uno::Any& rOld, const ::com::sun::star::uno::Any& rNew)
+{
+ const uno::Reference< XInterface > xSource( *this );
+ CommitChange( AccessibleEventObject( xSource, nEventId, rNew,rOld ) );
+}
+
+void SAL_CALL SvxPixelCtlAccessible::disposing()
+{
+ if( !rBHelper.bDisposed )
+ {
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( mnClientId )
+ {
+ comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing( mnClientId, *this );
+ mnClientId = 0;
+ }
+ }
+ //mxParent = uno::Reference< XAccessible >();
+
+ }
+}
+void SvxPixelCtlAccessible::Invalidate()
+{
+ pPixelCtl = 0;
+}
+void SvxPixelCtlAccessible::ThrowExceptionIfNotAlive( void ) throw( lang::DisposedException )
+{
+ if( IsNotAlive() )
+ throw lang::DisposedException();
+}
+void SvxPixelCtlAccessible::IsValid() throw (uno::RuntimeException)
+{
+ if(!pPixelCtl)
+ throw uno::RuntimeException();
+}
+
+
+void SvxPixelCtlAccessible::NotifyChild(long nIndex,sal_Bool bSelect ,sal_Bool bCheck)
+{
+ DBG_ASSERT( !(!bSelect && !bCheck),"" );//non is false
+
+ SvxPixelCtlAccessibleChild *pChild= NULL;
+
+ if (m_xCurChild.is())
+ {
+ pChild= static_cast<SvxPixelCtlAccessibleChild*>(m_xCurChild.get());
+ DBG_ASSERT(pChild,"Child Must be Valid");
+ if (pChild->getAccessibleIndexInParent() == nIndex )
+ {
+ if (bSelect)
+ {
+ pChild->SelectChild(sal_True);
+ }
+ if (bCheck)
+ {
+ pChild->ChangePixelColorOrBG(sal_Bool(pPixelCtl->GetBitmapPixel(sal_uInt16(nIndex))));
+ pChild->CheckChild();
+ }
+ return ;
+ }
+ }
+ uno::Reference <XAccessible> xNewChild =CreateChild(nIndex, pPixelCtl->IndexToPoint(nIndex));
+ SvxPixelCtlAccessibleChild *pNewChild= static_cast<SvxPixelCtlAccessibleChild*>(xNewChild.get());
+ DBG_ASSERT(pNewChild,"Child Must be Valid");
+
+ Any aNewValue,aOldValue;
+ aNewValue<<= xNewChild;
+ FireAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
+ aOldValue,
+ aNewValue );
+
+ if (bSelect)
+ {
+ if (pChild)
+ {
+ pChild->SelectChild(sal_False);
+ }
+ pNewChild->SelectChild(sal_True);
+ }
+ if (bCheck)
+ {
+ pNewChild->CheckChild();
+ }
+ m_xCurChild= xNewChild;
+
+
+}
+
+uno::Reference<XAccessible> SvxPixelCtlAccessible::CreateChild (long nIndex,Point mPoint)
+{
+ long nX = mPoint.X();
+ long nY = mPoint.Y();
+ if( Application::GetSettings().GetLayoutRTL())
+ {
+ nX = (sal_uInt16) pPixelCtl->GetWidth() - 1 - nX;
+ }
+
+ sal_Bool bPixelColorOrBG= sal_Bool(pPixelCtl->GetBitmapPixel(sal_uInt16(nIndex)));
+ Size size(pPixelCtl->GetWidth() / pPixelCtl->GetLineCount(),pPixelCtl->GetHeight() / pPixelCtl->GetLineCount());
+ uno::Reference<XAccessible> xChild;
+ xChild = new SvxPixelCtlAccessibleChild(pPixelCtl,
+ bPixelColorOrBG,
+ Point(nX,nY),
+ Rectangle(mPoint,size),
+ this,
+ nIndex);
+
+ return xChild;
+}
+
+
+void SvxPixelCtlAccessible::LoseFocus()
+{
+ m_xCurChild = uno::Reference< XAccessible >() ;
+}
+
+void SvxPixelCtlAccessibleChild::CheckChild()
+{
+ Any aChecked;
+ aChecked <<= AccessibleStateType::CHECKED;
+
+ if (m_bPixelColorOrBG)//Current Child State
+ {
+ FireAccessibleEvent( AccessibleEventId::STATE_CHANGED,
+ Any(),
+ aChecked);
+ }
+ else
+ {
+ FireAccessibleEvent( AccessibleEventId::STATE_CHANGED,
+ aChecked,
+ Any() );
+ }
+}
+
+void SvxPixelCtlAccessibleChild::SelectChild( sal_Bool bSelect)
+{
+ Any aSelected;
+ aSelected <<= AccessibleStateType::SELECTED;
+
+ if (bSelect)
+ {
+ FireAccessibleEvent( AccessibleEventId::STATE_CHANGED,
+ Any(),
+ aSelected);
+ }
+ else
+ {
+ FireAccessibleEvent( AccessibleEventId::STATE_CHANGED,
+ aSelected,
+ Any());
+ }
+}
+void SvxPixelCtlAccessibleChild::FireAccessibleEvent (
+ short nEventId,
+ const ::com::sun::star::uno::Any& rOld,
+ const ::com::sun::star::uno::Any& rNew)
+{
+ const uno::Reference< XInterface > xSource( *this );
+ CommitChange( AccessibleEventObject( xSource, nEventId, rNew,rOld ) );
+}
+
+
+
+DBG_NAME( SvxPixelCtlAccessibleChild )
+
+
+SvxPixelCtlAccessibleChild::SvxPixelCtlAccessibleChild(
+ SvxPixelCtl* rWindow,
+ sal_Bool bPixelColorOrBG,
+ const Point &aPoint,
+ const Rectangle& rBoundingBox,
+ const uno::Reference<XAccessible>& rxParent,
+ long nIndexInParent ) :
+ SvxPixelCtlAccessibleChild_BASE( m_aMutex ),
+ mrParentWindow( rWindow ),
+ mxParent(rxParent),
+ m_bPixelColorOrBG(bPixelColorOrBG),
+ maPoint(aPoint),
+ mpBoundingBox( new Rectangle( rBoundingBox ) ),
+ mnIndexInParent( nIndexInParent ),
+ mnClientId( 0 )
+{
+ DBG_CTOR( SvxPixelCtlAccessibleChild, NULL );
+}
+
+
+SvxPixelCtlAccessibleChild::~SvxPixelCtlAccessibleChild()
+{
+ DBG_DTOR( SvxPixelCtlAccessibleChild, NULL );
+
+ if( IsAlive() )
+ {
+ osl_incrementInterlockedCount( &m_refCount );
+ dispose(); // set mpRepr = NULL & release all childs
+ }
+}
+
+//===== XAccessible =========================================================
+
+uno::Reference< XAccessibleContext> SAL_CALL SvxPixelCtlAccessibleChild::getAccessibleContext( void ) throw( RuntimeException )
+{
+ return this;
+}
+
+//===== XAccessibleComponent ================================================
+
+sal_Bool SAL_CALL SvxPixelCtlAccessibleChild::containsPoint( const awt::Point& rPoint ) throw( RuntimeException )
+{
+ // no guard -> done in getBounds()
+// return GetBoundingBox().IsInside( VCLPoint( rPoint ) );
+ return Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) );
+}
+
+uno::Reference< XAccessible > SAL_CALL SvxPixelCtlAccessibleChild::getAccessibleAtPoint( const awt::Point& ) throw( RuntimeException )
+{
+ return uno::Reference< XAccessible >();
+}
+
+awt::Rectangle SAL_CALL SvxPixelCtlAccessibleChild::getBounds() throw( RuntimeException )
+{
+ // no guard -> done in getBoundingBox()
+ //Modified by lq, 09/26
+ //return AWTRectangle( GetBoundingBox() );
+ awt::Rectangle rect = AWTRectangle( GetBoundingBox() );
+ rect.X = rect.X + mrParentWindow->GetClientWindowExtentsRelative(NULL).Left()-mrParentWindow->GetWindowExtentsRelative(NULL).Left();
+ rect.Y = rect.Y + mrParentWindow->GetClientWindowExtentsRelative(NULL).Top()-mrParentWindow->GetWindowExtentsRelative(NULL).Top();
+ return rect;
+ // End
+}
+
+awt::Point SAL_CALL SvxPixelCtlAccessibleChild::getLocation() throw( RuntimeException )
+{
+ // no guard -> done in getBoundingBox()
+ return AWTPoint( GetBoundingBox().TopLeft() );
+}
+
+awt::Point SAL_CALL SvxPixelCtlAccessibleChild::getLocationOnScreen() throw( RuntimeException )
+{
+ // no guard -> done in getBoundingBoxOnScreen()
+ return AWTPoint( GetBoundingBoxOnScreen().TopLeft() );
+}
+
+awt::Size SAL_CALL SvxPixelCtlAccessibleChild::getSize() throw( RuntimeException )
+{
+ // no guard -> done in getBoundingBox()
+ return AWTSize( GetBoundingBox().GetSize() );
+}
+
+void SAL_CALL SvxPixelCtlAccessibleChild::grabFocus() throw( RuntimeException )
+{
+}
+
+sal_Int32 SvxPixelCtlAccessibleChild::getForeground( )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ //::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ThrowExceptionIfNotAlive();
+ return mrParentWindow->GetControlForeground().GetColor();
+}
+sal_Int32 SvxPixelCtlAccessibleChild::getBackground( )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ //::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ThrowExceptionIfNotAlive();
+ return mrParentWindow->GetControlBackground().GetColor();
+}
+
+//===== XAccessibleContext ==================================================
+
+sal_Int32 SAL_CALL SvxPixelCtlAccessibleChild::getAccessibleChildCount( void ) throw( RuntimeException )
+{
+ return 0;
+}
+
+uno::Reference< XAccessible > SAL_CALL SvxPixelCtlAccessibleChild::getAccessibleChild( sal_Int32 ) throw ( RuntimeException )
+{
+ throw lang::IndexOutOfBoundsException();
+}
+
+uno::Reference< XAccessible > SAL_CALL SvxPixelCtlAccessibleChild::getAccessibleParent( void ) throw( RuntimeException )
+{
+ return mxParent;
+}
+
+sal_Int32 SAL_CALL SvxPixelCtlAccessibleChild::getAccessibleIndexInParent( void ) throw( RuntimeException )
+{
+ return mnIndexInParent;
+}
+
+sal_Int16 SAL_CALL SvxPixelCtlAccessibleChild::getAccessibleRole( void ) throw( RuntimeException )
+{
+ return AccessibleRole::CHECK_BOX;
+}
+
+OUString SAL_CALL SvxPixelCtlAccessibleChild::getAccessibleDescription( void ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ return GetName();
+}
+
+OUString SAL_CALL SvxPixelCtlAccessibleChild::getAccessibleName( void ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ return GetName();
+}
+
+/** Return empty uno::Reference to indicate that the relation set is not
+ supported.
+*/
+uno::Reference<XAccessibleRelationSet> SAL_CALL SvxPixelCtlAccessibleChild::getAccessibleRelationSet( void ) throw( RuntimeException )
+{
+ return uno::Reference< XAccessibleRelationSet >();
+}
+
+uno::Reference< XAccessibleStateSet > SAL_CALL SvxPixelCtlAccessibleChild::getAccessibleStateSet( void ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper;
+
+ if( IsAlive() )
+ {
+
+ pStateSetHelper->AddState( AccessibleStateType::TRANSIENT );
+ pStateSetHelper->AddState( AccessibleStateType::ENABLED );
+ pStateSetHelper->AddState( AccessibleStateType::OPAQUE );
+ pStateSetHelper->AddState( AccessibleStateType::SELECTABLE );
+ pStateSetHelper->AddState( AccessibleStateType::SHOWING );
+ pStateSetHelper->AddState( AccessibleStateType::VISIBLE );
+
+ if (mrParentWindow )
+ {
+ long nIndex = mrParentWindow->GetFoucsPosIndex();
+ if ( nIndex == mnIndexInParent)
+ {
+ pStateSetHelper->AddState( AccessibleStateType::SELECTED );
+ }
+ //IAccessibility2 Implementation 2009-----
+ if (mrParentWindow->GetBitmapPixel(sal_uInt16(mnIndexInParent)))
+ //-----IAccessibility2 Implementation 2009
+ {
+ pStateSetHelper->AddState( AccessibleStateType::CHECKED );
+ }
+ }
+ }
+ else
+ pStateSetHelper->AddState( AccessibleStateType::DEFUNC );
+
+ return pStateSetHelper;
+}
+
+lang::Locale SAL_CALL SvxPixelCtlAccessibleChild::getLocale( void ) throw( IllegalAccessibleComponentStateException, RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if( mxParent.is() )
+ {
+ uno::Reference< XAccessibleContext > xParentContext( mxParent->getAccessibleContext() );
+ if( xParentContext.is() )
+ return xParentContext->getLocale();
+ }
+
+ // No locale and no parent. Therefore throw exception to indicate this
+ // cluelessness.
+ throw IllegalAccessibleComponentStateException();
+}
+
+void SAL_CALL SvxPixelCtlAccessibleChild::addEventListener( const uno::Reference< XAccessibleEventListener >& xListener )
+ throw( RuntimeException )
+{
+ if (xListener.is())
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if (!mnClientId)
+ mnClientId = comphelper::AccessibleEventNotifier::registerClient( );
+ comphelper::AccessibleEventNotifier::addEventListener( mnClientId, xListener );
+ }
+}
+
+
+
+
+void SAL_CALL SvxPixelCtlAccessibleChild::removeEventListener( const uno::Reference< XAccessibleEventListener >& xListener )
+ throw( RuntimeException )
+{
+ if (xListener.is())
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ sal_Int32 nListenerCount = comphelper::AccessibleEventNotifier::removeEventListener( mnClientId, xListener );
+ if ( !nListenerCount )
+ {
+ // no listeners anymore
+ // -> revoke ourself. This may lead to the notifier thread dying (if we were the last client),
+ // and at least to us not firing any events anymore, in case somebody calls
+ // NotifyAccessibleEvent, again
+ comphelper::AccessibleEventNotifier::revokeClient( mnClientId );
+ mnClientId = 0;
+ }
+ }
+}
+
+
+//===== XServiceInfo ========================================================
+
+OUString SAL_CALL SvxPixelCtlAccessibleChild::getImplementationName( void ) throw( RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "SvxPixelCtlAccessibleChild" ) );
+}
+
+sal_Bool SAL_CALL SvxPixelCtlAccessibleChild::supportsService( const OUString& rServiceName ) throw( RuntimeException )
+{
+ return rServiceName.equalsAsciiL( sAccessible , sizeof(sAccessible )-1 ) ||
+ rServiceName.equalsAsciiL( sAccessibleContext , sizeof(sAccessibleContext )-1 ) ||
+ rServiceName.equalsAsciiL( sAccessibleComponent, sizeof(sAccessibleComponent)-1 );
+
+}
+
+Sequence< OUString > SAL_CALL SvxPixelCtlAccessibleChild::getSupportedServiceNames( void ) throw( RuntimeException )
+{
+ uno::Sequence< OUString > aRet(3);
+ OUString* pArray = aRet.getArray();
+ pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessible ) );
+ pArray[1] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleContext ) );
+ pArray[2] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleComponent) );
+ return aRet;
+}
+
+//===== internal ============================================================
+
+void SvxPixelCtlAccessibleChild::CommitChange( const AccessibleEventObject& rEvent )
+{
+ if (mnClientId)
+ comphelper::AccessibleEventNotifier::addEvent( mnClientId, rEvent );
+}
+
+void SAL_CALL SvxPixelCtlAccessibleChild::disposing()
+{
+ if( !rBHelper.bDisposed )
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ // Send a disposing to all listeners.
+ if ( mnClientId )
+ {
+ comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing( mnClientId, *this );
+ mnClientId = 0;
+ }
+
+ mxParent = uno::Reference< XAccessible >();
+
+ delete mpBoundingBox;
+ }
+}
+
+void SvxPixelCtlAccessibleChild::ThrowExceptionIfNotAlive( void ) throw( lang::DisposedException )
+{
+ if( IsNotAlive() )
+ throw lang::DisposedException();
+}
+
+Rectangle SvxPixelCtlAccessibleChild::GetBoundingBoxOnScreen( void ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ // no ThrowExceptionIfNotAlive() because its done in GetBoundingBox()
+ Rectangle aRect( GetBoundingBox() );
+
+ return Rectangle( mrParentWindow->OutputToAbsoluteScreenPixel( aRect.TopLeft() ), aRect.GetSize() );
+}
+
+Rectangle SvxPixelCtlAccessibleChild::GetBoundingBox( void ) throw( RuntimeException )
+{
+ // no guard neccessary, because no one changes mpBoundingBox after creating it
+ ThrowExceptionIfNotAlive();
+
+ return *mpBoundingBox;
+}
+
+::rtl::OUString SvxPixelCtlAccessibleChild::GetName()
+{
+ sal_Int32 nXIndex = mnIndexInParent % mrParentWindow->GetLineCount();
+ sal_Int32 nYIndex = mnIndexInParent / mrParentWindow->GetLineCount();
+
+ OUString str;
+ str += OUString::createFromAscii("(");
+ str += OUString::valueOf(nXIndex);
+ str += OUString::createFromAscii(",");
+ str += OUString::valueOf(nYIndex);
+// str += OUString::createFromAscii(",");
+// str += OUString::valueOf(m_bPixelColorOrBG);
+ str += OUString::createFromAscii(")");
+ return str;
+}
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index 1f6722a59794..a9b29ddca4ac 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -46,7 +46,14 @@
#include <svx/dlgctrl.hxx>
#include <svx/dialmgr.hxx>
#include <comphelper/accessibleeventnotifier.hxx>
-
+//IAccessibility2 Implementation 2009-----
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLERELATIONTYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#endif
+#ifndef _UTL_ACCESSIBLERELATIONSETHELPER_HXX_
+#include <unotools/accessiblerelationsethelper.hxx>
+#endif
+//-----IAccessibility2 Implementation 2009
using namespace ::cppu;
using namespace ::osl;
@@ -54,6 +61,9 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::accessibility;
+//IAccessibility2 Implementation 2009-----
+using namespace ::com::sun::star::lang;
+//-----IAccessibility2 Implementation 2009
#define MAX_NUM_OF_CHILDS 9
#define NOCHILDSELECTED -1
@@ -347,13 +357,19 @@ sal_Int32 SAL_CALL SvxRectCtlAccessibleContext::getAccessibleIndexInParent( void
sal_Int16 SAL_CALL SvxRectCtlAccessibleContext::getAccessibleRole( void ) throw( RuntimeException )
{
+//IAccessibility2 Implementation 2009-----
+ //return AccessibleRole::GROUP_BOX;
return AccessibleRole::PANEL;
+//-----IAccessibility2 Implementation 2009
}
::rtl::OUString SAL_CALL SvxRectCtlAccessibleContext::getAccessibleDescription( void ) throw( RuntimeException )
{
::osl::MutexGuard aGuard( m_aMutex );
- return msDescription;
+ //IAccessibility2 Implementation 2009-----
+ //return msDescription;
+ return msDescription +::rtl::OUString::createFromAscii(" Please use arrow key to selection.");
+ //-----IAccessibility2 Implementation 2009
}
::rtl::OUString SAL_CALL SvxRectCtlAccessibleContext::getAccessibleName( void ) throw( RuntimeException )
@@ -367,9 +383,40 @@ sal_Int16 SAL_CALL SvxRectCtlAccessibleContext::getAccessibleRole( void ) throw(
*/
Reference< XAccessibleRelationSet > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleRelationSet( void ) throw( RuntimeException )
{
- return Reference< XAccessibleRelationSet >();
+//IAccessibility2 Implementation 2009-----
+ //return Reference< XAccessibleRelationSet >();
+ utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
+ uno::Reference< accessibility::XAccessibleRelationSet > xSet = pRelationSetHelper;
+ Window* pWindow = mpRepr;
+ if ( pWindow )
+ {
+ // Window *pLabeledBy = pWindow->GetAccRelationLabeledBy();
+ Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
+ if ( pLabeledBy && pLabeledBy != pWindow )
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = pLabeledBy->GetAccessible();
+ pRelationSetHelper->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABELED_BY, aSequence ) );
+ }
+ Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf();
+ if ( pMemberOf && pMemberOf != pWindow )
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = pMemberOf->GetAccessible();
+ pRelationSetHelper->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
+ }
+ }
+ return xSet;
+ //-----IAccessibility2 Implementation 2009
}
-
+//IAccessibility2 Implementation 2009-----
+//Solution:Add the event handling method
+void SvxRectCtlAccessibleContext::FireAccessibleEvent (short nEventId, const ::com::sun::star::uno::Any& rOld, const ::com::sun::star::uno::Any& rNew)
+{
+ const Reference< XInterface > xSource( *this );
+ CommitChange( AccessibleEventObject( xSource, nEventId, rNew,rOld ) );
+}
+//-----IAccessibility2 Implementation 2009
Reference< XAccessibleStateSet > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleStateSet( void ) throw( RuntimeException )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -377,8 +424,10 @@ Reference< XAccessibleStateSet > SAL_CALL SvxRectCtlAccessibleContext::getAccess
if( IsAlive() )
{
- // pStateSetHelper->AddState( AccessibleStateType::ENABLED );
+//IAccessibility2 Implementation 2009-----
+ pStateSetHelper->AddState( AccessibleStateType::ENABLED );
// pStateSetHelper->AddState( AccessibleStateType::SENSITIVE );
+//-----IAccessibility2 Implementation 2009
pStateSetHelper->AddState( AccessibleStateType::FOCUSABLE );
if( mpRepr->HasFocus() )
pStateSetHelper->AddState( AccessibleStateType::FOCUSED );
@@ -627,8 +676,38 @@ void SvxRectCtlAccessibleContext::checkChildIndexOnSelection( long nIndex ) thro
// in our case only for the first (0) _selected_ child this is a valid request
throw lang::IndexOutOfBoundsException();
}
-
-void SvxRectCtlAccessibleContext::selectChild( long nNew )
+// IAccessibility2 implementation 2009. ------
+void SvxRectCtlAccessibleContext::FireChildFocus( RECT_POINT eButton )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ long nNew = PointToIndex( eButton, mbAngleMode );
+ long nNumOfChilds = getAccessibleChildCount();
+ if( nNew < nNumOfChilds )
+ {
+ // select new child
+ SvxRectCtlChildAccessibleContext* pChild;
+ mnSelectedChild = nNew;
+ if( nNew != NOCHILDSELECTED )
+ {
+ pChild = mpChilds[ nNew ];
+ if( pChild )
+ {
+ pChild->FireFocusEvent();
+ }
+ }
+ else
+ {
+ const Reference< XInterface > xSource( *this );
+ Any aOld;
+ Any aNew;
+ aNew <<= AccessibleStateType::FOCUSED;
+ CommitChange( AccessibleEventObject( xSource, AccessibleEventId::STATE_CHANGED, aNew, aOld ) );
+ }
+ }
+ else
+ mnSelectedChild = NOCHILDSELECTED;
+}
+void SvxRectCtlAccessibleContext::selectChild( long nNew, sal_Bool bFireFocus )
{
::osl::MutexGuard aGuard( m_aMutex );
if( nNew != mnSelectedChild )
@@ -641,7 +720,7 @@ void SvxRectCtlAccessibleContext::selectChild( long nNew )
{ // deselect old selected child if one is selected
pChild = mpChilds[ mnSelectedChild ];
if( pChild )
- pChild->setStateChecked( sal_False );
+ pChild->setStateChecked( sal_False, bFireFocus );
}
// select new child
@@ -651,7 +730,7 @@ void SvxRectCtlAccessibleContext::selectChild( long nNew )
{
pChild = mpChilds[ nNew ];
if( pChild )
- pChild->setStateChecked( sal_True );
+ pChild->setStateChecked( sal_True, bFireFocus );
}
}
else
@@ -659,12 +738,12 @@ void SvxRectCtlAccessibleContext::selectChild( long nNew )
}
}
-void SvxRectCtlAccessibleContext::selectChild( RECT_POINT eButton )
+void SvxRectCtlAccessibleContext::selectChild( RECT_POINT eButton , sal_Bool bFireFocus)
{
// no guard -> is done in next selectChild
- selectChild( PointToIndex( eButton, mbAngleMode ) );
+ selectChild( PointToIndex( eButton, mbAngleMode ) , bFireFocus);
}
-
+// ------ IAccessibility2 implementation 2009.
void SvxRectCtlAccessibleContext::setName( const ::rtl::OUString& rName )
{
Any aPreVal, aPostVal;
@@ -963,7 +1042,20 @@ sal_Int16 SAL_CALL SvxRectCtlChildAccessibleContext::getAccessibleRole( void ) t
*/
Reference<XAccessibleRelationSet> SAL_CALL SvxRectCtlChildAccessibleContext::getAccessibleRelationSet( void ) throw( RuntimeException )
{
- return Reference< XAccessibleRelationSet >();
+ //return Reference< XAccessibleRelationSet >();
+ //IAccessibility2 Implementation 2009-----
+ utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
+ uno::Reference< accessibility::XAccessibleRelationSet > xSet = pRelationSetHelper;
+ if( mxParent.is() )
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = mxParent;
+ pRelationSetHelper->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
+
+ }
+
+ return xSet;
+ //-----IAccessibility2 Implementation 2009
}
Reference< XAccessibleStateSet > SAL_CALL SvxRectCtlChildAccessibleContext::getAccessibleStateSet( void ) throw( RuntimeException )
@@ -1072,6 +1164,59 @@ Any SAL_CALL SvxRectCtlChildAccessibleContext::getMinimumValue() throw( RuntimeE
return aRet;
}
+//IAccessibility2 Implementation 2009-----
+// -----------------------------------------------------------------------------
+// XAccessibleAction
+// -----------------------------------------------------------------------------
+
+sal_Int32 SvxRectCtlChildAccessibleContext::getAccessibleActionCount( ) throw (RuntimeException)
+{
+ ::osl::MutexGuard aGuard( maMutex );
+
+ return 1;
+}
+
+// -----------------------------------------------------------------------------
+
+sal_Bool SvxRectCtlChildAccessibleContext::doAccessibleAction ( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( maMutex );
+
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ throw IndexOutOfBoundsException();
+
+ Reference<XAccessibleSelection> xSelection( mxParent, UNO_QUERY);
+
+ xSelection->selectAccessibleChild(mnIndexInParent);
+
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------------
+
+::rtl::OUString SvxRectCtlChildAccessibleContext::getAccessibleActionDescription ( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( maMutex );
+
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ throw IndexOutOfBoundsException();
+ return ::rtl::OUString::createFromAscii("select");
+}
+
+// -----------------------------------------------------------------------------
+
+Reference< XAccessibleKeyBinding > SvxRectCtlChildAccessibleContext::getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( maMutex );
+
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ throw IndexOutOfBoundsException();
+
+ return Reference< XAccessibleKeyBinding >();
+}
+
+//-----IAccessibility2 Implementation 2009
+
//===== XServiceInfo ========================================================
::rtl::OUString SAL_CALL SvxRectCtlChildAccessibleContext::getImplementationName( void ) throw( RuntimeException )
@@ -1168,8 +1313,8 @@ Rectangle SvxRectCtlChildAccessibleContext::GetBoundingBox( void ) throw( Runtim
return *mpBoundingBox;
}
-
-void SvxRectCtlChildAccessibleContext::setStateChecked( sal_Bool bChecked )
+// IAccessibility2 implementation 2009. ------
+void SvxRectCtlChildAccessibleContext::setStateChecked( sal_Bool bChecked, sal_Bool bFireFocus )
{
if( mbIsChecked != bChecked )
{
@@ -1180,10 +1325,24 @@ void SvxRectCtlChildAccessibleContext::setStateChecked( sal_Bool bChecked )
Any aOld;
Any aNew;
Any& rMod = bChecked? aNew : aOld;
-
+ if( bFireFocus )
+ {
+ //Solution: Send the STATE_CHANGED(Focused) event to accessible
+ rMod <<= AccessibleStateType::FOCUSED;
+ CommitChange( AccessibleEventObject( xSource, AccessibleEventId::STATE_CHANGED, aNew, aOld ) );
+ }
rMod <<= AccessibleStateType::CHECKED;
CommitChange( AccessibleEventObject( xSource, AccessibleEventId::STATE_CHANGED, aNew, aOld ) );
}
}
+void SvxRectCtlChildAccessibleContext::FireFocusEvent()
+{
+ const Reference< XInterface > xSource( *this );
+ Any aOld;
+ Any aNew;
+ aNew <<= AccessibleStateType::FOCUSED;
+ CommitChange( AccessibleEventObject( xSource, AccessibleEventId::STATE_CHANGED, aNew, aOld ) );
+}
+// ------ IAccessibility2 implementation 2009.
diff --git a/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx b/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx
index d0c9abde05b4..ee7f7f7e6529 100644
--- a/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx
@@ -19,8 +19,6 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
#include "svx/EnhancedCustomShapeTypeNames.hxx"
@@ -29,6 +27,13 @@
#include <string.h>
#include "rtl/string.hxx"
+struct TCheck
+{
+ bool operator()( const char* s1, const char* s2 ) const
+ {
+ return strcmp( s1, s2 ) == 0;
+ }
+};
typedef std::hash_map< const char*, MSO_SPT, rtl::CStringHash, rtl::CStringEqual> TypeNameHashMap;
static TypeNameHashMap* pHashMap = NULL;
static ::osl::Mutex& getHashMapMutex()
@@ -311,3 +316,250 @@ rtl::OUString EnhancedCustomShapeTypeNames::Get( const MSO_SPT eShapeType )
? rtl::OUString::createFromAscii( pNameTypeTableArray[ eShapeType ].pS )
: rtl::OUString();
}
+//IAccessibility2 Implementation 2009-----
+typedef std::hash_map< const char*, const char*, std::hash<const char*>, TCheck> TypeACCNameHashMap;
+static TypeACCNameHashMap* pACCHashMap = NULL;
+struct ACCNameTypeTable
+{
+ const char* pS;
+ const char* pE;
+};
+static const ACCNameTypeTable pACCNameTypeTableArray[] =
+{
+ { "non-primitive", "Non Primitive Shape" },
+ { "rectangle", "Rectangle" },
+ { "round-rectangle", "Rounded Rectangle" },
+ { "ellipse", "Ellipse" },
+ { "diamond", "Diamond" },
+ { "isosceles-triangle", "Triangle" },
+ { "right-triangle", "Right Triangle" },
+ { "parallelogram", "Parallelogram" },
+ { "trapezoid", "Trapezoid" },
+ { "hexagon", "Hexagon" },
+ { "octagon", "Octagon" },
+ { "cross", "Cross" },
+ { "star5", "5-Point Star" },
+ { "right-arrow", "Right Arrow" },
+ //{ "mso-spt14", mso_sptThickArrow },
+ { "pentagon-right", "Pentagon" },
+ { "cube", "Cube" },
+ { "mso-spt21", "Doorplate" },
+ /*{ "mso-spt17", mso_sptBalloon },
+ { "mso-spt18", mso_sptSeal },
+ { "mso-spt19", mso_sptArc },
+ { "mso-spt20", mso_sptLine },
+ { "mso-spt21", mso_sptPlaque },
+ { "can", mso_sptCan },*/
+ { "ring", "Ring" },
+ /*{ "mso-spt24", mso_sptTextSimple },
+ { "mso-spt25", mso_sptTextOctagon },
+ { "mso-spt26", mso_sptTextHexagon },
+ { "mso-spt27", mso_sptTextCurve },
+ { "mso-spt28", mso_sptTextWave },
+ { "mso-spt29", mso_sptTextRing },
+ { "mso-spt30", mso_sptTextOnCurve },
+ { "mso-spt31", mso_sptTextOnRing },
+ { "mso-spt32", mso_sptStraightConnector1 },
+ { "mso-spt33", mso_sptBentConnector2 },
+ { "mso-spt34", mso_sptBentConnector3 },
+ { "mso-spt35", mso_sptBentConnector4 },
+ { "mso-spt36", mso_sptBentConnector5 },
+ { "mso-spt37", mso_sptCurvedConnector2 },
+ { "mso-spt38", mso_sptCurvedConnector3 },
+ { "mso-spt39", mso_sptCurvedConnector4 },
+ { "mso-spt40", mso_sptCurvedConnector5 },
+ { "mso-spt41", mso_sptCallout1 },
+ { "mso-spt42", mso_sptCallout2 },
+ { "mso-spt43", mso_sptCallout3 },
+ { "mso-spt44", mso_sptAccentCallout1 },
+ { "mso-spt45", mso_sptAccentCallout2 },
+ { "mso-spt46", mso_sptAccentCallout3 },*/
+ { "line-callout-1", "Line Callout 1" },
+ { "line-callout-2", "Line Callout 2" },
+ /*{ "mso-spt49", mso_sptBorderCallout3 },
+ { "mso-spt50", mso_sptAccentBorderCallout1 },
+ { "mso-spt51", mso_sptAccentBorderCallout2 },
+ { "mso-spt52", mso_sptAccentBorderCallout3 },
+ { "mso-spt53", mso_sptRibbon },
+ { "mso-spt54", mso_sptRibbon2 },*/
+ { "chevron", "Chevron" },
+ { "pentagon", "Regular Pentagon" },
+ { "forbidden", "'No' Symbol" },
+ { "star8", "8-Point Star" },
+ /*{ "mso-spt59", mso_sptSeal16 },
+ { "mso-spt60", mso_sptSeal32 },*/
+ { "rectangular-callout", "Rectangular Callout" },
+ { "round-rectangular-callout", "Rounded Rectangular Callout" },
+ { "round-callout", "Round Callout" },
+ //{ "mso-spt64", mso_sptWave },
+ { "paper", "Folded Corner" },
+ { "left-arrow", "Left Arrow" },
+ { "down-arrow", "Down Arrow" },
+ { "up-arrow", "Up Arrow" },
+ { "left-right-arrow", "Left and Right Arrow" },
+ { "up-down-arrow", "Up and Down Arrow" },
+ //{ "mso-spt71", mso_sptIrregularSeal1 },
+ { "bang", "Explosion" },
+ { "lightning", "Lighting Bolt" },
+ { "heart", "Heart" },
+ //{ "mso-spt75", mso_sptPictureFrame },
+ { "quad-arrow", "4-Way Arrow" },
+ { "left-arrow-callout", "Left Arrow Callout" },
+ { "right-arrow-callout", "Right Arrow Callout" },
+ { "up-arrow-callout", "Up Arrow Callout" },
+ { "down-arrow-callout", "Down Arrow Callout" },
+ { "left-right-arrow-callout", "Left and Right Arrow Callout" },
+ { "up-down-arrow-callout", "Up and Down Arrow Callout" },
+ { "quad-arrow-callout", "4-Way Arrow Callout" },
+ { "quad-bevel", "Square Bevel" },
+ { "left-bracket", "Left Bracket" },
+ { "right-bracket", "Right Bracket" },
+ { "left-brace", "Left Brace" },
+ { "right-brace", "Right Brace" },
+ { "mso-spt89", "Up and Left Arrow" },
+ //{ "mso-spt90", mso_sptBentUpArrow },
+ //{ "mso-spt91", mso_sptBentArrow },
+ { "star24", "24-Point Star" },
+ { "striped-right-arrow", "Striped Right Arrow" },
+ { "notched-right-arrow", "Notched Right Arrow" },
+ { "block-arc", "Block Arc" },
+ { "smiley", "Smile Face" },
+ { "vertical-scroll", "Vertical Scroll" },
+ { "horizontal-scroll", "Horizontal Scroll" },
+ { "circular-arrow", "Circular Arrow" },
+ { "mso-spt100", "Notched Circular Arrow" },
+ /*
+ { "mso-spt101", mso_sptUturnArrow },
+ { "mso-spt102", mso_sptCurvedRightArrow },
+ { "mso-spt103", mso_sptCurvedLeftArrow },
+ { "mso-spt104", mso_sptCurvedUpArrow },
+ { "mso-spt105", mso_sptCurvedDownArrow },*/
+ { "cloud-callout", "Cloud Callout" },
+ /*{ "mso-spt107", mso_sptEllipseRibbon },
+ { "mso-spt108", mso_sptEllipseRibbon2 },*/
+ { "flowchart-process", "Flowchart:Process" },
+ { "flowchart-decision", "Flowchart:Decision" },
+ { "flowchart-data", "Flowchart:Data" },
+ { "flowchart-predefined-process", "Flowchart:Predefined Process" },
+ { "flowchart-internal-storage", "Flowchart:Internal Storage" },
+ { "flowchart-document", "Flowchart:Document" },
+ { "flowchart-multidocument", "Flowchart:Multidocument" },
+ { "flowchart-terminator", "Flowchart:Terminator" },
+ { "flowchart-preparation", "Flowchart:Preparation" },
+ { "flowchart-manual-input", "Flowchart:Manual Input" },
+ { "flowchart-manual-operation", "Flowchart:Manual Operation" },
+ { "flowchart-connector", "Flowchart:Connector" },
+ { "flowchart-card", "Flowchart:Card" },
+ { "flowchart-punched-tape", "Flowchart:Punched Tape" },
+ { "flowchart-summing-junction", "Flowchart:Summing Junction" },
+ { "flowchart-or", "Flowchart:Or" },
+ { "flowchart-collate", "Flowchart:Collate" },
+ { "flowchart-sort", "Flowchart:Sort" },
+ { "flowchart-extract", "Flowchart:Extract" },
+ { "flowchart-merge", "Flowchart:Merge" },
+ //{ "mso-spt129", mso_sptFlowChartOfflineStorage },
+ { "flowchart-stored-data", "Flowchart:Stored Data" },
+ { "flowchart-sequential-access", "drawingbar.fc.25=Flowchart:Sequential Access" },
+ { "flowchart-magnetic-disk", "Flowchart:Magnetic Disk" },
+ { "flowchart-direct-access-storage", "Flowchart:Direct Access Storage" },
+ { "flowchart-display", "Flowchart:Display" },
+ { "flowchart-delay", "Flowchart:Delay" },
+ /*{ "fontwork-plain-text", mso_sptTextPlainText },
+ { "fontwork-stop", mso_sptTextStop },
+ { "fontwork-triangle-up", mso_sptTextTriangle },
+ { "fontwork-triangle-down", mso_sptTextTriangleInverted },
+ { "fontwork-chevron-up", mso_sptTextChevron },
+ { "fontwork-chevron-down", mso_sptTextChevronInverted },
+ { "mso-spt142", mso_sptTextRingInside },
+ { "mso-spt143", mso_sptTextRingOutside },
+ { "fontwork-arch-up-curve", mso_sptTextArchUpCurve },
+ { "fontwork-arch-down-curve", mso_sptTextArchDownCurve },
+ { "fontwork-circle-curve", mso_sptTextCircleCurve },
+ { "fontwork-open-circle-curve", mso_sptTextButtonCurve },
+ { "fontwork-arch-up-pour", mso_sptTextArchUpPour },
+ { "fontwork-arch-down-pour", mso_sptTextArchDownPour },
+ { "fontwork-circle-pour", mso_sptTextCirclePour },
+ { "fontwork-open-circle-pour", mso_sptTextButtonPour },
+ { "fontwork-curve-up", mso_sptTextCurveUp },
+ { "fontwork-curve-down", mso_sptTextCurveDown },
+ { "fontwork-fade-up-and-right", mso_sptTextCascadeUp },
+ { "fontwork-fade-up-and-left", mso_sptTextCascadeDown },
+ { "fontwork-wave", mso_sptTextWave1 },
+ { "mso-spt157", mso_sptTextWave2 },
+ { "mso-spt158", mso_sptTextWave3 },
+ { "mso-spt159", mso_sptTextWave4 },
+ { "fontwork-inflate", mso_sptTextInflate },
+ { "mso-spt161", mso_sptTextDeflate },
+ { "mso-spt162", mso_sptTextInflateBottom },
+ { "mso-spt163", mso_sptTextDeflateBottom },
+ { "mso-spt164", mso_sptTextInflateTop },
+ { "mso-spt165", mso_sptTextDeflateTop },
+ { "mso-spt166", mso_sptTextDeflateInflate },
+ { "mso-spt167", mso_sptTextDeflateInflateDeflate },
+ { "fontwork-fade-right", mso_sptTextFadeRight },
+ { "fontwork-fade-left", mso_sptTextFadeLeft },
+ { "fontwork-fade-up", mso_sptTextFadeUp },
+ { "fontwork-fade-down", mso_sptTextFadeDown },
+ { "fontwork-slant-up", mso_sptTextSlantUp },
+ { "fontwork-slant-down", mso_sptTextSlantDown },
+ { "mso-spt174", mso_sptTextCanUp },
+ { "mso-spt175", mso_sptTextCanDown },*/
+ { "flowchart-alternate-process", "Flowchart:Alternate Process " },
+ { "flowchart-off-page-connector", "Flowchart:Off-page Connector" },
+ /*{ "mso-spt178", mso_sptCallout90 },
+ { "mso-spt179", mso_sptAccentCallout90 },
+ { "mso-spt180", mso_sptBorderCallout90 },*/
+ { "line-callout-3", "Line Callout 3" },
+ //{ "mso-spt182", mso_sptLeftRightUpArrow },
+ { "sun", "Sun" },
+ { "moon", "Moon" },
+ { "bracket-pair", "Double Bracket" },
+ { "brace-pair", "Double Brace" },
+ { "star4", "4-Point Star" },
+ /*{ "mso-spt188", mso_sptDoubleWave },
+ { "mso-spt189", mso_sptActionButtonBlank },
+ { "mso-spt190", mso_sptActionButtonHome },
+ { "mso-spt191", mso_sptActionButtonHelp },
+ { "mso-spt192", mso_sptActionButtonInformation },
+ { "mso-spt193", mso_sptActionButtonForwardNext },
+ { "mso-spt194", mso_sptActionButtonBackPrevious },
+ { "mso-spt195", mso_sptActionButtonEnd },
+ { "mso-spt196", mso_sptActionButtonBeginning },
+ { "mso-spt197", mso_sptActionButtonReturn },
+ { "mso-spt198", mso_sptActionButtonDocument },
+ { "mso-spt199", mso_sptActionButtonSound },
+ { "mso-spt200", mso_sptActionButtonMovie },
+ { "mso-spt201", mso_sptHostControl },
+ { "mso-spt202", mso_sptTextBox },*/
+ { "frame", "Frame" },
+ { "col-60da8460", "Octagon Bevel" },
+ { "col-502ad400", "Diamond Bevel" }
+};
+rtl::OUString EnhancedCustomShapeTypeNames::GetAccName( const rtl::OUString& rShapeType )
+{
+ if ( !pACCHashMap )
+ { // init hash map
+ ::osl::MutexGuard aGuard( getHashMapMutex() );
+ if ( !pACCHashMap )
+ {
+ TypeACCNameHashMap* pH = new TypeACCNameHashMap;
+ const ACCNameTypeTable* pPtr = pACCNameTypeTableArray;
+ const ACCNameTypeTable* pEnd = pPtr + ( sizeof( pACCNameTypeTableArray ) / sizeof( ACCNameTypeTable ) );
+ for ( ; pPtr < pEnd; pPtr++ )
+ (*pH)[ pPtr->pS ] = pPtr->pE;
+ pACCHashMap = pH;
+ }
+ }
+ rtl::OUString sRetValue;
+ int i, nLen = rShapeType.getLength();
+ char* pBuf = new char[ nLen + 1 ];
+ for ( i = 0; i < nLen; i++ )
+ pBuf[ i ] = (char)rShapeType[ i ];
+ pBuf[ i ] = 0;
+ TypeACCNameHashMap::iterator aHashIter( pACCHashMap->find( pBuf ) );
+ delete[] pBuf;
+ if ( aHashIter != pACCHashMap->end() )
+ sRetValue = rtl::OUString::createFromAscii( (*aHashIter).second );
+ return sRetValue;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 66c23bb69f7a..49eaa5eb508f 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -138,6 +138,9 @@ void MaskSet::Select()
void MaskSet::GetFocus()
{
+ //IAccessibility2 Implementation 2009-----
+ ValueSet::GetFocus();
+ //-----IAccessibility2 Implementation 2009
SelectItem( 1 );
pSvxBmpMask->onSelect( this );
}
@@ -328,10 +331,13 @@ IMPL_LINK( MaskData, CbxTransHdl, CheckBox*, pCbx )
IMPL_LINK( MaskData, FocusLbHdl, ColorLB*, pLb )
{
- pMask->pQSet1->SelectItem( pLb == &( pMask->aLbColor1 ) ? 1 : 0 );
- pMask->pQSet2->SelectItem( pLb == &( pMask->aLbColor2 ) ? 1 : 0 );
- pMask->pQSet3->SelectItem( pLb == &( pMask->aLbColor3 ) ? 1 : 0 );
- pMask->pQSet4->SelectItem( pLb == &( pMask->aLbColor4 ) ? 1 : 0 );
+ //IAccessibility2 Implementation 2009-----
+ // MT: bFireFox as API parameter is ugly, find better solution????
+ pMask->pQSet1->SelectItem( pLb == &( pMask->aLbColor1 ) ? 1 : 0 /* , false */ );
+ pMask->pQSet2->SelectItem( pLb == &( pMask->aLbColor2 ) ? 1 : 0 /* , false */ );
+ pMask->pQSet3->SelectItem( pLb == &( pMask->aLbColor3 ) ? 1 : 0 /* , false */ );
+ pMask->pQSet4->SelectItem( pLb == &( pMask->aLbColor4 ) ? 1 : 0 /* , false */ );
+ //-----IAccessibility2 Implementation 2009
return 0;
}
@@ -478,35 +484,57 @@ SvxBmpMask::SvxBmpMask( SfxBindings *pBindinx,
pQSet1->SetColCount( 1 );
pQSet1->SetLineCount( 1 );
// pQSet1->SetExtraSpacing( 1 );
- pQSet1->InsertItem( 1, aPipetteColor );
+ //-----IAccessibility2 Implementation 2009
+ String sColorPalette (BMP_RESID( RID_SVXDLG_BMPMASK_STR_PALETTE));
+ String sColorPaletteN;
+ sColorPaletteN = sColorPalette;
+ sColorPaletteN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1"));
+ //pQSet1->InsertItem( 1, aPipetteColor );
+ pQSet1->InsertItem( 1, aPipetteColor, sColorPaletteN);
+ //IAccessibility2 Implementation 2009-----
pQSet1->SelectItem( 1 );
pQSet2->SetStyle( pQSet2->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
pQSet2->SetColCount( 1 );
pQSet2->SetLineCount( 1 );
// pQSet2->SetExtraSpacing( 1 );
- pQSet2->InsertItem( 1, aPipetteColor );
+ //IAccessibility2 Implementation 2009-----
+ sColorPaletteN = sColorPalette;
+ sColorPaletteN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2"));
+ //pQSet2->InsertItem( 1, aPipetteColor );
+ pQSet2->InsertItem( 1, aPipetteColor, sColorPaletteN);
+ //-----IAccessibility2 Implementation 2009
pQSet2->SelectItem( 0 );
pQSet3->SetStyle( pQSet3->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
pQSet3->SetColCount( 1 );
pQSet3->SetLineCount( 1 );
// pQSet3->SetExtraSpacing( 1 );
- pQSet3->InsertItem( 1, aPipetteColor );
+ //IAccessibility2 Implementation 2009-----
+ sColorPaletteN = sColorPalette;
+ sColorPaletteN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3"));
+ pQSet3->InsertItem( 1, aPipetteColor, sColorPaletteN);
+ //pQSet3->InsertItem( 1, aPipetteColor );
+ //-----IAccessibility2 Implementation 2009
pQSet3->SelectItem( 0 );
pQSet4->SetStyle( pQSet4->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
pQSet4->SetColCount( 1 );
pQSet4->SetLineCount( 1 );
// pQSet4->SetExtraSpacing( 1 );
- pQSet4->InsertItem( 1, aPipetteColor );
+ //IAccessibility2 Implementation 2009-----
+ sColorPaletteN = sColorPalette;
+ sColorPaletteN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 4"));
+ pQSet4->InsertItem( 1, aPipetteColor, sColorPaletteN);
+ //pQSet4->InsertItem( 1, aPipetteColor );
+ //-----IAccessibility2 Implementation 2009
pQSet4->SelectItem( 0 );
pQSet1->Show();
pQSet2->Show();
pQSet3->Show();
pQSet4->Show();
-
+ //IAccessibility2 Implementation 2009-----
aCbx1.SetAccessibleRelationMemberOf( &aGrpQ );
pQSet1->SetAccessibleRelationMemberOf( &aGrpQ );
aSp1.SetAccessibleRelationMemberOf( &aGrpQ );
@@ -542,6 +570,7 @@ SvxBmpMask::SvxBmpMask( SfxBindings *pBindinx,
aLbColorTrans.SetAccessibleRelationLabeledBy( &aCbxTrans );
aLbColorTrans.SetAccessibleRelationMemberOf( &aGrpQ );
aCbxTrans.SetAccessibleRelationMemberOf( &aGrpQ );
+ //-----IAccessibility2 Implementation 2009
}
//-------------------------------------------------------------------------
@@ -1272,4 +1301,51 @@ void SvxBmpMask::SetAccessibleNames (void)
sSourceColorN = sSourceColor;
sSourceColorN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 4"));
aCbx4.SetAccessibleName (sSourceColorN);
+ //IAccessibility2 Implementation 2009-----
+ // set the accessible name for valueset
+ String sColorPalette (BMP_RESID( RID_SVXDLG_BMPMASK_STR_PALETTE));
+ String sColorPaletteN;
+ sColorPaletteN = sColorPalette;
+ sColorPaletteN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1"));
+ pQSet1->SetText (sColorPaletteN);
+ sColorPaletteN = sColorPalette;
+ sColorPaletteN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2"));
+ pQSet2->SetText (sColorPaletteN);
+ sColorPaletteN = sColorPalette;
+ sColorPaletteN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3"));
+ pQSet3->SetText (sColorPaletteN);
+ sColorPaletteN = sColorPalette;
+ sColorPaletteN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 4"));
+ pQSet4->SetText (sColorPaletteN);
+ // set the accessible for replace with spin boxes.
+ String sTolerance(BMP_RESID( RID_SVXDLG_BMPMASK_STR_TOLERANCE));
+ String sToleranceN;
+ sToleranceN = sTolerance;
+ sToleranceN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1"));
+ aSp1.SetAccessibleName (sToleranceN);
+ sToleranceN = sTolerance;
+ sToleranceN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2"));
+ aSp2.SetAccessibleName (sToleranceN);
+ sToleranceN = sTolerance;
+ sToleranceN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3"));
+ aSp3.SetAccessibleName (sToleranceN);
+ sToleranceN = sTolerance;
+ sToleranceN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 4"));
+ aSp4.SetAccessibleName (sToleranceN);
+ // set the accessible for replace with combo boxes.
+ String sReplaceWith(BMP_RESID( RID_SVXDLG_BMPMASK_STR_REPLACEWITH));
+ String sReplaceWithN;
+ sReplaceWithN = sReplaceWith;
+ sReplaceWithN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1"));
+ aLbColor1.SetAccessibleName (sReplaceWithN);
+ sReplaceWithN = sReplaceWith;
+ sReplaceWithN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2"));
+ aLbColor2.SetAccessibleName (sReplaceWithN);
+ sReplaceWithN = sReplaceWith;
+ sReplaceWithN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3"));
+ aLbColor3.SetAccessibleName (sReplaceWithN);
+ sReplaceWithN = sReplaceWith;
+ sReplaceWithN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 4"));
+ aLbColor4.SetAccessibleName (sReplaceWithN);
+ //-----IAccessibility2 Implementation 2009
}
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index e6cf4a183309..1177717e431b 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -136,7 +136,8 @@ void SvxShowCharSet::MouseButtonDown( const MouseEvent& rMEvt )
CaptureMouse();
int nIndex = PixelToMapIndex( rMEvt.GetPosPixel() );
- SelectIndex( nIndex );
+ // Fire the focus event
+ SelectIndex( nIndex , sal_True);
}
if ( !(rMEvt.GetClicks() % 2) )
@@ -177,7 +178,8 @@ void SvxShowCharSet::MouseMove( const MouseEvent& rMEvt )
aPos.Y() = aSize.Height()-5;
int nIndex = PixelToMapIndex( aPos );
- SelectIndex( nIndex );
+ // Fire the focus event.
+ SelectIndex( nIndex , sal_True );
}
}
@@ -585,12 +587,18 @@ void SvxShowCharSet::SelectIndex( int nNewIndex, sal_Bool bFocus )
if( m_pAccessible )
{
::svx::SvxShowCharSetItem* pItem = ImplGetItem(nSelectedIndex);
- m_pAccessible->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, Any(), makeAny(pItem->GetAccessible()) ); // this call asures that m_pItem is set
+ // Don't fire the focus event.
+ if ( bFocus )
+ m_pAccessible->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, Any(), makeAny(pItem->GetAccessible()) ); // this call asures that m_pItem is set
+ else
+ m_pAccessible->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS, Any(), makeAny(pItem->GetAccessible()) ); // this call asures that m_pItem is set
OSL_ENSURE(pItem->m_pItem,"No accessible created!");
Any aOldAny, aNewAny;
aNewAny <<= AccessibleStateType::FOCUSED;
- pItem->m_pItem->fireEvent( AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny );
+ // Don't fire the focus event.
+ if ( bFocus )
+ pItem->m_pItem->fireEvent( AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny );
aNewAny <<= AccessibleStateType::SELECTED;
pItem->m_pItem->fireEvent( AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny );
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 72ad029e6521..5202baca6f43 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -1339,6 +1339,29 @@ void SvxTPFilter::Disable( bool bChild)
Enable( false, bChild );
}
+//IAccessibility2 Implementation 2009-----
+void SvxTPFilter::SetAccessibleRelationMemberOf( Window* pWin )
+{
+ aCbDate.SetAccessibleRelationMemberOf(pWin);
+ aLbDate.SetAccessibleRelationMemberOf(pWin);
+ aDfDate.SetAccessibleRelationMemberOf(pWin);
+ aTfDate.SetAccessibleRelationMemberOf(pWin);
+ aIbClock.SetAccessibleRelationMemberOf(pWin);
+ aFtDate2.SetAccessibleRelationMemberOf(pWin);
+ aDfDate2.SetAccessibleRelationMemberOf(pWin);
+ aTfDate2.SetAccessibleRelationMemberOf(pWin);
+ aIbClock2.SetAccessibleRelationMemberOf(pWin);
+ aCbAuthor.SetAccessibleRelationMemberOf(pWin);
+ aLbAuthor.SetAccessibleRelationMemberOf(pWin);
+ aCbRange.SetAccessibleRelationMemberOf(pWin);
+ aEdRange.SetAccessibleRelationMemberOf(pWin);
+ aBtnRange.SetAccessibleRelationMemberOf(pWin);
+ aLbAction.SetAccessibleRelationMemberOf(pWin);
+ aCbComment.SetAccessibleRelationMemberOf(pWin);
+ aEdComment.SetAccessibleRelationMemberOf(pWin);
+}
+//-----IAccessibility2 Implementation 2009
+
IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF)
{
diff --git a/svx/source/dialog/ctredlin.src b/svx/source/dialog/ctredlin.src
index 5ee35db905b1..86e5d3d8bd4f 100644
--- a/svx/source/dialog/ctredlin.src
+++ b/svx/source/dialog/ctredlin.src
@@ -277,6 +277,10 @@ TabPage SID_REDLIN_FILTER_PAGE
{
Text [ en-US ] = "End Time" ;
};
+ String STR_TREE
+ {
+ Text [ en-US ] = "Changes" ;
+ };
/*-----IAccessibility2 Implementation 2009*/
};
TabPage SID_REDLIN_VIEW_PAGE
@@ -354,10 +358,6 @@ TabPage SID_REDLIN_VIEW_PAGE
{
Text [ en-US ] = "Comment" ;
};
- String STR_TREE
- {
- Text [ en-US ] = "Changes" ;
- };
};
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 73deb8f7aef9..76ed507ca3d6 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -37,6 +37,18 @@
#include <vcl/region.hxx>
#include <vcl/gradient.hxx>
#include <vcl/hatch.hxx>
+// IAccessibility2 implementation 2009. ------
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTOBJECT_HPP_
+#include <com/sun/star/accessibility/AccessibleEventObject.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTID_HPP_
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#endif
+#include "svxpixelctlaccessiblecontext.hxx"
+// ------ IAccessibility2 implementation 2009.
#include <svtools/colorcfg.hxx>
#include <svxrectctaccessiblecontext.hxx>
#include <com/sun/star/lang/XUnoTunnel.hpp>
@@ -564,6 +576,15 @@ Point SvxRectCtl::SetActualRPWithoutInvalidate( RECT_POINT eNewRP )
void SvxRectCtl::GetFocus()
{
SetFocusRect();
+ // IAccessibility2 implementation 2009. ------
+ //Solution: Send the accessible focused event
+ Control::GetFocus();
+ // Send accessibility event.
+ if(pAccContext)
+ {
+ pAccContext->FireChildFocus(GetActualRP());
+ }
+ // ------ IAccessibility2 implementation 2009.
}
@@ -657,9 +678,10 @@ RECT_POINT SvxRectCtl::GetActualRP() const
|* Gibt den aktuell ausgewaehlten RECT_POINT zur�ck
|*
\************************************************************************/
-
-void SvxRectCtl::SetActualRP( RECT_POINT eNewRP )
+// IAccessibility2 implementation 2009. ------
+void SvxRectCtl::SetActualRP( RECT_POINT eNewRP /* MT: , sal_Bool bFireFocus */ )
{
+ // MT: bFireFox as API parameter is ugly...
Point aPtLast( SetActualRPWithoutInvalidate( eNewRP ) );
Invalidate( Rectangle( aPtLast - Point( nRadius, nRadius ), aPtLast + Point( nRadius, nRadius ) ) );
@@ -667,9 +689,9 @@ void SvxRectCtl::SetActualRP( RECT_POINT eNewRP )
// notify accessibility object about change
if( pAccContext )
- pAccContext->selectChild( eNewRP );
+ pAccContext->selectChild( eNewRP /* MT, bFireFocus */ );
}
-
+// ------ IAccessibility2 implementation 2009.
void SvxRectCtl::SetState( CTL_STATE nState )
{
m_nState = nState;
@@ -864,11 +886,74 @@ void SvxAngleCtl::Paint( const Rectangle& )
|* Control zum Editieren von Bitmaps
|*
\************************************************************************/
+// IAccessibility2 implementation 2009. ------
+
+::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SvxPixelCtl::CreateAccessible()
+{
+ if(!m_xAccess.is())
+ {
+ m_xAccess = m_pAccess = new SvxPixelCtlAccessible(*this);
+ }
+ return m_xAccess;
+}
+
+//Logic Pixel
+long SvxPixelCtl::PointToIndex(const Point &aPt) const
+{
+ sal_uInt16 nX, nY;
+
+ nX = (sal_uInt16) ( aPt.X() * nLines / aRectSize.Width() );
+ nY = (sal_uInt16) ( aPt.Y() * nLines / aRectSize.Height() );
+
+ return nX + nY * nLines ;
+}
+Point SvxPixelCtl::IndexToPoint(long nIndex) const
+{
+ DBG_ASSERT(nIndex >= 0 && nIndex < nSquares ," Check Index");
+
+ sal_uInt16 nXIndex = nIndex % nLines ;
+ sal_uInt16 nYIndex = sal_uInt16(nIndex / nLines) ;
+
+ Point aPtTl;
+ aPtTl.Y() = aRectSize.Height() * nYIndex / nLines + 1;
+ aPtTl.X() = aRectSize.Width() * nXIndex / nLines + 1;
+
+ return aPtTl;
+}
+long SvxPixelCtl::GetFoucsPosIndex() const
+{
+ return aFocusPosition.getX() + aFocusPosition.getY() * nLines ;
+}
+long SvxPixelCtl::ShowPosition( const Point &pt)
+{
+ Point aPt = PixelToLogic( pt );
+
+ sal_uInt16 nX, nY;
+ nX = (sal_uInt16) ( aPt.X() * nLines / aRectSize.Width() );
+ nY = (sal_uInt16) ( aPt.Y() * nLines / aRectSize.Height() );
+
+ ChangePixel( nX + nY * nLines );
+
+ //Solution:Set new focus position and repaint
+ //Invalidate( Rectangle( aPtTl, aPtBr ) );
+ aFocusPosition.setX(nX);
+ aFocusPosition.setY(nY);
+ Invalidate(Rectangle(Point(0,0),aRectSize));
+
+ if( WINDOW_TABPAGE == GetParent()->GetType() )
+ ( (SvxTabPage*) GetParent() )->PointChanged( this, RP_MM ); // RectPoint ist dummy
+
+ return GetFoucsPosIndex();
+}
+// ------ IAccessibility2 implementation 2009.
SvxPixelCtl::SvxPixelCtl( Window* pParent, const ResId& rResId, sal_uInt16 nNumber ) :
Control ( pParent, rResId ),
nLines ( nNumber ),
bPaintable ( sal_True )
+ // IAccessibility2 implementation 2009. ------
+ //Solution:Initialize it's value to Point(0,0)
+ ,aFocusPosition(0,0)
{
// SetMapMode( MAP_100TH_MM );
aRectSize = GetOutputSize();
@@ -880,6 +965,8 @@ SvxPixelCtl::SvxPixelCtl( Window* pParent, const ResId& rResId, sal_uInt16 nNumb
nSquares = nLines * nLines;
pPixel = new sal_uInt16[ nSquares ];
rtl_zeroMemory(pPixel, nSquares * sizeof(sal_uInt16));
+ // IAccessibility2 implementation 2009. ------
+ m_pAccess=NULL;
}
/*************************************************************************
@@ -915,24 +1002,37 @@ void SvxPixelCtl::ChangePixel( sal_uInt16 nPixel )
void SvxPixelCtl::MouseButtonDown( const MouseEvent& rMEvt )
{
- Point aPt = PixelToLogic( rMEvt.GetPosPixel() );
- Point aPtTl, aPtBr;
- sal_uInt16 nX, nY;
+ // IAccessibility2 implementation 2009. ------
+ //Point aPt = PixelToLogic( rMEvt.GetPosPixel() );
+ //Point aPtTl, aPtBr;
+ //sal_uInt16 nX, nY;
- nX = (sal_uInt16) ( aPt.X() * nLines / aRectSize.Width() );
- nY = (sal_uInt16) ( aPt.Y() * nLines / aRectSize.Height() );
+ //nX = (sal_uInt16) ( aPt.X() * nLines / aRectSize.Width() );
+ //nY = (sal_uInt16) ( aPt.Y() * nLines / aRectSize.Height() );
- ChangePixel( nX + nY * nLines );
+ //ChangePixel( nX + nY * nLines );
- aPtTl.X() = aRectSize.Width() * nX / nLines + 1;
- aPtBr.X() = aRectSize.Width() * (nX + 1) / nLines - 1;
- aPtTl.Y() = aRectSize.Height() * nY / nLines + 1;
- aPtBr.Y() = aRectSize.Height() * (nY + 1) / nLines - 1;
+ //aPtTl.X() = aRectSize.Width() * nX / nLines + 1;
+ //aPtBr.X() = aRectSize.Width() * (nX + 1) / nLines - 1;
+ //aPtTl.Y() = aRectSize.Height() * nY / nLines + 1;
+ //aPtBr.Y() = aRectSize.Height() * (nY + 1) / nLines - 1;
- Invalidate( Rectangle( aPtTl, aPtBr ) );
+ //Invalidate( Rectangle( aPtTl, aPtBr ) );
- if( WINDOW_TABPAGE == GetParent()->GetType() )
- ( (SvxTabPage*) GetParent() )->PointChanged( this, RP_MM ); // RectPoint ist dummy
+ //if( WINDOW_TABPAGE == GetParent()->GetType() )
+ // ( (SvxTabPage*) GetParent() )->PointChanged( this, RP_MM ); // RectPoint ist dummy
+ //Solution:Grab focus when click in window
+ if( !HasFocus() )
+ {
+ GrabFocus();
+ }
+ long nIndex = ShowPosition(rMEvt.GetPosPixel());
+
+ if(m_pAccess)
+ {
+ m_pAccess->NotifyChild(nIndex,sal_True,sal_True);
+ }
+ // ------ IAccessibility2 implementation 2009.
}
/*************************************************************************
@@ -983,6 +1083,13 @@ void SvxPixelCtl::Paint( const Rectangle& )
DrawRect( Rectangle( aPtTl, aPtBr ) );
}
}
+ // IAccessibility2 implementation 2009. ------
+ //Solution:Draw visual focus when has focus
+ if( HasFocus() )
+ {
+ ShowFocus(implCalFocusRect(aFocusPosition));
+ }
+ // ------ IAccessibility2 implementation 2009.
} // bPaintable
else
{
@@ -992,6 +1099,130 @@ void SvxPixelCtl::Paint( const Rectangle& )
DrawLine( Point( 0, aRectSize.Height() ), Point( aRectSize.Width(), 0 ) );
}
}
+// IAccessibility2 implementation 2009. ------
+//Solution:Caculate visual focus rectangle via focus position
+Rectangle SvxPixelCtl::implCalFocusRect( const Point& aPosition )
+{
+ long nLeft,nTop,nRight,nBottom;
+ long i,j;
+ i = aPosition.Y();
+ j = aPosition.X();
+ nLeft = aRectSize.Width() * j / nLines + 1;
+ nRight = aRectSize.Width() * (j + 1) / nLines - 1;
+ nTop = aRectSize.Height() * i / nLines + 1;
+ nBottom = aRectSize.Height() * (i + 1) / nLines - 1;
+ return Rectangle(nLeft,nTop,nRight,nBottom);
+}
+
+//Solution:Keyboard fucntion
+void SvxPixelCtl::KeyInput( const KeyEvent& rKEvt )
+{
+ KeyCode aKeyCode = rKEvt.GetKeyCode();
+ sal_uInt16 nCode = aKeyCode.GetCode();
+ sal_Bool bIsMod = aKeyCode.IsShift() || aKeyCode.IsMod1() || aKeyCode.IsMod2();
+
+ if( !bIsMod )
+ {
+ Point pRepaintPoint( aRectSize.Width() *( aFocusPosition.getX() - 1)/ nLines - 1,
+ aRectSize.Height() *( aFocusPosition.getY() - 1)/ nLines -1
+ );
+ Size mRepaintSize( aRectSize.Width() *3/ nLines + 2,aRectSize.Height() *3/ nLines + 2);
+ Rectangle mRepaintRect( pRepaintPoint, mRepaintSize );
+ sal_Bool bFocusPosChanged=sal_False;
+ switch(nCode)
+ {
+ case KEY_LEFT:
+ if((aFocusPosition.getX() >= 1))
+ {
+ aFocusPosition.setX( aFocusPosition.getX() - 1 );
+ Invalidate(mRepaintRect);
+ bFocusPosChanged=sal_True;
+ }
+ break;
+ case KEY_RIGHT:
+ if( aFocusPosition.getX() < (nLines - 1) )
+ {
+ aFocusPosition.setX( aFocusPosition.getX() + 1 );
+ Invalidate(mRepaintRect);
+ bFocusPosChanged=sal_True;
+ }
+ break;
+ case KEY_UP:
+ if((aFocusPosition.getY() >= 1))
+ {
+ aFocusPosition.setY( aFocusPosition.getY() - 1 );
+ Invalidate(mRepaintRect);
+ bFocusPosChanged=sal_True;
+ }
+ break;
+ case KEY_DOWN:
+ if( aFocusPosition.getY() < ( nLines - 1 ) )
+ {
+ aFocusPosition.setY( aFocusPosition.getY() + 1 );
+ Invalidate(mRepaintRect);
+ bFocusPosChanged=sal_True;
+ }
+ break;
+ case KEY_SPACE:
+ ChangePixel( sal_uInt16(aFocusPosition.getX() + aFocusPosition.getY() * nLines) );
+ Invalidate( implCalFocusRect(aFocusPosition) );
+ break;
+ default:
+ Control::KeyInput( rKEvt );
+ return;
+ }
+ if(m_xAccess.is())
+ {
+ long nIndex = GetFoucsPosIndex();
+ switch(nCode)
+ {
+ case KEY_LEFT:
+ case KEY_RIGHT:
+ case KEY_UP:
+ case KEY_DOWN:
+ if (bFocusPosChanged)
+ {
+ m_pAccess->NotifyChild(nIndex,sal_False,sal_False);
+ }
+ break;
+ case KEY_SPACE:
+ m_pAccess->NotifyChild(nIndex,sal_False,sal_True);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ Control::KeyInput( rKEvt );
+ }
+}
+
+//Draw focus when get focus
+void SvxPixelCtl::GetFocus()
+{
+ Invalidate(implCalFocusRect(aFocusPosition));
+
+ if(m_pAccess)
+ {
+ m_pAccess->NotifyChild(GetFoucsPosIndex(),sal_True,sal_False);
+ }
+
+ Control::GetFocus();
+}
+
+//Hide focus when lose focus
+void SvxPixelCtl::LoseFocus()
+{
+ HideFocus();
+ if (m_pAccess)
+ {
+ m_pAccess->LoseFocus();
+ }
+ Control::LoseFocus();
+}
+// ------ IAccessibility2 implementation 2009.
/*************************************************************************
|*
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index df14d7c7c539..50ab5de161f7 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -30,6 +30,12 @@
#include "frmselimpl.hxx"
#include "AccessibleFrameSelector.hxx"
#include <svx/dialmgr.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HDL_
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#endif
+//-----IAccessibility2 Implementation 2009
#ifndef _SVX_DIALOGS_HRC
#include <svx/dialogs.hrc>
@@ -43,8 +49,11 @@
namespace svx {
using ::com::sun::star::uno::Reference;
+//IAccessibility2 Implementation 2009-----
+using ::com::sun::star::uno::Any;
using ::com::sun::star::accessibility::XAccessible;
-
+using namespace ::com::sun::star::accessibility;
+//-----IAccessibility2 Implementation 2009
// ============================================================================
// global functions from framebordertype.hxx
@@ -696,10 +705,24 @@ void FrameSelectorImpl::DoInvalidate( bool bFullRepaint )
void FrameSelectorImpl::SetBorderState( FrameBorder& rBorder, FrameBorderState eState )
{
DBG_ASSERT( rBorder.IsEnabled(), "svx::FrameSelectorImpl::SetBorderState - access to disabled border" );
+ //IAccessibility2 Implementation 2009-----
+ Any aOld;
+ Any aNew;
+ Any& rMod = eState == FRAMESTATE_SHOW ? aNew : aOld;
+ rMod <<= AccessibleStateType::CHECKED;
+ Reference< XAccessible > xRet;
+ size_t nVecIdx = static_cast< size_t >( rBorder.GetType() );
+ if( GetBorder(rBorder.GetType()).IsEnabled() && (1 <= nVecIdx) && (nVecIdx <= maChildVec.size()) )
+ xRet = mxChildVec[ --nVecIdx ];
+ a11y::AccFrameSelector* pFrameSelector = static_cast<a11y::AccFrameSelector*>(xRet.get());
+
if( eState == FRAMESTATE_SHOW )
SetBorderCoreStyle( rBorder, &maCurrStyle );
else
rBorder.SetState( eState );
+ if (pFrameSelector)
+ pFrameSelector->NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOld, aNew );
+ //-----IAccessibility2 Implementation 2009
DoInvalidate( true );
}
@@ -914,9 +937,23 @@ bool FrameSelector::IsBorderSelected( FrameBorderType eBorder ) const
return mxImpl->GetBorder( eBorder ).IsSelected();
}
-void FrameSelector::SelectBorder( FrameBorderType eBorder, bool bSelect )
+void FrameSelector::SelectBorder( FrameBorderType eBorder, bool bSelect /*, bool bFocus */ )
{
mxImpl->SelectBorder( mxImpl->GetBorderAccess( eBorder ), bSelect );
+ //IAccessibility2 Implementation 2009-----
+ // MT: bFireFox as API parameter is ugly...
+ // if (bFocus)
+ {
+ Reference< XAccessible > xRet = GetChildAccessible(eBorder);
+ a11y::AccFrameSelector* pFrameSelector = static_cast<a11y::AccFrameSelector*>(xRet.get());
+ if (pFrameSelector)
+ {
+ Any aOldValue, aNewValue;
+ aNewValue <<= AccessibleStateType::FOCUSED;
+ pFrameSelector->NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
}
bool FrameSelector::IsAnyBorderSelected() const
@@ -1063,7 +1100,10 @@ void FrameSelector::MouseButtonDown( const MouseEvent& rMEvt )
if( !(*aIt)->IsSelected() )
{
bNewSelected = true;
- mxImpl->SelectBorder( **aIt, true );
+ //IAccessibility2 Implementation 2009-----
+ //mxImpl->SelectBorder( **aIt, true );
+ SelectBorder((**aIt).GetType(), true);
+ //-----IAccessibility2 Implementation 2009
}
}
else
@@ -1160,6 +1200,31 @@ void FrameSelector::GetFocus()
mxImpl->DoInvalidate( false );
if( mxImpl->mxAccess.is() )
mxImpl->mpAccess->NotifyFocusListeners( sal_True );
+ //IAccessibility2 Implementation 2009-----
+ if (IsAnyBorderSelected())
+ {
+ FrameBorderType borderType = FRAMEBORDER_NONE;
+ if (mxImpl->maLeft.IsSelected())
+ borderType = FRAMEBORDER_LEFT;
+ else if (mxImpl->maRight.IsSelected())
+ borderType = FRAMEBORDER_RIGHT;
+ else if (mxImpl->maTop.IsSelected())
+ borderType = FRAMEBORDER_TOP;
+ else if (mxImpl->maBottom.IsSelected())
+ borderType = FRAMEBORDER_BOTTOM;
+ else if (mxImpl->maHor.IsSelected())
+ borderType = FRAMEBORDER_HOR;
+ else if (mxImpl->maVer.IsSelected())
+ borderType = FRAMEBORDER_VER;
+ else if (mxImpl->maTLBR.IsSelected())
+ borderType = FRAMEBORDER_TLBR;
+ else if (mxImpl->maBLTR.IsSelected())
+ borderType = FRAMEBORDER_BLTR;
+ SelectBorder(borderType);
+ }
+ for( SelFrameBorderIter aIt( mxImpl->maEnabBorders ); aIt.Is(); ++aIt )
+ mxImpl->SetBorderState( **aIt, FRAMESTATE_SHOW );
+ //-----IAccessibility2 Implementation 2009
Control::GetFocus();
}
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 1cfbfedb3216..a68b2def5c8c 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -70,6 +70,14 @@
#include <tools/resary.hxx>
#include <svx/svxdlg.hxx> //CHINA001
+//IAccessibility2 Impplementaton 2009-----
+#ifndef _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_
+#include <svx/AccessibleSvxFindReplaceDialog.hxx>
+#endif
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+//-----IAccessibility2 Impplementaton 2009
+
#include <sfx2/layout-pre.hxx>
using namespace com::sun::star::i18n;
@@ -293,6 +301,8 @@ void SearchAttrItemList::Remove( sal_uInt16 nPos, sal_uInt16 nLen )
#undef INI_LIST
#define INI_LIST() \
+ mpDocWin (NULL), \
+ mbSuccess (sal_False), \
aSearchText ( this, SVX_RES( FT_SEARCH ) ), \
aSearchLB ( this, SVX_RES( ED_SEARCH ) ), \
aSearchTmplLB ( this, SVX_RES( LB_SEARCH ) ), \
@@ -2506,6 +2516,23 @@ void SvxSearchDialog::SaveToModule_Impl()
rBindings.GetDispatcher()->Execute( SID_SEARCH_ITEM, SFX_CALLMODE_SLOT, ppArgs );
}
+//IAccessible2 Implementation 2009-----
+::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
+ SvxSearchDialog::GetComponentInterface( sal_Bool bCreate )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xPeer
+ (Window::GetComponentInterface(false));
+ if ( !xPeer.is() && bCreate )
+ {
+ ::com::sun::star::awt::XWindowPeer* mxPeer = new VCLXSvxFindReplaceDialog(this);
+ SetComponentInterface(mxPeer);
+ return mxPeer;
+ }
+ else
+ return xPeer;
+}
+//-----IAccessible2 Implementation 2009
+
// class SvxSearchDialogWrapper ------------------------------------------
SFX_IMPL_CHILDWINDOW(SvxSearchDialogWrapper, SID_SEARCH_DLG);
diff --git a/svx/source/inc/AccessibleFrameSelector.hxx b/svx/source/inc/AccessibleFrameSelector.hxx
index 8faf364cb7d0..4be644c39a0a 100644
--- a/svx/source/inc/AccessibleFrameSelector.hxx
+++ b/svx/source/inc/AccessibleFrameSelector.hxx
@@ -108,16 +108,13 @@ public:
void Invalidate();
void NotifyFocusListeners(sal_Bool bGetFocus);
+ void NotifyAccessibleEvent( const sal_Int16 _nEventId, const ::com::sun::star::uno::Any& _rOldValue, const ::com::sun::star::uno::Any& _rNewValue );
protected:
DECL_LINK( WindowEventListener, VclSimpleEvent* );
virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
- void NotifyAccessibleEvent( const sal_Int16 _nEventId,
- const ::com::sun::star::uno::Any& _rOldValue,
- const ::com::sun::star::uno::Any& _rNewValue );
-
private:
void IsValid() throw (::com::sun::star::uno::RuntimeException);
diff --git a/svx/source/inc/svxpixelctlaccessiblecontext.hxx b/svx/source/inc/svxpixelctlaccessiblecontext.hxx
new file mode 100644
index 000000000000..c61ac7df52ac
--- /dev/null
+++ b/svx/source/inc/svxpixelctlaccessiblecontext.hxx
@@ -0,0 +1,424 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef _SVXPIXELACCESSIBLECONTEXT_HXX
+#define _SVXPIXELACCESSIBLECONTEXT_HXX
+
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLECOMPONENT_HPP_
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLECONTEXT_HPP_
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEEVENTBROADCASTER_HPP_
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ILLEGALACCESSIBLECOMPONENTSTATEEXCEPTION_HPP_
+#include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLESELECTION_HPP_
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEVALUE_HPP_
+#include <com/sun/star/accessibility/XAccessibleValue.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
+#include <com/sun/star/uno/Reference.hxx>
+#endif
+#ifndef _CPPUHELPER_WEAK_HXX_
+#include <cppuhelper/weak.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XTYPEPROVIDER_HPP_
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICENAME_HPP_
+#include <com/sun/star/lang/XServiceName.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_INDEXOUTOFBOUNDSEXCEPTION_HPP_
+#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
+#include <com/sun/star/lang/DisposedException.hpp>
+#endif
+#ifndef _VOS_MUTEX_HXX_
+#include <vos/mutex.hxx>
+#endif
+#ifndef _CPPUHELPER_INTERFACECONTAINER_H_
+#include <cppuhelper/interfacecontainer.h>
+#endif
+#ifndef _CPPUHELPER_COMPBASE6_HXX_
+#include <cppuhelper/compbase6.hxx>
+#endif
+#ifndef _CPPUHELPER_COMPBASE7_HXX_
+#include <cppuhelper/compbase7.hxx>
+#endif
+#ifndef _CPPUHELPER_COMPBASE5_HXX_
+#include <cppuhelper/compbase5.hxx>
+#endif
+#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
+#include <comphelper/broadcasthelper.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE6_HXX_
+#include <cppuhelper/implbase6.hxx>
+#endif
+#include <comphelper/servicehelper.hxx>
+
+//#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLETABLE_HPP_
+//#include <com/sun/star/accessibility/XAccessibleTable.hpp>
+//#endif
+
+#ifndef _SVX_RECTENUM_HXX //autogen
+#include <rectenum.hxx>
+#endif
+
+
+#include <tools/gen.hxx>
+
+
+namespace com { namespace sun { namespace star { namespace awt {
+ struct Point;
+ struct Rectangle;
+ struct Size;
+ class XFocusListener;
+} } } };
+class SvxPixelCtl;
+
+
+typedef ::cppu::WeakAggComponentImplHelper5<
+ ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::accessibility::XAccessibleComponent,
+ ::com::sun::star::accessibility::XAccessibleContext,
+ ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
+ ::com::sun::star::lang::XServiceInfo >
+ SvxPixelCtlAccessibleChild_BASE;
+
+class SvxPixelCtlAccessibleChild :
+ public ::comphelper::OBaseMutex,
+ public SvxPixelCtlAccessibleChild_BASE
+{
+ SvxPixelCtl* mrParentWindow;
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > mxParent;
+ void IsValid() throw (::com::sun::star::uno::RuntimeException);
+ sal_Bool m_bPixelColorOrBG;//Pixel Color Or BackGround Color
+ Point maPoint;
+ Rectangle* mpBoundingBox;
+ /// index of child in parent
+ long mnIndexInParent;
+ /// Mutex guarding this object.
+ ::osl::Mutex m_aMutex;
+public:
+ SvxPixelCtlAccessibleChild(
+ SvxPixelCtl* rWindow,
+ sal_Bool bPixelColorOrBG,
+ const Point& aPoint,
+ const Rectangle& rBounds,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& xParent,
+ long nIndexInParent );
+ ~SvxPixelCtlAccessibleChild();
+
+ //XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::lang::Locale SAL_CALL getLocale( ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
+
+
+ //XAccessibleComponent
+ virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocation( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL grabFocus( ) 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);
+
+ //Methods for XAccessibleEventBroadcaster
+ sal_uInt32 mnClientId;
+
+ virtual void SAL_CALL
+ addEventListener(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
+ throw( com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL
+ removeEventListener(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
+ throw( com::sun::star::uno::RuntimeException );
+ void CommitChange( const com::sun::star::accessibility::AccessibleEventObject& rEvent );
+
+ //Solution: Add the event handling method
+ void FireAccessibleEvent (short nEventId, const ::com::sun::star::uno::Any& rOld, const ::com::sun::star::uno::Any& rNew);
+ virtual void SAL_CALL disposing();
+
+ virtual Rectangle GetBoundingBoxOnScreen( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual Rectangle GetBoundingBox( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ /// @returns true if it's disposed or in disposing
+ inline sal_Bool IsAlive( void ) const;
+ /// @returns true if it's not disposed and no in disposing
+ inline sal_Bool IsNotAlive( void ) const;
+ /// throws the exception DisposedException if it's not alive
+ void ThrowExceptionIfNotAlive( void ) throw( ::com::sun::star::lang::DisposedException );
+
+
+ void CheckChild();
+ void SelectChild( sal_Bool bSelect);
+ void ChangePixelColorOrBG(sal_Bool bPixelColorOrBG){ m_bPixelColorOrBG = bPixelColorOrBG ;}
+ ::rtl::OUString GetName();
+};
+
+
+typedef ::cppu::WeakAggComponentImplHelper6<
+ ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::accessibility::XAccessibleComponent,
+ ::com::sun::star::accessibility::XAccessibleContext,
+ ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
+ ::com::sun::star::accessibility::XAccessibleSelection,
+// ::com::sun::star::accessibility::XAccessibleTable,
+ ::com::sun::star::lang::XServiceInfo >
+ SvxPixelCtlAccessible_BASE;
+
+class SvxPixelCtlAccessible :
+ public ::comphelper::OBaseMutex,
+ public SvxPixelCtlAccessible_BASE
+{
+ SvxPixelCtl* pPixelCtl;
+ void IsValid() throw (::com::sun::star::uno::RuntimeException);
+
+public:
+ SvxPixelCtlAccessible(SvxPixelCtl& rWindow);
+ ~SvxPixelCtlAccessible();
+
+ void ensureIsAlive() const throw ( ::com::sun::star::lang::DisposedException );
+
+ //XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::lang::Locale SAL_CALL getLocale( ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
+
+
+ //XAccessibleComponent
+ virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocation( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL grabFocus( ) 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);
+ // XAccessibleSelection
+ void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ void SAL_CALL clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException);
+ void SAL_CALL selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException);
+ sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+/*
+ // XAccessibleTable -------------------------------------------------------
+ /-** @return The number of used rows in the table (0 = empty table). *-/
+ virtual sal_Int32 SAL_CALL getAccessibleRowCount() throw ( ::com::sun::star::uno::RuntimeException );
+ /-** @return The number of used columns in the table (0 = empty table). *-/
+ virtual sal_Int32 SAL_CALL getAccessibleColumnCount() throw ( ::com::sun::star::uno::RuntimeException );
+ /-** @return The row extent of the specified cell (always 1). *-/
+ virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+ /-** @return The column extent of the specified cell (always 1). *-/
+ virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+ /-** @return The caption cell of the table (not supported). *-/
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCaption() throw ( ::com::sun::star::uno::RuntimeException );
+ /-** @return The summary object of the table (not supported). *-/
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleSummary() throw ( ::com::sun::star::uno::RuntimeException );
+ /-** @return The child index of the specified cell. *-/
+ virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,::com::sun::star::uno::RuntimeException );
+ /-** @return The row index of the specified child cell. *-/
+ virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,::com::sun::star::uno::RuntimeException );
+ /-** @return The column index of the specified child cell. *-/
+ virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,::com::sun::star::uno::RuntimeException );
+ /-** @return The description text of the specified row. *-/
+ virtual ::rtl::OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,::com::sun::star::uno::RuntimeException );
+ /-** @return The description text of the specified column. *-/
+ virtual ::rtl::OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,::com::sun::star::uno::RuntimeException );
+ /-** @return The XAccessibleTable interface of the row header bar. *-/
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleRowHeaders() throw ( ::com::sun::star::uno::RuntimeException );
+ /-** @return The XAccessibleTable interface of the column header bar. *-/
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleColumnHeaders() throw ( ::com::sun::star::uno::RuntimeException );
+ /-** @return An index list of completely selected rows. *-/
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleRows() throw ( ::com::sun::star::uno::RuntimeException );
+ /-** @return An index list of completely selected columns. *-/
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleColumns() throw ( ::com::sun::star::uno::RuntimeException );
+ /-** @return <TRUE/>, if the specified row is completely selected. *-/
+ virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,::com::sun::star::uno::RuntimeException );
+ /-** @return <TRUE/>, if the specified column is completely selected. *-/
+ virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,::com::sun::star::uno::RuntimeException );
+ /-** @return The XAccessible interface of the cell object at the specified cell position. *-/
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+ /-** @return <TRUE/>, if the specified cell is selected. *-/
+ virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,::com::sun::star::uno::RuntimeException );
+
+*/
+ //Methods for XAccessibleEventBroadcaster
+ sal_uInt32 mnClientId;
+
+ virtual void SAL_CALL
+ addEventListener(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
+ throw( com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL
+ removeEventListener(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
+ throw( com::sun::star::uno::RuntimeException );
+ void CommitChange( const com::sun::star::accessibility::AccessibleEventObject& rEvent );
+ //Solution: Add the event handling method
+ void FireAccessibleEvent (short nEventId, const ::com::sun::star::uno::Any& rOld, const ::com::sun::star::uno::Any& rNew);
+ virtual void SAL_CALL disposing();
+
+ /// select child
+ void SelectChild( Point pos );
+ void SelectChild( long nIndex);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ CreateChild (long nIndex, Point mPoint);
+
+
+ void LoseFocus();
+
+ void Invalidate();
+ /// @returns true if it's disposed or in disposing
+ inline sal_Bool IsAlive( void ) const;
+ /// @returns true if it's not disposed and no in disposing
+ inline sal_Bool IsNotAlive( void ) const;
+ /// throws the exception DisposedException if it's not alive
+ void ThrowExceptionIfNotAlive( void ) throw( ::com::sun::star::lang::DisposedException );
+
+protected:
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified row index is invalid. */
+ void ensureIsValidRow( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified column index is invalid. */
+ void ensureIsValidColumn( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified cell address is invalid. */
+ void ensureIsValidAddress( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified child index is invalid. */
+ void ensureIsValidIndex( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> m_xCurChild;
+public:
+ void NotifyChild(long nIndex,sal_Bool bSelect ,sal_Bool bCheck);
+};
+
+inline sal_Bool SvxPixelCtlAccessible::IsAlive( void ) const
+{
+ return !rBHelper.bDisposed && !rBHelper.bInDispose;
+}
+
+inline sal_Bool SvxPixelCtlAccessible::IsNotAlive( void ) const
+{
+ return rBHelper.bDisposed || rBHelper.bInDispose;
+}
+
+inline sal_Bool SvxPixelCtlAccessibleChild::IsAlive( void ) const
+{
+ return !rBHelper.bDisposed && !rBHelper.bInDispose;
+}
+
+inline sal_Bool SvxPixelCtlAccessibleChild::IsNotAlive( void ) const
+{
+ return rBHelper.bDisposed || rBHelper.bInDispose;
+}
+
+
+#endif
diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx
index cda407c58e4c..e96ab781a4dc 100644
--- a/svx/source/inc/svxrectctaccessiblecontext.hxx
+++ b/svx/source/inc/svxrectctaccessiblecontext.hxx
@@ -43,9 +43,14 @@
#include <vos/mutex.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <cppuhelper/compbase6.hxx>
-//#ifndef _CPPUHELPER_COMPBASE7_HXX_
-//#include <cppuhelper/compbase7.hxx>
-//#endif
+//IAccessibility2 Implementation 2009-----
+#ifndef _CPPUHELPER_COMPBASE7_HXX_
+#include <cppuhelper/compbase7.hxx>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_ACTION_HPP_
+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+#endif
+//-----IAccessibility2 Implementation 2009
#include <comphelper/broadcasthelper.hxx>
#include <cppuhelper/implbase6.hxx>
#include <comphelper/servicehelper.hxx>
@@ -250,7 +255,10 @@ protected:
@param nIndexOfChild
Index of the new child which should be selected.
*/
- void selectChild( long nIndexOfChild );
+ // IAccessibility2 implementation 2009. ------
+ //void selectChild( long nIndexOfChild );
+ void selectChild( long nIndexOfChild, sal_Bool bFireFocus = sal_True);
+ // ------ IAccessibility2 implementation 2009.
public:
/** Selects a new child by point.
@@ -261,8 +269,13 @@ public:
@param eButton
Button which belongs to the child which should be selected.
*/
- void selectChild( RECT_POINT ePoint );
-
+ //void selectChild( RECT_POINT ePoint );
+ // IAccessibility2 implementation 2009. ------
+ void selectChild( RECT_POINT ePoint, sal_Bool bFireFocus = sal_True );
+ void FireChildFocus( RECT_POINT eButton );
+ //Solution: Add the event handling method
+ void FireAccessibleEvent (short nEventId, const ::com::sun::star::uno::Any& rOld, const ::com::sun::star::uno::Any& rNew);
+ // ------ IAccessibility2 implementation 2009.
/// Sets the name
void setName( const ::rtl::OUString& rName );
@@ -332,15 +345,17 @@ inline sal_Bool SvxRectCtlAccessibleContext::IsNotAlive( void ) const
return rBHelper.bDisposed || rBHelper.bInDispose;
}
-
-typedef ::cppu::WeakAggComponentImplHelper6<
+//IAccessibility2 Implementation 2009-----
+typedef ::cppu::WeakAggComponentImplHelper7<
::com::sun::star::accessibility::XAccessible,
::com::sun::star::accessibility::XAccessibleComponent,
::com::sun::star::accessibility::XAccessibleContext,
::com::sun::star::accessibility::XAccessibleEventBroadcaster,
::com::sun::star::accessibility::XAccessibleValue,
+ ::com::sun::star::accessibility::XAccessibleAction,
::com::sun::star::lang::XServiceInfo >
SvxRectCtlChildAccessibleContext_Base;
+//-----IAccessibility2 Implementation 2009
class SvxRectCtlChildAccessibleContext : public SvxRectCtlChildAccessibleContext_Base
@@ -472,6 +487,13 @@ public:
virtual ::com::sun::star::uno::Any SAL_CALL
getMinimumValue() throw( ::com::sun::star::uno::RuntimeException );
+//IAccessibility2 Implementation 2009-----
+ // XAccessibleAction
+ virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+//-----IAccessibility2 Implementation 2009
//===== XServiceInfo ====================================================
virtual ::rtl::OUString SAL_CALL
@@ -492,8 +514,11 @@ public:
//===== internal ==========================================================
/// Sets the checked status
- void setStateChecked( sal_Bool bChecked );
-
+ //void setStateChecked( sal_Bool bChecked );
+ // IAccessibility2 implementation 2009. ------
+ void setStateChecked( sal_Bool bChecked, sal_Bool bFireFocus = sal_True);
+ void FireFocusEvent();
+ // ------ IAccessibility2 implementation 2009.
protected:
virtual Rectangle GetBoundingBoxOnScreen( void ) throw( ::com::sun::star::uno::RuntimeException );
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index c6dd980e3313..ce1e9fbf74e2 100755
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -301,7 +301,7 @@ void NBOTypeMgrBase::StoreMapUnit_impl() {
{
eCoreUnit = pSet->GetPool()->GetMetric(pSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE));
} else {
- //Sym3_2508 sd use different sid for numbering rule
+ //sd use different sid for numbering rule
eState = pSet->GetItemState(EE_PARA_NUMBULLET, sal_False, &pItem);
if(eState == SFX_ITEM_SET)
{
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 6d134605b2b7..67ecfba503ce 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -3047,4 +3047,21 @@ void SdrObjCustomShape::InvalidateRenderGeometry()
mpLastShadowGeometry = 0L;
}
+//IAccessibility2 Implementation 2009-----
+::rtl::OUString SdrObjCustomShape::GetCustomShapeName()
+{
+ rtl::OUString sShapeName;
+ rtl::OUString aEngine( ( (SfxStringItem&)( *this ).GetMergedItem( SDRATTR_CUSTOMSHAPE_ENGINE ) ).GetValue() );
+ if ( !aEngine.getLength() || aEngine.equalsAscii( "com.sun.star.drawing.EnhancedCustomShapeEngine" ) )
+ {
+ rtl::OUString sShapeType;
+ const rtl::OUString sType( RTL_CONSTASCII_USTRINGPARAM ( "Type" ) );
+ SdrCustomShapeGeometryItem& rGeometryItem( (SdrCustomShapeGeometryItem&)( *this ).GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
+ Any* pAny = rGeometryItem.GetPropertyValueByName( sType );
+ if ( pAny && ( *pAny >>= sShapeType ) )
+ sShapeName = EnhancedCustomShapeTypeNames::GetAccName( sShapeType );
+ }
+ return sShapeName;
+}
+//-----IAccessibility2 Implementation 2009
// eof
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 3f97de707b09..658474b9de9e 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -794,7 +794,19 @@ void SdrOle2Obj::Init()
}
// -----------------------------------------------------------------------------
+//IAccessibility2 Implementation 2009-----
+String SdrOle2Obj::GetStyleString()
+{
+ String strStyle;
+ if( xObjRef.is() && xObjRef.IsChart() )
+ {
+ strStyle = xObjRef.GetChartType();
+ }
+ return strStyle;
+}
+// -----------------------------------------------------------------------------
+//-----IAccessibility2 Implementation 2009
SdrOle2Obj::~SdrOle2Obj()
{
bInDestruction = true;
diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx
index d32468308f53..cc584f1a7af3 100644
--- a/svx/source/table/accessiblecell.cxx
+++ b/svx/source/table/accessiblecell.cxx
@@ -60,6 +60,8 @@ AccessibleCell::AccessibleCell( const ::com::sun::star::uno::Reference< ::com::s
, mpText( NULL )
, mxCell( rCell )
{
+ //Init the pAccTable var
+ pAccTable = dynamic_cast <AccessibleTableShape *> (rxParent.get());
}
// --------------------------------------------------------------------
@@ -242,7 +244,41 @@ Reference<XAccessibleStateSet> SAL_CALL AccessibleCell::getAccessibleStateSet (v
else
pStateSet->RemoveState (AccessibleStateType::FOCUSED);
}
+ // Set the invisible state for merged cell
+ if (mxCell.is() && mxCell->isMerged())
+ pStateSet->RemoveState(AccessibleStateType::VISIBLE);
+ else
+ pStateSet->AddState(AccessibleStateType::VISIBLE);
+
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Just when the parent table is not read-only,set states EDITABLE,RESIZABLE,MOVEABLE
+ ::com::sun::star::uno::Reference<XAccessible> xTempAcc = getAccessibleParent();
+ if( xTempAcc.is() )
+ {
+ ::com::sun::star::uno::Reference<XAccessibleContext>
+ xTempAccContext = xTempAcc->getAccessibleContext();
+ if( xTempAccContext.is() )
+ {
+ ::com::sun::star::uno::Reference<XAccessibleStateSet> rState =
+ xTempAccContext->getAccessibleStateSet();
+ if( rState.is() ) {
+ com::sun::star::uno::Sequence<short> pStates = rState->getStates();
+ int count = pStates.getLength();
+ for( int iIndex = 0;iIndex < count;iIndex++ )
+ {
+ if( pStates[iIndex] == AccessibleStateType::EDITABLE )
+ {
+ pStateSet->AddState (AccessibleStateType::EDITABLE);
+ pStateSet->AddState (AccessibleStateType::RESIZABLE);
+ pStateSet->AddState (AccessibleStateType::MOVEABLE);
+ break;
+ }
+ }
+ }
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
// Create a copy of the state set that may be modified by the
// caller without affecting the current state set.
xStateSet = Reference<XAccessibleStateSet>(new ::utl::AccessibleStateSetHelper (*pStateSet));
@@ -566,6 +602,75 @@ sal_Int32 SAL_CALL AccessibleCell::getAccessibleIndexInParent (void) throw (Runt
return mnIndexInParent;
}
+//IAccessibility2 Implementation 2009-----
+sdr::table::CellRef AccessibleCell::getCellRef()
+{
+ return mxCell;
+}
+::rtl::OUString AccessibleCell::getCellName( sal_Int32 nCol, sal_Int32 nRow )
+{
+ rtl::OUStringBuffer aBuf;
+
+ if (nCol < 26*26)
+ {
+ if (nCol < 26)
+ aBuf.append( static_cast<sal_Unicode>( 'A' +
+ static_cast<sal_uInt16>(nCol)));
+ else
+ {
+ aBuf.append( static_cast<sal_Unicode>( 'A' +
+ (static_cast<sal_uInt16>(nCol) / 26) - 1));
+ aBuf.append( static_cast<sal_Unicode>( 'A' +
+ (static_cast<sal_uInt16>(nCol) % 26)));
+ }
+ }
+ else
+ {
+ String aStr;
+ while (nCol >= 26)
+ {
+ sal_Int32 nC = nCol % 26;
+ aStr += static_cast<sal_Unicode>( 'A' +
+ static_cast<sal_uInt16>(nC));
+ nCol = nCol - nC;
+ nCol = nCol / 26 - 1;
+ }
+ aStr += static_cast<sal_Unicode>( 'A' +
+ static_cast<sal_uInt16>(nCol));
+ aStr.Reverse();
+ aBuf.append( aStr);
+ }
+ aBuf.append( OUString::valueOf(nRow+1) );
+ return aBuf.makeStringAndClear();
+}
+::rtl::OUString SAL_CALL AccessibleCell::getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException)
+{
+ ThrowIfDisposed ();
+ ::vos::OGuard aSolarGuard (::Application::GetSolarMutex());
+
+ if( pAccTable )
+ try
+ {
+ sal_Int32 nRow = 0, nCol = 0;
+ pAccTable->getColumnAndRow(mnIndexInParent, nCol, nRow);
+ return getCellName( nCol, nRow );
+ }
+ catch( Exception& )
+ {
+ }
+
+ return AccessibleCellBase::getAccessibleName();
+}
+void AccessibleCell::UpdateChildren()
+{
+ if (mpText)
+ mpText->UpdateChildren();
+}
+//-----IAccessibility2 Implementation 2009
+
+/* MT: Above getAccessibleName was introduced with IA2 CWS, while below was introduce in 3.3 meanwhile. Check which one is correct
+If this is correct, we also don't need sdr::table::CellRef getCellRef(), UpdateChildren(), getCellName( sal_Int32 nCol, sal_Int32 nRow ) above
+
::rtl::OUString SAL_CALL AccessibleCell::getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException)
{
ThrowIfDisposed ();
@@ -576,5 +681,6 @@ sal_Int32 SAL_CALL AccessibleCell::getAccessibleIndexInParent (void) throw (Runt
return AccessibleCellBase::getAccessibleName();
}
+*/
} // end of namespace accessibility
diff --git a/svx/source/table/accessiblecell.hxx b/svx/source/table/accessiblecell.hxx
index 3c545239b671..7bf00e25a9e1 100644
--- a/svx/source/table/accessiblecell.hxx
+++ b/svx/source/table/accessiblecell.hxx
@@ -43,6 +43,8 @@
#include <boost/noncopyable.hpp>
+#include <svx/AccessibleTableShape.hxx>
+
class SdrObject;
@@ -80,6 +82,9 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL getAccessibleStateSet(void) throw(::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getAccessibleIndexInParent(void) throw(::com::sun::star::uno::RuntimeException);
virtual ::rtl::OUString SAL_CALL getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException);
+ sdr::table::CellRef getCellRef();
+ void UpdateChildren();
+ ::rtl::OUString getCellName( sal_Int32 nCol, sal_Int32 nRow );
// XAccessibleComponent
virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint) throw (::com::sun::star::uno::RuntimeException);
@@ -119,6 +124,8 @@ public:
*/
inline void setIndexInParent(sal_Int32 _nIndex) { mnIndexInParent = _nIndex; }
+ //Get the parent table
+ AccessibleTableShape* GetParentTable() { return pAccTable; }
protected:
/// Bundle of information passed to all shapes in a document tree.
AccessibleShapeTreeInfo maShapeTreeInfo;
@@ -134,6 +141,8 @@ protected:
/// This method is called from the component helper base class while disposing.
virtual void SAL_CALL disposing (void);
+ AccessibleTableShape *pAccTable;
+
private:
explicit AccessibleCell(void); // not implemented
explicit AccessibleCell(const AccessibleCell&); // not implemented
diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx
index f144186ec6c0..857e2d37aeeb 100644
--- a/svx/source/table/accessibletableshape.cxx
+++ b/svx/source/table/accessibletableshape.cxx
@@ -40,6 +40,11 @@
#include <algorithm>
#include <cppuhelper/implbase1.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <svx/svdotable.hxx>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+//-----IAccessibility2 Implementation 2009
using ::rtl::OUString;
@@ -94,12 +99,21 @@ public:
Reference< XTable > mxTable;
AccessibleCellMap maChildMap;
Reference< XAccessible> mxAccessible;
+ //IAccessibility2 Implementation 2009-----
+ sal_Int32 mRowCount, mColCount;
+ //get the cached AccessibleCell from XCell
+ Reference< AccessibleCell > getAccessibleCell (Reference< XCell > xCell);
+ //-----IAccessibility2 Implementation 2009
};
//-----------------------------------------------------------------------------
AccessibleTableShapeImpl::AccessibleTableShapeImpl( AccessibleShapeTreeInfo& rShapeTreeInfo )
: mrShapeTreeInfo( rShapeTreeInfo )
+//IAccessibility2 Implementation 2009-----
+, mRowCount(0)
+, mColCount(0)
+//-----IAccessibility2 Implementation 2009
{
}
@@ -114,6 +128,14 @@ void AccessibleTableShapeImpl::init( const Reference< XAccessible>& xAccessible,
{
Reference< XModifyListener > xListener( this );
mxTable->addModifyListener( xListener );
+ //IAccessibility2 Implementation 2009-----
+ //register the listener with table model
+ Reference< ::com::sun::star::view::XSelectionSupplier > xSelSupplier(xTable, UNO_QUERY);
+ Reference< ::com::sun::star::view::XSelectionChangeListener > xSelListener( xAccessible, UNO_QUERY );
+ if (xSelSupplier.is())
+ xSelSupplier->addSelectionChangeListener(xSelListener);
+ mRowCount = mxTable->getRowCount();
+ mColCount = mxTable->getColumnCount();
}
}
@@ -123,6 +145,12 @@ void AccessibleTableShapeImpl::dispose()
{
if( mxTable.is() )
{
+ //IAccessibility2 Implementation 2009-----, remove all the cell's acc object in table's dispose.
+ for( AccessibleCellMap::iterator iter( maChildMap.begin() ); iter != maChildMap.end(); iter++ )
+ {
+ (*iter).second->dispose();
+ }
+ //-----IAccessibility2 Implementation 2009
Reference< XModifyListener > xListener( this );
mxTable->removeModifyListener( xListener );
mxTable.clear();
@@ -131,7 +159,21 @@ void AccessibleTableShapeImpl::dispose()
}
//-----------------------------------------------------------------------------
+//IAccessibility2 Implementation 2009-----, get the cached AccessibleCell from XCell
+Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (Reference< XCell > xCell)
+{
+ AccessibleCellMap::iterator iter( maChildMap.find( xCell ) );
+ if( iter != maChildMap.end() )
+ {
+ Reference< AccessibleCell > xChild( (*iter).second.get() );
+ return xChild;
+ }
+ return Reference< AccessibleCell >();
+}
+
+//-----------------------------------------------------------------------------
+//-----IAccessibility2 Implementation 2009
Reference< XAccessible > AccessibleTableShapeImpl::getAccessibleChild( sal_Int32 nChildIndex ) throw(IndexOutOfBoundsException)
{
sal_Int32 nColumn = 0, nRow = 0;
@@ -151,6 +193,9 @@ Reference< XAccessible > AccessibleTableShapeImpl::getAccessibleChild( sal_Int32
rtl::Reference< AccessibleCell > xAccessibleCell( new AccessibleCell( mxAccessible, xCellRef, nChildIndex, mrShapeTreeInfo ) );
+ //IAccessibility2 Implementation 2009-----
+ xAccessibleCell->Init();
+ //-----IAccessibility2 Implementation 2009
maChildMap[xCell] = xAccessibleCell;
xAccessibleCell->Init();
@@ -197,6 +242,15 @@ void SAL_CALL AccessibleTableShapeImpl::modified( const EventObject& /*aEvent*/
const sal_Int32 nRowCount = mxTable->getRowCount();
const sal_Int32 nColCount = mxTable->getColumnCount();
+ //IAccessibility2 Implementation 2009-----
+ sal_Bool bRowOrColumnChanged = sal_False;
+ if (mRowCount != nRowCount || mColCount != nColCount )
+ {
+ bRowOrColumnChanged = sal_True;
+ mRowCount = nRowCount;
+ mColCount = nColCount;
+ }
+ //-----IAccessibility2 Implementation 2009
sal_Int32 nChildIndex = 0;
for( sal_Int32 nRow = 0; nRow < nRowCount; ++nRow )
@@ -210,12 +264,49 @@ void SAL_CALL AccessibleTableShapeImpl::modified( const EventObject& /*aEvent*/
{
rtl::Reference< AccessibleCell > xAccessibleCell( (*iter).second );
xAccessibleCell->setIndexInParent( nChildIndex );
- xAccessibleCell->CommitChange(AccessibleEventId::VISIBLE_DATA_CHANGED, Any(), Any());
+ //IAccessibility2 Implementation 2009-----, the children may need to updated
+ //xAccessibleCell->CommitChange(AccessibleEventId::VISIBLE_DATA_CHANGED, Any(), Any());
+ xAccessibleCell->UpdateChildren();
+ // If row or column count is changed, there is split or merge, so all cell's acc name should be updated
+ if (bRowOrColumnChanged)
+ {
+ xAccessibleCell->SetAccessibleName(xAccessibleCell->getAccessibleName(), AccessibleContextBase::ManuallySet);
+ }
+ // For merged cell, add invisible & disabled state.
+ Reference< XMergeableCell > xMergedCell( mxTable->getCellByPosition( nCol, nRow ), UNO_QUERY );
+ if (xMergedCell.is() && xMergedCell->isMerged())
+ {
+ xAccessibleCell->ResetState(AccessibleStateType::VISIBLE);
+ xAccessibleCell->ResetState(AccessibleStateType::ENABLED);
+ // IA2 CWS. MT: OFFSCREEN == !SHOWING, should stay consistent
+ // xAccessibleCell->SetState(AccessibleStateType::OFFSCREEN);
+ xAccessibleCell->ResetState(AccessibleStateType::SHOWING);
+ }
+ else
+ {
+ xAccessibleCell->SetState(AccessibleStateType::VISIBLE);
+ xAccessibleCell->SetState(AccessibleStateType::ENABLED);
+ // IA2 CWS. MT: OFFSCREEN == !SHOWING, should stay consistent
+ // xAccessibleCell->ResetState(AccessibleStateType::OFFSCREEN);
+ xAccessibleCell->SetState(AccessibleStateType::SHOWING);
+ }
+ //-----IAccessibility2 Implementation 2009
// move still existing cell from temporary child map to our child map
maChildMap[xCell] = xAccessibleCell;
aTempChildMap.erase( iter );
}
+ //IAccessibility2 Implementation 2009-----, need to add the new added cell on demand
+ else
+ {
+ CellRef xCellRef( dynamic_cast< Cell* >( xCell.get() ) );
+
+ rtl::Reference< AccessibleCell > xAccessibleCell( new AccessibleCell( mxAccessible, xCellRef, nChildIndex, mrShapeTreeInfo ) );
+
+ xAccessibleCell->Init();
+ maChildMap[xCell] = xAccessibleCell;
+ }
+ //-----IAccessibility2 Implementation 2009
++nChildIndex;
}
@@ -228,6 +319,10 @@ void SAL_CALL AccessibleTableShapeImpl::modified( const EventObject& /*aEvent*/
{
(*iter).second->dispose();
}
+ //IAccessibility2 Implementation 2009-----, notify bridge to update the acc cache.
+ AccessibleTableShape *pAccTable = dynamic_cast <AccessibleTableShape *> (mxAccessible.get());
+ pAccTable->CommitChange(AccessibleEventId::INVALIDATE_ALL_CHILDREN, Any(), Any());
+ //-----IAccessibility2 Implementation 2009
}
catch( Exception& )
{
@@ -264,7 +359,7 @@ void AccessibleTableShape::Init()
{
try
{
-
+ mnPreviousSelectionCount = 0;
Reference< XPropertySet > xSet( mxShape, UNO_QUERY_THROW );
Reference< XTable > xTable( xSet->getPropertyValue(C2U("Model")), UNO_QUERY_THROW );
@@ -295,6 +390,16 @@ SvxTableController* AccessibleTableShape::getTableController()
Any SAL_CALL AccessibleTableShape::queryInterface( const Type& aType ) throw (RuntimeException)
{
+ //IAccessibility2 Implementation 2009-----
+ if ( aType == ::getCppuType((Reference<XAccessibleTableSelection> *)0) )
+ {
+ Reference<XAccessibleTableSelection> xThis( this );
+ Any aRet;
+ aRet <<= xThis;
+ return aRet;
+ }
+ else
+ //-----IAccessibility2 Implementation 2009
return AccessibleTableShape_Base::queryInterface( aType );
}
@@ -331,7 +436,7 @@ OUString SAL_CALL AccessibleTableShape::getImplementationName(void) throw (Runti
OUString AccessibleTableShape::CreateAccessibleBaseName(void) throw (RuntimeException)
{
- return OUString (RTL_CONSTASCII_USTRINGPARAM("TableShape"));;
+ return OUString (RTL_CONSTASCII_USTRINGPARAM("TableShape"));
}
//--------------------------------------------------------------------
@@ -443,7 +548,19 @@ sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleColumnExtentAt( sal_Int32
Reference< XAccessibleTable > SAL_CALL AccessibleTableShape::getAccessibleRowHeaders( ) throw (RuntimeException)
{
- Reference< XAccessibleTable > xRet( this ); // todo
+ //IAccessibility2 Implementation 2009-----
+ //Reference< XAccessibleTable > xRet( this ); // todo
+ Reference< XAccessibleTable > xRet;
+ SvxTableController* pController = getTableController();
+ if( pController )
+ {
+ if( pController->isRowHeader() )
+ {
+ AccessibleTableHeaderShape* pTableHeader = new AccessibleTableHeaderShape( this, sal_True );
+ xRet.set( pTableHeader );
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
return xRet;
}
@@ -451,7 +568,19 @@ Reference< XAccessibleTable > SAL_CALL AccessibleTableShape::getAccessibleRowHea
Reference< XAccessibleTable > SAL_CALL AccessibleTableShape::getAccessibleColumnHeaders( ) throw (RuntimeException)
{
- Reference< XAccessibleTable > xRet( this ); // todo
+ //IAccessibility2 Implementation 2009-----
+ //Reference< XAccessibleTable > xRet( this ); // todo
+ Reference< XAccessibleTable > xRet;
+ SvxTableController* pController = getTableController();
+ if( pController )
+ {
+ if( pController->isColumnHeader() )
+ {
+ AccessibleTableHeaderShape* pTableHeader = new AccessibleTableHeaderShape( this, sal_False );
+ xRet.set( pTableHeader );
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
return xRet;
}
@@ -459,16 +588,80 @@ Reference< XAccessibleTable > SAL_CALL AccessibleTableShape::getAccessibleColumn
Sequence< sal_Int32 > SAL_CALL AccessibleTableShape::getSelectedAccessibleRows( ) throw (RuntimeException)
{
- Sequence< sal_Int32 > aRet;
+ //IAccessibility2 Implementation 2009-----
+ /*Sequence< sal_Int32 > aRet;*/
+ sal_Int32 nRow = getAccessibleRowCount();
+ ::std::vector< sal_Bool > aSelected( nRow, sal_True );
+ sal_Int32 nCount = nRow;
+ for( sal_Int32 i = 0; i < nRow; i++ )
+ {
+ try
+ {
+ aSelected[i] = isAccessibleRowSelected( i );
+ }
+ catch( ... )
+ {
+ return Sequence< sal_Int32 >();
+ }
+
+ if( !aSelected[i] )
+ nCount--;
+ }
+ Sequence < sal_Int32 > aRet( nCount );
+ sal_Int32 *pRet = aRet.getArray();
+ sal_Int32 nPos = 0;
+ size_t nSize = aSelected.size();
+ for( size_t i=0; i < nSize && nPos < nCount; i++ )
+ {
+ if( aSelected[i] )
+ {
+ *pRet++ = i;
+ nPos++;
+ }
+ }
+
return aRet;
+ //-----IAccessibility2 Implementation 2009
}
//--------------------------------------------------------------------
Sequence< sal_Int32 > SAL_CALL AccessibleTableShape::getSelectedAccessibleColumns( ) throw (RuntimeException)
{
- Sequence< sal_Int32 > aRet;
+ //IAccessibility2 Implementation 2009-----
+ /*Sequence< sal_Int32 > aRet;*/
+ sal_Int32 nColumn = getAccessibleColumnCount();
+ ::std::vector< sal_Bool > aSelected( nColumn, sal_True );
+ sal_Int32 nCount = nColumn;
+ for( sal_Int32 i = 0; i < nColumn; i++ )
+ {
+ try
+ {
+ aSelected[i] = isAccessibleColumnSelected( i );
+ }
+ catch( ... )
+ {
+ return Sequence< sal_Int32 >();
+ }
+
+ if( !aSelected[i] )
+ nCount--;
+ }
+ Sequence < sal_Int32 > aRet( nCount );
+ sal_Int32 *pRet = aRet.getArray();
+ sal_Int32 nPos = 0;
+ size_t nSize = aSelected.size();
+ for( size_t i=0; i < nSize && nPos < nCount; i++ )
+ {
+ if( aSelected[i] )
+ {
+ *pRet++ = i;
+ nPos++;
+ }
+ }
+
return aRet;
+ //-----IAccessibility2 Implementation 2009
}
//--------------------------------------------------------------------
@@ -477,6 +670,13 @@ sal_Bool SAL_CALL AccessibleTableShape::isAccessibleRowSelected( sal_Int32 nRow
{
::vos::OGuard aSolarGuard (::Application::GetSolarMutex());
checkCellPosition( 0, nRow );
+ //IAccessibility2 Implementation 2009-----
+ SvxTableController* pController = getTableController();
+ if( pController )
+ {
+ return pController->isRowSelected( nRow );
+ }
+ //-----IAccessibility2 Implementation 2009
return sal_False;
}
@@ -486,6 +686,13 @@ sal_Bool SAL_CALL AccessibleTableShape::isAccessibleColumnSelected( sal_Int32 nC
{
::vos::OGuard aSolarGuard (::Application::GetSolarMutex());
checkCellPosition( nColumn, 0 );
+ //IAccessibility2 Implementation 2009-----
+ SvxTableController* pController = getTableController();
+ if( pController )
+ {
+ return pController->isColumnSelected( nColumn );
+ }
+ //-----IAccessibility2 Implementation 2009
return sal_False;
}
@@ -564,7 +771,10 @@ sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleColumn( sal_Int32 nChildIn
::vos::OGuard aSolarGuard (::Application::GetSolarMutex());
sal_Int32 nColumn = 0, nRow = 0;
mxImpl->getColumnAndRow( nChildIndex, nColumn, nRow );
- return nChildIndex;
+ //IAccessibility2 Implementation 2009-----
+ //return nChildIndex;
+ return nColumn;
+ //-----IAccessibility2 Implementation 2009
}
//--------------------------------------------------------------------
@@ -603,7 +813,11 @@ sal_Bool SAL_CALL AccessibleTableShape::isAccessibleChildSelected( sal_Int32 nCh
CellPos aPos;
mxImpl->getColumnAndRow( nChildIndex, aPos.mnCol, aPos.mnRow );
- return isAccessibleSelected(aPos.mnCol, aPos.mnRow);
+ //IAccessibility2 Implementation 2009-----
+ // Para order is not correct
+ //return isAccessibleSelected(aPos.mnCol, aPos.mnRow);
+ return isAccessibleSelected(aPos.mnRow, aPos.mnCol);
+ //-----IAccessibility2 Implementation 2009
}
//--------------------------------------------------------------------
@@ -654,7 +868,8 @@ Reference< XAccessible > SAL_CALL AccessibleTableShape::getSelectedAccessibleChi
{
::vos::OGuard aSolarGuard (::Application::GetSolarMutex());
- SvxTableController* pController = getTableController();
+ //IAccessibility2 Implementation 2009-----
+ /*SvxTableController* pController = getTableController();
if( pController && pController->hasSelectedCells() )
{
CellPos aFirstPos, aLastPos;
@@ -675,6 +890,22 @@ Reference< XAccessible > SAL_CALL AccessibleTableShape::getSelectedAccessibleChi
}
throw IndexOutOfBoundsException();
+ */
+ if( nSelectedChildIndex < 0 )
+ throw IndexOutOfBoundsException();
+
+ sal_Int32 nChildIndex = GetIndexOfSelectedChild( nSelectedChildIndex );
+
+ if( nChildIndex < 0 )
+ throw IndexOutOfBoundsException();
+
+ if ( nChildIndex >= getAccessibleChildCount() )
+ {
+ throw IndexOutOfBoundsException();
+ }
+
+ return getAccessibleChild( nChildIndex );
+ //-----IAccessibility2 Implementation 2009
}
//--------------------------------------------------------------------
@@ -705,9 +936,180 @@ void SAL_CALL AccessibleTableShape::deselectAccessibleChild( sal_Int32 nChildInd
pController->setSelectedCells( aFirstPos, aLastPos );
}
}
-
//--------------------------------------------------------------------
+//IAccessibility2 Implementation 2009-----
+//===== XAccessibleTableSelection ============================================
+sal_Bool SAL_CALL AccessibleTableShape::selectRow( sal_Int32 row )
+throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::vos::OGuard aSolarGuard (::Application::GetSolarMutex());
+ SvxTableController* pController = getTableController();
+ if( !pController )
+ return sal_False;
+ return pController->selectRow( row );
+}
+sal_Bool SAL_CALL AccessibleTableShape::selectColumn( sal_Int32 column )
+throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::vos::OGuard aSolarGuard (::Application::GetSolarMutex());
+ SvxTableController* pController = getTableController();
+ if( !pController )
+ return sal_False;
+ return pController->selectColumn( column );
+}
+sal_Bool SAL_CALL AccessibleTableShape::unselectRow( sal_Int32 row )
+throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::vos::OGuard aSolarGuard (::Application::GetSolarMutex());
+ SvxTableController* pController = getTableController();
+ if( !pController )
+ return sal_False;
+ return pController->deselectRow( row );
+}
+sal_Bool SAL_CALL AccessibleTableShape::unselectColumn( sal_Int32 column )
+throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::vos::OGuard aSolarGuard (::Application::GetSolarMutex());
+ SvxTableController* pController = getTableController();
+ if( !pController )
+ return sal_False;
+ return pController->deselectColumn( column );
+}
+sal_Int32 AccessibleTableShape::GetIndexOfSelectedChild(
+ sal_Int32 nSelectedChildIndex ) const
+{
+ sal_Int32 nChildren = const_cast<AccessibleTableShape*>(this)->getAccessibleChildCount();
+
+ if( nSelectedChildIndex >= nChildren )
+ return -1L;
+
+ sal_Int32 n = 0;
+ while( n < nChildren )
+ {
+ if( const_cast<AccessibleTableShape*>(this)->isAccessibleChildSelected( n ) )
+ {
+ if( 0 == nSelectedChildIndex )
+ break;
+ else
+ --nSelectedChildIndex;
+ }
+ ++n;
+ }
+
+ return n < nChildren ? n : -1L;
+}
+void AccessibleTableShape::getColumnAndRow( sal_Int32 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow ) throw (IndexOutOfBoundsException )
+{
+ mxImpl->getColumnAndRow(nChildIndex, rnColumn, rnRow);
+}
+//--------------------------------------------------------------------
+// XSelectionChangeListener
+void SAL_CALL
+ AccessibleTableShape::disposing (const EventObject& aEvent)
+ throw (RuntimeException)
+{
+ AccessibleShape::disposing(aEvent);
+}
+void SAL_CALL AccessibleTableShape::selectionChanged (const EventObject& rEvent)
+ throw (RuntimeException)
+{
+ //::sdr::table::CellRef xCellRef = static_cast< ::sdr::table::CellRef > (rEvent.Source);
+ Reference< XCell > xCell(rEvent.Source, UNO_QUERY);
+ if (xCell.is())
+ {
+ Reference< AccessibleCell > xAccCell = mxImpl->getAccessibleCell( xCell );
+ if (xAccCell.is())
+ {
+ sal_Int32 nIndex = xAccCell->getAccessibleIndexInParent(),
+ nCount = getSelectedAccessibleChildCount();
+ sal_Bool bSelected = isAccessibleChildSelected(nIndex);
+ if (mnPreviousSelectionCount == 0 && nCount > 0 && bSelected)
+ {
+ xAccCell->SetState(AccessibleStateType::SELECTED);
+ xAccCell->CommitChange(AccessibleEventId::SELECTION_CHANGED, Any(), Any());
+ }
+ else if (bSelected)
+ {
+ xAccCell->SetState(AccessibleStateType::SELECTED);
+ xAccCell->CommitChange(AccessibleEventId::SELECTION_CHANGED_ADD, Any(), Any());
+ }
+ else
+ {
+ xAccCell->ResetState(AccessibleStateType::SELECTED);
+ xAccCell->CommitChange(AccessibleEventId::SELECTION_CHANGED_REMOVE, Any(), Any());
+ }
+ mnPreviousSelectionCount = nCount;
+ }
+ }
+}
+// Get the currently active cell which is text editing
+AccessibleCell* AccessibleTableShape::GetActiveAccessibleCell()
+{
+ sal_Bool bCellEditing = sal_False;
+ Reference< AccessibleCell > xAccCell;
+ AccessibleCell* pAccCell = NULL;
+ SvxTableController* pController = getTableController();
+ if (pController)
+ {
+ ::sdr::table::SdrTableObj* pTableObj = pController->GetTableObj();
+ if ( pTableObj )
+ {
+ ::sdr::table::CellRef xCellRef (pTableObj->getActiveCell());
+ if ( xCellRef.is() )
+ {
+ bCellEditing = xCellRef->IsTextEditActive();
+ if (bCellEditing)
+ {
+ //Reference< XCell > xCell(xCellRef.get(), UNO_QUERY);
+ xAccCell = mxImpl->getAccessibleCell(Reference< XCell >( xCellRef.get() ));
+ if (xAccCell.is())
+ pAccCell = xAccCell.get();
+ }
+ }
+ }
+ }
+ return pAccCell;
+}
+//--------------------------------------------------------------------
+//If current active cell is in editing, the focus state should be set to internal text
+sal_Bool AccessibleTableShape::SetState (sal_Int16 aState)
+{
+ AccessibleCell* pActiveAccessibleCell = GetActiveAccessibleCell();
+ sal_Bool bStateHasChanged = sal_False;
+ if (aState == AccessibleStateType::FOCUSED && pActiveAccessibleCell != NULL)
+ {
+ return pActiveAccessibleCell->SetState(aState);
+ }
+ else
+ bStateHasChanged = AccessibleShape::SetState (aState);
+ return bStateHasChanged;
+}
+//--------------------------------------------------------------------
+//If current active cell is in editing, the focus state should be reset to internal text
+sal_Bool AccessibleTableShape::ResetState (sal_Int16 aState)
+{
+ AccessibleCell* pActiveAccessibleCell = GetActiveAccessibleCell();
+ sal_Bool bStateHasChanged = sal_False;
+ if (aState == AccessibleStateType::FOCUSED && pActiveAccessibleCell != NULL)
+ {
+ return pActiveAccessibleCell->ResetState(aState);
+ }
+ else
+ bStateHasChanged = AccessibleShape::ResetState (aState);
+ return bStateHasChanged;
+}
+//--------------------------------------------------------------------
+sal_Bool AccessibleTableShape::SetStateDirectly (sal_Int16 aState)
+{
+ return AccessibleContextBase::SetState (aState);
+}
+//--------------------------------------------------------------------
+sal_Bool AccessibleTableShape::ResetStateDirectly (sal_Int16 aState)
+{
+ return AccessibleContextBase::ResetState (aState);
+}
+//-----IAccessibility2 Implementation 2009
void AccessibleTableShape::checkCellPosition( sal_Int32 nCol, sal_Int32 nRow ) throw ( IndexOutOfBoundsException )
{
if( (nCol >= 0) && (nRow >= 0) && mxImpl->mxTable.is() && (nCol < mxImpl->mxTable->getColumnCount()) && (nRow < mxImpl->mxTable->getRowCount()) )
@@ -716,4 +1118,333 @@ void AccessibleTableShape::checkCellPosition( sal_Int32 nCol, sal_Int32 nRow ) t
throw IndexOutOfBoundsException();
}
+//IAccessibility2 Implementation 2009-----
+AccessibleTableHeaderShape::AccessibleTableHeaderShape( AccessibleTableShape* pTable, sal_Bool bRow )
+{
+ mpTable = pTable;
+ mbRow = bRow;
+}
+
+AccessibleTableHeaderShape::~AccessibleTableHeaderShape (void)
+{
+ mpTable = NULL;
+}
+
+// XAccessible
+Reference< XAccessibleContext > SAL_CALL AccessibleTableHeaderShape::getAccessibleContext(void) throw (RuntimeException)
+{
+ return this;
+}
+
+// XAccessibleContext
+sal_Int32 SAL_CALL AccessibleTableHeaderShape::getAccessibleChildCount( ) throw(RuntimeException)
+{
+ return getAccessibleRowCount() * getAccessibleColumnCount();
+}
+
+Reference< XAccessible > SAL_CALL AccessibleTableHeaderShape::getAccessibleChild( sal_Int32 i ) throw(IndexOutOfBoundsException, RuntimeException)
+{
+ return mpTable->getAccessibleChild( i );
+}
+
+Reference< XAccessible > SAL_CALL AccessibleTableHeaderShape::getAccessibleParent (void) throw (RuntimeException)
+{
+ Reference< XAccessible > XParent;
+ return XParent;
+}
+
+sal_Int32 SAL_CALL AccessibleTableHeaderShape::getAccessibleIndexInParent (void) throw (RuntimeException)
+{
+ return -1;
+}
+
+sal_Int16 SAL_CALL AccessibleTableHeaderShape::getAccessibleRole (void) throw (RuntimeException)
+{
+ return mpTable->getAccessibleRole();
+}
+
+OUString SAL_CALL AccessibleTableHeaderShape::getAccessibleDescription (void) throw (RuntimeException)
+{
+ return mpTable->getAccessibleDescription();
+}
+
+OUString SAL_CALL AccessibleTableHeaderShape::getAccessibleName (void) throw (RuntimeException)
+{
+ return mpTable->getAccessibleName();
+}
+
+Reference< XAccessibleStateSet > SAL_CALL AccessibleTableHeaderShape::getAccessibleStateSet (void) throw (RuntimeException)
+{
+ return mpTable->getAccessibleStateSet();
+}
+
+Reference< XAccessibleRelationSet > SAL_CALL AccessibleTableHeaderShape::getAccessibleRelationSet (void) throw (RuntimeException)
+{
+ return mpTable->getAccessibleRelationSet();
+}
+
+Locale SAL_CALL AccessibleTableHeaderShape::getLocale (void) throw (IllegalAccessibleComponentStateException, RuntimeException)
+{
+ return mpTable->getLocale();
+}
+
+//XAccessibleComponent
+sal_Bool SAL_CALL AccessibleTableHeaderShape::containsPoint ( const ::com::sun::star::awt::Point& aPoint ) throw (RuntimeException)
+{
+ return mpTable->containsPoint( aPoint );
+}
+
+Reference< XAccessible > SAL_CALL AccessibleTableHeaderShape::getAccessibleAtPoint ( const ::com::sun::star::awt::Point& aPoint) throw (RuntimeException)
+{
+ return mpTable->getAccessibleAtPoint( aPoint );
+}
+
+::com::sun::star::awt::Rectangle SAL_CALL AccessibleTableHeaderShape::getBounds (void) throw (RuntimeException)
+{
+ return mpTable->getBounds();
+}
+
+::com::sun::star::awt::Point SAL_CALL AccessibleTableHeaderShape::getLocation (void) throw (RuntimeException)
+{
+ return mpTable->getLocation();
+}
+
+::com::sun::star::awt::Point SAL_CALL AccessibleTableHeaderShape::getLocationOnScreen (void) throw (RuntimeException)
+{
+ return mpTable->getLocationOnScreen();
+}
+
+::com::sun::star::awt::Size SAL_CALL AccessibleTableHeaderShape::getSize (void) throw (RuntimeException)
+{
+ return mpTable->getSize();
+}
+
+sal_Int32 SAL_CALL AccessibleTableHeaderShape::getForeground (void) throw (RuntimeException)
+{
+ return mpTable->getForeground();
+}
+
+sal_Int32 SAL_CALL AccessibleTableHeaderShape::getBackground (void) throw (RuntimeException)
+{
+ return mpTable->getBackground();
+}
+
+void SAL_CALL AccessibleTableHeaderShape::grabFocus (void) throw (RuntimeException)
+{
+ mpTable->grabFocus();
+}
+//===== XAccessibleTable ============================================
+
+sal_Int32 SAL_CALL AccessibleTableHeaderShape::getAccessibleRowCount() throw (RuntimeException)
+{
+ return mbRow ? 1 : mpTable->getAccessibleRowCount();
+}
+
+sal_Int32 SAL_CALL AccessibleTableHeaderShape::getAccessibleColumnCount() throw (RuntimeException)
+{
+ return !mbRow ? 1 : mpTable->getAccessibleColumnCount();
+}
+
+OUString SAL_CALL AccessibleTableHeaderShape::getAccessibleRowDescription( sal_Int32 nRow ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ return mpTable->getAccessibleRowDescription( nRow );
+}
+
+OUString SAL_CALL AccessibleTableHeaderShape::getAccessibleColumnDescription( sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ return mpTable->getAccessibleColumnDescription( nColumn );
+}
+
+sal_Int32 SAL_CALL AccessibleTableHeaderShape::getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ return mpTable->getAccessibleRowExtentAt( nRow, nColumn );
+}
+
+sal_Int32 SAL_CALL AccessibleTableHeaderShape::getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ return mpTable->getAccessibleColumnExtentAt( nRow, nColumn );
+}
+
+Reference< XAccessibleTable > SAL_CALL AccessibleTableHeaderShape::getAccessibleRowHeaders( ) throw (RuntimeException)
+{
+ Reference< XAccessibleTable > xRet;
+ return xRet;
+}
+
+Reference< XAccessibleTable > SAL_CALL AccessibleTableHeaderShape::getAccessibleColumnHeaders( ) throw (RuntimeException)
+{
+ Reference< XAccessibleTable > xRet;
+ return xRet;
+}
+
+Sequence< sal_Int32 > SAL_CALL AccessibleTableHeaderShape::getSelectedAccessibleRows( ) throw (RuntimeException)
+{
+ sal_Int32 nRow = getAccessibleRowCount();
+ ::std::vector< sal_Bool > aSelected( nRow, sal_True );
+ sal_Int32 nCount = nRow;
+ for( sal_Int32 i = 0; i < nRow; i++ )
+ {
+ try
+ {
+ aSelected[i] = isAccessibleRowSelected( i );
+ }
+ catch( ... )
+ {
+ return Sequence< sal_Int32 >();
+ }
+
+ if( !aSelected[i] )
+ nCount--;
+ }
+ Sequence < sal_Int32 > aRet( nCount );
+ sal_Int32 *pRet = aRet.getArray();
+ sal_Int32 nPos = 0;
+ size_t nSize = aSelected.size();
+ for( size_t i=0; i < nSize && nPos < nCount; i++ )
+ {
+ if( aSelected[i] )
+ {
+ *pRet++ = i;
+ nPos++;
+ }
+ }
+
+ return aRet;
+}
+
+Sequence< sal_Int32 > SAL_CALL AccessibleTableHeaderShape::getSelectedAccessibleColumns( ) throw (RuntimeException)
+{
+ sal_Int32 nColumn = getAccessibleColumnCount();
+ ::std::vector< sal_Bool > aSelected( nColumn, sal_True );
+ sal_Int32 nCount = nColumn;
+ for( sal_Int32 i = 0; i < nColumn; i++ )
+ {
+ try
+ {
+ aSelected[i] = isAccessibleColumnSelected( i );
+ }
+ catch( ... )
+ {
+ return Sequence< sal_Int32 >();
+ }
+
+ if( !aSelected[i] )
+ nCount--;
+ }
+ Sequence < sal_Int32 > aRet( nCount );
+ sal_Int32 *pRet = aRet.getArray();
+ sal_Int32 nPos = 0;
+ size_t nSize = aSelected.size();
+ for( size_t i=0; i < nSize && nPos < nCount; i++ )
+ {
+ if( aSelected[i] )
+ {
+ *pRet++ = i;
+ nPos++;
+ }
+ }
+
+ return aRet;
+}
+
+sal_Bool SAL_CALL AccessibleTableHeaderShape::isAccessibleRowSelected( sal_Int32 nRow ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ return mpTable->isAccessibleRowSelected( nRow );
+}
+
+sal_Bool SAL_CALL AccessibleTableHeaderShape::isAccessibleColumnSelected( sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ return mpTable->isAccessibleColumnSelected( nColumn );
+}
+
+Reference< XAccessible > SAL_CALL AccessibleTableHeaderShape::getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ return mpTable->getAccessibleCellAt( nRow, nColumn );
+}
+
+Reference< XAccessible > SAL_CALL AccessibleTableHeaderShape::getAccessibleCaption( ) throw (RuntimeException)
+{
+ return mpTable->getAccessibleCaption();
+}
+
+Reference< XAccessible > SAL_CALL AccessibleTableHeaderShape::getAccessibleSummary( ) throw (RuntimeException)
+{
+ return mpTable->getAccessibleSummary();
+}
+
+sal_Bool SAL_CALL AccessibleTableHeaderShape::isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ return mpTable->isAccessibleSelected( nRow, nColumn );
+}
+
+sal_Int32 SAL_CALL AccessibleTableHeaderShape::getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ return mpTable->getAccessibleIndex( nRow, nColumn );
+}
+
+sal_Int32 SAL_CALL AccessibleTableHeaderShape::getAccessibleRow( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ return mpTable->getAccessibleRow( nChildIndex );
+}
+
+sal_Int32 SAL_CALL AccessibleTableHeaderShape::getAccessibleColumn( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ return mpTable->getAccessibleColumn( nChildIndex );
+}
+
+//===== XAccessibleTableSelection ============================================
+sal_Bool SAL_CALL AccessibleTableHeaderShape::selectRow( sal_Int32 row )
+throw (IndexOutOfBoundsException, RuntimeException)
+{
+ if( mbRow )
+ return mpTable->selectRow( row );
+ else
+ {
+ mpTable->clearAccessibleSelection();
+ sal_Int32 nIndex = mpTable->getAccessibleIndex( row, 0 );
+ mpTable->selectAccessibleChild( nIndex );
+ return sal_True;
+ }
+}
+
+sal_Bool SAL_CALL AccessibleTableHeaderShape::selectColumn( sal_Int32 column )
+throw (IndexOutOfBoundsException, RuntimeException)
+{
+ if( !mbRow )
+ return mpTable->selectColumn( column );
+ else
+ {
+ mpTable->clearAccessibleSelection();
+ sal_Int32 nIndex = mpTable->getAccessibleIndex( 0, column );
+ mpTable->selectAccessibleChild( nIndex );
+ return sal_True;
+ }
+}
+
+sal_Bool SAL_CALL AccessibleTableHeaderShape::unselectRow( sal_Int32 row )
+throw (IndexOutOfBoundsException, RuntimeException)
+{
+ if( mbRow )
+ return mpTable->unselectRow( row );
+ else
+ {
+ sal_Int32 nIndex = mpTable->getAccessibleIndex( row, 0 );
+ mpTable->deselectAccessibleChild( nIndex );
+ return sal_True;
+ }
+}
+
+sal_Bool SAL_CALL AccessibleTableHeaderShape::unselectColumn( sal_Int32 column )
+throw (IndexOutOfBoundsException, RuntimeException)
+{
+ if( !mbRow )
+ return mpTable->unselectColumn( column );
+ else
+ {
+ sal_Int32 nIndex = mpTable->getAccessibleIndex( 0, column );
+ mpTable->deselectAccessibleChild( nIndex );
+ return sal_True;
+ }
+}
+//-----IAccessibility2 Implementation 2009
}
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 05f7684725e3..d0fe742a355b 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -2604,4 +2604,88 @@ IMPL_LINK( SvxTableController, UpdateHdl, void *, EMPTYARG )
return 0;
}
+//IAccessibility2 Implementation 2009-----
+sal_Bool SvxTableController::selectRow( sal_Int32 row )
+{
+ if( !mxTable.is() )
+ return sal_False;
+ CellPos aStart( 0, row ), aEnd( mxTable->getColumnCount() - 1, row );
+ StartSelection( aEnd );
+ gotoCell( aStart, true, 0 );
+ return sal_True;
+}
+sal_Bool SvxTableController::selectColumn( sal_Int32 column )
+{
+ if( !mxTable.is() )
+ return sal_False;
+ CellPos aStart( column, 0 ), aEnd( column, mxTable->getRowCount() - 1 );
+ StartSelection( aEnd );
+ gotoCell( aStart, true, 0 );
+ return sal_True;
+}
+sal_Bool SvxTableController::deselectRow( sal_Int32 row )
+{
+ if( !mxTable.is() )
+ return sal_False;
+ CellPos aStart( 0, row ), aEnd( mxTable->getColumnCount() - 1, row );
+ StartSelection( aEnd );
+ gotoCell( aStart, false, 0 );
+ return sal_True;
+}
+sal_Bool SvxTableController::deselectColumn( sal_Int32 column )
+{
+ if( !mxTable.is() )
+ return sal_False;
+ CellPos aStart( column, 0 ), aEnd( column, mxTable->getRowCount() - 1 );
+ StartSelection( aEnd );
+ gotoCell( aStart, false, 0 );
+ return sal_True;
+}
+sal_Bool SvxTableController::isRowSelected( sal_Int32 nRow )
+{
+ if( hasSelectedCells() )
+ {
+ CellPos aFirstPos, aLastPos;
+ getSelectedCells( aFirstPos, aLastPos );
+ if( (aFirstPos.mnCol == 0) && (nRow >= aFirstPos.mnRow && nRow <= aLastPos.mnRow) && (mxTable->getColumnCount() - 1 == aLastPos.mnCol) )
+ return sal_True;
+ }
+ return sal_False;
+}
+sal_Bool SvxTableController::isColumnSelected( sal_Int32 nColumn )
+{
+ if( hasSelectedCells() )
+ {
+ CellPos aFirstPos, aLastPos;
+ getSelectedCells( aFirstPos, aLastPos );
+ if( (aFirstPos.mnRow == 0) && (nColumn >= aFirstPos.mnCol && nColumn <= aLastPos.mnCol) && (mxTable->getRowCount() - 1 == aLastPos.mnRow) )
+ return sal_True;
+ }
+ return sal_False;
+}
+
+sal_Bool SvxTableController::isRowHeader()
+{
+ SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
+
+ if( !pTableObj )
+ return sal_False;
+
+ TableStyleSettings aSettings( pTableObj->getTableStyleSettings() );
+
+ return aSettings.mbUseFirstRow;
+}
+
+sal_Bool SvxTableController::isColumnHeader()
+{
+ SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
+
+ if( !pTableObj )
+ return sal_False;
+
+ TableStyleSettings aSettings( pTableObj->getTableStyleSettings() );
+
+ return aSettings.mbUseFirstColumn;
+}
+//-----IAccessibility2 Implementation 2009
} }
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index f47b1f09e822..6ff6371666a6 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -778,6 +778,9 @@ SfxItemPropertyMapEntry* ImplGetSvxTableShapePropertyMap()
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0},
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0},
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+ //IAccessibility2 Implementation 2009-----, the name property of table should also be exported.
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_NAME), SDRATTR_OBJECTNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
+ //-----IAccessibility2 Implementation 2009
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
{ MAP_CHAR_LEN("Model"), OWN_ATTR_OLEMODEL , &::com::sun::star::table::XTable::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index e3d3dc465e15..91953e6495b0 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -91,6 +91,7 @@
#include <editeng/outlobj.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <vector>
#include "svx/lathe3d.hxx"
#include "svx/extrud3d.hxx"
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index d3e81084e01a..0053a74e5e49 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -52,6 +52,12 @@
#include <comphelper/processfactory.hxx>
#include <vos/mutex.hxx>
#include <svx/svdlegacy.hxx>
+
+//IAccessibility2 Implementation 2009-----
+#include <svx/svdotable.hxx>
+#include <../table/cell.hxx>
+//-----IAccessibility2 Implementation 2009
+
#include <svx/sdrpaintwindow.hxx>
#include <svx/sdrtexthelpers.hxx>
@@ -354,6 +360,29 @@ void SvxTextEditSourceImpl::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if( mpObject == pSdrHint->GetSdrHintObject() )
{
+ //IAccessibility2 Implementation 2009-----, one EditSource object is created for each AccessibleCell, and it will monitor the hint.
+ // Once HINT_BEGEDIT is broadcast, each EditSource of AccessibleCell will handle it here and
+ // call below: mpView->GetTextEditOutliner()->SetNotifyHdl(), which will replace the Notifer for current
+ // editable cell. It is totally wrong. So add check here to avoid the incorrect replacement of notifer.
+ // To be safe, add accessibility check here because currently it only happen on the editsource of AccessibleCell
+ if (Application::IsAccessibilityEnabled())
+ {
+ if (mpObject && mpText)
+ {
+ sdr::table::SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >(mpObject);
+ if(pTableObj)
+ {
+ sdr::table::CellRef xCell = pTableObj->getActiveCell();
+ if (xCell.is())
+ {
+ sdr::table::Cell* pCellObj = dynamic_cast< sdr::table::Cell* >( mpText );
+ if (pCellObj && xCell.get() != pCellObj)
+ break;
+ }
+ }
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
// invalidate old forwarder
if( !mbForwarderIsEditMode )
{
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 54cb0a40ac66..8adedd7665d0 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -88,6 +88,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/core/access/accdoc \
sw/source/core/access/accembedded \
sw/source/core/access/accfootnote \
+ sw/source/core/access/accfield \
sw/source/core/access/accframe \
sw/source/core/access/accframebase\
sw/source/core/access/accfrmobj \
@@ -99,6 +100,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/core/access/acchypertextdata \
sw/source/core/access/accmap \
sw/source/core/access/accnotextframe \
+ sw/source/core/access/accnotexthyperlink \
sw/source/core/access/accpage \
sw/source/core/access/accpara \
sw/source/core/access/accportions \
@@ -149,6 +151,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/core/crsr/trvltbl \
sw/source/core/crsr/unocrsr \
sw/source/core/crsr/viscrs \
+ sw/source/core/crsr/overlayrangesoutline \
sw/source/core/doc/SwStyleNameMapper \
sw/source/core/doc/acmplwrd \
sw/source/core/doc/dbgoutsw \
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx
index 82fdb9caa405..e82b3f82d204 100644
--- a/sw/inc/IDocumentContentOperations.hxx
+++ b/sw/inc/IDocumentContentOperations.hxx
@@ -21,36 +21,37 @@
- #ifndef IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED
- #define IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED
-
- #ifndef _SAL_TYPES_H_
- #include <sal/types.h>
- #endif
-
- class SwPaM;
- struct SwPosition;
- class SwNode;
- class SwNodeRange;
- class String;
- class Graphic;
- class SfxItemSet;
- class SfxPoolItem;
- class GraphicObject;
- class SdrObject;
- class SwFrmFmt;
- class SwDrawFrmFmt;
- class SwFlyFrmFmt;
- class SwNodeIndex;
-
- namespace utl { class TransliterationWrapper; }
- namespace svt { class EmbeddedObjectRef; }
-
- /** Text operation/manipulation interface
- */
- class IDocumentContentOperations
- {
- public:
+#ifndef IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED
+#define IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED
+
+#ifndef _SAL_TYPES_H_
+#include <sal/types.h>
+#endif
+
+class SwPaM;
+struct SwPosition;
+class SwNode;
+class SwNodeRange;
+class String;
+class Graphic;
+class SfxItemSet;
+class SfxPoolItem;
+class GraphicObject;
+class SdrObject;
+class SwFrmFmt;
+class SwDrawFrmFmt;
+class SwFlyFrmFmt;
+class SwNodeIndex;
+class SwFmtFld;
+
+namespace utl { class TransliterationWrapper; }
+namespace svt { class EmbeddedObjectRef; }
+
+/** Text operation/manipulation interface
+*/
+class IDocumentContentOperations
+{
+public:
enum SwMoveFlags
{
DOC_MOVEDEFAULT = 0x00,
@@ -68,9 +69,9 @@
, INS_FORCEHINTEXPAND = 0x04 // expand all hints at insert position
};
- public:
+public:
/** Kopieren eines Bereiches im oder in ein anderes Dokument !
- Die Position kann auch im Bereich liegen !!
+ Die Position kann auch im Bereich liegen !!
*/
virtual bool CopyRange(SwPaM&, SwPosition&, const bool bCopyAll ) const = 0;
@@ -88,12 +89,12 @@
/** complete delete of a given PaM
- OD 2009-08-20 #i100466#
- Add optional parameter <bForceJoinNext>, default value <false>
- Needed for hiding of deletion redlines
+ OD 2009-08-20 #i100466#
+ Add optional parameter <bForceJoinNext>, default value <false>
+ Needed for hiding of deletion redlines
*/
virtual bool DeleteAndJoin( SwPaM&,
- const bool bForceJoinNext = false ) = 0;
+ const bool bForceJoinNext = false ) = 0;
/** verschieben eines Bereiches
*/
@@ -114,7 +115,7 @@
/** Insert string into existing text node at position rRg.Point().
*/
virtual bool InsertString(const SwPaM &rRg, const String&,
- const enum InsertFlags nInsertMode = INS_EMPTYEXPAND ) = 0;
+ const enum InsertFlags nInsertMode = INS_EMPTYEXPAND ) = 0;
/** change text to Upper/Lower/Hiragana/Katagana/...
*/
@@ -123,29 +124,29 @@
/** Einfuegen einer Grafik, Formel. Die XXXX werden kopiert.
*/
virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const String& rGrfName, const String& rFltName, const Graphic* pGraphic,
- const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
+ const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
/**
*/
virtual SwFlyFrmFmt* Insert(const SwPaM& rRg, const GraphicObject& rGrfObj, const SfxItemSet* pFlyAttrSet,
- const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
+ const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
/** austauschen einer Grafik (mit Undo)
*/
virtual void ReRead(SwPaM&, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj) = 0;
/** Einfuegen eines DrawObjectes. Das Object muss bereits im DrawModel
- angemeldet sein.
+ angemeldet sein.
*/
virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*) = 0;
/** Einfuegen von OLE-Objecten.
*/
virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet,
- const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
+ const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
virtual SwFlyFrmFmt* InsertOLE(const SwPaM &rRg, const String& rObjName, sal_Int64 nAspect, const SfxItemSet* pFlyAttrSet,
- const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
+ const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
/** Aufspalten eines Nodes an rPos (nur fuer den TxtNode implementiert)
*/
@@ -156,45 +157,48 @@
virtual bool AppendTxtNode(SwPosition& rPos) = 0;
/** Ersetz einen selektierten Bereich in einem TextNode mit dem
- String. Ist fuers Suchen&Ersetzen gedacht.
- bRegExpRplc - ersetze Tabs (\\t) und setze den gefundenen String
- ein ( nicht \& )
- z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
- --> "xx\t<Tab>..zzz..&"
+ String. Ist fuers Suchen&Ersetzen gedacht.
+ bRegExpRplc - ersetze Tabs (\\t) und setze den gefundenen String
+ ein ( nicht \& )
+ z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
+ --> "xx\t<Tab>..zzz..&"
*/
virtual bool ReplaceRange(SwPaM& rPam, const String& rNewStr,
- const bool bRegExReplace) = 0;
+ const bool bRegExReplace) = 0;
/** Einfuegen eines Attributs. Erstreckt sich rRg ueber
- mehrere Nodes, wird das Attribut aufgespaltet, sofern
- dieses Sinn macht. Nodes, in denen dieses Attribut keinen
- Sinn macht, werden ignoriert. In vollstaendig in der
- Selektion eingeschlossenen Nodes wird das Attribut zu
- harter Formatierung, in den anderen (Text-)Nodes wird das
- Attribut in das Attributearray eingefuegt. Bei einem
- Zeichenattribut wird ein "leerer" Hint eingefuegt,
- wenn keine Selektion
- vorliegt; andernfalls wird das Attribut als harte
- Formatierung dem durch rRg.Start() bezeichneten Node
- hinzugefuegt. Wenn das Attribut nicht eingefuegt werden
- konnte, liefert die Methode sal_False.
+ mehrere Nodes, wird das Attribut aufgespaltet, sofern
+ dieses Sinn macht. Nodes, in denen dieses Attribut keinen
+ Sinn macht, werden ignoriert. In vollstaendig in der
+ Selektion eingeschlossenen Nodes wird das Attribut zu
+ harter Formatierung, in den anderen (Text-)Nodes wird das
+ Attribut in das Attributearray eingefuegt. Bei einem
+ Zeichenattribut wird ein "leerer" Hint eingefuegt,
+ wenn keine Selektion
+ vorliegt; andernfalls wird das Attribut als harte
+ Formatierung dem durch rRg.Start() bezeichneten Node
+ hinzugefuegt. Wenn das Attribut nicht eingefuegt werden
+ konnte, liefert die Methode sal_False.
*/
//Modify here for #119405, by chengjh, 2012-08-16
//Add a para for the char attribute exp...
- virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&,
- const sal_uInt16 nFlags,bool bExpandCharToPara=false) = 0;
+ virtual bool InsertPoolItem(
+ const SwPaM &rRg,
+ const SfxPoolItem&,
+ const sal_uInt16 nFlags,
+ const bool bExpandCharToPara=false ) = 0;
//End
/**
*/
virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&,
- const sal_uInt16 nFlags) = 0;
+ const sal_uInt16 nFlags) = 0;
/** Removes any leading white space from the paragraph
*/
virtual void RemoveLeadingWhiteSpace(const SwPosition & rPos ) = 0;
- protected:
+protected:
virtual ~IDocumentContentOperations() {};
};
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index 139bfdbc1bb3..4e8e885c3925 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -282,6 +282,10 @@ class SwPostItMgr: public SfxListener
sal_uInt16 SearchReplace(const SwFmtFld &pFld, const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward);
sal_uInt16 FinishSearchReplace(const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward);
+ //IAccessibility2 Implementation 2009-----
+ // get the PostIt window by index
+ sal_Int32 GetPostItCount() {return mvPostItFlds.size();};
+ //-----IAccessibility2 Implementation 2009
void AssureStdModeAtShell();
void ConnectSidebarWinToFrm( const SwFrm& rFrm,
diff --git a/sw/inc/access.hrc b/sw/inc/access.hrc
index b6e83ee49a1b..43c3f4f0fc00 100644
--- a/sw/inc/access.hrc
+++ b/sw/inc/access.hrc
@@ -59,9 +59,12 @@
#define STR_ACCESS_SW_CATEGORY (RC_ACCESS_BEGIN + 29)
#define STR_ACCESS_TL_GLOBAL (RC_ACCESS_BEGIN + 30)
#define STR_ACCESS_TL_CONTENT (RC_ACCESS_BEGIN + 31)
+#define STR_ACCESS_FORMULA_TYPE (RC_ACCESS_BEGIN + 32)
+#define STR_ACCESS_FORMULA_TEXT (RC_ACCESS_BEGIN + 33)
+#define STR_ACCESS_FORMULA_TOOLBAR (RC_ACCESS_BEGIN + 34)
//-----IAccessibility2 Implementation 2009
-#define ACCESS_ACT_END STR_ACCESS_TL_CONTENT
+#define ACCESS_ACT_END STR_ACCESS_FORMULA_TOOLBAR
#if ACCESS_ACT_END > RC_ACCESS_END
#error Resource-Id Ueberlauf in #file, #line
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index a74534bd13b8..6b935cf89755 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -32,7 +32,14 @@
#include <tools/debug.hxx>
#include <tools/fract.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <svx/AccessibleControlShape.hxx>
+#include <svx/AccessibleShape.hxx>
+#include "fesh.hxx"
#include <vector>
+#include <set>
+class SwAccessibleParagraph;
+//-----IAccessibility2 Implementation 2009
class ViewShell;
class Rectangle;
@@ -80,8 +87,8 @@ class Window;
typedef sal_uInt16 tAccessibleStates;
// <--
-class SwAccessibleMap : public accessibility::IAccessibleViewForwarder,
- public accessibility::IAccessibleParent
+class SwAccessibleMap : public ::accessibility::IAccessibleViewForwarder,
+ public ::accessibility::IAccessibleParent
{
mutable ::vos::OMutex maMutex;
::vos::OMutex maEventMutex;
@@ -115,10 +122,19 @@ class SwAccessibleMap : public accessibility::IAccessibleViewForwarder,
void InvalidateCursorPosition(
const ::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible>& rAcc );
- void DoInvalidateShapeSelection();
- void DoInvalidateShapeFocus();
+ //IAccessibility2 Implementation 2009-----
+ void DoInvalidateShapeSelection(sal_Bool bInvalidateFocusMode = sal_False);
+
+ //Replace by DoInvalidateShapeSelection
+ //void DoInvalidateShapeFocus();
void InvalidateShapeSelection();
+ //mpSelectedFrmMap contains the old selected objects.
+ SwAccessibleContextMap_Impl *mpSeletedFrmMap;
+ //IvalidateShapeInParaSelection() method is reponsible for the updating the selected states of the objects.
+ void InvalidateShapeInParaSelection();
+ //-----IAccessibility2 Implementation 2009
+
void _InvalidateRelationSet( const SwFrm* pFrm, sal_Bool bFrom );
::com::sun::star::uno::Reference<
@@ -174,6 +190,15 @@ public:
{
return mpVSh;
}
+ //IAccessibility2 Implementation 2009-----
+ sal_Bool IsInSameLevel(const SdrObject* pObj, const SwFEShell* pFESh);
+ void AddShapeContext(const SdrObject *pObj,
+ ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > xAccShape);
+
+ void AddGroupContext(const SdrObject *pParentObj,
+ ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > xAccParent);
+ void RemoveGroupContext(const SdrObject *pParentObj, ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > xAccParent);
+ //-----IAccessibility2 Implementation 2009
const SwRect& GetVisArea() const;
@@ -214,7 +239,11 @@ public:
void InvalidateCursorPosition( const SwFrm *pFrm );
void InvalidateFocus();
-
+ //IAccessibility2 Implementation 2009-----
+ void FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage);
+ void FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection);
+ void FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn);
+ //-----IAccessibility2 Implementation 2009
void SetCursorContext(
const ::vos::ORef < SwAccessibleContext >& rCursorContext );
@@ -292,6 +321,14 @@ public:
const long _nIndex,
const ::accessibility::AccessibleShapeTreeInfo& _rShapeTreeInfo
) throw (::com::sun::star::uno::RuntimeException);
+ //IAccessibility2 Implementation 2009-----
+ virtual ::accessibility::AccessibleControlShape* GetAccControlShapeFromModel
+ (::com::sun::star::beans::XPropertySet* pSet)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetAccessibleCaption (
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape)
+ throw (::com::sun::star::uno::RuntimeException);
+ //-----IAccessibility2 Implementation 2009
// additional Core/Pixel conversions for internal use; also works
// for preview
@@ -321,5 +358,17 @@ private:
*/
void GetMapMode( const Point& _rPoint,
MapMode& _orMapMode ) const;
+//IAccessibility2 Implementation 2009-----
+public:
+ virtual sal_Bool IsDocumentSelAll();
+
+ ::com::sun::star::uno::WeakReference < ::com::sun::star::accessibility::XAccessible >
+ GetCursorContext() const { return mxCursorContext; }
+
+ //Para Container for InvalidateCursorPosition
+ typedef std::set< SwAccessibleParagraph* > SET_PARA;
+ SET_PARA m_setParaAdd;
+ SET_PARA m_setParaRemove;
+ //-----IAccessibility2 Implementation 2009
};
#endif
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 0bd9571ec5ce..2b25d5d50da6 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -69,10 +69,9 @@ class SwCellFrms;
class SwTOXMark;
class SwRedline;
class IBlockCursor;
-class SwCntntNode; // #i23726#
-// --> OD 2008-06-19 #i90516#
+class SwCntntNode;
class SwPostItField;
-// <--
+class SwTxtFld;
struct SwPosition;
namespace com { namespace sun { namespace star { namespace util {
@@ -218,10 +217,8 @@ private:
sal_uInt16 nBasicActionCnt; // Actions, die vom Basic geklammert wurden
CrsrMoveState eMvState; // Status fuers Crsr-Travelling - GetCrsrOfst
- // --> OD 2008-04-02 #refactorlists#
String sMarkedListId;
int nMarkedListLevel;
- // <--
sal_Bool bHasFocus : 1; // Shell ist in einem Window "aktiv"
sal_Bool bSVCrsrVis : 1; // SV-Cursor Un-/Sichtbar
@@ -249,9 +246,9 @@ private:
// OD 11.02.2003 #100556# - flag to allow/avoid execution of marcos (default: true)
bool mbMacroExecAllowed : 1;
- SW_DLLPRIVATE void UpdateCrsr( sal_uInt16 eFlags
- =SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE,
- sal_Bool bIdleEnd = sal_False );
+ SW_DLLPRIVATE void UpdateCrsr(
+ sal_uInt16 eFlags = SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE,
+ sal_Bool bIdleEnd = sal_False );
SW_DLLPRIVATE void _ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing );
@@ -731,12 +728,27 @@ public:
inline void UnSetVisCrsr();
// springe zum nachsten/vorherigen Feld des entsprechenden Types
- sal_Bool MoveFldType( const SwFieldType* pFldType, sal_Bool bNext,
- sal_uInt16 nSubType = USHRT_MAX,
- sal_uInt16 nResType = USHRT_MAX );
+ sal_Bool MoveFldType(
+ const SwFieldType* pFldType,
+ const bool bNext,
+ const sal_uInt16 nResType = USHRT_MAX,
+ const bool bAddSetExpressionFldsToInputFlds = true );
// springe genau zu diesem Feld
sal_Bool GotoFld( const SwFmtFld& rFld );
+ SwTxtFld* GetTxtFldAtPos(
+ const SwPosition* pPos,
+ const bool bIncludeInputFldAtStart ) const;
+ SwField* GetFieldAtCrsr(
+ const SwPaM* pCrsr,
+ const bool bIncludeInputFldAtStart ) const;
+ SwField* GetCurFld( const bool bIncludeInputFldAtStart = false ) const;
+ bool CrsrInsideInputFld() const;
+ bool PosInsideInputFld( const SwPosition& rPos ) const;
+ bool DocPtInsideInputFld( const Point& rDocPt ) const;
+ xub_StrLen StartOfInputFldAtPos( const SwPosition& rPos ) const;
+ xub_StrLen EndOfInputFldAtPos( const SwPosition& rPos ) const;
+
// returne die Anzahl der Cursor im Ring (Flag besagt ob man nur
// aufgepspannte haben will - sprich etwas selektiert ist (Basic))
sal_uInt16 GetCrsrCnt( sal_Bool bAll = sal_True ) const;
@@ -826,15 +838,14 @@ public:
sal_Bool GotoINetAttr( const SwTxtINetFmt& rAttr );
const SwFmtINetFmt* FindINetAttr( const String& rName ) const;
+ sal_Bool SelectTxt( const xub_StrLen nStart,
+ const xub_StrLen nEnd );
+
sal_Bool CheckTblBoxCntnt( const SwPosition* pPos = 0 );
void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
void ClearTblBoxCntnt();
sal_Bool EndAllTblBoxEdit();
- // wird gerufen, wenn eine Tabellenselektion im UpdateCrsr erzeugt wird,
- // ohne das die UI davon etaws weiss
- virtual void NewCoreSelection();
-
void SetSelTblCells( sal_Bool bFlag ) { bSelTblCells = bFlag; }
sal_Bool IsSelTblCells() const { return bSelTblCells; }
@@ -854,6 +865,13 @@ public:
// is cursor or the point in/over a right to left formatted text?
sal_Bool IsInRightToLeftText( const Point* pPt = 0 ) const;
+ //IAccessibility2 Implementation 2009-----
+ void FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage);
+ SwFrm* oldColFrm;
+ bool bColumnChange();
+ void FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection);
+ void FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn);
+ //-----IAccessibility2 Implementation 2009
// If the current cursor position is inside a hidden range, the hidden range
// is selected and true is returned:
bool SelectHiddenRange();
@@ -882,8 +900,6 @@ public:
@return the textual description of the current selection
*/
String GetCrsrDescr() const;
-
- SwRect GetRectOfCurrentChar();
};
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index ff6405bfc485..c0dba525e1cc 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -481,6 +481,9 @@ private:
bool mbClipBoard : 1; // true: this document represents the clipboard
bool mbColumnSelection : 1; // true: this content has bee created by a column selection
// (clipboard docs only)
+ //IAccessibility2 Implementation 2009-----
+ sal_Bool bIsPrepareSelAll :1;
+ //-----IAccessibility2 Implementation 2009
#ifdef DBG_UTIL
bool mbXMLExport : 1; // sal_True: during XML export
@@ -701,6 +704,11 @@ private:
SwFmt *_MakeFrmFmt(const String &, SwFmt *, sal_Bool, sal_Bool );
SwFmt *_MakeTxtFmtColl(const String &, SwFmt *, sal_Bool, sal_Bool );
+//IAccessibility2 Implementation 2009-----
+private:
+ sal_Bool bReadOnly;
+ String msDocAccTitle;
+
void InitTOXTypes();
void Paste( const SwDoc& );
bool DeleteAndJoinImpl(SwPaM&, const bool);
@@ -710,6 +718,12 @@ private:
bool ReplaceRangeImpl(SwPaM&, String const&, const bool);
public:
+ virtual void setDocReadOnly( sal_Bool b) { bReadOnly = b; }
+ virtual sal_Bool getDocReadOnly() const { return bReadOnly; }
+ virtual void setDocAccTitle( const String& rTitle ) { msDocAccTitle = rTitle; }
+ virtual const String getDocAccTitle() const { return msDocAccTitle; }
+ //-----IAccessibility2 Implementation 2009
+
enum DocumentType {
DOCTYPE_NATIVE,
DOCTYPE_MSWORD //This doc medul is come from Ms Word
@@ -853,13 +867,13 @@ public:
@param rPos position to search at
@return pointer to field at the given position or NULL in case no field is found
*/
- static SwField* GetField(const SwPosition& rPos);
+ static SwField* GetFieldAtPos(const SwPosition& rPos);
/** Returns the field at a certain position.
@param rPos position to search at
@return pointer to field at the given position or NULL in case no field is found
*/
- static SwTxtFld* GetTxtFld(const SwPosition& rPos);
+ static SwTxtFld* GetTxtFldAtPos(const SwPosition& rPos);
/** IDocumentContentOperations
*/
@@ -867,12 +881,10 @@ public:
virtual void DeleteSection(SwNode* pNode);
virtual bool DeleteRange(SwPaM&);
virtual bool DelFullPara(SwPaM&);
- // --> OD 2009-08-20 #i100466#
// Add optional parameter <bForceJoinNext>, default value <false>
// Needed for hiding of deletion redlines
virtual bool DeleteAndJoin( SwPaM&,
const bool bForceJoinNext = false );
- // <--
virtual bool MoveRange(SwPaM&, SwPosition&, SwMoveFlags);
virtual bool MoveNodeRange(SwNodeRange&, SwNodeIndex&, SwMoveFlags);
virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags);
@@ -886,11 +898,13 @@ public:
virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*);
virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet,
const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
- //Modify here for #119405, by chengjh, 2012-08-16
- //Add a para for the char attribute exp...
- virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&,
- const SetAttrMode nFlags,bool bExpandCharToPara=false);
- //End
+
+ virtual bool InsertPoolItem(
+ const SwPaM &rRg,
+ const SfxPoolItem&,
+ const SetAttrMode nFlags,
+ const bool bExpandCharToPara=false);
+
virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&,
const SetAttrMode nFlags);
virtual void ReRead(SwPaM&, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj);
@@ -1049,6 +1063,14 @@ public:
bool InXMLExport() const { return mbXMLExport; }
void SetXMLExport( bool bFlag ) { mbXMLExport = bFlag; }
#endif
+ //-----IAccessibility2 Implementation 2009
+ void SetSelAll( sal_Bool bSel )
+ {
+ bIsPrepareSelAll = bSel;
+ }
+ sal_Bool IsPrepareSelAll() { return bIsPrepareSelAll; }
+ void SetPrepareSelAll() { bIsPrepareSelAll = sal_True; }
+ //IAccessibility2 Implementation 2009-----
void SetContainsAtPageObjWithContentAnchor( const bool bFlag )
{
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 76e24988169e..a9395dc59167 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -303,7 +303,13 @@ public:
// read by the binary filter:
virtual void UpdateLinks();
// <--
+ //IAccessibility2 Implementation 2009-----
+ virtual void setDocAccTitle( const String& rTitle );
+ virtual const String getDocAccTitle() const;
+ void setDocReadOnly( sal_Bool bReadOnly);
+ sal_Bool getDocReadOnly() const;
+ //-----IAccessibility2 Implementation 2009
::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >
GetController();
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 6c2a69c3e082..7f9d8c818957 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -54,7 +54,7 @@ class SfxPoolItem;
class SfxItemSet;
class SvxAutoCorrect;
-class SwField; // fuer Felder
+class SwField;
class SwFieldType;
class SwDDEFieldType;
class SwNewDBMgr;
@@ -256,8 +256,8 @@ public:
sal_Bool GetCurAttr( SfxItemSet& ,
const bool bMergeIndentValuesOfNumRule = false ) const;
// <--
- void SetAttr( const SfxPoolItem&, sal_uInt16 nFlags = 0 );
- void SetAttr( const SfxItemSet&, sal_uInt16 nFlags = 0 );
+ void SetAttrItem( const SfxPoolItem&, sal_uInt16 nFlags = 0 );
+ void SetAttrSet( const SfxItemSet&, sal_uInt16 nFlags = 0 );
// Setze das Attribut als neues default Attribut im Dokument.
void SetDefault( const SfxPoolItem& );
@@ -332,7 +332,6 @@ public:
// Felder
void Insert2(SwField&, const bool bForceExpandHints = false);
- SwField* GetCurFld() const;
void UpdateFlds( SwField & ); // ein einzelnes Feld
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index f5e2f6e95c79..784f0fb15919 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -312,20 +312,40 @@ public:
class SW_DLLPUBLIC SwInputField : public SwField
{
- String aContent;
- String aPText;
- String aHelp;
- String aToolTip;
- sal_uInt16 nSubType;
+ mutable String aContent;
+ String aPText;
+ String aHelp;
+ String aToolTip;
+ sal_uInt16 nSubType;
+ bool mbIsFormField;
+
+ SwFmtFld* mpFmtFld; // attribute to which the <SwInputField> belongs to
virtual String Expand() const;
virtual SwField* Copy() const;
+ // Accessing Input Field's content
+ const String& getContent() const;
+
public:
// Direkte Eingabe ueber Dialog alten Wert loeschen
- SwInputField(SwInputFieldType*, const String& rContent ,
- const String& rPrompt, sal_uInt16 nSubType = 0,
- sal_uLong nFmt = 0);
+ SwInputField(
+ SwInputFieldType* pFieldType,
+ const String& rContent,
+ const String& rPrompt,
+ sal_uInt16 nSubType = 0,
+ sal_uLong nFmt = 0,
+ bool bIsFormField = true );
+ virtual ~SwInputField();
+
+ void SetFmtFld( SwFmtFld& rFmtFld );
+ SwFmtFld* GetFmtFld();
+
+ // Providing new Input Field's content:
+ // Fill Input Field's content depending on <nSupType>.
+ void applyFieldContent( const String& rNewFieldContent );
+
+ bool isFormField() const;
virtual String GetFieldName() const;
@@ -343,9 +363,7 @@ public:
virtual String GetToolTip() const;
virtual void SetToolTip(const String & rStr);
- virtual sal_Bool isFormField() const;
-
- virtual sal_uInt16 GetSubType() const;
+ virtual sal_uInt16 GetSubType() const;
virtual void SetSubType(sal_uInt16 nSub);
virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index aef64ebc19fd..59989a526abd 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -476,6 +476,10 @@ public:
sal_uInt32 GetNumberOfSelectedObjects() const; //Liefert gleich die Anzahl der Objekte, zaehlt aber nicht die Objekte in Gruppen.
sal_Bool IsObjSelected() const;
sal_Bool IsObjSelected( const SdrObject& rObj ) const;
+ //IAccessibility2 Implementation 2009-----
+ bool IsObjSameLevelWithMarked(const SdrObject& rObj) const;
+ SdrObject* getSingleSelected() const;
+ //-----IAccessibility2 Implementation 2009
void EndTextEdit(); //Loescht ggf. das Objekt.
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 536da65ccc93..43d6d5bcd551 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -138,8 +138,18 @@ enum SwFldTypesEnum
TYP_DROPDOWN,
TYP_END
};
-
-
+//IAccessibility2 Implementation 2009-----
+enum SwAttrFieldTYpe
+{
+ ATTR_NONE,
+ ATTR_DATEFLD,
+ ATTR_TIMEFLD,
+ ATTR_PAGENUMBERFLD,
+ ATTR_PAGECOOUNTFLD,
+ ATTR_BOOKMARKFLD,
+ ATTR_SETREFATTRFLD
+};
+//-----IAccessibility2 Implementation 2009
enum SwFileNameFormat
{
FF_BEGIN,
@@ -298,6 +308,8 @@ class SW_DLLPUBLIC SwField
{
private:
mutable String m_Cache; /// #i85766# cached expansion (for clipboard)
+ bool m_bUseFieldValueCache; /// control the usage of the cached field value
+
sal_uInt16 nLang; // Immer ueber SetLanguage aendern!
sal_Bool bIsAutomaticLanguage;
sal_uInt32 nFormat;
@@ -310,7 +322,10 @@ private:
protected:
void SetFormat(sal_uInt32 nSet) {nFormat = nSet;}
- SwField(SwFieldType* pTyp, sal_uInt32 nFmt = 0, sal_uInt16 nLang = LANGUAGE_SYSTEM);
+ SwField( SwFieldType* pTyp,
+ sal_uInt32 nFmt = 0,
+ sal_uInt16 nLang = LANGUAGE_SYSTEM,
+ bool m_bUseFieldValueCache = true );
public:
virtual ~SwField();
diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
index c5a6fb8fa7d2..661cdac01ec5 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -39,15 +39,13 @@ class SwFieldType;
// ATT_FLD ***********************************
class SW_DLLPUBLIC SwFmtFld : public SfxPoolItem, public SwClient, public SfxBroadcaster
{
- friend class SwTxtFld;
friend void _InitCore();
+ SwFmtFld( sal_uInt16 nWhich ); // for default-Attibute
- SwField *pField;
- SwTxtFld* pTxtAttr; // mein TextAttribut
+ SwField* mpField;
+ SwTxtFld* mpTxtFld; // the TextAttribute
- SwFmtFld(); // das default-Attibut
- // geschuetzter CopyCtor
// @@@ copy construction allowed, but copy assignment is not? @@@
SwFmtFld& operator=(const SwFmtFld& rFld);
@@ -72,11 +70,11 @@ public:
const SwField* GetField() const
{
- return pField;
+ return mpField;
}
SwField* GetField()
{
- return pField;
+ return mpField;
}
// #111840#
@@ -87,13 +85,23 @@ public:
@attention The current field will be destroyed before setting the new field.
*/
- void SetFld(SwField * pField);
+ void SetField( SwField * pField );
+
+
+ const SwTxtFld* GetTxtFld() const
+ {
+ return mpTxtFld;
+ }
+ SwTxtFld* GetTxtFld()
+ {
+ return mpTxtFld;
+ }
+ void SetTxtFld( SwTxtFld& rTxtFld );
+ void ClearTxtFld();
- const SwTxtFld *GetTxtFld() const { return pTxtAttr; }
- SwTxtFld *GetTxtFld() { return pTxtAttr; }
void RegisterToFieldType( SwFieldType& );
- sal_Bool IsFldInDoc() const;
+ bool IsFldInDoc() const;
sal_Bool IsProtect() const;
};
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 5becae28b4a8..67fd68a1a096 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -48,11 +48,17 @@ class SW_DLLPUBLIC SwFrmFmt: public SwFmt
::com::sun::star::uno::XInterface> m_wXObject;
protected:
+ //IAccessibility2 Implementation 2009-----
+ SwFrmFmt* pCaptionFmt;
+ //-----IAccessibility2 Implementation 2009
SwFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
SwFrmFmt *pDrvdFrm, sal_uInt16 nFmtWhich = RES_FRMFMT,
const sal_uInt16* pWhichRange = 0 )
: SwFmt( rPool, pFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange),
pDrvdFrm, nFmtWhich )
+ //IAccessibility2 Implementation 2009-----
+ ,pCaptionFmt( NULL )
+ //-----IAccessibility2 Implementation 2009
{}
SwFrmFmt( SwAttrPool& rPool, const String &rFmtNm,
@@ -60,6 +66,9 @@ protected:
const sal_uInt16* pWhichRange = 0 )
: SwFmt( rPool, rFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange),
pDrvdFrm, nFmtWhich )
+ //IAccessibility2 Implementation 2009-----
+ ,pCaptionFmt( NULL )
+ //-----IAccessibility2 Implementation 2009
{}
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue );
@@ -126,6 +135,11 @@ public:
// <--
virtual String GetDescription() const;
+ //IAccessibility2 Implementation 2009-----
+ sal_Bool HasCaption() const;
+ void SetCaptionFmt(SwFrmFmt* pFmt);
+ SwFrmFmt* GetCaptionFmt() const;
+ //-----IAccessibility2 Implementation 2009
SW_DLLPRIVATE ::com::sun::star::uno::WeakReference<
::com::sun::star::uno::XInterface> const& GetXObject() const
@@ -143,6 +157,10 @@ public:
class SW_DLLPUBLIC SwFlyFrmFmt: public SwFrmFmt
{
friend class SwDoc;
+ //IAccessibility2 Implementation 2009-----
+ String msTitle;
+ String msDesc;
+ //-----IAccessibility2 Implementation 2009
// #i972:
// it stores the previous position of Prt rectangle from RequestObjectResize
diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index 97081343daf0..f5b4ce13f01f 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -33,11 +33,15 @@
#define CH_TXTATR_INWORD ((sal_Unicode)0x02)
#define CH_TXTATR_TAB ((sal_Unicode)'\t')
#define CH_TXTATR_NEWLINE ((sal_Unicode)'\n')
-#define CH_TXT_ATR_FIELDSTART ((sal_Unicode)0x04)
-#define CH_TXT_ATR_FIELDEND ((sal_Unicode)0x05)
+#define CH_TXT_ATR_INPUTFIELDSTART ((sal_Unicode)0x04)
+#define CH_TXT_ATR_INPUTFIELDEND ((sal_Unicode)0x05)
+
+#define CH_TXT_ATR_FORMELEMENT ((sal_Unicode)0x06)
+
+#define CH_TXT_ATR_FIELDSTART ((sal_Unicode)0x07)
+#define CH_TXT_ATR_FIELDEND ((sal_Unicode)0x08)
#define CH_TXT_ATR_SUBST_FIELDSTART ("[")
#define CH_TXT_ATR_SUBST_FIELDEND ("]")
-#define CH_TXT_ATR_FORMELEMENT ((sal_Unicode)0x06)
/*
* Hier kommen erst mal die enums fuer die Hints
@@ -129,7 +133,7 @@ RES_TXTATR_WITHEND_BEGIN = RES_TXTATR_BEGIN ,
RES_TXTATR_CHARFMT, // 49
RES_TXTATR_CJK_RUBY, // 50
RES_TXTATR_UNKNOWN_CONTAINER, // 51
- RES_TXTATR_DUMMY5, // 52
+ RES_TXTATR_INPUTFIELD, // 52
RES_TXTATR_WITHEND_END,
// alle TextAttribute ohne ein Ende
diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx
index 66201521dab9..51a65bd6efb5 100644
--- a/sw/inc/mdiexp.hxx
+++ b/sw/inc/mdiexp.hxx
@@ -70,5 +70,7 @@ TblChgMode GetTblChgDefaultMode();
sal_Bool JumpToSwMark( ViewShell* pVwSh, const UniString& rMark );
+// IAccessible2 Implementation
+extern void AccessibilityScrollMDI(ViewShell* pVwSh, const SwRect &, sal_uInt16 nRangeX, sal_uInt16 nRangeY, sal_Bool isLeftTop);
#endif
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index 20660278795e..6fa58cba5b3f 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -66,6 +66,9 @@ public:
const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef();
svt::EmbeddedObjectRef& GetObject();
const String& GetCurrentPersistName() const { return aName; }
+ //IAccessibility2 Implementation 2009-----
+ String GetStyleString();
+ //-----IAccessibility2 Implementation 2009
sal_Bool IsOleRef() const; //Damit das Objekt nicht unnoetig geladen werden muss.
#endif
};
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 789b41639a48..8d0b987e8fb4 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -52,7 +52,8 @@ namespace utl {
class SwTxtFmtColl;
class SwCntntFrm;
-class SwTxtFld; // Fuer GetTxtFld()
+class SwTxtFld;
+class SwTxtInputFld;
class SfxItemSet;
class SwUndoTransliterate;
@@ -92,9 +93,7 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
//Also niemals direkt zugreifen!
SwpHints *m_pSwpHints;
- // --> OD 2005-11-02 #i51089 - TUNING#
mutable SwNodeNum* mpNodeNum; // Numerierung fuer diesen Absatz
- // <--
XubString m_Text;
SwParaIdleData_Impl* m_pParaIdleData_Impl;
@@ -111,20 +110,15 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
bool m_bNotifiable;
// sal_uInt8 nOutlineLevel; //#outline level, removed by zhaojianwei.
- // --> OD 2008-11-19 #i70748#
+
bool mbEmptyListStyleSetDueToSetOutlineLevelAttr;
- // <--
- // --> OD 2008-03-27 #refactorlists#
// boolean, indicating that a <SetAttr(..)> or <ResetAttr(..)> or
// <ResetAllAttr(..)> method is running.
// Needed to avoid duplicate handling of attribute change actions.
bool mbInSetOrResetAttr;
- // <--
- // --> OD 2008-05-06 #refactorlists#
// pointer to the list, to whose the text node is added to
SwList* mpList;
- // <--
/// #i111677# cached expansion (for clipboard)
::std::auto_ptr< ::rtl::OUString > m_pNumStringCache;
@@ -184,9 +178,6 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
/** create number for this text node, if not already existing
- OD 2005-11-02 #i51089 - TUNING#
- OD 2007-10-26 #i83479# - made private
-
@return number of this node
*/
SwNodeNum* CreateNum() const;
@@ -195,6 +186,8 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
SW_DLLPRIVATE void impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet);
+ const SwTxtInputFld* GetOverlappingInputFld( const SwTxtAttr& rTxtAttr ) const;
+
public:
//Bug 120881:Modify here for Directly Page Numbering
bool HasPageNumberField();
@@ -211,9 +204,7 @@ public:
void SetAutoCompleteWordDirty( bool bNew ) const;
void SetWrong( SwWrongList* pNew, bool bDelete = true );
SwWrongList* GetWrong();
- // --> OD 2008-05-23 #i71360#
const SwWrongList* GetWrong() const;
- // <--
void SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete = true );
SwGrammarMarkUp* GetGrammarCheck();
// SMARTTAGS
@@ -252,14 +243,12 @@ public:
void GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMax, sal_uLong &rAbs,
OutputDevice* pOut = 0 ) const;
- // --> OD 2008-03-13 #refactorlists#
// overriding to handle change of certain paragraph attributes
virtual sal_Bool SetAttr( const SfxPoolItem& );
virtual sal_Bool SetAttr( const SfxItemSet& rSet );
virtual sal_Bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
virtual sal_Bool ResetAttr( const SvUShorts& rWhichArr );
virtual sal_uInt16 ResetAllAttr();
- // <--
/// insert text content
void InsertText( const XubString & rStr, const SwIndex & rIdx,
@@ -285,7 +274,7 @@ public:
refmarks, toxmarks, and metas will be ignored unless this is true
ATTENTION: setting bInclRefToxMark is only allowed from UNDO!
*/
- void RstAttr(
+ void RstTxtAttr(
const SwIndex &rIdx,
const xub_StrLen nLen,
const sal_uInt16 nWhich = 0,
@@ -310,11 +299,13 @@ public:
// setze diese Attribute am TextNode. Wird der gesamte Bereich umspannt,
// dann setze sie nur im AutoAttrSet (SwCntntNode:: SetAttr)
- sal_Bool SetAttr( const SfxItemSet& rSet,
- xub_StrLen nStt, xub_StrLen nEnd,
- const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
+ sal_Bool SetAttr(
+ const SfxItemSet& rSet,
+ const xub_StrLen nStt,
+ const xub_StrLen nEnd,
+ const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
+
// erfrage die Attribute vom TextNode ueber den Bereich
- // --> OD 2008-01-16 #newlistlevelattrs#
// Introduce 4th optional parameter <bMergeIndentValuesOfNumRule>.
// If <bMergeIndentValuesOfNumRule> == sal_True, the indent attributes of
// the corresponding list level of an applied list style is merged into
@@ -337,7 +328,6 @@ public:
void DeleteAttribute ( SwTxtAttr * const pTxtAttr );
// Aktionen auf Text und Attributen
- // --> OD 2008-11-18 #i96213#
// introduce optional parameter to control, if all attributes have to be copied.
void CopyText( SwTxtNode * const pDest,
const SwIndex &rStart,
@@ -348,7 +338,6 @@ public:
const SwIndex &rStart,
xub_StrLen nLen,
const bool bForceCopyOfAllAttrs = false );
- // <--
void CutText(SwTxtNode * const pDest,
const SwIndex & rStart, const xub_StrLen nLen);
@@ -374,8 +363,8 @@ public:
sal_Bool bFmtToTxtAttributes = sal_True );
enum GetTxtAttrMode {
- DEFAULT, /// DEFAULT: (Start < nIndex <= End)
- EXPAND, /// EXPAND : (Start <= nIndex < End)
+ DEFAULT, /// DEFAULT: (Start <= nIndex < End)
+ EXPAND, /// EXPAND : (Start < nIndex <= End)
PARENT, /// PARENT : (Start < nIndex < End)
};
@@ -387,20 +376,19 @@ public:
hints of which several may cover a single position, like
RES_TXTATR_CHARFMT, RES_TXTATR_REFMARK, RES_TXTATR_TOXMARK
*/
- SwTxtAttr *GetTxtAttrAt(xub_StrLen const nIndex, RES_TXTATR const nWhich,
- enum GetTxtAttrMode const eMode = DEFAULT) const;
- //Bug 120881:Modify here for Directly Page Numbering
- SwTxtFld *GetTxtFld( xub_StrLen const rIdx )
- { return (SwTxtFld *)GetTxtAttrAt( rIdx, RES_TXTATR_FIELD ); }
- //Bug 120881(End)
+ SwTxtAttr *GetTxtAttrAt(
+ xub_StrLen const nIndex,
+ RES_TXTATR const nWhich,
+ enum GetTxtAttrMode const eMode = DEFAULT ) const;
/** get the innermost text attributes covering position nIndex.
@param nWhich only attributes with this id are returned.
@param eMode the predicate for matching (@see GetTxtAttrMode).
*/
- ::std::vector<SwTxtAttr *> GetTxtAttrsAt(xub_StrLen const nIndex,
- RES_TXTATR const nWhich,
- enum GetTxtAttrMode const eMode = DEFAULT) const;
+ ::std::vector<SwTxtAttr *> GetTxtAttrsAt(
+ xub_StrLen const nIndex,
+ RES_TXTATR const nWhich,
+ enum GetTxtAttrMode const eMode = DEFAULT ) const;
/** get the text attribute at position nIndex which owns
the dummy character CH_TXTATR_* at that position, if one exists.
@@ -409,8 +397,13 @@ public:
attribute with given which id
@return the text attribute at nIndex of type nWhich, if it exists
*/
- SwTxtAttr *GetTxtAttrForCharAt( const xub_StrLen nIndex,
- const RES_TXTATR nWhich = RES_TXTATR_END ) const;
+ SwTxtAttr *GetTxtAttrForCharAt(
+ const xub_StrLen nIndex,
+ const RES_TXTATR nWhich = RES_TXTATR_END ) const;
+
+ SwTxtFld* GetFldTxtAttrAt(
+ const xub_StrLen nIndex,
+ const bool bIncludeInputFldAtStart = false ) const;
// Aktuelles Wort zurueckliefern
XubString GetCurWord(xub_StrLen) const;
@@ -427,8 +420,6 @@ public:
// (Methode steht im ndcopy.cxx!!)
void CopyCollFmt( SwTxtNode& rDestNd );
- //const SwNodeNum* _GetNodeNum() const { return pNdNum; }
-
//
// BEGIN OF BULLET/NUMBERING/OUTLINE STUFF:
//
@@ -461,20 +452,6 @@ public:
void UpdateOutlineState();
- /** -> #i23730#
-
- Returns if this text node may be numbered.
-
- A text node may be numbered if
- - it has no SwNodeNum
- - it has a SwNodeNum and it has a numbering rule and the according
- SwNumFmt defines a numbering type that is an enumeration.
-
- @retval sal_True this text node may be numbered
- @retval sal_False else
- */
- //sal_Bool MayBeNumbered() const;
-
/**
Notify this textnode that its numbering rule has changed.
*/
@@ -482,7 +459,6 @@ public:
/** Returns outline of numbering string
- OD 2005-11-17 #128041#
Introduce parameter <_bInclPrefixAndSuffixStrings> in order to control,
if the prefix and the suffix strings have to been included or not.
@@ -518,9 +494,7 @@ public:
*/
sal_Bool GetFirstLineOfsWithNum( short& rFirstOffset ) const;
- // --> OD 2010-01-05 #b6884103#
SwTwips GetAdditionalIndentForStartingNewList() const;
- // <--
// --> OD 2008-12-02 #i96772#
void ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpaceItem ) const;
@@ -667,15 +641,12 @@ public:
*/
bool HasVisibleNumberingOrBullet() const;
- // --> OD 2008-02-19 #refactorlists#
void SetListId( const String sListId );
String GetListId() const;
- // <--
/** Determines, if the list level indent attributes can be applied to the
paragraph.
- OD 2008-01-17 #newlistlevelattrs#
The list level indents can be applied to the paragraph under the one
of following conditions:
- the list style is directly applied to the paragraph and the paragraph
@@ -694,8 +665,6 @@ public:
/** Retrieves the list tab stop position, if the paragraph's list level defines
one and this list tab stop has to merged into the tap stops of the paragraph
- OD 2008-01-17 #newlistlevelattrs#
-
@author OD
@param nListTabStopPosition
@@ -708,8 +677,6 @@ public:
/** Retrieves the character following the list label, if the paragraph's
list level defines one.
- OD 2008-01-17 #newlistlevelattrs#
-
@author OD
@return XubString - the list tab stop position
@@ -803,8 +770,11 @@ public:
// <--
// override SwIndexReg
- virtual void Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
- const bool bNegative = false, const bool bDelete = false );
+ virtual void Update(
+ SwIndex const & rPos,
+ const xub_StrLen nChangeLen,
+ const bool bNegative = false,
+ const bool bDelete = false );
// change text to Upper/Lower/Hiragana/Katagana/...
void TransliterateText( utl::TransliterationWrapper& rTrans,
@@ -834,13 +804,9 @@ public:
void SetCountedInList( bool bCounted );
bool IsCountedInList() const;
- // --> OD 2008-03-13 #refactorlists#
-// void SyncNumberAndNumRule();
-// void UnregisterNumber();
void AddToList();
void RemoveFromList();
bool IsInList() const;
- // <--
bool IsFirstOfNumRule() const;
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 39b134305cfa..e58005f24934 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -440,7 +440,12 @@ public:
* Dokument. Die Contentframes werden aus dem entsprechenden
* Layout ausgehaengt.
*/
- void DelFrms();
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Add an input param to identify if acc table should be disposed
+ //void DelFrms();
+ void DelFrms( sal_Bool bNeedDel = sal_False, sal_Bool bIsAccTableDispose = sal_True );
+ //void DelFrms(sal_Bool bNeedDel = sal_False);//added by zlcdl for al
+ //-----IAccessibility2 Implementation 2009
/*
* liefert die Anzahl der Elemente des Inhalts des Nodes;
diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx
index a8dc3f1c7980..a122bda7fb2a 100644
--- a/sw/inc/tblsel.hxx
+++ b/sw/inc/tblsel.hxx
@@ -177,7 +177,11 @@ public:
void SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable );
void SetTableLines( const SwTable &rTable );
- void DelFrms ( SwTable &rTable );
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Add an input param to identify if acc table should be disposed
+ //void DelFrms ( SwTable &rTable );
+ void DelFrms ( SwTable &rTable,sal_Bool bAccTableDispose = sal_False );
+ //-----IAccessibility2 Implementation 2009
void MakeFrms( SwTable &rTable );
void MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber,
const sal_Bool bBehind );
diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx
index 1213fdff6360..1d7fd4b79e73 100644
--- a/sw/inc/txatbase.hxx
+++ b/sw/inc/txatbase.hxx
@@ -60,6 +60,7 @@ private:
bool m_bDontExpandStart : 1; // don't expand start at paragraph start (ruby)
bool m_bNesting : 1; // SwTxtAttrNesting
bool m_bHasDummyChar : 1; // without end + meta
+ bool m_bHasContent : 1; // text attribute with content
protected:
SwTxtAttr( SfxPoolItem& rAttr, xub_StrLen nStart );
@@ -72,6 +73,7 @@ protected:
void SetDontExpandStartAttr(bool bFlag) { m_bDontExpandStart = bFlag; }
void SetNesting(const bool bFlag) { m_bNesting = bFlag; }
void SetHasDummyChar(const bool bFlag) { m_bHasDummyChar = bFlag; }
+ void SetHasContent( const bool bFlag ) { m_bHasContent = bFlag; }
public:
@@ -83,10 +85,10 @@ public:
const xub_StrLen* GetStart() const { return & m_nStart; }
/// end position
- virtual xub_StrLen* GetEnd();
- inline const xub_StrLen* GetEnd() const;
- /// end (if available), else start
- inline const xub_StrLen* GetAnyEnd() const;
+ virtual xub_StrLen* GetEnd(); // also used to change the end position
+ inline const xub_StrLen* End() const;
+ /// end (if available), else start
+ inline const xub_StrLen* GetAnyEnd() const;
inline void SetDontExpand( bool bDontExpand );
bool DontExpand() const { return m_bDontExpand; }
@@ -99,6 +101,7 @@ public:
bool IsDontExpandStartAttr() const { return m_bDontExpandStart; }
bool IsNesting() const { return m_bNesting; }
bool HasDummyChar() const { return m_bHasDummyChar; }
+ bool HasContent() const { return m_bHasContent; }
inline const SfxPoolItem& GetAttr() const;
inline SfxPoolItem& GetAttr();
@@ -127,21 +130,20 @@ protected:
public:
SwTxtAttrEnd( SfxPoolItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
- using SwTxtAttr::GetEnd;
virtual xub_StrLen* GetEnd();
};
// --------------- Inline Implementierungen ------------------------
-inline const xub_StrLen* SwTxtAttr::GetEnd() const
+inline const xub_StrLen* SwTxtAttr::End() const
{
return const_cast<SwTxtAttr * >(this)->GetEnd();
}
inline const xub_StrLen* SwTxtAttr::GetAnyEnd() const
{
- const xub_StrLen* pEnd = GetEnd();
+ const xub_StrLen* pEnd = End();
return pEnd ? pEnd : GetStart();
}
@@ -183,8 +185,10 @@ inline const SwFmtAutoFmt& SwTxtAttr::GetAutoFmt() const
inline const SwFmtFld& SwTxtAttr::GetFmtFld() const
{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FIELD,
- "Wrong attribute" );
+ ASSERT( m_pAttr
+ && ( m_pAttr->Which() == RES_TXTATR_FIELD
+ || m_pAttr->Which() == RES_TXTATR_INPUTFIELD ),
+ "Wrong attribute" );
return (const SwFmtFld&)(*m_pAttr);
}
diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
index 48c97074275d..83ca7396ba71 100644
--- a/sw/inc/txtfld.hxx
+++ b/sw/inc/txtfld.hxx
@@ -33,44 +33,69 @@ class SwTxtNode;
class SwTxtFld : public SwTxtAttr
{
- mutable String m_aExpand;
+ mutable String m_aExpand; // only used to determine, if field content is changing in <ExpandTxtFld()>
SwTxtNode * m_pTxtNode;
public:
- SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStart);
+ SwTxtFld(
+ SwFmtFld & rAttr,
+ xub_StrLen const nStart );
+
virtual ~SwTxtFld();
- void CopyFld( SwTxtFld *pDest ) const;
- void Expand() const;
- inline void ExpandAlways();
+ void CopyTxtFld( SwTxtFld *pDest ) const;
+
+ void ExpandTxtFld() const;
+ inline void ExpandAlways()
+ {
+ m_aExpand += ' '; // changing current value to assure that <ExpandTxtFld()> changes the value.
+ ExpandTxtFld();
+ }
// get and set TxtNode pointer
- SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
- inline SwTxtNode& GetTxtNode() const;
- void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
- // enable notification that field content has changed and needs reformatting
- void NotifyContentChange(SwFmtFld& rFmtFld);
+ inline SwTxtNode* GetpTxtNode() const
+ {
+ return m_pTxtNode;
+ }
+ inline SwTxtNode& GetTxtNode() const
+ {
+ ASSERT( m_pTxtNode, "SwTxtFld:: where is my TxtNode?" );
+ return *m_pTxtNode;
+ }
+ inline void ChgTxtNode( SwTxtNode* pNew )
+ {
+ m_pTxtNode = pNew;
+ }
- // #111840#
- /**
- Returns position of this field.
+ bool IsFldInDoc() const;
+
+ // enable notification that field content has changed and needs reformatting
+ virtual void NotifyContentChange( SwFmtFld& rFmtFld );
- @return position of this field. Has to be deleted explicitly.
- */
-// SwPosition * GetPosition() const;
};
-inline SwTxtNode& SwTxtFld::GetTxtNode() const
+class SwTxtInputFld : public SwTxtFld
{
- ASSERT( m_pTxtNode, "SwTxtFld:: where is my TxtNode?" );
- return *m_pTxtNode;
-}
+public:
+ SwTxtInputFld(
+ SwFmtFld & rAttr,
+ xub_StrLen const nStart,
+ xub_StrLen const nEnd );
-inline void SwTxtFld::ExpandAlways()
-{
- m_aExpand += ' ';
- Expand();
-}
+ virtual ~SwTxtInputFld();
+
+ virtual xub_StrLen* GetEnd();
+
+ virtual void NotifyContentChange( SwFmtFld& rFmtFld );
+
+ void UpdateTextNodeContent( const String& rNewContent );
+
+ const String GetFieldContent() const;
+ void UpdateFieldContent();
+
+private:
+ xub_StrLen m_nEnd;
+};
#endif
diff --git a/sw/inc/txtrfmrk.hxx b/sw/inc/txtrfmrk.hxx
index d9620ef78911..8ad7410ade61 100644
--- a/sw/inc/txtrfmrk.hxx
+++ b/sw/inc/txtrfmrk.hxx
@@ -40,7 +40,6 @@ public:
xub_StrLen const nStart, xub_StrLen const*const pEnd = 0);
virtual xub_StrLen * GetEnd(); // SwTxtAttr
- inline const xub_StrLen * GetEnd() const { return m_pEnd; }
// get and set TxtNode pointer
inline const SwTxtNode& GetTxtNode() const;
diff --git a/sw/inc/txttxmrk.hxx b/sw/inc/txttxmrk.hxx
index 73c14166d15d..1db53e9eb8fe 100644
--- a/sw/inc/txttxmrk.hxx
+++ b/sw/inc/txttxmrk.hxx
@@ -42,7 +42,6 @@ public:
virtual ~SwTxtTOXMark();
virtual xub_StrLen *GetEnd(); // SwTxtAttr
- inline const xub_StrLen* GetEnd() const { return m_pEnd; }
void CopyTOXMark( SwDoc* pDestDoc );
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 34bb47a3510c..086dec73902e 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -351,7 +351,9 @@ public:
OutputDevice& GetRefDev() const;
inline Window* GetWin() const { return pWin; }
inline OutputDevice* GetOut() const { return pOut; }
-
+ //IAccessibility2 Implementation 2009-----
+ void SetWin(Window* win) { pWin = win; }
+ //-----IAccessibility2 Implementation 2009
static inline sal_Bool IsLstEndAction() { return ViewShell::bLstAct; }
//Andern alle PageDescriptoren
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
index 3d52b90f48e6..352f48adba4a 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -30,6 +30,7 @@
class SwCrsrShell;
class SwShellCrsr;
+class SwTxtInputFld;
// -------- Ab hier Klassen / Methoden fuer den nicht Text-Cursor ------
@@ -76,6 +77,7 @@ public:
// #i75172# predefines
namespace sdr { namespace overlay { class OverlayObject; }}
+namespace sw { namespace overlay { class OverlayRangesOutline; }}
class SwSelPaintRects : public SwRects
{
@@ -89,7 +91,6 @@ class SwSelPaintRects : public SwRects
const SwCrsrShell* pCShell;
virtual void Paint( const Rectangle& rRect );
- virtual void FillRects() = 0;
// #i75172#
sdr::overlay::OverlayObject* mpCursorOverlay;
@@ -98,10 +99,17 @@ class SwSelPaintRects : public SwRects
sdr::overlay::OverlayObject* getCursorOverlay() const { return mpCursorOverlay; }
void setCursorOverlay(sdr::overlay::OverlayObject* pNew) { mpCursorOverlay = pNew; }
+ bool mbShowTxtInputFldOverlay;
+ sw::overlay::OverlayRangesOutline* mpTxtInputFldOverlay;
+
+ void HighlightInputFld();
+
public:
SwSelPaintRects( const SwCrsrShell& rCSh );
virtual ~SwSelPaintRects();
+ virtual void FillRects() = 0;
+
// #i75172# in SwCrsrShell::CreateCrsr() the content of SwSelPaintRects is exchanged. To
// make a complete swap access to mpCursorOverlay is needed there
void swapContent(SwSelPaintRects& rSwap);
@@ -110,6 +118,11 @@ public:
void Hide();
void Invalidate( const SwRect& rRect );
+ inline void SetShowTxtInputFldOverlay( const bool bShow )
+ {
+ mbShowTxtInputFldOverlay = bShow;
+ }
+
const SwCrsrShell* GetShell() const { return pCShell; }
// check current MapMode of the shell and set possibly the static members.
// Optional set the parameters pX, pY
@@ -124,8 +137,6 @@ class SwShellCrsr : public virtual SwCursor, public SwSelPaintRects
Point aMkPt, aPtPt;
const SwPosition* pPt; // fuer Zuordung vom GetPoint() zum aPtPt
- virtual void FillRects(); // fuer Table- und normalen Crsr
-
using SwCursor::UpDown;
public:
@@ -135,6 +146,8 @@ public:
SwShellCrsr( SwShellCrsr& );
virtual ~SwShellCrsr();
+ virtual void FillRects(); // fuer Table- und normalen Crsr
+
void Show(); // Update und zeige alle Selektionen an
void Hide(); // verstecke alle Selektionen
void Invalidate( const SwRect& rRect );
@@ -182,7 +195,6 @@ class SwShellTableCrsr : public virtual SwShellCrsr, public virtual SwTableCurso
// TabellenBoxen. D.h., wird aus dem einen Array an einer Position
// etwas geloescht, dann muss es auch im anderen erfolgen!!
-
public:
SwShellTableCrsr( const SwCrsrShell& rCrsrSh, const SwPosition& rPos );
SwShellTableCrsr( const SwCrsrShell& rCrsrSh,
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
index d7f02f416a89..15532fa11a8d 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -36,6 +36,7 @@ interface BaseText
FN_INSERT_GLOSSARY // status(final|play|record)
[
ExecMethod = ExecGlossary ;
+ StateMethod = GetState ;
]
FN_TXTATR_INET // status()
@@ -138,7 +139,7 @@ interface BaseText
SID_INSERTDOC // status(final|play|rec)
[
ExecMethod = Execute ;
- StateMethod = NoState ;
+ StateMethod = GetState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
FN_INSERT_BOOKMARK // status(final|play)
@@ -242,13 +243,13 @@ interface BaseText
FN_INSERT_BREAK // status(final|play)
[
ExecMethod = ExecInsert ;
- StateMethod = NoState ;
+ StateMethod = GetState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
FN_INSERT_PAGEBREAK // status(final|play)
[
ExecMethod = ExecInsert ;
- StateMethod = NoState ;
+ StateMethod = GetState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
FN_INSERT_LINEBREAK // status(final|play)
@@ -260,19 +261,19 @@ interface BaseText
FN_INSERT_COLUMN_BREAK // status(final|play)
[
ExecMethod = ExecInsert ;
- StateMethod = NoState ;
+ StateMethod = GetState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
FN_INSERT_BREAK_DLG // status(final|play)
[
ExecMethod = Execute ;
- StateMethod = NoState ;
+ StateMethod = GetState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
SID_INSERT_AVMEDIA // status(final|play)
[
ExecMethod = ExecInsert;
- StateMethod = NoState ;
+ StateMethod = StateInsert ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
FN_INSERT_HRULER // status()
@@ -340,6 +341,7 @@ interface BaseText
FN_INSERT_HYPERLINK // status()
[
ExecMethod = Execute ;
+ StateMethod = GetState;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
SID_HYPERLINK_DIALOG
@@ -931,6 +933,7 @@ interface BaseText
FN_EXPAND_GLOSSARY // status(final|play)
[
ExecMethod = ExecGlossary ;
+ StateMethod = GetState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
FN_POSTIT // status(final|play)
diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi
index f1f0dfd60043..945d53170de7 100644
--- a/sw/sdi/_viewsh.sdi
+++ b/sw/sdi/_viewsh.sdi
@@ -641,12 +641,12 @@ interface BaseTextEditView
ExecMethod = Execute ;
StateMethod = GetState ;
]
- SID_INSERT_GRAPHIC // status(final|play)
- [
- ExecMethod = Execute ;
- StateMethod = NoState ;
- DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
- ]
+ SID_INSERT_GRAPHIC // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
SID_AUTOSPELL_CHECK
[
ExecMethod = ExecViewOptions ;
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index c70a5146e3b0..28a8bc1e2065 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -50,6 +50,14 @@
#include <limits.h>
+//IAccessibility2 Implementation 2009-----
+#include <ndtxt.hxx>
+#include <editeng/brshitem.hxx>
+#include <swatrset.hxx>
+#include <frmatr.hxx>
+#include "acctable.hxx"
+//-----IAccessibility2 Implementation 2009
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
using ::rtl::OUString;
@@ -91,6 +99,10 @@ void SwAccessibleCell::GetStates( ::utl::AccessibleStateSetHelper& rStateSet )
DBG_ASSERT( pVSh, "no shell?" );
if( dynamic_cast< const SwCrsrShell* >(pVSh) )
rStateSet.AddState( AccessibleStateType::SELECTABLE );
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Add resizable state to table cell.
+ rStateSet.AddState( AccessibleStateType::RESIZABLE );
+ //-----IAccessibility2 Implementation 2009
// SELECTED
if( IsSelected() )
@@ -105,6 +117,7 @@ void SwAccessibleCell::GetStates( ::utl::AccessibleStateSetHelper& rStateSet )
SwAccessibleCell::SwAccessibleCell( SwAccessibleMap *pInitMap,
const SwCellFrm *pCellFrm )
: SwAccessibleContext( pInitMap, AccessibleRole::TABLE_CELL, pCellFrm )
+ , aSelectionHelper( *this )
, bIsSelected( sal_False )
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -112,6 +125,13 @@ SwAccessibleCell::SwAccessibleCell( SwAccessibleMap *pInitMap,
SetName( sBoxName );
bIsSelected = IsSelected();
+
+ //IAccessibility2 Implementation 2009-----
+ //Need not assign the pointer of accessible table object to m_pAccTable,
+ //for it already done in SwAccessibleCell::GetTable(); Former codes:
+ //m_pAccTable= GetTable();
+ GetTable();
+ //-----IAccessibility2 Implementation 2009
}
sal_Bool SwAccessibleCell::_InvalidateMyCursorPos()
@@ -132,9 +152,16 @@ sal_Bool SwAccessibleCell::_InvalidateMyCursorPos()
}
sal_Bool bChanged = bOld != bNew;
+ //IAccessibility2 Implementation 2009-----
if( bChanged )
+ {
FireStateChangedEvent( AccessibleStateType::SELECTED, bNew );
-
+ if (m_pAccTable)
+ {
+ m_pAccTable->AddSelectionCell(this,bNew);
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
return bChanged;
}
@@ -158,8 +185,10 @@ sal_Bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrm *pFrm )
{
ASSERT( xAccImpl->GetFrm()->IsCellFrm(),
"table child is not a cell frame" )
- bChanged |= static_cast< SwAccessibleCell *>(
+ //IAccessibility2 Implementation 2009-----
+ bChanged = static_cast< SwAccessibleCell *>(
xAccImpl.getBodyPtr() )->_InvalidateMyCursorPos();
+ //-----IAccessibility2 Implementation 2009
}
else
bChanged = sal_True; // If the context is not know we
@@ -180,6 +209,22 @@ sal_Bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrm *pFrm )
void SwAccessibleCell::_InvalidateCursorPos()
{
+ //IAccessibility2 Implementation 2009-----
+ if (IsSelected())
+ {
+ const SwAccessibleChild aChild( GetChild( *(GetMap()), 0 ) );
+ if( aChild.IsValid() && aChild.GetSwFrm() )
+ {
+ ::vos::ORef < SwAccessibleContext > xChildImpl( GetMap()->GetContextImpl( aChild.GetSwFrm()) );
+ if(xChildImpl.isValid())
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::STATE_CHANGED;
+ aEvent.NewValue<<=AccessibleStateType::FOCUSED;
+ xChildImpl->FireAccessibleEvent( aEvent );
+ }
+ }
+ }
const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() );
ASSERT( pParent->IsTabFrm(), "parent is not a tab frame" );
@@ -189,6 +234,8 @@ void SwAccessibleCell::_InvalidateCursorPos()
while( pTabFrm )
{
+ _InvalidateChildrenCursorPos( pTabFrm );
+/*
sal_Bool bChanged = _InvalidateChildrenCursorPos( pTabFrm );
if( bChanged )
{
@@ -201,9 +248,14 @@ void SwAccessibleCell::_InvalidateCursorPos()
xAccImpl->FireAccessibleEvent( aEvent );
}
}
-
+*/
pTabFrm = pTabFrm->GetFollow();
}
+ if (m_pAccTable)
+ {
+ m_pAccTable->FireSelectionEvent();
+ }
+ //-----IAccessibility2 Implementation 2009
}
sal_Bool SwAccessibleCell::HasCursor()
@@ -274,6 +326,21 @@ void SwAccessibleCell::InvalidatePosOrSize( const SwRect& rOldBox )
uno::Any SwAccessibleCell::queryInterface( const uno::Type& rType )
throw( uno::RuntimeException )
{
+ //IAccessibility2 Implementation 2009-----
+ if (rType == ::getCppuType((const uno::Reference<XAccessibleExtendedAttributes>*)0))
+ {
+ uno::Any aR;
+ aR <<= uno::Reference<XAccessibleExtendedAttributes>(this);
+ return aR;
+ }
+
+ if (rType == ::getCppuType((const uno::Reference<XAccessibleSelection>*)0))
+ {
+ uno::Any aR;
+ aR <<= uno::Reference<XAccessibleSelection>(this);
+ return aR;
+ }
+ //-----IAccessibility2 Implementation 2009
if ( rType == ::getCppuType( static_cast< uno::Reference< XAccessibleValue > * >( 0 ) ) )
{
uno::Reference<XAccessibleValue> xValue = this;
@@ -327,7 +394,8 @@ SwFrmFmt* SwAccessibleCell::GetTblBoxFormat() const
return pCellFrm->GetTabBox()->GetFrmFmt();
}
-
+//IAccessibility2 Implementation 2009-----
+//Implement TableCell currentValue
uno::Any SwAccessibleCell::getCurrentValue( )
throw( uno::RuntimeException )
{
@@ -335,9 +403,33 @@ uno::Any SwAccessibleCell::getCurrentValue( )
CHECK_FOR_DEFUNC( XAccessibleValue );
uno::Any aAny;
- aAny <<= GetTblBoxFormat()->GetTblBoxValue().GetValue();
+
+ const SwCellFrm* pCellFrm = static_cast<const SwCellFrm*>( GetFrm() );
+ const SwStartNode *pSttNd = pCellFrm->GetTabBox()->GetSttNd();
+ if( pSttNd )
+ {
+ ::rtl::OUString strRet;
+ SwNodeIndex aCntntIdx( *pSttNd, 0 );
+ SwCntntNode* pCNd=NULL;
+ for(int nIndex = 0 ;
+ 0 != ( pCNd = pSttNd->GetNodes().GoNext( &aCntntIdx ) ) &&
+ aCntntIdx.GetIndex() < pSttNd->EndOfSectionIndex();
+ ++nIndex )
+ {
+ if(pCNd && pCNd->IsTxtNode())
+ {
+ if (0 != nIndex)
+ {
+ strRet += ::rtl::OUString::createFromAscii(" ");
+ }
+ strRet +=((SwTxtNode*)pCNd)->GetTxt();
+ }
+ }
+ aAny <<= strRet;
+ }
return aAny;
}
+//-----IAccessibility2 Implementation 2009
sal_Bool SwAccessibleCell::setCurrentValue( const uno::Any& aNumber )
throw( uno::RuntimeException )
@@ -370,3 +462,133 @@ uno::Any SwAccessibleCell::getMinimumValue( )
aAny <<= -DBL_MAX;
return aAny;
}
+
+//IAccessibility2 Implementation 2009-----
+::rtl::OUString ReplaceOneChar(::rtl::OUString oldOUString, ::rtl::OUString replacedChar, ::rtl::OUString replaceStr)
+{
+ int iReplace = -1;
+ iReplace = oldOUString.lastIndexOf(replacedChar);
+ if (iReplace > -1)
+ {
+ for(;iReplace>-1;)
+ {
+ oldOUString = oldOUString.replaceAt(iReplace,1, replaceStr);
+ iReplace=oldOUString.lastIndexOf(replacedChar,iReplace);
+ }
+ }
+ return oldOUString;
+}
+::rtl::OUString ReplaceFourChar(::rtl::OUString oldOUString)
+{
+ oldOUString = ReplaceOneChar(oldOUString,OUString::createFromAscii("\\"),OUString::createFromAscii("\\\\"));
+ oldOUString = ReplaceOneChar(oldOUString,::rtl::OUString::createFromAscii(";"),::rtl::OUString::createFromAscii("\\;"));
+ oldOUString = ReplaceOneChar(oldOUString,::rtl::OUString::createFromAscii("="),::rtl::OUString::createFromAscii("\\="));
+ oldOUString = ReplaceOneChar(oldOUString,::rtl::OUString::createFromAscii(","),::rtl::OUString::createFromAscii("\\,"));
+ oldOUString = ReplaceOneChar(oldOUString,::rtl::OUString::createFromAscii(":"),::rtl::OUString::createFromAscii("\\:"));
+ return oldOUString;
+}
+
+::com::sun::star::uno::Any SAL_CALL SwAccessibleCell::getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Any strRet;
+ SwFrmFmt *pFrmFmt = GetTblBoxFormat();
+ DBG_ASSERT(pFrmFmt,"Must be Valid");
+
+ const SwTblBoxFormula& tbl_formula = pFrmFmt->GetTblBoxFormula();
+
+ ::rtl::OUString strFormula = ReplaceFourChar(tbl_formula.GetFormula());
+ ::rtl::OUString strFor = ::rtl::OUString::createFromAscii("Formula:");
+ strFor += strFormula;
+ strFor += ::rtl::OUString::createFromAscii(";") ;
+ strRet <<= strFor;
+
+ return strRet;
+}
+
+sal_Int32 SAL_CALL SwAccessibleCell::getBackground()
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ const SvxBrushItem &rBack = GetFrm()->GetAttrSet()->GetBackground();
+ sal_uInt32 crBack = rBack.GetColor().GetColor();
+
+ if (COL_AUTO == crBack)
+ {
+ uno::Reference<XAccessible> xAccDoc = getAccessibleParent();
+ if (xAccDoc.is())
+ {
+ uno::Reference<XAccessibleComponent> xCompoentDoc(xAccDoc, uno::UNO_QUERY);
+ if (xCompoentDoc.is())
+ {
+ crBack = (sal_uInt32)xCompoentDoc->getBackground();
+ }
+ }
+ }
+ return crBack;
+}
+
+//===== XAccessibleSelection ============================================
+void SwAccessibleCell::selectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ aSelectionHelper.selectAccessibleChild(nChildIndex);
+}
+
+sal_Bool SwAccessibleCell::isAccessibleChildSelected(
+ sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ return aSelectionHelper.isAccessibleChildSelected(nChildIndex);
+}
+
+void SwAccessibleCell::clearAccessibleSelection( )
+ throw ( uno::RuntimeException )
+{
+ aSelectionHelper.clearAccessibleSelection();
+}
+
+void SwAccessibleCell::selectAllAccessibleChildren( )
+ throw ( uno::RuntimeException )
+{
+ aSelectionHelper.selectAllAccessibleChildren();
+}
+
+sal_Int32 SwAccessibleCell::getSelectedAccessibleChildCount( )
+ throw ( uno::RuntimeException )
+{
+ return aSelectionHelper.getSelectedAccessibleChildCount();
+}
+
+uno::Reference<XAccessible> SwAccessibleCell::getSelectedAccessibleChild(
+ sal_Int32 nSelectedChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ return aSelectionHelper.getSelectedAccessibleChild(nSelectedChildIndex);
+}
+
+void SwAccessibleCell::deselectAccessibleChild(
+ sal_Int32 nSelectedChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ aSelectionHelper.deselectAccessibleChild(nSelectedChildIndex);
+}
+
+SwAccessibleTable *SwAccessibleCell::GetTable()
+{
+ if (!m_pAccTable)
+ {
+ if (!xTableReference.is())
+ {
+ xTableReference = getAccessibleParent();
+ #ifdef OSL_DEBUG_LEVEL
+ uno::Reference<XAccessibleContext> xContextTable(xTableReference, uno::UNO_QUERY);
+ OSL_ASSERT(xContextTable.is() && xContextTable->getAccessibleRole() == AccessibleRole::TABLE);
+ #endif
+ //SwAccessibleTable aTable = *(static_cast<SwAccessibleTable *>(xTable.get()));
+ }
+ m_pAccTable = static_cast<SwAccessibleTable *>(xTableReference.get());
+ }
+ return m_pAccTable;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/core/access/acccell.hxx b/sw/source/core/access/acccell.hxx
index 130ae7c432d9..bc16a660a5a4 100644
--- a/sw/source/core/access/acccell.hxx
+++ b/sw/source/core/access/acccell.hxx
@@ -26,13 +26,27 @@
#include "acccontext.hxx"
#include <com/sun/star/accessibility/XAccessibleValue.hpp>
+//IAccessibility2 Implementation 2009-----
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XAccessibleExtendedAttributes_HPP_
+#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
+#endif
+
+#ifndef _ACCSELECTIONHELPER_HXX_
+#include <accselectionhelper.hxx>
+#endif
+//-----IAccessibility2 Implementation 2009
+
class SwCellFrm;
+class SwAccessibleTable;
class SwFrmFmt;
class SwAccessibleCell : public SwAccessibleContext,
- ::com::sun::star::accessibility::XAccessibleValue
-
+ ::com::sun::star::accessibility::XAccessibleValue,
+ ::com::sun::star::accessibility::XAccessibleSelection,
+ public ::com::sun::star::accessibility::XAccessibleExtendedAttributes
{
+ // Implementation for XAccessibleSelection interface
+ SwAccessibleSelectionHelper aSelectionHelper;
sal_Bool bIsSelected; // protected by base class mutex
sal_Bool IsSelected();
@@ -110,6 +124,11 @@ public:
//===== XAccessibleValue ================================================
+ //===== XAccessibleExtendedAttributes ================================================
+ //IAccessibility2 Implementation 2009-----
+ ::com::sun::star::uno::Any SAL_CALL getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ //-----IAccessibility2 Implementation 2009
private:
SwFrmFmt* GetTblBoxFormat() const;
@@ -126,6 +145,41 @@ public:
virtual ::com::sun::star::uno::Any SAL_CALL getMinimumValue( )
throw (::com::sun::star::uno::RuntimeException);
+ //IAccessibility2 Implementation 2009-----
+ //===== XAccessibleComponent ============================================
+ sal_Int32 SAL_CALL getBackground()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleSelection ============================================
+ virtual void SAL_CALL selectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Bool SAL_CALL isAccessibleChildSelected(
+ sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL clearAccessibleSelection( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL selectAllAccessibleChildren( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(
+ sal_Int32 nSelectedChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL deselectAccessibleChild(
+ sal_Int32 nSelectedChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ SwAccessibleTable *GetTable();
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xTableReference;
+ SwAccessibleTable *m_pAccTable;
+ //-----IAccessibility2 Implementation 2009
};
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index a4a0399747f7..df207e989350 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -60,6 +60,11 @@
#include <acccontext.hxx>
#include <svx/AccessibleShape.hxx>
#include <comphelper/accessibleeventnotifier.hxx>
+//IAccessibility2 Implementation 2009-----
+#ifndef _ACCPARA_HXX
+#include "accpara.hxx"
+#endif
+//-----IAccessibility2 Implementation 2009
#include <PostItMgr.hxx>
using namespace sw::access;
@@ -215,8 +220,11 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
"<SwAccessibleContext::ChildrenScrolled(..)> - always included child not considered!" );
const SwFrm* pLower( rLower.GetSwFrm() );
::vos::ORef< SwAccessibleContext > xAccImpl =
- GetMap()->GetContextImpl( pLower, SCROLLED_OUT == eAction ||
- SCROLLED_IN == eAction );
+ //IAccessibility2 Implementation 2009-----
+ //O is: GetMap()->GetContextImpl( pLower, SCROLLED_OUT == eAction ||
+ // SCROLLED_IN == eAction );
+ GetMap()->GetContextImpl( pLower, sal_True );
+ //-----IAccessibility2 Implementation 2009
if( xAccImpl.isValid() )
{
switch( eAction )
@@ -247,10 +255,15 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
ASSERT( !rLower.AlwaysIncludeAsChild(),
"<SwAccessibleContext::ChildrenScrolled(..)> - always included child not considered!" );
::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+ //IAccessibility2 Implementation 2009-----
+ //O is: GetMap()->GetContextImpl( rLower.GetSdrObject(),
+ // this,
+ // SCROLLED_OUT == eAction ||
+ // SCROLLED_IN == eAction );
GetMap()->GetContextImpl( rLower.GetDrawObject(),
this,
- SCROLLED_OUT == eAction ||
- SCROLLED_IN == eAction );
+ sal_True );
+ //-----IAccessibility2 Implementation 2009
if( xAccImpl.isValid() )
{
switch( eAction )
@@ -270,8 +283,11 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
xAccImpl->ViewForwarderChanged(
::accessibility::IAccessibleViewForwarderListener::VISIBLE_AREA,
GetMap() );
- DisposeShape( rLower.GetDrawObject(),
- xAccImpl.getBodyPtr() );
+ //IAccessibility2 Implementation 2009-----
+ //Remove
+ //DisposeShape( rLower.GetDrawObject(),
+ // xAccImpl.getBodyPtr() );
+ //-----IAccessibility2 Implementation 2009
}
break;
case NONE:
@@ -380,8 +396,11 @@ void SwAccessibleContext::ScrolledOut( const SwRect& rOldVisArea )
// the child event. In this case no listener will exist.
FireStateChangedEvent( AccessibleStateType::SHOWING, sal_False );
+ //IAccessibility2 Implementation 2009-----
+ //Remove Dispose When scrolledout
// We now dispose the frame
- Dispose( sal_True );
+ // Dispose( sal_True );
+ //-----IAccessibility2 Implementation 2009
}
// --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
@@ -517,8 +536,14 @@ void SwAccessibleContext::GetStates(
// EDITABLE
if( bIsEditableState )
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Set editable state to graphic and other object when the document is editable
+ {
rStateSet.AddState( AccessibleStateType::EDITABLE );
-
+ rStateSet.AddState( AccessibleStateType::RESIZABLE );
+ rStateSet.AddState( AccessibleStateType::MOVEABLE );
+ }
+ //-----IAccessibility2 Implementation 2009
// ENABLED
rStateSet.AddState( AccessibleStateType::ENABLED );
@@ -554,6 +579,12 @@ SwAccessibleContext::SwAccessibleContext( SwAccessibleMap *pM,
, nRole( nR )
, bDisposing( sal_False )
, bRegisteredAtAccessibleMap( true )
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Initialize the begin document load and IfAsynLoad to true
+ , bBeginDocumentLoad( sal_True )
+ , isIfAsynLoad( sal_True )
+ , bIsSeletedInDoc( sal_False)
+ //-----IAccessibility2 Implementation 2009
{
InitStates();
DBG_MSG_CD( "constructed" )
@@ -581,6 +612,11 @@ sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleChildCount( void )
vos::OGuard aGuard(Application::GetSolarMutex());
CHECK_FOR_DEFUNC( XAccessibleContext )
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Notify the frame is a document
+ if( nRole == AccessibleRole::DOCUMENT )
+ bIsAccDocUse = sal_True;
+ //-----IAccessibility2 Implementation 2009
return bDisposing ? 0 : GetChildCount( *(GetMap()) );
}
@@ -593,6 +629,12 @@ uno::Reference< XAccessible> SAL_CALL
CHECK_FOR_DEFUNC( XAccessibleContext )
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Notify the frame is a document
+ if( nRole == AccessibleRole::DOCUMENT )
+ bIsAccDocUse = sal_True;
+ //-----IAccessibility2 Implementation 2009
+
const SwAccessibleChild aChild( GetChild( *(GetMap()), nIndex ) );
if( !aChild.IsValid() )
{
@@ -608,6 +650,26 @@ uno::Reference< XAccessible> SAL_CALL
{
::vos::ORef < SwAccessibleContext > xChildImpl(
GetMap()->GetContextImpl( aChild.GetSwFrm(), !bDisposing ) );
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Send out accessible event when begin load.
+ if( bBeginDocumentLoad && nRole == AccessibleRole::DOCUMENT )
+ {
+
+ FireStateChangedEvent( AccessibleStateType::FOCUSABLE,sal_True );
+ FireStateChangedEvent( AccessibleStateType::BUSY,sal_True );
+ if( !isIfAsynLoad )
+ {
+ FireStateChangedEvent( AccessibleStateType::FOCUSED,sal_True );
+ // IA2 CWS. MT: OFFSCREEN == !SHOWING, should stay consistent
+ // FireStateChangedEvent( AccessibleStateType::OFFSCREEN,sal_True );
+ FireStateChangedEvent( AccessibleStateType::SHOWING,sal_True );
+ FireStateChangedEvent( AccessibleStateType::BUSY,sal_False );
+ // MT: OFFSCREEN again?
+ // FireStateChangedEvent( AccessibleStateType::OFFSCREEN,sal_False );
+ }
+ bBeginDocumentLoad = sal_False;
+ }
+ //-----IAccessibility2 Implementation 2009
if( xChildImpl.isValid() )
{
xChildImpl->SetParent( this );
@@ -717,6 +779,11 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
::utl::AccessibleStateSetHelper *pStateSet =
new ::utl::AccessibleStateSetHelper;
+ //IAccessibility2 Implementation 2009-----
+ if( bIsSeletedInDoc )
+ pStateSet->AddState( AccessibleStateType::SELECTED );
+ //-----IAccessibility2 Implementation 2009
+
uno::Reference<XAccessibleStateSet> xStateSet( pStateSet );
GetStates( *pStateSet );
@@ -988,13 +1055,15 @@ uno::Any SAL_CALL SwAccessibleContext::getAccessibleKeyBinding()
sal_Int32 SAL_CALL SwAccessibleContext::getForeground()
throw (uno::RuntimeException)
{
- return 0;
+ //IAccessibility2 Implementation 2009-----
+ return COL_BLACK;
+ //-----IAccessibility2 Implementation 2009
}
sal_Int32 SAL_CALL SwAccessibleContext::getBackground()
throw (uno::RuntimeException)
{
- return 0xffffff;
+ return COL_WHITE;
}
@@ -1041,6 +1110,12 @@ void SwAccessibleContext::DisposeShape( const SdrObject *pObj,
void SwAccessibleContext::ScrolledInShape( const SdrObject* ,
::accessibility::AccessibleShape *pAccImpl )
{
+ //IAccessibility2 Implementation 2009-----
+ if(NULL == pAccImpl)
+ {
+ return ;
+ }
+ //-----IAccessibility2 Implementation 2009
AccessibleEventObject aEvent;
aEvent.EventId = AccessibleEventId::CHILD;
uno::Reference< XAccessible > xAcc( pAccImpl );
@@ -1184,7 +1259,10 @@ void SwAccessibleContext::InvalidatePosOrSize( const SwRect& )
SwAccessibleChild( GetParent() ).IsVisibleChildrenOnly() )
{
// The frame is now invisible -> dispose it
- Dispose( sal_True );
+ //IAccessibility2 Implementation 2009-----
+ //Remove
+ //Dispose( sal_True );
+ //-----IAccessibility2 Implementation 2009
}
else
{
@@ -1585,3 +1663,15 @@ void lcl_SwAccessibleContext_DbgMsg( SwAccessibleContext *pThisAcc,
aStrm.Flush();
}
#endif
+//IAccessibility2 Implementation 2009-----
+sal_Bool SwAccessibleContext::SetSelectedState(sal_Bool bSeleted)
+{
+ if(bIsSeletedInDoc != bSeleted)
+ {
+ bIsSeletedInDoc = bSeleted;
+ FireStateChangedEvent( AccessibleStateType::SELECTED, bSeleted );
+ return sal_True;
+ }
+ return sal_False;
+};
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx
index e712973b7190..915a46e12627 100644
--- a/sw/source/core/access/acccontext.hxx
+++ b/sw/source/core/access/acccontext.hxx
@@ -98,6 +98,10 @@ private:
// <--
void InitStates();
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Add a member to identify the firt time that document load
+ sal_Bool bBeginDocumentLoad;
+ //-----IAccessibility2 Implementation 2009
protected:
void SetName( const ::rtl::OUString& rName ) { sName = rName; }
@@ -105,7 +109,12 @@ protected:
{
return nRole;
}
-
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Add a member to identify if the document is Asyn load.
+ sal_Bool isIfAsynLoad;
+ //This flag is used to mark the object's selected state.
+ sal_Bool bIsSeletedInDoc;
+ //-----IAccessibility2 Implementation 2009
void SetParent( SwAccessibleContext *pParent );
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> GetWeakParent() const;
@@ -172,6 +181,9 @@ protected:
public:
+ //IAccessibility2 Implementation 2009-----
+ void SetMap(SwAccessibleMap *pM){pMap = pM;}
+ //-----IAccessibility2 Implementation 2009
void FireAccessibleEvent( ::com::sun::star::accessibility::AccessibleEventObject& rEvent );
protected:
@@ -415,12 +427,15 @@ public:
{
return Select( 0, pObj, bAdd );
}
+ //IAccessibility2 Implementation 2009-----
+ //This method is used to updated the selected state and fire the selected state changed event.
+ virtual sal_Bool SetSelectedState(sal_Bool bSeleted);
+ sal_Bool IsSeletedInDoc(){ return bIsSeletedInDoc; }
+ //-----IAccessibility2 Implementation 2009
static ::rtl::OUString GetResource( sal_uInt16 nResId,
const ::rtl::OUString *pArg1 = 0,
const ::rtl::OUString *pArg2 = 0 );
-
-
};
// some heaviliy used exception support
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 83db96973a2d..fce090d5c4ac 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -45,6 +45,30 @@
#endif
#include <pagefrm.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <editeng/brshitem.hxx>
+#include <swatrset.hxx>
+#include <frmatr.hxx>
+#include "unostyle.hxx"
+#include "viewsh.hxx"
+#include "docsh.hxx"
+#include <crsrsh.hxx>
+#include "fesh.hxx"
+#include <fmtclds.hxx>
+#include <flyfrm.hxx>
+#include <colfrm.hxx>
+#include <txtfrm.hxx>
+#include <sectfrm.hxx>
+#include <section.hxx>
+#include <svx/unoapi.hxx>
+#include <swmodule.hxx>
+#include <svtools/colorcfg.hxx>
+
+#include <fmtanchr.hxx>
+#include <viewimp.hxx>
+#include <dview.hxx>
+#include <dcontact.hxx>
+//-----IAccessibility2 Implementation 2009
const sal_Char sServiceName[] = "com.sun.star.text.AccessibleTextDocumentView";
const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleDocumentView";
@@ -178,8 +202,17 @@ sal_Int32 SAL_CALL SwAccessibleDocumentBase::getAccessibleIndexInParent (void)
for( sal_Int32 i=0; i < nCount; i++ )
{
- if( xAcc->getAccessibleChild( i ) == xThis )
- return i;
+ //IAccessibility2 Implementation 2009-----
+ try
+ {
+ if( xAcc->getAccessibleChild( i ) == xThis )
+ return i;
+ }
+ catch(::com::sun::star::lang::IndexOutOfBoundsException e)
+ {
+ return -1L;
+ }
+ //-----IAccessibility2 Implementation 2009
}
return -1L;
}
@@ -190,20 +223,62 @@ OUString SAL_CALL SwAccessibleDocumentBase::getAccessibleDescription (void)
return GetResource( STR_ACCESS_DOC_DESC );
}
+//IAccessibility2 Implementation 2009-----
+OUString SAL_CALL SwAccessibleDocumentBase::getAccessibleName (void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ OUString sAccName = GetResource( STR_ACCESS_DOC_WORDPROCESSING );
+ SwDoc *pDoc = GetShell()->GetDoc();
+ if ( pDoc )
+ {
+ OUString sFileName = pDoc->getDocAccTitle();
+ if ( !sFileName.getLength() )
+ {
+ SwDocShell* pDocSh = pDoc->GetDocShell();
+ if ( pDocSh )
+ {
+ sFileName = pDocSh->GetTitle( SFX_TITLE_APINAME );
+ }
+ }
+ OUString sReadOnly;
+ if(pDoc->getDocReadOnly())
+ {
+ sReadOnly = GetResource( STR_ACCESS_DOC_WORDPROCESSING_READONLY );
+ }
+
+ if ( sFileName.getLength() )
+ {
+ sAccName = sFileName + sReadOnly + OUString(RTL_CONSTASCII_USTRINGPARAM(" - ")) + sAccName;
+ }
+ }
+
+ return sAccName;
+}
+//-----IAccessibility2 Implementation 2009
+
awt::Rectangle SAL_CALL SwAccessibleDocumentBase::getBounds()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ //IAccessibility2 Implementation 2009-----
+ try
+ {
+ vos::OGuard aGuard(Application::GetSolarMutex());
- Window *pWin = GetWindow();
+ Window *pWin = GetWindow();
- CHECK_FOR_WINDOW( XAccessibleComponent, pWin )
+ CHECK_FOR_WINDOW( XAccessibleComponent, pWin )
- Rectangle aPixBounds( pWin->GetWindowExtentsRelative( pWin->GetAccessibleParentWindow() ) );
- awt::Rectangle aBox( aPixBounds.Left(), aPixBounds.Top(),
- aPixBounds.GetWidth(), aPixBounds.GetHeight() );
+ Rectangle aPixBounds( pWin->GetWindowExtentsRelative( pWin->GetAccessibleParentWindow() ) );
+ awt::Rectangle aBox( aPixBounds.Left(), aPixBounds.Top(),
+ aPixBounds.GetWidth(), aPixBounds.GetHeight() );
- return aBox;
+ return aBox;
+ }
+ catch(::com::sun::star::lang::IndexOutOfBoundsException e)
+ {
+ return awt::Rectangle();
+ }
+ //-----IAccessibility2 Implementation 2009
}
@@ -303,6 +378,9 @@ void SwAccessibleDocument::GetStates(
// MULTISELECTABLE
rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE );
+ //IAccessibility2 Implementation 2009-----
+ rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS );
+ //-----IAccessibility2 Implementation 2009
}
@@ -424,6 +502,24 @@ uno::Any SwAccessibleDocument::queryInterface(
uno::Reference<XAccessibleSelection> aSelect = this;
aRet <<= aSelect;
}
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Add XEventListener interface support.
+ else if ( (rType == ::getCppuType((uno::Reference<com::sun::star::document::XEventListener> *)NULL)) )
+ {
+ uno::Reference<com::sun::star::document::XEventListener> aSelect = this;
+ aRet <<= aSelect;
+ }
+ else if ( rType == ::getCppuType((uno::Reference<XAccessibleExtendedAttributes> *)NULL) )
+ {
+ uno::Reference<XAccessibleExtendedAttributes> aAttribute = this;
+ aRet <<= aAttribute;
+ }
+ else if(rType == ::getCppuType((uno::Reference<XAccessibleGetAccFlowTo> *)NULL) )
+ {
+ uno::Reference<XAccessibleGetAccFlowTo> AccFlowTo = this;
+ aRet <<= AccFlowTo;
+ }
+ //-----IAccessibility2 Implementation 2009
else
aRet = SwAccessibleContext::queryInterface( rType );
return aRet;
@@ -436,11 +532,16 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleDocument::getTypes()
uno::Sequence< uno::Type > aTypes( SwAccessibleDocumentBase::getTypes() );
sal_Int32 nIndex = aTypes.getLength();
- aTypes.realloc( nIndex + 1 );
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Reset types memory alloc
+ //aTypes.realloc( nIndex + 1 );
+ aTypes.realloc( nIndex + 2 );
uno::Type* pTypes = aTypes.getArray();
pTypes[nIndex] = ::getCppuType( static_cast< uno::Reference< XAccessibleSelection > * >( 0 ) );
-
+ //Solution:Add XEventListener interface support.
+ pTypes[nIndex + 1 ] = ::getCppuType( static_cast< uno::Reference< com::sun::star::document::XEventListener > * >( 0 ) );
+ //-----IAccessibility2 Implementation 2009
return aTypes;
}
@@ -510,3 +611,418 @@ void SwAccessibleDocument::deselectAccessibleChild(
{
maSelectionHelper.deselectAccessibleChild( nChildIndex );
}
+//IAccessibility2 Implementation 2009-----
+//Solution:Implement XEventListener interfaces
+void SAL_CALL SwAccessibleDocument::notifyEvent( const ::com::sun::star::document::EventObject& Event )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ if ( Event.EventName.equalsAscii( "FirstPageShows" ) )
+ {
+ FireStateChangedEvent( AccessibleStateType::FOCUSED,sal_True );
+ }
+ else if ( Event.EventName.equalsAscii( "LoadFinished" ) )
+ {
+ // IA2 CWS. MT: OFFSCREEN == !SHOWING, should stay consistent
+ // FireStateChangedEvent( AccessibleStateType::OFFSCREEN,sal_True );
+ // MT: LoadFinished => Why not SHOWING == TRUE?
+ FireStateChangedEvent( AccessibleStateType::SHOWING,sal_False );
+ }
+ else if ( Event.EventName.equalsAscii( "FormatFinished" ) )
+ {
+ FireStateChangedEvent( AccessibleStateType::BUSY,sal_False );
+ // FireStateChangedEvent( AccessibleStateType::OFFSCREEN,sal_False );
+ FireStateChangedEvent( AccessibleStateType::SHOWING,sal_True );
+ }
+ else
+ {
+ isIfAsynLoad = sal_False;
+ }
+}
+
+void SAL_CALL SwAccessibleDocument::disposing( const ::com::sun::star::lang::EventObject& )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+}
+
+uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ uno::Any anyAtrribute;
+ SwDoc *pDoc = GetShell()->GetDoc();
+
+ if (!pDoc)
+ return anyAtrribute;
+ SwCrsrShell* pCrsrShell = GetCrsrShell();
+ if( !pCrsrShell )
+ return anyAtrribute;
+
+ SwFEShell* pFEShell = dynamic_cast< SwFEShell* >(pCrsrShell);
+ rtl::OUString sAttrName;
+ rtl::OUString sValue;
+ sal_uInt16 nPage, nLogPage;
+ String sDisplay;
+
+ if( pFEShell )
+ {
+ pFEShell->GetPageNumber(-1,sal_True,nPage,nLogPage,sDisplay);
+ sAttrName = rtl::OUString::createFromAscii("page-name:");
+
+
+ sValue = sAttrName + sDisplay ;
+ sAttrName = rtl::OUString::createFromAscii(";page-number:");
+ sValue += sAttrName;
+ sValue += String::CreateFromInt32( nPage ) ;
+ sAttrName = rtl::OUString::createFromAscii(";total-pages:");
+ sValue += sAttrName;
+ sValue += String::CreateFromInt32( pCrsrShell->GetPageCnt() ) ;
+ sValue += rtl::OUString::createFromAscii(";");
+
+
+ sAttrName=rtl::OUString::createFromAscii("line-number:");
+
+
+
+ SwCntntFrm* pCurrFrm = pCrsrShell->GetCurrFrm();
+ SwPageFrm* pCurrPage=((SwFrm*)pCurrFrm)->FindPageFrm();
+ sal_uLong nLineNum = 0;
+ //IAccessibility2 Implementation 2009-----
+ SwTxtFrm* pTxtFrm = NULL;
+ SwTxtFrm* pCurrTxtFrm = NULL;
+ pTxtFrm = static_cast< SwTxtFrm* >(static_cast< SwPageFrm* > (pCurrPage)->ContainsCntnt());
+ if (pCurrFrm->IsInFly())//such as, graphic,chart
+ {
+ SwFlyFrm *pFlyFrm = pCurrFrm->FindFlyFrm();
+ const SwFmtAnchor& rAnchor = pFlyFrm->GetFmt()->GetAnchor();
+ RndStdIds eAnchorId = rAnchor.GetAnchorId();
+ if(eAnchorId == FLY_AS_CHAR)
+ {
+ const SwFrm *pSwFrm = pFlyFrm->GetAnchorFrm();
+ if(pSwFrm->IsTxtFrm())
+ pCurrTxtFrm = ((SwTxtFrm*)(pSwFrm));
+ }
+ }
+ else
+ pCurrTxtFrm = static_cast< SwTxtFrm* >(pCurrFrm);
+ //check whether the text frame where the Graph/OLE/Frame anchored is in the Header/Footer
+ SwFrm* pFrm = pCurrTxtFrm;
+ while ( pFrm && !pFrm->IsHeaderFrm() && !pFrm->IsFooterFrm() )
+ pFrm = pFrm->GetUpper();
+ if ( pFrm )
+ pCurrTxtFrm = NULL;
+ //check shape
+ if(pCrsrShell->Imp()->GetDrawView())
+ {
+ const SdrObjectVector aSdrObjectVector(pCrsrShell->Imp()->GetDrawView()->getSelectedSdrObjectVectorFromSdrMarkView());
+
+ for(sal_uInt32 i(0); i < aSdrObjectVector.size(); ++i )
+ {
+ SdrObject* pObj = aSdrObjectVector[i];
+
+ // replace formally used 'GetUserCall()' by new notify/listener mechanism
+ const SwDrawContact* pContact = static_cast< const SwDrawContact* >(findConnectionToSdrObject(pObj));
+
+ const SwFrmFmt* pFmt = pContact->GetFmt();
+ const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
+ if( FLY_AS_CHAR != rAnchor.GetAnchorId() )
+ pCurrTxtFrm = NULL;
+ }
+ }
+ //calculate line number
+ if (pCurrTxtFrm && pTxtFrm)
+ {
+ if (!(pCurrTxtFrm->IsInTab() || pCurrTxtFrm->IsInFtn()))
+ {
+ while( pTxtFrm != pCurrTxtFrm )
+ {
+ //check header/footer
+ pFrm = pTxtFrm;
+ while ( pFrm && !pFrm->IsHeaderFrm() && !pFrm->IsFooterFrm() )
+ pFrm = pFrm->GetUpper();
+ if ( pFrm )
+ {
+ pTxtFrm = static_cast< SwTxtFrm*>(pTxtFrm->GetNextCntntFrm());
+ continue;
+ }
+ if (!(pTxtFrm->IsInTab() || pTxtFrm->IsInFtn() || pTxtFrm->IsInFly()))
+ nLineNum += pTxtFrm->GetThisLines();
+ pTxtFrm = static_cast< SwTxtFrm* >(pTxtFrm ->GetNextCntntFrm());
+ }
+ SwPaM* pCaret = pCrsrShell->GetCrsr();
+ if (!pCurrTxtFrm->IsEmpty() && pCaret)
+ {
+ sal_uInt16 nActPos = 0;
+ if (pCurrTxtFrm->IsTxtFrm())
+ {
+ const SwPosition* pPoint = NULL;
+ if(pCurrTxtFrm->IsInFly())
+ {
+ SwFlyFrm *pFlyFrm = pCurrTxtFrm->FindFlyFrm();
+ const SwFmtAnchor& rAnchor = pFlyFrm->GetFmt()->GetAnchor();
+ pPoint= rAnchor.GetCntntAnchor();
+ }
+ else
+ pPoint = pCaret->GetPoint();
+ nActPos = pPoint->nContent.GetIndex();
+ nLineNum += pCurrTxtFrm->GetLineCount( nActPos );
+ }
+ else//graphic, form, shape, etc.
+ {
+ SwPosition* pPoint = pCaret->GetPoint();
+ Point aPt = pCrsrShell->_GetCrsr()->GetPtPos();
+ if( pCrsrShell->GetLayout()->GetCrsrOfst( pPoint, aPt/*,* &eTmpState*/ ) )
+ {
+ nActPos = pPoint->nContent.GetIndex();
+ nLineNum += pCurrTxtFrm->GetLineCount( nActPos );
+ }
+ }
+ }
+ else
+ ++nLineNum;
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
+
+ sValue += sAttrName;
+ sValue += String::CreateFromInt32( nLineNum ) ;
+
+ sValue += rtl::OUString::createFromAscii(";");
+
+
+ SwFrm* pCurrCol=((SwFrm*)pCurrFrm)->FindColFrm();
+
+ sAttrName=rtl::OUString::createFromAscii("column-number:");
+ sValue += sAttrName;
+
+ sal_uInt16 nCurrCol = 1;
+ if(pCurrCol!=NULL)
+ {
+ //SwLayoutFrm* pParent = pCurrCol->GetUpper();
+ SwFrm* pCurrPageCol=((SwFrm*)pCurrFrm)->FindColFrm();
+ while(pCurrPageCol && pCurrPageCol->GetUpper() && pCurrPageCol->GetUpper()->IsPageFrm())
+ {
+ pCurrPageCol = pCurrPageCol->GetUpper();
+ }
+
+ SwLayoutFrm* pParent = (SwLayoutFrm*)(pCurrPageCol->GetUpper());
+
+ if(pParent!=NULL)
+ {
+ SwFrm* pCol = pParent->Lower();
+ while(pCol&&(pCol!=pCurrPageCol))
+ {
+ pCol = pCol->GetNext();
+ nCurrCol +=1;
+ }
+ }
+ }
+ sValue += String::CreateFromInt32( nCurrCol ) ;
+ sValue += rtl::OUString::createFromAscii(";");
+
+ sAttrName=rtl::OUString::createFromAscii("total-columns:");
+
+ const SwFmtCol &rFmtCol=pCurrPage->GetAttrSet()->GetCol();
+ sal_uInt16 nColCount=rFmtCol.GetNumCols();
+ nColCount = nColCount>0?nColCount:1;
+ sValue += sAttrName;
+ sValue += String::CreateFromInt32( nColCount ) ;
+
+ sValue += rtl::OUString::createFromAscii(";");
+
+ if(pCurrFrm!=NULL)
+ {
+ SwSectionFrm* pCurrSctFrm=((SwFrm*)pCurrFrm)->FindSctFrm();
+ if(pCurrSctFrm!=NULL && pCurrSctFrm->GetSection()!=NULL )
+ {
+ sAttrName = rtl::OUString::createFromAscii("section-name:");
+
+ sValue += sAttrName;
+ String sectionName = pCurrSctFrm->GetSection()->GetSectionName();
+
+ sectionName.SearchAndReplace( String::CreateFromAscii( "\\" ), String::CreateFromAscii("\\\\" ));
+ sectionName.SearchAndReplace( String::CreateFromAscii( "=" ), String::CreateFromAscii("\\=" ) );
+ sectionName.SearchAndReplace( String::CreateFromAscii( ";" ), String::CreateFromAscii("\\;" ) );
+ sectionName.SearchAndReplace( String::CreateFromAscii( "," ), String::CreateFromAscii("\\," ) );
+ sectionName.SearchAndReplace( String::CreateFromAscii( ":" ), String::CreateFromAscii("\\:" ) );
+
+ sValue += sectionName;
+ //sValue += pCurrSctFrm->GetSection()->GetName();
+
+ sValue += rtl::OUString::createFromAscii(";");
+
+ //section-columns-number
+ {
+ sAttrName=rtl::OUString::createFromAscii("section-columns-number:");
+
+ nCurrCol = 1;
+
+ if(pCurrCol!=NULL)
+ {
+ SwLayoutFrm* pParent = pCurrCol->GetUpper();
+ if(pParent!=NULL)
+ {
+ SwFrm* pCol = pParent->Lower();
+ while(pCol&&(pCol!=pCurrCol))
+ {
+ pCol = pCol->GetNext();
+ nCurrCol +=1;
+ }
+ }
+ }
+ sValue += sAttrName;
+ sValue += String::CreateFromInt32( nCurrCol ) ;
+ sValue += rtl::OUString::createFromAscii(";");
+ }
+
+ //section-total-columns
+ {
+ sAttrName=rtl::OUString::createFromAscii("section-total-columns:");
+ const SwFmtCol &rFmtSctCol=pCurrSctFrm->GetAttrSet()->GetCol();
+ sal_uInt16 nSctColCount=rFmtSctCol.GetNumCols();
+ nSctColCount = nSctColCount>0?nSctColCount:1;
+ sValue += sAttrName;
+ sValue += String::CreateFromInt32( nSctColCount ) ;
+
+ sValue += rtl::OUString::createFromAscii(";");
+ }
+ }
+ }
+ anyAtrribute <<= sValue;
+ }
+ return anyAtrribute;
+}
+
+sal_Int32 SAL_CALL SwAccessibleDocument::getBackground()
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ //IAccessibility2 Implementation 2009-----
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ return SW_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor;
+ //-----IAccessibility2 Implementation 2009
+}
+
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+ SAL_CALL SwAccessibleDocument::get_AccFlowTo(const ::com::sun::star::uno::Any& rAny, sal_Int32 nType)
+ throw ( ::com::sun::star::uno::RuntimeException )
+{
+ const sal_Int32 FORSPELLCHECKFLOWTO = 1;
+ const sal_Int32 FORFINDREPLACEFLOWTO = 2;
+ SwAccessibleMap* pAccMap = GetMap();
+ if ( !pAccMap )
+ {
+ goto Rt;
+ }
+
+ if ( nType == FORSPELLCHECKFLOWTO )
+ {
+ uno::Reference< ::com::sun::star::drawing::XShape > xShape;
+ rAny >>= xShape;
+ if( xShape.is() )
+ {
+ SdrObject* pObj = GetSdrObjectFromXShape(xShape);
+ if( pObj )
+ {
+ uno::Reference<XAccessible> xAcc = pAccMap->GetContext(pObj, this, sal_False);
+ uno::Reference < XAccessibleSelection > xAccSelection( xAcc, uno::UNO_QUERY );
+ if ( xAccSelection.is() )
+ {
+ try
+ {
+ if ( xAccSelection->getSelectedAccessibleChildCount() )
+ {
+ uno::Reference < XAccessible > xSel = xAccSelection->getSelectedAccessibleChild( 0 );
+ if ( xSel.is() )
+ {
+ uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() );
+ if ( xSelContext.is() )
+ {
+ //if in sw we find the selected paragraph here
+ if ( xSelContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
+ {
+ uno::Sequence<uno::Any> aRet( 1 );
+ aRet[0] = uno::makeAny( xSel );
+ return aRet;
+ }
+ }
+ }
+ }
+ }
+ catch ( com::sun::star::lang::IndexOutOfBoundsException )
+ {
+ //return empty sequence
+ goto Rt;
+ }
+ //end of try...catch
+ }
+ /*uno::Sequence< uno::Any > aRet(1);
+ aRet[0] = uno::makeAny( xAcc );
+ return aRet;*/
+ }
+ }
+ else
+ {
+ uno::Reference< XAccessible > xAcc = pAccMap->GetCursorContext();
+ SwAccessibleContext *pAccImpl = static_cast< SwAccessibleContext *>( xAcc.get() );
+ if ( pAccImpl && pAccImpl->getAccessibleRole() == AccessibleRole::PARAGRAPH )
+ {
+ uno::Sequence< uno::Any > aRet(1);
+ aRet[0] = uno::makeAny( xAcc );
+ return aRet;
+ }
+ }
+ }
+ else if ( nType == FORFINDREPLACEFLOWTO )
+ {
+ SwCrsrShell* pCrsrShell = GetCrsrShell();
+ if ( pCrsrShell )
+ {
+ SwPaM *_pStartCrsr = pCrsrShell->GetCrsr(), *__pStartCrsr = _pStartCrsr;
+ SwCntntNode* pPrevNode = NULL;
+ std::vector<SwFrm*> vFrmList;
+ do
+ {
+ if ( _pStartCrsr && _pStartCrsr->HasMark() )
+ {
+ SwCntntNode* pCntntNode = _pStartCrsr->GetCntntNode();
+ if ( pCntntNode == pPrevNode )
+ {
+ continue;
+ }
+ SwFrm* pFrm = pCntntNode ? pCntntNode->getLayoutFrm( pCrsrShell->GetLayout() ) : NULL;
+ if ( pFrm )
+ {
+ vFrmList.push_back( pFrm );
+ }
+
+ pPrevNode = pCntntNode;
+ }
+ }
+
+ while( _pStartCrsr && ( (_pStartCrsr=(SwPaM *)_pStartCrsr->GetNext()) != __pStartCrsr) );
+
+ if ( vFrmList.size() )
+ {
+ uno::Sequence< uno::Any > aRet(vFrmList.size());
+ std::vector<SwFrm*>::iterator aIter = vFrmList.begin();
+ for ( sal_Int32 nIndex = 0; aIter != vFrmList.end(); aIter++, nIndex++ )
+ {
+ uno::Reference< XAccessible > xAcc = pAccMap->GetContext(*aIter, sal_False);
+ if ( xAcc.is() )
+ {
+ SwAccessibleContext *pAccImpl = static_cast< SwAccessibleContext *>( xAcc.get() );
+ if ( pAccImpl && pAccImpl->getAccessibleRole() == AccessibleRole::PARAGRAPH )
+ {
+ aRet[nIndex] = uno::makeAny( xAcc );
+ }
+ }
+ }
+
+ return aRet;
+ }
+ }
+ }
+
+Rt:
+ uno::Sequence< uno::Any > aEmpty;
+ return aEmpty;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/core/access/accdoc.hxx b/sw/source/core/access/accdoc.hxx
index a8ae434256bf..24a0e75f7203 100644
--- a/sw/source/core/access/accdoc.hxx
+++ b/sw/source/core/access/accdoc.hxx
@@ -26,8 +26,19 @@
#include "acccontext.hxx"
#endif
#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/document/XEventListener.hpp>
#include <accselectionhelper.hxx>
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XAccessibleExtendedAttributes_HPP_
+#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEGETACCFLOWTO_HPP_
+#include <com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp>
+#endif
+//-----IAccessibility2 Implementation 2009
+
class VclSimpleEvent;
/**
@@ -81,6 +92,9 @@ public:
/// Return this object's description.
virtual ::rtl::OUString SAL_CALL
getAccessibleDescription (void) throw (com::sun::star::uno::RuntimeException);
+ //IAccessibility2 Implementation 2009-----
+ virtual ::rtl::OUString SAL_CALL getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException);
+ //-----IAccessibility2 Implementation 2009
//===== XAccessibleComponent ==============================================
virtual sal_Bool SAL_CALL containsPoint(
@@ -111,7 +125,12 @@ public:
* access to an accessible Writer document
*/
class SwAccessibleDocument : public SwAccessibleDocumentBase,
- public com::sun::star::accessibility::XAccessibleSelection
+ public com::sun::star::accessibility::XAccessibleSelection,
+ //IAccessibility2 Implementation 2009-----
+ public com::sun::star::document::XEventListener,
+ public com::sun::star::accessibility::XAccessibleExtendedAttributes,
+ //-----IAccessibility2 Implementation 2009
+ public com::sun::star::accessibility::XAccessibleGetAccFlowTo
{
// Implementation for XAccessibleSelection interface
SwAccessibleSelectionHelper maSelectionHelper;
@@ -129,6 +148,13 @@ public:
SwAccessibleDocument( SwAccessibleMap* pInitMap );
DECL_LINK( WindowChildEventListener, VclSimpleEvent* );
+ //IAccessibility2 Implementation 2009-----
+ //===== XEventListener====================================================
+ virtual void SAL_CALL notifyEvent( const ::com::sun::star::document::EventObject& Event )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Event )
+ throw (::com::sun::star::uno::RuntimeException);
+ //-----IAccessibility2 Implementation 2009
//===== XServiceInfo ====================================================
@@ -199,10 +225,23 @@ public:
throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
::com::sun::star::uno::RuntimeException );
+ //IAccessibility2 Implementation 2009-----
+ virtual ::com::sun::star::uno::Any SAL_CALL getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
//====== thread safe C++ interface ========================================
// The object is not visible an longer and should be destroyed
virtual void Dispose( sal_Bool bRecursive = sal_False );
+
+ //===== XAccessibleComponent ============================================
+ sal_Int32 SAL_CALL getBackground()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleGetAccFlowTo ============================================
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+ SAL_CALL get_AccFlowTo(const ::com::sun::star::uno::Any& rAny, sal_Int32 nType)
+ throw ( ::com::sun::star::uno::RuntimeException );
+ //-----IAccessibility2 Implementation 2009
};
#endif
diff --git a/sw/source/core/access/accembedded.cxx b/sw/source/core/access/accembedded.cxx
index a3efadcd726a..48a123f1bcf7 100644
--- a/sw/source/core/access/accembedded.cxx
+++ b/sw/source/core/access/accembedded.cxx
@@ -31,6 +31,14 @@
#include <rtl/uuid.h>
#include <flyfrm.hxx>
#include "accembedded.hxx"
+//IAccessibility2 Implementation 2009-----
+#include "cntfrm.hxx"
+#include "ndole.hxx"
+#include <doc.hxx>
+#include <docsh.hxx>
+#include <../../ui/inc/wrtsh.hxx>
+#include <../../ui/inc/view.hxx>
+//-----IAccessibility2 Implementation 2009
using namespace ::com::sun::star;
using namespace ::com::sun::star::lang;
@@ -51,6 +59,34 @@ SwAccessibleEmbeddedObject::~SwAccessibleEmbeddedObject()
{
}
+//IAccessibility2 Implementation 2009-----
+//===== XInterface ==========================================================
+com::sun::star::uno::Any SAL_CALL
+ SwAccessibleEmbeddedObject::queryInterface (const com::sun::star::uno::Type & rType)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Any aReturn = SwAccessibleNoTextFrame::queryInterface (rType);
+ if ( ! aReturn.hasValue())
+ aReturn = ::cppu::queryInterface (rType,
+ static_cast< ::com::sun::star::accessibility::XAccessibleExtendedAttributes* >(this) );
+ return aReturn;
+}
+
+void SAL_CALL
+ SwAccessibleEmbeddedObject::acquire (void)
+ throw ()
+{
+ SwAccessibleNoTextFrame::acquire ();
+}
+
+void SAL_CALL
+ SwAccessibleEmbeddedObject::release (void)
+ throw ()
+{
+ SwAccessibleNoTextFrame::release ();
+}
+//-----IAccessibility2 Implementation 2009
+
OUString SAL_CALL SwAccessibleEmbeddedObject::getImplementationName()
throw( uno::RuntimeException )
{
@@ -91,3 +127,31 @@ uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleEmbeddedObject::getImplementation
}
return aId;
}
+//IAccessibility2 Implementation 2009-----
+//===== XAccessibleExtendedAttributes ========================================================
+::com::sun::star::uno::Any SAL_CALL SwAccessibleEmbeddedObject::getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Any strRet;
+ ::rtl::OUString style;
+ SwFlyFrm* pFFrm = getFlyFrm();
+
+ if( pFFrm )
+ {
+ style = ::rtl::OUString::createFromAscii("style:");
+ SwCntntFrm* pCFrm;
+ pCFrm = pFFrm->ContainsCntnt();
+ if( pCFrm )
+ {
+ SwCntntNode* pCNode = pCFrm->GetNode();
+ if( pCNode )
+ {
+ style += ((SwOLENode*)pCNode)->GetOLEObj().GetStyleString();
+ }
+ }
+ style += ::rtl::OUString::createFromAscii(";");
+ }
+ strRet <<= style;
+ return strRet;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/core/access/accembedded.hxx b/sw/source/core/access/accembedded.hxx
index f18ef2e1ec35..9347b16e1a58 100644
--- a/sw/source/core/access/accembedded.hxx
+++ b/sw/source/core/access/accembedded.hxx
@@ -24,7 +24,12 @@
#define _ACCEMBEDDED_HXX
#include "accnotextframe.hxx"
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
+//-----IAccessibility2 Implementation 2009
class SwAccessibleEmbeddedObject : public SwAccessibleNoTextFrame
+ , public ::com::sun::star::accessibility::XAccessibleExtendedAttributes
+
{
protected:
@@ -36,6 +41,21 @@ public:
SwAccessibleEmbeddedObject( SwAccessibleMap* pInitMap,
const SwFlyFrm* pFlyFrm );
+ //IAccessibility2 Implementation 2009-----
+ //===== 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 (void)
+ throw ();
+
+ virtual void SAL_CALL
+ release (void)
+ throw ();
+ //-----IAccessibility2 Implementation 2009
//===== XServiceInfo ====================================================
/** Returns an identifier for the implementation of this object.
@@ -59,6 +79,12 @@ public:
//===== XTypeProvider ====================================================
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //IAccessibility2 Implementation 2009-----
+ // ====== XAccessibleExtendedAttributes =====================================
+ virtual ::com::sun::star::uno::Any SAL_CALL getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ //-----IAccessibility2 Implementation 2009
};
diff --git a/sw/source/core/access/accfield.cxx b/sw/source/core/access/accfield.cxx
new file mode 100644
index 000000000000..8aa79f29c497
--- /dev/null
+++ b/sw/source/core/access/accfield.cxx
@@ -0,0 +1,348 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+#ifndef COMPHELPER_ACCESSIBLE_KEYBINDING_HELPER_HXX
+#include <comphelper/accessiblekeybindinghelper.hxx>
+#endif
+#ifndef _SWURL_HXX //autogen
+#include <swurl.hxx>
+#endif
+#ifndef _VOS_MUTEX_HXX_ //autogen
+#include <vos/mutex.hxx>
+#endif
+#ifndef _SV_SVAPP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _NDTXT_HXX
+#include <ndtxt.hxx>
+#endif
+#ifndef _TXTINET_HXX
+#include <txtinet.hxx>
+#endif
+
+#ifndef _ACCPARA_HXX
+#include <accpara.hxx>
+#endif
+#ifndef _ACCFIELD_HXX
+#include <accfield.hxx>
+#endif
+
+#include <comphelper/processfactory.hxx>
+
+#ifndef _COM_SUN_STAR_FRAME_XDESKTOP_HPP_
+#include <com/sun/star/frame/XDesktop.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DOCUMENT_XLINKTARGETSUPPLIER_HPP_
+#include <com/sun/star/document/XLinkTargetSupplier.hpp>
+#endif
+#ifndef COMPHELPER_ACCESSIBLE_EVENT_NOTIFIER
+#include <comphelper/accessibleeventnotifier.hxx>
+#endif
+
+//Add end
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::accessibility;
+// using namespace ::rtl;
+
+SwAccessibleField::SwAccessibleField( SwField *pSwFld,SwAccessibleParagraph *p,sal_Int16 nRole) :
+ m_xPara( p ),m_pSwField(pSwFld),m_nRole(nRole)
+{
+ m_nClientId=0;
+}
+
+uno::Reference< XAccessibleContext > SAL_CALL
+ SwAccessibleField::getAccessibleContext( void )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ uno::Reference < XAccessibleContext > xRet( this );
+ return xRet;
+}
+
+sal_Int32 SAL_CALL SwAccessibleField::getAccessibleChildCount( void )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ return 0;
+}
+
+uno::Reference< XAccessible> SAL_CALL
+ SwAccessibleField::getAccessibleChild( long )
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ return uno::Reference< XAccessible >();
+}
+
+uno::Reference< XAccessible> SAL_CALL SwAccessibleField::getAccessibleParent (void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ uno::Reference< XAccessible > xParent(static_cast<XAccessible*>(m_xPara.getBodyPtr()),UNO_QUERY);
+ return xParent;
+}
+
+sal_Int32 SAL_CALL SwAccessibleField::getAccessibleIndexInParent (void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ return 0;
+}
+
+sal_Int16 SAL_CALL SwAccessibleField::getAccessibleRole (void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ return m_nRole;
+}
+
+rtl::OUString SAL_CALL SwAccessibleField::getAccessibleDescription (void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ASSERT( !this, "description needs to be overloaded" );
+ //THROW_RUNTIME_EXCEPTION( XAccessibleContext, "internal error (method must be overloaded)" );
+ return rtl::OUString();
+}
+
+rtl::OUString SAL_CALL SwAccessibleField::getAccessibleName (void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ return rtl::OUString();
+}
+
+uno::Reference< XAccessibleRelationSet> SAL_CALL
+ SwAccessibleField::getAccessibleRelationSet (void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ return NULL;
+}
+
+uno::Reference<XAccessibleStateSet> SAL_CALL
+ SwAccessibleField::getAccessibleStateSet (void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ return uno::Reference<XAccessibleStateSet>();
+}
+
+com::sun::star::lang::Locale SAL_CALL SwAccessibleField::getLocale (void)
+ throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ com::sun::star::lang::Locale aLoc( Application::GetSettings().GetLocale() );
+ return aLoc;
+}
+
+static sal_Bool lcl_PointInRectangle(const awt::Point & aPoint,
+ const awt::Rectangle & aRect)
+{
+ long nDiffX = aPoint.X - aRect.X;
+ long nDiffY = aPoint.Y - aRect.Y;
+
+ return
+ nDiffX >= 0 && nDiffX < aRect.Width && nDiffY >= 0 &&
+ nDiffY < aRect.Height;
+
+}
+
+sal_Bool SAL_CALL SwAccessibleField::containsPoint(
+ const ::com::sun::star::awt::Point& aPoint )
+ throw (RuntimeException)
+{
+ awt::Rectangle aPixBounds = getBoundsImpl(sal_True);
+ aPixBounds.X = 0;
+ aPixBounds.Y = 0;
+
+ return lcl_PointInRectangle(aPoint, aPixBounds);
+}
+
+uno::Reference< XAccessible > SAL_CALL SwAccessibleField::getAccessibleAtPoint(
+ const awt::Point& aPoint )
+ throw (RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ uno::Reference< XAccessible > xAcc;
+ awt::Rectangle rc = getBounds();
+ if(aPoint.X >= rc.X && aPoint.X <= rc.X + rc.Width &&
+ aPoint.Y >= rc.Y && aPoint.Y <= rc.Y + rc.Height )
+ {
+ xAcc =this;
+ }
+ return xAcc;
+}
+
+
+/**
+ Get bounding box.
+
+ There are two modes.
+
+ - realative
+
+ Return bounding box relative to parent if parent is no root
+ frame. Otherwise return the absolute bounding box.
+
+ - absolute
+
+ Return the absolute bounding box.
+
+ @param bRelative
+ true: Use relative mode.
+ false: Use absolute mode.
+*/
+awt::Rectangle SAL_CALL SwAccessibleField::getBoundsImpl( sal_Bool )
+ throw (RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ return awt::Rectangle();
+}
+
+awt::Rectangle SAL_CALL SwAccessibleField::getBounds()
+ throw (RuntimeException)
+{
+ return getBoundsImpl(sal_True);
+}
+
+awt::Point SAL_CALL SwAccessibleField::getLocation()
+ throw (RuntimeException)
+{
+ awt::Rectangle aRect = getBoundsImpl(sal_True);
+ awt::Point aPoint(aRect.X, aRect.Y);
+
+ return aPoint;
+}
+
+
+awt::Point SAL_CALL SwAccessibleField::getLocationOnScreen()
+ throw (RuntimeException)
+{
+ awt::Rectangle aRect = getBoundsImpl(sal_False);
+ //Point aPixPos = m_xPara->getLocationOnScreen();
+ return awt::Point( aRect.X,aRect.Y);//aPixPos.X() + aRect.nLeft , aPixPos.Y() + + aRect.nRight );
+}
+
+
+awt::Size SAL_CALL SwAccessibleField::getSize()
+ throw (RuntimeException)
+{
+ awt::Rectangle aRect = getBoundsImpl(sal_False);
+ awt::Size aSize( aRect.Width, aRect.Height );
+
+ return aSize;
+}
+
+void SAL_CALL SwAccessibleField::grabFocus()
+ throw (RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ return;
+}
+
+
+sal_Int32 SAL_CALL SwAccessibleField::getForeground()
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ return 0;
+}
+
+sal_Int32 SAL_CALL SwAccessibleField::getBackground()
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ return 0xffffff;
+}
+::com::sun::star::uno::Any SAL_CALL SwAccessibleField::queryInterface(
+ const ::com::sun::star::uno::Type& rType )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ Any aRet;
+ if ( rType == ::getCppuType((uno::Reference<XAccessibleContext> *)0) )
+ {
+ Reference<XAccessibleContext> aAccContext = (XAccessibleContext *) this; // resolve ambiguity
+ aRet <<= aAccContext;
+ }
+ else if ( rType == ::getCppuType((Reference<XAccessibleComponent> *)0) )
+ {
+ Reference<XAccessibleComponent> aAccEditComponent = this;
+ aRet <<= aAccEditComponent;
+ }
+ if (rType == ::getCppuType((Reference<XAccessibleEventBroadcaster> *)0))
+ {
+ Reference<XAccessibleEventBroadcaster> aAccBroadcaster= this;
+ aRet <<= aAccBroadcaster;
+ }
+ return aRet;
+}
+
+void SAL_CALL SwAccessibleField::acquire( ) throw ()
+{
+}
+void SAL_CALL SwAccessibleField::release( ) throw ()
+{
+}
+
+void SAL_CALL SwAccessibleField::addEventListener(
+ const Reference< XAccessibleEventListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ //DBG_MSG( "accessible event listener added" )
+
+ if (xListener.is())
+ {
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ if (!m_nClientId)
+ m_nClientId = comphelper::AccessibleEventNotifier::registerClient( );
+ comphelper::AccessibleEventNotifier::addEventListener( m_nClientId, xListener );
+ }
+}
+
+void SAL_CALL SwAccessibleField::removeEventListener(
+ const Reference< XAccessibleEventListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ //DBG_MSG( "accessible event listener removed" )
+
+ if (xListener.is())
+ {
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ sal_Int32 nListenerCount = comphelper::AccessibleEventNotifier::removeEventListener( m_nClientId, xListener );
+ if ( !nListenerCount )
+ {
+ // no listeners anymore
+ // -> revoke ourself. This may lead to the notifier thread dying (if we were the last client),
+ // and at least to us not firing any events anymore, in case somebody calls
+ // NotifyAccessibleEvent, again
+ comphelper::AccessibleEventNotifier::revokeClient( m_nClientId );
+ m_nClientId = 0;
+ }
+ }
+}
diff --git a/sw/source/core/access/accfield.hxx b/sw/source/core/access/accfield.hxx
new file mode 100644
index 000000000000..a206866ab23c
--- /dev/null
+++ b/sw/source/core/access/accfield.hxx
@@ -0,0 +1,213 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef _ACCFIELD_HXX
+#define _ACCFIELD_HXX
+
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLECONTEXT_HPP_
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLECOMPONENT_HPP_
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEEVENTBROADCASTER_HPP_
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ILLEGALACCESSIBLECOMPONENTSTATEEXCEPTION_HDL_
+#include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
+#include <com/sun/star/lang/DisposedException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_INDEXOUTOFBOUNDSEXCEPTION_HPP_
+#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEHYPERLINK_HPP_
+#include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEVALUE_HPP_
+#include <com/sun/star/accessibility/XAccessibleValue.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_RUNTIMEEXCEPTION_HPP_
+#include <com/sun/star/uno/RuntimeException.hpp>
+#endif
+#ifndef _VOS_REF_HXX_
+#include <vos/ref.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE4_HXX_
+#include <cppuhelper/implbase4.hxx>
+#endif
+#ifndef _FMTINFMT_HXX //autogen
+#include <fmtinfmt.hxx>
+#endif
+
+class SwAccessibleParagraph;
+class SwField;
+class SwAccessibleField :
+ public ::cppu::WeakImplHelper4<
+ ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::accessibility::XAccessibleContext,
+ ::com::sun::star::accessibility::XAccessibleComponent,
+ ::com::sun::star::accessibility::XAccessibleEventBroadcaster
+ >
+{
+ friend class SwAccessibleParagraph;
+ friend class SwAccessibleHyperTextData;
+
+protected:
+// sal_uInt16 nHintPos;
+ ::vos::ORef< SwAccessibleParagraph > m_xPara;
+ SwField *m_pSwField;
+
+ sal_uInt32 m_nClientId; // client id in the AccessibleEventNotifier queue
+ sal_Int16 m_nRole; // immutable outside constructor
+// sal_Int32 nStartIdx;
+// sal_Int32 nEndIdx;
+public:
+ SwAccessibleField( SwField *pSwFld,SwAccessibleParagraph *p,sal_Int16);
+
+ virtual void SAL_CALL addEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+
+// const SwTxtAttr *GetTxtAttr() const;
+// void Invalidate();
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& aType )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL acquire( ) throw () ;
+ virtual void SAL_CALL release( ) throw () ;
+
+public:
+ //===== XAccessible =====================================================
+
+ /// Return the XAccessibleContext.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL
+ getAccessibleContext (void) throw (com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleContext ==============================================
+
+ /// Return the number of currently visible children.
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the specified child or NULL if index is invalid.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleChild (long nIndex)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Return a reference to the parent.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleParent (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return this objects index among the parents children.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleIndexInParent (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return this object's role.
+ virtual sal_Int16 SAL_CALL
+ getAccessibleRole (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleDescription (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current name.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return NULL to indicate that an empty relation set.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL
+ getAccessibleRelationSet (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the set of current states.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
+ getAccessibleStateSet (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Return the parents locale or throw exception if this object has no
+ parent yet/anymore.
+ */
+ virtual ::com::sun::star::lang::Locale SAL_CALL
+ getLocale (void)
+ throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleComponent ============================================
+ virtual sal_Bool SAL_CALL containsPoint(
+ const ::com::sun::star::awt::Point& aPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(
+ const ::com::sun::star::awt::Point& aPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocation()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL grabFocus()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL getForeground()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getBackground()
+ throw (::com::sun::star::uno::RuntimeException);
+
+
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL
+ getBoundsImpl(sal_Bool bRelative)
+ throw (::com::sun::star::uno::RuntimeException) ;
+
+
+};
+
+#endif
+
diff --git a/sw/source/core/access/accfootnote.cxx b/sw/source/core/access/accfootnote.cxx
index 588bbb1c8161..95c2c09d9d75 100644
--- a/sw/source/core/access/accfootnote.cxx
+++ b/sw/source/core/access/accfootnote.cxx
@@ -55,7 +55,6 @@ const sal_Char sImplementationNameEndnote[] = "com.sun.star.comp.Writer.SwAccess
SwAccessibleFootnote::SwAccessibleFootnote(
SwAccessibleMap* pInitMap,
sal_Bool bIsEndnote,
- sal_Int32 nFootEndNote,
const SwFtnFrm *pFtnFrm ) :
SwAccessibleContext( pInitMap,
bIsEndnote ? AccessibleRole::END_NOTE : AccessibleRole::FOOTNOTE,
@@ -65,7 +64,19 @@ SwAccessibleFootnote::SwAccessibleFootnote(
sal_uInt16 nResId = bIsEndnote ? STR_ACCESS_ENDNOTE_NAME
: STR_ACCESS_FOOTNOTE_NAME;
- OUString sArg( OUString::valueOf( nFootEndNote ) );
+ //IAccessibility2 Implementation 2009-----
+ //OUString sArg( OUString::valueOf( nFootEndNote ) );
+ //old codes end
+ OUString sArg;
+ const SwTxtFtn *pTxtFtn =
+ static_cast< const SwFtnFrm *>( GetFrm() )->GetAttr();
+ if( pTxtFtn )
+ {
+ const SwDoc *pDoc = GetShell()->GetDoc();
+ sArg = pTxtFtn->GetFtn().GetViewNumStr( *pDoc );
+ }
+ //-----IAccessibility2 Implementation 2009
+
SetName( GetResource( nResId, &sArg ) );
}
diff --git a/sw/source/core/access/accfootnote.hxx b/sw/source/core/access/accfootnote.hxx
index 9cec3b47ff2d..dadc3bcc7f05 100644
--- a/sw/source/core/access/accfootnote.hxx
+++ b/sw/source/core/access/accfootnote.hxx
@@ -41,7 +41,6 @@ public:
SwAccessibleFootnote( SwAccessibleMap* pInitMap,
sal_Bool bIsEndnote,
- sal_Int32 nFootEndNote,
const SwFtnFrm *pFtnFrm );
diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx
index 0099a63e9416..b9916a63d7fd 100644
--- a/sw/source/core/access/accframe.cxx
+++ b/sw/source/core/access/accframe.cxx
@@ -61,7 +61,9 @@ using namespace sw::access;
{
sal_Int32 nCount = 0;
- const SwAccessibleChildSList aVisList( rVisArea, *pFrm, rAccMap );
+ // const SwAccessibleChildSList aVisList( rVisArea, *pFrm, rAccMap );
+ const SwAccessibleChildSList aVisList( pFrm->PaintArea(), *pFrm, rAccMap );
+
SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
while( aIter != aVisList.end() )
{
@@ -163,7 +165,10 @@ using namespace sw::access;
if( SwAccessibleChildMap::IsSortingRequired( rFrm ) )
{
// We need a sorted list here
- const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap );
+ //IAccessibility2 Implementation 2009-----
+ // const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap );
+ const SwAccessibleChildMap aVisMap( rFrm.PaintArea(), rFrm, rAccMap );
+ //-----IAccessibility2 Implementation 2009
SwAccessibleChildMap::const_iterator aIter( aVisMap.begin() );
while( aIter != aVisMap.end() && !bFound )
{
@@ -189,7 +194,12 @@ using namespace sw::access;
{
// The unsorted list is sorted enough, because it return lower
// frames in the correct order.
- const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap );
+
+ //IAccessibility2 Implementation 2009-----
+ // const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap );
+ const SwAccessibleChildSList aVisList( rFrm.PaintArea(), rFrm, rAccMap );
+ //-----IAccessibility2 Implementation 2009
+
SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
while( aIter != aVisList.end() && !bFound )
{
@@ -425,7 +435,8 @@ SwAccessibleFrame::SwAccessibleFrame( const SwRect& rVisArea,
sal_Bool bIsPagePreview ) :
maVisArea( rVisArea ),
mpFrm( pF ),
- mbIsInPagePreview( bIsPagePreview )
+ mbIsInPagePreview( bIsPagePreview ),
+ bIsAccDocUse( sal_False )
{
}
diff --git a/sw/source/core/access/accframe.hxx b/sw/source/core/access/accframe.hxx
index 129caa2768c1..06ab5302d059 100644
--- a/sw/source/core/access/accframe.hxx
+++ b/sw/source/core/access/accframe.hxx
@@ -52,8 +52,9 @@ protected:
static sal_Int32 GetChildCount( SwAccessibleMap& rAccMap,
const SwRect& rVisArea,
const SwFrm *pFrm,
- sal_Bool bInPagePreview );
-private:
+ sal_Bool bInPagePreviewr );
+
+// private:
static sw::access::SwAccessibleChild GetChild( SwAccessibleMap& rAccMap,
const SwRect& rVisArea,
const SwFrm& rFrm,
@@ -105,6 +106,12 @@ protected:
sal_Bool bIsPagePreview );
virtual ~SwAccessibleFrame();
+ //IAccessibility2 Implementation 2009-----
+ // MT: Move to private area?
+ sal_Bool bIsAccDocUse;
+ //-----IAccessibility2 Implementation 2009
+
+
public:
// Return the SwFrm this context is attached to.
const SwFrm* GetFrm() const { return mpFrm; };
diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
index e2ce6ad6e89b..53b2b6600a58 100644
--- a/sw/source/core/access/accframebase.cxx
+++ b/sw/source/core/access/accframebase.cxx
@@ -42,6 +42,26 @@
#include "accmap.hxx"
#include "accframebase.hxx"
+//IAccessibility2 Implementation 2009-----
+#ifndef _CRSRSH_HXX
+#include <crsrsh.hxx>
+#endif
+#ifndef _FESH_HXX
+#include "fesh.hxx"
+#endif
+#ifndef _TXTFRM_HXX
+#include <txtfrm.hxx>
+#endif
+#ifndef _NDTXT_HXX
+#include <ndtxt.hxx>
+#endif
+#ifndef _DCONTACT_HXX
+#include <dcontact.hxx>
+#endif
+#ifndef _FMTANCHR_HXX
+#include <fmtanchr.hxx>
+#endif
+//-----IAccessibility2 Implementation 2009
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
using ::rtl::OUString;
@@ -94,6 +114,10 @@ void SwAccessibleFrameBase::GetStates(
if( pWin && pWin->HasFocus() )
rStateSet.AddState( AccessibleStateType::FOCUSED );
}
+ //IAccessibility2 Implementation 2009-----
+ if( GetSelectedState() )
+ rStateSet.AddState( AccessibleStateType::SELECTED );
+ //-----IAccessibility2 Implementation 2009
}
@@ -167,20 +191,26 @@ void SwAccessibleFrameBase::_InvalidateCursorPos()
Window *pWin = GetWindow();
if( pWin && pWin->HasFocus() && bNewSelected )
FireStateChangedEvent( AccessibleStateType::FOCUSED, bNewSelected );
- FireStateChangedEvent( AccessibleStateType::SELECTED, bNewSelected );
+ //IAccessibility2 Implementation 2009-----
+ //FireStateChangedEvent( AccessibleStateType::SELECTED, bNewSelected );
if( pWin && pWin->HasFocus() && !bNewSelected )
FireStateChangedEvent( AccessibleStateType::FOCUSED, bNewSelected );
-
- uno::Reference< XAccessible > xParent( GetWeakParent() );
- if( xParent.is() )
+ if(bNewSelected)
{
- SwAccessibleContext *pAcc =
- static_cast <SwAccessibleContext *>( xParent.get() );
+ uno::Reference< XAccessible > xParent( GetWeakParent() );
+ if( xParent.is() )
+ {
+ SwAccessibleContext *pAcc =
+ static_cast <SwAccessibleContext *>( xParent.get() );
- AccessibleEventObject aEvent;
- aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
- pAcc->FireAccessibleEvent( aEvent );
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
+ uno::Reference< XAccessible > xChild(this);
+ aEvent.NewValue <<= xChild;
+ pAcc->FireAccessibleEvent( aEvent );
+ }
}
+ //-----IAccessibility2 Implementation 2009
}
}
@@ -248,13 +278,13 @@ void SwAccessibleFrameBase::Modify( const SfxPoolItem* pOld, const SfxPoolItem *
break;
case RES_OBJECTDYING:
// mba: it seems that this class intentionally does not call code in base class SwClient
- if( GetRegisteredIn() ==
- static_cast< SwModify *>( static_cast< const SwPtrMsgPoolItem * >( pOld )->pObject ) )
+ if( pOld && ( GetRegisteredIn() == static_cast< SwModify *>( static_cast< const SwPtrMsgPoolItem * >( pOld )->pObject ) ) )
GetRegisteredInNonConst()->Remove( this );
break;
case RES_FMT_CHG:
- if( static_cast< const SwFmtChg * >(pNew)->pChangedFmt == GetRegisteredIn() &&
+ if( pOld &&
+ static_cast< const SwFmtChg * >(pNew)->pChangedFmt == GetRegisteredIn() &&
static_cast< const SwFmtChg * >(pOld)->pChangedFmt->IsFmtInDTOR() )
GetRegisteredInNonConst()->Remove( this );
break;
@@ -274,3 +304,123 @@ void SwAccessibleFrameBase::Dispose( sal_Bool bRecursive )
SwAccessibleContext::Dispose( bRecursive );
}
+//IAccessibility2 Implementation 2009-----
+//Get the selection cursor of the document.
+SwPaM* SwAccessibleFrameBase::GetCrsr()
+{
+ // get the cursor shell; if we don't have any, we don't have a
+ // cursor/selection either
+ SwPaM* pCrsr = NULL;
+ SwCrsrShell* pCrsrShell = GetCrsrShell();
+ if( pCrsrShell != NULL && !pCrsrShell->IsTableMode() )
+ {
+ SwFEShell *pFESh = dynamic_cast< SwFEShell* >(pCrsrShell);
+ if( !pFESh ||
+ !(pFESh->IsFrmSelected() || pFESh->IsObjSelected() > 0) )
+ {
+ // get the selection, and test whether it affects our text node
+ pCrsr = pCrsrShell->GetCrsr( sal_False /* ??? */ );
+ }
+ }
+
+ return pCrsr;
+}
+//Return the selected state of the object.
+//when the object's anchor are in the selection cursor, we should return true.
+sal_Bool SwAccessibleFrameBase::GetSelectedState( )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ //IAccessibility2 Implementation 2009-----
+ if(GetMap()->IsDocumentSelAll())
+ {
+ return sal_True;
+ }
+ //-----IAccessibility2 Implementation 2009
+
+ // SELETED.
+ SwFlyFrm* pFlyFrm = getFlyFrm();
+ const SwFrmFmt *pFrmFmt = pFlyFrm->GetFmt();
+ const SwFmtAnchor& pAnchor = pFrmFmt->GetAnchor();
+ const SwPosition *pPos = pAnchor.GetCntntAnchor();
+ if( !pPos )
+ return sal_False;
+ int pIndex = pPos->nContent.GetIndex();
+ if( pPos->nNode.GetNode().GetTxtNode() )
+ {
+ SwPaM* pCrsr = GetCrsr();
+ if( pCrsr != NULL )
+ {
+ const SwTxtNode* pNode = pPos->nNode.GetNode().GetTxtNode();
+ sal_uLong nHere = pNode->GetIndex();
+
+ // iterate over ring
+ SwPaM* pRingStart = pCrsr;
+ do
+ {
+ // ignore, if no mark
+ if( pCrsr->HasMark() )
+ {
+ // check whether nHere is 'inside' pCrsr
+ SwPosition* pStart = pCrsr->Start();
+ sal_uLong nStartIndex = pStart->nNode.GetIndex();
+ SwPosition* pEnd = pCrsr->End();
+ sal_uLong nEndIndex = pEnd->nNode.GetIndex();
+ if( ( nHere >= nStartIndex ) && (nHere <= nEndIndex) )
+ {
+ if( pAnchor.GetAnchorId() == FLY_AS_CHAR )
+ {
+ //IAccessibility2 Implementation 2009-----
+ if( (nHere == nStartIndex) && (pIndex >= pStart->nContent.GetIndex()) || (nHere > nStartIndex) )
+ if( (nHere == nEndIndex) && (pIndex < pEnd->nContent.GetIndex()) || (nHere < nEndIndex) )
+ return sal_True;
+ //-----IAccessibility2 Implementation 2009
+ }
+ else if( pAnchor.GetAnchorId() == FLY_AT_PARA )
+ {
+ if( ((nHere > nStartIndex) || pStart->nContent.GetIndex() ==0 )
+ && (nHere < nEndIndex ) )
+ return sal_True;
+ }
+ break;
+ }
+ // else: this PaM doesn't point to this paragraph
+ }
+ // else: this PaM is collapsed and doesn't select anything
+
+ // next PaM in ring
+ pCrsr = static_cast<SwPaM*>( pCrsr->GetNext() );
+ }
+ while( pCrsr != pRingStart );
+ }
+ }
+ return sal_False;
+}
+
+SwFlyFrm* SwAccessibleFrameBase::getFlyFrm() const
+{
+ SwFlyFrm* pFlyFrm = NULL;
+
+ const SwFrm* pFrm = GetFrm();
+ DBG_ASSERT( pFrm != NULL, "frame expected" );
+ if( pFrm->IsFlyFrm() )
+ {
+ pFlyFrm = static_cast<SwFlyFrm*>( const_cast<SwFrm*>( pFrm ) );
+ }
+
+ return pFlyFrm;
+}
+
+sal_Bool SwAccessibleFrameBase::SetSelectedState( sal_Bool )
+{
+ sal_Bool bParaSeleted = GetSelectedState() || IsSelected();
+
+ if(bIsSeletedInDoc != bParaSeleted)
+ {
+ bIsSeletedInDoc = bParaSeleted;
+ FireStateChangedEvent( AccessibleStateType::SELECTED, bParaSeleted );
+ return sal_True;
+ }
+ return sal_False;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/core/access/accframebase.hxx b/sw/source/core/access/accframebase.hxx
index 14ae334065b2..6e2fd6f1bcef 100644
--- a/sw/source/core/access/accframebase.hxx
+++ b/sw/source/core/access/accframebase.hxx
@@ -23,6 +23,12 @@
#ifndef _ACCFRAMEBASE_HXX
#define _ACCFRAMEBASE_HXX
+//IAccessibility2 Implementation 2009-----
+#ifndef _PAM_HXX
+#include <pam.hxx>
+#endif
+//-----IAccessibility2 Implementation 2009
+
#include <acccontext.hxx>
#include <calbck.hxx>
@@ -42,6 +48,11 @@ protected:
// This drived class additionaly sets SELECTABLE(1), SELECTED(+),
// FOCUSABLE(1) and FOCUSED(+)
virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet );
+ //IAccessibility2 Implementation 2009-----
+ SwFlyFrm* getFlyFrm() const;
+ sal_Bool GetSelectedState( );
+ SwPaM* GetCrsr();
+ //-----IAccessibility2 Implementation 2009
virtual void _InvalidateCursorPos();
virtual void _InvalidateFocus();
@@ -61,6 +72,8 @@ public:
// The object is not visible an longer and should be destroyed
virtual void Dispose( sal_Bool bRecursive = sal_False );
+ virtual sal_Bool SetSelectedState( sal_Bool bSeleted );
+ //-----IAccessibility2 Implementation 2009
};
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx
index 53ca64a50c7b..913e6206093d 100644
--- a/sw/source/core/access/accfrmobj.cxx
+++ b/sw/source/core/access/accfrmobj.cxx
@@ -39,6 +39,10 @@
#include <frmfmt.hxx>
#include <fmtanchr.hxx>
#include <dcontact.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <pam.hxx>
+//-----IAccessibility2 Implementation 2009
+
#include <vcl/window.hxx>
#include <svx/svdlegacy.hxx>
@@ -172,6 +176,25 @@ bool SwAccessibleChild::IsBoundAsChar() const
return bRet;
}
+//IAccessibility2 Implementation 2009-----
+sal_uInt32 SwAccessibleChild::GetAnchorPosition() const
+{
+ if( mpDrawObj )
+ {
+ const SwFrmFmt *pFrmFmt = ::FindFrmFmt( mpDrawObj );
+ if ( pFrmFmt )
+ {
+ const SwPosition *pPos = pFrmFmt->GetAnchor().GetCntntAnchor();
+ if ( pPos )
+ {
+ return pPos->nContent.GetIndex();
+ }
+ }
+ }
+ return 0;
+}
+//-----IAccessibility2 Implementation 2009
+
SwAccessibleChild::SwAccessibleChild( const SwAccessibleChild& r )
: mpFrm( r.mpFrm )
, mpDrawObj( r.mpDrawObj )
diff --git a/sw/source/core/access/accfrmobj.hxx b/sw/source/core/access/accfrmobj.hxx
index 60d41b3eb2d9..ff6012aa9c06 100644
--- a/sw/source/core/access/accfrmobj.hxx
+++ b/sw/source/core/access/accfrmobj.hxx
@@ -64,6 +64,10 @@ class SwAccessibleChild
bool IsAccessible( sal_Bool bPagePreview ) const;
bool IsBoundAsChar() const;
+ //IAccessibility2 Implementation 2009-----
+ sal_uInt32 GetAnchorPosition() const;
+ //-----IAccessibility2 Implementation 2009
+
bool IsVisibleChildrenOnly() const;
SwRect GetBox( const SwAccessibleMap& rAccMap ) const;
SwRect GetBounds( const SwAccessibleMap& rAccMap ) const;
diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx
index 4fc284ae9fb2..c76df1453d1f 100644
--- a/sw/source/core/access/accfrmobjmap.cxx
+++ b/sw/source/core/access/accfrmobjmap.cxx
@@ -162,3 +162,97 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea,
( rFrm.IsTxtFrm() &&
rFrm.GetDrawObjs() );
}
+
+/* MT: The two insert methods had been introduced in the IA2 CWS (OOO310m11), but meanwhile we also have some in DEV300m80 (above)
+ Not sure if they have something which needs to be update in above methods.
+ Also, since there is no SwFrmOrObjMap CTOR anymore, the updated code in DEV300 might need some of the changes flagged with //IAccessibility2 Implementation 2009-----
+
+//IAccessibility2 Implementation 2009-----
+::std::pair< SwFrmOrObjMap::iterator, bool > SwFrmOrObjMap::insert(
+ sal_uInt32 nOrd, Point nPos, const SwFrmOrObj& rLower )
+{
+ SwFrmOrObjMapKey aKey( SwFrmOrObjMapKey::TEXT, nOrd, nPos );
+ value_type aEntry( aKey, rLower );
+ return _SwFrmOrObjMap::insert( aEntry );
+}
+
+::std::pair< SwFrmOrObjMap::iterator, bool > SwFrmOrObjMap::insert(
+ const SdrObject *pObj, const SwFrmOrObj& rLower, const SwDoc *pDoc , Point nPos)
+{
+ if( !bLayerIdsValid )
+ {
+ nHellId = pDoc->GetHellId();
+ nControlsId = pDoc->GetControlsId();
+ bLayerIdsValid = sal_True;
+ }
+
+ SdrLayerID nLayer = pObj->GetLayer();
+ SwFrmOrObjMapKey::LayerId eLayerId = (nHellId == nLayer)
+ ? SwFrmOrObjMapKey::HELL
+ : ((nControlsId == nLayer) ? SwFrmOrObjMapKey::CONTROLS
+ : SwFrmOrObjMapKey::HEAVEN);
+ SwFrmOrObjMapKey aKey( eLayerId, pObj->GetOrdNum(), nPos );
+ value_type aEntry( aKey, rLower );
+ return _SwFrmOrObjMap::insert( aEntry );
+}
+//-----IAccessibility2 Implementation 2009
+
+SwFrmOrObjMap::SwFrmOrObjMap(
+ const SwRect& rVisArea, const SwFrm *pFrm ) :
+ bLayerIdsValid( sal_False )
+{
+ SwFrmOrObj aFrm( pFrm );
+ sal_Bool bVisibleOnly = aFrm.IsVisibleChildrenOnly();
+
+ sal_uInt32 nPos = 0;
+ SwFrmOrObj aLower( pFrm->GetLower() );
+ while( aLower.GetSwFrm() )
+ {
+ //IAccessibility2 Implementation 2009-----
+ if( !bVisibleOnly || aLower.GetBox().IsOver( rVisArea ) )
+ insert( nPos++, aLower.GetBounds().Pos(), aLower );
+ //-----IAccessibility2 Implementation 2009
+ aLower = aLower.GetSwFrm()->GetNext();
+ }
+
+ if( pFrm->IsPageFrm() )
+ {
+ ASSERT( bVisibleOnly, "page frame within tab frame???" );
+ const SwPageFrm *pPgFrm =
+ static_cast< const SwPageFrm * >( pFrm );
+ const SwSortedObjs *pObjs = pPgFrm->GetSortedObjs();
+ if( pObjs )
+ {
+ const SwDoc *pDoc = pPgFrm->GetFmt()->GetDoc();
+ for( sal_uInt16 i=0; i<pObjs->Count(); i++ )
+ {
+ aLower = (*pObjs)[i]->GetDrawObj();
+ //IAccessibility2 Implementation 2009-----
+ if( aLower.GetBox().IsOver( rVisArea ) )
+ insert( aLower.GetSdrObject(), aLower, pDoc , aLower.GetBounds().Pos() );
+ //-----IAccessibility2 Implementation 2009
+ }
+ }
+ }
+ else if( pFrm->IsTxtFrm() )
+ {
+ const SwDoc *pDoc = static_cast< const SwTxtFrm * >( pFrm )->GetNode()
+ ->GetDoc();
+ const SwSortedObjs *pObjs = pFrm->GetDrawObjs();
+ if( pObjs )
+ {
+ for( sal_uInt16 i=0; i<pObjs->Count(); i++ )
+ {
+ aLower = (*pObjs)[i]->GetDrawObj();
+ //IAccessibility2 Implementation 2009-----
+ if( aLower.IsBoundAsChar() &&
+ (!bVisibleOnly || aLower.GetBox().IsOver( rVisArea )) )
+ insert( aLower.GetSdrObject(), aLower, pDoc , Point(aLower.GetAnchorPosition(),0) );
+ //-----IAccessibility2 Implementation 2009
+ }
+ }
+ }
+}
+
+*/
+
diff --git a/sw/source/core/access/accfrmobjmap.hxx b/sw/source/core/access/accfrmobjmap.hxx
index d9df578277a7..fb05f9c8e117 100644
--- a/sw/source/core/access/accfrmobjmap.hxx
+++ b/sw/source/core/access/accfrmobjmap.hxx
@@ -26,6 +26,7 @@
#include <accfrmobj.hxx>
#include <svx/svdtypes.hxx>
+#include <tools/gen.hxx>
#include <map>
@@ -43,26 +44,59 @@ public:
inline SwAccessibleChildMapKey()
: eLayerId( INVALID )
, nOrdNum( 0 )
+ , nPosNum( 0, 0 )
{}
inline SwAccessibleChildMapKey( LayerId eId, sal_uInt32 nOrd )
: eLayerId( eId )
, nOrdNum( nOrd )
+ , nPosNum( 0, 0 )
{}
+//IAccessibility2 Implementation 2009-----
+ inline SwAccessibleChildMapKey( LayerId eId, sal_uInt32 nOrd, Point nPos )
+ : eLayerId( eId )
+ , nOrdNum( nOrd )
+ , nPosNum( nPos )
+ {}
+//-----IAccessibility2 Implementation 2009
+
inline bool operator()( const SwAccessibleChildMapKey& r1,
const SwAccessibleChildMapKey& r2 ) const
{
- return (r1.eLayerId == r2.eLayerId)
- ? (r1.nOrdNum < r2.nOrdNum)
- : (r1.eLayerId < r2.eLayerId);
+//IAccessibility2 Implementation 2009-----
+// return (r1.eLayerId == r2.eLayerId)
+// ? (r1.nOrdNum < r2.nOrdNum)
+// : (r1.eLayerId < r2.eLayerId);
+ return (r1.eLayerId == r2.eLayerId) ?
+ ( (r1.nPosNum == r2.nPosNum) ?(r1.nOrdNum < r2.nOrdNum) :
+ (r1.nPosNum.getY() == r2.nPosNum.getY()? r1.nPosNum.getX() < r2.nPosNum.getX() :
+ r1.nPosNum.getY() < r2.nPosNum.getY()) ) :
+ (r1.eLayerId < r2.eLayerId);
+//-----IAccessibility2 Implementation 2009
}
+ /* MT: Need to get this position parameter stuff in dev300 somehow...
+ //IAccessibility2 Implementation 2009-----
+ //This methods are used to insert an object to the map, adding a position parameter.
+ ::std::pair< iterator, bool > insert( sal_uInt32 nOrd, Point nPos,
+ const SwFrmOrObj& rLower );
+ ::std::pair< iterator, bool > insert( const SdrObject *pObj,
+ const SwFrmOrObj& rLower,
+ const SwDoc *pDoc,
+ Point nPos);
+ //-----IAccessibility2 Implementation 2009
+ */
+
private:
LayerId eLayerId;
sal_uInt32 nOrdNum;
+ //IAccessibility2 Implementation 2009-----
+ Point nPosNum;
+ //-----IAccessibility2 Implementation 2009
+
};
typedef ::std::map < SwAccessibleChildMapKey, sw::access::SwAccessibleChild, SwAccessibleChildMapKey >
diff --git a/sw/source/core/access/accgraphic.cxx b/sw/source/core/access/accgraphic.cxx
index 5b1e0f66857d..6b94077d4d75 100644
--- a/sw/source/core/access/accgraphic.cxx
+++ b/sw/source/core/access/accgraphic.cxx
@@ -33,6 +33,11 @@
#include "accgraphic.hxx"
using namespace ::com::sun::star;
+//IAccessibility2 Implementation 2009-----
+#ifndef _FMTURL_HXX //autogen
+#include <fmturl.hxx>
+#endif
+//-----IAccessibility2 Implementation 2009
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::accessibility;
@@ -91,3 +96,15 @@ Sequence< sal_Int8 > SAL_CALL SwAccessibleGraphic::getImplementationId()
}
return aId;
}
+//IAccessibility2 Implementation 2009-----
+// Return this object's role.
+sal_Int16 SAL_CALL SwAccessibleGraphic::getAccessibleRole (void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ SwFmtURL aURL( ((SwLayoutFrm*)GetFrm())->GetFmt()->GetURL() );
+
+ if(aURL.GetMap() )
+ return AccessibleRole::IMAGE_MAP ;
+ return AccessibleRole::GRAPHIC ;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/core/access/accgraphic.hxx b/sw/source/core/access/accgraphic.hxx
index 379a95c274ee..af6391baa6f6 100644
--- a/sw/source/core/access/accgraphic.hxx
+++ b/sw/source/core/access/accgraphic.hxx
@@ -59,6 +59,10 @@ public:
//===== XTypeProvider ====================================================
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+ //IAccessibility2 Implementation 2009-----
+ /// Return this object's role.
+ virtual sal_Int16 SAL_CALL getAccessibleRole (void) throw (::com::sun::star::uno::RuntimeException);
+ //-----IAccessibility2 Implementation 2009
};
diff --git a/sw/source/core/access/accheaderfooter.cxx b/sw/source/core/access/accheaderfooter.cxx
index c8a65f8d8bd0..5d6238f8a3e4 100644
--- a/sw/source/core/access/accheaderfooter.cxx
+++ b/sw/source/core/access/accheaderfooter.cxx
@@ -139,3 +139,20 @@ Sequence< sal_Int8 > SAL_CALL SwAccessibleHeaderFooter::getImplementationId()
}
return aId;
}
+
+//IAccessibility2 Implementation 2009-----
+sal_Int32 SAL_CALL SwAccessibleHeaderFooter::getBackground()
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ Reference< XAccessible > xParent = getAccessibleParent();
+ if (xParent.is())
+ {
+ Reference< XAccessibleComponent > xAccContext (xParent,UNO_QUERY);
+ if(xAccContext.is())
+ {
+ return xAccContext->getBackground();
+ }
+ }
+ return SwAccessibleContext::getBackground();
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/core/access/accheaderfooter.hxx b/sw/source/core/access/accheaderfooter.hxx
index 286639ca6474..e674bfd8ac8c 100644
--- a/sw/source/core/access/accheaderfooter.hxx
+++ b/sw/source/core/access/accheaderfooter.hxx
@@ -74,6 +74,11 @@ public:
//===== XTypeProvider ====================================================
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+ //IAccessibility2 Implementation 2009-----
+ //===== XAccessibleComponent ============================================
+ sal_Int32 SAL_CALL getBackground()
+ throw (::com::sun::star::uno::RuntimeException);
+ //-----IAccessibility2 Implementation 2009
};
diff --git a/sw/source/core/access/acchyperlink.cxx b/sw/source/core/access/acchyperlink.cxx
index 872d73e4f9bc..7c6c3d3cea51 100644
--- a/sw/source/core/access/acchyperlink.cxx
+++ b/sw/source/core/access/acchyperlink.cxx
@@ -32,9 +32,23 @@
#include <accpara.hxx>
#include <acchyperlink.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <comphelper/processfactory.hxx>
+#ifndef _COM_SUN_STAR_FRAME_XDESKTOP_HPP_
+#include <com/sun/star/frame/XDesktop.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DOCUMENT_XLINKTARGETSUPPLIER_HPP_
+#include <com/sun/star/document/XLinkTargetSupplier.hpp>
+#endif
+//-----IAccessibility2 Implementation 2009
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
using ::rtl::OUString;
+using ::com::sun::star::lang::IndexOutOfBoundsException;
SwAccessibleHyperlink::SwAccessibleHyperlink( sal_uInt16 nHPos,
SwAccessibleParagraph *p, sal_Int32 nStt, sal_Int32 nEnd ) :
@@ -78,8 +92,12 @@ sal_Bool SAL_CALL SwAccessibleHyperlink::doAccessibleAction( sal_Int32 nIndex )
sal_Bool bRet = sal_False;
+ //IAccessibility2 Implementation 2009-----
+ if(nIndex != 0)
+ throw new IndexOutOfBoundsException;
const SwTxtAttr *pTxtAttr = GetTxtAttr();
- if( pTxtAttr && 0 == nIndex )
+ if( pTxtAttr /*&& 0 == nIndex*/ )
+ //-----IAccessibility2 Implementation 2009
{
const SwFmtINetFmt& rINetFmt = pTxtAttr->GetINetFmt();
if( rINetFmt.GetValue().Len() )
@@ -111,23 +129,28 @@ OUString SAL_CALL SwAccessibleHyperlink::getAccessibleActionDescription(
{
OUString sDesc;
+ //IAccessibility2 Implementation 2009-----
+ if(nIndex != 0)
+ throw new IndexOutOfBoundsException;
const SwTxtAttr *pTxtAttr = GetTxtAttr();
- if( pTxtAttr && 0 == nIndex )
+ if( pTxtAttr /*&& 0 == nIndex*/ )
{
const SwFmtINetFmt& rINetFmt = pTxtAttr->GetINetFmt();
sDesc = OUString( rINetFmt.GetValue() );
}
-
+ //-----IAccessibility2 Implementation 2009
return sDesc;
}
uno::Reference< XAccessibleKeyBinding > SAL_CALL
- SwAccessibleHyperlink::getAccessibleActionKeyBinding( sal_Int32 nIndex )
+ SwAccessibleHyperlink::getAccessibleActionKeyBinding( sal_Int32 )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
uno::Reference< XAccessibleKeyBinding > xKeyBinding;
- if( isValid() && 0==nIndex )
+ //IAccessibility2 Implementation 2009-----
+ if( isValid() /*&& 0 == nIndex*/ )
+ //-----IAccessibility2 Implementation 2009
{
::comphelper::OAccessibleKeyBindingHelper* pKeyBindingHelper =
new ::comphelper::OAccessibleKeyBindingHelper();
@@ -146,17 +169,40 @@ uno::Reference< XAccessibleKeyBinding > SAL_CALL
// XAccessibleHyperlink
uno::Any SAL_CALL SwAccessibleHyperlink::getAccessibleActionAnchor(
- sal_Int32 /*nIndex*/ )
+ sal_Int32 nIndex)
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- return uno::Any();
+ uno::Any aRet;
+ //IAccessibility2 Implementation 2009-----
+ if(nIndex != 0)
+ throw new IndexOutOfBoundsException;
+ //End Added.
+ ::rtl::OUString text = OUString( xPara->GetString() );
+ ::rtl::OUString retText = text.copy(nStartIdx, nEndIdx - nStartIdx);
+ aRet <<= retText;
+ //-----IAccessibility2 Implementation 2009
+ return aRet;
}
uno::Any SAL_CALL SwAccessibleHyperlink::getAccessibleActionObject(
- sal_Int32 /*nIndex*/ )
+ sal_Int32 nIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- return uno::Any();
+ //IAccessibility2 Implementation 2009-----
+ if(nIndex != 0)
+ throw new IndexOutOfBoundsException;
+ //End Added.
+ const SwTxtAttr *pTxtAttr = GetTxtAttr();
+ ::rtl::OUString retText;
+ if( pTxtAttr /*&& 0 == nIndex*/ )
+ {
+ const SwFmtINetFmt& rINetFmt = pTxtAttr->GetINetFmt();
+ retText = OUString( rINetFmt.GetValue() );
+ }
+ uno::Any aRet;
+ aRet <<= retText;
+ return aRet;
+ //-----IAccessibility2 Implementation 2009
}
sal_Int32 SAL_CALL SwAccessibleHyperlink::getStartIndex()
@@ -175,7 +221,57 @@ sal_Bool SAL_CALL SwAccessibleHyperlink::isValid( )
throw (uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
- return xPara.isValid();
+ //IAccessibility2 Implementation 2009-----
+ // return xPara.isValid();
+ if (xPara.isValid())
+ {
+ const SwTxtAttr *pTxtAttr = GetTxtAttr();
+ ::rtl::OUString sText;
+ if( pTxtAttr )
+ {
+ const SwFmtINetFmt& rINetFmt = pTxtAttr->GetINetFmt();
+ sText = OUString( rINetFmt.GetValue() );
+ ::rtl::OUString sToken = ::rtl::OUString::createFromAscii("#");
+ sal_Int32 nPos = sText.indexOf(sToken);
+ if (nPos==0)//document link
+ {
+ uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
+ if( ! xFactory.is() )
+ return sal_False;
+ uno::Reference< com::sun::star::frame::XDesktop > xDesktop( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ),
+ uno::UNO_QUERY );
+ if( !xDesktop.is() )
+ return sal_False;
+ uno::Reference< lang::XComponent > xComp;
+ xComp = xDesktop->getCurrentComponent();
+ if( !xComp.is() )
+ return sal_False;
+ uno::Reference< com::sun::star::document::XLinkTargetSupplier > xLTS(xComp, uno::UNO_QUERY);
+ if ( !xLTS.is())
+ return sal_False;
+
+ uno::Reference< ::com::sun::star::container::XNameAccess > xLinks = xLTS->getLinks();
+ uno::Reference< ::com::sun::star::container::XNameAccess > xSubLinks;
+ const uno::Sequence< OUString > aNames( xLinks->getElementNames() );
+ const sal_uLong nLinks = aNames.getLength();
+ const OUString* pNames = aNames.getConstArray();
+
+ for( sal_uLong i = 0; i < nLinks; i++ )
+ {
+ uno::Any aAny;
+ OUString aLink( *pNames++ );
+ aAny = xLinks->getByName( aLink );
+ aAny >>= xSubLinks;
+ if (xSubLinks->hasByName(sText.copy(1)) )
+ return sal_True;
+ }
+ }
+ else//internet
+ return sal_True;
+ }
+ }//xpara valid
+ return sal_False;
+ //-----IAccessibility2 Implementation 2009
}
void SwAccessibleHyperlink::Invalidate()
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 8be7f772f90d..8918bb598c59 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -34,6 +34,7 @@
#include <map>
#include <list>
+#include <vector>
#include <accmap.hxx>
#include <acccontext.hxx>
#include <accdoc.hxx>
@@ -60,11 +61,25 @@
#include <IDocumentDrawModelAccess.hxx>
#include <svx/ShapeTypeHandler.hxx>
#include <vcl/svapp.hxx>
+//IAccessibility2 Implementation 2009-----
+#ifndef _SVX_ACCESSIBILITY_SHAPE_TYPE_HANDLER_HXX
+#include <svx/ShapeTypeHandler.hxx>
+#endif
+#ifndef _SVX_ACCESSIBILITY_SVX_SHAPE_TYPES_HXX
+#include <svx/SvxShapeTypes.hxx>
+#endif
+#ifndef _SVDPAGE_HXX
+#include <svx/svdpage.hxx>
+#endif
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <cppuhelper/implbase1.hxx>
#include <pagepreviewlayout.hxx>
+#include <dcontact.hxx>
+#include <svx/unoapi.hxx>
+#include <doc.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
#include <dflyobj.hxx>
@@ -280,7 +295,9 @@ SwAccessibleObjShape_Impl
{
const SdrObject *pObj = (*aIter).first;
uno::Reference < XAccessible > xAcc( (*aIter).second );
- if( nSelShapes && pFESh->IsObjSelected( *pObj ) )
+ //IAccessibility2 Implementation 2009-----
+ if( nSelShapes && pFESh &&pFESh->IsObjSelected( *pObj ) )
+ //-----IAccessibility2 Implementation 2009
{
// selected objects are inserted from the back
--pSelShape;
@@ -336,20 +353,31 @@ private:
SwAccessibleEvent_Impl& operator==( const SwAccessibleEvent_Impl& );
public:
+ //IAccessibility2 Implementation 2009-----
+ const SwFrm* mpParentFrm; // The object that fires the event
+ sal_Bool IsNoXaccParentFrm() const
+ {
+ return CHILD_POS_CHANGED == meType && mpParentFrm != 0;
+ }
+ uno::WeakReference < XAccessible > GetxAcc() const { return mxAcc;}
+ //-----IAccessibility2 Implementation 2009
+public:
SwAccessibleEvent_Impl( EventType eT,
SwAccessibleContext *pA,
const SwAccessibleChild& rFrmOrObj )
: mxAcc( pA ),
maFrmOrObj( rFrmOrObj ),
meType( eT ),
- mnStates( 0 )
+ mnStates( 0 ),
+ mpParentFrm( 0 )
{}
SwAccessibleEvent_Impl( EventType eT,
const SwAccessibleChild& rFrmOrObj )
: maFrmOrObj( rFrmOrObj ),
meType( eT ),
- mnStates( 0 )
+ mnStates( 0 ),
+ mpParentFrm( 0 )
{
ASSERT( SwAccessibleEvent_Impl::DISPOSE == meType,
"wrong event constructor, DISPOSE only" );
@@ -357,7 +385,8 @@ public:
SwAccessibleEvent_Impl( EventType eT )
: meType( eT ),
- mnStates( 0 )
+ mnStates( 0 ),
+ mpParentFrm( 0 )
{
ASSERT( SwAccessibleEvent_Impl::SHAPE_SELECTION == meType,
"wrong event constructor, SHAPE_SELECTION only" );
@@ -371,7 +400,8 @@ public:
mxAcc( pA ),
maFrmOrObj( rFrmOrObj ),
meType( eT ),
- mnStates( 0 )
+ mnStates( 0 ),
+ mpParentFrm( 0 )
{
ASSERT( SwAccessibleEvent_Impl::CHILD_POS_CHANGED == meType ||
SwAccessibleEvent_Impl::POS_CHANGED == meType,
@@ -386,12 +416,28 @@ public:
: mxAcc( pA ),
maFrmOrObj( rFrmOrObj ),
meType( eT ),
- mnStates( _nStates )
+ mnStates( _nStates ),
+ mpParentFrm( 0 )
{
ASSERT( SwAccessibleEvent_Impl::CARET_OR_STATES == meType,
"wrong event constructor, CARET_OR_STATES only" );
}
+ //IAccessibility2 Implementation 2009-----
+ SwAccessibleEvent_Impl( EventType eT,
+ const SwFrm *pParentFrm,
+ const SwAccessibleChild& rFrmOrObj,
+ const SwRect& rR ) :
+ maOldBox( rR ),
+ maFrmOrObj( rFrmOrObj ),
+ meType( eT ),
+ mnStates( 0 ),
+ mpParentFrm( pParentFrm )
+ {
+ OSL_ENSURE( SwAccessibleEvent_Impl::CHILD_POS_CHANGED == meType,
+ "wrong event constructor, CHILD_POS_CHANGED only" );
+ }
+ //-----IAccessibility2 Implementation 2009
// <SetType(..)> only used in method <SwAccessibleMap::AppendEvent(..)>
inline void SetType( EventType eT )
{
@@ -495,8 +541,47 @@ public:
{
return mbFiring;
}
+ //IAccessibility2 Implementation 2009-----
+ struct XAccisNULL
+ {
+ bool operator()(const SwAccessibleEvent_Impl& e)
+ {
+ return e.IsNoXaccParentFrm();
+ }
+ };
+ void MoveInvalidXAccToEnd();
+ //-----IAccessibility2 Implementation 2009
};
+//IAccessibility2 Implementation 2009-----
+void SwAccessibleEventList_Impl::MoveInvalidXAccToEnd()
+{
+ int nSize = size();
+ if (nSize < 2 )
+ {
+ return;
+ }
+ SwAccessibleEventList_Impl lstEvent;
+ iterator li = begin();
+ for ( ;li != end();)
+ {
+ SwAccessibleEvent_Impl e = *li;
+ if (e.IsNoXaccParentFrm())
+ {
+ iterator liNext = li;
+ ++liNext;
+ erase(li);
+ li = liNext;
+ lstEvent.insert(lstEvent.end(),e);
+ }
+ else
+ ++li;
+ }
+ OSL_ENSURE(size() + lstEvent.size() == nSize ,"");
+ insert(end(),lstEvent.begin(),lstEvent.end());
+ OSL_ENSURE(size() == nSize ,"");
+}
+//-----IAccessibility2 Implementation 2009
//------------------------------------------------------------------------------
// The shape list is filled if an accessible shape is destroyed. It
// simply keeps a reference to the accessible shape's XShape. These
@@ -827,6 +912,25 @@ static sal_Bool AreInSameTable( const uno::Reference< XAccessible >& rAcc,
void SwAccessibleMap::FireEvent( const SwAccessibleEvent_Impl& rEvent )
{
::vos::ORef < SwAccessibleContext > xAccImpl( rEvent.GetContext() );
+ //IAccessibility2 Implementation 2009-----
+ if (!xAccImpl.isValid() && rEvent.mpParentFrm != 0 )
+ {
+ SwAccessibleContextMap_Impl::iterator aIter =
+ mpFrmMap->find( rEvent.mpParentFrm );
+ if( aIter != mpFrmMap->end() )
+ {
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
+ if (xAcc.is())
+ {
+ uno::Reference < XAccessibleContext > xContext(xAcc,uno::UNO_QUERY);
+ if (xContext.is() && xContext->getAccessibleRole() == AccessibleRole::PARAGRAPH)
+ {
+ xAccImpl = static_cast< SwAccessibleContext *>( xAcc.get() );
+ }
+ }
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
if( SwAccessibleEvent_Impl::SHAPE_SELECTION == rEvent.GetType() )
{
DoInvalidateShapeSelection();
@@ -1044,8 +1148,323 @@ void SwAccessibleMap::InvalidateShapeSelection()
DoInvalidateShapeSelection();
}
}
+//IAccessibility2 Implementation 2009-----
+//This method should implement the following functions:
+//1.find the shape objects and set the selected state.
+//2.find the Swframe objects and set the selected state.
+//3.find the paragraph objects and set the selected state.
+void SwAccessibleMap::InvalidateShapeInParaSelection()
+{
+ SwAccessibleObjShape_Impl *pShapes = 0;
+ SwAccessibleObjShape_Impl *pSelShape = 0;
+ size_t nShapes = 0;
+
+ const ViewShell *pVSh = GetShell();
+ const SwFEShell *pFESh = dynamic_cast< const SwFEShell* >(pVSh);
+ SwPaM* pCrsr = pFESh ? pFESh->GetCrsr( sal_False /* ??? */ ) : NULL;//IAccessibility2 Implementation 2009
+
+ //sal_uInt16 nSelShapes = pFESh ? pFESh->IsObjSelected() : 0;
-void SwAccessibleMap::DoInvalidateShapeSelection()
+ {
+ vos::OGuard aGuard( maMutex );
+ if( mpShapeMap )
+ pShapes = mpShapeMap->Copy( nShapes, pFESh, &pSelShape );
+ }
+
+ sal_Bool bIsSelAll =IsDocumentSelAll();
+
+ if( mpShapeMap )
+ {
+ //Checked for shapes.
+ _SwAccessibleShapeMap_Impl::const_iterator aIter = mpShapeMap->begin();
+ _SwAccessibleShapeMap_Impl::const_iterator aEndIter = mpShapeMap->end();
+ ::vos::ORef< SwAccessibleContext > xParentAccImpl;
+
+ if( bIsSelAll)
+ {
+ while( aIter != aEndIter )
+ {
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
+ if( xAcc.is() )
+ (static_cast < ::accessibility::AccessibleShape* >(xAcc.get()))->SetState( AccessibleStateType::SELECTED );
+
+ ++aIter;
+ }
+ }
+ else
+ {
+ while( aIter != aEndIter )
+ {
+ sal_Bool bChanged = sal_False;
+ sal_Bool bMarked = sal_False;
+ SwAccessibleChild pFrm( (*aIter).first );
+
+ const SwFrmFmt *pFrmFmt = (*aIter).first ? ::FindFrmFmt( (*aIter).first ) : 0;
+ if( !pFrmFmt ) { ++aIter; continue; }
+ const SwFmtAnchor& pAnchor = pFrmFmt->GetAnchor();
+ const SwPosition *pPos = pAnchor.GetCntntAnchor();
+
+ if(pAnchor.GetAnchorId() == FLY_AT_PAGE)
+ {
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
+ if(xAcc.is())
+ (static_cast < ::accessibility::AccessibleShape* >(xAcc.get()))->ResetState( AccessibleStateType::SELECTED );
+
+ ++aIter; continue;
+ }
+
+ if( !pPos ) { ++aIter; continue; }
+ if( pPos->nNode.GetNode().GetTxtNode() )
+ {
+ int pIndex = pPos->nContent.GetIndex();
+ SwPaM* pTmpCrsr = pCrsr;
+ if( pTmpCrsr != NULL )
+ {
+ const SwTxtNode* pNode = pPos->nNode.GetNode().GetTxtNode();
+ sal_uLong nHere = pNode->GetIndex();
+
+ do
+ {
+ // ignore, if no mark
+ if( pTmpCrsr->HasMark() )
+ {
+ bMarked = sal_True;
+ // check whether nHere is 'inside' pCrsr
+ SwPosition* pStart = pTmpCrsr->Start();
+ sal_uLong nStartIndex = pStart->nNode.GetIndex();
+ SwPosition* pEnd = pTmpCrsr->End();
+ sal_uLong nEndIndex = pEnd->nNode.GetIndex();
+ if( ( nHere >= nStartIndex ) && (nHere <= nEndIndex) )
+ {
+ if( pAnchor.GetAnchorId() == FLY_AS_CHAR )
+ {
+ if( ( (nHere == nStartIndex) && (pIndex >= pStart->nContent.GetIndex()) || (nHere > nStartIndex) )
+ &&( (nHere == nEndIndex) && (pIndex < pEnd->nContent.GetIndex()) || (nHere < nEndIndex) ) )
+ {
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
+ if( xAcc.is() )
+ bChanged = (static_cast < ::accessibility::AccessibleShape* >(xAcc.get()))->SetState( AccessibleStateType::SELECTED );
+ }
+ else
+ {
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
+ if( xAcc.is() )
+ bChanged = (static_cast < ::accessibility::AccessibleShape* >(xAcc.get()))->ResetState( AccessibleStateType::SELECTED );
+ }
+ }
+ else if( pAnchor.GetAnchorId() == FLY_AT_PARA )
+ {
+ if( ((nHere > nStartIndex) || pStart->nContent.GetIndex() ==0 )
+ && (nHere < nEndIndex ) )
+ {
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
+ if( xAcc.is() )
+ bChanged = (static_cast < ::accessibility::AccessibleShape* >(xAcc.get()))->SetState( AccessibleStateType::SELECTED );
+ }
+ else
+ {
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
+ if(xAcc.is())
+ bChanged = (static_cast < ::accessibility::AccessibleShape* >(xAcc.get()))->ResetState( AccessibleStateType::SELECTED );
+ }
+ }
+ }
+ }
+ // next PaM in ring
+ pTmpCrsr = static_cast<SwPaM*>( pTmpCrsr->GetNext() );
+ }
+ while( pTmpCrsr != pCrsr );
+ }
+ if( !bMarked )
+ {
+ SwAccessibleObjShape_Impl *pShape = pShapes;
+ size_t nNumShapes = nShapes;
+ while( nNumShapes )
+ {
+ if( pShape < pSelShape && (pShape->first==(*aIter).first) )
+ {
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
+ if(xAcc.is())
+ bChanged = (static_cast < ::accessibility::AccessibleShape* >(xAcc.get()))->ResetState( AccessibleStateType::SELECTED );
+ }
+ --nNumShapes;
+ ++pShape;
+ }
+ }
+ }
+ ++aIter;
+ }//while( aIter != aEndIter )
+ }//else
+ }
+
+ //Checked for FlyFrm
+ SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->begin();
+ while( aIter != mpFrmMap->end() )
+ {
+ const SwFrm *pFrm = (*aIter).first;
+ if(pFrm->IsFlyFrm())
+ {
+ sal_Bool bFrmChanged = sal_False;
+ uno::Reference < XAccessible > xAcc = (*aIter).second;
+
+ if(xAcc.is())
+ {
+ SwAccessibleFrameBase *pAccFrame = (static_cast< SwAccessibleFrameBase * >(xAcc.get()));
+ bFrmChanged = pAccFrame->SetSelectedState( sal_True );
+ if (bFrmChanged)
+ {
+ const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( pFrm );
+ const SwFrmFmt *pFrmFmt = pFlyFrm->GetFmt();
+ if (pFrmFmt)
+ {
+ const SwFmtAnchor& pAnchor = pFrmFmt->GetAnchor();
+ if( pAnchor.GetAnchorId() == FLY_AS_CHAR )
+ {
+ uno::Reference< XAccessible > xAccParent = pAccFrame->getAccessibleParent();
+ if (xAccParent.is())
+ {
+ uno::Reference< XAccessibleContext > xAccContext = xAccParent->getAccessibleContext();
+ if(xAccContext.is() && xAccContext->getAccessibleRole() == AccessibleRole::PARAGRAPH)
+ {
+ SwAccessibleParagraph* pAccPara = static_cast< SwAccessibleParagraph *>(xAccContext.get());
+ if(pAccFrame->IsSeletedInDoc())
+ {
+ m_setParaAdd.insert(pAccPara);
+ }
+ else if(m_setParaAdd.count(pAccPara) == 0)
+ {
+ m_setParaRemove.insert(pAccPara);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ ++aIter;
+ }
+ typedef std::vector< SwAccessibleContext* > VEC_PARA;
+ VEC_PARA vecAdd;
+ VEC_PARA vecRemove;
+ //Checked for Paras.
+ SwPaM* pTmpCrsr = pCrsr;
+ sal_Bool bMarkChanged = sal_False;
+ SwAccessibleContextMap_Impl mapTemp;
+ if( pTmpCrsr != NULL )
+ {
+ do
+ {
+ if( pTmpCrsr->HasMark() )
+ {
+ SwNodeIndex nStartIndex( pTmpCrsr->Start()->nNode );
+ SwNodeIndex nEndIndex( pTmpCrsr->End()->nNode );
+ while(nStartIndex <= nEndIndex)
+ {
+ SwFrm *pFrm = NULL;
+ if(nStartIndex.GetNode().IsCntntNode())
+ {
+ SwCntntNode* pCNd = (SwCntntNode*)&(nStartIndex.GetNode());
+ SwClientIter aClientIter( *pCNd );
+ pFrm = dynamic_cast< SwFrm* >(aClientIter.SwClientIter_First());
+ }
+ else if( nStartIndex.GetNode().IsTableNode() )
+ {
+ SwTableNode * pTable= (SwTableNode *)&(nStartIndex.GetNode());
+ SwFrmFmt* pFmt = const_cast<SwFrmFmt*>(pTable->GetTable().GetFrmFmt());
+ SwClientIter aClientIter( *pFmt );
+ pFrm = dynamic_cast< SwFrm* >(aClientIter.SwClientIter_First());
+ }
+
+ if( pFrm && mpFrmMap)
+ {
+ aIter = mpFrmMap->find( pFrm );
+ if( aIter != mpFrmMap->end() )
+ {
+ uno::Reference < XAccessible > xAcc = (*aIter).second;
+ sal_Bool isChanged = sal_False;
+ if( xAcc.is() )
+ {
+ isChanged = (static_cast< SwAccessibleContext * >(xAcc.get()))->SetSelectedState( sal_True );
+ }
+ if(!isChanged)
+ {
+ SwAccessibleContextMap_Impl::iterator aEraseIter = mpSeletedFrmMap->find( pFrm );
+ if(aEraseIter != mpSeletedFrmMap->end())
+ mpSeletedFrmMap->erase(aEraseIter);
+ }
+ else
+ {
+ bMarkChanged = sal_True;
+ vecAdd.push_back(static_cast< SwAccessibleContext * >(xAcc.get()));
+ }
+
+ mapTemp.insert( SwAccessibleContextMap_Impl::value_type( pFrm, xAcc ) );
+ }
+ }
+ nStartIndex++;
+ }
+ }
+ pTmpCrsr = static_cast<SwPaM*>( pTmpCrsr->GetNext() );
+ }
+ while( pTmpCrsr != pCrsr );
+ }
+ if( !mpSeletedFrmMap )
+ mpSeletedFrmMap = new SwAccessibleContextMap_Impl;
+ if( !mpSeletedFrmMap->empty() )
+ {
+ aIter = mpSeletedFrmMap->begin();
+ while( aIter != mpSeletedFrmMap->end() )
+ {
+ uno::Reference < XAccessible > xAcc = (*aIter).second;
+ if(xAcc.is())
+ (static_cast< SwAccessibleContext * >(xAcc.get()))->SetSelectedState( sal_False );
+ ++aIter;
+ vecRemove.push_back(static_cast< SwAccessibleContext * >(xAcc.get()));
+ }
+ bMarkChanged = sal_True;
+ mpSeletedFrmMap->clear();
+ }
+
+ if( !mapTemp.empty() )
+ {
+ aIter = mapTemp.begin();
+ while( aIter != mapTemp.end() )
+ {
+ mpSeletedFrmMap->insert( SwAccessibleContextMap_Impl::value_type( (*aIter).first, (*aIter).second ) );
+ ++aIter;
+ }
+ mapTemp.clear();
+ }
+ if( bMarkChanged && mpFrmMap)
+ {
+ VEC_PARA::iterator vi = vecAdd.begin();
+ for (; vi != vecAdd.end() ; ++vi)
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
+ SwAccessibleContext* pAccPara = *vi;
+ if (pAccPara)
+ {
+ pAccPara->FireAccessibleEvent( aEvent );
+ }
+ }
+ vi = vecRemove.begin();
+ for (; vi != vecRemove.end() ; ++vi)
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_REMOVE;
+ SwAccessibleContext* pAccPara = *vi;
+ if (pAccPara)
+ {
+ pAccPara->FireAccessibleEvent( aEvent );
+ }
+ }
+ }
+}
+
+//Marge with DoInvalidateShapeFocus
+void SwAccessibleMap::DoInvalidateShapeSelection(sal_Bool bInvalidateFocusMode /*=sal_False*/)
{
SwAccessibleObjShape_Impl *pShapes = 0;
SwAccessibleObjShape_Impl *pSelShape = 0;
@@ -1055,6 +1474,13 @@ void SwAccessibleMap::DoInvalidateShapeSelection()
const SwFEShell *pFESh = dynamic_cast< const SwFEShell * >( pVSh );
sal_uInt32 nSelShapes = pFESh ? pFESh->GetNumberOfSelectedObjects() : 0;
+
+ //when InvalidateFocus Call this function ,and the current selected shape count is not 1 ,
+ //return
+ if (bInvalidateFocusMode && nSelShapes != 1)
+ {
+ return;
+ }
{
vos::OGuard aGuard( maMutex );
if( mpShapeMap )
@@ -1063,24 +1489,71 @@ void SwAccessibleMap::DoInvalidateShapeSelection()
if( pShapes )
{
- ::std::list< const SwFrm * > aParents;
+ typedef std::vector< ::vos::ORef < ::accessibility::AccessibleShape > > VEC_SHAPE;
+ VEC_SHAPE vecxShapeAdd;
+ VEC_SHAPE vecxShapeRemove;
+ int nCountSelectedShape=0;
+
Window *pWin = GetShell()->GetWin();
sal_Bool bFocused = pWin && pWin->HasFocus();
SwAccessibleObjShape_Impl *pShape = pShapes;
+ int nShapeCount = nShapes;
+ while( nShapeCount )
+ {
+ //if( pShape->second.isValid() )
+ if (pShape->second.isValid() && IsInSameLevel(pShape->first, pFESh))
+ {
+ if( pShape < pSelShape )
+ {
+ if(pShape->second->ResetState( AccessibleStateType::SELECTED ))
+ {
+ vecxShapeRemove.push_back(pShape->second);
+ }
+ pShape->second->ResetState( AccessibleStateType::FOCUSED );
+ }
+ }
+ --nShapeCount;
+ ++pShape;
+ }
+
+ VEC_SHAPE::iterator vi =vecxShapeRemove.begin();
+ for (; vi != vecxShapeRemove.end(); ++vi)
+ {
+ ::accessibility::AccessibleShape *pAccShape = static_cast< ::accessibility::AccessibleShape * >(vi->getBodyPtr());
+ if (pAccShape)
+ {
+ pAccShape->CommitChange(AccessibleEventId::SELECTION_CHANGED_REMOVE, uno::Any(), uno::Any());
+ }
+ }
+
+ pShape = pShapes;
while( nShapes )
{
- if( pShape->second.isValid() )
+ //if( pShape->second.isValid() )
+ if (pShape->second.isValid() && IsInSameLevel(pShape->first, pFESh))
{
- sal_Bool bChanged;
+ // IA2 - why?
+ // sal_Bool bChanged;
if( pShape >= pSelShape )
{
- bChanged =
- pShape->second->SetState( AccessibleStateType::SELECTED );
+ // IA2: first fire focus event
+ // bChanged = pShape->second->SetState( AccessibleStateType::SELECTED );
+
+ //first fire focus event
if( bFocused && 1 == nSelShapes )
pShape->second->SetState( AccessibleStateType::FOCUSED );
else
pShape->second->ResetState( AccessibleStateType::FOCUSED );
+
+ // IA2 CWS:
+ if(pShape->second->SetState( AccessibleStateType::SELECTED ))
+ {
+ vecxShapeAdd.push_back(pShape->second);
+ }
+ ++nCountSelectedShape;
}
+ /* MT: This still was in DEV300m80, but was removed in IA2 CWS.
+ Someone needs to check what should happen here, see original diff CWS oo31ia2 vs. OOO310M11
else
{
bChanged =
@@ -1094,47 +1567,97 @@ void SwAccessibleMap::DoInvalidateShapeSelection()
GetShell()->IsPreView() );
aParents.push_back( pParent );
}
+ */
}
--nShapes;
++pShape;
}
- if( aParents.size() > 0 )
+
+ const int SELECTION_WITH_NUM =10;
+ if (vecxShapeAdd.size() > SELECTION_WITH_NUM )
{
- ::std::list< const SwFrm * >::const_iterator aIter = aParents.begin();
- ::std::list< const SwFrm * >::const_iterator aEndIter = aParents.end();
- while( aIter != aEndIter )
+ uno::Reference< XAccessible > xDoc = GetDocumentView( );
+ SwAccessibleContext * pCont = static_cast<SwAccessibleContext *>(xDoc.get());
+ if (pCont)
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_WITHIN;
+ pCont->FireAccessibleEvent(aEvent);
+ }
+ }
+ else
+ {
+ short nEventID = AccessibleEventId::SELECTION_CHANGED_ADD;
+ if (nCountSelectedShape <= 1 && vecxShapeAdd.size() == 1 )
+ {
+ nEventID = AccessibleEventId::SELECTION_CHANGED;
+ }
+ vi = vecxShapeAdd.begin();
+ for (; vi != vecxShapeAdd.end(); ++vi)
{
- ::vos::ORef< SwAccessibleContext > xParentAccImpl;
+ ::accessibility::AccessibleShape *pAccShape = static_cast< ::accessibility::AccessibleShape * >(vi->getBodyPtr());
+ if (pAccShape)
{
- vos::OGuard aGuard( maMutex );
- if( mpFrmMap )
+ pAccShape->CommitChange(nEventID, uno::Any(), uno::Any());
+ }
+ }
+ }
+
+ vi = vecxShapeAdd.begin();
+ for (; vi != vecxShapeAdd.end(); ++vi)
+ {
+ ::accessibility::AccessibleShape *pAccShape = static_cast< ::accessibility::AccessibleShape * >(vi->getBodyPtr());
+ if (pAccShape)
+ {
+ SdrObject *pObj = GetSdrObjectFromXShape(pAccShape->GetXShape());
+ SwFrmFmt *pFrmFmt = pObj ? FindFrmFmt( pObj ) : NULL;
+ if (pFrmFmt)
+ {
+ const SwFmtAnchor& pAnchor = pFrmFmt->GetAnchor();
+ if( pAnchor.GetAnchorId() == FLY_AS_CHAR )
{
- SwAccessibleContextMap_Impl::const_iterator aMapIter =
- mpFrmMap->find( *aIter );
- if( aMapIter != mpFrmMap->end() )
+ uno::Reference< XAccessible > xPara = pAccShape->getAccessibleParent();
+ if (xPara.is())
{
- uno::Reference < XAccessible > xAcc( (*aMapIter).second );
- xParentAccImpl =
- static_cast< SwAccessibleContext *>( xAcc.get() );
+ uno::Reference< XAccessibleContext > xParaContext = xPara->getAccessibleContext();
+ if (xParaContext.is() && xParaContext->getAccessibleRole() == AccessibleRole::PARAGRAPH)
+ {
+ SwAccessibleParagraph* pAccPara = static_cast< SwAccessibleParagraph *>(xPara.get());
+ if (pAccPara)
+ {
+ m_setParaAdd.insert(pAccPara);
+ }
+ }
}
}
}
- if( xParentAccImpl.isValid() )
+ }
+ }
+ vi = vecxShapeRemove.begin();
+ for (; vi != vecxShapeRemove.end(); ++vi)
+ {
+ ::accessibility::AccessibleShape *pAccShape = static_cast< ::accessibility::AccessibleShape * >(vi->getBodyPtr());
+ if (pAccShape)
+ {
+ uno::Reference< XAccessible > xPara = pAccShape->getAccessibleParent();
+ uno::Reference< XAccessibleContext > xParaContext = xPara->getAccessibleContext();
+ if (xParaContext.is() && xParaContext->getAccessibleRole() == AccessibleRole::PARAGRAPH)
{
- AccessibleEventObject aEvent;
- aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
- xParentAccImpl->FireAccessibleEvent( aEvent );
+ SwAccessibleParagraph* pAccPara = static_cast< SwAccessibleParagraph *>(xPara.get());
+ if (m_setParaAdd.count(pAccPara) == 0 )
+ {
+ m_setParaRemove.insert(pAccPara);
+ }
}
-
- ++aIter;
}
}
-
delete[] pShapes;
}
}
+//Marge with DoInvalidateShapeSelection
+/*
void SwAccessibleMap::DoInvalidateShapeFocus()
{
const ViewShell *pVSh = GetShell();
@@ -1177,7 +1700,8 @@ void SwAccessibleMap::DoInvalidateShapeFocus()
delete[] pShapes;
}
}
-
+*/
+//-----IAccessibility2 Implementation 2009
SwAccessibleMap::SwAccessibleMap( ViewShell *pSh ) :
mpFrmMap( 0 ),
@@ -1193,7 +1717,8 @@ SwAccessibleMap::SwAccessibleMap( ViewShell *pSh ) :
mnPara( 1 ),
mnFootnote( 1 ),
mnEndnote( 1 ),
- mbShapeSelected( sal_False )
+ mbShapeSelected( sal_False ),
+ mpSeletedFrmMap(NULL)//IAccessibility2 Implementation 2009
{
pSh->GetLayout()->AddAccessibleShell();
}
@@ -1214,10 +1739,28 @@ SwAccessibleMap::~SwAccessibleMap()
}
}
+ //IAccessibility2 Implementation 2009-----
+ if(xAcc.is())
+ {
SwAccessibleDocument *pAcc =
static_cast< SwAccessibleDocument * >( xAcc.get() );
pAcc->Dispose( sal_True );
-
+ }
+ if( mpFrmMap )
+ {
+ SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->begin();
+ while( aIter != mpFrmMap->end() )
+ {
+ uno::Reference < XAccessible > xTmp = (*aIter).second;
+ if( xTmp.is() )
+ {
+ SwAccessibleContext *pTmp = static_cast< SwAccessibleContext * >( xTmp.get() );
+ pTmp->SetMap(NULL);
+ }
+ ++aIter;
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
{
vos::OGuard aGuard( maMutex );
#ifdef DBG_UTIL
@@ -1298,6 +1841,7 @@ SwAccessibleMap::~SwAccessibleMap()
mpEvents = 0;
}
mpVSh->GetLayout()->RemoveAccessibleShell();
+ delete mpSeletedFrmMap;//IAccessibility2 Implementation 2009
}
uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView(
@@ -1429,7 +1973,7 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm,
sal_Bool bIsEndnote =
SwAccessibleFootnote::IsEndnote( pFtnFrm );
pAcc = new SwAccessibleFootnote( this, bIsEndnote,
- (bIsEndnote ? mnEndnote++ : mnFootnote++),
+ /*(bIsEndnote ? mnEndnote++ : mnFootnote++),*/
pFtnFrm );
}
break;
@@ -1584,6 +2128,10 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext(
}
// TODO: focus!!!
}
+ //IAccessibility2 Implementation 2009-----
+ if (xAcc.is())
+ AddGroupContext(pObj, xAcc);
+ //-----IAccessibility2 Implementation 2009
}
}
}
@@ -1594,6 +2142,105 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext(
return xAcc;
}
+//IAccessibility2 Implementation 2009-----
+sal_Bool SwAccessibleMap::IsInSameLevel(const SdrObject* pObj, const SwFEShell* pFESh)
+{
+ if (pFESh && pObj)
+ return pFESh->IsObjSameLevelWithMarked(*pObj);
+ return sal_False;
+}
+void SwAccessibleMap::AddShapeContext(const SdrObject *pObj, uno::Reference < XAccessible > xAccShape)
+{
+ vos::OGuard aGuard( maMutex );
+
+ if( mpShapeMap )
+ {
+ SwAccessibleShapeMap_Impl::value_type aEntry( pObj, xAccShape );
+ mpShapeMap->insert( aEntry );
+ }
+
+}
+
+//Added by yanjun for sym2_6407
+void SwAccessibleMap::RemoveGroupContext(const SdrObject *pParentObj, ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > xAccParent)
+{
+ vos::OGuard aGuard( maMutex );
+ if (mpShapeMap && pParentObj && pParentObj->getChildrenOfSdrObject() && xAccParent.is())
+ {
+ uno::Reference < XAccessibleContext > xContext = xAccParent->getAccessibleContext();
+ if (xContext.is())
+ {
+ for (sal_Int32 i = 0; i < xContext->getAccessibleChildCount(); ++i)
+ {
+ uno::Reference < XAccessible > xChild = xContext->getAccessibleChild(i);
+ if (xChild.is())
+ {
+ uno::Reference < XAccessibleContext > xChildContext = xChild->getAccessibleContext();
+ if (xChildContext.is())
+ {
+ if (xChildContext->getAccessibleRole() == AccessibleRole::SHAPE)
+ {
+ ::accessibility::AccessibleShape* pAccShape = static_cast < ::accessibility::AccessibleShape* >( xChild.get());
+ uno::Reference < drawing::XShape > xShape = pAccShape->GetXShape();
+ if (xShape.is())
+ {
+ SdrObject* pObj = GetSdrObjectFromXShape(xShape);
+ if (pObj)
+ RemoveContext(pObj);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+//End
+
+
+void SwAccessibleMap::AddGroupContext(const SdrObject *pParentObj, uno::Reference < XAccessible > xAccParent)
+{
+ vos::OGuard aGuard( maMutex );
+ if( mpShapeMap )
+ {
+ //here get all the sub list.
+ if (pParentObj->getChildrenOfSdrObject())
+ {
+ if (xAccParent.is())
+ {
+ uno::Reference < XAccessibleContext > xContext = xAccParent->getAccessibleContext();
+ if (xContext.is())
+ {
+ sal_Int32 nChildren = xContext->getAccessibleChildCount();
+ for(sal_Int32 i = 0; i<nChildren; i++)
+ {
+ uno::Reference < XAccessible > xChild = xContext->getAccessibleChild(i);
+ if (xChild.is())
+ {
+ uno::Reference < XAccessibleContext > xChildContext = xChild->getAccessibleContext();
+ if (xChildContext.is())
+ {
+ short nRole = xChildContext->getAccessibleRole();
+ if (nRole == AccessibleRole::SHAPE)
+ {
+ ::accessibility::AccessibleShape* pAccShape = static_cast < ::accessibility::AccessibleShape* >( xChild.get());
+ uno::Reference < drawing::XShape > xShape = pAccShape->GetXShape();
+ if (xShape.is())
+ {
+ SdrObject* pObj = GetSdrObjectFromXShape(xShape);
+ AddShapeContext(pObj, xChild);
+ AddGroupContext(pObj,xChild);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+//-----IAccessibility2 Implementation 2009
::vos::ORef < ::accessibility::AccessibleShape > SwAccessibleMap::GetContextImpl(
const SdrObject *pObj,
@@ -1656,13 +2303,16 @@ void SwAccessibleMap::RemoveContext( const SdrObject *pObj )
mpShapeMap->find( pObj );
if( aIter != mpShapeMap->end() )
{
+ //IAccessible2 Implementation 2009 ----
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
mpShapeMap->erase( aIter );
-
+ RemoveGroupContext(pObj, xAcc);
// The shape selection flag is not cleared, but one might do
// so but has to make sure that the removed context is the one
// that is selected.
- if( mpShapeMap->empty() )
+ if( mpShapeMap && mpShapeMap->empty() )
+ //---- IAccessible2 Implementation 2009
{
delete mpShapeMap;
mpShapeMap = 0;
@@ -1809,6 +2459,7 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm,
{
::vos::ORef< SwAccessibleContext > xAccImpl;
::vos::ORef< SwAccessibleContext > xParentAccImpl;
+ const SwFrm *pParent =NULL; //IAccessibility2 Implementation 2009
{
vos::OGuard aGuard( maMutex );
@@ -1831,7 +2482,7 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm,
{
// Otherwise we look if the parent is accessible.
// If not, there is nothing to do.
- const SwFrm *pParent =
+ pParent = //IAccessibility2 Implementation 2009
SwAccessibleFrame::GetParent( aFrmOrObj,
GetShell()->IsPreView());
@@ -1881,7 +2532,54 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm,
rOldBox );
}
}
+ //IAccessibility2 Implementation 2009-----
+ else if(pParent)
+ {
+/*
+For child graphic and it's parent paragraph,if split 2 graphic to 2 paragraph,
+will delete one graphic swfrm and new create 1 graphic swfrm ,
+then the new paragraph and the new graphic SwFrm will add .
+but when add graphic SwFrm ,the accessible of the new Paragraph is not created yet.
+so the new graphic accessible 'parent is NULL,
+so run here: save the parent's SwFrm not the accessible object parent,
+*/
+ sal_Bool bIsValidFrm = sal_False;
+ sal_Bool bIsTxtParent = sal_False;
+ if (aFrmOrObj.GetSwFrm())
+ {
+ int nType = pFrm->GetType();
+ if ( FRM_FLY == nType )
+ {
+ bIsValidFrm =sal_True;
+ }
+ }
+ else if(pObj)
+ {
+ int nType = pParent->GetType();
+ if (FRM_TXT == nType)
+ {
+ bIsTxtParent =sal_True;
+ }
+ }
+// sal_Bool bIsVisibleChildrenOnly =aFrmOrObj.IsVisibleChildrenOnly() ;
+// sal_Bool bIsBoundAsChar =aFrmOrObj.IsBoundAsChar() ;//bIsVisibleChildrenOnly && bIsBoundAsChar &&
+ if((bIsValidFrm || bIsTxtParent) )
+ {
+ if( GetShell()->ActionPend() )
+ {
+ SwAccessibleEvent_Impl aEvent(
+ SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
+ pParent, aFrmOrObj, rOldBox );
+ AppendEvent( aEvent );
+ }
+ else
+ {
+ OSL_ENSURE(false,"");
+ }
+ }
+ }
}
+ //-----IAccessibility2 Implementation 2009
}
void SwAccessibleMap::InvalidateContent( const SwFrm *pFrm )
@@ -2020,6 +2718,29 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm )
mpFrmMap->find( aFrmOrObj.GetSwFrm() );
if( aIter != mpFrmMap->end() )
xAcc = (*aIter).second;
+ //IAccessibility2 Implementation 2009-----
+ else
+ {
+ SwRect rcEmpty;
+ const SwTabFrm* pTabFrm = aFrmOrObj.GetSwFrm()->FindTabFrm();
+ if (pTabFrm)
+ {
+ InvalidatePosOrSize(pTabFrm,0,0,rcEmpty);
+ }
+ else
+ {
+ InvalidatePosOrSize(aFrmOrObj.GetSwFrm(),0,0,rcEmpty);
+ }
+
+
+ aIter =
+ mpFrmMap->find( aFrmOrObj.GetSwFrm() );
+ if( aIter != mpFrmMap->end() )
+ {
+ xAcc = (*aIter).second;
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
// For cells, some extra thoughts are necessary,
// because invalidating the cursor for one cell
@@ -2048,18 +2769,204 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm )
xAcc = GetContext( aFrmOrObj.GetSwFrm(), sal_True );
}
}
+ //IAccessibility2 Implementation 2009-----
+ else if (bShapeSelected)
+ {
+ const SwFEShell *pFESh = pVSh ? static_cast< const SwFEShell * >( pVSh ) : NULL ;
+ if(pFESh)
+ {
+ SdrObject* pObj = pFESh->getSingleSelected();
+
+ if(pObj)
+ {
+ ::vos::ORef < ::accessibility::AccessibleShape > pAccShapeImpl = GetContextImpl(pObj,NULL,sal_False);
+
+ if (!pAccShapeImpl.isValid())
+ {
+ while(pObj && pObj->GetParentSdrObject())
+ {
+ pObj = pObj->GetParentSdrObject();
+ }
+
+ if (pObj != NULL)
+ {
+ const SwFrm *pParent = SwAccessibleFrame::GetParent( SwAccessibleChild(pObj), GetShell()->IsPreView() );
+ if( pParent )
+ {
+ ::vos::ORef< SwAccessibleContext > xParentAccImpl = GetContextImpl(pParent,sal_False);
+ if (!xParentAccImpl.isValid())
+ {
+ const SwTabFrm* pTabFrm = pParent->FindTabFrm();
+ if (pTabFrm)
+ {
+ //The Table should not add in acc.because the "pParent" is not add to acc .
+ uno::Reference< XAccessible> xAccParentTab = GetContext(pTabFrm,sal_True);//Should Create.
+
+ const SwFrm *pParentRoot = SwAccessibleFrame::GetParent( SwAccessibleChild(pTabFrm), GetShell()->IsPreView() );
+ if (pParentRoot)
+ {
+ ::vos::ORef< SwAccessibleContext > xParentAccImplRoot = GetContextImpl(pParentRoot,sal_False);
+ if(xParentAccImplRoot.isValid())
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CHILD;
+ aEvent.NewValue <<= xAccParentTab;
+ xParentAccImplRoot->FireAccessibleEvent( aEvent );
+ }
+ }
+
+ //Get "pParent" acc again.
+ xParentAccImpl = GetContextImpl(pParent,sal_False);
+ }
+ else
+ {
+ //directly create this acc para .
+ xParentAccImpl = GetContextImpl(pParent,sal_True);//Should Create.
+
+ const SwFrm *pParentRoot = SwAccessibleFrame::GetParent( SwAccessibleChild(pParent), GetShell()->IsPreView() );
+
+ ::vos::ORef< SwAccessibleContext > xParentAccImplRoot = GetContextImpl(pParentRoot,sal_False);
+ if(xParentAccImplRoot.isValid())
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CHILD;
+ aEvent.NewValue <<= uno::Reference< XAccessible>(xParentAccImpl.getBodyPtr());
+ xParentAccImplRoot->FireAccessibleEvent( aEvent );
+ }
+ }
+ }
+ if (xParentAccImpl.isValid())
+ {
+ uno::Reference< XAccessible> xAccShape =
+ GetContext(pObj,xParentAccImpl.getBodyPtr(),sal_True);
+
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CHILD;
+ aEvent.NewValue <<= xAccShape;
+ xParentAccImpl->FireAccessibleEvent( aEvent );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
+ m_setParaAdd.clear();
+ m_setParaRemove.clear();
if( xOldAcc.is() && xOldAcc != xAcc )
InvalidateCursorPosition( xOldAcc );
if( bOldShapeSelected || bShapeSelected )
InvalidateShapeSelection();
if( xAcc.is() )
InvalidateCursorPosition( xAcc );
+
+ InvalidateShapeInParaSelection();
+
+ SET_PARA::iterator si = m_setParaRemove.begin();
+ for (; si != m_setParaRemove.end() ; ++si)
+ {
+ SwAccessibleParagraph* pAccPara = *si;
+ if(pAccPara && pAccPara->getSelectedAccessibleChildCount() == 0 && pAccPara->getSelectedText().getLength() == 0)
+ {
+ if(pAccPara->SetSelectedState(sal_False))
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_REMOVE;
+ pAccPara->FireAccessibleEvent( aEvent );
+ }
+ }
+ }
+ si = m_setParaAdd.begin();
+ for (; si != m_setParaAdd.end() ; ++si)
+ {
+ SwAccessibleParagraph* pAccPara = *si;
+ if(pAccPara && pAccPara->SetSelectedState(sal_True))
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
+ pAccPara->FireAccessibleEvent( aEvent );
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
+}
+
+//IAccessibility2 Implementation 2009-----
+//Notify the page change event to bridge.
+void SwAccessibleMap::FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage)
+{
+ uno::Reference<XAccessible> xAcc = GetDocumentView( );
+ if ( xAcc.is() )
+ {
+ SwAccessibleDocumentBase *pAcc =
+ static_cast< SwAccessibleDocumentBase * >( xAcc.get() );
+ if (pAcc)
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::PAGE_CHANGED;
+ aEvent.OldValue <<= nOldPage;
+ aEvent.NewValue <<= nNewPage;
+ pAcc->FireAccessibleEvent( aEvent );
+ }
+ }
+}
+
+void SwAccessibleMap::FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection)
+{
+ uno::Reference<XAccessible> xAcc = GetDocumentView( );
+ if ( xAcc.is() )
+ {
+ SwAccessibleDocumentBase *pAcc =
+ static_cast< SwAccessibleDocumentBase * >( xAcc.get() );
+ if (pAcc)
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::SECTION_CHANGED;
+ aEvent.OldValue <<= nOldSection;
+ aEvent.NewValue <<= nNewSection;
+ pAcc->FireAccessibleEvent( aEvent );
+
+ }
+ }
}
+void SwAccessibleMap::FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn)
+{
+ uno::Reference<XAccessible> xAcc = GetDocumentView( );
+ if ( xAcc.is() )
+ {
+ SwAccessibleDocumentBase *pAcc =
+ static_cast< SwAccessibleDocumentBase * >( xAcc.get() );
+ if (pAcc)
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::COLUMN_CHANGED;
+ aEvent.OldValue <<= nOldColumn;
+ aEvent.NewValue <<= nNewColumn;
+ pAcc->FireAccessibleEvent( aEvent );
+
+ }
+ }
+}
+//-----IAccessibility2 Implementation 2009
void SwAccessibleMap::InvalidateFocus()
{
+ //IAccessibility2 Implementation 2009-----
+ if(GetShell()->IsPreView())
+ {
+ uno::Reference<XAccessible> xAcc = _GetDocumentView( sal_True );
+ if (xAcc.get())
+ {
+ SwAccessiblePreview *pAccPreview = static_cast<SwAccessiblePreview *>(xAcc.get());
+ if (pAccPreview)
+ {
+ pAccPreview->InvalidateFocus();
+ return ;
+ }
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
uno::Reference < XAccessible > xAcc;
sal_Bool bShapeSelected;
{
@@ -2075,10 +2982,12 @@ void SwAccessibleMap::InvalidateFocus()
static_cast< SwAccessibleContext *>( xAcc.get() );
pAccImpl->InvalidateFocus();
}
- else if( bShapeSelected )
+ //IAccessibility2 Implementation 2009-----
+ else
{
- DoInvalidateShapeFocus();
+ DoInvalidateShapeSelection(sal_True);
}
+ //-----IAccessibility2 Implementation 2009
}
void SwAccessibleMap::SetCursorContext(
@@ -2361,6 +3270,9 @@ void SwAccessibleMap::FireEvents()
if( mpEvents )
{
mpEvents->SetFiring();
+ //IAccessibility2 Implementation 2009-----
+ mpEvents->MoveInvalidXAccToEnd();
+ //-----IAccessibility2 Implementation 2009
SwAccessibleEventList_Impl::iterator aIter = mpEvents->begin();
while( aIter != mpEvents->end() )
{
@@ -2551,6 +3463,94 @@ sal_Bool SwAccessibleMap::ReplaceChild (
return sal_True;
}
+//IAccessibility2 Implementation 2009-----
+//Get the accessible control shape from the model object, here model object is with XPropertySet type
+::accessibility::AccessibleControlShape * SwAccessibleMap::GetAccControlShapeFromModel(::com::sun::star::beans::XPropertySet* pSet) throw (::com::sun::star::uno::RuntimeException)
+{
+ if( mpShapeMap )
+ {
+ SwAccessibleShapeMap_Impl::const_iterator aIter = mpShapeMap->begin();
+ SwAccessibleShapeMap_Impl::const_iterator aEndIter = mpShapeMap->end();
+ while( aIter != aEndIter)
+ {
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
+ ::accessibility::AccessibleShape *pAccShape =
+ static_cast < ::accessibility::AccessibleShape* >( xAcc.get() );
+ if(pAccShape && ::accessibility::ShapeTypeHandler::Instance().GetTypeId (pAccShape->GetXShape()) == ::accessibility::DRAWING_CONTROL)
+ {
+ ::accessibility::AccessibleControlShape *pCtlAccShape = static_cast < ::accessibility::AccessibleControlShape* >(pAccShape);
+ if (pCtlAccShape && pCtlAccShape->GetControlModel() == pSet)
+ return pCtlAccShape;
+ }
+ ++aIter;
+ }
+ }
+ return NULL;
+}
+
+::com::sun::star::uno::Reference< XAccessible >
+ SwAccessibleMap::GetAccessibleCaption (const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ SdrObject* captionedObject = GetSdrObjectFromXShape(xShape);
+
+ // replace formally used 'GetUserCall()' by new notify/listener mechanism
+ const SwDrawContact* pContact = static_cast< const SwDrawContact* >(findConnectionToSdrObject(captionedObject));
+
+ ASSERT( RES_DRAWFRMFMT == pContact->GetFmt()->Which(),
+ "fail" );
+ if( !pContact )
+ return 0;
+
+ SwDrawFrmFmt *pCaptionedFmt = (SwDrawFrmFmt *)pContact->GetFmt();
+ if( !pCaptionedFmt )
+ return 0;
+
+ SwFlyFrm* pFrm = NULL;
+ if (pCaptionedFmt->HasCaption())
+ {
+ const SwFrmFmt *pCaptionFrmFmt = pCaptionedFmt->GetCaptionFmt();
+ SwClientIter aIter (*(SwModify*)pCaptionFrmFmt);
+ pFrm = dynamic_cast< SwFlyFrm* >(aIter.SwClientIter_First());
+ }
+ if (!pFrm)
+ return 0;
+ //SwFrmFmt* pFrm = pCaptionedFmt->GetCaptionFmt();
+ uno::Reference < XAccessible > xAcc( GetContext((SwFrm*)pFrm,sal_True) );
+ //Reference < XAccessibleShape > xAccShape( xAcc, UNO_QUERY );
+
+ uno::Reference< XAccessibleContext > xAccContext = xAcc->getAccessibleContext();
+ if( xAccContext.is() )
+ { //get the parent of caption frame, which is paragaph
+ uno::Reference< XAccessible > xAccParent = xAccContext->getAccessibleParent();
+ if(xAccParent.is())
+ {
+ //get the great parent of caption frame which is text frame.
+ uno::Reference< XAccessibleContext > xAccParentContext = xAccParent->getAccessibleContext();
+ uno::Reference< XAccessible > xAccGreatParent = xAccParentContext->getAccessibleParent();
+ if(xAccGreatParent.is())
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CHILD;
+ aEvent.NewValue <<= xAccParent;
+ ( static_cast< SwAccessibleContext * >(xAccGreatParent.get()) )->FireAccessibleEvent( aEvent );
+
+ }
+
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CHILD;
+ aEvent.NewValue <<= xAcc;
+ ( static_cast< SwAccessibleContext * >(xAccParent.get()) )->FireAccessibleEvent( aEvent );
+ }
+ }
+
+ if(xAcc.get())
+ return xAcc;
+ else
+ return NULL;
+
+}
+//-----IAccessibility2 Implementation 2009
Point SwAccessibleMap::PixelToCore( const Point& rPoint ) const
{
Point aPoint;
@@ -2876,3 +3876,10 @@ const SwRect& SwAccessibleMap::GetVisArea() const
: GetShell()->VisArea();
}
+//IAccessibility2 Implementation 2009-----
+sal_Bool SwAccessibleMap::IsDocumentSelAll()
+{
+ return GetShell()->GetDoc()->IsPrepareSelAll();
+}
+//-----IAccessibility2 Implementation 2009
+
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index f33498e9e06d..3c330dd17b0b 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -39,10 +39,20 @@
#include <hints.hxx>
// <--
#include "accnotextframe.hxx"
+//IAccessibility2 Implementation 2009-----
+#include <fmturl.hxx>
+#include <accnotexthyperlink.hxx>
+#include <svtools/imap.hxx>
+#include <unotools/accessiblerelationsethelper.hxx>
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
+#include <doc.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
using ::rtl::OUString;
+using utl::AccessibleRelationSetHelper;
+//-----IAccessibility2 Implementation 2009
const SwNoTxtNode *SwAccessibleNoTextFrame::GetNoTxtNode() const
{
@@ -52,7 +62,13 @@ const SwNoTxtNode *SwAccessibleNoTextFrame::GetNoTxtNode() const
{
const SwCntntFrm *pCntFrm =
static_cast<const SwCntntFrm *>( pFlyFrm->Lower() );
- pNd = pCntFrm->GetNode()->GetNoTxtNode();
+ //IAccessibility2 Implementation 2009-----
+ const SwCntntNode* pSwCntntNode = pCntFrm->GetNode();
+ if(pSwCntntNode != NULL)
+ {
+ pNd = pSwCntntNode->GetNoTxtNode();
+ }
+ //-----IAccessibility2 Implementation 2009
}
return pNd;
@@ -203,6 +219,12 @@ OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleDescription (void)
vos::OGuard aGuard(Application::GetSolarMutex());
CHECK_FOR_DEFUNC( XAccessibleContext )
+ //IAccessibility2 Implementation 2009-----
+ // OUString longDesc;
+ // const SwFlyFrmFmt* pFlyFmt = GetShell()->GetDoc()->FindFlyByName( GetName(), 0);
+ // longDesc = OUString( pFlyFmt->GetLongDescription() );
+ // return longDesc; MT: Do not return longDesc, which still is empty - why was the line above commented out?
+ //-----IAccessibility2 Implementation 2009
return msDesc;
}
@@ -224,6 +246,15 @@ uno::Any SAL_CALL SwAccessibleNoTextFrame::queryInterface( const uno::Type& aTyp
aAny <<= xImage;
return aAny;
}
+ //IAccessibility2 Implementation 2009-----
+ else if ( aType == ::getCppuType((uno::Reference<XAccessibleHypertext> *)0) )
+ {
+ uno::Reference<XAccessibleHypertext> aAccHypertext = this;
+ uno::Any aAny;
+ aAny <<= aAccHypertext;
+ return aAny;
+ }
+ //-----IAccessibility2 Implementation 2009
else
return SwAccessibleContext::queryInterface( aType );
}
@@ -269,3 +300,137 @@ sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageWidth( )
{
return getSize().Width;
}
+//IAccessibility2 Implementation 2009-----
+//===== XAccesibleText ==================================================
+sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getCaretPosition( ) throw (::com::sun::star::uno::RuntimeException){return 0;}
+sal_Bool SAL_CALL SwAccessibleNoTextFrame::setCaretPosition( sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException){return 0;}
+sal_Unicode SAL_CALL SwAccessibleNoTextFrame::getCharacter( sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException){return 0;}
+::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL SwAccessibleNoTextFrame::getCharacterAttributes( sal_Int32 , const ::com::sun::star::uno::Sequence< ::rtl::OUString >& ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ uno::Sequence<beans::PropertyValue> aValues(0);
+ return aValues;
+}
+::com::sun::star::awt::Rectangle SAL_CALL SwAccessibleNoTextFrame::getCharacterBounds( sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ return com::sun::star::awt::Rectangle(0, 0, 0, 0 );
+}
+sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getCharacterCount( ) throw (::com::sun::star::uno::RuntimeException){return 0;}
+sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getIndexAtPoint( const ::com::sun::star::awt::Point& ) throw (::com::sun::star::uno::RuntimeException){return 0;}
+::rtl::OUString SAL_CALL SwAccessibleNoTextFrame::getSelectedText( ) throw (::com::sun::star::uno::RuntimeException){return OUString();}
+sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getSelectionStart( ) throw (::com::sun::star::uno::RuntimeException){return 0;}
+sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getSelectionEnd( ) throw (::com::sun::star::uno::RuntimeException){return 0;}
+sal_Bool SAL_CALL SwAccessibleNoTextFrame::setSelection( sal_Int32 , sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException){return sal_True;}
+::rtl::OUString SAL_CALL SwAccessibleNoTextFrame::getText( ) throw (::com::sun::star::uno::RuntimeException){return OUString();}
+::rtl::OUString SAL_CALL SwAccessibleNoTextFrame::getTextRange( sal_Int32 , sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException){return OUString();}
+::com::sun::star::accessibility::TextSegment SAL_CALL SwAccessibleNoTextFrame::getTextAtIndex( sal_Int32 , sal_Int16 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::accessibility::TextSegment aResult;
+ return aResult;
+}
+::com::sun::star::accessibility::TextSegment SAL_CALL SwAccessibleNoTextFrame::getTextBeforeIndex( sal_Int32, sal_Int16 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::accessibility::TextSegment aResult;
+ return aResult;
+}
+::com::sun::star::accessibility::TextSegment SAL_CALL SwAccessibleNoTextFrame::getTextBehindIndex( sal_Int32 , sal_Int16 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::accessibility::TextSegment aResult;
+ return aResult;
+}
+
+sal_Bool SAL_CALL SwAccessibleNoTextFrame::copyText( sal_Int32, sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException){return sal_True;}
+
+
+//
+// XAccessibleHyperText
+//
+sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getHyperLinkCount()
+throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleHypertext );
+
+ sal_Int32 nCount = 0;
+ SwFmtURL aURL( ((SwLayoutFrm*)GetFrm())->GetFmt()->GetURL() );
+
+ if(aURL.GetMap() || aURL.GetURL().Len())
+ nCount = 1;
+
+ return nCount;
+}
+
+uno::Reference< XAccessibleHyperlink > SAL_CALL
+ SwAccessibleNoTextFrame::getHyperLink( sal_Int32 nLinkIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC( XAccessibleHypertext );
+
+ uno::Reference< XAccessibleHyperlink > xRet;
+
+ SwFmtURL aURL( ((SwLayoutFrm*)GetFrm())->GetFmt()->GetURL() );
+
+ if( nLinkIndex > 0 )
+ throw lang::IndexOutOfBoundsException();
+
+ if( aURL.GetMap() || aURL.GetURL().Len() )
+ {
+ if ( !alink.is() )
+ {
+ alink = new SwAccessibleNoTextHyperlink( this, GetFrm() );
+ }
+
+ return alink;
+ }
+
+ return NULL;
+}
+
+sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getHyperLinkIndex( sal_Int32 )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC( XAccessibleHypertext );
+
+ sal_Int32 nRet = 0;
+
+ return nRet;
+}
+
+AccessibleRelation SwAccessibleNoTextFrame::makeRelation( sal_Int16 nType, const SwFlyFrm* pFrm )
+{
+ uno::Sequence<uno::Reference<XInterface> > aSequence(1);
+ aSequence[0] = GetMap()->GetContext( pFrm );
+ return AccessibleRelation( nType, aSequence );
+}
+
+
+uno::Reference<XAccessibleRelationSet> SAL_CALL SwAccessibleNoTextFrame::getAccessibleRelationSet( )
+ throw ( uno::RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC( XAccessibleContext );
+
+ // get the caption frame, and insert label relations into helper
+
+ AccessibleRelationSetHelper* pHelper = new AccessibleRelationSetHelper();
+
+ SwFlyFrm* pFlyFrm = getFlyFrm();
+ DBG_ASSERT( pFlyFrm != NULL, "fly frame expected" );
+
+ SwFlyFrm* pCaptionFrm = NULL;
+ const SwFrmFmt* pFrm = pFlyFrm ->GetFmt()->GetCaptionFmt();
+ if (pFrm)
+ {
+ SwClientIter aIter (*(SwModify*)pFrm);
+ pCaptionFrm = dynamic_cast< SwFlyFrm* >(aIter.SwClientIter_First());
+ }
+ if(pCaptionFrm!=NULL)
+ {
+ pHelper->AddRelation( makeRelation( AccessibleRelationType::DESCRIBED_BY, pCaptionFrm ) );
+ }
+
+ return pHelper;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/core/access/accnotextframe.hxx b/sw/source/core/access/accnotextframe.hxx
index ebcb9c282245..6c7725c00af9 100644
--- a/sw/source/core/access/accnotextframe.hxx
+++ b/sw/source/core/access/accnotextframe.hxx
@@ -24,13 +24,30 @@
#define _ACCNOTEXTFRAME_HXX
#include "accframebase.hxx"
#include <com/sun/star/accessibility/XAccessibleImage.hpp>
+//IAccessibility2 Implementation 2009-----
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEHYPERTEXT_HPP_
+#include <com/sun/star/accessibility/XAccessibleHypertext.hpp>
+#endif
+
+namespace utl { class AccessibleRelationSetHelper; }
+namespace com { namespace star {
+ namespace accessibility { struct AccessibleRelation; }
+} }
class SwFlyFrm;
class SwNoTxtNode;
+class SwAccessibleNoTextHyperlink;
+//-----IAccessibility2 Implementation 2009
class SwAccessibleNoTextFrame : public SwAccessibleFrameBase,
- public ::com::sun::star::accessibility::XAccessibleImage
+ public ::com::sun::star::accessibility::XAccessibleImage,
+ public ::com::sun::star::accessibility::XAccessibleHypertext//Added by yangzhh for HyperLink
{
+ //IAccessibility2 Implementation 2009-----
+ friend class SwAccessibleNoTextHyperlink;
+ //HyperLinksMap alinksMap;
+ com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleHyperlink > alink;
+ //-----IAccessibility2 Implementation 2009
SwDepend aDepend;
// --> OD 2009-07-14 #i73249#
::rtl::OUString msTitle;
@@ -100,6 +117,51 @@ public:
// The object is not visible an longer and should be destroyed
virtual void Dispose( sal_Bool bRecursive = sal_False );
+
+ //IAccessibility2 Implementation 2009-----
+ virtual sal_Int32 SAL_CALL getCaretPosition( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);//Shen Zhen Jie changed sal_Unicode to sal_uInt32
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getCharacterCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSelectedText( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionStart( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionEnd( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getText( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+
+ //===== XAccessibleHypertext ============================================
+ virtual sal_Int32 SAL_CALL getHyperLinkCount()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleHyperlink >
+ SAL_CALL getHyperLink( sal_Int32 nLinkIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getHyperLinkIndex( sal_Int32 nCharIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ SwAccessibleMap *GetAccessibleMap(){ return GetMap();}
+
+private:
+ com::sun::star::accessibility::AccessibleRelation makeRelation(
+ sal_Int16 nType, const SwFlyFrm* pFrm );
+
+public:
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL
+ getAccessibleRelationSet (void)
+ throw (::com::sun::star::uno::RuntimeException);
+ //-----IAccessibility2 Implementation 2009
};
diff --git a/sw/source/core/access/accnotexthyperlink.cxx b/sw/source/core/access/accnotexthyperlink.cxx
new file mode 100644
index 000000000000..4101ea51adc6
--- /dev/null
+++ b/sw/source/core/access/accnotexthyperlink.cxx
@@ -0,0 +1,232 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+#include <comphelper/accessiblekeybindinghelper.hxx>
+#include <swurl.hxx>
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
+#include <ndtxt.hxx>
+#include <txtinet.hxx>
+#include <frmfmt.hxx>
+
+#include <accnotexthyperlink.hxx>
+
+#include <fmturl.hxx>
+
+#include <svtools/imap.hxx>
+#include <svtools/imapobj.hxx>
+
+#include <accmap.hxx>
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::accessibility;
+//using namespace ::rtl;
+
+SwAccessibleNoTextHyperlink::SwAccessibleNoTextHyperlink( SwAccessibleNoTextFrame *p, const SwFrm *aFrm, sal_uInt16 nIndex) :
+ xFrame( p ),
+ mpFrm( aFrm ),
+ mnIndex(nIndex)
+{
+}
+
+// XAccessibleAction
+sal_Int32 SAL_CALL SwAccessibleNoTextHyperlink::getAccessibleActionCount()
+ throw (RuntimeException)
+{
+ SwFmtURL aURL( GetFmt()->GetURL() );
+ ImageMap* pMap = aURL.GetMap();
+ if( pMap != NULL )
+ {
+ return pMap->GetIMapObjectCount();
+ }else if( aURL.GetURL().Len() )
+ {
+ return 1;
+ }
+
+ return 0;
+}
+
+sal_Bool SAL_CALL SwAccessibleNoTextHyperlink::doAccessibleAction( sal_Int32 nIndex )
+ throw (IndexOutOfBoundsException, RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ if(nIndex < 0 || nIndex >= getAccessibleActionCount())
+ throw new IndexOutOfBoundsException;
+
+ sal_Bool bRet = sal_False;
+ SwFmtURL aURL( GetFmt()->GetURL() );
+ ImageMap* pMap = aURL.GetMap();
+ if( pMap != NULL )
+ {
+ IMapObject* pMapObj = pMap->GetIMapObject(nIndex);
+ if(pMapObj->GetURL().Len())
+ {
+ ViewShell *pVSh = xFrame->GetShell();
+ if( pVSh )
+ {
+ LoadURL( pMapObj->GetURL(), pVSh, URLLOAD_NOFILTER,
+ &pMapObj->GetTarget() );
+ bRet = sal_True;
+ }
+ }
+ }
+ else if( aURL.GetURL().Len() )
+ {
+ ViewShell *pVSh = xFrame->GetShell();
+ if( pVSh )
+ {
+ LoadURL( aURL.GetURL(), pVSh, URLLOAD_NOFILTER,
+ &aURL.GetTargetFrameName() );
+ bRet = sal_True;
+ }
+ }
+
+ return bRet;
+}
+
+rtl::OUString SAL_CALL SwAccessibleNoTextHyperlink::getAccessibleActionDescription(
+ sal_Int32 nIndex )
+ throw (IndexOutOfBoundsException, RuntimeException)
+{
+ rtl::OUString sDesc;
+
+ if(nIndex < 0 || nIndex >= getAccessibleActionCount())
+ throw new IndexOutOfBoundsException;
+
+ SwFmtURL aURL( GetFmt()->GetURL() );
+ ImageMap* pMap = aURL.GetMap();
+ if( pMap != NULL )
+ {
+ IMapObject* pMapObj = pMap->GetIMapObject(nIndex);
+ if(pMapObj->GetDesc().Len())
+ sDesc = rtl::OUString( pMapObj->GetDesc() );
+ else if(pMapObj->GetURL().Len())
+ sDesc = rtl::OUString( pMapObj->GetURL() );
+ }
+ else if( aURL.GetURL().Len() )
+ sDesc = rtl::OUString( aURL.GetName() );
+ //sDesc = rtl::OUString( aURL.GetName() );
+
+ return sDesc;
+}
+
+Reference< XAccessibleKeyBinding > SAL_CALL
+ SwAccessibleNoTextHyperlink::getAccessibleActionKeyBinding( sal_Int32 nIndex )
+ throw (IndexOutOfBoundsException, RuntimeException)
+{
+ Reference< XAccessibleKeyBinding > xKeyBinding;
+
+ if(nIndex < 0 || nIndex >= getAccessibleActionCount())
+ throw new IndexOutOfBoundsException;
+
+ bool bIsValid = sal_False;
+ SwFmtURL aURL( GetFmt()->GetURL() );
+ ImageMap* pMap = aURL.GetMap();
+ if( pMap != NULL )
+ {
+ IMapObject* pMapObj = pMap->GetIMapObject(nIndex);
+ if(pMapObj->GetURL().Len())
+ bIsValid = sal_True;
+ }else if( aURL.GetURL().Len() )
+ bIsValid = sal_True;
+
+ if(bIsValid)
+ {
+ ::comphelper::OAccessibleKeyBindingHelper* pKeyBindingHelper =
+ new ::comphelper::OAccessibleKeyBindingHelper();
+ xKeyBinding = pKeyBindingHelper;
+
+ ::com::sun::star::awt::KeyStroke aKeyStroke;
+ aKeyStroke.Modifiers = 0;
+ aKeyStroke.KeyCode = KEY_RETURN;
+ aKeyStroke.KeyChar = 0;
+ aKeyStroke.KeyFunc = 0;
+ pKeyBindingHelper->AddKeyBinding( aKeyStroke );
+ }
+
+ return xKeyBinding;
+}
+
+// XAccessibleHyperlink
+Any SAL_CALL SwAccessibleNoTextHyperlink::getAccessibleActionAnchor(
+ sal_Int32 nIndex )
+ throw (IndexOutOfBoundsException, RuntimeException)
+{
+ if(nIndex < 0 || nIndex >= getAccessibleActionCount())
+ throw new IndexOutOfBoundsException;
+
+ Any aRet;
+ //SwFrm* pAnchor = ((SwFlyFrm*)mpFrm)->GetAnchor();
+ Reference< XAccessible > xAnchor = xFrame->GetAccessibleMap()->GetContext(mpFrm, sal_True);
+ //SwAccessibleNoTextFrame* pFrame = xFrame.get();
+ //Reference< XAccessible > xAnchor = (XAccessible*)pFrame;
+ aRet <<= xAnchor;
+ return aRet;
+}
+
+Any SAL_CALL SwAccessibleNoTextHyperlink::getAccessibleActionObject(
+ sal_Int32 nIndex )
+ throw (IndexOutOfBoundsException, RuntimeException)
+{
+ if(nIndex < 0 || nIndex >= getAccessibleActionCount())
+ throw new IndexOutOfBoundsException;
+
+ SwFmtURL aURL( GetFmt()->GetURL() );
+ ::rtl::OUString retText;
+ ImageMap* pMap = aURL.GetMap();
+ if( pMap != NULL )
+ {
+ IMapObject* pMapObj = pMap->GetIMapObject(nIndex);
+ if(pMapObj->GetURL().Len())
+ retText = rtl::OUString( pMapObj->GetURL() );
+ }else if( aURL.GetURL().Len() )
+ retText = rtl::OUString( aURL.GetURL() );
+
+ Any aRet;
+ aRet <<= retText;
+ return aRet;
+}
+
+sal_Int32 SAL_CALL SwAccessibleNoTextHyperlink::getStartIndex()
+ throw (RuntimeException)
+{
+ return 0;
+}
+
+sal_Int32 SAL_CALL SwAccessibleNoTextHyperlink::getEndIndex()
+ throw (RuntimeException)
+{
+ return 0;
+}
+
+sal_Bool SAL_CALL SwAccessibleNoTextHyperlink::isValid( )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ SwFmtURL aURL( GetFmt()->GetURL() );
+
+ if( aURL.GetMap() || aURL.GetURL().Len() )
+ return sal_True;
+ return sal_False;
+}
diff --git a/sw/source/core/access/accnotexthyperlink.hxx b/sw/source/core/access/accnotexthyperlink.hxx
new file mode 100644
index 000000000000..29de85d79462
--- /dev/null
+++ b/sw/source/core/access/accnotexthyperlink.hxx
@@ -0,0 +1,93 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef _ACCNOTEXTHYPERLINK_HXX
+#define _ACCNOTEXTHYPERLINK_HXX
+
+
+#include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <vos/ref.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <fmtinfmt.hxx>
+#include <frame.hxx>
+#include <layfrm.hxx>
+
+#include "accnotextframe.hxx"
+/*
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::accessibility;
+using namespace ::rtl;
+*/
+class SwAccessibleNoTextHyperlink :
+ public ::cppu::WeakImplHelper1<
+ ::com::sun::star::accessibility::XAccessibleHyperlink >
+{
+ friend class SwAccessibleNoTextFrame;
+
+ ::vos::ORef< SwAccessibleNoTextFrame > xFrame;
+ const SwFrm *mpFrm;
+ sal_uInt16 mnIndex;
+
+ SwFrmFmt *GetFmt()
+ {
+ return ((SwLayoutFrm*)mpFrm)->GetFmt();
+ }
+public:
+
+ SwAccessibleNoTextHyperlink( SwAccessibleNoTextFrame *p, const SwFrm* aFrm, sal_uInt16 nIndex = 0xFFFF );
+
+ // XAccessibleAction
+ virtual sal_Int32 SAL_CALL getAccessibleActionCount()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription(
+ sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL
+ getAccessibleActionKeyBinding( sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleHyperlink
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionAnchor(
+ sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionObject(
+ sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getStartIndex()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getEndIndex()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isValid( )
+ throw (::com::sun::star::uno::RuntimeException);
+};
+
+#endif
+
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index e5c0c8b68099..8c84b6578265 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -56,6 +56,15 @@
#include <sfx2/dispatch.hxx> // for ExecuteAtViewShell(...)
#include <unotools/charclass.hxx> // for GetWordBoundary
// for get/setCharacterAttribute(...)
+
+#include <reffld.hxx>
+#include <docufld.hxx>
+#include <expfld.hxx>
+#include <flddat.hxx>
+#include <fldui.hrc>
+#include "../../ui/inc/fldmgr.hxx"
+#include "fldbas.hxx" // SwField
+#include <svl/svstdarr.hxx>
#include <unocrsr.hxx>
//#include <unoobj.hxx>
#include <unoport.hxx>
@@ -66,7 +75,31 @@
#include <acchypertextdata.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+//IAccessibility2 Implementation 2009-----
+#include <section.hxx>
+#include <doctxm.hxx>
#include <comphelper/accessibletexthelper.hxx>
+#include <algorithm>
+#include <docufld.hxx>
+#include <txtfld.hxx>
+#include <fmtfld.hxx>
+#include <modcfg.hxx>
+//#include "accnote.hxx"
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include "swmodule.hxx"
+#include "redline.hxx"
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/awt/FontStrikeout.hpp>
+#include <com/sun/star/awt/FontSlant.hpp>
+#include <wrong.hxx>
+#include <editeng/brshitem.hxx>
+#include <swatrset.hxx>
+#include <frmatr.hxx>
+#include <unosett.hxx>
+#include <paratr.hxx>
+#include <com/sun/star/container/XIndexReplace.hpp>
+//-----IAccessibility2 Implementation 2009
+// --> OD 2006-07-12 #i63870#
#include <unomap.hxx>
#include <unoprnms.hxx>
#include <com/sun/star/text/WritingMode2.hpp>
@@ -86,6 +119,8 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
+using namespace ::com::sun::star::container;
+using ::rtl::OUString;
using beans::PropertyValue;
using beans::XMultiPropertySet;
@@ -148,6 +183,19 @@ sal_Int32 SwAccessibleParagraph::GetCaretPos()
// same node? Then check whether it's also within 'our' part
// of the paragraph
sal_uInt16 nIndex = pPoint->nContent.GetIndex();
+ //IAccessibility2 Implementation 2009-----
+ if(!GetPortionData().IsValidCorePosition( nIndex ) ||
+ ( GetPortionData().IsZeroCorePositionData() && nIndex== 0) )
+ {
+ const SwTxtFrm *pTxtFrm = dynamic_cast< const SwTxtFrm* >(GetFrm());
+ bool bFormat = (pTxtFrm && pTxtFrm->HasPara());
+ if(bFormat)
+ {
+ ClearPortionData();
+ UpdatePortionData();
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
if( GetPortionData().IsValidCorePosition( nIndex ) )
{
// Yes, it's us!
@@ -391,6 +439,20 @@ void SwAccessibleParagraph::_InvalidateContent( sal_Bool bVisibleDataFired )
aEvent.OldValue, aEvent.NewValue );
FireAccessibleEvent( aEvent );
+ //IAccessibility2 Implementation 2009-----
+ uno::Reference< XAccessible > xparent = getAccessibleParent();
+ uno::Reference< XAccessibleContext > xAccContext(xparent,uno::UNO_QUERY);
+ if (xAccContext.is() && xAccContext->getAccessibleRole() == AccessibleRole::TABLE_CELL)
+ {
+ SwAccessibleContext* pPara = static_cast< SwAccessibleContext* >(xparent.get());
+ if(pPara)
+ {
+ AccessibleEventObject aParaEvent;
+ aParaEvent.EventId = AccessibleEventId::VALUE_CHANGED;
+ pPara->FireAccessibleEvent(aParaEvent);
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
}
else if( !bVisibleDataFired )
{
@@ -398,6 +460,10 @@ void SwAccessibleParagraph::_InvalidateContent( sal_Bool bVisibleDataFired )
}
sal_Bool bNewIsHeading = IsHeading();
+ //IAccessibility2 Implementation 2009-----
+ //Get the real heading level, Heading1 ~ Heading10
+ nHeadingLevel = GetRealHeadingLevel();
+ //-----IAccessibility2 Implementation 2009
sal_Bool bOldIsHeading;
{
vos::OGuard aGuard( aMutex );
@@ -466,6 +532,20 @@ void SwAccessibleParagraph::_InvalidateCursorPos()
if( pWin && pWin->HasFocus() && -1 == nNew )
FireStateChangedEvent( AccessibleStateType::FOCUSED, sal_False );
+ //IAccessibility2 Implementation 2009-----
+ //To send TEXT_SELECTION_CHANGED event
+ sal_Int32 nStart=0;
+ sal_Int32 nEnd =0;
+ sal_Bool bCurSelection=GetSelection(nStart,nEnd);
+ if(m_bLastHasSelection || bCurSelection )
+ {
+ aEvent.EventId = AccessibleEventId::TEXT_SELECTION_CHANGED;
+ aEvent.OldValue <<= uno::Any();
+ aEvent.NewValue <<= uno::Any();
+ FireAccessibleEvent(aEvent);
+ }
+ m_bLastHasSelection =bCurSelection;
+ //-----IAccessibility2 Implementation 2009
}
}
@@ -498,20 +578,35 @@ SwAccessibleParagraph::SwAccessibleParagraph(
, pHyperTextData( NULL )
, nOldCaretPos( -1 )
, bIsHeading( sal_False )
+ //IAccessibility2 Implementation 2009-----
+ //Get the real heading level, Heading1 ~ Heading10
+ , nHeadingLevel (-1)
+ //-----IAccessibility2 Implementation 2009
, aSelectionHelper( *this )
// --> OD 2010-02-19 #i108125#
, mpParaChangeTrackInfo( new SwParaChangeTrackingInfo( rTxtFrm ) )
// <--
+ //IAccessibility2 Implementation 2009-----
+ , m_bLastHasSelection(false) //To add TEXT_SELECTION_CHANGED event
+ //-----IAccessibility2 Implementation 2009
{
vos::OGuard aGuard(Application::GetSolarMutex());
bIsHeading = IsHeading();
+ //IAccessibility2 Implementation 2009-----
+ //Get the real heading level, Heading1 ~ Heading10
+ nHeadingLevel = GetRealHeadingLevel();
+ //-----IAccessibility2 Implementation 2009
// --> OD 2004-09-27 #117970# - set an empty accessibility name for paragraphs
SetName( ::rtl::OUString() );
// <--
// If this object has the focus, then it is remembered by the map itself.
- nOldCaretPos = GetCaretPos();
+ //IAccessibility2 Implementation 2009-----
+ // not necessary to remember this pos here. Generally, the pos will be updated in invalidateXXX method, which may fire the
+ //Focus event based on the difference of new & old caret pos.
+ //nOldCaretPos = GetCaretPos();
+ //-----IAccessibility2 Implementation 2009
}
SwAccessibleParagraph::~SwAccessibleParagraph()
@@ -635,7 +730,76 @@ sal_Bool SwAccessibleParagraph::IsValidRange(
{
return IsValidPosition(nBegin, nLength) && IsValidPosition(nEnd, nLength);
}
+//IAccessibility2 Implementation 2009-----
+SwTOXSortTabBase* SwAccessibleParagraph::GetTOXSortTabBase()
+{
+ const SwTxtNode* pTxtNd = GetTxtNode();
+ if( pTxtNd )
+ {
+ const SwSectionNode * pSectNd = pTxtNd->FindSectionNode();
+ if( pSectNd )
+ {
+ const SwSection * pSect = &pSectNd->GetSection();
+ SwTOXBaseSection *pTOXBaseSect = (SwTOXBaseSection *)pSect;
+ if( pSect->GetType() == TOX_CONTENT_SECTION )
+ {
+ SwTOXSortTabBase* pSortBase = 0;
+ int nSize = pTOXBaseSect->GetTOXSortTabBases()->Count();
+
+ for(int nIndex = 0; nIndex<nSize; nIndex++ )
+ {
+ pSortBase = (*(pTOXBaseSect->GetTOXSortTabBases()))[nIndex];
+ if( pSortBase->pTOXNd == pTxtNd )
+ break;
+ }
+
+ if (pSortBase)
+ {
+ return pSortBase;
+ }
+ }
+ }
+ }
+ return NULL;
+}
+
+short SwAccessibleParagraph::GetTOCLevel()
+{
+ SwTOXSortTabBase* pToxBase = GetTOXSortTabBase();
+ if( pToxBase )
+ {
+ const SwCntntNode* pNd = pToxBase->aTOXSources[0].pNd;
+ if( pNd )
+ return pToxBase->GetLevel();
+ else
+ return -1;
+ }
+ else
+ return -1;
+}
+//the function is to check whether the position is in a redline range.
+const SwRedline* SwAccessibleParagraph::GetRedlineAtIndex( sal_Int32 )
+{
+ const SwRedline* pRedline = NULL;
+ SwPaM* pCrSr = GetCursor( true );
+ if ( pCrSr )
+ {
+ SwPosition* pStart = pCrSr->Start();
+ const SwTxtNode* pNode = GetTxtNode();
+ if ( pNode )
+ {
+ const SwDoc* pDoc = pNode->GetDoc();
+ if ( pDoc )
+ {
+ pRedline = pDoc->GetRedline( *pStart, NULL );
+ }
+ }
+ }
+
+ return pRedline;
+}
+//-----IAccessibility2 Implementation 2009
//
// text boundaries
@@ -647,6 +811,11 @@ sal_Bool SwAccessibleParagraph::GetCharBoundary(
const ::rtl::OUString&,
sal_Int32 nPos )
{
+ //IAccessibility2 Implementation 2009-----
+ if( GetPortionData().FillBoundaryIFDateField( rBound, nPos) )
+ return sal_True;
+ //-----IAccessibility2 Implementation 2009
+
rBound.startPos = nPos;
rBound.endPos = nPos+1;
return sal_True;
@@ -673,6 +842,46 @@ sal_Bool SwAccessibleParagraph::GetWordBoundary(
// (DICTIONARY_WORD includes punctuation, ANY_WORD doesn't.)
const sal_uInt16 nWordType = i18n::WordType::ANY_WORD;
+/*
+ // get word boundary, as the Break-Iterator sees fit.
+ sal_Unicode SpaceChar(' ');
+ if (rText.getCodePointAt(nPos) == SpaceChar)
+ {
+ int nStartPos = nPos;
+ int nEndPos = nPos+1;
+ while (nStartPos >= 0 && rText.getCodePointAt(nStartPos) == SpaceChar)
+ --nStartPos;
+ while (nEndPos < rText.getLength() && rText.getCodePointAt(nEndPos) == SpaceChar)
+ ++nEndPos;
+ //Get the previous word boundary + the followed space characters
+ if (nStartPos >= 0)
+ {
+ rBound = pBreakIt->xBreak->getWordBoundary( rText, nStartPos, aLocale, nWordType, sal_True );
+ rBound.endPos += (nEndPos-nStartPos - 1);
+ }
+ //When the frontal characters are whitespace, return the all space characters directly.
+ else
+ {
+ rBound.startPos = 0;
+ rBound.endPos = nEndPos;
+ }
+ }
+ // add the " " into the word boundry
+ else
+ {
+ rBound = pBreakIt->xBreak->getWordBoundary(rText, nPos, aLocale, nWordType, sal_True );
+ sal_Int32 nEndPos = rBound.endPos, nLength = rText.getLength();
+ while ( nEndPos < nLength && rText.getCodePointAt(nEndPos) == SpaceChar )
+ nEndPos++;
+ rBound.endPos = nEndPos;
+ }
+ //IAccessibility2 Implementation 2009-----
+ tabCharInWord( nPos, rBound);
+ if( GetPortionData().FillBoundaryIFDateField( rBound, rBound.startPos) )
+ return sal_True;
+ //-----IAccessibility2 Implementation 2009
+ return sal_True; // MT: So why do we need the return TRUE above???
+*/
// get word boundary, as the Break-Iterator sees fit.
rBound = pBreakIt->GetBreakIter()->getWordBoundary(
rText, nPos, aLocale, nWordType, sal_True );
@@ -693,9 +902,17 @@ sal_Bool SwAccessibleParagraph::GetWordBoundary(
sal_Bool SwAccessibleParagraph::GetSentenceBoundary(
i18n::Boundary& rBound,
- const ::rtl::OUString&,
+ const ::rtl::OUString& rText,
sal_Int32 nPos )
{
+ //IAccessibility2 Implementation 2009-----
+ const sal_Unicode* pStr = rText.getStr();
+ if (pStr)
+ {
+ while( pStr[nPos] == sal_Unicode(' ') && nPos < rText.getLength())
+ nPos++;
+ }
+ //-----IAccessibility2 Implementation 2009
GetPortionData().GetSentenceBoundary( rBound, nPos );
return sal_True;
}
@@ -809,11 +1026,80 @@ sal_Bool SwAccessibleParagraph::GetTextBoundary(
break;
case AccessibleTextType::LINE:
- bRet = GetLineBoundary( rBound, rText, nPos );
+ //IAccessibility2 Implementation 2009-----
+ //Solve the problem of returning wrong LINE and PARAGRAPH
+ if((nPos == rText.getLength()) && nPos > 0)
+ bRet = GetLineBoundary( rBound, rText, nPos - 1);
+ else
+ bRet = GetLineBoundary( rBound, rText, nPos );
+ //-----IAccessibility2 Implementation 2009
break;
case AccessibleTextType::ATTRIBUTE_RUN:
bRet = GetAttributeBoundary( rBound, rText, nPos );
+ //IAccessibility2 Implementation 2009-----
+ if(bRet)
+ {
+ SwCrsrShell* pCrsrShell = GetCrsrShell();
+ if( pCrsrShell != NULL && pCrsrShell->GetViewOptions() && pCrsrShell->GetViewOptions()->IsOnlineSpell())
+ {
+ SwTxtNode* pTxtNode = const_cast<SwTxtNode*>( GetTxtNode() );
+ if(pTxtNode)
+ {
+ const SwWrongList* pWrongList = pTxtNode->GetWrong();
+ if( NULL != pWrongList )
+ {
+ xub_StrLen nBegin = nPos;
+ xub_StrLen nLen = 1;
+ const xub_StrLen nNext = pWrongList->NextWrong(nBegin);
+ xub_StrLen nLast;
+ xub_StrLen nWrongPos = pWrongList->GetWrongPos( nBegin );
+ if ( nWrongPos >= pWrongList->Count() ||
+ ( nLast = pWrongList->Pos( nWrongPos ) ) >= nBegin )
+ {
+ nLast = nWrongPos
+ ? pWrongList->Pos( --nWrongPos )
+ : STRING_LEN;
+ }
+ if ( nBegin > pWrongList->GetBeginInv() &&
+ ( nLast == STRING_LEN || nLast < pWrongList->GetEndInv() ) )
+ {
+ nLast = nBegin > pWrongList->GetEndInv()
+ ? pWrongList->GetEndInv()
+ : nBegin;
+ }
+ else if ( nLast < STRING_LEN )
+ {
+ nLast += pWrongList->Len( nWrongPos );
+ }
+ //
+ sal_Bool bIn = pWrongList->InWrongWord(nBegin,nLen); // && !pTxtNode->IsSymbol(nBegin) )
+ if(bIn)
+ {
+ rBound.startPos = max(nNext,(xub_StrLen)rBound.startPos);
+ rBound.endPos = min(xub_StrLen(nNext + nLen),(xub_StrLen)rBound.endPos);
+ }
+ else
+ {
+ if (STRING_LEN == nLast)//first
+ {
+ rBound.endPos = min(nNext,(xub_StrLen)rBound.endPos);
+ }
+ else if(STRING_LEN == nNext)
+ {
+ rBound.startPos = max(nLast,(xub_StrLen)rBound.startPos);
+ }
+ else
+ {
+ rBound.startPos = max(nLast,(xub_StrLen)rBound.startPos);
+ rBound.endPos = min(nNext,(xub_StrLen)rBound.endPos);
+ }
+ }
+ }
+ }
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
break;
case AccessibleTextType::GLYPH:
@@ -1032,6 +1318,76 @@ uno::Sequence< ::rtl::OUString > SAL_CALL SwAccessibleParagraph::getSupportedSer
return aRet;
}
+//IAccessibility2 Implementation 2009-----
+uno::Sequence< ::rtl::OUString > getAttributeNames()
+{
+ static uno::Sequence< ::rtl::OUString >* pNames = NULL;
+
+ if( pNames == NULL )
+ {
+ // Add the font name to attribute list
+ uno::Sequence< ::rtl::OUString >* pSeq = new uno::Sequence< ::rtl::OUString >( 13 );
+
+ ::rtl::OUString* pStrings = pSeq->getArray();
+
+ // sorted list of strings
+ sal_Int32 i = 0;
+
+#define STR(x) pStrings[i++] = OUString::createFromAscii(x)
+ STR( GetPropName( UNO_NAME_CHAR_BACK_COLOR ).pName );
+ STR( GetPropName( UNO_NAME_CHAR_COLOR ).pName );
+ STR( GetPropName( UNO_NAME_CHAR_CONTOURED ).pName );
+ STR( GetPropName( UNO_NAME_CHAR_EMPHASIS ).pName );
+ STR( GetPropName( UNO_NAME_CHAR_ESCAPEMENT ).pName );
+ STR( GetPropName( UNO_NAME_CHAR_FONT_NAME ).pName );
+ STR( GetPropName( UNO_NAME_CHAR_HEIGHT ).pName );
+ STR( GetPropName( UNO_NAME_CHAR_POSTURE ).pName );
+ STR( GetPropName( UNO_NAME_CHAR_SHADOWED ).pName );
+ STR( GetPropName( UNO_NAME_CHAR_STRIKEOUT ).pName );
+ STR( GetPropName( UNO_NAME_CHAR_UNDERLINE ).pName );
+ STR( GetPropName( UNO_NAME_CHAR_UNDERLINE_COLOR ).pName );
+ STR( GetPropName( UNO_NAME_CHAR_WEIGHT ).pName );
+#undef STR
+ DBG_ASSERT( i == pSeq->getLength(), "Please adjust length" );
+ if( i != pSeq->getLength() )
+ pSeq->realloc( i );
+ pNames = pSeq;
+ }
+ return *pNames;
+}
+
+uno::Sequence< ::rtl::OUString > getSupplementalAttributeNames()
+{
+ static uno::Sequence< ::rtl::OUString >* pNames = NULL;
+
+ if( pNames == NULL )
+ {
+ uno::Sequence< ::rtl::OUString >* pSeq = new uno::Sequence< ::rtl::OUString >( 9 );
+
+ ::rtl::OUString* pStrings = pSeq->getArray();
+
+ // sorted list of strings
+ sal_Int32 i = 0;
+
+#define STR(x) pStrings[i++] = OUString::createFromAscii(x)
+ STR( GetPropName( UNO_NAME_NUMBERING_LEVEL ).pName );
+ STR( GetPropName( UNO_NAME_NUMBERING_RULES ).pName );
+ STR( GetPropName( UNO_NAME_PARA_ADJUST ).pName );
+ STR( GetPropName( UNO_NAME_PARA_BOTTOM_MARGIN ).pName );
+ STR( GetPropName( UNO_NAME_PARA_FIRST_LINE_INDENT ).pName );
+ STR( GetPropName( UNO_NAME_PARA_LEFT_MARGIN ).pName );
+ STR( GetPropName( UNO_NAME_PARA_LINE_SPACING ).pName );
+ STR( GetPropName( UNO_NAME_PARA_RIGHT_MARGIN ).pName );
+ STR( GetPropName( UNO_NAME_TABSTOPS ).pName );
+#undef STR
+ DBG_ASSERT( i == pSeq->getLength(), "Please adjust length" );
+ if( i != pSeq->getLength() )
+ pSeq->realloc( i );
+ pNames = pSeq;
+ }
+ return *pNames;
+}
+//-----IAccessibility2 Implementation 2009
//
//===== XInterface =======================================================
//
@@ -1082,6 +1438,19 @@ uno::Any SwAccessibleParagraph::queryInterface( const uno::Type& rType )
aRet <<= aAccMultiLineText;
}
// <--
+ //IAccessibility2 Implementation 2009-----
+ //MSAA Extension Implementation in app module
+ else if ( rType == ::getCppuType((uno::Reference<XAccessibleTextSelection> *)NULL) )
+ {
+ uno::Reference< com::sun::star::accessibility::XAccessibleTextSelection > aTextExtension = this;
+ aRet <<= aTextExtension;
+ }
+ else if ( rType == ::getCppuType((uno::Reference<XAccessibleExtendedAttributes> *)NULL) )
+ {
+ uno::Reference<XAccessibleExtendedAttributes> xAttr = this;
+ aRet <<= xAttr;
+ }
+ //-----IAccessibility2 Implementation 2009
else
{
aRet = SwAccessibleContext::queryInterface(rType);
@@ -1206,6 +1575,270 @@ sal_Unicode SwAccessibleParagraph::getCharacter( sal_Int32 nIndex )
throw lang::IndexOutOfBoundsException();
}
+//IAccessibility2 Implementation 2009-----
+com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > SwAccessibleParagraph::GetCurrentTabStop( sal_Int32 nIndex )
+{
+vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+
+
+ /* #i12332# The position after the string needs special treatment.
+ IsValidChar -> IsValidPosition
+ */
+ if( ! (IsValidPosition( nIndex, GetString().getLength() ) ) )
+ throw lang::IndexOutOfBoundsException();
+
+ /* #i12332# */
+ sal_Bool bBehindText = sal_False;
+ if ( nIndex == GetString().getLength() )
+ bBehindText = sal_True;
+
+ // get model position & prepare GetCharRect() arguments
+ SwCrsrMoveState aMoveState;
+ aMoveState.bRealHeight = sal_True;
+ aMoveState.bRealWidth = sal_True;
+ SwSpecialPos aSpecialPos;
+ SwTxtNode* pNode = const_cast<SwTxtNode*>( GetTxtNode() );
+
+ sal_uInt16 nPos = 0;
+
+ /* #i12332# FillSpecialPos does not accept nIndex ==
+ GetString().getLength(). In that case nPos is set to the
+ length of the string in the core. This way GetCharRect
+ returns the rectangle for a cursor at the end of the
+ paragraph. */
+ if (bBehindText)
+ {
+ nPos = pNode->GetTxt().Len();
+ }
+ else
+ nPos = GetPortionData().FillSpecialPos
+ (nIndex, aSpecialPos, aMoveState.pSpecialPos );
+
+ // call GetCharRect
+ SwRect aCoreRect;
+ SwIndex aIndex( pNode, nPos );
+ SwPosition aPosition( *pNode, aIndex );
+ GetFrm()->GetCharRect( aCoreRect, aPosition, &aMoveState );
+
+ // already get the caret postion
+
+ //IAccessibility2 Implementation 2009-----
+ /*SwFrm* pTFrm = const_cast<SwFrm*>(GetFrm());
+ com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > tabs =
+ pTFrm->GetTabStopInfo(aCoreRect.Left());*/
+
+ com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > tabs;
+ const xub_StrLen nStrLen = GetTxtNode()->GetTxt().Len();
+ if( nStrLen > 0 )
+ {
+ SwFrm* pTFrm = const_cast<SwFrm*>(GetFrm());
+ tabs = pTFrm->GetTabStopInfo(aCoreRect.Left());
+ }
+ //-----IAccessibility2 Implementation 2009
+
+ if( tabs.hasElements() )
+ {
+ // translate core coordinates into accessibility coordinates
+ Window *pWin = GetWindow();
+ CHECK_FOR_WINDOW( XAccessibleComponent, pWin );
+
+ SwRect aTmpRect(0, 0, tabs[0].Position, 0);
+
+ Rectangle aScreenRect( GetMap()->CoreToPixel( aTmpRect.SVRect() ));
+ SwRect aFrmLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root
+
+ Point aFrmPixPos( GetMap()->CoreToPixel( aFrmLogBounds.SVRect() ).TopLeft() );
+ aScreenRect.Move( -aFrmPixPos.X(), -aFrmPixPos.Y() );
+
+ tabs[0].Position = aScreenRect.GetWidth();
+ }
+
+ return tabs;
+}
+
+struct IndexCompare
+{
+ const PropertyValue* pValues;
+ IndexCompare( const PropertyValue* pVals ) : pValues(pVals) {}
+ bool operator() ( const sal_Int32& a, const sal_Int32& b ) const
+ {
+ return (pValues[a].Name < pValues[b].Name) ? true : false;
+ }
+};
+//-----IAccessibility2 Implementation 2009
+
+String SwAccessibleParagraph::GetFieldTypeNameAtIndex(sal_Int32 nIndex)
+{
+ String strTypeName;
+ SwFldMgr aMgr;
+ SwTxtFld* pTxtFld = NULL;
+ SwTxtNode* pTxtNd = const_cast<SwTxtNode*>( GetTxtNode() );
+ SwIndex fldIndex( pTxtNd, nIndex );
+ sal_Int32 nFldIndex = GetPortionData().GetFieldIndex(nIndex);
+ if (nFldIndex >= 0)
+ {
+ const SwpHints* pSwpHints = GetTxtNode()->GetpSwpHints();
+ if (pSwpHints)
+ {
+ const sal_uInt16 nSize = pSwpHints ? pSwpHints->Count() : 0;
+ for( sal_uInt16 i = 0; i < nSize; ++i )
+ {
+ const SwTxtAttr* pHt = (*pSwpHints)[i];
+ if (pHt->Which() == RES_TXTATR_FIELD && (nFldIndex-- == 0))
+ {
+ pTxtFld = (SwTxtFld *)pHt;
+ break;
+ }
+ else if (pHt->Which() == RES_TXTATR_REFMARK && (nFldIndex-- == 0))
+ strTypeName = String(OUString(RTL_CONSTASCII_USTRINGPARAM("set reference")));
+ }
+ }
+ }
+ if (pTxtFld)
+ {
+ const SwField* pField = (pTxtFld->GetFmtFld()).GetField();
+ if (pField)
+ {
+ strTypeName = pField->GetTyp()->GetTypeStr(pField->GetTypeId());
+ sal_uInt16 nWhich = pField->GetTyp()->Which();
+ rtl::OUString sEntry;
+ sal_Int32 subType = 0;
+ switch (nWhich)
+ {
+ case RES_DOCSTATFLD:
+ subType = ((SwDocStatField*)pField)->GetSubType();
+ break;
+ case RES_GETREFFLD:
+ {
+ sal_uInt16 nSub = pField->GetSubType();
+ switch( nSub )
+ {
+ case REF_BOOKMARK:
+ {
+ const SwGetRefField* pRefFld = dynamic_cast<const SwGetRefField*>(pField);
+ if ( pRefFld && pRefFld->IsRefToHeadingCrossRefBookmark() )
+ sEntry = OUString(RTL_CONSTASCII_USTRINGPARAM("Headings"));
+ else if ( pRefFld && pRefFld->IsRefToNumItemCrossRefBookmark() )
+ sEntry = OUString(RTL_CONSTASCII_USTRINGPARAM("Numbered Paragraphs"));
+ else
+ sEntry = OUString(RTL_CONSTASCII_USTRINGPARAM("Bookmarks"));
+ }
+ break;
+ case REF_FOOTNOTE:
+ sEntry = OUString(RTL_CONSTASCII_USTRINGPARAM("Footnotes"));
+ break;
+ case REF_ENDNOTE:
+ sEntry = OUString(RTL_CONSTASCII_USTRINGPARAM("Endnotes"));
+ break;
+ case REF_SETREFATTR:
+ sEntry = OUString(RTL_CONSTASCII_USTRINGPARAM("Insert Reference"));
+ break;
+ case REF_SEQUENCEFLD:
+ sEntry = ((SwGetRefField*)pField)->GetSetRefName();
+ break;
+ }
+ //Get format string
+ strTypeName = sEntry;
+ // <pField->GetFormat() >= 0> is always true as <pField->GetFormat()> is unsigned
+// if (pField->GetFormat() >= 0)
+ {
+ sEntry = aMgr.GetFormatStr( pField->GetTypeId(), pField->GetFormat() );
+ if (sEntry.getLength() > 0)
+ {
+ strTypeName.AppendAscii("-");
+ strTypeName += String(sEntry);
+ }
+ }
+ }
+ break;
+ case RES_DATETIMEFLD:
+ subType = ((SwDateTimeField*)pField)->GetSubType();
+ break;
+ case RES_JUMPEDITFLD:
+ {
+ sal_uInt16 nFormat= pField->GetFormat();
+ sal_uInt16 nSize = aMgr.GetFormatCount(pField->GetTypeId(), sal_False);
+ if (nFormat < nSize)
+ {
+ sEntry = aMgr.GetFormatStr(pField->GetTypeId(), nFormat);
+ if (sEntry.getLength() > 0)
+ {
+ strTypeName.AppendAscii("-");
+ strTypeName += String(sEntry);
+ }
+ }
+ }
+ break;
+ case RES_EXTUSERFLD:
+ subType = ((SwExtUserField*)pField)->GetSubType();
+ break;
+ case RES_HIDDENTXTFLD:
+ case RES_SETEXPFLD:
+ {
+ sEntry = pField->GetTyp()->GetName();
+ if (sEntry.getLength() > 0)
+ {
+ strTypeName.AppendAscii("-");
+ strTypeName += String(sEntry);
+ }
+ }
+ break;
+ case RES_DOCINFOFLD:
+ subType = pField->GetSubType();
+ subType &= 0x00ff;
+ break;
+ case RES_REFPAGESETFLD:
+ {
+ SwRefPageSetField* pRPld = (SwRefPageSetField*)pField;
+ sal_Bool bOn = pRPld->IsOn();
+ strTypeName.AppendAscii("-");
+ if (bOn)
+ strTypeName += String(OUString(RTL_CONSTASCII_USTRINGPARAM("on")));
+ else
+ strTypeName += String(OUString(RTL_CONSTASCII_USTRINGPARAM("off")));
+ }
+ break;
+ case RES_AUTHORFLD:
+ {
+ strTypeName.AppendAscii("-");
+ strTypeName += aMgr.GetFormatStr(pField->GetTypeId(), pField->GetFormat() & 0xff);
+ }
+ break;
+ }
+ if (subType > 0 || (subType == 0 && (nWhich == RES_DOCINFOFLD || nWhich == RES_EXTUSERFLD || nWhich == RES_DOCSTATFLD)))
+ {
+ SvStringsDtor aLst;
+ aMgr.GetSubTypes(pField->GetTypeId(), aLst);
+ if (subType < aLst.Count())
+ sEntry = *aLst[subType];
+ if (sEntry.getLength() > 0)
+ {
+ if (nWhich == RES_DOCINFOFLD)
+ {
+ strTypeName = String(sEntry);
+ sal_uInt32 nSize = aMgr.GetFormatCount(pField->GetTypeId(), sal_False);
+ sal_uInt16 nExSub = pField->GetSubType() & 0xff00;
+ if (nSize > 0 && nExSub > 0)
+ {
+ //Get extra subtype string
+ strTypeName.AppendAscii("-");
+ sEntry = aMgr.GetFormatStr(pField->GetTypeId(), nExSub/0x0100-1);
+ strTypeName += String(sEntry);
+ }
+ }
+ else
+ {
+ strTypeName.AppendAscii("-");
+ strTypeName += String(sEntry);
+ }
+ }
+ }
+ }
+ }
+ return strTypeName;
+}
// --> OD 2006-07-20 #i63870#
// re-implement method on behalf of methods <_getDefaultAttributesImpl(..)> and
// <_getRunAttributesImpl(..)>
@@ -1220,16 +1853,24 @@ uno::Sequence<PropertyValue> SwAccessibleParagraph::getCharacterAttributes(
const ::rtl::OUString& rText = GetString();
- if( ! IsValidChar( nIndex, rText.getLength() ) )
+ if( ! IsValidChar( nIndex, rText.getLength()+1 ) )//IAccessibility2 Implementation 2009
throw lang::IndexOutOfBoundsException();
+ //IAccessibility2 Implementation 2009-----
+ bool bSupplementalMode = false;
+ uno::Sequence< ::rtl::OUString > aNames = aRequestedAttributes;
+ if (aNames.getLength() == 0)
+ {
+ bSupplementalMode = true;
+ aNames = getAttributeNames();
+ }
// retrieve default character attributes
tAccParaPropValMap aDefAttrSeq;
- _getDefaultAttributesImpl( aRequestedAttributes, aDefAttrSeq, true );
+ _getDefaultAttributesImpl( aNames, aDefAttrSeq, true );
// retrieved run character attributes
tAccParaPropValMap aRunAttrSeq;
- _getRunAttributesImpl( nIndex, aRequestedAttributes, aRunAttrSeq );
+ _getRunAttributesImpl( nIndex, aNames, aRunAttrSeq );
// merge default and run attributes
uno::Sequence< PropertyValue > aValues( aDefAttrSeq.size() );
@@ -1251,6 +1892,70 @@ uno::Sequence<PropertyValue> SwAccessibleParagraph::getCharacterAttributes(
}
++i;
}
+ if( bSupplementalMode )
+ {
+ uno::Sequence< ::rtl::OUString > aSupplementalNames = aRequestedAttributes;
+ if (aSupplementalNames.getLength() == 0)
+ aSupplementalNames = getSupplementalAttributeNames();
+
+ tAccParaPropValMap aSupplementalAttrSeq;
+ _getSupplementalAttributesImpl( nIndex, aSupplementalNames, aSupplementalAttrSeq );
+
+ aValues.realloc( aValues.getLength() + aSupplementalAttrSeq.size() );
+ pValues = aValues.getArray();
+
+ for ( tAccParaPropValMap::const_iterator aSupplementalIter = aSupplementalAttrSeq.begin();
+ aSupplementalIter != aSupplementalAttrSeq.end();
+ ++aSupplementalIter )
+ {
+ pValues[i] = aSupplementalIter->second;
+ ++i;
+ }
+
+ _correctValues( nIndex, aValues );
+
+ aValues.realloc( aValues.getLength() + 1 );
+
+ pValues = aValues.getArray();
+
+ const SwTxtNode* pTxtNode( GetTxtNode() );
+ PropertyValue& rValue = pValues[aValues.getLength() - 1 ];
+ rValue.Name = OUString::createFromAscii("NumberingPrefix");
+ OUString sNumBullet = pTxtNode->GetNumString();
+ rValue.Value <<= sNumBullet;
+ rValue.Handle = -1;
+ rValue.State = PropertyState_DIRECT_VALUE;
+
+ String strTypeName = GetFieldTypeNameAtIndex(nIndex);
+ if (strTypeName.Len() > 0)
+ {
+ aValues.realloc( aValues.getLength() + 1 );
+ pValues = aValues.getArray();
+ rValue = pValues[aValues.getLength() - 1];
+ rValue.Name = OUString::createFromAscii("FieldType");
+ rValue.Value <<= rtl::OUString(strTypeName.ToLowerAscii());
+ rValue.Handle = -1;
+ rValue.State = PropertyState_DIRECT_VALUE;
+ }
+
+ //sort property values
+ // build sorted index array
+ sal_Int32 nLength = aValues.getLength();
+ const PropertyValue* pPairs = aValues.getConstArray();
+ sal_Int32* pIndices = new sal_Int32[nLength];
+ for( i = 0; i < nLength; i++ )
+ pIndices[i] = i;
+ sort( &pIndices[0], &pIndices[nLength], IndexCompare(pPairs) );
+ // create sorted sequences accoring to index array
+ uno::Sequence<PropertyValue> aNewValues( nLength );
+ PropertyValue* pNewValues = aNewValues.getArray();
+ for( i = 0; i < nLength; i++ )
+ {
+ pNewValues[i] = pPairs[pIndices[i]];
+ }
+ delete[] pIndices;
+ return aNewValues;
+ }
// // create a (dummy) text portion for the sole purpose of calling
// // getPropertyValues on it
@@ -1669,6 +2374,308 @@ uno::Sequence< PropertyValue > SwAccessibleParagraph::getRunAttributes(
return aValues;
}
// <--
+// IAccessibility2 Implementation 2009----
+void SwAccessibleParagraph::_getSupplementalAttributesImpl(
+ const sal_Int32,
+ const uno::Sequence< ::rtl::OUString >& aRequestedAttributes,
+ tAccParaPropValMap& rSupplementalAttrSeq )
+{
+ const SwTxtNode* pTxtNode( GetTxtNode() );
+ ::boost::scoped_ptr<SfxItemSet> pSet;
+ pSet.reset( new SfxItemSet( const_cast<SwAttrPool&>(pTxtNode->GetDoc()->GetAttrPool()),
+ RES_PARATR_ADJUST, RES_PARATR_ADJUST,
+ RES_PARATR_TABSTOP, RES_PARATR_TABSTOP,
+ RES_PARATR_LINESPACING, RES_PARATR_LINESPACING,
+ RES_UL_SPACE, RES_UL_SPACE,
+ RES_LR_SPACE, RES_LR_SPACE,
+ RES_PARATR_NUMRULE, RES_PARATR_NUMRULE,
+ RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
+ 0 ) );
+
+ if ( pTxtNode->HasBullet() || pTxtNode->HasNumber() )
+ {
+ pSet->Put( pTxtNode->GetAttr(RES_PARATR_LIST_LEVEL, RES_PARATR_LIST_LEVEL) );
+ }
+ pSet->Put( pTxtNode->SwCntntNode::GetAttr(RES_UL_SPACE) );
+ pSet->Put( pTxtNode->SwCntntNode::GetAttr(RES_LR_SPACE) );
+ pSet->Put( pTxtNode->SwCntntNode::GetAttr(RES_PARATR_ADJUST) );
+
+ tAccParaPropValMap aSupplementalAttrSeq;
+ {
+// const SfxItemPropertySet& rPropSet =
+// aSwMapProvider.GetPropertyMap( PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE );
+// const SfxItemPropertyMap* pPropMap( rPropSet.getPropertyMap() );
+ const SfxItemPropertyMapEntry* pPropMap(
+ aSwMapProvider.GetPropertyMapEntries( PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE ) );
+ while ( pPropMap->pName )
+ {
+ const SfxPoolItem* pItem = pSet->GetItem( pPropMap->nWID );
+ if ( pItem )
+ {
+ uno::Any aVal;
+ pItem->QueryValue( aVal, pPropMap->nMemberId );
+
+ PropertyValue rPropVal;
+ rPropVal.Name = OUString::createFromAscii( pPropMap->pName );
+ rPropVal.Value = aVal;
+ rPropVal.Handle = -1;
+ rPropVal.State = beans::PropertyState_DEFAULT_VALUE;
+
+ aSupplementalAttrSeq[rPropVal.Name] = rPropVal;
+ }
+
+ ++pPropMap;
+ }
+ }
+
+ const OUString* pSupplementalAttrs = aRequestedAttributes.getConstArray();
+ const sal_Int32 nSupplementalLength = aRequestedAttributes.getLength();
+
+ for( sal_Int32 index = 0; index < nSupplementalLength; ++index )
+ {
+ tAccParaPropValMap::const_iterator const aIter = aSupplementalAttrSeq.find( pSupplementalAttrs[index] );
+ if ( aIter != aSupplementalAttrSeq.end() )
+ {
+ rSupplementalAttrSeq[ aIter->first ] = aIter->second;
+ }
+ }
+}
+
+void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex,
+ uno::Sequence< PropertyValue >& rValues)
+{
+ PropertyValue ChangeAttr, ChangeAttrColor;
+
+ const SwRedline* pRedline = GetRedlineAtIndex( nIndex );
+ if ( pRedline )
+ {
+
+ const SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig();
+ AuthorCharAttr aChangeAttr;
+ if ( pOpt )
+ {
+ switch( pRedline->GetType())
+ {
+ case nsRedlineType_t::REDLINE_INSERT:
+ aChangeAttr = pOpt->GetInsertAuthorAttr();
+ break;
+ case nsRedlineType_t::REDLINE_DELETE:
+ aChangeAttr = pOpt->GetDeletedAuthorAttr();
+ break;
+ case nsRedlineType_t::REDLINE_FORMAT:
+ aChangeAttr = pOpt->GetFormatAuthorAttr();
+ break;
+ }
+ }
+ switch( aChangeAttr.nItemId )
+ {
+ case SID_ATTR_CHAR_WEIGHT:
+ ChangeAttr.Name = OUString::createFromAscii( GetPropName( UNO_NAME_CHAR_WEIGHT).pName );
+ ChangeAttr.Value <<= awt::FontWeight::BOLD;
+ break;
+ case SID_ATTR_CHAR_POSTURE:
+ ChangeAttr.Name = OUString::createFromAscii( GetPropName( UNO_NAME_CHAR_POSTURE).pName );
+ ChangeAttr.Value <<= awt::FontSlant_ITALIC; //char posture
+ break;
+ case SID_ATTR_CHAR_STRIKEOUT:
+ ChangeAttr.Name = OUString::createFromAscii( GetPropName( UNO_NAME_CHAR_STRIKEOUT).pName );
+ ChangeAttr.Value <<= awt::FontStrikeout::SINGLE; //char strikeout
+ break;
+ case SID_ATTR_CHAR_UNDERLINE:
+ ChangeAttr.Name = OUString::createFromAscii( GetPropName( UNO_NAME_CHAR_UNDERLINE).pName );
+ ChangeAttr.Value <<= aChangeAttr.nAttr; //underline line
+ break;
+ }
+ if( aChangeAttr.nColor != COL_NONE )
+ {
+ if( aChangeAttr.nItemId == SID_ATTR_BRUSH )
+ {
+ ChangeAttrColor.Name = OUString::createFromAscii( GetPropName( UNO_NAME_CHAR_BACK_COLOR).pName );
+ if( aChangeAttr.nColor == COL_TRANSPARENT )//char backcolor
+ ChangeAttrColor.Value <<= COL_BLUE;
+ else
+ ChangeAttrColor.Value <<= aChangeAttr.nColor;
+ }
+ else
+ {
+ ChangeAttrColor.Name = OUString::createFromAscii( GetPropName( UNO_NAME_CHAR_COLOR ).pName );
+ if( aChangeAttr.nColor == COL_TRANSPARENT )//char color
+ ChangeAttrColor.Value <<= COL_BLUE;
+ else
+ ChangeAttrColor.Value <<= aChangeAttr.nColor;
+ }
+ }
+ }
+
+ PropertyValue* pValues = rValues.getArray();
+
+ const SwTxtNode* pTxtNode( GetTxtNode() );
+
+ sal_Int32 nValues = rValues.getLength();
+ for (sal_Int32 i = 0; i < nValues; ++i)
+ {
+ PropertyValue& rValue = pValues[i];
+
+ if (rValue.Name.compareTo( ChangeAttr.Name )==0)
+ {
+ rValue.Value = ChangeAttr.Value;
+ continue;
+ }
+
+ if (rValue.Name.compareTo( ChangeAttrColor.Name )==0)
+ {
+ rValue.Value = ChangeAttr.Value;
+ continue;
+ }
+
+ //back color
+ if (rValue.Name.compareTo(::rtl::OUString::createFromAscii( GetPropName( UNO_NAME_CHAR_BACK_COLOR ).pName ) )==0)
+ {
+ uno::Any &anyChar = rValue.Value;
+ sal_uInt32 crBack = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved));
+ if (COL_AUTO == crBack)
+ {
+ uno::Reference<XAccessibleComponent> xComponent(this);
+ if (xComponent.is())
+ {
+ crBack = (sal_uInt32)xComponent->getBackground();
+ }
+ rValue.Value <<= crBack;
+ }
+ continue;
+ }
+
+ //char color
+ if (rValue.Name.compareTo(::rtl::OUString::createFromAscii( GetPropName( UNO_NAME_CHAR_COLOR ).pName ) )==0)
+ {
+ if( GetPortionData().IsInGrayPortion( nIndex ) )
+ rValue.Value <<= SwViewOption::GetFieldShadingsColor().GetColor();
+ uno::Any &anyChar = rValue.Value;
+ sal_uInt32 crChar = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved));
+
+ if( COL_AUTO == crChar )
+ {
+ uno::Reference<XAccessibleComponent> xComponent(this);
+ if (xComponent.is())
+ {
+ Color cr(xComponent->getBackground());
+ crChar = cr.IsDark() ? COL_WHITE : COL_BLACK;
+ rValue.Value <<= crChar;
+ }
+ }
+ continue;
+ }
+
+ // UnderLine
+ if (rValue.Name.compareTo(::rtl::OUString::createFromAscii( GetPropName( UNO_NAME_CHAR_UNDERLINE ).pName ) )==0)
+ {
+ //misspelled word
+ SwCrsrShell* pCrsrShell = GetCrsrShell();
+ if( pCrsrShell != NULL && pCrsrShell->GetViewOptions() && pCrsrShell->GetViewOptions()->IsOnlineSpell())
+ {
+ const SwWrongList* pWrongList = pTxtNode->GetWrong();
+ if( NULL != pWrongList )
+ {
+ xub_StrLen nBegin = nIndex;
+ xub_StrLen nLen = 1;
+ if( pWrongList->InWrongWord(nBegin,nLen) && !pTxtNode->IsSymbol(nBegin) )
+ {
+ rValue.Value <<= (sal_uInt16)UNDERLINE_WAVE;
+ }
+ }
+ }
+ continue;
+ }
+
+ // UnderLineColor
+ if (rValue.Name.compareTo(::rtl::OUString::createFromAscii( GetPropName( UNO_NAME_CHAR_UNDERLINE_COLOR ).pName ) )==0)
+ {
+ //misspelled word
+ SwCrsrShell* pCrsrShell = GetCrsrShell();
+ if( pCrsrShell != NULL && pCrsrShell->GetViewOptions() && pCrsrShell->GetViewOptions()->IsOnlineSpell())
+ {
+ const SwWrongList* pWrongList = pTxtNode->GetWrong();
+ if( NULL != pWrongList )
+ {
+ xub_StrLen nBegin = nIndex;
+ xub_StrLen nLen = 1;
+ if( pWrongList->InWrongWord(nBegin,nLen) && !pTxtNode->IsSymbol(nBegin) )
+ {
+ rValue.Value <<= (sal_Int32)0x00ff0000;
+ continue;
+ }
+ }
+ }
+
+ uno::Any &anyChar = rValue.Value;
+ sal_uInt32 crUnderline = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved));
+ if ( COL_AUTO == crUnderline )
+ {
+ uno::Reference<XAccessibleComponent> xComponent(this);
+ if (xComponent.is())
+ {
+ Color cr(xComponent->getBackground());
+ crUnderline = cr.IsDark() ? COL_WHITE : COL_BLACK;
+ rValue.Value <<= crUnderline;
+ }
+ }
+
+ continue;
+ }
+
+ //tab stop
+ if (rValue.Name.compareTo(::rtl::OUString::createFromAscii( GetPropName( UNO_NAME_TABSTOPS ).pName ) )==0)
+ {
+ com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > tabs = GetCurrentTabStop( nIndex );
+ if( !tabs.hasElements() )
+ {
+ tabs.realloc(1);
+ ::com::sun::star::style::TabStop ts;
+ com::sun::star::awt::Rectangle rc0 = getCharacterBounds(0);
+ com::sun::star::awt::Rectangle rc1 = getCharacterBounds(nIndex);
+ if( rc1.X - rc0.X >= 48 )
+ ts.Position = (rc1.X - rc0.X) - (rc1.X - rc0.X - 48)% 47 + 47;
+ else
+ ts.Position = 48;
+ ts.DecimalChar = ' ';
+ ts.FillChar = ' ';
+ ts.Alignment = ::com::sun::star::style::TabAlign_LEFT;
+ tabs[0] = ts;
+ }
+ rValue.Value <<= tabs;
+ continue;
+ }
+
+ //number bullet
+ if (rValue.Name.compareTo(::rtl::OUString::createFromAscii( GetPropName( UNO_NAME_NUMBERING_RULES ).pName ) )==0)
+ {
+ if ( pTxtNode->HasBullet() || pTxtNode->HasNumber() )
+ {
+ uno::Any aVal;
+ SwNumRule* pNumRule = pTxtNode->GetNumRule();
+ if (pNumRule)
+ {
+ uno::Reference< container::XIndexReplace > xNum = new SwXNumberingRules(*pNumRule);
+ aVal.setValue(&xNum, ::getCppuType((const uno::Reference< container::XIndexReplace >*)0));
+ }
+ rValue.Value <<= aVal;
+ }
+ continue;
+ }
+
+ //footnote & endnote
+ if (rValue.Name.compareTo(::rtl::OUString::createFromAscii( GetPropName( UNO_NAME_CHAR_ESCAPEMENT ).pName ) )==0)
+ {
+ if ( GetPortionData().IsIndexInFootnode(nIndex) )
+ {
+ const OUString sEscapmentName = OUString::createFromAscii( GetPropName( UNO_NAME_CHAR_ESCAPEMENT ).pName );
+ rValue.Value <<= (sal_Int32)101;
+ }
+ continue;
+ }
+ }
+}
+//-----IAccessibility2 Implementation 2009
awt::Rectangle SwAccessibleParagraph::getCharacterBounds(
sal_Int32 nIndex )
@@ -1971,6 +2978,12 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n
/*accessibility::*/TextSegment aResult;
aResult.SegmentStart = -1;
aResult.SegmentEnd = -1;
+ //IAccessibility2 Implementation 2009-----
+ //If nIndex = 0, then nobefore text so return -1 directly.
+ if( nIndex == 0 )
+ return aResult;
+ //Tab will be return when call WORDTYPE
+ //-----IAccessibility2 Implementation 2009
// get starting pos
i18n::Boundary aBound;
@@ -1985,22 +2998,47 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n
}
// now skip to previous word
- sal_Bool bWord = sal_False;
- while( !bWord )
+ //IAccessibility2 Implementation 2009-----
+ if (nTextType==2 || nTextType == 3)
{
- nIndex = min( nIndex, aBound.startPos ) - 1;
- if( nIndex >= 0 )
- bWord = GetTextBoundary( aBound, rText, nIndex, nTextType );
- else
- break; // exit if beginning of string is reached
+ i18n::Boundary preBound = aBound;
+ while(preBound.startPos==aBound.startPos && nIndex > 0)
+ {
+ nIndex = min( nIndex, preBound.startPos ) - 1;
+ if( nIndex < 0 ) break;
+ GetTextBoundary( preBound, rText, nIndex, nTextType );
+ }
+ //if (nIndex>0)
+ if (nIndex>=0)
+ //Tab will be return when call WORDTYPE
+ {
+ aResult.SegmentText = rText.copy( preBound.startPos, preBound.endPos - preBound.startPos );
+ aResult.SegmentStart = preBound.startPos;
+ aResult.SegmentEnd = preBound.endPos;
+ }
}
-
- if ( bWord )
+ else
{
- aResult.SegmentText = rText.copy( aBound.startPos, aBound.endPos - aBound.startPos );
- aResult.SegmentStart = aBound.startPos;
- aResult.SegmentEnd = aBound.endPos;
- };
+ sal_Bool bWord = sal_False;
+ while( !bWord )
+ {
+ nIndex = min( nIndex, aBound.startPos ) - 1;
+ if( nIndex >= 0 )
+ {
+ bWord = GetTextBoundary( aBound, rText, nIndex, nTextType );
+ }
+ else
+ break; // exit if beginning of string is reached
+ }
+
+ if (bWord && nIndex<rText.getLength())
+ {
+ aResult.SegmentText = rText.copy( aBound.startPos, aBound.endPos - aBound.startPos );
+ aResult.SegmentStart = aBound.startPos;
+ aResult.SegmentEnd = aBound.endPos;
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
return aResult;
}
@@ -2041,6 +3079,66 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n
aResult.SegmentStart = aBound.startPos;
aResult.SegmentEnd = aBound.endPos;
}
+
+/*
+ //IAccessibility2 Implementation 2009-----
+ sal_Bool bWord = sal_False;
+ bWord = GetTextBoundary( aBound, rText, nIndex, nTextType );
+
+ if (nTextType==2)
+ {
+ Boundary nexBound=aBound;
+
+ // real current word
+ if( nIndex <= aBound.endPos && nIndex >= aBound.startPos )
+ {
+ while(nexBound.endPos==aBound.endPos&&nIndex<rText.getLength())
+ {
+ // nIndex = max( (sal_Int32)(nIndex), nexBound.endPos) + 1;
+ nIndex = max( (sal_Int32)(nIndex), nexBound.endPos) ;
+ const sal_Unicode* pStr = rText.getStr();
+ if (pStr)
+ {
+ if( pStr[nIndex] == sal_Unicode(' ') )
+ nIndex++;
+ }
+ if( nIndex < rText.getLength() )
+ {
+ bWord = GetTextBoundary( nexBound, rText, nIndex, nTextType );
+ }
+ }
+ }
+
+ if (bWord && nIndex<rText.getLength())
+ {
+ aResult.SegmentText = rText.copy( nexBound.startPos, nexBound.endPos - nexBound.startPos );
+ aResult.SegmentStart = nexBound.startPos;
+ aResult.SegmentEnd = nexBound.endPos;
+ }
+
+ }
+ else
+ {
+ bWord = sal_False;
+ while( !bWord )
+ {
+ nIndex = max( (sal_Int32)(nIndex+1), aBound.endPos );
+ if( nIndex < rText.getLength() )
+ {
+ bWord = GetTextBoundary( aBound, rText, nIndex, nTextType );
+ }
+ else
+ break; // exit if end of string is reached
+ }
+ if (bWord && nIndex<rText.getLength())
+ {
+ aResult.SegmentText = rText.copy( aBound.startPos, aBound.endPos - aBound.startPos );
+ aResult.SegmentStart = aBound.startPos;
+ aResult.SegmentEnd = aBound.endPos;
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
+*/
return aResult;
}
@@ -2153,16 +3251,6 @@ sal_Bool SwAccessibleParagraph::replaceText(
throw lang::IndexOutOfBoundsException();
}
-struct IndexCompare
-{
- const PropertyValue* pValues;
- IndexCompare( const PropertyValue* pVals ) : pValues(pVals) {}
- bool operator() ( const sal_Int32& a, const sal_Int32& b ) const
- {
- return (pValues[a].Name < pValues[b].Name) ? true : false;
- }
-};
-
sal_Bool SwAccessibleParagraph::setAttributes(
sal_Int32 nStartIndex,
@@ -2368,6 +3456,16 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkCount()
nCount++;
}
+ //IAccessibility2 Implementation 2009-----
+ /* Can't fin the function "GetTOCFirstWordEndIndex" declaration in sym2.0 (Added by yanjun)
+ if( GetTOXSortTabBase() )
+ {
+ SwTxtNode* pNode = const_cast<SwTxtNode*>(GetTxtNode());
+ if(pNode && pNode->GetTOCFirstWordEndIndex() > 0)
+ nCount++;
+ }
+ */
+ //-----IAccessibility2 Implementation 2009
return nCount;
}
@@ -2382,8 +3480,163 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL
// --> OD 2007-06-27 #i77108# - provide hyperlinks also in editable documents.
// if( !IsEditableState() )
- // <--
+ const SwTxtFrm *pTxtFrm = static_cast<const SwTxtFrm*>( GetFrm() );
+ SwHyperlinkIter_Impl aHIter( pTxtFrm );
+ //SwAccessibleAutoRecognizerHelper_Impl aARHelper( pTxtFrm );
+ sal_Int32 nARCount = 0;
+ sal_Int32 nARIndex = 0;
+ sal_Int32 nTIndex = -1;
+ sal_Int32 nTOCEndIndex = -1;
+ SwTxtNode* pNode = NULL;
+ SwTOXSortTabBase* pTBase = GetTOXSortTabBase();
+ if( pTBase )
+ {
+ pNode = const_cast<SwTxtNode*>(GetTxtNode());
+ }
+ nTOCEndIndex = -1;
+ //if(pNode)
+ // nTOCEndIndex = pNode->GetTOCFirstWordEndIndex();
+ SwTxtAttr* pHt = (SwTxtAttr*)(aHIter.next());
+ while( (nLinkIndex < getHyperLinkCount()) && nTIndex < nLinkIndex)
{
+ // no candidates, exit
+ //if( (!pHt) && (nARIndex >= nARCount) && nTOCEndIndex <= 0)
+ // break;
+
+ sal_Int32 nHStt = -1;
+ sal_Int32 nAStt = -1;
+ sal_Bool bH = sal_False;
+ sal_Bool bA = sal_False;
+
+
+ if( pHt )
+ nHStt = *pHt->GetStart();
+ if( nARIndex < nARCount )
+ {
+ /*
+ sal_Int32 nAEnd;
+ aARHelper.getPosition( nARIndex, nAStt, nAEnd );
+ */
+ }
+ sal_Bool bTOC = sal_False;
+ // Inside TOC & get the first link
+ if( pTBase && nTIndex == -1 )
+ {
+ nTIndex++;
+ bTOC = sal_True;
+ }
+ else
+ {
+ if( nHStt >=0 && nAStt >=0 )
+ { // both hyperlink and smart tag available
+ nTIndex++;
+ if( nHStt <= nAStt )
+ bH = sal_True;
+ else
+ bA = sal_True;
+ }
+ else if( nHStt >= 0 )
+ { // only hyperlink available
+ nTIndex++;
+ bH = sal_True;
+ }
+ else if( nAStt >= 0 )
+ { // only smart tag available
+ nTIndex++;
+ bA = sal_True;
+ }
+ }
+
+ if( nTIndex == nLinkIndex )
+ { // found
+ if( bH )
+ { // it's a hyperlink
+ if( pHt )
+ {
+// const SwField* pFFld = pHt->GetFld().GetFld();
+ {
+ if( !pHyperTextData )
+ pHyperTextData = new SwAccessibleHyperTextData;
+ SwAccessibleHyperTextData::iterator aIter =
+ pHyperTextData ->find( pHt );
+ if( aIter != pHyperTextData->end() )
+ {
+ xRet = (*aIter).second;
+ }
+ if( !xRet.is() )
+ {
+ {
+ const sal_Int32 nTmpHStt= GetPortionData().GetAccessiblePosition(
+ max( aHIter.startIdx(), *pHt->GetStart() ) );
+ const sal_Int32 nTmpHEnd= GetPortionData().GetAccessiblePosition(
+ min( aHIter.endIdx(), *pHt->GetAnyEnd() ) );
+ xRet = new SwAccessibleHyperlink( aHIter.getCurrHintPos(),
+ this, nTmpHStt, nTmpHEnd );
+ }
+ if( aIter != pHyperTextData->end() )
+ {
+ (*aIter).second = xRet;
+ }
+ else
+ {
+ SwAccessibleHyperTextData::value_type aEntry( pHt, xRet );
+ pHyperTextData->insert( aEntry );
+ }
+ }
+ }
+ }
+ }
+ else if( bTOC )
+ {
+ //xRet = new SwAccessibleTOCLink( this );
+ }
+ else if( bA )
+ {
+ /*
+ // it's a smart tag
+ if( !pAutoRecognizerData )
+ pAutoRecognizerData = new SwAccessibleAutoRecognizerData;
+ SwAccessibleAutoRecognizerData::iterator aIter =
+ pAutoRecognizerData ->find( nARIndex );
+ if( aIter != pAutoRecognizerData->end() )
+ {
+ xRet = (*aIter).second;
+ }
+ if( !xRet.is() )
+ {
+ sal_Int32 nAStt = 0;
+ sal_Int32 nAEnd = 0;
+ //aARHelper.getPosition( nARIndex, nAStt, nAEnd );
+ xRet = new SwAccessibleAutoRecognizer( this, nAStt, nAEnd );
+ if( aIter != pAutoRecognizerData->end() )
+ {
+ (*aIter).second = xRet;
+ }
+ else
+ {
+ SwAccessibleAutoRecognizerData::value_type aEntry( nARIndex, xRet );
+ pAutoRecognizerData->insert( aEntry );
+ }
+ }
+ */
+ }
+ break;
+ }
+
+ // iterate next
+ if( bH )
+ // iterate next hyperlink
+ pHt = (SwTxtAttr*)(aHIter.next());
+ else if( bA )
+ // iterate next smart tag
+ nARIndex++;
+ else if(bTOC)
+ continue;
+ else
+ // no candidate, exit
+ break;
+ }
+ /*
const SwTxtFrm *pTxtFrm = static_cast<const SwTxtFrm*>( GetFrm() );
SwHyperlinkIter_Impl aHIter( pTxtFrm );
while( nLinkIndex-- )
@@ -2420,7 +3673,7 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL
}
}
}
-
+ */
if( !xRet.is() )
throw lang::IndexOutOfBoundsException();
@@ -2459,10 +3712,23 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkIndex( sal_Int32 nCharInde
if( pHt )
nRet = nPos;
-
}
+ //IAccessibility2 Implementation 2009-----
+ /* Added by yanjun for acc miagration
+ if( nRet == -1 && GetTOXSortTabBase() )
+ {
+ SwTxtNode* pNode = const_cast<SwTxtNode*>(GetTxtNode());
+ if( nCharIndex >= 0 && nCharIndex < pNode->GetTOCFirstWordEndIndex())
+ nRet = 0;
+ }
+ */
- return nRet;
+ if (nRet == -1)
+ throw lang::IndexOutOfBoundsException();
+ else
+ return nRet;
+ //return nRet;
+ //-----IAccessibility2 Implementation 2009
}
// --> OD 2008-05-26 #i71360#
@@ -2491,6 +3757,203 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getTextMarkupCount( sal_Int32 nTextMar
return pTextMarkupHelper->getTextMarkupCount( nTextMarkupType );
}
+//IAccessibility2 Implementation 2009-----
+//MSAA Extension Implementation in app module
+sal_Bool SAL_CALL SwAccessibleParagraph::scrollToPosition( const ::com::sun::star::awt::Point&, sal_Bool )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
+{
+ return sal_False;
+}
+
+sal_Int32 SAL_CALL SwAccessibleParagraph::getSelectedPortionCount( )
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ sal_Int32 nSeleted = 0;
+ SwPaM* pCrsr = GetCursor( true );
+ if( pCrsr != NULL )
+ {
+ // get SwPosition for my node
+ const SwTxtNode* pNode = GetTxtNode();
+ sal_uLong nHere = pNode->GetIndex();
+
+ // iterate over ring
+ SwPaM* pRingStart = pCrsr;
+ do
+ {
+ // ignore, if no mark
+ if( pCrsr->HasMark() )
+ {
+ // check whether nHere is 'inside' pCrsr
+ SwPosition* pStart = pCrsr->Start();
+ sal_uLong nStartIndex = pStart->nNode.GetIndex();
+ SwPosition* pEnd = pCrsr->End();
+ sal_uLong nEndIndex = pEnd->nNode.GetIndex();
+ if( ( nHere >= nStartIndex ) &&
+ ( nHere <= nEndIndex ) )
+ {
+ nSeleted++;
+ }
+ // else: this PaM doesn't point to this paragraph
+ }
+ // else: this PaM is collapsed and doesn't select anything
+
+ // next PaM in ring
+ pCrsr = static_cast<SwPaM*>( pCrsr->GetNext() );
+ }
+ while( pCrsr != pRingStart );
+ }
+ return nSeleted;
+
+}
+
+sal_Int32 SAL_CALL SwAccessibleParagraph::getSeletedPositionStart( sal_Int32 nSelectedPortionIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ sal_Int32 nStart, nEnd;
+ /*sal_Bool bSelected = */GetSelectionAtIndex(nSelectedPortionIndex, nStart, nEnd );
+ return nStart;
+}
+
+sal_Int32 SAL_CALL SwAccessibleParagraph::getSeletedPositionEnd( sal_Int32 nSelectedPortionIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ sal_Int32 nStart, nEnd;
+ /*sal_Bool bSelected = */GetSelectionAtIndex(nSelectedPortionIndex, nStart, nEnd );
+ return nEnd;
+}
+
+sal_Bool SAL_CALL SwAccessibleParagraph::removeSelection( sal_Int32 selectionIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ if(selectionIndex < 0) return sal_False;
+
+ sal_Bool bRet = sal_False;
+ sal_Int32 nSelected = selectionIndex;
+
+ // get the selection, and test whether it affects our text node
+ SwPaM* pCrsr = GetCursor( true );
+// SwPaM* pFirst = pCrsr;
+ SwPaM* pPrev = pCrsr;
+
+ if( pCrsr != NULL )
+ {
+ // get SwPosition for my node
+ const SwTxtNode* pNode = GetTxtNode();
+ sal_uLong nHere = pNode->GetIndex();
+
+ // iterate over ring
+ SwPaM* pRingStart = pCrsr;
+ do
+ {
+ // ignore, if no mark
+ if( pCrsr->HasMark() )
+ {
+ // check whether nHere is 'inside' pCrsr
+ SwPosition* pStart = pCrsr->Start();
+ sal_uLong nStartIndex = pStart->nNode.GetIndex();
+ SwPosition* pEnd = pCrsr->End();
+ sal_uLong nEndIndex = pEnd->nNode.GetIndex();
+ if( ( nHere >= nStartIndex ) &&
+ ( nHere <= nEndIndex ) )
+ {
+ if( nSelected == 0 )
+ {
+ pCrsr->MoveTo((Ring*)0);
+ delete pCrsr;
+ bRet = sal_True;
+ }
+ else
+ {
+ nSelected--;
+ }
+ }
+ }
+ // else: this PaM is collapsed and doesn't select anything
+ pPrev = pCrsr;
+ pCrsr = static_cast<SwPaM*>( pCrsr->GetNext() );
+ }
+ while( !bRet && (pCrsr != pRingStart) );
+ }
+ return sal_True;
+}
+
+sal_Int32 SAL_CALL SwAccessibleParagraph::addSelection( sal_Int32, sal_Int32 startOffset, sal_Int32 endOffset)
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ // parameter checking
+ sal_Int32 nLength = GetString().getLength();
+ if ( ! IsValidRange( startOffset, endOffset, nLength ) )
+ {
+ throw lang::IndexOutOfBoundsException();
+ }
+
+ sal_Int32 nSelectedCount = getSelectedPortionCount();
+ for ( sal_Int32 i = nSelectedCount ; i >= 0 ; i--)
+ {
+ sal_Int32 nStart, nEnd;
+ sal_Bool bSelected = GetSelectionAtIndex(i, nStart, nEnd );
+ if(bSelected)
+ {
+ if(nStart <= nEnd )
+ {
+ if (( startOffset>=nStart && startOffset <=nEnd ) || //startOffset in a selection
+ ( endOffset>=nStart && endOffset <=nEnd ) || //endOffset in a selection
+ ( startOffset <= nStart && endOffset >=nEnd) || //start and end include the old selection
+ ( startOffset >= nStart && endOffset <=nEnd) )
+ {
+ removeSelection(i);
+ }
+
+ }
+ else
+ {
+ if (( startOffset>=nEnd && startOffset <=nStart ) || //startOffset in a selection
+ ( endOffset>=nEnd && endOffset <=nStart ) || //endOffset in a selection
+ ( startOffset <= nStart && endOffset >=nEnd) || //start and end include the old selection
+ ( startOffset >= nStart && endOffset <=nEnd) )
+
+ {
+ removeSelection(i);
+ }
+ }
+ }
+
+ }
+
+ sal_Bool bRet = sal_False;
+
+ // get cursor shell
+ SwCrsrShell* pCrsrShell = GetCrsrShell();
+ if( pCrsrShell != NULL )
+ {
+ // create pam for selection
+ pCrsrShell->StartAction();
+// SwTxtNode* pNode = const_cast<SwTxtNode*>( GetTxtNode() );
+ SwPaM* aPaM = pCrsrShell->CreateCrsr();
+ aPaM->SetMark();
+ aPaM->GetPoint()->nContent = GetPortionData().GetModelPosition(startOffset);
+ aPaM->GetMark()->nContent = GetPortionData().GetModelPosition(endOffset);
+ //pCrsrShell->ShowCrsr();
+ pCrsrShell->EndAction();
+ // set PaM at cursor shell
+ //bRet = Select( aPaM );
+ }
+
+ return bRet;
+}
+//-----IAccessibility2 Implementation 2009
/*accessibility::*/TextSegment SAL_CALL
SwAccessibleParagraph::getTextMarkup( sal_Int32 nTextMarkupIndex,
@@ -2672,3 +4135,267 @@ void SwAccessibleParagraph::Modify( const SfxPoolItem* pOld, const SfxPoolItem*
CheckRegistration( pOld, pNew );
}
// <--
+
+//IAccessibility2 Implementation 2009-----
+sal_Bool SwAccessibleParagraph::GetSelectionAtIndex(
+ sal_Int32& nIndex, sal_Int32& nStart, sal_Int32& nEnd)
+{
+ if(nIndex < 0) return sal_False;
+
+
+ sal_Bool bRet = sal_False;
+ nStart = -1;
+ nEnd = -1;
+ sal_Int32 nSelected = nIndex;
+
+ // get the selection, and test whether it affects our text node
+ SwPaM* pCrsr = GetCursor( true );
+ if( pCrsr != NULL )
+ {
+ // get SwPosition for my node
+ const SwTxtNode* pNode = GetTxtNode();
+ sal_uLong nHere = pNode->GetIndex();
+
+ // iterate over ring
+ SwPaM* pRingStart = pCrsr;
+ do
+ {
+ // ignore, if no mark
+ if( pCrsr->HasMark() )
+ {
+ // check whether nHere is 'inside' pCrsr
+ SwPosition* pStart = pCrsr->Start();
+ sal_uLong nStartIndex = pStart->nNode.GetIndex();
+ SwPosition* pEnd = pCrsr->End();
+ sal_uLong nEndIndex = pEnd->nNode.GetIndex();
+ if( ( nHere >= nStartIndex ) &&
+ ( nHere <= nEndIndex ) )
+ {
+ if( nSelected == 0 )
+ {
+ // translate start and end positions
+
+ // start position
+ sal_Int32 nLocalStart = -1;
+ if( nHere > nStartIndex )
+ {
+ // selection starts in previous node:
+ // then our local selection starts with the paragraph
+ nLocalStart = 0;
+ }
+ else
+ {
+ DBG_ASSERT( nHere == nStartIndex,
+ "miscalculated index" );
+
+ // selection starts in this node:
+ // then check whether it's before or inside our part of
+ // the paragraph, and if so, get the proper position
+ sal_uInt16 nCoreStart = pStart->nContent.GetIndex();
+ if( nCoreStart <
+ GetPortionData().GetFirstValidCorePosition() )
+ {
+ nLocalStart = 0;
+ }
+ else if( nCoreStart <=
+ GetPortionData().GetLastValidCorePosition() )
+ {
+ DBG_ASSERT(
+ GetPortionData().IsValidCorePosition(
+ nCoreStart ),
+ "problem determining valid core position" );
+
+ nLocalStart =
+ GetPortionData().GetAccessiblePosition(
+ nCoreStart );
+ }
+ }
+
+ // end position
+ sal_Int32 nLocalEnd = -1;
+ if( nHere < nEndIndex )
+ {
+ // selection ends in following node:
+ // then our local selection extends to the end
+ nLocalEnd = GetPortionData().GetAccessibleString().
+ getLength();
+ }
+ else
+ {
+ DBG_ASSERT( nHere == nStartIndex,
+ "miscalculated index" );
+
+ // selection ends in this node: then select everything
+ // before our part of the node
+ sal_uInt16 nCoreEnd = pEnd->nContent.GetIndex();
+ if( nCoreEnd >
+ GetPortionData().GetLastValidCorePosition() )
+ {
+ // selection extends beyond out part of this para
+ nLocalEnd = GetPortionData().GetAccessibleString().
+ getLength();
+ }
+ else if( nCoreEnd >=
+ GetPortionData().GetFirstValidCorePosition() )
+ {
+ // selection is inside our part of this para
+ DBG_ASSERT(
+ GetPortionData().IsValidCorePosition(
+ nCoreEnd ),
+ "problem determining valid core position" );
+
+ nLocalEnd = GetPortionData().GetAccessiblePosition(
+ nCoreEnd );
+ }
+ }
+
+ if( ( nLocalStart != -1 ) && ( nLocalEnd != -1 ) )
+ {
+ nStart = nLocalStart;
+ nEnd = nLocalEnd;
+ bRet = sal_True;
+ }
+ } // if hit the index
+ else
+ {
+ nSelected--;
+ }
+ }
+ // else: this PaM doesn't point to this paragraph
+ }
+ // else: this PaM is collapsed and doesn't select anything
+
+ // next PaM in ring
+ pCrsr = static_cast<SwPaM*>( pCrsr->GetNext() );
+ }
+ while( !bRet && (pCrsr != pRingStart) );
+ }
+ // else: nocursor -> no selection
+
+ if( bRet )
+ {
+ sal_Int32 nCaretPos = GetCaretPos();
+ if( nStart == nCaretPos )
+ {
+ sal_Int32 tmp = nStart;
+ nStart = nEnd;
+ nEnd = tmp;
+ }
+ }
+ return bRet;
+}
+
+sal_Int16 SAL_CALL SwAccessibleParagraph::getAccessibleRole (void) throw (::com::sun::star::uno::RuntimeException)
+{
+ //Get the real heading level, Heading1 ~ Heading10
+ if (nHeadingLevel > 0)
+ {
+ return AccessibleRole::HEADING;
+ }
+ else
+ {
+ return AccessibleRole::PARAGRAPH;
+ }
+}
+
+// End Add
+
+
+/* This funcion is already defined in accpara.cxx(Added by yanjun)
+sal_Int32 SAL_CALL SwAccessibleParagraph::getBackground()
+ throw (::com::sun::star::uno::RuntimeException)
+{
+// Test Code
+// Sequence<OUString> seNames(1);
+// OUString* pStrings = seNames.getArray();
+// pStrings[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("ParaBackColor"));
+//
+// Sequence<Any> aAnys(1);
+// Reference<XMultiPropertySet> xPortion = CreateUnoPortion( 0, 0 );
+// aAnys = xPortion->getPropertyValues( seNames );
+// const Any* pAnys = aAnys.getConstArray();
+//
+// sal_uInt32 crColorT=0;
+// pAnys[0] >>= crColorT;
+// End Test Code
+
+ const SvxBrushItem &rBack = GetFrm()->GetAttrSet()->GetBackground();
+ sal_uInt32 crBack = rBack.GetColor().GetColor();
+
+ if (COL_AUTO == crBack)
+ {
+ Reference<XAccessible> xAccDoc = getAccessibleParent();
+ if (xAccDoc.is())
+ {
+ Reference<XAccessibleComponent> xCompoentDoc(xAccDoc,UNO_QUERY);
+ if (xCompoentDoc.is())
+ {
+ crBack = (sal_uInt32)xCompoentDoc->getBackground();
+ }
+ }
+ }
+ return crBack;
+}
+*/
+
+//Get the real heading level, Heading1 ~ Heading10
+sal_Int32 SwAccessibleParagraph::GetRealHeadingLevel()
+{
+ uno::Reference< ::com::sun::star::beans::XPropertySet > xPortion = CreateUnoPortion( 0, 0 );
+ ::rtl::OUString pString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParaStyleName"));
+ uno::Any styleAny = xPortion->getPropertyValue( pString );
+ ::rtl::OUString sValue;
+ if (styleAny >>= sValue)
+ {
+ //Modified by yanjun for acc migration
+ sal_Int32 length = sValue.getLength/*GetCharCount*/();
+ if (length == 9 || length == 10)
+ {
+ ::rtl::OUString headStr = sValue.copy(0, 7);
+ if (headStr.equals(::rtl::OUString::createFromAscii("Heading")))
+ {
+ ::rtl::OUString intStr = sValue.copy(8);
+ sal_Int32 headingLevel = intStr.toInt32(10);
+ return headingLevel;
+ }
+ }
+ }
+ return -1;
+}
+
+uno::Any SAL_CALL SwAccessibleParagraph::getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+ uno::Any Ret;
+ ::rtl::OUString strHeading(::rtl::OUString::createFromAscii("heading-level:"));
+ if( nHeadingLevel >= 0 )
+ strHeading += OUString::valueOf(nHeadingLevel, 10);
+ strHeading += OUString::createFromAscii(";");
+
+ Ret <<= strHeading;
+
+ return Ret;
+}
+
+//Tab will be return when call WORDTYPE
+sal_Bool SwAccessibleParagraph::tabCharInWord( sal_Int32 nIndex, i18n::Boundary& aBound)
+{
+ sal_Bool bFind = sal_False;
+ if( aBound.startPos != nIndex)
+ {
+ OUString tabStr;
+ if(aBound.startPos>nIndex)
+ tabStr = GetString().copy(nIndex,(aBound.startPos - nIndex) );
+
+ sal_Unicode tabChar('\t');
+ sal_Int32 tabIndex = tabStr.indexOf(tabChar);
+ if( tabIndex > -1 )
+ {
+ aBound.startPos = nIndex + tabIndex ;
+ aBound.endPos = aBound.startPos + 1;
+ bFind = sal_True;
+ }
+ }
+ return bFind;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx
index 782ecfbefe5a..1de219d9e2bf 100644
--- a/sw/source/core/access/accpara.hxx
+++ b/sw/source/core/access/accpara.hxx
@@ -29,6 +29,11 @@
#include <com/sun/star/accessibility/XAccessibleHypertext.hpp>
#include <com/sun/star/accessibility/XAccessibleTextMarkup.hpp>
#include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/XAccessibleTextSelection.hpp>
+#include <txmsrt.hxx>
+#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
+//-----IAccessibility2 Implementation 2009
#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
#include <hash_map>
#include <accselectionhelper.hxx>
@@ -36,11 +41,13 @@
#include <calbck.hxx>
// <--
+class SwField;
class SwTxtFrm;
class SwTxtNode;
class SwPaM;
class SwAccessiblePortionData;
class SwAccessibleHyperTextData;
+class SwRedline; //IAccessibility2 Implementation 2009
class SwXTextPortion;
// --> OD 2010-02-19 #i108125#
class SwParaChangeTrackingInfo;
@@ -50,6 +57,7 @@ namespace rtl { class OUString; }
namespace com { namespace sun { namespace star {
namespace i18n { struct Boundary; }
namespace accessibility { class XAccessibleHyperlink; }
+ namespace style { class TabStop; }
} } }
typedef ::std::hash_map< ::rtl::OUString,
@@ -67,7 +75,11 @@ class SwAccessibleParagraph :
public com::sun::star::accessibility::XAccessibleHypertext,
public com::sun::star::accessibility::XAccessibleTextMarkup,
public com::sun::star::accessibility::XAccessibleMultiLineText,
- public ::com::sun::star::accessibility::XAccessibleTextAttributes
+ public ::com::sun::star::accessibility::XAccessibleTextAttributes,
+ //IAccessibility2 Implementation 2009-----
+ public com::sun::star::accessibility::XAccessibleTextSelection,
+ public com::sun::star::accessibility::XAccessibleExtendedAttributes
+ //-----IAccessibility2 Implementation 2009
{
friend class SwAccessibleHyperlink;
@@ -86,6 +98,9 @@ class SwAccessibleParagraph :
// mutex)
sal_Bool bIsHeading; // protected by base classes mutex
+ //IAccessibility2 Implementation 2009-----
+ sal_Int32 nHeadingLevel;
+ //-----IAccessibility2 Implementation 2009
// implementation for XAccessibleSelection
SwAccessibleSelectionHelper aSelectionHelper;
@@ -144,6 +159,10 @@ class SwAccessibleParagraph :
}
}
+ //IAccessibility2 Implementation 2009-----
+ const SwRedline* GetRedlineAtIndex( sal_Int32 nPos );
+ String GetFieldTypeNameAtIndex(sal_Int32 nIndex);
+ //-----IAccessibility2 Implementation 2009
// --> OD 2006-07-13 #i63870#
void _getDefaultAttributesImpl(
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes,
@@ -154,9 +173,22 @@ class SwAccessibleParagraph :
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes,
tAccParaPropValMap& rRunAttrSeq );
// <--
+ // IAccessibility2 Implementation 2009----
+ void _getSupplementalAttributesImpl(
+ const sal_Int32 nIndex,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes,
+ tAccParaPropValMap& rSupplementalAttrSeq );
-public:
+ void _correctValues(
+ const sal_Int32 nIndex,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rValues );
+ // ----IAccessibility2 Implementation 2009
+public:
+ //IAccessibility2 Implementation 2009-----
+ SwTOXSortTabBase* GetTOXSortTabBase();
+ short GetTOCLevel();
+ //-----IAccessibility2 Implementation 2009
sal_Bool IsHeading() const;
protected:
@@ -241,6 +273,15 @@ public:
virtual sal_Bool HasCursor(); // required by map to remember that object
+ //IAccessibility2 Implementation 2009-----
+ com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > GetCurrentTabStop( sal_Int32 nIndex );
+ virtual sal_Int16 SAL_CALL getAccessibleRole (void) throw (::com::sun::star::uno::RuntimeException);
+ //-----IAccessibility2 Implementation 2009
+ // --> OD 2010-02-19 #i108125#
+ // MT: Solved merge conflict - seems this was removed between 101 and 103?
+ // virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew);
+ // <--
+
//===== XAccessibleContext ==============================================
/// Return this object's description.
@@ -406,7 +447,29 @@ public:
::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
// <--
-
+ //IAccessibility2 Implementation 2009-----
+ //====== XAccessibleTextSelection ======================================
+ virtual sal_Bool SAL_CALL scrollToPosition( const ::com::sun::star::awt::Point& aPoint, sal_Bool isLeftTop )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectedPortionCount( )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSeletedPositionStart( sal_Int32 nSelectedPortionIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSeletedPositionEnd( sal_Int32 nSelectedPortionIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL removeSelection( sal_Int32 selectionIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL addSelection( sal_Int32 selectionIndex, sal_Int32 startOffset, sal_Int32 endOffset)
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ //===== XAccessibleExtendedAttributes ==============================================
+ virtual ::com::sun::star::uno::Any SAL_CALL getExtendedAttributes()
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ sal_Bool GetSelectionAtIndex(sal_Int32& nIndex, sal_Int32& nStart, sal_Int32& nEnd);
+ sal_Int32 GetRealHeadingLevel();
+ //===== XAccessibleComponent ============================================
+ sal_Bool m_bLastHasSelection;
+ sal_Bool tabCharInWord(sal_Int32 nIndex, com::sun::star::i18n::Boundary& aBound);
+ //-----IAccessibility2 Implementation 2009
// --> OD 2008-05-29 #i89175#
//===== XAccessibleMultiLineText ========================================
virtual sal_Int32 SAL_CALL getLineNumberAtIndex( sal_Int32 nIndex )
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index 2d50e6f0d08a..64d6daba5cae 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -64,6 +64,10 @@
using namespace ::com::sun::star;
+//IAccessibility2 Implementation 2009-----
+//#include "accnote.hxx"
+//-----IAccessibility2 Implementation 2009
+
using rtl::OUString;
using rtl::OUStringBuffer;
using i18n::Boundary;
@@ -140,6 +144,13 @@ void SwAccessiblePortionData::Text(sal_uInt16 nLength, sal_uInt16 nType)
bLastIsSpecial = sal_False;
}
+//IAccessibility2 Implementation 2009-----
+void SwAccessiblePortionData::SetAttrFieldType( sal_uInt16 nAttrFldType )
+{
+ aAttrFieldType.push_back(nAttrFldType);
+ return;
+}
+//-----IAccessibility2 Implementation 2009
void SwAccessiblePortionData::Special(
sal_uInt16 nLength, const String& rText, sal_uInt16 nType)
@@ -156,11 +167,46 @@ void SwAccessiblePortionData::Special(
switch( nType )
{
case POR_POSTITS:
- case POR_FLYCNT:
- case POR_GRFNUM:
+ //IAccessibility2 Implementation 2009-----
sDisplay = String(sal_Unicode(0xfffc));
break;
+ case POR_FLYCNT:
+ sDisplay = String(sal_Unicode(0xfffc));
+ break;
+ case POR_GRFNUM:
+ case POR_BULLET:
+ break;
+ case POR_FLD:
+ //Added by yanjun for 6854
+ case POR_HIDDEN:
+ case POR_COMBINED:
+ case POR_ISOREF:
+ //End
+ {
+ //When the filed content is empty, input a special character.
+ if (rText.Len() == 0)
+ sDisplay = String(sal_Unicode(0xfffc));
+ else
+ sDisplay = rText;
+ aFieldPosition.push_back(aBuffer.getLength());
+ aFieldPosition.push_back(aBuffer.getLength() + rText.Len());
+ break;
+ }
+ case POR_FTNNUM:
+ {
+ break;
+ }
+ case POR_FTN:
+ {
+ sDisplay = rText;
+ sal_Int32 nStart=aBuffer.getLength();
+ sal_Int32 nEnd=nStart + rText.Len();
+ m_vecPairPos.push_back(std::make_pair(nStart,nEnd));
+ break;
+ }
+ //-----IAccessibility2 Implementation 2009
+ break;
case POR_NUMBER:
{
OUStringBuffer aTmpBuffer( rText.Len() + 1 );
@@ -280,6 +326,7 @@ sal_Bool SwAccessiblePortionData::IsGrayPortionType( sal_uInt16 nType ) const
case POR_NUMBER:
case POR_FLD:
case POR_URL:
+ case POR_INPUTFLD:
case POR_ISOTOX:
case POR_TOX:
case POR_HIDDEN:
@@ -675,6 +722,37 @@ sal_uInt16 SwAccessiblePortionData::FillSpecialPos(
return static_cast<sal_uInt16>( nModelPos );
}
+//IAccessibility2 Implementation 2009-----
+sal_uInt16 SwAccessiblePortionData::GetAttrFldType( sal_Int32 nPos )
+{
+ if( aFieldPosition.size() < 2 ) return sal_False;
+ sal_Int32 nFieldIndex = 0;
+ for( size_t i = 0; i < aFieldPosition.size() - 1; i += 2 )
+ {
+ if( nPos < aFieldPosition[ i + 1 ] && nPos >= aFieldPosition[ i ] )
+ {
+ return aAttrFieldType[nFieldIndex];
+ }
+ nFieldIndex++ ;
+ }
+ return 0;
+}
+
+sal_Bool SwAccessiblePortionData::FillBoundaryIFDateField( com::sun::star::i18n::Boundary& rBound, const sal_Int32 nPos )
+{
+ if( aFieldPosition.size() < 2 ) return sal_False;
+ for( size_t i = 0; i < aFieldPosition.size() - 1; i += 2 )
+ {
+ if( nPos < aFieldPosition[ i + 1 ] && nPos >= aFieldPosition[ i ] )
+ {
+ rBound.startPos = aFieldPosition[i];
+ rBound.endPos = aFieldPosition[i + 1];
+ return sal_True;
+ }
+ }
+ return sal_False;
+}
+//-----IAccessibility2 Implementation 2009
void SwAccessiblePortionData::AdjustAndCheck(
sal_Int32 nPos,
size_t& nPortionNo,
@@ -738,6 +816,50 @@ sal_Bool SwAccessiblePortionData::IsValidCorePosition( sal_uInt16 nPos ) const
( nPos <= aModelPositions[ aModelPositions.size()-1 ] );
}
+//IAccessibility2 Implementation 2009-----
+sal_Bool SwAccessiblePortionData::IsZeroCorePositionData()
+{
+ if( aModelPositions.size() < 1 ) return sal_True;
+ return aModelPositions[0] == 0 && aModelPositions[aModelPositions.size()-1] == 0;
+}
+
+sal_Bool SwAccessiblePortionData::IsIndexInFootnode(sal_Int32 nIndex)
+{
+ VEC_PAIR_POS::iterator vi =m_vecPairPos.begin();
+ for (;vi != m_vecPairPos.end() ; ++vi)
+ {
+ const PAIR_POS &pairPos = *vi;
+ if(nIndex >= pairPos.first && nIndex < pairPos.second )
+ {
+ return sal_True;
+ }
+ }
+ return sal_False;
+}
+
+sal_Bool SwAccessiblePortionData::IsInGrayPortion( sal_Int32 nPos )
+{
+// return IsGrayPortion( FindBreak( aAccessiblePositions, nPos ) );
+ return IsPortionAttrSet( FindBreak( aAccessiblePositions, nPos ),
+ PORATTR_GRAY );
+}
+
+sal_Int32 SwAccessiblePortionData::GetFieldIndex(sal_Int32 nPos)
+{
+ sal_Int32 nIndex = -1;
+ if( aFieldPosition.size() >= 2 )
+ {
+ for( sal_Int32 i = 0; i < aFieldPosition.size() - 1; i += 2 )
+ {
+ if( nPos <= aFieldPosition[ i + 1 ] && nPos >= aFieldPosition[ i ] )
+ {
+ nIndex = i/2;
+ break;
+ }
+ }
+ }
+ return nIndex;
+}
sal_uInt16 SwAccessiblePortionData::GetFirstValidCorePosition() const
{
return static_cast<sal_uInt16>( aModelPositions[0] );
diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx
index 1ecab653f3e2..a068f27458b4 100644
--- a/sw/source/core/access/accportions.hxx
+++ b/sw/source/core/access/accportions.hxx
@@ -61,6 +61,10 @@ class SwAccessiblePortionData : public SwPortionHandler
Positions_t aLineBreaks; /// position of line breaks
Positions_t aModelPositions; /// position of portion breaks in the model
Positions_t aAccessiblePositions; /// portion breaks in sAccessibleString
+ //IAccessibility2 Implementation 2009-----
+ Positions_t aFieldPosition;
+ //-----IAccessibility2 Implementation 2009
+ Positions_t aAttrFieldType;
typedef std::vector<sal_uInt8> PortionAttrs_t;
PortionAttrs_t aPortionAttrs; /// additional portion attributes
@@ -104,7 +108,15 @@ public:
virtual void Skip(sal_uInt16 nLength);
virtual void Finish();
+ //IAccessibility2 Implementation 2009-----
+ virtual void SetAttrFieldType( sal_uInt16 nAttrFldType );
+ sal_Bool FillBoundaryIFDateField( com::sun::star::i18n::Boundary& rBound, const sal_Int32 nPos );
+ sal_Bool IsIndexInFootnode(sal_Int32 nIndex);
+ sal_Bool IsInGrayPortion( sal_Int32 nPos );
+ sal_Int32 GetFieldIndex(sal_Int32 nPos);
+ //-----IAccessibility2 Implementation 2009
+ sal_Bool IsZeroCorePositionData();
// access to the portion data
/// get the text string, as presented by the layout
@@ -149,6 +161,7 @@ public:
void GetAttributeBoundary( com::sun::star::i18n::Boundary& rBound,
sal_Int32 nPos ) const;
+ sal_uInt16 GetAttrFldType( sal_Int32 nPos );
/// Convert start and end positions into core positions.
/// @returns true if 'special' portions are included either completely
/// or not at all. This can be used to test whether editing
@@ -164,6 +177,12 @@ public:
sal_Bool IsValidCorePosition( sal_uInt16 nPos ) const;
sal_uInt16 GetFirstValidCorePosition() const;
sal_uInt16 GetLastValidCorePosition() const;
+ //IAccessibility2 Implementation 2009-----
+private:
+ typedef std::pair<sal_Int32,sal_Int32> PAIR_POS;
+ typedef std::vector<PAIR_POS> VEC_PAIR_POS;
+ VEC_PAIR_POS m_vecPairPos;
+ //-----IAccessibility2 Implementation 2009
};
diff --git a/sw/source/core/access/accpreview.cxx b/sw/source/core/access/accpreview.cxx
index f67165600906..da9dab6dd725 100644
--- a/sw/source/core/access/accpreview.cxx
+++ b/sw/source/core/access/accpreview.cxx
@@ -32,6 +32,11 @@
#endif
#include <accpreview.hxx>
+//IAccessibility2 Implementation 2009-----
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#endif
+//-----IAccessibility2 Implementation 2009
const sal_Char sServiceName[] = "com.sun.star.text.AccessibleTextDocumentPageView";
const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleDocumentPageView";
@@ -54,7 +59,9 @@ using ::rtl::OUString;
SwAccessiblePreview::SwAccessiblePreview( SwAccessibleMap *pMp ) :
SwAccessibleDocumentBase( pMp )
{
- SetName( GetResource( STR_ACCESS_DOC_NAME ) );
+ //IAccessibility2 Implementation 2009-----
+ SetName( GetResource( STR_ACCESS_PREVIEW_DOC_NAME ) );
+ //-----IAccessibility2 Implementation 2009
}
SwAccessiblePreview::~SwAccessiblePreview()
@@ -98,3 +105,21 @@ Sequence< sal_Int8 > SAL_CALL SwAccessiblePreview::getImplementationId()
}
return aId;
}
+//IAccessibility2 Implementation 2009-----
+OUString SAL_CALL SwAccessiblePreview::getAccessibleDescription (void) throw (com::sun::star::uno::RuntimeException)
+{
+ return GetResource( STR_ACCESS_PREVIEW_DOC_NAME );
+}
+
+OUString SAL_CALL SwAccessiblePreview::getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException)
+{
+ OUString sName = SwAccessibleDocumentBase::getAccessibleName();
+ sName += OUString::createFromAscii(" ");
+ sName += GetResource( STR_ACCESS_PREVIEW_DOC_SUFFIX );
+ return sName;
+}
+void SwAccessiblePreview::_InvalidateFocus()
+{
+ FireStateChangedEvent( ::com::sun::star::accessibility::AccessibleStateType::FOCUSED, sal_True );
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/core/access/accpreview.hxx b/sw/source/core/access/accpreview.hxx
index 215db22f653d..4907240c8d6a 100644
--- a/sw/source/core/access/accpreview.hxx
+++ b/sw/source/core/access/accpreview.hxx
@@ -66,6 +66,12 @@ public:
//====== XTypeProvider ====================================================
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //IAccessibility2 Implementation 2009-----
+ ::rtl::OUString SAL_CALL getAccessibleDescription (void) throw (com::sun::star::uno::RuntimeException);
+ ::rtl::OUString SAL_CALL getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException);
+ virtual void _InvalidateFocus();
+ //-----IAccessibility2 Implementation 2009
};
#endif
diff --git a/sw/source/core/access/accselectionhelper.cxx b/sw/source/core/access/accselectionhelper.cxx
index 0a651f3b5d42..9be9421fffd6 100644
--- a/sw/source/core/access/accselectionhelper.cxx
+++ b/sw/source/core/access/accselectionhelper.cxx
@@ -38,6 +38,14 @@
#include <flyfrm.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
+#include <fmtanchr.hxx>
+//-----IAccessibility2 Implementation 2009
+
+using namespace ::com::sun::star::accessibility;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -111,6 +119,43 @@ void SwAccessibleSelectionHelper::selectAccessibleChild(
// return bRet;
}
+//IAccessibility2 Implementation 2009-----
+//When the selected state of the SwFrmOrObj is setted, return true.
+static sal_Bool lcl_getSelectedState(const SwAccessibleChild& aChild,
+ SwAccessibleContext* pContext,
+ SwAccessibleMap* pMap)
+{
+ Reference< XAccessible > xAcc;
+ if ( aChild.GetSwFrm() )
+ {
+ xAcc = pMap->GetContext( aChild.GetSwFrm(), sal_False );
+ }
+ else if ( aChild.GetDrawObject() )
+ {
+ xAcc = pMap->GetContext( aChild.GetDrawObject(), pContext, sal_False );
+ }
+
+ if( xAcc.is() )
+ {
+ Reference< XAccessibleContext > pRContext = xAcc->getAccessibleContext();
+ if(!pRContext.is())
+ return sal_False;
+ Reference<XAccessibleStateSet> pRStateSet = pRContext->getAccessibleStateSet();
+ if( pRStateSet.is() )
+ {
+ Sequence<short> pStates = pRStateSet->getStates();
+ long count = pStates.getLength();
+ for( int i = 0; i < count; i++ )
+ {
+ if( pStates[i] == AccessibleStateType::SELECTED)
+ return sal_True;
+ }
+ }
+ }
+ return sal_False;
+}
+//-----IAccessibility2 Implementation 2009
+
sal_Bool SwAccessibleSelectionHelper::isAccessibleChildSelected(
sal_Int32 nChildIndex )
throw ( lang::IndexOutOfBoundsException,
@@ -137,6 +182,14 @@ sal_Bool SwAccessibleSelectionHelper::isAccessibleChildSelected(
{
bRet = pFEShell->IsObjSelected( *aChild.GetDrawObject() );
}
+ //IAccessibility2 Implementation 2009-----
+ //If the SwFrmOrObj is not selected directly in the UI, we should check whether it is selected in the selection cursor.
+ if( !bRet )
+ {
+ if( lcl_getSelectedState( aChild, &rContext, rContext.GetMap() ) == sal_True)
+ bRet = sal_True;
+ }
+ //-----IAccessibility2 Implementation 2009
}
return bRet;
@@ -194,11 +247,11 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( )
const SwFlyFrm* pFlyFrm = pFEShell->GetCurrFlyFrm();
if( pFlyFrm )
{
- if( rContext.GetParent( SwAccessibleChild(pFlyFrm), rContext.IsInPagePreview()) ==
- rContext.GetFrm() )
- {
+ //IAccessibility2 Implementation 2009-----
+ //if( rContext.GetParent( SwAccessibleChild(pFlyFrm), rContext.IsInPagePreview()) ==
+ // rContext.GetFrm() )
nCount = 1;
- }
+ //-----IAccessibility2 Implementation 2009
}
else
{
@@ -226,6 +279,26 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( )
}
}
}
+ //IAccessibility2 Implementation 2009-----
+ //If the SwFrmOrObj is not selected directly in the UI,
+ //we should check whether it is selected in the selection cursor.
+ if( nCount == 0 )
+ {
+ ::std::list< SwAccessibleChild > aChildren;
+ rContext.GetChildren( *(rContext.GetMap()), aChildren );
+ ::std::list< SwAccessibleChild >::const_iterator aIter =
+ aChildren.begin();
+ ::std::list< SwAccessibleChild >::const_iterator aEndIter =
+ aChildren.end();
+ while( aIter != aEndIter )
+ {
+ const SwAccessibleChild& aChild = *aIter;
+ if( lcl_getSelectedState( aChild, &rContext, rContext.GetMap() ) )
+ nCount++;
+ ++aIter;
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
}
return nCount;
}
@@ -249,12 +322,28 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild(
const SwFlyFrm *pFlyFrm = pFEShell->GetCurrFlyFrm();
if( pFlyFrm )
{
- if( 0 == nSelectedChildIndex &&
- rContext.GetParent( SwAccessibleChild(pFlyFrm), rContext.IsInPagePreview()) ==
- rContext.GetFrm() )
+ //IAccessibility2 Implementation 2009-----
+ if( 0 == nSelectedChildIndex )
{
- aChild = pFlyFrm;
+ if(rContext.GetParent( SwAccessibleChild(pFlyFrm), rContext.IsInPagePreview()) == rContext.GetFrm() )
+ {
+ aChild = pFlyFrm;
+ }
+ else
+ {
+ const SwFrmFmt *pFrmFmt = pFlyFrm->GetFmt();
+ if (pFrmFmt)
+ {
+ const SwFmtAnchor& pAnchor = pFrmFmt->GetAnchor();
+ if( pAnchor.GetAnchorId() == FLY_AS_CHAR )
+ {
+ const SwFrm *pParaFrm = rContext.GetParent( SwAccessibleChild(pFlyFrm), rContext.IsInPagePreview() );
+ aChild = pParaFrm;
+ }
+ }
+ }
}
+ //-----IAccessibility2 Implementation 2009
}
else
{
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index 60567153326f..3da5bec89c29 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -49,9 +49,14 @@
#include <accmap.hxx>
#include <access.hrc>
#include <acctable.hxx>
-
+#include <rowfrm.hxx>
+#include <layfrm.hxx>
#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#include <editeng/brshitem.hxx>
+#include <swatrset.hxx>
+#include <frmatr.hxx>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
using ::rtl::OUString;
@@ -67,6 +72,8 @@ typedef ::std::set < sal_Int32, Int32Less_Impl > Int32Set_Impl;
typedef ::std::pair < sal_Int32, sal_Int32 > Int32Pair_Impl;
typedef ::std::list < Int32Pair_Impl > Int32PairList_Impl;
+const int SELECTION_WITH_NUM =10;
+
class SwAccTableSelHander_Impl
{
public:
@@ -88,6 +95,10 @@ class SwAccessibleTableData_Impl
bool mbOnlyTableColumnHeader;
void CollectData( const SwFrm *pFrm );
+ //IAccessibility2 Implementation 2009-----
+ void CollectColumnHeaderData( const SwFrm *pFrm );
+ void CollectRowHeaderData( const SwFrm *pFrm );
+ //-----IAccessibility2 Implementation 2009
void CollectExtents( const SwFrm *pFrm );
sal_Bool FindCell( const Point& rPos, const SwFrm *pFrm ,
@@ -182,6 +193,99 @@ void SwAccessibleTableData_Impl::CollectData( const SwFrm *pFrm )
}
}
+//IAccessibility2 Implementation 2009-----
+void SwAccessibleTableData_Impl::CollectRowHeaderData( const SwFrm *pFrm )
+{
+ const SwAccessibleChildSList aList( *pFrm, mrAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aList.begin() );
+ SwAccessibleChildSList::const_iterator aEndIter( aList.end() );
+ while( aIter != aEndIter )
+ {
+ const SwAccessibleChild& rLower = *aIter;
+ const SwFrm *pLower = rLower.GetSwFrm();
+ if( pLower )
+ {
+ if( pLower->IsRowFrm() )
+ {
+
+ const SwTableLine* pLine = ((SwRowFrm*)pLower)->GetTabLine();
+ while( pLine->GetUpper() )
+ pLine = pLine->GetUpper()->GetUpper();
+
+ // Headerline?
+ //if(mpTabFrm->GetTable()->GetTabLines()[ 0 ] != pLine)
+ //return ;
+
+ maRows.insert( pLower->Frm().Top() - maTabFrmPos.Y() );
+
+ CollectRowHeaderData( pLower );
+
+
+ }
+ else if( pLower->IsCellFrm() &&
+ rLower.IsAccessible( mbIsInPagePreview ) )
+ {
+ //Added by yanjun. Can't find the "GetRowHeaderFlag" function(Need vefiry).
+ //if(((SwCellFrm*)pLower)->GetRowHeaderFlag())
+ // maColumns.insert( pLower->Frm().Left() - maTabFrmPos.X() );
+ }
+ else
+ {
+ CollectRowHeaderData( pLower );
+ }
+ }
+ ++aIter;
+ }
+}
+//-----IAccessibility2 Implementation 2009
+
+void SwAccessibleTableData_Impl::CollectColumnHeaderData( const SwFrm *pFrm )
+{
+ const SwAccessibleChildSList aList( *pFrm, mrAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aList.begin() );
+ SwAccessibleChildSList::const_iterator aEndIter( aList.end() );
+ while( aIter != aEndIter )
+ {
+ const SwAccessibleChild& rLower = *aIter;
+ const SwFrm *pLower = rLower.GetSwFrm();
+ if( pLower )
+ {
+ if( pLower->IsRowFrm() )
+ {
+
+ const SwTableLine* pLine = ((SwRowFrm*)pLower)->GetTabLine();
+ while( pLine->GetUpper() )
+ pLine = pLine->GetUpper()->GetUpper();
+
+ // Headerline?
+ //if(mpTabFrm->GetTable()->GetTabLines()[ 0 ] != pLine)
+ //return ;
+
+ //if the current line is now header line, then return ;
+ sal_Int16 iCurrentRowIndex = mpTabFrm->GetTable()->GetTabLines().GetPos( pLine);
+ if(iCurrentRowIndex >= mpTabFrm->GetTable()->_GetRowsToRepeat())
+ return ;
+
+ maRows.insert( pLower->Frm().Top() - maTabFrmPos.Y() );
+
+ CollectColumnHeaderData( pLower );
+
+
+ }
+ else if( pLower->IsCellFrm() &&
+ rLower.IsAccessible( mbIsInPagePreview ) )
+ {
+ maColumns.insert( pLower->Frm().Left() - maTabFrmPos.X() );
+ }
+ else
+ {
+ CollectColumnHeaderData( pLower );
+ }
+ }
+ ++aIter;
+ }
+}
+//-----IAccessibility2 Implementation 2009
void SwAccessibleTableData_Impl::CollectExtents( const SwFrm *pFrm )
{
const SwAccessibleChildSList aList( *pFrm, mrAccMap );
@@ -396,7 +500,11 @@ const SwFrm *SwAccessibleTableData_Impl::GetCellAtPos(
inline sal_Int32 SwAccessibleTableData_Impl::GetRowCount() const
{
- return static_cast< sal_Int32 >( maRows.size() );
+ //IAccessibility2 Implementation 2009-----
+ sal_Int32 count = static_cast< sal_Int32 >( maRows.size() ) ;
+ count = (count <=0)? 1:count;
+ //-----IAccessibility2 Implementation 2009
+ return count;
}
inline sal_Int32 SwAccessibleTableData_Impl::GetColumnCount() const
@@ -696,8 +804,12 @@ void SwAccessibleTable::GetStates(
::utl::AccessibleStateSetHelper& rStateSet )
{
SwAccessibleContext::GetStates( rStateSet );
-
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Add resizable state to table
+ rStateSet.AddState( AccessibleStateType::RESIZABLE );
// MULTISELECTABLE
+ rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE );
+ //-----IAccessibility2 Implementation 2009
SwCrsrShell* pCrsrShell = GetCrsrShell();
if( pCrsrShell )
rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE );
@@ -727,6 +839,9 @@ SwAccessibleTable::SwAccessibleTable(
OUString sArg2( GetFormattedPageNumber() );
sDesc = GetResource( STR_ACCESS_TABLE_DESC, &sArg1, &sArg2 );
+ //IAccessibility2 Implementation 2009-----
+ UpdateTableData();
+ //-----IAccessibility2 Implementation 2009
}
SwAccessibleTable::~SwAccessibleTable()
@@ -784,8 +899,7 @@ void SwAccessibleTable::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew
case RES_OBJECTDYING:
// mba: it seems that this class intentionally does not call code in base class SwClient
- if( GetRegisteredIn() ==
- static_cast< SwModify *>( static_cast< const SwPtrMsgPoolItem * >( pOld )->pObject ) )
+ if( pOld && ( GetRegisteredIn() == static_cast< SwModify *>( static_cast< const SwPtrMsgPoolItem * >( pOld )->pObject ) ) )
GetRegisteredInNonConst()->Remove( this );
break;
@@ -809,6 +923,13 @@ uno::Any SwAccessibleTable::queryInterface( const uno::Type& rType )
uno::Reference<XAccessibleSelection> xSelection( this );
aRet <<= xSelection;
}
+ //IAccessibility2 Implementation 2009-----
+ else if ( rType == ::getCppuType((uno::Reference<XAccessibleTableSelection> *)0) )
+ {
+ uno::Reference<XAccessibleTableSelection> xTableExtent( this );
+ aRet <<= xTableExtent;
+ }
+ //-----IAccessibility2 Implementation 2009
else
{
aRet = SwAccessibleContext::queryInterface(rType);
@@ -981,6 +1102,9 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRowExtentAt(
CHECK_FOR_DEFUNC( XAccessibleTable )
+ //IAccessibility2 Implementation 2009-----
+ UpdateTableData();
+ //-----IAccessibility2 Implementation 2009
GetTableData().CheckRowAndCol( nRow, nColumn, this );
Int32Set_Impl::const_iterator aSttCol(
@@ -1011,6 +1135,9 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumnExtentAt(
vos::OGuard aGuard(Application::GetSolarMutex());
CHECK_FOR_DEFUNC( XAccessibleTable )
+ //IAccessibility2 Implementation 2009-----
+ UpdateTableData();
+ //-----IAccessibility2 Implementation 2009
GetTableData().CheckRowAndCol( nRow, nColumn, this );
@@ -1045,6 +1172,25 @@ uno::Reference< XAccessibleTable > SAL_CALL
SwAccessibleTable::getAccessibleColumnHeaders( )
throw (uno::RuntimeException)
{
+// MT IA2: Which one should win nowadys???
+/*
+ // IA2 version:
+ uno::Reference< XAccessibleTable > xRet;
+ SwTabFrm* pTabFrm =( SwTabFrm*)( GetFrm() );
+ if (pTabFrm)
+ {
+ if(pTabFrm->GetTable()->_GetRowsToRepeat() > 0)
+ {
+ //for errata table header
+ SwAccessibleTableData_Impl *mpHeadTableData = new SwAccessibleTableData_Impl( pTabFrm, sal_False, sal_True);
+ //for errata table header
+ SwAccessibleTable *pHeadAccessibleTable = new SwAccessibleTable(GetMap(),pTabFrm);
+ pHeadAccessibleTable->SetTableData(mpHeadTableData);
+ xRet = pHeadAccessibleTable;
+ }
+ }
+ return xRet;
+*/
// --> OD 2010-03-10 #i87532#
// assure that return accesible object is empty, if no column header exists.
SwAccessibleTableColHeaders* pTableColHeaders =
@@ -1346,6 +1492,15 @@ void SwAccessibleTable::InvalidatePosOrSize( const SwRect& rOldBox )
{
vos::OGuard aGuard(Application::GetSolarMutex());
+ //IAccessibility2 Implementation 2009-----
+ //need to update children
+ SwAccessibleTableData_Impl *pNewTableData = CreateNewTableData();
+ if( !pNewTableData->CompareExtents( GetTableData() ) )
+ {
+ delete mpTableData;
+ mpTableData = pNewTableData;
+ FireTableChangeEvent(*mpTableData);
+ }
if( HasTableData() )
GetTableData().SetTablePos( GetFrm()->Frm().Pos() );
@@ -1402,6 +1557,34 @@ void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChil
// <--
if( !pNewTableData->CompareExtents( GetTableData() ) )
{
+ //IAccessibility2 Implementation 2009-----
+ if(pNewTableData->GetRowCount()!= mpTableData->GetRowCount())
+ {
+ Int32Set_Impl::const_iterator aSttCol( GetTableData().GetColumnIter( 0 ) );
+ Int32Set_Impl::const_iterator aSttRow( GetTableData().GetRowIter( 1 ) );
+ const SwFrm *pCellFrm = GetTableData().GetCellAtPos( *aSttCol, *aSttRow, sal_False );
+ Int32Set_Impl::const_iterator aSttCol2( pNewTableData->GetColumnIter( 0 ) );
+ Int32Set_Impl::const_iterator aSttRow2( pNewTableData->GetRowIter( 0 ) );
+ const SwFrm *pCellFrm2 = pNewTableData->GetCellAtPos( *aSttCol2, *aSttRow2, sal_False );
+
+ if(pCellFrm == pCellFrm2)
+ {
+ AccessibleTableModelChange aModelChange;
+ aModelChange.Type = AccessibleTableModelChangeType::UPDATE;
+ aModelChange.FirstRow = 0;
+ aModelChange.LastRow = mpTableData->GetRowCount() - 1;
+ aModelChange.FirstColumn = 0;
+ aModelChange.LastColumn = mpTableData->GetColumnCount() - 1;
+
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::TABLE_COLUMN_HEADER_CHANGED;
+ aEvent.NewValue <<= aModelChange;
+
+ FireAccessibleEvent( aEvent );
+ }
+ }
+ else
+ //-----IAccessibility2 Implementation 2009
FireTableChangeEvent( GetTableData() );
ClearTableData();
mpTableData = pNewTableData;
@@ -1674,6 +1857,153 @@ void SAL_CALL SwAccessibleTable::deselectAccessibleChild(
pCrsrShell->EndAction();
}
+//IAccessibility2 Implementation 2009-----
+void SwAccessibleTable::SetTableData(SwAccessibleTableData_Impl* mpNewTableData)
+{
+ mpTableData = mpNewTableData;
+}
+
+sal_Int32 SAL_CALL SwAccessibleTable::getBackground()
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ const SvxBrushItem &rBack = GetFrm()->GetAttrSet()->GetBackground();
+ sal_uInt32 crBack = rBack.GetColor().GetColor();
+
+ if (COL_AUTO == crBack)
+ {
+ uno::Reference<XAccessible> xAccDoc = getAccessibleParent();
+ if (xAccDoc.is())
+ {
+ uno::Reference<XAccessibleComponent> xCompoentDoc(xAccDoc,uno::UNO_QUERY);
+ if (xCompoentDoc.is())
+ {
+ crBack = (sal_uInt32)xCompoentDoc->getBackground();
+ }
+ }
+ }
+ return crBack;
+}
+
+void SwAccessibleTable::FireSelectionEvent( )
+{
+ AccessibleEventObject aEvent;
+
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_REMOVE;
+
+// int nRemove = m_vecCellRemove.size();
+// int nAdd = m_vecCellAdd.size();
+
+ VEC_CELL::iterator vi = m_vecCellRemove.begin();
+ for (; vi != m_vecCellRemove.end() ; ++vi)
+ {
+ SwAccessibleContext *pAccCell = const_cast<SwAccessibleContext *>(*vi);
+ OSL_ASSERT(pAccCell != NULL );
+ pAccCell->FireAccessibleEvent(aEvent);
+ }
+
+ if (m_vecCellAdd.size() <= SELECTION_WITH_NUM)
+ {
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_ADD;
+ vi = m_vecCellAdd.begin();
+ for (; vi != m_vecCellAdd.end() ; ++vi)
+ {
+ SwAccessibleContext *pAccCell = const_cast<SwAccessibleContext *>(*vi);
+ OSL_ASSERT(pAccCell != NULL );
+ pAccCell->FireAccessibleEvent(aEvent);
+ }
+ return ;
+ }
+ else
+ {
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_WITHIN;
+ FireAccessibleEvent(aEvent);
+ }
+}
+
+void SwAccessibleTable::ClearSelectionCellCache()
+{
+ m_vecCellAdd.clear();
+ m_vecCellRemove.clear();
+}
+
+void SwAccessibleTable::AddSelectionCell(const SwAccessibleContext* pAccCell ,sal_Bool bAddOrRemove)
+{
+ if (bAddOrRemove)
+ {
+ m_vecCellAdd.push_back(pAccCell);
+ }
+ else
+ {
+ m_vecCellRemove.push_back(pAccCell);
+ }
+}
+
+//===== XAccessibleTableSelection ============================================
+sal_Bool SAL_CALL SwAccessibleTable::selectRow( sal_Int32 row )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ if( isAccessibleColumnSelected( row ) )
+ return sal_True;
+
+ long lCol, lColumnCount, lChildIndex;
+ lColumnCount = getAccessibleColumnCount();
+ for(lCol = 0; lCol < lColumnCount; lCol ++)
+ {
+ lChildIndex = getAccessibleIndex(row, lCol);
+ selectAccessibleChild(lChildIndex);
+ }
+
+ return sal_True;
+}
+sal_Bool SAL_CALL SwAccessibleTable::selectColumn( sal_Int32 column )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ if( isAccessibleColumnSelected( column ) )
+ return sal_True;
+
+ long lRow, lRowCount, lChildIndex;
+ lRowCount = getAccessibleRowCount();
+
+ for(lRow = 0; lRow < lRowCount; lRow ++)
+ {
+ lChildIndex = getAccessibleIndex(lRow, column);
+ selectAccessibleChild(lChildIndex);
+ }
+ return sal_True;
+}
+sal_Bool SAL_CALL SwAccessibleTable::unselectRow( sal_Int32 row )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ if( isAccessibleSelected( row , 0 ) && isAccessibleSelected( row , getAccessibleColumnCount()-1 ) )
+ {
+ SwCrsrShell* pCrsrShell = GetCrsrShell();
+ if( pCrsrShell != NULL )
+ {
+ pCrsrShell->StartAction();
+ pCrsrShell->ClearMark();
+ pCrsrShell->EndAction();
+ return sal_True;
+ }
+ }
+ return sal_True;
+}
+sal_Bool SAL_CALL SwAccessibleTable::unselectColumn( sal_Int32 column )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ if( isAccessibleSelected( 0 , column ) && isAccessibleSelected( getAccessibleRowCount()-1,column))
+ {
+ SwCrsrShell* pCrsrShell = GetCrsrShell();
+ if( pCrsrShell != NULL )
+ {
+ pCrsrShell->StartAction();
+ pCrsrShell->ClearMark();
+ pCrsrShell->EndAction();
+ return sal_True;
+ }
+ }
+ return sal_True;
+}
+//-----IAccessibility2 Implementation 2009
// --> OD 2007-06-28 #i77106#
// implementation of class <SwAccessibleTableColHeaders>
SwAccessibleTableColHeaders::SwAccessibleTableColHeaders( SwAccessibleMap *pMap2,
diff --git a/sw/source/core/access/acctable.hxx b/sw/source/core/access/acctable.hxx
index 3c68ac1868f0..908908b7b789 100644
--- a/sw/source/core/access/acctable.hxx
+++ b/sw/source/core/access/acctable.hxx
@@ -23,6 +23,12 @@
#ifndef _ACCTABLE_HXX
#define _ACCTABLE_HXX
#include <com/sun/star/accessibility/XAccessibleTable.hpp>
+//IAccessibility2 Implementation 2009-----
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XAccessibleTableSelection_HPP_
+#include <com/sun/star/accessibility/XAccessibleTableSelection.hpp>
+#endif
+#include <vector>
+//-----IAccessibility2 Implementation 2009
#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
#include <acccontext.hxx>
@@ -40,6 +46,7 @@ class SwAccessibleTable :
public SwAccessibleContext,
public ::com::sun::star::accessibility::XAccessibleTable,
public ::com::sun::star::accessibility::XAccessibleSelection,
+ public ::com::sun::star::accessibility::XAccessibleTableSelection,
public SwClient
{
SwAccessibleTableData_Impl *mpTableData; // the table's data, prot by Sol-Mutex
@@ -85,6 +92,9 @@ protected:
// Is table data evailable?
sal_Bool HasTableData() const { return (mpTableData != 0); }
+ //IAccessibility2 Implementation 2009-----
+ void SetTableData(SwAccessibleTableData_Impl* mpNewTableData) ;
+ //-----IAccessibility2 Implementation 2009
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
public:
@@ -187,7 +197,17 @@ public:
virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex )
throw (::com::sun::star::lang::IndexOutOfBoundsException,
::com::sun::star::uno::RuntimeException);
-
+ //IAccessibility2 Implementation 2009-----
+ //===== XAccessibleTableSelection ============================================
+ virtual sal_Bool SAL_CALL selectRow( sal_Int32 row )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Bool SAL_CALL selectColumn( sal_Int32 column )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Bool SAL_CALL unselectRow( sal_Int32 row )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Bool SAL_CALL unselectColumn( sal_Int32 column )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+ //-----IAccessibility2 Implementation 2009
//===== XServiceInfo ====================================================
/** Returns an identifier for the implementation of this object.
@@ -254,6 +274,17 @@ public:
throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
::com::sun::star::uno::RuntimeException );
+ //IAccessibility2 Implementation 2009-----
+ //===== XAccessibleComponent ============================================
+ sal_Int32 SAL_CALL getBackground()
+ throw (::com::sun::star::uno::RuntimeException);
+ typedef std::vector<const SwAccessibleContext*> VEC_CELL;
+ VEC_CELL m_vecCellAdd;
+ VEC_CELL m_vecCellRemove;
+ void FireSelectionEvent( );
+ void ClearSelectionCellCache();
+ void AddSelectionCell(const SwAccessibleContext* ,sal_Bool bAddOrRemove);
+ //-----IAccessibility2 Implementation 2009
};
inline SwAccessibleTableData_Impl& SwAccessibleTable::GetTableData()
diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx
index 893a45a8b4d0..0fedef797a63 100644
--- a/sw/source/core/access/acctextframe.cxx
+++ b/sw/source/core/access/acctextframe.cxx
@@ -44,6 +44,11 @@
// <--
#include "acctextframe.hxx"
+//IAccessibility2 Implementation 2009-----
+#ifndef _DOC_HXX
+#include <doc.hxx>
+#endif
+//-----IAccessibility2 Implementation 2009
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
using ::rtl::OUString;
@@ -152,6 +157,125 @@ void SwAccessibleTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *
}
}
+//IAccessibility2 Implementation 2009-----
+//===== XInterface ==========================================================
+
+com::sun::star::uno::Any SAL_CALL
+ SwAccessibleTextFrame::queryInterface (const com::sun::star::uno::Type & rType)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Any aReturn = SwAccessibleContext::queryInterface (rType);
+ if ( ! aReturn.hasValue())
+ aReturn = ::cppu::queryInterface (rType,
+ static_cast< ::com::sun::star::accessibility::XAccessibleSelection* >(this)
+ );
+ return aReturn;
+}
+
+
+
+
+void SAL_CALL
+ SwAccessibleTextFrame::acquire (void)
+ throw ()
+{
+ SwAccessibleContext::acquire ();
+}
+
+void SAL_CALL
+ SwAccessibleTextFrame::release (void)
+ throw ()
+{
+ SwAccessibleContext::release ();
+}
+
+//
+//===== XAccessibleSelection ============================================
+//
+
+//--------------------------------------------------------------------------------
+void SAL_CALL SwAccessibleTextFrame::selectAccessibleChild( sal_Int32 )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ DBG_ASSERT( false, "<SwAccessibleTextFrame::selectAccessibleChild( sal_Int32 )> - missing implementation" );
+}
+
+//----------------------------------------------------------------------------------
+sal_Bool SAL_CALL SwAccessibleTextFrame::isAccessibleChildSelected( sal_Int32 nChildIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ uno::Reference<XAccessible> xAcc = getAccessibleChild( nChildIndex );
+ uno::Reference<XAccessibleContext> xContext;
+ if( xAcc.is() )
+ xContext = xAcc->getAccessibleContext();
+
+ if( xContext.is() )
+ {
+ if( xContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
+ {
+ uno::Reference< ::com::sun::star::accessibility::XAccessibleText >
+ xText(xAcc, uno::UNO_QUERY);
+ if( xText.is() )
+ {
+ if( xText->getSelectionStart() >= 0 ) return sal_True;
+ }
+ }
+ }
+
+ return sal_False;
+}
+
+//---------------------------------------------------------------------
+void SAL_CALL SwAccessibleTextFrame::clearAccessibleSelection( )
+ throw ( uno::RuntimeException )
+{
+ DBG_ASSERT( false, "<SwAccessibleTextFrame::clearAccessibleSelection( )> - missing implementation" );
+}
+
+//-------------------------------------------------------------------------
+void SAL_CALL SwAccessibleTextFrame::selectAllAccessibleChildren( )
+ throw ( uno::RuntimeException )
+{
+ DBG_ASSERT( false, "<SwAccessibleTextFrame::selectAllAccessibleChildren( )> - missing implementation" );
+}
+
+//----------------------------------------------------------------------------
+sal_Int32 SAL_CALL SwAccessibleTextFrame::getSelectedAccessibleChildCount()
+ throw ( uno::RuntimeException )
+{
+ sal_Int32 nCount = 0;
+ sal_Int32 TotalCount = getAccessibleChildCount();
+ for( sal_Int32 i = 0; i < TotalCount; i++ )
+ if( isAccessibleChildSelected(i) ) nCount++;
+
+ return nCount;
+}
+
+//--------------------------------------------------------------------------------------
+uno::Reference<XAccessible> SAL_CALL SwAccessibleTextFrame::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ if ( nSelectedChildIndex > getSelectedAccessibleChildCount() )
+ throw lang::IndexOutOfBoundsException();
+ sal_Int32 i1, i2;
+ for( i1 = 0, i2 = 0; i1 < getAccessibleChildCount(); i1++ )
+ if( isAccessibleChildSelected(i1) )
+ {
+ if( i2 == nSelectedChildIndex )
+ return getAccessibleChild( i1 );
+ i2++;
+ }
+ return uno::Reference<XAccessible>();
+}
+
+//----------------------------------------------------------------------------------
+void SAL_CALL SwAccessibleTextFrame::deselectAccessibleChild( sal_Int32 )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ DBG_ASSERT( false, "<SwAccessibleTextFrame::selectAllAccessibleChildren( sal_Int32 )> - missing implementation" );
+}
+//-----IAccessibility2 Implementation 2009
+
// --> OD 2009-07-14 #i73249#
OUString SAL_CALL SwAccessibleTextFrame::getAccessibleName (void)
throw (uno::RuntimeException)
@@ -168,15 +292,29 @@ OUString SAL_CALL SwAccessibleTextFrame::getAccessibleName (void)
return SwAccessibleFrameBase::getAccessibleName();
}
// <--
+
OUString SAL_CALL SwAccessibleTextFrame::getAccessibleDescription (void)
throw (uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
CHECK_FOR_DEFUNC( XAccessibleContext )
+ /* MT: I guess msDesc is correct noadays?
+ //IAccessibility2 Implementation 2009-----
+ OUString longDesc;
+ const SwFlyFrmFmt* pFlyFmt = GetShell()->GetDoc()->FindFlyByName( GetName(), 0);
+ if( pFlyFmt )
+ {
+ longDesc = OUString( pFlyFmt->GetDescription() );
+ }
+ if( longDesc.getLength() > 0 )
+ return GetName() + OUString(' ') + longDesc;
+ else
+ return GetName();
+ //-----IAccessibility2 Implementation 2009
+ */
return msDesc;
-
}
OUString SAL_CALL SwAccessibleTextFrame::getImplementationName()
diff --git a/sw/source/core/access/acctextframe.hxx b/sw/source/core/access/acctextframe.hxx
index 0af8b806da89..0f51f82c5a26 100644
--- a/sw/source/core/access/acctextframe.hxx
+++ b/sw/source/core/access/acctextframe.hxx
@@ -24,13 +24,18 @@
#define _ACCTEXTFRAME_HXX
#include "accframebase.hxx"
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+//-----IAccessibility2 Implementation 2009
+
class SwFlyFrm;
namespace utl { class AccessibleRelationSetHelper; }
namespace com { namespace star {
namespace accessibility { struct AccessibleRelation; }
} }
-class SwAccessibleTextFrame : public SwAccessibleFrameBase
+class SwAccessibleTextFrame : public SwAccessibleFrameBase,
+ public ::com::sun::star::accessibility::XAccessibleSelection
{
private:
// --> OD 2009-07-14 #i73249#
@@ -48,6 +53,43 @@ public:
SwAccessibleTextFrame( SwAccessibleMap* pInitMap, const SwFlyFrm* pFlyFrm );
+ //IAccessibility2 Implementation 2009-----
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ ::com::sun::star::uno::Type const & rType )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+ //===== XAccessibleSelection ============================================
+ virtual void SAL_CALL selectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Bool SAL_CALL isAccessibleChildSelected(
+ sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL clearAccessibleSelection( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL selectAllAccessibleChildren( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(
+ sal_Int32 nSelectedChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL deselectAccessibleChild(
+ sal_Int32 nSelectedChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+ //-----IAccessibility2 Implementation 2009
+
//===== XAccessibleContext ==============================================
// --> OD 2009-07-14 #i73249#
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index 56eb9f0522df..3509bc4dfdb8 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -255,7 +255,9 @@ SwFmt::~SwFmt()
}
else
{
- while( GetDepends() )
+ //IAccessibility2 Implementation 2009-----
+ while( GetDepends() && pParentFmt)
+ //-----IAccessibility2 Implementation 2009
{
SwFmtChg aOldFmt(this);
SwFmtChg aNewFmt(pParentFmt);
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index 6a5d2e46e4c2..31dedef94112 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -315,7 +315,7 @@ SfxItemInfo __FAR_DATA aSlotTab[] =
{ 0, 0 }, // RES_TXTATR_CHARFMT
{ SID_ATTR_CHAR_CJK_RUBY, 0 }, // RES_TXTATR_CJK_RUBY
{ 0, SFX_ITEM_POOLABLE }, // RES_TXTATR_UNKNOWN_CONTAINER
- { 0, SFX_ITEM_POOLABLE }, // RES_TXTATR_DUMMY5
+ { 0, 0 }, // RES_TXTATR_INPUTFIELD
{ 0, 0 }, // RES_TXTATR_FIELD
{ 0, 0 }, // RES_TXTATR_FLYCNT
@@ -528,8 +528,9 @@ void _InitCore()
aAttrTab[ RES_TXTATR_CHARFMT- POOLATTR_BEGIN ] = new SwFmtCharFmt( 0 );
aAttrTab[ RES_TXTATR_CJK_RUBY - POOLATTR_BEGIN ] = new SwFmtRuby( aEmptyStr );
aAttrTab[ RES_TXTATR_UNKNOWN_CONTAINER - POOLATTR_BEGIN ] = new SvXMLAttrContainerItem( RES_TXTATR_UNKNOWN_CONTAINER );
+ aAttrTab[ RES_TXTATR_INPUTFIELD - POOLATTR_BEGIN ] = new SwFmtFld( RES_TXTATR_INPUTFIELD );
- aAttrTab[ RES_TXTATR_FIELD- POOLATTR_BEGIN ] = new SwFmtFld;
+ aAttrTab[ RES_TXTATR_FIELD- POOLATTR_BEGIN ] = new SwFmtFld( RES_TXTATR_FIELD );
aAttrTab[ RES_TXTATR_FLYCNT - POOLATTR_BEGIN ] = new SwFmtFlyCnt( 0 );
aAttrTab[ RES_TXTATR_FTN - POOLATTR_BEGIN ] = new SwFmtFtn;
@@ -538,7 +539,6 @@ void _InitCore()
aAttrTab[ RES_TXTATR_DUMMY3 - POOLATTR_BEGIN ] = new SfxBoolItem( RES_TXTATR_DUMMY3 );
aAttrTab[ RES_TXTATR_DUMMY1 - POOLATTR_BEGIN ] = new SfxBoolItem( RES_TXTATR_DUMMY1 );
aAttrTab[ RES_TXTATR_DUMMY2 - POOLATTR_BEGIN ] = new SfxBoolItem( RES_TXTATR_DUMMY2 );
- aAttrTab[ RES_TXTATR_DUMMY5 - POOLATTR_BEGIN ] = new SfxBoolItem( RES_TXTATR_DUMMY5 );
// TextAttr - Dummies
aAttrTab[ RES_CHRATR_BIDIRTL - POOLATTR_BEGIN ] = new SfxInt16Item( RES_CHRATR_BIDIRTL, sal_Int16(-1) );
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 3223d4139f81..b07fafbc0fc6 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -138,7 +138,7 @@ SwCallLink::~SwCallLink()
for( n = 0; n < rHts.Count(); n++ )
{
const SwTxtAttr* pHt = rHts[ n ];
- pEnd = pHt->GetEnd();
+ pEnd = pHt->End();
nStart = *pHt->GetStart();
// nur Start oder Start und Ende gleich, dann immer
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 872d6569c819..992e1d22db0e 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -421,6 +421,66 @@ sal_Bool SwCrsrShell::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMo
}
return bRet;
}
+//IAccessibility2 Implementation 2009-----
+void SwCrsrShell::FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage)
+{
+#ifdef ACCESSIBLE_LAYOUT
+ if( Imp()->IsAccessible() )
+ Imp()->FirePageChangeEvent( nOldPage, nNewPage );
+#endif
+}
+
+void SwCrsrShell::FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn)
+{
+#ifdef ACCESSIBLE_LAYOUT
+ if( Imp()->IsAccessible() )
+ Imp()->FireColumnChangeEvent( nOldColumn, nNewColumn);
+#endif
+}
+
+
+void SwCrsrShell::FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection)
+{
+#ifdef ACCESSIBLE_LAYOUT
+ if( Imp()->IsAccessible() )
+ Imp()->FireSectionChangeEvent( nOldSection, nNewSection );
+#endif
+}
+bool SwCrsrShell::bColumnChange()
+{
+
+ sal_uInt16 nCurrCol = 0;
+ SwFrm* pCurrFrm = GetCurrFrm(sal_False);
+
+ if (pCurrFrm == NULL)
+ {
+ return sal_False;
+ }
+
+ SwFrm* pCurrCol=((SwFrm*)pCurrFrm)->FindColFrm();
+
+ while(pCurrCol== NULL && pCurrFrm!=NULL )
+ {
+ SwLayoutFrm* pParent = pCurrFrm->GetUpper();
+ if(pParent!=NULL)
+ {
+ pCurrCol=((SwFrm*)pParent)->FindColFrm();
+ pCurrFrm = (SwFrm*)pParent;
+ }
+ else
+ {
+ break;
+ }
+ }
+ if(oldColFrm == pCurrCol)
+ return sal_False;
+ else
+ {
+ oldColFrm = pCurrCol;
+ return sal_True;
+ }
+}
+//-----IAccessibility2 Implementation 2009
// --> OD 2008-04-02 #refactorlists#
void SwCrsrShell::MarkListLevel( const String& sListId,
@@ -899,8 +959,10 @@ void SwCrsrShell::SwapPam()
// Ansonsten wird er auf die gewaehlte SSelection gesetzt.
-sal_Bool SwCrsrShell::ChgCurrPam( const Point & rPt,
- sal_Bool bTstOnly, sal_Bool bTstHit )
+sal_Bool SwCrsrShell::ChgCurrPam(
+ const Point & rPt,
+ sal_Bool bTstOnly,
+ sal_Bool bTstHit )
{
SET_CURR_SHELL( this );
@@ -1351,9 +1413,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
return; // wenn nicht, dann kein Update !!
}
- // --> OD 2005-12-14 #i27301#
SwNotifyAccAboutInvalidTextSelections aInvalidateTextSelections( *this );
- // <--
if ( bIgnoreReadonly )
{
@@ -2086,6 +2146,7 @@ void SwCrsrShell::ShowCrsr()
if( !bBasicHideCrsr )
{
bSVCrsrVis = sal_True;
+ pCurCrsr->SetShowTxtInputFldOverlay( true );
UpdateCrsr();
}
}
@@ -2098,6 +2159,7 @@ void SwCrsrShell::HideCrsr()
bSVCrsrVis = sal_False;
// evt. die sel. Bereiche aufheben !!
SET_CURR_SHELL( this );
+ pCurCrsr->SetShowTxtInputFldOverlay( false );
pVisCrsr->Hide();
}
}
@@ -2599,6 +2661,9 @@ SwCrsrShell::SwCrsrShell( SwCrsrShell& rShell, Window *pInitWin )
// UpdateCrsr( 0 );
// OD 11.02.2003 #100556#
mbMacroExecAllowed = rShell.IsMacroExecAllowed();
+ //IAccessibility2 Implementation 2009-----
+ oldColFrm = NULL;
+ //-----IAccessibility2 Implementation 2009
}
@@ -2936,38 +3001,34 @@ sal_Bool SwCrsrShell::FindValidCntntNode( sal_Bool bOnlyText )
}
-void SwCrsrShell::NewCoreSelection()
-{
-}
-
-
sal_Bool SwCrsrShell::IsCrsrReadonly() const
{
if ( GetViewOptions()->IsReadonly() ||
- // --> FME 2004-06-29 #114856# Formular view
- GetViewOptions()->IsFormView() )
- // <--
+ GetViewOptions()->IsFormView() ) // Formular view
{
SwFrm *pFrm = GetCurrFrm( sal_False );
const SwFlyFrm* pFly;
const SwSection* pSection;
if( pFrm && pFrm->IsInFly() &&
- (pFly = pFrm->FindFlyFrm())->GetFmt()->GetEditInReadonly().GetValue() &&
- pFly->Lower() &&
- !pFly->Lower()->IsNoTxtFrm() &&
- !GetDrawView()->areSdrObjectsSelected() )
+ (pFly = pFrm->FindFlyFrm())->GetFmt()->GetEditInReadonly().GetValue() &&
+ pFly->Lower() &&
+ !pFly->Lower()->IsNoTxtFrm() &&
+ !GetDrawView()->areSdrObjectsSelected() )
{
return sal_False;
}
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
else if ( pFrm && pFrm->IsInSct() &&
- 0 != ( pSection = pFrm->FindSctFrm()->GetSection() ) &&
- pSection->IsEditInReadonlyFlag() )
+ 0 != ( pSection = pFrm->FindSctFrm()->GetSection() ) &&
+ pSection->IsEditInReadonlyFlag() )
+ {
+ return sal_False;
+ }
+ else if ( !IsMultiSelection() && CrsrInsideInputFld() )
{
return sal_False;
}
- // <--
return sal_True;
}
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index c27ec28cd874..34f06860285b 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -40,7 +40,7 @@
#include <pam.hxx>
#include <ndtxt.hxx>
#include <fldbas.hxx>
-#include <swtable.hxx> // SwTxtFld
+#include <swtable.hxx>
#include <docary.hxx>
#include <txtfld.hxx>
#include <fmtfld.hxx>
@@ -56,7 +56,7 @@
#include <docfld.hxx>
#include <expfld.hxx>
#include <reffld.hxx>
-#include <flddat.hxx> // SwTxtFld
+#include <flddat.hxx>
#include <cellatr.hxx>
#include <swundo.hxx>
#include <redline.hxx>
@@ -619,73 +619,84 @@ const SwTOXMark& SwCrsrShell::GotoTOXMark( const SwTOXMark& rStart,
// springe zum naechsten / vorherigen FeldTypen
-void lcl_MakeFldLst( _SetGetExpFlds& rLst, const SwFieldType& rFldType,
- sal_uInt16 nSubType, sal_Bool bInReadOnly,
- sal_Bool bChkInpFlag = sal_False )
+void lcl_MakeFldLst(
+ _SetGetExpFlds& rLst,
+ const SwFieldType& rFldType,
+ const bool bInReadOnly,
+ const bool bChkInpFlag = false )
{
// es muss immer der 1. Frame gesucht werden
Point aPt;
- SwTxtFld* pTxtFld;
+ SwTxtFld* pTxtFld = NULL;
SwIterator<SwFmtFld,SwFieldType> aIter(rFldType);
- bool bSubType = nSubType != USHRT_MAX;
for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
- if( 0 != ( pTxtFld = pFmtFld->GetTxtFld() ) &&
- ( !bChkInpFlag || ((SwSetExpField*)pTxtFld->GetFmtFld().GetField())
- ->GetInputFlag() ) &&
- (!bSubType || (pFmtFld->GetField()->GetSubType()
- & 0xff ) == nSubType ))
+ {
+ pTxtFld = pFmtFld->GetTxtFld();
+ if ( pTxtFld != NULL
+ && ( !bChkInpFlag
+ || ((SwSetExpField*)pTxtFld->GetFmtFld().GetField())->GetInputFlag() ) )
{
- SwCntntFrm* pCFrm;
const SwTxtNode& rTxtNode = pTxtFld->GetTxtNode();
- if( 0 != ( pCFrm = rTxtNode.getLayoutFrm( rTxtNode.GetDoc()->GetCurrentLayout(), &aPt, 0, sal_False )) &&
- ( bInReadOnly || !pCFrm->IsProtected() ))
+ const SwCntntFrm* pCFrm =
+ rTxtNode.getLayoutFrm( rTxtNode.GetDoc()->GetCurrentLayout(), &aPt, 0, sal_False );
+ if ( pCFrm != NULL
+ && ( bInReadOnly || !pCFrm->IsProtected() ) )
{
- _SetGetExpFld* pNew = new _SetGetExpFld(
- SwNodeIndex( rTxtNode ), pTxtFld );
+ _SetGetExpFld* pNew = new _SetGetExpFld( SwNodeIndex( rTxtNode ), pTxtFld );
pNew->SetBodyPos( *pCFrm );
rLst.Insert( pNew );
}
}
+ }
}
-sal_Bool SwCrsrShell::MoveFldType( const SwFieldType* pFldType, sal_Bool bNext,
- sal_uInt16 nSubType, sal_uInt16 nResType )
+sal_Bool SwCrsrShell::MoveFldType(
+ const SwFieldType* pFldType,
+ const bool bNext,
+ const sal_uInt16 nResType,
+ const bool bAddSetExpressionFldsToInputFlds )
{
// sortierte Liste aller Felder
_SetGetExpFlds aSrtLst( 64 );
- if (pFldType)
+ if ( pFldType )
{
if( RES_INPUTFLD != pFldType->Which() && !pFldType->GetDepends() )
+ {
return sal_False;
+ }
// Modify-Object gefunden, trage alle Felder ins Array ein
- ::lcl_MakeFldLst( aSrtLst, *pFldType, nSubType, IsReadOnlyAvailable() );
+ ::lcl_MakeFldLst( aSrtLst, *pFldType, ( IsReadOnlyAvailable() ? true : false ) );
- if( RES_INPUTFLD == pFldType->Which() )
+ if( RES_INPUTFLD == pFldType->Which() && bAddSetExpressionFldsToInputFlds )
{
// es gibt noch versteckte InputFelder in den SetExp. Feldern
const SwFldTypes& rFldTypes = *pDoc->GetFldTypes();
const sal_uInt16 nSize = rFldTypes.Count();
-
- // Alle Typen abklappern
for( sal_uInt16 i=0; i < nSize; ++i )
- if( RES_SETEXPFLD == ( pFldType = rFldTypes[ i ] )->Which() )
- ::lcl_MakeFldLst( aSrtLst, *pFldType, nSubType,
- IsReadOnlyAvailable(), sal_True );
+ {
+ pFldType = rFldTypes[ i ];
+ if ( RES_SETEXPFLD == pFldType->Which() )
+ {
+ ::lcl_MakeFldLst( aSrtLst, *pFldType, ( IsReadOnlyAvailable() ? true : false ), true );
+ }
+ }
}
}
else
{
const SwFldTypes& rFldTypes = *pDoc->GetFldTypes();
const sal_uInt16 nSize = rFldTypes.Count();
-
- // Alle Typen abklappern
for( sal_uInt16 i=0; i < nSize; ++i )
- if( nResType == ( pFldType = rFldTypes[ i ] )->Which() )
- ::lcl_MakeFldLst( aSrtLst, *pFldType, nSubType,
- IsReadOnlyAvailable() );
+ {
+ pFldType = rFldTypes[ i ];
+ if( nResType == pFldType->Which() )
+ {
+ ::lcl_MakeFldLst( aSrtLst, *pFldType, ( IsReadOnlyAvailable() ? true : false ) );
+ }
+ }
}
// keine Felder gefunden?
@@ -704,12 +715,11 @@ sal_Bool SwCrsrShell::MoveFldType( const SwFieldType* pFldType, sal_Bool bNext,
SwTxtNode* pTNd = rPos.nNode.GetNode().GetTxtNode();
ASSERT( pTNd, "Wo ist mein CntntNode?" );
- SwTxtFld * pTxtFld = static_cast<SwTxtFld *>(
- pTNd->GetTxtAttrForCharAt(rPos.nContent.GetIndex(),
- RES_TXTATR_FIELD));
- sal_Bool bDelFld = 0 == pTxtFld;
+ SwTxtFld * pTxtFld = pTNd->GetFldTxtAttrAt( rPos.nContent.GetIndex(), true );
+ const bool bDelFld = ( pTxtFld == NULL );
if( bDelFld )
{
+ // create dummy for the search
SwFmtFld* pFmtFld = new SwFmtFld( SwDateTimeField(
(SwDateTimeFieldType*)pDoc->GetSysFldType( RES_DATETIMEFLD ) ) );
@@ -717,7 +727,12 @@ sal_Bool SwCrsrShell::MoveFldType( const SwFieldType* pFldType, sal_Bool bNext,
pTxtFld->ChgTxtNode( pTNd );
}
- _SetGetExpFld aSrch( rPos.nNode, pTxtFld, &rPos.nContent );
+ SwIndex aSearchIdx( rPos.nContent );
+ if ( !bDelFld && pTxtFld->HasContent() )
+ {
+ aSearchIdx = *(pTxtFld->GetStart());
+ }
+ _SetGetExpFld aSrch( rPos.nNode, pTxtFld, &aSearchIdx );
if( rPos.nNode.GetIndex() < pDoc->GetNodes().GetEndOfExtras().GetIndex() )
{
// auch beim Einsammeln wird nur der erste Frame benutzt!
@@ -743,7 +758,9 @@ sal_Bool SwCrsrShell::MoveFldType( const SwFieldType* pFldType, sal_Bool bNext,
return sal_False; // weiter nach vorne geht nicht
}
else if( bNext ? nPos >= aSrtLst.Count() : !nPos--)
+ {
return sal_False;
+ }
}
const _SetGetExpFld& rFnd = **( aSrtLst.GetData() + nPos );
@@ -784,6 +801,128 @@ sal_Bool SwCrsrShell::GotoFld( const SwFmtFld& rFld )
}
+SwTxtFld * SwCrsrShell::GetTxtFldAtPos(
+ const SwPosition* pPos,
+ const bool bIncludeInputFldAtStart ) const
+{
+ SwTxtFld* pTxtFld = NULL;
+
+ SwTxtNode * const pNode = pPos->nNode.GetNode().GetTxtNode();
+ if ( pNode != NULL )
+ {
+ pTxtFld = pNode->GetFldTxtAttrAt( pPos->nContent.GetIndex(), bIncludeInputFldAtStart );
+ }
+
+ return pTxtFld;
+}
+
+
+SwField* SwCrsrShell::GetFieldAtCrsr(
+ const SwPaM* pCrsr,
+ const bool bIncludeInputFldAtStart ) const
+{
+ SwField* pFieldAtCrsr = NULL;
+
+ SwTxtFld* pTxtFld = GetTxtFldAtPos( pCrsr->Start(), bIncludeInputFldAtStart );
+ if ( pTxtFld != NULL
+ && pCrsr->Start()->nNode == pCrsr->End()->nNode )
+ {
+ const xub_StrLen nTxtFldLength =
+ pTxtFld->End() != NULL
+ ? *(pTxtFld->End()) - *(pTxtFld->GetStart())
+ : 1;
+ if ( ( pCrsr->End()->nContent.GetIndex() - pCrsr->Start()->nContent.GetIndex() ) <= nTxtFldLength )
+ {
+ pFieldAtCrsr = (SwField*)pTxtFld->GetFmtFld().GetField();
+ }
+ }
+
+ return pFieldAtCrsr;
+}
+
+
+SwField* SwCrsrShell::GetCurFld( const bool bIncludeInputFldAtStart ) const
+{
+ SwPaM* pCrsr = GetCrsr();
+ if ( pCrsr->GetNext() != pCrsr )
+ {
+ // multi selection not handled.
+ return NULL;
+ }
+
+ SwField* pCurFld = GetFieldAtCrsr( pCrsr, bIncludeInputFldAtStart );;
+ if ( pCurFld != NULL
+ && RES_TABLEFLD == pCurFld->GetTyp()->Which() )
+ {
+ // TabellenFormel ? wandel internen in externen Namen um
+ const SwTableNode* pTblNd = IsCrsrInTbl();
+ ((SwTblField*)pCurFld)->PtrToBoxNm( pTblNd ? &pTblNd->GetTable() : 0 );
+ }
+
+ return pCurFld;
+}
+
+
+bool SwCrsrShell::CrsrInsideInputFld() const
+{
+ bool bCrsrInsideInputFld = false;
+
+ const SwPaM* pCrsr = GetCrsr();
+ const SwPaM* pFirst = pCrsr;
+ do
+ {
+ bCrsrInsideInputFld = dynamic_cast<const SwInputField*>(GetFieldAtCrsr( pCrsr, false )) != NULL;
+
+ pCrsr = static_cast<SwPaM*>(pCrsr->GetNext());
+ } while ( !bCrsrInsideInputFld
+ && pCrsr != pFirst );
+
+ return bCrsrInsideInputFld;
+}
+
+
+bool SwCrsrShell::PosInsideInputFld( const SwPosition& rPos ) const
+{
+ return dynamic_cast<const SwTxtInputFld*>(GetTxtFldAtPos( &rPos, false )) != NULL;
+}
+
+
+bool SwCrsrShell::DocPtInsideInputFld( const Point& rDocPt ) const
+{
+ SwPosition aPos( *(GetCrsr()->Start()) );
+ Point aDocPt( rDocPt );
+ if ( GetLayout()->GetCrsrOfst( &aPos, aDocPt ) )
+ {
+ return PosInsideInputFld( aPos );
+ }
+ return false;
+}
+
+
+xub_StrLen SwCrsrShell::StartOfInputFldAtPos( const SwPosition& rPos ) const
+{
+ const SwTxtInputFld* pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtFldAtPos( &rPos, true ));
+ if ( pTxtInputFld == NULL )
+ {
+ ASSERT( false, "<SwEditShell::StartOfInputFldAtPos(..)> - no Input Field at given position" );
+ return 0;
+ }
+ return *(pTxtInputFld->GetStart());
+}
+
+
+xub_StrLen SwCrsrShell::EndOfInputFldAtPos( const SwPosition& rPos ) const
+{
+ const SwTxtInputFld* pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtFldAtPos( &rPos, true ));
+ if ( pTxtInputFld == NULL )
+ {
+ ASSERT( false, "<SwEditShell::EndOfInputFldAtPos(..)> - no Input Field at given position" );
+ return 0;
+ }
+ return *(pTxtInputFld->End());
+}
+
+
void SwCrsrShell::GotoOutline( sal_uInt16 nIdx )
{
SwCursor* pCrsr = getShellCrsr( true );
@@ -1029,7 +1168,8 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
pTxtNd = aPos.nNode.GetNode().GetTxtNode();
const SwNodes& rNds = GetDoc()->GetNodes();
- if( pTxtNd && SwContentAtPos::SW_OUTLINE & rCntntAtPos.eCntntAtPos
+ if( pTxtNd
+ && SwContentAtPos::SW_OUTLINE & rCntntAtPos.eCntntAtPos
&& rNds.GetOutLineNds().Count() )
{
const SwTxtNode* pONd = pTxtNd->FindOutlineNodeOfLevel( MAXLEVEL-1);
@@ -1040,16 +1180,13 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
bRet = sal_True;
}
}
- // --> FME 2005-05-13 #i43742# New function: SW_CONTENT_CHECK
- else if ( SwContentAtPos::SW_CONTENT_CHECK & rCntntAtPos.eCntntAtPos &&
- bCrsrFoundExact )
+ else if ( SwContentAtPos::SW_CONTENT_CHECK & rCntntAtPos.eCntntAtPos
+ && bCrsrFoundExact )
{
bRet = sal_True;
}
- // <--
- // #i23726#
- else if( pTxtNd &&
- SwContentAtPos::SW_NUMLABEL & rCntntAtPos.eCntntAtPos)
+ else if( pTxtNd
+ && SwContentAtPos::SW_NUMLABEL & rCntntAtPos.eCntntAtPos)
{
bRet = aTmpState.bInNumPortion;
rCntntAtPos.aFnd.pNode = pTxtNd;
@@ -1062,8 +1199,9 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
{
if( !aTmpState.bPosCorr )
{
- if( !bRet && SwContentAtPos::SW_SMARTTAG & rCntntAtPos.eCntntAtPos
- && !aTmpState.bFtnNoInfo )
+ if ( !bRet
+ && SwContentAtPos::SW_SMARTTAG & rCntntAtPos.eCntntAtPos
+ && !aTmpState.bFtnNoInfo )
{
const SwWrongList* pSmartTagList = pTxtNd->GetSmartTags();
xub_StrLen nCurrent = aPos.nContent.GetIndex();
@@ -1090,22 +1228,14 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
pCurCrsr->DeleteMark();
*pCurCrsr->GetPoint() = aPos;
- if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
- nsSwCursorSelOverFlags::SELOVER_TOGGLE) )
+ if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE) )
bRet = sal_False;
else
UpdateCrsr();
}
if( bRet )
{
-// rCntntAtPos.sStr = pTxtNd->GetExpandTxt(
-// *pTxtAttr->GetStart(),
-// *pTxtAttr->GetEnd() - *pTxtAttr->GetStart(),
-// sal_False );
-
-// rCntntAtPos.aFnd.pAttr = &pTxtAttr->GetAttr();
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_SMARTTAG;
-// rCntntAtPos.pFndTxtAttr = pTxtAttr;
if( pFldRect && 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt ) ) )
pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
@@ -1113,19 +1243,21 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
}
}
- if( !bRet && ( SwContentAtPos::SW_FIELD | SwContentAtPos::SW_CLICKFIELD )
- & rCntntAtPos.eCntntAtPos && !aTmpState.bFtnNoInfo )
+ if ( !bRet
+ && ( SwContentAtPos::SW_FIELD | SwContentAtPos::SW_CLICKFIELD ) & rCntntAtPos.eCntntAtPos
+ && !aTmpState.bFtnNoInfo )
{
- pTxtAttr = pTxtNd->GetTxtAttrForCharAt(
- aPos.nContent.GetIndex(), RES_TXTATR_FIELD );
- const SwField* pFld = pTxtAttr
- ? pTxtAttr->GetFmtFld().GetField()
- : 0;
- if( SwContentAtPos::SW_CLICKFIELD & rCntntAtPos.eCntntAtPos &&
- pFld && !pFld->HasClickHdl() )
+ pTxtAttr = pTxtNd->GetFldTxtAttrAt( aPos.nContent.GetIndex() );
+ const SwField* pFld = pTxtAttr != NULL
+ ? pTxtAttr->GetFmtFld().GetField()
+ : 0;
+ if ( SwContentAtPos::SW_CLICKFIELD & rCntntAtPos.eCntntAtPos
+ && pFld && !pFld->HasClickHdl() )
+ {
pFld = 0;
+ }
- if( pFld )
+ if ( pFld )
{
if( pFldRect && 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt ) ) )
pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
@@ -1141,14 +1273,14 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
// Click-Felder in geschuetzten Bereichen zulassen
// Nur Platzhalter geht nicht!
if( SwContentAtPos::SW_FIELD & rCntntAtPos.eCntntAtPos
- || RES_JUMPEDITFLD == pFld->Which() )
+ || RES_JUMPEDITFLD == pFld->Which() )
pFld = 0;
}
else
UpdateCrsr();
}
else if( RES_TABLEFLD == pFld->Which() &&
- ((SwTblField*)pFld)->IsIntrnlName() )
+ ((SwTblField*)pFld)->IsIntrnlName() )
{
// erzeuge aus der internen (fuer CORE)
// die externe (fuer UI) Formel
@@ -1167,16 +1299,16 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
}
}
- if( !bRet && SwContentAtPos::SW_FORMCTRL & rCntntAtPos.eCntntAtPos )
- {
- IDocumentMarkAccess* pMarksAccess = GetDoc()->getIDocumentMarkAccess( );
- sw::mark::IFieldmark* pFldBookmark = pMarksAccess->getFieldmarkFor( aPos );
- if( bCrsrFoundExact && pTxtNd && pFldBookmark) {
- rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FORMCTRL;
- rCntntAtPos.aFnd.pFldmark = pFldBookmark;
- bRet=sal_True;
- }
- }
+ if( !bRet && SwContentAtPos::SW_FORMCTRL & rCntntAtPos.eCntntAtPos )
+ {
+ IDocumentMarkAccess* pMarksAccess = GetDoc()->getIDocumentMarkAccess( );
+ sw::mark::IFieldmark* pFldBookmark = pMarksAccess->getFieldmarkFor( aPos );
+ if( bCrsrFoundExact && pTxtNd && pFldBookmark) {
+ rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FORMCTRL;
+ rCntntAtPos.aFnd.pFldmark = pFldBookmark;
+ bRet=sal_True;
+ }
+ }
if( !bRet && SwContentAtPos::SW_FTN & rCntntAtPos.eCntntAtPos )
{
@@ -1194,7 +1326,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FTN;
}
else if ( 0 != ( pTxtAttr = pTxtNd->GetTxtAttrForCharAt(
- aPos.nContent.GetIndex(), RES_TXTATR_FTN )) )
+ aPos.nContent.GetIndex(), RES_TXTATR_FTN )) )
{
bRet = sal_True;
if( bSetCrsr )
@@ -1203,14 +1335,14 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
SwCrsrSaveState aSaveState( *pCurCrsr );
pCurCrsr->GetPoint()->nNode = *((SwTxtFtn*)pTxtAttr)->GetStartNode();
SwCntntNode* pCNd = GetDoc()->GetNodes().GoNextSection(
- &pCurCrsr->GetPoint()->nNode,
- sal_True, !IsReadOnlyAvailable() );
+ &pCurCrsr->GetPoint()->nNode,
+ sal_True, !IsReadOnlyAvailable() );
if( pCNd )
{
pCurCrsr->GetPoint()->nContent.Assign( pCNd, 0 );
if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
- nsSwCursorSelOverFlags::SELOVER_TOGGLE ))
+ nsSwCursorSelOverFlags::SELOVER_TOGGLE ))
bRet = sal_False;
else
UpdateCrsr();
@@ -1231,9 +1363,9 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
}
}
- if( !bRet && ( SwContentAtPos::SW_TOXMARK |
- SwContentAtPos::SW_REFMARK ) &
- rCntntAtPos.eCntntAtPos && !aTmpState.bFtnNoInfo )
+ if( !bRet
+ && ( SwContentAtPos::SW_TOXMARK | SwContentAtPos::SW_REFMARK ) & rCntntAtPos.eCntntAtPos
+ && !aTmpState.bFtnNoInfo )
{
pTxtAttr = 0;
if( SwContentAtPos::SW_TOXMARK & rCntntAtPos.eCntntAtPos )
@@ -1268,8 +1400,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
SwCrsrSaveState aSaveState( *pCurCrsr );
pCurCrsr->DeleteMark();
*pCurCrsr->GetPoint() = aPos;
- if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
- nsSwCursorSelOverFlags::SELOVER_TOGGLE ) )
+ if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | nsSwCursorSelOverFlags::SELOVER_TOGGLE ) )
bRet = sal_False;
else
UpdateCrsr();
@@ -1277,19 +1408,18 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( bRet )
{
- const xub_StrLen* pEnd = pTxtAttr->GetEnd();
+ const xub_StrLen* pEnd = pTxtAttr->End();
if( pEnd )
- rCntntAtPos.sStr = pTxtNd->GetExpandTxt(
- *pTxtAttr->GetStart(),
- *pEnd - *pTxtAttr->GetStart() );
+ rCntntAtPos.sStr =
+ pTxtNd->GetExpandTxt( *pTxtAttr->GetStart(), *pEnd - *pTxtAttr->GetStart() );
else if( RES_TXTATR_TOXMARK == pTxtAttr->Which())
- rCntntAtPos.sStr = pTxtAttr->GetTOXMark().
- GetAlternativeText();
+ rCntntAtPos.sStr =
+ pTxtAttr->GetTOXMark().GetAlternativeText();
rCntntAtPos.eCntntAtPos =
RES_TXTATR_TOXMARK == pTxtAttr->Which()
- ? SwContentAtPos::SW_TOXMARK
- : SwContentAtPos::SW_REFMARK;
+ ? SwContentAtPos::SW_TOXMARK
+ : SwContentAtPos::SW_REFMARK;
rCntntAtPos.pFndTxtAttr = pTxtAttr;
rCntntAtPos.aFnd.pAttr = &pTxtAttr->GetAttr();
@@ -1299,8 +1429,9 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
}
}
- if( !bRet && SwContentAtPos::SW_INETATTR & rCntntAtPos.eCntntAtPos
- && !aTmpState.bFtnNoInfo )
+ if ( !bRet
+ && SwContentAtPos::SW_INETATTR & rCntntAtPos.eCntntAtPos
+ && !aTmpState.bFtnNoInfo )
{
pTxtAttr = pTxtNd->GetTxtAttrAt(
aPos.nContent.GetIndex(), RES_TXTATR_INETFMT);
@@ -1315,7 +1446,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
pCurCrsr->DeleteMark();
*pCurCrsr->GetPoint() = aPos;
if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
- nsSwCursorSelOverFlags::SELOVER_TOGGLE) )
+ nsSwCursorSelOverFlags::SELOVER_TOGGLE) )
bRet = sal_False;
else
UpdateCrsr();
@@ -1323,8 +1454,8 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( bRet )
{
rCntntAtPos.sStr = pTxtNd->GetExpandTxt(
- *pTxtAttr->GetStart(),
- *pTxtAttr->GetEnd() - *pTxtAttr->GetStart() );
+ *pTxtAttr->GetStart(),
+ *pTxtAttr->GetEnd() - *pTxtAttr->GetStart() );
rCntntAtPos.aFnd.pAttr = &pTxtAttr->GetAttr();
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_INETATTR;
@@ -1352,12 +1483,12 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
}
}
- if( !bRet && (
- SwContentAtPos::SW_TABLEBOXFML & rCntntAtPos.eCntntAtPos
+ if( !bRet
+ && ( SwContentAtPos::SW_TABLEBOXFML & rCntntAtPos.eCntntAtPos
#ifdef DBG_UTIL
- || SwContentAtPos::SW_TABLEBOXVALUE & rCntntAtPos.eCntntAtPos
+ || SwContentAtPos::SW_TABLEBOXVALUE & rCntntAtPos.eCntntAtPos
#endif
- ))
+ ) )
{
const SwTableNode* pTblNd;
const SwTableBox* pBox;
@@ -1365,15 +1496,15 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
const SfxPoolItem* pItem;
if( pSttNd && 0 != ( pTblNd = pTxtNd->FindTableNode()) &&
0 != ( pBox = pTblNd->GetTable().GetTblBox(
- pSttNd->GetIndex() )) &&
+ pSttNd->GetIndex() )) &&
#ifdef DBG_UTIL
( SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
- RES_BOXATR_FORMULA, sal_False, &pItem ) ||
- SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
- RES_BOXATR_VALUE, sal_False, &pItem ))
+ RES_BOXATR_FORMULA, sal_False, &pItem ) ||
+ SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
+ RES_BOXATR_VALUE, sal_False, &pItem ))
#else
SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
- RES_BOXATR_FORMULA, sal_False, &pItem )
+ RES_BOXATR_FORMULA, sal_False, &pItem )
#endif
)
{
@@ -1405,7 +1536,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_TABLEBOXVALUE;
else
#endif
- ((SwTblBoxFormula*)pItem)->PtrToBoxNm( &pTblNd->GetTable() );
+ ((SwTblBoxFormula*)pItem)->PtrToBoxNm( &pTblNd->GetTable() );
bRet = sal_True;
if( bSetCrsr )
@@ -1414,7 +1545,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
SwCrsrSaveState aSaveState( *pCurCrsr );
*pCurCrsr->GetPoint() = aPos;
if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
- nsSwCursorSelOverFlags::SELOVER_TOGGLE) )
+ nsSwCursorSelOverFlags::SELOVER_TOGGLE) )
bRet = sal_False;
else
UpdateCrsr();
@@ -1439,7 +1570,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
{
xub_StrLen n = aPos.nContent.GetIndex();
SfxItemSet aSet( GetDoc()->GetAttrPool(), POOLATTR_BEGIN,
- POOLATTR_END - 1 );
+ POOLATTR_END - 1 );
if( pTxtNd->GetpSwpHints() )
{
for( sal_uInt16 i = 0; i < pTxtNd->GetSwpHints().Count(); ++i )
@@ -1449,12 +1580,12 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( nAttrStart > n ) // ueber den Bereich hinaus
break;
- if( 0 != pHt->GetEnd() && (
+ if( 0 != pHt->End() && (
( nAttrStart < n &&
- ( pHt->DontExpand() ? n < *pHt->GetEnd()
- : n <= *pHt->GetEnd() )) ||
+ ( pHt->DontExpand() ? n < *pHt->End()
+ : n <= *pHt->End() )) ||
( n == nAttrStart &&
- ( nAttrStart == *pHt->GetEnd() || !n ))) )
+ ( nAttrStart == *pHt->End() || !n ))) )
{
aSet.Put( pHt->GetAttr() );
}
@@ -1473,18 +1604,18 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
pTxtNd->SwCntntNode::GetAttr( aSet );
rCntntAtPos.sStr.AssignAscii(
- RTL_CONSTASCII_STRINGPARAM( "Pos: (" ));
+ RTL_CONSTASCII_STRINGPARAM( "Pos: (" ));
rCntntAtPos.sStr += String::CreateFromInt32( aPos.nNode.GetIndex());
rCntntAtPos.sStr += ':';
rCntntAtPos.sStr += String::CreateFromInt32( aPos.nContent.GetIndex());
rCntntAtPos.sStr += ')';
rCntntAtPos.sStr.AppendAscii(
- RTL_CONSTASCII_STRINGPARAM( "\nAbs.Vorl.: " ));
+ RTL_CONSTASCII_STRINGPARAM( "\nAbs.Vorl.: " ));
rCntntAtPos.sStr += pTxtNd->GetFmtColl()->GetName();
if( pTxtNd->GetCondFmtColl() )
rCntntAtPos.sStr.AppendAscii(
- RTL_CONSTASCII_STRINGPARAM( "\nBed.Vorl.: " ))
- += pTxtNd->GetCondFmtColl()->GetName();
+ RTL_CONSTASCII_STRINGPARAM( "\nBed.Vorl.: " ))
+ += pTxtNd->GetCondFmtColl()->GetName();
if( aSet.Count() )
{
@@ -1497,11 +1628,11 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
{
String aStr;
GetDoc()->GetAttrPool().GetPresentation( *pItem,
- SFX_ITEM_PRESENTATION_COMPLETE,
- SFX_MAPUNIT_CM, aStr );
+ SFX_ITEM_PRESENTATION_COMPLETE,
+ SFX_MAPUNIT_CM, aStr );
if( sAttrs.Len() )
sAttrs.AppendAscii(
- RTL_CONSTASCII_STRINGPARAM( ", " ));
+ RTL_CONSTASCII_STRINGPARAM( ", " ));
sAttrs += aStr;
}
if( aIter.IsAtEnd() )
@@ -1513,8 +1644,8 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( rCntntAtPos.sStr.Len() )
rCntntAtPos.sStr += '\n';
rCntntAtPos.sStr.AppendAscii(
- RTL_CONSTASCII_STRINGPARAM( "Attr: " ) )
- += sAttrs;
+ RTL_CONSTASCII_STRINGPARAM( "Attr: " ) )
+ += sAttrs;
}
}
bRet = sal_True;
@@ -1532,7 +1663,6 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
return bRet;
}
-// --> OD 2008-06-19 #i90516#
const SwPostItField* SwCrsrShell::GetPostItFieldAtCursor() const
{
const SwPostItField* pPostItFld = 0;
@@ -1543,9 +1673,8 @@ const SwPostItField* SwCrsrShell::GetPostItFieldAtCursor() const
const SwTxtNode* pTxtNd = pCursorPos->nNode.GetNode().GetTxtNode();
if ( pTxtNd )
{
- SwTxtAttr* pTxtAttr = pTxtNd->GetTxtAttrForCharAt(
- pCursorPos->nContent.GetIndex(), RES_TXTATR_FIELD );
- const SwField* pFld = pTxtAttr ? pTxtAttr->GetFmtFld().GetField() : 0;
+ SwTxtAttr* pTxtAttr = pTxtNd->GetFldTxtAttrAt( pCursorPos->nContent.GetIndex() );
+ const SwField* pFld = pTxtAttr != NULL ? pTxtAttr->GetFmtFld().GetField() : 0;
if ( pFld && pFld->Which()== RES_POSTITFLD )
{
pPostItFld = static_cast<const SwPostItField*>(pFld);
@@ -1555,7 +1684,6 @@ const SwPostItField* SwCrsrShell::GetPostItFieldAtCursor() const
return pPostItFld;
}
-// <--
// befindet sich der Node in einem geschuetzten Bereich?
sal_Bool SwContentAtPos::IsInProtectSect() const
@@ -1624,17 +1752,44 @@ bool SwContentAtPos::IsInRTLText()const
return bRet;
}
-sal_Bool SwCrsrShell::SelectTxtAttr( sal_uInt16 nWhich, sal_Bool bExpand,
- const SwTxtAttr* pTxtAttr )
+
+sal_Bool SwCrsrShell::SelectTxt( const xub_StrLen nStart,
+ const xub_StrLen nEnd )
+{
+ SET_CURR_SHELL( this );
+ sal_Bool bRet = sal_False;
+
+ SwCallLink aLk( *this );
+ SwCrsrSaveState aSaveState( *pCurCrsr );
+
+ SwPosition& rPos = *pCurCrsr->GetPoint();
+ pCurCrsr->DeleteMark();
+ rPos.nContent = nStart;
+ pCurCrsr->SetMark();
+ rPos.nContent = nEnd;
+
+ if( !pCurCrsr->IsSelOvr() )
+ {
+ UpdateCrsr();
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
+
+
+sal_Bool SwCrsrShell::SelectTxtAttr( sal_uInt16 nWhich,
+ sal_Bool bExpand,
+ const SwTxtAttr* pTxtAttr )
{
SET_CURR_SHELL( this );
sal_Bool bRet = sal_False;
if( !IsTableMode() )
{
- SwPosition& rPos = *pCurCrsr->GetPoint();
if( !pTxtAttr )
{
+ SwPosition& rPos = *pCurCrsr->GetPoint();
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
pTxtAttr = (pTxtNd)
? pTxtNd->GetTxtAttrAt(rPos.nContent.GetIndex(),
@@ -1645,20 +1800,8 @@ sal_Bool SwCrsrShell::SelectTxtAttr( sal_uInt16 nWhich, sal_Bool bExpand,
if( pTxtAttr )
{
- SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
- SwCrsrSaveState aSaveState( *pCurCrsr );
-
- pCurCrsr->DeleteMark();
- rPos.nContent = *pTxtAttr->GetStart();
- pCurCrsr->SetMark();
- const xub_StrLen* pEnd = pTxtAttr->GetEnd();
- rPos.nContent = pEnd ? *pEnd : *pTxtAttr->GetStart() + 1;
-
- if( !pCurCrsr->IsSelOvr() )
- {
- UpdateCrsr();
- bRet = sal_True;
- }
+ const xub_StrLen* pEnd = pTxtAttr->End();
+ bRet = SelectTxt( *pTxtAttr->GetStart(), ( pEnd ? *pEnd : *pTxtAttr->GetStart() + 1 ) );
}
}
return bRet;
@@ -2177,7 +2320,7 @@ sal_Bool SwCrsrShell::SelectNxtPrvHyperlink( sal_Bool bNext )
aCmpPos.GetPosOfContent( *pCurCrsr->GetPoint() );
pCurCrsr->DeleteMark();
pCurCrsr->SetMark();
- pCurCrsr->GetPoint()->nContent = *pFndAttr->SwTxtAttr::GetEnd();
+ pCurCrsr->GetPoint()->nContent = *pFndAttr->End();
if( !pCurCrsr->IsInProtectTable() && !pCurCrsr->IsSelOvr() )
{
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 9d2c2f1697ef..09c3e4da7c8e 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -154,7 +154,7 @@ sal_Bool lcl_Search( const SwTxtNode& rTxtNd, SwPaM& rPam,
if( pTxtHt->Which() == rCmpItem.Which() &&
( !bValue || CmpAttr( pTxtHt->GetAttr(), rCmpItem )))
{
- lcl_SetAttrPam( rPam, *pTxtHt->GetStart(), pTxtHt->GetEnd(), bForward );
+ lcl_SetAttrPam( rPam, *pTxtHt->GetStart(), pTxtHt->End(), bForward );
return sal_True;
}
return sal_False;
@@ -902,7 +902,7 @@ sal_Bool SwPaM::Find( const SfxPoolItem& rAttr, sal_Bool bValue, SwMoveFn fnMove
const SwPaM *pRegion, sal_Bool bInReadOnly )
{
// stelle fest welches Attribut gesucht wird:
- sal_uInt16 nWhich = rAttr.Which();
+ const sal_uInt16 nWhich = rAttr.Which();
int bCharAttr = isCHRATR(nWhich) || isTXTATR(nWhich);
SwPaM* pPam = MakeRegion( fnMove, pRegion );
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 74cca2655f14..eee273145425 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -57,9 +57,10 @@ using namespace util;
String *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam );
+
String& lcl_CleanStr(
const SwTxtNode& rNd,
- xub_StrLen nStart,
+ const xub_StrLen nStart,
xub_StrLen& rEnde,
SvULongs& rArr,
String& rRet,
@@ -125,7 +126,6 @@ String& lcl_CleanStr(
const SwTxtAttr* pHt = (*pHts)[n];
if ( pHt->HasDummyChar() && (nStt >= nStart) )
{
- //JP 17.05.00: Task 75806 ask for ">=" and not for ">"
switch( pHt->Which() )
{
case RES_TXTATR_FLYCNT:
@@ -136,14 +136,6 @@ String& lcl_CleanStr(
case RES_TXTATR_META:
case RES_TXTATR_METAFIELD:
{
- // JP 06.05.98: mit Bug 50100 werden sie als Trenner erwuenscht und nicht
- // mehr zum Wort dazu gehoerend.
- // MA 23.06.98: mit Bug 51215 sollen sie konsequenterweise auch am
- // Satzanfang und -ende ignoriert werden wenn sie Leer sind.
- // Dazu werden sie schlicht entfernt. Fuer den Anfang entfernen
- // wir sie einfach.
- // Fuer das Ende merken wir uns die Ersetzungen und entferenen
- // hinterher alle am Stringende (koenten ja 'normale' 0x7f drinstehen
sal_Bool bEmpty = RES_TXTATR_FIELD != pHt->Which() ||
!(static_cast<SwTxtFld const*>(pHt)
->GetFmtFld().GetField()->ExpandField(true).Len());
@@ -171,9 +163,9 @@ String& lcl_CleanStr(
if ( bNewSoftHyphen )
{
- rArr.Insert( nAkt, rArr.Count() );
+ rArr.Insert( nAkt, rArr.Count() );
--rEnde;
- rRet.Erase( nAkt, 1 );
+ rRet.Erase( nAkt, 1 );
++nSoftHyphen;
}
}
@@ -203,8 +195,8 @@ xub_StrLen GetPostIt(xub_StrLen aCount,const SwpHints *pHts)
{
aIndex++;
const SwTxtAttr* pTxtAttr = (*pHts)[i];
- if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) &&
- (pTxtAttr->GetFmtFld().GetField()->Which()==RES_POSTITFLD))
+ if ( (pTxtAttr->Which()==RES_TXTATR_FIELD)
+ && (pTxtAttr->GetFmtFld().GetField()->Which()==RES_POSTITFLD))
{
aCount--;
if (!aCount)
@@ -216,8 +208,8 @@ xub_StrLen GetPostIt(xub_StrLen aCount,const SwpHints *pHts)
for (xub_StrLen i = aIndex; i <pHts->Count();i++)
{
const SwTxtAttr* pTxtAttr = (*pHts)[i];
- if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) &&
- (pTxtAttr->GetFmtFld().GetField()->Which()==RES_POSTITFLD))
+ if ( (pTxtAttr->Which()==RES_TXTATR_FIELD)
+ && (pTxtAttr->GetFmtFld().GetField()->Which()==RES_POSTITFLD))
break;
else
aIndex++;
@@ -309,10 +301,10 @@ sal_uInt8 SwPaM::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes
for (xub_StrLen i = 0; i <pHts->Count();i++)
{
- xub_StrLen aPos = *(*pHts)[i]->GetStart();
+ const xub_StrLen aPos = *(*pHts)[i]->GetStart();
const SwTxtAttr* pTxtAttr = (*pHts)[i];
- if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) &&
- (pTxtAttr->GetFmtFld().GetField()->Which()==RES_POSTITFLD))
+ if ( (pTxtAttr->Which()==RES_TXTATR_FIELD)
+ && (pTxtAttr->GetFmtFld().GetField()->Which()==RES_POSTITFLD))
{
if ( (aPos >= nStart) && (aPos <= nEnde) )
aNumberPostits++;
diff --git a/sw/source/core/crsr/overlayrangesoutline.cxx b/sw/source/core/crsr/overlayrangesoutline.cxx
new file mode 100644
index 000000000000..3859463f772c
--- /dev/null
+++ b/sw/source/core/crsr/overlayrangesoutline.cxx
@@ -0,0 +1,117 @@
+/**************************************************************
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*************************************************************/
+
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+#include <overlayrangesoutline.hxx>
+#include <svx/sdr/overlay/overlaymanager.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
+#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace
+{
+ // combine ranges geometrically to a single, ORed polygon
+ basegfx::B2DPolyPolygon impCombineRangesToPolyPolygon(const std::vector< basegfx::B2DRange >& rRanges)
+ {
+ const sal_uInt32 nCount(rRanges.size());
+ basegfx::B2DPolyPolygon aRetval;
+
+ for(sal_uInt32 a(0); a < nCount; a++)
+ {
+ const basegfx::B2DPolygon aDiscretePolygon(basegfx::tools::createPolygonFromRect(rRanges[a]));
+
+ if(0 == a)
+ {
+ aRetval.append(aDiscretePolygon);
+ }
+ else
+ {
+ aRetval = basegfx::tools::solvePolygonOperationOr(aRetval, basegfx::B2DPolyPolygon(aDiscretePolygon));
+ }
+ }
+
+ return aRetval;
+ }
+}
+
+namespace sw
+{
+ namespace overlay
+ {
+ drawinglayer::primitive2d::Primitive2DSequence OverlayRangesOutline::createOverlayObjectPrimitive2DSequence()
+ {
+ drawinglayer::primitive2d::Primitive2DSequence aRetval;
+ const sal_uInt32 nCount(getRanges().size());
+
+ if( nCount )
+ {
+ const basegfx::BColor aRGBColor(getBaseColor().getBColor());
+ const basegfx::B2DPolyPolygon aPolyPolygon(impCombineRangesToPolyPolygon(getRanges()));
+ const drawinglayer::primitive2d::Primitive2DReference aOutline(
+ new drawinglayer::primitive2d::PolyPolygonHairlinePrimitive2D(
+ aPolyPolygon,
+ aRGBColor));
+
+ aRetval.realloc(1);
+ aRetval[0] = aOutline;
+ }
+
+ return aRetval;
+ }
+
+ OverlayRangesOutline::OverlayRangesOutline(
+ const Color& rColor,
+ const std::vector< basegfx::B2DRange >& rRanges )
+ : sdr::overlay::OverlayObject(rColor)
+ , maRanges(rRanges)
+ {
+ // no AA for highlight overlays
+ allowAntiAliase(false);
+ }
+
+ OverlayRangesOutline::~OverlayRangesOutline()
+ {
+ if( getOverlayManager() )
+ {
+ getOverlayManager()->remove(*this);
+ }
+ }
+
+ void OverlayRangesOutline::setRanges(const std::vector< basegfx::B2DRange >& rNew)
+ {
+ if(rNew != maRanges)
+ {
+ maRanges = rNew;
+ objectChange();
+ }
+ }
+ } // end of namespace overlay
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/sw/source/core/crsr/overlayrangesoutline.hxx b/sw/source/core/crsr/overlayrangesoutline.hxx
new file mode 100644
index 000000000000..58a2bbb4b60c
--- /dev/null
+++ b/sw/source/core/crsr/overlayrangesoutline.hxx
@@ -0,0 +1,70 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+
+
+#ifndef _SW_OVERLAY_OVERLAYRANGESOUTLINE_HXX
+#define _SW_OVERLAY_OVERLAYRANGESOUTLINE_HXX
+
+#include <svx/sdr/overlay/overlayobject.hxx>
+#include <basegfx/range/b2drange.hxx>
+
+#include <vector>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sw
+{
+ namespace overlay
+ {
+ class OverlayRangesOutline : public sdr::overlay::OverlayObject
+ {
+ protected:
+ // geometry of overlay
+ std::vector< basegfx::B2DRange > maRanges;
+
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
+
+ public:
+ OverlayRangesOutline(
+ const Color& rColor,
+ const std::vector< basegfx::B2DRange >& rRanges );
+
+ virtual ~OverlayRangesOutline();
+
+ // data read access
+ inline const std::vector< basegfx::B2DRange >& getRanges() const
+ {
+ return maRanges;
+ }
+
+ // data write access
+ void setRanges(const std::vector< basegfx::B2DRange >& rNew);
+ };
+ } // end of namespace overlay
+} // end of namespace sw
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SW_OVERLAY_OVERLAYRANGESOUTLINE_HXX
+
+// eof
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index bd8c05c5bcaa..9dd182a3a1a9 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -56,6 +56,7 @@
#include <mdiexp.hxx> // ...Percent()
#include <statstr.hrc> // ResId fuer Statusleiste
#include <redline.hxx> // SwRedline
+#include <txatbase.hxx>
using namespace ::com::sun::star::i18n;
@@ -238,18 +239,16 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
return sal_True;
}
-// neu: Bereiche ueberpruefen
-// Anfang
- if( pSavePos->nNode != GetPoint()->nNode.GetIndex() &&
- //JP 28.10.97: Bug 45129 - im UI-ReadOnly ist alles erlaubt
- ( !pDoc->GetDocShell() || !pDoc->GetDocShell()->IsReadOnlyUI() ))
+ if( pSavePos->nNode != GetPoint()->nNode.GetIndex()
+ && ( !pDoc->GetDocShell()
+ || !pDoc->GetDocShell()->IsReadOnlyUI() ) )
{
// teste doch mal die neuen Sections:
SwNodeIndex& rPtIdx = GetPoint()->nNode;
const SwSectionNode* pSectNd = rPtIdx.GetNode().FindSectionNode();
if( pSectNd &&
((bSkipOverHiddenSections && pSectNd->GetSection().IsHiddenFlag() ) ||
- (bSkipOverProtectSections && pSectNd->GetSection().IsProtectFlag() )))
+ (bSkipOverProtectSections && pSectNd->GetSection().IsProtectFlag() )))
{
if( 0 == ( nsSwCursorSelOverFlags::SELOVER_CHANGEPOS & eFlags ) )
{
@@ -263,18 +262,18 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
xub_StrLen nCntntPos = pSavePos->nCntnt;
int bGoNxt = pSavePos->nNode < rPtIdx.GetIndex();
SwCntntNode* pCNd = bGoNxt
- ? rNds.GoNextSection( &rPtIdx, bSkipOverHiddenSections, bSkipOverProtectSections)
- : rNds.GoPrevSection( &rPtIdx, bSkipOverHiddenSections, bSkipOverProtectSections);
+ ? rNds.GoNextSection( &rPtIdx, bSkipOverHiddenSections, bSkipOverProtectSections)
+ : rNds.GoPrevSection( &rPtIdx, bSkipOverHiddenSections, bSkipOverProtectSections);
if( !pCNd && ( nsSwCursorSelOverFlags::SELOVER_ENABLEREVDIREKTION & eFlags ))
{
bGoNxt = !bGoNxt;
pCNd = bGoNxt ? rNds.GoNextSection( &rPtIdx, bSkipOverHiddenSections, bSkipOverProtectSections)
- : rNds.GoPrevSection( &rPtIdx, bSkipOverHiddenSections, bSkipOverProtectSections);
+ : rNds.GoPrevSection( &rPtIdx, bSkipOverHiddenSections, bSkipOverProtectSections);
}
int bIsValidPos = 0 != pCNd;
sal_Bool bValidNodesRange = bIsValidPos &&
- ::CheckNodesRange( rPtIdx, aIdx, sal_True );
+ ::CheckNodesRange( rPtIdx, aIdx, sal_True );
if( !bValidNodesRange )
{
rPtIdx = pSavePos->nNode;
@@ -297,15 +296,15 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
GetPoint()->nContent.Assign( pCNd, nTmpPos );
if( !bIsValidPos || !bValidNodesRange ||
// sollten wir in einer Tabelle gelandet sein?
- IsInProtectTable( sal_True ) )
- return sal_True;
+ IsInProtectTable( sal_True ) )
+ return sal_True;
}
// oder sollte eine geschuetzte Section innerhalb der Selektion liegen?
if( HasMark() && bSkipOverProtectSections)
{
sal_uLong nSttIdx = GetMark()->nNode.GetIndex(),
- nEndIdx = GetPoint()->nNode.GetIndex();
+ nEndIdx = GetPoint()->nNode.GetIndex();
if( nEndIdx <= nSttIdx )
{
sal_uLong nTmp = nSttIdx;
@@ -339,22 +338,20 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
}
}
-// Ende
-// neu: Bereiche ueberpruefen
const SwNode* pNd = &GetPoint()->nNode.GetNode();
if( pNd->IsCntntNode() && !dynamic_cast<SwUnoCrsr*>(this) )
{
const SwCntntFrm* pFrm = ((SwCntntNode*)pNd)->getLayoutFrm( pDoc->GetCurrentLayout() );
- if( pFrm && pFrm->IsValid() && 0 == pFrm->Frm().Height() &&
- 0 != ( nsSwCursorSelOverFlags::SELOVER_CHANGEPOS & eFlags ) )
+ if( pFrm && pFrm->IsValid()
+ && 0 == pFrm->Frm().Height()
+ && 0 != ( nsSwCursorSelOverFlags::SELOVER_CHANGEPOS & eFlags ) )
{
// skip to the next / prev valid paragraph with a layout
SwNodeIndex& rPtIdx = GetPoint()->nNode;
int bGoNxt = pSavePos->nNode < rPtIdx.GetIndex();
- while( 0 != ( pFrm = ( bGoNxt ? pFrm->GetNextCntntFrm()
- : pFrm->GetPrevCntntFrm() )) &&
- 0 == pFrm->Frm().Height() )
+ while( 0 != ( pFrm = ( bGoNxt ? pFrm->GetNextCntntFrm() : pFrm->GetPrevCntntFrm() ))
+ && 0 == pFrm->Frm().Height() )
;
// --> LIJIAN/FME 2007-11-27 #i72394# skip to prev /next valid paragraph
@@ -382,7 +379,7 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
xub_StrLen nTmpPos = bGoNxt ? 0 : pCNd->Len();
GetPoint()->nContent.Assign( pCNd, nTmpPos );
- // sollten wir in einer Tabelle gelandet sein?
+ // sollten wir in einer Tabelle gelandet sein?
if( IsInProtectTable( sal_True ) )
pFrm = 0;
}
@@ -416,25 +413,74 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
return sal_True; // ohne Frames geht gar nichts!
}
- const SwTableNode* pPtNd = pNd->FindTableNode();
-
- if( (pNd = &GetMark()->nNode.GetNode())->IsCntntNode() &&
- !((SwCntntNode*)pNd)->getLayoutFrm( pDoc->GetCurrentLayout() ) && !dynamic_cast<SwUnoCrsr*>(this) )
+ if( (pNd = &GetMark()->nNode.GetNode())->IsCntntNode()
+ && !((SwCntntNode*)pNd)->getLayoutFrm( pDoc->GetCurrentLayout() )
+ && !dynamic_cast<SwUnoCrsr*>(this) )
{
DeleteMark();
RestoreSavePos();
return sal_True; // ohne Frames geht gar nichts!
}
- const SwTableNode* pMrkNd = pNd->FindTableNode();
+ // assure that selection is only inside an InputField or contains the InputField completely
+ {
+ const SwTxtAttr* pInputFldTxtAttrAtPoint = NULL;
+ SwTxtNode* pTxtNdAtPoint = GetPoint()->nNode.GetNode().GetTxtNode();
+ if ( pTxtNdAtPoint != NULL )
+ {
+ pInputFldTxtAttrAtPoint =
+ pTxtNdAtPoint->GetTxtAttrAt( GetPoint()->nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTxtNode::PARENT );
+ }
+
+ const SwTxtAttr* pInputFldTxtAttrAtMark = NULL;
+ SwTxtNode* pTxtNdAtMark = GetMark()->nNode.GetNode().GetTxtNode();
+ if ( pTxtNdAtMark != NULL )
+ {
+ pInputFldTxtAttrAtMark =
+ pTxtNdAtMark->GetTxtAttrAt( GetMark()->nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTxtNode::PARENT );
+ }
+
+ if ( pInputFldTxtAttrAtPoint != pInputFldTxtAttrAtMark )
+ {
+ const sal_uLong nRefNodeIdx =
+ ( nsSwCursorSelOverFlags::SELOVER_TOGGLE & eFlags )
+ ? pSavePos->nNode
+ : GetMark()->nNode.GetIndex();
+ const xub_StrLen nRefContentIdx =
+ ( nsSwCursorSelOverFlags::SELOVER_TOGGLE & eFlags )
+ ? pSavePos->nCntnt
+ : GetMark()->nContent.GetIndex();
+ const bool bIsForwardSelection =
+ nRefNodeIdx < GetPoint()->nNode.GetIndex()
+ || ( nRefNodeIdx == GetPoint()->nNode.GetIndex()
+ && nRefContentIdx < GetPoint()->nContent.GetIndex() );
+
+ if ( pInputFldTxtAttrAtPoint != NULL )
+ {
+ const xub_StrLen nNewPointPos =
+ bIsForwardSelection ? *(pInputFldTxtAttrAtPoint->End()) : *(pInputFldTxtAttrAtPoint->GetStart());
+ GetPoint()->nContent.Assign( pTxtNdAtPoint, nNewPointPos );
+ }
+
+ if ( pInputFldTxtAttrAtMark != NULL )
+ {
+ const xub_StrLen nNewMarkPos =
+ bIsForwardSelection ? *(pInputFldTxtAttrAtMark->GetStart()) : *(pInputFldTxtAttrAtMark->End());
+ GetMark()->nContent.Assign( pTxtNdAtMark, nNewMarkPos );
+ }
+ }
+ }
+ const SwTableNode* pPtNd = pNd->FindTableNode();
+ const SwTableNode* pMrkNd = pNd->FindTableNode();
// beide in keinem oder beide im gleichen TableNode
if( ( !pMrkNd && !pPtNd ) || pPtNd == pMrkNd )
return sal_False;
// in unterschiedlichen Tabellen oder nur Mark in der Tabelle
if( ( pPtNd && pMrkNd ) || pMrkNd )
- { // dann lasse das nicht zu, alte Pos zurueck
+ {
+ // dann lasse das nicht zu, alte Pos zurueck
RestoreSavePos();
// Crsr bleibt an der alten Position
return sal_True;
@@ -446,8 +492,8 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
if( nsSwCursorSelOverFlags::SELOVER_CHANGEPOS & eFlags )
{
sal_Bool bSelTop = GetPoint()->nNode.GetIndex() <
- (( nsSwCursorSelOverFlags::SELOVER_TOGGLE & eFlags ) ? pSavePos->nNode
- : GetMark()->nNode.GetIndex());
+ (( nsSwCursorSelOverFlags::SELOVER_TOGGLE & eFlags ) ? pSavePos->nNode
+ : GetMark()->nNode.GetIndex());
do {
// in Schleife fuer Tabelle hinter Tabelle
@@ -478,7 +524,7 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
if( pMyNd->IsCntntNode() && // ist es ein ContentNode ??
::CheckNodesRange( GetMark()->nNode,
- GetPoint()->nNode, sal_True ))
+ GetPoint()->nNode, sal_True ))
{
// TABLE IN TABLE
const SwTableNode* pOuterTableNd = pMyNd->FindTableNode();
@@ -503,7 +549,8 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
RestoreSavePos();
return sal_True; // Crsr bleibt an der alten Position
}
- return sal_False; // was bleibt noch ??
+
+ return sal_False;
}
#if defined( UNX )
@@ -1850,7 +1897,7 @@ sal_Bool SwCursor::UpDown( sal_Bool bUp, sal_uInt16 nCnt,
}
pFrm->GetCrsrOfst( GetPoint(), aPt, &eTmpState );
}
- bRet = sal_True;
+ bRet = !IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
}
else
*GetPoint() = aOldPos;
@@ -1870,8 +1917,10 @@ sal_Bool SwCursor::LeftRightMargin( sal_Bool bLeft, sal_Bool bAPI )
if ( pFrm )
SetCrsrBidiLevel( pFrm->IsRightToLeft() ? 1 : 0 );
- return pFrm && (bLeft ? pFrm->LeftMargin( this ) :
- pFrm->RightMargin( this, bAPI ) );
+ SwCrsrSaveState aSave( *this );
+ return pFrm
+ && (bLeft ? pFrm->LeftMargin( this ) : pFrm->RightMargin( this, bAPI ) )
+ && !IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
}
sal_Bool SwCursor::IsAtLeftRightMargin( sal_Bool bLeft, sal_Bool bAPI ) const
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 53069c7694f4..97e3e62d464d 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -42,12 +42,13 @@
#include <viewimp.hxx>
#include <dview.hxx>
#include <rootfrm.hxx>
-#include <txtfrm.hxx> // SwTxtFrm
+#include <txtfrm.hxx>
#include <docary.hxx>
#include <extinput.hxx>
#include <ndtxt.hxx>
+#include <txtfld.hxx>
#include <scriptinfo.hxx>
-#include <mdiexp.hxx> // GetSearchDialog
+#include <mdiexp.hxx>
#ifndef _COMCORE_HRC
#include <comcore.hrc> // ResId fuer Abfrage wenn zu Search & Replaces
#endif
@@ -56,6 +57,9 @@
#include <svx/sdrpaintwindow.hxx>
#include <vcl/svapp.hxx>
#include <svx/sdr/overlay/overlayselection.hxx>
+#include <overlayrangesoutline.hxx>
+
+#include <boost/scoped_ptr.hpp>
extern void SwCalcPixStatics( OutputDevice *pOut );
@@ -510,9 +514,11 @@ void SwVisCrsr::_SetPosAndShow()
//////////////////////////////////////////////////////////////////////////////
SwSelPaintRects::SwSelPaintRects( const SwCrsrShell& rCSh )
-: SwRects( 0 ),
- pCShell( &rCSh ),
- mpCursorOverlay(0)
+ : SwRects( 0 )
+ , pCShell( &rCSh )
+ , mpCursorOverlay( 0 )
+ , mbShowTxtInputFldOverlay( true )
+ , mpTxtInputFldOverlay( NULL )
{
}
@@ -536,6 +542,14 @@ void SwSelPaintRects::swapContent(SwSelPaintRects& rSwap)
sdr::overlay::OverlayObject* pTempOverlay = getCursorOverlay();
setCursorOverlay(rSwap.getCursorOverlay());
rSwap.setCursorOverlay(pTempOverlay);
+
+ const bool bTempShowTxtInputFldOverlay = mbShowTxtInputFldOverlay;
+ mbShowTxtInputFldOverlay = rSwap.mbShowTxtInputFldOverlay;
+ rSwap.mbShowTxtInputFldOverlay = bTempShowTxtInputFldOverlay;
+
+ sw::overlay::OverlayRangesOutline* pTempTxtInputFldOverlay = mpTxtInputFldOverlay;
+ mpTxtInputFldOverlay = rSwap.mpTxtInputFldOverlay;
+ rSwap.mpTxtInputFldOverlay = pTempTxtInputFldOverlay;
}
void SwSelPaintRects::Hide()
@@ -546,6 +560,12 @@ void SwSelPaintRects::Hide()
mpCursorOverlay = 0;
}
+ if ( mpTxtInputFldOverlay != NULL )
+ {
+ delete mpTxtInputFldOverlay;
+ mpTxtInputFldOverlay = NULL;
+ }
+
SwRects::Remove( 0, Count() );
}
@@ -605,9 +625,78 @@ void SwSelPaintRects::Show()
pTargetOverlay->add(*mpCursorOverlay);
}
}
+
+ HighlightInputFld();
+ }
+}
+
+
+void SwSelPaintRects::HighlightInputFld()
+{
+ std::vector< basegfx::B2DRange > aInputFldRanges;
+
+ if ( mbShowTxtInputFldOverlay )
+ {
+ SwTxtInputFld* pCurTxtInputFldAtCrsr =
+ dynamic_cast<SwTxtInputFld*>(GetShell()->GetTxtFldAtPos( GetShell()->GetCrsr()->Start(), false ));
+ if ( pCurTxtInputFldAtCrsr != NULL )
+ {
+ SwTxtNode* pTxtNode = pCurTxtInputFldAtCrsr->GetpTxtNode();
+ ::boost::scoped_ptr<SwShellCrsr> pCrsrForInputTxtFld(
+ new SwShellCrsr( *GetShell(), SwPosition( *pTxtNode, *(pCurTxtInputFldAtCrsr->GetStart()) ) ) );
+ pCrsrForInputTxtFld->SetMark();
+ pCrsrForInputTxtFld->GetMark()->nNode = *pTxtNode;
+ pCrsrForInputTxtFld->GetMark()->nContent.Assign( pTxtNode, *(pCurTxtInputFldAtCrsr->End()) );
+
+ pCrsrForInputTxtFld->FillRects();
+
+ for( sal_uInt16 a(0); a < pCrsrForInputTxtFld->Count(); ++a )
+ {
+ const SwRect aNextRect((*pCrsrForInputTxtFld)[a]);
+ const Rectangle aPntRect(aNextRect.SVRect());
+
+ aInputFldRanges.push_back(basegfx::B2DRange(
+ aPntRect.Left(), aPntRect.Top(),
+ aPntRect.Right() + 1, aPntRect.Bottom() + 1));
+ }
+ }
+ }
+
+ if ( aInputFldRanges.size() > 0 )
+ {
+ if ( mpTxtInputFldOverlay != NULL )
+ {
+ mpTxtInputFldOverlay->setRanges( aInputFldRanges );
+ }
+ else
+ {
+ SdrView* pView = (SdrView*)GetShell()->GetDrawView();
+ SdrPaintWindow* pCandidate = pView->GetPaintWindow(0);
+ sdr::overlay::OverlayManager* pTargetOverlay = pCandidate->GetOverlayManager();
+
+ if(pTargetOverlay)
+ {
+ // use system's hilight color with decreased luminance as highlight color
+ const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
+ Color aHighlight(aSvtOptionsDrawinglayer.getHilightColor());
+ aHighlight.DecreaseLuminance( 128 );
+
+ mpTxtInputFldOverlay = new sw::overlay::OverlayRangesOutline( aHighlight, aInputFldRanges );
+ pTargetOverlay->add( *mpTxtInputFldOverlay );
+ }
+ }
+ }
+ else
+ {
+ if ( mpTxtInputFldOverlay != NULL )
+ {
+ delete mpTxtInputFldOverlay;
+ mpTxtInputFldOverlay = NULL;
+ }
}
}
+
void SwSelPaintRects::Invalidate( const SwRect& rRect )
{
sal_uInt16 nSz = Count();
@@ -675,24 +764,38 @@ void SwSelPaintRects::Get1PixelInLogic( const ViewShell& rSh,
/* */
-SwShellCrsr::SwShellCrsr( const SwCrsrShell& rCShell, const SwPosition &rPos )
- : SwCursor(rPos,0,false), SwSelPaintRects(rCShell), pPt(SwPaM::GetPoint())
+SwShellCrsr::SwShellCrsr(
+ const SwCrsrShell& rCShell,
+ const SwPosition &rPos )
+ : SwCursor(rPos,0,false)
+ , SwSelPaintRects(rCShell)
+ , pPt(SwPaM::GetPoint())
{}
-SwShellCrsr::SwShellCrsr( const SwCrsrShell& rCShell, const SwPosition &rPos,
- const Point& rPtPos, SwPaM* pRing )
- : SwCursor(rPos, pRing, false), SwSelPaintRects(rCShell), aMkPt(rPtPos),
- aPtPt(rPtPos), pPt(SwPaM::GetPoint())
+SwShellCrsr::SwShellCrsr(
+ const SwCrsrShell& rCShell,
+ const SwPosition &rPos,
+ const Point& rPtPos,
+ SwPaM* pRing )
+ : SwCursor(rPos, pRing, false)
+ , SwSelPaintRects(rCShell)
+ , aMkPt(rPtPos)
+ , aPtPt(rPtPos)
+ , pPt(SwPaM::GetPoint())
{}
SwShellCrsr::SwShellCrsr( SwShellCrsr& rICrsr )
- : SwCursor(rICrsr), SwSelPaintRects(*rICrsr.GetShell()),
- aMkPt(rICrsr.GetMkPos()), aPtPt(rICrsr.GetPtPos()), pPt(SwPaM::GetPoint())
+ : SwCursor(rICrsr)
+ , SwSelPaintRects(*rICrsr.GetShell())
+ , aMkPt(rICrsr.GetMkPos())
+ , aPtPt(rICrsr.GetPtPos())
+ , pPt(SwPaM::GetPoint())
{}
-SwShellCrsr::~SwShellCrsr() {}
+SwShellCrsr::~SwShellCrsr()
+{}
bool SwShellCrsr::IsReadOnlyAvailable() const
@@ -717,7 +820,7 @@ void SwShellCrsr::FillRects()
GetPoint()->nNode.GetNode().GetCntntNode()->getLayoutFrm( GetShell()->GetLayout() ) &&
(GetMark()->nNode == GetPoint()->nNode ||
(GetMark()->nNode.GetNode().IsCntntNode() &&
- GetMark()->nNode.GetNode().GetCntntNode()->getLayoutFrm( GetShell()->GetLayout() ) ) ))
+ GetMark()->nNode.GetNode().GetCntntNode()->getLayoutFrm( GetShell()->GetLayout() ) ) ))
GetShell()->GetLayout()->CalcFrmRects( *this, GetShell()->IsTableMode() ); //swmod 071107//swmod 071225
}
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 2906a6b42c26..7743f4aed000 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -170,7 +170,7 @@ map<sal_uInt16,String,CompareUShort> & GetItemWhichMap()
aItemWhichMap[RES_TXTATR_REFMARK] = String("TXTATR_REFMARK", RTL_TEXTENCODING_ASCII_US);
aItemWhichMap[RES_TXTATR_TOXMARK] = String("TXTATR_TOXMARK", RTL_TEXTENCODING_ASCII_US);
aItemWhichMap[RES_TXTATR_CHARFMT] = String("TXTATR_CHARFMT", RTL_TEXTENCODING_ASCII_US);
- aItemWhichMap[RES_TXTATR_DUMMY5] = String("TXTATR_DUMMY5", RTL_TEXTENCODING_ASCII_US);
+ aItemWhichMap[RES_TXTATR_INPUTFIELD] = String("TXTATR_INPUTFIELD", RTL_TEXTENCODING_ASCII_US);
aItemWhichMap[RES_TXTATR_CJK_RUBY] = String("TXTATR_CJK_RUBY", RTL_TEXTENCODING_ASCII_US);
aItemWhichMap[RES_TXTATR_UNKNOWN_CONTAINER] = String("TXTATR_UNKNOWN_CONTAINER", RTL_TEXTENCODING_ASCII_US);
aItemWhichMap[RES_TXTATR_META] = String("TXTATR_META", RTL_TEXTENCODING_ASCII_US);
@@ -320,7 +320,7 @@ const String lcl_dbg_out(const SwTxtAttr & rAttr)
aStr += String::CreateFromInt32(*rAttr.GetStart());
aStr += String("->", RTL_TEXTENCODING_ASCII_US);
- aStr += String::CreateFromInt32(*rAttr.GetEnd());
+ aStr += String::CreateFromInt32(*rAttr.End());
aStr += String(" ", RTL_TEXTENCODING_ASCII_US);
aStr += lcl_dbg_out(rAttr.GetAttr());
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 04ad4e595720..aefd4a07c723 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -260,9 +260,8 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
if (pOutlineRule)
{
pOutlineRule->Validate();
- // --> OD 2005-10-21 - counting of phantoms depends on <IsOldNumbering()>
+ // counting of phantoms depends on <IsOldNumbering()>
pOutlineRule->SetCountPhantoms( !mbOldNumbering );
- // <--
}
}
break;
@@ -304,30 +303,31 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
mbDoNotCaptureDrawObjsOnPage = value;
break;
- // --> OD 2006-08-25 #i68949#
case CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME:
mbClipAsCharacterAnchoredWriterFlyFrames = value;
break;
- // <--
+
case UNIX_FORCE_ZERO_EXT_LEADING:
mbUnixForceZeroExtLeading = value;
break;
+
case PROTECT_FORM:
- mbProtectForm = value;
- break;
+ mbProtectForm = value;
+ break;
case USE_OLD_PRINTER_METRICS:
mbOldPrinterMetrics = value;
break;
+
case TABS_RELATIVE_TO_INDENT:
mbTabRelativeToIndent = value;
break;
- // --> OD 2008-06-05 #i89181#
+
case TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST:
mbTabAtLeftIndentForParagraphsInList = value;
break;
- // <--
- // COMPATIBILITY FLAGS END
+
+ // COMPATIBILITY FLAGS END
case BROWSE_MODE: //can be used temporary (load/save) when no ViewShell is avaiable
mbLastBrowseMode = value;
@@ -2707,24 +2707,21 @@ String SwDoc::GetPaMDescr(const SwPaM & rPam) const
return aResult;
}
-// -> #111840#
-SwField * SwDoc::GetField(const SwPosition & rPos)
+SwField * SwDoc::GetFieldAtPos(const SwPosition & rPos)
{
- SwTxtFld * const pAttr = GetTxtFld(rPos);
+ SwTxtFld * const pAttr = GetTxtFldAtPos(rPos);
return (pAttr) ? const_cast<SwField *>( pAttr->GetFmtFld().GetField() ) : 0;
}
-SwTxtFld * SwDoc::GetTxtFld(const SwPosition & rPos)
+SwTxtFld * SwDoc::GetTxtFldAtPos(const SwPosition & rPos)
{
SwTxtNode * const pNode = rPos.nNode.GetNode().GetTxtNode();
- return (pNode)
- ? static_cast<SwTxtFld*>( pNode->GetTxtAttrForCharAt(
- rPos.nContent.GetIndex(), RES_TXTATR_FIELD) )
+ return (pNode != NULL)
+ ? pNode->GetFldTxtAttrAt( rPos.nContent.GetIndex(), true )
: 0;
}
-// <- #111840#
bool SwDoc::ContainsHiddenChars() const
{
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 5923143cb1e1..11ba2b1db128 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -1501,7 +1501,7 @@ lcl_CalcBreaks( ::std::vector<xub_StrLen> & rBreaks, SwPaM const & rPam )
if ((CH_TXTATR_INWORD == c) || (CH_TXTATR_BREAKWORD == c))
{
SwTxtAttr const * const pAttr( pTxtNode->GetTxtAttrForCharAt(i) );
- if (pAttr && pAttr->GetEnd() && (*pAttr->GetEnd() > nEnd))
+ if (pAttr && pAttr->End() && (*pAttr->End() > nEnd))
{
ASSERT(pAttr->HasDummyChar(), "GetTxtAttrForCharAt broken?");
rBreaks.push_back(i);
@@ -1686,7 +1686,7 @@ bool SwDoc::DeleteRangeImplImpl(SwPaM & rPam)
break;
if( nMkCntPos == *pAttr->GetStart() &&
- 0 != (pEndIdx = pAttr->GetEnd()) &&
+ 0 != (pEndIdx = pAttr->End()) &&
*pEndIdx == *pAttr->GetStart() )
pTxtNd->DestroyAttr( pHts->Cut( n ) );
}
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index be10fcefe9a7..f6e2ede98500 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -751,8 +751,10 @@ void SwDoc::SetNewFldLst(bool bFlag)
// der StartIndex kann optional mit angegeben werden (z.B. wenn dieser
// zuvor schon mal erfragt wurde - ist sonst eine virtuelle Methode !!)
-_SetGetExpFld::_SetGetExpFld( const SwNodeIndex& rNdIdx, const SwTxtFld* pFld,
- const SwIndex* pIdx )
+_SetGetExpFld::_SetGetExpFld(
+ const SwNodeIndex& rNdIdx,
+ const SwTxtFld* pFld,
+ const SwIndex* pIdx )
{
eSetGetExpFldType = TEXTFIELD;
CNTNT.pTxtFld = pFld;
@@ -902,6 +904,15 @@ void _SetGetExpFld::SetBodyPos( const SwCntntFrm& rFrm )
}
}
+sal_Bool _SetGetExpFld::operator==( const _SetGetExpFld& rFld ) const
+{
+ return nNode == rFld.nNode
+ && nCntnt == rFld.nCntnt
+ && ( !CNTNT.pTxtFld
+ || !rFld.CNTNT.pTxtFld
+ || CNTNT.pTxtFld == rFld.CNTNT.pTxtFld );
+}
+
sal_Bool _SetGetExpFld::operator<( const _SetGetExpFld& rFld ) const
{
if( nNode < rFld.nNode || ( nNode == rFld.nNode && nCntnt < rFld.nCntnt ))
@@ -2712,17 +2723,12 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
SwPosition aPosition( pDstTxtFld->GetTxtNode() );
aPosition.nContent = *pDstTxtFld->GetStart();
- SwUndo *const pUndo( new SwUndoFieldFromDoc(
- aPosition, *pDstFld, rSrcFld, pMsgHnt, bUpdateFlds) );
+ SwUndo *const pUndo( new SwUndoFieldFromDoc( aPosition, *pDstFld, rSrcFld, pMsgHnt, bUpdateFlds) );
GetIDocumentUndoRedo().AppendUndo(pUndo);
}
- // Das gefundene Feld wird angepasst ...
- //pDstFld->ChangeFormat( rSrcFld.GetFormat() );
- //pDstFld->SetLanguage( rSrcFld.GetLanguage() );
-
SwField * pNewFld = rSrcFld.CopyField();
- pDstFmtFld->SetFld(pNewFld);
+ pDstFmtFld->SetField(pNewFld);
switch( nFldWhich )
{
@@ -2798,7 +2804,7 @@ bool SwDoc::PutValueToField(const SwPosition & rPos,
const Any& rVal, sal_uInt16 nWhich)
{
Any aOldVal;
- SwField * pField = GetField(rPos);
+ SwField * pField = GetFieldAtPos(rPos);
if (GetIDocumentUndoRedo().DoesUndo() &&
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index f674ab056c81..6b0bad3f4e42 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -183,14 +183,14 @@ sal_Bool lcl_RstTxtAttr( const SwNodePtr& rpNd, void* pArgs )
// fuers Undo alle Attribute sichern
SwRegHistory aRHst( *pTxtNode, pPara->pHistory );
pTxtNode->GetpSwpHints()->Register( &aRHst );
- pTxtNode->RstAttr( aSt, nEnd - aSt.GetIndex(), pPara->nWhich,
- pPara->pDelSet, pPara->bInclRefToxMark );
+ pTxtNode->RstTxtAttr( aSt, nEnd - aSt.GetIndex(), pPara->nWhich,
+ pPara->pDelSet, pPara->bInclRefToxMark );
if( pTxtNode->GetpSwpHints() )
pTxtNode->GetpSwpHints()->DeRegister();
}
else
- pTxtNode->RstAttr( aSt, nEnd - aSt.GetIndex(), pPara->nWhich,
- pPara->pDelSet, pPara->bInclRefToxMark );
+ pTxtNode->RstTxtAttr( aSt, nEnd - aSt.GetIndex(), pPara->nWhich,
+ pPara->pDelSet, pPara->bInclRefToxMark );
}
return sal_True;
}
@@ -399,7 +399,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
if (pURLAttr && pURLAttr->GetINetFmt().GetValue().Len())
{
nMkPos = *pURLAttr->GetStart();
- nPtPos = *pURLAttr->GetEnd();
+ nPtPos = *pURLAttr->End();
}
else
{
@@ -549,11 +549,15 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
// Einfuegen der Hints nach Inhaltsformen;
// wird in SwDoc::Insert(..., SwFmtHint &rHt) benutzt
-static bool
-lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
-//Modify here for #119405, by easyfan, 2012-05-24
- const SetAttrMode nFlags, SwUndoAttr *const pUndo,bool bExpandCharToPara=false)
-//End of modification, by easyfan
+static bool lcl_InsAttr(
+ SwDoc *const pDoc,
+ const SwPaM &rRg,
+ const SfxItemSet& rChgSet,
+ const SetAttrMode nFlags,
+ SwUndoAttr *const pUndo,
+ //Modify here for #119405, by easyfan, 2012-05-24
+ const bool bExpandCharToPara=false)
+ //End of modification, by easyfan
{
// teil die Sets auf (fuer Selektion in Nodes)
const SfxItemSet* pCharSet = 0;
@@ -609,9 +613,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
SfxItemSet* pTmpOtherItemSet = new SfxItemSet( pDoc->GetAttrPool(),
RES_PARATR_BEGIN, RES_PARATR_END-1,
- // --> OD 2008-02-25 #refactorlists#
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
- // <--
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_GRFATR_BEGIN, RES_GRFATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
@@ -639,7 +641,6 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
SwTxtNode * pTxtNd = pNode->GetTxtNode();
SwNumRule * pNumRule = pTxtNd->GetNumRule();
- // --> OD 2005-10-24 #126346# - make code robust:
if ( !pNumRule )
{
ASSERT( false,
@@ -647,7 +648,6 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
DELETECHARSETS
return false;
}
- // <--
SwNumFmt aNumFmt = pNumRule->Get(static_cast<sal_uInt16>(pTxtNd->GetActualListLevel()));
SwCharFmt * pCharFmt =
@@ -665,7 +665,6 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
DELETECHARSETS
return true;
}
- // <- #i27615#
const SwIndex& rSt = pStt->nContent;
@@ -708,6 +707,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
RES_TXTATR_REFMARK, RES_TXTATR_TOXMARK,
RES_TXTATR_META, RES_TXTATR_METAFIELD,
RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY,
+ RES_TXTATR_INPUTFIELD, RES_TXTATR_INPUTFIELD,
0 );
aTxtSet.Put( rChgSet );
@@ -860,7 +860,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
if (pURLAttr && pURLAttr->GetINetFmt().GetValue().Len())
{
nMkPos = *pURLAttr->GetStart();
- nPtPos = *pURLAttr->GetEnd();
+ nPtPos = *pURLAttr->End();
}
else
{
@@ -894,12 +894,12 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
// fuers Undo alle Attribute sichern
SwRegHistory aRHst( *pTxtNd, pHistory );
pTxtNd->GetpSwpHints()->Register( &aRHst );
- pTxtNd->RstAttr( aSt, nPtPos, 0, pCharSet );
+ pTxtNd->RstTxtAttr( aSt, nPtPos, 0, pCharSet );
if( pTxtNd->GetpSwpHints() )
pTxtNd->GetpSwpHints()->DeRegister();
}
else
- pTxtNd->RstAttr( aSt, nPtPos, 0, pCharSet );
+ pTxtNd->RstTxtAttr( aSt, nPtPos, 0, pCharSet );
}
// the SwRegHistory inserts the attribute into the TxtNode!
@@ -981,7 +981,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
if (pCurrentNd)
{
- pCurrentNd->TryCharSetExpandToNum(*pCharSet);
+ pCurrentNd->TryCharSetExpandToNum(*pCharSet);
}
}
@@ -1089,7 +1089,6 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
++nNodes;
}
- //Modify here for #119405, by easyfan, 2012-05-24
//The data parameter flag: bExpandCharToPara, comes from the data member of SwDoc,
//Which is set in SW MS word Binary filter WW8ImplRreader. With this flag on, means that
//current setting attribute set is a character range properties set and comes from a MS word
@@ -1111,23 +1110,22 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
if (pCurrentNd)
{
- pCurrentNd->TryCharSetExpandToNum(*pCharSet);
+ pCurrentNd->TryCharSetExpandToNum(*pCharSet);
}
}
}
- //End of modification, by easyfan
DELETECHARSETS
return (nNodes != 0) || bRet;
}
-//Modify here for #119405, by chengjh, 2012-08-16
-//Add a para for the char attribute exp...
-bool SwDoc::InsertPoolItem( const SwPaM &rRg, const SfxPoolItem &rHt,
- const SetAttrMode nFlags, bool bExpandCharToPara)
-//End
+bool SwDoc::InsertPoolItem(
+ const SwPaM &rRg,
+ const SfxPoolItem &rHt,
+ const SetAttrMode nFlags,
+ const bool bExpandCharToPara)
{
SwDataChanged aTmp( rRg, 0 );
SwUndoAttr* pUndoAttr = 0;
@@ -1139,9 +1137,7 @@ bool SwDoc::InsertPoolItem( const SwPaM &rRg, const SfxPoolItem &rHt,
SfxItemSet aSet( GetAttrPool(), rHt.Which(), rHt.Which() );
aSet.Put( rHt );
- //Modify here for #119405, by easyfan, 2012-05-24
- bool bRet = lcl_InsAttr( this, rRg, aSet, nFlags, pUndoAttr,bExpandCharToPara );
- //End of modification, by easyfan
+ const bool bRet = lcl_InsAttr( this, rRg, aSet, nFlags, pUndoAttr,bExpandCharToPara );
if (GetIDocumentUndoRedo().DoesUndo())
{
@@ -1149,7 +1145,9 @@ bool SwDoc::InsertPoolItem( const SwPaM &rRg, const SfxPoolItem &rHt,
}
if( bRet )
+ {
SetModified();
+ }
return bRet;
}
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 1363bd83534c..dcfb772cdd21 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1417,8 +1417,8 @@ lcl_InsertLabel(SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
pNewSet->Put( SwFmtSurround( SURROUND_NONE ) );
pNewSet->Put( SvxOpaqueItem( RES_OPAQUE, sal_True ) );
- pNewSet->Put( SwFmtVertOrient( text::VertOrientation::TOP ) );
- pNewSet->Put( SwFmtHoriOrient( text::HoriOrientation::CENTER ) );
+ pNewSet->Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ) );
+ pNewSet->Put( SwFmtHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::FRAME ) );
aFrmSize = pOldFmt->GetFrmSize();
aFrmSize.SetWidthPercent( 100 );
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index f5229baa2c6a..29d95c8b209f 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1011,7 +1011,6 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
}
}
- // --> OD 2008-03-17 #refactorlists#
if ( bSetItem )
{
if ( bCreateNewList )
@@ -1030,22 +1029,18 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
"<SwDoc::SetNumRule(..)> - could not create new list. Serious defect -> please inform OD." );
sListId = pNewList->GetListId();
}
- InsertPoolItem( rPam,
- SfxStringItem( RES_PARATR_LIST_ID, sListId ), 0 );
+ InsertPoolItem( rPam, SfxStringItem( RES_PARATR_LIST_ID, sListId ), 0 );
}
else if ( sContinuedListId.Len() > 0 )
{
// apply given list id
- InsertPoolItem( rPam,
- SfxStringItem( RES_PARATR_LIST_ID, sContinuedListId ), 0 );
+ InsertPoolItem( rPam, SfxStringItem( RES_PARATR_LIST_ID, sContinuedListId ), 0 );
}
}
- // <--
if ( ! rPam.HasMark())
{
SwTxtNode * pTxtNd = rPam.GetPoint()->nNode.GetNode().GetTxtNode();
- // --> OD 2006-10-19 #134160#
// consider case that the PaM doesn't denote a text node - e.g. it denotes a graphic node
if ( pTxtNd )
{
@@ -1054,15 +1049,13 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
if (pRule && pRule->GetName() == pNew->GetName())
{
bSetItem = sal_False;
- // --> OD 2008-06-02 #refactorlists#
if ( !pTxtNd->IsInList() )
{
pTxtNd->AddToList();
}
- // <--
}
- // --> OD 2005-10-26 #b6340308# - only clear numbering attribute at
- // text node, if at paragraph style the new numbering rule is found.
+ // only clear numbering attribute at text node,
+ // if at paragraph style the new numbering rule is found.
else if ( !pRule )
{
SwTxtFmtColl* pColl = pTxtNd->GetTxtColl();
@@ -1076,25 +1069,19 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
}
}
}
- // <--
}
- // <--
}
- // --> OD 2009-08-18 #i103817#
if ( bSetItem )
- // <--
{
InsertPoolItem( rPam, SwNumRuleItem( pNew->GetName() ), 0 );
}
- // --> OD 2008-02-08 #newlistlevelattrs#
if ( bResetIndentAttrs &&
pNew && pNew->Get( 0 ).GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
SvUShortsSort aResetAttrsArray;
aResetAttrsArray.Insert( RES_LR_SPACE );
- // --> OD 2010-10-05 #i114929#
// On a selection setup a corresponding Point-and-Mark in order to get
// the indentation attribute reset on all paragraphs touched by the selection
if ( rPam.HasMark() &&
@@ -1110,9 +1097,7 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
{
ResetAttrs( rPam, sal_False, &aResetAttrsArray );
}
- // <--
}
- // <--
if (GetIDocumentUndoRedo().DoesUndo())
{
@@ -1128,7 +1113,6 @@ void SwDoc::SetCounted(const SwPaM & rPam, bool bCounted)
{
SvUShortsSort aResetAttrsArray;
aResetAttrsArray.Insert( RES_PARATR_LIST_ISCOUNTED );
- // --> OD 2010-10-05 #i114929#
// On a selection setup a corresponding Point-and-Mark in order to get
// the list-is-counted attribute reset on all paragraphs touched by the selection
if ( rPam.HasMark() &&
@@ -1144,12 +1128,10 @@ void SwDoc::SetCounted(const SwPaM & rPam, bool bCounted)
{
ResetAttrs( rPam, sal_False, &aResetAttrsArray );
}
- // <--
}
else
{
- InsertPoolItem( rPam,
- SfxBoolItem( RES_PARATR_LIST_ISCOUNTED, sal_False ), 0 );
+ InsertPoolItem( rPam, SfxBoolItem( RES_PARATR_LIST_ISCOUNTED, sal_False ), 0 );
}
}
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 5a8501f3df4c..4407d4825283 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -2979,8 +2979,8 @@ void SwRedlineExtraData_Format::Reject( SwPaM& rPam ) const
// eigentlich muesste hier das Attribut zurueck gesetzt werden!!!
for( sal_uInt16 n = 0, nEnd = aWhichIds.Count(); n < nEnd; ++n )
{
- pDoc->InsertPoolItem( rPam, *GetDfltAttr( aWhichIds[ n ] ),
- nsSetAttrMode::SETATTR_DONTEXPAND );
+ pDoc->InsertPoolItem(
+ rPam, *GetDfltAttr( aWhichIds[ n ] ), nsSetAttrMode::SETATTR_DONTEXPAND );
}
pDoc->SetRedlineMode_intern( eOld );
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index d5417f5897e7..77430d8737e8 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -173,8 +173,8 @@ sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
InsertString( aPam, pEntry->GetText() );
aPam.SetMark();
aPam.GetMark()->nContent -= pEntry->GetText().Len();
- InsertPoolItem( aPam, pEntry->GetRubyAttr(),
- nsSetAttrMode::SETATTR_DONTEXPAND );
+ InsertPoolItem(
+ aPam, pEntry->GetRubyAttr(), nsSetAttrMode::SETATTR_DONTEXPAND );
}
else
break;
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 12f98950ef21..6986430c1e3f 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -155,7 +155,7 @@ sal_uInt16 SwDoc::GetCurTOXMark( const SwPosition& rPos,
if( ( nSttIdx = *pHt->GetStart() ) < nAktPos )
{
// pruefe Ende mit ab
- if( 0 == ( pEndIdx = pHt->GetEnd() ) ||
+ if( 0 == ( pEndIdx = pHt->End() ) ||
*pEndIdx <= nAktPos )
continue; // weiter suchen
}
@@ -260,7 +260,7 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
const SwTOXMark* pTOXMark;
const SwCntntFrm* pCFrm;
Point aPt;
- for( sal_Int32 nMark=0; nMark<aMarks.Count(); nMark++ )
+ for( sal_uInt16 nMark=0; nMark<aMarks.Count(); nMark++ )
{
pTOXMark = aMarks[nMark];
if( pTOXMark != &rCurTOXMark &&
@@ -2105,7 +2105,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
for(sal_uInt16 nHintIdx = 0; nHintIdx < pHints->GetStartCount(); nHintIdx++)
{
SwTxtAttr* pAttr = pHints->GetStart(nHintIdx);
- xub_StrLen nTmpEnd = pAttr->GetEnd() ? *pAttr->GetEnd() : 0;
+ const xub_StrLen nTmpEnd = pAttr->End() ? *pAttr->End() : 0;
if( nStartPos >= *pAttr->GetStart() &&
(nStartPos + 2) <= nTmpEnd &&
pAttr->Which() == RES_TXTATR_CHARFMT)
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index 4536a56c47d2..ee7030f20caa 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -1029,7 +1029,11 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
// loesche die Frames
aFndBox.SetTableLines( *this );
- aFndBox.DelFrms( *this );
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Not dispose accessible table
+ //aFndBox.DelFrms( *this );
+ aFndBox.DelFrms( *this,sal_False );
+ //-----IAccessibility2 Implementation 2009
if( 1 == rCpyTbl.GetTabSortBoxes().Count() )
{
diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx
index 99eb3e3d2b79..65314c6f3228 100644
--- a/sw/source/core/doc/visiturl.cxx
+++ b/sw/source/core/doc/visiturl.cxx
@@ -86,7 +86,7 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint )
const_cast<SwTxtINetFmt*>(pTxtAttr)->SetVisitedValid( false );
const SwTxtAttr* pAttr = pTxtAttr;
SwUpdateAttr aUpdateAttr( *pAttr->GetStart(),
- *pAttr->GetEnd(),
+ *pAttr->End(),
RES_FMT_CHG );
((SwTxtNode*)pTxtNd)->ModifyNotification( &aUpdateAttr, &aUpdateAttr );
}
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index a0bcd7e9874a..7b49226de30b 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1039,7 +1039,9 @@ SwCntntNode::~SwCntntNode()
// der Abhaengikeitsliste raus!
// Daher muessen alle Frames in der Abhaengigkeitsliste geloescht werden.
if( GetDepends() )
- DelFrms();
+ //IAccessibility2 Implementation 2009-----
+ DelFrms(sal_True, sal_False);
+ //-----IAccessibility2 Implementation 2009
if( pCondColl )
delete pCondColl;
@@ -1366,12 +1368,82 @@ void SwCntntNode::MakeFrms( SwCntntNode& rNode )
*/
-void SwCntntNode::DelFrms()
+//IAccessibility2 Implementation 2009-----
+//Solution:Add a input param to identify if the acc table should be disposed.
+//add a flag(bNeedDel) to indicate whether to del corresponding frm even in doc loading process,
+//void SwCntntNode::DelFrms()
+void SwCntntNode::DelFrms( sal_Bool bNeedDel, sal_Bool bIsDisposeAccTable )
+//-----IAccessibility2 Implementation 2009
{
if( !GetDepends() )
return;
- SwCntntFrm::DelFrms(*this);
+ SwClientIter aIter( *this );
+
+ for(SwClient* pCandidate = aIter.SwClientIter_First(); pCandidate; pCandidate = aIter.SwClientIter_Next() )
+ {
+ SwCntntFrm* pFrm = dynamic_cast< SwCntntFrm* >(pCandidate);
+
+ if(!pFrm)
+ {
+ continue;
+ }
+
+ // --> OD 2005-12-01 #i27138#
+ // notify accessibility paragraphs objects about changed
+ // CONTENT_FLOWS_FROM/_TO relation.
+ // Relation CONTENT_FLOWS_FROM for current next paragraph will change
+ // and relation CONTENT_FLOWS_TO for current previous paragraph will change.
+ if ( pFrm->IsTxtFrm() )
+ {
+ ViewShell* pViewShell( pFrm->getRootFrm()->GetCurrShell() );
+ if ( pViewShell && pViewShell->GetLayout() &&
+ pViewShell->GetLayout()->IsAnyShellAccessible() )
+ {
+ pViewShell->InvalidateAccessibleParaFlowRelation(
+ dynamic_cast<SwTxtFrm*>(pFrm->FindNextCnt( true )),
+ dynamic_cast<SwTxtFrm*>(pFrm->FindPrevCnt( true )) );
+ }
+ }
+ // <--
+ if( pFrm->HasFollow() )
+ pFrm->GetFollow()->_SetIsFollow( pFrm->IsFollow() );
+ if( pFrm->IsFollow() )
+ {
+ SwCntntFrm* pMaster = (SwTxtFrm*)pFrm->FindMaster();
+ pMaster->SetFollow( pFrm->GetFollow() );
+ pFrm->_SetIsFollow( sal_False );
+ }
+ pFrm->SetFollow( 0 );//Damit er nicht auf dumme Gedanken kommt.
+ //Andernfalls kann es sein, dass ein Follow
+ //vor seinem Master zerstoert wird, der Master
+ //greift dann ueber den ungueltigen
+ //Follow-Pointer auf fremdes Memory zu.
+ //Die Kette darf hier zerknauscht werden, weil
+ //sowieso alle zerstoert werden.
+ if( pFrm->GetUpper() && pFrm->IsInFtn() && !pFrm->GetIndNext() &&
+ !pFrm->GetIndPrev() )
+ {
+ SwFtnFrm *pFtn = pFrm->FindFtnFrm();
+ ASSERT( pFtn, "You promised a FtnFrm?" );
+ SwCntntFrm* pCFrm;
+ if( !pFtn->GetFollow() && !pFtn->GetMaster() &&
+ 0 != ( pCFrm = pFtn->GetRefFromAttr()) && pCFrm->IsFollow() )
+ {
+ ASSERT( pCFrm->IsTxtFrm(), "NoTxtFrm has Footnote?" );
+ ((SwTxtFrm*)pCFrm->FindMaster())->Prepare( PREP_FTN_GONE );
+ }
+ }
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Set acc table dispose state
+ pFrm->SetAccTableDispose( bIsDisposeAccTable );
+ //End Added
+ pFrm->Cut();
+ //Solution:Set acc table dispose state to default value
+ pFrm->SetAccTableDispose( sal_True );
+ //-----IAccessibility2 Implementation 2009
+ delete pFrm;
+ }
if( IsTxtNode() )
{
((SwTxtNode*)this)->SetWrong( NULL );
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 70019e459b48..f0905dc02f84 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -180,10 +180,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
if ( rNd.IsTxtNode() )
{
SwTxtNode* pTxtNode = rNd.GetTxtNode();
- // --> OD 2008-03-13 #refactorlists#
-// pTxtNode->UnregisterNumber();
pTxtNode->RemoveFromList();
- // <--
//if ( pTxtNode->GetTxtColl()->GetOutlineLevel() != NO_NUMBERING )//#outline level,zhaojianwei
if ( pTxtNode->GetAttrOutlineLevel() != 0 )//<-end,zhaojianwei
@@ -199,10 +196,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
if( rNd.IsTxtNode() )
{
SwTxtNode& rTxtNd = (SwTxtNode&)rNd;
- // --> OD 2008-03-13 #refactorlists#
-// rTxtNd.SyncNumberAndNumRule();
rTxtNd.AddToList();
- // <--
if( bInsOutlineIdx &&
//NO_NUMBERING != rTxtNd.GetTxtColl()->GetOutlineLevel() )//#outline level,zhaojianwei
@@ -273,10 +267,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
// Numerierungen auch aktualisiert werden.
pTxtNd->InvalidateNumRule();
- // --> OD 2008-03-13 #refactorlists#
-// pTxtNd->UnregisterNumber();
pTxtNd->RemoveFromList();
- // <--
}
RemoveNode( rDelPos.GetIndex(), 1, sal_False ); // Indizies verschieben !!
@@ -298,10 +289,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
rNds.pOutlineNds->Insert( pTxtNd );
}
- // --> OD 2008-03-13 #refactorlists#
-// pTxtNd->SyncNumberAndNumRule();
pTxtNd->AddToList();
- // <--
// Sonderbehandlung fuer die Felder!
if( pHts && pHts->Count() )
@@ -316,9 +304,9 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
switch ( pAttr->Which() )
{
case RES_TXTATR_FIELD:
+ case RES_TXTATR_INPUTFIELD:
{
- SwTxtFld* pTxtFld =
- static_cast<SwTxtFld*>(pAttr);
+ SwTxtFld* pTxtFld = static_cast<SwTxtFld*>(pAttr);
rNds.GetDoc()->InsDelFldInFldLst( !bToUndo, *pTxtFld );
const SwFieldType* pTyp = pTxtFld->GetFmtFld().GetField()->GetTyp();
@@ -909,6 +897,17 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
break;
case ND_TEXTNODE:
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Add special function to text node.
+ {
+ if( bNewFrms && pAktNode->GetCntntNode() )
+ ((SwCntntNode*)pAktNode)->DelFrms( sal_False );
+ pAktNode->pStartOfSection = aSttNdStack[ nLevel ];
+ nInsPos++;
+ aRg.aEnd--;
+ }
+ break;
+ //-----IAccessibility2 Implementation 2009
case ND_GRFNODE:
case ND_OLENODE:
{
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index 4983cc04e431..8a51c96d779f 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -1079,7 +1079,7 @@ void SwDrawView::ReplaceMarkedDrawVirtObjs( SdrMarkView& _rMarkView )
{
SdrObject* pRefObj = &(static_cast<SwDrawVirtObj*>(pMarkObj)->ReferencedObj());
- if ( !_rMarkView.IsObjMarked( *pRefObj ) )
+ if ( !_rMarkView.isSdrObjectSelected( *pRefObj ) )
{
_rMarkView.MarkObj( *pRefObj );
}
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index a3fc31f1f51c..399880615a0b 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -518,7 +518,7 @@ void SwDontExpandItem::RestoreDontExpandItems( const SwPosition& rPos )
if( nAttrStart > nStart ) // ueber den Bereich hinaus
break;
- if( 0 != ( pAttrEnd = pHt->GetEnd() ) &&
+ if( 0 != ( pAttrEnd = pHt->End() ) &&
( ( nAttrStart < nStart &&
( pHt->DontExpand() ? nStart < *pAttrEnd
: nStart <= *pAttrEnd )) ||
diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx
index 58aaa0dae3d3..f6ab9dafffc0 100644
--- a/sw/source/core/edit/edatmisc.cxx
+++ b/sw/source/core/edit/edatmisc.cxx
@@ -127,7 +127,7 @@ const SfxPoolItem& SwEditShell::GetDefault( sal_uInt16 nFmtHint ) const
}
-void SwEditShell::SetAttr( const SfxPoolItem& rHint, sal_uInt16 nFlags )
+void SwEditShell::SetAttrItem( const SfxPoolItem& rHint, sal_uInt16 nFlags )
{
SET_CURR_SHELL( this );
StartAllAction();
@@ -157,7 +157,7 @@ void SwEditShell::SetAttr( const SfxPoolItem& rHint, sal_uInt16 nFlags )
}
-void SwEditShell::SetAttr( const SfxItemSet& rSet, sal_uInt16 nFlags )
+void SwEditShell::SetAttrSet( const SfxItemSet& rSet, sal_uInt16 nFlags )
{
SET_CURR_SHELL( this );
StartAllAction();
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 55c093d22a04..37bd0ab3d03c 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -242,9 +242,8 @@ bool SwEditShell::SetCurFtn( const SwFmtFtn& rFillFtn )
SwPaM* pCrsr = GetCrsr(), *pFirst = pCrsr;
do {
- bChgd |= pDoc->SetCurFtn( *pCrsr, rFillFtn.GetNumStr(),
- rFillFtn.GetNumber(),
- rFillFtn.IsEndNote() );
+ bChgd |=
+ pDoc->SetCurFtn( *pCrsr, rFillFtn.GetNumStr(), rFillFtn.GetNumber(), rFillFtn.IsEndNote() );
} while( pFirst != ( pCrsr = (SwPaM*)pCrsr->GetNext() ));
@@ -423,7 +422,6 @@ sal_Bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
{
bRet = sal_False;
- // --> OD 2008-03-19 #refactorlists#
if ( rTNd.IsInList() )
{
ASSERT( rTNd.GetNumRule(),
@@ -435,19 +433,19 @@ sal_Bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
//other place in dev env...
if ( pNumRule )
{
- //End
- const SwNumFmt &rNumFmt = pNumRule->Get( static_cast<sal_uInt16>(rTNd.GetActualListLevel()) );
- if( SVX_NUM_BITMAP != rNumFmt.GetNumberingType() )
- {
- if ( SVX_NUM_CHAR_SPECIAL == rNumFmt.GetNumberingType() )
- sExp = rNumFmt.GetBulletChar();
- else
- sExp = rTNd.GetNumString();
+ //End
+ const SwNumFmt &rNumFmt = pNumRule->Get( static_cast<sal_uInt16>(rTNd.GetActualListLevel()) );
+ if( SVX_NUM_BITMAP != rNumFmt.GetNumberingType() )
+ {
+ if ( SVX_NUM_CHAR_SPECIAL == rNumFmt.GetNumberingType() )
+ sExp = rNumFmt.GetBulletChar();
+ else
+ sExp = rTNd.GetNumString();
}
- //Modified for i119959,2012.6.12
- //Under this scenario,this pointer is null,but on win,it doesn't crash immediately
- //it exits with exception,and associated memory will have problem which leads to crash problem in
- //other place in dev env...
+ //Modified for i119959,2012.6.12
+ //Under this scenario,this pointer is null,but on win,it doesn't crash immediately
+ //it exits with exception,and associated memory will have problem which leads to crash problem in
+ //other place in dev env...
}
//End
}
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index c29454bf3d7a..5ae8f562b7c7 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -28,7 +28,6 @@
#include <unotools/charclass.hxx>
#include <editsh.hxx>
#include <fldbas.hxx>
-#include <ndtxt.hxx> // GetCurFld
#include <doc.hxx>
#include <docary.hxx>
#include <fmtfld.hxx>
@@ -228,65 +227,15 @@ void SwEditShell::Insert2(SwField& rFld, const bool bForceExpandHints)
? nsSetAttrMode::SETATTR_FORCEHINTEXPAND
: nsSetAttrMode::SETATTR_DEFAULT;
- FOREACHPAM_START(this) // fuer jeden PaM
- bool bSuccess(GetDoc()->InsertPoolItem(*PCURCRSR, aFld, nInsertFlags));
+ FOREACHPAM_START(this)
+ const bool bSuccess(GetDoc()->InsertPoolItem(*PCURCRSR, aFld, nInsertFlags));
ASSERT( bSuccess, "Doc->Insert(Field) failed");
(void) bSuccess;
- FOREACHPAM_END() // fuer jeden PaM
+ FOREACHPAM_END()
EndAllAction();
}
-/*************************************************************************
-|*
-|* SwEditShell::GetCurFld()
-|*
-|* Beschreibung Stehen die PaMs auf Feldern ?
-|* Quelle: edtfrm.cxx:
-|*
-*************************************************************************/
-
-inline SwTxtFld *GetDocTxtFld( const SwPosition* pPos )
-{
- SwTxtNode * const pNode = pPos->nNode.GetNode().GetTxtNode();
- return (pNode)
- ? static_cast<SwTxtFld*>( pNode->GetTxtAttrForCharAt(
- pPos->nContent.GetIndex(), RES_TXTATR_FIELD ))
- : 0;
-}
-
-SwField* SwEditShell::GetCurFld() const
-{
- // Wenn es keine Selektionen gibt, gilt der Wert der aktuellen
- // Cursor-Position.
-
- SwPaM* pCrsr = GetCrsr();
- SwTxtFld *pTxtFld = GetDocTxtFld( pCrsr->Start() );
- SwField *pCurFld = NULL;
-
- /* #108536# Field was only recognized if no selection was
- present. Now it is recognized if either the cursor is in the
- field or the selection spans exactly over the field. */
- if( pTxtFld &&
- pCrsr->GetNext() == pCrsr &&
- pCrsr->Start()->nNode == pCrsr->End()->nNode &&
- (pCrsr->End()->nContent.GetIndex() -
- pCrsr->Start()->nContent.GetIndex()) <= 1)
- {
- pCurFld = (SwField*)pTxtFld->GetFmtFld().GetField();
- // TabellenFormel ? wandel internen in externen Namen um
- if( RES_TABLEFLD == pCurFld->GetTyp()->Which() )
- {
- const SwTableNode* pTblNd = IsCrsrInTbl();
- ((SwTblField*)pCurFld)->PtrToBoxNm( pTblNd ? &pTblNd->GetTable() : 0 );
- }
-
- }
-
- /* #108536# removed handling of multi-selections */
-
- return pCurFld;
-}
/*************************************************************************
@@ -299,18 +248,28 @@ SwField* SwEditShell::GetCurFld() const
*************************************************************************/
SwTxtFld* lcl_FindInputFld( SwDoc* pDoc, SwField& rFld )
{
- // suche das Feld ueber seine Addresse. Muss fuer InputFelder in
- // geschuetzten Feldern erfolgen
SwTxtFld* pTFld = 0;
- if( RES_INPUTFLD == rFld.Which() || ( RES_SETEXPFLD == rFld.Which() &&
- ((SwSetExpField&)rFld).GetInputFlag() ) )
+ if( RES_INPUTFLD == rFld.Which() )
+ {
+ const SfxPoolItem* pItem = NULL;
+ const sal_uInt32 nMaxItems =
+ pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INPUTFIELD );
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_TXTATR_INPUTFIELD, n ) )
+ && ((SwFmtFld*)pItem)->GetField() == &rFld )
+ {
+ pTFld = ((SwFmtFld*)pItem)->GetTxtFld();
+ break;
+ }
+ }
+ else if( RES_SETEXPFLD == rFld.Which()
+ && ((SwSetExpField&)rFld).GetInputFlag() )
{
- const SfxPoolItem* pItem;
- sal_uInt32 n, nMaxItems =
+ const SfxPoolItem* pItem = NULL;
+ const sal_uInt32 nMaxItems =
pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
- for( n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem =
- pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) )
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) )
&& ((SwFmtFld*)pItem)->GetField() == &rFld )
{
pTFld = ((SwFmtFld*)pItem)->GetTxtFld();
@@ -339,14 +298,9 @@ void SwEditShell::UpdateFlds( SwField &rFld )
SwTxtFld *pTxtFld;
SwFmtFld *pFmtFld;
-// if( pCrsr->GetNext() == pCrsr && !pCrsr->HasMark() &&
-// ( 0 != ( pTxtFld = GetDocTxtFld( pCrsr->Start() ) ) ||
-// 0 != ( pTxtFld = lcl_FindInputFld( GetDoc(), rFld ) ) ) &&
-// ( pFmtFld = (SwFmtFld*)&pTxtFld->GetFld())->GetFld()
-// ->GetTyp()->Which() == rFld.GetTyp()->Which() )
if ( pCrsr->GetNext() == pCrsr && !pCrsr->HasMark())
{
- pTxtFld = GetDocTxtFld(pCrsr->Start());
+ pTxtFld = GetTxtFldAtPos( pCrsr->Start(), true );
if (!pTxtFld) // #i30221#
pTxtFld = lcl_FindInputFld( GetDoc(), rFld);
@@ -361,7 +315,8 @@ void SwEditShell::UpdateFlds( SwField &rFld )
sal_Bool bOkay = sal_True;
sal_Bool bTblSelBreak = sal_False;
- SwMsgPoolItem aHint( RES_TXTATR_FIELD ); // Such-Hint
+ SwMsgPoolItem aFldHint( RES_TXTATR_FIELD );
+ SwMsgPoolItem aInputFldHint( RES_TXTATR_INPUTFIELD );
FOREACHPAM_START(this) // fuer jeden PaM
if( PCURCRSR->HasMark() && bOkay ) // ... mit Selektion
{
@@ -382,13 +337,14 @@ void SwEditShell::UpdateFlds( SwField &rFld )
// Suche nach SwTxtFld ...
while( bOkay
&& pCurStt->nContent != pCurEnd->nContent
- && aPam.Find( aHint, sal_False, fnMoveForward, &aCurPam ) )
+ && ( aPam.Find( aFldHint, sal_False, fnMoveForward, &aCurPam )
+ || aPam.Find( aInputFldHint, sal_False, fnMoveForward, &aCurPam ) ) )
{
// wenn nur ein Pam mehr als ein Feld enthaelt ...
if( aPam.Start()->nContent != pCurStt->nContent )
bOkay = sal_False;
- if( 0 != (pTxtFld = GetDocTxtFld( pCurStt )) )
+ if( 0 != (pTxtFld = GetTxtFldAtPos( pCurStt, true )) )
{
pFmtFld = (SwFmtFld*)&pTxtFld->GetFmtFld();
pCurFld = pFmtFld->GetField();
diff --git a/sw/source/core/edit/edfldexp.cxx b/sw/source/core/edit/edfldexp.cxx
index 6e6dd1cc91ed..49d8f454c035 100644
--- a/sw/source/core/edit/edfldexp.cxx
+++ b/sw/source/core/edit/edfldexp.cxx
@@ -31,7 +31,6 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <doc.hxx>
#include <docary.hxx>
-#include <ndtxt.hxx> // GetCurFld
#include <txtfld.hxx>
#include <fmtfld.hxx>
#include <edimp.hxx>
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 81c0f3b1ef9e..2e7260e4df60 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -785,7 +785,7 @@ sal_Bool SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, s
else
bInsTxt = sal_False;
- SetAttr( rFmt );
+ SetAttrItem( rFmt );
if (bInsTxt && !IsCrsrPtAtEnd())
SwapPam();
if(!bKeepSelection)
@@ -815,7 +815,7 @@ sal_uInt16 SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr )
{
SwTxtINetFmt& rAttr = *pFnd;
String sTxt( pTxtNd->GetExpandTxt( *rAttr.GetStart(),
- *rAttr.GetEnd() - *rAttr.GetStart() ) );
+ *rAttr.End() - *rAttr.GetStart() ) );
sTxt.EraseAllChars( 0x0a );
sTxt.EraseLeadingChars().EraseTrailingChars();
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index c22f261a82e0..6b3830afebb2 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1382,13 +1382,13 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
pDoc->DeleteAndJoin(*pCrsr);
// ... and apply language if necessary
if(aCurrentNewPortion->eLanguage != aCurrentOldPortion->eLanguage)
- SetAttr( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId), nLangWhichId );
+ SetAttrItem( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId), nLangWhichId );
pDoc->InsertString(*pCrsr, aCurrentNewPortion->sText);
}
else if(aCurrentNewPortion->eLanguage != aCurrentOldPortion->eLanguage)
{
//apply language
- SetAttr( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId), nLangWhichId );
+ SetAttrItem( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId), nLangWhichId );
}
else if( aCurrentNewPortion->bIgnoreThisError )
{
@@ -1429,7 +1429,7 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
GetCurAttr( aSet );
const SvxLanguageItem& rLang = static_cast<const SvxLanguageItem& >(aSet.Get(nLangWhichId));
if(rLang.GetLanguage() != aCurrentNewPortion->eLanguage)
- SetAttr( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId) );
+ SetAttrItem( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId) );
//insert the new string
pDoc->InsertString(*pCrsr, aCurrentNewPortion->sText);
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index 743834791f73..857bba8acdf8 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -209,7 +209,7 @@ sal_Bool SwEditShell::SelectionHasNumber() const
return bResult;
}
-//Sym3_879 add a new function to determine number on/off status
+//add a new function to determine number on/off status
sal_Bool SwEditShell::SelectionHasBullet() const
{
sal_Bool bResult = HasBullet();
@@ -731,7 +731,6 @@ sal_Bool SwEditShell::IsNoNum( sal_Bool bChkStart ) const
return bResult;
}
-// --> OD 2008-02-29 #refactorlists# - removed <pHasChilds>
sal_uInt8 SwEditShell::GetNumLevel() const
{
// gebe die akt. Ebene zurueck, auf der sich der Point vom Cursor befindet
@@ -741,22 +740,18 @@ sal_uInt8 SwEditShell::GetNumLevel() const
SwPaM* pCrsr = GetCrsr();
const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
- // --> FME 2005-09-12 #124972# Made code robust:
ASSERT( pTxtNd, "GetNumLevel() without text node" )
if ( !pTxtNd )
return nLevel;
- // <--
const SwNumRule* pRule = pTxtNd->GetNumRule();
if(pRule)
{
- // --> OD 2008-05-09 #refactorlists#
const int nListLevelOfTxtNode( pTxtNd->GetActualListLevel() );
if ( nListLevelOfTxtNode >= 0 )
{
nLevel = static_cast<sal_uInt8>( nListLevelOfTxtNode );
}
- // <--
}
return nLevel;
@@ -784,21 +779,16 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule,
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
- {
+ {
aRangeArr.SetPam( n, aPam );
- // --> OD 2008-02-08 #newlistlevelattrs#
- // --> OD 2008-03-17 #refactorlists#
GetDoc()->SetNumRule( aPam, rRule,
bCreateNewList, sContinuedListId,
sal_True, bResetIndentAttrs );
- // <--
GetDoc()->SetCounted( aPam, true );
- }
+ }
}
else
{
- // --> OD 2008-02-08 #newlistlevelattrs#
- // --> OD 2008-03-17 #refactorlists#
GetDoc()->SetNumRule( *pCrsr, rRule,
bCreateNewList, sContinuedListId,
sal_True, bResetIndentAttrs );
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index 5771a33f910b..8fa4676aa2a8 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -84,8 +84,8 @@ void SwEditShell::Insert(const SwTOXMark& rMark)
}
else if( *pEnd != *pStt )
{
- GetDoc()->InsertPoolItem( *PCURCRSR, rMark,
- nsSetAttrMode::SETATTR_DONTEXPAND );
+ GetDoc()->InsertPoolItem(
+ *PCURCRSR, rMark, nsSetAttrMode::SETATTR_DONTEXPAND );
}
FOREACHPAM_END()
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 67c533925e80..253e9aaf3b22 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -976,12 +976,162 @@ void SwSetExpField::SetPar2(const String& rStr)
}
}
+
+sal_Bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+{
+ sal_Int32 nTmp32 = 0;
+ sal_Int16 nTmp16 = 0;
+ String sTmp;
+ switch( nWhichId )
+ {
+ case FIELD_PROP_BOOL2:
+ if(*(sal_Bool*)rAny.getValue())
+ nSubType &= ~nsSwExtendedSubType::SUB_INVISIBLE;
+ else
+ nSubType |= nsSwExtendedSubType::SUB_INVISIBLE;
+ break;
+ case FIELD_PROP_FORMAT:
+ rAny >>= nTmp32;
+ SetFormat(nTmp32);
+ break;
+ case FIELD_PROP_USHORT2:
+ {
+ rAny >>= nTmp16;
+ if(nTmp16 <= SVX_NUMBER_NONE )
+ SetFormat(nTmp16);
+ else {
+ //exception(wrong_value)
+ ;
+ }
+ }
+ break;
+ case FIELD_PROP_USHORT1:
+ rAny >>= nTmp16;
+ nSeqNo = nTmp16;
+ break;
+ case FIELD_PROP_PAR1:
+ SetPar1( SwStyleNameMapper::GetUIName(
+ ::GetString( rAny, sTmp ), nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ) );
+ break;
+ case FIELD_PROP_PAR2:
+ {
+ OUString uTmp;
+ rAny >>= uTmp;
+ //I18N - if the formula contains only "TypeName+1"
+ //and it's one of the initially created sequence fields
+ //then the localized names has to be replaced by a programmatic name
+ OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, uTmp, sal_False);
+ SetFormula( sMyFormula );
+ }
+ break;
+ case FIELD_PROP_DOUBLE:
+ {
+ double fVal = 0.0;
+ rAny >>= fVal;
+ SetValue(fVal);
+ }
+ break;
+ case FIELD_PROP_SUBTYPE:
+ nTmp32 = lcl_APIToSubType(rAny);
+ if(nTmp32 >= 0)
+ SetSubType(static_cast<sal_uInt16>((GetSubType() & 0xff00) | nTmp32));
+ break;
+ case FIELD_PROP_PAR3:
+ ::GetString( rAny, aPText );
+ break;
+ case FIELD_PROP_BOOL3:
+ if(*(sal_Bool*) rAny.getValue())
+ nSubType |= nsSwExtendedSubType::SUB_CMD;
+ else
+ nSubType &= (~nsSwExtendedSubType::SUB_CMD);
+ break;
+ case FIELD_PROP_BOOL1:
+ SetInputFlag(*(sal_Bool*) rAny.getValue());
+ break;
+ case FIELD_PROP_PAR4:
+ ChgExpStr( ::GetString( rAny, sTmp ));
+ break;
+ default:
+ return SwField::PutValue(rAny, nWhichId);
+ }
+ return sal_True;
+}
+
+
+sal_Bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+{
+ switch( nWhichId )
+ {
+ case FIELD_PROP_BOOL2:
+ {
+ sal_Bool bVal = 0 == (nSubType & nsSwExtendedSubType::SUB_INVISIBLE);
+ rAny.setValue(&bVal, ::getBooleanCppuType());
+ }
+ break;
+ case FIELD_PROP_FORMAT:
+ rAny <<= (sal_Int32)GetFormat();
+ break;
+ case FIELD_PROP_USHORT2:
+ rAny <<= (sal_Int16)GetFormat();
+ break;
+ case FIELD_PROP_USHORT1:
+ rAny <<= (sal_Int16)nSeqNo;
+ break;
+ case FIELD_PROP_PAR1:
+ rAny <<= OUString ( SwStyleNameMapper::GetProgName(GetPar1(), nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ) );
+ break;
+ case FIELD_PROP_PAR2:
+ {
+ //I18N - if the formula contains only "TypeName+1"
+ //and it's one of the initially created sequence fields
+ //then the localized names has to be replaced by a programmatic name
+ OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, GetFormula(), sal_True);
+ rAny <<= OUString( sMyFormula );
+ }
+ break;
+ case FIELD_PROP_DOUBLE:
+ rAny <<= (double)GetValue();
+ break;
+ case FIELD_PROP_SUBTYPE:
+ {
+ sal_Int16 nRet = 0;
+ nRet = lcl_SubTypeToAPI(GetSubType() & 0xff);
+ rAny <<= nRet;
+ }
+ break;
+ case FIELD_PROP_PAR3:
+ rAny <<= OUString( aPText );
+ break;
+ case FIELD_PROP_BOOL3:
+ {
+ sal_Bool bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
+ rAny.setValue(&bTmp, ::getBooleanCppuType());
+ }
+ break;
+ case FIELD_PROP_BOOL1:
+ {
+ sal_Bool bTmp = GetInputFlag();
+ rAny.setValue(&bTmp, ::getBooleanCppuType());
+ }
+ break;
+ case FIELD_PROP_PAR4:
+ rAny <<= rtl::OUString(GetExpStr());
+ break;
+ default:
+ return SwField::QueryValue(rAny, nWhichId);
+ }
+ return sal_True;
+}
+
+
+
/*--------------------------------------------------------------------
Beschreibung: Eingabefeld Type
---------------------------------------------------------------------*/
SwInputFieldType::SwInputFieldType( SwDoc* pD )
- : SwFieldType( RES_INPUTFLD ), pDoc( pD )
+ : SwFieldType( RES_INPUTFLD )
+ , pDoc( pD )
{
}
@@ -995,10 +1145,57 @@ SwFieldType* SwInputFieldType::Copy() const
Beschreibung: Eingabefeld
--------------------------------------------------------------------*/
-SwInputField::SwInputField(SwInputFieldType* pTyp, const String& rContent,
- const String& rPrompt, sal_uInt16 nSub, sal_uLong nFmt) :
- SwField(pTyp, nFmt), aContent(rContent), aPText(rPrompt), nSubType(nSub)
+SwInputField::SwInputField( SwInputFieldType* pFieldType,
+ const String& rContent,
+ const String& rPrompt,
+ sal_uInt16 nSub,
+ sal_uLong nFmt,
+ bool bIsFormField )
+ : SwField( pFieldType, nFmt, LANGUAGE_SYSTEM, false )
+ , aContent(rContent)
+ , aPText(rPrompt)
+ , nSubType(nSub)
+ , mpFmtFld( NULL )
+ , mbIsFormField( bIsFormField )
+{
+}
+
+SwInputField::~SwInputField()
+{
+}
+
+
+void SwInputField::SetFmtFld( SwFmtFld& rFmtFld )
{
+ mpFmtFld = &rFmtFld;
+}
+
+SwFmtFld* SwInputField::GetFmtFld()
+{
+ return mpFmtFld;
+}
+
+
+const String& SwInputField::getContent() const
+{
+ return aContent;
+}
+
+void SwInputField::applyFieldContent( const String& rNewFieldContent )
+{
+ if ( (nSubType & 0x00ff) == INP_TXT )
+ {
+ aContent = rNewFieldContent;
+ }
+ else if( (nSubType & 0x00ff) == INP_USR )
+ {
+ SwUserFieldType* pUserTyp = static_cast<SwUserFieldType*>(
+ static_cast<SwInputFieldType*>(GetTyp())->GetDoc()->GetFldType( RES_USERFLD, getContent(), false ) );
+ if( pUserTyp )
+ {
+ pUserTyp->SetContent( rNewFieldContent );
+ }
+ }
}
String SwInputField::GetFieldName() const
@@ -1008,18 +1205,24 @@ String SwInputField::GetFieldName() const
{
aStr += GetTyp()->GetName();
aStr += ' ';
- aStr += aContent;
+ aStr += getContent();
}
return aStr;
}
SwField* SwInputField::Copy() const
{
- SwInputField* pFld = new SwInputField((SwInputFieldType*)GetTyp(), aContent,
- aPText, GetSubType(), GetFormat());
+ SwInputField* pFld =
+ new SwInputField(
+ static_cast<SwInputFieldType*>(GetTyp()),
+ getContent(),
+ aPText,
+ GetSubType(),
+ GetFormat(),
+ mbIsFormField );
- pFld->SetHelp(aHelp);
- pFld->SetToolTip(aToolTip);
+ pFld->SetHelp( aHelp );
+ pFld->SetToolTip( aToolTip );
pFld->SetAutomaticLanguage(IsAutomaticLanguage());
return pFld;
@@ -1028,26 +1231,35 @@ SwField* SwInputField::Copy() const
String SwInputField::Expand() const
{
String sRet;
- if((nSubType & 0x00ff) == INP_TXT)
- sRet = aContent;
-
+ if ( (nSubType & 0x00ff) == INP_TXT )
+ {
+ sRet = getContent();
+ }
else if( (nSubType & 0x00ff) == INP_USR )
{
- SwUserFieldType* pUserTyp = (SwUserFieldType*)
- ((SwInputFieldType*)GetTyp())->GetDoc()->
- GetFldType( RES_USERFLD, aContent, false );
+ SwUserFieldType* pUserTyp = static_cast<SwUserFieldType*>(
+ static_cast<SwInputFieldType*>(GetTyp())->GetDoc()->GetFldType( RES_USERFLD, getContent(), false ) );
if( pUserTyp )
sRet = pUserTyp->GetContent();
}
return sRet;
}
+
+bool SwInputField::isFormField() const
+{
+ return mbIsFormField
+ || aHelp.Len() > 0
+ || aToolTip.Len() > 0;
+}
+
+
sal_Bool SwInputField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
case FIELD_PROP_PAR1:
- rAny <<= OUString( aContent );
+ rAny <<= OUString( getContent() );
break;
case FIELD_PROP_PAR2:
rAny <<= OUString( aPText );
@@ -1069,7 +1281,9 @@ sal_Bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
switch( nWhichId )
{
case FIELD_PROP_PAR1:
- ::GetString( rAny, aContent );
+ {
+ ::GetString( rAny, aContent );
+ }
break;
case FIELD_PROP_PAR2:
::GetString( rAny, aPText );
@@ -1085,9 +1299,7 @@ sal_Bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
}
return sal_True;
}
-/*--------------------------------------------------------------------
- Beschreibung: Bedingung setzen
- --------------------------------------------------------------------*/
+
void SwInputField::SetPar1(const String& rStr)
{
@@ -1096,12 +1308,9 @@ void SwInputField::SetPar1(const String& rStr)
const String& SwInputField::GetPar1() const
{
- return aContent;
+ return getContent();
}
-/*--------------------------------------------------------------------
- Beschreibung: True/False Text
- --------------------------------------------------------------------*/
void SwInputField::SetPar2(const String& rStr)
{
@@ -1133,11 +1342,6 @@ String SwInputField::GetToolTip() const
return aToolTip;
}
-sal_Bool SwInputField::isFormField() const
-{
- return aHelp.Len() > 0 || aToolTip.Len() > 0;
-}
-
sal_uInt16 SwInputField::GetSubType() const
{
return nSubType;
@@ -1148,150 +1352,3 @@ void SwInputField::SetSubType(sal_uInt16 nSub)
nSubType = nSub;
}
-sal_Bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
-{
- switch( nWhichId )
- {
- case FIELD_PROP_BOOL2:
- {
- sal_Bool bVal = 0 == (nSubType & nsSwExtendedSubType::SUB_INVISIBLE);
- rAny.setValue(&bVal, ::getBooleanCppuType());
- }
- break;
- case FIELD_PROP_FORMAT:
- rAny <<= (sal_Int32)GetFormat();
- break;
- case FIELD_PROP_USHORT2:
- rAny <<= (sal_Int16)GetFormat();
- break;
- case FIELD_PROP_USHORT1:
- rAny <<= (sal_Int16)nSeqNo;
- break;
- case FIELD_PROP_PAR1:
- rAny <<= OUString ( SwStyleNameMapper::GetProgName(GetPar1(), nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ) );
- break;
- case FIELD_PROP_PAR2:
- {
- //I18N - if the formula contains only "TypeName+1"
- //and it's one of the initially created sequence fields
- //then the localized names has to be replaced by a programmatic name
- OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, GetFormula(), sal_True);
- rAny <<= OUString( sMyFormula );
- }
- break;
- case FIELD_PROP_DOUBLE:
- rAny <<= (double)GetValue();
- break;
- case FIELD_PROP_SUBTYPE:
- {
- sal_Int16 nRet = 0;
- nRet = lcl_SubTypeToAPI(GetSubType() & 0xff);
- rAny <<= nRet;
- }
- break;
- case FIELD_PROP_PAR3:
- rAny <<= OUString( aPText );
- break;
- case FIELD_PROP_BOOL3:
- {
- sal_Bool bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
- rAny.setValue(&bTmp, ::getBooleanCppuType());
- }
- break;
- case FIELD_PROP_BOOL1:
- {
- sal_Bool bTmp = GetInputFlag();
- rAny.setValue(&bTmp, ::getBooleanCppuType());
- }
- break;
- case FIELD_PROP_PAR4:
- rAny <<= rtl::OUString(GetExpStr());
- break;
- default:
- return SwField::QueryValue(rAny, nWhichId);
- }
- return sal_True;
-}
-
-sal_Bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
-{
- sal_Int32 nTmp32 = 0;
- sal_Int16 nTmp16 = 0;
- String sTmp;
- switch( nWhichId )
- {
- case FIELD_PROP_BOOL2:
- if(*(sal_Bool*)rAny.getValue())
- nSubType &= ~nsSwExtendedSubType::SUB_INVISIBLE;
- else
- nSubType |= nsSwExtendedSubType::SUB_INVISIBLE;
- break;
- case FIELD_PROP_FORMAT:
- rAny >>= nTmp32;
- SetFormat(nTmp32);
- break;
- case FIELD_PROP_USHORT2:
- {
- rAny >>= nTmp16;
- if(nTmp16 <= SVX_NUMBER_NONE )
- SetFormat(nTmp16);
- else {
- //exception(wrong_value)
- ;
- }
- }
- break;
- case FIELD_PROP_USHORT1:
- rAny >>= nTmp16;
- nSeqNo = nTmp16;
- break;
- case FIELD_PROP_PAR1:
- SetPar1( SwStyleNameMapper::GetUIName(
- ::GetString( rAny, sTmp ), nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ) );
- break;
- case FIELD_PROP_PAR2:
- {
- OUString uTmp;
- rAny >>= uTmp;
- //I18N - if the formula contains only "TypeName+1"
- //and it's one of the initially created sequence fields
- //then the localized names has to be replaced by a programmatic name
- OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, uTmp, sal_False);
- SetFormula( sMyFormula );
- }
- break;
- case FIELD_PROP_DOUBLE:
- {
- double fVal = 0.0;
- rAny >>= fVal;
- SetValue(fVal);
- }
- break;
- case FIELD_PROP_SUBTYPE:
- nTmp32 = lcl_APIToSubType(rAny);
- if(nTmp32 >= 0)
- SetSubType(static_cast<sal_uInt16>((GetSubType() & 0xff00) | nTmp32));
- break;
- case FIELD_PROP_PAR3:
- ::GetString( rAny, aPText );
- break;
- case FIELD_PROP_BOOL3:
- if(*(sal_Bool*) rAny.getValue())
- nSubType |= nsSwExtendedSubType::SUB_CMD;
- else
- nSubType &= (~nsSwExtendedSubType::SUB_CMD);
- break;
- case FIELD_PROP_BOOL1:
- SetInputFlag(*(sal_Bool*) rAny.getValue());
- break;
- case FIELD_PROP_PAR4:
- ChgExpStr( ::GetString( rAny, sTmp ));
- break;
- default:
- return SwField::PutValue(rAny, nWhichId);
- }
- return sal_True;
-}
-
-
-
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index 2c70ae22f362..506de16f17e3 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -180,13 +180,19 @@ sal_Bool SwFieldType::PutValue( const uno::Any& , sal_uInt16 )
Felder sind n-mal vorhanden, Feldtypen nur einmal
--------------------------------------------------------------------*/
-SwField::SwField(SwFieldType* pTyp, sal_uInt32 nFmt, sal_uInt16 nLng) :
- nLang(nLng),
- bIsAutomaticLanguage(sal_True),
- nFormat(nFmt)
+SwField::SwField(
+ SwFieldType* pTyp,
+ sal_uInt32 nFmt,
+ sal_uInt16 nLng,
+ bool bUseFieldValueCache )
+ : m_Cache()
+ , m_bUseFieldValueCache( bUseFieldValueCache )
+ , nLang( nLng )
+ , bIsAutomaticLanguage( sal_True )
+ , nFormat( nFmt )
+ , pType( pTyp )
{
ASSERT( pTyp, "SwField: ungueltiger SwFieldType" );
- pType = pTyp;
}
SwField::~SwField()
@@ -425,11 +431,16 @@ sal_Bool SwField::IsFixed() const
String SwField::ExpandField(bool const bCached) const
{
- if (!bCached) // #i85766# do not expand fields in clipboard documents
+ if ( m_bUseFieldValueCache )
{
- m_Cache = Expand();
+ if (!bCached) // #i85766# do not expand fields in clipboard documents
+ {
+ m_Cache = Expand();
+ }
+ return m_Cache;
}
- return m_Cache;
+
+ return Expand();
}
SwField * SwField::CopyField() const
@@ -438,6 +449,8 @@ SwField * SwField::CopyField() const
// #i85766# cache expansion of source (for clipboard)
// use this->cache, not this->Expand(): only text formatting calls Expand()
pNew->m_Cache = m_Cache;
+ pNew->m_bUseFieldValueCache = m_bUseFieldValueCache;
+
return pNew;
}
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 2996950307ab..3820a0ca1492 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -277,7 +277,6 @@ String SwGetRefField::GetFieldName() const
return aStr;
}
-// --> OD 2007-09-07 #i81002# - parameter <pFldTxtAttr> added
void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
{
sTxt.Erase();
@@ -285,8 +284,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
SwDoc* pDoc = ((SwGetRefFieldType*)GetTyp())->GetDoc();
sal_uInt16 nStt = USHRT_MAX;
sal_uInt16 nEnd = USHRT_MAX;
- SwTxtNode* pTxtNd = SwGetRefFieldType::FindAnchor( pDoc, sSetRefName,
- nSubType, nSeqNo, &nStt, &nEnd );
+ SwTxtNode* pTxtNd = SwGetRefFieldType::FindAnchor( pDoc, sSetRefName, nSubType, nSeqNo, &nStt, &nEnd );
if ( !pTxtNd )
{
sTxt = ViewShell::GetShellRes()->aGetRefFld_RefItemNotFound;
@@ -314,8 +312,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
case REF_ONLYCAPTION:
{
- const SwTxtAttr* const pTxtAttr =
- pTxtNd->GetTxtAttrForCharAt(nStt, RES_TXTATR_FIELD);
+ const SwTxtAttr* const pTxtAttr = pTxtNd->GetTxtAttrForCharAt(nStt, RES_TXTATR_FIELD);
if( pTxtAttr )
nStt = SwGetExpField::GetReferenceTextPos(
pTxtAttr->GetFmtFld(), *pDoc );
@@ -423,32 +420,29 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
case REF_UPDOWN:
{
- // --> OD 2007-09-07 #i81002#
// simplified: use parameter <pFldTxtAttr>
if( !pFldTxtAttr || !pFldTxtAttr->GetpTxtNode() )
break;
- LocaleDataWrapper aLocaleData(
- ::comphelper::getProcessServiceFactory(),
- SvxCreateLocale( GetLanguage() ) );
+ LocaleDataWrapper aLocaleData( ::comphelper::getProcessServiceFactory(), SvxCreateLocale( GetLanguage() ) );
// erstmal ein "Kurz" - Test - falls beide im selben
// Node stehen!
if( pFldTxtAttr->GetpTxtNode() == pTxtNd )
{
sTxt = nStt < *pFldTxtAttr->GetStart()
- ? aLocaleData.getAboveWord()
- : aLocaleData.getBelowWord();
+ ? aLocaleData.getAboveWord()
+ : aLocaleData.getBelowWord();
break;
}
- sTxt = ::IsFrameBehind( *pFldTxtAttr->GetpTxtNode(), *pFldTxtAttr->GetStart(),
- *pTxtNd, nStt )
- ? aLocaleData.getAboveWord()
- : aLocaleData.getBelowWord();
+ sTxt =
+ ::IsFrameBehind( *pFldTxtAttr->GetpTxtNode(), *pFldTxtAttr->GetStart(), *pTxtNd, nStt )
+ ? aLocaleData.getAboveWord()
+ : aLocaleData.getBelowWord();
}
break;
- // --> OD 2007-08-24 #i81002#
+
case REF_NUMBER:
case REF_NUMBER_NO_CONTEXT:
case REF_NUMBER_FULL_CONTEXT:
@@ -459,7 +453,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
}
}
break;
- // <--
+
default:
DBG_ERROR("<SwGetRefField::UpdateField(..)> - unknown format type");
}
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 5a899698ad2a..f85fd91e5c59 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -121,8 +121,12 @@ sal_Bool lcl_SetNewFlyPos( const SwNode& rNode, SwFmtAnchor& rAnchor,
return bRet;
}
-sal_Bool lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm,
- SfxItemSet& rSet )
+sal_Bool lcl_FindAnchorPos(
+ SwEditShell& rEditShell,
+ SwDoc& rDoc,
+ const Point& rPt,
+ const SwFrm& rFrm,
+ SfxItemSet& rSet )
{
sal_Bool bRet = sal_True;
SwFmtAnchor aNewAnch( (SwFmtAnchor&)rSet.Get( RES_ANCHOR ) );
@@ -163,6 +167,13 @@ sal_Bool lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm,
else
pCNd->MakeEndIndex( &aPos.nContent );
}
+ else
+ {
+ if ( rEditShell.PosInsideInputFld( aPos ) )
+ {
+ aPos.nContent = rEditShell.StartOfInputFldAtPos( aPos );
+ }
+ }
}
aNewAnch.SetAnchor( &aPos );
}
@@ -208,7 +219,10 @@ sal_Bool lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm,
//
//! also used in unoframe.cxx
//
-sal_Bool lcl_ChkAndSetNewAnchor( const SwFlyFrm& rFly, SfxItemSet& rSet )
+sal_Bool lcl_ChkAndSetNewAnchor(
+ SwEditShell& rEditShell,
+ const SwFlyFrm& rFly,
+ SfxItemSet& rSet )
{
const SwFrmFmt& rFmt = *rFly.GetFmt();
const SwFmtAnchor &rOldAnch = rFmt.GetAnchor();
@@ -228,7 +242,7 @@ sal_Bool lcl_ChkAndSetNewAnchor( const SwFlyFrm& rFly, SfxItemSet& rSet )
"Unerlaubter Ankerwechsel in Head/Foot." );
#endif
- return ::lcl_FindAnchorPos( *pDoc, rFly.Frm().Pos(), rFly, rSet );
+ return ::lcl_FindAnchorPos( rEditShell, *pDoc, rFly.Frm().Pos(), rFly, rSet );
}
void SwFEShell::SelectFlyFrm( SwFlyFrm& rFrm, sal_Bool bNew )
@@ -455,7 +469,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
// --> OD 2004-07-16 #i28701#
SwAnchoredObject* pAnchoredObj = ::findConnectionToSdrObject( pObj )->GetAnchoredObj( pObj );
SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
- RndStdIds nAnchorId = rFmt.GetAnchor().GetAnchorId();
+ const RndStdIds nAnchorId = rFmt.GetAnchor().GetAnchorId();
if ( FLY_AS_CHAR == nAnchorId )
return aRet;
@@ -494,18 +508,20 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
pFooterOrHeader = pCntnt->FindFooterOrHeader();
}
- //Ausgehend von der linken oberen Ecke des Fly den
- //dichtesten SwFlyFrm suchen.
- SwCntntFrm *pTxtFrm;
+ SwCntntFrm *pTxtFrm = NULL;
{
SwCrsrMoveState aState( MV_SETONLYTEXT );
SwPosition aPos( GetDoc()->GetNodes().GetEndOfExtras() );
Point aTmpPnt( rAbsPos );
GetLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState );
- pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( GetLayout(),0,&aPos,sal_False );
+ if ( nAnchorId != FLY_AT_CHAR
+ || !PosInsideInputFld( aPos ) )
+ {
+ pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( GetLayout(),0,&aPos,sal_False );
+ }
}
- const SwFrm *pNewAnch;
- if( pTxtFrm )
+ const SwFrm *pNewAnch = NULL;
+ if( pTxtFrm != NULL )
{
if ( FLY_AT_PAGE == nAnchorId )
{
@@ -521,8 +537,6 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
}
}
}
- else
- pNewAnch = 0;
if( pNewAnch && !pNewAnch->IsProtected() )
{
@@ -562,6 +576,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
GetPhyPageNum() );
break;
}
+
case FLY_AT_FLY:
{
SwPosition aPos( *((SwFlyFrm*)pNewAnch)->GetFmt()->
@@ -569,26 +584,29 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
aAnch.SetAnchor( &aPos );
break;
}
+
case FLY_AT_CHAR:
- {
- SwPosition *pPos = (SwPosition*)aAnch.GetCntntAnchor();
- Point aTmpPnt( rAbsPos );
- if( pTxtFrm->GetCrsrOfst( pPos, aTmpPnt, NULL ) )
- {
- SwRect aTmpRect;
- pTxtFrm->GetCharRect( aTmpRect, *pPos );
- aRet = aTmpRect.Pos();
- }
- else
{
- pPos->nNode = *pTxtFrm->GetNode();
- pPos->nContent.Assign(0,0);
+ SwPosition *pPos = (SwPosition*)aAnch.GetCntntAnchor();
+ Point aTmpPnt( rAbsPos );
+ if( pTxtFrm->GetCrsrOfst( pPos, aTmpPnt, NULL ) )
+ {
+ SwRect aTmpRect;
+ pTxtFrm->GetCharRect( aTmpRect, *pPos );
+ aRet = aTmpRect.Pos();
+ }
+ else
+ {
+ pPos->nNode = *pTxtFrm->GetNode();
+ pPos->nContent.Assign(0,0);
+ }
+ break;
}
- break;
- }
default:
break;
+
}
+
if( bMoveIt )
{
StartAllAction();
@@ -969,7 +987,7 @@ void SwFEShell::InsertDrawObj( SdrObject& rDrawObj,
aRelativePos - aTopLeft + aAnchorPos));
}
- ::lcl_FindAnchorPos( *GetDoc(), rInsertPosition, *pFrm, rFlyAttrSet );
+ ::lcl_FindAnchorPos( *this, *GetDoc(), rInsertPosition, *pFrm, rFlyAttrSet );
}
// insert drawing object into the document creating a new <SwDrawFrmFmt> instance
SwDrawFrmFmt* pFmt = GetDoc()->Insert( aPam, rDrawObj, &rFlyAttrSet, 0 );
@@ -1166,7 +1184,7 @@ sal_Bool SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet )
const Point aPt( pFly->Frm().Pos() );
if( SFX_ITEM_SET == rSet.GetItemState( RES_ANCHOR, sal_False ))
- ::lcl_ChkAndSetNewAnchor( *pFly, rSet );
+ ::lcl_ChkAndSetNewAnchor( *this, *pFly, rSet );
SwFlyFrmFmt* pFlyFmt = (SwFlyFrmFmt*)pFly->GetFmt();
if( GetDoc()->SetFlyFrmAttr( *pFlyFmt, rSet ))
@@ -1333,7 +1351,7 @@ void SwFEShell::SetFrmFmt( SwFrmFmt *pNewFmt, sal_Bool bKeepOrient, Point* pDocP
{
pSet = new SfxItemSet( GetDoc()->GetAttrPool(), aFrmFmtSetRange );
pSet->Put( *pItem );
- if( !::lcl_ChkAndSetNewAnchor( *pFly, *pSet ))
+ if( !::lcl_ChkAndSetNewAnchor( *this, *pFly, *pSet ))
delete pSet, pSet = 0;
}
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index fabe65d2f858..b3581c580ab6 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1032,9 +1032,43 @@ sal_Bool SwFEShell::IsObjSelected( const SdrObject& rObj ) const
if ( IsFrmSelected() || !Imp()->HasDrawView() )
return sal_False;
else
- return Imp()->GetDrawView()->IsObjMarked(rObj);
+ return Imp()->GetDrawView()->isSdrObjectSelected(rObj);
}
+//IAccessibility2 Implementation 2009-----
+bool SwFEShell::IsObjSameLevelWithMarked(const SdrObject& rObj) const
+{
+ if(!Imp()->GetDrawView()->areSdrObjectsSelected())
+ {
+ return true;
+ }
+
+ const SdrObjectVector aSdrObjectVector(Imp()->GetDrawView()->getSelectedSdrObjectVectorFromSdrMarkView());
+
+ if(aSdrObjectVector.empty())
+ {
+ OSL_ENSURE(false, "OOps, areSdrObjectsSelected is true, but SdrObjectVector is empty (!)");
+ }
+ else
+ {
+ const SdrObject& rFirstMarked = *aSdrObjectVector[0];
+
+ return rFirstMarked.GetParentSdrObject() == rObj.GetParentSdrObject();
+ }
+
+ return false;
+}
+
+SdrObject* SwFEShell::getSingleSelected() const
+{
+ if(Imp()->GetDrawView())
+ {
+ return Imp()->GetDrawView()->getSelectedIfSingle();
+ }
+
+ return 0;
+}
+//-----IAccessibility2 Implementation 2009
/*************************************************************************
|*
|* SwFEShell::EndTextEdit()
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 9691a676e7ee..2c6435301008 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -2255,7 +2255,11 @@ inline void UnsetFollow( SwFlowFrm *pTab )
pTab->bIsFollow = sal_False;
}
-void _FndBox::DelFrms( SwTable &rTable )
+//IAccessibility2 Implementation 2009-----
+//Solution:When bAccTableDispose is FALSE,the acc table should not be disposed.
+//void _FndBox::DelFrms( SwTable &rTable )
+void _FndBox::DelFrms( SwTable &rTable,sal_Bool bAccTableDispose )
+//-----IAccessibility2 Implementation 2009
{
//Alle Lines zwischen pLineBefore und pLineBehind muessen aus dem
//Layout ausgeschnitten und geloescht werden.
@@ -2373,9 +2377,14 @@ void _FndBox::DelFrms( SwTable &rTable )
// next turn.
((SwTabFrm*)pTabFrm)->SetFollowFlowLine( sal_False );
}
-
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Set acc table dispose state
+ pFrm->SetAccTableDispose( bAccTableDispose );
pFrm->Cut();
+ //Solution:Set acc table dispose state to default value.
+ pFrm->SetAccTableDispose( sal_True );
delete pFrm;
+ //-----IAccessibility2 Implementation 2009
}
}
}
diff --git a/sw/source/core/inc/SwPortionHandler.hxx b/sw/source/core/inc/SwPortionHandler.hxx
index 34fcb94b6952..7d26954a150b 100644
--- a/sw/source/core/inc/SwPortionHandler.hxx
+++ b/sw/source/core/inc/SwPortionHandler.hxx
@@ -92,6 +92,10 @@ public:
* paragraph's portions have been processed.
*/
virtual void Finish() = 0;
+ //IAccessibility2 Implementation 2009-----
+ virtual void SetAttrFieldType( sal_uInt16 )
+ { return; }
+ //-----IAccessibility2 Implementation 2009
};
#endif
diff --git a/sw/source/core/inc/docfld.hxx b/sw/source/core/inc/docfld.hxx
index 691dc53f4234..7da844b24565 100644
--- a/sw/source/core/inc/docfld.hxx
+++ b/sw/source/core/inc/docfld.hxx
@@ -80,10 +80,7 @@ public:
_SetGetExpFld( const SwFlyFrmFmt& rFlyFmt, const SwPosition* pPos = 0 );
- sal_Bool operator==( const _SetGetExpFld& rFld ) const
- { return nNode == rFld.nNode && nCntnt == rFld.nCntnt &&
- ( !CNTNT.pTxtFld || !rFld.CNTNT.pTxtFld ||
- CNTNT.pTxtFld == rFld.CNTNT.pTxtFld ); }
+ sal_Bool operator==( const _SetGetExpFld& rFld ) const;
sal_Bool operator<( const _SetGetExpFld& rFld ) const;
const SwTxtFld* GetTxtFld() const
diff --git a/sw/source/core/inc/doctxm.hxx b/sw/source/core/inc/doctxm.hxx
index 6cc70f26606d..7c9f0a23bbe9 100644
--- a/sw/source/core/inc/doctxm.hxx
+++ b/sw/source/core/inc/doctxm.hxx
@@ -101,6 +101,9 @@ public:
void Update( const SfxItemSet* pAttr = 0,
const bool _bNewTOX = false ); // Formatieren
void UpdatePageNum(); // Seitennummern einfuegen
+//IAccessibility2 Implementation 2009-----
+ SwTOXSortTabBases* GetTOXSortTabBases() { return &aSortArr; }
+//-----IAccessibility2 Implementation 2009
sal_Bool SetPosAtStartEnd( SwPosition& rPos, sal_Bool bAtStart = sal_True ) const;
};
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 0c6867391d7b..9509bb5b3cf0 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -29,6 +29,11 @@
#include "calbck.hxx" // fuer SwClient
#include <svl/brdcst.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/style/TabStop.hpp>
+#include <comphelper/stlunosequence.hxx>
+using namespace ::com::sun::star;
+//-----IAccessibility2 Implementation 2009
class SwLayoutFrm;
class SwRootFrm;
class SwPageFrm;
@@ -292,6 +297,10 @@ class SwFrm: public SwClient, public SfxBroadcaster
//Cache fuer (Umrandungs-)Attribute.
static SwCache *pCache;
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Member to identify if acc table should be disposed
+ sal_Bool bIfAccTableShouldDisposing;
+ //-----IAccessibility2 Implementation 2009
// --> OD 2006-05-10 #i65250#
// frame ID is now in general available - used for layout loop control
@@ -415,6 +424,12 @@ protected:
sal_Bool bRetouche: 1; //Der Frame ist fuer Retusche verantwortlich
//wenn sal_True.
public:
+ //IAccessibility2 Implementation 2009-----
+ virtual uno::Sequence< style::TabStop > GetTabStopInfo( SwTwips )
+ {
+ return uno::Sequence< style::TabStop >();
+ }
+ //-----IAccessibility2 Implementation 2009
sal_Bool bUnUsed2: 1;
protected:
sal_Bool bInfInvalid: 1; //InfoFlags sind Invalid.
@@ -767,6 +782,10 @@ public:
virtual Size ChgSize( const Size& aNewSize );
virtual void Cut() = 0;
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Add a method to change the acc table dispose state.
+ void SetAccTableDispose( sal_Bool bDispose){ bIfAccTableShouldDisposing = bDispose;}
+ //-----IAccessibility2 Implementation 2009
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ) = 0;
void ValidateLineNum() { bValidLineNum = sal_True; }
diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx
index a90ef2ee331f..fdbd37979496 100644
--- a/sw/source/core/inc/rolbck.hxx
+++ b/sw/source/core/inc/rolbck.hxx
@@ -403,11 +403,14 @@ public:
// helper methods for recording attribute in History
// used by Undo classes (Delete/Overwrite/Inserts)
- void CopyAttr( SwpHints* pHts, sal_uLong nNodeIdx, xub_StrLen nStart,
- xub_StrLen nEnd, bool bFields );
- // --> OD 2008-02-27 #refactorlists# - removed <rDoc>
+ void CopyAttr(
+ SwpHints* pHts,
+ const sal_uLong nNodeIdx,
+ const xub_StrLen nStart,
+ const xub_StrLen nEnd,
+ const bool bCopyFields );
+
void CopyFmtAttr( const SfxItemSet& rSet, sal_uLong nNodeIdx );
- // <--
};
#ifndef ROLBCK_HISTORY_ONLY
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index 3371e612ef7e..073bc99a9d6b 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -268,8 +268,9 @@ public:
// next page border
const SwPageFrm* GetPageAtPos( const Point& rPt, const Size* pSize = 0, bool bExtend = false ) const;
- //Der Crsr moechte die zu selektierenden Bereiche wissen.
- void CalcFrmRects( SwShellCrsr&, sal_Bool bIsTblSel );
+ void CalcFrmRects(
+ SwShellCrsr&,
+ const sal_Bool bIsTblSel );
// Calculates the cells included from the current selection
// false: There was no result because of an invalid layout
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index c54e00ce4b6f..7fafafa3092b 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -126,16 +126,20 @@ public:
#define SW_SCRIPTS 3
class SwFont
-{ // CJK == Chinese, Japanese, Korean
- // CTL == Complex text layout ( Hebrew, Arabic )
- SwSubFont aSub[SW_SCRIPTS]; // Latin-, CJK- and CTL-font
- Color* pBackColor; // background color (i.e. at character styles)
- Color aUnderColor; // color of the underlining
- Color aOverColor; // color of the overlining
- sal_uInt8 nToxCnt; // Zaehlt die Schachtelungstiefe der Tox
- sal_uInt8 nRefCnt; // Zaehlt die Schachtelungstiefe der Refs
- sal_uInt8 m_nMetaCount; // count META/METAFIELD
- sal_uInt8 nActual; // actual font (Latin, CJK or CTL)
+{ // CJK == Chinese, Japanese, Korean
+ // CTL == Complex text layout ( Hebrew, Arabic )
+ SwSubFont aSub[SW_SCRIPTS]; // Latin-, CJK- and CTL-font
+
+ Color* pBackColor; // background color (i.e. at character styles)
+ Color aUnderColor; // color of the underlining
+ Color aOverColor; // color of the overlining
+
+ sal_uInt8 nToxCnt; // Zaehlt die Schachtelungstiefe der Tox
+ sal_uInt8 nRefCnt; // Zaehlt die Schachtelungstiefe der Refs
+ sal_uInt8 m_nMetaCount; // count META/METAFIELD
+ sal_uInt8 m_nInputFieldCount; // count INPUTFIELD
+
+ sal_uInt8 nActual; // actual font (Latin, CJK or CTL)
// Schalter fuer die Font-Extensions
sal_Bool bNoHyph :1; // SwTxtNoHyphenHere: keine Trennstelle
@@ -242,6 +246,9 @@ public:
inline sal_uInt8 &GetMeta() { return m_nMetaCount; }
inline sal_uInt8 GetMeta() const { return m_nMetaCount; }
inline bool IsMeta() const { return (0 != m_nMetaCount); }
+ inline sal_uInt8 &GetInputField() { return m_nInputFieldCount; }
+ inline sal_uInt8 GetInputField() const { return m_nInputFieldCount; }
+ inline bool IsInputField() const { return (0 != m_nInputFieldCount); }
inline void SetURL( const sal_Bool bURL );
inline sal_Bool IsURL() const { return bURL; }
inline void SetGreyWave( const sal_Bool bNew );
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index 85c87db2c767..3cb3a72aea10 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -33,8 +33,6 @@ class SwAttrSetChg;
class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
{
- // OD 14.03.2003 #i11760# - adjustment, because of method signature change
- //darf mit den Flags spielen.
friend void CalcCntnt( SwLayoutFrm *pLay, bool bNoColl, bool bNoCalcFollow );
//Fuert Spezialbehandlung fuer _Get[Next|Prev]Leaf() durch.
@@ -44,22 +42,22 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
SwTable* pTable;
sal_Bool bComplete :1; //Eintrage als Repaint ohne das CompletePaint
- //der Basisklasse gesetzt werden muss. Damit
- //sollen unertraegliche Tabellen-Repaints
- //vermieden werden.
+ //der Basisklasse gesetzt werden muss. Damit
+ //sollen unertraegliche Tabellen-Repaints
+ //vermieden werden.
sal_Bool bCalcLowers :1; //Im MakeAll auf jedenfall auch fuer Stabilitaet
- //des Inhaltes sorgen.
+ //des Inhaltes sorgen.
sal_Bool bLowersFormatted :1;//Kommunikation zwischen MakeAll und Layact
sal_Bool bLockBackMove :1; //BackMove-Test hat der Master erledigt.
sal_Bool bResizeHTMLTable :1; //Resize des HTMLTableLayout rufen im MakeAll
- //Zur Optimierung, damit dies nicht im
- //CntntFrm::Grow gerufen werden muss, denn dann
- //wird es ggf. fuer jede Zelle gerufen #47483#
+ //Zur Optimierung, damit dies nicht im
+ //CntntFrm::Grow gerufen werden muss, denn dann
+ //wird es ggf. fuer jede Zelle gerufen #47483#
sal_Bool bONECalcLowers :1; //Primaer fuer die StarONE-SS. Beim MakeAll werden
- //die Cntnts auf jedenfall per Calc() formatiert.
- //es finden keine zusaetzlichen Invalidierungen
- //statt und dieser Weg kann auch kaum garantien
- //geben.
+ //die Cntnts auf jedenfall per Calc() formatiert.
+ //es finden keine zusaetzlichen Invalidierungen
+ //statt und dieser Weg kann auch kaum garantien
+ //geben.
sal_Bool bHasFollowFlowLine :1; // Means that the first line in the follow
// is indented to contain content from a broken
@@ -76,7 +74,6 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
// is necessary, in order to let the text
// flow into the FollowFlowLine
sal_Bool bRemoveFollowFlowLinePending :1;
- // --> OD 2004-10-04 #i26945#
sal_Bool bConsiderObjsForMinCellHeight :1; // Usually, the floating screen objects
// are considered on the calculation
// for the minimal cell height.
@@ -85,12 +82,10 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
// screen object for the preparation
// of the re-calculation of the
// last table row.
- // <--
- // --> OD 2004-10-15 #i26945#
sal_Bool bObjsDoesFit :1; // For splitting table rows algorithm, this boolean
// indicates, if the floating screen objects fits
- // <--
- sal_Bool bDummy4 :1;
+
+ bool mbInRecalcLowerRow : 1;
//Split() spaltet den Frm an der angegebenen Stelle, es wird ein
//Follow erzeugt und aufgebaut und direkt hinter this gepastet.
@@ -98,8 +93,11 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
bool Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKeep );
bool Join();
- void _UpdateAttr( const SfxPoolItem*, const SfxPoolItem*, sal_uInt8 &,
- SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
+ void _UpdateAttr(
+ const SfxPoolItem*,
+ const SfxPoolItem*, sal_uInt8 &,
+ SwAttrSetChg *pa = 0,
+ SwAttrSetChg *pb = 0 );
virtual sal_Bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool bHead, sal_Bool &rReformat );
@@ -168,7 +166,15 @@ public:
sal_Bool IsRemoveFollowFlowLinePending() const { return bRemoveFollowFlowLinePending; }
void SetRemoveFollowFlowLinePending( sal_Bool bNew ) { bRemoveFollowFlowLinePending = bNew; }
- // --> OD 2004-10-04 #i26945#
+ bool IsInRecalcLowerRow() const
+ {
+ return mbInRecalcLowerRow;
+ }
+ void SetInRecalcLowerRow( bool bNew )
+ {
+ mbInRecalcLowerRow = bNew;
+ }
+
sal_Bool IsConsiderObjsForMinCellHeight() const
{
return bConsiderObjsForMinCellHeight;
@@ -177,8 +183,7 @@ public:
{
bConsiderObjsForMinCellHeight = _bNewConsiderObjsForMinCellHeight;
}
- // <--
- // --> OD 2004-10-04 #i26945#
+
sal_Bool DoesObjsFit() const
{
return bObjsDoesFit;
@@ -187,15 +192,16 @@ public:
{
bObjsDoesFit = _bNewObjsDoesFit;
}
- // <--
bool RemoveFollowFlowLine();
//
// End: New stuff for breaking table rows
//
- sal_Bool CalcFlyOffsets( SwTwips& rUpper, long& rLeftOffset,
- long& rRightOffset ) const;
+ sal_Bool CalcFlyOffsets(
+ SwTwips& rUpper,
+ long& rLeftOffset,
+ long& rRightOffset ) const;
SwTwips CalcHeightOfFirstContentLine() const;
@@ -204,12 +210,9 @@ public:
bool IsLayoutSplitAllowed() const;
- // --> collapsing borders FME 2005-05-27 #i29550#
bool IsCollapsingBorders() const;
- // used for collapsing border lines:
sal_uInt16 GetBottomLineSize() const;
- // <-- collapsing
DECL_FIXEDMEMPOOL_NEWDEL(SwTabFrm)
};
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 2898b1f6898d..2ac1146afaf9 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -26,7 +26,9 @@
#include <tools/mempool.hxx>
#include <tools/string.hxx>
#include "cntfrm.hxx"
-
+//IAccessibility2 Implementation 2009-----
+#include "com/sun/star/uno/Sequence.hxx"
+//-----IAccessibility2 Implementation 2009
#define STRSIZE(x) (sizeof(x)-1)
class SwCharRange;
@@ -229,6 +231,9 @@ protected:
public:
+ //IAccessibility2 Implementation 2009-----
+ com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > GetTabStopInfo( SwTwips CurrentPos );
+ //-----IAccessibility2 Implementation 2009
//public, weil der eine oder andere die Methode rufen darf um das
//Prepare zu sparen - mit Vorsicht zu geniessen!
void Init();
diff --git a/sw/source/core/inc/txttypes.hxx b/sw/source/core/inc/txttypes.hxx
index bac7ace26668..4f52fdedb9f9 100644
--- a/sw/source/core/inc/txttypes.hxx
+++ b/sw/source/core/inc/txttypes.hxx
@@ -51,6 +51,7 @@
#define POR_PARA 0x8002
#define POR_URL 0x8003
#define POR_HNG 0x8004
+#define POR_INPUTFLD 0x8005
#define POR_DROP 0x8080
#define POR_TOX 0x8089
diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
index 6f3edf5854ce..bfba5d15b9c8 100644
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@ -279,6 +279,12 @@ public:
inline void AddAccessibleObj( const SdrObject *pObj );
+ //IAccessibility2 Implementation 2009-----
+ void FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage);
+ void FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection);
+ void FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn);
+ //-----IAccessibility2 Implementation 2009
+
// Invalidate accessible frame's frame's content
void InvalidateAccessibleFrmContent( const SwFrm *pFrm );
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index b0dc8343504c..b82ff44e7f97 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -3295,3 +3295,19 @@ IMapObject* SwFrmFmt::GetIMapObject( const Point& rPoint,
return 0;
}
+sal_Bool SwFrmFmt::HasCaption() const
+{
+ if(pCaptionFmt != NULL && pCaptionFmt->GetDepends())
+ return sal_True;
+ return sal_False;
+}
+
+void SwFrmFmt::SetCaptionFmt(SwFrmFmt * pFmt)
+{
+ pCaptionFmt = pFmt;
+}
+
+SwFrmFmt* SwFrmFmt::GetCaptionFmt() const
+{
+ return pCaptionFmt;
+}
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 2f86c798d0d6..ae7c9dce15d3 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -47,26 +47,19 @@
#include <fmtornt.hxx>
#include <fmtfsize.hxx>
#include <fmtsrnd.hxx>
+#include <txatbase.hxx>
#include "tabfrm.hxx"
#include "flyfrms.hxx"
#include "crstate.hxx"
#include "sectfrm.hxx"
-// OD 29.10.2003 #113049#
#include <tocntntanchoredobjectposition.hxx>
-// OD 2004-05-24 #i28701#
#include <dcontact.hxx>
#include <sortedobjs.hxx>
-// --> OD 2005-09-29 #125370#,#125957#
#include <layouter.hxx>
-// <--
-// --> OD 2005-11-17 #i56300#
#include <objectformattertxtfrm.hxx>
-// <--
-// --> OD 2006-03-06 #125892#
#include <HandleAnchorNodeChg.hxx>
-// <--
using namespace ::com::sun::star;
@@ -1475,6 +1468,15 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
if( pCnt->GetCrsrOfst( pPos, aPt, &eTmpState )
&& pPos->nNode == *pCnt->GetNode() )
{
+ if ( pCnt->GetNode()->GetTxtNode() != NULL )
+ {
+ const SwTxtAttr* pTxtInputFld =
+ pCnt->GetNode()->GetTxtNode()->GetTxtAttrAt( pPos->nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTxtNode::PARENT );
+ if ( pTxtInputFld != NULL )
+ {
+ pPos->nContent = *(pTxtInputFld->GetStart());
+ }
+ }
ResetLastCharRectHeight();
if( text::RelOrientation::CHAR == pFmt->GetVertOrient().GetRelationOrient() )
nY = LONG_MAX;
@@ -1493,7 +1495,6 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
pPos->nContent.Assign( pCnt->GetNode(), 0 );
}
- // --> OD 2006-02-27 #125892#
// handle change of anchor node:
// if count of the anchor frame also change, the fly frames have to be
// re-created. Thus, delete all fly frames except the <this> before the
@@ -1502,9 +1503,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
SwHandleAnchorNodeChg aHandleAnchorNodeChg( *pFmt, aAnch, this );
pFmt->GetDoc()->SetAttr( aAnch, *pFmt );
}
- // <--
}
- // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
else if ( pTmpPage && pTmpPage != GetPageFrm() )
GetPageFrm()->MoveFly( this, pTmpPage );
@@ -1515,8 +1514,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
GetFmt()->GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
if ( pOldPage != FindPageFrm() )
- ::Notify_Background( GetVirtDrawObj(), pOldPage, aOld, PREP_FLY_LEAVE,
- sal_False );
+ ::Notify_Background( GetVirtDrawObj(), pOldPage, aOld, PREP_FLY_LEAVE, sal_False );
}
// OD 2004-08-12 #i32795# - Note: method no longer used in <flyincnt.cxx>
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index b865bb634f55..e1de7061a804 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -727,8 +727,8 @@ void lcl_ApplyWorkaroundForB6375613( SwFrm* p_pFirstFrmOnNewPage )
SwDoc* pDoc( pFirstTextFrmOnNewPage->GetTxtNode()->GetDoc() );
IDocumentContentOperations* pIDCO = pFirstTextFrmOnNewPage->GetTxtNode()->getIDocumentContentOperations();
const SwPaM aTmpPaM( *(pFirstTextFrmOnNewPage->GetTxtNode()) );
- pIDCO->InsertPoolItem( aTmpPaM,
- SvxFmtBreakItem( SVX_BREAK_PAGE_BEFORE, RES_BREAK ), 0 );
+ pIDCO->InsertPoolItem(
+ aTmpPaM, SvxFmtBreakItem( SVX_BREAK_PAGE_BEFORE, RES_BREAK ), 0 );
pFirstTextFrmOnNewPage->GetTxtNode()->UnlockModify();
uno::Reference< document::XDocumentInfoSupplier > xDoc(
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 7ffd245f41bd..a4d0b35067b9 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -95,10 +95,9 @@ SwTabFrm::SwTabFrm( SwTable &rTab, SwFrm* pSib ):
bComplete = bCalcLowers = bONECalcLowers = bLowersFormatted = bLockBackMove =
bResizeHTMLTable = bHasFollowFlowLine = bIsRebuildLastLine =
bRestrictTableGrowth = bRemoveFollowFlowLinePending = sal_False;
- // --> OD 2004-10-04 #i26945#
bConsiderObjsForMinCellHeight = sal_True;
bObjsDoesFit = sal_True;
- // <--
+ mbInRecalcLowerRow = false;
bFixSize = sal_False; //Nicht nochmal auf die Importfilter hereinfallen.
nType = FRMC_TAB;
@@ -128,10 +127,9 @@ SwTabFrm::SwTabFrm( SwTabFrm &rTab ) :
bLockJoin = bComplete = bONECalcLowers = bCalcLowers = bLowersFormatted = bLockBackMove =
bResizeHTMLTable = bHasFollowFlowLine = bIsRebuildLastLine =
bRestrictTableGrowth = bRemoveFollowFlowLinePending = sal_False;
- // --> OD 2004-10-04 #i26945#
bConsiderObjsForMinCellHeight = sal_True;
bObjsDoesFit = sal_True;
- // <--
+ mbInRecalcLowerRow = false;
bFixSize = sal_False; //Nicht nochmal auf die Importfilter hereinfallen.
nType = FRMC_TAB;
@@ -2076,7 +2074,7 @@ void SwTabFrm::MakeAll()
}
SwFrm *pPre;
if ( bKeep || (0 != (pPre = FindPrev()) &&
- pPre->GetAttrSet()->GetKeep().GetValue()) )
+ pPre->GetAttrSet()->GetKeep().GetValue()) )
{
bCalcLowers = sal_True;
}
@@ -2102,13 +2100,12 @@ void SwTabFrm::MakeAll()
SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
if ( pLayout &&
- ((Prt().*fnRect->fnGetWidth)() != nOldPrtWidth ||
- (Frm().*fnRect->fnGetWidth)() != nOldFrmWidth) )
+ ((Prt().*fnRect->fnGetWidth)() != nOldPrtWidth ||
+ (Frm().*fnRect->fnGetWidth)() != nOldFrmWidth) )
{
delete pAccess;
bCalcLowers |= pLayout->Resize(
- pLayout->GetBrowseWidthByTabFrm( *this ), sal_False );
-// GetFmt()->GetDoc()->GetDocShell()->IsReadOnly() ? sal_False : sal_True );
+ pLayout->GetBrowseWidthByTabFrm( *this ), sal_False );
pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
}
@@ -2161,8 +2158,7 @@ void SwTabFrm::MakeAll()
pHTMLLayout->GetBrowseWidthByTabFrm( *this ),
sal_False );
- pAccess= new SwBorderAttrAccess(
- SwFrm::GetCache(), this );
+ pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
}
@@ -2173,27 +2169,10 @@ void SwTabFrm::MakeAll()
bLowersFormatted = sal_True;
if ( bKeep && KEEPTAB )
{
- // --> OD 2005-09-28 #b6329202#
- // Consider case that table is inside another table,
- // because it has to be avoided, that superior table
- // is formatted.
- // Thus, find next content, table or section
- // and, if a section is found, get its first
- // content.
-// SwFrm *pNxt = FindNextCnt();
-// if( pNxt && pNxt->IsInTab() )
-// pNxt = pNxt->FindTabFrm();
-// if ( pNxt )
-// {
-// pNxt->Calc();
-// if ( !GetNext() )
-// bValidPos = sal_False;
-// }
if ( 0 != lcl_FormatNextCntntForKeep( this ) && !GetNext() )
{
bValidPos = sal_False;
}
- // <--
}
}
}
@@ -2205,17 +2184,14 @@ void SwTabFrm::MakeAll()
// check, if calculation of table frame is ready.
- /// OD 23.10.2002 #103517# - Local variable <nDistanceToUpperPrtBottom>
- /// Introduce local variable and init it with the distance from the
- /// table frame bottom to the bottom of the upper printing area.
- /// Note: negative values denotes the situation that table frame doesn't
- /// fit in its upper.
-
+ // Local variable <nDistanceToUpperPrtBottom>
+ // Introduce local variable and init it with the distance from the
+ // table frame bottom to the bottom of the upper printing area.
+ // Note: negative values denotes the situation that table frame doesn't fit in its upper.
SwTwips nDistanceToUpperPrtBottom =
(Frm().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)());
- /// OD 23.10.2002 #103517# - In online layout try to grow upper of table
- /// frame, if table frame doesn't fit in its upper.
+ // In online layout try to grow upper of table frame, if table frame doesn't fit in its upper.
const ViewShell *pSh = getRootFrm()->GetCurrShell();
const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode();
if ( nDistanceToUpperPrtBottom < 0 && bBrowseMode )
@@ -2223,8 +2199,7 @@ void SwTabFrm::MakeAll()
if ( GetUpper()->Grow( -nDistanceToUpperPrtBottom ) )
{
// upper is grown --> recalculate <nDistanceToUpperPrtBottom>
- nDistanceToUpperPrtBottom =
- (Frm().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)());
+ nDistanceToUpperPrtBottom = (Frm().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)());
}
}
@@ -2234,7 +2209,6 @@ void SwTabFrm::MakeAll()
// the table to be split! Only skip this if condition once.
if( nDistanceToUpperPrtBottom >= 0 && !bLastRowHasToMoveToFollow )
{
- // OD 23.10.2002 - translate german commentary
// If there is space left in the upper printing area, join as for trial
// at least one further row of an existing follow.
if ( !bSplit && GetFollow() )
@@ -2279,8 +2253,8 @@ void SwTabFrm::MakeAll()
//
SwRowFrm *pRow = GetFollow()->GetFirstNonHeadlineRow();
- //Der Follow wird leer und damit ueberfluessig.
- if ( !pRow )
+ //Der Follow wird leer und damit ueberfluessig.
+ if ( !pRow )
{
Join();
continue;
@@ -2301,8 +2275,10 @@ void SwTabFrm::MakeAll()
SwFrm* pNextRow = pRowToMove->GetNext();
if ( !pNextRow )
+ {
//Der Follow wird leer und damit ueberfluessig.
Join();
+ }
else
{
pRowToMove->Cut();
@@ -2311,8 +2287,7 @@ void SwTabFrm::MakeAll()
//Die Fussnoten verschieben!
if ( bMoveFtns )
- if ( ((SwLayoutFrm*)pRowToMove)->MoveLowerFtns(
- 0, pOldBoss, FindFtnBossFrm( sal_True ), sal_True ) )
+ if ( ((SwLayoutFrm*)pRowToMove)->MoveLowerFtns( 0, pOldBoss, FindFtnBossFrm( sal_True ), sal_True ) )
GetUpper()->Calc();
pRowToMove = pNextRow;
@@ -2472,7 +2447,11 @@ void SwTabFrm::MakeAll()
nDeadLine = (*fnRect->fnYInc)( nDeadLine,
GetUpper()->Grow( LONG_MAX, sal_True ) );
- ::lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), nDeadLine );
+ {
+ SetInRecalcLowerRow( true );
+ ::lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), nDeadLine );
+ SetInRecalcLowerRow( false );
+ }
bLowersFormatted = sal_True;
aNotify.SetLowersComplete( sal_True );
@@ -2630,10 +2609,8 @@ void SwTabFrm::MakeAll()
SwFrm* pNxt = ((SwFrm*)GetFollow())->FindNext();
if ( pNxt )
{
- // OD 26.08.2003 #i18103# - no formatting
- // of found next frame, if its a follow
- // section of the 'ColLocked' section,
- // the follow table is in.
+ // no formatting of found next frame, if its a follow
+ // section of the 'ColLocked' section, the follow table is in.
bool bCalcNxt = true;
if ( GetFollow()->IsInSct() && pNxt->IsSctFrm() )
{
@@ -2679,19 +2656,19 @@ void SwTabFrm::MakeAll()
if ( !bMovedFwd && !MoveFwd( bMakePage, sal_False ) )
bMakePage = sal_False;
- // --> FME 2004-06-09 #i29771# Reset bSplitError flag on change of upper
+ // Reset bSplitError flag on change of upper
if ( GetUpper() != pOldUpper )
{
bTryToSplit = true;
nUnSplitted = 5;
}
- // <--
SWREFRESHFN( this )
bMovedFwd = bCalcLowers = sal_True;
aNotify.SetLowersComplete( sal_False );
if ( IsFollow() )
- { //Um Oszillationen zu vermeiden sollte kein ungueltiger Master
+ {
+ //Um Oszillationen zu vermeiden sollte kein ungueltiger Master
//zurueckbleiben.
SwTabFrm *pTab = FindMaster();
if ( pTab->GetUpper() )
@@ -2711,16 +2688,17 @@ void SwTabFrm::MakeAll()
}
if ( bMovedBwd && GetUpper() )
+ {
//Beim zurueckfliessen wurde der Upper angeregt sich vollstaendig
//zu Painten, dass koennen wir uns jetzt nach dem hin und her
//fliessen sparen.
GetUpper()->ResetCompletePaint();
+ }
if ( bCalcLowers && IsValid() )
{
- // --> OD 2005-05-11 #i44910# - format of lower frames unnecessary
- // and can cause layout loops, if table doesn't fit and isn't
- // allowed to split.
+ // format of lower frames unnecessary and can cause layout loops,
+ // if table doesn't fit and isn't allowed to split.
SwTwips nDistToUpperPrtBottom =
(Frm().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)());
if ( nDistToUpperPrtBottom >= 0 || bTryToSplit )
@@ -2735,7 +2713,6 @@ void SwTabFrm::MakeAll()
ASSERT( false, "debug assertion: <SwTabFrm::MakeAll()> - format of table lowers suppressed by fix i44910" );
}
#endif
- // <--
}
} //while ( !bValidPos || !bValidSize || !bValidPrtArea )
@@ -4829,8 +4806,10 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
SetCompletePaint();
SwTabFrm *pTab = FindTabFrm();
- if ( !pTab->IsRebuildLastLine() && pTab->IsFollow() &&
- this == pTab->GetFirstNonHeadlineRow() )
+ if ( !pTab->IsRebuildLastLine()
+ && pTab->IsFollow()
+ && this == pTab->GetFirstNonHeadlineRow()
+ && !pTab->IsInRecalcLowerRow() )
{
SwTabFrm* pMasterTab = const_cast< SwTabFrm* >( pTab->FindMaster() );
pMasterTab->InvalidatePos();
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 0769c70a334b..a6f8abe57a28 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -2007,7 +2007,9 @@ inline void Sub( SwRegionRects& rRegion, const SwRect& rRect )
rRegion -= rRect;
}
-void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, sal_Bool bIsTblMode )
+void SwRootFrm::CalcFrmRects(
+ SwShellCrsr &rCrsr,
+ const sal_Bool bIsTblMode )
{
SwPosition *pStartPos = rCrsr.Start(),
*pEndPos = rCrsr.GetPoint() == pStartPos ? rCrsr.GetMark() : rCrsr.GetPoint();
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 6ba2cce31cc6..bca2036605f7 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -96,6 +96,10 @@ SwFrm::SwFrm( SwModify *pMod, SwFrm* pSib ) :
pNext( 0 ),
pPrev( 0 ),
pDrawObjs( 0 )
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Add a member to identify if the acc table should dispose
+ , bIfAccTableShouldDisposing( sal_False )
+ //-----IAccessibility2 Implementation 2009
, bInfBody( sal_False )
, bInfTab ( sal_False )
, bInfFly ( sal_False )
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index f9e0375485dd..5b3216d0892f 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -794,6 +794,15 @@ void SwOLEObj::SetNode( SwOLENode* pNode )
}
}
+//IAccessibility2 Implementation 2009-----
+String SwOLEObj::GetStyleString()
+{
+ String strStyle;
+ if (xOLERef.is() && xOLERef.IsChart())
+ strStyle = xOLERef.GetChartType();
+ return strStyle;
+}
+//-----IAccessibility2 Implementation 2009
sal_Bool SwOLEObj::IsOleRef() const
{
return xOLERef.is();
diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx
index c54129d2acf4..a46b64ef419f 100644
--- a/sw/source/core/text/atrhndl.hxx
+++ b/sw/source/core/text/atrhndl.hxx
@@ -25,7 +25,7 @@
#define _ATRHNDL_HXX
#define INITIAL_NUM_ATTR 3
-#define NUM_ATTRIBUTE_STACKS 40
+#define NUM_ATTRIBUTE_STACKS 41
#include <txatbase.hxx>
#include <swfntcch.hxx>
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index ad06d9fdc0b7..c3973a95a953 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -132,7 +132,7 @@ const sal_uInt8 StackPos[ static_cast<sal_uInt16>(RES_TXTATR_WITHEND_END) -
0, // RES_TXTATR_CHARFMT, // 49
39, // RES_TXTATR_CJK_RUBY, // 50
0, // RES_TXTATR_UNKNOWN_CONTAINER, // 51
- 0, // RES_TXTATR_DUMMY5 // 52
+ 40, // RES_TXTATR_INPUTFIELD // 52
};
/*************************************************************************
@@ -525,20 +525,21 @@ sal_Bool SwAttrHandler::Push( const SwTxtAttr& rAttr, const SfxPoolItem& rItem )
if ( RES_TXTATR_WITHEND_END <= rItem.Which() )
return sal_False;
- sal_uInt16 nStack = StackPos[ rItem.Which() ];
+ const sal_uInt16 nStack = StackPos[ rItem.Which() ];
// attributes originating from redlining have highest priority
// second priority are hyperlink attributes, which have a color replacement
const SwTxtAttr* pTopAttr = aAttrStack[ nStack ].Top();
- if ( !pTopAttr || rAttr.IsPriorityAttr() ||
- ( !pTopAttr->IsPriorityAttr() &&
- !lcl_ChgHyperLinkColor( *pTopAttr, rItem, mpShell, 0 ) ) )
+ if ( !pTopAttr
+ || rAttr.IsPriorityAttr()
+ || ( !pTopAttr->IsPriorityAttr()
+ && !lcl_ChgHyperLinkColor( *pTopAttr, rItem, mpShell, 0 ) ) )
{
aAttrStack[ nStack ].Push( rAttr );
return sal_True;
}
- sal_uInt16 nPos = aAttrStack[ nStack ].Count();
+ const sal_uInt16 nPos = aAttrStack[ nStack ].Count();
ASSERT( nPos, "empty stack?" );
aAttrStack[ nStack ].Insert( rAttr, nPos - 1 );
return sal_False;
@@ -688,6 +689,8 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, const sal_uInt16 nAttr )
bVertLayout
);
}
+ else if ( RES_TXTATR_INPUTFIELD == nAttr )
+ rFnt.GetInputField()--;
}
/*************************************************************************
@@ -935,6 +938,12 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, sal_Bool bPu
else
rFnt.GetMeta()--;
break;
+ case RES_TXTATR_INPUTFIELD :
+ if ( bPush )
+ rFnt.GetInputField()++;
+ else
+ rFnt.GetInputField()--;
+ break;
}
}
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 57a0255fac2a..e733df9fecf0 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -57,6 +57,11 @@
#include <frmfmt.hxx> // SwFrmFmt
// OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <portab.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/tstpitem.hxx>
+//-----IAccessibility2 Implementation 2009
class FormatLevel
{
@@ -556,6 +561,47 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, sal_Bool bHasToFit )
UNDO_SWAP( this )
}
+//IAccessibility2 Implementation 2009-----
+com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > SwTxtFrm::GetTabStopInfo( SwTwips CurrentPos )
+{
+ com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > tabs(1);
+ ::com::sun::star::style::TabStop ts;
+
+ SwTxtFormatInfo aInf( this );
+ SwTxtFormatter aLine( this, &aInf );
+ SwTxtCursor TxtCursor( this, &aInf );
+ const Point aCharPos( TxtCursor.GetTopLeft() );
+
+
+ SwTwips nRight = aLine.Right();
+ CurrentPos -= aCharPos.X();
+
+ // get current tab stop information stored in the Frm
+ const SvxTabStop *pTS = aLine.GetLineInfo().GetTabStop( CurrentPos, nRight );
+
+ if( !pTS )
+ {
+ return com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop >();
+ }
+
+ // copy tab stop information into a Sequence, which only contains one element.
+ ts.Position = pTS->GetTabPos();
+ ts.DecimalChar = pTS->GetDecimal();
+ ts.FillChar = pTS->GetFill();
+ switch( pTS->GetAdjustment() )
+ {
+ case SVX_TAB_ADJUST_LEFT : ts.Alignment = ::com::sun::star::style::TabAlign_LEFT; break;
+ case SVX_TAB_ADJUST_CENTER : ts.Alignment = ::com::sun::star::style::TabAlign_CENTER; break;
+ case SVX_TAB_ADJUST_RIGHT : ts.Alignment = ::com::sun::star::style::TabAlign_RIGHT; break;
+ case SVX_TAB_ADJUST_DECIMAL: ts.Alignment = ::com::sun::star::style::TabAlign_DECIMAL; break;
+ case SVX_TAB_ADJUST_DEFAULT: ts.Alignment = ::com::sun::star::style::TabAlign_DEFAULT; break;
+ default: break; // prevent warning
+ }
+
+ tabs[0] = ts;
+ return tabs;
+}
+//-----IAccessibility2 Implementation 2009
/*************************************************************************
* SwTxtFrm::AdjustFollow()
*************************************************************************/
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 7f65234c4edc..b66cbe915f98 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1278,27 +1278,37 @@ void SwTxtPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
sal_Bool bDraw = sal_False;
switch( nWhich )
{
- case POR_FTN:
- case POR_QUOVADIS:
- case POR_NUMBER:
- case POR_FLD:
- case POR_URL:
- case POR_HIDDEN:
- case POR_TOX:
- case POR_REF:
- case POR_META:
- case POR_CONTROLCHAR:
- if ( !GetOpt().IsPagePreview() &&
- !GetOpt().IsReadonly() &&
- SwViewOption::IsFieldShadings() &&
- (POR_NUMBER != nWhich ||
- pFrm->GetTxtNode()->HasMarkedLabel())) // #i27615#
- bDraw = sal_True;
+ case POR_FTN:
+ case POR_QUOVADIS:
+ case POR_NUMBER:
+ case POR_FLD:
+ case POR_URL:
+ case POR_HIDDEN:
+ case POR_TOX:
+ case POR_REF:
+ case POR_META:
+ case POR_CONTROLCHAR:
+ if ( !GetOpt().IsPagePreview()
+ && !GetOpt().IsReadonly()
+ && SwViewOption::IsFieldShadings()
+ && ( POR_NUMBER != nWhich
+ || pFrm->GetTxtNode()->HasMarkedLabel())) // #i27615#
+ {
+ bDraw = sal_True;
+ }
+ break;
+ case POR_INPUTFLD:
+ // input field shading also in read-only mode
+ if ( !GetOpt().IsPagePreview()
+ && SwViewOption::IsFieldShadings() )
+ {
+ bDraw = sal_True;
+ }
break;
- case POR_TAB: if ( GetOpt().IsTab() ) bDraw = sal_True; break;
- case POR_SOFTHYPH: if ( GetOpt().IsSoftHyph() )bDraw = sal_True; break;
- case POR_BLANK: if ( GetOpt().IsHardBlank())bDraw = sal_True; break;
- default:
+ case POR_TAB: if ( GetOpt().IsTab() ) bDraw = sal_True; break;
+ case POR_SOFTHYPH: if ( GetOpt().IsSoftHyph() )bDraw = sal_True; break;
+ case POR_BLANK: if ( GetOpt().IsHardBlank())bDraw = sal_True; break;
+ default:
{
ASSERT( !this, "SwTxtPaintInfo::DrawViewOpt: don't know how to draw this" );
break;
@@ -1750,8 +1760,12 @@ sal_Bool SwTxtFormatInfo::LastKernPortion()
* class SwTxtSlot
*************************************************************************/
-SwTxtSlot::SwTxtSlot( const SwTxtSizeInfo *pNew, const SwLinePortion *pPor,
- bool bTxtLen, bool bExgLists, const sal_Char *pCh )
+SwTxtSlot::SwTxtSlot(
+ const SwTxtSizeInfo *pNew,
+ const SwLinePortion *pPor,
+ bool bTxtLen,
+ bool bExgLists,
+ const sal_Char *pCh )
: pOldTxt( 0 ),
pOldSmartTagList( 0 ),
pOldGrammarCheckList( 0 ),
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index d9897dee7866..eb1871f5fd8c 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -865,7 +865,13 @@ SwTxtPortion *SwTxtFormatter::WhichTxtPor( SwTxtFormatInfo &rInf ) const
{
SwTxtPortion *pPor = 0;
if( GetFnt()->IsTox() )
+ {
pPor = new SwToxPortion;
+ }
+ else if ( GetFnt()->IsInputField() )
+ {
+ pPor = new SwTxtInputFldPortion();
+ }
else
{
if( GetFnt()->IsRef() )
@@ -895,8 +901,10 @@ SwTxtPortion *SwTxtFormatter::WhichTxtPor( SwTxtFormatInfo &rInf ) const
else
{
pPor = new SwTxtPortion;
- if( GetFnt()->IsURL() )
+ if ( GetFnt()->IsURL() )
+ {
pPor->SetWhichPor( POR_URL );
+ }
}
}
}
@@ -1321,20 +1329,18 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
case CHAR_ZWSP: // zero width space
case CHAR_ZWNBSP : // word joiner
-// case CHAR_RLM : // right to left mark
-// case CHAR_LRM : // left to right mark
pPor = new SwControlCharPortion( cChar ); break;
case CH_TXTATR_BREAKWORD:
case CH_TXTATR_INWORD:
- if( rInf.HasHint( rInf.GetIdx() ) )
- {
- pPor = NewExtraPortion( rInf );
- break;
- }
- // No break
+ if( rInf.HasHint( rInf.GetIdx() ) )
+ {
+ pPor = NewExtraPortion( rInf );
+ break;
+ }
+ // No break
default :
- {
+ {
SwTabPortion* pLastTabPortion = rInf.GetLastTab();
if ( pLastTabPortion && cChar == rInf.GetTabDecimal() )
{
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 774ed8cf5d79..0b888c9f8a6d 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -68,10 +68,7 @@ SwFldPortion *SwFldPortion::Clone( const XubString &rExpand ) const
{
pNewFnt = new SwFont( *pFnt );
}
- // --> OD 2009-11-25 #i107143#
- // pass placeholder property to created <SwFldPortion> instance.
SwFldPortion* pClone = new SwFldPortion( rExpand, pNewFnt, bPlaceHolder );
- // <--
pClone->SetNextOffset( nNextOffset );
pClone->m_bNoLength = this->m_bNoLength;
return pClone;
@@ -91,6 +88,9 @@ SwFldPortion::SwFldPortion( const XubString &rExpand, SwFont *pFont, sal_Bool bP
, m_bNoLength( sal_False )
{
SetWhichPor( POR_FLD );
+ //IAccessibility2 Implementation 2009-----
+ m_nAttrFldType = 0;
+ //-----IAccessibility2 Implementation 2009
}
SwFldPortion::SwFldPortion( const SwFldPortion& rFld )
@@ -394,20 +394,10 @@ sal_Bool SwFldPortion::Format( SwTxtFormatInfo &rInf )
case CHAR_HARDHYPHEN: // non-breaking hyphen
case CHAR_SOFTHYPHEN:
case CHAR_HARDBLANK:
- // --> FME 2006-01-11 #i59759# Erase additional control
- // characters from field string, otherwise we get stuck in
- // a loop.
case CHAR_ZWSP :
case CHAR_ZWNBSP :
- // case CHAR_RLM :
- // case CHAR_LRM :
- // <--
- // --> OD 2010-06-03 #i111750#
- // - Erasing further control characters from field string in
- // to avoid loop.
case CH_TXTATR_BREAKWORD:
case CH_TXTATR_INWORD:
- // <--
{
aNew.Erase( 0, 1 );
++nNextOfst;
@@ -481,6 +471,12 @@ sal_Bool SwFldPortion::GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) c
void SwFldPortion::HandlePortion( SwPortionHandler& rPH ) const
{
rPH.Special( GetLen(), aExpand, GetWhichPor() );
+ //IAccessibility2 Implementation 2009-----
+ if( GetWhichPor() == POR_FLD )
+ {
+ rPH.SetAttrFieldType(m_nAttrFldType);
+ }
+ //-----IAccessibility2 Implementation 2009
}
/*************************************************************************
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index 1c0ba2155abf..08482bf1d3bd 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -65,6 +65,9 @@ public:
SwFldPortion( const XubString &rExpand, SwFont *pFnt = 0, sal_Bool bPlaceHolder = sal_False );
~SwFldPortion();
+ //IAccessibility2 Implementation 2009-----
+ sal_uInt16 m_nAttrFldType;
+ //-----IAccessibility2 Implementation 2009
void TakeNextOffset( const SwFldPortion* pFld );
void CheckScript( const SwTxtSizeInfo &rInf );
inline sal_Bool HasFont() const { return 0 != pFnt; }
@@ -174,7 +177,6 @@ public:
class SwBulletPortion : public SwNumberPortion
{
public:
- // --> OD 2008-01-23 #newlistlevelattrs#
SwBulletPortion( const xub_Unicode cCh,
const XubString& rBulletFollowedBy,
SwFont *pFnt,
@@ -182,7 +184,6 @@ public:
const sal_Bool bCenter,
const KSHORT nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive );
- // <--
OUTPUT_OPERATOR
};
@@ -198,7 +199,6 @@ class SwGrfNumPortion : public SwNumberPortion
SwTwips nGrfHeight;
sal_Int16 eOrient;
public:
- // --> OD 2008-01-23 #newlistlevelattrs#
SwGrfNumPortion( SwFrm *pFrm,
const XubString& rGraphicFollowedBy,
const SvxBrushItem* pGrfBrush,
@@ -208,7 +208,6 @@ public:
const sal_Bool bCenter,
const KSHORT nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive );
- // <--
~SwGrfNumPortion();
virtual void Paint( const SwTxtPaintInfo &rInf ) const;
virtual sal_Bool Format( SwTxtFormatInfo &rInf );
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 9e11a943d60a..e0b0ee524360 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -2398,8 +2398,8 @@ void SwScriptInfo::CalcHiddenRanges( const SwTxtNode& rNode, MultiSelection& rHi
const SvxCharHiddenItem* pHiddenItem = static_cast<const SvxCharHiddenItem*>( CharFmt::GetItem( *pTxtAttr, RES_CHRATR_HIDDEN ) );
if( pHiddenItem )
{
- xub_StrLen nSt = *pTxtAttr->GetStart();
- xub_StrLen nEnd = *pTxtAttr->GetEnd();
+ const xub_StrLen nSt = *pTxtAttr->GetStart();
+ const xub_StrLen nEnd = *pTxtAttr->End();
if( nEnd > nSt )
{
Range aTmp( nSt, nEnd - 1 );
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 5125d26e1bbb..43201ac3c536 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -992,7 +992,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
if( pRuby )
{ // The winner is ... a ruby attribute and so
// the end of the multiportion is the end of the ruby attribute.
- rPos = *pRuby->GetEnd();
+ rPos = *pRuby->End();
SwMultiCreator *pRet = new SwMultiCreator;
pRet->pItem = NULL;
pRet->pAttr = pRuby;
@@ -1018,7 +1018,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
{
pRet->pItem = NULL;
pRet->pAttr = (*pHints)[n2Lines];
- aEnd.push_front( *pRet->pAttr->GetEnd() );
+ aEnd.push_front( *pRet->pAttr->End() );
if( pItem )
{
aEnd.front() = GetTxt().Len();
@@ -1094,8 +1094,8 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
if( bTwo == bOn )
{ // .. with the same state, so the last attribute could
// be continued.
- if( aEnd.back() < *pTmp->GetEnd() )
- aEnd.back() = *pTmp->GetEnd();
+ if( aEnd.back() < *pTmp->End() )
+ aEnd.back() = *pTmp->End();
}
else
{ // .. with a different state.
@@ -1103,12 +1103,12 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
// If this is smaller than the last on the stack, we put
// it on the stack. If it has the same endposition, the last
// could be removed.
- if( aEnd.back() > *pTmp->GetEnd() )
- aEnd.push_back( *pTmp->GetEnd() );
+ if( aEnd.back() > *pTmp->End() )
+ aEnd.push_back( *pTmp->End() );
else if( aEnd.size() > 1 )
aEnd.pop_back();
else
- aEnd.back() = *pTmp->GetEnd();
+ aEnd.back() = *pTmp->End();
}
}
}
@@ -1166,18 +1166,18 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
{
if( bTwo == bOn )
{
- if( aEnd.back() < *pTmp->GetEnd() )
- aEnd.back() = *pTmp->GetEnd();
+ if( aEnd.back() < *pTmp->End() )
+ aEnd.back() = *pTmp->End();
}
else
{
bOn = bTwo;
- if( aEnd.back() > *pTmp->GetEnd() )
- aEnd.push_back( *pTmp->GetEnd() );
+ if( aEnd.back() > *pTmp->End() )
+ aEnd.push_back( *pTmp->End() );
else if( aEnd.size() > 1 )
aEnd.pop_back();
else
- aEnd.back() = *pTmp->GetEnd();
+ aEnd.back() = *pTmp->End();
}
}
}
@@ -1192,7 +1192,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
{
pRet->pItem = NULL;
pRet->pAttr = (*pHints)[nRotate];
- aEnd.push_front( *pRet->pAttr->GetEnd() );
+ aEnd.push_front( *pRet->pAttr->End() );
if( pRotItem )
{
aEnd.front() = GetTxt().Len();
@@ -1237,18 +1237,18 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
{
if( bTwo == bOn )
{
- if( aEnd.back() < *pTmp->GetEnd() )
- aEnd.back() = *pTmp->GetEnd();
+ if( aEnd.back() < *pTmp->End() )
+ aEnd.back() = *pTmp->End();
}
else
{
bOn = bTwo;
- if( aEnd.back() > *pTmp->GetEnd() )
- aEnd.push_back( *pTmp->GetEnd() );
+ if( aEnd.back() > *pTmp->End() )
+ aEnd.push_back( *pTmp->End() );
else if( aEnd.size() > 1 )
aEnd.pop_back();
else
- aEnd.back() = *pTmp->GetEnd();
+ aEnd.back() = *pTmp->End();
}
}
}
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 2839917e5da7..720025ac1830 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -715,6 +715,124 @@ void SwTxtPortion::HandlePortion( SwPortionHandler& rPH ) const
rPH.Text( GetLen(), GetWhichPor() );
}
+
+SwTxtInputFldPortion::SwTxtInputFldPortion()
+ : SwTxtPortion()
+ , mbContainsInputFieldStart( false )
+ , mbContainsInputFieldEnd( false )
+{
+ SetWhichPor( POR_INPUTFLD );
+}
+
+
+sal_Bool SwTxtInputFldPortion::Format( SwTxtFormatInfo &rInf )
+{
+ mbContainsInputFieldStart =
+ rInf.GetChar( rInf.GetIdx() ) == CH_TXT_ATR_INPUTFIELDSTART;
+ mbContainsInputFieldEnd =
+ rInf.GetChar( rInf.GetIdx() + rInf.GetLen() - 1 ) == CH_TXT_ATR_INPUTFIELDEND;
+
+ sal_Bool bRet = sal_False;
+ if ( rInf.GetLen() == 1
+ && ( mbContainsInputFieldStart || mbContainsInputFieldEnd ) )
+ {
+ Width( 0 );
+ }
+ else
+ {
+ SwTxtSlot aFormatTxt( &rInf, this, true, true, 0 );
+ if ( rInf.GetLen() == 0 )
+ {
+ Width( 0 );
+ }
+ else
+ {
+ bRet = SwTxtPortion::Format( rInf );
+
+ if ( mbContainsInputFieldEnd )
+ {
+ // adjust portion length accordingly, if complete text fits into the portion
+ if ( GetLen() == rInf.GetLen() )
+ {
+ SetLen( GetLen() + 1 );
+ }
+ }
+
+ if ( mbContainsInputFieldStart )
+ {
+ // adjust portion length accordingly
+ SetLen( GetLen() + 1 );
+ }
+ }
+ }
+
+ return bRet;
+}
+
+void SwTxtInputFldPortion::Paint( const SwTxtPaintInfo &rInf ) const
+{
+ if ( Width() )
+ {
+ rInf.DrawViewOpt( *this, POR_INPUTFLD );
+ static sal_Char sSpace = ' ';
+ SwTxtSlot aPaintTxt( &rInf, this, true, true,
+ ContainsOnlyDummyChars() ? &sSpace : 0 );
+ SwTxtPortion::Paint( rInf );
+ }
+}
+
+sal_Bool SwTxtInputFldPortion::GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) const
+{
+ xub_StrLen nIdx = rInf.GetIdx();
+ xub_StrLen nLen = rInf.GetLen();
+ if ( rInf.GetChar( rInf.GetIdx() ) == CH_TXT_ATR_INPUTFIELDSTART )
+ {
+ ++nIdx;
+ --nLen;
+ }
+ if ( rInf.GetChar( rInf.GetIdx() + rInf.GetLen() - 1 ) == CH_TXT_ATR_INPUTFIELDEND )
+ {
+ --nLen;
+ }
+ rTxt = rInf.GetTxt().Copy( nIdx, nLen );
+
+ return sal_True;
+}
+
+
+SwPosSize SwTxtInputFldPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
+{
+ SwTxtSlot aFormatTxt( &rInf, this, true, false, 0 );
+ if ( rInf.GetLen() == 0 )
+ {
+ return SwPosSize( 0, 0 );
+ }
+
+ return rInf.GetTxtSize();
+}
+
+
+KSHORT SwTxtInputFldPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
+{
+ if( !Width()
+ && ContainsOnlyDummyChars()
+ && !rInf.GetOpt().IsPagePreview()
+ && !rInf.GetOpt().IsReadonly()
+ && SwViewOption::IsFieldShadings() )
+ {
+ return rInf.GetTxtSize( ' ' ).Width();
+ }
+
+ return SwTxtPortion::GetViewWidth( rInf );
+}
+
+bool SwTxtInputFldPortion::ContainsOnlyDummyChars() const
+{
+ return GetLen() <= 2
+ && mbContainsInputFieldStart
+ && mbContainsInputFieldEnd;
+}
+
/*************************************************************************
* class SwHolePortion
*************************************************************************/
diff --git a/sw/source/core/text/portxt.hxx b/sw/source/core/text/portxt.hxx
index 329055493d70..a778bff11583 100644
--- a/sw/source/core/text/portxt.hxx
+++ b/sw/source/core/text/portxt.hxx
@@ -62,6 +62,24 @@ public:
DECL_FIXEDMEMPOOL_NEWDEL(SwTxtPortion)
};
+
+class SwTxtInputFldPortion : public SwTxtPortion
+{
+public:
+ SwTxtInputFldPortion();
+
+ virtual sal_Bool Format( SwTxtFormatInfo &rInf );
+ virtual void Paint( const SwTxtPaintInfo &rInf ) const;
+ virtual KSHORT GetViewWidth( const SwTxtSizeInfo &rInf ) const;
+ virtual sal_Bool GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) const;
+ virtual SwPosSize GetTxtSize( const SwTxtSizeInfo &rInfo ) const;
+
+private:
+ bool mbContainsInputFieldStart;
+ bool mbContainsInputFieldEnd;
+ bool ContainsOnlyDummyChars() const;
+};
+
/*************************************************************************
* class SwHolePortion
*************************************************************************/
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 9c95883b7943..ccf2eeba6890 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -59,6 +59,14 @@
#include "fmtmeta.hxx" // lcl_NewMetaPortion
+//IAccessibility2 Implementation 2009-----
+#ifndef _REFFLD_HXX
+#include "reffld.hxx"
+#endif
+#ifndef _FLDDAT_HXX
+#include "flddat.hxx"
+#endif
+//-----IAccessibility2 Implementation 2009
/*************************************************************************
* SwTxtFormatter::NewFldPortion()
*************************************************************************/
@@ -90,7 +98,9 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
SwCharFmt* pChFmt = 0;
sal_Bool bNewFlyPor = sal_False,
bINet = sal_False;
-
+ //IAccessibility2 Implementation 2009-----
+ sal_uInt16 subType;
+ //-----IAccessibility2 Implementation 2009
// set language
((SwTxtFormatter*)this)->SeekAndChg( rInf );
if (pFld->GetLanguage() != GetFnt()->GetLanguage())
@@ -162,6 +172,10 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
: pFld->ExpandField(bInClipboard) );
pRet = new SwFldPortion( str );
}
+ //IAccessibility2 Implementation 2009-----
+ if(pRet)
+ ((SwFldPortion*)pRet)->m_nAttrFldType= ATTR_PAGECOOUNTFLD;
+ //-----IAccessibility2 Implementation 2009
break;
case RES_PAGENUMBERFLD:
@@ -188,6 +202,10 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
: pFld->ExpandField(bInClipboard) );
pRet = new SwFldPortion( str );
}
+ //IAccessibility2 Implementation 2009-----
+ if(pRet)
+ ((SwFldPortion*)pRet)->m_nAttrFldType= ATTR_PAGENUMBERFLD;
+ //-----IAccessibility2 Implementation 2009
break;
}
case RES_GETEXPFLD:
@@ -263,7 +281,40 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
bNewFlyPor = sal_True;
bPlaceHolder = sal_True;
break;
-
+ //IAccessibility2 Implementation 2009-----
+ case RES_GETREFFLD:
+ subType = ((SwGetRefField*)pFld)->GetSubType();
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion(str);
+ }
+ if(pRet)
+ {
+ if( subType == REF_BOOKMARK )
+ ((SwFldPortion*)pRet)->m_nAttrFldType = ATTR_BOOKMARKFLD;
+ else if( subType == REF_SETREFATTR )
+ ((SwFldPortion*)pRet)->m_nAttrFldType = ATTR_SETREFATTRFLD;
+ break;
+ }
+ case RES_DATETIMEFLD:
+ subType = ((SwDateTimeField*)pFld)->GetSubType();
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion(str);
+ }
+ if(pRet)
+ {
+ if( subType & DATEFLD )
+ ((SwFldPortion*)pRet)->m_nAttrFldType= ATTR_DATEFLD;
+ else if( subType & TIMEFLD )
+ ((SwFldPortion*)pRet)->m_nAttrFldType = ATTR_TIMEFLD;
+ break;
+ }
+ //-----IAccessibility2 Implementation 2009
default:
{
String const str( (bName)
@@ -369,9 +420,6 @@ SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
SwLinePortion *pRet = 0;
if( !pHint )
{
-#if OSL_DEBUG_LEVEL > 1
-// aDbstream << "NewExtraPortion: hint not found?" << endl;
-#endif
pRet = new SwTxtPortion;
pRet->SetLen( 1 );
rInf.SetLen( 1 );
@@ -380,43 +428,40 @@ SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
switch( pHint->Which() )
{
- case RES_TXTATR_FLYCNT :
+ case RES_TXTATR_FLYCNT :
{
pRet = NewFlyCntPortion( rInf, pHint );
break;
}
- case RES_TXTATR_FTN :
+ case RES_TXTATR_FTN :
{
pRet = NewFtnPortion( rInf, pHint );
break;
}
- case RES_TXTATR_FIELD :
+ case RES_TXTATR_FIELD :
{
pRet = NewFldPortion( rInf, pHint );
break;
}
- case RES_TXTATR_REFMARK :
+ case RES_TXTATR_REFMARK :
{
pRet = new SwIsoRefPortion;
break;
}
- case RES_TXTATR_TOXMARK :
+ case RES_TXTATR_TOXMARK :
{
pRet = new SwIsoToxPortion;
break;
}
- case RES_TXTATR_METAFIELD:
+ case RES_TXTATR_METAFIELD:
{
pRet = lcl_NewMetaPortion( *pHint, true );
break;
}
- default: ;
+ default: ;
}
if( !pRet )
{
-#if OSL_DEBUG_LEVEL > 1
-// aDbstream << "NewExtraPortion: unknown hint" << endl;
-#endif
const XubString aNothing;
pRet = new SwFldPortion( aNothing );
rInf.SetLen( 1 );
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index a58fceebc55f..9647364f9c6e 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1329,16 +1329,6 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
}
break;
-/* Seit dem neuen Blocksatz muessen wir immer neu formatieren:
- case RES_PARATR_ADJUST:
- {
- if( GetShell() )
- {
- Prepare( PREP_CLEAR );
- }
- break;
- }
-*/
// 6870: SwDocPosUpdate auswerten.
case RES_DOCPOS_UPDATE:
{
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index abd205963c99..8945688013b5 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -240,7 +240,7 @@ String SwTOXMark::GetText() const
aStr = aAltText;
else if( pTxtAttr && pTxtAttr->GetpTxtNd() )
{
- xub_StrLen* pEndIdx = pTxtAttr->GetEnd();
+ const xub_StrLen* pEndIdx = pTxtAttr->GetEnd();
ASSERT( pEndIdx, "TOXMark ohne Mark!!");
if( pEndIdx )
{
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index e531761e042c..764b8d6828a0 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -232,8 +232,8 @@ sal_Bool SwTOXSortTabBase::operator==( const SwTOXSortTabBase& rCmp )
{
// beide Pointer vorhanden -> vergleiche Text
// beide Pointer nicht vorhanden -> vergleiche AlternativText
- const xub_StrLen *pEnd = pTxtMark->GetEnd(),
- *pEndCmp = rCmp.pTxtMark->GetEnd();
+ const xub_StrLen* pEnd = pTxtMark->End();
+ const xub_StrLen* pEndCmp = rCmp.pTxtMark->End();
String sMyTxt;
String sMyTxtReading;
@@ -275,8 +275,8 @@ sal_Bool SwTOXSortTabBase::operator<( const SwTOXSortTabBase& rCmp )
if( *pTxtMark->GetStart() == *rCmp.pTxtMark->GetStart() )
{
- const xub_StrLen *pEnd = pTxtMark->GetEnd(),
- *pEndCmp = rCmp.pTxtMark->GetEnd();
+ const xub_StrLen* pEnd = pTxtMark->End();
+ const xub_StrLen* pEndCmp = rCmp.pTxtMark->End();
String sMyTxt;
String sMyTxtReading;
@@ -432,7 +432,7 @@ void SwTOXIndex::GetText_Impl( String& rTxt, String& rTxtReading ) const
void SwTOXIndex::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 ) const
{
- const xub_StrLen* pEnd = pTxtMark->GetEnd();
+ const xub_StrLen* pEnd = pTxtMark->End();
String sTmp;
String sTmpReading;
if( pEnd && !pTxtMark->GetTOXMark().IsAlternativeText() &&
@@ -549,7 +549,7 @@ SwTOXContent::SwTOXContent( const SwTxtNode& rNd, const SwTxtTOXMark* pMark,
void SwTOXContent::GetText_Impl( String& rTxt, String& rTxtReading ) const
{
- const xub_StrLen* pEnd = pTxtMark->GetEnd();
+ const xub_StrLen* pEnd = pTxtMark->End();
if( pEnd && !pTxtMark->GetTOXMark().IsAlternativeText() )
{
rTxt = ((SwTxtNode*)aTOXSources[0].pNd)->GetExpandTxt(
@@ -564,7 +564,7 @@ void SwTOXContent::GetText_Impl( String& rTxt, String& rTxtReading ) const
void SwTOXContent::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 ) const
{
- const xub_StrLen* pEnd = pTxtMark->GetEnd();
+ const xub_StrLen* pEnd = pTxtMark->End();
if( pEnd && !pTxtMark->GetTOXMark().IsAlternativeText() )
((SwTxtNode*)aTOXSources[0].pNd)->GetExpandTxt( rNd, &rInsPos,
*pTxtMark->GetStart(),
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index feee13492942..52720547f481 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -48,13 +48,13 @@
*
****************************************************************************/
- // Konstruktor fuers Default vom Attribut-Pool
-SwFmtFld::SwFmtFld()
- : SfxPoolItem( RES_TXTATR_FIELD )
- , SwClient( 0 )
+// constructor for default item in attribute-pool
+SwFmtFld::SwFmtFld( sal_uInt16 nWhich )
+ : SfxPoolItem( nWhich )
+ , SwClient()
, SfxBroadcaster()
- , pField( 0 )
- , pTxtAttr( 0 )
+ , mpField( NULL )
+ , mpTxtFld( NULL )
{
}
@@ -62,10 +62,15 @@ SwFmtFld::SwFmtFld( const SwField &rFld )
: SfxPoolItem( RES_TXTATR_FIELD )
, SwClient( rFld.GetTyp() )
, SfxBroadcaster()
- , pField( 0 )
- , pTxtAttr( 0 )
+ , mpField( rFld.CopyField() )
+ , mpTxtFld( NULL )
{
- pField = rFld.CopyField();
+ // input field in-place editing
+ if ( GetField()->GetTyp()->Which() == RES_INPUTFLD )
+ {
+ SetWhich( RES_TXTATR_INPUTFIELD );
+ dynamic_cast<SwInputField*>(GetField())->SetFmtFld( *this );
+ }
}
// #i24434#
@@ -76,25 +81,31 @@ SwFmtFld::SwFmtFld( const SwFmtFld& rAttr )
: SfxPoolItem( RES_TXTATR_FIELD )
, SwClient()
, SfxBroadcaster()
- , pField( 0 )
- , pTxtAttr( 0 )
+ , mpField( NULL )
+ , mpTxtFld( NULL )
{
- if(rAttr.GetField())
+ if ( rAttr.GetField() )
{
rAttr.GetField()->GetTyp()->Add(this);
- pField = rAttr.GetField()->CopyField();
+ mpField = rAttr.GetField()->CopyField();
+ // input field in-place editing
+ if ( GetField()->GetTyp()->Which() == RES_INPUTFLD )
+ {
+ SetWhich( RES_TXTATR_INPUTFIELD );
+ dynamic_cast<SwInputField*>(GetField())->SetFmtFld( *this );
+ }
}
}
SwFmtFld::~SwFmtFld()
{
- SwFieldType* pType = pField ? pField->GetTyp() : 0;
+ SwFieldType* pType = mpField ? mpField->GetTyp() : 0;
if (pType && pType->Which() == RES_DBFLD)
pType = 0; // DB-Feldtypen zerstoeren sich selbst
Broadcast( SwFmtFldHint( this, SWFMTFLD_REMOVED ) );
- delete pField;
+ delete mpField;
// bei einige FeldTypen muessen wir den FeldTypen noch loeschen
if( pType && pType->IsLastDepend() )
@@ -131,22 +142,36 @@ void SwFmtFld::RegisterToFieldType( SwFieldType& rType )
// #111840#
-void SwFmtFld::SetFld(SwField * _pField)
+void SwFmtFld::SetField(SwField * _pField)
{
- if (NULL != pField)
- delete pField;
+ if (NULL != mpField)
+ delete mpField;
- pField = _pField;
+ mpField = _pField;
+ if ( GetField()->GetTyp()->Which() == RES_INPUTFLD )
+ {
+ dynamic_cast<SwInputField* >(GetField())->SetFmtFld( *this );
+ }
Broadcast( SwFmtFldHint( this, SWFMTFLD_CHANGED ) );
}
+void SwFmtFld::SetTxtFld( SwTxtFld& rTxtFld )
+{
+ mpTxtFld = &rTxtFld;
+}
+
+void SwFmtFld::ClearTxtFld()
+{
+ mpTxtFld = NULL;
+}
+
int SwFmtFld::operator==( const SfxPoolItem& rAttr ) const
{
ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
- return ( ( pField && ((SwFmtFld&)rAttr).GetField()
- && pField->GetTyp() == ((SwFmtFld&)rAttr).GetField()->GetTyp()
- && pField->GetFormat() == ((SwFmtFld&)rAttr).GetField()->GetFormat() ) )
- || ( !pField && !((SwFmtFld&)rAttr).GetField() );
+ return ( ( mpField && ((SwFmtFld&)rAttr).GetField()
+ && mpField->GetTyp() == ((SwFmtFld&)rAttr).GetField()->GetTyp()
+ && mpField->GetFormat() == ((SwFmtFld&)rAttr).GetField()->GetFormat() ) )
+ || ( !mpField && !((SwFmtFld&)rAttr).GetField() );
}
SfxPoolItem* SwFmtFld::Clone( SfxItemPool* ) const
@@ -156,7 +181,7 @@ SfxPoolItem* SwFmtFld::Clone( SfxItemPool* ) const
void SwFmtFld::SwClientNotify( const SwModify&, const SfxHint& rHint )
{
- if( !pTxtAttr )
+ if( !mpTxtFld )
return;
const SwFieldHint* pHint = dynamic_cast<const SwFieldHint*>( &rHint );
@@ -165,9 +190,9 @@ void SwFmtFld::SwClientNotify( const SwModify&, const SfxHint& rHint )
// replace field content by text
SwPaM* pPaM = pHint->GetPaM();
SwDoc* pDoc = pPaM->GetDoc();
- const SwTxtNode& rTxtNode = pTxtAttr->GetTxtNode();
+ const SwTxtNode& rTxtNode = mpTxtFld->GetTxtNode();
pPaM->GetPoint()->nNode = rTxtNode;
- pPaM->GetPoint()->nContent.Assign( (SwTxtNode*)&rTxtNode, *pTxtAttr->GetStart() );
+ pPaM->GetPoint()->nContent.Assign( (SwTxtNode*)&rTxtNode, *mpTxtFld->GetStart() );
String const aEntry( GetField()->ExpandField( pDoc->IsClipBoard() ) );
pPaM->SetMark();
@@ -179,14 +204,14 @@ void SwFmtFld::SwClientNotify( const SwModify&, const SfxHint& rHint )
void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
- if( !pTxtAttr )
+ if( !mpTxtFld )
return;
// don't do anything, especially not expand!
if( pNew && pNew->Which() == RES_OBJECTDYING )
return;
- SwTxtNode* pTxtNd = (SwTxtNode*)&pTxtAttr->GetTxtNode();
+ SwTxtNode* pTxtNd = (SwTxtNode*)&mpTxtFld->GetTxtNode();
ASSERT( pTxtNd, "wo ist denn mein Node?" );
if( pNew )
{
@@ -203,7 +228,7 @@ void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
// --> OD 2007-09-06 #i81002#
// ((SwGetRefField*)GetFld())->UpdateField();
- dynamic_cast<SwGetRefField*>(GetField())->UpdateField( pTxtAttr );
+ dynamic_cast<SwGetRefField*>(GetField())->UpdateField( mpTxtFld );
// <--
}
break;
@@ -243,14 +268,14 @@ void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
pType->GetValue( aCalc );
}
}
- pTxtAttr->Expand();
+ mpTxtFld->ExpandTxtFld();
}
sal_Bool SwFmtFld::GetInfo( SfxPoolItem& rInfo ) const
{
const SwTxtNode* pTxtNd;
if( RES_AUTOFMT_DOCNODE != rInfo.Which() ||
- !pTxtAttr || 0 == ( pTxtNd = pTxtAttr->GetpTxtNode() ) ||
+ !mpTxtFld || 0 == ( pTxtNd = mpTxtFld->GetpTxtNode() ) ||
&pTxtNd->GetNodes() != ((SwAutoFmtGetDocNode&)rInfo).pNodes )
return sal_True;
@@ -259,82 +284,68 @@ sal_Bool SwFmtFld::GetInfo( SfxPoolItem& rInfo ) const
}
-sal_Bool SwFmtFld::IsFldInDoc() const
+bool SwFmtFld::IsFldInDoc() const
{
- const SwTxtNode* pTxtNd;
- return pTxtAttr && 0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) &&
- pTxtNd->GetNodes().IsDocNodes();
+ return mpTxtFld != NULL
+ && mpTxtFld->IsFldInDoc();
}
sal_Bool SwFmtFld::IsProtect() const
{
- const SwTxtNode* pTxtNd;
- return pTxtAttr && 0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) &&
- pTxtNd->IsProtect();
+ return mpTxtFld != NULL
+ && mpTxtFld->GetpTxtNode() != NULL
+ && mpTxtFld->GetpTxtNode()->IsProtect();
}
-/*************************************************************************
-|*
-|* SwTxtFld::SwTxtFld()
-|*
-|* Beschreibung Attribut fuer automatischen Text, Ctor
-|* Ersterstellung BP 30.04.92
-|* Letzte Aenderung JP 15.08.94
-|*
-*************************************************************************/
-
-SwTxtFld::SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStartPos)
+
+
+
+SwTxtFld::SwTxtFld(
+ SwFmtFld & rAttr,
+ xub_StrLen const nStartPos )
: SwTxtAttr( rAttr, nStartPos )
, m_aExpand( rAttr.GetField()->ExpandField(true) )
- , m_pTxtNode( 0 )
+ , m_pTxtNode( NULL )
{
- rAttr.pTxtAttr = this;
+ rAttr.SetTxtFld( *this );
SetHasDummyChar(true);
}
SwTxtFld::~SwTxtFld( )
{
SwFmtFld & rFmtFld( static_cast<SwFmtFld &>(GetAttr()) );
- if (this == rFmtFld.pTxtAttr)
+ if ( this == rFmtFld.GetTxtFld() )
{
- rFmtFld.pTxtAttr = 0; // #i110140# invalidate!
+ rFmtFld.ClearTxtFld();
}
}
-/*************************************************************************
-|*
-|* SwTxtFld::Expand()
-|*
-|* Beschreibung exandiert das Feld und tauscht den Text im Node
-|* Ersterstellung BP 30.04.92
-|* Letzte Aenderung JP 15.08.94
-|*
-*************************************************************************/
-
-void SwTxtFld::Expand() const
+
+bool SwTxtFld::IsFldInDoc() const
+{
+ return GetpTxtNode() != NULL
+ && GetpTxtNode()->GetNodes().IsDocNodes();
+}
+
+void SwTxtFld::ExpandTxtFld() const
{
- // Wenn das expandierte Feld sich nicht veraendert hat, wird returnt
ASSERT( m_pTxtNode, "SwTxtFld: where is my TxtNode?" );
const SwField* pFld = GetFmtFld().GetField();
- XubString aNewExpand( pFld->ExpandField(m_pTxtNode->GetDoc()->IsClipBoard()) );
+ const XubString aNewExpand( pFld->ExpandField(m_pTxtNode->GetDoc()->IsClipBoard()) );
if( aNewExpand == m_aExpand )
{
// Bei Seitennummernfeldern
const sal_uInt16 nWhich = pFld->GetTyp()->Which();
- if( RES_CHAPTERFLD != nWhich && RES_PAGENUMBERFLD != nWhich &&
- RES_REFPAGEGETFLD != nWhich &&
- // --> FME 2005-05-23 #122919# Page count fields to not use aExpand
- // during formatting, therefore an invalidation of the text frame
- // has to be triggered even if aNewExpand == aExpand:
- ( RES_DOCSTATFLD != nWhich || DS_PAGE != static_cast<const SwDocStatField*>(pFld)->GetSubType() ) &&
- // <--
- ( RES_GETEXPFLD != nWhich || ((SwGetExpField*)pFld)->IsInBodyTxt() ) )
+ if ( RES_CHAPTERFLD != nWhich
+ && RES_PAGENUMBERFLD != nWhich
+ && RES_REFPAGEGETFLD != nWhich
+ // Page count fields to not use aExpand during formatting,
+ // therefore an invalidation of the text frame has to be triggered even if aNewExpand == aExpand:
+ && ( RES_DOCSTATFLD != nWhich || DS_PAGE != static_cast<const SwDocStatField*>(pFld)->GetSubType() )
+ && ( RES_GETEXPFLD != nWhich || ((SwGetExpField*)pFld)->IsInBodyTxt() ) )
{
- // BP: das muesste man noch optimieren!
- //JP 12.06.97: stimmt, man sollte auf jedenfall eine Status-
- // aenderung an die Frames posten
if( m_pTxtNode->CalcHiddenParaField() )
{
m_pTxtNode->ModifyNotification( 0, 0 );
@@ -345,15 +356,11 @@ void SwTxtFld::Expand() const
m_aExpand = aNewExpand;
- // 0, this for formatting
- m_pTxtNode->ModifyNotification( 0, const_cast<SwFmtFld*>( &GetFmtFld() ) );
+ const_cast<SwTxtFld*>(this)->NotifyContentChange( const_cast<SwFmtFld&>(GetFmtFld()) );
}
-/*************************************************************************
- * SwTxtFld::CopyFld()
- *************************************************************************/
-void SwTxtFld::CopyFld( SwTxtFld *pDest ) const
+void SwTxtFld::CopyTxtFld( SwTxtFld *pDest ) const
{
ASSERT( m_pTxtNode, "SwTxtFld: where is my TxtNode?" );
ASSERT( pDest->m_pTxtNode, "SwTxtFld: where is pDest's TxtNode?" );
@@ -361,8 +368,8 @@ void SwTxtFld::CopyFld( SwTxtFld *pDest ) const
IDocumentFieldsAccess* pIDFA = m_pTxtNode->getIDocumentFieldsAccess();
IDocumentFieldsAccess* pDestIDFA = pDest->m_pTxtNode->getIDocumentFieldsAccess();
- SwFmtFld& rFmtFld = (SwFmtFld&)pDest->GetFmtFld();
- const sal_uInt16 nFldWhich = rFmtFld.GetField()->GetTyp()->Which();
+ SwFmtFld& rDestFmtFld = (SwFmtFld&)pDest->GetFmtFld();
+ const sal_uInt16 nFldWhich = rDestFmtFld.GetField()->GetTyp()->Which();
if( pIDFA != pDestIDFA )
{
@@ -370,47 +377,54 @@ void SwTxtFld::CopyFld( SwTxtFld *pDest ) const
// der Feldtyp muss im neuen Dokument angemeldet werden.
// Z.B: Kopieren ins ClipBoard.
SwFieldType* pFldType;
- if( nFldWhich != RES_DBFLD && nFldWhich != RES_USERFLD &&
- nFldWhich != RES_SETEXPFLD && nFldWhich != RES_DDEFLD &&
- RES_AUTHORITY != nFldWhich )
+ if( nFldWhich != RES_DBFLD
+ && nFldWhich != RES_USERFLD
+ && nFldWhich != RES_SETEXPFLD
+ && nFldWhich != RES_DDEFLD
+ && RES_AUTHORITY != nFldWhich )
+ {
pFldType = pDestIDFA->GetSysFldType( nFldWhich );
+ }
else
- pFldType = pDestIDFA->InsertFldType( *rFmtFld.GetField()->GetTyp() );
+ {
+ pFldType = pDestIDFA->InsertFldType( *rDestFmtFld.GetField()->GetTyp() );
+ }
// Sonderbehandlung fuer DDE-Felder
if( RES_DDEFLD == nFldWhich )
{
- if( rFmtFld.GetTxtFld() )
- ((SwDDEFieldType*)rFmtFld.GetField()->GetTyp())->DecRefCnt();
+ if( rDestFmtFld.GetTxtFld() )
+ {
+ ((SwDDEFieldType*)rDestFmtFld.GetField()->GetTyp())->DecRefCnt();
+ }
((SwDDEFieldType*)pFldType)->IncRefCnt();
}
ASSERT( pFldType, "unbekannter FieldType" );
- pFldType->Add( &rFmtFld ); // ummelden
- rFmtFld.GetField()->ChgTyp( pFldType );
+ pFldType->Add( &rDestFmtFld ); // ummelden
+ rDestFmtFld.GetField()->ChgTyp( pFldType );
}
// Expressionfelder Updaten
- if( nFldWhich == RES_SETEXPFLD || nFldWhich == RES_GETEXPFLD ||
- nFldWhich == RES_HIDDENTXTFLD )
+ if( nFldWhich == RES_SETEXPFLD
+ || nFldWhich == RES_GETEXPFLD
+ || nFldWhich == RES_HIDDENTXTFLD )
{
SwTxtFld* pFld = (SwTxtFld*)this;
pDestIDFA->UpdateExpFlds( pFld, true );
}
// Tabellenfelder auf externe Darstellung
- else if( RES_TABLEFLD == nFldWhich &&
- ((SwTblField*)rFmtFld.GetField())->IsIntrnlName() )
+ else if( RES_TABLEFLD == nFldWhich
+ && ((SwTblField*)rDestFmtFld.GetField())->IsIntrnlName() )
{
// erzeuge aus der internen (fuer CORE) die externe (fuer UI) Formel
const SwTableNode* pTblNd = m_pTxtNode->FindTableNode();
if( pTblNd ) // steht in einer Tabelle
- ((SwTblField*)rFmtFld.GetField())->PtrToBoxNm( &pTblNd->GetTable() );
+ ((SwTblField*)rDestFmtFld.GetField())->PtrToBoxNm( &pTblNd->GetTable() );
}
}
-/* -----------------26.06.2003 13:54-----------------
- --------------------------------------------------*/
void SwTxtFld::NotifyContentChange(SwFmtFld& rFmtFld)
{
//if not in undo section notify the change
@@ -421,3 +435,83 @@ void SwTxtFld::NotifyContentChange(SwFmtFld& rFmtFld)
}
+// input field in-place editing
+SwTxtInputFld::SwTxtInputFld(
+ SwFmtFld & rAttr,
+ xub_StrLen const nStart,
+ xub_StrLen const nEnd )
+
+ : SwTxtFld( rAttr, nStart )
+ , m_nEnd( nEnd )
+{
+ SetHasDummyChar( false );
+ SetHasContent( true );
+
+ SetDontExpand( true );
+ SetLockExpandFlag( true );
+ SetDontExpandStartAttr( true );
+
+ SetNesting( true );
+}
+
+SwTxtInputFld::~SwTxtInputFld()
+{
+}
+
+xub_StrLen* SwTxtInputFld::GetEnd()
+{
+ return &m_nEnd;
+}
+
+void SwTxtInputFld::NotifyContentChange( SwFmtFld& rFmtFld )
+{
+ SwTxtFld::NotifyContentChange( rFmtFld );
+
+ UpdateTextNodeContent( GetFieldContent() );
+}
+
+const String SwTxtInputFld::GetFieldContent() const
+{
+ return GetFmtFld().GetField()->ExpandField(false);
+}
+
+void SwTxtInputFld::UpdateFieldContent()
+{
+ if ( IsFldInDoc()
+ && (*GetStart()) != (*End()) )
+ {
+ ASSERT( (*End()) - (*GetStart()) >= 2,
+ "<SwTxtInputFld::UpdateFieldContent()> - Are CH_TXT_ATR_INPUTFIELDSTART and/or CH_TXT_ATR_INPUTFIELDEND missing?" );
+ // skip CH_TXT_ATR_INPUTFIELDSTART character
+ const xub_StrLen nIdx = (*GetStart()) + 1;
+ // skip CH_TXT_ATR_INPUTFIELDEND character
+ const xub_StrLen nLen = static_cast<xub_StrLen>(std::max( 0, ( (*End()) - 1 - nIdx ) ));
+ const String aNewFieldContent = GetTxtNode().GetExpandTxt( nIdx, nLen );
+
+ const SwInputField* pInputFld = dynamic_cast<const SwInputField*>(GetFmtFld().GetField());
+ ASSERT( pInputFld != NULL,
+ "<SwTxtInputFld::GetContent()> - Missing <SwInputFld> instance!" );
+ if ( pInputFld != NULL )
+ {
+ const_cast<SwInputField*>(pInputFld)->applyFieldContent( aNewFieldContent );
+ }
+ }
+}
+
+void SwTxtInputFld::UpdateTextNodeContent( const String& rNewContent )
+{
+ if ( !IsFldInDoc() )
+ {
+ ASSERT( false, "<SwTxtInputFld::UpdateTextNodeContent(..)> - misusage as Input Field is not in document content." );
+ return;
+ }
+
+ ASSERT( (*End()) - (*GetStart()) >= 2,
+ "<SwTxtInputFld::UpdateTextNodeContent(..)> - Are CH_TXT_ATR_INPUTFIELDSTART and/or CH_TXT_ATR_INPUTFIELDEND missing?" );
+ // skip CH_TXT_ATR_INPUTFIELDSTART character
+ const xub_StrLen nIdx = (*GetStart()) + 1;
+ // skip CH_TXT_ATR_INPUTFIELDEND character
+ const xub_StrLen nDelLen = static_cast<xub_StrLen>(std::max( 0, ( (*End()) - 1 - nIdx ) ));
+ SwIndex aIdx( &GetTxtNode(), nIdx );
+ GetTxtNode().ReplaceText( aIdx, nDelLen, rNewContent );
+}
diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx
index cd389440ffc2..9635fd988b9b 100644
--- a/sw/source/core/txtnode/ndhints.cxx
+++ b/sw/source/core/txtnode/ndhints.cxx
@@ -52,8 +52,8 @@ void DumpHints( const SwpHtStart &rHtStart,
((((aDbstream << '\t').WriteNumber( i )<< " [").WriteNumber( pHt->Which() )
<< ']' << '\t').WriteNumber( long( pHt ) )
<< '\t').WriteNumber( *pHt->GetStart() );
- if( pHt->GetEnd() )
- (aDbstream << " -> " ).WriteNumber( *pHt->GetEnd() );
+ if( pHt->End() )
+ (aDbstream << " -> " ).WriteNumber( *pHt->End() );
aDbstream << endl;
}
(aDbstream << "\tEnds:").WriteNumber( rHtEnd.Count() )<< endl;
@@ -62,8 +62,8 @@ void DumpHints( const SwpHtStart &rHtStart,
const SwTxtAttr *pHt = rHtEnd[i];
(((aDbstream << '\t').WriteNumber( i )<< " [").WriteNumber( pHt->Which() )
<< ']' << '\t' ).WriteNumber( long( pHt ) );
- if( pHt->GetEnd() )
- (aDbstream << '\t').WriteNumber( *pHt->GetEnd() )<< " <- ";
+ if( pHt->End() )
+ (aDbstream << '\t').WriteNumber( *pHt->End() )<< " <- ";
aDbstream.WriteNumber( *pHt->GetStart() )<< endl;
}
aDbstream << endl;
@@ -370,11 +370,11 @@ bool SwpHintsArray::Check() const
CHECK_ERR( 0 == i ||
( RES_TXTATR_CHARFMT != pHtLast->Which() && RES_TXTATR_AUTOFMT != pHtLast->Which() ) ||
( RES_TXTATR_CHARFMT != pHtThis->Which() && RES_TXTATR_AUTOFMT != pHtThis->Which() ) ||
- ( *pHtThis->GetStart() >= *pHtLast->GetEnd() ) ||
+ ( *pHtThis->GetStart() >= *pHtLast->End() ) ||
( ( ( (*pHtThis->GetStart() == *pHtLast->GetStart())
- && (*pHtThis->GetEnd() == *pHtLast->GetEnd())
+ && (*pHtThis->End() == *pHtLast->End())
) // same range
- || (*pHtThis->GetStart() == *pHtThis->GetEnd())
+ || (*pHtThis->GetStart() == *pHtThis->End())
)
&& ( (pHtThis->Which() != RES_TXTATR_AUTOFMT)
|| (pHtLast->Which() != RES_TXTATR_AUTOFMT)
@@ -392,8 +392,8 @@ bool SwpHintsArray::Check() const
if ( pOther->IsNesting() && (i != j) )
{
SwComparePosition cmp = ComparePosition(
- *pHtThis->GetStart(), *pHtThis->GetEnd(),
- *pOther->GetStart(), *pOther->GetEnd());
+ *pHtThis->GetStart(), *pHtThis->End(),
+ *pOther->GetStart(), *pOther->End());
CHECK_ERR( (POS_OVERLAP_BEFORE != cmp) &&
(POS_OVERLAP_BEHIND != cmp),
"HintsCheck: overlapping nesting hints!!!" );
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 14c459587f5d..8fa75a677c50 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -259,22 +259,16 @@ SwTxtNode::~SwTxtNode()
m_pSwpHints = 0;
for( sal_uInt16 j = pTmpHints->Count(); j; )
+ {
// erst muss das Attribut aus dem Array entfernt werden,
// denn sonst wuerde es sich selbst loeschen (Felder) !!!!
DestroyAttr( pTmpHints->GetTextHint( --j ) );
+ }
delete pTmpHints;
}
- // --> OD 2008-03-13 #refactorlists#
-// if ( mpNodeNum )
-// {
-// mpNodeNum->RemoveMe();
-// delete mpNodeNum;
-// mpNodeNum = 0L;
-// }
RemoveFromList();
- // <--
InitSwParaStatistics( false );
}
@@ -857,8 +851,11 @@ void SwTxtNode::NewAttrSet( SwAttrPool& rPool )
// override SwIndexReg::Update => text hints do not need SwIndex for start/end!
-void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
- const bool bNegative, const bool bDelete )
+void SwTxtNode::Update(
+ SwIndex const & rPos,
+ const xub_StrLen nChangeLen,
+ const bool bNegative,
+ const bool bDelete )
{
SetAutoCompleteWordDirty( sal_True );
@@ -872,6 +869,8 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
const xub_StrLen nChangeEnd = nChangePos + nChangeLen;
for ( sal_uInt16 n = 0; n < m_pSwpHints->Count(); ++n )
{
+ bool bTxtAttrChanged = false;
+ bool bStartOfTxtAttrChanged = false;
SwTxtAttr * const pHint = m_pSwpHints->GetTextHint(n);
xub_StrLen * const pStart = pHint->GetStart();
if ( *pStart > nChangePos )
@@ -884,6 +883,7 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
{
*pStart = nChangePos;
}
+ bStartOfTxtAttrChanged = true;
}
xub_StrLen * const pEnd = pHint->GetEnd();
@@ -899,6 +899,17 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
{
*pEnd = nChangePos;
}
+ bTxtAttrChanged = !bStartOfTxtAttrChanged;
+ }
+ }
+
+ if ( bTxtAttrChanged
+ && pHint->Which() == RES_TXTATR_INPUTFIELD )
+ {
+ SwTxtInputFld* pTxtInputFld = dynamic_cast<SwTxtInputFld*>(pHint);
+ if ( pTxtInputFld )
+ {
+ pTxtInputFld->UpdateFieldContent();
}
}
}
@@ -909,14 +920,15 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
{
bool bNoExp = false;
bool bResort = false;
- const sal_uInt16 coArrSz = static_cast<sal_uInt16>(RES_TXTATR_WITHEND_END) -
- static_cast<sal_uInt16>(RES_CHRATR_BEGIN);
+ const sal_uInt16 coArrSz =
+ static_cast<sal_uInt16>(RES_TXTATR_WITHEND_END) - static_cast<sal_uInt16>(RES_CHRATR_BEGIN);
sal_Bool aDontExp[ coArrSz ];
memset( &aDontExp, 0, coArrSz * sizeof(sal_Bool) );
for ( sal_uInt16 n = 0; n < m_pSwpHints->Count(); ++n )
{
+ bool bTxtAttrChanged = false;
SwTxtAttr * const pHint = m_pSwpHints->GetTextHint(n);
xub_StrLen * const pStart = pHint->GetStart();
xub_StrLen * const pEnd = pHint->GetEnd();
@@ -933,6 +945,7 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
if ( (*pEnd > nChangePos) || IsIgnoreDontExpand() )
{
*pEnd = *pEnd + nChangeLen;
+ bTxtAttrChanged = true;
}
else // *pEnd == nChangePos
{
@@ -975,26 +988,35 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
sal_uInt16 nCollCnt = pCollector->Count();
for( sal_uInt16 i = 0; i < nCollCnt; ++i )
{
- SwTxtAttr *pTmp = (*pCollector)[ i ];
- if( nWhich == pTmp->Which() )
- {
- pCollector->Remove( i );
- SwTxtAttr::Destroy( pTmp,
- GetDoc()->GetAttrPool() );
- break;
- }
+ SwTxtAttr *pTmp = (*pCollector)[ i ];
+ if( nWhich == pTmp->Which() )
+ {
+ pCollector->Remove( i );
+ SwTxtAttr::Destroy( pTmp, GetDoc()->GetAttrPool() );
+ break;
+ }
}
- SwTxtAttr * const pTmp = MakeTxtAttr( *GetDoc(),
- pHint->GetAttr(),
- nChangePos, nChangePos + nChangeLen);
+ SwTxtAttr * const pTmp =
+ MakeTxtAttr( *GetDoc(), pHint->GetAttr(), nChangePos, nChangePos + nChangeLen);
pCollector->C40_INSERT( SwTxtAttr, pTmp, pCollector->Count() );
}
else
{
*pEnd = *pEnd + nChangeLen;
+ bTxtAttrChanged = true;
}
}
}
+
+ if ( bTxtAttrChanged
+ && pHint->Which() == RES_TXTATR_INPUTFIELD )
+ {
+ SwTxtInputFld* pTxtInputFld = dynamic_cast<SwTxtInputFld*>(pHint);
+ if ( pTxtInputFld )
+ {
+ pTxtInputFld->UpdateFieldContent();
+ }
+ }
}
if ( bResort )
{
@@ -1047,10 +1069,9 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
}
const IDocumentMarkAccess* const pMarkAccess = getIDocumentMarkAccess();
- for(IDocumentMarkAccess::const_iterator_t ppMark =
- pMarkAccess->getMarksBegin();
- ppMark != pMarkAccess->getMarksEnd();
- ppMark++)
+ for ( IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->getMarksBegin();
+ ppMark != pMarkAccess->getMarksEnd();
+ ppMark++ )
{
// Bookmarks must never grow to either side, when
// editing (directly) to the left or right (#i29942#)!
@@ -1184,9 +1205,11 @@ static bool lcl_GetTxtAttrParent(xub_StrLen const nIndex,
static void
lcl_GetTxtAttrs(
- ::std::vector<SwTxtAttr *> *const pVector, SwTxtAttr **const ppTxtAttr,
+ ::std::vector<SwTxtAttr *> *const pVector,
+ SwTxtAttr **const ppTxtAttr,
SwpHints *const pSwpHints,
- xub_StrLen const nIndex, RES_TXTATR const nWhich,
+ xub_StrLen const nIndex,
+ RES_TXTATR const nWhich,
enum SwTxtNode::GetTxtAttrMode const eMode)
{
sal_uInt16 const nSize = (pSwpHints) ? pSwpHints->Count() : 0;
@@ -1215,10 +1238,9 @@ lcl_GetTxtAttrs(
}
xub_StrLen const*const pEndIdx = pHint->GetEnd();
- ASSERT(pEndIdx || pHint->HasDummyChar(),
- "hint with no end and no dummy char?");
- // Wenn bExpand gesetzt ist, wird das Verhalten bei Eingabe
- // simuliert, d.h. der Start wuede verschoben, das Ende expandiert,
+ ASSERT(pEndIdx || pHint->HasDummyChar(), "hint with no end and no dummy char?");
+ // Wenn bExpand gesetzt ist, wird das Verhalten bei Eingabe
+ // simuliert, d.h. der Start wuede verschoben, das Ende expandiert,
bool const bContained( (pEndIdx)
? (*pMatchFunc)(nIndex, nHintStart, *pEndIdx)
: (nHintStart == nIndex) );
@@ -1263,7 +1285,8 @@ SwTxtNode::GetTxtAttrAt(xub_StrLen const nIndex, RES_TXTATR const nWhich,
|| (nWhich == RES_TXTATR_AUTOFMT)
|| (nWhich == RES_TXTATR_INETFMT)
|| (nWhich == RES_TXTATR_CJK_RUBY)
- || (nWhich == RES_TXTATR_UNKNOWN_CONTAINER),
+ || (nWhich == RES_TXTATR_UNKNOWN_CONTAINER)
+ || (nWhich == RES_TXTATR_INPUTFIELD ),
"GetTxtAttrAt() will give wrong result for this hint!");
SwTxtAttr * pRet(0);
@@ -1271,6 +1294,40 @@ SwTxtNode::GetTxtAttrAt(xub_StrLen const nIndex, RES_TXTATR const nWhich,
return pRet;
}
+const SwTxtInputFld* SwTxtNode::GetOverlappingInputFld( const SwTxtAttr& rTxtAttr ) const
+{
+ const SwTxtInputFld* pTxtInputFld = NULL;
+
+ pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtAttrAt( *(rTxtAttr.GetStart()), RES_TXTATR_INPUTFIELD, PARENT ));
+
+ if ( pTxtInputFld == NULL && rTxtAttr.End() != NULL )
+ {
+ pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtAttrAt( *(rTxtAttr.End()), RES_TXTATR_INPUTFIELD, PARENT ));
+ }
+
+ return pTxtInputFld;
+}
+
+SwTxtFld* SwTxtNode::GetFldTxtAttrAt(
+ const xub_StrLen nIndex,
+ const bool bIncludeInputFldAtStart ) const
+{
+ SwTxtFld* pTxtFld = NULL;
+
+ pTxtFld = dynamic_cast<SwTxtFld*>(GetTxtAttrForCharAt( nIndex, RES_TXTATR_FIELD ));
+ if ( pTxtFld == NULL )
+ {
+ pTxtFld =
+ dynamic_cast<SwTxtFld*>( GetTxtAttrAt(
+ nIndex,
+ RES_TXTATR_INPUTFIELD,
+ bIncludeInputFldAtStart ? DEFAULT : PARENT ));
+ }
+
+ return pTxtFld;
+}
+
+
/*************************************************************************
* CopyHint()
*************************************************************************/
@@ -1291,77 +1348,80 @@ SwCharFmt* lcl_FindCharFmt( const SwCharFmts* pCharFmts, const XubString& rName
return NULL;
}
-void lcl_CopyHint( const sal_uInt16 nWhich, const SwTxtAttr * const pHt,
- SwTxtAttr *const pNewHt, SwDoc *const pOtherDoc, SwTxtNode *const pDest )
+void lcl_CopyHint(
+ const sal_uInt16 nWhich,
+ const SwTxtAttr * const pHt,
+ SwTxtAttr *const pNewHt,
+ SwDoc *const pOtherDoc,
+ SwTxtNode *const pDest )
{
ASSERT( nWhich == pHt->Which(), "Falsche Hint-Id" );
switch( nWhich )
{
- // copy nodesarray section with footnote content
- case RES_TXTATR_FTN :
+ // copy nodesarray section with footnote content
+ case RES_TXTATR_FTN :
ASSERT(pDest, "lcl_CopyHint: no destination text node?");
- static_cast<const SwTxtFtn*>(pHt)->CopyFtn(
- *static_cast<SwTxtFtn*>(pNewHt), *pDest);
+ static_cast<const SwTxtFtn*>(pHt)->CopyFtn( *static_cast<SwTxtFtn*>(pNewHt), *pDest);
break;
- // Beim Kopieren von Feldern in andere Dokumente
- // muessen die Felder bei ihren neuen Feldtypen angemeldet werden.
+ // Beim Kopieren von Feldern in andere Dokumente
+ // muessen die Felder bei ihren neuen Feldtypen angemeldet werden.
- // TabellenFormel muessen relativ kopiert werden.
- case RES_TXTATR_FIELD :
+ // TabellenFormel muessen relativ kopiert werden.
+ case RES_TXTATR_FIELD :
+ case RES_TXTATR_INPUTFIELD :
+ {
+ if( pOtherDoc )
{
- const SwFmtFld& rFld = pHt->GetFmtFld();
- if( pOtherDoc )
- {
- static_cast<const SwTxtFld*>(pHt)->CopyFld(
- static_cast<SwTxtFld*>(pNewHt) );
- }
+ static_cast<const SwTxtFld*>(pHt)->CopyTxtFld( static_cast<SwTxtFld*>(pNewHt) );
+ }
- // Tabellenformel ??
- if( RES_TABLEFLD == rFld.GetField()->GetTyp()->Which()
- && static_cast<const SwTblField*>(rFld.GetField())->IsIntrnlName())
+ // Tabellenformel ??
+ const SwFmtFld& rFld = pHt->GetFmtFld();
+ if( RES_TABLEFLD == rFld.GetField()->GetTyp()->Which()
+ && static_cast<const SwTblField*>(rFld.GetField())->IsIntrnlName())
+ {
+ // wandel die interne in eine externe Formel um
+ const SwTableNode* const pDstTblNd =
+ static_cast<const SwTxtFld*>(pHt)->GetTxtNode().FindTableNode();
+ if( pDstTblNd )
{
- // wandel die interne in eine externe Formel um
- const SwTableNode* const pDstTblNd =
- static_cast<const SwTxtFld*>(pHt)->GetTxtNode().FindTableNode();
- if( pDstTblNd )
- {
- SwTblField* const pTblFld = const_cast<SwTblField*>(
- static_cast<const SwTblField*>(pNewHt->GetFmtFld().GetField()));
- pTblFld->PtrToBoxNm( &pDstTblNd->GetTable() );
- }
+ SwTblField* const pTblFld = const_cast<SwTblField*>(
+ static_cast<const SwTblField*>(pNewHt->GetFmtFld().GetField()));
+ pTblFld->PtrToBoxNm( &pDstTblNd->GetTable() );
}
}
- break;
+ }
+ break;
- case RES_TXTATR_TOXMARK :
- if( pOtherDoc && pDest && pDest->GetpSwpHints()
- && USHRT_MAX != pDest->GetpSwpHints()->GetPos( pNewHt ) )
- {
- // Beim Kopieren von TOXMarks(Client) in andere Dokumente
- // muss der Verzeichnis (Modify) ausgetauscht werden
- static_cast<SwTxtTOXMark*>(pNewHt)->CopyTOXMark( pOtherDoc );
- }
- break;
+ case RES_TXTATR_TOXMARK :
+ if( pOtherDoc && pDest && pDest->GetpSwpHints()
+ && USHRT_MAX != pDest->GetpSwpHints()->GetPos( pNewHt ) )
+ {
+ // Beim Kopieren von TOXMarks(Client) in andere Dokumente
+ // muss der Verzeichnis (Modify) ausgetauscht werden
+ static_cast<SwTxtTOXMark*>(pNewHt)->CopyTOXMark( pOtherDoc );
+ }
+ break;
- case RES_TXTATR_CHARFMT :
- // Wenn wir es mit einer Zeichenvorlage zu tun haben,
- // muessen wir natuerlich auch die Formate kopieren.
- if( pDest && pDest->GetpSwpHints()
- && USHRT_MAX != pDest->GetpSwpHints()->GetPos( pNewHt ) )
- {
- SwCharFmt* pFmt =
- static_cast<SwCharFmt*>(pHt->GetCharFmt().GetCharFmt());
+ case RES_TXTATR_CHARFMT :
+ // Wenn wir es mit einer Zeichenvorlage zu tun haben,
+ // muessen wir natuerlich auch die Formate kopieren.
+ if( pDest && pDest->GetpSwpHints()
+ && USHRT_MAX != pDest->GetpSwpHints()->GetPos( pNewHt ) )
+ {
+ SwCharFmt* pFmt =
+ static_cast<SwCharFmt*>(pHt->GetCharFmt().GetCharFmt());
- if( pFmt && pOtherDoc )
- {
- pFmt = pOtherDoc->CopyCharFmt( *pFmt );
- }
- const_cast<SwFmtCharFmt&>( static_cast<const SwFmtCharFmt&>(
- pNewHt->GetCharFmt() ) ).SetCharFmt( pFmt );
+ if( pFmt && pOtherDoc )
+ {
+ pFmt = pOtherDoc->CopyCharFmt( *pFmt );
}
- break;
- case RES_TXTATR_INETFMT :
+ const_cast<SwFmtCharFmt&>( static_cast<const SwFmtCharFmt&>(
+ pNewHt->GetCharFmt() ) ).SetCharFmt( pFmt );
+ }
+ break;
+ case RES_TXTATR_INETFMT :
{
// Wenn wir es mit benutzerdefinierten INet-Zeichenvorlagen
// zu tun haben, muessen wir natuerlich auch die Formate kopieren.
@@ -1369,7 +1429,7 @@ void lcl_CopyHint( const sal_uInt16 nWhich, const SwTxtAttr * const pHt,
&& USHRT_MAX != pDest->GetpSwpHints()->GetPos( pNewHt ) )
{
const SwDoc* const pDoc = static_cast<const SwTxtINetFmt*>(pHt)
- ->GetTxtNode().GetDoc();
+ ->GetTxtNode().GetDoc();
if ( pDoc )
{
const SwCharFmts* pCharFmts = pDoc->GetCharFmts();
@@ -1396,13 +1456,13 @@ void lcl_CopyHint( const sal_uInt16 nWhich, const SwTxtAttr * const pHt,
pINetHt->GetCharFmt();
break;
}
- case RES_TXTATR_META:
- case RES_TXTATR_METAFIELD:
- OSL_ENSURE(pNewHt, "copying Meta should not fail!");
- OSL_ENSURE(pDest && (CH_TXTATR_INWORD ==
- pDest->GetTxt().GetChar(*pNewHt->GetStart())),
- "missing CH_TXTATR?");
- break;
+ case RES_TXTATR_META:
+ case RES_TXTATR_METAFIELD:
+ OSL_ENSURE( pNewHt, "copying Meta should not fail!" );
+ OSL_ENSURE( pDest
+ && (CH_TXTATR_INWORD == pDest->GetTxt().GetChar(*pNewHt->GetStart())),
+ "missing CH_TXTATR?");
+ break;
}
}
@@ -1428,34 +1488,33 @@ void SwTxtNode::CopyAttr( SwTxtNode *pDest, const xub_StrLen nTxtStartIdx,
SwTxtAttr *const pHt = m_pSwpHints->GetTextHint(i);
xub_StrLen const nAttrStartIdx = *pHt->GetStart();
if ( nTxtStartIdx < nAttrStartIdx )
- break; // ueber das Textende, da nLen == 0
+ break; // ueber das Textende, da nLen == 0
const xub_StrLen *const pEndIdx = pHt->GetEnd();
if ( pEndIdx && !pHt->HasDummyChar() )
{
- if( ( *pEndIdx > nTxtStartIdx ||
- ( *pEndIdx == nTxtStartIdx &&
- nAttrStartIdx == nTxtStartIdx ) ) )
+ if ( ( *pEndIdx > nTxtStartIdx
+ || ( *pEndIdx == nTxtStartIdx
+ && nAttrStartIdx == nTxtStartIdx ) ) )
{
sal_uInt16 const nWhich = pHt->Which();
if ( RES_TXTATR_REFMARK != nWhich )
{
// attribute in the area => copy
- SwTxtAttr *const pNewHt = pDest->InsertItem(
- pHt->GetAttr(), nOldPos, nOldPos,
- nsSetAttrMode::SETATTR_IS_COPY);
+ SwTxtAttr *const pNewHt =
+ pDest->InsertItem( pHt->GetAttr(), nOldPos, nOldPos, nsSetAttrMode::SETATTR_IS_COPY);
if ( pNewHt )
{
lcl_CopyHint( nWhich, pHt, pNewHt,
- pOtherDoc, pDest );
+ pOtherDoc, pDest );
}
}
- else if( !pOtherDoc ? GetDoc()->IsCopyIsMove()
- : 0 == pOtherDoc->GetRefMark(
- pHt->GetRefMark().GetRefName() ) )
+ else if( !pOtherDoc
+ ? GetDoc()->IsCopyIsMove()
+ : 0 == pOtherDoc->GetRefMark( pHt->GetRefMark().GetRefName() ) )
{
- pDest->InsertItem( pHt->GetAttr(), nOldPos, nOldPos,
- nsSetAttrMode::SETATTR_IS_COPY);
+ pDest->InsertItem(
+ pHt->GetAttr(), nOldPos, nOldPos, nsSetAttrMode::SETATTR_IS_COPY);
}
}
}
@@ -1476,7 +1535,6 @@ void SwTxtNode::CopyAttr( SwTxtNode *pDest, const xub_StrLen nTxtStartIdx,
|* wird angehaengt
*************************************************************************/
-// --> OD 2008-11-18 #i96213#
// introduction of new optional parameter to control, if all attributes have to be copied.
void SwTxtNode::CopyText( SwTxtNode *const pDest,
const SwIndex &rStart,
@@ -1486,16 +1544,13 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
SwIndex aIdx( pDest, pDest->m_Text.Len() );
CopyText( pDest, aIdx, rStart, nLen, bForceCopyOfAllAttrs );
}
-// <--
-// --> OD 2008-11-18 #i96213#
// introduction of new optional parameter to control, if all attributes have to be copied.
void SwTxtNode::CopyText( SwTxtNode *const pDest,
const SwIndex &rDestStart,
const SwIndex &rStart,
xub_StrLen nLen,
const bool bForceCopyOfAllAttrs )
-// <--
{
xub_StrLen nTxtStartIdx = rStart.GetIndex();
xub_StrLen nDestStart = rDestStart.GetIndex(); // alte Pos merken
@@ -1557,26 +1612,23 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
if ( !nLen ) // string not longer?
return;
- SwDoc* const pOtherDoc = (pDest->GetDoc() != GetDoc()) ?
- pDest->GetDoc() : 0;
+ SwDoc* const pOtherDoc = (pDest->GetDoc() != GetDoc()) ? pDest->GetDoc() : 0;
// harte Absatz umspannende Attribute kopieren
if( HasSwAttrSet() )
{
// alle, oder nur die CharAttribute ?
- // --> OD 2008-11-18 #i96213#
- if ( !bForceCopyOfAllAttrs &&
- ( nDestStart ||
- pDest->HasSwAttrSet() ||
- nLen != pDest->GetTxt().Len() ) )
- // <--
+ if ( !bForceCopyOfAllAttrs
+ && ( nDestStart
+ || pDest->HasSwAttrSet()
+ || nLen != pDest->GetTxt().Len() ) )
{
SfxItemSet aCharSet( pDest->GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_CHRATR_END-1,
- RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
- RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
- RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
- 0 );
+ RES_CHRATR_BEGIN, RES_CHRATR_END-1,
+ RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
+ RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
+ RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
+ 0 );
aCharSet.Put( *GetpSwAttrSet() );
if( aCharSet.Count() )
{
@@ -1590,7 +1642,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
}
bool const bUndoNodes = !pOtherDoc
- && GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(GetNodes());
+ && GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(GetNodes());
// Ende erst jetzt holen, weil beim Kopieren in sich selbst der
// Start-Index und alle Attribute vorher aktualisiert werden.
@@ -1611,11 +1663,11 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
SwpHts aRefMrkArr;
sal_uInt16 nDeletedDummyChars(0);
- //Achtung: kann ungueltig sein!!
+ //Achtung: kann ungueltig sein!!
for (sal_uInt16 n = 0; ( n < nSize ); ++n)
{
const xub_StrLen nAttrStartIdx = *(*m_pSwpHints)[n]->GetStart();
- if (!( nAttrStartIdx < nEnd))
+ if ( !( nAttrStartIdx < nEnd) )
break;
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(n);
@@ -1628,16 +1680,32 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
// erkennen und sammeln, nach dem kopieren Loeschen.
// Nimmt sein Zeichen mit ins Grab !!
// JP 14.08.95: Duerfen RefMarks gemovt werden?
- int bCopyRefMark = RES_TXTATR_REFMARK == nWhich && ( bUndoNodes ||
- (!pOtherDoc ? GetDoc()->IsCopyIsMove()
- : 0 == pOtherDoc->GetRefMark(
- pHt->GetRefMark().GetRefName() )));
+ const bool bCopyRefMark = RES_TXTATR_REFMARK == nWhich
+ && ( bUndoNodes
+ || ( !pOtherDoc
+ ? GetDoc()->IsCopyIsMove()
+ : 0 == pOtherDoc->GetRefMark( pHt->GetRefMark().GetRefName() ) ) );
- if( pEndIdx && RES_TXTATR_REFMARK == nWhich && !bCopyRefMark )
+ if ( pEndIdx
+ && RES_TXTATR_REFMARK == nWhich
+ && !bCopyRefMark )
{
continue;
}
+ // Input Fields are only copied, if completely covered by copied text
+ if ( nWhich == RES_TXTATR_INPUTFIELD )
+ {
+ ASSERT( pEndIdx != NULL,
+ "<SwTxtNode::CopyText(..)> - RES_TXTATR_INPUTFIELD without EndIndex!" );
+ if ( nAttrStartIdx < nTxtStartIdx
+ || ( pEndIdx != NULL
+ && *(pEndIdx) > nEnd ) )
+ {
+ continue;
+ }
+ }
+
xub_StrLen nAttrStt;
xub_StrLen nAttrEnd;
@@ -1650,8 +1718,8 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
// attribute with extent and the end is in the selection
nAttrStt = nDestStart;
nAttrEnd = (*pEndIdx > nEnd)
- ? rDestStart.GetIndex()
- : nDestStart + (*pEndIdx) - nTxtStartIdx;
+ ? rDestStart.GetIndex()
+ : nDestStart + (*pEndIdx) - nTxtStartIdx;
}
else
{
@@ -1665,8 +1733,8 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
if( pEndIdx )
{
nAttrEnd = *pEndIdx > nEnd
- ? rDestStart.GetIndex()
- : nDestStart + ( *pEndIdx - nTxtStartIdx );
+ ? rDestStart.GetIndex()
+ : nDestStart + ( *pEndIdx - nTxtStartIdx );
}
else
{
@@ -2284,7 +2352,7 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
// 1. The hint ends before the deletion end position or
// 2. The hint ends at the deletion end position and
// we are not in empty expand mode and
- // the hint is a [toxmark|refmark|ruby] text attribute
+ // the hint is a [toxmark|refmark|ruby|inputfield] text attribute
// 3. deleting exactly the dummy char of an hint with end and dummy
// char deletes the hint
if ( (*pHtEndIdx < nEndIdx)
@@ -2292,16 +2360,9 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
!(IDocumentContentOperations::INS_EMPTYEXPAND & nMode) &&
( (RES_TXTATR_TOXMARK == nWhich) ||
(RES_TXTATR_REFMARK == nWhich) ||
- // --> FME 2006-03-03 #i62668# Ruby text attribute must be
- // treated just like toxmark and refmarks
- (RES_TXTATR_CJK_RUBY == nWhich) ) )
- // <--
-#if 0
- || ( (nHintStart == nStartIdx) &&
- (nHintStart + 1 == nEndIdx)&&
-#else // generalize this to left-overlapped dummy char hints (see ASSERT)
+ (RES_TXTATR_CJK_RUBY == nWhich) ||
+ (RES_TXTATR_INPUTFIELD == nWhich) ) )
|| ( (nHintStart < nEndIdx) &&
-#endif
pHt->HasDummyChar() )
)
{
@@ -2354,10 +2415,9 @@ void SwTxtNode::GCAttr()
return;
bool bChanged = false;
- sal_uInt16 nMin = m_Text.Len(),
- nMax = 0;
- sal_Bool bAll = nMin != 0; // Bei leeren Absaetzen werden nur die
- // INet-Formate entfernt.
+ sal_uInt16 nMin = m_Text.Len();
+ sal_uInt16 nMax = 0;
+ const bool bAll = nMin != 0; // Bei leeren Absaetzen werden nur die INet-Formate entfernt.
for ( sal_uInt16 i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i )
{
@@ -2426,84 +2486,7 @@ SwNumRule* SwTxtNode::_GetNumRule(sal_Bool bInParent) const
}
}
}
-
- // --> OD 2006-11-20 #i71764#
- // Document setting OUTLINE_LEVEL_YIELDS_OUTLINE_RULE has no influence
- // any more.
-// if ( !pRet &&
-// GetDoc()->get(IDocumentSettingAccess::OUTLINE_LEVEL_YIELDS_OUTLINE_RULE) &&
-// GetOutlineLevel() != NO_NUMBERING )
-// {
-// pRet = GetDoc()->GetOutlineNumRule();
-// }
- // <--
}
- // old code before tuning
-// // --> OD 2005-10-25 #126347#
-// // determine of numbering/bullet rule, which is set as a hard attribute
-// // at the text node
-// const SfxPoolItem* pItem( 0L );
-// if ( HasSwAttrSet() ) // does text node has hard attributes ?
-// {
-// if ( SFX_ITEM_SET !=
-// GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem ) )
-// {
-// pItem = 0L;
-// }
-// // else: <pItem> contains the numbering/bullet attribute, which is
-// // hard set at the paragraph.
-
-// }
-// // <--
-// bool bNoNumRule = false;
-// if (pItem)
-// {
-// String sNumRuleName = static_cast<const SwNumRuleItem *>(pItem)->GetValue();
-// if (sNumRuleName.Len() > 0)
-// {
-// pRet = GetDoc()->FindNumRulePtr(sNumRuleName);
-// }
-// else // numbering is turned off by hard attribute
-// bNoNumRule = true;
-// }
-
-// if (! bNoNumRule)
-// {
-// if (! pRet && bInParent)
-// {
-// SwTxtFmtColl * pColl = GetTxtColl();
-
-// if (pColl)
-// {
-// const SwNumRuleItem & rItem = pColl->GetNumRule(sal_True);
-
-// pRet = const_cast<SwDoc *>(GetDoc())->
-// FindNumRulePtrWithPool(rItem.GetValue());
-// // --> OD 2005-10-13 #125993# - The outline numbering rule
-// // isn't allowed to be derived from a parent paragraph style
-// // to a derived one.
-// // Thus check, if the found outline numbering rule is directly
-// // set at the paragraph style <pColl>. If not, don't return
-// // the outline numbering rule.
-// if ( pRet && pRet == GetDoc()->GetOutlineNumRule() )
-// {
-// const SwNumRuleItem& rDirectItem = pColl->GetNumRule(sal_False);
-// SwNumRule* pNumRuleAtParaStyle = const_cast<SwDoc*>(GetDoc())->
-// FindNumRulePtrWithPool(rDirectItem.GetValue());
-// if ( !pNumRuleAtParaStyle )
-// {
-// pRet = 0L;
-// }
-// }
-// // <--
-// }
-// }
-
-// if (!pRet && GetDoc()->IsOutlineLevelYieldsOutlineRule() &&
-// GetOutlineLevel() != NO_NUMBERING)
-// pRet = GetDoc()->GetOutlineNumRule();
-// }
- // <--
return pRet;
}
@@ -2712,7 +2695,6 @@ SwCntntNode* SwTxtNode::AppendNode( const SwPosition & rPos )
SwNodeIndex aIdx( rPos.nNode, 1 );
SwTxtNode* pNew = _MakeNewTxtNode( aIdx, sal_True );
- // --> OD 2008-05-14 #refactorlists#
// reset list attributes at appended text node
pNew->ResetAttr( RES_PARATR_LIST_ISRESTART );
pNew->ResetAttr( RES_PARATR_LIST_RESTARTVALUE );
@@ -2722,14 +2704,11 @@ SwCntntNode* SwTxtNode::AppendNode( const SwPosition & rPos )
pNew->ResetAttr( RES_PARATR_LIST_ID );
pNew->ResetAttr( RES_PARATR_LIST_LEVEL );
}
- // <--
- // --> OD 2008-03-13 #refactorlists#
-// SyncNumberAndNumRule();
+
if ( !IsInList() && GetNumRule() && GetListId().Len() > 0 )
{
AddToList();
}
- // <--
if( GetDepends() )
MakeFrms( *pNew );
@@ -2740,7 +2719,8 @@ SwCntntNode* SwTxtNode::AppendNode( const SwPosition & rPos )
* SwTxtNode::GetTxtAttr
*************************************************************************/
-SwTxtAttr * SwTxtNode::GetTxtAttrForCharAt( const xub_StrLen nIndex,
+SwTxtAttr * SwTxtNode::GetTxtAttrForCharAt(
+ const xub_StrLen nIndex,
const RES_TXTATR nWhich ) const
{
if ( HasHints() )
@@ -2756,7 +2736,7 @@ SwTxtAttr * SwTxtNode::GetTxtAttrForCharAt( const xub_StrLen nIndex,
if ( (nIndex == nStartPos) && pHint->HasDummyChar() )
{
return ( RES_TXTATR_END == nWhich || nWhich == pHint->Which() )
- ? pHint : 0;
+ ? pHint : 0;
}
}
}
@@ -3092,6 +3072,11 @@ XubString SwTxtNode::GetExpandTxt( const xub_StrLen nIdx,
XubString aTxt( GetTxt().Copy( nIdx, nLen ) );
xub_StrLen nTxtStt = nIdx;
Replace0xFF( aTxt, nTxtStt, aTxt.Len(), sal_True );
+
+ // remove dummy characters of Input Fields
+ aTxt.EraseAllChars( CH_TXT_ATR_INPUTFIELDSTART );
+ aTxt.EraseAllChars( CH_TXT_ATR_INPUTFIELDEND );
+
if( bWithNum )
{
XubString aListLabelStr = GetNumString();
@@ -3145,6 +3130,11 @@ sal_Bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
SwScriptInfo::MaskHiddenRanges( *this, sTmpText, 0, sTmpText.Len(), cChar );
sTmpText = sTmpText.Copy( nIdx, nLen );
+ // remove dummy characters of Input Fields
+ {
+ sTmpText.EraseAllChars( CH_TXT_ATR_INPUTFIELDSTART );
+ sTmpText.EraseAllChars( CH_TXT_ATR_INPUTFIELDEND );
+ }
rDestNd.InsertText( sTmpText, aDestIdx );
nLen = aDestIdx.GetIndex() - nDestStt;
@@ -3160,7 +3150,7 @@ sal_Bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
if (nIdx + nLen <= nAttrStartIdx)
break; // ueber das Textende
- const xub_StrLen *pEndIdx = pHt->GetEnd();
+ const xub_StrLen *pEndIdx = pHt->End();
if( pEndIdx && *pEndIdx > nIdx &&
( RES_CHRATR_FONT == nWhich ||
RES_TXTATR_CHARFMT == nWhich ||
@@ -3470,19 +3460,12 @@ namespace {
bParagraphStyleChanged = true;
if( rTxtNode.GetNodes().IsDocNodes() )
{
- // --> OD 2008-12-17 #i70748#
- // The former list style set at the paragraph can not be
- // retrieved from the change set.
-// sOldNumRule =
-// dynamic_cast<const SwFmtChg*>(pOldValue)->pChangedFmt->GetNumRule().GetValue();
const SwNumRule* pFormerNumRuleAtTxtNode =
rTxtNode.GetNum() ? rTxtNode.GetNum()->GetNumRule() : 0;
if ( pFormerNumRuleAtTxtNode )
{
sOldNumRule = pFormerNumRuleAtTxtNode->GetName();
}
- // <--
- // --> OD 2008-11-19 #i70748#
if ( rTxtNode.IsEmptyListStyleDueToSetOutlineLevelAttr() )
{
const SwNumRuleItem& rNumRuleItem = rTxtNode.GetTxtColl()->GetNumRule();
@@ -3491,7 +3474,6 @@ namespace {
rTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr();
}
}
- // <--
const SwNumRule* pNumRuleAtTxtNode = rTxtNode.GetNumRule();
if ( pNumRuleAtTxtNode )
{
@@ -3504,80 +3486,45 @@ namespace {
case RES_ATTRSET_CHG:
{
const SfxPoolItem* pItem = 0;
- // --> OD 2008-12-19 #i70748#
- // The former list style set at the paragraph can not be
- // retrieved from the change set.
-// if ( dynamic_cast<const SwAttrSetChg*>(pOldValue)->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem ) ==
-// SFX_ITEM_SET )
-// {
-// sOldNumRule = dynamic_cast<const SwNumRuleItem*>(pItem)->GetValue();
-// }
const SwNumRule* pFormerNumRuleAtTxtNode =
rTxtNode.GetNum() ? rTxtNode.GetNum()->GetNumRule() : 0;
if ( pFormerNumRuleAtTxtNode )
{
sOldNumRule = pFormerNumRuleAtTxtNode->GetName();
}
- // <--
if ( dynamic_cast<const SwAttrSetChg*>(pNewValue)->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem ) ==
SFX_ITEM_SET )
{
- // --> OD 2008-11-19 #i70748#
rTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr();
- // <--
bNumRuleSet = true;
- // The new list style set at the paragraph can not be
- // retrieved from the change set.
-// sNumRule = dynamic_cast<const SwNumRuleItem*>(pItem)->GetValue();
- // <--
}
- // --> OD 2008-12-17 #i70748#
- // The new list style set at the paragraph.
const SwNumRule* pNumRuleAtTxtNode = rTxtNode.GetNumRule();
if ( pNumRuleAtTxtNode )
{
sNumRule = pNumRuleAtTxtNode->GetName();
}
- // <--
break;
}
case RES_PARATR_NUMRULE:
{
if ( rTxtNode.GetNodes().IsDocNodes() )
{
- // The former list style set at the paragraph can not be
- // retrieved from the change set.
-// if ( pOldValue )
-// {
-// sOldNumRule = dynamic_cast<const SwNumRuleItem*>(pOldValue)->GetValue();
-// }
const SwNumRule* pFormerNumRuleAtTxtNode =
rTxtNode.GetNum() ? rTxtNode.GetNum()->GetNumRule() : 0;
if ( pFormerNumRuleAtTxtNode )
{
sOldNumRule = pFormerNumRuleAtTxtNode->GetName();
}
- // <--
if ( pNewValue )
{
- // --> OD 2008-11-19 #i70748#
rTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr();
- // <--
bNumRuleSet = true;
- // --> OD 2008-12-17 #i70748#
- // The new list style set at the paragraph can not be
- // retrieved from the change set.
-// sNumRule = dynamic_cast<const SwNumRuleItem*>(pNewValue)->GetValue();
- // <--
}
- // --> OD 2008-12-17 #i70748#
- // The new list style set at the paragraph.
const SwNumRule* pNumRuleAtTxtNode = rTxtNode.GetNumRule();
if ( pNumRuleAtTxtNode )
{
sNumRule = pNumRuleAtTxtNode->GetName();
}
- // <--
}
break;
}
@@ -3598,12 +3545,10 @@ namespace {
aResetAttrsArray.Insert( RES_PARATR_LIST_RESTARTVALUE );
aResetAttrsArray.Insert( RES_PARATR_LIST_ISCOUNTED );
SwPaM aPam( rTxtNode );
- // --> OD 2008-11-28 #i96644#
// suppress side effect "send data changed events"
rTxtNode.GetDoc()->ResetAttrs( aPam, sal_False,
&aResetAttrsArray,
false );
- // <--
}
}
else
@@ -3614,12 +3559,9 @@ namespace {
if ( sNumRule ==
String::CreateFromAscii( SwNumRule::GetOutlineRuleName() ) )
{
- // --> OD 2008-09-10 #i70748#
ASSERT( rTxtNode.GetTxtColl()->IsAssignedToListLevelOfOutlineStyle(),
"<HandleModifyAtTxtNode()> - text node with outline style, but its paragraph style is not assigned to outline style." );
- int nNewListLevel =
- rTxtNode.GetTxtColl()->GetAssignedOutlineStyleLevel();
- // <--
+ const int nNewListLevel = rTxtNode.GetTxtColl()->GetAssignedOutlineStyleLevel();
if ( 0 <= nNewListLevel && nNewListLevel < MAXLEVEL )
{
rTxtNode.SetAttrListLevel( nNewListLevel );
@@ -3640,18 +3582,13 @@ namespace {
aResetAttrsArray.Insert( RES_PARATR_LIST_RESTARTVALUE );
aResetAttrsArray.Insert( RES_PARATR_LIST_ISCOUNTED );
SwPaM aPam( rTxtNode );
- // --> OD 2008-11-28 #i96644#
- // suppress side effect "send data changed events"
rTxtNode.GetDoc()->ResetAttrs( aPam, sal_False,
&aResetAttrsArray,
false );
- // <--
- // --> OD 2008-11-19 #i70748#
if ( dynamic_cast<const SfxUInt16Item &>(rTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, sal_False )).GetValue() > 0 )
{
rTxtNode.SetEmptyListStyleDueToSetOutlineLevelAttr();
}
- // <--
}
}
}
@@ -3659,7 +3596,6 @@ namespace {
{
rTxtNode.AddToList();
}
- // <--
}
// End of method <HandleModifyAtTxtNode>
}
@@ -5068,16 +5004,19 @@ SwTxtNode::MakeUnoObject()
SwXParagraph::CreateXParagraph(*GetDoc(), *this), uno::UNO_QUERY);
return xMeta;
}
+
//Bug 120881:Modify here for Directly Page Numbering
bool SwTxtNode::HasPageNumberField()
{
- xub_StrLen nEnd = Len();
- for(xub_StrLen nStart=0;nStart<nEnd;nStart++)
+ const xub_StrLen nEnd = Len();
+ for( xub_StrLen nStart = 0; nStart < nEnd; ++nStart )
{
- const SwTxtFld* pFld = GetTxtFld(nStart);
- const SwField* pSwField = pFld
- ? pFld->GetFmtFld().GetField()
- : NULL;
+ const SwTxtAttr* pTxtAttr = GetTxtAttrAt( nStart, RES_TXTATR_FIELD );
+ if ( pTxtAttr == NULL )
+ {
+ continue;
+ }
+ const SwField* pSwField = pTxtAttr->GetFmtFld().GetField();
const SwFieldType* pType = pSwField
? pSwField->GetTyp()
: NULL;
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 97ac87a1c5c1..03bf0b1f067f 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -441,6 +441,7 @@ SwFont::SwFont( const SwFont &rFont )
nToxCnt = 0;
nRefCnt = 0;
m_nMetaCount = 0;
+ m_nInputFieldCount = 0;
bFntChg = rFont.bFntChg;
bOrgChg = rFont.bOrgChg;
bPaintBlank = rFont.bPaintBlank;
@@ -459,6 +460,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
nToxCnt = 0;
nRefCnt = 0;
m_nMetaCount = 0;
+ m_nInputFieldCount = 0;
bPaintBlank = sal_False;
bPaintWrong = sal_False;
bURL = sal_False;
@@ -590,6 +592,7 @@ SwFont& SwFont::operator=( const SwFont &rFont )
nToxCnt = 0;
nRefCnt = 0;
m_nMetaCount = 0;
+ m_nInputFieldCount = 0;
bFntChg = rFont.bFntChg;
bOrgChg = rFont.bOrgChg;
bPaintBlank = rFont.bPaintBlank;
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 451f57ff4348..35ce95c25ef4 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -123,7 +123,7 @@ struct TxtAttrContains
TxtAttrContains( const xub_StrLen nPos ) : m_nPos( nPos ) { }
bool operator() (SwTxtAttrEnd * const pAttr)
{
- return (*pAttr->GetStart() < m_nPos) && (m_nPos < *pAttr->GetEnd());
+ return (*pAttr->GetStart() < m_nPos) && (m_nPos < *pAttr->End());
}
};
@@ -167,7 +167,8 @@ static
bool isSelfNestable(const sal_uInt16 nWhich)
{
if ((RES_TXTATR_INETFMT == nWhich) ||
- (RES_TXTATR_CJK_RUBY == nWhich))
+ (RES_TXTATR_CJK_RUBY == nWhich) ||
+ (RES_TXTATR_INPUTFIELD == nWhich))
return false;
ASSERT((RES_TXTATR_META == nWhich) ||
(RES_TXTATR_METAFIELD == nWhich), "???");
@@ -181,7 +182,8 @@ bool isSplittable(const sal_uInt16 nWhich)
(RES_TXTATR_CJK_RUBY == nWhich))
return true;
ASSERT((RES_TXTATR_META == nWhich) ||
- (RES_TXTATR_METAFIELD == nWhich), "???");
+ (RES_TXTATR_METAFIELD == nWhich) ||
+ (RES_TXTATR_INPUTFIELD == nWhich), "???");
return false;
}
@@ -202,8 +204,10 @@ splitPolicy(const sal_uInt16 nWhichNew, const sal_uInt16 nWhichOther)
}
else
{
- if ((RES_TXTATR_INETFMT == nWhichNew) &&
- (RES_TXTATR_CJK_RUBY == nWhichOther))
+ if ( RES_TXTATR_INPUTFIELD == nWhichNew )
+ return FAIL;
+ else if ( (RES_TXTATR_INETFMT == nWhichNew) &&
+ (RES_TXTATR_CJK_RUBY == nWhichOther) )
return SPLIT_NEW;
else
return SPLIT_OTHER;
@@ -362,14 +366,14 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
const sal_uInt16 nNewWhich( rNewHint.Which() );
const xub_StrLen nNewStart( *rNewHint.GetStart() );
const xub_StrLen nNewEnd ( *rNewHint.GetEnd() );
-//??? const bool bNoLengthAttribute( nNewStart == nNewEnd );
const bool bNewSelfNestable( isSelfNestable(nNewWhich) );
ASSERT( (RES_TXTATR_INETFMT == nNewWhich) ||
(RES_TXTATR_CJK_RUBY == nNewWhich) ||
(RES_TXTATR_META == nNewWhich) ||
- (RES_TXTATR_METAFIELD == nNewWhich),
- "TryInsertNesting: Expecting INETFMT or RUBY or META or METAFIELD" );
+ (RES_TXTATR_METAFIELD == nNewWhich) ||
+ (RES_TXTATR_INPUTFIELD == nNewWhich),
+ "TryInsertNesting: Expecting INETFMT or RUBY or META or METAFIELD or INPUTFIELD" );
NestList_t OverlappingExisting; // existing hints to be split
NestList_t OverwrittenExisting; // existing hints to be replaced
@@ -681,7 +685,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
continue;
const xub_StrLen nOtherStart = *pOther->GetStart();
- const xub_StrLen nOtherEnd = *pOther->GetEnd();
+ const xub_StrLen nOtherEnd = *pOther->End();
aBounds.insert( nOtherStart );
aBounds.insert( nOtherEnd );
@@ -989,9 +993,13 @@ SwTxtAttr* MakeRedlineTxtAttr( SwDoc & rDoc, SfxPoolItem & rAttr )
}
// create new text attribute
-SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr,
- xub_StrLen const nStt, xub_StrLen const nEnd,
- CopyOrNew_t const bIsCopy, SwTxtNode *const pTxtNode)
+SwTxtAttr* MakeTxtAttr(
+ SwDoc & rDoc,
+ SfxPoolItem& rAttr,
+ xub_StrLen const nStt,
+ xub_StrLen const nEnd,
+ CopyOrNew_t const bIsCopy,
+ SwTxtNode *const pTxtNode )
{
if ( isCHRATR(rAttr.Which()) )
{
@@ -1041,6 +1049,9 @@ SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr,
case RES_TXTATR_FIELD:
pNew = new SwTxtFld( static_cast<SwFmtFld &>(rNew), nStt );
break;
+ case RES_TXTATR_INPUTFIELD:
+ pNew = new SwTxtInputFld( static_cast<SwFmtFld &>(rNew), nStt, nEnd );
+ break;
case RES_TXTATR_FLYCNT:
{
// erst hier wird das Frame-Format kopiert (mit Inhalt) !!
@@ -1126,6 +1137,7 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* pAttr )
break;
case RES_TXTATR_FIELD:
+ case RES_TXTATR_INPUTFIELD:
if( !pDoc->IsInDtor() )
{
// Wenn wir ein HiddenParaField sind, dann muessen wir
@@ -1228,7 +1240,7 @@ SwTxtNode::InsertItem( SfxPoolItem& rAttr,
// take ownership of pAttr; if insertion fails, delete pAttr
bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
{
- sal_Bool bHiddenPara = sal_False;
+ bool bHiddenPara = false;
ASSERT( pAttr && *pAttr->GetStart() <= Len(), "StartIdx out of bounds!" );
ASSERT( !pAttr->GetEnd() || (*pAttr->GetEnd() <= Len()),
@@ -1250,7 +1262,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
sal_uInt16 nInsMode = nMode;
switch( pAttr->Which() )
{
- case RES_TXTATR_FLYCNT:
+ case RES_TXTATR_FLYCNT:
{
SwTxtFlyCnt *pFly = (SwTxtFlyCnt *)pAttr;
SwFrmFmt* pFmt = pAttr->GetFlyCnt().GetFrmFmt();
@@ -1264,7 +1276,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
// erfolgen (Fehleranfaellig !)
const SwFmtAnchor* pAnchor = 0;
pFmt->GetItemState( RES_ANCHOR, sal_False,
- (const SfxPoolItem**)&pAnchor );
+ (const SfxPoolItem**)&pAnchor );
SwIndex aIdx( this, *pAttr->GetStart() );
const sal_Unicode c = GetCharOfTxtAttr(*pAttr);
@@ -1325,7 +1337,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
break;
}
- case RES_TXTATR_FTN :
+ case RES_TXTATR_FTN :
{
// Fussnoten, man kommt an alles irgendwie heran.
// CntntNode erzeugen und in die Inserts-Section stellen
@@ -1343,10 +1355,10 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
{
// loesche das Zeichen aus dem String !
ASSERT( ( CH_TXTATR_BREAKWORD ==
- m_Text.GetChar(*pAttr->GetStart() ) ||
- CH_TXTATR_INWORD ==
- m_Text.GetChar(*pAttr->GetStart())),
- "where is my attribute character?" );
+ m_Text.GetChar(*pAttr->GetStart() ) ||
+ CH_TXTATR_INWORD ==
+ m_Text.GetChar(*pAttr->GetStart())),
+ "where is my attribute character?" );
m_Text.Erase( *pAttr->GetStart(), 1 );
// Indizies Updaten
SwIndex aTmpIdx( this, *pAttr->GetStart() );
@@ -1403,8 +1415,8 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
pDoc->GetFtnIdxs().Remove( n );
break;
}
- // wenn ueber Undo der StartNode gesetzt wurde, kann
- // der Index noch gar nicht in der Verwaltung stehen !!
+ // wenn ueber Undo der StartNode gesetzt wurde, kann
+ // der Index noch gar nicht in der Verwaltung stehen !!
}
if( !pTxtFtn )
pTxtFtn = (SwTxtFtn*)pAttr;
@@ -1434,9 +1446,10 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
{
// fuer HiddenParaFields Benachrichtigungsmechanismus
// anwerfen
- if( RES_HIDDENPARAFLD ==
- pAttr->GetFmtFld().GetField()->GetTyp()->Which() )
- bHiddenPara = sal_True;
+ if( RES_HIDDENPARAFLD == pAttr->GetFmtFld().GetField()->GetTyp()->Which() )
+ {
+ bHiddenPara = true;
+ }
}
break;
@@ -1459,25 +1472,144 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
}
}
+ // handle attributes which provide content
+ xub_StrLen nEnd = nStart;
+ bool bInputFieldStartCharInserted = false;
+ bool bInputFieldEndCharInserted = false;
+ const bool bHasContent( pAttr->HasContent() );
+ if ( bHasContent )
+ {
+ switch( pAttr->Which() )
+ {
+ case RES_TXTATR_INPUTFIELD:
+ {
+ SwTxtInputFld* pTxtInputFld = dynamic_cast<SwTxtInputFld*>(pAttr);
+ if ( pTxtInputFld )
+ {
+ if( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nMode) )
+ {
+ SwIndex aIdx( this, *pAttr->GetStart() );
+ InsertText( CH_TXT_ATR_INPUTFIELDSTART, aIdx, nInsertFlags );
+ const String aContent = pTxtInputFld->GetFieldContent();
+ InsertText( aContent, aIdx, nInsertFlags );
+ InsertText( CH_TXT_ATR_INPUTFIELDEND, aIdx, nInsertFlags );
+
+ xub_StrLen * const pEnd(pAttr->GetEnd());
+ ASSERT( pEnd != NULL, "<SwTxtNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" );
+ if ( pEnd != NULL )
+ {
+ *pEnd = *pEnd + 2 + aContent.Len();
+ nEnd = *pEnd;
+ }
+ }
+ else
+ {
+ // assure that CH_TXT_ATR_INPUTFIELDSTART and CH_TXT_ATR_INPUTFIELDEND are inserted.
+ if ( m_Text.GetChar( *(pAttr->GetStart()) ) != CH_TXT_ATR_INPUTFIELDSTART )
+ {
+ SwIndex aIdx( this, *pAttr->GetStart() );
+ InsertText( CH_TXT_ATR_INPUTFIELDSTART, aIdx, nInsertFlags );
+ bInputFieldStartCharInserted = true;
+ xub_StrLen * const pEnd(pAttr->GetEnd());
+ ASSERT( pEnd != NULL, "<SwTxtNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" );
+ if ( pEnd != NULL )
+ {
+ *pEnd = *pEnd + 1;
+ nEnd = *pEnd;
+ }
+ }
+
+ xub_StrLen * const pEnd(pAttr->GetEnd());
+ ASSERT( pEnd != NULL, "<SwTxtNode::InsertHint(..)> - missing end of RES_TXTATR_INPUTFIELD!" );
+ if ( pEnd != NULL
+ && m_Text.GetChar( *(pEnd) - 1 ) != CH_TXT_ATR_INPUTFIELDEND )
+ {
+ SwIndex aIdx( this, *(pEnd) );
+ InsertText( CH_TXT_ATR_INPUTFIELDEND, aIdx, nInsertFlags );
+ bInputFieldEndCharInserted = true;
+ *pEnd = *pEnd + 1;
+ nEnd = *pEnd;
+ }
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
GetOrCreateSwpHints();
+ // handle overlap with an existing InputField
+ bool bInsertHint = true;
+ {
+ const SwTxtInputFld* pTxtInputFld = GetOverlappingInputFld( *pAttr );
+ if ( pTxtInputFld != NULL )
+ {
+ if ( pAttr->End() == NULL )
+ {
+ bInsertHint = false;
+ }
+ else
+ {
+ if ( *(pAttr->GetStart()) > *(pTxtInputFld->GetStart()) )
+ {
+ *(pAttr->GetStart()) = *(pTxtInputFld->GetStart());
+ }
+ if ( *(pAttr->End()) < *(pTxtInputFld->End()) )
+ {
+ *(pAttr->GetEnd()) = *(pTxtInputFld->End());
+ }
+ }
+ }
+ }
+
// 4263: AttrInsert durch TextInsert => kein Adjust
- const bool bRet = m_pSwpHints->TryInsertHint( pAttr, *this, nMode );
+ const bool bRet = bInsertHint
+ ? m_pSwpHints->TryInsertHint( pAttr, *this, nMode )
+ : false;
- if (!bRet && bDummyChar)
+ if ( !bRet )
{
- // undo insertion of dummy character
- // N.B. cannot insert the dummy character after inserting the hint,
- // because if the hint has no extent it will be moved in InsertText,
- // resulting in infinite recursion
- if ( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nMode) )
+ if ( bDummyChar
+ && !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nMode) )
{
+ // undo insertion of dummy character
+ // N.B. cannot insert the dummy character after inserting the hint,
+ // because if the hint has no extent it will be moved in InsertText,
+ // resulting in infinite recursion
ASSERT( ( CH_TXTATR_BREAKWORD == m_Text.GetChar(nStart) ||
- CH_TXTATR_INWORD == m_Text.GetChar(nStart) ),
- "where is my attribute character?" );
+ CH_TXTATR_INWORD == m_Text.GetChar(nStart) ),
+ "where is my attribute character?" );
SwIndex aIdx( this, nStart );
EraseText( aIdx, 1 );
}
+
+ if ( bHasContent )
+ {
+ if ( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nMode)
+ && (nEnd - nStart) > 0 )
+ {
+ SwIndex aIdx( this, nStart );
+ EraseText( aIdx, (nEnd - nStart) );
+ }
+ else
+ {
+ if ( bInputFieldEndCharInserted
+ && (nEnd - nStart) > 0 )
+ {
+ SwIndex aIdx( this, nEnd - 1 );
+ EraseText( aIdx, 1 );
+ }
+
+ if ( bInputFieldStartCharInserted )
+ {
+ SwIndex aIdx( this, nStart );
+ EraseText( aIdx, 1 );
+ }
+ }
+ }
}
if ( bHiddenPara )
@@ -1508,6 +1640,12 @@ void SwTxtNode::DeleteAttribute( SwTxtAttr * const pAttr )
// erase the CH_TXTATR, which will also delete pAttr
EraseText( aIdx, 1 );
}
+ else if ( pAttr->HasContent() )
+ {
+ const SwIndex aIdx( this, *pAttr->GetStart() );
+ ASSERT( pAttr->End() != NULL, "<SwTxtNode::DeleteAttribute(..)> - missing End() at <SwTxtAttr> instance which has content" );
+ EraseText( aIdx, *pAttr->End() - *pAttr->GetStart() );
+ }
else
{
// create MsgHint before start/end become invalid
@@ -1526,8 +1664,10 @@ void SwTxtNode::DeleteAttribute( SwTxtAttr * const pAttr )
*************************************************************************/
//FIXME: this does NOT respect SORT NUMBER (for CHARFMT)!
-void SwTxtNode::DeleteAttributes( const sal_uInt16 nWhich,
- const xub_StrLen nStart, const xub_StrLen nEnd )
+void SwTxtNode::DeleteAttributes(
+ const sal_uInt16 nWhich,
+ const xub_StrLen nStart,
+ const xub_StrLen nEnd )
{
if ( !HasHints() )
return;
@@ -1555,7 +1695,7 @@ void SwTxtNode::DeleteAttributes( const sal_uInt16 nWhich,
if ( SFX_ITEM_SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, sal_True, &pItem ) )
SetCalcHiddenCharFlags();
}
- // --> FME 2007-03-16 #i75430# Recalc hidden flags if necessary
+ // Recalc hidden flags if necessary
else if ( nWhich == RES_TXTATR_AUTOFMT )
{
// Check if auto style contains hidden attribute:
@@ -1563,7 +1703,6 @@ void SwTxtNode::DeleteAttributes( const sal_uInt16 nWhich,
if ( pHiddenItem )
SetCalcHiddenCharFlags();
}
- // <--
xub_StrLen const * const pEndIdx = pTxtHt->GetEnd();
@@ -1574,6 +1713,12 @@ void SwTxtNode::DeleteAttributes( const sal_uInt16 nWhich,
// erase the CH_TXTATR, which will also delete pTxtHt
EraseText( aIdx, 1 );
}
+ else if ( pTxtHt->HasContent() )
+ {
+ const SwIndex aIdx( this, nStart );
+ ASSERT( pTxtHt->End() != NULL, "<SwTxtNode::DeleteAttributes(..)> - missing End() at <SwTxtAttr> instance which has content" );
+ EraseText( aIdx, *pTxtHt->End() - nStart );
+ }
else if( *pEndIdx == nEnd )
{
// den MsgHint jetzt fuettern, weil gleich sind
@@ -1681,8 +1826,11 @@ bool SwTxtNode::TryCharSetExpandToNum(const SfxItemSet& aCharSet)
// setze diese Attribute am TextNode. Wird der gesamte Bereich umspannt,
// dann setze sie nur im AutoAttrSet (SwCntntNode:: SetAttr)
-sal_Bool SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
- xub_StrLen nEnd, const SetAttrMode nMode )
+sal_Bool SwTxtNode::SetAttr(
+ const SfxItemSet& rSet,
+ const xub_StrLen nStt,
+ const xub_StrLen nEnd,
+ const SetAttrMode nMode )
{
if( !rSet.Count() )
return sal_False;
@@ -1760,7 +1908,7 @@ sal_Bool SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
static_cast<const SwFmtCharFmt*>(pItem)->GetCharFmt()))
{
SwIndex aIndex( this, nStt );
- RstAttr( aIndex, nEnd - nStt, RES_TXTATR_CHARFMT, 0 );
+ RstTxtAttr( aIndex, nEnd - nStt, RES_TXTATR_CHARFMT, 0 );
DontExpandFmt( aIndex );
}
else
@@ -1947,7 +2095,7 @@ sal_Bool SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
if( nAttrStart > nEnd ) // ueber den Bereich hinaus
break;
- const xub_StrLen* pAttrEnd = pHt->GetEnd();
+ const xub_StrLen* pAttrEnd = pHt->End();
if ( ! pAttrEnd ) // no attributes without end
continue;
@@ -1975,7 +2123,7 @@ sal_Bool SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
if( nAttrStart > nEnd ) // ueber den Bereich hinaus
break;
- const xub_StrLen* pAttrEnd = pHt->GetEnd();
+ const xub_StrLen* pAttrEnd = pHt->End();
if ( ! pAttrEnd ) // no attributes without end
continue;
@@ -2208,7 +2356,7 @@ lcl_CollectHintSpans(const SwpHints& i_rHints, const sal_uInt16 nLength,
const sal_uInt16 nWhich(pHint->Which());
if (nWhich == RES_TXTATR_CHARFMT || nWhich == RES_TXTATR_AUTOFMT)
{
- const AttrSpan_t aSpan(*pHint->GetStart(), *pHint->GetEnd());
+ const AttrSpan_t aSpan(*pHint->GetStart(), *pHint->End());
o_rSpanMap.insert(AttrSpanMap_t::value_type(aSpan, pHint));
// < not != because there may be multiple CHARFMT at same range
@@ -2555,7 +2703,7 @@ bool SwpHints::MergePortions( SwTxtNode& rNode )
{
const SwTxtAttr* p1 = (*aIter1).second;
const SwTxtAttr* p2 = (*aIter2).second;
- if ( *p1->GetEnd() < *p2->GetStart() || p1->Which() != p2->Which() || !(*p1 == *p2) )
+ if ( *p1->End() < *p2->GetStart() || p1->Which() != p2->Which() || !(*p1 == *p2) )
{
bMerge = false;
break;
@@ -2632,7 +2780,7 @@ void lcl_CheckSortNumber( const SwpHints& rHints, SwTxtCharFmt& rNewCharFmt )
if ( RES_TXTATR_CHARFMT == pOtherHt->Which() )
{
- const xub_StrLen nOtherEnd = *pOtherHt->GetEnd();
+ const xub_StrLen nOtherEnd = *pOtherHt->End();
if ( nOtherStart == nHtStart && nOtherEnd == nHtEnd )
{
@@ -2702,6 +2850,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
static_cast<SwTxtINetFmt*>(pHint)->InitINetFmt(rNode);
break;
case RES_TXTATR_FIELD:
+ case RES_TXTATR_INPUTFIELD:
{
sal_Bool bDelFirst = 0 != ((SwTxtFld*)pHint)->GetpTxtNode();
((SwTxtFld*)pHint)->ChgTxtNode( &rNode );
@@ -3023,6 +3172,7 @@ void SwTxtNode::ClearSwpHintsArr( bool bDelFields )
break;
case RES_TXTATR_FIELD:
+ case RES_TXTATR_INPUTFIELD:
if( bDelFields )
bDel = true;
break;
@@ -3071,7 +3221,7 @@ sal_uInt16 SwTxtNode::GetLang( const xub_StrLen nBegin, const xub_StrLen nLen,
if( nWhichId == nWhich ||
( ( pHt->IsCharFmtAttr() || RES_TXTATR_AUTOFMT == nWhich ) && CharFmt::IsItemIncluded( nWhichId, pHt ) ) )
{
- const xub_StrLen *pEndIdx = pHt->GetEnd();
+ const xub_StrLen *pEndIdx = pHt->End();
// Ueberlappt das Attribut den Bereich?
if( pEndIdx &&
diff --git a/sw/source/core/txtnode/txatbase.cxx b/sw/source/core/txtnode/txatbase.cxx
index 2a1f746f9097..75ddc60fc301 100644
--- a/sw/source/core/txtnode/txatbase.cxx
+++ b/sw/source/core/txtnode/txatbase.cxx
@@ -42,6 +42,7 @@ SwTxtAttr::SwTxtAttr( SfxPoolItem& rAttr, xub_StrLen nStart )
, m_bDontExpandStart( false )
, m_bNesting( false )
, m_bHasDummyChar( false )
+ , m_bHasContent( false )
{
}
diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx
index 4c3e3074d080..e1c91ca2ee03 100644
--- a/sw/source/core/txtnode/txatritr.cxx
+++ b/sw/source/core/txtnode/txatritr.cxx
@@ -123,7 +123,7 @@ sal_Bool SwTxtAttrIterator::Next()
{
do {
const SwTxtAttr* pHt = (SwTxtAttr*)aStack[ 0 ];
- sal_uInt16 nEndPos = *pHt->GetEnd();
+ const sal_uInt16 nEndPos = *pHt->End();
if( nChgPos >= nEndPos )
aStack.Remove( 0 );
else
@@ -138,7 +138,7 @@ sal_Bool SwTxtAttrIterator::Next()
if( aStack.Count() )
{
const SwTxtAttr* pHt = (SwTxtAttr*)aStack[ 0 ];
- sal_uInt16 nEndPos = *pHt->GetEnd();
+ const sal_uInt16 nEndPos = *pHt->End();
if( nChgPos >= nEndPos )
{
nChgPos = nEndPos;
@@ -167,7 +167,7 @@ sal_Bool SwTxtAttrIterator::Next()
void SwTxtAttrIterator::AddToStack( const SwTxtAttr& rAttr )
{
void* pAdd = (void*)&rAttr;
- sal_uInt16 nIns = 0, nEndPos = *rAttr.GetEnd();
+ sal_uInt16 nIns = 0, nEndPos = *rAttr.End();
for( ; nIns < aStack.Count(); ++nIns )
if( *((SwTxtAttr*)aStack[ nIns ] )->GetEnd() > nEndPos )
break;
@@ -213,7 +213,7 @@ void SwTxtAttrIterator::SearchNextChg()
for( ; nAttrPos < pHts->Count(); ++nAttrPos )
{
const SwTxtAttr* pHt = (*pHts)[ nAttrPos ];
- const sal_uInt16* pEnd = pHt->GetEnd();
+ const sal_uInt16* pEnd = pHt->End();
const sal_uInt16 nHtStt = *pHt->GetStart();
if( nHtStt < nStt && ( !pEnd || *pEnd <= nStt ))
continue;
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 77469bd83a80..c256b6222a7c 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -394,7 +394,7 @@ inline sal_Bool InRange(xub_StrLen nIdx, xub_StrLen nStart, xub_StrLen nEnd) {
* -> nothing to do
*/
-void SwTxtNode::RstAttr(
+void SwTxtNode::RstTxtAttr(
const SwIndex &rIdx,
const xub_StrLen nLen,
const sal_uInt16 nWhich,
@@ -404,8 +404,27 @@ void SwTxtNode::RstAttr(
if ( !GetpSwpHints() )
return;
- const xub_StrLen nStt = rIdx.GetIndex();
- const xub_StrLen nEnd = nStt + nLen;
+ xub_StrLen nStt = rIdx.GetIndex();
+ xub_StrLen nEnd = nStt + nLen;
+ {
+ // enlarge range for the reset of text attributes in case of an overlapping input field
+ const SwTxtInputFld* pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtAttrAt( nStt, RES_TXTATR_INPUTFIELD, PARENT ));
+ if ( pTxtInputFld == NULL )
+ {
+ pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtAttrAt(nEnd, RES_TXTATR_INPUTFIELD, PARENT ));
+ }
+ if ( pTxtInputFld != NULL )
+ {
+ if ( nStt > *(pTxtInputFld->GetStart()) )
+ {
+ nStt = *(pTxtInputFld->GetStart());
+ }
+ if ( nEnd < *(pTxtInputFld->End()) )
+ {
+ nEnd = *(pTxtInputFld->End());
+ }
+ }
+ }
bool bChanged = false;
@@ -419,13 +438,13 @@ void SwTxtNode::RstAttr(
// They may not be forgotten inside the "Forget" function
//std::vector< const SwTxtAttr* > aNewAttributes;
- // iterate over attribute array until start of attribute is behind
- // deletion range
+ // iterate over attribute array until start of attribute is behind deletion range
sal_uInt16 i = 0;
xub_StrLen nAttrStart;
SwTxtAttr *pHt = NULL;
- while ((i < m_pSwpHints->Count()) &&
- ((( nAttrStart = *(*m_pSwpHints)[i]->GetStart()) < nEnd ) || nLen==0) )
+ while ( (i < m_pSwpHints->Count())
+ && ( ( ( nAttrStart = *(*m_pSwpHints)[i]->GetStart()) < nEnd )
+ || nLen==0 ) )
{
pHt = m_pSwpHints->GetTextHint(i);
@@ -445,6 +464,12 @@ void SwTxtNode::RstAttr(
i++;
continue;
}
+ // attributes with content stay in
+ if ( pHt->HasContent() )
+ {
+ ++i;
+ continue;
+ }
// Default behavior is to process all attributes:
bool bSkipAttr = false;;
diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx
index 2f04cad7266b..f39d8a724fcc 100644
--- a/sw/source/core/undo/SwUndoField.cxx
+++ b/sw/source/core/undo/SwUndoField.cxx
@@ -81,7 +81,7 @@ SwUndoFieldFromDoc::~SwUndoFieldFromDoc()
void SwUndoFieldFromDoc::UndoImpl(::sw::UndoRedoContext &)
{
- SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition());
+ SwTxtFld * pTxtFld = SwDoc::GetTxtFldAtPos(GetPosition());
const SwField * pField = pTxtFld->GetFmtFld().GetField();
if (pField)
@@ -92,7 +92,7 @@ void SwUndoFieldFromDoc::UndoImpl(::sw::UndoRedoContext &)
void SwUndoFieldFromDoc::DoImpl()
{
- SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition());
+ SwTxtFld * pTxtFld = SwDoc::GetTxtFldAtPos(GetPosition());
const SwField * pField = pTxtFld->GetFmtFld().GetField();
if (pField)
@@ -129,7 +129,7 @@ SwUndoFieldFromAPI::~SwUndoFieldFromAPI()
void SwUndoFieldFromAPI::UndoImpl(::sw::UndoRedoContext &)
{
- SwField * pField = SwDoc::GetField(GetPosition());
+ SwField * pField = SwDoc::GetFieldAtPos(GetPosition());
if (pField)
pField->PutValue(aOldVal, nWhich);
@@ -137,7 +137,7 @@ void SwUndoFieldFromAPI::UndoImpl(::sw::UndoRedoContext &)
void SwUndoFieldFromAPI::DoImpl()
{
- SwField * pField = SwDoc::GetField(GetPosition());
+ SwField * pField = SwDoc::GetFieldAtPos(GetPosition());
if (pField)
pField->PutValue(aNewVal, nWhich);
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index ae10840fba5d..9ce89a1aa869 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -1036,10 +1036,8 @@ SwHistory::~SwHistory()
|*
*************************************************************************/
-// --> OD 2008-02-27 #refactorlists# - removed <rDoc>
void SwHistory::Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue,
sal_uLong nNodeIdx )
-// <--
{
ASSERT( !m_nEndDiff, "History was not deleted after REDO" );
@@ -1289,8 +1287,12 @@ void SwHistory::CopyFmtAttr( const SfxItemSet& rSet, sal_uLong nNodeIdx )
}
}
-void SwHistory::CopyAttr( SwpHints* pHts, sal_uLong nNodeIdx,
- xub_StrLen nStart, xub_StrLen nEnd, bool bFields )
+void SwHistory::CopyAttr(
+ SwpHints* pHts,
+ const sal_uLong nNodeIdx,
+ const xub_StrLen nStart,
+ const xub_StrLen nEnd,
+ const bool bCopyFields )
{
if( !pHts )
return;
@@ -1301,11 +1303,8 @@ void SwHistory::CopyAttr( SwpHints* pHts, sal_uLong nNodeIdx,
const xub_StrLen * pEndIdx;
for( sal_uInt16 n = 0; n < pHts->Count(); n++ )
{
- // BP: nAttrStt muss auch bei !pEndIdx gesetzt werden
pHt = pHts->GetTextHint(n);
nAttrStt = *pHt->GetStart();
-// JP: ???? wieso nAttrStt >= nEnd
-// if( 0 != ( pEndIdx = pHt->GetEnd() ) && nAttrStt >= nEnd )
if( 0 != ( pEndIdx = pHt->GetEnd() ) && nAttrStt > nEnd )
break;
@@ -1314,8 +1313,8 @@ void SwHistory::CopyAttr( SwpHints* pHts, sal_uLong nNodeIdx,
switch( pHt->Which() )
{
case RES_TXTATR_FIELD:
- // keine Felder, .. kopieren ??
- if( !bFields )
+ case RES_TXTATR_INPUTFIELD:
+ if( !bCopyFields )
bNextAttr = sal_True;
break;
case RES_TXTATR_FLYCNT:
@@ -1325,15 +1324,12 @@ void SwHistory::CopyAttr( SwpHints* pHts, sal_uLong nNodeIdx,
}
if( bNextAttr )
- continue;
+ continue;
// save all attributes that are somehow in this area
if ( nStart <= nAttrStt )
{
- if ( nEnd > nAttrStt
-// JP: ???? wieso nAttrStt >= nEnd
-// || (nEnd == nAttrStt && (!pEndIdx || nEnd == pEndIdx->GetIndex()))
- )
+ if ( nEnd > nAttrStt )
{
Add( pHt, nNodeIdx, false );
}
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index f26886621b17..c488485816c6 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -239,15 +239,16 @@ void SwUndoInsSection::Join( SwDoc& rDoc, sal_uLong nNode )
ASSERT( pTxtNd, "wo ist mein TextNode?" );
{
- RemoveIdxRel( nNode + 1, SwPosition( aIdx,
- SwIndex( pTxtNd, pTxtNd->GetTxt().Len() )));
+ RemoveIdxRel(
+ nNode + 1,
+ SwPosition( aIdx, SwIndex( pTxtNd, pTxtNd->GetTxt().Len() ) ) );
}
pTxtNd->JoinNext();
if (m_pHistory.get())
{
SwIndex aCntIdx( pTxtNd, 0 );
- pTxtNd->RstAttr( aCntIdx, pTxtNd->Len(), 0, 0, true );
+ pTxtNd->RstTxtAttr( aCntIdx, pTxtNd->Len(), 0, 0, true );
}
}
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 4d186961ab59..44772872db5f 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -2111,16 +2111,13 @@ CHECKTABLE(pTblNd->GetTable())
// evt. noch ueberflussige Attribute loeschen
SwIndex aTmpIdx( pTxtNd, nDelPos );
if( pTxtNd->GetpSwpHints() && pTxtNd->GetpSwpHints()->Count() )
- pTxtNd->RstAttr( aTmpIdx, pTxtNd->GetTxt().Len() -
- nDelPos + 1 );
+ pTxtNd->RstTxtAttr( aTmpIdx, pTxtNd->GetTxt().Len() - nDelPos + 1 );
// das Trennzeichen loeschen
pTxtNd->EraseText( aTmpIdx, 1 );
}
-// delete pUndo;
DUMPDOC( &rDoc, String( "d:\\tmp\\tab_") + String( aNewSttNds.Count() - i ) +
String(".db") )
}
-// pMoves->Remove( 0, pMoves->Count() );
nIdx = pBox->GetSttIdx();
}
else
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index 57a7d7313c13..b77e878740a6 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -248,7 +248,7 @@ void SwUndoInserts::UndoImpl(::sw::UndoRedoContext & rContext)
pTxtNode->JoinNext();
}
// reset all text attributes in the paragraph!
- pTxtNode->RstAttr( SwIndex(pTxtNode, 0), pTxtNode->Len(), 0, 0, true );
+ pTxtNode->RstTxtAttr( SwIndex(pTxtNode, 0), pTxtNode->Len(), 0, 0, true );
// setze alle Attribute im Node zurueck
pTxtNode->ResetAllAttr();
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index c53a8e6264e9..981e22c431aa 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -49,6 +49,7 @@
#include <ndtxt.hxx>
#include <txtrfmrk.hxx>
#include <fmtfld.hxx>
+#include <txtfld.hxx>
#include <docsh.hxx>
#include <section.hxx>
#include <shellio.hxx>
@@ -135,19 +136,19 @@ GetNestedTextContent(SwTxtNode & rTextNode, xub_StrLen const nIndex,
/* -----------------16.09.98 12:27-------------------
* Lesen spezieller Properties am Cursor
* --------------------------------------------------*/
-sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
- , SwPaM& rPam
- , Any *pAny
- , PropertyState& eState
- , const SwTxtNode* pNode )
+sal_Bool getCrsrPropertyValue(
+ const SfxItemPropertySimpleEntry& rEntry,
+ SwPaM& rPam,
+ Any *pAny,
+ PropertyState& eState,
+ const SwTxtNode* pNode )
{
PropertyState eNewState = PropertyState_DIRECT_VALUE;
-// PropertyState_DEFAULT_VALUE
-// PropertyState_AMBIGUOUS_VALUE
+ // PropertyState_DEFAULT_VALUE
+ // PropertyState_AMBIGUOUS_VALUE
sal_Bool bDone = sal_True;
switch(rEntry.nWID)
{
- // --> OD 2008-11-26 #158694#
case FN_UNO_PARA_CONT_PREV_SUBTREE:
if (pAny)
{
@@ -168,6 +169,7 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
*pAny <<= bRet;
}
break;
+
case FN_UNO_PARA_NUM_STRING:
if (pAny)
{
@@ -185,23 +187,7 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
*pAny <<= OUString(sRet);
}
break;
- // <--
- // --> OD 2008-05-20 #outlinelevel# - no longer needed
-// case FN_UNO_PARA_CHAPTER_NUMBERING_LEVEL:
-// if (pAny)
-// {
-// const SwTxtNode * pTmpNode = pNode;
-
-// if (!pTmpNode)
-// pTmpNode = rPam.GetNode()->GetTxtNode();
-
-// sal_Int8 nRet = -1;
-// if (pTmpNode && pTmpNode->GetOutlineLevel() != NO_NUMBERING)
-// nRet = sal::static_int_cast< sal_Int8 >(pTmpNode->GetOutlineLevel());
-// *pAny <<= nRet;
-// }
-// break;
- // <--
+
case RES_PARATR_OUTLINELEVEL: //#outlinelevel added by zhaojianwei
if (pAny)
{
@@ -217,9 +203,10 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
*pAny <<= nRet;
}
break; //<-end,zhaojianwei
+
case FN_UNO_PARA_CONDITIONAL_STYLE_NAME:
case FN_UNO_PARA_STYLE :
- {
+ {
SwFmtColl* pFmt = 0;
if(pNode)
pFmt = FN_UNO_PARA_CONDITIONAL_STYLE_NAME == rEntry.nWID
@@ -259,66 +246,62 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
*pAny <<= nValue;
}
break;
+
case FN_UNO_NUM_LEVEL :
case FN_UNO_IS_NUMBER :
- // --> OD 2008-07-14 #i91601#
case FN_UNO_LIST_ID:
- // <--
case FN_NUMBER_NEWSTART:
- {
- // a multi selection is not considered
- const SwTxtNode* pTxtNd = rPam.GetNode()->GetTxtNode();
- // --> OD 2010-01-13 #b6912256#
- if ( pTxtNd && pTxtNd->IsInList() )
- // <--
{
- if( pAny )
+ // a multi selection is not considered
+ const SwTxtNode* pTxtNd = rPam.GetNode()->GetTxtNode();
+ if ( pTxtNd && pTxtNd->IsInList() )
{
- if(rEntry.nWID == FN_UNO_NUM_LEVEL)
- *pAny <<= (sal_Int16)(pTxtNd->GetActualListLevel());
- else if(rEntry.nWID == FN_UNO_IS_NUMBER)
- {
- sal_Bool bIsNumber = pTxtNd->IsCountedInList();
- pAny->setValue(&bIsNumber, ::getBooleanCppuType());
- }
- // --> OD 2008-07-14 #i91601#
- else if ( rEntry.nWID == FN_UNO_LIST_ID )
- {
- const String sListId = pTxtNd->GetListId();
- *pAny <<= OUString(sListId);
- }
- // <--
- else /*if(rEntry.nWID == UNO_NAME_PARA_IS_NUMBERING_RESTART)*/
+ if( pAny )
{
- sal_Bool bIsRestart = pTxtNd->IsListRestart();
- pAny->setValue(&bIsRestart, ::getBooleanCppuType());
+ if(rEntry.nWID == FN_UNO_NUM_LEVEL)
+ *pAny <<= (sal_Int16)(pTxtNd->GetActualListLevel());
+ else if(rEntry.nWID == FN_UNO_IS_NUMBER)
+ {
+ sal_Bool bIsNumber = pTxtNd->IsCountedInList();
+ pAny->setValue(&bIsNumber, ::getBooleanCppuType());
+ }
+ else if ( rEntry.nWID == FN_UNO_LIST_ID )
+ {
+ const String sListId = pTxtNd->GetListId();
+ *pAny <<= OUString(sListId);
+ }
+ else /*if(rEntry.nWID == UNO_NAME_PARA_IS_NUMBERING_RESTART)*/
+ {
+ sal_Bool bIsRestart = pTxtNd->IsListRestart();
+ pAny->setValue(&bIsRestart, ::getBooleanCppuType());
+ }
}
}
- }
- else
- {
- eNewState = PropertyState_DEFAULT_VALUE;
-
- if( pAny )
+ else
{
- // #i30838# set default values for default properties
- if(rEntry.nWID == FN_UNO_NUM_LEVEL)
- *pAny <<= static_cast<sal_Int16>( 0 );
- else if(rEntry.nWID == FN_UNO_IS_NUMBER)
- *pAny <<= false;
- // --> OD 2008-07-14 #i91601#
- else if ( rEntry.nWID == FN_UNO_LIST_ID )
+ eNewState = PropertyState_DEFAULT_VALUE;
+
+ if( pAny )
{
- *pAny <<= OUString();
+ // #i30838# set default values for default properties
+ if(rEntry.nWID == FN_UNO_NUM_LEVEL)
+ *pAny <<= static_cast<sal_Int16>( 0 );
+ else if(rEntry.nWID == FN_UNO_IS_NUMBER)
+ *pAny <<= false;
+ // --> OD 2008-07-14 #i91601#
+ else if ( rEntry.nWID == FN_UNO_LIST_ID )
+ {
+ *pAny <<= OUString();
+ }
+ // <--
+ else /*if(rEntry.nWID == UNO_NAME_PARA_IS_NUMBERING_RESTART)*/
+ *pAny <<= false;
}
- // <--
- else /*if(rEntry.nWID == UNO_NAME_PARA_IS_NUMBERING_RESTART)*/
- *pAny <<= false;
}
+ //PROPERTY_MAYBEVOID!
}
- //PROPERTY_MAYBEVOID!
- }
- break;
+ break;
+
case FN_UNO_NUM_RULES :
if( pAny )
getNumberingProperty(rPam, eNewState, pAny);
@@ -328,184 +311,182 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
eNewState = PropertyState_DEFAULT_VALUE;
}
break;
+
case FN_UNO_DOCUMENT_INDEX_MARK:
- {
- ::std::vector<SwTxtAttr *> const marks(
- rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
- rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK));
- if (marks.size())
{
- if( pAny )
- { // hmm... can only return 1 here
- SwTOXMark & rMark =
- static_cast<SwTOXMark &>((*marks.begin())->GetAttr());
- const uno::Reference< text::XDocumentIndexMark > xRef =
- SwXDocumentIndexMark::CreateXDocumentIndexMark(
+ ::std::vector<SwTxtAttr *> const marks(
+ rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
+ rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK));
+ if (marks.size())
+ {
+ if( pAny )
+ { // hmm... can only return 1 here
+ SwTOXMark & rMark =
+ static_cast<SwTOXMark &>((*marks.begin())->GetAttr());
+ const uno::Reference< text::XDocumentIndexMark > xRef =
+ SwXDocumentIndexMark::CreateXDocumentIndexMark(
*rPam.GetDoc(),
*const_cast<SwTOXType*>(rMark.GetTOXType()), rMark);
- (*pAny) <<= xRef;
+ (*pAny) <<= xRef;
+ }
}
+ else
+ //auch hier - nicht zu unterscheiden
+ eNewState = PropertyState_DEFAULT_VALUE;
}
- else
- //auch hier - nicht zu unterscheiden
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
+ break;
+
case FN_UNO_DOCUMENT_INDEX:
- {
- const SwTOXBase* pBase = rPam.GetDoc()->GetCurTOX(
- *rPam.Start() );
- if( pBase )
{
- if( pAny )
+ const SwTOXBase* pBase = rPam.GetDoc()->GetCurTOX(
+ *rPam.Start() );
+ if( pBase )
{
- const uno::Reference< text::XDocumentIndex > xRef =
- SwXDocumentIndex::CreateXDocumentIndex(*rPam.GetDoc(),
+ if( pAny )
+ {
+ const uno::Reference< text::XDocumentIndex > xRef =
+ SwXDocumentIndex::CreateXDocumentIndex(*rPam.GetDoc(),
*static_cast<SwTOXBaseSection const*>(pBase));
- (*pAny) <<= xRef;
+ (*pAny) <<= xRef;
+ }
}
+ else
+ eNewState = PropertyState_DEFAULT_VALUE;
}
- else
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
+ break;
+
case FN_UNO_TEXT_FIELD:
- {
- const SwPosition *pPos = rPam.Start();
- const SwTxtNode *pTxtNd =
- rPam.GetDoc()->GetNodes()[pPos->nNode.GetIndex()]->GetTxtNode();
- SwTxtAttr *const pTxtAttr = (pTxtNd)
- ? pTxtNd->GetTxtAttrForCharAt(
- pPos->nContent.GetIndex(), RES_TXTATR_FIELD)
- : 0;
- if(pTxtAttr)
{
- if( pAny )
+ const SwPosition *pPos = rPam.Start();
+ const SwTxtNode *pTxtNd =
+ rPam.GetDoc()->GetNodes()[pPos->nNode.GetIndex()]->GetTxtNode();
+ const SwTxtAttr* pTxtAttr = (pTxtNd)
+ ? pTxtNd->GetFldTxtAttrAt( pPos->nContent.GetIndex(), true )
+ : 0;
+ if ( pTxtAttr != NULL )
{
- SwXTextField* pField =
- SwXTextField::CreateSwXTextField( *rPam.GetDoc(),pTxtAttr->GetFmtFld() );
- *pAny <<= uno::Reference< XTextField >( pField );
+ if( pAny )
+ {
+ SwXTextField* pField =
+ SwXTextField::CreateSwXTextField( *rPam.GetDoc(),pTxtAttr->GetFmtFld() );
+ *pAny <<= uno::Reference< XTextField >( pField );
+ }
}
+ else
+ eNewState = PropertyState_DEFAULT_VALUE;
}
- else
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
-/* laesst sich nicht feststellen
-* case FN_UNO_BOOKMARK:
- {
- if()
- {
- uno::Reference< XBookmark > xBkm = SwXBookmarks::GetObject(rBkm);
- rAny.set(&xBkm, ::getCppuType((const XBookmark*)0)());
- }
- }
- break;*/
+ break;
+
case FN_UNO_TEXT_TABLE:
case FN_UNO_CELL:
- {
- SwStartNode* pSttNode = rPam.GetNode()->StartOfSectionNode();
- SwStartNodeType eType = pSttNode->GetStartNodeType();
- if(SwTableBoxStartNode == eType)
{
- if( pAny )
+ SwStartNode* pSttNode = rPam.GetNode()->StartOfSectionNode();
+ SwStartNodeType eType = pSttNode->GetStartNodeType();
+ if(SwTableBoxStartNode == eType)
{
- const SwTableNode* pTblNode = pSttNode->FindTableNode();
- SwFrmFmt* pTableFmt = (SwFrmFmt*)pTblNode->GetTable().GetFrmFmt();
- //SwTable& rTable = ((SwTableNode*)pSttNode)->GetTable();
- if(FN_UNO_TEXT_TABLE == rEntry.nWID)
- {
- uno::Reference< XTextTable > xTable = SwXTextTables::GetObject(*pTableFmt);
- pAny->setValue(&xTable, ::getCppuType((uno::Reference<XTextTable>*)0));
- }
- else
+ if( pAny )
{
- SwTableBox* pBox = pSttNode->GetTblBox();
- uno::Reference< XCell > xCell = SwXCell::CreateXCell(pTableFmt, pBox);
- pAny->setValue(&xCell, ::getCppuType((uno::Reference<XCell>*)0));
+ const SwTableNode* pTblNode = pSttNode->FindTableNode();
+ SwFrmFmt* pTableFmt = (SwFrmFmt*)pTblNode->GetTable().GetFrmFmt();
+ //SwTable& rTable = ((SwTableNode*)pSttNode)->GetTable();
+ if(FN_UNO_TEXT_TABLE == rEntry.nWID)
+ {
+ uno::Reference< XTextTable > xTable = SwXTextTables::GetObject(*pTableFmt);
+ pAny->setValue(&xTable, ::getCppuType((uno::Reference<XTextTable>*)0));
+ }
+ else
+ {
+ SwTableBox* pBox = pSttNode->GetTblBox();
+ uno::Reference< XCell > xCell = SwXCell::CreateXCell(pTableFmt, pBox);
+ pAny->setValue(&xCell, ::getCppuType((uno::Reference<XCell>*)0));
+ }
}
}
+ else
+ eNewState = PropertyState_DEFAULT_VALUE;
}
- else
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
- case FN_UNO_TEXT_FRAME:
- {
- SwStartNode* pSttNode = rPam.GetNode()->StartOfSectionNode();
- SwStartNodeType eType = pSttNode->GetStartNodeType();
+ break;
- SwFrmFmt* pFmt;
- if(eType == SwFlyStartNode && 0 != (pFmt = pSttNode->GetFlyFmt()))
+ case FN_UNO_TEXT_FRAME:
{
- if( pAny )
+ SwStartNode* pSttNode = rPam.GetNode()->StartOfSectionNode();
+ SwStartNodeType eType = pSttNode->GetStartNodeType();
+
+ SwFrmFmt* pFmt;
+ if(eType == SwFlyStartNode && 0 != (pFmt = pSttNode->GetFlyFmt()))
{
- uno::Reference< XTextFrame > xFrm = (SwXTextFrame*) SwXFrames::GetObject(*pFmt, FLYCNTTYPE_FRM);
- pAny->setValue(&xFrm, ::getCppuType((uno::Reference<XTextFrame>*)0));
+ if( pAny )
+ {
+ uno::Reference< XTextFrame > xFrm = (SwXTextFrame*) SwXFrames::GetObject(*pFmt, FLYCNTTYPE_FRM);
+ pAny->setValue(&xFrm, ::getCppuType((uno::Reference<XTextFrame>*)0));
+ }
}
+ else
+ eNewState = PropertyState_DEFAULT_VALUE;
}
- else
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
+ break;
+
case FN_UNO_TEXT_SECTION:
- {
- SwSection* pSect = rPam.GetDoc()->GetCurrSection(*rPam.GetPoint());
- if(pSect)
{
- if( pAny )
+ SwSection* pSect = rPam.GetDoc()->GetCurrSection(*rPam.GetPoint());
+ if(pSect)
{
- uno::Reference< XTextSection > xSect = SwXTextSections::GetObject( *pSect->GetFmt() );
- pAny->setValue(&xSect, ::getCppuType((uno::Reference<XTextSection>*)0) );
+ if( pAny )
+ {
+ uno::Reference< XTextSection > xSect = SwXTextSections::GetObject( *pSect->GetFmt() );
+ pAny->setValue(&xSect, ::getCppuType((uno::Reference<XTextSection>*)0) );
+ }
}
+ else
+ eNewState = PropertyState_DEFAULT_VALUE;
}
- else
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
+ break;
+
case FN_UNO_ENDNOTE:
case FN_UNO_FOOTNOTE:
- {
- SwTxtAttr *const pTxtAttr =
- rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
- rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
- if(pTxtAttr)
{
- const SwFmtFtn& rFtn = pTxtAttr->GetFtn();
- if(rFtn.IsEndNote() == (FN_UNO_ENDNOTE == rEntry.nWID))
+ SwTxtAttr *const pTxtAttr =
+ rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
+ rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
+ if(pTxtAttr)
{
- if( pAny )
+ const SwFmtFtn& rFtn = pTxtAttr->GetFtn();
+ if(rFtn.IsEndNote() == (FN_UNO_ENDNOTE == rEntry.nWID))
{
- const uno::Reference< text::XFootnote > xFootnote =
- SwXFootnote::CreateXFootnote(*rPam.GetDoc(), rFtn);
- *pAny <<= xFootnote;
+ if( pAny )
+ {
+ const uno::Reference< text::XFootnote > xFootnote =
+ SwXFootnote::CreateXFootnote(*rPam.GetDoc(), rFtn);
+ *pAny <<= xFootnote;
+ }
}
+ else
+ eNewState = PropertyState_DEFAULT_VALUE;
}
else
eNewState = PropertyState_DEFAULT_VALUE;
}
- else
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
+ break;
+
case FN_UNO_REFERENCE_MARK:
- {
- ::std::vector<SwTxtAttr *> const marks(
- rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
- rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK));
- if (marks.size())
{
- if( pAny )
- { // hmm... can only return 1 here
- const SwFmtRefMark& rRef = (*marks.begin())->GetRefMark();
- uno::Reference< XTextContent > xRef = SwXReferenceMarks::GetObject( rPam.GetDoc(), &rRef );
- pAny->setValue(&xRef, ::getCppuType((uno::Reference<XTextContent>*)0));
+ ::std::vector<SwTxtAttr *> const marks(
+ rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
+ rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK));
+ if (marks.size())
+ {
+ if( pAny )
+ { // hmm... can only return 1 here
+ const SwFmtRefMark& rRef = (*marks.begin())->GetRefMark();
+ uno::Reference< XTextContent > xRef = SwXReferenceMarks::GetObject( rPam.GetDoc(), &rRef );
+ pAny->setValue(&xRef, ::getCppuType((uno::Reference<XTextContent>*)0));
+ }
}
+ else
+ eNewState = PropertyState_DEFAULT_VALUE;
}
- else
- eNewState = PropertyState_DEFAULT_VALUE;
- }
- break;
+ break;
+
case FN_UNO_NESTED_TEXT_CONTENT:
{
uno::Reference<XTextContent> const xRet(
@@ -524,6 +505,7 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
}
}
break;
+
case FN_UNO_CHARFMT_SEQUENCE:
{
@@ -586,8 +568,9 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
eNewState = PropertyState_DEFAULT_VALUE;
}
break;
+
case RES_TXTATR_CHARFMT:
- // kein break hier!
+ // kein break hier!
default: bDone = sal_False;
}
if( bDone )
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index b394acefbba4..ed7363d7fdc7 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1254,8 +1254,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
.SetFlyFmt();
//The connection is removed now the attribute can be deleted.
- pTxtNode->DeleteAttributes(
- RES_TXTATR_FLYCNT, nIdx );
+ pTxtNode->DeleteAttributes( RES_TXTATR_FLYCNT, nIdx );
//create a new one
SwTxtNode *pNd = pInternalPam->GetNode()->GetTxtNode();
DBG_ASSERT( pNd, "Cursor not at TxtNode." );
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index db1b868bf283..fb4953b4feee 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -1619,9 +1619,10 @@ void SwXTextField::attachToRange(
throw uno::RuntimeException();
sal_uInt16 nInpSubType = sal::static_int_cast< sal_uInt16 >(SW_SERVICE_FIELDTYPE_INPUT_USER == m_nServiceId ? INP_USR : INP_TXT);
SwInputField * pTxtField =
- new SwInputField((SwInputFieldType*)pFldType,
- m_pProps->sPar1, m_pProps->sPar2,
- nInpSubType);
+ new SwInputField( static_cast<SwInputFieldType*>(pFldType),
+ m_pProps->sPar1,
+ m_pProps->sPar2,
+ nInpSubType );
pTxtField->SetHelp(m_pProps->sPar3);
pTxtField->SetToolTip(m_pProps->sPar4);
@@ -1729,19 +1730,19 @@ void SwXTextField::attachToRange(
if(aPam.HasMark())
pDoc->DeleteAndJoin(aPam);
- SwXTextCursor const*const pTextCursor(
- dynamic_cast<SwXTextCursor*>(pCursor));
- const bool bForceExpandHints( (pTextCursor)
- ? pTextCursor->IsAtEndOfMeta() : false );
- const SetAttrMode nInsertFlags = (bForceExpandHints)
+ SwXTextCursor const*const pTextCursor( dynamic_cast<SwXTextCursor*>(pCursor) );
+ const bool bForceExpandHints(
+ (pTextCursor)
+ ? pTextCursor->IsAtEndOfMeta()
+ : false );
+ const SetAttrMode nInsertFlags =
+ (bForceExpandHints)
? nsSetAttrMode::SETATTR_FORCEHINTEXPAND
: nsSetAttrMode::SETATTR_DEFAULT;
pDoc->InsertPoolItem(aPam, aFmt, nInsertFlags);
- pTxtAttr = aPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
- aPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_FIELD);
-
+ pTxtAttr = aPam.GetNode()->GetTxtNode()->GetFldTxtAttrAt( aPam.GetPoint()->nContent.GetIndex()-1, true );
// was passiert mit dem Update der Felder ? (siehe fldmgr.cxx)
if(pTxtAttr)
{
@@ -1907,7 +1908,7 @@ void SwXTextField::setPropertyValue(const OUString& rPropertyName, const uno::An
//#to the SwTxtFld
if(RES_DBFLD == nWhich && pFmtFld->GetTxtFld())
{
- pFmtFld->GetTxtFld()->Expand();
+ pFmtFld->GetTxtFld()->ExpandTxtFld();
}
//#i100374# changing a document field should set the modify flag
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 59263cf095ca..3720e26eaa9f 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -121,7 +121,7 @@
#include <switerator.hxx>
// from fefly1.cxx
-extern sal_Bool lcl_ChkAndSetNewAnchor( const SwFlyFrm& rFly, SfxItemSet& rSet );
+extern sal_Bool lcl_ChkAndSetNewAnchor( SwEditShell& rEditShell, const SwFlyFrm& rFly, SfxItemSet& rSet );
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -1043,21 +1043,6 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
}
}
}
- // --> OD 2009-07-13 #i73249#
- // Attribute AlternativeText was never published.
- // Now it has been replaced by Attribute Title - valid for all <SwXFrame> instances
-// else if( FN_UNO_ALTERNATIVE_TEXT == pEntry->nWID && eType != FLYCNTTYPE_FRM )
-// {
-// const :: SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
-// if(pIdx)
-// {
-// SwNodeIndex aIdx(*pIdx, 1);
-// SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode();
-// OUString uTemp;
-// aValue >>= uTemp;
-// pNoTxt->SetAlternateText(uTemp);
-// }
-// }
// New attribute Title
else if( FN_UNO_TITLE == pEntry->nWID )
{
@@ -1112,7 +1097,8 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
{
pSet = new SfxItemSet( pDoc->GetAttrPool(), aFrmFmtSetRange );
pSet->Put( *pItem );
- if ( !::lcl_ChkAndSetNewAnchor( *pFly, *pSet ) )
+ if ( pFmt->GetDoc()->GetEditShell() != NULL
+ && !::lcl_ChkAndSetNewAnchor( *(pFmt->GetDoc()->GetEditShell()), *pFly, *pSet ) )
delete pSet, pSet = 0;
}
}
@@ -1388,7 +1374,10 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
if( SFX_ITEM_SET == aSet.GetItemState( RES_ANCHOR, sal_False, &pItem ))
{
aSet.Put( *pItem );
- ::lcl_ChkAndSetNewAnchor( *pFly, aSet );
+ if ( pFmt->GetDoc()->GetEditShell() != NULL )
+ {
+ ::lcl_ChkAndSetNewAnchor( *(pFmt->GetDoc()->GetEditShell()), *pFly, aSet );
+ }
}
}
}
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 33e09fd8c65f..eb4c251a63ec 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -1858,9 +1858,9 @@ throw (uno::RuntimeException)
m_pImpl->m_pTOXMark->GetTxtTOXMark();
SwPaM aPam(pTxtMark->GetTxtNode(), *pTxtMark->GetStart());
aPam.SetMark();
- if(pTxtMark->GetEnd())
+ if(pTxtMark->End())
{
- aPam.GetPoint()->nContent = *pTxtMark->GetEnd();
+ aPam.GetPoint()->nContent = *pTxtMark->End();
}
else
aPam.GetPoint()->nContent++;
@@ -2109,9 +2109,9 @@ SwXDocumentIndexMark::getAnchor() throw (uno::RuntimeException)
const SwTxtTOXMark* pTxtMark = m_pImpl->m_pTOXMark->GetTxtTOXMark();
SwPaM aPam(pTxtMark->GetTxtNode(), *pTxtMark->GetStart());
aPam.SetMark();
- if(pTxtMark->GetEnd())
+ if(pTxtMark->End())
{
- aPam.GetPoint()->nContent = *pTxtMark->GetEnd();
+ aPam.GetPoint()->nContent = *pTxtMark->End();
}
else
{
@@ -2270,9 +2270,9 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
m_pImpl->m_pTOXMark->GetTxtTOXMark();
SwPaM aPam(pTxtMark->GetTxtNode(), *pTxtMark->GetStart());
aPam.SetMark();
- if(pTxtMark->GetEnd())
+ if(pTxtMark->End())
{
- aPam.GetPoint()->nContent = *pTxtMark->GetEnd();
+ aPam.GetPoint()->nContent = *pTxtMark->End();
}
else
{
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index 27e546c248a7..da1f6f68f516 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -482,6 +482,32 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider()
{ SW_PROP_NMID(UNO_NAME_IS_FIELD_USED), FIELD_PROP_IS_FIELD_USED, CPPU_E2T(CPPUTYPE_FLOAT), PropertyAttribute::READONLY, 0},\
{ SW_PROP_NMID(UNO_NAME_IS_FIELD_DISPLAYED), FIELD_PROP_IS_FIELD_DISPLAYED, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::READONLY, 0},\
+//IAccessibility2 Implementation 2009-----
+#define COMMON_ACCESSIBILITY_TEXT_ATTRIBUTE \
+ { SW_PROP_NMID(UNO_NAME_CHAR_BACK_COLOR), RES_CHRATR_BACKGROUND, CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE ,MID_BACK_COLOR }, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_COLOR), RES_CHRATR_COLOR, CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, 0}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_CONTOURED), RES_CHRATR_CONTOUR, CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_EMPHASIS), RES_CHRATR_EMPHASIS_MARK, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, MID_EMPHASIS}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_ESCAPEMENT), RES_CHRATR_ESCAPEMENT, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, MID_ESC }, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_FONT_NAME), RES_CHRATR_FONT, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::MAYBEVOID, MID_FONT_FAMILY_NAME }, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_HEIGHT), RES_CHRATR_FONTSIZE , CPPU_E2T(CPPUTYPE_FLOAT), PropertyAttribute::MAYBEVOID, MID_FONTHEIGHT|CONVERT_TWIPS}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_POSTURE), RES_CHRATR_POSTURE , CPPU_E2T(CPPUTYPE_FONTSLANT), PropertyAttribute::MAYBEVOID, MID_POSTURE}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_SHADOWED), RES_CHRATR_SHADOWED , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_STRIKEOUT), RES_CHRATR_CROSSEDOUT, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, MID_CROSS_OUT}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID, MID_TL_COLOR}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_WEIGHT), RES_CHRATR_WEIGHT , CPPU_E2T(CPPUTYPE_FLOAT), PropertyAttribute::MAYBEVOID, MID_WEIGHT}, \
+ { SW_PROP_NMID(UNO_NAME_NUMBERING_LEVEL), RES_PARATR_LIST_LEVEL,CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, 0}, \
+ { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, MID_TL_STYLE}, \
+ { SW_PROP_NMID(UNO_NAME_NUMBERING_RULES), RES_PARATR_NUMRULE,CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, CONVERT_TWIPS}, \
+ { SW_PROP_NMID(UNO_NAME_PARA_ADJUST), RES_PARATR_ADJUST, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, MID_PARA_ADJUST}, \
+ { SW_PROP_NMID(UNO_NAME_PARA_BOTTOM_MARGIN), RES_UL_SPACE, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID, MID_LO_MARGIN|CONVERT_TWIPS}, \
+ { SW_PROP_NMID(UNO_NAME_PARA_FIRST_LINE_INDENT), RES_LR_SPACE, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID, MID_FIRST_LINE_INDENT|CONVERT_TWIPS}, \
+ { SW_PROP_NMID(UNO_NAME_PARA_LEFT_MARGIN), RES_LR_SPACE, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID, MID_TXT_LMARGIN|CONVERT_TWIPS}, \
+ { SW_PROP_NMID(UNO_NAME_PARA_LINE_SPACING), RES_PARATR_LINESPACING, CPPU_E2T(CPPUTYPE_LINESPACE), PropertyAttribute::MAYBEVOID, CONVERT_TWIPS}, \
+ { SW_PROP_NMID(UNO_NAME_PARA_RIGHT_MARGIN), RES_LR_SPACE, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID, MID_R_MARGIN|CONVERT_TWIPS}, \
+ { SW_PROP_NMID(UNO_NAME_TABSTOPS), RES_PARATR_TABSTOP, CPPU_E2T(CPPUTYPE_SEQTABSTOP), PropertyAttribute::MAYBEVOID, CONVERT_TWIPS}, \
+
+//-----IAccessibility2 Implementation 2009
const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(sal_uInt16 nPropertyId)
{
@@ -500,6 +526,18 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
aMapEntriesArr[nPropertyId] = aCharAndParaMap_Impl;
}
break;
+ //IAccessibility2 Implementation 2009-----
+ case PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE:
+ {
+ static SfxItemPropertyMapEntry aAccessibilityTextAttrMap_Impl[] =
+ {
+ COMMON_ACCESSIBILITY_TEXT_ATTRIBUTE
+ {0,0,0,0,0,0}
+ };
+ aMapEntriesArr[nPropertyId] = aAccessibilityTextAttrMap_Impl;
+ }
+ break;
+ //-----IAccessibility2 Implementation 2009
case PROPERTY_MAP_PARAGRAPH:
{
static SfxItemPropertyMapEntry aParagraphMap_Impl[] =
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index edd295269c2b..1cd9b56ee784 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -46,6 +46,8 @@
#include <unoredline.hxx>
#include <unofield.hxx>
#include <unometa.hxx>
+#include <fmtfld.hxx>
+#include <fldbas.hxx>
#include <fmtmeta.hxx>
#include <fmtanchr.hxx>
#include <fmtrfmrk.hxx>
@@ -438,7 +440,7 @@ lcl_CreateRefMarkPortion(
{
pPortion = new SwXTextPortion(pUnoCrsr, xParent, PORTION_REFMARK_START);
pPortion->SetRefMark(xContent);
- pPortion->SetCollapsed(rAttr.GetEnd() ? false : true);
+ pPortion->SetCollapsed(rAttr.End() ? false : true);
}
else
{
@@ -459,7 +461,7 @@ lcl_InsertRubyPortion(
SwXTextPortion* pPortion = new SwXTextPortion(pUnoCrsr,
static_cast<const SwTxtRuby&>(rAttr), xParent, bEnd);
rPortions.push_back(pPortion);
- pPortion->SetCollapsed(rAttr.GetEnd() ? false : true);
+ pPortion->SetCollapsed(rAttr.End() ? false : true);
}
//-----------------------------------------------------------------------------
@@ -760,34 +762,56 @@ lcl_ExportHints(
SwXTextField::CreateSwXTextField(*pDoc, pAttr->GetFmtFld());
pPortion->SetTextField(xField);
}
- break;
- case RES_TXTATR_FLYCNT :
+ break;
+
+ case RES_TXTATR_INPUTFIELD:
if(!bRightMoveForbidden)
{
- pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
+
+ pUnoCrsr->Right(
+ pAttr->GetFmtFld().GetField()->GetPar1().Len() + 2,
+ CRSR_SKIP_CHARS,
+ sal_False,
+ sal_False );
if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
- break; // Robust #i81708 content in covered cells
- pUnoCrsr->Exchange();
- xRef = new SwXTextPortion(
- pUnoCrsr, xParent, PORTION_FRAME);
+ break;
+ SwXTextPortion* pPortion =
+ new SwXTextPortion( pUnoCrsr, xParent, PORTION_FIELD);
+ xRef = pPortion;
+ Reference<XTextField> xField =
+ SwXTextField::CreateSwXTextField(*pDoc, pAttr->GetFmtFld());
+ pPortion->SetTextField(xField);
}
- break;
- case RES_TXTATR_FTN :
- {
+ break;
+
+ case RES_TXTATR_FLYCNT:
if(!bRightMoveForbidden)
{
pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
- break;
- SwXTextPortion* pPortion;
- xRef = pPortion = new SwXTextPortion(
+ break; // Robust #i81708 content in covered cells
+ pUnoCrsr->Exchange();
+ xRef = new SwXTextPortion( pUnoCrsr, xParent, PORTION_FRAME);
+ }
+ break;
+
+ case RES_TXTATR_FTN:
+ {
+ if(!bRightMoveForbidden)
+ {
+ pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
+ if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
+ break;
+ SwXTextPortion* pPortion;
+ xRef = pPortion = new SwXTextPortion(
pUnoCrsr, xParent, PORTION_FOOTNOTE);
- Reference<XFootnote> xContent =
- SwXFootnotes::GetObject(*pDoc, pAttr->GetFtn());
- pPortion->SetFootnote(xContent);
+ Reference<XFootnote> xContent =
+ SwXFootnotes::GetObject(*pDoc, pAttr->GetFtn());
+ pPortion->SetFootnote(xContent);
+ }
}
- }
- break;
+ break;
+
case RES_TXTATR_TOXMARK:
case RES_TXTATR_REFMARK:
{
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 13e66476bda0..369076f42b4c 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -356,8 +356,8 @@ SwXReferenceMark::getAnchor() throw (uno::RuntimeException)
&m_pImpl->m_pDoc->GetNodes()))
{
SwTxtNode const& rTxtNode = pTxtMark->GetTxtNode();
- const ::std::auto_ptr<SwPaM> pPam( (pTxtMark->GetEnd())
- ? new SwPaM( rTxtNode, *pTxtMark->GetEnd(),
+ const ::std::auto_ptr<SwPaM> pPam( (pTxtMark->End())
+ ? new SwPaM( rTxtNode, *pTxtMark->End(),
rTxtNode, *pTxtMark->GetStart())
: new SwPaM( rTxtNode, *pTxtMark->GetStart()) );
@@ -387,9 +387,10 @@ void SAL_CALL SwXReferenceMark::dispose() throw (uno::RuntimeException)
&m_pImpl->m_pDoc->GetNodes()))
{
SwTxtNode const& rTxtNode = pTxtMark->GetTxtNode();
- xub_StrLen nStt = *pTxtMark->GetStart(),
- nEnd = pTxtMark->GetEnd() ? *pTxtMark->GetEnd()
- : nStt + 1;
+ const xub_StrLen nStt = *pTxtMark->GetStart();
+ const xub_StrLen nEnd = pTxtMark->End()
+ ? *pTxtMark->End()
+ : nStt + 1;
SwPaM aPam( rTxtNode, nStt, rTxtNode, nEnd );
m_pImpl->m_pDoc->DeleteAndJoin( aPam );
@@ -477,9 +478,10 @@ throw (uno::RuntimeException)
&m_pImpl->m_pDoc->GetNodes()))
{
SwTxtNode const& rTxtNode = pTxtMark->GetTxtNode();
- xub_StrLen nStt = *pTxtMark->GetStart(),
- nEnd = pTxtMark->GetEnd() ? *pTxtMark->GetEnd()
- : nStt + 1;
+ const xub_StrLen nStt = *pTxtMark->GetStart();
+ const xub_StrLen nEnd = pTxtMark->End()
+ ? *pTxtMark->End()
+ : nStt + 1;
SwPaM aPam( rTxtNode, nStt, rTxtNode, nEnd );
// deletes the m_pImpl->m_pDoc member in the SwXReferenceMark!
@@ -873,7 +875,7 @@ bool SwXMeta::SetContentRange(
{
// rStart points at the first position _within_ the meta!
rStart = *pTxtAttr->GetStart() + 1;
- rEnd = *pTxtAttr->GetEnd();
+ rEnd = *pTxtAttr->End();
return true;
}
}
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index 323b0a75fbe8..519cbb04e3b9 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -446,6 +446,24 @@ void SwViewImp::MoveAccessible( const SwFrm *pFrm, const SdrObject *pObj,
} while ( pTmp != pVSh );
}
+//IAccessibility2 Implementation 2009-----
+void SwViewImp::FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage)
+{
+ if( IsAccessible() )
+ GetAccessibleMap().FirePageChangeEvent( nOldPage, nNewPage);
+}
+
+void SwViewImp::FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection)
+{
+ if( IsAccessible() )
+ GetAccessibleMap().FireSectionChangeEvent(nOldSection, nNewSection);
+}
+void SwViewImp::FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn)
+{
+ if( IsAccessible() )
+ GetAccessibleMap().FireColumnChangeEvent(nOldColumn, nNewColumn);
+}
+//-----IAccessibility2 Implementation 2009
void SwViewImp::InvalidateAccessibleFrmContent( const SwFrm *pFrm )
{
ASSERT( pFrm->IsAccessibleFrm(), "frame is not accessible" );
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 14ee0f4a9133..1447555d2a62 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -662,6 +662,7 @@ sal_Bool ViewShell::IsAnyFieldInDoc() const
const SfxPoolItem* pItem;
sal_uInt32 nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ {
if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n )))
{
const SwFmtFld* pFmtFld = (SwFmtFld*)pItem;
@@ -674,6 +675,22 @@ sal_Bool ViewShell::IsAnyFieldInDoc() const
return sal_True;
}
}
+ }
+
+ nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INPUTFIELD );
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ {
+ if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_TXTATR_INPUTFIELD, n )))
+ {
+ const SwFmtFld* pFmtFld = (SwFmtFld*)pItem;
+ const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld();
+ if( pTxtFld && pTxtFld->GetTxtNode().GetNodes().IsDocNodes() )
+ {
+ return sal_True;
+ }
+ }
+ }
+
return sal_False;
}
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index bbba284dbf11..a86d0fd01b44 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -60,16 +60,27 @@ class SwASC_AttrIter
public:
SwASC_AttrIter( SwASCWriter& rWrt, const SwTxtNode& rNd, xub_StrLen nStt );
- void NextPos() { nAktSwPos = SearchNext( nAktSwPos + 1 ); }
+ void NextPos()
+ {
+ nAktSwPos = SearchNext( nAktSwPos + 1 );
+ }
+
+ xub_StrLen WhereNext() const
+ {
+ return nAktSwPos;
+ }
- xub_StrLen WhereNext() const { return nAktSwPos; }
sal_Bool OutAttr( xub_StrLen nSwPos );
};
-SwASC_AttrIter::SwASC_AttrIter( SwASCWriter& rWr, const SwTxtNode& rTxtNd,
- xub_StrLen nStt )
- : rWrt( rWr ), rNd( rTxtNd ), nAktSwPos( 0 )
+SwASC_AttrIter::SwASC_AttrIter(
+ SwASCWriter& rWr,
+ const SwTxtNode& rTxtNd,
+ xub_StrLen nStt )
+ : rWrt( rWr )
+ , rNd( rTxtNd )
+ , nAktSwPos( 0 )
{
nAktSwPos = SearchNext( nStt + 1 );
}
@@ -81,13 +92,10 @@ xub_StrLen SwASC_AttrIter::SearchNext( xub_StrLen nStartPos )
const SwpHints* pTxtAttrs = rNd.GetpSwpHints();
if( pTxtAttrs )
{
-// kann noch optimiert werden, wenn ausgenutzt wird, dass die TxtAttrs
-// nach der Anfangsposition geordnet sind. Dann muessten
-// allerdings noch 2 Indices gemerkt werden
for ( sal_uInt16 i = 0; i < pTxtAttrs->Count(); i++ )
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
- if (pHt->HasDummyChar())
+ if ( pHt->HasDummyChar() )
{
xub_StrLen nPos = *pHt->GetStart();
@@ -97,6 +105,20 @@ xub_StrLen SwASC_AttrIter::SearchNext( xub_StrLen nStartPos )
if( ( ++nPos ) >= nStartPos && nPos < nMinPos )
nMinPos = nPos;
}
+ else if ( pHt->HasContent() )
+ {
+ const xub_StrLen nHintStart = *pHt->GetStart();
+ if ( nHintStart >= nStartPos && nHintStart <= nMinPos )
+ {
+ nMinPos = nHintStart;
+ }
+
+ const xub_StrLen nHintEnd = pHt->End() ? *pHt->End() : STRING_MAXLEN;
+ if ( nHintEnd >= nStartPos && nHintEnd < nMinPos )
+ {
+ nMinPos = nHintEnd;
+ }
+ }
}
}
return nMinPos;
@@ -113,15 +135,17 @@ sal_Bool SwASC_AttrIter::OutAttr( xub_StrLen nSwPos )
for( i = 0; i < pTxtAttrs->Count(); i++ )
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
- if ( pHt->HasDummyChar() && nSwPos == *pHt->GetStart() )
+ if ( ( pHt->HasDummyChar()
+ || pHt->HasContent() )
+ && nSwPos == *pHt->GetStart() )
{
bRet = sal_True;
String sOut;
switch( pHt->Which() )
{
case RES_TXTATR_FIELD:
- sOut =
- static_cast<SwTxtFld const*>(pHt)->GetFmtFld().GetField()->ExpandField(true);
+ case RES_TXTATR_INPUTFIELD:
+ sOut = static_cast<SwTxtFld const*>(pHt)->GetFmtFld().GetField()->ExpandField(true);
break;
case RES_TXTATR_FTN:
@@ -131,10 +155,10 @@ sal_Bool SwASC_AttrIter::OutAttr( xub_StrLen nSwPos )
sOut = rFtn.GetNumStr();
else if( rFtn.IsEndNote() )
sOut = rWrt.pDoc->GetEndNoteInfo().aFmt.
- GetNumStr( rFtn.GetNumber() );
+ GetNumStr( rFtn.GetNumber() );
else
sOut = rWrt.pDoc->GetFtnInfo().aFmt.
- GetNumStr( rFtn.GetNumber() );
+ GetNumStr( rFtn.GetNumber() );
}
break;
}
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index bb20eb6253f9..b5f7fc283b8d 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -452,8 +452,8 @@ sal_uLong SwASCIIParser::ReadChars()
InsertText( String( pLastStt ));
}
pDoc->SplitNode( *pPam->GetPoint(), false );
- pDoc->InsertPoolItem( *pPam, SvxFmtBreakItem(
- SVX_BREAK_PAGE_BEFORE, RES_BREAK ), 0);
+ pDoc->InsertPoolItem(
+ *pPam, SvxFmtBreakItem( SVX_BREAK_PAGE_BEFORE, RES_BREAK ), 0);
pLastStt = pStt;
nLineLen = 0;
bIns = false;
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index ab005119c1e6..6b72e561e4ec 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -3758,7 +3758,7 @@ SwAttrFnTab aCSS1AttrFnTab = {
/* RES_TXTATR_CHARFMT */ 0,
/* RES_TXTATR_CJK_RUBY */ 0,
/* RES_TXTATR_UNKNOWN_CONTAINER */ 0,
-/* RES_TXTATR_DUMMY5 */ 0,
+/* RES_TXTATR_INPUTFIELD */ 0,
/* RES_TXTATR_FIELD */ 0,
/* RES_TXTATR_FLYCNT */ 0,
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 910b661aad55..c9dd2bf6239c 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -2485,9 +2485,9 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
if( RES_TXTATR_FIELD == pHt->Which() ) // Felder nicht
continue; // ausgeben
- if ( pHt->GetEnd() && !pHt->HasDummyChar() )
+ if ( pHt->End() && !pHt->HasDummyChar() )
{
- xub_StrLen nHtEnd = *pHt->GetEnd(),
+ const xub_StrLen nHtEnd = *pHt->End(),
nHtStt = *pHt->GetStart();
if( !rHTMLWrt.bWriteAll && nHtEnd <= nStrPos )
continue;
@@ -2545,11 +2545,11 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
&& nStrPos != nEnde )
{
do {
- if ( pHt->GetEnd() && !pHt->HasDummyChar() )
+ if ( pHt->End() && !pHt->HasDummyChar() )
{
if( RES_CHRATR_KERNING == pHt->Which() &&
rHTMLWrt.IsHTMLMode(HTMLMODE_FIRSTLINE) &&
- *pHt->GetEnd() - nStrPos == 1 &&
+ *pHt->End() - nStrPos == 1 &&
' ' == rStr.GetChar(nStrPos) &&
((const SvxKerningItem&)pHt->GetAttr()).GetValue() > 0 )
{
@@ -2564,13 +2564,13 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
// Der Hint braucht nun doch nicht weiter
// beruecksichtigt werden.
}
- else if( *pHt->GetEnd() != nStrPos )
+ else if( *pHt->End() != nStrPos )
{
// Hints mit Ende einsortieren, wenn sie keinen
// leeren Bereich aufspannen (Hints, die keinen
// Bereich aufspannen werden ignoriert
aEndPosLst.Insert( pHt->GetAttr(), nStrPos + nOffset,
- *pHt->GetEnd() + nOffset,
+ *pHt->End() + nOffset,
rHTMLWrt.aChrFmtInfos );
}
}
@@ -3413,7 +3413,7 @@ SwAttrFnTab aHTMLAttrFnTab = {
/* RES_TXTATR_CHARFMT */ OutHTML_SwTxtCharFmt,
/* RES_TXTATR_CJK_RUBY */ 0,
/* RES_TXTATR_UNKNOWN_CONTAINER */ 0,
-/* RES_TXTATR_DUMMY5 */ 0,
+/* RES_TXTATR_INPUTFIELD */ OutHTML_SwFmtFld,
/* RES_TXTATR_FIELD */ OutHTML_SwFmtFld,
/* RES_TXTATR_FLYCNT */ OutHTML_SwFlyCnt,
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 51a6442d6708..e1caf2afb86b 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2265,11 +2265,7 @@ sal_Bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, sal_Bool bUpdateNu
if( GetNumInfo().GetDepth() )
{
sal_uInt8 nLvl = GetNumInfo().GetLevel();
- // --> OD 2008-04-02 #refactorlists#
-// SetNoNum (&nLvl, sal_True);
-// SetNodeNum( nLvl);
SetNodeNum( nLvl, false );
- // <--
}
else
pPam->GetNode()->GetTxtNode()->ResetAttr( RES_PARATR_NUMRULE );
@@ -2777,6 +2773,7 @@ void SwHTMLParser::_SetAttr( sal_Bool bChkEnd, sal_Bool bBeforeTable,
}
break;
case RES_TXTATR_FIELD:
+ case RES_TXTATR_INPUTFIELD:
{
sal_uInt16 nFldWhich =
pPostIts
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 14bd9bd9b0c3..4a1d66149d95 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -891,7 +891,7 @@ sal_uInt16 SwHTMLWriter::OutHeaderAttrs()
for( sal_uInt16 i=0; i<nCntAttr; i++ )
{
const SwTxtAttr *pHt = pTxtNd->GetSwpHints()[i];
- if( !pHt->GetEnd() )
+ if( !pHt->End() )
{
xub_StrLen nPos = *pHt->GetStart();
if( nPos-nOldPos > 1 || RES_TXTATR_FIELD != pHt->Which() )
diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx
index 57cfd289da86..07530fc2f3ba 100644
--- a/sw/source/filter/rtf/rtffly.cxx
+++ b/sw/source/filter/rtf/rtffly.cxx
@@ -272,7 +272,7 @@ void SwRTFParser::SetFlysInDoc()
aDropCap.GetChars() = 1;
SwIndex aIdx( pEndNd );
- pNd->RstAttr( aIdx, 1, RES_CHRATR_FONTSIZE );
+ pNd->RstTxtAttr( aIdx, 1, RES_CHRATR_FONTSIZE );
pNd->SetAttr( aDropCap );
}
delete pFlySave;
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index dd0b66b2cdcb..9a3b7ab3fa87 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -142,12 +142,17 @@ void SwFltStackEntry::SetEndPos(const SwPosition& rEndPos)
//because it is beyond the length of para...need special consideration here.
bool SwFltStackEntry::IsAbleMakeRegion()
{
- SwCntntNode *const pCntntNode(
- SwNodeIndex(nMkNode, +1).GetNode().GetCntntNode());
- if ((nMkNode.GetIndex() == nPtNode.GetIndex()) && (nMkCntnt == nPtCntnt)
- && ((0 != nPtCntnt) || (pCntntNode && (0 != pCntntNode->Len())))
- && ((RES_TXTATR_FIELD != pAttr->Which())
- && !(bIsParaEnd && pCntntNode && pCntntNode->IsTxtNode() && 0 != pCntntNode->Len() )))
+ SwCntntNode *const pCntntNode( SwNodeIndex(nMkNode, +1).GetNode().GetCntntNode() );
+ if ( (nMkNode.GetIndex() == nPtNode.GetIndex())
+ && (nMkCntnt == nPtCntnt)
+ && ( (0 != nPtCntnt)
+ || ( pCntntNode
+ && ( 0 != pCntntNode->Len() ) ) )
+ && ( RES_TXTATR_FIELD != pAttr->Which() && RES_TXTATR_INPUTFIELD != pAttr->Which() )
+ && !( bIsParaEnd
+ && pCntntNode
+ && pCntntNode->IsTxtNode()
+ && 0 != pCntntNode->Len() ) )
{
return false;
}
@@ -505,9 +510,11 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
case RES_FLTR_STYLESHEET:
break;
case RES_TXTATR_FIELD:
+ case RES_TXTATR_INPUTFIELD:
break;
case RES_TXTATR_TOXMARK:
break;
+
case RES_FLTR_NUMRULE: // Numrule 'reinsetzen
{
const String& rNumNm = ((SfxStringItem*)pEntry->pAttr)->GetValue();
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index 7e67ed035b74..5929b97c01ec 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -885,9 +885,9 @@ oncemore:
}
case 39: // fillin command
pField = new SwInputField(
- (SwInputFieldType*)rOut.GetSysFldType( RES_INPUTFLD ),
+ static_cast<SwInputFieldType*>(rOut.GetSysFldType( RES_INPUTFLD )),
aEmptyStr, sFormel,
- INP_TXT, 0 ); // sichtbar ( geht z.Zt. nicht anders )
+ INP_TXT, 0, false );
break;
case 51: // macro button
{
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index a644371385ce..b3a0f03cfad1 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -437,7 +437,7 @@ protected:
/// Sfx item RES_TXTATR_CHARFMT
virtual void TextCharFormat( const SwFmtCharFmt& ) = 0;
- /// Sfx item RES_TXTATR_FIELD
+ /// Sfx item RES_TXTATR_FIELD and RES_TXTATR_INPUTFIELD
void TextField( const SwFmtFld& );
/// Sfx item RES_TXTATR_FLYCNT
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 4355fcdc7148..47c21884c4da 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -563,11 +563,10 @@ void WW8Export::DoFormText(const SwInputField * pFld)
OutputField(0, ww::eFORMTEXT, aEmptyStr, WRITEFIELD_CMD_END);
- String const fieldStr( pFld->ExpandField(true) );
+ const String fieldStr( pFld->ExpandField(true) );
SwWW8Writer::WriteString16(Strm(), fieldStr, false);
static sal_uInt8 aArr2[] = {
- 0x03, 0x6a, 0x00, 0x00, 0x00, 0x00, // sprmCPicLocation
0x55, 0x08, 0x01, // sprmCFSpec
0x75, 0x08, 0x01 // ???
};
@@ -2105,7 +2104,7 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
{
const SvxShadowItem* pSI = (const SvxShadowItem*)pShadItem;
- const sal_uInt16 nCstScale = 635; // unit scale between SODC and MS Word
+ const sal_uInt16 nCstScale = 635; // unit scale between AOO and MS Word
const sal_uInt32 nShadowType = 131074; // shadow type of ms word. need to set the default value.
sal_uInt32 nColor = (sal_uInt32)(pSI->GetColor().GetColor()) ;
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index cf2032f164ba..813b9e821496 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -396,9 +396,9 @@ xub_StrLen WW8SwAttrIter::SearchNext( xub_StrLen nStartPos )
if( nPos >= nStartPos && nPos <= nMinPos )
nMinPos = nPos;
- if( pHt->GetEnd() ) // Attr mit Ende
+ if( pHt->End() ) // Attr mit Ende
{
- nPos = *pHt->GetEnd(); // gibt letztes Attr-Zeichen + 1
+ nPos = *pHt->End(); // gibt letztes Attr-Zeichen + 1
if( nPos >= nStartPos && nPos <= nMinPos )
nMinPos = nPos;
}
@@ -491,7 +491,7 @@ void WW8SwAttrIter::OutAttr( xub_StrLen nSwPos )
for (xub_StrLen i = 0; i < pTxtAttrs->Count(); ++i)
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
- const xub_StrLen* pEnd = pHt->GetEnd();
+ const xub_StrLen* pEnd = pHt->End();
if (pEnd ? ( nSwPos >= *pHt->GetStart() && nSwPos < *pEnd)
: nSwPos == *pHt->GetStart() )
@@ -601,14 +601,17 @@ void WW8SwAttrIter::OutFlys(xub_StrLen nSwPos)
bool WW8SwAttrIter::IsTxtAttr( xub_StrLen nSwPos )
{
- // search for attrs with CH_TXTATR
+ // search for attrs with dummy character or content
if (const SwpHints* pTxtAttrs = rNd.GetpSwpHints())
{
for (sal_uInt16 i = 0; i < pTxtAttrs->Count(); ++i)
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
- if ( pHt->HasDummyChar() && (*pHt->GetStart() == nSwPos) )
+ if ( ( pHt->HasDummyChar() || pHt->HasContent() )
+ && (*pHt->GetStart() == nSwPos) )
+ {
return true;
+ }
}
}
@@ -666,7 +669,7 @@ const SfxPoolItem* WW8SwAttrIter::HasTextItem( sal_uInt16 nWhich ) const
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
const SfxPoolItem* pItem = &pHt->GetAttr();
const xub_StrLen* pAtrEnd = 0;
- if( 0 != ( pAtrEnd = pHt->GetEnd() ) && // nur Attr mit Ende
+ if( 0 != ( pAtrEnd = pHt->End() ) && // nur Attr mit Ende
nWhich == pItem->Which() && //
nTmpSwPos >= *pHt->GetStart() && nTmpSwPos < *pAtrEnd )
{
@@ -1115,7 +1118,7 @@ void AttributeOutputBase::TOXMark( const SwTxtNode& rNode, const SwTOXMark& rAtt
ww::eField eType = ww::eNONE;
const SwTxtTOXMark& rTxtTOXMark = *rAttr.GetTxtTOXMark();
- const xub_StrLen* pTxtEnd = rTxtTOXMark.GetEnd();
+ const xub_StrLen* pTxtEnd = rTxtTOXMark.End();
if ( pTxtEnd ) // has range?
{
sTxt = rNode.GetExpandTxt( *rTxtTOXMark.GetStart(),
@@ -1188,7 +1191,7 @@ int WW8SwAttrIter::OutAttrWithRange(xub_StrLen nPos)
if ( m_rExport.AttrOutput().StartURL( rINet->GetValue(), rINet->GetTargetFrame() ) )
++nRet;
}
- if ( 0 != ( pEnd = pHt->GetEnd() ) && nPos == *pEnd )
+ if ( 0 != ( pEnd = pHt->End() ) && nPos == *pEnd )
{
if ( m_rExport.AttrOutput().EndURL() )
--nRet;
@@ -1200,7 +1203,7 @@ int WW8SwAttrIter::OutAttrWithRange(xub_StrLen nPos)
OutSwFmtRefMark( *static_cast< const SwFmtRefMark* >( pItem ), true );
++nRet;
}
- if ( 0 != ( pEnd = pHt->GetEnd() ) && nPos == *pEnd )
+ if ( 0 != ( pEnd = pHt->End() ) && nPos == *pEnd )
{
OutSwFmtRefMark( *static_cast< const SwFmtRefMark* >( pItem ), false );
--nRet;
@@ -1216,7 +1219,7 @@ int WW8SwAttrIter::OutAttrWithRange(xub_StrLen nPos)
m_rExport.AttrOutput().StartRuby( rNd, *static_cast< const SwFmtRuby* >( pItem ) );
++nRet;
}
- if ( 0 != ( pEnd = pHt->GetEnd() ) && nPos == *pEnd )
+ if ( 0 != ( pEnd = pHt->End() ) && nPos == *pEnd )
{
m_rExport.AttrOutput().EndRuby();
--nRet;
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 7616c90c4ca8..e5e137f4596a 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -1843,9 +1843,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
bool bUnicode = IsUnicode();
WW8_WrPlcFld* pFldP = CurrentFieldPlc();
- // --> OD 2008-08-14 #158418#
const bool bIncludeEmptyPicLocation = ( eFldType == ww::ePAGE );
- // <--
if (WRITEFIELD_START & nMode)
{
sal_uInt8 aFld13[2] = { 0x13, 0x00 }; // will change
@@ -1854,9 +1852,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
aFld13[0] |= 0x80;
aFld13[1] = static_cast< sal_uInt8 >(eFldType); // Typ nachtragen
pFldP->Append( Fc2Cp( Strm().Tell() ), aFld13 );
- // --> OD 2008-08-14 #158418#
InsertSpecialChar( *this, 0x13, 0, bIncludeEmptyPicLocation );
- // <--
}
if (WRITEFIELD_CMD_START & nMode)
{
@@ -1867,8 +1863,8 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
SwWW8Writer::WriteString8(Strm(), rFldCmd, false,
RTL_TEXTENCODING_MS_1252);
}
- // --> OD 2005-06-08 #i43956# - write hyperlink character including
- // attributes and corresponding binary data for certain reference fields.
+ // write hyperlink character including attributes and
+ // corresponding binary data for certain reference fields.
bool bHandleBookmark = false;
if (pFld)
@@ -1877,12 +1873,6 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
( eFldType == ww::ePAGEREF || eFldType == ww::eREF ||
eFldType == ww::eNOTEREF || eFldType == ww::eFOOTREF ))
bHandleBookmark = true;
-
-#if 0
- if (pFld->GetTyp()->Which() == RES_INPUTFLD &&
- eFldType == ww::eFORMTEXT)
- bHandleBookmark = true;
-#endif
}
if ( bHandleBookmark )
@@ -1908,16 +1898,13 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
// insert hyperlink character including attributes and data.
InsertSpecialChar( *this, 0x01, &aLinkStr );
}
- // <--
}
if (WRITEFIELD_CMD_END & nMode)
{
static const sal_uInt8 aFld14[2] = { 0x14, 0xff };
pFldP->Append( Fc2Cp( Strm().Tell() ), aFld14 );
pFldP->ResultAdded();
- // --> OD 2008-08-14 #158418#
InsertSpecialChar( *this, 0x14, 0, bIncludeEmptyPicLocation );
- // <--
}
if (WRITEFIELD_END & nMode)
{
@@ -1985,9 +1972,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
}
pFldP->Append( Fc2Cp( Strm().Tell() ), aFld15 );
- // --> OD 2008-08-14 #158418#
InsertSpecialChar( *this, 0x15, 0, bIncludeEmptyPicLocation );
- // <--
}
}
@@ -2619,7 +2604,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
const SwField* pFld = rField.GetField();
String sStr; // fuer optionale Parameter
bool bWriteExpand = false;
- sal_uInt16 nSubType = pFld->GetSubType();
+ const sal_uInt16 nSubType = pFld->GetSubType();
switch (pFld->GetTyp()->Which())
{
@@ -2866,8 +2851,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
break;
case RES_INPUTFLD:
{
- const SwInputField * pInputField =
- dynamic_cast<const SwInputField *>(pFld);
+ const SwInputField * pInputField = dynamic_cast<const SwInputField *>(pFld);
if (pInputField->isFormField())
GetExport().DoFormText(pInputField);
@@ -5182,6 +5166,7 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt )
TextCharFormat( static_cast< const SwFmtCharFmt& >( rHt ) );
break;
case RES_TXTATR_FIELD:
+ case RES_TXTATR_INPUTFIELD:
TextField( static_cast< const SwFmtFld& >( rHt ) );
break;
case RES_TXTATR_FLYCNT:
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 2e75bd06defc..9d6c6c9c7888 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1091,6 +1091,8 @@ void SwWW8FltControlStack::NewAttr(const SwPosition& rPos,
{
ASSERT(RES_TXTATR_FIELD != rAttr.Which(), "probably don't want to put"
"fields into the control stack");
+ ASSERT(RES_TXTATR_INPUTFIELD != rAttr.Which(), "probably don't want to put"
+ "input fields into the control stack");
ASSERT(RES_FLTR_REDLINE != rAttr.Which(), "probably don't want to put"
"redlines into the control stack");
SwFltControlStack::NewAttr(rPos, rAttr);
@@ -1332,6 +1334,12 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
ASSERT(!this, "What is a field doing in the control stack,"
"probably should have been in the endstack");
break;
+
+ case RES_TXTATR_INPUTFIELD:
+ ASSERT(!this, "What is a input field doing in the control stack,"
+ "probably should have been in the endstack");
+ break;
+
case RES_TXTATR_INETFMT:
{
SwPaM aRegion(rTmpPos);
@@ -1451,6 +1459,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
do normal (?) strange stuff
*/
case RES_TXTATR_FIELD:
+ case RES_TXTATR_INPUTFIELD:
{
SwNodeIndex aIdx(pEntry->nMkNode, 1);
SwPaM aPaM(aIdx, pEntry->nMkCntnt);
@@ -1788,10 +1797,13 @@ void SwWW8ImplReader::ImportDop()
mpDocShell->SetModifyPasswordHash(pWDop->lKeyProtDoc);
- const SvtFilterOptions* pOpt = SvtFilterOptions::Get();
- sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields());
- if (bUseEnhFields) {
- rDoc.set(IDocumentSettingAccess::PROTECT_FORM, pWDop->fProtEnabled );
+ {
+ const SvtFilterOptions* pOpt = SvtFilterOptions::Get();
+ const sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields());
+ if (bUseEnhFields)
+ {
+ rDoc.set(IDocumentSettingAccess::PROTECT_FORM, pWDop->fProtEnabled );
+ }
}
maTracer.LeaveEnvironment(sw::log::eDocumentProperties);
@@ -3886,26 +3898,6 @@ void wwSectionManager::SetUseOn(wwSection &rSection)
rSection.mpTitlePage->WriteUseOn(
(UseOnPage) (eUseBase | nsUseOnPage::PD_HEADERSHARE | nsUseOnPage::PD_FOOTERSHARE));
}
-
- if( nsUseOnPage::PD_MIRROR != (UseOnPage)(eUse & nsUseOnPage::PD_MIRROR) )
- {
- if( rSection.maSep.bkc == 3 )
- {
- if( rSection.mpPage )
- rSection.mpPage->SetUseOn( nsUseOnPage::PD_LEFT );
- if( rSection.mpTitlePage )
- rSection.mpTitlePage->SetUseOn( nsUseOnPage::PD_LEFT );
- }
- else if( rSection.maSep.bkc == 4 )
- {
- if( rSection.mpPage )
- rSection.mpPage->SetUseOn( nsUseOnPage::PD_RIGHT );
- if( rSection.mpTitlePage )
- rSection.mpTitlePage->SetUseOn( nsUseOnPage::PD_RIGHT );
- }
-
- }
-
}
//Set the page descriptor on this node, handle the different cases for a text
@@ -4044,7 +4036,8 @@ void wwSectionManager::InsertSegments()
bool bInsertSection = (aIter != aStart) ? (aIter->IsContinous() && bThisAndPreviousAreCompatible): false;
bool bInsertPageDesc = !bInsertSection;
bool bProtected = SectionIsProtected(*aIter); // do we really need this ?? I guess I have a different logic in editshell which disales this...
- if (bUseEnhFields && mrReader.pWDop->fProtEnabled && aIter->IsNotProtected()) {
+ if (bUseEnhFields && mrReader.pWDop->fProtEnabled && aIter->IsNotProtected())
+ {
// here we have the special case that the whole document is protected, with the execption of this section.
// I want to address this when I do the section rework, so for the moment we disable the overall protection then...
mrReader.rDoc.set(IDocumentSettingAccess::PROTECT_FORM, false );
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 4a00e026367c..b607f5920dda 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -133,55 +133,62 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr )
*/
const SvtFilterOptions* pOpt = SvtFilterOptions::Get();
- sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields());
+ const sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields());
- if (!bUseEnhFields) {
- aFormula.sDefault = GetFieldResult(pF);
+ if (!bUseEnhFields)
+ {
+ aFormula.sDefault = GetFieldResult(pF);
#if 0 // why not? (flr)
- //substituting Unicode spacing 0x2002 with double space for layout
- aFormula.sDefault.SearchAndReplaceAll(
- String(static_cast< sal_Unicode >(0x2002)),
- CREATE_CONST_ASC(" "));
+ //substituting Unicode spacing 0x2002 with double space for layout
+ aFormula.sDefault.SearchAndReplaceAll(
+ String(static_cast< sal_Unicode >(0x2002)),
+ CREATE_CONST_ASC(" "));
#endif
- SwInputField aFld((SwInputFieldType*)rDoc.GetSysFldType( RES_INPUTFLD ),
- aFormula.sDefault , aFormula.sTitle , INP_TXT, 0 );
- aFld.SetHelp(aFormula.sHelp);
- aFld.SetToolTip(aFormula.sToolTip);
-
- rDoc.InsertPoolItem(*pPaM, SwFmtFld(aFld), 0);
- return FLD_OK;
- } else {
- WW8PLCFx_Book* pB = pPlcxMan->GetBook();
- String aBookmarkName;
- if (pB!=NULL) {
- WW8_CP currentCP=pF->nSCode;
- WW8_CP currentLen=pF->nLen;
-
- sal_uInt16 bkmFindIdx;
- String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
-
- if (aBookmarkFind.Len()>0) {
- pB->SetStatus(bkmFindIdx, BOOK_FIELD); // mark bookmark as consumed, such that tl'll not get inserted as a "normal" bookmark again
+ SwInputField aFld(
+ static_cast<SwInputFieldType*>(rDoc.GetSysFldType( RES_INPUTFLD )),
+ aFormula.sDefault,
+ aFormula.sTitle,
+ INP_TXT,
+ 0 );
+ aFld.SetHelp(aFormula.sHelp);
+ aFld.SetToolTip(aFormula.sToolTip);
+
+ rDoc.InsertPoolItem( *pPaM, SwFmtFld(aFld), 0 );
+ return FLD_OK;
+ }
+ else
+ {
+ WW8PLCFx_Book* pB = pPlcxMan->GetBook();
+ String aBookmarkName;
+ if (pB!=NULL) {
+ WW8_CP currentCP=pF->nSCode;
+ WW8_CP currentLen=pF->nLen;
+
+ sal_uInt16 bkmFindIdx;
+ String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
+
if (aBookmarkFind.Len()>0) {
- aBookmarkName=aBookmarkFind;
+ pB->SetStatus(bkmFindIdx, BOOK_FIELD); // mark bookmark as consumed, such that tl'll not get inserted as a "normal" bookmark again
+ if (aBookmarkFind.Len()>0) {
+ aBookmarkName=aBookmarkFind;
+ }
}
}
- }
- if (pB!=NULL && aBookmarkName.Len()==0) {
- aBookmarkName=pB->GetUniqueBookmarkName(aFormula.sTitle);
- }
+ if (pB!=NULL && aBookmarkName.Len()==0) {
+ aBookmarkName=pB->GetUniqueBookmarkName(aFormula.sTitle);
+ }
- if (aBookmarkName.Len()>0) {
- maFieldStack.back().SetBookmarkName(aBookmarkName);
- maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_FORMTEXT));
- maFieldStack.back().getParameters()[::rtl::OUString::createFromAscii("Description")] = uno::makeAny(::rtl::OUString(aFormula.sToolTip));
- maFieldStack.back().getParameters()[::rtl::OUString::createFromAscii("Name")] = uno::makeAny(::rtl::OUString(aFormula.sTitle));
- }
- return FLD_TEXT;
+ if (aBookmarkName.Len()>0) {
+ maFieldStack.back().SetBookmarkName(aBookmarkName);
+ maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_FORMTEXT));
+ maFieldStack.back().getParameters()[::rtl::OUString::createFromAscii("Description")] = uno::makeAny(::rtl::OUString(aFormula.sToolTip));
+ maFieldStack.back().getParameters()[::rtl::OUString::createFromAscii("Name")] = uno::makeAny(::rtl::OUString(aFormula.sTitle));
+ }
+ return FLD_TEXT;
}
}
@@ -197,49 +204,52 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr )
const SvtFilterOptions* pOpt = SvtFilterOptions::Get();
sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields());
- if (!bUseEnhFields) {
- pFormImpl->InsertFormula(aFormula);
- return FLD_OK;
- } else {
- String aBookmarkName;
- WW8PLCFx_Book* pB = pPlcxMan->GetBook();
- if (pB!=NULL) {
- WW8_CP currentCP=pF->nSCode;
- WW8_CP currentLen=pF->nLen;
-
- sal_uInt16 bkmFindIdx;
- String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
-
- if (aBookmarkFind.Len()>0) {
- pB->SetStatus(bkmFindIdx, BOOK_FIELD); // mark as consumed by field
+ if (!bUseEnhFields)
+ {
+ pFormImpl->InsertFormula(aFormula);
+ return FLD_OK;
+ }
+ else
+ {
+ String aBookmarkName;
+ WW8PLCFx_Book* pB = pPlcxMan->GetBook();
+ if (pB!=NULL) {
+ WW8_CP currentCP=pF->nSCode;
+ WW8_CP currentLen=pF->nLen;
+
+ sal_uInt16 bkmFindIdx;
+ String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
+
if (aBookmarkFind.Len()>0) {
- aBookmarkName=aBookmarkFind;
+ pB->SetStatus(bkmFindIdx, BOOK_FIELD); // mark as consumed by field
+ if (aBookmarkFind.Len()>0) {
+ aBookmarkName=aBookmarkFind;
+ }
}
}
- }
- if (pB!=NULL && aBookmarkName.Len()==0) {
- aBookmarkName=pB->GetUniqueBookmarkName(aFormula.sTitle);
- }
+ if (pB!=NULL && aBookmarkName.Len()==0) {
+ aBookmarkName=pB->GetUniqueBookmarkName(aFormula.sTitle);
+ }
- if (aBookmarkName.Len()>0)
- {
- IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( );
- IFieldmark* pFieldmark = dynamic_cast<IFieldmark*>( pMarksAccess->makeNoTextFieldBookmark(
+ if (aBookmarkName.Len()>0)
+ {
+ IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( );
+ IFieldmark* pFieldmark = dynamic_cast<IFieldmark*>( pMarksAccess->makeNoTextFieldBookmark(
*pPaM, aBookmarkName,
rtl::OUString::createFromAscii( ODF_FORMCHECKBOX ) ) );
- ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
- if (pFieldmark!=NULL) {
- IFieldmark::parameter_map_t* const pParameters = pFieldmark->GetParameters();
- ICheckboxFieldmark* pCheckboxFm = dynamic_cast<ICheckboxFieldmark*>(pFieldmark);
- (*pParameters)[::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_NAME)] = uno::makeAny(::rtl::OUString(aFormula.sTitle));
- (*pParameters)[::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_HELPTEXT)] = uno::makeAny(::rtl::OUString(aFormula.sToolTip));
- if(pCheckboxFm)
- pCheckboxFm->SetChecked(aFormula.nChecked);
- // set field data here...
+ ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
+ if (pFieldmark!=NULL) {
+ IFieldmark::parameter_map_t* const pParameters = pFieldmark->GetParameters();
+ ICheckboxFieldmark* pCheckboxFm = dynamic_cast<ICheckboxFieldmark*>(pFieldmark);
+ (*pParameters)[::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_NAME)] = uno::makeAny(::rtl::OUString(aFormula.sTitle));
+ (*pParameters)[::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_HELPTEXT)] = uno::makeAny(::rtl::OUString(aFormula.sToolTip));
+ if(pCheckboxFm)
+ pCheckboxFm->SetChecked(aFormula.nChecked);
+ // set field data here...
+ }
}
- }
- return FLD_OK;
+ return FLD_OK;
}
}
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index d6c1278a25df..115d982cbdb5 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -1227,8 +1227,8 @@ eF_ResT SwWW8ImplReader::Read_F_Input( WW8FieldDesc* pF, String& rStr )
if( !aDef.Len() )
aDef = GetFieldResult( pF );
- SwInputField aFld( (SwInputFieldType*)rDoc.GetSysFldType( RES_INPUTFLD ),
- aDef, aQ, INP_TXT, 0 ); // sichtbar ( geht z.Zt. nicht anders )
+ SwInputField aFld( static_cast<SwInputFieldType*>(rDoc.GetSysFldType( RES_INPUTFLD )),
+ aDef, aQ, INP_TXT, 0, false );
rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
return FLD_OK;
@@ -2668,8 +2668,8 @@ void SwWW8ImplReader::Read_SubF_Combined( _ReadFieldParams& rReadParam)
sCombinedCharacters = sPart.Copy( nBegin+1, nEnd-nBegin-1 );
if ( sCombinedCharacters.Len() )
{
- SwInputField aFld( (SwInputFieldType*)rDoc.GetSysFldType( RES_INPUTFLD ),
- sCombinedCharacters, sCombinedCharacters, INP_TXT, 0 );
+ SwInputField aFld( static_cast<SwInputFieldType*>(rDoc.GetSysFldType( RES_INPUTFLD )),
+ sCombinedCharacters, sCombinedCharacters, INP_TXT, 0, false );
rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 ); // insert input field
}
}
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index 388e298bcc04..2d3886a9e48b 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -310,7 +310,7 @@ static sal_uInt16 nBCTitleNo = 0;
if ( nMin > 0 )
{
SvxLRSpaceItem aLR( RES_LR_SPACE );
- pSh->SetAttr( aLR );
+ pSh->SetAttrItem( aLR );
SwFmt *pStandard = pSh->GetTxtCollFromPool( RES_POOLCOLL_STANDARD );
aLR.SetLeft ( sal_uInt16(nMin) );
aLR.SetRight( sal_uInt16(nMin) );
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index dbb2327a3172..606434e106f8 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -103,6 +103,9 @@
#include <unotools/fltrcfg.hxx>
#include <svtools/htmlcfg.hxx>
#include <sfx2/fcontnr.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <sfx2/viewfrm.hxx>
+//-----IAccessibility2 Implementation 2009
#include <sfx2/objface.hxx>
#include <comphelper/storagehelper.hxx>
@@ -399,6 +402,22 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SaveAs" );
+ //IAccessibility2 Implementation 2009-----
+ pDoc->setDocAccTitle(String());
+ SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this );
+ if (pFrame1)
+ {
+ Window* pWindow = &pFrame1->GetWindow();
+ if ( pWindow )
+ {
+ Window* pSysWin = pWindow->GetSystemWindow();
+ if ( pSysWin )
+ {
+ pSysWin->SetAccessibleName(String());
+ }
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
SwWait aWait( *this, sal_True );
//#i3370# remove quick help to prevent saving of autocorrection suggestions
if(pView)
@@ -1264,6 +1283,43 @@ uno::Reference< frame::XController >
/* -----------------------------12.02.01 12:08--------------------------------
---------------------------------------------------------------------------*/
+//IAccessibility2 Implementation 2009-----
+void SwDocShell::setDocAccTitle( const String& rTitle )
+{
+ if (pDoc )
+ {
+ pDoc->setDocAccTitle( rTitle );
+ }
+}
+const String SwDocShell::getDocAccTitle() const
+{
+ String sRet;
+ if (pDoc)
+ {
+ sRet = pDoc->getDocAccTitle();
+ }
+
+ return sRet;
+}
+
+void SwDocShell::setDocReadOnly( sal_Bool bReadOnly)
+{
+ if (pDoc )
+ {
+ pDoc->setDocReadOnly( bReadOnly );
+ }
+}
+sal_Bool SwDocShell::getDocReadOnly() const
+{
+ if (pDoc)
+ {
+ return pDoc->getDocReadOnly();
+ }
+
+ return sal_False;
+}
+//-----IAccessibility2 Implementation 2009
+
static const char* s_EventNames[] =
{
"OnPageCountChange",
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index b28ff49de918..ffaefbe8ae31 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -878,7 +878,7 @@ sal_uInt16 SwDocShell::ApplyStyles(const String &rName, sal_uInt16 nFamily,
case SFX_STYLE_FAMILY_CHAR:
{
SwFmtCharFmt aFmt(pStyle->GetCharFmt());
- pSh->SetAttr( aFmt, (nMode & KEY_SHIFT) ?
+ pSh->SetAttrItem( aFmt, (nMode & KEY_SHIFT) ?
nsSetAttrMode::SETATTR_DONTREPLACE : nsSetAttrMode::SETATTR_DEFAULT );
break;
}
@@ -1184,7 +1184,7 @@ sal_uInt16 SwDocShell::MakeByExample( const String &rName, sal_uInt16 nFamily,
pCurrWrtShell->FillByEx( pChar );
pChar->SetDerivedFrom( pCurrWrtShell->GetCurCharFmt() );
SwFmtCharFmt aFmt( pChar );
- pCurrWrtShell->SetAttr( aFmt );
+ pCurrWrtShell->SetAttrItem( aFmt );
pCurrWrtShell->EndAllAction();
}
}
diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx
index d8b6d52e13e5..bb9b291e9474 100644
--- a/sw/source/ui/cctrl/actctrl.cxx
+++ b/sw/source/ui/cctrl/actctrl.cxx
@@ -105,8 +105,13 @@ void NoSpaceEdit::Modify()
SetText(sTemp);
SetSelection(aSel);
}
+//IAccessibility2 Impplementaton 2009-----
+ Edit::Modify();
+ /*
if(GetModifyHdl().IsSet())
GetModifyHdl().Call(this);
+ */
+//-----IAccessibility2 Impplementaton 2009
}
/* -----------------25.06.2003 15:57-----------------
diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx
index 39e0b8dc4c63..15e0a1f855ad 100644
--- a/sw/source/ui/cctrl/swlbox.cxx
+++ b/sw/source/ui/cctrl/swlbox.cxx
@@ -223,5 +223,11 @@ String SwComboBox::GetText() const
return aTxt;
}
-
-
+//IAccessibility2 Impplementaton 2009-----
+void SwComboBox::SetText( const XubString& rStr )
+{
+ ComboBox::SetText(rStr);
+ // MT: CallEventListeners stay protected for now. Probably not needed at all, as the implementation of VCLXAccessibelEdit/ComboBox should do it on text changed nowadays anyway. Verify.
+ // CallEventListeners( VCLEVENT_EDIT_MODIFY );
+}
+//-----IAccessibility2 Impplementaton 2009
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index 32db26d9b4b5..bd0e3bb71641 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -127,12 +127,17 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
break;
}
- const SfxStyleFilter& rFilterList = pFamilyItem->GetFilterList();
- for( i = 0; i < rFilterList.Count(); ++i)
+//IAccessibility2 Impplementaton 2009-----
+ if( pFamilyItem )
{
- aFilterLB.InsertEntry(rFilterList.GetObject(i)->aName);
- sal_uInt16* pFilter = new sal_uInt16(rFilterList.GetObject(i)->nFlags);
- aFilterLB.SetEntryData(i, pFilter);
+ const SfxStyleFilter& rFilterList = pFamilyItem->GetFilterList();
+ for( i = 0; i < rFilterList.Count(); ++i)
+ {
+ aFilterLB.InsertEntry(rFilterList.GetObject(i)->aName);
+ sal_uInt16* pFilter = new sal_uInt16(rFilterList.GetObject(i)->nFlags);
+ aFilterLB.SetEntryData(i, pFilter);
+ }
+//-----IAccessibility2 Impplementaton 2009
}
aFilterLB.SelectEntryPos(1);
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index beb0c3398ad1..6bed9b350b48 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -457,6 +457,9 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
aPasswdPB.SetAccessibleRelationMemberOf(&aProtectFL);
aPasswdPB.SetAccessibleRelationLabeledBy(&aPasswdCB);
aSubRegionED.SetAccessibleName(aSubRegionFT.GetText());
+//IAccessibility2 Impplementaton 2009-----
+ aTree.SetAllEntriesAccessibleRoleType(TREEBOX_ALLITEM_ACCROLE_TYPE_TREE);
+//-----IAccessibility2 Impplementaton 2009
}
/* -----------------------------26.04.01 14:56--------------------------------
diff --git a/sw/source/ui/docvw/SidebarTxtControl.hxx b/sw/source/ui/docvw/SidebarTxtControl.hxx
index 99d016ea08cc..444242f5fe69 100644
--- a/sw/source/ui/docvw/SidebarTxtControl.hxx
+++ b/sw/source/ui/docvw/SidebarTxtControl.hxx
@@ -29,7 +29,7 @@
class OutlinerView;
class SwView;
class SwPostItMgr;
-class SpellCallbackInfo;
+struct SpellCallbackInfo;
namespace sw { namespace sidebarwindows {
diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx
index ed2c44cc87e2..90e71bb8c7ce 100644
--- a/sw/source/ui/docvw/edtdd.cxx
+++ b/sw/source/ui/docvw/edtdd.cxx
@@ -266,7 +266,9 @@ sal_uInt16 SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppO
{
SwWrtShell &rSh = rView.GetWrtShell();
const Point aDocPt( PixelToLogic( rPixPnt ) );
- if( rSh.ChgCurrPam( aDocPt ) || rSh.IsOverReadOnlyPos( aDocPt ) )
+ if( rSh.ChgCurrPam( aDocPt )
+ || rSh.IsOverReadOnlyPos( aDocPt )
+ || rSh.DocPtInsideInputFld( aDocPt ) )
return 0;
SdrObject *pObj = NULL;
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index bc62f772b709..4542681c7a3f 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -82,6 +82,7 @@
#include <dselect.hxx>
#include <textsh.hxx>
#include <shdwcrsr.hxx>
+#include <txatbase.hxx>
#include <fmtanchr.hxx>
#include <fmtornt.hxx>
#include <fmtfsize.hxx>
@@ -924,7 +925,7 @@ void SwEditWin::FlushInBuffer()
if(bLang)
{
SvxLanguageItem aLangItem( eBufferLanguage, nWhich );
- rSh.SetAttr( aLangItem );
+ rSh.SetAttrItem( aLangItem );
}
}
}
@@ -1372,8 +1373,8 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
// pressing this inside a note will switch to next/previous note
if ((rKeyCode.IsMod1() && rKeyCode.IsMod2()) && ((rKeyCode.GetCode() == KEY_PAGEUP) || (rKeyCode.GetCode() == KEY_PAGEDOWN)))
{
- bool bNext = rKeyCode.GetCode()==KEY_PAGEDOWN ? true : false;
- SwFieldType* pFldType = rSh.GetFldType(0, RES_POSTITFLD);
+ const bool bNext = rKeyCode.GetCode()==KEY_PAGEDOWN ? true : false;
+ const SwFieldType* pFldType = rSh.GetFldType( 0, RES_POSTITFLD );
rSh.MoveFldType( pFldType, bNext );
return;
}
@@ -1491,9 +1492,8 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
- SW_KeyState eKeyState = bIsDocReadOnly ? KS_CheckDocReadOnlyKeys
- : KS_CheckKey,
- eNextKeyState = KS_Ende;
+ SW_KeyState eKeyState = bIsDocReadOnly ? KS_CheckDocReadOnlyKeys : KS_CheckKey;
+ SW_KeyState eNextKeyState = KS_Ende;
sal_uInt8 nDir = 0;
if (nKS_NUMDOWN_Count > 0)
@@ -1778,7 +1778,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
break;
case KEY_RETURN: // Return
- if( !rSh.HasReadonlySel() )
+ if ( !rSh.HasReadonlySel()
+ && !rSh.CrsrInsideInputFld() )
{
const int nSelectionType = rSh.GetSelectionType();
if(nSelectionType & nsSelectionType::SEL_OLE)
@@ -1814,8 +1815,13 @@ KEYINPUT_CHECKTABLE_INSDEL:
break;
case KEY_RETURN | KEY_MOD2: // ALT-Return
- if( !rSh.HasReadonlySel() && !rSh.IsSttPara() && rSh.GetCurNumRule() )
+ if ( !rSh.HasReadonlySel()
+ && !rSh.IsSttPara()
+ && rSh.GetCurNumRule()
+ && !rSh.CrsrInsideInputFld() )
+ {
eKeyState = KS_NoNum;
+ }
else if( rSh.CanSpecialInsert() )
eKeyState = KS_SpecialInsert;
break;
@@ -1926,6 +1932,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
eKeyState=KS_GotoNextFieldMark;
}
+ else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputFld() )
+ {
+ GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_NEXT_INPUTFLD );
+ eKeyState = KS_Ende;
+ }
else
if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
!rSh.HasReadonlySel() )
@@ -1976,9 +1987,15 @@ KEYINPUT_CHECKTABLE_INSDEL:
sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
#endif
- if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT) {
+ if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT)
+ {
eKeyState=KS_GotoPrevFieldMark;
}
+ else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputFld() )
+ {
+ GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_PREV_INPUTFLD );
+ eKeyState = KS_Ende;
+ }
else if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
!rSh.HasReadonlySel() )
{
@@ -2094,9 +2111,15 @@ KEYINPUT_CHECKTABLE_INSDEL:
eKeyState = rKeyCode.GetModifier() & KEY_SHIFT ?
KS_PrevObject : KS_NextObject;
}
+ else if ( !rSh.IsMultiSelection() && rSh.CrsrInsideInputFld() )
+ {
+ GetView().GetViewFrame()->GetDispatcher()->Execute(
+ KEY_SHIFT != rKeyCode.GetModifier() ? FN_GOTO_NEXT_INPUTFLD : FN_GOTO_PREV_INPUTFLD );
+ }
else
- rSh.SelectNextPrevHyperlink(
- KEY_SHIFT != rKeyCode.GetModifier() );
+ {
+ rSh.SelectNextPrevHyperlink( KEY_SHIFT != rKeyCode.GetModifier() );
+ }
break;
case KEY_RETURN:
{
@@ -2739,12 +2762,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
}
- //Man kann sich in einem Selektionszustand befinden, wenn zuletzt
- //mit dem Keyboard selektiert wurde, aber noch kein CURSOR_KEY
- //anschliessend bewegt worden ist. In diesem Fall muss die vorher-
- //gehende Selektion zuerst beendet werden.
- //MA 07. Oct. 95: Und zwar nicht nur bei Linker Maustaste sondern immer.
- //siehe auch Bug: 19263
if ( rSh.IsInSelect() )
rSh.EndSelect();
@@ -4165,7 +4182,19 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if( SwContentAtPos::SW_FIELD == aCntntAtPos.eCntntAtPos )
{
- rSh.ClickToField( *aCntntAtPos.aFnd.pFld );
+ if ( aCntntAtPos.pFndTxtAttr != NULL
+ && aCntntAtPos.pFndTxtAttr->Which() == RES_TXTATR_INPUTFIELD )
+ {
+ // select content of Input Field, but exclude CH_TXT_ATR_INPUTFIELDSTART
+ // and CH_TXT_ATR_INPUTFIELDEND
+ rSh.SttSelect();
+ rSh.SelectTxt( *(aCntntAtPos.pFndTxtAttr->GetStart()) + 1,
+ *(aCntntAtPos.pFndTxtAttr->End()) - 1 );
+ }
+ else
+ {
+ rSh.ClickToField( *aCntntAtPos.aFnd.pFld );
+ }
}
else if ( SwContentAtPos::SW_SMARTTAG == aCntntAtPos.eCntntAtPos )
{
@@ -4320,10 +4349,10 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
Color aColor( COL_TRANSPARENT );
if( !SwEditWin::bTransparentBackColor )
aColor = SwEditWin::aTextBackColor;
- rSh.SetAttr( SvxBrushItem( aColor, nId ) );
+ rSh.SetAttrItem( SvxBrushItem( aColor, nId ) );
}
else
- rSh.SetAttr( SvxColorItem(SwEditWin::aTextColor, nId) );
+ rSh.SetAttrItem( SvxColorItem(SwEditWin::aTextColor, nId) );
rSh.UnSetVisCrsr();
rSh.EnterStdMode();
rSh.SetVisCrsr(aDocPt);
@@ -4359,7 +4388,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if( (( nsSelectionType::SEL_TXT | nsSelectionType::SEL_TBL )
& eSelection ) && !rSh.HasReadonlySel() )
{
- rSh.SetAttr( SwFmtCharFmt(pApplyTempl->aColl.pCharFmt) );
+ rSh.SetAttrItem( SwFmtCharFmt(pApplyTempl->aColl.pCharFmt) );
rSh.UnSetVisCrsr();
rSh.EnterStdMode();
rSh.SetVisCrsr(aDocPt);
@@ -5709,3 +5738,17 @@ Selection SwEditWin::GetSurroundingTextSelection() const
return Selection( nPos - nStartPos, nPos - nStartPos );
}
}
+//IAccessibility2 Implementation 2009-----
+// MT: Removed Windows::SwitchView() introduced with IA2 CWS.
+// There are other notifications for this when the active view has chnaged, so please update the code to use that event mechanism
+void SwEditWin::SwitchView()
+{
+#ifdef ACCESSIBLE_LAYOUT
+ if (!Application::IsAccessibilityEnabled())
+ {
+ return ;
+ }
+ rView.GetWrtShell().InvalidateAccessibleFocus();
+#endif
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx
index f5cd0a3ae993..d56aa0859bfa 100644
--- a/sw/source/ui/docvw/edtwin2.cxx
+++ b/sw/source/ui/docvw/edtwin2.cxx
@@ -136,13 +136,13 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
SwContentAtPos::SW_SMARTTAG |
#ifdef DBG_UTIL
SwContentAtPos::SW_TABLEBOXVALUE |
- ( bBalloon ? SwContentAtPos::SW_CURR_ATTRS : 0) |
+ ( bBalloon ? SwContentAtPos::SW_CURR_ATTRS : 0) |
#endif
SwContentAtPos::SW_TABLEBOXFML );
if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) )
{
- switch( aCntntAtPos.eCntntAtPos )
+ switch( aCntntAtPos.eCntntAtPos )
{
case SwContentAtPos::SW_TABLEBOXFML:
sTxt.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "= " ));
@@ -150,98 +150,92 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
break;
#ifdef DBG_UTIL
case SwContentAtPos::SW_TABLEBOXVALUE:
- {
- sTxt = UniString(
- ByteString::CreateFromDouble(
- ((SwTblBoxValue*)aCntntAtPos.aFnd.pAttr)->GetValue() )
- , gsl_getSystemTextEncoding());
- }
- break;
+ {
+ sTxt = UniString(
+ ByteString::CreateFromDouble(
+ ((SwTblBoxValue*)aCntntAtPos.aFnd.pAttr)->GetValue() )
+ , gsl_getSystemTextEncoding());
+ }
+ break;
case SwContentAtPos::SW_CURR_ATTRS:
sTxt = aCntntAtPos.sStr;
break;
#endif
case SwContentAtPos::SW_INETATTR:
- {
- sTxt = ((SfxStringItem*)aCntntAtPos.aFnd.pAttr)->GetValue();
- sTxt = URIHelper::removePassword( sTxt,
- INetURLObject::WAS_ENCODED,
- INetURLObject::DECODE_UNAMBIGUOUS);
- //#i63832# remove the link target type
- xub_StrLen nFound = sTxt.Search(cMarkSeperator);
- if( nFound != STRING_NOTFOUND && (++nFound) < sTxt.Len() )
{
- String sSuffix( sTxt.Copy(nFound) );
- if( sSuffix.EqualsAscii( pMarkToTable ) ||
- sSuffix.EqualsAscii( pMarkToFrame ) ||
- sSuffix.EqualsAscii( pMarkToRegion ) ||
- sSuffix.EqualsAscii( pMarkToOutline ) ||
- sSuffix.EqualsAscii( pMarkToText ) ||
- sSuffix.EqualsAscii( pMarkToGraphic ) ||
- sSuffix.EqualsAscii( pMarkToOLE ))
- sTxt = sTxt.Copy( 0, nFound - 1);
- }
- // --> OD 2009-08-18 #i104300#
- // special handling if target is a cross-reference bookmark
- {
- String sTmpSearchStr = sTxt.Copy( 1, sTxt.Len() );
- IDocumentMarkAccess* const pMarkAccess =
- rSh.getIDocumentMarkAccess();
- IDocumentMarkAccess::const_iterator_t ppBkmk =
- pMarkAccess->findBookmark( sTmpSearchStr );
- if ( ppBkmk != pMarkAccess->getBookmarksEnd() &&
- IDocumentMarkAccess::GetType( *(ppBkmk->get()) )
- == IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK )
+ sTxt = ((SfxStringItem*)aCntntAtPos.aFnd.pAttr)->GetValue();
+ sTxt = URIHelper::removePassword( sTxt,
+ INetURLObject::WAS_ENCODED,
+ INetURLObject::DECODE_UNAMBIGUOUS);
+ //#i63832# remove the link target type
+ xub_StrLen nFound = sTxt.Search(cMarkSeperator);
+ if( nFound != STRING_NOTFOUND && (++nFound) < sTxt.Len() )
+ {
+ String sSuffix( sTxt.Copy(nFound) );
+ if( sSuffix.EqualsAscii( pMarkToTable ) ||
+ sSuffix.EqualsAscii( pMarkToFrame ) ||
+ sSuffix.EqualsAscii( pMarkToRegion ) ||
+ sSuffix.EqualsAscii( pMarkToOutline ) ||
+ sSuffix.EqualsAscii( pMarkToText ) ||
+ sSuffix.EqualsAscii( pMarkToGraphic ) ||
+ sSuffix.EqualsAscii( pMarkToOLE ))
+ sTxt = sTxt.Copy( 0, nFound - 1);
+ }
+ // special handling if target is a cross-reference bookmark
{
- SwTxtNode* pTxtNode = ppBkmk->get()->GetMarkStart().nNode.GetNode().GetTxtNode();
- if ( pTxtNode )
+ String sTmpSearchStr = sTxt.Copy( 1, sTxt.Len() );
+ IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
+ IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->findBookmark( sTmpSearchStr );
+ if ( ppBkmk != pMarkAccess->getBookmarksEnd()
+ && IDocumentMarkAccess::GetType( *(ppBkmk->get()) ) == IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK )
{
- sTxt = pTxtNode->GetExpandTxt( 0, pTxtNode->Len(), true, true );
-
- if( sTxt.Len() )
+ SwTxtNode* pTxtNode = ppBkmk->get()->GetMarkStart().nNode.GetNode().GetTxtNode();
+ if ( pTxtNode )
{
- sTxt.EraseAllChars( 0xad );
- for( sal_Unicode* p = sTxt.GetBufferAccess(); *p; ++p )
+ sTxt = pTxtNode->GetExpandTxt( 0, pTxtNode->Len(), true, true );
+
+ if( sTxt.Len() )
{
- if( *p < 0x20 )
- *p = 0x20;
- else if(*p == 0x2011)
- *p = '-';
+ sTxt.EraseAllChars( 0xad );
+ for( sal_Unicode* p = sTxt.GetBufferAccess(); *p; ++p )
+ {
+ if( *p < 0x20 )
+ *p = 0x20;
+ else if(*p == 0x2011)
+ *p = '-';
+ }
}
}
}
}
- }
- // <--
- // --> OD 2007-07-26 #i80029#
- sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
- if ( !bExecHyperlinks )
- {
- SvtSecurityOptions aSecOpts;
- bExecHyperlinks = !aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
- sTxt.InsertAscii( ": ", 0 );
- sTxt.Insert( ViewShell::GetShellRes()->aHyperlinkClick, 0 );
+ SvtSecurityOptions aSecOpts;
+ bExecHyperlinks = !aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+
+ if ( !bExecHyperlinks )
+ {
+ sTxt.InsertAscii( ": ", 0 );
+ sTxt.Insert( ViewShell::GetShellRes()->aHyperlinkClick, 0 );
+ }
}
+ break;
}
- // <--
- break;
- }
case SwContentAtPos::SW_SMARTTAG:
- {
- sTxt = SW_RESSTR(STR_SMARTTAG_CLICK);
-
- KeyCode aCode( KEY_SPACE );
- KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
- String aModStr( aModifiedCode.GetName() );
- aModStr.SearchAndReplace( aCode.GetName(), String() );
- aModStr.SearchAndReplaceAllAscii( "+", String() );
- sTxt.SearchAndReplaceAllAscii( "%s", aModStr );
- }
- break;
+ {
+ sTxt = SW_RESSTR(STR_SMARTTAG_CLICK);
+
+ KeyCode aCode( KEY_SPACE );
+ KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
+ String aModStr( aModifiedCode.GetName() );
+ aModStr.SearchAndReplace( aCode.GetName(), String() );
+ aModStr.SearchAndReplaceAllAscii( "+", String() );
+ sTxt.SearchAndReplaceAllAscii( "%s", aModStr );
+ }
+ break;
case SwContentAtPos::SW_FTN:
if( aCntntAtPos.pFndTxtAttr && aCntntAtPos.aFnd.pAttr )
@@ -249,7 +243,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
const SwFmtFtn* pFtn = (SwFmtFtn*)aCntntAtPos.aFnd.pAttr;
pFtn->GetFtnText( sTxt );
sTxt.Insert( SW_RESSTR( pFtn->IsEndNote()
- ? STR_ENDNOTE : STR_FTNNOTE ), 0 );
+ ? STR_ENDNOTE : STR_FTNNOTE ), 0 );
if( aCntntAtPos.IsInRTLText() )
nStyle |= QUICKHELP_BIDI_RTL;
}
@@ -264,7 +258,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if( sTxt.Len() && aCntntAtPos.pFndTxtAttr )
{
const SwTOXType* pTType = aCntntAtPos.pFndTxtAttr->
- GetTOXMark().GetTOXType();
+ GetTOXMark().GetTOXType();
if( pTType && pTType->GetTypeName().Len() )
{
sTxt.InsertAscii( ": ", 0 );
@@ -272,6 +266,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
}
}
break;
+
case SwContentAtPos::SW_REFMARK:
if(aCntntAtPos.aFnd.pAttr)
{
@@ -279,7 +274,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": "));
sTxt += ((const SwFmtRefMark*)aCntntAtPos.aFnd.pAttr)->GetRefName();
}
- break;
+ break;
default:
{
@@ -292,34 +287,16 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
case RES_SETEXPFLD:
case RES_TABLEFLD:
case RES_GETEXPFLD:
- {
- sal_uInt16 nOldSubType = pFld->GetSubType();
- ((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD);
- sTxt = pFld->ExpandField(true);
- ((SwField*)pFld)->SetSubType(nOldSubType);
- }
- break;
+ {
+ sal_uInt16 nOldSubType = pFld->GetSubType();
+ ((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD);
+ sTxt = pFld->ExpandField(true);
+ ((SwField*)pFld)->SetSubType(nOldSubType);
+ }
+ break;
case RES_POSTITFLD:
{
- /*
- SwPostItMgr* pMgr = rView.GetPostItMgr();
- if (pMgr->ShowNotes())
- {
- SwFmtFld* pSwFmtFld = 0;
- if (pMgr->ShowPreview(pFld,pSwFmtFld))
- {
- SwPostIt* pPostIt = new SwPostIt(static_cast<Window*>(this),0,pSwFmtFld,pMgr,PB_Preview);
- pPostIt->InitControls();
- pPostIt->SetReadonly(true);
- pMgr->SetColors(pPostIt,static_cast<SwPostItField*>(pSwFmtFld->GetFld()));
- pPostIt->SetVirtualPosSize(rEvt.GetMousePosPixel(),Size(180,70));
- pPostIt->ShowNote();
- SetPointerPosPixel(pPostIt->GetPosPixel() + Point(20,20));
- }
- return;
- }
- */
break;
}
case RES_INPUTFLD: // BubbleHelp, da der Hinweis ggf ziemlich lang sein kann
@@ -346,33 +323,31 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
break;
case RES_GETREFFLD:
- {
- // --> OD 2008-01-09 #i85090#
- const SwGetRefField* pRefFld( dynamic_cast<const SwGetRefField*>(pFld) );
- ASSERT( pRefFld,
- "<SwEditWin::RequestHelp(..)> - unexpected type of <pFld>" );
- if ( pRefFld )
{
- if ( pRefFld->IsRefToHeadingCrossRefBookmark() ||
- pRefFld->IsRefToNumItemCrossRefBookmark() )
+ const SwGetRefField* pRefFld( dynamic_cast<const SwGetRefField*>(pFld) );
+ ASSERT( pRefFld,
+ "<SwEditWin::RequestHelp(..)> - unexpected type of <pFld>" );
+ if ( pRefFld )
{
- sTxt = pRefFld->GetExpandedTxtOfReferencedTxtNode();
- if ( sTxt.Len() > 80 )
+ if ( pRefFld->IsRefToHeadingCrossRefBookmark() ||
+ pRefFld->IsRefToNumItemCrossRefBookmark() )
{
- sTxt.Erase( 80 );
- sTxt += '.';
- sTxt += '.';
- sTxt += '.';
+ sTxt = pRefFld->GetExpandedTxtOfReferencedTxtNode();
+ if ( sTxt.Len() > 80 )
+ {
+ sTxt.Erase( 80 );
+ sTxt += '.';
+ sTxt += '.';
+ sTxt += '.';
+ }
+ }
+ else
+ {
+ sTxt = ((SwGetRefField*)pFld)->GetSetRefName();
}
- }
- else
- {
- sTxt = ((SwGetRefField*)pFld)->GetSetRefName();
}
}
- // <--
- }
- break;
+ break;
}
}
@@ -380,8 +355,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
{
aCntntAtPos.eCntntAtPos = SwContentAtPos::SW_REDLINE;
if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) )
- lcl_GetRedlineHelp( *aCntntAtPos.aFnd.pRedl,
- sTxt, bBalloon );
+ lcl_GetRedlineHelp( *aCntntAtPos.aFnd.pRedl, sTxt, bBalloon );
}
}
}
@@ -419,7 +393,6 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
case SW_TABROW_VERT:
nTabRes = STR_TABLE_ROW_ADJUST;
break;
- // --> FME 2004-07-30 #i32329# Enhanced table selection
case SW_TABSEL_HORI:
case SW_TABSEL_HORI_RTL:
case SW_TABSEL_VERT:
@@ -434,7 +407,6 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
case SW_TABCOLSEL_VERT:
nTabRes = STR_TABLE_SELECT_COL;
break;
- // <--
}
if(nTabRes)
{
diff --git a/sw/source/ui/docvw/edtwin3.cxx b/sw/source/ui/docvw/edtwin3.cxx
index 2f8b144badc9..525761819529 100644
--- a/sw/source/ui/docvw/edtwin3.cxx
+++ b/sw/source/ui/docvw/edtwin3.cxx
@@ -142,6 +142,34 @@ sal_Bool SwEditWin::RulerMarginDrag( const MouseEvent& rMEvt,
return !rRuler.StartDocDrag( rMEvt, RULER_TYPE_INDENT);
}
// <--
+//IAccessibility2 Impplementaton 2009-----
+void AccessibilityScrollMDI(ViewShell* pVwSh, const SwRect& rRect , sal_uInt16 nRangeX, sal_uInt16 nRangeY, sal_Bool isLeftTop)
+{
+ SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell();
+ SwView* pView = dynamic_cast< SwView* >(pSfxVwSh);
+
+ if(pView)
+ {
+ Size aSz( rRect.Left(), rRect.Top());
+ aSz = pView->GetEditWin().PixelToLogic( aSz );
+
+ Point aTopLeft( aSz.Width(), aSz.Height() );
+ Point aPoint;
+ Rectangle aRect(aTopLeft,aPoint);
+
+ sal_Bool bIsCrsrAtTop = pView->IsCrsrAtTop();
+ sal_Bool bIsCrsrAtCenter = pView->IsCrsrAtCenter();
+ if(isLeftTop)
+ pView->SetCrsrAtTop(sal_True);
+
+ pView->Scroll( aRect, nRangeX, nRangeY );
+
+ if(isLeftTop)
+ pView->SetCrsrAtTop(bIsCrsrAtTop, bIsCrsrAtCenter);
+ }
+
+}
+//-----IAccessibility2 Impplementaton 2009
LAYOUT_NS Dialog* GetSearchDialog()
{
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index f8ac5a382c80..b6fd646319c7 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -300,7 +300,6 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
pCollSet->Put( aTmpBrush );
}
aOutputSet.ClearItem( RES_BACKGROUND );
- //pColl->SetAttr( aTmpSet );
pCollSet->Put(aOutputSet);
}
delete pDlg;
@@ -354,7 +353,6 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
}
if( pOutputSet->Count() )
{
- //pColl->SetAttr( *pOutputSet );
pCollSet->Put(*pOutputSet);
}
}
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index 8199757e3335..5b09fcd846fc 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -33,45 +33,24 @@
#include <sfx2/app.hxx>
#include <svx/optgenrl.hxx>
#include <docufld.hxx>
-#ifndef _VIEW_HXX
+#include <expfld.hxx>
#include <view.hxx>
-#endif
#include <dbfld.hxx>
#include <wrtsh.hxx>
-#ifndef _FLDDB_HXX
#include <flddb.hxx>
-#endif
-#ifndef _FLDDINF_HXX
#include <flddinf.hxx>
-#endif
-#ifndef _FLDVAR_HXX
#include <fldvar.hxx>
-#endif
-#ifndef _FLDDOK_HXX
#include <flddok.hxx>
-#endif
-#ifndef _FLDFUNC_HXX
#include <fldfunc.hxx>
-#endif
-#ifndef _FLDREF_HXX
#include <fldref.hxx>
-#endif
#include <fldedt.hxx>
#include <crsskip.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _FLDUI_HRC
#include <fldui.hrc>
-#endif
#include "swabstdlg.hxx"
#include "dialog.hrc"
@@ -103,10 +82,21 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) :
pSh->SetCareWin(this);
- /* #108536# Only create selection if there is none
- already. Normalize PaM instead of swapping. */
+ if ( pSh->CrsrInsideInputFld() )
+ {
+ // move cursor to start of Input Field
+ SwInputField* pInputFld = dynamic_cast<SwInputField*>(pCurFld);
+ if ( pInputFld != NULL
+ && pInputFld->GetFmtFld() != NULL )
+ {
+ pSh->GotoField( *(pInputFld->GetFmtFld()) );
+ }
+ }
+
if ( ! pSh->HasSelection() )
+ {
pSh->Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
+ }
pSh->NormalizePam();
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index 4cfdc0078497..78b43ea2ce89 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -343,7 +343,7 @@ SwField* SwFldMgr::GetCurFld()
{
SwWrtShell *pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
if ( pSh )
- pCurFld = pSh->GetCurFld();
+ pCurFld = pSh->GetCurFld( true );
else
pCurFld = NULL;
@@ -818,10 +818,12 @@ sal_Bool SwFldMgr::GoNextPrev( sal_Bool bNext, SwFieldType* pTyp )
if (pTyp && pTyp->Which() == RES_DBFLD)
{
// Fuer Feldbefehl-bearbeiten (alle DB-Felder anspringen)
- return pSh->MoveFldType( 0, bNext, USHRT_MAX, RES_DBFLD );
+ return pSh->MoveFldType( 0, (bNext ? true : false), RES_DBFLD );
}
- return pTyp && pSh ? pSh->MoveFldType( pTyp, bNext ) : sal_False;
+ return (pTyp && pSh)
+ ? pSh->MoveFldType( pTyp, (bNext ? true : false) )
+ : sal_False;
}
/*--------------------------------------------------------------------
@@ -1008,7 +1010,7 @@ sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
{
if( rData.sPar1.Len() > 0 && CanInsertRefMark( rData.sPar1 ) )
{
- pCurShell->SetAttr( SwFmtRefMark( rData.sPar1 ) );
+ pCurShell->SetAttrItem( SwFmtRefMark( rData.sPar1 ) );
return sal_True;
}
return sal_False;
@@ -1240,7 +1242,7 @@ sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
(SwInputFieldType*)pCurShell->GetFldType(0, RES_INPUTFLD);
SwInputField* pInpFld =
- new SwInputField(pTyp, rData.sPar1, rData.sPar2, nSubType|nsSwExtendedSubType::SUB_INVISIBLE, nFormatId);
+ new SwInputField( pTyp, rData.sPar1, rData.sPar2, nSubType|nsSwExtendedSubType::SUB_INVISIBLE, nFormatId);
pFld = pInpFld;
}
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index b0ab9b34e99a..002e16fd93d2 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -517,8 +517,35 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet)
| WB_ITEMBORDER
| WB_DOUBLEBORDER );
+//IAccessibility2 Impplementaton 2009-----
for( i = 0; i < 5; i++)
- aDefaultVS.InsertItem( i + 1, i );
+ //Solution:Set accessible name one be one
+ //aDefaultVS.InsertItem( i + 1, i );
+ {
+ String aItemText;
+ switch( i )
+ {
+ case 0:
+ aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM0 ) ;
+ break;
+ case 1:
+ aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM1 ) ;
+ break;
+ case 2:
+ aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM2 ) ;
+ break;
+ case 3:
+ aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM3 );
+ break;
+ case 4:
+ aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM4 );
+ break;
+ default:
+ break;
+ }
+ aDefaultVS.InsertItem( i + 1, aItemText, i );
+ }
+//-----IAccessibility2 Impplementaton 2009
aDefaultVS.SetSelectHdl(LINK(this, SwColumnPage, SetDefaultsHdl));
@@ -968,7 +995,14 @@ IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF )
// #i17816# changing the displayed types within the ValueSet
//from two columns to two columns with different settings doesn't invalidate the
// example windows in ::ColModify()
- if(!pNF ||(pColMgr->GetCount() != nCols))
+//IAccessibility2 Impplementaton 2009-----
+// the pColMgr->GetCount()'s return is some how bugged,
+// it will return 0 when actual count is 1, so fix it.
+ //if(!pNF ||(pColMgr->GetCount() != nCols))
+ int nTemp = pColMgr->GetCount();
+ if(nTemp == 0) nTemp = 1;
+ if( nTemp != nCols )
+//-----IAccessibility2 Impplementaton 2009
{
if(pNF)
aDefaultVS.SetNoSelection();
diff --git a/sw/source/ui/frmdlg/column.hrc b/sw/source/ui/frmdlg/column.hrc
index 2e6e23a25fa7..eb506201915d 100644
--- a/sw/source/ui/frmdlg/column.hrc
+++ b/sw/source/ui/frmdlg/column.hrc
@@ -75,8 +75,15 @@
#define FT_TEXTDIRECTION 60
#define LB_TEXTDIRECTION 61
#define FL_VERT 62
+//IAccessibility2 Impplementaton 2009-----
+#define STR_PAGESETUP_SPACING 32765
+//-----IAccessibility2 Impplementaton 2009
#define LISTBOX_SELECTION 0
#define LISTBOX_SECTION 1
#define LISTBOX_SECTIONS 2
#define LISTBOX_PAGE 3
#define LISTBOX_FRAME 4
+
+//IAccessibility2 Impplementaton 2009-----
+#define STR_COLUMN_WIDTH 63
+//-----IAccessibility2 Impplementaton 2009
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 86d861ce0976..e399fd2fdecd 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -639,11 +639,15 @@ sal_uLong lcl_GetLBRelationsForStrID( const FrmMap* _pMap,
namespace
{
- void HandleAutoCB( sal_Bool _bChecked, FixedText& _rFT_man, FixedText& _rFT_auto )
+ //IAccessibility2 Implementation 2009-----
+ void HandleAutoCB( sal_Bool _bChecked, FixedText& _rFT_man, FixedText& _rFT_auto, PercentField& _rPF_Edit)
{
_rFT_man.Show( !_bChecked );
_rFT_auto.Show( _bChecked );
+ String accName = _bChecked ? _rFT_auto.GetText() : _rFT_man.GetText();
+ _rPF_Edit.SetAccessibleName(accName);
}
+ //-----IAccessibility2 Implementation 2009
}
@@ -2091,14 +2095,18 @@ IMPL_LINK_INLINE_END( SwFrmPage, RealSizeHdl, Button *, EMPTYARG )
IMPL_LINK( SwFrmPage, AutoWidthClickHdl, void*, EMPTYARG )
{
if( !IsInGraficMode() )
- HandleAutoCB( aAutoWidthCB.IsChecked(), aWidthFT, aWidthAutoFT );
+ //IAccessibility2 Implementation 2009-----
+ HandleAutoCB( aAutoWidthCB.IsChecked(), aWidthFT, aWidthAutoFT, aWidthED );
+ //-----IAccessibility2 Implementation 2009
return 0;
}
IMPL_LINK( SwFrmPage, AutoHeightClickHdl, void*, EMPTYARG )
{
if( !IsInGraficMode() )
- HandleAutoCB( aAutoHeightCB.IsChecked(), aHeightFT, aHeightAutoFT );
+ //IAccessibility2 Implementation 2009-----
+ HandleAutoCB( aAutoHeightCB.IsChecked(), aHeightFT, aHeightAutoFT, aWidthED );
+ //-----IAccessibility2 Implementation 2009
return 0;
}
@@ -2247,14 +2255,18 @@ void SwFrmPage::Init(const SfxItemSet& rSet, sal_Bool bReset)
SwFrmSize eSize = rSize.GetHeightSizeType();
sal_Bool bCheck = eSize != ATT_FIX_SIZE;
aAutoHeightCB.Check( bCheck );
- HandleAutoCB( bCheck, aHeightFT, aHeightAutoFT );
+ //IAccessibility2 Implementation 2009-----
+ HandleAutoCB( bCheck, aHeightFT, aHeightAutoFT, aWidthED );
+ //-----IAccessibility2 Implementation 2009
if( eSize == ATT_VAR_SIZE )
aHeightED.SetValue( aHeightED.GetMin(), FUNIT_NONE );
eSize = rSize.GetWidthSizeType();
bCheck = eSize != ATT_FIX_SIZE;
aAutoWidthCB.Check( bCheck );
- HandleAutoCB( bCheck, aWidthFT, aWidthAutoFT );
+ //IAccessibility2 Implementation 2009-----
+ HandleAutoCB( bCheck, aWidthFT, aWidthAutoFT, aWidthED );
+ //-----IAccessibility2 Implementation 2009
if( eSize == ATT_VAR_SIZE )
aWidthED.SetValue( aWidthED.GetMin(), FUNIT_NONE );
diff --git a/sw/source/ui/inc/conttree.hxx b/sw/source/ui/inc/conttree.hxx
index 25ff5fd97060..23e344f0c5cd 100644
--- a/sw/source/ui/inc/conttree.hxx
+++ b/sw/source/ui/inc/conttree.hxx
@@ -36,6 +36,10 @@ class SwGlblDocContents;
class SwGlblDocContent;
class SfxObjectShell;
+//IAccessibility2 Implementation 2009-----
+//Solution: Include SdrObject class
+class SdrObject;
+//-----IAccessibility2 Implementation 2009
#define EDIT_MODE_EDIT 0
#define EDIT_MODE_UPD_IDX 1
@@ -89,7 +93,10 @@ class SwContentTree : public SvTreeListBox
sal_Bool bIsImageListInitialized : 1;
static sal_Bool bIsInDrag;
-
+ //IAccessibility2 Implementation 2009-----
+ sal_Bool bIsKeySpace;
+ Rectangle oldRectangle;
+ //-----IAccessibility2 Implementation 2009
void FindActiveTypeAndRemoveUserData();
using SvLBox::ExecuteDrop;
@@ -144,6 +151,11 @@ protected:
public:
SwContentTree(Window* pParent, const ResId& rResId);
~SwContentTree();
+ //IAccessibility2 Implementation 2009-----
+ String GetEntryAltText( SvLBoxEntry* pEntry ) const;
+ String GetEntryLongDescription( SvLBoxEntry* pEntry ) const;
+ SdrObject* GetDrawingObjectsByContent(const SwContent *pCnt);
+ //-----IAccessibility2 Implementation 2009
sal_Bool ToggleToRoot();
sal_Bool IsRoot() const {return bIsRoot;}
@@ -196,6 +208,9 @@ public:
virtual void KeyInput(const KeyEvent& rKEvt);
virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
+ //IAccessibility2 Implementation 2009-----
+ virtual sal_Int32 GetEntryRealChildsNum( SvLBoxEntry* pEntry ) const;
+ //-----IAccessibility2 Implementation 2009
};
diff --git a/sw/source/ui/inc/edtwin.hxx b/sw/source/ui/inc/edtwin.hxx
index 6facd20b49bb..4c348da304c1 100644
--- a/sw/source/ui/inc/edtwin.hxx
+++ b/sw/source/ui/inc/edtwin.hxx
@@ -297,6 +297,9 @@ public:
SwEditWin(Window *pParent, SwView &);
virtual ~SwEditWin();
+ //IAccessibility2 Implementation 2009-----
+ virtual void SwitchView();
+ //-----IAccessibility2 Implementation 2009
};
#endif
diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx
index a06e08285da5..42f32dc4b040 100644
--- a/sw/source/ui/inc/pview.hxx
+++ b/sw/source/ui/inc/pview.hxx
@@ -164,6 +164,9 @@ public:
virtual ::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible>
CreateAccessible();
+ //IAccessibility2 Implementation 2009-----
+ virtual void SwitchView();
+ //-----IAccessibility2 Implementation 2009
};
@@ -175,7 +178,7 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell
{
// ViewWindow und Henkel zur Core
// aktuelle Dispatcher-Shell
- SwPagePreViewWin aViewWin;
+ SwPagePreViewWin* pViewWin;//IAccessibility2 Implementation 2009
//viewdata of the previous SwView and the new crsrposition
String sSwViewData,
//and the new cursor position if the user double click in the PagePreView
@@ -250,11 +253,11 @@ public:
SFX_DECL_INTERFACE(SW_PAGEPREVIEW)
inline Window* GetFrameWindow() const { return &(GetViewFrame())->GetWindow(); }
- inline ViewShell* GetViewShell() const { return aViewWin.GetViewShell(); }
+ inline ViewShell* GetViewShell() const { return pViewWin->GetViewShell(); }
inline const Rectangle& GetVisArea() const { return aVisArea; }
- inline void GrabFocusViewWin() { aViewWin.GrabFocus(); }
+ inline void GrabFocusViewWin() { pViewWin->GrabFocus(); }
inline void RepaintCoreRect( const SwRect& rRect )
- { aViewWin.RepaintCoreRect( rRect ); }
+ { pViewWin->RepaintCoreRect( rRect ); }
void DocSzChgd(const Size& rNewSize);
const Size& GetDocSz() const { return aDocSz; }
diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx
index e5d531d74be1..bec28ca748c9 100644
--- a/sw/source/ui/inc/swlbox.hxx
+++ b/sw/source/ui/inc/swlbox.hxx
@@ -115,6 +115,9 @@ public:
void SetStyle(const sal_uInt16 nSt) { nStyle = nSt; }
String GetText() const;
+//IAccessibility2 Impplementaton 2009-----
+ void SetText( const XubString& rStr );
+ void SetText( const XubString& rStr, const Selection& rNewSelection ) { ComboBox::SetText( rStr, rNewSelection ); };
};
#endif /* _SWLBOX_HXX */
diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx
index 175ad0b2d1ae..253e05be78c8 100644
--- a/sw/source/ui/inc/swuicnttab.hxx
+++ b/sw/source/ui/inc/swuicnttab.hxx
@@ -286,6 +286,12 @@ class SwTokenWindow : public Window
Link aButtonSelectedHdl;
Control* pActiveCtrl;
Link aModifyHdl;
+//IAccessibility2 Impplementaton 2009-----
+ String accessibleName;
+ String sAdditionalAccnameString1;
+ String sAdditionalAccnameString2;
+ String sAdditionalAccnameString3;
+//-----IAccessibility2 Impplementaton 2009
SwTOXEntryTabPage* m_pParent;
@@ -337,6 +343,11 @@ public:
virtual void Resize();
virtual void GetFocus();
+//IAccessibility2 Impplementaton 2009-----
+ void SetFocus2theAllBtn();
+private:
+ sal_uInt32 GetControlIndex(FormTokenType eType, const Control* pCurControl) const;
+//-----IAccessibility2 Impplementaton 2009
};
/* -----------------------------23.12.99 14:16--------------------------------
@@ -482,6 +493,10 @@ public:
String GetLevelHelp(sal_uInt16 nLevel) const;
void PreTokenButtonRemoved(const SwFormToken& rToken);
+//IAccessibility2 Impplementaton 2009-----
+ void SetFocus2theAllBtn();
+ virtual long Notify( NotifyEvent& rNEvt );
+//-----IAccessibility2 Impplementaton 2009
};
/* -----------------05.07.99 13:00-------------------
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index f35cc0fe7d9d..68d9b7d3e7d9 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -200,7 +200,10 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
sNewCrsrPos;
// to support keyboard the number of the page to go to can be set too
sal_uInt16 nNewPage;
-
+ //IAccessibility2 Implementation 2009-----
+ sal_uInt16 nOldPageNum;
+ String nOldSectionName;
+ //-----IAccessibility2 Implementation 2009
Point aTabColFromDocPos; //Verschieben von Tabellenspalten aus
//aus dem Dokument heraus.
SwTxtNode * pNumRuleNodeFromDoc; // Moving indent of numrule #i23726#
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index a20e92ab853a..9de7c352939f 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -256,7 +256,7 @@ typedef sal_Bool (SwWrtShell:: *FNSimpleMove)();
sal_Bool PageCrsr(SwTwips lOffset, sal_Bool bSelect);
// Felder Update
- void UpdateInputFlds( SwInputFieldList* pLst = 0, sal_Bool bOnlyInSel = sal_False );
+ void UpdateInputFlds( SwInputFieldList* pLst = 0 );
void NoEdit(sal_Bool bHideCrsr = sal_True);
void Edit();
@@ -446,9 +446,6 @@ typedef sal_Bool (SwWrtShell:: *FNSimpleMove)();
void NavigatorPaste( const NaviContentBookmark& rBkmk,
const sal_uInt16 nAction );
- // die Core erzeugt eine Selektion, das SttSelect muss gerufen werden
- virtual void NewCoreSelection();
-
virtual void ApplyViewOptions( const SwViewOption &rOpt );
// autom. Update von Vorlagen
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 2ff5d5563edd..c6a7fca54649 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1860,7 +1860,15 @@ void SwTOXEdit::KeyInput( const KeyEvent& rKEvt )
bNextControl = sal_False;
bCall = sal_True;
}
-
+//IAccessibility2 Impplementaton 2009-----
+ else if ( (aCode.GetCode() == KEY_F3) && aCode.IsShift() && !aCode.IsMod1() && !aCode.IsMod2() )
+ {
+ if ( m_pParent )
+ {
+ m_pParent->SetFocus2theAllBtn();
+ }
+ }
+//-----IAccessibility2 Impplementaton 2009
if(bCall && aPrevNextControlLink.IsSet())
aPrevNextControlLink.Call(this);
@@ -1996,6 +2004,15 @@ void SwTOXButton::KeyInput( const KeyEvent& rKEvt )
//this is invalid here
return;
}
+//IAccessibility2 Impplementaton 2009-----
+ else if ( (aCode.GetCode() == KEY_F3) && aCode.IsShift() && !aCode.IsMod1() && !aCode.IsMod2() )
+ {
+ if ( m_pParent )
+ {
+ m_pParent->SetFocus2theAllBtn();
+ }
+ }
+//-----IAccessibility2 Impplementaton 2009
if(bCall && aPrevNextControlLink.IsSet())
aPrevNextControlLink.Call(this);
else
@@ -2644,6 +2661,30 @@ void SwTOXEntryTabPage::PreTokenButtonRemoved(const SwFormToken& rToken)
sal_uInt16 nPos = aAuthFieldsLB.InsertEntry(sTemp);
aAuthFieldsLB.SetEntryData(nPos, (void*)(nData));
}
+//IAccessibility2 Impplementaton 2009-----
+void SwTOXEntryTabPage::SetFocus2theAllBtn()
+{
+ aAllLevelsPB.GrabFocus();
+}
+long SwTOXEntryTabPage::Notify( NotifyEvent& rNEvt )
+{
+ if ( rNEvt.GetType() == EVENT_KEYINPUT )
+ {
+ const KeyEvent& rKEvt = *rNEvt.GetKeyEvent();
+ KeyCode aCode = rKEvt.GetKeyCode();
+ if ( (aCode.GetCode() == KEY_F4) && aCode.IsShift() && !aCode.IsMod1() && !aCode.IsMod2() )
+ {
+ if ( aTokenWIN.GetActiveControl() )
+ {
+ aTokenWIN.GetActiveControl()->GrabFocus();
+ }
+ }
+
+ }
+
+ return SfxTabPage::Notify( rNEvt );
+}
+//-----IAccessibility2 Impplementaton 2009
/*-- 16.06.99 10:47:35---------------------------------------------------
This function inizializes the default value in the Token
@@ -3137,7 +3178,12 @@ SwTokenWindow::SwTokenWindow(SwTOXEntryTabPage* pParent, const ResId& rResId) :
nHelpId = STR_TOKEN_HELP_ENTRY;
aButtonHelpTexts[i] = String(ResId(nHelpId, *rResId.GetResMgr()));
}
-
+//IAccessibility2 Impplementaton 2009-----
+ accessibleName = String(SW_RES(STR_STRUCTURE));
+ sAdditionalAccnameString1 = String(SW_RES(STR_ADDITIONAL_ACCNAME_STRING1));
+ sAdditionalAccnameString2 = String(SW_RES(STR_ADDITIONAL_ACCNAME_STRING2));
+ sAdditionalAccnameString3 = String(SW_RES(STR_ADDITIONAL_ACCNAME_STRING3));
+//-----IAccessibility2 Impplementaton 2009
FreeResource();
Link aLink(LINK(this, SwTokenWindow, ScrollHdl));
@@ -3295,6 +3341,32 @@ Control* SwTokenWindow::InsertItem(const String& rText, const SwFormToken& rT
pEdit->SetPosPixel(aControlPos);
aControlList.Insert(pEdit, aControlList.Count());
pEdit->SetText(rText);
+//IAccessibility2 Impplementaton 2009-----
+ sal_uInt32 nIndex = GetControlIndex( TOKEN_TEXT, pEdit );
+ String s1 = String::CreateFromAscii(" (");
+ String s2 = String::CreateFromAscii(")");
+ String s3 = String::CreateFromAscii(", ");
+ String strName(accessibleName);
+ strName += String::CreateFromInt32(nIndex);
+ if ( nIndex == 1 )
+ {
+ /*Press left or right arrow to choose the structure controls*/
+ strName += s1;
+ strName += sAdditionalAccnameString2;
+ strName += s3;
+ /*Press Ctrl+Alt+A to move focus for more operations*/
+ strName += sAdditionalAccnameString1;
+ strName += s3;
+ /*Press Ctrl+Alt+B to move focus back to the current structure control*/
+ strName += sAdditionalAccnameString3;
+ strName += s2;
+ pEdit->SetAccessibleName(strName);
+ }
+ else
+ {
+ pEdit->SetAccessibleName(strName);
+ }
+//-----IAccessibility2 Impplementaton 2009
Size aEditSize(aControlSize);
aEditSize.Width() = pEdit->GetTextWidth(rText) + EDIT_MINWIDTH;
pEdit->SetSizePixel(aEditSize);
@@ -3325,6 +3397,17 @@ Control* SwTokenWindow::InsertItem(const String& rText, const SwFormToken& rT
(ToxAuthorityField)rToken.nAuthorityField));
pButton->SetText(sTmp.Copy(0, 2));
}
+//IAccessibility2 Impplementaton 2009-----
+ String sSpace = String::CreateFromAscii(" ");
+ sal_uInt32 nIndex = GetControlIndex( rToken.eTokenType, pButton );
+ String sAccName = aButtonHelpTexts[rToken.eTokenType];
+ if ( nIndex )
+ {
+ sAccName += sSpace;
+ sAccName += String::CreateFromInt32(nIndex);
+ }
+ pButton->SetAccessibleName( sAccName );
+//-----IAccessibility2 Impplementaton 2009
pButton->Show();
pRet = pButton;
}
@@ -3466,6 +3549,32 @@ void SwTokenWindow::InsertAtSelection(
SwTOXEdit* pEdit = new SwTOXEdit(&aCtrlParentWin, this, aTmpToken);
aControlList.Insert(pEdit, nActivePos + 1);
pEdit->SetText(sRight);
+//IAccessibility2 Impplementaton 2009-----
+ sal_uInt32 nIndex = GetControlIndex( TOKEN_TEXT, pEdit );
+ String s1 = String::CreateFromAscii(" (");
+ String s2 = String::CreateFromAscii(")");
+ String s3 = String::CreateFromAscii(", ");
+ String strName(accessibleName);
+ strName += String::CreateFromInt32(nIndex);
+ if ( nIndex == 1)
+ {
+ /*Press left or right arrow to choose the structure controls*/
+ strName += s1;
+ strName += sAdditionalAccnameString2;
+ strName += s3;
+ /*Press Ctrl+Alt+A to move focus for more operations*/
+ strName += sAdditionalAccnameString1;
+ strName += s3;
+ /*Press Ctrl+Alt+B to move focus back to the current structure control*/
+ strName += sAdditionalAccnameString3;
+ strName += s2;
+ pEdit->SetAccessibleName(strName);
+ }
+ else
+ {
+ pEdit->SetAccessibleName(strName);
+ }
+//-----IAccessibility2 Impplementaton 2009
pEdit->SetSizePixel(aControlSize);
pEdit->AdjustSize();
pEdit->SetModifyHdl(LINK(this, SwTokenWindow, EditResize ));
@@ -3495,6 +3604,17 @@ void SwTokenWindow::InsertAtSelection(
pButton->SetText(sTmp.Copy(0, 2));
}
+//IAccessibility2 Impplementaton 2009-----
+ String sSpace = String::CreateFromAscii(" ");
+ sal_uInt32 nIndex = GetControlIndex( rToken.eTokenType, pButton );
+ String sAccName = aButtonHelpTexts[rToken.eTokenType];
+ if ( nIndex )
+ {
+ sAccName += sSpace;
+ sAccName += String::CreateFromInt32(nIndex);
+ }
+ pButton->SetAccessibleName( sAccName );
+//-----IAccessibility2 Impplementaton 2009
Size aEditSize(GetOutputSizePixel());
aEditSize.Width() = pButton->GetTextWidth(rText) + 5;
pButton->SetSizePixel(aEditSize);
@@ -3922,6 +4042,41 @@ void SwTokenWindow::GetFocus()
}
}
}
+//IAccessibility2 Impplementaton 2009-----
+void SwTokenWindow::SetFocus2theAllBtn()
+{
+ if (m_pParent)
+ {
+ m_pParent->SetFocus2theAllBtn();
+ }
+}
+sal_uInt32 SwTokenWindow::GetControlIndex(FormTokenType eType, const Control* pCurControl) const
+{
+ //there are only one entry-text button and only one page-number button,
+ //so we need not add index for these two buttons.
+ if ( eType == TOKEN_ENTRY_TEXT || eType == TOKEN_PAGE_NUMS )
+ {
+ return 0;
+ }
+
+ sal_uInt32 nIndex = 0;
+ const Control* pControl = ((SwTokenWindow*)this)->aControlList.First();
+ while(pControl)
+ {
+ const SwFormToken& rNewToken = WINDOW_EDIT == pControl->GetType()
+ ? ((SwTOXEdit*)pControl)->GetFormToken()
+ : ((SwTOXButton*)pControl)->GetFormToken();
+
+ if(eType == rNewToken.eTokenType)
+ {
+ nIndex++;
+ }
+ pControl = ((SwTokenWindow*)this)->aControlList.Next();
+ }
+
+ return nIndex;
+}
+//-----IAccessibility2 Impplementaton 2009
/* -----------------25.03.99 15:17-------------------
*
* --------------------------------------------------*/
diff --git a/sw/source/ui/index/cnttab.hrc b/sw/source/ui/index/cnttab.hrc
index f436cb1bff1e..a6ffb2e72e43 100644
--- a/sw/source/ui/index/cnttab.hrc
+++ b/sw/source/ui/index/cnttab.hrc
@@ -169,7 +169,12 @@
#define STR_TOKEN_HELP_AUTHORITY (STR_BUTTON_HELP_TEXT_START + 9)
#define STR_CHARSTYLE (STR_TOKEN_HELP_AUTHORITY + 1)
-
+//IAccessibility2 Impplementaton 2009-----
+#define STR_STRUCTURE (STR_TOKEN_HELP_AUTHORITY + 2)
+#define STR_ADDITIONAL_ACCNAME_STRING1 (STR_TOKEN_HELP_AUTHORITY + 3)
+#define STR_ADDITIONAL_ACCNAME_STRING2 (STR_TOKEN_HELP_AUTHORITY + 4)
+#define STR_ADDITIONAL_ACCNAME_STRING3 (STR_TOKEN_HELP_AUTHORITY + 5)
+//-----IAccessibility2 Impplementaton 2009
#define TLB_STYLES 100
#define FL_STYLES 101
#define PB_OK 102
diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src
index f373bb7299ec..a51713b233e9 100644
--- a/sw/source/ui/index/cnttab.src
+++ b/sw/source/ui/index/cnttab.src
@@ -674,6 +674,24 @@ TabPage TP_TOX_ENTRY
{
Text [ en-US ] = "Character Style: ";
};
+//IAccessibility2 Impplementaton 2009-----
+ String STR_STRUCTURE
+ {
+ Text [ en-US ] = "Structure text";
+ };
+ String STR_ADDITIONAL_ACCNAME_STRING1
+ {
+ Text [ en-US ] = "Press Ctrl+Alt+A to move focus for more operations";
+ };
+ String STR_ADDITIONAL_ACCNAME_STRING2
+ {
+ Text [ en-US ] = "Press left or right arrow to choose the structure controls";
+ };
+ String STR_ADDITIONAL_ACCNAME_STRING3
+ {
+ Text [ en-US ] = "Press Ctrl+Alt+B to move focus back to the current structure control";
+ };
+//-----IAccessibility2 Impplementaton 2009
};
PushButton PB_ALL_LEVELS
{
diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx
index be8b649e5494..be4b349005b4 100644
--- a/sw/source/ui/lingu/hhcwrp.cxx
+++ b/sw/source/ui/lingu/hhcwrp.cxx
@@ -400,7 +400,7 @@ void SwHHCWrapper::ChangeText_impl( const String &rNewText, sal_Bool bKeepAttrib
// was deleted)
rWrtShell.ResetAttr();
// apply previously saved attributes to new text
- rWrtShell.SetAttr( aItemSet );
+ rWrtShell.SetAttrSet( aItemSet );
}
else
{
@@ -512,7 +512,7 @@ void SwHHCWrapper::ReplaceUnit(
SwPaM *pPaM = rWrtShell.GetCrsr();
(void)pPaM;
#endif
- rWrtShell.SetAttr(*pRuby);
+ rWrtShell.SetAttrItem(*pRuby);
delete pRuby;
rWrtShell.EndUndo( UNDO_SETRUBYATTR );
}
@@ -564,7 +564,7 @@ void SwHHCWrapper::ReplaceUnit(
aSet.Put( aFontItem );
}
- rWrtShell.SetAttr( aSet );
+ rWrtShell.SetAttrSet( aSet );
rWrtShell.ClearMark();
}
diff --git a/sw/source/ui/misc/glossary.hrc b/sw/source/ui/misc/glossary.hrc
index 44708bf92343..22bfa334c5dd 100644
--- a/sw/source/ui/misc/glossary.hrc
+++ b/sw/source/ui/misc/glossary.hrc
@@ -84,4 +84,6 @@
#define FL_NN 9
#define BT_CANCEL 10
#define BT_OKNEW 11
-
+//IAccessibility2 Implementation 2009-----
+#define STR_SW_CATEGORY 12
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index 8fa8adc5ece4..ea6bec7be94f 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -79,7 +79,7 @@ void __EXPORT SwInsFootNoteDlg::Apply()
rFont.GetStyleName(), rFont.GetPitch(),
eCharSet, RES_CHRATR_FONT );
aSet.Put( aFont );
- rSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
+ rSh.SetAttrSet( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
rSh.ResetSelect(0, sal_False);
rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
}
diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx
index cad727e68413..e17f41834e51 100644
--- a/sw/source/ui/ribbar/inputwin.cxx
+++ b/sw/source/ui/ribbar/inputwin.cxx
@@ -47,6 +47,7 @@
#include "cellatr.hxx"
#include "edtwin.hxx"
#include "helpid.h"
+#include "access.hrc"
// nur fuers UpdateRange - Box in dem der gestackte Cursor sthet loeschen
#include "pam.hxx"
@@ -90,9 +91,16 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind )
pWrtShell = pView ? pView->GetWrtShellPtr() : 0;
InsertWindow( ED_POS, &aPos, 0, 0);
+ //IAccessibility2 Implementation 2009-----
+ SetItemText(ED_POS, String(SW_RES(STR_ACCESS_FORMULA_TYPE)));
+ aPos.SetAccessibleName(String(SW_RES(STR_ACCESS_FORMULA_TYPE)));
+ SetAccessibleName(String(SW_RES(STR_ACCESS_FORMULA_TOOLBAR)));
InsertSeparator ( 1 );
InsertSeparator ();
InsertWindow( ED_FORMULA, &aEdit);
+ SetItemText(ED_FORMULA, String(SW_RES(STR_ACCESS_FORMULA_TEXT)));
+ aEdit.SetAccessibleName(String(SW_RES(STR_ACCESS_FORMULA_TEXT)));
+ //-----IAccessibility2 Implementation 2009
SetHelpId(ED_FORMULA, HID_EDIT_FORMULA);
sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
diff --git a/sw/source/ui/ribbar/inputwin.hrc b/sw/source/ui/ribbar/inputwin.hrc
index 8c87ffc091ba..59ebcf906060 100644
--- a/sw/source/ui/ribbar/inputwin.hrc
+++ b/sw/source/ui/ribbar/inputwin.hrc
@@ -60,6 +60,11 @@
#define ED_POS 2
#define ED_FORMULA 3
+//IAccessibility2 Impplementaton 2009-----
+#define STR_ED_POS 1
+#define STR_ED_FORMULA 2
+#define STR_TOOLBAR_FORMULA 35
+//-----IAccessibility2 Impplementaton 2009
#endif
diff --git a/sw/source/ui/ribbar/inputwin.src b/sw/source/ui/ribbar/inputwin.src
index 21c3ccc0e7e8..431c07ae1dec 100644
--- a/sw/source/ui/ribbar/inputwin.src
+++ b/sw/source/ui/ribbar/inputwin.src
@@ -28,6 +28,8 @@
#include "globals.hrc"
#include "ribbar.hrc"
#include "inputwin.hrc"
+#include "access.hrc"
+
ToolBox RID_TBX_FORMULA
{
Pos = MAP_APPFONT ( 0 , 0 ) ;
@@ -279,6 +281,20 @@ String STR_TBL_FORMULA
{
Text [ en-US ] = "Text formula" ;
};
+//IAccessibility2 Impplementaton 2009-----
+String STR_ACCESS_FORMULA_TOOLBAR
+{
+ Text [ en-US ] = "Formula Tool Bar" ;
+};
+String STR_ACCESS_FORMULA_TYPE
+{
+ Text [ en-US ] = "Formula Type" ;
+};
+String STR_ACCESS_FORMULA_TEXT
+{
+ Text [ en-US ] = "Formula Text" ;
+};
+//-----IAccessibility2 Impplementaton 2009
#define TB_INPUT \
ToolBoxItem\
{\
diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx
index 6f626ec31f19..7229b9f249ee 100644
--- a/sw/source/ui/ribbar/workctrl.cxx
+++ b/sw/source/ui/ribbar/workctrl.cxx
@@ -503,6 +503,15 @@ SwScrollNaviPopup::SwScrollNaviPopup( sal_uInt16 nId, const Reference< XFrame >&
sText = String(SW_RES(nResStr));
nTbxBits = TIB_CHECKABLE;
}
+ //IAccessibility2 Impplementaton 2009-----
+ else
+ {
+ if (nNaviId == NID_PREV)
+ sText = String(SW_RES(STR_IMGBTN_PGE_UP));
+ else if (nNaviId == NID_NEXT)
+ sText = String(SW_RES(STR_IMGBTN_PGE_DOWN));
+ }
+ //-----IAccessibility2 Impplementaton 2009
aToolBox.InsertItem(nNaviId, sText, nTbxBits);
aToolBox.SetHelpId( nNaviId, aNavigationHelpIds[i] );
}
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index e4a9ed62ad84..51d2f0086c4c 100644
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -1100,13 +1100,14 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
sal_uInt16 nSlot = rReq.GetSlot();
switch (nSlot)
{
- case FN_REPLY:
- case FN_POSTIT:
- case FN_DELETE_COMMENT:
- if ( pPostItMgr->HasActiveSidebarWin() )
- pPostItMgr->GetActiveSidebarWin()->ExecuteCommand(nSlot);
- break;
- case FN_DELETE_ALL_NOTES:
+ case FN_REPLY:
+ case FN_POSTIT:
+ case FN_DELETE_COMMENT:
+ if ( pPostItMgr->HasActiveSidebarWin() )
+ pPostItMgr->GetActiveSidebarWin()->ExecuteCommand(nSlot);
+ break;
+
+ case FN_DELETE_ALL_NOTES:
pPostItMgr->Delete();
break;
case FN_DELETE_NOTE_AUTHOR:
@@ -1149,22 +1150,23 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet)
sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
switch( nSlotId )
{
- case FN_POSTIT:
- case FN_DELETE_NOTE_AUTHOR:
- case FN_DELETE_ALL_NOTES:
- case FN_HIDE_NOTE:
- case FN_HIDE_NOTE_AUTHOR:
- case FN_HIDE_ALL_NOTES:
- case FN_DELETE_COMMENT:
+ case FN_POSTIT:
+ case FN_DELETE_NOTE_AUTHOR:
+ case FN_DELETE_ALL_NOTES:
+ case FN_HIDE_NOTE:
+ case FN_HIDE_NOTE_AUTHOR:
+ case FN_HIDE_ALL_NOTES:
+ case FN_DELETE_COMMENT:
{
- if ( !pPostItMgr ||
- !pPostItMgr->HasActiveAnnotationWin() )
+ if( !pPostItMgr
+ || !pPostItMgr->HasActiveAnnotationWin() )
{
rSet.DisableItem(nWhich);
}
break;
}
- case FN_REPLY:
+
+ case FN_REPLY:
{
if ( !pPostItMgr ||
!pPostItMgr->HasActiveAnnotationWin() )
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index eacd9d225196..e23d67df936e 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -296,11 +296,10 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
case SID_PASTE:
{
TransferableDataHelper aDataHelper(
- TransferableDataHelper::CreateFromSystemClipboard(
- &rSh.GetView().GetEditWin() ) );
-
- if( aDataHelper.GetXTransferable().is() &&
- SwTransferable::IsPaste( rSh, aDataHelper ))
+ TransferableDataHelper::CreateFromSystemClipboard( &rSh.GetView().GetEditWin() ) );
+ if( aDataHelper.GetXTransferable().is()
+ && SwTransferable::IsPaste( rSh, aDataHelper )
+ && !rSh.CrsrInsideInputFld() )
{
// temp. Variablen, da die Shell nach dem Paste schon
// zerstoert sein kann
@@ -348,10 +347,9 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
case SID_PASTE_UNFORMATTED:
{
TransferableDataHelper aDataHelper(
- TransferableDataHelper::CreateFromSystemClipboard(
- &rSh.GetView().GetEditWin()) );
- if( aDataHelper.GetXTransferable().is() &&
- SwTransferable::IsPaste( rSh, aDataHelper ))
+ TransferableDataHelper::CreateFromSystemClipboard( &rSh.GetView().GetEditWin()) );
+ if( aDataHelper.GetXTransferable().is()
+ && SwTransferable::IsPaste( rSh, aDataHelper ) )
{
// temp. Variablen, da die Shell nach dem Paste schon
// zerstoert sein kann
@@ -383,10 +381,10 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
case SID_PASTE_SPECIAL:
{
TransferableDataHelper aDataHelper(
- TransferableDataHelper::CreateFromSystemClipboard(
- &rSh.GetView().GetEditWin()) );
- if( aDataHelper.GetXTransferable().is() &&
- SwTransferable::IsPaste( rSh, aDataHelper ))
+ TransferableDataHelper::CreateFromSystemClipboard( &rSh.GetView().GetEditWin()) );
+ if( aDataHelper.GetXTransferable().is()
+ && SwTransferable::IsPaste( rSh, aDataHelper )
+ && !rSh.CrsrInsideInputFld() )
{
// temp. Variablen, da die Shell nach dem Paste schon
// zerstoert sein kann
@@ -399,7 +397,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
{
SfxViewFrame* pViewFrame = pView->GetViewFrame();
uno::Reference< frame::XDispatchRecorder > xRecorder =
- pViewFrame->GetBindings().GetRecorder();
+ pViewFrame->GetBindings().GetRecorder();
if(xRecorder.is()) {
SfxRequest aReq( pViewFrame, SID_CLIPBOARD_FORMAT_ITEMS );
aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, nFormatId ) );
@@ -415,6 +413,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
return;
}
break;
+
default:
DBG_ERROR("falscher Dispatcher");
return;
@@ -452,15 +451,25 @@ void SwBaseShell::StateClpbrd(SfxItemSet &rSet)
break;
case SID_PASTE:
- if( !GetView().IsPasteAllowed() )
- rSet.DisableItem( SID_PASTE );
+ if( !GetView().IsPasteAllowed()
+ || rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem( nWhich );
+ }
break;
case SID_PASTE_SPECIAL:
+ if( !GetView().IsPasteSpecialAllowed()
+ || rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem( nWhich );
+ }
+ break;
+
+ case SID_PASTE_UNFORMATTED:
if( !GetView().IsPasteSpecialAllowed() )
{
- rSet.DisableItem( SID_PASTE_SPECIAL );
- rSet.DisableItem( SID_PASTE_UNFORMATTED );
+ rSet.DisableItem( nWhich );
}
break;
@@ -660,8 +669,9 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case FN_UPDATE_INPUTFIELDS:
- rSh.UpdateInputFlds(NULL, sal_False);
+ rSh.UpdateInputFlds();
break;
+
case FN_PREV_BOOKMARK:
rReq.SetReturnValue(SfxBoolItem( nSlot, rSh.GoPrevBookmark()));
break;
@@ -691,7 +701,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.ClearMark();
rSh.EndSelect();
}
- sal_Bool bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK);
+ sal_Bool bRet = rSh.MoveFldType( pFldType, nSlot == FN_GOTO_NEXT_MARK );
SwField* pCurField = bRet ? rSh.GetCurFld() : 0;
if (pCurField)
rSh.ClickToField(*pCurField);
@@ -1228,7 +1238,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
}
else
{
- rSh.SetAttr( *pArgs );
+ rSh.SetAttrSet( *pArgs );
}
rSh.EndAllAction();
}
@@ -1261,7 +1271,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
else
{
// Umrandungsattribute ganz normal ueber Shell setzen
- rSh.SetAttr( *pItem );
+ rSh.SetAttrItem( *pItem );
}
}
break;
@@ -1395,10 +1405,14 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_INSERT_REGION:
- if( rSh.IsSelFrmMode() ||
- !rSh.IsInsRegionAvailable() )
+ if( rSh.CrsrInsideInputFld()
+ || rSh.IsSelFrmMode()
+ || !rSh.IsInsRegionAvailable() )
+ {
rSet.DisableItem( nWhich );
+ }
break;
+
case FN_CONVERT_TABLE_TO_TEXT:
{
sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
@@ -2127,7 +2141,7 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
if (!bAuto)
{
- rSh.SetAttr( *pArgs );
+ rSh.SetAttrSet( *pArgs );
}
}
delete pSSetItem;
@@ -2392,7 +2406,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
rSh.AutoUpdatePara( pColl, aSet);
}
else
- rSh.SetAttr( aBrushItem );
+ rSh.SetAttrItem( aBrushItem );
}
rReq.Done();
@@ -2530,7 +2544,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() == RET_OK )
{
- rSh.SetAttr( *pDlg->GetOutputItemSet() );
+ rSh.SetAttrSet( *pDlg->GetOutputItemSet() );
pOutSet = pDlg->GetOutputItemSet();
}
}
@@ -2598,7 +2612,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() == RET_OK )
{
- rSh.SetAttr( *pDlg->GetOutputItemSet() );
+ rSh.SetAttrSet( *pDlg->GetOutputItemSet() );
pOutSet = pDlg->GetOutputItemSet();
}
}
@@ -2881,7 +2895,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
SvxBrushItem aBrush( *pBrush );
aBrush.SetWhich( RES_BACKGROUND );
if ( nPos == nParagraphPos )
- rSh.SetAttr( aBrush );
+ rSh.SetAttrItem( aBrush );
else if ( nPos == nTablePos )
rSh.SetTabBackground( aBrush );
else if ( nPos == nTableRowPos )
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index 780ed04c8041..12944dd52b9c 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -992,7 +992,7 @@ void SwDrawTextShell::StateClpbrd(SfxItemSet &rSet)
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
ESelection aSel(pOLV->GetSelection());
const sal_Bool bCopy = (aSel.nStartPara != aSel.nEndPara) ||
- (aSel.nStartPos != aSel.nEndPos);
+ (aSel.nStartPos != aSel.nEndPos);
SfxWhichIter aIter(rSet);
@@ -1002,33 +1002,31 @@ void SwDrawTextShell::StateClpbrd(SfxItemSet &rSet)
{
switch(nWhich)
{
- case SID_CUT:
- case SID_COPY:
- if( !bCopy )
- rSet.DisableItem( nWhich );
- break;
+ case SID_CUT:
+ case SID_COPY:
+ if( !bCopy )
+ rSet.DisableItem( nWhich );
+ break;
- case SID_PASTE:
- {
- TransferableDataHelper aDataHelper(
- TransferableDataHelper::CreateFromSystemClipboard(
- &GetView().GetEditWin() ) );
+ case SID_PASTE:
+ {
+ TransferableDataHelper aDataHelper(
+ TransferableDataHelper::CreateFromSystemClipboard( &GetView().GetEditWin() ) );
- if( !aDataHelper.GetXTransferable().is() ||
- !SwTransferable::IsPaste( GetShell(), aDataHelper ))
- rSet.DisableItem( SID_PASTE );
+ if( !aDataHelper.GetXTransferable().is()
+ || !SwTransferable::IsPaste( GetShell(), aDataHelper ) )
+ {
+ rSet.DisableItem( nWhich );
}
- break;
+ }
+ break;
- case SID_PASTE_SPECIAL:
- rSet.DisableItem( SID_PASTE_SPECIAL );
- break;
- // --> OD 2008-06-20 #151110#
- case SID_CLIPBOARD_FORMAT_ITEMS:
- rSet.DisableItem( SID_CLIPBOARD_FORMAT_ITEMS );
- break;
- // <--
+ case SID_PASTE_SPECIAL:
+ case SID_CLIPBOARD_FORMAT_ITEMS:
+ rSet.DisableItem( nWhich );
+ break;
}
+
nWhich = aIter.NextWhich();
}
}
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx
index 732c0312bead..4fe1e5815880 100644
--- a/sw/source/ui/shells/frmsh.cxx
+++ b/sw/source/ui/shells/frmsh.cxx
@@ -1219,7 +1219,13 @@ void SwFrameShell::GetLineStyleState(SfxItemSet &rSet)
void SwFrameShell::StateInsert(SfxItemSet &rSet)
{
const int nSel = GetShell().GetSelectionType();
-
- if ((nSel & nsSelectionType::SEL_GRF) || (nSel & nsSelectionType::SEL_OLE))
+ if ( (nSel & nsSelectionType::SEL_GRF)
+ || (nSel & nsSelectionType::SEL_OLE) )
+ {
+ rSet.DisableItem(FN_INSERT_FRAME);
+ }
+ else if ( GetShell().CrsrInsideInputFld() )
+ {
rSet.DisableItem(FN_INSERT_FRAME);
+ }
}
diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx
index 847d0bd80d0a..4dda12e079ce 100644
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@ -339,7 +339,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
RES_GRFATR_END-1 );
aGrfSet.Put( *pSet );
if( aGrfSet.Count() )
- rSh.SetAttr( aGrfSet );
+ rSh.SetAttrSet( aGrfSet );
rSh.EndUndo(UNDO_END);
rSh.EndAllAction();
@@ -354,7 +354,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
rSh.GetCurAttr( aSet );
SwMirrorGrf aGrf((const SwMirrorGrf &)aSet.Get(RES_GRFATR_MIRRORGRF));
aGrf.SetGrfToggle(!aGrf.IsGrfToggle());
- rSh.SetAttr(aGrf);
+ rSh.SetAttrItem(aGrf);
}
break;
@@ -505,7 +505,7 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
ASSERT(!this, falscher Dispatcher);
}
if( aGrfSet.Count() )
- GetShell().SetAttr( aGrfSet );
+ GetShell().SetAttrSet( aGrfSet );
}
GetView().GetViewFrame()->GetBindings().Invalidate(rReq.GetSlot());
}
@@ -532,11 +532,18 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_TWAIN_TRANSFER:
if( bParentCntProt || !bIsGrfCntnt )
bDisable = sal_True;
+ else if ( nWhich == SID_INSERT_GRAPHIC
+ && rSh.CrsrInsideInputFld() )
+ {
+ bDisable = sal_True;
+ }
break;
+
case FN_SAVE_GRAPHIC:
if( rSh.GetGraphicType() == GRAPHIC_NONE )
bDisable = sal_True;
- break;
+ break;
+
case SID_COLOR_SETTINGS:
{
if ( bParentCntProt || !bIsGrfCntnt )
@@ -646,16 +653,6 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
{
if( bParentCntProt || !bIsGrfCntnt )
bDisable = sal_True;
- // --> OD 2006-11-03 #i59688#
- // load graphic only if type is unknown
-// else if( bSwappedOut )
-// {
-// rSet.DisableItem( nWhich );
-// if( AddGrfUpdateSlot( nWhich ))
-// rSh.GetGraphic(sal_False); // start the loading
-// }
-// else
-// bDisable = !bBitmapType;
else
{
const sal_uInt16 eGraphicType( rSh.GetGraphicType() );
diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx
index b178666e004b..070af91a7182 100644
--- a/sw/source/ui/shells/langhelper.cxx
+++ b/sw/source/ui/shells/langhelper.cxx
@@ -282,7 +282,7 @@ namespace SwLangHelper
{
rWrtSh.GetCurAttr( rCoreSet );
rCoreSet.Put( SvxLanguageItem( nLang, nLangWhichId ));
- rWrtSh.SetAttr( rCoreSet );
+ rWrtSh.SetAttrSet( rCoreSet );
}
}
else // change language for all text
@@ -298,7 +298,7 @@ namespace SwLangHelper
// #i102191: hard set respective language attribute in text document
// (for all text in the document - which should be selected by now...)
- rWrtSh.SetAttr( SvxLanguageItem( nLang, nLangWhichId ) );
+ rWrtSh.SetAttrItem( SvxLanguageItem( nLang, nLangWhichId ) );
}
}
}
@@ -346,7 +346,7 @@ namespace SwLangHelper
rWrtSh.GetCurAttr( rCoreSet );
for (sal_uInt16 i = 0; i < 3; ++i)
rCoreSet.Put( SvxLanguageItem( LANGUAGE_NONE, aLangWhichId_Writer[i] ));
- rWrtSh.SetAttr( rCoreSet );
+ rWrtSh.SetAttrSet( rCoreSet );
}
}
else // change language for all text
diff --git a/sw/source/ui/shells/listsh.cxx b/sw/source/ui/shells/listsh.cxx
index 58068080dd2d..c0a2bc7f8626 100644
--- a/sw/source/ui/shells/listsh.cxx
+++ b/sw/source/ui/shells/listsh.cxx
@@ -273,6 +273,13 @@ void SwListShell::GetState(SfxItemSet &rSet)
if(nCurrentNumLevel == (MAXLEVEL - 1))
rSet.DisableItem(nWhich);
break;
+
+ case FN_NUM_BULLET_NONUM:
+ if ( rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem(nWhich);
+ }
+ break;
}
nWhich = aIter.NextWhich();
}
diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx
index 73ef1a358e9b..fb9e85e05b52 100644
--- a/sw/source/ui/shells/tabsh.cxx
+++ b/sw/source/ui/shells/tabsh.cxx
@@ -1290,9 +1290,10 @@ void SwTableShell::GetState(SfxItemSet &rSet)
break;
case FN_INSERT_TABLE:
- // Irgendeinen Wert "putten", damit Controller enabled bleibt.
- // Statt "Insert:Table" erscheint dann "Format:Table".
-// rSet.Put(SfxUInt16Item(nSlot, 1));
+ if ( rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem( nSlot );
+ }
break;
case FN_TABLE_OPTIMAL_HEIGHT:
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index 980add9723d4..4031f5415899 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -45,6 +45,7 @@
#include <fldwrap.hxx>
#include <redline.hxx>
#include <view.hxx>
+#include <viewopt.hxx>
#include <wrtsh.hxx>
#include <basesh.hxx>
#include <wrtsh.hxx>
@@ -172,11 +173,26 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
sal_Bool bRet = sal_False;
SwFieldType* pFld = rSh.GetFldType( 0, RES_INPUTFLD );
- if( pFld && rSh.MoveFldType( pFld,
- FN_GOTO_NEXT_INPUTFLD == nSlot ))
+ const bool bAddSetExpressionFlds = !( rSh.GetViewOptions()->IsReadonly() );
+ if ( pFld != NULL
+ && rSh.MoveFldType(
+ pFld,
+ FN_GOTO_NEXT_INPUTFLD == nSlot,
+ USHRT_MAX,
+ bAddSetExpressionFlds ) )
{
rSh.ClearMark();
- rSh.StartInputFldDlg( rSh.GetCurFld(), sal_False );
+ if ( dynamic_cast<SwInputField*>(rSh.GetCurFld( true )) != NULL )
+ {
+ rSh.SttSelect();
+ rSh.SelectTxt(
+ rSh.StartOfInputFldAtPos( *(rSh.GetCrsr()->Start()) ) + 1,
+ rSh.EndOfInputFldAtPos( *(rSh.GetCrsr()->Start()) ) - 1 );
+ }
+ else
+ {
+ rSh.StartInputFldDlg( rSh.GetCurFld( true ), sal_False );
+ }
bRet = sal_True;
}
@@ -340,7 +356,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
case FN_POSTIT:
{
- SwPostItField* pPostIt = (SwPostItField*)aFldMgr.GetCurFld();
+ SwPostItField* pPostIt = dynamic_cast<SwPostItField*>(aFldMgr.GetCurFld());
sal_Bool bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD);
if (bNew || GetView().GetPostItMgr()->IsAnswer())
{
@@ -615,32 +631,26 @@ void SwTextShell::StateField( SfxItemSet &rSet )
{
switch (nWhich)
{
- case FN_DELETE_COMMENT:
- case FN_DELETE_NOTE_AUTHOR:
- case FN_DELETE_ALL_NOTES:
- case FN_HIDE_NOTE:
- case FN_HIDE_NOTE_AUTHOR:
- case FN_HIDE_ALL_NOTES:
+ case FN_DELETE_COMMENT:
+ case FN_DELETE_NOTE_AUTHOR:
+ case FN_DELETE_ALL_NOTES:
+ case FN_HIDE_NOTE:
+ case FN_HIDE_NOTE_AUTHOR:
+ case FN_HIDE_ALL_NOTES:
+ {
+ SwPostItMgr* pPostItMgr = GetView().GetPostItMgr();
+ if ( !pPostItMgr )
+ rSet.InvalidateItem( nWhich );
+ else if ( !pPostItMgr->HasActiveSidebarWin() )
{
- SwPostItMgr* pPostItMgr = GetView().GetPostItMgr();
- if ( !pPostItMgr )
- rSet.InvalidateItem( nWhich );
- else if ( !pPostItMgr->HasActiveSidebarWin() )
- {
- rSet.InvalidateItem( FN_DELETE_COMMENT );
- rSet.InvalidateItem( FN_HIDE_NOTE );
- }
+ rSet.InvalidateItem( FN_DELETE_COMMENT );
+ rSet.InvalidateItem( FN_HIDE_NOTE );
}
+ }
break;
- case FN_EDIT_FIELD:
- {
- /* #108536# Fields can be selected, too now. Removed
-
- if( rSh.HasSelection() )
- rSet.DisableItem(nWhich);
- else ...
- */
+ case FN_EDIT_FIELD:
+ {
if( !bGetField )
{
pField = rSh.GetCurFld();
@@ -654,14 +664,15 @@ void SwTextShell::StateField( SfxItemSet &rSet )
RES_AUTHORITY == nTempWhich )
rSet.DisableItem( nWhich );
else if( RES_DDEFLD == nTempWhich &&
- !((SwDDEFieldType*)pField->GetTyp())->GetBaseLink().IsVisible())
+ !((SwDDEFieldType*)pField->GetTyp())->GetBaseLink().IsVisible())
{
// nested links cannot be edited
rSet.DisableItem( nWhich );
}
}
break;
- case FN_EXECUTE_MACROFIELD:
+
+ case FN_EXECUTE_MACROFIELD:
{
if(!bGetField)
{
@@ -673,33 +684,55 @@ void SwTextShell::StateField( SfxItemSet &rSet )
}
break;
- case FN_INSERT_FIELD:
+ case FN_INSERT_FIELD:
{
- SfxViewFrame* pVFrame = GetView().GetViewFrame();
- //#i5788# prevent closing of the field dialog while a modal dialog ( Input field dialog ) is active
- if(!pVFrame->IsInModalMode() &&
- pVFrame->KnowsChildWindow(FN_INSERT_FIELD) && !pVFrame->HasChildWindow(FN_INSERT_FIELD_DATA_ONLY) )
- rSet.Put(SfxBoolItem( FN_INSERT_FIELD, pVFrame->HasChildWindow(nWhich)));
+ if ( rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem(nWhich);
+ }
else
- rSet.DisableItem(FN_INSERT_FIELD);
+ {
+ SfxViewFrame* pVFrame = GetView().GetViewFrame();
+ //#i5788# prevent closing of the field dialog while a modal dialog ( Input field dialog ) is active
+ if(!pVFrame->IsInModalMode() &&
+ pVFrame->KnowsChildWindow(FN_INSERT_FIELD) && !pVFrame->HasChildWindow(FN_INSERT_FIELD_DATA_ONLY) )
+ rSet.Put(SfxBoolItem( FN_INSERT_FIELD, pVFrame->HasChildWindow(nWhich)));
+ else
+ rSet.DisableItem(FN_INSERT_FIELD);
+ }
}
break;
- case FN_INSERT_REF_FIELD:
+
+ case FN_INSERT_REF_FIELD:
{
SfxViewFrame* pVFrame = GetView().GetViewFrame();
- if (!pVFrame->KnowsChildWindow(FN_INSERT_FIELD))
+ if ( !pVFrame->KnowsChildWindow(FN_INSERT_FIELD)
+ || rSh.CrsrInsideInputFld() )
+ {
rSet.DisableItem(FN_INSERT_REF_FIELD);
+ }
}
break;
- case FN_INSERT_FIELD_CTRL:
- rSet.Put(SfxBoolItem( nWhich, GetView().GetViewFrame()->HasChildWindow(FN_INSERT_FIELD)));
- break;
- case FN_REDLINE_COMMENT:
- if (!rSh.GetCurrRedline())
+
+ case FN_INSERT_FIELD_CTRL:
+ if ( rSh.CrsrInsideInputFld() )
+ {
rSet.DisableItem(nWhich);
- break;
- case FN_POSTIT :
- case FN_JAVAEDIT :
+ }
+ else
+ {
+ rSet.Put(SfxBoolItem( nWhich, GetView().GetViewFrame()->HasChildWindow(FN_INSERT_FIELD)));
+ }
+ break;
+
+ case FN_REDLINE_COMMENT:
+ if (!rSh.GetCurrRedline())
+ rSet.DisableItem(nWhich);
+ break;
+
+ case FN_POSTIT :
+ case FN_JAVAEDIT :
+ {
sal_Bool bCurField = sal_False;
pField = rSh.GetCurFld();
if(nWhich == FN_POSTIT)
@@ -707,9 +740,32 @@ void SwTextShell::StateField( SfxItemSet &rSet )
else
bCurField = pField && pField->GetTyp()->Which() == RES_SCRIPTFLD;
- if(!bCurField && rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel() )
+ if( !bCurField && rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel() )
+ {
rSet.DisableItem(nWhich);
+ }
+ else if ( rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem(nWhich);
+ }
+ }
+
break;
+
+ case FN_INSERT_FLD_AUTHOR:
+ case FN_INSERT_FLD_DATE:
+ case FN_INSERT_FLD_PGCOUNT:
+ case FN_INSERT_FLD_PGNUMBER:
+ case FN_INSERT_FLD_TIME:
+ case FN_INSERT_FLD_TITLE:
+ case FN_INSERT_FLD_TOPIC:
+ case FN_INSERT_DBFIELD:
+ if ( rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem(nWhich);
+ }
+ break;
+
}
nWhich = aIter.NextWhich();
}
diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx
index 27bd4827557f..d6ed9a4cdeec 100644
--- a/sw/source/ui/shells/textidx.cxx
+++ b/sw/source/ui/shells/textidx.cxx
@@ -211,7 +211,16 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, sal_True));
}
- else //if( SFX_ITEM_UNKNOWN != rSet.GetItemState( FN_EDIT_IDX_ENTRY_DLG ))
+ else if ( rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem( FN_INSERT_IDX_ENTRY_DLG );
+ rSet.DisableItem( FN_INSERT_AUTH_ENTRY_DLG );
+ rSet.DisableItem( FN_EDIT_AUTH_ENTRY_DLG );
+ rSet.DisableItem( FN_EDIT_IDX_ENTRY_DLG );
+ rSet.DisableItem( FN_INSERT_MULTI_TOX );
+ rSet.DisableItem( FN_REMOVE_CUR_TOX );
+ }
+ else
{
sal_Bool bEnableEdit = sal_True;
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 907a6d981b86..b65e65142875 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -159,7 +159,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_INSERT_STRING:
if( pItem )
rSh.InsertByWord(((const SfxStringItem *)pItem)->GetValue());
- break;
+ break;
+
case FN_INSERT_SOFT_HYPHEN:
if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, 0 ) &&
CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, -1 ))
@@ -169,20 +170,23 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_INSERT_HARDHYPHEN:
case FN_INSERT_HARD_SPACE:
{
- sal_Unicode cIns = FN_INSERT_HARD_SPACE == nSlot ? CHAR_HARDBLANK
- : CHAR_HARDHYPHEN;
+ const sal_Unicode cIns = FN_INSERT_HARD_SPACE == nSlot ? CHAR_HARDBLANK : CHAR_HARDHYPHEN;
SvxAutoCorrCfg* pACfg = SvxAutoCorrCfg::Get();
SvxAutoCorrect* pACorr = pACfg->GetAutoCorrect();
- if( pACorr && pACfg->IsAutoFmtByInput() &&
- pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd |
- AddNonBrkSpace | ChgOrdinalNumber |
- ChgToEnEmDash | SetINetAttr | Autocorrect ))
+ if( pACorr && pACfg->IsAutoFmtByInput()
+ && pACorr->IsAutoCorrFlag(
+ CptlSttSntnc | CptlSttWrd | AddNonBrkSpace | ChgOrdinalNumber | ChgToEnEmDash | SetINetAttr | Autocorrect ) )
+ {
rSh.AutoCorrect( *pACorr, cIns );
+ }
else
+ {
rSh.Insert( String( cIns ) );
+ }
}
break;
+
case SID_INSERT_RLM :
case SID_INSERT_LRM :
case SID_INSERT_ZWNBSP :
@@ -199,30 +203,46 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
rSh.Insert( String( cIns ) );
}
break;
+
case FN_INSERT_BREAK:
- rSh.SplitNode();
+ {
+ if( !rSh.CrsrInsideInputFld() )
+ {
+ rSh.SplitNode();
+ }
+ else
+ {
+ rSh.InsertLineBreak();
+ }
+ }
rReq.Done();
- break;
+ break;
+
case FN_INSERT_PAGEBREAK:
rSh.InsertPageBreak();
rReq.Done();
- break;
+ break;
+
case FN_INSERT_LINEBREAK:
rSh.InsertLineBreak();
rReq.Done();
- break;
+ break;
+
case FN_INSERT_COLUMN_BREAK:
rSh.InsertColumnBreak();
rReq.Done();
- break;
+ break;
+
case SID_HYPERLINK_SETLINK:
if (pItem)
InsertHyperlink(*((const SvxHyperlinkItem *)pItem));
rReq.Done();
break;
+
case SID_INSERT_AVMEDIA:
rReq.SetReturnValue(SfxBoolItem(nSlot, InsertMediaDlg( rReq )));
break;
+
case SID_INSERT_SOUND:
case SID_INSERT_VIDEO:
{
@@ -262,6 +282,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
}
break;
+
case SID_INSERT_OBJECT:
case SID_INSERT_PLUGIN:
{
@@ -709,7 +730,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
rSh.SplitNode( sal_False, sal_False );
rSh.SplitNode( sal_False, sal_False );
rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
- rSh.SetAttr(SvxAdjustItem(SVX_ADJUST_CENTER,RES_PARATR_ADJUST ));
+ rSh.SetAttrItem(SvxAdjustItem(SVX_ADJUST_CENTER,RES_PARATR_ADJUST ));
if(GRFILTER_OK == GetView().InsertGraphic(sPath, aEmptyStr, sal_True, 0, 0 ))
bRet = sal_True;
rSh.EnterStdMode();
@@ -759,38 +780,39 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
rSh.Push();
const sal_Bool bCrsrInHidden = rSh.SelectHiddenRange();
- // --> OD 2009-08-05 #i103839#, #b6855246#
- // Do not call method <SwCrsrShell::Pop(..)> with 1st parameter = <sal_False>
- // in order to avoid that the view jumps to the visible cursor.
rSh.Pop();
- // <--
while ( nWhich )
{
switch ( nWhich )
{
- case SID_INSERT_SOUND:
- case SID_INSERT_VIDEO:
- /*!SvxPluginFileDlg::IsAvailable( nWhich ) ||
-
- discussed with mba: for performance reasons we skip the IsAvailable call here
- */
- if ( GetShell().IsSelFrmMode() ||
- SFX_CREATE_MODE_EMBEDDED == eCreateMode || bCrsrInHidden )
- {
- rSet.DisableItem( nWhich );
- }
- break;
+ case SID_INSERT_AVMEDIA:
+ case SID_INSERT_SOUND:
+ case SID_INSERT_VIDEO:
+ if ( GetShell().IsSelFrmMode()
+ || GetShell().CrsrInsideInputFld()
+ || SFX_CREATE_MODE_EMBEDDED == eCreateMode
+ || bCrsrInHidden )
+ {
+ rSet.DisableItem( nWhich );
+ }
+ break;
- case SID_INSERT_DIAGRAM:
- if( !aMOpt.IsChart() || eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
- {
- rSet.DisableItem( nWhich );
- }
- break;
+ case SID_INSERT_DIAGRAM:
+ if( !aMOpt.IsChart()
+ || GetShell().CrsrInsideInputFld()
+ || eCreateMode == SFX_CREATE_MODE_EMBEDDED
+ || bCrsrInHidden )
+ {
+ rSet.DisableItem( nWhich );
+ }
+ break;
case FN_INSERT_SMA:
- if( !aMOpt.IsMath() || eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
+ if( !aMOpt.IsMath()
+ || eCreateMode == SFX_CREATE_MODE_EMBEDDED
+ || bCrsrInHidden
+ || rSh.CrsrInsideInputFld() )
{
rSet.DisableItem( nWhich );
}
@@ -799,30 +821,38 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
case SID_INSERT_FLOATINGFRAME:
case SID_INSERT_OBJECT:
case SID_INSERT_PLUGIN:
- {
- if( eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
{
- rSet.DisableItem( nWhich );
+ if( eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
+ {
+ rSet.DisableItem( nWhich );
+ }
+ else if( GetShell().IsSelFrmMode()
+ || GetShell().CrsrInsideInputFld() )
+ {
+ rSet.DisableItem( nWhich );
+ }
+ else if(SID_INSERT_FLOATINGFRAME == nWhich && nHtmlMode&HTMLMODE_ON)
+ {
+ SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
+ sal_uInt16 nExport = pHtmlOpt->GetExportMode();
+ if(HTML_CFG_MSIE_40 != nExport && HTML_CFG_WRITER != nExport )
+ rSet.DisableItem(nWhich);
+ }
}
- else if( GetShell().IsSelFrmMode())
- rSet.DisableItem( nWhich );
- else if(SID_INSERT_FLOATINGFRAME == nWhich && nHtmlMode&HTMLMODE_ON)
+ break;
+
+ case FN_INSERT_FRAME_INTERACT_NOCOL :
+ case FN_INSERT_FRAME_INTERACT:
{
- SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
- sal_uInt16 nExport = pHtmlOpt->GetExportMode();
- if(HTML_CFG_MSIE_40 != nExport && HTML_CFG_WRITER != nExport )
+ if( GetShell().IsSelFrmMode()
+ || GetShell().CrsrInsideInputFld()
+ || ( 0 != (nHtmlMode & HTMLMODE_ON)
+ && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS) )
+ || bCrsrInHidden )
rSet.DisableItem(nWhich);
}
- }
- break;
- case FN_INSERT_FRAME_INTERACT_NOCOL :
- case FN_INSERT_FRAME_INTERACT:
- {
- if ( GetShell().IsSelFrmMode() ||
- (0 != (nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS)) || bCrsrInHidden )
- rSet.DisableItem(nWhich);
- }
- break;
+ break;
+
case SID_HYPERLINK_GETLINK:
{
SfxItemSet aSet(GetPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT);
@@ -869,24 +899,34 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
aHLinkItem.SetInsertMode((SvxLinkInsertMode)(aHLinkItem.GetInsertMode() |
((nHtmlMode & HTMLMODE_ON) != 0 ? HLINK_HTMLMODE : 0)));
aHLinkItem.SetMacroEvents ( HYPERDLG_EVENT_MOUSEOVER_OBJECT|
- HYPERDLG_EVENT_MOUSECLICK_OBJECT | HYPERDLG_EVENT_MOUSEOUT_OBJECT );
+ HYPERDLG_EVENT_MOUSECLICK_OBJECT | HYPERDLG_EVENT_MOUSEOUT_OBJECT );
rSet.Put(aHLinkItem);
}
break;
case FN_INSERT_FRAME:
- if(rSh.IsSelFrmMode())
+ if (rSh.IsSelFrmMode() )
{
const int nSel = rSh.GetSelectionType();
if( ((nsSelectionType::SEL_GRF | nsSelectionType::SEL_OLE ) & nSel ) || bCrsrInHidden )
rSet.DisableItem(nWhich);
}
- break;
+ else if ( rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem(nWhich);
+ }
+ break;
+
case FN_INSERT_HRULER :
- if((rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel()) || bCrsrInHidden )
+ if( (rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel())
+ || bCrsrInHidden
+ || rSh.CrsrInsideInputFld() )
+ {
rSet.DisableItem(nWhich);
- break;
+ }
+ break;
+
case FN_FORMAT_COLUMN :
{
//#i80458# column dialog cannot work if the selection contains different page styles and different sections
@@ -1181,7 +1221,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
rSh.SetMark();
rSh.ExtendSelection( sal_False, aChars.Len() );
- rSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND | nsSetAttrMode::SETATTR_NOFORMATATTR );
+ rSh.SetAttrSet( aSet, nsSetAttrMode::SETATTR_DONTEXPAND | nsSetAttrMode::SETATTR_NOFORMATATTR );
if( !rSh.IsCrsrPtAtEnd() )
rSh.SwapPam();
@@ -1191,7 +1231,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
// SETATTR_DONTEXPAND does not work if there are already hard attributes.
// Therefore we have to restore the font attributes.
rSh.SetMark();
- rSh.SetAttr( aRestoreSet );
+ rSh.SetAttrSet( aRestoreSet );
rSh.ClearMark();
// <--
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 965c92e812eb..82b4536186ef 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -255,7 +255,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,c
rWrtSh.AutoUpdatePara(pColl, aTmpSet);
}
else
- rWrtSh.SetAttr( aTmpSet );
+ rWrtSh.SetAttrSet( aTmpSet );
if (pReq)
pReq->Done(aTmpSet);
if(bInsert)
@@ -462,7 +462,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SvxFontItem aFont( rFont.GetFamily(), pFont->GetValue(),
rFont.GetStyleName(), rFont.GetPitch(), RTL_TEXTENCODING_DONTKNOW, RES_CHRATR_FONT );
//pCharset ? (CharSet) pCharset->GetValue() : RTL_TEXTENCODING_DONTKNOW );
- rWrtSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
+ rWrtSh.SetAttrSet( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
rWrtSh.ResetSelect(0, sal_False);
rWrtSh.EndSelect();
rWrtSh.GotoFtnTxt();
@@ -1039,7 +1039,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
if ( ((SfxStringItem*)pItem)->GetValue().Len() )
rWrtSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue());
}
- rWrtSh.SetAttr( *pSet );
+ rWrtSh.SetAttrSet( *pSet );
// rWrtSh.EndUndo( UNDO_END );
rWrtSh.EndAction();
SwTxtFmtColl* pColl = rWrtSh.GetCurTxtFmtColl();
@@ -1119,8 +1119,35 @@ void SwTextShell::Execute(SfxRequest &rReq)
case SID_DEC_INDENT:
case SID_INC_INDENT:
+//IAccessibility2 Implementation 2009-----
+ //According to the requirement, modified the behavior when user
+ //using the indent button on the toolbar. Now if we increase/decrease indent for a
+ //paragraph which has bullet style it will increase/decrease the bullet level.
+ {
+ //If the current paragraph has bullet call the function to
+ //increase or decrease the bullet level.
+ //Why could I know wheter a paragraph has bullet or not by checking the below conditions?
+ //Please refer to the "case KEY_TAB:" section in SwEditWin::KeyInput(..) :
+ // if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
+ // !rSh.HasReadonlySel() )
+ // eKeyState = KS_NumDown;
+ //Above code demonstrates that when the cursor is at the start of a paragraph which has bullet,
+ //press TAB will increase the bullet level.
+ //So I copied from that ^^
+ if ( rWrtSh.GetCurNumRule() && !rWrtSh.HasReadonlySel() )
+ {
+ rWrtSh.NumUpDown( SID_INC_INDENT == nSlot );
+ }
+ else//execute the original processing functions
+ {
+ //below is copied of the old codes
rWrtSh.MoveLeftMargin( SID_INC_INDENT == nSlot,
rReq.GetModifier() != KEY_MOD1 );
+ }
+ }
+ //rWrtSh.MoveLeftMargin( SID_INC_INDENT == nSlot,
+ // rReq.GetModifier() != KEY_MOD1 );
+//-----IAccessibility2 Implementation 2009
rReq.Done();
break;
case FN_DEC_INDENT_OFFSET:
@@ -1143,7 +1170,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
// besteht eine Selektion, wird sie gleich gefaerbt
if(!pApply && rWrtSh.HasSelection())
{
- rWrtSh.SetAttr(SvxColorItem (aSet, RES_CHRATR_COLOR));
+ rWrtSh.SetAttrItem(SvxColorItem (aSet, RES_CHRATR_COLOR));
}
else if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT)
{
@@ -1151,17 +1178,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
rReq.Done();
-/* OS 22.02.97 18:40 Das alte Verhalten ist unerwuenscht
- SwEditWin& rEdtWin = GetView().GetEditWin();
-
- SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
- SvxColorItem aItem(aSet, RES_CHRATR_COLOR);
-
- if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT)
- {
- GetShell().SetAttr(aItem);
- }
-*/
}
}
break;
@@ -1183,7 +1199,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
aBrushItem.SetColor(aSet);
else
aBrushItem.SetColor(Color(COL_TRANSPARENT));
- rWrtSh.SetAttr( aBrushItem );
+ rWrtSh.SetAttrItem( aBrushItem );
}
else if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_BACKGROUND_EXT)
{
@@ -1192,15 +1208,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
rReq.Done();
-/* OS 22.02.97 18:40 Das alte Verhalten ist unerwuenscht
- if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_BACKGROUND_EXT)
- {
- Brush aBrush(pItem ? BRUSH_SOLID : BRUSH_NULL);
- if(pItem)
- aBrush.SetColor( aSet );
- GetShell().SetAttr( SvxBrushItem(aBrush, RES_CHRATR_BACKGROUND) );
- }
-*/
}
break;
case SID_ATTR_CHAR_COLOR_BACKGROUND_EXT:
@@ -1215,12 +1222,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
if(nSlot == SID_ATTR_CHAR_COLOR_BACKGROUND_EXT)
{
- rWrtSh.SetAttr( SvxBrushItem(
- rEdtWin.GetTextBackColor(), RES_CHRATR_BACKGROUND) );
+ rWrtSh.SetAttrItem(
+ SvxBrushItem( rEdtWin.GetTextBackColor(), RES_CHRATR_BACKGROUND) );
}
else
- rWrtSh.SetAttr( SvxColorItem( rEdtWin.GetTextColor(),
- RES_CHRATR_COLOR) );
+ rWrtSh.SetAttrItem(
+ SvxColorItem( rEdtWin.GetTextColor(), RES_CHRATR_COLOR) );
}
else
{
@@ -1464,6 +1471,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
rSet.Put(SfxBoolItem(FN_NUMBER_NEWSTART,
rSh.IsNumRuleStart()));
break;
+
case FN_EDIT_FORMULA:
case SID_CHARMAP:
{
@@ -1471,7 +1479,14 @@ void SwTextShell::GetState( SfxItemSet &rSet )
if (!(nType & nsSelectionType::SEL_TXT) &&
!(nType & nsSelectionType::SEL_TBL) &&
!(nType & nsSelectionType::SEL_NUM))
+ {
rSet.DisableItem(nWhich);
+ }
+ else if ( nWhich == FN_EDIT_FORMULA
+ && rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem( nWhich );
+ }
}
break;
@@ -1479,16 +1494,35 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case FN_INSERT_FOOTNOTE:
case FN_INSERT_FOOTNOTE_DLG:
{
- const sal_uInt16 nNoType = FRMTYPE_FLY_ANY | FRMTYPE_HEADER |
- FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE;
+ const sal_uInt16 nNoType =
+ FRMTYPE_FLY_ANY | FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE;
if ( (rSh.GetFrmType(0,sal_True) & nNoType) )
rSet.DisableItem(nWhich);
+
+ if ( rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem( nWhich );
+ }
+ }
+ break;
+
+ case FN_INSERT_HYPERLINK:
+ case SID_INSERTDOC:
+ case FN_INSERT_GLOSSARY:
+ case FN_EXPAND_GLOSSARY:
+ if ( rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem( nWhich );
}
break;
+
case FN_INSERT_TABLE:
- if ( rSh.GetTableFmt() ||
- (rSh.GetFrmType(0,sal_True) & FRMTYPE_FOOTNOTE) )
+ if ( rSh.CrsrInsideInputFld()
+ || rSh.GetTableFmt()
+ || (rSh.GetFrmType(0,sal_True) & FRMTYPE_FOOTNOTE) )
+ {
rSet.DisableItem( nWhich );
+ }
break;
case FN_CALCULATE:
@@ -1507,20 +1541,53 @@ void SwTextShell::GetState( SfxItemSet &rSet )
rSet.Put( SfxBoolItem( nWhich, SvxAutoCorrCfg::Get()->IsAutoFmtByInput() ));
}
break;
+
case FN_GLOSSARY_DLG:
{
- rSet.Put(SfxBoolItem(nWhich), sal_True);
+ if ( rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem( nWhich );
+ }
+ else
+ {
+ rSet.Put(SfxBoolItem(nWhich), sal_True);
+ }
}
break;
case SID_DEC_INDENT:
case SID_INC_INDENT:
{
+//IAccessibility2 Implementation 2009-----
+ //if the paragrah has bullet we'll do the following things:
+ //1: if the bullet level is the first level, disable the decrease-indent button
+ //2: if the bullet level is the last level, disable the increase-indent button
+ if ( rSh.GetCurNumRule() && !rSh.HasReadonlySel() )
+ {
+ sal_uInt8 nLevel = rSh.GetNumLevel();
+ if ( nLevel == (MAXLEVEL-1) && nWhich == SID_INC_INDENT ||
+ nLevel == 0 && nWhich == SID_DEC_INDENT )
+ {
+ rSet.DisableItem( nWhich );
+ }
+ }
+ else//if the paragraph has no bullet, execute the original functions
+ {
+ //below is copied of the old codes
sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
if( (nHtmlMode == HTMLMODE_ON) || !rSh.IsMoveLeftMargin(
SID_INC_INDENT == nWhich, sal_True ))
rSet.DisableItem( nWhich );
+ }
+ //old code begins
+ //sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ //nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
+ //if( (nHtmlMode == HTMLMODE_ON) || !rSh.IsMoveLeftMargin(
+ // SID_INC_INDENT == nWhich, TRUE ))
+ // rSet.DisableItem( nWhich );
+ //old code ends
+//-----IAccessibility2 Implementation 2009
}
break;
@@ -1557,9 +1624,22 @@ void SwTextShell::GetState( SfxItemSet &rSet )
rSet.Put(SfxBoolItem(nWhich, pApply && pApply->nColor == nWhich));
}
break;
+
case FN_INSERT_BOOKMARK:
- if( rSh.IsTableMode() )
+ if( rSh.IsTableMode()
+ || rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem( nWhich );
+ }
+ break;
+
+ case FN_INSERT_BREAK_DLG:
+ case FN_INSERT_COLUMN_BREAK:
+ case FN_INSERT_PAGEBREAK:
+ if( rSh.CrsrInsideInputFld() )
+ {
rSet.DisableItem( nWhich );
+ }
break;
case FN_INSERT_PAGEHEADER:
@@ -1596,42 +1676,50 @@ void SwTextShell::GetState( SfxItemSet &rSet )
(FN_TABLE_SORT_DIALOG == nWhich && !rSh.GetTableFmt()))
rSet.DisableItem( nWhich );
break;
+
case SID_RUBY_DIALOG:
- {
- SvtCJKOptions aCJKOptions;
- if(!aCJKOptions.IsRubyEnabled())
{
- GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, sal_False );
- rSet.DisableItem(nWhich);
+ SvtCJKOptions aCJKOptions;
+ if( !aCJKOptions.IsRubyEnabled()
+ || rSh.CrsrInsideInputFld() )
+ {
+ GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, sal_False );
+ rSet.DisableItem(nWhich);
+ }
+ else
+ GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, sal_True );
}
- else
- GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, sal_True );
break;
- }
- //no break!
+
case SID_HYPERLINK_DIALOG:
- if( GetView().GetDocShell()->IsReadOnly() ||
- (!GetView().GetViewFrame()->HasChildWindow(nWhich) &&
- rSh.HasReadonlySel()) )
+ if( GetView().GetDocShell()->IsReadOnly()
+ || ( !GetView().GetViewFrame()->HasChildWindow(nWhich)
+ && rSh.HasReadonlySel() )
+ || rSh.CrsrInsideInputFld() )
+ {
rSet.DisableItem(nWhich);
+ }
else
- rSet.Put(SfxBoolItem( nWhich, 0 != GetView().
- GetViewFrame()->GetChildWindow( nWhich ) ));
+ {
+ rSet.Put(SfxBoolItem( nWhich, 0 != GetView().GetViewFrame()->GetChildWindow( nWhich ) ));
+ }
break;
+
case FN_EDIT_HYPERLINK:
case FN_REMOVE_HYPERLINK:
case FN_COPY_HYPERLINK_LOCATION:
- {
- SfxItemSet aSet(GetPool(),
- RES_TXTATR_INETFMT,
- RES_TXTATR_INETFMT);
- rSh.GetCurAttr(aSet);
- if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, sal_True ) || rSh.HasReadonlySel())
{
- rSet.DisableItem(nWhich);
+ SfxItemSet aSet(GetPool(),
+ RES_TXTATR_INETFMT,
+ RES_TXTATR_INETFMT);
+ rSh.GetCurAttr(aSet);
+ if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, sal_True ) || rSh.HasReadonlySel())
+ {
+ rSet.DisableItem(nWhich);
+ }
}
- }
- break;
+ break;
+
case SID_TRANSLITERATE_HALFWIDTH:
case SID_TRANSLITERATE_FULLWIDTH:
case SID_TRANSLITERATE_HIRAGANA:
@@ -1755,13 +1843,6 @@ void SwTextShell::GetState( SfxItemSet &rSet )
break;
case FN_NUM_CONTINUE:
{
- // --> OD 2009-08-26 #i86492#
- // Allow continuation of previous list, even if at current cursor
- // a list is active.
-// if ( rSh.GetCurNumRule() )
-// rSet.DisableItem(nWhich);
-// else
- // <--
{
// --> OD 2009-08-26 #i86492#
// Search also for bullet list
diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx
index 181e0dafc2a9..f955b18ed8ae 100644
--- a/sw/source/ui/shells/txtattr.cxx
+++ b/sw/source/ui/shells/txtattr.cxx
@@ -149,7 +149,7 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
if(eEscape == FN_SET_SUPER_SCRIPT)
aEscape.GetEsc() *= -1;
}
- rSh.SetAttr( aEscape );
+ rSh.SetAttrItem( aEscape );
rReq.AppendItem( aEscape );
rReq.Done();
}
@@ -178,7 +178,7 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
break;
}
SvxUnderlineItem aUnderline(eUnderline, RES_CHRATR_UNDERLINE );
- rSh.SetAttr( aUnderline );
+ rSh.SetAttrItem( aUnderline );
rReq.AppendItem( aUnderline );
rReq.Done();
}
@@ -234,7 +234,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
if ( pColl )
pColl->SetFmtAttr( aINetFmt );
- else rWrtSh.SetAttr( aINetFmt );
+ else rWrtSh.SetAttrItem( aINetFmt );
rReq.Done();
}
break;
@@ -281,7 +281,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
if( pColl )
pColl->SetFmtAttr( aAttrSet );
else
- rWrtSh.SetAttr( aAttrSet );
+ rWrtSh.SetAttrSet( aAttrSet );
}
rReq.Done();
}
@@ -345,7 +345,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq)
}
else
{
- rWrtSh.SetAttr( aSet );
+ rWrtSh.SetAttrSet( aSet );
rReq.Done( aSet );
}
}
@@ -508,7 +508,7 @@ SET_LINESPACE:
rWrtSh.AutoUpdatePara(pColl, aSet);
}
else
- rWrtSh.SetAttr( aSet );
+ rWrtSh.SetAttrSet( aSet );
rReq.Done();
}
@@ -539,14 +539,14 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
pFmt = rSh.FindCharFmtByName( sCharStyleName );
aDropItem.SetCharFmt( pFmt );
aSet.Put(aDropItem);
- rSh.SetAttr(aSet);
+ rSh.SetAttrSet(aSet);
}
break;
case FN_FORMAT_DROPCAPS:
{
if(pItem)
{
- rSh.SetAttr(*pItem);
+ rSh.SetAttrItem(*pItem);
rReq.Done();
}
else
@@ -569,7 +569,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
if ( ((SfxStringItem*)pItem)->GetValue().Len() )
rSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue());
}
- rSh.SetAttr(*pDlg->GetOutputItemSet());
+ rSh.SetAttrSet(*pDlg->GetOutputItemSet());
rSh.StartUndo( UNDO_END );
rSh.EndAction();
rReq.Done(*pDlg->GetOutputItemSet());
@@ -581,7 +581,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
case SID_ATTR_PARA_PAGEBREAK:
if(pItem)
{
- rSh.SetAttr( *pItem );
+ rSh.SetAttrItem( *pItem );
rReq.Done();
}
break;
@@ -594,7 +594,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL, 0);
aCoreSet.Put(*pItem);
SfxToSwPageDescAttr( rSh, aCoreSet);
- rSh.SetAttr(aCoreSet);
+ rSh.SetAttrSet(aCoreSet);
rReq.Done();
}
}
diff --git a/sw/source/ui/shells/txtnum.cxx b/sw/source/ui/shells/txtnum.cxx
index b5016bc4dbe4..3c1591aa8d7a 100644
--- a/sw/source/ui/shells/txtnum.cxx
+++ b/sw/source/ui/shells/txtnum.cxx
@@ -354,7 +354,7 @@ void SwTextShell::ExecSetNumber(SfxRequest &rReq)
numfunc::GetDefaultPositionAndSpaceMode() );
SvxNumRule aTempRule = aTmpRule.MakeSvxNumRule();
- //Sym3_2508, set unit attribute to NB Manager
+ // set unit attribute to NB Manager
SfxItemSet aSet(GetPool(),
SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL,
0 );
@@ -407,7 +407,7 @@ void SwTextShell::ExecSetNumber(SfxRequest &rReq)
numfunc::GetDefaultPositionAndSpaceMode() );
SvxNumRule aTempRule = aTmpRule.MakeSvxNumRule();
- //Sym3_2508, set unit attribute to NB Manager
+ // set unit attribute to NB Manager
SfxItemSet aSet(GetPool(),
SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL,
0 );
diff --git a/sw/source/ui/table/convert.hrc b/sw/source/ui/table/convert.hrc
index 7537d868689d..4156a5e7b4d4 100644
--- a/sw/source/ui/table/convert.hrc
+++ b/sw/source/ui/table/convert.hrc
@@ -35,6 +35,12 @@
#define FL_OPTIONS 17
#define FT_REPEAT_HEADER 18
#define NF_REPEAT_HEADER 19
+//Table Row Header for ACC Supporting 2010.02.22
+#define FT_EXPLAIN_REPEAT_HEADER 20
+#define CB_LABEL 21
+#define NF_REPEAT_LABEL 22
+#define FT_REPEAT_LABEL 23
+//End table_row_header
#define BT_OK 100
#define BT_CANCEL 101
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 088586236c2b..6af7e25d3d4f 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -991,11 +991,9 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox )
sEntry += sIndex;
pTextArr[i]->SetText( sEntry );
//IAccessibility2 Impplementaton 2009-----
- //added by menghu for SODC_5143,12/12/2006
String sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH);
sColumnWidth.SearchAndReplace( DEFINE_CONST_UNICODE("%1"), sIndex );
pFieldArr[i]->SetAccessibleName( sColumnWidth );
- //end of SODC_5143
//-----IAccessibility2 Impplementaton 2009
}
diff --git a/sw/source/ui/table/tabledlg.hrc b/sw/source/ui/table/tabledlg.hrc
index c0fe76d8f9a0..2c063603ce76 100644
--- a/sw/source/ui/table/tabledlg.hrc
+++ b/sw/source/ui/table/tabledlg.hrc
@@ -102,6 +102,9 @@
#define FL_VERT_ORIENT 140
#define RB_FROM_LEFT 144
+//IAccessibility2 Impplementaton 2009-----
+#define STR_COLUMN_WIDTH 145
+//-----IAccessibility2 Impplementaton 2009
#define FT_VERTORIENT 150
#define LB_VERTORIENT 151
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx
index cef5e2dc9820..039e5ae3249c 100644
--- a/sw/source/ui/uiview/formatclipboard.cxx
+++ b/sw/source/ui/uiview/formatclipboard.cxx
@@ -509,7 +509,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
// #144857# collect items from character style
lcl_AppendSetItems( aItemVector, aFmt.GetCharFmt()->GetAttrSet());
sal_uInt16 nFlags=0; //(nMode & KEY_SHIFT) ? SETATTR_DONTREPLACE : SETATTR_DEFAULT;
- rWrtShell.SetAttr( aFmt, nFlags );
+ rWrtShell.SetAttrItem( aFmt, nFlags );
}
}
if(m_aParaStyle.Len() && !bNoParagraphFormats )
@@ -550,7 +550,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
rWrtShell.SetFlyFrmAttr(*pTemplateItemSet);
else
{
- rWrtShell.SetAttr(*pTemplateItemSet);
+ rWrtShell.SetAttrSet(*pTemplateItemSet);
// additional numbering properties for paragraph styles
if( nSelectionType & nsSelectionType::SEL_TXT && rWrtShell.GetCurNumRule() )
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index b22d9c15ea3d..d4aceb94a396 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -238,8 +238,11 @@ SwPagePreViewWin::SwPagePreViewWin( Window *pParent, SwPagePreView& rPView )
SwPagePreViewWin::~SwPagePreViewWin()
{
- if( mpViewShell )
- delete mpViewShell;
+ //IAccessibility2 Implementation 2009-----
+ // Remove to the deconstruction of SwPagePreView.
+ //if( mpViewShell)
+ // delete mpViewShell;
+ //-----IAccessibility2 Implementation 2009
}
/*--------------------------------------------------------------------
@@ -714,46 +717,46 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
SwPagePreViewWin::MV_PAGE_UP :
SwPagePreViewWin::MV_PAGE_DOWN;
if ( ChgPage( eMvMode, sal_True ) )
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
else
{
SwTwips nScrollAmount;
sal_uInt16 nNewSelectedPageNum = 0;
- const sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
+ const sal_uInt16 nVisPages = pViewWin->GetRow() * pViewWin->GetCol();
if( _bPgUp )
{
if ( pPagePrevwLay->DoesPreviewLayoutRowsFitIntoWindow() )
{
nScrollAmount = pPagePrevwLay->GetWinPagesScrollAmount( -1 );
- if ( (aViewWin.SelectedPage() - nVisPages) > 0 )
- nNewSelectedPageNum = aViewWin.SelectedPage() - nVisPages;
+ if ( (pViewWin->SelectedPage() - nVisPages) > 0 )
+ nNewSelectedPageNum = pViewWin->SelectedPage() - nVisPages;
else
nNewSelectedPageNum = 1;
}
else
- nScrollAmount = - Min( aViewWin.GetOutputSize().Height(),
- aViewWin.GetPaintedPreviewDocRect().Top() );
+ nScrollAmount = - Min( pViewWin->GetOutputSize().Height(),
+ pViewWin->GetPaintedPreviewDocRect().Top() );
}
else
{
if ( pPagePrevwLay->DoesPreviewLayoutRowsFitIntoWindow() )
{
nScrollAmount = pPagePrevwLay->GetWinPagesScrollAmount( 1 );
- if ( (aViewWin.SelectedPage() + nVisPages) <= mnPageCount )
- nNewSelectedPageNum = aViewWin.SelectedPage() + nVisPages;
+ if ( (pViewWin->SelectedPage() + nVisPages) <= mnPageCount )
+ nNewSelectedPageNum = pViewWin->SelectedPage() + nVisPages;
else
nNewSelectedPageNum = mnPageCount;
}
else
- nScrollAmount = Min( aViewWin.GetOutputSize().Height(),
+ nScrollAmount = Min( pViewWin->GetOutputSize().Height(),
( pPagePrevwLay->GetPrevwDocSize().Height() -
- aViewWin.GetPaintedPreviewDocRect().Bottom() ) );
+ pViewWin->GetPaintedPreviewDocRect().Bottom() ) );
}
- aViewWin.Scroll( 0, nScrollAmount );
+ pViewWin->Scroll( 0, nScrollAmount );
if ( nNewSelectedPageNum != 0 )
{
- aViewWin.SetSelectedPage( nNewSelectedPageNum );
+ pViewWin->SetSelectedPage( nNewSelectedPageNum );
}
ScrollViewSzChg();
// OD 24.03.2003 #108282# - additional invalidate page status.
@@ -764,7 +767,7 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
};
SfxBindings& rBindings = GetViewFrame()->GetBindings();
rBindings.Invalidate( aInval );
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
}
@@ -799,11 +802,11 @@ void SwPagePreView::Execute( SfxRequest &rReq )
SID_ATTR_TABLE_COLUMN)).GetValue();
sal_uInt8 nRows = (sal_uInt8)((SfxUInt16Item &)pArgs->Get(
SID_ATTR_TABLE_ROW)).GetValue();
- aViewWin.CalcWish( nRows, nCols );
+ pViewWin->CalcWish( nRows, nCols );
}
else
- SwPreViewZoomDlg( aViewWin ).Execute();
+ SwPreViewZoomDlg( *pViewWin ).Execute();
}
break;
@@ -818,7 +821,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
( ( SwViewOption* ) GetViewShell()->GetViewOptions() )->SetPagePrevBookview( bBookPreview );
// cast is not gentleman like, but it's common use in writer and in this case
}
- if ( aViewWin.SetBookPreviewMode( bBookPreview ) )
+ if ( pViewWin->SetBookPreviewMode( bBookPreview ) )
{
// book preview mode changed. Thus, adjust scrollbars and
// invalidate corresponding states.
@@ -830,13 +833,13 @@ void SwPagePreView::Execute( SfxRequest &rReq )
};
SfxBindings& rBindings = GetViewFrame()->GetBindings();
rBindings.Invalidate( aInval );
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
}
break;
case FN_SHOW_TWO_PAGES:
- aViewWin.CalcWish( nRow, 2 );
+ pViewWin->CalcWish( nRow, 2 );
break;
case FN_PREVIEW_ZOOM:
@@ -930,7 +933,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
}
pPagePrevwLay->CalcStartValuesForSelectedPageMove( nHoriMove, nVertMove,
nNewSelectedPage, nNewStartPage, aNewStartPos );
- if ( aViewWin.SelectedPage() != nNewSelectedPage )
+ if ( pViewWin->SelectedPage() != nNewSelectedPage )
{
if ( pPagePrevwLay->IsPageVisible( nNewSelectedPage ) )
{
@@ -941,8 +944,8 @@ void SwPagePreView::Execute( SfxRequest &rReq )
}
else
{
- aViewWin.SetSelectedPage( nNewSelectedPage );
- aViewWin.SetSttPage( nNewStartPage );
+ pViewWin->SetSelectedPage( nNewSelectedPage );
+ pViewWin->SetSttPage( nNewStartPage );
int nRet = ChgPage( SwPagePreViewWin::MV_SELPAGE, sal_True );
bRefresh = 0 != nRet;
}
@@ -970,11 +973,11 @@ void SwPagePreView::Execute( SfxRequest &rReq )
}
case FN_START_OF_LINE:
case FN_START_OF_DOCUMENT:
- aViewWin.SetSelectedPage( 1 );
+ pViewWin->SetSelectedPage( 1 );
eMvMode = SwPagePreViewWin::MV_DOC_STT; bRetVal = sal_True; goto MOVEPAGE;
case FN_END_OF_LINE:
case FN_END_OF_DOCUMENT:
- aViewWin.SetSelectedPage( mnPageCount );
+ pViewWin->SetSelectedPage( mnPageCount );
eMvMode = SwPagePreViewWin::MV_DOC_END; bRetVal = sal_True; goto MOVEPAGE;
MOVEPAGE:
{
@@ -990,7 +993,7 @@ MOVEPAGE:
case FN_PRINT_PAGEPREVIEW:
{
- const SwPagePreViewPrtData* pPPVPD = aViewWin.GetViewShell()->GetDoc()->GetPreViewPrtData();
+ const SwPagePreViewPrtData* pPPVPD = pViewWin->GetViewShell()->GetDoc()->GetPreViewPrtData();
// die Sache mit der Orientation
if(pPPVPD)
{
@@ -999,7 +1002,7 @@ MOVEPAGE:
!= pPPVPD->GetLandscape())
pPrinter->SetOrientation(pPPVPD->GetLandscape() ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT);
}
- ::SetAppPrintOptions( aViewWin.GetViewShell(), sal_False );
+ ::SetAppPrintOptions( pViewWin->GetViewShell(), sal_False );
bNormalPrint = sal_False;
sal_uInt16 nPrtSlot = SID_PRINTDOC;
rReq.SetSlot( nPrtSlot );
@@ -1009,7 +1012,7 @@ MOVEPAGE:
}
case SID_PRINTDOCDIRECT:
case SID_PRINTDOC:
- ::SetAppPrintOptions( aViewWin.GetViewShell(), sal_False );
+ ::SetAppPrintOptions( pViewWin->GetViewShell(), sal_False );
bNormalPrint = sal_True;
SfxViewShell::ExecuteSlot( rReq, SfxViewShell::GetInterface() );
return;
@@ -1022,7 +1025,7 @@ MOVEPAGE:
break;
case FN_INSERT_BREAK:
{
- sal_uInt16 nSelPage = aViewWin.SelectedPage();
+ sal_uInt16 nSelPage = pViewWin->SelectedPage();
//if a dummy page is selected (e.g. a non-existing right/left page)
//the direct neighbor is used
if(GetViewShell()->IsDummyPage( nSelPage ) && GetViewShell()->IsDummyPage( --nSelPage ))
@@ -1039,7 +1042,7 @@ MOVEPAGE:
}
if( bRefresh )
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
/*--------------------------------------------------------------------
@@ -1094,7 +1097,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
case FN_STAT_PAGE:
{
String aStr( sPageStr );
- aViewWin.GetStatusStr( aStr, mnPageCount );
+ pViewWin->GetStatusStr( aStr, mnPageCount );
rSet.Put( SfxStringItem( nWhich, aStr) );
}
break;
@@ -1166,7 +1169,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
break;
case FN_SHOW_TWO_PAGES:
- if( 2 == aViewWin.GetCol() && nRow == aViewWin.GetRow() )
+ if( 2 == pViewWin->GetCol() && nRow == pViewWin->GetRow() )
rSet.DisableItem( nWhich );
break;
@@ -1292,7 +1295,7 @@ void SwPagePreView::Init(const SwViewOption * pPrefs)
SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
SfxViewShell( pViewFrame, SWVIEWFLAGS ),
- aViewWin( &pViewFrame->GetWindow(), *this ),
+ pViewWin( new SwPagePreViewWin(&(GetViewFrame())->GetWindow(), *this ) ),//IAccessibility2 Implementation 2009
nNewPage(USHRT_MAX),
pHScrollbar(0),
pVScrollbar(0),
@@ -1306,7 +1309,7 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
mbFormDesignModeToReset( false )
{
SetName(String::CreateFromAscii("PageView" ));
- SetWindow( &aViewWin );
+ SetWindow( pViewWin );
SetHelpId(SW_PAGEPREVIEW);
_CreateScrollbar( sal_True );
_CreateScrollbar( sal_False );
@@ -1341,9 +1344,9 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
// setze die akt. Seite als die erste
sal_uInt16 nPhysPg, nVirtPg;
((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, /*sal_False*/sal_True, sal_False );
- if( 1 != aViewWin.GetCol() && 1 == nPhysPg )
+ if( 1 != pViewWin->GetCol() && 1 == nPhysPg )
--nPhysPg;
- aViewWin.SetSttPage( nPhysPg );
+ pViewWin->SetSttPage( nPhysPg );
}
}
@@ -1356,13 +1359,13 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
}
if( pVS )
- pNew = new ViewShell( *pVS, &aViewWin, 0, VSHELLFLAG_ISPREVIEW );
+ pNew = new ViewShell( *pVS, pViewWin, 0, VSHELLFLAG_ISPREVIEW );
else
pNew = new ViewShell(
*((SwDocShell*)pViewFrame->GetObjectShell())->GetDoc(),
- &aViewWin, 0, 0, VSHELLFLAG_ISPREVIEW );
+ pViewWin, 0, 0, VSHELLFLAG_ISPREVIEW );
- aViewWin.SetViewShell( pNew );
+ pViewWin->SetViewShell( pNew );
pNew->SetSfxViewShell( this );
Init();
}
@@ -1376,6 +1379,15 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
SwPagePreView::~SwPagePreView()
{
SetWindow( 0 );
+ //IAccessibility2 Implementation 2009-----
+ ViewShell* pVShell = pViewWin->GetViewShell();
+ pVShell->SetWin(0);
+ //pViewWin->Hide();
+ if( pVShell)
+ delete pVShell;
+ delete pViewWin;
+ //pViewWin->Hide();
+ //-----IAccessibility2 Implementation 2009
delete pScrollFill;
delete pHScrollbar;
@@ -1474,17 +1486,17 @@ IMPL_LINK_INLINE_END( SwPagePreView, BtnPage, Button *, pButton )
int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
{
- Rectangle aPixVisArea( aViewWin.LogicToPixel( aVisArea ) );
- int bChg = aViewWin.MovePage( eMvMode ) ||
+ Rectangle aPixVisArea( pViewWin->LogicToPixel( aVisArea ) );
+ int bChg = pViewWin->MovePage( eMvMode ) ||
eMvMode == SwPagePreViewWin::MV_CALC ||
eMvMode == SwPagePreViewWin::MV_NEWWINSIZE;
- aVisArea = aViewWin.PixelToLogic( aPixVisArea );
+ aVisArea = pViewWin->PixelToLogic( aPixVisArea );
if( bChg )
{
// Statusleiste updaten
String aStr( sPageStr );
- aViewWin.GetStatusStr( aStr, mnPageCount );
+ pViewWin->GetStatusStr( aStr, mnPageCount );
SfxBindings& rBindings = GetViewFrame()->GetBindings();
if( bUpdateScrollbar )
@@ -1516,7 +1528,7 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ )
{
// const long nAdd = bInner ? 0 : ScrollBar::GetWindowOverlapPixel();
- const StyleSettings &rSet = aViewWin.GetSettings().GetStyleSettings();
+ const StyleSettings &rSet = pViewWin->GetSettings().GetStyleSettings();
const long nTmp = rSet.GetScrollBarSize();// - nAdd;
if ( pVScrollbar->IsVisible( sal_False ))
rToFill.Right() = nTmp;
@@ -1536,8 +1548,8 @@ void SwPagePreView::InnerResizePixel( const Point &rOfst, const Size &rSize )
CalcAndSetBorderPixel( aBorder, sal_True );
Rectangle aRect( rOfst, rSize );
aRect += aBorder;
- ViewResizePixel( aViewWin, aRect.TopLeft(), aRect.GetSize(),
- aViewWin.GetOutputSizePixel(),
+ ViewResizePixel( *pViewWin, aRect.TopLeft(), aRect.GetSize(),
+ pViewWin->GetOutputSizePixel(),
sal_True,
*pVScrollbar, *pHScrollbar, pPageUpBtn, pPageDownBtn, 0,
*pScrollFill );
@@ -1555,14 +1567,14 @@ void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize )
{
SvBorder aBorder;
CalcAndSetBorderPixel( aBorder, sal_False );
- ViewResizePixel( aViewWin, rOfst, rSize, aViewWin.GetOutputSizePixel(),
+ ViewResizePixel( *pViewWin, rOfst, rSize, pViewWin->GetOutputSizePixel(),
sal_False, *pVScrollbar,
*pHScrollbar, pPageUpBtn, pPageDownBtn, 0, *pScrollFill );
//EditWin niemals einstellen!
- Size aTmpSize( aViewWin.GetOutputSizePixel() );
- Point aBottomRight( aViewWin.PixelToLogic( Point( aTmpSize.Width(), aTmpSize.Height() ) ) );
+ Size aTmpSize( pViewWin->GetOutputSizePixel() );
+ Point aBottomRight( pViewWin->PixelToLogic( Point( aTmpSize.Width(), aTmpSize.Height() ) ) );
SetVisArea( Rectangle( Point(), aBottomRight ) );
//Aufruf der DocSzChgd-Methode der Scrollbars ist noetig, da vom maximalen
@@ -1617,15 +1629,15 @@ void SwPagePreView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollba
//denn dann wir nicht wirklich gepaintet sondern die Rechtecke werden
//lediglich (in Dokumentkoordinaten) vorgemerkt.
if( GetViewShell()->ActionPend() )
- aViewWin.Update();
+ pViewWin->Update();
// setze am View-Win die aktuelle Size
aVisArea = aLR;
- aViewWin.SetWinSize( aLR.GetSize() );
+ pViewWin->SetWinSize( aLR.GetSize() );
// OD 18.12.2002 #103492# - use new mode
ChgPage( SwPagePreViewWin::MV_NEWWINSIZE, bUpdateScrollbar );
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
/*--------------------------------------------------------------------
@@ -1645,7 +1657,7 @@ IMPL_LINK( SwPagePreView, ScrollHdl, SwScrollbar *, pScrollbar )
// wieviele Seiten scrollen ??
String sStateStr(sPageStr);
sal_uInt16 nThmbPos = (sal_uInt16)pScrollbar->GetThumbPos();
- if( 1 == aViewWin.GetCol() || !nThmbPos )
+ if( 1 == pViewWin->GetCol() || !nThmbPos )
++nThmbPos;
sStateStr += String::CreateFromInt32( nThmbPos );
Point aPos = pScrollbar->GetParent()->OutputToScreenPixel(
@@ -1689,7 +1701,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
// wieviele Seiten scrollen ??
sal_uInt16 nThmbPos = (sal_uInt16)pScrollbar->GetThumbPos();
// OD 05.12.2002 #103492# - adjust to new preview functionality
- if( nThmbPos != aViewWin.SelectedPage() )
+ if( nThmbPos != pViewWin->SelectedPage() )
{
// OD 17.01.2003 #103492# - consider case that page <nThmbPos>
// is already visible
@@ -1706,8 +1718,8 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
// fit or not.
if ( !pPagePrevwLay->DoesPreviewLayoutColsFitIntoWindow() )
{
- aViewWin.SetSttPage( nThmbPos );
- aViewWin.SetSelectedPage( nThmbPos );
+ pViewWin->SetSttPage( nThmbPos );
+ pViewWin->SetSelectedPage( nThmbPos );
ChgPage( SwPagePreViewWin::MV_SCROLL, sal_False );
// OD 20.01.2003 #103492# - update scrollbars
ScrollViewSzChg();
@@ -1715,16 +1727,16 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
else
{
// OD 04.03.2003 #107369# - correct scroll amount
- const sal_Int16 nPageDiff = nThmbPos - aViewWin.SelectedPage();
- const sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
+ const sal_Int16 nPageDiff = nThmbPos - pViewWin->SelectedPage();
+ const sal_uInt16 nVisPages = pViewWin->GetRow() * pViewWin->GetCol();
sal_Int16 nWinPagesToScroll = nPageDiff / nVisPages;
if ( nPageDiff % nVisPages )
{
// decrease/increase number of preview pages to scroll
nPageDiff < 0 ? --nWinPagesToScroll : ++nWinPagesToScroll;
}
- aViewWin.SetSelectedPage( nThmbPos );
- aViewWin.Scroll( 0, pPagePrevwLay->GetWinPagesScrollAmount( nWinPagesToScroll ) );
+ pViewWin->SetSelectedPage( nThmbPos );
+ pViewWin->Scroll( 0, pPagePrevwLay->GetWinPagesScrollAmount( nWinPagesToScroll ) );
}
}
// OD 17.01.2003 #103492# - update accessibility
@@ -1739,13 +1751,13 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
else
{
long nThmbPos = pScrollbar->GetThumbPos();
- aViewWin.Scroll(0, nThmbPos - aViewWin.GetPaintedPreviewDocRect().Top());
+ pViewWin->Scroll(0, nThmbPos - pViewWin->GetPaintedPreviewDocRect().Top());
}
}
else
{
long nThmbPos = pScrollbar->GetThumbPos();
- aViewWin.Scroll(nThmbPos - aViewWin.GetPaintedPreviewDocRect().Left(), 0);
+ pViewWin->Scroll(nThmbPos - pViewWin->GetPaintedPreviewDocRect().Left(), 0);
}
// OD 24.03.2003 #108282# - additional invalidate page status.
static sal_uInt16 __READONLY_DATA aInval[] =
@@ -1758,7 +1770,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
// OD 04.03.2003 #107369# - control invalidation of window
if ( bInvalidateWin )
{
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
return 0;
}
@@ -1769,7 +1781,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
Point SwPagePreView::AlignToPixel(const Point &rPt) const
{
- return aViewWin.PixelToLogic( aViewWin.LogicToPixel( rPt ) );
+ return pViewWin->PixelToLogic( pViewWin->LogicToPixel( rPt ) );
}
/*--------------------------------------------------------------------
@@ -1794,7 +1806,7 @@ void SwPagePreView::DocSzChgd( const Size &rSz )
ChgPage( SwPagePreViewWin::MV_CALC, sal_True );
ScrollDocSzChg();
- aViewWin.Invalidate();
+ pViewWin->Invalidate();
}
// <--
}
@@ -1814,20 +1826,20 @@ void SwPagePreView::ScrollViewSzChg()
{
//vertical scrolling by row
// OD 04.12.2002 #103492# - adjust to new preview functionality
- sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
+ sal_uInt16 nVisPages = pViewWin->GetRow() * pViewWin->GetCol();
pVScrollbar->SetVisibleSize( nVisPages );
// OD 19.02.2003 #107369# - set selected page as scroll bar position,
// if it is visible.
SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout();
- if ( pPagePrevwLay->IsPageVisible( aViewWin.SelectedPage() ) )
+ if ( pPagePrevwLay->IsPageVisible( pViewWin->SelectedPage() ) )
{
- pVScrollbar->SetThumbPos( aViewWin.SelectedPage() );
+ pVScrollbar->SetThumbPos( pViewWin->SelectedPage() );
}
else
{
- pVScrollbar->SetThumbPos( aViewWin.GetSttPage() );
+ pVScrollbar->SetThumbPos( pViewWin->GetSttPage() );
}
- pVScrollbar->SetLineSize( aViewWin.GetCol() );
+ pVScrollbar->SetLineSize( pViewWin->GetCol() );
pVScrollbar->SetPageSize( nVisPages );
// calculate and set scrollbar range
Range aScrollbarRange( 1, mnPageCount );
@@ -1839,7 +1851,7 @@ void SwPagePreView::ScrollViewSzChg()
}
else //vertical scrolling by pixel
{
- const Rectangle& rDocRect = aViewWin.GetPaintedPreviewDocRect();
+ const Rectangle& rDocRect = pViewWin->GetPaintedPreviewDocRect();
const Size& rPreviewSize =
GetViewShell()->PagePreviewLayout()->GetPrevwDocSize();
pVScrollbar->SetRangeMax(rPreviewSize.Height()) ;
@@ -1852,7 +1864,7 @@ void SwPagePreView::ScrollViewSzChg()
}
if(pHScrollbar)
{
- const Rectangle& rDocRect = aViewWin.GetPaintedPreviewDocRect();
+ const Rectangle& rDocRect = pViewWin->GetPaintedPreviewDocRect();
const Size& rPreviewSize =
GetViewShell()->PagePreviewLayout()->GetPrevwDocSize();
long nVisWidth = 0;
@@ -1894,7 +1906,7 @@ void SwPagePreView::ScrollDocSzChg()
SfxPrinter* SwPagePreView::GetPrinter( sal_Bool bCreate )
{
- return aViewWin.GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate );
+ return pViewWin->GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate );
}
/*--------------------------------------------------------------------
@@ -1932,7 +1944,7 @@ sal_uInt16 SwPagePreView::SetPrinter( SfxPrinter *pNew, sal_uInt16 nDiffFlags,
rSh.ChgAllPageSize( aSz );
}
if( !bNormalPrint )
- aViewWin.CalcWish( aViewWin.GetRow(), aViewWin.GetCol() );
+ pViewWin->CalcWish( pViewWin->GetRow(), pViewWin->GetCol() );
rESh.SetModified();
rESh.EndAllAction();
@@ -2065,7 +2077,10 @@ sal_Bool SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
const CommandWheelData* pWData = rCEvt.GetWheelData();
if( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() )
{
- if(!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport())
+ //IAccessibility2 Implementation 2009-----, only the Preference shouldn't control the Zoom, it is better to detect AT tools running. So the bridge can be used here
+ //if(!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport())
+ if ( !Application::IsAccessibilityEnabled() )
+ //-----IAccessibility2 Implementation 2009
{
sal_uInt16 nFactor = GetViewShell()->GetViewOptions()->GetZoom();
const sal_uInt16 nOffset = 10;
@@ -2086,7 +2101,7 @@ sal_Bool SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
bOk = sal_True;
}
else
- bOk = aViewWin.HandleScrollCommand( rCEvt, pHScrollbar, pVScrollbar );
+ bOk = pViewWin->HandleScrollCommand( rCEvt, pHScrollbar, pVScrollbar );
return bOk;
}
@@ -2098,8 +2113,37 @@ uno::Reference< ::com::sun::star::accessibility::XAccessible >
// happend already!!!
DBG_ASSERT( GetViewShell() != NULL, "We need a view shell" );
- return GetViewShell()->CreateAccessiblePreview();
+ //IAccessibility2 Implementation 2009-----
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc = GetAccessible( sal_False );
+ if (xAcc.is())
+ {
+ return xAcc;
+ }
+ if (mpViewShell)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAccPreview = mpViewShell->CreateAccessiblePreview();
+ SetAccessible(xAccPreview);
+ }
+ return GetAccessible( sal_False );
+ //-----IAccessibility2 Implementation 2009
+}
+//IAccessibility2 Implementation 2009-----
+// MT: Removed Windows::SwitchView() introduced with IA2 CWS.
+// There are other notifications for this when the active view has chnaged, so please update the code to use that event mechanism
+void SwPagePreViewWin::SwitchView()
+{
+#ifdef ACCESSIBLE_LAYOUT
+ if (!Application::IsAccessibilityEnabled())
+ {
+ return ;
+ }
+ if (mpViewShell)
+ {
+ mpViewShell->InvalidateAccessibleFocus();
+ }
+#endif
}
+//-----IAccessibility2 Implementation 2009
/* -----------------------------06.05.2002 13:18------------------------------
@@ -2143,7 +2187,7 @@ void SwPagePreView::SetZoom(SvxZoomType eType, sal_uInt16 nFactor)
lcl_InvalidateZoomSlots(GetViewFrame()->GetBindings());
// OD 02.12.2002 #103492#
// OD 24.09.2003 #i19975# - also consider zoom type
- aViewWin.AdjustPreviewToNewZoom( nFactor, eType );
+ pViewWin->AdjustPreviewToNewZoom( nFactor, eType );
ScrollViewSzChg();
}
}
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 7d30dbd7a04d..279623663b09 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -540,23 +540,6 @@ IMPL_LINK( SwView, AttrChangedNotify, SwWrtShell *, EMPTYARG )
//#i6193#, change ui if cursor is at a SwPostItField
if (mpPostItMgr)
{
- // --> OD 2008-06-19 #i90516#
- // only perform the code that is needed to determine, if at the
- // actual cursor position is a post-it field
-// SwRect aFldRect;
-// SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD);
-// if( pWrtShell->GetContentAtPos( pWrtShell->GetCrsrDocPos(), aCntntAtPos, sal_False, &aFldRect ) )
-// {
-// const SwField* pFld = aCntntAtPos.aFnd.pFld;
-// if (pFld->Which()== RES_POSTITFLD)
-// {
-// mpPostItMgr->SetShadowState(reinterpret_cast<const SwPostItField*>(pFld));
-// }
-// else
-// mpPostItMgr->SetShadowState(0);
-// }
-// else
-// mpPostItMgr->SetShadowState(0);
mpPostItMgr->SetShadowState( pWrtShell->GetPostItFieldAtCursor() );
}
@@ -780,6 +763,9 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
nFormSfxId( USHRT_MAX ),
nLastPasteDestination( 0xFFFF ),
nLeftBorderDistance( 0 ),
+ //IAccessibility2 Implementation 2009-----
+ nOldPageNum(0),
+ //-----IAccessibility2 Implementation 2009
nRightBorderDistance( 0 ),
bInMailMerge(sal_False),
bInDtor(sal_False),
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 96caa859f11a..fa4163e68e17 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -766,7 +766,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
case SID_ATTR_BORDER_OUTER:
case SID_ATTR_BORDER_SHADOW:
if(pArgs)
- pWrtShell->SetAttr(*pArgs);
+ pWrtShell->SetAttrSet(*pArgs);
break;
case SID_ATTR_PAGE:
@@ -1179,6 +1179,32 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
SfxWhichIter aIter( rSet );
sal_uInt16 nWhich = aIter.FirstWhich();
ASSERT( nWhich, "leeres Set");
+ //IAccessibility2 Implementation 2009-----
+ if (Application::IsAccessibilityEnabled())
+ {
+ //get section chang event
+ const SwSection* CurrSect = rShell.GetCurrSection();
+ if( CurrSect )
+ {
+ String sCurrentSectionName = CurrSect->GetSectionName();
+ if(sCurrentSectionName != nOldSectionName)
+ {
+ rShell.FireSectionChangeEvent(2, 1);
+ }
+ nOldSectionName = sCurrentSectionName;
+ }
+ else if ( !(nOldSectionName.Equals(String())) )
+ {
+ rShell.FireSectionChangeEvent(2, 1);
+ nOldSectionName = String();
+ }
+ //get column change event
+ if(rShell.bColumnChange())
+ {
+ rShell.FireColumnChangeEvent(2, 1);
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
while( nWhich )
{
@@ -1192,7 +1218,15 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
rShell.GetPageNumber( -1, rShell.IsCrsrVisible(), nPage, nLogPage, sDisplay );
rSet.Put( SfxStringItem( FN_STAT_PAGE,
GetPageStr( nPage, nLogPage, sDisplay) ));
-
+ //IAccessibility2 Implementation 2009-----
+ //if existing page number is not equal to old page number, send out this event.
+ if (nOldPageNum != nLogPage )
+ {
+ if (nOldPageNum != 0)
+ rShell.FirePageChangeEvent(nOldPageNum, nLogPage);
+ nOldPageNum = nLogPage;
+ }
+ //-----IAccessibility2 Implementation 2009
sal_uInt16 nCnt = GetWrtShell().GetPageCnt();
if (nPageCnt != nCnt) // Basic benachrichtigen
{
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 375409273674..f5d2d7b53f30 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -379,7 +379,7 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
{
if ( !pbNext )
return 0;
- bool bNext = *pbNext;
+ const bool bNext = *pbNext;
SwWrtShell& rSh = pThis->GetWrtShell();
switch( nMoveType )
{
@@ -482,19 +482,21 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
}
}
break;
+
case NID_POSTIT:
- {
- sw::sidebarwindows::SwSidebarWin* pPostIt = pThis->GetPostItMgr()->GetActiveSidebarWin();
- if (pPostIt)
- pThis->GetPostItMgr()->SetActiveSidebarWin(0);
- SwFieldType* pFldType = rSh.GetFldType(0, RES_POSTITFLD);
- if (rSh.MoveFldType(pFldType, bNext))
- pThis->GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
- else
- //first/last item
- pThis->GetPostItMgr()->SetActiveSidebarWin(pPostIt);
- }
- break;
+ {
+ sw::sidebarwindows::SwSidebarWin* pPostIt = pThis->GetPostItMgr()->GetActiveSidebarWin();
+ if (pPostIt)
+ pThis->GetPostItMgr()->SetActiveSidebarWin(0);
+ SwFieldType* pFldType = rSh.GetFldType(0, RES_POSTITFLD);
+ if ( rSh.MoveFldType( pFldType, bNext ) )
+ pThis->GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
+ else
+ //first/last item
+ pThis->GetPostItMgr()->SetActiveSidebarWin(pPostIt);
+ }
+ break;
+
case NID_SRCH_REP:
if(pSrchItem)
{
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index c575f5464be3..8cf536b20c02 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -213,6 +213,19 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
if( bRet )
Scroll(pWrtShell->GetCharRect().SVRect());
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
+ //IAccessibility2 Implementation 2009-----
+ if ( Application::IsAccessibilityEnabled() )
+ {
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
+ SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
+ if ( pWrp )
+ {
+ pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
+ pSrchDlg->SetDocWin( (Window*)pEditWin );
+ pSrchDlg->SetSrchFlag();
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
}
break;
case SVX_SEARCHCMD_FIND_ALL:
@@ -228,6 +241,20 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
bFound = sal_False;
}
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
+ //IAccessibility2 Implementation 2009-----
+ if ( Application::IsAccessibilityEnabled() )
+ {
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
+ SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
+
+ if ( pWrp )
+ {
+ pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
+ pSrchDlg->SetDocWin( (Window*)pEditWin );
+ pSrchDlg->SetSrchFlag();
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
}
break;
case SVX_SEARCHCMD_REPLACE:
@@ -279,6 +306,19 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
pSrchItem->SetCommand( nOldCmd );
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
}
+ //IAccessibility2 Implementation 2009-----
+ {
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
+ SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
+
+ if ( pWrp )
+ {
+ pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
+ pSrchDlg->SetDocWin( (Window*)pEditWin );
+ pSrchDlg->SetSrchFlag();
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
break;
case SVX_SEARCHCMD_REPLACE_ALL:
@@ -328,6 +368,17 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
InfoBox( pParentWindow, aText ).Execute();
}
}
+ //IAccessibility2 Implementation 2009-----
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
+ SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
+
+ if ( pWrp )
+ {
+ pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
+ pSrchDlg->SetDocWin( (Window*)pEditWin );
+ pSrchDlg->SetSrchFlag();
+ }
+ //-----IAccessibility2 Implementation 2009
break;
}
@@ -597,7 +648,7 @@ void SwView::Replace()
if( pReplList->Get( aReplSet ).Count() )
{
::SfxToSwPageDescAttr( *pWrtShell, aReplSet );
- pWrtShell->SwEditShell::SetAttr( aReplSet );
+ pWrtShell->SwEditShell::SetAttrSet( aReplSet );
}
}
}
diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx
index 0ece69ed26d5..aee1ca50f096 100644
--- a/sw/source/ui/uiview/viewstat.cxx
+++ b/sw/source/ui/uiview/viewstat.cxx
@@ -81,31 +81,39 @@ void SwView::GetState(SfxItemSet &rSet)
{
switch(nWhich)
{
- case FN_EDIT_LINK_DLG:
- if( !pWrtShell->GetLinkManager().GetLinks().Count() )
- rSet.DisableItem(nWhich);
- else if( pWrtShell->IsSelFrmMode() &&
- pWrtShell->IsSelObjProtected(FLYPROTECT_CONTENT))
- rSet.DisableItem(nWhich);
- break;
+ case FN_EDIT_LINK_DLG:
+ if( !pWrtShell->GetLinkManager().GetLinks().Count() )
+ rSet.DisableItem(nWhich);
+ else if( pWrtShell->IsSelFrmMode() &&
+ pWrtShell->IsSelObjProtected(FLYPROTECT_CONTENT))
+ rSet.DisableItem(nWhich);
+ break;
- case FN_INSERT_CAPTION:
+ case SID_INSERT_GRAPHIC:
+ if( pWrtShell->CrsrInsideInputFld() )
{
- // Captions gibt's fuer Grafiken, OLE-Objekte, Rahmen und Tabellen
- if( !bGetFrmType )
- eFrmType = pWrtShell->GetFrmType(0,sal_True), bGetFrmType = sal_True;
- if (! ( ((eFrmType & FRMTYPE_FLY_ANY) && nSelectionType != nsSelectionType::SEL_DRW_TXT)||
+ rSet.DisableItem(nWhich);
+ }
+ break;
+
+ case FN_INSERT_CAPTION:
+ {
+ // Captions gibt's fuer Grafiken, OLE-Objekte, Rahmen und Tabellen
+ if( !bGetFrmType )
+ eFrmType = pWrtShell->GetFrmType(0,sal_True), bGetFrmType = sal_True;
+ if (! ( ((eFrmType & FRMTYPE_FLY_ANY) && nSelectionType != nsSelectionType::SEL_DRW_TXT)||
nSelectionType & nsSelectionType::SEL_TBL ||
nSelectionType & nsSelectionType::SEL_DRW) )
- rSet.DisableItem(nWhich);
- else if((pWrtShell->IsObjSelected()||pWrtShell->IsFrmSelected()) &&
+ rSet.DisableItem(nWhich);
+ else if((pWrtShell->IsObjSelected()||pWrtShell->IsFrmSelected()) &&
(pWrtShell->IsSelObjProtected( FLYPROTECT_PARENT)||
- pWrtShell->IsSelObjProtected( FLYPROTECT_CONTENT )))
- rSet.DisableItem(nWhich);
- else if( pWrtShell->IsTableMode() )
- rSet.DisableItem(nWhich);
- }
- break;
+ pWrtShell->IsSelObjProtected( FLYPROTECT_CONTENT )))
+ rSet.DisableItem(nWhich);
+ else if( pWrtShell->IsTableMode()
+ || pWrtShell->CrsrInsideInputFld() )
+ rSet.DisableItem(nWhich);
+ }
+ break;
case FN_EDIT_FOOTNOTE:
{
@@ -184,24 +192,29 @@ void SwView::GetState(SfxItemSet &rSet)
rSet.Put(aImgItem);
}
break;
+
case FN_INSERT_OBJ_CTRL:
- if(bWeb)
- rSet.DisableItem(nWhich);
- else
- {
- SfxImageItem aImgItem(nWhich, SwView::nInsertObjectCtrlState);
- SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( GetViewFrame() );
- const SfxSlot* pSlot = rPool.GetSlot( aImgItem.GetValue() );
- if(pSlot && pSlot->IsMode( SFX_SLOT_IMAGEROTATION ))
+ if( bWeb
+ || pWrtShell->CrsrInsideInputFld() )
{
- if(pWrtShell->IsInVerticalText())
- aImgItem.SetRotation(2700);
- if(pWrtShell->IsInRightToLeftText())
- aImgItem.SetMirrored(sal_True);
+ rSet.DisableItem(nWhich);
}
- rSet.Put(aImgItem);
- }
- break;
+ else
+ {
+ SfxImageItem aImgItem(nWhich, SwView::nInsertObjectCtrlState);
+ SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( GetViewFrame() );
+ const SfxSlot* pSlot = rPool.GetSlot( aImgItem.GetValue() );
+ if(pSlot && pSlot->IsMode( SFX_SLOT_IMAGEROTATION ))
+ {
+ if(pWrtShell->IsInVerticalText())
+ aImgItem.SetRotation(2700);
+ if(pWrtShell->IsInRightToLeftText())
+ aImgItem.SetMirrored(sal_True);
+ }
+ rSet.Put(aImgItem);
+ }
+ break;
+
case FN_UPDATE_TOX:
if(!pWrtShell->GetTOXCount())
rSet.DisableItem(nWhich);
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index ec0be864e81d..db0f5d59b634 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -692,7 +692,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
rSh.AutoUpdatePara( pColl, aTmp );
}
else
- rSh.SetAttr( aTabStops );
+ rSh.SetAttrItem( aTabStops );
break;
}
@@ -750,7 +750,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
rSh.AutoUpdatePara( pColl, aSet);
}
else
- rSh.SetAttr( aParaMargin );
+ rSh.SetAttrItem( aParaMargin );
if ( aParaMargin.GetTxtFirstLineOfst() < 0 )
{
@@ -789,7 +789,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
rSh.AutoUpdatePara( pColl, aSetTmp );
}
else
- rSh.SetAttr( aTabStops );
+ rSh.SetAttrItem( aTabStops );
}
}
}
@@ -814,7 +814,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
rSh.AutoUpdatePara( pColl, aSet);
}
else
- rSh.SetAttr( aParaMargin );
+ rSh.SetAttrItem( aParaMargin );
}
break;
@@ -1076,7 +1076,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
RES_LR_SPACE, RES_UL_SPACE, 0 );
// get also the list level indent values merged as LR-SPACE item, if needed.
rSh.GetCurAttr( aCoreSet, true );
- SelectionType nSelType = rSh.GetSelectionType();
+ const SelectionType nSelType = rSh.GetSelectionType();
SfxWhichIter aIter( rSet );
sal_uInt16 nWhich = aIter.FirstWhich();
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 06bb93d8ab29..619639ec5098 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -85,7 +85,15 @@
#include <numrule.hxx>
#include <swundo.hxx>
#include <ndtxt.hxx>
+//IAccessibility2 Implementation 2009-----
+//#include <ndgrf.hxx>
+#include <fmtcntnt.hxx>
#include <PostItMgr.hxx>
+//#include <../../core/inc/flyfrm.hxx>
+//#include <../../core/inc/cntfrm.hxx>
+//#include <ndnotxt.hxx>
+//-----IAccessibility2 Implementation 2009
+//#include <postit.hxx>
#include <postithelper.hxx>
#include <redline.hxx>
#include <docary.hxx>
@@ -891,7 +899,8 @@ SwContentTree::SwContentTree(Window* pParent, const ResId& rResId) :
bIsLastReadOnly(sal_False),
bIsOutlineMoveable(sal_True),
bViewHasChanged(sal_False),
- bIsImageListInitialized(sal_False)
+ bIsImageListInitialized(sal_False),
+ bIsKeySpace(sal_False) //IAccessibility2 Implementation 2009
{
sal_uInt16 i;
@@ -928,6 +937,149 @@ SwContentTree::~SwContentTree()
bIsInDrag = sal_False;
}
+//IAccessibility2 Implementation 2009-----
+String SwContentTree::GetEntryAltText( SvLBoxEntry* pEntry ) const
+{
+ if( pEntry == NULL)
+ return String();
+
+ SwContent* pCnt = (SwContent*)pEntry->GetUserData();
+ if( pCnt == NULL || pCnt->GetParent() == NULL)
+ return String();
+
+ sal_uInt16 nJumpType = pCnt->GetParent()->GetType();
+ SdrObject* pTemp;
+
+ switch(nJumpType)
+ {
+ case CONTENT_TYPE_DRAWOBJECT:
+ {
+ SdrView* pDrawView = pActiveShell->GetDrawView();
+ if (pDrawView)
+ {
+ SdrModel* pDrawModel = pActiveShell->GetDoc()->GetDrawModel();
+ SdrPage* pPage = pDrawModel->GetPage(0);
+ const sal_uInt32 nCount = pPage->GetObjCount();
+ for( sal_uInt32 i=0; i< nCount; i++ )
+ {
+ pTemp = pPage->GetObj(i);
+ sal_uInt16 nCmpId(OBJ_NONE);
+ switch( pTemp->GetObjIdentifier() )
+ {
+ case OBJ_GRUP:
+ case OBJ_TEXT:
+ case OBJ_RECT:
+ case OBJ_CUSTOMSHAPE:
+ case OBJ_CIRC:
+ case OBJ_POLY:
+ case OBJ_CAPTION:
+ nCmpId = OBJ_GRUP;
+ break;
+ default:
+ nCmpId = pTemp->GetObjIdentifier();
+ }
+ if(nCmpId == OBJ_GRUP && pTemp->GetName() == pCnt->GetName())
+ {
+ return pTemp->GetTitle();
+ }
+ //Commented End
+ }
+ }
+ }
+ break;
+ case CONTENT_TYPE_GRAPHIC :
+ {
+ if( pActiveShell && pActiveShell->GetDoc() )
+ {
+ const SwFlyFrmFmt* pFrmFmt = pActiveShell->GetDoc()->FindFlyByName( pCnt->GetName(), 0);
+ if( pFrmFmt )
+ {
+// SwNodeIndex aIdx( *(pFrmFmt->GetCntnt().GetCntntIdx()), 1 );
+// const SwGrfNode* pGrfNd = aIdx.GetNode().GetGrfNode();
+// if( pGrfNd )
+// return pGrfNd->GetAlternateText();
+ return pFrmFmt->GetObjTitle();
+ }
+ }
+ }
+ break;
+ case CONTENT_TYPE_OLE :
+ case CONTENT_TYPE_FRAME :
+ {
+ //Can't find the GetAlternateText function. Need to verify again.
+ const SwFlyFrmFmt* pFlyFmt = pActiveShell->GetDoc()->FindFlyByName( pCnt->GetName(), 0);
+ if( pFlyFmt )
+ return pFlyFmt->/*GetAlternateText*/GetName();
+ }
+ break;
+ }
+ return String();
+}
+
+String SwContentTree::GetEntryLongDescription( SvLBoxEntry* pEntry ) const
+{
+ if( pEntry == NULL)
+ return String();
+
+ SwContent* pCnt = (SwContent*)pEntry->GetUserData();
+ if( pCnt == NULL || pCnt->GetParent() == NULL)
+ return String();
+
+ sal_uInt16 nJumpType = pCnt->GetParent()->GetType();
+ SdrObject* pTemp;
+
+ switch(nJumpType)
+ {
+ case CONTENT_TYPE_DRAWOBJECT:
+ {
+ SdrView* pDrawView = pActiveShell->GetDrawView();
+ if (pDrawView)
+ {
+ SdrModel* pDrawModel = pActiveShell->GetDoc()->GetDrawModel();
+ SdrPage* pPage = pDrawModel->GetPage(0);
+ sal_uInt32 nCount = pPage->GetObjCount();
+ for( sal_uInt32 i=0; i< nCount; i++ )
+ {
+ pTemp = pPage->GetObj(i);
+ sal_uInt16 nCmpId(OBJ_NONE);
+ switch( pTemp->GetObjIdentifier() )
+ {
+ case OBJ_GRUP:
+ case OBJ_TEXT:
+ case OBJ_RECT:
+ case OBJ_CUSTOMSHAPE:
+ case OBJ_CIRC:
+ case OBJ_POLY:
+ case OBJ_CAPTION:
+ nCmpId = OBJ_GRUP;
+ break;
+ default:
+ nCmpId = pTemp->GetObjIdentifier();
+ }
+ if(nCmpId == OBJ_GRUP && pTemp->GetName() == pCnt->GetName())
+ {
+ return pTemp->GetDescription();
+ }
+ //Commented End
+ }
+ }
+ }
+ break;
+ case CONTENT_TYPE_GRAPHIC :
+ case CONTENT_TYPE_OLE :
+ case CONTENT_TYPE_FRAME :
+ {
+ //Can't find the function "GetLongDescription". Need to verify again.
+ const SwFlyFrmFmt* pFlyFmt = pActiveShell->GetDoc()->FindFlyByName( pCnt->GetName(), 0);
+ if( pFlyFmt )
+ return pFlyFmt->GetDescription();
+ }
+ break;
+ }
+ return String();
+}
+
+//-----IAccessibility2 Implementation 2009
/***************************************************************************
Drag&Drop methods
***************************************************************************/
@@ -1211,10 +1363,27 @@ void SwContentTree::RequestingChilds( SvLBoxEntry* pParent )
String sEntry = pCnt->GetName();
if(!sEntry.Len())
sEntry = sSpace;
- InsertEntry(sEntry, pParent,
+ SvLBoxEntry* pChild = InsertEntry(sEntry, pParent,
sal_False, LIST_APPEND, (void*)pCnt);
+ //IAccessibility2 Implementation 2009-----
+ //Solution: If object is marked , the corresponding entry is set true ,
+ //else the corresponding entry is set false .
+ //==================================================
+ SdrObject * pObj = GetDrawingObjectsByContent(pCnt);
+ if(pChild)
+ pChild->SetMarked(sal_False);
+ if(pObj)
+ {
+ SdrView* pDrawView = pActiveShell->GetDrawView();
+ const bool Marked(pDrawView->isSdrObjectSelected(*pObj));
+ if(Marked)
+ {
+ //sEntry += String::CreateFromAscii(" *");
+ pChild->SetMarked(true);
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
}
-
}
}
}
@@ -1223,6 +1392,41 @@ void SwContentTree::RequestingChilds( SvLBoxEntry* pParent )
Beschreibung: Expand - Zustand fuer Inhaltstypen merken
***************************************************************************/
+//IAccessibility2 Implementation 2009-----
+//Solution: Get drawing Objects by content .
+SdrObject* SwContentTree::GetDrawingObjectsByContent(const SwContent *pCnt)
+{
+ SdrObject *pRetObj = NULL;
+ sal_uInt16 nJumpType = pCnt->GetParent()->GetType();
+ switch(nJumpType)
+ {
+ case CONTENT_TYPE_DRAWOBJECT:
+ {
+ SdrView* pDrawView = pActiveShell->GetDrawView();
+ if (pDrawView)
+ {
+ SdrModel* pDrawModel = pActiveShell->GetDoc()->GetDrawModel();
+ SdrPage* pPage = pDrawModel->GetPage(0);
+ sal_uInt32 nCount = pPage->GetObjCount();
+
+ for( sal_uInt32 i=0; i< nCount; i++ )
+ {
+ SdrObject* pTemp = pPage->GetObj(i);
+ if( pTemp->GetName() == pCnt->GetName())
+ {
+ pRetObj = pTemp;
+ break;
+ }
+ }
+ }
+ break;
+ }
+ default:
+ pRetObj = NULL;
+ }
+ return pRetObj;
+}
+//-----IAccessibility2 Implementation 2009
sal_Bool SwContentTree::Expand( SvLBoxEntry* pParent )
{
@@ -2222,6 +2426,15 @@ IMPL_LINK( SwContentTree, TimerUpdate, Timer*, EMPTYARG)
{
FindActiveTypeAndRemoveUserData();
Display(sal_True);
+ //IAccessibility2 Implementation 2009-----
+ //Solution: Set focus
+ if( bIsKeySpace )
+ {
+ HideFocus();
+ ShowFocus( oldRectangle);
+ bIsKeySpace = sal_False;
+ }
+ //-----IAccessibility2 Implementation 2009
}
}
else if(!pView && bIsActive && !bIsIdleClear)
@@ -2444,6 +2657,113 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
GrabFocus();
}
}
+ //IAccessibility2 Implementation 2009-----
+ //Solution: Make KEY_SPACE has same function as DoubleClick ,
+ //and realize multi-selection .
+ else if(aCode.GetCode() == KEY_SPACE && 0 == aCode.GetModifier())
+ {
+
+ SvLBoxEntry* pEntry = GetCurEntry();
+ if( GetChildCount( pEntry ) == 0 )
+ bIsKeySpace = sal_True;
+ Point tempPoint = GetEntryPosition( pEntry );//Change from "GetEntryPos" to "GetEntryPosition" for acc migration
+ oldRectangle = GetFocusRect( pEntry,tempPoint.Y() );
+
+ if(pEntry)
+ {
+ if(bIsActive || bIsConstant)
+ {
+ if(bIsConstant)
+ {
+ pActiveShell->GetView().GetViewFrame()->GetWindow().ToTop();
+ }
+
+ SwContent* pCnt = (SwContent*)pEntry->GetUserData();
+
+ sal_Bool bSel = sal_False;
+ sal_uInt16 nJumpType = pCnt->GetParent()->GetType();
+ switch(nJumpType)
+ {
+ case CONTENT_TYPE_DRAWOBJECT:
+ {
+ SdrView* pDrawView = pActiveShell->GetDrawView();
+ if (pDrawView)
+ {
+ pDrawView->SdrEndTextEdit();//Change from "EndTextEdit" to "SdrEndTextEdit" for acc migration
+
+ SdrModel* pDrawModel = pActiveShell->GetDoc()->GetDrawModel();
+ SdrPage* pPage = pDrawModel->GetPage(0);
+ sal_uInt32 nCount = pPage->GetObjCount();
+ sal_Bool hasObjectMarked = sal_False;
+
+ SdrObject* pObject = NULL;
+ pObject = GetDrawingObjectsByContent( pCnt );
+ if( pObject )
+ {
+ const bool bUnMark(pDrawView->isSdrObjectSelected(*pObject));
+ pDrawView->MarkObj(*pObject, bUnMark);
+ }
+ for( sal_uInt32 i=0; i< nCount; i++ )
+ {
+ SdrObject* pTemp = pPage->GetObj(i);
+
+ if(!pTemp)
+ {
+ OSL_ENSURE(false, "Null pointer SdrObject in SdrPage's GetObj with valid index (!)");
+ continue;
+ }
+
+ sal_uInt16 nCmpId(OBJ_NONE);
+ const bool bMark(pDrawView->isSdrObjectSelected(*pTemp));
+ switch( pTemp->GetObjIdentifier() )
+ {
+ case OBJ_GRUP:
+ case OBJ_TEXT:
+ case OBJ_RECT:
+ case OBJ_CIRC:
+ case OBJ_POLY:
+ case OBJ_CAPTION:
+ case OBJ_CUSTOMSHAPE:
+ nCmpId = OBJ_GRUP;
+ if( bMark )
+ hasObjectMarked = sal_True;
+ break;
+ default:
+ nCmpId = pTemp->GetObjIdentifier();
+ //IAccessibility2 Implementation 2009-----
+ if ( bMark )
+ {
+ pDrawView->MarkObj(*pTemp, true);
+ }
+ //-----IAccessibility2 Implementation 2009
+ }
+ //mod end
+ }
+ if ( pActiveShell && !hasObjectMarked )
+ {
+ SwEditWin& pEditWindow =
+ pActiveShell->GetView().GetEditWin();
+ if( &pEditWindow )
+ {
+ KeyCode tempKeycode( KEY_ESCAPE );
+ KeyEvent rKEvt( 0 , tempKeycode );
+ ((Window*)&pEditWindow)->KeyInput( rKEvt );
+
+ }
+ //rView.GetEditWin().GrabFocus();
+ }
+ }
+ }
+ break;
+ }
+
+
+ bViewHasChanged = sal_True;
+ }
+ }
+
+ }
+ //-----IAccessibility2 Implementation 2009
else
SvTreeListBox::KeyInput(rEvent);
@@ -3202,6 +3522,26 @@ void SwContentLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFl
rDev.DrawText( rPos, GetText() );
rDev.SetFont( aOldFont );
}
+ //IAccessibility2 Implementation 2009-----
+ // IA2 CWS. MT: Removed for now (also in SvLBoxEntry) - only used in Sw/Sd/ScContentLBoxString, they should decide if they need this
+ /*
+ else if (pEntry->IsMarked())
+ {
+ rDev.DrawText( rPos, GetText() );
+ XubString str;
+ str = XubString::CreateFromAscii("*");
+ Point rPosStar(rPos.X()-6,rPos.Y());
+ Font aOldFont( rDev.GetFont());
+ Font aFont(aOldFont);
+ Color aCol( aOldFont.GetColor() );
+ aCol.DecreaseLuminance( 200 );
+ aFont.SetColor( aCol );
+ rDev.SetFont( aFont );
+ rDev.DrawText( rPosStar, str);
+ rDev.SetFont( aOldFont );
+ }
+ //-----IAccessibility2 Implementation 2009
+ */
else
SvLBoxString::Paint( rPos, rDev, nFlags, pEntry);
}
@@ -3222,3 +3562,18 @@ void SwContentTree::DataChanged( const DataChangedEvent& rDCEvt )
}
+//IAccessibility2 Implementation 2009-----
+sal_Int32 SwContentTree::GetEntryRealChildsNum( SvLBoxEntry* pParent ) const
+{
+ // ist es ein Inhaltstyp?
+ if(lcl_IsContentType(pParent))
+ {
+ if(!pParent->HasChilds())
+ {
+ SwContentType* pCntType = (SwContentType*)pParent->GetUserData();
+ return pCntType->GetMemberCount();
+ }
+ }
+ return 0;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/ui/utlui/navipi.hrc b/sw/source/ui/utlui/navipi.hrc
index bae76b4afb6e..2209a5503ce1 100644
--- a/sw/source/ui/utlui/navipi.hrc
+++ b/sw/source/ui/utlui/navipi.hrc
@@ -84,3 +84,8 @@
#define ST_POSTIT_SHOW (ST_GLOBAL_CONTEXT_FIRST +35)
#define ST_POSTIT_HIDE (ST_GLOBAL_CONTEXT_FIRST +36)
#define ST_POSTIT_DELETE (ST_GLOBAL_CONTEXT_FIRST +37)
+
+//IAccessibility2 Implementation 2009-----
+#define ST_TL_GLOBAL ST_GLOBAL_CONTEXT_FIRST +38
+#define ST_TL_CONTENT ST_GLOBAL_CONTEXT_FIRST +39
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/ui/wrtsh/delete.cxx b/sw/source/ui/wrtsh/delete.cxx
index b5608fb5edda..10e63e4eab49 100644
--- a/sw/source/ui/wrtsh/delete.cxx
+++ b/sw/source/ui/wrtsh/delete.cxx
@@ -89,7 +89,7 @@ sal_Bool SwWrtShell::TryRemoveIndent()
if (bResult)
{
aAttrSet.Put(aItem);
- SetAttr(aAttrSet);
+ SetAttrSet(aAttrSet);
}
return bResult;
diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx
index 7b4216c091d0..fcb46a0e6d61 100644
--- a/sw/source/ui/wrtsh/select.cxx
+++ b/sw/source/ui/wrtsh/select.cxx
@@ -46,6 +46,11 @@
#include <swdtflvr.hxx>
#include <crsskip.hxx>
+//IAccessibility2 Implementation 2009-----
+#ifndef _DOC_HXX
+#include <doc.hxx>
+#endif
+//-----IAccessibility2 Implementation 2009
#if OSL_DEBUG_LEVEL > 1
#include <pam.hxx>
#endif
@@ -166,6 +171,14 @@ long SwWrtShell::SelAll()
}
SttSelect();
GoEnd(sal_True, &bMoveTable);
+
+ //IAccessibility2 Implementation 2009-----
+ SwDoc *pDoc = GetDoc();
+ if ( pDoc )
+ {
+ pDoc->SetPrepareSelAll();
+ }
+ //-----IAccessibility2 Implementation 2009
if( pStartPos )
{
pTmpCrsr = getShellCrsr( false );
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index ed311635e7bf..be0ab6994f03 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -418,27 +418,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
// TODO/LATER: recording! Convert properties to items
case SID_INSERT_PLUGIN:
- /*
- if(pReq)
- {
- INetURLObject* pURL = aDlg.GetURL();
- if(pURL)
- pReq->AppendItem(SfxStringItem(FN_PARAM_2, pURL->GetMainURL(INetURLObject::NO_DECODE)));
- pReq->AppendItem(SfxStringItem(FN_PARAM_3 , aDlg.GetCommands()));
- } */
case SID_INSERT_FLOATINGFRAME:
- /*
- if(pReq && xFloatingFrame.Is())
- {
- const SfxFrameDescriptor* pDescriptor = xFloatingFrame->GetFrameDescriptor();
- pReq->AppendItem(SfxStringItem(FN_PARAM_1, pDescriptor->GetName()));
- pReq->AppendItem(
- SfxStringItem( FN_PARAM_2,
- pDescriptor->GetURL().GetMainURL(INetURLObject::NO_DECODE)));
- pReq->AppendItem(SvxSizeItem(FN_PARAM_3, pDescriptor->GetMargin()));
- pReq->AppendItem(SfxByteItem(FN_PARAM_4, pDescriptor->GetScrollingMode()));
- pReq->AppendItem(SfxBoolItem(FN_PARAM_5, pDescriptor->HasFrameBorder()));
- }*/
{
SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool();
const SfxSlot* pSlot = pSlotPool->GetSlot(nSlotId);
@@ -959,10 +939,10 @@ void SwWrtShell::InsertPageBreak(const String *pPageDesc, sal_uInt16 nPgNum )
{
SwFmtPageDesc aDesc( pDesc );
aDesc.SetNumOffset( nPgNum );
- SetAttr( aDesc );
+ SetAttrItem( aDesc );
}
else
- SetAttr( SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) );
+ SetAttrItem( SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) );
EndUndo(UNDO_UI_INSERT_PAGE_BREAK);
}
}
@@ -1008,7 +988,7 @@ void SwWrtShell::InsertColumnBreak()
DelRight();
SwFEShell::SplitNode( sal_False, sal_False );
}
- SetAttr(SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK));
+ SetAttrItem(SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK));
EndUndo(UNDO_UI_INSERT_COLUMN_BREAK);
}
@@ -1037,7 +1017,7 @@ void SwWrtShell::InsertFootnote(const String &rStr, sal_Bool bEndNote, sal_Bool
if(rStr.Len())
aFootNote.SetNumStr( rStr );
- SetAttr(aFootNote);
+ SetAttrItem(aFootNote);
if( bEdit )
{
@@ -1514,17 +1494,14 @@ SelectionType SwWrtShell::GetSelectionType() const
if ( BasicActionPend() )
return IsSelFrmMode() ? nsSelectionType::SEL_FRM : nsSelectionType::SEL_TXT;
-// if ( IsTableMode() )
-// return nsSelectionType::SEL_TBL | nsSelectionType::SEL_TBL_CELLS;
-
SwView &_rView = ((SwView&)GetView());
if (_rView.GetPostItMgr() && _rView.GetPostItMgr()->HasActiveSidebarWin() )
return nsSelectionType::SEL_POSTIT;
- int nCnt;
- // Rahmen einfuegen ist kein DrawMode
+ int nCnt;
+ // Insertion of a text frame is not a DrawMode
if ( !_rView.GetEditWin().IsFrmAction() &&
- (IsObjSelected() || (_rView.IsDrawMode() && !IsFrmSelected()) ))
+ (IsObjSelected() || (_rView.IsDrawMode() && !IsFrmSelected()) ))
{
if (GetDrawView()->IsTextEdit())
nCnt = nsSelectionType::SEL_DRW_TXT;
@@ -1541,14 +1518,14 @@ SelectionType SwWrtShell::GetSelectionType() const
nCnt |= nsSelectionType::SEL_MEDIA;
if (svx::checkForSelectedCustomShapes(
- const_cast<SdrView *>(GetDrawView()),
- true /* bOnlyExtruded */ ))
+ const_cast<SdrView *>(GetDrawView()),
+ true /* bOnlyExtruded */ ))
{
nCnt |= nsSelectionType::SEL_EXTRUDED_CUSTOMSHAPE;
}
sal_uInt32 nCheckStatus = 0;
if (svx::checkForSelectedFontWork(
- const_cast<SdrView *>(GetDrawView()), nCheckStatus ))
+ const_cast<SdrView *>(GetDrawView()), nCheckStatus ))
{
nCnt |= nsSelectionType::SEL_FONTWORK;
}
@@ -1573,25 +1550,20 @@ SelectionType SwWrtShell::GetSelectionType() const
if ( IsTableMode() )
nCnt |= (nsSelectionType::SEL_TBL | nsSelectionType::SEL_TBL_CELLS);
- // --> FME 2005-01-12 #i39855#
- // Do not pop up numbering toolbar, if the text node has a numbering
- // of type SVX_NUM_NUMBER_NONE.
+ // Do not pop up numbering toolbar, if the text node has a numbering of type SVX_NUM_NUMBER_NONE.
const SwNumRule* pNumRule = GetCurNumRule();
if ( pNumRule )
{
const SwTxtNode* pTxtNd =
GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode();
- // --> OD 2008-03-19 #refactorlists#
if ( pTxtNd && pTxtNd->IsInList() )
- // <--
{
const SwNumFmt& rFmt = pNumRule->Get(sal::static_int_cast< sal_uInt8, sal_Int32>(pTxtNd->GetActualListLevel()));
if ( SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType() )
nCnt |= nsSelectionType::SEL_NUM;
}
}
- // <--
return nCnt;
}
@@ -1738,7 +1710,7 @@ void SwWrtShell::AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet
if(bReset)
{
ResetAttr();
- SetAttr(aCoreSet);
+ SetAttrSet(aCoreSet);
}
pDoc->ChgFmt(*pColl, rStyleSet );
EndAction();
@@ -1853,11 +1825,6 @@ sal_Bool SwWrtShell::CanInsert()
return (!(IsSelFrmMode() | IsObjSelected() | (GetView().GetDrawFuncPtr() != NULL) | (GetView().GetPostItMgr()->GetActiveSidebarWin()!= NULL)));
}
-// die Core erzeugt eine Selektion, das SttSelect muss gerufen werden
-void SwWrtShell::NewCoreSelection()
-{
- SttSelect();
-}
// --------------
void SwWrtShell::ChgDBData(const SwDBData& aDBData)
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index f911bb7468f6..52bce47ce554 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -103,16 +103,13 @@ void SwWrtShell::Insert(SwField &rFld)
-void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, sal_Bool bOnlyInSel )
+void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst )
{
// ueber die Liste der Eingabefelder gehen und Updaten
SwInputFieldList* pTmp = pLst;
if( !pTmp )
pTmp = new SwInputFieldList( this );
- if (bOnlyInSel)
- pTmp->RemoveUnselectedFlds();
-
const sal_uInt16 nCnt = pTmp->Count();
if(nCnt)
{
@@ -305,7 +302,13 @@ void SwWrtShell::ClickToField( const SwField& rFld )
break;
case RES_INPUTFLD:
- StartInputFldDlg( (SwField*)&rFld, sal_False );
+ {
+ const SwInputField* pInputField = dynamic_cast<const SwInputField*>(&rFld);
+ if ( pInputField == NULL )
+ {
+ StartInputFldDlg( (SwField*)&rFld, sal_False );
+ }
+ }
break;
case RES_SETEXPFLD:
@@ -321,7 +324,6 @@ void SwWrtShell::ClickToField( const SwField& rFld )
}
-
void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, sal_uInt16 nFilter )
{
if( !rItem.GetValue().Len() )
diff --git a/toolkit/inc/toolkit/awt/vclxwindows.hxx b/toolkit/inc/toolkit/awt/vclxwindows.hxx
index 43ea30a139a9..dfbeabbeb023 100644
--- a/toolkit/inc/toolkit/awt/vclxwindows.hxx
+++ b/toolkit/inc/toolkit/awt/vclxwindows.hxx
@@ -876,6 +876,10 @@ public:
class TOOLKIT_DLLPUBLIC VCLXDateField : public ::com::sun::star::awt::XDateField,
public VCLXFormattedSpinField
{
+//IAccessibility2 Impplementaton 2009-----
+protected:
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext();
+//-----IAccessibility2 Impplementaton 2009
public:
VCLXDateField();
~VCLXDateField();
@@ -922,6 +926,10 @@ public:
class VCLXTimeField : public ::com::sun::star::awt::XTimeField,
public VCLXFormattedSpinField
{
+//IAccessibility2 Impplementaton 2009-----
+protected:
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext();
+//-----IAccessibility2 Impplementaton 2009
public:
VCLXTimeField();
~VCLXTimeField();
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index dc2f19c1fd8e..4941eb7a351f 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -37,6 +37,10 @@
#include <toolkit/awt/vclxfont.hxx>
#include <vcl/dialog.hxx>
#include <vcl/window.hxx>
+//IAccessibility2 Implementation 2009-----
+//Solution:Need methods in Edit.
+#include <vcl/edit.hxx>
+//-----IAccessibility2 Implementation 2009
#include <tools/debug.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
@@ -441,7 +445,9 @@ void VCLXAccessibleComponent::FillAccessibleRelationSet( utl::AccessibleRelation
Window* pWindow = GetWindow();
if ( pWindow )
{
+//IAccessibility2 Implementation 2009-----
Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
+//-----IAccessibility2 Implementation 2009
if ( pLabeledBy && pLabeledBy != pWindow )
{
uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
@@ -456,6 +462,20 @@ void VCLXAccessibleComponent::FillAccessibleRelationSet( utl::AccessibleRelation
aSequence[0] = pLabelFor->GetAccessible();
rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABEL_FOR, aSequence ) );
}
+//IAccessibility2 Implementation 2009-----
+ Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf();
+ if ( pMemberOf && pMemberOf != pWindow )
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = pMemberOf->GetAccessible();
+ rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
+ }
+ uno::Sequence< uno::Reference< uno::XInterface > > aFlowToSequence = pWindow->GetAccFlowToSequence();
+ if( aFlowToSequence.getLength() > 0 )
+ {
+ rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::CONTENT_FLOWS_TO, aFlowToSequence ) );
+ }
+//-----IAccessibility2 Implementation 2009
}
}
@@ -504,13 +524,50 @@ void VCLXAccessibleComponent::FillAccessibleStateSet( utl::AccessibleStateSetHel
if ( pWindow->GetStyle() & WB_SIZEABLE )
rStateSet.AddState( accessibility::AccessibleStateType::RESIZABLE );
-
+//IAccessibility2 Implementation 2009-----
+ // 6. frame doesn't have MOVABLE state
+ // 10. for password text, where is the sensitive state?
+ if( ( getAccessibleRole() == accessibility::AccessibleRole::FRAME ||getAccessibleRole() == accessibility::AccessibleRole::DIALOG )&& pWindow->GetStyle() & WB_MOVEABLE )
+ rStateSet.AddState( accessibility::AccessibleStateType::MOVEABLE );
+//-----IAccessibility2 Implementation 2009
if( pWindow->IsDialog() )
{
Dialog *pDlg = static_cast< Dialog* >( pWindow );
if( pDlg->IsInExecute() )
rStateSet.AddState( accessibility::AccessibleStateType::MODAL );
}
+//IAccessibility2 Implementation 2009-----
+ //Solution:If a combobox or list's edit child isn't read-only,EDITABLE state
+ // should be set.
+ if( pWindow && pWindow->GetType() == WINDOW_COMBOBOX )
+ {
+ if( !( pWindow->GetStyle() & WB_READONLY) ||
+ !((Edit*)pWindow)->IsReadOnly() )
+ rStateSet.AddState( accessibility::AccessibleStateType::EDITABLE );
+ }
+
+ Window* pChild = pWindow->GetWindow( WINDOW_FIRSTCHILD );
+
+ while( pWindow && pChild )
+ {
+ Window* pWinTemp = pChild->GetWindow( WINDOW_FIRSTCHILD );
+ if( pWinTemp && pWinTemp->GetType() == WINDOW_EDIT )
+ {
+ if( !( pWinTemp->GetStyle() & WB_READONLY) ||
+ !((Edit*)pWinTemp)->IsReadOnly() )
+ rStateSet.AddState( accessibility::AccessibleStateType::EDITABLE );
+ break;
+ }
+ if( pChild->GetType() == WINDOW_EDIT )
+ {
+ if( !( pChild->GetStyle() & WB_READONLY) ||
+ !((Edit*)pChild)->IsReadOnly())
+ rStateSet.AddState( accessibility::AccessibleStateType::EDITABLE );
+ break;
+ }
+ pChild = pChild->GetWindow( WINDOW_NEXT );
+ }
+//-----IAccessibility2 Implementation 2009
}
else
{
@@ -846,6 +903,11 @@ sal_Int32 SAL_CALL VCLXAccessibleComponent::getForeground( ) throw (uno::Runtim
else
aFont = pWindow->GetFont();
nColor = aFont.GetColor().GetColor();
+//IAccessibility2 Implementation 2009-----
+// COL_AUTO is not very meaningful for AT
+ if ( nColor == (sal_Int32)COL_AUTO)
+ nColor = pWindow->GetTextColor().GetColor();
+//-----IAccessibility2 Implementation 2009
}
}
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index b30ec2a39ae4..7a49ed2bdf32 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -632,6 +632,11 @@ void SAL_CALL VCLXToolkit::disposing()
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > VCLXToolkit::createWindow( const ::com::sun::star::awt::WindowDescriptor& rDescriptor ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
+//IAccessibility2 Implementation 2009-----
+#ifdef WNT
+ CEnableAccessInterface e;
+#endif
+//-----IAccessibility2 Implementation 2009
return ImplCreateWindow( rDescriptor, WinBits(0) );
}
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 7066eac2d57e..0078fb5aa9b4 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -4505,6 +4505,19 @@ VCLXDateField::~VCLXDateField()
{
}
+//IAccessibility2 Implementation 2009-----
+//change the window type here to match the role
+::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > VCLXDateField::CreateAccessibleContext()
+{
+ Window* pWindow = GetWindow();
+ if ( pWindow )
+ {
+ pWindow->SetType( WINDOW_DATEFIELD );
+ }
+ return getAccessibleFactory().createAccessibleContext( this );
+}
+//-----IAccessibility2 Implementation 2009
+
// ::com::sun::star::uno::XInterface
::com::sun::star::uno::Any VCLXDateField::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
{
@@ -4846,6 +4859,18 @@ VCLXTimeField::VCLXTimeField()
VCLXTimeField::~VCLXTimeField()
{
}
+//IAccessibility2 Implementation 2009-----
+//change the window type here to match the role
+::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > VCLXTimeField::CreateAccessibleContext()
+{
+ Window* pWindow = GetWindow();
+ if ( pWindow )
+ {
+ pWindow->SetType( WINDOW_TIMEFIELD );
+ }
+ return getAccessibleFactory().createAccessibleContext( this );
+}
+//-----IAccessibility2 Implementation 2009
// ::com::sun::star::uno::XInterface
::com::sun::star::uno::Any VCLXTimeField::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
diff --git a/tools/Executable_mkunroll.mk b/tools/Executable_mkunroll.mk
index aca8a9bdba66..9bd813cd8175 100644
--- a/tools/Executable_mkunroll.mk
+++ b/tools/Executable_mkunroll.mk
@@ -30,17 +30,9 @@ $(eval $(call gb_Executable_set_include,mkunroll,\
-I$(SRCDIR)/tools/bootstrp/ \
))
-STLPORT_DEBUGFLAG =
-ifneq ($(USE_SYSTEM_STL),YES)
-ifeq ($(PRODUCT),)
-STLPORT_DEBUGFLAG = -D_DEBUG
-endif
-endif
-
$(eval $(call gb_Executable_set_cxxflags,mkunroll,\
$$(CXXFLAGS) \
-D_TOOLS_STRINGLIST \
- $(STLPORT_DEBUGFLAG) \
))
$(eval $(call gb_Executable_add_linked_libs,mkunroll,\
diff --git a/tools/Executable_rscdep.mk b/tools/Executable_rscdep.mk
index f60105f807d6..c41c13c98f5b 100644
--- a/tools/Executable_rscdep.mk
+++ b/tools/Executable_rscdep.mk
@@ -30,17 +30,9 @@ $(eval $(call gb_Executable_set_include,rscdep,\
-I$(SRCDIR)/tools/bootstrp/ \
))
-STLPORT_DEBUGFLAG =
-ifneq ($(USE_SYSTEM_STL),YES)
-ifeq ($(PRODUCT),)
-STLPORT_DEBUGFLAG = -D_DEBUG
-endif
-endif
-
$(eval $(call gb_Executable_set_cxxflags,rscdep,\
$$(CXXFLAGS) \
-D_TOOLS_STRINGLIST \
- $(STLPORT_DEBUGFLAG) \
))
$(eval $(call gb_Executable_add_linked_libs,rscdep,\
diff --git a/tools/Executable_so_checksum.mk b/tools/Executable_so_checksum.mk
index 3d8619752abe..1544e7a639fa 100644
--- a/tools/Executable_so_checksum.mk
+++ b/tools/Executable_so_checksum.mk
@@ -30,13 +30,6 @@ $(eval $(call gb_Executable_set_include,so_checksum,\
-I$(SRCDIR)/tools/bootstrp/ \
))
-STLPORT_DEBUGFLAG =
-ifneq ($(USE_SYSTEM_STL),YES)
-ifeq ($(PRODUCT),)
-STLPORT_DEBUGFLAG = -D_DEBUG
-endif
-endif
-
$(eval $(call gb_Executable_set_cxxflags,so_checksum,\
$$(CXXFLAGS) \
-D_TOOLS_STRINGLIST \
diff --git a/tools/Executable_sspretty.mk b/tools/Executable_sspretty.mk
index 4a694f931338..dea85f3a037f 100644
--- a/tools/Executable_sspretty.mk
+++ b/tools/Executable_sspretty.mk
@@ -30,13 +30,6 @@ $(eval $(call gb_Executable_set_include,sspretty,\
-I$(SRCDIR)/tools/bootstrp/ \
))
-STLPORT_DEBUGFLAG =
-ifneq ($(USE_SYSTEM_STL),YES)
-ifeq ($(PRODUCT),)
-STLPORT_DEBUGFLAG = -D_DEBUG
-endif
-endif
-
$(eval $(call gb_Executable_set_cxxflags,sspretty,\
$$(CXXFLAGS) \
-D_TOOLS_STRINGLIST \
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index ff9c47e370ed..d79f91d27b65 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -143,7 +143,7 @@ void Color::Invert()
sal_Bool Color::IsDark() const
{
- return GetLuminance() <= 38;
+ return GetLuminance() <= 55;
}
// -----------------------------------------------------------------------
diff --git a/ure/source/uretest/Makefile b/ure/source/uretest/Makefile
index d9b321aa0a11..ed110270c162 100644
--- a/ure/source/uretest/Makefile
+++ b/ure/source/uretest/Makefile
@@ -114,7 +114,7 @@ out.sdk/cppmain.uno.$(SHAREDLIB_EXT): out.sdk/cppmain.$(OBJ_EXT) version.map | \
out.sdk
$(LINK) $(COMP_LINK_FLAGS) $(link_output_switch)$@ $< $(LINK_LIBS) \
$(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) $(SALHELPERLIB) \
- $(STLPORTLIB) $(link_std_libs)
+ $(link_std_libs)
out.sdk/cppmain.$(OBJ_EXT): cppmain.cc out.sdk/cpputypes.cppumaker.flag \
out.sdk/types.cppumaker.flag | out.sdk
diff --git a/ure/source/uretest/Makefile.pln b/ure/source/uretest/Makefile.pln
index 6147e84c125f..5868d7374946 100644
--- a/ure/source/uretest/Makefile.pln
+++ b/ure/source/uretest/Makefile.pln
@@ -84,11 +84,10 @@ clean:
out.pln/cppmain.uno.so: out.pln/cppmain.o version.map | out.pln \
out.pln/lib/libuno_cppu.so out.pln/lib/libuno_cppuhelpergcc3.so \
- out.pln/lib/libuno_sal.so out.pln/lib/libuno_salhelpergcc3.so \
- out.pln/lib/libstlport_gcc.so
+ out.pln/lib/libuno_sal.so out.pln/lib/libuno_salhelpergcc3.so
g++ -shared -o $@ -Wl,-z,defs -Wl,--fatal-warnings \
-Wl,--version-script=version.map $< -Lout.pln/lib -luno_cppu \
- -luno_cppuhelpergcc3 -luno_sal -luno_salhelpergcc3 -lstlport_gcc
+ -luno_cppuhelpergcc3 -luno_sal -luno_salhelpergcc3
out.pln/cppmain.o: cppmain.cc out.pln/cpputypes.cppumaker.flag \
out.pln/types.cppumaker.flag | out.pln
@@ -295,9 +294,6 @@ out.pln/lib/libuno_sal.so: | out.pln/lib
out.pln/lib/libuno_salhelpergcc3.so: | out.pln/lib
ln -fs $(URE_HOME)/lib/libuno_salhelpergcc3.so.3 $@
-out.pln/lib/libstlport_gcc.so: | out.pln/lib
- ln -fs $(URE_HOME)/lib/libstlport_gcc.so $@
-
out.pln:
mkdir $@
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 0e708d737621..cd2ba692991d 100755
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -458,16 +458,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/glyphs/graphite_textsrc \
))
-#building with stlport, but graphite was not built with stlport
-ifneq ($(USE_SYSTEM_STL),YES)
-ifeq ($(SYSTEM_GRAPHITE),YES)
-$(eval $(call gb_Library_set_defs,vcl,\
- $$(DEFS) \
- -DADAPT_EXT_STL \
-))
-endif
-endif
-
# handle X11 platforms, which have additional files and possibly system graphite
ifeq ($(GUIBASE),unx)
$(eval $(call gb_Library_add_exception_objects,vcl,\
diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx
index 65c2115b5760..80a1c3de58e7 100644
--- a/vcl/inc/ilstbox.hxx
+++ b/vcl/inc/ilstbox.hxx
@@ -250,6 +250,10 @@ private:
Link maDoubleClickHdl;
Link maUserDrawHdl;
Link maMRUChangedHdl;
+//IAccessibility2 Implementation 2009-----
+ Link maFocusHdl;
+ Link maListItemSelectHdl;
+//-----IAccessibility2 Implementation 2009
::vcl::QuickSelectionEngine maQuickSelectionEngine;
@@ -263,7 +267,10 @@ protected:
virtual void GetFocus();
virtual void LoseFocus();
- sal_Bool SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift = sal_False, sal_Bool bCtrl = sal_False );
+ //IAccessibility2 Implementation 2009-----
+ //sal_Bool SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift = sal_False, sal_Bool bCtrl = sal_False );
+ sal_Bool SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift = sal_False, sal_Bool bCtrl = sal_False, sal_Bool bSelectPosChange = sal_False );
+ //-----IAccessibility2 Implementation 2009
void ImplPaint( sal_uInt16 nPos, sal_Bool bErase = sal_False, bool bLayout = false );
void ImplDoPaint( const Rectangle& rRect, bool bLayout = false );
void ImplCalcMetrics();
@@ -360,7 +367,13 @@ public:
const Link& GetUserDrawHdl() const { return maUserDrawHdl; }
void SetMRUChangedHdl( const Link& rLink ) { maMRUChangedHdl = rLink; }
const Link& GetMRUChangedHdl() const { return maMRUChangedHdl; }
+//IAccessibility2 Implementation 2009-----
+ void SetFocusHdl( const Link& rLink ) { maFocusHdl = rLink ; }
+ const Link& GetFocusHdl() const { return maFocusHdl; }
+ void SetListItemSelectHdl( const Link& rLink ) { maListItemSelectHdl = rLink ; }
+ const Link& GetListItemSelectHdl() const { return maListItemSelectHdl; }
+//-----IAccessibility2 Implementation 2009
bool IsSelectionChanged() const { return mbSelectionChanged; }
sal_uInt16 GetSelectModifier() const { return mnSelectModifier; }
@@ -497,6 +510,12 @@ public:
void SetUserDrawHdl( const Link& rLink ) { maLBWindow.SetUserDrawHdl( rLink ); }
const Link& GetUserDrawHdl() const { return maLBWindow.GetUserDrawHdl(); }
+//IAccessibility2 Implementation 2009-----
+ void SetFocusHdl( const Link& rLink ) { maLBWindow.SetFocusHdl( rLink ); }
+ const Link& GetFocusHdl() const { return maLBWindow.GetFocusHdl(); }
+ void SetListItemSelectHdl( const Link& rLink ) { maLBWindow.SetListItemSelectHdl( rLink ); }
+ const Link& GetListItemSelectHdl() const { return maLBWindow.GetListItemSelectHdl(); }
+//-----IAccessibility2 Implementation 2009
void SetSelectionChangedHdl( const Link& rLnk ) { maLBWindow.GetEntryList()->SetSelectionChangedHdl( rLnk ); }
void SetCallSelectionChangedHdl( sal_Bool bCall ) { maLBWindow.GetEntryList()->SetCallSelectionChangedHdl( bCall ); }
sal_Bool IsSelectionChanged() const { return maLBWindow.IsSelectionChanged(); }
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 1e6f12891ef3..a9ebc24cc3e0 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -182,6 +182,9 @@ struct ImplSVAppData
*/
ImeStatusWindowMode meShowImeStatusWindow;
+//IAccessibility2 Implementation 2009-----
+ long m_bEnableAccessInterface;
+//-----IAccessibility2 Implementation 2009
DECL_STATIC_LINK( ImplSVAppData, ImplQuitMsg, void* );
};
diff --git a/vcl/inc/vcl/combobox.hxx b/vcl/inc/vcl/combobox.hxx
index 0c55810fb62a..6a4777767267 100644
--- a/vcl/inc/vcl/combobox.hxx
+++ b/vcl/inc/vcl/combobox.hxx
@@ -67,6 +67,9 @@ private:
DECL_DLLPRIVATE_LINK( ImplSelectionChangedHdl, void* );
DECL_DLLPRIVATE_LINK( ImplUserDrawHdl, UserDrawEvent* );
DECL_DLLPRIVATE_LINK( ImplAutocompleteHdl, Edit* );
+ //IAccessibility2 Implementation 2009-----
+ DECL_DLLPRIVATE_LINK( ImplListItemSelectHdl , void* );
+ //-----IAccessibility2 Implementation 2009
protected:
using Window::ImplInit;
@@ -182,7 +185,9 @@ public:
XubString GetMRUEntries( xub_Unicode cSep = ';' ) const;
void SetMaxMRUCount( sal_uInt16 n );
sal_uInt16 GetMaxMRUCount() const;
-
+//IAccessibility2 Implementation 2009-----
+ sal_uInt16 GetMRUCount() const;
+//-----IAccessibility2 Implementation 2009
void SetEntryData( sal_uInt16 nPos, void* pNewData );
void* GetEntryData( sal_uInt16 nPos ) const;
@@ -222,6 +227,9 @@ public:
*/
using Control::GetIndexForPoint;
long GetIndexForPoint( const Point& rPoint, sal_uInt16& rPos ) const;
+//IAccessibility2 Implementation 2009-----
+ void SetMpSubEditAccessibleName(String &aName);
+//-----IAccessibility2 Implementation 2009
};
#endif // _COMBOBOX_HXX
diff --git a/vcl/inc/vcl/lstbox.hxx b/vcl/inc/vcl/lstbox.hxx
index fa6293d5f45c..0c7a6fc99f8e 100644
--- a/vcl/inc/vcl/lstbox.hxx
+++ b/vcl/inc/vcl/lstbox.hxx
@@ -67,7 +67,10 @@ private:
DECL_DLLPRIVATE_LINK( ImplPopupModeEndHdl, void* );
DECL_DLLPRIVATE_LINK( ImplSelectionChangedHdl, void* );
DECL_DLLPRIVATE_LINK( ImplUserDrawHdl, UserDrawEvent* );
-
+//IAccessibility2 Implementation 2009-----
+ DECL_DLLPRIVATE_LINK( ImplFocusHdl, void* );
+ DECL_DLLPRIVATE_LINK( ImplListItemSelectHdl , void* );
+//-----IAccessibility2 Implementation 2009
protected:
using Window::ImplInit;
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
@@ -217,7 +220,9 @@ public:
XubString GetMRUEntries( xub_Unicode cSep = ';' ) const;
void SetMaxMRUCount( sal_uInt16 n );
sal_uInt16 GetMaxMRUCount() const;
-
+//IAccessibility2 Implementation 2009-----
+ sal_uInt16 GetMRUCount() const;
+//-----IAccessibility2 Implementation 2009
sal_uInt16 GetDisplayLineCount() const;
void EnableMirroring();
diff --git a/vcl/inc/vcl/menu.hxx b/vcl/inc/vcl/menu.hxx
index 775a3571f40f..8476fc7be84e 100644
--- a/vcl/inc/vcl/menu.hxx
+++ b/vcl/inc/vcl/menu.hxx
@@ -151,7 +151,9 @@ private:
sal_uInt16 nMenuFlags;
sal_uInt16 nDefaultItem; // Id vom Default-Item
sal_uInt16 nSelectedId;
-
+//IAccessibility2 Implementation 2009-----
+ sal_uInt16 nHighlightedItem;
+//-----IAccessibility2 Implementation 2009
// Fuer Ausgabe:
sal_uInt16 nCheckPos;
sal_uInt16 nImagePos;
@@ -242,7 +244,14 @@ public:
sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const;
MenuItemType GetItemType( sal_uInt16 nPos ) const;
sal_uInt16 GetCurItemId() const;
+//IAccessibility2 Implementation 2009-----
+ void SetHightlightItem( sal_uInt16 nHighlightedItem );
+ sal_uInt16 GetHighlightItem() const;
+
+ XubString GetItemAccKeyStrFromPos(sal_uInt16 nPos ) const ;
+ sal_Bool IsTemporaryItemFromPos(sal_uInt16 nPos ) const;
+//-----IAccessibility2 Implementation 2009
void SetDefaultItem( sal_uInt16 nItemId ) { nDefaultItem = nItemId; }
sal_uInt16 GetDefaultItem() const { return nDefaultItem; }
@@ -371,6 +380,9 @@ public:
void SetAccessibleDescription( sal_uInt16 nItemId, const XubString& rStr );
XubString GetAccessibleDescription( sal_uInt16 nItemId ) const;
+//IAccessibility2 Implementation 2009
+ Menu* GetStartedFromMenu(){ return pStartedFrom ;}
+//-----IAccessibility2 Implementation 2009
// returns whether the item a position nItemPos is highlighted or not.
bool IsHighlighted( sal_uInt16 nItemPos ) const;
diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx
index cf6820e5b740..0ee66d51c607 100644
--- a/vcl/inc/vcl/svapp.hxx
+++ b/vcl/inc/vcl/svapp.hxx
@@ -448,6 +448,10 @@ public:
static void ShowNativeErrorBox(const String& sTitle ,
const String& sMessage);
+//IAccessibility2 Implementation 2009-----
+ static bool EnableAccessInterface(bool bEnable);
+ static bool IsEnableAccessInterface();
+//-----IAccessibility2 Implementation 2009
// IME Status Window Control:
@@ -514,4 +518,27 @@ inline void Application::EndYield()
PostUserEvent( Link() );
}
+//IAccessibility2 Implementation 2009-----
+#ifdef WNT
+VCL_DLLPUBLIC sal_Bool HasAtHook();
+VCL_DLLPUBLIC bool IsWNTInitAccessBridge();
+bool WNTEnableAccessInterface(bool bEnable);
+
+class VCL_DLLPUBLIC CEnableAccessInterface
+{
+public:
+ CEnableAccessInterface(bool bEnable = false)
+ {
+ m_bIsEnableAccessInterface = Application::IsEnableAccessInterface();
+ Application::EnableAccessInterface(bEnable);
+ }
+ ~CEnableAccessInterface()
+ {
+ Application::EnableAccessInterface(m_bIsEnableAccessInterface);
+ }
+private:
+ bool m_bIsEnableAccessInterface;
+};
+#endif
+//-----IAccessibility2 Implementation 2009
#endif // _APP_HXX
diff --git a/vcl/inc/vcl/vclevent.hxx b/vcl/inc/vcl/vclevent.hxx
index 1c35e8658fc1..7ce655c1ff7d 100644
--- a/vcl/inc/vcl/vclevent.hxx
+++ b/vcl/inc/vcl/vclevent.hxx
@@ -153,6 +153,10 @@ namespace com { namespace sun { namespace star {
#define VCLEVENT_ITEM_COLLAPSED 1175
// <--
#define VCLEVENT_DROPDOWN_PRE_OPEN 1176
+//IAccessibility2 Implementation 2009-----
+#define VCLEVENT_LISTBOX_FOCUSITEMCHANGED 1180
+// #define VCLEVENT_EDIT_CARETCHANGED xxxx // IA2 CWS. MT: VCL only has selection API - difference for selection_changed vs. caret_changed is handled in accessibility wrapper since OOo 3.2
+//-----IAccessibility2 Implementation 2009
// VclMenuEvent
#define VCLEVENT_MENU_ACTIVATE 1200
@@ -171,24 +175,39 @@ namespace com { namespace sun { namespace star {
#define VCLEVENT_MENU_ITEMCHECKED 1213
#define VCLEVENT_MENU_ITEMUNCHECKED 1214
#define VCLEVENT_MENU_ACCESSIBLENAMECHANGED 1215
+//IAccessibility2 Implementation 2009-----
+#define VCLEVENT_TOOLBOX_ITEMWINDOWCHANGED 1216
+#define VCLEVENT_TOOLBOX_ITEMUPDATED 1217
+//-----IAccessibility2 Implementation 2009
#define VCLEVENT_MENU_SHOW 1250
#define VCLEVENT_MENU_HIDE 1251
#define VCLEVENT_TOOLBOX_ITEMWINDOWCHANGED 1216
-
+//IAccessibility2 Implementation 2009-----
+#define VCLEVENT_LISTBOX_TREEEXPAND 1218
+#define VCLEVENT_LISTBOX_TREECOLLAPSE 1219
+#define VCLEVENT_LISTBOX_TREEFOCUS 1220
+#define VCLEVENT_LISTBOX_TREESELECT 1221
+#define VCLEVENT_EDIT_CARETCHANGED 1222
+#define VCLEVENT_COMBOBOX_UPDATEVALUE 1223
+
+#define VCLEVENT_LISTBOX_FOCUS 1224
+#define VCLEVENT_LISTBOX_CLEAR 1225
+//-----IAccessibility2 Implementation 2009
// DockingWindow
-#define VCLEVENT_WINDOW_STARTDOCKING 1217 // pData = DockingData
-#define VCLEVENT_WINDOW_DOCKING 1218
-#define VCLEVENT_WINDOW_ENDDOCKING 1219 // pData = EndDockingData
-#define VCLEVENT_WINDOW_PREPARETOGGLEFLOATING 1220 // pData = sal_Bool
-#define VCLEVENT_WINDOW_TOGGLEFLOATING 1221
-#define VCLEVENT_WINDOW_ENDPOPUPMODE 1222 // pData = EndPopupModeData
-
-#define VCLEVENT_TOOLBOX_BUTTONSTATECHANGED 1223 // pData = itempos
-#define VCLEVENT_TABLECELL_NAMECHANGED 1224 // pData = struct(Entry, Column, oldText)
-#define VCLEVENT_TABLEROW_SELECT 1225
-
+#define VCLEVENT_WINDOW_STARTDOCKING 1227 // pData = DockingData
+#define VCLEVENT_WINDOW_DOCKING 1228
+#define VCLEVENT_WINDOW_ENDDOCKING 1229 // pData = EndDockingData
+#define VCLEVENT_WINDOW_PREPARETOGGLEFLOATING 1230 // pData = sal_Bool
+#define VCLEVENT_WINDOW_TOGGLEFLOATING 1231
+#define VCLEVENT_WINDOW_ENDPOPUPMODE 1232 // pData = EndPopupModeData
+
+#define VCLEVENT_TOOLBOX_BUTTONSTATECHANGED 1233 // pData = itempos
+#define VCLEVENT_TABLECELL_NAMECHANGED 1234 // pData = struct(Entry, Column, oldText)
+#define VCLEVENT_TABLEROW_SELECT 1235
+// IAccessible2 implementation 2009
+#define VCLEVENT_LISTBOX_STATEUPDATE 1236
class VCL_DLLPUBLIC VclSimpleEvent
{
private:
diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
index 5fefaa105bcc..092a4563f0fe 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -629,6 +629,11 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
virtual long PreNotify( NotifyEvent& rNEvt );
virtual long Notify( NotifyEvent& rNEvt );
+//IAccessibility2 Implementation 2009-----
+ virtual void NotifyVCLEvent( sal_uLong nEvent ,void* pData = NULL);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > GetAccFlowToSequence();
+ virtual void SwitchView() {}
+//-----IAccessibility2 Implementation 2009
virtual Window* GetPreferredKeyInputWindow();
/*virtual*/ void AddEventListener( const Link& rEventListener );
diff --git a/vcl/inc/win/g_msaasvc.h b/vcl/inc/win/g_msaasvc.h
new file mode 100644
index 000000000000..2aa79e7c6b54
--- /dev/null
+++ b/vcl/inc/win/g_msaasvc.h
@@ -0,0 +1,26 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef _SV_G_MSASSVR_H_
+#define _SV_G_MSASSVR_H_
+extern com::sun::star::accessibility::XMSAAService* g_acc_manager1;
+#endif
+
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 345dd8e120ee..2d444cb3943c 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -24,7 +24,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-//#include "svsys.h"
+#include "svsys.h"
#include "comphelper/processfactory.hxx"
@@ -77,6 +77,10 @@
#include <utility>
+#ifdef WNT
+#include <tchar.h>
+#endif
+
using namespace ::com::sun::star::uno;
// keycodes handled internally by VCL
@@ -2045,7 +2049,13 @@ void Application::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const r
sal_Bool Application::IsAccessibilityEnabled()
{
+//IAccessible2 Implementation 2009-----
+#ifdef WNT
+ return IsWNTInitAccessBridge();
+#else
return sal_False;
+#endif
+//-----IAccessible2 Implementation 2009
}
sal_Bool InitAccessBridge( sal_Bool bShowCancel, sal_Bool &rCancelled )
@@ -2057,22 +2067,52 @@ sal_Bool InitAccessBridge( sal_Bool bShowCancel, sal_Bool &rCancelled )
(void) bShowCancel; // unsued
(void) rCancelled; // unused
#else
- bRet = ImplInitAccessBridge( bShowCancel, rCancelled );
+ // Checking HasAtHook() was introduced with IBM's IA2 CWS.
+ if( HasAtHook() )
+ {
+ bRet = ImplInitAccessBridge( bShowCancel, rCancelled );
- if( !bRet && bShowCancel && !rCancelled )
+ if( !bRet && bShowCancel && !rCancelled )
+ {
+ // disable accessibility if the user chooses to continue
+ AllSettings aSettings = Application::GetSettings();
+ MiscSettings aMisc = aSettings.GetMiscSettings();
+ aMisc.SetEnableATToolSupport( sal_False );
+ aSettings.SetMiscSettings( aMisc );
+ Application::SetSettings( aSettings );
+ }
+ }
+ else
{
- // disable accessibility if the user chooses to continue
- AllSettings aSettings = Application::GetSettings();
- MiscSettings aMisc = aSettings.GetMiscSettings();
- aMisc.SetEnableATToolSupport( sal_False );
- aSettings.SetMiscSettings( aMisc );
- Application::SetSettings( aSettings );
+ bRet = false;
}
#endif // !UNX
return bRet;
}
+//IAccessible2 Implementation 2009-----
+#ifdef WNT
+sal_Bool HasAtHook()
+{
+ sal_Int32 bIsRuning=0;
+ // BOOL WINAPI SystemParametersInfo(
+ // __in UINT uiAction,
+ // __in UINT uiParam,
+ // __inout PVOID pvParam,
+ // __in UINT fWinIni
+ // );
+ // pvParam must be BOOL (defined in MFC as int)
+ // End
+ if(SystemParametersInfo(SPI_GETSCREENREADER,0,&bIsRuning,0))
+ {
+ if( bIsRuning )
+ return sal_True;
+ }
+ return sal_False;
+}
+#endif
+//-----IAccessible2 Implementation 2009
// MT: AppProperty, AppEvent was in oldsv.cxx, but is still needed...
// ------------------------------------------------------------------------
@@ -2090,6 +2130,21 @@ void Application::SetPropertyHandler( PropertyHandler* p )
delete pHandler;
pHandler = p;
}
+//IAccessible2 Implementation 2009-----
+bool Application::EnableAccessInterface(bool bEnable)
+{
+#ifdef WNT
+ return WNTEnableAccessInterface(bEnable);
+#else
+ bEnable = true; // avoid compiler warning
+ return true;
+#endif
+}
+bool Application::IsEnableAccessInterface()
+{
+ return ImplGetSVData()->maAppData.m_bEnableAccessInterface;
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index b0b68c84a71e..3de00e690507 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -36,6 +36,16 @@
#include "unotools/fontcfg.hxx"
+//IAccessible2 Implementation 2009-----
+#ifdef WNT
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#endif
+#endif
+//-----IAccessible2 Implementation 2009
#include "vos/mutex.hxx"
#include "cppuhelper/implbase1.hxx"
@@ -67,6 +77,13 @@
#include "com/sun/star/java/JavaDisabledException.hpp"
#include <stdio.h>
+//IAccessible2 Implementation 2009-----
+#ifdef WNT
+#include <unotools/processfactory.hxx>
+#include <com/sun/star/accessibility/XMSAAService.hpp>
+#include <win/g_msaasvc.h>
+#endif
+//-----IAccessible2 Implementation 2009
namespace {
@@ -132,6 +149,12 @@ void ImplInitSVData()
break;
}
}
+//IAccessible2 Implementation 2009-----
+#ifdef WNT
+ //Default enable the acc bridge interface
+ pImplSVData->maAppData.m_bEnableAccessInterface =true;
+#endif
+//-----IAccessible2 Implementation 2009
// mark default layout border as unitialized
pImplSVData->maAppData.mnDefaultLayoutBorder = -1;
@@ -339,7 +362,89 @@ com::sun::star::uno::Any AccessBridgeCurrentContext::getValueByName( const rtl::
}
return ret;
}
+//IAccessible2 Implementation 2009-----
+#ifdef WNT
+void AccessBridgehandleExistingWindow(Window * pWindow, bool bShow)
+{
+ if ( pWindow )
+ {
+ css::uno::Reference< css::accessibility::XAccessible > xAccessible;
+
+ // Test for combo box - drop down floating windows first
+ Window * pParentWindow = pWindow->GetParent();
+
+ if ( pParentWindow )
+ {
+ try
+ {
+ // The parent window of a combo box floating window should have the role COMBO_BOX
+ css::uno::Reference< css::accessibility::XAccessible > xParentAccessible(pParentWindow->GetAccessible());
+ if ( xParentAccessible.is() )
+ {
+ css::uno::Reference< css::accessibility::XAccessibleContext > xParentAC( xParentAccessible->getAccessibleContext() );
+ if ( xParentAC.is() && (css::accessibility::AccessibleRole::COMBO_BOX == xParentAC->getAccessibleRole()) )
+ {
+ // O.k. - this is a combo box floating window corresponding to the child of role LIST of the parent.
+ // Let's not rely on a specific child order, just search for the child with the role LIST
+ sal_Int32 nCount = xParentAC->getAccessibleChildCount();
+ for ( sal_Int32 n = 0; (n < nCount) && !xAccessible.is(); n++)
+ {
+ css::uno::Reference< css::accessibility::XAccessible > xChild = xParentAC->getAccessibleChild(n);
+ if ( xChild.is() )
+ {
+ css::uno::Reference< css::accessibility::XAccessibleContext > xChildAC = xChild->getAccessibleContext();
+ if ( xChildAC.is() && (css::accessibility::AccessibleRole::LIST == xChildAC->getAccessibleRole()) )
+ {
+ xAccessible = xChild;
+ }
+ }
+ }
+ }
+ }
+ }
+ catch (::com::sun::star::uno::RuntimeException e)
+ {
+ // Ignore show events that throw DisposedExceptions in getAccessibleContext(),
+ // but keep revoking these windows in hide(s).
+ if (bShow)
+ return;
+ }
+ }
+ // We have to rely on the fact that Window::GetAccessible()->getAccessibleContext() returns a valid XAccessibleContext
+ // also for other menus than menubar or toplevel popup window. Otherwise we had to traverse the hierarchy to find the
+ // context object to this menu floater. This makes the call to Window->IsMenuFloatingWindow() obsolete.
+ if ( ! xAccessible.is() )
+ xAccessible = pWindow->GetAccessible();
+
+ if ( xAccessible.is() && g_acc_manager1 )
+ {
+ g_acc_manager1->handleWindowOpened( (long)(xAccessible.get()));
+ }
+ }
+}
+
+void AccessBridgeupdateOldTopWindows()
+{
+ sal_uInt16 nTopWindowCount = (sal_uInt16)Application::GetTopWindowCount();
+ for (sal_uInt16 i = 0; i < nTopWindowCount; i++)
+ {
+ Window* pTopWindow = Application::GetTopWindow( i );
+ css::uno::Reference< css::accessibility::XAccessible > xAccessible = pTopWindow->GetAccessible();
+ if ( xAccessible.is() )
+ {
+ css::uno::Reference< css::accessibility::XAccessibleContext > xAC(xAccessible->getAccessibleContext());
+ if ( xAC.is())
+ {
+ short role = xAC->getAccessibleRole();
+ if(xAC->getAccessibleName().getLength() > 0)
+ AccessBridgehandleExistingWindow(pTopWindow, true);
+ }
+ }
+ }
+}
+#endif
+//-----IAccessible2 Implementation 2009
bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
{
@@ -371,6 +476,22 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
if( xFactory.is() )
{
+//IAccessible2 Implementation 2009-----
+#ifdef WNT
+ pSVData->mxAccessBridge = xFactory->createInstance(
+ OUString::createFromAscii( "com.sun.star.accessibility.MSAAService" ) );
+ if( pSVData->mxAccessBridge.is() )
+ {
+ css::uno::Reference< css::uno::XInterface > pRManager= pSVData->mxAccessBridge;
+ g_acc_manager1 = (css::accessibility::XMSAAService*)(pRManager.get());
+ AccessBridgeupdateOldTopWindows();
+ }
+
+ if( !pSVData->mxAccessBridge.is() )
+ bSuccess = false;
+ return bSuccess;
+#endif
+//-----IAccessible2 Implementation 2009
css::uno::Reference< XExtendedToolkit > xToolkit =
css::uno::Reference< XExtendedToolkit >(Application::GetVCLToolkit(), UNO_QUERY);
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index fbe40be8c6c4..447bf638ce4a 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -55,6 +55,11 @@
#include <process.h> // for _beginthreadex
#include <ole2.h> // for _beginthreadex
#include <tools/postwin.h>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/XMSAAService.hpp>
+#include <win/g_msaasvc.h>
+using namespace com::sun::star::accessibility;
+//-----IAccessibility2 Implementation 2009
#endif
// [ed 5/14/02 Add in explicit check for quartz graphics. OS X will define
@@ -215,6 +220,12 @@ sal_Bool ImplSVMain()
}
DeInitVCL();
+//IAccessibility2 Implementation 2009-----
+ #ifdef WNT
+ if( g_acc_manager1 )
+ g_acc_manager1->release();
+ #endif
+//-----IAccessibility2 Implementation 2009
return bInit;
}
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index f95a4d39443c..4e771724421b 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -215,6 +215,9 @@ void ComboBox::ImplInit( Window* pParent, WinBits nStyle )
mpImplLB->SetDoubleClickHdl( LINK( this, ComboBox, ImplDoubleClickHdl ) );
mpImplLB->SetUserDrawHdl( LINK( this, ComboBox, ImplUserDrawHdl ) );
mpImplLB->SetSelectionChangedHdl( LINK( this, ComboBox, ImplSelectionChangedHdl ) );
+//IAccessibility2 Implementation 2009-----
+ mpImplLB->SetListItemSelectHdl( LINK( this, ComboBox, ImplListItemSelectHdl ) );
+//-----IAccessibility2 Implementation 2009
mpImplLB->Show();
if ( mpFloatWin )
@@ -273,7 +276,13 @@ sal_Bool ComboBox::IsAutocompleteEnabled() const
{
return mpSubEdit->GetAutocompleteHdl().IsSet();
}
-
+//IAccessibility2 Implementation 2009-----
+void ComboBox::SetMpSubEditAccessibleName(String &aName)
+{
+ if(mpSubEdit!=NULL)
+ mpSubEdit->SetAccessibleName(aName);
+}
+//-----IAccessibility2 Implementation 2009
// -----------------------------------------------------------------------
IMPL_LINK( ComboBox, ImplClickBtnHdl, void*, EMPTYARG )
@@ -468,7 +477,13 @@ IMPL_LINK( ComboBox, ImplSelectHdl, void*, EMPTYARG )
return 0;
}
-
+//IAccessibility2 Implementation 2009-----
+IMPL_LINK( ComboBox, ImplListItemSelectHdl, void*, EMPTYARG )
+{
+ ImplCallEventListeners( VCLEVENT_LISTBOX_SELECT );
+ return 1;
+}
+//-----IAccessibility2 Implementation 2009
// -----------------------------------------------------------------------
IMPL_LINK( ComboBox, ImplCancelHdl, void*, EMPTYARG )
@@ -1420,6 +1435,12 @@ sal_uInt16 ComboBox::GetMaxMRUCount() const
return mpImplLB->GetMaxMRUCount();
}
+//IAccessibility2 Implementation 2009-----
+sal_uInt16 ComboBox::GetMRUCount() const
+{
+ return mpImplLB->GetEntryList()->GetMRUCount();
+}
+//-----IAccessibility2 Implementation 2009
// -----------------------------------------------------------------------
sal_uInt16 ComboBox::GetDisplayLineCount() const
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 4c6c43dc911d..dbb8e5bdfc1a 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2498,8 +2498,10 @@ void Edit::Modify()
return;
// #i13677# notify edit listeners about caret position change
- ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
-
+//IAccessibility2 Implementation 2009-----
+ //ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
+ ImplCallEventListeners( VCLEVENT_EDIT_CARETCHANGED );
+//-----IAccessibility2 Implementation 2009
// FIXME: this is currently only on aqua
// check for other platforms that need similar handling
if( ImplGetSVData()->maNWFData.mbNoFocusRects &&
@@ -2654,15 +2656,37 @@ void Edit::ImplSetSelection( const Selection& rSelection, sal_Bool bPaint )
if ( aNew != maSelection )
{
ImplClearLayoutData();
+//IAccessibility2 Implementation 2009-----
+ Selection aTemp = maSelection;
+//-----IAccessibility2 Implementation 2009
maSelection = aNew;
if ( bPaint && ( aOld.Len() || aNew.Len() || IsPaintTransparent() ) )
ImplInvalidateOrRepaint( 0, maText.Len() );
ImplShowCursor();
- if ( mbIsSubEdit )
- ((Edit*)GetParent())->ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
- else
- ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
+//IAccessibility2 Implementation 2009-----
+ sal_Bool bCaret = sal_False, bSelection = sal_False;
+ long nB=aNew.Max(), nA=aNew.Min(),oB=aTemp.Max(), oA=aTemp.Min();
+ long nGap = nB-nA, oGap = oB-oA;
+ if (nB != oB)
+ bCaret = sal_True;
+ if (nGap != 0 || oGap != 0)
+ bSelection = sal_True;
+ if (bCaret)
+ {
+ if ( mbIsSubEdit )
+ ((Edit*)GetParent())->ImplCallEventListeners( VCLEVENT_EDIT_CARETCHANGED );
+ else
+ ImplCallEventListeners( VCLEVENT_EDIT_CARETCHANGED );
+ }
+ if (bSelection)
+ {
+ if ( mbIsSubEdit )
+ ((Edit*)GetParent())->ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
+ else
+ ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
+ }
+//-----IAccessibility2 Implementation 2009
// #103511# notify combobox listeners of deselection
if( !maSelection && GetParent() && GetParent()->GetType() == WINDOW_COMBOBOX )
((Edit*)GetParent())->ImplCallEventListeners( VCLEVENT_COMBOBOX_DESELECT );
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index c4d36d0965e5..377de69d0fa7 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -917,7 +917,11 @@ void ImplListBoxWindow::MouseButtonDown( const MouseEvent& rMEvt )
mnCurrentPos = nSelect;
mbTrackingSelect = true;
- SelectEntries( nSelect, LET_MBDOWN, rMEvt.IsShift(), rMEvt.IsMod1() );
+ //IAccessibility2 Impplementaton 2009-----
+ sal_Bool bCurPosChange = (mnCurrentPos != nSelect);
+ //SelectEntries( nSelect, LET_MBDOWN, rMEvt.IsShift(), rMEvt.IsMod1() );
+ SelectEntries( nSelect, LET_MBDOWN, rMEvt.IsShift(), rMEvt.IsMod1() ,bCurPosChange);
+ //-----IAccessibility2 Impplementaton 2009
mbTrackingSelect = false;
if ( mbGrabFocus )
GrabFocus();
@@ -988,6 +992,14 @@ void ImplListBoxWindow::MouseMove( const MouseEvent& rMEvt )
ImplCallSelect();
mbTravelSelect = false;
}
+//IAccessibility2 Implementation 2009----
+ // When list box selection change by mouse move, notity
+ // VCLEVENT_LISTBOX_SELECT vcl event.
+ else
+ {
+ maListItemSelectHdl.Call(NULL);
+ }
+//----IAccessibility2 Implementation 2009
}
mbTrackingSelect = false;
}
@@ -1075,7 +1087,7 @@ void ImplListBoxWindow::SelectEntry( sal_uInt16 nPos, sal_Bool bSelect )
// -----------------------------------------------------------------------
-sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift, sal_Bool bCtrl )
+sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift, sal_Bool bCtrl, sal_Bool bSelectPosChange /*=FALSE*/ )
{
sal_Bool bFocusChanged = sal_False;
sal_Bool bSelectionChanged = sal_False;
@@ -1220,6 +1232,12 @@ sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLE
maFocusRect.SetSize( aSz );
if( HasFocus() )
ImplShowFocusRect();
+//IAccessibility2 Implementation 2009----
+ if (bSelectPosChange)
+ {
+ maFocusHdl.Call(reinterpret_cast<void*>(nSelect));
+ }
+//----IAccessibility2 Implementation 2009
}
ImplClearLayoutData();
}
@@ -1682,8 +1700,12 @@ sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
DBG_ASSERT( !mpEntryList->IsEntryPosSelected( nSelect ) || mbMulti, "ImplListBox: Selecting same Entry" );
if( nSelect >= mpEntryList->GetEntryCount() )
nSelect = mpEntryList->GetEntryCount()-1;
+//IAccessibility2 Implementation 2009-----
+ sal_Bool bCurPosChange = (mnCurrentPos != nSelect);
mnCurrentPos = nSelect;
- if ( SelectEntries( nSelect, eLET, bShift, bCtrl ) )
+ //if ( SelectEntries( nSelect, eLET, bShift, bCtrl ) )
+ if(SelectEntries( nSelect, eLET, bShift, bCtrl ,bCurPosChange))
+//-----IAccessibility2 Implementation 2009
{
mbTravelSelect = true;
mnSelectModifier = rKEvt.GetKeyCode().GetModifier();
@@ -2158,7 +2180,10 @@ Rectangle ImplListBoxWindow::GetBoundingRectangle( sal_uInt16 nItem ) const
{
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nItem );
Size aSz( GetSizePixel().Width(), pEntry ? pEntry->mnHeight : GetEntryHeight() );
- long nY = mpEntryList->GetAddedHeight( nItem, GetTopEntry() ) - mpEntryList->GetAddedHeight( GetTopEntry() );
+ //long nY = mpEntryList->GetAddedHeight( nItem, GetTopEntry() ) - mpEntryList->GetAddedHeight( GetTopEntry() );
+ //IAccessibility2 Impplementaton 2009-----
+ long nY = mpEntryList->GetAddedHeight( nItem, GetTopEntry() ) + GetEntryList()->GetMRUCount()*GetEntryHeight();
+ //-----IAccessibility2 Impplementaton 2009
Rectangle aRect( Point( 0, nY ), aSz );
return aRect;
}
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 5b145263d888..1336b2e35f6f 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -170,6 +170,10 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle )
mpImplLB->SetCancelHdl( LINK( this, ListBox, ImplCancelHdl ) );
mpImplLB->SetDoubleClickHdl( LINK( this, ListBox, ImplDoubleClickHdl ) );
mpImplLB->SetUserDrawHdl( LINK( this, ListBox, ImplUserDrawHdl ) );
+//IAccessibility2 Implementation 2009-----
+ mpImplLB->SetFocusHdl( LINK( this, ListBox, ImplFocusHdl ) );
+ mpImplLB->SetListItemSelectHdl( LINK( this, ListBox, ImplListItemSelectHdl ) );
+//-----IAccessibility2 Implementation 2009
mpImplLB->SetPosPixel( Point() );
mpImplLB->SetEdgeBlending(GetEdgeBlending());
mpImplLB->Show();
@@ -249,6 +253,18 @@ IMPL_LINK( ListBox, ImplSelectHdl, void*, EMPTYARG )
return 1;
}
+//IAccessibility2 Implementation 2009-----
+IMPL_LINK( ListBox, ImplFocusHdl, void *, nPos )
+{
+ ImplCallEventListeners( VCLEVENT_LISTBOX_FOCUS , nPos);
+ return 1;
+}
+IMPL_LINK( ListBox, ImplListItemSelectHdl, void*, EMPTYARG )
+{
+ ImplCallEventListeners( VCLEVENT_LISTBOX_SELECT );
+ return 1;
+}
+//-----IAccessibility2 Implementation 2009
// -----------------------------------------------------------------------
@@ -1060,6 +1076,8 @@ void ListBox::SetNoSelection()
mpImplWin->SetImage( aImage );
mpImplWin->Invalidate();
}
+ // IAccessible2 implementation 2009
+ NotifyVCLEvent( VCLEVENT_LISTBOX_STATEUPDATE);
}
// -----------------------------------------------------------------------
@@ -1204,7 +1222,21 @@ void ListBox::SelectEntry( const XubString& rStr, sal_Bool bSelect )
void ListBox::SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect )
{
if ( nPos < mpImplLB->GetEntryList()->GetEntryCount() )
+ {
+ // IAccessible2 implementation 2009
+ sal_uInt16 oldSelectCount = GetSelectEntryCount(), newSelectCount = 0, nCurrentPos = mpImplLB->GetCurrentPos();
mpImplLB->SelectEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), bSelect );
+ newSelectCount = GetSelectEntryCount();
+ if (oldSelectCount == 0 && newSelectCount > 0)
+ NotifyVCLEvent( VCLEVENT_LISTBOX_STATEUPDATE);
+ //Only when bSelect == true, send both Selection & Focus events
+ if (nCurrentPos != nPos && bSelect)
+ {
+ ImplCallEventListeners( VCLEVENT_LISTBOX_SELECT, reinterpret_cast<void*>(nPos));
+ if (HasFocus())
+ ImplCallEventListeners( VCLEVENT_LISTBOX_FOCUS, reinterpret_cast<void*>(nPos));
+ }
+ }
}
// -----------------------------------------------------------------------
@@ -1605,6 +1637,12 @@ sal_uInt16 ListBox::GetMaxMRUCount() const
{
return mpImplLB->GetMaxMRUCount();
}
+//IAccessibility2 Implementation 2009-----
+sal_uInt16 ListBox::GetMRUCount() const
+{
+ return mpImplLB->GetEntryList()->GetMRUCount();
+}
+//-----IAccessibility2 Implementation 2009
// -----------------------------------------------------------------------
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index 13a4eca1d616..d109b9ca7f4b 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -155,7 +155,7 @@ void MoreButton::Click()
// Hier den Click-Handler rufen, damit vorher die Controls initialisiert
// werden koennen
- PushButton::Click();
+ //PushButton::Click(); // IAccessibility2 Implementation 2009
// Je nach Status die Fenster updaten
if ( mbState )
@@ -197,6 +197,9 @@ void MoreButton::Click()
pWindow = mpMBData->mpItemList->Next();
}
}
+//IAccessibility2 Implementation 2009-----
+ PushButton::Click();
+//-----IAccessibility2 Implementation 2009
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index e5633e5d4929..1cc3c66d7ef7 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -619,6 +619,9 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId )
}
pPage->ActivatePage();
+//IAccessibility2 Implementation 2009-----
+ pPage->Show();
+//-----IAccessibility2 Implementation 2009
if ( pOldPage && pOldPage->HasChildPathFocus() )
{
@@ -630,7 +633,9 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId )
GrabFocus();
}
- pPage->Show();
+//IAccessibility2 Implementation 2009-----
+ // pPage->Show();
+//-----IAccessibility2 Implementation 2009
}
if ( pOldPage )
diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index 7b5c850decb2..3bdc8ffea39d 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -289,6 +289,15 @@ void ButtonDialog::StateChanged( StateChangedType nType )
if ( nType == STATE_CHANGE_INITSHOW )
{
ImplPosControls();
+//IAccessibility2 Implementation 2009-----
+ ImplBtnDlgItem* pItem = mpItemList->First();
+ while ( pItem )
+ {
+ if ( pItem->mpPushButton && pItem->mbOwnButton )
+ pItem->mpPushButton->SetZOrder(0, WINDOW_ZORDER_LAST);
+ pItem = mpItemList->Next();
+ }
+//-----IAccessibility2 Implementation 2009
// Focus evt. auf den entsprechenden Button setzen
if ( mnFocusButtonId != BUTTONDIALOG_BUTTON_NOTFOUND )
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index 8ac6b6526684..a99860eb40f7 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -835,7 +835,18 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput )
if ( nStyle & WB_GROUP )
break;
- if ( pWindow->IsVisible() && pWindow->IsEnabled() && pWindow->IsInputEnabled() )
+//IAccessibility2 Implementation 2009-----
+ //Solution:Pure window shouldn't get window after controls such as buttons.
+ //if ( pWindow->IsVisible() && pWindow->IsEnabled() && pWindow->IsInputEnabled() )
+ if ( pWindow->IsVisible() && pWindow->IsEnabled() &&
+ pWindow->IsInputEnabled() && (
+ pWindow->GetType() != WINDOW_WINDOW &&
+ pWindow->GetType() != WINDOW_SYSWINDOW &&
+ pWindow->GetType() != WINDOW_WORKWINDOW &&
+ pWindow->GetType() != WINDOW_CONTROL
+ )
+ )
+//-----IAccessibility2 Implementation 2009
{
pWindow->ImplControlFocus( GETFOCUS_CURSOR | GETFOCUS_BACKWARD );
return sal_True;
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index b6f60fd28f45..cd190da9320d 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1573,6 +1573,36 @@ sal_uInt16 Menu::GetCurItemId() const
{
return nSelectedId;
}
+//IAccessibility2 Implementation 2009
+void Menu::SetHightlightItem( sal_uInt16 nHighlightedItem )
+{
+ this->nHighlightedItem = nHighlightedItem;
+}
+sal_uInt16 Menu::GetHighlightItem() const
+{
+ return nHighlightedItem;
+}
+
+
+XubString Menu::GetItemAccKeyStrFromPos(sal_uInt16 nPos) const
+{
+ MenuItemData* pData = pItemList->GetDataFromPos( nPos );
+ if (pData)
+ {
+ return pData->aAccelKey.GetName();
+ }
+ return XubString();
+}
+
+sal_Bool Menu::IsTemporaryItemFromPos(sal_uInt16 nPos ) const
+{
+ MenuItemData* pData = pItemList->GetDataFromPos( nPos );
+ if (pData)
+ {
+ return pData->bIsTemporary;
+ }
+ return sal_False;
+}
void Menu::SetItemBits( sal_uInt16 nItemId, MenuItemBits nBits )
{
@@ -3728,7 +3758,12 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong
String aTmpEntryText( ResId( SV_RESID_STRING_NOSELECTIONPOSSIBLE, *pResMgr ) );
MenuItemData* pData = pItemList->Insert(
0xFFFF, MENUITEM_STRING, 0, aTmpEntryText, Image(), NULL, 0xFFFF );
+//IAccessibility2 Implementation 2009-----
+ sal_uInt16 nmPos;
+ pData = pItemList->GetData( pData->nId, nmPos );
pData->bIsTemporary = sal_True;
+ ImplCallEventListeners(VCLEVENT_MENU_SUBMENUCHANGED,nmPos);
+//-----IAccessibility2 Implementation 2009
}
}
else if ( Application::GetSettings().GetStyleSettings().GetAutoMnemonic() && !( nMenuFlags & MENU_FLAG_NOAUTOMNEMONICS ) )
@@ -4005,7 +4040,9 @@ void MenuFloatingWindow::doShutdown()
// otherwise the entry will not be read when the menu is opened again
if( nHighlightedItem != ITEMPOS_INVALID )
pMenu->ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, nHighlightedItem );
-
+//IAccessibility2 Implementation 2009-----
+ pMenu->SetHightlightItem(ITEMPOS_INVALID);
+//-----IAccessibility2 Implementation 2009
if( !bKeyInput && pMenu && pMenu->pStartedFrom && !pMenu->pStartedFrom->bIsMenuBar )
{
// #102461# remove highlight in parent
@@ -4676,6 +4713,9 @@ void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bStartPopup
}
}
HighlightItem( nHighlightedItem, sal_True );
+//IAccessibility2 Implementation 2009-----
+ pMenu->SetHightlightItem(nHighlightedItem);
+//-----IAccessibility2 Implementation 2009
pMenu->ImplCallHighlight( nHighlightedItem );
}
else
@@ -4977,6 +5017,10 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
MenuFloatingWindow* pFloat = ((PopupMenu*)pMenu->pStartedFrom)->ImplGetFloatingWindow();
pFloat->GrabFocus();
pFloat->KillActivePopup();
+//IAccessibility2 Implementation 2009-----
+ sal_uInt16 highlightItem = pFloat->GetHighlightedItem();
+ pFloat->ChangeHighlightItem(highlightItem, sal_False);
+//-----IAccessibility2 Implementation 2009
}
}
}
@@ -5566,6 +5610,9 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sa
nHighlightedItem = (sal_uInt16)n;
DBG_ASSERT( ( nHighlightedItem == ITEMPOS_INVALID ) || pMenu->ImplIsVisible( nHighlightedItem ), "ChangeHighlightItem: Not visible!" );
HighlightItem( nHighlightedItem, sal_True );
+//IAccessibility2 Implementation 2009-----
+ pMenu->SetHightlightItem(nHighlightedItem);
+//-----IAccessibility2 Implementation 2009
pMenu->ImplCallHighlight( nHighlightedItem );
if( mbAutoPopup )
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 183654fd0390..b1b7b66d2f0d 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -6065,6 +6065,11 @@ void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, sal_Bool bNoGrabFocus )
mnCurPos = aPos;
ImplShowFocus();
+//IAccessibility2 Implementation 2009-----
+ if( pItem->mpWindow )
+ pItem->mpWindow->GrabFocus();
+ if( pItem != pOldItem )
+//-----IAccessibility2 Implementation 2009
ImplCallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHT );
}
}
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 1b9ad4e84e16..1f4c6cc7c5f3 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1737,7 +1737,11 @@ void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState )
ImplCallEventListeners( VCLEVENT_TOOLBOX_BUTTONSTATECHANGED, reinterpret_cast< void* >( nPos ) );
// Notify
- ImplCallEventListeners( VCLEVENT_TOOLBOX_CLICK, reinterpret_cast< void* >( nPos ) );
+//IAccessibility2 Implementation 2009-----
+ //Solution:Call accessivle listener to notify state_changed event
+ ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMUPDATED,reinterpret_cast< void* >(nPos) );
+ //ImplCallEventListeners( VCLEVENT_TOOLBOX_CLICK, reinterpret_cast< void* >( nPos ) );
+//-----IAccessibility2 Implementation 2009
}
}
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 408c5b3c930e..bd04c3ab34b0 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -5397,6 +5397,15 @@ long Window::Notify( NotifyEvent& rNEvt )
return nRet;
}
+// IAccessible2 implementation, 2009
+void Window::NotifyVCLEvent( sal_uLong nEvent ,void* pData /*= NULL*/)
+{
+ ImplCallEventListeners( nEvent ,pData);
+}
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > Window::GetAccFlowToSequence()
+{
+ return ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >();
+}
// -----------------------------------------------------------------------
void Window::ImplCallEventListeners( sal_uLong nEvent, void* pData )
@@ -9097,10 +9106,11 @@ sal_uInt16 Window::GetAccessibleRole() const
case WINDOW_CANCELBUTTON:
case WINDOW_HELPBUTTON:
case WINDOW_IMAGEBUTTON:
- case WINDOW_MENUBUTTON:
+ //case WINDOW_MENUBUTTON:
case WINDOW_MOREBUTTON:
case WINDOW_SPINBUTTON:
case WINDOW_BUTTON: nRole = accessibility::AccessibleRole::PUSH_BUTTON; break;
+ case WINDOW_MENUBUTTON: nRole = accessibility::AccessibleRole::BUTTON_MENU; break;
case WINDOW_PATHDIALOG: nRole = accessibility::AccessibleRole::DIRECTORY_PANE; break;
case WINDOW_FILEDIALOG: nRole = accessibility::AccessibleRole::FILE_CHOOSER; break;
@@ -9115,10 +9125,15 @@ sal_uInt16 Window::GetAccessibleRole() const
case WINDOW_MULTILINEEDIT: nRole = accessibility::AccessibleRole::SCROLL_PANE; break;
case WINDOW_PATTERNFIELD:
+//IAccessibility2 Impplementaton 2009-----
+ // Need to set the role of those window control to spinbox
+ /*
case WINDOW_NUMERICFIELD:
case WINDOW_METRICFIELD:
case WINDOW_CURRENCYFIELD:
case WINDOW_LONGCURRENCYFIELD:
+ */
+//-----IAccessibility2 Impplementaton 2009
case WINDOW_EDIT: nRole = ( GetStyle() & WB_PASSWORD ) ? (accessibility::AccessibleRole::PASSWORD_TEXT) : (accessibility::AccessibleRole::TEXT); break;
case WINDOW_PATTERNBOX:
@@ -9135,7 +9150,17 @@ sal_uInt16 Window::GetAccessibleRole() const
case WINDOW_FIXEDTEXT: nRole = accessibility::AccessibleRole::LABEL; break;
case WINDOW_FIXEDBORDER:
- case WINDOW_FIXEDLINE: nRole = accessibility::AccessibleRole::SEPARATOR; break;
+ nRole = accessibility::AccessibleRole::SEPARATOR; break;
+ //IAccessibility2 Impplementaton 2009-----
+ case WINDOW_FIXEDLINE:
+ { if( GetText().Len() > 0 )
+ nRole = accessibility::AccessibleRole::LABEL;
+ else
+ nRole = accessibility::AccessibleRole::SEPARATOR;
+ break;
+ }
+ //case WINDOW_FIXEDLINE: nRole = accessibility::AccessibleRole::SEPARATOR; break;
+ //-----IAccessibility2 Impplementaton 2009
case WINDOW_FIXEDBITMAP:
case WINDOW_FIXEDIMAGE: nRole = accessibility::AccessibleRole::ICON; break;
case WINDOW_GROUPBOX: nRole = accessibility::AccessibleRole::GROUP_BOX; break;
@@ -9150,6 +9175,13 @@ sal_uInt16 Window::GetAccessibleRole() const
case WINDOW_DATEFIELD:
case WINDOW_TIMEFIELD: nRole = accessibility::AccessibleRole::DATE_EDITOR; break;
+//IAccessibility2 Impplementaton 2009-----
+ // Need to set the role of those window control to spinbox
+ case WINDOW_NUMERICFIELD:
+ case WINDOW_METRICFIELD:
+ case WINDOW_CURRENCYFIELD:
+ case WINDOW_LONGCURRENCYFIELD:
+//-----IAccessibility2 Impplementaton 2009
case WINDOW_SPINFIELD: nRole = accessibility::AccessibleRole::SPIN_BOX; break;
case WINDOW_TOOLBOX: nRole = accessibility::AccessibleRole::TOOL_BAR; break;
@@ -9201,8 +9233,12 @@ void Window::SetAccessibleName( const String& rName )
if ( !mpWindowImpl->mpAccessibleInfos )
mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos;
+//IAccessibility2 Implementation 2009-----
+ String oldName = GetAccessibleName();
delete mpWindowImpl->mpAccessibleInfos->pAccessibleName;
mpWindowImpl->mpAccessibleInfos->pAccessibleName = new String( rName );
+ ImplCallEventListeners( VCLEVENT_WINDOW_FRAMETITLECHANGED, &oldName );
+//-----IAccessibility2 Implementation 2009
}
String Window::GetAccessibleName() const
@@ -9247,6 +9283,12 @@ String Window::GetAccessibleName() const
if ( pLabel && pLabel != this )
aAccessibleName = pLabel->GetText();
}
+ //IAccessibility2 Implementation 2009-----
+ if ( !aAccessibleName.Len() )
+ {
+ aAccessibleName = GetQuickHelpText();
+ }
+ //-----IAccessibility2 Implementation 2009
break;
case WINDOW_IMAGEBUTTON:
@@ -9260,6 +9302,16 @@ String Window::GetAccessibleName() const
}
break;
+//IAccessibility2 Implementation 2009-----
+ case WINDOW_TOOLBOX:
+ aAccessibleName = GetText();
+ if( aAccessibleName.Len() == 0 )
+ aAccessibleName =XubString( RTL_CONSTASCII_USTRINGPARAM( "Tool Bar" ) );
+ break;
+ case WINDOW_MOREBUTTON:
+ aAccessibleName = mpWindowImpl->maText;
+ break;
+//-----IAccessibility2 Implementation 2009
default:
aAccessibleName = GetText();
break;
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index e0db2d123503..7375c9406d6f 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -92,6 +92,16 @@
using ::std::max;
#endif
+//IAccessibility2 Implementation 2009-----
+#ifdef WNT
+#include <oleacc.h>
+#include <com/sun/star/accessibility/XMSAAService.hpp>
+#ifndef _WIN32_WCE
+#define WM_GETOBJECT 0x003D
+#endif
+#include <win/g_msaasvc.h>
+#endif
+//-----IAccessibility2 Implementation 2009
#include <com/sun/star/uno/Exception.hdl>
#include <time.h>
@@ -153,7 +163,12 @@ sal_Bool WinSalFrame::mbInReparent = FALSE;
#define Uni_SupplementaryPlanesStart 0x10000
// =======================================================================
-
+//IAccessibility2 Implementation 2009-----
+#ifdef WNT
+using namespace ::com::sun::star::accessibility;
+XMSAAService* g_acc_manager1 = NULL;
+#endif
+//-----IAccessibility2 Implementation 2009
static void UpdateFrameGeometry( HWND hWnd, WinSalFrame* pFrame );
static void SetMaximizedFrameGeometry( HWND hWnd, WinSalFrame* pFrame, RECT* pParentRect = NULL );
@@ -6178,6 +6193,62 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
case WM_IME_NOTIFY:
ImplHandleIMENotify( hWnd, wParam );
break;
+
+//IAccessibility2 implementation 2009-----
+#ifdef WNT
+ case WM_GETOBJECT:
+ {
+ if (!Application::IsEnableAccessInterface())
+ {
+ break;
+ }
+ else
+ {
+ // IA2 should be enabled automatically
+ AllSettings aSettings = Application::GetSettings();
+ MiscSettings aMisc = aSettings.GetMiscSettings();
+ aMisc.SetEnableATToolSupport( sal_True );
+ aSettings.SetMiscSettings( aMisc );
+ Application::SetSettings( aSettings );
+
+ if (Application::GetSettings().GetMiscSettings().GetEnableATToolSupport())
+ {
+ // Make sure to launch Accessibiliity only the following criterias are satisfied to avoid RFT interrupts regular acc processing
+ if (g_acc_manager1 == NULL)
+ {
+ sal_Bool bCancelled;
+ InitAccessBridge(sal_False,bCancelled);
+ if( bCancelled )
+ break;
+ }
+ if (g_acc_manager1 != NULL)
+ {
+ // MT: mhOnSetTitleWnd not set to reasonable value anywhere...
+ /*
+ sal_Bool bSkipSetTitleClient = sal_False;
+ SalFrame* pFrame = GetWindowPtr( hWnd );
+ if(pFrame)
+ {
+ bSkipSetTitleClient = (lParam == OBJID_CLIENT && hWnd == ((WinSalFrame*)pFrame)->mhOnSetTitleWnd);
+ }
+ */
+ if ( (lParam == OBJID_CLIENT ) /* && !bSkipSetTitleClient */ )
+ {
+ long RetResult = g_acc_manager1->getAccObjectPtr((long)hWnd, lParam, wParam);
+ if(RetResult != 0)
+ {
+ rDef = FALSE;
+ return (HRESULT)RetResult;
+ }
+ }
+ }
+ }
+ }
+ break;
+ }
+#endif
+//-----IAccessibility2 implementation 2009
+
case WM_APPCOMMAND:
if( ImplHandleAppCommand( hWnd, lParam ) )
{
@@ -6398,3 +6469,25 @@ sal_Bool ImplWriteLastError( DWORD lastError, const char *szApiCall )
// -----------------------------------------------------------------------
+//IAccessibility2 implementation 2009-----
+#ifdef WNT
+bool IsWNTInitAccessBridge()
+{
+ return NULL != g_acc_manager1;
+}
+#endif
+#ifdef WNT
+bool WNTEnableAccessInterface(bool bEnable)
+{
+ ImplSVData* pSVData = ImplGetSVData();
+
+ BOOL bPreVal = pSVData->maAppData.m_bEnableAccessInterface;
+ long nEnable= bEnable;
+ ::InterlockedExchange(
+ (LPLONG)&(pSVData->maAppData.m_bEnableAccessInterface),
+ nEnable);
+
+ return bPreVal;
+}
+#endif
+//-----IAccessibility2 implementation 2009
diff --git a/winaccessibility/inc/AccComponentEventListener.hxx b/winaccessibility/inc/AccComponentEventListener.hxx
new file mode 100644
index 000000000000..1f9c37e5d76b
--- /dev/null
+++ b/winaccessibility/inc/AccComponentEventListener.hxx
@@ -0,0 +1,78 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCCOMPONENTEVENTLISTENER_HXX
+#define __ACCCOMPONENTEVENTLISTENER_HXX
+
+#include <stdio.h>
+#include "AccEventListener.hxx"
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+
+using namespace ::com::sun::star::uno;
+/**
+ * AccComponentEventListener is inherited from AccEventListener. It handles the evnets
+ * generated by component controls. The accessible roles are: CHECK_BOX, ICON, LABEL,
+ * MENU_ITEM, PUSH_BUTTON, RADIO_BUTTON, SCROLL_BAR, SEPARATOR, TOGGLE_BUTTON, TOOL_TIP, SPIN_BOX.
+ * It defines the procedure of specific event handling related with components and provides
+ * the detailed support for some related methods.
+ */
+class AccComponentEventListener: public AccEventListener
+{
+private:
+ static FILE *output, *output2, *output3, *outacc;//used for debugging
+public:
+ AccComponentEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
+ virtual ~AccComponentEventListener();
+
+ //AccessibleEventListener
+ virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ //for value changed event
+ virtual void SAL_CALL handleValueChangedEvent(Any oldValue, Any newValue);
+
+ //for action changed event
+ virtual void SAL_CALL handleActionChangedEvent();
+
+ //for text changed event
+ virtual void SAL_CALL handleTextChangedEvent(Any oldValue, Any newValue);
+
+ //for caret changed event
+ virtual void SAL_CALL handleCaretChangedEvent(Any oldValue, Any newValue);
+
+ //for visible data changed event
+ virtual void SAL_CALL handleVisibleDataChangedEvent();
+
+ //for bound rect changed event
+ virtual void SAL_CALL handleBoundrectChangedEvent();
+
+ virtual void SAL_CALL setComponentState(short state, bool enable);
+ virtual void SAL_CALL fireStatePropertyChange(short state, bool set
+ );
+ virtual void SAL_CALL fireStateFocusdChange(bool enable);
+
+ void handleSelectionChangedEvent();
+
+ //add TEXT_SELECTION_CHANGED event
+ void handleTextSelectionChangedEvent();
+};
+
+#endif
diff --git a/winaccessibility/inc/AccContainerEventListener.hxx b/winaccessibility/inc/AccContainerEventListener.hxx
new file mode 100644
index 000000000000..fb354bc69617
--- /dev/null
+++ b/winaccessibility/inc/AccContainerEventListener.hxx
@@ -0,0 +1,98 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCCONTAINEREVENTLISTENERHXX
+#define __ACCCONTAINEREVENTLISTENERHXX
+
+#include <stdio.h>
+#include "AccEventListener.hxx"
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+
+using namespace ::com::sun::star::uno;
+
+/**
+ * AccContainerEventListener is inherited from AccEventListener. It handles the evnets
+ * generated by container controls. The accessible roles are: CANVAS, COMBO_BOX, DOCUMENT,
+ * EMBEDDED_OBJECT, END_NOTE, FILLER, FOOTNOTE, FOOTER, GRAPHIC, HEADER, LAYERED_PANE,
+ * MENU_BAR, POPUP_MENU, OPTION_PANE, PAGE_TAB, PAGE_TAB_LIST, PANEL, SCROLL_PANE, SPLIT_PANE,
+ * STATUS_BAR, TABLE_CELL, TEXT_FRAME, TOOL_BAR, VIEW_PORT.
+ * It defines the procedure of specific event handling related with containsers and provides
+ * the detailed support for some related methods.
+ */
+class AccContainerEventListener: public AccEventListener
+{
+public:
+ AccContainerEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
+ virtual ~AccContainerEventListener();
+
+ //AccessibleEventListener
+ virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ //for child changed event
+ virtual void SAL_CALL handleChildChangedEvent(Any oldValue, Any newValue);
+
+ //for selection changed event
+ virtual void SAL_CALL handleSelectionChangedEvent(const Any &oldValue, const Any &newValue);
+
+ //for all children changed event
+ virtual void SAL_CALL handleAllChildrenChangedEvent();
+
+ //for text changed event
+ virtual void SAL_CALL handleTextChangedEvent(Any oldValue, Any newValue);
+ virtual void SAL_CALL handleStateChangedEvent(Any oldValue, Any newValue);
+
+ //for visible data changed event
+ virtual void SAL_CALL handleVisibleDataChangedEvent();
+
+ //for bound rect changed event
+ virtual void SAL_CALL handleBoundrectChangedEvent();
+
+ //for value changed event
+ virtual void SAL_CALL handleValueChangedEvent(Any oldValue, Any newValue);
+
+ //state changed
+ virtual void SAL_CALL setComponentState(short state, bool enable);
+ virtual void SAL_CALL fireStatePropertyChange(short state, bool set
+ );
+ virtual void SAL_CALL fireStateFocusdChange(bool enable);
+ virtual bool SAL_CALL IsEditable(Reference<com::sun::star::accessibility::XAccessibleContext> xContext);
+
+ // update all children's state
+ void SAL_CALL UpdateAllChildrenState( com::sun::star::accessibility::XAccessible* pXAccessible );
+
+ bool NotifyChildEvent(short nWinEvent,const Any &Value);
+
+ virtual void handleSelectionChangedAddEvent(const Any &oldValue, const Any &newValue);
+ virtual void handleSelectionChangedRemoveEvent(const Any &oldValue, const Any &newValue);
+ virtual void handleSelectionChangedWithinEvent(const Any &oldValue, const Any &newValue);
+
+ virtual void handlePageChangedEvent (const Any &oldValue, const Any &newValue);
+
+ virtual void handleSectionChangedEvent (const Any &oldValue, const Any &newValue);
+ virtual void handleColumnChangedEvent (const Any &oldValue, const Any &newValue);
+ //IAccessibility2 Implementation 2009-----
+ //for name changed event
+ virtual void SAL_CALL handleNameChangedEvent(Any name);
+ //-----IAccessibility2 Implementation 2009
+};
+
+#endif
diff --git a/winaccessibility/inc/AccDescendantManagerEventListener.hxx b/winaccessibility/inc/AccDescendantManagerEventListener.hxx
new file mode 100644
index 000000000000..c166c221a74f
--- /dev/null
+++ b/winaccessibility/inc/AccDescendantManagerEventListener.hxx
@@ -0,0 +1,64 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCDESCENDANTMANAGEREVENTLISTENER_HXX
+#define __ACCDESCENDANTMANAGEREVENTLISTENER_HXX
+
+#include <stdio.h>
+#include "AccComponentEventListener.hxx"
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+
+using namespace ::com::sun::star::uno;
+
+/**
+ * AccDescendantManagerEventListener is inherited from AccComponentEventListener. It handles
+ * the evnets generated by active descendant controls. They are: TREE, LIST, and TABLE.
+ * It defines the procedure of specific event handling related with active descendant components
+ * and provides the detailed support for some related methods.
+ */
+class AccDescendantManagerEventListener: public AccComponentEventListener
+{
+protected:
+ ::com::sun::star::accessibility::XAccessible* pActiveDescendant;
+public:
+ AccDescendantManagerEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
+ virtual ~AccDescendantManagerEventListener();
+
+ //AccessibleEventListener
+ virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ //for selection changed event
+ virtual void SAL_CALL handleSelectionChangedEvent(Any oldValue, Any newValue);
+
+ //for child changed event
+ virtual void SAL_CALL handleChildChangedEvent (Any oldValue, Any newValue);
+
+ virtual void SAL_CALL handleChildChangedNoFocusEvent(Any oldValue, Any newValue);
+
+ bool NotifyChildEvent(short nWinEvent,const Any &Value);
+
+ virtual void handleSelectionChangedAddEvent(const Any &oldValue, const Any &newValue);
+ virtual void handleSelectionChangedRemoveEvent(const Any &oldValue, const Any &newValue);
+ virtual void handleSelectionChangedWithinEvent(const Any &oldValue, const Any &newValue);
+};
+
+#endif
diff --git a/winaccessibility/inc/AccDialogEventListener.hxx b/winaccessibility/inc/AccDialogEventListener.hxx
new file mode 100644
index 000000000000..1ee76994aa37
--- /dev/null
+++ b/winaccessibility/inc/AccDialogEventListener.hxx
@@ -0,0 +1,63 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCDIALOGEVENTLISTENER_HXX
+#define __ACCDIALOGEVENTLISTENER_HXX
+
+#include <stdio.h>
+#include "AccEventListener.hxx"
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+
+using namespace ::com::sun::star::uno;
+
+/**
+ * AccDialogEventListener is inherited from AccEventListener. It handles the evnets
+ * generated by Dialogs. The accessible role is: DIALOG.
+ * It defines the procedure of specific event handling related with dialogs and provides
+ * the detailed support for some related methods.
+ */
+class AccDialogEventListener: public AccEventListener
+{
+public:
+ AccDialogEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
+ virtual ~AccDialogEventListener();
+
+ //AccessibleEventListener
+ virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ //for child changed event
+ virtual void SAL_CALL handleChildChangedEvent (Any oldValue, Any newValue);
+
+ //for visible data changed event
+ virtual void SAL_CALL handleVisibleDataChangedEvent();
+
+ //for bound rect changed event
+ virtual void SAL_CALL handleBoundrectChangedEvent();
+
+ //state changed
+ virtual void SAL_CALL setComponentState(short state, bool enable);
+ //virtual void SAL_CALL fireStatePropertyChange(short state, bool set);
+ //virtual void SAL_CALL fireStateFocusdChange(bool enable);
+
+};
+
+#endif
diff --git a/winaccessibility/inc/AccEventListener.hxx b/winaccessibility/inc/AccEventListener.hxx
new file mode 100644
index 000000000000..1f824ca8e7f9
--- /dev/null
+++ b/winaccessibility/inc/AccEventListener.hxx
@@ -0,0 +1,90 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCEVENTLISTENER_HXX
+#define __ACCEVENTLISTENER_HXX
+
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <cppuhelper/weak.hxx>
+#include <vos/mutex.hxx>
+
+class AccObjectManagerAgent;
+using namespace ::com::sun::star::uno;
+/**
+ * AccEventListener is the general event listener for all controls. It defines the
+ * procedure of all the event handling and provides the basic support for some simple
+ * methods.
+ */
+class AccEventListener:
+ public com::sun::star::accessibility::XAccessibleEventListener,
+ public ::cppu::OWeakObject
+{
+private:
+ oslInterlockedCount m_refcount;
+protected:
+ //accessible owner's pointer
+ com::sun::star::accessibility::XAccessible* pAccessible;
+ //agent pointer for objects' manager
+ AccObjectManagerAgent* pAgent;
+ //disposed state indicator
+ bool m_isDisposed;
+ mutable ::vos::OMutex aRemoveMutex;
+public:
+ AccEventListener( com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
+ virtual ~AccEventListener();
+
+ //AccessibleEventListener
+ virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ //for name changed event
+ virtual void SAL_CALL handleNameChangedEvent(Any name);
+
+ //for description changed event
+ virtual void SAL_CALL handleDescriptionChangedEvent(Any desc);
+
+ //for state changed event
+ virtual void SAL_CALL handleStateChangedEvent (Any oldValue, Any newValue);
+ virtual void SAL_CALL setComponentState(short state, bool enable);
+ virtual void SAL_CALL fireStatePropertyChange(short state, bool set
+ );
+ virtual void SAL_CALL fireStateFocusdChange(bool enable);
+
+ //for bound rect changed event
+ virtual void SAL_CALL handleBoundrectChangedEvent();
+
+ //for visible data changed event
+ virtual void SAL_CALL handleVisibleDataChangedEvent();
+
+ //for interface
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+ //get the accessible role of pAccessible
+ virtual short SAL_CALL getRole();
+ //get the accessible parent's role
+ virtual short SAL_CALL getParentRole();
+public:
+ void removeMeFromBroadcaster();
+};
+
+#endif
diff --git a/winaccessibility/inc/AccFrameEventListener.hxx b/winaccessibility/inc/AccFrameEventListener.hxx
new file mode 100644
index 000000000000..28efe968b204
--- /dev/null
+++ b/winaccessibility/inc/AccFrameEventListener.hxx
@@ -0,0 +1,63 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCFRAMEEVENTLISTENER_HXX
+#define __ACCFRAMEEVENTLISTENER_HXX
+
+#include <stdio.h>
+#include "AccEventListener.hxx"
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+
+using namespace ::com::sun::star::uno;
+
+/**
+ * AccFrameEventListener is inherited from AccEventListener. It handles the evnets
+ * generated by Dialogs. The accessible roles are: FRAME and ROOT_PANE.
+ * It defines the procedure of specific event handling related with frames and provides
+ * the detailed support for some related methods.
+ */
+class AccFrameEventListener: public AccEventListener
+{
+public:
+ AccFrameEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
+ virtual ~AccFrameEventListener();
+
+ //AccessibleEventListener
+ virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ //for child changed event
+ virtual void SAL_CALL handleChildChangedEvent(Any oldValue, Any newValue);
+
+ //for visible data changed event
+ virtual void SAL_CALL handleVisibleDataChangedEvent();
+
+ //for bound rect changed event
+ virtual void SAL_CALL handleBoundrectChangedEvent();
+
+ //state changed
+ virtual void SAL_CALL setComponentState(short state, bool enable);
+ //virtual void SAL_CALL fireStatePropertyChange(short state, bool set);
+ //virtual void SAL_CALL fireStateFocusdChange(bool enable);
+
+};
+
+#endif
diff --git a/winaccessibility/inc/AccListEventListener.hxx b/winaccessibility/inc/AccListEventListener.hxx
new file mode 100644
index 000000000000..581b4257d858
--- /dev/null
+++ b/winaccessibility/inc/AccListEventListener.hxx
@@ -0,0 +1,54 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCLISTEVENTLISTENER_HXX
+#define __ACCLISTEVENTLISTENER_HXX
+
+#include <stdio.h>
+#include "AccDescendantManagerEventListener.hxx"
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+
+using namespace ::com::sun::star::uno;
+
+/**
+ * AccListEventListener is inherited from AccDescendantManagerEventListener. It handles
+ * the evnets generated by tree controls. The accessible role is: LIST.
+ * It defines the procedure of specific event handling related with list components
+ * and provides the detailed support for some related methods.
+ */
+class AccListEventListener: public AccDescendantManagerEventListener
+{
+private:
+ bool shouldDeleteChild;
+public:
+ AccListEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
+ virtual ~AccListEventListener();
+
+ //AccessibleEventListener
+ virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+ //for active descendant changed event
+ virtual void SAL_CALL handleActiveDescendantChangedEvent(Any oldValue, Any newValue);
+ //for value changed event
+ virtual void SAL_CALL handleValueChangedEvent(Any oldValue, Any newValue);
+};
+
+#endif
diff --git a/winaccessibility/inc/AccMenuEventListener.hxx b/winaccessibility/inc/AccMenuEventListener.hxx
new file mode 100644
index 000000000000..ace58073b08f
--- /dev/null
+++ b/winaccessibility/inc/AccMenuEventListener.hxx
@@ -0,0 +1,57 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCMENUEVENTLISTENER_HXX
+#define __ACCMENUEVENTLISTENER_HXX
+
+#include <stdio.h>
+#include "AccComponentEventListener.hxx"
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+
+using namespace ::com::sun::star::uno;
+
+/**
+ * AccMenuEventListener is inherited from AccComponentEventListener. It handles the evnets
+ * generated by container controls. The accessible role is: MENU
+ * It defines the procedure of specific event handling related with menus and provides
+ * the detailed support for some related methods.
+ */
+class AccMenuEventListener: public AccComponentEventListener
+{
+public:
+ AccMenuEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
+ virtual ~AccMenuEventListener();
+
+ //AccessibleEventListener
+ virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ //for child changed event
+ virtual void SAL_CALL handleChildChangedEvent (Any oldValue, Any newValue);
+
+ //for selection changed event
+ virtual void SAL_CALL handleSelectionChangedEvent();
+
+ //for state changed event
+ virtual void SAL_CALL fireStatePropertyChange(short state, bool set );
+};
+
+#endif
diff --git a/winaccessibility/inc/AccObject.hxx b/winaccessibility/inc/AccObject.hxx
new file mode 100644
index 000000000000..feded8d80136
--- /dev/null
+++ b/winaccessibility/inc/AccObject.hxx
@@ -0,0 +1,130 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCOBJECT_HXX
+#define __ACCOBJECT_HXX
+
+#include <vector>
+#include <map>
+#include <oleacc.h>
+#include <windows.h>
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+
+#include "accHelper.hxx"
+#include "UAccCOM.h"
+
+class AccEventListener;
+class AccObjectManagerAgent;
+class AccObject;
+
+typedef std::map< const long, AccObject*,ltstr4 > IAccSelectionList;
+typedef std::vector<AccObject *> IAccChildList;
+
+
+class AccObject
+{
+private:
+
+ short m_accRole;
+ long m_resID;
+ HWND m_pParantID;
+ sal_Bool m_bShouldDestroy; //avoid access COM interface when acc object is deleted
+ IMAccessible* m_pIMAcc;
+ AccObject* m_pParentObj;
+ IAccChildList m_childrenList;
+ AccEventListener* m_accListener;
+ IAccSelectionList m_selectionList;
+
+ ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > m_xAccRef;
+ ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleAction > m_xAccActionRef;
+ ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext > m_xAccContextRef;
+
+ sal_Bool ImplInitilizeCreateObj();//create COM object
+
+ void UpdateActionDesc();
+ void UpdateRole();
+
+ DWORD GetMSAAStateFromUNO(short xState);//translate state from UNO to MSAA value
+ ::com::sun::star::accessibility::XAccessibleSelection* GetXAccessibleSelection();
+ void GetExpandedState(sal_Bool* isExpandable, sal_Bool* isExpanded);
+ ::rtl::OUString GetMAccessibleValueFromAny(::com::sun::star::uno::Any pAny);
+
+public:
+
+ AccObject ( ::com::sun::star::accessibility::XAccessible* pXAcc = NULL,AccObjectManagerAgent* pAgent = NULL ,AccEventListener* accListener=NULL);
+ virtual ~AccObject();
+
+ sal_Bool UpdateAccessibleInfoFromUnoToMSAA( ); //implement accessible information mapping
+ void UpdateDefaultAction();
+
+ IMAccessible* GetIMAccessible(); //return COM interface in acc object
+ ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > GetXAccessible();
+
+ void SetResID(long id);//ResID means ChildID in MSAA
+ long GetResID();
+
+
+ void SetParentHWND(HWND hWnd);//need to set top window handle when send event to AT
+ HWND GetParentHWND();
+
+ void SetListener( AccEventListener* Listener );
+ AccEventListener* getListener();
+
+ void SetParentObj(AccObject* pParentAccObj);
+ AccObject* GetParentObj();
+
+ void InsertChild( AccObject* pChild,short pos = LAST_CHILD);
+ void DeleteChild( AccObject* pChild );
+ AccObject* NextChild();
+
+ void NotifyDestroy(sal_Bool ifDelete);
+ sal_Bool ifShouldDestroy();
+
+ void DecreaseState(short xState );//call COM interface DecreaseState method
+ void IncreaseState( short xState );//call COM interface IncreaseState method
+
+ void SetName( com::sun::star::uno::Any newName);
+ void SetValue( com::sun::star::uno::Any pAny );
+ void SetDescription( com::sun::star::uno::Any newDesc );
+ void SetRole( short Role );
+
+ short GetRole() const;
+
+ void UpdateState();
+ void UpdateName();
+ void UpdateValue();
+ void UpdateAction();
+ void UpdateDescription();
+ void UpdateValidWindow();
+ void UpdateLocation();
+
+ void setFocus();
+ void unsetFocus();
+
+ void AddSelect(long index, AccObject* accObj);
+ IAccSelectionList& GetSelection();
+ void setLocalizedResourceString();
+};
+
+#endif
diff --git a/winaccessibility/inc/AccObjectContainerEventListener.hxx b/winaccessibility/inc/AccObjectContainerEventListener.hxx
new file mode 100644
index 000000000000..35ae0069b574
--- /dev/null
+++ b/winaccessibility/inc/AccObjectContainerEventListener.hxx
@@ -0,0 +1,50 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef _ACCOBJECTCONTAINEREVENTLISTENER_HXX
+#define _ACCOBJECTCONTAINEREVENTLISTENER_HXX
+
+#include <stdio.h>
+#include "AccContainerEventListener.hxx"
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+
+using namespace ::com::sun::star::uno;
+
+/**
+ * AccObjectContainerEventListener is inherited from AccContainerEventListener. It handles the evnets
+ * generated by container controls. The accessible role is: SHAPE
+ * It defines the procedure of specific event handling related with shapes and provides
+ * the detailed support for some related methods.
+ */
+class AccObjectContainerEventListener: public AccContainerEventListener
+{
+public:
+ AccObjectContainerEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
+ virtual ~AccObjectContainerEventListener();
+
+ //overwrite handleStateChangedEvent()
+ virtual void SAL_CALL handleStateChangedEvent (Any oldValue, Any newValue);
+ //for visible data changed event, for shapes, the visiabledatachanged should be mapped to LOCATION_CHANGED
+ virtual void SAL_CALL handleVisibleDataChangedEvent();
+};
+
+#endif
diff --git a/winaccessibility/inc/AccObjectManagerAgent.hxx b/winaccessibility/inc/AccObjectManagerAgent.hxx
new file mode 100644
index 000000000000..0d3c085d167c
--- /dev/null
+++ b/winaccessibility/inc/AccObjectManagerAgent.hxx
@@ -0,0 +1,102 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCOBJECTMANAGERAGENT_HXX
+#define __ACCOBJECTMANAGERAGENT_HXX
+
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#endif
+
+struct IMAccessible;
+struct IAccessible;
+class AccObjectWinManager;
+
+/****************************************************************
+AccObjectMangerAgent is used for manaing AccObjects,which encapsulates
+platform differences,and call AccObjectWinManager for Windows platform. To do for
+Linux platform
+*****************************************************************/
+class AccObjectManagerAgent
+{
+private:
+
+ AccObjectWinManager* pWinManager;
+
+public:
+
+ AccObjectManagerAgent();
+ virtual ~AccObjectManagerAgent();
+
+ virtual unsigned char InsertAccObj( com::sun::star::accessibility::XAccessible* pXAcc,
+ com::sun::star::accessibility::XAccessible* pParentXAcc,
+ long pWnd=0);
+ virtual void GetIAccessibleFromResID(long childID,IMAccessible**);
+ virtual unsigned char GetIAccessibleFromXAccessible(com::sun::star::accessibility::XAccessible* pXAcc, IAccessible** ppIA);
+
+ virtual void DeleteAccObj( com::sun::star::accessibility::XAccessible* pXAcc );
+ virtual IMAccessible* GetIMAccByXAcc(com::sun::star::accessibility::XAccessible* pXAcc);
+
+ unsigned char NotifyAccEvent( short pEvent = 0, com::sun::star::accessibility::XAccessible* pXAcc = 0 );
+
+ unsigned char InsertChildrenAccObj( com::sun::star::accessibility::XAccessible* pXAcc,
+ long pWnd=0);
+ void DeleteChildrenAccObj( com::sun::star::accessibility::XAccessible* pXAcc );
+
+ void DecreaseState( com::sun::star::accessibility::XAccessible* pXAcc,unsigned short pState );
+ void IncreaseState( com::sun::star::accessibility::XAccessible* pXAcc,unsigned short pState );
+ void UpdateState( com::sun::star::accessibility::XAccessible* pXAcc );
+
+ void UpdateLocation( com::sun::star::accessibility::XAccessible* pXAcc,
+ long Top = 0,long left = 0,long width = 0,long height = 0 );
+ void UpdateAction( com::sun::star::accessibility::XAccessible* pXAcc );
+
+ void UpdateValue( com::sun::star::accessibility::XAccessible* pXAcc );
+ void UpdateValue( com::sun::star::accessibility::XAccessible* pXAcc, com::sun::star::uno::Any );
+
+ void UpdateAccName( com::sun::star::accessibility::XAccessible* pXAcc, com::sun::star::uno::Any newName);
+ void UpdateAccName( com::sun::star::accessibility::XAccessible* pXAcc);
+
+ void UpdateDescription( com::sun::star::accessibility::XAccessible* pXAcc, com::sun::star::uno::Any newDesc );
+ void UpdateDescription( com::sun::star::accessibility::XAccessible* pXAcc );
+
+ void NotifyDestroy(com::sun::star::accessibility::XAccessible* pXAcc);
+
+ com::sun::star::accessibility::XAccessible* GetParentXAccessible(
+ com::sun::star::accessibility::XAccessible* pXAcc );
+ short GetParentRole(com::sun::star::accessibility::XAccessible* pXAcc );
+ unsigned short IsContainer(com::sun::star::accessibility::XAccessible* pXAcc);
+
+ void SaveTopWindowHandle(long hWnd, com::sun::star::accessibility::XAccessible* pXAcc);
+
+ void UpdateChildState(com::sun::star::accessibility::XAccessible* pXAcc);
+
+ bool IsSpecialToolboItem(com::sun::star::accessibility::XAccessible* pXAcc);
+
+ short GetRole(com::sun::star::accessibility::XAccessible* pXAcc);
+
+ com::sun::star::accessibility::XAccessible* GetAccDocByAccTopWin( com::sun::star::accessibility::XAccessible* pXAcc );
+ bool IsTopWinAcc( com::sun::star::accessibility::XAccessible* pXAcc );
+
+ bool IsStateManageDescendant(com::sun::star::accessibility::XAccessible* pXAcc);
+};
+
+#endif
diff --git a/winaccessibility/inc/AccObjectWinManager.hxx b/winaccessibility/inc/AccObjectWinManager.hxx
new file mode 100644
index 000000000000..5b8de1b2e48b
--- /dev/null
+++ b/winaccessibility/inc/AccObjectWinManager.hxx
@@ -0,0 +1,177 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCOBJECTWINMANAGER_HXX
+#define __ACCOBJECTWINMANAGER_HXX
+
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#endif
+#include <map>
+#include <windows.h>
+#include <vos/mutex.hxx>
+#include <vcl/dllapi.h>
+#include "ResIDGenerator.hxx"
+#include "UAccCOM2.h"
+
+class ResIDGenerator;
+class AccObjectManagerAgent;
+class AccEventListener;
+class AccObject;
+
+/*******************************************************************
+AccObjectWinManager complete the functions:
+1. Insert, delete,query,update Acc objects
+2. Create, delete,fire AccEventLister, the lifecycle of AccEventListener is as same as
+ Acc Object
+ 3.Return COM interface for AT,by the call back in salframe
+ 4.Pass accessible information to Acc objects
+ *******************************************************************/
+class AccObjectWinManager
+{
+ friend class AccObjectManagerAgent;
+
+private:
+ struct ltstr1
+ {
+ bool operator()(const void* s1, const void* s2) const
+ {
+ return long(s1)<long(s2);
+ }
+ };
+ struct ltstr2
+ {
+ bool operator()(const HWND s1, const HWND s2) const
+ {
+ return long(s1)<long(s2);
+ }
+ };
+ struct ltstr3
+ {
+ bool operator()(const long s1, const long s2) const
+ {
+ return long(s1)<long(s2);
+ }
+ };
+ typedef std::map< void*, AccObject,ltstr1 > XIdToAccObjHash;
+ typedef std::map< HWND,void*,ltstr2 > XHWNDToXAccHash;
+ typedef std::map< const long, AccObject*,ltstr3 > XResIdToAccObjHash;
+
+ typedef std::map< const long, com::sun::star::accessibility::XAccessible*,ltstr3 > XHWNDToDocumentHash;
+
+
+ //XAccessible to AccObject
+ XIdToAccObjHash XIdAccList;
+
+ //HWND to All XAccessible pointer
+ XHWNDToXAccHash HwndXAcc;
+
+ //id_Child to AccObject
+ XResIdToAccObjHash XResIdAccList;
+
+ //for file name support
+ XHWNDToDocumentHash XHWNDDocList;
+
+ com::sun::star::accessibility::XAccessible* oldFocus;
+
+ AccObjectManagerAgent* pAgent;
+ static AccObjectWinManager* me;
+ ResIDGenerator ResIdGen;
+ mutable ::vos::OMutex aDeleteMutex;
+ mutable ::vos::OMutex aNotifyMutex;
+ mutable ::vos::OMutex maATInterfaceMutex;
+
+ AccObjectWinManager(AccObjectManagerAgent* Agent=NULL);
+
+private:
+ long ImpleGenerateResID();
+ AccObject* GetAccObjByXAcc( com::sun::star::accessibility::XAccessible* pXAcc);
+
+ com::sun::star::accessibility::XAccessible* GetXAccByAccObj(AccObject* pAccObj);
+
+ AccObject* GetTopWindowAccObj(HWND hWnd);
+
+ com::sun::star::accessibility::XAccessible* GetAccDocByHWND( long pWnd );
+
+ void DeleteAccListener( AccObject* pAccObj );
+ void InsertAccChildNode(AccObject* pCurObj,AccObject* pParentObj,HWND pWnd);
+ void DeleteAccChildNode(AccObject* pChild);
+ void DeleteFromHwndXAcc(com::sun::star::accessibility::XAccessible* pXAcc );
+ int UpdateAccSelection(com::sun::star::accessibility::XAccessible* pXAcc);
+
+ AccEventListener* createAccEventListener(com::sun::star::accessibility::XAccessible* pXAcc, AccObjectManagerAgent* Agent);
+public:
+ virtual ~AccObjectWinManager();
+ sal_Bool InsertAccObj( com::sun::star::accessibility::XAccessible* pXAcc,com::sun::star::accessibility::XAccessible* pParentXAcc,HWND pWnd);
+ sal_Bool InsertChildrenAccObj( com::sun::star::accessibility::XAccessible* pXAcc,HWND pWnd=0);
+ void DeleteAccObj( com::sun::star::accessibility::XAccessible* pXAcc );
+ void DeleteChildrenAccObj(com::sun::star::accessibility::XAccessible* pAccObj);
+
+ static AccObjectWinManager* CreateAccObjectWinManagerInstance(AccObjectManagerAgent* Agent);
+
+ sal_Bool NotifyAccEvent( com::sun::star::accessibility::XAccessible* pXAcc,short state = 0 );
+
+ long Get_ToATInterface( HWND hWnd, long lParam, long wParam);
+
+ void DecreaseState( com::sun::star::accessibility::XAccessible* pXAcc,unsigned short pState );
+ void IncreaseState( com::sun::star::accessibility::XAccessible* pXAcc,unsigned short pState );
+ void UpdateState( com::sun::star::accessibility::XAccessible* pXAcc );
+ void SetLocation( com::sun::star::accessibility::XAccessible* pXAcc,
+ long Top = 0,long left = 0,long width = 0,long height = 0);
+
+ void SetValue( com::sun::star::accessibility::XAccessible* pXAcc, com::sun::star::uno::Any pAny );
+ void UpdateValue( com::sun::star::accessibility::XAccessible* pXAcc );
+
+ void SetAccName( com::sun::star::accessibility::XAccessible* pXAcc, com::sun::star::uno::Any newName);
+ void UpdateAccName( com::sun::star::accessibility::XAccessible* pXAcc );
+
+ void SetDescription( com::sun::star::accessibility::XAccessible* pXAcc, com::sun::star::uno::Any newDesc );
+ void UpdateDescription( com::sun::star::accessibility::XAccessible* pXAcc );
+
+ void SetRole( com::sun::star::accessibility::XAccessible* pXAcc, long Role );
+
+ void UpdateAccFocus( com::sun::star::accessibility::XAccessible* newFocus );
+ void UpdateAction( com::sun::star::accessibility::XAccessible* pXAcc );
+
+ sal_Bool IsContainer( com::sun::star::accessibility::XAccessible* pAccessible );
+
+ IMAccessible* GetIMAccByXAcc( com::sun::star::accessibility::XAccessible* pXAcc );
+ IMAccessible* GetIAccessibleFromResID(long resID);
+
+ void NotifyDestroy( com::sun::star::accessibility::XAccessible* pXAcc );
+ com::sun::star::accessibility::XAccessible* GetParentXAccessible( com::sun::star::accessibility::XAccessible* pXAcc );
+ short GetParentRole( com::sun::star::accessibility::XAccessible* pXAcc );
+
+ void SaveTopWindowHandle(HWND hWnd, com::sun::star::accessibility::XAccessible* pXAcc);
+
+ void UpdateChildState(com::sun::star::accessibility::XAccessible* pXAcc);
+
+ bool IsSpecialToolboItem(com::sun::star::accessibility::XAccessible* pXAcc);
+
+ short GetRole(com::sun::star::accessibility::XAccessible* pXAcc);
+
+ com::sun::star::accessibility::XAccessible* GetAccDocByAccTopWin( com::sun::star::accessibility::XAccessible* pXAcc );
+ bool IsTopWinAcc( com::sun::star::accessibility::XAccessible* pXAcc );
+
+ bool IsStateManageDescendant(com::sun::star::accessibility::XAccessible* pAccessible);
+
+};
+#endif
diff --git a/winaccessibility/inc/AccParagraphEventListener.hxx b/winaccessibility/inc/AccParagraphEventListener.hxx
new file mode 100644
index 000000000000..ad6b2e9435d5
--- /dev/null
+++ b/winaccessibility/inc/AccParagraphEventListener.hxx
@@ -0,0 +1,62 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCPARAGRAPHEVENTLISTENER_HXX
+#define __ACCPARAGRAPHEVENTLISTENER_HXX
+
+#include <stdio.h>
+#include "AccContainerEventListener.hxx"
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+
+using namespace ::com::sun::star::uno;
+
+/**
+ * AccParagraphEventListener is inherited from AccContainerEventListener. It handles the evnets
+ * generated by container controls. The accessible roles are: PARAGRAPH and HEADING.
+ * It defines the procedure of specific event handling related with text containsers and provides
+ * the detailed support for some related methods.
+ */
+class AccParagraphEventListener: public AccContainerEventListener
+{
+public:
+ AccParagraphEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
+ virtual ~AccParagraphEventListener();
+
+ //AccessibleEventListener
+ virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ //for caret changed event
+ virtual void SAL_CALL handleCaretChangedEvent(Any oldValue, Any newValue);
+
+ //for visible data changed event
+ virtual void SAL_CALL handleVisibleDataChangedEvent();
+
+ //for bound rect changed event
+ virtual void SAL_CALL handleBoundrectChangedEvent();
+
+ virtual void SAL_CALL setComponentState(short state, bool enable);
+
+ //add TEXT_SELECTION_CHANGED event
+ void handleTextSelectionChangedEvent();
+};
+
+#endif
diff --git a/winaccessibility/inc/AccResource.hxx b/winaccessibility/inc/AccResource.hxx
new file mode 100644
index 000000000000..e6bcfb05cf2f
--- /dev/null
+++ b/winaccessibility/inc/AccResource.hxx
@@ -0,0 +1,69 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef _ACCRESOURCE_HXX
+#define _ACCRESOURCE_HXX
+
+#ifndef _RTL_USTRING_HXX_
+#include <rtl/ustring.hxx>
+#endif
+
+class SimpleResMgr;
+
+#define ACC_RES_STRING(id) ResourceManager::loadString(id)
+
+//==================================================================
+//= ResourceManager
+//= handling ressources within the FormLayer library
+//==================================================================
+class ResourceManager
+{
+ static SimpleResMgr* m_pImpl;
+
+private:
+ // no instantiation allowed
+ ResourceManager()
+ { }
+ ~ResourceManager()
+ { }
+
+ // we'll instantiate one static member of the following class, which, in it's dtor,
+ // ensures that m_pImpl will be deleted
+ class EnsureDelete
+ {
+ public:
+ EnsureDelete()
+ { }
+ ~EnsureDelete();
+ };
+ friend class EnsureDelete;
+
+protected:
+ static void ensureImplExists();
+
+public:
+ /** loads the string with the specified resource id from the FormLayer resource file
+ */
+ static ::rtl::OUString loadString(sal_uInt16 _nResId);
+};
+
+
+#endif
diff --git a/winaccessibility/inc/AccTableEventListener.hxx b/winaccessibility/inc/AccTableEventListener.hxx
new file mode 100644
index 000000000000..5e22d8449fef
--- /dev/null
+++ b/winaccessibility/inc/AccTableEventListener.hxx
@@ -0,0 +1,53 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCTABLEEVENTLISTENER_HXX
+#define __ACCTABLEEVENTLISTENER_HXX
+
+#include <stdio.h>
+#include "AccDescendantManagerEventListener.hxx"
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+
+using namespace ::com::sun::star::uno;
+
+/**
+ * AccTableEventListener is inherited from AccDescendantManagerEventListener. It handles
+ * the evnets generated by tree controls. The accessible role is: TABLE.
+ * It defines the procedure of specific event handling related with table components
+ * and provides the detailed support for some related methods.
+ */
+class AccTableEventListener: public AccDescendantManagerEventListener
+{
+public:
+ AccTableEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
+ virtual ~AccTableEventListener();
+
+ //AccessibleEventListener
+ virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+ //for active descendant changed event
+ virtual void SAL_CALL handleActiveDescendantChangedEvent(Any oldValue, Any newValue);
+
+ void SAL_CALL handleTableModelChangeEvent(Any newValue);
+
+};
+
+#endif
diff --git a/winaccessibility/inc/AccTextComponentEventListener.hxx b/winaccessibility/inc/AccTextComponentEventListener.hxx
new file mode 100644
index 000000000000..060d4de400fc
--- /dev/null
+++ b/winaccessibility/inc/AccTextComponentEventListener.hxx
@@ -0,0 +1,48 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCTEXTCOMPONENTEVENTLISTENER_HXX
+#define __ACCTEXTCOMPONENTEVENTLISTENER_HXX
+
+#include <stdio.h>
+#include "AccComponentEventListener.hxx"
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+
+using namespace ::com::sun::star::uno;
+
+/**
+ * AccTextComponentEventListener is inherited from AccComponentEventListener. It handles the evnets
+ * generated by container controls. The accessible role is: TEXT
+ * It defines the procedure of specific event handling related with text components and provides
+ * the detailed support for some related methods.
+ */
+class AccTextComponentEventListener: public AccComponentEventListener
+{
+public:
+ AccTextComponentEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
+ virtual ~AccTextComponentEventListener();
+
+ virtual void SAL_CALL setComponentState(short state, bool enable);
+
+};
+
+#endif
diff --git a/winaccessibility/inc/AccTopWindowListener.hxx b/winaccessibility/inc/AccTopWindowListener.hxx
new file mode 100644
index 000000000000..f061b7b7179d
--- /dev/null
+++ b/winaccessibility/inc/AccTopWindowListener.hxx
@@ -0,0 +1,66 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCTOPWINDOWLISTENER_HXX
+#define __ACCTOPWINDOWLISTENER_HXX
+
+#include <com/sun/star/awt/XTopWindowListener.hpp>
+#include <com/sun/star/awt/XExtendedToolkit.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <cppuhelper/weak.hxx>
+
+#include "AccObjectManagerAgent.hxx"
+
+/**
+ * AccEventListener is the general event listener for all top windows. The top windows defined
+ * in UNO are: FRAME, WINDOW, DIALOG, MENU, TOOLTIP.
+ * It implements the methods of XTopWindowListener and the most important method is windowOpened().
+ * In this method, all the accessible objects (including COM object and Uno objects) are created and
+ * cached into bridge managers, and they are monitored by listeners for later accessible evnet handling.
+ */
+class AccTopWindowListener:
+ public com::sun::star::awt::XTopWindowListener,
+ public ::cppu::OWeakObject
+
+{
+private:
+ AccObjectManagerAgent accManagerAgent;
+ oslInterlockedCount m_refcount;
+public:
+ AccTopWindowListener();
+ virtual ~AccTopWindowListener();
+ virtual void SAL_CALL windowOpened( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL windowClosing( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL windowClosed( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL windowMinimized( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL windowNormalized( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL windowActivated( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL windowDeactivated( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw ();
+ virtual void SAL_CALL release( ) throw ();
+ virtual void AddAllListeners(com::sun::star::accessibility::XAccessible* pAccessible,com::sun::star::accessibility::XAccessible* pParentXAcc,HWND pWND );
+ //for On-Demand load.
+ virtual void handleWindowOpened( com::sun::star::accessibility::XAccessible* pAccessible );
+};
+
+#endif
diff --git a/winaccessibility/inc/AccTreeEventListener.hxx b/winaccessibility/inc/AccTreeEventListener.hxx
new file mode 100644
index 000000000000..430fe307c126
--- /dev/null
+++ b/winaccessibility/inc/AccTreeEventListener.hxx
@@ -0,0 +1,50 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCTREEEVENTLISTENER_HXX
+#define __ACCTREEEVENTLISTENER_HXX
+
+#include <stdio.h>
+#include "AccDescendantManagerEventListener.hxx"
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+
+using namespace ::com::sun::star::uno;
+
+/**
+ * AccTreeEventListener is inherited from AccDescendantManagerEventListener. It handles
+ * the evnets generated by tree controls. The accessible role is: TREE.
+ * It defines the procedure of specific event handling related with tree components
+ * and provides the detailed support for some related methods.
+ */
+class AccTreeEventListener: public AccDescendantManagerEventListener
+{
+public:
+ AccTreeEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
+ virtual ~AccTreeEventListener();
+
+ //AccessibleEventListener
+ virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+ //for active descendant changed event
+ virtual void SAL_CALL handleActiveDescendantChangedEvent(Any oldValue, Any newValue);
+};
+
+#endif
diff --git a/winaccessibility/inc/AccWindowEventListener.hxx b/winaccessibility/inc/AccWindowEventListener.hxx
new file mode 100644
index 000000000000..38b671e1a816
--- /dev/null
+++ b/winaccessibility/inc/AccWindowEventListener.hxx
@@ -0,0 +1,60 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCWINDOWEVENTLISTENER_HXX
+#define __ACCWINDOWEVENTLISTENER_HXX
+
+#include <stdio.h>
+#include "AccEventListener.hxx"
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+
+using namespace ::com::sun::star::uno;
+/**
+ * AccWindowEventListener is inherited from AccEventListener. It handles the events
+ * generated by Dialogs. The accessible role is: WINDOW.
+ * It defines the procedure of specific event handling related with windows and provides
+ * the detailed support for some related methods.
+ */
+class AccWindowEventListener: public AccEventListener
+{
+public:
+ AccWindowEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
+ virtual ~AccWindowEventListener();
+
+ //AccessibleEventListener
+ virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ //for child changed event
+ virtual void SAL_CALL handleChildChangedEvent (Any oldValue, Any newValue);
+
+ //for visible data changed event
+ virtual void SAL_CALL handleVisibleDataChangedEvent();
+
+ //for bound rect changed event
+ virtual void SAL_CALL handleBoundrectChangedEvent();
+
+ //state changed
+ virtual void SAL_CALL setComponentState(short state, bool enable);
+
+};
+
+#endif
diff --git a/winaccessibility/inc/ResIDGenerator.hxx b/winaccessibility/inc/ResIDGenerator.hxx
new file mode 100644
index 000000000000..bc5644217a3f
--- /dev/null
+++ b/winaccessibility/inc/ResIDGenerator.hxx
@@ -0,0 +1,56 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __RESIDGENERATOR_HXX
+#define __RESIDGENERATOR_HXX
+
+#define PRIMARY_RESID 0x00000001
+#include <deque>
+
+//ResID i.e. MSAA child ID,
+//this class is responsible for generating a child ID
+class ResIDGenerator
+{
+private:
+
+ long min;
+ long max;
+ std::deque<long> subList;
+
+public:
+
+ ResIDGenerator( long minNum = PRIMARY_RESID,long maxNum = PRIMARY_RESID);
+ long GenerateNewResID();
+ void SetSub(long number)
+ {
+ subList.push_back(number);
+ };
+ virtual ~ResIDGenerator();
+
+};
+
+inline ResIDGenerator::ResIDGenerator( long minNum ,long maxNum )
+{
+ min = minNum;
+ max = maxNum;
+}
+
+#endif
diff --git a/winaccessibility/inc/UAccCOM2.h b/winaccessibility/inc/UAccCOM2.h
new file mode 100644
index 000000000000..cb0d355caed8
--- /dev/null
+++ b/winaccessibility/inc/UAccCOM2.h
@@ -0,0 +1,30 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __UACCCOM2_H
+#define __UACCCOM2_H
+
+// Just a wrapper header for disabling this warning....
+
+#pragma warning( disable: 4917 ) /* a GUID can only be associated with a class, interface or namespace */
+#include "UAccCOM.h"
+
+#endif
diff --git a/winaccessibility/inc/accHelper.hxx b/winaccessibility/inc/accHelper.hxx
new file mode 100644
index 000000000000..df1abeb80d2c
--- /dev/null
+++ b/winaccessibility/inc/accHelper.hxx
@@ -0,0 +1,145 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCHELPER_HXX
+#define __ACCHELPER_HXX
+
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+
+#include "UAccCOM2.h"
+
+enum DIRECTION
+{
+ FIRST_CHILD=0,
+ LAST_CHILD=-1,
+ BEFORE_CHILD=1 ,
+ AFTER_CHILD=2
+};
+
+#define CHILDID_SELF 0
+#define UNO_MSAA_UNMAPPING 0x00000000
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility::AccessibleRole;
+using namespace com::sun::star::accessibility::AccessibleStateType;
+
+//Role mapping table,left side is UNO role, right side is MSAA role
+const short ROLE_TABLE[][2] =
+ {
+ {UNKNOWN, IA2_ROLE_UNKNOWN},
+ {ALERT , ROLE_SYSTEM_DIALOG},
+ {COLUMN_HEADER , ROLE_SYSTEM_COLUMNHEADER},
+ //{CANVAS , ROLE_SYSTEM_CLIENT},
+ {CANVAS , IA2_ROLE_CANVAS},
+ {CHECK_BOX , ROLE_SYSTEM_CHECKBUTTON},
+ {CHECK_MENU_ITEM , IA2_ROLE_CHECK_MENU_ITEM},
+ {COLOR_CHOOSER, IA2_ROLE_COLOR_CHOOSER},
+ {COMBO_BOX , ROLE_SYSTEM_COMBOBOX},
+ {DATE_EDITOR , IA2_ROLE_DATE_EDITOR},
+ {DESKTOP_ICON , IA2_ROLE_DESKTOP_ICON},
+ {DESKTOP_PANE, IA2_ROLE_DESKTOP_PANE},
+ {DIRECTORY_PANE, IA2_ROLE_DIRECTORY_PANE},
+ {DIALOG, ROLE_SYSTEM_DIALOG},
+ {DOCUMENT, ROLE_SYSTEM_DOCUMENT},
+ {EMBEDDED_OBJECT , IA2_ROLE_EMBEDDED_OBJECT },
+ {END_NOTE , IA2_ROLE_ENDNOTE },
+ {FILE_CHOOSER , IA2_ROLE_FILE_CHOOSER },
+ {FILLER, ROLE_SYSTEM_WHITESPACE},
+ {FONT_CHOOSER, IA2_ROLE_FONT_CHOOSER},
+ {FOOTER, IA2_ROLE_FOOTER},
+ {FOOTNOTE, IA2_ROLE_FOOTNOTE},
+ //{FRAME, IA2_ROLE_FRAME},
+ {FRAME, ROLE_SYSTEM_DIALOG},
+ {GLASS_PANE , IA2_ROLE_GLASS_PANE},
+ {GRAPHIC , ROLE_SYSTEM_GRAPHIC},
+ {GROUP_BOX, ROLE_SYSTEM_GROUPING},
+ {HEADER , IA2_ROLE_HEADER},
+ {HEADING , IA2_ROLE_HEADING},
+ {HYPER_LINK , ROLE_SYSTEM_TEXT},
+ {ICON , IA2_ROLE_ICON},
+ {INTERNAL_FRAME, IA2_ROLE_INTERNAL_FRAME},
+ {LABEL, ROLE_SYSTEM_STATICTEXT},
+ {LAYERED_PANE , IA2_ROLE_LAYERED_PANE},
+ {LIST , ROLE_SYSTEM_LIST},
+ {LIST_ITEM , ROLE_SYSTEM_LISTITEM},
+ //{MENU , ROLE_SYSTEM_MENUPOPUP},
+ {MENU, ROLE_SYSTEM_MENUITEM},
+ {MENU_BAR, ROLE_SYSTEM_MENUBAR},
+ {MENU_ITEM, ROLE_SYSTEM_MENUITEM},
+ {OPTION_PANE , IA2_ROLE_OPTION_PANE},
+ {PAGE_TAB, ROLE_SYSTEM_PAGETAB},
+ {PAGE_TAB_LIST, ROLE_SYSTEM_PAGETABLIST},
+ {PANEL, IA2_ROLE_OPTION_PANE},
+ {PARAGRAPH, IA2_ROLE_PARAGRAPH},
+ {PASSWORD_TEXT, ROLE_SYSTEM_TEXT},
+ {POPUP_MENU, ROLE_SYSTEM_MENUPOPUP},
+ {PUSH_BUTTON, ROLE_SYSTEM_PUSHBUTTON},
+ {PROGRESS_BAR, ROLE_SYSTEM_PROGRESSBAR},
+ {RADIO_BUTTON, ROLE_SYSTEM_RADIOBUTTON},
+ {RADIO_MENU_ITEM, IA2_ROLE_RADIO_MENU_ITEM},
+ {ROW_HEADER , ROLE_SYSTEM_ROWHEADER},
+ {ROOT_PANE, IA2_ROLE_ROOT_PANE},
+ {SCROLL_BAR , ROLE_SYSTEM_SCROLLBAR},
+ {SCROLL_PANE , IA2_ROLE_SCROLL_PANE},
+ {SHAPE, IA2_ROLE_SHAPE},
+ {SEPARATOR , ROLE_SYSTEM_SEPARATOR},
+ {SLIDER , ROLE_SYSTEM_SLIDER},
+ {SPIN_BOX , ROLE_SYSTEM_SPINBUTTON},
+ {SPLIT_PANE, IA2_ROLE_SPLIT_PANE},
+ {STATUS_BAR, ROLE_SYSTEM_STATUSBAR},
+ {TABLE, ROLE_SYSTEM_TABLE},
+ {TABLE_CELL , ROLE_SYSTEM_CELL},
+ {TEXT, ROLE_SYSTEM_TEXT},
+ {TEXT_FRAME , IA2_ROLE_TEXT_FRAME},
+ //for change toggle button to push button for jaws
+ {TOGGLE_BUTTON, ROLE_SYSTEM_PUSHBUTTON},
+
+ {TOOL_BAR, ROLE_SYSTEM_TOOLBAR},
+ {TOOL_TIP, ROLE_SYSTEM_TOOLTIP},
+ {TREE , ROLE_SYSTEM_OUTLINE},
+ {VIEW_PORT , IA2_ROLE_VIEW_PORT},
+ {WINDOW, ROLE_SYSTEM_WINDOW},
+ {BUTTON_DROPDOWN, ROLE_SYSTEM_BUTTONDROPDOWN},
+ {BUTTON_MENU, ROLE_SYSTEM_BUTTONMENU},
+ {CAPTION, IA2_ROLE_CAPTION},
+ {CHART, IA2_ROLE_SHAPE},
+ {EDIT_BAR, IA2_ROLE_EDITBAR},
+ {FORM, IA2_ROLE_FORM},
+ {IMAGE_MAP , IA2_ROLE_IMAGE_MAP},
+ {NOTE, IA2_ROLE_NOTE},
+ {PAGE, IA2_ROLE_PAGE},
+ {RULER , IA2_ROLE_RULER},
+ {SECTION, IA2_ROLE_SECTION},
+ {TREE_ITEM , ROLE_SYSTEM_OUTLINEITEM},
+ {TREE_TABLE, ROLE_SYSTEM_OUTLINE}
+ };
+
+struct ltstr4
+{
+ bool operator()(const long s1, const long s2) const
+ {
+ return long(s1)<long(s2);
+ }
+};
+
+#endif
diff --git a/winaccessibility/inc/act.hxx b/winaccessibility/inc/act.hxx
new file mode 100644
index 000000000000..09fb1e3ac767
--- /dev/null
+++ b/winaccessibility/inc/act.hxx
@@ -0,0 +1,90 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCACT_HXX
+#define __ACCACT_HXX
+
+#include <windows.h>
+#include <tchar.h>
+
+
+static bool IsXPOrLater()
+{
+ OSVERSIONINFO osvi;
+
+ ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
+
+ osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+
+ GetVersionEx(&osvi);
+ return ((osvi.dwMajorVersion > 5) ||
+ ((osvi.dwMajorVersion == 5) && (osvi.dwMinorVersion >= 1)));
+}
+
+static HANDLE pActCtx = INVALID_HANDLE_VALUE;
+static ULONG_PTR lpCookie;
+
+static bool ActivateActContext()
+{
+ if(!IsXPOrLater())
+ return false;
+
+ ACTCTX actctx;
+
+ ZeroMemory(&actctx, sizeof(actctx));
+
+ actctx.cbSize = sizeof(actctx);
+
+ TCHAR szDllDirPath[1024];
+ ::GetCurrentDirectory(1024,szDllDirPath);
+ LPTSTR szDllPath = szDllDirPath;
+ lstrcat(szDllPath, _T("\\UAccCOM.dll"));
+
+ actctx.lpSource = szDllPath;
+ actctx.lpResourceName = MAKEINTRESOURCE(97);
+ actctx.dwFlags = ACTCTX_FLAG_RESOURCE_NAME_VALID;
+
+ HANDLE pActCtx = CreateActCtx(&actctx);
+
+ if(pActCtx != INVALID_HANDLE_VALUE)
+ {
+ if(ActivateActCtx(pActCtx, &lpCookie))
+ {
+ return true;
+ }
+ }
+ pActCtx = INVALID_HANDLE_VALUE;
+ lpCookie = 0;
+ return false;
+}
+
+static void DeactivateActContext()
+{
+ if(!IsXPOrLater())
+ return;
+
+ if(lpCookie)
+ DeactivateActCtx(0, lpCookie);
+
+ if(pActCtx!=INVALID_HANDLE_VALUE)
+ ReleaseActCtx(pActCtx);
+}
+#endif \ No newline at end of file
diff --git a/winaccessibility/inc/g_msacc.hxx b/winaccessibility/inc/g_msacc.hxx
new file mode 100644
index 000000000000..4b33f6213416
--- /dev/null
+++ b/winaccessibility/inc/g_msacc.hxx
@@ -0,0 +1,27 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __G_MSACC_HXX
+#define __G_MSACC_HXX
+
+extern AccTopWindowListener* g_pTop;
+
+#endif
diff --git a/winaccessibility/inc/unomsaaevent.hxx b/winaccessibility/inc/unomsaaevent.hxx
new file mode 100644
index 000000000000..9f00a6cc10fd
--- /dev/null
+++ b/winaccessibility/inc/unomsaaevent.hxx
@@ -0,0 +1,110 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __UNOMSAAEVENT_HXX
+#define __UNOMSAAEVENT_HXX
+
+//STATE_CHANGED with get FOCUSED -> EVENT_OBJECT_FOCUS
+const short UM_EVENT_STATE_FOCUSED = 0 ;
+
+//STATE_CHANGED --> EVENT_OBJECT_STATECHANGE
+const short UM_EVENT_STATE_CHECKED = 1 ;
+const short UM_EVENT_STATE_ARMED = 2 ;
+const short UM_EVENT_STATE_PRESSED = 3 ;
+const short UM_EVENT_STATE_SELECTED = 4 ;
+const short UM_EVENT_STATE_SHOWING = 5 ;
+
+//if acc role is MENU_BAR, STATE_CHANGED with get FOCUSED -> EVENT_SYSTEM_MENUSTART
+const short UM_EVENT_MENU_START = 6 ;
+
+//if acc role is MENU_BAR, STATE_CHANGED with lose FOCUSED -> EVENT_SYSTEM_MENUEND
+const short UM_EVENT_MENU_END = 7 ;
+
+//if acc role is POPUP_MENU, STATE_CHANGED with get FOCUSED -> EVENT_SYSTEM_MENUPOPUPSTART
+const short UM_EVENT_MENUPOPUPSTART = 8 ;
+
+//if acc role is POPUP_MENU, STATE_CHANGED with lose FOCUSED -> EVENT_SYSTEM_MENUPOPUPEND
+const short UM_EVENT_MENUPOPUPEND = 9 ;
+
+//SELECTION_CHANGED -> EVENT_OBJECT_SELECTION
+const short UM_EVENT_SELECTION_CHANGED = 10 ;
+
+//INVALIDATE_ALL_CHILDREN --> EVENT_OBJECT_SHOW
+const short UM_EVENT_INVALIDATE_ALL_CHILDREN = 11 ;
+
+//VALUE_CHANGED --> EVENT_OBJECT_VALUECHANGE
+const short UM_EVENT_OBJECT_VALUECHANGE = 12 ;
+
+//NAME_CHANGED --> EVENT_OBJECT_NAMECHANGE
+const short UM_EVENT_OBJECT_NAMECHANGE = 13 ;
+
+//DESCRIPTION_CHANGED --> EVENT_OBJECT_DESCRIPTIONCHANGE
+const short UM_EVENT_OBJECT_DESCRIPTIONCHANGE = 14 ;
+
+//ACTION_CHANGED --> EVENT_OBJECT_DEFACTIONCHANGE
+const short UM_EVENT_OBJECT_DEFACTIONCHANGE = 15 ;
+
+//CARET_CHANGED --> EVENT_OBJECT_LOCATIONCHANGED
+const short UM_EVENT_OBJECT_CARETCHANGE = 16 ;
+
+//TEXT_CHANGED --> EVENT_OBJECT_VALUECHANGE
+const short UM_EVENT_OBJECT_TEXTCHANGE = 17 ;
+
+//ACTIVE_DESCENDANT_CHANGED --> EVENT_OBJECT_FOCUS
+const short UM_EVENT_ACTIVE_DESCENDANT_CHANGED = 18 ;
+
+//BOUNDRECT_CHANGED --> EVENT_OBJECT_LOCATIONCHANGE
+const short UM_EVENT_BOUNDRECT_CHANGED = 19 ;
+
+//VISIBLE_DATA_CHANGED --> EVENT_OBJECT_VALUECHANGE
+const short UM_EVENT_VISIBLE_DATA_CHANGED = 20 ;
+
+//to enable SHOW on dialogs, windows, frames
+const short UM_EVENT_SHOW = 21 ;
+
+const short UM_EVENT_STATE_BUSY = 22 ;
+
+const short UM_EVENT_TABLE_CAPTION_CHANGED = 24;
+const short UM_EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED = 25;
+const short UM_EVENT_TABLE_COLUMN_HEADER_CHANGED = 26;
+const short UM_EVENT_TABLE_MODEL_CHANGED = 27;
+const short UM_EVENT_TABLE_ROW_HEADER_CHANGED = 28;
+const short UM_EVENT_TABLE_SUMMARY_CHANGED = 29;
+const short UM_EVENT_OBJECT_REORDER = 30;
+const short UM_EVENT_PAGE_CHANGED =31;
+const short UM_EVENT_CHILD_ADDED =32;
+const short UM_EVENT_CHILD_REMOVED =33;
+const short UM_EVENT_TABLE_ROW_DESCRIPTION_CHANGED = 34;
+const short UM_EVENT_SELECTION_CHANGED_ADD = 35 ;
+const short UM_EVENT_SELECTION_CHANGED_REMOVE = 36 ;
+const short UM_EVENT_SELECTION_CHANGED_WITHIN = 37 ;
+
+//support for PAGE_CHANGED event
+const short UM_EVENT_OBJECT_PAGECHANGED = 38;
+
+//to add TEXT_SELECTION_CHANGED event
+const short UM_EVENT_TEXT_SELECTION_CHANGED = 39;
+
+//for section change and column chang event
+const short UM_EVENT_SECTION_CHANGED = 40;
+const short UM_EVENT_COLUMN_CHANGED = 41;
+
+#endif
diff --git a/winaccessibility/prj/build.lst b/winaccessibility/prj/build.lst
new file mode 100644
index 000000000000..e189abd66933
--- /dev/null
+++ b/winaccessibility/prj/build.lst
@@ -0,0 +1,5 @@
+wa winaccessibility : vcl toolkit NULL
+wa winaccessibility usr1 - w wa_mkout NULL
+wa winaccessibility\source\UAccComIDL nmake - w wa_UAccComIDL NULL
+wa winaccessibility\source\UAccCOM nmake - w wa_UAccCOM wa_UAccComIDL.w NULL
+wa winaccessibility\source\service nmake - w wa_service wa_UAccCOM.w NULL
diff --git a/winaccessibility/prj/d.lst b/winaccessibility/prj/d.lst
new file mode 100644
index 000000000000..d810df4319c1
--- /dev/null
+++ b/winaccessibility/prj/d.lst
@@ -0,0 +1,9 @@
+mkdir: %_DEST%\inc%_EXT%\winaccessibility
+mkdir: %_DEST%\inc%_EXT%\winaccessibility\UAccCOM
+
+..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll
+..\%__SRC%\misc\winaccessibility.component %_DEST%\xml%_EXT%\winaccessibility.component
+
+#..\%__SRC%\inc\*.hxx %_DEST%\inc%_EXT%\winaccessibility\*.hxx
+#..\%__SRC%\inc\UAccCOM\*.h %_DEST%\inc%_EXT%\winaccessibility\UAccCOM\*.h
+#..\%__SRC%\inc\UAccCOM\*.c %_DEST%\inc%_EXT%\winaccessibility\UAccCOM\*.c
diff --git a/winaccessibility/source/UAccCOM/AccAction.cpp b/winaccessibility/source/UAccCOM/AccAction.cpp
new file mode 100644
index 000000000000..fe233f4ef3ab
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccAction.cpp
@@ -0,0 +1,120 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+/**
+ * AccAction.cpp : Implementation of CAccAction
+ */
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "AccAction.h"
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+
+/**
+ * Returns the number of action.
+ *
+ * @param nActions the number of action.
+ */
+STDMETHODIMP CAccAction::nActions(/*[out,retval]*/long* nActions)
+{
+
+ return CAccActionBase::nActions(nActions);
+}
+
+/**
+ * Performs specified action on the object.
+ *
+ * @param actionIndex the index of action.
+ */
+STDMETHODIMP CAccAction::doAction(/* [in] */ long actionIndex)
+{
+
+ return CAccActionBase::doAction(actionIndex);
+}
+
+/**
+ * Gets description of specified action.
+ *
+ * @param actionIndex the index of action.
+ * @param description the description string of the specified action.
+ */
+STDMETHODIMP CAccAction::get_description(long actionIndex,BSTR __RPC_FAR *description)
+{
+
+ return CAccActionBase::get_description(actionIndex, description);
+}
+
+STDMETHODIMP CAccAction::get_name( long actionIndex, BSTR __RPC_FAR *name)
+{
+
+ return CAccActionBase::get_name(actionIndex, name);
+}
+
+STDMETHODIMP CAccAction::get_localizedName( long actionIndex, BSTR __RPC_FAR *localizedName)
+{
+
+ return CAccActionBase::get_localizedName(actionIndex, localizedName);
+}
+
+/**
+ * Returns key binding object (if any) associated with specified action
+ * key binding is string.
+ * e.g. "alt+d" (like IAccessible::get_accKeyboardShortcut).
+ *
+ * @param actionIndex the index of action.
+ * @param nMaxBinding the max number of key binding.
+ * @param keyBinding the key binding array.
+ * @param nBinding the actual number of key binding returned.
+ */
+STDMETHODIMP CAccAction::get_keyBinding(
+ /* [in] */ long actionIndex,
+ /* [in] */ long nMaxBinding,
+ /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR *__RPC_FAR *keyBinding,
+ /* [retval][out] */ long __RPC_FAR *nBinding)
+{
+
+ return CAccActionBase::get_keyBinding(actionIndex, nMaxBinding, keyBinding, nBinding);
+}
+
+/**
+ * Overide of IUNOXWrapper.
+ *
+ * @param pXInterface the pointer of UNO interface.
+ */
+STDMETHODIMP CAccAction::put_XInterface(long pXInterface)
+{
+
+ return CAccActionBase::put_XInterface(pXInterface);
+}
+/**
+ * Put UNO interface.
+ * @param pXSubInterface XAccessibleHyperlink interface.
+ * @return Result.
+*/
+STDMETHODIMP CAccAction::put_XSubInterface(long pXSubInterface)
+{
+
+
+ pRXAct = (XAccessibleAction*)pXSubInterface;
+
+ return S_OK;
+}
diff --git a/winaccessibility/source/UAccCOM/AccAction.h b/winaccessibility/source/UAccCOM/AccAction.h
new file mode 100644
index 000000000000..01488b1dfbbc
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccAction.h
@@ -0,0 +1,105 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCACTION_H_
+#define __ACCACTION_H_
+
+#include "resource.h" // main symbols
+#include "AccActionBase.h"
+
+/**
+ * CAccAction implements IAccessibleAction interface.
+ */
+class ATL_NO_VTABLE CAccAction :
+ public CComObjectRoot,
+ public CComCoClass<CAccAction, &CLSID_AccAction>,
+ public IAccessibleAction,
+ public CAccActionBase
+{
+public:
+ CAccAction()
+ {
+
+ }
+ ~CAccAction()
+ {
+
+ }
+
+ DECLARE_REGISTRY_RESOURCEID(IDR_ACCACTION)
+
+ BEGIN_COM_MAP(CAccAction)
+ COM_INTERFACE_ENTRY(IAccessibleAction)
+ COM_INTERFACE_ENTRY(IUNOXWrapper)
+ COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+ END_COM_MAP()
+
+ static HRESULT WINAPI _SmartQI(void* pv,
+ REFIID iid, void** ppvObject, DWORD)
+ {
+ return ((CAccAction*)pv)->SmartQI(iid,ppvObject);
+ }
+
+ HRESULT SmartQI(REFIID iid, void** ppvObject)
+ {
+ if( m_pOuterUnknown )
+ return OuterQueryInterface(iid,ppvObject);
+ return E_FAIL;
+ }
+
+ // IAccessibleAction
+public:
+ // IAccessibleAction
+
+ // Returns the number of action.
+ STDMETHOD(nActions)(/*[out,retval]*/long* nActions);
+
+ // Performs specified action on the object.
+ STDMETHOD(doAction)(/* [in] */ long actionIndex);
+
+ // Gets description of specified action.
+ STDMETHOD(get_description)(long actionIndex,BSTR __RPC_FAR *description);
+
+ // added , 2006/06/28, for driver 07/11
+ // get the action name
+ STDMETHOD(get_name)( long actionIndex, BSTR __RPC_FAR *name);
+
+ // get the localized action name
+ STDMETHOD(get_localizedName)( long actionIndex, BSTR __RPC_FAR *localizedName);
+
+ // Returns key binding object (if any) associated with specified action
+ // key binding is string.
+ // e.g. "alt+d" (like IAccessible::get_accKeyboardShortcut).
+ STDMETHOD(get_keyBinding)(
+ /* [in] */ long actionIndex,
+ /* [in] */ long nMaxBinding,
+ /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR *__RPC_FAR *keyBinding,
+ /* [retval][out] */ long __RPC_FAR *nBinding);
+
+ // Overide of IUNOXWrapper.
+ STDMETHOD(put_XInterface)(long pXInterface);
+
+ // Overide of IUNOXWrapper.
+ STDMETHOD(put_XSubInterface)(long pXSubInterface);
+
+};
+
+#endif //__ACCACTION_H_
diff --git a/winaccessibility/source/UAccCOM/AccAction.rgs b/winaccessibility/source/UAccCOM/AccAction.rgs
new file mode 100644
index 000000000000..7b51e7b701cf
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccAction.rgs
@@ -0,0 +1,26 @@
+HKCR
+{
+ UAccCOM.AccAction.1 = s 'AccAction Class'
+ {
+ CLSID = s '{AA49F20E-BB4E-400D-A5B0-6F5B7B770227}'
+ }
+ UAccCOM.AccAction = s 'AccAction Class'
+ {
+ CLSID = s '{AA49F20E-BB4E-400D-A5B0-6F5B7B770227}'
+ CurVer = s 'UAccCOM.AccAction.1'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {AA49F20E-BB4E-400D-A5B0-6F5B7B770227} = s 'AccAction Class'
+ {
+ ProgID = s 'UAccCOM.AccAction.1'
+ VersionIndependentProgID = s 'UAccCOM.AccAction'
+ ForceRemove 'Programmable'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'both'
+ }
+ 'TypeLib' = s '{19ECB1B0-9376-4FF9-B580-223FC9C200B8}'
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/AccActionBase.cpp b/winaccessibility/source/UAccCOM/AccActionBase.cpp
new file mode 100644
index 000000000000..bcad3c0df9c2
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccActionBase.cpp
@@ -0,0 +1,416 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+//////////////////////////////////////////////////////////////////////
+// AccActionBase.cpp: implementation of the CAccActionBase class.
+//////////////////////////////////////////////////////////////////////
+#include "stdafx.h"
+
+#include "AccActionBase.h"
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+
+#include "AccessibleKeyStroke.h"
+
+#ifndef __ACCCOMMON_H_
+#include "acccommon.h"
+#endif
+
+using namespace com::sun::star::accessibility::AccessibleRole;
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::awt;
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CAccActionBase::CAccActionBase()
+{}
+
+CAccActionBase::~CAccActionBase()
+{}
+
+/**
+ * Helper function used for getting default action by UNO role.
+ *
+ * @param pRContext UNO context interface pointer.
+ * @param pRet the corresponding string to be returned.
+ */
+void GetDfActionByUNORole(XAccessibleContext* pRContext, BSTR* pRet)
+{
+ // #CHECK#
+ if(pRContext == NULL || pRet == NULL)
+ {
+ return;
+ }
+
+ long Role = pRContext->getAccessibleRole();
+
+ switch(Role)
+ {
+ case PUSH_BUTTON:
+ *pRet = ::SysAllocString(PRESS);
+ break;
+ case RADIO_BUTTON:
+ case MENU_ITEM:
+ case LIST_ITEM:
+ *pRet = ::SysAllocString(SELECT);
+ break;
+ case CHECK_BOX:
+ {
+ Reference< XAccessibleStateSet > pRState = pRContext->getAccessibleStateSet();
+ if( !pRState.is() )
+ {
+ return;
+ }
+
+ Sequence<short> pStates = pRState->getStates();
+ int count = pStates.getLength();
+ *pRet = ::SysAllocString(CHECK);
+ for( int iIndex = 0;iIndex < count;iIndex++ )
+ {
+ if( pStates[iIndex] == AccessibleStateType::CHECKED )
+ {
+ SAFE_SYSFREESTRING(*pRet);
+ *pRet = ::SysAllocString(UNCHECK);
+ break;
+ }
+ }
+ break;
+ }
+ }
+}
+
+/**
+ * Returns the number of action.
+ *
+ * @param nActions the number of action.
+ */
+STDMETHODIMP CAccActionBase::nActions(/*[out,retval]*/long* nActions)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if( pRXAct.is() && nActions != NULL )
+ {
+ *nActions = GetXInterface()->getAccessibleActionCount();
+ return S_OK;
+ }
+ *nActions = 0;
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Performs specified action on the object.
+ *
+ * @param actionIndex the index of action.
+ */
+STDMETHODIMP CAccActionBase::doAction(/* [in] */ long actionIndex)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if( pRXAct.is() )
+ {
+ return GetXInterface()->doAccessibleAction( actionIndex )?S_OK:E_FAIL;
+ }
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets description of specified action.
+ *
+ * @param actionIndex the index of action.
+ * @param description the description string of the specified action.
+ */
+STDMETHODIMP CAccActionBase::get_description(long actionIndex,BSTR __RPC_FAR *description)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(description == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXAct.is())
+ return E_FAIL;
+
+ ::rtl::OUString ouStr = GetXInterface()->getAccessibleActionDescription(actionIndex);
+ // #CHECK#
+
+ SAFE_SYSFREESTRING(*description);
+ *description = SysAllocString((OLECHAR*)ouStr.getStr());
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+STDMETHODIMP CAccActionBase::get_name( long, BSTR __RPC_FAR *)
+{
+ return E_NOTIMPL;
+}
+
+STDMETHODIMP CAccActionBase::get_localizedName( long, BSTR __RPC_FAR *)
+{
+ return E_NOTIMPL;
+}
+
+/**
+ * Returns key binding object (if any) associated with specified action
+ * key binding is string.
+ * e.g. "alt+d" (like IAccessible::get_accKeyboardShortcut).
+ *
+ * @param actionIndex the index of action.
+ * @param nMaxBinding the max number of key binding.
+ * @param keyBinding the key binding array.
+ * @param nBinding the actual number of key binding returned.
+ */
+STDMETHODIMP CAccActionBase::get_keyBinding(
+ /* [in] */ long actionIndex,
+ /* [in] */ long,
+ /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR *__RPC_FAR *keyBinding,
+ /* [retval][out] */ long __RPC_FAR *nBinding)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if( !keyBinding || !nBinding)
+ return E_INVALIDARG;
+
+ if( !pRXAct.is() )
+ return E_FAIL;
+
+ Reference< XAccessibleKeyBinding > binding = GetXInterface()->getAccessibleActionKeyBinding(actionIndex);
+ if( !binding.is() )
+ return E_FAIL;
+
+ long nCount = (binding.get())->getAccessibleKeyBindingCount();
+
+ OLECHAR wString[64];
+
+ *keyBinding = (BSTR*)::CoTaskMemAlloc(nCount*sizeof(BSTR));
+
+ // #CHECK Memory Allocation#
+ if(*keyBinding == NULL)
+ return E_FAIL;
+
+ for( int index = 0;index < nCount;index++ )
+ {
+ memset(wString,0,sizeof(wString));
+ GetkeyBindingStrByXkeyBinding( (binding.get())->getAccessibleKeyBinding(index), wString );
+
+ (*keyBinding)[index] = SysAllocString(wString);
+ }
+
+ *nBinding = nCount;
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Overide of IUNOXWrapper.
+ *
+ * @param pXInterface the pointer of UNO interface.
+ */
+STDMETHODIMP CAccActionBase::put_XInterface(long pXInterface)
+{
+
+
+ ENTER_PROTECTED_BLOCK
+
+ CUNOXWrapper::put_XInterface(pXInterface);
+
+ //special query.
+ if(pUNOInterface == NULL)
+ return E_FAIL;
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+ if( !pRContext.is() )
+ return E_FAIL;
+
+ Reference<XAccessibleAction> pRXI(pRContext,UNO_QUERY);
+ if( !pRXI.is() )
+ pRXAct = NULL;
+ else
+ pRXAct = pRXI.get();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Helper function used for converting keybinding to string.
+ *
+ * @param keySet the key stroke sequence.
+ * @param pString the output keybinding string.
+ */
+void CAccActionBase::GetkeyBindingStrByXkeyBinding( const Sequence< KeyStroke > &keySet, OLECHAR* pString )
+{
+ // #CHECK#
+ if(pString == NULL)
+ return;
+
+ for( int iIndex = 0;iIndex < keySet.getLength();iIndex++ )
+ {
+ KeyStroke stroke = keySet[iIndex];
+ OLECHAR wString[64] = {NULL};
+ if(iIndex>0)
+ wcscat( wString, OLESTR(" ") );
+ if((stroke.Modifiers & MODIFIER_SHIFT) == MODIFIER_SHIFT)
+ wcscat( wString, OLESTR("Shift+") );
+ if((stroke.Modifiers & MODIFIER_CTRL) == MODIFIER_CTRL)
+ wcscat( wString, OLESTR("Ctrl+") );
+ if((stroke.Modifiers & MODIFIER_ALT) == MODIFIER_ALT)
+ wcscat( wString, OLESTR("Alt+") );
+ if(stroke.KeyCode)
+ {
+ OLECHAR* pChar = getOLECHARFromKeyCode(stroke.KeyCode);
+ if(pChar != NULL)
+ wcscat( wString, pChar );
+ else if (stroke.KeyCode <= 255)
+ {
+ OLECHAR pChar[4] = {NULL};
+ swprintf( pChar, L"%c", stroke.KeyCode);
+ wcscat( wString, pChar);
+ }
+ else
+ {
+ OLECHAR pChar[4] = {NULL};
+ swprintf( pChar, L"%d", stroke.KeyCode);
+ wcscat( wString, pChar);
+ }
+ }
+
+ wcscat( pString, wString);
+ }
+}
+
+/**
+ * Helper function used for converting key code to ole string.
+ *
+ * @param key the key code.
+ */
+OLECHAR* CAccActionBase::getOLECHARFromKeyCode(long key)
+{
+ static struct keyMap
+ {
+ int keyCode;
+ OLECHAR* key;
+ }
+ map[] =
+ {
+ {MODIFIER_SHIFT, L"SHIFT" },
+ {MODIFIER_CTRL, L"CTRL" },
+ {MODIFIER_ALT, L"ALT" },
+ CODEENTRY(NUM0),CODEENTRY(NUM1),CODEENTRY(NUM2),CODEENTRY(NUM3),CODEENTRY(NUM4),CODEENTRY(NUM5),
+ CODEENTRY(NUM6),CODEENTRY(NUM7),CODEENTRY(NUM8),CODEENTRY(NUM9),
+ CODEENTRY(A),CODEENTRY(B),CODEENTRY(C),CODEENTRY(D),CODEENTRY(E),CODEENTRY(F),
+ CODEENTRY(G),CODEENTRY(H),CODEENTRY(I),CODEENTRY(J),CODEENTRY(K),CODEENTRY(L),
+ CODEENTRY(M),CODEENTRY(N),CODEENTRY(O),CODEENTRY(P),CODEENTRY(Q),CODEENTRY(R),
+ CODEENTRY(S),CODEENTRY(T),CODEENTRY(U),CODEENTRY(V),CODEENTRY(W),CODEENTRY(X),
+ CODEENTRY(Y),CODEENTRY(Z),
+ CODEENTRY(F1),CODEENTRY(F2),CODEENTRY(F3),CODEENTRY(F4),CODEENTRY(F5),CODEENTRY(F6),
+ CODEENTRY(F7),CODEENTRY(F8),CODEENTRY(F9),CODEENTRY(F10),CODEENTRY(F11),CODEENTRY(F12),
+ CODEENTRY(F13),CODEENTRY(F14),CODEENTRY(F15),CODEENTRY(F16),CODEENTRY(F17),CODEENTRY(F18),
+ CODEENTRY(F19),CODEENTRY(F20),CODEENTRY(F21),CODEENTRY(F22),CODEENTRY(F23),CODEENTRY(F24),
+ CODEENTRY(F25),CODEENTRY(F26),
+
+ { KEYCODE_DOWN, L"DOWN" },
+ { KEYCODE_UP, L"UP" },
+ { KEYCODE_LEFT, L"LEFT" },
+ { KEYCODE_RIGHT, L"RIGHT" },
+ { KEYCODE_HOME, L"HOME" },
+ { KEYCODE_END, L"END" },
+ { KEYCODE_PAGEUP, L"PAGEUP" },
+ { KEYCODE_PAGEDOWN, L"PAGEDOWN" },
+ { KEYCODE_RETURN, L"RETURN" },
+ { KEYCODE_ESCAPE, L"ESCAPE" },
+ { KEYCODE_TAB, L"TAB" },
+ { KEYCODE_BACKSPACE, L"BACKSPACE" },
+ { KEYCODE_SPACE, L"SPACE" },
+ { KEYCODE_INSERT, L"INSERT" },
+ { KEYCODE_DELETE, L"DELETE" },
+ { KEYCODE_ADD, L"ADD" },
+ { KEYCODE_SUBTRACT, L"SUBTRACT" },
+ { KEYCODE_MULTIPLY, L"MULTIPLY" },
+ { KEYCODE_DIVIDE, L"DIVIDE" },
+ { KEYCODE_POINT, L"POINT" },
+ { KEYCODE_COMMA, L"COMMA" },
+ { KEYCODE_LESS, L"LESS" },
+ { KEYCODE_GREATER, L"GREATER" },
+ { KEYCODE_EQUAL, L"EQUAL" },
+ { KEYCODE_OPEN, L"OPEN" },
+ { KEYCODE_CUT, L"CUT" },
+ { KEYCODE_COPY, L"COPY" },
+ { KEYCODE_PASTE, L"PASTE" },
+ { KEYCODE_UNDO, L"UNDO" },
+ { KEYCODE_REPEAT, L"REPEAT" },
+ { KEYCODE_FIND, L"FIND" },
+ { KEYCODE_PROPERTIES, L"PROPERTIES" },
+ { KEYCODE_FRONT, L"FRONT" },
+ { KEYCODE_CONTEXTMENU, L"CONTEXTMENU" },
+ { KEYCODE_HELP, L"HELP" },
+ };
+ static long nCount = countof(map);
+
+ long min = 0;
+ long max = nCount-1;
+ long mid = nCount/2;
+ while(min<max)
+ {
+ if(key<map[mid].keyCode)
+ max = mid-1;
+ else if(key>map[mid].keyCode)
+ min = mid+1;
+ else
+ break;
+ mid = (min+max)/2;
+ }
+
+ if(key == map[mid].keyCode)
+ {
+ return map[mid].key;
+ }
+ else
+ {
+ return NULL;
+ }
+}
+
diff --git a/winaccessibility/source/UAccCOM/AccActionBase.h b/winaccessibility/source/UAccCOM/AccActionBase.h
new file mode 100644
index 000000000000..349bd49ad6d8
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccActionBase.h
@@ -0,0 +1,92 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+//////////////////////////////////////////////////////////////////////
+// AccActionBase.h: interface for the CAccActionBase class.
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(AFX_ACCACTIONBASE_H__F87FAD24_D66E_4D22_9B24_3304A303DC84__INCLUDED_)
+#define AFX_ACCACTIONBASE_H__F87FAD24_D66E_4D22_9B24_3304A303DC84__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#define WNT
+
+#include <com/sun/star/uno/reference.hxx>
+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+#include "UNOXWrapper.h"
+
+class ATL_NO_VTABLE CAccActionBase : public CUNOXWrapper
+{
+public:
+ CAccActionBase();
+ virtual ~CAccActionBase();
+
+ // IAccessibleAction
+public:
+ // IAccessibleAction
+
+ // Returns the number of action.
+ STDMETHOD(nActions)(/*[out,retval]*/long* nActions);
+
+ // Performs specified action on the object.
+ STDMETHOD(doAction)(/* [in] */ long actionIndex);
+
+ // Gets description of specified action.
+ STDMETHOD(get_description)(long actionIndex,BSTR __RPC_FAR *description);
+
+ // added , 2006/06/28, for driver 07/11
+ // get the action name
+ STDMETHOD(get_name)( long actionIndex, BSTR __RPC_FAR *name);
+
+ // get the localized action Name
+ STDMETHOD(get_localizedName)( long actionIndex, BSTR __RPC_FAR *localizedName);
+
+ // Returns key binding object (if any) associated with specified action
+ // key binding is string.
+ // e.g. "alt+d" (like IAccessible::get_accKeyboardShortcut).
+ STDMETHOD(get_keyBinding)(
+ /* [in] */ long actionIndex,
+ /* [in] */ long nMaxBinding,
+ /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR *__RPC_FAR *keyBinding,
+ /* [retval][out] */ long __RPC_FAR *nBinding);
+
+ // Overide of IUNOXWrapper.
+ STDMETHOD(put_XInterface)(long pXInterface);
+
+ static void GetkeyBindingStrByXkeyBinding( const com::sun::star::uno::Sequence< com::sun::star::awt::KeyStroke > &keySet, OLECHAR* pString );
+
+protected:
+
+ static OLECHAR* getOLECHARFromKeyCode(long key);
+
+ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleAction> pRXAct;
+
+private:
+ inline com::sun::star::accessibility::XAccessibleAction* GetXInterface()
+ {
+ return pRXAct.get();
+ }
+};
+
+#endif // !defined(AFX_ACCACTIONBASE_H__F87FAD24_D66E_4D22_9B24_3304A303DC84__INCLUDED_)
diff --git a/winaccessibility/source/UAccCOM/AccComponent.cpp b/winaccessibility/source/UAccCOM/AccComponent.cpp
new file mode 100644
index 000000000000..b209ea5006db
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccComponent.cpp
@@ -0,0 +1,72 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+/**
+ * AccComponent.cpp : Implementation of CUAccCOMApp and DLL registration.
+ */
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "AccComponent.h"
+
+/**
+ * Returns the location of the upper left corner of the object's bounding
+ * box relative to the parent.
+ *
+ * @param Location the upper left corner of the object's bounding box.
+ */
+STDMETHODIMP CAccComponent::get_locationInParent(long *x, long *y)
+{
+
+ return CAccComponentBase::get_locationInParent(x,y);
+}
+
+/**
+ * Returns the foreground color of this object.
+ *
+ * @param Color the color of foreground.
+ */
+STDMETHODIMP CAccComponent::get_foreground(IA2Color * foreground)
+{
+
+ return CAccComponentBase::get_foreground(foreground);
+}
+
+/**
+ * Returns the background color of this object.
+ *
+ * @param Color the color of background.
+ */
+STDMETHODIMP CAccComponent::get_background(IA2Color * background)
+{
+
+ return CAccComponentBase::get_background(background);
+}
+
+/**
+ * Overide of IUNOXWrapper.
+ *
+ * @param pXInterface the pointer of UNO interface.
+ */
+STDMETHODIMP CAccComponent::put_XInterface(long pXInterface)
+{
+
+ return CAccComponentBase::put_XInterface(pXInterface);
+}
diff --git a/winaccessibility/source/UAccCOM/AccComponent.h b/winaccessibility/source/UAccCOM/AccComponent.h
new file mode 100644
index 000000000000..6544bbf273e4
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccComponent.h
@@ -0,0 +1,97 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#if !defined(AFX_ACCCOMPONENT_H__626D760C_3944_4B0E_BB4D_F0D20AEDF7DC__INCLUDED_)
+#define AFX_ACCCOMPONENT_H__626D760C_3944_4B0E_BB4D_F0D20AEDF7DC__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "resource.h" // main symbols
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include "UNOXWrapper.h"
+#include "AccComponentBase.h"
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+
+/**
+ * CAccComponent implements IAccessibleComponent interface.
+ */
+class ATL_NO_VTABLE CAccComponent :
+ public CComObjectRoot,
+ public CComCoClass<CAccComponent,&CLSID_AccComponent>,
+ public IAccessibleComponent,
+ public CAccComponentBase
+{
+public:
+ CAccComponent()
+ {
+ }
+ ~CAccComponent()
+ {
+ }
+
+ BEGIN_COM_MAP(CAccComponent)
+ COM_INTERFACE_ENTRY(IAccessibleComponent)
+ COM_INTERFACE_ENTRY(IUNOXWrapper)
+ COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+ END_COM_MAP()
+
+ static HRESULT WINAPI _SmartQI(void* pv,
+ REFIID iid, void** ppvObject, DWORD)
+ {
+ return ((CAccComponent*)pv)->SmartQI(iid,ppvObject);
+ }
+
+ HRESULT SmartQI(REFIID iid, void** ppvObject)
+ {
+ if( m_pOuterUnknown )
+ return OuterQueryInterface(iid,ppvObject);
+ return E_FAIL;
+ }
+
+ DECLARE_REGISTRY_RESOURCEID(IDR_AccComponent)
+
+ // IAccessibleComponent
+public:
+ // IAccessibleComponent
+
+ // Returns the location of the upper left corner of the object's bounding
+ // box relative to the parent.
+ STDMETHOD(get_locationInParent)(long *x, long *y);
+
+ // Returns the foreground color of this object.
+ STDMETHOD(get_foreground)(IA2Color * foreground);
+
+ // Returns the background color of this object.
+ STDMETHOD(get_background)(IA2Color * background);
+
+ // Overide of IUNOXWrapper.
+ STDMETHOD(put_XInterface)(long pXInterface);
+
+};
+
+#endif // !defined(AFX_ACCCOMPONENT_H__626D760C_3944_4B0E_BB4D_F0D20AEDF7DC__INCLUDED_)
diff --git a/winaccessibility/source/UAccCOM/AccComponent.rgs b/winaccessibility/source/UAccCOM/AccComponent.rgs
new file mode 100644
index 000000000000..ee87c169e969
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccComponent.rgs
@@ -0,0 +1,23 @@
+HKCR
+{
+ UAccCOM.AccComponent.1 = s 'AccComponent Class'
+ {
+ CLSID = s '{9FD9BA47-70AF-4160-99F1-526F2B9F111B}'
+ }
+ UAccCOM.AccComponent = s 'AccComponent Class'
+ {
+ CLSID = s '{9FD9BA47-70AF-4160-99F1-526F2B9F111B}'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {9FD9BA47-70AF-4160-99F1-526F2B9F111B} = s 'AccComponent Class'
+ {
+ ProgID = s 'UAccCOM.AccComponent.1'
+ VersionIndependentProgID = s 'UAccCOM.AccComponent'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'both'
+ }
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/AccComponentBase.cpp b/winaccessibility/source/UAccCOM/AccComponentBase.cpp
new file mode 100644
index 000000000000..234177e62d7d
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccComponentBase.cpp
@@ -0,0 +1,213 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "stdafx.h"
+#include "AccComponentBase.h"
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include "MAccessible.h"
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CAccComponentBase::CAccComponentBase()
+{}
+
+CAccComponentBase::~CAccComponentBase()
+{}
+
+
+/**
+ * Returns the location of the upper left corner of the object's bounding
+ * box relative to the parent.
+ *
+ * @param Location the upper left corner of the object's bounding box.
+ */
+STDMETHODIMP CAccComponentBase::get_locationInParent(long *x, long *y)
+{
+
+ CHECK_ENABLE_INF
+
+ try
+ {
+ if (x == NULL || y == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pRXComp.is())
+ return E_FAIL;
+
+ const ::com::sun::star::awt::Point& pt = GetXInterface()->getLocation();
+ *x = pt.X;
+ *y = pt.Y;
+ return S_OK;
+ }
+ catch(...)
+ {
+ return E_FAIL;
+ }
+}
+
+/**
+ * Returns the location of the upper left corner of the object's bounding
+ * box in screen.
+ *
+ * @param Location the upper left corner of the object's bounding
+ * box in screen coordinates.
+ */
+STDMETHODIMP CAccComponentBase::get_locationOnScreen(long *x, long *y)
+{
+
+ CHECK_ENABLE_INF
+
+ try
+ {
+ if (x == NULL || y == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pRXComp.is())
+ return E_FAIL;
+
+ const ::com::sun::star::awt::Point& pt = GetXInterface()->getLocationOnScreen();
+ *x = pt.X;
+ *y = pt.Y;
+ return S_OK;
+
+ }
+ catch(...)
+ {
+ return E_FAIL;
+ }
+}
+
+/**
+ * Grabs the focus to this object.
+ *
+ * @param success the boolean result to be returned.
+ */
+STDMETHODIMP CAccComponentBase::grabFocus(boolean * success)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (success == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pRXComp.is())
+ {
+ return E_FAIL;
+ }
+ GetXInterface()->grabFocus();
+ *success = TRUE;
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Returns the foreground color of this object.
+ *
+ * @param Color the color of foreground.
+ */
+STDMETHODIMP CAccComponentBase::get_foreground(IA2Color * foreground)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (foreground == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pRXComp.is())
+ {
+ return E_FAIL;
+ }
+ *foreground = (long)GetXInterface()->getForeground();
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Returns the background color of this object.
+ *
+ * @param Color the color of background.
+ */
+STDMETHODIMP CAccComponentBase::get_background(IA2Color * background)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (background == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pRXComp.is())
+ {
+ return E_FAIL;
+ }
+ *background = (long)GetXInterface()->getBackground();
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Overide of IUNOXWrapper.
+ *
+ * @param pXInterface the pointer of UNO interface.
+ */
+STDMETHODIMP CAccComponentBase::put_XInterface(long pXInterface)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ CUNOXWrapper::put_XInterface(pXInterface);
+ //special query.
+ if(pUNOInterface == NULL)
+ return E_FAIL;
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+ if( !pRContext.is() )
+ {
+ return E_FAIL;
+ }
+ Reference<XAccessibleComponent> pRXI(pRContext,UNO_QUERY);
+ if( !pRXI.is() )
+ pRXComp = NULL;
+ else
+ pRXComp = pRXI.get();
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
diff --git a/winaccessibility/source/UAccCOM/AccComponentBase.h b/winaccessibility/source/UAccCOM/AccComponentBase.h
new file mode 100644
index 000000000000..6eed5782be91
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccComponentBase.h
@@ -0,0 +1,78 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+//////////////////////////////////////////////////////////////////////
+// AccComponentBase.h: interface for the CAccComponentBase class.
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(AFX_ACCCOMPONENTBASE_H__946BE230_1DCB_494B_ACF6_32A2E197DD2A__INCLUDED_)
+#define AFX_ACCCOMPONENTBASE_H__946BE230_1DCB_494B_ACF6_32A2E197DD2A__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#define WNT
+
+#include <com/sun/star/uno/reference.hxx>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include "UNOXWrapper.h"
+
+class ATL_NO_VTABLE CAccComponentBase : public CUNOXWrapper
+{
+public:
+ CAccComponentBase();
+ virtual ~CAccComponentBase();
+ // IAccessibleComponent
+public:
+ // IAccessibleComponent
+
+ // Returns the location of the upper left corner of the object's bounding
+ // box relative to the parent.
+ STDMETHOD(get_locationInParent)(long *x, long *y);
+
+ // Returns the location of the upper left corner of the object's bounding
+ // box in screen.
+ STDMETHOD(get_locationOnScreen)(long *x, long *y);
+
+ // Grabs the focus to this object.
+ STDMETHOD(grabFocus)(boolean * success);
+
+ // Returns the foreground color of this object.
+ STDMETHOD(get_foreground)(IA2Color * foreground);
+
+ // Returns the background color of this object.
+ STDMETHOD(get_background)(IA2Color * background);
+
+ // Overide of IUNOXWrapper.
+ STDMETHOD(put_XInterface)(long pXInterface);
+
+protected:
+
+ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleComponent> pRXComp;
+
+ inline com::sun::star::accessibility::XAccessibleComponent* GetXInterface()
+ {
+ return pRXComp.get();
+ }
+};
+
+#endif // !defined(AFX_ACCCOMPONENTBASE_H__946BE230_1DCB_494B_ACF6_32A2E197DD2A__INCLUDED_)
diff --git a/winaccessibility/source/UAccCOM/AccContext.rgs b/winaccessibility/source/UAccCOM/AccContext.rgs
new file mode 100644
index 000000000000..b3e9e3a081da
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccContext.rgs
@@ -0,0 +1,23 @@
+HKCR
+{
+ UAccCOM.AccContext.1 = s 'AccContext Class'
+ {
+ CLSID = s '{F77CAEC2-F04C-4E74-A36C-F3B557BC59E1}'
+ }
+ UAccCOM.AccContext = s 'AccContext Class'
+ {
+ CLSID = s '{F77CAEC2-F04C-4E74-A36C-F3B557BC59E1}'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {F77CAEC2-F04C-4E74-A36C-F3B557BC59E1} = s 'AccContext Class'
+ {
+ ProgID = s 'UAccCOM.AccContext.1'
+ VersionIndependentProgID = s 'UAccCOM.AccContext'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'both'
+ }
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/AccEditableText.cpp b/winaccessibility/source/UAccCOM/AccEditableText.cpp
new file mode 100644
index 000000000000..2dce3b8e111a
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccEditableText.cpp
@@ -0,0 +1,508 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+/**
+ * AccEditableText.cpp : Implementation of CUAccCOMApp and DLL registration.
+ */
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "AccEditableText.h"
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#include <com/sun/star/awt/FontSlant.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/style/TabStop.hpp>
+#include <vector>
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::awt;
+using namespace com::sun::star::beans;
+using namespace std;
+
+/**
+ * Copys a range of text to the clipboard.
+ *
+ * @param startOffset the start offset of copying.
+ * @param endOffset the end offset of copying.
+ * @param success the boolean result to be returned.
+ */
+STDMETHODIMP CAccEditableText::copyText(long startOffset, long endOffset)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK XInterface#
+ if(!pRXEdtTxt.is())
+ {
+ return E_FAIL;
+ }
+
+ if ( GetXInterface()->copyText( startOffset, endOffset ) )
+ return S_OK;
+
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Deletes a range of text.
+ *
+ * @param startOffset the start offset of deleting.
+ * @param endOffset the end offset of deleting.
+ * @param success the boolean result to be returned.
+ */
+STDMETHODIMP CAccEditableText::deleteText(long startOffset, long endOffset)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if( !pRXEdtTxt.is() )
+ return E_FAIL;
+
+ if( GetXInterface()->deleteText( startOffset, endOffset ) )
+ return S_OK;
+
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Inserts text at a specified offset.
+ *
+ * @param offset the offset of inserting.
+ * @param text the text to be inserted.
+ * @param success the boolean result to be returned.
+ */
+STDMETHODIMP CAccEditableText::insertText(long offset, BSTR * text)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (text == NULL)
+ return E_INVALIDARG;
+
+ if( !pRXEdtTxt.is() )
+ return E_FAIL;
+
+ ::rtl::OUString ouStr(*text);
+
+ if( GetXInterface()->insertText( ouStr, offset ) )
+ return S_OK;
+
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Cuts a range of text to the clipboard.
+ *
+ * @param startOffset the start offset of cuting.
+ * @param endOffset the end offset of cuting.
+ * @param success the boolean result to be returned.
+ */
+STDMETHODIMP CAccEditableText::cutText(long startOffset, long endOffset)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if( !pRXEdtTxt.is() )
+ return E_FAIL;
+
+ if( GetXInterface()->cutText( startOffset, endOffset ) )
+ return S_OK;
+
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Pastes text from clipboard at specified offset.
+ *
+ * @param offset the offset of pasting.
+ * @param success the boolean result to be returned.
+ */
+STDMETHODIMP CAccEditableText::pasteText(long offset)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if( !pRXEdtTxt.is() )
+ return E_FAIL;
+
+ if( GetXInterface()->pasteText( offset ) )
+ return S_OK;
+
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Replaces range of text with new text.
+ *
+ * @param startOffset the start offset of replacing.
+ * @param endOffset the end offset of replacing.
+ * @param text the replacing text.
+ * @param success the boolean result to be returned.
+ */
+STDMETHODIMP CAccEditableText::replaceText(long startOffset, long endOffset, BSTR * text)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if (text == NULL)
+ return E_INVALIDARG;
+ if( !pRXEdtTxt.is() )
+ return E_FAIL;
+
+ ::rtl::OUString ouStr(*text);
+
+ if( GetXInterface()->replaceText( startOffset,endOffset, ouStr) )
+ return S_OK;
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Sets attributes of range of text.
+ *
+ * @param startOffset the start offset.
+ * @param endOffset the end offset.
+ * @param attributes the attribute text.
+ * @param success the boolean result to be returned.
+ */
+STDMETHODIMP CAccEditableText::setAttributes(long startOffset, long endOffset, BSTR * attributes)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if (attributes == NULL)
+ return E_INVALIDARG;
+ if( !pRXEdtTxt.is() )
+ return E_FAIL;
+
+ ::rtl::OUString ouStr(*attributes);
+
+ sal_Int32 nIndex = 0;
+ sal_Unicode cTok = ';';
+ vector< ::rtl::OUString > vecAttr;
+ do
+ {
+ ::rtl::OUString ouToken = ouStr.getToken(0, cTok, nIndex);
+ vecAttr.push_back(ouToken);
+ }
+ while(nIndex >= 0);
+
+ Sequence< PropertyValue > beanSeq(vecAttr.size());
+ for(unsigned int i = 0; i < vecAttr.size(); i ++)
+ {
+ ::rtl::OUString attr = vecAttr[i];
+ sal_Int32 nPos = attr.indexOf(':');
+ if(nPos > -1)
+ {
+ ::rtl::OUString attrName = attr.copy(0, nPos);
+ ::rtl::OUString attrValue = attr.copy(nPos + 1, attr.getLength() - nPos - 1);
+ beanSeq[i].Name = attrName;
+ get_AnyFromOLECHAR(attrName, attrValue, beanSeq[i].Value);
+ }
+ }
+
+ if( GetXInterface()->setAttributes( startOffset,endOffset, beanSeq) )
+ return S_OK;
+
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Convert attributes string to Any type.
+ * Reference to infra\accessibility\bridge\org\openoffice\java\accessibility\AccessibleTextImpl.java
+ *
+ * @param ouName the string of attribute name.
+ * @param ouValue the string of attribute value.
+ * @param rAny the Any object to be returned.
+ */
+void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const ::rtl::OUString &ouValue, Any &rAny)
+{
+ if(ouName.compareTo(L"CharBackColor") == 0 ||
+ ouName.compareTo(L"CharColor") == 0 ||
+ ouName.compareTo(L"ParaAdjust") == 0 ||
+ ouName.compareTo(L"ParaFirstLineIndent") == 0 ||
+ ouName.compareTo(L"ParaLeftMargin") == 0 ||
+ ouName.compareTo(L"ParaRightMargin") == 0 ||
+ ouName.compareTo(L"ParaTopMargin") == 0 ||
+ ouName.compareTo(L"ParaBottomMargin") == 0 ||
+ ouName.compareTo(L"CharFontPitch") == 0)
+ {
+ // Convert to int.
+ // NOTE: CharFontPitch is not implemented in java file.
+ sal_Int32 nValue = ouValue.toInt32();
+ rAny.setValue(&nValue, getCppuType((sal_Int32 *)0));
+ }
+ else if(ouName.compareTo(L"CharShadowed") == 0 ||
+ ouName.compareTo(L"CharContoured") == 0)
+ {
+ // Convert to boolean.
+ boolean nValue = (boolean)ouValue.toBoolean();
+ rAny.setValue(&nValue, getCppuType((sal_Bool *)sal_False));
+ }
+ else if(ouName.compareTo(L"CharEscapement") == 0 ||
+ ouName.compareTo(L"CharStrikeout") == 0 ||
+ ouName.compareTo(L"CharUnderline") == 0 ||
+ ouName.compareTo(L"CharFontPitch") == 0)
+ {
+ // Convert to short.
+ short nValue = (short)ouValue.toInt32();
+ rAny.setValue(&nValue, getCppuType((short *)0));
+ }
+ else if(ouName.compareTo(L"CharHeight") == 0 ||
+ ouName.compareTo(L"CharWeight") == 0)
+ {
+ // Convert to float.
+ float fValue = ouValue.toFloat();
+ rAny.setValue(&fValue, getCppuType((float *)0));
+ }
+ else if(ouName.compareTo(L"CharFontName") == 0)
+ {
+ // Convert to string.
+ rAny.setValue(&ouValue, getCppuType((::rtl::OUString *)0));
+ }
+ else if(ouName.compareTo(L"CharPosture") == 0)
+ {
+ // Convert to FontSlant.
+ ::com::sun::star::awt::FontSlant fontSlant = (::com::sun::star::awt::FontSlant)ouValue.toInt32();
+ rAny.setValue(&fontSlant, getCppuType((::com::sun::star::awt::FontSlant*)0));
+ }
+ else if(ouName.compareTo(L"ParaTabStops") == 0)
+ {
+ //
+ // Convert to the Sequence with TabStop element.
+ vector< ::com::sun::star::style::TabStop > vecTabStop;
+ ::com::sun::star::style::TabStop tabStop;
+ ::rtl::OUString ouSubValue;
+ sal_Int32 nIndex = 0;
+ sal_Int32 pos = 0, posComma = 0;
+
+ do
+ {
+ // Position.
+ pos = ouValue.indexOf(L"Position=", pos);
+ if(pos != -1)
+ {
+ posComma = ouValue.indexOf(',', pos + 9); // 9 = length of "Position=".
+ if(posComma != -1)
+ {
+ ouSubValue = ouValue.copy(pos + 9, posComma - pos - 9);
+ tabStop.Position = ouSubValue.toInt32();
+ pos = posComma + 1;
+
+ // TabAlign.
+ pos = ouValue.indexOf(L"TabAlign=", pos);
+ if(pos != -1)
+ {
+ posComma = ouValue.indexOf(',', pos + 9); // 9 = length of "TabAlign=".
+ if(posComma != -1)
+ {
+ ouSubValue = ouValue.copy(pos + 9, posComma - pos - 9);
+ tabStop.Alignment = (::com::sun::star::style::TabAlign)ouSubValue.toInt32();
+ pos = posComma + 1;
+
+ // DecimalChar.
+ pos = ouValue.indexOf(L"DecimalChar=", pos);
+ if(pos != -1)
+ {
+ posComma = ouValue.indexOf(',', pos + 11); // 11 = length of "TabAlign=".
+ if(posComma != -1)
+ {
+ ouSubValue = ouValue.copy(pos + 11, posComma - pos - 11);
+ tabStop.DecimalChar = (sal_Unicode)ouSubValue.toChar();
+ pos = posComma + 1;
+
+ // FillChar.
+ pos = ouValue.indexOf(L"FillChar=", pos);
+ if(pos != -1)
+ {
+ posComma = ouValue.indexOf(',', pos + 9); // 9 = length of "TabAlign=".
+ if(posComma != -1)
+ {
+ ouSubValue = ouValue.copy(pos + 9, posComma - pos - 9);
+ tabStop.DecimalChar = (sal_Unicode)ouSubValue.toChar();
+ pos = posComma + 1;
+
+ // Complete TabStop element.
+ vecTabStop.push_back(tabStop);
+ }
+ else
+ break; // No match comma.
+ }
+ else
+ break; // No match FillChar.
+ }
+ else
+ break; // No match comma.
+ }
+ else
+ break; // No match DecimalChar.
+ }
+ else
+ break; // No match comma.
+ }
+ else
+ break; // No match TabAlign.
+ }
+ else
+ break; // No match comma.
+ }
+ else
+ break; // No match Position.
+ }
+ while(pos < ouValue.getLength());
+
+ //
+ // Dump into Sequence.
+ int iSeqLen = (vecTabStop.size() == 0) ? 1 : vecTabStop.size();
+ Sequence< ::com::sun::star::style::TabStop > seqTabStop(iSeqLen);
+
+ if(vecTabStop.size() != 0)
+ {
+ // Dump every element.
+ for(int i = 0; i < iSeqLen; i ++)
+ {
+ seqTabStop[i] = vecTabStop[i];
+ }
+ }
+ else
+ {
+ // Create default value.
+ seqTabStop[0].Position = 0;
+ seqTabStop[0].Alignment = ::com::sun::star::style::TabAlign_DEFAULT;
+ seqTabStop[0].DecimalChar = '.';
+ seqTabStop[0].FillChar = ' ';
+ }
+
+ // Assign to Any object.
+ rAny.setValue(&seqTabStop, getCppuType((Sequence< ::com::sun::star::style::TabStop >*)0));
+ }
+ else if(ouName.compareTo(L"ParaLineSpacing") == 0)
+ {
+ // Parse value string.
+ ::com::sun::star::style::LineSpacing lineSpacing;
+ ::rtl::OUString ouSubValue;
+ sal_Int32 pos = 0, posComma = 0;
+
+ pos = ouValue.indexOf(L"Mode=", pos);
+ if(pos != -1)
+ {
+ posComma = ouValue.indexOf(',', pos + 5); // 5 = length of "Mode=".
+ if(posComma != -1)
+ {
+ ouSubValue = ouValue.copy(pos + 5, posComma - pos - 5);
+ lineSpacing.Mode = (sal_Int16)ouSubValue.toInt32();
+ pos = posComma + 1;
+
+ pos = ouValue.indexOf(L"Height=", pos);
+ if(pos != -1)
+ {
+ ouSubValue = ouValue.copy(pos + 7, ouValue.getLength() - pos - 7);
+ lineSpacing.Height = (sal_Int16)ouSubValue.toInt32();
+ }
+ else
+ {
+ lineSpacing.Height = (sal_Int16)100; // Default height.
+ }
+ }
+ else
+ {
+ lineSpacing.Height = (sal_Int16)100; // Default height.
+ }
+ }
+ else
+ {
+ // Default Mode and Height.
+ lineSpacing.Mode = (sal_Int16)0;
+ lineSpacing.Height = (sal_Int16)100; // Default height.
+ }
+
+ // Convert to Any object.
+ rAny.setValue(&lineSpacing, getCppuType((::com::sun::star::style::LineSpacing* )0));
+ }
+ else
+ {
+ // Do nothing.
+ sal_Int32 nDefault = 0;
+ rAny.setValue(&nDefault, getCppuType((sal_Int32 *)0));
+ }
+}
+
+/**
+ * Overide of IUNOXWrapper.
+ *
+ * @param pXInterface the pointer of UNO interface.
+ */
+STDMETHODIMP CAccEditableText::put_XInterface(long pXInterface)
+{
+
+
+ ENTER_PROTECTED_BLOCK
+
+ CUNOXWrapper::put_XInterface(pXInterface);
+ //special query.
+ if(pUNOInterface == NULL)
+ return E_FAIL;
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+ if( !pRContext.is() )
+ {
+ return E_FAIL;
+ }
+ Reference<XAccessibleEditableText> pRXI(pRContext,UNO_QUERY);
+ if( !pRXI.is() )
+ pRXEdtTxt = NULL;
+ else
+ pRXEdtTxt = pRXI.get();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
diff --git a/winaccessibility/source/UAccCOM/AccEditableText.h b/winaccessibility/source/UAccCOM/AccEditableText.h
new file mode 100644
index 000000000000..8542a740a5ee
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccEditableText.h
@@ -0,0 +1,115 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#if !defined(AFX_ACCEDITABLETEXT_H__0C41AFBE_5A87_4D9D_A284_CEC264D91F81__INCLUDED_)
+#define AFX_ACCEDITABLETEXT_H__0C41AFBE_5A87_4D9D_A284_CEC264D91F81__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "resource.h"
+#include <com/sun/star/uno/reference.hxx>
+#include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
+#include "UNOXWrapper.h"
+
+/**
+ * CAccEditableText implements IAccessibleEditableText interface.
+ */
+class CAccEditableText :
+ public CComObjectRoot,
+ public CComCoClass<CAccEditableText,&CLSID_AccEditableText>,
+ public IAccessibleEditableText,
+ public CUNOXWrapper
+{
+public:
+ CAccEditableText()
+ {
+
+ }
+ virtual ~CAccEditableText()
+ {
+
+ }
+
+ BEGIN_COM_MAP(CAccEditableText)
+ COM_INTERFACE_ENTRY(IAccessibleEditableText)
+ COM_INTERFACE_ENTRY(IUNOXWrapper)
+ COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+ END_COM_MAP()
+
+ static HRESULT WINAPI _SmartQI(void* pv,
+ REFIID iid, void** ppvObject, DWORD)
+ {
+ return ((CAccEditableText*)pv)->SmartQI(iid,ppvObject);
+ }
+
+ HRESULT SmartQI(REFIID iid, void** ppvObject)
+ {
+ if( m_pOuterUnknown )
+ return OuterQueryInterface(iid,ppvObject);
+ return E_FAIL;
+ }
+
+ DECLARE_REGISTRY_RESOURCEID(IDR_AccEditableText)
+
+ // IAccessibleEditableText
+public:
+ // IAccessibleEditableText
+
+ // Copys a range of text to the clipboard.
+ STDMETHOD(copyText)(long startOffset, long endOffset);
+
+ // Deletes a range of text.
+ STDMETHOD(deleteText)(long startOffset, long endOffset);
+
+ // Inserts text at a specified offset.
+ STDMETHOD(insertText)(long offset, BSTR * text);
+
+ // Cuts a range of text to the clipboard.
+ STDMETHOD(cutText)(long startOffset, long endOffset);
+
+ // Pastes text from clipboard at specified offset.
+ STDMETHOD(pasteText)(long offset);
+
+ // Replaces range of text with new text.
+ STDMETHOD(replaceText)(long startOffset, long endOffset, BSTR * text);
+
+
+ // Sets attributes of range of text.
+ STDMETHOD(setAttributes)(long startOffset, long endOffset, BSTR * attributes);
+
+ // Overide of IUNOXWrapper.
+ STDMETHOD(put_XInterface)(long pXInterface);
+
+private:
+
+ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleEditableText> pRXEdtTxt;
+
+ void get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const ::rtl::OUString &ouValue, com::sun::star::uno::Any &rAny);
+
+ inline com::sun::star::accessibility::XAccessibleEditableText* GetXInterface()
+ {
+ return pRXEdtTxt.get();
+ }
+};
+
+#endif // !defined(AFX_ACCEDITABLETEXT_H__0C41AFBE_5A87_4D9D_A284_CEC264D91F81__INCLUDED_)
diff --git a/winaccessibility/source/UAccCOM/AccEditableText.rgs b/winaccessibility/source/UAccCOM/AccEditableText.rgs
new file mode 100644
index 000000000000..03aacb325719
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccEditableText.rgs
@@ -0,0 +1,23 @@
+HKCR
+{
+ UAccCOM.AccEditableText.1 = s 'AccEditableText Class'
+ {
+ CLSID = s '{79CE1450-1F61-48E2-BF76-C07BD10105E2}'
+ }
+ UAccCOM.AccEditableText = s 'AccEditableText Class'
+ {
+ CLSID = s '{79CE1450-1F61-48E2-BF76-C07BD10105E2}'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {79CE1450-1F61-48E2-BF76-C07BD10105E2} = s 'AccEditableText Class'
+ {
+ ProgID = s 'UAccCOM.AccEditableText.1'
+ VersionIndependentProgID = s 'UAccCOM.AccEditableText'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'both'
+ }
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/AccExtendedComponent.rgs b/winaccessibility/source/UAccCOM/AccExtendedComponent.rgs
new file mode 100644
index 000000000000..6039885b357d
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccExtendedComponent.rgs
@@ -0,0 +1,23 @@
+HKCR
+{
+ UAccCOM.AccExtendedComponent.1 = s 'AccExtendedComponent Class'
+ {
+ CLSID = s '{D91562E1-BE6C-41F3-A34C-E7AA846561A4}'
+ }
+ UAccCOM.AccExtendedComponent = s 'AccExtendedComponent Class'
+ {
+ CLSID = s '{D91562E1-BE6C-41F3-A34C-E7AA846561A4}'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {D91562E1-BE6C-41F3-A34C-E7AA846561A4} = s 'AccExtendedComponent Class'
+ {
+ ProgID = s 'UAccCOM.AccExtendedComponent.1'
+ VersionIndependentProgID = s 'UAccCOM.AccExtendedComponent'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'both'
+ }
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/AccFont.rgs b/winaccessibility/source/UAccCOM/AccFont.rgs
new file mode 100644
index 000000000000..c229746dbca6
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccFont.rgs
@@ -0,0 +1,23 @@
+HKCR
+{
+ UAccCOM.AccFont.1 = s 'AccFont Class'
+ {
+ CLSID = s '{185B9AD9-5D31-4793-888F-A21846BBAEDD}'
+ }
+ UAccCOM.AccFont = s 'AccFont Class'
+ {
+ CLSID = s '{185B9AD9-5D31-4793-888F-A21846BBAEDD}'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {185B9AD9-5D31-4793-888F-A21846BBAEDD} = s 'AccFont Class'
+ {
+ ProgID = s 'UAccCOM.AccFont.1'
+ VersionIndependentProgID = s 'UAccCOM.AccFont'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'both'
+ }
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/AccHyperLink.cpp b/winaccessibility/source/UAccCOM/AccHyperLink.cpp
new file mode 100644
index 000000000000..b63ccd09e246
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccHyperLink.cpp
@@ -0,0 +1,296 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "AccHyperLink.h"
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+#include "MAccessible.h"
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::awt;
+
+/**
+ * Returns the number of action.
+ *
+ * @param nActions the number of action.
+ */
+STDMETHODIMP CAccHyperLink::nActions(/*[out,retval]*/long* nActions)
+{
+
+ return CAccActionBase::nActions(nActions);
+}
+
+/**
+ * Performs specified action on the object.
+ *
+ * @param actionIndex the index of action.
+ */
+STDMETHODIMP CAccHyperLink::doAction(/* [in] */ long actionIndex)
+{
+
+ return CAccActionBase::doAction(actionIndex);
+}
+
+/**
+ * Gets description of specified action.
+ *
+ * @param actionIndex the index of action.
+ * @param description the description string of the specified action.
+ */
+STDMETHODIMP CAccHyperLink::get_description(long actionIndex,BSTR __RPC_FAR *description)
+{
+
+ return CAccActionBase::get_description(actionIndex, description);
+}
+
+STDMETHODIMP CAccHyperLink::get_name( long actionIndex, BSTR __RPC_FAR *name)
+{
+
+ return CAccActionBase::get_name(actionIndex, name);
+}
+
+STDMETHODIMP CAccHyperLink::get_localizedName( long actionIndex, BSTR __RPC_FAR *localizedName)
+{
+
+ return CAccActionBase::get_name(actionIndex, localizedName);
+}
+
+/**
+ * Returns key binding object (if any) associated with specified action
+ * key binding is string.
+ * e.g. "alt+d" (like IAccessible::get_accKeyboardShortcut).
+ *
+ * @param actionIndex the index of action.
+ * @param nMaxBinding the max number of key binding.
+ * @param keyBinding the key binding array.
+ * @param nBinding the actual number of key binding returned.
+ */
+STDMETHODIMP CAccHyperLink::get_keyBinding(
+ /* [in] */ long actionIndex,
+ /* [in] */ long nMaxBinding,
+ /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR *__RPC_FAR *keyBinding,
+ /* [retval][out] */ long __RPC_FAR *nBinding)
+{
+
+ return CAccActionBase::get_keyBinding(actionIndex, nMaxBinding, keyBinding, nBinding);
+}
+
+/**
+ * get an object
+ * @param
+ * @return Result.
+*/
+STDMETHODIMP CAccHyperLink::get_anchor(/* [in] */ long index,
+ /* [retval][out] */ VARIANT __RPC_FAR *anchor)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(anchor == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ // #CHECK XInterface#
+ if(!pRXLink.is())
+ {
+ return E_FAIL;
+ }
+ // Get Any type value via pRXLink.
+ ::com::sun::star::uno::Any anyVal = GetXInterface()->getAccessibleActionAnchor(index);
+ // Convert Any to VARIANT.
+ CMAccessible::ConvertAnyToVariant(anyVal, anchor);
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * get an object
+ * @param
+ * @return Result.
+*/
+STDMETHODIMP CAccHyperLink::get_anchorTarget(/* [in] */ long index,
+ /* [retval][out] */ VARIANT __RPC_FAR *anchorTarget)
+{
+
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(anchorTarget == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ // #CHECK XInterface#
+ if(!pRXLink.is())
+ {
+ return E_FAIL;
+ }
+ // Get Any type value via pRXLink.
+ ::com::sun::star::uno::Any anyVal = GetXInterface()->getAccessibleActionObject(index);
+ // Convert Any to VARIANT.
+ CMAccessible::ConvertAnyToVariant(anyVal, anchorTarget);
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+
+/**
+ * Get start index.
+ * @param index Variant to get start index.
+ * @return Result.
+*/
+STDMETHODIMP CAccHyperLink::get_startIndex(/* [retval][out] */ long __RPC_FAR *index)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(index == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ *index = GetXInterface()->getStartIndex();
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get start index.
+ * @param index Variant to get end index.
+ * @return Result.
+*/
+STDMETHODIMP CAccHyperLink::get_endIndex(/* [retval][out] */ long __RPC_FAR *index)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(index == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ // #CHECK XInterface#
+ if(!pRXLink.is())
+ {
+ return E_FAIL;
+ }
+ *index = GetXInterface()->getEndIndex();
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Judge if the hyperlink is valid.
+ * @param valid Variant to get validity.
+ * @return Result.
+*/
+STDMETHODIMP CAccHyperLink::get_valid(/* [retval][out] */ boolean __RPC_FAR *valid)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(valid == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ // #CHECK XInterface#
+ if(!pRXLink.is())
+ {
+ return E_FAIL;
+ }
+ *valid = GetXInterface()->isValid();
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Put UNO interface.
+ * @param pXInterface XAccessibleContext interface.
+ * @return Result.
+*/
+STDMETHODIMP CAccHyperLink::put_XInterface(long pXInterface)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ CAccActionBase::put_XInterface(pXInterface);
+ //special query.
+ if(pUNOInterface != NULL)
+ {
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+ if( !pRContext.is() )
+ {
+ return E_FAIL;
+ }
+ Reference<XAccessibleHyperlink> pRXI(pRContext,UNO_QUERY);
+ if( !pRXI.is() )
+ {
+ pRXLink = NULL;
+ }
+ else
+ pRXLink = pRXI.get();
+ }
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Put UNO interface.
+ * @param pXSubInterface XAccessibleHyperlink interface.
+ * @return Result.
+*/
+STDMETHODIMP CAccHyperLink::put_XSubInterface(long pXSubInterface)
+{
+
+ CHECK_ENABLE_INF
+
+ pRXLink = (XAccessibleHyperlink*)pXSubInterface;
+ pRXAct = (XAccessibleAction*)pXSubInterface;
+
+ return S_OK;
+}
diff --git a/winaccessibility/source/UAccCOM/AccHyperLink.h b/winaccessibility/source/UAccCOM/AccHyperLink.h
new file mode 100644
index 000000000000..56415c225ca3
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccHyperLink.h
@@ -0,0 +1,140 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#if !defined(AFX_ACCHYPERLINK_H__59DA79A5_A895_43DB_9495_2B2049CF5C65__INCLUDED_)
+#define AFX_ACCHYPERLINK_H__59DA79A5_A895_43DB_9495_2B2049CF5C65__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "resource.h" // main symbols
+
+
+#include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
+#include "AccActionBase.h"
+#include "UNOXWrapper.h"
+
+/**
+ * CAccHyperLink implements IAccessibleHyperlink interface.
+ */
+class ATL_NO_VTABLE CAccHyperLink :
+ public CComObjectRoot,
+ public CComCoClass<CAccHyperLink,&CLSID_AccHyperLink>,
+ public IAccessibleHyperlink,
+ public CAccActionBase
+{
+public:
+ CAccHyperLink()
+ {
+ }
+ ~CAccHyperLink()
+ {
+ }
+
+ BEGIN_COM_MAP(CAccHyperLink)
+ COM_INTERFACE_ENTRY(IAccessibleAction)
+ COM_INTERFACE_ENTRY(IAccessibleHyperlink)
+ COM_INTERFACE_ENTRY(IUNOXWrapper)
+ END_COM_MAP()
+
+ DECLARE_REGISTRY_RESOURCEID(IDR_AccHyperLink)
+
+ static HRESULT WINAPI _SmartQI(void* pv,
+ REFIID iid, void** ppvObject, DWORD)
+ {
+ return ((CAccHyperLink*)pv)->SmartQI(iid,ppvObject);
+ }
+
+ HRESULT SmartQI(REFIID iid, void** ppvObject)
+ {
+ if( m_pOuterUnknown )
+ return OuterQueryInterface(iid,ppvObject);
+ return E_FAIL;
+ }
+
+ // IAccessibleHyperlink
+public:
+ // IAccessibleAction
+
+ // Returns the number of action.
+ STDMETHOD(nActions)(/*[out,retval]*/long* nActions);
+
+ // Performs specified action on the object.
+ STDMETHOD(doAction)(/* [in] */ long actionIndex);
+
+ // get the action name
+ STDMETHOD(get_name)( long actionIndex, BSTR __RPC_FAR *name);
+
+ // get the localized action name
+ STDMETHOD(get_localizedName)( long actionIndex, BSTR __RPC_FAR *localizedName);
+
+ // Gets description of specified action.
+ STDMETHOD(get_description)(long actionIndex,BSTR __RPC_FAR *description);
+
+ // Returns key binding object (if any) associated with specified action
+ // key binding is string.
+ // e.g. "alt+d" (like IAccessible::get_accKeyboardShortcut).
+ STDMETHOD(get_keyBinding)(
+ /* [in] */ long actionIndex,
+ /* [in] */ long nMaxBinding,
+ /* [length_is][length_is][size_is][size_is][out] */ BSTR __RPC_FAR *__RPC_FAR *keyBinding,
+ /* [retval][out] */ long __RPC_FAR *nBinding);
+
+ // IAccessibleHyperlink
+
+ // get an object, e.g. BSTR or image object, that is overloaded with link behavior
+ STDMETHOD(get_anchor)(/* [in] */ long index,
+ /* [retval][out] */ VARIANT __RPC_FAR *anchor);
+
+ // get an object representing the target of the link, usually a BSTR of the URI
+ STDMETHOD(get_anchorTarget)(/* [in] */ long index,
+ /* [retval][out] */ VARIANT __RPC_FAR *anchorTarget);
+
+ // Returns the index at which the textual representation of the
+ // hyperlink (group) starts.
+ STDMETHOD(get_startIndex)(/* [retval][out] */ long __RPC_FAR *index);
+
+ // Returns the index at which the textual rerpesentation of the
+ // hyperlink (group) ends.
+ STDMETHOD(get_endIndex)(/* [retval][out] */ long __RPC_FAR *index);
+
+ // Returns whether the document referenced by this links is still valid.
+ STDMETHOD(get_valid)(/* [retval][out] */ boolean __RPC_FAR *valid);
+
+ // Overide of IUNOXWrapper.
+ STDMETHOD(put_XInterface)(long pXInterface);
+
+ // Overide of IUNOXWrapper.
+ STDMETHOD(put_XSubInterface)(long pXSubInterface);
+
+private:
+
+ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleHyperlink> pRXLink;
+
+ inline com::sun::star::accessibility::XAccessibleHyperlink* GetXInterface()
+ {
+ return pRXLink.get();
+ }
+
+};
+
+#endif // !defined(AFX_ACCHYPERLINK_H__59DA79A5_A895_43DB_9495_2B2049CF5C65__INCLUDED_)
diff --git a/winaccessibility/source/UAccCOM/AccHyperLink.rgs b/winaccessibility/source/UAccCOM/AccHyperLink.rgs
new file mode 100644
index 000000000000..ceb622ee0e95
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccHyperLink.rgs
@@ -0,0 +1,23 @@
+HKCR
+{
+ UAccCOM.AccHyperLink.1 = s 'AccHyperLink Class'
+ {
+ CLSID = s '{519A64CD-F6A6-4793-BE50-4E36C4C593EF}'
+ }
+ UAccCOM.AccHyperLink = s 'AccHyperLink Class'
+ {
+ CLSID = s '{519A64CD-F6A6-4793-BE50-4E36C4C593EF}'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {519A64CD-F6A6-4793-BE50-4E36C4C593EF} = s 'AccHyperLink Class'
+ {
+ ProgID = s 'UAccCOM.AccHyperLink.1'
+ VersionIndependentProgID = s 'UAccCOM.AccHyperLink'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'both'
+ }
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/AccHypertext.cpp b/winaccessibility/source/UAccCOM/AccHypertext.cpp
new file mode 100644
index 000000000000..5e0e40d82d2c
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccHypertext.cpp
@@ -0,0 +1,409 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "AccHypertext.h"
+
+#include "act.hxx"
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+
+/////////////////////////////////////////////////////////////////////////////
+//
+/**
+ * Get special selection.
+ * @param startOffset Start selection offset.
+ * @param endOffset End selection offset.
+ * @param success Variant to accept the result of if the method call is successful.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::addSelection(long startOffset, long endOffset)
+{
+
+ return CAccTextBase::get_addSelection(startOffset, endOffset);
+}
+
+
+/**
+ * Get special attributes.
+ * @param offset Offset.
+ * @param startOffset Variant to accept start offset.
+ * @param endOffset Variant to accept end offset.
+ * @param textAttributes Variant to accept attributes.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::get_attributes(long offset, long * startOffset, long * endOffset, BSTR * textAttributes)
+{
+
+ return CAccTextBase::get_attributes(offset, startOffset, endOffset, textAttributes);
+}
+
+/**
+ * Get caret position.
+ * @param offset Variant to accept caret offset.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::get_caretOffset(long * offset)
+{
+
+ return CAccTextBase::get_caretOffset(offset);
+}
+
+/**
+ * Get character count.
+ * @param nCharacters Variant to accept character count.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::get_characterCount(long * nCharacters)
+{
+
+ return CAccTextBase::get_characterCount(nCharacters);
+}
+
+/**
+ * Get character extents.
+ * @param offset Offset.
+ * @param x Variant to accpet x position.
+ * @param y Variant to accpet y position.
+ * @param width Variant to accpet width.
+ * @param Height Variant to accpet height.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::get_characterExtents(long offset, IA2CoordinateType coordType, long * x, long * y, long * width, long * height)
+{
+
+ return CAccTextBase::get_characterExtents(offset, coordType, x, y, width, height);
+}
+
+/**
+ * Get slections count.
+ * @param nSelections Variant to accpet slections count.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::get_nSelections(long * nSelections)
+{
+
+ return CAccTextBase::get_nSelections(nSelections);
+}
+
+/**
+ * Get offset of some special point.
+ * @param x X position of one point.
+ * @param x Y position of one point.
+ * @param coordType Type.
+ * @param offset Variant to accept offset.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::get_offsetAtPoint(long x, long y, IA2CoordinateType coordType, long * offset)
+{
+ return CAccTextBase::get_offsetAtPoint(x, y, coordType, offset);
+}
+
+/**
+ * Get selection range.
+ * @param selection selection count.
+ * @param startOffset Variant to accept the start offset of special selection.
+ * @param endOffset Variant to accept the end offset of special selection.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::get_selection(long selection, long * startOffset, long * endOffset)
+{
+
+ return CAccTextBase::get_selection(selection, startOffset, endOffset);
+}
+
+/**
+ * Get special text.
+ * @param startOffset Start position of special range.
+ * @param endOffset End position of special range.
+ * @param text Variant to accept the text of special range.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::get_text(long startOffset, long endOffset, BSTR * text)
+{
+
+ return CAccTextBase::get_text(startOffset, endOffset, text);
+}
+
+/**
+ * Get special text before some position.
+ * @param offset Special position.
+ * @param boundaryType Boundary type.
+ * @param startOffset Variant to accept the start offset.
+ * @param endOffset Variant to accept the end offset.
+ * @param text Variant to accept the special text.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::get_textBeforeOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
+{
+
+ return CAccTextBase::get_textBeforeOffset(offset, boundaryType,
+ startOffset, endOffset, text);
+}
+
+/**
+ * Get special text after some position.
+ * @param offset Special position.
+ * @param boundaryType Boundary type.
+ * @param startOffset Variant to accept the start offset.
+ * @param endOffset Variant to accept the end offset.
+ * @param text Variant to accept the special text.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::get_textAfterOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
+{
+
+ return CAccTextBase::get_textAfterOffset(offset, boundaryType,
+ startOffset, endOffset, text);
+}
+
+/**
+ * Get special text at some position.
+ * @param offset Special position.
+ * @param boundaryType Boundary type.
+ * @param startOffset Variant to accept the start offset.
+ * @param endOffset Variant to accept the end offset.
+ * @param text Variant to accept the special text.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::get_textAtOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
+{
+
+ return CAccTextBase::get_textAtOffset(offset, boundaryType,
+ startOffset, endOffset, text);
+}
+
+/**
+ * Remove selection.
+ * @param selectionIndex Special selection index
+ * @param success Variant to accept the memthod called result.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::removeSelection(long selectionIndex)
+{
+
+ return CAccTextBase::removeSelection(selectionIndex);
+}
+
+/**
+ * Set caret position.
+ * @param offset Special position.
+ * @param success Variant to accept the memthod called result.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::setCaretOffset(long offset)
+{
+
+ return CAccTextBase::setCaretOffset(offset);
+}
+
+/**
+ * Set special selection.
+ * @param selectionIndex Special selection index.
+ * @param startOffset start position.
+ * @param endOffset end position.
+ * @param success Variant to accept the memthod called result.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::setSelection(long selectionIndex, long startOffset, long endOffset)
+{
+
+ return CAccTextBase::setSelection(selectionIndex, startOffset,
+ endOffset);
+}
+
+/**
+ * Get characters count.
+ * @param nCharacters Variant to accept the characters count.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::get_nCharacters(long * nCharacters)
+{
+
+ return CAccTextBase::get_nCharacters(nCharacters);
+}
+
+STDMETHODIMP CAccHypertext::get_newText( IA2TextSegment *newText)
+{
+ return CAccTextBase::get_newText(newText);
+}
+
+STDMETHODIMP CAccHypertext::get_oldText( IA2TextSegment *oldText)
+{
+ return CAccTextBase::get_oldText(oldText);
+}
+
+/**
+ * Scroll to special sub-string .
+ * @param startIndex Start index of sub string.
+ * @param endIndex End index of sub string.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::scrollSubstringToPoint(long startIndex, long endIndex,enum IA2CoordinateType coordinateType, long x, long y )
+{
+
+ return CAccTextBase::scrollSubstringToPoint(startIndex, endIndex, coordinateType, x, y);
+}
+STDMETHODIMP CAccHypertext::scrollSubstringTo(long startIndex, long endIndex,enum IA2ScrollType scrollType)
+{
+
+ return CAccTextBase::scrollSubstringTo(startIndex, endIndex,scrollType);
+}
+
+/**
+ * Get hyperlink count.
+ * @param hyperlinkCount Variant to accpet hyperlink count.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::get_nHyperlinks(long *hyperlinkCount)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(hyperlinkCount == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pHyperText.is())
+ {
+ return E_FAIL;
+ }
+
+ *hyperlinkCount = pHyperText->getHyperLinkCount();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get special hyperlink.
+ * @param index Special hyperlink index.
+ * @param hyperlink Variant to accept special hyperlink via index.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::get_hyperlink(long index,IAccessibleHyperlink **hyperlink)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(hyperlink == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pHyperText.is())
+ {
+ return E_FAIL;
+ }
+
+ Reference<XAccessibleHyperlink> pRLink = pHyperText->getHyperLink(index);
+ if(!pRLink.is())
+ {
+ *hyperlink = NULL;
+ return E_FAIL;
+ }
+
+ IAccessibleHyperlink* plink = NULL;
+ ActivateActContext();
+ HRESULT hr = CoCreateInstance( CLSID_AccHyperLink, NULL, CLSCTX_SERVER ,
+ IID_IAccessibleHyperlink,
+ (void **)&plink);
+ DeactivateActContext();
+ if( SUCCEEDED(hr) )
+ {
+ IUNOXWrapper* wrapper = NULL;
+ plink->QueryInterface(IID_IUNOXWrapper, (void**)&wrapper);
+ if(wrapper)
+ {
+ wrapper->put_XSubInterface((long)pRLink.get()/*pXI*/);
+ wrapper->Release();
+ }
+ *hyperlink = plink;
+ return S_OK;
+ }
+
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Returns the index of the hyperlink that is associated with this character index.
+ * @param charIndex Special char index.
+ * @param hyperlinkIndex Variant to accept special hyperlink index.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::get_hyperlinkIndex(long charIndex, long *hyperlinkIndex)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(hyperlinkIndex == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pHyperText.is())
+ {
+ return E_FAIL;
+ }
+
+ *hyperlinkIndex = pHyperText->getHyperLinkIndex(charIndex);
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Put UNO interface.
+ * @param pXInterface UNO interface.
+ * @return Result.
+*/
+STDMETHODIMP CAccHypertext::put_XInterface(long pXInterface)
+{
+
+
+ ENTER_PROTECTED_BLOCK
+
+ CAccTextBase::put_XInterface(pXInterface);
+ //special query.
+ if(pUNOInterface == NULL)
+ return E_FAIL;
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+ if( !pRContext.is() )
+ {
+ return E_FAIL;
+ }
+ Reference<XAccessibleHypertext> pRXI(pRContext,UNO_QUERY);
+ if( !pRXI.is() )
+ pHyperText = NULL;
+ else
+ pHyperText = pRXI.get();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
diff --git a/winaccessibility/source/UAccCOM/AccHypertext.h b/winaccessibility/source/UAccCOM/AccHypertext.h
new file mode 100644
index 000000000000..5a817d20f492
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccHypertext.h
@@ -0,0 +1,161 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#if !defined(AFX_ACCHYPERTEXT_H__6DC133B6_03DB_42C6_A9B7_27AF4FDA00CA__INCLUDED_)
+#define AFX_ACCHYPERTEXT_H__6DC133B6_03DB_42C6_A9B7_27AF4FDA00CA__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "resource.h" // main symbols
+
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleHypertext.hpp>
+#include "AccTextBase.h"
+
+/**
+ * CAccHypertext implements IAccessibleHypertext interface.
+ */
+class ATL_NO_VTABLE CAccHypertext :
+ public CComObjectRoot,
+ public CComCoClass<CAccHypertext,&CLSID_AccHypertext>,
+ public IAccessibleHypertext,
+ public CAccTextBase
+{
+public:
+ CAccHypertext()
+ {
+ }
+ ~CAccHypertext()
+ {
+ }
+
+ BEGIN_COM_MAP(CAccHypertext)
+ COM_INTERFACE_ENTRY(IAccessibleText)
+ COM_INTERFACE_ENTRY(IAccessibleHypertext)
+ COM_INTERFACE_ENTRY(IUNOXWrapper)
+ COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+ END_COM_MAP()
+
+ static HRESULT WINAPI _SmartQI(void* pv,
+ REFIID iid, void** ppvObject, DWORD)
+ {
+ return ((CAccHypertext*)pv)->SmartQI(iid,ppvObject);
+ }
+
+ HRESULT SmartQI(REFIID iid, void** ppvObject)
+ {
+ if( m_pOuterUnknown )
+ return OuterQueryInterface(iid,ppvObject);
+ return E_FAIL;
+ }
+
+ DECLARE_REGISTRY_RESOURCEID(IDR_AccHypertext)
+
+ // IAccessibleHypertext
+public:
+ // IAccessibleText
+
+ // Adds a text selection.
+ STDMETHOD(addSelection)(long startOffset, long endOffset);//, unsigned char * success)
+
+ // Gets text attributes.
+ STDMETHOD(get_attributes)(long offset, long * startOffset, long * endOffset, BSTR * textAttributes);
+
+ // Gets caret offset.
+ STDMETHOD(get_caretOffset)(long * offset);
+
+ // Gets total number of characters.
+ STDMETHOD(get_characterCount)(long * nCharacters);
+
+ // Gets bounding rect containing the glyph(s) representing the character
+ // at the specified text offset
+ STDMETHOD(get_characterExtents)(long offset, IA2CoordinateType coordType, long * x, long * y, long * width, long * height);
+
+ // Gets number of active non-contiguous selections.
+ STDMETHOD(get_nSelections)(long * nSelections);
+
+ // Gets bounding rect for the glyph at a certain point.
+ STDMETHOD(get_offsetAtPoint)(long x, long y, IA2CoordinateType coordType, long * offset);
+
+ // Gets character offsets of N-th active text selection.
+ STDMETHOD(get_selection)(long selection, long * startOffset, long * endOffset);
+
+ // Gets a range of text by offset NOTE: returned string may be longer
+ // than endOffset-startOffset bytes if text contains multi-byte characters.
+ STDMETHOD(get_text)(long startOffset, long endOffset, BSTR * text);
+
+ // Gets a specified amount of text that ends before a specified offset.
+ STDMETHOD(get_textBeforeOffset)(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text);
+
+ // Gets a specified amount of text that spans the specified offset.
+ STDMETHOD(get_textAfterOffset)(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text);
+
+ // Gets a specified amount of text that starts after a specified offset.
+ STDMETHOD(get_textAtOffset)(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text);
+
+ // Unselects a range of text.
+ STDMETHOD(removeSelection)(long selectionIndex);
+
+ // Moves text caret.
+ STDMETHOD(setCaretOffset)(long offset);
+
+ // Changes the bounds of an existing selection.
+ STDMETHOD(setSelection)(long selectionIndex, long startOffset, long endOffset);
+
+ // Gets total number of characters.
+ // NOTE: this may be different than the total number of bytes required
+ // to store the text, if the text contains multi-byte characters.
+ STDMETHOD(get_nCharacters)(long * nCharacters);
+
+ // Makes specific part of string visible on screen.
+ STDMETHOD(scrollSubstringTo)(long startIndex, long endIndex,enum IA2ScrollType scrollType);
+
+ STDMETHOD(scrollSubstringToPoint)(long startIndex, long endIndex,enum IA2CoordinateType coordinateType, long x, long y );
+
+ STDMETHOD(get_newText)( IA2TextSegment *newText);
+
+ STDMETHOD(get_oldText)( IA2TextSegment *oldText);
+
+ //IAccessibleHypertext
+
+ // Gets the number of hyperlink.
+ STDMETHOD(get_nHyperlinks)(long *hyperlinkCount);
+
+ // Gets the hyperlink object via specified index.
+ STDMETHOD(get_hyperlink)(long index,IAccessibleHyperlink **hyperlink);
+
+ // Returns the index of the hyperlink that is associated with this
+ // character index.
+ STDMETHOD(get_hyperlinkIndex)(long charIndex, long *hyperlinkIndex);
+
+ // Overide of IUNOXWrapper.
+ STDMETHOD(put_XInterface)(long pXInterface);
+
+private:
+
+ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleHypertext> pHyperText;
+
+};
+
+#endif // !defined(AFX_ACCHYPERTEXT_H__6DC133B6_03DB_42C6_A9B7_27AF4FDA00CA__INCLUDED_)
diff --git a/winaccessibility/source/UAccCOM/AccHypertext.rgs b/winaccessibility/source/UAccCOM/AccHypertext.rgs
new file mode 100644
index 000000000000..6baf54496e6a
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccHypertext.rgs
@@ -0,0 +1,23 @@
+HKCR
+{
+ UAccCOM.AccHypertext.1 = s 'AccHypertext Class'
+ {
+ CLSID = s '{CC55D71B-1828-4EE0-89E2-C3749CF9C9AB}'
+ }
+ UAccCOM.AccHypertext = s 'AccHypertext Class'
+ {
+ CLSID = s '{CC55D71B-1828-4EE0-89E2-C3749CF9C9AB}'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {CC55D71B-1828-4EE0-89E2-C3749CF9C9AB} = s 'AccHypertext Class'
+ {
+ ProgID = s 'UAccCOM.AccHypertext.1'
+ VersionIndependentProgID = s 'UAccCOM.AccHypertext'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'both'
+ }
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/AccImage.cpp b/winaccessibility/source/UAccCOM/AccImage.cpp
new file mode 100644
index 000000000000..7e3ba7699443
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccImage.cpp
@@ -0,0 +1,102 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "AccImage.h"
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+
+/**
+ * Get description.
+ * @param description Variant to get description.
+ * @return Result.
+*/
+STDMETHODIMP CAccImage::get_description(BSTR * description)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if (description == NULL)
+ return E_INVALIDARG;
+ if( !pRXImg.is() )
+ return E_FAIL;
+
+ ::rtl::OUString ouStr = GetXInterface()->getAccessibleImageDescription();
+ SAFE_SYSFREESTRING(*description);
+ *description = SysAllocString((OLECHAR*)ouStr.getStr());
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+STDMETHODIMP CAccImage::get_imagePosition(
+ /* [in] */ enum IA2CoordinateType,
+ /* [out] */ long __RPC_FAR *,
+ /* [retval][out] */ long __RPC_FAR *)
+{
+ return E_NOTIMPL;
+}
+
+STDMETHODIMP CAccImage::get_imageSize(
+ /* [out] */ long __RPC_FAR *,
+ /* [retval][out] */ long __RPC_FAR *)
+{
+ return E_NOTIMPL;
+}
+
+/**
+ * Put UNO interface.
+ * @param pXInterface UNO interface.
+ * @return Result.
+*/
+STDMETHODIMP CAccImage::put_XInterface(long pXInterface)
+{
+
+
+ ENTER_PROTECTED_BLOCK
+
+ CUNOXWrapper::put_XInterface(pXInterface);
+ //special query.
+ if(pUNOInterface == NULL)
+ return E_FAIL;
+
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+ if( !pRContext.is() )
+ {
+ return E_FAIL;
+ }
+ Reference<XAccessibleImage> pRXI(pRContext,UNO_QUERY);
+ if( !pRXI.is() )
+ pRXImg = NULL;
+ else
+ pRXImg = pRXI.get();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
diff --git a/winaccessibility/source/UAccCOM/AccImage.h b/winaccessibility/source/UAccCOM/AccImage.h
new file mode 100644
index 000000000000..41921f9480fe
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccImage.h
@@ -0,0 +1,101 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#if !defined(AFX_ACCIMAGE_H__D5E55275_CCD4_497F_8E77_F9B391D2F4A8__INCLUDED_)
+#define AFX_ACCIMAGE_H__D5E55275_CCD4_497F_8E77_F9B391D2F4A8__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "resource.h" // main symbols
+
+
+#include <com/sun/star/uno/reference.hxx>
+#include <com/sun/star/accessibility/XAccessibleImage.hpp>
+#include "UNOXWrapper.h"
+
+/**
+ * CAccImage implements IAccessibleImage interface.
+ */
+class ATL_NO_VTABLE CAccImage :
+ public CComObjectRoot,
+ public CComCoClass<CAccImage,&CLSID_AccImage>,
+ public IAccessibleImage,
+ public CUNOXWrapper
+{
+public:
+ CAccImage()
+ {
+ }
+ virtual ~CAccImage()
+ {
+ }
+ BEGIN_COM_MAP(CAccImage)
+ COM_INTERFACE_ENTRY(IAccessibleImage)
+ COM_INTERFACE_ENTRY(IUNOXWrapper)
+ COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+ END_COM_MAP()
+
+ static HRESULT WINAPI _SmartQI(void* pv,
+ REFIID iid, void** ppvObject, DWORD)
+ {
+ return ((CAccImage*)pv)->SmartQI(iid,ppvObject);
+ }
+
+ HRESULT SmartQI(REFIID iid, void** ppvObject)
+ {
+ if( m_pOuterUnknown )
+ return OuterQueryInterface(iid,ppvObject);
+ return E_FAIL;
+ }
+
+ DECLARE_REGISTRY_RESOURCEID(IDR_AccImage)
+
+ // IAccessibleImage
+public:
+ // IAccessibleImage
+
+ // Gets the description of the image.
+ STDMETHOD(get_description)(BSTR * description);
+
+ STDMETHOD(get_imagePosition)( enum IA2CoordinateType coordinateType,
+ long __RPC_FAR *x,
+ long __RPC_FAR *y);
+
+ STDMETHOD(get_imageSize)(
+ long __RPC_FAR *height,
+ long __RPC_FAR *width);
+
+ // Overide of IUNOXWrapper.
+ STDMETHOD(put_XInterface)(long pXInterface);
+
+private:
+
+ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleImage> pRXImg;
+
+ inline com::sun::star::accessibility::XAccessibleImage* GetXInterface()
+ {
+ return pRXImg.get();
+ }
+};
+
+#endif // !defined(AFX_ACCIMAGE_H__D5E55275_CCD4_497F_8E77_F9B391D2F4A8__INCLUDED_)
diff --git a/winaccessibility/source/UAccCOM/AccImage.rgs b/winaccessibility/source/UAccCOM/AccImage.rgs
new file mode 100644
index 000000000000..9be96fd3e777
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccImage.rgs
@@ -0,0 +1,23 @@
+HKCR
+{
+ UAccCOM.AccImage.1 = s 'AccImage Class'
+ {
+ CLSID = s '{73A45800-7A62-432C-A1A6-BF8852994331}'
+ }
+ UAccCOM.AccImage = s 'AccImage Class'
+ {
+ CLSID = s '{73A45800-7A62-432C-A1A6-BF8852994331}'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {73A45800-7A62-432C-A1A6-BF8852994331} = s 'AccImage Class'
+ {
+ ProgID = s 'UAccCOM.AccImage.1'
+ VersionIndependentProgID = s 'UAccCOM.AccImage'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'both'
+ }
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/AccKeyBinding.rgs b/winaccessibility/source/UAccCOM/AccKeyBinding.rgs
new file mode 100644
index 000000000000..6967bf2b6458
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccKeyBinding.rgs
@@ -0,0 +1,23 @@
+HKCR
+{
+ UAccCOM.AccKeyBinding.1 = s 'AccKeyBinding Class'
+ {
+ CLSID = s '{98AFE6FB-D748-4313-B4D6-E7B273B6255D}'
+ }
+ UAccCOM.AccKeyBinding = s 'AccKeyBinding Class'
+ {
+ CLSID = s '{98AFE6FB-D748-4313-B4D6-E7B273B6255D}'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {98AFE6FB-D748-4313-B4D6-E7B273B6255D} = s 'AccKeyBinding Class'
+ {
+ ProgID = s 'UAccCOM.AccKeyBinding.1'
+ VersionIndependentProgID = s 'UAccCOM.AccKeyBinding'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'both'
+ }
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/AccRelation.cpp b/winaccessibility/source/UAccCOM/AccRelation.cpp
new file mode 100644
index 000000000000..1eb261575be7
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccRelation.cpp
@@ -0,0 +1,214 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "AccRelation.h"
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include "MAccessible.h"
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+
+/**
+ * Get relation type.
+ * @param relationType Variant to get relation type.
+ * @return Result.
+*/
+STDMETHODIMP CAccRelation::get_relationType(BSTR * relationType)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (relationType == NULL)
+ return E_INVALIDARG;
+
+ int type = relation.RelationType;
+ SAFE_SYSFREESTRING(*relationType);
+
+ *relationType = getRelationTypeBSTR(type);
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+// Gets what the type of localized relation is.
+STDMETHODIMP CAccRelation::get_localizedRelationType(BSTR *)
+{
+
+
+ ENTER_PROTECTED_BLOCK
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get targets length.
+ * @param nTargets Variant to get targets length.
+ * @return Result.
+*/
+STDMETHODIMP CAccRelation::get_nTargets(long * nTargets)
+{
+
+
+ ENTER_PROTECTED_BLOCK
+
+ CHECK_ENABLE_INF
+ if (nTargets == NULL)
+ return E_INVALIDARG;
+
+ Sequence< Reference< XInterface > > xTargets = relation.TargetSet;
+ *nTargets = xTargets.getLength();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get special target.
+ * @param targetIndex target index.
+ * @param target Variant to get special target.
+ * @return Result.
+*/
+STDMETHODIMP CAccRelation::get_target(long targetIndex, IUnknown * * target)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (target == NULL)
+ return E_FAIL;
+
+ Sequence< Reference< XInterface > > xTargets = relation.TargetSet;
+ int nCount = xTargets.getLength();
+ if( targetIndex >= nCount )
+ return E_FAIL;
+
+ Reference<XInterface> pRAcc = xTargets[targetIndex];
+ IAccessible* pRet = NULL;
+
+ BOOL isGet = CMAccessible::get_IAccessibleFromXAccessible((long)pRAcc.get(),&pRet);
+ if(isGet)
+ {
+ *target = /*(IAccessible2 *)*/(IUnknown*)pRet;
+ pRet->AddRef();
+ return S_OK;
+ }
+
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get special targets.
+ * @param maxTargets Special targets count.
+ * @param target Variant to get special target.
+ * @param nTargets Variant to accept actual target length.
+ * @return Result.
+*/
+STDMETHODIMP CAccRelation::get_targets(long, IUnknown * * target, long * nTargets)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(target == NULL)
+ return E_INVALIDARG;
+ if (nTargets == NULL)
+ return E_INVALIDARG;
+
+ Sequence< Reference< XInterface > > xTargets = relation.TargetSet;
+ int nCount = xTargets.getLength();
+
+ *target = (IUnknown*)::CoTaskMemAlloc(nCount*sizeof(IUnknown));
+
+ // #CHECK Memory Allocation#
+ if(*target == NULL)
+ {
+ return E_FAIL;
+ }
+
+ for(int i=0; i<nCount ; i++)
+ {
+ IUnknown* pAcc = NULL;
+ HRESULT hr = get_target(i,&pAcc);
+ if(SUCCEEDED(hr))
+ target[i] = pAcc;
+ }
+
+ *nTargets = nCount;
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Put UNO interface.
+ * @param pXSubInterface AccessibleRelation pointer.
+ * @return Result.
+*/
+STDMETHODIMP CAccRelation::put_XSubInterface(long pXSubInterface)
+{
+
+ relation = *((AccessibleRelation*)pXSubInterface);
+ return S_OK;
+}
+
+/**
+ * Get relation type string by type.
+ * @param type Relation type.
+ * @return relation type string.
+*/
+BSTR CAccRelation::getRelationTypeBSTR(int type)
+{
+ static struct TYPE_BSTR_MAP
+ {
+ LPCTSTR string;
+ int type;
+ }
+ map[] =
+ {
+ {_T("INVALID") , 0},
+ {IA2_RELATION_FLOWS_FROM , 1},
+ {IA2_RELATION_FLOWS_TO , 2},
+ {IA2_RELATION_CONTROLLED_BY , 3},
+ {IA2_RELATION_CONTROLLER_FOR, 4},
+ {IA2_RELATION_LABEL_FOR , 5},
+ {IA2_RELATION_LABELED_BY , 6},
+ {IA2_RELATION_MEMBER_OF , 7},
+ {IA2_RELATION_SUBWINDOW_OF , 8},
+ {IA2_RELATION_NODE_CHILD_OF, 9},
+ {IA2_RELATION_DESCRIBED_BY , 10},
+ };
+
+ USES_CONVERSION;
+
+ return (type >= 0 && type <= 10) ? T2BSTR(map[type].string) : _T("");
+}
diff --git a/winaccessibility/source/UAccCOM/AccRelation.h b/winaccessibility/source/UAccCOM/AccRelation.h
new file mode 100644
index 000000000000..a7903f7dc571
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccRelation.h
@@ -0,0 +1,88 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCRELATION_H_
+#define __ACCRELATION_H_
+
+#include "resource.h" // main symbols
+
+
+#include <com/sun/star/uno/reference.hxx>
+#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
+#include "UNOXWrapper.h"
+
+/**
+ * CAccRelation implements IAccessibleRelation interface.
+ */
+class ATL_NO_VTABLE CAccRelation :
+ public CComObjectRoot,
+ public CComCoClass<CAccRelation, &CLSID_AccRelation>,
+ public IAccessibleRelation,
+ public CUNOXWrapper
+{
+public:
+ CAccRelation()
+ {
+ }
+ virtual ~CAccRelation()
+ {
+ }
+
+ DECLARE_REGISTRY_RESOURCEID(IDR_ACCRELATION)
+
+ DECLARE_PROTECT_FINAL_CONSTRUCT()
+
+ BEGIN_COM_MAP(CAccRelation)
+ COM_INTERFACE_ENTRY(IAccessibleRelation)
+ COM_INTERFACE_ENTRY(IUNOXWrapper)
+ END_COM_MAP()
+
+ // IAccessibleRelation
+public:
+ // IAccessibleRelation
+
+ // Gets what the type of relation is.
+ STDMETHOD(get_relationType)(BSTR * relationType);
+
+ // Gets what the type of localized relation is.
+ STDMETHOD(get_localizedRelationType)(BSTR * relationType);
+
+ // Gets how many targets this relation have.
+ STDMETHOD(get_nTargets)(long * nTargets);
+
+ // Gets one accessible relation target.
+ STDMETHOD(get_target)(long targetIndex, IUnknown * * target);
+
+ // Gets multiple accessible relation targets.
+ STDMETHOD(get_targets)(long maxTargets, IUnknown * * target, long * nTargets);
+
+ // Overide of IUNOXWrapper.
+ STDMETHOD(put_XSubInterface)(long pXSubInterface);
+
+ //static OLECHAR* getRelationTypeOLECHAR(int type);
+ static BSTR getRelationTypeBSTR(int type);
+
+private:
+
+ com::sun::star::accessibility::AccessibleRelation relation;
+};
+
+#endif //__ACCRELATION_H_
diff --git a/winaccessibility/source/UAccCOM/AccRelation.rgs b/winaccessibility/source/UAccCOM/AccRelation.rgs
new file mode 100644
index 000000000000..3a7d3d2c6ed1
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccRelation.rgs
@@ -0,0 +1,25 @@
+HKCR
+{
+ UAccCOM.AccRelation.1 = s 'AccRelation Class'
+ {
+ CLSID = s '{8745CF0C-3104-4BAE-B7D0-D7B1717C006E}'
+ }
+ UAccCOM.AccRelation = s 'AccRelation Class'
+ {
+ CLSID = s '{8745CF0C-3104-4BAE-B7D0-D7B1717C006E}'
+ CurVer = s 'UAccCOM.AccRelation.1'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {8745CF0C-3104-4BAE-B7D0-D7B1717C006E} = s 'AccRelation Class'
+ {
+ ProgID = s 'UAccCOM.AccRelation.1'
+ VersionIndependentProgID = s 'UAccCOM.AccRelation'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'Apartment'
+ }
+ 'TypeLib' = s '{19ECB1B0-9376-4FF9-B580-223FC9C200B8}'
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/AccSelection.rgs b/winaccessibility/source/UAccCOM/AccSelection.rgs
new file mode 100644
index 000000000000..484099086c5d
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccSelection.rgs
@@ -0,0 +1,23 @@
+HKCR
+{
+ UAccCOM.AccSelection.1 = s 'AccSelection Class'
+ {
+ CLSID = s '{9B83B8C3-3592-4C29-8682-559E37368E95}'
+ }
+ UAccCOM.AccSelection = s 'AccSelection Class'
+ {
+ CLSID = s '{9B83B8C3-3592-4C29-8682-559E37368E95}'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {9B83B8C3-3592-4C29-8682-559E37368E95} = s 'AccSelection Class'
+ {
+ ProgID = s 'UAccCOM.AccSelection.1'
+ VersionIndependentProgID = s 'UAccCOM.AccSelection'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'both'
+ }
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/AccTable.cpp b/winaccessibility/source/UAccCOM/AccTable.cpp
new file mode 100644
index 000000000000..4ad5e22c782e
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccTable.cpp
@@ -0,0 +1,1069 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+/**
+ * AccTable.cpp : Implementation of CAccTable.
+ */
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "AccTable.h"
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include "MAccessible.h"
+
+#include "act.hxx"
+
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLETABLEEXTENT_HPP_
+#include <com/sun/star/accessibility/XAccessibleTableSelection.hpp>
+#endif
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+/**
+ * Gets accessible table cell.
+ *
+ * @param row the row of the specified cell.
+ * @param column the column of the specified cell.
+ * @param accessible the accessible object of the cell.
+ */
+
+STDMETHODIMP CAccTable::get_accessibleAt(long row, long column, IUnknown * * accessible)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(accessible == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ Reference<XAccessible> pRAcc = GetXInterface()->getAccessibleCellAt(row,column);
+
+ if(!pRAcc.is())
+ {
+ *accessible = NULL;
+ return E_FAIL;
+ }
+
+ IAccessible* pRet = NULL;
+
+ BOOL isTRUE = CMAccessible::get_IAccessibleFromXAccessible((long)pRAcc.get(),&pRet);
+ if(isTRUE)
+ {
+ *accessible = (IAccessible2 *)pRet;
+ pRet->AddRef();
+ return S_OK;
+ }
+ else if(pRAcc.is())
+ {
+ Reference<XAccessible> pxTable(GetXInterface(),UNO_QUERY);
+
+ CMAccessible::g_pAgent->InsertAccObj(pRAcc.get(),pxTable.get());
+ isTRUE = CMAccessible::get_IAccessibleFromXAccessible((long)pRAcc.get(),&pRet);
+
+ if(isTRUE)
+ {
+ *accessible = (IAccessible2 *)pRet;
+ pRet->AddRef();
+ return S_OK;
+ }
+ }
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets accessible table caption.
+ *
+ * @param accessible the accessible object of table cpation.
+ */
+STDMETHODIMP CAccTable::get_caption(IUnknown * *)
+{
+
+
+ ENTER_PROTECTED_BLOCK
+
+ return E_NOTIMPL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets accessible column description (as string).
+ *
+ * @param column the column index.
+ * @param description the description of the specified column.
+ */
+STDMETHODIMP CAccTable::get_columnDescription(long column, BSTR * description)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(description == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ const ::rtl::OUString& ouStr = GetXInterface()->getAccessibleColumnDescription(column);
+ // #CHECK#
+
+ SAFE_SYSFREESTRING(*description);//??
+ *description = SysAllocString((OLECHAR*)ouStr.getStr());
+ if(description==NULL)
+ return E_FAIL;
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets number of columns spanned by table cell.
+ *
+ * @param row the row of the specified cell.
+ * @param column the column of the specified cell.
+ * @param spanColumns the column span of the specified cell.
+ */
+STDMETHODIMP CAccTable::get_columnExtentAt(long row, long column, long * nColumnsSpanned)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ XAccessibleTable *pXAccTable = GetXInterface();
+
+ // Check pointer.
+ if(nColumnsSpanned == NULL)
+ return E_INVALIDARG;
+
+ // Get Extent.
+ if(pXAccTable)
+ {
+ long lExt = pXAccTable->getAccessibleColumnExtentAt(row,column);
+
+ // Fill Extent struct.
+ *nColumnsSpanned = lExt;
+ return S_OK;
+ }
+
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets accessible column header.
+ *
+ * @param column the column index.
+ * @param accessible the accessible object of the specified column.
+ */
+STDMETHODIMP CAccTable::get_columnHeader(IAccessibleTable __RPC_FAR *__RPC_FAR *accessibleTable, long *startingRowIndex)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(accessibleTable == NULL || startingRowIndex == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ Reference<XAccessibleTable> pRColumnHeaderTable = GetXInterface()->getAccessibleColumnHeaders();
+ if(!pRColumnHeaderTable.is())
+ {
+ *accessibleTable = NULL;
+ return E_FAIL;
+ }
+
+ Reference<XAccessible> pRXColumnHeader(pRColumnHeaderTable,UNO_QUERY);
+
+ if(!pRXColumnHeader.is())
+ {
+ *accessibleTable = NULL;
+ return E_FAIL;
+ }
+ *startingRowIndex = 0 ;
+
+ IAccessible* m_pIMacc = NULL;
+ ActivateActContext();
+ HRESULT hr = CoCreateInstance( CLSID_MAccessible, NULL, CLSCTX_ALL ,
+ IID_IMAccessible,
+ (void **)&m_pIMacc
+ );
+ DeactivateActContext();
+ ((CMAccessible*)m_pIMacc)->SetXAccessible((long)pRXColumnHeader.get());
+ m_pIMacc->QueryInterface(IID_IAccessibleTable,(void **)accessibleTable);
+ if( SUCCEEDED(hr) )
+ {
+ return S_OK;
+ }
+
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets total number of columns in table.
+ *
+ * @param columnCount the number of columns in table.
+ */
+STDMETHODIMP CAccTable::get_nColumns(long * columnCount)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(columnCount == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ *columnCount = GetXInterface()->getAccessibleColumnCount();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets total number of rows in table.
+ *
+ * @param rowCount the number of rows in table.
+ */
+STDMETHODIMP CAccTable::get_nRows(long * rowCount)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(rowCount == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ *rowCount = GetXInterface()->getAccessibleRowCount();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets total number of selected columns.
+ *
+ * @param columnCount the number of selected columns.
+ */
+STDMETHODIMP CAccTable::get_nSelectedColumns(long * columnCount)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(columnCount == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ Sequence<long> pSelected = GetXInterface()->getSelectedAccessibleColumns();
+ *columnCount = pSelected.getLength();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets total number of selected rows.
+ *
+ * @param rowCount the number of selected rows.
+ */
+STDMETHODIMP CAccTable::get_nSelectedRows(long * rowCount)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(rowCount == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ Sequence<long> pSelected = GetXInterface()->getSelectedAccessibleRows();
+ *rowCount = pSelected.getLength();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets accessible row description (as string).
+ *
+ * @param row the row index.
+ * @param description the description of the specified row.
+ */
+STDMETHODIMP CAccTable::get_rowDescription(long row, BSTR * description)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(description == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ const ::rtl::OUString& ouStr = GetXInterface()->getAccessibleRowDescription(row);
+ // #CHECK#
+
+ SAFE_SYSFREESTRING(*description);
+ *description = SysAllocString((OLECHAR*)ouStr.getStr());
+ if(description==NULL)
+ return E_FAIL;
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets number of rows spanned by a table cell.
+ *
+ * @param row the row of the specified cell.
+ * @param column the column of the specified cell.
+ * @param spanRows the row span of the specified cell.
+ */
+STDMETHODIMP CAccTable::get_rowExtentAt(long row, long column, long * nRowsSpanned)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ XAccessibleTable *pXAccTable = GetXInterface();
+
+ // Check pointer.
+ if(nRowsSpanned == NULL)
+ return E_INVALIDARG;
+
+ // Get Extent.
+ if(pXAccTable)
+ {
+ long lExt = GetXInterface()->getAccessibleRowExtentAt(row,column);
+
+ // Fill Extent struct.
+ *nRowsSpanned= lExt;
+
+ return S_OK;
+ }
+
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets accessible row header.
+ *
+ * @param row the row index.
+ * @param accessible the accessible object of the row header.
+ */
+STDMETHODIMP CAccTable::get_rowHeader(IAccessibleTable __RPC_FAR *__RPC_FAR *accessibleTable, long *startingColumnIndex)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(accessibleTable == NULL || startingColumnIndex == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ Reference<XAccessibleTable> pRRowHeaderTable = GetXInterface()->getAccessibleRowHeaders();
+ if(!pRRowHeaderTable.is())
+ {
+ *accessibleTable = NULL;
+ return E_FAIL;
+ }
+
+ Reference<XAccessible> pRXRowHeader(pRRowHeaderTable,UNO_QUERY);
+
+ if(!pRXRowHeader.is())
+ {
+ *accessibleTable = NULL;
+ return E_FAIL;
+ }
+ *startingColumnIndex = 0 ;
+
+ IAccessible* m_pIMacc = NULL;
+ ActivateActContext();
+ HRESULT hr = CoCreateInstance( CLSID_MAccessible, NULL, CLSCTX_ALL ,
+ IID_IMAccessible,
+ (void **)&m_pIMacc
+ );
+ DeactivateActContext();
+ ((CMAccessible*)m_pIMacc)->SetXAccessible((long)pRXRowHeader.get());
+ m_pIMacc->QueryInterface(IID_IAccessibleTable,(void **)accessibleTable);
+ if( SUCCEEDED(hr) )
+ {
+ return S_OK;
+ }
+
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets list of row indexes currently selected (0-based).
+ *
+ * @param maxRows the max number of the rows.
+ * @param accessible the accessible object array of the selected rows.
+ * @param nRows the actual size of the accessible object array.
+ */
+STDMETHODIMP CAccTable::get_selectedRows(long, long ** rows, long * nRows)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(rows == NULL || nRows == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ Sequence<long> pSelected = GetXInterface()->getSelectedAccessibleRows();
+ long count = pSelected.getLength() ;
+ *nRows = count;
+
+ *rows = reinterpret_cast<long*>(CoTaskMemAlloc((count) * sizeof(long)));
+ // #CHECK Memory Allocation#
+ if(*rows == NULL)
+ {
+ return E_FAIL;
+ }
+ for(int i=0; i<count; i++)
+ (*rows)[i] = pSelected[i];
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets list of column indexes currently selected (0-based).
+ *
+ * @param maxColumns the max number of the columns.
+ * @param accessible the accessible object array of the selected columns.
+ * @param numColumns the actual size of accessible object array.
+ */
+STDMETHODIMP CAccTable::get_selectedColumns(long, long ** columns, long * numColumns)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(columns == NULL || numColumns == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ Sequence<long> pSelected = GetXInterface()->getSelectedAccessibleColumns();
+ long count = pSelected.getLength() ;
+ *numColumns = count;
+
+ *columns = reinterpret_cast<long*>(CoTaskMemAlloc((count) * sizeof(long)));
+ // #CHECK Memory Allocation#
+ if(*columns == NULL)
+ {
+ return E_FAIL;
+ }
+ for(int i=0; i<count; i++)
+ (*columns)[i] = pSelected[i];
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets accessible table summary.
+ *
+ * @param accessible the accessible object of the summary.
+ */
+STDMETHODIMP CAccTable::get_summary(IUnknown * * accessible)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(accessible == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ {
+ return E_FAIL;
+ }
+ Reference<XAccessible> pRAcc = GetXInterface()->getAccessibleSummary();
+
+ IAccessible* pRet = NULL;
+ BOOL isTRUE = CMAccessible::get_IAccessibleFromXAccessible((long)pRAcc.get(),&pRet);
+
+ if(pRet)
+ {
+ *accessible = (IAccessible2 *)pRet;
+ pRet->AddRef();
+ return S_OK;
+ }
+
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Determines if table column is selected.
+ *
+ * @param column the column index.
+ * @param isSelected the result.
+ */
+STDMETHODIMP CAccTable::get_isColumnSelected(long column, unsigned char * isSelected)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(isSelected == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ *isSelected = GetXInterface()->isAccessibleColumnSelected(column);
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Determines if table row is selected.
+ *
+ * @param row the row index.
+ * @param isSelected the result.
+ */
+STDMETHODIMP CAccTable::get_isRowSelected(long row, unsigned char * isSelected)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(isSelected == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ {
+ return E_FAIL;
+ }
+ *isSelected = GetXInterface()->isAccessibleRowSelected(row);
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Determines if table cell is selected.
+ *
+ * @param row the row index.
+ * @param column the column index.
+ * @param isSelected the result.
+ */
+STDMETHODIMP CAccTable::get_isSelected(long row, long column, unsigned char * isSelected)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(isSelected == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ *isSelected = GetXInterface()->isAccessibleSelected(row,column);
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Selects a row and unselect all previously selected rows.
+ *
+ * @param row the row index.
+ * @param success the result.
+ */
+STDMETHODIMP CAccTable::selectRow(long row)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // Check XAccessibleTable reference.
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ Reference<XAccessibleTableSelection> pRTableExtent(pRXTable, UNO_QUERY);
+ if(pRTableExtent.is())
+ {
+ pRTableExtent.get()->selectRow(row);
+ return S_OK;
+ }
+ else
+ {
+ // Get XAccessibleSelection.
+ Reference<XAccessibleSelection> pRSelection(GetXInterface(), UNO_QUERY);
+ if(!pRSelection.is())
+ return E_FAIL;
+
+ // Select row.
+ long lCol, lColumnCount, lChildIndex;
+ lColumnCount = GetXInterface()->getAccessibleColumnCount();
+ for(lCol = 0; lCol < lColumnCount; lCol ++)
+ {
+ lChildIndex = GetXInterface()->getAccessibleIndex(row, lCol);
+ pRSelection.get()->selectAccessibleChild(lChildIndex);
+ }
+
+ return S_OK;
+ }
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Selects a column and unselect all previously selected columns.
+ *
+ * @param column the column index.
+ * @param success the result.
+ */
+STDMETHODIMP CAccTable::selectColumn(long column)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // Check XAccessibleTable reference.
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ Reference<XAccessibleTableSelection> pRTableExtent(GetXInterface(), UNO_QUERY);
+ if(pRTableExtent.is())
+ {
+ pRTableExtent.get()->selectColumn(column);
+ return S_OK;
+ }
+ else
+ {
+ // Get XAccessibleSelection.
+ Reference<XAccessibleSelection> pRSelection(pRXTable, UNO_QUERY);
+ if(!pRSelection.is())
+ return E_FAIL;
+
+ // Select column.
+ long lRow, lRowCount, lChildIndex;
+ lRowCount = GetXInterface()->getAccessibleRowCount();
+ for(lRow = 0; lRow < lRowCount; lRow ++)
+ {
+ lChildIndex = GetXInterface()->getAccessibleIndex(lRow, column);
+ pRSelection.get()->selectAccessibleChild(lChildIndex);
+ }
+
+ return S_OK;
+ }
+ return S_OK;
+ // End of added.
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Unselects one row, leaving other selected rows selected (if any).
+ *
+ * @param row the row index.
+ * @param success the result.
+ */
+STDMETHODIMP CAccTable::unselectRow(long row)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // Check XAccessibleTable reference.
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ Reference<XAccessibleTableSelection> pRTableExtent(GetXInterface(), UNO_QUERY);
+ if(pRTableExtent.is())
+ {
+ if(pRTableExtent.get()->unselectRow(row))
+ return S_OK;
+ else
+ return E_FAIL;
+ }
+ else
+ {
+ // Get XAccessibleSelection.
+ Reference<XAccessibleSelection> pRSelection(pRXTable, UNO_QUERY);
+ if(!pRSelection.is())
+ return E_FAIL;
+
+ // Select column.
+ long lColumn, lColumnCount, lChildIndex;
+ lColumnCount = GetXInterface()->getAccessibleColumnCount();
+ for(lColumn = 0; lColumn < lColumnCount; lColumn ++)
+ {
+ lChildIndex = GetXInterface()->getAccessibleIndex(row,lColumn);
+ pRSelection.get()->deselectAccessibleChild(lChildIndex);
+ }
+
+ return S_OK;
+ }
+ return S_OK;
+ // End of added.
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Unselects one column, leaving other selected columns selected (if any).
+ *
+ * @param column the column index.
+ * @param success the result.
+ */
+STDMETHODIMP CAccTable::unselectColumn(long column)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // Check XAccessibleTable reference.
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ Reference<XAccessibleTableSelection> pRTableExtent(GetXInterface(), UNO_QUERY);
+ if(pRTableExtent.is())
+ {
+ if(pRTableExtent.get()->unselectColumn(column))
+ return S_OK;
+ else
+ return E_FAIL;
+ }
+ else
+ {
+ // Get XAccessibleSelection.
+ Reference<XAccessibleSelection> pRSelection(pRXTable, UNO_QUERY);
+ if(!pRSelection.is())
+ return E_FAIL;
+
+ // Unselect columns.
+ long lRow, lRowCount, lChildIndex;
+ lRowCount = GetXInterface()->getAccessibleRowCount();
+
+ for(lRow = 0; lRow < lRowCount; lRow ++)
+ {
+ lChildIndex = GetXInterface()->getAccessibleIndex(lRow, column);
+ pRSelection.get()->deselectAccessibleChild(lChildIndex);
+ }
+ return S_OK;
+ }
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Overide of IUNOXWrapper.
+ *
+ * @param pXInterface the pointer of UNO interface.
+ */
+STDMETHODIMP CAccTable::put_XInterface(long pXInterface)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ CUNOXWrapper::put_XInterface(pXInterface);
+ //special query.
+ if(pUNOInterface == NULL)
+ return E_INVALIDARG;
+
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+ if( !pRContext.is() )
+ return E_FAIL;
+
+ Reference<XAccessibleTable> pRXI(pRContext,UNO_QUERY);
+ if( !pRXI.is() )
+ pRXTable = NULL;
+ else
+ pRXTable = pRXI.get();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Gets columnIndex of childIndex.
+ *
+ * @param childIndex childIndex
+ */
+STDMETHODIMP CAccTable::get_columnIndex(long childIndex, long * columnIndex)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(columnIndex == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ *columnIndex = GetXInterface()->getAccessibleColumn(childIndex);
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+/**
+ * Gets rowIndex of childIndex.
+ *
+ * @param childIndex childIndex
+ */
+STDMETHODIMP CAccTable::get_rowIndex(long childIndex, long * rowIndex)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(rowIndex == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ *rowIndex = GetXInterface()->getAccessibleRow(childIndex);
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+/**
+ * Gets childIndex of childIndex.
+ *
+ * @param childIndex childIndex
+ */
+STDMETHODIMP CAccTable::get_childIndex(long RowIndex , long columnIndex, long * childIndex )
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(childIndex == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ *childIndex = GetXInterface()->getAccessibleIndex(RowIndex, columnIndex);
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+STDMETHODIMP CAccTable::get_rowColumnExtentsAtIndex(long,
+ long *,
+ long *,
+ long *,
+ long *,
+ boolean *)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ return E_NOTIMPL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+STDMETHODIMP CAccTable::get_modelChange(IA2TableModelChange *)
+{
+
+ return E_NOTIMPL;
+}
+
+// @brief Returns the total number of selected children
+// @param [out] childCount
+// Number of children currently selected
+STDMETHODIMP CAccTable::get_nSelectedChildren(long *childCount)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(childCount == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ Reference<XAccessibleSelection> pRSelection(GetXInterface(), UNO_QUERY);
+ if(!pRSelection.is())
+ return E_FAIL;
+
+ *childCount = pRSelection->getSelectedAccessibleChildCount();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+// @brief Returns a list of child indexes currently selected (0-based).
+// @param [in] maxChildren
+// Max children requested (possibly from IAccessibleTable::nSelectedChildren)
+// @param [out] children
+// array of indexes of selected children (each index is 0-based)
+// @param [out] nChildren
+// Length of array (not more than maxChildren)
+STDMETHODIMP CAccTable::get_selectedChildren(long, long **children, long *nChildren)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(children == NULL || nChildren == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if(!pRXTable.is())
+ return E_FAIL;
+
+ Reference<XAccessibleSelection> pRSelection(GetXInterface(), UNO_QUERY);
+ if(!pRSelection.is())
+ return E_FAIL;
+
+ long childCount = pRSelection->getSelectedAccessibleChildCount() ;
+
+ *nChildren = childCount;
+
+ *children = reinterpret_cast<long*>(CoTaskMemAlloc((childCount) * sizeof(long)));
+
+ for( long i = 0; i< childCount; i++)
+ {
+ Reference<XAccessible> pRAcc = pRSelection->getSelectedAccessibleChild(i);
+ if(pRAcc.is())
+ {
+ Reference<XAccessibleContext> pRContext(pRAcc, UNO_QUERY);
+ if( !pRContext.is() )
+ return E_FAIL;
+
+ long childIndex = pRContext->getAccessibleIndexInParent();
+ (*children)[i] = childIndex;
+ }
+ }
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+
+}
diff --git a/winaccessibility/source/UAccCOM/AccTable.h b/winaccessibility/source/UAccCOM/AccTable.h
new file mode 100644
index 000000000000..245c54720550
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccTable.h
@@ -0,0 +1,175 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCTABLE_H_
+#define __ACCTABLE_H_
+
+#include "resource.h" // main symbols
+
+#include <com/sun/star/uno/reference.hxx>
+#include <com/sun/star/accessibility/XAccessibleTable.hpp>
+#include "UNOXWrapper.h"
+
+/**
+ * CAccTable implements IAccessibleTable interface.
+ */
+class ATL_NO_VTABLE CAccTable :
+ public CComObjectRoot,
+ public CComCoClass<CAccTable, &CLSID_AccTable>,
+ public IAccessibleTable,
+ public CUNOXWrapper
+
+{
+public:
+ CAccTable()
+ {
+ }
+ virtual ~CAccTable()
+ {
+ }
+
+ BEGIN_COM_MAP(CAccTable)
+ COM_INTERFACE_ENTRY(IAccessibleTable)
+ COM_INTERFACE_ENTRY(IUNOXWrapper)
+ COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+ END_COM_MAP()
+
+ static HRESULT WINAPI _SmartQI(void* pv,
+ REFIID iid, void** ppvObject, DWORD)
+ {
+ return ((CAccTable*)pv)->SmartQI(iid,ppvObject);
+ }
+
+ HRESULT SmartQI(REFIID iid, void** ppvObject)
+ {
+ if( m_pOuterUnknown )
+ return OuterQueryInterface(iid,ppvObject);
+ return E_FAIL;
+ }
+
+ DECLARE_REGISTRY_RESOURCEID(IDR_ACCTABLE)
+
+ // IAccessibleTable
+public:
+ // IAccessibleTable
+
+ // Gets accessible table cell.
+ STDMETHOD(get_accessibleAt)(long row, long column, IUnknown * * accessible);
+
+ // Gets accessible table caption.
+ STDMETHOD(get_caption)(IUnknown * * accessible);
+
+ // Gets accessible column description (as string).
+ STDMETHOD(get_columnDescription)(long column, BSTR * description);
+
+ // Gets number of columns spanned by table cell.
+ STDMETHOD(get_columnExtentAt)(long row, long column, long * nColumnsSpanned);
+
+ // Gets accessible column header.
+ STDMETHOD(get_columnHeader)(IAccessibleTable __RPC_FAR *__RPC_FAR *accessibleTable, long *startingRowIndex);
+
+ // Gets total number of columns in table.
+ STDMETHOD(get_nColumns)(long * columnCount);
+
+ // Gets total number of rows in table.
+ STDMETHOD(get_nRows)(long * rowCount);
+
+ // Gets total number of selected columns.
+ STDMETHOD(get_nSelectedColumns)(long * columnCount);
+
+ // Gets total number of selected rows.
+ STDMETHOD(get_nSelectedRows)(long * rowCount);
+
+ // Gets accessible row description (as string).
+ STDMETHOD(get_rowDescription)(long row, BSTR * description);
+
+ // Gets number of rows spanned by a table cell.
+ STDMETHOD(get_rowExtentAt)(long row, long column, long * nRowsSpanned);
+
+ // Gets accessible row header.
+ STDMETHOD(get_rowHeader)(IAccessibleTable __RPC_FAR *__RPC_FAR *accessibleTable, long *startingColumnIndex);
+
+ // Gets list of row indexes currently selected (0-based).
+ STDMETHOD(get_selectedRows)(long maxRows, long **rows, long * nRows);
+
+ // Gets list of column indexes currently selected (0-based).
+ STDMETHOD(get_selectedColumns)(long maxColumns, long **columns, long * numColumns);
+
+ // Gets accessible table summary.
+ STDMETHOD(get_summary)(IUnknown * * accessible);
+
+ // Determines if table column is selected.
+ STDMETHOD(get_isColumnSelected)(long column, unsigned char * isSelected);
+
+ // Determines if table row is selected.
+ STDMETHOD(get_isRowSelected)(long row, unsigned char * isSelected);
+
+ // Determines if table cell is selected.
+ STDMETHOD(get_isSelected)(long row, long column, unsigned char * isSelected);
+
+ // Selects a row and unselect all previously selected rows.
+ STDMETHOD(selectRow)(long row );
+
+
+ // Selects a column and unselect all previously selected columns.
+
+ STDMETHOD(selectColumn)(long column);
+
+ // Unselects one row, leaving other selected rows selected (if any).
+ STDMETHOD(unselectRow)(long row);
+
+ // Unselects one column, leaving other selected columns selected (if any).
+ STDMETHOD(unselectColumn)(long column);
+
+ //get Column index
+ STDMETHOD(get_columnIndex)(long childIndex, long * columnIndex);
+
+ STDMETHOD(get_rowIndex)(long childIndex, long * rowIndex);
+
+ STDMETHOD(get_childIndex)(long rowIndex,long columnIndex, long * childIndex);
+
+ STDMETHOD(get_nSelectedChildren)(long *childCount);
+
+ STDMETHOD(get_selectedChildren)(long maxChildren, long **children, long *nChildren);
+
+ STDMETHOD(get_rowColumnExtentsAtIndex)( long index,
+ long *row,
+ long *column,
+ long *rowExtents,
+ long *columnExtents,
+ boolean *isSelected) ;
+
+ STDMETHOD(get_modelChange)(IA2TableModelChange *modelChange);
+
+ // Overide of IUNOXWrapper.
+ STDMETHOD(put_XInterface)(long pXInterface);
+
+private:
+
+ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleTable> pRXTable;
+
+ inline com::sun::star::accessibility::XAccessibleTable* GetXInterface()
+ {
+ return pRXTable.get();
+ }
+};
+
+#endif //__ACCTABLE_H_
diff --git a/winaccessibility/source/UAccCOM/AccTable.rgs b/winaccessibility/source/UAccCOM/AccTable.rgs
new file mode 100644
index 000000000000..7117fe698934
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccTable.rgs
@@ -0,0 +1,23 @@
+HKCR
+{
+ UAccCOM.AccTable.1 = s 'AccTable Class'
+ {
+ CLSID = s '{92BAA62D-535A-4EAB-9ABB-BFA60B7A6DB6}'
+ }
+ UAccCOM.AccTable = s 'AccTable Class'
+ {
+ CLSID = s '{92BAA62D-535A-4EAB-9ABB-BFA60B7A6DB6}'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {92BAA62D-535A-4EAB-9ABB-BFA60B7A6DB6} = s 'AccTable Class'
+ {
+ ProgID = s 'UAccCOM.AccTable.1'
+ VersionIndependentProgID = s 'UAccCOM.AccTable'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'both'
+ }
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/AccText.cpp b/winaccessibility/source/UAccCOM/AccText.cpp
new file mode 100644
index 000000000000..ab0702993615
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccText.cpp
@@ -0,0 +1,282 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "AccText.h"
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+
+/**
+ * Get special selection.
+ * @param startOffset Start selection offset.
+ * @param endOffset End selection offset.
+ * @param success Variant to accept the result of if the method call is successful.
+ * @return Result.
+*/
+STDMETHODIMP CAccText::addSelection(long startOffset, long endOffset)//, unsigned char * success)
+{
+
+ return CAccTextBase::get_addSelection(startOffset, endOffset);//, success);
+}
+
+/**
+ * Get special attributes.
+ * @param offset Offset.
+ * @param startOffset Variant to accept start offset.
+ * @param endOffset Variant to accept end offset.
+ * @param textAttributes Variant to accept attributes.
+ * @return Result.
+*/
+STDMETHODIMP CAccText::get_attributes(long offset, long * startOffset, long * endOffset, BSTR * textAttributes)
+{
+
+ return CAccTextBase::get_attributes(offset, startOffset, endOffset, textAttributes);
+}
+
+/**
+ * Get caret position.
+ * @param offset Variant to accept caret offset.
+ * @return Result.
+*/
+STDMETHODIMP CAccText::get_caretOffset(long * offset)
+{
+
+ return CAccTextBase::get_caretOffset(offset);
+}
+
+/**
+ * Get character count.
+ * @param nCharacters Variant to accept character count.
+ * @return Result.
+*/
+STDMETHODIMP CAccText::get_characterCount(long * nCharacters)
+{
+
+ return CAccTextBase::get_characterCount(nCharacters);
+}
+
+/**
+ * Get character extents.
+ * @param offset Offset.
+ * @param x Variant to accpet x position.
+ * @param y Variant to accpet y position.
+ * @param width Variant to accpet width.
+ * @param Height Variant to accpet height.
+ * @return Result.
+*/
+STDMETHODIMP CAccText::get_characterExtents(long offset, IA2CoordinateType coordType, long * x, long * y, long * width, long * height)
+{
+
+ return CAccTextBase::get_characterExtents(offset, coordType, x, y, width, height);
+}
+
+/**
+ * Get slections count.
+ * @param nSelections Variant to accpet slections count.
+ * @return Result.
+*/
+STDMETHODIMP CAccText::get_nSelections(long * nSelections)
+{
+
+ return CAccTextBase::get_nSelections(nSelections);
+}
+
+/**
+ * Get offset of some special point.
+ * @param x X position of one point.
+ * @param x Y position of one point.
+ * @param coordType Type.
+ * @param offset Variant to accept offset.
+ * @return Result.
+*/
+
+STDMETHODIMP CAccText::get_offsetAtPoint(long x, long y, IA2CoordinateType coordType, long * offset)
+{
+
+ return CAccTextBase::get_offsetAtPoint(x, y, coordType, offset);
+}
+
+/**
+ * Get selection range.
+ * @param selection selection count.
+ * @param startOffset Variant to accept the start offset of special selection.
+ * @param endOffset Variant to accept the end offset of special selection.
+ * @return Result.
+*/
+STDMETHODIMP CAccText::get_selection(long selection, long * startOffset, long * endOffset)
+{
+
+ return CAccTextBase::get_selection(selection, startOffset, endOffset);
+}
+
+/**
+ * Get special text.
+ * @param startOffset Start position of special range.
+ * @param endOffset End position of special range.
+ * @param text Variant to accept the text of special range.
+ * @return Result.
+*/
+STDMETHODIMP CAccText::get_text(long startOffset, long endOffset, BSTR * text)
+{
+
+ return CAccTextBase::get_text(startOffset, endOffset, text);
+}
+
+/**
+ * Get special text before some position.
+ * @param offset Special position.
+ * @param boundaryType Boundary type.
+ * @param startOffset Variant to accept the start offset.
+ * @param endOffset Variant to accept the end offset.
+ * @param text Variant to accept the special text.
+ * @return Result.
+*/
+STDMETHODIMP CAccText::get_textBeforeOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
+{
+
+ return CAccTextBase::get_textBeforeOffset(offset, boundaryType,
+ startOffset, endOffset, text);
+}
+
+/**
+ * Get special text after some position.
+ * @param offset Special position.
+ * @param boundaryType Boundary type.
+ * @param startOffset Variant to accept the start offset.
+ * @param endOffset Variant to accept the end offset.
+ * @param text Variant to accept the special text.
+ * @return Result.
+*/
+STDMETHODIMP CAccText::get_textAfterOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
+{
+
+ return CAccTextBase::get_textAfterOffset(offset, boundaryType,
+ startOffset, endOffset, text);
+}
+
+/**
+ * Get special text at some position.
+ * @param offset Special position.
+ * @param boundaryType Boundary type.
+ * @param startOffset Variant to accept the start offset.
+ * @param endOffset Variant to accept the end offset.
+ * @param text Variant to accept the special text.
+ * @return Result.
+*/
+STDMETHODIMP CAccText::get_textAtOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
+{
+
+ return CAccTextBase::get_textAtOffset(offset, boundaryType,
+ startOffset, endOffset, text);
+}
+
+/**
+ * Remove selection.
+ * @param selectionIndex Special selection index
+ * @param success Variant to accept the memthod called result.
+ * @return Result.
+*/
+STDMETHODIMP CAccText::removeSelection(long selectionIndex)//, unsigned char * success)
+{
+
+ return CAccTextBase::removeSelection(selectionIndex);//, success);
+}
+
+/**
+ * Set caret position.
+ * @param offset Special position.
+ * @param success Variant to accept the memthod called result.
+ * @return Result.
+*/
+STDMETHODIMP CAccText::setCaretOffset(long offset)
+{
+
+ return CAccTextBase::setCaretOffset(offset);
+}
+
+/**
+ * Set special selection.
+ * @param selectionIndex Special selection index.
+ * @param startOffset start position.
+ * @param endOffset end position.
+ * @param success Variant to accept the memthod called result.
+ * @return Result.
+*/
+
+STDMETHODIMP CAccText::setSelection(long selectionIndex, long startOffset, long endOffset)
+{
+
+ return CAccTextBase::setSelection(selectionIndex, startOffset,
+ endOffset);
+}
+
+/**
+ * Get characters count.
+ * @param nCharacters Variant to accept the characters count.
+ * @return Result.
+*/
+STDMETHODIMP CAccText::get_nCharacters(long * nCharacters)
+{
+
+ return CAccTextBase::get_nCharacters(nCharacters);
+}
+
+STDMETHODIMP CAccText::get_newText( IA2TextSegment *newText)
+{
+ return CAccTextBase::get_newText(newText);
+}
+
+STDMETHODIMP CAccText::get_oldText( IA2TextSegment *oldText)
+{
+ return CAccTextBase::get_oldText(oldText);
+}
+
+/**
+ * Scroll to special sub-string .
+ * @param startIndex Start index of sub string.
+ * @param endIndex End index of sub string.
+ * @return Result.
+*/
+STDMETHODIMP CAccText::scrollSubstringToPoint(long startIndex, long endIndex,enum IA2CoordinateType coordinateType, long x, long y )
+{
+
+ return CAccTextBase::scrollSubstringToPoint(startIndex, endIndex, coordinateType, x, y);
+}
+
+STDMETHODIMP CAccText::scrollSubstringTo(long startIndex, long endIndex,enum IA2ScrollType scrollType)
+{
+
+ return CAccTextBase::scrollSubstringTo(startIndex, endIndex,scrollType);
+}
+
+/**
+ * Put UNO interface.
+ * @param pXInterface UNO interface.
+ * @return Result.
+*/
+STDMETHODIMP CAccText::put_XInterface(long pXInterface)
+{
+
+ return CAccTextBase::put_XInterface(pXInterface);
+}
+
diff --git a/winaccessibility/source/UAccCOM/AccText.h b/winaccessibility/source/UAccCOM/AccText.h
new file mode 100644
index 000000000000..7eb1c33f5086
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccText.h
@@ -0,0 +1,140 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#if !defined(AFX_ACCTEXT_H__F06C5496_9959_4C7C_873E_A8D50CFB290D__INCLUDED_)
+#define AFX_ACCTEXT_H__F06C5496_9959_4C7C_873E_A8D50CFB290D__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "resource.h" // main symbols
+
+#include "AccTextBase.h"
+
+/**
+ * CAccText implements IAccessibleText interface.
+ */
+class ATL_NO_VTABLE CAccText :
+ public CComObjectRoot,
+ public CComCoClass<CAccText,&CLSID_AccText>,
+ public IAccessibleText,
+ public CAccTextBase
+{
+public:
+ CAccText()
+ {
+ }
+ ~CAccText()
+ {
+ }
+
+ BEGIN_COM_MAP(CAccText)
+ COM_INTERFACE_ENTRY(IAccessibleText)
+ COM_INTERFACE_ENTRY(IUNOXWrapper)
+ COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+ END_COM_MAP()
+
+ static HRESULT WINAPI _SmartQI(void* pv,
+ REFIID iid, void** ppvObject, DWORD)
+ {
+ return ((CAccText*)pv)->SmartQI(iid,ppvObject);
+ }
+
+ HRESULT SmartQI(REFIID iid, void** ppvObject)
+ {
+ if( m_pOuterUnknown )
+ return OuterQueryInterface(iid,ppvObject);
+ return E_FAIL;
+ }
+
+ DECLARE_REGISTRY_RESOURCEID(IDR_AccText)
+
+ // IAccessibleText
+public:
+ // IAccessibleText
+
+ // Adds a text selection.
+ STDMETHOD(addSelection)(long startOffset, long endOffset);//, unsigned char * success);
+
+ // Gets text attributes.
+ STDMETHOD(get_attributes)(long offset, long * startOffset, long * endOffset, BSTR * textAttributes);
+
+ // Gets caret offset.
+ STDMETHOD(get_caretOffset)(long * offset);
+
+ // Gets total number of characters.
+ STDMETHOD(get_characterCount)(long * nCharacters);
+
+ // Gets bounding rect containing the glyph(s) representing the character
+ // at the specified text offset
+ STDMETHOD(get_characterExtents)(long offset, IA2CoordinateType coordType, long * x, long * y, long * width, long * height);
+
+ // Gets number of active non-contiguous selections.
+ STDMETHOD(get_nSelections)(long * nSelections);
+
+ // Gets bounding rect for the glyph at a certain point.
+ STDMETHOD(get_offsetAtPoint)(long x, long y, IA2CoordinateType coordType, long * offset);
+
+ // Gets character offsets of N-th active text selection.
+ STDMETHOD(get_selection)(long selection, long * startOffset, long * endOffset);
+
+ // Gets a range of text by offset NOTE: returned string may be longer
+ // than endOffset-startOffset bytes if text contains multi-byte characters.
+ STDMETHOD(get_text)(long startOffset, long endOffset, BSTR * text);
+
+ // Gets a specified amount of text that ends before a specified offset.
+ STDMETHOD(get_textBeforeOffset)(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text);
+
+ // Gets a specified amount of text that spans the specified offset.
+ STDMETHOD(get_textAfterOffset)(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text);
+
+ // Gets a specified amount of text that starts after a specified offset.
+ STDMETHOD(get_textAtOffset)(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text);
+
+ // Unselects a range of text.
+ STDMETHOD(removeSelection)(long selectionIndex);//, unsigned char * success);
+
+ // Moves text caret.
+ STDMETHOD(setCaretOffset)(long offset);//, unsigned char * success);
+
+ // Changes the bounds of an existing selection.
+ STDMETHOD(setSelection)(long selectionIndex, long startOffset, long endOffset);//, unsigned char * success);
+
+ // Gets total number of characters.
+ // NOTE: this may be different than the total number of bytes required
+ // to store the text, if the text contains multi-byte characters.
+ STDMETHOD(get_nCharacters)(long * nCharacters);
+
+ // Makes specific part of string visible on screen.
+ STDMETHOD(scrollSubstringTo)(long startIndex, long endIndex,enum IA2ScrollType scrollType);
+ STDMETHOD(scrollSubstringToPoint)(long startIndex, long endIndex,enum IA2CoordinateType coordinateType, long x, long y );
+
+ STDMETHOD(get_newText)( IA2TextSegment *newText);
+
+ STDMETHOD(get_oldText)( IA2TextSegment *oldText);
+
+ // Overide of IUNOXWrapper.
+ STDMETHOD(put_XInterface)(long pXInterface);
+
+};
+
+#endif // !defined(AFX_ACCTEXT_H__F06C5496_9959_4C7C_873E_A8D50CFB290D__INCLUDED_)
diff --git a/winaccessibility/source/UAccCOM/AccText.rgs b/winaccessibility/source/UAccCOM/AccText.rgs
new file mode 100644
index 000000000000..6cb3ebdcfa0a
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccText.rgs
@@ -0,0 +1,23 @@
+HKCR
+{
+ UAccCOM.AccText.1 = s 'AccText Class'
+ {
+ CLSID = s '{6D8AB08B-CCE9-471E-8A41-35773D5263F5}'
+ }
+ UAccCOM.AccText = s 'AccText Class'
+ {
+ CLSID = s '{6D8AB08B-CCE9-471E-8A41-35773D5263F5}'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {6D8AB08B-CCE9-471E-8A41-35773D5263F5} = s 'AccText Class'
+ {
+ ProgID = s 'UAccCOM.AccText.1'
+ VersionIndependentProgID = s 'UAccCOM.AccText'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'both'
+ }
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/AccTextBase.cpp b/winaccessibility/source/UAccCOM/AccTextBase.cpp
new file mode 100644
index 000000000000..6b7a38fba7aa
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccTextBase.cpp
@@ -0,0 +1,995 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+//////////////////////////////////////////////////////////////////////
+// AccTextBase.cpp: implementation of the CAccTextBase class.
+//////////////////////////////////////////////////////////////////////
+#include "stdafx.h"
+#include <string>
+#define WNT
+
+#include <com/sun/star/accessibility/AccessibleTextType.hpp>
+#include "AccTextBase.h"
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/accessibility/XAccessibleTextSelection.hpp>
+#include "MAccessible.h"
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+using namespace rtl;
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+OUString ReplaceFourChar(OUString oldOUString);
+
+CAccTextBase::CAccTextBase()
+{}
+
+CAccTextBase::~CAccTextBase()
+{}
+
+
+/**
+ * Get special selection.
+ * @param startOffset Start selection offset.
+ * @param endOffset End selection offset.
+ * @param success Variant to accept the result of if the method call is successful.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_addSelection(long startOffset, long endOffset)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK XInterface#
+ if(pUNOInterface == NULL)
+ return E_FAIL;
+
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+
+ Reference< XAccessibleTextSelection > pRExtension(pRContext,UNO_QUERY);
+
+ if( pRExtension.is() )
+ {
+ pRExtension->addSelection(0, startOffset, endOffset);
+ return S_OK;
+ }
+ else
+ {
+ GetXInterface()->setSelection(startOffset, endOffset);
+ return S_OK;
+ }
+
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get special attributes.
+ * @param offset Offset.
+ * @param startOffset Variant to accept start offset.
+ * @param endOffset Variant to accept end offset.
+ * @param textAttributes Variant to accept attributes.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_attributes(long offset, long * startOffset, long * endOffset, BSTR * textAttributes)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (startOffset == NULL || endOffset == NULL || textAttributes == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pRXText.is())
+ {
+ return E_FAIL;
+ }
+
+ if( offset < 0 || offset > GetXInterface()->getCharacterCount() )
+ return E_FAIL;
+
+ std::wstring strAttrs;
+
+ strAttrs += L"Version:1;";
+
+ Sequence< ::com::sun::star::beans::PropertyValue > pValues = GetXInterface()->getCharacterAttributes(offset, Sequence< rtl::OUString >());
+ int nCount = pValues.getLength();
+
+ short numberingLevel = 0;
+ OUString numberingPrefix;
+ Any anyNumRule;
+ bool bHaveNumberingPrefixAttr = false;
+ bool bHaveNumberingLevel = false;
+ bool bHaveNumberingRules = false;
+ for(int i =0; i<nCount; i++)
+ {
+
+ ::com::sun::star::beans::PropertyValue &pValue = pValues[i];
+ if(pValue.Name.compareTo(OUString::createFromAscii("NumberingLevel"))==0)
+ {
+ if (pValue.Value != Any())
+ pValue.Value >>= numberingLevel;
+ else
+ numberingLevel = -1;
+ bHaveNumberingLevel = true;
+ continue;
+ }
+ if(pValue.Name.compareTo(OUString::createFromAscii("NumberingPrefix"))==0)
+ {
+ pValue.Value >>=numberingPrefix;
+ bHaveNumberingPrefixAttr = true;
+ continue;
+ }
+ if(pValue.Name.compareTo(OUString::createFromAscii("NumberingRules"))==0)
+ {
+ bHaveNumberingRules = true;
+ anyNumRule = pValue.Value;
+ continue;
+ }
+ if (bHaveNumberingLevel && bHaveNumberingRules && bHaveNumberingPrefixAttr)
+ {
+ OLECHAR numProps[512] = {0};
+ strAttrs+=L";";
+ numberingPrefix = ReplaceFourChar(numberingPrefix);
+ CMAccessible::get_OLECHAR4Numbering(anyNumRule,numberingLevel,numberingPrefix,numProps);
+ strAttrs += numProps;
+ bHaveNumberingLevel = 0;
+ bHaveNumberingRules = 0;
+ }
+ if( (bHaveNumberingPrefixAttr && i > 1 ) ||
+ (!bHaveNumberingPrefixAttr && i > 0 ) ) //element 0 is NumberingPrefix, not write alone
+ {
+ strAttrs+=L";";
+ }
+ strAttrs += pValue.Name.getStr();
+ strAttrs += L":";
+
+ OLECHAR pTemp[2048] = {0};
+
+ if (pValue.Name.compareTo(OUString::createFromAscii("CharBackColor"))==0 ||
+ pValue.Name.compareTo(OUString::createFromAscii("CharColor"))==0 ||
+ pValue.Name.compareTo(OUString::createFromAscii("CharUnderlineColor"))==0 )
+ {
+ unsigned long nColor;
+ pValue.Value >>= nColor;
+ OLECHAR pBuf[64];
+ swprintf( pBuf, L"%08X", nColor );
+ pTemp[0]=L'#';
+ wcscat( pTemp, pBuf );
+
+ }
+ else
+ {
+ CMAccessible::get_OLECHARFromAny(pValue.Value,pTemp);
+ }
+
+ strAttrs +=pTemp;
+ }
+ strAttrs +=L";";
+ // #CHECK#
+ if(*textAttributes)
+ SysFreeString(*textAttributes);
+ *textAttributes = SysAllocString(strAttrs.c_str());
+
+ if( offset < GetXInterface()->getCharacterCount() )
+ {
+ TextSegment textSeg = GetXInterface()->getTextAtIndex(offset, AccessibleTextType::ATTRIBUTE_RUN);
+ *startOffset = textSeg.SegmentStart;
+ *endOffset = textSeg.SegmentEnd;
+ }
+ else
+ {
+ *startOffset = offset;
+ *endOffset = offset;
+ }
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get caret position.
+ * @param offset Variant to accept caret offset.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_caretOffset(long * offset)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (offset == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pRXText.is())
+ {
+ *offset = 0;
+ return S_OK;
+ }
+
+ *offset = GetXInterface()->getCaretPosition();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get character count.
+ * @param nCharacters Variant to accept character count.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_characterCount(long * nCharacters)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (nCharacters == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pRXText.is())
+ {
+ *nCharacters = 0;
+ return S_OK;
+ }
+
+ *nCharacters = GetXInterface()->getCharacterCount();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get character extents.
+ * @param offset Offset.
+ * @param x Variant to accept x position.
+ * @param y Variant to accept y position.
+ * @param width Variant to accept width.
+ * @param Height Variant to accept height.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_characterExtents(long offset, IA2CoordinateType coordType, long * x, long * y, long * width, long * height)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (x == NULL || height == NULL || y == NULL || width == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pRXText.is())
+ return E_FAIL;
+
+ if(offset < 0 || offset > GetXInterface()->getCharacterCount() )
+ return E_FAIL;
+
+ com::sun::star::awt::Rectangle rectangle;
+ rectangle = GetXInterface()->getCharacterBounds(offset);
+
+ //IA2Point aPoint;
+ com::sun::star::awt::Point aPoint;
+
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+ if( !pRContext.is() )
+ {
+ return E_FAIL;
+ }
+ Reference<XAccessibleComponent> pRComp(pRContext,UNO_QUERY);
+ if( pRComp.is() )
+ {
+ if(coordType == IA2_COORDTYPE_SCREEN_RELATIVE)
+ {
+ ::com::sun::star::awt::Point pt = pRComp->getLocationOnScreen();
+ aPoint.X = pt.X;
+ aPoint.Y = pt.Y;
+ }
+ else if(coordType == IA2_COORDTYPE_PARENT_RELATIVE)
+ {
+ ::com::sun::star::awt::Point pt = pRComp->getLocation();
+ aPoint.X = pt.X;
+ aPoint.Y = pt.Y;
+ }
+ }
+ rectangle.X = rectangle.X + aPoint.X;
+ rectangle.Y = rectangle.Y + aPoint.Y;
+
+ *x = rectangle.X;
+ *y = rectangle.Y;
+
+ // GetXInterface()->getCharacterBounds() have different implement in different acc component
+ // But we need return the width/height == 1 for every component when offset == text length.
+ // So we ignore the return result of GetXInterface()->getCharacterBounds() when offset == text length.
+ if( offset == GetXInterface()->getCharacterCount() )
+ {
+ *width = 1;
+ *height = 1;
+ }
+ else
+ {
+ *width = rectangle.Width;
+ *height = rectangle.Height;
+ }
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get selections count.
+ * @param nSelections Variant to accept selections count.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_nSelections(long * nSelections)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (nSelections == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(pUNOInterface == NULL)
+ {
+ *nSelections = 0;
+ return S_OK;
+ }
+
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+
+ Reference< XAccessibleTextSelection > pRExtension(pRContext,UNO_QUERY);
+
+ if( pRExtension.is() )
+ {
+ *nSelections = pRExtension->getSelectedPortionCount();
+ return S_OK;
+ }
+
+ long iLength = GetXInterface()->getSelectedText().getLength();
+ if( iLength> 0)
+ {
+ *nSelections = 1;
+ return S_OK;
+ }
+
+ *nSelections = 0;
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get offset of some special point.
+ * @param x X position of one point.
+ * @param x Y position of one point.
+ * @param coordType Type.
+ * @param offset Variant to accept offset.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_offsetAtPoint(long x, long y, IA2CoordinateType, long * offset)
+{
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+
+ if (offset == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pRXText.is())
+ return E_FAIL;
+
+ com::sun::star::awt::Point point;
+ point.X = x;
+ point.Y = y;
+ *offset = GetXInterface()->getIndexAtPoint(point);
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get selection range.
+ * @param selection selection count.
+ * @param startOffset Variant to accept the start offset of special selection.
+ * @param endOffset Variant to accept the end offset of special selection.
+ * @return Result.
+*/
+
+STDMETHODIMP CAccTextBase::get_selection(long selectionIndex, long * startOffset, long * endOffset)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (startOffset == NULL || endOffset == NULL )
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(pUNOInterface == NULL )
+ return E_FAIL;
+
+ long nSelection = 0;
+ get_nSelections(&nSelection);
+
+ if(selectionIndex >= nSelection || selectionIndex < 0 )
+ return E_FAIL;
+
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+
+ Reference< XAccessibleTextSelection > pRExtension(pRContext,UNO_QUERY);
+
+ if( pRExtension.is() )
+ {
+ *startOffset = pRExtension->getSeletedPositionStart(selectionIndex);
+ *endOffset = pRExtension->getSeletedPositionEnd(selectionIndex);
+ return S_OK;
+ }
+ else if(GetXInterface()->getSelectionEnd() > -1)
+ {
+ *startOffset = GetXInterface()->getSelectionStart();
+ *endOffset = GetXInterface()->getSelectionEnd();
+ return S_OK;
+ }
+
+ *startOffset = 0;
+ *endOffset = 0;
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get special text.
+ * @param startOffset Start position of special range.
+ * @param endOffset End position of special range.
+ * @param text Variant to accept the text of special range.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_text(long startOffset, long endOffset, BSTR * text)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (text == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pRXText.is())
+ return E_FAIL;
+
+ if (endOffset < -1 || endOffset < startOffset )
+ {
+ return E_FAIL;
+ }
+
+ ::rtl::OUString ouStr;
+ if (endOffset == -1 )
+ {
+ long nLen=0;
+ if(SUCCEEDED(get_characterCount(&nLen)))
+ {
+ ouStr = GetXInterface()->getTextRange( 0, nLen );
+ }
+ }
+ else
+ {
+ ouStr = GetXInterface()->getTextRange( startOffset, endOffset );
+ }
+
+ SysFreeString(*text);
+ *text = SysAllocString((OLECHAR*)ouStr.getStr());
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get special text before some position.
+ * @param offset Special position.
+ * @param boundaryType Boundary type.
+ * @param startOffset Variant to accept the start offset.
+ * @param endOffset Variant to accept the end offset.
+ * @param text Variant to accept the special text.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_textBeforeOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if (startOffset == NULL || endOffset == NULL || text == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pRXText.is())
+ return E_FAIL;
+
+ // In New UNO IAccessibleText.idl these constant values are defined as follows:
+ //
+ // const long TEXT_BOUNDARY_CHAR = -1;
+ // const long TEXT_BOUNDARY_TO_CURSOR_POS = -2;
+ // const long TEXT_BOUNDARY_START_OF_WORD = -3;
+ // const long TEXT_BOUNDARY_END_OF_WORD = -4;
+ // const long TEXT_BOUNDARY_START_OF_SENTENCE = -5;
+ // const long TEXT_BOUNDARY_END_OF_SENTENCE = -6;
+ // const long TEXT_BOUNDARY_START_OF_LINE = -7;
+ // const long TEXT_BOUNDARY_END_OF_LINE = -8;
+ //
+ // In UNO, the corresponding values are as follows:
+ //
+ // const short CHARACTER = 1;
+ // const short WORD = 2;
+ // const short SENTENCE = 3;
+ // const short PARAGRAPH = 4;
+ // const short LINE = 5;
+ // const short GLYPH = 6;
+ // const short ATTRIBUTE_RUN = 7;
+ //
+
+ long lUnoBoundaryType;
+
+ switch(boundaryType)
+ {
+ case IA2_TEXT_BOUNDARY_CHAR:
+ lUnoBoundaryType = 1; // CHARACTER;
+ break;
+ case IA2_TEXT_BOUNDARY_WORD:
+ lUnoBoundaryType = 2; // WORD;
+ break;
+ case IA2_TEXT_BOUNDARY_SENTENCE:
+ lUnoBoundaryType = 3; // SENTENCE;
+ break;
+ case IA2_TEXT_BOUNDARY_LINE:
+ lUnoBoundaryType = 5; // LINE;
+ break;
+ case IA2_TEXT_BOUNDARY_PARAGRAPH:
+ lUnoBoundaryType = 4;
+ break;
+ case IA2_TEXT_BOUNDARY_ALL:
+ {
+ long nChar;
+ get_nCharacters( &nChar );
+ *startOffset = 0;
+ *endOffset = nChar;
+ return get_text(0, nChar, text);
+ }
+ break;
+ default:
+ return E_FAIL;
+ }
+
+ TextSegment segment = GetXInterface()->getTextBeforeIndex( offset, sal_Int16(lUnoBoundaryType));
+ ::rtl::OUString ouStr = segment.SegmentText;
+ SysFreeString(*text);
+ *text = SysAllocString((OLECHAR*)ouStr.getStr());
+ *startOffset = segment.SegmentStart;
+ *endOffset = segment.SegmentEnd;
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get special text after some position.
+ * @param offset Special position.
+ * @param boundaryType Boundary type.
+ * @param startOffset Variant to accept the start offset.
+ * @param endOffset Variant to accept the end offset.
+ * @param text Variant to accept the special text.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_textAfterOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (startOffset == NULL || endOffset == NULL || text == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pRXText.is())
+ return E_FAIL;
+
+ // In New UNO IAccessibleText.idl these constant values are defined as follows:
+ //
+ // const long TEXT_BOUNDARY_CHAR = -1;
+ // const long TEXT_BOUNDARY_TO_CURSOR_POS = -2;
+ // const long TEXT_BOUNDARY_START_OF_WORD = -3;
+ // const long TEXT_BOUNDARY_END_OF_WORD = -4;
+ // const long TEXT_BOUNDARY_START_OF_SENTENCE = -5;
+ // const long TEXT_BOUNDARY_END_OF_SENTENCE = -6;
+ // const long TEXT_BOUNDARY_START_OF_LINE = -7;
+ // const long TEXT_BOUNDARY_END_OF_LINE = -8;
+ //
+ // In UNO, the corresponding values are as follows:
+ //
+ // const short CHARACTER = 1;
+ // const short WORD = 2;
+ // const short SENTENCE = 3;
+ // const short PARAGRAPH = 4;
+ // const short LINE = 5;
+ // const short GLYPH = 6;
+ // const short ATTRIBUTE_RUN = 7;
+ //
+
+ long lUnoBoundaryType;
+ switch(boundaryType)
+ {
+ case IA2_TEXT_BOUNDARY_CHAR:
+ lUnoBoundaryType = 1; // CHARACTER;
+ break;
+ case IA2_TEXT_BOUNDARY_WORD:
+ lUnoBoundaryType = 2; // WORD;
+ break;
+ case IA2_TEXT_BOUNDARY_SENTENCE:
+ lUnoBoundaryType = 3; // SENTENCE;
+ break;
+ case IA2_TEXT_BOUNDARY_LINE:
+ lUnoBoundaryType = 5; // LINE;
+ break;
+ case IA2_TEXT_BOUNDARY_PARAGRAPH:
+ lUnoBoundaryType = 4;
+ break;
+ case IA2_TEXT_BOUNDARY_ALL:
+ {
+ long nChar;
+ get_nCharacters( &nChar );
+ *startOffset = 0;
+ *endOffset = nChar;
+ return get_text(0, nChar, text);
+ }
+ break;
+ default:
+ return E_FAIL;
+ }
+
+ TextSegment segment = GetXInterface()->getTextBehindIndex( offset, sal_Int16(lUnoBoundaryType));
+ ::rtl::OUString ouStr = segment.SegmentText;
+ SysFreeString(*text);
+ *text = SysAllocString((OLECHAR*)ouStr.getStr());
+ *startOffset = segment.SegmentStart;
+ *endOffset = segment.SegmentEnd;
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get special text at some position.
+ * @param offset Special position.
+ * @param boundaryType Boundary type.
+ * @param startOffset Variant to accept the start offset.
+ * @param endOffset Variant to accept the end offset.
+ * @param text Variant to accept the special text.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_textAtOffset(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text)
+{
+
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (startOffset == NULL || text == NULL ||endOffset == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pRXText.is())
+ return E_FAIL;
+
+ // In New UNO IAccessibleText.idl these constant values are defined as follows:
+ //
+ // const long TEXT_BOUNDARY_CHAR = -1;
+ // const long TEXT_BOUNDARY_TO_CURSOR_POS = -2;
+ // const long TEXT_BOUNDARY_START_OF_WORD = -3;
+ // const long TEXT_BOUNDARY_END_OF_WORD = -4;
+ // const long TEXT_BOUNDARY_START_OF_SENTENCE = -5;
+ // const long TEXT_BOUNDARY_END_OF_SENTENCE = -6;
+ // const long TEXT_BOUNDARY_START_OF_LINE = -7;
+ // const long TEXT_BOUNDARY_END_OF_LINE = -8;
+ //
+ // In UNO, the corresponding values are as follows:
+ //
+ // const short CHARACTER = 1;
+ // const short WORD = 2;
+ // const short SENTENCE = 3;
+ // const short PARAGRAPH = 4;
+ // const short LINE = 5;
+ // const short GLYPH = 6;
+ // const short ATTRIBUTE_RUN = 7;
+ //
+
+ long lUnoBoundaryType;
+
+ switch(boundaryType)
+ {
+ case IA2_TEXT_BOUNDARY_CHAR:
+ lUnoBoundaryType = 1; // CHARACTER;
+ break;
+ case IA2_TEXT_BOUNDARY_WORD:
+ lUnoBoundaryType = 2; // WORD;
+ break;
+ case IA2_TEXT_BOUNDARY_SENTENCE:
+ lUnoBoundaryType = 3; // SENTENCE;
+ break;
+ case IA2_TEXT_BOUNDARY_LINE:
+ lUnoBoundaryType = 5; // LINE;
+ break;
+ case IA2_TEXT_BOUNDARY_PARAGRAPH:
+ lUnoBoundaryType = 4;
+ break;
+ case IA2_TEXT_BOUNDARY_ALL:
+ {
+ long nChar;
+ get_nCharacters( &nChar );
+ *startOffset = 0;
+ *endOffset = nChar;
+ return get_text(0, nChar, text);
+ }
+ break;
+ default:
+ return E_FAIL;
+ }
+
+ TextSegment segment = GetXInterface()->getTextAtIndex( offset, sal_Int16(lUnoBoundaryType));
+ ::rtl::OUString ouStr = segment.SegmentText;
+ SysFreeString(*text);
+ *text = SysAllocString((OLECHAR*)ouStr.getStr());
+ *startOffset = segment.SegmentStart;
+ *endOffset = segment.SegmentEnd;
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Remove selection.
+ * @param selectionIndex Special selection index
+ * @param success Variant to accept the memthod called result.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::removeSelection(long selectionIndex)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK XInterface#
+ if(pUNOInterface == NULL)
+ {
+ return E_FAIL;
+ }
+
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+
+ Reference< XAccessibleTextSelection > pRExtension(pRContext,UNO_QUERY);
+
+ if( pRExtension.is() )
+ {
+ pRExtension->removeSelection(selectionIndex);
+ return S_OK;
+ }
+ else
+ {
+ GetXInterface()->setSelection(0, 0);
+ return S_OK;
+ }
+
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Set caret position.
+ * @param offset Special position.
+ * @param success Variant to accept the memthod called result.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::setCaretOffset(long offset)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK XInterface#
+ if(!pRXText.is())
+ return E_FAIL;
+
+ GetXInterface()->setCaretPosition( offset);
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Set special selection.
+ * @param selectionIndex Special selection index.
+ * @param startOffset start position.
+ * @param endOffset end position.
+ * @param success Variant to accept the memthod called result.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::setSelection(long, long startOffset, long endOffset)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK XInterface#
+ if(!pRXText.is())
+ {
+ return E_FAIL;
+ }
+
+ GetXInterface()->setSelection( startOffset, endOffset );
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get characters count.
+ * @param nCharacters Variant to accept the characters count.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::get_nCharacters(long * nCharacters)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (nCharacters == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+ if(!pRXText.is())
+ {
+ *nCharacters = 0;
+ return S_OK;
+ }
+
+ *nCharacters = GetXInterface()->getCharacterCount();
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+// added by qiuhd, 2006/07/03, for direver 07/11
+STDMETHODIMP CAccTextBase::get_newText( IA2TextSegment *)
+{
+ return E_NOTIMPL;
+}
+
+STDMETHODIMP CAccTextBase::get_oldText( IA2TextSegment *)
+{
+ return E_NOTIMPL;
+}
+
+/**
+ * Scroll to special sub-string .
+ * @param startIndex Start index of sub string.
+ * @param endIndex End index of sub string.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::scrollSubstringToPoint(long, long, IA2CoordinateType, long, long )
+{
+
+
+ ENTER_PROTECTED_BLOCK
+
+ return E_NOTIMPL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+STDMETHODIMP CAccTextBase::scrollSubstringTo(long, long, IA2ScrollType)
+{
+
+
+ ENTER_PROTECTED_BLOCK
+
+ return E_NOTIMPL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Put UNO interface.
+ * @param pXInterface UNO interface.
+ * @return Result.
+*/
+STDMETHODIMP CAccTextBase::put_XInterface(long pXInterface)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ CUNOXWrapper::put_XInterface(pXInterface);
+ //special query.
+ if(pUNOInterface == NULL)
+ return E_FAIL;
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+ if( !pRContext.is() )
+ {
+ return E_FAIL;
+ }
+ Reference<XAccessibleText> pRXI(pRContext,UNO_QUERY);
+ if( !pRXI.is() )
+ pRXText = NULL;
+ else
+ pRXText = pRXI;
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+OUString ReplaceOneChar(OUString oldOUString, OUString replacedChar, OUString replaceStr)
+{
+ int iReplace = -1;
+ iReplace = oldOUString.lastIndexOf(replacedChar);
+ if (iReplace > -1)
+ {
+ for(;iReplace>-1;)
+ {
+ oldOUString = oldOUString.replaceAt(iReplace,1, replaceStr);
+ iReplace=oldOUString.lastIndexOf(replacedChar,iReplace);
+ }
+ }
+ return oldOUString;
+
+}
+OUString ReplaceFourChar(OUString oldOUString)
+{
+ oldOUString = ReplaceOneChar(oldOUString,OUString::createFromAscii("\\"),OUString::createFromAscii("\\\\"));
+ oldOUString = ReplaceOneChar(oldOUString,OUString::createFromAscii(";"),OUString::createFromAscii("\\;"));
+ oldOUString = ReplaceOneChar(oldOUString,OUString::createFromAscii("="),OUString::createFromAscii("\\="));
+ oldOUString = ReplaceOneChar(oldOUString,OUString::createFromAscii(","),OUString::createFromAscii("\\,"));
+ oldOUString = ReplaceOneChar(oldOUString,OUString::createFromAscii(":"),OUString::createFromAscii("\\:"));
+ return oldOUString;
+}
diff --git a/winaccessibility/source/UAccCOM/AccTextBase.h b/winaccessibility/source/UAccCOM/AccTextBase.h
new file mode 100644
index 000000000000..3e22ba013eaf
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccTextBase.h
@@ -0,0 +1,122 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+// AccTextBase.h: interface for the CAccTextBase class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(AFX_ACCTEXTBASE_H__B9AE05F6_E28B_4CF3_A8F2_EEE5D2E00B82__INCLUDED_)
+#define AFX_ACCTEXTBASE_H__B9AE05F6_E28B_4CF3_A8F2_EEE5D2E00B82__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#define WNT
+
+#include <com/sun/star/uno/reference.hxx>
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#include "UNOXWrapper.h"
+
+class ATL_NO_VTABLE CAccTextBase : public CUNOXWrapper
+{
+public:
+ CAccTextBase();
+ virtual ~CAccTextBase();
+
+ // IAccessibleText
+public:
+ // IAccessibleText
+
+ // Adds a text selection.
+ STDMETHOD(get_addSelection)(long startOffset, long endOffset);
+
+ // Gets text attributes.
+ STDMETHOD(get_attributes)(long offset, long * startOffset, long * endOffset, BSTR * textAttributes);
+
+ // Gets caret offset.
+ STDMETHOD(get_caretOffset)(long * offset);
+
+ // Gets total number of characters.
+ STDMETHOD(get_characterCount)(long * nCharacters);
+
+ // Gets bounding rect containing the glyph(s) representing the character
+ // at the specified text offset
+ STDMETHOD(get_characterExtents)(long offset, IA2CoordinateType coordType, long * x, long * y, long * width, long * height);
+
+ // Gets number of active non-contiguous selections.
+ STDMETHOD(get_nSelections)(long * nSelections);
+
+ // Gets bounding rect for the glyph at a certain point.
+ STDMETHOD(get_offsetAtPoint)(long x, long y, IA2CoordinateType coordType, long * offset);
+
+ // Gets character offsets of N-th active text selection.
+ STDMETHOD(get_selection)(long selectionIndex, long * startOffset, long * endOffset);
+
+ // Gets a range of text by offset NOTE: returned string may be longer
+ // than endOffset-startOffset bytes if text contains multi-byte characters.
+ STDMETHOD(get_text)(long startOffset, long endOffset, BSTR * text);
+
+ // Gets a specified amount of text that ends before a specified offset.
+ STDMETHOD(get_textBeforeOffset)(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text);
+
+ // Gets a specified amount of text that spans the specified offset.
+ STDMETHOD(get_textAfterOffset)(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text);
+
+ // Gets a specified amount of text that starts after a specified offset.
+ STDMETHOD(get_textAtOffset)(long offset, IA2TextBoundaryType boundaryType, long * startOffset, long * endOffset, BSTR * text);
+
+ // Unselects a range of text.
+ STDMETHOD(removeSelection)(long selectionIndex);
+
+ // Moves text caret.
+ STDMETHOD(setCaretOffset)(long offset);
+
+ // Changes the bounds of an existing selection.
+ STDMETHOD(setSelection)(long selectionIndex, long startOffset, long endOffset);
+
+ // Gets total number of characters.
+ // NOTE: this may be different than the total number of bytes required
+ // to store the text, if the text contains multi-byte characters.
+ STDMETHOD(get_nCharacters)(long * nCharacters);
+
+ STDMETHOD(get_newText)( IA2TextSegment *newText);
+
+ STDMETHOD(get_oldText)( IA2TextSegment *oldText);
+
+ // Makes specific part of string visible on screen.
+ STDMETHOD(scrollSubstringTo)(long startIndex, long endIndex,enum IA2ScrollType scrollType);
+ STDMETHOD(scrollSubstringToPoint)(long startIndex, long endIndex,enum IA2CoordinateType coordinateType, long x, long y );
+
+ // Overide of IUNOXWrapper.
+ STDMETHOD(put_XInterface)(long pXInterface);
+
+private:
+
+ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleText> pRXText;
+
+ inline com::sun::star::accessibility::XAccessibleText* GetXInterface()
+ {
+ return pRXText.get();
+ }
+};
+
+#endif // !defined(AFX_ACCTEXTBASE_H__B9AE05F6_E28B_4CF3_A8F2_EEE5D2E00B82__INCLUDED_)
diff --git a/winaccessibility/source/UAccCOM/AccValue.cpp b/winaccessibility/source/UAccCOM/AccValue.cpp
new file mode 100644
index 000000000000..60c7af88cf20
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccValue.cpp
@@ -0,0 +1,224 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "AccValue.h"
+#include "MAccessible.h"
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+
+/**
+ * Get current value.
+ * @param currentValue Variant that accepts current value.
+ * @return Result.
+ */
+
+STDMETHODIMP CAccValue::get_currentValue(VARIANT * currentValue)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (currentValue == NULL)
+ return E_INVALIDARG;
+ if ( !pRXVal.is() )
+ return E_FAIL;
+
+ // Get Any type value from UNO.
+ ::com::sun::star::uno::Any anyVal = GetXInterface()->getCurrentValue();
+ // Convert Any to VARIANT.
+ CMAccessible::ConvertAnyToVariant(anyVal, currentValue);
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Set current value.
+ * @param Value New value should be set.
+ * @param success If the method is successfully called.
+ * @return Result.
+ */
+STDMETHODIMP CAccValue::setCurrentValue(VARIANT value)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if ( !pRXVal.is() )
+ return E_FAIL;
+
+ HRESULT hRet = S_OK;
+ ::com::sun::star::uno::Any anyVal;
+
+ // Set value according to value type.
+ switch(value.vt)
+ {
+ case VT_UI1:
+ {
+ ::com::sun::star::uno::Type typeInfo(TypeClass_CHAR, (sal_Char *)"char");
+ anyVal.setValue(&value.bVal, typeInfo);
+ }
+ break;
+
+ case VT_BOOL:
+ {
+ ::com::sun::star::uno::Type typeInfo(TypeClass_BOOLEAN, (sal_Char *)"bool");
+ anyVal.setValue(&value.boolVal, typeInfo);
+ }
+ break;
+
+ case VT_I2:
+ {
+ ::com::sun::star::uno::Type typeInfo(TypeClass_SHORT, (sal_Char *)"short");
+ anyVal.setValue(&value.iVal, typeInfo);
+ }
+ break;
+
+ case VT_I4:
+ {
+ ::com::sun::star::uno::Type typeInfo(TypeClass_LONG, (sal_Char *)"long");
+ anyVal.setValue(&value.lVal, typeInfo);
+ }
+ break;
+
+ case VT_R4:
+ {
+ ::com::sun::star::uno::Type typeInfo(TypeClass_FLOAT, (sal_Char *)"float");
+ anyVal.setValue(&value.fltVal, typeInfo);
+ }
+ break;
+
+ case VT_R8:
+ {
+ ::com::sun::star::uno::Type typeInfo(TypeClass_DOUBLE, (sal_Char *)"double");
+ anyVal.setValue(&value.dblVal, typeInfo);
+ }
+ break;
+
+ default:
+ {
+ // Unsupport type conversion.
+ hRet = E_FAIL;
+ }
+ break;
+ }
+
+ if(hRet == S_OK)
+ {
+ hRet = pRXVal->setCurrentValue(anyVal) ? S_OK : E_FAIL ;
+ }
+
+ return hRet;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get maximum value.
+ * @param maximumValue Variant that accepts maximum value.
+ * @return Result.
+ */
+STDMETHODIMP CAccValue::get_maximumValue(VARIANT *maximumValue)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (maximumValue == NULL)
+ return E_INVALIDARG;
+ if ( !pRXVal.is() )
+ return E_FAIL;
+
+ // Get Any type value from UNO.
+ ::com::sun::star::uno::Any anyVal = GetXInterface()->getMaximumValue();
+ // Convert Any to VARIANT.
+ CMAccessible::ConvertAnyToVariant(anyVal, maximumValue);
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Get minimum value.
+ * @param mininumValue Variant that accepts minimum value.
+ * @return Result.
+ */
+STDMETHODIMP CAccValue::get_minimumValue(VARIANT *mininumValue)
+{
+
+ CHECK_ENABLE_INF
+
+ ENTER_PROTECTED_BLOCK
+
+ if (mininumValue == NULL)
+ return E_FAIL;
+ if ( !pRXVal.is() )
+ return E_FAIL;
+
+ // Get Any type value from UNO.
+ ::com::sun::star::uno::Any anyVal = GetXInterface()->getMinimumValue();
+ // Convert Any to VARIANT.
+ CMAccessible::ConvertAnyToVariant(anyVal, mininumValue);
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+ * Put valid UNO interface into com class.
+ * @param pXInterface UNO interface.
+ * @return Result.
+ */
+STDMETHODIMP CAccValue::put_XInterface(long pXInterface)
+{
+
+
+ ENTER_PROTECTED_BLOCK
+
+ CUNOXWrapper::put_XInterface(pXInterface);
+ //special query.
+ if(pUNOInterface == NULL)
+ return E_FAIL;
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+ if( !pRContext.is() )
+ {
+ return E_FAIL;
+ }
+ Reference<XAccessibleValue> pRXI(pRContext,UNO_QUERY);
+ if( !pRXI.is() )
+ pRXVal = NULL;
+ else
+ pRXVal = pRXI.get();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
diff --git a/winaccessibility/source/UAccCOM/AccValue.h b/winaccessibility/source/UAccCOM/AccValue.h
new file mode 100644
index 000000000000..674f1e70d1e3
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccValue.h
@@ -0,0 +1,104 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#if !defined(AFX_ACCVALUE_H__CBA4972C_4188_4A18_A3CD_4A1FA3DDED38__INCLUDED_)
+#define AFX_ACCVALUE_H__CBA4972C_4188_4A18_A3CD_4A1FA3DDED38__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "resource.h" // main symbols
+
+
+#include <com/sun/star/uno/reference.hxx>
+#include <com/sun/star/accessibility/XAccessibleValue.hpp>
+#include "UNOXWrapper.h"
+
+/**
+ * CAccValue implements IAccessibleValue interface.
+ */
+class CAccValue :
+ public CComObjectRoot,
+ public CComCoClass<CAccValue,&CLSID_AccValue>,
+ public IAccessibleValue,
+ public CUNOXWrapper
+{
+public:
+ CAccValue()
+ {
+ }
+ virtual ~CAccValue()
+ {
+ }
+
+ BEGIN_COM_MAP(CAccValue)
+ COM_INTERFACE_ENTRY(IAccessibleValue)
+ COM_INTERFACE_ENTRY(IUNOXWrapper)
+ COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+ END_COM_MAP()
+
+ static HRESULT WINAPI _SmartQI(void* pv,
+ REFIID iid, void** ppvObject, DWORD)
+ {
+ return ((CAccValue*)pv)->SmartQI(iid,ppvObject);
+ }
+
+ HRESULT SmartQI(REFIID iid, void** ppvObject)
+ {
+ if( m_pOuterUnknown )
+ return OuterQueryInterface(iid,ppvObject);
+ return E_FAIL;
+ }
+
+ DECLARE_REGISTRY_RESOURCEID(IDR_AccValue)
+
+ // IAccessibleValue
+public:
+ // IAccessibleValue
+
+ // Returns the value of this object as a number.
+ STDMETHOD(get_currentValue)(VARIANT *currentValue);
+
+ // Sets the value of this object to the given number.
+ STDMETHOD(setCurrentValue)(VARIANT value);
+
+ // Returns the maximal value that can be represented by this object.
+ STDMETHOD(get_maximumValue)(VARIANT *maximumValue);
+
+ // Returns the minimal value that can be represented by this object.
+ STDMETHOD(get_minimumValue)(VARIANT *mininumValue);
+
+ // Overide of IUNOXWrapper.
+ STDMETHOD(put_XInterface)(long pXInterface);
+
+private:
+
+ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleValue> pRXVal;
+
+ inline com::sun::star::accessibility::XAccessibleValue* GetXInterface()
+ {
+ return pRXVal.get();
+ }
+
+};
+
+#endif // !defined(AFX_ACCVALUE_H__CBA4972C_4188_4A18_A3CD_4A1FA3DDED38__INCLUDED_)
diff --git a/winaccessibility/source/UAccCOM/AccValue.rgs b/winaccessibility/source/UAccCOM/AccValue.rgs
new file mode 100644
index 000000000000..f57f318379ec
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccValue.rgs
@@ -0,0 +1,23 @@
+HKCR
+{
+ UAccCOM.AccValue.1 = s 'AccValue Class'
+ {
+ CLSID = s '{730A561B-1AF6-49E1-9C04-9A2F48CD8512}'
+ }
+ UAccCOM.AccValue = s 'AccValue Class'
+ {
+ CLSID = s '{730A561B-1AF6-49E1-9C04-9A2F48CD8512}'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {730A561B-1AF6-49E1-9C04-9A2F48CD8512} = s 'AccValue Class'
+ {
+ ProgID = s 'UAccCOM.AccValue.1'
+ VersionIndependentProgID = s 'UAccCOM.AccValue'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'both'
+ }
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/AccessibleKeyStroke.h b/winaccessibility/source/UAccCOM/AccessibleKeyStroke.h
new file mode 100644
index 000000000000..f29b116571f1
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/AccessibleKeyStroke.h
@@ -0,0 +1,157 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCESSIBLEKEYSTROKE_H_
+#define __ACCESSIBLEKEYSTROKE_H_
+
+#pragma once
+
+typedef struct _ACCESSIBLE_KEYSTROKE {
+ short modifiers;
+ short keyCode;
+ char keyChar;
+ short keyFunc;
+} ACCESSIBLE_KEYSTROKE;
+
+const short MODIFIER_SHIFT = 1;
+const short MODIFIER_CTRL = 2;
+const short MODIFIER_ALT = 4;
+
+const short KEYCODE_NUM0 = 256;
+const short KEYCODE_NUM1 = 257;
+const short KEYCODE_NUM2 = 258;
+const short KEYCODE_NUM3 = 259;
+const short KEYCODE_NUM4 = 260;
+const short KEYCODE_NUM5 = 261;
+const short KEYCODE_NUM6 = 262;
+const short KEYCODE_NUM7 = 263;
+const short KEYCODE_NUM8 = 264;
+const short KEYCODE_NUM9 = 265;
+const short KEYCODE_A = 512;
+const short KEYCODE_B = 513;
+const short KEYCODE_C = 514;
+const short KEYCODE_D = 515;
+const short KEYCODE_E = 516;
+const short KEYCODE_F = 517;
+const short KEYCODE_G = 518;
+const short KEYCODE_H = 519;
+const short KEYCODE_I = 520;
+const short KEYCODE_J = 521;
+const short KEYCODE_K = 522;
+const short KEYCODE_L = 523;
+const short KEYCODE_M = 524;
+const short KEYCODE_N = 525;
+const short KEYCODE_O = 526;
+const short KEYCODE_P = 527;
+const short KEYCODE_Q = 528;
+const short KEYCODE_R = 529;
+const short KEYCODE_S = 530;
+const short KEYCODE_T = 531;
+const short KEYCODE_U = 532;
+const short KEYCODE_V = 533;
+const short KEYCODE_W = 534;
+const short KEYCODE_X = 535;
+const short KEYCODE_Y = 536;
+const short KEYCODE_Z = 537;
+const short KEYCODE_F1 = 768;
+const short KEYCODE_F2 = 769;
+const short KEYCODE_F3 = 770;
+const short KEYCODE_F4 = 771;
+const short KEYCODE_F5 = 772;
+const short KEYCODE_F6 = 773;
+const short KEYCODE_F7 = 774;
+const short KEYCODE_F8 = 775;
+const short KEYCODE_F9 = 776;
+const short KEYCODE_F10 = 777;
+const short KEYCODE_F11 = 778;
+const short KEYCODE_F12 = 779;
+const short KEYCODE_F13 = 780;
+const short KEYCODE_F14 = 781;
+const short KEYCODE_F15 = 782;
+const short KEYCODE_F16 = 783;
+const short KEYCODE_F17 = 784;
+const short KEYCODE_F18 = 785;
+const short KEYCODE_F19 = 786;
+const short KEYCODE_F20 = 787;
+const short KEYCODE_F21 = 788;
+const short KEYCODE_F22 = 789;
+const short KEYCODE_F23 = 790;
+const short KEYCODE_F24 = 791;
+const short KEYCODE_F25 = 792;
+const short KEYCODE_F26 = 793;
+const short KEYCODE_DOWN = 1024;
+const short KEYCODE_UP = 1025;
+const short KEYCODE_LEFT = 1026;
+const short KEYCODE_RIGHT = 1027;
+const short KEYCODE_HOME = 1028;
+const short KEYCODE_END = 1029;
+const short KEYCODE_PAGEUP = 1030;
+const short KEYCODE_PAGEDOWN = 1031;
+const short KEYCODE_RETURN = 1280;
+const short KEYCODE_ESCAPE = 1281;
+const short KEYCODE_TAB = 1282;
+const short KEYCODE_BACKSPACE = 1283;
+const short KEYCODE_SPACE = 1284;
+const short KEYCODE_INSERT = 1285;
+const short KEYCODE_DELETE = 1286;
+const short KEYCODE_ADD = 1287;
+const short KEYCODE_SUBTRACT = 1288;
+const short KEYCODE_MULTIPLY = 1289;
+const short KEYCODE_DIVIDE = 1290;
+const short KEYCODE_POINT = 1291;
+const short KEYCODE_COMMA = 1292;
+const short KEYCODE_LESS = 1293;
+const short KEYCODE_GREATER = 1294;
+const short KEYCODE_EQUAL = 1295;
+const short KEYCODE_OPEN = 1296;
+const short KEYCODE_CUT = 1297;
+const short KEYCODE_COPY = 1298;
+const short KEYCODE_PASTE = 1299;
+const short KEYCODE_UNDO = 1300;
+const short KEYCODE_REPEAT = 1301;
+const short KEYCODE_FIND = 1302;
+const short KEYCODE_PROPERTIES = 1303;
+const short KEYCODE_FRONT = 1304;
+const short KEYCODE_CONTEXTMENU = 1305;
+const short KEYCODE_HELP = 1306;
+
+const short SHORTCUT_DONTKNOW = 0;
+const short NEW = 1;
+const short OPEN = 2;
+const short SAVE = 3;
+const short SAVEAS = 4;
+const short PRINT = 5;
+const short CLOSE = 6;
+const short QUIT = 7;
+const short CUT = 8;
+const short COPY = 9;
+const short PASTE = 10;
+const short UNDO = 11;
+const short REDO = 12;
+const short UNODELETE = 13;
+const short REPEAT = 14;
+const short FIND = 15;
+const short FINDBACKWARD = 16;
+const short PROPERTIES = 17;
+const short FRONT = 18;
+
+
+#endif //#define __ACCESSIBLEKEYSTROKE_H_
diff --git a/winaccessibility/source/UAccCOM/CheckEnableAccessible.cpp b/winaccessibility/source/UAccCOM/CheckEnableAccessible.cpp
new file mode 100644
index 000000000000..fa61021c388c
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/CheckEnableAccessible.cpp
@@ -0,0 +1,35 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#define WNT
+#define _USE_NAMESPACE
+
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+
+#include "CheckEnableAccessible.h"
+
+
+bool IsEnableAccessibleInterface()
+{
+ return Application::IsEnableAccessInterface();
+}
diff --git a/winaccessibility/source/UAccCOM/CheckEnableAccessible.h b/winaccessibility/source/UAccCOM/CheckEnableAccessible.h
new file mode 100644
index 000000000000..729817dc6f86
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/CheckEnableAccessible.h
@@ -0,0 +1,30 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef _CHECKENABLEACCESSIBLE_HXX
+#define _CHECKENABLEACCESSIBLE_HXX
+
+bool IsEnableAccessibleInterface();
+
+#define CHECK_ENABLE_INF if(!IsEnableAccessibleInterface()){ return S_FALSE; }
+#define CHECK_ENABLE_INF_ZERO if(!IsEnableAccessibleInterface()){ return 0; }
+
+#endif //_CHECKENABLEACCESSIBLE_HXX
diff --git a/winaccessibility/source/UAccCOM/EnumVariant.cpp b/winaccessibility/source/UAccCOM/EnumVariant.cpp
new file mode 100644
index 000000000000..271b288df42b
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/EnumVariant.cpp
@@ -0,0 +1,227 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "EnumVariant.h"
+#include "MAccessible.h"
+
+#include "act.hxx"
+
+/////////////////////////////////////////////////////////////////////////////
+// CEnumVariant
+
+
+
+/**
+ * enumarate method,get next element
+ * @param cElements The number of elements to be returned.
+ * @param pvar An array of at least size celt in which the elements are to be returned.
+ * @param pcElementFetched Pointer to the number of elements returned in rgVar, or Null
+ * @return Result.
+ */
+HRESULT STDMETHODCALLTYPE CEnumVariant::Next(ULONG cElements,VARIANT __RPC_FAR *pvar,ULONG __RPC_FAR *pcElementFetched)
+{
+ long l1;
+ ULONG l2;
+
+ if (pvar == NULL)
+ return E_INVALIDARG;
+
+ CHECK_ENABLE_INF
+ if (pcElementFetched != NULL)
+ *pcElementFetched = 0;
+
+ // Retrieve the next cElements.
+ for (l1=m_lCurrent, l2=0; l1<m_pXAccessibleSelection->getSelectedAccessibleChildCount() &&
+ l2<cElements; l1++, l2++)
+ {
+ Reference< XAccessible > pRXAcc = m_pXAccessibleSelection->getSelectedAccessibleChild(l1);
+ IAccessible* pChild = NULL;
+ BOOL isGet = CMAccessible::get_IAccessibleFromXAccessible((long)pRXAcc.get(),&pChild);
+ if(isGet)
+ {
+ pvar[l2].vt = VT_I4;
+ ((IMAccessible*)pChild)->Get_XAccChildID(&pvar[l2].lVal);
+ }
+ else if(pRXAcc.is())
+ {
+ if(CMAccessible::g_pAgent)
+ CMAccessible::g_pAgent->InsertAccObj(pRXAcc.get(),pUNOInterface,NULL);
+ BOOL isGet = CMAccessible::get_IAccessibleFromXAccessible((long)pRXAcc.get(),&pChild);
+ if(isGet)
+ {
+ pvar[l2].vt = VT_I4;
+ ((IMAccessible*)pChild)->Get_XAccChildID(&pvar[l2].lVal);
+ }
+ }
+ }
+ // Set count of elements retrieved.
+ if (pcElementFetched != NULL)
+ *pcElementFetched = l2;
+ m_lCurrent = l1;
+
+ return (l2 < cElements) ? S_FALSE : NOERROR;
+}
+
+/**
+ * skip the elements in the given range when enumarate elements
+ * @param cElements The number of elements to skip.
+ * @return Result.
+ */
+HRESULT STDMETHODCALLTYPE CEnumVariant::Skip(ULONG cElements)
+{
+ CHECK_ENABLE_INF
+ m_lCurrent += cElements;
+ if (m_lCurrent > (long)(m_lLBound+m_pXAccessibleSelection->getSelectedAccessibleChildCount()))
+ {
+ m_lCurrent = m_lLBound+m_pXAccessibleSelection->getSelectedAccessibleChildCount();
+ return E_FAIL;
+ }
+ else
+ return NOERROR;
+}
+
+
+/**
+ * reset the enumaration position to initial value
+ * @param
+ * @return Result.
+ */
+HRESULT STDMETHODCALLTYPE CEnumVariant::Reset( void)
+{
+ m_lCurrent = m_lLBound;
+ return NOERROR;
+}
+
+
+/**
+ *create a new IEnumVariant object,
+ *copy current enumaration container and its state to
+ *the new object
+ *AT will use the copy object to get elements
+ * @param ppenum On return, pointer to the location of the clone enumerator
+ * @return Result.
+ */
+HRESULT STDMETHODCALLTYPE CEnumVariant::Clone(IEnumVARIANT __RPC_FAR *__RPC_FAR *ppenum)
+{
+ CEnumVariant * penum = NULL;
+ HRESULT hr;
+ if (ppenum == NULL)
+ return E_INVALIDARG;
+
+ *ppenum = NULL;
+
+ hr = Create(&penum);
+ if( hr == S_OK )
+ {
+ penum->PutSelection((long)pUNOInterface);
+ *ppenum = penum;
+ }
+ else
+ {
+ if (penum)
+ penum->Release();
+ }
+ return hr;
+}
+
+/**
+ *Static public method to create a CLSID_EnumVariant com object.
+ * @param ppenum Pointer to accept com object.
+ * @return Result.
+ */
+HRESULT STDMETHODCALLTYPE CEnumVariant::Create(CEnumVariant __RPC_FAR *__RPC_FAR *ppenum)
+{
+ ActivateActContext();
+ HRESULT hr = CoCreateInstance(CLSID_EnumVariant,NULL,
+ CLSCTX_SERVER,IID_IEnumVariant,(void **)ppenum);
+ DeactivateActContext();
+ if (S_OK != hr)
+ {
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
+/**
+ *Return count of elements in current container
+ * @param.
+ * @return count of elements in current container.
+ */
+long CEnumVariant::GetCountOfElements()
+{
+ CHECK_ENABLE_INF_ZERO
+
+ if(m_pXAccessibleSelection.is())
+ return m_pXAccessibleSelection->getSelectedAccessibleChildCount();
+ return 0;
+}
+
+/**
+ * Set memeber m_pXAccessibleSelection to NULL and m_lCurrent to m_lLBound.
+ * @param.
+ * @return Result
+ */
+STDMETHODIMP CEnumVariant::ClearEnumeration()
+{
+ pUNOInterface = NULL;
+ m_pXAccessibleSelection = NULL;
+ m_lCurrent = m_lLBound;
+ return S_OK;
+}
+
+/**
+ *Static method to fetch XAccessibleSelection
+ * @param pXAcc XAccessible interface.
+ * @return XAccessibleSelection interface.
+ */
+static Reference<XAccessibleSelection> GetXAccessibleSelection(XAccessible* pXAcc)
+{
+ XAccessibleSelection* pSelection = NULL;
+ Reference< XAccessibleContext > pRContext;
+
+ if( pXAcc == NULL)
+ return NULL;
+
+ pRContext = pXAcc->getAccessibleContext();
+ if( !pRContext.is() )
+ return NULL;
+
+ Reference< XAccessibleSelection > pRSelection(pRContext,UNO_QUERY);
+ if( !pRSelection.is() )
+ return NULL;
+
+ return pRSelection;
+}
+
+/**
+ * Put valid UNO XAccessible interface.
+ * @param pXSelection XAccessible interface.
+ * @return Result..
+ */
+STDMETHODIMP CEnumVariant::PutSelection(long pXSelection)
+{
+ pUNOInterface = (XAccessible*)pXSelection;
+ m_pXAccessibleSelection = GetXAccessibleSelection(pUNOInterface);
+ return S_OK;
+}
diff --git a/winaccessibility/source/UAccCOM/EnumVariant.h b/winaccessibility/source/UAccCOM/EnumVariant.h
new file mode 100644
index 000000000000..1089abdf6415
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/EnumVariant.h
@@ -0,0 +1,106 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ENUMVARIANT_H_
+#define __ENUMVARIANT_H_
+
+#define WNT
+
+#include "resource.h" // main symbols
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include "UAccCOM2.h"
+#include <AccObjectManagerAgent.hxx>
+
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+
+#include <vector>
+#include <algorithm>
+using namespace std;
+
+/**
+ * CEnumVariant implements IEnumVARIANT interface.
+ */
+class ATL_NO_VTABLE CEnumVariant :
+ public CComObjectRootEx<CComMultiThreadModel>,
+ public CComCoClass<CEnumVariant, &CLSID_EnumVariant>,
+ public IDispatchImpl<IEnumVariant, &IID_IEnumVariant, &LIBID_UACCCOMLib>
+{
+public:
+ CEnumVariant()
+ :m_lLBound(0),
+ pUNOInterface(NULL),
+ m_pXAccessibleSelection(NULL)
+ {
+ m_lCurrent = m_lLBound;
+ }
+
+ virtual ~CEnumVariant() {};
+
+ DECLARE_REGISTRY_RESOURCEID(IDR_ENUMVARIANT)
+
+ DECLARE_PROTECT_FINAL_CONSTRUCT()
+
+ BEGIN_COM_MAP(CEnumVariant)
+ COM_INTERFACE_ENTRY(IEnumVariant)
+ COM_INTERFACE_ENTRY(IEnumVARIANT)
+ END_COM_MAP()
+
+ // IEnumVariant
+public:
+
+ STDMETHOD(ClearEnumeration)();
+
+ // IEnumVARIANT
+
+ //
+ HRESULT STDMETHODCALLTYPE Next(ULONG cElements,VARIANT __RPC_FAR *pvar,ULONG __RPC_FAR *pcElementFetched);
+
+ //
+ HRESULT STDMETHODCALLTYPE Skip(ULONG cElements);
+
+ //
+ HRESULT STDMETHODCALLTYPE Reset( void);
+
+ //
+ HRESULT STDMETHODCALLTYPE Clone(IEnumVARIANT __RPC_FAR *__RPC_FAR *ppenum);
+
+ // IEnumVariant
+
+ //
+ HRESULT STDMETHODCALLTYPE PutSelection(long pXSelection);
+
+ //
+ static HRESULT STDMETHODCALLTYPE Create(CEnumVariant __RPC_FAR *__RPC_FAR *ppenum);
+
+ //
+ long GetCountOfElements();
+
+private:
+
+ long m_lCurrent;
+ long m_lLBound;
+ XAccessible* pUNOInterface; // XAccessible.
+ Reference<XAccessibleSelection> m_pXAccessibleSelection; // Selection.
+};
+
+#endif //__ENUMVARIANT_H_
diff --git a/winaccessibility/source/UAccCOM/EnumVariant.rgs b/winaccessibility/source/UAccCOM/EnumVariant.rgs
new file mode 100644
index 000000000000..c5decdc4728f
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/EnumVariant.rgs
@@ -0,0 +1,26 @@
+HKCR
+{
+ UAccCOM.EnumVariant.1 = s 'EnumVariant Class'
+ {
+ CLSID = s '{152884E0-268B-4481-9AE7-1B372D3AA97F}'
+ }
+ UAccCOM.EnumVariant = s 'EnumVariant Class'
+ {
+ CLSID = s '{152884E0-268B-4481-9AE7-1B372D3AA97F}'
+ CurVer = s 'UAccCOM.EnumVariant.1'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {152884E0-268B-4481-9AE7-1B372D3AA97F} = s 'EnumVariant Class'
+ {
+ ProgID = s 'UAccCOM.EnumVariant.1'
+ VersionIndependentProgID = s 'UAccCOM.EnumVariant'
+ ForceRemove 'Programmable'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'Both'
+ }
+ 'TypeLib' = s '{19ECB1B0-9376-4FF9-B580-223FC9C200B8}'
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cpp b/winaccessibility/source/UAccCOM/MAccessible.cpp
new file mode 100644
index 000000000000..155c3afe70d8
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/MAccessible.cpp
@@ -0,0 +1,3267 @@
+/**************************************************************
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*************************************************************/
+
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "MAccessible.h"
+
+#include <algorithm>
+#include "AccAction.h"
+
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
+#include <com/sun/star/accessibility/XAccessibleImage.hpp>
+#include <com/sun/star/accessibility/XAccessibleTable.hpp>
+#include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+#include <com/sun/star/accessibility/XAccessibleKeyBinding.hpp>
+#include <com/sun/star/accessibility/XAccessibleHyperText.hpp>
+#include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
+#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleGroupPosition.hpp>
+#include <com/sun/star/accessibility/XAccessibleValue.hpp>
+#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
+#include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/style/TabStop.hpp>
+#include <com/sun/star/container/XIndexReplace.hpp>
+
+#include "act.hxx"
+
+using namespace com::sun::star::accessibility::AccessibleStateType;
+
+// IA2 states mapping, and name
+// maintenance the consistency, change one array, change the three all
+long IA2_STATES[] =
+{
+ IA2_STATE_ACTIVE, // = 0x1;
+ IA2_STATE_ARMED, // = 0x2;
+ IA2_STATE_DEFUNCT, // = 0x4;
+ IA2_STATE_EDITABLE, // = 0x8;
+ IA2_STATE_HORIZONTAL, // = 0x10;
+ IA2_STATE_ICONIFIED, // = 0x20;
+ IA2_STATE_INVALID_ENTRY, // = 0x80;
+ IA2_STATE_MANAGES_DESCENDANTS, // = 0x100;
+ IA2_STATE_MODAL, // = 0x200;
+ IA2_STATE_MULTI_LINE, // = 0x400;
+ IA2_STATE_OPAQUE, // = 0x800;
+ IA2_STATE_REQUIRED, // = 0x2000;
+ IA2_STATE_SELECTABLE_TEXT, // = 0x3000;
+ IA2_STATE_SINGLE_LINE, // = 0x4000;
+ IA2_STATE_STALE, // = 0x8000;
+ IA2_STATE_SUPPORTS_AUTOCOMPLETION, // = 0x10000;
+ IA2_STATE_TRANSIENT, //= 0x20000;
+ IA2_STATE_VERTICAL // = 0x40000;
+};
+/*
+
+<=== map ===>
+
+*/
+short UNO_STATES[] =
+{
+ ACTIVE, // = (sal_Int16)1;
+ ARMED, // = (sal_Int16)2;
+ DEFUNC, // = (sal_Int16)5;
+ EDITABLE, // = (sal_Int16)6;
+ HORIZONTAL, // = (sal_Int16)12;
+ ICONIFIED, // = (sal_Int16)13;
+ -1, //IA2_STATE_INVALID_ENTRY
+ MANAGES_DESCENDANTS, // = (sal_Int16)15;
+ MODAL, // = (sal_Int16)16;
+ MULTI_LINE, // = (sal_Int16)17;
+ OPAQUE, // = (sal_Int16)19;
+ -1, //IA2_STATE_REQUIRED
+ -1, //IA2_STATE_SELECTABLE_TEXT
+ SINGLE_LINE, // = (sal_Int16)26;
+ STALE, // = (sal_Int16)27;
+ -1, //IA2_STATE_SUPPORTS_AUTOCOMPLETION
+ TRANSIENT, //IA2_STATE_TRANSIENT
+ VERTICAL // = (sal_Int16)29;
+};
+
+// <=== map ===>
+
+BSTR IA2_STATES_NAME[] =
+{
+ _T("Active"),
+ _T("Armed"),
+ _T("Defunct"),
+ _T("Editable"),
+ _T("Horizontal"),
+ _T("Iconified"),
+ _T("Invalid Entry"),
+ _T("Manages Decendents"),
+ _T("Modal"),
+ _T("Multi Line"),
+ _T("Opaque"),
+ _T("Required"),
+ _T("Selectable Text"),
+ _T("Single Line"),
+ _T("Stale"),
+ _T("Supports Autocompletion"),
+ _T("Transient"),
+ _T("Vertical")
+};
+
+// IA2 states mapping, and name
+// maintenance the consistency. change one, change them all
+
+BSTR UNO_ALL_STATES[] =
+{
+ _T("INVALID"), // INVALID ( 0 )
+ _T("ACTIVE"), // ACTIVE ( 1 )
+ _T("ARMED"), // ARMED ( 2 )
+ _T("BUSY"), // BUSY ( 3 )
+ _T("CHECKED"), // CHECKED ( 4 )
+ _T("DEFUNC"), // DEFUNC ( 5 )
+ _T("EDITABLE"), // EDITABLE ( 6 )
+ _T("ENABLED"), // ENABLED ( 7 )
+ _T("EXPANDABLE"), // EXPANDABLE ( 8 )
+ _T("EXPANDED"), // EXPANDED ( 9 )
+ _T("FOCUSABLE"), // FOCUSABLE ( 10 )
+ _T("FOCUSED"), // FOCUSED ( 11 )
+ _T("HORIZONTAL"), // HORIZONTAL ( 12 )
+ _T("ICONIFIED"), // ICONIFIED ( 13 )
+ _T("INDETERMINATE"), // INDETERMINATE ( 14 )
+ _T("MANAGES_DESCENDANTS"),// MANAGES_DESCENDANTS ( 15 )
+ _T("MODAL"), // MODAL ( 16 )
+ _T("MULTI_LINE"), // MULTI_LINE ( 17 )
+ _T("MULTI_SELECTABLE"), // MULTI_SELECTABLE ( 18 )
+ _T("OPAQUE"), // OPAQUE ( 19 )
+ _T("PRESSED"), // PRESSED ( 20 )
+ _T("RESIZABLE"), // RESIZABLE ( 21 )
+ _T("SELECTABLE"), // SELECTABLE ( 22 )
+ _T("SELECTED"), // SELECTED ( 23 )
+ _T("SENSITIVE"), // SENSITIVE ( 24 )
+ _T("SHOWING"), // SHOWING ( 25 )
+ _T("SINGLE_LINE"), // SINGLE_LINE ( 26 )
+ _T("STALE"), // STALE ( 27 )
+ _T("TRANSIENT"), // TRANSIENT ( 28 )
+ _T("VERTICAL"), // VERTICAL ( 29 )
+ _T("VISIBLE"), // VISIBLE ( 30 )
+ _T("MOVEABLE"), // MOVEABLE ( 31 )
+ _T("OFFSCREEN"), // OFFSCREEN ( 32 )
+ _T("COLLAPSE"), // COLLAPSE ( 33 )
+ _T("DEFAULT") // DEFAULT ( 34 )
+};
+
+
+using namespace com::sun::star::accessibility::AccessibleRole;
+
+
+
+#define QUERYXINTERFACE(ainterface) \
+{ \
+ if(pXAcc == NULL) \
+ return FALSE; \
+ pRContext = pXAcc->getAccessibleContext(); \
+ if( !pRContext.is() ) \
+{ \
+ return FALSE; \
+} \
+ Reference<X##ainterface> pRXI(pRContext,UNO_QUERY);\
+ if( !pRXI.is() ) \
+{ \
+ return FALSE; \
+} \
+ *ppXI = (XInterface*)pRXI.get(); \
+ return TRUE; \
+}
+
+#define ISDESTROY() \
+ if(m_isDestroy) \
+ return S_FALSE;
+
+
+AccObjectManagerAgent* CMAccessible::g_pAgent = NULL;
+
+CMAccessible::CMAccessible():
+m_iRole(0x00),
+m_dState(0x00),
+m_dChildID(0x00),
+m_dFocusChildID(UACC_NO_FOCUS),
+m_hwnd(NULL),
+m_pIParent(NULL),
+m_pszName(NULL),
+m_pszValue(NULL),
+m_pszDescription(NULL),
+m_isDestroy(FALSE),
+m_pszActionDescription(NULL),
+m_pXAction(NULL),
+m_bRequiresSave(FALSE),
+pUNOInterface(NULL)
+{
+ m_sLocation.m_dLeft=0;
+ m_sLocation.m_dTop = 0;
+ m_sLocation.m_dWidth=0;
+ m_sLocation.m_dHeight=0;
+ CEnumVariant::Create(&m_pEnumVar);
+}
+
+CMAccessible::~CMAccessible()
+{
+ if(m_pszName!=NULL)
+ {
+ SAFE_SYSFREESTRING(m_pszName);
+ m_pszName=NULL;
+ }
+ if(m_pszValue!=NULL)
+ {
+ SAFE_SYSFREESTRING(m_pszValue);
+ m_pszValue=NULL;
+ }
+ if(m_pszDescription!=NULL)
+ {
+ SAFE_SYSFREESTRING(m_pszDescription);
+ m_pszDescription=NULL;
+ }
+
+ if(m_pszActionDescription!=NULL)
+ {
+ SAFE_SYSFREESTRING(m_pszActionDescription);
+ m_pszActionDescription=NULL;
+ }
+
+ if(m_pIParent)
+ {
+ m_pIParent->Release();
+ m_pIParent=NULL;
+ }
+ pRef = NULL;
+ m_pEnumVar->Release();
+ m_containedObjects.clear();
+ pRContext = NULL;
+}
+
+/**
+* Returns the Parent IAccessible interface pointer to AT.
+* It should add reference, and the client should release the component.
+* It should return E_FAIL when the parent point is null.
+* @param ppdispParent [in,out] used to return the parent interface point.
+* when the point is null, should return null.
+* @return S_OK if successful and E_FAIL if the m_pIParent is NULL.
+*/
+STDMETHODIMP CMAccessible::get_accParent(IDispatch **ppdispParent)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(ppdispParent == NULL)
+ {
+ return E_INVALIDARG;
+ }
+
+ if(m_pIParent)
+ {
+ *ppdispParent = m_pIParent;
+ (*ppdispParent)->AddRef();
+ return S_OK;
+ }
+ else if(m_hwnd)
+ {
+ HRESULT hr = AccessibleObjectFromWindow(m_hwnd, OBJID_WINDOW, IID_IAccessible, (void**)ppdispParent);
+ if( ! SUCCEEDED( hr ) || ! ppdispParent )
+ {
+ return S_FALSE;
+ }
+ return S_OK;
+ }
+ return S_FALSE;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Returns child count of current COM object.
+* @param pcountChildren [in,out] used to return the children count.
+* @return S_OK if successful.
+*/
+STDMETHODIMP CMAccessible::get_accChildCount(long *pcountChildren)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pcountChildren == NULL)
+ {
+ return E_INVALIDARG;
+ }
+
+ if(!pUNOInterface)
+ return S_FALSE;
+
+ Reference< XAccessibleContext > pRContext = pUNOInterface->getAccessibleContext();
+ if( pRContext.is() )
+ {
+ *pcountChildren = pRContext->getAccessibleChildCount();
+ }
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Returns child interface pointer for AT according to input child ID.
+* @param varChild, vt member of varChild must be VT_I4,and lVal member stores the child ID,
+* the child ID specify child index from 0 to children count, 0 stands for object self.
+* @param ppdispChild, [in,out] use to return the child interface point.
+* @return S_OK if successful and S_FALSE if failure.
+*/
+STDMETHODIMP CMAccessible::get_accChild(VARIANT varChild, IDispatch **ppdispChild)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(ppdispChild == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ if(varChild.vt==VT_I4)
+ {
+ //get child interface pointer due to child ID
+ if(varChild.lVal==CHILDID_SELF)
+ {
+ AddRef();
+ *ppdispChild = this;
+ return S_OK;
+ }
+ *ppdispChild = GetChildInterface(varChild.lVal);
+ (*ppdispChild)->AddRef();
+ return (*ppdispChild)?S_OK:S_FALSE;
+ }
+ return S_FALSE;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Returns the accessible name of the current COM object self or its one child to AT.
+* @param varChild, vt member of varChild must be VT_I4,and lVal member stores the child ID,
+* the child ID specify child index from 0 to children count, 0 stands for object self.
+* @param pszName, [in,out] use to return the name of the proper object.
+* @return S_OK if successful and S_FALSE if failure.
+*/
+STDMETHODIMP CMAccessible::get_accName(VARIANT varChild, BSTR *pszName)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pszName == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ if(varChild.vt==VT_I4)
+ {
+ if(varChild.lVal==CHILDID_SELF)
+ {
+ SAFE_SYSFREESTRING(*pszName);
+ *pszName = SysAllocString(m_pszName);
+ return S_OK;
+ }
+
+ long lVal = varChild.lVal;
+ varChild.lVal = CHILDID_SELF;
+ IMAccessible *pChild = this->GetChildInterface(lVal);
+ if(!pChild)
+ return E_FAIL;
+ return pChild->get_accName(varChild,pszName);
+ }
+ return S_FALSE;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Returns the accessible value of the current COM object self or its one child to AT.
+* @param varChild, vt member of varChild must be VT_I4,and lVal member stores the child ID,
+* the child ID specify child index from 0 to children count, 0 stands for object self.
+* @param pszValue, [in,out] use to return the value of the proper object.
+* @return S_OK if successful and S_FALSE if failure.
+*/
+STDMETHODIMP CMAccessible::get_accValue(VARIANT varChild, BSTR *pszValue)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if( pszValue == NULL )
+ {
+ return E_INVALIDARG;
+ }
+ if( varChild.vt==VT_I4 )
+ {
+ if(varChild.lVal==CHILDID_SELF)
+ {
+ if(m_dState & STATE_SYSTEM_PROTECTED)
+ return E_ACCESSDENIED;
+
+ if ( m_pszValue !=NULL && wcslen(m_pszValue) == 0 )
+ return S_OK;
+
+ SAFE_SYSFREESTRING(*pszValue);
+ *pszValue = SysAllocString(m_pszValue);
+ return S_OK;
+ }
+
+ long lVal = varChild.lVal;
+ varChild.lVal = CHILDID_SELF;
+ IMAccessible *pChild = this->GetChildInterface(lVal);
+ if(!pChild)
+ return E_FAIL;
+ return pChild->get_accValue(varChild,pszValue);
+ }
+ return S_FALSE;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Returns the accessible description of the current COM object self or its one child to AT.
+* @param varChild, vt member of varChild must be VT_I4,and lVal member stores the child ID,
+* the child ID specify child index from 0 to children count, 0 stands for object self.
+* @param pszDescription, [in,out] use to return the description of the proper object.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::get_accDescription(VARIANT varChild, BSTR *pszDescription)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pszDescription == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ if(varChild.vt==VT_I4)
+ {
+ if(varChild.lVal==CHILDID_SELF)
+ {
+ SAFE_SYSFREESTRING(*pszDescription);
+ *pszDescription = SysAllocString(m_pszDescription);
+ return S_OK;
+ }
+
+ long lVal = varChild.lVal;
+ varChild.lVal = CHILDID_SELF;
+ IMAccessible *pChild = this->GetChildInterface(lVal);
+ if(!pChild)
+ return E_FAIL;
+ return pChild->get_accDescription(varChild,pszDescription);
+ }
+ return S_FALSE;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Returns the accessible role of the current COM object self or its one child to AT.
+* @param varChild, vt member of varChild must be VT_I4,and lVal member stores the child ID,
+* the child ID specify child index from 0 to children count, 0 stands for object self.
+* @param pvarRole, [in,out] use to return the role of the proper object.
+* @return S_OK if successful and S_FALSE if failure.
+*/
+STDMETHODIMP CMAccessible::get_accRole(VARIANT varChild, VARIANT *pvarRole)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pvarRole == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ if(varChild.vt == VT_I4)
+ {
+
+ if(varChild.lVal == CHILDID_SELF)
+ {
+ if( m_iRole < IA2_ROLE_CAPTION )
+ {
+ VariantInit(pvarRole);
+ pvarRole->vt = VT_I4;
+ pvarRole->lVal = m_iRole;
+ }
+ else
+ {
+ VariantInit(pvarRole);
+ pvarRole->vt = VT_I4;
+ pvarRole->lVal = ROLE_SYSTEM_CLIENT;
+ }
+ return S_OK;
+ }
+
+
+ long lVal = varChild.lVal;
+ varChild.lVal = CHILDID_SELF;
+ IMAccessible *pChild = this->GetChildInterface(lVal);
+ if(!pChild)
+ return E_FAIL;
+ return pChild->get_accRole(varChild,pvarRole);
+ }
+ return S_FALSE;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Returns the accessible state of the current COM object self or its one child to AT.
+* @param varChild, vt member of varChild must be VT_I4,and lVal member stores the child ID,
+* the child ID specify child index from 0 to children count, 0 stands for object self.
+* @param pvarState, [in,out] use to return the state of the proper object.
+* @return S_OK if successful and S_FALSE if failure.
+*/
+STDMETHODIMP CMAccessible::get_accState(VARIANT varChild, VARIANT *pvarState)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pvarState == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ if(varChild.vt==VT_I4)
+ {
+ if(varChild.lVal == CHILDID_SELF)
+ {
+ if(pUNOInterface)
+ {
+ Reference< XAccessibleContext > pContext = pUNOInterface->getAccessibleContext();
+ if(pContext.is())
+ {
+ // add the STATE_SYSTEM_LINKED state
+ Reference< XAccessibleHypertext > pRHypertext(pContext,UNO_QUERY);
+ if(pRHypertext.is())
+ {
+ if( pRHypertext->getHyperLinkCount() > 0 )
+ m_dState |= STATE_SYSTEM_LINKED;
+ else
+ m_dState &= ~STATE_SYSTEM_LINKED;
+ }
+ else
+ m_dState &= ~STATE_SYSTEM_LINKED;
+ }
+ }
+
+ VariantInit(pvarState);
+ pvarState->vt = VT_I4;
+ pvarState->lVal = m_dState;
+ return S_OK;
+ }
+
+ long lVal = varChild.lVal;
+ varChild.lVal = CHILDID_SELF;
+ IMAccessible *pChild = this->GetChildInterface(lVal);
+ if(!pChild)
+ return E_FAIL;
+ return pChild->get_accState(varChild,pvarState);
+ }
+ return S_FALSE;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Returns the accessible helpString of the current COM object self or its one child to AT.
+* @param varChild, vt member of varChild must be VT_I4,and lVal member stores the child ID,
+* the child ID specify child index from 0 to children count, 0 stands for object self.
+* @param pszHelp, [in,out] use to return the helpString of the proper object.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::get_accHelp(VARIANT, BSTR *)
+{
+ return E_NOTIMPL;
+}
+
+/**
+* Returns the accessible HelpTopic of the current COM object self or its one child to AT.
+* @param varChild, vt member of varChild must be VT_I4,and lVal member stores the child ID,
+* the child ID specify child index from 0 to children count, 0 stands for object self.
+* @param pszHelpFile, [in,out] use to return the HelpTopic of the proper object.
+* @param pidTopic, use to return the HelpTopic ID of the proper object.
+* @return S_OK if successful and E_FAIL if failure.
+* Not implemented yet
+*/
+STDMETHODIMP CMAccessible::get_accHelpTopic(BSTR *, VARIANT, long *)
+{
+ return E_NOTIMPL;
+}
+
+static void GetMnemonicChar( const ::rtl::OUString& aStr, WCHAR* wStr)
+{
+ int nLen = aStr.pData->length;
+ int i = 0;
+ WCHAR* text = aStr.pData->buffer;
+
+ while ( i < nLen )
+ {
+ if ( text[i] == L'~' )
+ if ( text[i+1] != L'~' )
+ {
+ wStr[0] = text[i+1];
+ break;
+ }
+ i++;
+ }
+}
+
+/**
+* Returns the accessible keyboard shortcut of the current COM object self or its one child to AT.
+* @param varChild, vt member of varChild must be VT_I4,and lVal member stores the child ID,
+* the child ID specify child index from 0 to children count, 0 stands for object self.
+* @param pszKeyboardShortcut, [in,out] use to return the kbshortcut of the proper object.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::get_accKeyboardShortcut(VARIANT varChild, BSTR *pszKeyboardShortcut)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+
+ ISDESTROY()
+ // #CHECK#
+ if(pszKeyboardShortcut == NULL)
+ {
+ return E_INVALIDARG;
+ }
+
+ if(varChild.vt==VT_I4)
+ {
+ if(varChild.lVal == CHILDID_SELF)
+ {
+ if( pUNOInterface )
+ {
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+ if( !pRContext.is() )
+ return S_FALSE;
+
+ Reference<XAccessibleAction> pRXI(pRContext,UNO_QUERY);
+
+ OLECHAR wString[64]={0};
+
+ if( pRXI.is() && pRXI->getAccessibleActionCount() >= 1)
+ {
+ Reference< XAccessibleKeyBinding > binding = pRXI->getAccessibleActionKeyBinding(0);
+ if( binding.is() )
+ {
+ long nCount = binding->getAccessibleKeyBindingCount();
+ if(nCount >= 1)
+ {
+ CAccAction::GetkeyBindingStrByXkeyBinding( binding->getAccessibleKeyBinding(0),wString );
+ }
+ }
+ }
+ if(wString[0] == 0)
+ {
+ Reference<XAccessibleRelationSet> pRrelationSet = pRContext->getAccessibleRelationSet();
+ if(!pRrelationSet.is())
+ {
+ return S_FALSE;
+ }
+
+ long nRelCount = pRrelationSet->getRelationCount();
+
+ // Modified by Steve Yin, for SODC_1552
+ if( /*nRelCount <= 0 &&*/ m_iRole == ROLE_SYSTEM_TEXT )
+ {
+ VARIANT varParentRole;
+ VariantInit( &varParentRole );
+
+ m_pIParent->get_accRole(varChild, &varParentRole);
+
+ if( m_pIParent && varParentRole.lVal == ROLE_SYSTEM_COMBOBOX ) // edit in comoboBox
+ {
+ m_pIParent->get_accKeyboardShortcut(varChild, pszKeyboardShortcut);
+ return S_OK;
+ }
+ }
+
+ AccessibleRelation *paccRelation = NULL;
+ AccessibleRelation accRelation;
+ for(int i=0; i<nRelCount ; i++)
+ {
+ if( pRrelationSet->getRelation(i).RelationType == 6 )
+ {
+ accRelation = pRrelationSet->getRelation(i);
+ paccRelation = &accRelation;
+ }
+ }
+
+ if(paccRelation == NULL)
+ return S_FALSE;
+
+ Sequence< Reference< XInterface > > xTargets = paccRelation->TargetSet;
+ Reference<XInterface> pRAcc = xTargets[0];
+
+ XAccessible* pXAcc = (XAccessible*)pRAcc.get();
+
+ Reference<XAccessibleContext> pRLebelContext = pXAcc->getAccessibleContext();
+ if(!pRLebelContext.is())
+ return S_FALSE;
+
+ pRrelationSet = pRLebelContext->getAccessibleRelationSet();
+ nRelCount = pRrelationSet->getRelationCount();
+
+ paccRelation = NULL;
+ for(int j=0; j<nRelCount ; j++)
+ {
+ if( pRrelationSet->getRelation(j).RelationType == 5 )
+ {
+ accRelation = pRrelationSet->getRelation(j);
+ paccRelation = &accRelation;
+ }
+ }
+
+ if(paccRelation)
+ {
+ xTargets = paccRelation->TargetSet;
+ pRAcc = xTargets[0];
+ if(pUNOInterface != (XAccessible*)pRAcc.get())
+ return S_FALSE;
+ }
+
+ Reference<XAccessibleExtendedComponent> pRXIE(pRLebelContext,UNO_QUERY);
+ if(!pRXIE.is())
+ return S_FALSE;
+
+ ::rtl::OUString ouStr = pRXIE->getTitledBorderText();
+ WCHAR key[2] = {NULL};
+ GetMnemonicChar(ouStr, key);
+ if(key[0] != 0)
+ {
+ wcscat(wString, L"Alt+");
+ wcscat(wString, key);
+ }
+ else
+ return S_FALSE;
+ }
+
+ SAFE_SYSFREESTRING(*pszKeyboardShortcut);
+ *pszKeyboardShortcut = SysAllocString(wString);
+
+ return S_OK;
+ }
+ else
+ {
+ return S_FALSE;
+ }
+ }
+
+ long lVal = varChild.lVal;
+ varChild.lVal = CHILDID_SELF;
+ IMAccessible *pChild = this->GetChildInterface(lVal);
+ if(!pChild)
+ return E_FAIL;
+
+ return pChild->get_accKeyboardShortcut(varChild,pszKeyboardShortcut);
+ }
+ return S_FALSE;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Returns the current focused child to AT.
+* @param pvarChild, [in,out] vt member of pvarChild must be VT_I4,and lVal member stores the child ID,
+* the child ID specify child index from 0 to children count, 0 stands for object self.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::get_accFocus(VARIANT *pvarChild)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pvarChild == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ if( m_dFocusChildID==UACC_NO_FOCUS )
+ {
+ pvarChild->vt = VT_EMPTY;//no focus on the object and its children
+ return S_OK;
+ }
+ //if the descendant of current object has focus indicated by m_dFocusChildID, return the IDispatch of this focused object
+ else
+ {
+ IMAccessible* pIMAcc = NULL;
+ g_pAgent->GetIAccessibleFromResID(m_dFocusChildID,&pIMAcc);
+ pIMAcc->AddRef();
+ pvarChild->vt = VT_DISPATCH;
+ pvarChild->pdispVal = pIMAcc;
+
+ }
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Returns the selection of the current COM object to AT.
+* @param pvarChildren,[in,out]
+* if selection num is 0,return VT_EMPTY for vt,
+* if selection num is 1,return VT_I4 for vt,and child index for lVal
+* if selection num >1,return VT_UNKNOWN for vt, and IEnumVariant* for punkVal
+* @return S_OK if successful and S_FALSE if failure.
+*/
+STDMETHODIMP CMAccessible::get_accSelection(VARIANT *pvarChildren)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pvarChildren == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ switch(m_pEnumVar->GetCountOfElements())
+ {
+ case 0:
+ pvarChildren->vt = VT_EMPTY;
+ break;
+ case 1:
+ VARIANT varTmp[1];
+ ULONG count;
+ VariantInit(&varTmp[0]);
+ m_pEnumVar->Next(1,varTmp,&count);
+ if(count!=1)
+ return S_FALSE;
+ pvarChildren->vt = VT_I4;
+ pvarChildren->lVal = varTmp[0].lVal;
+ VariantClear(&varTmp[0]);
+ m_pEnumVar->Reset();
+ break;
+ default:
+ pvarChildren->vt = VT_UNKNOWN;
+ m_pEnumVar->AddRef();
+ pvarChildren->punkVal = m_pEnumVar;
+ break;
+ }
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Returns the location of the current COM object self or its one child to AT.
+* @param varChild, vt member of varChild must be VT_I4,and lVal member stores the child ID,
+* the child ID specify child index from 0 to children count, 0 stands for object self.
+* @param pxLeft, [in,out] use to return the x-coordination of the proper object.
+* @param pyTop, [in,out] use to return the y-coordination of the proper object.
+* @param pcxWidth, [in,out] use to return the x-coordination width of the proper object.
+* @param pcyHeight, [in,out] use to return the y-coordination height of the proper object.
+* @return S_OK if successful and S_FALSE if failure.
+*/
+STDMETHODIMP CMAccessible::accLocation(long *pxLeft, long *pyTop, long *pcxWidth, long *pcyHeight, VARIANT varChild)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pxLeft == NULL || pyTop == NULL || pcxWidth == NULL || pcyHeight == NULL)
+ {
+ return E_INVALIDARG;
+ }
+
+ if(varChild.vt==VT_I4)
+ {
+ if(varChild.lVal==CHILDID_SELF)
+ {
+
+ if(pUNOInterface)
+ {
+ Reference< XAccessibleContext > pRContext = pUNOInterface->getAccessibleContext();
+ if( !pRContext.is() )
+ return S_FALSE;
+ Reference< XAccessibleComponent > pRComponent(pRContext,UNO_QUERY);
+ if( !pRComponent.is() )
+ return S_FALSE;
+
+ ::com::sun::star::awt::Point pCPoint = pRComponent->getLocationOnScreen();
+ ::com::sun::star::awt::Size pCSize = pRComponent->getSize();
+ *pxLeft = pCPoint.X;
+ *pyTop = pCPoint.Y;
+ *pcxWidth = pCSize.Width;
+ *pcyHeight = pCSize.Height;
+ return S_OK;
+ }
+ else
+ {
+ *pxLeft = m_sLocation.m_dLeft;
+ *pyTop = m_sLocation.m_dTop;
+ *pcxWidth = m_sLocation.m_dWidth;
+ *pcyHeight = m_sLocation.m_dHeight;
+ return S_OK;
+ }
+ }
+
+ }
+ return S_FALSE;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Returns the current focused child to AT.
+* @param navDir, the direction flag of the navigation.
+* @param varStart, the start child id of this navigation action.
+* @param pvarEndUpAt, [in,out] the end up child of this navigation action.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::accNavigate(long navDir, VARIANT varStart, VARIANT *pvarEndUpAt)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pvarEndUpAt == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ HRESULT ret = E_FAIL;
+ switch (navDir)
+ {
+ case NAVDIR_FIRSTCHILD:
+ ret = GetFirstChild(varStart,pvarEndUpAt);
+ break;
+ case NAVDIR_LASTCHILD:
+ ret = GetLastChild(varStart,pvarEndUpAt);
+ break;
+ case NAVDIR_NEXT:
+ ret = GetNextSibling(varStart,pvarEndUpAt);
+ break;
+ case NAVDIR_PREVIOUS:
+ ret = GetPreSibling(varStart,pvarEndUpAt);
+ break;
+ case NAVDIR_DOWN://do not implement temporarily
+ break;
+ case NAVDIR_UP://do not implement temporarily
+ break;
+ case NAVDIR_LEFT://do not implement temporarily
+ break;
+ case NAVDIR_RIGHT://do not implement temporarily
+ break;
+ default:
+ break;
+ };
+ return ret;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+STDMETHODIMP CMAccessible::accHitTest(long xLeft, long yTop, VARIANT *pvarChild)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pvarChild == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ long x, y, w, h;
+ VARIANT varSelf;
+ VariantInit(&varSelf);
+ varSelf.vt = VT_I4;
+ varSelf.lVal = CHILDID_SELF;
+ accLocation(&x,&y,&w,&h,varSelf);
+ if( (x < xLeft && (x + w) >xLeft) && (y < yTop && (y + h) >yTop) )
+ {
+ int i, nCount;
+ pvarChild->vt = VT_EMPTY;
+ Reference< XAccessibleContext > pRContext = GetContextByXAcc(pUNOInterface);
+ nCount = pRContext->getAccessibleChildCount();
+ if(nCount > 256)
+ return E_FAIL;
+ IMAccessible* child = NULL;
+ for( i = 0; i<nCount; i++)
+ {
+
+ child = GetChildInterface(i + 1);
+ if(child && child->accHitTest(xLeft,yTop,pvarChild) == S_OK)
+ break;
+ }
+
+ if(pvarChild->vt == VT_DISPATCH)
+ return S_OK;
+
+ if( i < nCount)
+ {
+ pvarChild->vt = VT_DISPATCH;
+ pvarChild->pdispVal = child;
+ child->AddRef();
+ }
+ else
+ {
+ pvarChild->vt = VT_I4;
+ pvarChild->lVal = CHILDID_SELF;
+ }
+ return S_OK;
+ }
+ return S_FALSE;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Get The other Interface from CMAccessible.
+* @param guidService, must be IID_IAccessible here.
+* @param riid, the IID interface .
+* @return S_OK if successful and S_FALSE if failure.
+*/
+STDMETHODIMP CMAccessible::QueryService(REFGUID guidService, REFIID riid, void** ppvObject)
+{
+ if( InlineIsEqualGUID(guidService, IID_IAccessible) )
+ return QueryInterface(riid, ppvObject);
+ return S_FALSE;
+}
+
+/**
+* Set the accessible name of the current COM object self or its one child from UNO.
+* @param varChild, vt member of varChild must be VT_I4,and lVal member stores the child ID,
+* the child ID specify child index from 0 to children count, 0 stands for object self.
+* @param szName, the name used to set the name of the proper object.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::put_accName(VARIANT varChild, BSTR szName)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ if(varChild.vt==VT_I4)
+ {
+ if(varChild.lVal==CHILDID_SELF)
+ {
+ SAFE_SYSFREESTRING(m_pszName);
+ m_pszName=SysAllocString(szName);
+ return S_OK;
+ }
+
+ long lVal = varChild.lVal;
+ varChild.lVal = CHILDID_SELF;
+ IMAccessible *pChild = this->GetChildInterface(lVal);
+ if(!pChild)
+ return E_FAIL;
+ return pChild->put_accName(varChild,szName);
+ }
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Set the accessible value of the current COM object self or its one child from UNO.
+* @param varChild, vt member of varChild must be VT_I4,and lVal member stores the child ID,
+* the child ID specify child index from 0 to children count, 0 stands for object self.
+* @param szValue, the value used to set the value of the proper object.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::put_accValue(VARIANT varChild, BSTR szValue)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ if(varChild.vt==VT_I4)
+ {
+ if(varChild.lVal==CHILDID_SELF)
+ {
+ SysAllocString(m_pszValue);
+ m_pszValue=SysAllocString(szValue);
+ return S_OK;
+ }
+
+ long lVal = varChild.lVal;
+ varChild.lVal = CHILDID_SELF;
+ IMAccessible *pChild = this->GetChildInterface(lVal);
+ if(!pChild)
+ return E_FAIL;
+ return pChild->put_accValue(varChild,szValue);
+ }
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Set the accessible name of the current COM object self from UNO.
+* @param pszName, the name value used to set the name of the current object.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::Put_XAccName(const OLECHAR __RPC_FAR *pszName)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pszName == NULL)
+ {
+ return E_INVALIDARG;
+ }
+
+ SAFE_SYSFREESTRING(m_pszName);//??
+ m_pszName = SysAllocString(pszName);
+ if(m_pszName==NULL)
+ return E_FAIL;
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Set the accessible role of the current COM object self from UNO.
+* @param pRole, the role value used to set the role of the current object.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::Put_XAccRole(unsigned short pRole)
+{
+ m_iRole = pRole;
+ return S_OK;
+}
+
+/**
+* Add one state into the current state set for the current COM object from UNO.
+* @param pXSate, the state used to set the name of the current object.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::DecreaseState(DWORD pXSate)
+{
+ m_dState &= (~pXSate);
+ return S_OK;
+}
+
+/**
+* Delete one state into the current state set for the current COM object from UNO.
+* @param pXSate, the state used to set the name of the current object.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::IncreaseState(DWORD pXSate)
+{
+ m_dState |= pXSate;
+ return S_OK;
+}
+
+/**
+* Set state into the current state set for the current COM object from UNO.
+* @param pXSate, the state used to set the name of the current object.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::SetState(DWORD pXSate)
+{
+ m_dState = pXSate;
+ return S_OK;
+}
+
+
+
+/**
+* Set the accessible description of the current COM object self from UNO.
+* @param pszDescription, the name used to set the description of the current object.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::Put_XAccDescription(const OLECHAR __RPC_FAR *pszDescription)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pszDescription == NULL)
+ {
+ return E_INVALIDARG;
+ }
+
+ SAFE_SYSFREESTRING(m_pszDescription);
+ m_pszDescription = SysAllocString(pszDescription);
+
+ if(m_pszDescription==NULL)
+ return E_FAIL;
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Set the accessible value of the current COM object self from UNO.
+* @param pszAccValue, the name used to set the value of the current object.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::Put_XAccValue(const OLECHAR __RPC_FAR *pszAccValue)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pszAccValue == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ SAFE_SYSFREESTRING(m_pszValue);
+ m_pszValue = SysAllocString(pszAccValue);
+ if(m_pszValue==NULL)
+ return E_FAIL;
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Set the HWND value of the current COM object self from UNO. It should set the parent IAccessible
+* Object through the method AccessibleObjectFromWindow(...).
+* @param hwnd, the HWND used to set the value of the current object.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::Put_XAccWindowHandle(HWND hwnd)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ m_hwnd = hwnd;
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Set accessible focus by specifying child ID
+* @param dChildID, the child id identifies the focus child.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::Put_XAccFocus(long dChildID)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+
+ if(dChildID==CHILDID_SELF)
+ {
+ if(m_pIParent)
+ {
+ m_pIParent->Put_XAccFocus(m_dChildID);
+ }
+ }
+ else
+ {
+ m_dFocusChildID = dChildID;
+ //traverse all ancestors to set the focused child ID so that when the get_accFocus is called on
+ //any of the ancestors, this id can be used to get the IAccessible of focused object.
+ if(m_pIParent)
+ {
+ m_pIParent->Put_XAccFocus(dChildID);
+ }
+ }
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+*Set accessible object location for the current COM object
+* @param sLocation, the location of the current object.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::Put_XAccLocation(const Location sLocation)
+{
+
+ this->m_sLocation = sLocation;
+ return S_OK;
+}
+
+/**
+* Set accessible parent object for the current COM object if
+* the current object is a child of some COM object
+* @param pIParent, the parent of the current object.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::Put_XAccParent(IMAccessible __RPC_FAR *pIParent)
+{
+ this->m_pIParent = pIParent;
+
+ if(pIParent)
+ m_pIParent->AddRef();
+
+ return S_OK;
+}
+
+/**
+* Set unique child id to COM
+* @param dChildID, the id of the current object.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::Put_XAccChildID(long dChildID)
+{
+
+ this->m_dChildID = dChildID;
+ return S_OK;
+}
+
+/**
+* Set AccObjectManagerAgent object pointer to COM
+* @param pAgent, the AccObjectManagerAgent point.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::Put_XAccAgent(long pAgent)
+{
+ g_pAgent = (AccObjectManagerAgent*)pAgent;
+ return S_OK;
+}
+
+/**
+* When a UNO control disposing, it disposes its listeners,
+* then notify AccObject in bridge management, then notify
+* COM that the XAccessible is invalid,so set pUNOInterface as NULL
+* @param isDestroy, true is it need to be destroyed.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+STDMETHODIMP CMAccessible::NotifyDestroy(BOOL isDestroy)
+{
+
+ m_isDestroy = isDestroy;
+ pUNOInterface = NULL;
+ return S_OK;
+}
+
+/**
+*private methods that help implement public functions
+*/
+
+/**
+* Return child interface pointer by child ID,note: need to call AddRef()
+* @param lChildID, specify child index,which AT(such as Inspect32) gives.
+* @return IMAccessible*, pointer to the corresponding child object.
+*/
+IMAccessible* CMAccessible::GetChildInterface(long dChildID)//for test
+{
+
+ long dChildIndex = 0;
+ if(dChildID<0)
+ {
+ if(g_pAgent)
+ {
+ IMAccessible* pIMAcc = NULL;
+ g_pAgent->GetIAccessibleFromResID(dChildID,&pIMAcc);
+ return pIMAcc;
+ }
+ return NULL;
+ }
+ else
+ {
+ Reference< XAccessibleContext > pRContext = pUNOInterface->getAccessibleContext();
+ if( !pRContext.is() )
+ return NULL;
+
+ if(dChildID<1 || dChildID>pRContext->getAccessibleChildCount())
+ return NULL;
+
+ IAccessible* pChild = NULL;
+ Reference< XAccessible > pXChild = pRContext->getAccessibleChild(dChildID-1);
+ BOOL isGet = get_IAccessibleFromXAccessible((long)pXChild.get(),&pChild);
+
+ if(!isGet)
+ {
+ g_pAgent->InsertAccObj(pXChild.get(),pUNOInterface,(long)m_hwnd);
+ isGet = get_IAccessibleFromXAccessible((long)pXChild.get(),&pChild);
+ }
+
+ if(isGet)
+ {
+ IMAccessible* pIMAcc = (IMAccessible*)pChild;
+ return pIMAcc;
+ }
+ }
+
+ return NULL;
+}
+
+/**
+* For List, tree and table,these roles belong to manage_decendant in UNO,
+* need to process specifically when navigate
+* @return BOOL, if it is decendantmanager, return true.
+*/
+BOOL CMAccessible::IsDecendantManage()
+{
+
+ return (m_iRole==ROLE_SYSTEM_LIST)||(m_iRole==ROLE_SYSTEM_OUTLINE)||(m_iRole==ROLE_SYSTEM_TABLE);
+}
+
+/**
+* for decendantmanager circumstance,provide child interface when navigate
+* @param varCur, the current child.
+* @param flags, the navigation direction.
+* @return IMAccessible*, the child of the end up node.
+*/
+IMAccessible* CMAccessible::GetNavigateChildForDM(VARIANT varCur, short flags)
+{
+
+ XAccessibleContext* pXContext = GetContextByXAcc(pUNOInterface);
+ if(pXContext==NULL)
+ {
+ return NULL;
+ }
+
+ int count = pXContext->getAccessibleChildCount();
+ if(count<1)
+ {
+ return NULL;
+ }
+
+ IMAccessible* pCurChild = NULL;
+ XAccessible* pChildXAcc = NULL;
+ Reference<XAccessible> pRChildXAcc;
+ XAccessibleContext* pChildContext = NULL;
+ int index = 0,delta=0;
+ switch(flags)
+ {
+ case DM_FIRSTCHILD:
+ pRChildXAcc = pXContext->getAccessibleChild(0);
+ break;
+ case DM_LASTCHILD:
+ pRChildXAcc = pXContext->getAccessibleChild(count-1);
+ break;
+ case DM_NEXTCHILD:
+ case DM_PREVCHILD:
+ pCurChild = GetChildInterface(varCur.lVal);
+ if(pCurChild==NULL)
+ {
+ return NULL;
+ }
+ pCurChild->GetUNOInterface((long*)&pChildXAcc);
+ if(pChildXAcc==NULL)
+ {
+ return NULL;
+ }
+ pChildContext = GetContextByXAcc(pChildXAcc);
+ if(pChildContext == NULL)
+ {
+ return NULL;
+ }
+ delta = (flags==DM_NEXTCHILD)?1:-1;
+ //currently, getAccessibleIndexInParent is error in UNO for
+ //some kind of List,such as ValueSet, the index will be less 1 than
+ //what should be, need to fix UNO code
+ index = pChildContext->getAccessibleIndexInParent()+delta;
+ if((index>=0)&&(index<=count-1))
+ {
+ pRChildXAcc = pXContext->getAccessibleChild(index);
+ }
+ break;
+ default:
+ break;
+ }
+
+ if(!pRChildXAcc.is())
+ {
+ return NULL;
+ }
+ pChildXAcc = pRChildXAcc.get();
+ g_pAgent->InsertAccObj(pChildXAcc,pUNOInterface);
+ return g_pAgent->GetIMAccByXAcc(pChildXAcc);
+}
+
+/**
+*the following 4 private methods are for accNavigate implementation
+*/
+
+/**
+* Return first child for parent container, process differently according
+* to whether it is decendant manage
+* @param varStart, the start child id of this navigation action.
+* @param pvarEndUpAt, [in,out] the end up child of this navigation action.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+HRESULT CMAccessible::GetFirstChild(VARIANT varStart,VARIANT* pvarEndUpAt)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pvarEndUpAt == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ if(varStart.vt != VT_I4)
+ {
+ pvarEndUpAt->vt = VT_EMPTY;
+ return E_INVALIDARG;
+ }
+
+ pvarEndUpAt->pdispVal = GetNavigateChildForDM(varStart, DM_FIRSTCHILD);
+ if(pvarEndUpAt->pdispVal)
+ {
+ pvarEndUpAt->pdispVal->AddRef();
+ pvarEndUpAt->vt = VT_DISPATCH;
+ return S_OK;
+ }
+
+ pvarEndUpAt->vt = VT_EMPTY;
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Return last child for parent container, process differently according
+* to whether it is decendant manage
+* @param varStart, the start child id of this navigation action.
+* @param pvarEndUpAt, [in,out] the end up child of this navigation action.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+HRESULT CMAccessible::GetLastChild(VARIANT varStart,VARIANT* pvarEndUpAt)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pvarEndUpAt == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ if(varStart.vt != VT_I4)
+ {
+ pvarEndUpAt->vt = VT_EMPTY;
+ return E_INVALIDARG;
+ }
+
+ pvarEndUpAt->pdispVal = GetNavigateChildForDM(varStart, DM_LASTCHILD);
+ if(pvarEndUpAt->pdispVal)
+ {
+ pvarEndUpAt->pdispVal->AddRef();
+ pvarEndUpAt->vt = VT_DISPATCH;
+ return S_OK;
+ }
+ pvarEndUpAt->vt = VT_EMPTY;
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* The method GetNextSibling is general, whatever it is decendant manage or not
+* Get the next sibling object.
+* @param varStart, the start child id of this navigation action.
+* @param pvarEndUpAt, [in,out] the end up child of this navigation action.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+HRESULT CMAccessible::GetNextSibling(VARIANT varStart,VARIANT* pvarEndUpAt)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ if(varStart.vt != VT_I4)
+ {
+ pvarEndUpAt->vt = VT_EMPTY;
+ return E_INVALIDARG;
+ }
+
+ Reference< XAccessibleContext > pRContext = GetContextByXAcc(pUNOInterface);
+ if(pRContext.is())
+ {
+ varStart.iVal = sal_Int16(pRContext->getAccessibleIndexInParent() + 2);
+ if(m_pIParent)
+ if( m_pIParent->get_accChild(varStart,&pvarEndUpAt->pdispVal) == S_OK)
+ {
+ pvarEndUpAt->vt = VT_DISPATCH;
+ return S_OK;
+ }
+ }
+ pvarEndUpAt->vt = VT_EMPTY;
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+*the method GetPreSibling is general, whatever it is decendant manage or not
+* @param varStart, the start child id of this navigation action.
+* @param pvarEndUpAt, [in,out] the end up child of this navigation action.
+* @return S_OK if successful and E_FAIL if failure.
+*/
+HRESULT CMAccessible::GetPreSibling(VARIANT varStart,VARIANT* pvarEndUpAt)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pvarEndUpAt == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ if(varStart.vt != VT_I4)
+ {
+ pvarEndUpAt->vt = VT_EMPTY;
+ return E_INVALIDARG;
+ }
+
+ Reference< XAccessibleContext > pRContext = GetContextByXAcc(pUNOInterface);
+ if(pRContext.is())
+ {
+ varStart.iVal = sal_Int16(pRContext->getAccessibleIndexInParent());
+ if(m_pIParent && varStart.iVal > 0)
+ if( m_pIParent->get_accChild(varStart,&pvarEndUpAt->pdispVal) == S_OK)
+ {
+ pvarEndUpAt->vt = VT_DISPATCH;
+ return S_OK;
+ }
+ }
+ pvarEndUpAt->vt = VT_EMPTY;
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* For IAccessible2 implementation methods
+*/
+STDMETHODIMP CMAccessible::get_nRelations( long __RPC_FAR *nRelations)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(nRelations == NULL)
+ {
+ return E_INVALIDARG;
+ }
+
+ *nRelations = 0;
+
+ if( !pRContext.is() )
+ return E_FAIL;
+ Reference<XAccessibleRelationSet> pRrelationSet = pRContext.get()->getAccessibleRelationSet();
+ if(!pRrelationSet.is())
+ {
+ *nRelations = 0;
+ return S_OK;
+ }
+
+ *nRelations = pRrelationSet->getRelationCount();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+STDMETHODIMP CMAccessible::get_relation( long relationIndex, IAccessibleRelation __RPC_FAR *__RPC_FAR *relation)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(relation == NULL)
+ {
+ return E_INVALIDARG;
+ }
+
+ if( !pRContext.is() )
+ return E_FAIL;
+
+
+ long nMax = 0;
+ long nReal = 0;
+ get_nRelations(&nMax);
+
+ *relation = (IAccessibleRelation*)::CoTaskMemAlloc(sizeof(IAccessibleRelation));
+
+ // #CHECK Memory Allocation#
+ if(*relation == NULL)
+ {
+ return E_FAIL;
+ }
+
+ if( relationIndex < nMax )
+ {
+
+
+ Reference<XAccessibleRelationSet> pRrelationSet = pRContext.get()->getAccessibleRelationSet();
+ if(!pRrelationSet.is())
+ {
+
+ return E_FAIL;
+ }
+
+ IAccessibleRelation* pRelation = NULL;
+ ActivateActContext();
+ HRESULT hr = CoCreateInstance( CLSID_AccRelation, NULL, CLSCTX_SERVER ,
+ IID_IAccessibleRelation,
+ (void **)&pRelation);
+ DeactivateActContext();
+ if(SUCCEEDED(hr))
+ {
+ IUNOXWrapper* wrapper = NULL;
+ hr = pRelation->QueryInterface(IID_IUNOXWrapper, (void**)&wrapper);
+ if(SUCCEEDED(hr))
+ {
+ AccessibleRelation accRelation = pRrelationSet->getRelation(relationIndex);
+ wrapper->put_XSubInterface((long)&accRelation);
+ wrapper->Release();
+ *relation = pRelation;
+ return S_OK;
+ }
+
+ }
+ }
+
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+STDMETHODIMP CMAccessible::get_relations( long, IAccessibleRelation __RPC_FAR *__RPC_FAR *relation, long __RPC_FAR *nRelations)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(relation == NULL || nRelations == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ // #CHECK XInterface#
+
+ if( !pRContext.is() )
+ return E_FAIL;
+
+ Reference<XAccessibleRelationSet> pRrelationSet = pRContext.get()->getAccessibleRelationSet();
+ if(!pRrelationSet.is())
+ {
+ *nRelations = 0;
+ return S_OK;
+ }
+
+ long nCount = pRrelationSet->getRelationCount();
+
+ *relation = (IAccessibleRelation*)::CoTaskMemAlloc(nCount*sizeof(IAccessibleRelation));
+
+ // #CHECK Memory Allocation#
+ if(*relation == NULL)
+ {
+ return E_FAIL;
+ }
+
+ for(int i=0; i<nCount ; i++)
+ {
+ IAccessibleRelation* pRelation = NULL;
+ ActivateActContext();
+ HRESULT hr = CoCreateInstance( CLSID_AccRelation, NULL, CLSCTX_SERVER ,
+ IID_IAccessibleRelation,
+ (void **)&pRelation);
+ DeactivateActContext();
+ if(SUCCEEDED(hr))
+ {
+ IUNOXWrapper* wrapper = NULL;
+ hr = pRelation->QueryInterface(IID_IUNOXWrapper, (void**)&wrapper);
+ if(SUCCEEDED(hr))
+ {
+ AccessibleRelation accRelation = pRrelationSet->getRelation(i);
+ wrapper->put_XSubInterface((long)&accRelation);
+ wrapper->Release();
+ }
+ (relation)[i] = pRelation;
+ }
+ }
+
+ *nRelations = nCount;
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+STDMETHODIMP CMAccessible::role(long __RPC_FAR *role)
+{
+ ENTER_PROTECTED_BLOCK
+
+ (*role) = m_iRole;
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+
+STDMETHODIMP CMAccessible:: get_nActions(long __RPC_FAR *nActions)
+{
+
+ try
+ {
+ ISDESTROY()
+ // #CHECK#
+ if(nActions == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ *nActions = 0L;
+ IAccessibleAction* pAcc = NULL;
+ HRESULT hr = QueryInterface(IID_IAccessibleAction, (void**)&pAcc);
+ if( hr == S_OK )
+ {
+ pAcc->nActions(nActions);
+ pAcc->Release();
+ }
+
+ return S_OK;
+ }
+ catch(...)
+ {
+ *nActions = 0L;
+ return S_OK;
+ }
+}
+
+
+STDMETHODIMP CMAccessible:: scrollToPoint(enum IA2CoordinateType, long, long)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ return E_NOTIMPL;
+ LEAVE_PROTECTED_BLOCK
+
+}
+STDMETHODIMP CMAccessible:: scrollTo(enum IA2ScrollType)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+
+ return E_NOTIMPL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+static XAccessible* getTheParentOfMember(XAccessible* pXAcc)
+{
+ // #CHECK#
+ if(pXAcc == NULL)
+ {
+ return NULL;
+ }
+ Reference<XAccessibleContext> pRContext = pXAcc->getAccessibleContext();
+ Reference<XAccessibleRelationSet> pRrelationSet = pRContext->getAccessibleRelationSet();
+ long nRelations = pRrelationSet->getRelationCount();
+ for(int i=0 ; i<nRelations ; i++)
+ {
+ AccessibleRelation accRelation = pRrelationSet->getRelation(i);
+ if(accRelation.RelationType == 7)
+ {
+ Sequence< Reference< XInterface > > xTargets = accRelation.TargetSet;
+ return (XAccessible*)xTargets[0].get();
+ }
+ }
+ return NULL;
+}
+
+STDMETHODIMP CMAccessible:: get_groupPosition(long __RPC_FAR *groupLevel,long __RPC_FAR *similarItemsInGroup,long __RPC_FAR *positionInGroup)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(groupLevel == NULL || similarItemsInGroup == NULL || positionInGroup == NULL)
+ {
+ return E_INVALIDARG;
+ }
+
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+ if(!pRContext.is())
+ return E_FAIL;
+ long Role = pRContext->getAccessibleRole();
+
+ *groupLevel = 0;
+ *similarItemsInGroup = 0;
+ *positionInGroup = 0;
+
+ if (Role != AccessibleRole::DOCUMENT)
+ {
+ Reference< XAccessibleGroupPosition > xGroupPosition( pRContext, UNO_QUERY );
+ if ( xGroupPosition.is() )
+ {
+ Sequence< sal_Int32 > rSeq = xGroupPosition->getGroupPosition( makeAny( pRContext ) );
+ sal_Int32* pSeq = rSeq.getArray();
+ if ( pSeq )
+ {
+ *groupLevel = pSeq[0];
+ *similarItemsInGroup = pSeq[1];
+ *positionInGroup = pSeq[2];
+ return S_OK;
+ }
+ return S_OK;
+ }
+ }
+
+ Reference< XAccessible> pParentAcc = pRContext->getAccessibleParent();
+ if( !pParentAcc.is() )
+ {
+ return S_OK;
+ }
+
+ Reference<XAccessibleContext> pRParentContext = pParentAcc->getAccessibleContext();
+
+ int level = 0;
+ int index = 0;
+ int number = 0;
+
+ if( Role == RADIO_BUTTON )
+ {
+ Reference<XAccessibleRelationSet> pRrelationSet = pRContext->getAccessibleRelationSet();
+ long nRel = pRrelationSet->getRelationCount();
+ for(int i=0 ; i<nRel ; i++)
+ {
+ AccessibleRelation accRelation = pRrelationSet->getRelation(i);
+ if(accRelation.RelationType == 7)
+ {
+ Sequence< Reference< XInterface > > xTargets = accRelation.TargetSet;
+ int nCount = xTargets.getLength();
+
+ Reference<XInterface> pRAcc = xTargets[0];
+ for(int j=0; j<pRParentContext->getAccessibleChildCount(); j++)
+ {
+ if( getTheParentOfMember(pRParentContext->getAccessibleChild(j).get())
+ == (XAccessible*)pRAcc.get() &&
+ pRParentContext->getAccessibleChild(j)->getAccessibleContext()->getAccessibleRole() == RADIO_BUTTON)
+ number++;
+ if(pRParentContext->getAccessibleChild(j).get() == pUNOInterface)
+ index = number;
+ }
+ }
+ }
+ *groupLevel = 1;
+ *similarItemsInGroup = number;
+ *positionInGroup = index;
+ return S_OK;
+ }
+
+ else if ( COMBO_BOX == Role )
+ {
+ *groupLevel = 1;
+ *similarItemsInGroup = 0;
+ *positionInGroup = -1;
+
+ long nCount = pRContext->getAccessibleChildCount();
+ if( 2 != nCount)
+ {
+ return S_OK;
+ }
+ Reference<XAccessible> xList=pRContext->getAccessibleChild(1);
+ if (!xList.is())
+ {
+ return S_OK;
+ }
+ Reference<XAccessibleContext> xListContext(xList,UNO_QUERY);
+ if (!xListContext.is())
+ {
+ return S_OK;
+ }
+ Reference<XAccessibleSelection> xListSel(xList,UNO_QUERY);
+ if (!xListSel.is())
+ {
+ return S_OK;
+ }
+ *similarItemsInGroup = xListContext->getAccessibleChildCount();
+ if (*similarItemsInGroup > 0 )
+ {
+ try
+ {
+ Reference<XAccessible> xChild = xListSel->getSelectedAccessibleChild(0);
+ if (xChild.is())
+ {
+ Reference<XAccessibleContext> xChildContext(xChild,UNO_QUERY);
+ if (xChildContext.is())
+ {
+ *positionInGroup=xChildContext->getAccessibleIndexInParent() + 1 ;
+ return S_OK;
+ }
+ }
+ }
+ catch(...)
+ {}
+ }
+ return S_OK;
+ }
+ else if ( PAGE_TAB == Role )
+ {
+ *groupLevel = 1;
+ *similarItemsInGroup = pRParentContext->getAccessibleChildCount();
+
+ if (*similarItemsInGroup > 0 )
+ {
+ *positionInGroup=pRContext->getAccessibleIndexInParent() + 1 ;
+ }
+ else
+ {
+ *positionInGroup = -1;
+ }
+ return S_OK;
+ }
+
+
+ BOOL isFound = FALSE;
+ while( pParentAcc.is() && !isFound)
+ {
+ level++;
+ pRParentContext = pParentAcc->getAccessibleContext();
+ Role = pRParentContext->getAccessibleRole();
+ if( (Role == TREE) || (Role == LIST) )
+ isFound = TRUE;
+ pParentAcc = pRParentContext->getAccessibleParent();
+ }
+
+ if( isFound )
+ {
+ Reference< XAccessible> pTempAcc = pRContext->getAccessibleParent();
+ pRParentContext = pTempAcc->getAccessibleContext();
+ *groupLevel = level;
+ *similarItemsInGroup = pRParentContext->getAccessibleChildCount();
+ *positionInGroup = pRContext->getAccessibleIndexInParent() + 1;
+ }
+ else
+ {
+ *groupLevel = 0;
+ *similarItemsInGroup = 0;
+ *positionInGroup = 0;
+ }
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+STDMETHODIMP CMAccessible:: get_extendedStates( long, BSTR __RPC_FAR *__RPC_FAR *, long __RPC_FAR *)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+
+ return E_NOTIMPL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+
+STDMETHODIMP CMAccessible:: get_uniqueID(long __RPC_FAR *uniqueID)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(uniqueID == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ *uniqueID = m_dChildID;
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+STDMETHODIMP CMAccessible:: get_windowHandle(HWND __RPC_FAR *windowHandle)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(windowHandle == NULL)
+ {
+ return E_INVALIDARG;
+ }
+
+ HWND nHwnd = m_hwnd;
+ IAccessible* pParent = m_pIParent;
+ CMAccessible* pChild = this;
+ while((nHwnd==0) && pParent)
+ {
+ pChild = (CMAccessible*)pParent;
+ if(pChild)
+ {
+ pParent = (IAccessible*)pChild->m_pIParent;
+ nHwnd = (HWND)pChild->m_hwnd;
+ }
+ else
+ pParent = NULL;
+ }
+
+ *windowHandle = nHwnd;
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Get XAccessibleContext directly from UNO by the stored XAccessible pointer
+* @param pXAcc, UNO XAccessible object point.
+* @return XAccessibleContext*, the context of the pXAcc.
+*/
+XAccessibleContext* CMAccessible::GetContextByXAcc( XAccessible* pXAcc )
+{
+ Reference< XAccessibleContext > pRContext;
+ if( pXAcc == NULL)
+ return NULL;
+
+ pRContext = pXAcc->getAccessibleContext();
+ if( !pRContext.is() )
+ return NULL;
+ return pRContext.get();
+}
+
+/**
+* Return the member variable m_pXAccessibleSelection, instead of
+* get XAccessibleSelection according to XAccessibleContext because if so,it will
+* depend on the UNO implementation code,so when COM is created, put XAccessibleSelection
+* by bridge management system
+* @return XAccessibleSelection*, the selection of the current object.
+*/
+Reference< XAccessibleSelection > CMAccessible::GetSelection()
+{
+ if( pUNOInterface == NULL )
+ return NULL;
+ Reference< XAccessibleContext > pRContext = pUNOInterface->getAccessibleContext();
+ if(pRContext.is())
+ {
+ Reference< XAccessibleSelection > pRSelection(pRContext,UNO_QUERY);
+ return pRSelection;
+ }
+ return NULL;
+}
+
+/**
+* Select one XAccessible item, for accSelect implementation
+* @param pItem, the item should be selected.
+* @return S_OK if successful.
+*/
+HRESULT CMAccessible::SelectChild(XAccessible* pItem)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ XAccessibleContext* pParentContext = GetContextByXAcc( pUNOInterface );
+ XAccessibleContext* pContext = GetContextByXAcc( pItem );
+ if( pParentContext == NULL || pContext == NULL )
+ return E_FAIL;
+
+ Reference< XAccessibleSelection > pRSelection = GetSelection();
+ if( !pRSelection.is() )
+ return E_FAIL;
+ long Index = pContext->getAccessibleIndexInParent();
+ pRSelection->selectAccessibleChild( Index );
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Deselect one XAccessible item, for accSelect implimentation
+* @param pItem, the item should be deselected.
+* @return S_OK if successful.
+*/
+HRESULT CMAccessible::DeSelectChild(XAccessible* pItem)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ XAccessibleContext* pParentContext = GetContextByXAcc( pUNOInterface );
+ ;
+ XAccessibleContext* pContext = GetContextByXAcc( pItem );
+ if( pParentContext == NULL || pContext == NULL )
+ return E_INVALIDARG;
+
+ Reference< XAccessibleSelection > pRSelection = GetSelection();
+ if( !pRSelection.is() )
+ return E_FAIL;
+ long Index = pContext->getAccessibleIndexInParent();
+ pRSelection->deselectAccessibleChild( Index );
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Select multiple XAccessible items,for implementation of accSelect
+* @param pItem, the items should be selected.
+* @param size, the size of the items.
+* @return S_OK if successful.
+*/
+HRESULT CMAccessible::SelectMutipleChidren( XAccessible** pItem,int size )
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pItem == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ for(int index = 0;index < size;index++)
+ {
+ SelectChild( pItem[index] );
+ }
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Deselect multiple XAccessible items,for implementation of accSelect
+* @param pItem, the items should be selected.
+* @param size, the size of the items.
+* @return S_OK if successful.
+*/
+HRESULT CMAccessible::DeSelectMutipleChildren( XAccessible** pItem,int size )
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pItem == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ for(int index = 0;index < size;index++)
+ {
+ DeSelectChild( pItem[index] );
+ }
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* When COM is created, UNO set XAccessible pointer to it
+* in order to COM can operate UNO information
+* @param pXAcc, the XAccessible object of current object.
+* @return S_OK if successful.
+*/
+STDMETHODIMP CMAccessible::SetXAccessible(long pXAcc)
+{
+ pUNOInterface = (XAccessible*)pXAcc;
+ pRef = pUNOInterface;
+ m_pEnumVar->PutSelection(/*XAccessibleSelection*/(long)pUNOInterface);
+
+ pRContext = pUNOInterface->getAccessibleContext();
+ pRContextInterface = (XAccessibleContext*)pRContext.is();
+
+ return S_OK;
+}
+
+/**
+* accSelect method has many optional flags, needs to process comprehensively
+* Mozilla and Microsoft do not implement SELFLAG_EXTENDSELECTION flag.
+* The implementation of this flag is a little trouble-shooting,so we also
+* do not implement it now
+* @param flagsSelect, the selection flag of the select action.
+* @param varChild, the child object pointer of current action.
+* @return S_OK if successful.
+*/
+STDMETHODIMP CMAccessible::accSelect(long flagsSelect, VARIANT varChild)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ if( (flagsSelect&SELFLAG_ADDSELECTION) &&
+ (SELFLAG_REMOVESELECTION&flagsSelect) )
+ return E_INVALIDARG;
+
+ if ( (flagsSelect&SELFLAG_TAKESELECTION) &&
+ (
+ (flagsSelect&SELFLAG_ADDSELECTION) ||
+ (flagsSelect&SELFLAG_REMOVESELECTION) ||
+ (flagsSelect&SELFLAG_EXTENDSELECTION )
+ )
+ )
+ return E_INVALIDARG;
+
+ if ( varChild.vt != VT_I4 )
+ return E_INVALIDARG;
+
+ IMAccessible* pSelectAcc;
+ if( varChild.lVal == CHILDID_SELF )
+ {
+ pSelectAcc = this;
+ pSelectAcc->AddRef();
+ }
+ else
+ {
+ pSelectAcc = GetChildInterface(varChild.lVal);
+ }
+
+ if( pSelectAcc == NULL )
+ return E_INVALIDARG;
+
+ if( flagsSelect&SELFLAG_TAKEFOCUS )
+ {
+ long pTempUNO = 0;
+ pSelectAcc->GetUNOInterface( &pTempUNO);
+
+ if( pTempUNO == NULL )
+ return NULL;
+
+ Reference< XAccessibleContext > pRContext = ( (XAccessible*)pTempUNO)->getAccessibleContext();
+ Reference< XAccessibleComponent > pRComponent(pRContext,UNO_QUERY);
+ Reference< XAccessible > pRParentXAcc = pRContext->getAccessibleParent();
+ Reference< XAccessibleContext > pRParentContext = pRParentXAcc->getAccessibleContext();
+ Reference< XAccessibleComponent > pRParentComponent(pRParentContext,UNO_QUERY);
+ Reference< XAccessibleSelection > pRParentSelection(pRParentContext,UNO_QUERY);
+
+
+ pRComponent->grabFocus();
+
+ if( flagsSelect & SELFLAG_TAKESELECTION )
+ {
+ pRParentSelection->clearAccessibleSelection();
+ pRParentSelection->selectAccessibleChild( pRContext->getAccessibleIndexInParent() );
+ }
+
+ if( flagsSelect & SELFLAG_ADDSELECTION )
+ {
+ pRParentSelection->selectAccessibleChild( pRContext->getAccessibleIndexInParent() );
+ }
+
+ if( flagsSelect & SELFLAG_REMOVESELECTION )
+ {
+ pRParentSelection->deselectAccessibleChild( pRContext->getAccessibleIndexInParent() );
+ }
+
+ if( flagsSelect & SELFLAG_EXTENDSELECTION )
+ {
+ long indexInParrent = pRContext->getAccessibleIndexInParent();
+
+ if( pRParentSelection->isAccessibleChildSelected( indexInParrent + 1 ) ||
+ pRParentSelection->isAccessibleChildSelected( indexInParrent - 1 ) )
+ {
+ pRParentSelection->selectAccessibleChild( indexInParrent );
+ }
+ }
+
+ }
+
+ pSelectAcc->Release();
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* Return XAccessible interface pointer when needed
+* @param pXAcc, [in, out] the Uno interface of the current object.
+* @return S_OK if successful.
+*/
+STDMETHODIMP CMAccessible::GetUNOInterface(long* pXAcc)
+{
+ // #CHECK#
+ if(pXAcc == NULL)
+ return E_INVALIDARG;
+
+ *pXAcc = (long)pUNOInterface;
+ return S_OK;
+}
+
+/**
+* Helper method for Implementation of get_accDefaultAction
+* @param pAction, the default action point of the current object.
+* @return S_OK if successful.
+*/
+STDMETHODIMP CMAccessible::SetDefaultAction(long pAction)
+{
+ m_pXAction = (XAccessibleAction*)pAction;
+ return S_OK;
+}
+
+/**
+* This method is called when AT open some UI elements initially
+* the UI element takes the default action defined here
+* @param varChild, the child id of the defaultaction.
+* @param pszDefaultAction,[in/out] the description of the current action.
+* @return S_OK if successful.
+*/
+HRESULT STDMETHODCALLTYPE CMAccessible::get_accDefaultAction(VARIANT varChild, BSTR *pszDefaultAction)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(pszDefaultAction == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ if(varChild.vt==VT_I4)
+ {
+ if(varChild.lVal==CHILDID_SELF)
+ {
+ if( m_pXAction == NULL )
+ return DISP_E_MEMBERNOTFOUND;
+ SAFE_SYSFREESTRING(*pszDefaultAction);
+ *pszDefaultAction = SysAllocString(m_pszActionDescription);
+ return S_OK;
+ }
+
+ long lVal = varChild.lVal;
+ varChild.lVal = CHILDID_SELF;
+ IMAccessible *pChild = this->GetChildInterface(lVal);
+ if(!pChild)
+ return E_FAIL;
+ return pChild->get_accDefaultAction(varChild,pszDefaultAction);
+ }
+ return S_FALSE;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* AT call this method to operate application
+* @param varChild, the child id of the action object.
+* @return S_OK if successful.
+*/
+HRESULT STDMETHODCALLTYPE CMAccessible::accDoDefaultAction(VARIANT varChild)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ if( varChild.vt != VT_I4 )
+ return E_INVALIDARG;
+ if( m_pXAction == NULL )
+ return E_FAIL;
+ if( m_pXAction->getAccessibleActionCount() == 0 )
+ return E_FAIL;
+
+ if(varChild.lVal==CHILDID_SELF)
+ {
+ if(m_pXAction->getAccessibleActionCount() > 0)
+ m_pXAction->doAccessibleAction(0);
+ return S_OK;
+ }
+
+ long lVal = varChild.lVal;
+ varChild.lVal = CHILDID_SELF;
+ IMAccessible *pChild = this->GetChildInterface(lVal);
+ if(!pChild)
+ return E_FAIL;
+ return pChild->accDoDefaultAction( varChild );
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+/**
+* UNO set description information for action to COM.
+* @param szAction, the action description of the current object.
+* @return S_OK if successful.
+*/
+STDMETHODIMP CMAccessible::Put_ActionDescription( const OLECHAR* szAction)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(szAction == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ SAFE_SYSFREESTRING(m_pszActionDescription );
+ m_pszActionDescription = SysAllocString( szAction );
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+BOOL CMAccessible::GetXInterfaceFromXAccessible(XAccessible* pXAcc, XInterface** ppXI, int index)
+{
+ Reference< XAccessibleContext > pRContext;
+
+ switch(index)
+ {
+ case XI_COMPONENT:
+ QUERYXINTERFACE(AccessibleComponent)
+ break;
+ case XI_TEXT:
+ QUERYXINTERFACE(AccessibleText)
+ break;
+ case XI_EDITABLETEXT:
+ QUERYXINTERFACE(AccessibleEditableText)
+ break;
+ case XI_TABLE:
+ QUERYXINTERFACE(AccessibleTable)
+ break;
+ case XI_SELECTION:
+ QUERYXINTERFACE(AccessibleSelection)
+ break;
+ case XI_EXTENDEDCOMP:
+ QUERYXINTERFACE(AccessibleExtendedComponent)
+ break;
+ case XI_KEYBINDING:
+ QUERYXINTERFACE(AccessibleKeyBinding)
+ break;
+ case XI_ACTION:
+ QUERYXINTERFACE(AccessibleAction)
+ break;
+ case XI_VALUE:
+ QUERYXINTERFACE(AccessibleValue)
+ break;
+ case XI_HYPERTEXT:
+ QUERYXINTERFACE(AccessibleHypertext)
+ break;
+ case XI_HYPERLINK:
+ QUERYXINTERFACE(AccessibleHyperlink)
+ break;
+ case XI_IMAGE:
+ QUERYXINTERFACE(AccessibleImage)
+ break;
+ default:
+ break;
+ }
+
+ return FALSE;
+}
+
+HRESULT WINAPI CMAccessible::SmartQI(void* pv, REFIID iid, void** ppvObject)
+{
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ if( ImplIsEqualGUID(iid,IID_IAccIdentity) ||
+ ImplIsEqualGUID(iid,IID_IStdMarshalInfo) ||
+ ImplIsEqualGUID(iid,IID_IMarshal) ||
+ ImplIsEqualGUID(iid,IID_IExternalConnection)||
+ ImplIsEqualGUID(iid,IID_IOleWindow))
+ return E_FAIL;
+
+
+ _UNO_AGGMAP_ENTRY* pMap = _GetAggEntries();
+ while(pMap && pMap->piid)
+ {
+ if(ImplIsEqualGUID(iid, *pMap->piid))
+ {
+ XInterface* pXI = NULL;
+ BOOL bFound = GetXInterfaceFromXAccessible(pUNOInterface,&pXI,pMap->XIFIndex);
+ if(!bFound)
+ {
+ return E_FAIL;
+ }
+
+ XGUIDToComObjHash::iterator pIndTemp = m_containedObjects.find( iid );
+ if ( pIndTemp != m_containedObjects.end() )
+ {
+ return pIndTemp->second.p->QueryInterface( iid, ppvObject );
+ }
+ else
+ {
+ ActivateActContext();
+ HRESULT hr = pMap->pfnCreateInstance(pv, iid, ppvObject);
+ DeactivateActContext();
+ if(hr == S_OK)
+ {
+ m_containedObjects.insert(XGUIDToComObjHash::value_type(*pMap->piid,(IUnknown*)*ppvObject));
+ IUNOXWrapper* wrapper = NULL;
+ ((IUnknown*)*ppvObject)->QueryInterface(IID_IUNOXWrapper, (void**)&wrapper);
+ if(wrapper)
+ {
+ wrapper->put_XInterface((long)pUNOInterface);
+ wrapper->Release();
+ }
+ return S_OK;
+ }
+ }
+ return E_FAIL;
+ }
+ pMap++;
+ }
+ return E_FAIL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+BOOL CMAccessible::get_IAccessibleFromXAccessible(long pXAcc, IAccessible **ppIA)
+{
+
+ ENTER_PROTECTED_BLOCK
+
+ // #CHECK#
+ if(ppIA == NULL)
+ {
+ return E_INVALIDARG;
+ }
+ BOOL isGet = FALSE;
+ if(g_pAgent)
+ isGet = g_pAgent->GetIAccessibleFromXAccessible((XAccessible*)pXAcc,ppIA);
+
+ if(isGet)
+ return TRUE;
+ else
+ return FALSE;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+void CMAccessible::get_OLECHARFromAny(Any& pAny, OLECHAR* pChar)
+{
+ // #CHECK#
+ if(pChar == NULL)
+ return;
+
+ switch(pAny.getValueTypeClass())
+ {
+ case TypeClass_CHAR:
+ {
+ sal_Int8 val;
+ pAny >>= val;
+ swprintf( pChar, L"%d", val);
+ break;
+ }
+ case TypeClass_BOOLEAN:
+ {
+ sal_Bool val;
+ pAny >>= val;
+ swprintf( pChar, L"%d", val);
+ break;
+ }
+ case TypeClass_BYTE:
+ {
+ sal_Int8 val;
+ pAny >>= val;
+ swprintf( pChar, L"%d", val);
+ break;
+ }
+ case TypeClass_SHORT:
+ {
+ SHORT val;
+ pAny >>= val;
+ swprintf( pChar, L"%d", val);
+ break;
+ }
+ case TypeClass_UNSIGNED_SHORT:
+ {
+ USHORT val;
+ pAny >>= val;
+ swprintf( pChar, L"%d", val);
+ break;
+ }
+ case TypeClass_LONG:
+ {
+ LONG val;
+ pAny >>= val;
+ swprintf( pChar, L"%ld", val);
+ break;
+ }
+ case TypeClass_UNSIGNED_LONG:
+ {
+ ULONG val;
+ pAny >>= val;
+ swprintf( pChar, L"%ld", val);
+ break;
+ }
+ case TypeClass_FLOAT:
+ {
+ FLOAT val;
+ pAny >>= val;
+ swprintf( pChar, L"%.3f", val);
+ break;
+ }
+ case TypeClass_DOUBLE:
+ {
+ DOUBLE val;
+ pAny >>= val;
+ swprintf( pChar, L"%.6lf", val);
+ break;
+ }
+ case TypeClass_STRING:
+ {
+ ::rtl::OUString val;
+ pAny >>= val;
+ wcscpy(pChar, val.getStr());
+ break;
+ }
+ case TypeClass_SEQUENCE:
+ {
+ if(pAny.getValueType() == getCppuType( (Sequence< ::rtl::OUString > *)0 ) )
+ {
+ Sequence < ::rtl::OUString > val;
+ pAny >>= val;
+
+ ::rtl::OUString pString;
+
+ int count = val.getLength();
+
+ for( int iIndex = 0;iIndex < count;iIndex++ )
+ {
+ pString += val[iIndex];
+ }
+ wcscpy(pChar, pString.getStr());
+ }
+ else if (pAny.getValueType() == getCppuType( (Sequence< ::com::sun::star::style::TabStop >* )0 ) )
+ {
+ Sequence < ::com::sun::star::style::TabStop > val;
+ pAny >>= val;
+ int count = val.getLength();
+
+ for( int iIndex = 0;iIndex < count;iIndex++ )
+ {
+ OLECHAR pAttrs[512] = {NULL};
+
+ OLECHAR pAttrsPosition[512] = {NULL};
+ OLECHAR pAttrsDescimalChar[512] = {NULL};
+ OLECHAR pAttrsFillChar[512] = {NULL};
+
+ ::com::sun::star::style::TabStop sigleVal = val[iIndex];
+
+ swprintf( pAttrsPosition, L"Position=%ld,TabAlign=%ld",
+ sigleVal.Position, sigleVal.Alignment);
+
+ if(sigleVal.DecimalChar==';' || sigleVal.DecimalChar == ':' || sigleVal.DecimalChar == ',' ||
+ sigleVal.DecimalChar == '=' || sigleVal.DecimalChar == '\\')
+ swprintf( pAttrsDescimalChar, L"DecimalChar=\\%c",sigleVal.DecimalChar);
+ else
+ swprintf( pAttrsDescimalChar, L"DecimalChar=%c",sigleVal.DecimalChar);
+
+ if(sigleVal.FillChar==';' || sigleVal.FillChar == ':' || sigleVal.FillChar == ',' ||
+ sigleVal.FillChar == '=' || sigleVal.FillChar == '\\')
+ swprintf( pAttrsFillChar, L"FillChar=\\%c",sigleVal.FillChar);
+ else
+ swprintf( pAttrsFillChar, L"FillChar=%c",sigleVal.FillChar);
+
+ swprintf( pAttrs, L"%s,%s,%s,",pAttrsPosition,pAttrsDescimalChar,pAttrsFillChar);
+
+ wcscat(pChar,pAttrs);
+ }
+ }
+ break;
+ }
+ case TypeClass_ENUM:
+ {
+ if (pAny.getValueType() == getCppuType( (::com::sun::star::awt::FontSlant* )0 ) )
+ {
+ com::sun::star::awt::FontSlant val;
+ pAny >>= val;
+ swprintf( pChar, L"%d", val);
+ }
+ }
+ case TypeClass_STRUCT:
+ {
+ if (pAny.getValueType() == getCppuType( (::com::sun::star::style::LineSpacing* )0 ) )
+ {
+ com::sun::star::style::LineSpacing val;
+ pAny >>= val;
+ swprintf( pChar, L"Mode=%ld,Height=%ld,", val.Mode, val.Height);
+ }
+ else if (pAny.getValueType() == getCppuType( (com::sun::star::accessibility::TextSegment *)0 ) )
+ {
+ com::sun::star::accessibility::TextSegment val;
+ pAny >>= val;
+ ::rtl::OUString realVal(val.SegmentText);
+ wcscpy(pChar, realVal.getStr());
+ }
+ break;
+ }
+ case TypeClass_VOID:
+ case TypeClass_HYPER:
+ case TypeClass_UNSIGNED_HYPER:
+ case TypeClass_TYPE:
+ case TypeClass_ANY:
+ case TypeClass_TYPEDEF:
+ case TypeClass_UNION:
+ case TypeClass_EXCEPTION:
+ case TypeClass_ARRAY:
+ case TypeClass_INTERFACE:
+ case TypeClass_SERVICE:
+ case TypeClass_MODULE:
+ case TypeClass_INTERFACE_METHOD:
+ case TypeClass_INTERFACE_ATTRIBUTE:
+ case TypeClass_UNKNOWN:
+ case TypeClass_PROPERTY:
+ case TypeClass_CONSTANT:
+ case TypeClass_CONSTANTS:
+ case TypeClass_SINGLETON:
+ case TypeClass_MAKE_FIXED_SIZE:
+ break;
+ default:
+ break;
+ }
+}
+
+void CMAccessible::get_OLECHAR4Numbering(const Any& pAny, short numberingLevel,const OUString& numberingPrefix,OLECHAR* pChar)
+{
+ if(pChar == NULL)
+ return;
+ Reference< ::com::sun::star::container::XIndexReplace > pXIndex;
+ if((pAny>>=pXIndex) && (numberingLevel !=-1))//numbering level is -1,means invalid value
+ {
+ Any aAny = pXIndex->getByIndex(numberingLevel);
+ Sequence< ::com::sun::star::beans::PropertyValue > aProps;
+ aAny >>= aProps;
+ const ::com::sun::star::beans::PropertyValue* pPropArray = aProps.getConstArray();
+ sal_Int32 nCount = aProps.getLength();
+ swprintf(pChar,L"Numbering:NumberingLevel=%d,",numberingLevel);
+ for( sal_Int32 i=0; i<nCount; i++ )
+ {
+ ::com::sun::star::beans::PropertyValue rProp = pPropArray[i];
+ if( (rProp.Name.compareTo(OUString::createFromAscii("BulletChar"))==0)||
+ (rProp.Name.compareTo(OUString::createFromAscii("GraphicURL"))==0)||
+ (rProp.Name.compareTo(OUString::createFromAscii("NumberingType"))==0))
+ {
+ OLECHAR propStr[512] = {NULL};
+ swprintf(propStr,L"%s=",rProp.Name.getStr());
+ OLECHAR pTemp[256] = {NULL};
+ CMAccessible::get_OLECHARFromAny(rProp.Value,pTemp);
+ if(rProp.Name.compareTo(OUString::createFromAscii("GraphicURL"))==0)
+ {
+ OLECHAR* pOccur = wcschr(pTemp,':');
+ if(pOccur)
+ *pOccur = '.';
+ }
+ wcscat(propStr,pTemp);
+ wcscat(pChar,propStr);
+ wcscat(pChar,L",");
+
+ if(rProp.Name.compareTo(OUString::createFromAscii("NumberingType"))==0)
+ {
+ if(numberingPrefix.getLength()!=0)
+ {
+ swprintf(pTemp,L"NumberingPrefix=%s,",numberingPrefix.getStr());
+ wcscat(pChar,pTemp);
+ }
+ }
+ }
+ }
+ }
+
+ //Because now have three types numbering level:
+ //1.real numbering list,numbering level>=0 and numbering Rule !=NULL;
+ //2.common paragraph, numbering level >=0, and numbering Rule == NULL;
+ //3.TOC paragraph, numbering level >0, and numbering Rule ==NULL;
+ // IAText:numberinglevel base on 0, but TOC's level base on 1,
+ // so NumberingLevel value will be decreased 1 in bridge code.
+ else if(numberingLevel >0)
+ {
+ swprintf(pChar,L"Numbering:NumberingLevel=%d,NumberingType=4,NumberingPrefix=,",numberingLevel-1);
+ }
+ else
+ {
+ swprintf(pChar,L"Numbering:");
+ }
+}
+
+void CMAccessible::ConvertAnyToVariant(const ::com::sun::star::uno::Any &rAnyVal, VARIANT *pvData)
+{
+ if(rAnyVal.hasValue())
+ {
+ // Clear VARIANT variable.
+ VariantClear(pvData);
+
+ // Set value according to value type.
+ switch(rAnyVal.getValueTypeClass())
+ {
+ case TypeClass_CHAR:
+ pvData->vt = VT_UI1;
+ memcpy(&pvData->bVal, rAnyVal.getValue(), sizeof(sal_Char));
+ break;
+
+ case TypeClass_BOOLEAN:
+ pvData->vt = VT_BOOL;
+ memcpy(&pvData->boolVal, rAnyVal.getValue(), sizeof(sal_Bool));
+ break;
+
+ case TypeClass_BYTE:
+ pvData->vt = VT_UI1;
+ memcpy(&pvData->bVal, rAnyVal.getValue(), sizeof(sal_Int8));
+ break;
+
+ case TypeClass_SHORT:
+ pvData->vt = VT_I2;
+ memcpy(&pvData->iVal, rAnyVal.getValue(), sizeof(sal_Int16));
+ break;
+
+ case TypeClass_UNSIGNED_SHORT:
+ pvData->vt = VT_I2;
+ memcpy(&pvData->iVal, rAnyVal.getValue(), sizeof(sal_uInt16));
+ break;
+
+ case TypeClass_LONG:
+ pvData->vt = VT_I4;
+ memcpy(&pvData->lVal, rAnyVal.getValue(), sizeof(sal_Int32));
+ break;
+
+ case TypeClass_UNSIGNED_LONG:
+ pvData->vt = VT_I4;
+ memcpy(&pvData->lVal, rAnyVal.getValue(), sizeof(sal_uInt32));
+ break;
+
+ case TypeClass_FLOAT:
+ pvData->vt = VT_R4;
+ memcpy(&pvData->fltVal, rAnyVal.getValue(), sizeof(float));
+ break;
+
+ case TypeClass_DOUBLE:
+ pvData->vt = VT_R8;
+ memcpy(&pvData->dblVal, rAnyVal.getValue(), sizeof(double));
+ break;
+
+ case TypeClass_STRING:
+ {
+ pvData->vt = VT_BSTR;
+ ::rtl::OUString val;
+ rAnyVal >>= val;
+ pvData->bstrVal = SysAllocString((OLECHAR *)val.getStr());
+ break;
+ }
+
+ case TypeClass_VOID:
+ case TypeClass_HYPER:
+ case TypeClass_UNSIGNED_HYPER:
+ case TypeClass_TYPE:
+ case TypeClass_ANY:
+ case TypeClass_ENUM:
+ case TypeClass_TYPEDEF:
+ case TypeClass_STRUCT:
+ case TypeClass_UNION:
+ case TypeClass_EXCEPTION:
+ case TypeClass_SEQUENCE:
+ case TypeClass_ARRAY:
+ case TypeClass_INTERFACE:
+ {
+ Reference< XAccessible > pXAcc;
+ if(rAnyVal >>= pXAcc)
+ {
+ if(pXAcc.is())
+ {
+ IAccessible* pIAcc = NULL;
+ get_IAccessibleFromXAccessible((long)pXAcc.get(), &pIAcc);
+ if(pIAcc == NULL)
+ {
+ Reference< XAccessibleContext > pXAccContext = pXAcc->getAccessibleContext();
+ g_pAgent->InsertAccObj(pXAcc.get(),pXAccContext->getAccessibleParent().get());
+ get_IAccessibleFromXAccessible((long)pXAcc.get(), &pIAcc);
+ }
+ if(pIAcc)
+ {
+ pIAcc->AddRef();
+
+ pvData->vt = VT_UNKNOWN;
+ pvData->pdispVal = (IAccessible2*)pIAcc;
+ break;
+ }
+ }
+ }
+ }
+ case TypeClass_SERVICE:
+ case TypeClass_MODULE:
+ case TypeClass_INTERFACE_METHOD:
+ case TypeClass_INTERFACE_ATTRIBUTE:
+ case TypeClass_UNKNOWN:
+ case TypeClass_PROPERTY:
+ case TypeClass_CONSTANT:
+ case TypeClass_CONSTANTS:
+ case TypeClass_SINGLETON:
+ case TypeClass_MAKE_FIXED_SIZE:
+ // Output the type string, if there is other uno value type.
+ pvData->vt = VT_BSTR;
+ pvData->bstrVal = SysAllocString(rAnyVal.getValueTypeName().getStr());
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ VariantClear(pvData);
+ }
+}
+
+STDMETHODIMP CMAccessible::Get_XAccChildID(long* childID)
+{
+ // #CHECK#
+ if(childID == NULL)
+ {
+ return E_FAIL;
+ }
+ *childID = m_dChildID;
+ return S_OK;
+}
+STDMETHODIMP CMAccessible:: get_states(AccessibleStates __RPC_FAR *states )
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK XInterface#
+ if( !pRContext.is() )
+ return E_FAIL;
+
+ Reference<XAccessibleStateSet> pRStateSet = pRContext.get()->getAccessibleStateSet();
+ if(!pRStateSet.is())
+ {
+ return S_OK;
+ }
+ Sequence<short> pStates = pRStateSet->getStates();
+
+
+ long count = pStates.getLength() ;
+ *states = 0x0;
+ for( int i = 0; i < count; i++ )
+ {
+ for( int j = 0; j < sizeof(UNO_STATES) / sizeof(UNO_STATES[0]); j++ )
+ {
+ if( pStates[i] == UNO_STATES[j] )
+ {
+ *states |= IA2_STATES[j];
+ break;
+ }
+ }
+ }
+ return S_OK;
+
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+// return the UNO roles
+STDMETHODIMP CMAccessible:: get_extendedRole( BSTR __RPC_FAR * )
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+
+ return E_NOTIMPL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+STDMETHODIMP CMAccessible:: get_localizedExtendedRole( BSTR __RPC_FAR * )
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ return E_NOTIMPL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+STDMETHODIMP CMAccessible:: get_nExtendedStates( long __RPC_FAR * )
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+
+ return E_NOTIMPL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+
+STDMETHODIMP CMAccessible:: get_localizedExtendedStates( long, BSTR __RPC_FAR *__RPC_FAR *, long __RPC_FAR *)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ return E_NOTIMPL;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+
+STDMETHODIMP CMAccessible:: get_indexInParent( long __RPC_FAR *accParentIndex)
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ // #CHECK#
+ if(accParentIndex == NULL)
+ return E_INVALIDARG;
+
+ // #CHECK XInterface#
+ if( !pRContext.is() )
+ return E_FAIL;
+
+ *accParentIndex = pRContext.get()->getAccessibleIndexInParent();
+ return S_OK;
+
+
+ LEAVE_PROTECTED_BLOCK
+}
+STDMETHODIMP CMAccessible:: get_locale( IA2Locale __RPC_FAR *locale )
+{
+
+ CHECK_ENABLE_INF
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ if(locale == NULL)
+ return E_INVALIDARG;
+ // #CHECK XInterface#
+
+ if( !pRContext.is() )
+ return E_FAIL;
+
+ ::com::sun::star::lang::Locale unoLoc = pRContext.get()->getLocale();
+ locale->language = SysAllocString((OLECHAR*)unoLoc.Language.getStr());
+ locale->country = SysAllocString((OLECHAR*)unoLoc.Country.getStr());
+ locale->variant = SysAllocString((OLECHAR*)unoLoc.Variant.getStr());
+
+ return S_OK;
+
+ LEAVE_PROTECTED_BLOCK
+}
+
+DWORD GetMSAAStateFromUNO(short xState)
+{
+ DWORD IState = STATE_SYSTEM_UNAVAILABLE;
+ switch( xState )
+ {
+ case /*AccessibleStateType::*/AccessibleStateType::BUSY:
+ IState = STATE_SYSTEM_BUSY;
+ break;
+ case /*AccessibleStateType::*/AccessibleStateType::CHECKED:
+ IState = STATE_SYSTEM_CHECKED;
+ break;
+ case /*AccessibleStateType::*/AccessibleStateType::DEFUNC:
+ IState = STATE_SYSTEM_UNAVAILABLE;
+ break;
+ case /*AccessibleStateType::*/AccessibleStateType::EXPANDED:
+ IState = STATE_SYSTEM_EXPANDED;
+ break;
+ case /*AccessibleStateType::*/AccessibleStateType::FOCUSABLE:
+ IState = STATE_SYSTEM_FOCUSABLE;
+ break;
+ case /*AccessibleStateType::*/AccessibleStateType::FOCUSED:
+ IState = STATE_SYSTEM_FOCUSED;
+ break;
+ case /*AccessibleStateType::*/AccessibleStateType::INDETERMINATE:
+ IState = STATE_SYSTEM_MIXED;
+ break;
+ case /*AccessibleStateType::*/AccessibleStateType::MULTI_SELECTABLE:
+ IState = STATE_SYSTEM_MULTISELECTABLE;
+ break;
+ case /*AccessibleStateType::*/AccessibleStateType::PRESSED:
+ IState = STATE_SYSTEM_PRESSED;
+ break;
+ case /*AccessibleStateType::*/AccessibleStateType::RESIZABLE:
+ IState = STATE_SYSTEM_SIZEABLE;
+ break;
+ case /*AccessibleStateType::*/AccessibleStateType::SELECTABLE:
+ IState = STATE_SYSTEM_SELECTABLE;
+ break;
+ case /*AccessibleStateType::*/AccessibleStateType::SELECTED:
+ IState = STATE_SYSTEM_SELECTED;
+ break;
+ case /*AccessibleStateType::*/AccessibleStateType::ARMED:
+ IState = STATE_SYSTEM_FOCUSED;
+ break;
+ case /*AccessibleStateType::*/AccessibleStateType::EXPANDABLE:
+ IState = STATE_SYSTEM_COLLAPSED;
+ break;
+ default:
+ break;
+ }
+ return IState;
+}
+
+STDMETHODIMP CMAccessible:: get_appName( BSTR __RPC_FAR *name)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ if(name == NULL)
+ return E_INVALIDARG;
+
+ *name = SysAllocString(OLESTR("Hannover"));
+ return S_OK;
+ LEAVE_PROTECTED_BLOCK
+}
+STDMETHODIMP CMAccessible:: get_appVersion(BSTR __RPC_FAR *version)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ if(version == NULL)
+ return E_INVALIDARG;
+ *version=SysAllocString(OLESTR("3.0"));
+ return S_OK;
+ LEAVE_PROTECTED_BLOCK
+}
+STDMETHODIMP CMAccessible:: get_toolkitName(BSTR __RPC_FAR *name)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ if(name == NULL)
+ return E_INVALIDARG;
+ *name = SysAllocString(OLESTR(" "));
+ return S_OK;
+ LEAVE_PROTECTED_BLOCK
+}
+STDMETHODIMP CMAccessible:: get_toolkitVersion(BSTR __RPC_FAR *version)
+{
+
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+ if(version == NULL)
+ return E_INVALIDARG;
+ *version = SysAllocString(OLESTR(" "));
+ return S_OK;
+ LEAVE_PROTECTED_BLOCK
+}
+
+
+STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr)
+{
+ CHECK_ENABLE_INF
+ Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
+ if( !pRContext.is() )
+ {
+ return E_FAIL;
+ }
+ Reference<XAccessibleExtendedAttributes> pRXI(pRContext,UNO_QUERY);
+ if( !pRXI.is() )
+ return E_FAIL;
+ else
+ {
+ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleExtendedAttributes> pRXAttr;
+ pRXAttr = pRXI.get();
+ ::com::sun::star::uno::Any anyVal = pRXAttr->getExtendedAttributes();
+
+ ::rtl::OUString val;
+ anyVal >>= val;
+
+ if(*pAttr)
+ SAFE_SYSFREESTRING(*pAttr);
+ *pAttr = SysAllocString((OLECHAR *)val.getStr());
+
+ return S_OK;
+ }
+}
+
diff --git a/winaccessibility/source/UAccCOM/MAccessible.h b/winaccessibility/source/UAccCOM/MAccessible.h
new file mode 100644
index 000000000000..5e298e257f6a
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/MAccessible.h
@@ -0,0 +1,294 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __MACCESSIBLE_H_
+#define __MACCESSIBLE_H_
+
+#include <Windows.h>
+#include "resource.h" // main symbols
+#include <vector>
+#include <map>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+#include <AccObjectManagerAgent.hxx>
+#include "EnumVariant.h"
+#ifndef __ACCCOMMON_H_
+#include "acccommon.h"
+#endif
+#ifndef _RTL_USTRING_HXX_
+#include <rtl/ustring.hxx>
+#endif
+
+#define CHILDID_SELF 0
+#define OBJID_WINDOW ((LONG)0x00000000)
+#define OBJID_SYSMENU ((LONG)0xFFFFFFFF)
+#define OBJID_TITLEBAR ((LONG)0xFFFFFFFE)
+#define OBJID_MENU ((LONG)0xFFFFFFFD)
+#define OBJID_CLIENT ((LONG)0xFFFFFFFC)
+#define OBJID_VSCROLL ((LONG)0xFFFFFFFB)
+#define OBJID_HSCROLL ((LONG)0xFFFFFFFA)
+#define OBJID_SIZEGRIP ((LONG)0xFFFFFFF9)
+#define OBJID_CARET ((LONG)0xFFFFFFF8)
+#define OBJID_CURSOR ((LONG)0xFFFFFFF7)
+#define OBJID_ALERT ((LONG)0xFFFFFFF6)
+#define OBJID_SOUND ((LONG)0xFFFFFFF5)
+#define OBJID_QUERYCLASSNAMEIDX ((LONG)0xFFFFFFF4)
+#define OBJID_NATIVEOM ((LONG)0xFFFFFFF0)
+
+using namespace rtl;
+/**
+ *This class implements IMAccessible interface, which inherits from IAccessible2, and
+ *in turn inherits from IAccessible. So its methods include the methods defined only in
+ *IAccessible, plus the methods defined only in IAccessible2, plus the methods defined
+ *only in IMAccessible.
+ */
+class ATL_NO_VTABLE CMAccessible :
+ public CComObjectRoot,
+ public CComCoClass<CMAccessible, &CLSID_MAccessible>,
+ public IDispatchImpl<IMAccessible, &IID_IMAccessible, &LIBID_UACCCOMLib>,
+ public IServiceProvider,
+ public IAccessibleApplication
+{
+ typedef map< const GUID, CComPtr<IUnknown> ,ltComp > XGUIDToComObjHash;
+
+ typedef HRESULT (WINAPI _UNO_AGGCREATORFUNC)(void*, REFIID, LPVOID*);
+
+ struct _UNO_AGGMAP_ENTRY
+ {
+ const IID* piid;
+ _UNO_AGGCREATORFUNC* pfnCreateInstance;
+ int XIFIndex;
+ };
+
+ enum XInterfaceIndex {
+ XI_COMPONENT = 0x01,
+ XI_TEXT = 0x02,
+ XI_TABLE = 0x03,
+ XI_EDITABLETEXT = 0x04,
+ XI_IMAGE = 0x05,
+ XI_SELECTION = 0x06,
+ XI_EXTENDEDCOMP = 0x07,
+ XI_VALUE = 0x08,
+ XI_KEYBINDING = 0x09,
+ XI_ACTION = 0x0A,
+ XI_HYPERTEXT = 0x0B,
+ XI_HYPERLINK = 0x0C,
+ XI_ATTRIBUTE = 0x0D,
+ XI_NULL = -1
+ };
+
+public:
+ CMAccessible();
+ virtual ~CMAccessible();
+ DECLARE_REGISTRY_RESOURCEID(IDR_MACCESSIBLE)
+
+ DECLARE_GET_CONTROLLING_UNKNOWN()
+
+ DECLARE_PROTECT_FINAL_CONSTRUCT()
+
+ BEGIN_COM_MAP(CMAccessible)
+ COM_INTERFACE_ENTRY(IMAccessible)
+ COM_INTERFACE_ENTRY(IAccessible)
+ COM_INTERFACE_ENTRY(IAccessible2)
+ COM_INTERFACE_ENTRY(IDispatch)
+ COM_INTERFACE_ENTRY(IAccessibleApplication)
+ COM_INTERFACE_ENTRY(IServiceProvider)
+ COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,_SmartQI)
+ END_COM_MAP()
+
+ // AGGREGATE OBJECT MAP
+ BEGIN_AGGOBJECT_MAP(CMAccessible)
+ AGGOBJECT_ENTRY(IID_IAccessibleComponent, CLSID_AccComponent, COMPONENT)
+ AGGOBJECT_ENTRY(IID_IAccessibleText, CLSID_AccText, TEXT)
+ AGGOBJECT_ENTRY(IID_IAccessibleEditableText, CLSID_AccEditableText, EDITABLETEXT)
+ AGGOBJECT_ENTRY(IID_IAccessibleImage, CLSID_AccImage, IMAGE)
+ AGGOBJECT_ENTRY(IID_IAccessibleTable, CLSID_AccTable, TABLE)
+ AGGOBJECT_ENTRY(IID_IAccessibleAction, CLSID_AccAction, ACTION)
+ AGGOBJECT_ENTRY(IID_IAccessibleValue, CLSID_AccValue, VALUE)
+ AGGOBJECT_ENTRY(IID_IAccessibleHypertext, CLSID_AccHypertext, HYPERTEXT)
+ AGGOBJECT_ENTRY(IID_IAccessibleHyperlink, CLSID_AccHyperLink, HYPERLINK)
+
+
+ END_AGGOBJECT_MAP()
+
+ // IMAccessible
+ STDMETHOD(put_accValue)(VARIANT varChild,BSTR szValue);
+ STDMETHOD(put_accName)(VARIANT varChild,BSTR szName);
+ STDMETHOD(accDoDefaultAction)(VARIANT varChild);
+ STDMETHOD(accHitTest)(long xLeft,long yTop,VARIANT *pvarChild);
+ STDMETHOD(accNavigate)(long navDir,VARIANT varStart,VARIANT *pvarEndUpAt);
+ STDMETHOD(accLocation)(long *pxLeft,long *pyTop,long *pcxWidth,long *pcyHeight,VARIANT varChild);
+ STDMETHOD(accSelect)(long flagsSelect,VARIANT varChild);
+ STDMETHOD(get_accDefaultAction)( VARIANT varChild,BSTR *pszDefaultAction);
+ STDMETHOD(get_accSelection)(VARIANT *pvarChildren);
+ STDMETHOD(get_accFocus)(VARIANT *pvarChild);
+ STDMETHOD(get_accKeyboardShortcut)( VARIANT varChild,BSTR *pszKeyboardShortcut);
+ STDMETHOD(get_accHelpTopic)(BSTR *pszHelpFile,VARIANT varChild,long *pidTopic);
+ STDMETHOD(get_accHelp)(VARIANT varChild,BSTR *pszHelp);
+ STDMETHOD(get_accState)(VARIANT varChild,VARIANT *pvarState);
+ STDMETHOD(get_accRole)(VARIANT varChild,VARIANT *pvarRole);
+ STDMETHOD(get_accDescription)(VARIANT varChild,BSTR *pszDescription);
+ STDMETHOD(get_accValue)( VARIANT varChild,BSTR *pszValue);
+ STDMETHOD(get_accName)(VARIANT varChild,BSTR *pszName);
+ STDMETHOD(get_accChild)(VARIANT varChild,IDispatch **ppdispChild);
+ STDMETHOD(get_accChildCount)(long *pcountChildren);
+ STDMETHOD(get_accParent)( IDispatch **ppdispParent);
+
+ // methods which are defined only in the IAccessible2
+ // These methods only declare here, and their implementation bodies are empty now.
+ STDMETHOD(get_nRelations)( long __RPC_FAR *nRelations) ;
+ STDMETHOD(get_relation)( long relationIndex, IAccessibleRelation __RPC_FAR *__RPC_FAR *relation) ;
+ STDMETHOD(get_relations)( long maxRelations, IAccessibleRelation __RPC_FAR *__RPC_FAR *relation, long __RPC_FAR *nRelations) ;
+ STDMETHOD(role)(long __RPC_FAR *role);
+ STDMETHOD(get_nActions)(long __RPC_FAR *nActions);
+ STDMETHOD(scrollTo)(enum IA2ScrollType scrollType);
+ STDMETHOD(scrollToPoint)(enum IA2CoordinateType coordinateType, long x, long y);
+ STDMETHOD(get_groupPosition)(long __RPC_FAR *groupLevel,long __RPC_FAR *similarItemsInGroup,long __RPC_FAR *positionInGroup);
+ STDMETHOD(get_states)( AccessibleStates __RPC_FAR *states );
+ STDMETHOD(get_extendedRole)( BSTR __RPC_FAR *extendedRole );
+ STDMETHOD(get_localizedExtendedRole)( BSTR __RPC_FAR *localizedExtendedRole );
+ STDMETHOD(get_nExtendedStates)( long __RPC_FAR *nExtendedStates);
+ STDMETHOD(get_extendedStates)( long maxExtendedStates, BSTR __RPC_FAR *__RPC_FAR *extendedStates, long __RPC_FAR *nExtendedStates);
+ STDMETHOD(get_localizedExtendedStates)(long maxLocalizedExtendedStates,BSTR __RPC_FAR *__RPC_FAR *localizedExtendedStates,long __RPC_FAR *nLocalizedExtendedStates);
+ STDMETHOD(get_uniqueID)(long __RPC_FAR *uniqueID);
+ STDMETHOD(get_windowHandle)(HWND __RPC_FAR *windowHandle);
+ STDMETHOD(get_indexInParent)( long __RPC_FAR *accParentIndex );
+ STDMETHOD(get_locale)( IA2Locale __RPC_FAR *locale );
+ STDMETHOD(get_attributes)(/*[out]*/ BSTR *pAttr);
+
+ //IServiceProvider.
+ STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void** ppvObject);
+
+ //IAccessibleApplication
+ STDMETHOD(get_appName)(BSTR __RPC_FAR *name);
+ STDMETHOD(get_appVersion)(BSTR __RPC_FAR *version);
+ STDMETHOD(get_toolkitName)(BSTR __RPC_FAR *name);
+ STDMETHOD(get_toolkitVersion)(BSTR __RPC_FAR *version);
+
+ // methods which are defined only in IMAccessible
+ // These methods are provided for UNO management system.
+ // The UNO management system use these methods to put Accessibility
+ // information to COM.
+ STDMETHOD(Put_XAccName)(const OLECHAR __RPC_FAR *pszName);
+ STDMETHOD(Put_XAccRole)(unsigned short pRole);
+ STDMETHOD(DecreaseState)(DWORD pXSate);
+ STDMETHOD(IncreaseState)(DWORD pXSate);
+ STDMETHOD(SetState)(DWORD pXSate);
+ STDMETHOD(Put_XAccDescription)(const OLECHAR __RPC_FAR *pszDescription);
+ STDMETHOD(Put_XAccValue)(const OLECHAR __RPC_FAR *pszAccValue);
+ STDMETHOD(Put_XAccLocation)(const Location sLocation);
+ STDMETHOD(Put_XAccFocus)(long dChildID);
+ STDMETHOD(Put_XAccParent)(IMAccessible __RPC_FAR *pIParent);
+ STDMETHOD(Put_XAccWindowHandle)(HWND hwnd);
+ STDMETHOD(Put_XAccChildID)(long dChildID);
+ STDMETHOD(Put_XAccAgent)(long pAgent);
+ STDMETHOD(NotifyDestroy)(BOOL isDestroy);
+ STDMETHOD(Put_ActionDescription)( const OLECHAR* szAction);
+ STDMETHOD(SetDefaultAction)(long pAction);
+ STDMETHOD(GetUNOInterface)(long*);
+ STDMETHOD(SetXAccessible)(long);
+
+private:
+ OLECHAR* m_pszName;
+ OLECHAR* m_pszValue;
+ OLECHAR* m_pszActionDescription;
+ unsigned short m_iRole;
+ DWORD m_dState;
+ OLECHAR* m_pszDescription;
+ IMAccessible* m_pIParent;
+ Location m_sLocation;
+
+ // identify a COM object/Acc object uniquely
+ long m_dChildID;
+ // specify the focus child ID in object self and its direct children
+
+ long m_dFocusChildID;
+ // parent window handle,will be used in the future application, its value comes from UNO
+
+ HWND m_hwnd;
+
+ // the COM class which implements IEnumVARIANT interface,currently only used in
+ // the implementation of get_accSelection
+ CEnumVariant* m_pEnumVar;
+
+ // specify if the XAccessible is invalid
+ BOOL m_isDestroy;
+
+ XAccessible* pUNOInterface;
+ Reference< XAccessible > pRef;
+ XAccessible* pAchorUNOInterface;
+ XAccessibleAction* m_pXAction;
+ XAccessibleContext* pRContextInterface;
+ Reference<XAccessibleContext> pRContext;
+
+private:
+
+ // the helper methods in order to implement the above public methods
+ IMAccessible* GetChildInterface(long dChildIndex);//notice here the parameter is child index,not child id
+ IMAccessible* GetNavigateChildForDM(VARIANT varCur,short flags);//for decendant manage
+ HRESULT GetFirstChild(VARIANT varStart,VARIANT* pvarEndUpAt);//for accNavigate implementation
+ HRESULT GetLastChild(VARIANT varStart,VARIANT* pvarEndUpAt);//for accNavigate implementation
+ HRESULT GetNextSibling(VARIANT varStart,VARIANT* pvarEndUpAt);//for accNavigate implementation
+ HRESULT GetPreSibling(VARIANT varStart,VARIANT* pvarEndUpAt);//for accNavigate implementation
+ BOOL IsDecendantManage();//identify whether the current COM belongs to manage_decendant roles
+
+ // the following private methods are used to implement accSelect method
+ HRESULT SelectChild(XAccessible* pItem);
+ HRESULT DeSelectChild(XAccessible* pItem);
+ HRESULT SelectMutipleChidren( XAccessible** pItem,int size );
+ HRESULT DeSelectMutipleChildren( XAccessible** pItem,int size );
+ XAccessibleContext* GetContextByXAcc( XAccessible* pXAcc );
+ Reference< XAccessibleSelection > GetSelection();
+ // end accSelect implementation methods
+ BOOL GetXInterfaceFromXAccessible(XAccessible*, XInterface**, int);
+ HRESULT WINAPI SmartQI(void* pv, REFIID iid, void** ppvObject);
+
+public:
+ STDMETHOD(Get_XAccChildID)(/*[out,retval]*/ long* childID);
+ // AccObjectManagerAgent is a management object in UNO, here keep its pointer for
+ // the implementation of accNavigate when decendant manage happens for List,Tree, or Table
+ // AccObjectManagerAgent and the following UNO objects XAccessble,XAccessibleSelection,
+ // XAccessibleAction are all used to operate UNO accessiblility information directly when
+ // implement some specific MSAA methods,such as accSelection,accNavigate
+ static AccObjectManagerAgent* g_pAgent;
+
+ static BOOL get_IAccessibleFromXAccessible(long pXAcc,IAccessible** ppIA);
+ BOOL m_bRequiresSave;
+ XGUIDToComObjHash m_containedObjects;
+
+ static HRESULT WINAPI _SmartQI(void* pv,
+ REFIID iid, void** ppvObject, DWORD)
+ {
+ return ((CMAccessible*)pv)->SmartQI(pv,iid,ppvObject);
+ }
+
+ static void get_OLECHARFromAny(Any& pAny, OLECHAR* pChar);
+
+ static void get_OLECHAR4Numbering(const Any& pAny, short numberingLevel, const OUString& numberingPrefix,OLECHAR* pChar);
+
+ // Helper function for data conversion.
+ static void ConvertAnyToVariant(const ::com::sun::star::uno::Any &rAnyVal, VARIANT *pvData);
+};
+
+
+
+#endif //__MACCESSIBLE_H_
diff --git a/winaccessibility/source/UAccCOM/MAccessible.rgs b/winaccessibility/source/UAccCOM/MAccessible.rgs
new file mode 100644
index 000000000000..10bd2c02eb94
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/MAccessible.rgs
@@ -0,0 +1,26 @@
+HKCR
+{
+ UAccCOM.MAccessible.1 = s 'MAccessible Class'
+ {
+ CLSID = s '{CF8DF8BA-44FE-4B10-BD2E-8C8CB322485F}'
+ }
+ UAccCOM.MAccessible = s 'MAccessible Class'
+ {
+ CLSID = s '{CF8DF8BA-44FE-4B10-BD2E-8C8CB322485F}'
+ CurVer = s 'UAccCOM.MAccessible.1'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {CF8DF8BA-44FE-4B10-BD2E-8C8CB322485F} = s 'MAccessible Class'
+ {
+ ProgID = s 'UAccCOM.MAccessible.1'
+ VersionIndependentProgID = s 'UAccCOM.MAccessible'
+ ForceRemove 'Programmable'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'Both'
+ }
+ 'TypeLib' = s '{19ECB1B0-9376-4FF9-B580-223FC9C200B8}'
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/Resource.h b/winaccessibility/source/UAccCOM/Resource.h
new file mode 100644
index 000000000000..a4df8cde4aee
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/Resource.h
@@ -0,0 +1,70 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by UAccCOM.rc
+//
+#define WNT
+
+#define IDS_PROJNAME 100
+#define IDR_MACCESSIBLE 101
+#define IDR_ENUMVARIANT 106
+#define IDR_UNOXWRAPPER 107
+#define IDS_ACCCOMPONENT_DESC 108
+#define IDR_AccComponent 109
+#define IDS_ACCCONTEXT_DESC 110
+#define IDR_AccContext 111
+#define IDR_ACCRELATION 112
+#define IDR_ACCACTION 113
+#define IDS_ACCFONT_DESC 114
+#define IDR_AccFont 115
+#define IDS_ACCSELECTION_DESC 116
+#define IDR_AccSelection 117
+#define IDS_ACCEXTENDEDCOMPONENT_DESC 118
+#define IDR_AccExtendedComponent 119
+#define IDS_ACCTEXT_DESC 120
+#define IDR_AccText 121
+#define IDS_ACCEDITABLETEXT_DESC 122
+#define IDR_AccEditableText 123
+#define IDS_ACCHYPERTEXT_DESC 124
+#define IDR_AccHypertext 125
+#define IDS_ACCIMAGE_DESC 126
+#define IDR_AccImage 127
+#define IDS_ACCVALUE_DESC 128
+#define IDR_AccValue 129
+#define IDS_ACCTABLE_DESC 130
+#define IDR_ACCTABLE 131
+#define IDS_ACCHYPERLINK_DESC 132
+#define IDR_AccHyperLink 133
+#define IDS_ACCKEYBINDING_DESC 134
+#define IDR_AccKeyBinding 135
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 203
+#define _APS_NEXT_COMMAND_VALUE 32768
+#define _APS_NEXT_CONTROL_VALUE 201
+#define _APS_NEXT_SYMED_VALUE 137
+#endif
+#endif
diff --git a/winaccessibility/source/UAccCOM/StdAfx.cpp b/winaccessibility/source/UAccCOM/StdAfx.cpp
new file mode 100644
index 000000000000..20fae718d15a
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/StdAfx.cpp
@@ -0,0 +1,29 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "stdafx.h"
+
+#ifdef _ATL_STATIC_REGISTRY
+#include <statreg.h>
+#include <statreg.cpp>
+#endif
+
+#include <atlimpl.cpp>
diff --git a/winaccessibility/source/UAccCOM/UAccCOM.cpp b/winaccessibility/source/UAccCOM/UAccCOM.cpp
new file mode 100644
index 000000000000..85471d13158b
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/UAccCOM.cpp
@@ -0,0 +1,109 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "stdafx.h"
+#include "resource.h"
+#include <initguid.h>
+#include "UAccCOM2.h"
+
+#include "UAccCOM_i.c"
+#include "ia2_api_all_i.c"
+
+#include "MAccessible.h"
+#include "EnumVariant.h"
+#include "UNOXWrapper.h"
+#include "AccComponent.h"
+#include "AccRelation.h"
+#include "AccAction.h"
+#include "AccText.h"
+#include "AccEditableText.h"
+#include "AccImage.h"
+#include "AccValue.h"
+#include "AccTable.h"
+#include "AccHyperLink.h"
+#include "AccHyperText.h"
+
+
+CComModule _Module;
+
+BEGIN_OBJECT_MAP(ObjectMap)
+OBJECT_ENTRY(CLSID_MAccessible, CMAccessible)
+OBJECT_ENTRY(CLSID_EnumVariant, CEnumVariant)
+OBJECT_ENTRY(CLSID_AccComponent, CAccComponent)
+OBJECT_ENTRY(CLSID_AccRelation, CAccRelation)
+OBJECT_ENTRY(CLSID_AccAction, CAccAction)
+OBJECT_ENTRY(CLSID_AccText, CAccText)
+OBJECT_ENTRY(CLSID_AccEditableText, CAccEditableText)
+OBJECT_ENTRY(CLSID_AccImage, CAccImage)
+OBJECT_ENTRY(CLSID_AccValue, CAccValue)
+OBJECT_ENTRY(CLSID_AccTable, CAccTable)
+OBJECT_ENTRY(CLSID_AccHyperLink, CAccHyperLink)
+OBJECT_ENTRY(CLSID_AccHypertext, CAccHypertext)
+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_UACCCOMLib);
+ 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 : E_FAIL;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// 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)
+{
+ // registers object, typelib and all interfaces in typelib
+ return _Module.RegisterServer(TRUE);
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// DllUnregisterServer - Removes entries from the system registry
+
+STDAPI DllUnregisterServer(void)
+{
+ return _Module.UnregisterServer(TRUE);
+}
diff --git a/winaccessibility/source/UAccCOM/UAccCOM.def b/winaccessibility/source/UAccCOM/UAccCOM.def
new file mode 100644
index 000000000000..575a28143316
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/UAccCOM.def
@@ -0,0 +1,7 @@
+LIBRARY "UAccCOM.DLL"
+
+EXPORTS
+ DllCanUnloadNow PRIVATE
+ DllGetClassObject PRIVATE
+ DllRegisterServer PRIVATE
+ DllUnregisterServer PRIVATE
diff --git a/winaccessibility/source/UAccCOM/UAccCOM.rc b/winaccessibility/source/UAccCOM/UAccCOM.rc
new file mode 100644
index 000000000000..bab7d4646282
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/UAccCOM.rc
@@ -0,0 +1,149 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+//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
+
+/////////////////////////////////////////////////////////////////////////////
+// Chinese (P.R.C.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
+#ifdef _WIN32
+LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
+#pragma code_page(936)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// REGISTRY
+//
+
+IDR_MACCESSIBLE REGISTRY DISCARDABLE "MAccessible.rgs"
+IDR_ENUMVARIANT REGISTRY DISCARDABLE "EnumVariant.rgs"
+IDR_UNOXWRAPPER REGISTRY DISCARDABLE "UNOXWrapper.rgs"
+IDR_AccComponent REGISTRY DISCARDABLE "AccComponent.rgs"
+IDR_AccExtendedComponent REGISTRY DISCARDABLE "AccExtendedComponent.rgs"
+IDR_ACCRELATION REGISTRY DISCARDABLE "AccRelation.rgs"
+IDR_ACCACTION REGISTRY DISCARDABLE "AccAction.rgs"
+IDR_AccFont REGISTRY DISCARDABLE "AccFont.rgs"
+IDR_AccSelection REGISTRY DISCARDABLE "AccSelection.rgs"
+IDR_AccText REGISTRY DISCARDABLE "AccText.rgs"
+IDR_AccEditableText REGISTRY DISCARDABLE "AccEditableText.rgs"
+IDR_AccImage REGISTRY DISCARDABLE "AccImage.rgs"
+IDR_AccValue REGISTRY DISCARDABLE "AccValue.rgs"
+IDR_ACCTABLE REGISTRY DISCARDABLE "AccTable.rgs"
+IDR_AccHyperLink REGISTRY DISCARDABLE "AccHyperLink.rgs"
+IDR_AccHypertext REGISTRY DISCARDABLE "AccHypertext.rgs"
+IDR_AccKeyBinding REGISTRY DISCARDABLE "AccKeyBinding.rgs"
+#endif // Chinese (P.R.C.) 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 ""UAccCOM.tlb""\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_PROJNAME "UAccCOM"
+ IDS_ACCCOMPONENT_DESC "AccComponent Class"
+ IDS_ACCCONTEXT_DESC "AccContext Class"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_ACCFONT_DESC "AccFont Class"
+ IDS_ACCSELECTION_DESC "AccSelection Class"
+ IDS_ACCEXTENDEDCOMPONENT_DESC "AccExtendedComponent Class"
+ IDS_ACCTEXT_DESC "AccText Class"
+ IDS_ACCEDITABLETEXT_DESC "AccEditableText Class"
+ IDS_ACCHYPERTEXT_DESC "AccHypertext Class"
+ IDS_ACCIMAGE_DESC "AccImage Class"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_ACCVALUE_DESC "AccValue Class"
+ IDS_ACCTABLE_DESC "AccTable Class"
+ IDS_ACCHYPERLINK_DESC "AccHyperLink Class"
+ IDS_ACCKEYBINDING_DESC "AccKeyBinding Class"
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+1 TYPELIB "UAccCOM.tlb"
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/winaccessibility/source/UAccCOM/UNOXWrapper.cpp b/winaccessibility/source/UAccCOM/UNOXWrapper.cpp
new file mode 100644
index 000000000000..80427ca20049
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/UNOXWrapper.cpp
@@ -0,0 +1,27 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "stdafx.h"
+#include "UAccCOM2.h"
+#include "UNOXWrapper.h"
+
+/////////////////////////////////////////////////////////////////////////////
+// CUNOXWrapper
diff --git a/winaccessibility/source/UAccCOM/UNOXWrapper.h b/winaccessibility/source/UAccCOM/UNOXWrapper.h
new file mode 100644
index 000000000000..c80eb203df70
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/UNOXWrapper.h
@@ -0,0 +1,72 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __UNOXWRAPPER_H_
+#define __UNOXWRAPPER_H_
+
+#define WNT
+
+#include "resource.h" // main symbols
+
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include "UAccCOM2.h"
+
+/**
+ * CUNOXWrapper implements IUNOXWrapper interface.
+ */
+class ATL_NO_VTABLE CUNOXWrapper : public IUNOXWrapper
+{
+public:
+ CUNOXWrapper()
+ { }
+
+public:
+ // IUNOXWrapper
+
+ STDMETHOD(put_XInterface)(long pXInterface)
+ {
+ pUNOInterface = (com::sun::star::accessibility::XAccessible*)pXInterface;
+ return S_OK;
+ }
+
+ STDMETHOD(put_XSubInterface)(long)
+ {
+ return S_OK;
+ }
+
+ STDMETHOD(get_XInterface)(/*[out,retval]*/long *pXInterface)
+ {
+ *pXInterface = (long)pUNOInterface;//.get();
+ return S_OK;
+ }
+
+ STDMETHOD(get_XSubInterface)(/*[out,retval]*/long *)
+ {
+ return S_OK;
+ }
+
+protected:
+
+ com::sun::star::accessibility::XAccessible* pUNOInterface;
+};
+
+#endif //__UNOXWRAPPER_H_
diff --git a/winaccessibility/source/UAccCOM/UNOXWrapper.rgs b/winaccessibility/source/UAccCOM/UNOXWrapper.rgs
new file mode 100644
index 000000000000..8a52b08ae7f9
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/UNOXWrapper.rgs
@@ -0,0 +1,26 @@
+HKCR
+{
+ UAccCOM.UNOXWrapper.1 = s 'UNOXWrapper Class'
+ {
+ CLSID = s '{AA360FB0-BC98-41C1-A885-BB921F5ED601}'
+ }
+ UAccCOM.UNOXWrapper = s 'UNOXWrapper Class'
+ {
+ CLSID = s '{AA360FB0-BC98-41C1-A885-BB921F5ED601}'
+ CurVer = s 'UAccCOM.UNOXWrapper.1'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {AA360FB0-BC98-41C1-A885-BB921F5ED601} = s 'UNOXWrapper Class'
+ {
+ ProgID = s 'UAccCOM.UNOXWrapper.1'
+ VersionIndependentProgID = s 'UAccCOM.UNOXWrapper'
+ ForceRemove 'Programmable'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'Apartment'
+ }
+ 'TypeLib' = s '{19ECB1B0-9376-4FF9-B580-223FC9C200B8}'
+ }
+ }
+}
diff --git a/winaccessibility/source/UAccCOM/acccommon.h b/winaccessibility/source/UAccCOM/acccommon.h
new file mode 100644
index 000000000000..989f751ad251
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/acccommon.h
@@ -0,0 +1,95 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __ACCCOMMON_H_
+#define __ACCCOMMON_H_
+
+
+//using namespace com::sun::star::accessibility;
+//using namespace com::sun::star::uno;
+
+
+//for MAccessible.cpp
+struct ltComp
+{
+ bool operator()(REFGUID rguid1, REFGUID rguid2) const
+ {
+ if(((PLONG) &rguid1)[0] < ((PLONG) &rguid2)[0])
+ return TRUE;
+ else if(((PLONG) &rguid1)[0] > ((PLONG) &rguid2)[0])
+ return FALSE;
+ if(((PLONG) &rguid1)[1] < ((PLONG) &rguid2)[1])
+ return TRUE;
+ else if(((PLONG) &rguid1)[1] > ((PLONG) &rguid2)[1])
+ return FALSE;
+ if(((PLONG) &rguid1)[2] < ((PLONG) &rguid2)[2])
+ return TRUE;
+ else if(((PLONG) &rguid1)[2] > ((PLONG) &rguid2)[2])
+ return FALSE;
+ if(((PLONG) &rguid1)[3] < ((PLONG) &rguid2)[3])
+ return TRUE;
+ else if(((PLONG) &rguid1)[3] > ((PLONG) &rguid2)[3])
+ return FALSE;
+ return FALSE;
+ }
+};
+
+#define BEGIN_AGGOBJECT_MAP(x) \
+ static _UNO_AGGMAP_ENTRY* WINAPI _GetAggEntries() { \
+ static _UNO_AGGMAP_ENTRY _aggentries[] = {
+#define END_AGGOBJECT_MAP() {NULL, NULL,NULL}}; \
+ return _aggentries;}
+#define AGGOBJECT_ENTRY(iid, clsid, ifindex) {&iid, \
+ CComAggregateCreator< CComObject<CMAccessible>, &clsid >::CreateInstance,\
+ XI_##ifindex},
+
+enum DM_NIR {
+ DM_FIRSTCHILD = 0x00,
+ DM_LASTCHILD = 0x01,
+ DM_NEXTCHILD = 0x02,
+ DM_PREVCHILD = 0x03
+};
+
+inline BOOL ImplIsEqualGUID(REFGUID rguid1, REFGUID rguid2)
+{
+ return (
+ ((PLONG) &rguid1)[0] == ((PLONG) &rguid2)[0] &&
+ ((PLONG) &rguid1)[1] == ((PLONG) &rguid2)[1] &&
+ ((PLONG) &rguid1)[2] == ((PLONG) &rguid2)[2] &&
+ ((PLONG) &rguid1)[3] == ((PLONG) &rguid2)[3]);
+}
+#define InlineIsEqualGUID ImplIsEqualGUID
+//End
+
+//for AccAction.cpp
+#define CODEENTRY(key) \
+ {KEYCODE_##key, L#key}
+#define countof(x) (sizeof(x)/sizeof(x[0]))
+
+#define SELECT L"Select"
+#define PRESS L"Press"
+#define UNCHECK L"UnCheck"
+#define CHECK L"Check"
+//End
+
+static DWORD GetMSAAStateFromUNO(short xState);
+
+#endif
diff --git a/winaccessibility/source/UAccCOM/makefile.mk b/winaccessibility/source/UAccCOM/makefile.mk
new file mode 100644
index 000000000000..5182254ae617
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/makefile.mk
@@ -0,0 +1,136 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+PRJ=..$/..
+PRJNAME=winaccessibility
+TARGET=UAccCOM
+
+# --- Settings -----------------------------------------------------
+.IF "$(GUI)"!="WNT" || "$(DISABLE_ATL)"!=""
+all:
+ @echo "$TARGET will not be built because GUI='$(GUI)' and DISABLE_ATL='$(DISABLE_ATL)'"
+.ELSE
+
+PROF_EDITION=TRUE
+.INCLUDE : settings.mk
+
+VERSIONOBJ=
+LIBTARGET=NO
+USE_DEFFILE=YES
+UWINAPILIB=
+
+INCPRE+=$(foreach,i,$(ATL_INCLUDE) -I$(i)) \
+ -I$(MISC) \
+
+CFLAGS+=-D_UNICODE -DUNICODE
+
+# --- Files --------------------------------------------------------
+.IF "$(PRODUCT)"!=""
+RC+=-DPRODUCT
+.ENDIF
+
+RCFILES=\
+ $(TARGET).rc
+#RCDEPN=$(MISC)$/envsettings.h
+
+SLOFILES=\
+ $(SLO)$/AccAction.obj \
+ $(SLO)$/AccActionBase.obj \
+ $(SLO)$/AccComponent.obj \
+ $(SLO)$/AccComponentBase.obj \
+ $(SLO)$/AccEditableText.obj \
+ $(SLO)$/AccHyperLink.obj \
+ $(SLO)$/AccHypertext.obj \
+ $(SLO)$/AccImage.obj \
+ $(SLO)$/AccRelation.obj \
+ $(SLO)$/AccText.obj \
+ $(SLO)$/AccValue.obj \
+ $(SLO)$/EnumVariant.obj \
+ $(SLO)$/StdAfx.obj \
+ $(SLO)$/UAccCOM.obj \
+ $(SLO)$/UNOXWrapper.obj \
+ $(SLO)$/AccTable.obj \
+ $(SLO)$/AccTextBase.obj \
+ $(SLO)$/MAccessible.obj \
+ $(SLO)$/CheckEnableAccessible.obj \
+
+EXCEPTIONSFILES= \
+ $(SLO)$/AccAction.obj \
+ $(SLO)$/AccActionBase.obj \
+ $(SLO)$/AccComponent.obj \
+ $(SLO)$/AccComponentBase.obj \
+ $(SLO)$/AccEditableText.obj \
+ $(SLO)$/AccHyperLink.obj \
+ $(SLO)$/AccHypertext.obj \
+ $(SLO)$/AccImage.obj \
+ $(SLO)$/AccRelation.obj \
+ $(SLO)$/AccText.obj \
+ $(SLO)$/AccValue.obj \
+ $(SLO)$/EnumVariant.obj \
+ $(SLO)$/StdAfx.obj \
+ $(SLO)$/UAccCOM.obj \
+ $(SLO)$/UNOXWrapper.obj \
+ $(SLO)$/AccTable.obj \
+ $(SLO)$/AccTextBase.obj \
+ $(SLO)$/MAccessible.obj \
+
+SHL1TARGET=$(TARGET)
+SHL1STDLIBS=\
+ $(ICUUCLIB)\
+ $(ICUINLIB)\
+ $(CPPULIB)\
+ $(VCLLIB) \
+ $(SALLIB)\
+ $(KERNEL32LIB) \
+ $(USER32LIB) \
+ $(ADVAPI32LIB) \
+ $(OLE32LIB) \
+ $(OLEAUT32LIB) \
+ $(SHLWAPILIB) \
+ $(UUIDLIB) \
+ oleacc.lib
+
+.IF "$(COM)"!="GCC"
+.IF "$(CCNUMVER)" > "001300000000"
+ SHL1STDLIBS+= $(ATL_LIB)$/atls.lib
+.ENDIF
+.ENDIF
+
+SHL1OBJS=$(SLOFILES)
+SHL1DEF=$(TARGET).def
+SHL1RES=$(RES)/$(TARGET).res
+
+DEF1NAME= $(TARGET)
+#DEF1EXPORTFILE= exports.dxp
+
+# --- Targets ----------------------------------
+.INCLUDE : target.mk
+
+ALLTAR : \
+ $(MISC)/$(TARGET).manifest \
+
+$(MISC)/$(TARGET).manifest: $(BIN)$/$(TARGET)$(DLLPOST)
+ cat *.rgs > $(MISC)$/$(TARGET).rgs
+ mt.exe -rgs:$(MISC)$/$(TARGET).rgs -tlb:$(MISC)$/$(TARGET).tlb -dll:$(TARGET).dll -out:$(MISC)$/$(TARGET).manifest
+ mt.exe -manifest $(MISC)$/$(TARGET).manifest -outputresource:$(BIN)$/$(TARGET)$(DLLPOST)\;\#97
+
+.ENDIF # "$(GUI)"!="WNT" || "$(DISABLE_ATL)"!=""
+
diff --git a/winaccessibility/source/UAccCOM/stdafx.h b/winaccessibility/source/UAccCOM/stdafx.h
new file mode 100644
index 000000000000..c9b2a23cc7c4
--- /dev/null
+++ b/winaccessibility/source/UAccCOM/stdafx.h
@@ -0,0 +1,64 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+// stdafx.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__5E2F9072_190F_47C7_8003_4D44FD308CB9__INCLUDED_)
+#define AFX_STDAFX_H__5E2F9072_190F_47C7_8003_4D44FD308CB9__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
+
+#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>
+
+#define ENTER_PROTECTED_BLOCK \
+ try \
+ {
+
+#define LEAVE_PROTECTED_BLOCK \
+ } \
+ catch(...) \
+ { \
+ return E_FAIL; \
+ }
+
+#define SAFE_SYSFREESTRING(x) { ::SysFreeString(x); x=NULL; }
+
+#include <windows.h>
+#undef OPAQUE
+#include "CheckEnableAccessible.h"
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_STDAFX_H__5E2F9072_190F_47C7_8003_4D44FD308CB9__INCLUDED)
diff --git a/winaccessibility/source/UAccCOMIDL/AccessibleKeyBinding.idl b/winaccessibility/source/UAccCOMIDL/AccessibleKeyBinding.idl
new file mode 100644
index 000000000000..8e0e8e06c5c5
--- /dev/null
+++ b/winaccessibility/source/UAccCOMIDL/AccessibleKeyBinding.idl
@@ -0,0 +1,66 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+import "objidl.idl";
+import "oaidl.idl";
+import "oleacc.idl";
+import "AccessibleKeyStroke.idl";
+
+[object, uuid(6B1923AC-3E9A-4336-99E1-A69EA4E946E9)]
+interface IAccessibleKeyBinding : IUnknown
+{
+ ///
+ /// get number of key bindings for this object
+ ///
+ [propget] HRESULT nKeyBindings
+ (
+ [out, retval] long *nKeyBindings
+ );
+
+ ///
+ /// get length of keystroke sequence for specified key binding
+ ///
+ [propget] HRESULT keyStrokeSequenceLength
+ (
+ [in] long keyBindingIndex,
+ [out] long *sequenceLength
+ );
+
+ ///
+ /// The returned sequence of key strokes describes one method
+ /// to invoke the associated action (the one from which you
+ /// obtained the object at which you called this method) by
+ /// pressing keys. The keys specified by each of the returned
+ /// key strokes have to be pressed at the same time (the
+ /// Control-key and the A-key for example). The keys of one key
+ /// stroke have to be released before pressing those of the next.
+ /// The order of the key strokes in the sequence define the order
+ /// in which to press them.
+ ///
+ [propget] HRESULT keyBinding
+ (
+ [in] long keyBindingIndex,
+ [in] long keyStrokeSequenceLength,
+ [out, size_is(,keyStrokeSequenceLength), length_is(,*actualKeyStrokeSequenceLength)]
+ ACCESSIBLE_KEYSTROKE **keyStroke,
+ [out, retval] long *actualKeyStrokeSequenceLength
+ );
+}
diff --git a/winaccessibility/source/UAccCOMIDL/AccessibleKeyStroke.idl b/winaccessibility/source/UAccCOMIDL/AccessibleKeyStroke.idl
new file mode 100644
index 000000000000..7e74497ee8cc
--- /dev/null
+++ b/winaccessibility/source/UAccCOMIDL/AccessibleKeyStroke.idl
@@ -0,0 +1,149 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+typedef struct _ACCESSIBLE_KEYSTROKE {
+ short modifiers;
+ short keyCode;
+ char keyChar;
+ short keyFunc;
+} ACCESSIBLE_KEYSTROKE;
+
+const short MODIFIER_SHIFT = 1;
+const short MODIFIER_CTRL = 2;
+const short MODIFIER_ALT = 4;
+
+const short KEYCODE_NUM0 = 256;
+const short KEYCODE_NUM1 = 257;
+const short KEYCODE_NUM2 = 258;
+const short KEYCODE_NUM3 = 259;
+const short KEYCODE_NUM4 = 260;
+const short KEYCODE_NUM5 = 261;
+const short KEYCODE_NUM6 = 262;
+const short KEYCODE_NUM7 = 263;
+const short KEYCODE_NUM8 = 264;
+const short KEYCODE_NUM9 = 265;
+const short KEYCODE_A = 512;
+const short KEYCODE_B = 513;
+const short KEYCODE_C = 514;
+const short KEYCODE_D = 515;
+const short KEYCODE_E = 516;
+const short KEYCODE_F = 517;
+const short KEYCODE_G = 518;
+const short KEYCODE_H = 519;
+const short KEYCODE_I = 520;
+const short KEYCODE_J = 521;
+const short KEYCODE_K = 522;
+const short KEYCODE_L = 523;
+const short KEYCODE_M = 524;
+const short KEYCODE_N = 525;
+const short KEYCODE_O = 526;
+const short KEYCODE_P = 527;
+const short KEYCODE_Q = 528;
+const short KEYCODE_R = 529;
+const short KEYCODE_S = 530;
+const short KEYCODE_T = 531;
+const short KEYCODE_U = 532;
+const short KEYCODE_V = 533;
+const short KEYCODE_W = 534;
+const short KEYCODE_X = 535;
+const short KEYCODE_Y = 536;
+const short KEYCODE_Z = 537;
+const short KEYCODE_F1 = 768;
+const short KEYCODE_F2 = 769;
+const short KEYCODE_F3 = 770;
+const short KEYCODE_F4 = 771;
+const short KEYCODE_F5 = 772;
+const short KEYCODE_F6 = 773;
+const short KEYCODE_F7 = 774;
+const short KEYCODE_F8 = 775;
+const short KEYCODE_F9 = 776;
+const short KEYCODE_F10 = 777;
+const short KEYCODE_F11 = 778;
+const short KEYCODE_F12 = 779;
+const short KEYCODE_F13 = 780;
+const short KEYCODE_F14 = 781;
+const short KEYCODE_F15 = 782;
+const short KEYCODE_F16 = 783;
+const short KEYCODE_F17 = 784;
+const short KEYCODE_F18 = 785;
+const short KEYCODE_F19 = 786;
+const short KEYCODE_F20 = 787;
+const short KEYCODE_F21 = 788;
+const short KEYCODE_F22 = 789;
+const short KEYCODE_F23 = 790;
+const short KEYCODE_F24 = 791;
+const short KEYCODE_F25 = 792;
+const short KEYCODE_F26 = 793;
+const short KEYCODE_DOWN = 1024;
+const short KEYCODE_UP = 1025;
+const short KEYCODE_LEFT = 1026;
+const short KEYCODE_RIGHT = 1027;
+const short KEYCODE_HOME = 1028;
+const short KEYCODE_END = 1029;
+const short KEYCODE_PAGEUP = 1030;
+const short KEYCODE_PAGEDOWN = 1031;
+const short KEYCODE_RETURN = 1280;
+const short KEYCODE_ESCAPE = 1281;
+const short KEYCODE_TAB = 1282;
+const short KEYCODE_BACKSPACE = 1283;
+const short KEYCODE_SPACE = 1284;
+const short KEYCODE_INSERT = 1285;
+const short KEYCODE_DELETE = 1286;
+const short KEYCODE_ADD = 1287;
+const short KEYCODE_SUBTRACT = 1288;
+const short KEYCODE_MULTIPLY = 1289;
+const short KEYCODE_DIVIDE = 1290;
+const short KEYCODE_POINT = 1291;
+const short KEYCODE_COMMA = 1292;
+const short KEYCODE_LESS = 1293;
+const short KEYCODE_GREATER = 1294;
+const short KEYCODE_EQUAL = 1295;
+const short KEYCODE_OPEN = 1296;
+const short KEYCODE_CUT = 1297;
+const short KEYCODE_COPY = 1298;
+const short KEYCODE_PASTE = 1299;
+const short KEYCODE_UNDO = 1300;
+const short KEYCODE_REPEAT = 1301;
+const short KEYCODE_FIND = 1302;
+const short KEYCODE_PROPERTIES = 1303;
+const short KEYCODE_FRONT = 1304;
+const short KEYCODE_CONTEXTMENU = 1305;
+const short KEYCODE_HELP = 1306;
+
+const short SHORTCUT_DONTKNOW = 0;
+const short NEW = 1;
+const short OPEN = 2;
+const short SAVE = 3;
+const short SAVEAS = 4;
+const short PRINT = 5;
+const short CLOSE = 6;
+const short QUIT = 7;
+const short CUT = 8;
+const short COPY = 9;
+const short PASTE = 10;
+const short UNDO = 11;
+const short REDO = 12;
+const short UNODELETE = 13;
+const short REPEAT = 14;
+const short FIND = 15;
+const short FINDBACKWARD = 16;
+const short PROPERTIES = 17;
+const short FRONT = 18;
diff --git a/winaccessibility/source/UAccCOMIDL/Charset.idl b/winaccessibility/source/UAccCOMIDL/Charset.idl
new file mode 100644
index 000000000000..059573224268
--- /dev/null
+++ b/winaccessibility/source/UAccCOMIDL/Charset.idl
@@ -0,0 +1,33 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+
+const short CHARSET_DONTKNOW = 0;
+const short ANSI = 1;
+const short MAC = 2;
+const short IBMPC_437 = 3;
+const short IBMPC_850 = 4;
+const short IBMPC_860 = 5;
+const short IBMPC_861 = 6;
+const short IBMPC_863 = 7;
+const short IBMPC_865 = 8;
+const short CHARSET_SYSTEM = 9;
+const short SYMBOL = 10;
diff --git a/winaccessibility/source/UAccCOMIDL/UAccCOM.idl b/winaccessibility/source/UAccCOMIDL/UAccCOM.idl
new file mode 100644
index 000000000000..c1de789fbdaa
--- /dev/null
+++ b/winaccessibility/source/UAccCOMIDL/UAccCOM.idl
@@ -0,0 +1,209 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+import "oaidl.idl";
+import "ocidl.idl";
+
+import "ia2_api_all.idl";
+import "defines.idl";
+
+ [
+ object,
+ uuid(D00F5EB7-588A-487F-A6F6-0B5D7D1815AA),
+ dual,
+ helpstring("IMAccessible Interface"),
+ pointer_default(unique)
+ ]
+ interface IMAccessible : IAccessible2
+ {
+ [id(1), helpstring("method Put_XAccName")] HRESULT Put_XAccName(const OLECHAR* pszName);
+ [id(2), helpstring("method Put_XAccRole")] HRESULT Put_XAccRole(unsigned short pRole);
+ [id(3), helpstring("method DecreaseState")] HRESULT DecreaseState(DWORD pXSate);
+ [id(4), helpstring("method IncreaseState")] HRESULT IncreaseState(DWORD pXSate);
+ [id(5), helpstring("method Put_XDescription")] HRESULT Put_XAccDescription(const OLECHAR* pszDescription);
+ [id(6), helpstring("method Put_XAccValue")] HRESULT Put_XAccValue(const OLECHAR* pszAccValue);
+ [id(7), helpstring("method SetState")] HRESULT SetState(DWORD pXSate);
+ [id(8), helpstring("method Put_XAccLocation")] HRESULT Put_XAccLocation(const Location sLocation);
+ [id(9), helpstring("method Put_XAccFocus")] HRESULT Put_XAccFocus(long dChildID);
+ [id(10), helpstring("method Put_XAccParent")] HRESULT Put_XAccParent(IMAccessible* pIParent);
+ [id(13), helpstring("method Put_XAccWindowHandle")] HRESULT Put_XAccWindowHandle(HWND hwnd);
+ [id(14), helpstring("method Put_XAccChildID")] HRESULT Put_XAccChildID(long dChildID);
+ [id(19), helpstring("method SetXAccessible")] HRESULT SetXAccessible( long XAccessible);
+ [id(20), helpstring("method GetUNOInterface")] HRESULT GetUNOInterface(long* UNOInterface);
+ [id(23), helpstring("method SetDefaultAction")] HRESULT SetDefaultAction(long pAction);
+ [id(24), helpstring("method Put_ActionDescription")] HRESULT Put_ActionDescription( const OLECHAR* szAction);
+ [id(25), helpstring("method Put_XAccAgent")] HRESULT Put_XAccAgent(long pAgent);
+ [id(26), helpstring("method NotifyDestroy")] HRESULT NotifyDestroy(BOOL isDestroy);
+ [id(30), helpstring("method Get_XAccChildID")] HRESULT Get_XAccChildID([out,retval] long* childID);
+ };
+ [
+ object,
+ uuid(951299EE-1841-4249-9E07-812C0739E489),
+ dual,
+ helpstring("IEnumVariant Interface"),
+ pointer_default(unique)
+ ]
+ interface IEnumVariant : IEnumVARIANT
+ {
+ [id(1), helpstring("method ClearEnumeration")] HRESULT ClearEnumeration();
+ [id(2), helpstring("method PutSelection")] HRESULT PutSelection(long pXSeletion);
+ };
+ [
+ object,
+ uuid(6641185C-E099-4C45-B753-3FBC0EE40646),
+ dual,
+ helpstring("IUNOXWrapper Interface"),
+ pointer_default(unique)
+ ]
+ interface IUNOXWrapper : IUnknown
+ {
+ [id(1), helpstring("method put_XInterface")] HRESULT put_XInterface(long pXInterface);
+ [id(2), helpstring("method put_XSubInterface")] HRESULT put_XSubInterface(long pXSubInterface);
+ [id(3), helpstring("method get_XInterface")] HRESULT get_XInterface([out,retval]long* pXInterface);
+ [id(4), helpstring("method get_XSubInterface")] HRESULT get_XSubInterface([out,retval]long* pXSubInterface);
+ };
+
+[
+ uuid(19ECB1B0-9376-4FF9-B580-223FC9C200B8),
+ version(1.0),
+ helpstring("UAccCOM 1.0 Type Library")
+]
+library UACCCOMLib
+{
+ importlib("stdole32.tlb");
+ importlib("stdole2.tlb");
+ importlib("oleacc.dll");
+
+ [
+ uuid(CF8DF8BA-44FE-4B10-BD2E-8C8CB322485F),
+ helpstring("MAccessible Class")
+ ]
+ coclass MAccessible
+ {
+ [default] interface IMAccessible;
+ };
+ [
+ uuid(152884E0-268B-4481-9AE7-1B372D3AA97F),
+ helpstring("EnumVariant Class")
+ ]
+ coclass EnumVariant
+ {
+ [default] interface IEnumVariant;
+ };
+ [
+ uuid(AA360FB0-BC98-41C1-A885-BB921F5ED601),
+ helpstring("UNOXWrapper Class")
+ ]
+ coclass UNOXWrapper
+ {
+ [default] interface IUNOXWrapper;
+ };
+
+ [
+ uuid(9FD9BA47-70AF-4160-99F1-526F2B9F111B),
+ helpstring("AccComponent Class")
+ ]
+ coclass AccComponent
+ {
+ [default] interface IAccessibleComponent;
+ };
+
+ [
+ uuid(8745CF0C-3104-4BAE-B7D0-D7B1717C006E),
+ helpstring("AccRelation Class")
+ ]
+ coclass AccRelation
+ {
+ [default] interface IAccessibleRelation;
+ };
+ [
+ uuid(AA49F20E-BB4E-400D-A5B0-6F5B7B770227),
+ helpstring("AccAction Class")
+ ]
+ coclass AccAction
+ {
+ [default] interface IAccessibleAction;
+ };
+
+ [
+ uuid(6D8AB08B-CCE9-471E-8A41-35773D5263F5),
+ helpstring("AccText Class")
+ ]
+ coclass AccText
+ {
+ [default] interface IAccessibleText;
+ };
+
+ [
+ uuid(79CE1450-1F61-48E2-BF76-C07BD10105E2),
+ helpstring("AccEditableText Class")
+ ]
+ coclass AccEditableText
+ {
+ [default] interface IAccessibleEditableText;
+ };
+
+ [
+ uuid(CC55D71B-1828-4EE0-89E2-C3749CF9C9AB),
+ helpstring("AccHypertext Class")
+ ]
+ coclass AccHypertext
+ {
+ [default] interface IAccessibletext;
+ };
+
+
+ [
+ uuid(73A45800-7A62-432C-A1A6-BF8852994331),
+ helpstring("AccImage Class")
+ ]
+ coclass AccImage
+ {
+ [default] interface IAccessibleImage;
+ };
+
+ [
+ uuid(730A561B-1AF6-49E1-9C04-9A2F48CD8512),
+ helpstring("AccValue Class")
+ ]
+ coclass AccValue
+ {
+ [default] interface IAccessibleValue;
+ };
+ [
+ uuid(92BAA62D-535A-4EAB-9ABB-BFA60B7A6DB6),
+ helpstring("AccTable Class")
+ ]
+ coclass AccTable
+ {
+ [default] interface IAccessibleTable;
+ };
+
+ [
+ uuid(519A64CD-F6A6-4793-BE50-4E36C4C593EF),
+ helpstring("AccHyperLink Class")
+ ]
+ coclass AccHyperLink
+ {
+ [default] interface IAccessibleAction;
+ };
+
+};
diff --git a/winaccessibility/source/UAccCOMIDL/defines.idl b/winaccessibility/source/UAccCOMIDL/defines.idl
new file mode 100644
index 000000000000..dc4e9aababb6
--- /dev/null
+++ b/winaccessibility/source/UAccCOMIDL/defines.idl
@@ -0,0 +1,40 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+import "objidl.idl";
+import "oaidl.idl";
+import "oleacc.idl";
+
+interface IMAccessible;
+
+const long UACC_NO_FOCUS=0xFFFF;
+
+typedef struct {
+ long m_dChildID;//identify a unique child node
+ IMAccessible* m_pIMAccessible;
+}AccChildNode;
+
+typedef struct Location {
+ long m_dLeft;
+ long m_dTop;
+ long m_dWidth;
+ long m_dHeight;
+}Location;
diff --git a/winaccessibility/source/UAccCOMIDL/ia2_api_all.idl b/winaccessibility/source/UAccCOMIDL/ia2_api_all.idl
new file mode 100644
index 000000000000..04a2e7b76349
--- /dev/null
+++ b/winaccessibility/source/UAccCOMIDL/ia2_api_all.idl
@@ -0,0 +1,5473 @@
+/*************************************************************************
+ *
+ * File Name (api_all_headers.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2013 Linux Foundation
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+import "objidl.idl";
+import "oaidl.idl";
+import "oleacc.idl";
+
+/*************************************************************************
+ *
+ * File Name (IA2CommonTypes.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2013 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+ /** These constants control the scrolling of an object or substring into a window.
+
+ This enum is used in IAccessible2::scrollTo and IAccessibleText::scrollSubstringTo.
+*/
+enum IA2ScrollType {
+
+ /** Scroll the top left corner of the object or substring such that the top left
+ corner (and as much as possible of the rest of the object or substring) is within
+ the top level window. In cases where the entire object or substring fits within
+ the top level window, the placement of the object or substring is dependent on
+ the application. For example, the object or substring may be scrolled to the
+ closest edge, the furthest edge, or midway between those two edges. In cases
+ where there is a hierarchy of nested scrollable controls, more than one control
+ may have to be scrolled.
+ */
+ IA2_SCROLL_TYPE_TOP_LEFT,
+
+ /** Scroll the bottom right corner of the object or substring such that the bottom right
+ corner (and as much as possible of the rest of the object or substring) is within
+ the top level window. In cases where the entire object or substring fits within
+ the top level window, the placement of the object or substring is dependent on
+ the application. For example, the object or substring may be scrolled to the
+ closest edge, the furthest edge, or midway between those two edges. In cases
+ where there is a hierarchy of nested scrollable controls, more than one control
+ may have to be scrolled.
+ */
+ IA2_SCROLL_TYPE_BOTTOM_RIGHT,
+
+ /** Scroll the top edge of the object or substring such that the top edge
+ (and as much as possible of the rest of the object or substring) is within the
+ top level window. In cases where the entire object or substring fits within
+ the top level window, the placement of the object or substring is dependent on
+ the application. For example, the object or substring may be scrolled to the
+ closest edge, the furthest edge, or midway between those two edges. In cases
+ where there is a hierarchy of nested scrollable controls, more than one control
+ may have to be scrolled.
+ */
+ IA2_SCROLL_TYPE_TOP_EDGE,
+
+ /** Scroll the bottom edge of the object or substring such that the bottom edge
+ (and as much as possible of the rest of the object or substring) is within the
+ top level window. In cases where the entire object or substring fits within
+ the top level window, the placement of the object or substring is dependent on
+ the application. For example, the object or substring may be scrolled to the
+ closest edge, the furthest edge, or midway between those two edges. In cases
+ where there is a hierarchy of nested scrollable controls, more than one control
+ may have to be scrolled.
+ */
+ IA2_SCROLL_TYPE_BOTTOM_EDGE,
+
+ /** Scroll the left edge of the object or substring such that the left edge
+ (and as much as possible of the rest of the object or substring) is within the
+ top level window. In cases where the entire object or substring fits within
+ the top level window, the placement of the object or substring is dependent on
+ the application. For example, the object or substring may be scrolled to the
+ closest edge, the furthest edge, or midway between those two edges. In cases
+ where there is a hierarchy of nested scrollable controls, more than one control
+ may have to be scrolled.
+ */
+ IA2_SCROLL_TYPE_LEFT_EDGE,
+
+ /** Scroll the right edge of the object or substring such that the right edge
+ (and as much as possible of the rest of the object or substring) is within the
+ top level window. In cases where the entire object or substring fits within
+ the top level window, the placement of the object or substring is dependent on
+ the application. For example, the object or substring may be scrolled to the
+ closest edge, the furthest edge, or midway between those two edges. In cases
+ where there is a hierarchy of nested scrollable controls, more than one control
+ may have to be scrolled.
+ */
+ IA2_SCROLL_TYPE_RIGHT_EDGE,
+
+ /** Scroll the object or substring such that as much as possible of the
+ object or substring is within the top level window. The placement of
+ the object is dependent on the application. For example, the object or
+ substring may be scrolled to to closest edge, the furthest edge, or midway
+ between those two edges.
+ */
+ IA2_SCROLL_TYPE_ANYWHERE
+};
+
+/** These constants define which coordinate system a point is located in.
+
+ This enum is used in IAccessible2::scrollToPoint, IAccessibleImage::imagePosition,
+ IAccessibleText::characterExtents, and IAccessibleText::offsetAtPoint, and
+ IAccessibleText::scrollSubstringToPoint.
+*/
+enum IA2CoordinateType {
+
+ /// The coordinates are relative to the screen.
+ IA2_COORDTYPE_SCREEN_RELATIVE,
+
+ /** The coordinates are relative to the upper left corner of the bounding box
+ of the immediate parent.
+ */
+ IA2_COORDTYPE_PARENT_RELATIVE
+
+};
+
+/** Special offsets for use in IAccessibleText and IAccessibleEditableText methods
+
+ Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for more information.
+*/
+enum IA2TextSpecialOffsets {
+ IA2_TEXT_OFFSET_LENGTH = -1, /**< This offset is equivalent to the length of the string. It eliminates
+ the need to call IAccessibleText::nCharacters. */
+ IA2_TEXT_OFFSET_CARET = -2 /**< This offset signifies that the text related to the physical location
+ of the caret should be used. */
+};
+
+/** These constants specify the kind of change made to a table.
+
+ This enum is used in the IA2TableModelChange struct which in turn is used by
+ IAccessibleTable::modelChange and IAccessibleTable2::modelChange.
+*/
+enum IA2TableModelChangeType {
+ IA2_TABLE_MODEL_CHANGE_INSERT, // = 0;
+ IA2_TABLE_MODEL_CHANGE_DELETE,
+ IA2_TABLE_MODEL_CHANGE_UPDATE
+};
+
+/** A structure defining the type of and extents of changes made to a table
+
+ IAccessibleTable::modelChange and IAccessibleTable2::modelChange return this struct.
+ In the case of an insertion or change the row and column offsets define the boundaries
+ of the inserted or changed subtable after the operation. In the case of a deletion
+ the row and column offsets define the boundaries of the subtable being removed before
+ the removal.
+*/
+typedef struct IA2TableModelChange {
+ enum IA2TableModelChangeType type; // insert, delete, update
+ long firstRow; ///< 0 based, inclusive
+ long lastRow; ///< 0 based, inclusive
+ long firstColumn; ///< 0 based, inclusive
+ long lastColumn; ///< 0 based, inclusive
+} IA2TableModelChange;
+/*************************************************************************
+ *
+ * File Name (AccessibleRelation.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2013 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+/** @defgroup grpRelations Relations
+ Use the following constants to compare against the BSTRs returned by
+ IAccessibleRelation::relationType.
+*/
+///@{
+
+/** The target object is the containing application object. */
+const WCHAR *const IA2_RELATION_CONTAINING_APPLICATION = L"containingApplication";
+
+/** The target object is the containing document object. The target object implements
+ the IAccessibleDocument interface.
+*/
+const WCHAR *const IA2_RELATION_CONTAINING_DOCUMENT = L"containingDocument";
+
+/** The target object is the containing tab pane object. */
+const WCHAR *const IA2_RELATION_CONTAINING_TAB_PANE = L"containingTabPane";
+
+/** The target object is the containing window object. */
+const WCHAR *const IA2_RELATION_CONTAINING_WINDOW = L"containingWindow";
+
+/** Some attribute of this object is affected by a target object. */
+const WCHAR *const IA2_RELATION_CONTROLLED_BY = L"controlledBy";
+
+/** This object is interactive and controls some attribute of a target object. */
+const WCHAR *const IA2_RELATION_CONTROLLER_FOR = L"controllerFor";
+
+/** This object is described by the target object. */
+const WCHAR *const IA2_RELATION_DESCRIBED_BY = L"describedBy";
+
+/** This object is describes the target object. */
+const WCHAR *const IA2_RELATION_DESCRIPTION_FOR = L"descriptionFor";
+
+/** This object is embedded by a target object. */
+const WCHAR *const IA2_RELATION_EMBEDDED_BY = L"embeddedBy";
+
+/** This object embeds a target object. This relation can be used on the
+ OBJID_CLIENT accessible for a top level window to show where the content
+ areas are.
+*/
+const WCHAR *const IA2_RELATION_EMBEDS = L"embeds";
+
+/** Content flows to this object from a target object.
+ This relation and IA2_RELATION_FLOWS_TO are useful to tie text and non-text
+ objects together in order to allow assistive technology to follow the
+ intended reading order.
+*/
+const WCHAR *const IA2_RELATION_FLOWS_FROM = L"flowsFrom";
+
+/** Content flows from this object to a target object. */
+const WCHAR *const IA2_RELATION_FLOWS_TO = L"flowsTo";
+
+/** This object is label for a target object. */
+const WCHAR *const IA2_RELATION_LABEL_FOR = L"labelFor";
+
+/** This object is labelled by a target object. Note that the double L spelling
+ which follows is preferred. Please use it instead. This single L version may
+ be removed in a later version.
+*/
+const WCHAR *const IA2_RELATION_LABELED_BY = L"labelledBy";
+
+/** This object is labelled by a target object. */
+const WCHAR *const IA2_RELATION_LABELLED_BY = L"labelledBy";
+
+/** This object is a member of a group of one or more objects. When
+ there is more than one object in the group each member may have one and the
+ same target, e.g. a grouping object. It is also possible that each member has
+ multiple additional targets, e.g. one for every other member in the group.
+*/
+const WCHAR *const IA2_RELATION_MEMBER_OF = L"memberOf";
+
+/** The target object is the next object in the tab order. */
+const WCHAR *const IA2_RELATION_NEXT_TABBABLE = L"nextTabbable";
+
+/** This object is a logical child of a target object. This relation is the reciprocal
+ of the IA2_RELATION_NODE_PARENT_OF relation. In some cases an application's accessible
+ tree is such that objects can be in a logical parent-child relationship which is
+ different from the hierarchy of the accessible tree. */
+const WCHAR *const IA2_RELATION_NODE_CHILD_OF = L"nodeChildOf";
+
+/** This object is a logical parent of a target object. This relation is the reciprocal
+ of the IA2_RELATION_NODE_CHILD_OF relation. In some cases an application's accessible
+ tree is such that objects can be in a logical parent-child relationship which is
+ different from the hierarchy of the accessible tree. */
+const WCHAR *const IA2_RELATION_NODE_PARENT_OF = L"nodeParentOf";
+
+/** This object is a parent window of the target object. */
+const WCHAR *const IA2_RELATION_PARENT_WINDOW_OF = L"parentWindowOf";
+
+/** This object is a transient component related to the target object.
+ When this object is activated the target object doesn't lose focus.
+*/
+const WCHAR *const IA2_RELATION_POPUP_FOR = L"popupFor";
+
+/** The target object is the previous object in the tab order. */
+const WCHAR *const IA2_RELATION_PREVIOUS_TABBABLE = L"previousTabbable";
+
+/** This object is a sub window of a target object. */
+const WCHAR *const IA2_RELATION_SUBWINDOW_OF = L"subwindowOf";
+
+///@}
+
+/** This interface gives access to an object's set of relations.
+*/
+[object, uuid(7CDF86EE-C3DA-496a-BDA4-281B336E1FDC)]
+interface IAccessibleRelation : IUnknown
+{
+ /** @brief Returns the type of the relation.
+ @param [out] relationType
+ The strings returned are defined @ref grpRelations "in this section of the documentation".
+ @retval S_OK
+ */
+ [propget] HRESULT relationType
+ (
+ [out, retval] BSTR *relationType
+ );
+
+ /** @brief Returns a localized version of the relation type.
+ @param [out] localizedRelationType
+ @retval S_OK
+ */
+ [propget] HRESULT localizedRelationType
+ (
+ [out, retval] BSTR *localizedRelationType
+ );
+
+ /** @brief Returns the number of targets for this relation.
+ @param [out] nTargets
+ @retval S_OK
+ */
+ [propget] HRESULT nTargets
+ (
+ [out, retval] long *nTargets
+ );
+
+ /** @brief Returns one accessible relation target.
+ @param [in] targetIndex
+ 0 based index
+ @param [out] target
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ @note Use QueryInterface to get IAccessible2.
+ */
+ [propget] HRESULT target
+ (
+ [in] long targetIndex,
+ [out, retval] IUnknown **target
+ );
+
+ /** @brief Returns multiple accessible relation targets
+ @param [in] maxTargets
+ maximum size of the array allocated by the client
+ @param [out] targets
+ The array of target objects. Note that this array is to be allocated by the
+ client and freed when no longer needed. Refer to @ref _arrayConsideration
+ "Special Consideration when using Arrays" for more details. You will need to use
+ QueryInterface on the IUnknown to get the IAccessible2.
+ @param [out] nTargets
+ actual number of targets in the returned array (not more than maxTargets)
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed, e.g. a negative value
+ */
+ [propget] HRESULT targets
+ (
+ [in] long maxTargets,
+ [out, size_is(maxTargets), length_is(*nTargets)]
+ IUnknown **targets,
+ [out, retval] long *nTargets
+ );
+
+}
+/*************************************************************************
+ *
+ * File Name (AccessibleAction.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2013 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+/** This enum defines values which are predefined actions for use when implementing
+ support for media.
+
+ This enum is used when specifying an action for IAccessibleAction::doAction.
+*/
+
+enum IA2Actions {
+ IA2_ACTION_OPEN = -1, /**< Used to inform the server that the client will
+ signal via IA2_ACTION_COMPLETE when it has consumed
+ the content provided by the object. This action
+ allows the object's server to wait for all clients
+ to signal their readiness for additional content.
+ Any form of content generation that requires
+ synchronization with an AT would require use of this
+ action. One example is the generation of text describing
+ visual content not obvious from a video's sound track.
+ In this scenario the Text to Speech or Braille output
+ may take more time than the related length of silence
+ in the video's sound track. */
+ IA2_ACTION_COMPLETE = -2, /**< Used by the client to inform the server that it has
+ consumed the most recent content provided by this object. */
+ IA2_ACTION_CLOSE = -3 /**< Used to inform the server that the client no longer
+ requires synchronization. */
+};
+
+/** @brief This interface gives access to actions that can be executed
+ for accessible objects.
+
+ Every accessible object that can be manipulated via the native GUI beyond the
+ methods available either in the MSAA IAccessible interface or in the set of
+ IAccessible2 interfaces (other than this IAccessibleAction interface) should
+ support the IAccessibleAction interface in order to provide Assistive Technology
+ access to all the actions that can be performed by the object. Each action can
+ be performed or queried for a name, description or associated key bindings.
+ Actions are needed more for ATs that assist the mobility impaired, such as
+ on-screen keyboards and voice command software. By providing actions directly,
+ the AT can present them to the user without the user having to perform the extra
+ steps to navigate a context menu.
+
+ The first action should be equivalent to the MSAA default action. If there is
+ only one action, %IAccessibleAction should also be implemented.
+*/
+[object, uuid(B70D9F59-3B5A-4dba-AB9E-22012F607DF5)]
+interface IAccessibleAction : IUnknown
+{
+
+ /** @brief Returns the number of accessible actions available in this object.
+
+ If there are more than one, the first one is considered the
+ "default" action of the object.
+ @param [out] nActions
+ The returned value of the number of actions is zero if there are
+ no actions.
+ @retval S_OK
+ @note This method is missing a [propget] prefix in the IDL. The result is the
+ method is named nActions in generated C++ code instead of get_nActions.
+ */
+ HRESULT nActions
+ (
+ [out,retval] long* nActions
+ );
+
+ /** @brief Performs the specified Action on the object.
+ @param [in] actionIndex
+ 0 based index specifying the action to perform. If it lies outside
+ the valid range no action is performed.
+ @retval S_OK
+ @retval S_FALSE if action could not be performed
+ @retval E_INVALIDARG if bad [in] passed
+ @note If implementing support for media, refer to the predefined constants in the ::IA2Actions enum.
+ */
+ HRESULT doAction
+ (
+ [in] long actionIndex
+ );
+
+ /** @brief Returns a description of the specified action of the object.
+ @param [in] actionIndex
+ 0 based index specifying which action's description to return.
+ If it lies outside the valid range an empty string is returned.
+ @param [out] description
+ The returned value is a localized string of the specified action.
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT description
+ (
+ [in] long actionIndex,
+ [out, retval] BSTR *description
+ );
+
+ /** @brief Returns an array of BSTRs describing one or more key bindings, if
+ there are any, associated with the specified action.
+
+ The returned strings are the localized human readable key sequences to be
+ used to activate each action, e.g. "Ctrl+Shift+D". Since these key
+ sequences are to be used when the object has focus, they are like
+ mnemonics (access keys), and not like shortcut (accelerator) keys.
+
+ There is no need to implement this method for single action controls since
+ that would be redundant with the standard MSAA programming practice of
+ getting the mnemonic from get_accKeyboardShortcut.
+
+ An AT such as an On Screen Keyboard might not expose these bindings but
+ provide alternative means of activation.
+
+ Note: the client allocates and passes in an array of pointers. The server
+ allocates the BSTRs and passes back one or more pointers to these BSTRs into
+ the array of pointers allocated by the client. The client is responsible
+ for deallocating the BSTRs.
+
+ @param [in] actionIndex
+ 0 based index specifying which action's key bindings should be returned.
+ @param [in] nMaxBindings
+ This parameter is ignored. Refer to @ref _arrayConsideration
+ "Special Consideration when using Arrays" for more details.
+ @param [out] keyBindings
+ An array of BSTRs, allocated by the server, one for each key binding.
+ The client must free it with CoTaskMemFree.
+ @param [out] nBindings
+ The number of key bindings returned; the size of the returned array.
+ @retval S_OK
+ @retval S_FALSE if there are no key bindings, [out] values are NULL and 0 respectively
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT keyBinding
+ (
+ [in] long actionIndex,
+ [in] long nMaxBindings,
+ [out, size_is(,nMaxBindings), length_is(,*nBindings)] BSTR **keyBindings,
+ [out, retval] long *nBindings
+ );
+
+ /** @brief Returns the non-localized name of specified action.
+ @param [in] actionIndex
+ 0 based index specifying which action's non-localized name should be returned.
+ @param [out] name
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT name
+ (
+ [in] long actionIndex,
+ [out, retval] BSTR *name
+ );
+
+ /** @brief Returns the localized name of specified action.
+ @param [in] actionIndex
+ 0 based index specifying which action's localized name should be returned.
+ @param [out] localizedName
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT localizedName
+ (
+ [in] long actionIndex,
+ [out, retval] BSTR *localizedName
+ );
+
+}
+/*************************************************************************
+ *
+ * File Name (AccessibleRole.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2013 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+/** Collection of roles
+
+ This enumerator defines an extended set of accessible roles of objects implementing
+ the %IAccessible2 interface. These roles are in addition to the MSAA roles obtained
+ through the MSAA get_accRole method. Examples are 'footnote', 'heading', and
+ 'label'. You obtain an object's %IAccessible2 roles by calling IAccessible2::role.
+*/
+enum IA2Role {
+
+ /** Unknown role. The object contains some Accessible information, but its
+ role is not known.
+ */
+ IA2_ROLE_UNKNOWN = 0,
+
+ /** An object that can be drawn into and to manage events from the objects
+ drawn into it. Also refer to ::IA2_ROLE_FRAME,
+ ::IA2_ROLE_GLASS_PANE, and ::IA2_ROLE_LAYERED_PANE.
+ */
+ IA2_ROLE_CANVAS = 0x401,
+
+ /// A caption describing another object.
+ IA2_ROLE_CAPTION,
+
+ /// Used for check buttons that are menu items.
+ IA2_ROLE_CHECK_MENU_ITEM,
+
+ /// A specialized dialog that lets the user choose a color.
+ IA2_ROLE_COLOR_CHOOSER,
+
+ /// A date editor.
+ IA2_ROLE_DATE_EDITOR,
+
+ /** An iconified internal frame in an ::IA2_ROLE_DESKTOP_PANE.
+ Also refer to ::IA2_ROLE_INTERNAL_FRAME.
+ */
+ IA2_ROLE_DESKTOP_ICON,
+
+ /** A desktop pane. A pane that supports internal frames and iconified
+ versions of those internal frames. Also refer to ::IA2_ROLE_INTERNAL_FRAME.
+ */
+ IA2_ROLE_DESKTOP_PANE,
+
+ /** A directory pane. A pane that allows the user to navigate through
+ and select the contents of a directory. May be used by a file chooser.
+ Also refer to ::IA2_ROLE_FILE_CHOOSER.
+ */
+ IA2_ROLE_DIRECTORY_PANE,
+
+ /** An editable text object in a toolbar. <b>Deprecated.</b>
+ The edit bar role was meant for a text area in a tool bar. However, to detect
+ a text area in a tool bar the AT can query the parent.
+ */
+ IA2_ROLE_EDITBAR,
+
+ /// Embedded (OLE) object.
+ IA2_ROLE_EMBEDDED_OBJECT,
+
+ /// Text that is used as an endnote (footnote at the end of a chapter or section).
+ IA2_ROLE_ENDNOTE,
+
+ /** A file chooser. A specialized dialog that displays the files in the
+ directory and lets the user select a file, browse a different directory,
+ or specify a filename. May use the directory pane to show the contents of
+ a directory.
+ Also refer to ::IA2_ROLE_DIRECTORY_PANE.
+ */
+ IA2_ROLE_FILE_CHOOSER,
+
+ /** A font chooser. A font chooser is a component that lets the user pick
+ various attributes for fonts.
+ */
+ IA2_ROLE_FONT_CHOOSER,
+
+ /** Footer of a document page.
+ Also refer to ::IA2_ROLE_HEADER.
+ */
+ IA2_ROLE_FOOTER,
+
+ /// Text that is used as a footnote. Also refer to ::IA2_ROLE_ENDNOTE.
+ IA2_ROLE_FOOTNOTE,
+
+ /** A container of form controls. An example of the use of this role is to
+ represent an HTML FORM tag.
+ */
+ IA2_ROLE_FORM,
+
+ /** Frame role. A top level window with a title bar, border, menu bar, etc.
+ It is often used as the primary window for an application. Also refer to
+ ::IA2_ROLE_CANVAS and the MSAA roles of dialog and window.
+ */
+ IA2_ROLE_FRAME,
+
+ /** A glass pane. A pane that is guaranteed to be painted on top of all panes
+ beneath it. Also refer to ::IA2_ROLE_CANVAS, ::IA2_ROLE_INTERNAL_FRAME, and
+ ::IA2_ROLE_ROOT_PANE.
+ */
+ IA2_ROLE_GLASS_PANE,
+
+ /** Header of a document page.
+ Also refer to ::IA2_ROLE_FOOTER.
+ */
+ IA2_ROLE_HEADER,
+
+ /// Heading. Use the IAccessible2::attributes level attribute to determine the heading level.
+ IA2_ROLE_HEADING,
+
+ /// A small fixed size picture, typically used to decorate components.
+ IA2_ROLE_ICON,
+
+ /** An image map object. Usually a graphic with multiple hotspots, where
+ each hotspot can be activated resulting in the loading of another document
+ or section of a document.
+ */
+ IA2_ROLE_IMAGE_MAP,
+
+ /** An object which is used to allow input of characters not found on a keyboard,
+ such as the input of Chinese characters on a Western keyboard.
+ */
+ IA2_ROLE_INPUT_METHOD_WINDOW,
+
+ /** An internal frame. A frame-like object that is clipped by a desktop pane.
+ The desktop pane, internal frame, and desktop icon objects are often used to
+ create multiple document interfaces within an application.
+ Also refer to ::IA2_ROLE_DESKTOP_ICON, ::IA2_ROLE_DESKTOP_PANE, and ::IA2_ROLE_FRAME.
+ */
+ IA2_ROLE_INTERNAL_FRAME,
+
+ /// An object used to present an icon or short string in an interface.
+ IA2_ROLE_LABEL,
+
+ /** A layered pane. A specialized pane that allows its children to be drawn
+ in layers, providing a form of stacking order. This is usually the pane that
+ holds the menu bar as well as the pane that contains most of the visual
+ components in a window.
+ Also refer to ::IA2_ROLE_CANVAS, ::IA2_ROLE_GLASS_PANE, and ::IA2_ROLE_ROOT_PANE.
+ */
+ IA2_ROLE_LAYERED_PANE,
+
+ /** A section whose content is parenthetic or ancillary to the main content
+ of the resource.
+ */
+ IA2_ROLE_NOTE,
+
+ /** A specialized pane whose primary use is inside a dialog.
+ Also refer to MSAA's dialog role.
+ */
+ IA2_ROLE_OPTION_PANE,
+
+ /** An object representing a page of document content. It is used in documents
+ which are accessed by the user on a page by page basis.
+ */
+ IA2_ROLE_PAGE,
+
+ /// A paragraph of text.
+ IA2_ROLE_PARAGRAPH,
+
+ /** A radio button that is a menu item.
+ Also refer to MSAA's button and menu item roles.
+ */
+ IA2_ROLE_RADIO_MENU_ITEM,
+
+ /** An object which is redundant with another object in the accessible hierarchy.
+ ATs typically ignore objects with this role.
+ */
+ IA2_ROLE_REDUNDANT_OBJECT,
+
+ /** A root pane. A specialized pane that has a glass pane and a layered pane
+ as its children.
+ Also refer to ::IA2_ROLE_GLASS_PANE and ::IA2_ROLE_LAYERED_PANE
+ */
+ IA2_ROLE_ROOT_PANE,
+
+ /** A ruler such as those used in word processors.
+ */
+ IA2_ROLE_RULER,
+
+ /** A scroll pane. An object that allows a user to incrementally view a large
+ amount of information. Its children can include scroll bars and a viewport.
+ Also refer to ::IA2_ROLE_VIEW_PORT and MSAA's scroll bar role.
+ */
+ IA2_ROLE_SCROLL_PANE,
+
+ /** A container of document content. An example of the use of this role is to
+ represent an HTML DIV tag. A section may be used as a region. A region is a
+ group of elements that together form a perceivable unit. A region does not
+ necessarily follow the logical structure of the content, but follows the
+ perceivable structure of the page. A region may have an attribute in the set
+ of IAccessible2::attributes which indicates that it is "live". A live region
+ is content that is likely to change in response to a timed change, a user
+ event, or some other programmed logic or event.
+ */
+ IA2_ROLE_SECTION,
+
+ /// Object with graphical representation used to represent content on draw pages.
+ IA2_ROLE_SHAPE,
+
+ /** A split pane. A specialized panel that presents two other panels at the
+ same time. Between the two panels is a divider the user can manipulate to make
+ one panel larger and the other panel smaller.
+ */
+ IA2_ROLE_SPLIT_PANE,
+
+ /** An object that forms part of a menu system but which can be "undocked"
+ from or "torn off" the menu system to exist as a separate window.
+ */
+ IA2_ROLE_TEAR_OFF_MENU,
+
+ /// An object used as a terminal emulator.
+ IA2_ROLE_TERMINAL,
+
+ /// Collection of objects that constitute a logical text entity.
+ IA2_ROLE_TEXT_FRAME,
+
+ /** A toggle button. A specialized push button that can be checked or unchecked,
+ but does not provide a separate indicator for the current state.
+ Also refer to MSAA's roles of push button, check box, and radio button.
+ <BR><B>Note:</B> IA2_ROLE_TOGGLE_BUTTON should not be used. Instead, use MSAA's
+ ROLE_SYSTEM_PUSHBUTTON and STATE_SYSTEM_PRESSED.
+ */
+ IA2_ROLE_TOGGLE_BUTTON,
+
+ /** A viewport. An object usually used in a scroll pane. It represents the
+ portion of the entire data that the user can see. As the user manipulates
+ the scroll bars, the contents of the viewport can change.
+ Also refer to ::IA2_ROLE_SCROLL_PANE.
+ */
+ IA2_ROLE_VIEW_PORT,
+
+ /** An object containing content which is complementary to the main content of
+ a document, but remains meaningful when separated from the main content. There
+ are various types of content that would appropriately have this role. For example,
+ in the case where content is delivered via a web portal to a web browser, this may
+ include but not be limited to show times, current weather, related articles, or
+ stocks to watch. The complementary role indicates that contained content is relevant
+ to the main content. If the complementary content is completely separable main
+ content, it may be appropriate to use a more general role.
+ */
+ IA2_ROLE_COMPLEMENTARY_CONTENT
+
+};
+/*************************************************************************
+ *
+ * File Name (AccessibleStates.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2010 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+typedef long AccessibleStates;
+
+/** %IAccessible2 specific state bit constants
+
+ This enum defines the state bits returned by IAccessible2::states. The
+ %IAccessible2 state bits are in addition to those returned by MSAA.
+*/
+enum IA2States {
+
+/** Indicates a window is currently the active window, or is an active subelement
+ within a container or table.
+
+ This state can be used to indicate the current active item in a container, even
+ if the container itself is not currently active. In other words this would indicate
+ the item that will get focus if you tab to the container.
+
+ This information is important for knowing what to report for trees and potentially
+ other containers in a virtual buffer.
+
+ Also, see ::IA2_STATE_MANAGES_DESCENDANTS for more information.
+*/
+IA2_STATE_ACTIVE = 0x1,
+
+/** Indicates that the object is armed.
+
+ Used to indicate that the control is "pressed" and will be invoked when the
+ actuator, e.g. a mouse button, is "released". An AT which either monitors the
+ mouse or synthesizes mouse events might need to know that, and possibly a talking
+ interface would even let the user know about it. It could also potentially be
+ useful to on screen keyboards or test tools since the information does indicate
+ something about the state of the interface, for example, code operating asynchronously
+ might need to wait for the armed state to change before doing something else.
+
+*/
+IA2_STATE_ARMED = 0x2,
+
+/** Indicates the user interface object corresponding to this object no longer exists. */
+IA2_STATE_DEFUNCT = 0x4,
+
+/** An object with this state has a caret and implements the IAccessibleText interface.
+
+ Such fields may be read-only, so STATE_SYSTEM_READONLY is valid in combination
+ with IA2_STATE_EDITABLE.
+
+*/
+IA2_STATE_EDITABLE = 0x8,
+
+/** Indicates the orientation of this object is horizontal. */
+IA2_STATE_HORIZONTAL = 0x10,
+
+/** Indicates this object is minimized and is represented only by an icon. */
+IA2_STATE_ICONIFIED = 0x20,
+
+/** Indicates an input validation failure. */
+IA2_STATE_INVALID_ENTRY = 0x40,
+
+/** Indicates that this object manages its children.
+
+ Note: Due to the fact that MSAA's WinEvents don't allow the active child index
+ to be passed on the IA2_EVENT_ACTIVE_DESCENDANT_CHANGED event, the manages
+ descendants scheme can't be used. Instead the active child object has to fire
+ MSAA's EVENT_OBJECT_FOCUS. In a future release a new event mechanism may be
+ added to provide for event specific data to be passed with the event. At that
+ time the IA2_EVENT_ACTIVE_DECENDENT_CHANGED event and
+ IA2_STATE_MANAGES_DESCENDANTS state would be useful.
+*/
+IA2_STATE_MANAGES_DESCENDANTS = 0x80,
+
+/** Indicates that an object is modal.
+
+ Modal objects have the behavior that something must be done with the object
+ before the user can interact with an object in a different window.
+*/
+IA2_STATE_MODAL = 0x100,
+
+/** Indicates this text object can contain multiple lines of text. */
+IA2_STATE_MULTI_LINE = 0x200,
+
+/** Indicates this object paints every pixel within its rectangular region. */
+IA2_STATE_OPAQUE = 0x400,
+
+/** Indicates that user interaction is required.
+
+ An example of when this state is used is when a field in a form must be filled
+ before a form can be processed.
+*/
+IA2_STATE_REQUIRED = 0x800,
+
+/** Indicates an object which supports text selection.
+
+ Note: This is different than MSAA STATE_SYSTEM_SELECTABLE.
+*/
+IA2_STATE_SELECTABLE_TEXT = 0x1000,
+
+/** Indicates that this text object can contain only a single line of text. */
+IA2_STATE_SINGLE_LINE = 0x2000,
+
+/** Indicates that the accessible object is stale.
+
+ This state is used when the accessible object no longer accurately
+ represents the state of the object which it is representing such as when an
+ object is transient or when an object has been or is in the process of being
+ destroyed or when the object's index in its parent has changed.
+*/
+IA2_STATE_STALE = 0x4000,
+
+/** Indicates that the object implements autocompletion.
+
+ This state indicates that a text control will respond to the input of
+ one ore more characters and cause a sub-item to become selected. The
+ selection may also result in events fired on the parent object.
+*/
+IA2_STATE_SUPPORTS_AUTOCOMPLETION = 0x8000,
+
+/** Indicates this object is transient.
+
+ An object has this state when its parent object has the state ::IA2_STATE_MANAGES_DESCENDANTS.
+ For example, a list item object may be managed by its parent list object and may only
+ exist as long as the object is actually rendered. Similarly a table cell's accessible
+ object may exist only while the cell has focus. However, from the perspective of an
+ assistive technology a transient object behaves like a non-transient object. As a
+ result it is likely that this state is not of use to an assistive technology, but it
+ is provided in case an assistive technology determines that knowledge of the transient
+ nature of the object is useful and also for harmony with the Linux accessibility API.
+
+ Also, see ::IA2_STATE_MANAGES_DESCENDANTS for more information.
+ */
+IA2_STATE_TRANSIENT = 0x10000,
+
+/** Indicates the orientation of this object is vertical. */
+IA2_STATE_VERTICAL = 0x20000,
+
+/** Indicates this object is checkable.
+
+ The standard checkable objects are check boxes, radio buttons, check box menu
+ items, radio menu items, and toggle buttons. Since assistive technology will
+ determine that these objects are checkable via the object's role the checkable
+ state is not required. However, this state is necessary in those cases where
+ an object has a role which is not one of the previously mentioned roles. An
+ example is a table cell which indicates whether or not an email has an attachment,
+ whether or not an mail is considered spam, and whether or not an email has been read.
+ */
+IA2_STATE_CHECKABLE = 0x40000,
+
+/** Indicates this object is pinned.
+
+ This state indicates that an object is fixed at a certain location. One example
+ is a browser tab that when pinned cannot be moved until unpinned. Another example
+ is a movable or floating object that when pinned remains in its pinned location
+ until being unpinned.
+ */
+IA2_STATE_PINNED = 0x80000
+
+};
+/*************************************************************************
+ *
+ * File Name (Accessible2.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2013 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+/** @mainpage
+
+ @section _interfaces Interfaces
+ IAccessible2\n
+ IAccessible2_2\n
+ IAccessibleAction\n
+ IAccessibleApplication\n
+ IAccessibleComponent\n
+ IAccessibleDocument\n
+ IAccessibleEditableText\n
+ IAccessibleHypertext\n
+ IAccessibleHypertext2\n
+ IAccessibleHyperlink\n
+ IAccessibleImage\n
+ IAccessibleRelation\n
+ IAccessibleTable [Deprecated]\n
+ IAccessibleTable2\n
+ IAccessibleTableCell\n
+ IAccessibleText\n
+ IAccessibleText2\n
+ IAccessibleValue
+
+ @section _structs Structs
+ IA2Locale\n
+ IA2TableModelChange\n
+ IA2TextSegment
+
+ @section _enums Enums
+ ::IA2Actions values are predefined actions for use when implementing support for HTML5 media.\n
+ ::IA2CoordinateType values define the requested coordinate type (screen or parent window).\n
+ ::IA2EventID values identify events.\n
+ ::IA2Role values defines roles which are in addition to the existing MSAA roles.\n
+ ::IA2ScrollType values define where to place an object or substring on the screen.\n
+ ::IA2States values define states which are in addition to the existing MSAA states.\n
+ ::IA2TableModelChangeType values describe the kinds of changes made to a table (insert, delete, update).\n
+ ::IA2TextBoundaryType values define the requested text unit (character, word, sentence, line, paragraph).\n
+ ::IA2TextSpecialOffsets values define special offsets for use in the text interfaces.
+
+ @section _constants Constants
+ @ref grpRelations
+
+ @section _misc Miscellaneous
+ @ref _licensePage "BSD License"\n
+ @ref _generalInfo "General Information"\n
+
+ @page _licensePage BSD License
+ %IAccessible2 IDL Specification
+
+ Copyright (c) 2007, 2013 Linux Foundation\n
+ Copyright (c) 2006 IBM Corporation\n
+ Copyright (c) 2000, 2006 Sun Microsystems, Inc.\n
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials
+ provided with the distribution.
+
+ 3. Neither the name of the Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products
+ derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ BSD License" as published at:
+ http://www.opensource.org/licenses/bsd-license.php
+
+ %IAccessible2 is a trademark of the Linux Foundation. The %IAccessible2
+ mark may be used in accordance with the
+ <a href="http://www.linuxfoundation.org/collaborate/workgroups/accessibility/trademark-policy">
+ Linux Foundation Trademark Policy</a> to indicate compliance with the %IAccessible2 specification.
+
+ @page _generalInfo General Information
+ The following information is applicable to two or more interfaces.
+
+ @ref _errors\n
+ @ref _memory\n
+ &nbsp;&nbsp;@ref _arrayConsideration\n
+ @ref _indexes\n
+ @ref _enumBase\n
+ @ref _specialOffsets\n
+ @ref _dicoveringInterfaces\n
+ @ref _changingInterfaces\n
+ @ref _applicationInfo\n
+ @ref _childIDs\n
+ @ref _variants\n
+ @ref _iaaction-iahyperlink\n
+ @ref _trademark
+
+ @section _errors Error Handling
+ HRESULT values are defined by the Microsoft&reg; Win32&reg; API. For more information, refer to
+ <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa378137%28v=vs.85%29.aspx">
+ Interpreting HRESULT Values</a> in MSDN&reg;.
+
+ Note that the S_FALSE return value is considered a non-error value and the
+ SUCCEEDED macro will return TRUE. S_FALSE is used when there is no failure
+ but there was nothing valid to return, e.g. in IAccessible2::attributes when
+ there are no attributes. When S_FALSE is returned [out] pointer types should
+ be NULL and [out] longs should generally be 0, but sometimes -1 is used such
+ as IAccessible2::indexInParent, IAccessibleText::caretOffset, and
+ IAccessibleHypertext::hyperlinkIndex.
+
+ Note that for BSTR [out] variables common COM practice is that the server does
+ the SysAllocString and the client does the SysFreeString. Also note that when
+ NULL is returned there is no need for the client to call SysFreeString. Please
+ refer to the documentation for each method for more details regarding error handling.
+
+ @section _memory Memory Management
+ The following memory management issues should be considered:
+ @li Although [out] BSTR variables are declared by the client, their space is
+ allocated by the server. They need to be freed with SysFreeString by the
+ client at end of life; the same is true when BSTRs are used in structs or
+ arrays which are passed to the server.
+ @li If there is no valid [out] BSTR to return, the server should return S_FALSE and
+ assign NULL to the output, e.g. *theOutBSTR = NULL;.
+ @li COM interfaces need to be referenced with AddRef when used and dereferenced
+ with Release at end of life.
+ @li Single [out] longs, HWNDs, booleans, and structs are declared by the caller
+ and passed by reference. The marshaller does all the memory management.
+
+ The following articles may be helpful for understanding memory management issues:
+ @li An article by Don Box in a
+ <a href="http://www.microsoft.com/msj/1196/activex1196.aspx">Q & A section</a>
+ of the November 1996 edition of the Microsoft Systems Journal.
+ @li A posting to a CodeGuru forum,
+ <a href="http://www.codeguru.com/forum/showthread.php?t=364511">Windows SDK
+ String: What are the rules for BSTR allocation and deallocation?</a>
+
+ @subsection _arrayConsideration Special Consideration when using Arrays
+ There are several methods which return arrays. In the case of IAccessible2::relations
+ and IAccessibleRelation::targets the client must allocate and free the arrays.
+
+ For the remaining methods which return arrays, the server must allocate the array
+ and the client must free the array when no longer needed. These methods are
+ IAccessible2::extendedStates, IAccessible2::localizedExtendedStates,
+ IAccessible2_2::relationTargetsOfType, IAccessibleAction::keyBinding,
+ IAccessibleHypertext2::hyperlinks, IAccessibleTable::selectedChildren,
+ IAccessibleTable::selectedColumns, IAccessibleTable::selectedRows,
+ IAccessibleTable2::selectedCells, IAccessibleTable2::selectedColumns,
+ IAccessibleTable2::selectedRows, IAccessibleTableCell::columnHeaderCells,
+ and IAccessibleTableCell::rowHeaderCells.
+ For those methods, the server must allocate both the top level array and any storage
+ associated with it, e.g. for BSTRs. The server must allocate the arrays with
+ CoTaskMemAlloc and any BSTRs with SysAllocString. The client must use CoTaskMemFree
+ to free the array and any BSTRs must be freed with SysFreeString.
+
+ Also, the IDL for IAccessible2::extendedStates, IAccessible2::localizedExtendedStates,
+ IAccessibleAction::keyBinding, IAccessibleTable::selectedChildren,
+ IAccessibleTable::selectedColumns, and IAccessibleTable::selectedRows includes an
+ extraneous [in] parameter for the caller to specify the max size of the array.
+ This parameter will be ignored by the COM server.
+
+ @section _indexes Zero and One Based Indexes
+ Unless otherwise specified all offsets and indexes are 0 based.
+
+ @section _enumBase Enum Base
+ Note that enums start at 0.
+
+ @section _specialOffsets Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods
+ IAccessibleText and IAccessibleEditableText can use one or more of the following
+ special offset values. They are defined in the ::IA2TextSpecialOffsets enum.
+ @li Using ::IA2_TEXT_OFFSET_LENGTH (-1) as an offset in any of the IAccessibleText or
+ IAccessibleEditableText methods is the same as specifying the length of the string.
+ @li Using ::IA2_TEXT_OFFSET_CARET (-2) as an offset for IAccessibleText::textBeforeOffset,
+ IAccessibleText::textAtOffset, and IAccessibleText::textAfterOffset indicates that the
+ text related to the physical location of the caret should be used. This is needed for
+ applications that consider the character offset of the end of one line (as reached by
+ pressing the End key) the same as the offset of the first character on the next line.
+ Since the same offset is associated with two different lines a special means is needed
+ to fetch text from the line where the caret is physically located.
+
+ @section _dicoveringInterfaces Discovery of Interfaces
+ In general AT (Assistive Technology) should try IAccessible2 interfaces, followed by using
+ the MSAA (Microsoft&reg; Active Accessibility&reg;) interfaces. (In cases where the an application
+ is known to have custom interfaces which provide information not supplied by IAccessible2
+ or MSAA, then those custom interfaces can be used.) The AT can then, by default, support
+ unknown IAccessible2/MSAA applications, without the application developers having to request
+ AT vendors for support on an individual application by application basis.
+
+ When you have a reference to an IAccessible and require a reference to an IAccessible2 use
+ QueryService as follows:
+ @code
+ // pAcc is a reference to the accessible object's IAccessible interface.
+ IServiceProvider *pService = NULL;
+ hr = pAcc->QueryInterface(IID_IServiceProvider, (void **)&pService);
+ if(SUCCEEDED(hr)) {
+ IAccessible2 *pIA2 = NULL;
+ hr = pService->QueryService(IID_IAccessible, IID_IAccessible2, (void**)&pIA2);
+ if (SUCCEEDED(hr) && pIA2) {
+ // The control supports IAccessible2.
+ // pIA2 is the reference to the accessible object's IAccessible2 interface.
+ }
+ }
+ @endcode
+
+ @section _changingInterfaces Changing between Accessible Interfaces
+ Note that developers must always implement MSAA's IAccessible and, if needed, some
+ of the interfaces in the set of IAccessible2 interfaces. Although the IAccessible2
+ IDL is coded such that IAccessible2 is a subclass of MSAA's IAccessible, none of
+ MSAA's IAccessible methods are redefined by IAccessible2.
+
+ QueryService must be used to switch from a reference to an MSAA IAccessible interface
+ to another interface. This has been
+ <a href="http://www.atia.org/files/public/Introducing_IAccessibleEx.doc">
+ documented</a> and the pertinent facts have been extracted below:
+
+ @par
+ Why use QueryService instead of just using QueryInterface to get IAccessibleEx
+ directly? The reason is that since MSAA 2.0, clients don't talk to a server's
+ IAccessible interface directly; instead they talk to an intermediate MSAA-provided
+ wrapper that calls through to the original IAccessible. This wrapper provides services
+ such as implementing IDispatch, supplying information from MSAA 2.0's Dynamic Annotation
+ service, and scaling locations when running on Windows Vista with DPI scaling enabled.
+ QueryService is the supported way to expose additional interfaces from an existing
+ IAccessible and was originally used by MSHTML to expose IHTMLElement objects corresponding
+ to IAccessibles. QueryService is often more convenient for servers to implement than
+ QueryInterface because it does not have the same requirements for preserving object
+ identity or symmetry/transitivity as QueryInterface, so QueryService allows servers to
+ easily implement the interface on the same object or a separate object. The latter is
+ often hard to do with QueryInterface unless the original object supports aggregation.
+
+ Two related references in MSDN&reg; are:
+ @li <a href="http://msdn.microsoft.com/en-us/library/ms696078(VS.85).aspx">
+ "Using QueryService to expose a native object model interface for an IAccessible object"</a>
+ @li <a href="http://msdn.microsoft.com/en-us/library/ms528415.aspx#acc_obj">
+ "Accessing the Internet Explorer Object Associated with an Accessible Object"</a>
+
+ Based on this information from Microsoft, QueryService must be used to switch back and forth
+ between a reference to an MSAA IAccessible interface and any of the IAccessible2 interfaces.
+
+ Regarding switching between any of the IAccessible2 interfaces, applications implementing
+ IAccessible2 should implement the IAccessible2 interfaces on a single object since ATs
+ will be using QueryInterface to switch between the IAccessilbe2 interfaces. Implementing
+ the IAccessible2 interfaces on separate objects would require the use of QueryService.
+ There is one exception, IAccessibleApplication can be implemented on a separate object so
+ its common code doesn't have to be included in each accessible object. ATs should use
+ QueryService to access IAccessibleApplication.
+
+ @section _applicationInfo Access to Information about the Application
+ Servers implementing IAccessible2 should provide access to the IAccessibleApplication
+ interface via QueryService from any object so that ATs can easily determine specific
+ information about the application such as its name or version.
+
+ @section _childIDs Child IDs
+ The IAccessible2 interfaces do not support child IDs, i.e. simple child elements.
+ Full accessible objects must be created for each object that supports IAccessible2.
+ Therefore MSAA's get_accChild should never return a child ID (other than CHILDID_SELF)
+ for an object that implements any of the IAccessible2 interfaces.
+
+ Microsoft's UI Automation specification has the same limitation and this was resolved
+ in the UI Automation Express specification by adding IAccessibleEx::GetObjectForChild
+ and IAccessibleEx::GetIAccessiblePair. These methods allow mapping back and forth
+ between an IAccessibleEx and an {IAccessible, Child ID} pair. A future version of
+ IAccessible2 may include similar methods to map back and forth between an IAccessible2
+ and an {IAccessible, Child ID} pair.
+
+ @section _variants VARIANTs
+ Some methods return a VARIANT. Implementers need to make sure that the return type is
+ specified, i.e. VT_I4, VT_IDISPATCH, etc. The methods that return VARIANTs are
+ IAccessibleHyperlink::anchor, IAccessibleHyperlink::anchorTarget, IAccessibleValue::currentValue,
+ IAccessibleValue::maximumValue, IAccessibleValue::minimumValue.
+
+ @section _iaaction-iahyperlink IAccessibleHyperlink as subclass of IAccessibleAction
+ In this version of the IDL, IAccessibleHyperlink is a subclass of IAccessibleAction.
+ However, there is no practical need for that inheritance and in some cases, such as
+ an image map of smart tags, it doesn't make sense because such an image map doesn't
+ have actionable objects; it's the secondary smart tags that are actionable. As a
+ result, implementations should not rely on the inheritance as it may be removed in
+ a later version of the IDL.
+
+ @section _trademark Trademark Attribution
+ The names of actual companies and products mentioned herein may be the trademarks of
+ their respective owners. In particular, Active Accessibility, Microsoft, MSDN, and Win32
+ are trademarks of the Microsoft group of companies in the U.S.A. and/or other countries.
+
+**/
+
+
+
+
+
+
+
+
+/** A structure defining the locale of an accessible object.
+
+IAccessible2::locale returns this struct.
+*/
+typedef struct IA2Locale {
+ BSTR language; ///< ISO 639-1 Alpha-2 two character language code
+ BSTR country; ///< ISO 3166-1 Alpha-2 two character country code
+ BSTR variant; ///< Application specific variant of the locale
+} IA2Locale;
+
+/** @brief This interface exposes the primary set of information about an
+ IAccessible2 enabled accessible object.
+
+ This interface must always be provided for objects that support some
+ portion of the collection of the %IAccessible2 interfaces.
+
+ Please refer to @ref _changingInterfaces "Changing between Accessible Interfaces"
+ for special considerations related to use of the MSAA IAccessible interface and
+ the set of %IAccessible2 interfaces.
+ */
+[object, uuid(E89F726E-C4F4-4c19-BB19-B647D7FA8478)]
+interface IAccessible2 : IAccessible
+{
+
+ /** @brief Returns the number of accessible relations for this object.
+ @param [out] nRelations
+ @retval S_OK
+ */
+ [propget] HRESULT nRelations
+ (
+ [out, retval] long *nRelations
+ );
+
+ /** @brief Returns one accessible relation for this object.
+ @param [in] relationIndex
+ 0 based
+ @param [out] relation
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT relation
+ (
+ [in] long relationIndex,
+ [out, retval] IAccessibleRelation **relation
+ );
+
+ /** @brief Returns multiple accessible relations for this object.
+ @param [in] maxRelations
+ maximum size of the array allocated by the client
+ @param [out] relations
+ The array of accessible relation objects. Note that this array is to be
+ allocated by the client and freed when no longer needed. Refer to @ref
+ _arrayConsideration "Special Consideration when using Arrays" for more details.
+ @param [out] nRelations
+ actual number of relations in the returned array (not more than maxRelations)
+ @retval S_OK
+ @retval S_FALSE if there are no relations, nRelations is set to 0
+ @note As a performant alternative, client code should consider using IAccessible2_2::relationTargetsOfType.
+ */
+ [propget] HRESULT relations
+ (
+ [in] long maxRelations,
+ [out, size_is(maxRelations), length_is(*nRelations)]
+ IAccessibleRelation **relations,
+ [out, retval] long *nRelations
+ );
+
+ /** @brief Returns the role of an %IAccessible2 object.
+ @param [out] role
+ The role of an %IAccessible2 object.
+ @retval S_OK
+ @note
+ @li For convenience MSAA roles are also passed through this method so the
+ AT doesn't have to also fetch roles through MSAA's get_accRole.
+ @li %IAccessible2 roles should not be passed through MSAA's get_accRole.
+ @li For compatibility with non IAccessible2 enabled ATs, IAccessible2
+ applications should also add support to get_accRole to return the closest
+ MSAA role or ROLE_SYSTEM_CLIENT (the MSAA defined default role) if there
+ is not a good match.
+ @li This method is missing a [propget] prefix in the IDL. The result is the
+ method is named role in generated C++ code instead of get_role.
+ */
+ HRESULT role
+ (
+ [out, retval] long *role
+ );
+
+ /** @brief Makes an object visible on the screen.
+ @param [in] scrollType
+ Defines where the object should be placed on the screen.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ HRESULT scrollTo
+ (
+ [in] enum IA2ScrollType scrollType
+ );
+
+ /** @brief Moves the top left of an object to a specified location.
+
+ @param [in] coordinateType
+ Specifies whether the coordinates are relative to the screen or the parent object.
+ @param [in] x
+ Defines the x coordinate.
+ @param [in] y
+ Defines the y coordinate.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ HRESULT scrollToPoint
+ (
+ [in] enum IA2CoordinateType coordinateType,
+ [in] long x,
+ [in] long y
+ );
+
+ /** @brief Returns grouping information.
+
+ Used for tree items, list items, tab panel labels, radio buttons, etc.
+ Also used for collections of non-text objects.
+
+ @param [out] groupLevel
+ 1 based, 0 indicates that this value is not applicable
+ @param [out] similarItemsInGroup
+ 1 based, 0 indicates that this value is not applicable
+ @param [out] positionInGroup
+ 1 based, 0 indicates that this value is not applicable. This is an index
+ into the objects in the current group, not an index into all the objects
+ at the same group level.
+ @retval S_OK if at least one value is valid
+ @retval S_FALSE if no values are valid, [out] values are 0s
+ @note This method is meant to describe the nature of an object's containment
+ structure. It's exposed by trees, tree grids, nested lists, nested menus,
+ but not headings, which uses the level object attribute. It is also exposed
+ by radio buttons (with groupLevel == 0).
+ @note This is normally not implemented on a combo box to describe the nature
+ of its contents. Normally an AT will get that information from its child list
+ object. However, in some cases when non-edit combo boxes are not able to be structured
+ such that the list is a child of the combo box, this method is implemented on
+ the combo box itself. ATs can use this interface if a child list is not found.
+ */
+ [propget] HRESULT groupPosition
+ (
+ [out] long *groupLevel,
+ [out] long *similarItemsInGroup,
+ [out, retval] long *positionInGroup
+ );
+
+ /** @brief Returns the bit strip containing any IAccessible2 states.
+
+ The IAccessible2 states are in addition to the MSAA states and are defined in
+ the IA2States enum.
+
+ @param [out] states
+ @retval S_OK
+ */
+ [propget] HRESULT states
+ (
+ [out, retval] AccessibleStates *states
+ );
+
+ /** @brief Returns the extended role.
+
+ An extended role is a role which is dynamically generated by the application.
+ It is not predefined by the %IAccessible2 specification.
+
+ @param [out] extendedRole
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ */
+ [propget] HRESULT extendedRole
+ (
+ [out, retval] BSTR *extendedRole
+ );
+
+ /** @brief Returns the localized extended role.
+ @param [out] localizedExtendedRole
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ */
+ [propget] HRESULT localizedExtendedRole
+ (
+ [out, retval] BSTR *localizedExtendedRole
+ );
+
+ /** @brief Returns the number of extended states.
+ @param [out] nExtendedStates
+ @retval S_OK
+ */
+ [propget] HRESULT nExtendedStates
+ (
+ [out, retval] long *nExtendedStates
+ );
+
+ /** @brief Returns the extended states (array of strings).
+
+ An extended state is a state which is dynamically generated by the application.
+ It is not predefined by the %IAccessible2 specification.
+
+ @param [in] maxExtendedStates
+ This parameter is ignored. Refer to @ref _arrayConsideration
+ "Special Consideration when using Arrays" for more details.
+ @param [out] extendedStates
+ This array is allocated by the server. The client must free it with CoTaskMemFree.
+ @param [out] nExtendedStates
+ The number of extended states returned; the size of the returned array.
+ @retval S_OK
+ @retval S_FALSE if there are no states, [out] values are NULL and 0 respectively
+ */
+ [propget] HRESULT extendedStates
+ (
+ [in] long maxExtendedStates,
+ [out, size_is(,maxExtendedStates), length_is(,*nExtendedStates)] BSTR **extendedStates,
+ [out, retval] long *nExtendedStates
+ );
+
+ /** @brief Returns the localized extended states (array of strings).
+
+ @param [in] maxLocalizedExtendedStates
+ This parameter is ignored. Refer to @ref _arrayConsideration
+ "Special Consideration when using Arrays" for more details.
+ @param [out] localizedExtendedStates
+ This array is allocated by the server. The client must free it with CoTaskMemFree.
+ @param [out] nLocalizedExtendedStates
+ The number of localized extended states returned; the size of the returned array.
+ @retval S_OK
+ @retval S_FALSE if there are no states, [out] values are NULL and 0 respectively
+ */
+ [propget] HRESULT localizedExtendedStates
+ (
+ [in] long maxLocalizedExtendedStates,
+ [out, size_is(,maxLocalizedExtendedStates), length_is(,*nLocalizedExtendedStates)] BSTR **localizedExtendedStates,
+ [out, retval] long *nLocalizedExtendedStates
+ );
+
+ /** @brief Returns the unique ID.
+
+ The uniqueID is an identifier for this object, is unique within the
+ current window, and remains the same for the lifetime of the accessible
+ object.
+
+ The uniqueID is not related to:
+ - the MSAA objectID which is used by the server to disambiguate between
+ IAccessibles per HWND or
+ - the MSAA childID which is used to disambiguate between children being
+ managed by an IAccessible.
+
+ This value is provided so the AT can have access to a unique runtime persistent
+ identifier even when not handling an event for the object.
+
+ An example of when this value is useful is if the AT wants to build a cache.
+ The AT could cache the uniqueIDs in addition to other data being cached.
+ When an event is fired the AT could map the uniqueID to its internal model.
+ Thus, if there's a REORDER/SHOW/HIDE event the AT knows which part of the
+ internal structure has been invalidated and can refetch just that part.
+
+ This value can also be used by an AT to determine when the current control
+ has changed. If the role is the same for two controls that are adjacent in
+ the tab order, this can be used to detect the new control.
+
+ Another use of this value by an AT is to identify when a grouping object has
+ changed, e.g. when moving from a radio button in one group to a radio button in a
+ different group.
+
+ One means of implementing this would be to create a factory with a 32 bit number
+ generator and a reuse pool. The number generator would emit numbers starting
+ at 1. Each time an object's life cycle ended, its number would be saved into a
+ reuse pool. The number generator would be used whenever the reuse pool was empty.
+
+ Another way to create a unique ID is to generate it from a pointer value, e.g. an
+ object's address. That would be unique because no two active objects can use the
+ same allocated memory space.
+
+ @param [out] uniqueID
+ @retval S_OK
+ */
+ [propget] HRESULT uniqueID
+ (
+ [out, retval] long *uniqueID
+ );
+
+ /** @brief Returns the window handle for the parent window which contains this object.
+
+ This is the same window handle which will be passed for any events that occur on the
+ object, but is cached in the accessible object for use when it would be helpful to
+ access the window handle in cases where an event isn't fired on this object.
+
+ A use case is when a screen reader is grabbing an entire web page on a page load.
+ Without the availability of windowHandle, the AT would have to get the window handle
+ by using WindowFromAccessibleObject on each IAccessible, which is slow because it's
+ implemented by oleacc.dll as a loop which crawls up the ancestor chain and looks for
+ a ROLE_WINDOW object, mapping that back to a window handle.
+
+ @param [out] windowHandle
+ @retval S_OK
+ */
+ [propget] HRESULT windowHandle
+ (
+ [out, retval] HWND *windowHandle
+ );
+
+ /** @brief Returns the index of this object in its parent object.
+ @param [out] indexInParent
+ 0 based; -1 indicates there is no parent; the upper bound is the value
+ returned by the parent's IAccessible::get_accChildCount.
+ @retval S_OK
+ @retval S_FALSE if no parent, [out] value is -1
+ */
+ [propget] HRESULT indexInParent
+ (
+ [out, retval] long *indexInParent
+ );
+
+ /** @brief Returns the IA2Locale of the accessible object.
+ @param [out] locale
+ @retval S_OK
+ */
+ [propget] HRESULT locale
+ (
+ [out, retval] IA2Locale *locale
+ );
+
+ /** @brief Returns the attributes specific to this object, such as a cell's formula.
+ @param [out] attributes
+ @retval S_OK
+ @retval S_FALSE returned if there is nothing to return, [out] value is NULL
+ */
+ [propget] HRESULT attributes
+ (
+ [out, retval] BSTR *attributes
+ );
+
+}
+
+/*************************************************************************
+ *
+ * File Name (Accessible2_2.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2013 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+
+/** @brief This interface exposes the primary set of information about an
+ IAccessible2 enabled accessible object.
+
+ This interface must always be provided for objects that support some
+ portion of the collection of the %IAccessible2 interfaces.
+
+ Please refer to @ref _changingInterfaces "Changing between Accessible Interfaces"
+ for special considerations related to use of the MSAA IAccessible interface and
+ the set of %IAccessible2 interfaces.
+ */
+[object, uuid(6C9430E9-299D-4E6F-BD01-A82A1E88D3FF)]
+interface IAccessible2_2 : IAccessible2
+{
+ /** @brief Returns the attribute value of a specified attribute specific to this object.
+ @param [in] name
+ @param [out] attribute
+ @retval S_OK
+ @retval S_FALSE returned if there is nothing to return, [out] value is NULL.
+ @retval E_INVALIDARG if bad [in] passed.
+ @note The output value is a VARIANT. Typically it will be a VT_BSTR, but there
+ are some cases where it will be a VT_I4 or VT_BOOL. Refer to the <a href=
+ "http://www.linuxfoundation.org/collaborate/workgroups/accessibility/iaccessible2/objectattributesIAccessible2">
+ Object Attributes specification</a> for more information.
+ */
+ [propget] HRESULT attribute
+ (
+ [in] BSTR name,
+ [out, retval] VARIANT *attribute
+ );
+
+ /** @brief Returns the deepest hypertext accessible in the subtree of this object, and the caret offset within it.
+ @param [out] accessible
+ @param [out] caretOffset
+ @retval S_OK
+ @retval S_FALSE returned if there is no caret in any of the objects in the subtree, [out] accessible is NULL and [out] caretOffset is -1.
+ */
+ [propget] HRESULT accessibleWithCaret
+ (
+ [out] IUnknown **accessible,
+ [out, retval] long *caretOffset
+ );
+
+ /** @brief Returns relation targets for a specified target type.
+ @param [in] type
+ The requested @ref grpRelations "relation type".
+ @param [in] maxTargets
+ The number of targets requested. 0 indicates that all targets should be returned.
+ @param [out] targets
+ This array is allocated by the server. The client must free it with CoTaskMemFree.
+ @param [out] nTargets
+ The number of targets returned; the size of the returned array.
+ @retval S_OK
+ @retval S_FALSE if there are no targets, [out] values are NULL and 0 respectively.
+ @retval E_INVALIDARG if bad [in] passed.
+ */
+ [propget] HRESULT relationTargetsOfType
+ (
+ [in] BSTR type,
+ [in] long maxTargets,
+ [out, size_is(,*nTargets)] IUnknown ***targets,
+ [out, retval] long *nTargets
+ );
+
+}
+
+/*************************************************************************
+ *
+ * File Name (AccessibleComponent.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2010 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+/** A value specifying a color in ARGB format, where each 8 bit color component
+specifies alpha, red, green, and blue respectively. The alpha value is optional.
+*/
+typedef long IA2Color;
+
+/** @brief This interface is implemented by any object that can be rendered
+ on the screen.
+
+ This interface provides the standard mechanism for an assistive technology
+ to retrieve information concerning the graphical representation of an object.
+ Coordinates used by the functions of this interface are specified in
+ different coordinate systems. Their scale is the same and is equal to
+ that of the screen coordinate system. In other words all coordinates
+ are measured in pixels. They differ in their respective origin:
+ <ul>
+ <li>The screen coordinate system has its origin in the upper left
+ corner of the current screen.</li>
+ <li>The origin of the parent coordinate system is the upper left corner
+ of the parent's bounding box. With no parent the screen coordinate
+ system is used instead.</li>
+ </ul>
+*/
+[object, uuid(1546D4B0-4C98-4bda-89AE-9A64748BDDE4)]
+interface IAccessibleComponent : IUnknown
+{
+
+ /** @brief Returns the location of the upper left corner of the object's
+ bounding box relative to the immediate parent object.
+
+ The coordinates of the bounding box are given relative to the parent's
+ coordinate system. The coordinates of the returned position are relative
+ to this object's parent or relative to the screen on which this object
+ is rendered if it has no parent. If the object is not on any screen
+ the returned position is (0,0).
+
+ @param [out] x
+ @param [out] y
+ @retval S_OK
+ */
+ [propget] HRESULT locationInParent
+ (
+ [out] long *x,
+ [out, retval] long *y
+ );
+
+ /** @brief Returns the foreground color of this object.
+ @param [out] foreground
+ The returned color is the foreground color of this object or, if
+ that is not supported, the default foreground color.
+ @retval S_OK
+ */
+ [propget] HRESULT foreground
+ (
+ [out, retval] IA2Color *foreground
+ );
+
+ /** @brief Returns the background color of this object.
+ @param [out] background
+ The returned color is the background color of this object or, if
+ that is not supported, the default background color.
+ @retval S_OK
+ */
+ [propget] HRESULT background
+ (
+ [out, retval] IA2Color *background
+ );
+}
+/*************************************************************************
+ *
+ * File Name (AccessibleValue.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2010 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+/** @brief This interface gives access to a single numerical value.
+
+ The %IAccessibleValue interface represents a single numerical value and should
+ be implemented by any class that supports numerical value like progress bars
+ and spin boxes. This interface lets you access the value and its upper and
+ lower bounds.
+*/
+[object, uuid(35855B5B-C566-4fd0-A7B1-E65465600394)]
+interface IAccessibleValue : IUnknown
+{
+
+ /** @brief Returns the value of this object as a number.
+
+ The exact return type is implementation dependent. Typical types are long and
+ double.
+ @param [out] currentValue
+ Returns the current value represented by this object. See the section about
+ @ref _variants "VARIANTs" for additional information.
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is a VARIANT with vt = VT_EMPTY
+ */
+ [propget] HRESULT currentValue
+ (
+ [out, retval] VARIANT *currentValue
+ );
+
+ /** @brief Sets the value of this object to the given number.
+
+ The argument is clipped to the valid interval whose upper and lower
+ bounds are returned by the methods IAccessibleValue::maximumValue and
+ IAccessibleValue::minimumValue, i.e. if it is lower than the minimum
+ value the new value will be the minimum and if it is greater than the
+ maximum then the new value will be the maximum.
+
+ @param [in] value
+ The new value represented by this object. The set of admissible types for
+ this argument is implementation dependent.
+ @retval S_OK
+ */
+ HRESULT setCurrentValue
+ (
+ [in] VARIANT value
+ );
+
+ /** @brief Returns the maximal value that can be represented by this object.
+
+ The type of the returned value is implementation dependent. It does not have
+ to be the same type as that returned by method IAccessibleValue::currentValue.
+
+ @param [out] maximumValue
+ Returns the maximal value in an implementation dependent type. If this object
+ has no upper bound then an empty object is returned. See the section about
+ @ref _variants "VARIANTs" for additional information.
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is a VARIANT with vt = VT_EMPTY
+ */
+ [propget] HRESULT maximumValue
+ (
+ [out, retval] VARIANT *maximumValue
+ );
+
+ /** @brief Returns the minimal value that can be represented by this object.
+
+ The type of the returned value is implementation dependent. It does not have
+ to be the same type as that returned by method IAccessibleValue::currentValue.
+
+ @param [out] minimumValue
+ Returns the minimal value in an implementation dependent type. If this object
+ has no lower bound then an empty object is returned. See the section about
+ @ref _variants "VARIANTs" for additional information.
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is a VARIANT with vt = VT_EMPTY
+ */
+ [propget] HRESULT minimumValue
+ (
+ [out, retval] VARIANT *minimumValue
+ );
+
+};
+/*************************************************************************
+ *
+ * File Name (AccessibleText.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2013 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+
+/** A structure containing a substring and the start and end offsets in the enclosing string.
+
+ IAccessibleText::newText and IAccessibleText::oldText return this struct.
+*/
+typedef struct IA2TextSegment {
+ BSTR text; ///< A copy of a segment of text taken from an enclosing paragraph.
+ long start; ///< Index of the first character of the segment in the enclosing text.
+ long end; ///< Index of the character following the last character of the segment in the enclosing text.
+} IA2TextSegment;
+
+/** This enum defines values which specify a text boundary type.
+
+ IA2_TEXT_BOUNDARY_SENTENCE is optional. When a method doesn't implement this
+ method it must return S_FALSE. Typically this feature would not be implemented
+ by an application. However, if the application developer was not satisfied with
+ how screen readers have handled the reading of sentences this boundary type
+ could be implemented and screen readers could use the application's version of a
+ sentence rather than the screen reader's.
+
+ The rest of the boundary types must be supported.
+
+ This enum is used in IAccessibleText::textBeforeOffset, IAccessibleText::textAtOffset,
+ and IAccessibleText::textAfterOffset.
+*/
+
+enum IA2TextBoundaryType {
+ IA2_TEXT_BOUNDARY_CHAR, /**< Typically, a single character is returned. In some cases more than
+ one character is returned, for example, when a document contains field
+ data such as a field containing a date, time, or footnote reference.
+ In this case the caret can move over several characters in one movement
+ of the caret. Note that after the caret moves, the caret offset changes
+ by the number of characters in the field, e.g. by 8 characters in the
+ following date: 03/26/07. */
+ IA2_TEXT_BOUNDARY_WORD, /**< The range provided matches the range observed when the application
+ processes the Ctrl + left arrow and Ctrl + right arrow key sequences.
+ Typically this is from the start of one word to the start of the next, but
+ various applications are inconsistent in the handling of the end of a line. */
+ IA2_TEXT_BOUNDARY_SENTENCE, ///< Range is from start of one sentence to the start of another sentence.
+ IA2_TEXT_BOUNDARY_PARAGRAPH, ///< Range is from start of one paragraph to the start of another paragraph.
+ IA2_TEXT_BOUNDARY_LINE, /**< Range is from start of one line to the start of another line. This
+ often means that an end-of-line character will appear at the end of the
+ range. However in the case of some applications an end-of-line character
+ indicates the end of a paragraph and the lines composing the paragraph,
+ other than the last line, do not contain an end of line character. */
+ IA2_TEXT_BOUNDARY_ALL ///< Using this value will cause all text to be returned.
+};
+
+/** @brief This interface gives read-only access to text.
+
+ The %IAccessibleText interface should be implemented by all components
+ that present textual information on the display like buttons,
+ text entry fields, or text portions of the document window. The interface
+ provides access to the text's content, attributes, and spatial location.
+ However, text can not be modified with this interface. That is the task
+ of the IAccessibleEditableText interface.
+
+ The text length, i.e. the number of characters in the text, is
+ returned by IAccessibleText::nCharacters. All methods that operate
+ on particular characters (e.g. IAccessibleText::textAtOffset) use character
+ indices from 0 to length-1. All methods that operate on character positions
+ (e.g. IAccessibleText::text) use indices from 0 to length.
+
+ Please note that accessible text does not necessarily support selection.
+ In this case it should behave as if there where no selection. An empty
+ selection is used for example to express the current cursor position.
+
+ Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleText methods.
+
+ E_FAIL is returned in the following cases
+ @li endOffset < startOffset
+ @li endoffset > length
+*/
+[object, uuid(24FD2FFB-3AAD-4a08-8335-A3AD89C0FB4B)]
+interface IAccessibleText : IUnknown
+{
+
+ /** @brief Adds a text selection
+ @param [in] startOffset
+ Starting offset ( 0 based).
+ @param [in] endOffset
+ Offset of first character after new selection (0 based).
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ @note Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleText methods.
+ */
+ HRESULT addSelection
+ (
+ [in] long startOffset,
+ [in] long endOffset
+ );
+
+ /** @brief Returns text attributes.
+ @param [in] offset
+ Text offset (0 based). Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleText methods.
+ @param [out] startOffset
+ The starting offset of the character range over which all text attributes match
+ those of offset. (0 based)
+ @param [out] endOffset
+ The offset of the first character past the character range over which all text
+ attributes match those of offset. (0 based)
+ @param [out] textAttributes
+ A string of attributes describing the text. The attributes are described in the
+ <a href="http://www.linuxfoundation.org/en/Accessibility/IAccessible2/TextAttributes">
+ text attributes specification</a> on the %IAccessible2 web site.
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] values are 0s and NULL respectively
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT attributes
+ (
+ [in] long offset,
+ [out] long *startOffset,
+ [out] long *endOffset,
+ [out, retval] BSTR *textAttributes
+ );
+
+ /** @brief Returns the position of the caret.
+
+ Returns the 0-based offset of the caret within the text. If the text is
+ implemented as a tree of text objects with embed characters in higher levels
+ representing substrings of child text objects and the caret is in one of the
+ child text objects, then the offset in the higher level text object would be
+ at the embed character representing child text object that contains the caret.
+
+ For example, if the string "one two three" is implemented as a two text objects,
+ with a top level text object containing an embed character "one ? three" and a
+ child text object containing "two" and if the caret is in the descendant object
+ just before the 'o' in "two", then:
+ <ul>
+ <li>the caretOffset for the "one ? three" object would be 4, matching the embed character</li>
+ <li>the caretOffset for "two" would be 2, matching the "o"</li>
+ </ul>
+ The caret position/offset is that of the character logically following it, e.g.
+ to the right of it in a left to right language, or to the left of it in a right
+ to left language.
+ @param [out] offset
+ The returned offset is relative to the text represented by this object.
+ @retval S_OK
+ @retval S_FALSE if the caret is not currently active on this object, i.e. the
+ caret is located on some other object. The returned offset value will be -1.
+ @note S_FALSE (and an offset of -1) will not be returned if the caret is somewhere
+ in the text object or one of its descendants.
+ */
+ [propget] HRESULT caretOffset
+ (
+ [out, retval] long *offset
+ );
+
+
+ /** @brief Returns the bounding box of the specified position.
+
+ The virtual character after the last character of the represented
+ text, i.e. the one at position length is a special case. It represents the
+ current input position and will therefore typically be queried by AT more
+ often than other positions. Because it does not represent an existing character
+ its bounding box is defined in relation to preceding characters. It should be
+ roughly equivalent to the bounding box of some character when inserted at the
+ end of the text. Its height typically being the maximal height of all the
+ characters in the text or the height of the preceding character, its width being
+ at least one pixel so that the bounding box is not degenerate.
+
+ Note that the index 'length' is not always valid. Whether it is or not is
+ implementation dependent. It typically is when text is editable or otherwise
+ when on the screen the caret can be placed behind the text. You can be sure
+ that the index is valid after you have received a ::IA2_EVENT_TEXT_CARET_MOVED
+ event for this index.
+ @param [in] offset
+ Index of the character for which to return its bounding box. The valid range
+ is 0..length. Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleText methods.
+ @param [in] coordType
+ Specifies if the coordinates are relative to the screen or to the parent window.
+ @param [out] x
+ X coordinate of the top left corner of the bounding box of the referenced character.
+ @param [out] y
+ Y coordinate of the top left corner of the bounding box of the referenced character.
+ @param [out] width
+ Width of the bounding box of the referenced character.
+ @param [out] height
+ Height of the bounding box of the referenced character.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT characterExtents
+ (
+ [in] long offset,
+ [in] enum IA2CoordinateType coordType,
+ [out] long *x,
+ [out] long *y,
+ [out] long *width,
+ [out, retval] long *height
+ );
+
+
+ /** @brief Returns the number of active non-contiguous selections
+ @param [out] nSelections
+ @retval S_OK
+ */
+ [propget] HRESULT nSelections
+ (
+ [out, retval] long *nSelections
+ );
+
+ /** @brief Returns the text position for the specified screen position.
+
+ Given a point return the zero-based index of the character under that
+ point. The same functionality could be achieved by using the bounding
+ boxes for each character as returned by IAccessibleText::characterExtents.
+ The method IAccessibleText::offsetAtPoint, however, can be implemented
+ more efficiently.
+
+ @param [in] x
+ The position's x value for which to look up the index of the character that
+ is rendered on to the display at that point.
+ @param [in] y
+ The position's y value for which to look up the index of the character that
+ is rendered on to the display at that point.
+ @param [in] coordType
+ Screen coordinates or window coordinates.
+ @param [out] offset
+ Index of the character under the given point or -1 if the point
+ is invalid or there is no character under the point.
+ @retval S_OK
+ @retval S_FALSE if nothing to return, [out] value is -1
+
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT offsetAtPoint
+ (
+ [in] long x,
+ [in] long y,
+ [in] enum IA2CoordinateType coordType,
+ [out, retval] long *offset
+ );
+
+ /** @brief Returns the character offsets of Nth active text selection
+
+ Returns the 0-based starting and ending offsets of the Nth selection. If the
+ text is implemented as a tree of text objects with embed characters in higher
+ levels representing substrings of child text objects, consider the following.
+ If the starting selection offset is in one of the child text objects, then the
+ starting offset in the higher level text object would be at the embed character
+ representing the child text object that contains the starting selection offset.
+ If the ending selection offset is in one of the child text objects, then the
+ ending offset in the higher level text object would be just after the embed
+ character representing the child text object that contains the ending selection
+ offset.
+
+ For example, if the string "one two three" is implemented as a two text objects,
+ with a top level text object containing an embed character "one ? three" and a
+ child text object containing "two" and if the selection is the string "two" then:
+ <ul>
+ <li>the startOffset for the "one ? three" object would be 4, matching the embed character and the endOffset would be 5.</li>
+ <li>the startOffset for the "two" object would be 0, and the endOffset would be 3</li>
+ </ul>
+ Selection offsets are that of the character logically following it, e.g.
+ to the right of it in a left to right language or to the left of it in a right to left language.
+ @param [in] selectionIndex
+ Index of selection (0 based).
+ @param [out] startOffset
+ 0 based offset of first selected character
+ @param [out] endOffset
+ 0 based offset of one past the last selected character.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT selection
+ (
+ [in] long selectionIndex,
+ [out] long *startOffset,
+ [out, retval] long *endOffset
+ );
+
+ /** @brief Returns the substring between the two given indices.
+
+ The substring starts with the character at startOffset (inclusive) and up to
+ the character at endOffset (exclusive), if startOffset is less or equal
+ endOffset. If endOffset is lower than startOffset, the result is the same
+ as a call with the two arguments being exchanged.
+
+ The whole text can be requested by passing the indices zero and
+ IAccessibleText::nCharacters. If both indices have the same value, an empty
+ string is returned.
+ @param [in] startOffset
+ Index of the first character to include in the returned string. The valid range
+ is 0..length.
+ @param [in] endOffset
+ Index of the last character to exclude in the returned string. The valid range
+ is 0..length.
+ @param [out] text
+ Returns the substring starting with the character at startOffset (inclusive)
+ and up to the character at endOffset (exclusive), if startOffset is less than
+ or equal to endOffset.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ @note
+ @li The returned string may be longer than endOffset-startOffset bytes if text
+ contains multi-byte characters.
+ @li Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleText methods.
+ */
+ [propget] HRESULT text
+ (
+ [in] long startOffset,
+ [in] long endOffset,
+ [out, retval] BSTR *text
+ );
+
+ /** @brief Returns a text portion before the given position.
+
+ Returns the substring of the specified text type that is located before the
+ given character and does not include it. The result of this method should be
+ same as a result for IAccessibleText::textAtOffset with a suitably decreased
+ index value.
+
+ For example, if text type is ::IA2_TEXT_BOUNDARY_WORD, then the complete
+ word that is closest to and located before offset is returned.
+
+ If the index is valid, but no text is found, S_FALSE is returned along with out
+ values of 0, 0, and a NULL pointer. This would happen for boundary types other
+ than character when the text consists entirely of whitespace.
+
+ @param [in] offset
+ Index of the character for which to return the text part before it. The index
+ character will not be part of the returned string. The valid range is 0..length.
+ Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleText methods.
+ @param [in] boundaryType
+ The type of the text portion to return. See ::IA2TextBoundaryType for the
+ complete list.
+ @param [out] startOffset
+ 0 based offset of first character.
+ @param [out] endOffset
+ 0 based offset of one past the last character.
+ @param [out] text
+ Returns the requested text portion. This portion may be empty or invalid when
+ no appropriate text portion is found or text type is invalid.
+ @retval S_OK
+ @retval S_FALSE if the requested boundary type is not implemented, such as
+ ::IA2_TEXT_BOUNDARY_SENTENCE, or if there is nothing to return;
+ [out] values are 0s and NULL respectively
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT textBeforeOffset
+ (
+ [in] long offset,
+ [in] enum IA2TextBoundaryType boundaryType,
+ [out] long *startOffset,
+ [out] long *endOffset,
+ [out, retval] BSTR *text
+ );
+
+ /** @brief Returns a text portion after the given position.
+
+ Returns the substring of the specified text type that is located after the
+ given character and does not include it. The result of this method should be
+ same as a result for IAccessibleText::textAtOffset with a suitably increased
+ index value.
+
+ For example, if text type is ::IA2_TEXT_BOUNDARY_WORD, then the complete
+ word that is closest to and located after offset is returned.
+
+ If the index is valid, but no text is found, S_FALSE is returned along with out
+ values of 0, 0, and a NULL pointer. This would happen for boundary types other
+ than character when the text consists entirely of whitespace.
+
+ @param [in] offset
+ Index of the character for which to return the text part after it. The index
+ character will not be part of the returned string. The valid range is 0..length.
+ Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleText methods.
+ @param [in] boundaryType
+ The type of the text portion to return. See ::IA2TextBoundaryType for the complete
+ list.
+ @param [out] startOffset
+ 0 based offset of first character.
+ @param [out] endOffset
+ 0 based offset of one past the last character.
+ @param [out] text
+ Returns the requested text portion. This portion may be empty or invalid when
+ no appropriate text portion is found or text type is invalid.
+ @retval S_OK
+ @retval S_FALSE if the requested boundary type is not implemented, such as
+ ::IA2_TEXT_BOUNDARY_SENTENCE, or if there is nothing to return;
+ [out] values are 0s and NULL respectively
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT textAfterOffset
+ (
+ [in] long offset,
+ [in] enum IA2TextBoundaryType boundaryType,
+ [out] long *startOffset,
+ [out] long *endOffset,
+ [out, retval] BSTR *text
+ );
+
+ /** @brief Returns a text portion that spans the given position.
+
+ Returns the substring defined by the specified boundary type at the specified
+ offset. Refer to IA2TextBoundaryType for more details.
+
+ For the word boundary type the returned string will contain the word at the
+ offset if the offset is inside a word and will contain the word before the
+ offset if the offset is not inside a word. All offsets from the first to the
+ last characters of a word are considered inside the word. Boundary types of
+ sentence and paragraph should exhibit similar behavior.
+
+ If the index is valid, but no text is found, S_FALSE is returned along with out
+ values of 0, 0, and a NULL pointer. This would happen for boundary types other
+ than character when the text consists entirely of whitespace.
+
+ @param [in] offset
+ Index of the character for which to return the text part it belongs to. The valid
+ range is 0..length.
+ Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleText methods.
+ @param [in] boundaryType
+ The type of the text portion to return. See ::IA2TextBoundaryType for the complete
+ list.
+ @param [out] startOffset
+ 0 based offset of first character.
+ @param [out] endOffset
+ 0 based offset of one past the last character.
+ @param [out] text
+ Returns the requested text portion. This portion may be empty or invalid when
+ no appropriate text portion is found or text type is invalid.
+ @retval S_OK
+ @retval S_FALSE if the requested boundary type is not implemented, such as
+ ::IA2_TEXT_BOUNDARY_SENTENCE, or if there is nothing to return;
+ [out] values are 0s and NULL respectively
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT textAtOffset
+ (
+ [in] long offset,
+ [in] enum IA2TextBoundaryType boundaryType,
+ [out] long *startOffset,
+ [out] long *endOffset,
+ [out, retval] BSTR *text
+ );
+
+ /** @brief Unselects a range of text.
+ @param [in] selectionIndex
+ Index of selection to remove (0 based).
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ HRESULT removeSelection
+ (
+ [in] long selectionIndex
+ );
+
+ /** @brief Sets the position of the caret.
+
+ The caret position/offset is that of the character logically following it,
+ e.g. to the right of it in a left to right language.
+
+ Setting the caret position may or may not alter the current selection. A
+ change of the selection is notified to the accessibility event listeners with
+ an ::IA2_EVENT_TEXT_SELECTION_CHANGED event.
+
+ When the new caret position differs from the old one (which, of course, is the
+ standard case) this is notified to the accessibility event listeners with an
+ ::IA2_EVENT_TEXT_CARET_MOVED event.
+ @param [in] offset
+ The new index of the caret. This caret is actually placed to the left side of
+ the character with that index. An index of 0 places the caret so that the next
+ insertion goes before the first character. An index of IAccessibleText::nCharacters
+ leads to insertion after the last character. Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleText methods.
+ @retval S_OK
+ @retval E_FAIL if the caret cannot be set
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ HRESULT setCaretOffset
+ (
+ [in] long offset
+ );
+
+ /** @brief Changes the bounds of an existing selection.
+ @param [in] selectionIndex
+ Index of selection to change (0 based)
+ @param [in] startOffset
+ New starting offset (0 based)
+ @param [in] endOffset
+ New ending offset (0 based) - the offset of the character just past the last character of the selection.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ @note Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleText methods.
+ */
+ HRESULT setSelection
+ (
+ [in] long selectionIndex,
+ [in] long startOffset,
+ [in] long endOffset
+ );
+
+ /** @brief Returns total number of characters.
+
+ Note that this may be different than the total number of bytes required to store the
+ text, if the text contains multi-byte characters.
+ @param [out] nCharacters
+ @retval S_OK
+ */
+ [propget] HRESULT nCharacters
+ (
+ [out, retval] long *nCharacters
+ );
+
+ /** @brief Makes a specific part of string visible on screen.
+ @param [in] startIndex
+ 0 based character offset.
+ @param [in] endIndex
+ 0 based character offset - the offset of the character just past the last character of the string.
+ @param [in] scrollType
+ Defines where the object should be placed on the screen.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ @note Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleText methods.
+ */
+ HRESULT scrollSubstringTo
+ (
+ [in] long startIndex,
+ [in] long endIndex,
+ [in] enum IA2ScrollType scrollType
+ );
+
+ /** @brief Moves the top left of a substring to a specified location.
+
+ @param [in] startIndex
+ 0 based character offset.
+ @param [in] endIndex
+ 0 based character offset - the offset of the character just past the last character of the string.
+ @param [in] coordinateType
+ Specifies whether the coordinates are relative to the screen or the parent object.
+ @param [in] x
+ Defines the x coordinate.
+ @param [in] y
+ Defines the y coordinate.
+ @retval S_OK
+ @retval S_FALSE if the object is already at the specified location.
+ @retval E_INVALIDARG if bad [in] passed
+ @note Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleText methods.
+ */
+ HRESULT scrollSubstringToPoint
+ (
+ [in] long startIndex,
+ [in] long endIndex,
+ [in] enum IA2CoordinateType coordinateType,
+ [in] long x,
+ [in] long y
+ );
+
+ /** @brief Returns any inserted text.
+
+ Provided for use by the ::IA2_EVENT_TEXT_INSERTED and ::IA2_EVENT_TEXT_UPDATED
+ event handlers.
+
+ This data is only guaranteed to be valid while the thread notifying the event
+ continues. Once the handler has returned, the validity of the data depends on
+ how the server manages the life cycle of its objects. Also, note that the server
+ may have different life cycle management strategies for controls depending on
+ whether or not a control manages its children. Lists, trees, and tables can have
+ a large number of children and thus it's possible that the child objects for those
+ controls would only be created as needed. Servers should document their life cycle
+ strategy as this will be of interest to assistive technology or script engines
+ accessing data out of process or from other threads. Servers only need to save the
+ last inserted block of text and a scope of the entire application is adequate.
+
+ @param [out] newText
+ The text that was just inserted.
+ @retval S_OK
+ @retval S_FALSE If there is nothing to return, the values of IA2TextSegment
+ struct are set as follows: text = NULL, start = 0, end = 0.
+
+ */
+ [propget] HRESULT newText
+ (
+ [out, retval] IA2TextSegment *newText
+ );
+
+ /** @brief Returns any removed text.
+
+ Provided for use by the IA2_EVENT_TEXT_REMOVED/UPDATED event handlers.
+
+ This data is only guaranteed to be valid while the thread notifying the event
+ continues. Once the handler has returned, the validity of the data depends on
+ how the server manages the life cycle of its objects. Also, note that the server
+ may have different life cycle management strategies for controls depending on
+ whether or not a control manages its children. Lists, trees, and tables can have
+ a large number of children and thus it's possible that the child objects for those
+ controls would only be created as needed. Servers should document their life cycle
+ strategy as this will be of interest to assistive technology or script engines
+ accessing data out of process or from other threads. Servers only need to save the
+ last removed block of text and a scope of the entire application is adequate.
+
+ @param [out] oldText
+ The text that was just removed.
+ @retval S_OK
+ @retval S_FALSE If there is nothing to return, the values of IA2TextSegment
+ struct are set as follows: text = NULL, start = 0, end = 0.
+ */
+ [propget] HRESULT oldText
+ (
+ [out, retval] IA2TextSegment *oldText
+ );
+
+}
+/*************************************************************************
+ *
+ * File Name (AccessibleText2.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2013 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+
+
+/** @brief This interface gives read-only access to text.
+
+ The %IAccessibleText2 interface extends the functionality of the
+ %IAccessibleText interface.
+*/
+[object, uuid(9690A9CC-5C80-4DF5-852E-2D5AE4189A54)]
+interface IAccessibleText2 : IAccessibleText
+{
+
+ /** @brief Returns the range and of the specified set of attributes.
+
+ Return the range (start and end offsets) and text attributes that correspond
+ to the given attributes filter at the given offset.
+
+ @param [in] offset
+ The offset at which to search for the attributes specified in the filter.
+ @param [in] filter
+ The requested attribute names. The filter format is "attribute1, attribute2".
+ @param [out] startOffset
+ The starting (0-based) offset of the text containing the specified attributes.
+ @param [out] endOffset
+ The (0-based) offset one past the last character of the text containing the
+ specified attributes.
+ @param [out] attributeValues
+ The values of the requested attributes.
+ @retval S_OK
+ @retval S_FALSE if nothing to return, [out] values are -1, -1, NULL respectively.
+ @retval E_INVALIDARG if bad [in] passed.
+ */
+ [propget] HRESULT attributeRange
+ (
+ [in] long offset,
+ [in] BSTR filter,
+ [out] long *startOffset,
+ [out] long *endOffset,
+ [out, retval] BSTR *attributeValues
+ );
+
+}
+/*************************************************************************
+ *
+ * File Name (AccessibleEditableText.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2012 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+
+/** @brief This interface provides clipboard capability to text objects.
+
+ This interface is typically used in conjunction with the IAccessibleText
+ interface and complements that interface with the additional capability of
+ clipboard operations. Note that even a read only text object can support
+ the copy capability so this interface is not limited to editable objects.
+
+ The substrings used with this interface are specified as follows:
+ If startOffset is less than endOffset, the substring starts with the
+ character at startOffset and ends with the character just before endOffset.
+ If endOffset is lower than startOffset, the result is the same as a call
+ with the two arguments exchanged. The whole text can be defined by passing
+ the indices zero and IAccessibleText::nCharacters. If both indices have the
+ same value, an empty string is defined.
+
+ Refer to the @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about a special offset constant that can be used in %IAccessibleEditableText methods.
+*/
+[object, uuid(A59AA09A-7011-4b65-939D-32B1FB5547E3)]
+interface IAccessibleEditableText : IUnknown
+{
+
+ /** @brief Copies the text range into the clipboard.
+
+ The selection is set to the specified offsets and then selection is copied into
+ the system clipboard.
+
+ @param [in] startOffset
+ Start index of the text to moved into the clipboard.
+ The valid range is 0..length.
+ @param [in] endOffset
+ End index of the text to moved into the clipboard.
+ The valid range is 0..length.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ @note Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleEditableText
+ methods.
+ @deprecated This function is available via the application's GUI.
+ */
+ HRESULT copyText
+ (
+ [in] long startOffset,
+ [in] long endOffset
+ );
+
+ /** @brief Deletes a range of text.
+
+ The text between and including the two given indices is deleted
+ from the text represented by this object.
+
+ @param [in] startOffset
+ Start index of the text to be deleted.
+ The valid range is 0..length.
+ @param [in] endOffset
+ End index of the text to be deleted.
+ The valid range is 0..length.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ @note Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleEditableText
+ methods.
+ */
+ HRESULT deleteText
+ (
+ [in] long startOffset,
+ [in] long endOffset
+ );
+
+ /** @brief Inserts text at the specified position.
+
+ The specified string is inserted at the given index into the text
+ represented by this object.
+
+ @param [in] offset
+ Index at which to insert the text.
+ The valid range is 0..length.
+ Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleEditableText
+ methods.
+ @param [in] text
+ Text that is inserted.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ HRESULT insertText
+ (
+ [in] long offset,
+ [in] BSTR *text
+ );
+
+ /** @brief Deletes a range of text and copies it to the clipboard.
+
+ The selection is set to the specified offsets, the selection is then copied into
+ the system clipboard, and then the selection is deleted.
+
+ @param [in] startOffset
+ Start index of the text to be deleted.
+ The valid range is 0..length.
+ @param [in] endOffset
+ End index of the text to be deleted.
+ The valid range is 0..length.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ @note Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleEditableText
+ methods.
+ @deprecated This function is available via the application's GUI.
+ */
+ HRESULT cutText
+ (
+ [in] long startOffset,
+ [in] long endOffset
+ );
+
+ /** @brief Pastes content from the clipboard.
+
+ Any existing selection is removed, the clipboard content is then pasted into
+ this object's text at the given offset. This method is similar to the insertText
+ method. If the index is not valid the system clipboard content is not inserted. The
+ behavior is the same as when Ctrl+V is used, i.e. the pasted contents are not
+ necessarily plain text.
+
+ @param [in] offset
+ Index at which to insert the content from the system clipboard into
+ the text represented by this object.
+ The valid range is 0..length.
+ Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleEditableText
+ methods.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ @deprecated This function is available via the application's GUI.
+ */
+ HRESULT pasteText
+ (
+ [in] long offset
+ );
+
+ /** @brief Replaces text.
+
+ The text between the two given indices is replaced by the specified
+ replacement string. This method is equivalent to calling first
+ IAccessibleEditableText::deleteText with the two indices and then
+ calling IAccessibleEditableText::insertText with the replacement text
+ at the start index.
+
+ @param [in] startOffset
+ Start index of the text to be replaced.
+ The valid range is 0..length.
+ @param [in] endOffset
+ End index of the text to be replaced.
+ The valid range is 0..length.
+ @param [in] text
+ The Text that replaces the text between the given indices.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ @note Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleEditableText
+ methods.
+ */
+ HRESULT replaceText
+ (
+ [in] long startOffset,
+ [in] long endOffset,
+ [in] BSTR *text
+ );
+
+ /** @brief Replaces the attributes of a text range by the given set of attributes.
+
+ Sets the attributes for the text between the two given indices. The old
+ attributes are replaced by the new list of attributes.
+
+ @param [in] startOffset
+ Start index of the text whose attributes are modified.
+ The valid range is 0..length.
+ @param [in] endOffset
+ End index of the text whose attributes are modified.
+ The valid range is 0..length.
+ @param [in] attributes
+ Set of attributes that replaces the old list of attributes of
+ the specified text portion.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ @note Refer to @ref _specialOffsets
+ "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
+ for information about special offsets that can be used in %IAccessibleEditableText
+ methods.
+ */
+ HRESULT setAttributes
+ (
+ [in] long startOffset,
+ [in] long endOffset,
+ [in] BSTR *attributes
+ );
+}
+
+/*************************************************************************
+ *
+ * File Name (AccessibleHyperlink.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2010 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+
+/** @brief This interface represents hyperlinks.
+
+ This interface represents a hyperlink associated with a single substring
+ of text or single non-text object. Non-text objects can have either a
+ single link or a collection of links such as when the non-text object is
+ an image map.
+
+ Linked objects and anchors are implementation dependent. This interface is derived
+ from IAccessibleAction. IAccessibleAction::nActions is one greater than the
+ maximum value for the indices used with the methods of this interface.
+
+ Furthermore, the object that implements this interface has to be connected
+ implicitly or explicitly with an object that implements IAccessibleText.
+ IAccessibleHyperlink::startIndex and IAccessibleHyperlink::endIndex are
+ indices with respect to the text exposed by IAccessibleText.
+
+ This interface provides access to a single object which can have multiple actions.
+ An example is an image map which is an image with multiple links each of which is
+ associated with a separate non-overlapping area of the image. This interface could
+ also be applied to other kinds of objects with multiple actions such as "smart tags"
+ which are objects, typically strings, which have multiple actions such as
+ "Activate URI", "Bookmark URI", etc.
+
+ An interesting use case is an image map where each area is associated with multiple
+ actions, e.g. an image map of smart tags. In this case you would have to implement
+ two levels of accessible hyperlinks. The first level hyperlinks would only implement
+ anchor and anchorTarget. The anchors would all reference the image object. The
+ anchorTargets would reference the second level accessible hyperlink objects. None
+ of the IAccessibleAction methods would be implemented on the first level hyperlink
+ objects. The second level hyperlink objects would implement the IAccessibleAction
+ methods. Their anchors would also reference the image object and their anchorTargets
+ would reference URLs or the objects that would be activated.
+
+ This use case demonstrates that in some cases there is no need for IAccessibleHyperlink
+ to derive from IAccessibleAction. As a result it may be removed in a later version of
+ the IDL and it is suggested that implementations should not rely on the inheritance.
+
+*/
+[object, uuid(01C20F2B-3DD2-400f-949F-AD00BDAB1D41)]
+interface IAccessibleHyperlink : IAccessibleAction
+{
+
+ /** @brief Returns an object that represents the link anchor, as appropriate
+ for the link at the specified index.
+ @param [in] index
+ A 0 based index identifies the anchor when, as in the case of an image map,
+ there is more than one link represented by this object. The valid maximal
+ index is indicated by IAccessibleAction::nActions.
+ @param [out] anchor
+ This is an implementation dependent value. For example, for a text link this
+ method could return the substring of the containing string where the substring
+ is overridden with link behavior, and for an image link this method could return
+ an IUnknown VARIANT for IAccessibleImage. See the section about
+ @ref _variants "VARIANTs" for additional information.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT anchor
+ (
+ [in] long index,
+ [out, retval] VARIANT *anchor
+ );
+
+ /** @brief Returns an object representing the target of the link, as appropriate
+ for the link at the specified index.
+ @param [in] index
+ A 0 based index identifies the anchor when, as in the case of an image map,
+ there is more than one link represented by this object. The valid maximal
+ index is indicated by IAccessibleAction::nActions.
+ @param [out] anchorTarget
+ This is an implementation dependent value. For example this method could
+ return a BSTR VARIANT of the URI. Alternatively this method could return an
+ IUnknown VARIANT of a COM interface representing a target object to be
+ activated when the link is activated. See the section about
+ @ref _variants "VARIANTs" for additional information.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT anchorTarget
+ (
+ [in] long index,
+ [out, retval] VARIANT *anchorTarget
+ );
+
+ /** @brief Returns the 0 based character offset at which the textual representation of the hyperlink starts.
+
+ The returned value is related to the IAccessibleText interface of the object that
+ owns this hyperlink.
+ @param [out] index
+ @retval S_OK
+ */
+ [propget] HRESULT startIndex
+ (
+ [out, retval] long *index
+ );
+
+ /** @brief Returns the 0 based character offset at which the textual representation of the hyperlink ends.
+
+ The returned value is related to the IAccessibleText interface of the object that
+ owns this hyperlink. The character at the index is not part of the hypertext.
+ @param [out] index
+ @retval S_OK
+ */
+ [propget] HRESULT endIndex
+ (
+ [out, retval] long *index
+ );
+
+ /** @brief Returns whether the target object referenced by this link is still valid.
+
+ This is a volatile state that may change without sending an appropriate event.
+ Returns TRUE if the referenced target is still valid and FALSE otherwise.
+
+ This has also been used to indicate whether or not the URI of the anchorTarget
+ is malformed.
+
+ @param [out] valid
+ If false, one or more of the object's links are invalid.
+ If true, all of the object's links are valid.
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is FALSE
+ @note This method is not being used, is deprecated, and should not be implemented or
+ used. It is likely that this method will be removed in a later version of the IDL.
+ */
+ [propget] HRESULT valid
+ (
+ [out, retval] boolean *valid
+ );
+}
+/*************************************************************************
+ *
+ * File Name (AccessibleHypertext.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2010 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+
+
+/** @brief This interface exposes information about hypertext in a document.
+
+ The %IAccessibleHypertext interface is the main interface to expose
+ hyperlinks in a document, typically a text document, that are used
+ to reference other documents. A typical implementation is to implement
+ this interface on the smallest text object such as a paragraph of text.
+*/
+[object, uuid(6B4F8BBF-F1F2-418a-B35E-A195BC4103B9)]
+interface IAccessibleHypertext : IAccessibleText
+{
+
+ /** @brief Returns the number of links and link groups contained within this hypertext
+ paragraph.
+ @param [out] hyperlinkCount
+ The number of links and link groups within this hypertext paragraph.
+ Returns 0 if there is no link.
+ @retval S_OK
+ */
+ [propget] HRESULT nHyperlinks
+ (
+ [out, retval] long *hyperlinkCount
+ );
+
+ /** @brief Returns the specified link.
+
+ The returned IAccessibleHyperlink object encapsulates the hyperlink and
+ provides several kinds of information describing it.
+ @param [in] index
+ This 0 based index specifies the hyperlink to return.
+ @param [out] hyperlink
+ If the given index is valid, i.e. lies in the interval from 0 to the number
+ of links minus one, a reference to the specified hyperlink object is returned.
+ If the index is invalid then a NULL pointer is returned.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT hyperlink
+ (
+ [in] long index,
+ [out, retval] IAccessibleHyperlink **hyperlink
+ );
+
+ /** @brief Returns the index of the hyperlink that is associated with this character index.
+
+ This is the case when a link spans the given character index.
+ @param [in] charIndex
+ A 0 based index of the character for which to return the link index. If
+ IAccessibleText is used to represent the text containing the link, then the
+ character index is only valid if it is greater than or equal to zero and
+ lower than the number of characters in the text.
+ @param [out] hyperlinkIndex
+ Returns the 0 based index of the hyperlink that is associated with this
+ character index, or -1 if charIndex is not on a link.
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is -1
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT hyperlinkIndex
+ (
+ [in] long charIndex,
+ [out, retval] long *hyperlinkIndex
+ );
+
+}
+/*************************************************************************
+ *
+ * File Name (AccessibleHypertext2.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2013 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+
+
+/** @brief This interface exposes information about hypertext in a document.
+
+ The %IAccessibleHypertext2 interface extends the functinality of the
+ %IAccessibleHypertext inteface.
+*/
+[object, uuid(CF64D89F-8287-4B44-8501-A827453A6077)]
+interface IAccessibleHypertext2 : IAccessibleHypertext
+{
+
+ /** @brief Returns the links for this object.
+
+ The returned IAccessibleHyperlink objects encapsulate the hyperlink and
+ provides several kinds of information describing it.
+
+ @param [out] hyperlinks
+ This array is allocated by the server. The client must free it with CoTaskMemFree.
+ @param [out] nHyperlinks
+ The number of links returned; the size of the returned array.
+ @retval S_OK
+ @retval S_FALSE if there are no links, [out] values are NULL and 0 respectively
+ */
+ [propget] HRESULT hyperlinks
+ (
+ [out, size_is(,*nHyperlinks)] IAccessibleHyperlink ***hyperlinks,
+ [out, retval] long *nHyperlinks
+ );
+
+}
+/*************************************************************************
+ *
+ * File Name (AccessibleTable.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2013 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+
+
+/** @brief This interface gives access to a two-dimensional table.
+
+ Typically all accessible objects that represent cells or cell-clusters of a table
+ will be at the same time children of the table. In this case IAccessible2::indexInParent
+ will return the child index which then can be used when calling IAccessibleTable::rowIndex
+ and IAccessibleTable::columnIndex.
+
+ However, in some cases that kind of implementation will not be possible. When
+ the table cells are not direct children of a table, the object representing
+ the cell can define a "table-cell-index" object attribute identifying the 0
+ based table cell index. This object attribute is obtained by parsing the
+ attribute string returned by IAccessible2::attributes. The "table-cell-index"
+ attribute can be used just like a child index of the typical case. ATs should
+ first test for the presence of the "table-cell-index" attribute and if it is not
+ present then IAccessible2::indexInParent can be used as in the typical case
+ where cells are direct children of the table.
+
+ The range of valid coordinates for this interface are implementation dependent.
+ However, that range includes at least the intervals from the from the first row
+ or column with the index 0 up to the last (but not including) used row or column
+ as returned by IAccessibleTable::nRows and IAccessibleTable::nColumns.
+
+ Note that newer implementations are now using IAccessibleTable2 and IAccessibleTableCell
+ rather than this interface.
+*/
+[object, uuid(35AD8070-C20C-4fb4-B094-F4F7275DD469)]
+interface IAccessibleTable : IUnknown
+{
+
+ /** @brief Returns the accessible object at the specified row and column in
+ the table. This object could be an IAccessible or an IAccessible2.
+ @param [in] row
+ The 0 based row index for which to retrieve the cell.
+ @param [in] column
+ The 0 based column index for which to retrieve the cell.
+ @param [out] accessible
+ If both row and column index are valid then the corresponding accessible
+ object is returned that represents the requested cell regardless of whether
+ the cell is currently visible (on the screen).
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed, [out] value is NULL
+ */
+ [propget] HRESULT accessibleAt
+ (
+ [in] long row,
+ [in] long column,
+ [out, retval] IUnknown **accessible
+ );
+
+ /** @brief Returns the caption for the table. The returned object could be
+ an IAccessible or an IAccessible2.
+ @param [out] accessible
+ If the table has a caption then a reference to it is returned, else a NULL
+ pointer is returned.
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ */
+ [propget] HRESULT caption
+ (
+ [out, retval] IUnknown **accessible
+ );
+
+ /** @brief Translates the given row and column indexes into the corresponding cell index.
+ @param [in] rowIndex
+ 0 based row index for the cell.
+ @param [in] columnIndex
+ 0 based column index for the cell.
+ @param [out] cellIndex
+ Returns the 0 based index of the cell at the specified row and column indexes.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed, [out] value is 0
+ @note The returned value is not necessarily a child index of the immediate parent.
+ In cases where the table cells are not direct children of the table the index
+ is actually the cell index, i.e. conceptually it's an index into a one dimensional
+ array of cells laid out in row order.
+ */
+ [propget] HRESULT childIndex
+ (
+ [in] long rowIndex,
+ [in] long columnIndex,
+ [out, retval] long *cellIndex
+ );
+
+ /** @brief Returns the description text of the specified column in the table.
+ @param [in] column
+ The 0 based index of the column for which to retrieve the description.
+ @param [out] description
+ Returns the description text of the specified column in the table if such a
+ description exists. Otherwise a NULL pointer is returned.
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ @retval E_INVALIDARG if bad [in] passed, [out] value is NULL
+ */
+ [propget] HRESULT columnDescription
+ (
+ [in] long column,
+ [out, retval] BSTR *description
+ );
+
+ /** @brief Returns the number of columns occupied by the accessible object
+ at the specified row and column in the table.
+
+ The result is greater than 1 if the specified cell spans multiple columns.
+ @param [in] row
+ 0 based row index of the accessible for which to return the column extent.
+ @param [in] column
+ 0 based column index of the accessible for which to return the column extent.
+ @param [out] nColumnsSpanned
+ Returns the 1 based column extent of the specified cell.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed, [out] value is 0
+ */
+ [propget] HRESULT columnExtentAt
+ (
+ [in] long row,
+ [in] long column,
+ [out, retval] long *nColumnsSpanned
+ );
+
+ /** @brief Returns the column headers as an %IAccessibleTable object.
+
+ Content and size of the returned table are implementation dependent.
+ @param [out] accessibleTable
+ The column header
+ @param [out] startingRowIndex
+ The 0 based row index where the header starts, usually 0.
+ @retval S_OK
+ @retval S_FALSE if there is no header, [out] values are NULL and 0 respectively
+ */
+ [propget] HRESULT columnHeader
+ (
+ [out] IAccessibleTable **accessibleTable,
+ [out, retval] long *startingRowIndex
+ );
+
+ /** @brief Translates the given cell index into the corresponding column index.
+ @param [in] cellIndex
+ 0 based index of the cell in the parent or closest ancestor table. Typically this
+ is the value returned from IAccessible2::indexInParent, but in the case where the
+ table cells are not direct children of the table this is the cell index specified
+ by the "table-cell-index" object attribute obtained from parsing the attributes
+ string returned by calling IAccessible2::attributes on the cell object.
+ @param [out] columnIndex
+ Returns the 0 based column index of the cell of the specified child or the index of
+ the first column if the child spans multiple columns.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed, [out] value is 0
+ */
+ [propget] HRESULT columnIndex
+ (
+ [in] long cellIndex,
+ [out, retval] long *columnIndex
+ );
+
+ /** @brief Returns the total number of columns in table
+ @param [out] columnCount
+ Number of columns in table (including columns outside the current viewport)
+ @retval S_OK
+ */
+ [propget] HRESULT nColumns
+ (
+ [out, retval] long *columnCount
+ );
+
+ /** @brief Returns the total number of rows in table
+ @param [out] rowCount
+ Number of rows in table (including rows outside the current viewport)
+ @retval S_OK
+ */
+ [propget] HRESULT nRows
+ (
+ [out, retval] long *rowCount
+ );
+
+ /** @brief Returns the total number of selected cells
+ @param [out] cellCount
+ Number of cells currently selected
+ @retval S_OK
+ */
+ [propget] HRESULT nSelectedChildren
+ (
+ [out, retval] long *cellCount
+ );
+
+ /** @brief Returns the total number of selected columns
+ @param [out] columnCount
+ Number of columns currently selected
+ @retval S_OK
+ */
+ [propget] HRESULT nSelectedColumns
+ (
+ [out, retval] long *columnCount
+ );
+
+ /** @brief Returns the total number of selected rows
+ @param [out] rowCount
+ Number of rows currently selected
+ @retval S_OK
+ */
+ [propget] HRESULT nSelectedRows
+ (
+ [out, retval] long *rowCount
+ );
+
+ /** @brief Returns the description text of the specified row in the table.
+ @param [in] row
+ The 0 based index of the row for which to retrieve the description.
+ @param [out] description
+ Returns the description text of the specified row in the table if such a
+ description exists. Otherwise a NULL pointer is returned.
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ @retval E_INVALIDARG if bad [in] passed, [out] value is NULL
+ */
+ [propget] HRESULT rowDescription
+ (
+ [in] long row,
+ [out, retval] BSTR *description
+ );
+
+ /** @brief Returns the number of rows occupied by the accessible object
+ at the specified row and column in the table.
+
+ The result is greater than 1 if the specified cell spans multiple rows.
+ @param [in] row
+ 0 based row index of the accessible for which to return the row extent.
+ @param [in] column
+ 0 based column index of the accessible for which to return the row extent.
+ @param [out] nRowsSpanned
+ Returns the row extent of the specified cell.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed, [out] value is 0
+ */
+ [propget] HRESULT rowExtentAt
+ (
+ [in] long row,
+ [in] long column,
+ [out, retval] long *nRowsSpanned
+ );
+
+ /** @brief Returns the row headers as an %IAccessibleTable object.
+
+ Content and size of the returned table are implementation dependent.
+ @param [out] accessibleTable
+ The row header.
+ @param [out] startingColumnIndex
+ The 0 based column index where the header starts, usually 0.
+ @retval S_OK
+ @retval S_FALSE if there is no header, [out] values are NULL and 0 respectively
+ */
+ [propget] HRESULT rowHeader
+ (
+ [out] IAccessibleTable **accessibleTable,
+ [out, retval] long *startingColumnIndex
+ );
+
+ /** @brief Translates the given cell index into a row index.
+ @param [in] cellIndex
+ 0 based index of the cell in the parent or closest ancestor table. Typically this
+ is the value returned from IAccessible2::indexInParent, but in the case where the
+ table cells are not direct children of the table this is the cell index specified
+ by the "table-cell-index" object attribute obtained from parsing the attributes
+ string returned by calling IAccessible2::attributes on the cell object.
+ @param [out] rowIndex
+ 0 based row index
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed, [out] value is 0
+ */
+ [propget] HRESULT rowIndex
+ (
+ [in] long cellIndex,
+ [out, retval] long *rowIndex
+ );
+
+ /** @brief Returns a list of cell indexes currently selected (0 based).
+ @param [in] maxChildren
+ This parameter is ignored. Refer to @ref _arrayConsideration
+ "Special Consideration when using Arrays" for more details.
+ @param [out] children
+ An array of cell indexes of selected cells (each index is 0 based),
+ allocated by the server. The client must free it with CoTaskMemFree.
+ @param [out] nChildren
+ The number of cell indexes returned; the size of the returned array.
+ @retval S_OK
+ @retval S_FALSE if there are none, [out] values are NULL and 0 respectively
+ */
+ [propget] HRESULT selectedChildren
+ (
+ [in] long maxChildren,
+ [out, size_is(,maxChildren), length_is(,*nChildren)] long **children,
+ [out, retval] long *nChildren
+ );
+
+ /** @brief Returns a list of column indexes currently selected (0 based).
+ @param [in] maxColumns
+ This parameter is ignored. Refer to @ref _arrayConsideration
+ "Special Consideration when using Arrays" for more details.
+ @param [out] columns
+ An array of column indexes of selected columns (each index is 0 based), allocated
+ by the server. The client must free it with CoTaskMemFree.
+ @param [out] nColumns
+ The number of column indexes returned; the size of the returned array.
+ @retval S_OK
+ @retval S_FALSE if there are none, [out] values are NULL and 0 respectively
+ */
+ [propget] HRESULT selectedColumns
+ (
+ [in] long maxColumns,
+ [out, size_is(,maxColumns), length_is(,*nColumns)] long **columns,
+ [out, retval] long *nColumns
+ );
+
+ /** @brief Returns a list of row indexes currently selected (0 based).
+ @param [in] maxRows
+ This parameter is ignored. Refer to @ref _arrayConsideration
+ "Special Consideration when using Arrays" for more details.
+ @param [out] rows
+ An array of row indexes of selected rows (each index is 0 based), allocated
+ by the server. The client must free it with CoTaskMemFree.
+ @param [out] nRows
+ The number of row indexes returned; the size of the returned array.
+ @retval S_OK
+ @retval S_FALSE if there are none, [out] values are NULL and 0 respectively
+ */
+ [propget] HRESULT selectedRows
+ (
+ [in] long maxRows,
+ [out, size_is(,maxRows), length_is(,*nRows)] long **rows,
+ [out, retval] long *nRows
+ );
+
+ /** @brief Returns the summary description of the table. The returned object could be
+ an IAccessible or an IAccessible2.
+ @param [out] accessible
+ Returns a reference to an implementation dependent accessible object
+ representing the table's summary or a NULL pointer if the table
+ does not support a summary.
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ */
+ [propget] HRESULT summary
+ (
+ [out, retval] IUnknown **accessible
+ );
+
+ /** @brief Returns a boolean value indicating whether the specified column is
+ completely selected.
+ @param [in] column
+ 0 based index of the column for which to determine whether it is selected.
+ @param [out] isSelected
+ Returns TRUE if the specified column is selected completely and FALSE otherwise.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed, [out] value is FALSE
+ */
+ [propget] HRESULT isColumnSelected
+ (
+ [in] long column,
+ [out, retval] boolean *isSelected
+ );
+
+ /** @brief Returns a boolean value indicating whether the specified row is completely
+ selected.
+ @param [in] row
+ 0 based index of the row for which to determine whether it is selected.
+ @param [out] isSelected
+ Returns TRUE if the specified row is selected completely and FALSE otherwise.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed, [out] value is FALSE
+ */
+ [propget] HRESULT isRowSelected
+ (
+ [in] long row,
+ [out, retval] boolean *isSelected
+ );
+
+ /** @brief Returns a boolean value indicating whether the specified cell is selected.
+ @param [in] row
+ 0 based index of the row for the cell to determine whether it is selected.
+ @param [in] column
+ 0 based index of the column for the cell to determine whether it is selected.
+ @param [out] isSelected
+ Returns TRUE if the specified cell is selected and FALSE otherwise.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed, [out] value is FALSE
+ */
+ [propget] HRESULT isSelected
+ (
+ [in] long row,
+ [in] long column,
+ [out, retval] boolean *isSelected
+ );
+
+ /** @brief Selects a row and unselects all previously selected rows.
+ @param [in] row
+ 0 based index of the row to be selected.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ HRESULT selectRow
+ (
+ [in] long row
+ );
+
+ /** @brief Selects a column and unselects all previously selected columns.
+ @param [in] column
+ 0 based index of the column to be selected.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ HRESULT selectColumn
+ (
+ [in] long column
+ );
+
+ /** @brief Unselects one row, leaving other selected rows selected (if any).
+ @param [in] row
+ 0 based index of the row to be unselected.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ HRESULT unselectRow
+ (
+ [in] long row
+ );
+
+ /** @brief Unselects one column, leaving other selected columns selected (if any).
+ @param [in] column
+ 0 based index of the column to be unselected.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ HRESULT unselectColumn
+ (
+ [in] long column
+ );
+
+ /** @brief Given a cell index, gets the row and column indexes and extents of a cell
+ and whether or not it is selected.
+
+ This is a convenience function. It is not mandatory to implement it.
+ @param [in] index
+ 0 based index of this cell in the table.
+ @param [out] row
+ 0 based row index.
+ @param [out] column
+ 0 based column index.
+ @param [out] rowExtents
+ Number of cells spanned by this cell in this row.
+ @param [out] columnExtents
+ Number of cells spanned by this cell in this column.
+ @param [out] isSelected
+ Indicates if the specified cell is selected.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed, [out] values are 0s and FALSE respectively
+ */
+ [propget] HRESULT rowColumnExtentsAtIndex
+ (
+ [in] long index,
+ [out] long *row,
+ [out] long *column,
+ [out] long *rowExtents,
+ [out] long *columnExtents,
+ [out, retval] boolean *isSelected
+ );
+
+ /** @brief Returns the type and extents describing how a table changed.
+
+ Provided for use by the IA2_EVENT_TABLE_MODEL_CHANGED event handler.
+
+ This data is only guaranteed to be valid while the thread notifying the event
+ continues. Once the handler has returned, the validity of the data depends on
+ how the server manages the life cycle of its objects. Also, note that the server
+ may have different life cycle management strategies for controls depending on
+ whether or not a control manages its children. Lists, trees, and tables can have
+ a large number of children and thus it's possible that the child objects for those
+ controls would only be created as needed. Servers should document their life cycle
+ strategy as this will be of interest to assistive technology or script engines
+ accessing data out of process or from other threads. Servers only need to save the
+ most recent row and column values associated with the change and a scope of the
+ entire application is adequate.
+
+ @param [out] modelChange
+ A struct of (type(insert, delete, update), firstRow, lastRow, firstColumn, lastColumn).
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ */
+ [propget] HRESULT modelChange
+ (
+ [out, retval] IA2TableModelChange *modelChange
+ );
+
+}
+/*************************************************************************
+ *
+ * File Name (AccessibleTable2.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2012 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+
+
+/** @brief This interface gives access to a two-dimensional table.
+
+ Please also refer to the IAccessibleTableCell interface.
+
+ If you want to support older applications you should also support the
+ IAccessibleTable inteface.
+*/
+[object, uuid(6167f295-06f0-4cdd-a1fa-02e25153d869)]
+interface IAccessibleTable2 : IUnknown
+{
+
+ /** @brief Returns the accessible object at the specified row and column in
+ the table. This object could be an IAccessible or an IAccessible2.
+ @param [in] row
+ The 0 based row index for which to retrieve the cell.
+ @param [in] column
+ The 0 based column index for which to retrieve the cell.
+ @param [out] cell
+ If both row and column index are valid then the corresponding accessible
+ object is returned that represents the requested cell regardless of whether
+ the cell is currently visible (on the screen).
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT cellAt
+ (
+ [in] long row,
+ [in] long column,
+ [out, retval] IUnknown **cell
+ );
+
+ /** @brief Returns the caption for the table. The returned object could be
+ an IAccessible or an IAccessible2.
+ @param [out] accessible
+ If the table has a caption then a reference to it is returned, else a NULL
+ pointer is returned.
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ @deprecated use a describedBy relation
+ */
+ [propget] HRESULT caption
+ (
+ [out, retval] IUnknown **accessible
+ );
+
+ /** @brief Returns the description text of the specified column in the table.
+ @param [in] column
+ The 0 based index of the column for which to retrieve the description.
+ @param [out] description
+ Returns the description text of the specified column in the table if such a
+ description exists. Otherwise a NULL pointer is returned.
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT columnDescription
+ (
+ [in] long column,
+ [out, retval] BSTR *description
+ );
+
+
+ /** @brief Returns the total number of columns in table
+ @param [out] columnCount
+ Number of columns in table (including columns outside the current viewport)
+ @retval S_OK
+ */
+ [propget] HRESULT nColumns
+ (
+ [out, retval] long *columnCount
+ );
+
+ /** @brief Returns the total number of rows in table
+ @param [out] rowCount
+ Number of rows in table (including rows outside the current viewport)
+ @retval S_OK
+ */
+ [propget] HRESULT nRows
+ (
+ [out, retval] long *rowCount
+ );
+
+ /** @brief Returns the total number of selected cells
+ @param [out] cellCount
+ Number of cells currently selected
+ @retval S_OK
+ */
+ [propget] HRESULT nSelectedCells
+ (
+ [out, retval] long *cellCount
+ );
+
+ /** @brief Returns the total number of selected columns
+ @param [out] columnCount
+ Number of columns currently selected
+ @retval S_OK
+ */
+ [propget] HRESULT nSelectedColumns
+ (
+ [out, retval] long *columnCount
+ );
+
+ /** @brief Returns the total number of selected rows
+ @param [out] rowCount
+ Number of rows currently selected
+ @retval S_OK
+ */
+ [propget] HRESULT nSelectedRows
+ (
+ [out, retval] long *rowCount
+ );
+
+ /** @brief Returns the description text of the specified row in the table.
+ @param [in] row
+ The 0 based index of the row for which to retrieve the description.
+ @param [out] description
+ Returns the description text of the specified row in the table if such a
+ description exists. Otherwise a NULL pointer is returned.
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT rowDescription
+ (
+ [in] long row,
+ [out, retval] BSTR *description
+ );
+
+ /** @brief Returns a list of accessibles currently selected.
+ @param [out] cells
+ Pointer to an array of references to selected accessibles. The array is
+ allocated by the server with CoTaskMemAlloc and freed by the client with
+ CoTaskMemFree.
+ @param [out] nSelectedCells
+ The number of accessibles returned; the size of the returned array.
+ @retval S_OK
+ @retval S_FALSE if there are none, [out] values are NULL and 0 respectively
+ */
+ [propget] HRESULT selectedCells
+ (
+ [out, size_is(,*nSelectedCells)] IUnknown ***cells,
+ [out, retval] long *nSelectedCells
+ );
+
+ /** @brief Returns a list of column indexes currently selected (0 based).
+ @param [out] selectedColumns
+ A pointer to an array of column indexes of selected columns (each index is
+ 0 based). The array is allocated by the server with CoTaskMemAlloc and
+ freed by the client with CoTaskMemFree.
+ @param [out] nColumns
+ The number of column indexes returned; the size of the returned array.
+ @retval S_OK
+ @retval S_FALSE if there are none, [out] values are NULL and 0 respectively
+ */
+ [propget] HRESULT selectedColumns
+ (
+ [out, size_is(,*nColumns)] long **selectedColumns,
+ [out, retval] long *nColumns
+ );
+
+ /** @brief Returns a list of row indexes currently selected (0 based).
+ @param [out] selectedRows
+ An array of row indexes of selected rows (each index is 0 based). The array
+ is allocated by the server with CoTaskMemAlloc and freed by the client with
+ CoTaskMemFree.
+ @param [out] nRows
+ The number of row indexes returned; the size of the returned array.
+ @retval S_OK
+ @retval S_FALSE if there are none, [out] values are NULL and 0 respectively
+ */
+ [propget] HRESULT selectedRows
+ (
+ [out, size_is(,*nRows)] long **selectedRows,
+ [out, retval] long *nRows
+ );
+
+ /** @brief Returns the summary description of the table. The returned object could be
+ an IAccessible or an IAccessible2.
+ @param [out] accessible
+ Returns a reference to an implementation dependent accessible object
+ representing the table's summary or a NULL pointer if the table
+ does not support a summary.
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ @deprecated Use the labeledBy relation
+ */
+ [propget] HRESULT summary
+ (
+ [out, retval] IUnknown **accessible
+ );
+
+ /** @brief Returns a boolean value indicating whether the specified column is
+ completely selected.
+ @param [in] column
+ 0 based index of the column for which to determine whether it is selected.
+ @param [out] isSelected
+ Returns TRUE if the specified column is selected completely and FALSE otherwise.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT isColumnSelected
+ (
+ [in] long column,
+ [out, retval] boolean *isSelected
+ );
+
+ /** @brief Returns a boolean value indicating whether the specified row is completely
+ selected.
+ @param [in] row
+ 0 based index of the row for which to determine whether it is selected.
+ @param [out] isSelected
+ Returns TRUE if the specified row is selected completely and FALSE otherwise.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ [propget] HRESULT isRowSelected
+ (
+ [in] long row,
+ [out, retval] boolean *isSelected
+ );
+
+ /** @brief Selects a row and unselects all previously selected rows.
+
+ The behavior should mimic that of the application, but for those applications
+ which do not have a means in the GUI to select a full row of cells the behavior
+ should be as follows: First any selected rows in the table are unselected. Then
+ the entire row of cells for the specified row is selected. If any of the
+ cells in the selected row span additional rows, the cells in those rows
+ are also selected.
+ @param [in] row
+ 0 based index of the row to be selected.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ HRESULT selectRow
+ (
+ [in] long row
+ );
+
+ /** @brief Selects a column and unselects all previously selected columns.
+
+ The behavior should mimic that of the application, but for those applications
+ which do not have a means in the GUI to select a full column of cells the behavior
+ should be as follows: First any selected columns in the table are unselected. Then
+ the entire column of cells for the specified column is selected. If any of the
+ cells in the selected column span additional columns, the cells in those columns
+ are also selected.
+ @param [in] column
+ 0 based index of the column to be selected.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ HRESULT selectColumn
+ (
+ [in] long column
+ );
+
+ /** @brief Unselects one row, leaving other selected rows selected (if any).
+
+ The behavior should mimic that of the application, but for those applications
+ which do not have a means in the GUI to unselect a full row of cells the
+ behavior should be as follows: The entire row of cells for the specified
+ row is unselected. If any of the cells in the selected row span additional
+ rows, the cells in those rows are also unselected.
+ @param [in] row
+ 0 based index of the row to be unselected.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ HRESULT unselectRow
+ (
+ [in] long row
+ );
+
+ /** @brief Unselects one column, leaving other selected columns selected (if any).
+
+ The behavior should mimic that of the application, but for those applications
+ which do not have a means in the GUI to unselect a full column of cells the
+ behavior should be as follows: The entire column of cells for the specified
+ column is unselected. If any of the cells in the selected column span additional
+ columns, the cells in those columns are also unselected.
+ @param [in] column
+ 0 based index of the column to be unselected.
+ @retval S_OK
+ @retval E_INVALIDARG if bad [in] passed
+ */
+ HRESULT unselectColumn
+ (
+ [in] long column
+ );
+
+ /** @brief Returns the type and extents describing how a table changed.
+
+ Provided for use by the IA2_EVENT_TABLE_MODEL_CHANGED event handler.
+
+ This data is only guaranteed to be valid while the thread notifying the event
+ continues. Once the handler has returned, the validity of the data depends on
+ how the server manages the life cycle of its objects. Also, note that the server
+ may have different life cycle management strategies for controls depending on
+ whether or not a control manages its children. Lists, trees, and tables can have
+ a large number of children and thus it's possible that the child objects for those
+ controls would only be created as needed. Servers should document their life cycle
+ strategy as this will be of interest to assistive technology or script engines
+ accessing data out of process or from other threads. Servers only need to save the
+ most recent row and column values associated with the change and a scope of the
+ entire application is adequate.
+
+ @param [out] modelChange
+ A struct of (type(insert, delete, update), firstRow, lastRow, firstColumn, lastColumn).
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ */
+ [propget] HRESULT modelChange
+ (
+ [out, retval] IA2TableModelChange *modelChange
+ );
+
+}
+/*************************************************************************
+ *
+ * File Name (AccessibleTableCell.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2013 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+
+/** @brief This interface gives access to the cells of a two-dimensional table.
+
+ Please also refer to the IAccessibleTable2 interface.
+
+*/
+[object, uuid(594116B1-C99F-4847-AD06-0A7A86ECE645)]
+interface IAccessibleTableCell : IUnknown
+{
+
+ /** @brief Returns the number of columns occupied by this cell accessible.
+
+ The result is greater than 1 if the specified cell spans multiple columns.
+ @param [out] nColumnsSpanned
+ Returns the 1 based column extent of the specified cell.
+ @retval S_OK
+ */
+ [propget] HRESULT columnExtent
+ (
+ [out, retval] long *nColumnsSpanned
+ );
+
+ /** @brief Returns the column headers as an array of cell accessibles.
+
+ @param [out] cellAccessibles
+ Pointer to an array of references to cell accessibles. The array is allocated
+ by the server. The client must free it with CoTaskMemFree.
+ @param [out] nColumnHeaderCells
+ The number of accessibles returned; the size of the returned array.
+ @retval S_OK
+ @retval S_FALSE if there is no header, [out] values are NULL and 0 respectively
+ */
+ [propget] HRESULT columnHeaderCells
+ (
+ [out, size_is(,*nColumnHeaderCells)] IUnknown ***cellAccessibles,
+ [out, retval] long *nColumnHeaderCells
+ );
+
+ /** @brief Translates this cell accessible into the corresponding column index.
+
+ @param [out] columnIndex
+ Returns the 0 based column index of the cell of the specified cell or the index of
+ the first column if the cell spans multiple columns.
+ @retval S_OK
+ */
+ [propget] HRESULT columnIndex
+ (
+ [out, retval] long *columnIndex
+ );
+
+ /** @brief Returns the number of rows occupied by this cell accessible.
+
+ @param [out] nRowsSpanned
+ Returns the row extent of the specified cell.
+ @retval S_OK
+ */
+ [propget] HRESULT rowExtent
+ (
+ [out, retval] long *nRowsSpanned
+ );
+
+ /** @brief Returns the row headers as an array of cell accessibles.
+
+ @param [out] cellAccessibles
+ Pointer to an array of references to cell accessibles. The array is allocated
+ by the server. The client must free it with CoTaskMemFree.
+ @param [out] nRowHeaderCells
+ The number of accessibles returned; the size of the returned array.
+ @retval S_OK
+ @retval S_FALSE if there is no header, [out] values are NULL and 0 respectively
+ */
+ [propget] HRESULT rowHeaderCells
+ (
+ [out, size_is(,*nRowHeaderCells)] IUnknown ***cellAccessibles,
+ [out, retval] long *nRowHeaderCells
+ );
+
+ /** @brief Translates this cell accessible into the corresponding row index.
+
+ @param [out] rowIndex
+ Returns the 0 based row index of the specified cell or the index of
+ the first row if the cell spans multiple rows.
+ @retval S_OK
+ */
+ [propget] HRESULT rowIndex
+ (
+ [out, retval] long *rowIndex
+ );
+
+ /** @brief Returns a boolean value indicating whether this cell is selected.
+
+ @param [out] isSelected
+ Returns TRUE if the specified cell is selected and FALSE otherwise.
+ @retval S_OK
+ */
+ [propget] HRESULT isSelected
+ (
+ [out, retval] boolean *isSelected
+ );
+
+ /** @brief Gets the row and column indexes and extents of this cell accessible
+ and whether or not it is selected.
+
+ This is a convenience function. It is not mandatory to implement it.
+ @param [out] row
+ 0 based row index.
+ @param [out] column
+ 0 based column index.
+ @param [out] rowExtents
+ Number of cells spanned by this cell in this row.
+ @param [out] columnExtents
+ Number of cells spanned by this cell in this column.
+ @param [out] isSelected
+ Indicates if the specified cell is selected.
+ @retval S_OK
+ */
+ [propget] HRESULT rowColumnExtents
+ (
+ [out] long *row,
+ [out] long *column,
+ [out] long *rowExtents,
+ [out] long *columnExtents,
+ [out, retval] boolean *isSelected
+ );
+
+ /** @brief Returns a reference to the accessbile of the containing table.
+
+ @param [out] table
+ Returns a reference to the IUnknown of the containing table.
+ @retval S_OK
+ */
+ [propget] HRESULT table
+ (
+ [out, retval] IUnknown **table
+ );
+
+}
+/*************************************************************************
+ *
+ * File Name (AccessibleImage.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2010 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+
+/** @brief This interface represents images and icons.
+
+ This interface is used for a representation of images like icons on buttons.
+ %IAccessibleImage only needs to be implemented in certain situations. Some
+ examples are:
+ <ol>
+ <li>The accessible name and description are not enough to fully
+ describe the image, e.g. when the accessible description is used to define the
+ behavior of an actionable image and the image itself conveys semantically
+ significant information.
+ <li>The user can edit the content that includes an
+ image and therefore the user needs to be able to review the image's position.
+ </ol>
+*/
+[object, uuid(FE5ABB3D-615E-4f7b-909F-5F0EDA9E8DDE)]
+interface IAccessibleImage : IUnknown
+{
+ /** @brief Returns the localized description of the image.
+ @param [out] description
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ */
+ [propget] HRESULT description
+ (
+ [out, retval] BSTR *description
+ );
+
+ /** @brief Returns the coordinates of the image.
+ @param [in] coordinateType
+ Specifies whether the returned coordinates should be relative to the screen or the parent object.
+ @param [out] x
+ @param [out] y
+ @retval S_OK
+ */
+ [propget] HRESULT imagePosition
+ (
+ [in] enum IA2CoordinateType coordinateType,
+ [out] long *x,
+ [out, retval] long *y
+ );
+
+ /** @brief Returns the size of the image in units specified by parent's coordinate system.
+ @param [out] height
+ @param [out] width
+ @retval S_OK
+ */
+
+ [propget] HRESULT imageSize
+ (
+ [out] long *height,
+ [out, retval] long *width
+ );
+}
+/*************************************************************************
+ *
+ * File Name (AccessibleEventID.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2010 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+/** %IAccessible2 specific event constants
+
+ This enum defines the event IDs fired by %IAccessible2 objects. The event IDs
+ are in addition to those used by MSAA.
+*/
+enum IA2EventID {
+
+ /** The change of the number or attributes of actions of an accessible
+ object is signaled by events of this type.
+ */
+ IA2_EVENT_ACTION_CHANGED = 0x101,
+
+ /** <b>Deprecated.</b> The active descendant of a component has changed.
+
+ Note: This event constant is misspelled and thus is deprecated and will be
+ removed in a later version. Please use the correctly spelled version which
+ follows.
+ */
+ IA2_EVENT_ACTIVE_DECENDENT_CHANGED,
+
+ /** The active descendant of a component has changed. The active descendant
+ is used in objects with transient children.
+
+ Note: Due to the fact that MSAA's WinEvents don't allow the active child index
+ to be passed on the IA2_EVENT_ACTIVE_DESCENDANT_CHANGED event the manages
+ descendants scheme can't be used. Instead the active child object has to fire
+ MSAA's EVENT_OBJECT_FOCUS. In a future release a new event mechanism may be
+ added to provide for event specific data to be passed with the event. At that
+ time the IA2_EVENT_ACTIVE_DECENDENT_CHANGED event and
+ IA2_STATE_MANAGES_DESCENDANTS state would be useful.
+ */
+ IA2_EVENT_ACTIVE_DESCENDANT_CHANGED = IA2_EVENT_ACTIVE_DECENDENT_CHANGED,
+
+ /** The document wide attributes of the document object have changed.
+ */
+ IA2_EVENT_DOCUMENT_ATTRIBUTE_CHANGED,
+
+ /** The contents of the document have changed.
+ */
+ IA2_EVENT_DOCUMENT_CONTENT_CHANGED,
+
+ /** The loading of the document has completed.
+ */
+ IA2_EVENT_DOCUMENT_LOAD_COMPLETE,
+
+ /** The loading of the document was interrupted.
+ */
+ IA2_EVENT_DOCUMENT_LOAD_STOPPED,
+
+ /** The document contents are being reloaded.
+ */
+ IA2_EVENT_DOCUMENT_RELOAD,
+
+ /** The ending index of this link within the containing string has changed.
+ */
+ IA2_EVENT_HYPERLINK_END_INDEX_CHANGED,
+
+ /** The number of anchors associated with this hyperlink object has changed.
+ */
+ IA2_EVENT_HYPERLINK_NUMBER_OF_ANCHORS_CHANGED,
+
+ /** The hyperlink selected state changed from selected to unselected or
+ from unselected to selected.
+ */
+ IA2_EVENT_HYPERLINK_SELECTED_LINK_CHANGED,
+
+ /** One of the links associated with the hypertext object has been activated.
+ */
+ IA2_EVENT_HYPERTEXT_LINK_ACTIVATED,
+
+ /** One of the links associated with the hypertext object has been selected.
+ */
+ IA2_EVENT_HYPERTEXT_LINK_SELECTED,
+
+ /** The starting index of this link within the containing string has changed.
+ */
+ IA2_EVENT_HYPERLINK_START_INDEX_CHANGED,
+
+ /** Focus has changed from one hypertext object to another, or focus moved
+ from a non-hypertext object to a hypertext object, or focus moved from a
+ hypertext object to a non-hypertext object.
+ */
+ IA2_EVENT_HYPERTEXT_CHANGED,
+
+ /** The number of hyperlinks associated with a hypertext object changed
+ */
+ IA2_EVENT_HYPERTEXT_NLINKS_CHANGED,
+
+ /** An object's attributes changed.
+ Also see ::IA2_EVENT_TEXT_ATTRIBUTE_CHANGED.
+ */
+ IA2_EVENT_OBJECT_ATTRIBUTE_CHANGED,
+
+ /** A slide changed in a presentation document or a page boundary was
+ crossed in a word processing document.
+ */
+ IA2_EVENT_PAGE_CHANGED,
+
+ /** The caret moved from one section to the next.
+ */
+ IA2_EVENT_SECTION_CHANGED,
+
+ /** A table caption changed.
+ */
+ IA2_EVENT_TABLE_CAPTION_CHANGED,
+
+ /** A table's column description changed.
+ */
+ IA2_EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED,
+
+ /** A table's column header changed.
+ */
+ IA2_EVENT_TABLE_COLUMN_HEADER_CHANGED,
+
+ /** A table's data changed.
+ */
+ IA2_EVENT_TABLE_MODEL_CHANGED,
+
+ /** A table's row description changed.
+ */
+ IA2_EVENT_TABLE_ROW_DESCRIPTION_CHANGED,
+
+ /** A table's row header changed.
+ */
+ IA2_EVENT_TABLE_ROW_HEADER_CHANGED,
+
+ /** A table's summary changed.
+ */
+ IA2_EVENT_TABLE_SUMMARY_CHANGED,
+
+ /** A text object's attributes changed.
+ Also see ::IA2_EVENT_OBJECT_ATTRIBUTE_CHANGED.
+ */
+ IA2_EVENT_TEXT_ATTRIBUTE_CHANGED,
+
+ /** The caret has moved to a new position.
+ */
+ IA2_EVENT_TEXT_CARET_MOVED,
+
+ /** <b>Deprecated.</b> This event is equivalent to ::IA2_EVENT_TEXT_UPDATED.
+ */
+ IA2_EVENT_TEXT_CHANGED,
+
+ /** The caret moved from one column to the next.
+ */
+ IA2_EVENT_TEXT_COLUMN_CHANGED,
+
+ /** Text was inserted.
+ */
+ IA2_EVENT_TEXT_INSERTED,
+
+ /** Text was removed.
+ */
+ IA2_EVENT_TEXT_REMOVED,
+
+ /** This event indicates general text changes, i.e. changes to text that are
+ exposed through the IAccessibleText interface. For compatibility with ATK/AT-SPI
+ which does not have an equivalent event, servers can alternatively fire
+ ::IA2_EVENT_TEXT_REMOVED and ::IA2_EVENT_TEXT_INSERTED.
+ */
+ IA2_EVENT_TEXT_UPDATED,
+
+ /** The text selection changed. Later versions of Microsoft development environments
+ have an equivalent event identified, EVENT_OBJECT_TEXTSELECTIONCHANGED. Servers
+ should use that if it is available and use IA2_EVENT_TEXT_SELECTION_CHANGED otherwise.
+ Clients should be prepared to respond to either event.
+
+ */
+ IA2_EVENT_TEXT_SELECTION_CHANGED,
+
+ /** A visible data event indicates the change of the visual appearance
+ of an accessible object. This includes for example most of the
+ attributes available via the IAccessibleComponent interface.
+ */
+ IA2_EVENT_VISIBLE_DATA_CHANGED
+
+};
+/*************************************************************************
+ *
+ * File Name (AccessibleApplication.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2010 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+
+/** @brief This interface gives access to the application's name and version information.
+
+ This interface provides the AT with the information it needs to differentiate
+ this application from other applications, from other versions of this
+ application, or from other versions of this application running on different
+ versions of an accessibility bridge or accessibility toolkit.
+
+ Servers implementing IAccessible2 should provide access to the %IAccessibleApplication
+ interface via QueryService from any object so that ATs can easily determine specific
+ information about the application such as its name or version.
+*/
+[object, uuid(D49DED83-5B25-43F4-9B95-93B44595979E)]
+interface IAccessibleApplication : IUnknown
+{
+
+ /** @brief Returns the application name.
+ @param [out] name
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ */
+ [propget] HRESULT appName
+ (
+ [out, retval] BSTR *name
+ );
+
+ /** @brief Returns the application version.
+ @param [out] version
+ The version string must not contain levels when it is know beforehand that
+ this information will never require a change in a client's behavior.
+ For example, use "3.6.0" rather than "3.6.0.v201005131500".
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ */
+ [propget] HRESULT appVersion
+ (
+ [out, retval] BSTR *version
+ );
+
+ /** @brief Returns the toolkit/bridge name.
+ @param [out] name
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ */
+ [propget] HRESULT toolkitName
+ (
+ [out, retval] BSTR *name
+ );
+
+ /** @brief Returns the toolkit/bridge version.
+ @param [out] version
+ The version string must not contain levels when it is know beforehand that
+ this information will never require a change in a client's behavior.
+ For example, use "3.6.0" rather than "3.6.0.v201005131500".
+ @retval S_OK
+ @retval S_FALSE if there is nothing to return, [out] value is NULL
+ */
+ [propget] HRESULT toolkitVersion
+ (
+ [out, retval] BSTR *version
+ );
+
+}
+
+/*************************************************************************
+ *
+ * File Name (AccessibleDocument.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2013 Linux Foundation
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+
+
+
+
+/** @brief This interface represents documents.
+
+ This interface is used for a representation of documents.
+*/
+[object, uuid(C48C7FCF-4AB5-4056-AFA6-902D6E1D1149)]
+interface IAccessibleDocument : IUnknown
+{
+ /** @brief Returns the most recently used anchor target within a document.
+
+ A document's most recently targeted in-page anchor is returned. A typical use
+ of this method is to fetch the anchor target within an HTML document. In this
+ case anchor targets are those which have been defined with the &lt;a&gt; tag.
+
+ @param [out] accessible
+ @retval S_OK
+ @retval S_FALSE if there are no existing valid anchor targets, [out] value is NULL.
+ */
+ [propget] HRESULT anchorTarget
+ (
+ [out, retval] IUnknown **accessible
+ );
+
+}
+/*************************************************************************
+ *
+ * File Name (IA2TypeLibrary.idl)
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2012 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (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 BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+
+// This is not a standalone file. It is to be appended to the end of the
+// merged IDL file.
+
+cpp_quote("")
+cpp_quote("// Type Library Definitions")
+cpp_quote("")
+
+[
+ uuid(CE3F726E-D1D3-44FE-B995-FF1DB3B48B2B),
+ helpstring("IAccessible2 Type Library"),
+ version(1.3),
+ hidden
+]
+
+library IAccessible2Lib
+{
+ importlib ("stdole2.tlb");
+ importlib ("oleacc.dll");
+ interface IAccessible2;
+ interface IAccessible2_2;
+ interface IAccessibleAction;
+ interface IAccessibleApplication;
+ interface IAccessibleComponent;
+ interface IAccessibleDocument;
+ interface IAccessibleEditableText;
+ interface IAccessibleHyperlink;
+ interface IAccessibleHypertext;
+ interface IAccessibleHypertext2;
+ interface IAccessibleImage;
+ interface IAccessibleRelation;
+ interface IAccessibleTable;
+ interface IAccessibleTable2;
+ interface IAccessibleTableCell;
+ interface IAccessibleText;
+ interface IAccessibleText2;
+ interface IAccessibleValue;
+ enum IA2CoordinateType;
+ enum IA2EventID;
+ enum IA2Role;
+ enum IA2ScrollType;
+ enum IA2States;
+ enum IA2TableModelChangeType;
+ enum IA2TextBoundaryType;
+ enum IA2TextSpecialOffsets;
+}
diff --git a/winaccessibility/source/UAccCOMIDL/makefile.mk b/winaccessibility/source/UAccCOMIDL/makefile.mk
new file mode 100644
index 000000000000..6f45b4ac1f7a
--- /dev/null
+++ b/winaccessibility/source/UAccCOMIDL/makefile.mk
@@ -0,0 +1,101 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+PRJ=..$/..
+PRJNAME=winaccessibility
+TARGET=UAccComIDL
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+.IF "$(GUI)" == "WNT"
+
+# --- Targets ----------------------------------
+
+ALL : $(MISC)$/ia2_api_all \
+ $(MISC)$/AccessibleKeyBinding \
+ $(MISC)$/AccessibleKeyStroke \
+ $(MISC)$/Charset \
+ $(MISC)$/defines \
+ $(MISC)$/UAccCOM
+
+MTL=midl.exe
+MTL_PROJ=
+
+SOURCE=AccessibleKeyBinding.idl
+SOURCE1=AccessibleKeyStroke.idl
+SOURCE2=Charset.idl
+SOURCE3=defines.idl
+SOURCE4=UAccCOM.idl
+SOURCE5=ia2_api_all.idl
+
+MTL_SWITCHES=-tlb $(MISC)$/AccessibleKeyBinding.tlb -h $(MISC)$/AccessibleKeyBinding.h -iid $(MISC)$/AccessibleKeyBinding_i.c -proxy $(MISC)$/AccessibleKeyBinding_p.c -Oicf
+MTL_SWITCHES1=-tlb $(MISC)$/AccessibleKeyStroke.tlb -h $(MISC)$/AccessibleKeyStroke.h -iid $(MISC)$/AccessibleKeyStroke_i.c -proxy $(MISC)$/AccessibleKeyStroke_p.c -Oicf
+MTL_SWITCHES2=-tlb $(MISC)$/Charset.tlb -h $(MISC)$/Charset.h -iid $(MISC)$/Charset_i.c -proxy $(MISC)$/Charset_p.c -Oicf
+MTL_SWITCHES3=-tlb $(MISC)$/defines.tlb -h $(MISC)$/defines.h -iid $(MISC)$/defines_i.c -proxy $(MISC)$/defines_p.c -Oicf
+MTL_SWITCHES4=-tlb $(MISC)$/UAccCOM.tlb -h $(MISC)$/UAccCOM.h -iid $(MISC)$/UAccCOM_i.c -proxy $(MISC)$/UAccCOM_p.c -Oicf
+MTL_SWITCHES5=-tlb $(MISC)$/ia2_api_all.tlb -h $(MISC)$/ia2_api_all.h -iid $(MISC)$/ia2_api_all_i.c -proxy $(MISC)$/ia2_api_all_p.c -Oicf
+
+.IF "$(COM)"=="GCC"
+
+MTL_SWITCHESCOMMON=-cpp_cmd gcc -cpp_opt "-x c -E -D__stdcall= -D_stdcall= -nostdinc -I $(shell @cygpath -w $(PSDK_HOME)/include)"
+MTL_SWITCHES+=MTL_SWITCHESCOMMON
+MTL_SWITCHES1+=MTL_SWITCHESCOMMON
+MTL_SWITCHES2+=MTL_SWITCHESCOMMON
+MTL_SWITCHES3+=MTL_SWITCHESCOMMON
+MTL_SWITCHES4+=MTL_SWITCHESCOMMON
+MTL_SWITCHES5+=MTL_SWITCHESCOMMON
+
+$(MISC)$/AccessibleKeyBinding : $(SOURCE)
+ $(MTL) $(MTL_SWITCHES) -I $(shell @cygpath -w $(PSDK_HOME)/include|sed 's#\\#\\\\#g') $(SOURCE)
+$(MISC)$/AccessibleKeyStroke : $(SOURCE1)
+ $(MTL) $(MTL_SWITCHES1) -I $(shell @cygpath -w $(PSDK_HOME)/include|sed 's#\\#\\\\#g') $(SOURCE1)
+$(MISC)$/Charset : $(SOURCE2)
+ $(MTL) $(MTL_SWITCHES2) -I $(shell @cygpath -w $(PSDK_HOME)/include|sed 's#\\#\\\\#g') $(SOURCE2)
+$(MISC)$/defines : $(SOURCE3)
+ $(MTL) $(MTL_SWITCHES3) -I $(shell @cygpath -w $(PSDK_HOME)/include|sed 's#\\#\\\\#g') $(SOURCE3)
+$(MISC)$/UAccCOM : $(SOURCE4)
+ $(MTL) $(MTL_SWITCHES4) -I $(shell @cygpath -w $(PSDK_HOME)/include|sed 's#\\#\\\\#g') $(SOURCE4)
+$(MISC)$/ia2_api_all : $(SOURCE5)
+ $(MTL) $(MTL_SWITCHES5) -I $(shell @cygpath -w $(PSDK_HOME)/include|sed 's#\\#\\\\#g') $(SOURCE5)
+
+.ELSE
+
+
+$(MISC)$/AccessibleKeyBinding : $(SOURCE)
+ $(WRAPCMD) $(MTL) $(MTL_SWITCHES) $(INCLUDE) $(SOURCE) && $(TOUCH) $@
+$(MISC)$/AccessibleKeyStroke : $(SOURCE1)
+ $(WRAPCMD) $(MTL) $(MTL_SWITCHES1) $(INCLUDE) $(SOURCE1) && $(TOUCH) $@
+$(MISC)$/Charset : $(SOURCE2)
+ $(WRAPCMD) $(MTL) $(MTL_SWITCHES2) $(INCLUDE) $(SOURCE2) && $(TOUCH) $@
+$(MISC)$/defines : $(SOURCE3)
+ $(WRAPCMD) $(MTL) $(MTL_SWITCHES3) $(INCLUDE) $(SOURCE3) && $(TOUCH) $@
+$(MISC)$/UAccCOM : $(SOURCE4)
+ $(WRAPCMD) $(MTL) $(MTL_SWITCHES4) $(INCLUDE) $(SOURCE4) && $(TOUCH) $@
+$(MISC)$/ia2_api_all : $(SOURCE5)
+ $(WRAPCMD) $(MTL) $(MTL_SWITCHES5) $(INCLUDE) $(SOURCE5) && $(TOUCH) $@
+.ENDIF
+
+.ENDIF
+
+.INCLUDE : target.mk
+
diff --git a/winaccessibility/source/service/AccComponentEventListener.cxx b/winaccessibility/source/service/AccComponentEventListener.cxx
new file mode 100644
index 000000000000..0f0343619766
--- /dev/null
+++ b/winaccessibility/source/service/AccComponentEventListener.cxx
@@ -0,0 +1,336 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+
+#include "AccComponentEventListener.hxx"
+#include "AccObjectManagerAgent.hxx"
+#include "unomsaaevent.hxx"
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+
+AccComponentEventListener::AccComponentEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent)
+ :AccEventListener(pAcc, Agent)
+{
+}
+
+AccComponentEventListener::~AccComponentEventListener()
+{
+}
+
+/**
+ * Uno's event notifier when event is captured
+ *
+ * @param AccessibleEventObject the event object which contains information about event
+ */
+void AccComponentEventListener::notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
+throw (::com::sun::star::uno::RuntimeException)
+{
+ switch (aEvent.EventId)
+ {
+ case AccessibleEventId::VALUE_CHANGED:
+ handleValueChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::ACTION_CHANGED:
+ handleActionChangedEvent();
+ break;
+ case AccessibleEventId::TEXT_CHANGED:
+ handleTextChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::CARET_CHANGED:
+ handleCaretChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::VISIBLE_DATA_CHANGED:
+ handleVisibleDataChangedEvent();
+ break;
+ case AccessibleEventId::BOUNDRECT_CHANGED:
+ handleBoundrectChangedEvent();
+ break;
+ case AccessibleEventId::SELECTION_CHANGED:
+ handleSelectionChangedEvent();
+ break;
+ //to add TEXT_SELECTION_CHANGED event
+ case AccessibleEventId::TEXT_SELECTION_CHANGED:
+ handleTextSelectionChangedEvent();
+ break;
+ //End
+ default:
+ AccEventListener::notifyEvent(aEvent);
+ break;
+ }
+}
+
+/**
+ * handle the VALUE_CHANGED event
+ *
+ * @param oldValue the old value of the source of event
+ * @param newValue the new value of the source of event
+ */
+void AccComponentEventListener::handleValueChangedEvent(Any oldValue, Any newValue)
+{
+ pAgent->UpdateValue(pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_VALUECHANGE, pAccessible);
+}
+
+/**
+ * handle the NAME_CHANGED event
+ */
+void AccComponentEventListener::handleActionChangedEvent()
+{
+ pAgent->UpdateAction(pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_DEFACTIONCHANGE, pAccessible);
+}
+
+/**
+ * handle the TEXT_CHANGED event
+ *
+ * @param oldValue the old value of the source of event
+ * @param newValue the new value of the source of event
+ */
+void AccComponentEventListener::handleTextChangedEvent(Any oldValue, Any newValue)
+{
+ pAgent->UpdateValue(pAccessible, newValue);
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_VALUECHANGE, pAccessible);
+}
+
+/**
+ * handle the CARET_CHANGED event
+ *
+ * @param oldValue the old value of the source of event
+ * @param newValue the new value of the source of event
+ */
+void AccComponentEventListener::handleCaretChangedEvent(Any oldValue, Any newValue)
+{
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_CARETCHANGE, pAccessible);
+}
+
+/**
+ * handle the VISIBLE_DATA_CHANGED event
+ */
+void AccComponentEventListener::handleVisibleDataChangedEvent()
+{
+ AccEventListener::handleVisibleDataChangedEvent();
+}
+
+/**
+ * handle the BOUNDRECT_CHANGED event
+ */
+void AccComponentEventListener::handleBoundrectChangedEvent()
+{
+ AccEventListener::handleBoundrectChangedEvent();
+}
+
+/**
+ * set the new state and fire the MSAA event
+ *
+ * @param state new state id
+ * @param enable true if state is set, false if state is unset
+ */
+void AccComponentEventListener::setComponentState(short state, bool enable )
+{
+ // only the following state can be fired state event.
+ switch (state)
+ {
+ case AccessibleStateType::CHECKED:
+ case AccessibleStateType::PRESSED:
+ case AccessibleStateType::SELECTED:
+ case AccessibleStateType::ARMED:
+ case AccessibleStateType::INDETERMINATE:
+ case AccessibleStateType::SHOWING:
+ fireStatePropertyChange(state, enable);
+ break;
+ case AccessibleStateType::VISIBLE:
+ if (getRole() == AccessibleRole::MENU_ITEM)
+ {
+ if(enable)
+ {
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::VISIBLE);
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::FOCUSABLE);
+ }
+ else
+ {
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::VISIBLE);
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::FOCUSABLE);
+ }
+ }
+ else
+ {
+ fireStatePropertyChange(state, enable);
+ }
+ break;
+ break;
+ case AccessibleStateType::FOCUSED:
+ fireStateFocusdChange(enable);
+ break;
+ case AccessibleStateType::ENABLED:
+ if(enable)
+ {
+ pAgent->UpdateState(pAccessible);
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::DEFUNC);
+ // 8. label should have no FOCUSABLE state state, Firefox has READONLY state, we can also have.
+ if( getRole() != AccessibleRole::LABEL
+ && getRole() != AccessibleRole::SCROLL_BAR) //IAccessibility2 Implementation 2009
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::FOCUSABLE);
+ }
+ else
+ {
+ pAgent->UpdateState(pAccessible);
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::DEFUNC);
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::FOCUSABLE);
+ }
+ break;
+ case AccessibleStateType::ACTIVE:
+ // Only frames should be active
+ // no msaa state mapping
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * fire the MSAA state changed event
+ *
+ * @param state the state id
+ * @param set true if state is set, false if state is unset
+ */
+void AccComponentEventListener::fireStatePropertyChange(short state, bool set)
+{
+ if( set)
+ {
+ // new value
+ switch(state)
+ {
+ case AccessibleStateType::CHECKED:
+ case AccessibleStateType::INDETERMINATE:
+ pAgent->IncreaseState( pAccessible, state);
+ pAgent->UpdateAction( pAccessible );
+
+ if(!pAgent->IsSpecialToolboItem(pAccessible))
+ {
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_CHECKED, pAccessible);
+ }
+ break;
+ case AccessibleStateType::PRESSED:
+ pAgent->IncreaseState( pAccessible, state);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_PRESSED, pAccessible);
+ break;
+ case AccessibleStateType::SELECTED:
+ pAgent->IncreaseState( pAccessible, state);
+ break;
+ case AccessibleStateType::ARMED:
+ pAgent->IncreaseState( pAccessible, state);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_ARMED, pAccessible);
+ break;
+ case AccessibleStateType::SHOWING:
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::DEFUNC);
+ // UNO !SHOWING == MSAA OFFSCREEN
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::SHOWING );
+ break;
+ case AccessibleStateType::VISIBLE:
+ // UNO !VISIBLE == MSAA INVISIBLE
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ break;
+ default:
+ break;
+ }
+ }
+ else
+ {
+ // old value
+ switch(state)
+ {
+ case AccessibleStateType::CHECKED:
+ case AccessibleStateType::INDETERMINATE:
+ pAgent->DecreaseState( pAccessible, state );
+ pAgent->UpdateAction( pAccessible );
+
+ if(!pAgent->IsSpecialToolboItem(pAccessible))
+ {
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_CHECKED, pAccessible);
+ }
+ break;
+ case AccessibleStateType::PRESSED:
+ pAgent->DecreaseState( pAccessible, state );
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_PRESSED, pAccessible);
+ break;
+ case AccessibleStateType::SELECTED:
+ pAgent->DecreaseState( pAccessible, state );
+ //if the state is unset, no need to send MSAA SELECTION event
+ //pAgent->NotifyAccEvent(UM_EVENT_STATE_SELECTED, pAccessible);
+ break;
+ case AccessibleStateType::ARMED:
+ {
+ pAgent->DecreaseState( pAccessible, state);
+ //if the state is unset, no need to send MSAA MENU event
+ //pAgent->NotifyAccEvent(UM_EVENT_STATE_ARMED, pAccessible);
+ }
+ break;
+ case AccessibleStateType::SHOWING:
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::DEFUNC);
+ // UNO !SHOWING == MSAA OFFSCREEN
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::SHOWING );
+ break;
+ case AccessibleStateType::VISIBLE:
+ // UNO !VISIBLE == MSAA INVISIBLE
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ break;
+
+ default:
+ break;
+ }
+ }
+}
+
+/**
+ * handle the focused event
+ *
+ * @param enable true if get focus, false if lose focus
+ */
+void AccComponentEventListener::fireStateFocusdChange(bool enable)
+{
+ if(enable)
+ {
+ if(getParentRole() != AccessibleRole::COMBO_BOX )
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, pAccessible);
+ }
+ else
+ {
+ //if lose focus, no need to send MSAA FOCUS event
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::FOCUSED);
+ }
+}
+
+void AccComponentEventListener::handleSelectionChangedEvent()
+{
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED, pAccessible);
+}
+
+//add TEXT_SELECTION_CHANGED event
+void AccComponentEventListener::handleTextSelectionChangedEvent()
+{
+ pAgent->NotifyAccEvent(UM_EVENT_TEXT_SELECTION_CHANGED, pAccessible);
+}
diff --git a/winaccessibility/source/service/AccContainerEventListener.cxx b/winaccessibility/source/service/AccContainerEventListener.cxx
new file mode 100644
index 000000000000..f0a96c475947
--- /dev/null
+++ b/winaccessibility/source/service/AccContainerEventListener.cxx
@@ -0,0 +1,573 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+
+#include "AccContainerEventListener.hxx"
+#include "AccObjectManagerAgent.hxx"
+#include "unomsaaevent.hxx"
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+
+AccContainerEventListener::AccContainerEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent)
+ :AccEventListener(pAcc, Agent)
+{
+}
+
+AccContainerEventListener::~AccContainerEventListener()
+{
+}
+
+/**
+ * Uno's event notifier when event is captured
+ *
+ * @param AccessibleEventObject the event object which contains information about event
+ */
+void AccContainerEventListener::notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
+throw (::com::sun::star::uno::RuntimeException)
+{
+ short role = getRole();
+ switch (aEvent.EventId)
+ {
+ case AccessibleEventId::CHILD:
+ handleChildChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::SELECTION_CHANGED:
+ handleSelectionChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::INVALIDATE_ALL_CHILDREN:
+ handleAllChildrenChangedEvent();
+ break;
+ case AccessibleEventId::TEXT_CHANGED:
+ handleTextChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ case AccessibleEventId::VISIBLE_DATA_CHANGED:
+ handleVisibleDataChangedEvent();
+ break;
+ case AccessibleEventId::BOUNDRECT_CHANGED:
+ handleBoundrectChangedEvent();
+ break;
+ case AccessibleEventId::STATE_CHANGED:
+ handleStateChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::VALUE_CHANGED:
+ handleValueChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::SELECTION_CHANGED_ADD:
+ handleSelectionChangedAddEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::SELECTION_CHANGED_REMOVE:
+ handleSelectionChangedRemoveEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::SELECTION_CHANGED_WITHIN:
+ handleSelectionChangedWithinEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::PAGE_CHANGED:
+ handlePageChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::SECTION_CHANGED:
+ handleSectionChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::COLUMN_CHANGED:
+ handleColumnChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ default:
+ AccEventListener::notifyEvent(aEvent);
+ break;
+ }
+}
+
+/**
+ * handle the VISIBLE_DATA_CHANGED event
+ */
+void AccContainerEventListener::handleVisibleDataChangedEvent()
+{
+ AccEventListener::handleVisibleDataChangedEvent();
+}
+
+/**
+ * handle the BOUNDRECT_CHANGED event
+ */
+void AccContainerEventListener::handleBoundrectChangedEvent()
+{
+ AccEventListener::handleBoundrectChangedEvent();
+}
+
+void AccContainerEventListener::handleStateChangedEvent(Any oldValue, Any newValue)
+{
+ short State;
+ if( newValue >>= State)
+ {
+ setComponentState( State,true);
+ }
+ else if (oldValue >>= State)
+ {
+ setComponentState( State,false);
+ }
+
+}
+
+/**
+ * handle the CHILD event
+ * @param oldValue the child to be deleted
+ * @param newValue the child to be added
+ */
+void AccContainerEventListener::handleChildChangedEvent(Any oldValue, Any newValue)
+{
+ Reference< XAccessible > xChild;
+ if( newValue >>= xChild)
+ {
+ //create a new child
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ //add this child
+
+ if(pAgent->InsertAccObj( pAcc,pAccessible))
+ {
+ //add all oldValue's existing children
+ pAgent->InsertChildrenAccObj(pAcc);
+ pAgent->NotifyAccEvent(UM_EVENT_CHILD_ADDED, pAcc);
+ }
+ }
+ else
+ {}
+ }
+ else if (oldValue >>= xChild)
+ {
+ //delete a existing child
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ pAgent->NotifyAccEvent(UM_EVENT_CHILD_REMOVED, pAcc);
+ //delete all oldValue's existing children
+ pAgent->DeleteChildrenAccObj( pAcc );
+ //delete this child
+ pAgent->DeleteAccObj( pAcc );
+
+ }
+ else
+ {}
+ }
+
+}
+
+/**
+ * handle the SELECTION_CHANGED event
+ * @param oldValue the old value of the source of event
+ * @param newValue the new value of the source of event
+ */
+void AccContainerEventListener::handleSelectionChangedEvent(const Any& /*oldValue*/, const Any& newValue)
+{
+ if(NotifyChildEvent(UM_EVENT_SELECTION_CHANGED,newValue))
+ {
+ return ;
+ }
+
+ //menu bar does not process selection change event,just same as word behavior
+ if(getRole()!=AccessibleRole::MENU_BAR)
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED, pAccessible);
+}
+
+/**
+ * handle the INVALIDATE_ALL_CHILDREN event
+ */
+void AccContainerEventListener::handleAllChildrenChangedEvent()
+{
+ //TODO: update all the children
+ if( pAccessible )
+ {
+ //delete all oldValue's existing children
+ pAgent->DeleteChildrenAccObj( pAccessible );
+ //add all oldValue's existing children
+ pAgent->InsertChildrenAccObj( pAccessible );
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_REORDER , pAccessible);
+ }
+}
+
+/**
+ * handle the TEXT_CHANGED event
+ */
+void AccContainerEventListener::handleTextChangedEvent(Any oldValue, Any newValue)
+{
+ pAgent->UpdateValue(pAccessible, newValue);
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_TEXTCHANGE, pAccessible);
+}
+
+/**
+ * set the new state and fire the MSAA event
+ * @param state new state id
+ * @param enable true if state is set, false if state is unset
+ */
+void AccContainerEventListener::setComponentState(short state, bool enable )
+{
+ // only the following state can be fired state event.
+
+ switch (state)
+ {
+ case AccessibleStateType::SELECTED:
+ case AccessibleStateType::BUSY:
+ case AccessibleStateType::INDETERMINATE:
+ case AccessibleStateType::OFFSCREEN:
+ case AccessibleStateType::FOCUSABLE:
+ case AccessibleStateType::SHOWING:
+ case AccessibleStateType::VISIBLE:
+ fireStatePropertyChange(state, enable);
+ break;
+ case AccessibleStateType::FOCUSED:
+ fireStateFocusdChange(enable);
+ break;
+ case AccessibleStateType::ENABLED:
+ if(enable)
+ {
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::DEFUNC);
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::FOCUSABLE);
+ pAgent->UpdateState(pAccessible);
+
+ UpdateAllChildrenState(pAccessible);
+ }
+ else
+ {
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::DEFUNC);
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::FOCUSABLE);
+ pAgent->UpdateState(pAccessible);
+
+ UpdateAllChildrenState(pAccessible);
+ }
+ break;
+ case AccessibleStateType::ACTIVE:
+ // Only frames should be active
+ // no msaa state mapping
+ //for PAGE_TAB_LIST, there will be ACTIVE state, then it should be converted to FOCUSED event.
+ if(getRole() == AccessibleRole::PAGE_TAB_LIST)
+ {
+ if (!enable) /* get the active state */
+ {
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::FOCUSED);
+ }
+
+ else /* lose the active state */
+ {
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::FOCUSED);
+ }
+ }
+ break;
+
+ case AccessibleStateType::EXPANDED:
+ case AccessibleStateType::COLLAPSE:
+ case AccessibleStateType::CHECKED:
+ {
+ pAgent->UpdateState(pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_BUSY, pAccessible);
+ break;
+ }
+
+ default:
+ break;
+ }
+}
+
+/**
+ * fire the MSAA state changed event
+ * @param state the state id
+ * @param set true if state is set, false if state is unset
+ */
+void AccContainerEventListener::fireStatePropertyChange(short state, bool set)
+{
+ if( set )
+ {
+ // new value
+ switch(state)
+ {
+ case AccessibleStateType::SELECTED:
+ pAgent->IncreaseState( pAccessible, state);
+ break;
+ case AccessibleStateType::INDETERMINATE:
+ case AccessibleStateType::BUSY:
+ case AccessibleStateType::FOCUSABLE:
+ case AccessibleStateType::OFFSCREEN:
+ pAgent->IncreaseState( pAccessible, state);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_BUSY, pAccessible);
+ break;
+ case AccessibleStateType::SHOWING:
+ // UNO !SHOWING == MSAA OFFSCREEN
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::SHOWING );
+ break;
+ case AccessibleStateType::VISIBLE:
+ // UNO !VISIBLE == MSAA INVISIBLE
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ break;
+ default:
+ break;
+ }
+ }
+ else
+ {
+ // old value
+ switch(state)
+ {
+ case AccessibleStateType::SELECTED:
+ pAgent->DecreaseState( pAccessible, state );
+ break;
+ case AccessibleStateType::BUSY:
+ case AccessibleStateType::INDETERMINATE:
+ case AccessibleStateType::FOCUSABLE:
+ case AccessibleStateType::OFFSCREEN:
+ pAgent->DecreaseState( pAccessible, state);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_BUSY, pAccessible);
+ break;
+ case AccessibleStateType::SHOWING:
+ // UNO !SHOWING == MSAA OFFSCREEN
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::SHOWING );
+ break;
+ case AccessibleStateType::VISIBLE:
+ // UNO !VISIBLE == MSAA INVISIBLE
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+/**
+ * handle the focused event
+ * @param enable true if get focus, false if lose focus
+ */
+void AccContainerEventListener::fireStateFocusdChange(bool enable)
+{
+ if(enable)
+ {
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::FOCUSED);
+ //if the acc role is MENU_BAR, MSAA UM_EVENT_MENU_START event should be sent
+ //if the acc role is POPUP_MENU, MSAA UM_EVENT_MENUPOPUPSTART event should be sent
+ short role = getRole();
+ if(role == AccessibleRole::MENU_BAR)
+ {
+ pAgent->NotifyAccEvent(UM_EVENT_MENU_START, pAccessible);
+ }
+ else if (role == AccessibleRole::POPUP_MENU)
+ pAgent->NotifyAccEvent(UM_EVENT_MENUPOPUPSTART, pAccessible);
+ //Disable the focused event on option_pane and Panel.
+ //only disable option_pane for toolbar has panel to get focus
+ else if (role == AccessibleRole::PANEL || role == AccessibleRole::OPTION_PANE )
+ {
+ //don't send focused event on PANEL & OPTION_PANE if the parent is not toolbar
+ short parentRole = getParentRole();
+ if (parentRole == AccessibleRole::TOOL_BAR
+ || parentRole == AccessibleRole::SCROLL_PANE // sidebar
+ || parentRole == AccessibleRole::PANEL) // sidebar
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, pAccessible);
+ }
+ //to update ComboBox's description
+ else if (role == AccessibleRole::COMBO_BOX )
+ {
+ pAgent->UpdateDescription(pAccessible);
+ //for editable combobox, send focus event on only edit control,
+ bool bSendFocusOnCombobox = true;
+ //send focused event to the first text child
+ Reference<XAccessibleContext> mxContext(pAccessible->getAccessibleContext(),UNO_QUERY);
+ if(mxContext.is())
+ {
+ Reference<XAccessible> mxChild = mxContext->getAccessibleChild(0);
+ if(mxChild.is())
+ {
+ Reference<XAccessibleContext> mxChildContext(mxChild->getAccessibleContext(),UNO_QUERY);
+ short childrole = mxChildContext->getAccessibleRole();
+ if (childrole == AccessibleRole::TEXT)
+ {
+ if (IsEditable(mxChildContext))
+ {
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::FOCUSED);
+ pAgent->IncreaseState( mxChild.get(), AccessibleStateType::FOCUSED);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, mxChild.get());
+ bSendFocusOnCombobox = false;
+ }
+ }
+ }
+ }
+ if (bSendFocusOnCombobox)
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, pAccessible);
+ }
+ else
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, pAccessible);
+ }
+ else
+ {
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::FOCUSED);
+ //if the acc role is MENU_BAR, MSAA UM_EVENT_MENU_END event should be sent
+ //if the acc role is POPUP_MENU, MSAA UM_EVENT_MENUPOPUPEND event should be sent
+ if(getRole() == AccessibleRole::MENU_BAR)
+ {
+ pAgent->NotifyAccEvent(UM_EVENT_MENU_END, pAccessible);
+ }
+ else if (getRole() == AccessibleRole::POPUP_MENU)
+ {
+ pAgent->NotifyAccEvent(UM_EVENT_MENUPOPUPEND, pAccessible);
+ }
+ }
+}
+
+/**
+ * handle the VALUE_CHANGED event
+ *
+ * @param oldValue the old value of the source of event
+ * @param newValue the new value of the source of event
+ */
+void AccContainerEventListener::handleValueChangedEvent(Any oldValue, Any newValue)
+{
+ pAgent->UpdateValue(pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_VALUECHANGE, pAccessible);
+}
+
+bool AccContainerEventListener::IsEditable(Reference<XAccessibleContext> xContext)
+{
+ bool ret = false;
+ Reference< XAccessibleStateSet > pRState = xContext->getAccessibleStateSet();
+ if( !pRState.is() )
+ return false;
+
+ Sequence<short> pStates = pRState->getStates();
+ int count = pStates.getLength();
+ for( int iIndex = 0;iIndex < count;iIndex++ )
+ {
+ if(pStates[iIndex] == AccessibleStateType::EDITABLE)
+ return true;
+ }
+ return ret;
+}
+
+bool AccContainerEventListener::NotifyChildEvent(short nWinEvent,const Any &Value)
+{
+ Reference< XAccessible > xChild;
+ if(Value >>= xChild )
+ {
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ pAgent->NotifyAccEvent(nWinEvent, pAcc);
+ return true;
+ }
+ }
+ return false;
+}
+
+void AccContainerEventListener::handleSelectionChangedAddEvent(const Any& /*oldValue*/, const Any& newValue)
+{
+ if(NotifyChildEvent(UM_EVENT_SELECTION_CHANGED_ADD,newValue))
+ {
+ return ;
+ }
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_ADD,pAccessible);
+}
+void AccContainerEventListener::handleSelectionChangedRemoveEvent(const Any& /*oldValue*/, const Any& newValue)
+{
+ if(NotifyChildEvent(UM_EVENT_SELECTION_CHANGED_REMOVE,newValue))
+ {
+ return ;
+ }
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_REMOVE,pAccessible);
+}
+void AccContainerEventListener::handleSelectionChangedWithinEvent(const Any& /*oldValue*/, const Any& newValue)
+{
+ if(NotifyChildEvent(UM_EVENT_SELECTION_CHANGED_WITHIN,newValue))
+ {
+ return ;
+ }
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_WITHIN,pAccessible);
+}
+
+void SAL_CALL AccContainerEventListener::UpdateAllChildrenState( com::sun::star::accessibility::XAccessible* pXAccessible )
+{
+ Reference<com::sun::star::accessibility::XAccessibleContext> xContext(pXAccessible->getAccessibleContext(),UNO_QUERY);
+ if(!xContext.is())
+ {
+ return;
+ }
+ com::sun::star::accessibility::XAccessibleContext* pAccessibleContext = xContext.get();
+ if(pAccessibleContext == NULL)
+ {
+ return;
+ }
+
+ if (pAgent && pAgent->IsStateManageDescendant(pXAccessible))
+ {
+ return;
+ }
+
+ int count = pAccessibleContext->getAccessibleChildCount();
+ for (int i=0;i<count;i++)
+ {
+ Reference<com::sun::star::accessibility::XAccessible> mxAccessible
+ = pAccessibleContext->getAccessibleChild(i);
+
+ com::sun::star::accessibility::XAccessible* mpAccessible = mxAccessible.get();
+ if(mpAccessible != NULL)
+ {
+ pAgent->UpdateState(mpAccessible);
+ UpdateAllChildrenState(mpAccessible);
+ }
+ }
+}
+
+
+void AccContainerEventListener::handlePageChangedEvent(const Any& /*oldValue*/, const Any& /*newValue*/)
+{
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_PAGECHANGED, pAccessible);
+}
+
+void AccContainerEventListener::handleSectionChangedEvent(const Any& /*oldValue*/, const Any& /*newValue*/ )
+{
+ pAgent->NotifyAccEvent(UM_EVENT_SECTION_CHANGED, pAccessible);
+}
+
+void AccContainerEventListener::handleColumnChangedEvent(const Any& /*oldValue*/, const Any& /*newValue*/)
+{
+ pAgent->NotifyAccEvent(UM_EVENT_COLUMN_CHANGED, pAccessible);
+}
+
+//IAccessibility2 Implementation 2009-----
+void AccContainerEventListener::handleNameChangedEvent( Any name )
+{
+ if (getRole() == AccessibleRole::COMBO_BOX)
+ {
+ Reference<XAccessibleContext> mxContext(pAccessible->getAccessibleContext(),UNO_QUERY);
+ if(mxContext.is())
+ {
+ Reference<XAccessible> mxChild = mxContext->getAccessibleChild(0);
+ if(mxChild.is())
+ {
+ Reference<XAccessibleContext> mxChildContext(mxChild->getAccessibleContext(),UNO_QUERY);
+ short childrole = mxChildContext->getAccessibleRole();
+ if (childrole == AccessibleRole::TEXT)
+ {
+ pAgent->UpdateAccName(mxChild.get(), name);
+ }
+ }
+ }
+ }
+ AccEventListener::handleNameChangedEvent(name);
+}
+//-----IAccessibility2 Implementation 2009
diff --git a/winaccessibility/source/service/AccDescendantManagerEventListener.cxx b/winaccessibility/source/service/AccDescendantManagerEventListener.cxx
new file mode 100644
index 000000000000..97bd1b221655
--- /dev/null
+++ b/winaccessibility/source/service/AccDescendantManagerEventListener.cxx
@@ -0,0 +1,226 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+
+#include "AccDescendantManagerEventListener.hxx"
+#include "AccObjectManagerAgent.hxx"
+#include "unomsaaevent.hxx"
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+
+AccDescendantManagerEventListener::AccDescendantManagerEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent)
+ :AccComponentEventListener(pAcc, Agent),
+ pActiveDescendant(NULL)
+{
+}
+
+AccDescendantManagerEventListener::~AccDescendantManagerEventListener()
+{
+}
+
+/**
+ * Uno's event notifier when event is captured
+ * @param AccessibleEventObject the event object which contains information about event
+ */
+void AccDescendantManagerEventListener::notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
+throw (::com::sun::star::uno::RuntimeException)
+{
+ switch (aEvent.EventId)
+ {
+ case AccessibleEventId::SELECTION_CHANGED:
+ handleSelectionChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::CHILD:
+ handleChildChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS:
+ handleChildChangedNoFocusEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::SELECTION_CHANGED_ADD:
+ handleSelectionChangedAddEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::SELECTION_CHANGED_REMOVE:
+ handleSelectionChangedRemoveEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::SELECTION_CHANGED_WITHIN:
+ handleSelectionChangedWithinEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ default:
+ AccComponentEventListener::notifyEvent(aEvent);
+ break;
+ }
+}
+
+/**
+ * handle the CHILD event
+ * @param oldValue the child to be deleted
+ * @param newValue the child to be added
+ */
+void AccDescendantManagerEventListener::handleChildChangedEvent(Any oldValue, Any newValue)
+{
+
+ Reference< XAccessible > xChild;
+ if( newValue >>= xChild)
+ {
+ //create a new child
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ pAgent->InsertAccObj( pAcc,pAccessible);
+ pAgent->InsertChildrenAccObj(pAcc);
+
+ pAgent->NotifyAccEvent(UM_EVENT_CHILD_ADDED, pAcc);
+
+ }
+ else
+ {}
+ }
+
+ if (oldValue >>= xChild)
+ {
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+
+ pAgent->NotifyAccEvent(UM_EVENT_CHILD_REMOVED, pAcc);
+ pAgent->DeleteChildrenAccObj( pAcc );
+ pAgent->DeleteAccObj( pAcc );
+ }
+ else
+ {}
+ }
+
+}
+
+/**
+ * handle the SELECTION_CHANGED event
+ */
+void AccDescendantManagerEventListener::handleSelectionChangedEvent(Any oldValue, Any newValue)
+{
+ bool bSend =false;
+ Reference< XAccessible > xChild;
+ if(newValue >>= xChild )
+ {
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ //if the Role is the SC cell ,don't add the selected state.
+ if (pAgent->GetRole(pAcc) != AccessibleRole::TABLE_CELL)
+ {
+ pAgent->IncreaseState( pAcc, AccessibleStateType::SELECTED);
+ }
+
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED, pAcc);
+ bSend=true;
+ }
+ }
+ if(oldValue >>= xChild )
+ {
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ pAgent->DecreaseState( pAcc, AccessibleStateType::SELECTED);
+ }
+ }
+ if (!bSend)
+ {
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED, pAccessible);
+ }
+}
+
+
+void AccDescendantManagerEventListener::handleChildChangedNoFocusEvent(Any oldValue, Any newValue)
+{
+ Reference< XAccessible > xChild;
+ if(newValue >>= xChild )
+ {
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+
+ pAgent->InsertAccObj(pAcc,pAccessible);
+ pAgent->InsertChildrenAccObj(pAcc);
+
+ pActiveDescendant= pAcc;
+ }
+ }
+ if (oldValue >>= xChild)
+ {
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ pAgent->DeleteChildrenAccObj( pAcc );
+ pAgent->DeleteAccObj( pAcc );
+ }
+ }
+}
+
+bool AccDescendantManagerEventListener::NotifyChildEvent(short nWinEvent,const Any &Value)
+{
+ Reference< XAccessible > xChild;
+ if(Value >>= xChild )
+ {
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ pAgent->NotifyAccEvent(nWinEvent, pAcc);
+
+ if (pAgent && pAgent->IsStateManageDescendant(pAccessible) && ( nWinEvent == UM_EVENT_SELECTION_CHANGED_REMOVE) )
+ {
+ pAgent->DeleteAccObj( pAcc );
+ }
+ return true;
+ }
+ }
+ return false;
+}
+void AccDescendantManagerEventListener::handleSelectionChangedAddEvent(const Any& /*oldValue*/, const Any &newValue)
+{
+ if(NotifyChildEvent(UM_EVENT_SELECTION_CHANGED_ADD,newValue))
+ {
+ return ;
+ }
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_ADD,pAccessible);
+}
+void AccDescendantManagerEventListener::handleSelectionChangedRemoveEvent(const Any& /*oldValue*/, const Any &newValue)
+{
+ if(NotifyChildEvent(UM_EVENT_SELECTION_CHANGED_REMOVE,newValue))
+ {
+ return ;
+ }
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_REMOVE,pAccessible);
+}
+
+void AccDescendantManagerEventListener::handleSelectionChangedWithinEvent(const Any& /*oldValue*/, const Any &newValue)
+{
+ if(NotifyChildEvent(UM_EVENT_SELECTION_CHANGED_WITHIN,newValue))
+ {
+ return ;
+ }
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_WITHIN,pAccessible);
+}
+
diff --git a/winaccessibility/source/service/AccDialogEventListener.cxx b/winaccessibility/source/service/AccDialogEventListener.cxx
new file mode 100644
index 000000000000..6f78bf7d69a2
--- /dev/null
+++ b/winaccessibility/source/service/AccDialogEventListener.cxx
@@ -0,0 +1,150 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+
+#include "AccDialogEventListener.hxx"
+#include "AccObjectManagerAgent.hxx"
+#include "unomsaaevent.hxx"
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+
+AccDialogEventListener::AccDialogEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent)
+ :AccEventListener(pAcc, Agent)
+{}
+AccDialogEventListener::~AccDialogEventListener()
+{
+}
+
+/**
+ * Uno's event notifier when event is captured
+ * @param AccessibleEventObject the event object which contains information about event
+ */
+void AccDialogEventListener::notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
+throw (::com::sun::star::uno::RuntimeException)
+{
+ switch (aEvent.EventId)
+ {
+ case AccessibleEventId::CHILD:
+ handleChildChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::VISIBLE_DATA_CHANGED:
+ handleVisibleDataChangedEvent();
+ break;
+ case AccessibleEventId::BOUNDRECT_CHANGED:
+ handleBoundrectChangedEvent();
+ break;
+ default:
+ AccEventListener::notifyEvent(aEvent);
+ break;
+ }
+}
+
+/**
+ * handle the VISIBLE_DATA_CHANGED event
+ */
+void AccDialogEventListener::handleVisibleDataChangedEvent()
+{
+ AccEventListener::handleVisibleDataChangedEvent();
+}
+
+/**
+ * handle the BOUNDRECT_CHANGED event
+ */
+void AccDialogEventListener::handleBoundrectChangedEvent()
+{
+ AccEventListener::handleBoundrectChangedEvent();
+}
+
+/**
+ * handle the CHILD event
+ * @param oldValue the child to be deleted
+ * @param newValue the child to be added
+ */
+void AccDialogEventListener::handleChildChangedEvent(Any oldValue, Any newValue)
+{
+ Reference< XAccessible > xChild;
+ if( newValue >>= xChild)
+ {
+ //create a new child
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ //add this child
+ pAgent->InsertAccObj( pAcc,pAccessible);
+ //add all oldValue's existing children
+ pAgent->InsertChildrenAccObj(pAcc);
+ pAgent->NotifyAccEvent(UM_EVENT_CHILD_ADDED, pAcc);
+ }
+ else
+ {}
+ }
+ else if (oldValue >>= xChild)
+ {
+ //delete a existing child
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ pAgent->NotifyAccEvent(UM_EVENT_CHILD_REMOVED, pAcc);
+ //delete all oldValue's existing children
+ pAgent->DeleteChildrenAccObj( pAcc );
+ //delete this child
+ pAgent->DeleteAccObj( pAcc );
+ }
+ else
+ {}
+ }
+
+}
+
+/**
+ * set the new state and fire the MSAA event
+ * @param state new state id
+ * @param enable true if state is set, false if state is unset
+ */
+void AccDialogEventListener::setComponentState(short state, bool enable )
+{
+ // only the following state can be fired state event.
+ switch (state)
+ {
+ case AccessibleStateType::ICONIFIED:
+ // no msaa state mapping
+ break;
+ case AccessibleStateType::VISIBLE:
+ // UNO !VISIBLE == MSAA INVISIBLE
+ if( enable )
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ else
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ break;
+ case AccessibleStateType::ACTIVE:
+ // Only frames should be active
+ // no msaa state mapping
+ break;
+ default:
+ break;
+ }
+}
diff --git a/winaccessibility/source/service/AccEventListener.cxx b/winaccessibility/source/service/AccEventListener.cxx
new file mode 100644
index 000000000000..1925b8746cd0
--- /dev/null
+++ b/winaccessibility/source/service/AccEventListener.cxx
@@ -0,0 +1,309 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <cppuhelper/bootstrap.hxx>
+#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <toolkit/awt/Vclxwindow.hxx>
+
+#ifndef _SV_SYSDATA_HXX
+#if defined( WIN ) || defined( WNT ) || defined( OS2 )
+typedef sal_Int32 HWND;
+#endif
+#endif
+#include "AccEventListener.hxx"
+#include "AccObjectManagerAgent.hxx"
+#include "unomsaaevent.hxx"
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+
+#include <stdio.h>
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+using namespace rtl;
+using namespace cppu;
+
+AccEventListener::AccEventListener(com::sun::star::accessibility::XAccessible* pAcc,
+ AccObjectManagerAgent* Agent)
+ :pAccessible(pAcc),
+ pAgent(Agent),
+ m_isDisposed(false),
+ m_refcount(0)
+{}
+
+AccEventListener::~AccEventListener()
+{
+}
+
+/**
+ * Uno's event notifier when event is captured
+ * @param AccessibleEventObject the event object which contains information about event
+ */
+void AccEventListener::notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
+throw (::com::sun::star::uno::RuntimeException)
+{
+
+ switch (aEvent.EventId)
+ {
+ case AccessibleEventId::NAME_CHANGED:
+ handleNameChangedEvent(aEvent.NewValue);
+ break;
+ case AccessibleEventId::DESCRIPTION_CHANGED:
+ handleDescriptionChangedEvent(aEvent.NewValue);
+ break;
+ case AccessibleEventId::STATE_CHANGED:
+ handleStateChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * handle the NAME_CHANGED event
+ * @param name the new name with changed.
+ */
+void AccEventListener::handleNameChangedEvent(Any name)
+{
+ if ( pAgent->IsTopWinAcc( pAccessible ) )
+ {
+ XAccessible* pAccDoc = pAgent->GetAccDocByAccTopWin( pAccessible );
+ if ( pAccDoc )
+ {
+ pAgent->UpdateAccName(pAccDoc);
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_NAMECHANGE, pAccDoc);
+ }
+ }
+
+ pAgent->UpdateAccName(pAccessible, name);
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_NAMECHANGE, pAccessible);
+}
+
+/**
+ * handle the DESCRIPTION_CHANGED event
+ * @param desc the new description
+ */
+void AccEventListener::handleDescriptionChangedEvent(Any desc)
+{
+ pAgent->UpdateDescription(pAccessible, desc);
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_DESCRIPTIONCHANGE, pAccessible);
+}
+
+/**
+ * handle the BOUNDRECT_CHANGED event
+ */
+void AccEventListener::handleBoundrectChangedEvent()
+{
+ pAgent->UpdateLocation(pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_BOUNDRECT_CHANGED, pAccessible);
+}
+
+/**
+ * handle the VISIBLE_DATA_CHANGED event
+ */
+void AccEventListener::handleVisibleDataChangedEvent()
+{
+ pAgent->UpdateValue(pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_VISIBLE_DATA_CHANGED, pAccessible);
+}
+
+/**
+ * handle the STATE_CHANGED event
+ * @param oldValue the old state of the source of event
+ * @param newValue the new state of the source of event
+ */
+void AccEventListener::handleStateChangedEvent(Any oldValue, Any newValue)
+{
+ short newV, oldV;
+ if( newValue >>= newV)
+ {
+ setComponentState(newV, true);
+ }
+ else if (oldValue >>= oldV)
+ {
+ setComponentState(oldV, false);
+ }
+}
+
+/**
+ * set the new state and fire the MSAA event
+ * @param state new state id
+ * @param enable true if state is set, false if state is unset
+ */
+void AccEventListener::setComponentState(short state, bool enable )
+{
+ switch (state)
+ {
+ case AccessibleStateType::FOCUSED:
+ fireStateFocusdChange(enable);
+ break;
+ default:
+ fireStatePropertyChange(state, enable);
+ break;
+ }
+}
+
+/**
+ * handle the focused event
+ * @param enable true if get focus, false if lose focus
+ */
+void AccEventListener::fireStateFocusdChange(bool enable)
+{
+ if(enable)
+ {
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::FOCUSED);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, pAccessible);
+ }
+ else
+ {
+ // no focus lost event in MSAA
+ }
+}
+
+
+/**
+ * fire the MSAA state changed event
+ * @param state the state id
+ * @param set true if state is set, false if state is unset
+ */
+void AccEventListener::fireStatePropertyChange(short state, bool set )
+{
+ if( set )
+ {
+ //get new state
+ }
+ else
+ {
+ //lose old state
+ }
+}
+
+/**
+ * get the role of accessible object which is observed
+ */
+short AccEventListener::getRole()
+{
+ Reference<com::sun::star::accessibility::XAccessibleContext> xContext(pAccessible->getAccessibleContext(),UNO_QUERY);
+ if(xContext.is())
+ {
+ return xContext->getAccessibleRole();
+ }
+ return -1;
+}
+
+/**
+ * get the role of accessible parent object which is observed
+ */
+short AccEventListener::getParentRole()
+{
+ if(pAccessible)
+ {
+ return pAgent->GetParentRole(pAccessible);
+ }
+ return -1;
+}
+/**
+ * remove the listener from accessible object
+ */
+void AccEventListener::removeMeFromBroadcaster()
+{
+ try
+ {
+ vos::OGuard aGuard(aRemoveMutex);
+ if(m_isDisposed)
+ return;
+ //get accessible context
+ Reference< XAccessibleContext > pRContext;
+ XAccessibleContext* pContext =NULL;
+
+ if( pAccessible == NULL)
+ {
+ return;
+ }
+ pRContext = pAccessible->getAccessibleContext();
+ if( !pRContext.is() )
+ {
+ return;
+ }
+
+ //get broadcaster from accessible component
+ Reference<XAccessibleComponent> xComponent(pRContext,UNO_QUERY);
+ if(!xComponent.is())
+ {
+ return;
+ }
+ Reference<XAccessibleEventBroadcaster> broadcaster(xComponent,UNO_QUERY);
+ XAccessibleEventBroadcaster* pBroadcaster = broadcaster.get();
+ if (pBroadcaster != NULL)
+ {
+ //remove the lister from accessible object
+ pBroadcaster->removeEventListener(this);
+ m_isDisposed = true;
+ pAgent->NotifyDestroy(pAccessible);
+ }
+ }
+ catch(...)
+ {
+ return;
+ }
+
+}
+
+/**
+ * this method is invoked before listener is disposed
+ */
+void AccEventListener::disposing( const ::com::sun::star::lang::EventObject& Source )
+throw (::com::sun::star::uno::RuntimeException)
+{
+ removeMeFromBroadcaster();
+}
+
+//need to investigate further
+::com::sun::star::uno::Any SAL_CALL AccEventListener::queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException)
+{
+ if(aType.equals(::getCppuType( (Reference< com::sun::star::accessibility::XAccessibleEventListener> const *)0 ) ))
+ {
+ Reference< com::sun::star::accessibility::XAccessibleEventListener> xEventListener( static_cast< com::sun::star::accessibility::XAccessibleEventListener* >(this));
+ return makeAny(xEventListener);
+ }
+
+ return Any();
+}
+
+void AccEventListener::acquire( ) throw ()
+{
+ ::osl_incrementInterlockedCount( &m_refcount );
+}
+
+void AccEventListener::release() throw ()
+{
+ // thread-safe decrementation of reference count
+ if (0 == ::osl_decrementInterlockedCount( &m_refcount ))
+ {
+ delete this; // shutdown this object
+ }
+}
diff --git a/winaccessibility/source/service/AccFrameEventListener.cxx b/winaccessibility/source/service/AccFrameEventListener.cxx
new file mode 100644
index 000000000000..bec7cac44005
--- /dev/null
+++ b/winaccessibility/source/service/AccFrameEventListener.cxx
@@ -0,0 +1,173 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+
+#include "AccFrameEventListener.hxx"
+#include "AccObjectManagerAgent.hxx"
+#include "unomsaaevent.hxx"
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+
+#include <vcl/window.hxx>
+#include <toolkit/awt/Vclxwindow.hxx>
+
+#ifndef _SV_SYSDATA_HXX
+#if defined( WIN ) || defined( WNT ) || defined( OS2 )
+typedef sal_Int32 HWND;
+typedef sal_Int32 HMENU;
+typedef sal_Int32 HDC;
+typedef void *PVOID;
+typedef PVOID HANDLE;
+typedef HANDLE HFONT;
+#endif
+#include <vcl/sysdata.hxx>
+#endif
+
+
+AccFrameEventListener::AccFrameEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent)
+ :AccEventListener(pAcc, Agent)
+{
+}
+
+AccFrameEventListener::~AccFrameEventListener()
+{
+}
+
+/**
+ * Uno's event notifier when event is captured
+ * @param AccessibleEventObject the event object which contains information about event
+ */
+void AccFrameEventListener::notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
+throw (::com::sun::star::uno::RuntimeException)
+{
+ switch (aEvent.EventId)
+ {
+ case AccessibleEventId::CHILD:
+ handleChildChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::VISIBLE_DATA_CHANGED:
+ handleVisibleDataChangedEvent();
+ break;
+ case AccessibleEventId::BOUNDRECT_CHANGED:
+ handleBoundrectChangedEvent();
+ break;
+ default:
+ AccEventListener::notifyEvent(aEvent);
+ break;
+ }
+}
+
+/**
+ * handle the VISIBLE_DATA_CHANGED event
+ */
+void AccFrameEventListener::handleVisibleDataChangedEvent()
+{
+ AccEventListener::handleVisibleDataChangedEvent();
+}
+
+/**
+ * handle the BOUNDRECT_CHANGED event
+ */
+void AccFrameEventListener::handleBoundrectChangedEvent()
+{
+ AccEventListener::handleBoundrectChangedEvent();
+}
+
+/**
+ * handle the CHILD event
+ * @param oldValue the child to be deleted
+ * @param newValue the child to be added
+ */
+void AccFrameEventListener::handleChildChangedEvent(Any oldValue, Any newValue)
+{
+ Reference< XAccessible > xChild;
+ if( newValue >>= xChild)
+ {
+ //create a new child
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+
+ VCLXWindow* pvclwindow = (VCLXWindow*)pAccessible;
+ Window* window = pvclwindow->GetWindow();
+ const SystemEnvData* systemdata=window->GetSystemData();
+
+ //add this child
+ pAgent->InsertAccObj( pAcc,pAccessible,(HWND)systemdata->hWnd);
+ //add all oldValue's existing children
+ pAgent->InsertChildrenAccObj(pAcc);
+ pAgent->NotifyAccEvent(UM_EVENT_CHILD_ADDED, pAcc);
+ }
+ else
+ {}
+ }
+ else if (oldValue >>= xChild)
+ {
+ //delete a existing child
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ pAgent->NotifyAccEvent(UM_EVENT_CHILD_REMOVED, pAcc);
+ //delete all oldValue's existing children
+ pAgent->DeleteChildrenAccObj( pAcc );
+ //delete this child
+ pAgent->DeleteAccObj( pAcc );
+ }
+ else
+ {}
+ }
+
+}
+
+/**
+ * set the new state and fire the MSAA event
+ * @param state new state id
+ * @param enable true if state is set, false if state is unset
+ */
+void AccFrameEventListener::setComponentState(short state, bool enable )
+{
+ // only the following state can be fired state event.
+ switch (state)
+ {
+ case AccessibleStateType::ICONIFIED:
+ // no msaa state
+ break;
+ case AccessibleStateType::VISIBLE:
+ // UNO !VISIBLE == MSAA INVISIBLE
+ if( enable )
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ else
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ break;
+ case AccessibleStateType::ACTIVE:
+ // Only frames should be active
+ // no msaa state mapping
+ break;
+ default:
+ break;
+ }
+}
diff --git a/winaccessibility/source/service/AccListEventListener.cxx b/winaccessibility/source/service/AccListEventListener.cxx
new file mode 100644
index 000000000000..4b79a76155fc
--- /dev/null
+++ b/winaccessibility/source/service/AccListEventListener.cxx
@@ -0,0 +1,123 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+
+#include "AccListEventListener.hxx"
+#include "AccObjectManagerAgent.hxx"
+#include "unomsaaevent.hxx"
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+
+AccListEventListener::AccListEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent)
+ :AccDescendantManagerEventListener(pAcc, Agent),
+ shouldDeleteChild(true)
+{
+}
+
+AccListEventListener::~AccListEventListener()
+{
+}
+
+/**
+ * Uno's event notifier when event is captured
+ * @param AccessibleEventObject the event object which contains information about event
+ */
+void AccListEventListener::notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException)
+{
+ switch (aEvent.EventId)
+ {
+ case AccessibleEventId::ACTIVE_DESCENDANT_CHANGED:
+ handleActiveDescendantChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::INVALIDATE_ALL_CHILDREN:
+ // Since List items a transient a child events are mostly used
+ // to attach/detach listeners, it is save to ignore it here
+ //TODO: investigate again
+ break;
+ case AccessibleEventId::VALUE_CHANGED:
+ handleValueChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ default:
+ AccDescendantManagerEventListener::notifyEvent(aEvent);
+ break;
+ }
+}
+
+/**
+ * handle the ACTIVE_DESCENDANT_CHANGED event
+ * @param oldValue the child to lose active
+ * @param newValue the child to get active
+ */
+void AccListEventListener::handleActiveDescendantChangedEvent(Any oldValue, Any newValue)
+{
+ Reference< XAccessible > xChild;
+
+ if(newValue >>= xChild )
+ {
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+
+ // Valueset has cache the child item xacc,Update state if no insert obj
+ sal_Bool bHasCache = pAgent->InsertAccObj(pAcc,pAccessible);
+ if (!bHasCache)
+ {
+ pAgent->UpdateState(pAcc);
+ }
+
+ pAgent->IncreaseState( pAcc, AccessibleStateType::FOCUSED);
+
+ pAgent->NotifyAccEvent(UM_EVENT_ACTIVE_DESCENDANT_CHANGED, pAcc);
+ pActiveDescendant= pAcc;
+ }
+ }
+ if (oldValue >>= xChild)
+ {
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ pAgent->DeleteAccObj( pAcc );
+ }
+ }
+}
+
+/**
+ * handle the VALUE_CHANGED event
+ *
+ * @param oldValue the old value of the source of event
+ * @param newValue the new value of the source of event
+ */
+void AccListEventListener::handleValueChangedEvent(Any oldValue, Any newValue)
+{
+ //to enable value changed event
+ if(getParentRole() == AccessibleRole::COMBO_BOX)
+ {
+ XAccessible* pParentAcc = pAgent->GetParentXAccessible(pAccessible);
+ pAgent->UpdateValue(pParentAcc);
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_VALUECHANGE, pParentAcc);
+ }
+}
diff --git a/winaccessibility/source/service/AccMenuEventListener.cxx b/winaccessibility/source/service/AccMenuEventListener.cxx
new file mode 100644
index 000000000000..342d5335de85
--- /dev/null
+++ b/winaccessibility/source/service/AccMenuEventListener.cxx
@@ -0,0 +1,151 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+
+#include "AccMenuEventListener.hxx"
+#include "AccObjectManagerAgent.hxx"
+#include "unomsaaevent.hxx"
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+
+AccMenuEventListener::AccMenuEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent)
+ :AccComponentEventListener(pAcc, Agent)
+{}
+AccMenuEventListener::~AccMenuEventListener()
+{
+}
+
+/**
+ * Uno's event notifier when event is captured
+ * @param AccessibleEventObject the event object which contains information about event
+ */
+void AccMenuEventListener::notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
+throw (::com::sun::star::uno::RuntimeException)
+{
+ switch (aEvent.EventId)
+ {
+ case AccessibleEventId::CHILD:
+ handleChildChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::SELECTION_CHANGED:
+ //don't need to process anything,just same as word behavior
+ //handleSelectionChangedEvent();
+ break;
+ default:
+ AccComponentEventListener::notifyEvent(aEvent);
+ break;
+ }
+}
+
+/**
+ * handle the CHILD event
+ * @param oldValue the child to be deleted
+ * @param newValue the child to be added
+ */
+void AccMenuEventListener::handleChildChangedEvent(Any oldValue, Any newValue)
+{
+
+ Reference< XAccessible > xChild;
+ if( newValue >>= xChild)
+ {
+ //create a new child
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ //add this child
+ pAgent->InsertAccObj( pAcc,pAccessible);
+ //add all oldValue's existing children
+ pAgent->InsertChildrenAccObj(pAcc);
+ pAgent->NotifyAccEvent(UM_EVENT_CHILD_ADDED, pAcc);
+ }
+ else
+ {}
+ }
+ else if (oldValue >>= xChild)
+ {
+ //delete an existing child
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ pAgent->NotifyAccEvent(UM_EVENT_CHILD_REMOVED, pAcc);
+ //delete all oldValue's existing children
+ pAgent->DeleteChildrenAccObj( pAcc );
+ //delete this child
+ pAgent->DeleteAccObj( pAcc );
+ }
+ else
+ {}
+ }
+
+}
+
+/**
+ * handle the SELECTION_CHANGED event
+ */
+void AccMenuEventListener::handleSelectionChangedEvent()
+{
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED, pAccessible);
+}
+
+/**
+ * handle the Menu_popup event
+ */
+void AccMenuEventListener::fireStatePropertyChange(short state, bool set)
+{
+ if( set )
+ {
+ // new value
+ switch(state)
+ {
+ //for sub menu is popup, there is a menu selected event.
+ case AccessibleStateType::SELECTED:
+ pAgent->IncreaseState( pAccessible, state);
+
+ pAgent->UpdateChildState(pAccessible);
+ break;
+ default:
+ AccComponentEventListener::fireStatePropertyChange(state, set
+ );
+ break;
+ }
+ }
+ else
+ {
+ switch(state)
+ {
+ //for sub menu is popup, there is a menu selected event.
+ case AccessibleStateType::SELECTED:
+ pAgent->DecreaseState( pAccessible, state );
+
+ break;
+ default:
+ AccComponentEventListener::fireStatePropertyChange(state, set
+ );
+ break;
+ }
+ }
+}
diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx
new file mode 100644
index 000000000000..c73ce4a7f0d2
--- /dev/null
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -0,0 +1,1109 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleValue.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+
+#include <stdlib.h>
+#include <memory.h>
+#include <stdio.h>
+#include <memory.h>
+#include <algorithm>
+#include <assert.h>
+
+#include "AccObject.hxx"
+#include "AccEventListener.hxx"
+#include "UAccCOM_i.c"
+#include "AccResource.hxx"
+
+#include "act.hxx"
+
+using namespace std;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::accessibility::AccessibleRole;
+using namespace com::sun::star::accessibility::AccessibleStateType;
+
+
+/**
+ * Constructor.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @param Agent The agent kept in all listeners,it's the sole interface by which
+ * listener communicate with windows manager.
+ * @param listener listener that registers in UNO system.
+ * @return.
+ */
+AccObject::AccObject(XAccessible* pAcc,AccObjectManagerAgent* pAgent ,AccEventListener* listener) :
+ m_pIMAcc (NULL),
+ m_resID (NULL),
+ m_pParantID (NULL),
+ m_pParentObj(NULL),
+ m_accListener (listener),
+ m_bShouldDestroy(sal_False),
+ m_xAccRef( pAcc )
+{
+ sal_Bool bRet = ImplInitilizeCreateObj();
+
+ m_xAccContextRef = m_xAccRef->getAccessibleContext();
+ m_xAccActionRef = Reference< XAccessibleAction > (m_xAccContextRef,UNO_QUERY);
+ m_accRole = m_xAccContextRef -> getAccessibleRole();
+ if( m_pIMAcc )
+ {
+ m_pIMAcc->SetXAccessible((long) m_xAccRef.get());
+ m_pIMAcc->Put_XAccAgent((long)pAgent);
+ m_pIMAcc->SetDefaultAction((long)m_xAccActionRef.get());
+ }
+}
+/**
+ * Destructor.
+ * @param
+ * @return
+ */
+AccObject::~AccObject()
+{
+ m_pIMAcc = NULL;
+ m_xAccRef = NULL;
+ m_xAccActionRef = NULL;
+ m_xAccContextRef = NULL;
+}
+
+
+
+/**
+ * Insert a child element.
+ * @param pChild Child element that should be inserted into child list.
+ * @param pos Insert postion.
+ * @return
+ */
+void AccObject::InsertChild( AccObject* pChild,short pos )
+{
+
+ std::vector<AccObject*>::iterator iter;
+ iter = std::find(m_childrenList.begin(),m_childrenList.end(),pChild);
+ if(iter!=m_childrenList.end())
+ return;
+ if(LAST_CHILD==pos)
+ {
+ m_childrenList.push_back(pChild);
+ }
+ else
+ {
+ std::vector<AccObject*>::iterator iter=m_childrenList.begin()+pos;
+ m_childrenList.insert(iter,pChild);
+ }
+
+ pChild->SetParentObj(this);
+}
+
+/**
+ * Delete a child element
+ * @param pChild Child element that should be inserted into child list.
+ * @param pos Insert postion.
+ * @return
+ */
+void AccObject::DeleteChild( AccObject* pChild )
+{
+ std::vector<AccObject*>::iterator iter;
+ iter = std::find(m_childrenList.begin(),m_childrenList.end(),pChild);
+ if(iter!=m_childrenList.end())
+ {
+ m_childrenList.erase(iter);
+ if(m_pIMAcc)
+ pChild->SetParentObj(NULL);
+ }
+}
+
+/**
+ * In order to windows API WindowFromAccessibleObject,we sometimes to set a pure
+ * top window accessible object created by windows system as top ancestor.
+ * @param.
+ * @return
+ */
+void AccObject::UpdateValidWindow()
+{
+ if(m_pIMAcc)
+ m_pIMAcc->Put_XAccWindowHandle(m_pParantID);
+}
+
+/**
+ * Translate all UNO basic information into MSAA com information.
+ * @param
+ * @return If the method is correctly processed.
+ */
+sal_Bool AccObject::ImplInitilizeCreateObj()
+{
+ ActivateActContext();
+ HRESULT hr = CoCreateInstance( CLSID_MAccessible, NULL, CLSCTX_ALL ,
+ IID_IMAccessible,
+ (void **)&m_pIMAcc);
+ DeactivateActContext();
+
+ if ( S_OK != hr )
+ {
+ return sal_False;
+ }
+
+ return sal_True;
+}
+
+/**
+ * Update name property to com object.
+ * @param
+ * @return
+ */
+void AccObject::UpdateName( )
+{
+ if (!m_pIMAcc)
+ {
+ return;
+ }
+
+ if( ( TEXT_FRAME == m_accRole ) && ( m_pParentObj !=NULL )&& ( SCROLL_PANE == m_pParentObj -> m_accRole ) )
+ m_pIMAcc->Put_XAccName( m_pParentObj->m_xAccContextRef->getAccessibleName().getStr() );
+ //IAccessibility2 Implementation 2009-----
+ if ( PARAGRAPH == m_accRole)
+ {
+ ::rtl::OUString emptyStr = ::rtl::OUString::createFromAscii("");
+ m_pIMAcc->Put_XAccName(emptyStr.getStr());
+ }
+ //-----IAccessibility2 Implementation 2009
+ else
+ m_pIMAcc->Put_XAccName(m_xAccContextRef->getAccessibleName().getStr());
+
+ return ;
+}
+/**
+ * Update description property to com object.
+ * no content for update description
+ * @param
+ * @return
+ */
+void AccObject::UpdateDescription()
+{
+ if (!m_pIMAcc)
+ {
+ return;
+ }
+
+ m_pIMAcc->Put_XAccDescription(m_xAccContextRef->getAccessibleDescription().getStr());
+ return ;
+}
+
+/**
+ * Update default action property to com object.
+ * @param
+ * @return
+ */
+void AccObject::UpdateAction()
+{
+ m_xAccActionRef = Reference< XAccessibleAction > (m_xAccContextRef,UNO_QUERY);
+
+ if( m_xAccActionRef.is() && m_pIMAcc )
+ {
+ if( m_xAccActionRef->getAccessibleActionCount() > 0 )
+ {
+ UpdateDefaultAction( );
+ m_pIMAcc->SetDefaultAction((long)m_xAccActionRef.get());
+ }
+ }
+}
+
+/**
+ * Update value property to com object.
+ * @param
+ * @return
+ */
+void AccObject::UpdateValue()
+{
+ if( NULL == m_pIMAcc || !m_xAccContextRef.is() )
+ {
+ assert(false);
+ return ;
+ }
+
+ Reference< XAccessibleValue > pRValue(m_xAccContextRef.get(),UNO_QUERY);
+ Any pAny;
+ if( pRValue.is() )
+ {
+ pAny = pRValue->getCurrentValue();
+ }
+
+ SetValue( pAny );
+}
+
+/**
+ * Set special default action description string via UNO role.
+ * @param Role UNO role
+ * @return
+ */
+void AccObject::UpdateDefaultAction( )
+{
+ if(!m_xAccActionRef.is())
+ return ;
+
+ switch(m_accRole)
+ {
+ case PUSH_BUTTON:
+ case TOGGLE_BUTTON:
+ case RADIO_BUTTON:
+ case MENU_ITEM:
+ case RADIO_MENU_ITEM:
+ case CHECK_MENU_ITEM:
+ case LIST_ITEM:
+ case CHECK_BOX:
+ case TREE_ITEM:
+ case BUTTON_DROPDOWN:
+ m_pIMAcc->Put_ActionDescription( m_xAccActionRef->getAccessibleActionDescription((sal_Int32)0).getStr() );
+ return;
+ }
+}
+
+/**
+ * Set value property via pAny.
+ * @param pAny New value.
+ * @return
+ */
+void AccObject::SetValue( Any pAny )
+{
+ unsigned short pUNumberString[100];
+ memset( pUNumberString, 0 , sizeof( pUNumberString) );
+
+ if( NULL == m_pIMAcc || !m_xAccContextRef.is() )
+ {
+ assert(false);
+ return ;
+ }
+ Reference< XAccessibleText > pRText(m_xAccContextRef,UNO_QUERY);
+ ::rtl::OUString val;
+ int index = 0 ;
+ switch(m_accRole)
+ {
+ case SPIN_BOX:
+ // 3. date editor's msaa value should be the same as spinbox
+ case DATE_EDITOR:
+ case TEXT:
+ case PARAGRAPH:
+ case HEADING:
+
+ if(pRText.get())
+ {
+ val = pRText->getText();
+ }
+ m_pIMAcc->Put_XAccValue( val.getStr() );
+ break;
+ case TREE_ITEM:
+ //IAccessibility2 Implementation 2009-----
+ //case CHECK_BOX: //Commented by Li Xing to disable the value for general checkbox
+ case COMBO_BOX:
+ case TABLE_CELL:
+ case NOTE:
+ case SCROLL_BAR:
+ m_pIMAcc->Put_XAccValue( GetMAccessibleValueFromAny(pAny).getStr() );
+ break ;
+ // Added by Li Xing, only the checkbox in tree should have the value.
+ case CHECK_BOX:
+ if( ( m_pParentObj !=NULL ) && (TREE == m_pParentObj->m_accRole || TREE_ITEM == m_pParentObj->m_accRole ))
+ m_pIMAcc->Put_XAccValue( GetMAccessibleValueFromAny(pAny).getStr() );
+ //-----IAccessibility2 Implementation 2009
+ break;
+ default:
+ break;
+ }
+
+ return;
+
+
+}
+::rtl::OUString AccObject::GetMAccessibleValueFromAny(Any pAny)
+{
+ ::rtl::OUString strValue;
+
+ if(NULL == m_pIMAcc)
+ return strValue;
+
+ if(pAny.getValueType() == getCppuType( (sal_uInt16 *)0 ) )
+ {
+ sal_uInt16 val;
+ if (pAny >>= val)
+ {
+ strValue=::rtl::OUString::valueOf((sal_Int32)val);
+
+ }
+ }
+ else if(pAny.getValueType() == getCppuType( (::rtl::OUString *)0 ) )
+ {
+
+ pAny >>= strValue ;
+
+ }
+ else if(pAny.getValueType() == getCppuType( (Sequence< ::rtl::OUString > *)0 ) )
+ {
+ Sequence< ::rtl::OUString > val;
+ if (pAny >>= val)
+ {
+
+ int count = val.getLength();
+
+ for( int iIndex = 0;iIndex < count;iIndex++ )
+ {
+ strValue += val[iIndex];
+ }
+
+ }
+ }
+ else if(pAny.getValueType() == getCppuType( (double *)0 ) )
+ {
+ double val;
+ if (pAny >>= val)
+ {
+ strValue=::rtl::OUString::valueOf(val);
+ }
+ }
+ else if(pAny.getValueType() == getCppuType( (sal_Int32 *)0 ) )
+ {
+ sal_Int32 val;
+ if (pAny >>= val)
+ {
+ strValue=::rtl::OUString::valueOf(val);
+ }
+ }
+ else if (pAny.getValueType() == getCppuType( (com::sun::star::accessibility::TextSegment *)0 ) )
+ {
+ com::sun::star::accessibility::TextSegment val;
+ if (pAny >>= val)
+ {
+ ::rtl::OUString realVal(val.SegmentText);
+ strValue = realVal;
+
+ }
+ }
+
+ return strValue;
+}
+/**
+ * Set name property via pAny.
+ * @param pAny New accessible name.
+ * @return
+ */
+void AccObject::SetName( Any pAny)
+{
+ if( NULL == m_pIMAcc )
+ return ;
+
+ m_pIMAcc->Put_XAccName( GetMAccessibleValueFromAny(pAny).getStr() );
+
+}
+
+/**
+ * Set description property via pAny.
+ * @param pAny New accessible description.
+ * @return
+ */
+void AccObject::SetDescription( Any pAny )
+{
+ if( NULL == m_pIMAcc )
+ return ;
+ m_pIMAcc->Put_XAccDescription( GetMAccessibleValueFromAny(pAny).getStr() );
+}
+
+/**
+ * Set role property via pAny
+ * @param Role New accessible role.
+ * @return
+ */
+void AccObject::SetRole( short Role )
+{
+ if( NULL == m_pIMAcc )
+ return ;
+ m_pIMAcc->Put_XAccRole( Role );
+}
+
+/**
+* Get role property via pAny
+* @param
+* @return accessible role
+*/
+short AccObject::GetRole() const
+{
+ return m_accRole;
+}
+
+/**
+ * Get MSAA state from UNO state
+ * @Role xState UNO state.
+ * @return
+ */
+DWORD AccObject::GetMSAAStateFromUNO(short xState)
+{
+ DWORD IState = UNO_MSAA_UNMAPPING;
+
+ if( !m_xAccContextRef.is() )
+ {
+ assert(false);
+ return IState;
+ }
+ short Role = m_accRole;
+
+ switch( xState )
+ {
+ case BUSY:
+ IState = STATE_SYSTEM_BUSY;
+ break;
+ case CHECKED:
+ if( Role == PUSH_BUTTON || Role == TOGGLE_BUTTON )
+ {
+ IState = STATE_SYSTEM_PRESSED;
+ }
+ else
+ IState = STATE_SYSTEM_CHECKED;
+ break;
+ case DEFUNC:
+ IState = STATE_SYSTEM_UNAVAILABLE;
+ break;
+ case EXPANDED:
+ IState = STATE_SYSTEM_EXPANDED;
+ break;
+ case FOCUSABLE:
+ IState = STATE_SYSTEM_FOCUSABLE;
+ break;
+ case FOCUSED:
+ IState = STATE_SYSTEM_FOCUSED;
+ break;
+ case INDETERMINATE:
+ IState = STATE_SYSTEM_MIXED;
+ break;
+ case MULTI_SELECTABLE:
+ IState = STATE_SYSTEM_MULTISELECTABLE;
+ break;
+ case PRESSED:
+ IState = STATE_SYSTEM_PRESSED;
+ break;
+ case RESIZABLE:
+ IState = STATE_SYSTEM_SIZEABLE;
+ break;
+ case SELECTABLE:
+ if( m_accRole == MENU || m_accRole == MENU_ITEM)
+ {
+ IState = UNO_MSAA_UNMAPPING;
+ }
+ else
+ {
+ IState = STATE_SYSTEM_SELECTABLE;
+ }
+ break;
+ case SELECTED:
+ if( m_accRole == MENU || m_accRole == MENU_ITEM )
+ {
+ IState = UNO_MSAA_UNMAPPING;
+ }
+ else
+ {
+ IState = STATE_SYSTEM_SELECTED;
+ }
+ break;
+ case ARMED:
+ IState = STATE_SYSTEM_FOCUSED;
+ break;
+ case EXPANDABLE:
+ {
+ sal_Bool isExpanded = sal_True;
+ sal_Bool isExpandable = sal_True;
+ if( Role == PUSH_BUTTON || Role == TOGGLE_BUTTON || BUTTON_DROPDOWN == Role )
+ {
+ IState = STATE_SYSTEM_HASPOPUP;
+ }
+ else
+ {
+ GetExpandedState(&isExpandable,&isExpanded);
+ if(!isExpanded)
+ IState = STATE_SYSTEM_COLLAPSED;
+ }
+ }
+ break;
+ //Remove the SENSITIVE state mapping. There is no corresponding MSAA state.
+ //case SENSITIVE:
+ // IState = STATE_SYSTEM_PROTECTED;
+ case EDITABLE:
+ if( m_pIMAcc )
+ {
+ m_pIMAcc->DecreaseState( STATE_SYSTEM_READONLY );
+ }
+ break;
+ case OFFSCREEN:
+ IState = STATE_SYSTEM_OFFSCREEN;
+ break;
+ case MOVEABLE:
+ IState = STATE_SYSTEM_MOVEABLE;
+ break;
+ case COLLAPSE:
+ IState = STATE_SYSTEM_COLLAPSED;
+ break;
+ case DEFAULT:
+ IState = STATE_SYSTEM_DEFAULT;
+ break;
+ default:
+ break;
+ }
+
+ return IState;
+}
+
+/**
+ * Decrease state of com object
+ * @param xState The lost state.
+ * @return
+ */
+void AccObject::DecreaseState( short xState )
+{
+ if( NULL == m_pIMAcc )
+ {
+ return;
+ }
+
+ if( xState == FOCUSABLE)
+ {
+ short Role = m_accRole ;
+ if(Role == MENU_ITEM
+ || Role == RADIO_MENU_ITEM
+ || Role == CHECK_MENU_ITEM)
+ return;
+ else
+ {
+ if (Role == TOGGLE_BUTTON || Role == PUSH_BUTTON || BUTTON_DROPDOWN == Role)
+ {
+ if( ( m_pParentObj !=NULL ) && (TOOL_BAR == m_pParentObj->m_accRole ) )
+ return;
+ }
+ }
+ }
+
+ else if( xState == AccessibleStateType::VISIBLE )
+ {
+ m_pIMAcc->IncreaseState( STATE_SYSTEM_INVISIBLE );
+ }
+ else if( xState == AccessibleStateType::SHOWING )
+ {
+ m_pIMAcc->IncreaseState( STATE_SYSTEM_OFFSCREEN );
+ }
+
+ DWORD msState = GetMSAAStateFromUNO(xState);
+ if(msState!=UNO_MSAA_UNMAPPING)
+ m_pIMAcc->DecreaseState(msState);
+}
+
+/**
+ * Increase state of com object
+ * @param xState The new state.
+ * @return
+ */
+void AccObject::IncreaseState( short xState )
+{
+ if( NULL == m_pIMAcc )
+ {
+ assert(false);
+ return;
+ }
+
+
+ if( xState == AccessibleStateType::VISIBLE )
+ {
+ m_pIMAcc->DecreaseState( STATE_SYSTEM_INVISIBLE );
+ }
+ else if( xState == AccessibleStateType::SHOWING )
+ {
+ m_pIMAcc->DecreaseState( STATE_SYSTEM_OFFSCREEN );
+ }
+
+
+ DWORD msState = GetMSAAStateFromUNO(xState);
+ if(msState!=UNO_MSAA_UNMAPPING)
+ m_pIMAcc->IncreaseState( msState );
+}
+
+/**
+ * Get next child element
+ * @param
+ * @return AccObject Object interface.
+ */
+AccObject* AccObject::NextChild()
+{
+ IAccChildList::iterator pInd = m_childrenList.begin();
+ if( pInd != m_childrenList.end() )
+ return *pInd;
+ return NULL;
+}
+/**
+ * update action desciption desc
+ * @param
+ * @return
+ */
+void AccObject::UpdateActionDesc()
+{
+ if (!m_pIMAcc)
+ {
+ return;
+ }
+
+ ::rtl::OUString pXString = m_xAccContextRef->getAccessibleDescription();
+ m_pIMAcc->Put_XAccDescription(pXString.getStr());
+ long Role = m_accRole;
+
+ if( Role == PUSH_BUTTON || Role == RADIO_BUTTON || Role == MENU_ITEM ||
+ Role == LIST_ITEM || Role == CHECK_BOX || Role == TREE_ITEM ||
+ Role == CHECK_MENU_ITEM || Role == RADIO_MENU_ITEM )
+ {
+ UpdateDefaultAction( );
+ }
+ else
+ {
+
+ if( m_xAccActionRef.is() )
+ {
+ if( m_xAccActionRef->getAccessibleActionCount() > 0 )
+ {
+ if (!(Role == SPIN_BOX || Role == COMBO_BOX || Role == DATE_EDITOR ||
+ Role == EDIT_BAR || Role == PASSWORD_TEXT || Role == TEXT))
+ {
+ pXString = m_xAccActionRef->getAccessibleActionDescription( 0 );
+ //Solution:If string length is more than zero,action will will be set.
+ if( pXString.getLength() > 0)
+ m_pIMAcc->Put_ActionDescription( pXString.getStr() );
+ }
+ }
+ }
+ }
+
+}
+/**
+ * update role information from uno to com
+ * @param
+ * @return
+ */
+void AccObject::UpdateRole()
+{
+ if (!m_pIMAcc)
+ {
+ return;
+ }
+
+ XAccessibleContext* pContext = m_xAccContextRef.get();
+ m_pIMAcc->Put_XAccRole( ROLE_SYSTEM_WINDOW );
+ short iRoleIndex = pContext->getAccessibleRole();
+ if (( 0 <= iRoleIndex) && ( iRoleIndex <= (sizeof(ROLE_TABLE)/(sizeof(short)*2))))
+ {
+ short iIA2Role = ROLE_TABLE[iRoleIndex][1] ;
+ m_pIMAcc->Put_XAccRole( iIA2Role );
+ }
+
+}
+/**
+ * update state information from uno to com
+ * @param
+ * @return
+ */
+void AccObject::UpdateState()
+{
+ if (!m_pIMAcc)
+ {
+ return;
+ }
+
+ XAccessibleContext* pContext = m_xAccContextRef.get();
+ Reference< XAccessibleStateSet > pRState = pContext->getAccessibleStateSet();
+ if( !pRState.is() )
+ {
+ assert(false);
+ return ;
+ }
+
+ m_pIMAcc->SetState(0L);
+
+ if ( m_accRole == POPUP_MENU )
+ {
+ return;
+ }
+
+ Sequence<short> pStates = pRState->getStates();
+ int count = pStates.getLength();
+
+ sal_Bool isEnable = sal_False;
+ sal_Bool isShowing = sal_False;
+ sal_Bool isEditable = sal_False;
+ sal_Bool isVisible = sal_False;
+ sal_Bool isFocusable = sal_False;
+
+ for( int iIndex = 0;iIndex < count;iIndex++ )
+ {
+ if( pStates[iIndex] == ENABLED )
+ isEnable = sal_True;
+ else if( pStates[iIndex] == SHOWING)
+ isShowing = sal_True;
+ else if( pStates[iIndex] == VISIBLE)
+ isVisible = sal_True;
+ else if( pStates[iIndex] == EDITABLE )
+ isEditable = sal_True;
+ else if (pStates[iIndex] == FOCUSABLE)
+ isFocusable = sal_True;
+ IncreaseState( pStates[iIndex]);
+ }
+ sal_Bool bIsMenuItem = m_accRole == MENU_ITEM || m_accRole == RADIO_MENU_ITEM || m_accRole == CHECK_MENU_ITEM;
+
+ if(bIsMenuItem)
+ {
+ if(!(isShowing && isVisible) )
+ {
+ m_pIMAcc->IncreaseState( STATE_SYSTEM_INVISIBLE );
+ m_pIMAcc->DecreaseState( STATE_SYSTEM_FOCUSABLE );
+ }
+ }
+ else
+ {
+ if(!(isShowing || isVisible) )
+ m_pIMAcc->IncreaseState( STATE_SYSTEM_INVISIBLE );
+ }
+
+ short Role = m_accRole;
+
+ if( m_pIMAcc )
+ {
+ switch(m_accRole)
+ {
+ case LABEL:
+ m_pIMAcc->IncreaseState( STATE_SYSTEM_READONLY );
+ break;
+ case TEXT:
+ // 2. editable combobox -> readonly ------ bridge
+ case EMBEDDED_OBJECT:
+ case END_NOTE:
+ case FOOTER:
+ case FOOTNOTE:
+ case GRAPHIC:
+ case HEADER:
+ case HEADING:
+
+ //Image Map
+ case PARAGRAPH:
+ case PASSWORD_TEXT:
+ case SHAPE:
+ case SPIN_BOX:
+ case TABLE:
+ case TABLE_CELL:
+ case TEXT_FRAME:
+ case DATE_EDITOR:
+ case DOCUMENT:
+ case COLUMN_HEADER:
+ {
+ if(!isEditable)
+ m_pIMAcc->IncreaseState( STATE_SYSTEM_READONLY );
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ if( isEnable )
+ {
+
+ if(!(Role == FILLER || Role == END_NOTE || Role == FOOTER || Role == FOOTNOTE || Role == GROUP_BOX || Role == RULER
+ || Role == HEADER || Role == ICON || Role == INTERNAL_FRAME || Role == LABEL || Role == LAYERED_PANE
+ || Role == SCROLL_BAR || Role == SCROLL_PANE || Role == SPLIT_PANE || Role == STATUS_BAR || Role == TOOL_TIP))
+ {
+ if( SEPARATOR == Role )
+ {
+ if( ( m_pParentObj != NULL ) && ( MENU == m_pParentObj->m_accRole || POPUP_MENU == m_pParentObj->m_accRole ))
+ IncreaseState( FOCUSABLE );
+ }
+
+ else if (TABLE_CELL == Role || TABLE == Role || PANEL == Role || OPTION_PANE == Role ||
+ COLUMN_HEADER == Role)
+ {
+ if (isFocusable)
+ IncreaseState( FOCUSABLE );
+ }
+ else
+ {
+ if(bIsMenuItem)
+ {
+ if ( isShowing && isVisible)
+ {
+ IncreaseState( FOCUSABLE );
+ }
+ }
+ else
+ {
+ IncreaseState( FOCUSABLE );
+ }
+ }
+ }
+ }
+ else
+ {
+ m_pIMAcc->IncreaseState( STATE_SYSTEM_UNAVAILABLE );
+ sal_Bool isDecreaseFocusable = sal_False;
+ if( !((Role == MENU_ITEM) ||
+ (Role == RADIO_MENU_ITEM) ||
+ (Role == CHECK_MENU_ITEM)) )
+ {
+ if ( Role == TOGGLE_BUTTON || Role == PUSH_BUTTON || BUTTON_DROPDOWN == Role)
+ {
+ if(( m_pParentObj != NULL )&& (TOOL_BAR == m_pParentObj->m_accRole ) )
+ IncreaseState( FOCUSABLE );
+ else
+ DecreaseState( FOCUSABLE );
+ }
+ else
+ DecreaseState( FOCUSABLE );
+ }
+ else if( isShowing || isVisible )
+ {
+ IncreaseState( FOCUSABLE );
+ }
+ }
+
+ if( m_pIMAcc )
+ {
+ switch(m_accRole)
+ {
+ case POPUP_MENU:
+ case MENU:
+ if( pContext->getAccessibleChildCount() > 0 )
+ m_pIMAcc->IncreaseState( STATE_SYSTEM_HASPOPUP );
+ break;
+ case PASSWORD_TEXT:
+ m_pIMAcc->IncreaseState( STATE_SYSTEM_PROTECTED );
+ break;
+ default:
+ break;
+ }
+ }
+
+}
+/**
+ * update location information from uno to com
+ * @param
+ * @return
+ */
+void AccObject::UpdateLocation()
+{
+ if (!m_pIMAcc)
+ {
+ return;
+ }
+ XAccessibleContext* pContext = m_xAccContextRef.get();
+
+ Reference< XAccessibleComponent > pRComponent(pContext,UNO_QUERY);
+ if( pRComponent.is() )
+ {
+ ::com::sun::star::awt::Point pCPoint = pRComponent->getLocationOnScreen();
+ ::com::sun::star::awt::Size pCSize = pRComponent->getSize();
+ Location tempLocation;
+ tempLocation.m_dLeft = pCPoint.X;
+ tempLocation.m_dTop = pCPoint.Y;
+ tempLocation.m_dWidth = pCSize.Width;
+ tempLocation.m_dHeight = pCSize.Height;
+ m_pIMAcc->Put_XAccLocation( tempLocation );
+ }
+
+}
+
+
+/**
+ * Public method to mapping information between MSAA and UNO.
+ * @param
+ * @return If the method is correctly processed.
+ */
+sal_Bool AccObject:: UpdateAccessibleInfoFromUnoToMSAA ( )
+{
+ if( NULL == m_pIMAcc || !m_xAccContextRef.is() )
+ {
+ assert(false);
+ return sal_False;
+ }
+
+ UpdateName();
+
+ UpdateValue();
+
+ UpdateActionDesc();
+
+ UpdateRole();
+
+ UpdateLocation();
+
+ UpdateState();
+
+ return sal_True;
+}
+
+/*
+ * Add a child selected element.
+ * @param pAccObj Child object pointer.
+ * @return
+ */
+void AccObject::AddSelect( long index, AccObject* accObj)
+{
+ m_selectionList.insert(IAccSelectionList::value_type(index,accObj));
+}
+
+IAccSelectionList& AccObject::GetSelection()
+{
+ return m_selectionList;
+}
+
+
+/**
+ * Set self to focus object in parant child list
+ * @param
+ * @return
+ */
+void AccObject::setFocus()
+{
+ if(m_pIMAcc)
+ {
+ IncreaseState(FOCUSED);
+ m_pIMAcc->Put_XAccFocus(CHILDID_SELF);
+
+ UpdateRole();
+ }
+}
+
+/**
+ * Unset self from focus object in parant child list.
+ * @param
+ * @return
+ */
+void AccObject::unsetFocus()
+{
+ if(m_pIMAcc)
+ {
+ DecreaseState( FOCUSED );
+ m_pIMAcc->Put_XAccFocus(UACC_NO_FOCUS);
+ }
+}
+
+void AccObject::GetExpandedState( sal_Bool* isExpandable, sal_Bool* isExpanded)
+{
+ *isExpanded = sal_False;
+ *isExpandable = sal_False;
+
+ if( !m_xAccContextRef.is() )
+ {
+ return;
+ }
+ Reference< XAccessibleStateSet > pRState = m_xAccContextRef->getAccessibleStateSet();
+ if( !pRState.is() )
+ {
+ return;
+ }
+
+ Sequence<short> pStates = pRState->getStates();
+ int count = pStates.getLength();
+
+ for( int iIndex = 0;iIndex < count;iIndex++ )
+ {
+ if( EXPANDED == pStates[iIndex] )
+ {
+ *isExpanded = sal_True;
+ }
+ else if( EXPANDABLE == pStates[iIndex] )
+ {
+ *isExpandable = sal_True;
+ }
+ }
+}
+
+void AccObject::NotifyDestroy(sal_Bool ifDelete)
+{
+ m_bShouldDestroy=ifDelete;
+ if(m_pIMAcc)
+ m_pIMAcc->NotifyDestroy(m_bShouldDestroy);
+}
+
+void AccObject::SetParentObj(AccObject* pParentAccObj)
+{
+ m_pParentObj = pParentAccObj;
+
+ if(m_pIMAcc)
+ {
+ if(m_pParentObj)
+ {
+ m_pIMAcc->Put_XAccParent(m_pParentObj->GetIMAccessible());
+ }
+ else
+ {
+ m_pIMAcc->Put_XAccParent(NULL);
+ }
+ }
+}
+//ResID means ChildID in MSAA
+void AccObject::SetResID(long id)
+{
+ m_resID = id;
+ if(m_pIMAcc)
+ m_pIMAcc->Put_XAccChildID(m_resID);
+}
+//return COM interface in acc object
+IMAccessible* AccObject::GetIMAccessible()
+{
+ return m_pIMAcc;
+}
+
+Reference < XAccessible > AccObject::GetXAccessible()
+{
+ return m_xAccRef;
+}
+
+void AccObject::SetParentHWND(HWND hWnd)
+{
+ m_pParantID = hWnd;
+}
+void AccObject::SetListener( AccEventListener* Listener )
+{
+ m_accListener = Listener;
+}
+AccEventListener* AccObject::getListener()
+{
+ return m_accListener;
+}
+
+long AccObject::GetResID()
+{
+ return m_resID;
+}
+
+HWND AccObject::GetParentHWND()
+{
+ return m_pParantID;
+}
+
+AccObject* AccObject::GetParentObj()
+{
+ return m_pParentObj;
+}
+sal_Bool AccObject::ifShouldDestroy()
+{
+ return m_bShouldDestroy;
+}
diff --git a/winaccessibility/source/service/AccObjectContainerEventListener.cxx b/winaccessibility/source/service/AccObjectContainerEventListener.cxx
new file mode 100644
index 000000000000..8aea67670426
--- /dev/null
+++ b/winaccessibility/source/service/AccObjectContainerEventListener.cxx
@@ -0,0 +1,72 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+// AccObjectContainerEventListener.cpp: implementation of the AccContainerEventListener class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+
+#include "AccObjectContainerEventListener.hxx"
+#include "AccObjectManagerAgent.hxx"
+#include "unomsaaevent.hxx"
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+
+AccObjectContainerEventListener::AccObjectContainerEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent)
+ :AccContainerEventListener(pAcc, Agent)
+{}
+AccObjectContainerEventListener::~AccObjectContainerEventListener()
+{
+}
+
+/**
+ * handle the STATE_CHANGED event
+ */
+void AccObjectContainerEventListener::handleStateChangedEvent(Any oldValue, Any newValue)
+{
+ //set the accessible name before process for there is no NAME_CHANGED event when change
+ //the text in drawing objects.
+ short newV;
+ if( newValue >>= newV)
+ {
+ if (newV == AccessibleStateType::FOCUSED)
+ {
+ pAgent->UpdateAccName(pAccessible);
+
+ pAgent->UpdateDescription(pAccessible);
+ }
+ }
+ AccContainerEventListener::handleStateChangedEvent(oldValue, newValue);
+}
+/**
+ * handle the VISIBLE_DATA_CHANGED event
+ * For SHAPES, the visiable_data_changed event should be mapped to LOCATION_CHANGED event
+ */
+void AccObjectContainerEventListener::handleVisibleDataChangedEvent()
+{
+ AccContainerEventListener::handleBoundrectChangedEvent();
+}
diff --git a/winaccessibility/source/service/AccObjectManagerAgent.cxx b/winaccessibility/source/service/AccObjectManagerAgent.cxx
new file mode 100644
index 000000000000..1b29480dd04b
--- /dev/null
+++ b/winaccessibility/source/service/AccObjectManagerAgent.cxx
@@ -0,0 +1,386 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "AccObjectManagerAgent.hxx"
+#include "AccObjectWinManager.hxx"
+
+#include "UAccCOM2.h"
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+
+/**
+ * Construction/Destruction.
+ * @param
+ * @return
+ */
+AccObjectManagerAgent::AccObjectManagerAgent():
+ pWinManager(NULL)
+{
+ if( pWinManager == NULL )
+ {
+ pWinManager = AccObjectWinManager::CreateAccObjectWinManagerInstance(this);
+ }
+}
+
+AccObjectManagerAgent::~AccObjectManagerAgent()
+{
+ delete pWinManager;
+ pWinManager = NULL;
+}
+
+/**
+ * Interface of updating MSAA name when UNO name_changed event occurs.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @return
+ */
+void AccObjectManagerAgent::UpdateAccName( XAccessible* pXAcc )
+{
+ if( pWinManager )
+ pWinManager->UpdateAccName( pXAcc );
+}
+
+/**
+ * Interface of updating MSAA name when UNO action changed event occurs.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @return
+ */
+void AccObjectManagerAgent::UpdateAction( XAccessible* pXAcc )
+{
+ if( pWinManager )
+ pWinManager->UpdateAction( pXAcc );
+}
+
+/**
+ * Interface of updating MSAA value when UNO value_changed event occurs.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @param pAny New value.
+ * @return
+ */
+void AccObjectManagerAgent::UpdateValue( XAccessible* pXAcc, Any pAny )
+{
+ if( pWinManager )
+ pWinManager->SetValue( pXAcc, pAny );
+}
+
+/**
+ * Interface of updating MSAA value when UNO value_changed event occurs.If we can not
+ * find new value,we'll get new value from pXAcc to update com value.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @return
+ */
+void AccObjectManagerAgent::UpdateValue( XAccessible* pXAcc )
+{
+ if( pWinManager )
+ pWinManager->UpdateValue( pXAcc );
+}
+
+/**
+ * Interface of updating MSAA name when UNO name_changed event occurs.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @param newName New UNO accessible name.
+ * @return
+ */
+void AccObjectManagerAgent::UpdateAccName( XAccessible* pXAcc, Any newName)
+{
+ if( pWinManager )
+ pWinManager->SetAccName( pXAcc, newName );
+}
+
+
+/**
+ * Interface of updating MSAA location when UNO location_changed event occurs.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @param pXAcc Uno The top position of new location.
+ * @param pXAcc Uno The left position of new location.
+ * @param pXAcc Uno The width of new location.
+ * @param pXAcc Uno The width of new location.
+ * @return
+ */
+void AccObjectManagerAgent::UpdateLocation( XAccessible* /* pXAcc */, long /*top*/, long /*left*/, long /*width*/, long /*height*/ )
+{
+#ifdef _IMPL_WIN
+ if( pWinManager )
+ pWinManager->SetLocation( pXAcc, top, left, width, height );
+#endif
+}
+
+/**
+ * Interface of updating MSAA name when UNO description_changed event occurs.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @param newDesc New UNO accessible description.
+ * @return
+ */
+void AccObjectManagerAgent::UpdateDescription( XAccessible* pXAcc, Any newDesc )
+{
+ if( pWinManager )
+ pWinManager->SetDescription( pXAcc, newDesc );
+}
+
+/**
+ * When a new UNO XAccessible object is found by listener,we'll create a corresponding
+ * com object and insert it to our manager list.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @param pWnd The top window handle containing control.
+ * @return If the method is correctly processed.
+ */
+unsigned char AccObjectManagerAgent::InsertAccObj( XAccessible* pXAcc,XAccessible* pParentXAcc,long pWnd)
+{
+ if( pWinManager )
+ return (unsigned char)pWinManager->InsertAccObj( pXAcc, pParentXAcc,HWND((void*)pWnd) );
+
+ return sal_False;
+}
+
+/**
+ * save the pair <topwindowhandle, XAccessible>
+ * @param hWnd, top window handle
+ * @param pXAcc XAccessible interface for top window
+ * @return void
+ */
+void AccObjectManagerAgent::SaveTopWindowHandle(long hWnd, com::sun::star::accessibility::XAccessible* pXAcc)
+{
+ if( pWinManager )
+ pWinManager->SaveTopWindowHandle( HWND((void*)hWnd), pXAcc );
+}
+
+
+/**
+ * When a UNO XAccessible object's new children are found by listener,we'll create
+ * corresponding com objects and insert them to our manager list.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @param pWnd The top window handle containing control.
+ * @return If the method is correctly processed.
+ */
+unsigned char AccObjectManagerAgent::InsertChildrenAccObj( XAccessible* pXAcc,
+ long pWnd)
+{
+ if( pWinManager )
+ return (unsigned char)pWinManager->InsertChildrenAccObj( pXAcc, HWND((void*)pWnd) );
+
+ return sal_False;
+}
+
+/**
+ * When a new UNO XAccessible object is destroied,we'll delete its corresponding
+ * com object and remove it from our manager list.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @return
+ */
+void AccObjectManagerAgent::DeleteAccObj( XAccessible* pXAcc )
+{
+ if( pWinManager )
+ pWinManager->DeleteAccObj( pXAcc );
+}
+
+/**
+ * When new UNO children XAccessible objects are destroyed,we'll delete their
+ * corresponding com objects and remove them from our manager list.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @return
+ */
+void AccObjectManagerAgent::DeleteChildrenAccObj( XAccessible* pXAcc )
+{
+ if( pWinManager )
+ pWinManager->DeleteChildrenAccObj( pXAcc );
+}
+
+/**
+ * Interface of decreasing MSAA state when some UNO state is decreased.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @param pState The lost state of control.
+ * @return
+ */
+void AccObjectManagerAgent::DecreaseState( XAccessible* pXAcc,unsigned short pState )
+{
+ if(pWinManager)
+ {
+ pWinManager->DecreaseState( pXAcc, pState );
+ }
+}
+
+/**
+ * Interface of increasing MSAA name when some UNO state is increased.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @param pState The new state of control.
+ * @return
+ */
+void AccObjectManagerAgent::IncreaseState( XAccessible* pXAcc,unsigned short pState )
+{
+ if(pWinManager)
+ {
+ pWinManager->IncreaseState( pXAcc, pState );
+ }
+}
+
+void AccObjectManagerAgent::UpdateState( com::sun::star::accessibility::XAccessible* pXAcc )
+{
+ if(pWinManager)
+ pWinManager->UpdateState(pXAcc);
+}
+
+/**
+ * Interface of notify MSAA event when some UNO event occured.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @param pEvent UNO event ID.
+ * @return If the method is correctly processed.
+ */
+unsigned char AccObjectManagerAgent::NotifyAccEvent( short pEvent,XAccessible* pXAcc )
+{
+ if(pWinManager)
+ return (unsigned char)pWinManager->NotifyAccEvent(pXAcc,pEvent);
+
+ return sal_False;
+}
+
+/**
+ * Judge whether a XAccessible object is a container object.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @return If the method is correctly processed.
+ */
+unsigned short AccObjectManagerAgent::IsContainer( XAccessible* pXAcc )
+{
+ if(pWinManager)
+ return (unsigned char)pWinManager->IsContainer(pXAcc);
+
+ return sal_False;
+}
+
+/**
+ * Return com object interface by querying XAccessible interface.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @return Com interface.
+ */
+IMAccessible* AccObjectManagerAgent::GetIMAccByXAcc(XAccessible* pXAcc)
+{
+ if(pWinManager)
+ return pWinManager->GetIMAccByXAcc(pXAcc);
+
+ return NULL;
+}
+
+/**
+ * Notify manger when a XAccessible object is destroying.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @return.
+ */
+void AccObjectManagerAgent::NotifyDestroy(XAccessible* pXAcc)
+{
+ if(pWinManager)
+ pWinManager->NotifyDestroy(pXAcc);
+}
+
+/**
+ * Return com object interface by querying child id.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @return Com interface.
+ */
+void AccObjectManagerAgent::GetIAccessibleFromResID(long childID,IMAccessible** pIMAcc)
+{
+ if(pWinManager)
+ *pIMAcc = pWinManager->GetIAccessibleFromResID(childID);
+}
+
+/**
+ * Return object interface by querying interface.
+ * @param pXAcc Uno XAccessible interface of control.
+ * @return Com interface.
+ */
+unsigned char AccObjectManagerAgent::GetIAccessibleFromXAccessible(XAccessible* pXAcc, IAccessible** ppXI)
+{
+ if(pWinManager)
+ {
+ *ppXI = (IAccessible*)pWinManager->GetIMAccByXAcc(pXAcc);
+ if(*ppXI)
+ return sal_True;
+ }
+ return sal_False;
+}
+
+XAccessible* AccObjectManagerAgent::GetParentXAccessible( XAccessible* pXAcc )
+{
+ if(pWinManager)
+ return pWinManager->GetParentXAccessible( pXAcc );
+
+ return NULL;
+}
+
+short AccObjectManagerAgent::GetParentRole( XAccessible* pXAcc )
+{
+ if(pWinManager)
+ return pWinManager->GetParentRole( pXAcc );
+
+ return -1;
+}
+
+void AccObjectManagerAgent::UpdateDescription( XAccessible* pXAcc )
+{
+ if(pWinManager)
+ pWinManager->UpdateDescription( pXAcc );
+}
+
+void AccObjectManagerAgent::UpdateChildState(com::sun::star::accessibility::XAccessible* pXAcc)
+{
+ if(pWinManager)
+ pWinManager->UpdateChildState( pXAcc );
+}
+
+
+bool AccObjectManagerAgent::IsSpecialToolboItem(com::sun::star::accessibility::XAccessible* pXAcc)
+{
+ if(pWinManager)
+ return pWinManager->IsSpecialToolboItem( pXAcc );
+
+ return false;
+}
+
+short AccObjectManagerAgent::GetRole(com::sun::star::accessibility::XAccessible* pXAcc)
+{
+ if(pWinManager)
+ return pWinManager->GetRole( pXAcc );
+
+ return -1;
+}
+
+XAccessible* AccObjectManagerAgent::GetAccDocByAccTopWin( XAccessible* pXAcc )
+{
+ if (pWinManager)
+ {
+ return pWinManager->GetAccDocByAccTopWin( pXAcc );
+ }
+ return NULL;
+}
+bool AccObjectManagerAgent::IsTopWinAcc( com::sun::star::accessibility::XAccessible* pXAcc )
+{
+ if (pWinManager)
+ {
+ return pWinManager->IsTopWinAcc( pXAcc );
+ }
+ return NULL;
+}
+
+bool AccObjectManagerAgent::IsStateManageDescendant(com::sun::star::accessibility::XAccessible* pXAcc)
+{
+ if(pWinManager)
+ return pWinManager->IsStateManageDescendant( pXAcc );
+
+ return sal_False;
+}
diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx
new file mode 100644
index 000000000000..08ed3efd2b43
--- /dev/null
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -0,0 +1,1321 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <cassert>
+
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+
+#include <oleacc.h>
+#ifndef _SV_AccObjectWinManager_HXX
+#include "AccObjectWinManager.hxx"
+#endif
+#include "AccEventListener.hxx"
+#include "AccComponentEventListener.hxx"
+#include "AccContainerEventListener.hxx"
+#include "AccDialogEventListener.hxx"
+#include "AccWindowEventListener.hxx"
+#include "AccFrameEventListener.hxx"
+#include "AccMenuEventListener.hxx"
+#include "AccObjectContainerEventListener.hxx"
+#include "AccParagraphEventListener.hxx"
+#include "AccTextComponentEventListener.hxx"
+#include "AccListEventListener.hxx"
+#include "AccTreeEventListener.hxx"
+#include "AccTableEventListener.hxx"
+#include "AccObject.hxx"
+#include "unomsaaevent.hxx"
+#include "checkmt.hxx"
+
+#define CHILDID_SELF 0
+
+
+using namespace std;
+using namespace com::sun::star::accessibility;
+using namespace com::sun::star::uno;
+
+AccObjectWinManager* g_acc_manager = NULL;
+AccObjectWinManager* AccObjectWinManager::me = NULL;
+
+/**
+ * Implementation of interface XMSAAService's method getAccObjectPtr() that return the
+ * corresponding com interface with the MS event.
+ *
+ * @param
+ * @return Com interface.
+ */
+long GetMSComPtr(long hWnd, long lParam, long wParam)
+{
+ if( g_acc_manager )
+ return (long)g_acc_manager->Get_ToATInterface(HWND((void*)hWnd),lParam,wParam );
+ return NULL;
+}
+
+/**
+ * constructor
+ * @param Agent The agent kept in all listeners,it's the sole interface by which
+ * listener communicate with windows manager.
+ * pEventAccObj The present event accobject.
+ * oldFocus Last focused object.
+ * isSelectionChanged flag that identifies if there is selection changed.
+ * selectionChildObj Selected object.
+ * dChildID Chile resource ID.
+ * hAcc TopWindowHWND
+ * @return
+ */
+AccObjectWinManager::AccObjectWinManager( AccObjectManagerAgent* Agent ):
+ pAgent( Agent ),
+ oldFocus( NULL )
+{
+}
+
+/**
+ * Public method to produce manager
+ * @param Agent The agent kept in all listeners,it's the sole interface by which
+ * listener communicate with windows manager.
+ * @return
+ */
+AccObjectWinManager* AccObjectWinManager::CreateAccObjectWinManagerInstance( AccObjectManagerAgent* Agent )
+{
+ if( me == NULL )
+ {
+ me = new AccObjectWinManager( Agent );
+ g_acc_manager = me;
+ return me;
+ }
+
+ return me;
+}
+
+
+/**
+ * Destructor,clear all resource.
+ * @param
+ * @return
+ */
+AccObjectWinManager::~AccObjectWinManager()
+{
+ XIdAccList.clear();
+ HwndXAcc.clear();
+ XResIdAccList.clear();
+ XHWNDDocList.clear();
+#ifdef ACC_DEBUG
+
+ fclose( pFile );
+#endif
+}
+
+
+/**
+ * Get valid com object interface when notifying some MSAA event
+ * @param pWND The top window handle that contains that event control.
+ * @param wParam Windows system interface.
+ * @return Com interface with event.
+ */
+
+long AccObjectWinManager::Get_ToATInterface( HWND hWnd, long lParam, long wParam)
+{
+ vos::OGuard localGuard(maATInterfaceMutex);//
+
+ IMAccessible* pRetIMAcc = NULL;
+
+ if(lParam == OBJID_CLIENT )
+ {
+ AccObject* topWindowAccObj = GetTopWindowAccObj(hWnd);
+ if(topWindowAccObj)
+ {
+ pRetIMAcc = topWindowAccObj->GetIMAccessible();
+ if(pRetIMAcc)
+ pRetIMAcc->AddRef();//increase COM reference count
+ }
+ }
+
+ if ( pRetIMAcc && lParam == OBJID_CLIENT )
+ {
+ IAccessible* pTemp = dynamic_cast<IAccessible*>( pRetIMAcc );
+ HRESULT result = LresultFromObject(IID_IAccessible, wParam, pTemp);
+ pTemp->Release();
+ return result;
+ }
+ return 0;
+}
+
+/**
+ * Search AccObject by XAccessible pointer from our container.
+ * @param pXAcc XAccessible interface.
+ * @return Pointer of accObject that is found.
+ */
+AccObject* AccObjectWinManager::GetAccObjByXAcc( XAccessible* pXAcc)
+{
+ if( pXAcc == NULL)
+ return NULL;
+
+ XIdToAccObjHash::iterator pIndTemp = XIdAccList.find( (void*)pXAcc );
+ if ( pIndTemp == XIdAccList.end() )
+ return NULL;
+
+ return &(pIndTemp->second);
+}
+
+/**
+ * Search XAccessible by AccObject pointer from our container.
+ * @param pAccObj AccObject pointer.
+ * @return Pointer of XAccessible Interface.
+ */
+XAccessible* AccObjectWinManager::GetXAccByAccObj(AccObject* pAccObj)
+{
+ XIdToAccObjHash::iterator iter = XIdAccList.begin();
+ while(iter!=XIdAccList.end())
+ {
+ AccObject* tmp = &(iter->second);
+ if(tmp== pAccObj)
+ return (XAccessible*)(iter->first);
+ iter++;
+ }
+ return NULL;
+}
+
+/**
+ * get acc object of top window by its handle
+ * @param hWnd, top window handle
+ * @return pointer to AccObject
+ */
+AccObject* AccObjectWinManager::GetTopWindowAccObj(HWND hWnd)
+{
+ XHWNDToXAccHash::iterator iterResult =HwndXAcc.find(hWnd);
+ if(iterResult == HwndXAcc.end())
+ return NULL;
+ XAccessible* pXAcc = (XAccessible*)(iterResult->second);
+ return GetAccObjByXAcc(pXAcc);
+}
+
+/**
+ * Simulate MSAA event via XAccessible interface and event type.
+ * @param pXAcc XAccessible interface.
+ * @param state Customize Interface
+ * @return The terminate result that identifies if the call is successful.
+ */
+sal_Bool AccObjectWinManager::NotifyAccEvent(XAccessible* pXAcc,short state)
+{
+ vos::OGuard aGuard(aNotifyMutex);
+
+ if (!IsInMainThread())
+ {
+ return sal_False;
+ }
+
+ Reference< XAccessibleContext > pRContext;
+
+ if( pXAcc == NULL)
+ return sal_False;
+
+
+ pRContext = pXAcc->getAccessibleContext();
+ if( !pRContext.is() )
+ return sal_False;
+
+
+ AccObject* selfAccObj= GetAccObjByXAcc(pXAcc);
+
+ if(selfAccObj==NULL)
+ return sal_False;
+
+ int selectNum =0;
+
+ long dChildID = selfAccObj->GetResID();
+ HWND hAcc = selfAccObj->GetParentHWND();
+
+ switch(state)
+ {
+ case UM_EVENT_STATE_FOCUSED:
+ {
+ UpdateAccFocus(pXAcc);
+ if( selfAccObj )
+ selfAccObj->UpdateDefaultAction( );
+ UpdateValue(pXAcc);
+ NotifyWinEvent( EVENT_OBJECT_FOCUS,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ }
+ case UM_EVENT_STATE_BUSY:
+ NotifyWinEvent( EVENT_OBJECT_STATECHANGE,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_STATE_CHECKED:
+ NotifyWinEvent( EVENT_OBJECT_STATECHANGE,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_STATE_PRESSED:
+ NotifyWinEvent( EVENT_OBJECT_STATECHANGE,hAcc, OBJID_CLIENT,dChildID );
+ break;
+
+ //Removed fire out selected event
+ //case UM_EVENT_STATE_SELECTED:
+ // NotifyWinEvent( EVENT_OBJECT_STATECHANGE,hAcc, OBJID_CLIENT,dChildID );
+ // break;
+ case UM_EVENT_STATE_ARMED:
+ UpdateAccFocus(pXAcc);
+ NotifyWinEvent( EVENT_OBJECT_FOCUS,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_MENU_START:
+ NotifyWinEvent( EVENT_SYSTEM_MENUSTART,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_MENU_END:
+ NotifyWinEvent( EVENT_SYSTEM_MENUEND,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_MENUPOPUPSTART:
+ NotifyWinEvent( EVENT_SYSTEM_MENUPOPUPSTART,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_MENUPOPUPEND:
+ NotifyWinEvent( EVENT_SYSTEM_MENUPOPUPEND,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_SELECTION_CHANGED:
+ NotifyWinEvent( EVENT_OBJECT_SELECTION,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_SELECTION_CHANGED_ADD:
+ NotifyWinEvent( EVENT_OBJECT_SELECTIONADD,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_SELECTION_CHANGED_REMOVE:
+ NotifyWinEvent( EVENT_OBJECT_SELECTIONREMOVE,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_SELECTION_CHANGED_WITHIN:
+ NotifyWinEvent( EVENT_OBJECT_SELECTIONWITHIN,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_OBJECT_VALUECHANGE:
+ UpdateValue(pXAcc);
+ NotifyWinEvent( EVENT_OBJECT_VALUECHANGE,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_OBJECT_NAMECHANGE:
+ NotifyWinEvent( EVENT_OBJECT_NAMECHANGE,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_OBJECT_DESCRIPTIONCHANGE:
+ NotifyWinEvent( EVENT_OBJECT_DESCRIPTIONCHANGE,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_OBJECT_DEFACTIONCHANGE:
+ NotifyWinEvent( IA2_EVENT_ACTION_CHANGED,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_OBJECT_CARETCHANGE:
+ NotifyWinEvent( IA2_EVENT_TEXT_CARET_MOVED,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_OBJECT_TEXTCHANGE:
+ NotifyWinEvent( IA2_EVENT_TEXT_CHANGED,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_ACTIVE_DESCENDANT_CHANGED:
+ UpdateAccFocus(pXAcc);
+ NotifyWinEvent( EVENT_OBJECT_FOCUS,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_BOUNDRECT_CHANGED:
+ NotifyWinEvent( EVENT_OBJECT_LOCATIONCHANGE,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_VISIBLE_DATA_CHANGED:
+ NotifyWinEvent( IA2_EVENT_VISIBLE_DATA_CHANGED,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_SHOW :
+ NotifyWinEvent( EVENT_OBJECT_SHOW,hAcc, OBJID_CLIENT,dChildID );
+ NotifyWinEvent( EVENT_SYSTEM_FOREGROUND,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_TABLE_CAPTION_CHANGED:
+ NotifyWinEvent( IA2_EVENT_TABLE_CAPTION_CHANGED,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED:
+ NotifyWinEvent( IA2_EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_TABLE_COLUMN_HEADER_CHANGED:
+ NotifyWinEvent( IA2_EVENT_TABLE_COLUMN_HEADER_CHANGED,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_TABLE_MODEL_CHANGED:
+ NotifyWinEvent( IA2_EVENT_TABLE_MODEL_CHANGED,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_TABLE_ROW_HEADER_CHANGED:
+ NotifyWinEvent( IA2_EVENT_TABLE_ROW_HEADER_CHANGED,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_TABLE_SUMMARY_CHANGED:
+ NotifyWinEvent( IA2_EVENT_TABLE_SUMMARY_CHANGED,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_TABLE_ROW_DESCRIPTION_CHANGED:
+ NotifyWinEvent( IA2_EVENT_TABLE_ROW_DESCRIPTION_CHANGED,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_OBJECT_REORDER:
+ NotifyWinEvent( EVENT_OBJECT_REORDER,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_PAGE_CHANGED:
+ NotifyWinEvent( IA2_EVENT_PAGE_CHANGED,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_CHILD_REMOVED:
+ NotifyWinEvent( EVENT_OBJECT_DESTROY,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_CHILD_ADDED:
+ NotifyWinEvent( EVENT_OBJECT_CREATE ,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_OBJECT_PAGECHANGED:
+ NotifyWinEvent( IA2_EVENT_PAGE_CHANGED ,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_TEXT_SELECTION_CHANGED:
+ NotifyWinEvent( IA2_EVENT_TEXT_SELECTION_CHANGED ,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_SECTION_CHANGED:
+ NotifyWinEvent( IA2_EVENT_SECTION_CHANGED ,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ case UM_EVENT_COLUMN_CHANGED:
+ NotifyWinEvent( IA2_EVENT_TEXT_COLUMN_CHANGED ,hAcc, OBJID_CLIENT,dChildID );
+ break;
+ default:
+ break;
+ }
+
+ return sal_True;
+}
+
+/**
+ * Get Parent XAccessible interface by XAccessible interface.
+ * @param pXAcc XAccessible interface.
+ * @return Parent XAccessible interface.
+ */
+XAccessible* AccObjectWinManager::GetParentXAccessible( XAccessible* pXAcc )
+{
+ AccObject* pObj= GetAccObjByXAcc(pXAcc);
+ if( pObj ==NULL )
+ return NULL;
+ if(pObj->GetParentObj())
+ {
+ pObj = pObj->GetParentObj();
+ return pObj->GetXAccessible().get();
+ }
+ return NULL;
+}
+
+/**
+ * Get Parent role by XAccessible interface.
+ * @param pXAcc XAccessible interface.
+ * @return Parent role.
+ */
+short AccObjectWinManager::GetParentRole( XAccessible* pXAcc )
+{
+ AccObject* pObj= GetAccObjByXAcc(pXAcc);
+ if( pObj ==NULL )
+ return -1;
+ if(pObj->GetParentObj())
+ {
+ pObj = pObj->GetParentObj();
+ if(pObj->GetXAccessible().is())
+ {
+ XAccessible* pXAcc = pObj->GetXAccessible().get();
+ Reference< XAccessibleContext > pRContext = pXAcc->getAccessibleContext();
+ if(pRContext.is())
+ return pRContext->getAccessibleRole();
+ }
+ }
+ return -1;
+}
+
+/**
+ * Update focus objcet by new focused XAccessible interface.
+ * @param newFocus New XAccessible interface that gets focus.
+ * @return
+ */
+void AccObjectWinManager::UpdateAccFocus(XAccessible* newFocus)
+{
+ AccObject* pAccObjNew = GetAccObjByXAcc(newFocus);
+ if(pAccObjNew)
+ {
+ AccObject* pAccObjOld = GetAccObjByXAcc(oldFocus);
+ oldFocus = newFocus;
+ pAccObjNew->setFocus();
+ //if old == new, the pAccObjNew will be without focused state
+ if (pAccObjOld && pAccObjOld != pAccObjNew)
+ pAccObjOld->unsetFocus();
+ }
+}
+
+/**
+ * Update selected objcet by new focused XAccessible interface.
+ * @param pXAcc XAccessible interface that has selected child changed.
+ * @return Selected children count.
+ */
+int AccObjectWinManager::UpdateAccSelection(XAccessible* pXAcc)
+{
+ XAccessibleSelection* pSelection = NULL;
+ Reference< XAccessibleContext > pRContext;
+
+ if( pXAcc == NULL)
+ return sal_False;
+
+ pRContext = pXAcc->getAccessibleContext();
+ if( !pRContext.is() )
+ return sal_False;
+
+ Reference< XAccessibleSelection > pRSelection(pRContext,UNO_QUERY);
+ if( !pRSelection.is() )
+ return sal_False;
+
+ AccObject* pAccObj = GetAccObjByXAcc(pXAcc);
+ if(pAccObj==NULL)
+ return sal_False;
+
+ Reference<XAccessible> pRChild = NULL;
+ AccObject* pAccChildObj = NULL;
+ int selectNum= pRSelection->getSelectedAccessibleChildCount();
+
+ IAccSelectionList oldSelection = pAccObj->GetSelection();
+
+ if(selectNum > 4)//for selected.
+ return selectNum;
+ if(selectNum == 1 && oldSelection.size() == 0)
+ return 1;
+
+ for (int i=0;i<selectNum;i++)
+ {
+ pRChild = pRSelection->getSelectedAccessibleChild(i);
+ if(!pRChild.is())
+ {
+ continue;
+ }
+ Reference<XAccessibleContext> pRChildContext = pRChild->getAccessibleContext();
+ if(!pRChildContext.is())
+ {
+ continue;
+ }
+ long index = pRChildContext->getAccessibleIndexInParent();
+ IAccSelectionList::iterator temp = oldSelection.find(index);
+ if ( temp != oldSelection.end() )
+ {
+ oldSelection.erase(index);
+ continue;
+ }
+
+ pAccChildObj = NULL;
+ pAccChildObj = GetAccObjByXAcc(pRChild.get());
+ if(!pAccChildObj)
+ {
+ InsertAccObj(pRChild.get(), pXAcc,pAccObj->GetParentHWND());
+ pAccChildObj = GetAccObjByXAcc(pRChild.get());
+ }
+
+ pAccObj->AddSelect(index, pAccChildObj);
+
+ if(pAccChildObj != NULL)
+ NotifyWinEvent(EVENT_OBJECT_SELECTIONADD,pAccObj->GetParentHWND(), OBJID_CLIENT,pAccChildObj->GetResID());
+ }
+
+ IAccSelectionList::iterator iter = oldSelection.begin();
+ while(iter!=oldSelection.end())
+ {
+ pAccObj->GetSelection().erase(iter->first);
+ pAccChildObj = (AccObject*)(iter->second);
+ if(pAccChildObj != NULL)
+ NotifyWinEvent(EVENT_OBJECT_SELECTIONREMOVE,pAccObj->GetParentHWND(), OBJID_CLIENT,pAccChildObj->GetResID());
+ iter++;
+ }
+ return 0;
+
+}
+
+/**
+ * Delete child element from children list.
+ * @param pObj Child element that should be removed from parant child list.
+ * @return
+ */
+void AccObjectWinManager::DeleteAccChildNode( AccObject* pObj )
+{
+ AccObject *parentAccObj = pObj->GetParentObj();
+ if( parentAccObj )
+ parentAccObj->DeleteChild( pObj );
+}
+
+/**
+ * Delete XAccessible items in top window handle hashtable
+ * @param pXAcc XAccessible interface.
+ * @return
+ */
+void AccObjectWinManager::DeleteFromHwndXAcc(XAccessible* pXAcc )
+{
+ XHWNDToXAccHash::iterator iter = HwndXAcc.begin();
+ while(iter!=HwndXAcc.end())
+ {
+ if(iter->second == pXAcc )
+ {
+ HwndXAcc.erase(iter);
+ return;
+ }
+ iter++;
+ }
+}
+
+/**
+ * Delete Delete all children with the tree root of XAccessible pointer
+ * @param pXAcc Tree root XAccessible interface.
+ * @return
+ */
+void AccObjectWinManager::DeleteChildrenAccObj(XAccessible* pXAcc)
+{
+ vos::OGuard aGuard( aDeleteMutex );
+ AccObject* currentObj=NULL;
+ AccObject* childObj=NULL;
+ XAccessible* pTmpXAcc=NULL;
+
+ currentObj = GetAccObjByXAcc( pXAcc);
+ if(currentObj)
+ {
+ childObj = currentObj->NextChild();
+ while(childObj)
+ {
+ pTmpXAcc = GetXAccByAccObj(childObj);
+ if(pTmpXAcc)
+ {
+ DeleteChildrenAccObj(pTmpXAcc);
+ DeleteAccObj(pTmpXAcc);
+ }
+ childObj = currentObj->NextChild();
+ }
+ }
+}
+
+/**
+ * Delete Delete Acc object self.
+ * @param pXAcc The XAccessible interface.
+ * @return
+ */
+void AccObjectWinManager::DeleteAccObj( XAccessible* pXAcc )
+{
+ vos::OGuard aGuard( aDeleteMutex );
+ if( pXAcc == NULL )
+ return;
+ XIdToAccObjHash::iterator temp = XIdAccList.find(pXAcc);
+ if( temp != XIdAccList.end() )
+ {
+ ResIdGen.SetSub( temp->second.GetResID() );
+ }
+ else
+ {
+ return;
+ }
+
+ AccObject& accObj = temp->second;
+ DeleteAccChildNode( &accObj );
+ DeleteAccListener( &accObj );
+ if( accObj.GetIMAccessible() )
+ {
+ accObj.GetIMAccessible()->Release();
+ }
+ XIdAccList.erase( pXAcc );
+ XResIdAccList.erase( accObj.GetResID() );
+ DeleteFromHwndXAcc(pXAcc);
+}
+
+/**
+ * Delete listener that inspects some XAccessible object
+ * @param pAccObj Accobject pointer.
+ * @return
+ */
+void AccObjectWinManager::DeleteAccListener( AccObject* pAccObj )
+{
+ AccEventListener* listener = pAccObj->getListener();
+ if( listener==NULL )
+ return;
+ listener->removeMeFromBroadcaster();
+ pAccObj->SetListener(NULL);
+}
+
+/**
+ * Generate a child ID, which is used for AT
+ * @param
+ * @return New resource ID.
+ */
+inline long AccObjectWinManager::ImpleGenerateResID()
+{
+ return ResIdGen.GenerateNewResID();
+}
+
+/**
+ * Insert all children of the current acc object
+ * @param pXAcc XAccessible interface
+ * @param pWnd Top Window handle
+ * @return The calling result.
+ */
+sal_Bool AccObjectWinManager::InsertChildrenAccObj( com::sun::star::accessibility::XAccessible* pXAcc,
+ HWND pWnd)
+{
+ if(!IsContainer(pXAcc))
+ return sal_False;
+
+ Reference< XAccessibleContext > pRContext;
+
+ if( pXAcc == NULL)
+ return sal_False;
+ pRContext = pXAcc->getAccessibleContext();
+ if( !pRContext.is() )
+ return sal_False;
+
+ short role = pRContext->getAccessibleRole();
+
+ if(com::sun::star::accessibility::AccessibleRole::DOCUMENT == role )
+ {
+ if(IsStateManageDescendant(pXAcc))
+ {
+ return sal_True;
+ }
+ }
+
+ int count = pRContext->getAccessibleChildCount();
+ for (int i=0;i<count;i++)
+ {
+ Reference<XAccessible> mxAccessible
+ = pRContext->getAccessibleChild(i);
+ XAccessible* mpAccessible = mxAccessible.get();
+ if(mpAccessible != NULL)
+ {
+ InsertAccObj( mpAccessible,pXAcc,pWnd );
+ InsertChildrenAccObj(mpAccessible,pWnd);
+ }
+ }
+
+ return sal_True;
+}
+
+/**
+ * Insert child object.
+ * @param pCurObj The child object
+ * @param pParentObj The parant object
+ * @param pWnd Top window handle.
+ * @return
+ */
+void AccObjectWinManager::InsertAccChildNode( AccObject* pCurObj, AccObject* pParentObj, HWND /* pWnd */ )
+{
+ if(pCurObj)
+ {
+ if(pParentObj)
+ {
+ pParentObj->InsertChild(pCurObj);
+ }
+ else
+ {
+ pCurObj->UpdateValidWindow();
+ }
+ }
+}
+
+/**
+ * Insert child object.
+ * @param pCurObj The child object
+ * @param pParentObj The parant object
+ * @param pWnd Top window handle.
+ * @return
+ */
+sal_Bool AccObjectWinManager::InsertAccObj( XAccessible* pXAcc,XAccessible* pParentXAcc,HWND pWnd )
+{
+ XIdToAccObjHash::iterator itXacc = XIdAccList.find( (void*)pXAcc );
+ if (itXacc != XIdAccList.end() )
+ {
+ short nCurRole =GetRole(pXAcc);
+ if (AccessibleRole::SHAPE == nCurRole)
+ {
+ AccObject &objXacc = itXacc->second;
+ AccObject *pObjParent = objXacc.GetParentObj();
+ if (pObjParent &&
+ pObjParent->GetXAccessible().is() &&
+ pObjParent->GetXAccessible().get() != pParentXAcc)
+ {
+ XIdToAccObjHash::iterator itXaccParent = XIdAccList.find( (void*)pParentXAcc );
+ if(itXaccParent != XIdAccList.end())
+ {
+ objXacc.SetParentObj(&(itXaccParent->second));
+ }
+ }
+ }
+ return sal_False;
+ }
+
+
+ Reference< XAccessibleContext > pRContext;
+
+ if( pXAcc == NULL)
+ return sal_False;
+
+ pRContext = pXAcc->getAccessibleContext();
+ if( !pRContext.is() )
+ return sal_False;
+
+ if( pWnd == NULL )
+ {
+ if(pParentXAcc)
+ {
+ AccObject* pObj = GetAccObjByXAcc(pParentXAcc);
+ if(pObj)
+ pWnd = pObj->GetParentHWND();
+ }
+ if( pWnd == NULL )
+ return sal_False;
+ }
+
+ AccObject pObj( pXAcc,pAgent );
+ if( pObj.GetIMAccessible() == NULL )
+ return sal_False;
+ pObj.SetResID( this->ImpleGenerateResID());
+ pObj.SetParentHWND( pWnd );
+
+ //for file name support
+ if ( pObj.GetRole() == DOCUMENT )
+ {
+ XHWNDToDocumentHash::iterator aIter = XHWNDDocList.find( (long)pWnd );
+ if ( aIter != XHWNDDocList.end() )
+ {
+ XHWNDDocList.erase( aIter );
+ }
+ XHWNDDocList.insert( XHWNDToDocumentHash::value_type( (long)pWnd, pXAcc ) );
+
+ }
+ //end of file name
+
+ AccEventListener* listener = createAccEventListener(pXAcc, pAgent);
+ if(listener==NULL)
+ return sal_False;
+ Reference<XAccessibleComponent> xComponent(pRContext,UNO_QUERY);
+ Reference<XAccessibleEventBroadcaster> broadcaster(xComponent,UNO_QUERY);
+ if (broadcaster.is())
+ {
+ Reference <XAccessibleEventListener> pp (
+ static_cast< XAccessibleEventListener* >(listener),UNO_QUERY );
+ if(pp.is())
+ {
+ broadcaster->addEventListener(pp);
+ }
+ else
+ {
+ delete listener;
+ return sal_False;
+ }
+ }
+ else
+ return sal_False;
+
+ XIdAccList.insert( XIdToAccObjHash::value_type( (void*)pXAcc, pObj ));
+ XIdToAccObjHash::iterator pIndTemp = XIdAccList.find( (void*)pXAcc );
+ XResIdAccList.insert(XResIdToAccObjHash::value_type(pObj.GetResID(),&(pIndTemp->second)));
+
+ AccObject* pCurObj = GetAccObjByXAcc(pXAcc);
+ if( pCurObj )
+ {
+ pCurObj->SetListener( listener );
+ if(listener != NULL)
+ listener->acquire();
+ }
+
+ AccObject* pParentObj = GetAccObjByXAcc(pParentXAcc);
+ InsertAccChildNode(pCurObj,pParentObj,pWnd);
+ if( pCurObj )
+ pCurObj->UpdateAccessibleInfoFromUnoToMSAA();
+ return sal_True;
+}
+
+
+/**
+ * save the pair <topwindowhandle, XAccessible>
+ * @param hWnd, top window handle
+ * @param pXAcc XAccessible interface for top window
+ * @return void
+ */
+void AccObjectWinManager::SaveTopWindowHandle(HWND hWnd, com::sun::star::accessibility::XAccessible* pXAcc)
+{
+ HwndXAcc.insert( XHWNDToXAccHash::value_type( hWnd,(void*)pXAcc ) );
+}
+
+
+/**
+ * create the corresponding listener.
+ * @param pXAcc XAccessible interface.
+ * @param Agent The agent kept in all listeners,it's the sole interface by which
+ * listener communicate with windows manager.
+ * @return
+ */
+AccEventListener* AccObjectWinManager::createAccEventListener(XAccessible* pXAcc, AccObjectManagerAgent* /* Agent */ )
+{
+ AccEventListener* listener = NULL;
+ Reference<XAccessibleContext> xContext(pXAcc->getAccessibleContext(),UNO_QUERY);
+ if(xContext.is())
+ {
+ switch( xContext->getAccessibleRole() )
+ {
+ case /*AccessibleRole::*/DIALOG:
+ listener = new AccDialogEventListener(pXAcc,pAgent);
+ break;
+ case /*AccessibleRole::*/FRAME:
+ listener = new AccFrameEventListener(pXAcc,pAgent);
+ break;
+ case /*AccessibleRole::*/WINDOW:
+ listener = new AccWindowEventListener(pXAcc,pAgent);
+ break;
+ case /*AccessibleRole::*/ROOT_PANE:
+ listener = new AccFrameEventListener(pXAcc,pAgent);
+ break;
+ //Container
+ case /*AccessibleRole::*/CANVAS:
+ case /*AccessibleRole::*/COMBO_BOX:
+ case /*AccessibleRole::*/DOCUMENT:
+ case /*AccessibleRole::*/END_NOTE:
+ case /*AccessibleRole::*/FILLER:
+ case /*AccessibleRole::*/FOOTNOTE:
+ case /*AccessibleRole::*/FOOTER:
+ case /*AccessibleRole::*/HEADER:
+ case /*AccessibleRole::*/LAYERED_PANE:
+ case /*AccessibleRole::*/MENU_BAR:
+ case /*AccessibleRole::*/POPUP_MENU:
+ case /*AccessibleRole::*/OPTION_PANE:
+ case /*AccessibleRole::*/PAGE_TAB:
+ case /*AccessibleRole::*/PAGE_TAB_LIST:
+ case /*AccessibleRole::*/PANEL:
+ case /*AccessibleRole::*/SCROLL_PANE:
+ case /*AccessibleRole::*/SPLIT_PANE:
+ case /*AccessibleRole::*/STATUS_BAR:
+ case /*AccessibleRole::*/TABLE_CELL:
+ case /*AccessibleRole::*/TOOL_BAR:
+ case /*AccessibleRole::*/VIEW_PORT:
+ listener = new AccContainerEventListener(pXAcc,pAgent);
+ break;
+ case /*AccessibleRole::*/PARAGRAPH:
+ case /*AccessibleRole::*/HEADING:
+ listener = new AccParagraphEventListener(pXAcc,pAgent);
+ break;
+ //Component
+ case /*AccessibleRole::*/CHECK_BOX:
+ case /*AccessibleRole::*/ICON:
+ case /*AccessibleRole::*/LABEL:
+ case /*AccessibleRole::*/MENU_ITEM:
+ case /*AccessibleRole::*/CHECK_MENU_ITEM:
+ case /*AccessibleRole::*/RADIO_MENU_ITEM:
+ case /*AccessibleRole::*/PUSH_BUTTON:
+ case /*AccessibleRole::*/RADIO_BUTTON:
+ case /*AccessibleRole::*/SCROLL_BAR:
+ case /*AccessibleRole::*/SEPARATOR:
+ case /*AccessibleRole::*/TOGGLE_BUTTON:
+ case /*AccessibleRole::*/BUTTON_DROPDOWN:
+ case /*AccessibleRole::*/TOOL_TIP:
+ case /*AccessibleRole::*/SPIN_BOX:
+ case DATE_EDITOR:
+ listener = new AccComponentEventListener(pXAcc,pAgent);
+ break;
+ //text component
+ case /*AccessibleRole::*/TEXT:
+ listener = new AccTextComponentEventListener(pXAcc,pAgent);
+ break;
+ //menu
+ case /*AccessibleRole::*/MENU:
+ listener = new AccMenuEventListener(pXAcc,pAgent);
+ break;
+ //object container
+ case /*AccessibleRole::*/SHAPE:
+
+ case /*AccessibleRole::*/EMBEDDED_OBJECT:
+ case /*AccessibleRole::*/GRAPHIC:
+ case /*AccessibleRole::*/TEXT_FRAME:
+ listener = new AccObjectContainerEventListener(pXAcc,pAgent);
+ break;
+ //descendmanager
+ case /*AccessibleRole::*/LIST:
+ listener = new AccListEventListener(pXAcc,pAgent);
+ break;
+ case /*AccessibleRole::*/TREE:
+ listener = new AccTreeEventListener(pXAcc,pAgent);
+ break;
+ //special
+ case /*AccessibleRole::*/COLUMN_HEADER:
+ case /*AccessibleRole::*/TABLE:
+ listener = new AccTableEventListener(pXAcc,pAgent);
+ break;
+ default:
+ listener = new AccContainerEventListener(pXAcc,pAgent);
+ break;
+ }
+ }
+
+ return listener;
+}
+
+/**
+ * state is a combination integer, each bit of which represents a single state,
+ * such as focused,1 for the state on,0 for the state off. Here call COM interface
+ * to modify the state value, including DecreaseState.
+ * @param pXAcc XAccessible interface.
+ * @param pState Changed state.
+ * @return
+ */
+void AccObjectWinManager::DecreaseState( XAccessible* pXAcc,unsigned short pState )
+{
+ AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
+ if( pAccObj )
+ pAccObj->DecreaseState( pState );
+}
+
+/**
+ * state is a combination integer, each bit of which represents a single state,such as focused,1 for
+ * the state on,0 for the state off. Here call COM interface to modify the state value, including
+ * IncreaseState.
+ * @param pXAcc XAccessible interface.
+ * @param pState Changed state.
+ * @return
+ */
+void AccObjectWinManager::IncreaseState( XAccessible* pXAcc,unsigned short pState )
+{
+ AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
+ if( pAccObj )
+ pAccObj->IncreaseState( pState );
+}
+
+void AccObjectWinManager::UpdateState( com::sun::star::accessibility::XAccessible* pXAcc )
+{
+ AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
+ if( pAccObj )
+ pAccObj->UpdateState( );
+}
+
+/**
+ * Set corresponding com object's accessible name via XAccessilbe interface and new
+ * name
+ * @param pXAcc XAccessible interface.
+ * @return
+ */
+void AccObjectWinManager::UpdateAccName( XAccessible* pXAcc )
+{
+ AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
+ if( pAccObj )
+ pAccObj->UpdateName();
+}
+
+void AccObjectWinManager::UpdateAction( XAccessible* pXAcc )
+{
+ AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
+ if( pAccObj )
+ pAccObj->UpdateAction();
+}
+
+void AccObjectWinManager::UpdateDescription( XAccessible* pXAcc )
+{
+ AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
+ if ( pAccObj )
+ pAccObj->UpdateDescription();
+}
+
+/**
+ * Set corresponding com object's accessible location via XAccessilbe interface and new
+ * location.
+ * @param pXAcc XAccessible interface.
+ * @return
+ */
+void AccObjectWinManager::SetLocation( XAccessible* pXAcc, long /*top*/, long /*left*/, long /*width*/, long /*height*/ )
+{
+ AccObject* pObj = GetAccObjByXAcc( pXAcc );
+ //get the location from XComponent.
+ Reference< XAccessibleContext > pRContext = pXAcc->getAccessibleContext();
+ if( pObj )
+ pObj->UpdateLocation();
+}
+
+/**
+ * Set corresponding com object's value via XAccessilbe interface and new value.
+ * @param pXAcc XAccessible interface.
+ * @param pAny new value.
+ * @return
+ */
+void AccObjectWinManager::SetValue( XAccessible* pXAcc, Any pAny )
+{
+ AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
+ if( pAccObj )
+ pAccObj->SetValue( pAny );
+}
+
+/**
+ * Set corresponding com object's value via XAccessilbe interface.
+ * @param pXAcc XAccessible interface.
+ * @return
+ */
+void AccObjectWinManager::UpdateValue( XAccessible* pXAcc )
+{
+ AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
+ if( pAccObj )
+ pAccObj->UpdateValue();
+}
+
+/**
+ * Set corresponding com object's name via XAccessilbe interface and new name.
+ * @param pXAcc XAccessible interface.
+ * @param newName new name
+ * @return
+ */
+void AccObjectWinManager::SetAccName( XAccessible* pXAcc, Any newName)
+{
+ AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
+ if( pAccObj )
+ pAccObj->SetName( newName );
+}
+
+/**
+ * Set corresponding com object's description via XAccessilbe interface and new description.
+ * @param pXAcc XAccessible interface.
+ * @param newDesc new description
+ * @return
+ */
+void AccObjectWinManager::SetDescription( XAccessible* pXAcc, Any newDesc )
+{
+ AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
+ if( pAccObj )
+ pAccObj->SetDescription( newDesc );
+}
+
+/**
+ * Set corresponding com object's role via XAccessilbe interface and new role.
+ * @param pXAcc XAccessible interface.
+ * @param Role new role
+ * @return
+ */
+void AccObjectWinManager::SetRole( XAccessible* pXAcc, long Role )
+{
+ AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
+ if( pAccObj )
+ pAccObj->SetRole( (short)Role );
+}
+
+/**
+ * Judge if a XAccessible object is a container object.
+ * @param pAccessible XAccessible interface.
+ * @return If XAccessible object is container.
+ */
+sal_Bool AccObjectWinManager::IsContainer(XAccessible* pAccessible)
+{
+ try
+ {
+ if(pAccessible)
+ {
+ Reference<XAccessibleContext> xContext(pAccessible->getAccessibleContext(),UNO_QUERY);
+ if(xContext.is())
+ {
+ switch( xContext->getAccessibleRole() )
+ {
+ case /*AccessibleRole::*/DIALOG:
+ case /*AccessibleRole::*/FRAME:
+ case /*AccessibleRole::*/WINDOW:
+ case /*AccessibleRole::*/ROOT_PANE:
+ case /*AccessibleRole::*/CANVAS:
+ case /*AccessibleRole::*/COMBO_BOX:
+ case /*AccessibleRole::*/DOCUMENT:
+ case /*AccessibleRole::*/EMBEDDED_OBJECT:
+ case /*AccessibleRole::*/END_NOTE:
+ case /*AccessibleRole::*/FILLER:
+ case /*AccessibleRole::*/FOOTNOTE:
+ case /*AccessibleRole::*/FOOTER:
+ case /*AccessibleRole::*/GRAPHIC:
+ case /*AccessibleRole::*/GROUP_BOX:
+ case /*AccessibleRole::*/HEADER:
+ case /*AccessibleRole::*/LAYERED_PANE:
+ case /*AccessibleRole::*/MENU_BAR:
+ case /*AccessibleRole::*/POPUP_MENU:
+ case /*AccessibleRole::*/OPTION_PANE:
+ case /*AccessibleRole::*/PAGE_TAB:
+ case /*AccessibleRole::*/PAGE_TAB_LIST:
+ case /*AccessibleRole::*/PANEL:
+ case /*AccessibleRole::*/SCROLL_PANE:
+ case /*AccessibleRole::*/SPLIT_PANE:
+ case /*AccessibleRole::*/STATUS_BAR:
+ case /*AccessibleRole::*/TABLE_CELL:
+ case /*AccessibleRole::*/TEXT_FRAME:
+ case /*AccessibleRole::*/TOOL_BAR:
+ case /*AccessibleRole::*/VIEW_PORT:
+ case /*AccessibleRole::*/SHAPE:
+ return sal_True;
+ break;
+ case /*AccessibleRole::*/COLUMN_HEADER:
+ case /*AccessibleRole::*/TABLE:
+ if(!IsStateManageDescendant(pAccessible))
+ return sal_True;
+ break;
+ case /*AccessibleRole::*/MENU:
+ return sal_True;
+ break;
+ default:
+ return sal_False;
+ }
+ }
+ }
+ }
+ catch(...)
+ {
+ return sal_False;
+ }
+ return sal_False;
+}
+
+/**
+ * Judge if a XAccessible object has ManageDescendant event.
+ * @param pAccessible XAccessible interface.
+ * @return If XAccessible object is managedescendant.
+ */
+bool AccObjectWinManager::IsStateManageDescendant(XAccessible* pAccessible)
+{
+ if(pAccessible)
+ {
+ Reference<XAccessibleContext> xContext(pAccessible->getAccessibleContext(),UNO_QUERY);
+ if(xContext.is())
+ {
+ Reference< XAccessibleStateSet > pRState = xContext->getAccessibleStateSet();
+ if( !pRState.is() )
+ return sal_False;
+
+ Sequence<short> pStates = pRState->getStates();
+ int count = pStates.getLength();
+ for( int iIndex = 0;iIndex < count;iIndex++ )
+ {
+ if(pStates[iIndex] == /*AccessibleStateType::*/MANAGES_DESCENDANTS)
+ return sal_True;
+ }
+ }
+ }
+ return sal_False;
+}
+
+/**
+ * Query and get IAccessible interface by XAccessible interface from list.
+ * @param pXAcc XAccessible interface.
+ * @return Com accobject interface.
+ */
+IMAccessible* AccObjectWinManager::GetIMAccByXAcc(XAccessible* pXAcc)
+{
+ AccObject* pAccObj = GetAccObjByXAcc(pXAcc);
+ if(pAccObj)
+ {
+ return pAccObj->GetIMAccessible();
+ }
+ else
+ {
+ return NULL;
+ }
+}
+
+/**
+ * Query and get IAccessible interface by child id from list.
+ * @param resID, childID.
+ * @return Com accobject interface.
+ */
+IMAccessible * AccObjectWinManager::GetIAccessibleFromResID(long resID)
+{
+ XResIdToAccObjHash::iterator pIndTemp = XResIdAccList.find( resID );
+ if ( pIndTemp == XResIdAccList.end() )
+ return NULL;
+
+ AccObject* pObj = pIndTemp->second;
+
+ if(pObj->GetIMAccessible())
+ return pObj->GetIMAccessible();
+ return NULL;
+}
+/**
+ * Notify some object will be destroyed.
+ * @param pXAcc XAccessible interface.
+ * @return Com accobject interface.
+ */
+void AccObjectWinManager::NotifyDestroy(XAccessible* pXAcc)
+{
+ AccObject* accObj = GetAccObjByXAcc(pXAcc);
+ if(accObj)
+ {
+ accObj->NotifyDestroy(sal_True);
+ }
+}
+
+
+void AccObjectWinManager::UpdateChildState(com::sun::star::accessibility::XAccessible* pAccSubMenu)
+{
+ Reference<com::sun::star::accessibility::XAccessibleContext> xContext(pAccSubMenu,UNO_QUERY);
+ if (!xContext.is())
+ {
+ return;
+ }
+ sal_Int32 nCount = xContext->getAccessibleChildCount();
+ for (sal_Int32 i = 0 ; i < nCount ; ++i)
+ {
+ Reference<com::sun::star::accessibility::XAccessible> xChild = xContext->getAccessibleChild(i);
+ if (xChild.is())
+ {
+ AccObject *pObj = GetAccObjByXAcc(xChild.get());
+ if (pObj)
+ {
+ pObj->UpdateState();
+ }
+ }
+ }
+}
+
+
+bool AccObjectWinManager::IsSpecialToolboItem(com::sun::star::accessibility::XAccessible* pXAcc)
+{
+ if (pXAcc && oldFocus != pXAcc)
+ {
+ if(GetParentRole(pXAcc) == TOOL_BAR)
+ {
+ Reference< XAccessibleContext > pRContext(pXAcc->getAccessibleContext());
+ if (pRContext.is())
+ {
+ if(pRContext->getAccessibleRole() == TOGGLE_BUTTON)
+ {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+short AccObjectWinManager::GetRole(com::sun::star::accessibility::XAccessible* pXAcc)
+{
+ assert(pXAcc != NULL);
+ Reference<com::sun::star::accessibility::XAccessibleContext> xContext(pXAcc->getAccessibleContext(),UNO_QUERY);
+ if(xContext.is())
+ {
+ return xContext->getAccessibleRole();
+ }
+ return -1;
+}
+
+XAccessible* AccObjectWinManager::GetAccDocByHWND( long pWnd )
+{
+ XHWNDToDocumentHash::iterator aIter;
+ aIter = XHWNDDocList.find( pWnd );
+ if ( aIter != XHWNDDocList.end() )
+ {
+ return aIter->second;
+ }
+
+ return NULL;
+}
+
+XAccessible* AccObjectWinManager::GetAccDocByAccTopWin( XAccessible* pXAcc )
+{
+ AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
+ long pWnd = (long)( pAccObj->GetParentHWND() );
+ return GetAccDocByHWND( pWnd );
+}
+
+bool AccObjectWinManager::IsTopWinAcc( com::sun::star::accessibility::XAccessible* pXAcc )
+{
+ bool bRet = false;
+ AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
+ if ( pAccObj )
+ {
+ bRet = ( pAccObj->GetParentObj() == NULL );
+ }
+ return bRet;
+} \ No newline at end of file
diff --git a/winaccessibility/source/service/AccParagraphEventListener.cxx b/winaccessibility/source/service/AccParagraphEventListener.cxx
new file mode 100644
index 000000000000..fbbc8753b986
--- /dev/null
+++ b/winaccessibility/source/service/AccParagraphEventListener.cxx
@@ -0,0 +1,145 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+
+#include "AccParagraphEventListener.hxx"
+#include "AccObjectManagerAgent.hxx"
+#include "unomsaaevent.hxx"
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+
+AccParagraphEventListener::AccParagraphEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent)
+ :AccContainerEventListener(pAcc, Agent)
+{}
+AccParagraphEventListener::~AccParagraphEventListener()
+{
+}
+
+/**
+ * Uno's event notifier when event is captured
+ * @param AccessibleEventObject the event object which contains information about event
+ */
+void AccParagraphEventListener::notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
+throw (::com::sun::star::uno::RuntimeException)
+{
+ switch (aEvent.EventId)
+ {
+ case AccessibleEventId::CARET_CHANGED:
+ handleCaretChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::VISIBLE_DATA_CHANGED:
+ handleVisibleDataChangedEvent();
+ break;
+ case AccessibleEventId::BOUNDRECT_CHANGED:
+ handleBoundrectChangedEvent();
+ break;
+ //Added for paragraph selected state.
+ case AccessibleEventId::STATE_CHANGED:
+ {
+ short State;
+ if( (aEvent.NewValue >>= State) && (State == AccessibleStateType::SELECTED) )
+ {
+ pAgent->IncreaseState( pAccessible, State);
+ break;
+ }
+ else if( (aEvent.OldValue >>= State) && (State == AccessibleStateType::SELECTED) )
+ {
+ pAgent->DecreaseState( pAccessible, State);
+ break;
+ }
+
+ AccContainerEventListener::notifyEvent(aEvent);
+ break;
+ }
+
+ case AccessibleEventId::TEXT_SELECTION_CHANGED:
+ handleTextSelectionChangedEvent();
+ break;
+
+ default:
+ AccContainerEventListener::notifyEvent(aEvent);
+ break;
+ }
+}
+
+/**
+ * handle the CARET_CHANGED event
+ * @param oldValue in UNO, this parameter is always NULL
+ * @param newValue in UNO, this parameter is always NULL
+ */
+void AccParagraphEventListener::handleCaretChangedEvent(Any oldValue, Any newValue)
+{
+ pAgent->UpdateLocation(pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_CARETCHANGE, pAccessible);
+}
+
+/**
+ * handle the VISIBLE_DATA_CHANGED event
+ */
+void AccParagraphEventListener::handleVisibleDataChangedEvent()
+{
+ AccEventListener::handleVisibleDataChangedEvent();
+}
+
+/**
+ * handle the BOUNDRECT_CHANGED event
+ */
+void AccParagraphEventListener::handleBoundrectChangedEvent()
+{
+ AccEventListener::handleBoundrectChangedEvent();
+}
+
+/**
+ * set the new state and fire the MSAA event
+ * @param state new state id
+ * @param enable true if state is set, false if state is unset
+ */
+void AccParagraphEventListener::setComponentState(short state, bool enable )
+{
+ // only the following state can be fired state event.
+ switch (state)
+ {
+ case AccessibleStateType::EDITABLE:
+ // no msaa state
+ break;
+ case AccessibleStateType::MULTI_LINE:
+ // no msaa state mapping
+ break;
+ case AccessibleStateType::SINGLE_LINE:
+ // no msaa state mapping
+ break;
+ default:
+ AccContainerEventListener::setComponentState(state, enable);
+ break;
+ }
+}
+
+void AccParagraphEventListener::handleTextSelectionChangedEvent()
+{
+ pAgent->NotifyAccEvent(UM_EVENT_TEXT_SELECTION_CHANGED, pAccessible);
+}
+
diff --git a/winaccessibility/source/service/AccResource.cxx b/winaccessibility/source/service/AccResource.cxx
new file mode 100644
index 000000000000..374da6baf0af
--- /dev/null
+++ b/winaccessibility/source/service/AccResource.cxx
@@ -0,0 +1,85 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "AccResource.hxx"
+
+#include <tools/simplerm.hxx>
+
+// ---- needed as long as we have no contexts for components ---
+#include <vcl/svapp.hxx>
+
+//2009.04. Comment the following code because the acc resource is not necessary now. Can open them if necessary
+//#ifndef _TOOLS_INTN_HXX
+//#include <tools/intn.hxx>
+//#endif
+//#ifndef _SOLAR_HRC
+//#include <svtools/solar.hrc>
+//#endif
+
+//.........................................................................
+
+//==================================================================
+//= ResourceManager
+//==================================================================
+SimpleResMgr* ResourceManager::m_pImpl = NULL;
+
+//------------------------------------------------------------------
+ResourceManager::EnsureDelete::~EnsureDelete()
+{
+ delete ResourceManager::m_pImpl;
+}
+
+//------------------------------------------------------------------
+void ResourceManager::ensureImplExists()
+{
+ //Comment the following code because the acc resource is not necessary now. Can open them if necessary
+ /*
+ if (m_pImpl)
+ return;
+
+ LanguageType nType = Application::GetSettings().GetUILanguage();
+
+ ByteString sFileName("winaccessibility");
+ sFileName += ByteString::CreateFromInt32( (sal_Int32)SOLARUPD );
+
+ m_pImpl = SimpleResMgr::Create(sFileName.GetBuffer(), nType);
+
+ if (m_pImpl)
+ {
+ // no that we have a impl class make sure it's deleted on unloading the library
+ static ResourceManager::EnsureDelete s_aDeleteTheImplClas;
+ }
+ */
+}
+
+//------------------------------------------------------------------
+::rtl::OUString ResourceManager::loadString(sal_uInt16 _nResId)
+{
+ ::rtl::OUString sReturn;
+
+ ensureImplExists();
+ if (m_pImpl)
+ sReturn = m_pImpl->ReadString(_nResId);
+
+ return sReturn;
+}
+
+
diff --git a/winaccessibility/source/service/AccTableEventListener.cxx b/winaccessibility/source/service/AccTableEventListener.cxx
new file mode 100644
index 000000000000..4042a5412dae
--- /dev/null
+++ b/winaccessibility/source/service/AccTableEventListener.cxx
@@ -0,0 +1,146 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include <com/sun/star/accessibility/AccessibleTableModelChange.hpp>
+
+#include "AccTableEventListener.hxx"
+#include "AccObjectManagerAgent.hxx"
+#include "unomsaaevent.hxx"
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+
+AccTableEventListener::AccTableEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent)
+ :AccDescendantManagerEventListener(pAcc, Agent)
+{}
+AccTableEventListener::~AccTableEventListener()
+{
+}
+
+/**
+ * Uno's event notifier when event is captured
+ * @param AccessibleEventObject the event object which contains information about event
+ */
+void AccTableEventListener::notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
+throw (::com::sun::star::uno::RuntimeException)
+{
+ switch (aEvent.EventId)
+ {
+ case AccessibleEventId::ACTIVE_DESCENDANT_CHANGED:
+ handleActiveDescendantChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+
+ case AccessibleEventId::TABLE_CAPTION_CHANGED:
+ {
+
+ pAgent->NotifyAccEvent(UM_EVENT_TABLE_CAPTION_CHANGED, pAccessible);
+ break;
+ }
+ case AccessibleEventId::TABLE_COLUMN_DESCRIPTION_CHANGED:
+ {
+
+ pAgent->NotifyAccEvent(UM_EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED, pAccessible);
+ break;
+ }
+ case AccessibleEventId::TABLE_COLUMN_HEADER_CHANGED:
+ {
+
+ pAgent->NotifyAccEvent(UM_EVENT_TABLE_COLUMN_HEADER_CHANGED, pAccessible);
+ break;
+ }
+ case AccessibleEventId::TABLE_ROW_HEADER_CHANGED:
+ {
+
+ pAgent->NotifyAccEvent(UM_EVENT_TABLE_ROW_HEADER_CHANGED, pAccessible);
+ break;
+ }
+ case AccessibleEventId::TABLE_MODEL_CHANGED:
+ {
+
+ handleTableModelChangeEvent(aEvent.NewValue);
+ break;
+ }
+ case AccessibleEventId::TABLE_SUMMARY_CHANGED:
+ {
+
+ pAgent->NotifyAccEvent(UM_EVENT_TABLE_SUMMARY_CHANGED, pAccessible);
+ break;
+ }
+ case AccessibleEventId::TABLE_ROW_DESCRIPTION_CHANGED:
+ {
+
+ pAgent->NotifyAccEvent(UM_EVENT_TABLE_ROW_DESCRIPTION_CHANGED, pAccessible);
+ break;
+ }
+ default:
+ AccDescendantManagerEventListener::notifyEvent(aEvent);
+ break;
+ }
+}
+
+/**
+ * handle the ACTIVE_DESCENDANT_CHANGED event
+ * @param oldValue the child to lose active
+ * @param newValue the child to get active
+ */
+void AccTableEventListener::handleActiveDescendantChangedEvent(Any oldValue, Any newValue)
+{
+ Reference< XAccessible > xChild;
+ if(newValue >>= xChild )
+ {
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ pAgent->InsertAccObj(pAcc,pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_ACTIVE_DESCENDANT_CHANGED, pAcc);
+ }
+ }
+ else if (oldValue >>= xChild)
+ {
+ //delete an existing child
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ pAgent->DeleteAccObj( pAcc );
+ }
+ }
+
+}
+void AccTableEventListener::handleTableModelChangeEvent(Any newValue)
+{
+ AccessibleTableModelChange aModelChange;
+ if (newValue >>= aModelChange)
+ {
+ if( pAccessible )
+ {
+ //delete all oldValue's existing children
+ pAgent->DeleteChildrenAccObj( pAccessible );
+ //add all oldValue's existing children
+ pAgent->InsertChildrenAccObj( pAccessible );
+ }
+ pAgent->NotifyAccEvent(UM_EVENT_TABLE_MODEL_CHANGED, pAccessible);
+ }
+}
diff --git a/winaccessibility/source/service/AccTextComponentEventListener.cxx b/winaccessibility/source/service/AccTextComponentEventListener.cxx
new file mode 100644
index 000000000000..2d8254b144da
--- /dev/null
+++ b/winaccessibility/source/service/AccTextComponentEventListener.cxx
@@ -0,0 +1,65 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+
+#include "AccTextComponentEventListener.hxx"
+#include "AccObjectManagerAgent.hxx"
+#include "unomsaaevent.hxx"
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+
+AccTextComponentEventListener::AccTextComponentEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent)
+ :AccComponentEventListener(pAcc, Agent)
+{}
+AccTextComponentEventListener::~AccTextComponentEventListener()
+{
+}
+
+/**
+ * set the new state and fire the MSAA event
+ * @param state new state id
+ * @param enable true if state is set, false if state is unset
+ */
+void AccTextComponentEventListener::setComponentState(short state, bool enable )
+{
+ // only the following state can be fired state event.
+ switch (state)
+ {
+ case AccessibleStateType::EDITABLE:
+ // no msaa state mapping
+ break;
+ case AccessibleStateType::MULTI_LINE:
+ // no msaa state mapping
+ break;
+ case AccessibleStateType::SINGLE_LINE:
+ // no msaa state mapping
+ break;
+ default:
+ AccComponentEventListener::setComponentState(state, enable);
+ break;
+ }
+}
diff --git a/winaccessibility/source/service/AccTopWindowListener.cxx b/winaccessibility/source/service/AccTopWindowListener.cxx
new file mode 100644
index 000000000000..2cf92bcdb757
--- /dev/null
+++ b/winaccessibility/source/service/AccTopWindowListener.cxx
@@ -0,0 +1,321 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <cppuhelper/bootstrap.hxx>
+#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <vcl/window.hxx>
+#include <toolkit/awt/Vclxwindow.hxx>
+
+#ifndef _SV_SYSDATA_HXX
+#if defined( WIN ) || defined( WNT ) || defined( OS2 )
+typedef sal_Int32 HWND;
+typedef sal_Int32 HMENU;
+typedef sal_Int32 HDC;
+typedef void *PVOID;
+typedef PVOID HANDLE;
+typedef HANDLE HFONT;
+#endif
+#include <vcl/sysdata.hxx>
+#endif
+
+#include "AccTopWindowListener.hxx"
+#include "unomsaaevent.hxx"
+
+#include <com/sun/star/awt/XExtendedToolkit.hpp>
+#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::lang;
+using namespace com::sun::star::bridge;
+using namespace com::sun::star::awt;
+using namespace rtl;
+using namespace cppu;
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+AccTopWindowListener* g_pTop = NULL;
+//when proccess exit, call FreeTopWindowListener() in svmain
+void FreeTopWindowListener()
+{
+ if( g_pTop )
+ {
+ g_pTop->release();
+ g_pTop = NULL;
+ }
+}
+
+/**
+ * As a global method to invoke the handleWindowOpened() method
+ */
+void handleWindowOpened_impl(long pAcc)
+{
+ if( g_pTop && pAcc != NULL )
+ g_pTop->handleWindowOpened( (com::sun::star::accessibility::XAccessible*)((void*)pAcc) );
+}
+
+/**
+ * For the new opened window, generate all the UNO accessible's object, COM object and add
+ * accessible listener to monitor all these objects.
+ * @param pAccessible the accessible of the new opened window
+ */
+void AccTopWindowListener::handleWindowOpened( com::sun::star::accessibility::XAccessible* pAccessible )
+{
+ //get SystemData from window
+ VCLXWindow* pvclwindow = (VCLXWindow*)pAccessible;
+ Window* window = pvclwindow->GetWindow();
+ // The SalFrame of window may be destructed at this time
+ const SystemEnvData* systemdata = NULL;
+ try
+ {
+ systemdata = window->GetSystemData();
+ }
+ catch(...)
+ {
+ systemdata = NULL;
+ }
+ Reference<com::sun::star::accessibility::XAccessibleContext> xContext(pAccessible->getAccessibleContext(),UNO_QUERY);
+ if(!xContext.is())
+ {
+ return;
+ }
+ com::sun::star::accessibility::XAccessibleContext* pAccessibleContext = xContext.get();
+ //Only AccessibleContext exist, add all listeners
+ if(pAccessibleContext != NULL && systemdata != NULL)
+ {
+ accManagerAgent.SaveTopWindowHandle((HWND)systemdata->hWnd, pAccessible);
+
+ AddAllListeners(pAccessible,NULL,(HWND)systemdata->hWnd);
+
+ if( window->GetStyle() & WB_MOVEABLE )
+ accManagerAgent.IncreaseState( pAccessible, -1 /* U_MOVEBLE */ );
+
+ short role = pAccessibleContext->getAccessibleRole();
+
+
+ if (role == com::sun::star::accessibility::AccessibleRole::POPUP_MENU ||
+ role == com::sun::star::accessibility::AccessibleRole::MENU )
+ {
+ accManagerAgent.NotifyAccEvent(UM_EVENT_MENUPOPUPSTART, pAccessible);
+ }
+
+ if (role == com::sun::star::accessibility::AccessibleRole::FRAME ||
+ role == com::sun::star::accessibility::AccessibleRole::DIALOG ||
+ role == com::sun::star::accessibility::AccessibleRole::WINDOW ||
+ role == com::sun::star::accessibility::AccessibleRole::ALERT)
+ {
+ accManagerAgent.NotifyAccEvent(UM_EVENT_SHOW, pAccessible);
+ }
+ }
+}
+
+AccTopWindowListener::AccTopWindowListener():
+ accManagerAgent(),
+ m_refcount(1)
+{
+}
+
+AccTopWindowListener::~AccTopWindowListener()
+{
+}
+
+/**
+ * It is invoked when a new window is opened, the source of this EventObject is the window
+ */
+void AccTopWindowListener::windowOpened( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException)
+{
+ if ( !e.Source.is())
+ {
+ return;
+ }
+
+ Reference< com::sun::star::accessibility::XAccessible > xAccessible ( e.Source, UNO_QUERY );
+ com::sun::star::accessibility::XAccessible* pAccessible = xAccessible.get();
+ if ( pAccessible == NULL)
+ {
+ return;
+ }
+
+ handleWindowOpened(pAccessible);
+
+}
+
+/**
+ * Add the accessible event listener to object and all its children objects.
+ * @param pAccessible the accessible object
+ * @param pParentXAcc the parent of current accessible object
+ * @param pWND the handle of top window which current object resides
+ */
+void AccTopWindowListener::AddAllListeners(com::sun::star::accessibility::XAccessible* pAccessible, com::sun::star::accessibility::XAccessible* pParentXAcc, HWND pWND)
+{
+ Reference<com::sun::star::accessibility::XAccessibleContext> xContext(pAccessible->getAccessibleContext(),UNO_QUERY);
+ if(!xContext.is())
+ {
+ return;
+ }
+ com::sun::star::accessibility::XAccessibleContext* pAccessibleContext = xContext.get();
+ if(pAccessibleContext == NULL)
+ {
+ return;
+ }
+
+ accManagerAgent.InsertAccObj( pAccessible, pParentXAcc,pWND );
+
+ if (!accManagerAgent.IsContainer(pAccessible))
+ {
+ return;
+ }
+
+
+ short role = pAccessibleContext->getAccessibleRole();
+ if(com::sun::star::accessibility::AccessibleRole::DOCUMENT == role )
+ {
+ if(accManagerAgent.IsStateManageDescendant(pAccessible))
+ {
+ return ;
+ }
+ }
+
+
+ int count = pAccessibleContext->getAccessibleChildCount();
+ for (int i=0;i<count;i++)
+ {
+ Reference<com::sun::star::accessibility::XAccessible> mxAccessible
+ = pAccessibleContext->getAccessibleChild(i);
+
+ com::sun::star::accessibility::XAccessible* mpAccessible = mxAccessible.get();
+ if(mpAccessible != NULL)
+ {
+ Reference<com::sun::star::accessibility::XAccessibleContext> mxAccessibleContext
+ = mpAccessible->getAccessibleContext();
+ com::sun::star::accessibility::XAccessibleContext* mpContext = mxAccessibleContext.get();
+ if(mpContext != NULL)
+ {
+ //fprintf(output, "go on add child's children event listener\n");
+ AddAllListeners(mpAccessible,pAccessible,pWND);
+ }
+ }
+ }
+}
+
+void AccTopWindowListener::windowClosing( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException)
+{
+}
+
+/**
+ * Invoke this method when the top window is closed, remove all the objects and its children
+ * from current manager's cache, and remove the COM object and the accessible event listener
+ * assigned to the accessible objects.
+ */
+void AccTopWindowListener::windowClosed( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException)
+{
+ if ( !e.Source.is())
+ {
+ return;
+ }
+ Reference< com::sun::star::accessibility::XAccessible > xAccessible ( e.Source, UNO_QUERY );
+ com::sun::star::accessibility::XAccessible* pAccessible = xAccessible.get();
+ if ( pAccessible == NULL)
+ {
+ return;
+ }
+
+
+ VCLXWindow* pvclwindow = (VCLXWindow*)pAccessible;
+ Window* window = pvclwindow->GetWindow();
+ const SystemEnvData* systemdata=window->GetSystemData();
+
+ Reference<com::sun::star::accessibility::XAccessibleContext> xContext(pAccessible->getAccessibleContext(),UNO_QUERY);
+ if(!xContext.is())
+ {
+ return;
+ }
+ com::sun::star::accessibility::XAccessibleContext* pAccessibleContext = xContext.get();
+
+ short role = -1;
+ if(pAccessibleContext != NULL)
+ {
+ role = pAccessibleContext->getAccessibleRole();
+
+ if (role == com::sun::star::accessibility::AccessibleRole::POPUP_MENU ||
+ role == com::sun::star::accessibility::AccessibleRole::MENU)
+ {
+ accManagerAgent.NotifyAccEvent(UM_EVENT_MENUPOPUPEND, pAccessible);
+ }
+ }
+
+
+ accManagerAgent.DeleteChildrenAccObj( pAccessible );
+ if( role != com::sun::star::accessibility::AccessibleRole::POPUP_MENU )
+ accManagerAgent.DeleteAccObj( pAccessible );
+
+}
+
+void AccTopWindowListener::windowMinimized( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException)
+{
+}
+
+void AccTopWindowListener::windowNormalized( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException)
+{
+}
+
+void AccTopWindowListener::windowActivated( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException)
+{
+}
+
+void AccTopWindowListener::windowDeactivated( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException)
+{
+}
+
+void AccTopWindowListener::disposing( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException)
+{
+}
+
+//need to investigate further
+::com::sun::star::uno::Any SAL_CALL AccTopWindowListener::queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException)
+{
+ if (aType.equals( ::getCppuType( (Reference< com::sun::star::awt::XTopWindowListener> const *)0 ) ))
+ {
+ Reference< com::sun::star::awt::XTopWindowListener> xTopListener( static_cast< com::sun::star::awt::XTopWindowListener* >(this));
+ return makeAny(xTopListener);
+ }
+ return Any();
+}
+
+void AccTopWindowListener::acquire( ) throw ()
+{
+ ::osl_incrementInterlockedCount( &m_refcount );
+}
+
+void AccTopWindowListener::release() throw ()
+{
+ // thread-safe decrementation of reference count
+ if (0 == ::osl_decrementInterlockedCount( &m_refcount ))
+ {
+ delete this; // shutdown this object
+ }
+}
diff --git a/winaccessibility/source/service/AccTreeEventListener.cxx b/winaccessibility/source/service/AccTreeEventListener.cxx
new file mode 100644
index 000000000000..6cde4e5979e0
--- /dev/null
+++ b/winaccessibility/source/service/AccTreeEventListener.cxx
@@ -0,0 +1,87 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+
+#include "AccTreeEventListener.hxx"
+#include "AccObjectManagerAgent.hxx"
+#include "unomsaaevent.hxx"
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+
+AccTreeEventListener::AccTreeEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent)
+ :AccDescendantManagerEventListener(pAcc, Agent)
+{}
+AccTreeEventListener::~AccTreeEventListener()
+{
+}
+
+/**
+ * Uno's event notifier when event is captured
+ * @param AccessibleEventObject the event object which contains information about event
+ */
+void AccTreeEventListener::notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException)
+{
+ switch (aEvent.EventId)
+ {
+ case AccessibleEventId::ACTIVE_DESCENDANT_CHANGED:
+ handleActiveDescendantChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ default:
+ AccDescendantManagerEventListener::notifyEvent(aEvent);
+ break;
+ }
+}
+
+/**
+ * handle the ACTIVE_DESCENDANT_CHANGED event
+ * @param oldValue the child to lose active
+ * @param newValue the child to get active
+ */
+void AccTreeEventListener::handleActiveDescendantChangedEvent(Any oldValue, Any newValue)
+{
+ Reference< XAccessible > xChild;
+ if(newValue >>= xChild )
+ {
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ pAgent->InsertAccObj(pAcc,pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_ACTIVE_DESCENDANT_CHANGED, pAcc);
+ pActiveDescendant = pAcc;
+ }
+ }
+ if (oldValue >>= xChild)
+ {
+ //delete an existing child
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ pAgent->DeleteAccObj( pAcc );
+ }
+ }
+
+}
diff --git a/winaccessibility/source/service/AccWindowEventListener.cxx b/winaccessibility/source/service/AccWindowEventListener.cxx
new file mode 100644
index 000000000000..7f9e3ba99494
--- /dev/null
+++ b/winaccessibility/source/service/AccWindowEventListener.cxx
@@ -0,0 +1,152 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+
+#include "AccWindowEventListener.hxx"
+#include "AccObjectManagerAgent.hxx"
+#include "unomsaaevent.hxx"
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+
+AccWindowEventListener::AccWindowEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent)
+ :AccEventListener(pAcc, Agent)
+{}
+AccWindowEventListener::~AccWindowEventListener()
+{
+}
+
+/**
+ * Uno's event notifier when event is captured
+ * @param AccessibleEventObject: the event object which contains information about event
+ */
+void AccWindowEventListener::notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException)
+{
+ switch (aEvent.EventId)
+ {
+ case AccessibleEventId::CHILD:
+ handleChildChangedEvent(aEvent.OldValue, aEvent.NewValue);
+ break;
+ case AccessibleEventId::VISIBLE_DATA_CHANGED:
+ handleVisibleDataChangedEvent();
+ break;
+ case AccessibleEventId::BOUNDRECT_CHANGED:
+ handleBoundrectChangedEvent();
+ break;
+ default:
+ AccEventListener::notifyEvent(aEvent);
+ break;
+ }
+}
+
+/**
+ * handle the VISIBLE_DATA_CHANGED event
+ */
+void AccWindowEventListener::handleVisibleDataChangedEvent()
+{
+ AccEventListener::handleVisibleDataChangedEvent();
+}
+
+/**
+ * handle the BOUNDRECT_CHANGED event
+ */
+void AccWindowEventListener::handleBoundrectChangedEvent()
+{
+ AccEventListener::handleBoundrectChangedEvent();
+}
+
+/**
+ * handle the CHILD event
+ * @param oldValue the child to be deleted
+ * @param newValue the child to be added
+ */
+void AccWindowEventListener::handleChildChangedEvent(Any oldValue, Any newValue)
+{
+ Reference< XAccessible > xChild;
+ if( newValue >>= xChild)
+ {
+ //create a new child
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ //add this child
+ pAgent->InsertAccObj( pAcc,pAccessible);
+ //add all oldValue's existing children
+ pAgent->InsertChildrenAccObj(pAcc);
+ pAgent->NotifyAccEvent(UM_EVENT_CHILD_ADDED, pAcc);
+ }
+ else
+ {}
+ }
+ else if (oldValue >>= xChild)
+ {
+ //delete a existing child
+ if(xChild.is())
+ {
+ XAccessible* pAcc = xChild.get();
+ pAgent->NotifyAccEvent(UM_EVENT_CHILD_REMOVED, pAcc);
+ pAgent->DeleteChildrenAccObj( pAcc );
+ //delete this child
+ pAgent->DeleteAccObj( pAcc );
+ }
+ else
+ {}
+ }
+}
+
+/**
+ * set the new state and fire the MSAA event
+ * @param state new state id
+ * @param enable true if state is set, false if state is unset
+ */
+void AccWindowEventListener::setComponentState(short state, bool enable )
+{
+ // only the following state can be fired state event.
+ switch (state)
+ {
+ case AccessibleStateType::ICONIFIED:
+ // no msaa state
+ break;
+ case AccessibleStateType::VISIBLE:
+ // UNO !VISIBLE == MSAA INVISIBLE
+ if( enable )
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ else
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ break;
+ case AccessibleStateType::SHOWING:
+ // UNO !SHOWING == MSAA OFFSCREEN
+ if( enable )
+ {
+ pAgent->IncreaseState( pAccessible, AccessibleStateType::SHOWING );
+ }
+ else
+ pAgent->DecreaseState( pAccessible, AccessibleStateType::SHOWING );
+ break;
+ default:
+ break;
+ }
+}
diff --git a/winaccessibility/source/service/ResIDGenerator.cxx b/winaccessibility/source/service/ResIDGenerator.cxx
new file mode 100644
index 000000000000..26e1bac4c5f0
--- /dev/null
+++ b/winaccessibility/source/service/ResIDGenerator.cxx
@@ -0,0 +1,54 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "ResIDGenerator.hxx"
+
+/**
+ * Destructor
+ *
+ * @param
+ * @return
+ */
+ResIDGenerator::~ResIDGenerator()
+{
+}
+
+/**
+ * SubList stores those IDs that were ever generated and deleted, the method
+ * return the ID from subList first if subList is not empty,else return ++max.
+ * Add the obsolete IDs by calling SetSub method
+ *
+ * @param
+ * @return new resource ID.
+ */
+long ResIDGenerator::GenerateNewResID()
+{
+ if (max == LONG_MAX)
+ {
+ if (!subList.empty())
+ {
+ long nRes = *(subList.begin());
+ subList.pop_front();
+ return nRes;
+ }
+ }
+ return -(++max);
+}
diff --git a/winaccessibility/source/service/checkmt.cxx b/winaccessibility/source/service/checkmt.cxx
new file mode 100644
index 000000000000..258a6f61489a
--- /dev/null
+++ b/winaccessibility/source/service/checkmt.cxx
@@ -0,0 +1,36 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "checkmt.hxx"
+#include <vcl/svapp.hxx>
+
+bool IsInMainThread()
+{
+ if( Application::GetMainThreadIdentifier() == ::vos::OThread::getCurrentIdentifier())
+ return true;
+ else
+ return false;
+}
+
+vos::IMutex& GetSolarMutex()
+{
+ return Application::GetSolarMutex();
+}
diff --git a/winaccessibility/source/service/checkmt.hxx b/winaccessibility/source/service/checkmt.hxx
new file mode 100644
index 000000000000..6374bd93f6c4
--- /dev/null
+++ b/winaccessibility/source/service/checkmt.hxx
@@ -0,0 +1,28 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#pragma once
+
+#include <vos/mutex.hxx>
+
+bool IsInMainThread();
+
+vos::IMutex& GetSolarMutex();
diff --git a/winaccessibility/source/service/exports.dxp b/winaccessibility/source/service/exports.dxp
new file mode 100644
index 000000000000..f0e1c69934bc
--- /dev/null
+++ b/winaccessibility/source/service/exports.dxp
@@ -0,0 +1,2 @@
+component_getImplementationEnvironment
+component_getFactory
diff --git a/winaccessibility/source/service/makefile.mk b/winaccessibility/source/service/makefile.mk
new file mode 100644
index 000000000000..6de78f19f514
--- /dev/null
+++ b/winaccessibility/source/service/makefile.mk
@@ -0,0 +1,118 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+.IF "$(GUI)"=="WNT"
+PRJ=..$/..
+PRJNAME=winaccessibility
+TARGET=winaccessibility
+LIBTARGET=NO
+USE_DEFFILE=TRUE
+ENABLE_EXCEPTIONS=TRUE
+VERSIONOBJ=
+AUTOSEG=true
+NO_BSYMBOLIC= TRUE
+
+# output directory (one dir for each project)
+UNOUCROUT=$(OUT)$/inc
+# adding to inludepath
+INCPRE+=$(UNOUCROUT)
+INCPRE+=$(MISC)
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# --- Files --------------------------------------------------------
+SLOFILES= $(SLO)$/AccObject.obj \
+ $(SLO)$/ResIDGenerator.obj \
+ $(SLO)$/AccObjectWinManager.obj \
+ $(SLO)$/AccObjectManagerAgent.obj \
+ $(SLO)$/AccEventListener.obj \
+ $(SLO)$/AccComponentEventListener.obj \
+ $(SLO)$/AccContainerEventListener.obj \
+ $(SLO)$/AccDialogEventListener.obj \
+ $(SLO)$/AccFrameEventListener.obj \
+ $(SLO)$/AccWindowEventListener.obj \
+ $(SLO)$/AccMenuEventListener.obj \
+ $(SLO)$/AccTextComponentEventListener.obj \
+ $(SLO)$/AccObjectContainerEventListener.obj \
+ $(SLO)$/AccParagraphEventListener.obj \
+ $(SLO)$/AccDescendantManagerEventListener.obj \
+ $(SLO)$/AccListEventListener.obj \
+ $(SLO)$/AccTableEventListener.obj \
+ $(SLO)$/AccTreeEventListener.obj \
+ $(SLO)$/AccTopWindowListener.obj \
+ $(SLO)$/msaaservice_impl.obj \
+ $(SLO)$/checkmt.obj \
+ $(SLO)$/AccResource.obj
+
+#SRCFILES=winaccessibility.src
+#RES1FILELIST=$(SRS)$/winaccessibility.srs
+#RESLIB1NAME=$(TARGET)
+#RESLIB1SRSFILES=$(RES1FILELIST)
+
+SHL1TARGET=winaccessibility
+SHL1IMPLIB=i$(SHL1TARGET)
+SHL1STDLIBS=\
+ $(VCLLIB) \
+ $(CPPULIB) \
+ $(SALLIB) \
+ $(CPPUHELPERLIB) \
+ $(TOOLSLIB) \
+ $(TKLIB) \
+ $(VOSLIB) \
+ $(UWINAPILIB) \
+ $(GDI32LIB) \
+ $(WINSPOOLLIB) \
+ $(OLE32LIB) \
+ $(SHELL32LIB) \
+ $(ADVAPI32LIB) \
+ $(IMM32LIB) \
+ $(UUIDLIB) \
+ oleacc.lib
+
+SHL1OBJS=$(SLOFILES)
+SHL1VERSIONOBJ=
+SHL1DESCRIPTIONOBJ=
+
+DEF1NAME=$(SHL1TARGET)
+DEF1EXPORTFILE=exports.dxp
+
+
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+ALLTAR : \
+ $(MISC)/winaccessibility.component
+
+.IF "$(OS)" == "WNT"
+my_platform = .windows
+.END
+
+$(MISC)/winaccessibility.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt winaccessibility.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt winaccessibility.component
+
+
+.ENDIF # "$(GUI)"=="WNT"
diff --git a/winaccessibility/source/service/msaaservice_impl.cxx b/winaccessibility/source/service/msaaservice_impl.cxx
new file mode 100644
index 000000000000..3148c9713914
--- /dev/null
+++ b/winaccessibility/source/service/msaaservice_impl.cxx
@@ -0,0 +1,289 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include <cppuhelper/implbase3.hxx>
+#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 <com/sun/star/accessibility/XMSAAService.hpp>
+
+#include <com/sun/star/awt/XExtendedToolkit.hpp>
+#include <vcl/svapp.hxx>
+
+using namespace ::rtl; // for OUString
+using namespace ::com::sun::star; // for odk interfaces
+using namespace ::com::sun::star::uno; // for basic types
+using namespace ::com::sun::star::accessibility;
+
+using namespace ::com::sun::star::awt;
+
+typedef sal_Int32 HWND;
+
+#include "AccTopWindowListener.hxx"
+#include "g_msacc.hxx"
+
+extern void FreeTopWindowListener();
+extern long GetMSComPtr(long hWnd, long lParam, long wParam);
+extern void handleWindowOpened_impl( long pAcc);
+
+
+namespace my_sc_impl
+{
+
+extern Sequence< OUString > SAL_CALL getSupportedServiceNames_MSAAServiceImpl();
+extern OUString SAL_CALL getImplementationName_MSAAServiceImpl();
+extern Reference< XInterface > SAL_CALL create_MSAAServiceImpl(
+ Reference< XComponentContext > const & xContext )
+ SAL_THROW( () );
+/**
+ * Method that returns the service name.
+ * @param
+ * @return Name sequence.
+ */
+static Sequence< OUString > getSupportedServiceNames_MSAAServiceImpl()
+{
+ 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.accessibility.MSAAService"));
+ pNames = &seqNames;
+ }
+ }
+ return *pNames;
+}
+
+/**
+ * Method that returns the service name.
+ * @param
+ * @return Name sequence.
+ */
+static OUString getImplementationName_MSAAServiceImpl()
+{
+ static OUString *pImplName = 0;
+ if( ! pImplName )
+ {
+ // MutexGuard guard( Mutex::getGlobalMutex() );
+ if( ! pImplName )
+ {
+ static OUString implName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.accessibility.my_sc_implementation.MSAAService") );
+ pImplName = &implName;
+ }
+ }
+ return *pImplName;
+}
+
+class MSAAServiceImpl : public ::cppu::WeakImplHelper3<
+ XMSAAService, lang::XServiceInfo, lang::XInitialization >
+{
+ OUString m_arg;
+public:
+ // focus on three given interfaces,
+ // no need to implement XInterface, XTypeProvider, XWeak
+ MSAAServiceImpl ();
+ virtual ~MSAAServiceImpl( void );
+ // XInitialization will be called upon createInstanceWithArguments[AndContext]()
+ virtual void SAL_CALL initialize( Sequence< Any > const & args )
+ throw (Exception);
+ // XMSAAService
+ virtual sal_Int32 SAL_CALL getAccObjectPtr (long hWnd, long lParam, long wParam)
+ throw (RuntimeException);
+ virtual void SAL_CALL handleWindowOpened(sal_Int32)
+ 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);
+};
+
+/**
+ * Implemention of XInitialization.
+ * @param
+ * @return.
+ */
+void MSAAServiceImpl::initialize( Sequence< Any > const & args ) throw (Exception)
+{
+ if (1 != args.getLength())
+ {
+ throw lang::IllegalArgumentException(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("give a string instanciating this component!") ),
+ (::cppu::OWeakObject *)this, // resolve to XInterface reference
+ 0 ); // argument pos
+ }
+ if (! (args[ 0 ] >>= m_arg))
+ {
+ throw lang::IllegalArgumentException(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("no string given as argument!") ),
+ (::cppu::OWeakObject *)this, // resolve to XInterface reference
+ 0 ); // argument pos
+ }
+}
+
+/**
+ * Implemention of getAccObjectPtr.
+ * @param
+ * @return Com interface.
+ */
+sal_Int32 MSAAServiceImpl::getAccObjectPtr ( long hWnd, long lParam, long wParam) throw (RuntimeException)
+{
+ return GetMSComPtr(hWnd, lParam, wParam);
+}
+
+/**
+ * Implemention of handleWindowOpened,the method will be invoked when a top window
+ * opened and AT starts up.
+ * @param
+ * @return
+ */
+void MSAAServiceImpl::handleWindowOpened( sal_Int32 pAcc)
+{
+ handleWindowOpened_impl(pAcc);
+}
+
+/**
+ * Implemention of XServiceInfo.
+ * @param
+ * @return Implementataion name.
+ */
+OUString MSAAServiceImpl::getImplementationName() throw (RuntimeException)
+{
+ // unique implementation name
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.accessibility.my_sc_impl.MSAAService") );
+}
+
+/**
+ * Implemention of XServiceInfo,return support service name.
+ * @param Service name.
+ * @return If the service name is supported.
+ */
+sal_Bool MSAAServiceImpl::supportsService( OUString const & serviceName ) throw (RuntimeException)
+{
+ // this object only supports one service, so the test is simple
+ return serviceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.accessibility.MSAAService") );
+}
+
+/**
+ * Implemention of XServiceInfo,return all service names.
+ * @param.
+ * @return service name sequence.
+ */
+Sequence< OUString > MSAAServiceImpl::getSupportedServiceNames() throw (RuntimeException)
+{
+ return getSupportedServiceNames_MSAAServiceImpl();
+}
+
+/**
+ * Static method that can create an entity of our MSAA Service
+ * @param xContext No use here.
+ * @return The object interface.
+ */
+Reference< XInterface > SAL_CALL create_MSAAServiceImpl( Reference< XComponentContext > const & /*xContext*/ ) SAL_THROW( () )
+{
+ MSAAServiceImpl* xxx = new MSAAServiceImpl();
+ //return static_cast< lang::XTypeProvider * >( xxx );
+ Reference< XMSAAService > p( xxx );
+ return p;
+}
+
+/**
+ * Constructor.
+ * @param
+ * @return
+ */
+MSAAServiceImpl::MSAAServiceImpl()
+{
+ Reference< XExtendedToolkit > xToolkit =
+ Reference< XExtendedToolkit >(Application::GetVCLToolkit(), UNO_QUERY);
+
+ if(xToolkit.is())
+ {
+ AccTopWindowListener *accListener;
+ accListener = new AccTopWindowListener();
+ g_pTop = accListener;
+ Reference< XTopWindowListener> x(accListener);
+ xToolkit->addTopWindowListener(x);
+ }
+}
+
+/**
+ * Static method that can create an entity of our MSAA Service
+ * @param Destructor
+ * @return
+ */
+MSAAServiceImpl::~MSAAServiceImpl()
+{
+
+ // As all folders and streams contain references to their parents,
+ // we must remove these references so that they will be deleted when
+ // the hash_map of the root folder is cleared, releasing all subfolders
+ // and substreams which in turn release theirs, etc. When xRootFolder is
+ // released when this destructor completes, the folder tree should be
+ // deleted fully (and automagically).
+ FreeTopWindowListener();
+
+
+}
+
+}
+
+/* shared lib exports implemented without helpers in service_impl1.cxx */
+namespace my_sc_impl
+{
+static struct ::cppu::ImplementationEntry s_component_entries [] =
+ {
+ {
+ create_MSAAServiceImpl, getImplementationName_MSAAServiceImpl,
+ getSupportedServiceNames_MSAAServiceImpl, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
+ {
+ create_MSAAServiceImpl, getImplementationName_MSAAServiceImpl,
+ getSupportedServiceNames_MSAAServiceImpl, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
+ { 0, 0, 0, 0, 0, 0 }
+ };
+}
+
+extern "C"
+{
+ void SAL_CALL component_getImplementationEnvironment(
+ sal_Char const ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
+ {
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+ }
+ 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 );
+ }
+}
diff --git a/winaccessibility/source/service/winaccessibility.component b/winaccessibility/source/service/winaccessibility.component
new file mode 100644
index 000000000000..d2dfe39573ed
--- /dev/null
+++ b/winaccessibility/source/service/winaccessibility.component
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--**********************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+**********************************************************************-->
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.accessibility.my_sc_implementation.MSAAService">
+ <service name="com.sun.star.accessibility.MSAAService"/>
+ </implementation>
+</component>
diff --git a/xmlhelp/util/main_transform.xsl b/xmlhelp/util/main_transform.xsl
index 5d847467468c..4c6acf28b1ad 100644
--- a/xmlhelp/util/main_transform.xsl
+++ b/xmlhelp/util/main_transform.xsl
@@ -613,7 +613,7 @@
<xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
<xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
<xsl:choose>
- <xsl:when test="starts-with(@href,'http://')"> <!-- web links -->
+ <xsl:when test="starts-with(@href,'http://') or starts-with(@href,'https://')"> <!-- web links -->
<a href="{@href}"><xsl:apply-templates /></a>
</xsl:when>
<xsl:when test="contains(@href,'#')">
diff --git a/xmlsecurity/source/xmlsec/nss/makefile.mk b/xmlsecurity/source/xmlsec/nss/makefile.mk
index 6ebf7375ace0..b82456057e42 100644
--- a/xmlsecurity/source/xmlsec/nss/makefile.mk
+++ b/xmlsecurity/source/xmlsec/nss/makefile.mk
@@ -42,14 +42,14 @@ CFLAGS+=-DSYSTEM_LIBXML $(LIBXML_CFLAGS)
@echo "No nss -> no libxmlsec -> no xmlsecurity/nss"
.ENDIF
-.IF "$(SYSTEM_MOZILLA)" != "YES"
+.IF "$(SYSTEM_NSS)" != "YES"
MOZ_INC = $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla
NSS_INC = $(MOZ_INC)$/nss
NSPR_INC = $(MOZ_INC)$/nspr
.ELSE
-# MOZ_INC already defined from environment
-NSS_INC = $(MOZ_NSS_CFLAGS)
-NSPR_INC = $(MOZ_INC)$/nspr
+# TODO: better use pkgconfig to find the proper system include path
+NSS_INC = /usr/include/nss3
+NSPR_INC = /usr/include/nspr4
.ENDIF
.IF "$(GUI)" == "WNT"
@@ -105,9 +105,8 @@ CDEFS += -DXMLSEC_NO_XSLT
# --- Files --------------------------------------------------------
SOLARINC += \
- -I$(MOZ_INC) \
--I$(NSPR_INC) \
--I$(PRJ)$/source$/xmlsec
+ -I$(NSPR_INC) \
+ -I$(PRJ)$/source$/xmlsec
SOLARINC += -I$(NSS_INC)