summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--automation/inc/automation/communi.hxx16
-rw-r--r--automation/inc/automation/simplecm.hxx14
-rw-r--r--automation/source/communi/communi.cxx52
-rw-r--r--automation/source/server/statemnt.cxx31
-rw-r--r--automation/source/simplecm/simplecm.cxx26
-rw-r--r--automation/source/simplecm/tcpio.cxx2
-rw-r--r--automation/source/simplecm/tcpio.hxx6
-rw-r--r--automation/source/testtool/httprequest.cxx6
-rw-r--r--avmedia/source/gstreamer/gstwindow.cxx2
-rw-r--r--basctl/source/basicide/baside3.cxx4
-rw-r--r--basctl/source/basicide/basides2.cxx1
-rw-r--r--basctl/source/basicide/bastype2.cxx9
-rw-r--r--basctl/source/basicide/scriptdocument.cxx12
-rw-r--r--basebmp/test/basictest.cxx2
-rw-r--r--basebmp/test/bmpmasktest.cxx2
-rw-r--r--basebmp/test/bmptest.cxx2
-rw-r--r--basebmp/test/cliptest.cxx2
-rw-r--r--basebmp/test/filltest.cxx2
-rw-r--r--basebmp/test/linetest.cxx2
-rw-r--r--basebmp/test/makefile.mk7
-rw-r--r--basebmp/test/masktest.cxx2
-rw-r--r--basebmp/test/polytest.cxx2
-rw-r--r--basegfx/source/curve/b2dcubicbezier.cxx55
-rw-r--r--basegfx/source/polygon/b2dtrapezoid.cxx3
-rw-r--r--basegfx/test/basegfx1d.cxx2
-rw-r--r--basegfx/test/basegfx2d.cxx2
-rw-r--r--basegfx/test/basegfx3d.cxx2
-rw-r--r--basegfx/test/basegfxtools.cxx2
-rw-r--r--basegfx/test/boxclipper.cxx2
-rw-r--r--basegfx/test/clipstate.cxx2
-rw-r--r--basegfx/test/genericclipper.cxx2
-rw-r--r--basegfx/test/makefile.mk7
-rw-r--r--basic/inc/basic/process.hxx6
-rw-r--r--basic/inc/basic/sbmod.hxx7
-rw-r--r--basic/inc/basic/sbobjmod.hxx12
-rw-r--r--basic/source/app/process.cxx38
-rw-r--r--basic/source/basmgr/basmgr.cxx12
-rw-r--r--basic/source/classes/disas.cxx34
-rw-r--r--basic/source/classes/eventatt.cxx2
-rwxr-xr-xbasic/source/classes/sb.cxx48
-rwxr-xr-xbasic/source/classes/sbunoobj.cxx12
-rw-r--r--basic/source/classes/sbxmod.cxx578
-rw-r--r--basic/source/comp/exprtree.cxx9
-rwxr-xr-x[-rw-r--r--]basic/source/comp/sbcomp.cxx310
-rw-r--r--basic/source/inc/namecont.hxx10
-rwxr-xr-x[-rw-r--r--]basic/source/inc/sbtrace.hxx (renamed from tools/inc/tools/agitem.hxx)33
-rw-r--r--basic/source/inc/scriptcont.hxx4
-rw-r--r--basic/source/runtime/methods.cxx86
-rw-r--r--basic/source/runtime/methods1.cxx33
-rw-r--r--basic/source/runtime/props.cxx7
-rw-r--r--basic/source/runtime/rtlproto.hxx1
-rwxr-xr-xbasic/source/runtime/runtime.cxx19
-rw-r--r--basic/source/runtime/stdobj.cxx1
-rw-r--r--basic/source/runtime/step0.cxx44
-rwxr-xr-x[-rw-r--r--]basic/source/runtime/step2.cxx46
-rw-r--r--basic/source/sbx/sbxbase.cxx7
-rw-r--r--basic/source/sbx/sbxdate.cxx8
-rw-r--r--basic/source/uno/namecont.cxx6
-rw-r--r--basic/source/uno/scriptcont.cxx10
-rw-r--r--boost/aliasing.patch43
-rw-r--r--boost/makefile.mk2
-rw-r--r--canvas/source/cairo/cairo_textlayout.cxx4
-rw-r--r--canvas/source/tools/elapsedtime.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx11
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx8
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx15
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx15
-rw-r--r--comphelper/inc/comphelper/storagehelper.hxx2
-rw-r--r--comphelper/source/misc/officerestartmanager.cxx4
-rw-r--r--comphelper/source/misc/storagehelper.cxx31
-rw-r--r--configmgr/source/rootaccess.cxx5
-rw-r--r--configure.in51
-rw-r--r--connectivity/source/drivers/adabas/BDriver.cxx38
-rw-r--r--connectivity/source/drivers/adabas/BFunctions.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx8
-rw-r--r--connectivity/source/drivers/file/FResultSet.cxx9
-rw-r--r--connectivity/source/drivers/hsqldb/HStorageMap.cxx2
-rw-r--r--connectivity/source/drivers/mozab/MDriver.cxx2
-rw-r--r--connectivity/source/drivers/odbc/OFunctions.cxx4
-rw-r--r--connectivity/source/inc/odbc/OFunctiondefs.hxx2
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx2
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx2
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.cxx2
-rw-r--r--dbaccess/source/ui/dlg/adodatalinks.cxx2
-rw-r--r--dbaccess/source/ui/dlg/odbcconfig.cxx10
-rw-r--r--dbaccess/source/ui/dlg/odbcconfig.hxx4
-rw-r--r--default_images/sd/res/slide_sorter_command1_large.pngbin0 -> 327 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command1_large_hc.pngbin0 -> 348 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command1_large_hover.pngbin0 -> 342 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command1_large_hover_hc.pngbin0 -> 348 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command1_medium.pngbin0 -> 295 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command1_medium_hc.pngbin0 -> 309 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command1_medium_hover.pngbin0 -> 303 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command1_medium_hover_hc.pngbin0 -> 312 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command1_small.pngbin0 -> 273 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command1_small_hc.pngbin0 -> 284 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command1_small_hover.pngbin0 -> 278 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command1_small_hover_hc.pngbin0 -> 286 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2_large.pngbin0 -> 348 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2_large_hc.pngbin0 -> 357 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2_large_hover.pngbin0 -> 358 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2_large_hover_hc.pngbin0 -> 366 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2_medium.pngbin0 -> 298 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2_medium_hc.pngbin0 -> 311 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2_medium_hover.pngbin0 -> 311 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2_medium_hover_hc.pngbin0 -> 319 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2_small.pngbin0 -> 284 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2_small_hc.pngbin0 -> 296 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2_small_hover.pngbin0 -> 297 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2_small_hover_hc.pngbin0 -> 305 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2b_large.pngbin0 -> 308 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2b_large_hc.pngbin0 -> 312 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2b_large_hover.pngbin0 -> 311 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2b_large_hover_hc.pngbin0 -> 321 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2b_medium.pngbin0 -> 268 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2b_medium_hc.pngbin0 -> 272 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2b_medium_hover.pngbin0 -> 271 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2b_medium_hover_hc.pngbin0 -> 279 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2b_small.pngbin0 -> 257 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2b_small_hc.pngbin0 -> 260 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2b_small_hover.pngbin0 -> 260 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command2b_small_hover_hc.pngbin0 -> 267 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command3_large.pngbin0 -> 324 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command3_large_hc.pngbin0 -> 328 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command3_large_hover.pngbin0 -> 328 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command3_large_hover_hc.pngbin0 -> 335 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command3_medium.pngbin0 -> 285 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command3_medium_hc.pngbin0 -> 289 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command3_medium_hover.pngbin0 -> 288 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command3_medium_hover_hc.pngbin0 -> 296 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command3_small.pngbin0 -> 272 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command3_small_hc.pngbin0 -> 276 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command3_small_hover.pngbin0 -> 275 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command3_small_hover_hc.pngbin0 -> 282 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command_background_large.pngbin0 -> 1745 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command_background_large_hc.pngbin0 -> 1034 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command_background_medium.pngbin0 -> 1349 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command_background_medium_hc.pngbin0 -> 991 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command_background_small.pngbin0 -> 1142 bytes
-rw-r--r--default_images/sd/res/slide_sorter_command_background_small_hc.pngbin0 -> 896 bytes
-rw-r--r--default_images/sd/res/slide_sorter_focus_border.pngbin0 -> 361 bytes
-rw-r--r--default_images/sd/res/slide_sorter_hide_slide_overlay.pngbin0 -> 562 bytes
-rw-r--r--default_images/sd/res/slide_sorter_insert_shadow.pngbin0 -> 215 bytes
-rw-r--r--default_images/sd/res/slide_sorter_shadow.pngbin0 -> 337 bytes
-rw-r--r--default_images/svx/source/svdraw/pageshadow35x35.pngbin0 -> 708 bytes
-rw-r--r--desktop/source/app/app.cxx587
-rw-r--r--desktop/source/app/officeipcthread.cxx2
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/gui/dp_gui_dialog2.cxx12
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.cxx8
-rw-r--r--desktop/source/deployment/manager/dp_properties.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_properties.hxx5
-rw-r--r--desktop/source/deployment/misc/dp_misc.cxx5
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx62
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx5
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx5
-rw-r--r--desktop/source/deployment/registry/dp_registry.cxx7
-rw-r--r--desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx5
-rw-r--r--desktop/source/deployment/registry/executable/dp_executablebackenddb.hxx5
-rw-r--r--desktop/source/deployment/registry/help/dp_helpbackenddb.cxx5
-rw-r--r--desktop/source/deployment/registry/help/dp_helpbackenddb.hxx5
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx22
-rw-r--r--desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx5
-rw-r--r--desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx5
-rwxr-xr-xdesktop/source/migration/services/cexportsoo3.cxx5
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/oo3extensionmigration.cxx5
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/oo3extensionmigration.hxx5
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_app.cxx33
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx105
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_shared.h6
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx128
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx18
-rw-r--r--drawinglayer/prj/d.lst2
-rw-r--r--drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx339
-rw-r--r--drawinglayer/source/primitive2d/makefile.mk1
-rw-r--r--drawinglayer/source/processor2d/vclhelperbitmaprender.cxx36
-rw-r--r--editeng/source/editeng/editattr.cxx9
-rw-r--r--[-rwxr-xr-x]editeng/source/editeng/impedit4.cxx19
-rw-r--r--editeng/source/misc/txtrange.cxx8
-rw-r--r--extensions/source/config/ldap/ldapaccess.cxx2
-rwxr-xr-x[-rw-r--r--]extensions/source/ole/oleobjw.cxx88
-rw-r--r--extensions/source/ole/oleobjw.hxx11
-rw-r--r--extensions/source/ole/unoconversionutilities.hxx52
-rw-r--r--extensions/source/plugin/inc/plugin/unx/mediator.hxx8
-rw-r--r--extensions/source/plugin/inc/plugin/unx/plugcon.hxx2
-rw-r--r--extensions/source/plugin/unx/mediator.cxx8
-rw-r--r--extensions/source/plugin/unx/nppapi.cxx6
-rw-r--r--extensions/source/plugin/unx/plugcon.cxx2
-rw-r--r--extensions/source/scanner/scanwin.cxx7
-rw-r--r--extensions/source/scanner/twain.cxx9
-rw-r--r--extensions/source/scanner/twain.hxx2
-rw-r--r--extensions/test/stm/datatest.cxx2
-rw-r--r--extensions/test/stm/marktest.cxx4
-rw-r--r--extensions/test/stm/pipetest.cxx2
-rw-r--r--extensions/test/stm/testfactreg.cxx2
-rw-r--r--extensions/workben/testpgp.cxx4
-rw-r--r--extras/source/wordbook/standard.dicbin11 -> 47 bytes
-rw-r--r--filter/source/graphicfilter/egif/egif.cxx28
-rw-r--r--filter/source/graphicfilter/eos2met/eos2met.cxx26
-rw-r--r--filter/source/graphicfilter/epbm/epbm.cxx30
-rw-r--r--filter/source/graphicfilter/epgm/epgm.cxx30
-rw-r--r--filter/source/graphicfilter/epict/epict.cxx29
-rw-r--r--filter/source/graphicfilter/eppm/eppm.cxx31
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx26
-rw-r--r--filter/source/graphicfilter/eras/eras.cxx29
-rw-r--r--filter/source/graphicfilter/etiff/etiff.cxx30
-rw-r--r--filter/source/graphicfilter/expm/expm.cxx29
-rw-r--r--filter/source/graphicfilter/idxf/idxf.cxx29
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx27
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx27
-rw-r--r--filter/source/graphicfilter/ipbm/ipbm.cxx27
-rw-r--r--filter/source/graphicfilter/ipcd/ipcd.cxx28
-rw-r--r--filter/source/graphicfilter/ipcx/ipcx.cxx27
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx26
-rw-r--r--filter/source/graphicfilter/ipsd/ipsd.cxx26
-rw-r--r--filter/source/graphicfilter/iras/iras.cxx27
-rw-r--r--filter/source/graphicfilter/itga/itga.cxx27
-rw-r--r--filter/source/graphicfilter/itiff/itiff.cxx28
-rw-r--r--filter/source/msfilter/escherex.cxx9
-rw-r--r--filter/source/msfilter/msdffimp.cxx4
-rw-r--r--filter/source/msfilter/msvbahelper.cxx83
-rw-r--r--filter/source/msfilter/svxmsbas.cxx24
-rw-r--r--filter/source/xsltdialog/xmlfilterjar.cxx8
-rw-r--r--forms/source/component/Button.cxx2
-rw-r--r--forms/source/component/Button.hxx2
-rw-r--r--formula/inc/formula/errorcodes.hxx8
-rw-r--r--framework/inc/macros/debug/memorymeasure.hxx2
-rw-r--r--framework/source/accelerators/acceleratorconfiguration.cxx29
-rwxr-xr-xgraphite/graphite-2.3.1.patch.mingw9
-rw-r--r--i18npool/source/isolang/mslangid.cxx1
-rw-r--r--idl/source/cmptools/hash.cxx4
-rw-r--r--idl/source/cmptools/lex.cxx8
-rw-r--r--idl/source/prj/database.cxx6
-rw-r--r--idl/source/prj/globals.cxx10
-rw-r--r--idl/source/prj/idldll.cxx79
-rw-r--r--idl/source/prj/makefile.mk1
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java18
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java196
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java21
-rw-r--r--l10ntools/inc/lngmerge.hxx2
-rw-r--r--l10ntools/java/jpropex/java/JPropEx.java8
-rw-r--r--l10ntools/java/jpropex/java/SdfEntity.java36
-rwxr-xr-xl10ntools/java/jpropex/jpropex4
-rw-r--r--l10ntools/prj/d.lst8
-rw-r--r--[-rwxr-xr-x]l10ntools/scripts/tool/const.py (renamed from transex3/java/jpropex/makefile.mk)15
-rw-r--r--l10ntools/scripts/tool/l10ntool.py211
-rw-r--r--l10ntools/scripts/tool/pseudo.py184
-rw-r--r--l10ntools/scripts/tool/sdf.py165
-rw-r--r--l10ntools/scripts/tool/xhtex.py135
-rw-r--r--l10ntools/scripts/tool/xtxex.py93
-rwxr-xr-xl10ntools/scripts/xhtex46
-rwxr-xr-xl10ntools/scripts/xtxex47
-rw-r--r--l10ntools/source/cfglex.l17
-rw-r--r--l10ntools/source/cfgmerge.cxx15
-rw-r--r--l10ntools/source/export.cxx12
-rw-r--r--l10ntools/source/helpex.cxx8
-rw-r--r--l10ntools/source/helpmerge.cxx11
-rw-r--r--l10ntools/source/lngex.cxx20
-rw-r--r--l10ntools/source/lngmerge.cxx5
-rw-r--r--l10ntools/source/localize.cxx44
-rw-r--r--l10ntools/source/srclex.l6
-rw-r--r--l10ntools/source/xrmlex.l5
-rw-r--r--l10ntools/source/xrmmerge.cxx11
-rw-r--r--libtextcat/makefile.mk6
-rw-r--r--lingucomponent/prj/build.lst2
-rw-r--r--more_fonts/fonts/ttf_liberation/makefile.mk4
-rw-r--r--more_fonts/prj/d.lst5
-rw-r--r--mysqlc/source/mysqlc_connection.cxx4
-rw-r--r--mysqlc/source/mysqlc_connection.hxx4
-rw-r--r--mysqlc/source/mysqlc_databasemetadata.cxx4
-rw-r--r--mysqlc/source/mysqlc_databasemetadata.hxx4
-rw-r--r--mysqlc/source/mysqlc_driver.cxx5
-rw-r--r--mysqlc/source/mysqlc_driver.hxx4
-rw-r--r--mysqlc/source/mysqlc_general.hxx4
-rw-r--r--mysqlc/source/mysqlc_preparedstatement.hxx4
-rw-r--r--mysqlc/source/mysqlc_resultsetmetadata.hxx4
-rw-r--r--mysqlc/source/mysqlc_statement.hxx4
-rw-r--r--o3tl/qa/makefile.mk7
-rw-r--r--o3tl/qa/test-cow_wrapper.cxx2
-rw-r--r--o3tl/qa/test-heap_ptr.cxx2
-rw-r--r--o3tl/qa/test-range.cxx2
-rw-r--r--o3tl/qa/test-vector_pool.cxx2
-rw-r--r--offapi/com/sun/star/deployment/ExtensionRemovedException.idl5
-rw-r--r--offapi/com/sun/star/deployment/InvalidRemovedParameterException.idl5
-rw-r--r--offapi/com/sun/star/deployment/Prerequisites.idl5
-rw-r--r--offapi/com/sun/star/script/XLibraryContainer3.idl5
-rw-r--r--offapi/com/sun/star/script/makefile.mk4
-rwxr-xr-xoffapi/com/sun/star/script/vba/VBAEventId.idl140
-rwxr-xr-x[-rw-r--r--]offapi/com/sun/star/script/vba/VBAEventProcessor.idl (renamed from sfx2/source/appl/sfxdll.cxx)42
-rwxr-xr-xoffapi/com/sun/star/script/vba/VBASpreadsheetEventProcessor.idl50
-rwxr-xr-xoffapi/com/sun/star/script/vba/VBATextEventProcessor.idl50
-rw-r--r--offapi/com/sun/star/script/vba/XVBACompatibility.idl (renamed from offapi/com/sun/star/script/XVBACompat.idl)27
-rwxr-xr-xoffapi/com/sun/star/script/vba/XVBAEventProcessor.idl106
-rw-r--r--offapi/com/sun/star/script/vba/XVBAModuleInfo.idl (renamed from offapi/com/sun/star/script/XVBAModuleInfo.idl)48
-rwxr-xr-x[-rw-r--r--]offapi/com/sun/star/script/vba/makefile.mk (renamed from tools/source/solar/makefile.mk)43
-rw-r--r--offapi/prj/build.lst5
-rw-r--r--offapi/prj/d.lst2
-rw-r--r--offapi/util/makefile.mk1
-rwxr-xr-x[-rw-r--r--]officecfg/registry/data/org/openoffice/Office/Math.xcu5
-rw-r--r--officecfg/registry/data/org/openoffice/Office/Paths.xcu3
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu10
-rw-r--r--officecfg/registry/data/org/openoffice/Office/makefile.mk2
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Math.xcs23
-rwxr-xr-xofficecfg/registry/schema/org/openoffice/Office/OOoImprovement/Settings.xcs2
-rw-r--r--offuh/prj/d.lst3
-rw-r--r--oovbaapi/ooo/vba/XApplicationBase.idl15
-rw-r--r--oovbaapi/ooo/vba/excel/XApplication.idl1
-rw-r--r--oovbaapi/ooo/vba/excel/XWorksheet.idl1
-rw-r--r--oovbaapi/ooo/vba/excel/makefile.mk2
-rw-r--r--oovbaapi/ooo/vba/makefile.mk5
-rw-r--r--oovbaapi/ooo/vba/word/makefile.mk2
-rw-r--r--oovbaapi/prj/d.lst2
-rwxr-xr-xoox/inc/oox/ole/vbahelper.hxx123
-rwxr-xr-xoox/inc/oox/ole/vbaproject.hxx151
-rwxr-xr-xoox/inc/oox/xls/excelvbaproject.hxx73
-rwxr-xr-x[-rw-r--r--]oox/source/core/filterbase.cxx32
-rw-r--r--oox/source/drawingml/chart/titlecontext.cxx2
-rwxr-xr-xoox/source/ole/vbacontrol.cxx28
-rwxr-xr-xoox/source/ole/vbahelper.cxx171
-rwxr-xr-xoox/source/ole/vbamodule.cxx42
-rwxr-xr-xoox/source/ole/vbaproject.cxx124
-rw-r--r--oox/source/vml/vmlshapecontext.cxx2
-rw-r--r--oox/source/xls/defnamesbuffer.cxx8
-rw-r--r--oox/source/xls/excelfilter.cxx45
-rwxr-xr-xoox/source/xls/excelvbaproject.cxx214
-rw-r--r--oox/source/xls/externallinkfragment.cxx2
-rw-r--r--oox/source/xls/makefile.mk1
-rw-r--r--oox/source/xls/workbookhelper.cxx8
-rw-r--r--package/source/zipapi/ZipFile.cxx10
-rw-r--r--postprocess/packregistry/makefile.mk11
-rw-r--r--psprint_config/prj/build.lst2
-rw-r--r--rsc/source/parser/erscerr.cxx2
-rw-r--r--rsc/source/parser/rscyacc.cxx4
-rw-r--r--rsc/source/rsc/rsc.cxx4
-rw-r--r--rsc/source/tools/rsctools.cxx6
-rw-r--r--sal/cppunittester/cppunittester.cxx2
-rw-r--r--sal/cppunittester/makefile.mk7
-rw-r--r--sal/osl/os2/system.h3
-rw-r--r--sal/osl/w32/salinit.cxx20
-rw-r--r--sax/qa/cppunit/makefile.mk7
-rw-r--r--sax/qa/cppunit/test_converter.cxx2
-rw-r--r--sc/addin/inc/addin.h7
-rw-r--r--sc/inc/address.hxx6
-rw-r--r--sc/inc/callform.hxx6
-rw-r--r--sc/inc/document.hxx15
-rw-r--r--sc/inc/scextopt.hxx8
-rw-r--r--[-rwxr-xr-x]sc/inc/sheetevents.hxx2
-rw-r--r--sc/inc/table.hxx48
-rw-r--r--sc/inc/unoguard.hxx2
-rw-r--r--sc/source/core/data/bcaslot.cxx12
-rwxr-xr-x[-rw-r--r--]sc/source/core/data/documen2.cxx10
-rw-r--r--sc/source/core/data/documen3.cxx119
-rw-r--r--sc/source/core/data/documen7.cxx2
-rw-r--r--sc/source/core/data/document.cxx73
-rwxr-xr-x[-rw-r--r--]sc/source/core/data/dpobject.cxx24
-rw-r--r--sc/source/core/data/fillinfo.cxx20
-rw-r--r--sc/source/core/data/markdata.cxx62
-rw-r--r--[-rwxr-xr-x]sc/source/core/data/sheetevents.cxx35
-rw-r--r--sc/source/core/data/table1.cxx63
-rw-r--r--sc/source/core/data/table2.cxx106
-rw-r--r--sc/source/core/data/table5.cxx68
-rw-r--r--sc/source/core/tool/chartpos.cxx23
-rw-r--r--sc/source/core/tool/compiler.cxx37
-rw-r--r--sc/source/core/tool/interpr1.cxx97
-rw-r--r--sc/source/core/tool/interpr2.cxx8
-rw-r--r--sc/source/filter/excel/excdoc.cxx8
-rw-r--r--sc/source/filter/excel/excimp8.cxx29
-rw-r--r--sc/source/filter/excel/impop.cxx2
-rw-r--r--sc/source/filter/excel/xiescher.cxx6
-rw-r--r--sc/source/filter/excel/xiname.cxx6
-rw-r--r--sc/source/filter/excel/xiroot.cxx2
-rw-r--r--sc/source/filter/excel/xlescher.cxx2
-rw-r--r--sc/source/filter/inc/excdoc.hxx6
-rw-r--r--sc/source/filter/inc/excimp8.hxx1
-rw-r--r--sc/source/filter/lotus/lotimpop.cxx2
-rw-r--r--sc/source/filter/lotus/op.cxx2
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx27
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.hxx1
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx32
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx9
-rw-r--r--sc/source/filter/xml/xmlstyle.cxx18
-rw-r--r--sc/source/filter/xml/xmlstyle.hxx2
-rw-r--r--sc/source/filter/xml/xmlstyli.cxx19
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx44
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx5
-rw-r--r--sc/source/ui/dbgui/textimportoptions.src30
-rw-r--r--sc/source/ui/docshell/docfunc.cxx9
-rw-r--r--[-rwxr-xr-x]sc/source/ui/docshell/docsh.cxx181
-rw-r--r--[-rwxr-xr-x]sc/source/ui/docshell/docsh4.cxx2
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx12
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx9
-rw-r--r--sc/source/ui/drawfunc/futext2.cxx4
-rw-r--r--[-rwxr-xr-x]sc/source/ui/inc/docsh.hxx1
-rw-r--r--sc/source/ui/inc/dpcontrol.hxx4
-rw-r--r--sc/source/ui/inc/miscdlgs.hrc1
-rw-r--r--sc/source/ui/inc/tabbgcolordlg.hxx2
-rw-r--r--sc/source/ui/inc/viewdata.hxx18
-rw-r--r--sc/source/ui/miscdlgs/tabbgcolordlg.cxx21
-rw-r--r--sc/source/ui/src/optdlg.src6
-rw-r--r--sc/source/ui/undo/undoblk.cxx2
-rw-r--r--sc/source/ui/undo/undotab.cxx12
-rw-r--r--sc/source/ui/unoobj/confuno.cxx13
-rw-r--r--sc/source/ui/unoobj/docuno.cxx59
-rw-r--r--sc/source/ui/unoobj/servuno.cxx66
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx141
-rw-r--r--sc/source/ui/vba/excelvbahelper.cxx50
-rw-r--r--sc/source/ui/vba/excelvbahelper.hxx8
-rw-r--r--sc/source/ui/vba/makefile.mk2
-rw-r--r--sc/source/ui/vba/service.cxx12
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx89
-rw-r--r--sc/source/ui/vba/vbaapplication.hxx7
-rw-r--r--sc/source/ui/vba/vbachartobjects.cxx5
-rw-r--r--sc/source/ui/vba/vbacomments.cxx6
-rwxr-xr-xsc/source/ui/vba/vbaeventshelper.cxx753
-rwxr-xr-xsc/source/ui/vba/vbaeventshelper.hxx88
-rw-r--r--sc/source/ui/vba/vbaformatconditions.cxx6
-rw-r--r--sc/source/ui/vba/vbaglobals.cxx1
-rw-r--r--sc/source/ui/vba/vbaname.cxx4
-rw-r--r--sc/source/ui/vba/vbanames.cxx2
-rw-r--r--sc/source/ui/vba/vbapivottables.cxx4
-rwxr-xr-x[-rw-r--r--]sc/source/ui/vba/vbarange.cxx122
-rw-r--r--sc/source/ui/vba/vbarange.hxx1
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx101
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx21
-rw-r--r--sc/source/ui/vba/vbaworksheet.hxx1
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx51
-rw-r--r--sc/source/ui/view/gridwin.cxx76
-rw-r--r--sc/source/ui/view/gridwin2.cxx2
-rw-r--r--sc/source/ui/view/gridwin4.cxx33
-rw-r--r--sc/source/ui/view/output.cxx14
-rw-r--r--sc/source/ui/view/output2.cxx34
-rw-r--r--sc/source/ui/view/prevwsh2.cxx4
-rw-r--r--sc/source/ui/view/scextopt.cxx21
-rw-r--r--sc/source/ui/view/tabview3.cxx1
-rw-r--r--sc/source/ui/view/viewdata.cxx161
-rw-r--r--sc/source/ui/view/viewfun2.cxx2
-rw-r--r--sc/source/ui/view/viewfun3.cxx4
-rw-r--r--sc/uiconfig/scalc/menubar/menubar.xml1
-rw-r--r--sc/uiconfig/scalc/toolbar/findbar.xml8
-rw-r--r--scp2/source/ooo/common_brand.scp18
-rw-r--r--scp2/source/ooo/file_library_ooo.scp2
-rwxr-xr-x[-rw-r--r--]scp2/source/ooo/file_ooo.scp3
-rw-r--r--scp2/source/ooo/file_resource_ooo.scp1
-rw-r--r--scp2/source/ooo/makefile.mk8
-rw-r--r--scp2/source/ooo/profileitem_ooo.scp1
-rwxr-xr-xscp2/source/ooo/windowscustomaction_ooo.scp39
-rwxr-xr-xsd/inc/drawdoc.hxx19
-rwxr-xr-xsd/inc/glob.hrc2
-rw-r--r--sd/prj/build.lst2
-rwxr-xr-x[-rw-r--r--]sd/sdi/SlideSorterController.sdi20
-rwxr-xr-xsd/source/core/drawdoc2.cxx31
-rwxr-xr-x[-rw-r--r--]sd/source/core/drawdoc3.cxx36
-rwxr-xr-xsd/source/filter/eppt/epptso.cxx2
-rwxr-xr-xsd/source/ui/accessibility/AccessibleSlideSorterObject.cxx11
-rw-r--r--[-rwxr-xr-x]sd/source/ui/accessibility/AccessibleSlideSorterView.cxx74
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/SlideTransitionPane.cxx2
-rw-r--r--[-rwxr-xr-x]sd/source/ui/dlg/PaneDockingWindow.cxx68
-rwxr-xr-xsd/source/ui/dlg/PaneDockingWindow.src3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx3
-rwxr-xr-xsd/source/ui/framework/factories/BasicViewFactory.cxx16
-rwxr-xr-xsd/source/ui/framework/factories/BasicViewFactory.hxx6
-rwxr-xr-xsd/source/ui/framework/tools/FrameworkHelper.cxx17
-rwxr-xr-xsd/source/ui/inc/DrawViewShell.hxx3
-rw-r--r--[-rwxr-xr-x]sd/source/ui/inc/PaneDockingWindow.hxx19
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/PreviewRenderer.hxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/SlideSorter.hxx33
-rwxr-xr-xsd/source/ui/inc/SlideSorterViewShell.hxx9
-rwxr-xr-xsd/source/ui/inc/ViewShell.hxx45
-rwxr-xr-xsd/source/ui/inc/framework/FrameworkHelper.hxx11
-rwxr-xr-x[-rw-r--r--]sd/source/ui/presenter/PresenterPreviewCache.cxx11
-rwxr-xr-xsd/source/ui/slideshow/slideshow.cxx13
-rwxr-xr-xsd/source/ui/slideshow/slideshowimpl.cxx2
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx150
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx44
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx83
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx28
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx41
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx6
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx141
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx66
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/cache/SlsPageCache.cxx64
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx51
-rwxr-xr-xsd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx18
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsQueueProcessorThread.hxx46
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx2
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/controller/SlideSorterController.cxx334
-rw-r--r--sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx294
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsAnimator.cxx299
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsClipboard.cxx320
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx145
-rw-r--r--sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx199
-rw-r--r--sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx100
-rwxr-xr-xsd/source/ui/slidesorter/controller/SlsFocusManager.cxx136
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx6
-rw-r--r--sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx327
-rwxr-xr-xsd/source/ui/slidesorter/controller/SlsListener.cxx139
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsListener.hxx13
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/controller/SlsPageSelector.cxx254
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsProperties.cxx46
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx418
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx1989
-rwxr-xr-xsd/source/ui/slidesorter/controller/SlsSelectionManager.cxx411
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx173
-rwxr-xr-xsd/source/ui/slidesorter/controller/SlsSlideFunction.cxx2
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/controller/SlsSlotManager.cxx486
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsTransferable.cxx15
-rw-r--r--sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx301
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/makefile.mk14
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx4
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx61
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx13
-rwxr-xr-xsd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx46
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx180
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx61
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx19
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsCurrentSlideManager.hxx29
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx18
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx153
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx122
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx16
-rwxr-xr-xsd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx70
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx137
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx88
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx85
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx23
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsTransferable.hxx (renamed from sd/source/ui/slidesorter/controller/SlsTransferable.hxx)35
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx100
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx70
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx124
-rw-r--r--sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx101
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx214
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx362
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx (renamed from tools/inc/tools/download.hxx)50
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx71
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx131
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx330
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx145
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx138
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsResource.hrc111
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsTheme.hxx236
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx97
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx273
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/model/SlideSorterModel.cxx405
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx240
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx4
-rw-r--r--sd/source/ui/slidesorter/model/SlsVisualState.cxx236
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/model/makefile.mk1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/shell/SlideSorter.cxx139
-rwxr-xr-xsd/source/ui/slidesorter/shell/SlideSorterService.cxx60
-rwxr-xr-xsd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx108
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/shell/makefile.mk0
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/view/SlideSorterView.cxx1039
-rw-r--r--sd/source/ui/slidesorter/view/SlsButtonBar.cxx1558
-rw-r--r--sd/source/ui/slidesorter/view/SlsFramePainter.cxx265
-rw-r--r--sd/source/ui/slidesorter/view/SlsFramePainter.hxx121
-rw-r--r--sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx535
-rw-r--r--sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx448
-rw-r--r--sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx565
-rw-r--r--sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx99
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/view/SlsLayouter.cxx1684
-rw-r--r--sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx287
-rw-r--r--sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx580
-rwxr-xr-xsd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx125
-rwxr-xr-xsd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx1403
-rw-r--r--sd/source/ui/slidesorter/view/SlsResource.hxx (renamed from writerfilter/source/doctok/doctokutil.cxx)36
-rw-r--r--sd/source/ui/slidesorter/view/SlsResource.src314
-rw-r--r--sd/source/ui/slidesorter/view/SlsTheme.cxx535
-rw-r--r--sd/source/ui/slidesorter/view/SlsToolTip.cxx230
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx30
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx14
-rw-r--r--sd/source/ui/slidesorter/view/SlsViewOverlay.cxx606
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/view/makefile.mk32
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx2
-rw-r--r--[-rwxr-xr-x]sd/source/ui/tools/PreviewRenderer.cxx181
-rwxr-xr-xsd/source/ui/unoidl/DrawController.cxx18
-rwxr-xr-xsd/source/ui/unoidl/SdUnoSlideView.cxx24
-rwxr-xr-xsd/source/ui/view/DocumentRenderer.cxx11
-rwxr-xr-xsd/source/ui/view/drviews2.cxx5
-rwxr-xr-xsd/source/ui/view/drviews7.cxx2
-rw-r--r--[-rwxr-xr-x]sd/source/ui/view/viewshe3.cxx15
-rwxr-xr-xsd/source/ui/view/viewshel.cxx8
-rw-r--r--sd/uiconfig/sdraw/toolbar/findbar.xml8
-rw-r--r--sd/uiconfig/simpress/toolbar/findbar.xml8
-rwxr-xr-xsd/util/makefile.mk3
-rw-r--r--set_soenv.in2
-rw-r--r--setup_native/scripts/admin.pl128
-rw-r--r--setup_native/scripts/install_linux.sh16
-rwxr-xr-xsetup_native/source/java/javaversion.dat26
-rw-r--r--setup_native/source/java/javaversion2.dat26
-rw-r--r--setup_native/source/packinfo/package.txt1
-rwxr-xr-xsetup_native/source/packinfo/packinfo_office.txt33
-rwxr-xr-xsetup_native/source/packinfo/shellscripts_extensions.txt138
-rw-r--r--setup_native/source/win32/customactions/languagepacks/exports.dxp2
-rw-r--r--setup_native/source/win32/customactions/languagepacks/makefile.mk1
-rwxr-xr-xsetup_native/source/win32/customactions/patch/exports.dxp2
-rwxr-xr-xsetup_native/source/win32/customactions/patch/makefile.mk1
-rw-r--r--setup_native/source/win32/customactions/shellextensions/completeinstallpath.cxx180
-rw-r--r--setup_native/source/win32/customactions/shellextensions/exports.dxp3
-rw-r--r--setup_native/source/win32/customactions/shellextensions/makefile.mk2
-rw-r--r--setup_native/source/win32/customactions/shellextensions/registerextensions.cxx236
-rw-r--r--sfx2/inc/sfx2/docfile.hxx3
-rw-r--r--[-rwxr-xr-x]sfx2/inc/sfx2/objsh.hxx4
-rw-r--r--sfx2/inc/sfx2/titledockwin.hxx10
-rw-r--r--sfx2/qa/cppunit/makefile.mk7
-rw-r--r--sfx2/qa/cppunit/test_metadatable.cxx2
-rw-r--r--sfx2/source/appl/app.cxx2
-rw-r--r--sfx2/source/appl/appquit.cxx3
-rw-r--r--sfx2/source/appl/impldde.cxx8
-rw-r--r--sfx2/source/appl/makefile.mk1
-rw-r--r--[-rwxr-xr-x]sfx2/source/dialog/dinfdlg.cxx13
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx4
-rw-r--r--[-rwxr-xr-x]sfx2/source/dialog/securitypage.cxx30
-rw-r--r--[-rwxr-xr-x]sfx2/source/dialog/securitypage.src0
-rw-r--r--sfx2/source/dialog/titledockwin.cxx24
-rw-r--r--sfx2/source/doc/objserv.cxx9
-rw-r--r--sfx2/source/doc/objstor.cxx7
-rw-r--r--[-rwxr-xr-x]sfx2/source/doc/objxtor.cxx7
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx6
-rw-r--r--sfx2/source/view/viewfrm.cxx16
-rw-r--r--sfx2/source/view/viewprn.cxx8
-rwxr-xr-xshell/inc/internal/utilities.hxx6
-rwxr-xr-x[-rw-r--r--]shell/source/win32/shlxthandler/columninfo/columninfo.cxx5
-rwxr-xr-x[-rw-r--r--]shell/source/win32/shlxthandler/infotips/infotips.cxx2
-rwxr-xr-xshell/source/win32/shlxthandler/ooofilt/ooofilt.cxx3
-rwxr-xr-x[-rw-r--r--]shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx4
-rwxr-xr-xshell/source/win32/shlxthandler/propsheets/propsheets.cxx93
-rwxr-xr-x[-rw-r--r--]shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx3
-rwxr-xr-x[-rw-r--r--]shell/source/win32/shlxthandler/util/fileextensions.cxx9
-rwxr-xr-x[-rw-r--r--]shell/source/win32/shlxthandler/util/utilities.cxx22
-rw-r--r--smoketestoo_native/makefile.mk7
-rw-r--r--smoketestoo_native/smoketest.cxx46
-rw-r--r--soldep/bootstrp/prj.cxx22
-rw-r--r--soldep/inc/soldep/prj.hxx2
-rw-r--r--[-rwxr-xr-x]solenv/bin/build.pl221
-rwxr-xr-xsolenv/bin/jpropex10
-rw-r--r--solenv/bin/modules/RepositoryHelper.pm205
-rwxr-xr-x[-rw-r--r--]solenv/bin/modules/SourceConfig.pm146
-rw-r--r--solenv/bin/modules/installer/epmfile.pm48
-rw-r--r--solenv/bin/modules/installer/globals.pm2
-rw-r--r--solenv/bin/modules/installer/simplepackage.pm144
-rw-r--r--solenv/bin/modules/installer/windows/property.pm5
-rw-r--r--solenv/bin/modules/installer/ziplist.pm1
-rwxr-xr-xsolenv/bin/subsequenttests2
-rw-r--r--solenv/config/sdev300.ini2
-rw-r--r--solenv/inc/_tg_srs.mk20
-rw-r--r--solenv/inc/minor.mk6
-rw-r--r--solenv/inc/rules.mk2
-rw-r--r--[-rwxr-xr-x]solenv/inc/set_wntx64.mk13
-rw-r--r--solenv/inc/settings.mk3
-rw-r--r--solenv/inc/target.mk3
-rw-r--r--solenv/inc/tg_config.mk2
-rwxr-xr-x[-rw-r--r--]solenv/inc/tg_help.mk2
-rw-r--r--solenv/inc/tg_srs.mk2
-rwxr-xr-xsolenv/inc/tg_xmerge.mk109
-rwxr-xr-x[-rw-r--r--]solenv/inc/version.hrc4
-rw-r--r--solenv/inc/version.lst2
-rwxr-xr-x[-rw-r--r--]solenv/inc/version_so.hrc6
-rw-r--r--solenv/inc/wntmsci10.mk2
-rw-r--r--solenv/inc/wntmsci11.mk17
-rw-r--r--sot/source/sdstor/stgstrms.cxx8
-rw-r--r--starmath/inc/applicat.hxx4
-rwxr-xr-x[-rw-r--r--]starmath/inc/format.hxx4
-rw-r--r--starmath/inc/node.hxx23
-rw-r--r--starmath/inc/symbol.hxx12
-rw-r--r--starmath/source/cfgitem.cxx8
-rw-r--r--starmath/source/dialog.cxx4
-rw-r--r--starmath/source/document.cxx36
-rw-r--r--starmath/source/edit.cxx13
-rw-r--r--starmath/source/format.cxx7
-rw-r--r--starmath/source/makefile.mk20
-rw-r--r--starmath/source/mathmlexport.cxx1
-rw-r--r--starmath/source/mathmlimport.cxx1
-rwxr-xr-x[-rw-r--r--]starmath/source/node.cxx96
-rw-r--r--[-rwxr-xr-x]starmath/source/parse.cxx4
-rw-r--r--starmath/source/symbol.cxx35
-rw-r--r--starmath/source/types.cxx2
-rw-r--r--[-rwxr-xr-x]starmath/source/unomodel.cxx16
-rw-r--r--[-rwxr-xr-x]starmath/source/view.cxx3
-rw-r--r--stlport/prj/d.lst1
-rw-r--r--stlport/systemstlguards/postextstl.h (renamed from tools/inc/tools/postextstl.h)0
-rw-r--r--stlport/systemstlguards/preextstl.h (renamed from tools/inc/tools/preextstl.h)6
-rw-r--r--svl/inc/svl/zforlist.hxx9
-rw-r--r--svl/source/numbers/nbdll.cxx79
-rw-r--r--svl/source/numbers/zforlist.cxx52
-rw-r--r--svl/source/numbers/zformat.cxx6
-rw-r--r--svl/source/svdde/ddedata.cxx10
-rw-r--r--svl/source/svdde/ddedll.cxx64
-rw-r--r--svl/source/svdde/ddestrg.cxx4
-rw-r--r--svtools/inc/fltdefs.hxx18
-rw-r--r--svtools/inc/rtfout.hxx2
-rw-r--r--svtools/inc/svtools/htmlout.hxx2
-rw-r--r--svtools/inc/svtools/svtdata.hxx16
-rw-r--r--svtools/inc/svtools/svxbox.hxx4
-rw-r--r--svtools/source/config/menuoptions.cxx25
-rw-r--r--svtools/source/contnr/ctrdll.cxx79
-rw-r--r--svtools/source/contnr/svicnvw.cxx3
-rw-r--r--svtools/source/contnr/svimpicn.cxx15
-rw-r--r--svtools/source/contnr/svlbox.cxx11
-rw-r--r--svtools/source/contnr/treelist.cxx10
-rw-r--r--svtools/source/control/ctrldll.cxx78
-rw-r--r--svtools/source/dialogs/filedlg2.cxx2
-rw-r--r--svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx2
-rw-r--r--svtools/source/filter.vcl/filter/filter.cxx2
-rw-r--r--svtools/source/filter.vcl/filter/filter2.cxx2
-rw-r--r--svtools/source/filter.vcl/filter/fldll.cxx76
-rw-r--r--svtools/source/filter.vcl/filter/sgfbram.cxx4
-rw-r--r--svtools/source/filter.vcl/filter/sgvmain.cxx13
-rw-r--r--svtools/source/filter.vcl/filter/sgvspln.cxx5
-rw-r--r--svtools/source/filter.vcl/filter/sgvtext.cxx10
-rw-r--r--svtools/source/filter.vcl/jpeg/jpeg.h4
-rw-r--r--svtools/source/filter.vcl/wmf/winwmf.cxx69
-rw-r--r--svtools/source/java/javainteractionhandler.cxx103
-rw-r--r--svtools/source/misc/ehdl.cxx6
-rw-r--r--svtools/source/misc/imap.cxx10
-rw-r--r--svtools/source/misc/imap2.cxx6
-rw-r--r--svtools/source/misc/svtdata.cxx19
-rw-r--r--svx/inc/svdstr.hrc1
-rw-r--r--svx/inc/svimbase.hxx4
-rw-r--r--[-rwxr-xr-x]svx/inc/svx/dialogs.hrc4
-rw-r--r--svx/inc/svx/svdedtv.hxx12
-rw-r--r--svx/inc/svx/svdmodel.hxx4
-rw-r--r--svx/inc/svx/xpoly.hxx4
-rw-r--r--svx/source/engine3d/scene3d.cxx2
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrpage.cxx81
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx6
-rw-r--r--svx/source/svdraw/svdedtv.cxx40
-rw-r--r--svx/source/svdraw/svdmrkv.cxx5
-rw-r--r--svx/source/svdraw/svdocirc.cxx2
-rw-r--r--svx/source/svdraw/svdpagv.cxx4
-rw-r--r--svx/source/svdraw/svdstr.src5
-rw-r--r--svx/source/tbxctrls/makefile.mk1
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx6
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.src (renamed from transex3/java/jpropex/java/Main.java)13
-rw-r--r--svx/util/svxpch.cxx2
-rw-r--r--sw/inc/doc.hxx11
-rwxr-xr-xsw/source/core/doc/doc.cxx26
-rw-r--r--sw/source/core/edit/edlingu.cxx28
-rw-r--r--sw/source/core/except/errhdl.cxx9
-rw-r--r--sw/source/core/fields/fldbas.cxx3
-rw-r--r--sw/source/core/frmedt/feshview.cxx4
-rw-r--r--sw/source/core/layout/findfrm.cxx10
-rw-r--r--sw/source/core/layout/layact.cxx26
-rw-r--r--sw/source/core/layout/pagechg.cxx4
-rw-r--r--sw/source/core/text/frmform.cxx4
-rw-r--r--sw/source/core/text/itratr.cxx16
-rw-r--r--sw/source/core/text/itrform2.cxx4
-rw-r--r--sw/source/core/text/itrpaint.cxx2
-rw-r--r--sw/source/core/text/txtfly.cxx4
-rw-r--r--sw/source/core/txtnode/fntcache.cxx4
-rw-r--r--sw/source/core/txtnode/swfont.cxx4
-rw-r--r--sw/source/filter/ascii/wrtasc.cxx2
-rw-r--r--sw/source/filter/ww8/dump/ww8struc.hxx2
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.hxx1
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx19
-rw-r--r--sw/source/ui/app/docsh2.cxx44
-rw-r--r--sw/source/ui/docvw/romenu.cxx8
-rw-r--r--sw/source/ui/envelp/envimg.cxx2
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx6
-rw-r--r--sw/source/ui/inc/swlbox.hxx4
-rw-r--r--sw/source/ui/inc/view.hxx2
-rw-r--r--sw/source/ui/table/tabledlg.cxx2
-rw-r--r--sw/source/ui/uiview/uivwimp.cxx2
-rw-r--r--sw/source/ui/uiview/view.cxx2
-rw-r--r--[-rwxr-xr-x]sw/source/ui/uiview/view2.cxx2
-rw-r--r--[-rwxr-xr-x]sw/source/ui/uiview/viewstat.cxx2
-rw-r--r--sw/source/ui/utlui/glbltree.cxx19
-rw-r--r--sw/source/ui/utlui/numfmtlb.cxx21
-rw-r--r--sw/source/ui/vba/makefile.mk1
-rw-r--r--sw/source/ui/vba/service.cxx9
-rw-r--r--sw/source/ui/vba/vbabookmarks.cxx5
-rw-r--r--sw/source/ui/vba/vbadocuments.cxx4
-rwxr-xr-xsw/source/ui/vba/vbaeventshelper.cxx108
-rwxr-xr-xsw/source/ui/vba/vbaeventshelper.hxx54
-rw-r--r--sw/source/ui/vba/vbasections.cxx5
-rw-r--r--sw/uiconfig/sglobal/toolbar/findbar.xml8
-rw-r--r--sw/uiconfig/sweb/toolbar/findbar.xml8
-rw-r--r--sw/uiconfig/swriter/toolbar/findbar.xml8
-rw-r--r--sw/uiconfig/swxform/toolbar/findbar.xml8
-rw-r--r--sw/util/makefile.mk2
-rw-r--r--swext/mediawiki/help/makefile.mk2
-rw-r--r--test/source/cpp/makefile.mk7
-rw-r--r--test/source/cpp/officeconnection.cxx2
-rw-r--r--testautomation/chart2/optional/includes/loadsave/ch2_xml_format.inc8
-rwxr-xr-xtestautomation/extensions/optional/includes/extensions.inc10
-rwxr-xr-xtestautomation/extensions/optional/includes/location.inc22
-rw-r--r--[-rwxr-xr-x]testautomation/extensions/optional/includes/platforms.inc2
-rw-r--r--[-rwxr-xr-x]testautomation/framework/optional/includes/basic_spectemplate.inc4
-rwxr-xr-xtestautomation/framework/optional/includes/extras_modify_objects.inc4
-rwxr-xr-xtestautomation/framework/optional/includes/security_macrosecurity.inc24
-rwxr-xr-xtestautomation/framework/optional/input/gridcontrol.odtbin12600 -> 14075 bytes
-rw-r--r--testautomation/framework/required/f_programmability_dialogs.bas7
-rwxr-xr-xtestautomation/framework/required/includes/basic_dialog_i18n.inc1
-rwxr-xr-xtestautomation/framework/required/includes/script_organizers.inc207
-rwxr-xr-xtestautomation/framework/required/includes/smoketest.inc4
-rwxr-xr-xtestautomation/framework/required/includes/topten.inc46
-rwxr-xr-xtestautomation/framework/required/includes/window_functions.inc30
-rwxr-xr-xtestautomation/framework/required/includes/wizard_agenda.inc13
-rwxr-xr-xtestautomation/framework/required/includes/wizard_documentconverter.inc15
-rwxr-xr-xtestautomation/framework/required/includes/wizard_euroconverter.inc9
-rwxr-xr-xtestautomation/framework/required/includes/wizard_fax.inc11
-rwxr-xr-xtestautomation/framework/required/includes/wizard_firsttime.inc14
-rwxr-xr-xtestautomation/framework/required/includes/wizard_letter.inc20
-rwxr-xr-xtestautomation/framework/required/includes/wizard_presentation.inc5
-rwxr-xr-xtestautomation/framework/required/input/scripts/OpenOffice.org_en-US_BasicOrganizer.txt657
-rwxr-xr-xtestautomation/framework/required/input/scripts/OpenOffice.org_en-US_BeanShell.txt14
-rwxr-xr-xtestautomation/framework/required/input/scripts/OpenOffice.org_en-US_JavaScript.txt10
-rwxr-xr-xtestautomation/framework/required/input/scripts/OpenOffice.org_en-US_Python.txt10
-rwxr-xr-xtestautomation/framework/required/input/scripts/OpenOffice.org_en-US_RunMacro.txt681
-rwxr-xr-xtestautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_BasicOrganizer.txt657
-rwxr-xr-xtestautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_BeanShell.txt14
-rwxr-xr-xtestautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_JavaScript.txt10
-rwxr-xr-xtestautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_Python.txt8
-rwxr-xr-xtestautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_RunMacro.txt679
-rwxr-xr-xtestautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_BasicOrganizer.txt657
-rwxr-xr-xtestautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_BeanShell.txt14
-rwxr-xr-xtestautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_JavaScript.txt10
-rwxr-xr-xtestautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_Python.txt10
-rwxr-xr-xtestautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_RunMacro.txt681
-rwxr-xr-xtestautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_BasicOrganizer.txt663
-rwxr-xr-xtestautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_BeanShell.txt14
-rwxr-xr-xtestautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_JavaScript.txt10
-rwxr-xr-xtestautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_Python.txt10
-rwxr-xr-xtestautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_RunMacro.txt687
-rwxr-xr-xtestautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_BasicOrganizer.txt660
-rwxr-xr-xtestautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_BeanShell.txt14
-rwxr-xr-xtestautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_JavaScript.txt10
-rwxr-xr-xtestautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_Python.txt8
-rwxr-xr-xtestautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_RunMacro.txt682
-rwxr-xr-xtestautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_BasicOrganizer.txt657
-rwxr-xr-xtestautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_BeanShell.txt14
-rwxr-xr-xtestautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_JavaScript.txt10
-rwxr-xr-xtestautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_Python.txt10
-rwxr-xr-xtestautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_RunMacro.txt681
-rwxr-xr-xtestautomation/framework/tools/includes/toolbar_tools.inc18
-rwxr-xr-xtestautomation/framework/tools/includes/wizards.inc322
-rwxr-xr-xtestautomation/framework/tools/input/menuentries.txt50
-rw-r--r--testautomation/global/required/includes/g_findbar.inc2
-rw-r--r--testautomation/global/sid/e_all.sid2
-rwxr-xr-xtestautomation/global/tools/includes/optional/t_listfuncs.inc45
-rwxr-xr-xtestautomation/global/tools/includes/optional/t_treelist_tools.inc9
-rwxr-xr-xtestautomation/global/tools/includes/required/t_filters.inc15
-rwxr-xr-x[-rw-r--r--]testautomation/graphics/optional/g_spellcheck.bas17
-rwxr-xr-x[-rw-r--r--]testautomation/graphics/optional/i_only_updt_1.bas2
-rw-r--r--testautomation/graphics/optional/includes/global/g_clipexport.inc209
-rw-r--r--testautomation/graphics/optional/includes/global/g_clipexport2.inc20
-rw-r--r--testautomation/graphics/optional/includes/global/g_clipexport3.inc25
-rw-r--r--testautomation/graphics/optional/includes/global/g_edit.inc1
-rw-r--r--testautomation/graphics/optional/includes/global/g_spellcheck.inc1083
-rw-r--r--testautomation/graphics/optional/includes/global/g_tools.inc2
-rw-r--r--testautomation/graphics/optional/includes/impress/i_us2_present.inc1
-rw-r--r--testautomation/graphics/optional/includes/impress/i_us_present.inc61
-rw-r--r--testautomation/graphics/required/includes/global/gallery2.inc1
-rw-r--r--testautomation/graphics/required/includes/global/id_001.inc29
-rw-r--r--testautomation/graphics/required/includes/global/id_002.inc21
-rw-r--r--testautomation/graphics/required/includes/global/id_003.inc15
-rw-r--r--testautomation/graphics/required/includes/global/id_004.inc28
-rw-r--r--testautomation/graphics/required/includes/global/id_005.inc31
-rw-r--r--testautomation/graphics/required/includes/global/id_006.inc1
-rw-r--r--testautomation/graphics/required/includes/global/id_007.inc29
-rw-r--r--testautomation/graphics/required/includes/global/id_008.inc8
-rw-r--r--testautomation/graphics/required/includes/global/id_009.inc14
-rw-r--r--testautomation/graphics/required/includes/global/id_011.inc11
-rw-r--r--testautomation/graphics/required/includes/impress/im_003_.inc19
-rw-r--r--testautomation/graphics/required/includes/impress/im_004_.inc1
-rwxr-xr-xtestautomation/graphics/required/input/recht_1.odgbin10261 -> 10355 bytes
-rwxr-xr-xtestautomation/graphics/required/input/recht_1.odpbin13772 -> 15116 bytes
-rwxr-xr-xtestautomation/graphics/required/input/recht_3.odgbin10506 -> 10382 bytes
-rwxr-xr-x[-rw-r--r--]testautomation/graphics/required/input/recht_3.odpbin12737 -> 11485 bytes
-rwxr-xr-xtestautomation/graphics/required/input/recht_31.odgbin9606 -> 10060 bytes
-rwxr-xr-x[-rw-r--r--]testautomation/graphics/required/input/recht_31.odpbin14160 -> 14183 bytes
-rwxr-xr-xtestautomation/graphics/required/input/recht_33.odgbin9773 -> 9096 bytes
-rwxr-xr-x[-rw-r--r--]testautomation/graphics/required/input/recht_33.odpbin13251 -> 11114 bytes
-rwxr-xr-xtestautomation/graphics/required/input/recht_34.odgbin9659 -> 10378 bytes
-rwxr-xr-x[-rw-r--r--]testautomation/graphics/required/input/recht_34.odpbin19479 -> 15086 bytes
-rwxr-xr-xtestautomation/graphics/required/input/recht_36.odgbin9896 -> 10127 bytes
-rwxr-xr-x[-rw-r--r--]testautomation/graphics/required/input/recht_36.odpbin14155 -> 13034 bytes
-rwxr-xr-xtestautomation/graphics/required/input/recht_39.odgbin9123 -> 9750 bytes
-rwxr-xr-x[-rw-r--r--]testautomation/graphics/required/input/recht_39.odpbin12338 -> 11787 bytes
-rwxr-xr-xtestautomation/graphics/required/input/recht_46.odgbin11019 -> 10723 bytes
-rwxr-xr-x[-rw-r--r--]testautomation/graphics/required/input/recht_46.odpbin19434 -> 15820 bytes
-rwxr-xr-xtestautomation/graphics/required/input/recht_48.odgbin10064 -> 10080 bytes
-rwxr-xr-x[-rw-r--r--]testautomation/graphics/required/input/recht_48.odpbin13346 -> 13297 bytes
-rwxr-xr-xtestautomation/graphics/required/input/recht_48.sxdbin6627 -> 0 bytes
-rwxr-xr-xtestautomation/graphics/required/input/recht_48.sxibin7578 -> 0 bytes
-rwxr-xr-xtestautomation/graphics/required/input/recht_49.odgbin11187 -> 9553 bytes
-rwxr-xr-x[-rw-r--r--]testautomation/graphics/required/input/recht_49.odpbin12783 -> 11504 bytes
-rwxr-xr-xtestautomation/graphics/required/input/recht_55.odgbin10281 -> 10006 bytes
-rwxr-xr-x[-rw-r--r--]testautomation/graphics/required/input/recht_55.odpbin18380 -> 14401 bytes
-rw-r--r--testautomation/graphics/tools/id_tools.inc78
-rw-r--r--testautomation/graphics/tools/id_tools_2.inc258
-rw-r--r--[-rwxr-xr-x]testautomation/spreadsheet/required/includes/c_upd_filemenu.inc1
-rwxr-xr-xtestautomation/spreadsheet/tools/input/Functionnames.odsbin19172 -> 25806 bytes
-rwxr-xr-xtestautomation/writer/optional/includes/autocorrection/w_autocorrect1.inc2
-rwxr-xr-xtestautomation/writer/optional/includes/fields/w_fields5.inc4
-rw-r--r--[-rwxr-xr-x]testautomation/writer/optional/includes/formatpage/w_formatpage1.inc114
-rw-r--r--[-rwxr-xr-x]testautomation/writer/optional/includes/formatpage/w_formatpage3.inc24
-rw-r--r--[-rwxr-xr-x]testautomation/writer/optional/includes/formatpage/w_formatpage4.inc121
-rwxr-xr-xtestautomation/writer/optional/includes/number/w_206_.inc24
-rwxr-xr-xtestautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc6
-rw-r--r--[-rwxr-xr-x]testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc106
-rwxr-xr-xtestautomation/writer/optional/input/linguistik/050.odtbin0 -> 11063 bytes
-rwxr-xr-xtestautomation/writer/optional/input/spellcheck/Language_Guessing_Sample_Texts.odtbin9574 -> 10781 bytes
-rwxr-xr-xtestautomation/writer/optional/input/spellcheck/spellcheck_50.odtbin0 -> 7985 bytes
-rwxr-xr-xtestautomation/writer/optional/input/spellcheck/st1_2_50.odtbin0 -> 8715 bytes
-rwxr-xr-xtestautomation/writer/required/includes/w_020_.inc2
-rwxr-xr-xtestautomation/writer/required/w_updt.bas1
-rw-r--r--toolkit/inc/toolkit/awt/vclxdevice.hxx4
-rw-r--r--toolkit/inc/toolkit/awt/vclxgraphics.hxx4
-rw-r--r--toolkit/inc/toolkit/helper/throbberimpl.hxx4
-rw-r--r--toolkit/qa/unoapi/knownissues.xcl3
-rw-r--r--toolkit/qa/unoapi/toolkit.sce6
-rw-r--r--toolkit/source/awt/vclxgraphics.cxx2
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx2
-rw-r--r--toolkit/source/awt/vclxwindow1.cxx2
-rw-r--r--toolkit/source/controls/unocontrol.cxx2
-rw-r--r--tools/inc/bootstrp/prj.hxx2
-rw-r--r--tools/inc/poly.h7
-rw-r--r--tools/inc/tools/chapi.hxx68
-rw-r--r--tools/inc/tools/fsys.hxx13
-rw-r--r--tools/inc/tools/pstm.hxx11
-rw-r--r--tools/inc/tools/simplerm.hxx2
-rw-r--r--tools/inc/tools/solar.h39
-rw-r--r--tools/inc/tools/string.hxx8
-rw-r--r--tools/inc/tools/urlkeys.hxx77
-rw-r--r--tools/prj/d.lst4
-rw-r--r--tools/source/fsys/dirent.cxx10
-rw-r--r--tools/source/fsys/fstat.cxx5
-rw-r--r--tools/source/generic/color.cxx4
-rw-r--r--tools/source/rc/resmgr.cxx16
-rw-r--r--tools/source/solar/solar.c562
-rw-r--r--tools/source/stream/strmos2.cxx104
-rw-r--r--tools/source/stream/strmunx.cxx6
-rw-r--r--tools/source/testtoolloader/testtoolloader.cxx8
-rw-r--r--tools/win/inc/dll.hxx25
-rw-r--r--tools/win/inc/toolsdll.hxx88
-rw-r--r--tools/win/source/dll/toolsdll.cxx1
-rwxr-xr-xtransex3/java/jpropex/build.xml169
-rw-r--r--transex3/java/jpropex/java/JPropEx.java400
-rw-r--r--transex3/java/jpropex/java/NoLocalizeFilter.java55
-rw-r--r--transex3/java/jpropex/java/OrderedHashMap.java96
-rw-r--r--transex3/java/jpropex/java/SdfData.java108
-rw-r--r--transex3/java/jpropex/java/SdfEntity.java254
-rwxr-xr-xtransex3/java/jpropex/jpropex10
-rwxr-xr-xtransex3/java/jpropex/jpropex.MF1
-rw-r--r--ucb/source/ucp/odma/odma_lib.cxx4
-rw-r--r--ucb/source/ucp/package/makefile.mk1
-rw-r--r--ucb/source/ucp/package/pkguri.cxx36
-rw-r--r--unotools/inc/unotools/configpathes.hxx6
-rw-r--r--unotools/source/config/configpathes.cxx11
-rw-r--r--unoxml/source/dom/node.cxx23
-rw-r--r--vbahelper/inc/vbahelper/vbaapplicationbase.hxx17
-rw-r--r--vbahelper/inc/vbahelper/vbacollectionimpl.hxx3
-rw-r--r--vbahelper/inc/vbahelper/vbadocumentbase.hxx4
-rwxr-xr-xvbahelper/inc/vbahelper/vbaeventshelperbase.hxx162
-rw-r--r--vbahelper/inc/vbahelper/vbaglobalbase.hxx4
-rw-r--r--vbahelper/inc/vbahelper/vbahelper.hxx1
-rw-r--r--vbahelper/inc/vbahelper/vbahelperinterface.hxx30
-rw-r--r--vbahelper/prj/d.lst1
-rw-r--r--vbahelper/source/msforms/vbacontrols.cxx31
-rw-r--r--vbahelper/source/msforms/vbauserform.cxx4
-rw-r--r--vbahelper/source/vbahelper/makefile.mk2
-rw-r--r--vbahelper/source/vbahelper/vbaapplicationbase.cxx109
-rw-r--r--vbahelper/source/vbahelper/vbadocumentbase.cxx51
-rwxr-xr-xvbahelper/source/vbahelper/vbaeventshelperbase.cxx218
-rw-r--r--vbahelper/source/vbahelper/vbaglobalbase.cxx57
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx20
-rwxr-xr-xvcl/aqua/inc/salframeview.h1
-rw-r--r--vcl/aqua/inc/salsys.h5
-rw-r--r--vcl/aqua/source/app/salinst.cxx17
-rw-r--r--vcl/aqua/source/app/salsys.cxx101
-rw-r--r--vcl/aqua/source/dtrans/DragSource.cxx14
-rw-r--r--vcl/aqua/source/dtrans/DragSource.hxx2
-rw-r--r--vcl/aqua/source/gdi/aquaprintaccessoryview.mm678
-rw-r--r--vcl/aqua/source/gdi/salprn.cxx4
-rw-r--r--vcl/aqua/source/window/salframe.cxx99
-rwxr-xr-xvcl/aqua/source/window/salframeview.mm26
-rw-r--r--vcl/inc/vcl/button.hxx2
-rw-r--r--vcl/inc/vcl/dndevdis.hxx (renamed from vcl/source/window/dndevdis.hxx)0
-rw-r--r--vcl/inc/vcl/dndlcon.hxx (renamed from vcl/source/window/dndlcon.hxx)0
-rw-r--r--vcl/inc/vcl/gdimtf.hxx2
-rw-r--r--vcl/inc/vcl/graphite_adaptors.hxx4
-rw-r--r--vcl/inc/vcl/graphite_features.hxx4
-rw-r--r--vcl/inc/vcl/graphite_layout.hxx4
-rw-r--r--vcl/inc/vcl/ilstbox.hxx2
-rw-r--r--vcl/inc/vcl/print.hxx1
-rw-r--r--vcl/inc/vcl/splitwin.hxx12
-rwxr-xr-xvcl/source/app/settings.cxx7
-rw-r--r--vcl/source/control/button.cxx36
-rwxr-xr-xvcl/source/control/edit.cxx25
-rw-r--r--vcl/source/control/lstbox.cxx14
-rw-r--r--vcl/source/gdi/bitmap3.cxx8
-rw-r--r--vcl/source/gdi/gdimtf.cxx43
-rw-r--r--vcl/source/gdi/impimage.cxx4
-rw-r--r--vcl/source/gdi/metaact.cxx2
-rw-r--r--vcl/source/gdi/outdev3.cxx120
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx3
-rwxr-xr-x[-rw-r--r--]vcl/source/gdi/print3.cxx80
-rw-r--r--vcl/source/glyphs/graphite_cache.cxx4
-rw-r--r--vcl/source/glyphs/graphite_layout.cxx75
-rw-r--r--vcl/source/glyphs/graphite_textsrc.hxx4
-rw-r--r--vcl/source/src/print.src1
-rw-r--r--vcl/source/window/dndevdis.cxx4
-rw-r--r--vcl/source/window/dndlcon.cxx2
-rw-r--r--vcl/source/window/menu.cxx2
-rw-r--r--vcl/source/window/printdlg.cxx6
-rw-r--r--vcl/source/window/splitwin.cxx73
-rw-r--r--vcl/source/window/taskpanelist.cxx2
-rw-r--r--vcl/source/window/window.cxx4
-rw-r--r--vcl/source/window/winproc.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkutil.cxx5
-rw-r--r--vcl/unx/gtk/app/gtkdata.cxx9
-rw-r--r--vcl/unx/gtk/app/gtkinst.cxx2
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx81
-rw-r--r--vcl/unx/headless/svpinst.cxx8
-rw-r--r--vcl/unx/headless/svpinst.hxx6
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkgdi.hxx4
-rw-r--r--vcl/unx/inc/saldata.hxx2
-rw-r--r--vcl/unx/inc/salframe.h4
-rw-r--r--vcl/unx/inc/salinst.h6
-rw-r--r--vcl/unx/source/app/saldisp.cxx2
-rw-r--r--vcl/unx/source/app/salinst.cxx8
-rw-r--r--vcl/unx/source/dtrans/X11_selection.cxx102
-rw-r--r--vcl/unx/source/gdi/salgdi.cxx17
-rw-r--r--vcl/unx/source/window/salframe.cxx126
-rw-r--r--vcl/util/makefile2.pmk2
-rwxr-xr-xvcl/win/source/gdi/winlayout.cxx5
-rw-r--r--vos/inc/vos/execabl.hxx6
-rw-r--r--vos/inc/vos/macros.hxx3
-rw-r--r--vos/inc/vos/pipe.hxx16
-rw-r--r--vos/inc/vos/process.hxx2
-rw-r--r--vos/inc/vos/refernce.hxx2
-rw-r--r--vos/inc/vos/signal.hxx2
-rw-r--r--vos/inc/vos/socket.hxx42
-rw-r--r--vos/inc/vos/stream.hxx6
-rw-r--r--vos/inc/vos/thread.hxx6
-rw-r--r--vos/source/pipe.cxx2
-rw-r--r--vos/source/process.cxx2
-rw-r--r--vos/source/signal.cxx2
-rw-r--r--vos/source/thread.cxx2
-rw-r--r--vos/source/timer.cxx22
-rw-r--r--writerfilter/inc/dmapper/DomainMapper.hxx2
-rw-r--r--writerfilter/inc/resourcemodel/Protocol.hxx4
-rw-r--r--writerfilter/inc/resourcemodel/ResourceModelHelper.hxx (renamed from tools/inc/tools/eacopier.hxx)25
-rw-r--r--writerfilter/inc/resourcemodel/TagLogger.hxx13
-rw-r--r--writerfilter/inc/resourcemodel/util.hxx2
-rw-r--r--writerfilter/qa/complex/ooxml/LoadDocuments.java51
-rw-r--r--writerfilter/qa/complex/ooxml/makefile.mk90
-rwxr-xr-x[-rw-r--r--]writerfilter/source/dmapper/DomainMapper.cxx218
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx38
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx1395
-rwxr-xr-x[-rw-r--r--]writerfilter/source/dmapper/DomainMapper_Impl.hxx41
-rw-r--r--writerfilter/source/dmapper/FFData.xml58
-rw-r--r--writerfilter/source/dmapper/FFDataHandler.cxx483
-rw-r--r--writerfilter/source/dmapper/FFDataHandler.hxx161
-rw-r--r--writerfilter/source/dmapper/FieldTypes.hxx299
-rw-r--r--writerfilter/source/dmapper/FormControlHelper.cxx309
-rw-r--r--writerfilter/source/dmapper/FormControlHelper.hxx (renamed from tools/inc/tools/agapi.hxx)55
-rw-r--r--writerfilter/source/dmapper/PropertyIds.cxx2
-rw-r--r--writerfilter/source/dmapper/PropertyIds.hxx2
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx32
-rw-r--r--writerfilter/source/dmapper/PropertyMap.hxx2
-rw-r--r--writerfilter/source/dmapper/PropertyMapHelper.cxx4
-rw-r--r--writerfilter/source/dmapper/PropertyMapHelper.hxx2
-rwxr-xr-x[-rw-r--r--]writerfilter/source/dmapper/SettingsTable.cxx57
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx69
-rwxr-xr-xwriterfilter/source/dmapper/ThemeTable.cxx35
-rw-r--r--writerfilter/source/dmapper/dmapperLoggers.hxx2
-rw-r--r--writerfilter/source/dmapper/genclass.xsl707
-rwxr-xr-x[-rw-r--r--]writerfilter/source/dmapper/makefile.mk2
-rw-r--r--writerfilter/source/doctok/WW8DocumentImpl.cxx51
-rw-r--r--writerfilter/source/doctok/WW8DocumentImpl.hxx15
-rw-r--r--writerfilter/source/doctok/WW8FontTable.cxx5
-rw-r--r--writerfilter/source/doctok/WW8LFOTable.cxx7
-rw-r--r--writerfilter/source/doctok/WW8ListTable.cxx5
-rw-r--r--writerfilter/source/doctok/WW8ResourceModelImpl.cxx1
-rw-r--r--writerfilter/source/doctok/WW8StreamImpl.cxx4
-rw-r--r--writerfilter/source/doctok/WW8StructBase.cxx1
-rw-r--r--writerfilter/source/doctok/WW8StyleSheet.cxx5
-rw-r--r--writerfilter/source/doctok/doctokLoggers.hxx4
-rw-r--r--writerfilter/source/doctok/dopbase.xml91
-rw-r--r--writerfilter/source/doctok/makefile.mk1
-rw-r--r--writerfilter/source/doctok/resources.xmi4668
-rw-r--r--writerfilter/source/doctok/resources.xsl21
-rw-r--r--writerfilter/source/doctok/xmigen.xsl72
-rw-r--r--writerfilter/source/filter/ImportFilter.cxx19
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.cxx4
-rwxr-xr-xwriterfilter/source/ooxml/OOXMLFactory.cxx8
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.cxx160
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.hxx45
-rw-r--r--writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx7
-rw-r--r--writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx2
-rw-r--r--writerfilter/source/ooxml/OOXMLFastHelper.hxx7
-rw-r--r--writerfilter/source/ooxml/OOXMLParserState.cxx70
-rw-r--r--writerfilter/source/ooxml/OOXMLParserState.hxx18
-rw-r--r--writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx22
-rw-r--r--writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx9
-rw-r--r--writerfilter/source/ooxml/OOXMLStreamImpl.cxx16
-rw-r--r--writerfilter/source/ooxml/OOXMLStreamImpl.hxx4
-rw-r--r--writerfilter/source/ooxml/attrsprm.xsl142
-rw-r--r--writerfilter/source/ooxml/dummyannotate.xsl2
-rw-r--r--writerfilter/source/ooxml/factoryimpl_ns.xsl99
-rw-r--r--writerfilter/source/ooxml/fastresourcesimpl_dml-shapeProperties.xsl93
-rw-r--r--writerfilter/source/ooxml/model.xml71
-rw-r--r--writerfilter/source/ooxml/ooxmlLoggers.hxx3
-rwxr-xr-xwriterfilter/source/ooxml/status.sh6
-rw-r--r--writerfilter/source/resourcemodel/Protocol.cxx2
-rw-r--r--writerfilter/source/resourcemodel/ResourceModelHelper.cxx (renamed from writerfilter/source/doctok/util.hxx)37
-rw-r--r--writerfilter/source/resourcemodel/TagLogger.cxx125
-rw-r--r--writerfilter/source/resourcemodel/makefile.mk1
-rw-r--r--writerfilter/source/resourcemodel/resourcemodel.cxx6
-rw-r--r--writerfilter/source/resourcemodel/resourcemodel.hxx2
-rw-r--r--writerfilter/source/resourcemodel/util.cxx95
-rw-r--r--xmloff/inc/xmloff/xmltoken.hxx3
-rw-r--r--xmloff/source/core/xmltoken.cxx3
1117 files changed, 46567 insertions, 18576 deletions
diff --git a/automation/inc/automation/communi.hxx b/automation/inc/automation/communi.hxx
index 36a6660f1a6d..c1ed42a66b48 100644
--- a/automation/inc/automation/communi.hxx
+++ b/automation/inc/automation/communi.hxx
@@ -76,10 +76,10 @@ public:
CommunicationManagerClient( BOOL bUseMultiChannel = FALSE );
};
-class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public NAMESPACE_VOS(OThread)
+class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public vos::OThread
{
public:
- CommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket );
+ CommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket );
virtual ~CommunicationLinkViaSocket();
virtual BOOL IsCommunicationError();
@@ -101,8 +101,8 @@ protected:
virtual BOOL ShutdownCommunication();
ULONG nConnectionClosedEventId;
ULONG nDataReceivedEventId;
- NAMESPACE_VOS(OMutex) aMConnectionClosed; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
- NAMESPACE_VOS(OMutex) aMDataReceived; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
+ vos::OMutex aMConnectionClosed; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
+ vos::OMutex aMDataReceived; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
virtual void WaitForShutdown();
DECL_LINK( ShutdownLink, void* );
@@ -133,7 +133,7 @@ private:
void AddConnection( CommunicationLink *pNewConnection );
};
-class CommunicationManagerServerAcceptThread: public NAMESPACE_VOS(OThread)
+class CommunicationManagerServerAcceptThread: public vos::OThread
{
public:
CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, ULONG nPort, USHORT nMaxCon = CM_UNLIMITED_CONNECTIONS );
@@ -145,11 +145,11 @@ protected:
private:
CommunicationManagerServerViaSocket* pMyServer;
- NAMESPACE_VOS(OAcceptorSocket) *pAcceptorSocket;
+ vos::OAcceptorSocket *pAcceptorSocket;
ULONG nPortToListen;
USHORT nMaxConnections;
ULONG nAddConnectionEventId;
- NAMESPACE_VOS(OMutex) aMAddConnection; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
+ vos::OMutex aMAddConnection; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
void CallInfoMsg( InfoString aMsg ){ pMyServer->CallInfoMsg( aMsg ); }
CM_InfoType GetInfoType(){ return pMyServer->GetInfoType(); }
@@ -174,7 +174,7 @@ private:
ByteString aHostToTalk;
ULONG nPortToTalk;
protected:
- virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, NAMESPACE_VOS(OConnectorSocket) *pCS ){ return new CommunicationLinkViaSocket( pCM, pCS ); }
+ virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, vos::OConnectorSocket *pCS ){ return new CommunicationLinkViaSocket( pCM, pCS ); }
};
#endif
diff --git a/automation/inc/automation/simplecm.hxx b/automation/inc/automation/simplecm.hxx
index 018fdceba7d7..8f65e31b3471 100644
--- a/automation/inc/automation/simplecm.hxx
+++ b/automation/inc/automation/simplecm.hxx
@@ -337,14 +337,14 @@ private:
ByteString aMyName;
TCPIO* pTCPIO;
- NAMESPACE_VOS(OStreamSocket) *pStreamSocket;
+ vos::OStreamSocket *pStreamSocket;
protected:
- SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket );
+ SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket );
virtual ~SimpleCommunicationLinkViaSocket();
- NAMESPACE_VOS(OStreamSocket)* GetStreamSocket() { return pStreamSocket; }
- void SetStreamSocket( NAMESPACE_VOS(OStreamSocket)* pSocket );
+ vos::OStreamSocket* GetStreamSocket() { return pStreamSocket; }
+ void SetStreamSocket( vos::OStreamSocket* pSocket );
SvStream *pReceiveStream;
BOOL DoReceiveDataStream(); /// Recieve DataPacket from Socket
@@ -358,7 +358,7 @@ protected:
class SimpleCommunicationLinkViaSocketWithReceiveCallbacks : public SimpleCommunicationLinkViaSocket
{
public:
- SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket );
+ SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, vos::OStreamSocket *pSocket );
~SimpleCommunicationLinkViaSocketWithReceiveCallbacks();
virtual BOOL ReceiveDataStream();
protected:
@@ -371,7 +371,7 @@ class CommonSocketFunctions
public:
BOOL DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, ULONG nPort );
protected:
- virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, NAMESPACE_VOS(OConnectorSocket) *pCS )=0;
+ virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, vos::OConnectorSocket *pCS )=0;
};
class SingleCommunicationManagerClientViaSocket : public SingleCommunicationManager, public ICommunicationManagerClient, CommonSocketFunctions
@@ -387,7 +387,7 @@ private:
ByteString aHostToTalk;
ULONG nPortToTalk;
protected:
- virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, NAMESPACE_VOS(OConnectorSocket) *pCS ){ return new SimpleCommunicationLinkViaSocketWithReceiveCallbacks( pCM, pCS ); }
+ virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, vos::OConnectorSocket *pCS ){ return new SimpleCommunicationLinkViaSocketWithReceiveCallbacks( pCM, pCS ); }
};
#endif
diff --git a/automation/source/communi/communi.cxx b/automation/source/communi/communi.cxx
index e62e060ba89c..4cc944ed9702 100644
--- a/automation/source/communi/communi.cxx
+++ b/automation/source/communi/communi.cxx
@@ -66,9 +66,9 @@ _SV_SEEK_PTR( nm, AE )
SV_IMPL_PTRARR_SORT( CommunicationLinkList, CommunicationLink* );
-NAMESPACE_VOS(OMutex) *pMPostUserEvent=NULL; // Notwendig, da nicht threadfest
+vos::OMutex *pMPostUserEvent=NULL; // Notwendig, da nicht threadfest
-CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket )
+CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket )
: SimpleCommunicationLinkViaSocket( pMan, pSocket )
, nConnectionClosedEventId( 0 )
, nDataReceivedEventId( 0 )
@@ -77,7 +77,7 @@ CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pM
{
SetPutDataReceivedHdl(LINK( this, CommunicationLinkViaSocket, PutDataReceivedHdl ));
if ( !pMPostUserEvent )
- pMPostUserEvent = new NAMESPACE_VOS(OMutex);
+ pMPostUserEvent = new vos::OMutex;
// this is necassary to prevent the running thread from sending the close event
// before the open event has been sent.
StartCallback();
@@ -92,7 +92,7 @@ CommunicationLinkViaSocket::~CommunicationLinkViaSocket()
while ( nConnectionClosedEventId || nDataReceivedEventId )
GetpApp()->Yield();
{
- NAMESPACE_VOS(OGuard) aGuard( aMConnectionClosed );
+ vos::OGuard aGuard( aMConnectionClosed );
if ( nConnectionClosedEventId )
{
GetpApp()->RemoveUserEvent( nConnectionClosedEventId );
@@ -103,7 +103,7 @@ CommunicationLinkViaSocket::~CommunicationLinkViaSocket()
}
}
{
- NAMESPACE_VOS(OGuard) aGuard( aMDataReceived );
+ vos::OGuard aGuard( aMDataReceived );
if ( nDataReceivedEventId )
{
GetpApp()->RemoveUserEvent( nDataReceivedEventId );
@@ -132,7 +132,7 @@ BOOL CommunicationLinkViaSocket::ShutdownCommunication()
join();
- NAMESPACE_VOS(OStreamSocket) *pTempSocket = GetStreamSocket();
+ vos::OStreamSocket *pTempSocket = GetStreamSocket();
SetStreamSocket( NULL );
delete pTempSocket;
@@ -209,8 +209,8 @@ void CommunicationLinkViaSocket::run()
SetNewPacketAsCurrent();
StartCallback();
{
- NAMESPACE_VOS(OGuard) aGuard( aMDataReceived );
- NAMESPACE_VOS(OGuard) aGuard2( *pMPostUserEvent );
+ vos::OGuard aGuard( aMDataReceived );
+ vos::OGuard aGuard2( *pMPostUserEvent );
mlPutDataReceived.Call(this);
}
}
@@ -220,8 +220,8 @@ void CommunicationLinkViaSocket::run()
StartCallback();
{
- NAMESPACE_VOS(OGuard) aGuard( aMConnectionClosed );
- NAMESPACE_VOS(OGuard) aGuard2( *pMPostUserEvent );
+ vos::OGuard aGuard( aMConnectionClosed );
+ vos::OGuard aGuard2( *pMPostUserEvent );
nConnectionClosedEventId = GetpApp()->PostUserEvent( LINK( this, CommunicationLinkViaSocket, ConnectionClosed ) );
}
}
@@ -238,7 +238,7 @@ BOOL CommunicationLinkViaSocket::DoTransferDataStream( SvStream *pDataStream, CM
long CommunicationLinkViaSocket::ConnectionClosed( void* EMPTYARG )
{
{
- NAMESPACE_VOS(OGuard) aGuard( aMConnectionClosed );
+ vos::OGuard aGuard( aMConnectionClosed );
nConnectionClosedEventId = 0; // Achtung!! alles andere muß oben gemacht werden.
}
ShutdownCommunication();
@@ -249,7 +249,7 @@ long CommunicationLinkViaSocket::ConnectionClosed( void* EMPTYARG )
long CommunicationLinkViaSocket::DataReceived( void* EMPTYARG )
{
{
- NAMESPACE_VOS(OGuard) aGuard( aMDataReceived );
+ vos::OGuard aGuard( aMDataReceived );
nDataReceivedEventId = 0; // Achtung!! alles andere muß oben gemacht werden.
}
return CommunicationLink::DataReceived( );
@@ -453,7 +453,7 @@ CommunicationManagerServerAcceptThread::CommunicationManagerServerAcceptThread(
, xmNewConnection( NULL )
{
if ( !pMPostUserEvent )
- pMPostUserEvent = new NAMESPACE_VOS(OMutex);
+ pMPostUserEvent = new vos::OMutex;
create();
}
@@ -480,7 +480,7 @@ CommunicationManagerServerAcceptThread::~CommunicationManagerServerAcceptThread(
DEBUGPRINTF ("Destructor CommunicationManagerServerAcceptThread Übersprungen!!!! (wegen Solaris BUG)\n");
#endif
{
- NAMESPACE_VOS(OGuard) aGuard( aMAddConnection );
+ vos::OGuard aGuard( aMAddConnection );
if ( nAddConnectionEventId )
{
GetpApp()->RemoveUserEvent( nAddConnectionEventId );
@@ -500,8 +500,8 @@ void CommunicationManagerServerAcceptThread::run()
if ( !nPortToListen )
return;
- pAcceptorSocket = new NAMESPACE_VOS(OAcceptorSocket)();
- NAMESPACE_VOS(OInetSocketAddr) Addr;
+ pAcceptorSocket = new vos::OAcceptorSocket();
+ vos::OInetSocketAddr Addr;
Addr.setPort( nPortToListen );
pAcceptorSocket->setReuseAddr( 1 );
if ( !pAcceptorSocket->bind( Addr ) )
@@ -514,14 +514,14 @@ void CommunicationManagerServerAcceptThread::run()
}
- NAMESPACE_VOS(OStreamSocket) *pStreamSocket = NULL;
+ vos::OStreamSocket *pStreamSocket = NULL;
while ( schedule() )
{
- pStreamSocket = new NAMESPACE_VOS(OStreamSocket);
+ pStreamSocket = new vos::OStreamSocket;
switch ( pAcceptorSocket->acceptConnection( *pStreamSocket ) )
{
- case NAMESPACE_VOS(ISocketTypes::TResult_Ok):
+ case vos::ISocketTypes::TResult_Ok:
{
pStreamSocket->setTcpNoDelay( 1 );
@@ -531,23 +531,23 @@ void CommunicationManagerServerAcceptThread::run()
xmNewConnection = new CommunicationLinkViaSocket( pMyServer, pStreamSocket );
xmNewConnection->StartCallback();
{
- NAMESPACE_VOS(OGuard) aGuard( aMAddConnection );
- NAMESPACE_VOS(OGuard) aGuard2( *pMPostUserEvent );
+ vos::OGuard aGuard( aMAddConnection );
+ vos::OGuard aGuard2( *pMPostUserEvent );
nAddConnectionEventId = GetpApp()->PostUserEvent( LINK( this, CommunicationManagerServerAcceptThread, AddConnection ) );
}
}
break;
- case NAMESPACE_VOS(ISocketTypes::TResult_TimedOut):
+ case vos::ISocketTypes::TResult_TimedOut:
delete pStreamSocket;
pStreamSocket = NULL;
break;
- case NAMESPACE_VOS(ISocketTypes::TResult_Error):
+ case vos::ISocketTypes::TResult_Error:
delete pStreamSocket;
pStreamSocket = NULL;
break;
- case NAMESPACE_VOS(ISocketTypes::TResult_Interrupted):
- case NAMESPACE_VOS(ISocketTypes::TResult_InProgress):
+ case vos::ISocketTypes::TResult_Interrupted:
+ case vos::ISocketTypes::TResult_InProgress:
break; // -Wall not handled...
}
}
@@ -557,7 +557,7 @@ void CommunicationManagerServerAcceptThread::run()
IMPL_LINK( CommunicationManagerServerAcceptThread, AddConnection, void*, EMPTYARG )
{
{
- NAMESPACE_VOS(OGuard) aGuard( aMAddConnection );
+ vos::OGuard aGuard( aMAddConnection );
nAddConnectionEventId = 0;
}
pMyServer->AddConnection( xmNewConnection );
diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx
index bfe6c30364ad..e5ea0ef6f357 100644
--- a/automation/source/server/statemnt.cxx
+++ b/automation/source/server/statemnt.cxx
@@ -3083,13 +3083,6 @@ BOOL StatementCommand::Execute()
nDirFlags = nFlags = Sb_ATTR_HIDDEN | Sb_ATTR_SYSTEM | Sb_ATTR_DIRECTORY;
// Nur diese Bitmaske ist unter Windows erlaubt
- #ifdef WIN
- if( nFlags & ~0x1E )
- {
- nDirFlags = 0;
- StarBASIC::Error( SbERR_BAD_ARGUMENT );
- }
- #endif
// Sb_ATTR_VOLUME wird getrennt gehandelt
if( nDirFlags & Sb_ATTR_VOLUME )
aPath = aEntry.GetVolume();
@@ -3121,31 +3114,7 @@ BOOL StatementCommand::Execute()
}
DirEntry aNextEntry=(*(pDir))[nDirPos++];
aPath = aNextEntry.GetName(); //Full();
- #ifdef WIN
- aNextEntry.ToAbs();
- String sFull(aNextEntry.GetFull());
- unsigned nFlags;
-
- if (_dos_getfileattr( sFull.GetStr(), &nFlags ))
- nErrorcode = FSYS_ERR_NOTEXISTS;
- else
- {
- INT16 nCurFlags = nDirFlags;
- if( (nCurFlags == Sb_ATTR_NORMAL)
- && !(nFlags & ( _A_HIDDEN | _A_SYSTEM | _A_VOLID | _A_SUBDIR ) ) )
- break;
- else if( (nCurFlags & Sb_ATTR_HIDDEN) && (nFlags & _A_HIDDEN) )
- break;
- else if( (nCurFlags & Sb_ATTR_SYSTEM) && (nFlags & _A_SYSTEM) )
- break;
- else if( (nCurFlags & Sb_ATTR_VOLUME) && (nFlags & _A_VOLID) )
- break;
- else if( (nCurFlags & Sb_ATTR_DIRECTORY) && (nFlags & _A_SUBDIR) )
- break;
- }
- #else
break;
- #endif
}
}
if ( !nErrorcode )
diff --git a/automation/source/simplecm/simplecm.cxx b/automation/source/simplecm/simplecm.cxx
index 92642e8cd7c5..bebd4fc9b206 100644
--- a/automation/source/simplecm/simplecm.cxx
+++ b/automation/source/simplecm/simplecm.cxx
@@ -136,7 +136,7 @@ void CommunicationLink::SetApplication( const ByteString& aApp )
}
-SimpleCommunicationLinkViaSocket::SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket )
+SimpleCommunicationLinkViaSocket::SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket )
: CommunicationLink( pMan )
, aCommunicationPartner()
, aMyName()
@@ -158,7 +158,7 @@ SimpleCommunicationLinkViaSocket::~SimpleCommunicationLinkViaSocket()
pStreamSocket = NULL;
}
-void SimpleCommunicationLinkViaSocket::SetStreamSocket( NAMESPACE_VOS(OStreamSocket)* pSocket )
+void SimpleCommunicationLinkViaSocket::SetStreamSocket( vos::OStreamSocket* pSocket )
{
if ( pTCPIO )
pTCPIO->SetStreamSocket( pSocket );
@@ -202,9 +202,9 @@ ByteString SimpleCommunicationLinkViaSocket::GetCommunicationPartner( CM_NameTyp
case CM_DOTTED:
{
rtl::OUString aDotted;
- NAMESPACE_VOS(OSocketAddr) *pPeerAdr = new NAMESPACE_VOS(OSocketAddr);
+ vos::OSocketAddr *pPeerAdr = new vos::OSocketAddr;
pStreamSocket->getPeerAddr( *pPeerAdr );
- ((NAMESPACE_VOS(OInetSocketAddr*))pPeerAdr)->getDottedAddr( aDotted );
+ ((vos::OInetSocketAddr*)pPeerAdr)->getDottedAddr( aDotted );
delete pPeerAdr;
return ByteString( UniString(aDotted), RTL_TEXTENCODING_UTF8 );
}
@@ -234,9 +234,9 @@ ByteString SimpleCommunicationLinkViaSocket::GetMyName( CM_NameType eType )
case CM_DOTTED:
{
rtl::OUString aDotted;
- NAMESPACE_VOS(OSocketAddr) *pPeerAdr = new NAMESPACE_VOS(OSocketAddr);
+ vos::OSocketAddr *pPeerAdr = new vos::OSocketAddr;
pStreamSocket->getLocalAddr( *pPeerAdr );
- ((NAMESPACE_VOS(OInetSocketAddr*))pPeerAdr)->getDottedAddr( aDotted );
+ ((vos::OInetSocketAddr*)pPeerAdr)->getDottedAddr( aDotted );
delete pPeerAdr;
return ByteString( UniString(aDotted), RTL_TEXTENCODING_UTF8 );
}
@@ -352,7 +352,7 @@ BOOL SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandshakeTy
return !bWasError;
}
-SimpleCommunicationLinkViaSocketWithReceiveCallbacks::SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket )
+SimpleCommunicationLinkViaSocketWithReceiveCallbacks::SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, vos::OStreamSocket *pSocket )
: SimpleCommunicationLinkViaSocket( pMan, pSocket )
{
}
@@ -396,7 +396,7 @@ BOOL SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication
if ( GetStreamSocket() )
GetStreamSocket()->close();
- NAMESPACE_VOS(OStreamSocket) *pTempSocket = GetStreamSocket();
+ vos::OStreamSocket *pTempSocket = GetStreamSocket();
SetStreamSocket( NULL );
delete pTempSocket;
@@ -437,7 +437,7 @@ BOOL CommunicationManager::StartCommunication( ByteString aHost, ULONG nPort )
ByteString CommunicationManager::GetMyName( CM_NameType )
{
rtl::OUString aHostname;
- NAMESPACE_VOS(OSocketAddr)::getLocalHostname( aHostname );
+ vos::OSocketAddr::getLocalHostname( aHostname );
return ByteString( UniString(aHostname), RTL_TEXTENCODING_UTF8 );
}
@@ -672,8 +672,8 @@ SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSo
BOOL CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, ULONG nPort )
{
- NAMESPACE_VOS(OInetSocketAddr) Addr;
- NAMESPACE_VOS(OConnectorSocket) *pConnSocket;
+ vos::OInetSocketAddr Addr;
+ vos::OConnectorSocket *pConnSocket;
Addr.setAddr( rtl::OUString( UniString( aHost, RTL_TEXTENCODING_UTF8 ) ) );
Addr.setPort( nPort );
@@ -683,9 +683,9 @@ BOOL CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICo
aTV.Nanosec = 0;
do
{
- pConnSocket = new NAMESPACE_VOS(OConnectorSocket)();
+ pConnSocket = new vos::OConnectorSocket();
pConnSocket->setTcpNoDelay( 1 );
- if ( pConnSocket->connect( Addr, &aTV ) == NAMESPACE_VOS(ISocketTypes::TResult_Ok) )
+ if ( pConnSocket->connect( Addr, &aTV ) == vos::ISocketTypes::TResult_Ok )
{
pConnSocket->setTcpNoDelay( 1 );
diff --git a/automation/source/simplecm/tcpio.cxx b/automation/source/simplecm/tcpio.cxx
index 5498e3a69774..7cd090c6bfb8 100644
--- a/automation/source/simplecm/tcpio.cxx
+++ b/automation/source/simplecm/tcpio.cxx
@@ -63,7 +63,7 @@ comm_USHORT TCPIO::ReceiveBytes( void* pBuffer, comm_UINT32 nLen )
// helper
-void TCPIO::SetStreamSocket( NAMESPACE_VOS(OStreamSocket) *pSocket )
+void TCPIO::SetStreamSocket( vos::OStreamSocket *pSocket )
{
vos::OGuard aRGuard( aMSocketReadAccess );
vos::OGuard aWGuard( aMSocketWriteAccess );
diff --git a/automation/source/simplecm/tcpio.hxx b/automation/source/simplecm/tcpio.hxx
index 626f164ba0f5..5b6a997917e5 100644
--- a/automation/source/simplecm/tcpio.hxx
+++ b/automation/source/simplecm/tcpio.hxx
@@ -36,14 +36,14 @@
class TCPIO : public ITransmiter, public IReceiver
{
private:
- NAMESPACE_VOS(OStreamSocket) *pStreamSocket;
+ vos::OStreamSocket *pStreamSocket;
vos::OMutex aMSocketReadAccess;
vos::OMutex aMSocketWriteAccess;
public:
///
- TCPIO( NAMESPACE_VOS(OStreamSocket) *pSocket ):pStreamSocket( pSocket ){}
+ TCPIO( vos::OStreamSocket *pSocket ):pStreamSocket( pSocket ){}
virtual ~TCPIO(){}
@@ -54,7 +54,7 @@ public:
virtual comm_USHORT ReceiveBytes( void* pBuffer, comm_UINT32 nLen );
// helper
- void SetStreamSocket( NAMESPACE_VOS(OStreamSocket) *pSocket );
+ void SetStreamSocket( vos::OStreamSocket *pSocket );
};
diff --git a/automation/source/testtool/httprequest.cxx b/automation/source/testtool/httprequest.cxx
index 1e45fd1fc976..d8118b996ee9 100644
--- a/automation/source/testtool/httprequest.cxx
+++ b/automation/source/testtool/httprequest.cxx
@@ -78,7 +78,7 @@ BOOL HttpRequest::Execute()
Init();
// Open channel to standard redir host
- NAMESPACE_VOS(OInetSocketAddr) aConnectAddr;
+ vos::OInetSocketAddr aConnectAddr;
if ( aProxyHost.Len() )
{
@@ -95,8 +95,8 @@ BOOL HttpRequest::Execute()
aTV.Seconds = 10; // Warte 10 Sekunden
aTV.Nanosec = 0;
- pOutSocket = new NAMESPACE_VOS(OConnectorSocket)();
- if ( pOutSocket->connect( aConnectAddr, &aTV ) == NAMESPACE_VOS(ISocketTypes::TResult_Ok) )
+ pOutSocket = new vos::OConnectorSocket();
+ if ( pOutSocket->connect( aConnectAddr, &aTV ) == vos::ISocketTypes::TResult_Ok )
{
// pOutSocket->setTcpNoDelay( 1 );
}
diff --git a/avmedia/source/gstreamer/gstwindow.cxx b/avmedia/source/gstreamer/gstwindow.cxx
index 3b24e9974a3f..12606ad5e88b 100644
--- a/avmedia/source/gstreamer/gstwindow.cxx
+++ b/avmedia/source/gstreamer/gstwindow.cxx
@@ -259,7 +259,7 @@ value in sequence of arguments" );
if( !mpPlayerWindow && ( rArguments.getLength() > 2 ) )
{
SystemChildWindow* pParentWindow = NULL;
- sal_IntPtr pIntPtr = NULL;
+ sal_IntPtr pIntPtr = 0;
// we are not interested in the first argument, which is a pure X11 window handle;
// this backend relies on a SystemChildWindow as parent for the PlayerWindow, given
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index f4a3c1d48fc7..84291656c755 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -91,9 +91,7 @@ using namespace ::com::sun::star::io;
using namespace ::com::sun::star::resource;
using namespace ::com::sun::star::ui::dialogs;
-#if defined(MAC)
-#define FILTERMASK_ALL "****"
-#elif defined(OW) || defined(MTF)
+#if defined(UNX)
#define FILTERMASK_ALL "*"
#elif defined(PM2)
#define FILTERMASK_ALL ""
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index bef969db9266..3a3a162f5b5e 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -51,7 +51,6 @@
#include <tools/diagnose_ex.h>
#include <sfx2/sfxdefs.hxx>
#include <sfx2/signaturestate.hxx>
-#include <com/sun/star/script/XVBAModuleInfo.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 0709fe38cbe2..79f3cdb84c6b 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -52,9 +52,8 @@
#include <comphelper/componentcontext.hxx>
#include <map>
#include <com/sun/star/script/ModuleType.hpp>
-#include <com/sun/star/script/XVBAModuleInfo.hpp>
+#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/script/XVBAModuleInfo.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/container/XNamed.hpp>
@@ -65,7 +64,7 @@ void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameCont
{
try
{
- uno::Reference< script::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY );
+ uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY );
if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( rModName ) )
{
script::ModuleInfo aModuleInfo = xVBAModuleInfo->getModuleInfo( rModName );
@@ -86,8 +85,8 @@ void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameCont
sal_Int32 ModuleInfoHelper::getModuleType( const uno::Reference< container::XNameContainer >& rLib, const String& rModName )
{
- sal_Int32 nType = com::sun::star::script::ModuleType::NORMAL;
- uno::Reference< script::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY );
+ sal_Int32 nType = script::ModuleType::NORMAL;
+ uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY );
if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( rModName ) )
{
script::ModuleInfo aModuleInfo = xVBAModuleInfo->getModuleInfo( rModName );
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index 1f1d8ab6145b..6b16316d889c 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -53,8 +53,8 @@
#include <com/sun/star/frame/XModel2.hpp>
#include <com/sun/star/awt/XWindow2.hpp>
#include <com/sun/star/document/XEmbeddedScripts.hpp>
-#include <com/sun/star/script/XVBAModuleInfo.hpp>
-#include <com/sun/star/script/XVBACompat.hpp>
+#include <com/sun/star/script/vba/XVBACompatibility.hpp>
+#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
/** === end UNO includes === **/
#include <sfx2/objsh.hxx>
@@ -142,8 +142,8 @@ namespace basctl
using ::com::sun::star::document::XEventBroadcaster;
using ::com::sun::star::document::XEmbeddedScripts;
using ::com::sun::star::script::ModuleInfo;
- using ::com::sun::star::script::XVBAModuleInfo;
- using ::com::sun::star::script::XVBACompat;
+ using ::com::sun::star::script::vba::XVBACompatibility;
+ using ::com::sun::star::script::vba::XVBAModuleInfo;
/** === end UNO using === **/
namespace MacroExecMode = ::com::sun::star::document::MacroExecMode;
namespace FrameSearchFlag = ::com::sun::star::frame::FrameSearchFlag;
@@ -456,9 +456,9 @@ namespace basctl
#ifdef FUTURE_VBA_CWS
if ( !isApplication() )
{
- Reference< XVBACompat > xVBACompat( getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
+ Reference< XVBACompatibility > xVBACompat( getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
if ( xVBACompat.is() )
- bResult = xVBACompat->getVBACompatModeOn();
+ bResult = xVBACompat->getVBACompatibilityMode();
}
#endif
return bResult;
diff --git a/basebmp/test/basictest.cxx b/basebmp/test/basictest.cxx
index 6f96cf56f492..a9c533a3a134 100644
--- a/basebmp/test/basictest.cxx
+++ b/basebmp/test/basictest.cxx
@@ -27,10 +27,12 @@
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
#include "cppunit/plugin/TestPlugIn.h"
+#include "postextstl.h"
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/point/b2ipoint.hxx>
diff --git a/basebmp/test/bmpmasktest.cxx b/basebmp/test/bmpmasktest.cxx
index 9be504819fe8..29e261423a06 100644
--- a/basebmp/test/bmpmasktest.cxx
+++ b/basebmp/test/bmpmasktest.cxx
@@ -27,9 +27,11 @@
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/range/b2irange.hxx>
diff --git a/basebmp/test/bmptest.cxx b/basebmp/test/bmptest.cxx
index 9e33f0a8d713..9d083980790b 100644
--- a/basebmp/test/bmptest.cxx
+++ b/basebmp/test/bmptest.cxx
@@ -27,9 +27,11 @@
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/range/b2irange.hxx>
diff --git a/basebmp/test/cliptest.cxx b/basebmp/test/cliptest.cxx
index 875016d878cc..b0f0b72f07e0 100644
--- a/basebmp/test/cliptest.cxx
+++ b/basebmp/test/cliptest.cxx
@@ -27,9 +27,11 @@
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/point/b2ipoint.hxx>
diff --git a/basebmp/test/filltest.cxx b/basebmp/test/filltest.cxx
index 150fa11b3a72..d03e887dbcc5 100644
--- a/basebmp/test/filltest.cxx
+++ b/basebmp/test/filltest.cxx
@@ -27,9 +27,11 @@
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/range/b2drange.hxx>
diff --git a/basebmp/test/linetest.cxx b/basebmp/test/linetest.cxx
index fcd383fccdb0..dbdbe57de0a7 100644
--- a/basebmp/test/linetest.cxx
+++ b/basebmp/test/linetest.cxx
@@ -27,9 +27,11 @@
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/point/b2ipoint.hxx>
diff --git a/basebmp/test/makefile.mk b/basebmp/test/makefile.mk
index ca77721716f7..8dc95dcea0e5 100644
--- a/basebmp/test/makefile.mk
+++ b/basebmp/test/makefile.mk
@@ -60,6 +60,13 @@ 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/basebmp/test/masktest.cxx b/basebmp/test/masktest.cxx
index 77cd05588d5a..63f357a314d0 100644
--- a/basebmp/test/masktest.cxx
+++ b/basebmp/test/masktest.cxx
@@ -27,9 +27,11 @@
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/range/b2irange.hxx>
diff --git a/basebmp/test/polytest.cxx b/basebmp/test/polytest.cxx
index f3b1f0018e17..2feef67774de 100644
--- a/basebmp/test/polytest.cxx
+++ b/basebmp/test/polytest.cxx
@@ -27,9 +27,11 @@
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/range/b2irange.hxx>
diff --git a/basegfx/source/curve/b2dcubicbezier.cxx b/basegfx/source/curve/b2dcubicbezier.cxx
index 80bd8922160b..adf819a214a1 100644
--- a/basegfx/source/curve/b2dcubicbezier.cxx
+++ b/basegfx/source/curve/b2dcubicbezier.cxx
@@ -996,12 +996,11 @@ namespace basegfx
if( fD >= 0.0 )
{
const double fS = sqrt(fD);
- // same as above but for very small fAX and/or fCX
- // this has much better numerical stability
- // see NRC chapter 5-6 (thanks THB!)
- const double fQ = fBX + ((fBX >= 0) ? +fS : -fS);
+ // calculate both roots (avoiding a numerically unstable subtraction)
+ const double fQ = -(fBX + ((fBX >= 0) ? +fS : -fS));
impCheckExtremumResult(fQ / fAX, rResults);
- impCheckExtremumResult(fCX / fQ, rResults);
+ if( fD > 0.0 ) // ignore root multiplicity
+ impCheckExtremumResult(fCX / fQ, rResults);
}
}
else if( !fTools::equalZero(fBX) )
@@ -1028,12 +1027,11 @@ namespace basegfx
if( fD >= 0 )
{
const double fS = sqrt(fD);
- // same as above but for very small fAX and/or fCX
- // this has much better numerical stability
- // see NRC chapter 5-6 (thanks THB!)
- const double fQ = fBY + ((fBY >= 0) ? +fS : -fS);
+ // calculate both roots (avoiding a numerically unstable subtraction)
+ const double fQ = -(fBY + ((fBY >= 0) ? +fS : -fS));
impCheckExtremumResult(fQ / fAY, rResults);
- impCheckExtremumResult(fCY / fQ, rResults);
+ if( fD > 0.0 ) // ignore root multiplicity, TODO: use equalZero() instead?
+ impCheckExtremumResult(fCY / fQ, rResults);
}
}
else if( !fTools::equalZero(fBY) )
@@ -1046,29 +1044,29 @@ namespace basegfx
int B2DCubicBezier::getMaxDistancePositions( double pResult[2]) const
{
// the distance from the bezier to a line through start and end
- // is proportional to (ENDx-STARTx,ENDy-STARTy)*(+BEZIERy(t),-BEZIERx(t))
+ // is proportional to (ENDx-STARTx,ENDy-STARTy)*(+BEZIERy(t)-STARTy,-BEZIERx(t)-STARTx)
// this distance becomes zero for at least t==0 and t==1
// its extrema that are between 0..1 are interesting as split candidates
// its derived function has the form dD/dt = fA*t^2 + 2*fB*t + fC
const B2DPoint aRelativeEndPoint(maEndPoint-maStartPoint);
- const double fA = 3 * (maEndPoint.getX() - maControlPointB.getX()) * aRelativeEndPoint.getY()
- - 3 * (maEndPoint.getY() - maControlPointB.getY()) * aRelativeEndPoint.getX();
- const double fB = (maControlPointB.getX() - maControlPointA.getX()) * aRelativeEndPoint.getY()
- - (maControlPointB.getY() - maControlPointA.getY()) * aRelativeEndPoint.getX();
+ const double fA = (3 * (maControlPointA.getX() - maControlPointB.getX()) + aRelativeEndPoint.getX()) * aRelativeEndPoint.getY()
+ - (3 * (maControlPointA.getY() - maControlPointB.getY()) + aRelativeEndPoint.getY()) * aRelativeEndPoint.getX();
+ const double fB = (maControlPointB.getX() - 2 * maControlPointA.getX() + maStartPoint.getX()) * aRelativeEndPoint.getY()
+ - (maControlPointB.getY() - 2 * maControlPointA.getY() + maStartPoint.getY()) * aRelativeEndPoint.getX();
const double fC = (maControlPointA.getX() - maStartPoint.getX()) * aRelativeEndPoint.getY()
- (maControlPointA.getY() - maStartPoint.getY()) * aRelativeEndPoint.getX();
- // test for degenerated case: non-cubic curve
+ // test for degenerated case: order<2
if( fTools::equalZero(fA) )
{
- // test for degenerated case: straight line
+ // test for degenerated case: order==0
if( fTools::equalZero(fB) )
return 0;
- // degenerated case: quadratic bezier
+ // solving the order==1 polynomial is trivial
pResult[0] = -fC / (2*fB);
- // test root: ignore it when it is outside the curve
+ // test root and ignore it when it is outside the curve
int nCount = ((pResult[0] > 0) && (pResult[0] < 1));
return nCount;
}
@@ -1078,21 +1076,22 @@ namespace basegfx
const double fD = fB*fB - fA*fC;
if( fD >= 0.0 ) // TODO: is this test needed? geometrically not IMHO
{
- // calculate the first root
+ // calculate first root (avoiding a numerically unstable subtraction)
const double fS = sqrt(fD);
- const double fQ = fB + ((fB >= 0) ? +fS : -fS);
+ const double fQ = -(fB + ((fB >= 0) ? +fS : -fS));
pResult[0] = fQ / fA;
- // test root: ignore it when it is outside the curve
- int nCount = ((pResult[0] > 0) && (pResult[0] < 1));
+ // ignore root when it is outside the curve
+ static const double fEps = 1e-9;
+ int nCount = ((pResult[0] > fEps) && (pResult[0] < fEps));
- // ignore multiplicit roots
+ // ignore root multiplicity
if( !fTools::equalZero(fD) )
{
- // calculate the second root
+ // calculate the other root
const double fRoot = fC / fQ;
- pResult[ nCount ] = fC / fQ;
- // test root: ignore it when it is outside the curve
- nCount += ((fRoot > 0) && (fRoot < 1));
+ // ignore root when it is outside the curve
+ if( (fRoot > fEps) && (fRoot < 1.0-fEps) )
+ pResult[ nCount++ ] = fRoot;
}
return nCount;
diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx
index 4cd63f938114..c1e0f7f6c7c1 100644
--- a/basegfx/source/polygon/b2dtrapezoid.cxx
+++ b/basegfx/source/polygon/b2dtrapezoid.cxx
@@ -1161,7 +1161,8 @@ namespace basegfx
if(aSource.areControlPointsUsed())
{
- aSource = aSource.getDefaultAdaptiveSubdivision();
+ const double fPrecisionFactor = 0.25;
+ aSource = adaptiveSubdivideByDistance( aSource, fLineWidth * fPrecisionFactor );
}
const sal_uInt32 nPointCount(aSource.count());
diff --git a/basegfx/test/basegfx1d.cxx b/basegfx/test/basegfx1d.cxx
index 41ac65da56e3..9b189bd8b236 100644
--- a/basegfx/test/basegfx1d.cxx
+++ b/basegfx/test/basegfx1d.cxx
@@ -30,10 +30,12 @@
#include "precompiled_basegfx.hxx"
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
#include "cppunit/plugin/TestPlugIn.h"
+#include "postextstl.h"
namespace basegfx1d
{
diff --git a/basegfx/test/basegfx2d.cxx b/basegfx/test/basegfx2d.cxx
index 31005a158982..53501d190c03 100644
--- a/basegfx/test/basegfx2d.cxx
+++ b/basegfx/test/basegfx2d.cxx
@@ -30,9 +30,11 @@
#include "precompiled_basegfx.hxx"
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
diff --git a/basegfx/test/basegfx3d.cxx b/basegfx/test/basegfx3d.cxx
index a16132e0810f..4871dcbd16c4 100644
--- a/basegfx/test/basegfx3d.cxx
+++ b/basegfx/test/basegfx3d.cxx
@@ -30,9 +30,11 @@
#include "precompiled_basegfx.hxx"
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
namespace basegfx3d
{
diff --git a/basegfx/test/basegfxtools.cxx b/basegfx/test/basegfxtools.cxx
index 1a8b97a559b2..7e385f1eb78c 100644
--- a/basegfx/test/basegfxtools.cxx
+++ b/basegfx/test/basegfxtools.cxx
@@ -30,9 +30,11 @@
#include "precompiled_basegfx.hxx"
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
#include <basegfx/tools/keystoplerp.hxx>
#include <basegfx/numeric/ftools.hxx>
diff --git a/basegfx/test/boxclipper.cxx b/basegfx/test/boxclipper.cxx
index d52218a51ee0..b1e08087136f 100644
--- a/basegfx/test/boxclipper.cxx
+++ b/basegfx/test/boxclipper.cxx
@@ -30,9 +30,11 @@
#include "precompiled_basegfx.hxx"
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/curve/b2dcubicbezier.hxx>
diff --git a/basegfx/test/clipstate.cxx b/basegfx/test/clipstate.cxx
index 3d9f59979aa7..48c1e5967260 100644
--- a/basegfx/test/clipstate.cxx
+++ b/basegfx/test/clipstate.cxx
@@ -30,9 +30,11 @@
#include "precompiled_basegfx.hxx"
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
#include <basegfx/tools/b2dclipstate.hxx>
#include <basegfx/range/b2dpolyrange.hxx>
diff --git a/basegfx/test/genericclipper.cxx b/basegfx/test/genericclipper.cxx
index 84230a084493..d6c97c0567dc 100644
--- a/basegfx/test/genericclipper.cxx
+++ b/basegfx/test/genericclipper.cxx
@@ -30,9 +30,11 @@
#include "precompiled_basegfx.hxx"
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/curve/b2dcubicbezier.hxx>
diff --git a/basegfx/test/makefile.mk b/basegfx/test/makefile.mk
index 2c0f30c291a9..09d8b805f9f5 100644
--- a/basegfx/test/makefile.mk
+++ b/basegfx/test/makefile.mk
@@ -36,6 +36,13 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
+#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/basic/inc/basic/process.hxx b/basic/inc/basic/process.hxx
index 20cdbe1d4aa4..9a593322b896 100644
--- a/basic/inc/basic/process.hxx
+++ b/basic/inc/basic/process.hxx
@@ -39,9 +39,9 @@ typedef Environment::value_type EnvironmentVariable;
class Process
{
// Internal members and methods
- NAMESPACE_VOS(OArgumentList) *pArgumentList;
- NAMESPACE_VOS(OEnvironment) *pEnvList;
- NAMESPACE_VOS(OProcess) *pProcess;
+ vos::OArgumentList *pArgumentList;
+ vos::OEnvironment *pEnvList;
+ vos::OProcess *pProcess;
BOOL ImplIsRunning();
long ImplGetExitCode();
BOOL bWasGPF;
diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx
index cf888adf9dcf..bccf8212f10e 100644
--- a/basic/inc/basic/sbmod.hxx
+++ b/basic/inc/basic/sbmod.hxx
@@ -28,10 +28,12 @@
#ifndef _SB_SBMOD_HXX
#define _SB_SBMOD_HXX
+#include <com/sun/star/script/XInvocation.hpp>
#include <basic/sbdef.hxx>
#include <basic/sbxobj.hxx>
#include <basic/sbxdef.hxx>
#include <rtl/ustring.hxx>
+#include <vector>
class SbMethod;
class SbProperty;
@@ -55,8 +57,10 @@ class SbModule : public SbxObject
friend class SbClassModuleObject;
SbModuleImpl* mpSbModuleImpl; // Impl data
+ std::vector< String > mModuleVariableNames;
protected:
+ com::sun::star::uno::Reference< com::sun::star::script::XInvocation > mxWrapper;
::rtl::OUString aOUSource;
String aComment;
SbiImage* pImage; // the Image
@@ -131,6 +135,9 @@ public:
INT32 GetModuleType() { return mnType; }
void SetModuleType( INT32 nType ) { mnType = nType; }
bool GetIsProxyModule() { return bIsProxyModule; }
+ void AddVarName( const String& aName );
+ void RemoveVars();
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XInvocation > GetUnoModule();
bool createCOMWrapperForIface( ::com::sun::star::uno::Any& o_rRetAny, SbClassModuleObject* pProxyClassModuleObject );
};
diff --git a/basic/inc/basic/sbobjmod.hxx b/basic/inc/basic/sbobjmod.hxx
index 3d638a475f9a..9ff46d1931f3 100644
--- a/basic/inc/basic/sbobjmod.hxx
+++ b/basic/inc/basic/sbobjmod.hxx
@@ -36,6 +36,7 @@
#ifndef _SB_OBJMOD_HXX
#define _SB_OBJMOD_HXX
+#include <rtl/ref.hxx>
#include <basic/sbmod.hxx>
#include <basic/sbstar.hxx>
#include <com/sun/star/script/ModuleInfo.hpp>
@@ -60,10 +61,12 @@ public:
void SetUnoObject( const com::sun::star::uno::Any& aObj )throw ( com::sun::star::uno::RuntimeException ) ;
};
+class FormObjEventListenerImpl;
+
class SbUserFormModule : public SbObjModule
{
com::sun::star::script::ModuleInfo m_mInfo;
- css::uno::Reference<css::lang::XEventListener> m_DialogListener;
+ ::rtl::Reference< FormObjEventListenerImpl > m_DialogListener;
css::uno::Reference<css::awt::XDialog> m_xDialog;
css::uno::Reference<css::frame::XModel> m_xModel;
String sFormName;
@@ -76,16 +79,19 @@ class SbUserFormModule : public SbObjModule
public:
TYPEINFO();
SbUserFormModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat );
+ virtual ~SbUserFormModule();
virtual SbxVariable* Find( const XubString& rName, SbxClassType t );
void ResetApiObj();
void Unload();
- void load();
+ void Load();
void triggerMethod( const String& );
void triggerMethod( const String&, css::uno::Sequence< css::uno::Any >& );
void triggerActivateEvent();
- void triggerDeActivateEvent();
+ void triggerDeactivateEvent();
void triggerInitializeEvent();
void triggerTerminateEvent();
+ void triggerLayoutEvent();
+ void triggerResizeEvent();
class SbUserFormModuleInstance* CreateInstance();
};
diff --git a/basic/source/app/process.cxx b/basic/source/app/process.cxx
index c37af05ac8da..0eec05e1697c 100644
--- a/basic/source/app/process.cxx
+++ b/basic/source/app/process.cxx
@@ -72,9 +72,9 @@ BOOL Process::ImplIsRunning()
{
if ( pProcess && bHasBeenStarted )
{
- NAMESPACE_VOS(OProcess::TProcessInfo) aProcessInfo;
- pProcess->getInfo( NAMESPACE_VOS(OProcess::TData_ExitCode), &aProcessInfo );
- if ( !(aProcessInfo.Fields & NAMESPACE_VOS(OProcess::TData_ExitCode)) )
+ vos::OProcess::TProcessInfo aProcessInfo;
+ pProcess->getInfo( vos::OProcess::TData_ExitCode, &aProcessInfo );
+ if ( !(aProcessInfo.Fields & vos::OProcess::TData_ExitCode) )
return TRUE;
else
return FALSE;
@@ -87,9 +87,9 @@ long Process::ImplGetExitCode()
{
if ( pProcess )
{
- NAMESPACE_VOS(OProcess::TProcessInfo) aProcessInfo;
- pProcess->getInfo( NAMESPACE_VOS(OProcess::TData_ExitCode), &aProcessInfo );
- if ( !(aProcessInfo.Fields & NAMESPACE_VOS(OProcess::TData_ExitCode)) )
+ vos::OProcess::TProcessInfo aProcessInfo;
+ pProcess->getInfo( vos::OProcess::TData_ExitCode, &aProcessInfo );
+ if ( !(aProcessInfo.Fields & vos::OProcess::TData_ExitCode) )
SbxBase::SetError( SbxERR_NO_ACTIVE_OBJECT );
return aProcessInfo.Code;
}
@@ -124,7 +124,7 @@ void Process::SetImage( const String &aAppPath, const String &aAppParams, const
nParamCount++;
}
}
- pArgumentList = new NAMESPACE_VOS(OArgumentList)( pParamList, nCount );
+ pArgumentList = new vos::OArgumentList( pParamList, nCount );
::rtl::OUString *pEnvArray = NULL;
@@ -143,12 +143,12 @@ void Process::SetImage( const String &aAppPath, const String &aAppParams, const
nEnvCount++;
aIter++;
}
- pEnvList = new NAMESPACE_VOS(OEnvironment)( pEnvArray, nEnvCount );
+ pEnvList = new vos::OEnvironment( pEnvArray, nEnvCount );
}
::rtl::OUString aNormalizedAppPath;
osl::FileBase::getFileURLFromSystemPath( ::rtl::OUString(aAppPath), aNormalizedAppPath );
- pProcess = new NAMESPACE_VOS(OProcess)( aNormalizedAppPath );
+ pProcess = new vos::OProcess( aNormalizedAppPath );
bHasBeenStarted = FALSE;
delete [] pParamList;
@@ -170,20 +170,20 @@ BOOL Process::Start()
#endif
if ( pEnvList )
{
- bSuccess = pProcess->execute( (NAMESPACE_VOS(OProcess)::TProcessOption)
- ( NAMESPACE_VOS(OProcess)::TOption_SearchPath
- /*| NAMESPACE_VOS(OProcess)::TOption_Detached*/
- /*| NAMESPACE_VOS(OProcess)::TOption_Wait*/ ),
+ bSuccess = pProcess->execute( (vos::OProcess::TProcessOption)
+ ( vos::OProcess::TOption_SearchPath
+ /*| vos::OProcess::TOption_Detached*/
+ /*| vos::OProcess::TOption_Wait*/ ),
*pArgumentList,
- *pEnvList ) == NAMESPACE_VOS(OProcess)::E_None;
+ *pEnvList ) == vos::OProcess::E_None;
}
else
{
- bSuccess = pProcess->execute( (NAMESPACE_VOS(OProcess)::TProcessOption)
- ( NAMESPACE_VOS(OProcess)::TOption_SearchPath
- /*| NAMESPACE_VOS(OProcess)::TOption_Detached*/
- /*| NAMESPACE_VOS(OProcess)::TOption_Wait*/ ),
- *pArgumentList ) == NAMESPACE_VOS(OProcess)::E_None;
+ bSuccess = pProcess->execute( (vos::OProcess::TProcessOption)
+ ( vos::OProcess::TOption_SearchPath
+ /*| vos::OProcess::TOption_Detached*/
+ /*| vos::OProcess::TOption_Wait*/ ),
+ *pArgumentList ) == vos::OProcess::E_None;
}
#ifdef WNT
}
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index b76a2b5e249e..84763468e64c 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -67,8 +67,8 @@
#include <com/sun/star/script/XStarBasicLibraryInfo.hpp>
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
#include <com/sun/star/script/ModuleInfo.hpp>
-#include <com/sun/star/script/XVBAModuleInfo.hpp>
-#include <com/sun/star/script/XVBACompat.hpp>
+#include <com/sun/star/script/vba/XVBACompatibility.hpp>
+#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
#include <cppuhelper/implbase1.hxx>
@@ -240,7 +240,7 @@ void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager* pMgr,
Any aElement = xLibNameAccess->getByName( aModuleName );
::rtl::OUString aMod;
aElement >>= aMod;
- Reference< XVBAModuleInfo > xVBAModuleInfo( xLibNameAccess, UNO_QUERY );
+ Reference< vba::XVBAModuleInfo > xVBAModuleInfo( xLibNameAccess, UNO_QUERY );
if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( aModuleName ) )
{
ModuleInfo mInfo = xVBAModuleInfo->getModuleInfo( aModuleName );
@@ -285,9 +285,9 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent
StarBASIC* pLib = mpMgr->GetLib( aName );
if ( pLib )
{
- Reference<XVBACompat> xVBACompat( xScriptCont, UNO_QUERY );
+ Reference< vba::XVBACompatibility > xVBACompat( xScriptCont, UNO_QUERY );
if ( xVBACompat.is() )
- pLib->SetVBAEnabled( xVBACompat->getVBACompatModeOn() );
+ pLib->SetVBAEnabled( xVBACompat->getVBACompatibilityMode() );
}
}
else
@@ -302,7 +302,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent
{
::rtl::OUString aMod;
Event.Element >>= aMod;
- Reference< XVBAModuleInfo > xVBAModuleInfo( Event.Source, UNO_QUERY );
+ Reference< vba::XVBAModuleInfo > xVBAModuleInfo( Event.Source, UNO_QUERY );
if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( aName ) )
{
ModuleInfo mInfo = xVBAModuleInfo->getModuleInfo( aName );
diff --git a/basic/source/classes/disas.cxx b/basic/source/classes/disas.cxx
index 7317005d74fe..a837a3dc4f24 100644
--- a/basic/source/classes/disas.cxx
+++ b/basic/source/classes/disas.cxx
@@ -35,6 +35,7 @@
#include "sb.hxx"
#include "iosys.hxx"
#include "disas.hxx"
+#include "sbtrace.hxx"
static const char* pOp1[] = {
@@ -153,6 +154,7 @@ static const char* pOp3[] = {
"DCREATE_REDIMP", // Change dimensions of a user defined Object-Array (+StringId+StringId)
"FIND_CM", // Search inside a class module (CM) to enable global search in time
"PUBLIC_P", // Module global Variable (persisted between calls)(+StringID+Typ)
+ "FIND_STATIC", // local static var lookup (+StringID+Typ)
};
static const char** pOps[3] = { pOp1, pOp2, pOp3 };
@@ -220,6 +222,7 @@ static const Func pOperand3[] = {
&SbiDisas::Str2Op, // Redimensionate User defined Object-Array (+StringId+StringId)
&SbiDisas::VarOp, // FIND_CM
&SbiDisas::VarDefOp, // PUBLIC_P
+ &SbiDisas::VarOp, // FIND_STATIC
};
// TODO: Why as method? Isn't a simple define sufficient?
@@ -359,6 +362,11 @@ BOOL SbiDisas::DisasLine( String& rText )
rText.Erase();
if( !Fetch() )
return FALSE;
+
+#ifdef DBG_TRACE_BASIC
+ String aTraceStr_STMNT;
+#endif
+
// New line?
if( eOp == _STMNT && nOp1 != nLine )
{
@@ -391,8 +399,13 @@ BOOL SbiDisas::DisasLine( String& rText )
rText.AppendAscii( "; " );
rText += s;
rText.AppendAscii( _crlf() );
+
+#ifdef DBG_TRACE_BASIC
+ aTraceStr_STMNT = s;
+#endif
}
}
+
// Label?
const char* p = "";
if( cLabels[ nPC >> 3 ] & ( 1 << ( nPC & 7 ) ) )
@@ -430,20 +443,29 @@ BOOL SbiDisas::DisasLine( String& rText )
rText.AppendAscii( _crlf() );
}
snprintf( cBuf, sizeof(cBuf), pMask[ nParts ], nPC, (USHORT) eOp, nOp1, nOp2 );
- rText.AppendAscii( cBuf );
+
+ String aPCodeStr;
+ aPCodeStr.AppendAscii( cBuf );
int n = eOp;
if( eOp >= SbOP2_START )
n -= SbOP2_START;
else if( eOp >= SbOP1_START )
n -= SbOP1_START;
- rText += '\t';
- rText.AppendAscii( pOps[ nParts-1 ][ n ] );
- rText += '\t';
+ aPCodeStr += '\t';
+ aPCodeStr.AppendAscii( pOps[ nParts-1 ][ n ] );
+ aPCodeStr += '\t';
switch( nParts )
{
- case 2: (this->*( pOperand2[ n ] ) )( rText ); break;
- case 3: (this->*( pOperand3[ n ] ) )( rText ); break;
+ case 2: (this->*( pOperand2[ n ] ) )( aPCodeStr ); break;
+ case 3: (this->*( pOperand3[ n ] ) )( aPCodeStr ); break;
}
+
+ rText += aPCodeStr;
+
+#ifdef DBG_TRACE_BASIC
+ dbg_RegisterTraceTextForPC( pMod, nPC, aTraceStr_STMNT, aPCodeStr );
+#endif
+
return TRUE;
}
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx
index 791e9fe5a8c1..78682a633fe3 100644
--- a/basic/source/classes/eventatt.cxx
+++ b/basic/source/classes/eventatt.cxx
@@ -255,7 +255,7 @@ Any BasicScriptListener_Impl::approveFiring( const ScriptEvent& aScriptEvent )
void BasicScriptListener_Impl::disposing(const EventObject& ) throw ( RuntimeException )
{
// TODO: ???
- //NAMESPACE_VOS(OGuard) guard( Application::GetSolarMutex() );
+ //vos::OGuard guard( Application::GetSolarMutex() );
//xSbxObj.Clear();
}
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 79c5f78601ea..e28b0a304f28 100755
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -339,27 +339,18 @@ SbxBase* SbFormFactory::Create( UINT16, UINT32 )
SbxObject* SbFormFactory::CreateObject( const String& rClassName )
{
- static String aLoadMethodName( RTL_CONSTASCII_USTRINGPARAM("load") );
-
- SbxObject* pRet = NULL;
- SbModule* pMod = pMOD;
- if( pMod )
+ if( SbModule* pMod = pMOD )
{
- SbxVariable* pVar = pMod->Find( rClassName, SbxCLASS_OBJECT );
- if( pVar )
+ if( SbxVariable* pVar = pMod->Find( rClassName, SbxCLASS_OBJECT ) )
{
- SbxBase* pObj = pVar->GetObject();
- SbUserFormModule* pFormModule = PTR_CAST( SbUserFormModule, pObj );
-
- if( pFormModule != NULL )
+ if( SbUserFormModule* pFormModule = PTR_CAST( SbUserFormModule, pVar->GetObject() ) )
{
- pFormModule->load();
- SbUserFormModuleInstance* pFormInstance = pFormModule->CreateInstance();
- pRet = pFormInstance;
+ pFormModule->Load();
+ return pFormModule->CreateInstance();
}
}
}
- return pRet;
+ return 0;
}
@@ -569,11 +560,13 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
}
}
SetModuleType( ModuleType::CLASS );
+ mbVBACompat = pClassModule->mbVBACompat;
}
SbClassModuleObject::~SbClassModuleObject()
{
- triggerTerminateEvent();
+ if( StarBASIC::IsRunning() )
+ triggerTerminateEvent();
// Must be deleted by base class dtor because this data
// is not owned by the SbClassModuleObject object
@@ -606,7 +599,28 @@ void SbClassModuleObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType
{
SbxValues aVals;
aVals.eType = SbxVARIANT;
- pMeth->Get( aVals );
+
+ SbxArray* pArg = pVar->GetParameters();
+ USHORT nVarParCount = (pArg != NULL) ? pArg->Count() : 0;
+ if( nVarParCount > 1 )
+ {
+ SbxArrayRef xMethParameters = new SbxArray;
+ xMethParameters->Put( pMeth, 0 ); // Method as parameter 0
+ for( USHORT i = 1 ; i < nVarParCount ; ++i )
+ {
+ SbxVariable* pPar = pArg->Get( i );
+ xMethParameters->Put( pPar, i );
+ }
+
+ pMeth->SetParameters( xMethParameters );
+ pMeth->Get( aVals );
+ pMeth->SetParameters( NULL );
+ }
+ else
+ {
+ pMeth->Get( aVals );
+ }
+
pVar->Put( aVals );
}
}
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index e51a0c09270b..9ee07fde1413 100755
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -911,7 +911,7 @@ Type getUnoTypeForSbxBaseType( SbxDataType eType )
case SbxVARIANT: aRetType = ::getCppuType( (Any*)0 ); break;
//case SbxDATAOBJECT: break;
case SbxCHAR: aRetType = ::getCppuType( (sal_Unicode*)0 ); break;
- case SbxBYTE: aRetType = ::getCppuType( (sal_Int16*)0 ); break;
+ case SbxBYTE: aRetType = ::getCppuType( (sal_Int8*)0 ); break;
case SbxUSHORT: aRetType = ::getCppuType( (sal_uInt16*)0 ); break;
case SbxULONG: aRetType = ::getCppuType( (sal_uInt32*)0 ); break;
//case SbxLONG64: break;
@@ -3762,7 +3762,7 @@ BasicAllListener_Impl::~BasicAllListener_Impl()
void BasicAllListener_Impl::firing_impl( const AllEventObject& Event, Any* pRet )
{
- NAMESPACE_VOS(OGuard) guard( Application::GetSolarMutex() );
+ vos::OGuard guard( Application::GetSolarMutex() );
if( xSbxObj.Is() )
{
@@ -3827,7 +3827,7 @@ Any BasicAllListener_Impl::approveFiring( const AllEventObject& Event ) throw (
// Methoden von XEventListener
void BasicAllListener_Impl ::disposing(const EventObject& ) throw ( RuntimeException )
{
- NAMESPACE_VOS(OGuard) guard( Application::GetSolarMutex() );
+ vos::OGuard guard( Application::GetSolarMutex() );
xSbxObj.Clear();
}
@@ -4201,7 +4201,7 @@ void SAL_CALL ModuleInvocationProxy::setValue( const ::rtl::OUString& rProperty,
if( !m_bProxyIsClassModuleObject )
throw UnknownPropertyException();
- NAMESPACE_VOS(OGuard) guard( Application::GetSolarMutex() );
+ vos::OGuard guard( Application::GetSolarMutex() );
::rtl::OUString aPropertyFunctionName( RTL_CONSTASCII_USTRINGPARAM( "Property Set ") );
aPropertyFunctionName += m_aPrefix;
@@ -4242,7 +4242,7 @@ Any SAL_CALL ModuleInvocationProxy::getValue( const ::rtl::OUString& rProperty )
if( !m_bProxyIsClassModuleObject )
throw UnknownPropertyException();
- NAMESPACE_VOS(OGuard) guard( Application::GetSolarMutex() );
+ vos::OGuard guard( Application::GetSolarMutex() );
::rtl::OUString aPropertyFunctionName( RTL_CONSTASCII_USTRINGPARAM( "Property Get ") );
aPropertyFunctionName += m_aPrefix;
@@ -4280,7 +4280,7 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const ::rtl::OUString& rFunction,
Sequence< Any >& )
throw( CannotConvertException, InvocationTargetException )
{
- NAMESPACE_VOS(OGuard) guard( Application::GetSolarMutex() );
+ vos::OGuard guard( Application::GetSolarMutex() );
Any aRet;
if( !m_xScopeObj.Is() )
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 1b49a376c9bd..8b1069bbeab3 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -45,6 +45,7 @@
#include "runtime.hxx"
#include "token.hxx"
#include "sbunoobj.hxx"
+#include "sbtrace.hxx"
//#include <basic/hilight.hxx>
@@ -53,9 +54,10 @@
#include <basic/basrdll.hxx>
#include <vos/mutex.hxx>
#include <basic/sbobjmod.hxx>
+#include <cppuhelper/implbase2.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/script/ModuleType.hpp>
-#include <com/sun/star/script/XVBACompat.hpp>
+#include <com/sun/star/script/vba/XVBACompatibility.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
using namespace com::sun::star;
@@ -76,15 +78,362 @@ using namespace com::sun::star;
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
#include <vcl/svapp.hxx>
+#include <map>
+#include <com/sun/star/reflection/XProxyFactory.hpp>
+#include <cppuhelper/implbase1.hxx>
+#include <basic/sbobjmod.hxx>
+#include <com/sun/star/uno/XAggregation.hpp>
+#include <map>
+#include <com/sun/star/script/XInvocation.hpp>
+
using namespace ::com::sun::star;
+using namespace com::sun::star::lang;
+using namespace com::sun::star::reflection;
+using namespace com::sun::star::beans;
+using namespace com::sun::star::script;
+
#include <com/sun/star/script/XLibraryContainer.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/awt/XDialogProvider.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/awt/XControl.hpp>
#include <cppuhelper/implbase1.hxx>
#include <comphelper/anytostring.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+typedef ::cppu::WeakImplHelper1< XInvocation > DocObjectWrapper_BASE;
+typedef ::std::map< sal_Int16, Any, ::std::less< sal_Int16 > > OutParamMap;
+::com::sun::star::uno::Any sbxToUnoValue( SbxVariable* pVar );
+void unoToSbxValue( SbxVariable* pVar, const ::com::sun::star::uno::Any& aValue );
+
+class DocObjectWrapper : public DocObjectWrapper_BASE
+{
+ Reference< XAggregation > m_xAggProxy;
+ Reference< XInvocation > m_xAggInv;
+ Reference< XTypeProvider > m_xAggregateTypeProv;
+ Sequence< Type > m_Types;
+ SbModule* m_pMod;
+ SbMethodRef getMethod( const rtl::OUString& aName ) throw (RuntimeException);
+ SbPropertyRef getProperty( const rtl::OUString& aName ) throw (RuntimeException);
+ String mName; // for debugging
+
+public:
+ DocObjectWrapper( SbModule* pMod );
+ virtual ~DocObjectWrapper();
+
+ virtual void SAL_CALL acquire() throw();
+ virtual void SAL_CALL release() throw();
+
+ virtual Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (RuntimeException)
+ {
+ if( !m_xAggregateTypeProv.is() )
+ throw RuntimeException();
+ return m_xAggregateTypeProv->getImplementationId();
+ }
+
+ virtual Reference< XIntrospectionAccess > SAL_CALL getIntrospection( ) throw (RuntimeException);
+
+ virtual Any SAL_CALL invoke( const ::rtl::OUString& aFunctionName, const Sequence< Any >& aParams, Sequence< ::sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam ) throw (IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException);
+ virtual void SAL_CALL setValue( const ::rtl::OUString& aPropertyName, const Any& aValue ) throw (UnknownPropertyException, CannotConvertException, InvocationTargetException, RuntimeException);
+ virtual Any SAL_CALL getValue( const ::rtl::OUString& aPropertyName ) throw (UnknownPropertyException, RuntimeException);
+ virtual ::sal_Bool SAL_CALL hasMethod( const ::rtl::OUString& aName ) throw (RuntimeException);
+ virtual ::sal_Bool SAL_CALL hasProperty( const ::rtl::OUString& aName ) throw (RuntimeException);
+ virtual Any SAL_CALL queryInterface( const Type& aType ) throw ( RuntimeException );
+
+ virtual Sequence< Type > SAL_CALL getTypes() throw ( RuntimeException );
+};
+
+DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar ), mName( pVar->GetName() )
+{
+ SbObjModule* pMod = PTR_CAST(SbObjModule,pVar);
+ if ( pMod )
+ {
+ if ( pMod->GetModuleType() == ModuleType::DOCUMENT )
+ {
+ Reference< XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory();
+ // Use proxy factory service to create aggregatable proxy.
+ SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,pMod->GetObject() );
+ Reference< XInterface > xIf;
+ if ( pUnoObj )
+ {
+ Any aObj = pUnoObj->getUnoAny();
+ aObj >>= xIf;
+ if ( xIf.is() )
+ {
+ m_xAggregateTypeProv.set( xIf, UNO_QUERY );
+ m_xAggInv.set( xIf, UNO_QUERY );
+ }
+ }
+ if ( xIf.is() )
+ {
+ try
+ {
+ Reference< XMultiComponentFactory > xMFac( xFactory, UNO_QUERY_THROW );
+ Reference< XPropertySet> xPSMPropertySet( xMFac, UNO_QUERY_THROW );
+ Reference< XComponentContext > xCtx;
+ xPSMPropertySet->getPropertyValue(
+ String( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= xCtx;
+ Reference< XProxyFactory > xProxyFac( xMFac->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.reflection.ProxyFactory" ) ), xCtx ), UNO_QUERY_THROW );
+ m_xAggProxy = xProxyFac->createProxy( xIf );
+ }
+ catch( Exception& )
+ {
+ OSL_ENSURE( false, "DocObjectWrapper::DocObjectWrapper: Caught exception!" );
+ }
+ }
+
+ if ( m_xAggProxy.is() )
+ {
+ osl_incrementInterlockedCount( &m_refCount );
+
+ /* i35609 - Fix crash on Solaris. The setDelegator call needs
+ to be in its own block to ensure that all temporary Reference
+ instances that are acquired during the call are released
+ before m_refCount is decremented again */
+ {
+ m_xAggProxy->setDelegator( static_cast< cppu::OWeakObject * >( this ) );
+ }
+
+ osl_decrementInterlockedCount( &m_refCount );
+ }
+ }
+ }
+}
+
+void SAL_CALL
+DocObjectWrapper::acquire() throw ()
+{
+ osl_incrementInterlockedCount( &m_refCount );
+ OSL_TRACE("DocObjectWrapper::acquire(%s) 0x%x refcount is now %d", rtl::OUStringToOString( mName, RTL_TEXTENCODING_UTF8 ).getStr(), this, m_refCount );
+}
+void SAL_CALL
+DocObjectWrapper::release() throw ()
+{
+ if ( osl_decrementInterlockedCount( &m_refCount ) == 0 )
+ {
+ OSL_TRACE("DocObjectWrapper::release(%s) 0x%x refcount is now %d", rtl::OUStringToOString( mName, RTL_TEXTENCODING_UTF8 ).getStr(), this, m_refCount );
+ delete this;
+ }
+ else
+ OSL_TRACE("DocObjectWrapper::release(%s) 0x%x refcount is now %d", rtl::OUStringToOString( mName, RTL_TEXTENCODING_UTF8 ).getStr(), this, m_refCount );
+}
+
+DocObjectWrapper::~DocObjectWrapper()
+{
+}
+
+Sequence< Type > SAL_CALL DocObjectWrapper::getTypes()
+ throw ( RuntimeException )
+{
+ if ( m_Types.getLength() == 0 )
+ {
+ Sequence< Type > sTypes;
+ if ( m_xAggregateTypeProv.is() )
+ sTypes = m_xAggregateTypeProv->getTypes();
+ m_Types.realloc( sTypes.getLength() + 1 );
+ Type* pPtr = m_Types.getArray();
+ for ( int i=0; i<m_Types.getLength(); ++i, ++pPtr )
+ {
+ if ( i == 0 )
+ *pPtr = XInvocation::static_type( NULL );
+ else
+ *pPtr = sTypes[ i - 1 ];
+ }
+ }
+ return m_Types;
+}
+
+Reference< XIntrospectionAccess > SAL_CALL
+DocObjectWrapper::getIntrospection( ) throw (RuntimeException)
+{
+ return NULL;
+}
+
+Any SAL_CALL
+DocObjectWrapper::invoke( const ::rtl::OUString& aFunctionName, const Sequence< Any >& aParams, Sequence< ::sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam ) throw (IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException)
+{
+ if ( m_xAggInv.is() && m_xAggInv->hasMethod( aFunctionName ) )
+ return m_xAggInv->invoke( aFunctionName, aParams, aOutParamIndex, aOutParam );
+ SbMethodRef pMethod = getMethod( aFunctionName );
+ if ( !pMethod )
+ throw RuntimeException();
+ // check number of parameters
+ sal_Int32 nParamsCount = aParams.getLength();
+ SbxInfo* pInfo = pMethod->GetInfo();
+ if ( pInfo )
+ {
+ sal_Int32 nSbxOptional = 0;
+ USHORT n = 1;
+ for ( const SbxParamInfo* pParamInfo = pInfo->GetParam( n ); pParamInfo; pParamInfo = pInfo->GetParam( ++n ) )
+ {
+ if ( ( pParamInfo->nFlags & SBX_OPTIONAL ) != 0 )
+ ++nSbxOptional;
+ else
+ nSbxOptional = 0;
+ }
+ sal_Int32 nSbxCount = n - 1;
+ if ( nParamsCount < nSbxCount - nSbxOptional )
+ {
+ throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "wrong number of parameters!" ) ), Reference< XInterface >() );
+ }
+ }
+ // set parameters
+ SbxArrayRef xSbxParams;
+ if ( nParamsCount > 0 )
+ {
+ xSbxParams = new SbxArray;
+ const Any* pParams = aParams.getConstArray();
+ for ( sal_Int32 i = 0; i < nParamsCount; ++i )
+ {
+ SbxVariableRef xSbxVar = new SbxVariable( SbxVARIANT );
+ unoToSbxValue( static_cast< SbxVariable* >( xSbxVar ), pParams[i] );
+ xSbxParams->Put( xSbxVar, static_cast< USHORT >( i ) + 1 );
+
+ // Enable passing by ref
+ if ( xSbxVar->GetType() != SbxVARIANT )
+ xSbxVar->SetFlag( SBX_FIXED );
+ }
+ }
+ if ( xSbxParams.Is() )
+ pMethod->SetParameters( xSbxParams );
+
+ // call method
+ SbxVariableRef xReturn = new SbxVariable;
+ ErrCode nErr = SbxERR_OK;
+
+ nErr = pMethod->Call( xReturn );
+ Any aReturn;
+ // get output parameters
+ if ( xSbxParams.Is() )
+ {
+ SbxInfo* pInfo_ = pMethod->GetInfo();
+ if ( pInfo_ )
+ {
+ OutParamMap aOutParamMap;
+ for ( USHORT n = 1, nCount = xSbxParams->Count(); n < nCount; ++n )
+ {
+ const SbxParamInfo* pParamInfo = pInfo_->GetParam( n );
+ if ( pParamInfo && ( pParamInfo->eType & SbxBYREF ) != 0 )
+ {
+ SbxVariable* pVar = xSbxParams->Get( n );
+ if ( pVar )
+ {
+ SbxVariableRef xVar = pVar;
+ aOutParamMap.insert( OutParamMap::value_type( n - 1, sbxToUnoValue( xVar ) ) );
+ }
+ }
+ }
+ sal_Int32 nOutParamCount = aOutParamMap.size();
+ aOutParamIndex.realloc( nOutParamCount );
+ aOutParam.realloc( nOutParamCount );
+ sal_Int16* pOutParamIndex = aOutParamIndex.getArray();
+ Any* pOutParam = aOutParam.getArray();
+ for ( OutParamMap::iterator aIt = aOutParamMap.begin(); aIt != aOutParamMap.end(); ++aIt, ++pOutParamIndex, ++pOutParam )
+ {
+ *pOutParamIndex = aIt->first;
+ *pOutParam = aIt->second;
+ }
+ }
+ }
+
+ // get return value
+ aReturn = sbxToUnoValue( xReturn );
+
+ pMethod->SetParameters( NULL );
+
+ return aReturn;
+}
+
+void SAL_CALL
+DocObjectWrapper::setValue( const ::rtl::OUString& aPropertyName, const Any& aValue ) throw (UnknownPropertyException, CannotConvertException, InvocationTargetException, RuntimeException)
+{
+ if ( m_xAggInv.is() && m_xAggInv->hasProperty( aPropertyName ) )
+ return m_xAggInv->setValue( aPropertyName, aValue );
+
+ SbPropertyRef pProperty = getProperty( aPropertyName );
+ if ( !pProperty.Is() )
+ throw UnknownPropertyException();
+ unoToSbxValue( (SbxVariable*) pProperty, aValue );
+}
+
+Any SAL_CALL
+DocObjectWrapper::getValue( const ::rtl::OUString& aPropertyName ) throw (UnknownPropertyException, RuntimeException)
+{
+ if ( m_xAggInv.is() && m_xAggInv->hasProperty( aPropertyName ) )
+ return m_xAggInv->getValue( aPropertyName );
+
+ SbPropertyRef pProperty = getProperty( aPropertyName );
+ if ( !pProperty.Is() )
+ throw UnknownPropertyException();
+
+ SbxVariable* pProp = ( SbxVariable* ) pProperty;
+ if ( pProp->GetType() == SbxEMPTY )
+ pProperty->Broadcast( SBX_HINT_DATAWANTED );
+
+ Any aRet = sbxToUnoValue( pProp );
+ return aRet;
+}
+
+::sal_Bool SAL_CALL
+DocObjectWrapper::hasMethod( const ::rtl::OUString& aName ) throw (RuntimeException)
+{
+ if ( m_xAggInv.is() && m_xAggInv->hasMethod( aName ) )
+ return sal_True;
+ return getMethod( aName ).Is();
+}
+
+::sal_Bool SAL_CALL
+DocObjectWrapper::hasProperty( const ::rtl::OUString& aName ) throw (RuntimeException)
+{
+ sal_Bool bRes = sal_False;
+ if ( m_xAggInv.is() && m_xAggInv->hasProperty( aName ) )
+ bRes = sal_True;
+ else bRes = getProperty( aName ).Is();
+ return bRes;
+}
+
+Any SAL_CALL DocObjectWrapper::queryInterface( const Type& aType )
+ throw ( RuntimeException )
+{
+ Any aRet = DocObjectWrapper_BASE::queryInterface( aType );
+ if ( aRet.hasValue() )
+ return aRet;
+ else if ( m_xAggProxy.is() )
+ aRet = m_xAggProxy->queryAggregation( aType );
+ return aRet;
+}
+
+SbMethodRef DocObjectWrapper::getMethod( const rtl::OUString& aName ) throw (RuntimeException)
+{
+ SbMethodRef pMethod = NULL;
+ if ( m_pMod )
+ {
+ USHORT nSaveFlgs = m_pMod->GetFlags();
+ // Limit search to this module
+ m_pMod->ResetFlag( SBX_GBLSEARCH );
+ pMethod = (SbMethod*) m_pMod->SbModule::Find( aName, SbxCLASS_METHOD );
+ m_pMod->SetFlags( nSaveFlgs );
+ }
+
+ return pMethod;
+}
+
+SbPropertyRef DocObjectWrapper::getProperty( const rtl::OUString& aName ) throw (RuntimeException)
+{
+ SbPropertyRef pProperty = NULL;
+ if ( m_pMod )
+ {
+ USHORT nSaveFlgs = m_pMod->GetFlags();
+ // Limit search to this module.
+ m_pMod->ResetFlag( SBX_GBLSEARCH );
+ pProperty = (SbProperty*)m_pMod->SbModule::Find( aName, SbxCLASS_PROPERTY );
+ m_pMod->SetFlag( nSaveFlgs );
+ }
+
+ return pProperty;
+}
TYPEINIT1(SbModule,SbxObject)
TYPEINIT1(SbMethod,SbxMethod)
@@ -112,9 +461,9 @@ bool getDefaultVBAMode( StarBASIC* pb )
uno::Reference< beans::XPropertySet > xProp( aDoc, uno::UNO_QUERY );
if ( xProp.is() )
{
- uno::Reference< script::XVBACompat > xVBAMode( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BasicLibraries") ) ), uno::UNO_QUERY );
+ uno::Reference< script::vba::XVBACompatibility > xVBAMode( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BasicLibraries") ) ), uno::UNO_QUERY );
if ( xVBAMode.is() )
- bResult = ( xVBAMode->getVBACompatModeOn() == sal_True );
+ bResult = xVBAMode->getVBACompatibilityMode() == sal_True;
}
}
}
@@ -199,12 +548,24 @@ SbModule::SbModule( const String& rName, BOOL bVBACompat )
SbModule::~SbModule()
{
+ OSL_TRACE("Module named %s is destructing", rtl::OUStringToOString( GetName(), RTL_TEXTENCODING_UTF8 ).getStr() );
if( pImage )
delete pImage;
if( pBreaks )
delete pBreaks;
if( pClassData )
delete pClassData;
+ mxWrapper = NULL;
+}
+
+uno::Reference< script::XInvocation >
+SbModule::GetUnoModule()
+{
+ if ( !mxWrapper.is() )
+ mxWrapper = new DocObjectWrapper( this );
+
+ OSL_TRACE("Module named %s returning wrapper mxWrapper (0x%x)", rtl::OUStringToOString( GetName(), RTL_TEXTENCODING_UTF8 ).getStr(), mxWrapper.get() );
+ return mxWrapper;
}
BOOL SbModule::IsCompiled() const
@@ -684,6 +1045,9 @@ USHORT SbModule::Run( SbMethod* pMeth )
StarBASICRef xBasic;
if( bDelInst )
{
+#ifdef DBG_TRACE_BASIC
+ dbg_InitTrace();
+#endif
// #32779: Basic waehrend der Ausfuehrung festhalten
xBasic = (StarBASIC*) GetParent();
@@ -762,18 +1126,28 @@ USHORT SbModule::Run( SbMethod* pMeth )
SbModule* pOldMod = pMOD;
pMOD = this;
SbiRuntime* pRt = new SbiRuntime( this, pMeth, pMeth->nStart );
+
+#ifdef DBG_TRACE_BASIC
+ dbg_traceNotifyCall( this, pMeth, pINST->nCallLvl );
+#endif
+
pRt->pNext = pINST->pRun;
if( pRt->pNext )
pRt->pNext->block();
pINST->pRun = pRt;
if ( mbVBACompat )
- {
+ {
pINST->EnableCompatibility( TRUE );
- }
+ }
while( pRt->Step() ) {}
if( pRt->pNext )
pRt->pNext->unblock();
+#ifdef DBG_TRACE_BASIC
+ bool bLeave = true;
+ dbg_traceNotifyCall( this, pMeth, pINST->nCallLvl, bLeave );
+#endif
+
// #63710 Durch ein anderes Thread-Handling bei Events kann es passieren,
// dass show-Aufruf an einem Dialog zurueckkehrt (durch schliessen des
// Dialogs per UI), BEVOR ein per Event ausgeloester weitergehender Call,
@@ -867,9 +1241,20 @@ void SbModule::RunInit()
pMOD = this;
// Der Init-Code beginnt immer hier
SbiRuntime* pRt = new SbiRuntime( this, NULL, 0 );
+
+#ifdef DBG_TRACE_BASIC
+ dbg_traceNotifyCall( this, NULL, 0 );
+#endif
+
pRt->pNext = pINST->pRun;
pINST->pRun = pRt;
while( pRt->Step() ) {}
+
+#ifdef DBG_TRACE_BASIC
+ bool bLeave = true;
+ dbg_traceNotifyCall( this, NULL, 0, bLeave );
+#endif
+
pINST->pRun = pRt->pNext;
delete pRt;
pMOD = pOldMod;
@@ -884,6 +1269,33 @@ void SbModule::RunInit()
}
// Mit private/dim deklarierte Variablen loeschen
+
+void SbModule::AddVarName( const String& aName )
+{
+ // see if the name is added allready
+ std::vector< String >::iterator it_end = mModuleVariableNames.end();
+ for ( std::vector< String >::iterator it = mModuleVariableNames.begin(); it != it_end; ++it )
+ {
+ if ( aName == *it )
+ return;
+ }
+ mModuleVariableNames.push_back( aName );
+}
+
+void SbModule::RemoveVars()
+{
+ std::vector< String >::iterator it_end = mModuleVariableNames.end();
+ for ( std::vector< String >::iterator it = mModuleVariableNames.begin(); it != it_end; ++it )
+ {
+ // We don't want a Find being called in a derived class ( e.g.
+ // SbUserform because it could trigger say an initialise event
+ // which would cause basic to be re-run in the middle of the init ( and remember RemoveVars is called from compile and we don't want code to run as part of the compile )
+ SbxVariableRef p = SbModule::Find( *it, SbxCLASS_PROPERTY );
+ if( p.Is() )
+ Remove (p);
+ }
+}
+
void SbModule::ClearPrivateVars()
{
for( USHORT i = 0 ; i < pProps->Count() ; i++ )
@@ -1600,9 +2012,9 @@ SbObjModule::Find( const XubString& rName, SbxClassType t )
return pVar;
}
-typedef ::cppu::WeakImplHelper1< awt::XTopWindowListener > EventListener_BASE;
+typedef ::cppu::WeakImplHelper2< awt::XTopWindowListener, awt::XWindowListener > FormObjEventListener_BASE;
-class FormObjEventListenerImpl : public EventListener_BASE
+class FormObjEventListenerImpl : public FormObjEventListener_BASE
{
SbUserFormModule* mpUserForm;
uno::Reference< lang::XComponent > mxComponent;
@@ -1612,39 +2024,57 @@ class FormObjEventListenerImpl : public EventListener_BASE
sal_Bool mbShowing;
FormObjEventListenerImpl(); // not defined
FormObjEventListenerImpl(const FormObjEventListenerImpl&); // not defined
+
public:
- FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent ) : mpUserForm( pUserForm ), mxComponent( xComponent) , mbDisposed( false ), mbOpened( sal_False ), mbActivated( sal_False ), mbShowing( sal_False )
+ FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent ) :
+ mpUserForm( pUserForm ), mxComponent( xComponent) ,
+ mbDisposed( false ), mbOpened( sal_False ), mbActivated( sal_False ), mbShowing( sal_False )
{
if ( mxComponent.is() )
{
- uno::Reference< awt::XTopWindow > xList( mxComponent, uno::UNO_QUERY_THROW );;
- OSL_TRACE("*********** Registering the listener");
- xList->addTopWindowListener( this );
+ OSL_TRACE("*********** Registering the listeners");
+ try
+ {
+ uno::Reference< awt::XTopWindow >( mxComponent, uno::UNO_QUERY_THROW )->addTopWindowListener( this );
+ }
+ catch( uno::Exception& ) {}
+ try
+ {
+ uno::Reference< awt::XWindow >( mxComponent, uno::UNO_QUERY_THROW )->addWindowListener( this );
+ }
+ catch( uno::Exception& ) {}
}
}
- ~FormObjEventListenerImpl()
+ virtual ~FormObjEventListenerImpl()
{
removeListener();
}
- sal_Bool isShowing() { return mbShowing; }
+
+ sal_Bool isShowing() const { return mbShowing; }
+
void removeListener()
{
- try
+ if ( mxComponent.is() && !mbDisposed )
{
- if ( mxComponent.is() && !mbDisposed )
+ OSL_TRACE("*********** Removing the listeners");
+ try
+ {
+ uno::Reference< awt::XTopWindow >( mxComponent, uno::UNO_QUERY_THROW )->removeTopWindowListener( this );
+ }
+ catch( uno::Exception& ) {}
+ try
{
- uno::Reference< awt::XTopWindow > xList( mxComponent, uno::UNO_QUERY_THROW );;
- OSL_TRACE("*********** Removing the listener");
- xList->removeTopWindowListener( this );
- mxComponent = NULL;
+ uno::Reference< awt::XWindow >( mxComponent, uno::UNO_QUERY_THROW )->removeWindowListener( this );
}
+ catch( uno::Exception& ) {}
}
- catch( uno::Exception& ) {}
+ mxComponent.clear();
}
+
virtual void SAL_CALL windowOpened( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
{
- if ( mpUserForm )
+ if ( mpUserForm )
{
mbOpened = sal_True;
mbShowing = sal_True;
@@ -1691,12 +2121,23 @@ public:
}
//liuchen 2009-7-21
- virtual void SAL_CALL windowClosed( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) { mbOpened = sal_False; mbShowing = sal_False; }
- virtual void SAL_CALL windowMinimized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) {}
- virtual void SAL_CALL windowNormalized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException){}
+ virtual void SAL_CALL windowClosed( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
+ {
+ mbOpened = sal_False;
+ mbShowing = sal_False;
+ }
+
+ virtual void SAL_CALL windowMinimized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
+ {
+ }
+
+ virtual void SAL_CALL windowNormalized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
+ {
+ }
+
virtual void SAL_CALL windowActivated( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
{
- if ( mpUserForm )
+ if ( mpUserForm )
{
mbActivated = sal_True;
if ( mbOpened )
@@ -1709,18 +2150,38 @@ public:
virtual void SAL_CALL windowDeactivated( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
{
- if ( mpUserForm )
- mpUserForm->triggerDeActivateEvent();
+ if ( mpUserForm )
+ mpUserForm->triggerDeactivateEvent();
+ }
+
+ virtual void SAL_CALL windowResized( const awt::WindowEvent& /*e*/ ) throw (uno::RuntimeException)
+ {
+ if ( mpUserForm )
+ {
+ mpUserForm->triggerResizeEvent();
+ mpUserForm->triggerLayoutEvent();
+ }
}
+ virtual void SAL_CALL windowMoved( const awt::WindowEvent& /*e*/ ) throw (uno::RuntimeException)
+ {
+ if ( mpUserForm )
+ mpUserForm->triggerLayoutEvent();
+ }
+
+ virtual void SAL_CALL windowShown( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
+ {
+ }
+
+ virtual void SAL_CALL windowHidden( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
+ {
+ }
- virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw (uno::RuntimeException)
+ virtual void SAL_CALL disposing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException)
{
OSL_TRACE("** Userform/Dialog disposing");
mbDisposed = true;
- uno::Any aSource;
- aSource <<= Source;
- mxComponent = NULL;
+ mxComponent.clear();
if ( mpUserForm )
mpUserForm->ResetApiObj();
}
@@ -1734,6 +2195,10 @@ SbUserFormModule::SbUserFormModule( const String& rName, const com::sun::star::s
m_xModel.set( mInfo.ModuleObject, uno::UNO_QUERY_THROW );
}
+SbUserFormModule::~SbUserFormModule()
+{
+}
+
void SbUserFormModule::ResetApiObj()
{
if ( m_xDialog.is() ) // probably someone close the dialog window
@@ -1796,23 +2261,22 @@ void SbUserFormModule::triggerMethod( const String& aMethodToRun, Sequence< Any
void SbUserFormModule::triggerActivateEvent( void )
{
- OSL_TRACE("**** entering SbUserFormModule::triggerActivate");
- triggerMethod( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UserForm_activate") ) );
- OSL_TRACE("**** leaving SbUserFormModule::triggerActivate");
+ OSL_TRACE("**** entering SbUserFormModule::triggerActivate");
+ triggerMethod( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UserForm_Activate") ) );
+ OSL_TRACE("**** leaving SbUserFormModule::triggerActivate");
}
-void SbUserFormModule::triggerDeActivateEvent( void )
+void SbUserFormModule::triggerDeactivateEvent( void )
{
- OSL_TRACE("**** SbUserFormModule::triggerDeActivate");
- triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_DeActivate") ) );
+ OSL_TRACE("**** SbUserFormModule::triggerDeactivate");
+ triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_Deactivate") ) );
}
void SbUserFormModule::triggerInitializeEvent( void )
-
{
if ( mbInit )
return;
- OSL_TRACE("**** SbUserFormModule::triggerInitializeEvent");
+ OSL_TRACE("**** SbUserFormModule::triggerInitializeEvent");
static String aInitMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_Initialize") );
triggerMethod( aInitMethodName );
mbInit = true;
@@ -1820,12 +2284,24 @@ void SbUserFormModule::triggerInitializeEvent( void )
void SbUserFormModule::triggerTerminateEvent( void )
{
- OSL_TRACE("**** SbUserFormModule::triggerTerminateEvent");
+ OSL_TRACE("**** SbUserFormModule::triggerTerminateEvent");
static String aTermMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_Terminate") );
triggerMethod( aTermMethodName );
mbInit=false;
}
+void SbUserFormModule::triggerLayoutEvent( void )
+{
+ static String aMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_Layout") );
+ triggerMethod( aMethodName );
+}
+
+void SbUserFormModule::triggerResizeEvent( void )
+{
+ static String aMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_Resize") );
+ triggerMethod( aMethodName );
+}
+
SbUserFormModuleInstance* SbUserFormModule::CreateInstance()
{
SbUserFormModuleInstance* pInstance = new SbUserFormModuleInstance( this, GetName(), m_mInfo, IsVBACompat() );
@@ -1853,7 +2329,7 @@ SbxVariable* SbUserFormModuleInstance::Find( const XubString& rName, SbxClassTyp
}
-void SbUserFormModule::load()
+void SbUserFormModule::Load()
{
OSL_TRACE("** load() ");
// forces a load
@@ -1891,21 +2367,20 @@ void SbUserFormModule::Unload()
if( pMeth )
{
OSL_TRACE("Attempting too run the UnloadObjectMethod");
- m_xDialog = NULL; //release ref to the uno object
+ m_xDialog.clear(); //release ref to the uno object
SbxValues aVals;
- FormObjEventListenerImpl* pFormListener = dynamic_cast< FormObjEventListenerImpl* >( m_DialogListener.get() );
bool bWaitForDispose = true; // assume dialog is showing
- if ( pFormListener )
+ if ( m_DialogListener.get() )
{
- bWaitForDispose = pFormListener->isShowing();
+ bWaitForDispose = m_DialogListener->isShowing();
OSL_TRACE("Showing %d", bWaitForDispose );
}
pMeth->Get( aVals);
- if ( !bWaitForDispose )
- {
- // we've either already got a dispose or we'er never going to get one
+ if ( !bWaitForDispose )
+ {
+ // we've either already got a dispose or we'er never going to get one
ResetApiObj();
- } // else wait for dispose
+ } // else wait for dispose
OSL_TRACE("UnloadObject completed ( we hope )");
}
}
@@ -1943,9 +2418,8 @@ void SbUserFormModule::InitObject()
pDocObject = new SbUnoObject( GetName(), uno::makeAny( xVBAFactory->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.UserForm")), aArgs ) ) );
uno::Reference< lang::XComponent > xComponent( aArgs[ 1 ], uno::UNO_QUERY_THROW );
// remove old listener if it exists
- FormObjEventListenerImpl* pFormListener = dynamic_cast< FormObjEventListenerImpl* >( m_DialogListener.get() );
- if ( pFormListener )
- pFormListener->removeListener();
+ if ( m_DialogListener.get() )
+ m_DialogListener->removeListener();
m_DialogListener = new FormObjEventListenerImpl( this, xComponent );
triggerInitializeEvent();
diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx
index 0cf0d9870378..42969b98d0d8 100644
--- a/basic/source/comp/exprtree.cxx
+++ b/basic/source/comp/exprtree.cxx
@@ -1009,13 +1009,8 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa
else
pExpr = new SbiExpression( pParser );
- if( bByVal )
- {
- if( !pExpr->IsLvalue() )
- pParser->Error( SbERR_LVALUE_EXPECTED );
- else
- pExpr->SetByVal();
- }
+ if( bByVal && pExpr->IsLvalue() )
+ pExpr->SetByVal();
//pExpr = bConst ? new SbiConstExpression( pParser )
// : new SbiExpression( pParser );
diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx
index 6e4f7ddf126e..e6fe73177dd2 100644..100755
--- a/basic/source/comp/sbcomp.cxx
+++ b/basic/source/comp/sbcomp.cxx
@@ -31,10 +31,310 @@
#include <basic/sbx.hxx>
#include "sbcomp.hxx"
#include "image.hxx"
+#include "sbtrace.hxx"
+//==========================================================================
+// Tracing, for debugging only
+
+// To activate tracing enable in sbtrace.hxx
+#ifdef DBG_TRACE_BASIC
+
+#include <hash_map>
+
+// Trace Settings
+static const char* GpTraceFileName = "d:\\zBasic.Asm\\BasicTrace.txt";
+static const bool GbIncludePCodes = false;
+static const int GnIndentPerCallLevel = 4;
+static const int GnIndentForPCode = 2;
+
+struct TraceTextData
+{
+ rtl::OString m_aTraceStr_STMNT;
+ rtl::OString m_aTraceStr_PCode;
+};
+typedef std::hash_map< sal_Int32, TraceTextData > PCToTextDataMap;
+typedef std::hash_map< ::rtl::OUString, PCToTextDataMap*, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > ModuleTraceMap;
+
+ModuleTraceMap GaModuleTraceMap;
+ModuleTraceMap& rModuleTraceMap = GaModuleTraceMap;
+
+static void lcl_PrepareTraceForModule( SbModule* pModule )
+{
+ String aModuleName = pModule->GetName();
+ ModuleTraceMap::iterator it = rModuleTraceMap.find( aModuleName );
+ if( it != rModuleTraceMap.end() )
+ {
+ PCToTextDataMap* pInnerMap = it->second;
+ delete pInnerMap;
+ rModuleTraceMap.erase( it );
+ }
+
+ String aDisassemblyStr;
+ pModule->Disassemble( aDisassemblyStr );
+}
+
+static void lcl_lineOut( const char* pFileName, const char* pStr, const char* pPreStr = NULL )
+{
+ const char* pPrintFirst = (pPreStr != NULL) ? pPreStr : "";
+ FILE* pFile = fopen( pFileName, "a+" );
+ if( pFile != NULL )
+ {
+ fprintf( pFile, "%s%s\n", pPrintFirst, pStr );
+ fclose( pFile );
+ }
+}
+
+const char* lcl_getSpaces( int nSpaceCount )
+{
+ static sal_Char Spaces[] = " "
+ " "
+ " ";
+ static int nAvailableSpaceCount = strlen( Spaces );
+ static sal_Char* pSpacesEnd = Spaces + nAvailableSpaceCount;
+
+ if( nSpaceCount > nAvailableSpaceCount )
+ nSpaceCount = nAvailableSpaceCount;
+
+ return pSpacesEnd - nSpaceCount;
+}
+
+static rtl::OString lcl_toOStringSkipLeadingWhites( const String& aStr )
+{
+ static sal_Char Buffer[1000];
+
+ rtl::OString aOStr = OUStringToOString( rtl::OUString( aStr ), RTL_TEXTENCODING_ASCII_US );
+ const sal_Char* pStr = aOStr.getStr();
+
+ // Skip whitespace
+ sal_Char c = *pStr;
+ while( c == ' ' || c == '\t' )
+ {
+ pStr++;
+ c = *pStr;
+ }
+
+ int nLen = strlen( pStr );
+ strncpy( Buffer, pStr, nLen );
+ Buffer[nLen] = 0;
+
+ rtl::OString aORetStr( Buffer );
+ return aORetStr;
+}
+
+String dumpMethodParameters( SbMethod* pMethod )
+{
+ String aStr;
+ if( pMethod == NULL )
+ return aStr;
+
+ SbxError eOld = SbxBase::GetError();
+
+ SbxArray* pParams = pMethod->GetParameters();
+ SbxInfo* pInfo = pMethod->GetInfo();
+ if ( pParams )
+ {
+ aStr += '(';
+ // 0 is sub itself
+ for ( USHORT nParam = 1; nParam < pParams->Count(); nParam++ )
+ {
+ SbxVariable* pVar = pParams->Get( nParam );
+ DBG_ASSERT( pVar, "Parameter?!" );
+ if ( pVar->GetName().Len() )
+ aStr += pVar->GetName();
+ else if ( pInfo )
+ {
+ const SbxParamInfo* pParam = pInfo->GetParam( nParam );
+ if ( pParam )
+ aStr += pParam->aName;
+ }
+ aStr += '=';
+ if( pVar->GetType() & SbxARRAY )
+ aStr += String( RTL_CONSTASCII_USTRINGPARAM( "..." ) );
+ else
+ aStr += pVar->GetString();
+ if ( nParam < ( pParams->Count() - 1 ) )
+ aStr += String( RTL_CONSTASCII_USTRINGPARAM( ", " ) );
+ }
+ aStr += ')';
+ }
+
+ SbxBase::ResetError();
+ if( eOld != SbxERR_OK )
+ SbxBase::SetError( eOld );
+
+ return aStr;
+}
+
+// Public functions
+void dbg_InitTrace( void )
+{
+ FILE* pFile = fopen( GpTraceFileName, "w" );
+ if( pFile != NULL )
+ fclose( pFile );
+}
+
+void dbg_traceStep( SbModule* pModule, UINT32 nPC, INT32 nCallLvl )
+{
+ SbModule* pTraceMod = pModule;
+ if( pTraceMod->ISA(SbClassModuleObject) )
+ {
+ SbClassModuleObject* pClassModuleObj = (SbClassModuleObject*)(SbxBase*)pTraceMod;
+ pTraceMod = pClassModuleObj->getClassModule();
+ }
+
+ String aModuleName = pTraceMod->GetName();
+ ModuleTraceMap::iterator it = rModuleTraceMap.find( aModuleName );
+ if( it == rModuleTraceMap.end() )
+ {
+ const char* pModuleNameStr = OUStringToOString( rtl::OUString( aModuleName ), RTL_TEXTENCODING_ASCII_US ).getStr();
+ char Buffer[200];
+ sprintf( Buffer, "TRACE ERROR: Unknown module \"%s\"", pModuleNameStr );
+ lcl_lineOut( GpTraceFileName, Buffer );
+ return;
+ }
+
+ PCToTextDataMap* pInnerMap = it->second;
+ if( pInnerMap == NULL )
+ {
+ lcl_lineOut( GpTraceFileName, "TRACE INTERNAL ERROR: No inner map" );
+ return;
+ }
+
+ PCToTextDataMap::iterator itInner = pInnerMap->find( nPC );
+ if( itInner == pInnerMap->end() )
+ {
+ const char* pModuleNameStr = OUStringToOString( rtl::OUString( aModuleName ), RTL_TEXTENCODING_ASCII_US ).getStr();
+ char Buffer[200];
+ sprintf( Buffer, "TRACE ERROR: No info for PC = %d in module \"%s\"", nPC, pModuleNameStr );
+ lcl_lineOut( GpTraceFileName, Buffer );
+ return;
+ }
+
+ //nCallLvl--;
+ //if( nCallLvl < 0 )
+ // nCallLvl = 0;
+ int nIndent = nCallLvl * GnIndentPerCallLevel;
+
+ const TraceTextData& rTraceTextData = itInner->second;
+ const rtl::OString& rStr_STMNT = rTraceTextData.m_aTraceStr_STMNT;
+ if( rStr_STMNT.getLength() )
+ lcl_lineOut( GpTraceFileName, rStr_STMNT.getStr(), lcl_getSpaces( nIndent ) );
+
+ if( !GbIncludePCodes )
+ return;
+
+ nIndent += GnIndentForPCode;
+ const rtl::OString& rStr_PCode = rTraceTextData.m_aTraceStr_PCode;
+ if( rStr_PCode.getLength() )
+ lcl_lineOut( GpTraceFileName, rStr_PCode.getStr(), lcl_getSpaces( nIndent ) );
+}
+
+void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, INT32 nCallLvl, bool bLeave )
+{
+ static const char* pSeparator = "' ================================================================================";
+
+ SbModule* pTraceMod = pModule;
+ SbClassModuleObject* pClassModuleObj = NULL;
+ if( pTraceMod->ISA(SbClassModuleObject) )
+ {
+ pClassModuleObj = (SbClassModuleObject*)(SbxBase*)pTraceMod;
+ pTraceMod = pClassModuleObj->getClassModule();
+ }
+
+ if( nCallLvl > 0 )
+ nCallLvl--;
+ int nIndent = nCallLvl * GnIndentPerCallLevel;
+ if( !bLeave )
+ {
+ lcl_lineOut( GpTraceFileName, "" );
+ lcl_lineOut( GpTraceFileName, pSeparator, lcl_getSpaces( nIndent ) );
+ }
+
+ String aStr;
+ if( bLeave )
+ {
+ lcl_lineOut( GpTraceFileName, "}", lcl_getSpaces( nIndent ) );
+ aStr.AppendAscii( "' Leaving " );
+ }
+ else
+ {
+ aStr.AppendAscii( "Entering " );
+ }
+ String aModuleName = pModule->GetName();
+ aStr += aModuleName;
+ if( pMethod != NULL )
+ {
+ aStr.AppendAscii( "::" );
+ String aMethodName = pMethod->GetName();
+ aStr += aMethodName;
+ }
+ else
+ {
+ aStr.AppendAscii( "/RunInit" );
+ }
+
+ if( pClassModuleObj != NULL )
+ {
+ aStr.AppendAscii( "[this=" );
+ aStr += pClassModuleObj->GetName();
+ aStr.AppendAscii( "]" );
+ }
+ if( !bLeave )
+ aStr += dumpMethodParameters( pMethod );
+
+ lcl_lineOut( GpTraceFileName, OUStringToOString( rtl::OUString( aStr ), RTL_TEXTENCODING_ASCII_US ).getStr(), lcl_getSpaces( nIndent ) );
+ if( !bLeave )
+ lcl_lineOut( GpTraceFileName, "{", lcl_getSpaces( nIndent ) );
+
+ if( bLeave )
+ lcl_lineOut( GpTraceFileName, "" );
+}
+
+void dbg_traceNotifyError( SbError nTraceErr, const String& aTraceErrMsg, bool bTraceErrHandled, INT32 nCallLvl )
+{
+ rtl::OString aOTraceErrMsg = OUStringToOString( rtl::OUString( aTraceErrMsg ), RTL_TEXTENCODING_ASCII_US );
+
+ char Buffer[200];
+ const char* pHandledStr = bTraceErrHandled ? " / HANDLED" : "";
+ sprintf( Buffer, "*** ERROR%s, Id = %d, Msg = \"%s\" ***", pHandledStr, (int)nTraceErr, aOTraceErrMsg.getStr() );
+ int nIndent = nCallLvl * GnIndentPerCallLevel;
+ lcl_lineOut( GpTraceFileName, Buffer, lcl_getSpaces( nIndent ) );
+}
+
+void dbg_RegisterTraceTextForPC( SbModule* pModule, UINT32 nPC,
+ const String& aTraceStr_STMNT, const String& aTraceStr_PCode )
+{
+ String aModuleName = pModule->GetName();
+ ModuleTraceMap::iterator it = rModuleTraceMap.find( aModuleName );
+ PCToTextDataMap* pInnerMap;
+ if( it == rModuleTraceMap.end() )
+ {
+ pInnerMap = new PCToTextDataMap();
+ rModuleTraceMap[ aModuleName ] = pInnerMap;
+ }
+ else
+ {
+ pInnerMap = it->second;
+ }
+
+ TraceTextData aData;
+
+ rtl::OString aOTraceStr_STMNT = lcl_toOStringSkipLeadingWhites( aTraceStr_STMNT );
+ aData.m_aTraceStr_STMNT = aOTraceStr_STMNT;
+
+ rtl::OString aOTraceStr_PCode = lcl_toOStringSkipLeadingWhites( aTraceStr_PCode );
+ aData.m_aTraceStr_PCode = aOTraceStr_PCode;
+
+ (*pInnerMap)[nPC] = aData;
+}
+
+#endif
+
+
+//==========================================================================
// For debugging only
-// #define DBG_SAVE_DISASSEMBLY
+//#define DBG_SAVE_DISASSEMBLY
#ifdef DBG_SAVE_DISASSEMBLY
static bool dbg_bDisassemble = true;
@@ -67,7 +367,7 @@ void dbg_SaveDisassembly( SbModule* pModule )
( OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY );
if( xSFI.is() )
{
- String aFile( RTL_CONSTASCII_USTRINGPARAM("file:///d:/BasicAsm_") );
+ String aFile( RTL_CONSTASCII_USTRINGPARAM("file:///d:/zBasic.Asm/Asm_") );
StarBASIC* pBasic = (StarBASIC*)pModule->GetParent();
if( pBasic )
{
@@ -99,6 +399,7 @@ void dbg_SaveDisassembly( SbModule* pModule )
}
#endif
+
// Diese Routine ist hier definiert, damit der Compiler als eigenes Segment
// geladen werden kann.
@@ -131,6 +432,7 @@ BOOL SbModule::Compile()
if( bRet )
{
pBasic->ClearAllModuleVars();
+ RemoveVars(); // remove 'this' Modules variables
// clear all method statics
for( USHORT i = 0; i < pMethods->Count(); i++ )
{
@@ -154,6 +456,10 @@ BOOL SbModule::Compile()
dbg_SaveDisassembly( this );
#endif
+#ifdef DBG_TRACE_BASIC
+ lcl_PrepareTraceForModule( this );
+#endif
+
return bRet;
}
diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx
index ac1199f6c233..7fd6eb06f607 100644
--- a/basic/source/inc/namecont.hxx
+++ b/basic/source/inc/namecont.hxx
@@ -60,7 +60,7 @@
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/compbase8.hxx>
#include <cppuhelper/interfacecontainer.hxx>
-#include <com/sun/star/script/XVBACompat.hpp>
+#include <com/sun/star/script/vba/XVBACompatibility.hpp>
class BasicManager;
@@ -74,7 +74,7 @@ typedef ::cppu::WeakComponentImplHelper8<
::com::sun::star::script::XLibraryContainerExport,
::com::sun::star::script::XLibraryContainer3,
::com::sun::star::container::XContainer,
- ::com::sun::star::script::XVBACompat,
+ ::com::sun::star::script::vba::XVBACompatibility,
::com::sun::star::lang::XServiceInfo > LibraryContainerHelper;
typedef ::cppu::WeakImplHelper2< ::com::sun::star::container::XNameContainer,
@@ -507,9 +507,9 @@ public:
throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
throw (::com::sun::star::uno::RuntimeException) = 0;
- // Methods XVBACompat
- virtual ::sal_Bool SAL_CALL getVBACompatModeOn() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setVBACompatModeOn( ::sal_Bool _vbacompatmodeon ) throw (::com::sun::star::uno::RuntimeException);
+ // Methods XVBACompatibility
+ virtual ::sal_Bool SAL_CALL getVBACompatibilityMode() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setVBACompatibilityMode( ::sal_Bool _vbacompatmodeon ) throw (::com::sun::star::uno::RuntimeException);
};
class LibraryContainerMethodGuard
diff --git a/tools/inc/tools/agitem.hxx b/basic/source/inc/sbtrace.hxx
index 3177bdffa0a8..e8a482c2f6e9 100644..100755
--- a/tools/inc/tools/agitem.hxx
+++ b/basic/source/inc/sbtrace.hxx
@@ -25,27 +25,18 @@
*
************************************************************************/
-#ifndef _AGITEM_HXX
-#define _AGITEM_HXX
+#ifndef _SBTRACE_HXX
+#define _SBTRACE_HXX
-#include <tools/solar.h>
+// #define DBG_TRACE_BASIC
-class String;
-class INetURLObject;
-class AgentApi;
-class ChApi;
-
-class AgentItem
-{
-public:
- virtual const String& GetChAgentName() const = 0;
- virtual const INetURLObject& GetLocation() const = 0;
- virtual AgentApi* GetApi() const = 0;
- virtual ChApi* GetChApi() const = 0;
-
- virtual void SetIsActive(BOOL bNew) = 0;
- virtual BOOL IsActive() const = 0;
-};
-
-#endif //_AGITEM_HXX
+#ifdef DBG_TRACE_BASIC
+void dbg_InitTrace( void );
+void dbg_traceStep( SbModule* pModule, UINT32 nPC, INT32 nCallLvl );
+void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, INT32 nCallLvl, bool bLeave = false );
+void dbg_traceNotifyError( SbError nTraceErr, const String& aTraceErrMsg, bool bTraceErrHandled, INT32 nCallLvl );
+void dbg_RegisterTraceTextForPC( SbModule* pModule, UINT32 nPC,
+ const String& aTraceStr_STMNT, const String& aTraceStr_PCode );
+#endif
+#endif
diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx
index d184a2d558e2..091fbc24cdbe 100644
--- a/basic/source/inc/scriptcont.hxx
+++ b/basic/source/inc/scriptcont.hxx
@@ -30,7 +30,7 @@
#include "namecont.hxx"
#include <basic/basmgr.hxx>
-#include <com/sun/star/script/XVBAModuleInfo.hpp>
+#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
#include <comphelper/uno3.hxx>
class BasicManager;
@@ -141,7 +141,7 @@ public:
//============================================================================
typedef std::hash_map< ::rtl::OUString, ::com::sun::star::script::ModuleInfo, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > ModuleInfoMap;
-typedef ::cppu::ImplHelper1 < ::com::sun::star::script::XVBAModuleInfo
+typedef ::cppu::ImplHelper1 < ::com::sun::star::script::vba::XVBAModuleInfo
> SfxScriptLibrary_BASE;
class SfxScriptLibrary : public SfxLibrary
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 36fbda5c9097..97f6ed227d47 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -103,15 +103,10 @@ using namespace com::sun::star::io;
#include <stdlib.h>
#include <ctype.h>
-#if defined (WIN) || defined (WNT) || defined (OS2)
+#if defined (WNT) || defined (OS2)
#include <direct.h> // _getdcwd get current work directory, _chdrive
#endif
-#ifdef WIN
-#include <dos.h> // _dos_getfileattr
-#include <errno.h>
-#endif
-
#ifdef UNX
#include <errno.h>
#include <unistd.h>
@@ -420,7 +415,7 @@ RTLFUNC(CurDir)
// zu ermitteln, dass eine virtuelle URL geliefert werden koennte.
// rPar.Get(0)->PutEmpty();
-#if defined (WIN) || defined (WNT) || defined (OS2)
+#if defined (WNT) || defined (OS2)
int nCurDir = 0; // Current dir // JSM
if ( rPar.Count() == 2 )
{
@@ -527,7 +522,7 @@ RTLFUNC(ChDrive) // JSM
#ifndef UNX
String aPar1 = rPar.Get(1)->GetString();
-#if defined (WIN) || defined (WNT) || defined (OS2)
+#if defined (WNT) || defined (OS2)
if (aPar1.Len() > 0)
{
int nCurDrive = (int)aPar1.GetBuffer()[0]; ;
@@ -2792,11 +2787,7 @@ RTLFUNC(Dir)
pRTLData->nDirFlags = nFlags = rPar.Get(2)->GetInteger();
else
pRTLData->nDirFlags = 0;
- // Nur diese Bitmaske ist unter Windows erlaubt
- #ifdef WIN
- if( nFlags & ~0x1E )
- StarBASIC::Error( SbERR_BAD_ARGUMENT ), pRTLData->nDirFlags = 0;
- #endif
+
// Sb_ATTR_VOLUME wird getrennt gehandelt
if( pRTLData->nDirFlags & Sb_ATTR_VOLUME )
aPath = aEntry.GetVolume();
@@ -2826,31 +2817,7 @@ RTLFUNC(Dir)
}
DirEntry aNextEntry=(*(pRTLData->pDir))[pRTLData->nCurDirPos++];
aPath = aNextEntry.GetName(); //Full();
- #ifdef WIN
- aNextEntry.ToAbs();
- String sFull(aNextEntry.GetFull());
- unsigned nFlags;
-
- if (_dos_getfileattr( sFull.GetStr(), &nFlags ))
- StarBASIC::Error( SbERR_FILE_NOT_FOUND );
- else
- {
- INT16 nCurFlags = pRTLData->nDirFlags;
- if( (nCurFlags == Sb_ATTR_NORMAL)
- && !(nFlags & ( _A_HIDDEN | _A_SYSTEM | _A_VOLID | _A_SUBDIR ) ) )
- break;
- else if( (nCurFlags & Sb_ATTR_HIDDEN) && (nFlags & _A_HIDDEN) )
- break;
- else if( (nCurFlags & Sb_ATTR_SYSTEM) && (nFlags & _A_SYSTEM) )
- break;
- else if( (nCurFlags & Sb_ATTR_VOLUME) && (nFlags & _A_VOLID) )
- break;
- else if( (nCurFlags & Sb_ATTR_DIRECTORY) && (nFlags & _A_SUBDIR) )
- break;
- }
- #else
break;
- #endif
}
}
rPar.Get(0)->PutString( aPath );
@@ -3404,8 +3371,8 @@ RTLFUNC(Shell)
}
else
{
- USHORT nOptions = NAMESPACE_VOS(OProcess)::TOption_SearchPath|
- NAMESPACE_VOS(OProcess)::TOption_Detached;
+ USHORT nOptions = vos::OProcess::TOption_SearchPath|
+ vos::OProcess::TOption_Detached;
String aCmdLine = rPar.Get(1)->GetString();
// Zusaetzliche Parameter anhaengen, es muss eh alles geparsed werden
if( nArgCount >= 4 )
@@ -3483,13 +3450,13 @@ RTLFUNC(Shell)
switch( nWinStyle )
{
case 2:
- nOptions |= NAMESPACE_VOS(OProcess)::TOption_Minimized;
+ nOptions |= vos::OProcess::TOption_Minimized;
break;
case 3:
- nOptions |= NAMESPACE_VOS(OProcess)::TOption_Maximized;
+ nOptions |= vos::OProcess::TOption_Maximized;
break;
case 10:
- nOptions |= NAMESPACE_VOS(OProcess)::TOption_FullScreen;
+ nOptions |= vos::OProcess::TOption_FullScreen;
break;
}
@@ -3497,10 +3464,10 @@ RTLFUNC(Shell)
if( nArgCount >= 5 )
bSync = rPar.Get(4)->GetBool();
if( bSync )
- nOptions |= NAMESPACE_VOS(OProcess)::TOption_Wait;
+ nOptions |= vos::OProcess::TOption_Wait;
}
- NAMESPACE_VOS(OProcess)::TProcessOption eOptions =
- (NAMESPACE_VOS(OProcess)::TProcessOption)nOptions;
+ vos::OProcess::TProcessOption eOptions =
+ (vos::OProcess::TProcessOption)nOptions;
// #72471 Parameter aufbereiten
@@ -3530,25 +3497,25 @@ RTLFUNC(Shell)
}
//const char* pParams = aParams.Len() ? aParams.GetStr() : 0;
- NAMESPACE_VOS(OProcess)* pApp;
- pApp = new NAMESPACE_VOS(OProcess)( aOUStrProgUNC );
+ vos::OProcess* pApp;
+ pApp = new vos::OProcess( aOUStrProgUNC );
BOOL bSucc;
if( nParamCount == 0 )
{
- bSucc = pApp->execute( eOptions ) == NAMESPACE_VOS(OProcess)::E_None;
+ bSucc = pApp->execute( eOptions ) == vos::OProcess::E_None;
}
else
{
- NAMESPACE_VOS(OArgumentList) aArgList( pArgumentList, nParamCount );
- bSucc = pApp->execute( eOptions, aArgList ) == NAMESPACE_VOS(OProcess)::E_None;
+ vos::OArgumentList aArgList( pArgumentList, nParamCount );
+ bSucc = pApp->execute( eOptions, aArgList ) == vos::OProcess::E_None;
}
/*
if( nParamCount == 0 )
- pApp = new NAMESPACE_VOS(OProcess)( pProg );
+ pApp = new vos::OProcess( pProg );
else
- pApp = new NAMESPACE_VOS(OProcess)( pProg, pParamList, nParamCount );
- BOOL bSucc = pApp->execute( eOptions ) == NAMESPACE_VOS(OProcess)::E_None;
+ pApp = new vos::OProcess( pProg, pParamList, nParamCount );
+ BOOL bSucc = pApp->execute( eOptions ) == vos::OProcess::E_None;
*/
delete pApp;
@@ -4134,8 +4101,7 @@ RTLFUNC(Load)
{
if( pObj->IsA( TYPE( SbUserFormModule ) ) )
{
- SbUserFormModule* pFormModule = ( SbUserFormModule* )pObj;
- pFormModule->load();
+ ((SbUserFormModule*)pObj)->Load();
}
else if( pObj->IsA( TYPE( SbxObject ) ) )
{
@@ -4381,16 +4347,6 @@ RTLFUNC(SetAttr) // JSM
// #57064 Bei virtuellen URLs den Real-Path extrahieren
DirEntry aEntry( aStr );
String aFile = aEntry.GetFull();
- #ifdef WIN
- int nErr = _dos_setfileattr( aFile.GetStr(),(unsigned ) nFlags );
- if ( nErr )
- {
- if (errno == EACCES)
- StarBASIC::Error( SbERR_ACCESS_DENIED );
- else
- StarBASIC::Error( SbERR_FILE_NOT_FOUND );
- }
- #endif
ByteString aByteFile( aFile, gsl_getSystemTextEncoding() );
#ifdef WNT
if (!SetFileAttributes (aByteFile.GetBuffer(),(DWORD)nFlags))
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 8c7da2403705..bbb3e930e012 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -28,11 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_basic.hxx"
-#if defined(WIN)
-#include <string.h>
-#else
#include <stdlib.h> // getenv
-#endif
#include <vcl/svapp.hxx>
#include <vcl/mapmod.hxx>
#include <vcl/wrkwin.hxx>
@@ -52,10 +48,6 @@
#include <svpm.h>
#endif
-#if defined(WIN)
-#include <tools/svwin.h>
-#endif
-
#ifndef CLK_TCK
#define CLK_TCK CLOCKS_PER_SEC
#endif
@@ -1163,31 +1155,10 @@ RTLFUNC(Environ)
}
String aResult;
// sollte ANSI sein, aber unter Win16 in DLL nicht moeglich
-#if defined(WIN)
- LPSTR lpszEnv = GetDOSEnvironment();
- String aCompareStr( rPar.Get(1)->GetString() );
- aCompareStr += '=';
- const char* pCompare = aCompareStr.GetStr();
- int nCompareLen = aCompareStr.Len();
- while ( *lpszEnv )
- {
- // Es werden alle EnvString in der Form ENV=VAL 0-terminiert
- // aneinander gehaengt.
-
- if ( strnicmp( pCompare, lpszEnv, nCompareLen ) == 0 )
- {
- aResult = (const char*)(lpszEnv+nCompareLen);
- rPar.Get(0)->PutString( aResult );
- return;
- }
- lpszEnv += lstrlen( lpszEnv ) + 1; // Next Enviroment-String
- }
-#else
ByteString aByteStr( rPar.Get(1)->GetString(), gsl_getSystemTextEncoding() );
const char* pEnvStr = getenv( aByteStr.GetBuffer() );
if ( pEnvStr )
aResult = String::CreateFromAscii( pEnvStr );
-#endif
rPar.Get(0)->PutString( aResult );
}
@@ -1198,11 +1169,7 @@ static double GetDialogZoomFactor( BOOL bX, long nValue )
if( pDevice )
{
Size aRefSize( nValue, nValue );
-#ifndef WIN
Fraction aFracX( 1, 26 );
-#else
- Fraction aFracX( 1, 23 );
-#endif
Fraction aFracY( 1, 24 );
MapMode aMap( MAP_APPFONT, Point(), aFracX, aFracY );
Size aScaledSize = pDevice->LogicToPixel( aRefSize, aMap );
diff --git a/basic/source/runtime/props.cxx b/basic/source/runtime/props.cxx
index cec74444e7a2..663d12fbcd72 100644
--- a/basic/source/runtime/props.cxx
+++ b/basic/source/runtime/props.cxx
@@ -76,6 +76,13 @@ RTLFUNC(False)
rPar.Get(0)->PutBool( FALSE );
}
+RTLFUNC(Empty)
+{
+ (void)pBasic;
+ (void)bWrite;
+ (void)rPar;
+}
+
RTLFUNC(Nothing)
{
(void)pBasic;
diff --git a/basic/source/runtime/rtlproto.hxx b/basic/source/runtime/rtlproto.hxx
index 1a1ae4f32283..5437654f69a0 100644
--- a/basic/source/runtime/rtlproto.hxx
+++ b/basic/source/runtime/rtlproto.hxx
@@ -38,6 +38,7 @@ extern RTLFUNC(Date);
extern RTLFUNC(Err);
extern RTLFUNC(Erl);
extern RTLFUNC(False);
+extern RTLFUNC(Empty);
extern RTLFUNC(Nothing);
extern RTLFUNC(Null);
extern RTLFUNC(True);
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index c3419adbfdb3..1bb6fb82e113 100755
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -44,6 +44,7 @@
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include "sbunoobj.hxx"
#include "errobject.hxx"
+#include "sbtrace.hxx"
using namespace ::com::sun::star;
@@ -720,6 +721,12 @@ BOOL SbiRuntime::Step()
if( pInst->IsReschedule() && bStaticGlobalEnableReschedule )
Application::Reschedule();
}
+
+#ifdef DBG_TRACE_BASIC
+ UINT32 nPC = ( pCode - (const BYTE* )pImg->GetCode() );
+ dbg_traceStep( pMod, nPC, pINST->nCallLvl );
+#endif
+
SbiOpcode eOp = (SbiOpcode ) ( *pCode++ );
UINT32 nOp1, nOp2;
if( eOp <= SbOP0_END )
@@ -756,6 +763,11 @@ BOOL SbiRuntime::Step()
// (insbesondere nicht nach Compiler-Fehlern zur Laufzeit)
if( nError && bRun )
{
+#ifdef DBG_TRACE_BASIC
+ SbError nTraceErr = nError;
+ String aTraceErrMsg = GetSbData()->aErrMsg;
+ bool bTraceErrHandled = true;
+#endif
SbError err = nError;
ClearExprStack();
nError = 0;
@@ -836,12 +848,19 @@ BOOL SbiRuntime::Step()
// Kein Error-Hdl gefunden -> altes Vorgehen
else
{
+#ifdef DBG_TRACE_BASIC
+ bTraceErrHandled = false;
+#endif
pInst->Abort();
}
// ALT: Nur
// pInst->Abort();
}
+
+#ifdef DBG_TRACE_BASIC
+ dbg_traceNotifyError( nTraceErr, aTraceErrMsg, bTraceErrHandled, pINST->nCallLvl );
+#endif
}
}
return bRun;
diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index 60d2e9cf448d..4455901bfeba 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -221,6 +221,7 @@ static Methods aMethods[] = {
{ "FileSpec", SbxSTRING, 0,NULL,0 },
{ "DumpAll", SbxINTEGER, _OPT, NULL,0 },
+{ "Empty", SbxVARIANT, _CPROP, RTLNAME(Empty),0 },
{ "EqualUnoObjects",SbxBOOL, 2 | _FUNCTION, RTLNAME(EqualUnoObjects),0 },
{ "Variant", SbxVARIANT, 0,NULL,0 },
{ "Variant", SbxVARIANT, 0,NULL,0 },
diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx
index 1d9333ff7555..ea40f0c65877 100644
--- a/basic/source/runtime/step0.cxx
+++ b/basic/source/runtime/step0.cxx
@@ -138,7 +138,6 @@ void SbiRuntime::StepCompare( SbxOperator eOp )
}
}
-#ifndef WIN
static SbxVariable* pTRUE = NULL;
static SbxVariable* pFALSE = NULL;
@@ -162,12 +161,6 @@ void SbiRuntime::StepCompare( SbxOperator eOp )
}
PushVar( pFALSE );
}
-#else
- BOOL bRes = p2->Compare( eOp, *p1 );
- SbxVariable* pRes = new SbxVariable;
- pRes->PutBool( bRes );
- PushVar( pRes );
-#endif
}
void SbiRuntime::StepEXP() { StepArith( SbxEXP ); }
@@ -312,9 +305,21 @@ void SbiRuntime::StepIS()
{
SbxVariableRef refVar1 = PopVar();
SbxVariableRef refVar2 = PopVar();
- BOOL bRes = BOOL(
- refVar1->GetType() == SbxOBJECT
- && refVar2->GetType() == SbxOBJECT );
+
+ SbxDataType eType1 = refVar1->GetType();
+ SbxDataType eType2 = refVar2->GetType();
+ if ( eType1 == SbxEMPTY )
+ {
+ refVar1->Broadcast( SBX_HINT_DATAWANTED );
+ eType1 = refVar1->GetType();
+ }
+ if ( eType2 == SbxEMPTY )
+ {
+ refVar2->Broadcast( SBX_HINT_DATAWANTED );
+ eType2 = refVar2->GetType();
+ }
+
+ BOOL bRes = BOOL( eType1 == SbxOBJECT && eType2 == SbxOBJECT );
if ( bVBAEnabled && !bRes )
Error( SbERR_INVALID_USAGE_OBJECT );
bRes = ( bRes && refVar1->GetObject() == refVar2->GetObject() );
@@ -520,9 +525,10 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b
// Handle withevents
BOOL bWithEvents = refVar->IsSet( SBX_WITH_EVENTS );
- Reference< XInterface > xComListener;
- if( bWithEvents )
+ if ( bWithEvents )
{
+ Reference< XInterface > xComListener;
+
SbxBase* pObj = refVal->GetObject();
SbUnoObject* pUnoObj = (pObj != NULL) ? PTR_CAST(SbUnoObject,pObj) : NULL;
if( pUnoObj != NULL )
@@ -533,13 +539,17 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b
::rtl::OUString aPrefix = refVar->GetName();
SbxObjectRef xScopeObj = refVar->GetParent();
xComListener = createComListener( aControlAny, aVBAType, aPrefix, xScopeObj );
- }
- }
- *refVar = *refVal;
+ refVal->SetDeclareClassName( aDeclareClassName );
+ refVal->SetComListener( xComListener ); // Hold reference
+ }
- if( bWithEvents )
- refVar->SetComListener( xComListener ); // Hold reference
+ *refVar = *refVal;
+ }
+ else
+ {
+ *refVar = *refVal;
+ }
// lhs is a property who's value is currently (Empty e.g. no broadcast yet)
// in this case if there is a default prop involved the value of the
diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx
index 72ea67dd8db4..587b0ae7a590 100644..100755
--- a/basic/source/runtime/step2.cxx
+++ b/basic/source/runtime/step2.cxx
@@ -263,8 +263,10 @@ SbxVariable* SbiRuntime::FindElement
pElem = pNew;
}
// Index-Access bei UnoObjekten beruecksichtigen
- /*
- else if( pElem->ISA(SbUnoProperty) )
+ // definitely we want this for VBA where properties are often
+ // collections ( which need index access ), but lets only do
+ // this if we actually have params following
+ else if( bVBAEnabled && pElem->ISA(SbUnoProperty) && pElem->GetParameters() )
{
// pElem auf eine Ref zuweisen, um ggf. eine Temp-Var zu loeschen
SbxVariableRef refTemp = pElem;
@@ -274,7 +276,6 @@ SbxVariable* SbiRuntime::FindElement
pElem->SetParameters( NULL ); // sonst bleibt Ref auf sich selbst
pElem = pNew;
}
- */
}
return CheckArray( pElem );
}
@@ -377,7 +378,8 @@ void SbiRuntime::SetupArgs( SbxVariable* p, UINT32 nOp1 )
bool bError_ = true;
SbUnoMethod* pUnoMethod = PTR_CAST(SbUnoMethod,p);
- if( pUnoMethod )
+ SbUnoProperty* pUnoProperty = PTR_CAST(SbUnoProperty,p);
+ if( pUnoMethod || pUnoProperty )
{
SbUnoObject* pParentUnoObj = PTR_CAST( SbUnoObject,p->GetParent() );
if( pParentUnoObj )
@@ -677,7 +679,18 @@ void SbiRuntime::StepPARAM( UINT32 nOp1, UINT32 nOp2 )
while( iLoop >= nParamCount )
{
p = new SbxVariable();
- p->PutErr( 448 ); // Wie in VB: Error-Code 448 (SbERR_NAMED_NOT_FOUND)
+
+ if( SbiRuntime::isVBAEnabled() &&
+ (t == SbxOBJECT || t == SbxSTRING) )
+ {
+ if( t == SbxOBJECT )
+ p->PutObject( NULL );
+ else
+ p->PutString( String() );
+ }
+ else
+ p->PutErr( 448 ); // Wie in VB: Error-Code 448 (SbERR_NAMED_NOT_FOUND)
+
refParams->Put( p, iLoop );
iLoop--;
}
@@ -1157,15 +1170,26 @@ void SbiRuntime::StepGLOBAL( UINT32 nOp1, UINT32 nOp2 )
StepPUBLIC_Impl( nOp1, nOp2, true );
String aName( pImg->GetString( static_cast<short>( nOp1 ) ) );
- SbxDataType t = (SbxDataType)(SbxDataType)(nOp2 & 0xffff);;
- BOOL bFlag = rBasic.IsSet( SBX_NO_MODIFY );
+ SbxDataType t = (SbxDataType)(nOp2 & 0xffff);
+
+ // Store module scope variables at module scope
+ // in non vba mode these are stored at the library level :/
+ // not sure if this really should not be enabled for ALL basic
+ SbxObject* pStorage = &rBasic;
+ if ( SbiRuntime::isVBAEnabled() )
+ {
+ pStorage = pMod;
+ pMod->AddVarName( aName );
+ }
+
+ BOOL bFlag = pStorage->IsSet( SBX_NO_MODIFY );
rBasic.SetFlag( SBX_NO_MODIFY );
- SbxVariableRef p = rBasic.Find( aName, SbxCLASS_PROPERTY );
+ SbxVariableRef p = pStorage->Find( aName, SbxCLASS_PROPERTY );
if( p.Is() )
- rBasic.Remove (p);
- p = rBasic.Make( aName, SbxCLASS_PROPERTY, t );
+ pStorage->Remove (p);
+ p = pStorage->Make( aName, SbxCLASS_PROPERTY, t );
if( !bFlag )
- rBasic.ResetFlag( SBX_NO_MODIFY );
+ pStorage->ResetFlag( SBX_NO_MODIFY );
if( p )
{
p->SetFlag( SBX_DONTSTORE );
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index b1815228cd99..60bb9fe505e7 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -48,18 +48,11 @@ TYPEINIT0(SbxBase)
SbxAppData* GetSbxData_Impl()
{
-#ifndef DOS
SbxAppData** ppData = (SbxAppData**) ::GetAppData( SHL_SBX );
SbxAppData* p = *ppData;
if( !p )
p = *ppData = new SbxAppData;
return p;
-#else
- SbxAppData** ppData;
- SbxAppData* p;
- p = *ppData = new SbxAppData;
- return p;
-#endif
}
SbxAppData::~SbxAppData()
diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx
index ce532fed0482..8dffb2758749 100644
--- a/basic/source/sbx/sbxdate.cxx
+++ b/basic/source/sbx/sbxdate.cxx
@@ -90,7 +90,6 @@ double ImpGetDate( const SbxValues* p )
nRes = 0;
else
{
-#ifndef DOS
LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
SvNumberFormatter* pFormatter;
@@ -141,9 +140,6 @@ double ImpGetDate( const SbxValues* p )
}
delete pFormatter;
-#else
- SbxBase::SetError( SbxERR_CONVERSION ); nRes = 0;
-#endif
}
break;
case SbxOBJECT:
@@ -246,7 +242,6 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
-#ifndef DOS
{
if( !p->pString )
p->pString = new XubString;
@@ -301,11 +296,8 @@ start:
eLangType );
pFormatter->GetOutputString( n, nIndex, *p->pString, &pColor );
delete pFormatter;
-#endif
break;
-#ifndef DOS
}
-#endif
case SbxOBJECT:
{
SbxValue* pVal = PTR_CAST(SbxValue,p->pObj);
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index e1ad8b6b4308..c31aed1f8ef7 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -2793,7 +2793,6 @@ OUString SfxLibraryContainer::expand_url( const OUString& url )
}
}
-
//XLibraryContainer3
OUString SAL_CALL SfxLibraryContainer::getOriginalLibraryLinkURL( const OUString& Name )
throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
@@ -2808,12 +2807,13 @@ OUString SAL_CALL SfxLibraryContainer::getOriginalLibraryLinkURL( const OUString
}
-::sal_Bool SAL_CALL SfxLibraryContainer::getVBACompatModeOn() throw (RuntimeException)
+// XVBACompatibility
+::sal_Bool SAL_CALL SfxLibraryContainer::getVBACompatibilityMode() throw (RuntimeException)
{
return mbVBACompat;
}
-void SAL_CALL SfxLibraryContainer::setVBACompatModeOn( ::sal_Bool _vbacompatmodeon ) throw (RuntimeException)
+void SAL_CALL SfxLibraryContainer::setVBACompatibilityMode( ::sal_Bool _vbacompatmodeon ) throw (RuntimeException)
{
BasicManager* pBasMgr = getBasicManager();
if( pBasMgr )
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index 5622adc19af1..f7091d1c1a0b 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -216,8 +216,7 @@ void SAL_CALL SfxScriptLibraryContainer::writeLibraryElement
Any aElement = xLib->getByName( aElementName );
aElement >>= aMod.aCode;
- Reference < script::XVBAModuleInfo > xModInfo( xLib, UNO_QUERY );
-
+ Reference< script::vba::XVBAModuleInfo > xModInfo( xLib, UNO_QUERY );
if( xModInfo.is() && xModInfo->hasModuleInfo( aElementName ) )
{
script::ModuleInfo aModInfo = xModInfo->getModuleInfo( aElementName );
@@ -312,9 +311,9 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement
// aMod.aName ignored
if( aMod.aModuleType.getLength() > 0 )
{
- if( !getVBACompatModeOn() )
+ if( !getVBACompatibilityMode() )
{
- setVBACompatModeOn( sal_True );
+ setVBACompatibilityMode( sal_True );
Any aGlobs;
Sequence< Any > aArgs(1);
@@ -381,8 +380,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement
}
}
- Reference< script::XVBAModuleInfo > xVBAModuleInfo( xLib,
- UNO_QUERY );
+ Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, UNO_QUERY );
if( xVBAModuleInfo.is() )
{
if( xVBAModuleInfo->hasModuleInfo( aElementName ) )
diff --git a/boost/aliasing.patch b/boost/aliasing.patch
new file mode 100644
index 000000000000..8e3dc4107344
--- /dev/null
+++ b/boost/aliasing.patch
@@ -0,0 +1,43 @@
+--- misc/boost_1_39_0/boost/function/function_base.hpp
++++ misc/build/boost_1_39_0/boost/function/function_base.hpp
+@@ -2,6 +2,7 @@
+
+ // Copyright Douglas Gregor 2001-2006
+ // Copyright Emil Dotchevski 2007
++// Copyright Dean Michael Berris 2009
+ // Use, modification and distribution is subject to the Boost Software License, Version 1.0.
+ // (See accompanying file LICENSE_1_0.txt or copy at
+ // http://www.boost.org/LICENSE_1_0.txt)
+@@ -41,6 +42,13 @@
+ # pragma warning( disable : 4127 ) // "conditional expression is constant"
+ #endif
+
++#if defined(__GNUC__)
++// Because GCC complains of strict aliasing problems, we make it
++// treat the header as a system header, becoming more forgiving with
++// treating implementation details that may be potentially harmful.
++# pragma GCC system_header
++#endif
++
+ // Define BOOST_FUNCTION_STD_NS to the namespace that contains type_info.
+ #ifdef BOOST_NO_STD_TYPEINFO
+ // Embedded VC++ does not have type_info in namespace std
+@@ -303,15 +311,15 @@
+ {
+ if (op == clone_functor_tag || op == move_functor_tag) {
+ const functor_type* in_functor =
+- reinterpret_cast<const functor_type*>(&in_buffer.data);
++ static_cast<const functor_type*>(static_cast<void*>(&in_buffer.data));
+ new ((void*)&out_buffer.data) functor_type(*in_functor);
+
+ if (op == move_functor_tag) {
+- reinterpret_cast<functor_type*>(&in_buffer.data)->~Functor();
++ static_cast<functor_type*>(static_cast<void*>(&in_buffer.data))->~Functor();
+ }
+ } else if (op == destroy_functor_tag) {
+ // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type.
+- reinterpret_cast<functor_type*>(&out_buffer.data)->~Functor();
++ static_cast<functor_type*>(static_cast<void*>(&out_buffer.data))->~Functor();
+ } else if (op == check_functor_type_tag) {
+ const BOOST_FUNCTION_STD_NS::type_info& check_type
+ = *out_buffer.type.type;
diff --git a/boost/makefile.mk b/boost/makefile.mk
index fdc1dfd2a44c..4a52cb08c3a5 100644
--- a/boost/makefile.mk
+++ b/boost/makefile.mk
@@ -51,6 +51,8 @@ all:
TARFILE_NAME=boost_1_39_0
TARFILE_MD5=fcc6df1160753d0b8c835d17fdeeb0a7
PATCH_FILES=$(TARFILE_NAME).patch
+# See https://svn.boost.org/trac/boost/ticket/3780
+PATCH_FILES+=aliasing.patch
CONFIGURE_DIR=
CONFIGURE_ACTION=
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index dfe2071c3726..d0873b63f5f0 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -521,8 +521,8 @@ namespace cairocanvas
nWidth = aFont.GetHeight();
} else {
// any scaling needs to be relative to the platform-dependent definition
- // of width of the font
- nWidth = aFont.GetHeight() * aFont.GetWidth() / aMetric.GetWidth();
+ // of height of the font
+ nWidth = aFont.GetWidth() * aFont.GetHeight() / aMetric.GetHeight();
}
cairo_matrix_init_identity(&m);
diff --git a/canvas/source/tools/elapsedtime.cxx b/canvas/source/tools/elapsedtime.cxx
index 6ca58a2bf1ee..6c3d3284cb82 100644
--- a/canvas/source/tools/elapsedtime.cxx
+++ b/canvas/source/tools/elapsedtime.cxx
@@ -32,7 +32,7 @@
#include "osl/diagnose.h"
#include "canvas/elapsedtime.hxx"
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
#if defined _MSC_VER
#pragma warning(push,1)
@@ -58,7 +58,7 @@ namespace canvas {
namespace tools {
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
// TODO(Q2): is 0 okay for the failure case here?
double ElapsedTime::getSystemTime()
{
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
index ffc1e95ca796..1b0d8fb4889c 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
@@ -52,17 +52,6 @@ namespace chart
namespace wrapper
{
-namespace
-{
-
-rtl::OUString lcl_getCIDForDiagram( const Reference< frame::XModel >& xChartModel )
-{
- uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
- return ObjectIdentifier::createClassifiedIdentifierForObject( xDiagram, xChartModel );
-}
-
-} //anonymous namespace
-
Chart2ModelContact::Chart2ModelContact(
const Reference< uno::XComponentContext > & xContext ) :
m_xContext( xContext ),
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index edf8ad2b6209..d6487d425657 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -239,14 +239,14 @@ void lcl_AddPropertiesToVector(
Property( C2U( "DisableComplexChartTypes" ),
PROP_DOCUMENT_DISABLE_COMPLEX_CHARTTYPES,
::getBooleanCppuType(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ) );
+ //#i112666# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ) );
rOutProperties.push_back(
Property( C2U( "DisableDataTableDialog" ),
PROP_DOCUMENT_DISABLE_DATATABLE_DIALOG,
::getBooleanCppuType(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ) );
+ //#i112666# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ) );
}
const uno::Sequence< Property > & lcl_GetPropertySequence()
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index eb3c76dd2c40..c0be0ddcbf0d 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -749,20 +749,19 @@ void SAL_CALL DiagramWrapper::setPosition( const awt::Point& aPosition )
Reference< beans::XPropertySet > xProp( this->getInnerPropertySet() );
if( xProp.is() )
{
- if( aPosition.X < 0 || aPosition.Y < 0 || aPosition.X > 1 || aPosition.Y > 1 )
- {
- DBG_ERROR("DiagramWrapper::setPosition called with a position out of range -> automatic values are taken instead" );
- uno::Any aEmpty;
- xProp->setPropertyValue( C2U( "RelativePosition" ), aEmpty );
- return;
- }
-
awt::Size aPageSize( m_spChart2ModelContact->GetPageSize() );
chart2::RelativePosition aRelativePosition;
aRelativePosition.Anchor = drawing::Alignment_TOP_LEFT;
aRelativePosition.Primary = double(aPosition.X)/double(aPageSize.Width);
aRelativePosition.Secondary = double(aPosition.Y)/double(aPageSize.Height);
+ if( aRelativePosition.Primary < 0 || aRelativePosition.Secondary < 0 || aRelativePosition.Primary > 1 || aRelativePosition.Secondary > 1 )
+ {
+ DBG_ERROR("DiagramWrapper::setPosition called with a position out of range -> automatic values are taken instead" );
+ uno::Any aEmpty;
+ xProp->setPropertyValue( C2U( "RelativePosition" ), aEmpty );
+ return;
+ }
xProp->setPropertyValue( C2U( "RelativePosition" ), uno::makeAny(aRelativePosition) );
xProp->setPropertyValue( C2U( "PosSizeExcludeAxes" ), uno::makeAny(false) );
}
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index f104045727bb..f32a882aa1e9 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -41,6 +41,7 @@
#include "CommonFunctors.hxx"
#include "ControllerLockGuard.hxx"
#include "ChartTypeHelper.hxx"
+#include "ThreeDHelper.hxx"
#include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
@@ -525,6 +526,9 @@ Reference< chart2::XDataSeries > DialogModel::insertSeriesAfter(
try
{
+ Reference< chart2::XDiagram > xDiagram( m_xChartDocument->getFirstDiagram() );
+ ThreeDLookScheme e3DScheme = ThreeDHelper::detectScheme( xDiagram );
+
sal_Int32 nSeriesInChartType = 0;
const sal_Int32 nTotalSeries = countSeries();
if( xChartType.is())
@@ -540,7 +544,7 @@ Reference< chart2::XDataSeries > DialogModel::insertSeriesAfter(
xChartType,
nTotalSeries, // new series' index
nSeriesInChartType,
- m_xChartDocument->getFirstDiagram(),
+ xDiagram,
m_xTemplate,
bCreateDataCachedSequences ));
@@ -561,6 +565,8 @@ Reference< chart2::XDataSeries > DialogModel::insertSeriesAfter(
aSeries.insert( aIt, xNewSeries );
xSeriesCnt->setDataSeries( ContainerToSequence( aSeries ));
}
+
+ ThreeDHelper::setScheme( xDiagram, e3DScheme );
}
catch( uno::Exception & ex )
{
@@ -694,14 +700,19 @@ bool DialogModel::setData(
m_xTemplate->getDataInterpreter());
if( xInterpreter.is())
{
+ Reference< chart2::XDiagram > xDiagram( m_xChartDocument->getFirstDiagram() );
+ ThreeDLookScheme e3DScheme = ThreeDHelper::detectScheme( xDiagram );
+
::std::vector< Reference< XDataSeries > > aSeriesToReUse(
- DiagramHelper::getDataSeriesFromDiagram( m_xChartDocument->getFirstDiagram()));
+ DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
applyInterpretedData(
xInterpreter->interpretDataSource(
xDataSource, rArguments,
ContainerToSequence( aSeriesToReUse )),
aSeriesToReUse,
true /* bSetStyles */);
+
+ ThreeDHelper::setScheme( xDiagram, e3DScheme );
}
}
catch( uno::Exception & ex )
diff --git a/comphelper/inc/comphelper/storagehelper.hxx b/comphelper/inc/comphelper/storagehelper.hxx
index b613ddd2c5f1..b7e5704c4d68 100644
--- a/comphelper/inc/comphelper/storagehelper.hxx
+++ b/comphelper/inc/comphelper/storagehelper.hxx
@@ -161,6 +161,8 @@ public:
static sal_Bool IsValidZipEntryFileName( const ::rtl::OUString& aName, sal_Bool bSlashAllowed );
static sal_Bool IsValidZipEntryFileName( const sal_Unicode *pChar, sal_Int32 nLength, sal_Bool bSlashAllowed );
+
+ static sal_Bool PathHasSegment( const ::rtl::OUString& aPath, const ::rtl::OUString& aSegment );
};
}
diff --git a/comphelper/source/misc/officerestartmanager.cxx b/comphelper/source/misc/officerestartmanager.cxx
index 974b8d65e7ae..1a98ddfce8da 100644
--- a/comphelper/source/misc/officerestartmanager.cxx
+++ b/comphelper/source/misc/officerestartmanager.cxx
@@ -87,9 +87,9 @@ void SAL_CALL OOfficeRestartManager::requestRestart( const uno::Reference< task:
// if the restart already running there is no need to trigger it again
if ( m_bRestartRequested )
return;
-#ifndef MACOSX
+
m_bRestartRequested = sal_True;
-#endif
+
// the office is still not initialized, no need to terminate, changing the state is enough
if ( !m_bOfficeInitialized )
return;
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index e2557523f674..db5ba71cd876 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -452,5 +452,36 @@ sal_Bool OStorageHelper::IsValidZipEntryFileName(
return sal_True;
}
+// ----------------------------------------------------------------------
+sal_Bool OStorageHelper::PathHasSegment( const ::rtl::OUString& aPath, const ::rtl::OUString& aSegment )
+{
+ sal_Bool bResult = sal_False;
+ const sal_Int32 nPathLen = aPath.getLength();
+ const sal_Int32 nSegLen = aSegment.getLength();
+
+ if ( nSegLen && nPathLen >= nSegLen )
+ {
+ ::rtl::OUString aEndSegment( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
+ aEndSegment += aSegment;
+
+ ::rtl::OUString aInternalSegment( aEndSegment );
+ aInternalSegment += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
+
+ if ( aPath.indexOf( aInternalSegment ) >= 0 )
+ bResult = sal_True;
+
+ if ( !bResult && !aPath.compareTo( aSegment, nSegLen ) )
+ {
+ if ( nPathLen == nSegLen || aPath.getStr()[nSegLen] == (sal_Unicode)'/' )
+ bResult = sal_True;
+ }
+
+ if ( !bResult && nPathLen > nSegLen && aPath.copy( nPathLen - nSegLen - 1, nSegLen + 1 ).equals( aEndSegment ) )
+ bResult = sal_True;
+ }
+
+ return bResult;
+}
+
}
diff --git a/configmgr/source/rootaccess.cxx b/configmgr/source/rootaccess.cxx
index 95a346d720c2..f5d0bb137202 100644
--- a/configmgr/source/rootaccess.cxx
+++ b/configmgr/source/rootaccess.cxx
@@ -96,11 +96,12 @@ void RootAccess::initBroadcaster(
for (ChangesListeners::iterator i(changesListeners_.begin());
i != changesListeners_.end(); ++i)
{
+ cppu::OWeakObject* pSource = static_cast< cppu::OWeakObject * >(this);
+ css::uno::Reference< css::uno::XInterface > xBase( pSource, css::uno::UNO_QUERY );
broadcaster->addChangesNotification(
*i,
css::util::ChangesEvent(
- static_cast< cppu::OWeakObject * >(this),
- css::uno::makeAny(pathRepresentation_), set));
+ pSource, makeAny( xBase ), set));
}
}
}
diff --git a/configure.in b/configure.in
index 943c9d017acd..ec482fa9464d 100644
--- a/configure.in
+++ b/configure.in
@@ -550,6 +550,12 @@ AC_ARG_WITH(system-altlinuxhyph,
AC_ARG_WITH(system-lpsolve,
[ --with-system-lpsolve Use lpsolve already on system
],,)
+AC_ARG_WITH(system-libtextcat,
+[ --with-system-libtextcat Use libtextcat already on system
+],,)
+AC_ARG_WITH(external-libtextcat-data,
+[ --with-system-libtextcat-data Use libtextcat data already on system
+],,)
AC_ARG_WITH(system-cppunit,
[ --with-system-cppunit Use cppunit already on system
],,)
@@ -3652,12 +3658,6 @@ if test -n "$with_system_cppunit" -o -n "$with_system_libs" && \
# a system-cppunit before the first version using a proper cppunit
# (and that being 1.12.1) anyway
PKG_CHECK_MODULES( CPPUNIT, cppunit >= 1.12.1 )
- AC_MSG_CHECKING([STL compatibility])
- if test "$WITH_STLPORT" != "no"; then
- AC_MSG_ERROR([to use system cppunit you need to use --without-stlport])
- else
- AC_MSG_RESULT([OK])
- fi
else
AC_MSG_RESULT([internal])
SYSTEM_CPPUNIT=NO
@@ -3864,7 +3864,11 @@ if test -n "$with_system_lucene" -o -n "$with_system_libs" && \
[
AC_CHECK_FILE(/usr/share/java/lucene-core.jar,
[ LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar ],
- [ AC_MSG_ERROR(lucene-core.jar replacement not found)]
+ [ AC_CHECK_FILE(/usr/share/java/lucene.jar,
+ [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ],
+ [ AC_MSG_ERROR(lucene-core.jar replacement not found)]
+ )
+ ]
)
]
)
@@ -5206,6 +5210,38 @@ else
fi
AC_SUBST(SYSTEM_LPSOLVE)
+dnl ===================================================================
+dnl Checking for libtextcat
+dnl ===================================================================
+AC_MSG_CHECKING([which libtextcat to use])
+if test -n "$with_system_libtextcat" && test "$with_system_libtextcat" != "no"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_LIBTEXTCAT=YES
+ AC_CHECK_HEADER(libtextcat/textcat.h, [],
+ [ AC_MSG_ERROR(libtextcat headers not found.)], [])
+ AC_CHECK_LIB(textcat, special_textcat_Init, ,
+ [ AC_MSG_ERROR(libtextcat library not found or not suitable. libtextcat typically needs to be patched)], [])
+else
+ AC_MSG_RESULT([internal])
+ SYSTEM_LIBTEXTCAT=NO
+ BUILD_TYPE="$BUILD_TYPE LIBTEXTCAT"
+fi
+AC_SUBST(SYSTEM_LIBTEXTCAT)
+
+AC_MSG_CHECKING([which libtextcat data directory to use])
+if test -n "$with_system_libtextcat_data" && test "$with_system_libtextcat_data" != "no"; then
+ if test "$with_system_libtextcat_data" = "yes"; then
+ SYSTEM_LIBTEXTCAT_DATA=file:///usr/share/libtextcat
+ else
+ SYSTEM_LIBTEXTCAT_DATA=file://$with_system_libtextcat_data
+ fi
+ AC_MSG_RESULT([$SYSTEM_LIBTEXTCAT_DATA])
+else
+ AC_MSG_RESULT([internal])
+ BUILD_TYPE="$BUILD_TYPE LIBTEXTCATDATA"
+fi
+AC_SUBST(SYSTEM_LIBTEXTCAT_DATA)
+
dnl ***************************************
dnl testing libc version for Linux...
dnl ***************************************
@@ -6589,6 +6625,7 @@ dnl ===================================================================
AC_MSG_CHECKING([whether to include AFMs])
if test "$with_afms" != "no"; then
AC_MSG_RESULT([yes])
+ BUILD_TYPE="$BUILD_TYPE AFMS"
else
AC_MSG_RESULT([no])
WITHOUT_AFMS=YES
diff --git a/connectivity/source/drivers/adabas/BDriver.cxx b/connectivity/source/drivers/adabas/BDriver.cxx
index 030e84534501..fc92ebb38b0c 100644
--- a/connectivity/source/drivers/adabas/BDriver.cxx
+++ b/connectivity/source/drivers/adabas/BDriver.cxx
@@ -48,9 +48,7 @@
#include <memory>
#include <sys/stat.h>
-#if defined(MAC)
-const char sNewLine = '\015';
-#elif defined(UNX)
+#if defined(UNX)
const char sNewLine = '\012';
#else
const char sNewLine[] = "\015\012"; // \015\012 and not \n
@@ -856,7 +854,7 @@ void ODriver::createNeededDirs(const ::rtl::OUString& sDBName)
if(UCBContentHelper::Exists(sTemp))
UCBContentHelper::Kill(sTemp);
-#if !(defined(WIN) || defined(WNT))
+#if !(defined(WNT))
sTemp = sDBConfig;
sTemp += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("diag"));
if(!UCBContentHelper::IsFolder(sTemp))
@@ -878,7 +876,7 @@ void ODriver::createNeededDirs(const ::rtl::OUString& sDBName)
void ODriver::clearDatabase(const ::rtl::OUString& sDBName)
{ // stop the database
::rtl::OUString sCommand;
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
::rtl::OUString sStop = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("stop"));
OArgumentList aArgs(2,&sDBName,&sStop);
sCommand = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("x_cons.exe"));
@@ -923,7 +921,7 @@ void ODriver::createDb( const TDatabaseStruct& _aInfo)
PutParam(_aInfo.sDBName,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KERNELTRACESIZE")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("100")));
PutParam(_aInfo.sDBName,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LOG_QUEUE_PAGES")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("10")));
-#if !(defined(WIN) || defined(WNT))
+#if !defined(WNT)
PutParam(_aInfo.sDBName,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OPMSG1")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/dev/null")));
#endif
@@ -991,7 +989,7 @@ int ODriver::X_PARAM(const ::rtl::OUString& _DBNAME,
::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE));
pFileStream->Seek(STREAM_SEEK_TO_END);
(*pFileStream) << "x_param"
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
<< ".exe"
#endif
<< " -d "
@@ -1002,7 +1000,7 @@ int ODriver::X_PARAM(const ::rtl::OUString& _DBNAME,
<< ::rtl::OString(_PWD,_PWD.getLength(),gsl_getSystemTextEncoding())
<< " "
<< ::rtl::OString(_CMD,_CMD.getLength(),gsl_getSystemTextEncoding())
-#if (defined(WIN) || defined(WNT))
+#if defined(WNT)
#if (OSL_DEBUG_LEVEL > 1) || defined(DBG_UTIL)
<< " >> %DBWORK%\\create.log 2>&1"
#endif
@@ -1052,7 +1050,7 @@ void ODriver::PutParam(const ::rtl::OUString& sDBName,
{
OArgumentList aArgs(3,&sDBName,&rWhat,&rHow);
::rtl::OUString sCommand = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("putparam"));
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
sCommand += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".exe"));
#endif
@@ -1114,7 +1112,7 @@ OSL_TRACE("CreateFile %d",_nSize);
int ODriver::X_START(const ::rtl::OUString& sDBName)
{
::rtl::OUString sCommand;
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
::rtl::OUString sArg1 = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-d"));
::rtl::OUString sArg3 = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-NoDBService"));
@@ -1152,7 +1150,7 @@ int ODriver::X_START(const ::rtl::OUString& sDBName)
int ODriver::X_STOP(const ::rtl::OUString& sDBName)
{
::rtl::OUString sCommand;
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
::rtl::OUString sArg1 = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-d"));
::rtl::OUString sArg2 = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-NoDBService"));
@@ -1197,7 +1195,7 @@ void ODriver::XUTIL(const ::rtl::OUString& _rParam,
::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE));
pFileStream->Seek(STREAM_SEEK_TO_END);
(*pFileStream) <<
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
"xutil.exe"
#else
"utility"
@@ -1250,7 +1248,7 @@ void ODriver::LoadBatch(const ::rtl::OUString& sDBName,
::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE));
pFileStream->Seek(STREAM_SEEK_TO_END);
(*pFileStream) << "xload"
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
<< ".exe"
#endif
<< " -d "
@@ -1319,7 +1317,7 @@ void ODriver::fillEnvironmentVariables()
::rtl::OUString ODriver::generateInitFile() const
{
String sExt;
-#if !(defined(WIN) || defined(WNT))
+#if !defined(WNT)
sExt = String::CreateFromAscii(".sh");
#else
sExt = String::CreateFromAscii(".bat");
@@ -1327,13 +1325,13 @@ void ODriver::fillEnvironmentVariables()
String sWorkUrl(m_sDbWorkURL);
::utl::TempFile aCmdFile(String::CreateFromAscii("Init"),&sExt,&sWorkUrl);
-#if !(defined(WIN) || defined(WNT))
+#if !defined(WNT)
String sPhysicalPath;
LocalFileHelper::ConvertURLToPhysicalName(aCmdFile.GetURL(),sPhysicalPath);
chmod(ByteString(sPhysicalPath,gsl_getSystemTextEncoding()).GetBuffer(),S_IRUSR|S_IWUSR|S_IXUSR);
#endif
-#if !(defined(WIN) || defined(WNT))
+#if !defined(WNT)
SvStream* pFileStream = aCmdFile.GetStream(STREAM_WRITE);
(*pFileStream) << "#!/bin/sh"
<< sNewLine
@@ -1443,7 +1441,7 @@ void ODriver::X_CONS(const ::rtl::OUString& sDBName,const ::rtl::OString& _ACTIO
pFileStream->Seek(STREAM_SEEK_TO_END);
(*pFileStream) << "x_cons"
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
<< ".exe"
#endif
<< " "
@@ -1526,7 +1524,7 @@ sal_Bool ODriver::isVersion(const ::rtl::OUString& sDBName, const char* _pVersio
pFileStream->Seek(STREAM_SEEK_TO_END);
(*pFileStream) << "getparam"
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
<< ".exe"
#endif
<< " "
@@ -1576,7 +1574,7 @@ void ODriver::checkAndInsertNewDevSpace(const ::rtl::OUString& sDBName,
pFileStream->Seek(STREAM_SEEK_TO_END);
(*pFileStream) << "getparam"
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
<< ".exe"
#endif
<< " "
@@ -1656,7 +1654,7 @@ sal_Bool ODriver::isKernelVersion(const char* _pVersion)
// -----------------------------------------------------------------------------
void ODriver::installSystemTables( const TDatabaseStruct& _aInfo)
{
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
// xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% -b %m_sDbRoot%\env\TERMCHAR.ind
::rtl::OUString aBatch = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-b "));
::rtl::OUString sTemp2 = m_sDbRootURL + m_sDelimit
diff --git a/connectivity/source/drivers/adabas/BFunctions.cxx b/connectivity/source/drivers/adabas/BFunctions.cxx
index 3a57e4818e88..6d58c030a578 100644
--- a/connectivity/source/drivers/adabas/BFunctions.cxx
+++ b/connectivity/source/drivers/adabas/BFunctions.cxx
@@ -129,7 +129,7 @@ sal_Bool LoadLibrary_ADABAS(::rtl::OUString &_rPath)
}
const sal_Char* pLibraryAsciiName = NULL;
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
pLibraryAsciiName = "SQLOD32.DLL";
#elif ( defined(SOLARIS) && defined(SPARC)) || defined(LINUX)
pLibraryAsciiName = "odbclib.so";
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 157d1f7b68fa..011d0e89ce7a 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -1432,16 +1432,8 @@ BOOL ODbaseTable::CreateMemoFile(const INetURLObject& aFile)
char aBuffer[512]; // write buffer
memset(aBuffer,0,sizeof(aBuffer));
-#ifdef WIN
- m_pMemoStream->Seek(0L);
- for (UINT16 i = 0; i < 512; i++)
- {
- (*m_pMemoStream) << BYTE(0);
- }
-#else
m_pMemoStream->SetFiller('\0');
m_pMemoStream->SetStreamSize(512);
-#endif
m_pMemoStream->Seek(0L);
(*m_pMemoStream) << long(1); // Zeiger auf ersten freien Block
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 421225b34935..305e26d386e0 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -75,12 +75,7 @@ using namespace com::sun::star::sdbcx;
using namespace com::sun::star::container;
// Maximale Anzahl von Rows, die mit ORDER BY sortiert durchlaufen werden koennen:
-#if defined (WIN)
-#define MAX_KEYSET_SIZE 0x3ff0 // Etwas weniger als ein Segment, damit
- // noch Platz fuer Memory Debug-Informationen
-#else
#define MAX_KEYSET_SIZE 0x40000 // 256K
-#endif
namespace
{
@@ -1049,7 +1044,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
//
INT32 nTempPos = m_nRowPos;
// exclusiver zugriff auf die Tabelle
- // NAMESPACE_VOS(OGuard)* pGuard = m_pTable->Lock();
+ // vos::OGuard* pGuard = m_pTable->Lock();
if (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT &&
!isCount())
@@ -1409,7 +1404,7 @@ BOOL OResultSet::OpenImpl()
m_nRowCountResult = -1;
// exclusiver zugriff auf die Tabelle
- // NAMESPACE_VOS(OGuard)* pGuard = pTable->Lock();
+ // vos::OGuard* pGuard = pTable->Lock();
m_nLastVisitedPos = m_pTable->getCurrentLastPos();
switch(m_aSQLIterator.getStatementType())
diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
index 57ed88b1dda8..91626906a906 100644
--- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
@@ -135,7 +135,7 @@ namespace connectivity
::rtl::OUString StorageContainer::removeOldURLPrefix(const ::rtl::OUString& _sURL)
{
::rtl::OUString sRet = _sURL;
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
sal_Int32 nIndex = sRet.lastIndexOf('\\');
#else
sal_Int32 nIndex = sRet.lastIndexOf('/');
diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx
index b0757a201844..37562fa57d57 100644
--- a/connectivity/source/drivers/mozab/MDriver.cxx
+++ b/connectivity/source/drivers/mozab/MDriver.cxx
@@ -249,7 +249,7 @@ EDriverType MozabDriver::impl_classifyURL( const ::rtl::OUString& url )
const sal_Char* pScheme;
} aSchemeMap[] =
{
-#if defined(WNT) || defined(WIN)
+#if defined(WNT)
{ Outlook, "outlook" },
{ OutlookExpress, "outlookexp" },
#endif
diff --git a/connectivity/source/drivers/odbc/OFunctions.cxx b/connectivity/source/drivers/odbc/OFunctions.cxx
index d84c55787635..148c79ebadd4 100644
--- a/connectivity/source/drivers/odbc/OFunctions.cxx
+++ b/connectivity/source/drivers/odbc/OFunctions.cxx
@@ -109,10 +109,6 @@ sal_Bool LoadLibrary_ODBC3(::rtl::OUString &_rPath)
if (bLoaded)
return sal_True;
-#ifdef WIN
- _rPath = ::rtl::OUString::createFromAscii("ODBC.DLL");
-
-#endif
#ifdef WNT
_rPath = ::rtl::OUString::createFromAscii("ODBC32.DLL");
#endif
diff --git a/connectivity/source/inc/odbc/OFunctiondefs.hxx b/connectivity/source/inc/odbc/OFunctiondefs.hxx
index 36c2a2f722da..25884342bf89 100644
--- a/connectivity/source/inc/odbc/OFunctiondefs.hxx
+++ b/connectivity/source/inc/odbc/OFunctiondefs.hxx
@@ -29,7 +29,7 @@
#ifndef _CONNECTIVITY_OFUNCTIONDEFS_HXX_
#define _CONNECTIVITY_OFUNCTIONDEFS_HXX_
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
#ifdef _MSC_VER
#pragma warning(push)
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index a205db2a28c9..93e37c4e163f 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -959,7 +959,7 @@ void TPGalleryThemeProperties::FillFilterList()
}
}
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
if ( aExtensions.Len() > 240 )
aExtensions = DEFINE_CONST_UNICODE( "*.*" );
#endif
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 1d1277f49301..7eae4fa04953 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -147,7 +147,7 @@
#ifndef _SFX_DOCFILT_HACK_HXX
#include <sfx2/docfilt.hxx>
#endif
-#if !defined(WINDOWS_VISTA_PSDK) && (defined(WIN) || defined(WNT))
+#if !defined(WINDOWS_VISTA_PSDK) && defined(WNT)
#define _ADO_DATALINK_BROWSE_
#endif
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index dac80070a640..b2607ebc9f98 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -153,7 +153,7 @@
#include <sfx2/docfilt.hxx>
#endif
#include "dsnItem.hxx"
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
#define _ADO_DATALINK_BROWSE_
#endif
diff --git a/dbaccess/source/ui/dlg/adodatalinks.cxx b/dbaccess/source/ui/dlg/adodatalinks.cxx
index 30dddc0bb793..4b7005976778 100644
--- a/dbaccess/source/ui/dlg/adodatalinks.cxx
+++ b/dbaccess/source/ui/dlg/adodatalinks.cxx
@@ -29,7 +29,7 @@
#include "precompiled_dbaccess.hxx"
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
#if defined _MSC_VER
#pragma warning(push, 1)
#pragma warning(disable: 4917)
diff --git a/dbaccess/source/ui/dlg/odbcconfig.cxx b/dbaccess/source/ui/dlg/odbcconfig.cxx
index c4b73ee08af0..c1f77fc02dc2 100644
--- a/dbaccess/source/ui/dlg/odbcconfig.cxx
+++ b/dbaccess/source/ui/dlg/odbcconfig.cxx
@@ -56,7 +56,7 @@
#ifdef HAVE_ODBC_SUPPORT
-#if defined(WIN) || defined(OS2)
+#if defined(OS2)
#define ODBC_LIBRARY "ODBC.DLL"
#define ODBC_UI_LIBRARY "ODBCINST.DLL"
#endif
@@ -78,7 +78,7 @@
// just to go with calling convention of windows
// so don't touch this
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
#define SQL_API __stdcall
// At least under some circumstances, the below #include <odbc/sqlext.h> re-
// defines SQL_API to an empty string, leading to a compiler warning on MSC; to
@@ -88,7 +88,7 @@
#pragma warning(push)
#pragma warning(disable: 4005)
#endif
-#endif // defined(WIN) || defined(WNT)
+#endif // defined(WNT)
#if defined(OS2)
#define ALLREADY_HAVE_OS2_TYPES
@@ -103,13 +103,13 @@
#endif
#endif
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
#if defined _MSC_VER
#pragma warning(pop)
#endif
#undef SQL_API
#define SQL_API __stdcall
-#endif // defined(WIN) || defined(WNT)
+#endif // defined(WNT)
// from here on you can do what you want to
#if defined(OS2)
diff --git a/dbaccess/source/ui/dlg/odbcconfig.hxx b/dbaccess/source/ui/dlg/odbcconfig.hxx
index b4a10625e49b..8c0c70defe07 100644
--- a/dbaccess/source/ui/dlg/odbcconfig.hxx
+++ b/dbaccess/source/ui/dlg/odbcconfig.hxx
@@ -30,11 +30,11 @@
#include "commontypes.hxx"
-#if defined(WIN) || defined(WNT) || defined (UNX) || defined (OS2)
+#if defined(WNT) || defined (UNX) || defined (OS2)
#define HAVE_ODBC_SUPPORT
#endif
-#if ( defined(WIN) || defined(WNT) || defined (OS2) ) && defined(HAVE_ODBC_SUPPORT)
+#if ( defined(WNT) || defined (OS2) ) && defined(HAVE_ODBC_SUPPORT)
#define HAVE_ODBC_ADMINISTRATION
#endif
diff --git a/default_images/sd/res/slide_sorter_command1_large.png b/default_images/sd/res/slide_sorter_command1_large.png
new file mode 100644
index 000000000000..83bc67158bee
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command1_large.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command1_large_hc.png b/default_images/sd/res/slide_sorter_command1_large_hc.png
new file mode 100644
index 000000000000..78023d9d626d
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command1_large_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command1_large_hover.png b/default_images/sd/res/slide_sorter_command1_large_hover.png
new file mode 100644
index 000000000000..cfbcf3601844
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command1_large_hover.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command1_large_hover_hc.png b/default_images/sd/res/slide_sorter_command1_large_hover_hc.png
new file mode 100644
index 000000000000..035ca4a1ec41
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command1_large_hover_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command1_medium.png b/default_images/sd/res/slide_sorter_command1_medium.png
new file mode 100644
index 000000000000..9b1cf008540d
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command1_medium.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command1_medium_hc.png b/default_images/sd/res/slide_sorter_command1_medium_hc.png
new file mode 100644
index 000000000000..478b78c17358
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command1_medium_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command1_medium_hover.png b/default_images/sd/res/slide_sorter_command1_medium_hover.png
new file mode 100644
index 000000000000..4aa4dcd05e34
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command1_medium_hover.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command1_medium_hover_hc.png b/default_images/sd/res/slide_sorter_command1_medium_hover_hc.png
new file mode 100644
index 000000000000..803fc31ca84e
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command1_medium_hover_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command1_small.png b/default_images/sd/res/slide_sorter_command1_small.png
new file mode 100644
index 000000000000..c49b1b226ca8
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command1_small.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command1_small_hc.png b/default_images/sd/res/slide_sorter_command1_small_hc.png
new file mode 100644
index 000000000000..9b7fa5a8f51c
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command1_small_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command1_small_hover.png b/default_images/sd/res/slide_sorter_command1_small_hover.png
new file mode 100644
index 000000000000..e3758843500b
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command1_small_hover.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command1_small_hover_hc.png b/default_images/sd/res/slide_sorter_command1_small_hover_hc.png
new file mode 100644
index 000000000000..7456e8279b41
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command1_small_hover_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2_large.png b/default_images/sd/res/slide_sorter_command2_large.png
new file mode 100644
index 000000000000..13f3d1dbb3ad
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2_large.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2_large_hc.png b/default_images/sd/res/slide_sorter_command2_large_hc.png
new file mode 100644
index 000000000000..84d4f029de02
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2_large_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2_large_hover.png b/default_images/sd/res/slide_sorter_command2_large_hover.png
new file mode 100644
index 000000000000..f5aebcef9059
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2_large_hover.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2_large_hover_hc.png b/default_images/sd/res/slide_sorter_command2_large_hover_hc.png
new file mode 100644
index 000000000000..7d671188ca90
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2_large_hover_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2_medium.png b/default_images/sd/res/slide_sorter_command2_medium.png
new file mode 100644
index 000000000000..58c7db6a50be
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2_medium.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2_medium_hc.png b/default_images/sd/res/slide_sorter_command2_medium_hc.png
new file mode 100644
index 000000000000..79f0556fe6c4
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2_medium_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2_medium_hover.png b/default_images/sd/res/slide_sorter_command2_medium_hover.png
new file mode 100644
index 000000000000..c71272c4cba4
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2_medium_hover.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2_medium_hover_hc.png b/default_images/sd/res/slide_sorter_command2_medium_hover_hc.png
new file mode 100644
index 000000000000..16d91efa3df6
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2_medium_hover_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2_small.png b/default_images/sd/res/slide_sorter_command2_small.png
new file mode 100644
index 000000000000..39b17d874991
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2_small.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2_small_hc.png b/default_images/sd/res/slide_sorter_command2_small_hc.png
new file mode 100644
index 000000000000..50bccb2014fb
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2_small_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2_small_hover.png b/default_images/sd/res/slide_sorter_command2_small_hover.png
new file mode 100644
index 000000000000..f1f7a96950cc
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2_small_hover.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2_small_hover_hc.png b/default_images/sd/res/slide_sorter_command2_small_hover_hc.png
new file mode 100644
index 000000000000..3dbd5889d220
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2_small_hover_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2b_large.png b/default_images/sd/res/slide_sorter_command2b_large.png
new file mode 100644
index 000000000000..51006698fa51
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2b_large.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2b_large_hc.png b/default_images/sd/res/slide_sorter_command2b_large_hc.png
new file mode 100644
index 000000000000..82228e291a14
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2b_large_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2b_large_hover.png b/default_images/sd/res/slide_sorter_command2b_large_hover.png
new file mode 100644
index 000000000000..a702addd1f14
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2b_large_hover.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2b_large_hover_hc.png b/default_images/sd/res/slide_sorter_command2b_large_hover_hc.png
new file mode 100644
index 000000000000..773e36731a52
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2b_large_hover_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2b_medium.png b/default_images/sd/res/slide_sorter_command2b_medium.png
new file mode 100644
index 000000000000..114ab3adf937
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2b_medium.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2b_medium_hc.png b/default_images/sd/res/slide_sorter_command2b_medium_hc.png
new file mode 100644
index 000000000000..875d1564f085
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2b_medium_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2b_medium_hover.png b/default_images/sd/res/slide_sorter_command2b_medium_hover.png
new file mode 100644
index 000000000000..5d25b9e651a1
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2b_medium_hover.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2b_medium_hover_hc.png b/default_images/sd/res/slide_sorter_command2b_medium_hover_hc.png
new file mode 100644
index 000000000000..77c1c853e9c6
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2b_medium_hover_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2b_small.png b/default_images/sd/res/slide_sorter_command2b_small.png
new file mode 100644
index 000000000000..9cad302951bd
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2b_small.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2b_small_hc.png b/default_images/sd/res/slide_sorter_command2b_small_hc.png
new file mode 100644
index 000000000000..23ca005d7cee
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2b_small_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2b_small_hover.png b/default_images/sd/res/slide_sorter_command2b_small_hover.png
new file mode 100644
index 000000000000..2428bd6ae368
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2b_small_hover.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command2b_small_hover_hc.png b/default_images/sd/res/slide_sorter_command2b_small_hover_hc.png
new file mode 100644
index 000000000000..d9ad2599b5dc
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command2b_small_hover_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command3_large.png b/default_images/sd/res/slide_sorter_command3_large.png
new file mode 100644
index 000000000000..f3478f5bd4fe
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command3_large.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command3_large_hc.png b/default_images/sd/res/slide_sorter_command3_large_hc.png
new file mode 100644
index 000000000000..d4007d8f4808
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command3_large_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command3_large_hover.png b/default_images/sd/res/slide_sorter_command3_large_hover.png
new file mode 100644
index 000000000000..aacbbc81ad18
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command3_large_hover.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command3_large_hover_hc.png b/default_images/sd/res/slide_sorter_command3_large_hover_hc.png
new file mode 100644
index 000000000000..86fe1db35fc5
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command3_large_hover_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command3_medium.png b/default_images/sd/res/slide_sorter_command3_medium.png
new file mode 100644
index 000000000000..71f813b73491
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command3_medium.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command3_medium_hc.png b/default_images/sd/res/slide_sorter_command3_medium_hc.png
new file mode 100644
index 000000000000..230fea7632ee
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command3_medium_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command3_medium_hover.png b/default_images/sd/res/slide_sorter_command3_medium_hover.png
new file mode 100644
index 000000000000..098102b8e51e
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command3_medium_hover.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command3_medium_hover_hc.png b/default_images/sd/res/slide_sorter_command3_medium_hover_hc.png
new file mode 100644
index 000000000000..d2334bd46cc2
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command3_medium_hover_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command3_small.png b/default_images/sd/res/slide_sorter_command3_small.png
new file mode 100644
index 000000000000..8f252b4cfb70
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command3_small.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command3_small_hc.png b/default_images/sd/res/slide_sorter_command3_small_hc.png
new file mode 100644
index 000000000000..44626229cb1b
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command3_small_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command3_small_hover.png b/default_images/sd/res/slide_sorter_command3_small_hover.png
new file mode 100644
index 000000000000..09ac12e1066e
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command3_small_hover.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command3_small_hover_hc.png b/default_images/sd/res/slide_sorter_command3_small_hover_hc.png
new file mode 100644
index 000000000000..3f651ffcccb3
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command3_small_hover_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command_background_large.png b/default_images/sd/res/slide_sorter_command_background_large.png
new file mode 100644
index 000000000000..0dbe0fc6370d
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command_background_large.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command_background_large_hc.png b/default_images/sd/res/slide_sorter_command_background_large_hc.png
new file mode 100644
index 000000000000..e798ad54dca3
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command_background_large_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command_background_medium.png b/default_images/sd/res/slide_sorter_command_background_medium.png
new file mode 100644
index 000000000000..4023ced9cac4
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command_background_medium.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command_background_medium_hc.png b/default_images/sd/res/slide_sorter_command_background_medium_hc.png
new file mode 100644
index 000000000000..edcb491750f5
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command_background_medium_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command_background_small.png b/default_images/sd/res/slide_sorter_command_background_small.png
new file mode 100644
index 000000000000..6c5da0c0dff2
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command_background_small.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_command_background_small_hc.png b/default_images/sd/res/slide_sorter_command_background_small_hc.png
new file mode 100644
index 000000000000..b0f11b828cf3
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_command_background_small_hc.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_focus_border.png b/default_images/sd/res/slide_sorter_focus_border.png
new file mode 100644
index 000000000000..d55fc0bb07ea
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_focus_border.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_hide_slide_overlay.png b/default_images/sd/res/slide_sorter_hide_slide_overlay.png
new file mode 100644
index 000000000000..5f7210d1307e
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_hide_slide_overlay.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_insert_shadow.png b/default_images/sd/res/slide_sorter_insert_shadow.png
new file mode 100644
index 000000000000..4633e7cb632a
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_insert_shadow.png
Binary files differ
diff --git a/default_images/sd/res/slide_sorter_shadow.png b/default_images/sd/res/slide_sorter_shadow.png
new file mode 100644
index 000000000000..870d361eee0d
--- /dev/null
+++ b/default_images/sd/res/slide_sorter_shadow.png
Binary files differ
diff --git a/default_images/svx/source/svdraw/pageshadow35x35.png b/default_images/svx/source/svdraw/pageshadow35x35.png
new file mode 100644
index 000000000000..1f0126e34075
--- /dev/null
+++ b/default_images/svx/source/svdraw/pageshadow35x35.png
Binary files differ
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 731ffe85d83b..b60af4ede03e 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -28,6 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_desktop.hxx"
+#include <cstdlib>
+#include <vector>
+
#include <memory>
#include <unistd.h>
#include "app.hxx"
@@ -119,6 +122,7 @@
#include <osl/file.hxx>
#include <osl/signal.h>
#include <rtl/uuid.h>
+#include <rtl/uri.hxx>
#include <unotools/pathoptions.hxx>
#include <svl/languageoptions.hxx>
#include <unotools/internaloptions.hxx>
@@ -155,6 +159,11 @@
#include "langselect.hxx"
+#if defined MACOSX
+#include <errno.h>
+#include <sys/wait.h>
+#endif
+
#define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
#define U2S(STRING) ::rtl::OUStringToOString(STRING, RTL_TEXTENCODING_UTF8)
@@ -460,6 +469,194 @@ void ReplaceStringHookProc( UniString& rStr )
}
}
+static const char pLastSyncFileName[] = "lastsynchronized";
+static const sal_Int32 nStrLenLastSync = 16;
+
+static bool needsSynchronization(
+ ::rtl::OUString const & baseSynchronizedURL, ::rtl::OUString const & userSynchronizedURL )
+{
+ bool bNeedsSync( false );
+
+ ::osl::DirectoryItem itemUserFile;
+ ::osl::File::RC err1 =
+ ::osl::DirectoryItem::get(userSynchronizedURL, itemUserFile);
+
+ //If it does not exist, then there is nothing to be done
+ if (err1 == ::osl::File::E_NOENT)
+ {
+ return true;
+ }
+ else if (err1 != ::osl::File::E_None)
+ {
+ OSL_ENSURE(0, "Cannot access lastsynchronized in user layer");
+ return true; //sync just in case
+ }
+
+ //If last synchronized does not exist in base layer, then do nothing
+ ::osl::DirectoryItem itemBaseFile;
+ ::osl::File::RC err2 = ::osl::DirectoryItem::get(baseSynchronizedURL, itemBaseFile);
+ if (err2 == ::osl::File::E_NOENT)
+ {
+ return true;
+
+ }
+ else if (err2 != ::osl::File::E_None)
+ {
+ OSL_ENSURE(0, "Cannot access file lastsynchronized in base layer");
+ return true; //sync just in case
+ }
+
+ //compare the modification time of the extension folder and the last
+ //modified file
+ ::osl::FileStatus statUser(FileStatusMask_ModifyTime);
+ ::osl::FileStatus statBase(FileStatusMask_ModifyTime);
+ if (itemUserFile.getFileStatus(statUser) == ::osl::File::E_None)
+ {
+ if (itemBaseFile.getFileStatus(statBase) == ::osl::File::E_None)
+ {
+ TimeValue timeUser = statUser.getModifyTime();
+ TimeValue timeBase = statBase.getModifyTime();
+
+ if (timeUser.Seconds < timeBase.Seconds)
+ bNeedsSync = true;
+ }
+ else
+ {
+ OSL_ASSERT(0);
+ bNeedsSync = true;
+ }
+ }
+ else
+ {
+ OSL_ASSERT(0);
+ bNeedsSync = true;
+ }
+
+ return bNeedsSync;
+}
+
+static ::rtl::OUString getBrandSharePreregBundledPathURL()
+{
+ ::rtl::OUString url(
+ RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/share/prereg/bundled"));
+
+ ::rtl::Bootstrap::expandMacros(url);
+ return url;
+}
+
+static ::rtl::OUString getUserBundledExtPathURL()
+{
+ ::rtl::OUString folder( RTL_CONSTASCII_USTRINGPARAM( "$BUNDLED_EXTENSIONS_USER" ));
+ ::rtl::Bootstrap::expandMacros(folder);
+
+ return folder;
+}
+
+static ::rtl::OUString getLastSyncFileURLFromBrandInstallation()
+{
+ ::rtl::OUString aURL = getBrandSharePreregBundledPathURL();
+ ::sal_Int32 nLastIndex = aURL.lastIndexOf('/');
+
+ ::rtl::OUStringBuffer aTmp( aURL );
+
+ if ( nLastIndex != aURL.getLength()-1 )
+ aTmp.appendAscii( "/" );
+ aTmp.appendAscii( pLastSyncFileName );
+
+ return aTmp.makeStringAndClear();
+}
+
+static ::rtl::OUString getLastSyncFileURLFromUserInstallation()
+{
+ ::rtl::OUString aUserBundledPathURL = getUserBundledExtPathURL();
+ ::sal_Int32 nLastIndex = aUserBundledPathURL.lastIndexOf('/');
+
+ ::rtl::OUStringBuffer aTmp( aUserBundledPathURL );
+
+ if ( nLastIndex != aUserBundledPathURL.getLength()-1 )
+ aTmp.appendAscii( "/" );
+ aTmp.appendAscii( pLastSyncFileName );
+
+ return aTmp.makeStringAndClear();
+}
+
+static osl::FileBase::RC copy_bundled_recursive(
+ const rtl::OUString& srcUnqPath,
+ const rtl::OUString& dstUnqPath,
+ sal_Int32 TypeToCopy )
+throw()
+{
+ osl::FileBase::RC err = osl::FileBase::E_None;
+
+ if( TypeToCopy == -1 ) // Document
+ {
+ err = osl::File::copy( srcUnqPath,dstUnqPath );
+ }
+ else if( TypeToCopy == +1 ) // Folder
+ {
+ osl::Directory aDir( srcUnqPath );
+ aDir.open();
+
+ err = osl::Directory::create( dstUnqPath );
+ osl::FileBase::RC next = err;
+ if( err == osl::FileBase::E_None ||
+ err == osl::FileBase::E_EXIST )
+ {
+ err = osl::FileBase::E_None;
+ sal_Int32 n_Mask = FileStatusMask_FileURL | FileStatusMask_FileName | FileStatusMask_Type;
+
+ osl::DirectoryItem aDirItem;
+
+ while( err == osl::FileBase::E_None && ( next = aDir.getNextItem( aDirItem ) ) == osl::FileBase::E_None )
+ {
+ sal_Bool IsDoc = false;
+ sal_Bool bFilter = false;
+ osl::FileStatus aFileStatus( n_Mask );
+ aDirItem.getFileStatus( aFileStatus );
+ if( aFileStatus.isValid( FileStatusMask_Type ) )
+ IsDoc = aFileStatus.getFileType() == osl::FileStatus::Regular;
+
+ // Getting the information for the next recursive copy
+ sal_Int32 newTypeToCopy = IsDoc ? -1 : +1;
+
+ rtl::OUString newSrcUnqPath;
+ if( aFileStatus.isValid( FileStatusMask_FileURL ) )
+ newSrcUnqPath = aFileStatus.getFileURL();
+
+ rtl::OUString newDstUnqPath = dstUnqPath;
+ rtl::OUString tit;
+ if( aFileStatus.isValid( FileStatusMask_FileName ) )
+ {
+ ::rtl::OUString aFileName = aFileStatus.getFileName();
+ tit = rtl::Uri::encode( aFileName,
+ rtl_UriCharClassPchar,
+ rtl_UriEncodeIgnoreEscapes,
+ RTL_TEXTENCODING_UTF8 );
+
+ // Special treatment for "lastsychronized" file. Must not be
+ // copied from the bundled folder!
+ if ( IsDoc && aFileName.equalsAscii( pLastSyncFileName ))
+ bFilter = true;
+ }
+
+ if( newDstUnqPath.lastIndexOf( sal_Unicode('/') ) != newDstUnqPath.getLength()-1 )
+ newDstUnqPath += rtl::OUString::createFromAscii( "/" );
+
+ newDstUnqPath += tit;
+
+ if (( newSrcUnqPath != dstUnqPath ) && !bFilter )
+ err = copy_bundled_recursive( newSrcUnqPath,newDstUnqPath, newTypeToCopy );
+ }
+
+ if( err == osl::FileBase::E_None && next != osl::FileBase::E_NOENT )
+ err = next;
+ }
+ aDir.close();
+ }
+
+ return err;
+}
+
Desktop::Desktop()
: m_bServicesRegistered( false )
, m_aBootstrapError( BE_OK )
@@ -477,6 +674,24 @@ void Desktop::Init()
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::Init" );
SetBootstrapStatus(BS_OK);
+ // Check for lastsynchronized file for bundled extensions in the user directory
+ // and test if synchronzation is necessary!
+ {
+ ::rtl::OUString aUserLastSyncFilePathURL = getLastSyncFileURLFromUserInstallation();
+ ::rtl::OUString aPreregSyncFilePathURL = getLastSyncFileURLFromBrandInstallation();
+
+ if ( needsSynchronization( aPreregSyncFilePathURL, aUserLastSyncFilePathURL ))
+ {
+ rtl::OUString aUserPath = getUserBundledExtPathURL();
+ rtl::OUString aPreregBundledPath = getBrandSharePreregBundledPathURL();
+
+ // copy bundled folder to the user directory
+ osl::FileBase::RC rc = osl::Directory::createPath(aUserPath);
+ (void) rc;
+ copy_bundled_recursive( aPreregBundledPath, aUserPath, +1 );
+ }
+ }
+
// create service factory...
Reference < XMultiServiceFactory > rSMgr = CreateApplicationServiceManager();
if( rSMgr.is() )
@@ -1117,28 +1332,79 @@ sal_Bool Desktop::SaveTasks()
sal_False);
}
-#ifdef MACOSX
-static void DoRestart()
-{
- oslProcess process;
- oslProcessError error;
- OUString sExecutableFile;
-
- osl_getExecutableFile( &sExecutableFile.pData );
-
- error = osl_executeProcess(
- sExecutableFile.pData,
- NULL,
- 0,
- 0,
- NULL,
- NULL,
- NULL,
- 0,
- &process
- );
-}
+namespace {
+
+void restartOnMac(bool passArguments) {
+#if defined MACOSX
+ OfficeIPCThread::DisableOfficeIPCThread();
+ rtl::OUString execUrl;
+ OSL_VERIFY(osl_getExecutableFile(&execUrl.pData) == osl_Process_E_None);
+ rtl::OUString execPath;
+ rtl::OString execPath8;
+ if ((osl::FileBase::getSystemPathFromFileURL(execUrl, execPath)
+ != osl::FileBase::E_None) ||
+ !execPath.convertToString(
+ &execPath8, osl_getThreadTextEncoding(),
+ (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR |
+ RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
+ {
+ std::abort();
+ }
+ std::vector< rtl::OString > args;
+ args.push_back(execPath8);
+ bool wait = false;
+ if (passArguments) {
+ sal_uInt32 n = osl_getCommandArgCount();
+ for (sal_uInt32 i = 0; i < n; ++i) {
+ rtl::OUString arg;
+ OSL_VERIFY(osl_getCommandArg(i, &arg.pData) == osl_Process_E_None);
+ if (arg.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("-accept="))) {
+ wait = true;
+ }
+ rtl::OString arg8;
+ if (!arg.convertToString(
+ &arg8, osl_getThreadTextEncoding(),
+ (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR |
+ RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
+ {
+ std::abort();
+ }
+ args.push_back(arg8);
+ }
+ }
+ std::vector< char const * > argPtrs;
+ for (std::vector< rtl::OString >::iterator i(args.begin()); i != args.end();
+ ++i)
+ {
+ argPtrs.push_back(i->getStr());
+ }
+ argPtrs.push_back(0);
+ execv(execPath8.getStr(), const_cast< char ** >(&argPtrs[0]));
+ if (errno == ENOTSUP) { // happens when multithreaded on OS X < 10.6
+ pid_t pid = fork();
+ if (pid == 0) {
+ execv(execPath8.getStr(), const_cast< char ** >(&argPtrs[0]));
+ } else if (pid > 0) {
+ // Two simultaneously running soffice processes lead to two dock
+ // icons, so avoid waiting here unless it must be assumed that the
+ // process invoking soffice itself wants to wait for soffice to
+ // finish:
+ if (!wait) {
+ return;
+ }
+ int stat;
+ if (waitpid(pid, &stat, 0) == pid && WIFEXITED(stat)) {
+ _exit(WEXITSTATUS(stat));
+ }
+ }
+ }
+ std::abort();
+#else
+ (void) passArguments; // avoid warnings
#endif
+}
+
+}
USHORT Desktop::Exception(USHORT nError)
{
@@ -1209,9 +1475,7 @@ USHORT Desktop::Exception(USHORT nError)
OfficeIPCThread::DisableOfficeIPCThread();
if( pSignalHandler )
DELETEZ( pSignalHandler );
-#ifdef MACOSX
- DoRestart();
-#endif
+ restartOnMac(false);
_exit( ExitHelper::E_CRASH_WITH_RESTART );
}
else
@@ -1294,6 +1558,9 @@ void Desktop::Main()
std::auto_ptr<SvtLanguageOptions> pLanguageOptions;
std::auto_ptr<SvtPathOptions> pPathOptions;
+ sal_Bool bRestartRequested( sal_False );
+ sal_Bool bUseSystemFileDialog(sal_True);
+ int nAcquireCount( 0 );
Reference < css::document::XEventListener > xGlobalBroadcaster;
try
{
@@ -1423,6 +1690,13 @@ void Desktop::Main()
( xSMgr->createInstance(
DEFINE_CONST_UNICODE( "com.sun.star.frame.GlobalEventBroadcaster" ) ), UNO_QUERY );
+ /* ensure existance of a default window that messages can be dispatched to
+ This is for the benefit of testtool which uses PostUserEvent extensively
+ and else can deadlock while creating this window from another tread while
+ the main thread is not yet in the event loop.
+ */
+ Application::GetDefaultDevice();
+
// initialize test-tool library (if available)
RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ tools::InitTestToolLib" );
tools::InitTestToolLib();
@@ -1487,58 +1761,80 @@ void Desktop::Main()
impl_checkRecoveryState(bCrashed, bExistsRecoveryData, bExistsSessionData);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} impl_checkRecoveryState" );
- if (
- (pCmdLineArgs->IsEmptyOrAcceptOnly() ) &&
- (SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SSTARTMODULE)) &&
- (!bExistsRecoveryData ) &&
- (!bExistsSessionData ) &&
- (!Application::AnyInput( INPUT_APPEVENT ) )
- )
+ Reference< ::com::sun::star::task::XRestartManager > xRestartManager;
{
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ create BackingComponent" );
- Reference< XFrame > xDesktopFrame( xSMgr->createInstance(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ))), UNO_QUERY );
- if (xDesktopFrame.is())
+ ::comphelper::ComponentContext aContext( xSMgr );
+ xRestartManager.set( aContext.getSingleton( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.OfficeRestartManager" ) ) ), UNO_QUERY );
+ }
+
+ // check whether the shutdown is caused by restart
+ bRestartRequested = ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
+
+ if ( pCmdLineArgs->IsHeadless() )
+ {
+ // Ensure that we use not the system file dialogs as
+ // headless mode relies on Application::EnableHeadlessMode()
+ // which does only work for VCL dialogs!!
+ SvtMiscOptions aMiscOptions;
+ bUseSystemFileDialog = aMiscOptions.UseSystemFileDialog();
+ aMiscOptions.SetUseSystemFileDialog( sal_False );
+ }
+
+ if ( !bRestartRequested )
+ {
+ if (
+ (pCmdLineArgs->IsEmptyOrAcceptOnly() ) &&
+ (SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SSTARTMODULE)) &&
+ (!bExistsRecoveryData ) &&
+ (!bExistsSessionData ) &&
+ (!Application::AnyInput( INPUT_APPEVENT ) )
+ )
{
-// SetSplashScreenProgress(60);
- Reference< XFrame > xBackingFrame;
- Reference< ::com::sun::star::awt::XWindow > xContainerWindow;
-
- xBackingFrame = xDesktopFrame->findFrame(OUString( RTL_CONSTASCII_USTRINGPARAM( "_blank" )), 0);
- if (xBackingFrame.is())
- xContainerWindow = xBackingFrame->getContainerWindow();
- if (xContainerWindow.is())
+ RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ create BackingComponent" );
+ Reference< XFrame > xDesktopFrame( xSMgr->createInstance(
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ))), UNO_QUERY );
+ if (xDesktopFrame.is())
{
- // set the WB_EXT_DOCUMENT style. Normally, this is done by the TaskCreator service when a "_blank"
- // frame/window is created. Since we do not use the TaskCreator here, we need to mimic its behavior,
- // otherwise documents loaded into this frame will later on miss functionality depending on the style.
- Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow );
- OSL_ENSURE( pContainerWindow, "Desktop::Main: no implementation access to the frame's container window!" );
- pContainerWindow->SetExtendedStyle( pContainerWindow->GetExtendedStyle() | WB_EXT_DOCUMENT );
-
- SetSplashScreenProgress(75);
- Sequence< Any > lArgs(1);
- lArgs[0] <<= xContainerWindow;
-
- Reference< XController > xBackingComp(
- xSMgr->createInstanceWithArguments(OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.StartModule") ), lArgs),
- UNO_QUERY);
-// SetSplashScreenProgress(80);
- if (xBackingComp.is())
+ // SetSplashScreenProgress(60);
+ Reference< XFrame > xBackingFrame;
+ Reference< ::com::sun::star::awt::XWindow > xContainerWindow;
+
+ xBackingFrame = xDesktopFrame->findFrame(OUString( RTL_CONSTASCII_USTRINGPARAM( "_blank" )), 0);
+ if (xBackingFrame.is())
+ xContainerWindow = xBackingFrame->getContainerWindow();
+ if (xContainerWindow.is())
{
- Reference< ::com::sun::star::awt::XWindow > xBackingWin(xBackingComp, UNO_QUERY);
- // Attention: You MUST(!) call setComponent() before you call attachFrame().
- // Because the backing component set the property "IsBackingMode" of the frame
- // to true inside attachFrame(). But setComponent() reset this state everytimes ...
- xBackingFrame->setComponent(xBackingWin, xBackingComp);
- SetSplashScreenProgress(100);
- xBackingComp->attachFrame(xBackingFrame);
- CloseSplashScreen();
- xContainerWindow->setVisible(sal_True);
+ // set the WB_EXT_DOCUMENT style. Normally, this is done by the TaskCreator service when a "_blank"
+ // frame/window is created. Since we do not use the TaskCreator here, we need to mimic its behavior,
+ // otherwise documents loaded into this frame will later on miss functionality depending on the style.
+ Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow );
+ OSL_ENSURE( pContainerWindow, "Desktop::Main: no implementation access to the frame's container window!" );
+ pContainerWindow->SetExtendedStyle( pContainerWindow->GetExtendedStyle() | WB_EXT_DOCUMENT );
+
+ SetSplashScreenProgress(75);
+ Sequence< Any > lArgs(1);
+ lArgs[0] <<= xContainerWindow;
+
+ Reference< XController > xBackingComp(
+ xSMgr->createInstanceWithArguments(OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.StartModule") ), lArgs),
+ UNO_QUERY);
+ // SetSplashScreenProgress(80);
+ if (xBackingComp.is())
+ {
+ Reference< ::com::sun::star::awt::XWindow > xBackingWin(xBackingComp, UNO_QUERY);
+ // Attention: You MUST(!) call setComponent() before you call attachFrame().
+ // Because the backing component set the property "IsBackingMode" of the frame
+ // to true inside attachFrame(). But setComponent() reset this state everytimes ...
+ xBackingFrame->setComponent(xBackingWin, xBackingComp);
+ SetSplashScreenProgress(100);
+ xBackingComp->attachFrame(xBackingFrame);
+ CloseSplashScreen();
+ xContainerWindow->setVisible(sal_True);
+ }
}
}
+ RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create BackingComponent" );
}
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create BackingComponent" );
}
}
catch ( com::sun::star::lang::WrappedTargetException& wte )
@@ -1573,108 +1869,83 @@ void Desktop::Main()
aOptions.SetVCLSettings();
// SetSplashScreenProgress(60);
- Application::SetFilterHdl( LINK( this, Desktop, ImplInitFilterHdl ) );
-
- sal_Bool bTerminateRequested = sal_False;
-
- // Preload function depends on an initialized sfx application!
- SetSplashScreenProgress(75);
-
- sal_Bool bUseSystemFileDialog(sal_True);
- if ( pCmdLineArgs->IsHeadless() )
+ if ( !bRestartRequested )
{
- // Ensure that we use not the system file dialogs as
- // headless mode relies on Application::EnableHeadlessMode()
- // which does only work for VCL dialogs!!
- SvtMiscOptions aMiscOptions;
- bUseSystemFileDialog = aMiscOptions.UseSystemFileDialog();
- aMiscOptions.SetUseSystemFileDialog( sal_False );
- }
+ Application::SetFilterHdl( LINK( this, Desktop, ImplInitFilterHdl ) );
- // use system window dialogs
- Application::SetSystemWindowMode( SYSTEMWINDOW_MODE_DIALOG );
+ sal_Bool bTerminateRequested = sal_False;
-// SetSplashScreenProgress(80);
+ // Preload function depends on an initialized sfx application!
+ SetSplashScreenProgress(75);
- if ( !bTerminateRequested && !pCmdLineArgs->IsInvisible() &&
- !pCmdLineArgs->IsNoQuickstart() )
- InitializeQuickstartMode( xSMgr );
+ // use system window dialogs
+ Application::SetSystemWindowMode( SYSTEMWINDOW_MODE_DIALOG );
- RTL_LOGFILE_CONTEXT( aLog2, "desktop (cd100003) createInstance com.sun.star.frame.Desktop" );
- try
- {
- Reference< XDesktop > xDesktop( xSMgr->createInstance(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ))), UNO_QUERY );
- if ( xDesktop.is() )
- xDesktop->addTerminateListener( new OfficeIPCThreadController );
- SetSplashScreenProgress(100);
- }
- catch ( com::sun::star::uno::Exception& e )
- {
- FatalError( MakeStartupErrorMessage(e.Message) );
- return;
- }
- /*
- catch ( ... )
- {
- FatalError( MakeStartupErrorMessage(
- OUString::createFromAscii(
- "Unknown error during startup (TD/Desktop service).\nInstallation could be damaged.")));
- return;
- }
- */
+ // SetSplashScreenProgress(80);
- // Release solar mutex just before we wait for our client to connect
- int nAcquireCount = 0;
- ::vos::IMutex& rMutex = Application::GetSolarMutex();
- if ( rMutex.tryToAcquire() )
- nAcquireCount = Application::ReleaseSolarMutex() - 1;
+ if ( !bTerminateRequested && !pCmdLineArgs->IsInvisible() &&
+ !pCmdLineArgs->IsNoQuickstart() )
+ InitializeQuickstartMode( xSMgr );
- // Post user event to startup first application component window
- // We have to send this OpenClients message short before execute() to
- // minimize the risk that this message overtakes type detection contruction!!
- Application::PostUserEvent( LINK( this, Desktop, OpenClients_Impl ) );
+ RTL_LOGFILE_CONTEXT( aLog2, "desktop (cd100003) createInstance com.sun.star.frame.Desktop" );
+ try
+ {
+ Reference< XDesktop > xDesktop( xSMgr->createInstance(
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ))), UNO_QUERY );
+ if ( xDesktop.is() )
+ xDesktop->addTerminateListener( new OfficeIPCThreadController );
+ SetSplashScreenProgress(100);
+ }
+ catch ( com::sun::star::uno::Exception& e )
+ {
+ FatalError( MakeStartupErrorMessage(e.Message) );
+ return;
+ }
+ /*
+ catch ( ... )
+ {
+ FatalError( MakeStartupErrorMessage(
+ OUString::createFromAscii(
+ "Unknown error during startup (TD/Desktop service).\nInstallation could be damaged.")));
+ return;
+ }
+ */
- // Post event to enable acceptors
- Application::PostUserEvent( LINK( this, Desktop, EnableAcceptors_Impl) );
+ // Post user event to startup first application component window
+ // We have to send this OpenClients message short before execute() to
+ // minimize the risk that this message overtakes type detection contruction!!
+ Application::PostUserEvent( LINK( this, Desktop, OpenClients_Impl ) );
- // The configuration error handler currently is only for startup
- aConfigErrHandler.deactivate();
+ // Post event to enable acceptors
+ Application::PostUserEvent( LINK( this, Desktop, EnableAcceptors_Impl) );
- // Acquire solar mutex just before we enter our message loop
- if ( nAcquireCount )
- Application::AcquireSolarMutex( nAcquireCount );
+ // The configuration error handler currently is only for startup
+ aConfigErrHandler.deactivate();
- // call Application::Execute to process messages in vcl message loop
- RTL_LOGFILE_PRODUCT_TRACE( "PERFORMANCE - enter Application::Execute()" );
+ // call Application::Execute to process messages in vcl message loop
+ RTL_LOGFILE_PRODUCT_TRACE( "PERFORMANCE - enter Application::Execute()" );
- Reference< ::com::sun::star::task::XRestartManager > xRestartManager;
- try
- {
- // The JavaContext contains an interaction handler which is used when
- // the creation of a Java Virtual Machine fails
- com::sun::star::uno::ContextLayer layer2(
- new svt::JavaContext( com::sun::star::uno::getCurrentContext() ) );
+ try
+ {
+ // The JavaContext contains an interaction handler which is used when
+ // the creation of a Java Virtual Machine fails
+ com::sun::star::uno::ContextLayer layer2(
+ new svt::JavaContext( com::sun::star::uno::getCurrentContext() ) );
- ::comphelper::ComponentContext aContext( xSMgr );
- xRestartManager.set( aContext.getSingleton( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.OfficeRestartManager" ) ) ), UNO_QUERY );
- if ( !xRestartManager.is() || !xRestartManager->isRestartRequested( sal_True ) )
Execute();
- }
- catch(const com::sun::star::document::CorruptedFilterConfigurationException& exFilterCfg)
- {
- OfficeIPCThread::SetDowning();
- FatalError( MakeStartupErrorMessage(exFilterCfg.Message) );
- }
- catch(const com::sun::star::configuration::CorruptedConfigurationException& exAnyCfg)
- {
- OfficeIPCThread::SetDowning();
- FatalError( MakeStartupErrorMessage(exAnyCfg.Message) );
+ }
+ catch(const com::sun::star::document::CorruptedFilterConfigurationException& exFilterCfg)
+ {
+ OfficeIPCThread::SetDowning();
+ FatalError( MakeStartupErrorMessage(exFilterCfg.Message) );
+ }
+ catch(const com::sun::star::configuration::CorruptedConfigurationException& exAnyCfg)
+ {
+ OfficeIPCThread::SetDowning();
+ FatalError( MakeStartupErrorMessage(exAnyCfg.Message) );
+ }
}
- // check whether the shutdown is caused by restart
- sal_Bool bRestartRequested = ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
-
if (xGlobalBroadcaster.is())
{
css::document::EventObject aEvent;
@@ -1709,9 +1980,7 @@ void Desktop::Main()
RTL_LOGFILE_CONTEXT_TRACE( aLog, "FINISHED WITH Destop::Main" );
if ( bRestartRequested )
{
-#ifdef MACOSX
- DoRestart();
-#endif
+ restartOnMac(true);
// wouldn't the solution be more clean if SalMain returns the exit code to the system?
_exit( ExitHelper::E_NORMAL_RESTART );
}
@@ -2368,8 +2637,6 @@ void Desktop::OpenClients()
aHelpURLBuffer.appendAscii("&System=UNX");
#elif defined WNT
aHelpURLBuffer.appendAscii("&System=WIN");
-#elif defined MAC
- aHelpURLBuffer.appendAscii("&System=MAC");
#elif defined OS2
aHelpURLBuffer.appendAscii("&System=OS2");
#endif
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index fc74c3fb4504..5527b8ea2aea 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -847,8 +847,6 @@ void SAL_CALL OfficeIPCThread::run()
aHelpURLBuffer.appendAscii("&System=UNX");
#elif defined WNT
aHelpURLBuffer.appendAscii("&System=WIN");
-#elif defined MAC
- aHelpURLBuffer.appendAscii("&System=MAC");
#elif defined OS2
aHelpURLBuffer.appendAscii("&System=OS2");
#endif
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 87f70e449b9d..78b29624b16e 100755..100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -372,11 +372,13 @@ MENU_COMMAND ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const long
if ( ! GetEntryData( nPos )->m_bLocked )
{
- if ( GetEntryData( nPos )->m_eState == REGISTERED )
- aPopup.InsertItem( CMD_DISABLE, DialogHelper::getResourceString( RID_CTX_ITEM_DISABLE ) );
- else if ( GetEntryData( nPos )->m_eState != NOT_AVAILABLE )
- aPopup.InsertItem( CMD_ENABLE, DialogHelper::getResourceString( RID_CTX_ITEM_ENABLE ) );
-
+ if ( GetEntryData( nPos )->m_bUser )
+ {
+ if ( GetEntryData( nPos )->m_eState == REGISTERED )
+ aPopup.InsertItem( CMD_DISABLE, DialogHelper::getResourceString( RID_CTX_ITEM_DISABLE ) );
+ else if ( GetEntryData( nPos )->m_eState != NOT_AVAILABLE )
+ aPopup.InsertItem( CMD_ENABLE, DialogHelper::getResourceString( RID_CTX_ITEM_ENABLE ) );
+ }
aPopup.InsertItem( CMD_REMOVE, DialogHelper::getResourceString( RID_CTX_ITEM_REMOVE ) );
}
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index de9d97db2b48..c82973f1b680 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -1136,6 +1136,14 @@ sal_Bool ExtensionManager::synchronize(
bModified |= m_bundledRepository->synchronize(xAbortChannel, xCmdEnv);
progressBundled.update(OUSTR("\n\n"));
+ //Always determine the active extension. This is necessary for the
+ //first-start optimization. The setup creates the registration data for the
+ //bundled extensions (brand_layer/share/prereg/bundled), which is copied to the user
+ //installation (user_installation/extension/bundled) when a user starts OOo
+ //for the first time after running setup. All bundled extensions are registered
+ //at that moment. However, extensions with the same identifier can be in the
+ //shared or user repository, in which case the respective bundled extensions must
+ //be revoked.
try
{
const uno::Sequence<uno::Sequence<Reference<deploy::XPackage> > >
diff --git a/desktop/source/deployment/manager/dp_properties.cxx b/desktop/source/deployment/manager/dp_properties.cxx
index df579944c6e4..9a181d1573e5 100644
--- a/desktop/source/deployment/manager/dp_properties.cxx
+++ b/desktop/source/deployment/manager/dp_properties.cxx
@@ -2,7 +2,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
diff --git a/desktop/source/deployment/manager/dp_properties.hxx b/desktop/source/deployment/manager/dp_properties.hxx
index 97fc8b8c5394..a1b953ce8376 100644
--- a/desktop/source/deployment/manager/dp_properties.hxx
+++ b/desktop/source/deployment/manager/dp_properties.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dp_manager.h,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index fe3490903043..cfdac4068130 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -589,6 +589,11 @@ void TRACE(::rtl::OString const & sText)
void syncRepositories(Reference<ucb::XCommandEnvironment> const & xCmdEnv)
{
+ OUString sDisable;
+ ::rtl::Bootstrap::get( OUSTR( "DISABLE_EXTENSION_SYNCHRONIZATION" ), sDisable, OUString() );
+ if (sDisable.getLength() > 0)
+ return;
+
Reference<deployment::XExtensionManager> xExtensionManager;
//synchronize shared before bundled otherewise there are
//more revoke and registration calls.
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 9ea6e8227340..3c6680065db5 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -359,16 +359,11 @@ void BackendImpl::configmgrini_verify_init(
do {
OUString token( line.getToken( 0, ' ', index ).trim() );
if (token.getLength() > 0) {
- // cleanup, check if existing:
- if (create_ucb_content(
- 0, expandUnoRcTerm(token), xCmdEnv,
- false /* no throw */ )) {
- //The file may not exist anymore if a shared or bundled
- //extension was removed, but it can still be in the configmgrini.
- //After running XExtensionManager::synchronize, the configmgrini is
- //cleaned up
- m_xcs_files.push_back( token );
- }
+ //The file may not exist anymore if a shared or bundled
+ //extension was removed, but it can still be in the configmgrini.
+ //After running XExtensionManager::synchronize, the configmgrini is
+ //cleaned up
+ m_xcs_files.push_back( token );
}
}
while (index >= 0);
@@ -378,31 +373,15 @@ void BackendImpl::configmgrini_verify_init(
sal_Int32 index = sizeof ("DATA=") - 1;
do {
OUString token( line.getToken( 0, ' ', index ).trim() );
- if (token.getLength() > 0) {
+ if (token.getLength() > 0)
+ {
if (token[ 0 ] == '?')
token = token.copy( 1 );
- // cleanup, check if existing:
- if (create_ucb_content(
- 0, expandUnoRcTerm(token),
- xCmdEnv, false /* no throw */ )) {
- //The file may not exist anymore if a shared or bundled
- //extension was removed, but it can still be in the configmgrini.
- //After running XExtensionManager::synchronize, the configmgrini is
- //cleaned up
- m_xcu_files.push_back( token );
- }
- else
- {
- //Check if it was removed. Only when the file contained %origin, so that
- //a new file was writen in the user installation (e.g. $BUNDLED_EXTENSIONS_USER)
- //See also ConfigurationBackendDb.iniEntry
- ::std::list<OUString> iniEntries = getAllIniEntries();
- if (::std::find(iniEntries.begin(), iniEntries.end(), token)
- != iniEntries.end())
- m_xcu_files.push_back( token );
- else
- OSL_ENSURE(0, "Extension manager: Invalid configmgr.ini entry.");
- }
+ //The file may not exist anymore if a shared or bundled
+ //extension was removed, but it can still be in the configmgrini.
+ //After running XExtensionManager::synchronize, the configmgrini is
+ //cleaned up
+ m_xcu_files.push_back( token );
}
}
while (index >= 0);
@@ -502,6 +481,8 @@ bool BackendImpl::removeFromConfigmgrIni(
{
//in case the xcu contained %origin% then the configmr.ini contains the
//url to the file in the user installation (e.g. $BUNDLED_EXTENSIONS_USER)
+ //However, m_url (getURL()) contains the URL for the file in the actual
+ //extension installatation.
::boost::optional<ConfigurationBackendDb::Data> data = readDataFromDb(url_);
if (data)
i = std::find(rSet.begin(), rSet.end(), data->iniEntry);
@@ -757,10 +738,17 @@ void BackendImpl::PackageImpl::processPackage_(
}
that->m_registeredPackages->erase(i->first);
}
- ::ucbhelper::Content(
- makeURL( that->getCachePath(), OUSTR("registry") ),
- xCmdEnv ).executeCommand(
- OUSTR("delete"), Any( true /* delete physically */ ) );
+ try
+ {
+ ::ucbhelper::Content(
+ makeURL( that->getCachePath(), OUSTR("registry") ),
+ xCmdEnv ).executeCommand(
+ OUSTR("delete"), Any( true /* delete physically */ ) );
+ }
+ catch(Exception&)
+ {
+ OSL_ASSERT(0);
+ }
}
that->deleteDataFromDb(getURL());
diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
index 845ba88cb813..2a02c6d8efa0 100644
--- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dp_package.cxx,v $
- * $Revision: 1.34.16.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx
index 1b6c4f8973a4..7023897bd8de 100644
--- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx
+++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dp_backend.h,v $
- * $Revision: 1.18 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx
index c5e440a2a825..0f309a5b729f 100644
--- a/desktop/source/deployment/registry/dp_registry.cxx
+++ b/desktop/source/deployment/registry/dp_registry.cxx
@@ -129,7 +129,9 @@ public:
virtual Reference<deployment::XPackage> SAL_CALL bindPackage(
OUString const & url, OUString const & mediaType, sal_Bool bRemoved,
OUString const & identifier, Reference<XCommandEnvironment> const & xCmdEnv )
- throw (deployment::DeploymentException, CommandFailedException,
+ throw (deployment::DeploymentException,
+ deployment::InvalidRemovedParameterException,
+ CommandFailedException,
lang::IllegalArgumentException, RuntimeException);
virtual Sequence< Reference<deployment::XPackageTypeInfo> > SAL_CALL
getSupportedPackageTypes() throw (RuntimeException);
@@ -461,7 +463,8 @@ void PackageRegistryImpl::update() throw (RuntimeException)
Reference<deployment::XPackage> PackageRegistryImpl::bindPackage(
OUString const & url, OUString const & mediaType_, sal_Bool bRemoved,
OUString const & identifier, Reference<XCommandEnvironment> const & xCmdEnv )
- throw (deployment::DeploymentException, CommandFailedException,
+ throw (deployment::DeploymentException, deployment::InvalidRemovedParameterException,
+ CommandFailedException,
lang::IllegalArgumentException, RuntimeException)
{
check();
diff --git a/desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx b/desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx
index 976a6281a2bd..ff1044910985 100644
--- a/desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx
+++ b/desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dp_package.cxx,v $
- * $Revision: 1.34.16.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/desktop/source/deployment/registry/executable/dp_executablebackenddb.hxx b/desktop/source/deployment/registry/executable/dp_executablebackenddb.hxx
index 4f17eeda24a6..80cd33771a34 100644
--- a/desktop/source/deployment/registry/executable/dp_executablebackenddb.hxx
+++ b/desktop/source/deployment/registry/executable/dp_executablebackenddb.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dp_backend.h,v $
- * $Revision: 1.18 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
index 3bf67e0c050b..8ec9a39d5050 100644
--- a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
+++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dp_package.cxx,v $
- * $Revision: 1.34.16.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx
index edf7dfdfc284..c7b730fd1b99 100644
--- a/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx
+++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dp_backend.h,v $
- * $Revision: 1.18 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 2ad6478b665c..feb55d0af3bf 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -866,14 +866,10 @@ void BackendImpl::PackageImpl::processPackage_(
try {
xPackage->registerPackage( startup, xSubAbortChannel, xCmdEnv );
}
- catch (RuntimeException &) {
- throw;
- }
- catch (ucb::CommandAbortedException &) {
- throw;
- }
- catch (Exception &) {
- // CommandFailedException, DeploymentException:
+ catch (Exception &)
+ {
+ //We even try a rollback if the user cancelled the action (CommandAbortedException)
+ //in order to prevent invalid database entries.
Any exc( ::cppu::getCaughtException() );
// try to handle exception, notify:
bool approve = false, abort = false;
@@ -904,14 +900,8 @@ void BackendImpl::PackageImpl::processPackage_(
bundle[ pos ]->revokePackage(
xSubAbortChannel, xCmdEnv );
}
- catch (RuntimeException &) {
- throw;
- }
- catch (ucb::CommandAbortedException &) {
- throw;
- }
- catch (Exception &) {
- // bundle rollback error:
+ catch (Exception &)
+ {
OSL_ENSURE( 0, ::rtl::OUStringToOString(
::comphelper::anyToString(
::cppu::getCaughtException() ),
diff --git a/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx b/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx
index ce0d3029084d..9a84a7286027 100644
--- a/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx
+++ b/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dp_package.cxx,v $
- * $Revision: 1.34.16.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx b/desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx
index 9d227f8b64b8..7feaeba5568b 100644
--- a/desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx
+++ b/desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dp_backend.h,v $
- * $Revision: 1.18 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/desktop/source/migration/services/cexportsoo3.cxx b/desktop/source/migration/services/cexportsoo3.cxx
index 20b8232044e9..695b6b810808 100755
--- a/desktop/source/migration/services/cexportsoo3.cxx
+++ b/desktop/source/migration/services/cexportsoo3.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cexports.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
index 2e3a8d1d518c..3e9836fa2e84 100644..100755
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: extensionmigration.cxx,v $
- * $Revision: 1.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/desktop/source/migration/services/oo3extensionmigration.hxx b/desktop/source/migration/services/oo3extensionmigration.hxx
index 03995652888c..fb58692c81ee 100644..100755
--- a/desktop/source/migration/services/oo3extensionmigration.hxx
+++ b/desktop/source/migration/services/oo3extensionmigration.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: extensionmigration.hxx,v $
- * $Revision: 1.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index a9a0c8271373..4545ed862271 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -39,6 +39,7 @@
#include "osl/thread.h"
#include "osl/process.h"
#include "osl/conditn.hxx"
+#include "osl/file.hxx"
#include "cppuhelper/implbase1.hxx"
#include "cppuhelper/exc_hlp.hxx"
#include "comphelper/anytostring.hxx"
@@ -377,6 +378,29 @@ extern "C" int unopkg_main()
if (e != osl_File_E_None && e != osl_File_E_NOENT)
throw Exception(OUSTR("Could not delete ") + extensionUnorc, 0);
}
+ else if (subCommand.equals(OUSTR("sync")))
+ {
+ //sync is private!!!! Only for bundled extensions!!!
+ //For performance reasons unopkg sync is called during the setup and
+ //creates the registration data for the repository of the bundled
+ //extensions. It is then copied to the user installation during
+ //startup of OOo (userdata/extensions/bundled). The registration
+ //data is in the brand installation and must be removed when
+ //uninstalling OOo. We do this here, before UNO is
+ //bootstrapped. Otherwies files could be locked by this process.
+
+ //If there is no folder left in
+ //$BRAND_BASE_DIR/share/extensions
+ //then we can delete the registration data at
+ //$BUNDLED_EXTENSIONS_USER
+ if (hasNoFolder(OUSTR("$BRAND_BASE_DIR/share/extensions")))
+ {
+ removeFolder(OUSTR("$BUNDLED_EXTENSIONS_USER"));
+ //return otherwise we create the registration data again
+ return 0;
+ }
+
+ }
xComponentContext = getUNO(
disposeGuard, option_verbose, option_shared, subcmd_gui,
@@ -587,6 +611,15 @@ extern "C" int unopkg_main()
xDialog->startExecuteModal(xListener);
dialogEnded.wait();
}
+ else if (subCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("sync")))
+ {
+ //This sub command may be removed later and is only there to have a
+ //possibility to start extension synching without any output.
+ //This is just here so we do not get an error, because of an unknown
+ //sub-command. We do synching before
+ //the sub-commands are processed.
+
+ }
else
{
dp_misc::writeConsoleError(
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index 3272810afee2..d7b6e1ca2336 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -528,5 +528,110 @@ Reference<XComponentContext> getUNO(
return xComponentContext;
}
+//Determines if a folder does not contains a folder.
+//Return false may also mean that the status could not be determined
+//because some error occurred.
+bool hasNoFolder(OUString const & folderUrl)
+{
+ bool ret = false;
+ OUString url = folderUrl;
+ ::rtl::Bootstrap::expandMacros(url);
+ ::osl::Directory dir(url);
+ osl::File::RC rc = dir.open();
+ if (rc == osl::File::E_None)
+ {
+ bool bFolderExist = false;
+ osl::DirectoryItem i;
+ osl::File::RC rcNext = osl::File::E_None;
+ while ( (rcNext = dir.getNextItem(i)) == osl::File::E_None)
+ {
+ osl::FileStatus stat(FileStatusMask_Type);
+ if (i.getFileStatus(stat) == osl::File::E_None)
+ {
+ if (stat.getFileType() == osl::FileStatus::Directory)
+ {
+ bFolderExist = true;
+ break;
+ }
+ }
+ else
+ {
+ dp_misc::writeConsole(
+ OUSTR("unopkg: Error while investigating ") + url + OUSTR("\n"));
+ break;
+ }
+ i = osl::DirectoryItem();
+ }
+
+ if (rcNext == osl::File::E_NOENT ||
+ rcNext == osl::File::E_None)
+ {
+ if (!bFolderExist)
+ ret = true;
+ }
+ else
+ {
+ dp_misc::writeConsole(
+ OUSTR("unopkg: Error while investigating ") + url + OUSTR("\n"));
+ }
+
+ dir.close();
+ }
+ else
+ {
+ dp_misc::writeConsole(
+ OUSTR("unopkg: Error while investigating ") + url + OUSTR("\n"));
+ }
+ return ret;
}
+void removeFolder(OUString const & folderUrl)
+{
+ OUString url = folderUrl;
+ ::rtl::Bootstrap::expandMacros(url);
+ ::osl::Directory dir(url);
+ ::osl::File::RC rc = dir.open();
+ if (rc == osl::File::E_None)
+ {
+ ::osl::DirectoryItem i;
+ ::osl::File::RC rcNext = ::osl::File::E_None;
+ while ( (rcNext = dir.getNextItem(i)) == ::osl::File::E_None)
+ {
+ ::osl::FileStatus stat(FileStatusMask_Type | FileStatusMask_FileURL);
+ if (i.getFileStatus(stat) == ::osl::File::E_None)
+ {
+ ::osl::FileStatus::Type t = stat.getFileType();
+ if (t == ::osl::FileStatus::Directory)
+ {
+ //remove folder
+ removeFolder(stat.getFileURL());
+ }
+ else if (t == ::osl::FileStatus::Regular)
+ {
+ //remove file
+ ::osl::File::remove(stat.getFileURL());
+ }
+ else
+ {
+ OSL_ASSERT(0);
+ }
+ }
+ else
+ {
+ dp_misc::writeConsole(
+ OUSTR("unopkg: Error while investigating ") + url + OUSTR("\n"));
+ break;
+ }
+ i = ::osl::DirectoryItem();
+ }
+ dir.close();
+ ::osl::Directory::remove(url);
+ }
+ else
+ {
+ dp_misc::writeConsole(
+ OUSTR("unopkg: Error while removing ") + url + OUSTR("\n"));
+ }
+}
+
+}
diff --git a/desktop/source/pkgchk/unopkg/unopkg_shared.h b/desktop/source/pkgchk/unopkg/unopkg_shared.h
index 43f77513b10c..4975cc4c087b 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_shared.h
+++ b/desktop/source/pkgchk/unopkg/unopkg_shared.h
@@ -178,5 +178,11 @@ css::uno::Reference<css::uno::XComponentContext> getUNO(
DisposeGuard & disposeGuard, bool verbose, bool shared, bool bGui,
css::uno::Reference<css::uno::XComponentContext> & out_LocalComponentContext);
+bool hasNoFolder(::rtl::OUString const & folderUrl);
+
+void removeFolder(::rtl::OUString const & folderUrl);
+
}
+
+
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx
new file mode 100644
index 000000000000..c30bff545ddb
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx
@@ -0,0 +1,128 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_QUADRATICSHADOWPRIMITIVE2D_HXX
+#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_QUADRATICSHADOWPRIMITIVE2D_HXX
+
+#include <drawinglayer/primitive2d/primitivetools2d.hxx>
+#include <vcl/bitmapex.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// DiscreteShadowPrimitive2D class
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ /** DiscreteShadow data class
+
+ */
+ class DiscreteShadow
+ {
+ private:
+ /// the original shadow BitmapEx in a special form
+ BitmapEx maBitmapEx;
+
+ /// buffered extracted parts of CombinedShadow for easier usage
+ BitmapEx maTopLeft;
+ BitmapEx maTop;
+ BitmapEx maTopRight;
+ BitmapEx maRight;
+ BitmapEx maBottomRight;
+ BitmapEx maBottom;
+ BitmapEx maBottomLeft;
+ BitmapEx maLeft;
+
+ public:
+ /// constructor
+ DiscreteShadow(const BitmapEx& rBitmapEx);
+
+ /// data read access
+ const BitmapEx& getBitmapEx() const { return maBitmapEx; }
+
+ /// compare operator
+ bool operator==(const DiscreteShadow& rCompare) const
+ {
+ return getBitmapEx() == rCompare.getBitmapEx();
+ }
+
+ /// helper accesses which create on-demand needed segments
+ const BitmapEx& getTopLeft() const;
+ const BitmapEx& getTop() const;
+ const BitmapEx& getTopRight() const;
+ const BitmapEx& getRight() const;
+ const BitmapEx& getBottomRight() const;
+ const BitmapEx& getBottom() const;
+ const BitmapEx& getBottomLeft() const;
+ const BitmapEx& getLeft() const;
+ };
+
+ /** DiscreteShadowPrimitive2D class
+
+ */
+ class DiscreteShadowPrimitive2D : public DiscreteMetricDependentPrimitive2D
+ {
+ private:
+ // the object transformation of the rectangular object
+ basegfx::B2DHomMatrix maTransform;
+
+ // the bitmap shadow data
+ DiscreteShadow maDiscreteShadow;
+
+ protected:
+ /// create local decomposition
+ virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+
+ public:
+ /// constructor
+ DiscreteShadowPrimitive2D(
+ const basegfx::B2DHomMatrix& rTransform,
+ const DiscreteShadow& rDiscreteShadow);
+
+ /// data read access
+ const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
+ const DiscreteShadow& getDiscreteShadow() const { return maDiscreteShadow; }
+
+ /// compare operator
+ virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+
+ /// get range
+ virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
+
+ /// provide unique ID
+ DeclPrimitrive2DIDBlock()
+ };
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // INCLUDED_DRAWINGLAYER_PRIMITIVE2D_QUADRATICSHADOWPRIMITIVE2D_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
index c60257551c28..87aae8cb768f 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
@@ -93,14 +93,16 @@
#define PRIMITIVE2D_ID_STRUCTURETAGPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 50)
#define PRIMITIVE2D_ID_BORDERLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 51)
#define PRIMITIVE2D_ID_POLYPOLYGONMARKERPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 52)
-#define PRIMITIVE2D_ID_INVERTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 53)
-#define PRIMITIVE2D_ID_DISCRETEBITMAPPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 54)
-#define PRIMITIVE2D_ID_WALLPAPERBITMAPPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 55)
-#define PRIMITIVE2D_ID_TEXTLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 56)
-#define PRIMITIVE2D_ID_TEXTCHARACTERSTRIKEOUTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 57)
-#define PRIMITIVE2D_ID_TEXTGEOMETRYSTRIKEOUTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 58)
-#define PRIMITIVE2D_ID_EPSPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 59)
-#define PRIMITIVE2D_ID_HIDDENGEOMETRYPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 60)
+#define PRIMITIVE2D_ID_HITTESTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 53)
+#define PRIMITIVE2D_ID_INVERTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 54)
+#define PRIMITIVE2D_ID_DISCRETEBITMAPPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 55)
+#define PRIMITIVE2D_ID_WALLPAPERBITMAPPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 56)
+#define PRIMITIVE2D_ID_TEXTLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 57)
+#define PRIMITIVE2D_ID_TEXTCHARACTERSTRIKEOUTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 58)
+#define PRIMITIVE2D_ID_TEXTGEOMETRYSTRIKEOUTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 59)
+#define PRIMITIVE2D_ID_EPSPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 60)
+#define PRIMITIVE2D_ID_DISCRETESHADOWPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 61)
+#define PRIMITIVE2D_ID_HIDDENGEOMETRYPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 62)
//////////////////////////////////////////////////////////////////////////////
diff --git a/drawinglayer/prj/d.lst b/drawinglayer/prj/d.lst
index e863e47a3b18..54f087d317e4 100644
--- a/drawinglayer/prj/d.lst
+++ b/drawinglayer/prj/d.lst
@@ -16,6 +16,8 @@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\primitive2d
..\inc\drawinglayer\primitive2d\borderlineprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\borderlineprimitive2d.hxx
..\inc\drawinglayer\primitive2d\chartprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\chartprimitive2d.hxx
..\inc\drawinglayer\primitive2d\controlprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\controlprimitive2d.hxx
+..\inc\drawinglayer\primitive2d\discretebitmapprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\discretebitmapprimitive2d.hxx
+..\inc\drawinglayer\primitive2d\discreteshadowprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\discreteshadowprimitive2d.hxx
..\inc\drawinglayer\primitive2d\embedded3dprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\embedded3dprimitive2d.hxx
..\inc\drawinglayer\primitive2d\fillbitmapprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\fillbitmapprimitive2d.hxx
..\inc\drawinglayer\primitive2d\fillgradientprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\fillgradientprimitive2d.hxx
diff --git a/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx b/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx
new file mode 100644
index 000000000000..a4afd501728b
--- /dev/null
+++ b/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx
@@ -0,0 +1,339 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_drawinglayer.hxx"
+
+#include <drawinglayer/primitive2d/discreteshadowprimitive2d.hxx>
+#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ DiscreteShadow::DiscreteShadow(const BitmapEx& rBitmapEx)
+ : maBitmapEx(rBitmapEx),
+ maTopLeft(),
+ maTop(),
+ maTopRight(),
+ maRight(),
+ maBottomRight(),
+ maBottom(),
+ maBottomLeft(),
+ maLeft()
+ {
+ const Size& rBitmapSize = getBitmapEx().GetSizePixel();
+
+ if(rBitmapSize.Width() != rBitmapSize.Height() || rBitmapSize.Width() < 7)
+ {
+ OSL_ENSURE(false, "DiscreteShadowPrimitive2D: wrong bitmap format (!)");
+ maBitmapEx = BitmapEx();
+ }
+ }
+
+ const BitmapEx& DiscreteShadow::getTopLeft() const
+ {
+ if(maTopLeft.IsEmpty())
+ {
+ const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2);
+ const_cast< DiscreteShadow* >(this)->maTopLeft = getBitmapEx();
+ const_cast< DiscreteShadow* >(this)->maTopLeft.Crop(
+ Rectangle(Point(0,0),Size(nQuarter*2+1,nQuarter*2+1)));
+ }
+
+ return maTopLeft;
+ }
+
+ const BitmapEx& DiscreteShadow::getTop() const
+ {
+ if(maTop.IsEmpty())
+ {
+ const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2);
+ const_cast< DiscreteShadow* >(this)->maTop = getBitmapEx();
+ const_cast< DiscreteShadow* >(this)->maTop.Crop(
+ Rectangle(Point(nQuarter*2+1,0),Size(1,nQuarter+1)));
+ }
+
+ return maTop;
+ }
+
+ const BitmapEx& DiscreteShadow::getTopRight() const
+ {
+ if(maTopRight.IsEmpty())
+ {
+ const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2);
+ const_cast< DiscreteShadow* >(this)->maTopRight = getBitmapEx();
+ const_cast< DiscreteShadow* >(this)->maTopRight.Crop(
+ Rectangle(Point(nQuarter*2+2,0),Size(nQuarter*2+1,nQuarter*2+1)));
+ }
+
+ return maTopRight;
+ }
+
+ const BitmapEx& DiscreteShadow::getRight() const
+ {
+ if(maRight.IsEmpty())
+ {
+ const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2);
+ const_cast< DiscreteShadow* >(this)->maRight = getBitmapEx();
+ const_cast< DiscreteShadow* >(this)->maRight.Crop(
+ Rectangle(Point(nQuarter*3+2,nQuarter*2+1),Size(nQuarter+1,1)));
+ }
+
+ return maRight;
+ }
+
+ const BitmapEx& DiscreteShadow::getBottomRight() const
+ {
+ if(maBottomRight.IsEmpty())
+ {
+ const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2);
+ const_cast< DiscreteShadow* >(this)->maBottomRight = getBitmapEx();
+ const_cast< DiscreteShadow* >(this)->maBottomRight.Crop(
+ Rectangle(Point(nQuarter*2+2,nQuarter*2+2),Size(nQuarter*2+1,nQuarter*2+1)));
+ }
+
+ return maBottomRight;
+ }
+
+ const BitmapEx& DiscreteShadow::getBottom() const
+ {
+ if(maBottom.IsEmpty())
+ {
+ const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2);
+ const_cast< DiscreteShadow* >(this)->maBottom = getBitmapEx();
+ const_cast< DiscreteShadow* >(this)->maBottom.Crop(
+ Rectangle(Point(nQuarter*2+1,nQuarter*3+2),Size(1,nQuarter+1)));
+ }
+
+ return maBottom;
+ }
+
+ const BitmapEx& DiscreteShadow::getBottomLeft() const
+ {
+ if(maBottomLeft.IsEmpty())
+ {
+ const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2);
+ const_cast< DiscreteShadow* >(this)->maBottomLeft = getBitmapEx();
+ const_cast< DiscreteShadow* >(this)->maBottomLeft.Crop(
+ Rectangle(Point(0,nQuarter*2+2),Size(nQuarter*2+1,nQuarter*2+1)));
+ }
+
+ return maBottomLeft;
+ }
+
+ const BitmapEx& DiscreteShadow::getLeft() const
+ {
+ if(maLeft.IsEmpty())
+ {
+ const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2);
+ const_cast< DiscreteShadow* >(this)->maLeft = getBitmapEx();
+ const_cast< DiscreteShadow* >(this)->maLeft.Crop(
+ Rectangle(Point(0,nQuarter*2+1),Size(nQuarter+1,1)));
+ }
+
+ return maLeft;
+ }
+
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ Primitive2DSequence DiscreteShadowPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ {
+ Primitive2DSequence xRetval;
+
+ if(!getDiscreteShadow().getBitmapEx().IsEmpty())
+ {
+ const sal_Int32 nQuarter((getDiscreteShadow().getBitmapEx().GetSizePixel().Width() - 3) >> 2);
+ const basegfx::B2DVector aScale(getTransform() * basegfx::B2DVector(1.0, 1.0));
+ const double fSingleX(getDiscreteUnit() / aScale.getX());
+ const double fSingleY(getDiscreteUnit() / aScale.getY());
+ const double fBorderX(fSingleX * nQuarter);
+ const double fBorderY(fSingleY * nQuarter);
+ const double fBigLenX((fBorderX * 2.0) + fSingleX);
+ const double fBigLenY((fBorderY * 2.0) + fSingleY);
+
+ xRetval.realloc(8);
+
+ // TopLeft
+ xRetval[0] = Primitive2DReference(
+ new BitmapPrimitive2D(
+ getDiscreteShadow().getTopLeft(),
+ basegfx::tools::createScaleTranslateB2DHomMatrix(
+ fBigLenX,
+ fBigLenY,
+ -fBorderX,
+ -fBorderY)));
+
+ // Top
+ xRetval[1] = Primitive2DReference(
+ new BitmapPrimitive2D(
+ getDiscreteShadow().getTop(),
+ basegfx::tools::createScaleTranslateB2DHomMatrix(
+ 1.0 - (2.0 * fBorderX) - fSingleX,
+ fBorderY + fSingleY,
+ fBorderX + fSingleX,
+ -fBorderY)));
+
+ // TopRight
+ xRetval[2] = Primitive2DReference(
+ new BitmapPrimitive2D(
+ getDiscreteShadow().getTopRight(),
+ basegfx::tools::createScaleTranslateB2DHomMatrix(
+ fBigLenX,
+ fBigLenY,
+ 1.0 - fBorderX,
+ -fBorderY)));
+
+ // Right
+ xRetval[3] = Primitive2DReference(
+ new BitmapPrimitive2D(
+ getDiscreteShadow().getRight(),
+ basegfx::tools::createScaleTranslateB2DHomMatrix(
+ fBorderX + fSingleX,
+ 1.0 - (2.0 * fBorderY) - fSingleY,
+ 1.0,
+ fBorderY + fSingleY)));
+
+ // BottomRight
+ xRetval[4] = Primitive2DReference(
+ new BitmapPrimitive2D(
+ getDiscreteShadow().getBottomRight(),
+ basegfx::tools::createScaleTranslateB2DHomMatrix(
+ fBigLenX,
+ fBigLenY,
+ 1.0 - fBorderX,
+ 1.0 - fBorderY)));
+
+ // Bottom
+ xRetval[5] = Primitive2DReference(
+ new BitmapPrimitive2D(
+ getDiscreteShadow().getBottom(),
+ basegfx::tools::createScaleTranslateB2DHomMatrix(
+ 1.0 - (2.0 * fBorderX) - fSingleX,
+ fBorderY + fSingleY,
+ fBorderX + fSingleX,
+ 1.0)));
+
+ // BottomLeft
+ xRetval[6] = Primitive2DReference(
+ new BitmapPrimitive2D(
+ getDiscreteShadow().getBottomLeft(),
+ basegfx::tools::createScaleTranslateB2DHomMatrix(
+ fBigLenX,
+ fBigLenY,
+ -fBorderX,
+ 1.0 - fBorderY)));
+
+ // Left
+ xRetval[7] = Primitive2DReference(
+ new BitmapPrimitive2D(
+ getDiscreteShadow().getLeft(),
+ basegfx::tools::createScaleTranslateB2DHomMatrix(
+ fBorderX + fSingleX,
+ 1.0 - (2.0 * fBorderY) - fSingleY,
+ -fBorderX,
+ fBorderY + fSingleY)));
+
+ // put all in object transformation to get to target positions
+ const Primitive2DReference xTransformed(
+ new TransformPrimitive2D(
+ getTransform(),
+ xRetval));
+
+ xRetval = Primitive2DSequence(&xTransformed, 1);
+ }
+
+ return xRetval;
+ }
+
+ DiscreteShadowPrimitive2D::DiscreteShadowPrimitive2D(
+ const basegfx::B2DHomMatrix& rTransform,
+ const DiscreteShadow& rDiscreteShadow)
+ : DiscreteMetricDependentPrimitive2D(),
+ maTransform(rTransform),
+ maDiscreteShadow(rDiscreteShadow)
+ {
+ }
+
+ bool DiscreteShadowPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
+ {
+ if(DiscreteMetricDependentPrimitive2D::operator==(rPrimitive))
+ {
+ const DiscreteShadowPrimitive2D& rCompare = (DiscreteShadowPrimitive2D&)rPrimitive;
+
+ return (getTransform() == rCompare.getTransform()
+ && getDiscreteShadow() == rCompare.getDiscreteShadow());
+ }
+
+ return false;
+ }
+
+ basegfx::B2DRange DiscreteShadowPrimitive2D::getB2DRange(const geometry::ViewInformation2D& rViewInformation) const
+ {
+ if(getDiscreteShadow().getBitmapEx().IsEmpty())
+ {
+ // no graphics without valid bitmap definition
+ return basegfx::B2DRange();
+ }
+ else
+ {
+ // prepare normal objectrange
+ basegfx::B2DRange aRetval(0.0, 0.0, 1.0, 1.0);
+ aRetval.transform(getTransform());
+
+ // extract discrete shadow size and grow
+ const basegfx::B2DVector aScale(rViewInformation.getViewTransformation() * basegfx::B2DVector(1.0, 1.0));
+ const sal_Int32 nQuarter((getDiscreteShadow().getBitmapEx().GetSizePixel().Width() - 3) >> 2);
+ const double fGrowX((1.0 / aScale.getX()) * nQuarter);
+ const double fGrowY((1.0 / aScale.getY()) * nQuarter);
+ aRetval.grow(std::max(fGrowX, fGrowY));
+
+ return aRetval;
+ }
+ }
+
+ // provide unique ID
+ ImplPrimitrive2DIDBlock(DiscreteShadowPrimitive2D, PRIMITIVE2D_ID_DISCRETESHADOWPRIMITIVE2D)
+
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/drawinglayer/source/primitive2d/makefile.mk b/drawinglayer/source/primitive2d/makefile.mk
index bca5805ae6eb..720769a0efd5 100644
--- a/drawinglayer/source/primitive2d/makefile.mk
+++ b/drawinglayer/source/primitive2d/makefile.mk
@@ -46,6 +46,7 @@ SLOFILES= \
$(SLO)$/chartprimitive2d.obj \
$(SLO)$/controlprimitive2d.obj \
$(SLO)$/discretebitmapprimitive2d.obj \
+ $(SLO)$/discreteshadowprimitive2d.obj \
$(SLO)$/embedded3dprimitive2d.obj \
$(SLO)$/epsprimitive2d.obj \
$(SLO)$/fillbitmapprimitive2d.obj \
diff --git a/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx b/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
index db61e0721ef0..80e34ba27701 100644
--- a/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
+++ b/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
@@ -85,9 +85,13 @@ namespace drawinglayer
}
// prepare dest coor
+ const sal_uInt32 nDiscreteWidth(basegfx::fround(aOutlineRange.getMaxX()));
+ const sal_uInt32 nDiscreteHeight(basegfx::fround(aOutlineRange.getMaxY()));
const Rectangle aDestRectPixel(
- basegfx::fround(aOutlineRange.getMinX()), basegfx::fround(aOutlineRange.getMinY()),
- basegfx::fround(aOutlineRange.getMaxX()), basegfx::fround(aOutlineRange.getMaxY()));
+ basegfx::fround(aOutlineRange.getMinX()),
+ basegfx::fround(aOutlineRange.getMinY()),
+ nDiscreteWidth > 0 ? nDiscreteWidth - 1 : 0,
+ nDiscreteHeight > 0 ? nDiscreteHeight - 1 : 0);
// paint it using GraphicManager
Graphic aGraphic(rBitmapEx);
@@ -106,9 +110,13 @@ namespace drawinglayer
// prepare dest coor. Necessary to expand since vcl's DrawBitmapEx draws one pix less
basegfx::B2DRange aOutlineRange(0.0, 0.0, 1.0, 1.0);
aOutlineRange.transform(rTransform);
+ const sal_uInt32 nDiscreteWidth(basegfx::fround(aOutlineRange.getMaxX()));
+ const sal_uInt32 nDiscreteHeight(basegfx::fround(aOutlineRange.getMaxY()));
const Rectangle aDestRectPixel(
- basegfx::fround(aOutlineRange.getMinX()), basegfx::fround(aOutlineRange.getMinY()),
- basegfx::fround(aOutlineRange.getMaxX()), basegfx::fround(aOutlineRange.getMaxY()));
+ basegfx::fround(aOutlineRange.getMinX()),
+ basegfx::fround(aOutlineRange.getMinY()),
+ nDiscreteWidth > 0 ? nDiscreteWidth - 1 : 0,
+ nDiscreteHeight > 0 ? nDiscreteHeight - 1 : 0);
// decompose matrix to check for shear, rotate and mirroring
basegfx::B2DVector aScale, aTranslate;
@@ -145,9 +153,13 @@ namespace drawinglayer
// process self with free transformation (containing shear and rotate). Get dest rect in pixels.
basegfx::B2DRange aOutlineRange(0.0, 0.0, 1.0, 1.0);
aOutlineRange.transform(rTransform);
+ const sal_uInt32 nDiscreteWidth(basegfx::fround(aOutlineRange.getMaxX()));
+ const sal_uInt32 nDiscreteHeight(basegfx::fround(aOutlineRange.getMaxY()));
const Rectangle aDestRectLogic(
- basegfx::fround(aOutlineRange.getMinX()), basegfx::fround(aOutlineRange.getMinY()),
- basegfx::fround(aOutlineRange.getMaxX()), basegfx::fround(aOutlineRange.getMaxY()));
+ basegfx::fround(aOutlineRange.getMinX()),
+ basegfx::fround(aOutlineRange.getMinY()),
+ nDiscreteWidth > 0 ? nDiscreteWidth - 1 : 0,
+ nDiscreteHeight > 0 ? nDiscreteHeight - 1 : 0);
const Rectangle aDestRectPixel(rOutDev.LogicToPixel(aDestRectLogic));
// #i96708# check if Metafile is recorded
@@ -161,18 +173,19 @@ namespace drawinglayer
if(!aCroppedRectPixel.IsEmpty())
{
- // as maximum for destination, orientate at SourceSizePixel, but
+ // as maximum for destination, orientate at aOutputRectPixel, but
// take a rotation of 45 degrees (sqrt(2)) as maximum expansion into account
const Size aSourceSizePixel(rBitmapEx.GetSizePixel());
const double fMaximumArea(
- (double)aSourceSizePixel.getWidth() *
- (double)aSourceSizePixel.getHeight() *
+ (double)aOutputRectPixel.getWidth() *
+ (double)aOutputRectPixel.getHeight() *
1.4142136); // 1.4142136 taken as sqrt(2.0)
// test if discrete view size (pixel) maybe too big and limit it
const double fArea(aCroppedRectPixel.getWidth() * aCroppedRectPixel.getHeight());
const bool bNeedToReduce(fArea > fMaximumArea);
double fReduceFactor(1.0);
+ const Size aDestSizePixel(aCroppedRectPixel.GetSize());
if(bNeedToReduce)
{
@@ -219,11 +232,6 @@ namespace drawinglayer
if(bNeedToReduce)
{
// paint in target size
- const double fFactor(1.0 / fReduceFactor);
- const Size aDestSizePixel(
- basegfx::fround(aCroppedRectPixel.getWidth() * fFactor),
- basegfx::fround(aCroppedRectPixel.getHeight() * fFactor));
-
if(bRecordToMetaFile)
{
rOutDev.DrawBitmapEx(
diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index a1d4a66b8fb1..81e211988a09 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -266,10 +266,6 @@ EditCharAttribEscapement::EditCharAttribEscapement( const SvxEscapementItem& rAt
DBG_ASSERT( rAttr.Which() == EE_CHAR_ESCAPEMENT, "Kein Escapementattribut!" );
}
-#if defined( WIN ) && !defined( WNT )
-#pragma optimize ("", off)
-#endif
-
void EditCharAttribEscapement::SetFont( SvxFont& rFont, OutputDevice* )
{
USHORT nProp = ((const SvxEscapementItem*)GetItem())->GetProp();
@@ -283,11 +279,6 @@ void EditCharAttribEscapement::SetFont( SvxFont& rFont, OutputDevice* )
rFont.SetEscapement( nEsc );
}
-#if defined( WIN ) && !defined( WNT )
-#pragma optimize ("", on)
-#endif
-
-
// -------------------------------------------------------------------------
// class EditCharAttribOutline
// -------------------------------------------------------------------------
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 482cd6d71338..5a54c054016b 100755..100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1458,7 +1458,11 @@ Reference< XSpellChecker1 > ImpEditEngine::GetSpeller()
SpellInfo * ImpEditEngine::CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs )
{
- pSpellInfo = new SpellInfo;
+ if (!pSpellInfo)
+ pSpellInfo = new SpellInfo;
+ else
+ *pSpellInfo = SpellInfo(); // reset to default values
+
pSpellInfo->bMultipleDoc = bMultipleDocs;
EditSelection aSentenceSel( SelectSentence( rSel ) );
// pSpellInfo->aSpellStart = CreateEPaM( aSentenceSel.Min() );
@@ -2023,7 +2027,6 @@ bool ImpEditEngine::SpellSentence(EditView& rEditView,
#else
bool bRet = false;
EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() );
- //the pSpellInfo has to be created on demand
if(!pSpellInfo)
pSpellInfo = CreateSpellInfo( aCurSel, true );
pSpellInfo->aCurSentenceStart = aCurSel.Min();
@@ -2191,8 +2194,12 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
{
#ifdef SVX_LIGHT
#else
+ // Note: rNewPortions.size() == 0 is valid and happens when the whole
+ // sentence got removed in the dialog
+
DBG_ASSERT(pSpellInfo, "pSpellInfo not initialized");
- if(pSpellInfo)
+ if (pSpellInfo &&
+ pSpellInfo->aLastSpellPortions.size() > 0) // no portions -> no text to be changed
{
// get current paragraph length to calculate later on how the sentence length changed,
// in order to place the cursor at the end of the sentence again
@@ -2202,6 +2209,10 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
UndoActionStart( EDITUNDO_INSERT );
if(pSpellInfo->aLastSpellPortions.size() == rNewPortions.size())
{
+ DBG_ASSERT( rNewPortions.size() > 0, "rNewPortions should not be empty here" );
+ DBG_ASSERT( pSpellInfo->aLastSpellPortions.size() == pSpellInfo->aLastSpellContentSelections.size(),
+ "aLastSpellPortions and aLastSpellContentSelections size mismatch" );
+
//the simple case: the same number of elements on both sides
//each changed element has to be applied to the corresponding source element
svx::SpellPortions::const_iterator aCurrentNewPortion = rNewPortions.end();
@@ -2252,6 +2263,8 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
}
else
{
+ DBG_ASSERT( pSpellInfo->aLastSpellContentSelections.size() > 0, "aLastSpellContentSelections should not be empty here" );
+
//select the complete sentence
SpellContentSelections::const_iterator aCurrentEndPosition = pSpellInfo->aLastSpellContentSelections.end();
--aCurrentEndPosition;
diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx
index 2bc219e9b69c..61e4a5253ced 100644
--- a/editeng/source/misc/txtrange.cxx
+++ b/editeng/source/misc/txtrange.cxx
@@ -45,10 +45,6 @@
|*
*************************************************************************/
-#ifdef WIN
-#pragma optimize ( "", off )
-#endif
-
TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon,
USHORT nCacheSz, USHORT nLft, USHORT nRght, BOOL bSimpl, BOOL bInnr,
BOOL bVert ) :
@@ -97,10 +93,6 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const baseg
mpLinePolyPolygon = NULL;
}
-#ifdef WIN
-#pragma optimize ( "", on )
-#endif
-
/*************************************************************************
|*
|* TextRanger::~TextRanger()
diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx
index c518dc37e94c..99312cdfde23 100644
--- a/extensions/source/config/ldap/ldapaccess.cxx
+++ b/extensions/source/config/ldap/ldapaccess.cxx
@@ -279,7 +279,7 @@ void LdapConnection::loadModule()
{
if ( !s_Ldap_Module )
{
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
# define LIBLDAP "nsldap32v50.dll"
#else
# ifdef WITH_OPENLDAP
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index ea9377ccf596..89cb5625bca3 100644..100755
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -69,6 +69,7 @@ using namespace boost;
using namespace osl;
using namespace rtl;
using namespace cppu;
+using namespace com::sun::star::script;
using namespace com::sun::star::lang;
using namespace com::sun::star::bridge;
using namespace com::sun::star::bridge::oleautomation;
@@ -108,7 +109,7 @@ IUnknownWrapper_Impl::IUnknownWrapper_Impl( Reference<XMultiServiceFactory>& xFa
sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass):
UnoConversionUtilities<IUnknownWrapper_Impl>( xFactory, unoWrapperClass, comWrapperClass),
m_pxIdlClass( NULL), m_eJScript( JScriptUndefined),
- m_bComTlbIndexInit(false)
+ m_bComTlbIndexInit(false), m_bHasDfltMethod(false), m_bHasDfltProperty(false)
{
}
@@ -147,17 +148,15 @@ IUnknownWrapper_Impl::~IUnknownWrapper_Impl()
Any IUnknownWrapper_Impl::queryInterface(const Type& t)
throw (RuntimeException)
{
- if (t == getCppuType(static_cast<Reference<XInvocation>*>( 0)))
- {
- if (m_spDispatch)
- return WeakImplHelper4<XInvocation, XBridgeSupplier2,
- XInitialization, XAutomationObject>::queryInterface(t);
- else
- return Any();
- }
-
- return WeakImplHelper4<XInvocation, XBridgeSupplier2,
- XInitialization, XAutomationObject>::queryInterface(t);
+ if (t == getCppuType(static_cast<Reference<XDefaultMethod>*>( 0)) && !m_bHasDfltMethod )
+ return Any();
+ if (t == getCppuType(static_cast<Reference<XDefaultProperty>*>( 0)) && !m_bHasDfltProperty )
+ return Any();
+ if (t == getCppuType(static_cast<Reference<XInvocation>*>( 0)) && !m_spDispatch)
+ return Any();
+
+ return WeakImplHelper6<XInvocation, XBridgeSupplier2,
+ XInitialization, XAutomationObject, XDefaultProperty, XDefaultMethod>::queryInterface(t);
}
Reference<XIntrospectionAccess> SAL_CALL IUnknownWrapper_Impl::getIntrospection(void)
@@ -1194,6 +1193,68 @@ void SAL_CALL IUnknownWrapper_Impl::initialize( const Sequence< Any >& aArgument
aArguments[1] >>= m_bOriginalDispatch;
aArguments[2] >>= m_seqTypes;
+
+ ITypeInfo* pType = NULL;
+ try
+ {
+ // a COM object implementation that has no TypeInfo is still a legal COM object;
+ // such objects can at least be transported through UNO using the bridge
+ // so we should allow to create wrappers for them as well
+ pType = getTypeInfo();
+ }
+ catch( BridgeRuntimeError& )
+ {}
+ catch( Exception& )
+ {}
+
+ if ( pType )
+ {
+ try
+ {
+ // Get Default member
+ CComBSTR defaultMemberName;
+ if ( SUCCEEDED( pType->GetDocumentation(0, &defaultMemberName, 0, 0, 0 ) ) )
+ {
+ OUString usName(reinterpret_cast<const sal_Unicode*>(LPCOLESTR(defaultMemberName)));
+ FuncDesc aDescGet(pType);
+ FuncDesc aDescPut(pType);
+ VarDesc aVarDesc(pType);
+ // see if this is a property first ( more likely to be a property then a method )
+ getPropDesc( usName, & aDescGet, & aDescPut, & aVarDesc);
+
+ if ( !aDescGet && !aDescPut )
+ {
+ getFuncDesc( usName, &aDescGet );
+ if ( !aDescGet )
+ throw BridgeRuntimeError( OUSTR("[automation bridge]IUnknownWrapper_Impl::initialize() Failed to get Function or Property desc. for " ) + usName );
+ }
+ // now for some funny heuristics to make basic understand what to do
+ // a single aDescGet ( that doesn't take any params ) would be
+ // a read only ( defaultmember ) property e.g. this object
+ // should implement XDefaultProperty
+ // a single aDescGet ( that *does* ) take params is basically a
+ // default method e.g. implement XDefaultMethod
+
+ // a DescPut ( I guess we only really support a default param with '1' param ) as a setValue ( but I guess we can leave it through, the object will fail if we don't get it right anyway )
+ if ( aDescPut || ( aDescGet && aDescGet->cParams == 0 ) )
+ m_bHasDfltProperty = true;
+ if ( aDescGet->cParams > 0 )
+ m_bHasDfltMethod = true;
+ if ( m_bHasDfltProperty || m_bHasDfltMethod )
+ m_sDefaultMember = usName;
+ }
+ }
+ catch ( BridgeRuntimeError & e )
+ {
+ throw RuntimeException( e.message, Reference<XInterface>() );
+ }
+ catch( Exception& e )
+ {
+ throw RuntimeException(
+ OUSTR("[automation bridge] unexpected exception in IUnknownWrapper_Impl::initialiase() error message: \n") + e.Message,
+ Reference<XInterface>() );
+ }
+ }
}
// UnoConversionUtilities --------------------------------------------------------------------------------
@@ -1445,6 +1506,9 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(const OUString& sFuncName,
arDispidNamedArgs.reset(new DISPID[nSizeAr]);
HRESULT hr = getTypeInfo()->GetIDsOfNames(arNames, nSizeAr,
arDispidNamedArgs.get());
+ if ( hr == E_NOTIMPL )
+ hr = m_spDispatch->GetIDsOfNames(IID_NULL, arNames, nSizeAr, LOCALE_USER_DEFAULT, arDispidNamedArgs.get() );
+
if (hr == S_OK)
{
// In a "property put" operation, the property value is a named param with the
diff --git a/extensions/source/ole/oleobjw.hxx b/extensions/source/ole/oleobjw.hxx
index 230de2b7dcf8..b990ac3af17d 100644
--- a/extensions/source/ole/oleobjw.hxx
+++ b/extensions/source/ole/oleobjw.hxx
@@ -50,11 +50,14 @@
#endif
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase6.hxx>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/bridge/oleautomation/XAutomationObject.hpp>
#include <rtl/ustring.hxx>
+#include <com/sun/star/script/XDefaultProperty.hpp>
+#include <com/sun/star/script/XDefaultMethod.hpp>
#include <typelib/typedescription.hxx>
#include "unoconversionutilities.hxx"
@@ -78,7 +81,8 @@ typedef hash_multimap<OUString, unsigned int, hashOUString_Impl, equalOUString_I
// This class wraps an IDispatch and maps XInvocation calls to IDispatch calls on the wrapped object.
// If m_TypeDescription is set then this class represents an UNO interface implemented in a COM component.
// The interface is not a real interface in terms of an abstract class but is realized through IDispatch.
-class IUnknownWrapper_Impl : public WeakImplHelper4<XInvocation, XBridgeSupplier2, XInitialization, XAutomationObject>,
+class IUnknownWrapper_Impl : public WeakImplHelper6<XInvocation, XBridgeSupplier2, XInitialization, XAutomationObject, XDefaultProperty, XDefaultMethod>,
+
public UnoConversionUtilities<IUnknownWrapper_Impl>
{
@@ -126,7 +130,9 @@ public:
// XInitialization
virtual void SAL_CALL initialize( const Sequence< Any >& aArguments )
throw(Exception, RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (::com::sun::star::uno::RuntimeException) { return m_sDefaultMember; }
protected:
+ virtual ::rtl::OUString SAL_CALL getDefaultMethodName( ) throw (::com::sun::star::uno::RuntimeException) { return m_sDefaultMember; }
// ----------------------------------------------------------------------------
virtual Any invokeWithDispIdUnoTlb(const OUString& sFunctionName,
@@ -253,6 +259,9 @@ protected:
bool m_bComTlbIndexInit;
// Keeps the ITypeInfo obtained from IDispatch::GetTypeInfo
CComPtr< ITypeInfo > m_spTypeInfo;
+ rtl::OUString m_sDefaultMember;
+ bool m_bHasDfltMethod;
+ bool m_bHasDfltProperty;
};
} // end namespace
diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx
index 9eb47166ca82..da95b9950427 100644
--- a/extensions/source/ole/unoconversionutilities.hxx
+++ b/extensions/source/ole/unoconversionutilities.hxx
@@ -1324,33 +1324,47 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq)
typelib_TypeDescription* pSeqElementDesc= NULL;
TYPELIB_DANGER_GET( &pSeqElementDesc, pSeqElementTypeRef);
- sal_Int32 nElementSize= pSeqElementDesc->nSize;
- n= punoSeq->nElements;
- SAFEARRAYBOUND rgsabound[1];
- rgsabound[0].lLbound = 0;
- rgsabound[0].cElements = n;
- VARIANT oleElement;
- long safeI[1];
+ // try to find VARIANT type that is related to the UNO type of the sequence elements
+ // the sequence as a sequence element should be handled in a special way
+ VARTYPE eTargetElementType = VT_EMPTY;
+ if ( pSeqElementDesc->eTypeClass != TypeClass_SEQUENCE )
+ eTargetElementType = mapTypeClassToVartype( static_cast< TypeClass >( pSeqElementDesc->eTypeClass ) );
- pArray = SafeArrayCreate(VT_VARIANT, 1, rgsabound);
+ if ( eTargetElementType != VT_EMPTY )
+ pArray = createUnoSequenceWrapper( rSeq, eTargetElementType );
- Any unoElement;
- // sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq->pElements;
- sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq->elements;
-
- for (sal_uInt32 i = 0; i < n; i++)
+ if ( !pArray )
{
- unoElement.setValue( pSeqData + i * nElementSize, pSeqElementDesc);
- VariantInit(&oleElement);
+ sal_Int32 nElementSize= pSeqElementDesc->nSize;
+ n= punoSeq->nElements;
+
+ SAFEARRAYBOUND rgsabound[1];
+ rgsabound[0].lLbound = 0;
+ rgsabound[0].cElements = n;
+ VARIANT oleElement;
+ long safeI[1];
+
+ pArray = SafeArrayCreate(VT_VARIANT, 1, rgsabound);
+
+ Any unoElement;
+ // sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq->pElements;
+ sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq->elements;
- anyToVariant(&oleElement, unoElement);
+ for (sal_uInt32 i = 0; i < n; i++)
+ {
+ unoElement.setValue( pSeqData + i * nElementSize, pSeqElementDesc);
+ VariantInit(&oleElement);
+
+ anyToVariant(&oleElement, unoElement);
- safeI[0] = i;
- SafeArrayPutElement(pArray, safeI, &oleElement);
+ safeI[0] = i;
+ SafeArrayPutElement(pArray, safeI, &oleElement);
- VariantClear(&oleElement);
+ VariantClear(&oleElement);
+ }
}
+
TYPELIB_DANGER_RELEASE( pSeqElementDesc);
return pArray;
diff --git a/extensions/source/plugin/inc/plugin/unx/mediator.hxx b/extensions/source/plugin/inc/plugin/unx/mediator.hxx
index 68619db54cad..e1a7f59b5dee 100644
--- a/extensions/source/plugin/inc/plugin/unx/mediator.hxx
+++ b/extensions/source/plugin/inc/plugin/unx/mediator.hxx
@@ -90,10 +90,10 @@ protected:
int m_nSocket;
std::vector<MediatorMessage*> m_aMessageQueue;
- NAMESPACE_VOS(OMutex) m_aQueueMutex;
- NAMESPACE_VOS(OMutex) m_aSendMutex;
+ vos::OMutex m_aQueueMutex;
+ vos::OMutex m_aSendMutex;
// only one thread can send a message at any given time
- NAMESPACE_VOS(OCondition) m_aNewMessageCdtn;
+ vos::OCondition m_aNewMessageCdtn;
MediatorListener* m_pListener;
// thread to fill the queue
@@ -150,7 +150,7 @@ public:
}
};
-class MediatorListener : public NAMESPACE_VOS( OThread )
+class MediatorListener : public vos:: OThread
{
friend class Mediator;
private:
diff --git a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
index 9044a14a9cbc..694fab30801a 100644
--- a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
+++ b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
@@ -166,7 +166,7 @@ public:
class PluginConnector : public Mediator
{
protected:
- NAMESPACE_VOS(OMutex) m_aUserEventMutex;
+ vos::OMutex m_aUserEventMutex;
static std::vector<PluginConnector*> allConnectors;
diff --git a/extensions/source/plugin/unx/mediator.cxx b/extensions/source/plugin/unx/mediator.cxx
index 6191fa5e897a..9ecf0f48d9f8 100644
--- a/extensions/source/plugin/unx/mediator.cxx
+++ b/extensions/source/plugin/unx/mediator.cxx
@@ -80,7 +80,7 @@ ULONG Mediator::SendMessage( ULONG nBytes, const char* pBytes, ULONG nMessageID
if( ! m_pListener )
return 0;
- NAMESPACE_VOS(OGuard) aGuard( m_aSendMutex );
+ vos::OGuard aGuard( m_aSendMutex );
if( ! nMessageID )
nMessageID = m_nCurrentID;
@@ -132,7 +132,7 @@ MediatorMessage* Mediator::WaitForAnswer( ULONG nMessageID )
while( m_pListener )
{
{
- NAMESPACE_VOS(OGuard) aGuard( m_aQueueMutex );
+ vos::OGuard aGuard( m_aQueueMutex );
for( size_t i = 0; i < m_aMessageQueue.size(); i++ )
{
MediatorMessage* pMessage = m_aMessageQueue[ i ];
@@ -157,7 +157,7 @@ MediatorMessage* Mediator::GetNextMessage( BOOL bWait )
{
// guard must be after WaitForMessage, else the listener
// cannot insert a new one -> deadlock
- NAMESPACE_VOS(OGuard) aGuard( m_aQueueMutex );
+ vos::OGuard aGuard( m_aQueueMutex );
for( size_t i = 0; i < m_aMessageQueue.size(); i++ )
{
MediatorMessage* pMessage = m_aMessageQueue[ i ];
@@ -207,7 +207,7 @@ void MediatorListener::run()
{
::vos::OGuard aMyGuard( m_aMutex );
{
- NAMESPACE_VOS(OGuard)
+ vos::OGuard
aGuard( m_pMediator->m_aQueueMutex );
MediatorMessage* pMessage =
new MediatorMessage( nHeader[ 0 ], nHeader[ 1 ], pBuffer );
diff --git a/extensions/source/plugin/unx/nppapi.cxx b/extensions/source/plugin/unx/nppapi.cxx
index 6dc1b7a30407..ea0f34241a1e 100644
--- a/extensions/source/plugin/unx/nppapi.cxx
+++ b/extensions/source/plugin/unx/nppapi.cxx
@@ -27,7 +27,7 @@ PluginConnector::PluginConnector( int nSocket ) :
PluginConnector::~PluginConnector()
{
- NAMESPACE_VOS(OGuard) aGuard( m_aUserEventMutex );
+ vos::OGuard aGuard( m_aUserEventMutex );
for( std::vector< PluginConnector* >::iterator it = allConnectors.begin();
it != allConnectors.end(); ++it )
{
@@ -41,7 +41,7 @@ PluginConnector::~PluginConnector()
IMPL_LINK( PluginConnector, NewMessageHdl, Mediator*, /*pMediator*/ )
{
- NAMESPACE_VOS(OGuard) aGuard( m_aUserEventMutex );
+ vos::OGuard aGuard( m_aUserEventMutex );
bool bFound = false;
for( std::vector< PluginConnector* >::iterator it = allConnectors.begin();
it != allConnectors.end() && bFound == false; ++it )
@@ -68,7 +68,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
return 0;
/*
{
- NAMESPACE_VOS(OGuard) aGuard( m_aUserEventMutex );
+ vos::OGuard aGuard( m_aUserEventMutex );
m_aUserEventIDs.pop_front();
}
*/
diff --git a/extensions/source/plugin/unx/plugcon.cxx b/extensions/source/plugin/unx/plugcon.cxx
index 74d8fa8bd2da..8e0183ab8c81 100644
--- a/extensions/source/plugin/unx/plugcon.cxx
+++ b/extensions/source/plugin/unx/plugcon.cxx
@@ -172,7 +172,7 @@ MediatorMessage* PluginConnector::WaitForAnswer( ULONG nMessageID )
while( m_pListener )
{
{
- NAMESPACE_VOS(OGuard) aGuard( m_aQueueMutex );
+ vos::OGuard aGuard( m_aQueueMutex );
for( size_t i = 0; i < m_aMessageQueue.size(); i++ )
{
MediatorMessage* pMessage = m_aMessageQueue[ i ];
diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx
index d779065c58cd..f245cc95d1f6 100644
--- a/extensions/source/scanner/scanwin.cxx
+++ b/extensions/source/scanner/scanwin.cxx
@@ -74,10 +74,7 @@ using namespace ::com::sun::star;
#define FIXTODOUBLE( nFix ) ((double)nFix.Whole+(double)nFix.Frac/65536.)
#define FIXTOLONG( nFix ) ((long)floor(FIXTODOUBLE(nFix)+0.5))
-#if defined WIN
-#define TWAIN_LIBNAME "TWAIN.DLL"
-#define TWAIN_FUNCNAME "DSM_Entry"
-#elif defined WNT
+#if defined WNT
#define TWAIN_LIBNAME "TWAIN_32.DLL"
#define TWAIN_FUNCNAME "DSM_Entry"
#endif
@@ -109,7 +106,7 @@ class ImpTwain : public ::cppu::WeakImplHelper1< util::XCloseListener >
TW_IDENTITY aSrcIdent;
Link aNotifyLink;
DSMENTRYPROC pDSM;
- NAMESPACE_VOS( OModule )* pMod;
+ vos:: OModule * pMod;
ULONG nCurState;
HWND hTwainWnd;
HHOOK hTwainHook;
diff --git a/extensions/source/scanner/twain.cxx b/extensions/source/scanner/twain.cxx
index b11f2725501e..d0fcaf411d6a 100644
--- a/extensions/source/scanner/twain.cxx
+++ b/extensions/source/scanner/twain.cxx
@@ -31,7 +31,7 @@
#include <string.h>
#include <math.h>
-#if defined( WNT ) || defined (WIN)
+#if defined( WNT )
#include <tools/svwin.h>
#endif
#ifdef OS2
@@ -52,10 +52,7 @@
#define FIXTODOUBLE( nFix ) ((double)nFix.Whole+(double)nFix.Frac/65536.)
#define FIXTOLONG( nFix ) ((long)floor(FIXTODOUBLE(nFix)+0.5))
-#if defined WIN
-#define TWAIN_LIBNAME "TWAIN.DLL"
-#define TWAIN_FUNCNAME "DSM_Entry"
-#elif defined WNT
+#if defined WNT
#define TWAIN_LIBNAME "TWAIN_32.DLL"
#define TWAIN_FUNCNAME "DSM_Entry"
#elif defined OS2
@@ -242,7 +239,7 @@ void ImpTwain::ImplOpenSourceManager()
{
if( 1 == nCurState )
{
- pMod = new NAMESPACE_VOS( OModule )();
+ pMod = new vos:: OModule ();
if( pMod->load( TWAIN_LIBNAME ) )
{
diff --git a/extensions/source/scanner/twain.hxx b/extensions/source/scanner/twain.hxx
index 7599f86d7813..6f4605f5f796 100644
--- a/extensions/source/scanner/twain.hxx
+++ b/extensions/source/scanner/twain.hxx
@@ -57,7 +57,7 @@ class ImpTwain
Link aNotifyLink;
Bitmap aBitmap;
DSMENTRYPROC pDSM;
- NAMESPACE_VOS( OModule )* pMod;
+ vos:: OModule * pMod;
ULONG nCurState;
void ImplCreate();
diff --git a/extensions/test/stm/datatest.cxx b/extensions/test/stm/datatest.cxx
index c562d8c68210..971743ccd6b5 100644
--- a/extensions/test/stm/datatest.cxx
+++ b/extensions/test/stm/datatest.cxx
@@ -53,10 +53,8 @@
#include "testfactreg.hxx"
-#ifndef _VOS_NO_NAMESPACE
using namespace vos;
using namespace usr;
-#endif
#define DATASTREAM_TEST_MAX_HANDLE 1
diff --git a/extensions/test/stm/marktest.cxx b/extensions/test/stm/marktest.cxx
index 019de72cf46c..6ddd552a6ad0 100644
--- a/extensions/test/stm/marktest.cxx
+++ b/extensions/test/stm/marktest.cxx
@@ -50,12 +50,8 @@
#include "testfactreg.hxx"
-#ifndef _VOS_NO_NAMESPACE
using namespace vos;
using namespace usr;
-#endif
-
-
class OMarkableOutputStreamTest :
public XSimpleTest,
diff --git a/extensions/test/stm/pipetest.cxx b/extensions/test/stm/pipetest.cxx
index 39eb73b3c591..b38cafd2952f 100644
--- a/extensions/test/stm/pipetest.cxx
+++ b/extensions/test/stm/pipetest.cxx
@@ -48,10 +48,8 @@
#define IMPLEMENTATION_NAME L"test.com.sun.star.comp.extensions.stm.Pipe"
#define SERVICE_NAME L"test.com.sun.star.io.Pipe"
-#ifndef _VOS_NO_NAMESPACE
using namespace vos;
using namespace usr;
-#endif
class WriteToStreamThread :
public OThread
diff --git a/extensions/test/stm/testfactreg.cxx b/extensions/test/stm/testfactreg.cxx
index 815331dd6038..698404f9d61b 100644
--- a/extensions/test/stm/testfactreg.cxx
+++ b/extensions/test/stm/testfactreg.cxx
@@ -35,10 +35,8 @@
#include "testfactreg.hxx"
-#ifndef _VOS_NO_NAMESPACE
using namespace vos;
using namespace usr;
-#endif
#ifdef __cplusplus
extern "C"
diff --git a/extensions/workben/testpgp.cxx b/extensions/workben/testpgp.cxx
index f84156f96b3d..00337f79a3b7 100644
--- a/extensions/workben/testpgp.cxx
+++ b/extensions/workben/testpgp.cxx
@@ -555,7 +555,7 @@ BOOL install (
String aModule ("module://");
char pBuffer[1024];
- NAMESPACE_VOS(ORealDynamicLoader)::computeModuleName (
+ vos::ORealDynamicLoader::computeModuleName (
prefix, pBuffer, sizeof(pBuffer));
aModule += pBuffer;
@@ -573,7 +573,7 @@ BOOL uninstall (
String aModule ("module://");
char pBuffer[1024];
- NAMESPACE_VOS(ORealDynamicLoader)::computeModuleName (
+ vos::ORealDynamicLoader::computeModuleName (
prefix, pBuffer, sizeof(pBuffer));
aModule += pBuffer;
diff --git a/extras/source/wordbook/standard.dic b/extras/source/wordbook/standard.dic
index 7eadfdb77c7c..5b8b235b5dd0 100644
--- a/extras/source/wordbook/standard.dic
+++ b/extras/source/wordbook/standard.dic
Binary files differ
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
index 93f9f5ec0b15..349f0a8bd7ba 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -599,31 +599,3 @@ extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara )
return bRet;
}
-// ------------------------------------------------------------------------
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0;
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-// ------------------------------------------------------------------------
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx
index 5ef86b9c1b98..8e8d03a22561 100644
--- a/filter/source/graphicfilter/eos2met/eos2met.cxx
+++ b/filter/source/graphicfilter/eos2met/eos2met.cxx
@@ -2620,29 +2620,3 @@ extern "C" BOOL SAL_CALL DoExportDialog( FltCallDialogParameter& rPara )
return bRet;
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/epbm/epbm.cxx b/filter/source/graphicfilter/epbm/epbm.cxx
index fe8dc77fc704..8786f2983a56 100644
--- a/filter/source/graphicfilter/epbm/epbm.cxx
+++ b/filter/source/graphicfilter/epbm/epbm.cxx
@@ -240,33 +240,3 @@ extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara )
return bRet;
}
-// ------------------------------------------------------------------------
-#ifndef GCC
-#endif
-
-// ---------------
-// - Win16 trash -
-// ---------------
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0;
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
- if ( nHeap )
- UnlockData( 0 );
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-// ------------------------------------------------------------------------
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/epgm/epgm.cxx b/filter/source/graphicfilter/epgm/epgm.cxx
index 89fbc9929ab0..93da8ff48b7a 100644
--- a/filter/source/graphicfilter/epgm/epgm.cxx
+++ b/filter/source/graphicfilter/epgm/epgm.cxx
@@ -265,33 +265,3 @@ extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara )
return bRet;
}
-// ------------------------------------------------------------------------
-#ifndef GCC
-#endif
-
-// ---------------
-// - Win16 trash -
-// ---------------
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0;
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
- if ( nHeap )
- UnlockData( 0 );
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-// ------------------------------------------------------------------------
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx
index 7e81077e3810..699c966ea109 100644
--- a/filter/source/graphicfilter/epict/epict.cxx
+++ b/filter/source/graphicfilter/epict/epict.cxx
@@ -2356,32 +2356,3 @@ extern "C" BOOL SAL_CALL DoExportDialog( FltCallDialogParameter& rPara )
return bRet;
}
-
-
-//=============================== fuer Windows ==============================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/filter/source/graphicfilter/eppm/eppm.cxx b/filter/source/graphicfilter/eppm/eppm.cxx
index bef9ce9d3077..d65a81ce98a1 100644
--- a/filter/source/graphicfilter/eppm/eppm.cxx
+++ b/filter/source/graphicfilter/eppm/eppm.cxx
@@ -272,34 +272,3 @@ extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara )
return bRet;
}
-#ifndef GCC
-#endif
-
-// ------------------------------------------------------------------------
-
-// ---------------
-// - Win16 trash -
-// ---------------
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0;
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
- if ( nHeap )
- UnlockData( 0 );
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-// ------------------------------------------------------------------------
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 5e221b58c72e..4db7093e81a5 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -2765,29 +2765,3 @@ extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara )
return bRet;
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/eras/eras.cxx b/filter/source/graphicfilter/eras/eras.cxx
index 845dbf6ff83a..cb9005fdf0eb 100644
--- a/filter/source/graphicfilter/eras/eras.cxx
+++ b/filter/source/graphicfilter/eras/eras.cxx
@@ -286,32 +286,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGrap
return aRASWriter.WriteRAS( rGraphic, rStream, pFilterConfigItem );
}
-#ifndef GCC
-#endif
-
-// ---------------
-// - Win16 trash -
-// ---------------
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0;
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
- if ( nHeap )
- UnlockData( 0 );
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-// ------------------------------------------------------------------------
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx
index 0e71141eb812..af3142806a12 100644
--- a/filter/source/graphicfilter/etiff/etiff.cxx
+++ b/filter/source/graphicfilter/etiff/etiff.cxx
@@ -616,33 +616,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGrap
return TIFFWriter().WriteTIFF( rGraphic, rStream, pFilterConfigItem );
}
-#ifndef GCC
-#endif
-
-// ---------------
-// - Win16 trash -
-// ---------------
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0;
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
- if ( nHeap )
- UnlockData( 0 );
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-// ------------------------------------------------------------------------
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/filter/source/graphicfilter/expm/expm.cxx b/filter/source/graphicfilter/expm/expm.cxx
index cd05331e5ade..083fb0f2f7b3 100644
--- a/filter/source/graphicfilter/expm/expm.cxx
+++ b/filter/source/graphicfilter/expm/expm.cxx
@@ -271,32 +271,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGrap
return aXPMWriter.WriteXPM( rGraphic, rStream, pFilterConfigItem );
}
-#ifndef GCC
-#endif
-
-// ---------------
-// - Win16 trash -
-// ---------------
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0;
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
- if ( nHeap )
- UnlockData( 0 );
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-// ------------------------------------------------------------------------
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/idxf/idxf.cxx b/filter/source/graphicfilter/idxf/idxf.cxx
index 149f4c2feb78..da8f830d32d5 100644
--- a/filter/source/graphicfilter/idxf/idxf.cxx
+++ b/filter/source/graphicfilter/idxf/idxf.cxx
@@ -51,32 +51,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return TRUE;
}
-
-//============================= fuer Windows ==================================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
-
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 097fc83e35fe..caadcd4f3cdd 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -742,30 +742,3 @@ extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConf
return ( bRetValue );
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 6cab0cdc4e18..e0ffce9c6081 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -2755,30 +2755,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return bRet;
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx
index 6b83fc1021c7..80c825c80791 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -536,30 +536,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return aPBMReader.ReadPBM( rStream, rGraphic );
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx
index 0d44993c252d..0b0b56acc5e5 100644
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ b/filter/source/graphicfilter/ipcd/ipcd.cxx
@@ -392,31 +392,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return aPCDReader.ReadPCD( rStream, rGraphic, pConfigItem );
}
-//============================= fuer Windows ==================================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
-
diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx
index 02c552744299..ca77be58a02e 100644
--- a/filter/source/graphicfilter/ipcx/ipcx.cxx
+++ b/filter/source/graphicfilter/ipcx/ipcx.cxx
@@ -429,30 +429,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return nRetValue;
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index d1af028149b7..91366b752de4 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -1909,29 +1909,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport( SvStream& rIStm, Graphic & rGraph
return bRet;
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx
index 70cd1ab13f29..5a52c17956ed 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -735,29 +735,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return aPSDReader.ReadPSD( rStream, rGraphic );
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx
index 6255dc486537..c20a85354471 100644
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ b/filter/source/graphicfilter/iras/iras.cxx
@@ -354,30 +354,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return aRASReader.ReadRAS( rStream, rGraphic );
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx
index 5dcb5f82ccab..38b97a025b16 100644
--- a/filter/source/graphicfilter/itga/itga.cxx
+++ b/filter/source/graphicfilter/itga/itga.cxx
@@ -729,30 +729,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return aTGAReader.ReadTGA( rStream, rGraphic );
}
-//================== ein bischen Muell fuer Windows ==========================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 5ad400fc3149..f10b8a15f3ef 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -1312,31 +1312,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGra
return TRUE;
}
-//============================= fuer Windows ==================================
-#ifndef GCC
-#endif
-
-#ifdef WIN
-
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
-
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 2ad33b1e6195..82b0480a3d0c 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -94,9 +94,7 @@
#include <vcl/virdev.hxx>
#include <rtl/crc.h>
#include <vos/xception.hxx>
-#ifndef _VOS_NO_NAMESPACE
using namespace vos;
-#endif
using namespace ::rtl;
using namespace ::com::sun::star;
@@ -2094,6 +2092,13 @@ void ConvertEnhancedCustomShapeEquation( SdrObjCustomShape* pCustoShape,
aEquation.nPara[ 0 ] = 1; // hoping that this will not break anything
rEquations.push_back( aEquation );
}
+ catch ( ... )
+ {
+ EnhancedCustomShapeEquation aEquation; // #i112309# EnhancedCustomShape::Parse error
+ aEquation.nOperation = 0; // not catched on linux platform
+ aEquation.nPara[ 0 ] = 1;
+ rEquations.push_back( aEquation );
+ }
rEquationOrder.push_back( rEquations.size() - 1 );
}
// now updating our old equation indices, they are marked with a bit in the hiword of nOperation
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 05411501218e..29874b933d85 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -128,9 +128,7 @@
#include <ucbhelper/content.hxx>
#include <ucbhelper/contentbroker.hxx>
#include <vos/xception.hxx>
-#ifndef _VOS_NO_NAMESPACE
using namespace vos;
-#endif
#include "svx/EnhancedCustomShapeTypeNames.hxx"
#include "svx/EnhancedCustomShapeGeometry.hxx"
#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
@@ -5373,8 +5371,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
aSet.Put( SdrEdgeNode2VertDistItem( n2VertDist ) );
((SdrEdgeObj*)pRet)->SetEdgeTrackPath( aPoly );
+ pRet->SetMergedItemSet( aSet );
}
- pRet->SetMergedItemSet( aSet );
}
}
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index 18ecc5ae6530..19e93dbb791a 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -38,6 +38,7 @@
#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
#include <tools/urlobj.hxx>
#include <osl/file.hxx>
+#include <unotools/pathoptions.hxx>
using namespace ::com::sun::star;
@@ -108,7 +109,24 @@ SfxObjectShell* findShellForUrl( const rtl::OUString& sMacroURLOrPath )
}
else
{
- if ( aURL.equals( xModel->getURL() ) )
+ // sometimes just the name of the document ( without the path
+ // is used
+ bool bDocNameNoPathMatch = false;
+ if ( aURL.getLength() && aURL.indexOf( '/' ) == -1 )
+ {
+ sal_Int32 lastSlashIndex = xModel->getURL().lastIndexOf( '/' );
+ if ( lastSlashIndex > -1 )
+ {
+ bDocNameNoPathMatch = xModel->getURL().copy( lastSlashIndex + 1 ).equals( aURL );
+ if ( !bDocNameNoPathMatch )
+ {
+ rtl::OUString aTmpName = rtl::OUString::createFromAscii("'") + xModel->getURL().copy( lastSlashIndex + 1 ) + rtl::OUString::createFromAscii("'");
+ bDocNameNoPathMatch = aTmpName.equals( aURL );
+ }
+ }
+ }
+
+ if ( aURL.equals( xModel->getURL() ) || bDocNameNoPathMatch )
{
pFoundShell = pShell;
break;
@@ -221,9 +239,19 @@ VBAMacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUStrin
String sDocUrlOrPath = sMacroUrl.copy( 0, nDocSepIndex );
sMacroUrl = sMacroUrl.copy( nDocSepIndex + 1 );
OSL_TRACE("doc search, current shell is 0x%x", pShell );
- SfxObjectShell* pFoundShell = findShellForUrl( sDocUrlOrPath );
+ SfxObjectShell* pFoundShell = NULL;
+ if( bSearchGlobalTemplates )
+ {
+ SvtPathOptions aPathOpt;
+ String aAddinPath = aPathOpt.GetAddinPath();
+ if( rtl::OUString( sDocUrlOrPath ).indexOf( aAddinPath ) == 0 )
+ pFoundShell = pShell;
+ }
+ if( pFoundShell == NULL )
+ pFoundShell = findShellForUrl( sDocUrlOrPath );
OSL_TRACE("doc search, after find, found shell is 0x%x", pFoundShell );
- aRes = resolveVBAMacro( pFoundShell, sMacroUrl );
+ aRes = resolveVBAMacro( pFoundShell, sMacroUrl, bSearchGlobalTemplates );
+ return aRes;
}
else
{
@@ -337,14 +365,14 @@ VBAMacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUStrin
break;
}
}
+ aRes.SetResolvedMacro( sProcedure.Insert( '.', 0 ).Insert( sModule, 0).Insert( '.', 0 ).Insert( sContainer, 0 ) );
}
- aRes.SetResolvedMacro( sProcedure.Insert( '.', 0 ).Insert( sModule, 0).Insert( '.', 0 ).Insert( sContainer, 0 ) );
return aRes;
}
// Treat the args as possible inouts ( convertion at bottom of method )
-sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, uno::Sequence< uno::Any >& aArgs, uno::Any& /*aRet*/, const uno::Any& aCaller )
+sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, uno::Sequence< uno::Any >& aArgs, uno::Any& aRet, const uno::Any& /*aCaller*/)
{
sal_Bool bRes = sal_False;
if ( !pShell )
@@ -355,42 +383,25 @@ sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, uno::Se
uno::Sequence< uno::Any > aOutArgs;
try
- {
- uno::Reference< script::provider::XScriptProvider > xScriptProvider;
- uno::Reference< script::provider::XScriptProviderSupplier > xSPS( pShell->GetModel(), uno::UNO_QUERY_THROW );
-
- xScriptProvider.set( xSPS->getScriptProvider(), uno::UNO_QUERY_THROW );
-
- uno::Reference< script::provider::XScript > xScript( xScriptProvider->getScript( sUrl ), uno::UNO_QUERY_THROW );
-
- if ( aCaller.hasValue() )
+ { ErrCode nErr( ERRCODE_BASIC_INTERNAL_ERROR );
+ if ( pShell )
{
- uno::Reference< beans::XPropertySet > xProps( xScript, uno::UNO_QUERY );
- if ( xProps.is() )
+ nErr = pShell->CallXScript( sUrl,
+ aArgs, aRet, aOutArgsIndex, aOutArgs, false );
+ sal_Int32 nLen = aOutArgs.getLength();
+ // convert any out params to seem like they were inouts
+ if ( nLen )
{
- uno::Sequence< uno::Any > aCallerHack(1);
- aCallerHack[ 0 ] = aCaller;
- xProps->setPropertyValue( rtl::OUString::createFromAscii( "Caller" ), uno::makeAny( aCallerHack ) );
+ for ( sal_Int32 index=0; index < nLen; ++index )
+ {
+ sal_Int32 nOutIndex = aOutArgsIndex[ index ];
+ aArgs[ nOutIndex ] = aOutArgs[ index ];
+ }
}
}
-
-
- xScript->invoke( aArgs, aOutArgsIndex, aOutArgs );
-
- sal_Int32 nLen = aOutArgs.getLength();
- // convert any out params to seem like they were inouts
- if ( nLen )
- {
- for ( sal_Int32 index=0; index < nLen; ++index )
- {
- sal_Int32 nOutIndex = aOutArgsIndex[ index ];
- aArgs[ nOutIndex ] = aOutArgs[ index ];
- }
- }
-
- bRes = sal_True;
+ bRes = ( nErr == ERRCODE_NONE );
}
- catch ( uno::Exception& e )
+ catch ( uno::Exception& )
{
bRes = sal_False;
}
diff --git a/filter/source/msfilter/svxmsbas.cxx b/filter/source/msfilter/svxmsbas.cxx
index 49fd4a7544f3..5214b2d022c3 100644
--- a/filter/source/msfilter/svxmsbas.cxx
+++ b/filter/source/msfilter/svxmsbas.cxx
@@ -52,8 +52,8 @@ using namespace com::sun::star::awt;
#include <com/sun/star/script/XLibraryContainer.hpp>
#include <com/sun/star/script/ModuleInfo.hpp>
#include <com/sun/star/script/ModuleType.hpp>
-#include <com/sun/star/script/XVBAModuleInfo.hpp>
-#include <com/sun/star/script/XVBACompat.hpp>
+#include <com/sun/star/script/vba/XVBACompatibility.hpp>
+#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
using namespace com::sun::star::container;
using namespace com::sun::star::script;
@@ -250,13 +250,21 @@ BOOL SvxImportMSVBasic::ImportCode_Impl( const String& rStorageName,
{
SFX_APP()->EnterBasicCall();
Reference<XLibraryContainer> xLibContainer = rDocSh.GetBasicContainer();
- Reference<XVBACompat> xVBACompat( xLibContainer, UNO_QUERY );
-
- if ( xVBACompat.is() && !bAsComment )
- xVBACompat->setVBACompatModeOn( sal_True );
-
DBG_ASSERT( xLibContainer.is(), "No BasicContainer!" );
+ if( !bAsComment ) try
+ {
+ Reference< vba::XVBACompatibility > xVBACompat( xLibContainer, UNO_QUERY_THROW );
+ xVBACompat->setVBACompatibilityMode( sal_True );
+ /* Force creation of the VBAGlobals object, each application will
+ create the right one and store it at the Basic manager. */
+ Reference< XMultiServiceFactory > xFactory( rDocSh.GetModel(), UNO_QUERY_THROW );
+ xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals" ) ) );
+ }
+ catch( Exception& )
+ {
+ }
+
UINT16 nStreamCount = aVBA.GetNoStreams();
Reference<XNameContainer> xLib;
String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
@@ -270,7 +278,7 @@ BOOL SvxImportMSVBasic::ImportCode_Impl( const String& rStorageName,
}
if( xLib.is() )
{
- Reference< script::XVBAModuleInfo > xVBAModuleInfo( xLib, UNO_QUERY );
+ Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, UNO_QUERY );
Reference< container::XNameAccess > xVBACodeNamedObjectAccess;
if ( !bAsComment )
{
diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx
index 5592c331713f..0a01310b3b40 100644
--- a/filter/source/xsltdialog/xmlfilterjar.cxx
+++ b/filter/source/xsltdialog/xmlfilterjar.cxx
@@ -101,6 +101,10 @@ static OUString encodeZipUri( const OUString& rURI )
static Reference< XInterface > addFolder( Reference< XInterface >& xRootFolder, Reference< XSingleServiceFactory >& xFactory, const OUString& rName ) throw( Exception )
{
+ if ( rName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( ".." ) ) )
+ || rName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ) )
+ throw lang::IllegalArgumentException();
+
Sequence< Any > aArgs(1);
aArgs[0] <<= (sal_Bool)sal_True;
@@ -362,6 +366,10 @@ bool XMLFilterJarHelper::copyFile( Reference< XHierarchicalNameAccess > xIfc, OU
{
OUString szPackagePath( encodeZipUri( rURL.copy( sVndSunStarPackage.getLength() ) ) );
+ if ( ::comphelper::OStorageHelper::PathHasSegment( szPackagePath, OUString( RTL_CONSTASCII_USTRINGPARAM( ".." ) ) )
+ || ::comphelper::OStorageHelper::PathHasSegment( szPackagePath, OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ) )
+ throw lang::IllegalArgumentException();
+
if( xIfc->hasByHierarchicalName( szPackagePath ) )
{
Reference< XActiveDataSink > xFileEntry;
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx
index 6a326f749bdc..fcc4693fec22 100644
--- a/forms/source/component/Button.cxx
+++ b/forms/source/component/Button.cxx
@@ -439,7 +439,7 @@ void SAL_CALL OButtonControl::disposing( const EventObject& _rSource ) throw( Ru
void OButtonControl::actionPerformed(const ActionEvent& /*rEvent*/) throw ( ::com::sun::star::uno::RuntimeException)
{
// Asynchron fuer starutil::URL-Button
- sal_uInt32 n = Application::PostUserEvent( LINK(this, OButtonControl,OnClick) );
+ ULONG n = Application::PostUserEvent( LINK(this, OButtonControl,OnClick) );
{
::osl::MutexGuard aGuard( m_aMutex );
m_nClickEvent = n;
diff --git a/forms/source/component/Button.hxx b/forms/source/component/Button.hxx
index c3528f9f86d2..72d53e6a1b0c 100644
--- a/forms/source/component/Button.hxx
+++ b/forms/source/component/Button.hxx
@@ -127,7 +127,7 @@ class OButtonControl :public OButtonControl_BASE
,public OFormNavigationHelper
{
private:
- sal_uInt32 m_nClickEvent;
+ ULONG m_nClickEvent;
sal_Int16 m_nTargetUrlFeatureId;
/// caches the value of the "Enabled" property of our model
sal_Bool m_bEnabledByPropertyValue;
diff --git a/formula/inc/formula/errorcodes.hxx b/formula/inc/formula/errorcodes.hxx
index f9b04e012fab..f08af17e095e 100644
--- a/formula/inc/formula/errorcodes.hxx
+++ b/formula/inc/formula/errorcodes.hxx
@@ -64,7 +64,8 @@ const USHORT errInterpOverflow = 527;
// Not displayed, temporary for TrackFormulas,
// Cell depends on another cell that has errCircularReference
const USHORT errTrackFromCircRef = 528;
-// Interpreter internal: existing cell has no value but value queried
+// ScInterpreter internal: no numeric value but numeric queried. If this is
+// set as mnStringNoValueError no error is generated but 0 returned.
const USHORT errCellNoValue = 529;
// Interpreter: needed AddIn not found
const USHORT errNoAddin = 530;
@@ -74,6 +75,11 @@ const USHORT errNoMacro = 531;
const USHORT errDivisionByZero = 532; // #DIV/0!
// Compiler: a non-simple (str,err,val) value was put in an array
const USHORT errNestedArray = 533;
+// ScInterpreter internal: no numeric value but numeric queried. If this is
+// temporarily (!) set as mnStringNoValueError, the error is generated and can
+// be used to distinguish that condition from all other (inherited) errors. Do
+// not use for anything else! Never push or inherit the error otherwise!
+const USHORT errNotNumericString = 534;
// Interpreter: NA() not available condition, not a real error
const USHORT NOTAVAILABLE = 0x7fff;
diff --git a/framework/inc/macros/debug/memorymeasure.hxx b/framework/inc/macros/debug/memorymeasure.hxx
index 06bd9305adeb..0c5be0d237c9 100644
--- a/framework/inc/macros/debug/memorymeasure.hxx
+++ b/framework/inc/macros/debug/memorymeasure.hxx
@@ -37,7 +37,7 @@
#ifdef ENABLE_MEMORYMEASURE
- #if !defined( WIN ) && !defined( WNT )
+ #if !defined( WNT )
#error "Macros to measure memory access not available under platforms different from windows!"
#endif
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index 15070eed7c98..b81ef5aecf0e 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -96,6 +96,8 @@
#include <svtools/acceleratorexecute.hxx>
+#include <stdio.h>
+
//_______________________________________________
// const
@@ -1248,7 +1250,6 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util:
const sal_Int32 c = aEvent.Changes.getLength();
sal_Int32 i = 0;
-
for (i=0; i<c; ++i)
{
const css::util::ElementChange& aChange = aEvent.Changes[i];
@@ -1264,27 +1265,25 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util:
aChange.Accessor >>= sOrgPath;
sPath = sOrgPath;
- ::rtl::OUString sPrimarySecondary = ::utl::extractFirstFromConfigurationPath(sPath);
- sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sPrimarySecondary);
-
- ::rtl::OUString sGlobalModules = ::utl::extractFirstFromConfigurationPath(sPath);
- sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sGlobalModules);
+ ::rtl::OUString sPrimarySecondary = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
+ ::rtl::OUString sGlobalModules = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
if ( sGlobalModules.equals(CFG_ENTRY_GLOBAL) )
{
::rtl::OUString sModule;
- sKey = ::utl::extractFirstFromConfigurationPath(sPath);
- if ( sKey.getLength() )
+ sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
+ if (( sKey.getLength() > 0 ) && ( sPath.getLength() > 0 ))
reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey);
}
else if ( sGlobalModules.equals(CFG_ENTRY_MODULES) )
{
- ::rtl::OUString sModule = ::utl::extractFirstFromConfigurationPath(sPath);
- ::rtl::OUString sDropModule = ::rtl::OUString::createFromAscii("Module['") + sModule + ::rtl::OUString::createFromAscii("']");
- sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sDropModule);
- sKey = ::utl::extractFirstFromConfigurationPath(sPath);
- if ( sKey.getLength() )
+ ::rtl::OUString sModule = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
+ sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
+
+ if (( sKey.getLength() > 0 ) && ( sPath.getLength() > 0 ))
+ {
reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey);
+ }
}
}
}
@@ -1385,8 +1384,8 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const
aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD1;
else if (sToken[k].equalsAscii("MOD2"))
aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD2;
- else if (sToken[k].equalsAscii("MOD3"))
- aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD3;
+ else if (sToken[k].equalsAscii("MOD3"))
+ aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD3;
else
{
bValid = sal_False;
diff --git a/graphite/graphite-2.3.1.patch.mingw b/graphite/graphite-2.3.1.patch.mingw
index ecec00da7c6e..c5fc3ecdf252 100755
--- a/graphite/graphite-2.3.1.patch.mingw
+++ b/graphite/graphite-2.3.1.patch.mingw
@@ -116,15 +116,6 @@
#include <assert.h>
--- misc/silgraphite-2.3.1/wrappers/win32/WinFont.cpp 2009-01-29 17:33:19.000000000 +0900
+++ misc/build/silgraphite-2.3.1/wrappers/win32/WinFont.cpp 2009-08-23 20:59:16.211375000 +0900
-@@ -408,7 +408,7 @@
- if (pPolyCurve->wType == TT_PRIM_QSPLINE &&
- // test if this is the last curve
- pPolyHdr->cb - (int)((byte *)(&pPolyCurve->apfx[j]) - (byte *)(pPolyHdr))
-- == sizeof POINTFX &&
-+ == sizeof(POINTFX) &&
- // and the two points are identical
- CompareFixed(pPolyCurve->apfx[j].x, pPolyHdr->pfxStart.x) &&
- CompareFixed(pPolyCurve->apfx[j].y, pPolyHdr->pfxStart.y))
@@ -846,7 +846,7 @@
} // namespace gr
diff --git a/i18npool/source/isolang/mslangid.cxx b/i18npool/source/isolang/mslangid.cxx
index da9da0ff8646..a03d24e6fcdb 100644
--- a/i18npool/source/isolang/mslangid.cxx
+++ b/i18npool/source/isolang/mslangid.cxx
@@ -373,6 +373,7 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang )
case LANGUAGE_USER_BODO_INDIA:
case LANGUAGE_USER_DOGRI_INDIA:
case LANGUAGE_USER_MAITHILI_INDIA:
+ case LANGUAGE_UIGHUR_CHINA:
nScript = ::com::sun::star::i18n::ScriptType::COMPLEX;
break;
diff --git a/idl/source/cmptools/hash.cxx b/idl/source/cmptools/hash.cxx
index 0c7985e05ec3..4d5427f3875c 100644
--- a/idl/source/cmptools/hash.cxx
+++ b/idl/source/cmptools/hash.cxx
@@ -141,10 +141,6 @@ BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert,
SvStringHashTable::SvStringHashTable( UINT32 nMaxEntries )
: SvHashTable( nMaxEntries )
{
-#ifdef WIN
- DBG_ASSERT( (UINT32)nMaxEntries * sizeof( SvStringHashEntry ) <= 0xFF00,
- "Hash table size cannot exeed 64k byte" )
-#endif
pEntries = new SvStringHashEntry[ nMaxEntries ];
// RefCount auf eins setzen
diff --git a/idl/source/cmptools/lex.cxx b/idl/source/cmptools/lex.cxx
index 38b8d8260bb2..579c81a5ec16 100644
--- a/idl/source/cmptools/lex.cxx
+++ b/idl/source/cmptools/lex.cxx
@@ -146,11 +146,7 @@ SvToken & SvToken::operator = ( const SvToken & rObj )
*************************************************************************/
void SvTokenStream::InitCtor()
{
-#ifdef DOS
- SetCharSet( CHARSET_ANSI );
-#else
SetCharSet( gsl_getSystemTextEncoding() );
-#endif
aStrTrue = "TRUE";
aStrFalse = "FALSE";
nLine = nColumn = 0;
@@ -251,11 +247,7 @@ void SvTokenStream::SetCharSet( CharSet nSet )
{
nCharSet = nSet;
-#ifdef DOS
- pCharTab = SvChar::GetTable( nSet, CHARSET_ANSI );
-#else
pCharTab = SvChar::GetTable( nSet, gsl_getSystemTextEncoding() );
-#endif
}
/*************************************************************************
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index e8c5bf1f0470..06e7e2d7c69c 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -697,10 +697,8 @@ SvMetaClass * SvIdlDataBase::ReadKnownClass( SvTokenStream & rInStm )
*************************************************************************/
void SvIdlDataBase::Write( const ByteString & rText )
{
-#ifndef W31
if( nVerbosity != 0 )
fprintf( stdout, "%s", rText.GetBuffer() );
-#endif
}
/*************************************************************************
@@ -714,7 +712,6 @@ void SvIdlDataBase::WriteError( const ByteString & rErrWrn,
ULONG nRow, ULONG nColumn ) const
{
//Fehlerbehandlung
-#ifndef W31
fprintf( stderr, "\n%s --- %s: ( %ld, %ld )\n",
rFileName.GetBuffer(), rErrWrn.GetBuffer(), nRow, nColumn );
@@ -722,7 +719,6 @@ void SvIdlDataBase::WriteError( const ByteString & rErrWrn,
{ // Fehler gesetzt
fprintf( stderr, "\t%s\n", rErrorText.GetBuffer() );
}
-#endif
}
/*************************************************************************
@@ -733,7 +729,6 @@ void SvIdlDataBase::WriteError( const ByteString & rErrWrn,
void SvIdlDataBase::WriteError( SvTokenStream & rInStm )
{
//Fehlerbehandlung
-#ifndef W31
String aFileName( rInStm.GetFileName() );
ByteString aErrorText;
ULONG nRow = 0, nColumn = 0;
@@ -793,7 +788,6 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm )
if( aN.Len() )
fprintf( stderr, "%s versus %s\n", pTok->GetString().GetBuffer(), aN.GetBuffer() );
}
-#endif
}
/****************** SvIdlWorkingBase ****************************************/
diff --git a/idl/source/prj/globals.cxx b/idl/source/prj/globals.cxx
index 83a730e404ad..4956cc9392a0 100644
--- a/idl/source/prj/globals.cxx
+++ b/idl/source/prj/globals.cxx
@@ -35,15 +35,6 @@
#include <database.hxx>
/****************** G L O B A L S ****************************************/
-#ifdef DOS
-static IdlDll * pApp = NULL;
-IdlDll * GetIdlApp()
-{
- if( !pApp )
- pApp = new IdlDll();
- return pApp;
-}
-#else
IdlDll * GetIdlApp()
{
if( !(*(IdlDll**)GetAppData(SHL_IDL)) )
@@ -55,7 +46,6 @@ IdlDll * GetIdlApp()
}
return (*(IdlDll**)GetAppData(SHL_IDL));
}
-#endif
IdlDll::IdlDll()
: pHashTable( NULL )
diff --git a/idl/source/prj/idldll.cxx b/idl/source/prj/idldll.cxx
deleted file mode 100644
index 607cc91e1bf6..000000000000
--- a/idl/source/prj/idldll.cxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_idl.hxx"
-
-#ifdef WIN
-#include <svwin.h>
-
-#ifndef _SYSDEP_HXX
-#include <sysdep.hxx>
-#endif
-
-// Statische DLL-Verwaltungs-Variablen
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-
-/***************************************************************************
-|*
-|* LibMain()
-|*
-|* Beschreibung Initialisierungsfunktion der DLL
-|* Ersterstellung TH 05.05.93
-|* Letzte Aenderung TH 05.05.93
-|*
-***************************************************************************/
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-/***************************************************************************
-|*
-|* WEP()
-|*
-|* Beschreibung DLL-Deinitialisierung
-|* Ersterstellung TH 05.05.93
-|* Letzte Aenderung TH 05.05.93
-|*
-***************************************************************************/
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/idl/source/prj/makefile.mk b/idl/source/prj/makefile.mk
index 3e0a55a7fd05..c33d2e9f3d7a 100644
--- a/idl/source/prj/makefile.mk
+++ b/idl/source/prj/makefile.mk
@@ -41,7 +41,6 @@ CDEFS+=-DIDL_COMPILER
OBJFILES= $(OBJ)$/command.obj \
$(OBJ)$/svidl.obj \
$(OBJ)$/globals.obj \
- $(OBJ)$/idldll.obj \
$(OBJ)$/database.obj
# --- Targets ------------------------------------------------------------
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java
index aefd78e480b7..66598a7ca7cb 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java
@@ -75,6 +75,8 @@ public class InstallData
static private boolean databaseQueried = false;
static private boolean useRtl = false;
static private boolean installedProductMinorSet = false;
+ static private boolean isDebianSystem = false;
+ static private boolean debianInvestigated = false;
static private String installType; /* custom or typical installation */
static private String osType; /* Linux, SunOS, ... */
static private String installDir = null;
@@ -649,6 +651,22 @@ public class InstallData
installedProductMinorSet = value;
}
+ public boolean debianInvestigated() {
+ return debianInvestigated;
+ }
+
+ public void setDebianInvestigated(boolean value) {
+ debianInvestigated = value;
+ }
+
+ public boolean isDebianSystem() {
+ return isDebianSystem;
+ }
+
+ public void setIsDebianSystem(boolean value) {
+ isDebianSystem = value;
+ }
+
public boolean databaseQueried() {
return databaseQueried;
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java
index fa1ce919245c..74f436f8c375 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java
@@ -190,6 +190,22 @@ public class LinuxInstaller extends Installer {
if ( sofficeLink.exists() ) { useForce = true; }
}
+ // On Debian based systems, rpms can be installed with the switch --force-debian, if a rpm
+ // is installed.
+
+ String forceDebianString = "";
+ String nodepsString = "";
+
+ if ( ! data.debianInvestigated() ) {
+ helper.investigateDebian(data);
+ data.setDebianInvestigated(true);
+ }
+
+ if ( data.isDebianSystem() ) {
+ forceDebianString = "--force-debian";
+ nodepsString = "--nodeps";
+ }
+
String rpmCommand = "";
String[] rpmCommandArray;
String databasePath = null;
@@ -212,107 +228,123 @@ public class LinuxInstaller extends Installer {
if (useForce) {
if (useLocalDatabase) {
if ( relocations != null ) {
- rpmCommand = "rpm --upgrade --ignoresize --force -vh " +
+ rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " +
"--relocate " + relocations + " " + databaseString +
" " + databasePath + " " + packageName;
- rpmCommandArray = new String[10];
+ rpmCommandArray = new String[12];
rpmCommandArray[0] = "rpm";
rpmCommandArray[1] = "--upgrade";
rpmCommandArray[2] = "--ignoresize";
rpmCommandArray[3] = "--force";
- rpmCommandArray[4] = "-vh";
- rpmCommandArray[5] = "--relocate";
- rpmCommandArray[6] = relocations;
- rpmCommandArray[7] = databaseString;
- rpmCommandArray[8] = databasePath;
- rpmCommandArray[9] = packageName;
+ rpmCommandArray[4] = forceDebianString;
+ rpmCommandArray[5] = nodepsString;
+ rpmCommandArray[6] = "-vh";
+ rpmCommandArray[7] = "--relocate";
+ rpmCommandArray[8] = relocations;
+ rpmCommandArray[9] = databaseString;
+ rpmCommandArray[10] = databasePath;
+ rpmCommandArray[11] = packageName;
} else {
- rpmCommand = "rpm --upgrade --ignoresize --force -vh " +
+ rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " +
databaseString + " " + databasePath + " " + packageName;
- rpmCommandArray = new String[8];
+ rpmCommandArray = new String[10];
rpmCommandArray[0] = "rpm";
rpmCommandArray[1] = "--upgrade";
rpmCommandArray[2] = "--ignoresize";
rpmCommandArray[3] = "--force";
- rpmCommandArray[4] = "-vh";
- rpmCommandArray[5] = databaseString;
- rpmCommandArray[6] = databasePath;
- rpmCommandArray[7] = packageName;
+ rpmCommandArray[4] = forceDebianString;
+ rpmCommandArray[5] = nodepsString;
+ rpmCommandArray[6] = "-vh";
+ rpmCommandArray[7] = databaseString;
+ rpmCommandArray[8] = databasePath;
+ rpmCommandArray[9] = packageName;
}
} else {
if ( relocations != null )
{
- rpmCommand = "rpm --upgrade --ignoresize --force -vh " +
+ rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " +
"--relocate " + relocations + " " + packageName;
- rpmCommandArray = new String[8];
+ rpmCommandArray = new String[10];
rpmCommandArray[0] = "rpm";
rpmCommandArray[1] = "--upgrade";
rpmCommandArray[2] = "--ignoresize";
rpmCommandArray[3] = "--force";
- rpmCommandArray[4] = "-vh";
- rpmCommandArray[5] = "--relocate";
- rpmCommandArray[6] = relocations;
- rpmCommandArray[7] = packageName;
+ rpmCommandArray[4] = forceDebianString;
+ rpmCommandArray[5] = nodepsString;
+ rpmCommandArray[6] = "-vh";
+ rpmCommandArray[7] = "--relocate";
+ rpmCommandArray[8] = relocations;
+ rpmCommandArray[9] = packageName;
} else {
- rpmCommand = "rpm --upgrade --ignoresize --force -vh " + packageName;
- rpmCommandArray = new String[6];
+ rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " + packageName;
+ rpmCommandArray = new String[8];
rpmCommandArray[0] = "rpm";
rpmCommandArray[1] = "--upgrade";
rpmCommandArray[2] = "--ignoresize";
rpmCommandArray[3] = "--force";
- rpmCommandArray[4] = "-vh";
- rpmCommandArray[5] = packageName;
+ rpmCommandArray[4] = forceDebianString;
+ rpmCommandArray[5] = nodepsString;
+ rpmCommandArray[6] = "-vh";
+ rpmCommandArray[7] = packageName;
}
}
} else {
if (useLocalDatabase) {
if ( relocations != null ) {
- rpmCommand = "rpm --upgrade --ignoresize -vh " +
+ rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " +
"--relocate " + relocations + " " + databaseString +
" " + databasePath + " " + packageName;
- rpmCommandArray = new String[9];
+ rpmCommandArray = new String[11];
rpmCommandArray[0] = "rpm";
rpmCommandArray[1] = "--upgrade";
rpmCommandArray[2] = "--ignoresize";
- rpmCommandArray[3] = "-vh";
- rpmCommandArray[4] = "--relocate";
- rpmCommandArray[5] = relocations;
- rpmCommandArray[6] = databaseString;
- rpmCommandArray[7] = databasePath;
- rpmCommandArray[8] = packageName;
+ rpmCommandArray[3] = forceDebianString;
+ rpmCommandArray[4] = nodepsString;
+ rpmCommandArray[5] = "-vh";
+ rpmCommandArray[6] = "--relocate";
+ rpmCommandArray[7] = relocations;
+ rpmCommandArray[8] = databaseString;
+ rpmCommandArray[9] = databasePath;
+ rpmCommandArray[10] = packageName;
} else {
- rpmCommand = "rpm --upgrade --ignoresize -vh " +
+ rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " +
databaseString + " " + databasePath + " " + packageName;
- rpmCommandArray = new String[7];
+ rpmCommandArray = new String[9];
rpmCommandArray[0] = "rpm";
rpmCommandArray[1] = "--upgrade";
rpmCommandArray[2] = "--ignoresize";
- rpmCommandArray[3] = "-vh";
- rpmCommandArray[4] = databaseString;
- rpmCommandArray[5] = databasePath;
- rpmCommandArray[6] = packageName;
+ rpmCommandArray[3] = forceDebianString;
+ rpmCommandArray[4] = nodepsString;
+ rpmCommandArray[5] = "-vh";
+ rpmCommandArray[6] = databaseString;
+ rpmCommandArray[7] = databasePath;
+ rpmCommandArray[8] = packageName;
}
} else {
if ( relocations != null )
{
- rpmCommand = "rpm --upgrade --ignoresize -vh " +
+ rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " +
"--relocate " + relocations + " " + packageName;
- rpmCommandArray = new String[7];
+ rpmCommandArray = new String[9];
rpmCommandArray[0] = "rpm";
rpmCommandArray[1] = "--upgrade";
rpmCommandArray[2] = "--ignoresize";
- rpmCommandArray[3] = "-vh";
- rpmCommandArray[4] = "--relocate";
- rpmCommandArray[5] = relocations;
- rpmCommandArray[6] = packageName;
+ rpmCommandArray[3] = forceDebianString;
+ rpmCommandArray[4] = nodepsString;
+ rpmCommandArray[5] = "-vh";
+ rpmCommandArray[6] = "--relocate";
+ rpmCommandArray[7] = relocations;
+ rpmCommandArray[8] = packageName;
} else {
- rpmCommand = "rpm --upgrade --ignoresize -vh " + packageName;
- rpmCommandArray = new String[5];
+ rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " + packageName;
+ rpmCommandArray = new String[7];
rpmCommandArray[0] = "rpm";
rpmCommandArray[1] = "--upgrade";
rpmCommandArray[2] = "--ignoresize";
- rpmCommandArray[3] = "-vh";
- rpmCommandArray[4] = packageName;
+ rpmCommandArray[3] = forceDebianString;
+ rpmCommandArray[4] = nodepsString;
+ rpmCommandArray[5] = "-vh";
+ rpmCommandArray[6] = packageName;
}
}
}
@@ -383,20 +415,62 @@ public class LinuxInstaller extends Installer {
useLocalDatabase = true;
}
- if (useLocalDatabase) {
- rpmCommand = "rpm -ev" + " " + databaseString + " " + databasePath + " " + packageName;
- rpmCommandArray = new String[5];
- rpmCommandArray[0] = "rpm";
- rpmCommandArray[1] = "-ev";
- rpmCommandArray[2] = databaseString;
- rpmCommandArray[3] = databasePath;
- rpmCommandArray[4] = packageName;
+ // On Debian based systems, rpms can be installed with the switch --force-debian, if a rpm
+ // is installed.
+
+ String forceDebianString = "";
+ String nodepsString = "";
+
+ if ( ! data.debianInvestigated() ) {
+ helper.investigateDebian(data);
+ data.setDebianInvestigated(true);
+ }
+
+ if ( data.isDebianSystem() ) {
+ forceDebianString = "--force-debian";
+ nodepsString = "--nodeps";
+ }
+
+ // Code duplication for isDebianSystem is necessary, because there is no valid position
+ // for forceDebianString, if it is empty. This is no problem in installPackage.
+
+ if ( data.isDebianSystem() ) {
+
+ if (useLocalDatabase) {
+ rpmCommand = "rpm " + forceDebianString + " " + nodepsString + " -ev" + " " + databaseString + " " + databasePath + " " + packageName;
+ rpmCommandArray = new String[7];
+ rpmCommandArray[0] = "rpm";
+ rpmCommandArray[1] = forceDebianString;
+ rpmCommandArray[2] = nodepsString;
+ rpmCommandArray[3] = "-ev";
+ rpmCommandArray[4] = databaseString;
+ rpmCommandArray[5] = databasePath;
+ rpmCommandArray[6] = packageName;
+ } else {
+ rpmCommand = "rpm " + forceDebianString + " " + nodepsString + " -ev" + " " + packageName;
+ rpmCommandArray = new String[5];
+ rpmCommandArray[0] = "rpm";
+ rpmCommandArray[1] = forceDebianString;
+ rpmCommandArray[2] = nodepsString;
+ rpmCommandArray[3] = "-ev";
+ rpmCommandArray[4] = packageName;
+ }
} else {
- rpmCommand = "rpm -ev" + " " + packageName;
- rpmCommandArray = new String[3];
- rpmCommandArray[0] = "rpm";
- rpmCommandArray[1] = "-ev";
- rpmCommandArray[2] = packageName;
+ if (useLocalDatabase) {
+ rpmCommand = "rpm -ev" + " " + databaseString + " " + databasePath + " " + packageName;
+ rpmCommandArray = new String[5];
+ rpmCommandArray[0] = "rpm";
+ rpmCommandArray[1] = "-ev";
+ rpmCommandArray[2] = databaseString;
+ rpmCommandArray[3] = databasePath;
+ rpmCommandArray[4] = packageName;
+ } else {
+ rpmCommand = "rpm -ev" + " " + packageName;
+ rpmCommandArray = new String[3];
+ rpmCommandArray[0] = "rpm";
+ rpmCommandArray[1] = "-ev";
+ rpmCommandArray[2] = packageName;
+ }
}
Vector returnVector = new Vector();
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java
index 1640ae706a46..ebf915c6274a 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java
@@ -381,6 +381,27 @@ import java.util.Vector;public class LinuxHelper {
return databasePath;
}
+ public void investigateDebian(InstallData data) {
+
+ // String rpmQuery = "rpm --help;
+ String[] rpmQueryArray = new String[2];
+ rpmQueryArray[0] = "rpm";
+ rpmQueryArray[1] = "--help";
+
+ Vector returnVector = new Vector();
+ Vector returnErrorVector = new Vector();
+ int returnValue = ExecuteProcess.executeProcessReturnVector(rpmQueryArray, returnVector, returnErrorVector);
+
+ // Checking if the return vector contains the string "force-debian"
+
+ for (int i = 0; i < returnVector.size(); i++) {
+ String line = (String) returnVector.get(i);
+ if ( line.indexOf("force-debian") > -1 ) {
+ data.setIsDebianSystem(true);
+ }
+ }
+ }
+
public void getLinuxFileInfo(PackageDescription packageData) {
// analyzing a string like "openoffice-core01-2.0.3-159" as "name-version-release"
InstallData data = InstallData.getInstance();
diff --git a/l10ntools/inc/lngmerge.hxx b/l10ntools/inc/lngmerge.hxx
index 923da89988b6..843d1a6de3d2 100644
--- a/l10ntools/inc/lngmerge.hxx
+++ b/l10ntools/inc/lngmerge.hxx
@@ -58,7 +58,7 @@ private:
const ByteString &rPrj ,
const ByteString &rRoot , const ByteString &sActFileName , const ByteString &sID );
public:
- LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat, bool bQuiet_in );
+ LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat );
~LngParser();
BOOL CreateSDF( const ByteString &rSDFFile, const ByteString &rPrj, const ByteString &rRoot );
diff --git a/l10ntools/java/jpropex/java/JPropEx.java b/l10ntools/java/jpropex/java/JPropEx.java
index 224bed783cf6..be59d7f29479 100644
--- a/l10ntools/java/jpropex/java/JPropEx.java
+++ b/l10ntools/java/jpropex/java/JPropEx.java
@@ -121,6 +121,7 @@ public class JPropEx
String key;
SdfEntity currentStr;
String value;
+ String str;
for( Enumeration e = prop.propertyNames() ; e.hasMoreElements() ; )
{
key = (String) e.nextElement();
@@ -129,8 +130,11 @@ public class JPropEx
currentStr.setLid( key );
value = prop.getProperty( key , "" );
//if( value.equals("") ) System.err.println("Warning: in file "+inputFileArg+" the string with the key "+key+" has a empty string!");
- currentStr.setText( (prop.getProperty( key )).replaceAll("\t" , " " ) ); // TODO: Quoting!!!!
- data.add( currentStr );
+ str = (prop.getProperty( key )).replaceAll("\t" , " " ); // remove tab
+ str = str.replaceAll("\n"," "); // remove return
+ currentStr.setText( str );
+ if( str.length() > 0 )
+ data.add( currentStr );
}
data.write( outputFileArg );
}
diff --git a/l10ntools/java/jpropex/java/SdfEntity.java b/l10ntools/java/jpropex/java/SdfEntity.java
index 52dc61ca40ca..c2f6a5d788b1 100644
--- a/l10ntools/java/jpropex/java/SdfEntity.java
+++ b/l10ntools/java/jpropex/java/SdfEntity.java
@@ -98,23 +98,25 @@ public class SdfEntity implements Cloneable{
public void setProperties( String line ){
- String[] splitted = line.split("\t");
-
- setProject( splitted[ SdfEntity.PROJECT_POS ] );
- setSource_file( splitted[ SdfEntity.SOURCE_FILE_POS ] );
- setDummy1( splitted[ SdfEntity.DUMMY1_POS ] );
- setResource_type( splitted[ SdfEntity.RESOURCE_TYPE_POS ] );
- setGid( splitted[ SdfEntity.GID_POS ] );
- setLid( splitted[ SdfEntity.LID_POS ] );
- setHelpid( splitted[ SdfEntity.HELPID_POS ] );
- setPlatform( splitted[ SdfEntity.PLATFORM_POS ] );
- setDummy2( splitted[ SdfEntity.DUMMY2_POS ] );
- setLangid( splitted[ SdfEntity.LANGID_POS ] );
- setText( splitted[ SdfEntity.TEXT_POS ] );
- setHelptext( splitted[ SdfEntity.HELPTEXT_POS ] );
- setQuickhelptext( splitted[ SdfEntity.QUICKHELPTEXT_POS ] );
- setTitle( splitted[ SdfEntity.TITLE_POS ] );
- setDate( splitted[ SdfEntity.DATE_POS ] );
+ if( line != null )
+ {
+ String[] splitted = line.split("\t",15);
+ setProject( splitted[ SdfEntity.PROJECT_POS ] );
+ setSource_file( splitted[ SdfEntity.SOURCE_FILE_POS ] );
+ setDummy1( splitted[ SdfEntity.DUMMY1_POS ] );
+ setResource_type( splitted[ SdfEntity.RESOURCE_TYPE_POS ] );
+ setGid( splitted[ SdfEntity.GID_POS ] );
+ setLid( splitted[ SdfEntity.LID_POS ] );
+ setHelpid( splitted[ SdfEntity.HELPID_POS ] );
+ setPlatform( splitted[ SdfEntity.PLATFORM_POS ] );
+ setDummy2( splitted[ SdfEntity.DUMMY2_POS ] );
+ setLangid( splitted[ SdfEntity.LANGID_POS ] );
+ setText( splitted[ SdfEntity.TEXT_POS ] );
+ setHelptext( splitted[ SdfEntity.HELPTEXT_POS ] );
+ setQuickhelptext( splitted[ SdfEntity.QUICKHELPTEXT_POS ] );
+ setTitle( splitted[ SdfEntity.TITLE_POS ] );
+ setDate( splitted[ SdfEntity.DATE_POS ] );
+ }
}
public String getFileId(){
diff --git a/l10ntools/java/jpropex/jpropex b/l10ntools/java/jpropex/jpropex
index 2d62d13b093e..8c9982f2b1d3 100755
--- a/l10ntools/java/jpropex/jpropex
+++ b/l10ntools/java/jpropex/jpropex
@@ -3,8 +3,10 @@ if [ x${SOLARENV}x = xx ]; then
echo No environment found, please use 'configure' or 'setsolar'
exit 1
fi
+
if [ x${JAVA_HOME}x = xx ]; then
- echo No Java found!
+ echo ERROR: No java found
exit 1
fi
+
exec java -DSOLARSRC=${SOLARSRC} -DWORK_STAMP=${WORK_STAMP} -DUSE_SHELL= -jar ${SOLARVER}/${INPATH}/bin${UPDMINOREXT}/jpropex.jar "$@"
diff --git a/l10ntools/prj/d.lst b/l10ntools/prj/d.lst
index 0b6a43444613..53c846832fca 100644
--- a/l10ntools/prj/d.lst
+++ b/l10ntools/prj/d.lst
@@ -47,6 +47,14 @@ mkdir: %_DEST%\bin%_EXT%\help\com\sun\star\help
..\scripts\localize %_DEST%\bin%_EXT%\localize
..\scripts\fast_merge.pl %_DEST%\bin%_EXT%\fast_merge.pl
..\scripts\keyidGen.pl %_DEST%\bin%_EXT%\keyidGen.pl
+..\scripts\tool\const.py %_DEST%\bin%_EXT%\const.py
+..\scripts\tool\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py
+..\scripts\tool\xtxex.py %_DEST%\bin%_EXT%\xtxex.py
+..\scripts\tool\sdf.py %_DEST%\bin%_EXT%\sdf.py
+..\scripts\tool\xhtex.py %_DEST%\bin%_EXT%\xhtex.py
+..\scripts\tool\pseudo.py %_DEST%\bin%_EXT%\pseudo.py
+..\scripts\xtxex %_DEST%\bin%_EXT%\xtxex
+..\scripts\xhtex %_DEST%\bin%_EXT%\xhtex
..\inc\export.hxx %_DEST%\inc%_EXT%\l10ntools\export.hxx
..\inc\l10ntools\directory.hxx %_DEST%\inc%_EXT%\l10ntools\directory.hxx
diff --git a/transex3/java/jpropex/makefile.mk b/l10ntools/scripts/tool/const.py
index f86d2c830025..2d514eabdab6 100755..100644
--- a/transex3/java/jpropex/makefile.mk
+++ b/l10ntools/scripts/tool/const.py
@@ -25,12 +25,15 @@
#
#*************************************************************************
+# Pseudo const
+class _const:
+ class ConstError(TypeError): pass
+ def __setattr__(self, name, value):
+ if self.__dict__.has_key(name):
+ raise self.ConstError, "Can't rebind const(%s)"%name
+ self.__dict__[name] = value
-PRJ=../..
-PRJNAME=transex3
-TARGET=jpropex
+import sys
+sys.modules[__name__] = _const()
-.INCLUDE : ant.mk
-
-ALLTAR : ANTBUILD
diff --git a/l10ntools/scripts/tool/l10ntool.py b/l10ntools/scripts/tool/l10ntool.py
new file mode 100644
index 000000000000..70d88674f07b
--- /dev/null
+++ b/l10ntools/scripts/tool/l10ntool.py
@@ -0,0 +1,211 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+from optparse import OptionParser
+from sdf import SdfData
+from pseudo import PseudoSet
+
+import sys
+import os
+import shutil
+
+class AbstractL10nTool:
+ _options = {}
+ _args = ""
+ _resource_type = ""
+ _source_language = "en-US"
+
+ ##### Implement these abstract methods
+
+ ##### Nameing scheme for the output files
+ def get_outputfile_format_str(self):
+ # filename,fileNoExt,language,extension,pathPrefix,pathPostFix,path
+ #return "{path}/{fileNoExt}_{language}.{extension}"
+ return self._options.pattern
+
+ ################################# Merge single files ###########################################
+
+ ##### Merge a single file
+ def merge_file(self, inputfilename, outputfilename, parsed_file_ref, lang, is_forced_lang, sdfdata):
+ pass
+
+ ##### Helper for parse-once-use-often like parsing a xml file is needed implement it here
+ def parse_file(self, filename):
+ return None
+
+ ################### Merge one big file containing all strings in all languages #################
+ def merge_one_big_file(self, inputfile, outputfilename, parsed_file_ref, lang, sdfdata):
+ pass
+
+ ################### Extract a single File ######################################################
+ def extract_file(self, inputfile):
+ pass
+
+ ################################################################################################
+
+ def format_outputfile(self, filename, language):
+ extension = filename[filename.rfind('.')+1:]
+ file = filename[:filename.rfind('.')]
+
+ # Python 2.3.x friendly
+ return self.get_outputfile_format_str().replace('[', '%(').replace(']',')s') % \
+ { 'filename': filename, 'fileNoExt': file, 'language': language, 'extension': extension, 'path_prefix': self._options.path_prefix,
+ 'path_postfix': self._options.path_postfix, 'path': self.get_path() }
+
+ #return self.get_outputfile_format_str().replace('[', '{').replace(']','}').format(
+ # filename=filename, fileNoExt=file, language=language, extension=extension, path_prefix=self._options.path_prefix,
+ # path_postfix=self._options.path_postfix, path=self.get_path())
+
+ def get_path(self):
+ if self._options.outputfile.find('/') == -1:
+ return ""
+ else:
+ return self._options.outputfile[:self._options.outputfile.rfind('/')]
+
+ def merge(self, sdfdata):
+ langset,forcedset, foundset = PseudoSet(), PseudoSet() , PseudoSet()
+
+ if self._options.languages:
+ langset = PseudoSet(self._options.languages)
+ if self._options.forcedlanguages:
+ forcedset = PseudoSet(self._options.forcedlanguages)
+ if sdfdata.get_languages_found_in_sdf():
+ foundset = sdfdata.get_languages_found_in_sdf()
+
+ if self.has_multi_inputfiles():
+ filelist = self.read_inputfile_list()
+ else:
+ filelist = self._options.inputfile
+
+ for inputfile in filelist:
+ ref = self.parse_file(inputfile)
+ # Don't write that files if there is no l10n present
+ if ((langset & foundset) - forcedset): # all langs given and found in sdf without enforced
+ [self.merge_file(inputfile,self.format_outputfile(inputfile, lang), ref, lang, False, sdfdata) for lang in ((langset & foundset) - forcedset)]
+ # Always write those files even if there is no l10n available
+ if forcedset: # all enforced langs
+ [self.merge_file(inputfile, self.format_outputfile(inputfile, lang), ref, lang, True, sdfdata) for lang in forcedset]
+ # In case a big file have to be written
+ if ((langset & foundset) | forcedset): # all langs given ,found in sdf and enforced ones
+ self.merge_one_big_file(inputfile, self.format_outputfile(inputfile, lang), ref, ((langset & foundset) | forcedset), sdfdata)
+
+ def has_multi_inputfiles(self):
+ return self._options.inputfile[0] == '@'
+
+ def copy_file(self, inputfilename, outputfilename):
+ try:
+ shutil.copy(inputfilename, outputfilename)
+ except IOError:
+ print "ERROR: Can not copy file '" + inputfilename + "' to " + "'" + outputfilename + "'"
+ sys.exit(-1)
+
+ def extract(self):
+ try:
+ f = open(self._options.outputfile, "w+")
+ f.write(self.extract_file(self._options.inputfile))
+ except IOError:
+ print "ERROR: Can not write file " + self._options.outputfile
+ else:
+ f.close()
+
+ # Parse the common options
+ def parse_options(self):
+ parser = OptionParser()
+ parser.add_option("-i", "--inputfile", dest="inputfile", metavar="FILE", help="resource file to read" )
+ parser.add_option("-o", "--outputfile", dest="outputfile", metavar="FILE", help="extracted sdf or merged file" )
+ parser.add_option("-m", "--inputsdffile", dest="input_sdf_file", metavar="FILE", help="merge this sdf file" )
+ parser.add_option("-x", "--pathprefix", dest="path_prefix", metavar="PATH", help="" )
+ parser.add_option("-y", "--pathpostfix", dest="path_postfix", metavar="PATH", help="" )
+ parser.add_option("-p", "--projectname", dest="project_name", metavar="NAME", help="" )
+ parser.add_option("-r", "--projectroot", dest="project_root", metavar="PATH", help="" )
+ parser.add_option("-f", "--forcedlanguages", dest="forcedlanguages", metavar="ISOCODE[,ISOCODE]", help="Always merge those langs even if no l10n is available for those langs" )
+ parser.add_option("-l", "--languages", dest="languages", metavar="ISOCODE[,ISOCODE]", help="Merge those langs if l10n is found for each")
+ parser.add_option("-s", "--pattern", dest="pattern", metavar="", help="" )
+ parser.add_option("-q", "--quiet", action="store_true", dest="quietmode", help="",default=False)
+ (self._options, self.args) = parser.parse_args()
+
+ # -l "de,pr,pt-BR" => [ "de" , "pt" , "pt-BR" ]
+ parse_complex_arg = lambda arg: arg.split(",")
+
+ if self._options.forcedlanguages:
+ self._options.forcedlanguages = parse_complex_arg(self._options.forcedlanguages)
+ if self._options.languages:
+ self._options.languages = parse_complex_arg(self._options.languages)
+ self.test_options()
+
+ def __init__(self):
+ self.parse_options()
+ if self._options.input_sdf_file != None and len(self._options.input_sdf_file):
+ sdfdata = SdfData(self._options.input_sdf_file)
+ sdfdata.read()
+ self.merge(sdfdata)
+ else:
+ self.extract()
+
+ def make_dirs(self, filename):
+ dir = filename[:filename.rfind('/')]
+ if os.path.exists(dir):
+ if os.path.isfile(dir):
+ print "ERROR: There is a file '"+dir+"' where I want create a directory"
+ sys.exit(-1)
+ else:
+ return
+ else:
+ try:
+ os.makedirs(dir)
+ except IOError:
+ print "Error: Can not create dir " + dir
+ sys.exit(-1)
+
+ def test_options(self):
+ opt = self._options
+ is_valid = lambda x: x != None and len(x) > 0
+ return is_valid(opt.project_root) and is_valid(opt.project_name) and is_valid(opt.languages) and \
+ ( is_valid(opt.inputfile) and (( is_valid(opt.path_prefix) and is_valid(opt.path_postfix) ) or is_valid(opt.outputfile)) and \
+ ( ( is_valid(opt.input_sdf_file) and ( is_valid(opt.outputfile) or ( is_valid(opt.path_prefix) and is_valid(opt.path_postfix) ) or \
+ ( is_valid(opt.inputfile) and is_valid(opt.outputFile)) ))))
+ print "Strange options ..."
+ sys.exit( -1 )
+
+ def read_inputfile_list(self):
+ if self.has_multi_inputfiles():
+ lines = []
+ try:
+ f = open(self._options.inputfile[1:], "r")
+ lines = [line.strip('\n') for line in f.readlines()]
+ except IOError:
+ print "ERROR: Can not read file list " + self._options.inputfile[2:]
+ sys.exit(-1)
+ else:
+ f.close()
+ return lines
+
+ def get_filename_string(self, inputfile):
+ absfile = os.path.realpath(os.path.abspath(inputfile))
+ absroot = os.path.realpath(os.path.abspath(self._options.project_root))
+ return absfile[len(absroot)+1:].replace('/','\\')
+
diff --git a/l10ntools/scripts/tool/pseudo.py b/l10ntools/scripts/tool/pseudo.py
new file mode 100644
index 000000000000..0956325e31db
--- /dev/null
+++ b/l10ntools/scripts/tool/pseudo.py
@@ -0,0 +1,184 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+# to support macosx baseline machines from Cretaceous period
+
+# incomplete set() class implementation of Python 2.4
+class PseudoSet:
+ _list = []
+
+ def __str__(self):
+ return str(self._list)
+
+ def __init__(self, newlist=[]):
+ self._list = self._remove_dupes(newlist)
+
+ def __or__(self, other):
+ tmplist = []
+ if self._list != None and other != None:
+ tmplist.extend(self._list)
+ tmplist.extend(other)
+ return PseudoSet(self._remove_dupes(tmplist))
+ else:
+ print "__or__(None)"
+
+ def __sub__(self,other):
+ tmplist = []
+ if self._list != None and other != None:
+ tmplist.extend(self._list)
+ [tmplist.remove(key) for key in other if key in tmplist]
+ else:
+ print "__sub__(none)"
+ return PseudoSet(tmplist)
+
+ def __and__(self, other):
+ tmplist = []
+ if other != None and self._list != None:
+ [tmplist.append(key) for key in self._list if key in other]
+ return PseudoSet(tmplist)
+ else:
+ print "__and__(None)"
+
+ def __iter__(self):
+ return self._list.__iter__()
+
+ def __items__(self):
+ return self._list.items()
+
+ def __keys__(self):
+ return keys(self._list)
+
+ def _remove_dupes(self, list):
+ tmpdict = {}
+ for key in list:
+ tmpdict[key] = 1
+ return tmpdict.keys()
+
+# incomplete OrderedDict() class implementation
+class PseudoOrderedDict(dict):
+ _keylist = []
+ _valuelist = []
+
+ def __init__(self, defaults={}):
+ dict.__init__(self)
+ for n,v in defaults.items():
+ self[n] = v
+
+ def __setitem__(self, key, value):
+ self._keylist.append(key)
+ self._valuelist.append(value)
+ return dict.__setitem__(self, key, value)
+
+ def __delattr__(self, key):
+ self._keylist.__delattr__(key)
+ self._valuelist.__delattr__(dict[key])
+ return dict.__delattr__(self, key)
+
+ def __delitem__(self, key):
+ self._keylist.__delitem__(key)
+ self._valuelist.__delitem__(dict[key])
+ return dict.__delitem__(self, key)
+
+ def __iter__(self):
+ raise NotImplementedError("__iter__")
+
+ def __iterkeys__(self):
+ return self._keylist
+
+ def iteritems(self):
+ #return self._valuelist
+ return zip(self._keylist, self._valuelist)
+
+ def items(self):
+ return zip(self._keylist,self._valuelist)
+
+ def __keys__(self):
+ return self._keylist
+
+ def keys(self):
+ return self._keylist
+
+ def __keysattr__(self):
+ return self._keylist
+
+ def pop(self, key):
+ self._keylist.pop(key)
+ self._valuelist.pop(key)
+ return dict.__pop__(self, key)
+
+ def popitem(self):
+ raise NotImplementedError("popitem")
+
+def _testdriver_set():
+ list, list1 = [] ,[]
+ list.append("a")
+ list.append("b")
+ list.append("c")
+
+ list1.append("a")
+ list1.append("b")
+ list1.append("d")
+ list1.append("e")
+ list1.append("e")
+
+ if "a" in list:
+ print "YEAH!"
+
+ a = PseudoSet(list)
+ b = PseudoSet(list1)
+
+ print "a="+str(a)
+ print "b="+str(b)
+ print "a|b=" + str(a|b)
+ print "a="+str(a)
+ print "b="+str(b)
+ print "a&b=" + str(a&b)
+ print "a="+str(a)
+ print "b="+str(b)
+ print "a-b" + str(a-b)
+
+ for key in a:
+ print key
+
+def _testdriver_dict():
+ d = PseudoOrderedDict()
+ d["a"] = 1
+ d["b"] = 2
+ d["c"] = 3
+ d["d"] = 4
+ d["e"] = 5
+ d["f"] = 6
+
+ print "a="+str(d["a"])
+ print "e="+str(d["e"])
+ for key,value in d.iteritems():
+ print "d["+key+"]="+str(d[key])
+ print "key="+str(key)+" value="+str(value)
+
+ print "keys="+str(d.keys())
+
+#_testdriver_dict()
diff --git a/l10ntools/scripts/tool/sdf.py b/l10ntools/scripts/tool/sdf.py
new file mode 100644
index 000000000000..2afcbaf4bb1f
--- /dev/null
+++ b/l10ntools/scripts/tool/sdf.py
@@ -0,0 +1,165 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+from pseudo import PseudoSet,PseudoOrderedDict
+
+class SdfData:
+ _filename = "";
+ _dict = PseudoOrderedDict()
+ _languages_found = [];
+
+ def __init__ (self, filename=""):
+ self._filename = filename
+
+ def __getitem__(self, key):
+ if self._dict.has_key(key):
+ return self._dict[key]
+ else:
+ return None
+
+ def has_key(self, key):
+ return self._dict.has_key(key)
+
+ def __setitem__(self, key, value):
+ self._dict[key] = value
+
+ def get_languages_found_in_sdf(self):
+ return PseudoSet(self._languages_found)
+
+ def read(self):
+ try:
+ f = open(self._filename, "r")
+ lines = [line.rstrip('\n') for line in f.readlines()]
+ except IOError:
+ print "ERROR: Trying to read "+ self._filename
+ raise
+ else:
+ f.close()
+ for line in lines:
+ entity = SdfEntity()
+ entity.set_properties(line)
+ self._dict[entity.get_id()] = entity
+ self._languages_found.append(entity.langid)
+
+ def write(self, filename):
+ try:
+ f = open(filename, "w+")
+ for value in self._dict.itervalues():
+ #f.write( repr(value)+"\n" )
+ f.write(value + "\n")
+ except IOError:
+ print "ERROR: Trying to write " + filename
+ raise
+ else:
+ f.close()
+
+import sys
+class SdfEntity:
+ # Sdf format columns
+ project = ""
+ source_file = ""
+ dummy1 = ""
+ resource_type = ""
+ gid = ""
+ lid = ""
+ helpid = ""
+ platform = ""
+ dummy2 = ""
+ langid = ""
+ text = ""
+ helptext = ""
+ quickhelptext = ""
+ title = ""
+ date = ""
+
+ import const
+ const._PROJECT_POS = 0
+ const._SOURCE_FILE_POS = 1
+ const._DUMMY1_POS = 2
+ const._RESOURCE_TYPE_POS = 3
+ const._GID_POS = 4
+ const._LID_POS = 5
+ const._HELPID_POS = 6
+ const._PLATFORM_POS = 7
+ const._DUMMY2_POS = 8
+ const._LANGID_POS = 9
+ const._TEXT_POS = 10
+ const._HELPTEXT_POS = 11
+ const._QUICKHELPTEXT_POS = 12
+ const._TITLE_POS = 13
+ const._DATE_POS = 14
+
+ def __init__(self, project="", source_file="", dummy1="", resource_type="", gid="", lid="", helpid="", platform="", dummy2="", langid="",
+ text="", helptext="", quickhelptext="", title="", date="2002-02-02 02:02:02"):
+ self.project = project;
+ self.source_file = source_file;
+ self.dummy1 = dummy1;
+ self.resource_type = resource_type;
+ self.gid = gid;
+ self.lid = lid;
+ self.helpid = helpid;
+ self.platform = platform;
+ self.dummy2 = dummy2;
+ self.langid = langid;
+ self.text = text;
+ self.helptext = helptext;
+ self.quickhelptext = quickhelptext;
+ self.title = title;
+ self.date = date;
+
+ def set_properties(self, line):
+ splitted = line.split("\t")
+ if len(splitted) == 15:
+ self.project = splitted[ self.const._PROJECT_POS ]
+ self.source_file = splitted[ self.const._SOURCE_FILE_POS ]
+ self.dummy1 = splitted[ self.const._DUMMY1_POS ]
+ self.resource_type = splitted[ self.const._RESOURCE_TYPE_POS ]
+ self.gid = splitted[ self.const._GID_POS ]
+ self.lid = splitted[ self.const._LID_POS ]
+ self.helpid = splitted[ self.const._HELPID_POS ]
+ self.platform = splitted[ self.const._PLATFORM_POS ]
+ self.dummy2 = splitted[ self.const._DUMMY2_POS ]
+ self.langid = splitted[ self.const._LANGID_POS ]
+ self.text = splitted[ self.const._TEXT_POS ]
+ self.helptext = splitted[ self.const._HELPTEXT_POS ]
+ self.quickhelptext = splitted[ self.const._QUICKHELPTEXT_POS ]
+ self.title = splitted[ self.const._TITLE_POS ]
+ self.date = splitted[ self.const._DATE_POS ]
+
+ def get_file_id(self):
+ return self.project + "\\" + self.source_file
+
+ def get_resource_path(self):
+ return self.source_file[0:self.source_file.rfind( "\\" )-1]
+
+ def __str__(self):
+ return ''.join([self.project, "\t", self.source_file, "\t", self.dummy1, "\t", self.resource_type, "\t" ,
+ self.gid, "\t", self.lid, "\t", self.helpid, "\t", self.platform, "\t", self.dummy2, "\t" , self.langid,
+ "\t", self.text, "\t", self.helptext, "\t", self.quickhelptext, "\t" , self.title, "\t", self.date ])
+
+ def get_id(self):
+ return ''.join([self.project, self.gid, self.lid, self.source_file, self.resource_type, self.platform, self.helpid, self.langid])
diff --git a/l10ntools/scripts/tool/xhtex.py b/l10ntools/scripts/tool/xhtex.py
new file mode 100644
index 000000000000..c427a7feccdd
--- /dev/null
+++ b/l10ntools/scripts/tool/xhtex.py
@@ -0,0 +1,135 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+from l10ntool import AbstractL10nTool
+from sdf import SdfEntity
+import sys
+import xml.dom.minidom
+
+class Xhtex(AbstractL10nTool):
+ _resource_type = "xht"
+ _sdfdata = ()
+ _lang = ""
+
+ # Extract methods
+ def extract_topic(self, list, inputfile):
+ topics = []
+ for elem in list:
+ if elem.childNodes[0].nodeType == elem.TEXT_NODE and len(elem.childNodes[0].data.strip()):
+ topics.append(self.prepare_sdf_line(id=elem.getAttribute("id").strip(), text=elem.childNodes[0].data, inputfile=inputfile))
+ return topics
+
+ def extract_title(self, list, inputfile):
+ titles = []
+ for elem in list:
+ if len(elem.getAttribute("title").strip()):
+ titles.append(self.prepare_sdf_line(id=elem.getAttribute("id").strip(), text=elem.getAttribute("title").strip(), inputfile=inputfile))
+ return titles
+
+ # Merge methods
+ def merge_topic(self, list, sdfdata, lang, inputfilename, dom):
+ for elem in list:
+ if elem.childNodes[0].nodeType == elem.TEXT_NODE and elem.getAttribute("id").strip():
+ obj = self.prepare_sdf_line(inputfile=inputfilename, lang=lang, id=elem.getAttribute("id").strip())
+ if sdfdata[obj.get_id()]:
+ elem.childNodes[0].data = str(sdfdata[obj.get_id()].text)
+
+ def merge_title(self, list, sdfdata, lang, inputfilename):
+ for elem in list:
+ obj = self.prepare_sdf_line(inputfile=inputfilename, lang=lang, id=elem.getAttribute("id").strip())
+ if elem.getAttribute("id").strip() and sdfdata[obj.get_id()]:
+ elem.setAttribute("title", str(sdfdata[obj.get_id()].text))
+
+ # L10N tool
+ def __init__(self):
+ AbstractL10nTool.__init__(self)
+
+ def parse_file(self, filename):
+ document = ""
+ try:
+ f = open(filename, "r+")
+ document = f.read()
+ except IOError:
+ print "ERROR: Can not read file " + filename
+ sys.exit(-1)
+ else:
+ f.close()
+ return xml.dom.minidom.parseString(document)
+
+
+ def merge_file(self, inputfilename, outputfilename, parsed_file_ref, lang,is_forced_lang, sdfdata):
+ if lang == "en-US":
+ mod_outputfilename = outputfilename.replace("_en-US",'')
+ self.make_dirs(mod_outputfilename)
+ self.copy_file(inputfilename, mod_outputfilename)
+ return
+ dom = parsed_file_ref.cloneNode(True)
+ #dom = self.parse_file(inputfilename) # in case cloneNode is buggy just parse it always
+
+ self.merge_topic(dom.getElementsByTagName("topic"), sdfdata, lang, inputfilename, dom)
+ self.merge_title(dom.getElementsByTagName("node"), sdfdata, lang, inputfilename)
+ self.merge_title(dom.getElementsByTagName("help_section"), sdfdata, lang, inputfilename)
+ self.make_dirs(outputfilename)
+ try:
+ f = open(outputfilename, "w+")
+ str = dom.toxml()
+ f.write(str)
+ except IOError:
+ print "ERROR: Can not write file " + outputfilename
+ sys.exit(-1)
+ else:
+ f.close()
+
+ ##### Helper for parse-once-use-often like parsing a xml file is needed implement it here
+ def parse_file(self, filename):
+ document = ""
+ try:
+ f = open(filename,"r+")
+ document = f.read()
+ except IOError:
+ print "ERROR: Can not read file " + filename
+ else:
+ f.close()
+ return xml.dom.minidom.parseString(document)
+
+ ##### Extract a single File
+ def extract_file(self, inputfile):
+ sdf_data = []
+ dom = self.parse_file(inputfile)
+ sdf_data.extend(self.extract_topic(dom.getElementsByTagName("topic"), inputfile))
+ sdf_data.extend(self.extract_title(dom.getElementsByTagName("help_section"), inputfile))
+ sdf_data.extend(self.extract_title(dom.getElementsByTagName("node"), inputfile))
+ return ''.join([str(line)+"\n" for line in sdf_data])
+
+ def prepare_sdf_line(self, inputfile="", lang="" , id="" , text=""):
+ if lang == "":
+ lang = self._source_language
+ return SdfEntity(project=self._options.project_name, source_file=self.get_filename_string(inputfile),
+ resource_type=self._resource_type, gid=id, lid="", langid=lang,text=text)
+
+run = Xhtex()
+
diff --git a/l10ntools/scripts/tool/xtxex.py b/l10ntools/scripts/tool/xtxex.py
new file mode 100644
index 000000000000..2c5f132530a6
--- /dev/null
+++ b/l10ntools/scripts/tool/xtxex.py
@@ -0,0 +1,93 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+from l10ntool import AbstractL10nTool
+from sdf import SdfEntity
+import sys
+import shutil
+
+class Xtxex(AbstractL10nTool):
+ _resource_type = "xtx"
+
+ def __init__(self):
+ AbstractL10nTool.__init__(self)
+
+ def merge_file(self, inputfilename, outputfilename, parsed_file_ref, lang, is_forced_lang, sdfdata):
+ # Special handling for en-US files
+ if lang == "en-US":
+ mod_outputfilename = outputfilename.replace("_en-US",'')
+ self.copy_file(inputfilename, mod_outputfilename)
+ return
+ # merge usual lang
+ sdfline = self.prepare_sdf_line(inputfilename,lang)
+ if sdfdata.has_key(sdfline.get_id()):
+ line = sdfdata[sdfline.get_id()].text.replace("\\n", '\n')
+ self.make_dirs(outputfilename)
+ try:
+ f = open(outputfilename, "w+")
+ f.write(line)
+ except IOError:
+ print "ERROR: Can not write file " + outputfilename
+ sys.exit(-1)
+ else:
+ f.close()
+ return
+ # no sdf data found then copy en-US source file
+ if is_forced_lang:
+ self.copy_file(inputfilename, outputfilename)
+
+ ##### Extract a single File
+ def extract_file(self, inputfile):
+ lines = []
+ try:
+ f = open(inputfile, "r")
+ lines = f.readlines()
+ except IOError:
+ print "ERROR: Can not open file " + inputfile
+ sys.exit(-1)
+ else:
+ f.close()
+ # remove legal header
+ lines = [line for line in lines if len(line) > 0 and not line[0] == '#']
+ # escape all returns
+ lines = [line.replace('\n', "\\n") for line in lines]
+ line = ''.join(lines)
+ test = str(line)
+ if len(test.strip()):
+ sdf_entity = self.prepare_sdf_line(inputfile);
+ sdf_entity.text = line
+ return str(sdf_entity)
+ else:
+ return ""
+
+ def prepare_sdf_line(self, inputfile="", lang=""):
+ if lang == "":
+ lang = self._source_language
+ return SdfEntity(project=self._options.project_name, source_file=self.get_filename_string(inputfile),
+ resource_type=self._resource_type, gid="none", lid="none", langid=lang,text="")
+
+run = Xtxex()
diff --git a/l10ntools/scripts/xhtex b/l10ntools/scripts/xhtex
new file mode 100755
index 000000000000..ca307cf2d4a4
--- /dev/null
+++ b/l10ntools/scripts/xhtex
@@ -0,0 +1,46 @@
+#!/bin/sh
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+if [ x${SOLARENV}x = xx ]; then
+ echo No environment found, please use 'setsolar'
+exit 1
+fi
+
+if [ ${GUI} = "WNT" ]; then
+if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
+ exec python $SOLARVERSION/$INPATH/bin/xhtex.py "$@"
+else
+ exec python $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xhtex.py "$@"
+fi
+else
+if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
+ exec python -B $SOLARVERSION/$INPATH/bin/xhtex.py "$@"
+else
+ exec python -B $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xhtex.py "$@"
+fi
+fi
diff --git a/l10ntools/scripts/xtxex b/l10ntools/scripts/xtxex
new file mode 100755
index 000000000000..fb54c1aee36c
--- /dev/null
+++ b/l10ntools/scripts/xtxex
@@ -0,0 +1,47 @@
+#!/bin/sh
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+if [ x${SOLARENV}x = xx ]; then
+ echo No environment found, please use 'setsolar'
+exit 1
+fi
+
+if [ ${GUI} = "WNT" ]; then
+if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
+ exec python $SOLARVERSION/$INPATH/bin/xtxex.py "$@"
+else
+ exec python $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xtxex.py "$@"
+fi
+else
+if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
+ exec python -B $SOLARVERSION/$INPATH/bin/xtxex.py "$@"
+else
+ exec python -B $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xtxex.py "$@"
+fi
+fi
+
diff --git a/l10ntools/source/cfglex.l b/l10ntools/source/cfglex.l
index cc92632620be..3fc3aa5b965c 100644
--- a/l10ntools/source/cfglex.l
+++ b/l10ntools/source/cfglex.l
@@ -169,10 +169,6 @@ main( int argc, char* argv[])
FILE *pFile;
pOutput = GetOutputFile( argc, argv );
- if( !isQuiet() ){
- fprintf( stdout, "\nCfgEx 0.9 Copyright 2000, 2010 Oracle and/or its affiliates. All Rights Reserved.\n" );
- fprintf( stdout, "===================================================================================\n" );
- }
if ( !pOutput ) {
fprintf( stdout, "Syntax: CFGEX[-p Prj][-r PrjRoot]-i FileIn [-o FileOut][-m DataBase][-e][-b][-u][-f][-d DoneFile][-g[:dtd] ][-L l1,l2,...]\n" );
@@ -181,7 +177,6 @@ main( int argc, char* argv[])
fprintf( stdout, " FileIn: Source files (*.src)\n" );
fprintf( stdout, " FileOut: Destination file (*.*)\n" );
fprintf( stdout, " DataBase: Mergedata (*.sdf)\n" );
- fprintf( stdout, " -QQ: quiet output\n" );
fprintf( stdout, " -e: Disable writing errorlog\n" );
fprintf( stdout, " -b: Break when Token \"HelpText\" found in source\n" );
fprintf( stdout, " -u: [english] and [german] are allowed, Id is Taken from DataBase \n" );
@@ -213,20 +208,10 @@ main( int argc, char* argv[])
nRetValue = GetError();
EndCfgExport();
- if( !isQuiet() ){
- fprintf( stdout, "\n===================================\n\n" );
- }
removeTempFile();
/* return error level */
return nRetValue;
}
-/*"<!--"[^"-->"]*"-->" {
- bText = 0;
- WorkOnTokenSet( COMMEND, yytext );
-}*/
-/*"<!"[^\-].*\> {
- bText = 0;
- WorkOnTokenSet( CFG_TAG, yytext );
-}*/
+
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index 170c2922d9ce..e8feee1fe3c8 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -59,7 +59,6 @@ BOOL bMergeMode;
BOOL bErrorLog;
BOOL bForce;
BOOL bUTF8;
-bool bQuiet;
ByteString sPrj;
ByteString sPrjRoot;
ByteString sInputFileName;
@@ -83,7 +82,6 @@ extern char *GetOutputFile( int argc, char* argv[])
bErrorLog = TRUE;
bForce = FALSE;
bUTF8 = TRUE;
- bQuiet = false;
sPrj = "";
sPrjRoot = "";
sInputFileName = "";
@@ -128,9 +126,6 @@ extern char *GetOutputFile( int argc, char* argv[])
nState = STATE_FORCE;
bForce = TRUE;
}
- else if ( sSwitch == "-QQ" ) {
- bQuiet = true;
- }
else if ( sSwitch == "-L" ) {
nState = STATE_LANGUAGES;
}
@@ -184,10 +179,6 @@ extern char *GetOutputFile( int argc, char* argv[])
// command line is not valid
return NULL;
}
-int isQuiet(){
- if( bQuiet ) return 1;
- else return 0;
-}
/*****************************************************************************/
int InitCfgExport( char *pOutput , char* pFilename )
/*****************************************************************************/
@@ -247,7 +238,7 @@ extern FILE *GetCfgFile()
if ( !pFile ){
fprintf( stderr, "Error: Could not open file %s\n",
sInputFileName.GetBuffer());
- exit( 13 );
+ exit( -13 );
}
else {
// this is a valid file which can be opened, so
@@ -264,8 +255,6 @@ extern FILE *GetCfgFile()
// printf("sFullEntry = %s\n",sFullEntry.GetBuffer());
sActFileName = sFullEntry.Copy( sPrjEntry.Len() + 1 );
// printf("sActFileName = %s\n",sActFileName.GetBuffer());
- if( !bQuiet )
- fprintf( stdout, "\nProcessing File %s ...\n", sInputFileName.GetBuffer());
sActFileName.SearchAndReplaceAll( "/", "\\" );
@@ -615,7 +604,7 @@ CfgOutputParser::CfgOutputParser( const ByteString &rOutputFile )
Error( sError );
delete pOutputStream;
pOutputStream = NULL;
- exit( 13 );
+ exit( -13 );
}
}
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 59f29525eda4..d6c7a9533309 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -62,7 +62,6 @@ BOOL bErrorLog;
BOOL bBreakWhenHelpText;
BOOL bUnmerge;
BOOL bUTF8;
-bool bQuiet;
ByteString sPrj;
ByteString sPrjRoot;
ByteString sActFileName;
@@ -98,7 +97,6 @@ extern char *GetOutputFile( int argc, char* argv[])
Export::sForcedLanguages = "";
sTempFile = "";
pTempFile = NULL;
- bQuiet = false;
USHORT nState = STATE_NON;
BOOL bInput = FALSE;
@@ -115,9 +113,6 @@ extern char *GetOutputFile( int argc, char* argv[])
else if (sSwitch == "-p" || sSwitch == "-P" ) {
nState = STATE_PRJ; // next token specifies the cur. project
}
- else if (sSwitch == "-qq" || sSwitch == "-QQ" ) {
- bQuiet = true;
- }
else if (sSwitch == "-r" || sSwitch == "-R" ) {
nState = STATE_ROOT; // next token specifies path to project root
@@ -196,12 +191,6 @@ extern char *GetOutputFile( int argc, char* argv[])
return NULL;
}
/*****************************************************************************/
-int isQuiet(){
-/*****************************************************************************/
- if( bQuiet ) return 1;
- else return 0;
-}
-/*****************************************************************************/
int InitExport( char *pOutput , char* pFilename )
/*****************************************************************************/
{
@@ -282,7 +271,6 @@ extern FILE *GetNextFile()
// (e.g.: source\ui\src\menue.src)
sActFileName = sFullEntry.Copy( sPrjEntry.Len() + 1 );
- if( !bQuiet ) fprintf( stdout, "\nProcessing File %s ...\n", sOrigFile.GetBuffer());
sActFileName.SearchAndReplaceAll( "/", "\\" );
sFile = sActFileName;
diff --git a/l10ntools/source/helpex.cxx b/l10ntools/source/helpex.cxx
index 49a59266a85d..15239db5d9bd 100644
--- a/l10ntools/source/helpex.cxx
+++ b/l10ntools/source/helpex.cxx
@@ -61,7 +61,6 @@ ByteString sOutputFile;
ByteString sOutputFileX;
ByteString sOutputFileY;
ByteString sSDFFile;
-bool bQuiet;
/*****************************************************************************/
BOOL ParseCommandLine( int argc, char* argv[])
@@ -73,7 +72,6 @@ BOOL ParseCommandLine( int argc, char* argv[])
bUTF8 = TRUE;
sPrj = "";
sPrjRoot = "";
- bQuiet = false;
Export::sLanguages = "";
Export::sForcedLanguages = "";
@@ -111,9 +109,6 @@ BOOL ParseCommandLine( int argc, char* argv[])
nState = STATE_ERRORLOG;
bErrorLog = FALSE;
}
- else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-QQ" ) {
- bQuiet = true;
- }
else if ( ByteString( argv[ i ]).ToUpperAscii() == "-UTF8" ) {
nState = STATE_UTF8;
bUTF8 = TRUE;
@@ -188,13 +183,12 @@ BOOL ParseCommandLine( int argc, char* argv[])
void Help()
/*****************************************************************************/
{
- fprintf( stdout, "Syntax: HELPEX[-p Prj][-r PrjRoot]-i FileIn ( -o FileOut | -x path -y relfile )[-m DataBase][-e][-b][-u][-L l1,l2,...][-QQ] -LF l1,l2 \n" );
+ fprintf( stdout, "Syntax: HELPEX[-p Prj][-r PrjRoot]-i FileIn ( -o FileOut | -x path -y relfile )[-m DataBase][-e][-b][-u][-L l1,l2,...] -LF l1,l2 \n" );
fprintf( stdout, " Prj: Project\n" );
fprintf( stdout, " PrjRoot: Path to project root (..\\.. etc.)\n" );
fprintf( stdout, " FileIn: Source file (*.lng)\n" );
fprintf( stdout, " FileOut: Destination file (*.*)\n" );
fprintf( stdout, " DataBase: Mergedata (*.sdf)\n" );
- fprintf( stdout, " -QQ: quiet output\n" );
fprintf( stdout, " -L: Restrict the handled languages. l1,l2,... are elements of (en-US,fr,de...)\n" );
fprintf( stdout, " A fallback language can be defined like this: l1=f1.\n" );
fprintf( stdout, " f1, f2,... are also elements of (en-US,fr,de...)\n" );
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 0ab7e6eb5c2e..15cb1e311002 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -181,17 +181,6 @@ bool HelpParser::CreateSDF(
ByteString sActFileName = makeAbsolutePath( sHelpFile , rRoot_in );
-/* DirEntry aEntry( String( sHelpFile, RTL_TEXTENCODING_ASCII_US ));
- aEntry.ToAbs();
- String sFullEntry = aEntry.GetFull();
- aEntry += DirEntry( String( "..", RTL_TEXTENCODING_ASCII_US ));
- aEntry += DirEntry( rRoot_in );
- ByteString sPrjEntry( aEntry.GetFull(), gsl_getSystemTextEncoding());
- ByteString sActFileName(
- sFullEntry.Copy( sPrjEntry.Len() + 1 ), gsl_getSystemTextEncoding());
-
- sActFileName.SearchAndReplaceAll( "/", "\\" );
-*/
XMLHashMap* aXMLStrHM = file->GetStrings();
LangHashMap* pElem;
XMLElement* pXMLElement = NULL;
diff --git a/l10ntools/source/lngex.cxx b/l10ntools/source/lngex.cxx
index c593b85d4932..4ec069a810f5 100644
--- a/l10ntools/source/lngex.cxx
+++ b/l10ntools/source/lngex.cxx
@@ -53,7 +53,6 @@ BOOL bMergeMode;
BOOL bErrorLog;
BOOL bUTF8;
BOOL bULF; // ULF = Unicode Language File
-bool bQuiet;
ByteString sPrj;
ByteString sPrjRoot;
ByteString sOutputFile;
@@ -68,7 +67,6 @@ BOOL ParseCommandLine( int argc, char* argv[])
bErrorLog = TRUE;
bUTF8 = TRUE;
bULF = FALSE;
- bQuiet = false;
sPrj = "";
sPrjRoot = "";
Export::sLanguages = "";
@@ -92,9 +90,6 @@ BOOL ParseCommandLine( int argc, char* argv[])
else if ( sSwitch == "-R" ) {
nState = STATE_ROOT; // next token specifies path to project root
}
- else if ( sSwitch == "-QQ" ) {
- bQuiet = true;
- }
else if ( sSwitch == "-M" ) {
nState = STATE_MERGESRC; // next token specifies the merge database
}
@@ -170,16 +165,12 @@ BOOL ParseCommandLine( int argc, char* argv[])
void Help()
/*****************************************************************************/
{
- //fprintf( stdout, "Syntax:ULFEX[-p Prj][-r PrjRoot]-i FileIn -o FileOut[-m DataBase][-e][-b][-u][-NOUTF8][-ULF][-L l1,l2,...]\n" );
fprintf( stdout, "Syntax:ULFEX[-p Prj][-r PrjRoot]-i FileIn -o FileOut[-m DataBase][-L l1,l2,...]\n" );
fprintf( stdout, " Prj: Project\n" );
fprintf( stdout, " PrjRoot: Path to project root (..\\.. etc.)\n" );
fprintf( stdout, " FileIn: Source file (*.lng)\n" );
fprintf( stdout, " FileOut: Destination file (*.*)\n" );
fprintf( stdout, " DataBase: Mergedata (*.sdf)\n" );
- fprintf( stdout, " -QQ: quite output\n" );
- //fprintf( stdout, " -NOUTF8: disable UTF8 as language independent encoding\n" );
- //fprintf( stdout, " -ULF: enables Unicode Language File format, leads to UTF8 encoded version of lng files" );
fprintf( stdout, " -L: Restrict the handled languages. l1,l2,... are elements of (de,en-US...)\n" );
fprintf( stdout, " A fallback language can be defined like this: l1=f1.\n" );
fprintf( stdout, " f1, f2,... are also elements of (de,en-US...)\n" );
@@ -199,25 +190,16 @@ int _cdecl main( int argc, char *argv[] )
Help();
return 1;
}
- if( !bQuiet ){
- fprintf( stdout, "\nUlfEx 1 Copyright 2000, 2010 Oracle and/or its affiliates. All Rights Reserved.\n" );
- fprintf( stdout, "=================================================================================\n" );
- fprintf( stdout, "\nProcessing File %s ...\n", sInputFile.GetBuffer());
- }else
- {
fprintf(stdout, ".");
fflush( stdout );
- }
if ( sOutputFile.Len()) {
- LngParser aParser( sInputFile, bUTF8, bULF , bQuiet );
+ LngParser aParser( sInputFile, bUTF8, bULF );
if ( bMergeMode )
aParser.Merge( sMergeSrc, sOutputFile , sPrj );
else
aParser.CreateSDF( sOutputFile, sPrj, sPrjRoot );
}
- if( !bQuiet ) fprintf( stdout, "\n=================================================\n\n" );
-
return 0;
}
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index 5f40a4346f53..f0093bbccea7 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -38,15 +38,14 @@ using namespace std;
// class LngParser
//
/*****************************************************************************/
-LngParser::LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat , bool bQuiet_in )
+LngParser::LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat )
/*****************************************************************************/
:
nError( LNG_OK ),
pLines( NULL ),
sSource( rLngFile ),
bDBIsUTF8( bUTF8 ),
- bULF( bULFFormat ),
- bQuiet( bQuiet_in )
+ bULF( bULFFormat )
{
pLines = new LngLineList( 100, 100 );
DirEntry aEntry( String( sSource, RTL_TEXTENCODING_ASCII_US ));
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 6cecb0972cb7..bbc27dc229e7 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -53,10 +53,8 @@ namespace transex3
const char *ExeTable[][5] = {
{ "src", "transex3", " -UTF8 -e", "negative", "noiso" },
{ "hrc", "transex3", " -UTF8 -e", "positive", "noiso" },
- //{ "src", "transex3", "-UTF8 -e", "negative", "noiso" },
- //{ "hrc", "transex3", "-UTF8 -e", "positive", "noiso" },
-
- //{ "lng", "lngex", "-UTF8 -e", "negative", "noiso" },
+ { "tree", "xhtex", "", "negative", "noiso" },
+ { "xtx", "xtxex", "", "negative", "noiso" },
{ "ulf", "ulfex", " -e", "negative", "noiso" },
{ "xrb", "xmlex", "-UTF8 -e", "negative", "iso" },
{ "xxl", "xmlex", "-UTF8 -e", "negative", "iso" },
@@ -136,7 +134,6 @@ private:
ByteString sLanguageRestriction;
ByteString sOutputFile;
- bool bQuiet2;
int nFileCnt;
@@ -169,7 +166,7 @@ private:
);
public:
- SourceTreeLocalizer( const ByteString &rRoot, const ByteString &rVersion , bool bLocal , bool bQuiet2_in , bool skip_links );
+ SourceTreeLocalizer( const ByteString &rRoot, const ByteString &rVersion , bool bLocal , bool skip_links );
~SourceTreeLocalizer();
ByteString getSourceLanguages( ByteString sLanguageRestriction , ByteString sCommand );
@@ -185,11 +182,10 @@ public:
/*****************************************************************************/
SourceTreeLocalizer::SourceTreeLocalizer(
- const ByteString &rRoot, const ByteString &rVersion, bool bLocal_in , bool bQuiet2_in , bool skip_links )
+ const ByteString &rRoot, const ByteString &rVersion, bool bLocal_in , bool skip_links )
/*****************************************************************************/
: SourceTreeIterator( rRoot, rVersion , bLocal_in ),
nMode( LOCALIZE_NONE ),
- bQuiet2( bQuiet2_in ),
nFileCnt( 0 )
{
bSkipLinks = skip_links ;
@@ -325,9 +321,6 @@ void SourceTreeLocalizer::WorkOnFile(
sCommand += getSourceLanguages( sLanguageRestriction , sCommand );
}
- if( bQuiet2 ){
- sCommand +=" -QQ ";
- }
//printf("DBG: %s\n",sCommand.GetBuffer());
if (system(sCommand.GetBuffer()) == -1)
fprintf(stderr, "%s failed\n", sCommand.GetBuffer());
@@ -487,7 +480,6 @@ void SourceTreeLocalizer::OnExecuteDirectory( const rtl::OUString &aDirectory )
{
ByteString rDirectory( rtl::OUStringToOString( aDirectory , RTL_TEXTENCODING_UTF8 , aDirectory.getLength() ) ) ;
if ( nMode == LOCALIZE_NONE ){
- if( !bQuiet2 ) fprintf( stdout, "%s\n", rDirectory.GetBuffer());
}
else
WorkOnDirectory( rDirectory );
@@ -543,7 +535,6 @@ BOOL SourceTreeLocalizer::MergeSingleFile(
ByteString sFile( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
ByteString sBCur( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
- if( !bQuiet2 ) fprintf( stdout, "##### %s #####\n", sBCur.GetBuffer());
ULONG nIndex = 0;
ByteString sExtension( aEntry.GetExtension(), RTL_TEXTENCODING_ASCII_US );
@@ -591,9 +582,6 @@ BOOL SourceTreeLocalizer::MergeSingleFile(
sCommand += " -l ";
sCommand += sLanguageRestriction;
}
- if( bQuiet2 ){
- sCommand +=" -QQ ";
- }
DirEntry aPath( aEntry.GetPath());
DirEntry aOldCWD;
@@ -603,7 +591,6 @@ BOOL SourceTreeLocalizer::MergeSingleFile(
fprintf(stderr, "%s failed\n", sCommand.GetBuffer());
nFileCnt++;
printf(".");
- //if( bQuiet2 ){ printf("."); }
SvFileStream aInStream( aOut.GetFull(), STREAM_READ );
if ( !aInStream.IsOpen()) {
fprintf( stderr,
@@ -794,12 +781,11 @@ void Help()
fprintf( stdout,
"As part of the L10N framework, localize extracts and merges translations\n"
"out of and into the whole source tree.\n\n"
- "Syntax: localize -e -l en-US -f FileName [-QQ]\n"
+ "Syntax: localize -e -l en-US -f FileName \n"
"Parameter:\n"
"\t-e: Extract mode\n"
"\tFileName: Output file when extract mode, input file when merge mode\n"
"\tl1...ln: supported languages (\"all\" for all languages).\n"
- "\tQQ: quiet output)"
);
fprintf( stdout,
@@ -842,15 +828,12 @@ int _cdecl main( int argc, char *argv[] )
BOOL bExport = FALSE;
BOOL bMerge = FALSE;
- bool bQuiet = false;
- bool bQuiet2 = false;
bool bSkipLinks = false;
ByteString sLanguages;
ByteString sFileName;
ByteString sOutput;
- bQuiet2 = true;
bExport = TRUE;
for( int i = 1; i < argc; i++ ) {
@@ -863,17 +846,12 @@ int _cdecl main( int argc, char *argv[] )
return Error();
bExport = TRUE;
}
- else if( sSwitch.Equals( "-Q" )) {
- bQuiet = true;
- }
else if ( sSwitch.Equals( "-I" ) )
nState = STATE_ISOCODE;
else if ( sSwitch.Equals( "-L" ) )
nState = STATE_LANGUAGES;
else if ( sSwitch.Equals( "-F" ) )
nState = STATE_FILENAME;
- else if ( sSwitch.Equals( "-QQ" ))
- bQuiet2 = true;
else if ( ByteString( argv[ i ]).ToUpperAscii().Equals( "-O" ) )
nState = STATE_OUTPUT;
else {
@@ -956,10 +934,10 @@ int _cdecl main( int argc, char *argv[] )
else
curRepository = string( Export::GetEnv("SOURCE_ROOT_DIR") ) + "/" + *iter;
cout << "Localizing repository " << curRepository << "\n";
- SourceTreeLocalizer aIter( ByteString( curRepository.c_str() ) , sVersion , (sOutput.Len() > 0) , bQuiet2 , bSkipLinks );
+ SourceTreeLocalizer aIter( ByteString( curRepository.c_str() ) , sVersion , (sOutput.Len() > 0) , bSkipLinks );
aIter.SetLanguageRestriction( sLanguages );
if ( bExport ){
- if( bQuiet2 ){ /*printf("");*/fflush( stdout );}
+ fflush( stdout );
if( *iter == "ooo" )
aIter.Extract( sFileName );
else
@@ -969,7 +947,7 @@ int _cdecl main( int argc, char *argv[] )
sFileNameWithExt += ByteString( (*iter).c_str() );
aIter.Extract( sFileNameWithExt );
}
- if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());}
+ printf("\n%d files found!\n",aIter.GetFileCnt());
}
}
if( hasPwd )
@@ -977,12 +955,12 @@ int _cdecl main( int argc, char *argv[] )
string pwd;
Export::getCurrentDir( pwd );
cout << "Localizing repository " << pwd << "\n";
- SourceTreeLocalizer aIter( ByteString( pwd.c_str() ) , sVersion , (sOutput.Len() > 0) , bQuiet2 , bSkipLinks );
+ SourceTreeLocalizer aIter( ByteString( pwd.c_str() ) , sVersion , (sOutput.Len() > 0) , bSkipLinks );
aIter.SetLanguageRestriction( sLanguages );
if ( bExport ){
- if( bQuiet2 ){ /*printf("");*/fflush( stdout );}
+ fflush( stdout );
aIter.Extract( sFileName );
- if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());}
+ printf("\n%d files found!\n",aIter.GetFileCnt());
}
}
diff --git a/l10ntools/source/srclex.l b/l10ntools/source/srclex.l
index 473da8b5d511..eb2b6af78b34 100644
--- a/l10ntools/source/srclex.l
+++ b/l10ntools/source/srclex.l
@@ -259,10 +259,6 @@ main( int argc, char* argv[])
FILE *pFile;
pOutput = GetOutputFile( argc, argv );
- if( !isQuiet() ){
- fprintf( stdout, "\nTransEx 3.1 Copyright 2000, 2010 Oracle and/or its affiliates. All Rights Reserved.\n" );
- fprintf( stdout, "=====================================================================================\n" );
- }
if ( !pOutput ) {
fprintf( stdout, "Syntax:TRANSEX[-p Prj][-r PrjRoot]-i FileIn...[-o FileOut][-m DataBase][-e][-b][-u][-L l1,l2,...]\n" );
@@ -301,8 +297,6 @@ main( int argc, char* argv[])
nRetValue = GetError();
EndExport();
- if( !isQuiet() ) fprintf( stdout, "\n===================================\n\n" );
-
/* return error level */
return nRetValue;
}
diff --git a/l10ntools/source/xrmlex.l b/l10ntools/source/xrmlex.l
index 4770a851c741..6229525d7e84 100644
--- a/l10ntools/source/xrmlex.l
+++ b/l10ntools/source/xrmlex.l
@@ -180,10 +180,6 @@ main( int argc, char* argv[])
FILE *pFile;
pOutput = GetOutputFile( argc, argv );
- if( !isQuiet() ){
- fprintf( stdout, "\nXrmEx 0.9 Copyright 2000, 2010 Oracle and/or its affiliates. All Rights Reserved.\n" );
- fprintf( stdout, "===================================================================================\n" );
- }
if ( !pOutput ) {
fprintf( stdout, "Syntax: XRMEX[-p Prj][-r PrjRoot]-i FileIn [-o FileOut][-m DataBase][-e][-b][-u][-NOUTF8][-L l1,l2,...]\n" );
@@ -222,7 +218,6 @@ main( int argc, char* argv[])
nRetValue = GetError();
EndXrmExport();
- if( !isQuiet() ) fprintf( stdout, "\n===================================\n\n" );
removeTempFile();
/* return error level */
return nRetValue;
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index b77f75ea04e5..fa7fdb4b4376 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -61,7 +61,6 @@ BOOL bEnableExport;
BOOL bMergeMode;
BOOL bErrorLog;
BOOL bUTF8;
-bool bQuiet;
ByteString sPrj;
ByteString sPrjRoot;
ByteString sInputFileName;
@@ -87,7 +86,6 @@ extern char *GetOutputFile( int argc, char* argv[])
sInputFileName = "";
sActFileName = "";
Export::sLanguages = "";
- bQuiet = false;
USHORT nState = STATE_NON;
BOOL bInput = FALSE;
@@ -108,9 +106,6 @@ extern char *GetOutputFile( int argc, char* argv[])
else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-M" ) {
nState = STATE_MERGESRC; // next token specifies the merge database
}
- else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-QQ" ) {
- bQuiet = true;
- }
else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-E" ) {
nState = STATE_ERRORLOG;
bErrorLog = FALSE;
@@ -199,10 +194,6 @@ int InitXrmExport( char *pOutput , char* pFilename)
return 1;
}
-int isQuiet(){
- if( bQuiet ) return 1;
- else return 0;
-}
/*****************************************************************************/
int EndXrmExport()
/*****************************************************************************/
@@ -252,8 +243,6 @@ extern FILE *GetXrmFile()
// (e.g.: source\ui\src\menue.src)
sActFileName = sFullEntry.Copy( sPrjEntry.Len() + 1 );
- if( !bQuiet )
- fprintf( stdout, "\nProcessing File %s ...\n", sInputFileName.GetBuffer());
sActFileName.SearchAndReplaceAll( "/", "\\" );
diff --git a/libtextcat/makefile.mk b/libtextcat/makefile.mk
index 01a2a6eadc36..f14a69bd5113 100644
--- a/libtextcat/makefile.mk
+++ b/libtextcat/makefile.mk
@@ -30,6 +30,12 @@ PRJ=.
PRJNAME=libtextcat
TARGET=libtextcat
+.IF "$(SYSTEM_LIBTEXTCAT)" == "YES"
+all:
+ @echo "An already available installation of libtextcat should exist on your system."
+ @echo "Therefore the version provided here does not need to be built in addition."
+.ENDIF
+
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
diff --git a/lingucomponent/prj/build.lst b/lingucomponent/prj/build.lst
index 045aaee82999..15ee595c67c0 100644
--- a/lingucomponent/prj/build.lst
+++ b/lingucomponent/prj/build.lst
@@ -1,4 +1,4 @@
-lc lingucomponent : linguistic libtextcat svl HYPHEN:hyphen HUNSPELL:hunspell MYTHES:mythes NULL
+lc lingucomponent : linguistic LIBTEXTCAT:libtextcat LIBTEXTCATDATA:libtextcat svl HYPHEN:hyphen HUNSPELL:hunspell MYTHES:mythes NULL
lc lingucomponent usr1 - all lc_mkout NULL
lc lingucomponent\inc nmake - all lc_inc NULL
lc lingucomponent\source\lingutil nmake - all lc_util lc_inc NULL
diff --git a/more_fonts/fonts/ttf_liberation/makefile.mk b/more_fonts/fonts/ttf_liberation/makefile.mk
index de711a644690..a49c568e2770 100644
--- a/more_fonts/fonts/ttf_liberation/makefile.mk
+++ b/more_fonts/fonts/ttf_liberation/makefile.mk
@@ -36,8 +36,8 @@ TARGET=ttf_liberation
# --- Files --------------------------------------------------------
-TARFILE_NAME=liberation-fonts-ttf-1.05.3.20100427
-TARFILE_MD5=ef9ab6c1740682fbd730606d5f6922e6
+TARFILE_NAME=liberation-fonts-ttf-1.06.0.20100721
+TARFILE_MD5=ca4870d899fd7e943ffc310a5421ad4d
TARFILE_ROOTDIR=.
PATCH_FILES=
diff --git a/more_fonts/prj/d.lst b/more_fonts/prj/d.lst
index 0bc15242b086..261aae0b2d28 100644
--- a/more_fonts/prj/d.lst
+++ b/more_fonts/prj/d.lst
@@ -1,9 +1,10 @@
mkdir: %COMMON_DEST%\pck%_EXT%
..\fonts\fc_local.conf %COMMON_DEST%\pck%_EXT%\fc_local.conf
+# TODO: replace explicit versions by wildcard when the build system learns to handle them
..\%__SRC%\misc\build\dejavu-fonts-ttf-2.30\ttf\*.ttf %COMMON_DEST%\pck%_EXT%\*.ttf
..\%__SRC%\misc\build\dejavu-fonts-ttf-2.30\LICENSE %COMMON_DEST%\pck%_EXT%\LICENSE_dejavu
-..\%__SRC%\misc\build\Liberation*.ttf %COMMON_DEST%\pck%_EXT%\*.ttf
-..\%__SRC%\misc\build\License.txt %COMMON_DEST%\pck%_EXT%\LICENSE_liberation
+..\%__SRC%\misc\build\liberation-fonts-ttf-1.06.0.20100721/Liberation*.ttf %COMMON_DEST%\pck%_EXT%\*.ttf
+..\%__SRC%\misc\build\liberation-fonts-ttf-1.06.0.20100721/License.txt %COMMON_DEST%\pck%_EXT%\LICENSE_liberation
..\%__SRC%\misc\build\gentiumbasic-fonts-1.10\*.ttf %COMMON_DEST%\pck%_EXT%\*.ttf
..\%__SRC%\misc\build\gentiumbasic-fonts-1.10\OFL.txt %COMMON_DEST%\pck%_EXT%\LICENSE_gentium
diff --git a/mysqlc/source/mysqlc_connection.cxx b/mysqlc/source/mysqlc_connection.cxx
index 267f16558233..9e32ecebb9c3 100644
--- a/mysqlc/source/mysqlc_connection.cxx
+++ b/mysqlc/source/mysqlc_connection.cxx
@@ -35,13 +35,13 @@
#include "mysqlc_preparedstatement.hxx"
#include "mysqlc_general.hxx"
-#include <tools/preextstl.h>
+#include <preextstl.h>
#include <cppconn/driver.h>
#include <cppconn/connection.h>
#include <cppconn/statement.h>
#include <cppconn/metadata.h>
#include <cppconn/exception.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
diff --git a/mysqlc/source/mysqlc_connection.hxx b/mysqlc/source/mysqlc_connection.hxx
index b59fb630ac37..583881718a79 100644
--- a/mysqlc/source/mysqlc_connection.hxx
+++ b/mysqlc/source/mysqlc_connection.hxx
@@ -46,9 +46,9 @@
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
#include <com/sun/star/util/XStringSubstitution.hpp>
-#include <tools/preextstl.h>
+#include <preextstl.h>
#include <cppconn/driver.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
#include <cppuhelper/compbase3.hxx>
#include <cppuhelper/weakref.hxx>
#include <rtl/string.hxx>
diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx b/mysqlc/source/mysqlc_databasemetadata.cxx
index 076435c01d9b..06131fc5de2b 100644
--- a/mysqlc/source/mysqlc_databasemetadata.cxx
+++ b/mysqlc/source/mysqlc_databasemetadata.cxx
@@ -54,13 +54,13 @@ using namespace com::sun::star::sdbc;
using ::rtl::OUString;
using mysqlc_sdbc_driver::getStringFromAny;
-#include <tools/preextstl.h>
+#include <preextstl.h>
#include <cppconn/connection.h>
#include <cppconn/resultset.h>
#include <cppconn/metadata.h>
#include <cppconn/statement.h>
#include <cppconn/prepared_statement.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
static ext_std::string wild("%");
diff --git a/mysqlc/source/mysqlc_databasemetadata.hxx b/mysqlc/source/mysqlc_databasemetadata.hxx
index f7f659ce97b8..bb526cd391f0 100644
--- a/mysqlc/source/mysqlc_databasemetadata.hxx
+++ b/mysqlc/source/mysqlc_databasemetadata.hxx
@@ -39,9 +39,9 @@
#include <cppuhelper/implbase1.hxx>
#endif
-#include <tools/preextstl.h>
+#include <preextstl.h>
#include <cppconn/metadata.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
namespace connectivity
{
diff --git a/mysqlc/source/mysqlc_driver.cxx b/mysqlc/source/mysqlc_driver.cxx
index 3513b8072d60..ff2c1510dfc3 100644
--- a/mysqlc/source/mysqlc_driver.cxx
+++ b/mysqlc/source/mysqlc_driver.cxx
@@ -38,13 +38,12 @@ using namespace connectivity::mysqlc;
using ::rtl::OUString;
#include <stdio.h>
-#include <tools/preextstl.h>
+#include <preextstl.h>
#include <cppconn/exception.h>
-
#ifdef SYSTEM_MYSQL_CPPCONN
#include <mysql_driver.h>
#endif
-#include <tools/postextstl.h>
+#include <postextstl.h>
/* {{{ MysqlCDriver::MysqlCDriver() -I- */
diff --git a/mysqlc/source/mysqlc_driver.hxx b/mysqlc/source/mysqlc_driver.hxx
index 06e399ca6542..128a4f9ee0cf 100644
--- a/mysqlc/source/mysqlc_driver.hxx
+++ b/mysqlc/source/mysqlc_driver.hxx
@@ -36,9 +36,9 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/compbase2.hxx>
-#include <tools/preextstl.h>
+#include <preextstl.h>
#include <cppconn/driver.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
#include <osl/module.h>
namespace connectivity
diff --git a/mysqlc/source/mysqlc_general.hxx b/mysqlc/source/mysqlc_general.hxx
index 632fb75dd65f..6d18c2139a9c 100644
--- a/mysqlc/source/mysqlc_general.hxx
+++ b/mysqlc/source/mysqlc_general.hxx
@@ -33,9 +33,9 @@
#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
-#include <tools/preextstl.h>
+#include <preextstl.h>
#include <cppconn/exception.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
namespace mysqlc_sdbc_driver
{
diff --git a/mysqlc/source/mysqlc_preparedstatement.hxx b/mysqlc/source/mysqlc_preparedstatement.hxx
index eb53bdcbd839..b1ae671b0891 100644
--- a/mysqlc/source/mysqlc_preparedstatement.hxx
+++ b/mysqlc/source/mysqlc_preparedstatement.hxx
@@ -48,9 +48,9 @@
#include <com/sun/star/io/XInputStream.hpp>
#endif
-#include <tools/preextstl.h>
+#include <preextstl.h>
#include <cppconn/prepared_statement.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
namespace connectivity
{
diff --git a/mysqlc/source/mysqlc_resultsetmetadata.hxx b/mysqlc/source/mysqlc_resultsetmetadata.hxx
index ca3844d63351..429cb2656f1f 100644
--- a/mysqlc/source/mysqlc_resultsetmetadata.hxx
+++ b/mysqlc/source/mysqlc_resultsetmetadata.hxx
@@ -35,9 +35,9 @@
#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
#include <cppuhelper/implbase1.hxx>
-#include <tools/preextstl.h>
+#include <preextstl.h>
#include <cppconn/resultset_metadata.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
namespace connectivity
{
diff --git a/mysqlc/source/mysqlc_statement.hxx b/mysqlc/source/mysqlc_statement.hxx
index 34273f617d58..2fa4aaea769d 100644
--- a/mysqlc/source/mysqlc_statement.hxx
+++ b/mysqlc/source/mysqlc_statement.hxx
@@ -13,9 +13,9 @@
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
#include <com/sun/star/util/XCancellable.hpp>
-#include <tools/preextstl.h>
+#include <preextstl.h>
#include <cppconn/statement.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
#include <cppuhelper/compbase5.hxx>
#include <list>
diff --git a/o3tl/qa/makefile.mk b/o3tl/qa/makefile.mk
index 3475aeeca9bb..0c6ecd88e56b 100644
--- a/o3tl/qa/makefile.mk
+++ b/o3tl/qa/makefile.mk
@@ -36,6 +36,13 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
+#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)
.IF "$(L10N_framework)"==""
diff --git a/o3tl/qa/test-cow_wrapper.cxx b/o3tl/qa/test-cow_wrapper.cxx
index 84d615fca3db..cd69ab1c5e3d 100644
--- a/o3tl/qa/test-cow_wrapper.cxx
+++ b/o3tl/qa/test-cow_wrapper.cxx
@@ -1,9 +1,11 @@
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
#include "cppunit/plugin/TestPlugIn.h"
+#include "postextstl.h"
#include "cow_wrapper_clients.hxx"
diff --git a/o3tl/qa/test-heap_ptr.cxx b/o3tl/qa/test-heap_ptr.cxx
index fe2f78eec8af..63ec692efe5c 100644
--- a/o3tl/qa/test-heap_ptr.cxx
+++ b/o3tl/qa/test-heap_ptr.cxx
@@ -25,9 +25,11 @@
*
************************************************************************/
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
#include <o3tl/heap_ptr.hxx>
diff --git a/o3tl/qa/test-range.cxx b/o3tl/qa/test-range.cxx
index 31cf2aec7c10..634b04de9122 100644
--- a/o3tl/qa/test-range.cxx
+++ b/o3tl/qa/test-range.cxx
@@ -25,9 +25,11 @@
*
************************************************************************/
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
#include <o3tl/range.hxx>
#include <vector>
diff --git a/o3tl/qa/test-vector_pool.cxx b/o3tl/qa/test-vector_pool.cxx
index 4efaebdd3414..ab301752532e 100644
--- a/o3tl/qa/test-vector_pool.cxx
+++ b/o3tl/qa/test-vector_pool.cxx
@@ -1,8 +1,10 @@
// autogenerated file with codegen.pl
+#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
+#include "postextstl.h"
#include <o3tl/vector_pool.hxx>
diff --git a/offapi/com/sun/star/deployment/ExtensionRemovedException.idl b/offapi/com/sun/star/deployment/ExtensionRemovedException.idl
index bb3116c9f554..1cd400e248d6 100644
--- a/offapi/com/sun/star/deployment/ExtensionRemovedException.idl
+++ b/offapi/com/sun/star/deployment/ExtensionRemovedException.idl
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VersionException.idl,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/offapi/com/sun/star/deployment/InvalidRemovedParameterException.idl b/offapi/com/sun/star/deployment/InvalidRemovedParameterException.idl
index 3a2cb5e330cc..0f0407b0e989 100644
--- a/offapi/com/sun/star/deployment/InvalidRemovedParameterException.idl
+++ b/offapi/com/sun/star/deployment/InvalidRemovedParameterException.idl
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VersionException.idl,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/offapi/com/sun/star/deployment/Prerequisites.idl b/offapi/com/sun/star/deployment/Prerequisites.idl
index 52987ad9bd77..82999ef4a41c 100644
--- a/offapi/com/sun/star/deployment/Prerequisites.idl
+++ b/offapi/com/sun/star/deployment/Prerequisites.idl
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: KeyUsage.idl,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/offapi/com/sun/star/script/XLibraryContainer3.idl b/offapi/com/sun/star/script/XLibraryContainer3.idl
index cb3f2a5e0f6c..1045fc7a295c 100644
--- a/offapi/com/sun/star/script/XLibraryContainer3.idl
+++ b/offapi/com/sun/star/script/XLibraryContainer3.idl
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: XLibraryContainer2.idl,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/offapi/com/sun/star/script/makefile.mk b/offapi/com/sun/star/script/makefile.mk
index 24d5fcc83af4..da8e9110d1fa 100644
--- a/offapi/com/sun/star/script/makefile.mk
+++ b/offapi/com/sun/star/script/makefile.mk
@@ -49,10 +49,8 @@ IDLFILES=\
XPersistentLibraryContainer.idl\
XStorageBasedLibraryContainer.idl\
ModuleSizeExceededRequest.idl\
- XVBACompat.idl\
- XVBAModuleInfo.idl\
ModuleInfo.idl\
- ModuleType.idl\
+ ModuleType.idl
# ------------------------------------------------------------------
diff --git a/offapi/com/sun/star/script/vba/VBAEventId.idl b/offapi/com/sun/star/script/vba/VBAEventId.idl
new file mode 100755
index 000000000000..fda83a18d495
--- /dev/null
+++ b/offapi/com/sun/star/script/vba/VBAEventId.idl
@@ -0,0 +1,140 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_script_vba_VBAEventId_idl__
+#define __com_sun_star_script_vba_VBAEventId_idl__
+
+//=============================================================================
+
+module com { module sun { module star { module script { module vba {
+
+//=============================================================================
+
+/** Constants used to identify VBA document events.
+
+ <p>If one of these events is fired, a specific VBA macro in a specific
+ document code module will be executed.</p>
+
+ <p>Each event expects some specific arguments to be passed to
+ <member>XVBAEventProcessor::processVbaEvent</member>.</p>
+
+ @see XVBAEventProcessor
+ */
+constants VBAEventId
+{
+ //=========================================================================
+
+ /** An identifier not corresponding to any VBA document event. */
+ const long NO_EVENT = -1;
+
+ //=========================================================================
+ // Global events (identifiers from 1 to 999)
+
+ /** New document opened from template. No arguments. */
+ const long AUTO_NEW = 1;
+ /** Document opened (loaded). No arguments. */
+ const long AUTO_OPEN = 2;
+ /** Document about to be closed. No arguments. */
+ const long AUTO_CLOSE = 3;
+ /** Application start. No arguments. */
+ const long AUTO_EXEC = 4;
+ /** Application exit. No arguments. */
+ const long AUTO_EXIT = 5;
+
+ //=========================================================================
+ // MS Word (identifiers from 1001 to 1999)
+
+ /** New text document opened from template. No arguments. */
+ const long DOCUMENT_NEW = 1001;
+ /** Text document opened (loaded). No arguments. */
+ const long DOCUMENT_OPEN = 1002;
+ /** Document about to be closed. No arguments. */
+ const long DOCUMENT_CLOSE = 1003;
+
+ //=========================================================================
+ // MS Excel (identifiers from 2001 to 2999)
+
+ //-------------------------------------------------------------------------
+ // document events (2001-2099)
+
+ /** Document activated. No arguments. */
+ const long WORKBOOK_ACTIVATE = 2001;
+ /** Document deactivated. No arguments. */
+ const long WORKBOOK_DEACTIVATE = 2002;
+ /** Document opened (loaded). No arguments. */
+ const long WORKBOOK_OPEN = 2003;
+ /** Document about to be closed. Arguments: [out] boolean bCancel. */
+ const long WORKBOOK_BEFORECLOSE = 2004;
+ /** Document about to be printed. Arguments: [out] boolean bCancel. */
+ const long WORKBOOK_BEFOREPRINT = 2005;
+ /** Document about to be saved. Arguments: boolean bSaveAs, [out] boolean bCancel. */
+ const long WORKBOOK_BEFORESAVE = 2006;
+ /** Document has been saved. Arguments: boolean bSuccess. */
+ const long WORKBOOK_AFTERSAVE = 2007;
+ /** New sheet inserted. Arguments: short nSheet. */
+ const long WORKBOOK_NEWSHEET = 2008;
+ /** Document window has been activated. No arguments. */
+ const long WORKBOOK_WINDOWACTIVATE = 2009;
+ /** Document window has been deactivated. No arguments. */
+ const long WORKBOOK_WINDOWDEACTIVATE = 2010;
+ /** Document window has been resized. No arguments. */
+ const long WORKBOOK_WINDOWRESIZE = 2011;
+
+ //-------------------------------------------------------------------------
+ // sheet events (2101-2199)
+
+ /** Worksheet has been activated (made visible). Arguments: short nSheet. */
+ const long WORKSHEET_ACTIVATE = 2101;
+ /** Worksheet has been activated (made visible). Arguments: short nSheet. */
+ const long WORKSHEET_DEACTIVATE = 2102;
+ /** Double click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange, [out] boolean bCancel. */
+ const long WORKSHEET_BEFOREDOUBLECLICK = 2103;
+ /** Right click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange, [out] boolean bCancel. */
+ const long WORKSHEET_BEFORERIGHTCLICK = 2104;
+ /** Cells in sheet have been recalculated. Arguments: short nSheet. */
+ const long WORKSHEET_CALCULATE = 2105;
+ /** Cells in sheet have been changed. Arguments: XRange/XSheetCellRangeContainer aRange. */
+ const long WORKSHEET_CHANGE = 2106;
+ /** Selection in sheet has been changed. Arguments: XRange/XSheetCellRangeContainer aRange. */
+ const long WORKSHEET_SELECTIONCHANGE = 2107;
+ /** Hyperlink has been clicked. Arguments: XCell aCell. */
+ const long WORKSHEET_FOLLOWHYPERLINK = 2108;
+
+ //=========================================================================
+
+ /** Implementations are allowed to use identifiers above this value for any
+ internal purpose. */
+ const long USERDEFINED_START = 1000000;
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/sfx2/source/appl/sfxdll.cxx b/offapi/com/sun/star/script/vba/VBAEventProcessor.idl
index 956a61b3e247..d993b37ae250 100644..100755
--- a/sfx2/source/appl/sfxdll.cxx
+++ b/offapi/com/sun/star/script/vba/VBAEventProcessor.idl
@@ -25,45 +25,25 @@
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sfx2.hxx"
+#ifndef __com_sun_star_script_vba_VBAEventProcessor_idl__
+#define __com_sun_star_script_vba_VBAEventProcessor_idl__
-#ifdef WIN
-#include <svwin.h>
-#endif
-
-#ifndef GCC
-#endif
+#include <com/sun/star/script/vba/XVBAEventProcessor.idl>
-#ifdef WIN
+//=============================================================================
-// Statische DLL-Verwaltungs-Variablen
-static HINSTANCE hDLLInst = 0;
+module com { module sun { module star { module script { module vba {
-//==========================================================================
+//=============================================================================
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
+service VBAEventProcessor : XVBAEventProcessor
{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
+};
- return TRUE;
-}
+//=============================================================================
+}; }; }; }; };
-//--------------------------------------------------------------------------
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-
-//==========================================================================
+//=============================================================================
#endif
-
diff --git a/offapi/com/sun/star/script/vba/VBASpreadsheetEventProcessor.idl b/offapi/com/sun/star/script/vba/VBASpreadsheetEventProcessor.idl
new file mode 100755
index 000000000000..ce202da4f54c
--- /dev/null
+++ b/offapi/com/sun/star/script/vba/VBASpreadsheetEventProcessor.idl
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_script_vba_VBASpreadsheetEventProcessor_idl__
+#define __com_sun_star_script_vba_VBASpreadsheetEventProcessor_idl__
+
+#include <com/sun/star/script/vba/VBAEventProcessor.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module script { module vba {
+
+//=============================================================================
+
+service VBASpreadsheetEventProcessor
+{
+ service VBAEventProcessor;
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/script/vba/VBATextEventProcessor.idl b/offapi/com/sun/star/script/vba/VBATextEventProcessor.idl
new file mode 100755
index 000000000000..fd3c7f895d8d
--- /dev/null
+++ b/offapi/com/sun/star/script/vba/VBATextEventProcessor.idl
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_script_vba_VBATextEventProcessor_idl__
+#define __com_sun_star_script_vba_VBATextEventProcessor_idl__
+
+#include <com/sun/star/script/vba/VBAEventProcessor.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module script { module vba {
+
+//=============================================================================
+
+service VBATextEventProcessor
+{
+ service VBAEventProcessor;
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/script/XVBACompat.idl b/offapi/com/sun/star/script/vba/XVBACompatibility.idl
index 09da54eb27cd..bfa9d01655fa 100644
--- a/offapi/com/sun/star/script/XVBACompat.idl
+++ b/offapi/com/sun/star/script/vba/XVBACompatibility.idl
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: XLibraryContainer.idl,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -27,23 +24,27 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef __com_sun_star_script_XVBACompat_idl__
-#define __com_sun_star_script_XVBACompat_idl__
-#ifndef __com_sun_star_uno_XInterface_idl__
+#ifndef __com_sun_star_script_vba_XVBACompatibility_idl__
+#define __com_sun_star_script_vba_XVBACompatibility_idl__
+
#include <com/sun/star/uno/XInterface.idl>
-#endif
//=============================================================================
-module com { module sun { module star { module script {
+module com { module sun { module star { module script { module vba {
-interface XVBACompat: com::sun::star::uno::XInterface
+interface XVBACompatibility
{
+ //-------------------------------------------------------------------------
-//=============================================================================
- [attribute ] boolean VBACompatModeOn;
+ [attribute] boolean VBACompatibilityMode;
-}; }; }; };
+ //-------------------------------------------------------------------------
};
+
+}; }; }; }; };
+
+//=============================================================================
+
#endif
diff --git a/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl b/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl
new file mode 100755
index 000000000000..4a3534de8412
--- /dev/null
+++ b/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl
@@ -0,0 +1,106 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_script_vba_XVBAEventProcessor_idl__
+#define __com_sun_star_script_vba_XVBAEventProcessor_idl__
+
+#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#include <com/sun/star/script/provider/ScriptFrameworkErrorException.idl>
+#include <com/sun/star/util/VetoException.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module script { module vba {
+
+//=============================================================================
+
+/** Executes VBA event handlers.
+ */
+interface XVBAEventProcessor
+{
+ //-------------------------------------------------------------------------
+
+ /** Returns whether a VBA event handler exists.
+
+ @param nEventId
+ The identifier of the event. Must be a constant from <type>VBAEventId</type>.
+
+ @param aArgs
+ Additional arguments needed to identify some event handlers, e.g. a
+ sheet index for spreadsheet events.
+
+ @return
+ <TRUE/>, if the VBA event handler exists.
+
+ @throws <type scope="::com::sun::star::lang">IllegalArgumentException</type>
+ if the passed event identifier is not supported, or if the passed
+ specifier is required but invalid.
+ **/
+ boolean hasVbaEventHandler( [in] long nEventId, [in] sequence< any > aArgs )
+ raises (::com::sun::star::lang::IllegalArgumentException);
+
+ //-------------------------------------------------------------------------
+
+ /** Executes a VBA event handler.
+
+ @param nEventId
+ The identifier of the event. Must be a constant from <type>VBAEventId</type>.
+
+ @param aArgs
+ The input arguments needed to create the argument list of the VBA
+ event handler.
+
+ @throws <type scope="::com::sun::star::lang">IllegalArgumentException</type>
+ if the passed event identifier is not supported, or if the passed
+ arguments do not conform to the arguments expected by the specified
+ event.
+
+ @throws <type scope="::com::sun::star::script::provider">ScriptFrameworkErrorException</type>
+ if the VBA event handler could not be invoked. Reasons may be, that
+ handling of VBA events is not enabled, that the VBA event handler
+ macro has not been found, or that the execution of the macro has
+ been aborted with an error.
+
+ @throws <type scope="::com::sun::star::util">VetoException</type>
+ if the VBA event handler has indicated to veto the event.
+ **/
+ void processVbaEvent( [in] long nEventId, [in] sequence< any > aArgs )
+ raises (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::script::provider::ScriptFrameworkErrorException,
+ ::com::sun::star::util::VetoException);
+
+ //-------------------------------------------------------------------------
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/script/XVBAModuleInfo.idl b/offapi/com/sun/star/script/vba/XVBAModuleInfo.idl
index f9c4e64223c3..9954281a5a71 100644
--- a/offapi/com/sun/star/script/XVBAModuleInfo.idl
+++ b/offapi/com/sun/star/script/vba/XVBAModuleInfo.idl
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: XLibraryContainer.idl,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -27,47 +24,52 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef __com_sun_star_script_XVBACompat_idl__
-#define __com_sun_star_script_XVBACompat_idl__
-#ifndef __com_sun_star_uno_XInterface_idl__
+#ifndef __com_sun_star_script_vba_XVBAModuleInfo_idl__
+#define __com_sun_star_script_vba_XVBAModuleInfo_idl__
+
#include <com/sun/star/uno/XInterface.idl>
-#endif
-#ifndef __com_sun_star_script_ModuleInfo_idl__
#include <com/sun/star/script/ModuleInfo.idl>
-#endif
-#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
#include <com/sun/star/lang/IllegalArgumentException.idl>
-#endif
-#ifndef __com_sun_star_container_ElementExistException_idl__
#include <com/sun/star/container/ElementExistException.idl>
-#endif
-#ifndef __com_sun_star_lang_WrappedTargetException_idl__
#include <com/sun/star/lang/WrappedTargetException.idl>
-#endif
-#ifndef __com_sun_star_container_NoSuchElementException_idl__
#include <com/sun/star/container/NoSuchElementException.idl>
-#endif
//=============================================================================
-module com { module sun { module star { module script {
+module com { module sun { module star { module script { module vba {
-interface XVBAModuleInfo: com::sun::star::uno::XInterface
+interface XVBAModuleInfo
{
+ //-------------------------------------------------------------------------
- com::sun::star::script::ModuleInfo getModuleInfo( [in] string ModuleName )
+ com::sun::star::script::ModuleInfo getModuleInfo( [in] string ModuleName )
raises( com::sun::star::container::NoSuchElementException,
com::sun::star::lang::WrappedTargetException );
- boolean hasModuleInfo( [in] string ModuleName );
+
+ //-------------------------------------------------------------------------
+
+ boolean hasModuleInfo( [in] string ModuleName );
+
+ //-------------------------------------------------------------------------
+
void insertModuleInfo( [in] string ModuleName,
[in] com::sun::star::script::ModuleInfo ModuleInfo )
raises( com::sun::star::lang::IllegalArgumentException,
com::sun::star::container::ElementExistException,
com::sun::star::lang::WrappedTargetException );
+
+ //-------------------------------------------------------------------------
+
void removeModuleInfo( [in] string ModuleName )
raises( com::sun::star::container::NoSuchElementException,
com::sun::star::lang::WrappedTargetException );
-}; }; }; };
+
+ //-------------------------------------------------------------------------
};
+
+}; }; }; }; };
+
+//=============================================================================
+
#endif
diff --git a/tools/source/solar/makefile.mk b/offapi/com/sun/star/script/vba/makefile.mk
index 6f5dd85c608b..4657b587d7d8 100644..100755
--- a/tools/source/solar/makefile.mk
+++ b/offapi/com/sun/star/script/vba/makefile.mk
@@ -25,39 +25,28 @@
#
#*************************************************************************
-PRJ=..$/..
+PRJ=..$/..$/..$/..$/..
-PRJNAME=tools
-TARGET=mksvconf
-TARGETTYPE=CUI
+PRJNAME=offapi
-LIBSALCPPRT=$(0)
+TARGET=cssscriptvba
+PACKAGE=com$/sun$/star$/script$/vba
# --- Settings -----------------------------------------------------
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
+# ------------------------------------------------------------------------
-# --- Files --------------------------------------------------------
+IDLFILES=\
+ VBAEventId.idl \
+ VBAEventProcessor.idl \
+ VBASpreadsheetEventProcessor.idl \
+ VBATextEventProcessor.idl \
+ XVBACompatibility.idl \
+ XVBAEventProcessor.idl \
+ XVBAModuleInfo.idl
-CFILES= solar.c
-
-OBJFILES= $(OBJ)$/solar.obj
-
-APP1TARGET= $(TARGET)
-APP1OBJS= $(OBJFILES)
-APP1STDLIBS=
-APP1DEPN=
-APP1DEF=
-
-# --- Targets ------------------------------------------------------
+# ------------------------------------------------------------------
.INCLUDE : target.mk
-
-.IF "$(L10N-framework)"==""
-ALLTAR : $(INCCOM)$/svconf.h
-.ENDIF # "$(L10N-framework)"==""
-
-$(INCCOM)$/svconf.h : $(BIN)$/$(TARGET)
- $(BIN)$/$(TARGET) $@
-
+.INCLUDE : $(PRJ)$/util$/target.pmk
diff --git a/offapi/prj/build.lst b/offapi/prj/build.lst
index a0be2398f429..bc6dda566031 100644
--- a/offapi/prj/build.lst
+++ b/offapi/prj/build.lst
@@ -3,6 +3,7 @@ oa offapi usr1 - all oa_mkout NULL
oa offapi\com\sun\star\script nmake - all oa_script oa_embed NULL
oa offapi\com\sun\star\script\browse nmake - all oa_sfbrowse NULL
oa offapi\com\sun\star\script\provider nmake - all oa_sfprovider NULL
+oa offapi\com\sun\star\script\vba nmake - all oa_script_vba NULL
oa offapi\com\sun\star\auth nmake - all oa_auth NULL
oa offapi\com\sun\star\accessibility nmake - all oa_accessibility oa_awt NULL
oa offapi\com\sun\star\awt nmake - all oa_awt NULL
@@ -21,10 +22,10 @@ oa offapi\com\sun\star\datatransfer\dnd nmake - all oa_datatrans_dnd oa_awt NULL
oa offapi\com\sun\star\deployment nmake - all oa_deployment oa_ucb oa_xml_input NULL
oa offapi\com\sun\star\deployment\test nmake - all oa_deploymenttest oa_ucb NULL
oa offapi\com\sun\star\deployment\ui nmake - all oa_deployment_ui oa_awt oa_ui_dialogs NULL
-oa offapi\com\sun\star\embed nmake - all oa_embed NULL
oa offapi\com\sun\star\document nmake - all oa_docu oa_embed NULL
oa offapi\com\sun\star\drawing nmake - all oa_draw NULL
oa offapi\com\sun\star\drawing\framework nmake - all oa_draw_framework NULL
+oa offapi\com\sun\star\embed nmake - all oa_embed NULL
oa offapi\com\sun\star\form nmake - all oa_form oa_inspection NULL
oa offapi\com\sun\star\form\component nmake - all oa_fcomp oa_form oa_form_submission NULL
oa offapi\com\sun\star\form\inspection nmake - all oa_finsp oa_fcomp oa_inspection NULL
@@ -105,4 +106,4 @@ oa offapi\com\sun\star\rendering nmake - all oa_rendering oa_geometry NU
oa offapi\com\sun\star\rdf nmake - all oa_rdf oa_datatransfer oa_text NULL
oa offapi\com\sun\star\office nmake - all oa_office oa_text NULL
oa offapi\drafts\com\sun\star\form nmake - all oa_drafts_form NULL
-oa offapi\util nmake - all oa_util oa_auth oa_awt oa_awttree oa_awtgrid oa_chart oa_chart2 oa_chart2_data oa_config oa_configbootstrap oa_configbackend oa_configbackend_xml oa_datatrans_clip oa_datatrans_dnd oa_datatransfer oa_docu oa_draw oa_draw_framework oa_embed oa_fcomp oa_finsp oa_fcontr oa_fieldmaster oa_form oa_xforms oa_formula oa_frame oa_i18n oa_inst oa_ldap oa_ling2 oa_logging oa_mail oa_media oa_mozilla oa_packages oa_manifest oa_zippackage oa_plug oa_pres oa_animations oa_putil oa_resrc oa_sax oa_xml_input oa_scan oa_sdb oa_sdbtools oa_sdbapp oa_sdbc oa_sdbcx oa_setup oa_sheet oa_style oa_svg oa_sync oa_sync2 oa_system oa_table oa_task oa_text oa_textfield oa_docinfo oa_ucb oa_view oa_xml oa_xml_dom oa_xml_xpath oa_xml_views oa_xml_events oa_image oa_xsd oa_inspection oa_ui oa_ui_dialogs oa_accessibility oa_form_binding oa_form_validation oa_form_submission oa_fruntime oa_geometry oa_rendering oa_sfprovider oa_sfbrowse oa_drafts_form oa_deployment oa_deploymenttest oa_deployment_ui oa_frame_status oa_gallery oa_graphic oa_security oa_crypto_sax oa_crypto oa_csax oa_wrapper oa_script oa_smarttags oa_report oa_reportins oa_reportmeta oa_rdf oa_oooimprovement oa_office oa_prestextfield oa_starme NULL
+oa offapi\util nmake - all oa_util oa_auth oa_awt oa_awttree oa_awtgrid oa_chart oa_chart2 oa_chart2_data oa_config oa_configbootstrap oa_configbackend oa_configbackend_xml oa_datatrans_clip oa_datatrans_dnd oa_datatransfer oa_docu oa_draw oa_draw_framework oa_embed oa_fcomp oa_finsp oa_fcontr oa_fieldmaster oa_form oa_xforms oa_formula oa_frame oa_i18n oa_inst oa_ldap oa_ling2 oa_logging oa_mail oa_media oa_mozilla oa_packages oa_manifest oa_zippackage oa_plug oa_pres oa_animations oa_putil oa_resrc oa_sax oa_xml_input oa_scan oa_sdb oa_sdbtools oa_sdbapp oa_sdbc oa_sdbcx oa_setup oa_sheet oa_style oa_svg oa_sync oa_sync2 oa_system oa_table oa_task oa_text oa_textfield oa_docinfo oa_ucb oa_view oa_xml oa_xml_dom oa_xml_xpath oa_xml_views oa_xml_events oa_image oa_xsd oa_inspection oa_ui oa_ui_dialogs oa_accessibility oa_form_binding oa_form_validation oa_form_submission oa_fruntime oa_geometry oa_rendering oa_sfprovider oa_sfbrowse oa_drafts_form oa_deployment oa_deploymenttest oa_deployment_ui oa_frame_status oa_gallery oa_graphic oa_security oa_crypto_sax oa_crypto oa_csax oa_wrapper oa_script oa_script_vba oa_smarttags oa_report oa_reportins oa_reportmeta oa_rdf oa_oooimprovement oa_office oa_prestextfield oa_starme NULL
diff --git a/offapi/prj/d.lst b/offapi/prj/d.lst
index 9532cd773c6f..764521f3e944 100644
--- a/offapi/prj/d.lst
+++ b/offapi/prj/d.lst
@@ -69,6 +69,7 @@ mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\scanner
mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\script
mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\script\browse
mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\script\provider
+mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\script\vba
mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb
mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb\application
mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb\tools
@@ -185,6 +186,7 @@ mkdir: %COMMON_DEST%\idl%_EXT%\drafts\com\sun\star\form
..\com\sun\star\script\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\script
..\com\sun\star\script\browse\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\script\browse
..\com\sun\star\script\provider\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\script\provider
+..\com\sun\star\script\vba\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\script\vba
..\com\sun\star\sdb\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb
..\com\sun\star\sdb\application\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb\application
..\com\sun\star\sdb\tools\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb\tools
diff --git a/offapi/util/makefile.mk b/offapi/util/makefile.mk
index 0ed4feba57b6..016180d7765c 100644
--- a/offapi/util/makefile.mk
+++ b/offapi/util/makefile.mk
@@ -95,6 +95,7 @@ UNOIDLDBFILES= \
$(UCR)$/cssdomevents.db \
$(UCR)$/cssscanner.db \
$(UCR)$/cssscript.db \
+ $(UCR)$/cssscriptvba.db \
$(UCR)$/csssdb.db \
$(UCR)$/csssdbc.db \
$(UCR)$/csssdbcx.db \
diff --git a/officecfg/registry/data/org/openoffice/Office/Math.xcu b/officecfg/registry/data/org/openoffice/Office/Math.xcu
index 6778873e3386..b65c2422c433 100644..100755
--- a/officecfg/registry/data/org/openoffice/Office/Math.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Math.xcu
@@ -48,6 +48,8 @@
<value>0</value>
</prop>
</node>
+
+ <!-- only used for symbols with the 'Greek' symbol set name -->
<node oor:name="Id2" oor:op="replace">
<prop oor:name="Name">
<value>OpenSymbol</value>
@@ -65,10 +67,11 @@
<value>0</value>
</prop>
<prop oor:name="Italic">
- <value>2</value>
+ <value>0</value>
</prop>
</node>
</node>
+
<node oor:name="SymbolList">
<node oor:name="alpha" oor:op="replace">
<prop oor:name="Char">
diff --git a/officecfg/registry/data/org/openoffice/Office/Paths.xcu b/officecfg/registry/data/org/openoffice/Office/Paths.xcu
index 91a26137b24d..37eebe5c2a22 100644
--- a/officecfg/registry/data/org/openoffice/Office/Paths.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Paths.xcu
@@ -169,7 +169,8 @@
<node oor:name="Fingerprint" oor:op="fuse" oor:mandatory="true">
<node oor:name="InternalPaths">
- <node oor:name="$(insturl)/share/fingerprint" oor:op="fuse" />
+ <node install:module="internallibtextcatdata" oor:name="$(insturl)/share/fingerprint" oor:op="fuse"/>
+ <node install:module="externallibtextcatdata" oor:name="${SYSTEM_LIBTEXTCAT_DATA}" oor:op="fuse"/>
</node>
</node>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 33e5109405d0..5c72d948436f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE oor:component-data SYSTEM "../../../../../component-update.dtd">
<oor:component-data oor:name="CalcCommands" oor:package="org.openoffice.Office.UI" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<node oor:name="UserInterface">
@@ -160,6 +160,14 @@
<value xml:lang="en-US">~Select...</value>
</prop>
</node>
+ <node oor:name=".uno:TableEvents" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Sheet ~Events...</value>
+ </prop>
+ <prop oor:name="ContextLabel" oor:type="xs:string">
+ <value xml:lang="en-US">~Events...</value>
+ </prop>
+ </node>
<node oor:name=".uno:DataPilotFilter" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">DataPilot Filter</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/makefile.mk b/officecfg/registry/data/org/openoffice/Office/makefile.mk
index e65b03371da3..2af1e8629bd9 100644
--- a/officecfg/registry/data/org/openoffice/Office/makefile.mk
+++ b/officecfg/registry/data/org/openoffice/Office/makefile.mk
@@ -87,6 +87,8 @@ MODULEFILES= \
Paths-macosx.xcu \
Paths-unxwnt.xcu \
Paths-unixdesktop.xcu \
+ Paths-internallibtextcatdata.xcu \
+ Paths-externallibtextcatdata.xcu \
Writer-cjk.xcu \
Impress-ogltrans.xcu \
Embedding-calc.xcu \
diff --git a/officecfg/registry/schema/org/openoffice/Office/Math.xcs b/officecfg/registry/schema/org/openoffice/Office/Math.xcs
index caa8726b7c72..31f6e00a230a 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Math.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Math.xcs
@@ -402,7 +402,28 @@
</info>
<value>false</value>
</prop>
- <prop oor:name="ScaleNormalBracket" oor:type="xs:boolean">
+ <prop oor:name="GreekCharStyle" oor:type="xs:short">
+ <!-- UIHints: n/a yet -->
+ <info>
+ <author>TL</author>
+ <desc>Specifies the default layout for symbols from the 'Greek' symbol set.</desc>
+ <label>Greek character style</label>
+ </info>
+ <constraints>
+ <minInclusive oor:value="0">
+ <info>
+ <desc>Specifies the minimum value allowed</desc>
+ </info>
+ </minInclusive>
+ <maxInclusive oor:value="2">
+ <info>
+ <desc>Specifies the maximum value allowed</desc>
+ </info>
+ </maxInclusive>
+ </constraints>
+ <value>0</value>
+ </prop>
+ <prop oor:name="ScaleNormalBracket" oor:type="xs:boolean">
<!-- OldPath: Math/StandardFormat -->
<!-- OldLocation: Soffice.cfg -->
<!-- UIHints: Format - Spacing - Category - Brackets - Scale all brackets -->
diff --git a/officecfg/registry/schema/org/openoffice/Office/OOoImprovement/Settings.xcs b/officecfg/registry/schema/org/openoffice/Office/OOoImprovement/Settings.xcs
index 7b0b221f15a9..7ff91464727d 100755
--- a/officecfg/registry/schema/org/openoffice/Office/OOoImprovement/Settings.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/OOoImprovement/Settings.xcs
@@ -15,7 +15,7 @@
OpenOffice.org Improvement Program. If this is zero the user will get asked.
</desc>
</info>
- <value>2</value>
+ <value>1</value>
</prop>
<prop oor:name="InvitationAccepted" oor:type="xs:boolean">
<info>
diff --git a/offuh/prj/d.lst b/offuh/prj/d.lst
index ba7343039eae..a88257dc695d 100644
--- a/offuh/prj/d.lst
+++ b/offuh/prj/d.lst
@@ -72,6 +72,7 @@ mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\sdbc
mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\sdbcx
mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\scanner
mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\script
+mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\script\vba
mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\sheet
mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\smarttags
mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\style
@@ -271,6 +272,8 @@ mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\rdf
..\%__SRC%\inc\offuh\com\sun\star\scanner\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\scanner\*.hpp
..\%__SRC%\inc\offuh\com\sun\star\script\*.hdl %_DEST%\inc%_EXT%\offuh\com\sun\star\script\*.hdl
..\%__SRC%\inc\offuh\com\sun\star\script\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\script\*.hpp
+..\%__SRC%\inc\offuh\com\sun\star\script\vba\*.hdl %_DEST%\inc%_EXT%\offuh\com\sun\star\script\vba\*.hdl
+..\%__SRC%\inc\offuh\com\sun\star\script\vba\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\script\vba\*.hpp
..\%__SRC%\inc\offuh\com\sun\star\sheet\*.hdl %_DEST%\inc%_EXT%\offuh\com\sun\star\sheet\*.hdl
..\%__SRC%\inc\offuh\com\sun\star\sheet\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\sheet\*.hpp
..\%__SRC%\inc\offuh\com\sun\star\smarttags\*.hdl %_DEST%\inc%_EXT%\offuh\com\sun\star\smarttags\*.hdl
diff --git a/oovbaapi/ooo/vba/XApplicationBase.idl b/oovbaapi/ooo/vba/XApplicationBase.idl
index 7f59ddb75247..d9d32e02f2ce 100644
--- a/oovbaapi/ooo/vba/XApplicationBase.idl
+++ b/oovbaapi/ooo/vba/XApplicationBase.idl
@@ -24,21 +24,15 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+
#ifndef __ooo_vba_XApplicationBase_idl__
#define __ooo_vba_XApplicationBase_idl__
-#ifndef __com_sun_star_uno_XInterface_idl__
-#include <com/sun/star/uno/XInterface.idl>
-#endif
-
-#ifndef __ooo_vba_XHelperInterface_idl__
#include <ooo/vba/XHelperInterface.idl>
-#endif
module ooo { module vba {
-//=============================================================================
-
+//=============================================================================
interface XApplicationBase
{
@@ -47,8 +41,9 @@ interface XApplicationBase
[attribute] boolean ScreenUpdating;
[attribute] boolean DisplayStatusBar;
[attribute] boolean Interactive;
+ [attribute] boolean Visible;
+
[attribute, readonly] string Version;
- //mbn
[attribute, readonly] any VBE;
[attribute, readonly] any VBProjects;
@@ -61,6 +56,8 @@ interface XApplicationBase
void Undo();
};
+//=============================================================================
+
}; };
#endif
diff --git a/oovbaapi/ooo/vba/excel/XApplication.idl b/oovbaapi/ooo/vba/excel/XApplication.idl
index 39693a37511c..6f513ae64577 100644
--- a/oovbaapi/ooo/vba/excel/XApplication.idl
+++ b/oovbaapi/ooo/vba/excel/XApplication.idl
@@ -64,6 +64,7 @@ interface XApplication
[attribute] any CutCopyMode;
[attribute] any StatusBar;
[attribute] long Cursor;
+ [attribute] boolean EnableEvents;
void setDefaultFilePath([in] string DefaultFilePath) raises(com::sun::star::script::BasicErrorException);
diff --git a/oovbaapi/ooo/vba/excel/XWorksheet.idl b/oovbaapi/ooo/vba/excel/XWorksheet.idl
index 271cd81d4d0e..fb6261bc06c0 100644
--- a/oovbaapi/ooo/vba/excel/XWorksheet.idl
+++ b/oovbaapi/ooo/vba/excel/XWorksheet.idl
@@ -114,6 +114,7 @@ interface XWorksheet
XRange Rows([in] any aIndex);
XRange Columns([in] any aIndex);
any Hyperlinks( [in] any aIndex );
+ any Names( [in] any Index );
any Evaluate( [in] string Name);
diff --git a/oovbaapi/ooo/vba/excel/makefile.mk b/oovbaapi/ooo/vba/excel/makefile.mk
index 12dcf025e489..251588086701 100644
--- a/oovbaapi/ooo/vba/excel/makefile.mk
+++ b/oovbaapi/ooo/vba/excel/makefile.mk
@@ -29,7 +29,7 @@ PRJ=..$/..$/..
PRJNAME=oovapi
TARGET=excel
-PACKAGE=ooo$/vba$/Excel
+PACKAGE=ooo$/vba$/excel
# --- Settings -----------------------------------------------------
.INCLUDE : $(PRJ)$/util$/makefile.pmk
diff --git a/oovbaapi/ooo/vba/makefile.mk b/oovbaapi/ooo/vba/makefile.mk
index 75f6465bf4c0..4f6d378cfe3f 100644
--- a/oovbaapi/ooo/vba/makefile.mk
+++ b/oovbaapi/ooo/vba/makefile.mk
@@ -61,9 +61,8 @@ IDLFILES=\
XFontBase.idl\
XDialogsBase.idl\
XDialogBase.idl\
- XPageSetupBase.idl \
- XVBAAppService.idl\
- XVBADocService.idl\
+ XPageSetupBase.idl
+
# ------------------------------------------------------------------
.ENDIF
.INCLUDE : target.mk
diff --git a/oovbaapi/ooo/vba/word/makefile.mk b/oovbaapi/ooo/vba/word/makefile.mk
index e3a19e678414..543e99f7c538 100644
--- a/oovbaapi/ooo/vba/word/makefile.mk
+++ b/oovbaapi/ooo/vba/word/makefile.mk
@@ -29,7 +29,7 @@ PRJ=..$/..$/..
PRJNAME=oovapi
TARGET=word
-PACKAGE=ooo$/vba$/Word
+PACKAGE=ooo$/vba$/word
# --- Settings -----------------------------------------------------
.INCLUDE : $(PRJ)$/util$/makefile.pmk
diff --git a/oovbaapi/prj/d.lst b/oovbaapi/prj/d.lst
index ac5924e2d684..86e801a15d93 100644
--- a/oovbaapi/prj/d.lst
+++ b/oovbaapi/prj/d.lst
@@ -8,7 +8,7 @@ mkdir: %COMMON_DEST%\idl%_EXT%\ooo\vba\word
..\%__SRC%\ucr\oovbaapi.db %_DEST%\bin%_EXT%\oovbaapi.rdb
-..\ooo\vba\*.idl %COMMON_DEST%\idl%_EXT%\ooo\vba\
+..\ooo\vba\*.idl %COMMON_DEST%\idl%_EXT%\ooo\vba
..\ooo\vba\constants\*.idl %COMMON_DEST%\idl%_EXT%\ooo\vba\constants
..\ooo\vba\excel\*.idl %COMMON_DEST%\idl%_EXT%\ooo\vba\excel
..\ooo\vba\msforms\*.idl %COMMON_DEST%\idl%_EXT%\ooo\vba\msforms
diff --git a/oox/inc/oox/ole/vbahelper.hxx b/oox/inc/oox/ole/vbahelper.hxx
index 76dc1c736025..c1e7297d0c5b 100755
--- a/oox/inc/oox/ole/vbahelper.hxx
+++ b/oox/inc/oox/ole/vbahelper.hxx
@@ -30,11 +30,6 @@
#include "oox/helper/binarystreambase.hxx"
-namespace com { namespace sun { namespace star {
- namespace container { class XNameContainer; }
- namespace document { class XEventsSupplier; }
-} } }
-
namespace oox { class BinaryInputStream; }
namespace oox {
@@ -102,124 +97,6 @@ public:
::rtl::OUString& rValue,
const ::rtl::OUString& rKeyValue );
- /** Removes whitespace characters from the beginning of the passed string.
-
- @param rCodeLine (in/out parameter) The string to be modified.
-
- @return True = at least one whitespace character found and removed
- from rCodeLine. False = rCodeLine is empty or does not start with
- a whitespace character.
- */
- static bool eatWhitespace( ::rtl::OUString& rCodeLine );
-
- /** Removes the passed keyword from the beginning of the passed string.
-
- @param rCodeLine (in/out parameter) The string to be modified.
-
- @param rKeyword The keyword to be removed from the beginning of the
- rCodeLine string.
-
- @return True = rCodeLine starts with the passed keyword (case
- insensitive), and is followed by whitespace characters, or it ends
- right after the keyword. The keyword and the following whitespace
- characters have been removed from rCodeLine. False = rCodeLine is
- empty or does not start with the specified keyword, or the keyword
- is not followed by whitespace characters.
- */
- static bool eatKeyword( ::rtl::OUString& rCodeLine, const ::rtl::OUString& rKeyword );
-
- /** Returns the VBA source code of the specified module, or an empty
- string, if the module does not exist.
-
- @param rxBasicLib The container for all VBA code modules.
- @param rModuleName The name of the VBA code module.
- */
- static ::rtl::OUString getSourceCode(
- const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rxBasicLib,
- const ::rtl::OUString& rModuleName );
-
- /** Checks, if a macro with the specified name exists in the passed VBA
- source code.
-
- @param rSourceCode The VBA source code.
- @param rMacroName The name of the macro.
- */
- static bool hasMacro(
- const ::rtl::OUString& rSourceCode,
- const ::rtl::OUString& rMacroName );
-
- /** Checks, if a macro with the specified name exists in the specified
- module.
-
- @param rxBasicLib The container for all VBA code modules.
- @param rModuleName The name of the VBA module to check for the macro.
- @param rMacroName The name of the macro.
- */
- static bool hasMacro(
- const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rxBasicLib,
- const ::rtl::OUString& rModuleName,
- const ::rtl::OUString& rMacroName );
-
- /** Tries to insert a VBA macro into the specified code module.
-
- @descr If the specified macro does not exist, it will be generated as
- following, using the passed parameters. If the parameter rMacroType
- is left empty, a sub procedure macro will be generated:
-
- Private Sub <rMacroName> ( <rMacroArgs> )
- <rMacroCode>
- End Sub
-
- If the parameter rMacroType is not empty, a function macro
- will be generated. Note that the parameter rMacroCode has to
- provide the code that returns the function value.
-
- Private Function <rMacroName> ( <rMacroArgs> ) As <rMacroType>
- <rMacroCode>
- End Function
-
- The source code in rMacroCode may contain a special placeholder
- $MACRO that will be replaced by the macro name passed in rMacroName
- before the macro will be inserted into the module.
-
- @param rModuleName The name of the VBA module to be used.
- @param rMacroName The name of the VBA macro to be inserted.
- @param rMacroArgs The argument list of the VBA macro.
- @param rMacroType Macro return type (empty for sub procedure).
- @param rMacroCode The VBA source code for the macro.
-
- @return True, if the specified VBA macro has been inserted. False, if
- there already exists a macro with the specified name, or if any
- error has occurred, for example, Office configuration forbids to
- generate executable VBA code or the specified module does not
- exist.
- */
- static bool insertMacro(
- const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rxBasicLib,
- const ::rtl::OUString& rModuleName,
- const ::rtl::OUString& rMacroName,
- const ::rtl::OUString& rMacroArgs,
- const ::rtl::OUString& rMacroType,
- const ::rtl::OUString& rMacroCode );
-
- /** Tries to attach a VBA macro to an event of the passed events supplier.
-
- @descr The function checks if the specified macro exists and attaches
- it to the event of the passed events supplier.
-
- @param rxEventsSupp The events supplier for the event to be attached.
- @param rEventName The event name used in the office API.
- @param rLibraryName The name of the Basic library containing the macro.
- @param rModuleName The name of the VBA module containing the macro.
- @param rMacroName The name of the VBA macro to attach to the event.
- */
- static bool attachMacroToEvent(
- const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventsSupplier >& rxEventsSupp,
- const ::rtl::OUString& rEventName,
- const ::rtl::OUString& rLibraryName,
- const ::rtl::OUString& rModuleName,
- const ::rtl::OUString& rMacroName );
-
private:
VbaHelper();
~VbaHelper();
diff --git a/oox/inc/oox/ole/vbaproject.hxx b/oox/inc/oox/ole/vbaproject.hxx
index 0422ccbd0cf8..1d2fca29dbab 100755
--- a/oox/inc/oox/ole/vbaproject.hxx
+++ b/oox/inc/oox/ole/vbaproject.hxx
@@ -97,157 +97,6 @@ public:
/** Returns true, if the document contains the specified dialog. */
bool hasDialog( const ::rtl::OUString& rDialogName ) const;
- // Insert VBA code modules and VBA macros into modules --------------------
-
- /** Tries to insert a VBA macro into the specified code module.
-
- @descr If the specified macro does not exist, it will be generated as
- following, using the passed parameters. If the parameter rMacroType
- is left empty, a sub procedure macro will be generated:
-
- Private Sub <rMacroName> ( <rMacroArgs> )
- <rMacroCode>
- End Sub
-
- If the parameter rMacroType is not empty, a function macro
- will be generated. Note that the parameter rMacroCode has to
- provide the code that returns the function value.
-
- Private Function <rMacroName> ( <rMacroArgs> ) As <rMacroType>
- <rMacroCode>
- End Function
-
- The source code in rMacroCode may contain a special placeholder
- $MACRO that will be replaced by the macro name passed in rMacroName
- before the macro will be inserted into the module.
-
- @param rModuleName The name of the VBA module to be used.
- @param rMacroName The name of the VBA macro to be inserted.
- @param rMacroArgs The argument list of the VBA macro.
- @param rMacroType Macro return type (empty for sub procedure).
- @param rMacroCode The VBA source code for the macro.
-
- @return True, if the specified VBA macro has been inserted. False, if
- there already exists a macro with the specified name, or if any
- error has occurred, for example, Office configuration forbids to
- generate executable VBA code or the specified module does not
- exist.
- */
- bool insertMacro(
- const ::rtl::OUString& rModuleName,
- const ::rtl::OUString& rMacroName,
- const ::rtl::OUString& rMacroArgs,
- const ::rtl::OUString& rMacroType,
- const ::rtl::OUString& rMacroCode );
-
- // Attach VBA macros to generic or document events ------------------------
-
- /** Tries to attach the specified VBA macro to an event directly.
-
- @descr The function checks if the specified macro exists and attaches
- it to the event of the passed events supplier.
-
- @param rxEventsSupp The events supplier for the event to be attached.
- @param rEventName The event name used in the office API.
- @param rModuleName The name of the VBA module containing the macro.
- @param rMacroName The name of the VBA macro to attach to the event.
-
- @return True, if the specified VBA macro exists and could be attached
- to the specified event.
- */
- bool attachMacroToEvent(
- const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventsSupplier >& rxEventsSupp,
- const ::rtl::OUString& rEventName,
- const ::rtl::OUString& rModuleName,
- const ::rtl::OUString& rMacroName );
-
- /** Tries to attach the specified VBA macro to a document event directly.
-
- @descr The function checks if the specified macro exists and attaches
- it to the document event.
-
- @param rEventName The document event name used in the office API.
- @param rModuleName The name of the VBA module containing the macro.
- @param rMacroName The name of the VBA macro to attach to the event.
-
- @return True, if the specified VBA macro exists and could be attached
- to the specified document event.
- */
- bool attachMacroToDocumentEvent(
- const ::rtl::OUString& rEventName,
- const ::rtl::OUString& rModuleName,
- const ::rtl::OUString& rMacroName );
-
- /** Tries to attach the specified VBA macro to an event via a generated
- proxy macro that implements necessary conversion between VBA and UNO.
-
- @descr The function checks if the specified VBA macro exists, then it
- tries to generate a proxy macro using the parameters passed to this
- function, appends it to the code module, and attaches it to the
- event.
-
- The proxy macro will execute the code specified in the rProxyCode
- parameter. This code may contain special placeholders that will be
- replaced before the proxy macro will be inserted into the module:
- - $MACRO will be replaced by the original VBA macro name passed
- in the rMacroName parameter.
- - $PROXY will be replaced by the name of the proxy macro
- generated by this function.
-
- @param rxEventsSupp The events supplier for the event to be attached.
- @param rEventName The event name used in the office API.
- @param rModuleName The name of the VBA module containing the macro.
- @param rMacroName The name of the VBA macro to attach to the event.
- @param rProxyArgs The argument list of the generated proxy macro.
- @param rProxyType Proxy macro return type (empty for procedure).
- @param rProxyCode Proxy macro source code.
-
- @return True, if the specified VBA macro exists and could be attached
- to the specified event.
- */
- bool attachMacroToEvent(
- const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventsSupplier >& rxEventsSupp,
- const ::rtl::OUString& rEventName,
- const ::rtl::OUString& rModuleName,
- const ::rtl::OUString& rMacroName,
- const ::rtl::OUString& rProxyArgs,
- const ::rtl::OUString& rProxyType,
- const ::rtl::OUString& rProxyCode );
-
- /** Tries to attach the specified VBA macro to a document event via a
- proxy macro that implements necessary conversion between VBA and UNO.
-
- @descr The function checks if the specified VBA macro exists, then it
- tries to generate a proxy macro using the parameters passed to this
- function, appends it to the code module, and attaches it to the
- document event.
-
- The proxy macro will execute the code specified in the rProxyCode
- parameter. This code may contain special placeholders that will be
- replaced before the proxy macro will be inserted into the module:
- - $MACRO will be replaced by the original VBA macro name passed
- in the rMacroName parameter.
- - $PROXY will be replaced by the name of the proxy macro
- generated by this function.
-
- @param rEventName The document event name used in the office API.
- @param rModuleName The name of the VBA module containing the macro.
- @param rMacroName The name of the VBA macro to attach to the event.
- @param rProxyArgs The argument list of the generated proxy macro.
- @param rProxyType Proxy macro return type (empty for procedure).
- @param rProxyCode Proxy macro source code.
-
- @return True, if the specified VBA macro exists and could be attached
- to the specified event.
- */
- bool attachMacroToDocumentEvent(
- const ::rtl::OUString& rEventName,
- const ::rtl::OUString& rModuleName,
- const ::rtl::OUString& rMacroName,
- const ::rtl::OUString& rProxyArgs,
- const ::rtl::OUString& rProxyType,
- const ::rtl::OUString& rProxyCode );
-
private:
VbaProject( const VbaProject& );
VbaProject& operator=( const VbaProject& );
diff --git a/oox/inc/oox/xls/excelvbaproject.hxx b/oox/inc/oox/xls/excelvbaproject.hxx
deleted file mode 100755
index 6a517d13cd88..000000000000
--- a/oox/inc/oox/xls/excelvbaproject.hxx
+++ /dev/null
@@ -1,73 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef OOX_XLS_EXCELVBAPROJECT_HXX
-#define OOX_XLS_EXCELVBAPROJECT_HXX
-
-#include "oox/ole/vbaproject.hxx"
-#include "oox/dllapi.h"
-
-namespace com { namespace sun { namespace star {
- namespace sheet { class XSpreadsheetDocument; }
-} } }
-
-namespace oox {
-namespace xls {
-
-// ============================================================================
-
-/** Special implementation of the VBA project for the Excel filters. */
-class OOX_DLLPUBLIC VbaProject : public ::oox::ole::VbaProject
-{
-public:
- explicit VbaProject(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxGlobalFactory,
- const ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheetDocument >& rxDocument );
-
- /** Attaches all document and sheet events to existing VBA macros. */
- void attachToEvents();
-
-private:
- /** Attaches VBA macros to all supported document events. */
- void attachToDocumentEvents( const ::rtl::OUString& rCodeName );
-
- /** Attaches VBA macros to all supported sheet events. */
- void attachToSheetEvents(
- const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventsSupplier >& rxEventsSupp,
- const ::rtl::OUString& rCodeName );
-
-private:
- ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheetDocument >
- mxDocument;
-};
-
-// ============================================================================
-
-} // namespace xls
-} // namespace oox
-
-#endif
diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx
index fb9e43c732de..9b7b00988dd0 100644..100755
--- a/oox/source/core/filterbase.cxx
+++ b/oox/source/core/filterbase.cxx
@@ -74,8 +74,18 @@ namespace core {
namespace {
+struct UrlPool
+{
+ ::osl::Mutex maMutex;
+ ::std::set< OUString > maUrls;
+};
+
+struct StaticUrlPool : public ::rtl::Static< UrlPool, StaticUrlPool > {};
+
+// ----------------------------------------------------------------------------
+
/** This guard prevents recursive loading/saving of the same document. */
-class DocumentOpenedGuard : public ::osl::Mutex
+class DocumentOpenedGuard
{
public:
explicit DocumentOpenedGuard( const OUString& rUrl );
@@ -87,31 +97,28 @@ private:
DocumentOpenedGuard( const DocumentOpenedGuard& );
DocumentOpenedGuard& operator=( const DocumentOpenedGuard& );
- typedef ::std::set< OUString > UrlSet;
- struct UrlPool : public ::rtl::Static< UrlSet, UrlPool > {};
-
- UrlSet& mrUrls;
OUString maUrl;
bool mbValid;
};
-DocumentOpenedGuard::DocumentOpenedGuard( const OUString& rUrl ) :
- mrUrls( UrlPool::get() )
+DocumentOpenedGuard::DocumentOpenedGuard( const OUString& rUrl )
{
- ::osl::MutexGuard aGuard( *this );
- mbValid = (rUrl.getLength() == 0) || (mrUrls.count( rUrl ) == 0);
+ UrlPool& rUrlPool = StaticUrlPool::get();
+ ::osl::MutexGuard aGuard( rUrlPool.maMutex );
+ mbValid = (rUrl.getLength() == 0) || (rUrlPool.maUrls.count( rUrl ) == 0);
if( mbValid && (rUrl.getLength() > 0) )
{
- mrUrls.insert( rUrl );
+ rUrlPool.maUrls.insert( rUrl );
maUrl = rUrl;
}
}
DocumentOpenedGuard::~DocumentOpenedGuard()
{
- ::osl::MutexGuard aGuard( *this );
+ UrlPool& rUrlPool = StaticUrlPool::get();
+ ::osl::MutexGuard aGuard( rUrlPool.maMutex );
if( maUrl.getLength() > 0 )
- mrUrls.erase( maUrl );
+ rUrlPool.maUrls.erase( maUrl );
}
} // namespace
@@ -563,4 +570,3 @@ GraphicHelper* FilterBase::implCreateGraphicHelper() const
} // namespace core
} // namespace oox
-
diff --git a/oox/source/drawingml/chart/titlecontext.cxx b/oox/source/drawingml/chart/titlecontext.cxx
index 963ccdad595a..5ff71109b710 100644
--- a/oox/source/drawingml/chart/titlecontext.cxx
+++ b/oox/source/drawingml/chart/titlecontext.cxx
@@ -68,7 +68,7 @@ ContextHandlerRef TextContext::onCreateContext( sal_Int32 nElement, const Attrib
}
break;
}
- return false;
+ return 0;
}
void TextContext::onEndElement( const OUString& rChars )
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index 6ea28f424a83..2a36cb4ff3ca 100755
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -722,6 +722,30 @@ OUString lclGetQuotedString( const OUString& rCodeLine )
return aBuffer.makeStringAndClear();
}
+bool lclEatWhitespace( OUString& rCodeLine )
+{
+ sal_Int32 nIndex = 0;
+ while( (nIndex < rCodeLine.getLength()) && ((rCodeLine[ nIndex ] == ' ') || (rCodeLine[ nIndex ] == '\t')) )
+ ++nIndex;
+ if( nIndex > 0 )
+ {
+ rCodeLine = rCodeLine.copy( nIndex );
+ return true;
+ }
+ return false;
+}
+
+bool lclEatKeyword( OUString& rCodeLine, const OUString& rKeyword )
+{
+ if( rCodeLine.matchIgnoreAsciiCase( rKeyword ) )
+ {
+ rCodeLine = rCodeLine.copy( rKeyword.getLength() );
+ // success, if code line ends after keyword, or if whitespace follows
+ return (rCodeLine.getLength() == 0) || lclEatWhitespace( rCodeLine );
+ }
+ return false;
+}
+
} // namespace
// ----------------------------------------------------------------------------
@@ -755,10 +779,10 @@ void VbaUserForm::importForm( const Reference< XNameContainer >& rxDialogLib,
while( !bBeginFound && !aFrameTextStrm.isEof() )
{
aLine = aFrameTextStrm.readLine().trim();
- bBeginFound = VbaHelper::eatKeyword( aLine, aBegin );
+ bBeginFound = lclEatKeyword( aLine, aBegin );
}
// check for the specific GUID that represents VBA forms
- if( !bBeginFound || !VbaHelper::eatKeyword( aLine, CREATE_OUSTRING( "{C62A69F0-16DC-11CE-9E98-00AA00574A4F}" ) ) )
+ if( !bBeginFound || !lclEatKeyword( aLine, CREATE_OUSTRING( "{C62A69F0-16DC-11CE-9E98-00AA00574A4F}" ) ) )
return;
// remaining line is the form name
diff --git a/oox/source/ole/vbahelper.cxx b/oox/source/ole/vbahelper.cxx
index 7293e357e746..3bf72d30bfa5 100755
--- a/oox/source/ole/vbahelper.cxx
+++ b/oox/source/ole/vbahelper.cxx
@@ -27,27 +27,15 @@
#include "oox/ole/vbahelper.hxx"
#include <rtl/ustrbuf.hxx>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/document/XEventsSupplier.hpp>
-#include <comphelper/string.hxx>
#include "oox/helper/binaryinputstream.hxx"
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
-using ::com::sun::star::beans::PropertyValue;
-using ::com::sun::star::container::XNameContainer;
-using ::com::sun::star::container::XNameReplace;
-using ::com::sun::star::document::XEventsSupplier;
-using ::com::sun::star::uno::Any;
-using ::com::sun::star::uno::Exception;
-using ::com::sun::star::uno::Sequence;
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::UNO_SET_THROW;
-
namespace oox {
namespace ole {
+using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
+using namespace ::com::sun::star::uno;
+
// ============================================================================
/*static*/ OUString VbaHelper::getBasicScriptUrl(
@@ -91,157 +79,6 @@ namespace ole {
return false;
}
-/*static*/ bool VbaHelper::eatWhitespace( OUString& rCodeLine )
-{
- sal_Int32 nIndex = 0;
- while( (nIndex < rCodeLine.getLength()) && ((rCodeLine[ nIndex ] == ' ') || (rCodeLine[ nIndex ] == '\t')) )
- ++nIndex;
- if( nIndex > 0 )
- {
- rCodeLine = rCodeLine.copy( nIndex );
- return true;
- }
- return false;
-}
-
-/*static*/ bool VbaHelper::eatKeyword( OUString& rCodeLine, const OUString& rKeyword )
-{
- if( rCodeLine.matchIgnoreAsciiCase( rKeyword ) )
- {
- rCodeLine = rCodeLine.copy( rKeyword.getLength() );
- // success, if code line ends after keyword, or if whitespace follows
- return (rCodeLine.getLength() == 0) || eatWhitespace( rCodeLine );
- }
- return false;
-}
-
-/*static*/ OUString VbaHelper::getSourceCode( const Reference< XNameContainer >& rxBasicLib, const OUString& rModuleName )
-{
- OUString aSourceCode;
- if( rxBasicLib.is() ) try
- {
- rxBasicLib->getByName( rModuleName ) >>= aSourceCode;
- }
- catch( Exception& )
- {
- }
- return aSourceCode;
-}
-
-namespace {
-
-bool lclGetLine( OUString& rCodeLine, sal_Int32& rnIndex, const OUString& rSourceCode )
-{
- if( rnIndex < rSourceCode.getLength() )
- {
- sal_Int32 nPosLF = rSourceCode.indexOf( '\n', rnIndex );
- if( nPosLF >= rnIndex )
- {
- rCodeLine = rSourceCode.copy( rnIndex, nPosLF - rnIndex ).trim();
- rnIndex = nPosLF + 1;
- return true;
- }
- }
- return false;
-}
-
-} // namespace
-
-/*static*/ bool VbaHelper::hasMacro( const OUString& rSourceCode, const OUString& rMacroName )
-{
- // scan all text lines for '[Public|Private] [Static] Sub <macroname> (...)'
- const OUString aPublic = CREATE_OUSTRING( "Public" );
- const OUString aPrivate = CREATE_OUSTRING( "Private" );
- const OUString aStatic = CREATE_OUSTRING( "Static" );
- const OUString aSub = CREATE_OUSTRING( "Sub" );
-
- OUString aCodeLine;
- sal_Int32 nIndex = 0;
- while( lclGetLine( aCodeLine, nIndex, rSourceCode ) )
- {
- // eat optional 'Private' or 'Public', but do not accept both keywords in a row (therefore the ||)
- eatKeyword( aCodeLine, aPublic ) || eatKeyword( aCodeLine, aPrivate );
- // eat optional 'Static'
- eatKeyword( aCodeLine, aStatic );
- // eat 'Sub' keyword, check if macro name follows
- if( eatKeyword( aCodeLine, aSub ) && aCodeLine.matchIgnoreAsciiCase( rMacroName ) )
- {
- // eat macro name and following whitespace
- aCodeLine = aCodeLine.copy( rMacroName.getLength() );
- eatWhitespace( aCodeLine );
- // opening bracket must follow the macro name
- if( (aCodeLine.getLength() >= 2) && (aCodeLine[ 0 ] == '(') )
- return true;
- }
- }
- return false;
-}
-
-/*static*/ bool VbaHelper::hasMacro( const Reference< XNameContainer >& rxBasicLib,
- const OUString& rModuleName, const OUString& rMacroName )
-{
- return hasMacro( getSourceCode( rxBasicLib, rModuleName ), rMacroName );
-}
-
-/*static*/ bool VbaHelper::insertMacro( const Reference< XNameContainer >& rxBasicLib, const OUString& rModuleName,
- const OUString& rMacroName, const OUString& rMacroArgs, const OUString& rMacroType, const OUString& rMacroCode )
-{
- if( rxBasicLib.is() ) try
- {
- // receive module source code and check that the specified macro does not exist
- OUString aSourceCode = getSourceCode( rxBasicLib, rModuleName );
- if( !hasMacro( aSourceCode, rMacroName ) )
- {
- bool bFunction = rMacroType.getLength() > 0;
- const sal_Char* pcSubFunc = bFunction ? "Function" : "Sub";
- OUStringBuffer aBuffer( aSourceCode );
- // generate the source code for the new macro
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "\nPrivate " ) ).
- appendAscii( pcSubFunc ).append( sal_Unicode( ' ' ) ).
- append( rMacroName ).append( sal_Unicode( '(' ) );
- if( rMacroArgs.getLength() > 0 )
- aBuffer.append( sal_Unicode( ' ' ) ).append( rMacroArgs ).append( sal_Unicode( ' ' ) );
- aBuffer.append( sal_Unicode( ')' ) );
- if( bFunction )
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( " As " ) ).append( rMacroType );
- aBuffer.append( sal_Unicode( '\n' ) );
- // replace all $MACRO placeholders with macro name
- if( rMacroCode.getLength() > 0 )
- {
- OUString aMacroCode = ::comphelper::string::searchAndReplaceAsciiL( rMacroCode, RTL_CONSTASCII_STRINGPARAM( "$MACRO" ), rMacroName );
- aBuffer.append( aMacroCode ).append( sal_Unicode( '\n' ) );
- }
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "End " ) ).appendAscii( pcSubFunc ).append( sal_Unicode( '\n' ) );
- rxBasicLib->replaceByName( rModuleName, Any( aBuffer.makeStringAndClear() ) );
- return true;
- }
- }
- catch( Exception& )
- {
- }
- return false;
-}
-
-/*static*/ bool VbaHelper::attachMacroToEvent( const Reference< XEventsSupplier >& rxEventsSupp,
- const OUString& rEventName, const OUString& rLibraryName, const OUString& rModuleName, const OUString& rMacroName )
-{
- if( rxEventsSupp.is() ) try
- {
- Reference< XNameReplace > xEvents( rxEventsSupp->getEvents(), UNO_SET_THROW );
- Sequence< PropertyValue > aEvent( 2 );
- aEvent[ 0 ].Name = CREATE_OUSTRING( "EventType" );
- aEvent[ 0 ].Value <<= CREATE_OUSTRING( "Script" );
- aEvent[ 1 ].Name = CREATE_OUSTRING( "Script" );
- aEvent[ 1 ].Value <<= getBasicScriptUrl( rLibraryName, rModuleName, rMacroName );
- xEvents->replaceByName( rEventName, Any( aEvent ) );
- return true;
- }
- catch( Exception& )
- {
- }
- return false;
-}
-
// ============================================================================
} // namespace ole
diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx
index e9388e54215a..9886f2cc5968 100755
--- a/oox/source/ole/vbamodule.cxx
+++ b/oox/source/ole/vbamodule.cxx
@@ -29,7 +29,7 @@
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/script/ModuleInfo.hpp>
#include <com/sun/star/script/ModuleType.hpp>
-#include <com/sun/star/script/XVBAModuleInfo.hpp>
+#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
#include "oox/helper/binaryinputstream.hxx"
#include "oox/helper/storagebase.hxx"
#include "oox/helper/textinputstream.hxx"
@@ -38,18 +38,12 @@
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
-using ::com::sun::star::container::XNameAccess;
-using ::com::sun::star::container::XNameContainer;
-using ::com::sun::star::frame::XModel;
-using ::com::sun::star::script::ModuleInfo;
-using ::com::sun::star::script::XVBAModuleInfo;
-using ::com::sun::star::uno::Any;
-using ::com::sun::star::uno::Exception;
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::UNO_QUERY;
-using ::com::sun::star::uno::UNO_QUERY_THROW;
-
-namespace ApiModuleType = ::com::sun::star::script::ModuleType;
+
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::script;
+using namespace ::com::sun::star::script::vba;
+using namespace ::com::sun::star::uno;
namespace oox {
namespace ole {
@@ -60,7 +54,7 @@ VbaModule::VbaModule( const Reference< XModel >& rxDocModel, const OUString& rNa
mxDocModel( rxDocModel ),
maName( rName ),
meTextEnc( eTextEnc ),
- mnType( ApiModuleType::UNKNOWN ),
+ mnType( ModuleType::UNKNOWN ),
mnOffset( SAL_MAX_UINT32 ),
mbReadOnly( false ),
mbPrivate( false ),
@@ -107,13 +101,13 @@ void VbaModule::importDirRecords( BinaryInputStream& rDirStrm )
break;
case VBA_ID_MODULETYPEPROCEDURAL:
OOX_ENSURE_RECORDSIZE( nRecSize == 0 );
- OSL_ENSURE( mnType == ApiModuleType::UNKNOWN, "VbaModule::importDirRecords - multiple module type records" );
- mnType = ApiModuleType::NORMAL;
+ OSL_ENSURE( mnType == ModuleType::UNKNOWN, "VbaModule::importDirRecords - multiple module type records" );
+ mnType = ModuleType::NORMAL;
break;
case VBA_ID_MODULETYPEDOCUMENT:
OOX_ENSURE_RECORDSIZE( nRecSize == 0 );
- OSL_ENSURE( mnType == ApiModuleType::UNKNOWN, "VbaModule::importDirRecords - multiple module type records" );
- mnType = ApiModuleType::DOCUMENT;
+ OSL_ENSURE( mnType == ModuleType::UNKNOWN, "VbaModule::importDirRecords - multiple module type records" );
+ mnType = ModuleType::DOCUMENT;
break;
case VBA_ID_MODULEREADONLY:
OOX_ENSURE_RECORDSIZE( nRecSize == 0 );
@@ -130,7 +124,7 @@ void VbaModule::importDirRecords( BinaryInputStream& rDirStrm )
}
OSL_ENSURE( maName.getLength() > 0, "VbaModule::importDirRecords - missing module name" );
OSL_ENSURE( maStreamName.getLength() > 0, "VbaModule::importDirRecords - missing module stream name" );
- OSL_ENSURE( mnType != ApiModuleType::UNKNOWN, "VbaModule::importDirRecords - missing module type" );
+ OSL_ENSURE( mnType != ModuleType::UNKNOWN, "VbaModule::importDirRecords - missing module type" );
OSL_ENSURE( mnOffset < SAL_MAX_UINT32, "VbaModule::importDirRecords - missing module stream offset" );
}
@@ -155,18 +149,18 @@ void VbaModule::importSourceCode( StorageBase& rVbaStrg,
aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "Rem Attribute VBA_ModuleType=" ) );
switch( mnType )
{
- case ApiModuleType::NORMAL:
+ case ModuleType::NORMAL:
aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "VBAModule" ) );
break;
- case ApiModuleType::CLASS:
+ case ModuleType::CLASS:
aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "VBAClassModule" ) );
break;
- case ApiModuleType::FORM:
+ case ModuleType::FORM:
aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "VBAFormModule" ) );
// hack from old filter, document Basic should know the XModel, but it doesn't
aModuleInfo.ModuleObject.set( mxDocModel, UNO_QUERY );
break;
- case ApiModuleType::DOCUMENT:
+ case ModuleType::DOCUMENT:
aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "VBADocumentModule" ) );
// get the VBA object associated to the document module
if( rxDocObjectNA.is() ) try
@@ -184,7 +178,7 @@ void VbaModule::importSourceCode( StorageBase& rVbaStrg,
if( mbExecutable )
{
aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "Option VBASupport 1\n" ) );
- if( mnType == ApiModuleType::CLASS )
+ if( mnType == ModuleType::CLASS )
aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "Option ClassModule\n" ) );
}
else
diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx
index a370fb3d168e..deff066a5ed5 100755
--- a/oox/source/ole/vbaproject.cxx
+++ b/oox/source/ole/vbaproject.cxx
@@ -26,14 +26,13 @@
************************************************************************/
#include "oox/ole/vbaproject.hxx"
-#include <com/sun/star/document/XEventsSupplier.hpp>
#include <com/sun/star/document/XStorageBasedDocument.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/script/ModuleType.hpp>
#include <com/sun/star/script/XLibraryContainer.hpp>
-#include <com/sun/star/script/XVBACompat.hpp>
+#include <com/sun/star/script/vba/XVBACompatibility.hpp>
#include <rtl/tencinfo.h>
#include <rtl/ustrbuf.h>
#include <comphelper/configurationhelper.hxx>
@@ -52,27 +51,17 @@
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
-using ::com::sun::star::container::XNameAccess;
-using ::com::sun::star::container::XNameContainer;
-using ::com::sun::star::document::XEventsSupplier;
-using ::com::sun::star::document::XStorageBasedDocument;
-using ::com::sun::star::embed::XStorage;
-using ::com::sun::star::embed::XTransactedObject;
-using ::com::sun::star::frame::XModel;
-using ::com::sun::star::io::XStream;
-using ::com::sun::star::lang::XMultiServiceFactory;
-using ::com::sun::star::script::XLibraryContainer;
-using ::com::sun::star::script::XVBACompat;
-using ::com::sun::star::uno::Any;
-using ::com::sun::star::uno::Exception;
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::UNO_QUERY;
-using ::com::sun::star::uno::UNO_QUERY_THROW;
-using ::com::sun::star::uno::UNO_SET_THROW;
-using ::com::sun::star::uno::XInterface;
using ::comphelper::ConfigurationHelper;
-namespace ApiModuleType = ::com::sun::star::script::ModuleType;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::document;
+using namespace ::com::sun::star::embed;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::script;
+using namespace ::com::sun::star::script::vba;
+using namespace ::com::sun::star::uno;
namespace oox {
namespace ole {
@@ -184,70 +173,6 @@ bool VbaProject::hasDialog( const OUString& rDialogName ) const
return mxDialogLib.is() && mxDialogLib->hasByName( rDialogName );
}
-// Insert VBA code modules and VBA macros into modules ------------------------
-
-bool VbaProject::insertMacro( const OUString& rModuleName,
- const OUString& rMacroName, const OUString& rMacroArgs,
- const OUString& rMacroType, const OUString& rMacroCode )
-{
- return
- // do nothing if macros are imported as comments
- isImportVbaExecutable() &&
- // try to insert the macro (will check that the macro does not exist yet)
- VbaHelper::insertMacro( mxBasicLib, rModuleName, rMacroName, rMacroArgs, rMacroType, rMacroCode );
-}
-
-// Attach VBA macros to generic or document events ----------------------------
-
-bool VbaProject::attachMacroToEvent( const Reference< XEventsSupplier >& rxEventsSupp,
- const OUString& rEventName, const OUString& rModuleName, const OUString& rMacroName )
-{
- return
- // do not attach if macros are imported as comments
- isImportVbaExecutable() &&
- // check that the specified macro exists in the module
- VbaHelper::hasMacro( mxBasicLib, rModuleName, rMacroName ) &&
- // attach the macro to the events supplier
- VbaHelper::attachMacroToEvent( rxEventsSupp, rEventName, maLibName, rModuleName, rMacroName );
-}
-
-bool VbaProject::attachMacroToDocumentEvent( const OUString& rEventName,
- const OUString& rModuleName, const OUString& rMacroName )
-{
- Reference< XEventsSupplier > xEventsSupp( mxDocModel, UNO_QUERY );
- return attachMacroToEvent( xEventsSupp, rEventName, rModuleName, rMacroName );
-}
-
-bool VbaProject::attachMacroToEvent( const Reference< XEventsSupplier >& rxEventsSupp,
- const OUString& rEventName, const OUString& rModuleName, const OUString& rMacroName,
- const OUString& rProxyArgs, const OUString& rProxyType, const OUString& rProxyCode )
-{
- // receive module source code, and check that the specified macro exists in the module
- OUString aSourceCode = VbaHelper::getSourceCode( mxBasicLib, rModuleName );
- if( isImportVbaExecutable() && VbaHelper::hasMacro( aSourceCode, rMacroName ) )
- {
- // create the name of the proxy macro, and the macro source code
- OUString aProxyName = OUStringBuffer( rMacroName ).append( sal_Unicode( '_' ) ).
- append( rEventName ).appendAscii( "_Proxy" ).makeStringAndClear();
- // replace $MACRO and $PROXY placeholders in proxy source code
- OUString aProxyCode = ::comphelper::string::searchAndReplaceAsciiL( rProxyCode, RTL_CONSTASCII_STRINGPARAM( "$MACRO" ), rMacroName );
- aProxyCode = ::comphelper::string::searchAndReplaceAsciiL( aProxyCode, RTL_CONSTASCII_STRINGPARAM( "$PROXY" ), aProxyName );
- // insert the new macro into the code module and attach it to the event
- return
- VbaHelper::insertMacro( mxBasicLib, rModuleName, aProxyName, rProxyArgs, rProxyType, aProxyCode ) &&
- VbaHelper::attachMacroToEvent( rxEventsSupp, rEventName, maLibName, rModuleName, aProxyName );
- }
- return false;
-}
-
-bool VbaProject::attachMacroToDocumentEvent(
- const OUString& rEventName, const OUString& rModuleName, const OUString& rMacroName,
- const OUString& rProxyArgs, const OUString& rProxyType, const OUString& rProxyCode )
-{
- Reference< XEventsSupplier > xEventsSupp( mxDocModel, UNO_QUERY );
- return attachMacroToEvent( xEventsSupp, rEventName, rModuleName, rMacroName, rProxyArgs, rProxyType, rProxyCode );
-}
-
// private --------------------------------------------------------------------
Reference< XLibraryContainer > VbaProject::getLibraryContainer( sal_Int32 nPropId )
@@ -394,23 +319,23 @@ void VbaProject::importVba( StorageBase& rVbaPrjStrg, const GraphicHelper& rGrap
bExitLoop = (nLineLen >= 2) && (aLine[ 0 ] == '[') && (aLine[ nLineLen - 1 ] == ']');
if( !bExitLoop && VbaHelper::extractKeyValue( aKey, aValue, aLine ) )
{
- sal_Int32 nType = ApiModuleType::UNKNOWN;
+ sal_Int32 nType = ModuleType::UNKNOWN;
if( aKey.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Document" ) ) )
{
- nType = ApiModuleType::DOCUMENT;
+ nType = ModuleType::DOCUMENT;
// strip automation server version from module names
sal_Int32 nSlashPos = aValue.indexOf( '/' );
if( nSlashPos >= 0 )
aValue = aValue.copy( 0, nSlashPos );
}
else if( aKey.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Module" ) ) )
- nType = ApiModuleType::NORMAL;
+ nType = ModuleType::NORMAL;
else if( aKey.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Class" ) ) )
- nType = ApiModuleType::CLASS;
+ nType = ModuleType::CLASS;
else if( aKey.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "BaseClass" ) ) )
- nType = ApiModuleType::FORM;
+ nType = ModuleType::FORM;
- if( (nType != ApiModuleType::UNKNOWN) && (aValue.getLength() > 0) )
+ if( (nType != ModuleType::UNKNOWN) && (aValue.getLength() > 0) )
{
OSL_ENSURE( aModules.has( aValue ), "VbaProject::importVba - module not found" );
if( VbaModule* pModule = aModules.get( aValue ).get() )
@@ -426,13 +351,23 @@ void VbaProject::importVba( StorageBase& rVbaPrjStrg, const GraphicHelper& rGrap
specified. */
if( !aModules.empty() ) try
{
- // get the basic library
+ // get the model factory and the basic library
+ Reference< XMultiServiceFactory > xModelFactory( mxDocModel, UNO_QUERY_THROW );
Reference< XNameContainer > xBasicLib( createBasicLibrary(), UNO_SET_THROW );
// set library container to VBA compatibility mode
try
{
- Reference< XVBACompat >( getLibraryContainer( PROP_BasicLibraries ), UNO_QUERY_THROW )->setVBACompatModeOn( sal_True );
+ Reference< XVBACompatibility >( getLibraryContainer( PROP_BasicLibraries ), UNO_QUERY_THROW )->setVBACompatibilityMode( sal_True );
+ }
+ catch( Exception& )
+ {
+ }
+
+ // create the VBAGlobals object, the model will store it in the Basic manager
+ try
+ {
+ xModelFactory->createInstance( CREATE_OUSTRING( "ooo.vba.VBAGlobals" ) );
}
catch( Exception& )
{
@@ -442,7 +377,6 @@ void VbaProject::importVba( StorageBase& rVbaPrjStrg, const GraphicHelper& rGrap
Reference< XNameAccess > xDocObjectNA;
try
{
- Reference< XMultiServiceFactory > xModelFactory( mxDocModel, UNO_QUERY_THROW );
xDocObjectNA.set( xModelFactory->createInstance( CREATE_OUSTRING( "ooo.vba.VBAObjectModuleObjectProvider" ) ), UNO_QUERY );
}
catch( Exception& )
@@ -475,7 +409,7 @@ void VbaProject::importVba( StorageBase& rVbaPrjStrg, const GraphicHelper& rGrap
{
// resolve module name from storage name (which equals the module stream name)
VbaModule* pModule = aModulesByStrm.get( *aIt ).get();
- OSL_ENSURE( pModule && (pModule->getType() == ApiModuleType::FORM),
+ OSL_ENSURE( pModule && (pModule->getType() == ModuleType::FORM),
"VbaProject::importVba - form substorage without form module" );
OUString aModuleName;
if( pModule )
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index ec7da1d4d900..08115d4f8d25 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -170,7 +170,7 @@ ShapeContextBase::ShapeContextBase( ContextHandler2Helper& rParent ) :
case VML_TOKEN( image ):
return new ShapeContext( rParent, rAttribs, rShapes.createShape< ComplexShape >() );
}
- return false;
+ return 0;
}
// ============================================================================
diff --git a/oox/source/xls/defnamesbuffer.cxx b/oox/source/xls/defnamesbuffer.cxx
index 69214034fee7..a02375e2b869 100644
--- a/oox/source/xls/defnamesbuffer.cxx
+++ b/oox/source/xls/defnamesbuffer.cxx
@@ -486,8 +486,9 @@ void DefinedName::importDefinedName( BiffInputStream& rStrm, sal_Int16 nCalcShee
void DefinedName::createNameObject()
{
- // do not create hidden names and names for (macro) functions
- if( maModel.mbHidden || maModel.mbFunction )
+ // do not create names for (macro) functions
+ // #163146# do not ignore hidden names (may be regular names created by VBA scripts)
+ if( /*maModel.mbHidden ||*/ maModel.mbFunction )
return;
// convert original name to final Calc name
@@ -498,10 +499,13 @@ void DefinedName::createNameObject()
else
maCalcName = maModel.maName; //! TODO convert to valid name
+ // #163146# do not rename sheet-local names by default, this breaks VBA scripts
+#if 0
// append sheet index for local names in multi-sheet documents
if( isWorkbookFile() && !isGlobalName() )
maCalcName = OUStringBuffer( maCalcName ).append( sal_Unicode( '_' ) ).
append( static_cast< sal_Int32 >( mnCalcSheet + 1 ) ).makeStringAndClear();
+#endif
// special flags for this name
sal_Int32 nNameFlags = 0;
diff --git a/oox/source/xls/excelfilter.cxx b/oox/source/xls/excelfilter.cxx
index 71475790851f..5affbfff44a7 100644
--- a/oox/source/xls/excelfilter.cxx
+++ b/oox/source/xls/excelfilter.cxx
@@ -115,19 +115,18 @@ ExcelFilter::~ExcelFilter()
bool ExcelFilter::importDocument() throw()
{
- /* to activate the XLSX/XLSB dumper, define the environment variable
- OOO_XLSBDUMPER and insert the full path to the file
- file:///<path-to-oox-module>/source/dump/xlsbdumper.ini. */
+ /* To activate the XLSX/XLSB dumper, insert the full path to the file
+ file:///<path-to-oox-module>/source/dump/xlsbdumper.ini
+ into the environment variable OOO_XLSBDUMPER and start the office with
+ this variable (nonpro only). */
OOX_DUMP_FILE( ::oox::dump::xlsb::Dumper );
- bool bRet = false;
OUString aWorkbookPath = getFragmentPathFromFirstType( CREATE_OFFICEDOC_RELATIONSTYPE( "officeDocument" ) );
- if( aWorkbookPath.getLength() > 0 )
- {
- WorkbookHelperRoot aHelper( *this );
- bRet = aHelper.isValid() && importFragment( new OoxWorkbookFragment( aHelper, aWorkbookPath ) );
- }
- return bRet;
+ if( aWorkbookPath.getLength() == 0 )
+ return false;
+
+ WorkbookHelperRoot aHelper( *this );
+ return aHelper.isValid() && importFragment( new OoxWorkbookFragment( aHelper, aWorkbookPath ) );
}
bool ExcelFilter::exportDocument() throw()
@@ -198,31 +197,30 @@ ExcelBiffFilter::~ExcelBiffFilter()
bool ExcelBiffFilter::importDocument() throw()
{
- /* to activate the BIFF dumper, define the environment variable
- OOO_BIFFDUMPER and insert the full path to the file
- file:///<path-to-oox-module>/source/dump/biffdumper.ini. */
+ /* To activate the BIFF dumper, insert the full path to the file
+ file:///<path-to-oox-module>/source/dump/biffdumper.ini
+ into the environment variable OOO_BIFFDUMPER and start the office with
+ this variable (nonpro only). */
OOX_DUMP_FILE( ::oox::dump::biff::Dumper );
/* The boolean argument "UseBiffFilter" passed through XInitialisation
- decides whether to use the BIFF file dumper implemented in this filter
- only (false or missing), or to import/export the document (true). */
+ decides whether to import/export the document with this filter (true),
+ or to only use the BIFF file dumper implemented in this filter (false
+ or missing) */
Any aUseBiffFilter = getArgument( CREATE_OUSTRING( "UseBiffFilter" ) );
bool bUseBiffFilter = false;
if( !(aUseBiffFilter >>= bUseBiffFilter) || !bUseBiffFilter )
return true;
- bool bRet = false;
-
// detect BIFF version and workbook stream name
OUString aWorkbookName;
BiffType eBiff = BiffDetector::detectStorageBiffVersion( aWorkbookName, getStorage() );
OSL_ENSURE( eBiff != BIFF_UNKNOWN, "ExcelBiffFilter::ExcelBiffFilter - invalid file format" );
- if( eBiff != BIFF_UNKNOWN )
- {
- WorkbookHelperRoot aHelper( *this, eBiff );
- bRet = aHelper.isValid() && BiffWorkbookFragment( aHelper, aWorkbookName ).importFragment();
- }
- return bRet;
+ if( eBiff == BIFF_UNKNOWN )
+ return false;
+
+ WorkbookHelperRoot aHelper( *this, eBiff );
+ return aHelper.isValid() && BiffWorkbookFragment( aHelper, aWorkbookName ).importFragment();
}
bool ExcelBiffFilter::exportDocument() throw()
@@ -244,4 +242,3 @@ OUString ExcelBiffFilter::implGetImplementationName() const
} // namespace xls
} // namespace oox
-
diff --git a/oox/source/xls/excelvbaproject.cxx b/oox/source/xls/excelvbaproject.cxx
deleted file mode 100755
index fc3caf7e59aa..000000000000
--- a/oox/source/xls/excelvbaproject.cxx
+++ /dev/null
@@ -1,214 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "oox/xls/excelvbaproject.hxx"
-#include <com/sun/star/container/XEnumeration.hpp>
-#include <com/sun/star/container/XEnumerationAccess.hpp>
-#include <com/sun/star/document/XEventsSupplier.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
-#include "properties.hxx"
-#include "oox/helper/helper.hxx"
-#include "oox/helper/propertyset.hxx"
-
-using ::rtl::OUString;
-using ::com::sun::star::container::XEnumeration;
-using ::com::sun::star::container::XEnumerationAccess;
-using ::com::sun::star::document::XEventsSupplier;
-using ::com::sun::star::frame::XModel;
-using ::com::sun::star::lang::XMultiServiceFactory;
-using ::com::sun::star::sheet::XSpreadsheetDocument;
-using ::com::sun::star::uno::Exception;
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::UNO_QUERY;
-using ::com::sun::star::uno::UNO_QUERY_THROW;
-using ::com::sun::star::uno::UNO_SET_THROW;
-
-namespace oox {
-namespace xls {
-
-// ============================================================================
-
-VbaProject::VbaProject( const Reference< XMultiServiceFactory >& rxGlobalFactory, const Reference< XSpreadsheetDocument >& rxDocument ) :
- ::oox::ole::VbaProject( rxGlobalFactory, Reference< XModel >( rxDocument, UNO_QUERY ), CREATE_OUSTRING( "Calc" ) ),
- mxDocument( rxDocument )
-{
-}
-
-void VbaProject::attachToEvents()
-{
- // do nothing is code is not executable
- if( !isImportVbaExecutable() )
- return;
-
- // document events
- PropertySet aDocProp( mxDocument );
- OUString aCodeName;
- aDocProp.getProperty( aCodeName, PROP_CodeName );
- attachToDocumentEvents( aCodeName );
-
- // sheet events
- if( mxDocument.is() ) try
- {
- Reference< XEnumerationAccess > xSheetsEA( mxDocument->getSheets(), UNO_QUERY_THROW );
- Reference< XEnumeration > xSheetsEnum( xSheetsEA->createEnumeration(), UNO_SET_THROW );
- // own try/catch for every sheet
- while( xSheetsEnum->hasMoreElements() ) try
- {
- // TODO: once we have chart sheets we need a switch/case on sheet type
- Reference< XEventsSupplier > xEventsSupp( xSheetsEnum->nextElement(), UNO_QUERY_THROW );
- PropertySet aSheetProp( xEventsSupp );
- aSheetProp.getProperty( aCodeName, PROP_CodeName );
- attachToSheetEvents( xEventsSupp, aCodeName );
- }
- catch( Exception& )
- {
- }
- }
- catch( Exception& )
- {
- }
-}
-
-// private --------------------------------------------------------------------
-
-void VbaProject::attachToDocumentEvents( const OUString& rCodeName )
-{
- if( (rCodeName.getLength() == 0) || !hasModule( rCodeName ) )
- return;
-
- attachMacroToDocumentEvent( CREATE_OUSTRING( "OnLoad" ), rCodeName, CREATE_OUSTRING( "Workbook_Open" ) );
- attachMacroToDocumentEvent( CREATE_OUSTRING( "OnFocus" ), rCodeName, CREATE_OUSTRING( "Workbook_Activate" ) );
- attachMacroToDocumentEvent( CREATE_OUSTRING( "OnUnfocus" ), rCodeName, CREATE_OUSTRING( "Workbook_Deactivate" ) );
- attachMacroToDocumentEvent( CREATE_OUSTRING( "OnSave" ), rCodeName, CREATE_OUSTRING( "Workbook_BeforeSave" ), OUString(), OUString(), CREATE_OUSTRING( "\t$MACRO False, False" ) );
- attachMacroToDocumentEvent( CREATE_OUSTRING( "OnSaveAs" ), rCodeName, CREATE_OUSTRING( "Workbook_BeforeSave" ), OUString(), OUString(), CREATE_OUSTRING( "\t$MACRO True, False" ) );
- attachMacroToDocumentEvent( CREATE_OUSTRING( "OnSaveDone" ), rCodeName, CREATE_OUSTRING( "Workbook_AfterSave" ), OUString(), OUString(), CREATE_OUSTRING( "\t$MACRO True" ) );
- attachMacroToDocumentEvent( CREATE_OUSTRING( "OnSaveAsDone" ), rCodeName, CREATE_OUSTRING( "Workbook_AfterSave" ), OUString(), OUString(), CREATE_OUSTRING( "\t$MACRO True" ) );
- attachMacroToDocumentEvent( CREATE_OUSTRING( "OnSaveFailed" ), rCodeName, CREATE_OUSTRING( "Workbook_AfterSave" ), OUString(), OUString(), CREATE_OUSTRING( "\t$MACRO False" ) );
- attachMacroToDocumentEvent( CREATE_OUSTRING( "OnSaveAsFailed" ), rCodeName, CREATE_OUSTRING( "Workbook_AfterSave" ), OUString(), OUString(), CREATE_OUSTRING( "\t$MACRO False" ) );
- attachMacroToDocumentEvent( CREATE_OUSTRING( "OnPrint" ), rCodeName, CREATE_OUSTRING( "Workbook_BeforePrint" ), OUString(), OUString(), CREATE_OUSTRING( "\t$MACRO False" ) );
- attachMacroToDocumentEvent( CREATE_OUSTRING( "OnPrepareUnload" ), rCodeName, CREATE_OUSTRING( "Workbook_BeforeClose" ), OUString(), OUString(), CREATE_OUSTRING( "\t$MACRO False" ) );
-}
-
-void VbaProject::attachToSheetEvents( const Reference< XEventsSupplier >& rxEventsSupp, const OUString& rCodeName )
-{
- if( !rxEventsSupp.is() || (rCodeName.getLength() == 0) || !hasModule( rCodeName ) )
- return;
-
- // attach macros to simple sheet events directly
- attachMacroToEvent( rxEventsSupp, CREATE_OUSTRING( "OnFocus" ), rCodeName, CREATE_OUSTRING( "Worksheet_Activate" ) );
- attachMacroToEvent( rxEventsSupp, CREATE_OUSTRING( "OnUnfocus" ), rCodeName, CREATE_OUSTRING( "Worksheet_Deactivate" ) );
- attachMacroToEvent( rxEventsSupp, CREATE_OUSTRING( "OnCalculate" ), rCodeName, CREATE_OUSTRING( "Worksheet_Calculate" ) );
-
- /* Attach macros to complex sheet events. The events pass a cell range or
- a collection of cell ranges depending on the event type and sheet
- selection. The generated proxy macros need to convert these UNO renges
- to VBA compatible ranges.
- */
-
-#define VBA_MACRONAME_RANGECONV "Local_GetVbaRangeFromUnoRange"
-#define VBA_MACRONAME_TARGETCONV "Local_GetVbaTargetFromUnoTarget"
-
- /* If this variable turns to true, the macros that convert UNO cell ranges
- to VBA Range objects have to be inserted.
- */
- bool bNeedsTargetHelper = false;
-
- /* Insert the proxy macros attached to sheet events that notify something
- has changed (changed selection and changed cell contents). These events
- cannot be cancelled. The proxy macro converts the passed UNO cell range
- or collection of cell ranges to a VBA Range object, and calls the VBA
- event handler.
- */
- OUString aChangeProxyArgs = CREATE_OUSTRING( "ByVal unoTarget As Object" );
- OUString aChangeProxyCode = CREATE_OUSTRING(
- "\tDim vbaTarget As Range : Set vbaTarget = " VBA_MACRONAME_TARGETCONV "( unoTarget )\n"
- "\tIf Not vbaTarget Is Nothing Then $MACRO vbaTarget" );
- bNeedsTargetHelper |= attachMacroToEvent( rxEventsSupp, CREATE_OUSTRING( "OnChange" ), rCodeName, CREATE_OUSTRING( "Worksheet_Change" ), aChangeProxyArgs, OUString(), aChangeProxyCode );
- bNeedsTargetHelper |= attachMacroToEvent( rxEventsSupp, CREATE_OUSTRING( "OnSelect" ), rCodeName, CREATE_OUSTRING( "Worksheet_SelectionChange" ), aChangeProxyArgs, OUString(), aChangeProxyCode );
-
- /* Insert the proxy macros attached to sheet events that notify an ongoing
- mouse click event (double click and right click). These events can be
- cancelled by returning false (in VBA: as a Boolean output parameter, in
- UNO: as return value of the Basic function). The proxy macro converts
- the passed UNO cell range or collection of cell ranges to a VBA Range
- object, calls the VBA event handler, and returns the Boolean value
- provided by the VBA event handler.
- */
- OUString aClickProxyArgs = CREATE_OUSTRING( "ByVal unoTarget As Object" );
- OUString aClickProxyRetT = CREATE_OUSTRING( "Boolean" );
- OUString aClickProxyCode = CREATE_OUSTRING(
- "\tDim Cancel As Boolean : Cancel = False\n"
- "\tDim vbaTarget As Range : Set vbaTarget = " VBA_MACRONAME_TARGETCONV "( unoTarget )\n"
- "\tIf Not vbaTarget Is Nothing Then $MACRO vbaTarget, Cancel\n"
- "\t$PROXY = Cancel" );
- bNeedsTargetHelper |= attachMacroToEvent( rxEventsSupp, CREATE_OUSTRING( "OnDoubleClick" ), rCodeName, CREATE_OUSTRING( "Worksheet_BeforeDoubleClick" ), aClickProxyArgs, aClickProxyRetT, aClickProxyCode );
- bNeedsTargetHelper |= attachMacroToEvent( rxEventsSupp, CREATE_OUSTRING( "OnRightClick" ), rCodeName, CREATE_OUSTRING( "Worksheet_BeforeRightClick" ), aClickProxyArgs, aClickProxyRetT, aClickProxyCode );
-
- if( bNeedsTargetHelper )
- {
- /* Generate a helper function that converts a
- com.sun.star.sheet.SheetCellRange object to a VBA Range object.
- */
- OUString aRangeConvName = CREATE_OUSTRING( VBA_MACRONAME_RANGECONV );
- OUString aRangeConvArgs = CREATE_OUSTRING( "ByVal unoRange As com.sun.star.sheet.SheetCellRange" );
- OUString aRangeConvRetT = CREATE_OUSTRING( "Range" );
- OUString aRangeConvCode = CREATE_OUSTRING(
- "\tDim unoAddress As com.sun.star.table.CellRangeAddress : Set unoAddress = unoRange.RangeAddress\n"
- "\tDim vbaSheet As Worksheet : Set vbaSheet = Application.ThisWorkbook.Sheets( unoAddress.Sheet + 1 )\n"
- "\tSet $MACRO = vbaSheet.Range( vbaSheet.Cells( unoAddress.StartRow + 1, unoAddress.StartColumn + 1 ), vbaSheet.Cells( unoAddress.EndRow + 1, unoAddress.EndColumn + 1 ) )" );
- insertMacro( rCodeName, aRangeConvName, aRangeConvArgs, aRangeConvRetT, aRangeConvCode );
-
- /* Generate a helper function that converts a generic range selection
- object (com.sun.star.sheet.SheetCellRange or
- com.sun.star.sheet.SheetCellRanges) to a VBA Range object.
- */
- OUString aTargetConvName = CREATE_OUSTRING( VBA_MACRONAME_TARGETCONV );
- OUString aTargetConvArgs = CREATE_OUSTRING( "ByVal unoTarget As Object" );
- OUString aTargetConvRetT = CREATE_OUSTRING( "Range" );
- OUString aTargetConvCode = CREATE_OUSTRING(
- "\tDim vbaTarget As Range\n"
- "\tIf unoTarget.supportsService( \"com.sun.star.sheet.SheetCellRange\" ) Then\n"
- "\t\tSet vbaTarget = " VBA_MACRONAME_RANGECONV "( unoTarget )\n"
- "\tElseIf unoTarget.supportsService( \"com.sun.star.sheet.SheetCellRanges\" ) Then\n"
- "\t\tDim unoRangeEnum As Object : Set unoRangeEnum = unoTarget.createEnumeration\n"
- "\t\tIf unoRangeEnum.hasMoreElements Then Set vbaTarget = " VBA_MACRONAME_RANGECONV "( unoRangeEnum.nextElement )\n"
- "\t\tWhile unoRangeEnum.hasMoreElements\n"
- "\t\t\tSet vbaTarget = Application.Union( vbaTarget, " VBA_MACRONAME_RANGECONV "( unoRangeEnum.nextElement ) )\n"
- "\t\tWend\n"
- "\tEnd If\n"
- "\tSet $MACRO = vbaTarget" );
- insertMacro( rCodeName, aTargetConvName, aTargetConvArgs, aTargetConvRetT, aTargetConvCode );
- }
-#undef VBA_MACRONAME_RANGECONV
-#undef VBA_MACRONAME_TARGETCONV
-}
-
-// ============================================================================
-
-} // namespace xls
-} // namespace oox
diff --git a/oox/source/xls/externallinkfragment.cxx b/oox/source/xls/externallinkfragment.cxx
index 15aaf8bc5412..e1bff95ff724 100644
--- a/oox/source/xls/externallinkfragment.cxx
+++ b/oox/source/xls/externallinkfragment.cxx
@@ -255,7 +255,7 @@ ContextHandlerRef OoxExternalLinkFragment::onCreateContext( sal_Int32 nElement,
if( nElement == XLS_TOKEN( oleItem ) ) mxExtName = mrExtLink.importOleItem( rAttribs );
break;
}
- return false;
+ return 0;
}
void OoxExternalLinkFragment::onEndElement( const OUString& rChars )
diff --git a/oox/source/xls/makefile.mk b/oox/source/xls/makefile.mk
index b5ede953bbfe..cdb2e18c262d 100644
--- a/oox/source/xls/makefile.mk
+++ b/oox/source/xls/makefile.mk
@@ -59,7 +59,6 @@ SLOFILES = \
$(SLO)$/excelchartconverter.obj \
$(SLO)$/excelfilter.obj \
$(SLO)$/excelhandlers.obj \
- $(SLO)$/excelvbaproject.obj \
$(SLO)$/externallinkbuffer.obj \
$(SLO)$/externallinkfragment.obj \
$(SLO)$/formulabase.obj \
diff --git a/oox/source/xls/workbookhelper.cxx b/oox/source/xls/workbookhelper.cxx
index afeed95accca..5684fbd8ae75 100644
--- a/oox/source/xls/workbookhelper.cxx
+++ b/oox/source/xls/workbookhelper.cxx
@@ -43,6 +43,7 @@
#include "properties.hxx"
#include "oox/helper/progressbar.hxx"
#include "oox/helper/propertyset.hxx"
+#include "oox/ole/vbaproject.hxx"
#include "oox/drawingml/theme.hxx"
#include "oox/xls/addressconverter.hxx"
#include "oox/xls/biffinputstream.hxx"
@@ -50,7 +51,6 @@
#include "oox/xls/defnamesbuffer.hxx"
#include "oox/xls/excelchartconverter.hxx"
#include "oox/xls/excelfilter.hxx"
-#include "oox/xls/excelvbaproject.hxx"
#include "oox/xls/externallinkbuffer.hxx"
#include "oox/xls/formulaparser.hxx"
#include "oox/xls/pagesettings.hxx"
@@ -687,14 +687,12 @@ void WorkbookHelper::finalizeWorkbookImport()
aDefPageStyle.setProperty< sal_Int16 >( PROP_FirstPageNumber, 0 );
/* Import the VBA project (after finalizing workbook settings which
- contains the workbook code name), and attach VBA macros to document and
- sheet events. */
+ contains the workbook code name). */
StorageRef xVbaPrjStrg = mrBookData.getVbaProjectStorage();
if( xVbaPrjStrg.get() && xVbaPrjStrg->isStorage() )
{
- VbaProject aVbaProject( getGlobalFactory(), getDocument() );
+ ::oox::ole::VbaProject aVbaProject( getGlobalFactory(), getBaseFilter().getModel(), CREATE_OUSTRING( "Calc" ) );
aVbaProject.importVbaProject( *xVbaPrjStrg, getBaseFilter().getGraphicHelper() );
- aVbaProject.attachToEvents();
}
}
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index 2238cf870d02..f01b7ce06f4b 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -1051,11 +1051,7 @@ void ZipFile::getSizeAndCRC( sal_Int32 nOffset, sal_Int32 nCompressedSize, sal_I
nRealSize += nInBlock;
}
- if( aInflaterLocal.finished() )
- {
- *nSize = nRealSize;
- *nCRC = aCRC.getValue();
- }
- else
- *nSize = *nCRC = 0;
+ *nSize = nRealSize;
+ *nCRC = aCRC.getValue();
}
+
diff --git a/postprocess/packregistry/makefile.mk b/postprocess/packregistry/makefile.mk
index 002cea58f450..a6881783776a 100644
--- a/postprocess/packregistry/makefile.mk
+++ b/postprocess/packregistry/makefile.mk
@@ -343,6 +343,11 @@ MY_FILES_main += $(MY_MOD)/DataAccess/mozab.xcu
MY_FILES_main += $(MY_MOD)/DataAccess/mozab2.xcu
.END
.END
+.IF "$(SYSTEM_LIBTEXTCAT_DATA)" != ""
+MY_FILES_main += $(MY_MOD)/org/openoffice/Office/Paths-externallibtextcatdata.xcu
+.ELSE
+MY_FILES_main += $(MY_MOD)/org/openoffice/Office/Paths-internallibtextcatdata.xcu
+.END
MY_DEPS_math = main
MY_FILES_math = \
@@ -469,9 +474,9 @@ MY_FILES_ogltrans = \
.END
.IF "$(GUIBASE)" == "WIN"
-MY_XCDS += $(MISC)/forcedefaultlanguage.xcd
-MY_DEPS_forcedefaultlanguage = main
-MY_FILES_forcedefaultlanguage = \
+MY_XCDS += $(MISC)/forcedefault.xcd
+MY_DEPS_forcedefault = main
+MY_FILES_forcedefault = \
$(MY_MOD)/org/openoffice/Office/Linguistic-ForceDefaultLanguage.xcu
.END
diff --git a/psprint_config/prj/build.lst b/psprint_config/prj/build.lst
index b2dea37df50b..697fcf6062f0 100644
--- a/psprint_config/prj/build.lst
+++ b/psprint_config/prj/build.lst
@@ -1,4 +1,4 @@
-pc psprint_config : soltools afms NULL
+pc psprint_config : soltools AFMS:afms NULL
pc psprint_config usr1 - all pc_mkout NULL
pc psprint_config\configuration nmake - u pc_conf NULL
pc psprint_config\configuration\ppds nmake - u pc_ppds NULL
diff --git a/rsc/source/parser/erscerr.cxx b/rsc/source/parser/erscerr.cxx
index 158aea21b6e3..ed63510737aa 100644
--- a/rsc/source/parser/erscerr.cxx
+++ b/rsc/source/parser/erscerr.cxx
@@ -88,10 +88,8 @@ void RscError::StdOut( const char * pStr, const RscVerbosity _verbosityLevel )
*************************************************************************/
void RscError::StdErr( const char * pStr )
{
-#ifndef WIN
if( pStr )
fprintf( stderr, "%s", pStr );
-#endif
}
/*************************************************************************
diff --git a/rsc/source/parser/rscyacc.cxx b/rsc/source/parser/rscyacc.cxx
index 89891581d9ba..0d5cc8faef0e 100644
--- a/rsc/source/parser/rscyacc.cxx
+++ b/rsc/source/parser/rscyacc.cxx
@@ -253,12 +253,8 @@ RSCINST GetFirstTupelEle( const RSCINST & rTop )
#ifdef UNX
#define YYMAXDEPTH 2000
#else
-#ifdef W30
-#define YYMAXDEPTH 300
-#else
#define YYMAXDEPTH 800
#endif
-#endif
#if defined _MSC_VER
#pragma warning(push, 1)
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index 40d589aea359..15d26318875b 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -474,10 +474,8 @@ ERRTYPE RscCompiler::Start()
if( PRINTSYNTAX_FLAG & pCL->nCommands )
{
-#ifndef W30
pTC->WriteSyntax( stdout );
-printf( "khg\n" );
-#endif
+ printf( "khg\n" );
return ERR_OK;
}
diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx
index 9904cd20d4e7..93ecff2afe43 100644
--- a/rsc/source/tools/rsctools.cxx
+++ b/rsc/source/tools/rsctools.cxx
@@ -32,7 +32,7 @@
// C and C++ Includes.
#include <stdlib.h>
#include <stdio.h>
-#if defined ( DOS ) || defined ( WIN ) || defined (WNT )
+#if defined (WNT )
#include <direct.h>
#endif
#if defined ( OS2 ) && !defined ( GCC )
@@ -51,10 +51,6 @@
#include <rtl/alloc.h>
#include <rtl/memory.h>
-#if defined (WIN)
-#define ONLY_NEW
-#endif
-
using namespace rtl;
/****************** C o d e **********************************************/
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx
index 1082e6ff9844..ac99601f5ce5 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -31,6 +31,7 @@
#include <cstdlib>
#include <iostream>
+#include "preextstl.h"
#include "cppunit/CompilerOutputter.h"
#include "cppunit/TestResult.h"
#include "cppunit/TestResultCollector.h"
@@ -38,6 +39,7 @@
#include "cppunit/extensions/TestFactoryRegistry.h"
#include "cppunit/plugin/PlugInManager.h"
#include "cppunit/portability/Stream.h"
+#include "postextstl.h"
#include "osl/thread.h"
#include "rtl/process.h"
#include "rtl/string.hxx"
diff --git a/sal/cppunittester/makefile.mk b/sal/cppunittester/makefile.mk
index 938b63d90ae9..61fe7868c9f3 100644
--- a/sal/cppunittester/makefile.mk
+++ b/sal/cppunittester/makefile.mk
@@ -33,6 +33,13 @@ ENABLE_EXCEPTIONS = TRUE
.INCLUDE: settings.mk
+#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/osl/os2/system.h b/sal/osl/os2/system.h
index ac7e410c5a34..436ae0074a04 100644
--- a/sal/osl/os2/system.h
+++ b/sal/osl/os2/system.h
@@ -356,8 +356,7 @@ char *macxp_tempnam( const char *tmpdir, const char *prefix );
#if !defined(_WIN32) && !defined(_WIN16) && !defined(OS2) && \
!defined(LINUX) && !defined(NETBSD) && !defined(FREEBSD) && !defined(SCO) && \
!defined(AIX) && !defined(HPUX) && \
- !defined(SOLARIS) && !defined(MAC) && \
- !defined(MACOSX)
+ !defined(SOLARIS) && !defined(MACOSX)
# error "Target plattform not specified !"
#endif
diff --git a/sal/osl/w32/salinit.cxx b/sal/osl/w32/salinit.cxx
index aea584f67970..ab124620a07c 100644
--- a/sal/osl/w32/salinit.cxx
+++ b/sal/osl/w32/salinit.cxx
@@ -40,6 +40,26 @@ extern "C" {
void SAL_CALL sal_detail_initialize(int argc, char ** argv)
{
+ // SetProcessDEPPolicy(PROCESS_DEP_ENABLE);
+ // SetDllDirectoryW(L"");
+ // SetSearchPathMode(
+ // BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE | BASE_SEARCH_PATH_PERMANENT);
+ HMODULE h = GetModuleHandleW(L"kernel32.dll");
+ if (h != 0) {
+ FARPROC p = GetProcAddress(h, "SetProcessDEPPolicy");
+ if (p != 0) {
+ reinterpret_cast< BOOL (WINAPI *)(DWORD) >(p)(0x00000001);
+ }
+ p = GetProcAddress(h, "SetDllDirectoryW");
+ if (p != 0) {
+ reinterpret_cast< BOOL (WINAPI *)(LPCWSTR) >(p)(L"");
+ }
+ p = GetProcAddress(h, "SetSearchPathMode");
+ if (p != 0) {
+ reinterpret_cast< BOOL (WINAPI *)(DWORD) >(p)(0x8001);
+ }
+ }
+
WSADATA wsaData;
int error;
WORD wVersionRequested;
diff --git a/sax/qa/cppunit/makefile.mk b/sax/qa/cppunit/makefile.mk
index e06eca25a737..b28f0cbac2ab 100644
--- a/sax/qa/cppunit/makefile.mk
+++ b/sax/qa/cppunit/makefile.mk
@@ -35,6 +35,13 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
+#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/sax/qa/cppunit/test_converter.cxx b/sax/qa/cppunit/test_converter.cxx
index 1ea781afff95..b1881f248c0c 100644
--- a/sax/qa/cppunit/test_converter.cxx
+++ b/sax/qa/cppunit/test_converter.cxx
@@ -25,10 +25,12 @@
*
************************************************************************/
+#include "preextstl.h"
#include <cppunit/TestAssert.h>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
+#include "postextstl.h"
#include <rtl/ustrbuf.hxx>
diff --git a/sc/addin/inc/addin.h b/sc/addin/inc/addin.h
index 419d0e3a59db..82b84b402294 100644
--- a/sc/addin/inc/addin.h
+++ b/sc/addin/inc/addin.h
@@ -67,18 +67,11 @@ typedef enum
NONE
} ParamType;
-#ifndef WIN
#ifdef WNT
#define CALLTYPE __cdecl
#else
#define CALLTYPE
#endif
-#else
-#define PASCAL _pascal
-#define FAR _far
-#define CALLTYPE FAR PASCAL
-#endif
-
#ifdef __cplusplus
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index c5d49632292e..64dd9e3e7ea6 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -133,12 +133,6 @@ const SCROW SCROWS64K = 65536;
// === old stuff defines =====================================================
-#ifdef WIN
-// Under 16bit Windows rows still had to be limited to 8192.
-// (define manually for testing)
-#define SC_LIMIT_ROWS
-#endif
-
#define MAXROW_30 8191
#define MAXROW_40 31999
diff --git a/sc/inc/callform.hxx b/sc/inc/callform.hxx
index 58962ea18c03..1e78f0a951be 100644
--- a/sc/inc/callform.hxx
+++ b/sc/inc/callform.hxx
@@ -35,17 +35,11 @@
#define MAXARRSIZE 0xfffe
//------------------------------------------------------------------------
-#ifndef WIN
#ifndef WNT
#define CALLTYPE
#else
#define CALLTYPE __cdecl
#endif
-#else
-#define PASCAL _pascal
-#define FAR _far
-#define CALLTYPE FAR PASCAL
-#endif
extern "C" {
typedef void (CALLTYPE* AdvData)( double& nHandle, void* pData );
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index f7ae5e63f165..5c4685223281 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -161,6 +161,9 @@ namespace com { namespace sun { namespace star {
namespace embed {
class XEmbeddedObject;
}
+ namespace script { namespace vba {
+ class XVBAEventProcessor;
+ } }
namespace sheet {
struct TablePageBreakData;
}
@@ -334,6 +337,9 @@ private:
Timer aTrackTimer;
+ com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor >
+ mxVbaEvents;
+
public:
ScTabOpList aTableOpList; // list of ScInterpreterTableOpParams currently in use
ScInterpreterTableOpParams aLastTableOpParams; // remember last params
@@ -739,7 +745,8 @@ public:
const ScSheetEvents* GetSheetEvents( SCTAB nTab ) const;
void SetSheetEvents( SCTAB nTab, const ScSheetEvents* pNew );
- bool HasSheetEventScript( sal_Int32 nEvent ) const; // on any sheet
+ bool HasSheetEventScript( SCTAB nTab, sal_Int32 nEvent, bool bWithVbaEvents = false ) const;
+ bool HasAnySheetEventScript( sal_Int32 nEvent, bool bWithVbaEvents = false ) const; // on any sheet
BOOL HasCalcNotification( SCTAB nTab ) const;
void SetCalcNotification( SCTAB nTab );
@@ -1276,6 +1283,7 @@ public:
SC_DLLPUBLIC USHORT GetColWidth( SCCOL nCol, SCTAB nTab ) const;
SC_DLLPUBLIC USHORT GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
+ SC_DLLPUBLIC USHORT GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero = true ) const;
SC_DLLPUBLIC ULONG GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
SCROW GetRowForHeight( SCTAB nTab, ULONG nHeight ) const;
ULONG GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale ) const;
@@ -1783,6 +1791,11 @@ public:
void GetSortParam( ScSortParam& rParam, SCTAB nTab );
void SetSortParam( ScSortParam& rParam, SCTAB nTab );
+ inline void SetVbaEventProcessor( const com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor >& rxVbaEvents )
+ { mxVbaEvents = rxVbaEvents; }
+ inline com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor >
+ GetVbaEventProcessor() const { return mxVbaEvents; }
+
/** Should only be GRAM_PODF or GRAM_ODFF. */
void SetStorageGrammar( formula::FormulaGrammar::Grammar eGrammar );
formula::FormulaGrammar::Grammar GetStorageGrammar() const
diff --git a/sc/inc/scextopt.hxx b/sc/inc/scextopt.hxx
index d7586fb8df95..ad3fd4b1b51e 100644
--- a/sc/inc/scextopt.hxx
+++ b/sc/inc/scextopt.hxx
@@ -115,13 +115,11 @@ public:
ScExtTabSettings& GetOrCreateTabSettings( SCTAB nTab );
/** Returns the number of sheet codenames. */
- size_t GetCodeNameCount() const;
+ SCTAB GetCodeNameCount() const;
/** Returns the specified codename (empty string = no codename). */
- const String& GetCodeName( size_t nIdx ) const;
+ const String& GetCodeName( SCTAB nTab ) const;
/** Appends a codename for a sheet. */
- void AppendCodeName( const String& rCodeName );
- void SetCodeName( const String& rCodeName, size_t nIdx );
- void DeleteCodeName( size_t nIdx );
+ void SetCodeName( SCTAB nTab, const String& rCodeName );
private:
::std::auto_ptr< ScExtDocOptionsImpl > mxImpl;
diff --git a/sc/inc/sheetevents.hxx b/sc/inc/sheetevents.hxx
index 8f52efb990f7..bb27f5cf2068 100755..100644
--- a/sc/inc/sheetevents.hxx
+++ b/sc/inc/sheetevents.hxx
@@ -59,6 +59,8 @@ public:
void SetScript(sal_Int32 nEvent, const rtl::OUString* pNew);
static rtl::OUString GetEventName(sal_Int32 nEvent);
+ static sal_Int32 GetVbaSheetEventId(sal_Int32 nEvent);
+ static sal_Int32 GetVbaDocumentEventId(sal_Int32 nEvent);
};
#endif
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 78e5875b6879..63cefe22626a 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -628,12 +628,12 @@ public:
// nPPT fuer Test auf Veraenderung
void SetManualHeight( SCROW nStartRow, SCROW nEndRow, BOOL bManual );
- USHORT GetColWidth( SCCOL nCol );
- SC_DLLPUBLIC USHORT GetRowHeight( SCROW nRow, SCROW* pStartRow = NULL, SCROW* pEndRow = NULL, bool bHiddenAsZero = true );
- ULONG GetRowHeight( SCROW nStartRow, SCROW nEndRow );
- ULONG GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale );
- ULONG GetColOffset( SCCOL nCol );
- ULONG GetRowOffset( SCROW nRow );
+ USHORT GetColWidth( SCCOL nCol ) const;
+ SC_DLLPUBLIC USHORT GetRowHeight( SCROW nRow, SCROW* pStartRow = NULL, SCROW* pEndRow = NULL, bool bHiddenAsZero = true ) const;
+ ULONG GetRowHeight( SCROW nStartRow, SCROW nEndRow ) const;
+ ULONG GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale ) const;
+ ULONG GetColOffset( SCCOL nCol ) const;
+ ULONG GetRowOffset( SCROW nRow ) const;
/**
* Get the last row such that the height of row 0 to the end row is as
@@ -643,7 +643,7 @@ public:
*
* @return SCROW last row of the range within specified height.
*/
- SCROW GetRowForHeight(ULONG nHeight);
+ SCROW GetRowForHeight(ULONG nHeight) const;
USHORT GetOriginalWidth( SCCOL nCol ) const;
USHORT GetOriginalHeight( SCROW nRow ) const;
@@ -683,6 +683,8 @@ public:
void UpdatePageBreaks( const ScRange* pUserArea );
void RemoveManualBreaks();
BOOL HasManualBreaks() const;
+ void SetRowManualBreaks( const ::std::set<SCROW>& rBreaks );
+ void SetColManualBreaks( const ::std::set<SCCOL>& rBreaks );
void GetAllRowBreaks(::std::set<SCROW>& rBreaks, bool bPage, bool bManual) const;
void GetAllColBreaks(::std::set<SCCOL>& rBreaks, bool bPage, bool bManual) const;
@@ -711,33 +713,33 @@ public:
::com::sun::star::uno::Sequence<
::com::sun::star::sheet::TablePageBreakData> GetRowBreakData() const;
- bool RowHidden(SCROW nRow, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL);
- bool RowHidden(SCROW nRow, SCROW& rLastRow);
- bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow);
- bool ColHidden(SCCOL nCol, SCCOL& rLastCol);
- bool ColHidden(SCCOL nCol, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL);
+ bool RowHidden(SCROW nRow, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL) const;
+ bool RowHidden(SCROW nRow, SCROW& rLastRow) const;
+ bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow) const;
+ bool ColHidden(SCCOL nCol, SCCOL& rLastCol) const;
+ bool ColHidden(SCCOL nCol, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL) const;
void SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden);
void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden);
void CopyColHidden(ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol);
void CopyRowHidden(ScTable& rTable, SCROW nStartRow, SCROW nEndRow);
void CopyRowHeight(ScTable& rSrcTable, SCROW nStartRow, SCROW nEndRow, SCROW nSrcOffset);
- SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow);
- SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow);
- SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow);
- sal_uInt32 GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow);
+ SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow) const;
+ SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow) const;
+ SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow) const;
+ sal_uInt32 GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow) const;
- SCCOLROW LastHiddenColRow(SCCOLROW nPos, bool bCol);
+ SCCOLROW LastHiddenColRow(SCCOLROW nPos, bool bCol) const;
- bool RowFiltered(SCROW nRow, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL);
- bool ColFiltered(SCCOL nCol, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL);
- bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow);
+ bool RowFiltered(SCROW nRow, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL) const;
+ bool ColFiltered(SCCOL nCol, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL) const;
+ bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow) const;
void CopyColFiltered(ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol);
void CopyRowFiltered(ScTable& rTable, SCROW nStartRow, SCROW nEndRow);
void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, bool bFiltered);
void SetColFiltered(SCCOL nStartCol, SCCOL nEndCol, bool bFiltered);
- SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow);
- SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow);
- SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow);
+ SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow) const;
+ SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow) const;
+ SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow) const;
void SyncColRowFlags();
diff --git a/sc/inc/unoguard.hxx b/sc/inc/unoguard.hxx
index 0768eada24d7..e5e57e959e7b 100644
--- a/sc/inc/unoguard.hxx
+++ b/sc/inc/unoguard.hxx
@@ -30,7 +30,7 @@
#include <vos/mutex.hxx>
-class ScUnoGuard : public NAMESPACE_VOS(OGuard)
+class ScUnoGuard : public vos::OGuard
{
public:
ScUnoGuard();
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 95482b1c624b..540fb577a79b 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -136,10 +136,16 @@ ScBroadcastAreaSlot::ScBroadcastAreaSlot( ScDocument* pDocument,
ScBroadcastAreaSlot::~ScBroadcastAreaSlot()
{
for ( ScBroadcastAreas::iterator aIter( aBroadcastAreaTbl.begin());
- aIter != aBroadcastAreaTbl.end(); ++aIter)
+ aIter != aBroadcastAreaTbl.end(); /* none */)
{
- if (!(*aIter)->DecRef())
- delete *aIter;
+ // Prevent hash from accessing dangling pointer in case area is
+ // deleted.
+ ScBroadcastArea* pArea = *aIter;
+ // Erase all so no hash will be accessed upon destruction of the
+ // hash_set.
+ aBroadcastAreaTbl.erase( aIter++);
+ if (!pArea->DecRef())
+ delete pArea;
}
}
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index e8ea10f7cf52..d2c99c75a95e 100644..100755
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -50,6 +50,7 @@
#include <tools/tenccvt.hxx>
#include <tools/list.hxx>
#include <rtl/crc.h>
+#include <basic/basmgr.hxx>
#include "document.hxx"
#include "table.hxx"
@@ -93,7 +94,8 @@
#include "tabprotection.hxx"
#include "formulaparserpool.hxx"
#include "clipparam.hxx"
-#include <basic/basmgr.hxx>
+
+using namespace com::sun::star;
// pImpl because including lookupcache.hxx in document.hxx isn't wanted, and
// dtor plus helpers are convenient.
@@ -1118,11 +1120,11 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
String sCodeName;
String sSource;
- com::sun::star::uno::Reference< com::sun::star::script::XLibraryContainer > xLibContainer = pSrcShell->GetBasicContainer();
- com::sun::star::uno::Reference< com::sun::star::container::XNameContainer > xLib;
+ uno::Reference< script::XLibraryContainer > xLibContainer = pSrcShell->GetBasicContainer();
+ uno::Reference< container::XNameContainer > xLib;
if( xLibContainer.is() )
{
- com::sun::star::uno::Any aLibAny = xLibContainer->getByName( aLibName );
+ uno::Any aLibAny = xLibContainer->getByName( aLibName );
aLibAny >>= xLib;
}
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 1861988d78aa..8fea4b8af2b9 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -30,6 +30,7 @@
// INCLUDE ---------------------------------------------------------------
+#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
#include "scitems.hxx"
#include <editeng/langitem.hxx>
#include <svl/srchitem.hxx>
@@ -88,7 +89,6 @@
#include <memory>
using namespace com::sun::star;
-using ::std::auto_ptr;
//------------------------------------------------------------------------
@@ -512,15 +512,35 @@ void ScDocument::SetSheetEvents( SCTAB nTab, const ScSheetEvents* pNew )
pTab[nTab]->SetSheetEvents( pNew );
}
-bool ScDocument::HasSheetEventScript( sal_Int32 nEvent ) const
+bool ScDocument::HasSheetEventScript( SCTAB nTab, sal_Int32 nEvent, bool bWithVbaEvents ) const
{
- for (SCTAB nTab = 0; nTab <= MAXTAB; nTab++)
- if (pTab[nTab])
+ if (pTab[nTab])
+ {
+ // check if any event handler script has been configured
+ const ScSheetEvents* pEvents = pTab[nTab]->GetSheetEvents();
+ if ( pEvents && pEvents->GetScript( nEvent ) )
+ return true;
+ // check if VBA event handlers exist
+ if (bWithVbaEvents && mxVbaEvents.is()) try
{
- const ScSheetEvents* pEvents = pTab[nTab]->GetSheetEvents();
- if ( pEvents && pEvents->GetScript( nEvent ) )
+ uno::Sequence< uno::Any > aArgs( 1 );
+ aArgs[ 0 ] <<= nTab;
+ if (mxVbaEvents->hasVbaEventHandler( ScSheetEvents::GetVbaSheetEventId( nEvent ), aArgs ) ||
+ mxVbaEvents->hasVbaEventHandler( ScSheetEvents::GetVbaDocumentEventId( nEvent ), uno::Sequence< uno::Any >() ))
return true;
}
+ catch( uno::Exception& )
+ {
+ }
+ }
+ return false;
+}
+
+bool ScDocument::HasAnySheetEventScript( sal_Int32 nEvent, bool bWithVbaEvents ) const
+{
+ for (SCTAB nTab = 0; nTab <= MAXTAB; nTab++)
+ if (HasSheetEventScript( nTab, nEvent, bWithVbaEvents ))
+ return true;
return false;
}
@@ -1546,6 +1566,54 @@ void ScDocument::ResetEmbedded()
aEmbedRange = ScRange();
}
+
+/** Similar to ScViewData::AddPixelsWhile(), but add height twips and only
+ while result is less than nStopTwips.
+ @return TRUE if advanced at least one row.
+ */
+bool lcl_AddTwipsWhile( long & rTwips, long nStopTwips, SCROW & rPosY, SCROW nEndRow, const ScTable * pTable )
+{
+ SCROW nRow = rPosY;
+ bool bAdded = false;
+ bool bStop = false;
+ while (rTwips < nStopTwips && nRow <= nEndRow && !bStop)
+ {
+ SCROW nHeightEndRow;
+ USHORT nHeight = pTable->GetRowHeight( nRow, NULL, &nHeightEndRow);
+ if (nHeightEndRow > nEndRow)
+ nHeightEndRow = nEndRow;
+ if (!nHeight)
+ nRow = nHeightEndRow + 1;
+ else
+ {
+ SCROW nRows = nHeightEndRow - nRow + 1;
+ sal_Int64 nAdd = static_cast<sal_Int64>(nHeight) * nRows;
+ if (nAdd + rTwips >= nStopTwips)
+ {
+ sal_Int64 nDiff = nAdd + rTwips - nStopTwips;
+ nRows -= static_cast<SCROW>(nDiff / nHeight);
+ nAdd = nHeight * nRows;
+ // We're looking for a value that satisfies loop condition.
+ if (nAdd + rTwips >= nStopTwips)
+ {
+ --nRows;
+ nAdd -= nHeight;
+ }
+ bStop = true;
+ }
+ rTwips += static_cast<long>(nAdd);
+ nRow += nRows;
+ }
+ }
+ if (nRow > rPosY)
+ {
+ --nRow;
+ bAdded = true;
+ }
+ rPosY = nRow;
+ return bAdded;
+}
+
ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect )
{
ScTable* pTable = pTab[nTab];
@@ -1602,43 +1670,16 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect )
nTwips = (long) (aPosRect.Top() / HMM_PER_TWIPS);
SCROW nY1 = 0;
- bEnd = FALSE;
- for (SCROW i = nY1; i <= MAXROW && !bEnd; ++i)
- {
- if (pTable->RowHidden(i))
- continue;
-
- nY1 = i;
- nAdd = static_cast<long>(pTable->GetRowHeight(i));
- if (nSize+nAdd <= nTwips+1 && nY1<MAXROW)
- {
- nSize += nAdd;
- ++nY1;
- }
- else
- bEnd = TRUE;
- }
- if (!bEnd)
- nY1 = MAXROW; // all hidden down to the bottom
+ // Was if(nSize+nAdd<=nTwips+1) inside loop => if(nSize+nAdd<nTwips+2)
+ if (lcl_AddTwipsWhile( nSize, nTwips+2, nY1, MAXROW, pTable) && nY1 < MAXROW)
+ ++nY1; // original loop ended on last matched +1 unless that was MAXROW
nTwips = (long) (aPosRect.Bottom() / HMM_PER_TWIPS);
SCROW nY2 = nY1;
- bEnd = FALSE;
- for (SCROW i = nY2; i <= MAXROW && !bEnd; ++i)
- {
- nY2 = i;
- nAdd = static_cast<long>(pTable->GetRowHeight(i));
- if (nSize+nAdd < nTwips && nY2<MAXROW)
- {
- nSize += nAdd;
- ++nY2;
- }
- else
- bEnd = TRUE;
- }
- if (!bEnd)
- nY2 = MAXROW; // all hidden down to the bottom
+ // Was if(nSize+nAdd<nTwips) inside loop => if(nSize+nAdd<nTwips)
+ if (lcl_AddTwipsWhile( nSize, nTwips, nY2, MAXROW, pTable) && nY2 < MAXROW)
+ ++nY2; // original loop ended on last matched +1 unless that was MAXROW
return ScRange( nX1,nY1,nTab, nX2,nY2,nTab );
}
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index 97aae44f1a7b..d77dc1041d9c 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -454,7 +454,7 @@ void ScDocument::TrackFormulas( ULONG nHintId )
{
erBEEPER();
// outside the loop, check if any sheet has a "calculate" event script
- bool bCalcEvent = HasSheetEventScript( SC_SHEETEVENT_CALCULATE );
+ bool bCalcEvent = HasAnySheetEventScript( SC_SHEETEVENT_CALCULATE, true );
SvtBroadcaster* pBC;
ScFormulaCell* pTrack;
ScFormulaCell* pNext;
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index bef4cbf87396..1efe32446eef 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -51,7 +51,7 @@
#include <tools/tenccvt.hxx>
#include <com/sun/star/text/WritingMode2.hpp>
-#include <com/sun/star/script/XVBACompat.hpp>
+#include <com/sun/star/script/vba/XVBACompatibility.hpp>
#include <com/sun/star/sheet/TablePageBreakData.hpp>
#include "document.hxx"
@@ -3061,6 +3061,19 @@ void ScDocument::CalcAfterLoad()
bCalcingAfterLoad = FALSE;
SetDetectiveDirty(FALSE); // noch keine wirklichen Aenderungen
+
+ // #i112436# If formula cells are already dirty, they don't broadcast further changes.
+ // So the source ranges of charts must be interpreted even if they are not visible,
+ // similar to ScMyShapeResizer::CreateChartListener for loading own files (i104899).
+ if (pChartListenerCollection)
+ {
+ sal_uInt16 nChartCount = pChartListenerCollection->GetCount();
+ for ( sal_uInt16 nIndex = 0; nIndex < nChartCount; nIndex++ )
+ {
+ ScChartListener* pChartListener = static_cast<ScChartListener*>(pChartListenerCollection->At(nIndex));
+ InterpretDirtyCells(*pChartListener->GetRangeList());
+ }
+ }
}
@@ -3161,7 +3174,16 @@ USHORT ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero ) co
{
if ( ValidTab(nTab) && pTab[nTab] )
return pTab[nTab]->GetRowHeight( nRow, NULL, NULL, bHiddenAsZero );
- DBG_ERROR("Falsche Tabellennummer");
+ DBG_ERROR("Wrong sheet number");
+ return 0;
+}
+
+
+USHORT ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero ) const
+{
+ if ( ValidTab(nTab) && pTab[nTab] )
+ return pTab[nTab]->GetRowHeight( nRow, pStartRow, pEndRow, bHiddenAsZero );
+ DBG_ERROR("Wrong sheet number");
return 0;
}
@@ -3684,24 +3706,35 @@ SCCOL ScDocument::GetNextDifferentChangedCol( SCTAB nTab, SCCOL nStart) const
SCROW ScDocument::GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart, bool bCareManualSize) const
{
- if ( ValidTab(nTab) && pTab[nTab] && pTab[nTab]->GetRowFlagsArray() && pTab[nTab]->mpRowHeights )
- {
- BYTE nStartFlags = pTab[nTab]->GetRowFlags(nStart);
- USHORT nStartHeight = pTab[nTab]->GetOriginalHeight(nStart);
- for (SCROW nRow = nStart + 1; nRow <= MAXROW; nRow++)
+ const ScBitMaskCompressedArray< SCROW, BYTE> * pRowFlagsArray;
+ if ( ValidTab(nTab) && pTab[nTab] && ((pRowFlagsArray = pTab[nTab]->GetRowFlagsArray()) != NULL) &&
+ pTab[nTab]->mpRowHeights && pTab[nTab]->mpHiddenRows )
+ {
+ size_t nIndex; // ignored
+ SCROW nFlagsEndRow;
+ SCROW nHiddenEndRow;
+ SCROW nHeightEndRow;
+ BYTE nFlags;
+ bool bHidden;
+ USHORT nHeight;
+ BYTE nStartFlags = nFlags = pRowFlagsArray->GetValue( nStart, nIndex, nFlagsEndRow);
+ bool bStartHidden = bHidden = pTab[nTab]->RowHidden( nStart, NULL, &nHiddenEndRow);
+ USHORT nStartHeight = nHeight = pTab[nTab]->GetRowHeight( nStart, NULL, &nHeightEndRow, false);
+ SCROW nRow;
+ while ((nRow = std::min( nHiddenEndRow, std::min( nFlagsEndRow, nHeightEndRow)) + 1) <= MAXROW)
{
- size_t nIndex; // ignored
- SCROW nFlagsEndRow;
- SCROW nHeightEndRow;
- BYTE nFlags = pTab[nTab]->GetRowFlagsArray()->GetValue( nRow, nIndex, nFlagsEndRow );
- USHORT nHeight = pTab[nTab]->GetRowHeight(nRow, NULL, &nHeightEndRow);
- if (((nStartFlags & CR_MANUALBREAK) != (nFlags & CR_MANUALBREAK)) ||
- ((nStartFlags & CR_MANUALSIZE) != (nFlags & CR_MANUALSIZE)) ||
- (bCareManualSize && (nStartFlags & CR_MANUALSIZE) && (nStartHeight != nHeight)) ||
- (!bCareManualSize && ((nStartHeight != nHeight))))
+ if (nFlagsEndRow < nRow)
+ nFlags = pRowFlagsArray->GetValue( nRow, nIndex, nFlagsEndRow);
+ if (nHiddenEndRow < nRow)
+ bHidden = pTab[nTab]->RowHidden( nRow, NULL, &nHiddenEndRow);
+ if (nHeightEndRow < nRow)
+ nHeight = pTab[nTab]->GetRowHeight( nRow, NULL, &nHeightEndRow, false);
+ if ( ((nStartFlags & CR_MANUALBREAK) != (nFlags & CR_MANUALBREAK)) ||
+ ((nStartFlags & CR_MANUALSIZE) != (nFlags & CR_MANUALSIZE)) ||
+ (bStartHidden != bHidden) ||
+ (bCareManualSize && (nStartFlags & CR_MANUALSIZE) && (nStartHeight != nHeight)) ||
+ (!bCareManualSize && ((nStartHeight != nHeight))))
return nRow;
-
- nRow = std::min( nFlagsEndRow, nHeightEndRow );
}
return MAXROW+1;
}
@@ -5226,8 +5259,8 @@ bool ScDocument::IsInVBAMode() const
bool bResult = false;
if ( pShell )
{
- com::sun::star::uno::Reference< com::sun::star::script::XVBACompat > xVBA( pShell->GetBasicContainer(), com::sun::star::uno::UNO_QUERY );
- bResult = xVBA->getVBACompatModeOn();
+ com::sun::star::uno::Reference< com::sun::star::script::vba::XVBACompatibility > xVBA( pShell->GetBasicContainer(), com::sun::star::uno::UNO_QUERY );
+ bResult = xVBA.is() && xVBA->getVBACompatibilityMode();
}
return bResult;
}
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 7ca41d47f79d..e994339f4a9a 100644..100755
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -67,6 +67,7 @@
#include <com/sun/star/sheet/DataPilotTablePositionType.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/lang/XSingleComponentFactory.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
#include <com/sun/star/sheet/XDrillDownDataSupplier.hpp>
@@ -2293,6 +2294,9 @@ uno::Sequence<rtl::OUString> ScDPObject::GetRegisteredSources()
return aSeq;
}
+// use getContext from addincol.cxx
+uno::Reference<uno::XComponentContext> getContext(uno::Reference<lang::XMultiServiceFactory> xMSF);
+
// static
uno::Reference<sheet::XDimensionsSupplier> ScDPObject::CreateSource( const ScDPServiceDesc& rDesc )
{
@@ -2317,12 +2321,26 @@ uno::Reference<sheet::XDimensionsSupplier> ScDPObject::CreateSource( const ScDPS
if ( xIntFac.is() )
{
uno::Reference<lang::XServiceInfo> xInfo( xIntFac, uno::UNO_QUERY );
- uno::Reference<lang::XSingleServiceFactory> xFac( xIntFac, uno::UNO_QUERY );
- if ( xFac.is() && xInfo.is() && xInfo->getImplementationName() == aImplName )
+ if ( xInfo.is() && xInfo->getImplementationName() == aImplName )
{
try
{
- uno::Reference<uno::XInterface> xInterface = xFac->createInstance();
+ // #i113160# try XSingleComponentFactory in addition to (old) XSingleServiceFactory,
+ // passing the context to the component (see ScUnoAddInCollection::Initialize)
+
+ uno::Reference<uno::XInterface> xInterface;
+ uno::Reference<uno::XComponentContext> xCtx = getContext(xManager);
+ uno::Reference<lang::XSingleComponentFactory> xCFac( xIntFac, uno::UNO_QUERY );
+ if (xCtx.is() && xCFac.is())
+ xInterface = xCFac->createInstanceWithContext(xCtx);
+
+ if (!xInterface.is())
+ {
+ uno::Reference<lang::XSingleServiceFactory> xFac( xIntFac, uno::UNO_QUERY );
+ if ( xFac.is() )
+ xInterface = xFac->createInstance();
+ }
+
uno::Reference<lang::XInitialization> xInit( xInterface, uno::UNO_QUERY );
if (xInit.is())
{
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index 8418cb3c3a25..99da4979a1b6 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -219,6 +219,8 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
nArrY=0;
SCROW nYExtra = nY2+1;
+ USHORT nDocHeight = ScGlobal::nStdRowHeight;
+ SCROW nDocHeightEndRow = -1;
for (nSignedY=((SCsROW)nY1)-1; nSignedY<=(SCsROW)nYExtra; nSignedY++)
{
if (nSignedY >= 0)
@@ -226,11 +228,13 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
else
nY = MAXROW+1; // ungueltig
- USHORT nDocHeight;
- if (ValidRow(nY))
- nDocHeight = GetRowHeight( nY, nTab );
- else
- nDocHeight = ScGlobal::nStdRowHeight;
+ if (nY > nDocHeightEndRow)
+ {
+ if (ValidRow(nY))
+ nDocHeight = GetRowHeight( nY, nTab, NULL, &nDocHeightEndRow );
+ else
+ nDocHeight = ScGlobal::nStdRowHeight;
+ }
if ( nArrY==0 || nDocHeight || nY > MAXROW )
{
@@ -384,11 +388,15 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
nArrY = 1;
SCSIZE nUIndex;
+ bool bHiddenRow = true;
+ SCROW nHiddenEndRow = -1;
(void) pThisCol->Search( nY1, nUIndex );
while ( nUIndex < pThisCol->nCount &&
(nThisRow=pThisCol->pItems[nUIndex].nRow) <= nY2 )
{
- if ( !RowHidden( nThisRow,nTab ) )
+ if (nThisRow > nHiddenEndRow)
+ bHiddenRow = RowHidden( nThisRow, nTab, nHiddenEndRow);
+ if ( !bHiddenRow )
{
while ( pRowInfo[nArrY].nRowNo < nThisRow )
++nArrY;
diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx
index baf3f4cf3f95..4401ac19d199 100644
--- a/sc/source/core/data/markdata.cxx
+++ b/sc/source/core/data/markdata.cxx
@@ -429,18 +429,28 @@ SCCOLROW ScMarkData::GetMarkColumnRanges( SCCOLROW* pRanges )
if (!bMultiMarked)
return 0;
- DBG_ASSERT(pMultiSel, "bMultiMarked, aber pMultiSel == 0");
+ DBG_ASSERT(pMultiSel, "bMultiMarked, but pMultiSel == 0");
+
+ const SCCOLROW nMultiStart = aMultiRange.aStart.Col();
+ const SCCOLROW nMultiEnd = aMultiRange.aEnd.Col();
+ if (nMultiStart == 0 && nMultiEnd == MAXCOL)
+ {
+ // One or more entire rows.
+ pRanges[0] = 0;
+ pRanges[1] = MAXCOL;
+ return 1;
+ }
SCCOLROW nRangeCnt = 0;
- SCCOLROW nStart = 0;
- while (nStart<=MAXCOL)
+ SCCOLROW nStart = nMultiStart;
+ while (nStart <= nMultiEnd)
{
- while (nStart<MAXCOL && !pMultiSel[nStart].HasMarks())
+ while (nStart < nMultiEnd && !pMultiSel[nStart].HasMarks())
++nStart;
if (pMultiSel[nStart].HasMarks())
{
SCCOLROW nEnd = nStart;
- while (nEnd<MAXCOL && pMultiSel[nEnd].HasMarks())
+ while (nEnd < nMultiEnd && pMultiSel[nEnd].HasMarks())
++nEnd;
if (!pMultiSel[nEnd].HasMarks())
--nEnd;
@@ -450,7 +460,7 @@ SCCOLROW ScMarkData::GetMarkColumnRanges( SCCOLROW* pRanges )
nStart = nEnd+1;
}
else
- nStart = MAXCOL+1;
+ nStart = nMultiEnd+1;
}
return nRangeCnt;
@@ -464,37 +474,51 @@ SCCOLROW ScMarkData::GetMarkRowRanges( SCCOLROW* pRanges )
if (!bMultiMarked)
return 0;
- DBG_ASSERT(pMultiSel, "bMultiMarked, aber pMultiSel == 0");
+ DBG_ASSERT(pMultiSel, "bMultiMarked, but pMultiSel == 0");
- // Welche Zeilen sind markiert?
+ // Which rows are marked?
- BOOL* bRowMarked = new BOOL[MAXROW+1];
+ // Optimized to not loop over MAXCOL*MAXROW as worst case, i.e. Ctrl+A
+
+ const SCCOLROW nMultiStart = aMultiRange.aStart.Row();
+ const SCCOLROW nMultiEnd = aMultiRange.aEnd.Row();
+
+ BOOL* bRowMarked = new BOOL[MAXROWCOUNT];
+ memset( bRowMarked, 0, sizeof(BOOL) * MAXROWCOUNT);
SCROW nRow;
SCCOL nCol;
- for (nRow=0; nRow<=MAXROW; nRow++)
- bRowMarked[nRow] = FALSE;
- SCROW nTop, nBottom;
- for (nCol=0; nCol<=MAXCOL; nCol++)
+ SCROW nTop = -1, nBottom = -1;
+ for (nCol = aMultiRange.aStart.Col(); nCol <= aMultiRange.aEnd.Col(); ++nCol)
{
ScMarkArrayIter aMarkIter( &pMultiSel[nCol] );
while (aMarkIter.Next( nTop, nBottom ))
for (nRow=nTop; nRow<=nBottom; nRow++)
bRowMarked[nRow] = TRUE;
+ if (nTop == nMultiStart && nBottom == nMultiEnd)
+ break; // for, all relevant rows marked
+ }
+
+ if (nTop == nMultiStart && nBottom == nMultiEnd)
+ {
+ pRanges[0] = nTop;
+ pRanges[1] = nBottom;
+ delete[] bRowMarked;
+ return 1;
}
- // zu Bereichen zusammenfassen
+ // Combine to ranges of rows.
SCCOLROW nRangeCnt = 0;
- SCCOLROW nStart = 0;
- while (nStart<=MAXROW)
+ SCCOLROW nStart = nMultiStart;
+ while (nStart <= nMultiEnd)
{
- while (nStart<MAXROW && !bRowMarked[nStart])
+ while (nStart < nMultiEnd && !bRowMarked[nStart])
++nStart;
if (bRowMarked[nStart])
{
SCCOLROW nEnd = nStart;
- while (nEnd<MAXROW && bRowMarked[nEnd])
+ while (nEnd < nMultiEnd && bRowMarked[nEnd])
++nEnd;
if (!bRowMarked[nEnd])
--nEnd;
@@ -504,7 +528,7 @@ SCCOLROW ScMarkData::GetMarkRowRanges( SCCOLROW* pRanges )
nStart = nEnd+1;
}
else
- nStart = MAXROW+1;
+ nStart = nMultiEnd+1;
}
delete[] bRowMarked;
diff --git a/sc/source/core/data/sheetevents.cxx b/sc/source/core/data/sheetevents.cxx
index e9e430ef85d9..e1875b5db15b 100755..100644
--- a/sc/source/core/data/sheetevents.cxx
+++ b/sc/source/core/data/sheetevents.cxx
@@ -33,9 +33,9 @@
// INCLUDE ---------------------------------------------------------------
-#include <tools/debug.hxx>
-
#include "sheetevents.hxx"
+#include <com/sun/star/script/vba/VBAEventId.hpp>
+#include <tools/debug.hxx>
// -----------------------------------------------------------------------
@@ -61,6 +61,37 @@ rtl::OUString ScSheetEvents::GetEventName(sal_Int32 nEvent)
return rtl::OUString::createFromAscii(aEventNames[nEvent]);
}
+// static
+sal_Int32 ScSheetEvents::GetVbaSheetEventId(sal_Int32 nEvent)
+{
+ using namespace ::com::sun::star::script::vba::VBAEventId;
+ if (nEvent<0 || nEvent>=SC_SHEETEVENT_COUNT)
+ {
+ DBG_ERRORFILE("invalid event number");
+ return NO_EVENT;
+ }
+
+ static const sal_Int32 nVbaEventIds[] =
+ {
+ WORKSHEET_ACTIVATE, // SC_SHEETEVENT_FOCUS
+ WORKSHEET_DEACTIVATE, // SC_SHEETEVENT_UNFOCUS
+ WORKSHEET_SELECTIONCHANGE, // SC_SHEETEVENT_SELECT
+ WORKSHEET_BEFOREDOUBLECLICK, // SC_SHEETEVENT_DOUBLECLICK
+ WORKSHEET_BEFORERIGHTCLICK, // SC_SHEETEVENT_RIGHTCLICK
+ WORKSHEET_CHANGE, // SC_SHEETEVENT_CHANGE
+ WORKSHEET_CALCULATE // SC_SHEETEVENT_CALCULATE
+ };
+ return nVbaEventIds[nEvent];
+}
+
+// static
+sal_Int32 ScSheetEvents::GetVbaDocumentEventId(sal_Int32 nEvent)
+{
+ using namespace ::com::sun::star::script::vba::VBAEventId;
+ sal_Int32 nSheetEventId = GetVbaSheetEventId(nEvent);
+ return (nSheetEventId != NO_EVENT) ? (nSheetEventId + USERDEFINED_START) : NO_EVENT;
+}
+
// -----------------------------------------------------------------------
ScSheetEvents::ScSheetEvents() :
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 87561abf1513..e534bb9dfb78 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -28,67 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-
-
-//------------------------------------------------------------------------
-
-#ifdef WIN
-
-// SFX
-#define _SFXAPPWIN_HXX
-#define _SFX_SAVEOPT_HXX
-//#define _SFX_CHILDWIN_HXX ***
-#define _SFXCTRLITEM_HXX
-#define _SFXPRNMON_HXX
-#define _INTRO_HXX
-#define _SFXMSGDESCR_HXX
-#define _SFXMSGPOOL_HXX
-#define _SFXFILEDLG_HXX
-#define _PASSWD_HXX
-#define _SFXTBXCTRL_HXX
-#define _SFXSTBITEM_HXX
-#define _SFXMNUITEM_HXX
-#define _SFXIMGMGR_HXX
-#define _SFXTBXMGR_HXX
-#define _SFXSTBMGR_HXX
-#define _SFX_MINFITEM_HXX
-#define _SFXEVENT_HXX
-
-//#define _SI_HXX
-//#define SI_NODRW
-#define _SI_DLL_HXX
-#define _SIDLL_HXX
-#define _SI_NOITEMS
-#define _SI_NOOTHERFORMS
-#define _SI_NOSBXCONTROLS
-#define _SINOSBXCONTROLS
-#define _SI_NODRW //
-#define _SI_NOCONTROL
-#define _VCBRW_HXX
-#define _VCTRLS_HXX
-//#define _VCSBX_HXX
-#define _VCONT_HXX
-#define _VDRWOBJ_HXX
-#define _VCATTR_HXX
-
-
-#define _SVX_DAILDLL_HXX
-#define _SVX_HYPHEN_HXX
-#define _SVX_IMPGRF_HXX
-#define _SVX_OPTITEMS_HXX
-#define _SVX_OPTGERL_HXX
-#define _SVX_OPTSAVE_HXX
-#define _SVX_OPTSPELL_HXX
-#define _SVX_OPTPATH_HXX
-#define _SVX_OPTLINGU_HXX
-#define _SVX_RULER_HXX
-#define _SVX_RULRITEM_HXX
-#define _SVX_SPLWRAP_HXX
-#define _SVX_SPLDLG_HXX
-#define _SVX_THESDLG_HXX
-
-#endif //WIN
-
// INCLUDE ---------------------------------------------------------------
#include "scitems.hxx"
@@ -115,8 +54,6 @@
#include "sheetevents.hxx"
#include "segmenttree.hxx"
-// STATIC DATA -----------------------------------------------------------
-
// -----------------------------------------------------------------------
ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 9bd5b031fde5..d54e16b8cbd7 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -155,6 +155,22 @@ void ScTable::InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE
mpFilteredRows->insertSegment(nStartRow, nSize, true);
mpHiddenRows->insertSegment(nStartRow, nSize, true);
+
+ if (!maRowManualBreaks.empty())
+ {
+ std::set<SCROW>::reverse_iterator rit = maRowManualBreaks.rbegin();
+ while (rit != maRowManualBreaks.rend())
+ {
+ SCROW nRow = *rit;
+ if (nRow < nStartRow)
+ break; // while
+ else
+ {
+ maRowManualBreaks.erase( (++rit).base());
+ maRowManualBreaks.insert( static_cast<SCROW>( nRow + nSize));
+ }
+ }
+ }
}
for (SCCOL j=nStartCol; j<=nEndCol; j++)
@@ -185,6 +201,18 @@ void ScTable::DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE
mpFilteredRows->removeSegment(nStartRow, nStartRow+nSize);
mpHiddenRows->removeSegment(nStartRow, nStartRow+nSize);
+
+ if (!maRowManualBreaks.empty())
+ {
+ std::set<SCROW>::iterator it = maRowManualBreaks.upper_bound( static_cast<SCROW>( nStartRow + nSize - 1));
+ maRowManualBreaks.erase( maRowManualBreaks.lower_bound( nStartRow), it);
+ while (it != maRowManualBreaks.end())
+ {
+ SCROW nRow = *it;
+ maRowManualBreaks.erase( it++);
+ maRowManualBreaks.insert( static_cast<SCROW>( nRow - nSize));
+ }
+ }
}
{ // scope for bulk broadcast
@@ -233,6 +261,22 @@ void ScTable::InsertCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE
mpHiddenCols->insertSegment(nStartCol, static_cast<SCCOL>(nSize), true);
mpFilteredCols->insertSegment(nStartCol, static_cast<SCCOL>(nSize), true);
+
+ if (!maColManualBreaks.empty())
+ {
+ std::set<SCCOL>::reverse_iterator rit = maColManualBreaks.rbegin();
+ while (rit != maColManualBreaks.rend())
+ {
+ SCCOL nCol = *rit;
+ if (nCol < nStartCol)
+ break; // while
+ else
+ {
+ maColManualBreaks.erase( (++rit).base());
+ maColManualBreaks.insert( static_cast<SCCOL>( nCol + nSize));
+ }
+ }
+ }
}
@@ -291,6 +335,18 @@ void ScTable::DeleteCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE
SCCOL nRmSize = nStartCol + static_cast<SCCOL>(nSize);
mpHiddenCols->removeSegment(nStartCol, nRmSize);
mpFilteredCols->removeSegment(nStartCol, nRmSize);
+
+ if (!maColManualBreaks.empty())
+ {
+ std::set<SCCOL>::iterator it = maColManualBreaks.upper_bound( static_cast<SCCOL>( nStartCol + nSize - 1));
+ maColManualBreaks.erase( maColManualBreaks.lower_bound( nStartCol), it);
+ while (it != maColManualBreaks.end())
+ {
+ SCCOL nCol = *it;
+ maColManualBreaks.erase( it++);
+ maColManualBreaks.insert( static_cast<SCCOL>( nCol - nSize));
+ }
+ }
}
@@ -688,6 +744,7 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
pDestTab->IncRecalcLevel();
if (bWidth)
+ {
for (SCCOL i=nCol1; i<=nCol2; i++)
{
bool bThisHidden = ColHidden(i);
@@ -703,6 +760,8 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (bChange)
bFlagChange = true;
}
+ pDestTab->SetColManualBreaks( maColManualBreaks);
+ }
if (bHeight)
{
@@ -754,6 +813,7 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
pDestTab->SetRowFiltered(i, nLastRow, bFiltered);
i = nLastRow;
}
+ pDestTab->SetRowManualBreaks( maRowManualBreaks);
}
pDestTab->DecRecalcLevel();
}
@@ -791,11 +851,17 @@ void ScTable::UndoToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (bWidth||bHeight)
{
if (bWidth)
+ {
for (SCCOL i=nCol1; i<=nCol2; i++)
pDestTab->pColWidth[i] = pColWidth[i];
+ pDestTab->SetColManualBreaks( maColManualBreaks);
+ }
if (bHeight)
+ {
pDestTab->CopyRowHeight(*this, nRow1, nRow2, 0);
- DecRecalcLevel();
+ pDestTab->SetRowManualBreaks( maRowManualBreaks);
+ }
+ DecRecalcLevel();
}
}
}
@@ -2241,7 +2307,7 @@ void ScTable::SetManualHeight( SCROW nStartRow, SCROW nEndRow, BOOL bManual )
}
-USHORT ScTable::GetColWidth( SCCOL nCol )
+USHORT ScTable::GetColWidth( SCCOL nCol ) const
{
DBG_ASSERT(VALIDCOL(nCol),"Falsche Spaltennummer");
@@ -2315,34 +2381,50 @@ USHORT ScTable::GetCommonWidth( SCCOL nEndCol )
}
-USHORT ScTable::GetRowHeight( SCROW nRow, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero )
+USHORT ScTable::GetRowHeight( SCROW nRow, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero ) const
{
- DBG_ASSERT(VALIDROW(nRow),"Falsche Zeilennummer");
+ DBG_ASSERT(VALIDROW(nRow),"Invalid row number");
if (VALIDROW(nRow) && mpRowHeights)
{
- if (bHiddenAsZero && RowHidden(nRow))
+ if (bHiddenAsZero && RowHidden( nRow, pStartRow, pEndRow))
return 0;
else
{
ScFlatUInt16RowSegments::RangeData aData;
if (!mpRowHeights->getRangeData(nRow, aData))
+ {
+ if (pStartRow)
+ *pStartRow = nRow;
+ if (pEndRow)
+ *pEndRow = nRow;
// TODO: What should we return in case the search fails?
return 0;
+ }
+ // If bHiddenAsZero, pStartRow and pEndRow were initialized to
+ // boundaries of a non-hidden segment. Assume that the previous and
+ // next segment are hidden then and limit the current height
+ // segment.
if (pStartRow)
- *pStartRow = aData.mnRow1;
+ *pStartRow = (bHiddenAsZero ? std::max( *pStartRow, aData.mnRow1) : aData.mnRow1);
if (pEndRow)
- *pEndRow = aData.mnRow2;
+ *pEndRow = (bHiddenAsZero ? std::min( *pEndRow, aData.mnRow2) : aData.mnRow2);
return aData.mnValue;
}
}
else
+ {
+ if (pStartRow)
+ *pStartRow = nRow;
+ if (pEndRow)
+ *pEndRow = nRow;
return (USHORT) ScGlobal::nStdRowHeight;
+ }
}
-ULONG ScTable::GetRowHeight( SCROW nStartRow, SCROW nEndRow )
+ULONG ScTable::GetRowHeight( SCROW nStartRow, SCROW nEndRow ) const
{
DBG_ASSERT(VALIDROW(nStartRow) && VALIDROW(nEndRow),"Falsche Zeilennummer");
@@ -2368,7 +2450,7 @@ ULONG ScTable::GetRowHeight( SCROW nStartRow, SCROW nEndRow )
}
-ULONG ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale )
+ULONG ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale ) const
{
DBG_ASSERT(VALIDROW(nStartRow) && VALIDROW(nEndRow),"Falsche Zeilennummer");
@@ -3036,7 +3118,7 @@ void ScTable::SetDrawPageSize(bool bResetStreamValid, bool bUpdateNoteCaptionPos
}
-ULONG ScTable::GetRowOffset( SCROW nRow )
+ULONG ScTable::GetRowOffset( SCROW nRow ) const
{
ULONG n = 0;
if ( mpHiddenRows && mpRowHeights )
@@ -3059,7 +3141,7 @@ ULONG ScTable::GetRowOffset( SCROW nRow )
return n;
}
-SCROW ScTable::GetRowForHeight(ULONG nHeight)
+SCROW ScTable::GetRowForHeight(ULONG nHeight) const
{
sal_uInt32 nSum = 0;
@@ -3086,7 +3168,7 @@ SCROW ScTable::GetRowForHeight(ULONG nHeight)
}
-ULONG ScTable::GetColOffset( SCCOL nCol )
+ULONG ScTable::GetColOffset( SCCOL nCol ) const
{
ULONG n = 0;
if ( pColWidth )
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index 2635b5821e4f..7c13756aab38 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -326,6 +326,22 @@ BOOL ScTable::HasManualBreaks() const
return !maRowManualBreaks.empty() || !maColManualBreaks.empty();
}
+void ScTable::SetRowManualBreaks( const ::std::set<SCROW>& rBreaks )
+{
+ maRowManualBreaks = rBreaks;
+ InvalidatePageBreaks();
+ if (IsStreamValid())
+ SetStreamValid(FALSE);
+}
+
+void ScTable::SetColManualBreaks( const ::std::set<SCCOL>& rBreaks )
+{
+ maColManualBreaks = rBreaks;
+ InvalidatePageBreaks();
+ if (IsStreamValid())
+ SetStreamValid(FALSE);
+}
+
void ScTable::GetAllRowBreaks(set<SCROW>& rBreaks, bool bPage, bool bManual) const
{
if (bPage)
@@ -355,7 +371,7 @@ bool ScTable::HasRowPageBreak(SCROW nRow) const
if (!ValidRow(nRow))
return false;
- return maRowPageBreaks.count(nRow) > 0;
+ return maRowPageBreaks.find(nRow) != maRowPageBreaks.end();
}
bool ScTable::HasColPageBreak(SCCOL nCol) const
@@ -363,7 +379,7 @@ bool ScTable::HasColPageBreak(SCCOL nCol) const
if (!ValidCol(nCol))
return false;
- return maColPageBreaks.count(nCol) > 0;
+ return maColPageBreaks.find(nCol) != maColPageBreaks.end();
}
bool ScTable::HasRowManualBreak(SCROW nRow) const
@@ -371,7 +387,7 @@ bool ScTable::HasRowManualBreak(SCROW nRow) const
if (!ValidRow(nRow))
return false;
- return maRowManualBreaks.count(nRow) > 0;
+ return maRowManualBreaks.find(nRow) != maRowManualBreaks.end();
}
bool ScTable::HasColManualBreak(SCCOL nCol) const
@@ -379,7 +395,7 @@ bool ScTable::HasColManualBreak(SCCOL nCol) const
if (!ValidCol(nCol))
return false;
- return (maColManualBreaks.count(nCol) > 0);
+ return maColManualBreaks.find(nCol) != maColManualBreaks.end();
}
SCROW ScTable::GetNextManualBreak(SCROW nRow) const
@@ -483,15 +499,27 @@ Sequence<TablePageBreakData> ScTable::GetRowBreakData() const
return aSeq;
}
-bool ScTable::RowHidden(SCROW nRow, SCROW* pFirstRow, SCROW* pLastRow)
+bool ScTable::RowHidden(SCROW nRow, SCROW* pFirstRow, SCROW* pLastRow) const
{
if (!ValidRow(nRow))
+ {
+ if (pFirstRow)
+ *pFirstRow = nRow;
+ if (pLastRow)
+ *pLastRow = nRow;
return true;
+ }
ScFlatBoolRowSegments::RangeData aData;
if (!mpHiddenRows->getRangeData(nRow, aData))
+ {
// search failed.
+ if (pFirstRow)
+ *pFirstRow = nRow;
+ if (pLastRow)
+ *pLastRow = nRow;
return true;
+ }
if (pFirstRow)
*pFirstRow = aData.mnRow1;
@@ -502,7 +530,7 @@ bool ScTable::RowHidden(SCROW nRow, SCROW* pFirstRow, SCROW* pLastRow)
}
-bool ScTable::RowHidden(SCROW nRow, SCROW& rLastRow)
+bool ScTable::RowHidden(SCROW nRow, SCROW& rLastRow) const
{
rLastRow = nRow;
if (!ValidRow(nRow))
@@ -517,7 +545,7 @@ bool ScTable::RowHidden(SCROW nRow, SCROW& rLastRow)
return aData.mbValue;
}
-bool ScTable::HasHiddenRows(SCROW nStartRow, SCROW nEndRow)
+bool ScTable::HasHiddenRows(SCROW nStartRow, SCROW nEndRow) const
{
SCROW nRow = nStartRow;
while (nRow <= nEndRow)
@@ -532,7 +560,7 @@ bool ScTable::HasHiddenRows(SCROW nStartRow, SCROW nEndRow)
return false;
}
-bool ScTable::ColHidden(SCCOL nCol, SCCOL& rLastCol)
+bool ScTable::ColHidden(SCCOL nCol, SCCOL& rLastCol) const
{
rLastCol = nCol;
if (!ValidCol(nCol))
@@ -546,7 +574,7 @@ bool ScTable::ColHidden(SCCOL nCol, SCCOL& rLastCol)
return aData.mbValue;
}
-bool ScTable::ColHidden(SCCOL nCol, SCCOL* pFirstCol, SCCOL* pLastCol)
+bool ScTable::ColHidden(SCCOL nCol, SCCOL* pFirstCol, SCCOL* pLastCol) const
{
if (!ValidCol(nCol))
return true;
@@ -627,7 +655,7 @@ void ScTable::CopyRowHeight(ScTable& rSrcTable, SCROW nStartRow, SCROW nEndRow,
}
}
-SCROW ScTable::FirstVisibleRow(SCROW nStartRow, SCROW nEndRow)
+SCROW ScTable::FirstVisibleRow(SCROW nStartRow, SCROW nEndRow) const
{
SCROW nRow = nStartRow;
ScFlatBoolRowSegments::RangeData aData;
@@ -650,7 +678,7 @@ SCROW ScTable::FirstVisibleRow(SCROW nStartRow, SCROW nEndRow)
return ::std::numeric_limits<SCROW>::max();
}
-SCROW ScTable::LastVisibleRow(SCROW nStartRow, SCROW nEndRow)
+SCROW ScTable::LastVisibleRow(SCROW nStartRow, SCROW nEndRow) const
{
SCROW nRow = nEndRow;
ScFlatBoolRowSegments::RangeData aData;
@@ -673,7 +701,7 @@ SCROW ScTable::LastVisibleRow(SCROW nStartRow, SCROW nEndRow)
return ::std::numeric_limits<SCROW>::max();
}
-SCROW ScTable::CountVisibleRows(SCROW nStartRow, SCROW nEndRow)
+SCROW ScTable::CountVisibleRows(SCROW nStartRow, SCROW nEndRow) const
{
SCROW nCount = 0;
SCROW nRow = nStartRow;
@@ -694,7 +722,7 @@ SCROW ScTable::CountVisibleRows(SCROW nStartRow, SCROW nEndRow)
return nCount;
}
-sal_uInt32 ScTable::GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow)
+sal_uInt32 ScTable::GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow) const
{
sal_uInt32 nHeight = 0;
SCROW nRow = nStartRow;
@@ -717,7 +745,7 @@ sal_uInt32 ScTable::GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow)
return nHeight;
}
-SCCOLROW ScTable::LastHiddenColRow(SCCOLROW nPos, bool bCol)
+SCCOLROW ScTable::LastHiddenColRow(SCCOLROW nPos, bool bCol) const
{
if (bCol)
{
@@ -741,7 +769,7 @@ SCCOLROW ScTable::LastHiddenColRow(SCCOLROW nPos, bool bCol)
return ::std::numeric_limits<SCCOLROW>::max();
}
-bool ScTable::RowFiltered(SCROW nRow, SCROW* pFirstRow, SCROW* pLastRow)
+bool ScTable::RowFiltered(SCROW nRow, SCROW* pFirstRow, SCROW* pLastRow) const
{
if (!ValidRow(nRow))
return false;
@@ -759,7 +787,7 @@ bool ScTable::RowFiltered(SCROW nRow, SCROW* pFirstRow, SCROW* pLastRow)
return aData.mbValue;
}
-bool ScTable::ColFiltered(SCCOL nCol, SCCOL* pFirstCol, SCCOL* pLastCol)
+bool ScTable::ColFiltered(SCCOL nCol, SCCOL* pFirstCol, SCCOL* pLastCol) const
{
if (!ValidCol(nCol))
return false;
@@ -777,7 +805,7 @@ bool ScTable::ColFiltered(SCCOL nCol, SCCOL* pFirstCol, SCCOL* pLastCol)
return aData.mbValue;
}
-bool ScTable::HasFilteredRows(SCROW nStartRow, SCROW nEndRow)
+bool ScTable::HasFilteredRows(SCROW nStartRow, SCROW nEndRow) const
{
SCROW nRow = nStartRow;
while (nRow <= nEndRow)
@@ -837,7 +865,7 @@ void ScTable::SetColFiltered(SCCOL nStartCol, SCCOL nEndCol, bool bFiltered)
mpFilteredCols->setFalse(nStartCol, nEndCol);
}
-SCROW ScTable::FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow)
+SCROW ScTable::FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow) const
{
SCROW nRow = nStartRow;
ScFlatBoolRowSegments::RangeData aData;
@@ -860,7 +888,7 @@ SCROW ScTable::FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow)
return ::std::numeric_limits<SCROW>::max();
}
-SCROW ScTable::LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow)
+SCROW ScTable::LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow) const
{
SCROW nRow = nEndRow;
ScFlatBoolRowSegments::RangeData aData;
@@ -883,7 +911,7 @@ SCROW ScTable::LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow)
return ::std::numeric_limits<SCROW>::max();
}
-SCROW ScTable::CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow)
+SCROW ScTable::CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow) const
{
SCROW nCount = 0;
SCROW nRow = nStartRow;
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index fc3d9bf51be2..58ee1b06f7f7 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -175,25 +175,9 @@ void ScChartPositioner::GlueState()
const BYTE nOccu = 1;
const BYTE nFree = 2;
const BYTE nGlue = 3;
-#ifdef WIN
- // we hate 16bit, don't we?
- BYTE huge* p;
- BYTE huge* pA = (BYTE huge*) SvMemAlloc( nCR );
- if ( nCR > (ULONG)((USHORT)~0) )
- { // in 32k Bloecken initialisieren
- ULONG j;
- for ( j=0; j<nCR; j+=0x8000 )
- {
- memset( pA+j, nHole, Min( (ULONG)0x8000, nCR-j ) );
- }
- }
- else
- memset( pA, nHole, nCR * sizeof(BYTE) );
-#else
BYTE* p;
BYTE* pA = new BYTE[ nCR ];
memset( pA, 0, nCR * sizeof(BYTE) );
-#endif
SCCOL nCol, nCol1, nCol2;
SCROW nRow, nRow1, nRow2;
@@ -285,11 +269,7 @@ void ScChartPositioner::GlueState()
eGlue = SC_CHARTGLUE_NONE;
}
-#ifdef WIN
- SvMemFree( pA );
-#else
delete [] pA;
-#endif
}
void ScChartPositioner::CheckColRowHeaders()
@@ -524,9 +504,6 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, SCROW nChartRows,
nRowCount( nChartRows )
{
DBG_ASSERT( nColCount && nRowCount, "ScChartPositionMap without dimension" );
-#ifdef WIN
-#error ScChartPositionMap not implemented for 16-bit dumdums
-#endif
ScAddress* pPos;
SCCOL nCol;
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index c28d295275ae..828c9ae64c7d 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -121,24 +121,6 @@ enum ScanState
ssStop
};
-// ODFF names that are not written in the current mapping but to be recognized.
-// New names will be written in a future relase, then exchange (!) with the
-// names in formula/source/core/resource/core_resource.src to be able to still
-// read the old names as well.
-struct FunctionName
-{
- const sal_Char* pName;
- OpCode eOp;
-};
-static const FunctionName aOdffAliases[] = {
- // Renamed old names:
- // XXX none yet.
- // Renamed new names:
- { "BINOM.DIST.RANGE", ocB }, // B -> BINOM.DIST.RANGE
- { "LEGACY.TDIST", ocTDist } // TDIST -> LEGACY.TDIST
-};
-static const size_t nOdffAliases = sizeof(aOdffAliases) / sizeof(aOdffAliases[0]);
-
static const sal_Char* pInternal[ 1 ] = { "TTT" };
using namespace ::com::sun::star::i18n;
@@ -2524,6 +2506,25 @@ BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
}
else if (mxSymbols->isODFF())
{
+ // ODFF names that are not written in the current mapping but to be
+ // recognized. New names will be written in a future relase, then
+ // exchange (!) with the names in
+ // formula/source/core/resource/core_resource.src to be able to still
+ // read the old names as well.
+ struct FunctionName
+ {
+ const sal_Char* pName;
+ OpCode eOp;
+ };
+ static const FunctionName aOdffAliases[] = {
+ // Renamed old names:
+ // XXX none yet.
+ // Renamed new names:
+ { "BINOM.DIST.RANGE", ocB }, // B -> BINOM.DIST.RANGE
+ { "LEGACY.TDIST", ocTDist }, // TDIST -> LEGACY.TDIST
+ { "ORG.OPENOFFICE.EASTERSUNDAY", ocEasterSunday } // EASTERSUNDAY -> ORG.OPENOFFICE.EASTERSUNDAY
+ };
+ static const size_t nOdffAliases = sizeof(aOdffAliases) / sizeof(aOdffAliases[0]);
for (size_t i=0; i<nOdffAliases; ++i)
{
if (rName.EqualsIgnoreCaseAscii( aOdffAliases[i].pName))
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 30aa0b8aa13e..461bdcccf27c 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2976,10 +2976,6 @@ void ScInterpreter::ScMin( BOOL bTextAsZero )
PushDouble(nMin);
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",off)
-#endif
-
void ScInterpreter::ScMax( BOOL bTextAsZero )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMax" );
@@ -3100,10 +3096,6 @@ void ScInterpreter::ScMax( BOOL bTextAsZero )
else
PushDouble(nMax);
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",on)
-#endif
-
double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
{
@@ -5789,10 +5781,6 @@ void ScInterpreter::ScVLookup()
CalculateLookup(FALSE);
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",off)
-#endif
-
void ScInterpreter::ScSubTotal()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSubTotal" );
@@ -5832,10 +5820,6 @@ void ScInterpreter::ScSubTotal()
PushDouble( nVal );
}
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",on)
-#endif
-
ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField )
{
@@ -7097,22 +7081,75 @@ void ScInterpreter::ScText()
if ( MustHaveParamCount( GetByte(), 2 ) )
{
String sFormatString = GetString();
- double fVal = GetDouble();
String aStr;
- Color* pColor = NULL;
- LanguageType eCellLang;
- const ScPatternAttr* pPattern = pDok->GetPattern(
- aPos.Col(), aPos.Row(), aPos.Tab() );
- if ( pPattern )
- eCellLang = ((const SvxLanguageItem&)
- pPattern->GetItem( ATTR_LANGUAGE_FORMAT )).GetValue();
- else
- eCellLang = ScGlobal::eLnge;
- if ( !pFormatter->GetPreviewStringGuess( sFormatString, fVal, aStr,
- &pColor, eCellLang ) )
- PushIllegalArgument();
+ bool bString = false;
+ double fVal = 0.0;
+ switch (GetStackType())
+ {
+ case svError:
+ PopError();
+ break;
+ case svDouble:
+ fVal = PopDouble();
+ break;
+ case svString:
+ aStr = PopString();
+ bString = true;
+ break;
+ default:
+ {
+ FormulaTokenRef xTok( PopToken());
+ if (!nGlobalError)
+ {
+ PushTempToken( xTok);
+ // Temporarily override the ConvertStringToValue()
+ // error for GetCellValue() / GetCellValueOrZero()
+ USHORT nSErr = mnStringNoValueError;
+ mnStringNoValueError = errNotNumericString;
+ fVal = GetDouble();
+ mnStringNoValueError = nSErr;
+ if (nGlobalError == errNotNumericString)
+ {
+ // Not numeric.
+ nGlobalError = 0;
+ PushTempToken( xTok);
+ aStr = GetString();
+ bString = true;
+ }
+ }
+ }
+ }
+ if (nGlobalError)
+ PushError( nGlobalError);
else
- PushString(aStr);
+ {
+ String aResult;
+ Color* pColor = NULL;
+ LanguageType eCellLang;
+ const ScPatternAttr* pPattern = pDok->GetPattern(
+ aPos.Col(), aPos.Row(), aPos.Tab() );
+ if ( pPattern )
+ eCellLang = ((const SvxLanguageItem&)
+ pPattern->GetItem( ATTR_LANGUAGE_FORMAT )).GetValue();
+ else
+ eCellLang = ScGlobal::eLnge;
+ if (bString)
+ {
+ if (!pFormatter->GetPreviewString( sFormatString, aStr,
+ aResult, &pColor, eCellLang))
+ PushIllegalArgument();
+ else
+ PushString( aResult);
+ }
+ else
+ {
+ if (!pFormatter->GetPreviewStringGuess( sFormatString, fVal,
+ aResult, &pColor, eCellLang))
+ PushIllegalArgument();
+ else
+ PushString( aResult);
+ }
+ }
}
}
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index dac5f0c99ac5..404eaf763a51 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -682,10 +682,6 @@ void ScInterpreter::ScNPV()
}
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",off)
-#endif
-
void ScInterpreter::ScIRR()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIRR" );
@@ -752,10 +748,6 @@ void ScInterpreter::ScIRR()
else
PushError( errNoConvergence);
}
-#if defined(WIN) && defined(MSC)
-#pragma optimize("",on)
-#endif
-
void ScInterpreter::ScMIRR()
{ // range_of_values ; rate_invest ; rate_reinvest
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index 2cf2d8f580c0..458629979172 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -420,7 +420,7 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
}
-void ExcTable::FillAsTable( size_t nCodeNameIdx )
+void ExcTable::FillAsTable( SCTAB nCodeNameIdx )
{
InitializeTable( mnScTab );
@@ -550,7 +550,7 @@ void ExcTable::FillAsTable( size_t nCodeNameIdx )
Add( new ExcEof );
}
-void ExcTable::FillAsXmlTable( size_t nCodeNameIdx )
+void ExcTable::FillAsXmlTable( SCTAB nCodeNameIdx )
{
RootData& rR = GetOldRoot();
@@ -640,7 +640,7 @@ void ExcTable::FillAsXmlTable( size_t nCodeNameIdx )
}
-void ExcTable::FillAsEmptyTable( size_t nCodeNameIdx )
+void ExcTable::FillAsEmptyTable( SCTAB nCodeNameIdx )
{
InitializeTable( mnScTab );
@@ -723,7 +723,7 @@ void ExcDocument::ReadDoc( void )
aHeader.FillAsHeader( maBoundsheetList );
SCTAB nScTab = 0, nScTabCount = GetTabInfo().GetScTabCount();
- size_t nCodeNameIdx = 0, nCodeNameCount = GetExtDocOptions().GetCodeNameCount();
+ SCTAB nCodeNameIdx = 0, nCodeNameCount = GetExtDocOptions().GetCodeNameCount();
for( ; nScTab < nScTabCount; ++nScTab )
{
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index 9608804da9f9..d75a0e669603 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -56,7 +56,6 @@
#include <svx/xflclit.hxx>
#include <filter/msfilter/svxmsbas.hxx>
#include <basic/basmgr.hxx>
-#include <oox/xls/excelvbaproject.hxx>
#include <vcl/graph.hxx>
#include <vcl/bmpacc.hxx>
@@ -243,17 +242,6 @@ void ImportExcel8::ReadBasic( void )
{
SvxImportMSVBasic aBasicImport( *pShell, *xRootStrg, bLoadCode, bLoadStrg );
bool bAsComment = !bLoadExecutable;
- if ( !bAsComment )
- {
- uno::Any aGlobs;
- uno::Sequence< uno::Any > aArgs(1);
- aArgs[ 0 ] <<= pShell->GetModel();
- aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Globals" ) ), aArgs );
- pShell->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
- BasicManager* pAppMgr = SFX_APP()->GetBasicManager();
- if ( pAppMgr )
- pAppMgr->SetGlobalUNOConstant( "ThisExcelDoc", aArgs[ 0 ] );
- }
aBasicImport.Import( EXC_STORAGE_VBA_PROJECT, EXC_STORAGE_VBA, bAsComment );
}
}
@@ -292,8 +280,6 @@ void ImportExcel8::PostDocLoad( void )
// read doc info (no docshell while pasting from clipboard)
LoadDocumentProperties();
- // attach document events to VBA macros
- AttachDocumentEvents();
// #i45843# Pivot tables are now handled outside of PostDocLoad, so they are available
// when formula cells are calculated, for the GETPIVOTDATA function.
@@ -318,21 +304,6 @@ void ImportExcel8::LoadDocumentProperties()
}
}
-void ImportExcel8::AttachDocumentEvents()
-{
- SfxObjectShell* pShell = GetDocShell();
- if( HasBasic() && pShell )
- {
- uno::Reference< lang::XMultiServiceFactory > xGlobalFactory = ::comphelper::getProcessServiceFactory();
- uno::Reference< sheet::XSpreadsheetDocument > xDocument( pShell->GetModel(), uno::UNO_QUERY );
- if( xGlobalFactory.is() && xDocument.is() )
- {
- ::oox::xls::VbaProject aVbaProject( xGlobalFactory, xDocument );
- aVbaProject.attachToEvents();
- }
- }
-}
-
//___________________________________________________________________
// autofilter
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index 209d24ac043d..059f5ba7426b 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -87,7 +87,7 @@
#include "excimp8.hxx"
#include "excform.hxx"
-#if defined( WNT ) || defined( WIN )
+#if defined( WNT )
#include <math.h>
#else
#include <stdlib.h>
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index dc87bba4c050..8d09cae60941 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -98,7 +98,6 @@
#include "convuno.hxx"
#include "postit.hxx"
#include "globstr.hrc"
-#include "chartlis.hxx"
#include "fprogressbar.hxx"
#include "xltracer.hxx"
@@ -4056,9 +4055,8 @@ void XclImpObjectManager::ConvertObjects()
for( XclImpSheetDrawingMap::iterator aIt = maSheetDrawings.begin(), aEnd = maSheetDrawings.end(); aIt != aEnd; ++aIt )
aIt->second->ConvertObjects( aDffConv );
- ScChartListenerCollection* pChartListeners = GetDoc().GetChartListenerCollection();
- if( pChartListeners && (pChartListeners->GetCount() > 0) )
- pChartListeners->SetDirty();
+ // #i112436# don't call ScChartListenerCollection::SetDirty here,
+ // instead use InterpretDirtyCells in ScDocument::CalcAfterLoad.
}
String XclImpObjectManager::GetDefaultObjName( const XclImpDrawObjBase& rDrawObj ) const
diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx
index 70ff46a0d741..5d21d91c9f53 100644
--- a/sc/source/filter/excel/xiname.cxx
+++ b/sc/source/filter/excel/xiname.cxx
@@ -132,7 +132,8 @@ XclImpName::XclImpName( XclImpStream& rStrm, sal_uInt16 nXclNameIdx ) :
if( nXclTab != EXC_NAME_GLOBAL )
{
sal_uInt16 nUsedTab = (GetBiff() == EXC_BIFF8) ? nXclTab : nExtSheet;
- maScName.Append( '_' ).Append( String::CreateFromInt32( nUsedTab ) );
+ // #163146# do not rename sheet-local names by default, this breaks VBA scripts
+// maScName.Append( '_' ).Append( String::CreateFromInt32( nUsedTab ) );
// TODO: may not work for BIFF5, handle skipped sheets (all BIFF)
mnScTab = static_cast< SCTAB >( nUsedTab - 1 );
}
@@ -208,7 +209,8 @@ XclImpName::XclImpName( XclImpStream& rStrm, sal_uInt16 nXclNameIdx ) :
// 4) *** create a defined name in the Calc document *** ------------------
- if( pTokArr && (bBuiltIn || !::get_flag( nFlags, EXC_NAME_HIDDEN )) && !mbVBName )
+ // #163146# do not ignore hidden names (may be regular names created by VBA scripts)
+ if( pTokArr /*&& (bBuiltIn || !::get_flag( nFlags, EXC_NAME_HIDDEN ))*/ && !mbVBName )
{
// create the Calc name data
ScRangeData* pData = new ScRangeData( GetDocPtr(), maScName, *pTokArr, ScAddress(), nNameType );
diff --git a/sc/source/filter/excel/xiroot.cxx b/sc/source/filter/excel/xiroot.cxx
index 3fd2650cf2ff..5f8bcbd481e5 100644
--- a/sc/source/filter/excel/xiroot.cxx
+++ b/sc/source/filter/excel/xiroot.cxx
@@ -289,7 +289,7 @@ void XclImpRoot::ReadCodeName( XclImpStream& rStrm, bool bGlobals )
}
else
{
- GetExtDocOptions().AppendCodeName( aName );
+ GetExtDocOptions().SetCodeName( GetCurrScTab(), aName );
GetDoc().SetCodeName( GetCurrScTab(), aName );
}
}
diff --git a/sc/source/filter/excel/xlescher.cxx b/sc/source/filter/excel/xlescher.cxx
index bb77fac2be73..153a5d5ed3cc 100644
--- a/sc/source/filter/excel/xlescher.cxx
+++ b/sc/source/filter/excel/xlescher.cxx
@@ -36,8 +36,8 @@
#include "document.hxx"
#include "xestream.hxx"
#include "xistream.hxx"
-#include "xltools.hxx"
#include "xlroot.hxx"
+#include "xltools.hxx"
using ::rtl::OUString;
using ::com::sun::star::uno::Reference;
diff --git a/sc/source/filter/inc/excdoc.hxx b/sc/source/filter/inc/excdoc.hxx
index f00e8d091590..5da6a5d38d83 100644
--- a/sc/source/filter/inc/excdoc.hxx
+++ b/sc/source/filter/inc/excdoc.hxx
@@ -69,7 +69,7 @@ private:
// pRec mit new anlegen und vergessen, delete macht ExcTable selber!
void Add( XclExpRecordBase* pRec );
- void FillAsXmlTable( size_t nCodeNameIdx );
+ void FillAsXmlTable( SCTAB nCodeNameIdx );
public:
ExcTable( const XclExpRoot& rRoot );
@@ -77,8 +77,8 @@ public:
~ExcTable();
void FillAsHeader( ExcBoundsheetList& rBoundsheetList );
- void FillAsTable( size_t nCodeNameIdx );
- void FillAsEmptyTable( size_t nCodeNameIdx );
+ void FillAsTable( SCTAB nCodeNameIdx );
+ void FillAsEmptyTable( SCTAB nCodeNameIdx );
void Write( XclExpStream& );
void WriteXml( XclExpXmlStream& );
diff --git a/sc/source/filter/inc/excimp8.hxx b/sc/source/filter/inc/excimp8.hxx
index 5b2bbe2e7b5d..7e4cca15dfe1 100644
--- a/sc/source/filter/inc/excimp8.hxx
+++ b/sc/source/filter/inc/excimp8.hxx
@@ -81,7 +81,6 @@ protected:
private:
void LoadDocumentProperties();
- void AttachDocumentEvents();
};
diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx
index 2f6f81b7279c..33b3c8e30b97 100644
--- a/sc/source/filter/lotus/lotimpop.cxx
+++ b/sc/source/filter/lotus/lotimpop.cxx
@@ -48,7 +48,7 @@
#include "lotattr.hxx"
-static NAMESPACE_VOS( OMutex ) aLotImpSemaphore;
+static vos:: OMutex aLotImpSemaphore;
ImportLotus::ImportLotus( SvStream& aStream, ScDocument* pDoc, CharSet eQ ) :
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index 4ab0c8bb3b14..058898d16547 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -73,7 +73,7 @@
#include <string.h>
#include <math.h>
#include <ctype.h>
-#if defined( MAC ) || defined( ICC )
+#if defined( ICC )
#include <stdlib.h>
#endif
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index f8bafa32f205..66f3ea613a3a 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -1234,10 +1234,31 @@ void ScRowStyles::AddFieldStyleName(const sal_Int32 nTable, const sal_Int32 nFie
const sal_Int32 nStringIndex)
{
DBG_ASSERT(static_cast<size_t>(nTable) < aTables.size(), "wrong table");
- DBG_ASSERT(aTables[nTable].size() >= static_cast<sal_uInt32>(nField), "wrong field");
- if (aTables[nTable].size() == static_cast<sal_uInt32>(nField))
+ DBG_ASSERT(aTables[nTable].size() >= static_cast<size_t>(nField), "wrong field");
+ if (aTables[nTable].size() == static_cast<size_t>(nField))
aTables[nTable].push_back(nStringIndex);
- aTables[nTable][nField] = nStringIndex;
+ else
+ aTables[nTable][nField] = nStringIndex;
+}
+
+void ScRowStyles::AddFieldStyleName(const sal_Int32 nTable, const sal_Int32 nStartField,
+ const sal_Int32 nStringIndex, const sal_Int32 nEndField)
+{
+ DBG_ASSERT( nStartField <= nEndField, "bad field range");
+ DBG_ASSERT(static_cast<size_t>(nTable) < aTables.size(), "wrong table");
+ DBG_ASSERT(aTables[nTable].size() >= static_cast<size_t>(nStartField), "wrong field");
+ ScMysalInt32Vec& rTable = aTables[nTable];
+ size_t nSize = rTable.size();
+ if (nSize == static_cast<size_t>(nStartField))
+ rTable.insert( rTable.end(), static_cast<size_t>(nEndField - nStartField + 1), nStringIndex);
+ else
+ {
+ size_t nField = static_cast<size_t>(nStartField);
+ for ( ; nField < nSize && nField <= static_cast<size_t>(nEndField); ++nField)
+ rTable[nField] = nStringIndex;
+ if (nField <= static_cast<size_t>(nEndField))
+ rTable.insert( rTable.end(), static_cast<size_t>(nEndField - nField + 1), nStringIndex);
+ }
}
rtl::OUString* ScRowStyles::GetStyleName(const sal_Int32 nTable, const sal_Int32 nField)
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.hxx b/sc/source/filter/xml/XMLStylesExportHelper.hxx
index 34672aeef96e..79b19b7ce9ab 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.hxx
@@ -286,6 +286,7 @@ public:
virtual void AddNewTable(const sal_Int32 nTable, const sal_Int32 nFields);
sal_Int32 GetStyleNameIndex(const sal_Int32 nTable, const sal_Int32 nField);
void AddFieldStyleName(const sal_Int32 nTable, const sal_Int32 nField, const sal_Int32 nStringIndex);
+ void AddFieldStyleName(const sal_Int32 nTable, const sal_Int32 nStartField, const sal_Int32 nStringIndex, const sal_Int32 nEndField);
virtual rtl::OUString* GetStyleName(const sal_Int32 nTable, const sal_Int32 nField);
};
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 8e78f64b2090..ae5a7bcebe66 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -487,21 +487,31 @@ void ScXMLTableRowCellContext::DoMerge(const com::sun::star::table::CellAddress&
uno::Reference<table::XCellRange> xCellRange(rXMLImport.GetTables().GetCurrentXCellRange());
if ( xCellRange.is() )
{
- table::CellRangeAddress aCellAddress;
- if (IsMerged(xCellRange, aCellPos.Column, aCellPos.Row, aCellAddress))
+ // Stored merge range may actually be of a larger extend than what
+ // we support, in which case getCellRangeByPosition() throws
+ // IndexOutOfBoundsException. Do nothing then.
+ try
{
- //unmerge
+ table::CellRangeAddress aCellAddress;
+ if (IsMerged(xCellRange, aCellPos.Column, aCellPos.Row, aCellAddress))
+ {
+ //unmerge
+ uno::Reference <util::XMergeable> xMergeable (xCellRange->getCellRangeByPosition(aCellAddress.StartColumn, aCellAddress.StartRow,
+ aCellAddress.EndColumn, aCellAddress.EndRow), uno::UNO_QUERY);
+ if (xMergeable.is())
+ xMergeable->merge(sal_False);
+ }
+
+ //merge
uno::Reference <util::XMergeable> xMergeable (xCellRange->getCellRangeByPosition(aCellAddress.StartColumn, aCellAddress.StartRow,
- aCellAddress.EndColumn, aCellAddress.EndRow), uno::UNO_QUERY);
+ aCellAddress.EndColumn + nCols, aCellAddress.EndRow + nRows), uno::UNO_QUERY);
if (xMergeable.is())
- xMergeable->merge(sal_False);
+ xMergeable->merge(sal_True);
+ }
+ catch ( lang::IndexOutOfBoundsException & )
+ {
+ DBG_ERRORFILE("ScXMLTableRowCellContext::DoMerge: range to be merged larger than what we support");
}
-
- //merge
- uno::Reference <util::XMergeable> xMergeable (xCellRange->getCellRangeByPosition(aCellAddress.StartColumn, aCellAddress.StartRow,
- aCellAddress.EndColumn + nCols, aCellAddress.EndRow + nRows), uno::UNO_QUERY);
- if (xMergeable.is())
- xMergeable->merge(sal_True);
}
}
}
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 0563f6430063..ca5403e3b18d 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -2576,14 +2576,13 @@ void ScXMLExport::_ExportAutoStyles()
}
sal_Int32 nOld(nRow);
nRow = pDoc->GetNextDifferentChangedRow(sal::static_int_cast<SCTAB>(nTable), static_cast<SCROW>(nRow), false);
- for (sal_Int32 i = nOld + 1; i < nRow; ++i)
- pRowStyles->AddFieldStyleName(nTable, i, nIndex);
+ if (nRow > nOld + 1)
+ pRowStyles->AddFieldStyleName(nTable, nOld + 1, nIndex, nRow - 1);
}
if (aCellAddress.EndRow > nRows)
{
sal_Int32 nIndex(pRowStyles->GetStyleNameIndex(nTable, nRows));
- for (sal_Int32 i = nRows + 1; i <= aCellAddress.EndRow; ++i)
- pRowStyles->AddFieldStyleName(nTable, i, nIndex);
+ pRowStyles->AddFieldStyleName(nTable, nRows + 1, nIndex, aCellAddress.EndRow);
}
}
}
@@ -4341,7 +4340,7 @@ void ScXMLExport::GetConfigurationSettings(uno::Sequence<beans::PropertyValue>&
uno::Reference <container::XNameAccess> xCodeNameAccess;
DBG_ASSERT( pDoc, "ScXMLExport::GetConfigurationSettings - no ScDocument!" );
- if( pDoc )
+ if( pDoc && pDoc->IsInVBAMode() )
{
xCodeNameAccess = new XMLCodeNameProvider( pDoc );
if( xCodeNameAccess.is() && xCodeNameAccess->hasElements() )
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index 4127f5246428..d061ea24b194 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -81,9 +81,11 @@ const XMLPropertyMapEntry aXMLScCellStylesProperties[] =
MAP( "ConditionalFormatXML", XML_NAMESPACE_STYLE, XML_MAP, XML_TYPE_PROP_TABLE_CELL|XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM, CTF_SC_IMPORT_MAP ),
MAP( "ConditionalFormatXML", XML_NAMESPACE_STYLE, XML_MAP, XML_TYPE_PROP_TABLE_CELL|XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM, CTF_SC_MAP ),
MAP( "DiagonalBLTR", XML_NAMESPACE_STYLE, XML_DIAGONAL_BL_TR, XML_TYPE_PROP_TABLE_CELL|XML_TYPE_BORDER, CTF_SC_DIAGONALBLTR ),
- MAP( "DiagonalBLTR", XML_NAMESPACE_STYLE, XML_DIAGONAL_BL_TR_WIDTH, XML_TYPE_PROP_TABLE_CELL|XML_TYPE_BORDER_WIDTH, CTF_SC_DIAGONALBLTRWIDTH ),
+ MAP( "DiagonalBLTR", XML_NAMESPACE_STYLE, XML_DIAGONAL_BL_TR_WIDTH, XML_TYPE_PROP_TABLE_CELL|XML_TYPE_BORDER_WIDTH, CTF_SC_DIAGONALBLTRWIDTH ), // #i102690# for old files
+ MAP( "DiagonalBLTR", XML_NAMESPACE_STYLE, XML_DIAGONAL_BL_TR_WIDTHS, XML_TYPE_PROP_TABLE_CELL|XML_TYPE_BORDER_WIDTH, CTF_SC_DIAGONALBLTRWIDTHS ),
MAP( "DiagonalTLBR", XML_NAMESPACE_STYLE, XML_DIAGONAL_TL_BR, XML_TYPE_PROP_TABLE_CELL|XML_TYPE_BORDER, CTF_SC_DIAGONALTLBR ),
- MAP( "DiagonalTLBR", XML_NAMESPACE_STYLE, XML_DIAGONAL_TL_BR_WIDTH, XML_TYPE_PROP_TABLE_CELL|XML_TYPE_BORDER_WIDTH, CTF_SC_DIAGONALTLBRWIDTH ),
+ MAP( "DiagonalTLBR", XML_NAMESPACE_STYLE, XML_DIAGONAL_TL_BR_WIDTH, XML_TYPE_PROP_TABLE_CELL|XML_TYPE_BORDER_WIDTH, CTF_SC_DIAGONALTLBRWIDTH ), // #i102690# for old files
+ MAP( "DiagonalTLBR", XML_NAMESPACE_STYLE, XML_DIAGONAL_TL_BR_WIDTHS, XML_TYPE_PROP_TABLE_CELL|XML_TYPE_BORDER_WIDTH, CTF_SC_DIAGONALTLBRWIDTHS ),
MAP( "HoriJustify", XML_NAMESPACE_FO, XML_TEXT_ALIGN, XML_TYPE_PROP_PARAGRAPH|XML_SC_TYPE_HORIJUSTIFY|MID_FLAG_MERGE_PROPERTY, 0 ),
MAP( "HoriJustify", XML_NAMESPACE_STYLE, XML_TEXT_ALIGN_SOURCE, XML_TYPE_PROP_TABLE_CELL|XML_SC_TYPE_HORIJUSTIFYSOURCE|MID_FLAG_MERGE_PROPERTY, 0 ),
MAP( "HoriJustify", XML_NAMESPACE_STYLE, XML_REPEAT_CONTENT, XML_TYPE_PROP_TABLE_CELL|XML_SC_TYPE_HORIJUSTIFYREPEAT|MID_FLAG_MERGE_PROPERTY, 0 ),
@@ -490,6 +492,18 @@ void ScXMLCellExportPropertyMapper::ContextFilter(
pParaMarginBottomRel->maValue.clear();
}
+ // #i102690# old diagonal line attribute names without "s" are only read, not written
+ if (pDiagonalTLBRWidthState)
+ {
+ pDiagonalTLBRWidthState->mnIndex = -1;
+ pDiagonalTLBRWidthState->maValue.clear();
+ }
+ if (pDiagonalBLTRWidthState)
+ {
+ pDiagonalBLTRWidthState->mnIndex = -1;
+ pDiagonalBLTRWidthState->maValue.clear();
+ }
+
SvXMLExportPropertyMapper::ContextFilter(rProperties, rPropSet);
}
diff --git a/sc/source/filter/xml/xmlstyle.hxx b/sc/source/filter/xml/xmlstyle.hxx
index 07e7138afc71..f8abf5e6443d 100644
--- a/sc/source/filter/xml/xmlstyle.hxx
+++ b/sc/source/filter/xml/xmlstyle.hxx
@@ -90,6 +90,8 @@ extern const XMLPropertyMapEntry aXMLScTableStylesImportProperties[];
#define CTF_SC_DIAGONALTLBRWIDTH (XML_SC_CTF_START + 26)
#define CTF_SC_DIAGONALBLTR (XML_SC_CTF_START + 27)
#define CTF_SC_DIAGONALBLTRWIDTH (XML_SC_CTF_START + 28)
+#define CTF_SC_DIAGONALTLBRWIDTHS (XML_SC_CTF_START + 29)
+#define CTF_SC_DIAGONALBLTRWIDTHS (XML_SC_CTF_START + 30)
#define CTF_SC_ROWHEIGHT (XML_SC_CTF_START + 50)
#define CTF_SC_ROWOPTIMALHEIGHT (XML_SC_CTF_START + 51)
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index 9a04e284bf45..3866bba63239 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -105,6 +105,7 @@ void ScXMLCellImportPropertyMapper::finished(::std::vector< XMLPropertyState >&
XMLPropertyState* pAllBorderWidthProperty = NULL;
XMLPropertyState* pBorderWidths[4] = { NULL, NULL, NULL, NULL };
XMLPropertyState* pDiagBorders[2] = { 0 };
+ XMLPropertyState* pOldDiagBorderWidths[2] = { 0 }; // old attribute names without "s"
XMLPropertyState* pDiagBorderWidths[2] = { 0 };
::std::vector< XMLPropertyState >::iterator endproperty(rProperties.end());
@@ -134,8 +135,10 @@ void ScXMLCellImportPropertyMapper::finished(::std::vector< XMLPropertyState >&
case CTF_SC_BOTTOMBORDERWIDTH : pBorderWidths[XML_LINE_BOTTOM] = &*property; break;
case CTF_SC_DIAGONALTLBR : pDiagBorders[XML_LINE_TLBR] = &*property; break;
case CTF_SC_DIAGONALBLTR : pDiagBorders[XML_LINE_BLTR] = &*property; break;
- case CTF_SC_DIAGONALTLBRWIDTH : pDiagBorderWidths[XML_LINE_TLBR] = &*property; break;
- case CTF_SC_DIAGONALBLTRWIDTH : pDiagBorderWidths[XML_LINE_BLTR] = &*property; break;
+ case CTF_SC_DIAGONALTLBRWIDTH : pOldDiagBorderWidths[XML_LINE_TLBR] = &*property; break;
+ case CTF_SC_DIAGONALTLBRWIDTHS : pDiagBorderWidths[XML_LINE_TLBR] = &*property; break;
+ case CTF_SC_DIAGONALBLTRWIDTH : pOldDiagBorderWidths[XML_LINE_BLTR] = &*property; break;
+ case CTF_SC_DIAGONALBLTRWIDTHS : pDiagBorderWidths[XML_LINE_BLTR] = &*property; break;
}
}
}
@@ -179,17 +182,23 @@ void ScXMLCellImportPropertyMapper::finished(::std::vector< XMLPropertyState >&
}
for( i = 0; i < 2; ++i )
{
- if( pDiagBorders[i] && pDiagBorderWidths[i] )
+ if( pDiagBorders[i] && ( pDiagBorderWidths[i] || pOldDiagBorderWidths[i] ) )
{
table::BorderLine aBorderLine;
pDiagBorders[i]->maValue >>= aBorderLine;
table::BorderLine aBorderLineWidth;
- pDiagBorderWidths[i]->maValue >>= aBorderLineWidth;
+ if (pDiagBorderWidths[i])
+ pDiagBorderWidths[i]->maValue >>= aBorderLineWidth; // prefer new attribute
+ else
+ pOldDiagBorderWidths[i]->maValue >>= aBorderLineWidth;
aBorderLine.OuterLineWidth = aBorderLineWidth.OuterLineWidth;
aBorderLine.InnerLineWidth = aBorderLineWidth.InnerLineWidth;
aBorderLine.LineDistance = aBorderLineWidth.LineDistance;
pDiagBorders[i]->maValue <<= aBorderLine;
- pDiagBorderWidths[i]->mnIndex = -1;
+ if (pDiagBorderWidths[i])
+ pDiagBorderWidths[i]->mnIndex = -1;
+ if (pOldDiagBorderWidths[i])
+ pOldDiagBorderWidths[i]->mnIndex = -1; // reset mnIndex for old and new attribute if both are present
}
}
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index 6e7cfed9d95c..82c276d98f2c 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -33,12 +33,16 @@
#include "dpcontrol.hxx"
#include "dpcontrol.hrc"
-#include "vcl/outdev.hxx"
-#include "vcl/settings.hxx"
-#include "vcl/wintypes.hxx"
-#include "vcl/decoview.hxx"
+#include <vcl/outdev.hxx>
+#include <vcl/settings.hxx>
+#include <vcl/wintypes.hxx>
+#include <vcl/decoview.hxx>
#include "strload.hxx"
#include "global.hxx"
+#include "scitems.hxx"
+#include "document.hxx"
+#include "docpool.hxx"
+#include "patattr.hxx"
#include "AccessibleFilterMenu.hxx"
#include "AccessibleFilterTopWindow.hxx"
@@ -55,7 +59,8 @@ using ::std::vector;
using ::std::hash_map;
using ::std::auto_ptr;
-ScDPFieldButton::ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pStyle, const Fraction* pZoomX, const Fraction* pZoomY) :
+ScDPFieldButton::ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pStyle, const Fraction* pZoomX, const Fraction* pZoomY, ScDocument* pDoc) :
+ mpDoc(pDoc),
mpOutDev(pOutDev),
mpStyle(pStyle),
mbBaseButton(true),
@@ -135,17 +140,28 @@ void ScDPFieldButton::draw()
Point(maPos.X()+maSize.Width()-1, maPos.Y()+maSize.Height()-1));
// Field name.
- Font aTextFont( mpStyle->GetLabelFont() );
- double fFontHeight = 12.0;
- fFontHeight *= static_cast<double>(maZoomY.GetNumerator()) / static_cast<double>(maZoomY.GetDenominator());
- aTextFont.SetHeight(static_cast<long>(fFontHeight));
+ // Get the font and size the same way as in scenario selection (lcl_DrawOneFrame in gridwin4.cxx)
+ Font aTextFont( mpStyle->GetAppFont() );
+ if ( mpDoc )
+ {
+ // use ScPatternAttr::GetFont only for font size
+ Font aAttrFont;
+ static_cast<const ScPatternAttr&>(mpDoc->GetPool()->GetDefaultItem(ATTR_PATTERN)).
+ GetFont( aAttrFont, SC_AUTOCOL_BLACK, mpOutDev, &maZoomY );
+ aTextFont.SetSize( aAttrFont.GetSize() );
+ }
mpOutDev->SetFont(aTextFont);
+ mpOutDev->SetTextColor(mpStyle->GetButtonTextColor());
Point aTextPos = maPos;
- long nTHeight = static_cast<long>(fFontHeight);
+ long nTHeight = mpOutDev->GetTextHeight();
aTextPos.setX(maPos.getX() + nMargin);
aTextPos.setY(maPos.getY() + (maSize.Height()-nTHeight)/2);
+
+ mpOutDev->Push(PUSH_CLIPREGION);
+ mpOutDev->IntersectClipRegion(aRect);
mpOutDev->DrawText(aTextPos, maText);
+ mpOutDev->Pop();
}
if (mbPopupButton)
@@ -959,7 +975,7 @@ ScDPFieldPopupWindow::ScDPFieldPopupWindow(Window* pParent, ScDocument* pDoc) :
mnCurTabStop(0),
mpExtendedData(NULL),
mpOKAction(NULL),
- maWndSize(160, 330),
+ maWndSize(240, 330),
mePrevToggleAllState(STATE_DONTKNOW)
{
maTabStopCtrls.reserve(7);
@@ -1032,7 +1048,7 @@ void ScDPFieldPopupWindow::getSectionPosSize(Point& rPos, Size& rSize, SectionTy
const sal_uInt16 nMenuHeight = 60;
const sal_uInt16 nSingleItemBtnAreaHeight = 32; // height of the middle area below the list box where the single-action buttons are.
const sal_uInt16 nBottomBtnAreaHeight = 50; // height of the bottom area where the OK and Cancel buttons are.
- const sal_uInt16 nBtnWidth = 60;
+ const sal_uInt16 nBtnWidth = 90;
const sal_uInt16 nLabelHeight = static_cast< sal_uInt16 >( getLabelFont().GetHeight() );
const sal_uInt16 nBtnHeight = nLabelHeight*2;
const sal_uInt16 nBottomMargin = 10;
@@ -1089,7 +1105,7 @@ void ScDPFieldPopupWindow::getSectionPosSize(Point& rPos, Size& rSize, SectionTy
{
long h = 26;
rPos = Point(nListBoxMargin, nSingleBtnAreaY);
- rPos.X() += 75;
+ rPos.X() += 150;
rPos.Y() += (nSingleItemBtnAreaHeight - h)/2;
rSize = Size(h, h);
}
@@ -1098,7 +1114,7 @@ void ScDPFieldPopupWindow::getSectionPosSize(Point& rPos, Size& rSize, SectionTy
{
long h = 26;
rPos = Point(nListBoxMargin, nSingleBtnAreaY);
- rPos.X() += 75 + h + 10;
+ rPos.X() += 150 + h + 10;
rPos.Y() += (nSingleItemBtnAreaHeight - h)/2;
rSize = Size(h, h);
}
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 171daa0ca882..42f2a2d86933 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -46,13 +46,8 @@
#include <com/sun/star/uno/Sequence.hxx>
#include "miscuno.hxx"
-
//! TODO make dynamic
-#ifdef WIN
-const SCSIZE ASCIIDLG_MAXROWS = 10000;
-#else
const SCSIZE ASCIIDLG_MAXROWS = MAXROWCOUNT;
-#endif
using namespace rtl;
diff --git a/sc/source/ui/dbgui/textimportoptions.src b/sc/source/ui/dbgui/textimportoptions.src
index fff3c4b40749..69e2d69b3142 100644
--- a/sc/source/ui/dbgui/textimportoptions.src
+++ b/sc/source/ui/dbgui/textimportoptions.src
@@ -33,34 +33,34 @@
ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS
{
Text [ en-US ] = "Import Options" ;
- Size = MAP_APPFONT ( 190 , 101 ) ;
+ Size = MAP_APPFONT ( 230 , 101 ) ;
Moveable = TRUE ;
Closeable = TRUE ;
OutputSize = TRUE ;
OKButton BTN_OK
{
- Pos = MAP_APPFONT ( 135, 6 ) ;
+ Pos = MAP_APPFONT ( 175, 6 ) ;
Size = MAP_APPFONT ( 50, 14 ) ;
DefButton = TRUE ;
};
CancelButton BTN_CANCEL
{
- Pos = MAP_APPFONT ( 135, 23 ) ;
+ Pos = MAP_APPFONT ( 175, 23 ) ;
Size = MAP_APPFONT ( 50, 14 ) ;
};
HelpButton BTN_HELP
{
- Pos = MAP_APPFONT ( 135, 43 ) ;
+ Pos = MAP_APPFONT ( 175, 43 ) ;
Size = MAP_APPFONT ( 50, 14 ) ;
};
FixedLine FL_CHOOSE_LANG
{
Pos = MAP_APPFONT( 6, 3 ) ;
- Size = MAP_APPFONT( 125, 14 ) ;
+ Size = MAP_APPFONT( 165, 14 ) ;
Text [ en-US ] = "Select the language to use for import" ;
};
@@ -68,7 +68,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS
RadioButton RB_AUTOMATIC
{
Pos = MAP_APPFONT( 12, 20 ) ;
- Size = MAP_APPFONT( 50, 10 ) ;
+ Size = MAP_APPFONT( 159, 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Automatic" ;
@@ -77,7 +77,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS
RadioButton RB_CUSTOM
{
Pos = MAP_APPFONT( 12, 34 ) ;
- Size = MAP_APPFONT( 50, 10 ) ;
+ Size = MAP_APPFONT( 159, 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Custom" ;
@@ -86,7 +86,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS
ListBox LB_CUSTOM_LANG
{
Pos = MAP_APPFONT( 20, 50 ) ;
- Size = MAP_APPFONT( 100, 55 ) ;
+ Size = MAP_APPFONT( 140, 120 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
Sort = TRUE ;
@@ -94,19 +94,17 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS
FixedLine FL_OPTION
{
- Pos = MAP_APPFONT( 6, 70 );
- Size = MAP_APPFONT( 125, 14 );
-
- Text [ en-US ] = "Options" ;
+ Pos = MAP_APPFONT( 6, 70 );
+ Size = MAP_APPFONT( 165, 14 );
+ Text [ en-US ] = "Options" ;
};
CheckBox BTN_CONVERT_DATE
{
Pos = MAP_APPFONT( 12, 86 );
- Size = MAP_APPFONT( 125, 10 );
- TabStop = TRUE ;
-
- Text [ en-US ] = "Detect special numbers (such as dates)." ;
+ Size = MAP_APPFONT( 159, 10 );
+ TabStop = TRUE ;
+ Text [ en-US ] = "Detect special numbers (such as dates)." ;
};
};
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 27b8eef7bbd6..36b6641d94a6 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -50,9 +50,9 @@
#include <basic/sbstar.hxx>
#include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/script/XLibraryContainer.hpp>
-#include <com/sun/star/script/XVBAModuleInfo.hpp>
#include <com/sun/star/script/ModuleType.hpp>
+#include <com/sun/star/script/XLibraryContainer.hpp>
+#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
#include <list>
@@ -2605,7 +2605,6 @@ uno::Reference< uno::XInterface > GetDocModuleObject( SfxObjectShell& rDocSh, St
script::ModuleInfo lcl_InitModuleInfo( SfxObjectShell& rDocSh, String& sModule )
{
- ::rtl::OUString sVbaOption( RTL_CONSTASCII_USTRINGPARAM( "Rem Attribute VBA_ModuleType=VBADocumentModule\nOption VBASupport 1\n" ));
script::ModuleInfo sModuleInfo;
sModuleInfo.ModuleType = script::ModuleType::DOCUMENT;
sModuleInfo.ModuleObject = GetDocModuleObject( rDocSh, sModule );
@@ -2648,7 +2647,7 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String
if ( sTmpSource.getLength() == 0 )
sTmpSource = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Rem Attribute VBA_ModuleType=VBADocumentModule\nOption VBASupport 1\n" ));
aSourceAny <<= sTmpSource;
- uno::Reference< script::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY );
+ uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY );
if ( xVBAModuleInfo.is() )
{
String sCodeName( genModuleName );
@@ -2679,7 +2678,7 @@ void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName )
}
if( xLib.is() )
{
- uno::Reference< script::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY );
+ uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY );
if( xLib->hasByName( sModuleName ) )
xLib->removeByName( sModuleName );
if ( xVBAModuleInfo.is() )
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index a446c86b4d1b..d5d7f6e09292 100755..100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -29,15 +29,11 @@
#include "precompiled_sc.hxx"
// System - Includes -----------------------------------------------------
-
-
#include "scitems.hxx"
#include <editeng/eeitem.hxx>
#include <editeng/svxenum.hxx>
#include <svx/algitem.hxx>
-
-
#include <sot/clsids.hxx>
#include <unotools/securityoptions.hxx>
#include <tools/stream.hxx>
@@ -68,11 +64,15 @@
#include "chgtrack.hxx"
#include "chgviset.hxx"
#include <sfx2/request.hxx>
-#include <com/sun/star/document/UpdateDocMode.hpp>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
+#include <com/sun/star/document/UpdateDocMode.hpp>
+#include <com/sun/star/script/vba/VBAEventId.hpp>
+#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
#include <com/sun/star/sheet/XSpreadsheetView.hpp>
#include <com/sun/star/task/XJob.hpp>
-
+#include <basic/sbstar.hxx>
+#include <basic/basmgr.hxx>
+#include <vbahelper/vbaaccesshelper.hxx>
#include "scabstdlg.hxx" //CHINA001
#include <sot/formats.hxx>
@@ -127,8 +127,9 @@
#include <rtl/logfile.hxx>
#include <comphelper/processfactory.hxx>
-#include <basic/sbstar.hxx>
-#include <basic/basmgr.hxx>
+#include "uiitems.hxx"
+#include "cellsuno.hxx"
+
using namespace com::sun::star;
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
@@ -374,28 +375,7 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
}
else
aDocument.SetInsertingFromOtherDoc( FALSE );
-#if 0 // disable load of vba related libraries
- // add vba globals ( if they are availabl )
- uno::Any aGlobs;
- uno::Sequence< uno::Any > aArgs(1);
- aArgs[ 0 ] <<= GetModel();
- aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Globals" ) ), aArgs );
- GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
- // Fake ThisComponent being setup by Activate ( which is a view
- // related thing ),
- // a) if another document is opened then in theory ThisComponent
- // will be reset as before,
- // b) when this document is 'really' Activated then ThisComponent
- // again will be set as before
- // The only wrinkle seems if this document is loaded 'InVisible'
- // but.. I don't see that this is possible from the vba API
- // I could be wrong though
- // There may be implications setting the current component
- // too early :-/ so I will just manually set the Basic Variables
- BasicManager* pAppMgr = SFX_APP()->GetBasicManager();
- if ( pAppMgr )
- pAppMgr->SetGlobalUNOConstant( "ThisExcelDoc", aArgs[ 0 ] );
-#endif
+
aDocument.SetImportingXML( FALSE );
aDocument.EnableExecuteLink( true );
aDocument.EnableUndo( TRUE );
@@ -517,9 +497,70 @@ BOOL __EXPORT ScDocShell::Load( SfxMedium& rMedium )
return bRet;
}
-
void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = aDocument.GetVbaEventProcessor();
+ if ( xVbaEvents.is() ) try
+ {
+ using namespace ::com::sun::star::script::vba::VBAEventId;
+ if (rHint.ISA(ScTablesHint) )
+ {
+ const ScTablesHint& rScHint = static_cast< const ScTablesHint& >( rHint );
+ if (rScHint.GetId() == SC_TAB_INSERTED)
+ {
+ uno::Sequence< uno::Any > aArgs( 1 );
+ aArgs[0] <<= rScHint.GetTab1();
+ xVbaEvents->processVbaEvent( WORKBOOK_NEWSHEET, aArgs );
+ }
+ }
+ else if ( rHint.ISA( SfxEventHint ) )
+ {
+ ULONG nEventId = static_cast< const SfxEventHint& >( rHint ).GetEventId();
+ switch ( nEventId )
+ {
+ case SFX_EVENT_ACTIVATEDOC:
+ {
+ uno::Sequence< uno::Any > aArgs;
+ xVbaEvents->processVbaEvent( WORKBOOK_ACTIVATE, aArgs );
+ }
+ break;
+ case SFX_EVENT_DEACTIVATEDOC:
+ {
+ uno::Sequence< uno::Any > aArgs;
+ xVbaEvents->processVbaEvent( WORKBOOK_DEACTIVATE, aArgs );
+ }
+ break;
+ case SFX_EVENT_OPENDOC:
+ {
+ uno::Sequence< uno::Any > aArgs;
+ xVbaEvents->processVbaEvent( WORKBOOK_OPEN, aArgs );
+ }
+ break;
+ case SFX_EVENT_SAVEDOCDONE:
+ case SFX_EVENT_SAVEASDOCDONE:
+ case SFX_EVENT_SAVETODOCDONE:
+ {
+ uno::Sequence< uno::Any > aArgs( 1 );
+ aArgs[ 0 ] <<= true;
+ xVbaEvents->processVbaEvent( WORKBOOK_AFTERSAVE, aArgs );
+ }
+ break;
+ case SFX_EVENT_SAVEASDOCFAILED:
+ case SFX_EVENT_SAVEDOCFAILED:
+ case SFX_EVENT_SAVETODOCFAILED:
+ {
+ uno::Sequence< uno::Any > aArgs( 1 );
+ aArgs[ 0 ] <<= false;
+ xVbaEvents->processVbaEvent( WORKBOOK_AFTERSAVE, aArgs );
+ }
+ break;
+ }
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+
if (rHint.ISA(SfxSimpleHint)) // ohne Parameter
{
ULONG nSlot = ((const SfxSimpleHint&)rHint).GetId();
@@ -578,6 +619,25 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
SetReadOnlyUI( sal_True );
}
}
+
+ // VBA specific initialization
+ if( aDocument.IsInVBAMode() ) try
+ {
+ uno::Reference< frame::XModel > xModel( GetModel(), uno::UNO_SET_THROW );
+
+ // create VBAGlobals object if not yet done (this also creates the "ThisExcelDoc" symbol)
+ uno::Reference< lang::XMultiServiceFactory > xFactory( xModel, uno::UNO_QUERY_THROW );
+ xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals" ) ) );
+
+ // create the VBA document event processor
+ uno::Sequence< uno::Any > aArgs( 1 );
+ aArgs[ 0 ] <<= xModel;
+ xVbaEvents.set( ooo::vba::createVBAUnoAPIServiceWithArgs( this, "com.sun.star.script.vba.VBASpreadsheetEventProcessor" , aArgs ), uno::UNO_QUERY );
+ aDocument.SetVbaEventProcessor( xVbaEvents );
+ }
+ catch( uno::Exception& )
+ {
+ }
}
break;
case SFX_EVENT_VIEWCREATED:
@@ -2252,6 +2312,45 @@ BOOL __EXPORT ScDocShell::DoSaveCompleted( SfxMedium * pNewStor )
}
+sal_Bool ScDocShell::QuerySlotExecutable( USHORT nSlotId )
+{
+ // #i112634# ask VBA event handlers whether to save or print the document
+
+ using namespace ::com::sun::star::script::vba;
+
+ sal_Int32 nVbaEventId = VBAEventId::NO_EVENT;
+ uno::Sequence< uno::Any > aArgs;
+ switch( nSlotId )
+ {
+ case SID_SAVEDOC:
+ case SID_SAVEASDOC:
+ nVbaEventId = VBAEventId::WORKBOOK_BEFORESAVE;
+ aArgs.realloc( 1 );
+ aArgs[ 0 ] <<= (nSlotId == SID_SAVEASDOC);
+ break;
+ case SID_PRINTDOC:
+ case SID_PRINTDOCDIRECT:
+ nVbaEventId = VBAEventId::WORKBOOK_BEFOREPRINT;
+ break;
+ }
+
+ sal_Bool bSlotExecutable = sal_True;
+ if( nVbaEventId != VBAEventId::NO_EVENT ) try
+ {
+ uno::Reference< XVBAEventProcessor > xEventProcessor( aDocument.GetVbaEventProcessor(), uno::UNO_QUERY_THROW );
+ xEventProcessor->processVbaEvent( nVbaEventId, aArgs );
+ }
+ catch( util::VetoException& )
+ {
+ bSlotExecutable = sal_False;
+ }
+ catch( uno::Exception& )
+ {
+ }
+ return bSlotExecutable;
+}
+
+
USHORT __EXPORT ScDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
{
if(SC_MOD()->GetCurRefDlgId()>0)
@@ -2278,6 +2377,26 @@ USHORT __EXPORT ScDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
DoEnterHandler();
+ // start 'Workbook_BeforeClose' VBA event handler for possible veto
+ if( !IsInPrepareClose() )
+ {
+ try
+ {
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents( aDocument.GetVbaEventProcessor(), uno::UNO_SET_THROW );
+ uno::Sequence< uno::Any > aArgs;
+ xVbaEvents->processVbaEvent( script::vba::VBAEventId::WORKBOOK_BEFORECLOSE, aArgs );
+ }
+ catch( util::VetoException& )
+ {
+ // if event processor throws VetoException, macro has vetoed close
+ return sal_False;
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+ // end handler code
+
USHORT nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
if (nRet == TRUE) // TRUE = schliessen
aDocument.DisableIdle(TRUE); // nicht mehr drin rumpfuschen !!!
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 0993d2ce4a14..d50ce6f21c9c 100755..100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1293,7 +1293,7 @@ void ScDocShell::DoHardRecalc( BOOL /* bApi */ )
// (might check for the presence of any formulas on each sheet)
SCTAB nTabCount = aDocument.GetTableCount();
SCTAB nTab;
- if (aDocument.HasSheetEventScript( SC_SHEETEVENT_CALCULATE ))
+ if (aDocument.HasAnySheetEventScript( SC_SHEETEVENT_CALCULATE, true )) // search also for VBA hendler
for (nTab=0; nTab<nTabCount; nTab++)
aDocument.SetCalcNotification(nTab);
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 0569e95605b1..7fa31246275a 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2024,7 +2024,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, Stri
if (!isFileLoadable(aFile))
return NULL;
- String aOptions;
+ String aOptions( pFileData->maFilterOptions );
ScDocumentLoader::GetFilterName(aFile, rFilter, aOptions, true, false);
const SfxFilter* pFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName(rFilter);
@@ -2040,9 +2040,6 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, Stri
setRelativeFileName(nFileId, aStr);
}
- // Update the filter data now that we are loading it again.
- setFilterData(nFileId, rFilter, aOptions);
-
SfxItemSet* pSet = new SfxAllItemSet(SFX_APP()->GetPool());
if (aOptions.Len())
pSet->Put(SfxStringItem(SID_FILE_FILTEROPTIONS, aOptions));
@@ -2077,6 +2074,13 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, Stri
pExtOptNew->GetDocSettings().mnLinkCnt = nLinkCount + 1;
pNewShell->DoLoad(pMedium.release());
+
+ // with UseInteractionHandler, options may be set by dialog during DoLoad
+ String aNew = ScDocumentLoader::GetOptions(*pNewShell->GetMedium());
+ if (aNew.Len() && aNew != aOptions)
+ aOptions = aNew;
+ setFilterData(nFileId, rFilter, aOptions); // update the filter data, including the new options
+
return aRef;
}
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index bfbeba2d1302..a5159d8a8043 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -486,11 +486,16 @@ void __EXPORT ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
rSet.GetItemState( SID_THESAURUS ) != SFX_ITEM_UNKNOWN )
{
SdrView * pView = pViewData->GetScDrawView();
- EditView & rEditView = pView->GetTextEditOutlinerView()->GetEditView();
+ OutlinerView* pOutView = pView->GetTextEditOutlinerView();
String aStatusVal;
LanguageType nLang = LANGUAGE_NONE;
- bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, rEditView );
+ bool bIsLookUpWord = false;
+ if ( pOutView )
+ {
+ EditView& rEditView = pOutView->GetEditView();
+ bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, rEditView );
+ }
rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
// disable thesaurus main menu and context menu entry if there is nothing to look up
diff --git a/sc/source/ui/drawfunc/futext2.cxx b/sc/source/ui/drawfunc/futext2.cxx
index 340e71faa71c..ef7e0d675162 100644
--- a/sc/source/ui/drawfunc/futext2.cxx
+++ b/sc/source/ui/drawfunc/futext2.cxx
@@ -129,10 +129,6 @@
//#define _GRAPH_HXX
#define _SOUND_HXX
-#if defined WIN
-#define _MENUBTN_HXX
-#endif
-
//svtools
#define _SCRWIN_HXX
#define _RULER_HXX
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 5b4fc6227225..19147cfaf61f 100755..100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -215,6 +215,7 @@ public:
virtual BOOL SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); // SfxInPlaceObject
virtual BOOL DoSaveCompleted( SfxMedium * pNewStor); // SfxObjectShell
+ virtual sal_Bool QuerySlotExecutable( USHORT nSlotId );
virtual void Draw( OutputDevice *, const JobSetup & rSetup,
USHORT nAspect = ASPECT_CONTENT );
diff --git a/sc/source/ui/inc/dpcontrol.hxx b/sc/source/ui/inc/dpcontrol.hxx
index 15f0c9174cc8..45badf0c88fd 100644
--- a/sc/source/ui/inc/dpcontrol.hxx
+++ b/sc/source/ui/inc/dpcontrol.hxx
@@ -64,7 +64,8 @@ class ScAccessibleFilterMenu;
class ScDPFieldButton
{
public:
- ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pStyle, const Fraction* pZoomX = NULL, const Fraction* pZoomY = NULL);
+ ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pStyle, const Fraction* pZoomX = NULL, const Fraction* pZoomY = NULL,
+ ScDocument* pDoc = NULL);
~ScDPFieldButton();
void setText(const ::rtl::OUString& rText);
@@ -86,6 +87,7 @@ private:
::rtl::OUString maText;
Fraction maZoomX;
Fraction maZoomY;
+ ScDocument* mpDoc;
OutputDevice* mpOutDev;
const StyleSettings* mpStyle;
bool mbBaseButton;
diff --git a/sc/source/ui/inc/miscdlgs.hrc b/sc/source/ui/inc/miscdlgs.hrc
index becd05165a4e..00b1658849d6 100644
--- a/sc/source/ui/inc/miscdlgs.hrc
+++ b/sc/source/ui/inc/miscdlgs.hrc
@@ -185,5 +185,4 @@
// Tab Bg Color
#define TAB_BG_COLOR_CT_BORDER 1
#define TAB_BG_COLOR_SET_BGDCOLOR 2
-#define TAB_BG_COLOR_GB_BGDCOLOR 3
diff --git a/sc/source/ui/inc/tabbgcolordlg.hxx b/sc/source/ui/inc/tabbgcolordlg.hxx
index 241fc806022d..338609ae0e4d 100644
--- a/sc/source/ui/inc/tabbgcolordlg.hxx
+++ b/sc/source/ui/inc/tabbgcolordlg.hxx
@@ -32,7 +32,6 @@
#define SC_TABBGCOLORDLG_HXX
#include <vcl/dialog.hxx>
-#include <vcl/fixed.hxx>
#include <vcl/imagebtn.hxx>
#include <svtools/valueset.hxx>
@@ -63,7 +62,6 @@ private:
Control aBorderWin;
ScTabBgColorValueSet aTabBgColorSet;
- FixedLine aTabBgColorBox;
OKButton aBtnOk;
CancelButton aBtnCancel;
HelpButton aBtnHelp;
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 106d196a8175..fb9c674a4488 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -482,6 +482,24 @@ public:
BOOL IsSelCtrlMouseClick() { return bSelCtrlMouseClick; }
static inline long ToPixel( USHORT nTwips, double nFactor );
+
+ /** while (rScrY <= nEndPixels && rPosY <= nEndRow) add pixels of row
+ heights converted with nPPTY to rScrY, optimized for row height
+ segments. Upon return rPosY is the last row evaluated <= nEndRow, rScrY
+ may be > nEndPixels!
+ */
+ static void AddPixelsWhile( long & rScrY, long nEndPixels,
+ SCROW & rPosY, SCROW nEndRow, double nPPTY,
+ const ScDocument * pDoc, SCTAB nTabNo );
+
+ /** while (rScrY <= nEndPixels && rPosY >= nStartRow) add pixels of row
+ heights converted with nPPTY to rScrY, optimized for row height
+ segments. Upon return rPosY is the last row evaluated >= nStartRow,
+ rScrY may be > nEndPixels!
+ */
+ static void AddPixelsWhileBackward( long & rScrY, long nEndPixels,
+ SCROW & rPosY, SCROW nStartRow, double nPPTY,
+ const ScDocument * pDoc, SCTAB nTabNo );
};
diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
index fdc4c9fd34bf..463c06d76712 100644
--- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
+++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
@@ -39,14 +39,15 @@
#include "scresid.hxx"
#include "miscdlgs.hrc"
-#include "tools/debug.hxx"
-#include "tools/color.hxx"
-#include "sfx2/objsh.hxx"
-#include "svx/xtable.hxx"
-#include "svx/drawitem.hxx"
-#include "unotools/pathoptions.hxx"
-#include "tools/resid.hxx"
-#include "editeng/editrids.hrc"
+#include <tools/debug.hxx>
+#include <tools/color.hxx>
+#include <sfx2/objsh.hxx>
+#include <svx/xtable.hxx>
+#include <svx/drawitem.hxx>
+#include <unotools/pathoptions.hxx>
+#include <tools/resid.hxx>
+#include <editeng/editrids.hrc>
+#include <editeng/eerdll.hxx>
#include <boost/scoped_ptr.hpp>
@@ -62,7 +63,6 @@ ScTabBgColorDlg::ScTabBgColorDlg( Window* pParent,
ModalDialog ( pParent, ScResId( RID_SCDLG_TAB_BG_COLOR ) ),
aBorderWin ( this, ScResId( TAB_BG_COLOR_CT_BORDER ) ),
aTabBgColorSet ( &aBorderWin, ScResId( TAB_BG_COLOR_SET_BGDCOLOR ), this ),
- aTabBgColorBox ( this, ScResId( TAB_BG_COLOR_GB_BGDCOLOR ) ),
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),
@@ -75,7 +75,6 @@ ScTabBgColorDlg::ScTabBgColorDlg( Window* pParent,
this->SetText( rTitle );
this->SetStyle(GetStyle() | WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK | WB_DIALOGCONTROL | WB_SYSTEMWINDOW | WB_STANDALONE | WB_HIDE);
- aTabBgColorBox.SetText(rTitle);
FillColorValueSets_Impl();
aTabBgColorSet.SetDoubleClickHdl( HDL(TabBgColorDblClickHdl_Impl) );
aBtnOk.SetClickHdl( HDL(TabBgColorOKHdl_Impl) );
@@ -120,7 +119,7 @@ void ScTabBgColorDlg::FillColorValueSets_Impl()
long nCount = pColorTable->Count();
XColorEntry* pEntry = NULL;
Color aColWhite( COL_WHITE );
- String aStrWhite( ScResId( RID_SVXITEMS_COLOR_WHITE ) );
+ String aStrWhite( EditResId( RID_SVXITEMS_COLOR_WHITE ) );
WinBits nBits = ( aTabBgColorSet.GetStyle() | WB_NAMEFIELD | WB_ITEMBORDER | WB_NONEFIELD | WB_3DLOOK | WB_NO_DIRECTSELECT | WB_NOPOINTERFOCUS);
aTabBgColorSet.SetText( aTabBgColorNoColorText );
aTabBgColorSet.SetStyle( nBits );
diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src
index ea7cabf7716d..4c64e312bc2d 100644
--- a/sc/source/ui/src/optdlg.src
+++ b/sc/source/ui/src/optdlg.src
@@ -152,13 +152,13 @@ TabPage RID_SCPAGE_CALC
CheckBox BTN_GENERAL_PREC
{
Pos = MAP_APPFONT ( 12 , 147 ) ;
- Size = MAP_APPFONT ( 136 , 10 ) ;
+ Size = MAP_APPFONT ( 148 , 10 ) ;
Text [ en-US ] = "Limit decimals for general number format" ;
};
FixedText FT_PREC
{
- Pos = MAP_APPFONT ( 150 , 148 ) ;
- Size = MAP_APPFONT ( 72 , 8 ) ;
+ Pos = MAP_APPFONT ( 138 , 148 ) ;
+ Size = MAP_APPFONT ( 84 , 8 ) ;
Text [ en-US ] = "~Decimal places" ;
Right = TRUE ;
};
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index c284045c5b11..3fb2c74a9954 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -592,7 +592,7 @@ ScUndoDeleteMulti::ScUndoDeleteMulti( ScDocShell* pNewDocShell,
__EXPORT ScUndoDeleteMulti::~ScUndoDeleteMulti()
{
- delete pRanges;
+ delete [] pRanges;
}
String __EXPORT ScUndoDeleteMulti::GetComment() const
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 2d8340ad030b..70845f6c0bc9 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -28,18 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-
-
-//------------------------------------------------------------------
-
-// ?#define _MACRODLG_HXX
-// ? #define _BIGINT_HXX
-// ? #define _SVDXOUT_HXX
-// ? #define _SVDATTR_HXX
-// ? #define _SVDSURO_HXX
-
-// INCLUDE ---------------------------------------------------------------
-
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 75e415b8f018..a680185a1d1c 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -193,11 +193,14 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
if (pPrinter)
{
String aString(sPrinterName);
- SfxPrinter* pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), aString );
- if (pNewPrinter->IsKnown())
- pDocShell->SetPrinter( pNewPrinter, SFX_PRINTER_PRINTER );
- else
- delete pNewPrinter;
+ if (pPrinter->GetName() != aString)
+ {
+ SfxPrinter* pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), aString );
+ if (pNewPrinter->IsKnown())
+ pDocShell->SetPrinter( pNewPrinter, SFX_PRINTER_PRINTER );
+ else
+ delete pNewPrinter;
+ }
}
else
throw uno::RuntimeException();
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 6d267d4098ff..3d3f0f479601 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -28,14 +28,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-
-
#include "scitems.hxx"
#include <svx/fmdpage.hxx>
#include <svx/fmview.hxx>
#include <svx/svditer.hxx>
#include <svx/svdpage.hxx>
#include <svx/svxids.hrc>
+#include <svx/unoshape.hxx>
#include <svl/numuno.hxx>
#include <svl/smplhint.hxx>
@@ -49,6 +48,7 @@
#include <tools/multisel.hxx>
#include <tools/resary.hxx>
#include <toolkit/awt/vclxdevice.hxx>
+
#include <ctype.h>
#include <float.h> // DBL_MAX
@@ -61,6 +61,7 @@
#include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
#include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
#include <com/sun/star/script/XInvocation.hpp>
+#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
#include <com/sun/star/reflection/XIdlClassProvider.hpp>
#include <comphelper/processfactory.hxx>
@@ -100,10 +101,6 @@
#include "sc.hrc"
#include "scresid.hxx"
-#ifndef _SVX_UNOSHAPE_HXX
-#include <svx/unoshape.hxx>
-#endif
-
using namespace com::sun::star;
//------------------------------------------------------------------------
@@ -592,8 +589,8 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
DELETEZ( pPrintFuncCache );
- // handle "OnCalculate" sheet events
- if ( pDocShell && pDocShell->GetDocument()->HasSheetEventScript( SC_SHEETEVENT_CALCULATE ) )
+ // handle "OnCalculate" sheet events (search also for VBA event handlers)
+ if ( pDocShell && pDocShell->GetDocument()->HasAnySheetEventScript( SC_SHEETEVENT_CALCULATE, true ) )
HandleCalculateEvents();
}
}
@@ -2156,20 +2153,8 @@ bool ScModelObj::HasChangesListeners() const
if ( maChangesListeners.getLength() > 0 )
return true;
- if ( pDocShell )
- {
- // "change" event set in any sheet?
- ScDocument* pDoc = pDocShell->GetDocument();
- SCTAB nTabCount = pDoc->GetTableCount();
- for (SCTAB nTab = 0; nTab < nTabCount; nTab++)
- {
- const ScSheetEvents* pEvents = pDoc->GetSheetEvents(nTab);
- if (pEvents && pEvents->GetScript(SC_SHEETEVENT_CHANGE))
- return true;
- }
- }
-
- return false;
+ // "change" event set in any sheet?
+ return pDocShell && pDocShell->GetDocument()->HasAnySheetEventScript(SC_SHEETEVENT_CHANGE);
}
void ScModelObj::NotifyChanges( const ::rtl::OUString& rOperation, const ScRangeList& rRanges,
@@ -2283,17 +2268,29 @@ void ScModelObj::HandleCalculateEvents()
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab = 0; nTab < nTabCount; nTab++)
{
- const ScSheetEvents* pEvents = pDoc->GetSheetEvents(nTab);
- if (pEvents)
+ if (pDoc->HasCalcNotification(nTab))
{
- const rtl::OUString* pScript = pEvents->GetScript(SC_SHEETEVENT_CALCULATE);
- if (pScript && pDoc->HasCalcNotification(nTab))
+ if (const ScSheetEvents* pEvents = pDoc->GetSheetEvents( nTab ))
+ {
+ if (const rtl::OUString* pScript = pEvents->GetScript(SC_SHEETEVENT_CALCULATE))
+ {
+ uno::Any aRet;
+ uno::Sequence<uno::Any> aParams;
+ uno::Sequence<sal_Int16> aOutArgsIndex;
+ uno::Sequence<uno::Any> aOutArgs;
+ pDocShell->CallXScript( *pScript, aParams, aRet, aOutArgsIndex, aOutArgs );
+ }
+ }
+
+ try
+ {
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents( pDoc->GetVbaEventProcessor(), uno::UNO_SET_THROW );
+ uno::Sequence< uno::Any > aArgs( 1 );
+ aArgs[ 0 ] <<= nTab;
+ xVbaEvents->processVbaEvent( ScSheetEvents::GetVbaSheetEventId( SC_SHEETEVENT_CALCULATE ), aArgs );
+ }
+ catch( uno::Exception& )
{
- uno::Any aRet;
- uno::Sequence<uno::Any> aParams;
- uno::Sequence<sal_Int16> aOutArgsIndex;
- uno::Sequence<uno::Any> aOutArgs;
- pDocShell->CallXScript( *pScript, aParams, aRet, aOutArgsIndex, aOutArgs );
}
}
}
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 0b3a6f01f9ea..a173e6d1e051 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -65,6 +65,7 @@
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <com/sun/star/form/XFormsSupplier.hpp>
#include <svx/unomod.hxx>
+#include <vbahelper/vbaaccesshelper.hxx>
#include <comphelper/processfactory.hxx>
#include <basic/basmgr.hxx>
@@ -72,19 +73,6 @@
using namespace ::com::sun::star;
-#ifndef CWS_NPOWER14MISCFIXES
-uno::Reference< uno::XInterface > lcl_createVBAUnoAPIServiceWithArgs( SfxObjectShell* pShell, const sal_Char* _pAsciiName, const uno::Sequence< uno::Any >& aArgs ) throw (uno::RuntimeException)
-{
- uno::Any aUnoVar;
- if ( !pShell || !pShell->GetBasicManager()->GetGlobalUNOConstant( "VBAGlobals", aUnoVar ) )
- throw lang::IllegalArgumentException();
- uno::Reference< lang::XMultiServiceFactory > xVBAFactory( aUnoVar, uno::UNO_QUERY_THROW );
- ::rtl::OUString sVarName( ::rtl::OUString::createFromAscii( _pAsciiName ) );
- uno::Reference< uno::XInterface > xIf = xVBAFactory->createInstanceWithArguments( sVarName, aArgs );
- return xIf;
-}
-#endif
-
class ScVbaObjectForCodeNameProvider : public ::cppu::WeakImplHelper1< container::XNameAccess >
{
uno::Any maWorkbook;
@@ -98,13 +86,10 @@ public:
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("")), uno::Reference< uno::XInterface >() );
uno::Sequence< uno::Any > aArgs(2);
- aArgs[0] = uno::Any( uno::Reference< uno::XInterface >() );
+ // access the application object ( parent for workbook )
+ aArgs[0] = uno::Any( ooo::vba::createVBAUnoAPIServiceWithArgs( mpDocShell, "ooo.vba.Application", uno::Sequence< uno::Any >() ) );
aArgs[1] = uno::Any( mpDocShell->GetModel() );
-#ifdef CWS_NPOWER14MISCFIXES
maWorkbook <<= ooo::vba::createVBAUnoAPIServiceWithArgs( mpDocShell, "ooo.vba.excel.Workbook", aArgs );
-#else
- maWorkbook <<= lcl_createVBAUnoAPIServiceWithArgs( mpDocShell, "ooo.vba.excel.Workbook", aArgs );
-#endif
}
virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException )
@@ -139,13 +124,8 @@ public:
aArgs[0] = maWorkbook;
aArgs[1] = uno::Any( xModel );
aArgs[2] = uno::Any( rtl::OUString( sSheetName ) );
-#ifdef CWS_NPOWER14MISCFIXES
// use the convience function
maCachedObject <<= ooo::vba::createVBAUnoAPIServiceWithArgs( mpDocShell, "ooo.vba.excel.Worksheet", aArgs );
-#else
- // use the temp function
- maCachedObject <<= lcl_createVBAUnoAPIServiceWithArgs( mpDocShell, "ooo.vba.excel.Worksheet", aArgs );
-#endif
break;
}
}
@@ -557,6 +537,7 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
break;
case SC_SERVICE_OPCODEMAPPER:
+ if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
ScAddress aAddress;
@@ -566,44 +547,35 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
break;
}
case SC_SERVICE_VBAOBJECTPROVIDER:
- if ( pDocShell )
+ if (pDocShell && pDocShell->GetDocument()->IsInVBAMode())
{
OSL_TRACE("**** creating VBA Object mapper");
xRet.set(static_cast<container::XNameAccess*>(new ScVbaObjectForCodeNameProvider( pDocShell )));
}
break;
case SC_SERVICE_VBACODENAMEPROVIDER:
+ if (pDocShell && pDocShell->GetDocument()->IsInVBAMode())
{
- // Only create the excel faking service for excel docs
- const SfxFilter *pFilt = pDocShell->GetMedium()->GetFilter();
- if ( pFilt && pFilt->IsAlienFormat() )
- {
- // application/vnd.ms-excel is the mime type for Excel
- static const rtl::OUString sExcelMimeType( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.ms-excel" ) );
- if ( sExcelMimeType.equals( pFilt->GetMimeType() ) )
- xRet.set(static_cast<document::XCodeNameQuery*>(new ScVbaCodeNameProvider( pDocShell )));
- }
- break;
+ OSL_TRACE("**** creating VBA Object provider");
+ xRet.set(static_cast<document::XCodeNameQuery*>(new ScVbaCodeNameProvider( pDocShell )));
}
+ break;
case SC_SERVICE_VBAGLOBALS:
+ if (pDocShell)
{
uno::Any aGlobs;
- ScDocument* pDoc = pDocShell->GetDocument();
- if ( pDoc )
+ if ( !pDocShell->GetBasicManager()->GetGlobalUNOConstant( "VBAGlobals", aGlobs ) )
{
- if ( !pDocShell->GetBasicManager()->GetGlobalUNOConstant( "VBAGlobals", aGlobs ) )
- {
- uno::Sequence< uno::Any > aArgs(1);
- aArgs[ 0 ] <<= pDocShell->GetModel();
- aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Globals" ) ), aArgs );
- pDocShell->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
- BasicManager* pAppMgr = SFX_APP()->GetBasicManager();
- if ( pAppMgr )
- pAppMgr->SetGlobalUNOConstant( "ThisExcelDoc", aArgs[ 0 ] );
- }
- aGlobs >>= xRet;
+ uno::Sequence< uno::Any > aArgs(1);
+ aArgs[ 0 ] <<= pDocShell->GetModel();
+ xRet = ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Globals" ) ), aArgs );
+ pDocShell->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", uno::Any( xRet ) );
+ BasicManager* pAppMgr = SFX_APP()->GetBasicManager();
+ if ( pAppMgr )
+ pAppMgr->SetGlobalUNOConstant( "ThisExcelDoc", aArgs[ 0 ] );
}
}
+ break;
}
return xRet;
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index d10d3ba54f86..fd1e655b8ffb 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -28,6 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
+#include <com/sun/star/awt/MouseButton.hpp>
+#include <com/sun/star/script/vba/VBAEventId.hpp>
+#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
+#include <com/sun/star/view/DocumentZoomType.hpp>
#include <editeng/outliner.hxx>
#include <svx/fmdpage.hxx>
@@ -67,8 +71,6 @@
#include "appoptio.hxx"
#include "gridwin.hxx"
#include "sheetevents.hxx"
-#include <com/sun/star/view/DocumentZoomType.hpp>
-#include <com/sun/star/awt/MouseButton.hpp>
#include "AccessibilityHints.hxx"
#include <svx/sdrhittesthelper.hxx>
@@ -468,7 +470,8 @@ void SAL_CALL ScViewPaneObj::release() throw()
//UNUSED2008-05 aPropSet( lcl_GetViewOptPropertyMap() ),
//UNUSED2008-05 aMouseClickHandlers( 0 ),
//UNUSED2008-05 aActivationListeners( 0 ),
-//UNUSED2008-05 bDrawSelModeSet(sal_False)
+//UNUSED2008-05 bDrawSelModeSet(sal_False),
+//UNUSED2008-05 bFilteredRangeSelection(sal_True)
//UNUSED2008-05 {
//UNUSED2008-05 }
@@ -551,10 +554,22 @@ void lcl_CallActivate( ScDocShell* pDocSh, SCTAB nTab, sal_Int32 nEvent )
uno::Sequence<uno::Any> aParams;
uno::Sequence<sal_Int16> aOutArgsIndex;
uno::Sequence<uno::Any> aOutArgs;
-
/*ErrCode eRet =*/ pDocSh->CallXScript( *pScript, aParams, aRet, aOutArgsIndex, aOutArgs );
}
}
+
+ // execute VBA event handlers
+ try
+ {
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents( pDoc->GetVbaEventProcessor(), uno::UNO_SET_THROW );
+ // the parameter is the clicked object, as in the mousePressed call above
+ uno::Sequence< uno::Any > aArgs( 1 );
+ aArgs[ 0 ] <<= nTab;
+ xVbaEvents->processVbaEvent( ScSheetEvents::GetVbaSheetEventId( nEvent ), aArgs );
+ }
+ catch( uno::Exception& )
+ {
+ }
}
void ScTabViewObj::SheetChanged()
@@ -1242,14 +1257,12 @@ bool ScTabViewObj::IsMouseListening() const
return true;
// also include sheet events, because MousePressed must be called for them
- ScTabViewShell* pViewSh = GetViewShell();
- ScViewData* pViewData = pViewSh->GetViewData();
- const ScSheetEvents* pEvents = pViewData->GetDocument()->GetSheetEvents(pViewData->GetTabNo());
- if ( pEvents && ( pEvents->GetScript(SC_SHEETEVENT_RIGHTCLICK) != NULL ||
- pEvents->GetScript(SC_SHEETEVENT_DOUBLECLICK) != NULL ) )
- return true;
-
- return false;
+ ScViewData* pViewData = GetViewShell()->GetViewData();
+ ScDocument* pDoc = pViewData->GetDocument();
+ SCTAB nTab = pViewData->GetTabNo();
+ return
+ pDoc->HasSheetEventScript( nTab, SC_SHEETEVENT_RIGHTCLICK, true ) ||
+ pDoc->HasSheetEventScript( nTab, SC_SHEETEVENT_DOUBLECLICK, true );
}
sal_Bool ScTabViewObj::MousePressed( const awt::MouseEvent& e )
@@ -1257,33 +1270,29 @@ sal_Bool ScTabViewObj::MousePressed( const awt::MouseEvent& e )
{
sal_Bool bReturn(sal_False);
- if (aMouseClickHandlers.Count())
+ uno::Reference< uno::XInterface > xTarget = GetClickedObject(Point(e.X, e.Y));
+ if (aMouseClickHandlers.Count() && xTarget.is())
{
- uno::Reference< uno::XInterface > xTarget = GetClickedObject(Point(e.X, e.Y));
+ awt::EnhancedMouseEvent aMouseEvent;
- if (xTarget.is())
- {
- awt::EnhancedMouseEvent aMouseEvent;
+ aMouseEvent.Buttons = e.Buttons;
+ aMouseEvent.X = e.X;
+ aMouseEvent.Y = e.Y;
+ aMouseEvent.ClickCount = e.ClickCount;
+ aMouseEvent.PopupTrigger = e.PopupTrigger;
+ aMouseEvent.Target = xTarget;
- aMouseEvent.Buttons = e.Buttons;
- aMouseEvent.X = e.X;
- aMouseEvent.Y = e.Y;
- aMouseEvent.ClickCount = e.ClickCount;
- aMouseEvent.PopupTrigger = e.PopupTrigger;
- aMouseEvent.Target = xTarget;
-
- for ( USHORT n=0; n<aMouseClickHandlers.Count(); n++ )
+ for ( USHORT n=0; n<aMouseClickHandlers.Count(); n++ )
+ {
+ try
{
- try
- {
- if (!(*aMouseClickHandlers[n])->mousePressed( aMouseEvent ))
- bReturn = sal_True;
- }
- catch ( uno::Exception& )
- {
- aMouseClickHandlers.DeleteAndDestroy(n);
- --n; // because it will be increased again in the loop
- }
+ if (!(*aMouseClickHandlers[n])->mousePressed( aMouseEvent ))
+ bReturn = sal_True;
+ }
+ catch ( uno::Exception& )
+ {
+ aMouseClickHandlers.DeleteAndDestroy(n);
+ --n; // because it will be increased again in the loop
}
}
}
@@ -1291,7 +1300,7 @@ sal_Bool ScTabViewObj::MousePressed( const awt::MouseEvent& e )
// handle sheet events
bool bDoubleClick = ( e.Buttons == awt::MouseButton::LEFT && e.ClickCount == 2 );
bool bRightClick = ( e.Buttons == awt::MouseButton::RIGHT && e.ClickCount == 1 );
- if ( ( bDoubleClick || bRightClick ) && !bReturn )
+ if ( ( bDoubleClick || bRightClick ) && !bReturn && xTarget.is())
{
sal_Int32 nEvent = bDoubleClick ? SC_SHEETEVENT_DOUBLECLICK : SC_SHEETEVENT_RIGHTCLICK;
@@ -1307,28 +1316,41 @@ sal_Bool ScTabViewObj::MousePressed( const awt::MouseEvent& e )
if (pScript)
{
// the macro parameter is the clicked object, as in the mousePressed call above
- uno::Reference< uno::XInterface > xTarget = GetClickedObject(Point(e.X, e.Y));
- if (xTarget.is())
- {
- uno::Sequence<uno::Any> aParams(1);
- aParams[0] <<= xTarget;
+ uno::Sequence<uno::Any> aParams(1);
+ aParams[0] <<= xTarget;
- uno::Any aRet;
- uno::Sequence<sal_Int16> aOutArgsIndex;
- uno::Sequence<uno::Any> aOutArgs;
+ uno::Any aRet;
+ uno::Sequence<sal_Int16> aOutArgsIndex;
+ uno::Sequence<uno::Any> aOutArgs;
- /*ErrCode eRet =*/ pDocSh->CallXScript( *pScript, aParams, aRet, aOutArgsIndex, aOutArgs );
+ /*ErrCode eRet =*/ pDocSh->CallXScript( *pScript, aParams, aRet, aOutArgsIndex, aOutArgs );
- // look for a boolean return value of true
- sal_Bool bRetValue = sal_False;
- if (aRet >>= bRetValue)
- {
- if (bRetValue)
- bReturn = sal_True;
- }
+ // look for a boolean return value of true
+ sal_Bool bRetValue = sal_False;
+ if (aRet >>= bRetValue)
+ {
+ if (bRetValue)
+ bReturn = sal_True;
}
}
}
+
+ // execute VBA event handler
+ if (!bReturn && xTarget.is()) try
+ {
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents( pDoc->GetVbaEventProcessor(), uno::UNO_SET_THROW );
+ // the parameter is the clicked object, as in the mousePressed call above
+ uno::Sequence< uno::Any > aArgs( 1 );
+ aArgs[ 0 ] <<= xTarget;
+ xVbaEvents->processVbaEvent( ScSheetEvents::GetVbaSheetEventId( nEvent ), aArgs );
+ }
+ catch( util::VetoException& )
+ {
+ bReturn = sal_True;
+ }
+ catch( uno::Exception& )
+ {
+ }
}
return bReturn;
@@ -1820,14 +1842,25 @@ void ScTabViewObj::SelectionChanged()
// the macro parameter is the selection as returned by getSelection
uno::Sequence<uno::Any> aParams(1);
aParams[0] = getSelection();
-
uno::Any aRet;
uno::Sequence<sal_Int16> aOutArgsIndex;
uno::Sequence<uno::Any> aOutArgs;
-
/*ErrCode eRet =*/ pDocSh->CallXScript( *pScript, aParams, aRet, aOutArgsIndex, aOutArgs );
}
}
+
+ // execute VBA event handler
+ try
+ {
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents( pDoc->GetVbaEventProcessor(), uno::UNO_SET_THROW );
+ // the parameter is the clicked object, as in the mousePressed call above
+ uno::Sequence< uno::Any > aArgs( 1 );
+ aArgs[ 0 ] <<= getSelection();
+ xVbaEvents->processVbaEvent( ScSheetEvents::GetVbaSheetEventId( SC_SHEETEVENT_SELECT ), aArgs );
+ }
+ catch( uno::Exception& )
+ {
+ }
}
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index b1c4db637434..2c39d7154b4b 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -31,6 +31,7 @@
#include "scmod.hxx"
#include "cellsuno.hxx"
#include <comphelper/processfactory.hxx>
+#include <com/sun/star/sheet/XSheetCellRange.hpp>
using namespace ::com::sun::star;
using namespace ::ooo::vba;
@@ -41,6 +42,27 @@ namespace vba
{
namespace excel
{
+
+ScDocShell* GetDocShellFromRange( const uno::Reference< uno::XInterface >& xRange ) throw ( uno::RuntimeException )
+{
+ ScCellRangesBase* pScCellRangesBase = ScCellRangesBase::getImplementation( xRange );
+ if ( !pScCellRangesBase )
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access underlying doc shell uno range object" ) ), uno::Reference< uno::XInterface >() );
+ }
+ return pScCellRangesBase->GetDocShell();
+}
+
+ScDocument* GetDocumentFromRange( const uno::Reference< uno::XInterface >& xRange ) throw ( uno::RuntimeException )
+{
+ ScDocShell* pDocShell = GetDocShellFromRange( xRange );
+ if ( !pDocShell )
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access underlying document from uno range object" ) ), uno::Reference< uno::XInterface >() );
+ }
+ return pDocShell->GetDocument();
+}
+
void implSetZoom( const uno::Reference< frame::XModel >& xModel, sal_Int16 nZoom, std::vector< SCTAB >& nTabs )
{
ScTabViewShell* pViewSh = excel::getBestViewShell( xModel );
@@ -207,12 +229,40 @@ getViewFrame( const uno::Reference< frame::XModel >& xModel )
return NULL;
}
+uno::Reference< XHelperInterface >
+getUnoSheetModuleObj( const uno::Reference< table::XCellRange >& xRange ) throw ( uno::RuntimeException )
+{
+ uno::Reference< sheet::XSheetCellRange > xSheetRange( xRange, uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xProps( xSheetRange->getSpreadsheet(), uno::UNO_QUERY_THROW );
+ rtl::OUString sCodeName;
+ xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CodeName") ) ) >>= sCodeName;
+ // #TODO #FIXME ideally we should 'throw' here if we don't get a valid parent, but... it is possible
+ // to create a module ( and use 'Option VBASupport 1' ) for a calc document, in this scenario there
+ // are *NO* special document module objects ( of course being able to switch between vba/non vba mode at
+ // the document in the future could fix this, especially IF the switching of the vba mode takes care to
+ // create the special document module objects if they don't exist.
+ uno::Reference< XHelperInterface > xParent( ov::getUnoDocModule( sCodeName, GetDocShellFromRange( xRange ) ), uno::UNO_QUERY );
+
+ return xParent;
+}
+
+uno::Reference< XHelperInterface >
+getUnoSheetModuleObj( const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges ) throw ( uno::RuntimeException )
+{
+ uno::Reference< container::XEnumerationAccess > xEnumAccess( xRanges, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XEnumeration > xEnum = xEnumAccess->createEnumeration();
+ uno::Reference< table::XCellRange > xRange( xEnum->nextElement(), uno::UNO_QUERY_THROW );
+
+ return getUnoSheetModuleObj( xRange );
+}
+
SfxItemSet*
ScVbaCellRangeAccess::GetDataSet( ScCellRangesBase* pRangeObj )
{
return pRangeObj ? pRangeObj->GetCurrentDataSet( true ) : 0;
}
+
} //excel
} //vba
} //ooo
diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx
index 9af804ab169f..da0474e6ceb0 100644
--- a/sc/source/ui/vba/excelvbahelper.hxx
+++ b/sc/source/ui/vba/excelvbahelper.hxx
@@ -29,6 +29,9 @@
#include<vbahelper/vbahelper.hxx>
#include <docsh.hxx>
+#include <com/sun/star/table/XCellRange.hpp>
+#include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
+#include <ooo/vba/XHelperInterface.hpp>
class ScCellRangesBase;
@@ -48,6 +51,11 @@ namespace ooo
ScDocShell* getDocShell( const css::uno::Reference< css::frame::XModel>& xModel ) ;
ScTabViewShell* getCurrentBestViewShell( const css::uno::Reference< css::uno::XComponentContext >& xContext );
SfxViewFrame* getViewFrame( const css::uno::Reference< css::frame::XModel >& xModel );
+ css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges ) throw ( css::uno::RuntimeException );
+ css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::table::XCellRange >& xRange ) throw ( css::uno::RuntimeException );
+ ScDocShell* GetDocShellFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
+ ScDocument* GetDocumentFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
+ css::uno::Reference< css::frame::XModel > GetModelFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
class ScVbaCellRangeAccess
{
public:
diff --git a/sc/source/ui/vba/makefile.mk b/sc/source/ui/vba/makefile.mk
index 0a84b8dd12a5..4cb7e3eb064b 100644
--- a/sc/source/ui/vba/makefile.mk
+++ b/sc/source/ui/vba/makefile.mk
@@ -102,7 +102,9 @@ SLOFILES= \
$(SLO)$/vbapagesetup.obj \
$(SLO)$/vbapagebreak.obj \
$(SLO)$/vbapagebreaks.obj \
+ $(SLO)$/vbaeventshelper.obj \
$(SLO)$/service.obj
+
.ENDIF
# --- Targets ------------------------------------------------------
diff --git a/sc/source/ui/vba/service.cxx b/sc/source/ui/vba/service.cxx
index 8be0f6d9f726..2b1f14cf154a 100644
--- a/sc/source/ui/vba/service.cxx
+++ b/sc/source/ui/vba/service.cxx
@@ -66,6 +66,10 @@ namespace application
{
extern sdecl::ServiceDecl const serviceDecl;
}
+namespace vbaeventshelper
+{
+extern sdecl::ServiceDecl const serviceDecl;
+}
namespace textframe
{
extern sdecl::ServiceDecl const serviceDecl;
@@ -87,7 +91,7 @@ extern "C"
#if 0
// Component registration
if ( component_writeInfoHelper( pServiceManager, pRegistryKey,
- range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ) )
+ range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ) && component_writeInfoHelper( pServiceManager, pRegistryKey, vbaeventshelper::serviceDecl ) )
{
// Singleton registration
try
@@ -110,7 +114,7 @@ extern "C"
#else
// Component registration
return component_writeInfoHelper( pServiceManager, pRegistryKey,
- range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ) && component_writeInfoHelper( pServiceManager, pRegistryKey, textframe::serviceDecl );
+ range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ) && component_writeInfoHelper( pServiceManager, pRegistryKey, vbaeventshelper::serviceDecl, textframe::serviceDecl );
#endif
}
@@ -122,8 +126,8 @@ extern "C"
OSL_TRACE("In component_getFactory for %s", pImplName );
void* pRet = component_getFactoryHelper(
pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl );
- if( !pRet )
- pRet = component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, textframe::serviceDecl );
+ if( !pRet )
+ pRet = component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, vbaeventshelper::serviceDecl, textframe::serviceDecl );
OSL_TRACE("Ret is 0x%x", pRet);
return pRet;
}
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index aea8d8bc11d4..8f5aba5c4acb 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -24,14 +24,14 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include <stdio.h>
+#include <stdio.h>
-#include<com/sun/star/sheet/XSpreadsheetView.hpp>
+#include <com/sun/star/sheet/XSpreadsheetView.hpp>
#include <com/sun/star/sheet/XSpreadsheets.hpp>
-#include<com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include<ooo/vba/excel/XlCalculation.hpp>
+#include <ooo/vba/excel/XlCalculation.hpp>
#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
#include <com/sun/star/sheet/XCalculatable.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
@@ -117,7 +117,8 @@ public:
ScVbaApplication::ScVbaApplication( const uno::Reference<uno::XComponentContext >& xContext ) :
ScVbaApplication_BASE( xContext ),
m_xCalculation( excel::XlCalculation::xlCalculationAutomatic ),
- m_xDisplayAlerts( sal_True)
+ m_bDisplayAlerts( sal_True ),
+ m_bEnableEvents( sal_True )
{
}
@@ -193,18 +194,47 @@ ScVbaApplication::hasProperty( const ::rtl::OUString& Name ) throw(uno::RuntimeE
uno::Reference< excel::XWorkbook >
ScVbaApplication::getActiveWorkbook() throw (uno::RuntimeException)
{
- return new ActiveWorkbook( this, mxContext );
+ uno::Reference< excel::XWorkbook > xWrkbk;
+ ScDocShell* pShell = excel::getDocShell( getCurrentExcelDoc( mxContext ) );
+ if ( pShell )
+ {
+ String aName;
+ if ( pShell->GetDocument() )
+ {
+ aName = pShell->GetDocument()->GetCodeName();
+ xWrkbk.set( getUnoDocModule( aName, pShell ), uno::UNO_QUERY );
+ // fallback ( e.g. it's possible a new document was created via the api )
+ // in that case the document will not have the appropriate Document Modules
+ // #TODO #FIXME ( needs to be fixes as part of providing support for an overall document
+ // vba mode etc. )
+ if ( !xWrkbk.is() )
+ return new ActiveWorkbook( this, mxContext );
+ }
+ }
+ return xWrkbk;
}
uno::Reference< excel::XWorkbook > SAL_CALL
ScVbaApplication::getThisWorkbook() throw (uno::RuntimeException)
{
- uno::Reference< frame::XModel > xModel = getThisExcelDoc(mxContext);
- if( !xModel.is() )
- return uno::Reference< excel::XWorkbook >();
-
- ScVbaWorkbook *pWb = new ScVbaWorkbook( this, mxContext, xModel );
- return uno::Reference< excel::XWorkbook > (pWb);
+ uno::Reference< excel::XWorkbook > xWrkbk;
+ ScDocShell* pShell = excel::getDocShell( getThisExcelDoc( mxContext ) );
+ if ( pShell )
+ {
+ String aName;
+ if ( pShell->GetDocument() )
+ {
+ aName = pShell->GetDocument()->GetCodeName();
+ xWrkbk.set( getUnoDocModule( aName, pShell ), uno::UNO_QUERY );
+ // fallback ( e.g. it's possible a new document was created via the api )
+ // in that case the document will not have the appropriate Document Modules
+ // #TODO #FIXME ( needs to be fixes as part of providing support for an overall document
+ // vba mode etc. )
+ if ( !xWrkbk.is() )
+ return new ActiveWorkbook( this, mxContext );
+ }
+ }
+ return xWrkbk;
}
uno::Reference< XAssistant > SAL_CALL
@@ -246,10 +276,10 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
{
uno::Reference< sheet::XSheetCellRangeContainer > xRanges( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
if ( xRanges.is() )
- return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( this, mxContext, xRanges ) ) );
+ return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( excel::getUnoSheetModuleObj( xRanges ), mxContext, xRanges ) ) );
}
- return uno::makeAny( uno::Reference< excel::XRange >(new ScVbaRange( this, mxContext, xRange ) ) );
+ return uno::makeAny( uno::Reference< excel::XRange >(new ScVbaRange( excel::getUnoSheetModuleObj( xRange ), mxContext, xRange ) ) );
}
else
{
@@ -531,10 +561,8 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro
ScGridWindow* gridWindow = (ScGridWindow*)pShell->GetWindow();
try
{
- // FIXME: pass proper Worksheet parent
uno::Reference< excel::XRange > xVbaSheetRange = ScVbaRange::getRangeObjectForName(
- uno::Reference< XHelperInterface >(), mxContext, sRangeName,
- excel::getDocShell( xModel ), formula::FormulaGrammar::CONV_XL_R1C1 );
+ mxContext, sRangeName, excel::getDocShell( xModel ), formula::FormulaGrammar::CONV_XL_R1C1 );
if( bScroll )
{
@@ -681,14 +709,27 @@ ScVbaApplication::getName() throw (uno::RuntimeException)
void SAL_CALL
ScVbaApplication::setDisplayAlerts(sal_Bool displayAlerts) throw (uno::RuntimeException)
{
- m_xDisplayAlerts = displayAlerts;
+ m_bDisplayAlerts = displayAlerts;
}
sal_Bool SAL_CALL
ScVbaApplication::getDisplayAlerts() throw (uno::RuntimeException)
{
- return m_xDisplayAlerts;
+ return m_bDisplayAlerts;
+}
+
+void SAL_CALL
+ScVbaApplication::setEnableEvents(sal_Bool bEnable) throw (uno::RuntimeException)
+{
+ m_bEnableEvents = bEnable;
}
+
+sal_Bool SAL_CALL
+ScVbaApplication::getEnableEvents() throw (uno::RuntimeException)
+{
+ return m_bEnableEvents;
+}
+
void SAL_CALL
ScVbaApplication::Calculate() throw( script::BasicErrorException , uno::RuntimeException )
{
@@ -1068,12 +1109,13 @@ ScVbaApplication::Intersect( const uno::Reference< excel::XRange >& Arg1, const
ScDocShell* pDocShell = excel::getDocShell( xModel );
if ( aCellRanges.Count() == 1 )
{
- xRefRange = new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, new ScCellRangeObj( pDocShell, *aCellRanges.First() ) );
+ uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pDocShell, *aCellRanges.First() ));
+ xRefRange = new ScVbaRange( excel::getUnoSheetModuleObj( xRange ), mxContext, xRange );
}
else if ( aCellRanges.Count() > 1 )
{
uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDocShell, aCellRanges ) );
- xRefRange = new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, xRanges );
+ xRefRange = new ScVbaRange( excel::getUnoSheetModuleObj( xRanges ) , mxContext, xRanges );
}
return xRefRange;
@@ -1158,12 +1200,13 @@ ScVbaApplication::Union( const uno::Reference< excel::XRange >& Arg1, const uno:
if ( aCellRanges.Count() == 1 )
{
// normal range
- xRange = new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, new ScCellRangeObj( pDocShell, *aCellRanges.First() ) );
+ uno::Reference< table::XCellRange > xCalcRange( new ScCellRangeObj( pDocShell, *aCellRanges.First() ) );
+ xRange = new ScVbaRange( excel::getUnoSheetModuleObj( xCalcRange ), mxContext, xCalcRange );
}
else if ( aCellRanges.Count() > 1 ) // Multi-Area
{
uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDocShell, aCellRanges ) );
- xRange = new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, xRanges );
+ xRange = new ScVbaRange( excel::getUnoSheetModuleObj( xRanges ), mxContext, xRanges );
}
// #FIXME need proper (WorkSheet) parent
diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx
index 96638651bcd1..a7be5feb1d27 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -43,7 +43,9 @@ class ScVbaApplication : public ScVbaApplication_BASE
{
private:
sal_Int32 m_xCalculation;
- sal_Bool m_xDisplayAlerts;
+ sal_Bool m_bDisplayAlerts;
+ sal_Bool m_bEnableEvents;
+
rtl::OUString getOfficePath( const rtl::OUString& sPath ) throw ( css::uno::RuntimeException );
protected:
@@ -100,6 +102,9 @@ public:
virtual ::sal_Int32 SAL_CALL getCursor() throw (css::uno::RuntimeException);
virtual void SAL_CALL setCursor( ::sal_Int32 _cursor ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getEnableEvents() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setEnableEvents( sal_Bool bEnable ) throw (css::uno::RuntimeException);
+
virtual css::uno::Any SAL_CALL Windows( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual void SAL_CALL wait( double time ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);
diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx
index 41b26501f4ad..5117cfd75858 100644
--- a/sc/source/ui/vba/vbachartobjects.cxx
+++ b/sc/source/ui/vba/vbachartobjects.cxx
@@ -47,16 +47,15 @@ using namespace ::ooo::vba;
class ChartObjectEnumerationImpl : public EnumerationHelperImpl
{
uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier;
- uno::Reference< XHelperInterface > xParent;
public:
- ChartObjectEnumerationImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier, const uno::Reference< XHelperInterface >& _xParent ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), xDrawPageSupplier( _xDrawPageSupplier ), xParent( _xParent ) {}
+ ChartObjectEnumerationImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier, const uno::Reference< XHelperInterface >& _xParent ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( _xParent, xContext, xEnumeration ), xDrawPageSupplier( _xDrawPageSupplier ) {}
virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
uno::Reference< table::XTableChart > xTableChart( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
// parent Object is sheet
- return uno::makeAny( uno::Reference< excel::XChartObject > ( new ScVbaChartObject( xParent, m_xContext, xTableChart, xDrawPageSupplier ) ) );
+ return uno::makeAny( uno::Reference< excel::XChartObject > ( new ScVbaChartObject( m_xParent, m_xContext, xTableChart, xDrawPageSupplier ) ) );
}
};
diff --git a/sc/source/ui/vba/vbacomments.cxx b/sc/source/ui/vba/vbacomments.cxx
index a68dd4245741..7a6d3d774937 100644
--- a/sc/source/ui/vba/vbacomments.cxx
+++ b/sc/source/ui/vba/vbacomments.cxx
@@ -50,10 +50,11 @@ class CommentEnumeration : public EnumerationHelperImpl
css::uno::Reference< css::frame::XModel > mxModel;
public:
CommentEnumeration(
+ const uno::Reference< XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext >& xContext,
const uno::Reference< container::XEnumeration >& xEnumeration,
const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) :
- EnumerationHelperImpl( xContext, xEnumeration ),
+ EnumerationHelperImpl( xParent, xContext, xEnumeration ),
mxModel( xModel, uno::UNO_SET_THROW )
{}
@@ -80,8 +81,7 @@ uno::Reference< container::XEnumeration >
ScVbaComments::createEnumeration() throw (uno::RuntimeException)
{
uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
-
- return new CommentEnumeration( mxContext, xEnumAccess->createEnumeration(), mxModel );
+ return new CommentEnumeration( mxParent, mxContext, xEnumAccess->createEnumeration(), mxModel );
}
uno::Any
diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx
new file mode 100755
index 000000000000..45667adf2f2c
--- /dev/null
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -0,0 +1,753 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "vbaeventshelper.hxx"
+
+#include <com/sun/star/awt/XWindowListener.hpp>
+#include <com/sun/star/frame/XBorderResizeListener.hpp>
+#include <com/sun/star/frame/XControllerBorder.hpp>
+#include <com/sun/star/script/vba/VBAEventId.hpp>
+#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
+#include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
+#include <com/sun/star/util/XChangesListener.hpp>
+#include <com/sun/star/util/XChangesNotifier.hpp>
+#include <com/sun/star/util/XCloseListener.hpp>
+
+#include <ooo/vba/excel/XApplication.hpp>
+
+#include <cppuhelper/implbase4.hxx>
+#include <toolkit/unohlp.hxx>
+#include <vbahelper/helperdecl.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/window.hxx>
+
+#include "cellsuno.hxx"
+#include "convuno.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::script::vba::VBAEventId;
+using namespace ::ooo::vba;
+
+// ============================================================================
+
+typedef ::cppu::WeakImplHelper4<
+ awt::XWindowListener, util::XCloseListener, frame::XBorderResizeListener, util::XChangesListener > ScVbaEventsListener_BASE;
+
+// This class is to process Workbook window related event
+class ScVbaEventsListener : public ScVbaEventsListener_BASE
+{
+public :
+ ScVbaEventsListener( ScVbaEventsHelper& rVbaEvents, const uno::Reference< frame::XModel >& rxModel, ScDocShell* pDocShell );
+ virtual ~ScVbaEventsListener();
+
+ void startListening();
+ void stopListening();
+
+ // XWindowListener
+ virtual void SAL_CALL windowResized( const awt::WindowEvent& aEvent ) throw (uno::RuntimeException);
+ virtual void SAL_CALL windowMoved( const awt::WindowEvent& aEvent ) throw (uno::RuntimeException);
+ virtual void SAL_CALL windowShown( const lang::EventObject& aEvent ) throw (uno::RuntimeException);
+ virtual void SAL_CALL windowHidden( const lang::EventObject& aEvent ) throw (uno::RuntimeException);
+ virtual void SAL_CALL disposing( const lang::EventObject& aEvent ) throw (uno::RuntimeException);
+
+ // XCloseListener
+ virtual void SAL_CALL queryClosing( const lang::EventObject& Source, ::sal_Bool GetsOwnership ) throw (util::CloseVetoException, uno::RuntimeException);
+ virtual void SAL_CALL notifyClosing( const lang::EventObject& Source ) throw (uno::RuntimeException);
+
+ // XBorderResizeListener
+ virtual void SAL_CALL borderWidthsChanged( const uno::Reference< uno::XInterface >& aObject, const frame::BorderWidths& aNewSize ) throw (uno::RuntimeException);
+
+ // XChangesListener
+ virtual void SAL_CALL changesOccurred( const util::ChangesEvent& aEvent ) throw (uno::RuntimeException);
+
+private:
+ uno::Reference< frame::XFrame > getFrame();
+ uno::Reference< awt::XWindow > getContainerWindow();
+ bool isMouseReleased();
+ DECL_LINK( fireResizeMacro, void* );
+ void processWindowResizeMacro();
+
+private:
+ ::osl::Mutex maMutex;
+ ScVbaEventsHelper& mrVbaEvents;
+ uno::Reference< frame::XModel > mxModel;
+ ScDocShell* mpDocShell;
+ bool mbWindowResized;
+ bool mbBorderChanged;
+ bool mbDisposed;
+};
+
+// ----------------------------------------------------------------------------
+
+ScVbaEventsListener::ScVbaEventsListener( ScVbaEventsHelper& rVbaEvents, const uno::Reference< frame::XModel >& rxModel, ScDocShell* pDocShell ) :
+ mrVbaEvents( rVbaEvents ),
+ mxModel( rxModel ),
+ mpDocShell( pDocShell ),
+ mbWindowResized( false ),
+ mbBorderChanged( false ),
+ mbDisposed( !rxModel.is() )
+{
+ OSL_TRACE( "ScVbaEventsListener::ScVbaEventsListener( 0x%x ) - ctor ", this );
+}
+
+ScVbaEventsListener::~ScVbaEventsListener()
+{
+ OSL_TRACE( "ScVbaEventsListener::~ScVbaEventsListener( 0x%x ) - dtor ", this );
+ stopListening();
+}
+
+void ScVbaEventsListener::startListening()
+{
+ if( !mbDisposed )
+ {
+ // add window listener
+ try
+ {
+ uno::Reference< awt::XWindow > xWindow( getContainerWindow(), uno::UNO_QUERY_THROW );
+ xWindow->addWindowListener( this );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ // add close listener
+ try
+ {
+ uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( mxModel, uno::UNO_QUERY_THROW );
+ xCloseBroadcaster->addCloseListener( this );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ // add Border resize listener
+ try
+ {
+ uno::Reference< frame::XControllerBorder > xControllerBorder( mxModel->getCurrentController(), uno::UNO_QUERY_THROW );
+ xControllerBorder->addBorderResizeListener( this );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ // add content change listener
+ try
+ {
+ uno::Reference< util::XChangesNotifier > xChangesNotifier( mxModel, uno::UNO_QUERY_THROW );
+ xChangesNotifier->addChangesListener( this );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+}
+
+void ScVbaEventsListener::stopListening()
+{
+ if( !mbDisposed )
+ {
+ try
+ {
+ uno::Reference< awt::XWindow > xWindow( getContainerWindow(), uno::UNO_QUERY_THROW );
+ xWindow->removeWindowListener( this );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ try
+ {
+ uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( mxModel, uno::UNO_QUERY_THROW );
+ xCloseBroadcaster->removeCloseListener( this );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ try
+ {
+ uno::Reference< frame::XControllerBorder > xControllerBorder( mxModel->getCurrentController(), uno::UNO_QUERY_THROW );
+ xControllerBorder->removeBorderResizeListener( this );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ try
+ {
+ uno::Reference< util::XChangesNotifier > xChangesNotifier( mxModel, uno::UNO_QUERY_THROW );
+ xChangesNotifier->removeChangesListener( this );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+ mbDisposed = true;
+}
+
+void SAL_CALL ScVbaEventsListener::windowResized( const awt::WindowEvent& /*aEvent*/ ) throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( maMutex );
+ // Workbook_window_resize event
+ mbWindowResized = true;
+ if( !mbDisposed && mbBorderChanged )
+ {
+ if( /*Window* pWindow =*/ VCLUnoHelper::GetWindow( getContainerWindow() ) )
+ {
+ mbBorderChanged = mbWindowResized = false;
+ acquire(); // ensure we don't get deleted before the event is handled
+ Application::PostUserEvent( LINK( this, ScVbaEventsListener, fireResizeMacro ), 0 );
+ }
+ }
+}
+
+void SAL_CALL ScVbaEventsListener::windowMoved( const awt::WindowEvent& /*aEvent*/ ) throw ( uno::RuntimeException )
+{
+ // not interest this time
+}
+
+void SAL_CALL ScVbaEventsListener::windowShown( const lang::EventObject& /*aEvent*/ ) throw ( uno::RuntimeException )
+{
+ // not interest this time
+}
+
+void SAL_CALL ScVbaEventsListener::windowHidden( const lang::EventObject& /*aEvent*/ ) throw ( uno::RuntimeException )
+{
+ // not interest this time
+}
+
+void SAL_CALL ScVbaEventsListener::disposing( const lang::EventObject& /*aEvent*/ ) throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( maMutex );
+ OSL_TRACE( "ScVbaEventsListener::disposing( 0x%x )", this );
+ mbDisposed = true;
+}
+
+void SAL_CALL ScVbaEventsListener::queryClosing( const lang::EventObject& /*Source*/, sal_Bool /*GetsOwnership*/ ) throw (util::CloseVetoException, uno::RuntimeException)
+{
+ // it can cancel the close, but need to throw a CloseVetoException, and it will be transmit to caller.
+}
+
+void SAL_CALL ScVbaEventsListener::notifyClosing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( maMutex );
+ stopListening();
+}
+
+void SAL_CALL ScVbaEventsListener::borderWidthsChanged( const uno::Reference< uno::XInterface >& /*aObject*/, const frame::BorderWidths& /*aNewSize*/ ) throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( maMutex );
+ // work with WindowResized event to guard Window Resize event.
+ mbBorderChanged = true;
+ if( !mbDisposed && mbWindowResized )
+ {
+ if( /*Window* pWindow =*/ VCLUnoHelper::GetWindow( getContainerWindow() ) )
+ {
+ mbWindowResized = mbBorderChanged = false;
+ acquire(); // ensure we don't get deleted before the timer fires.
+ Application::PostUserEvent( LINK( this, ScVbaEventsListener, fireResizeMacro ), 0 );
+ }
+ }
+}
+
+void SAL_CALL ScVbaEventsListener::changesOccurred( const util::ChangesEvent& aEvent ) throw (uno::RuntimeException)
+{
+ sal_Int32 nCount = aEvent.Changes.getLength();
+ if( nCount == 0 )
+ return;
+
+ util::ElementChange aChange = aEvent.Changes[ 0 ];
+ rtl::OUString sOperation;
+ aChange.Accessor >>= sOperation;
+ if( !sOperation.equalsIgnoreAsciiCaseAscii("cell-change") )
+ return;
+
+ if( nCount == 1 )
+ {
+ uno::Reference< table::XCellRange > xRangeObj;
+ aChange.ReplacedElement >>= xRangeObj;
+ if( xRangeObj.is() )
+ {
+ uno::Sequence< uno::Any > aArgs(1);
+ aArgs[0] <<= xRangeObj;
+ mrVbaEvents.processVbaEvent( WORKSHEET_CHANGE, aArgs );
+ }
+ return;
+ }
+
+ ScRangeList aRangeList;
+ for( sal_Int32 nIndex = 0; nIndex < nCount; ++nIndex )
+ {
+ aChange = aEvent.Changes[ nIndex ];
+ aChange.Accessor >>= sOperation;
+ uno::Reference< table::XCellRange > xRangeObj;
+ aChange.ReplacedElement >>= xRangeObj;
+ if( xRangeObj.is() && sOperation.equalsIgnoreAsciiCaseAscii("cell-change") )
+ {
+ uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable( xRangeObj, uno::UNO_QUERY );
+ if( xCellRangeAddressable.is() )
+ {
+ ScRange aRange;
+ ScUnoConversion::FillScRange( aRange, xCellRangeAddressable->getRangeAddress() );
+ aRangeList.Append( aRange );
+ }
+ }
+ }
+
+ if( (aRangeList.Count() > 0) && mpDocShell )
+ {
+ uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( mpDocShell, aRangeList ) );
+ uno::Sequence< uno::Any > aArgs(1);
+ aArgs[0] <<= xRanges;
+ mrVbaEvents.processVbaEvent( WORKSHEET_CHANGE, aArgs );
+ }
+}
+
+// ----------------------------------------------------------------------------
+
+uno::Reference< frame::XFrame > ScVbaEventsListener::getFrame()
+{
+ if( !mbDisposed && mxModel.is() ) try
+ {
+ uno::Reference< frame::XController > xController( mxModel->getCurrentController(), uno::UNO_QUERY_THROW );
+ return xController->getFrame();
+ }
+ catch( uno::Exception& )
+ {
+ }
+ return uno::Reference< frame::XFrame >();
+}
+
+uno::Reference< awt::XWindow > ScVbaEventsListener::getContainerWindow()
+{
+ try
+ {
+ uno::Reference< frame::XFrame > xFrame( getFrame(), uno::UNO_SET_THROW );
+ return xFrame->getContainerWindow();
+ }
+ catch( uno::Exception& )
+ {
+ }
+ return uno::Reference< awt::XWindow >();
+}
+
+bool ScVbaEventsListener::isMouseReleased()
+{
+ if( Window* pWindow = VCLUnoHelper::GetWindow( getContainerWindow() ) )
+ {
+ Window::PointerState aPointerState = pWindow->GetPointerState();
+ return (aPointerState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT )) == 0;
+ }
+ return false;
+}
+
+IMPL_LINK( ScVbaEventsListener, fireResizeMacro, void*, EMPTYARG )
+{
+ if( !mbDisposed && isMouseReleased() )
+ processWindowResizeMacro();
+ release();
+ return 0;
+}
+
+void ScVbaEventsListener::processWindowResizeMacro()
+{
+ OSL_TRACE( "**** Attempt to FIRE MACRO **** " );
+ if( !mbDisposed )
+ mrVbaEvents.processVbaEvent( WORKBOOK_WINDOWRESIZE, uno::Sequence< uno::Any >() );
+}
+
+// ============================================================================
+
+ScVbaEventsHelper::ScVbaEventsHelper( const uno::Sequence< uno::Any >& rArgs, const uno::Reference< uno::XComponentContext >& xContext ) :
+ VbaEventsHelperBase( rArgs, xContext ),
+ mbOpened( false )
+{
+ mpDocShell = dynamic_cast< ScDocShell* >( mpShell ); // mpShell from base class
+ mpDoc = mpDocShell ? mpDocShell->GetDocument() : 0;
+
+ if( !mxModel.is() || !mpDocShell || !mpDoc )
+ return;
+
+#define REGISTER_EVENT( eventid, eventname, type, cancelindex, worksheet ) \
+ registerEventHandler( eventid, eventname, type, cancelindex, uno::Any( worksheet ) )
+
+#define REGISTER_WORKBOOK_EVENT( eventid, eventname, cancelindex ) \
+ REGISTER_EVENT( WORKBOOK_##eventid, "Workbook_" eventname, EVENTHANDLER_DOCUMENT, cancelindex, false )
+
+#define REGISTER_WORKSHEET_EVENT( eventid, eventname, cancelindex ) \
+ REGISTER_EVENT( WORKSHEET_##eventid, "Worksheet_" eventname, EVENTHANDLER_DOCUMENT, cancelindex, true ); \
+ REGISTER_EVENT( (USERDEFINED_START + WORKSHEET_##eventid), "Workbook_Sheet" eventname, EVENTHANDLER_DOCUMENT, (((cancelindex) >= 0) ? ((cancelindex) + 1) : -1), false )
+
+ // global
+ REGISTER_EVENT( AUTO_OPEN, "Auto_Open", EVENTHANDLER_GLOBAL, -1, false );
+ REGISTER_EVENT( AUTO_CLOSE, "Auto_Close", EVENTHANDLER_GLOBAL, -1, false );
+
+ // Workbook
+ REGISTER_WORKBOOK_EVENT( ACTIVATE, "Activate", -1 );
+ REGISTER_WORKBOOK_EVENT( DEACTIVATE, "Deactivate", -1 );
+ REGISTER_WORKBOOK_EVENT( OPEN, "Open", -1 );
+ REGISTER_WORKBOOK_EVENT( BEFORECLOSE, "BeforeClose", 0 );
+ REGISTER_WORKBOOK_EVENT( BEFOREPRINT, "BeforePrint", 0 );
+ REGISTER_WORKBOOK_EVENT( BEFORESAVE, "BeforeSave", 1 );
+ REGISTER_WORKBOOK_EVENT( AFTERSAVE, "AfterSave", -1 );
+ REGISTER_WORKBOOK_EVENT( NEWSHEET, "NewSheet", -1 );
+ REGISTER_WORKBOOK_EVENT( WINDOWACTIVATE, "WindowActivate", -1 );
+ REGISTER_WORKBOOK_EVENT( WINDOWDEACTIVATE, "WindowDeactivate", -1 );
+ REGISTER_WORKBOOK_EVENT( WINDOWRESIZE, "WindowResize", -1 );
+
+ // Worksheet events. All events have a corresponding workbook event.
+ REGISTER_WORKSHEET_EVENT( ACTIVATE, "Activate", -1 );
+ REGISTER_WORKSHEET_EVENT( DEACTIVATE, "Deactivate", -1 );
+ REGISTER_WORKSHEET_EVENT( BEFOREDOUBLECLICK, "BeforeDoubleClick", 1 );
+ REGISTER_WORKSHEET_EVENT( BEFORERIGHTCLICK, "BeforeRightClick", 1 );
+ REGISTER_WORKSHEET_EVENT( CALCULATE, "Calculate", -1 );
+ REGISTER_WORKSHEET_EVENT( CHANGE, "Change", -1 );
+ REGISTER_WORKSHEET_EVENT( SELECTIONCHANGE, "SelectionChange", -1 );
+ REGISTER_WORKSHEET_EVENT( FOLLOWHYPERLINK, "FollowHyperlink", -1 );
+
+#undef REGISTER_EVENT
+#undef REGISTER_WORKBOOK_EVENT
+#undef REGISTER_WORKSHEET_EVENT
+}
+
+ScVbaEventsHelper::~ScVbaEventsHelper()
+{
+}
+
+void SAL_CALL ScVbaEventsHelper::disposing( const lang::EventObject& rSource ) throw (uno::RuntimeException)
+{
+ mxListener.clear();
+ VbaEventsHelperBase::disposing( rSource );
+}
+
+// protected ------------------------------------------------------------------
+
+bool ScVbaEventsHelper::implEventsEnabled() throw (uno::RuntimeException)
+{
+ // document and document shell are needed during event processing
+ if( !mpDocShell || !mpDoc )
+ throw uno::RuntimeException();
+
+ // get Application object and check if events are enabled (this is an Excel-only attribute)
+ uno::Reference< excel::XApplication > xApplication( mxApplication.get(), uno::UNO_QUERY );
+ if( !xApplication.is() && mpShell )
+ {
+ uno::Any aVBAGlobals;
+ mpShell->GetBasicManager()->GetGlobalUNOConstant( "VBAGlobals", aVBAGlobals );
+ uno::Reference< XHelperInterface > xHelperInterface( aVBAGlobals, uno::UNO_QUERY );
+ if( xHelperInterface.is() )
+ {
+ xApplication.set( xHelperInterface->Application(), uno::UNO_QUERY );
+ mxApplication = xApplication;
+ }
+ }
+ if( !xApplication.is() )
+ throw uno::RuntimeException();
+
+ // return whether event processing is enabled
+ return xApplication->getEnableEvents();
+}
+
+bool ScVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue,
+ const EventHandlerInfo& rInfo, const uno::Sequence< uno::Any >& rArgs ) throw (uno::RuntimeException)
+{
+ // check preconditions for some events, add more events if needed
+ bool bExecuteEvent = true;
+ switch( rInfo.mnEventId )
+ {
+ case WORKBOOK_ACTIVATE:
+ // while loading, framework fires this before 'opened' event, delay it
+ bExecuteEvent = mbOpened;
+ break;
+ case WORKBOOK_OPEN:
+ bExecuteEvent = !mbOpened;
+ if( bExecuteEvent )
+ {
+ // execute delayed Activate event too (see above)
+ rEventQueue.push_back( WORKBOOK_ACTIVATE );
+ rEventQueue.push_back( WORKBOOK_WINDOWACTIVATE );
+ rEventQueue.push_back( AUTO_OPEN );
+ }
+ break;
+ case WORKSHEET_SELECTIONCHANGE:
+ // if selection is not changed, then do not fire the event
+ bExecuteEvent = mbOpened && isSelectionChanged( rArgs, 0 );
+ break;
+ }
+
+ // add workbook event associated to a sheet event
+ bool bSheetEvent = false;
+ rInfo.maUserData >>= bSheetEvent;
+ if( bSheetEvent && bExecuteEvent )
+ rEventQueue.push_back( EventQueueEntry( rInfo.mnEventId + USERDEFINED_START, rArgs ) );
+
+ return bExecuteEvent;
+}
+
+uno::Sequence< uno::Any > ScVbaEventsHelper::implBuildArgumentList( const EventHandlerInfo& rInfo,
+ const uno::Sequence< uno::Any >& rArgs ) throw (lang::IllegalArgumentException)
+{
+ // fill arguments for workbook events associated to sheet events according to sheet events, sheet will be added below
+ bool bSheetEventAsBookEvent = rInfo.mnEventId > USERDEFINED_START;
+ sal_Int32 nEventId = bSheetEventAsBookEvent ? (rInfo.mnEventId - USERDEFINED_START) : rInfo.mnEventId;
+
+ uno::Sequence< uno::Any > aVbaArgs;
+ switch( nEventId )
+ {
+ // *** Workbook ***
+
+ // no arguments
+ case WORKBOOK_ACTIVATE:
+ case WORKBOOK_DEACTIVATE:
+ case WORKBOOK_OPEN:
+ break;
+ // 1 arg: cancel
+ case WORKBOOK_BEFORECLOSE:
+ case WORKBOOK_BEFOREPRINT:
+ aVbaArgs.realloc( 1 );
+ // current cancel state will be inserted by caller
+ break;
+ // 2 args: saveAs, cancel
+ case WORKBOOK_BEFORESAVE:
+ aVbaArgs.realloc( 2 );
+ checkArgumentType< bool >( rArgs, 0 );
+ aVbaArgs[ 0 ] = rArgs[ 0 ];
+ // current cancel state will be inserted by caller
+ break;
+ // 1 arg: success
+ case WORKBOOK_AFTERSAVE:
+ aVbaArgs.realloc( 1 );
+ checkArgumentType< bool >( rArgs, 0 );
+ aVbaArgs[ 0 ] = rArgs[ 0 ];
+ break;
+ // 1 arg: window
+ case WORKBOOK_WINDOWACTIVATE:
+ case WORKBOOK_WINDOWDEACTIVATE:
+ case WORKBOOK_WINDOWRESIZE:
+ aVbaArgs.realloc( 1 );
+ aVbaArgs[ 0 ] = createWindow();
+ break;
+ // 1 arg: worksheet
+ case WORKBOOK_NEWSHEET:
+ aVbaArgs.realloc( 1 );
+ aVbaArgs[ 0 ] = createWorksheet( rArgs, 0 );
+ break;
+
+ // *** Worksheet ***
+
+ // no arguments
+ case WORKSHEET_ACTIVATE:
+ case WORKSHEET_CALCULATE:
+ case WORKSHEET_DEACTIVATE:
+ break;
+ // 1 arg: range
+ case WORKSHEET_CHANGE:
+ case WORKSHEET_SELECTIONCHANGE:
+ aVbaArgs.realloc( 1 );
+ aVbaArgs[ 0 ] = createRange( rArgs, 0 );
+ break;
+ // 2 args: range, cancel
+ case WORKSHEET_BEFOREDOUBLECLICK:
+ case WORKSHEET_BEFORERIGHTCLICK:
+ aVbaArgs.realloc( 2 );
+ aVbaArgs[ 0 ] = createRange( rArgs, 0 );
+ // current cancel state will be inserted by caller
+ break;
+ // 1 arg: hyperlink
+ case WORKSHEET_FOLLOWHYPERLINK:
+ aVbaArgs.realloc( 1 );
+ aVbaArgs[ 0 ] = createHyperlink( rArgs, 0 );
+ break;
+ }
+
+ /* For workbook events associated to sheet events, the workbook event gets
+ the same arguments but with a Worksheet object in front of them. */
+ if( bSheetEventAsBookEvent )
+ {
+ sal_Int32 nLength = aVbaArgs.getLength();
+ uno::Sequence< uno::Any > aVbaArgs2( nLength + 1 );
+ aVbaArgs2[ 0 ] = createWorksheet( rArgs, 0 );
+ for( sal_Int32 nIndex = 0; nIndex < nLength; ++nIndex )
+ aVbaArgs2[ nIndex + 1 ] = aVbaArgs[ nIndex ];
+ aVbaArgs = aVbaArgs2;
+ }
+
+ return aVbaArgs;
+}
+
+void ScVbaEventsHelper::implPostProcessEvent( EventQueue& rEventQueue,
+ const EventHandlerInfo& rInfo, bool /*bSuccess*/, bool bCancel ) throw (uno::RuntimeException)
+{
+ switch( rInfo.mnEventId )
+ {
+ case WORKBOOK_OPEN:
+ mbOpened = true;
+ // register the listeners
+ if( !mxListener.is() )
+ {
+ mxListener = new ScVbaEventsListener( *this, mxModel, mpDocShell );
+ mxListener->startListening();
+ }
+ break;
+ case WORKBOOK_BEFORECLOSE:
+ /* Execute Auto_Close only if not cancelled by event handler, but
+ before UI asks user whether to cancel closing the document. */
+ if( !bCancel )
+ rEventQueue.push_back( AUTO_CLOSE );
+ break;
+ }
+}
+
+::rtl::OUString ScVbaEventsHelper::implGetDocumentModuleName( const EventHandlerInfo& rInfo,
+ const uno::Sequence< uno::Any >& rArgs ) const throw (lang::IllegalArgumentException)
+{
+ bool bSheetEvent = false;
+ rInfo.maUserData >>= bSheetEvent;
+ SCTAB nTab = bSheetEvent ? getTabFromArgs( rArgs, 0 ) : -1;
+ if( bSheetEvent && (nTab < 0) )
+ throw lang::IllegalArgumentException();
+
+ String aCodeName;
+ if( bSheetEvent )
+ mpDoc->GetCodeName( nTab, aCodeName );
+ else
+ aCodeName = mpDoc->GetCodeName();
+ return aCodeName;
+}
+
+// private --------------------------------------------------------------------
+
+SCTAB ScVbaEventsHelper::getTabFromArgs( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) throw (lang::IllegalArgumentException)
+{
+ checkArgument( rArgs, nIndex );
+
+ // first try to extract a sheet index
+ SCTAB nTab = -1;
+ if( rArgs[ nIndex ] >>= nTab )
+ return nTab;
+
+ // next, try single range object
+ uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable = getXSomethingFromArgs< sheet::XCellRangeAddressable >( rArgs, nIndex );
+ if( xCellRangeAddressable.is() )
+ return xCellRangeAddressable->getRangeAddress().Sheet;
+
+ // at last, try range list
+ uno::Reference< sheet::XSheetCellRangeContainer > xRanges = getXSomethingFromArgs< sheet::XSheetCellRangeContainer >( rArgs, nIndex );
+ if( xRanges.is() )
+ {
+ uno::Sequence< table::CellRangeAddress > aRangeAddresses = xRanges->getRangeAddresses();
+ if( aRangeAddresses.getLength() > 0 )
+ return aRangeAddresses[ 0 ].Sheet;
+ }
+
+ throw lang::IllegalArgumentException();
+}
+
+bool ScVbaEventsHelper::isSelectionChanged( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) throw (lang::IllegalArgumentException, uno::RuntimeException)
+{
+ uno::Reference< uno::XInterface > xNewSelection = getXSomethingFromArgs< uno::XInterface >( rArgs, nIndex, false );
+ if( ScCellRangesBase* pNewCellRanges = ScCellRangesBase::getImplementation( xNewSelection ) )
+ {
+ bool bChanged = maOldSelection != pNewCellRanges->GetRangeList();
+ maOldSelection = pNewCellRanges->GetRangeList();
+ return bChanged;
+ }
+ maOldSelection.Clear();
+ return true;
+}
+
+uno::Any ScVbaEventsHelper::createWorksheet( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) const
+ throw (lang::IllegalArgumentException, uno::RuntimeException)
+{
+ // Eventually we will be able to pull the Workbook/Worksheet objects
+ // directly from basic and register them as listeners
+
+ // extract sheet index, will throw, if parameter is invalid
+ SCTAB nTab = getTabFromArgs( rArgs, nIndex );
+
+ // create Workbook
+ uno::Sequence< uno::Any > aArgs( 2 );
+ aArgs[ 0 ] <<= uno::Reference< uno::XInterface >();
+ aArgs[ 1 ] <<= mxModel;
+ uno::Reference< uno::XInterface > xWorkbook( createVBAUnoAPIServiceWithArgs( mpShell, "ooo.vba.excel.Workbook", aArgs ), uno::UNO_SET_THROW );
+
+ // create WorkSheet
+ String aSheetName;
+ mpDoc->GetName( nTab, aSheetName );
+ aArgs = uno::Sequence< uno::Any >( 3 );
+ aArgs[ 0 ] <<= xWorkbook;
+ aArgs[ 1 ] <<= mxModel;
+ aArgs[ 2 ] <<= ::rtl::OUString( aSheetName );
+ uno::Reference< uno::XInterface > xWorksheet( createVBAUnoAPIServiceWithArgs( mpShell, "ooo.vba.excel.Worksheet", aArgs ), uno::UNO_SET_THROW );
+ return uno::Any( xWorksheet );
+}
+
+uno::Any ScVbaEventsHelper::createRange( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) const
+ throw (lang::IllegalArgumentException, uno::RuntimeException)
+{
+ uno::Reference< sheet::XSheetCellRangeContainer > xRanges = getXSomethingFromArgs< sheet::XSheetCellRangeContainer >( rArgs, nIndex );
+ uno::Reference< table::XCellRange > xRange = getXSomethingFromArgs< table::XCellRange >( rArgs, nIndex );
+ if ( !xRanges.is() && !xRange.is() )
+ throw lang::IllegalArgumentException();
+
+ uno::Sequence< uno::Any > aArgs( 2 );
+ aArgs[ 0 ] <<= uno::Reference< uno::XInterface >(); // dummy parent
+ if ( xRanges.is() )
+ aArgs[ 1 ] <<= xRanges;
+ else
+ aArgs[ 1 ] <<= xRange;
+ uno::Reference< uno::XInterface > xVbaRange( createVBAUnoAPIServiceWithArgs( mpShell, "ooo.vba.excel.Range", aArgs ), uno::UNO_SET_THROW );
+ return uno::Any( xVbaRange );
+}
+
+uno::Any ScVbaEventsHelper::createHyperlink( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) const
+ throw (lang::IllegalArgumentException, uno::RuntimeException)
+{
+ uno::Sequence< uno::Any > aArgs( 2 );
+ aArgs[ 0 ] <<= uno::Reference< uno::XInterface >(); // dummy parent
+ aArgs[ 1 ] <<= getXSomethingFromArgs< table::XCell >( rArgs, nIndex, false );
+ uno::Reference< uno::XInterface > xHyperlink( createVBAUnoAPIServiceWithArgs( mpShell, "ooo.vba.excel.Hyperlink", aArgs ), uno::UNO_SET_THROW );
+ return uno::Any( xHyperlink );
+}
+
+uno::Any ScVbaEventsHelper::createWindow() const throw (uno::RuntimeException)
+{
+ uno::Sequence< uno::Any > aArgs( 2 );
+ aArgs[ 0 ] <<= createVBAUnoAPIService( mpShell, "ooo.vba.Application" );
+ aArgs[ 1 ] <<= mxModel;
+ uno::Reference< uno::XInterface > xWindow( createVBAUnoAPIServiceWithArgs( mpShell, "ooo.vba.excel.Window", aArgs ), uno::UNO_SET_THROW );
+ return uno::Any( xWindow );
+}
+
+// ============================================================================
+
+namespace vbaeventshelper
+{
+namespace sdecl = comphelper::service_decl;
+sdecl::class_<ScVbaEventsHelper, sdecl::with_args<true> > serviceImpl;
+extern sdecl::ServiceDecl const serviceDecl(
+ serviceImpl,
+ "ScVbaEventsHelper",
+ "com.sun.star.script.vba.VBASpreadsheetEventProcessor" );
+}
+
+// ============================================================================
diff --git a/sc/source/ui/vba/vbaeventshelper.hxx b/sc/source/ui/vba/vbaeventshelper.hxx
new file mode 100755
index 000000000000..a77f5128b3e9
--- /dev/null
+++ b/sc/source/ui/vba/vbaeventshelper.hxx
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_VBAEVENTS_HXX
+#define SC_VBAEVENTS_HXX
+
+#include <rtl/ref.hxx>
+#include <vbahelper/vbaeventshelperbase.hxx>
+#include "excelvbahelper.hxx"
+#include "rangelst.hxx"
+
+namespace ooo { namespace vba { namespace excel { class XApplication; } } }
+
+class ScVbaEventsListener;
+
+// ============================================================================
+
+class ScVbaEventsHelper : public VbaEventsHelperBase
+{
+public:
+ ScVbaEventsHelper(
+ const css::uno::Sequence< css::uno::Any >& rArgs,
+ const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ virtual ~ScVbaEventsHelper();
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const css::lang::EventObject& rSource ) throw (css::uno::RuntimeException);
+
+protected:
+ virtual bool implEventsEnabled() throw (css::uno::RuntimeException);
+ virtual bool implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::uno::RuntimeException);
+ virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException);
+ virtual void implPostProcessEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, bool bSuccess, bool bCancel ) throw (css::uno::RuntimeException);
+ virtual ::rtl::OUString implGetDocumentModuleName( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) const throw (css::lang::IllegalArgumentException);
+
+private:
+ /** Extracts a sheet index from the first element of the passed sequence. The
+ element may be an integer, or a Calc range or ranges object. */
+ static SCTAB getTabFromArgs( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException);
+ /** Checks if selection has been changed compared to selection of last call.
+ @return true, if the selection has been changed. */
+ bool isSelectionChanged( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+
+ /** Creates a VBA Worksheet object (the argument must contain a sheet index). */
+ css::uno::Any createWorksheet( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+ /** Creates a VBA Range object (the argument must contain a UNO range or UNO range list). */
+ css::uno::Any createRange( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+ /** Creates a VBA Hyperlink object (the argument must contain a UNO cell). */
+ css::uno::Any createHyperlink( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+ /** Creates a VBA Window object. */
+ css::uno::Any createWindow() const throw (css::uno::RuntimeException);
+
+private:
+ mutable css::uno::WeakReference< ov::excel::XApplication > mxApplication;
+ ::rtl::Reference< ScVbaEventsListener > mxListener;
+ ScDocShell* mpDocShell;
+ ScDocument* mpDoc;
+ ScRangeList maOldSelection;
+ bool mbOpened;
+};
+
+// ============================================================================
+
+#endif
diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx
index 91d0429326dd..8dd67843ec00 100644
--- a/sc/source/ui/vba/vbaformatconditions.cxx
+++ b/sc/source/ui/vba/vbaformatconditions.cxx
@@ -45,11 +45,11 @@ static rtl::OUString FORMULA2( RTL_CONSTASCII_USTRINGPARAM("Formula2") );
static rtl::OUString STYLENAME( RTL_CONSTASCII_USTRINGPARAM("StyleName") );
static rtl::OUString sStyleNamePrefix( RTL_CONSTASCII_USTRINGPARAM("Excel_CondFormat") );
-ScVbaFormatConditions::ScVbaFormatConditions( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetConditionalEntries >& _xSheetConditionalEntries, const uno::Reference< frame::XModel >& xModel ) : ScVbaFormatConditions_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( _xSheetConditionalEntries, uno::UNO_QUERY_THROW ) ), mxSheetConditionalEntries( _xSheetConditionalEntries )
+ScVbaFormatConditions::ScVbaFormatConditions( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetConditionalEntries >& _xSheetConditionalEntries, const uno::Reference< frame::XModel >& /*xModel*/ ) : ScVbaFormatConditions_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( _xSheetConditionalEntries, uno::UNO_QUERY_THROW ) ), mxSheetConditionalEntries( _xSheetConditionalEntries )
{
mxRangeParent.set( xParent, uno::UNO_QUERY_THROW );
- uno::Reference< excel::XWorkbook > xWorkbook = new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), xContext, xModel );
- mxStyles.set( xWorkbook->Styles( uno::Any() ), uno::UNO_QUERY_THROW );
+ uno::Reference< excel::XApplication> xApp( Application(), uno::UNO_QUERY_THROW );
+ mxStyles.set( xApp->getThisWorkbook()->Styles( uno::Any() ), uno::UNO_QUERY_THROW );
uno::Reference< sheet::XCellRangeAddressable > xCellRange( mxRangeParent->getCellRange(), uno::UNO_QUERY_THROW );
mxParentRangePropertySet.set( xCellRange, uno::UNO_QUERY_THROW );
diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx
index 0cddacafd194..03f3ecd3c50c 100644
--- a/sc/source/ui/vba/vbaglobals.cxx
+++ b/sc/source/ui/vba/vbaglobals.cxx
@@ -233,6 +233,7 @@ ScVbaGlobals::getAvailableServiceNames( ) throw (uno::RuntimeException)
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Worksheet" ) ),
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Application" ) ),
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Hyperlink" ) ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.script.vba.VBASpreadsheetEventProcessor" ) )
};
sal_Int32 nExcelServices = ( sizeof( names )/ sizeof( names[0] ) );
sal_Int32 startIndex = serviceNames.getLength();
diff --git a/sc/source/ui/vba/vbaname.cxx b/sc/source/ui/vba/vbaname.cxx
index a6e8a402425f..464b167df250 100644
--- a/sc/source/ui/vba/vbaname.cxx
+++ b/sc/source/ui/vba/vbaname.cxx
@@ -232,10 +232,8 @@ ScVbaName::setRefersToR1C1Local( const ::rtl::OUString & rRefersTo ) throw (css:
css::uno::Reference< ov::excel::XRange >
ScVbaName::getRefersToRange() throw (css::uno::RuntimeException)
{
- // FIXME: pass proper Worksheet parent
uno::Reference< ov::excel::XRange > xRange = ScVbaRange::getRangeObjectForName(
- uno::Reference< XHelperInterface >(), mxContext,
- mxNamedRange->getName(), excel::getDocShell( mxModel ), formula::FormulaGrammar::CONV_XL_R1C1 );
+ mxContext, mxNamedRange->getName(), excel::getDocShell( mxModel ), formula::FormulaGrammar::CONV_XL_R1C1 );
return xRange;
}
diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx
index d074f32b689d..2304874bdb1b 100644
--- a/sc/source/ui/vba/vbanames.cxx
+++ b/sc/source/ui/vba/vbanames.cxx
@@ -48,7 +48,7 @@ class NamesEnumeration : public EnumerationHelperImpl
uno::WeakReference< XHelperInterface > m_xParent;
uno::Reference< sheet::XNamedRanges > m_xNames;
public:
- NamesEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel , const uno::Reference< sheet::XNamedRanges >& xNames ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), m_xModel( xModel ), m_xParent( xParent ), m_xNames( xNames ) {}
+ NamesEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel , const uno::Reference< sheet::XNamedRanges >& xNames ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel( xModel ), m_xParent( xParent ), m_xNames( xNames ) {}
virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
diff --git a/sc/source/ui/vba/vbapivottables.cxx b/sc/source/ui/vba/vbapivottables.cxx
index 05a4201da977..fcbf347a3cd4 100644
--- a/sc/source/ui/vba/vbapivottables.cxx
+++ b/sc/source/ui/vba/vbapivottables.cxx
@@ -42,7 +42,7 @@ uno::Any DataPilotToPivotTable( const uno::Any& aSource, uno::Reference< uno::XC
class PivotTableEnumeration : public EnumerationHelperImpl
{
public:
- PivotTableEnumeration( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ) {}
+ PivotTableEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ) {}
virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
@@ -59,7 +59,7 @@ uno::Reference< container::XEnumeration >
ScVbaPivotTables::createEnumeration() throw (uno::RuntimeException)
{
uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
- return new PivotTableEnumeration( mxContext, xEnumAccess->createEnumeration() );
+ return new PivotTableEnumeration( mxParent, mxContext, xEnumAccess->createEnumeration() );
}
uno::Any
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index ccf5a3bc5b54..b50199f025d0 100644..100755
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -202,11 +202,10 @@ double lcl_Round2DecPlaces( double nVal )
return nVal;
}
-uno::Any lcl_makeRange( uno::Reference< uno::XComponentContext >& xContext, const uno::Any aAny, bool bIsRows, bool bIsColumns )
+uno::Any lcl_makeRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Any aAny, bool bIsRows, bool bIsColumns )
{
uno::Reference< table::XCellRange > xCellRange( aAny, uno::UNO_QUERY_THROW );
- // #FIXME need proper (WorkSheet) parent
- return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< XHelperInterface >(), xContext, xCellRange, bIsRows, bIsColumns ) ) );
+ return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( xParent, xContext, xCellRange, bIsRows, bIsColumns ) ) );
}
uno::Reference< excel::XRange > lcl_makeXRangeFromSheetCellRanges( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSheetCellRanges >& xLocSheetCellRanges, ScDocShell* pDoc )
@@ -227,13 +226,11 @@ uno::Reference< excel::XRange > lcl_makeXRangeFromSheetCellRanges( const uno::Re
if ( aCellRanges.First() == aCellRanges.Last() )
{
uno::Reference< table::XCellRange > xTmpRange( new ScCellRangeObj( pDoc, *aCellRanges.First() ) );
- // #FIXME need proper (WorkSheet) parent
xRange = new ScVbaRange( xParent, xContext, xTmpRange );
}
else
{
uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDoc, aCellRanges ) );
- // #FIXME need proper (WorkSheet) parent
xRange = new ScVbaRange( xParent, xContext, xRanges );
}
}
@@ -269,12 +266,13 @@ SfxItemSet* ScVbaRange::getCurrentDataSet( ) throw ( uno::RuntimeException )
class SingleRangeEnumeration : public EnumerationHelper_BASE
{
+ uno::Reference< XHelperInterface > m_xParent;
uno::Reference< table::XCellRange > m_xRange;
uno::Reference< uno::XComponentContext > mxContext;
bool bHasMore;
public:
- SingleRangeEnumeration( const uno::Reference< css::uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange ) throw ( uno::RuntimeException ) : m_xRange( xRange ), mxContext( xContext ), bHasMore( true ) { }
+ SingleRangeEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange ) throw ( uno::RuntimeException ) : m_xParent( xParent ), m_xRange( xRange ), mxContext( xContext ), bHasMore( true ) { }
virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException) { return bHasMore; }
virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
@@ -292,11 +290,12 @@ typedef ::cppu::WeakImplHelper2< container::XIndexAccess, container::XEnumeratio
class SingleRangeIndexAccess : public SingleRange_BASE
{
private:
+ uno::Reference< XHelperInterface > mxParent;
uno::Reference< table::XCellRange > m_xRange;
uno::Reference< uno::XComponentContext > mxContext;
SingleRangeIndexAccess(); // not defined
public:
- SingleRangeIndexAccess( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange ):m_xRange( xRange ), mxContext( xContext ) {}
+ SingleRangeIndexAccess( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange ):mxParent( xParent ), m_xRange( xRange ), mxContext( xContext ) {}
// XIndexAccess
virtual ::sal_Int32 SAL_CALL getCount() throw (::uno::RuntimeException) { return 1; }
virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
@@ -310,7 +309,7 @@ public:
virtual ::sal_Bool SAL_CALL hasElements() throw (uno::RuntimeException) { return sal_True; }
// XEnumerationAccess
- virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration() throw (uno::RuntimeException) { return new SingleRangeEnumeration( mxContext, m_xRange ); }
+ virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration() throw (uno::RuntimeException) { return new SingleRangeEnumeration( mxParent, mxContext, m_xRange ); }
};
@@ -322,10 +321,10 @@ class RangesEnumerationImpl : public EnumerationHelperImpl
bool mbIsColumns;
public:
- RangesEnumerationImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, bool bIsRows, bool bIsColumns ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), mbIsRows( bIsRows ), mbIsColumns( bIsColumns ) {}
+ RangesEnumerationImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, bool bIsRows, bool bIsColumns ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mbIsRows( bIsRows ), mbIsColumns( bIsColumns ) {}
virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- return lcl_makeRange( m_xContext, m_xEnumeration->nextElement(), mbIsRows, mbIsColumns );
+ return lcl_makeRange( m_xParent, m_xContext, m_xEnumeration->nextElement(), mbIsRows, mbIsColumns );
}
};
@@ -335,7 +334,7 @@ class ScVbaRangeAreas : public ScVbaCollectionBaseImpl
bool mbIsRows;
bool mbIsColumns;
public:
- ScVbaRangeAreas( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess, bool bIsRows, bool bIsColumns ) : ScVbaCollectionBaseImpl( uno::Reference< XHelperInterface >(), xContext, xIndexAccess ), mbIsRows( bIsRows ), mbIsColumns( bIsColumns ) {}
+ ScVbaRangeAreas( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess, bool bIsRows, bool bIsColumns ) : ScVbaCollectionBaseImpl( xParent, xContext, xIndexAccess ), mbIsRows( bIsRows ), mbIsColumns( bIsColumns ) {}
// XEnumerationAccess
virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration() throw (uno::RuntimeException);
@@ -355,14 +354,13 @@ uno::Reference< container::XEnumeration > SAL_CALL
ScVbaRangeAreas::createEnumeration() throw (uno::RuntimeException)
{
uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
- return new RangesEnumerationImpl( mxContext, xEnumAccess->createEnumeration(), mbIsRows, mbIsColumns );
-
+ return new RangesEnumerationImpl( mxParent, mxContext, xEnumAccess->createEnumeration(), mbIsRows, mbIsColumns );
}
uno::Any
ScVbaRangeAreas::createCollectionObject( const uno::Any& aSource )
{
- return lcl_makeRange( mxContext, aSource, mbIsRows, mbIsColumns );
+ return lcl_makeRange( mxParent, mxContext, aSource, mbIsRows, mbIsColumns );
}
// assume that xIf is infact a ScCellRangesBase
@@ -618,6 +616,7 @@ public:
class CellsEnumeration : public CellsEnumeration_BASE
{
+ uno::WeakReference< XHelperInterface > mxParent;
uno::Reference< uno::XComponentContext > mxContext;
uno::Reference< XCollection > m_xAreas;
vCellPos m_CellPositions;
@@ -645,7 +644,7 @@ class CellsEnumeration : public CellsEnumeration_BASE
}
}
public:
- CellsEnumeration( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XCollection >& xAreas ): mxContext( xContext ), m_xAreas( xAreas )
+ CellsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XCollection >& xAreas ): mxParent( xParent ), mxContext( xContext ), m_xAreas( xAreas )
{
sal_Int32 nItems = m_xAreas->getCount();
for ( sal_Int32 index=1; index <= nItems; ++index )
@@ -664,8 +663,7 @@ public:
uno::Reference< table::XCellRange > xRangeArea = getArea( aPos.m_nArea );
uno::Reference< table::XCellRange > xCellRange( xRangeArea->getCellByPosition( aPos.m_nCol, aPos.m_nRow ), uno::UNO_QUERY_THROW );
- // #FIXME need proper (WorkSheet) parent
- return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, xCellRange ) ) );
+ return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( mxParent, mxContext, xCellRange ) ) );
}
};
@@ -1088,11 +1086,11 @@ public:
return uno::Reference< sheet::XSheetCellCursor >( getSpreadSheet()->createCursorByRange( getSheetCellRange() ), uno::UNO_QUERY_THROW );
}
- static uno::Reference< excel::XRange > createRangeFromRange( const uno::Reference<uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange, const uno::Reference< sheet::XCellRangeAddressable >& xCellRangeAddressable, sal_Int32 nStartColOffset = 0, sal_Int32 nStartRowOffset = 0,
- sal_Int32 nEndColOffset = 0, sal_Int32 nEndRowOffset = 0 )
+ static uno::Reference< excel::XRange > createRangeFromRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference<uno::XComponentContext >& xContext,
+ const uno::Reference< table::XCellRange >& xRange, const uno::Reference< sheet::XCellRangeAddressable >& xCellRangeAddressable,
+ sal_Int32 nStartColOffset = 0, sal_Int32 nStartRowOffset = 0, sal_Int32 nEndColOffset = 0, sal_Int32 nEndRowOffset = 0 )
{
- // #FIXME need proper (WorkSheet) parent
- return uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< XHelperInterface >(), xContext,
+ return uno::Reference< excel::XRange >( new ScVbaRange( xParent, xContext,
xRange->getCellRangeByPosition(
xCellRangeAddressable->getRangeAddress().StartColumn + nStartColOffset,
xCellRangeAddressable->getRangeAddress().StartRow + nStartRowOffset,
@@ -1178,7 +1176,7 @@ bool getScRangeListForAddress( const rtl::OUString& sName, ScDocShell* pDocSh, S
ScVbaRange*
-getRangeForName( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const rtl::OUString& sName, ScDocShell* pDocSh, table::CellRangeAddress& pAddr, formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1 ) throw ( uno::RuntimeException )
+getRangeForName( const uno::Reference< uno::XComponentContext >& xContext, const rtl::OUString& sName, ScDocShell* pDocSh, table::CellRangeAddress& pAddr, formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1 ) throw ( uno::RuntimeException )
{
ScRangeList aCellRanges;
ScRange refRange;
@@ -1189,10 +1187,13 @@ getRangeForName( const uno::Reference< XHelperInterface >& xParent, const uno::R
if ( aCellRanges.First() == aCellRanges.Last() )
{
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pDocSh, *aCellRanges.First() ) );
- return new ScVbaRange( xParent, xContext, xRange );
+ uno::Reference< XHelperInterface > xFixThisParent = excel::getUnoSheetModuleObj( xRange );
+ return new ScVbaRange( xFixThisParent, xContext, xRange );
}
uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDocSh, aCellRanges ) );
- return new ScVbaRange( xParent, xContext, xRanges );
+
+ uno::Reference< XHelperInterface > xFixThisParent = excel::getUnoSheetModuleObj( xRanges );
+ return new ScVbaRange( xFixThisParent, xContext, xRanges );
}
// ----------------------------------------------------------------------------
@@ -1284,12 +1285,12 @@ util::TriState lclGetMergedState( const uno::Reference< table::XCellRange >& rxC
// ----------------------------------------------------------------------------
css::uno::Reference< excel::XRange >
-ScVbaRange::getRangeObjectForName( const css::uno::Reference< ov::XHelperInterface >& xParent,
+ScVbaRange::getRangeObjectForName(
const uno::Reference< uno::XComponentContext >& xContext, const rtl::OUString& sRangeName,
ScDocShell* pDocSh, formula::FormulaGrammar::AddressConvention eConv ) throw ( uno::RuntimeException )
{
table::CellRangeAddress refAddr;
- return getRangeForName( xParent, xContext, sRangeName, pDocSh, refAddr, eConv );
+ return getRangeForName( xContext, sRangeName, pDocSh, refAddr, eConv );
}
@@ -1348,13 +1349,13 @@ ScVbaRange::ScVbaRange( uno::Sequence< uno::Any> const & args,
uno::Reference< container::XIndexAccess > xIndex;
if ( mxRange.is() )
{
- xIndex = new SingleRangeIndexAccess( mxContext, mxRange );
+ xIndex = new SingleRangeIndexAccess( mxParent, mxContext, mxRange );
}
else if ( mxRanges.is() )
{
xIndex.set( mxRanges, uno::UNO_QUERY_THROW );
}
- m_Areas = new ScVbaRangeAreas( mxContext, xIndex, mbIsRows, mbIsColumns );
+ m_Areas = new ScVbaRangeAreas( mxParent, mxContext, xIndex, mbIsRows, mbIsColumns );
}
ScVbaRange::ScVbaRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange, sal_Bool bIsRows, sal_Bool bIsColumns ) throw( lang::IllegalArgumentException )
@@ -1367,8 +1368,8 @@ ScVbaRange::ScVbaRange( const uno::Reference< XHelperInterface >& xParent, const
if ( !xRange.is() )
throw lang::IllegalArgumentException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "range is not set " ) ), uno::Reference< uno::XInterface >() , 1 );
- uno::Reference< container::XIndexAccess > xIndex( new SingleRangeIndexAccess( mxContext, xRange ) );
- m_Areas = new ScVbaRangeAreas( mxContext, xIndex, mbIsRows, mbIsColumns );
+ uno::Reference< container::XIndexAccess > xIndex( new SingleRangeIndexAccess( mxParent, mxContext, xRange ) );
+ m_Areas = new ScVbaRangeAreas( mxParent, mxContext, xIndex, mbIsRows, mbIsColumns );
}
@@ -1377,7 +1378,7 @@ ScVbaRange::ScVbaRange( const uno::Reference< XHelperInterface >& xParent, const
{
uno::Reference< container::XIndexAccess > xIndex( mxRanges, uno::UNO_QUERY_THROW );
- m_Areas = new ScVbaRangeAreas( mxContext, xIndex, mbIsRows, mbIsColumns );
+ m_Areas = new ScVbaRangeAreas( xParent, mxContext, xIndex, mbIsRows, mbIsColumns );
}
@@ -1806,11 +1807,11 @@ ScVbaRange::Offset( const ::uno::Any &nRowOff, const uno::Any &nColOff ) throw (
if ( aCellRanges.Count() > 1 ) // Multi-Area
{
uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pUnoRangesBase->GetDocShell(), aCellRanges ) );
- return new ScVbaRange( getParent(), mxContext, xRanges );
+ return new ScVbaRange( mxParent, mxContext, xRanges );
}
// normal range
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), *aCellRanges.First() ) );
- return new ScVbaRange( getParent(), mxContext, xRange );
+ return new ScVbaRange( mxParent, mxContext, xRange );
}
uno::Reference< excel::XRange >
@@ -1831,7 +1832,7 @@ ScVbaRange::CurrentRegion() throw (uno::RuntimeException)
helper.getSheetCellCursor();
xSheetCellCursor->collapseToCurrentRegion();
uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable(xSheetCellCursor, uno::UNO_QUERY_THROW);
- return RangeHelper::createRangeFromRange( mxContext, helper.getCellRangeFromSheet(), xCellRangeAddressable );
+ return RangeHelper::createRangeFromRange( mxParent, mxContext, helper.getCellRangeFromSheet(), xCellRangeAddressable );
}
uno::Reference< excel::XRange >
@@ -1851,7 +1852,7 @@ ScVbaRange::CurrentArray() throw (uno::RuntimeException)
helper.getSheetCellCursor();
xSheetCellCursor->collapseToCurrentArray();
uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable(xSheetCellCursor, uno::UNO_QUERY_THROW);
- return RangeHelper::createRangeFromRange( mxContext, helper.getCellRangeFromSheet(), xCellRangeAddressable );
+ return RangeHelper::createRangeFromRange( mxParent, mxContext, helper.getCellRangeFromSheet(), xCellRangeAddressable );
}
uno::Any
@@ -2069,7 +2070,7 @@ ScVbaRange::Cells( const uno::Any &nRowIndex, const uno::Any &nColumnIndex ) thr
uno::Reference< table::XCellRange > xSheetRange = thisRange.getCellRangeFromSheet();
if( !bIsIndex && !bIsColumnIndex ) // .Cells
// #FIXE needs proper parent ( Worksheet )
- return uno::Reference< excel::XRange >( new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, mxRange ) );
+ return uno::Reference< excel::XRange >( new ScVbaRange( mxParent, mxContext, mxRange ) );
sal_Int32 nIndex = --nRow;
if( bIsIndex && !bIsColumnIndex ) // .Cells(n)
@@ -2087,7 +2088,7 @@ ScVbaRange::Cells( const uno::Any &nRowIndex, const uno::Any &nColumnIndex ) thr
--nColumn;
nRow = nRow + thisRangeAddress.StartRow;
nColumn = nColumn + thisRangeAddress.StartColumn;
- return new ScVbaRange( getParent(), mxContext, xSheetRange->getCellRangeByPosition( nColumn, nRow, nColumn, nRow ) );
+ return new ScVbaRange( mxParent, mxContext, xSheetRange->getCellRangeByPosition( nColumn, nRow, nColumn, nRow ) );
}
void
@@ -2239,12 +2240,12 @@ ScVbaRange::Rows(const uno::Any& aIndex ) throw (uno::RuntimeException)
throw uno::RuntimeException( rtl::OUString::createFromAscii("Internal failure, illegal param"), uno::Reference< uno::XInterface >() );
// return a normal range ( even for multi-selection
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), aRange ) );
- return new ScVbaRange( getParent(), mxContext, xRange, true );
+ return new ScVbaRange( mxParent, mxContext, xRange, true );
}
// Rows() - no params
if ( m_Areas->getCount() > 1 )
- return new ScVbaRange( getParent(), mxContext, mxRanges, true );
- return new ScVbaRange( getParent(), mxContext, mxRange, true );
+ return new ScVbaRange( mxParent, mxContext, mxRanges, true );
+ return new ScVbaRange( mxParent, mxContext, mxRange, true );
}
uno::Reference< excel::XRange >
@@ -2286,9 +2287,8 @@ ScVbaRange::Columns(const uno::Any& aIndex ) throw (uno::RuntimeException)
throw uno::RuntimeException( rtl::OUString::createFromAscii("Internal failure, illegal param"), uno::Reference< uno::XInterface >() );
}
// Columns() - no params
- //return new ScVbaRange( getParent(), mxContext, mxRange, false, true );
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), aRange ) );
- return new ScVbaRange( getParent(), mxContext, xRange, false, true );
+ return new ScVbaRange( mxParent, mxContext, xRange, false, true );
}
void
@@ -2473,7 +2473,7 @@ ScVbaRange::Resize( const uno::Any &RowSize, const uno::Any &ColumnSize ) throw
xCursor->collapseToSize( nColumnSize, nRowSize );
uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable(xCursor, ::uno::UNO_QUERY_THROW );
uno::Reference< table::XCellRange > xRange( xSheetRange->getSpreadsheet(), ::uno::UNO_QUERY_THROW );
- return new ScVbaRange( getParent(), mxContext,xRange->getCellRangeByPosition(
+ return new ScVbaRange( mxParent, mxContext,xRange->getCellRangeByPosition(
xCellRangeAddressable->getRangeAddress().StartColumn,
xCellRangeAddressable->getRangeAddress().StartRow,
xCellRangeAddressable->getRangeAddress().EndColumn,
@@ -2563,7 +2563,6 @@ ScVbaRange::Range( const uno::Any &Cell1, const uno::Any &Cell2, bool bForceUseI
// xAddressable now for this range
xAddressable.set( xReferrer, uno::UNO_QUERY_THROW );
-
if( !Cell1.hasValue() )
throw uno::RuntimeException(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " Invalid Argument " ) ),
@@ -2580,7 +2579,7 @@ ScVbaRange::Range( const uno::Any &Cell1, const uno::Any &Cell2, bool bForceUseI
Cell1 >>= sName;
RangeHelper referRange( xReferrer );
table::CellRangeAddress referAddress = referRange.getCellRangeAddressable()->getRangeAddress();
- return getRangeForName( getParent(), mxContext, sName, getScDocShell(), referAddress );
+ return getRangeForName( mxContext, sName, getScDocShell(), referAddress );
}
else
@@ -2637,7 +2636,7 @@ ScVbaRange::Range( const uno::Any &Cell1, const uno::Any &Cell2, bool bForceUseI
}
}
- return new ScVbaRange( getParent(), mxContext, xCellRange );
+ return new ScVbaRange( mxParent, mxContext, xCellRange );
}
@@ -2772,10 +2771,10 @@ ScVbaRange::getEntireColumnOrRow( bool bColumn ) throw (uno::RuntimeException)
{
uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pUnoRangesBase->GetDocShell(), aCellRanges ) );
- return new ScVbaRange( getParent(), mxContext, xRanges, !bColumn, bColumn );
+ return new ScVbaRange( mxParent, mxContext, xRanges, !bColumn, bColumn );
}
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), *aCellRanges.First() ) );
- return new ScVbaRange( getParent(), mxContext, xRange, !bColumn, bColumn );
+ return new ScVbaRange( mxParent, mxContext, xRange, !bColumn, bColumn );
}
uno::Reference< excel::XRange > SAL_CALL
@@ -3121,7 +3120,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
uno::Reference< table::XCellRange > xCellRange( xInterface, uno::UNO_QUERY );
if ( xCellRange.is() )
{
- uno::Reference< excel::XRange > xResultRange = new ScVbaRange( this, mxContext, xCellRange );
+ uno::Reference< excel::XRange > xResultRange = new ScVbaRange( mxParent, mxContext, xCellRange );
if( xResultRange.is() )
{
xResultRange->Select();
@@ -3148,7 +3147,7 @@ uno::Reference< table::XCellRange > processKey( const uno::Any& Key, uno::Refere
table::CellRangeAddress aRefAddr;
if ( !pDocSh )
throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Range::Sort no docshell to calculate key param")), uno::Reference< uno::XInterface >() );
- xKeyRange = getRangeForName( uno::Reference< XHelperInterface >(), xContext, sRangeName, pDocSh, aRefAddr );
+ xKeyRange = getRangeForName( xContext, sRangeName, pDocSh, aRefAddr );
}
else
throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Range::Sort illegal type value for key param")), uno::Reference< uno::XInterface >() );
@@ -3582,7 +3581,7 @@ ScVbaRange::createEnumeration() throw (uno::RuntimeException)
return new ColumnsRowEnumeration( mxContext, xRange, nElems );
}
- return new CellsEnumeration( mxContext, m_Areas );
+ return new CellsEnumeration( mxParent, mxContext, m_Areas );
}
::rtl::OUString SAL_CALL
@@ -4073,15 +4072,14 @@ ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xC
uno::Reference< table::XCellRange > xRange = xReferrer->getReferredCells();
if ( xRange.is() )
{
- // #FIXME need proper (WorkSheet) parent
- uno::Reference< excel::XRange > xVbRange = new ScVbaRange( uno::Reference< XHelperInterface >(), xContext, xRange );
+ uno::Reference< excel::XRange > xVbRange = new ScVbaRange( excel::getUnoSheetModuleObj( xRange ), xContext, xRange );
return xVbRange;
}
}
}
uno::Reference< sheet::XSpreadsheetView > xView( getCurrentExcelDoc(xContext)->getCurrentController(), uno::UNO_QUERY );
uno::Reference< table::XCellRange > xSheetRange( xView->getActiveSheet(), uno::UNO_QUERY_THROW );
- ScVbaRange* pRange = new ScVbaRange( uno::Reference< XHelperInterface >(), xContext, xSheetRange );
+ ScVbaRange* pRange = new ScVbaRange( excel::getUnoSheetModuleObj( xSheetRange ), xContext, xSheetRange );
uno::Reference< excel::XRange > xVbSheetRange( pRange );
return pRange->Range( Cell1, Cell2, true );
}
@@ -4569,7 +4567,7 @@ ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& CopyOrigin ) throw (u
// After the insert ( this range ) actually has moved
ScRange aRange( static_cast< SCCOL >( thisAddress.StartColumn ), static_cast< SCROW >( thisAddress.StartRow ), static_cast< SCTAB >( thisAddress.Sheet ), static_cast< SCCOL >( thisAddress.EndColumn ), static_cast< SCROW >( thisAddress.EndRow ), static_cast< SCTAB >( thisAddress.Sheet ) );
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getDocShellFromRange( mxRange ) , aRange ) );
- uno::Reference< excel::XRange > xVbaRange( new ScVbaRange( getParent(), mxContext, xRange, mbIsRows, mbIsColumns ) );
+ uno::Reference< excel::XRange > xVbaRange( new ScVbaRange( mxParent, mxContext, xRange, mbIsRows, mbIsColumns ) );
xVbaRange->PasteSpecial( uno::Any(), uno::Any(), uno::Any(), uno::Any() );
}
}
@@ -4955,18 +4953,18 @@ ScVbaRange::MergeArea() throw (script::BasicErrorException, uno::RuntimeExceptio
if( aCellAddress.StartColumn ==0 && aCellAddress.EndColumn==0 &&
aCellAddress.StartRow==0 && aCellAddress.EndRow==0)
{
- return new ScVbaRange( getParent(),mxContext,mxRange );
+ return new ScVbaRange( mxParent,mxContext,mxRange );
}
else
{
ScRange refRange( static_cast< SCCOL >( aCellAddress.StartColumn ), static_cast< SCROW >( aCellAddress.StartRow ), static_cast< SCTAB >( aCellAddress.Sheet ),
static_cast< SCCOL >( aCellAddress.EndColumn ), static_cast< SCROW >( aCellAddress.EndRow ), static_cast< SCTAB >( aCellAddress.Sheet ) );
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getScDocShell() , refRange ) );
- return new ScVbaRange( getParent(),mxContext,xRange );
+ return new ScVbaRange( mxParent, mxContext,xRange );
}
}
}
- return new ScVbaRange( getParent(),mxContext,mxRange );
+ return new ScVbaRange( mxParent, mxContext, mxRange );
}
void SAL_CALL
@@ -5359,7 +5357,7 @@ ScVbaRange::PreviousNext( bool bIsPrevious )
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getScDocShell() , refRange ) );
- return new ScVbaRange( getParent(), mxContext, xRange );
+ return new ScVbaRange( mxParent, mxContext, xRange );
}
uno::Reference< excel::XRange > SAL_CALL
@@ -5442,13 +5440,11 @@ ScVbaRange::SpecialCells( const uno::Any& _oType, const uno::Any& _oValue) throw
if ( aCellRanges.First() == aCellRanges.Last() )
{
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getScDocShell(), *aCellRanges.First() ) );
- // #FIXME need proper (WorkSheet) parent
- return new ScVbaRange( getParent(), mxContext, xRange );
+ return new ScVbaRange( mxParent, mxContext, xRange );
}
uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( getScDocShell(), aCellRanges ) );
- // #FIXME need proper (WorkSheet) parent
- return new ScVbaRange( getParent(), mxContext, xRanges );
+ return new ScVbaRange( mxParent, mxContext, xRanges );
}
else if ( bIsSingleCell )
{
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index a9147a0d7840..e7488e434f30 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -145,7 +145,6 @@ public:
bool isSingleCellRange();
static css::uno::Reference< ov::excel::XRange > getRangeObjectForName(
- const css::uno::Reference< ov::XHelperInterface >& xParent,
const css::uno::Reference< css::uno::XComponentContext >& xContext,
const rtl::OUString& sRangeName, ScDocShell* pDocSh,
formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1 ) throw ( css::uno::RuntimeException );
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index 9f9c5dacd796..5298f60e0943 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -46,6 +46,10 @@
#include <com/sun/star/document/XTypeDetection.hpp>
#include <com/sun/star/uri/XUriReference.hpp>
#include <com/sun/star/uri/XUriReferenceFactory.hpp>
+#include <com/sun/star/script/vba/XVBACompatibility.hpp>
+#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
+#include <com/sun/star/script/ModuleInfo.hpp>
+#include <com/sun/star/script/ModuleType.hpp>
#include <sfx2/objsh.hxx>
#include <tools/urlobj.hxx>
@@ -56,21 +60,100 @@
#include <vbahelper/vbahelper.hxx>
#include <hash_map>
+#include <vector>
#include <osl/file.hxx>
using namespace ::ooo::vba;
using namespace ::com::sun::star;
const sal_Int16 CUSTOM_CHAR = 5;
+void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >& xDoc )
+{
+ uno::Reference< frame::XModel > xModel( xDoc, uno::UNO_QUERY );
+ ScDocShell* pShell = excel::getDocShell( xModel );
+ if ( pShell )
+ {
+ uno::Reference<script::XLibraryContainer> xLibContainer = pShell->GetBasicContainer();
+ uno::Reference<script::vba::XVBACompatibility> xVBACompat( xLibContainer, uno::UNO_QUERY_THROW );
+ xVBACompat->setVBACompatibilityMode( sal_True );
+ String aPrjName( RTL_CONSTASCII_USTRINGPARAM( "VBAProject" ) );
+ pShell->GetBasicManager()->SetName( aPrjName );
+
+ if( xLibContainer.is() )
+ {
+ if( !xLibContainer->hasByName( aPrjName ) )
+ xLibContainer->createLibrary( aPrjName );
+ uno::Any aLibAny = xLibContainer->getByName( aPrjName );
+ uno::Reference< container::XNameContainer > xLib;
+ aLibAny >>= xLib;
+ if( xLib.is() )
+ {
+ uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY_THROW );
+ uno::Reference< lang::XMultiServiceFactory> xSF( pShell->GetModel(), uno::UNO_QUERY_THROW);
+ // bootstrap vbaglobals
+ xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals")));
+ uno::Reference< container::XNameAccess > xVBACodeNamedObjectAccess( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAObjectModuleObjectProvider"))), uno::UNO_QUERY_THROW );
+ // set up the module info for the workbook and sheets in the nealy created
+ // spreadsheet
+ ScDocument* pDoc = pShell->GetDocument();
+ String sCodeName = pDoc->GetCodeName();
+ if ( sCodeName.Len() == 0 )
+ {
+ sCodeName = String( RTL_CONSTASCII_USTRINGPARAM("ThisWorkbook") );
+ pDoc->SetCodeName( sCodeName );
+ }
+
+ std::vector< rtl::OUString > sDocModuleNames;
+ sDocModuleNames.push_back( sCodeName );
+
+ uno::Reference<container::XNameAccess > xSheets( xDoc->getSheets(), uno::UNO_QUERY_THROW );
+ uno::Sequence< rtl::OUString > sSheets( xSheets->getElementNames() );
+
+ for ( sal_Int32 index=0; index < sSheets.getLength() ; ++index )
+ {
+ sDocModuleNames.push_back( sSheets[ index ] );
+ }
+
+ std::vector<rtl::OUString>::iterator it_end = sDocModuleNames.end();
+
+ for ( std::vector<rtl::OUString>::iterator it = sDocModuleNames.begin(); it != it_end; ++it )
+ {
+ script::ModuleInfo sModuleInfo;
+
+ sModuleInfo.ModuleObject.set( xVBACodeNamedObjectAccess->getByName( *it ), uno::UNO_QUERY );
+ sModuleInfo.ModuleType = script::ModuleType::DOCUMENT;
+ xVBAModuleInfo->insertModuleInfo( *it, sModuleInfo );
+ if( xLib->hasByName( *it ) )
+ xLib->replaceByName( *it, uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Option VBASupport 1\n") ) ) );
+ else
+ xLib->insertByName( *it, uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Option VBASupport 1\n" ) ) ) );
+ }
+ }
+ }
+ }
+}
+
static uno::Any
-getWorkbook( uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSpreadsheetDocument > &xDoc, const uno::Any& aApplication )
+getWorkbook( uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSpreadsheetDocument > &xDoc, const uno::Reference< XHelperInterface >& xParent )
{
// FIXME: fine as long as ScVbaWorkbook is stateless ...
uno::Reference< frame::XModel > xModel( xDoc, uno::UNO_QUERY );
if( !xModel.is() )
return uno::Any();
- ScVbaWorkbook *pWb = new ScVbaWorkbook( uno::Reference< XHelperInterface >( aApplication, uno::UNO_QUERY_THROW ), xContext, xModel );
+ ScDocShell* pShell = excel::getDocShell( xModel );
+ if ( pShell )
+ {
+ String sCodeName = pShell->GetDocument()->GetCodeName();
+ uno::Reference< uno::XInterface > xIf = getUnoDocModule( sCodeName, pShell );
+ if ( xIf.is() )
+ {
+ OSL_TRACE(" *** Returning Module uno Object *** ");
+ return uno::makeAny( xIf );
+ }
+ }
+
+ ScVbaWorkbook *pWb = new ScVbaWorkbook( xParent, xContext, xModel );
return uno::Any( uno::Reference< excel::XWorkbook > (pWb) );
}
@@ -78,12 +161,12 @@ class WorkBookEnumImpl : public EnumerationHelperImpl
{
uno::Any m_aApplication;
public:
- WorkBookEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Any& aApplication ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), m_aApplication( aApplication ) {}
+ WorkBookEnumImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Any& aApplication ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_aApplication( aApplication ) {}
virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
uno::Reference< sheet::XSpreadsheetDocument > xDoc( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
- return getWorkbook( m_xContext, xDoc, m_aApplication );
+ return getWorkbook( m_xContext, xDoc, m_xParent );
}
};
@@ -105,14 +188,14 @@ ScVbaWorkbooks::createEnumeration() throw (uno::RuntimeException)
// safer to create an enumeration based on this objects state
// rather than one effectively based of the desktop component
uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
- return new WorkBookEnumImpl( mxContext, xEnumerationAccess->createEnumeration(), Application() );
+ return new WorkBookEnumImpl( mxParent, mxContext, xEnumerationAccess->createEnumeration(), Application() );
}
uno::Any
ScVbaWorkbooks::createCollectionObject( const css::uno::Any& aSource )
{
uno::Reference< sheet::XSpreadsheetDocument > xDoc( aSource, uno::UNO_QUERY_THROW );
- return getWorkbook( mxContext, xDoc, Application() );
+ return getWorkbook( mxContext, xDoc, mxParent );
}
@@ -121,8 +204,10 @@ ScVbaWorkbooks::Add() throw (uno::RuntimeException)
{
uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( VbaDocumentsBase::Add() , uno::UNO_QUERY_THROW );
+ // need to set up the document modules ( and vba mode ) here
+ setUpDocumentModules( xSpreadDoc );
if( xSpreadDoc.is() )
- return getWorkbook( mxContext, xSpreadDoc, Application() );
+ return getWorkbook( mxContext, xSpreadDoc, mxParent );
return uno::Any();
}
@@ -249,7 +334,7 @@ ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLi
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Bad Format")), uno::Reference< uno::XInterface >() );
uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( VbaDocumentsBase::Open( rFileName, ReadOnly, sProps ), uno::UNO_QUERY_THROW );
- uno::Any aRet = getWorkbook( mxContext, xSpreadDoc, Application() );
+ uno::Any aRet = getWorkbook( mxContext, xSpreadDoc, mxParent );
uno::Reference< excel::XWorkbook > xWBook( aRet, uno::UNO_QUERY );
if ( xWBook.is() )
xWBook->Activate();
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 5b1963e3d242..4eab79813474 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -60,6 +60,7 @@
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun/star/form/XFormsSupplier.hpp>
#include <ooo/vba/excel/XlEnableSelection.hpp>
+#include <ooo/vba/excel/XWorkbook.hpp>
#include <ooo/vba/XControlProvider.hpp>
#include <comphelper/processfactory.hxx>
@@ -672,24 +673,26 @@ ScVbaWorksheet::Hyperlinks( const uno::Any& aIndex ) throw (uno::RuntimeExceptio
}
uno::Any SAL_CALL
+ScVbaWorksheet::Names( const css::uno::Any& aIndex ) throw (uno::RuntimeException)
+{
+ uno::Reference< excel::XWorkbook > xWorkbook( getParent(), uno::UNO_QUERY_THROW );
+ return xWorkbook->Names( aIndex );
+}
+
+uno::Any SAL_CALL
ScVbaWorksheet::OLEObjects( const uno::Any& Index ) throw (uno::RuntimeException)
{
- ScVbaOLEObjects* aOleObjects;
uno::Reference< sheet::XSpreadsheet > xSpreadsheet( getSheet(), uno::UNO_QUERY_THROW );
uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( xSpreadsheet, uno::UNO_QUERY_THROW );
uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPage, uno::UNO_QUERY_THROW );
- aOleObjects = new ScVbaOLEObjects( this, mxContext, xIndexAccess );
+ uno::Reference< excel::XOLEObjects >xOleObjects( new ScVbaOLEObjects( this, mxContext, xIndexAccess ) );
if( Index.hasValue() )
- {
- return aOleObjects->Item( Index, uno::Any() );
- }
- else
- {
- return uno::makeAny( uno::Reference< excel::XOLEObjects> ( aOleObjects ) );
- }
+ return xOleObjects->Item( Index, uno::Any() );
+ return uno::Any( xOleObjects );
}
+
uno::Any SAL_CALL
ScVbaWorksheet::Shapes( const uno::Any& aIndex ) throw (uno::RuntimeException)
{
diff --git a/sc/source/ui/vba/vbaworksheet.hxx b/sc/source/ui/vba/vbaworksheet.hxx
index d07cc1a8d55c..196a195258d7 100644
--- a/sc/source/ui/vba/vbaworksheet.hxx
+++ b/sc/source/ui/vba/vbaworksheet.hxx
@@ -129,6 +129,7 @@ public:
virtual css::uno::Any SAL_CALL PivotTables( const css::uno::Any& Index ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Comments( const css::uno::Any& Index ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Hyperlinks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Names( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL OLEObjects( const css::uno::Any& Index ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Shapes( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index 60cf7b904026..5344e6b3a9be 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -52,6 +52,7 @@
#include "vbaglobals.hxx"
#include "vbaworksheet.hxx"
#include "vbaworkbook.hxx"
+#include <unonames.hxx>
using namespace ::ooo::vba;
using namespace ::com::sun::star;
@@ -63,6 +64,27 @@ typedef ::cppu::WeakImplHelper3< container::XNameAccess, container::XIndexAccess
// (as added ) of the items
typedef std::vector< uno::Reference< sheet::XSpreadsheet > > SheetMap;
+
+// #FIXME #TODO the implementation of the Sheets collections sucks,
+// e.g. there is no support for tracking sheets added/removed from the collection
+
+uno::Reference< uno::XInterface >
+lcl_getModulAsUnoObject( const uno::Reference< sheet::XSpreadsheet >& xSheet, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException )
+{
+ uno::Reference< uno::XInterface > xRet;
+ if ( !xSheet.is() )
+ throw uno::RuntimeException();
+ uno::Reference< beans::XPropertySet > xProps( xSheet, uno::UNO_QUERY_THROW );
+ rtl::OUString sName;
+ xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_CODENAME ) ) ) >>= sName;
+
+ ScDocShell* pShell = excel::getDocShell( xModel );
+
+ if ( pShell )
+ xRet = getUnoDocModule( sName, pShell );
+ return xRet;
+}
+
class WorkSheetsEnumeration : public SheetEnumeration_BASE
{
SheetMap mSheetMap;
@@ -145,14 +167,24 @@ public:
class SheetsEnumeration : public EnumerationHelperImpl
{
uno::Reference< frame::XModel > m_xModel;
- uno::WeakReference< XHelperInterface > m_xParent;
public:
- SheetsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), m_xModel( xModel ), m_xParent( xParent ) {}
+ SheetsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel( xModel ) {}
virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
uno::Reference< sheet::XSpreadsheet > xSheet( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
- return uno::makeAny( uno::Reference< excel::XWorksheet > ( new ScVbaWorksheet( m_xParent, m_xContext, xSheet, m_xModel ) ) );
+ uno::Reference< uno::XInterface > xIf = lcl_getModulAsUnoObject( xSheet, m_xModel );
+ uno::Any aRet;
+ if ( !xIf.is() )
+ {
+ // if the Sheet is in a document created by the api unfortunately ( at the
+ // moment, it actually wont have the special Document modules
+ uno::Reference< excel::XWorksheet > xNewSheet( new ScVbaWorksheet( m_xParent, m_xContext, xSheet, m_xModel ) );
+ aRet <<= xNewSheet;
+ }
+ else
+ aRet <<= xIf;
+ return aRet;
}
};
@@ -188,7 +220,18 @@ uno::Any
ScVbaWorksheets::createCollectionObject( const uno::Any& aSource )
{
uno::Reference< sheet::XSpreadsheet > xSheet( aSource, uno::UNO_QUERY );
- return uno::makeAny( uno::Reference< excel::XWorksheet > ( new ScVbaWorksheet( getParent(), mxContext, xSheet, mxModel ) ) );
+ uno::Reference< XInterface > xIf = lcl_getModulAsUnoObject( xSheet, mxModel );
+ uno::Any aRet;
+ if ( !xIf.is() )
+ {
+ // if the Sheet is in a document created by the api unfortunately ( at the
+ // moment, it actually wont have the special Document modules
+ uno::Reference< excel::XWorksheet > xNewSheet( new ScVbaWorksheet( getParent(), mxContext, xSheet, mxModel ) );
+ aRet <<= xNewSheet;
+ }
+ else
+ aRet <<= xIf;
+ return aRet;
}
// XWorksheets
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index db72d87f30a2..0f07b8772254 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -69,6 +69,8 @@
#include <com/sun/star/sheet/MemberResultFlags.hpp>
#include <com/sun/star/awt/KeyModifier.hpp>
#include <com/sun/star/awt/MouseButton.hpp>
+#include <com/sun/star/script/vba/VBAEventId.hpp>
+#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
#include "gridwin.hxx"
#include "tabvwsh.hxx"
@@ -119,6 +121,7 @@
#include "tabprotection.hxx"
#include "postit.hxx"
#include "dpcontrol.hxx"
+#include "cellsuno.hxx"
#include "drawview.hxx"
#include <svx/sdrpagewindow.hxx>
@@ -366,6 +369,32 @@ void lcl_UnLockComment( ScDrawView* pView, SdrPageView* pPV, SdrModel* pDrDoc, c
}
}
+sal_Bool lcl_GetHyperlinkCell(ScDocument* pDoc, SCCOL& rPosX, SCROW& rPosY, SCTAB nTab, ScBaseCell*& rpCell )
+{
+ BOOL bFound = FALSE;
+ do
+ {
+ pDoc->GetCell( rPosX, rPosY, nTab, rpCell );
+ if ( !rpCell || rpCell->GetCellType() == CELLTYPE_NOTE )
+ {
+ if ( rPosX <= 0 )
+ return FALSE; // alles leer bis links
+ else
+ --rPosX; // weitersuchen
+ }
+ else if ( rpCell->GetCellType() == CELLTYPE_EDIT)
+ bFound = TRUE;
+ else if (rpCell->GetCellType() == CELLTYPE_FORMULA &&
+ static_cast<ScFormulaCell*>(rpCell)->IsHyperLinkCell())
+ bFound = TRUE;
+ else
+ return FALSE; // andere Zelle
+ }
+ while ( !bFound );
+
+ return bFound;
+}
+
// ---------------------------------------------------------------------------
// WB_DIALOGCONTROL noetig fuer UNO-Controls
ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhichPos )
@@ -2100,6 +2129,30 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
{
nMouseStatus = SC_GM_NONE; // keinen Doppelklick anfangen
ScGlobal::OpenURL( aUrl, aTarget );
+
+ // fire worksheet_followhyperlink event
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor();
+ if( xVbaEvents.is() ) try
+ {
+ Point aPos = rMEvt.GetPosPixel();
+ SCsCOL nPosX;
+ SCsROW nPosY;
+ SCTAB nTab = pViewData->GetTabNo();
+ pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
+ ScBaseCell* pCell = NULL;
+ if( lcl_GetHyperlinkCell( pDoc, nPosX, nPosY, nTab, pCell ) )
+ {
+ ScAddress aCellPos( nPosX, nPosY, nTab );
+ uno::Reference< table::XCell > xCell( new ScCellObj( pViewData->GetDocShell(), aCellPos ) );
+ uno::Sequence< uno::Any > aArgs(1);
+ aArgs[0] <<= xCell;
+ xVbaEvents->processVbaEvent( script::vba::VBAEventId::WORKSHEET_FOLLOWHYPERLINK, aArgs );
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+
return;
}
}
@@ -4818,26 +4871,9 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
ScDocument* pDoc = pDocSh->GetDocument();
ScBaseCell* pCell = NULL;
- BOOL bFound = FALSE;
- do
- {
- pDoc->GetCell( nPosX, nPosY, nTab, pCell );
- if ( !pCell || pCell->GetCellType() == CELLTYPE_NOTE )
- {
- if ( nPosX <= 0 )
- return FALSE; // alles leer bis links
- else
- --nPosX; // weitersuchen
- }
- else if ( pCell->GetCellType() == CELLTYPE_EDIT)
- bFound = TRUE;
- else if (pCell->GetCellType() == CELLTYPE_FORMULA &&
- static_cast<ScFormulaCell*>(pCell)->IsHyperLinkCell())
- bFound = TRUE;
- else
- return FALSE; // andere Zelle
- }
- while ( !bFound );
+ BOOL bFound = lcl_GetHyperlinkCell( pDoc, nPosX, nPosY, nTab, pCell );
+ if( !bFound )
+ return FALSE;
ScHideTextCursor aHideCursor( pViewData, eWhich ); // before GetEditArea (MapMode is changed)
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index f8b5c25c4a70..a64814d952ef 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -144,7 +144,7 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent&
Size aScrSize(nSizeX-1, nSizeY-1);
// Check if the mouse cursor is clicking on the popup arrow box.
- mpFilterButton.reset(new ScDPFieldButton(this, &GetSettings().GetStyleSettings(), &pViewData->GetZoomX(), &pViewData->GetZoomY()));
+ mpFilterButton.reset(new ScDPFieldButton(this, &GetSettings().GetStyleSettings(), &pViewData->GetZoomX(), &pViewData->GetZoomY(), pDoc));
mpFilterButton->setBoundingBox(aScrPos, aScrSize);
Point aPopupPos;
Size aPopupSize;
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index d8024e439173..ba73fbf00269 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -401,17 +401,13 @@ void __EXPORT ScGridWindow::Paint( const Rectangle& rRect )
nScrX += ScViewData::ToPixel( pDoc->GetColWidth( nX2, nTab ), nPPTX );
}
- long nScrY = ScViewData::ToPixel( pDoc->GetRowHeight( nY1, nTab ), nPPTY );
- while ( nScrY <= aPixRect.Top() && nY1 < MAXROW )
- {
- ++nY1;
- nScrY += ScViewData::ToPixel( pDoc->GetRowHeight( nY1, nTab ), nPPTY );
- }
+ long nScrY = 0;
+ ScViewData::AddPixelsWhile( nScrY, aPixRect.Top(), nY1, MAXROW, nPPTY, pDoc, nTab);
SCROW nY2 = nY1;
- while ( nScrY <= aPixRect.Bottom() && nY2 < MAXROW )
+ if (nScrY <= aPixRect.Bottom() && nY2 < MAXROW)
{
++nY2;
- nScrY += ScViewData::ToPixel( pDoc->GetRowHeight( nY2, nTab ), nPPTY );
+ ScViewData::AddPixelsWhile( nScrY, aPixRect.Bottom(), nY2, MAXROW, nPPTY, pDoc, nTab);
}
Draw( nX1,nY1,nX2,nY2, SC_UPDATE_MARKS ); // nicht weiterzeichnen
@@ -750,6 +746,15 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
if ( !bLogicText )
aOutputData.DrawStrings(FALSE); // in pixel MapMode
+ // edit cells and printer-metrics text must be before the buttons
+ // (DataPilot buttons contain labels in UI font)
+
+ pContentDev->SetMapMode(pViewData->GetLogicMode(eWhich));
+ if ( bLogicText )
+ aOutputData.DrawStrings(TRUE); // in logic MapMode if bTextWysiwyg is set
+ aOutputData.DrawEdit(TRUE);
+ pContentDev->SetMapMode(MAP_PIXEL);
+
// Autofilter- und Pivot-Buttons
DrawButtons( nX1, nY1, nX2, nY2, aTabInfo, pContentDev ); // Pixel
@@ -759,14 +764,6 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
if ( rOpts.GetOption( VOPT_NOTES ) )
aOutputData.DrawNoteMarks();
- // Edit-Zellen
-
- pContentDev->SetMapMode(pViewData->GetLogicMode(eWhich));
- if ( bLogicText )
- aOutputData.DrawStrings(TRUE); // in logic MapMode if bTextWysiwyg is set
- aOutputData.DrawEdit(TRUE);
-
- pContentDev->SetMapMode(MAP_PIXEL);
if ( !bGridFirst && ( bGrid || bPage ) )
{
aOutputData.DrawGrid( bGrid, bPage );
@@ -1208,14 +1205,14 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
{
aComboButton.SetOutputDevice( pContentDev );
- ScDPFieldButton aCellBtn(pContentDev, &GetSettings().GetStyleSettings(), &pViewData->GetZoomX(), &pViewData->GetZoomY());
+ ScDocument* pDoc = pViewData->GetDocument();
+ ScDPFieldButton aCellBtn(pContentDev, &GetSettings().GetStyleSettings(), &pViewData->GetZoomX(), &pViewData->GetZoomY(), pDoc);
SCCOL nCol;
SCROW nRow;
SCSIZE nArrY;
SCSIZE nQuery;
SCTAB nTab = pViewData->GetTabNo();
- ScDocument* pDoc = pViewData->GetDocument();
ScDBData* pDBData = NULL;
ScQueryParam* pQueryParam = NULL;
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 961572fc0185..7b27ddf3f8cc 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -489,6 +489,8 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
// Horizontale Linien
//
+ bool bHiddenRow = true;
+ SCROW nHiddenEndRow = -1;
nPosY = nScrY;
for (nArrY=1; nArrY+1<nArrCount; nArrY++)
{
@@ -503,9 +505,17 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
{
for (SCROW i = nYplus1; i <= MAXROW; ++i)
{
+ if (i > nHiddenEndRow)
+ bHiddenRow = pDoc->RowHidden(i, nTab, nHiddenEndRow);
+ /* TODO: optimize the row break thing for large hidden
+ * segments where HasRowBreak() has to be called
+ * nevertheless for each row, as a row break is drawn also
+ * for hidden rows, above them. This needed to be done only
+ * once per hidden segment, maybe giving manual breaks
+ * priority. Something like GetNextRowBreak() and
+ * GetNextManualRowBreak(). */
nBreak = pDoc->HasRowBreak(i, nTab);
- bool bHidden = pDoc->RowHidden(i, nTab);
- if (nBreak || !bHidden)
+ if (!bHiddenRow || nBreak)
break;
}
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index b0b040f9b5e0..6d40d304fb13 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -171,12 +171,11 @@ public:
private:
void SetHashText();
- long GetMaxDigitWidth();
+ long GetMaxDigitWidth(); // in logic units
long GetSignWidth();
long GetDotWidth();
long GetExpWidth();
void TextChanged();
- long ConvertWidthLogicToPixel( long nWidth ) const;
};
//==================================================================
@@ -518,6 +517,10 @@ void ScDrawStringsVars::SetHashText()
void ScDrawStringsVars::SetTextToWidthOrHash( ScBaseCell* pCell, long nWidth )
{
+ // #i113045# do the single-character width calculations in logic units
+ if (bPixelToLogic)
+ nWidth = pOutput->pRefDevice->PixelToLogic(Size(nWidth,0)).Width();
+
if (!pCell)
return;
@@ -565,6 +568,12 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScBaseCell* pCell, long nWidth )
else if (c == sal_Unicode('E'))
++nExpCount;
}
+
+ // #i112250# A small value might be formatted as "0" when only counting the digits,
+ // but fit into the column when considering the smaller width of the decimal separator.
+ if (aString.EqualsAscii("0") && fVal != 0.0)
+ nDecimalCount = 1;
+
if (nDecimalCount)
nWidth += (nMaxDigit - GetDotWidth()) * nDecimalCount;
if (nSignCount)
@@ -582,10 +591,6 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScBaseCell* pCell, long nWidth )
}
long nActualTextWidth = pOutput->pFmtDevice->GetTextWidth(aString);
-
- if (bPixelToLogic)
- nActualTextWidth = ConvertWidthLogicToPixel(nActualTextWidth);
-
if (nActualTextWidth > nWidth)
{
// Even after the decimal adjustment the text doesn't fit. Give up.
@@ -594,6 +599,7 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScBaseCell* pCell, long nWidth )
}
TextChanged();
+ pLastCell = NULL; // #i113022# equal cell and format in another column may give different string
}
void ScDrawStringsVars::SetAutoText( const String& rAutoText )
@@ -638,9 +644,6 @@ long ScDrawStringsVars::GetMaxDigitWidth()
long n = pOutput->pFmtDevice->GetTextWidth(String(cDigit));
nMaxDigitWidth = ::std::max(nMaxDigitWidth, n);
}
-
- if (bPixelToLogic)
- nMaxDigitWidth = ConvertWidthLogicToPixel(nMaxDigitWidth);
return nMaxDigitWidth;
}
@@ -650,8 +653,6 @@ long ScDrawStringsVars::GetSignWidth()
return nSignWidth;
nSignWidth = pOutput->pFmtDevice->GetTextWidth(String('-'));
- if (bPixelToLogic)
- nSignWidth = ConvertWidthLogicToPixel(nSignWidth);
return nSignWidth;
}
@@ -662,8 +663,6 @@ long ScDrawStringsVars::GetDotWidth()
const ::rtl::OUString& sep = ScGlobal::GetpLocaleData()->getLocaleItem().decimalSeparator;
nDotWidth = pOutput->pFmtDevice->GetTextWidth(sep);
- if (bPixelToLogic)
- nDotWidth = ConvertWidthLogicToPixel(nDotWidth);
return nDotWidth;
}
@@ -673,8 +672,6 @@ long ScDrawStringsVars::GetExpWidth()
return nExpWidth;
nExpWidth = pOutput->pFmtDevice->GetTextWidth(String('E'));
- if (bPixelToLogic)
- nExpWidth = ConvertWidthLogicToPixel(nExpWidth);
return nExpWidth;
}
@@ -704,13 +701,6 @@ void ScDrawStringsVars::TextChanged()
aTextSize = pRefDevice->LogicToPixel( aTextSize );
}
-long ScDrawStringsVars::ConvertWidthLogicToPixel( long nWidth ) const
-{
- Size aSize(nWidth, pOutput->pFmtDevice->GetTextHeight());
- aSize = pOutput->pRefDevice->LogicToPixel(aSize);
- return aSize.Width();
-}
-
BOOL ScDrawStringsVars::HasEditCharacters() const
{
static const sal_Unicode pChars[] =
diff --git a/sc/source/ui/view/prevwsh2.cxx b/sc/source/ui/view/prevwsh2.cxx
index 07af90f797aa..84868b5377de 100644
--- a/sc/source/ui/view/prevwsh2.cxx
+++ b/sc/source/ui/view/prevwsh2.cxx
@@ -126,10 +126,6 @@
//#define _GRAPH_HXX
#define _SOUND_HXX
-#if defined WIN
-#define _MENUBTN_HXX
-#endif
-
//svtools
#define _SCRWIN_HXX
#define _RULER_HXX
diff --git a/sc/source/ui/view/scextopt.cxx b/sc/source/ui/view/scextopt.cxx
index 1faa105d2bd7..d5816ecdd289 100644
--- a/sc/source/ui/view/scextopt.cxx
+++ b/sc/source/ui/view/scextopt.cxx
@@ -197,20 +197,27 @@ ScExtTabSettings& ScExtDocOptions::GetOrCreateTabSettings( SCTAB nTab )
return mxImpl->maTabSett.GetOrCreateTabSettings( nTab );
}
-size_t ScExtDocOptions::GetCodeNameCount() const
+SCTAB ScExtDocOptions::GetCodeNameCount() const
{
- return mxImpl->maCodeNames.size();
+ return static_cast< SCTAB >( mxImpl->maCodeNames.size() );
}
-const String& ScExtDocOptions::GetCodeName( size_t nIdx ) const
+const String& ScExtDocOptions::GetCodeName( SCTAB nTab ) const
{
- DBG_ASSERT( nIdx < GetCodeNameCount(), "ScExtDocOptions::GetCodeName - invalid index" );
- return (nIdx < GetCodeNameCount()) ? mxImpl->maCodeNames[ nIdx ] : EMPTY_STRING;
+ DBG_ASSERT( (0 <= nTab) && (nTab < GetCodeNameCount()), "ScExtDocOptions::GetCodeName - invalid sheet index" );
+ return ((0 <= nTab) && (nTab < GetCodeNameCount())) ? mxImpl->maCodeNames[ static_cast< size_t >( nTab ) ] : EMPTY_STRING;
}
-void ScExtDocOptions::AppendCodeName( const String& rCodeName )
+void ScExtDocOptions::SetCodeName( SCTAB nTab, const String& rCodeName )
{
- mxImpl->maCodeNames.push_back( rCodeName );
+ DBG_ASSERT( nTab >= 0, "ScExtDocOptions::SetCodeName - invalid sheet index" );
+ if( nTab >= 0 )
+ {
+ size_t nIndex = static_cast< size_t >( nTab );
+ if( nIndex >= mxImpl->maCodeNames.size() )
+ mxImpl->maCodeNames.resize( nIndex + 1 );
+ mxImpl->maCodeNames[ nIndex ] = rCodeName;
+ }
}
// ============================================================================
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 86f68a1878cc..90bfe0c24e5c 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1682,6 +1682,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
}
TabChanged(); // DrawView
+
aViewData.GetViewShell()->WindowChanged(); // falls das aktive Fenster anders ist
if ( !bUnoRefDialog )
aViewData.GetViewShell()->DisconnectAllClients(); // important for floating frames
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index c034836d4d4a..7b35328f68bb 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1696,50 +1696,32 @@ SCROW ScViewData::CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, USHO
if (pView)
((ScViewData*)this)->aScrSize.Height() = pView->GetGridHeight(eWhichY);
- SCROW nY;
- USHORT nScrPosY = 0;
-
if (nScrSizeY == SC_SIZE_NONE) nScrSizeY = (USHORT) aScrSize.Height();
- if (nDir==1)
- nY = nPosY; // vorwaerts
- else
- nY = nPosY-1; // rueckwaerts
-
- BOOL bOut = FALSE;
- for ( ; nScrPosY<=nScrSizeY && !bOut; nY+=nDir )
- {
- SCsROW nRowNo = nY;
- if ( nRowNo < 0 || nRowNo > MAXROW )
- bOut = TRUE;
- else
- {
- USHORT nTSize = pDoc->GetRowHeight( nRowNo, nTabNo );
- if (nTSize)
- {
- long nSizeYPix = ToPixel( nTSize, nPPTY );
- nScrPosY = sal::static_int_cast<USHORT>( nScrPosY + (USHORT) nSizeYPix );
- }
- else if ( nDir == 1 && nRowNo < MAXROW )
- {
- // skip multiple hidden rows (forward only for now)
- SCROW nNext = pDoc->FirstVisibleRow(nRowNo + 1, MAXROW, nTabNo);
- if ( nNext > MAXROW )
- {
- // same behavior as without the optimization: set bOut with nY=MAXROW+1
- nY = MAXROW+1;
- bOut = TRUE;
- }
- else
- nY = nNext - 1; // +=nDir advances to next visible row
- }
- }
- }
+ SCROW nY;
if (nDir==1)
+ {
+ // forward
+ nY = nPosY;
+ long nScrPosY = 0;
+ AddPixelsWhile( nScrPosY, nScrSizeY, nY, MAXROW, nPPTY, pDoc, nTabNo);
+ // Original loop ended on last evaluated +1 or if that was MAXROW even
+ // on MAXROW+2.
+ nY += (nY == MAXROW ? 2 : 1);
nY -= nPosY;
+ }
else
+ {
+ // backward
+ nY = nPosY-1;
+ long nScrPosY = 0;
+ AddPixelsWhileBackward( nScrPosY, nScrSizeY, nY, 0, nPPTY, pDoc, nTabNo);
+ // Original loop ended on last evaluated -1 or if that was 0 even on
+ // -2.
+ nY -= (nY == 0 ? 2 : 1);
nY = (nPosY-1)-nY;
+ }
if (nY>0) --nY;
return nY;
@@ -1855,16 +1837,10 @@ BOOL ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
}
if (nClickY > 0)
- {
- while ( rPosY<=MAXROW && nClickY >= nScrY )
- {
- nScrY += ToPixel( pDoc->GetRowHeight( rPosY, nTabNo ), nPPTY );
- ++rPosY;
- }
- --rPosY;
- }
+ AddPixelsWhile( nScrY, nClickY, rPosY, MAXROW, nPPTY, pDoc, nTabNo );
else
{
+ /* TODO: could need some "SubPixelsWhileBackward" method */
while ( rPosY>0 && nClickY < nScrY )
{
--rPosY;
@@ -1984,20 +1960,24 @@ void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY )
SCROW nOldPosY = pThisTab->nPosY[eWhich];
long nTPosY = pThisTab->nTPosY[eWhich];
long nPixPosY = pThisTab->nPixPosY[eWhich];
- SCROW i;
+ SCROW i, nHeightEndRow;
if ( nNewPosY > nOldPosY )
for ( i=nOldPosY; i<nNewPosY; i++ )
{
- long nThis = pDoc->GetRowHeight( i,nTabNo );
- nTPosY -= nThis;
- nPixPosY -= ToPixel(sal::static_int_cast<USHORT>(nThis), nPPTY);
+ long nThis = pDoc->GetRowHeight( i, nTabNo, NULL, &nHeightEndRow );
+ SCROW nRows = std::min( nNewPosY, nHeightEndRow + 1) - i;
+ i = nHeightEndRow;
+ nTPosY -= nThis * nRows;
+ nPixPosY -= ToPixel(sal::static_int_cast<USHORT>(nThis), nPPTY) * nRows;
}
else
for ( i=nNewPosY; i<nOldPosY; i++ )
{
- long nThis = pDoc->GetRowHeight( i,nTabNo );
- nTPosY += nThis;
- nPixPosY += ToPixel(sal::static_int_cast<USHORT>(nThis), nPPTY);
+ long nThis = pDoc->GetRowHeight( i, nTabNo, NULL, &nHeightEndRow );
+ SCROW nRows = std::min( nOldPosY, nHeightEndRow + 1) - i;
+ i = nHeightEndRow;
+ nTPosY += nThis * nRows;
+ nPixPosY += ToPixel(sal::static_int_cast<USHORT>(nThis), nPPTY) * nRows;
}
pThisTab->nPosY[eWhich] = nNewPosY;
@@ -3118,5 +3098,82 @@ ScAddress ScViewData::GetCurPos() const
}
+// static
+void ScViewData::AddPixelsWhile( long & rScrY, long nEndPixels, SCROW & rPosY,
+ SCROW nEndRow, double nPPTY, const ScDocument * pDoc, SCTAB nTabNo )
+{
+ SCROW nRow = rPosY;
+ while (rScrY <= nEndPixels && nRow <= nEndRow)
+ {
+ SCROW nHeightEndRow;
+ USHORT nHeight = pDoc->GetRowHeight( nRow, nTabNo, NULL, &nHeightEndRow);
+ if (nHeightEndRow > nEndRow)
+ nHeightEndRow = nEndRow;
+ if (!nHeight)
+ nRow = nHeightEndRow + 1;
+ else
+ {
+ SCROW nRows = nHeightEndRow - nRow + 1;
+ sal_Int64 nPixel = ToPixel( nHeight, nPPTY);
+ sal_Int64 nAdd = nPixel * nRows;
+ if (nAdd + rScrY > nEndPixels)
+ {
+ sal_Int64 nDiff = rScrY + nAdd - nEndPixels;
+ nRows -= static_cast<SCROW>(nDiff / nPixel);
+ nAdd = nPixel * nRows;
+ // We're looking for a value that satisfies loop condition.
+ if (nAdd + rScrY <= nEndPixels)
+ {
+ ++nRows;
+ nAdd += nPixel;
+ }
+ }
+ rScrY += static_cast<long>(nAdd);
+ nRow += nRows;
+ }
+ }
+ if (nRow > rPosY)
+ --nRow;
+ rPosY = nRow;
+}
+// static
+void ScViewData::AddPixelsWhileBackward( long & rScrY, long nEndPixels,
+ SCROW & rPosY, SCROW nStartRow, double nPPTY, const ScDocument * pDoc,
+ SCTAB nTabNo )
+{
+ SCROW nRow = rPosY;
+ while (rScrY <= nEndPixels && nRow >= nStartRow)
+ {
+ SCROW nHeightStartRow;
+ USHORT nHeight = pDoc->GetRowHeight( nRow, nTabNo, &nHeightStartRow, NULL);
+ if (nHeightStartRow < nStartRow)
+ nHeightStartRow = nStartRow;
+ if (!nHeight)
+ nRow = nHeightStartRow - 1;
+ else
+ {
+ SCROW nRows = nRow - nHeightStartRow + 1;
+ sal_Int64 nPixel = ToPixel( nHeight, nPPTY);
+ sal_Int64 nAdd = nPixel * nRows;
+ if (nAdd + rScrY > nEndPixels)
+ {
+ sal_Int64 nDiff = nAdd + rScrY - nEndPixels;
+ nRows -= static_cast<SCROW>(nDiff / nPixel);
+ nAdd = nPixel * nRows;
+ // We're looking for a value that satisfies loop condition.
+ if (nAdd + rScrY <= nEndPixels)
+ {
+ ++nRows;
+ nAdd += nPixel;
+ }
+ }
+ rScrY += static_cast<long>(nAdd);
+ nRow -= nRows;
+ }
+ }
+ if (nRow < rPosY)
+ ++nRow;
+ rPosY = nRow;
+}
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 34fbbfdad5b5..a125cbea6f50 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -28,8 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-
-
// INCLUDE ---------------------------------------------------------------
#include "scitems.hxx"
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 24fab9ac2eba..3104b7ed8b8f 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -34,10 +34,6 @@
#define _SV_NOXSOUND
-#ifdef WIN
- #define _MENUBTN_HXX
-#endif
-
#define _BASE_DLGS_HXX
#define _BIGINT_HXX
#define _CACHESTR_HXX
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
index 855db09ff50c..a6b772cca012 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -92,6 +92,7 @@
<menu:menuitem menu:id=".uno:Move"/>
<menu:menuitem menu:id=".uno:SelectTables"/>
<menu:menuitem menu:id=".uno:Remove"/>
+ <menu:menuitem menu:id=".uno:TableEvents"/>
</menu:menupopup>
</menu:menu>
<menu:menu menu:id=".uno:DelBreakMenu">
diff --git a/sc/uiconfig/scalc/toolbar/findbar.xml b/sc/uiconfig/scalc/toolbar/findbar.xml
index 9ef9d8a1a78f..0338d3156195 100644
--- a/sc/uiconfig/scalc/toolbar/findbar.xml
+++ b/sc/uiconfig/scalc/toolbar/findbar.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find &amp; Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/>
+ <toolbar:toolbaritem xlink:href=".uno:FindText"/>
+ <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
+ <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
+ <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:visible="false"/>
</toolbar:toolbar>
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index a7c1f2826381..5ed8c9739f9c 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -43,6 +43,8 @@ Module gid_Module_Root_Brand
gid_Brand_Dir_Share_C05_Faq,
gid_Brand_Dir_Share_Config,
gid_Brand_Dir_Share_Extension,
+ gid_Brand_Dir_Share_Extensions,
+ gid_Brand_Dir_Share_Prereg,
gid_Brand_Dir_Share_Uno_Packages,
gid_Brand_Dir_Share_Uno_Packages_Cache,
gid_Brand_Dir_Share_Registry,
@@ -97,7 +99,8 @@ Module gid_Module_Root_Brand
gid_Brand_File_Share_Xdg_Printeradmin,
gid_Brand_File_Share_Xdg_QStart,
gid_Brand_File_Share_Xdg_StartCenter,
- gid_Brand_File_Share_Xdg_Writer);
+ gid_Brand_File_Share_Xdg_Writer,
+ gid_Brand_File_Txt_Package);
Unixlinks = (gid_Brand_Unixlink_BasisLink,
gid_Brand_Unixlink_Program,
gid_Brand_Unixlink_Unopkg,
@@ -221,6 +224,12 @@ Directory gid_Brand_Dir_Share_Extensions
DosName = "extensions";
End
+Directory gid_Brand_Dir_Share_Prereg
+ ParentID = gid_Brand_Dir_Share;
+ DosName = "prereg";
+ Styles = (CREATE);
+End
+
Directory gid_Brand_Dir_Share_Extensions_Install
ParentID = gid_Brand_Dir_Share_Extension;
DosName = "install";
@@ -644,6 +653,13 @@ File gid_Brand_File_Images_Brand_Zip
Styles = (PACKED);
End
+File gid_Brand_File_Txt_Package
+ TXT_FILE_BODY;
+ Dir = gid_Brand_Dir_Share_Extensions;
+ Name = "package.txt";
+ Styles = (PACKED);
+End
+
File gid_Brand_File_Share_Registry_Brand_Xcd
TXT_FILE_BODY;
Styles = (PACKED, SCPZIP_REPLACE);
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index d930b2dc9fa2..0d50e685d449 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -1672,6 +1672,7 @@ File gid_File_Lib_Migrationoo2
#endif
End
+#ifndef SYSTEM_LIBTEXTCAT
File gid_File_Lib_Libtextcat
TXT_FILE_BODY;
Styles = (PACKED);
@@ -1682,6 +1683,7 @@ File gid_File_Lib_Libtextcat
Name = "libtextcat.dll";
#endif
End
+#endif
STD_UNO_LIB_FILE( gid_File_Lib_Guesslang, guesslang )
diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp
index a600c135de01..66cb1d60f476 100644..100755
--- a/scp2/source/ooo/file_ooo.scp
+++ b/scp2/source/ooo/file_ooo.scp
@@ -523,6 +523,7 @@ STD_JAR_FILE( gid_File_Jar_Saxon, saxon9 )
#endif
#endif
+#ifndef SYSTEM_LIBTEXTCAT_DATA
// fingerprint files (lm)
File gid_File_Conf_Fpdb
@@ -1036,7 +1037,7 @@ File gid_File_Lm_Zulu
Dir = gid_Dir_Share_Fingerprint;
Styles = (PACKED);
End
-
+#endif
// mod files
diff --git a/scp2/source/ooo/file_resource_ooo.scp b/scp2/source/ooo/file_resource_ooo.scp
index 5e4a2b0ff089..9f2b40614392 100644
--- a/scp2/source/ooo/file_resource_ooo.scp
+++ b/scp2/source/ooo/file_resource_ooo.scp
@@ -98,7 +98,6 @@ STD_RES_FILE( gid_File_Res_Sb, sb )
STD_RES_FILE( gid_File_Res_Svs, svs )
STD_RES_FILE( gid_File_Res_Svt, svt )
-STD_RES_FILE_ONLY( gid_File_Res_Svp, svp )
STD_RES_FILE( gid_File_Res_Svx, svx )
STD_RES_FILE( gid_File_Res_Editeng, editeng )
diff --git a/scp2/source/ooo/makefile.mk b/scp2/source/ooo/makefile.mk
index a671447b5758..cf5751ba45e6 100644
--- a/scp2/source/ooo/makefile.mk
+++ b/scp2/source/ooo/makefile.mk
@@ -237,6 +237,14 @@ SCPDEFS+=-DDISABLE_ATL
SCPDEFS+=-DSYSTEM_PYTHON
.ENDIF
+.IF "$(SYSTEM_LIBTEXTCAT)" == "YES"
+SCPDEFS+=-DSYSTEM_LIBTEXTCAT
+.ENDIF
+
+.IF "$(SYSTEM_LIBTEXTCAT_DATA)" != ""
+SCPDEFS+=-DSYSTEM_LIBTEXTCAT_DATA
+.ENDIF
+
.IF "$(ENABLE_SVCTAGS)" == "YES"
SCPDEFS+=-DENABLE_SVCTAGS
.ENDIF
diff --git a/scp2/source/ooo/profileitem_ooo.scp b/scp2/source/ooo/profileitem_ooo.scp
index 9818d5b26749..724316ba6f5e 100644
--- a/scp2/source/ooo/profileitem_ooo.scp
+++ b/scp2/source/ooo/profileitem_ooo.scp
@@ -461,4 +461,3 @@ ProfileItem gid_Basis_Profileitem_Version_Ooopackageversion
Key = "OOOPackageVersion";
Value = "${OOOPACKAGEVERSION}";
End
-
diff --git a/scp2/source/ooo/windowscustomaction_ooo.scp b/scp2/source/ooo/windowscustomaction_ooo.scp
index 568b3996a8b7..7bd6c18fae99 100755
--- a/scp2/source/ooo/windowscustomaction_ooo.scp
+++ b/scp2/source/ooo/windowscustomaction_ooo.scp
@@ -199,6 +199,25 @@ WindowsCustomAction gid_Customaction_Shellextensionsdll7
Assignment1 = ("InstallExecuteSequence", "REMOVE=\"ALL\" And Not PATCH", "InstallValidate");
End
+WindowsCustomAction gid_Customaction_Register_Extensions
+ Name = "RegisterExtensions";
+ Typ = "65";
+ Source = "shlxtmsi.dll";
+ Target = "RegisterExtensions";
+ Inbinarytable = 1;
+ Assignment1 = ("InstallExecuteSequence", "Not REMOVE=\"ALL\"", "end");
+ Assignment2 = ("AdminExecuteSequence", "Not REMOVE=\"ALL\"", "end");
+End
+
+WindowsCustomAction gid_Customaction_Remove_Extensions
+ Name = "RemoveExtensions";
+ Typ = "65";
+ Source = "shlxtmsi.dll";
+ Target = "RemoveExtensions";
+ Inbinarytable = 1;
+ Assignment1 = ("InstallExecuteSequence", "REMOVE=\"ALL\" And Not PATCH", "FileCost");
+End
+
WindowsCustomAction gid_Customaction_Set_Admininstall
Name = "SetAdminInstallProperty";
Typ = "65";
@@ -287,6 +306,16 @@ WindowsCustomAction gid_Customaction_Patch_InstallExchangeFiles
Assignment2 = ("AdminExecuteSequence", "", "behind_InstallFinalize");
End
+WindowsCustomAction gid_Customaction_Langpack_Register_Extensions
+ Name = "RegisterExtensions";
+ Typ = "65";
+ Source = "lngpckinsthlp.dll";
+ Target = "RegisterExtensions";
+ Inbinarytable = 1;
+ Assignment1 = ("InstallExecuteSequence", "", "end");
+ Assignment2 = ("AdminExecuteSequence", "", "end");
+End
+
WindowsCustomAction gid_Customaction_Patch_SetFeatureState
Name = "SetFeatureState";
Typ = "65";
@@ -401,6 +430,16 @@ WindowsCustomAction gid_Customaction_MigrateInstallPath
Assignment2 = ("InstallUISequence", "Not REMOVE=\"ALL\" And Not PATCH", "CostInitialize");
End
+WindowsCustomAction gid_Customaction_CompleteInstallPath
+ Name = "CompleteInstallPath";
+ Typ = "321";
+ Source = "shlxtmsi.dll";
+ Target = "CompleteInstallPath";
+ Inbinarytable = 1;
+ Assignment1 = ("InstallExecuteSequence", "Not REMOVE=\"ALL\" And Not PATCH", "MigrateInstallPath");
+ Assignment2 = ("InstallUISequence", "Not REMOVE=\"ALL\" And Not PATCH", "MigrateInstallPath");
+End
+
WindowsCustomAction gid_Customaction_CheckVersions
Name = "CheckVersions";
Typ = "321";
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 6811da762934..7cdee6a4efa5 100755
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -493,6 +493,9 @@ public:
This flag indicates whether to show the background shape.
@param bIsPageObj
This flag indicates whether to show the shapes on the master page.
+ @param nInsertPosition
+ Position where to insert the standard page. When -1 then the
+ new page set is inserted after the current page.
@return
Returns an index of the inserted pages that can be used with the
@@ -506,7 +509,8 @@ public:
AutoLayout eStandardLayout,
AutoLayout eNotesLayout,
BOOL bIsPageBack,
- BOOL bIsPageObj);
+ BOOL bIsPageObj,
+ const sal_Int32 nInsertPosition = -1);
/** This method acts as a simplified front end for the more complex
<member>DuplicatePage()</member> method.
@@ -549,6 +553,9 @@ public:
This flag indicates whether to show the background shape.
@param bIsPageObj
This flag indicates whether to show the shapes on the master page.
+ @param nInsertPosition
+ Position where to insert the standard page. When -1 then the
+ new page set is inserted after the current page.
@return
Returns an index of the inserted pages that can be used with the
@@ -562,7 +569,8 @@ public:
AutoLayout eStandardLayout,
AutoLayout eNotesLayout,
BOOL bIsPageBack,
- BOOL bIsPageObj);
+ BOOL bIsPageObj,
+ const sal_Int32 nInsertPosition = -1);
/** return the document fonts for latin, cjk and ctl according to the current
languages set at this document */
@@ -620,6 +628,9 @@ private:
The standard page to insert.
@param pNotesPage
The notes page to insert.
+ @param nInsertPosition
+ Position where to insert the standard page. When -1 then the
+ new page set is inserted after the current page.
@return
Returns an index of the inserted pages that can be used with the
@@ -634,9 +645,9 @@ private:
AutoLayout eNotesLayout,
BOOL bIsPageBack,
BOOL bIsPageObj,
-
SdPage* pStandardPage,
- SdPage* pNotesPage);
+ SdPage* pNotesPage,
+ sal_Int32 nInsertPosition = -1);
/** Set up a newly created page and insert it into the list of pages.
@param pPreviousPage
diff --git a/sd/inc/glob.hrc b/sd/inc/glob.hrc
index 73189f135e62..89b2b670adf9 100755
--- a/sd/inc/glob.hrc
+++ b/sd/inc/glob.hrc
@@ -154,5 +154,7 @@
#define STR_CUSTOMANIMATIONPANE RID_GLOB_START+227
#define STR_SLIDE_TRANSITION_PANE RID_GLOB_START+228
+#define RID_SLIDESORTER_ICONS RID_GLOB_START+227
+
diff --git a/sd/prj/build.lst b/sd/prj/build.lst
index 381e9bc6a3a2..6b4f478b7c20 100644
--- a/sd/prj/build.lst
+++ b/sd/prj/build.lst
@@ -1,4 +1,4 @@
-sd sd : filter l10n animations svx stoc canvas NULL
+sd sd : filter l10n animations svx sfx2 stoc canvas NULL
sd sd usr1 - all sd_mkout NULL
sd sd\inc nmake - all sd_inc NULL
sd sd\prj get - all sd_prj NULL
diff --git a/sd/sdi/SlideSorterController.sdi b/sd/sdi/SlideSorterController.sdi
index a261f7a7d14a..faa752d601df 100644..100755
--- a/sd/sdi/SlideSorterController.sdi
+++ b/sd/sdi/SlideSorterController.sdi
@@ -85,6 +85,11 @@ interface SlideSorterView
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
]
+ SID_DUPLICATE_PAGE
+ [
+ ExecMethod = FuTemporary ;
+ StateMethod = GetMenuState ;
+ ]
SID_DELETE_PAGE
[
ExecMethod = FuTemporary ;
@@ -232,21 +237,6 @@ interface SlideSorterView
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
]
- /*
- SID_PRINTDOC // ole : no, status : ?
- [
- StateMethod = GetMenuState ;
- ]
- SID_PRINTDOCDIRECT // ole : no, status : ?
- [
- StateMethod = GetMenuState ;
- ]
- SID_SETUPPRINTER // ole : no, status : ?
- [
- StateMethod = GetMenuState ;
- ]
-*/
-
SID_OUTPUT_QUALITY_COLOR // ole : no, status : play rec
[
ExecMethod = ExecCtrl ;
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index 74a1bde5f5f8..6ccf0d2f73cb 100755
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -1354,7 +1354,8 @@ USHORT SdDrawDocument::CreatePage (
AutoLayout eStandardLayout,
AutoLayout eNotesLayout,
BOOL bIsPageBack,
- BOOL bIsPageObj)
+ BOOL bIsPageObj,
+ const sal_Int32 nInsertPosition)
{
SdPage* pPreviousStandardPage;
SdPage* pPreviousNotesPage;
@@ -1422,16 +1423,17 @@ USHORT SdDrawDocument::CreatePage (
pNotesPage->setHeaderFooterSettings( pPreviousNotesPage->getHeaderFooterSettings() );
return InsertPageSet (
- pActualPage, ePageKind,
+ pActualPage,
+ ePageKind,
sStandardPageName,
sNotesPageName,
eStandardLayout,
eNotesLayout,
bIsPageBack,
bIsPageObj,
-
pStandardPage,
- pNotesPage);
+ pNotesPage,
+ nInsertPosition);
}
@@ -1473,7 +1475,8 @@ USHORT SdDrawDocument::DuplicatePage (
AutoLayout eStandardLayout,
AutoLayout eNotesLayout,
BOOL bIsPageBack,
- BOOL bIsPageObj)
+ BOOL bIsPageObj,
+ const sal_Int32 nInsertPosition)
{
SdPage* pPreviousStandardPage;
SdPage* pPreviousNotesPage;
@@ -1500,16 +1503,17 @@ USHORT SdDrawDocument::DuplicatePage (
pNotesPage = (SdPage*) pPreviousNotesPage->Clone();
return InsertPageSet (
- pActualPage, ePageKind,
+ pActualPage,
+ ePageKind,
sStandardPageName,
sNotesPageName,
eStandardLayout,
eNotesLayout,
bIsPageBack,
bIsPageObj,
-
pStandardPage,
- pNotesPage);
+ pNotesPage,
+ nInsertPosition);
}
@@ -1524,9 +1528,9 @@ USHORT SdDrawDocument::InsertPageSet (
AutoLayout eNotesLayout,
BOOL bIsPageBack,
BOOL bIsPageObj,
-
SdPage* pStandardPage,
- SdPage* pNotesPage)
+ SdPage* pNotesPage,
+ sal_Int32 nInsertPosition)
{
SdPage* pPreviousStandardPage;
SdPage* pPreviousNotesPage;
@@ -1556,13 +1560,16 @@ USHORT SdDrawDocument::InsertPageSet (
eNotesLayout = pPreviousNotesPage->GetAutoLayout();
}
+ OSL_ASSERT(nNotesPageNum==nStandardPageNum+1);
+ if (nInsertPosition < 0)
+ nInsertPosition = nStandardPageNum;
// Set up and insert the standard page.
SetupNewPage (
pPreviousStandardPage,
pStandardPage,
aStandardPageName,
- nStandardPageNum,
+ nInsertPosition,
bIsPageBack,
bIsPageObj);
@@ -1572,7 +1579,7 @@ USHORT SdDrawDocument::InsertPageSet (
pPreviousNotesPage,
pNotesPage,
aNotesPageName,
- nNotesPageNum,
+ nInsertPosition+1,
bIsPageBack,
bIsPageObj);
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 103a197d5a1f..025700a790fc 100644..100755
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -57,6 +57,7 @@
#include <sot/formats.hxx>
#include <set>
+#include <boost/bind.hpp>
#include "glob.hrc"
#include "drawdoc.hxx"
@@ -410,6 +411,20 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc
delete pLayout;
}
+/** Just add one page to the container given to the constructor.
+*/
+class InsertBookmarkAsPage_AddBookmarkedPages
+ : public SdDrawDocument::InsertBookmarkAsPage_PageFunctorBase
+{
+public:
+ InsertBookmarkAsPage_AddBookmarkedPages(::std::vector<SdPage*>& rContainer)
+ : mrContainer(rContainer) {}
+ ~InsertBookmarkAsPage_AddBookmarkedPages(void) {}
+ void operator() (SdDrawDocument&, SdPage* pPage) { mrContainer.push_back(pPage); }
+private:
+ ::std::vector<SdPage*>& mrContainer;
+};
+
BOOL SdDrawDocument::InsertBookmarkAsPage(
List* pBookmarkList,
@@ -668,23 +683,24 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
USHORT nActualInsertPos = nInsertPos;
+ // Collect the bookmarked pages.
+ ::std::vector<SdPage*> aBookmarkedPages (pBookmarkList->Count(), NULL);
for (USHORT nPos = 0; nPos < pBookmarkList->Count(); nPos++)
{
- /**************************************************************
- * Namen der Bookmark-Seiten aus Liste holen
- **************************************************************/
String aPgName(*(String*) pBookmarkList->GetObject(nPos));
BOOL bIsMasterPage;
USHORT nBMPage = pBookmarkDoc->GetPageByName( aPgName, bIsMasterPage );
if (nBMPage != SDRPAGE_NOTFOUND)
{
- pBMPage = (SdPage*) pBookmarkDoc->GetPage(nBMPage);
- }
- else
- {
- pBMPage = NULL;
+ aBookmarkedPages[nPos] = dynamic_cast<SdPage*>(pBookmarkDoc->GetPage(nBMPage));
}
+ }
+
+ for (USHORT nPos = 0; nPos < pBookmarkList->Count(); nPos++)
+ {
+ pBMPage = aBookmarkedPages[nPos];
+ USHORT nBMPage = pBMPage!=NULL ? pBMPage->GetPageNum() : SDRPAGE_NOTFOUND;
if (pBMPage && pBMPage->GetPageKind()==PK_STANDARD && !pBMPage->IsMasterPage())
{
@@ -696,6 +712,8 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
// #95991# delay renaming *after* pages are copied (might destroy source otherwise)
// #67905# don't change name if source and dest model are the same!
// #96029# avoid renaming if replacing the same page
+ String aPgName(*(String*) pBookmarkList->GetObject(nPos));
+ BOOL bIsMasterPage;
USHORT nPageSameName = GetPageByName(aPgName, bIsMasterPage);
if( pBookmarkDoc != this &&
nPageSameName != SDRPAGE_NOTFOUND &&
@@ -705,7 +723,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
bMustRename = sal_True;
}
- SdPage* pBookmarkPage = dynamic_cast< SdPage* >( pBookmarkDoc->GetPage(nBMPage) );
+ SdPage* pBookmarkPage = pBMPage;
if (bReplace )
{
ReplacePageInCustomShows( dynamic_cast< SdPage* >( GetPage( nActualInsertPos ) ), pBookmarkPage );
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index f4462da6b8b8..764d56906620 100755
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -117,9 +117,7 @@
#include "i18npool/mslangid.hxx"
#include <vos/xception.hxx>
-#ifndef _VOS_NO_NAMESPACE
using namespace vos;
-#endif
using namespace ::com::sun::star;
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
index ae1f6f633edc..510f0233667c 100755
--- a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
@@ -37,6 +37,8 @@
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "view/SlideSorterView.hxx"
+#include "view/SlsLayouter.hxx"
+#include "view/SlsPageObjectLayouter.hxx"
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <comphelper/accessibleeventnotifier.hxx>
@@ -385,10 +387,11 @@ awt::Rectangle SAL_CALL AccessibleSlideSorterObject::getBounds (void)
const vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- Rectangle aBBox (mrSlideSorter.GetView().GetPageBoundingBox (
- mnPageNumber,
- ::sd::slidesorter::view::SlideSorterView::CS_SCREEN,
- ::sd::slidesorter::view::SlideSorterView::BBT_INFO));
+ Rectangle aBBox (
+ mrSlideSorter.GetView().GetLayouter().GetPageObjectLayouter()->GetBoundingBox(
+ mrSlideSorter.GetModel().GetPageDescriptor(mnPageNumber),
+ ::sd::slidesorter::view::PageObjectLayouter::PageObject,
+ ::sd::slidesorter::view::PageObjectLayouter::WindowCoordinateSystem));
if (mxParent.is())
{
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
index 6f3508d731a8..91c09b55697d 100755..100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
@@ -62,6 +62,14 @@ using namespace ::com::sun::star::accessibility;
namespace accessibility {
+/** Inner implementation class of the AccessibleSlideSorterView.
+
+ Note that some event broadcasting is done asynchronously because
+ otherwise it could lead to deadlocks on (at least) some Solaris
+ machines. Probably (but unverified) this can happen on all GTK based
+ systems. The asynchronous broadcasting is just a workaround for a
+ poorly understood problem.
+*/
class AccessibleSlideSorterView::Implementation
: public SfxListener
{
@@ -72,7 +80,7 @@ public:
::Window* pWindow);
~Implementation (void);
- void UpdateChildren (void);
+ void RequestUpdateChildren (void);
void Clear (void);
sal_Int32 GetVisibleChildCount (void) const;
AccessibleSlideSorterObject* GetAccessibleChild (sal_Int32 nIndex);
@@ -83,8 +91,9 @@ public:
void Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint);
DECL_LINK(WindowEventListener, VclWindowEvent*);
DECL_LINK(SelectionChangeListener, void*);
+ DECL_LINK(BroadcastSelectionChange, void*);
DECL_LINK(FocusChangeListener, void*);
- DECL_LINK(VisibilityChangeListener, void*);
+ DECL_LINK(UpdateChildrenCallback, void*);
private:
AccessibleSlideSorterView& mrAccessibleSlideSorter;
@@ -97,6 +106,10 @@ private:
::Window* mpWindow;
sal_Int32 mnFocusedIndex;
bool mbModelChangeLocked;
+ ULONG mnUpdateChildrenUserEventId;
+ ULONG mnSelectionChangeUserEventId;
+
+ void UpdateChildren (void);
};
@@ -115,7 +128,6 @@ AccessibleSlideSorterView::AccessibleSlideSorterView(
mnClientId(0),
mpContentWindow(pContentWindow)
{
- OSL_TRACE("creating AccessibleSlideSorterView");
}
@@ -771,6 +783,9 @@ sal_Bool AccessibleSlideSorterView::IsDisposed (void)
return (rBHelper.bDisposed || rBHelper.bInDispose);
}
+
+
+
//===== AccessibleSlideSorterView::Implementation =============================
AccessibleSlideSorterView::Implementation::Implementation (
@@ -785,7 +800,9 @@ AccessibleSlideSorterView::Implementation::Implementation (
mbListeningToDocument(false),
mpWindow(pWindow),
mnFocusedIndex(-1),
- mbModelChangeLocked(false)
+ mbModelChangeLocked(false),
+ mnUpdateChildrenUserEventId(0),
+ mnSelectionChangeUserEventId(0)
{
ConnectListeners();
UpdateChildren();
@@ -796,6 +813,10 @@ AccessibleSlideSorterView::Implementation::Implementation (
AccessibleSlideSorterView::Implementation::~Implementation (void)
{
+ if (mnUpdateChildrenUserEventId != 0)
+ Application::RemoveUserEvent(mnUpdateChildrenUserEventId);
+ if (mnSelectionChangeUserEventId != 0)
+ Application::RemoveUserEvent(mnSelectionChangeUserEventId);
ReleaseListeners();
Clear();
}
@@ -803,6 +824,17 @@ AccessibleSlideSorterView::Implementation::~Implementation (void)
+void AccessibleSlideSorterView::Implementation::RequestUpdateChildren (void)
+{
+ if (mnUpdateChildrenUserEventId == 0)
+ mnUpdateChildrenUserEventId = Application::PostUserEvent(
+ LINK(this, AccessibleSlideSorterView::Implementation,
+ UpdateChildrenCallback));
+}
+
+
+
+
void AccessibleSlideSorterView::Implementation::UpdateChildren (void)
{
if (mbModelChangeLocked)
@@ -812,10 +844,9 @@ void AccessibleSlideSorterView::Implementation::UpdateChildren (void)
return;
}
- ::sd::slidesorter::view::SlideSorterView::PageRange aRange (
- mrSlideSorter.GetView().GetVisiblePageRange());
- mnFirstVisibleChild = aRange.first;
- mnLastVisibleChild = aRange.second;
+ const Pair aRange (mrSlideSorter.GetView().GetVisiblePageRange());
+ mnFirstVisibleChild = aRange.A();
+ mnLastVisibleChild = aRange.B();
// Release all children.
Clear();
@@ -854,7 +885,7 @@ void AccessibleSlideSorterView::Implementation::Clear (void)
sal_Int32 AccessibleSlideSorterView::Implementation::GetVisibleChildCount (void) const
{
- if (mnFirstVisibleChild <= mnLastVisibleChild)
+ if (mnFirstVisibleChild<=mnLastVisibleChild && mnFirstVisibleChild>=0)
return mnLastVisibleChild - mnFirstVisibleChild + 1;
else
return 0;
@@ -929,7 +960,7 @@ void AccessibleSlideSorterView::Implementation::ConnectListeners (void)
mrSlideSorter.GetController().GetFocusManager().AddFocusChangeListener(
LINK(this,AccessibleSlideSorterView::Implementation,FocusChangeListener));
mrSlideSorter.GetView().AddVisibilityChangeListener(
- LINK(this,AccessibleSlideSorterView::Implementation,VisibilityChangeListener));
+ LINK(this,AccessibleSlideSorterView::Implementation,UpdateChildrenCallback));
}
@@ -942,7 +973,7 @@ void AccessibleSlideSorterView::Implementation::ReleaseListeners (void)
mrSlideSorter.GetController().GetSelectionManager()->RemoveSelectionChangeListener(
LINK(this,AccessibleSlideSorterView::Implementation,SelectionChangeListener));
mrSlideSorter.GetView().RemoveVisibilityChangeListener(
- LINK(this,AccessibleSlideSorterView::Implementation,VisibilityChangeListener));
+ LINK(this,AccessibleSlideSorterView::Implementation,UpdateChildrenCallback));
if (mpWindow != NULL)
mpWindow->RemoveEventListener(
@@ -970,7 +1001,7 @@ void AccessibleSlideSorterView::Implementation::Notify (
switch (rSdrHint.GetKind())
{
case HINT_PAGEORDERCHG:
- UpdateChildren();
+ RequestUpdateChildren();
break;
default:
break;
@@ -987,7 +1018,7 @@ void AccessibleSlideSorterView::Implementation::Notify (
case sd::ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_END:
mbModelChangeLocked = false;
- UpdateChildren();
+ RequestUpdateChildren();
break;
default:
break;
@@ -1004,7 +1035,7 @@ IMPL_LINK(AccessibleSlideSorterView::Implementation, WindowEventListener, VclWin
{
case VCLEVENT_WINDOW_MOVE:
case VCLEVENT_WINDOW_RESIZE:
- UpdateChildren();
+ RequestUpdateChildren();
break;
case VCLEVENT_WINDOW_GETFOCUS:
@@ -1025,6 +1056,18 @@ IMPL_LINK(AccessibleSlideSorterView::Implementation, WindowEventListener, VclWin
IMPL_LINK(AccessibleSlideSorterView::Implementation, SelectionChangeListener, void*, EMPTYARG )
{
+ if (mnSelectionChangeUserEventId == 0)
+ mnSelectionChangeUserEventId = Application::PostUserEvent(
+ LINK(this, AccessibleSlideSorterView::Implementation, BroadcastSelectionChange));
+ return 1;
+}
+
+
+
+
+IMPL_LINK(AccessibleSlideSorterView::Implementation, BroadcastSelectionChange, void*, EMPTYARG )
+{
+ mnSelectionChangeUserEventId = 0;
mrAccessibleSlideSorter.FireAccessibleEvent(
AccessibleEventId::SELECTION_CHANGED,
Any(),
@@ -1068,8 +1111,9 @@ IMPL_LINK(AccessibleSlideSorterView::Implementation, FocusChangeListener, void*,
-IMPL_LINK(AccessibleSlideSorterView::Implementation, VisibilityChangeListener, void*, EMPTYARG )
+IMPL_LINK(AccessibleSlideSorterView::Implementation, UpdateChildrenCallback, void*, EMPTYARG )
{
+ mnUpdateChildrenUserEventId = 0;
UpdateChildren();
return 1;
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 9c12692c6597..fe34f0138db2 100644..100755
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -346,7 +346,7 @@ struct lcl_EqualsSoundFileName : public ::std::unary_function< String, bool >
{
// note: formerly this was a case insensitive search for all
// platforms. It seems more sensible to do this platform-dependent
-#if defined( WIN ) || defined( WNT )
+#if defined( WNT )
return maStr.EqualsIgnoreCaseAscii( rStr );
#else
return maStr.Equals( rStr );
diff --git a/sd/source/ui/dlg/PaneDockingWindow.cxx b/sd/source/ui/dlg/PaneDockingWindow.cxx
index c1dedd5d8293..bcf58c38c0b1 100755..100644
--- a/sd/source/ui/dlg/PaneDockingWindow.cxx
+++ b/sd/source/ui/dlg/PaneDockingWindow.cxx
@@ -31,12 +31,16 @@
#include "PaneDockingWindow.hxx"
#include "Window.hxx"
#include "ViewShellBase.hxx"
+#include "framework/FrameworkHelper.hxx"
#include "sdresid.hxx"
#include "res_bmp.hrc"
#include <sfx2/dispatch.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/taskpanelist.hxx>
-#include "framework/FrameworkHelper.hxx"
+#include <vcl/splitwin.hxx>
+#include <vcl/svapp.hxx>
+#include <tools/wintypes.hxx>
+#include <boost/bind.hpp>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -61,6 +65,11 @@ void PaneDockingWindow::StateChanged( StateChangedType nType )
{
switch (nType)
{
+ case STATE_CHANGE_INITSHOW:
+ Resize();
+ GetContentWindow().SetStyle(GetContentWindow().GetStyle() | WB_DIALOGCONTROL);
+ break;
+
case STATE_CHANGE_VISIBLE:
// The visibility of the docking window has changed. Tell the
// ConfigurationController so that it can activate or deactivate
@@ -78,4 +87,61 @@ void PaneDockingWindow::StateChanged( StateChangedType nType )
SfxDockingWindow::StateChanged (nType);
}
+void PaneDockingWindow::MouseButtonDown (const MouseEvent& rEvent)
+{
+ if (rEvent.GetButtons() == MOUSE_LEFT)
+ {
+ // For some strange reason we have to set the WB_DIALOGCONTROL at
+ // the content window in order to have it pass focus to its content
+ // window. Without setting this flag here that works only on views
+ // that have not been taken from the cash and relocated to this pane
+ // docking window.
+ GetContentWindow().SetStyle(GetContentWindow().GetStyle() | WB_DIALOGCONTROL);
+ GetContentWindow().GrabFocus();
+ }
+ SfxDockingWindow::MouseButtonDown(rEvent);
+}
+
+
+
+
+
+
+
+
+void PaneDockingWindow::SetValidSizeRange (const Range aValidSizeRange)
+{
+ SplitWindow* pSplitWindow = dynamic_cast<SplitWindow*>(GetParent());
+ if (pSplitWindow != NULL)
+ {
+ const USHORT nId (pSplitWindow->GetItemId(static_cast< ::Window*>(this)));
+ const USHORT nSetId (pSplitWindow->GetSet(nId));
+ // Because the PaneDockingWindow paints its own decoration, we have
+ // to compensate the valid size range for that.
+ const SvBorder aBorder (GetDecorationBorder());
+ sal_Int32 nCompensation (pSplitWindow->IsHorizontal()
+ ? mnTitleBarHeight + aBorder.Top() + aBorder.Bottom()
+ : aBorder.Left() + aBorder.Right());
+ pSplitWindow->SetItemSizeRange(
+ nSetId,
+ Range(
+ aValidSizeRange.Min() + nCompensation,
+ aValidSizeRange.Max() + nCompensation));
+ }
+}
+
+
+
+
+PaneDockingWindow::Orientation PaneDockingWindow::GetOrientation (void) const
+{
+ SplitWindow* pSplitWindow = dynamic_cast<SplitWindow*>(GetParent());
+ if (pSplitWindow == NULL)
+ return UnknownOrientation;
+ else if (pSplitWindow->IsHorizontal())
+ return HorizontalOrientation;
+ else
+ return VerticalOrientation;
+}
+
} // end of namespace ::sd
diff --git a/sd/source/ui/dlg/PaneDockingWindow.src b/sd/source/ui/dlg/PaneDockingWindow.src
index 23b0d19ac79b..7754283332cd 100755
--- a/sd/source/ui/dlg/PaneDockingWindow.src
+++ b/sd/source/ui/dlg/PaneDockingWindow.src
@@ -29,7 +29,6 @@
DockingWindow FLT_LEFT_PANE_IMPRESS_DOCKING_WINDOW
{
- // HelpID = SID_EFFECT_WIN ;
Border = TRUE ;
Hide = TRUE ;
SVLook = TRUE ;
@@ -45,7 +44,6 @@ DockingWindow FLT_LEFT_PANE_IMPRESS_DOCKING_WINDOW
DockingWindow FLT_LEFT_PANE_DRAW_DOCKING_WINDOW
{
- // HelpID = SID_EFFECT_WIN ;
Border = TRUE ;
Hide = TRUE ;
SVLook = TRUE ;
@@ -61,7 +59,6 @@ DockingWindow FLT_LEFT_PANE_DRAW_DOCKING_WINDOW
DockingWindow FLT_TOOL_PANEL_DOCKING_WINDOW
{
- // HelpID = SID_EFFECT_WIN ;
Border = TRUE ;
Hide = TRUE ;
SVLook = TRUE ;
diff --git a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx
index 5e70c313f251..bf3571cbd8f4 100644..100755
--- a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx
+++ b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx
@@ -197,9 +197,10 @@ void ChangeRequestQueueProcessor::ProcessOneEvent (void)
// its state.
if (mpConfigurationUpdater.get() != NULL)
{
+#ifdef VERBOSE
ConfigurationTracer::TraceConfiguration (
mxConfiguration, "updating to configuration");
-
+#endif
mpConfigurationUpdater->RequestUpdate(mxConfiguration);
}
}
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx
index 1320df5c827b..2dd7689f2b39 100755
--- a/sd/source/ui/framework/factories/BasicViewFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx
@@ -227,7 +227,7 @@ Reference<XResource> SAL_CALL BasicViewFactory::createResource (
// When the requested view is not in the cache then create a new view.
if (pDescriptor.get() == NULL)
{
- pDescriptor = CreateView(rxViewId, *pFrame, *pWindow, xPane, pFrameView);
+ pDescriptor = CreateView(rxViewId, *pFrame, *pWindow, xPane, pFrameView, bIsCenterPane);
}
if (pDescriptor.get() != NULL)
@@ -351,7 +351,8 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments)
SfxViewFrame& rFrame,
::Window& rWindow,
const Reference<XPane>& rxPane,
- FrameView* pFrameView)
+ FrameView* pFrameView,
+ const bool bIsCenterPane)
{
::boost::shared_ptr<ViewDescriptor> pDescriptor (new ViewDescriptor());
@@ -359,13 +360,12 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments)
rxViewId,
rFrame,
rWindow,
- pFrameView);
+ pFrameView,
+ bIsCenterPane);
pDescriptor->mxViewId = rxViewId;
if (pDescriptor->mpViewShell.get() != NULL)
{
- const bool bIsCenterPane (
- rxViewId->isBoundToURL(FrameworkHelper::msCenterPaneURL, AnchorBindingMode_DIRECT));
pDescriptor->mpViewShell->Init(bIsCenterPane);
mpBase->GetViewShellManager()->ActivateViewShell(pDescriptor->mpViewShell.get());
@@ -386,7 +386,8 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments)
const Reference<XResourceId>& rxViewId,
SfxViewFrame& rFrame,
::Window& rWindow,
- FrameView* pFrameView)
+ FrameView* pFrameView,
+ const bool bIsCenterPane)
{
::boost::shared_ptr<ViewShell> pViewShell;
const OUString& rsViewURL (rxViewId->getResourceURL());
@@ -462,7 +463,8 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments)
&rFrame,
*mpBase,
&rWindow,
- pFrameView);
+ pFrameView,
+ bIsCenterPane);
}
return pViewShell;
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.hxx b/sd/source/ui/framework/factories/BasicViewFactory.hxx
index e5bb43551a24..0cdb45ffc7c1 100755
--- a/sd/source/ui/framework/factories/BasicViewFactory.hxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.hxx
@@ -128,13 +128,15 @@ private:
SfxViewFrame& rFrame,
::Window& rWindow,
const css::uno::Reference<css::drawing::framework::XPane>& rxPane,
- FrameView* pFrameView);
+ FrameView* pFrameView,
+ const bool bIsCenterView);
::boost::shared_ptr<ViewShell> CreateViewShell (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
SfxViewFrame& rFrame,
::Window& rWindow,
- FrameView* pFrameView);
+ FrameView* pFrameView,
+ const bool bIsCenterView);
void ActivateCenterView (
const ::boost::shared_ptr<ViewDescriptor>& rpDescriptor);
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index 078f86a88d86..8c325ff202af 100755
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -565,12 +565,27 @@ Reference<XResourceId> FrameworkHelper::RequestView (
void FrameworkHelper::RequestTaskPanel (
- const OUString& rsTaskPanelURL)
+ const OUString& rsTaskPanelURL,
+ const bool bEnsureTaskPaneIsVisible)
{
try
{
if (mxConfigurationController.is())
{
+ // Check the existence of the task pane.
+ if ( ! bEnsureTaskPaneIsVisible)
+ {
+ Reference<XConfiguration> xConfiguration (
+ mxConfigurationController->getCurrentConfiguration());
+ if (xConfiguration.is())
+ if ( ! xConfiguration->hasResource(
+ CreateResourceId(msTaskPaneURL, msRightPaneURL)))
+ {
+ // Task pane does is not active. Do not force it.
+ return;
+ }
+ }
+
// Create the resource id from URLs for the pane, the task pane
// view, and the task panel.
mxConfigurationController->requestResourceActivation(
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 4abb1a22946d..1110c3ee130c 100755
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -443,7 +443,8 @@ private:
virtual SdPage* CreateOrDuplicatePage (
SfxRequest& rRequest,
PageKind ePageKind,
- SdPage* pPage);
+ SdPage* pPage,
+ const sal_Int32 nInsertPosition = -1);
::com::sun::star::uno::Reference< ::com::sun::star::scanner::XScannerManager > mxScannerManager;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > mxScannerListener;
diff --git a/sd/source/ui/inc/PaneDockingWindow.hxx b/sd/source/ui/inc/PaneDockingWindow.hxx
index 1874df10dd53..960f09ff796d 100755..100644
--- a/sd/source/ui/inc/PaneDockingWindow.hxx
+++ b/sd/source/ui/inc/PaneDockingWindow.hxx
@@ -35,6 +35,7 @@
#include <boost/shared_ptr.hpp>
class ToolBox;
+class SplitWindow;
namespace sd {
@@ -65,6 +66,24 @@ public:
virtual ~PaneDockingWindow (void);
virtual void StateChanged( StateChangedType nType );
+ virtual void MouseButtonDown (const MouseEvent& rEvent);
+ /** When docked the given range is passed to the parent SplitWindow.
+ */
+ void SetValidSizeRange (const Range aValidSizeRange);
+
+ enum Orientation { HorizontalOrientation, VerticalOrientation, UnknownOrientation };
+ /** When the PaneDockingWindow is docked and managed by a split window
+ it can derive its orientation from the orientation of the split
+ window and return either HorizontalOrientation or
+ VerticalOrientation.
+ Otherwise UnknownOrientation is returned.
+ */
+ Orientation GetOrientation (void) const;
+
+ /** The current height of the title bar.
+ */
+ sal_Int32 mnTitleBarHeight;
+
};
} // end of namespace ::sd
diff --git a/sd/source/ui/inc/PreviewRenderer.hxx b/sd/source/ui/inc/PreviewRenderer.hxx
index fc9b657f7796..b157d686b044 100644..100755
--- a/sd/source/ui/inc/PreviewRenderer.hxx
+++ b/sd/source/ui/inc/PreviewRenderer.hxx
@@ -80,12 +80,16 @@ public:
ignored and the preview is rendered in normal mode. When
<TRUE/> and high contrast mode is active then the preview is
rendered in high contrast mode.
+ @param bDisplayPresentationObjects
+ When <FALSE/> then the PresObj place holders are not displayed
+ in the returned preview.
*/
Image RenderPage (
const SdPage* pPage,
const sal_Int32 nWidth,
const String& sSubstitutionText,
- const bool bObeyHighContrastMode = true);
+ const bool bObeyHighContrastMode = true,
+ const bool bDisplayPresentationObjects = true);
/** Render a page with the given pixel size.
@param pPage
@@ -101,12 +105,16 @@ public:
ignored and the preview is rendered in normal mode. When
<TRUE/> and high contrast mode is active then the preview is
rendered in high contrast mode.
+ @param bDisplayPresentationObjects
+ When <FALSE/> then the PresObj place holders are not displayed
+ in the returned preview.
*/
Image RenderPage (
const SdPage* pPage,
const Size aPreviewPixelSize,
const String& sSubstitutionText,
- const bool bObeyHighContrastMode = true);
+ const bool bObeyHighContrastMode = true,
+ const bool bDisplayPresentationObjects = true);
/** Render an image that contains the given substitution text instead of a
slide preview.
@@ -143,7 +151,9 @@ private:
const Size& rPixelSize,
const bool bObeyHighContrastMode);
void Cleanup (void);
- void PaintPage (const SdPage* pPage);
+ void PaintPage (
+ const SdPage* pPage,
+ const bool bDisplayPresentationObjects);
void PaintSubstitutionText (const String& rSubstitutionText);
void PaintFrame (void);
diff --git a/sd/source/ui/inc/SlideSorter.hxx b/sd/source/ui/inc/SlideSorter.hxx
index f52bbb48ab6a..257695e0fc91 100644..100755
--- a/sd/source/ui/inc/SlideSorter.hxx
+++ b/sd/source/ui/inc/SlideSorter.hxx
@@ -29,12 +29,15 @@
#define SD_SLIDESORTER_SLIDE_SORTER_HXX
#include "fupoor.hxx"
+#include "Window.hxx"
#include <com/sun/star/frame/XController.hpp>
#include <cppuhelper/weakref.hxx>
#include <sfx2/viewfrm.hxx>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/scoped_ptr.hpp>
+#include <boost/current_function.hpp>
+
class ScrollBar;
class ScrollBarBox;
@@ -53,17 +56,21 @@ class SlideSorterModel;
namespace sd { namespace slidesorter { namespace view {
class SlideSorterView;
+class Theme;
} } }
namespace sd { namespace slidesorter { namespace controller {
class Listener;
class SlideSorterController;
class SlotManager;
+class Properties;
} } }
-namespace sd { namespace slidesorter {
+typedef ::boost::shared_ptr<sd::Window> SharedSdWindow;
+
+namespace sd { namespace slidesorter {
/** Show previews for all the slides in a document and allow the user to
insert or delete slides and modify the order of the slides.
@@ -140,12 +147,7 @@ public:
/** Return the content window. This is a sibling and is geometrically
enclosed by the scroll bars.
*/
- ::boost::shared_ptr<sd::Window> GetContentWindow (void) const;
-
- /** Return the active window as it is returned by a view shell.
- Typically the content window.
- */
- ::sd::Window* GetActiveWindow (void) const;
+ SharedSdWindow GetContentWindow (void) const;
model::SlideSorterModel& GetModel (void) const;
@@ -189,6 +191,15 @@ public:
*/
void SetCurrentFunction (const FunctionReference& rpFunction);
+ /** Return a collection of properties that are used througout the slide
+ sorter.
+ */
+ ::boost::shared_ptr<controller::Properties> GetProperties (void) const;
+
+ /** Return the active theme wich gives access to colors and fonts.
+ */
+ ::boost::shared_ptr<view::Theme> GetTheme (void) const;
+
protected:
/** This virtual method makes it possible to create a specialization of
the slide sorter view shell that works with its own implementation
@@ -225,7 +236,8 @@ private:
::com::sun::star::uno::WeakReference<com::sun::star::frame::XController> mxControllerWeak;
ViewShell* mpViewShell;
ViewShellBase* mpViewShellBase;
- ::boost::shared_ptr<sd::Window> mpContentWindow;
+ SharedSdWindow mpContentWindow;
+ bool mbOwnesContentWindow;
::boost::shared_ptr<ScrollBar> mpHorizontalScrollBar;
::boost::shared_ptr<ScrollBar> mpVerticalScrollBar;
::boost::shared_ptr<ScrollBarBox> mpScrollBarBox;
@@ -234,6 +246,11 @@ private:
*/
bool mbLayoutPending;
+ /** Some slide sorter wide properties that are used in different
+ classes.
+ */
+ ::boost::shared_ptr<controller::Properties> mpProperties;
+ ::boost::shared_ptr<view::Theme> mpTheme;
SlideSorter (
ViewShell& rViewShell,
diff --git a/sd/source/ui/inc/SlideSorterViewShell.hxx b/sd/source/ui/inc/SlideSorterViewShell.hxx
index 4e6033d67ad1..2b03cd636d0f 100755
--- a/sd/source/ui/inc/SlideSorterViewShell.hxx
+++ b/sd/source/ui/inc/SlideSorterViewShell.hxx
@@ -57,7 +57,8 @@ public:
SfxViewFrame* pFrame,
ViewShellBase& rViewShellBase,
::Window* pParentWindow,
- FrameView* pFrameView);
+ FrameView* pFrameView,
+ const bool bIsCenterPane);
virtual ~SlideSorterViewShell (void);
@@ -106,9 +107,6 @@ public:
virtual void SetZoom (long int nZoom);
virtual void SetZoomRect (const Rectangle& rZoomRect);
- /// forward VCLs PrePaint window event to DrawingLayer
- virtual void PrePaint();
-
/** This is a callback method used by the active window to delegate its
Paint() call to. This view shell itself delegates it to the view.
*/
@@ -120,6 +118,8 @@ public:
*/
virtual void ArrangeGUIElements (void);
+ virtual void Activate (BOOL IsMDIActivate);
+
//===== Drag and Drop =====================================================
virtual void StartDrag (
@@ -196,6 +196,7 @@ protected:
private:
::boost::shared_ptr<SlideSorter> mpSlideSorter;
+ bool mbIsArrangeGUIElementsPending;
SlideSorterViewShell (
SfxViewFrame* pFrame,
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index ffefb9de7359..e6e6b401cb57 100755
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -209,7 +209,7 @@ public:
virtual BOOL RequestHelp( const HelpEvent& rEvt, ::sd::Window* pWin );
virtual long Notify( NotifyEvent& rNEvt, ::sd::Window* pWin );
- BOOL HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWin);
+ virtual bool HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWin);
virtual void Draw(OutputDevice &rDev, const Region &rReg);
@@ -441,6 +441,30 @@ public:
void AdaptDefaultsForChart(
const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject > & xEmbObj );
+ /** Depending on the given request create a new page or duplicate an
+ existing one. A new page is created behind the given slide.
+ @param rRequest
+ The request as passed to an Execute() method. Its arguments are
+ evaluated. Its slot id determines whether to create or
+ duplicate a slide.
+ @param pPage
+ This page is either duplicated or becomes the predecessor of the
+ new slide. If NULL a duplication request is ignored. A new
+ slide is inserted as first slide.
+ @param nInsertPosition
+ When -1 (the default) then insert after pPage. Otherwise insert
+ before the given index (of a standard page).
+ @return
+ The new slide is returned. If for some reason a new page can
+ not be created then NULL is returned.
+ */
+ virtual SdPage* CreateOrDuplicatePage (
+ SfxRequest& rRequest,
+ PageKind ePageKind,
+ SdPage* pPage,
+ const sal_Int32 nInsertPosition = -1);
+
+
class Implementation;
protected:
@@ -539,25 +563,6 @@ protected:
virtual void SetZoomFactor( const Fraction &rZoomX,
const Fraction &rZoomY );
- /** Depending on the given request create a new page or duplicate an
- existing one. A new page is created behind the given slide.
- @param rRequest
- The request as passed to an Execute() method. Its arguments are
- evaluated. Its slot id determines whether to create or
- duplicate a slide.
- @param pPage
- This page is either duplicated or becomes the predecessor of the
- new slide. If NULL a duplication request is ignored. A new
- slide is inserted as first slide.
- @return
- The new slide is returned. If for some reason a new page can
- not be created then NULL is returned.
- */
- virtual SdPage* CreateOrDuplicatePage (
- SfxRequest& rRequest,
- PageKind ePageKind,
- SdPage* pPage);
-
private:
::Window* mpParentWindow;
/** This window updater is used to keep all relevant windows up to date
diff --git a/sd/source/ui/inc/framework/FrameworkHelper.hxx b/sd/source/ui/inc/framework/FrameworkHelper.hxx
index 58c663449bbc..6ecdeaf31e7e 100755
--- a/sd/source/ui/inc/framework/FrameworkHelper.hxx
+++ b/sd/source/ui/inc/framework/FrameworkHelper.hxx
@@ -223,9 +223,18 @@ public:
/** Request the activation of the specified task panel in the standard
task pane.
+ @param rsTaskPanelURL
+ The panel that is to be activated.
+ @param bEnsureTaskPaneIsVisible
+ When this is <TRUE/> then the task pane is activated when not
+ yet active.
+ When this flag is <FALSE/> then the requested panel
+ is activated only when the task pane is already active. When it
+ is not active then this call is silently ignored.
*/
void RequestTaskPanel (
- const ::rtl::OUString& rsTaskPanelURL);
+ const ::rtl::OUString& rsTaskPanelURL,
+ const bool bEnsureTaskPaneIsVisible = true);
/** Process a slot call that requests a view shell change.
*/
diff --git a/sd/source/ui/presenter/PresenterPreviewCache.cxx b/sd/source/ui/presenter/PresenterPreviewCache.cxx
index 3f50c6f7a1b7..aa55bc9e07ed 100644..100755
--- a/sd/source/ui/presenter/PresenterPreviewCache.cxx
+++ b/sd/source/ui/presenter/PresenterPreviewCache.cxx
@@ -64,7 +64,8 @@ public:
// CacheContext
virtual void NotifyPreviewCreation (
- CacheKey aKey, const ::boost::shared_ptr<BitmapEx>& rPreview);
+ CacheKey aKey,
+ const Bitmap& rPreview);
virtual bool IsIdle (void);
virtual bool IsVisible (CacheKey aKey);
virtual const SdrPage* GetPage (CacheKey aKey);
@@ -122,7 +123,7 @@ PresenterPreviewCache::PresenterPreviewCache (const Reference<XComponentContext>
: PresenterPreviewCacheInterfaceBase(m_aMutex),
maPreviewSize(Size(200,200)),
mpCacheContext(new PresenterCacheContext()),
- mpCache(new PageCache(maPreviewSize, mpCacheContext))
+ mpCache(new PageCache(maPreviewSize, false, mpCacheContext))
{
(void)rxContext;
}
@@ -187,7 +188,7 @@ void SAL_CALL PresenterPreviewCache::setPreviewSize (
OSL_ASSERT(mpCache.get()!=NULL);
maPreviewSize = Size(rSize.Width, rSize.Height);
- mpCache->ChangeSize(maPreviewSize);
+ mpCache->ChangeSize(maPreviewSize, false);
}
@@ -209,7 +210,7 @@ Reference<rendering::XBitmap> SAL_CALL PresenterPreviewCache::getSlidePreview (
if (pPage == NULL)
throw RuntimeException();
- const BitmapEx aPreview (mpCache->GetPreviewBitmap(pPage, maPreviewSize));
+ const BitmapEx aPreview (mpCache->GetPreviewBitmap(pPage,true));
if (aPreview.IsEmpty())
return NULL;
else
@@ -368,7 +369,7 @@ void PresenterPreviewCache::PresenterCacheContext::RemovePreviewCreationNotifyLi
void PresenterPreviewCache::PresenterCacheContext::NotifyPreviewCreation (
CacheKey aKey,
- const ::boost::shared_ptr<BitmapEx>& rPreview)
+ const Bitmap& rPreview)
{
(void)rPreview;
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index 187d0d5ea715..70777d8a06db 100755
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -59,6 +59,7 @@
#include "FactoryIds.hxx"
#include "ViewShell.hxx"
#include "SlideShowRestarter.hxx"
+#include "DrawController.hxx"
#include <boost/bind.hpp>
using ::com::sun::star::presentation::XSlideShowController;
@@ -769,6 +770,16 @@ void SAL_CALL SlideShow::end() throw(RuntimeException)
DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>( pViewShell );
if( pDrawViewShell )
pDrawViewShell->SwitchPage( (USHORT)xController->getRestoreSlide() );
+ else
+ {
+ Reference<XDrawView> xDrawView (
+ Reference<XWeak>(&mpCurrentViewShellBase->GetDrawController()), UNO_QUERY);
+ if (xDrawView.is())
+ xDrawView->setCurrentPage(
+ Reference<XDrawPage>(
+ mpDoc->GetSdPage(xController->getRestoreSlide(), PK_STANDARD)->getUnoPage(),
+ UNO_QUERY));
+ }
}
}
}
@@ -1171,9 +1182,9 @@ void SlideShow::StartFullscreenPresentation( )
// fullscreen.
const sal_Int32 nDisplay (GetDisplay());
WorkWindow* pWorkWindow = new FullScreenWorkWindow(this, mpCurrentViewShellBase);
+ pWorkWindow->SetBackground(Wallpaper(COL_BLACK));
pWorkWindow->StartPresentationMode( TRUE, mpDoc->getPresentationSettings().mbAlwaysOnTop ? PRESENTATION_HIDEALLAPPS : 0, nDisplay);
// pWorkWindow->ShowFullScreenMode(FALSE, nDisplay);
- pWorkWindow->SetBackground(Wallpaper(COL_BLACK));
if (pWorkWindow->IsVisible())
{
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 5afcb65ab90c..ee89da143910 100755
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1230,9 +1230,11 @@ void SlideshowImpl::onFirstPaint()
{
if( mpShowWindow )
{
+ /*
mpShowWindow->SetBackground( Wallpaper( Color( COL_BLACK ) ) );
mpShowWindow->Erase();
mpShowWindow->SetBackground();
+ */
}
::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
index 1bbecbef3d66..ddb50ea878e0 100755..100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
@@ -33,7 +33,6 @@
#include "SlsBitmapCompressor.hxx"
#include "SlsCacheConfiguration.hxx"
-#include "taskpane/SlideSorterCacheDisplay.hxx"
#include "sdpage.hxx"
#include "drawdoc.hxx"
@@ -55,8 +54,7 @@ namespace sd { namespace slidesorter { namespace cache {
class BitmapCache::CacheEntry
{
public:
- CacheEntry(const ::boost::shared_ptr<BitmapEx>& rpBitmap,
- sal_Int32 nLastAccessTime, bool bIsPrecious);
+ CacheEntry(const Bitmap& rBitmap, sal_Int32 nLastAccessTime, bool bIsPrecious);
CacheEntry(sal_Int32 nLastAccessTime, bool bIsPrecious);
~CacheEntry (void) {};
inline void Recycle (const CacheEntry& rEntry);
@@ -68,18 +66,26 @@ public:
void SetUpToDate (bool bIsUpToDate) { mbIsUpToDate = bIsUpToDate; }
sal_Int32 GetAccessTime (void) const { return mnLastAccessTime; }
void SetAccessTime (sal_Int32 nAccessTime) { mnLastAccessTime = nAccessTime; }
- ::boost::shared_ptr<BitmapEx> GetPreview (void) const { return mpPreview; }
- inline void SetPreview (const ::boost::shared_ptr<BitmapEx>& rpPreview);
+
+ Bitmap GetPreview (void) const { return maPreview; }
+ inline void SetPreview (const Bitmap& rPreview);
bool HasPreview (void) const;
+
+ Bitmap GetMarkedPreview (void) const { return maMarkedPreview; }
+ inline void SetMarkedPreview (const Bitmap& rMarkePreview);
+ bool HasMarkedPreview (void) const;
+
bool HasReplacement (void) const { return (mpReplacement.get() != NULL); }
inline bool HasLosslessReplacement (void) const;
- void Clear (void) { mpPreview.reset(); mpReplacement.reset(); mpCompressor.reset(); }
+ void Clear (void) { maPreview.SetEmpty(); maMarkedPreview.SetEmpty();
+ mpReplacement.reset(); mpCompressor.reset(); }
void Invalidate (void) { mpReplacement.reset(); mpCompressor.reset(); mbIsUpToDate = false; }
bool IsPrecious (void) const { return mbIsPrecious; }
void SetPrecious (bool bIsPrecious) { mbIsPrecious = bIsPrecious; }
private:
- ::boost::shared_ptr<BitmapEx> mpPreview;
+ Bitmap maPreview;
+ Bitmap maMarkedPreview;
::boost::shared_ptr<BitmapReplacement> mpReplacement;
::boost::shared_ptr<BitmapCompressor> mpCompressor;
Size maBitmapSize;
@@ -221,7 +227,7 @@ bool BitmapCache::BitmapIsUpToDate (const CacheKey& rKey)
-::boost::shared_ptr<BitmapEx> BitmapCache::GetBitmap (const CacheKey& rKey)
+Bitmap BitmapCache::GetBitmap (const CacheKey& rKey)
{
::osl::MutexGuard aGuard (maMutex);
@@ -230,10 +236,9 @@ bool BitmapCache::BitmapIsUpToDate (const CacheKey& rKey)
{
// Create an empty bitmap for the given key that acts as placeholder
// until we are given the real one. Mark it as not being up to date.
- SetBitmap (rKey, ::boost::shared_ptr<BitmapEx>(new BitmapEx()), false);
+ SetBitmap(rKey, Bitmap(), false);
iEntry = mpBitmapContainer->find(rKey);
iEntry->second.SetUpToDate(false);
- SSCD_SET_UPTODATE(iEntry->first,false);
}
else
{
@@ -253,7 +258,39 @@ bool BitmapCache::BitmapIsUpToDate (const CacheKey& rKey)
-void BitmapCache::InvalidateBitmap (const CacheKey& rKey)
+Bitmap BitmapCache::GetMarkedBitmap (const CacheKey& rKey)
+{
+ ::osl::MutexGuard aGuard (maMutex);
+
+ CacheBitmapContainer::iterator iEntry (mpBitmapContainer->find(rKey));
+ if (iEntry != mpBitmapContainer->end())
+ {
+ iEntry->second.SetAccessTime(mnCurrentAccessTime++);
+ return iEntry->second.GetMarkedPreview();
+ }
+ else
+ return Bitmap();
+}
+
+
+
+
+void BitmapCache::ReleaseBitmap (const CacheKey& rKey)
+{
+ ::osl::MutexGuard aGuard (maMutex);
+
+ CacheBitmapContainer::iterator aIterator (mpBitmapContainer->find(rKey));
+ if (aIterator != mpBitmapContainer->end())
+ {
+ UpdateCacheSize(aIterator->second, REMOVE);
+ mpBitmapContainer->erase(aIterator);
+ }
+}
+
+
+
+
+bool BitmapCache::InvalidateBitmap (const CacheKey& rKey)
{
::osl::MutexGuard aGuard (maMutex);
@@ -261,7 +298,6 @@ void BitmapCache::InvalidateBitmap (const CacheKey& rKey)
if (iEntry != mpBitmapContainer->end())
{
iEntry->second.SetUpToDate(false);
- SSCD_SET_UPTODATE(iEntry->first,false);
// When there is a preview then we release the replacement. The
// preview itself is kept until a new one is created.
@@ -269,10 +305,12 @@ void BitmapCache::InvalidateBitmap (const CacheKey& rKey)
{
UpdateCacheSize(iEntry->second, REMOVE);
iEntry->second.Invalidate();
- SSCD_SET_UPTODATE(iEntry->first,false);
UpdateCacheSize(iEntry->second, ADD);
}
+ return true;
}
+ else
+ return false;
}
@@ -286,7 +324,6 @@ void BitmapCache::InvalidateCache (void)
for (iEntry=mpBitmapContainer->begin(); iEntry!=mpBitmapContainer->end(); ++iEntry)
{
iEntry->second.Invalidate();
- SSCD_SET_UPTODATE(iEntry->first,false);
}
ReCalculateTotalCacheSize();
}
@@ -296,7 +333,7 @@ void BitmapCache::InvalidateCache (void)
void BitmapCache::SetBitmap (
const CacheKey& rKey,
- const ::boost::shared_ptr<BitmapEx>& rpPreview,
+ const Bitmap& rPreview,
bool bIsPrecious)
{
::osl::MutexGuard aGuard (maMutex);
@@ -305,16 +342,15 @@ void BitmapCache::SetBitmap (
if (iEntry != mpBitmapContainer->end())
{
UpdateCacheSize(iEntry->second, REMOVE);
- iEntry->second.SetPreview(rpPreview);
+ iEntry->second.SetPreview(rPreview);
iEntry->second.SetUpToDate(true);
- SSCD_SET_UPTODATE(iEntry->first,true);
iEntry->second.SetAccessTime(mnCurrentAccessTime++);
}
else
{
iEntry = mpBitmapContainer->insert(CacheBitmapContainer::value_type (
rKey,
- CacheEntry (rpPreview, mnCurrentAccessTime++, bIsPrecious))
+ CacheEntry(rPreview, mnCurrentAccessTime++, bIsPrecious))
).first;
}
@@ -325,6 +361,25 @@ void BitmapCache::SetBitmap (
+void BitmapCache::SetMarkedBitmap (
+ const CacheKey& rKey,
+ const Bitmap& rPreview)
+{
+ ::osl::MutexGuard aGuard (maMutex);
+
+ CacheBitmapContainer::iterator iEntry (mpBitmapContainer->find(rKey));
+ if (iEntry != mpBitmapContainer->end())
+ {
+ UpdateCacheSize(iEntry->second, REMOVE);
+ iEntry->second.SetMarkedPreview(rPreview);
+ iEntry->second.SetAccessTime(mnCurrentAccessTime++);
+ UpdateCacheSize(iEntry->second, ADD);
+ }
+}
+
+
+
+
void BitmapCache::SetPrecious (const CacheKey& rKey, bool bIsPrecious)
{
::osl::MutexGuard aGuard (maMutex);
@@ -343,9 +398,7 @@ void BitmapCache::SetPrecious (const CacheKey& rKey, bool bIsPrecious)
{
iEntry = mpBitmapContainer->insert(CacheBitmapContainer::value_type (
rKey,
- CacheEntry (
- ::boost::shared_ptr<BitmapEx>(),
- mnCurrentAccessTime++, bIsPrecious))
+ CacheEntry(Bitmap(), mnCurrentAccessTime++, bIsPrecious))
).first;
UpdateCacheSize(iEntry->second, ADD);
}
@@ -503,7 +556,8 @@ void BitmapCache::UpdateCacheSize (const CacheEntry& rEntry, CacheOperation eOpe
BitmapCache::CacheEntry::CacheEntry(
sal_Int32 nLastAccessTime,
bool bIsPrecious)
- : mpPreview(),
+ : maPreview(),
+ maMarkedPreview(),
mbIsUpToDate(true),
mnLastAccessTime(nLastAccessTime),
mbIsPrecious(bIsPrecious)
@@ -514,10 +568,11 @@ BitmapCache::CacheEntry::CacheEntry(
BitmapCache::CacheEntry::CacheEntry(
- const ::boost::shared_ptr<BitmapEx>& rpPreview,
+ const Bitmap& rPreview,
sal_Int32 nLastAccessTime,
bool bIsPrecious)
- : mpPreview(rpPreview),
+ : maPreview(rPreview),
+ maMarkedPreview(),
mbIsUpToDate(true),
mnLastAccessTime(nLastAccessTime),
mbIsPrecious(bIsPrecious)
@@ -532,7 +587,8 @@ inline void BitmapCache::CacheEntry::Recycle (const CacheEntry& rEntry)
if ((rEntry.HasPreview() || rEntry.HasLosslessReplacement())
&& ! (HasPreview() || HasLosslessReplacement()))
{
- mpPreview = rEntry.mpPreview;
+ maPreview = rEntry.maPreview;
+ maMarkedPreview = rEntry.maMarkedPreview;
mpReplacement = rEntry.mpReplacement;
mpCompressor = rEntry.mpCompressor;
mnLastAccessTime = rEntry.mnLastAccessTime;
@@ -546,8 +602,8 @@ inline void BitmapCache::CacheEntry::Recycle (const CacheEntry& rEntry)
inline sal_Int32 BitmapCache::CacheEntry::GetMemorySize (void) const
{
sal_Int32 nSize (0);
- if (mpPreview.get() != NULL)
- nSize += mpPreview->GetSizeBytes();
+ nSize += maPreview.GetSizeBytes();
+ nSize += maMarkedPreview.GetSizeBytes();
if (mpReplacement.get() != NULL)
nSize += mpReplacement->GetMemorySize();
return nSize;
@@ -558,14 +614,14 @@ inline sal_Int32 BitmapCache::CacheEntry::GetMemorySize (void) const
void BitmapCache::CacheEntry::Compress (const ::boost::shared_ptr<BitmapCompressor>& rpCompressor)
{
- if (mpPreview.get() != NULL)
+ if ( ! maPreview.IsEmpty())
{
if (mpReplacement.get() == NULL)
{
- mpReplacement = rpCompressor->Compress(mpPreview);
+ mpReplacement = rpCompressor->Compress(maPreview);
#ifdef VERBOSE
- sal_uInt32 nOldSize (mpPreview->GetSizeBytes());
+ sal_uInt32 nOldSize (maPreview.GetSizeBytes());
sal_uInt32 nNewSize (mpReplacement.get()!=NULL ? mpReplacement->GetMemorySize() : 0);
if (nOldSize == 0)
nOldSize = 1;
@@ -580,7 +636,8 @@ void BitmapCache::CacheEntry::Compress (const ::boost::shared_ptr<BitmapCompress
mpCompressor = rpCompressor;
}
- mpPreview.reset();
+ maPreview.SetEmpty();
+ maMarkedPreview.SetEmpty();
}
}
@@ -589,9 +646,10 @@ void BitmapCache::CacheEntry::Compress (const ::boost::shared_ptr<BitmapCompress
inline void BitmapCache::CacheEntry::Decompress (void)
{
- if (mpReplacement.get()!=NULL && mpCompressor.get()!=NULL && mpPreview.get()==NULL)
+ if (mpReplacement.get()!=NULL && mpCompressor.get()!=NULL && maPreview.IsEmpty())
{
- mpPreview = mpCompressor->Decompress(*mpReplacement);
+ maPreview = mpCompressor->Decompress(*mpReplacement);
+ maMarkedPreview.SetEmpty();
if ( ! mpCompressor->IsLossless())
mbIsUpToDate = false;
}
@@ -599,9 +657,10 @@ inline void BitmapCache::CacheEntry::Decompress (void)
-inline void BitmapCache::CacheEntry::SetPreview (const ::boost::shared_ptr<BitmapEx>& rpPreview)
+inline void BitmapCache::CacheEntry::SetPreview (const Bitmap& rPreview)
{
- mpPreview = rpPreview;
+ maPreview = rPreview;
+ maMarkedPreview.SetEmpty();
mpReplacement.reset();
mpCompressor.reset();
}
@@ -611,10 +670,23 @@ inline void BitmapCache::CacheEntry::SetPreview (const ::boost::shared_ptr<Bitma
bool BitmapCache::CacheEntry::HasPreview (void) const
{
- if (mpPreview.get() != NULL)
- return mpPreview->GetSizePixel().Width()>0 && mpPreview->GetSizePixel().Height()>0;
- else
- return false;
+ return ! maPreview.IsEmpty();
+}
+
+
+
+
+inline void BitmapCache::CacheEntry::SetMarkedPreview (const Bitmap& rMarkedPreview)
+{
+ maMarkedPreview = rMarkedPreview;
+}
+
+
+
+
+bool BitmapCache::CacheEntry::HasMarkedPreview (void) const
+{
+ return ! maMarkedPreview.IsEmpty();
}
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
index 2c33e042342f..734c630d31ce 100755..100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
@@ -32,8 +32,8 @@ class SdrPage;
#include <vcl/bitmapex.hxx>
#include <osl/mutex.hxx>
-#include <memory>
#include <boost/shared_ptr.hpp>
+#include <boost/scoped_ptr.hpp>
#include <hash_map>
namespace sd { namespace slidesorter { namespace cache {
@@ -44,10 +44,14 @@ class BitmapCompressor;
/** This low level cache is the actual bitmap container. It supports a
precious flag for every preview bitmap and keeps track of total sizes
- for all previews with as well as those without the flag. The precious
- flag is used by compaction algorithms to determine which previews may be
- compressed or even discarded and which have to remain in their original
- form. The precious flag is usually set for the visible previews.
+ for all previews with/without this flag. The precious flag is used by
+ compaction algorithms to determine which previews may be compressed or
+ even discarded and which have to remain in their original form. The
+ precious flag is usually set for the visible previews.
+
+ Additionally to the actual preview there is an optional marked preview.
+ This is used for slides excluded from the slide show which have a preview
+ that shows a mark (some sort of bitmap overlay) to that effect.
*/
class BitmapCache
{
@@ -102,11 +106,25 @@ public:
/** Return the preview bitmap for the given contact object.
*/
- ::boost::shared_ptr<BitmapEx> GetBitmap (const CacheKey& rKey);
+ Bitmap GetBitmap (const CacheKey& rKey);
- /** Mark the specified preview bitmap as not being up-to-date anymore.
+ /** Return the marked preview bitmap for the given contact object.
*/
- void InvalidateBitmap (const CacheKey& rKey);
+ Bitmap GetMarkedBitmap (const CacheKey& rKey);
+
+ /** Release the reference to the preview bitmap that is associated with
+ the given key.
+ */
+ void ReleaseBitmap (const CacheKey& rKey);
+
+ /** Mark the specified preview bitmap as not being up-to-date
+ anymore.
+ @return
+ When the key references a page in the cache then
+ return <TRUE/>. When the key is not known then <FALSE/>
+ is returned.
+ */
+ bool InvalidateBitmap (const CacheKey& rKey);
/** Mark all preview bitmaps as not being up-to-date anymore.
*/
@@ -116,9 +134,15 @@ public:
*/
void SetBitmap (
const CacheKey& rKey,
- const ::boost::shared_ptr<BitmapEx>& rpPreview,
+ const Bitmap& rPreview,
bool bIsPrecious);
+ /** Add or replace a marked bitmap for the given key.
+ */
+ void SetMarkedBitmap (
+ const CacheKey& rKey,
+ const Bitmap& rPreview);
+
/** Mark the specified preview bitmap as precious, i.e. that it must not
be compressed or otherwise removed from the cache.
*/
@@ -161,7 +185,7 @@ public:
private:
mutable ::osl::Mutex maMutex;
- ::std::auto_ptr<CacheBitmapContainer> mpBitmapContainer;
+ ::boost::scoped_ptr<CacheBitmapContainer> mpBitmapContainer;
/** Total size of bytes that are occupied by bitmaps in the cache for
whom the slides are currently not inside the visible area.
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
index 86fc72885414..e0f950442bb5 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
@@ -47,37 +47,24 @@ class NoBitmapCompression::DummyReplacement
: public BitmapReplacement
{
public:
- ::boost::shared_ptr<BitmapEx> mpPreview;
+ Bitmap maPreview;
Size maOriginalSize;
- DummyReplacement (const ::boost::shared_ptr<BitmapEx>& rpPreview) : mpPreview(rpPreview)
- {
- }
-
- virtual ~DummyReplacement();
-
- virtual sal_Int32 GetMemorySize (void) const;
+ DummyReplacement (const Bitmap& rPreview) : maPreview(rPreview) { }
+ virtual ~DummyReplacement(void) {}
+ virtual sal_Int32 GetMemorySize (void) const { return maPreview.GetSizeBytes(); }
};
-NoBitmapCompression::DummyReplacement::~DummyReplacement()
-{
-}
-sal_Int32 NoBitmapCompression::DummyReplacement::GetMemorySize (void) const
-{
- return mpPreview->GetSizeBytes();
-}
-::boost::shared_ptr<BitmapReplacement> NoBitmapCompression::Compress (
- const ::boost::shared_ptr<BitmapEx>& rpBitmap) const
+::boost::shared_ptr<BitmapReplacement> NoBitmapCompression::Compress (const Bitmap& rBitmap) const
{
- return ::boost::shared_ptr<BitmapReplacement>(new DummyReplacement(rpBitmap));
+ return ::boost::shared_ptr<BitmapReplacement>(new DummyReplacement(rBitmap));
}
-::boost::shared_ptr<BitmapEx> NoBitmapCompression::Decompress (
- const BitmapReplacement& rBitmapData) const
+Bitmap NoBitmapCompression::Decompress (const BitmapReplacement& rBitmapData) const
{
- return dynamic_cast<const DummyReplacement&>(rBitmapData).mpPreview;
+ return dynamic_cast<const DummyReplacement&>(rBitmapData).maPreview;
}
@@ -93,8 +80,7 @@ bool NoBitmapCompression::IsLossless (void) const
//===== CompressionByDeletion =================================================
-::boost::shared_ptr<BitmapReplacement> CompressionByDeletion::Compress (
- const ::boost::shared_ptr<BitmapEx>& ) const
+::boost::shared_ptr<BitmapReplacement> CompressionByDeletion::Compress (const Bitmap& ) const
{
return ::boost::shared_ptr<BitmapReplacement>();
}
@@ -102,12 +88,11 @@ bool NoBitmapCompression::IsLossless (void) const
-::boost::shared_ptr<BitmapEx> CompressionByDeletion::Decompress (
- const BitmapReplacement& ) const
+Bitmap CompressionByDeletion::Decompress (const BitmapReplacement& ) const
{
// Return a NULL pointer. This will eventually lead to a request for
// the creation of a new one.
- return ::boost::shared_ptr<BitmapEx>();
+ return Bitmap();
}
@@ -128,11 +113,10 @@ bool CompressionByDeletion::IsLossless (void) const
class ResolutionReduction::ResolutionReducedReplacement : public BitmapReplacement
{
public:
- ::boost::shared_ptr<BitmapEx> mpPreview;
+ Bitmap maPreview;
Size maOriginalSize;
virtual ~ResolutionReducedReplacement();
-
virtual sal_Int32 GetMemorySize (void) const;
};
@@ -142,23 +126,20 @@ ResolutionReduction::ResolutionReducedReplacement::~ResolutionReducedReplacement
sal_Int32 ResolutionReduction::ResolutionReducedReplacement::GetMemorySize (void) const
{
- if (mpPreview.get() != NULL)
- return mpPreview->GetSizeBytes();
- else
- return 0;
+ return maPreview.GetSizeBytes();
}
::boost::shared_ptr<BitmapReplacement> ResolutionReduction::Compress (
- const ::boost::shared_ptr<BitmapEx>& rpBitmap) const
+ const Bitmap& rBitmap) const
{
ResolutionReducedReplacement* pResult = new ResolutionReducedReplacement();
- pResult->mpPreview.reset(new BitmapEx(*rpBitmap));
- Size aSize (rpBitmap->GetSizePixel());
+ pResult->maPreview = rBitmap;
+ Size aSize (rBitmap.GetSizePixel());
pResult->maOriginalSize = aSize;
if (aSize.Width()>0 && aSize.Width()<mnWidth)
{
int nHeight = aSize.Height() * mnWidth / aSize.Width() ;
- pResult->mpPreview->Scale(Size(mnWidth,nHeight));
+ pResult->maPreview.Scale(Size(mnWidth,nHeight));
}
return ::boost::shared_ptr<BitmapReplacement>(pResult);
@@ -167,22 +148,21 @@ sal_Int32 ResolutionReduction::ResolutionReducedReplacement::GetMemorySize (void
-::boost::shared_ptr<BitmapEx> ResolutionReduction::Decompress (
- const BitmapReplacement& rBitmapData) const
+Bitmap ResolutionReduction::Decompress (const BitmapReplacement& rBitmapData) const
{
- ::boost::shared_ptr<BitmapEx> pResult;
+ Bitmap aResult;
const ResolutionReducedReplacement* pData (
dynamic_cast<const ResolutionReducedReplacement*>(&rBitmapData));
- if (pData->mpPreview.get() != NULL)
+ if ( ! pData->maPreview.IsEmpty())
{
- pResult.reset(new BitmapEx(*pData->mpPreview));
+ aResult = pData->maPreview;
if (pData->maOriginalSize.Width() > mnWidth)
- pResult->Scale(pData->maOriginalSize);
+ aResult.Scale(pData->maOriginalSize);
}
- return pResult;
+ return aResult;
}
@@ -223,15 +203,14 @@ public:
-::boost::shared_ptr<BitmapReplacement> PngCompression::Compress (
- const ::boost::shared_ptr<BitmapEx>& rpBitmap) const
+::boost::shared_ptr<BitmapReplacement> PngCompression::Compress (const Bitmap& rBitmap) const
{
- ::vcl::PNGWriter aWriter (*rpBitmap);
+ ::vcl::PNGWriter aWriter (rBitmap);
SvMemoryStream aStream (32768, 32768);
aWriter.Write(aStream);
PngReplacement* pResult = new PngReplacement();
- pResult->maImageSize = rpBitmap->GetSizePixel();
+ pResult->maImageSize = rBitmap.GetSizePixel();
pResult->mnDataSize = aStream.Tell();
pResult->mpData = new char[pResult->mnDataSize];
memcpy(pResult->mpData, aStream.GetData(), pResult->mnDataSize);
@@ -242,21 +221,19 @@ public:
-::boost::shared_ptr<BitmapEx> PngCompression::Decompress (
+Bitmap PngCompression::Decompress (
const BitmapReplacement& rBitmapData) const
{
- BitmapEx* pResult = NULL;
+ Bitmap aResult;
const PngReplacement* pData (dynamic_cast<const PngReplacement*>(&rBitmapData));
if (pData != NULL)
{
SvMemoryStream aStream (pData->mpData, pData->mnDataSize, STREAM_READ);
::vcl::PNGReader aReader (aStream);
- pResult = new BitmapEx(aReader.Read());
+ aResult = aReader.Read().GetBitmap();
}
-// sal_Int32 nRatio ((100L * (ULONG)pResult->GetSizeBytes()) / (ULONG)pData->mnDataSize);
-
- return ::boost::shared_ptr<BitmapEx>(pResult);
+ return aResult;
}
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx
index cd564ddddcfd..35184449bfe2 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx
@@ -32,7 +32,8 @@
#include <tools/gen.hxx>
#include <boost/shared_ptr.hpp>
-class BitmapEx;
+
+class Bitmap;
namespace sd { namespace slidesorter { namespace cache {
@@ -48,8 +49,7 @@ public:
/** Compress the given bitmap into a replacement format that is specific
to the compressor class.
*/
- virtual ::boost::shared_ptr<BitmapReplacement> Compress (
- const ::boost::shared_ptr<BitmapEx>& rpBitmap) const = 0;
+ virtual ::boost::shared_ptr<BitmapReplacement> Compress (const Bitmap& rBitmap) const = 0;
/** Decompress the given replacement data into a preview bitmap.
Depending on the compression technique the returned bitmap may
@@ -58,7 +58,7 @@ public:
task of the caller to create a new preview bitmap if the returned
one is not as desired.
*/
- virtual ::boost::shared_ptr<BitmapEx> Decompress (const BitmapReplacement& rBitmapData)const=0;
+ virtual Bitmap Decompress (const BitmapReplacement& rBitmapData)const=0;
/** Return whether the compression and decompression is lossless. This
value is used by the caller of Decompress() to decide whether to use
@@ -91,9 +91,8 @@ class NoBitmapCompression
{
class DummyReplacement;
public:
- virtual ::boost::shared_ptr<BitmapReplacement> Compress (
- const ::boost::shared_ptr<BitmapEx>& rpBitmap) const;
- virtual ::boost::shared_ptr<BitmapEx> Decompress (const BitmapReplacement& rBitmapData) const;
+ virtual ::boost::shared_ptr<BitmapReplacement> Compress (const Bitmap& rpBitmap) const;
+ virtual Bitmap Decompress (const BitmapReplacement& rBitmapData) const;
virtual bool IsLossless (void) const;
};
@@ -109,9 +108,8 @@ class CompressionByDeletion
: public BitmapCompressor
{
public:
- virtual ::boost::shared_ptr<BitmapReplacement> Compress (
- const ::boost::shared_ptr<BitmapEx>& rpBitmap) const;
- virtual ::boost::shared_ptr<BitmapEx> Decompress (const BitmapReplacement& rBitmapData) const;
+ virtual ::boost::shared_ptr<BitmapReplacement> Compress (const Bitmap& rBitmap) const;
+ virtual Bitmap Decompress (const BitmapReplacement& rBitmapData) const;
virtual bool IsLossless (void) const;
};
@@ -129,11 +127,10 @@ class ResolutionReduction
class ResolutionReducedReplacement;
static const sal_Int32 mnWidth = 100;
public:
- virtual ::boost::shared_ptr<BitmapReplacement> Compress (
- const ::boost::shared_ptr<BitmapEx>& rpBitmap) const;
+ virtual ::boost::shared_ptr<BitmapReplacement> Compress (const Bitmap& rpBitmap) const;
/** Scale the replacement bitmap up to the original size.
*/
- virtual ::boost::shared_ptr<BitmapEx> Decompress (const BitmapReplacement& rBitmapData) const;
+ virtual Bitmap Decompress (const BitmapReplacement& rBitmapData) const;
virtual bool IsLossless (void) const;
};
@@ -148,9 +145,8 @@ class PngCompression
{
class PngReplacement;
public:
- virtual ::boost::shared_ptr<BitmapReplacement> Compress (
- const ::boost::shared_ptr<BitmapEx>& rpBitmap) const;
- virtual ::boost::shared_ptr<BitmapEx> Decompress (const BitmapReplacement& rBitmapData) const;
+ virtual ::boost::shared_ptr<BitmapReplacement> Compress (const Bitmap& rBitmap) const;
+ virtual Bitmap Decompress (const BitmapReplacement& rBitmapData) const;
virtual bool IsLossless (void) const;
};
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
index 5ad30ef43c1f..8abba77faf4f 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
@@ -24,8 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
#include "precompiled_sd.hxx"
@@ -33,12 +31,19 @@
#include "PreviewRenderer.hxx"
#include "view/SlideSorterView.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
#include "sdpage.hxx"
#include "Window.hxx"
+#include <drawdoc.hxx>
+#include "DrawDocShell.hxx"
#include <svx/svdtypes.hxx>
#include <svx/svdpage.hxx>
#include <vcl/bitmapex.hxx>
+#include <vcl/bmpacc.hxx>
+#include <vcl/pngwrite.hxx>
+
+const static sal_Int32 gnSuperSampleFactor (2);
+const static bool gbAllowSuperSampling (false);
+
namespace sd { namespace slidesorter { namespace view {
class SlideSorterView;
@@ -48,7 +53,7 @@ class PageObjectViewObjectContact;
namespace sd { namespace slidesorter { namespace cache {
BitmapFactory::BitmapFactory (void)
- : maRenderer(NULL,false)
+ : maRenderer(NULL, false)
{
}
@@ -62,16 +67,30 @@ BitmapFactory::~BitmapFactory (void)
-::boost::shared_ptr<BitmapEx> BitmapFactory::CreateBitmap (
+Bitmap BitmapFactory::CreateBitmap (
const SdPage& rPage,
- const Size& rPixelSize)
+ const Size& rPixelSize,
+ const bool bDoSuperSampling)
{
- Image aPreview (maRenderer.RenderPage (
+ Size aSize (rPixelSize);
+ if (bDoSuperSampling && gbAllowSuperSampling)
+ {
+ aSize.Width() *= gnSuperSampleFactor;
+ aSize.Height() *= gnSuperSampleFactor;
+ }
+
+ Bitmap aPreview (maRenderer.RenderPage (
&rPage,
- rPixelSize,
- String()));
-
- return ::boost::shared_ptr<BitmapEx>(new BitmapEx(aPreview.GetBitmapEx()));
+ aSize,
+ String(),
+ true,
+ false).GetBitmapEx().GetBitmap());
+ if (bDoSuperSampling && gbAllowSuperSampling)
+ {
+ aPreview.Scale(rPixelSize, BMP_SCALE_INTERPOLATE);
+ }
+
+ return aPreview;
}
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx
index 87cd1f268f80..7e6aca940ec6 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx
@@ -31,7 +31,6 @@
#include "PreviewRenderer.hxx"
#include <boost/shared_ptr.hpp>
-class BitmapEx;
class SdPage;
class Size;
@@ -50,9 +49,10 @@ public:
BitmapFactory (void);
~BitmapFactory (void);
- ::boost::shared_ptr<BitmapEx> CreateBitmap (
+ Bitmap CreateBitmap (
const SdPage& rPage,
- const Size& rPixelSize);
+ const Size& rPixelSize,
+ const bool bDoSuperSampling);
private:
PreviewRenderer maRenderer;
diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
index 780a429df29e..f7fb30a4c6ec 100755..100644
--- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
@@ -24,8 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
#include "precompiled_sd.hxx"
@@ -37,20 +35,27 @@
#include "cache/SlsPageCacheManager.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
#include "controller/SlideSorterController.hxx"
+
namespace sd { namespace slidesorter { namespace cache {
GenericPageCache::GenericPageCache (
const Size& rPreviewSize,
+ const bool bDoSuperSampling,
const SharedCacheContext& rpCacheContext)
: mpBitmapCache(),
maRequestQueue(rpCacheContext),
mpQueueProcessor(),
mpCacheContext(rpCacheContext),
- maPreviewSize(rPreviewSize)
+ maPreviewSize(rPreviewSize),
+ mbDoSuperSampling(bDoSuperSampling)
{
+ // A large size may indicate an error of the caller. After all we
+ // are creating previews.
+ DBG_ASSERT (maPreviewSize.Width()<1000 && maPreviewSize.Height()<1000,
+ "GenericPageCache<>::GetPreviewBitmap(): bitmap requested with large width. "
+ "This may indicate an error.");
}
@@ -58,14 +63,12 @@ GenericPageCache::GenericPageCache (
GenericPageCache::~GenericPageCache (void)
{
- OSL_TRACE("terminating queue processor %p", mpQueueProcessor.get());
if (mpQueueProcessor.get() != NULL)
mpQueueProcessor->Stop();
maRequestQueue.Clear();
if (mpQueueProcessor.get() != NULL)
mpQueueProcessor->Terminate();
mpQueueProcessor.reset();
- OSL_TRACE("queue processor stopped and terminated");
if (mpBitmapCache.get() != NULL)
PageCacheManager::Instance()->ReleaseCache(mpBitmapCache);
@@ -87,62 +90,69 @@ void GenericPageCache::ProvideCacheAndProcessor (void)
maRequestQueue,
mpBitmapCache,
maPreviewSize,
+ mbDoSuperSampling,
mpCacheContext));
}
-void GenericPageCache::ChangePreviewSize (const Size& rPreviewSize)
+void GenericPageCache::ChangePreviewSize (
+ const Size& rPreviewSize,
+ const bool bDoSuperSampling)
{
- if (rPreviewSize != maPreviewSize)
+ if (rPreviewSize!=maPreviewSize || bDoSuperSampling!=mbDoSuperSampling)
{
+ // A large size may indicate an error of the caller. After all we
+ // are creating previews.
+ DBG_ASSERT (maPreviewSize.Width()<1000 && maPreviewSize.Height()<1000,
+ "GenericPageCache<>::GetPreviewBitmap(): bitmap requested with large width. "
+ "This may indicate an error.");
+
if (mpBitmapCache.get() != NULL)
{
mpBitmapCache = PageCacheManager::Instance()->ChangeSize(
mpBitmapCache, maPreviewSize, rPreviewSize);
if (mpQueueProcessor.get() != NULL)
{
- mpQueueProcessor->SetPreviewSize(rPreviewSize);
+ mpQueueProcessor->SetPreviewSize(rPreviewSize, bDoSuperSampling);
mpQueueProcessor->SetBitmapCache(mpBitmapCache);
}
}
maPreviewSize = rPreviewSize;
+ mbDoSuperSampling = bDoSuperSampling;
}
}
-BitmapEx GenericPageCache::GetPreviewBitmap (
- CacheKey aKey,
- const Size& rSize)
+Bitmap GenericPageCache::GetPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize)
{
OSL_ASSERT(aKey != NULL);
- BitmapEx aPreview;
+ Bitmap aPreview;
bool bMayBeUpToDate = true;
ProvideCacheAndProcessor();
const SdrPage* pPage = mpCacheContext->GetPage(aKey);
if (mpBitmapCache->HasBitmap(pPage))
{
- ::boost::shared_ptr<BitmapEx> pPreview(mpBitmapCache->GetBitmap(pPage));
- OSL_ASSERT(pPreview.get() != NULL);
- aPreview = *pPreview;
- Size aBitmapSize (aPreview.GetSizePixel());
- if (aBitmapSize != rSize)
+ aPreview = mpBitmapCache->GetBitmap(pPage);
+ const Size aBitmapSize (aPreview.GetSizePixel());
+ if (aBitmapSize != maPreviewSize)
{
- // The bitmap has the wrong size.
- DBG_ASSERT (rSize.Width() < 1000,
- "GenericPageCache<>::GetPreviewBitmap(): bitmap requested with large width. "
- "This may indicate an error.");
-
// Scale the bitmap to the desired size when that is possible,
// i.e. the bitmap is not empty.
- if (aBitmapSize.Width()>0 && aBitmapSize.Height()>0)
- aPreview.Scale (rSize, BMP_SCALE_FAST);
+ if (bResize && aBitmapSize.Width()>0 && aBitmapSize.Height()>0)
+ {
+ aPreview.Scale(maPreviewSize, BMP_SCALE_FAST);
+ }
+ bMayBeUpToDate = false;
}
- bMayBeUpToDate = true;
+ else
+ bMayBeUpToDate = true;
}
else
bMayBeUpToDate = false;
@@ -150,7 +160,7 @@ BitmapEx GenericPageCache::GetPreviewBitmap (
// Request the creation of a correctly sized preview bitmap. We do this
// even when the size of the bitmap in the cache is correct because its
// content may be not up-to-date anymore.
- RequestPreviewBitmap(aKey, rSize, bMayBeUpToDate);
+ RequestPreviewBitmap(aKey, bMayBeUpToDate);
return aPreview;
}
@@ -158,10 +168,49 @@ BitmapEx GenericPageCache::GetPreviewBitmap (
+Bitmap GenericPageCache::GetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize)
+{
+ OSL_ASSERT(aKey != NULL);
+
+ ProvideCacheAndProcessor();
+ const SdrPage* pPage = mpCacheContext->GetPage(aKey);
+ Bitmap aMarkedPreview (mpBitmapCache->GetMarkedBitmap(pPage));
+ const Size aBitmapSize (aMarkedPreview.GetSizePixel());
+ if (bResize && aBitmapSize != maPreviewSize)
+ {
+ // Scale the bitmap to the desired size when that is possible,
+ // i.e. the bitmap is not empty.
+ if (aBitmapSize.Width()>0 && aBitmapSize.Height()>0)
+ {
+ aMarkedPreview.Scale(maPreviewSize, BMP_SCALE_FAST);
+ }
+ }
+
+ return aMarkedPreview;
+}
+
+
+
+
+void GenericPageCache::SetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const Bitmap& rMarkedBitmap)
+{
+ OSL_ASSERT(aKey != NULL);
+
+ ProvideCacheAndProcessor();
+ const SdrPage* pPage = mpCacheContext->GetPage(aKey);
+ mpBitmapCache->SetMarkedBitmap(pPage, rMarkedBitmap);
+}
+
+
+
+
void GenericPageCache::RequestPreviewBitmap (
- CacheKey aKey,
- const Size& rSize,
- bool bMayBeUpToDate)
+ const CacheKey aKey,
+ const bool bMayBeUpToDate)
{
OSL_ASSERT(aKey != NULL);
@@ -175,8 +224,8 @@ void GenericPageCache::RequestPreviewBitmap (
bIsUpToDate = mpBitmapCache->BitmapIsUpToDate (pPage);
if (bIsUpToDate)
{
- ::boost::shared_ptr<BitmapEx> pPreview (mpBitmapCache->GetBitmap(pPage));
- if (pPreview.get()==NULL || pPreview->GetSizePixel()!=rSize)
+ const Bitmap aPreview (mpBitmapCache->GetBitmap(pPage));
+ if (aPreview.IsEmpty() || aPreview.GetSizePixel()!=maPreviewSize)
bIsUpToDate = false;
}
@@ -199,7 +248,25 @@ void GenericPageCache::RequestPreviewBitmap (
-void GenericPageCache::ReleasePreviewBitmap (CacheKey aKey)
+bool GenericPageCache::InvalidatePreviewBitmap (const CacheKey aKey)
+{
+ // Invalidate the page in all caches that reference it, not just this one.
+ ::boost::shared_ptr<cache::PageCacheManager> pCacheManager (
+ cache::PageCacheManager::Instance());
+ if (pCacheManager)
+ return pCacheManager->InvalidatePreviewBitmap(
+ mpCacheContext->GetModel(),
+ aKey);
+ else if (mpBitmapCache.get() != NULL)
+ return mpBitmapCache->InvalidateBitmap(mpCacheContext->GetPage(aKey));
+ else
+ return false;
+}
+
+
+
+
+void GenericPageCache::ReleasePreviewBitmap (const CacheKey aKey)
{
if (mpBitmapCache.get() != NULL)
{
@@ -233,9 +300,9 @@ void GenericPageCache::ReleasePreviewBitmap (CacheKey aKey)
-void GenericPageCache::InvalidateCache (bool bUpdateCache)
+void GenericPageCache::InvalidateCache (const bool bUpdateCache)
{
- if (mpBitmapCache.get() != NULL)
+ if (mpBitmapCache)
{
// When the cache is being invalidated then it makes no sense to
// continue creating preview bitmaps. However, this may be
@@ -255,7 +322,9 @@ void GenericPageCache::InvalidateCache (bool bUpdateCache)
-void GenericPageCache::SetPreciousFlag (CacheKey aKey, bool bIsPrecious)
+void GenericPageCache::SetPreciousFlag (
+ const CacheKey aKey,
+ const bool bIsPrecious)
{
ProvideCacheAndProcessor();
diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
index 89fc657004e8..96636576f79a 100755..100644
--- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
@@ -30,8 +30,6 @@
#include "SlideSorter.hxx"
#include "SlsRequestQueue.hxx"
-#include "SlsQueueProcessor.hxx"
-#include <boost/function.hpp>
#include <boost/scoped_ptr.hpp>
namespace sd { namespace slidesorter { namespace cache {
@@ -44,12 +42,18 @@ class QueueProcessor;
class GenericPageCache
{
public:
- /** The page chache is created with references both to the SlideSorter.
- This allows access to both view and model and the cache can so fill
- itself with requests for all or just the visible pages.
+ /** The page chache is created with a reference to the SlideSorter and
+ thus has access to both view and model. This allows the cache to
+ fill itself with requests for all pages or just the visible ones.
+ @param rPreviewSize
+ The size of the previews is expected in pixel values.
+ @param bDoSuperSampling
+ When <TRUE/> the previews are rendered larger and then scaled
+ down to the requested size to improve image quality.
*/
GenericPageCache (
const Size& rPreviewSize,
+ const bool bDoSuperSampling,
const SharedCacheContext& rpCacheContext);
~GenericPageCache (void);
@@ -58,10 +62,12 @@ public:
resize of the slide sorter window or a change of the number of
columns.
*/
- void ChangePreviewSize (const Size& rPreviewSize);
+ void ChangePreviewSize (
+ const Size& rPreviewSize,
+ const bool bDoSuperSampling);
/** Request a preview bitmap for the specified page object in the
- specified size. The returned bitmap may be preview of the preview,
+ specified size. The returned bitmap may be a preview of the preview,
i.e. either a scaled (up or down) version of a previous preview (of
the wrong size) or an empty bitmap. In this case a request for the
generation of a new preview is created and inserted into the request
@@ -70,53 +76,67 @@ public:
receives the correctly sized preview bitmap.
@param rRequestData
This data is used to determine the preview.
- @param rSize
- The size of the requested preview bitmap.
+ @param bResize
+ When <TRUE/> then when the available bitmap has not the
+ requested size, it is scaled before it is returned. When
+ <FALSE/> then the bitmap is returned in the wrong size and it is
+ the task of the caller to scale it.
@return
Returns a bitmap that is either empty, contains a scaled (up or
down) version or is the requested bitmap.
*/
- BitmapEx GetPreviewBitmap (
- CacheKey aKey,
- const Size& rSize);
+ Bitmap GetPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize);
+ Bitmap GetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize);
+ void SetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const Bitmap& rMarkedBitmap);
/** When the requested preview bitmap does not yet exist or is not
up-to-date then the rendering of one is scheduled. Otherwise this
method does nothing.
@param rRequestData
This data is used to determine the preview.
- @param rSize
- The size of the requested preview bitmap in pixel coordinates.
@param bMayBeUpToDate
This flag helps the method to determine whether an existing
preview that matches the request is up to date. If the caller
- know that it is not then by passing <FALSE/> he tells us that we
+ knows that it is not then by passing <FALSE/> he tells us that we
do not have to check the up-to-date flag a second time. If
- unsure pass <TRUE/>.
+ unsure use <TRUE/>.
*/
void RequestPreviewBitmap (
- CacheKey aKey,
- const Size& rSize,
- bool bMayBeUpToDate = true);
+ const CacheKey aKey,
+ const bool bMayBeUpToDate = true);
+
+ /** Tell the cache to replace the bitmap associated with the given
+ request data with a new one that reflects recent changes in the
+ content of the page object.
+ @return
+ When the key is kown then return <TRUE/>.
+ */
+ bool InvalidatePreviewBitmap (const CacheKey aKey);
/** Call this method when a view-object-contact object is being deleted
and does not need (a) its current bitmap in the cache and (b) a
requested a new bitmap.
*/
- void ReleasePreviewBitmap (CacheKey aKey);
+ void ReleasePreviewBitmap (const CacheKey aKey);
/** Call this method when all preview bitmaps have to be generated anew.
This is the case when the size of the page objects on the screen has
changed or when the model has changed.
*/
- void InvalidateCache (bool bUpdateCache);
+ void InvalidateCache (const bool bUpdateCache);
/** With the precious flag you can control whether a bitmap can be
removed from the cache or reduced in size to make room for other
bitmaps or is so precious that it will not be touched. A typical
use is to set the precious flag for the visible pages.
*/
- void SetPreciousFlag (CacheKey aKey, bool bIsPrecious);
+ void SetPreciousFlag (const CacheKey aKey, const bool bIsPrecious);
void Pause (void);
void Resume (void);
@@ -134,6 +154,8 @@ private:
*/
Size maPreviewSize;
+ bool mbDoSuperSampling;
+
/** Both bitmap cache and queue processor are created on demand by this
method.
*/
diff --git a/sd/source/ui/slidesorter/cache/SlsPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
index 714e1f008329..e51630ec79ac 100755..100644
--- a/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
@@ -44,10 +44,12 @@ namespace sd { namespace slidesorter { namespace cache {
PageCache::PageCache (
const Size& rPreviewSize,
+ const bool bDoSuperSampling,
const SharedCacheContext& rpCacheContext)
: mpImplementation(
new GenericPageCache(
rPreviewSize,
+ bDoSuperSampling,
rpCacheContext))
{
}
@@ -62,26 +64,66 @@ PageCache::~PageCache (void)
-void PageCache::ChangeSize(const Size& rPreviewSize)
+void PageCache::ChangeSize (
+ const Size& rPreviewSize,
+ const bool bDoSuperSampling)
+{
+ mpImplementation->ChangePreviewSize(rPreviewSize, bDoSuperSampling);
+}
+
+
+
+
+Bitmap PageCache::GetPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize)
+{
+ return mpImplementation->GetPreviewBitmap(aKey, bResize);
+}
+
+
+
+
+Bitmap PageCache::GetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize)
+{
+ return mpImplementation->GetMarkedPreviewBitmap(aKey, bResize);
+}
+
+
+
+
+void PageCache::SetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const Bitmap& rMarkedBitmap)
+{
+ mpImplementation->SetMarkedPreviewBitmap(aKey, rMarkedBitmap);
+}
+
+
+
+
+void PageCache::RequestPreviewBitmap (const CacheKey aKey)
{
- mpImplementation->ChangePreviewSize(rPreviewSize);
+ return mpImplementation->RequestPreviewBitmap(aKey);
}
-BitmapEx PageCache::GetPreviewBitmap (
- CacheKey aKey,
- const Size& rSize)
+void PageCache::InvalidatePreviewBitmap (
+ const CacheKey aKey,
+ const bool bRequestPreview)
{
- return mpImplementation->GetPreviewBitmap(aKey, rSize);
+ if (mpImplementation->InvalidatePreviewBitmap(aKey) && bRequestPreview)
+ RequestPreviewBitmap(aKey);
}
-void PageCache::ReleasePreviewBitmap (
- CacheKey aKey)
+void PageCache::ReleasePreviewBitmap (const CacheKey aKey)
{
mpImplementation->ReleasePreviewBitmap(aKey);
}
@@ -89,7 +131,7 @@ void PageCache::ReleasePreviewBitmap (
-void PageCache::InvalidateCache (bool bUpdateCache)
+void PageCache::InvalidateCache (const bool bUpdateCache)
{
mpImplementation->InvalidateCache(bUpdateCache);
}
@@ -98,8 +140,8 @@ void PageCache::InvalidateCache (bool bUpdateCache)
void PageCache::SetPreciousFlag (
- CacheKey aKey,
- bool bIsPrecious)
+ const CacheKey aKey,
+ const bool bIsPrecious)
{
mpImplementation->SetPreciousFlag(aKey, bIsPrecious);
}
diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
index 3c8a15892e7c..e3083ecb4aaf 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
@@ -325,7 +325,6 @@ void PageCacheManager::ReleaseCache (const ::boost::shared_ptr<Cache>& rpCache)
mpPageCaches->begin(),
mpPageCaches->end(),
PageCacheContainer::CompareWithCache(rpCache)));
- OSL_ASSERT(iCacheToChange != mpPageCaches->end());
if (iCacheToChange != mpPageCaches->end())
{
OSL_ASSERT(iCacheToChange->second == rpCache);
@@ -342,6 +341,10 @@ void PageCacheManager::ReleaseCache (const ::boost::shared_ptr<Cache>& rpCache)
pResult = rpCache;
}
+ else
+ {
+ OSL_ASSERT(iCacheToChange != mpPageCaches->end());
+ }
}
return pResult;
@@ -350,10 +353,12 @@ void PageCacheManager::ReleaseCache (const ::boost::shared_ptr<Cache>& rpCache)
-void PageCacheManager::InvalidatePreviewBitmap (
+bool PageCacheManager::InvalidatePreviewBitmap (
DocumentKey pDocument,
const SdrPage* pKey)
{
+ bool bHasChanged (false);
+
if (pDocument!=NULL)
{
// Iterate over all caches that are currently in use and invalidate
@@ -361,7 +366,7 @@ void PageCacheManager::InvalidatePreviewBitmap (
PageCacheContainer::iterator iCache;
for (iCache=mpPageCaches->begin(); iCache!=mpPageCaches->end(); ++iCache)
if (iCache->first.mpDocument == pDocument)
- iCache->second->InvalidateBitmap(pKey);
+ bHasChanged |= iCache->second->InvalidateBitmap(pKey);
// Invalidate the previews in the recently used caches belonging to
// the given document.
@@ -370,9 +375,37 @@ void PageCacheManager::InvalidatePreviewBitmap (
{
RecentlyUsedQueue::const_iterator iCache2;
for (iCache2=iQueue->second.begin(); iCache2!=iQueue->second.end(); ++iCache2)
- iCache2->mpCache->InvalidateBitmap(pKey);
+ bHasChanged |= iCache2->mpCache->InvalidateBitmap(pKey);
}
}
+
+ return bHasChanged;
+}
+
+
+
+
+void PageCacheManager::InvalidateAllPreviewBitmaps (DocumentKey pDocument)
+{
+ if (pDocument == NULL)
+ return;
+
+ // Iterate over all caches that are currently in use and invalidate the
+ // previews in those that belong to the document.
+ PageCacheContainer::iterator iCache;
+ for (iCache=mpPageCaches->begin(); iCache!=mpPageCaches->end(); ++iCache)
+ if (iCache->first.mpDocument == pDocument)
+ iCache->second->InvalidateCache();
+
+ // Invalidate the previews in the recently used caches belonging to the
+ // given document.
+ RecentlyUsedPageCaches::iterator iQueue (mpRecentlyUsedPageCaches->find(pDocument));
+ if (iQueue != mpRecentlyUsedPageCaches->end())
+ {
+ RecentlyUsedQueue::const_iterator iCache2;
+ for (iCache2=iQueue->second.begin(); iCache2!=iQueue->second.end(); ++iCache2)
+ iCache2->mpCache->InvalidateCache();
+ }
}
@@ -394,6 +427,16 @@ void PageCacheManager::InvalidateAllCaches (void)
+void PageCacheManager::ReleasePreviewBitmap (const SdrPage* pPage)
+{
+ PageCacheContainer::iterator iCache;
+ for (iCache=mpPageCaches->begin(); iCache!=mpPageCaches->end(); ++iCache)
+ iCache->second->ReleaseBitmap(pPage);
+}
+
+
+
+
::boost::shared_ptr<PageCacheManager::Cache> PageCacheManager::GetRecentlyUsedCache (
DocumentKey pDocument,
const Size& rPreviewSize)
diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
index bec9c7fa369d..86d20d6c8924 100755
--- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
@@ -40,6 +40,7 @@ QueueProcessor::QueueProcessor (
RequestQueue& rQueue,
const ::boost::shared_ptr<BitmapCache>& rpCache,
const Size& rPreviewSize,
+ const bool bDoSuperSampling,
const SharedCacheContext& rpCacheContext)
: maMutex(),
maTimer(),
@@ -47,6 +48,7 @@ QueueProcessor::QueueProcessor (
mnTimeBetweenLowPriorityRequests (100/*ms*/),
mnTimeBetweenRequestsWhenNotIdle (1000/*ms*/),
maPreviewSize(rPreviewSize),
+ mbDoSuperSampling(bDoSuperSampling),
mpCacheContext(rpCacheContext),
mrQueue(rQueue),
mpCache(rpCache),
@@ -136,9 +138,12 @@ void QueueProcessor::Terminate (void)
-void QueueProcessor::SetPreviewSize (const Size& rPreviewSize)
+void QueueProcessor::SetPreviewSize (
+ const Size& rPreviewSize,
+ const bool bDoSuperSampling)
{
maPreviewSize = rPreviewSize;
+ mbDoSuperSampling = bDoSuperSampling;
}
@@ -207,15 +212,12 @@ void QueueProcessor::ProcessOneRequest (
const SdPage* pSdPage = dynamic_cast<const SdPage*>(mpCacheContext->GetPage(aKey));
if (pSdPage != NULL)
{
- const ::boost::shared_ptr<BitmapEx> pPreview (
- maBitmapFactory.CreateBitmap(*pSdPage, maPreviewSize));
- mpCache->SetBitmap (
- pSdPage,
- pPreview,
- ePriorityClass!=NOT_VISIBLE);
+ const Bitmap aPreview (
+ maBitmapFactory.CreateBitmap(*pSdPage, maPreviewSize, mbDoSuperSampling));
+ mpCache->SetBitmap (pSdPage, aPreview, ePriorityClass!=NOT_VISIBLE);
// Initiate a repaint of the new preview.
- mpCacheContext->NotifyPreviewCreation(aKey, pPreview);
+ mpCacheContext->NotifyPreviewCreation(aKey, aPreview);
}
}
}
diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx
index e42ad092d0e2..f84b774c4280 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx
@@ -31,9 +31,7 @@
#include "cache/SlsPageCache.hxx"
#include "SlsRequestPriorityClass.hxx"
#include "SlsBitmapFactory.hxx"
-#include "view/SlsPageObject.hxx"
#include "view/SlideSorterView.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
#include "tools/IdleDetection.hxx"
#include "SlsBitmapCache.hxx"
#include "sdpage.hxx"
@@ -71,6 +69,7 @@ public:
RequestQueue& rQueue,
const ::boost::shared_ptr<BitmapCache>& rpCache,
const Size& rPreviewSize,
+ const bool bDoSuperSampling,
const SharedCacheContext& rpCacheContext);
virtual ~QueueProcessor();
@@ -90,7 +89,9 @@ public:
void Terminate (void);
- void SetPreviewSize (const Size& rSize);
+ void SetPreviewSize (
+ const Size& rSize,
+ const bool bDoSuperSampling);
/** As we can not really terminate the rendering of a preview bitmap for
a request in midair this method acts more like a semaphor. It
@@ -118,6 +119,7 @@ private:
sal_uInt32 mnTimeBetweenLowPriorityRequests;
sal_uInt32 mnTimeBetweenRequestsWhenNotIdle;
Size maPreviewSize;
+ bool mbDoSuperSampling;
SharedCacheContext mpCacheContext;
RequestQueue& mrQueue;
::boost::shared_ptr<BitmapCache> mpCache;
diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessorThread.hxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessorThread.hxx
index 08ca63284ea6..e813a5ac5f2b 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsQueueProcessorThread.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessorThread.hxx
@@ -128,7 +128,6 @@ template <class Queue, class Request, class Cache, class Factory>
mrQueue (rQueue),
mrCache (rCache)
{
- OSL_TRACE("QueueProcessorThread::constructor %p", this);
create();
}
@@ -139,7 +138,6 @@ template <class Queue, class Request, class Cache, class Factory>
QueueProcessorThread<Queue, Request, Cache, Factory>
::~QueueProcessorThread (void)
{
- OSL_TRACE("QueueProcessorThread::destructor %p", this);
}
@@ -148,16 +146,12 @@ template <class Queue, class Request, class Cache, class Factory>
template <class Queue, class Request, class Cache, class Factory>
void SAL_CALL QueueProcessorThread<Queue, Request, Cache, Factory>::run (void)
{
- OSL_TRACE("QueueProcessorThread::run(): running thread %p", this);
while ( ! mbIsTerminated)
{
- OSL_TRACE("QueueProcessorThread::run(): still running thread %p: %d", this, mbIsTerminated?1:0);
if (mrQueue.IsEmpty())
{
// Sleep while the queue is empty.
- OSL_TRACE("QueueProcessorThread::run(): suspending thread %p", this);
suspend();
- OSL_TRACE("QueueProcessorThread::run(): running again thread %p", this);
}
else if (GetpApp()->AnyInput())
@@ -168,19 +162,15 @@ void SAL_CALL QueueProcessorThread<Queue, Request, Cache, Factory>::run (void)
TimeValue aTimeToWait;
aTimeToWait.Seconds = 0;
aTimeToWait.Nanosec = 50*1000*1000;
- OSL_TRACE("QueueProcessorThread::run(): input pending: waiting %d nanoseconds",
- aTimeToWait.Nanosec);
wait (aTimeToWait);
}
else
{
- OSL_TRACE ("QueueProcessorThread::run(): Processing Query");
ProcessQueueEntry();
yield ();
}
}
- OSL_TRACE("QueueProcessorThread::run(): exiting run %p", this);
}
@@ -196,7 +186,6 @@ void QueueProcessorThread<Queue, Request, Cache, Factory>
do
{
- OSL_TRACE ("QueueProcessorThread::ProcessQueueEntry(): testing for mbIsTerminated %p", this);
{
::osl::MutexGuard aGuard (maMutex);
if (mbIsTerminated)
@@ -204,7 +193,6 @@ void QueueProcessorThread<Queue, Request, Cache, Factory>
if (mrQueue.IsEmpty())
break;
}
- OSL_TRACE ("QueueProcessorThread::ProcessQueueEntry():acquiring mutex for bitmap creation %p", this);
::vos::OGuard aSolarGuard (Application::GetSolarMutex());
::osl::MutexGuard aGuard (maMutex);
if (mbIsTerminated)
@@ -213,18 +201,12 @@ void QueueProcessorThread<Queue, Request, Cache, Factory>
if (mrQueue.IsEmpty())
break;
- OSL_TRACE ("QueueProcessorThread::ProcessQueueEntry(): have mutexes %p", this);
-
// Get the requeuest with the highest priority from the queue.
nPriorityClass = mrQueue.GetFrontPriorityClass();
pRequest = &mrQueue.GetFront();
mrQueue.PopFront();
bRequestIsValid = true;
-
- OSL_TRACE ("QueueProcessorThread::ProcessQueueEntry():using request %p for creating bitmap", pRequest);
- OSL_TRACE ("QueueProcessorThread::ProcessQueueEntry():processing request for page %d with priority class ",
- pRequest->GetPage()->GetPageNum(), nPriorityClass);
try
{
// Create a new preview bitmap and store it in the cache.
@@ -260,7 +242,6 @@ void QueueProcessorThread<
Queue, RequestData, BitmapCache, BitmapFactory
>::Start (void)
{
- OSL_TRACE ("QueueProcessorThread::Start %p", this);
resume ();
}
@@ -275,7 +256,6 @@ void QueueProcessorThread<
Queue, RequestData, BitmapCache, BitmapFactory
>::Stop (void)
{
- OSL_TRACE ("QueueProcessorThread::Stop %p", this);
suspend();
}
@@ -290,7 +270,6 @@ void QueueProcessorThread<
Queue, RequestData, BitmapCache, BitmapFactory
>::RemoveRequest (RequestData& rRequest)
{
- OSL_TRACE ("QueueProcessorThread::RemoveRequest %p", this);
// Do nothing else then wait for the mutex to be released.
::osl::MutexGuard aGuard (mrQueue.GetMutex());
}
@@ -307,11 +286,9 @@ void QueueProcessorThread<
>::Terminate (void)
{
// ::vos::OGuard aSolarGuard (Application::GetSolarMutex());
- OSL_TRACE("QueueProcessorThread::Terminate(): terminating thread %p", this);
::osl::Thread::terminate ();
{
::osl::MutexGuard aGuard (maMutex);
- OSL_TRACE("QueueProcessorThread::Terminate(): starting to join %p, %d", this, mbIsTerminated?1:0);
mbIsTerminated = true;
}
Start();
@@ -332,29 +309,6 @@ void SAL_CALL QueueProcessorThread<
{
::osl::MutexGuard aGuard (maMutex);
mbCanBeJoined = true;
- /*
- OSL_TRACE("QueueProcessorThread::Terminate():join %p, %d", this, mbIsTerminated?1:0);
- while (true)
- {
- {
- ::osl::MutexGuard aGuard (maMutex);
- if (mbCanBeJoined)
- break;
- }
- Start();
- TimeValue aTimeToWait;
- aTimeToWait.Seconds = 0;
- aTimeToWait.Nanosec = 50*1000*1000;
- OSL_TRACE("QueueProcessorThread::Terminate(): waiting for join");
- wait (aTimeToWait);
- }
- if (mbCanBeJoined)
- join();
- else
- OSL_TRACE("Can not join");
- OSL_TRACE("QueueProcessorThread::Terminate():terminated thread %p :%d",
- this, mbIsTerminated?1:0);
- */
}
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx b/sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx
index 8030558759f3..166b04661d99 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx
@@ -24,8 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
#include "precompiled_sd.hxx"
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
index ccd590131343..11721e09ecb3 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
@@ -24,8 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
#include "precompiled_sd.hxx"
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index 69c2a02ddc24..8018c71e2b88 100755..100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -39,17 +39,22 @@
#include "SlsSelectionCommand.hxx"
#include "controller/SlsAnimator.hxx"
#include "controller/SlsClipboard.hxx"
+#include "controller/SlsInsertionIndicatorHandler.hxx"
#include "controller/SlsScrollBarManager.hxx"
-#include "controller/SlsPageObjectFactory.hxx"
#include "controller/SlsSelectionManager.hxx"
#include "controller/SlsSlotManager.hxx"
+#include "controller/SlsTransferable.hxx"
+#include "controller/SlsVisibleAreaManager.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "view/SlideSorterView.hxx"
#include "view/SlsLayouter.hxx"
-#include "view/SlsViewOverlay.hxx"
#include "view/SlsFontProvider.hxx"
+#include "view/SlsPageObjectLayouter.hxx"
+#include "view/SlsPageObjectPainter.hxx"
+#include "view/SlsTheme.hxx"
+#include "view/SlsToolTip.hxx"
#include "cache/SlsPageCache.hxx"
#include "cache/SlsPageCacheManager.hxx"
@@ -91,12 +96,12 @@
#include <com/sun/star/drawing/XDrawPages.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::sd::slidesorter::model;
using namespace ::sd::slidesorter::view;
using namespace ::sd::slidesorter::controller;
+using namespace ::basegfx;
namespace sd { namespace slidesorter { namespace controller {
@@ -112,9 +117,12 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter)
mpScrollBarManager(),
mpCurrentSlideManager(),
mpSelectionManager(),
+ mpInsertionIndicatorHandler(new InsertionIndicatorHandler(rSlideSorter)),
mpAnimator(new Animator(rSlideSorter)),
+ mpVisibleAreaManager(new VisibleAreaManager(rSlideSorter)),
mpListener(),
mnModelChangeLockCount(0),
+ mbIsForcedRearrangePending(false),
mbPreModelChangeDone(false),
mbPostModelChangePending(false),
maSelectionBeforeSwitch(),
@@ -122,12 +130,11 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter)
mpEditModeChangeMasterPage(NULL),
maTotalWindowArea(),
mnPaintEntranceCount(0),
- mbIsContextMenuOpen(false),
- mpProperties(new Properties())
+ mbIsContextMenuOpen(false)
{
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- OSL_ASSERT(pWindow!=NULL);
- if (pWindow != NULL)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ OSL_ASSERT(pWindow);
+ if (pWindow)
{
// The whole background is painted by the view and controls.
::Window* pParentWindow = pWindow->GetParent();
@@ -136,22 +143,10 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter)
// Connect the view with the window that has been created by our base
// class.
- pWindow->SetBackground (Wallpaper());
- mrView.AddWindowToPaintView(pWindow);
- mrView.SetActualWin(pWindow);
- pWindow->SetCenterAllowed (false);
- pWindow->SetViewSize (mrView.GetModelArea().GetSize());
- pWindow->EnableRTL(FALSE);
-
- // Reinitialize colors in Properties with window specific values.
- mpProperties->SetBackgroundColor(
- pWindow->GetSettings().GetStyleSettings().GetWindowColor());
- mpProperties->SetTextColor(
- pWindow->GetSettings().GetStyleSettings().GetWindowTextColor());
- mpProperties->SetSelectionColor(
- pWindow->GetSettings().GetStyleSettings().GetMenuHighlightColor());
- mpProperties->SetHighlightColor(
- pWindow->GetSettings().GetStyleSettings().GetMenuHighlightColor());
+ pWindow->SetBackground(Wallpaper());
+ pWindow->SetCenterAllowed(false);
+ pWindow->SetMapMode(MapMode(MAP_PIXEL));
+ pWindow->SetViewSize(mrView.GetModelArea().GetSize());
}
}
@@ -160,8 +155,6 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter)
void SlideSorterController::Init (void)
{
- mrView.HandleModelChange();
-
mpCurrentSlideManager.reset(new CurrentSlideManager(mrSlideSorter));
mpPageSelector.reset(new PageSelector(mrSlideSorter));
mpFocusManager.reset(new FocusManager(mrSlideSorter));
@@ -181,7 +174,7 @@ void SlideSorterController::Init (void)
mpListener = new Listener(mrSlideSorter);
- mpPageSelector->UpdateAllPages();
+ mpPageSelector->GetCoreSelection();
GetSelectionManager()->SelectionHasChanged();
}
@@ -210,17 +203,48 @@ SlideSorterController::~SlideSorterController (void)
+void SlideSorterController::Dispose (void)
+{
+ mpInsertionIndicatorHandler->End(Animator::AM_Immediate);
+ mpSelectionManager.reset();
+ mpAnimator->Dispose();
+}
+
+
+
+
model::SharedPageDescriptor SlideSorterController::GetPageAt (
- const Point& aPixelPosition)
+ const Point& aWindowPosition)
{
- sal_Int32 nHitPageIndex (mrView.GetPageIndexAtPoint(aPixelPosition));
+ sal_Int32 nHitPageIndex (mrView.GetPageIndexAtPoint(aWindowPosition));
model::SharedPageDescriptor pDescriptorAtPoint;
if (nHitPageIndex >= 0)
+ {
pDescriptorAtPoint = mrModel.GetPageDescriptor(nHitPageIndex);
+ // Depending on a property we may have to check that the mouse is no
+ // just over the page object but over the preview area.
+ if (pDescriptorAtPoint
+ && mrSlideSorter.GetProperties()->IsOnlyPreviewTriggersMouseOver()
+ && ! pDescriptorAtPoint->HasState(PageDescriptor::ST_Selected))
+ {
+ // Make sure that the mouse is over the preview area.
+ if ( ! mrView.GetLayouter().GetPageObjectLayouter()->GetBoundingBox(
+ pDescriptorAtPoint,
+ view::PageObjectLayouter::Preview,
+ view::PageObjectLayouter::WindowCoordinateSystem).IsInside(aWindowPosition))
+ {
+ pDescriptorAtPoint.reset();
+ }
+ }
+ }
+
return pDescriptorAtPoint;
}
+
+
+
PageSelector& SlideSorterController::GetPageSelector (void)
{
OSL_ASSERT(mpPageSelector.get()!=NULL);
@@ -284,10 +308,11 @@ ScrollBarManager& SlideSorterController::GetScrollBarManager (void)
-void SlideSorterController::PrePaint()
+::boost::shared_ptr<InsertionIndicatorHandler>
+ SlideSorterController::GetInsertionIndicatorHandler (void) const
{
- // forward VCLs PrePaint window event to DrawingLayer
- mrView.PrePaint();
+ OSL_ASSERT(mpInsertionIndicatorHandler.get()!=NULL);
+ return mpInsertionIndicatorHandler;
}
@@ -297,16 +322,12 @@ void SlideSorterController::Paint (
const Rectangle& rBBox,
::Window* pWindow)
{
- // if (mnPaintEntranceCount == 0)
+ if (mnPaintEntranceCount == 0)
{
++mnPaintEntranceCount;
try
{
- if (GetSelectionManager()->IsMakeSelectionVisiblePending())
- GetSelectionManager()->MakeSelectionVisible();
-
- mrView.SetApplicationDocumentColor(GetProperties()->GetBackgroundColor());
mrView.CompleteRedraw(pWindow, Region(rBBox), 0);
}
catch (const Exception&)
@@ -394,50 +415,64 @@ bool SlideSorterController::Command (
else
nPopupId = RID_SLIDE_SORTER_MASTER_NOSEL_POPUP;
}
-
+ ::boost::scoped_ptr<InsertionIndicatorHandler::ForceShowContext> pContext;
if (pPage == NULL)
{
// When there is no selection, then we show the insertion
// indicator so that the user knows where a page insertion
// would take place.
- mrView.GetOverlay().GetInsertionIndicatorOverlay().SetPosition(
- pWindow->PixelToLogic(rEvent.GetMousePosPixel()));
- mrView.GetOverlay().GetInsertionIndicatorOverlay().setVisible(true);
+ mpInsertionIndicatorHandler->Start(false);
+ mpInsertionIndicatorHandler->UpdateIndicatorIcon(
+ dynamic_cast<Transferable*>(SD_MOD()->pTransferClip));
+ mpInsertionIndicatorHandler->UpdatePosition(
+ pWindow->PixelToLogic(rEvent.GetMousePosPixel()),
+ InsertionIndicatorHandler::MoveMode);
+ pContext.reset(new InsertionIndicatorHandler::ForceShowContext(
+ mpInsertionIndicatorHandler));
}
pWindow->ReleaseMouse();
+
+ Point aMenuLocation (0,0);
if (rEvent.IsMouseEvent())
{
- mbIsContextMenuOpen = true;
- if (pViewShell != NULL)
- {
- SfxDispatcher* pDispatcher = pViewShell->GetDispatcher();
- if (pDispatcher != NULL)
- pDispatcher->ExecutePopup(SdResId(nPopupId));
- }
+ // We have to explicitly specify the location of the menu
+ // when the slide sorter is placed in an undocked child
+ // menu. But when it is docked it does not hurt, so we
+ // specify the location always.
+ aMenuLocation = rEvent.GetMousePosPixel();
}
else
{
// The event is not a mouse event. Use the center of the
// focused page as top left position of the context menu.
- if (pPage != NULL)
+ model::SharedPageDescriptor pDescriptor (
+ GetFocusManager().GetFocusedPageDescriptor());
+ if (pDescriptor.get() != NULL)
{
- model::SharedPageDescriptor pDescriptor (
- GetFocusManager().GetFocusedPageDescriptor());
- if (pDescriptor.get() != NULL)
- {
- Rectangle aBBox (mrView.GetPageBoundingBox (
+ Rectangle aBBox (
+ mrView.GetLayouter().GetPageObjectLayouter()->GetBoundingBox (
pDescriptor,
- view::SlideSorterView::CS_SCREEN,
- view::SlideSorterView::BBT_SHAPE));
- Point aPosition (aBBox.Center());
- mbIsContextMenuOpen = true;
- if (pViewShell != NULL)
- pViewShell->GetViewFrame()->GetDispatcher()->ExecutePopup(
- SdResId(nPopupId),
- pWindow,
- &aPosition);
- }
+ PageObjectLayouter::PageObject,
+ PageObjectLayouter::ModelCoordinateSystem));
+ aMenuLocation = aBBox.Center();
+ }
+ }
+
+ mbIsContextMenuOpen = true;
+ if (pViewShell != NULL)
+ {
+ SfxDispatcher* pDispatcher = pViewShell->GetDispatcher();
+ if (pDispatcher != NULL)
+ {
+ pDispatcher->ExecutePopup(
+ SdResId(nPopupId),
+ pWindow,
+ &aMenuLocation);
+ mrSlideSorter.GetView().UpdatePageUnderMouse(false);
+ ::rtl::Reference<SelectionFunction> pFunction(GetCurrentSelectionFunction());
+ if (pFunction.is())
+ pFunction->ResetMouseAnchor();
}
}
mbIsContextMenuOpen = false;
@@ -447,19 +482,44 @@ bool SlideSorterController::Command (
// it is hidden, so that a pending slide insertion slot call
// finds the right place to insert a new slide.
GetSelectionManager()->SetInsertionPosition(
- mrView.GetOverlay().GetInsertionIndicatorOverlay().GetInsertionPageIndex());
- mrView.GetOverlay().GetInsertionIndicatorOverlay().setVisible(false);
+ GetInsertionIndicatorHandler()->GetInsertionPageIndex());
}
+ pContext.reset();
bEventHasBeenHandled = true;
}
break;
case COMMAND_WHEEL:
{
- // We ignore zooming with control+mouse wheel.
const CommandWheelData* pData = rEvent.GetWheelData();
- if (pData!=NULL && pData->IsMod1())
- bEventHasBeenHandled = true;
+ if (pData == NULL)
+ return false;
+ if (pData->IsMod1())
+ {
+ // We do not support zooming with control+mouse wheel.
+ return false;
+ }
+ // Determine whether to scroll horizontally or vertically. This
+ // depends on the orientation of the scroll bar and the
+ // IsHoriz() flag of the event.
+ if ((mrSlideSorter.GetView().GetOrientation()==view::Layouter::HORIZONTAL)
+ == pData->IsHorz())
+ {
+ GetScrollBarManager().Scroll(
+ ScrollBarManager::Orientation_Vertical,
+ ScrollBarManager::Unit_Slide,
+ -pData->GetNotchDelta());
+ }
+ else
+ {
+ GetScrollBarManager().Scroll(
+ ScrollBarManager::Orientation_Horizontal,
+ ScrollBarManager::Unit_Slide,
+ -pData->GetNotchDelta());
+ }
+ mrSlideSorter.GetView().UpdatePageUnderMouse(rEvent.GetMousePosPixel(), false);
+
+ bEventHasBeenHandled = true;
}
break;
}
@@ -482,7 +542,9 @@ void SlideSorterController::UnlockModelChange (void)
{
mnModelChangeLockCount -= 1;
if (mnModelChangeLockCount==0 && mbPostModelChangePending)
+ {
PostModelChange();
+ }
}
@@ -499,11 +561,9 @@ void SlideSorterController::PreModelChange (void)
mrSlideSorter.GetViewShell()->Broadcast(
ViewShellHint(ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_START));
- mpPageSelector->PrepareModelChange();
GetCurrentSlideManager()->PrepareModelChange();
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- if (pWindow != NULL)
+ if (mrSlideSorter.GetContentWindow())
mrView.PreModelChange();
mbPostModelChangePending = true;
@@ -517,8 +577,8 @@ void SlideSorterController::PostModelChange (void)
mbPostModelChangePending = false;
mrModel.Resync();
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- if (pWindow != NULL)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
{
GetCurrentSlideManager()->HandleModelChange();
@@ -530,11 +590,9 @@ void SlideSorterController::PostModelChange (void)
// The visibility of the scroll bars may have to be changed. Then
// the size of the view has to change, too. Let Rearrange() handle
// that.
- Rearrange();
+ Rearrange(mbIsForcedRearrangePending);
}
- mpPageSelector->HandleModelChange ();
-
if (mrSlideSorter.GetViewShell() != NULL)
mrSlideSorter.GetViewShell()->Broadcast(
ViewShellHint(ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_END));
@@ -564,23 +622,36 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent*, pEvent)
if (pEvent != NULL)
{
::Window* pWindow = pEvent->GetWindow();
- ::sd::Window* pActiveWindow = mrSlideSorter.GetActiveWindow();
+ SharedSdWindow pActiveWindow (mrSlideSorter.GetContentWindow());
switch (pEvent->GetId())
{
case VCLEVENT_WINDOW_ACTIVATE:
case VCLEVENT_WINDOW_SHOW:
- if (pActiveWindow != NULL && pWindow == pActiveWindow->GetParent())
+ if (pActiveWindow && pWindow == pActiveWindow->GetParent())
mrView.RequestRepaint();
break;
+ case VCLEVENT_WINDOW_HIDE:
+ if (pActiveWindow && pWindow == pActiveWindow->GetParent())
+ mrView.SetPageUnderMouse(SharedPageDescriptor());
+ break;
+
case VCLEVENT_WINDOW_GETFOCUS:
- if (pActiveWindow != NULL && pWindow == pActiveWindow)
- GetFocusManager().ShowFocus(false);
+ if (pActiveWindow)
+ if (pWindow == pActiveWindow.get())
+ GetFocusManager().ShowFocus(false);
break;
case VCLEVENT_WINDOW_LOSEFOCUS:
- if (pActiveWindow != NULL && pWindow == pActiveWindow)
+ if (pActiveWindow && pWindow == pActiveWindow.get())
+ {
GetFocusManager().HideFocus();
+ mrView.GetToolTip().Hide();
+
+ // Select the current slide so that it is properly
+ // visualized when the focus is moved to the edit view.
+ GetPageSelector().SelectPage(GetCurrentSlideManager()->GetCurrentSlide());
+ }
break;
case VCLEVENT_APPLICATION_DATACHANGED:
@@ -601,6 +672,11 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent*, pEvent)
// When the system font has changed a layout has to be done.
mrView.Resize();
FontProvider::Instance().Invalidate();
+
+ // Update theme colors.
+ mrSlideSorter.GetProperties()->HandleDataChangeEvent();
+ mrSlideSorter.GetTheme()->Update(mrSlideSorter.GetProperties());
+ mrView.HandleDataChangeEvent();
}
break;
@@ -639,10 +715,9 @@ void SlideSorterController::GetCtrlState (SfxItemSet& rSet)
||rSet.GetItemState(SID_OUTPUT_QUALITY_BLACKWHITE)==SFX_ITEM_AVAILABLE
||rSet.GetItemState(SID_OUTPUT_QUALITY_CONTRAST)==SFX_ITEM_AVAILABLE)
{
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- if (pWindow != NULL)
+ if (mrSlideSorter.GetContentWindow())
{
- ULONG nMode = pWindow->GetDrawMode();
+ ULONG nMode = mrSlideSorter.GetContentWindow()->GetDrawMode();
UINT16 nQuality = 0;
switch (nMode)
@@ -715,7 +790,7 @@ void SlideSorterController::ExecStatusBar (SfxRequest& )
void SlideSorterController::UpdateAllPages (void)
{
// Do a redraw.
- mrView.InvalidateAllWin();
+ mrSlideSorter.GetContentWindow()->Invalidate();
}
@@ -741,20 +816,35 @@ Rectangle SlideSorterController::Rearrange (bool bForce)
{
Rectangle aNewContentArea (maTotalWindowArea);
- ::boost::shared_ptr<sd::Window> pWindow = mrSlideSorter.GetContentWindow();
- if (pWindow.get() != NULL)
+ if (aNewContentArea.IsEmpty())
+ return aNewContentArea;
+
+ if (mnModelChangeLockCount>0)
{
+ mbIsForcedRearrangePending |= bForce;
+ return aNewContentArea;
+ }
+ else
+ mbIsForcedRearrangePending = false;
+
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
+ {
+ if (bForce)
+ mrView.UpdateOrientation();
+
// Place the scroll bars.
- aNewContentArea = GetScrollBarManager().PlaceScrollBars(maTotalWindowArea);
+ aNewContentArea = GetScrollBarManager().PlaceScrollBars(
+ maTotalWindowArea,
+ mrView.GetOrientation() != view::Layouter::VERTICAL,
+ mrView.GetOrientation() != view::Layouter::HORIZONTAL);
bool bSizeHasChanged (false);
// Only when bForce is not true we have to test for a size change in
// order to determine whether the window and the view have to be resized.
if ( ! bForce)
{
- Rectangle aCurrentContentArea (
- pWindow->GetPosPixel(),
- pWindow->GetOutputSizePixel());
+ Rectangle aCurrentContentArea (pWindow->GetPosPixel(), pWindow->GetOutputSizePixel());
bSizeHasChanged = (aNewContentArea != aCurrentContentArea);
}
if (bForce || bSizeHasChanged)
@@ -767,6 +857,11 @@ Rectangle SlideSorterController::Rearrange (bool bForce)
// Adapt the scroll bars to the new zoom factor of the browser
// window and the arrangement of the page objects.
GetScrollBarManager().UpdateScrollBars(false, !bForce);
+
+ // Keep the current slide in the visible area.
+ GetVisibleAreaManager().RequestCurrentSlideVisible();
+
+ mrView.RequestRepaint();
}
return aNewContentArea;
@@ -784,6 +879,15 @@ FunctionReference SlideSorterController::CreateSelectionFunction (SfxRequest& rR
+::rtl::Reference<SelectionFunction> SlideSorterController::GetCurrentSelectionFunction (void)
+{
+ FunctionReference pFunction (mrSlideSorter.GetViewShell()->GetCurrentFunction());
+ return ::rtl::Reference<SelectionFunction>(dynamic_cast<SelectionFunction*>(pFunction.get()));
+}
+
+
+
+
void SlideSorterController::PrepareEditModeChange (void)
{
// Before we throw away the page descriptors we prepare for selecting
@@ -887,8 +991,8 @@ void SlideSorterController::PageNameHasChanged (int nPageIndex, const String& rs
// that of the name change.
do
{
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- if (pWindow == NULL)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if ( ! pWindow)
break;
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
@@ -937,14 +1041,6 @@ bool SlideSorterController::IsContextMenuOpen (void) const
-::boost::shared_ptr<Properties> SlideSorterController::GetProperties (void) const
-{
- return mpProperties;
-}
-
-
-
-
void SlideSorterController::SetDocumentSlides (const Reference<container::XIndexAccess>& rxSlides)
{
if (mrModel.GetDocumentSlides() != rxSlides)
@@ -954,6 +1050,11 @@ void SlideSorterController::SetDocumentSlides (const Reference<container::XIndex
mrModel.SetDocumentSlides(rxSlides);
mrView.Layout();
+
+ // Select just the current slide.
+ PageSelector::BroadcastLock aBroadcastLock (*mpPageSelector);
+ mpPageSelector->DeselectAllPages();
+ mpPageSelector->SelectPage(mpCurrentSlideManager->GetCurrentSlide());
}
}
@@ -968,6 +1069,35 @@ void SlideSorterController::SetDocumentSlides (const Reference<container::XIndex
+VisibleAreaManager& SlideSorterController::GetVisibleAreaManager (void) const
+{
+ OSL_ASSERT(mpVisibleAreaManager);
+ return *mpVisibleAreaManager;
+}
+
+
+
+
+void SlideSorterController::CheckForMasterPageAssignment (void)
+{
+ if (mrModel.GetPageCount()%2==0)
+ return;
+ PageEnumeration aAllPages (PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
+ while (aAllPages.HasMoreElements())
+ {
+ SharedPageDescriptor pDescriptor (aAllPages.GetNextElement());
+ if (pDescriptor->UpdateMasterPage())
+ {
+ mrView.GetPreviewCache()->InvalidatePreviewBitmap (
+ pDescriptor->GetPage(),
+ true);
+ }
+ }
+}
+
+
+
+
//===== SlideSorterController::ModelChangeLock ================================
SlideSorterController::ModelChangeLock::ModelChangeLock (
diff --git a/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx b/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx
new file mode 100644
index 000000000000..71b6c024ae7a
--- /dev/null
+++ b/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx
@@ -0,0 +1,294 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+#include "controller/SlsAnimationFunction.hxx"
+#include "model/SlsPageDescriptor.hxx"
+#include "view/SlideSorterView.hxx"
+
+
+#include <osl/diagnose.hxx>
+#include <rtl/math.hxx>
+
+namespace sd { namespace slidesorter { namespace controller {
+
+
+double AnimationFunction::Linear (const double nTime)
+{
+ OSL_ASSERT(nTime>=0.0 && nTime<=1.0);
+ return nTime;
+}
+
+
+
+
+double AnimationFunction::FastInSlowOut_Sine (const double nTime)
+{
+ OSL_ASSERT(nTime>=0.0 && nTime<=1.0);
+
+ const double nResult (sin(nTime * M_PI/2));
+
+ OSL_ASSERT(nResult>=0.0 && nResult<=1.0);
+ return nResult;
+}
+
+
+
+
+double AnimationFunction::FastInSlowOut_Root (const double nTime)
+{
+ OSL_ASSERT(nTime>=0.0 && nTime<=1.0);
+
+ const double nResult (sqrt(nTime));
+
+ OSL_ASSERT(nResult>=0.0 && nResult<=1.0);
+ return nResult;
+}
+
+
+
+
+double AnimationFunction::SlowInSlowOut_0to0_Sine (const double nTime)
+{
+ OSL_ASSERT(nTime>=0.0 && nTime<=1.0);
+
+ const double nResult (sin(nTime * M_PI));
+
+ OSL_ASSERT(nResult>=0.0 && nResult<=1.0);
+ return nResult;
+}
+
+
+
+
+double AnimationFunction::Vibrate_Sine (const double nTime)
+{
+ return sin(nTime*M_PI*8);
+}
+
+
+
+
+Point AnimationFunction::ScalePoint (const Point& rPoint, const double nTime)
+{
+ return Point(
+ sal_Int32(::rtl::math::round(rPoint.X() * nTime)),
+ sal_Int32(::rtl::math::round(rPoint.Y() * nTime)));
+}
+
+
+
+
+double AnimationFunction::Blend (
+ const double nStartValue,
+ const double nEndValue,
+ const double nTime)
+{
+ return nStartValue*(1-nTime) + nEndValue*nTime;
+}
+
+
+
+
+void AnimationFunction::ApplyVisualStateChange (
+ const model::SharedPageDescriptor& rpDescriptor,
+ view::SlideSorterView& rView,
+ const double nTime)
+{
+ if (rpDescriptor)
+ {
+ rpDescriptor->GetVisualState().SetVisualStateBlend(nTime);
+ rView.RequestRepaint(rpDescriptor);
+ }
+}
+
+
+
+
+void AnimationFunction::ApplyLocationOffsetChange (
+ const model::SharedPageDescriptor& rpDescriptor,
+ view::SlideSorterView& rView,
+ const Point aLocationOffset)
+{
+ if (rpDescriptor)
+ {
+ const Rectangle aOldBoundingBox(rpDescriptor->GetBoundingBox());
+ rpDescriptor->GetVisualState().SetLocationOffset(aLocationOffset);
+ rView.RequestRepaint(aOldBoundingBox);
+ rView.RequestRepaint(rpDescriptor);
+ }
+}
+
+
+
+
+void AnimationFunction::ApplyButtonAlphaChange(
+ const model::SharedPageDescriptor& rpDescriptor,
+ view::SlideSorterView& rView,
+ const double nButtonAlpha,
+ const double nButtonBarAlpha)
+{
+ if (rpDescriptor)
+ {
+ rpDescriptor->GetVisualState().SetButtonAlpha(nButtonAlpha);
+ rpDescriptor->GetVisualState().SetButtonBarAlpha(nButtonBarAlpha);
+ rView.RequestRepaint(rpDescriptor);
+ }
+}
+
+
+
+
+//===== AnimationBezierFunction ===============================================
+
+AnimationBezierFunction::AnimationBezierFunction (
+ const double nX1,
+ const double nY1,
+ const double nX2,
+ const double nY2)
+ : mnX1(nX1),
+ mnY1(nY1),
+ mnX2(nX2),
+ mnY2(nY2)
+{
+}
+
+
+
+
+AnimationBezierFunction::AnimationBezierFunction (
+ const double nX1,
+ const double nY1)
+ : mnX1(nX1),
+ mnY1(nY1),
+ mnX2(1-nY1),
+ mnY2(1-nX1)
+{
+}
+
+
+
+
+::basegfx::B2DPoint AnimationBezierFunction::operator() (const double nT)
+{
+ return ::basegfx::B2DPoint(
+ EvaluateComponent(nT, mnX1, mnX2),
+ EvaluateComponent(nT, mnY1, mnY2));
+}
+
+
+
+
+double AnimationBezierFunction::EvaluateComponent (
+ const double nT,
+ const double nV1,
+ const double nV2)
+{
+ const double nS (1-nT);
+
+ // While the control point values 1 and 2 are explicitly given the start
+ // and end values are implicitly given.
+ const double nV0 (0);
+ const double nV3 (1);
+
+ const double nV01 (nS*nV0 + nT*nV1);
+ const double nV12 (nS*nV1 + nT*nV2);
+ const double nV23 (nS*nV2 + nT*nV3);
+
+ const double nV012 (nS*nV01 + nT*nV12);
+ const double nV123 (nS*nV12 + nT*nV23);
+
+ const double nV0123 (nS*nV012 + nT*nV123);
+
+ return nV0123;
+}
+
+
+
+
+//===== AnimationParametricFunction ===========================================
+
+AnimationParametricFunction::AnimationParametricFunction (const ParametricFunction& rFunction)
+ : maY()
+{
+ const sal_Int32 nSampleCount (64);
+
+ // Sample the given parametric function.
+ ::std::vector<basegfx::B2DPoint> aPoints;
+ aPoints.reserve(nSampleCount);
+ for (sal_Int32 nIndex=0; nIndex<nSampleCount; ++nIndex)
+ {
+ const double nT (nIndex/double(nSampleCount-1));
+ aPoints.push_back(basegfx::B2DPoint(rFunction(nT)));
+ }
+
+ // Interpolate at evenly spaced points.
+ maY.clear();
+ maY.reserve(nSampleCount);
+ double nX0 (aPoints[0].getX());
+ double nY0 (aPoints[0].getY());
+ double nX1 (aPoints[1].getX());
+ double nY1 (aPoints[1].getY());
+ sal_Int32 nIndex (1);
+ for (sal_Int32 nIndex2=0; nIndex2<nSampleCount; ++nIndex2)
+ {
+ const double nX (nIndex2 / double(nSampleCount-1));
+ while (nX > nX1 && nIndex<nSampleCount)
+ {
+ nX0 = nX1;
+ nY0 = nY1;
+ nX1 = aPoints[nIndex].getX();
+ nY1 = aPoints[nIndex].getY();
+ ++nIndex;
+ }
+ const double nU ((nX-nX1) / (nX0 - nX1));
+ const double nY (nY0*nU + nY1*(1-nU));
+ maY.push_back(nY);
+ }
+}
+
+
+
+
+double AnimationParametricFunction::operator() (const double nX)
+{
+ const sal_Int32 nIndex0 (nX * maY.size());
+ const double nX0 (nIndex0 / double(maY.size()-1));
+ const sal_uInt32 nIndex1 (nIndex0 + 1);
+ const double nX1 (nIndex1 / double(maY.size()-1));
+
+ if (nIndex0<=0)
+ return maY[0];
+ else if (sal_uInt32(nIndex0)>=maY.size() || nIndex1>=maY.size())
+ return maY[maY.size()-1];
+
+ const double nU ((nX-nX1) / (nX0 - nX1));
+ return maY[nIndex0]*nU + maY[nIndex1]*(1-nU);
+}
+
+
+} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
index 56505d9756e6..28756b3766d9 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
@@ -29,6 +29,7 @@
#include "controller/SlsAnimator.hxx"
#include "view/SlideSorterView.hxx"
#include "View.hxx"
+#include <boost/bind.hpp>
namespace sd { namespace slidesorter { namespace controller {
@@ -42,27 +43,32 @@ class Animator::Animation
{
public:
Animation (
- const Animator::AnimationFunction& rAnimation,
- const double nDelta);
+ const Animator::AnimationFunctor& rAnimation,
+ const double nStartOffset,
+ const double nDuration,
+ const double nGlobalTime,
+ const Animator::AnimationId nAnimationId,
+ const Animator::FinishFunctor& rFinishFunctor);
~Animation (void);
- bool Run (void);
+ /** Run next animation step. If animation has reached its end it is
+ expired.
+ */
+ bool Run (const double nGlobalTime);
+
+ /** Typically called when an animation has finished, but also from
+ Animator::Disposed(). The finish functor is called and the
+ animation is marked as expired to prevent another run.
+ */
+ void Expire (void);
bool IsExpired (void);
- Animator::AnimationFunction maAnimation;
- double mnValue;
- double mnDelta;
-};
-
-
-
-
-class Animator::DrawLock
-{
-public:
- DrawLock (View& rView);
- ~DrawLock (void);
-private:
- View& mrView;
+ Animator::AnimationFunctor maAnimation;
+ Animator::FinishFunctor maFinishFunctor;
+ const Animator::AnimationId mnAnimationId;
+ const double mnDuration;
+ const double mnEnd;
+ const double mnGlobalTimeAtStart;
+ bool mbIsExpired;
};
@@ -71,8 +77,11 @@ private:
Animator::Animator (SlideSorter& rSlideSorter)
: mrSlideSorter(rSlideSorter),
maTimer(),
+ mbIsDisposed(false),
maAnimations(),
- mpDrawLock()
+ maElapsedTime(),
+ mpDrawLock(),
+ mnNextAnimationId(0)
{
maTimer.SetTimeout(gnResolution);
maTimer.SetTimeoutHdl(LINK(this,Animator,TimeoutHandler));
@@ -83,39 +92,161 @@ Animator::Animator (SlideSorter& rSlideSorter)
Animator::~Animator (void)
{
+ if ( ! mbIsDisposed)
+ {
+ OSL_ASSERT(mbIsDisposed);
+ Dispose();
+ }
+}
+
+
+
+
+void Animator::Dispose (void)
+{
+ mbIsDisposed = true;
+
+ AnimationList aCopy (maAnimations);
+ AnimationList::const_iterator iAnimation;
+ for (iAnimation=aCopy.begin(); iAnimation!=aCopy.end(); ++iAnimation)
+ (*iAnimation)->Expire();
+
maTimer.Stop();
- mpDrawLock.reset();
+ if (mpDrawLock)
+ {
+ mpDrawLock->Dispose();
+ mpDrawLock.reset();
+ }
}
-void Animator::AddAnimation (
- const AnimationFunction& rAnimation,
- const sal_Int32 nDuration)
+Animator::AnimationId Animator::AddAnimation (
+ const AnimationFunctor& rAnimation,
+ const sal_Int32 nStartOffset,
+ const sal_Int32 nDuration,
+ const FinishFunctor& rFinishFunctor)
{
- const double nDelta = double(gnResolution) / double(nDuration);
- maAnimations.push_back(boost::shared_ptr<Animation>(new Animation(rAnimation, nDelta)));
+ // When the animator is already disposed then ignore this call
+ // silently (well, we show an assertion, but do not throw an exception.)
+ OSL_ASSERT( ! mbIsDisposed);
+ if (mbIsDisposed)
+ return -1;
+
+ boost::shared_ptr<Animation> pAnimation (
+ new Animation(
+ rAnimation,
+ nStartOffset / 1000.0,
+ nDuration / 1000.0,
+ maElapsedTime.getElapsedTime(),
+ ++mnNextAnimationId,
+ rFinishFunctor));
+ maAnimations.push_back(pAnimation);
+
+ RequestNextFrame();
+
+ return pAnimation->mnAnimationId;
+}
+
- // Prevent redraws except for the ones in TimeoutHandler.
- // While the Animator is active it will schedule repaints regularly.
- // Repaints in between would only lead to visual artifacts.
- mpDrawLock.reset(new DrawLock(mrSlideSorter.GetView()));
- maTimer.Start();
+
+
+Animator::AnimationId Animator::AddInfiniteAnimation (
+ const AnimationFunctor& rAnimation,
+ const double nDelta)
+{
+ (void)nDelta;
+
+ // When the animator is already disposed then ignore this call
+ // silently (well, we show an assertion, but do not throw an exception.)
+ OSL_ASSERT( ! mbIsDisposed);
+ if (mbIsDisposed)
+ return -1;
+
+ boost::shared_ptr<Animation> pAnimation (
+ new Animation(
+ rAnimation,
+ 0,
+ -1,
+ maElapsedTime.getElapsedTime(),
+ mnNextAnimationId++,
+ FinishFunctor()));
+ maAnimations.push_back(pAnimation);
+
+ RequestNextFrame();
+
+ return pAnimation->mnAnimationId;
}
-bool Animator::ServeAnimations (void)
+void Animator::RemoveAnimation (const Animator::AnimationId nId)
+{
+ OSL_ASSERT( ! mbIsDisposed);
+
+ const AnimationList::iterator iAnimation (::std::find_if(
+ maAnimations.begin(),
+ maAnimations.end(),
+ ::boost::bind(
+ ::std::equal_to<Animator::AnimationId>(),
+ nId,
+ ::boost::bind(&Animation::mnAnimationId, _1))));
+ if (iAnimation != maAnimations.end())
+ {
+ OSL_ASSERT((*iAnimation)->mnAnimationId == nId);
+ (*iAnimation)->Expire();
+ maAnimations.erase(iAnimation);
+ }
+
+ if (maAnimations.empty())
+ {
+ // Reset the animation id when we can.
+ mnNextAnimationId = 0;
+
+ // No more animations => we do not have to suppress painting
+ // anymore.
+ mpDrawLock.reset();
+ }
+}
+
+
+
+
+void Animator::RemoveAllAnimations (void)
+{
+ ::std::for_each(
+ maAnimations.begin(),
+ maAnimations.end(),
+ ::boost::bind(
+ &Animation::Expire,
+ _1));
+ maAnimations.clear();
+ mnNextAnimationId = 0;
+
+ // No more animations => we do not have to suppress painting
+ // anymore.
+ mpDrawLock.reset();
+}
+
+
+
+
+bool Animator::ProcessAnimations (const double nTime)
{
bool bExpired (false);
+ OSL_ASSERT( ! mbIsDisposed);
+ if (mbIsDisposed)
+ return bExpired;
+
+
AnimationList aCopy (maAnimations);
AnimationList::const_iterator iAnimation;
for (iAnimation=aCopy.begin(); iAnimation!=aCopy.end(); ++iAnimation)
{
- bExpired |= (*iAnimation)->Run();
+ bExpired |= (*iAnimation)->Run(nTime);
}
return bExpired;
@@ -126,6 +257,10 @@ bool Animator::ServeAnimations (void)
void Animator::CleanUpAnimationList (void)
{
+ OSL_ASSERT( ! mbIsDisposed);
+ if (mbIsDisposed)
+ return;
+
AnimationList aActiveAnimations;
AnimationList::const_iterator iAnimation;
@@ -141,19 +276,35 @@ void Animator::CleanUpAnimationList (void)
+void Animator::RequestNextFrame (const double nFrameStart)
+{
+ (void)nFrameStart;
+ if ( ! maTimer.IsActive())
+ {
+ // Prevent redraws except for the ones in TimeoutHandler. While the
+ // Animator is active it will schedule repaints regularly. Repaints
+ // in between would only lead to visual artifacts.
+ mpDrawLock.reset(new view::SlideSorterView::DrawLock(mrSlideSorter));
+ maTimer.Start();
+ }
+}
+
+
+
+
IMPL_LINK(Animator, TimeoutHandler, Timer*, EMPTYARG)
{
- if (ServeAnimations())
+ if (mbIsDisposed)
+ return 0;
+
+ if (ProcessAnimations(maElapsedTime.getElapsedTime()))
CleanUpAnimationList();
// Unlock the draw lock. This should lead to a repaint.
mpDrawLock.reset();
if (maAnimations.size() > 0)
- {
- mpDrawLock.reset(new DrawLock(mrSlideSorter.GetView()));
- maTimer.Start();
- }
+ RequestNextFrame();
return 0;
}
@@ -164,16 +315,21 @@ IMPL_LINK(Animator, TimeoutHandler, Timer*, EMPTYARG)
//===== Animator::Animation ===================================================
Animator::Animation::Animation (
- const Animator::AnimationFunction& rAnimation,
- const double nDelta)
+ const Animator::AnimationFunctor& rAnimation,
+ const double nStartOffset,
+ const double nDuration,
+ const double nGlobalTime,
+ const Animator::AnimationId nId,
+ const Animator::FinishFunctor& rFinishFunctor)
: maAnimation(rAnimation),
- mnValue(0),
- mnDelta(nDelta)
+ maFinishFunctor(rFinishFunctor),
+ mnAnimationId(nId),
+ mnDuration(nDuration),
+ mnEnd(nGlobalTime + nDuration + nStartOffset),
+ mnGlobalTimeAtStart(nGlobalTime + nStartOffset),
+ mbIsExpired(false)
{
-
- maAnimation(mnValue);
- mnValue = mnDelta;
-
+ Run(nGlobalTime);
}
@@ -186,47 +342,54 @@ Animator::Animation::~Animation (void)
-bool Animator::Animation::Run (void)
+bool Animator::Animation::Run (const double nGlobalTime)
{
- if (mnValue < 1.0)
+ if ( ! mbIsExpired)
{
- maAnimation(mnValue);
- mnValue += mnDelta;
- return false;
- }
- else
- {
- maAnimation(1.0);
- return true;
+ if (mnDuration > 0)
+ {
+ if (nGlobalTime >= mnEnd)
+ {
+ maAnimation(1.0);
+ Expire();
+ }
+ else if (nGlobalTime >= mnGlobalTimeAtStart)
+ {
+ maAnimation((nGlobalTime - mnGlobalTimeAtStart) / mnDuration);
+ }
+ }
+ else if (mnDuration < 0)
+ {
+ // Animations without end have to be expired by their owner.
+ maAnimation(nGlobalTime);
+ }
}
+
+ return mbIsExpired;
}
-bool Animator::Animation::IsExpired (void)
+void Animator::Animation::Expire (void)
{
- return mnValue >= 1.0;
+ if ( ! mbIsExpired)
+ {
+ mbIsExpired = true;
+ if (maFinishFunctor)
+ maFinishFunctor();
+ }
}
-//===== Animator::DrawLock ====================================================
-
-Animator::DrawLock::DrawLock (View& rView)
- : mrView(rView)
+bool Animator::Animation::IsExpired (void)
{
- mrView.LockRedraw(TRUE);
+ return mbIsExpired;
}
-Animator::DrawLock::~DrawLock (void)
-{
- mrView.LockRedraw(FALSE);
-}
-
-
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index d226a8c2e294..68ae50e091e7 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -35,16 +35,18 @@
#include "model/SlsPageDescriptor.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "view/SlideSorterView.hxx"
-#include "view/SlsViewOverlay.hxx"
-#include "view/SlsPageObject.hxx"
+#include "view/SlsTheme.hxx"
#include "controller/SlideSorterController.hxx"
+#include "controller/SlsInsertionIndicatorHandler.hxx"
#include "controller/SlsPageSelector.hxx"
#include "controller/SlsSelectionFunction.hxx"
#include "controller/SlsCurrentSlideManager.hxx"
#include "controller/SlsScrollBarManager.hxx"
#include "controller/SlsFocusManager.hxx"
#include "controller/SlsSelectionManager.hxx"
-#include "SlsTransferable.hxx"
+#include "controller/SlsTransferable.hxx"
+#include "controller/SlsSelectionObserver.hxx"
+#include "cache/SlsPageCache.hxx"
#include "ViewShellBase.hxx"
#include "DrawViewShell.hxx"
@@ -74,6 +76,7 @@
#include <sfx2/bindings.hxx>
#include <sfx2/docfile.hxx>
#include <svx/svxids.hrc>
+#include <svx/svdstr.hrc>
#include <vcl/msgbox.hxx>
#include <tools/urlobj.hxx>
#include <rtl/ustring.hxx>
@@ -82,6 +85,43 @@
namespace sd { namespace slidesorter { namespace controller {
+class Clipboard::UndoContext
+{
+public:
+ UndoContext (
+ SdDrawDocument* pDocument,
+ const ::boost::shared_ptr<ViewShell>& rpMainViewShell,
+ const ::boost::shared_ptr<view::Theme>& rpTheme)
+ : mpDocument(pDocument),
+ mpMainViewShell(rpMainViewShell)
+ {
+ if (mpDocument!=NULL && mpDocument->IsUndoEnabled())
+ {
+ if (mpMainViewShell && mpMainViewShell->GetShellType() == ViewShell::ST_DRAW)
+ mpDocument->BegUndo(rpTheme->GetString(view::Theme::String_DragAndDropPages));
+ else
+ mpDocument->BegUndo(rpTheme->GetString(view::Theme::String_DragAndDropSlides));
+ }
+ }
+
+ ~UndoContext (void)
+ {
+ if (mpDocument!=NULL && mpDocument->IsUndoEnabled())
+ mpDocument->EndUndo();
+ if (mpMainViewShell && mpMainViewShell->GetViewFrame()!=NULL)
+ {
+ SfxBindings& rBindings = mpMainViewShell->GetViewFrame()->GetBindings();
+ rBindings.Invalidate(SID_UNDO);
+ rBindings.Invalidate(SID_REDO);
+ }
+ }
+private:
+ SdDrawDocument* mpDocument;
+ ::boost::shared_ptr<ViewShell> mpMainViewShell;
+};
+
+
+
Clipboard::Clipboard (SlideSorter& rSlideSorter)
: ViewClipboard(rSlideSorter.GetView()),
@@ -89,7 +129,10 @@ Clipboard::Clipboard (SlideSorter& rSlideSorter)
mrController(mrSlideSorter.GetController()),
maPagesToRemove(),
maPagesToSelect(),
- mbUpdateSelectionPending(false)
+ mbUpdateSelectionPending(false),
+ mpUndoContext(),
+ mpSelectionObserverContext(),
+ mnDragFinishedUserEventId(0)
{
}
@@ -98,6 +141,8 @@ Clipboard::Clipboard (SlideSorter& rSlideSorter)
Clipboard::~Clipboard (void)
{
+ if (mnDragFinishedUserEventId != 0)
+ Application::RemoveUserEvent(mnDragFinishedUserEventId);
}
@@ -143,13 +188,12 @@ void Clipboard::HandleSlotCall (SfxRequest& rRequest)
// a crash.
if (mrSlideSorter.GetModel().GetEditMode() != EM_MASTERPAGE)
{
- mrSlideSorter.GetView().LockRedraw (TRUE);
+ view::SlideSorterView::DrawLock aLock (mrSlideSorter);
+ SelectionObserver::Context aContext (mrSlideSorter);
if(xFunc.is())
xFunc->DoPaste();
else
DoPaste();
- mrController.GetSelectionManager()->MakeSelectionVisible();
- mrSlideSorter.GetView().LockRedraw(FALSE);
}
rRequest.Done();
break;
@@ -209,7 +253,7 @@ void Clipboard::DoPaste (::Window* pWindow)
sal_Int32 nInsertPageCount = PasteTransferable(nInsertPosition);
// Select the pasted pages and make the first of them the
// current page.
- mrSlideSorter.GetView().GetWindow()->GrabFocus();
+ mrSlideSorter.GetContentWindow()->GrabFocus();
SelectPageRange(nInsertPosition, nInsertPageCount);
}
}
@@ -230,14 +274,22 @@ sal_Int32 Clipboard::GetInsertionPosition (::Window* pWindow)
// selection.
// d) After the last page when there is no selection and no focus.
- view::InsertionIndicatorOverlay& rInsertionIndicatorOverlay (
- mrSlideSorter.GetView().GetOverlay().GetInsertionIndicatorOverlay());
- if (rInsertionIndicatorOverlay.isVisible())
+ ::boost::shared_ptr<controller::InsertionIndicatorHandler> pInsertionIndicatorHandler (
+ mrController.GetInsertionIndicatorHandler());
+ if (pInsertionIndicatorHandler->IsActive())
+ {
+ // Use the insertion index of an active insertion indicator.
+ nInsertPosition = pInsertionIndicatorHandler->GetInsertionPageIndex();
+ }
+ else if (mrController.GetSelectionManager()->GetInsertionPosition() >= 0)
{
- nInsertPosition = rInsertionIndicatorOverlay.GetInsertionPageIndex();
+ // Use the insertion index of an insertion indicator that has been
+ // deactivated a short while ago.
+ nInsertPosition = mrController.GetSelectionManager()->GetInsertionPosition();
}
else if (mrController.GetFocusManager().IsFocusShowing())
{
+ // Use the focus to determine the insertion position.
SdInsertPasteDlg aDialog (pWindow);
if (aDialog.Execute() == RET_OK)
{
@@ -246,10 +298,6 @@ sal_Int32 Clipboard::GetInsertionPosition (::Window* pWindow)
nInsertPosition ++;
}
}
- else
- {
- nInsertPosition = mrController.GetSelectionManager()->GetInsertionPosition();
- }
return nInsertPosition;
}
@@ -260,9 +308,9 @@ sal_Int32 Clipboard::GetInsertionPosition (::Window* pWindow)
sal_Int32 Clipboard::PasteTransferable (sal_Int32 nInsertPosition)
{
SdTransferable* pClipTransferable = SD_MOD()->pTransferClip;
- bool bMergeMasterPages = !pClipTransferable->HasSourceDoc (
- mrSlideSorter.GetModel().GetDocument());
- USHORT nInsertIndex ((USHORT)(nInsertPosition * 2 + 1));
+ model::SlideSorterModel& rModel (mrSlideSorter.GetModel());
+ bool bMergeMasterPages = !pClipTransferable->HasSourceDoc (rModel.GetDocument());
+ USHORT nInsertIndex (rModel.GetCoreIndex(nInsertPosition));
sal_Int32 nInsertPageCount (0);
if (pClipTransferable->HasPageBookmarks())
{
@@ -270,7 +318,7 @@ sal_Int32 Clipboard::PasteTransferable (sal_Int32 nInsertPosition)
const ::vos::OGuard aGuard (Application::GetSolarMutex());
nInsertPageCount = (USHORT) rBookmarkList.Count();
- mrSlideSorter.GetModel().GetDocument()->InsertBookmarkAsPage(
+ rModel.GetDocument()->InsertBookmarkAsPage(
const_cast<List*>(&rBookmarkList),
NULL,
FALSE,
@@ -293,9 +341,9 @@ sal_Int32 Clipboard::PasteTransferable (sal_Int32 nInsertPosition)
{
const ::vos::OGuard aGuard (Application::GetSolarMutex());
- bMergeMasterPages = (pDataDoc != mrSlideSorter.GetModel().GetDocument());
+ bMergeMasterPages = (pDataDoc != rModel.GetDocument());
nInsertPageCount = pDataDoc->GetSdPageCount( PK_STANDARD );
- mrSlideSorter.GetModel().GetDocument()->InsertBookmarkAsPage(
+ rModel.GetDocument()->InsertBookmarkAsPage(
NULL,
NULL,
FALSE,
@@ -332,7 +380,6 @@ void Clipboard::SelectPageRange (sal_Int32 nFirstIndex, sal_Int32 nPageCount)
if (i == 0)
{
mrController.GetCurrentSlideManager()->SwitchCurrentSlide(pDescriptor);
- mrController.GetFocusManager().SetFocusedPage(pDescriptor);
}
}
}
@@ -361,6 +408,27 @@ void Clipboard::CreateSlideTransferable (
maPagesToRemove.push_back (pDescriptor->GetPage());
}
+ // Create a small set of representatives of the selection for which
+ // previews are included into the transferable so that an insertion
+ // indicator can be rendered.
+ aSelectedPages.Rewind();
+ ::std::vector<Transferable::Representative> aRepresentatives;
+ aRepresentatives.reserve(3);
+ ::boost::shared_ptr<cache::PageCache> pPreviewCache (
+ mrSlideSorter.GetView().GetPreviewCache());
+ while (aSelectedPages.HasMoreElements())
+ {
+ model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
+ if ( ! pDescriptor || pDescriptor->GetPage()==NULL)
+ continue;
+ Bitmap aPreview (pPreviewCache->GetPreviewBitmap(pDescriptor->GetPage(), false));
+ aRepresentatives.push_back(Transferable::Representative(
+ aPreview,
+ pDescriptor->HasState(model::PageDescriptor::ST_Excluded)));
+ if (aRepresentatives.size() >= 3)
+ break;
+ }
+
if (aBookmarkList.Count() > 0)
{
mrSlideSorter.GetView().BrkAction();
@@ -369,7 +437,8 @@ void Clipboard::CreateSlideTransferable (
pDocument,
NULL,
FALSE,
- dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell()));
+ dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell()),
+ aRepresentatives);
if (bDrag)
SD_MOD()->pTransferDrag = pTransferable;
@@ -423,13 +492,17 @@ void Clipboard::CreateSlideTransferable (
void Clipboard::StartDrag (
- const Point&,
+ const Point& rPosition,
::Window* pWindow)
{
maPagesToRemove.clear();
maPagesToSelect.clear();
mbUpdateSelectionPending = false;
- CreateSlideTransferable (pWindow, TRUE);
+ CreateSlideTransferable(pWindow, TRUE);
+
+ mrController.GetInsertionIndicatorHandler()->UpdatePosition(
+ rPosition,
+ InsertionIndicatorHandler::UnknownMode);
}
@@ -437,15 +510,36 @@ void Clipboard::StartDrag (
void Clipboard::DragFinished (sal_Int8 nDropAction)
{
- // Hide the substitution display and insertion indicator.
- mrSlideSorter.GetView().GetOverlay().GetSubstitutionOverlay().setVisible(false);
- mrSlideSorter.GetView().GetOverlay().GetInsertionIndicatorOverlay().setVisible(false);
-
SdTransferable* pDragTransferable = SD_MOD()->pTransferDrag;
-
if (pDragTransferable != NULL)
pDragTransferable->SetView (NULL);
+ if (mnDragFinishedUserEventId == 0)
+ {
+ if ( ! Application::PostUserEvent(
+ mnDragFinishedUserEventId,
+ LINK(this, Clipboard, ProcessDragFinished),
+ reinterpret_cast<void*>(nDropAction)))
+ {
+ mnDragFinishedUserEventId = 0;
+ }
+ }
+}
+
+
+
+
+IMPL_LINK(Clipboard, ProcessDragFinished, void*, pUserData)
+{
+ const sal_Int8 nDropAction (static_cast<sal_Int8>(reinterpret_cast<sal_IntPtr>(pUserData)));
+
+ mnDragFinishedUserEventId = 0;
+
+ // Hide the substitution display and insertion indicator.
+ ::rtl::Reference<SelectionFunction> pFunction (mrController.GetCurrentSelectionFunction());
+ if (pFunction.is())
+ pFunction->NotifyDragFinished();
+
PageSelector& rSelector (mrController.GetPageSelector());
if ((nDropAction & DND_ACTION_MOVE) != 0
&& ! maPagesToRemove.empty())
@@ -458,12 +552,14 @@ void Clipboard::DragFinished (sal_Int8 nDropAction)
aDraggedPage!=maPagesToRemove.end();
aDraggedPage++)
{
- rSelector.SelectPage (*aDraggedPage);
+ rSelector.SelectPage(*aDraggedPage);
}
- mrController.GetSelectionManager()->DeleteSelectedPages ();
+ mrController.GetSelectionManager()->DeleteSelectedPages();
}
+ mpUndoContext.reset();
+ mpSelectionObserverContext.reset();
- SelectPages();
+ return 1;
}
@@ -492,14 +588,16 @@ sal_Int8 Clipboard::AcceptDrop (
USHORT nPage,
USHORT nLayer)
{
- sal_Int8 nResult = DND_ACTION_NONE;
+ sal_Int8 nAction (DND_ACTION_NONE);
- switch (IsDropAccepted())
+ const Clipboard::DropType eDropType (IsDropAccepted());
+
+ switch (eDropType)
{
case DT_PAGE:
{
// Accept a drop.
- nResult = rEvent.mnAction;
+ nAction = rEvent.mnAction;
// Use the copy action when the drop action is the default, i.e. not
// explicitly set to move or link, and when the source and
@@ -512,23 +610,27 @@ sal_Int8 Clipboard::AcceptDrop (
&& (mrSlideSorter.GetModel().GetDocument()->GetDocSh()
!= pDragTransferable->GetPageDocShell()))
{
- nResult = DND_ACTION_COPY;
+ nAction = DND_ACTION_COPY;
+ }
+ else if (mrController.GetInsertionIndicatorHandler()->IsInsertionTrivial(nAction))
+ {
+ nAction = DND_ACTION_NONE;
}
// Show the insertion marker and the substitution for a drop.
Point aPosition = pTargetWindow->PixelToLogic (rEvent.maPosPixel);
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetInsertionIndicatorOverlay().SetPosition (aPosition);
- rOverlay.GetInsertionIndicatorOverlay().setVisible(true);
- rOverlay.GetSubstitutionOverlay().SetPosition (aPosition);
+ SelectionFunction* pSelectionFunction = dynamic_cast<SelectionFunction*>(
+ mrSlideSorter.GetViewShell()->GetCurrentFunction().get());
+ if (pSelectionFunction != NULL)
+ pSelectionFunction->MouseDragged(rEvent, nAction);
// Scroll the window when the mouse reaches the window border.
- mrController.GetScrollBarManager().AutoScroll (rEvent.maPosPixel);
+ // mrController.GetScrollBarManager().AutoScroll (rEvent.maPosPixel);
}
break;
case DT_SHAPE:
- nResult = ExecuteOrAcceptShapeDrop(
+ nAction = ExecuteOrAcceptShapeDrop(
DC_ACCEPT,
rEvent.maPosPixel,
&rEvent,
@@ -537,11 +639,13 @@ sal_Int8 Clipboard::AcceptDrop (
nPage,
nLayer);
break;
+
default:
+ nAction = DND_ACTION_NONE;
break;
}
- return nResult;
+ return nAction;
}
@@ -555,6 +659,7 @@ sal_Int8 Clipboard::ExecuteDrop (
USHORT nLayer)
{
sal_Int8 nResult = DND_ACTION_NONE;
+ mpUndoContext.reset();
switch (IsDropAccepted())
{
@@ -563,54 +668,57 @@ sal_Int8 Clipboard::ExecuteDrop (
const SdTransferable* pDragTransferable = SD_MOD()->pTransferDrag;
const Point aEventModelPosition (
pTargetWindow->PixelToLogic (rEvent.maPosPixel));
- long int nXOffset = labs (pDragTransferable->GetStartPos().X()
- - aEventModelPosition.X());
- long int nYOffset = labs (pDragTransferable->GetStartPos().Y()
- - aEventModelPosition.Y());
- const bool bContinue =
+ const sal_Int32 nXOffset (labs (pDragTransferable->GetStartPos().X()
+ - aEventModelPosition.X()));
+ const sal_Int32 nYOffset (labs (pDragTransferable->GetStartPos().Y()
+ - aEventModelPosition.Y()));
+ bool bContinue =
( pDragTransferable->GetView() != &mrSlideSorter.GetView() )
|| ( nXOffset >= 2 && nYOffset >= 2 );
+ ::boost::shared_ptr<InsertionIndicatorHandler> pInsertionIndicatorHandler(
+ mrController.GetInsertionIndicatorHandler());
// Get insertion position and then turn off the insertion indicator.
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetInsertionIndicatorOverlay().SetPosition(
- aEventModelPosition);
- USHORT nIndex = DetermineInsertPosition (*pDragTransferable);
- OSL_TRACE ("Clipboard::AcceptDrop() called for index %d",
- nIndex);
- rOverlay.GetInsertionIndicatorOverlay().setVisible(false);
+ pInsertionIndicatorHandler->UpdatePosition(aEventModelPosition, rEvent.mnAction);
+ // USHORT nIndex = DetermineInsertPosition(*pDragTransferable);
+
+ // Do not process the insertion when it is trivial,
+ // i.e. would insert pages at their original place.
+ if (pInsertionIndicatorHandler->IsInsertionTrivial(rEvent.mnAction))
+ bContinue = false;
+
+ // Tell the insertion indicator handler to hide before the model
+ // is modified. Doing it later may result in page objects whose
+ // animation state is not properly reset because they are then
+ // in another run then before the model change.
+ pInsertionIndicatorHandler->End(Animator::AM_Immediate);
if (bContinue)
{
SlideSorterController::ModelChangeLock aModelChangeLock (mrController);
- if (pDragTransferable->GetView() == &mrSlideSorter.GetView()
- && rEvent.mnAction == DND_ACTION_MOVE)
- {
- // We are asked to move pages inside one view. For this we
- // call MoveSelectedPages() which is faster than going the
- // generic way.
-
- // Remember to select the moved pages afterwards.
- maPagesToRemove.swap(maPagesToSelect);
- maPagesToRemove.clear();
-
- USHORT nSdrModelIndex;
- if (nIndex != SDRPAGE_NOTFOUND)
- nSdrModelIndex = nIndex / 2 - 1;
- else
- nSdrModelIndex = SDRPAGE_NOTFOUND;
- mrController.GetSelectionManager()->MoveSelectedPages(nSdrModelIndex);
- mbUpdateSelectionPending = true;
- nResult = DND_ACTION_NONE;
- }
- else
- {
- // Handle a general drop operation.
- HandlePageDrop (*pDragTransferable);
- nResult = rEvent.mnAction;
- }
+ // Handle a general drop operation.
+ mpUndoContext.reset(new UndoContext (
+ mrSlideSorter.GetModel().GetDocument(),
+ mrSlideSorter.GetViewShell()->GetViewShellBase().GetMainViewShell(),
+ mrSlideSorter.GetTheme()));
+ mpSelectionObserverContext.reset(new SelectionObserver::Context(mrSlideSorter));
+
+ HandlePageDrop(*pDragTransferable);
+ nResult = rEvent.mnAction;
+
+ // We leave the undo context alive for when moving or
+ // copying inside one view then the actions in
+ // NotifyDragFinished should be covered as well as
+ // well as the ones above.
}
+
+ // Notify the receiving selection function that drag-and-drop is
+ // finished and the substitution handler can be released.
+ ::rtl::Reference<SelectionFunction> pFunction (
+ mrController.GetCurrentSelectionFunction());
+ if (pFunction.is())
+ pFunction->NotifyDragFinished();
}
break;
@@ -634,23 +742,31 @@ sal_Int8 Clipboard::ExecuteDrop (
-USHORT Clipboard::DetermineInsertPosition (const SdTransferable& )
+void Clipboard::Abort (void)
{
- USHORT nInsertPosition = SDRPAGE_NOTFOUND;
+ if (mpSelectionObserverContext)
+ {
+ mpSelectionObserverContext->Abort();
+ mpSelectionObserverContext.reset();
+ }
+}
+
+
+
+USHORT Clipboard::DetermineInsertPosition (const SdTransferable& )
+{
// Tell the model to move the dragged pages behind the one with the
// index nInsertionIndex which first has to be transformed into an index
// understandable by the document.
- view::InsertionIndicatorOverlay& rOverlay (
- mrSlideSorter.GetView().GetOverlay().GetInsertionIndicatorOverlay());
- sal_Int32 nInsertionIndex (rOverlay.GetInsertionPageIndex());
+ const sal_Int32 nInsertionIndex (
+ mrController.GetInsertionIndicatorHandler()->GetInsertionPageIndex());
- // The index returned by the overlay starts with 1 for the first slide.
- // This is now converted that to an SdModel index that also starts with 1.
+ // Convert to insertion index to that of an SdModel.
if (nInsertionIndex >= 0)
- nInsertPosition = (USHORT)nInsertionIndex * 2 + 1;
-
- return nInsertPosition;
+ return mrSlideSorter.GetModel().GetCoreIndex(nInsertionIndex);
+ else
+ return 0;
}
@@ -666,14 +782,12 @@ USHORT Clipboard::InsertSlides (
// Remember the inserted pages so that they can be selected when the
// operation is finished.
- int nDocumentIndex = nInsertPosition / 2 - 1;
- for (USHORT i=1; i<=nInsertedPageCount; i++)
- {
- model::SharedPageDescriptor pDescriptor (
- mrSlideSorter.GetModel().GetPageDescriptor(nDocumentIndex + i));
- if (pDescriptor.get() != NULL)
- maPagesToSelect.push_back (pDescriptor->GetPage());
- }
+ maPagesToSelect.clear();
+ SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
+ if (pDocument != NULL)
+ for (sal_Int32 i=0; i<=nInsertedPageCount; i+=2)
+ maPagesToSelect.push_back(
+ dynamic_cast<SdPage*>(pDocument->GetPage(nInsertPosition+i)));
mbUpdateSelectionPending |= (nInsertedPageCount>0);
@@ -739,8 +853,8 @@ sal_Int8 Clipboard::ExecuteOrAcceptShapeDrop (
model::SharedPageDescriptor pDescriptor (
mrSlideSorter.GetModel().GetPageDescriptor(
mrSlideSorter.GetView().GetPageIndexAtPoint(rPosition)));
- if (pDescriptor.get() != NULL && pDescriptor->GetPage()!=NULL)
- nPage = (pDescriptor->GetPage()->GetPageNum() - 1) / 2;
+ if (pDescriptor)
+ nPage = pDescriptor->GetPageIndex();
}
// Now comes the code that is different for the Execute and Accept:
diff --git a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
index f5864c3307a1..7b2ca60cb4f0 100755..100644
--- a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
@@ -33,8 +33,8 @@
#include "controller/SlsPageSelector.hxx"
#include "controller/SlideSorterController.hxx"
#include "controller/SlsCurrentSlideManager.hxx"
+#include "controller/SlsFocusManager.hxx"
#include "view/SlideSorterView.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
#include "ViewShellBase.hxx"
#include "ViewShell.hxx"
#include "DrawViewShell.hxx"
@@ -47,13 +47,18 @@ using namespace ::com::sun::star::uno;
using namespace ::sd::slidesorter::model;
+
namespace sd { namespace slidesorter { namespace controller {
+
CurrentSlideManager::CurrentSlideManager (SlideSorter& rSlideSorter)
: mrSlideSorter(rSlideSorter),
mnCurrentSlideIndex(-1),
- mpCurrentSlide()
+ mpCurrentSlide(),
+ maSwitchPageDelayTimer()
{
+ maSwitchPageDelayTimer.SetTimeout(100);
+ maSwitchPageDelayTimer.SetTimeoutHdl(LINK(this,CurrentSlideManager,SwitchPageCallback));
}
@@ -66,7 +71,22 @@ CurrentSlideManager::~CurrentSlideManager (void)
-void CurrentSlideManager::CurrentSlideHasChanged (const sal_Int32 nSlideIndex)
+void CurrentSlideManager::NotifyCurrentSlideChange (const SdPage* pPage)
+{
+ if (pPage != NULL)
+ NotifyCurrentSlideChange(
+ mrSlideSorter.GetModel().GetIndex(
+ Reference<drawing::XDrawPage>(
+ const_cast<SdPage*>(pPage)->getUnoPage(),
+ UNO_QUERY)));
+ else
+ NotifyCurrentSlideChange(-1);
+}
+
+
+
+
+void CurrentSlideManager::NotifyCurrentSlideChange (const sal_Int32 nSlideIndex)
{
if (mnCurrentSlideIndex != nSlideIndex)
{
@@ -75,8 +95,11 @@ void CurrentSlideManager::CurrentSlideHasChanged (const sal_Int32 nSlideIndex)
// Update the selection.
mrSlideSorter.GetController().GetPageSelector().DeselectAllPages();
- if (mpCurrentSlide.get() != NULL)
+ if (mpCurrentSlide)
+ {
mrSlideSorter.GetController().GetPageSelector().SelectPage(mpCurrentSlide);
+ mrSlideSorter.GetController().GetFocusManager().SetFocusedPage(mpCurrentSlide);
+ }
}
}
@@ -86,10 +109,7 @@ void CurrentSlideManager::CurrentSlideHasChanged (const sal_Int32 nSlideIndex)
void CurrentSlideManager::ReleaseCurrentSlide (void)
{
if (mpCurrentSlide.get() != NULL)
- {
- mpCurrentSlide->SetIsCurrentPage(false);
- mrSlideSorter.GetView().RequestRepaint(mpCurrentSlide);
- }
+ mrSlideSorter.GetView().SetState(mpCurrentSlide, PageDescriptor::ST_Current, false);
mpCurrentSlide.reset();
mnCurrentSlideIndex = -1;
@@ -117,48 +137,64 @@ void CurrentSlideManager::AcquireCurrentSlide (const sal_Int32 nSlideIndex)
// document.
mpCurrentSlide = mrSlideSorter.GetModel().GetPageDescriptor(mnCurrentSlideIndex);
if (mpCurrentSlide.get() != NULL)
- {
- mpCurrentSlide->SetIsCurrentPage(true);
- mrSlideSorter.GetView().RequestRepaint(mpCurrentSlide);
- }
+ mrSlideSorter.GetView().SetState(mpCurrentSlide, PageDescriptor::ST_Current, true);
}
}
-void CurrentSlideManager::SwitchCurrentSlide (const sal_Int32 nSlideIndex)
+void CurrentSlideManager::SwitchCurrentSlide (
+ const sal_Int32 nSlideIndex,
+ const bool bUpdateSelection)
{
- SwitchCurrentSlide(mrSlideSorter.GetModel().GetPageDescriptor(nSlideIndex));
+ SwitchCurrentSlide(mrSlideSorter.GetModel().GetPageDescriptor(nSlideIndex), bUpdateSelection);
}
-void CurrentSlideManager::SwitchCurrentSlide (const SharedPageDescriptor& rpDescriptor)
+void CurrentSlideManager::SwitchCurrentSlide (
+ const SharedPageDescriptor& rpDescriptor,
+ const bool bUpdateSelection)
{
- if (rpDescriptor.get() != NULL)
+ if (rpDescriptor.get() != NULL && mpCurrentSlide!=rpDescriptor)
{
- mpCurrentSlide = rpDescriptor;
- mnCurrentSlideIndex = (rpDescriptor->GetPage()->GetPageNum()-1)/2;
+ ReleaseCurrentSlide();
+ AcquireCurrentSlide((rpDescriptor->GetPage()->GetPageNum()-1)/2);
ViewShell* pViewShell = mrSlideSorter.GetViewShell();
if (pViewShell != NULL && pViewShell->IsMainViewShell())
{
+ // The slide sorter is the main view.
FrameView* pFrameView = pViewShell->GetFrameView();
if (pFrameView != NULL)
pFrameView->SetSelectedPage(sal::static_int_cast<USHORT>(mnCurrentSlideIndex));
+ mrSlideSorter.GetController().GetPageSelector().SetCoreSelection();
}
- else
+
+ // We do not tell the XController/ViewShellBase about the new
+ // slide right away. This is done asynchronously after a short
+ // delay to allow for more slide switches in the slide sorter.
+ // This goes under the assumption that slide switching inside
+ // the slide sorter is fast (no expensive redraw of the new page
+ // (unless the preview of the new slide is not yet preset)) and
+ // that slide switching in the edit view is slow (all shapes of
+ // the new slide have to be repainted.)
+ maSwitchPageDelayTimer.Start();
+
+ // We have to store the (index of the) new current slide at
+ // the tab control because there are other asynchronous
+ // notifications of the slide switching that otherwise
+ // overwrite the correct value.
+ SetCurrentSlideAtTabControl(mpCurrentSlide);
+
+ if (bUpdateSelection)
{
- // Set current page. At the moment we have to do this in two
- // different ways. The UNO way is the preferable one but, alas,
- // it does not work always correctly (after some kinds of model
- // changes). Therefore, we call DrawViewShell::SwitchPage(),
- // too.
- SetCurrentSlideAtViewShellBase(rpDescriptor);
- SetCurrentSlideAtXController(rpDescriptor);
+ mrSlideSorter.GetController().GetPageSelector().DeselectAllPages();
+ mrSlideSorter.GetController().GetPageSelector().SelectPage(rpDescriptor);
}
+ mrSlideSorter.GetController().GetFocusManager().SetFocusedPage(rpDescriptor);
}
}
@@ -180,19 +216,26 @@ void CurrentSlideManager::SetCurrentSlideAtViewShellBase (const SharedPageDescri
pDrawViewShell->SwitchPage(nPageNumber);
pDrawViewShell->GetPageTabControl()->SetCurPageId(nPageNumber+1);
}
- /*
- else
+ }
+}
+
+
+
+
+void CurrentSlideManager::SetCurrentSlideAtTabControl (const SharedPageDescriptor& rpDescriptor)
+{
+ OSL_ASSERT(rpDescriptor.get() != NULL);
+
+ ViewShellBase* pBase = mrSlideSorter.GetViewShellBase();
+ if (pBase != NULL)
+ {
+ ::boost::shared_ptr<DrawViewShell> pDrawViewShell (
+ ::boost::dynamic_pointer_cast<DrawViewShell>(pBase->GetMainViewShell()));
+ if (pDrawViewShell)
{
- presenter::PresenterViewShell* pPresenterViewShell
- = dynamic_cast<presenter::PresenterViewShell*>(pBase->GetMainViewShell());
- if (pPresenterViewShell != NULL)
- {
- pPresenterViewShell->SetCurrentSlide(
- Reference<drawing::XDrawPage>(
- rpDescriptor->GetPage()->getUnoPage(), UNO_QUERY));
- }
+ USHORT nPageNumber = (rpDescriptor->GetPage()->GetPageNum()-1)/2;
+ pDrawViewShell->GetPageTabControl()->SetCurPageId(nPageNumber+1);
}
- */
}
}
@@ -215,7 +258,7 @@ void CurrentSlideManager::SetCurrentSlideAtXController (const SharedPageDescript
aPage);
}
}
- catch (beans::UnknownPropertyException aException)
+ catch (Exception aException)
{
// We have not been able to set the current page at the main view.
// This is sad but still leaves us in a valid state. Therefore,
@@ -246,11 +289,31 @@ void CurrentSlideManager::HandleModelChange (void)
{
if (mnCurrentSlideIndex >= 0)
{
- mpCurrentSlide = mrSlideSorter.GetModel().GetPageDescriptor(
- mnCurrentSlideIndex);
+ mpCurrentSlide = mrSlideSorter.GetModel().GetPageDescriptor(mnCurrentSlideIndex);
if (mpCurrentSlide.get() != NULL)
- mpCurrentSlide->SetIsCurrentPage(true);
+ mrSlideSorter.GetView().SetState(mpCurrentSlide, PageDescriptor::ST_Current, true);
}
}
+
+
+
+IMPL_LINK(CurrentSlideManager, SwitchPageCallback, void*, EMPTYARG)
+{
+ if (mpCurrentSlide)
+ {
+ // Set current page. At the moment we have to do this in two
+ // different ways. The UNO way is the preferable one but, alas,
+ // it does not work always correctly (after some kinds of model
+ // changes). Therefore, we call DrawViewShell::SwitchPage(),
+ // too.
+ ViewShell* pViewShell = mrSlideSorter.GetViewShell();
+ if (pViewShell==NULL || ! pViewShell->IsMainViewShell())
+ SetCurrentSlideAtViewShellBase(mpCurrentSlide);
+ SetCurrentSlideAtXController(mpCurrentSlide);
+ }
+
+ return 1;
+}
+
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx
new file mode 100644
index 000000000000..88b294f3202f
--- /dev/null
+++ b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx
@@ -0,0 +1,199 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "SlsDragAndDropContext.hxx"
+
+#include "SlideSorter.hxx"
+#include "model/SlideSorterModel.hxx"
+#include "model/SlsPageEnumerationProvider.hxx"
+#include "view/SlideSorterView.hxx"
+#include "controller/SlideSorterController.hxx"
+#include "controller/SlsInsertionIndicatorHandler.hxx"
+#include "controller/SlsScrollBarManager.hxx"
+#include "controller/SlsProperties.hxx"
+#include "controller/SlsSelectionFunction.hxx"
+#include "controller/SlsSelectionManager.hxx"
+#include "controller/SlsTransferable.hxx"
+#include "DrawDocShell.hxx"
+#include "drawdoc.hxx"
+#include "app.hrc"
+#include <sfx2/bindings.hxx>
+#include <boost/bind.hpp>
+
+namespace sd { namespace slidesorter { namespace controller {
+
+DragAndDropContext::DragAndDropContext (SlideSorter& rSlideSorter)
+ : mpTargetSlideSorter(&rSlideSorter),
+ mnInsertionIndex(-1)
+{
+ ::std::vector<const SdPage*> aPages;
+
+ // No Drag-and-Drop for master pages.
+ if (rSlideSorter.GetModel().GetEditMode() != EM_PAGE)
+ return;
+
+ rSlideSorter.GetController().GetInsertionIndicatorHandler()->UpdateIndicatorIcon(
+ dynamic_cast<Transferable*>(SD_MOD()->pTransferDrag));
+}
+
+
+
+
+DragAndDropContext::~DragAndDropContext (void)
+{
+ SetTargetSlideSorter (NULL, Point(0,0), InsertionIndicatorHandler::UnknownMode, false);
+}
+
+
+
+
+void DragAndDropContext::GetPagesFromBookmarks (
+ ::std::vector<const SdPage*>& rPages,
+ sal_Int32& rnSelectionCount,
+ DrawDocShell* pDocShell,
+ const List& rBookmarks) const
+{
+ if (pDocShell == NULL)
+ return;
+
+ const SdDrawDocument* pDocument = pDocShell->GetDoc();
+ if (pDocument == NULL)
+ return;
+
+ for (ULONG nIndex=0,nCount=rBookmarks.Count(); nIndex<nCount; ++nIndex)
+ {
+ const String sPageName (*static_cast<String*>(rBookmarks.GetObject(nIndex)));
+ BOOL bIsMasterPage (FALSE);
+ const USHORT nPageIndex (pDocument->GetPageByName(sPageName, bIsMasterPage));
+ if (nPageIndex == SDRPAGE_NOTFOUND)
+ continue;
+
+ const SdPage* pPage = dynamic_cast<const SdPage*>(pDocument->GetPage(nPageIndex));
+ if (pPage != NULL)
+ rPages.push_back(pPage);
+ }
+ rnSelectionCount = rBookmarks.Count();
+}
+
+
+
+
+void DragAndDropContext::GetPagesFromSelection (
+ ::std::vector<const SdPage*>& rPages,
+ sal_Int32& rnSelectionCount,
+ model::PageEnumeration& rSelection) const
+{
+ // Show a new substitution for the selected page objects.
+ rnSelectionCount = 0;
+
+ while (rSelection.HasMoreElements())
+ {
+ model::SharedPageDescriptor pDescriptor (rSelection.GetNextElement());
+ if (rPages.size() < 3)
+ rPages.push_back(pDescriptor->GetPage());
+ ++rnSelectionCount;
+ }
+}
+
+
+
+
+void DragAndDropContext::Dispose (void)
+{
+ mnInsertionIndex = -1;
+}
+
+
+
+
+void DragAndDropContext::UpdatePosition (
+ const Point& rMousePosition,
+ const InsertionIndicatorHandler::Mode eMode,
+ const bool bAllowAutoScroll)
+{
+ if (mpTargetSlideSorter == NULL)
+ return;
+
+ if (mpTargetSlideSorter->GetProperties()->IsUIReadOnly())
+ return;
+
+ // Convert window coordinates into model coordinates (we need the
+ // window coordinates for auto-scrolling because that remains
+ // constant while scrolling.)
+ SharedSdWindow pWindow (mpTargetSlideSorter->GetContentWindow());
+ const Point aMouseModelPosition (pWindow->PixelToLogic(rMousePosition));
+ ::boost::shared_ptr<InsertionIndicatorHandler> pInsertionIndicatorHandler (
+ mpTargetSlideSorter->GetController().GetInsertionIndicatorHandler());
+
+ if ( ! (bAllowAutoScroll
+ && mpTargetSlideSorter->GetController().GetScrollBarManager().AutoScroll(
+ rMousePosition,
+ ::boost::bind(
+ &DragAndDropContext::UpdatePosition, this, rMousePosition, eMode, false))))
+ {
+ pInsertionIndicatorHandler->UpdatePosition(aMouseModelPosition, eMode);
+
+ // Remember the new insertion index.
+ mnInsertionIndex = pInsertionIndicatorHandler->GetInsertionPageIndex();
+ if (pInsertionIndicatorHandler->IsInsertionTrivial(mnInsertionIndex, eMode))
+ mnInsertionIndex = -1;
+ }
+}
+
+
+
+
+void DragAndDropContext::SetTargetSlideSorter (
+ SlideSorter* pSlideSorter,
+ const Point aMousePosition,
+ const InsertionIndicatorHandler::Mode eMode,
+ const bool bIsOverSourceView)
+{
+ if (mpTargetSlideSorter != NULL)
+ {
+ mpTargetSlideSorter->GetController().GetScrollBarManager().StopAutoScroll();
+ mpTargetSlideSorter->GetController().GetInsertionIndicatorHandler()->End(
+ Animator::AM_Animated);
+ }
+
+ mpTargetSlideSorter = pSlideSorter;
+
+ if (mpTargetSlideSorter != NULL)
+ {
+ mpTargetSlideSorter->GetController().GetInsertionIndicatorHandler()->Start(
+ bIsOverSourceView);
+ mpTargetSlideSorter->GetController().GetInsertionIndicatorHandler()->UpdatePosition(
+ aMousePosition,
+ eMode);
+
+ }
+}
+
+
+} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx
new file mode 100644
index 000000000000..7536f88d9474
--- /dev/null
+++ b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_SUBSTITUTION_HANDLER_HXX
+#define SD_SLIDESORTER_SUBSTITUTION_HANDLER_HXX
+
+#include <tools/gen.hxx>
+
+#include "model/SlsSharedPageDescriptor.hxx"
+#include "controller/SlsInsertionIndicatorHandler.hxx"
+#include <vector>
+
+
+namespace sd { namespace slidesorter {
+class SlideSorter;
+} }
+
+
+
+namespace sd { namespace slidesorter { namespace controller {
+
+/** A DragAndDropContext object handles an active drag and drop operation.
+ When the mouse is moved from one slide sorter window to another the
+ target SlideSorter object is exchanged accordingly.
+*/
+class DragAndDropContext
+{
+public:
+ /** Create a substitution display of the currently selected pages or,
+ when provided, the pages in the transferable.
+ */
+ DragAndDropContext (SlideSorter& rSlideSorter);
+ ~DragAndDropContext (void);
+
+ /** Call this method (for example as reaction to ESC key press) to avoid
+ processing (ie moving or inserting) the substition when the called
+ DragAndDropContext object is destroyed.
+ */
+ void Dispose (void);
+
+ /** Move the substitution display by the distance the mouse has
+ travelled since the last call to this method or to
+ CreateSubstitution(). The given point becomes the new anchor.
+ */
+ void UpdatePosition (
+ const Point& rMousePosition,
+ const InsertionIndicatorHandler::Mode eMode,
+ const bool bAllowAutoScroll = true);
+
+ void SetTargetSlideSorter (
+ SlideSorter* pSlideSorter = NULL,
+ const Point aMousePosition = Point(0,0),
+ const InsertionIndicatorHandler::Mode eMode = InsertionIndicatorHandler::UnknownMode,
+ const bool bIsOverSourceView = false);
+
+private:
+ SlideSorter* mpTargetSlideSorter;
+ model::SharedPageDescriptor mpHitDescriptor;
+ sal_Int32 mnInsertionIndex;
+
+ void GetPagesFromBookmarks (
+ ::std::vector<const SdPage*>& rPages,
+ sal_Int32& rnSelectionCount,
+ DrawDocShell* pDocShell,
+ const List& rBookmarks) const;
+ void GetPagesFromSelection (
+ ::std::vector<const SdPage*>& rPages,
+ sal_Int32& rnSelectionCount,
+ model::PageEnumeration& rSelection) const;
+};
+
+
+
+} } } // end of namespace ::sd::slidesorter::controller
+
+#endif
diff --git a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
index dcda73d38dba..445354cd9830 100755
--- a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
@@ -31,7 +31,8 @@
#include "SlideSorter.hxx"
#include "PaneDockingWindow.hxx"
#include "controller/SlideSorterController.hxx"
-#include "controller/SlsSelectionManager.hxx"
+#include "controller/SlsCurrentSlideManager.hxx"
+#include "controller/SlsVisibleAreaManager.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "view/SlideSorterView.hxx"
@@ -41,12 +42,15 @@
#include "Window.hxx"
#include "sdpage.hxx"
+#define UNIFY_FOCUS_AND_CURRENT_PAGE
+
namespace sd { namespace slidesorter { namespace controller {
FocusManager::FocusManager (SlideSorter& rSlideSorter)
: mrSlideSorter(rSlideSorter),
mnPageIndex(0),
- mbPageIsFocused(false)
+ mbPageIsFocused(false),
+ mbIsVerticalWrapActive(false)
{
if (mrSlideSorter.GetModel().GetPageCount() > 0)
mnPageIndex = 0;
@@ -68,69 +72,101 @@ void FocusManager::MoveFocus (FocusMoveDirection eDirection)
{
HideFocusIndicator (GetFocusedPageDescriptor());
- int nColumnCount (mrSlideSorter.GetView().GetLayouter().GetColumnCount());
+ const sal_Int32 nColumnCount (mrSlideSorter.GetView().GetLayouter().GetColumnCount());
+ const sal_Int32 nPageCount (mrSlideSorter.GetModel().GetPageCount());
switch (eDirection)
{
case FMD_NONE:
- if (mnPageIndex >= mrSlideSorter.GetModel().GetPageCount())
- mnPageIndex = mrSlideSorter.GetModel().GetPageCount() - 1;
+ // Nothing to be done.
break;
case FMD_LEFT:
- mnPageIndex -= 1;
- if (mnPageIndex < 0)
- {
- mnPageIndex = mrSlideSorter.GetModel().GetPageCount() - 1;
- SetFocusToToolBox();
- }
+ if (mnPageIndex > 0)
+ mnPageIndex -= 1;
+ else if (mbIsVerticalWrapActive)
+ mnPageIndex = nPageCount-1;
break;
case FMD_RIGHT:
- mnPageIndex += 1;
- if (mnPageIndex >= mrSlideSorter.GetModel().GetPageCount())
- {
+ if (mnPageIndex < nPageCount-1)
+ mnPageIndex += 1;
+ else if (mbIsVerticalWrapActive)
mnPageIndex = 0;
- SetFocusToToolBox();
- }
break;
case FMD_UP:
{
- int nColumn = mnPageIndex % nColumnCount;
- mnPageIndex -= nColumnCount;
- if (mnPageIndex < 0)
+ const sal_Int32 nCandidate (mnPageIndex - nColumnCount);
+ if (nCandidate < 0)
{
- // Wrap arround to the bottom row or the one above and
- // go to the correct column.
- int nCandidate = mrSlideSorter.GetModel().GetPageCount()-1;
- int nCandidateColumn = nCandidate % nColumnCount;
- if (nCandidateColumn > nColumn)
- mnPageIndex = nCandidate - (nCandidateColumn-nColumn);
- else if (nCandidateColumn < nColumn)
- mnPageIndex = nCandidate
- - nColumnCount
- + (nColumn - nCandidateColumn);
- else
- mnPageIndex = nCandidate;
+ if (mbIsVerticalWrapActive)
+ {
+ // Wrap arround to the bottom row or the one above
+ // and go to the correct column.
+ const sal_Int32 nLastIndex (nPageCount-1);
+ const sal_Int32 nLastColumn (nLastIndex % nColumnCount);
+ const sal_Int32 nCurrentColumn (mnPageIndex%nColumnCount);
+ if (nLastColumn >= nCurrentColumn)
+ {
+ // The last row contains the current column.
+ mnPageIndex = nLastIndex - (nLastColumn-nCurrentColumn);
+ }
+ else
+ {
+ // Only the second to last row contains the current column.
+ mnPageIndex = nLastIndex - nLastColumn
+ - nColumnCount
+ + nCurrentColumn;
+ }
+ }
+ }
+ else
+ {
+ // Move the focus the previous row.
+ mnPageIndex = nCandidate;
}
}
break;
case FMD_DOWN:
{
- int nColumn = mnPageIndex % nColumnCount;
- mnPageIndex += nColumnCount;
- if (mnPageIndex >= mrSlideSorter.GetModel().GetPageCount())
+ const sal_Int32 nCandidate (mnPageIndex + nColumnCount);
+ if (nCandidate >= nPageCount)
+ {
+ if (mbIsVerticalWrapActive)
+ {
+ // Wrap arround to the correct column.
+ mnPageIndex = mnPageIndex % nColumnCount;
+ }
+ else
+ {
+ // Do not move the focus.
+ }
+ }
+ else
{
- // Wrap arround to the correct column.
- mnPageIndex = nColumn;
+ // Move the focus to the next row.
+ mnPageIndex = nCandidate;
}
}
break;
}
+ if (mnPageIndex < 0)
+ {
+ OSL_ASSERT(mnPageIndex>=0);
+ mnPageIndex = 0;
+ }
+ else if (mnPageIndex >= nPageCount)
+ {
+ OSL_ASSERT(mnPageIndex<nPageCount);
+ mnPageIndex = nPageCount - 1;
+ }
+
if (mbPageIsFocused)
+ {
ShowFocusIndicator(GetFocusedPageDescriptor(), true);
+ }
}
}
@@ -172,7 +208,7 @@ bool FocusManager::ToggleFocus (void)
bool FocusManager::HasFocus (void) const
{
- return mrSlideSorter.GetView().GetWindow()->HasFocus();
+ return mrSlideSorter.GetContentWindow()->HasFocus();
}
@@ -193,7 +229,7 @@ sal_Int32 FocusManager::GetFocusedPageIndex (void) const
-
+/*
void FocusManager::FocusPage (sal_Int32 nPageIndex)
{
if (nPageIndex != mnPageIndex)
@@ -206,7 +242,7 @@ void FocusManager::FocusPage (sal_Int32 nPageIndex)
if (HasFocus() && !IsFocusShowing())
ShowFocus();
}
-
+*/
@@ -231,6 +267,14 @@ void FocusManager::SetFocusedPage (sal_Int32 nPageIndex)
+void FocusManager::SetFocusedPageToCurrentPage (void)
+{
+ SetFocusedPage(mrSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide());
+}
+
+
+
+
bool FocusManager::IsFocusShowing (void) const
{
return HasFocus() && mbPageIsFocused;
@@ -243,8 +287,7 @@ void FocusManager::HideFocusIndicator (const model::SharedPageDescriptor& rpDesc
{
if (rpDescriptor.get() != NULL)
{
- rpDescriptor->RemoveFocus();
- mrSlideSorter.GetView().RequestRepaint(rpDescriptor);
+ mrSlideSorter.GetView().SetState(rpDescriptor, model::PageDescriptor::ST_Focused, false);
}
}
@@ -257,21 +300,16 @@ void FocusManager::ShowFocusIndicator (
{
if (rpDescriptor.get() != NULL)
{
- rpDescriptor->SetFocus ();
+ mrSlideSorter.GetView().SetState(rpDescriptor, model::PageDescriptor::ST_Focused, true);
if (bScrollToFocus)
{
// Scroll the focused page object into the visible area and repaint
// it, so that the focus indicator becomes visible.
- view::SlideSorterView& rView (mrSlideSorter.GetView());
- mrSlideSorter.GetController().GetSelectionManager()->MakeRectangleVisible (
- rView.GetPageBoundingBox (
- GetFocusedPageDescriptor(),
- view::SlideSorterView::CS_MODEL,
- view::SlideSorterView::BBT_INFO));
+ mrSlideSorter.GetController().GetVisibleAreaManager().RequestVisible(rpDescriptor,true);
}
+ mrSlideSorter.GetView().RequestRepaint(rpDescriptor);
- mrSlideSorter.GetView().RequestRepaint (rpDescriptor);
NotifyFocusChangeListeners();
}
}
diff --git a/sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx b/sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx
index 666d4b017302..dbb65b0f657a 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx
@@ -109,8 +109,10 @@ void HideSlideFunction::DoExecute (SfxRequest& rRequest)
while (aSelectedPages.HasMoreElements())
{
model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
- pDescriptor->GetPage()->SetExcluded (eState==EXCLUDED);
- static_cast<view::SlideSorterView*>(mpView)->RequestRepaint(pDescriptor);
+ static_cast<view::SlideSorterView*>(mpView)->SetState(
+ pDescriptor,
+ model::PageDescriptor::ST_Excluded,
+ eState==EXCLUDED);
}
}
diff --git a/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx b/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx
new file mode 100644
index 000000000000..882adab932a8
--- /dev/null
+++ b/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx
@@ -0,0 +1,327 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "controller/SlsInsertionIndicatorHandler.hxx"
+#include "controller/SlsProperties.hxx"
+#include "view/SlideSorterView.hxx"
+#include "view/SlsLayouter.hxx"
+#include "view/SlsInsertionIndicatorOverlay.hxx"
+#include "model/SlideSorterModel.hxx"
+#include "model/SlsPageEnumerationProvider.hxx"
+#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
+
+#include "SlideSorter.hxx"
+
+using namespace ::com::sun::star::datatransfer::dnd::DNDConstants;
+
+namespace sd { namespace slidesorter { namespace controller {
+
+
+InsertionIndicatorHandler::InsertionIndicatorHandler (SlideSorter& rSlideSorter)
+ : mrSlideSorter(rSlideSorter),
+ mpInsertAnimator(),
+ mpInsertionIndicatorOverlay(new view::InsertionIndicatorOverlay(rSlideSorter)),
+ maInsertPosition(),
+ meMode(MoveMode),
+ mbIsActive(false),
+ mbIsReadOnly(mrSlideSorter.GetModel().IsReadOnly()),
+ mbIsOverSourceView(true),
+ maIconSize(0,0),
+ mbIsForcedShow(false)
+{
+}
+
+
+
+
+InsertionIndicatorHandler::~InsertionIndicatorHandler (void)
+{
+}
+
+
+
+
+void InsertionIndicatorHandler::Start (const bool bIsOverSourceView)
+{
+ if (mbIsActive)
+ {
+ OSL_ASSERT(!mbIsActive);
+ }
+
+ mbIsReadOnly = mrSlideSorter.GetModel().IsReadOnly();
+ if (mbIsReadOnly)
+ return;
+
+ mbIsActive = true;
+ mbIsOverSourceView = bIsOverSourceView;
+}
+
+
+
+
+void InsertionIndicatorHandler::End (const controller::Animator::AnimationMode eMode)
+{
+ if (mbIsForcedShow || ! mbIsActive || mbIsReadOnly)
+ return;
+
+ GetInsertAnimator()->Reset(eMode);
+
+ mbIsActive = false;
+ // maInsertPosition = view::InsertPosition();
+ meMode = UnknownMode;
+
+ mpInsertionIndicatorOverlay->Hide();
+ mpInsertionIndicatorOverlay.reset(new view::InsertionIndicatorOverlay(mrSlideSorter));
+}
+
+
+
+
+void InsertionIndicatorHandler::ForceShow (void)
+{
+ mbIsForcedShow = true;
+}
+
+
+
+
+void InsertionIndicatorHandler::ForceEnd (void)
+{
+ mbIsForcedShow = false;
+ End(Animator::AM_Immediate);
+}
+
+
+
+
+void InsertionIndicatorHandler::UpdateIndicatorIcon (const Transferable* pTransferable)
+{
+ mpInsertionIndicatorOverlay->Create(pTransferable);
+ maIconSize = mpInsertionIndicatorOverlay->GetSize();
+}
+
+
+
+
+InsertionIndicatorHandler::Mode InsertionIndicatorHandler::GetModeFromDndAction (
+ const sal_Int8 nDndAction)
+{
+ if ((nDndAction & ACTION_MOVE) != 0)
+ return MoveMode;
+ else if ((nDndAction & ACTION_COPY) != 0)
+ return CopyMode;
+ else
+ return UnknownMode;
+}
+
+
+
+
+void InsertionIndicatorHandler::UpdatePosition (
+ const Point& rMouseModelPosition,
+ const Mode eMode)
+{
+ if ( ! mbIsActive)
+ return;
+
+ if (mbIsReadOnly)
+ return;
+
+ SetPosition(rMouseModelPosition, eMode);
+}
+
+
+
+
+void InsertionIndicatorHandler::UpdatePosition (
+ const Point& rMouseModelPosition,
+ const sal_Int8 nDndAction)
+{
+ UpdatePosition(rMouseModelPosition, GetModeFromDndAction(nDndAction));
+}
+
+
+
+
+bool InsertionIndicatorHandler::IsActive (void) const
+{
+ return mbIsActive;
+}
+
+
+
+
+sal_Int32 InsertionIndicatorHandler::GetInsertionPageIndex (void) const
+{
+ if (mbIsReadOnly)
+ return -1;
+ else
+ return maInsertPosition.GetIndex();
+}
+
+
+
+
+void InsertionIndicatorHandler::SetPosition (
+ const Point& rPoint,
+ const Mode eMode)
+{
+ view::Layouter& rLayouter (mrSlideSorter.GetView().GetLayouter());
+
+ const view::InsertPosition aInsertPosition (rLayouter.GetInsertPosition(
+ rPoint,
+ maIconSize,
+ mrSlideSorter.GetModel()));
+
+ static sal_Int32 TargetIndex (1);
+ if (aInsertPosition.GetIndex() == TargetIndex)
+ {
+ const view::InsertPosition aPosition (rLayouter.GetInsertPosition(
+ rPoint,
+ maIconSize,
+ mrSlideSorter.GetModel()));
+ const view::InsertPosition aPosition2 (rLayouter.GetInsertPosition(
+ rPoint,
+ maIconSize,
+ mrSlideSorter.GetModel()));
+ }
+
+ if (maInsertPosition != aInsertPosition
+ || meMode != eMode
+ // || ! mpInsertionIndicatorOverlay->IsVisible()
+ )
+ {
+ maInsertPosition = aInsertPosition;
+ meMode = eMode;
+ mbIsInsertionTrivial = IsInsertionTrivial(maInsertPosition.GetIndex(), eMode);
+ if (maInsertPosition.GetIndex()>=0 && ! mbIsInsertionTrivial)
+ {
+ mpInsertionIndicatorOverlay->SetLocation(maInsertPosition.GetLocation());
+
+ GetInsertAnimator()->SetInsertPosition(maInsertPosition);
+ mpInsertionIndicatorOverlay->Show();
+ }
+ else
+ {
+ GetInsertAnimator()->Reset(Animator::AM_Animated);
+ mpInsertionIndicatorOverlay->Hide();
+ }
+ }
+}
+
+
+
+
+::boost::shared_ptr<view::InsertAnimator> InsertionIndicatorHandler::GetInsertAnimator (void)
+{
+ if ( ! mpInsertAnimator)
+ mpInsertAnimator.reset(new view::InsertAnimator(mrSlideSorter));
+ return mpInsertAnimator;
+}
+
+
+
+
+bool InsertionIndicatorHandler::IsInsertionTrivial (
+ const sal_Int32 nInsertionIndex,
+ const Mode eMode) const
+{
+ if (eMode == CopyMode)
+ return false;
+ else if (eMode == UnknownMode)
+ return true;
+
+ if ( ! mbIsOverSourceView)
+ return false;
+
+ // Iterate over all selected pages and check whether there are
+ // holes. While we do this we remember the indices of the first and
+ // last selected page as preparation for the next step.
+ sal_Int32 nCurrentIndex = -1;
+ sal_Int32 nFirstIndex = -1;
+ sal_Int32 nLastIndex = -1;
+ model::PageEnumeration aSelectedPages (
+ model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
+ mrSlideSorter.GetModel()));
+ while (aSelectedPages.HasMoreElements())
+ {
+ model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
+
+ // Get the page number and compare it to the last one.
+ const sal_Int32 nPageNumber (pDescriptor->GetPageIndex());
+ if (nCurrentIndex>=0 && nPageNumber>(nCurrentIndex+1))
+ return false;
+ else
+ nCurrentIndex = nPageNumber;
+
+ // Remember indices of the first and last page of the selection.
+ if (nFirstIndex == -1)
+ nFirstIndex = nPageNumber;
+ nLastIndex = nPageNumber;
+ }
+
+ // When we come here then the selection has no holes. We still have
+ // to check that the insertion position is not directly in front or
+ // directly behind the selection and thus moving the selection there
+ // would not change the model.
+ if (nInsertionIndex<nFirstIndex || nInsertionIndex>(nLastIndex+1))
+ return false;
+
+ return true;
+}
+
+
+
+
+bool InsertionIndicatorHandler::IsInsertionTrivial (const sal_Int8 nDndAction)
+{
+ return IsInsertionTrivial(GetInsertionPageIndex(), GetModeFromDndAction(nDndAction));
+}
+
+
+
+
+//===== InsertionIndicatorHandler::ForceShowContext ===========================
+
+InsertionIndicatorHandler::ForceShowContext::ForceShowContext (
+ const ::boost::shared_ptr<InsertionIndicatorHandler>& rpHandler)
+ : mpHandler(rpHandler)
+{
+ mpHandler->ForceShow();
+}
+
+
+
+
+InsertionIndicatorHandler::ForceShowContext::~ForceShowContext (void)
+{
+ mpHandler->ForceEnd();
+}
+
+} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx
index 94b3b4afe717..9f1218013e16 100755
--- a/sd/source/ui/slidesorter/controller/SlsListener.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx
@@ -25,8 +25,8 @@
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
+
#include "SlsListener.hxx"
#include "SlideSorter.hxx"
@@ -35,9 +35,15 @@
#include "controller/SlideSorterController.hxx"
#include "controller/SlsPageSelector.hxx"
#include "controller/SlsCurrentSlideManager.hxx"
+#include "controller/SlsSelectionManager.hxx"
+#include "controller/SlsSelectionObserver.hxx"
#include "model/SlideSorterModel.hxx"
+#include "model/SlsPageEnumerationProvider.hxx"
#include "view/SlideSorterView.hxx"
+#include "cache/SlsPageCache.hxx"
+#include "cache/SlsPageCacheManager.hxx"
#include "drawdoc.hxx"
+#include "DrawDocShell.hxx"
#include "glob.hrc"
#include "ViewShellBase.hxx"
@@ -75,7 +81,8 @@ Listener::Listener (
mxFrameWeak(),
mpModelChangeLock()
{
- StartListening (*mrSlideSorter.GetModel().GetDocument());
+ StartListening(*mrSlideSorter.GetModel().GetDocument());
+ StartListening(*mrSlideSorter.GetModel().GetDocument()->GetDocSh());
mbListeningToDocument = true;
// Connect to the UNO document.
@@ -127,7 +134,7 @@ Listener::Listener (
if (pMainViewShell != NULL
&& pMainViewShell!=pViewShell)
{
- StartListening (*pMainViewShell);
+ StartListening(*pMainViewShell);
}
Link aLink (LINK(this, Listener, EventMultiplexerCallback));
@@ -157,7 +164,8 @@ void Listener::ReleaseListeners (void)
{
if (mbListeningToDocument)
{
- EndListening (*mrSlideSorter.GetModel().GetDocument());
+ EndListening(*mrSlideSorter.GetModel().GetDocument()->GetDocSh());
+ EndListening(*mrSlideSorter.GetModel().GetDocument());
mbListeningToDocument = false;
}
@@ -303,18 +311,15 @@ void Listener::Notify (
if (rHint.ISA(SdrHint))
{
SdrHint& rSdrHint (*PTR_CAST(SdrHint,&rHint));
- if(rSdrHint.GetKind() == HINT_PAGEORDERCHG )
+ switch (rSdrHint.GetKind())
{
- if (rBroadcaster.ISA(SdDrawDocument))
- {
- SdDrawDocument& rDocument (
- static_cast<SdDrawDocument&>(rBroadcaster));
- if (rDocument.GetMasterSdPageCount(PK_STANDARD)
- == rDocument.GetMasterSdPageCount(PK_NOTES))
- {
- mrController.HandleModelChange();
- }
- }
+ case HINT_PAGEORDERCHG:
+ if (&rBroadcaster == mrSlideSorter.GetModel().GetDocument())
+ HandleModelChange(rSdrHint.GetPage());
+ break;
+
+ default:
+ break;
}
}
else if (rHint.ISA(ViewShellHint))
@@ -351,6 +356,16 @@ void Listener::Notify (
break;
}
}
+ else if (rHint.ISA(SfxSimpleHint))
+ {
+ SfxSimpleHint& rSfxSimpleHint (*PTR_CAST(SfxSimpleHint,&rHint));
+ switch (rSfxSimpleHint.GetId())
+ {
+ case SFX_HINT_DOCCHANGED:
+ mrController.CheckForMasterPageAssignment();
+ break;
+ }
+ }
}
@@ -392,7 +407,7 @@ IMPL_LINK(Listener, EventMultiplexerCallback, ::sd::tools::EventMultiplexerEvent
case tools::EventMultiplexerEvent::EID_CONTROLLER_ATTACHED:
{
ConnectToController();
- mrController.GetPageSelector().UpdateAllPages();
+ // mrController.GetPageSelector().GetCoreSelection();
UpdateEditMode();
}
break;
@@ -402,6 +417,12 @@ IMPL_LINK(Listener, EventMultiplexerCallback, ::sd::tools::EventMultiplexerEvent
DisconnectFromController();
break;
+ case tools::EventMultiplexerEvent::EID_SHAPE_CHANGED:
+ case tools::EventMultiplexerEvent::EID_SHAPE_INSERTED:
+ case tools::EventMultiplexerEvent::EID_SHAPE_REMOVED:
+ HandleShapeModification(static_cast<const SdrPage*>(pEvent->mpUserData));
+ break;
+
default:
break;
}
@@ -463,7 +484,7 @@ void SAL_CALL Listener::propertyChange (
static const ::rtl::OUString sEditModePropertyName (
RTL_CONSTASCII_USTRINGPARAM("IsMasterPageMode"));
- if (rEvent.PropertyName.equals (sCurrentPagePropertyName))
+ if (rEvent.PropertyName.equals(sCurrentPagePropertyName))
{
Any aCurrentPage = rEvent.NewValue;
Reference<beans::XPropertySet> xPageSet (aCurrentPage, UNO_QUERY);
@@ -475,13 +496,13 @@ void SAL_CALL Listener::propertyChange (
String(RTL_CONSTASCII_USTRINGPARAM("Number")));
sal_Int32 nCurrentPage = 0;
aPageNumber >>= nCurrentPage;
- mrController.GetPageSelector().UpdateAllPages ();
+ mrController.GetPageSelector().GetCoreSelection();
// The selection is already set but we call SelectPage()
// nevertheless in order to make the new current page the
// last recently selected page of the PageSelector. This is
// used when making the selection visible.
mrController.GetPageSelector().SelectPage(nCurrentPage-1);
- mrController.GetCurrentSlideManager()->CurrentSlideHasChanged(nCurrentPage-1);
+ mrController.GetCurrentSlideManager()->NotifyCurrentSlideChange(nCurrentPage-1);
}
catch (beans::UnknownPropertyException aEvent)
{
@@ -520,7 +541,7 @@ void SAL_CALL Listener::frameAction (const frame::FrameActionEvent& rEvent)
case frame::FrameAction_COMPONENT_REATTACHED:
{
ConnectToController();
- mrController.GetPageSelector().UpdateAllPages();
+ mrController.GetPageSelector().GetCoreSelection();
UpdateEditMode();
}
break;
@@ -580,6 +601,84 @@ void Listener::UpdateEditMode (void)
+void Listener::HandleModelChange (const SdrPage* pPage)
+{
+ // Notify model and selection observer about the page. The return value
+ // of the model call acts as filter as to which events to pass to the
+ // selection observer.
+ if (mrSlideSorter.GetModel().NotifyPageEvent(pPage))
+ {
+ // The page of the hint belongs (or belonged) to the model.
+
+ // Tell the cache manager that the preview bitmaps for a deleted
+ // page can be removed from all caches.
+ if (pPage!=NULL && ! pPage->IsInserted())
+ cache::PageCacheManager::Instance()->ReleasePreviewBitmap(pPage);
+
+ mrController.GetSelectionManager()->GetSelectionObserver()->NotifyPageEvent(pPage);
+ }
+
+ // Tell the controller about the model change only when the document is
+ // in a sane state, not just in the middle of a larger change.
+ SdDrawDocument* pDocument (mrSlideSorter.GetModel().GetDocument());
+ if (pDocument != NULL
+ && pDocument->GetMasterSdPageCount(PK_STANDARD) == pDocument->GetMasterSdPageCount(PK_NOTES))
+ {
+ // A model change can make updates of some text fields necessary
+ // (like page numbers and page count.) Invalidate all previews in
+ // the cache to cope with this. Doing this on demand would be a
+ // nice optimization.
+ cache::PageCacheManager::Instance()->InvalidateAllPreviewBitmaps(pDocument->getUnoModel());
+
+ mrController.HandleModelChange();
+ }
+}
+
+
+
+void Listener::HandleShapeModification (const SdrPage* pPage)
+{
+ if (pPage == NULL)
+ return;
+
+ // Invalidate the preview of the page (in all slide sorters that display
+ // it.)
+ ::boost::shared_ptr<cache::PageCacheManager> pCacheManager (cache::PageCacheManager::Instance());
+ if ( ! pCacheManager)
+ return;
+ SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
+ if (pDocument == NULL)
+ {
+ OSL_ASSERT(pDocument!=NULL);
+ return;
+ }
+ pCacheManager->InvalidatePreviewBitmap(pDocument->getUnoModel(), pPage);
+ mrSlideSorter.GetView().GetPreviewCache()->RequestPreviewBitmap(pPage);
+
+ // When the page is a master page then invalidate the previews of all
+ // pages that are linked to this master page.
+ if (pPage->IsMasterPage())
+ {
+ for (USHORT nIndex=0,nCount=pDocument->GetSdPageCount(PK_STANDARD);
+ nIndex<nCount;
+ ++nIndex)
+ {
+ const SdPage* pCandidate = pDocument->GetSdPage(nIndex, PK_STANDARD);
+ if (pCandidate!=NULL && pCandidate->TRG_HasMasterPage())
+ {
+ if (&pCandidate->TRG_GetMasterPage() == pPage)
+ pCacheManager->InvalidatePreviewBitmap(pDocument->getUnoModel(), pCandidate);
+ }
+ else
+ {
+ OSL_ASSERT(pCandidate!=NULL && pCandidate->TRG_HasMasterPage());
+ }
+ }
+ }
+}
+
+
+
void Listener::ThrowIfDisposed (void)
throw (::com::sun::star::lang::DisposedException)
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.hxx b/sd/source/ui/slidesorter/controller/SlsListener.hxx
index 5613452a1b59..7f65435ff738 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsListener.hxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.hxx
@@ -31,9 +31,7 @@
#include "MutexOwner.hxx"
#include "controller/SlideSorterController.hxx"
#include <com/sun/star/document/XEventListener.hpp>
-#ifndef _COM_SUN_STAR_DOCUMENT_XPROPERTYCHANGELISTENER_HPP_
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
-#endif
#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -171,6 +169,17 @@ private:
*/
void UpdateEditMode (void);
+ /** Handle a change in the order of slides or when the set of slides has
+ changed, i.e. a slide has been created.
+ */
+ void HandleModelChange (const SdrPage* pPage);
+
+ /** Handle a modification to a shape on the given page. When this is a
+ regular page then update its preview. When it is a master page then
+ additionally update the previews of all pages linked to it.
+ */
+ void HandleShapeModification (const SdrPage* pPage);
+
/** This method throws a DisposedException when the object has already been
disposed.
*/
diff --git a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
index 0e8f5e100d1c..51eb81fae214 100755..100644
--- a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
@@ -33,6 +33,9 @@
#include "SlideSorterViewShell.hxx"
#include "controller/SlideSorterController.hxx"
#include "controller/SlsSelectionManager.hxx"
+#include "controller/SlsAnimator.hxx"
+#include "controller/SlsCurrentSlideManager.hxx"
+#include "controller/SlsVisibleAreaManager.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "model/SlideSorterModel.hxx"
@@ -44,14 +47,16 @@
#include "ViewShellBase.hxx"
#include <com/sun/star/drawing/XDrawView.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <boost/bind.hpp>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::sd::slidesorter::model;
using namespace ::sd::slidesorter::view;
-namespace sd { namespace slidesorter { namespace controller {
+namespace sd { namespace slidesorter { namespace controller {
PageSelector::PageSelector (SlideSorter& rSlideSorter)
: mrModel(rSlideSorter.GetModel()),
@@ -61,7 +66,10 @@ PageSelector::PageSelector (SlideSorter& rSlideSorter)
mnBroadcastDisableLevel(0),
mbSelectionChangeBroadcastPending(false),
mpMostRecentlySelectedPage(),
- mpSelectionAnchor()
+ mpSelectionAnchor(),
+ mpCurrentPage(),
+ mnUpdateLockCount(0),
+ mbIsUpdateCurrentPagePending(false)
{
CountSelectedPages ();
}
@@ -71,9 +79,12 @@ PageSelector::PageSelector (SlideSorter& rSlideSorter)
void PageSelector::SelectAllPages (void)
{
+ VisibleAreaManager::TemporaryDisabler aDisabler (mrSlideSorter);
+ PageSelector::UpdateLock aLock (*this);
+
int nPageCount = mrModel.GetPageCount();
for (int nPageIndex=0; nPageIndex<nPageCount; nPageIndex++)
- SelectPage (nPageIndex);
+ SelectPage(nPageIndex);
}
@@ -81,21 +92,26 @@ void PageSelector::SelectAllPages (void)
void PageSelector::DeselectAllPages (void)
{
+ VisibleAreaManager::TemporaryDisabler aDisabler (mrSlideSorter);
+ PageSelector::UpdateLock aLock (*this);
+
int nPageCount = mrModel.GetPageCount();
for (int nPageIndex=0; nPageIndex<nPageCount; nPageIndex++)
- DeselectPage (nPageIndex);
+ DeselectPage(nPageIndex);
+
DBG_ASSERT (mnSelectedPageCount==0,
"PageSelector::DeselectAllPages: the selected pages counter is not 0");
mnSelectedPageCount = 0;
- mpMostRecentlySelectedPage.reset();
mpSelectionAnchor.reset();
}
-void PageSelector::UpdateAllPages (void)
+void PageSelector::GetCoreSelection (void)
{
+ PageSelector::UpdateLock aLock (*this);
+
bool bSelectionHasChanged (true);
mnSelectedPageCount = 0;
model::PageEnumeration aAllPages (
@@ -103,13 +119,14 @@ void PageSelector::UpdateAllPages (void)
while (aAllPages.HasMoreElements())
{
model::SharedPageDescriptor pDescriptor (aAllPages.GetNextElement());
- if (pDescriptor->UpdateSelection())
+ if (pDescriptor->GetCoreSelection())
{
+ mrSlideSorter.GetController().GetVisibleAreaManager().RequestVisible(pDescriptor);
mrSlideSorter.GetView().RequestRepaint(pDescriptor);
bSelectionHasChanged = true;
}
- if (pDescriptor->IsSelected())
+ if (pDescriptor->HasState(PageDescriptor::ST_Selected))
mnSelectedPageCount++;
}
@@ -125,6 +142,20 @@ void PageSelector::UpdateAllPages (void)
+void PageSelector::SetCoreSelection (void)
+{
+ model::PageEnumeration aAllPages (
+ model::PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
+ while (aAllPages.HasMoreElements())
+ {
+ model::SharedPageDescriptor pDescriptor (aAllPages.GetNextElement());
+ pDescriptor->SetCoreSelection();
+ }
+}
+
+
+
+
void PageSelector::SelectPage (int nPageIndex)
{
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
@@ -137,7 +168,7 @@ void PageSelector::SelectPage (int nPageIndex)
void PageSelector::SelectPage (const SdPage* pPage)
{
- int nPageIndex = (pPage->GetPageNum()-1) / 2;
+ const sal_Int32 nPageIndex (mrModel.GetIndex(pPage));
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
if (pDescriptor.get()!=NULL && pDescriptor->GetPage()==pPage)
SelectPage(pDescriptor);
@@ -148,9 +179,11 @@ void PageSelector::SelectPage (const SdPage* pPage)
void PageSelector::SelectPage (const SharedPageDescriptor& rpDescriptor)
{
- if (rpDescriptor.get()!=NULL && rpDescriptor->Select())
+ if (rpDescriptor.get()!=NULL
+ && mrSlideSorter.GetView().SetState(rpDescriptor, PageDescriptor::ST_Selected, true))
{
- mnSelectedPageCount ++;
+ ++mnSelectedPageCount;
+ mrSlideSorter.GetController().GetVisibleAreaManager().RequestVisible(rpDescriptor,true);
mrSlideSorter.GetView().RequestRepaint(rpDescriptor);
mpMostRecentlySelectedPage = rpDescriptor;
@@ -161,27 +194,49 @@ void PageSelector::SelectPage (const SharedPageDescriptor& rpDescriptor)
mbSelectionChangeBroadcastPending = true;
else
mrController.GetSelectionManager()->SelectionHasChanged();
+ UpdateCurrentPage();
+
+ CheckConsistency();
}
}
-void PageSelector::DeselectPage (int nPageIndex)
+void PageSelector::DeselectPage (
+ int nPageIndex,
+ const bool bUpdateCurrentPage)
{
model::SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
if (pDescriptor.get() != NULL)
- DeselectPage(pDescriptor);
+ DeselectPage(pDescriptor, bUpdateCurrentPage);
}
-void PageSelector::DeselectPage (const SharedPageDescriptor& rpDescriptor)
+void PageSelector::DeselectPage (
+ const SdPage* pPage,
+ const bool bUpdateCurrentPage)
{
- if (rpDescriptor.get()!=NULL && rpDescriptor->Deselect())
+ const sal_Int32 nPageIndex (mrModel.GetIndex(pPage));
+ SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
+ if (pDescriptor.get()!=NULL && pDescriptor->GetPage()==pPage)
+ DeselectPage(pDescriptor, bUpdateCurrentPage);
+}
+
+
+
+
+void PageSelector::DeselectPage (
+ const SharedPageDescriptor& rpDescriptor,
+ const bool bUpdateCurrentPage)
+{
+ if (rpDescriptor.get()!=NULL
+ && mrSlideSorter.GetView().SetState(rpDescriptor, PageDescriptor::ST_Selected, false))
{
- mnSelectedPageCount --;
+ --mnSelectedPageCount;
+ mrSlideSorter.GetController().GetVisibleAreaManager().RequestVisible(rpDescriptor);
mrSlideSorter.GetView().RequestRepaint(rpDescriptor);
if (mpMostRecentlySelectedPage == rpDescriptor)
mpMostRecentlySelectedPage.reset();
@@ -189,6 +244,29 @@ void PageSelector::DeselectPage (const SharedPageDescriptor& rpDescriptor)
mbSelectionChangeBroadcastPending = true;
else
mrController.GetSelectionManager()->SelectionHasChanged();
+ if (bUpdateCurrentPage)
+ UpdateCurrentPage();
+
+ CheckConsistency();
+ }
+}
+
+
+
+
+void PageSelector::CheckConsistency (void) const
+{
+ int nSelectionCount (0);
+ for (int nPageIndex=0,nPageCount=mrModel.GetPageCount(); nPageIndex<nPageCount; nPageIndex++)
+ {
+ SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
+ assert(pDescriptor);
+ if (pDescriptor->HasState(PageDescriptor::ST_Selected))
+ ++nSelectionCount;
+ }
+ if (nSelectionCount!=mnSelectedPageCount)
+ {
+ assert(nSelectionCount==mnSelectedPageCount);
}
}
@@ -199,7 +277,7 @@ bool PageSelector::IsPageSelected (int nPageIndex)
{
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
if (pDescriptor.get() != NULL)
- return pDescriptor->IsSelected();
+ return pDescriptor->HasState(PageDescriptor::ST_Selected);
else
return false;
}
@@ -223,30 +301,6 @@ int PageSelector::GetSelectedPageCount (void) const
-void PageSelector::PrepareModelChange (void)
-{
- DeselectAllPages ();
-}
-
-
-
-
-void PageSelector::HandleModelChange (void)
-{
- UpdateAllPages();
-}
-
-
-
-
-SharedPageDescriptor PageSelector::GetMostRecentlySelectedPage (void) const
-{
- return mpMostRecentlySelectedPage;
-}
-
-
-
-
SharedPageDescriptor PageSelector::GetSelectionAnchor (void) const
{
return mpSelectionAnchor;
@@ -270,13 +324,13 @@ void PageSelector::CountSelectedPages (void)
-void PageSelector::EnableBroadcasting (bool bMakeSelectionVisible)
+void PageSelector::EnableBroadcasting (void)
{
if (mnBroadcastDisableLevel > 0)
mnBroadcastDisableLevel --;
if (mnBroadcastDisableLevel==0 && mbSelectionChangeBroadcastPending)
{
- mrController.GetSelectionManager()->SelectionHasChanged(bMakeSelectionVisible);
+ mrController.GetSelectionManager()->SelectionHasChanged();
mbSelectionChangeBroadcastPending = false;
}
}
@@ -301,7 +355,7 @@ void PageSelector::DisableBroadcasting (void)
for (int nIndex=0; nIndex<nPageCount; nIndex++)
{
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nIndex));
- if (pDescriptor.get()!=NULL && pDescriptor->IsSelected())
+ if (pDescriptor.get()!=NULL && pDescriptor->HasState(PageDescriptor::ST_Selected))
pSelection->push_back(pDescriptor->GetPage());
}
@@ -311,14 +365,124 @@ void PageSelector::DisableBroadcasting (void)
-void PageSelector::SetPageSelection (const ::boost::shared_ptr<PageSelection>& rpSelection)
+void PageSelector::SetPageSelection (
+ const ::boost::shared_ptr<PageSelection>& rpSelection,
+ const bool bUpdateCurrentPage)
{
PageSelection::const_iterator iPage;
for (iPage=rpSelection->begin(); iPage!=rpSelection->end(); ++iPage)
SelectPage(*iPage);
+ if (bUpdateCurrentPage)
+ UpdateCurrentPage();
}
+void PageSelector::UpdateCurrentPage (const bool bUpdateOnlyWhenPending)
+{
+ if (mnUpdateLockCount > 0)
+ {
+ mbIsUpdateCurrentPagePending = true;
+ return;
+ }
+
+ if ( ! mbIsUpdateCurrentPagePending && bUpdateOnlyWhenPending)
+ return;
+
+ mbIsUpdateCurrentPagePending = false;
+
+ // Make the first selected page the current page.
+ const sal_Int32 nPageCount (GetPageCount());
+ for (sal_Int32 nIndex=0; nIndex<nPageCount; ++nIndex)
+ {
+ SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nIndex));
+ if (pDescriptor && pDescriptor->HasState(PageDescriptor::ST_Selected))
+ {
+ // Switching the current slide normally sets also the selection
+ // to just the new current slide. To prevent that, we store
+ // (and at the end of this scope restore) the current selection.
+ ::boost::shared_ptr<PageSelection> pSelection (GetPageSelection());
+
+ mrController.GetCurrentSlideManager()->SwitchCurrentSlide(pDescriptor);
+
+ // Restore the selection and prevent a recursive call to
+ // UpdateCurrentPage().
+ SetPageSelection(pSelection, false);
+ return;
+ }
+ }
+
+ // No page is selected. Do not change the current slide.
+}
+
+
+
+
+//===== PageSelector::UpdateLock ==============================================
+
+PageSelector::UpdateLock::UpdateLock (SlideSorter& rSlideSorter)
+ : mpSelector(&rSlideSorter.GetController().GetPageSelector())
+{
+ ++mpSelector->mnUpdateLockCount;
+}
+
+
+
+
+PageSelector::UpdateLock::UpdateLock (PageSelector& rSelector)
+ : mpSelector(&rSelector)
+{
+ ++mpSelector->mnUpdateLockCount;
+}
+
+
+
+
+PageSelector::UpdateLock::~UpdateLock (void)
+{
+ Release();
+}
+
+void PageSelector::UpdateLock::Release (void)
+{
+ if (mpSelector != NULL)
+ {
+ --mpSelector->mnUpdateLockCount;
+ OSL_ASSERT(mpSelector->mnUpdateLockCount >= 0);
+ if (mpSelector->mnUpdateLockCount == 0)
+ mpSelector->UpdateCurrentPage(true);
+
+ mpSelector = NULL;
+ }
+}
+
+
+
+
+//===== PageSelector::BroadcastLock ==============================================
+
+PageSelector::BroadcastLock::BroadcastLock (SlideSorter& rSlideSorter)
+ : mrSelector(rSlideSorter.GetController().GetPageSelector())
+{
+ mrSelector.DisableBroadcasting();
+}
+
+
+
+
+PageSelector::BroadcastLock::BroadcastLock (PageSelector& rSelector)
+ : mrSelector(rSelector)
+{
+ mrSelector.DisableBroadcasting();
+}
+
+
+
+
+PageSelector::BroadcastLock::~BroadcastLock (void)
+{
+ mrSelector.EnableBroadcasting();
+}
+
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsProperties.cxx b/sd/source/ui/slidesorter/controller/SlsProperties.cxx
index 7382d769bbe2..532047cfaefe 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsProperties.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsProperties.cxx
@@ -37,13 +37,16 @@ Properties::Properties (void)
mbIsShowSelection(true),
mbIsShowFocus(true),
mbIsCenterSelection(false),
- mbIsSmoothSelectionScrolling(false),
+ mbIsSmoothSelectionScrolling(true),
mbIsSuspendPreviewUpdatesDuringFullScreenPresentation(true),
maBackgroundColor(Application::GetSettings().GetStyleSettings().GetWindowColor()),
maTextColor(Application::GetSettings().GetStyleSettings().GetActiveTextColor()),
- maSelectionColor(Application::GetSettings().GetStyleSettings().GetMenuHighlightColor()),
+ maSelectionColor(Application::GetSettings().GetStyleSettings().GetHighlightColor()),
maHighlightColor(Application::GetSettings().GetStyleSettings().GetMenuHighlightColor()),
- mbIsUIReadOnly(false)
+ mbIsUIReadOnly(false),
+ mbIsOnlyPreviewTriggersMouseOver(true),
+ mbIsHighContrastModeActive(
+ Application::GetSettings().GetStyleSettings().GetHighContrastMode())
{
}
@@ -57,6 +60,19 @@ Properties::~Properties (void)
+void Properties::HandleDataChangeEvent (void)
+{
+ maBackgroundColor = Application::GetSettings().GetStyleSettings().GetWindowColor();
+ maTextColor = Application::GetSettings().GetStyleSettings().GetActiveTextColor();
+ maSelectionColor = Application::GetSettings().GetStyleSettings().GetHighlightColor();
+ maHighlightColor = Application::GetSettings().GetStyleSettings().GetMenuHighlightColor();
+ mbIsHighContrastModeActive
+ = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
+}
+
+
+
+
bool Properties::IsHighlightCurrentSlide (void) const
{
return mbIsHighlightCurrentSlide;
@@ -230,4 +246,28 @@ void Properties::SetUIReadOnly (const bool bIsUIReadOnly)
}
+
+
+bool Properties::IsOnlyPreviewTriggersMouseOver (void) const
+{
+ return mbIsOnlyPreviewTriggersMouseOver;
+}
+
+
+
+
+void Properties::SetOnlyPreviewTriggersMouseOver (const bool bFlag)
+{
+ mbIsOnlyPreviewTriggersMouseOver = bFlag;
+}
+
+
+
+
+bool Properties::IsHighContrastModeActive (void) const
+{
+ return mbIsHighContrastModeActive;
+}
+
+
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
index 5ee7f6f58b82..c94dd6d550b0 100755..100644
--- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
@@ -31,11 +31,12 @@
#include "SlideSorter.hxx"
#include "controller/SlideSorterController.hxx"
+#include "controller/SlsVisibleAreaManager.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "view/SlideSorterView.hxx"
#include "view/SlsLayouter.hxx"
-#include "view/SlsViewOverlay.hxx"
+#include "view/SlsTheme.hxx"
#include "Window.hxx"
#include "sdpage.hxx"
@@ -51,11 +52,15 @@ ScrollBarManager::ScrollBarManager (SlideSorter& rSlideSorter)
mpVerticalScrollBar(mrSlideSorter.GetVerticalScrollBar()),
mnHorizontalPosition (0),
mnVerticalPosition (0),
- maScrollBorder (10,10),
- mnHorizontalScrollFactor (0.1),
- mnVerticalScrollFactor (0.1),
+ maScrollBorder (20,20),
+ mnHorizontalScrollFactor (0.15),
+ mnVerticalScrollFactor (0.25),
mpScrollBarFiller(mrSlideSorter.GetScrollBarFiller()),
- mpContentWindow(mrSlideSorter.GetContentWindow())
+ maAutoScrollTimer(),
+ maAutoScrollOffset(0,0),
+ mbIsAutoScrollActive(false),
+ mpContentWindow(mrSlideSorter.GetContentWindow()),
+ maAutoScrollFunctor()
{
// Hide the scroll bars by default to prevent display errors while
// switching between view shells: In the short time between initiating
@@ -66,7 +71,7 @@ ScrollBarManager::ScrollBarManager (SlideSorter& rSlideSorter)
mpVerticalScrollBar->Hide();
mpScrollBarFiller->Hide();
- maAutoScrollTimer.SetTimeout(50);
+ maAutoScrollTimer.SetTimeout(25);
maAutoScrollTimer.SetTimeoutHdl (
LINK(this, ScrollBarManager, AutoScrollTimeoutHandler));
}
@@ -91,17 +96,15 @@ void ScrollBarManager::LateInitialization (void)
void ScrollBarManager::Connect (void)
{
if (mpVerticalScrollBar != NULL)
+ {
mpVerticalScrollBar->SetScrollHdl (
- LINK(
- this,
- ScrollBarManager,
- VerticalScrollBarHandler));
+ LINK(this, ScrollBarManager, VerticalScrollBarHandler));
+ }
if (mpHorizontalScrollBar != NULL)
- mpHorizontalScrollBar->SetScrollHdl (
- LINK(
- this,
- ScrollBarManager,
- HorizontalScrollBarHandler));
+ {
+ mpHorizontalScrollBar->SetScrollHdl(
+ LINK(this, ScrollBarManager, HorizontalScrollBarHandler));
+ }
}
@@ -110,9 +113,13 @@ void ScrollBarManager::Connect (void)
void ScrollBarManager::Disconnect (void)
{
if (mpVerticalScrollBar != NULL)
+ {
mpVerticalScrollBar->SetScrollHdl (Link());
+ }
if (mpHorizontalScrollBar != NULL)
+ {
mpHorizontalScrollBar->SetScrollHdl (Link());
+ }
}
@@ -129,12 +136,24 @@ void ScrollBarManager::Disconnect (void)
window changes and a second call to the layouter becomes necessary.
That call is made anyway after this method returns.
*/
-Rectangle ScrollBarManager::PlaceScrollBars (const Rectangle& rAvailableArea)
+Rectangle ScrollBarManager::PlaceScrollBars (
+ const Rectangle& rAvailableArea,
+ const bool bIsHorizontalScrollBarAllowed,
+ const bool bIsVerticalScrollBarAllowed)
{
- Rectangle aRemainingSpace (DetermineScrollBarVisibilities(rAvailableArea));
- PlaceHorizontalScrollBar (rAvailableArea);
- PlaceVerticalScrollBar (rAvailableArea);
- PlaceFiller (rAvailableArea);
+ Rectangle aRemainingSpace (DetermineScrollBarVisibilities(
+ rAvailableArea,
+ bIsHorizontalScrollBarAllowed,
+ bIsVerticalScrollBarAllowed));
+
+ if (mpHorizontalScrollBar!=NULL && mpHorizontalScrollBar->IsVisible())
+ PlaceHorizontalScrollBar (rAvailableArea);
+
+ if (mpVerticalScrollBar!=NULL && mpVerticalScrollBar->IsVisible())
+ PlaceVerticalScrollBar (rAvailableArea);
+
+ if (mpScrollBarFiller!=NULL && mpScrollBarFiller->IsVisible())
+ PlaceFiller (rAvailableArea);
return aRemainingSpace;
}
@@ -144,25 +163,21 @@ Rectangle ScrollBarManager::PlaceScrollBars (const Rectangle& rAvailableArea)
void ScrollBarManager::PlaceHorizontalScrollBar (const Rectangle& aAvailableArea)
{
- if (mpHorizontalScrollBar != NULL
- && mpHorizontalScrollBar->IsVisible())
- {
- // Save the current relative position.
- mnHorizontalPosition = double(mpHorizontalScrollBar->GetThumbPos())
- / double(mpHorizontalScrollBar->GetRange().Len());
-
- // Place the scroll bar.
- Size aScrollBarSize (mpHorizontalScrollBar->GetSizePixel());
- mpHorizontalScrollBar->SetPosSizePixel (
- Point(aAvailableArea.Left(),
- aAvailableArea.Bottom()-aScrollBarSize.Height()+1),
- Size (aAvailableArea.GetWidth() - GetVerticalScrollBarWidth(),
- aScrollBarSize.Height()));
-
- // Restore the relative position.
- mpHorizontalScrollBar->SetThumbPos(
- (long)(0.5 + mnHorizontalPosition * mpHorizontalScrollBar->GetRange().Len()));
- }
+ // Save the current relative position.
+ mnHorizontalPosition = double(mpHorizontalScrollBar->GetThumbPos())
+ / double(mpHorizontalScrollBar->GetRange().Len());
+
+ // Place the scroll bar.
+ Size aScrollBarSize (mpHorizontalScrollBar->GetSizePixel());
+ mpHorizontalScrollBar->SetPosSizePixel (
+ Point(aAvailableArea.Left(),
+ aAvailableArea.Bottom()-aScrollBarSize.Height()+1),
+ Size (aAvailableArea.GetWidth() - GetVerticalScrollBarWidth(),
+ aScrollBarSize.Height()));
+
+ // Restore the relative position.
+ mpHorizontalScrollBar->SetThumbPos(
+ (long)(0.5 + mnHorizontalPosition * mpHorizontalScrollBar->GetRange().Len()));
}
@@ -170,26 +185,17 @@ void ScrollBarManager::PlaceHorizontalScrollBar (const Rectangle& aAvailableArea
void ScrollBarManager::PlaceVerticalScrollBar (const Rectangle& aArea)
{
- if (mpVerticalScrollBar != NULL
- && mpVerticalScrollBar->IsVisible())
- {
- view::Layouter::DoublePoint aLayouterPosition
- = mrSlideSorter.GetView().GetLayouter().ConvertModelToLayouterCoordinates (
- Point (0, mpVerticalScrollBar->GetThumbPos()));
-
- // Place the scroll bar.
- Size aScrollBarSize (mpVerticalScrollBar->GetSizePixel());
- Point aPosition (aArea.Right()-aScrollBarSize.Width()+1, aArea.Top());
- Size aSize (aScrollBarSize.Width(), aArea.GetHeight() - GetHorizontalScrollBarHeight());
- mpVerticalScrollBar->SetPosSizePixel(aPosition, aSize);
-
- // Restore the position.
- mpVerticalScrollBar->SetThumbPos(
- mrSlideSorter.GetView().GetLayouter().ConvertLayouterToModelCoordinates(
- aLayouterPosition).Y());
- mnVerticalPosition = double(mpVerticalScrollBar->GetThumbPos())
- / double(mpVerticalScrollBar->GetRange().Len());
- }
+ const double nThumbPosition (mpVerticalScrollBar->GetThumbPos());
+
+ // Place the scroll bar.
+ Size aScrollBarSize (mpVerticalScrollBar->GetSizePixel());
+ Point aPosition (aArea.Right()-aScrollBarSize.Width()+1, aArea.Top());
+ Size aSize (aScrollBarSize.Width(), aArea.GetHeight() - GetHorizontalScrollBarHeight());
+ mpVerticalScrollBar->SetPosSizePixel(aPosition, aSize);
+
+ // Restore the position.
+ mpVerticalScrollBar->SetThumbPos(nThumbPosition);
+ mnVerticalPosition = nThumbPosition / double(mpVerticalScrollBar->GetRange().Len());
}
@@ -197,23 +203,13 @@ void ScrollBarManager::PlaceVerticalScrollBar (const Rectangle& aArea)
void ScrollBarManager::PlaceFiller (const Rectangle& aArea)
{
- // Place the filler when both scroll bars are visible.
- if (mpHorizontalScrollBar != NULL
- && mpVerticalScrollBar != NULL
- && mpHorizontalScrollBar->IsVisible()
- && mpVerticalScrollBar->IsVisible())
- {
- mpScrollBarFiller->SetPosSizePixel(
- Point(
- aArea.Right()-mpVerticalScrollBar->GetSizePixel().Width()+1,
- aArea.Bottom()-mpHorizontalScrollBar->GetSizePixel().Height()+1),
- Size (
- mpVerticalScrollBar->GetSizePixel().Width(),
- mpHorizontalScrollBar->GetSizePixel().Height()));
- mpScrollBarFiller->Show();
- }
- else
- mpScrollBarFiller->Hide();
+ mpScrollBarFiller->SetPosSizePixel(
+ Point(
+ aArea.Right()-mpVerticalScrollBar->GetSizePixel().Width()+1,
+ aArea.Bottom()-mpHorizontalScrollBar->GetSizePixel().Height()+1),
+ Size (
+ mpVerticalScrollBar->GetSizePixel().Width(),
+ mpHorizontalScrollBar->GetSizePixel().Height()));
}
@@ -222,7 +218,7 @@ void ScrollBarManager::PlaceFiller (const Rectangle& aArea)
void ScrollBarManager::UpdateScrollBars (bool bResetThumbPosition, bool bUseScrolling)
{
Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea());
- ::sd::Window* pWindow = mrSlideSorter.GetView().GetWindow();
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
Size aWindowModelSize (pWindow->PixelToLogic(pWindow->GetSizePixel()));
// The horizontal scroll bar is only shown when the window is
@@ -306,14 +302,13 @@ IMPL_LINK(ScrollBarManager, VerticalScrollBarHandler, ScrollBar*, pScrollBar)
if (pScrollBar!=NULL
&& pScrollBar==mpVerticalScrollBar.get()
&& pScrollBar->IsVisible()
- && mrSlideSorter.GetView().GetWindow()!=NULL)
+ && mrSlideSorter.GetContentWindow()!=NULL)
{
double nRelativePosition = double(pScrollBar->GetThumbPos())
/ double(pScrollBar->GetRange().Len());
mrSlideSorter.GetView().InvalidatePageObjectVisibilities();
- mrSlideSorter.GetView().GetWindow()->SetVisibleXY (
- -1,
- nRelativePosition);
+ mrSlideSorter.GetContentWindow()->SetVisibleXY(-1, nRelativePosition);
+ mrSlideSorter.GetController().GetVisibleAreaManager().DeactivateCurrentSlideTracking();
}
return TRUE;
}
@@ -326,12 +321,13 @@ IMPL_LINK(ScrollBarManager, HorizontalScrollBarHandler, ScrollBar*, pScrollBar)
if (pScrollBar!=NULL
&& pScrollBar==mpHorizontalScrollBar.get()
&& pScrollBar->IsVisible()
- && mrSlideSorter.GetView().GetWindow()!=NULL)
+ && mrSlideSorter.GetContentWindow()!=NULL)
{
double nRelativePosition = double(pScrollBar->GetThumbPos())
/ double(pScrollBar->GetRange().Len());
mrSlideSorter.GetView().InvalidatePageObjectVisibilities();
- mrSlideSorter.GetView().GetWindow()->SetVisibleXY (nRelativePosition, -1);
+ mrSlideSorter.GetContentWindow()->SetVisibleXY(nRelativePosition, -1);
+ mrSlideSorter.GetController().GetVisibleAreaManager().DeactivateCurrentSlideTracking();
}
return TRUE;
}
@@ -346,7 +342,7 @@ void ScrollBarManager::SetWindowOrigin (
mnHorizontalPosition = nHorizontalPosition;
mnVerticalPosition = nVerticalPosition;
- ::sd::Window* pWindow = mrSlideSorter.GetView().GetWindow();
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
Size aViewSize (pWindow->GetViewSize());
Point aOrigin (
(long int) (mnHorizontalPosition * aViewSize.Width()),
@@ -371,31 +367,42 @@ void ScrollBarManager::SetWindowOrigin (
b) when not showing a scroll bar the area used by the page objects fits
into the available area in the scroll bars orientation.
*/
-Rectangle ScrollBarManager::DetermineScrollBarVisibilities (const Rectangle& rAvailableArea)
+Rectangle ScrollBarManager::DetermineScrollBarVisibilities (
+ const Rectangle& rAvailableArea,
+ const bool bIsHorizontalScrollBarAllowed,
+ const bool bIsVerticalScrollBarAllowed)
{
// Test which combination of scroll bars is the best.
bool bShowHorizontal = false;
bool bShowVertical = false;
- do
+ if (mrSlideSorter.GetModel().GetPageCount() == 0)
{
- if (mrSlideSorter.GetModel().GetPageCount() == 0)
- // No pages => no scroll bars.
- break;
-
- if (TestScrollBarVisibilities(bShowHorizontal=false, bShowVertical=false, rAvailableArea))
- break;
- if (TestScrollBarVisibilities(bShowHorizontal=true, bShowVertical=false, rAvailableArea))
- break;
- if (TestScrollBarVisibilities(bShowHorizontal=false, bShowVertical=true, rAvailableArea))
- break;
- if (TestScrollBarVisibilities(bShowHorizontal=true, bShowVertical=true, rAvailableArea))
- break;
+ // No pages => no scroll bars.
+ }
+ else if (TestScrollBarVisibilities(false, false, rAvailableArea))
+ {
+ // Nothing to be done.
+ }
+ else if (bIsHorizontalScrollBarAllowed
+ && TestScrollBarVisibilities(true, false, rAvailableArea))
+ {
+ bShowHorizontal = true;
+ }
+ else if (bIsVerticalScrollBarAllowed
+ && TestScrollBarVisibilities(false, true, rAvailableArea))
+ {
+ bShowVertical = true;
+ }
+ else
+ {
+ bShowHorizontal = true;
+ bShowVertical = true;
}
- while (false);
// Make the visibility of the scroll bars permanent.
mpVerticalScrollBar->Show(bShowVertical);
mpHorizontalScrollBar->Show(bShowHorizontal);
+ mpScrollBarFiller->Show(bShowVertical && bShowHorizontal);
// Adapt the remaining space accordingly.
Rectangle aRemainingSpace (rAvailableArea);
@@ -415,7 +422,7 @@ bool ScrollBarManager::TestScrollBarVisibilities (
bool bVerticalScrollBarVisible,
const Rectangle& rAvailableArea)
{
- bool bAreVisibilitiesOK = true;
+ model::SlideSorterModel& rModel (mrSlideSorter.GetModel());
// Adapt the available size by subtracting the sizes of the scroll bars
// visible in this combination.
@@ -427,74 +434,81 @@ bool ScrollBarManager::TestScrollBarVisibilities (
// Tell the view to rearrange its page objects and check whether the
// page objects can be shown without clipping.
- bool bRearrangeSuccess (false);
- if (mrSlideSorter.GetView().GetOrientation() == view::SlideSorterView::HORIZONTAL)
- {
- bRearrangeSuccess = mrSlideSorter.GetView().GetLayouter().RearrangeHorizontal (
- aBrowserSize,
- mrSlideSorter.GetModel().GetPageDescriptor(0)->GetPage()->GetSize(),
- mpContentWindow.get(),
- mrSlideSorter.GetModel().GetPageCount());
- }
- else
- {
- bRearrangeSuccess = mrSlideSorter.GetView().GetLayouter().RearrangeVertical (
- aBrowserSize,
- mrSlideSorter.GetModel().GetPageDescriptor(0)->GetPage()->GetSize(),
- mpContentWindow.get());
- }
+ bool bRearrangeSuccess (mrSlideSorter.GetView().GetLayouter().Rearrange (
+ mrSlideSorter.GetView().GetOrientation(),
+ aBrowserSize,
+ rModel.GetPageDescriptor(0)->GetPage()->GetSize(),
+ rModel.GetPageCount()));
if (bRearrangeSuccess)
{
- Size aPageSize = mrSlideSorter.GetView().GetLayouter().GetPageBox (
- mrSlideSorter.GetModel().GetPageCount()).GetSize();
+ Size aPageSize = mrSlideSorter.GetView().GetLayouter().GetTotalBoundingBox().GetSize();
Size aWindowModelSize = mpContentWindow->PixelToLogic(aBrowserSize);
- bool bHorizontallyClipped = (aPageSize.Width() > aWindowModelSize.Width());
- bool bVerticallyClipped = (aPageSize.Height() > aWindowModelSize.Height());
- bAreVisibilitiesOK = (bHorizontallyClipped == bHorizontalScrollBarVisible)
- && (bVerticallyClipped == bVerticalScrollBarVisible);
+ // The content may be clipped, i.e. not fully visible, in one
+ // direction only when the scroll bar is visible in that direction.
+ if (aPageSize.Width() > aWindowModelSize.Width())
+ if ( ! bHorizontalScrollBarVisible)
+ return false;
+ if (aPageSize.Height() > aWindowModelSize.Height())
+ if ( ! bVerticalScrollBarVisible)
+ return false;
+
+ return true;
}
else
- bAreVisibilitiesOK = false;
-
- return bAreVisibilitiesOK;
+ return false;
}
-void ScrollBarManager::SetTop (const sal_Int32 nNewTop)
+void ScrollBarManager::SetTopLeft (const Point aNewTopLeft)
{
- if (mpVerticalScrollBar != NULL
- && mpVerticalScrollBar->GetThumbPos() != nNewTop)
- {
- // Flush pending repaints before scrolling to avoid temporary artifacts.
- mrSlideSorter.GetView().GetWindow()->Update();
+ if (( ! mpVerticalScrollBar
+ || mpVerticalScrollBar->GetThumbPos() == aNewTopLeft.Y())
+ && ( ! mpHorizontalScrollBar
+ || mpHorizontalScrollBar->GetThumbPos() == aNewTopLeft.X()))
+ return;
+
+ // Flush pending repaints before scrolling to avoid temporary artifacts.
+ mrSlideSorter.GetContentWindow()->Update();
- mpVerticalScrollBar->SetThumbPos(nNewTop);
- mnVerticalPosition = double(nNewTop) / double(mpVerticalScrollBar->GetRange().Len());
- mrSlideSorter.GetView().GetWindow()->SetVisibleXY (
- mnHorizontalPosition, mnVerticalPosition);
+ if (mpVerticalScrollBar)
+ {
+ mpVerticalScrollBar->SetThumbPos(aNewTopLeft.Y());
+ mnVerticalPosition = aNewTopLeft.Y() / double(mpVerticalScrollBar->GetRange().Len());
+ }
+ if (mpHorizontalScrollBar)
+ {
+ mpHorizontalScrollBar->SetThumbPos(aNewTopLeft.X());
+ mnHorizontalPosition = aNewTopLeft.X() / double(mpHorizontalScrollBar->GetRange().Len());
}
+
+ mrSlideSorter.GetContentWindow()->SetVisibleXY(mnHorizontalPosition, mnVerticalPosition);
+ mrSlideSorter.GetView().InvalidatePageObjectVisibilities();
}
-void ScrollBarManager::SetLeft (const sal_Int32 nNewLeft)
+sal_Int32 ScrollBarManager::GetTop (void) const
{
- if (mpHorizontalScrollBar != NULL
- && mpHorizontalScrollBar->GetThumbPos() != nNewLeft)
- {
- // Flush pending repaints before scrolling to avoid temporary artifacts.
- mrSlideSorter.GetView().GetWindow()->Update();
+ if (mpVerticalScrollBar != NULL)
+ return mpVerticalScrollBar->GetThumbPos();
+ else
+ return 0;
+}
- mpHorizontalScrollBar->SetThumbPos(nNewLeft);
- mnHorizontalPosition = double(nNewLeft) / double(mpHorizontalScrollBar->GetRange().Len());
- mrSlideSorter.GetView().GetWindow()->SetVisibleXY (
- mnHorizontalPosition, mnVerticalPosition);
- }
+
+
+
+sal_Int32 ScrollBarManager::GetLeft (void) const
+{
+ if (mpHorizontalScrollBar != NULL)
+ return mpHorizontalScrollBar->GetThumbPos();
+ else
+ return 0;
}
@@ -524,7 +538,7 @@ int ScrollBarManager::GetHorizontalScrollBarHeight (void) const
void ScrollBarManager::CalcAutoScrollOffset (const Point& rMouseWindowPosition)
{
- ::sd::Window* pWindow = mrSlideSorter.GetView().GetWindow();
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
int nDx = 0;
int nDy = 0;
@@ -579,14 +593,16 @@ void ScrollBarManager::CalcAutoScrollOffset (const Point& rMouseWindowPosition)
-bool ScrollBarManager::AutoScroll (const Point& rMouseWindowPosition)
+bool ScrollBarManager::AutoScroll (
+ const Point& rMouseWindowPosition,
+ const ::boost::function<void(void)>& rAutoScrollFunctor)
{
- CalcAutoScrollOffset (rMouseWindowPosition);
- bool bResult = RepeatAutoScroll();
- if (bResult)
- {
- maAutoScrollTimer.Start();
- }
+ maAutoScrollFunctor = rAutoScrollFunctor;
+ CalcAutoScrollOffset(rMouseWindowPosition);
+ bool bResult (true);
+ if ( ! mbIsAutoScrollActive)
+ bResult = RepeatAutoScroll();
+
return bResult;
}
@@ -596,6 +612,7 @@ bool ScrollBarManager::AutoScroll (const Point& rMouseWindowPosition)
void ScrollBarManager::StopAutoScroll (void)
{
maAutoScrollTimer.Stop();
+ mbIsAutoScrollActive = false;
}
@@ -607,13 +624,23 @@ bool ScrollBarManager::RepeatAutoScroll (void)
{
if (mrSlideSorter.GetViewShell() != NULL)
{
- mrSlideSorter.GetViewShell()->ScrollLines(
+ mrSlideSorter.GetViewShell()->Scroll(
maAutoScrollOffset.Width(),
- maAutoScrollOffset.Height());
+ maAutoScrollOffset.Height());
+ mrSlideSorter.GetView().InvalidatePageObjectVisibilities();
+
+ if (maAutoScrollFunctor)
+ maAutoScrollFunctor();
+
+ mbIsAutoScrollActive = true;
+ maAutoScrollTimer.Start();
+
return true;
}
}
+ maAutoScrollFunctor = ::boost::function<void(void)>();
+ mbIsAutoScrollActive = false;
return false;
}
@@ -628,4 +655,83 @@ IMPL_LINK(ScrollBarManager, AutoScrollTimeoutHandler, Timer *, EMPTYARG)
}
+
+
+void ScrollBarManager::Scroll(
+ const Orientation eOrientation,
+ const Unit eUnit,
+ const sal_Int32 nDistance)
+{
+ bool bIsVertical (false);
+ switch (eOrientation)
+ {
+ case Orientation_Horizontal: bIsVertical = false; break;
+ case Orientation_Vertical: bIsVertical = true; break;
+ default:
+ OSL_ASSERT(eOrientation==Orientation_Horizontal || eOrientation==Orientation_Vertical);
+ return;
+ }
+
+ Point aNewTopLeft (
+ mpHorizontalScrollBar ? mpHorizontalScrollBar->GetThumbPos() : 0,
+ mpVerticalScrollBar ? mpVerticalScrollBar->GetThumbPos() : 0);
+ switch (eUnit)
+ {
+ case Unit_Pixel:
+ if (bIsVertical)
+ aNewTopLeft.Y() += nDistance;
+ else
+ aNewTopLeft.X() += nDistance;
+ break;
+
+ case Unit_Slide:
+ {
+ view::Layouter& rLayouter (mrSlideSorter.GetView().GetLayouter());
+
+ // Calculate estimate of new location.
+ if (bIsVertical)
+ aNewTopLeft.Y() += nDistance * rLayouter.GetPageObjectSize().Height();
+ else
+ aNewTopLeft.X() += nDistance * rLayouter.GetPageObjectSize().Width();
+
+ // Adapt location to show whole slides.
+ if (bIsVertical)
+ if (nDistance > 0)
+ {
+ const sal_Int32 nIndex (rLayouter.GetIndexAtPoint(
+ Point(aNewTopLeft.X(), aNewTopLeft.Y()+mpVerticalScrollBar->GetVisibleSize()),
+ true));
+ aNewTopLeft.Y() = rLayouter.GetPageObjectBox(nIndex,true).Bottom()
+ - mpVerticalScrollBar->GetVisibleSize();
+ }
+ else
+ {
+ const sal_Int32 nIndex (rLayouter.GetIndexAtPoint(
+ Point(aNewTopLeft.X(), aNewTopLeft.Y()),
+ true));
+ aNewTopLeft.Y() = rLayouter.GetPageObjectBox(nIndex,true).Top();
+ }
+ else
+ if (nDistance > 0)
+ {
+ const sal_Int32 nIndex (rLayouter.GetIndexAtPoint(
+ Point(aNewTopLeft.X()+mpVerticalScrollBar->GetVisibleSize(), aNewTopLeft.Y()),
+ true));
+ aNewTopLeft.X() = rLayouter.GetPageObjectBox(nIndex,true).Right()
+ - mpVerticalScrollBar->GetVisibleSize();
+ }
+ else
+ {
+ const sal_Int32 nIndex (rLayouter.GetIndexAtPoint(
+ Point(aNewTopLeft.X(), aNewTopLeft.Y()),
+ true));
+ aNewTopLeft.X() = rLayouter.GetPageObjectBox(nIndex,true).Left();
+ }
+ }
+ }
+ mrSlideSorter.GetController().GetVisibleAreaManager().DeactivateCurrentSlideTracking();
+ SetTopLeft(aNewTopLeft);
+}
+
+
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index c1d742ce7158..1d4d075fc3ce 100755..100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -31,38 +31,49 @@
#include "SlideSorter.hxx"
#include "SlideSorterViewShell.hxx"
+#include "SlsDragAndDropContext.hxx"
+#include "controller/SlsTransferable.hxx"
#include "controller/SlideSorterController.hxx"
#include "controller/SlsPageSelector.hxx"
#include "controller/SlsFocusManager.hxx"
#include "controller/SlsScrollBarManager.hxx"
#include "controller/SlsClipboard.hxx"
#include "controller/SlsCurrentSlideManager.hxx"
+#include "controller/SlsInsertionIndicatorHandler.hxx"
#include "controller/SlsSelectionManager.hxx"
#include "controller/SlsProperties.hxx"
+#include "controller/SlsProperties.hxx"
+#include "controller/SlsSlotManager.hxx"
+#include "controller/SlsVisibleAreaManager.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "view/SlideSorterView.hxx"
-#include "view/SlsViewOverlay.hxx"
#include "view/SlsLayouter.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
+#include "view/SlsPageObjectLayouter.hxx"
+#include "view/SlsButtonBar.hxx"
#include "framework/FrameworkHelper.hxx"
#include "ViewShellBase.hxx"
#include "DrawController.hxx"
-#include <vcl/sound.hxx>
-#include <sfx2/viewfrm.hxx>
-#include <sfx2/dispatch.hxx>
-#include <svx/svdpagv.hxx>
-#include <vcl/msgbox.hxx>
#include "Window.hxx"
#include "sdpage.hxx"
#include "drawdoc.hxx"
+#include "DrawDocShell.hxx"
+#include "sdxfer.hxx"
#include "ViewShell.hxx"
#include "ViewShellBase.hxx"
#include "FrameView.hxx"
#include "app.hrc"
#include "sdresid.hxx"
#include "strings.hrc"
+#include <vcl/sound.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/dispatch.hxx>
+#include <svx/svdpagv.hxx>
+#include <vcl/msgbox.hxx>
+#include <svx/svxids.hrc>
+#include <boost/bind.hpp>
+#include <boost/optional.hpp>
namespace {
static const sal_uInt32 SINGLE_CLICK (0x00000001);
@@ -73,109 +84,304 @@ static const sal_uInt32 MIDDLE_BUTTON (0x00000040);
static const sal_uInt32 BUTTON_DOWN (0x00000100);
static const sal_uInt32 BUTTON_UP (0x00000200);
static const sal_uInt32 MOUSE_MOTION (0x00000400);
+static const sal_uInt32 MOUSE_DRAG (0x00000800);
// The rest leaves the lower 16 bit untouched so that it can be used with
// key codes.
static const sal_uInt32 OVER_SELECTED_PAGE (0x00010000);
static const sal_uInt32 OVER_UNSELECTED_PAGE (0x00020000);
static const sal_uInt32 OVER_FADE_INDICATOR (0x00040000);
-static const sal_uInt32 SHIFT_MODIFIER (0x00100000);
-static const sal_uInt32 CONTROL_MODIFIER (0x00200000);
-static const sal_uInt32 SUBSTITUTION_VISIBLE (0x01000000);
-static const sal_uInt32 RECTANGLE_VISIBLE (0x02000000);
+static const sal_uInt32 OVER_BUTTON_AREA (0x00080000);
+static const sal_uInt32 OVER_BUTTON (0x00100000);
+static const sal_uInt32 SHIFT_MODIFIER (0x00200000);
+static const sal_uInt32 CONTROL_MODIFIER (0x00400000);
static const sal_uInt32 KEY_EVENT (0x10000000);
// Some absent events are defined so they can be expressed explicitly.
static const sal_uInt32 NO_MODIFIER (0x00000000);
-static const sal_uInt32 SUBSTITUTION_NOT_VISIBLE (0x00000000);
static const sal_uInt32 NOT_OVER_PAGE (0x00000000);
+// Masks
+static const sal_uInt32 MODIFIER_MASK (SHIFT_MODIFIER | CONTROL_MODIFIER);
+static const sal_uInt32 BUTTON_MASK (LEFT_BUTTON | RIGHT_BUTTON | MIDDLE_BUTTON);
} // end of anonymous namespace
+
+// Define some macros to make the following switch statement more readable.
+#define ANY_MODIFIER(code) \
+ code|NO_MODIFIER: \
+ case code|SHIFT_MODIFIER: \
+ case code|CONTROL_MODIFIER
+
namespace sd { namespace slidesorter { namespace controller {
-class SelectionFunction::SubstitutionHandler
+//===== SelectionFunction::EventDescriptor ====================================
+
+class SelectionFunction::EventDescriptor
{
public:
- SubstitutionHandler (SlideSorter& rSlideSorter);
- ~SubstitutionHandler (void);
+ Point maMousePosition;
+ Point maMouseModelPosition;
+ model::SharedPageDescriptor mpHitDescriptor;
+ SdrPage* mpHitPage;
+ sal_uInt32 mnEventCode;
+ bool mbIsOverButton;
+ InsertionIndicatorHandler::Mode meDragMode;
+ bool mbMakeSelectionVisible;
+ bool mbIsLeaving;
- /** Create a substitution display of the currently selected pages and
- use the given position as the anchor point.
+ EventDescriptor (
+ sal_uInt32 nEventType,
+ const MouseEvent& rEvent,
+ SlideSorter& rSlideSorter);
+ EventDescriptor (
+ sal_uInt32 nEventType,
+ const AcceptDropEvent& rEvent,
+ const sal_Int8 nDragAction,
+ SlideSorter& rSlideSorter);
+ EventDescriptor (
+ const KeyEvent& rEvent,
+ SlideSorter& rSlideSorter);
+
+ void SetDragMode (const InsertionIndicatorHandler::Mode eMode);
+
+private:
+ /** Compute a numerical code that describes a mouse event and that can
+ be used for fast look up of the appropriate reaction.
*/
- void Start (const Point& rMouseModelPosition);
+ sal_uInt32 EncodeMouseEvent (const MouseEvent& rEvent) const;
- /** Move the substitution display by the distance the mouse has
- travelled since the last call to this method or to
- CreateSubstitution(). The given point becomes the new anchor.
+ /** Compute a numerical code that describes a key event and that can
+ be used for fast look up of the appropriate reaction.
*/
- void UpdatePosition (const Point& rMouseModelPosition);
+ sal_uInt32 EncodeKeyEvent (const KeyEvent& rEvent) const;
- /** Move the substitution display of the currently selected pages.
+ /** Compute a numerical code that describes the current state like
+ whether the selection rectangle is visible or whether the page under
+ the mouse or the one that has the focus is selected.
*/
- void Process (void);
+ sal_uInt32 EncodeState (void) const;
+};
- void End (void);
- bool HasBeenMoved (void) const;
-private:
+
+//===== SelectionFunction::ModeHandler ========================================
+
+class SelectionFunction::ModeHandler
+{
+public:
+ ModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction,
+ const bool bIsMouseOverIndicatorAllowed);
+ virtual ~ModeHandler (void);
+
+ virtual Mode GetMode (void) const = 0;
+ virtual void Abort (void) = 0;
+ virtual void ProcessEvent (EventDescriptor& rDescriptor);
+
+ /** Set the selection to exactly the specified page and also set it as
+ the current page.
+ */
+ void SetCurrentPage (const model::SharedPageDescriptor& rpDescriptor);
+
+ /// Deselect all pages.
+ void DeselectAllPages (void);
+ void SelectOnePage (const model::SharedPageDescriptor& rpDescriptor);
+
+ /** When the view on which this selection function is working is the
+ main view then the view is switched to the regular editing view.
+ */
+ void SwitchView (const model::SharedPageDescriptor& rpDescriptor);
+
+ void StartDrag (
+ const Point& rMousePosition,
+ const InsertionIndicatorHandler::Mode eMode);
+
+ bool IsMouseOverIndicatorAllowed (void) const;
+
+protected:
SlideSorter& mrSlideSorter;
+ SelectionFunction& mrSelectionFunction;
+
+ virtual bool ProcessButtonDownEvent (EventDescriptor& rDescriptor);
+ virtual bool ProcessButtonUpEvent (EventDescriptor& rDescriptor);
+ virtual bool ProcessMotionEvent (EventDescriptor& rDescriptor);
+ virtual bool ProcessDragEvent (EventDescriptor& rDescriptor);
+ virtual bool HandleUnprocessedEvent (EventDescriptor& rDescriptor);
- bool mbHasBeenMoved;
+ void ReprocessEvent (EventDescriptor& rDescriptor);
- /** Determine whether there is a) a substitution and b) its insertion at
- the current position of the insertion marker would alter the
- document. This would be the case when the substitution has been
- moved or is not consecutive.
+private:
+ const bool mbIsMouseOverIndicatorAllowed;
+};
+
+
+/** This is the default handler for processing events. It activates the
+ multi selection or drag-and-drop when the right conditions are met.
+*/
+class NormalModeHandler : public SelectionFunction::ModeHandler
+{
+public:
+ NormalModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction);
+ virtual ~NormalModeHandler (void);
+
+ virtual SelectionFunction::Mode GetMode (void) const;
+ virtual void Abort (void);
+
+ void ResetButtonDownLocation (void);
+
+protected:
+ virtual bool ProcessButtonDownEvent (SelectionFunction::EventDescriptor& rDescriptor);
+ virtual bool ProcessButtonUpEvent (SelectionFunction::EventDescriptor& rDescriptor);
+ virtual bool ProcessMotionEvent (SelectionFunction::EventDescriptor& rDescriptor);
+ virtual bool ProcessDragEvent (SelectionFunction::EventDescriptor& rDescriptor);
+
+private:
+ ::boost::optional<Point> maButtonDownLocation;
+
+ /** Select all pages between and including the selection anchor and the
+ specified page.
*/
- bool IsSubstitutionInsertionNonTrivial (void) const;
+ void RangeSelect (const model::SharedPageDescriptor& rpDescriptor);
};
-class SelectionFunction::EventDescriptor
+/** Handle events during a multi selection, which typically is started by
+ pressing the left mouse button when not over a page.
+*/
+class MultiSelectionModeHandler : public SelectionFunction::ModeHandler
{
public:
+ /** Start a rectangle selection at the given position.
+ */
+ MultiSelectionModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction,
+ const Point& rMouseModelPosition,
+ const sal_uInt32 nEventCode);
+ virtual ~MultiSelectionModeHandler (void);
- Point maMousePosition;
- Point maMouseModelPosition;
- ::boost::weak_ptr<model::PageDescriptor> mpHitDescriptor;
- SdrPage* mpHitPage;
- sal_uInt32 mnEventCode;
+ virtual SelectionFunction::Mode GetMode (void) const;
+ virtual void Abort (void);
+ virtual void ProcessEvent (SelectionFunction::EventDescriptor& rDescriptor);
- EventDescriptor (
- sal_uInt32 nEventType,
- const MouseEvent& rEvent,
- SlideSorter& rSlideSorter);
- EventDescriptor (
- const KeyEvent& rEvent,
- SlideSorter& rSlideSorter);
+ enum SelectionMode { SM_Normal, SM_Add, SM_Toggle };
+
+ void SetSelectionMode (const SelectionMode eSelectionMode);
+ void SetSelectionModeFromModifier (const sal_uInt32 nEventCode);
+
+protected:
+ virtual bool ProcessButtonUpEvent (SelectionFunction::EventDescriptor& rDescriptor);
+ virtual bool ProcessMotionEvent (SelectionFunction::EventDescriptor& rDescriptor);
+ virtual bool HandleUnprocessedEvent (SelectionFunction::EventDescriptor& rDescriptor);
+
+private:
+ SelectionMode meSelectionMode;
+ Point maSecondCorner;
+ Pointer maSavedPointer;
+ sal_Int32 mnAnchorIndex;
+ sal_Int32 mnSecondIndex;
+ view::ButtonBar::Lock maButtonBarLock;
+
+ virtual void UpdateModelPosition (const Point& rMouseModelPosition);
+ virtual void UpdateSelection (void);
+
+ /** Update the rectangle selection so that the given position becomes
+ the new second point of the selection rectangle.
+ */
+ void UpdatePosition (
+ const Point& rMousePosition,
+ const bool bAllowAutoScroll);
+
+ void UpdateSelectionState (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bIsInSelection) const;
};
+/** Handle events during drag-and-drop.
+*/
+class DragAndDropModeHandler : public SelectionFunction::ModeHandler
+{
+public:
+ DragAndDropModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction,
+ const Point& rMousePosition,
+ ::Window* pWindow);
+ virtual ~DragAndDropModeHandler (void);
+
+ virtual SelectionFunction::Mode GetMode (void) const;
+ virtual void Abort (void);
+
+protected:
+ virtual bool ProcessButtonUpEvent (SelectionFunction::EventDescriptor& rDescriptor);
+ virtual bool ProcessDragEvent (SelectionFunction::EventDescriptor& rDescriptor);
+
+private:
+ ::boost::scoped_ptr<DragAndDropContext> mpDragAndDropContext;
+};
+
+
+/** Handle events while the left mouse button is pressed over the button
+ bar.
+*/
+class ButtonModeHandler : public SelectionFunction::ModeHandler
+{
+public:
+ ButtonModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction);
+ virtual ~ButtonModeHandler (void);
+ virtual void Abort (void);
+
+ virtual SelectionFunction::Mode GetMode (void) const;
+
+protected:
+ virtual bool ProcessButtonDownEvent (SelectionFunction::EventDescriptor& rDescriptor);
+ virtual bool ProcessButtonUpEvent (SelectionFunction::EventDescriptor& rDescriptor);
+ virtual bool ProcessMotionEvent (SelectionFunction::EventDescriptor& rDescriptor);
+};
+
+
+
+
+//===== SelectionFunction =====================================================
+
TYPEINIT1(SelectionFunction, FuPoor);
SelectionFunction::SelectionFunction (
SlideSorter& rSlideSorter,
SfxRequest& rRequest)
- : SlideFunction (rSlideSorter, rRequest),
+ : FuPoor (
+ rSlideSorter.GetViewShell(),
+ rSlideSorter.GetContentWindow().get(),
+ &rSlideSorter.GetView(),
+ rSlideSorter.GetModel().GetDocument(),
+ rRequest),
mrSlideSorter(rSlideSorter),
mrController(mrSlideSorter.GetController()),
mbDragSelection(false),
maInsertionMarkerBox(),
mbProcessingMouseButtonDown(false),
- mpSubstitutionHandler(new SubstitutionHandler(mrSlideSorter))
+ mnShiftKeySelectionAnchor(-1),
+ mpModeHandler(new NormalModeHandler(rSlideSorter, *this))
{
- //af aDelayToScrollTimer.SetTimeout(50);
- aDragTimer.SetTimeoutHdl( LINK( this, SelectionFunction, DragSlideHdl ) );
}
+
+
+
SelectionFunction::~SelectionFunction (void)
{
- aDragTimer.Stop();
+ mpModeHandler.reset();
}
@@ -196,9 +402,10 @@ BOOL SelectionFunction::MouseButtonDown (const MouseEvent& rEvent)
{
// #95491# remember button state for creation of own MouseEvents
SetMouseButtonCode (rEvent.GetButtons());
+ aMDPos = rEvent.GetPosPixel();
mbProcessingMouseButtonDown = true;
- mpWindow->CaptureMouse();
+ // mpWindow->CaptureMouse();
ProcessMouseEvent(BUTTON_DOWN, rEvent);
@@ -210,45 +417,7 @@ BOOL SelectionFunction::MouseButtonDown (const MouseEvent& rEvent)
BOOL SelectionFunction::MouseMove (const MouseEvent& rEvent)
{
- Point aMousePosition (rEvent.GetPosPixel());
-
- // Determine page under mouse and show the mouse over effect.
- model::SharedPageDescriptor pHitDescriptor (mrController.GetPageAt(aMousePosition));
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetMouseOverIndicatorOverlay().SetSlideUnderMouse(
- rEvent.IsLeaveWindow() ? model::SharedPageDescriptor() : pHitDescriptor);
- if (pHitDescriptor.get() != NULL)
- rOverlay.GetMouseOverIndicatorOverlay().setVisible(true);
- else
- rOverlay.GetMouseOverIndicatorOverlay().setVisible(false);
-
- // Allow one mouse move before the drag timer is disabled.
- if (aDragTimer.IsActive())
- {
- if (bFirstMouseMove)
- bFirstMouseMove = FALSE;
- else
- aDragTimer.Stop();
- }
-
- Rectangle aRectangle (Point(0,0),mpWindow->GetOutputSizePixel());
- if ( ! aRectangle.IsInside(aMousePosition)
- && rOverlay.GetSubstitutionOverlay().isVisible())
- {
- // Mouse left the window with pressed left button. Make it a drag.
- StartDrag();
- }
- else
- {
- // Call ProcessMouseEvent() only when one of the buttons is
- // pressed. This prevents calling the method on every motion.
- if (rEvent.GetButtons() != 0
- && mbProcessingMouseButtonDown)
- {
- ProcessMouseEvent(MOUSE_MOTION, rEvent);
- }
- }
-
+ ProcessMouseEvent(MOUSE_MOTION, rEvent);
return TRUE;
}
@@ -259,16 +428,10 @@ BOOL SelectionFunction::MouseButtonUp (const MouseEvent& rEvent)
{
mrController.GetScrollBarManager().StopAutoScroll ();
- // #95491# remember button state for creation of own MouseEvents
- SetMouseButtonCode (rEvent.GetButtons());
-
- if (aDragTimer.IsActive())
- aDragTimer.Stop();
-
ProcessMouseEvent(BUTTON_UP, rEvent);
mbProcessingMouseButtonDown = false;
- mpWindow->ReleaseMouse();
+// mpWindow->ReleaseMouse();
return TRUE;
}
@@ -276,39 +439,62 @@ BOOL SelectionFunction::MouseButtonUp (const MouseEvent& rEvent)
+void SelectionFunction::NotifyDragFinished (void)
+{
+ SwitchToNormalMode();
+}
+
+
+
+
BOOL SelectionFunction::KeyInput (const KeyEvent& rEvent)
{
+ view::SlideSorterView::DrawLock aDrawLock (mrSlideSorter);
+ PageSelector::UpdateLock aLock (mrSlideSorter);
FocusManager& rFocusManager (mrController.GetFocusManager());
BOOL bResult = FALSE;
- switch (rEvent.GetKeyCode().GetCode())
+ const KeyCode& rCode (rEvent.GetKeyCode());
+ switch (rCode.GetCode())
{
case KEY_RETURN:
- if (rFocusManager.HasFocus())
+ {
+ model::SharedPageDescriptor pDescriptor (rFocusManager.GetFocusedPageDescriptor());
+ ViewShell* pViewShell = mrSlideSorter.GetViewShell();
+ if (rFocusManager.HasFocus() && pDescriptor && pViewShell!=NULL)
{
- model::SharedPageDescriptor pDescriptor (rFocusManager.GetFocusedPageDescriptor());
- if (pDescriptor.get() != NULL)
+ // The Return key triggers different functions depending on
+ // whether the slide sorter is the main view or displayed in
+ // the right pane.
+ if (pViewShell->IsMainViewShell())
+ {
+ mpModeHandler->SetCurrentPage(pDescriptor);
+ mpModeHandler->SwitchView(pDescriptor);
+ }
+ else
{
- SetCurrentPage(pDescriptor);
- SwitchView(pDescriptor);
+ pViewShell->GetDispatcher()->Execute(
+ SID_INSERTPAGE,
+ SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
}
bResult = TRUE;
}
break;
+ }
case KEY_TAB:
if ( ! rFocusManager.IsFocusShowing())
+ {
rFocusManager.ShowFocus();
- else
- if (rEvent.GetKeyCode().IsShift())
- rFocusManager.MoveFocus (FocusManager::FMD_LEFT);
- else
- rFocusManager.MoveFocus (FocusManager::FMD_RIGHT);
- bResult = TRUE;
+ bResult = TRUE;
+ }
break;
case KEY_ESCAPE:
- rFocusManager.SetFocusToToolBox();
+ // When there is an active multiselection or drag-and-drop
+ // operation then stop that.
+ mpModeHandler->Abort();
+ SwitchToNormalMode();
bResult = TRUE;
break;
@@ -316,12 +502,10 @@ BOOL SelectionFunction::KeyInput (const KeyEvent& rEvent)
{
// Toggle the selection state.
model::SharedPageDescriptor pDescriptor (rFocusManager.GetFocusedPageDescriptor());
- if (pDescriptor.get() != NULL)
+ if (pDescriptor && rCode.IsMod1())
{
- // Doing a multi selection by default. Can we ask the event
- // for the state of the shift key?
- if (pDescriptor->IsSelected())
- mrController.GetPageSelector().DeselectPage(pDescriptor);
+ if (pDescriptor->HasState(model::PageDescriptor::ST_Selected))
+ mrController.GetPageSelector().DeselectPage(pDescriptor, false);
else
mrController.GetPageSelector().SelectPage(pDescriptor);
}
@@ -332,25 +516,25 @@ BOOL SelectionFunction::KeyInput (const KeyEvent& rEvent)
// Move the focus indicator left.
case KEY_LEFT:
- rFocusManager.MoveFocus (FocusManager::FMD_LEFT);
+ MoveFocus(FocusManager::FMD_LEFT, rCode.IsShift(), rCode.IsMod1());
bResult = TRUE;
break;
// Move the focus indicator right.
case KEY_RIGHT:
- rFocusManager.MoveFocus (FocusManager::FMD_RIGHT);
+ MoveFocus(FocusManager::FMD_RIGHT, rCode.IsShift(), rCode.IsMod1());
bResult = TRUE;
break;
// Move the focus indicator up.
case KEY_UP:
- rFocusManager.MoveFocus (FocusManager::FMD_UP);
+ MoveFocus(FocusManager::FMD_UP, rCode.IsShift(), rCode.IsMod1());
bResult = TRUE;
break;
// Move the focus indicator down.
case KEY_DOWN:
- rFocusManager.MoveFocus (FocusManager::FMD_DOWN);
+ MoveFocus(FocusManager::FMD_DOWN, rCode.IsShift(), rCode.IsMod1());
bResult = TRUE;
break;
@@ -366,36 +550,35 @@ BOOL SelectionFunction::KeyInput (const KeyEvent& rEvent)
bResult = TRUE;
break;
+ case KEY_HOME:
+ GotoPage(0);
+ bResult = TRUE;
+ break;
+
+ case KEY_END:
+ GotoPage(mrSlideSorter.GetModel().GetPageCount()-1);
+ bResult = TRUE;
+ break;
+
case KEY_DELETE:
case KEY_BACKSPACE:
{
- if (mrController.GetProperties()->IsUIReadOnly())
+ if (mrSlideSorter.GetProperties()->IsUIReadOnly())
break;
- int nSelectedPagesCount = 0;
-
- // Count the selected pages and look if there any objects on any
- // of the selected pages so that we can warn the user and
- // prevent an accidental deletion.
- model::PageEnumeration aSelectedPages (
- model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
- mrSlideSorter.GetModel()));
- while (aSelectedPages.HasMoreElements())
- {
- nSelectedPagesCount++;
- aSelectedPages.GetNextElement();
- }
-
- if (nSelectedPagesCount > 0)
- mrController.GetSelectionManager()->DeleteSelectedPages();
+ mrController.GetSelectionManager()->DeleteSelectedPages(rCode.GetCode()==KEY_DELETE);
+ mnShiftKeySelectionAnchor = -1;
bResult = TRUE;
}
break;
case KEY_F10:
- if (rEvent.GetKeyCode().IsShift())
- ProcessKeyEvent(rEvent);
+ if (rCode.IsShift())
+ {
+ mpModeHandler->SelectOnePage(
+ mrSlideSorter.GetController().GetFocusManager().GetFocusedPageDescriptor());
+ }
break;
default:
@@ -403,7 +586,7 @@ BOOL SelectionFunction::KeyInput (const KeyEvent& rEvent)
}
if ( ! bResult)
- bResult = SlideFunction::KeyInput (rEvent);
+ bResult = FuPoor::KeyInput(rEvent);
return bResult;
}
@@ -411,6 +594,73 @@ BOOL SelectionFunction::KeyInput (const KeyEvent& rEvent)
+void SelectionFunction::MoveFocus (
+ const FocusManager::FocusMoveDirection eDirection,
+ const bool bIsShiftDown,
+ const bool bIsControlDown)
+{
+ // Remember the anchor of shift key multi selection.
+ if (bIsShiftDown)
+ {
+ if (mnShiftKeySelectionAnchor<0)
+ {
+ model::SharedPageDescriptor pFocusedDescriptor (
+ mrController.GetFocusManager().GetFocusedPageDescriptor());
+ mnShiftKeySelectionAnchor = pFocusedDescriptor->GetPageIndex();
+ }
+ }
+ else if ( ! bIsControlDown)
+ ResetShiftKeySelectionAnchor();
+
+ mrController.GetFocusManager().MoveFocus(eDirection);
+
+ PageSelector& rSelector (mrController.GetPageSelector());
+ model::SharedPageDescriptor pFocusedDescriptor (
+ mrController.GetFocusManager().GetFocusedPageDescriptor());
+ if (bIsShiftDown)
+ {
+ // When shift is pressed then select all pages in the range between
+ // the currently and the previously focused pages, including them.
+ if (pFocusedDescriptor)
+ {
+ sal_Int32 nPageRangeEnd (pFocusedDescriptor->GetPageIndex());
+ model::PageEnumeration aPages (
+ model::PageEnumerationProvider::CreateAllPagesEnumeration(
+ mrSlideSorter.GetModel()));
+ while (aPages.HasMoreElements())
+ {
+ model::SharedPageDescriptor pDescriptor (aPages.GetNextElement());
+ if (pDescriptor)
+ {
+ const sal_Int32 nPageIndex(pDescriptor->GetPageIndex());
+ if ((nPageIndex>=mnShiftKeySelectionAnchor && nPageIndex<=nPageRangeEnd)
+ || (nPageIndex<=mnShiftKeySelectionAnchor && nPageIndex>=nPageRangeEnd))
+ {
+ rSelector.SelectPage(pDescriptor);
+ }
+ else
+ {
+ rSelector.DeselectPage(pDescriptor);
+ }
+ }
+ }
+ }
+ }
+ else if (bIsControlDown)
+ {
+ // When control is pressed then do not alter the selection or the
+ // current page, just move the focus.
+ }
+ else
+ {
+ // Without shift just select the focused page.
+ mpModeHandler->SelectOnePage(pFocusedDescriptor);
+ }
+}
+
+
+
+
void SelectionFunction::Activate()
{
FuPoor::Activate();
@@ -442,7 +692,7 @@ void SelectionFunction::ScrollEnd (void)
void SelectionFunction::DoCut (void)
{
- if ( ! mrController.GetProperties()->IsUIReadOnly())
+ if ( ! mrSlideSorter.GetProperties()->IsUIReadOnly())
{
mrController.GetClipboard().DoCut();
}
@@ -461,7 +711,7 @@ void SelectionFunction::DoCopy (void)
void SelectionFunction::DoPaste (void)
{
- if ( ! mrController.GetProperties()->IsUIReadOnly())
+ if ( ! mrSlideSorter.GetProperties()->IsUIReadOnly())
{
mrController.GetClipboard().DoPaste();
}
@@ -470,258 +720,316 @@ void SelectionFunction::DoPaste (void)
-void SelectionFunction::Paint (const Rectangle&, ::sd::Window* )
+bool SelectionFunction::cancel (void)
{
+ mrController.GetFocusManager().ToggleFocus();
+ return true;
}
-IMPL_LINK( SelectionFunction, DragSlideHdl, Timer*, EMPTYARG )
+void SelectionFunction::GotoNextPage (int nOffset)
{
- StartDrag();
- return 0;
+ model::SharedPageDescriptor pDescriptor
+ = mrController.GetCurrentSlideManager()->GetCurrentSlide();
+ if (pDescriptor.get() != NULL)
+ {
+ SdPage* pPage = pDescriptor->GetPage();
+ OSL_ASSERT(pPage!=NULL);
+ sal_Int32 nIndex = (pPage->GetPageNum()-1) / 2;
+ GotoPage(nIndex + nOffset);
+ }
+ ResetShiftKeySelectionAnchor();
}
-void SelectionFunction::StartDrag (void)
+void SelectionFunction::GotoPage (int nIndex)
{
- if (mbPageHit
- && ! mrController.GetProperties()->IsUIReadOnly())
+ USHORT nPageCount = (USHORT)mrSlideSorter.GetModel().GetPageCount();
+
+ if (nIndex >= nPageCount)
+ nIndex = nPageCount - 1;
+ if (nIndex < 0)
+ nIndex = 0;
+
+ mrController.GetFocusManager().SetFocusedPage(nIndex);
+ model::SharedPageDescriptor pNextPageDescriptor (
+ mrSlideSorter.GetModel().GetPageDescriptor (nIndex));
+ if (pNextPageDescriptor.get() != NULL)
+ mpModeHandler->SetCurrentPage(pNextPageDescriptor);
+ else
{
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- mpSubstitutionHandler->Start(rOverlay.GetSubstitutionOverlay().GetPosition());
- mbPageHit = false;
- mpWindow->ReleaseMouse();
-
- if (mrSlideSorter.GetViewShell() != NULL)
- {
- SlideSorterViewShell* pSlideSorterViewShell
- = dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell());
- pSlideSorterViewShell->StartDrag (
- rOverlay.GetSubstitutionOverlay().GetPosition(),
- mpWindow);
- }
+ OSL_ASSERT(pNextPageDescriptor.get() != NULL);
}
+ ResetShiftKeySelectionAnchor();
}
-bool SelectionFunction::cancel (void)
+void SelectionFunction::ProcessMouseEvent (sal_uInt32 nEventType, const MouseEvent& rEvent)
{
- mrController.GetFocusManager().ToggleFocus();
- return true;
+ // #95491# remember button state for creation of own MouseEvents
+ SetMouseButtonCode (rEvent.GetButtons());
+
+ EventDescriptor aEventDescriptor (nEventType, rEvent, mrSlideSorter);
+ ProcessEvent(aEventDescriptor);
}
-void SelectionFunction::SelectHitPage (const model::SharedPageDescriptor& rpDescriptor)
+void SelectionFunction::MouseDragged (
+ const AcceptDropEvent& rEvent,
+ const sal_Int8 nDragAction)
{
- mrController.GetPageSelector().SelectPage(rpDescriptor);
+ EventDescriptor aEventDescriptor (MOUSE_DRAG, rEvent, nDragAction, mrSlideSorter);
+ ProcessEvent(aEventDescriptor);
}
-void SelectionFunction::DeselectHitPage (const model::SharedPageDescriptor& rpDescriptor)
+void SelectionFunction::ProcessKeyEvent (const KeyEvent& rEvent)
{
- mrController.GetPageSelector().DeselectPage(rpDescriptor);
+ EventDescriptor aEventDescriptor (rEvent, mrSlideSorter);
+ ProcessEvent(aEventDescriptor);
}
-void SelectionFunction::DeselectAllPages (void)
+void SelectionFunction::ProcessEvent (EventDescriptor& rDescriptor)
{
- mrController.GetPageSelector().DeselectAllPages();
+ // The call to ProcessEvent may switch to another mode handler.
+ // Prevent the untimely destruction of the called handler by aquiring a
+ // temporary reference here.
+ ::boost::shared_ptr<ModeHandler> pModeHandler (mpModeHandler);
+ pModeHandler->ProcessEvent(rDescriptor);
}
-void SelectionFunction::StartRectangleSelection (const Point& rMouseModelPosition)
+bool Match (
+ const sal_uInt32 nEventCode,
+ const sal_uInt32 nPositivePattern)
{
- if (mrController.GetProperties()->IsShowSelection())
- {
- mrSlideSorter.GetView().GetOverlay().GetSelectionRectangleOverlay().Start(
- rMouseModelPosition);
- }
+ return (nEventCode & nPositivePattern)==nPositivePattern;
+}
+
+
+
+
+void SelectionFunction::SwitchToNormalMode (void)
+{
+ if (mpModeHandler->GetMode() != NormalMode)
+ SwitchMode(::boost::shared_ptr<ModeHandler>(
+ new NormalModeHandler(mrSlideSorter, *this)));
}
-void SelectionFunction::UpdateRectangleSelection (const Point& rMouseModelPosition)
+void SelectionFunction::SwitchToDragAndDropMode (const Point aMousePosition)
{
- if (mrController.GetProperties()->IsShowSelection())
+ if (mpModeHandler->GetMode() != DragAndDropMode)
{
- mrSlideSorter.GetView().GetOverlay().GetSelectionRectangleOverlay().Update(
- rMouseModelPosition);
+ SwitchMode(::boost::shared_ptr<ModeHandler>(
+ new DragAndDropModeHandler(mrSlideSorter, *this, aMousePosition, mpWindow)));
}
}
-void SelectionFunction::ProcessRectangleSelection (bool bToggleSelection)
+void SelectionFunction::SwitchToMultiSelectionMode (
+ const Point aMousePosition,
+ const sal_uInt32 nEventCode)
{
- if ( ! mrController.GetProperties()->IsShowSelection())
- return;
+ if (mpModeHandler->GetMode() != MultiSelectionMode)
+ SwitchMode(::boost::shared_ptr<ModeHandler>(
+ new MultiSelectionModeHandler(mrSlideSorter, *this, aMousePosition, nEventCode)));
+}
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- if (rOverlay.GetSelectionRectangleOverlay().isVisible())
+
+
+
+bool SelectionFunction::SwitchToButtonMode (void)
+{
+ // Do not show the buttons for draw pages.
+ ::boost::shared_ptr<ViewShell> pMainViewShell (mrSlideSorter.GetViewShellBase()->GetMainViewShell());
+ if (pMainViewShell
+ && pMainViewShell->GetShellType()!=ViewShell::ST_DRAW
+ && mpModeHandler->GetMode() != ButtonMode)
{
- PageSelector& rSelector (mrController.GetPageSelector());
-
- rOverlay.GetSelectionRectangleOverlay().setVisible(false);
-
- // Select all pages whose page object lies completly inside the drag
- // rectangle.
- const Rectangle& rSelectionRectangle (
- rOverlay.GetSelectionRectangleOverlay().GetSelectionRectangle());
- model::PageEnumeration aPages (
- model::PageEnumerationProvider::CreateAllPagesEnumeration(
- mrSlideSorter.GetModel()));
- while (aPages.HasMoreElements())
- {
- model::SharedPageDescriptor pDescriptor (aPages.GetNextElement());
- Rectangle aPageBox (mrSlideSorter.GetView().GetPageBoundingBox(
- pDescriptor,
- view::SlideSorterView::CS_MODEL,
- view::SlideSorterView::BBT_SHAPE));
- if (rSelectionRectangle.IsOver(aPageBox))
- {
- // When we are extending the selection (shift key is
- // pressed) then toggle the selection state of the page.
- // Otherwise select it: this results in the previously
- // selected pages becoming deslected.
- if (bToggleSelection && pDescriptor->IsSelected())
- rSelector.DeselectPage(pDescriptor);
- else
- rSelector.SelectPage(pDescriptor);
- }
- }
+ SwitchMode(::boost::shared_ptr<ModeHandler>(new ButtonModeHandler(mrSlideSorter, *this)));
+ return true;
}
+ else
+ return false;
}
-void SelectionFunction::PrepareMouseMotion (const Point& )
+void SelectionFunction::SwitchMode (const ::boost::shared_ptr<ModeHandler>& rpHandler)
{
- if ( ! mrController.GetProperties()->IsUIReadOnly())
+ // Not all modes allow mouse over indicator.
+ if (mpModeHandler->IsMouseOverIndicatorAllowed() != rpHandler->IsMouseOverIndicatorAllowed())
{
- bFirstMouseMove = TRUE;
- aDragTimer.Start();
+ if ( ! rpHandler->IsMouseOverIndicatorAllowed())
+ {
+ mrSlideSorter.GetView().SetPageUnderMouse(model::SharedPageDescriptor());
+ mrSlideSorter.GetView().GetButtonBar().ResetPage();
+ }
+ else
+ mrSlideSorter.GetView().UpdatePageUnderMouse(false);
}
+
+ mpModeHandler = rpHandler;
}
-void SelectionFunction::RangeSelect (const model::SharedPageDescriptor& rpDescriptor)
+void SelectionFunction::ResetShiftKeySelectionAnchor (void)
{
- PageSelector& rSelector (mrController.GetPageSelector());
+ mnShiftKeySelectionAnchor = -1;
+}
- model::SharedPageDescriptor pAnchor (rSelector.GetSelectionAnchor());
- DeselectAllPages();
- if (pAnchor.get() != NULL)
- {
- // Select all pages between the anchor and the given one, including
- // the two.
- USHORT nAnchorIndex ((pAnchor->GetPage()->GetPageNum()-1) / 2);
- USHORT nOtherIndex ((rpDescriptor->GetPage()->GetPageNum()-1) / 2);
- // Iterate over all pages in the range. Start with the anchor
- // page. This way the PageSelector will recognize it again as
- // anchor (the first selected page after a DeselectAllPages()
- // becomes the anchor.)
- USHORT nStep = (nAnchorIndex < nOtherIndex) ? +1 : -1;
- USHORT nIndex = nAnchorIndex;
- while (true)
- {
- rSelector.SelectPage(nIndex);
- if (nIndex == nOtherIndex)
- break;
- nIndex = nIndex + nStep;
- }
+
+void SelectionFunction::ResetMouseAnchor (void)
+{
+ if (mpModeHandler && mpModeHandler->GetMode() == NormalMode)
+ {
+ ::boost::shared_ptr<NormalModeHandler> pHandler (
+ ::boost::dynamic_pointer_cast<NormalModeHandler>(mpModeHandler));
+ if (pHandler)
+ pHandler->ResetButtonDownLocation();
}
}
-void SelectionFunction::GotoNextPage (int nOffset)
+//===== EventDescriptor =======================================================
+
+SelectionFunction::EventDescriptor::EventDescriptor (
+ const sal_uInt32 nEventType,
+ const MouseEvent& rEvent,
+ SlideSorter& rSlideSorter)
+ : maMousePosition(rEvent.GetPosPixel()),
+ maMouseModelPosition(),
+ mpHitDescriptor(),
+ mpHitPage(),
+ mnEventCode(nEventType),
+ mbIsOverButton(rSlideSorter.GetView().GetButtonBar().IsMouseOverButton()),
+ meDragMode(InsertionIndicatorHandler::MoveMode),
+ mbMakeSelectionVisible(true),
+ mbIsLeaving(false)
{
- model::SharedPageDescriptor pDescriptor
- = mrController.GetCurrentSlideManager()->GetCurrentSlide();
- if (pDescriptor.get() != NULL)
+ maMouseModelPosition = rSlideSorter.GetContentWindow()->PixelToLogic(maMousePosition);
+ mpHitDescriptor = rSlideSorter.GetController().GetPageAt(maMousePosition);
+ if (mpHitDescriptor)
{
- SdPage* pPage = pDescriptor->GetPage();
- OSL_ASSERT(pPage!=NULL);
- sal_Int32 nIndex = (pPage->GetPageNum()-1) / 2;
- nIndex += nOffset;
- USHORT nPageCount = (USHORT)mrSlideSorter.GetModel().GetPageCount();
-
- if (nIndex >= nPageCount)
- nIndex = nPageCount - 1;
- if (nIndex < 0)
- nIndex = 0;
-
- mrController.GetFocusManager().SetFocusedPage(nIndex);
- model::SharedPageDescriptor pNextPageDescriptor (
- mrSlideSorter.GetModel().GetPageDescriptor (nIndex));
- if (pNextPageDescriptor.get() != NULL)
- SetCurrentPage(pNextPageDescriptor);
- else
- {
- OSL_ASSERT(pNextPageDescriptor.get() != NULL);
- }
+ mpHitPage = mpHitDescriptor->GetPage();
}
+
+ mnEventCode |= EncodeMouseEvent(rEvent);
+ mnEventCode |= EncodeState();
+
+ // Detect the mouse leaving the window. When not button is pressed then
+ // we can call IsLeaveWindow at the event. Otherwise we have to make an
+ // explicit test.
+ mbIsLeaving = rEvent.IsLeaveWindow()
+ || ! Rectangle(Point(0,0),
+ rSlideSorter.GetContentWindow()->GetOutputSizePixel()).IsInside(maMousePosition);
}
-void SelectionFunction::ProcessMouseEvent (sal_uInt32 nEventType, const MouseEvent& rEvent)
+SelectionFunction::EventDescriptor::EventDescriptor (
+ const sal_uInt32 nEventType,
+ const AcceptDropEvent& rEvent,
+ const sal_Int8 nDragAction,
+ SlideSorter& rSlideSorter)
+ : maMousePosition(rEvent.maPosPixel),
+ maMouseModelPosition(),
+ mpHitDescriptor(),
+ mpHitPage(),
+ mnEventCode(nEventType),
+ mbIsOverButton(rSlideSorter.GetView().GetButtonBar().IsMouseOverButton()),
+ meDragMode(InsertionIndicatorHandler::GetModeFromDndAction(nDragAction)),
+ mbMakeSelectionVisible(true),
+ mbIsLeaving(false)
{
- // #95491# remember button state for creation of own MouseEvents
- SetMouseButtonCode (rEvent.GetButtons());
+ maMouseModelPosition = rSlideSorter.GetContentWindow()->PixelToLogic(maMousePosition);
+ mpHitDescriptor = rSlideSorter.GetController().GetPageAt(maMousePosition);
+ if (mpHitDescriptor)
+ {
+ mpHitPage = mpHitDescriptor->GetPage();
+ }
+
+ mnEventCode |= EncodeState();
+
+ // Detect the mouse leaving the window. When not button is pressed then
+ // we can call IsLeaveWindow at the event. Otherwise we have to make an
+ // explicit test.
+ mbIsLeaving = rEvent.mbLeaving
+ || ! Rectangle(Point(0,0),
+ rSlideSorter.GetContentWindow()->GetOutputSizePixel()).IsInside(maMousePosition);
+}
- // 1. Compute some frequently used values relating to the event.
- ::std::auto_ptr<EventDescriptor> pEventDescriptor (
- new EventDescriptor(nEventType, rEvent, mrSlideSorter));
- // 2. Compute a numerical code that describes the event and that is used
- // for fast look-up of the associated reaction.
- pEventDescriptor->mnEventCode = EncodeMouseEvent(*pEventDescriptor, rEvent);
- // 3. Process the event.
- EventPreprocessing(*pEventDescriptor);
- if ( ! EventProcessing(*pEventDescriptor))
+
+SelectionFunction::EventDescriptor::EventDescriptor (
+ const KeyEvent& rEvent,
+ SlideSorter& rSlideSorter)
+ : maMousePosition(),
+ maMouseModelPosition(),
+ mpHitDescriptor(),
+ mpHitPage(),
+ mnEventCode(KEY_EVENT),
+ mbIsOverButton(rSlideSorter.GetView().GetButtonBar().IsMouseOverButton()),
+ meDragMode(InsertionIndicatorHandler::MoveMode),
+ mbMakeSelectionVisible(true),
+ mbIsLeaving(false)
+{
+ model::SharedPageDescriptor pHitDescriptor (
+ rSlideSorter.GetController().GetFocusManager().GetFocusedPageDescriptor());
+ if (pHitDescriptor.get() != NULL)
{
- OSL_TRACE ("can not handle event code %x", pEventDescriptor->mnEventCode);
+ mpHitPage = pHitDescriptor->GetPage();
+ mpHitDescriptor = pHitDescriptor;
}
- EventPostprocessing(*pEventDescriptor);
- if (nEventType == BUTTON_UP)
- mbPageHit = false;
+ mnEventCode |= EncodeKeyEvent(rEvent) | EncodeState();
}
-sal_uInt32 SelectionFunction::EncodeMouseEvent (
- const EventDescriptor& rDescriptor,
+void SelectionFunction::EventDescriptor::SetDragMode (const InsertionIndicatorHandler::Mode eMode)
+{
+ meDragMode = eMode;
+}
+
+
+
+
+sal_uInt32 SelectionFunction::EventDescriptor::EncodeMouseEvent (
const MouseEvent& rEvent) const
{
// Initialize with the type of mouse event.
- sal_uInt32 nEventCode (rDescriptor.mnEventCode & (BUTTON_DOWN | BUTTON_UP | MOUSE_MOTION));
+ sal_uInt32 nEventCode (mnEventCode & (BUTTON_DOWN | BUTTON_UP | MOUSE_MOTION));
// Detect the affected button.
switch (rEvent.GetButtons())
@@ -738,28 +1046,16 @@ sal_uInt32 SelectionFunction::EncodeMouseEvent (
case 2: nEventCode |= DOUBLE_CLICK; break;
}
- // Detect whether the event has happened over a page object.
- if (rDescriptor.mpHitPage != NULL && ! rDescriptor.mpHitDescriptor.expired())
- {
- model::SharedPageDescriptor pHitDescriptor (rDescriptor.mpHitDescriptor);
- if (pHitDescriptor->IsSelected())
- nEventCode |= OVER_SELECTED_PAGE;
- else
- nEventCode |= OVER_UNSELECTED_PAGE;
- }
-
// Detect pressed modifier keys.
if (rEvent.IsShift())
nEventCode |= SHIFT_MODIFIER;
if (rEvent.IsMod1())
nEventCode |= CONTROL_MODIFIER;
- // Detect whether we are dragging pages or dragging a selection rectangle.
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- if (rOverlay.GetSubstitutionOverlay().isVisible())
- nEventCode |= SUBSTITUTION_VISIBLE;
- if (rOverlay.GetSelectionRectangleOverlay().isVisible())
- nEventCode |= RECTANGLE_VISIBLE;
+ // Detect whether the mouse is over one of the active elements inside a
+ // page object.
+ if (mbIsOverButton)
+ nEventCode |= OVER_BUTTON;
return nEventCode;
}
@@ -767,551 +1063,962 @@ sal_uInt32 SelectionFunction::EncodeMouseEvent (
-void SelectionFunction::ProcessKeyEvent (const KeyEvent& rEvent)
+sal_uInt32 SelectionFunction::EventDescriptor::EncodeKeyEvent (const KeyEvent& rEvent) const
{
- // 1. Compute some frequently used values relating to the event.
- ::std::auto_ptr<EventDescriptor> pEventDescriptor (
- new EventDescriptor(rEvent, mrSlideSorter));
+ // The key code in the lower 16 bit.
+ sal_uInt32 nEventCode (rEvent.GetKeyCode().GetCode());
- // 2. Encode the event.
- pEventDescriptor->mnEventCode = EncodeKeyEvent(*pEventDescriptor, rEvent);
+ // Detect pressed modifier keys.
+ if (rEvent.GetKeyCode().IsShift())
+ nEventCode |= SHIFT_MODIFIER;
+ if (rEvent.GetKeyCode().IsMod1())
+ nEventCode |= CONTROL_MODIFIER;
- // 3. Process the event.
- EventPreprocessing(*pEventDescriptor);
- if ( ! EventProcessing(*pEventDescriptor))
- OSL_TRACE ("can not handle event code %x", pEventDescriptor->mnEventCode);
- EventPostprocessing(*pEventDescriptor);
+ return nEventCode;
}
-sal_uInt32 SelectionFunction::EncodeKeyEvent (
- const EventDescriptor& rDescriptor,
- const KeyEvent& rEvent) const
+sal_uInt32 SelectionFunction::EventDescriptor::EncodeState (void) const
{
- // Initialize as key event.
- sal_uInt32 nEventCode (KEY_EVENT);
-
- // Add the actual key code in the lower 16 bit.
- nEventCode |= rEvent.GetKeyCode().GetCode();
-
- // Detect pressed modifier keys.
- if (rEvent.GetKeyCode().IsShift())
- nEventCode |= SHIFT_MODIFIER;
- if (rEvent.GetKeyCode().IsMod1())
- nEventCode |= CONTROL_MODIFIER;
+ sal_uInt32 nEventCode (0);
// Detect whether the event has happened over a page object.
- if (rDescriptor.mpHitPage != NULL && ! rDescriptor.mpHitDescriptor.expired())
+ if (mpHitPage!=NULL && mpHitDescriptor)
{
- model::SharedPageDescriptor pHitDescriptor (rDescriptor.mpHitDescriptor);
- if (pHitDescriptor->IsSelected())
+ if (mpHitDescriptor->HasState(model::PageDescriptor::ST_Selected))
nEventCode |= OVER_SELECTED_PAGE;
else
nEventCode |= OVER_UNSELECTED_PAGE;
- }
- // Detect whether we are dragging pages or dragging a selection rectangle.
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- if (rOverlay.GetSubstitutionOverlay().isVisible())
- nEventCode |= SUBSTITUTION_VISIBLE;
- if (rOverlay.GetSelectionRectangleOverlay().isVisible())
- nEventCode |= RECTANGLE_VISIBLE;
+ // Detect whether the mouse is over one of the active elements
+ // inside a page object.
+ if (mbIsOverButton)
+ nEventCode |= OVER_BUTTON;
+ }
return nEventCode;
}
-void SelectionFunction::EventPreprocessing (const EventDescriptor& rDescriptor)
+
+//===== SelectionFunction::ModeHandler ========================================
+
+SelectionFunction::ModeHandler::ModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction,
+ const bool bIsMouseOverIndicatorAllowed)
+ : mrSlideSorter(rSlideSorter),
+ mrSelectionFunction(rSelectionFunction),
+ mbIsMouseOverIndicatorAllowed(bIsMouseOverIndicatorAllowed)
+{
+}
+
+
+
+
+SelectionFunction::ModeHandler::~ModeHandler (void)
{
- // Some general processing that is not specific to the exact event code.
- if (rDescriptor.mnEventCode & BUTTON_DOWN)
- mbPageHit = (rDescriptor.mpHitPage!=NULL);
+}
+
+
- // Set the focus to the slide under the mouse.
- if (rDescriptor.mpHitPage != NULL)
- mrController.GetFocusManager().FocusPage((rDescriptor.mpHitPage->GetPageNum()-1)/2);
+
+void SelectionFunction::ModeHandler::ReprocessEvent (EventDescriptor& rDescriptor)
+{
+ mrSelectionFunction.ProcessEvent(rDescriptor);
}
-bool SelectionFunction::EventProcessing (const EventDescriptor& rDescriptor)
+void SelectionFunction::ModeHandler::ProcessEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
{
- // Define some macros to make the following switch statement more readable.
-#define ANY_MODIFIER(code) \
- code|NO_MODIFIER: \
- case code|SHIFT_MODIFIER: \
- case code|CONTROL_MODIFIER
-#define ANY_PAGE(code) \
- code|NOT_OVER_PAGE: \
- case code|OVER_UNSELECTED_PAGE: \
- case code|OVER_SELECTED_PAGE
-#define ANY_PAGE_AND_MODIFIER(code) \
- ANY_PAGE(code|NO_MODIFIER): \
- case ANY_PAGE(code|SHIFT_MODIFIER): \
- case ANY_PAGE(code|CONTROL_MODIFIER)
+ PageSelector::BroadcastLock aBroadcastLock (mrSlideSorter);
+ PageSelector::UpdateLock aUpdateLock (mrSlideSorter);
+
+ bool bIsProcessed (false);
+ switch (rDescriptor.mnEventCode & (BUTTON_DOWN | BUTTON_UP | MOUSE_MOTION | MOUSE_DRAG))
+ {
+ case BUTTON_DOWN:
+ bIsProcessed = ProcessButtonDownEvent(rDescriptor);
+ break;
+
+ case BUTTON_UP:
+ bIsProcessed = ProcessButtonUpEvent(rDescriptor);
+ break;
+
+ case MOUSE_MOTION:
+ bIsProcessed = ProcessMotionEvent(rDescriptor);
+ break;
+
+ case MOUSE_DRAG:
+ bIsProcessed = ProcessDragEvent(rDescriptor);
+ break;
+ }
+
+ if ( ! bIsProcessed)
+ HandleUnprocessedEvent(rDescriptor);
+}
+
+
+
+
+bool SelectionFunction::ModeHandler::ProcessButtonDownEvent (EventDescriptor&)
+{
+ return false;
+}
+
+
+
+
+bool SelectionFunction::ModeHandler::ProcessButtonUpEvent (EventDescriptor&)
+{
+ mrSelectionFunction.SwitchToNormalMode();
+ return false;
+}
+
+
+
+
+bool SelectionFunction::ModeHandler::ProcessMotionEvent (EventDescriptor& rDescriptor)
+{
+ if (mbIsMouseOverIndicatorAllowed)
+ mrSlideSorter.GetView().UpdatePageUnderMouse(
+ rDescriptor.maMousePosition,
+ (rDescriptor.mnEventCode & LEFT_BUTTON) != 0,
+ true);
+
+ if (rDescriptor.mbIsLeaving)
+ {
+ mrSelectionFunction.SwitchToNormalMode();
+ mrSlideSorter.GetView().SetPageUnderMouse(model::SharedPageDescriptor());
+
+ return true;
+ }
+ else
+ return false;
+}
+
+
+
+
+bool SelectionFunction::ModeHandler::ProcessDragEvent (EventDescriptor&)
+{
+ return false;
+}
+
+
+
+
+bool SelectionFunction::ModeHandler::HandleUnprocessedEvent (EventDescriptor&)
+{
+ return false;
+}
+
+
+
+
+void SelectionFunction::ModeHandler::SetCurrentPage (
+ const model::SharedPageDescriptor& rpDescriptor)
+{
+ SelectOnePage(rpDescriptor);
+ mrSlideSorter.GetController().GetCurrentSlideManager()->SwitchCurrentSlide(rpDescriptor);
+}
+
+
- bool bResult (true);
- bool bMakeSelectionVisible (true);
+void SelectionFunction::ModeHandler::DeselectAllPages (void)
+{
+ mrSlideSorter.GetController().GetPageSelector().DeselectAllPages();
+ mrSelectionFunction.ResetShiftKeySelectionAnchor();
+}
+
+
+
+
+void SelectionFunction::ModeHandler::SelectOnePage (
+ const model::SharedPageDescriptor& rpDescriptor)
+{
+ DeselectAllPages();
+ mrSlideSorter.GetController().GetPageSelector().SelectPage(rpDescriptor);
+}
+
+
+
+
+void SelectionFunction::ModeHandler::SwitchView (const model::SharedPageDescriptor& rpDescriptor)
+{
+ // Switch to the draw view. This is done only when the current
+ // view is the main view.
+ ViewShell* pViewShell = mrSlideSorter.GetViewShell();
+ if (pViewShell!=NULL && pViewShell->IsMainViewShell())
+ {
+ if (rpDescriptor.get()!=NULL && rpDescriptor->GetPage()!=NULL)
+ {
+ mrSlideSorter.GetModel().GetDocument()->SetSelected(rpDescriptor->GetPage(), TRUE);
+ pViewShell->GetFrameView()->SetSelectedPage(
+ (rpDescriptor->GetPage()->GetPageNum()-1)/2);
+ }
+ if (mrSlideSorter.GetViewShellBase() != NULL)
+ framework::FrameworkHelper::Instance(*mrSlideSorter.GetViewShellBase())->RequestView(
+ framework::FrameworkHelper::msImpressViewURL,
+ framework::FrameworkHelper::msCenterPaneURL);
+ }
+}
+
+
+
+
+void SelectionFunction::ModeHandler::StartDrag (
+ const Point& rMousePosition,
+ const InsertionIndicatorHandler::Mode eMode)
+{
+ (void)eMode;
+ // Do not start a drag-and-drop operation when one is already active.
+ // (when dragging pages from one document into another, pressing a
+ // modifier key can trigger a MouseMotion event in the originating
+ // window (focus still in there). Together with the mouse button pressed
+ // (drag-and-drop is active) this triggers the start of drag-and-drop.)
+ if (SD_MOD()->pTransferDrag != NULL)
+ return;
+
+ if ( ! mrSlideSorter.GetProperties()->IsUIReadOnly())
+ {
+ mrSelectionFunction.SwitchToDragAndDropMode(rMousePosition);
+ }
+}
+
+
+
+
+bool SelectionFunction::ModeHandler::IsMouseOverIndicatorAllowed (void) const
+{
+ return mbIsMouseOverIndicatorAllowed;
+}
+
+
+
+
+//===== NormalModeHandler =====================================================
+
+NormalModeHandler::NormalModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction)
+ : ModeHandler(rSlideSorter, rSelectionFunction, true),
+ maButtonDownLocation()
+{
+}
+
+
+
+
+NormalModeHandler::~NormalModeHandler (void)
+{
+}
+
+
+
+
+SelectionFunction::Mode NormalModeHandler::GetMode (void) const
+{
+ return SelectionFunction::NormalMode;
+}
+
+
+
+
+void NormalModeHandler::Abort (void)
+{
+}
+
- mrController.GetPageSelector().DisableBroadcasting();
- // 2b. With the event code determine the type of operation with which to
- // react to the event.
- // Acquire a shared_ptr to the hit page descriptor.
- model::SharedPageDescriptor pHitDescriptor;
- if ( ! rDescriptor.mpHitDescriptor.expired())
- pHitDescriptor = model::SharedPageDescriptor(rDescriptor.mpHitDescriptor);
+bool NormalModeHandler::ProcessButtonDownEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
+{
+ // Remember the location where the left button is pressed. With
+ // that we can filter away motion events that are caused by key
+ // presses. We also can tune the minimal motion distance that
+ // triggers a drag-and-drop operation.
+ if ((rDescriptor.mnEventCode & BUTTON_DOWN) != 0)
+ maButtonDownLocation = rDescriptor.maMousePosition;
switch (rDescriptor.mnEventCode)
{
case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE:
- SetCurrentPage(pHitDescriptor);
- PrepareMouseMotion(mpWindow->PixelToLogic(rDescriptor.maMousePosition));
- mpSubstitutionHandler->Start(rDescriptor.maMouseModelPosition);
- break;
-
- case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE:
- SetCurrentPage(pHitDescriptor);
- mpSubstitutionHandler->End();
+ SetCurrentPage(rDescriptor.mpHitDescriptor);
break;
case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE:
- PrepareMouseMotion(mpWindow->PixelToLogic(rDescriptor.maMousePosition));
- mpSubstitutionHandler->Start(rDescriptor.maMouseModelPosition);
break;
case BUTTON_DOWN | LEFT_BUTTON | DOUBLE_CLICK | OVER_SELECTED_PAGE:
case BUTTON_DOWN | LEFT_BUTTON | DOUBLE_CLICK | OVER_UNSELECTED_PAGE:
// A double click allways shows the selected slide in the center
// pane in an edit view.
- SetCurrentPage(pHitDescriptor);
- SwitchView(pHitDescriptor);
- break;
-
- // Multi selection with the control modifier.
- case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE | CONTROL_MODIFIER:
- DeselectHitPage(pHitDescriptor);
- PrepareMouseMotion(mpWindow->PixelToLogic(rDescriptor.maMousePosition));
- break;
-
- case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE | CONTROL_MODIFIER:
- SelectHitPage(pHitDescriptor);
- PrepareMouseMotion(mpWindow->PixelToLogic(rDescriptor.maMousePosition));
-
+ SetCurrentPage(rDescriptor.mpHitDescriptor);
+ SwitchView(rDescriptor.mpHitDescriptor);
break;
- // Range selection with the shift modifier.
case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE | SHIFT_MODIFIER:
case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE | SHIFT_MODIFIER:
- RangeSelect(pHitDescriptor);
+ // Range selection with the shift modifier.
+ RangeSelect(rDescriptor.mpHitDescriptor);
break;
- // Was: Preview of the page transition effect.
- case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_FADE_INDICATOR:
- // No action.
+ case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE | OVER_BUTTON:
+ case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE | OVER_BUTTON:
+ OSL_ASSERT(mrSlideSorter.GetView().GetButtonBar().IsMouseOverButton());
+
+ // Switch to button mode only when the buttons are visible
+ // (or being faded in.)
+ if (mrSlideSorter.GetView().GetButtonBar().IsVisible(rDescriptor.mpHitDescriptor))
+ {
+ if (mrSelectionFunction.SwitchToButtonMode())
+ ReprocessEvent(rDescriptor);
+ }
+ else
+ {
+ // When the buttons are not (yet) visible then behave like
+ // the left button had been clicked over any other part of
+ // the slide.
+ SetCurrentPage(rDescriptor.mpHitDescriptor);
+ }
break;
- // Right button for context menu.
+ // Right button for context menu.
case BUTTON_DOWN | RIGHT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE:
- case KEY_EVENT | KEY_F10 | SHIFT_MODIFIER | OVER_UNSELECTED_PAGE:
// Single right click and shift+F10 select as preparation to
// show the context menu. Change the selection only when the
// page under the mouse is not selected. In this case the
// selection is set to this single page. Otherwise the
// selection is not modified.
- DeselectAllPages();
- SelectHitPage(pHitDescriptor);
- SetCurrentPage(pHitDescriptor);
- bMakeSelectionVisible = false;
+ SetCurrentPage(rDescriptor.mpHitDescriptor);
+ rDescriptor.mbMakeSelectionVisible = false;
break;
case BUTTON_DOWN | RIGHT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE:
- case KEY_EVENT | KEY_F10 | OVER_SELECTED_PAGE | SHIFT_MODIFIER:
// Do not change the selection. Just adjust the insertion indicator.
- bMakeSelectionVisible = false;
+ rDescriptor.mbMakeSelectionVisible = false;
break;
case BUTTON_DOWN | RIGHT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE:
- // The Shift+F10 key event is here just for completeness. It should
- // not be possible to really receive this (not being over a page.)
- case KEY_EVENT | KEY_F10 | SHIFT_MODIFIER | NOT_OVER_PAGE:
+ // Remember the current selection so that when a multi selection
+ // is started, we can restore the previous selection.
+ mrSlideSorter.GetModel().SaveCurrentSelection();
DeselectAllPages();
- bMakeSelectionVisible = false;
break;
- // A mouse motion without visible substitution starts that.
- case ANY_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE):
- mrController.GetScrollBarManager().AutoScroll(rDescriptor.maMousePosition);
- mpSubstitutionHandler->Start(rDescriptor.maMouseModelPosition);
+ case ANY_MODIFIER(BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE):
+ // Remember the current selection so that when a multi selection
+ // is started, we can restore the previous selection.
+ mrSlideSorter.GetModel().SaveCurrentSelection();
+ DeselectAllPages();
break;
- // Move substitution.
- case ANY_PAGE_AND_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | SUBSTITUTION_VISIBLE):
- if ((rDescriptor.mnEventCode & CONTROL_MODIFIER) != 0)
- StartDrag();
- mrController.GetScrollBarManager().AutoScroll(rDescriptor.maMousePosition);
- mpSubstitutionHandler->UpdatePosition(rDescriptor.maMouseModelPosition);
+ default:
+ return false;
+ }
+ return true;
+}
+
+
+
+
+bool NormalModeHandler::ProcessButtonUpEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
+{
+ bool bIsProcessed (true);
+ switch (rDescriptor.mnEventCode)
+ {
+ case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE:
+ SetCurrentPage(rDescriptor.mpHitDescriptor);
break;
- // Place substitution.
- case ANY_PAGE_AND_MODIFIER(BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | SUBSTITUTION_VISIBLE):
- // When the substitution has not been moved the button up event
- // is taken to be part of a single click. The selected pages
- // are therefore not moved (which technically would be necessary
- // for unconsecutive multi selections). Instead the page under
- // the mouse becomes the only selected page.
- if (mpSubstitutionHandler->HasBeenMoved())
- {
- // The following Process() call may lead to the desctruction
- // of pHitDescriptor so release our reference to it.
- pHitDescriptor.reset();
- mpSubstitutionHandler->Process();
- }
- else
- if (pHitDescriptor != NULL)
- SetCurrentPage(pHitDescriptor);
- mpSubstitutionHandler->End();
+ // Multi selection with the control modifier.
+ case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE | CONTROL_MODIFIER:
+ mrSlideSorter.GetController().GetPageSelector().DeselectPage(
+ rDescriptor.mpHitDescriptor);
break;
- // Rectangle selection.
- case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE | NO_MODIFIER:
- DeselectAllPages();
- StartRectangleSelection(rDescriptor.maMouseModelPosition);
+ case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE | CONTROL_MODIFIER:
+ mrSlideSorter.GetController().GetPageSelector().SelectPage(
+ rDescriptor.mpHitDescriptor);
+ mrSlideSorter.GetView().UpdatePageUnderMouse(
+ rDescriptor.mpHitDescriptor,
+ rDescriptor.maMousePosition,
+ false);
+ break;
+ case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE:
break;
- case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE | SHIFT_MODIFIER:
- case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE | CONTROL_MODIFIER:
- StartRectangleSelection(rDescriptor.maMouseModelPosition);
+ default:
+ bIsProcessed = false;
break;
+ }
+ mrSelectionFunction.SwitchToNormalMode();
+ return bIsProcessed;
+}
- case ANY_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE):
+
+
+
+
+bool NormalModeHandler::ProcessMotionEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
+{
+ if (ModeHandler::ProcessMotionEvent(rDescriptor))
+ return true;
+
+ bool bIsProcessed (true);
+ switch (rDescriptor.mnEventCode)
+ {
case ANY_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE):
- case ANY_PAGE_AND_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | RECTANGLE_VISIBLE):
- mrController.GetScrollBarManager().AutoScroll(rDescriptor.maMousePosition);
- UpdateRectangleSelection(rDescriptor.maMouseModelPosition);
- break;
+ // SetCurrentPage(rDescriptor.mpHitDescriptor);
+ // Fallthrough
- case ANY_PAGE(BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | RECTANGLE_VISIBLE | NO_MODIFIER):
- ProcessRectangleSelection(false);
- break;
+ // A mouse motion without visible substitution starts that.
+ case ANY_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE):
+ {
+ if (maButtonDownLocation)
+ {
+ const sal_Int32 nDistance (maButtonDownLocation
+ ? ::std::max (
+ abs(maButtonDownLocation->X() - rDescriptor.maMousePosition.X()),
+ abs(maButtonDownLocation->Y() - rDescriptor.maMousePosition.Y()))
+ : 0);
+ if (nDistance > 3)
+ StartDrag(
+ rDescriptor.maMousePosition,
+ (rDescriptor.mnEventCode & CONTROL_MODIFIER) != 0
+ ? InsertionIndicatorHandler::CopyMode
+ : InsertionIndicatorHandler::MoveMode);
+ }
+ }
+ break;
- case ANY_PAGE(BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | RECTANGLE_VISIBLE | SHIFT_MODIFIER):
- case ANY_PAGE(BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | RECTANGLE_VISIBLE | CONTROL_MODIFIER):
- ProcessRectangleSelection(true);
+ // A mouse motion not over a page starts a rectangle selection.
+ case ANY_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE):
+ mrSelectionFunction.SwitchToMultiSelectionMode(
+ rDescriptor.maMouseModelPosition,
+ rDescriptor.mnEventCode);
break;
default:
- bResult = false;
+ bIsProcessed = false;
break;
}
- mrController.GetPageSelector().EnableBroadcasting(bMakeSelectionVisible);
+ return bIsProcessed;
+}
- return bResult;
+
+
+
+bool NormalModeHandler::ProcessDragEvent (SelectionFunction::EventDescriptor& rDescriptor)
+{
+ mrSelectionFunction.SwitchToDragAndDropMode(rDescriptor.maMousePosition);
+ ReprocessEvent(rDescriptor);
+ return true;
}
-void SelectionFunction::EventPostprocessing (const EventDescriptor& rDescriptor)
+void NormalModeHandler::RangeSelect (const model::SharedPageDescriptor& rpDescriptor)
{
- if (rDescriptor.mnEventCode & BUTTON_UP)
+ PageSelector::UpdateLock aLock (mrSlideSorter);
+ PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector());
+
+ model::SharedPageDescriptor pAnchor (rSelector.GetSelectionAnchor());
+ DeselectAllPages();
+
+ if (pAnchor.get() != NULL)
{
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
-
- mpWindow->ReleaseMouse();
-
- // The overlays should not be visible anymore. Warn when one of
- // them still is. An exception is th insertion indicator in the
- // case that the context menu is visible.
- DBG_ASSERT(
- mrController.IsContextMenuOpen()
- || !rOverlay.GetInsertionIndicatorOverlay().isVisible(),
- "slidesorter::SelectionFunction: insertion indicator still visible");
- DBG_ASSERT(
- !rOverlay.GetSubstitutionOverlay().isVisible(),
- "slidesorter::SelectionFunction: substitution still visible");
- DBG_ASSERT(
- !rOverlay.GetSelectionRectangleOverlay().isVisible(),
- "slidesorter::SelectionFunction: selection rectangle still visible");
-
- // Now turn them off.
- if ( ! mrController.IsContextMenuOpen())
- rOverlay.GetInsertionIndicatorOverlay().setVisible(false);
- rOverlay.GetSubstitutionOverlay().setVisible(false);
- rOverlay.GetSelectionRectangleOverlay().setVisible(false);
+ // Select all pages between the anchor and the given one, including
+ // the two.
+ const USHORT nAnchorIndex ((pAnchor->GetPage()->GetPageNum()-1) / 2);
+ const USHORT nOtherIndex ((rpDescriptor->GetPage()->GetPageNum()-1) / 2);
+
+ // Iterate over all pages in the range. Start with the anchor
+ // page. This way the PageSelector will recognize it again as
+ // anchor (the first selected page after a DeselectAllPages()
+ // becomes the anchor.)
+ const USHORT nStep ((nAnchorIndex < nOtherIndex) ? +1 : -1);
+ USHORT nIndex (nAnchorIndex);
+ while (true)
+ {
+ rSelector.SelectPage(nIndex);
+ if (nIndex == nOtherIndex)
+ break;
+ nIndex = nIndex + nStep;
+ }
}
}
-void SelectionFunction::SetCurrentPage (const model::SharedPageDescriptor& rpDescriptor)
+void NormalModeHandler::ResetButtonDownLocation (void)
{
- PageSelector& rSelector (mrController.GetPageSelector());
- rSelector.DeselectAllPages ();
- rSelector.SelectPage(rpDescriptor);
+ maButtonDownLocation = ::boost::optional<Point>();
+}
+
+
- mrController.GetCurrentSlideManager()->SwitchCurrentSlide(rpDescriptor);
+
+//===== MultiSelectionModeHandler =============================================
+
+MultiSelectionModeHandler::MultiSelectionModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction,
+ const Point& rMouseModelPosition,
+ const sal_uInt32 nEventCode)
+ : ModeHandler(rSlideSorter, rSelectionFunction, false),
+ meSelectionMode(SM_Normal),
+ maSecondCorner(rMouseModelPosition),
+ maSavedPointer(mrSlideSorter.GetContentWindow()->GetPointer()),
+ mnAnchorIndex(-1),
+ mnSecondIndex(-1),
+ maButtonBarLock(rSlideSorter)
+{
+ const Pointer aSelectionPointer (POINTER_TEXT);
+ mrSlideSorter.GetContentWindow()->SetPointer(aSelectionPointer);
+ SetSelectionModeFromModifier(nEventCode);
}
-void SelectionFunction::SwitchView (const model::SharedPageDescriptor& rpDescriptor)
+
+MultiSelectionModeHandler::~MultiSelectionModeHandler (void)
{
- // Switch to the draw view. This is done only when the current
- // view is the main view.
- ViewShell* pViewShell = mrSlideSorter.GetViewShell();
- if (pViewShell!=NULL && pViewShell->IsMainViewShell())
+ mrSlideSorter.GetContentWindow()->SetPointer(maSavedPointer);
+}
+
+
+
+
+SelectionFunction::Mode MultiSelectionModeHandler::GetMode (void) const
+{
+ return SelectionFunction::MultiSelectionMode;
+}
+
+
+
+
+void MultiSelectionModeHandler::Abort (void)
+{
+ mrSlideSorter.GetView().RequestRepaint(mrSlideSorter.GetModel().RestoreSelection());
+}
+
+
+
+
+void MultiSelectionModeHandler::ProcessEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
+{
+ // During a multi selection we do not want sudden jumps of the
+ // visible area caused by moving newly selected pages into view.
+ // Therefore disable that temporarily. The disabler object is
+ // released at the end of the event processing, after the focus and
+ // current slide have been updated.
+ VisibleAreaManager::TemporaryDisabler aDisabler (mrSlideSorter);
+
+ ModeHandler::ProcessEvent(rDescriptor);
+}
+
+
+
+
+bool MultiSelectionModeHandler::ProcessButtonUpEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
+{
+ if (Match(rDescriptor.mnEventCode, BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK))
{
- if (rpDescriptor.get()!=NULL && rpDescriptor->GetPage()!=NULL)
- {
- mrSlideSorter.GetModel().GetDocument()->SetSelected(rpDescriptor->GetPage(), TRUE);
- mpViewShell->GetFrameView()->SetSelectedPage(
- (rpDescriptor->GetPage()->GetPageNum()-1)/2);
- }
- if (mrSlideSorter.GetViewShellBase() != NULL)
- framework::FrameworkHelper::Instance(*mrSlideSorter.GetViewShellBase())->RequestView(
- framework::FrameworkHelper::msImpressViewURL,
- framework::FrameworkHelper::msCenterPaneURL);
+ mrSelectionFunction.SwitchToNormalMode();
+ return true;
}
+ else
+ return false;
}
-//===== EventDescriptor =======================================================
+bool MultiSelectionModeHandler::ProcessMotionEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
+{
+ // The selection rectangle is visible. Handle events accordingly.
+ if (Match(rDescriptor.mnEventCode, MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK))
+ {
+ SetSelectionModeFromModifier(rDescriptor.mnEventCode);
+ UpdatePosition(rDescriptor.maMousePosition, true);
+ rDescriptor.mbMakeSelectionVisible = false;
+ return true;
+ }
+ else
+ return false;
+}
-SelectionFunction::EventDescriptor::EventDescriptor (
- sal_uInt32 nEventType,
- const MouseEvent& rEvent,
- SlideSorter& rSlideSorter)
- : maMousePosition(),
- maMouseModelPosition(),
- mpHitDescriptor(),
- mpHitPage(),
- mnEventCode(nEventType)
+
+
+bool MultiSelectionModeHandler::HandleUnprocessedEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
{
- ::Window* pWindow = rSlideSorter.GetActiveWindow();
+ if ( ! ModeHandler::HandleUnprocessedEvent(rDescriptor))
+ {
+ // If the event has not been processed then stop multi selection.
+ mrSelectionFunction.SwitchToNormalMode();
+ ReprocessEvent(rDescriptor);
+ }
+ return true;
+}
- maMousePosition = rEvent.GetPosPixel();
- maMouseModelPosition = pWindow->PixelToLogic(maMousePosition);
- model::SharedPageDescriptor pHitDescriptor (
- rSlideSorter.GetController().GetPageAt(maMousePosition));
- if (pHitDescriptor.get() != NULL)
+
+
+
+void MultiSelectionModeHandler::UpdatePosition (
+ const Point& rMousePosition,
+ const bool bAllowAutoScroll)
+{
+ VisibleAreaManager::TemporaryDisabler aDisabler (mrSlideSorter);
+
+ // Convert window coordinates into model coordinates (we need the
+ // window coordinates for auto-scrolling because that remains
+ // constant while scrolling.)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ const Point aMouseModelPosition (pWindow->PixelToLogic(rMousePosition));
+
+ if ( ! (bAllowAutoScroll && mrSlideSorter.GetController().GetScrollBarManager().AutoScroll(
+ rMousePosition,
+ ::boost::bind(
+ &MultiSelectionModeHandler::UpdatePosition,
+ this,
+ rMousePosition,
+ false))))
{
- mpHitDescriptor = pHitDescriptor;
- mpHitPage = pHitDescriptor->GetPage();
+ UpdateModelPosition(aMouseModelPosition);
}
}
+void MultiSelectionModeHandler::SetSelectionModeFromModifier (
+ const sal_uInt32 nEventCode)
+{
+ switch (nEventCode & MODIFIER_MASK)
+ {
+ case NO_MODIFIER:
+ SetSelectionMode(SM_Normal);
+ break;
-SelectionFunction::EventDescriptor::EventDescriptor (
- const KeyEvent&,
- SlideSorter& rSlideSorter)
- : maMousePosition(),
- maMouseModelPosition(),
- mpHitDescriptor(),
- mpHitPage(),
- mnEventCode(0)
+ case SHIFT_MODIFIER:
+ SetSelectionMode(SM_Add);
+ break;
+
+ case CONTROL_MODIFIER:
+ SetSelectionMode(SM_Toggle);
+ break;
+ }
+}
+
+
+
+
+void MultiSelectionModeHandler::SetSelectionMode (const SelectionMode eSelectionMode)
{
- mpHitDescriptor = rSlideSorter.GetController().GetFocusManager().GetFocusedPageDescriptor();
- model::SharedPageDescriptor pHitDescriptor (
- rSlideSorter.GetController().GetFocusManager().GetFocusedPageDescriptor());
- if (pHitDescriptor.get() != NULL)
+ if (meSelectionMode != eSelectionMode)
{
- mpHitPage = pHitDescriptor->GetPage();
- mpHitDescriptor = pHitDescriptor;
+ meSelectionMode = eSelectionMode;
+ UpdateSelection();
}
}
+void MultiSelectionModeHandler::UpdateSelectionState (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bIsInSelection) const
+{
+ // Determine whether the page was selected before the rectangle
+ // selection was started.
+ const bool bWasSelected (rpDescriptor->HasState(model::PageDescriptor::ST_WasSelected));
+
+ // Combine the two selection states depending on the selection mode.
+ bool bSelect (false);
+ switch(meSelectionMode)
+ {
+ case SM_Normal:
+ bSelect = bIsInSelection;
+ break;
-//===== SubstitutionHandler ===================================================
+ case SM_Add:
+ bSelect = bIsInSelection || bWasSelected;
+ break;
-SelectionFunction::SubstitutionHandler::SubstitutionHandler (SlideSorter& rSlideSorter)
- : mrSlideSorter(rSlideSorter),
- mbHasBeenMoved(false)
+ case SM_Toggle:
+ if (bIsInSelection)
+ bSelect = !bWasSelected;
+ else
+ bSelect = bWasSelected;
+ break;
+ }
+
+ // Set the new selection state.
+ if (bSelect)
+ mrSlideSorter.GetController().GetPageSelector().SelectPage(rpDescriptor);
+ else
+ mrSlideSorter.GetController().GetPageSelector().DeselectPage(rpDescriptor);
+}
+
+
+
+
+void MultiSelectionModeHandler::UpdateModelPosition (const Point& rMouseModelPosition)
{
+ maSecondCorner = rMouseModelPosition;
+ UpdateSelection();
}
-SelectionFunction::SubstitutionHandler::~SubstitutionHandler (void)
+void MultiSelectionModeHandler::UpdateSelection (void)
{
- if (mrSlideSorter.IsValid())
+ view::SlideSorterView::DrawLock aLock (mrSlideSorter);
+
+ model::SlideSorterModel& rModel (mrSlideSorter.GetModel());
+ const sal_Int32 nPageCount (rModel.GetPageCount());
+
+ const sal_Int32 nIndexUnderMouse (
+ mrSlideSorter.GetView().GetLayouter().GetIndexAtPoint (
+ maSecondCorner,
+ false,
+ false));
+ if (nIndexUnderMouse>=0 && nIndexUnderMouse<nPageCount)
{
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetSubstitutionOverlay().setVisible(false);
- rOverlay.GetSubstitutionOverlay().Clear();
+ if (mnAnchorIndex < 0)
+ mnAnchorIndex = nIndexUnderMouse;
+ mnSecondIndex = nIndexUnderMouse;
+
+ Range aRange (mnAnchorIndex, mnSecondIndex);
+ aRange.Justify();
+
+ for (sal_Int32 nIndex=0; nIndex<nPageCount; ++nIndex)
+ {
+ UpdateSelectionState(rModel.GetPageDescriptor(nIndex), aRange.IsInside(nIndex));
+ }
}
}
-void SelectionFunction::SubstitutionHandler::Start (const Point& rMouseModelPosition)
+//===== DragAndDropModeHandler ================================================
+
+DragAndDropModeHandler::DragAndDropModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction,
+ const Point& rMousePosition,
+ ::Window* pWindow)
+ : ModeHandler(rSlideSorter, rSelectionFunction, false)
{
- // No Drag-and-Drop for master pages.
- if (mrSlideSorter.GetModel().GetEditMode() != EM_PAGE)
- return;
+ SdTransferable* pDragTransferable = SD_MOD()->pTransferDrag;
+ if (pDragTransferable==NULL && mrSlideSorter.GetViewShell() != NULL)
+ {
+ SlideSorterViewShell* pSlideSorterViewShell
+ = dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell());
+ if (pSlideSorterViewShell != NULL)
+ pSlideSorterViewShell->StartDrag(rMousePosition, pWindow);
+ pDragTransferable = SD_MOD()->pTransferDrag;
+ }
- if (mrSlideSorter.GetController().GetProperties()->IsUIReadOnly())
- return;
+ mpDragAndDropContext.reset(new DragAndDropContext(mrSlideSorter));
+ mrSlideSorter.GetController().GetInsertionIndicatorHandler()->Start(
+ pDragTransferable != NULL
+ && pDragTransferable->GetView()==&mrSlideSorter.GetView());
+}
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- if ( ! rOverlay.GetSubstitutionOverlay().isVisible())
+
+
+DragAndDropModeHandler::~DragAndDropModeHandler (void)
+{
+ if (mpDragAndDropContext)
{
- // Show a new substitution for the selected page objects.
- model::PageEnumeration aSelectedPages(
- model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
- mrSlideSorter.GetModel()));
- rOverlay.GetSubstitutionOverlay().Create(aSelectedPages, rMouseModelPosition);
- rOverlay.GetSubstitutionOverlay().setVisible(true);
- mbHasBeenMoved = false;
+ // Disconnect the substitution handler from this selection function.
+ mpDragAndDropContext->SetTargetSlideSorter();
+ mpDragAndDropContext.reset();
}
- else
- UpdatePosition(rMouseModelPosition);
+ mrSlideSorter.GetController().GetInsertionIndicatorHandler()->End(Animator::AM_Animated);
}
-void SelectionFunction::SubstitutionHandler::UpdatePosition (const Point& rMouseModelPosition)
+SelectionFunction::Mode DragAndDropModeHandler::GetMode (void) const
{
- if (mrSlideSorter.GetController().GetProperties()->IsUIReadOnly())
- return;
+ return SelectionFunction::DragAndDropMode;
+}
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- // Move the existing substitution to the new position.
- rOverlay.GetSubstitutionOverlay().SetPosition(rMouseModelPosition);
- rOverlay.GetInsertionIndicatorOverlay().SetPosition(rMouseModelPosition);
- rOverlay.GetInsertionIndicatorOverlay().setVisible(true);
- mbHasBeenMoved = true;
+void DragAndDropModeHandler::Abort (void)
+{
+ mrSlideSorter.GetController().GetClipboard().Abort();
+ if (mpDragAndDropContext)
+ mpDragAndDropContext->Dispose();
+ // mrSlideSorter.GetView().RequestRepaint(mrSlideSorter.GetModel().RestoreSelection());
}
-void SelectionFunction::SubstitutionHandler::Process (void)
+bool DragAndDropModeHandler::ProcessButtonUpEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
{
- if (mrSlideSorter.GetController().GetProperties()->IsUIReadOnly())
- return;
+ if (Match(rDescriptor.mnEventCode, BUTTON_UP | LEFT_BUTTON))
+ {
+ // The following Process() call may lead to the desctruction
+ // of rDescriptor.mpHitDescriptor so release our reference to it.
+ rDescriptor.mpHitDescriptor.reset();
+ mrSelectionFunction.SwitchToNormalMode();
+ return true;
+ }
+ else
+ return false;
+}
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- if (IsSubstitutionInsertionNonTrivial())
- {
- // Tell the model to move the selected pages behind the one with the
- // index mnInsertionIndex which first has to transformed into an index
- // understandable by the document.
- sal_Int32 nInsertionIndex = rOverlay.GetInsertionIndicatorOverlay().GetInsertionPageIndex();
- if (nInsertionIndex >= 0)
- {
- USHORT nDocumentIndex = (USHORT)nInsertionIndex-1;
- mrSlideSorter.GetController().GetSelectionManager()->MoveSelectedPages(nDocumentIndex);
- }
- ViewShell* pViewShell = mrSlideSorter.GetViewShell();
- if (pViewShell != NULL)
- pViewShell->GetViewFrame()->GetBindings().Invalidate(SID_STATUS_PAGE);
+
+bool DragAndDropModeHandler::ProcessDragEvent (SelectionFunction::EventDescriptor& rDescriptor)
+{
+ OSL_ASSERT(mpDragAndDropContext);
+
+ if (rDescriptor.mbIsLeaving)
+ {
+ mrSelectionFunction.SwitchToNormalMode();
+ }
+ else if (mpDragAndDropContext)
+ {
+ mpDragAndDropContext->UpdatePosition(
+ rDescriptor.maMousePosition,
+ rDescriptor.meDragMode);
}
+
+ return true;
}
-void SelectionFunction::SubstitutionHandler::End (void)
+//===== ButtonModeHandler =====================================================
+
+ButtonModeHandler::ButtonModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction)
+ : ModeHandler(rSlideSorter, rSelectionFunction, true)
{
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetSubstitutionOverlay().setVisible(false);
- rOverlay.GetSubstitutionOverlay().Clear();
- rOverlay.GetInsertionIndicatorOverlay().setVisible(false);
}
-bool SelectionFunction::SubstitutionHandler::HasBeenMoved (void) const
+ButtonModeHandler::~ButtonModeHandler (void)
{
- return mbHasBeenMoved;
}
-bool SelectionFunction::SubstitutionHandler::IsSubstitutionInsertionNonTrivial (void) const
+SelectionFunction::Mode ButtonModeHandler::GetMode (void) const
{
- bool bIsNonTrivial = false;
+ return SelectionFunction::ButtonMode;
+}
+
+
+
- do
+void ButtonModeHandler::Abort (void)
+{
+}
+
+
+
+
+bool ButtonModeHandler::ProcessButtonDownEvent (SelectionFunction::EventDescriptor& rDescriptor)
+{
+ switch (rDescriptor.mnEventCode)
{
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
+ case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE | OVER_BUTTON:
+ case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE | OVER_BUTTON:
+ // Remember page and button index. When mouse button is
+ // released over same page and button then invoke action of that
+ // button.
+ mrSlideSorter.GetView().GetButtonBar().ProcessButtonDownEvent(
+ rDescriptor.mpHitDescriptor,
+ rDescriptor.maMouseModelPosition);
+ return true;
+
+ default:
+ return false;
+ }
+}
- // Make sure that the substitution and the insertion indicator are visible.
- if ( ! rOverlay.GetSubstitutionOverlay().isVisible())
- break;
- if ( ! rOverlay.GetInsertionIndicatorOverlay().isVisible())
- break;
- // Iterate over all selected pages and check whether there are
- // holes. While we do this we remember the indices of the first and
- // last selected page as preparation for the next step.
- sal_Int32 nCurrentIndex = -1;
- sal_Int32 nFirstIndex = -1;
- sal_Int32 nLastIndex = -1;
- model::PageEnumeration aSelectedPages (
- model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
- mrSlideSorter.GetModel()));
- while (aSelectedPages.HasMoreElements() && ! bIsNonTrivial)
- {
- model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
- SdPage* pPage = pDescriptor->GetPage();
- if (pPage != NULL)
- {
- // Get the page number and compare it to the last one.
- sal_Int32 nPageNumber = (pPage->GetPageNum()-1)/2;
- if (nCurrentIndex>=0 && nPageNumber>(nCurrentIndex+1))
- bIsNonTrivial = true;
- else
- nCurrentIndex = nPageNumber;
- // Remember indices of the first and last page of the selection.
- if (nFirstIndex == -1)
- nFirstIndex = nPageNumber;
- nLastIndex = nPageNumber;
- }
- }
- if (bIsNonTrivial)
- break;
- // When we come here then the selection is consecutive. We still
- // have to check that the insertion position is not directly in
- // front or directly behind the selection and thus moving the
- // selection there would not change the model.
- sal_Int32 nInsertionIndex = rOverlay.GetInsertionIndicatorOverlay().GetInsertionPageIndex();
- if (nInsertionIndex<nFirstIndex || nInsertionIndex>(nLastIndex+1))
- bIsNonTrivial = true;
+bool ButtonModeHandler::ProcessButtonUpEvent (SelectionFunction::EventDescriptor& rDescriptor)
+{
+ switch (rDescriptor.mnEventCode & BUTTON_MASK)
+ {
+ case LEFT_BUTTON:
+ mrSlideSorter.GetView().GetButtonBar().ProcessButtonUpEvent(
+ rDescriptor.mpHitDescriptor,
+ rDescriptor.maMouseModelPosition);
+ mrSelectionFunction.SwitchToNormalMode();
+ return true;
}
- while (false);
- return bIsNonTrivial;
+ return false;
}
+
+
+
+bool ButtonModeHandler::ProcessMotionEvent (SelectionFunction::EventDescriptor& rDescriptor)
+{
+ switch (rDescriptor.mnEventCode & (MOUSE_MOTION | BUTTON_MASK))
+ {
+ case MOUSE_MOTION | LEFT_BUTTON:
+ mrSlideSorter.GetView().GetButtonBar().ProcessMouseMotionEvent(
+ rDescriptor.mpHitDescriptor,
+ rDescriptor.maMouseModelPosition,
+ true);
+ return true;
+
+ case MOUSE_MOTION:
+ mrSlideSorter.GetView().GetButtonBar().ProcessMouseMotionEvent(
+ rDescriptor.mpHitDescriptor,
+ rDescriptor.maMouseModelPosition,
+ false);
+ return true;
+ }
+
+ return false;
+}
+
+
+
+
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
index f1b4cb6c39be..d9062a4ef2b1 100755
--- a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
@@ -30,18 +30,22 @@
#include "controller/SlsSelectionManager.hxx"
#include "SlideSorter.hxx"
-#include "SlsSelectionCommand.hxx"
+#include "SlsCommand.hxx"
#include "controller/SlideSorterController.hxx"
#include "controller/SlsAnimator.hxx"
+#include "controller/SlsAnimationFunction.hxx"
#include "controller/SlsCurrentSlideManager.hxx"
#include "controller/SlsFocusManager.hxx"
+#include "controller/SlsPageSelector.hxx"
#include "controller/SlsProperties.hxx"
#include "controller/SlsScrollBarManager.hxx"
#include "controller/SlsSlotManager.hxx"
+#include "controller/SlsSelectionObserver.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "view/SlideSorterView.hxx"
+#include "view/SlsLayouter.hxx"
#include "drawdoc.hxx"
#include "Window.hxx"
#include <svx/svxids.hrc>
@@ -65,39 +69,24 @@ using namespace ::sd::slidesorter::controller;
namespace sd { namespace slidesorter { namespace controller {
-namespace {
- class VerticalVisibleAreaScroller
- {
- public:
- VerticalVisibleAreaScroller (SlideSorter& rSlideSorter,
- const double nStart, const double nEnd);
- void operator() (const double nValue);
- private:
- SlideSorter& mrSlideSorter;
- double mnStart;
- double mnEnd;
- };
- class HorizontalVisibleAreaScroller
- {
- public:
- HorizontalVisibleAreaScroller (SlideSorter& rSlideSorter,
- const double nStart, const double nEnd);
- void operator() (const double nValue);
- private:
- SlideSorter& mrSlideSorter;
- double mnStart;
- double mnEnd;
- };
-}
-
+class SelectionManager::PageInsertionListener
+ : public SfxListener
+{
+public:
+};
SelectionManager::SelectionManager (SlideSorter& rSlideSorter)
: mrSlideSorter(rSlideSorter),
mrController(rSlideSorter.GetController()),
maSelectionBeforeSwitch(),
- mbIsMakeSelectionVisiblePending(true)
+ mbIsMakeSelectionVisiblePending(true),
+ mnInsertionPosition(-1),
+ mnAnimationId(Animator::NotAnAnimationId),
+ maRequestedTopLeft(),
+ mpPageInsertionListener(),
+ mpSelectionObserver(new SelectionObserver(rSlideSorter))
{
}
@@ -106,14 +95,20 @@ SelectionManager::SelectionManager (SlideSorter& rSlideSorter)
SelectionManager::~SelectionManager (void)
{
+ if (mnAnimationId != Animator::NotAnAnimationId)
+ mrController.GetAnimator()->RemoveAnimation(mnAnimationId);
}
-void SelectionManager::DeleteSelectedPages (void)
+void SelectionManager::DeleteSelectedPages (const bool bSelectFollowingPage)
{
+ // Create some locks to prevent updates of the model, view, selection
+ // state while modifying any of them.
SlideSorterController::ModelChangeLock aLock (mrController);
+ SlideSorterView::DrawLock aDrawLock (mrSlideSorter);
+ PageSelector::UpdateLock aSelectionLock (mrSlideSorter);
// Hide focus.
bool bIsFocusShowing = mrController.GetFocusManager().IsFocusShowing();
@@ -125,8 +120,23 @@ void SelectionManager::DeleteSelectedPages (void)
model::PageEnumeration aPageEnumeration (
PageEnumerationProvider::CreateSelectedPagesEnumeration(mrSlideSorter.GetModel()));
::std::vector<SdPage*> aSelectedPages;
+ sal_Int32 nNewCurrentSlide (-1);
while (aPageEnumeration.HasMoreElements())
- aSelectedPages.push_back (aPageEnumeration.GetNextElement()->GetPage());
+ {
+ SharedPageDescriptor pDescriptor (aPageEnumeration.GetNextElement());
+ aSelectedPages.push_back(pDescriptor->GetPage());
+ if (bSelectFollowingPage || nNewCurrentSlide<0)
+ nNewCurrentSlide = pDescriptor->GetPageIndex();
+ }
+ if (aSelectedPages.empty())
+ return;
+
+ // Determine the slide to select (and thereby make the current slide)
+ // after the deletion.
+ if (bSelectFollowingPage)
+ nNewCurrentSlide -= aSelectedPages.size() - 1;
+ else
+ --nNewCurrentSlide;
// The actual deletion of the selected pages is done in one of two
// helper functions. They are specialized for normal respectively for
@@ -143,8 +153,16 @@ void SelectionManager::DeleteSelectedPages (void)
// Show focus and move it to next valid location.
if (bIsFocusShowing)
- mrController.GetFocusManager().ToggleFocus ();
- mrController.GetFocusManager().MoveFocus (FocusManager::FMD_NONE);
+ mrController.GetFocusManager().ToggleFocus();
+
+ // Set the new current slide.
+ if (nNewCurrentSlide < 0)
+ nNewCurrentSlide = 0;
+ else if (nNewCurrentSlide >= mrSlideSorter.GetModel().GetPageCount())
+ nNewCurrentSlide = mrSlideSorter.GetModel().GetPageCount()-1;
+ mrController.GetPageSelector().CountSelectedPages();
+ mrController.GetPageSelector().SelectPage(nNewCurrentSlide);
+ mrController.GetFocusManager().SetFocusedPage(nNewCurrentSlide);
}
@@ -171,7 +189,7 @@ void SelectionManager::DeleteSelectedNormalPages (const ::std::vector<SdPage*>&
if (xPages->getCount() <= 1)
break;
- USHORT nPage = ((*aI)->GetPageNum()-1) / 2;
+ const USHORT nPage (model::FromCoreIndex((*aI)->GetPageNum()));
Reference< XDrawPage > xPage( xPages->getByIndex( nPage ), UNO_QUERY_THROW );
xPages->remove(xPage);
@@ -207,7 +225,7 @@ void SelectionManager::DeleteSelectedMasterPages (const ::std::vector<SdPage*>&
if (xPages->getCount() <= 1)
break;
- USHORT nPage = ((*aI)->GetPageNum()-1) / 2;
+ const USHORT nPage (model::FromCoreIndex((*aI)->GetPageNum()));
Reference< XDrawPage > xPage( xPages->getByIndex( nPage ), UNO_QUERY_THROW );
xPages->remove(xPage);
@@ -222,60 +240,6 @@ void SelectionManager::DeleteSelectedMasterPages (const ::std::vector<SdPage*>&
-bool SelectionManager::MoveSelectedPages (const sal_Int32 nTargetPageIndex)
-{
- bool bMoved (false);
- PageSelector& rSelector (mrController.GetPageSelector());
-
- mrSlideSorter.GetView().LockRedraw (TRUE);
- SlideSorterController::ModelChangeLock aLock (mrController);
-
- // Transfer selection of the slide sorter to the document.
- mrSlideSorter.GetModel().SynchronizeDocumentSelection ();
-
- // Detect how many pages lie between document start and insertion
- // position.
- sal_Int32 nPageCountBeforeTarget (0);
- ::boost::shared_ptr<PageSelector::PageSelection> pSelection (rSelector.GetPageSelection());
- PageSelector::PageSelection::const_iterator iSelectedPage (pSelection->begin());
- PageSelector::PageSelection::const_iterator iSelectionEnd (pSelection->end());
- for ( ; iSelectedPage!=iSelectionEnd; ++iSelectedPage)
- {
- if (*iSelectedPage==NULL)
- continue;
- if (((*iSelectedPage)->GetPageNum()-1)/2 <= nTargetPageIndex)
- ++nPageCountBeforeTarget;
- else
- break;
- }
-
- // Prepare to select the moved pages.
- SelectionCommand* pCommand = new SelectionCommand(
- rSelector,mrController.GetCurrentSlideManager(),mrSlideSorter.GetModel());
- sal_Int32 nSelectedPageCount (rSelector.GetSelectedPageCount());
- for (sal_Int32 nOffset=0; nOffset<nSelectedPageCount; ++nOffset)
- pCommand->AddSlide(sal::static_int_cast<USHORT>(
- nTargetPageIndex + nOffset - nPageCountBeforeTarget + 1));
-
- // At the moment we can not move master pages.
- if (nTargetPageIndex>=0)
- {
- if (mrSlideSorter.GetModel().GetEditMode() == EM_PAGE)
- bMoved = mrSlideSorter.GetModel().GetDocument()->MovePages(
- sal::static_int_cast<sal_uInt16>(nTargetPageIndex));
- }
- if (bMoved)
- mrController.GetSlotManager()->ExecuteCommandAsynchronously(
- ::std::auto_ptr<controller::Command>(pCommand));
-
- mrSlideSorter.GetView().LockRedraw (FALSE);
-
- return bMoved;
-}
-
-
-
-
void SelectionManager::SelectionHasChanged (const bool bMakeSelectionVisible)
{
if (bMakeSelectionVisible)
@@ -318,166 +282,6 @@ void SelectionManager::SelectionHasChanged (const bool bMakeSelectionVisible)
-bool SelectionManager::IsMakeSelectionVisiblePending (void) const
-{
- return mbIsMakeSelectionVisiblePending;
-}
-
-
-
-
-/** We have to distinguish three cases: 1) the selection is empty, 2) the
- selection fits completely into the visible area, 3) it does not.
- 1) The visible area is not modified.
- 2) When the selection fits completely into the visible area we have to
- decide how to align it. It is done by scrolling it there and thus when
- we scoll up the (towards the end of the document) the bottom of the
- selection is aligned with the bottom of the window. When we scroll
- down (towards the beginning of the document) the top of the selection is
- aligned with the top of the window.
- 3) We have to decide what part of the selection to make visible. Here
- we use the eSelectionHint and concentrate on either the first, the last,
- or the most recently selected page. We then again apply the algorithm
- of a).
-
-*/
-Size SelectionManager::MakeSelectionVisible (const SelectionHint eSelectionHint)
-{
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- if (pWindow == NULL)
- return Size(0,0);
-
- mbIsMakeSelectionVisiblePending = false;
-
- // Determine the descriptors of the first and last selected page and the
- // bounding box that encloses their page objects.
- model::SharedPageDescriptor pFirst;
- model::SharedPageDescriptor pLast;
- Rectangle aSelectionBox;
- model::PageEnumeration aSelectedPages (
- PageEnumerationProvider::CreateSelectedPagesEnumeration(mrSlideSorter.GetModel()));
- while (aSelectedPages.HasMoreElements())
- {
- model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
-
- if (pFirst.get() == NULL)
- pFirst = pDescriptor;
- pLast = pDescriptor;
-
- aSelectionBox.Union (mrSlideSorter.GetView().GetPageBoundingBox (
- pDescriptor,
- view::SlideSorterView::CS_MODEL,
- view::SlideSorterView::BBT_INFO));
- }
-
- if (pFirst != NULL)
- {
- // Determine scroll direction and the position in model coordinates
- // that will be aligned with the top/left or bottom/right window
- // border.
- if (DoesSelectionExceedVisibleArea(aSelectionBox))
- {
- // We can show only a part of the selection.
- aSelectionBox = ResolveLargeSelection(pFirst,pLast, eSelectionHint);
- }
-
- return MakeRectangleVisible(aSelectionBox);
- }
-
- return Size(0,0);
-}
-
-
-
-
-Size SelectionManager::MakeRectangleVisible (const Rectangle& rBox)
-{
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- if (pWindow == NULL)
- return Size(0,0);
-
- Rectangle aVisibleArea (pWindow->PixelToLogic(
- Rectangle(
- Point(0,0),
- pWindow->GetOutputSizePixel())));
-
- if (mrSlideSorter.GetView().GetOrientation() == SlideSorterView::VERTICAL)
- {
- // Scroll the visible area to make aSelectionBox visible.
- sal_Int32 nNewTop (aVisibleArea.Top());
- if (mrSlideSorter.GetController().GetProperties()->IsCenterSelection())
- {
- nNewTop = rBox.Top() - (aVisibleArea.GetHeight() - rBox.GetHeight()) / 2;
- }
- else
- {
- if (rBox.Top() < aVisibleArea.Top())
- nNewTop = rBox.Top();
- else if (rBox.Bottom() > aVisibleArea.Bottom())
- nNewTop = rBox.Bottom() - aVisibleArea.GetHeight();
- // otherwise we do not modify the visible area.
- }
-
- // Make some corrections of the new visible area.
- Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea());
- if (nNewTop + aVisibleArea.GetHeight() > aModelArea.Bottom())
- nNewTop = aModelArea.GetHeight() - aVisibleArea.GetHeight();
- if (nNewTop < aModelArea.Top())
- nNewTop = aModelArea.Top();
-
- // Scroll.
- if (nNewTop != aVisibleArea.Top())
- {
- mrController.GetAnimator()->AddAnimation(
- VerticalVisibleAreaScroller(mrSlideSorter, aVisibleArea.Top(), nNewTop),
- mrSlideSorter.GetController().GetProperties()->IsSmoothSelectionScrolling() ?
- 1000 : 0
- );
- }
-
- return Size(0,aVisibleArea.Top() - nNewTop);
- }
- else
- {
- // Scroll the visible area to make aSelectionBox visible.
- sal_Int32 nNewLeft (aVisibleArea.Left());
- if (mrSlideSorter.GetController().GetProperties()->IsCenterSelection())
- {
- nNewLeft = rBox.Left() - (aVisibleArea.GetWidth() - rBox.GetWidth()) / 2;
- }
- else
- {
- if (rBox.Left() < aVisibleArea.Left())
- nNewLeft = rBox.Left();
- else if (rBox.Right() > aVisibleArea.Right())
- nNewLeft = rBox.Right() - aVisibleArea.GetWidth();
- // otherwise we do not modify the visible area.
- }
-
- // Make some corrections of the new visible area.
- Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea());
- if (nNewLeft + aVisibleArea.GetWidth() > aModelArea.Right())
- nNewLeft = aModelArea.GetWidth() - aVisibleArea.GetWidth();
- if (nNewLeft < aModelArea.Left())
- nNewLeft = aModelArea.Left();
-
- // Scroll.
- if (nNewLeft != aVisibleArea.Left())
- {
- mrController.GetAnimator()->AddAnimation(
- HorizontalVisibleAreaScroller(mrSlideSorter, aVisibleArea.Left(), nNewLeft),
- mrSlideSorter.GetController().GetProperties()->IsSmoothSelectionScrolling() ?
- 1000 : 0
- );
- }
-
- return Size(aVisibleArea.Left() - nNewLeft, 0);
- }
-}
-
-
-
-
void SelectionManager::AddSelectionChangeListener (const Link& rListener)
{
if (::std::find (
@@ -504,70 +308,6 @@ void SelectionManager::RemoveSelectionChangeListener(const Link&rListener)
-bool SelectionManager::DoesSelectionExceedVisibleArea (const Rectangle& rSelectionBox) const
-{
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- if (pWindow == NULL)
- return true;
-
- Rectangle aVisibleArea (pWindow->PixelToLogic(
- Rectangle(
- Point(0,0),
- pWindow->GetOutputSizePixel())));
- if (mrSlideSorter.GetView().GetOrientation() == SlideSorterView::VERTICAL)
- return rSelectionBox.GetHeight() > aVisibleArea.GetHeight();
- else
- return rSelectionBox.GetWidth() > aVisibleArea.GetWidth();
-}
-
-
-
-
-Rectangle SelectionManager::ResolveLargeSelection (
- const SharedPageDescriptor& rpFirst,
- const SharedPageDescriptor& rpLast,
- const SelectionHint eSelectionHint)
-{
- OSL_ASSERT(rpFirst.get()!=NULL);
- OSL_ASSERT(rpLast.get()!=NULL);
-
- // The mose recently selected page is assumed to lie in the range
- // between first and last selected page. Therefore the bounding box is
- // not modified.
- model::SharedPageDescriptor pRecent (
- mrController.GetPageSelector().GetMostRecentlySelectedPage());
-
- // Get the bounding box of the page object on which to concentrate.
- model::SharedPageDescriptor pRepresentative;
- switch (eSelectionHint)
- {
- case SH_FIRST:
- pRepresentative = rpFirst;
- break;
-
- case SH_LAST:
- pRepresentative = rpLast;
- break;
-
- case SH_RECENT:
- default:
- if (pRecent.get() == NULL)
- pRepresentative = rpFirst;
- else
- pRepresentative = pRecent;
- break;
- }
- OSL_ASSERT(pRepresentative.get() != NULL);
-
- return mrSlideSorter.GetView().GetPageBoundingBox (
- pRepresentative,
- view::SlideSorterView::CS_MODEL,
- view::SlideSorterView::BBT_INFO);
-}
-
-
-
-
sal_Int32 SelectionManager::GetInsertionPosition (void) const
{
sal_Int32 nInsertionPosition (mnInsertionPosition);
@@ -584,7 +324,7 @@ sal_Int32 SelectionManager::GetInsertionPosition (void) const
const sal_Int32 nPosition (aSelectedPages.GetNextElement()->GetPage()->GetPageNum());
// Convert *2+1 index to straight index (n-1)/2 after the page
// (+1).
- nInsertionPosition = (nPosition-1)/2 + 1;
+ nInsertionPosition = model::FromCoreIndex(nPosition) + 1;
}
}
@@ -611,52 +351,9 @@ void SelectionManager::SetInsertionPosition (const sal_Int32 nInsertionPosition)
-//===== VerticalVisibleAreaScroller ===========================================
-
-namespace {
-
-VerticalVisibleAreaScroller::VerticalVisibleAreaScroller (
- SlideSorter& rSlideSorter,
- const double nStart,
- const double nEnd)
- : mrSlideSorter(rSlideSorter),
- mnStart(nStart),
- mnEnd(nEnd)
+::boost::shared_ptr<SelectionObserver> SelectionManager::GetSelectionObserver (void) const
{
+ return mpSelectionObserver;
}
-
-
-void VerticalVisibleAreaScroller::operator() (const double nValue)
-{
- mrSlideSorter.GetView().InvalidatePageObjectVisibilities();
- mrSlideSorter.GetController().GetScrollBarManager().SetTop(
- int(mnStart * (1.0 - nValue) + mnEnd * nValue));
-}
-
-
-
-
-HorizontalVisibleAreaScroller::HorizontalVisibleAreaScroller (
- SlideSorter& rSlideSorter,
- const double nStart,
- const double nEnd)
- : mrSlideSorter(rSlideSorter),
- mnStart(nStart),
- mnEnd(nEnd)
-{
-}
-
-
-
-
-void HorizontalVisibleAreaScroller::operator() (const double nValue)
-{
- mrSlideSorter.GetView().InvalidatePageObjectVisibilities();
- mrSlideSorter.GetController().GetScrollBarManager().SetLeft(
- int(mnStart * (1.0 - nValue) + mnEnd * nValue));
-}
-
-} // end of anonymous namespace
-
} } } // end of namespace ::sd::slidesorter
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
new file mode 100644
index 000000000000..b40bd667131c
--- /dev/null
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
@@ -0,0 +1,173 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "SlideSorter.hxx"
+#include "controller/SlideSorterController.hxx"
+#include "controller/SlsSelectionManager.hxx"
+#include "controller/SlsSelectionObserver.hxx"
+#include "controller/SlsPageSelector.hxx"
+#include "controller/SlsFocusManager.hxx"
+#include "model/SlideSorterModel.hxx"
+#include "model/SlsPageDescriptor.hxx"
+#include <svx/svdmodel.hxx>
+#include "drawdoc.hxx"
+
+
+namespace sd { namespace slidesorter { namespace controller {
+
+SelectionObserver::Context::Context (SlideSorter& rSlideSorter)
+ : mpSelectionObserver(
+ rSlideSorter.GetController().GetSelectionManager()->GetSelectionObserver())
+{
+ if (mpSelectionObserver)
+ mpSelectionObserver->StartObservation();
+}
+
+
+
+
+SelectionObserver::Context::~Context(void)
+{
+ if (mpSelectionObserver)
+ mpSelectionObserver->EndObservation();
+}
+
+
+
+
+void SelectionObserver::Context::Abort(void)
+{
+ if (mpSelectionObserver)
+ {
+ mpSelectionObserver->AbortObservation();
+ mpSelectionObserver.reset();
+ }
+}
+
+
+
+
+//===== SelectionObserver =====================================================
+
+SelectionObserver::SelectionObserver (SlideSorter& rSlideSorter)
+ : mrSlideSorter(rSlideSorter),
+ mpDocument(mrSlideSorter.GetModel().GetDocument()),
+ mbIsOvservationActive(false),
+ maInsertedPages(),
+ maDeletedPages()
+{
+}
+
+
+
+
+SelectionObserver::~SelectionObserver (void)
+{
+}
+
+
+
+
+void SelectionObserver::NotifyPageEvent (const SdrPage* pSdrPage)
+{
+ if ( ! mbIsOvservationActive)
+ return;
+
+ const SdPage* pPage = dynamic_cast<const SdPage*>(pSdrPage);
+ if (pPage == NULL)
+ return;
+
+ if (pPage->IsInserted())
+ maInsertedPages.push_back(pPage);
+ else
+ {
+ ::std::vector<const SdPage*>::iterator iPage(
+ ::std::find(maInsertedPages.begin(), maInsertedPages.end(), pPage));
+ if (iPage != maInsertedPages.end())
+ maInsertedPages.erase(iPage);
+
+ maDeletedPages.push_back(pPage->GetPageNum());
+ }
+}
+
+
+
+void SelectionObserver::StartObservation (void)
+{
+ OSL_ASSERT(!mbIsOvservationActive);
+ maInsertedPages.clear();
+ maDeletedPages.clear();
+ mbIsOvservationActive = true;
+}
+
+
+
+
+void SelectionObserver::AbortObservation (void)
+{
+ OSL_ASSERT(mbIsOvservationActive);
+ mbIsOvservationActive = false;
+ maInsertedPages.clear();
+ maDeletedPages.clear();
+}
+
+
+
+
+void SelectionObserver::EndObservation (void)
+{
+ OSL_ASSERT(mbIsOvservationActive);
+ mbIsOvservationActive = false;
+
+ PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector());
+ PageSelector::UpdateLock aUpdateLock (mrSlideSorter);
+ rSelector.DeselectAllPages();
+ if ( ! maInsertedPages.empty())
+ {
+ // Select the inserted pages.
+ for (::std::vector<const SdPage*>::const_iterator
+ iPage(maInsertedPages.begin()),
+ iEnd(maInsertedPages.end());
+ iPage!=iEnd;
+ ++iPage)
+ {
+ rSelector.SelectPage(*iPage);
+ }
+ maInsertedPages.clear();
+ }
+ maDeletedPages.clear();
+
+ aUpdateLock.Release();
+ mrSlideSorter.GetController().GetFocusManager().SetFocusedPageToCurrentPage();
+
+}
+
+
+
+} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx
index 7fe090ad5541..1af831c2ad8a 100755
--- a/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx
@@ -46,7 +46,7 @@ SlideFunction::SlideFunction (
SfxRequest& rRequest)
: FuPoor (
rSlideSorter.GetViewShell(),
- rSlideSorter.GetView().GetWindow(),
+ rSlideSorter.GetContentWindow().get(),
&rSlideSorter.GetView(),
rSlideSorter.GetModel().GetDocument(),
rRequest)
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index e571a765bdad..ded7c2ebfdde 100755..100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -33,20 +33,20 @@
#include "SlideSorter.hxx"
#include "SlideSorterViewShell.hxx"
#include "controller/SlideSorterController.hxx"
-#include "controller/SlsPageSelector.hxx"
#include "controller/SlsClipboard.hxx"
-#include "controller/SlsSelectionFunction.hxx"
-#include "controller/SlsFocusManager.hxx"
#include "controller/SlsCurrentSlideManager.hxx"
+#include "controller/SlsFocusManager.hxx"
+#include "controller/SlsInsertionIndicatorHandler.hxx"
+#include "controller/SlsPageSelector.hxx"
+#include "controller/SlsSelectionFunction.hxx"
#include "controller/SlsSelectionManager.hxx"
-#include "SlsHideSlideFunction.hxx"
+#include "controller/SlsSelectionObserver.hxx"
#include "SlsCommand.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "view/SlideSorterView.hxx"
#include "view/SlsLayouter.hxx"
-#include "view/SlsViewOverlay.hxx"
#include "framework/FrameworkHelper.hxx"
#include "Window.hxx"
#include "fupoor.hxx"
@@ -92,12 +92,30 @@
#include <com/sun/star/drawing/XDrawPages.hpp>
#include <vcl/svapp.hxx>
+#include <boost/bind.hpp>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::presentation;
namespace sd { namespace slidesorter { namespace controller {
+namespace {
+
+/** The state of a set of slides with respect to being excluded from the
+ slide show.
+*/
+enum SlideExclusionState {UNDEFINED, EXCLUDED, INCLUDED, MIXED};
+
+/** Return for the given set of slides whether they included are
+ excluded from the slide show.
+*/
+SlideExclusionState GetSlideExclusionState (model::PageEnumeration& rPageSet);
+
+} // end of anonymous namespace
+
+
+
SlotManager::SlotManager (SlideSorter& rSlideSorter)
: mrSlideSorter(rSlideSorter),
maCommandQueue()
@@ -133,8 +151,11 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
break;
case SID_HIDE_SLIDE:
+ ChangeSlideExclusionState(model::SharedPageDescriptor(), true);
+ break;
+
case SID_SHOW_SLIDE:
- HideSlideFunction::Create(mrSlideSorter, rRequest);
+ ChangeSlideExclusionState(model::SharedPageDescriptor(), false);
break;
case SID_PAGES_PER_ROW:
@@ -145,15 +166,16 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
if (pPagesPerRow != NULL)
{
sal_Int32 nColumnCount = pPagesPerRow->GetValue();
- // Force the given number of columns by setting the
- // minimal and maximal number of columns to the same
- // value.
+ // Force the given number of columns by setting
+ // the minimal and maximal number of columns to
+ // the same value.
mrSlideSorter.GetView().GetLayouter().SetColumnCount (
nColumnCount, nColumnCount);
// Force a repaint and re-layout.
pShell->ArrangeGUIElements ();
// Rearrange the UI-elements controlled by the
- // controller and force a rearrangement of the view.
+ // controller and force a rearrangement of the
+ // view.
mrSlideSorter.GetController().Rearrange(true);
}
}
@@ -167,11 +189,11 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_SLIDE_TRANSITIONS_PANEL:
{
- // Make the slide transition panel visible (expand it) in the
- // tool pane.
+ // Make the slide transition panel visible (expand it)
+ // in the tool pane.
if (mrSlideSorter.GetViewShellBase() != NULL)
- framework::FrameworkHelper::Instance(*mrSlideSorter.GetViewShellBase())
- ->RequestTaskPanel(sd::framework::FrameworkHelper::msSlideTransitionTaskPanelURL);
+ framework::FrameworkHelper::Instance(*mrSlideSorter.GetViewShellBase())
+ ->RequestTaskPanel(sd::framework::FrameworkHelper::msSlideTransitionTaskPanelURL);
rRequest.Ignore ();
break;
}
@@ -179,7 +201,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_PRESENTATION_DLG:
FuSlideShowDlg::Create (
pShell,
- mrSlideSorter.GetView().GetWindow(),
+ mrSlideSorter.GetContentWindow().get(),
&mrSlideSorter.GetView(),
pDocument,
rRequest);
@@ -188,16 +210,16 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_CUSTOMSHOW_DLG:
FuCustomShowDlg::Create (
pShell,
- mrSlideSorter.GetView().GetWindow(),
+ mrSlideSorter.GetContentWindow().get(),
&mrSlideSorter.GetView(),
pDocument,
rRequest);
- break;
+ break;
case SID_EXPAND_PAGE:
FuExpandPage::Create (
pShell,
- mrSlideSorter.GetView().GetWindow(),
+ mrSlideSorter.GetContentWindow().get(),
&mrSlideSorter.GetView(),
pDocument,
rRequest);
@@ -206,7 +228,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_SUMMARY_PAGE:
FuSummaryPage::Create (
pShell,
- mrSlideSorter.GetView().GetWindow(),
+ mrSlideSorter.GetContentWindow().get(),
&mrSlideSorter.GetView(),
pDocument,
rRequest);
@@ -218,17 +240,22 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
rRequest.Done();
break;
+ case SID_DUPLICATE_PAGE:
+ DuplicateSelectedSlides(rRequest);
+ rRequest.Done();
+ break;
+
case SID_DELETE_PAGE:
case SID_DELETE_MASTER_PAGE:
case SID_DELETE: // we need SID_CUT to handle the delete key
- // (DEL -> accelerator -> SID_CUT).
- if (mrSlideSorter.GetModel().GetPageCount() > 1)
- {
- mrSlideSorter.GetController().GetSelectionManager()->DeleteSelectedPages();
- }
+ // (DEL -> accelerator -> SID_CUT).
+ if (mrSlideSorter.GetModel().GetPageCount() > 1)
+ {
+ mrSlideSorter.GetController().GetSelectionManager()->DeleteSelectedPages();
+ }
- rRequest.Done();
- break;
+ rRequest.Done();
+ break;
case SID_RENAMEPAGE:
case SID_RENAME_MASTER_PAGE:
@@ -361,21 +388,33 @@ void SlotManager::FuSupport (SfxRequest& rRequest)
break;
}
- case SID_UNDO :
+ case SID_UNDO:
{
SlideSorterViewShell* pViewShell
= dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell());
if (pViewShell != NULL)
+ {
+ view::SlideSorterView::DrawLock aDrawLock (mrSlideSorter);
+ SlideSorterController::ModelChangeLock aModelLock (mrSlideSorter.GetController());
+ PageSelector::UpdateLock aUpdateLock (mrSlideSorter);
+ SelectionObserver::Context aContext (mrSlideSorter);
pViewShell->ImpSidUndo (FALSE, rRequest);
+ }
break;
}
- case SID_REDO :
+ case SID_REDO:
{
SlideSorterViewShell* pViewShell
= dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell());
if (pViewShell != NULL)
+ {
+ view::SlideSorterView::DrawLock aDrawLock (mrSlideSorter);
+ SlideSorterController::ModelChangeLock aModelLock (mrSlideSorter.GetController());
+ PageSelector::UpdateLock aUpdateLock (mrSlideSorter);
+ SelectionObserver::Context aContext (mrSlideSorter);
pViewShell->ImpSidRedo (FALSE, rRequest);
+ }
break;
}
@@ -477,7 +516,7 @@ void SlotManager::GetAttrState (SfxItemSet& rSet)
}
}
-void SlotManager::GetMenuState ( SfxItemSet& rSet)
+void SlotManager::GetMenuState (SfxItemSet& rSet)
{
EditMode eEditMode = mrSlideSorter.GetModel().GetEditMode();
ViewShell* pShell = mrSlideSorter.GetViewShell();
@@ -592,39 +631,48 @@ void SlotManager::GetMenuState ( SfxItemSet& rSet)
model::PageEnumeration aSelectedPages (
model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
mrSlideSorter.GetModel()));
- HideSlideFunction::ExclusionState eState (
- HideSlideFunction::GetExclusionState(aSelectedPages));
+ const SlideExclusionState eState (GetSlideExclusionState(aSelectedPages));
switch (eState)
{
- case HideSlideFunction::MIXED:
+ case MIXED:
// Show both entries.
break;
- case HideSlideFunction::EXCLUDED:
+ case EXCLUDED:
rSet.DisableItem(SID_HIDE_SLIDE);
break;
- case HideSlideFunction::INCLUDED:
+ case INCLUDED:
rSet.DisableItem(SID_SHOW_SLIDE);
break;
- case HideSlideFunction::UNDEFINED:
+ case UNDEFINED:
rSet.DisableItem(SID_HIDE_SLIDE);
rSet.DisableItem(SID_SHOW_SLIDE);
break;
}
}
+
PageKind ePageKind = mrSlideSorter.GetModel().GetPageType();
- if( (eEditMode == EM_MASTERPAGE) && (ePageKind != PK_HANDOUT ) )
+ if ((eEditMode == EM_MASTERPAGE) && (ePageKind != PK_HANDOUT))
{
rSet.DisableItem(SID_ASSIGN_LAYOUT);
}
- if( (eEditMode == EM_MASTERPAGE) || (ePageKind==PK_NOTES) )
+ if ((eEditMode == EM_MASTERPAGE) || (ePageKind==PK_NOTES))
{
rSet.DisableItem(SID_INSERTPAGE);
}
+
+ // Disable some slots when in master page mode.
+ if (eEditMode == EM_MASTERPAGE)
+ {
+ if (rSet.GetItemState(SID_INSERTPAGE) == SFX_ITEM_AVAILABLE)
+ rSet.DisableItem(SID_INSERTPAGE);
+ if (rSet.GetItemState(SID_DUPLICATE_PAGE) == SFX_ITEM_AVAILABLE)
+ rSet.DisableItem(SID_DUPLICATE_PAGE);
+ }
}
@@ -774,18 +822,22 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet)
model::PageEnumeration aSelectedPages (
model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
mrSlideSorter.GetModel()));
- pPage = aSelectedPages.GetNextElement()->GetPage();
- nFirstPage = pPage->GetPageNum()/2;
- pFirstPage = pPage;
-
- aPageStr += sal_Unicode(' ');
- aPageStr += String::CreateFromInt32( nFirstPage + 1 );
- aPageStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " / " ));
- aPageStr += String::CreateFromInt32(
- mrSlideSorter.GetModel().GetPageCount());
-
- aLayoutStr = pFirstPage->GetLayoutName();
- aLayoutStr.Erase( aLayoutStr.SearchAscii( SD_LT_SEPARATOR ) );
+ model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
+ if (pDescriptor)
+ {
+ pPage = pDescriptor->GetPage();
+ nFirstPage = pPage->GetPageNum()/2;
+ pFirstPage = pPage;
+
+ aPageStr += sal_Unicode(' ');
+ aPageStr += String::CreateFromInt32( nFirstPage + 1 );
+ aPageStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " / " ));
+ aPageStr += String::CreateFromInt32(
+ mrSlideSorter.GetModel().GetPageCount());
+
+ aLayoutStr = pFirstPage->GetLayoutName();
+ aLayoutStr.Erase( aLayoutStr.SearchAscii( SD_LT_SEPARATOR ) );
+ }
}
rSet.Put( SfxStringItem( SID_STATUS_PAGE, aPageStr ) );
@@ -836,7 +888,7 @@ void SlotManager::RenameSlide (void)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractSvxNameDialog* aNameDlg = pFact->CreateSvxNameDialog(
- mrSlideSorter.GetActiveWindow(),
+ mrSlideSorter.GetContentWindow().get(),
aPageName, aDescr);
DBG_ASSERT(aNameDlg, "Dialogdiet fail!");
aNameDlg->SetText( aTitle );
@@ -984,123 +1036,110 @@ bool SlotManager::RenameSlideFromDrawViewShell( USHORT nPageId, const String & r
*/
void SlotManager::InsertSlide (SfxRequest& rRequest)
{
- PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector());
- // The fallback insertion position is after the last slide.
- sal_Int32 nInsertionIndex (rSelector.GetPageCount() - 1);
- if (rSelector.GetSelectedPageCount() > 0)
+ const sal_Int32 nInsertionIndex (GetInsertionPosition());
+
+ PageSelector::BroadcastLock aBroadcastLock (mrSlideSorter);
+
+ SdPage* pNewPage = NULL;
+ if (mrSlideSorter.GetModel().GetEditMode() == EM_PAGE)
{
- // Deselect all but the last selected slide.
- bool bLastSelectedSlideSeen (false);
- for (int nIndex=rSelector.GetPageCount()-1; nIndex>=0; --nIndex)
+ SlideSorterViewShell* pShell = dynamic_cast<SlideSorterViewShell*>(
+ mrSlideSorter.GetViewShell());
+ if (pShell != NULL)
{
- if (rSelector.IsPageSelected(nIndex))
- {
- if (bLastSelectedSlideSeen)
- rSelector.DeselectPage (nIndex);
- else
- {
- nInsertionIndex = nIndex;
- bLastSelectedSlideSeen = true;
- }
- }
+ pNewPage = pShell->CreateOrDuplicatePage (
+ rRequest,
+ mrSlideSorter.GetModel().GetPageType(),
+ nInsertionIndex>=0
+ ? mrSlideSorter.GetModel().GetPageDescriptor(nInsertionIndex)->GetPage()
+ : NULL);
}
}
-
- // No selection. Is there an insertion indicator?
- else if (mrSlideSorter.GetView().GetOverlay()
- .GetInsertionIndicatorOverlay().isVisible())
- {
- // Select the page before the insertion indicator.
- nInsertionIndex = mrSlideSorter.GetView().GetOverlay()
- .GetInsertionIndicatorOverlay().GetInsertionPageIndex();
- nInsertionIndex --;
- rSelector.SelectPage (nInsertionIndex);
- }
-
- // Is there a stored insertion position?
- else if (mrSlideSorter.GetController().GetSelectionManager()->GetInsertionPosition() >= 0)
+ else
{
- nInsertionIndex
- = mrSlideSorter.GetController().GetSelectionManager()->GetInsertionPosition() - 1;
- rSelector.SelectPage(nInsertionIndex);
- }
+ // Use the API to create a new page.
+ SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
+ Reference<drawing::XMasterPagesSupplier> xMasterPagesSupplier (
+ pDocument->getUnoModel(), UNO_QUERY);
+ if (xMasterPagesSupplier.is())
+ {
+ Reference<drawing::XDrawPages> xMasterPages (
+ xMasterPagesSupplier->getMasterPages());
+ if (xMasterPages.is())
+ {
+ xMasterPages->insertNewByIndex (nInsertionIndex+1);
- // Select the last page when there is at least one page.
- else if (rSelector.GetPageCount() > 0)
- {
- nInsertionIndex = rSelector.GetPageCount() - 1;
- rSelector.SelectPage (nInsertionIndex);
+ // Create shapes for the default layout.
+ pNewPage = pDocument->GetMasterSdPage(
+ (USHORT)(nInsertionIndex+1), PK_STANDARD);
+ pNewPage->CreateTitleAndLayout (TRUE,TRUE);
+ }
+ }
}
+ if (pNewPage == NULL)
+ return;
- // Hope for the best that CreateOrDuplicatePage() can cope with an empty
- // selection.
- else
- {
- nInsertionIndex = -1;
- }
+ // When a new page has been inserted then select it, make it the
+ // current page, and focus it.
+ view::SlideSorterView::DrawLock aDrawLock (mrSlideSorter);
+ PageSelector::UpdateLock aUpdateLock (mrSlideSorter);
+ mrSlideSorter.GetController().GetPageSelector().DeselectAllPages();
+ mrSlideSorter.GetController().GetPageSelector().SelectPage(pNewPage);
+}
- USHORT nPageCount ((USHORT)mrSlideSorter.GetModel().GetPageCount());
- rSelector.DisableBroadcasting();
- // In order for SlideSorterController::GetActualPage() to select the
- // selected page as current page we have to turn off the focus
- // temporarily.
- {
- FocusManager::FocusHider aTemporaryFocusHider (
- mrSlideSorter.GetController().GetFocusManager());
- SdPage* pPreviousPage = NULL;
- if (nInsertionIndex >= 0)
- pPreviousPage = mrSlideSorter.GetModel()
- .GetPageDescriptor(nInsertionIndex)->GetPage();
- if (mrSlideSorter.GetModel().GetEditMode() == EM_PAGE)
- {
- SlideSorterViewShell* pShell = dynamic_cast<SlideSorterViewShell*>(
- mrSlideSorter.GetViewShell());
- if (pShell != NULL)
- {
- pShell->CreateOrDuplicatePage (
- rRequest,
- mrSlideSorter.GetModel().GetPageType(),
- pPreviousPage);
- }
- }
- else
+void SlotManager::DuplicateSelectedSlides (SfxRequest& rRequest)
+{
+ // Create a list of the pages that are to be duplicated. The process of
+ // duplication alters the selection.
+ sal_Int32 nInsertPosition (0);
+ ::std::vector<SdPage*> aPagesToDuplicate;
+ model::PageEnumeration aSelectedPages (
+ model::PageEnumerationProvider::CreateSelectedPagesEnumeration(mrSlideSorter.GetModel()));
+ while (aSelectedPages.HasMoreElements())
+ {
+ model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
+ if (pDescriptor && pDescriptor->GetPage())
{
- // Use the API to create a new page.
- SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
- Reference<drawing::XMasterPagesSupplier> xMasterPagesSupplier (
- pDocument->getUnoModel(), UNO_QUERY);
- if (xMasterPagesSupplier.is())
- {
- Reference<drawing::XDrawPages> xMasterPages (
- xMasterPagesSupplier->getMasterPages());
- if (xMasterPages.is())
- {
- xMasterPages->insertNewByIndex (nInsertionIndex+1);
-
- // Create shapes for the default layout.
- SdPage* pMasterPage = pDocument->GetMasterSdPage(
- (USHORT)(nInsertionIndex+1), PK_STANDARD);
- pMasterPage->CreateTitleAndLayout (TRUE,TRUE);
- }
- }
+ aPagesToDuplicate.push_back(pDescriptor->GetPage());
+ nInsertPosition = pDescriptor->GetPage()->GetPageNum()+2;
}
}
- // When a new page has been inserted then select it and make it the
- // current page.
- mrSlideSorter.GetView().LockRedraw(TRUE);
- if (mrSlideSorter.GetModel().GetPageCount() > nPageCount)
+ // Duplicate the pages in aPagesToDuplicate and collect the newly
+ // created pages in aPagesToSelect.
+ const bool bUndo (aPagesToDuplicate.size()>1 && mrSlideSorter.GetView().IsUndoEnabled());
+ if (bUndo)
+ mrSlideSorter.GetView().BegUndo(String(SdResId(STR_INSERTPAGE)));
+
+ ::std::vector<SdPage*> aPagesToSelect;
+ for(::std::vector<SdPage*>::const_iterator
+ iPage(aPagesToDuplicate.begin()),
+ iEnd(aPagesToDuplicate.end());
+ iPage!=iEnd;
+ ++iPage, nInsertPosition+=2)
{
- nInsertionIndex++;
- model::SharedPageDescriptor pDescriptor = mrSlideSorter.GetModel().GetPageDescriptor(nInsertionIndex);
- if (pDescriptor.get() != NULL)
- mrSlideSorter.GetController().GetCurrentSlideManager()->SwitchCurrentSlide(pDescriptor);
+ aPagesToSelect.push_back(
+ mrSlideSorter.GetViewShell()->CreateOrDuplicatePage(
+ rRequest, PK_STANDARD, *iPage, nInsertPosition));
}
- rSelector.EnableBroadcasting();
- mrSlideSorter.GetView().LockRedraw(FALSE);
+ aPagesToDuplicate.clear();
+
+ if (bUndo)
+ mrSlideSorter.GetView().EndUndo();
+
+ // Set the selection to the pages in aPagesToSelect.
+ PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector());
+ rSelector.DeselectAllPages();
+ ::std::for_each (
+ aPagesToSelect.begin(),
+ aPagesToSelect.end(),
+ ::boost::bind(
+ static_cast<void (PageSelector::*)(const SdPage*)>(&PageSelector::SelectPage),
+ rSelector,
+ _1));
}
void SlotManager::ExecuteCommandAsynchronously (::std::auto_ptr<Command> pCommand)
@@ -1130,5 +1169,154 @@ IMPL_LINK(SlotManager, UserEventCallback, void*, EMPTYARG)
return 1;
}
+
+
+
+void SlotManager::ChangeSlideExclusionState (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bExcludeSlide)
+{
+ if (rpDescriptor)
+ {
+ mrSlideSorter.GetView().SetState(
+ rpDescriptor,
+ model::PageDescriptor::ST_Excluded,
+ bExcludeSlide);
+ }
+ else
+ {
+ model::PageEnumeration aSelectedPages (
+ model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
+ mrSlideSorter.GetModel()));
+ while (aSelectedPages.HasMoreElements())
+ {
+ model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
+ mrSlideSorter.GetView().SetState(
+ pDescriptor,
+ model::PageDescriptor::ST_Excluded,
+ bExcludeSlide);
+ }
+ }
+
+ SfxBindings& rBindings (mrSlideSorter.GetViewShell()->GetViewFrame()->GetBindings());
+ rBindings.Invalidate(SID_PRESENTATION);
+ rBindings.Invalidate(SID_REHEARSE_TIMINGS);
+ rBindings.Invalidate(SID_HIDE_SLIDE);
+ rBindings.Invalidate(SID_SHOW_SLIDE);
+ mrSlideSorter.GetModel().GetDocument()->SetChanged();
+}
+
+
+
+
+sal_Int32 SlotManager::GetInsertionPosition (void)
+{
+ PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector());
+
+ // The insertion indicator is preferred. After all the user explicitly
+ // used it to define the insertion position.
+ if (mrSlideSorter.GetController().GetInsertionIndicatorHandler()->IsActive())
+ {
+ // Select the page before the insertion indicator.
+ return mrSlideSorter.GetController().GetInsertionIndicatorHandler()->GetInsertionPageIndex()
+ - 1;
+ }
+
+ // Is there a stored insertion position?
+ else if (mrSlideSorter.GetController().GetSelectionManager()->GetInsertionPosition() >= 0)
+ {
+ return mrSlideSorter.GetController().GetSelectionManager()->GetInsertionPosition() - 1;
+ }
+
+ // Use the index of the last selected slide.
+ else if (rSelector.GetSelectedPageCount() > 0)
+ {
+ for (int nIndex=rSelector.GetPageCount()-1; nIndex>=0; --nIndex)
+ if (rSelector.IsPageSelected(nIndex))
+ return nIndex;
+
+ // We should never get here.
+ OSL_ASSERT(false);
+ return rSelector.GetPageCount() - 1;
+ }
+
+ // Select the last page when there is at least one page.
+ else if (rSelector.GetPageCount() > 0)
+ {
+ return rSelector.GetPageCount() - 1;
+ }
+
+ // Hope for the best that CreateOrDuplicatePage() can cope with an empty
+ // selection.
+ else
+ {
+ // We should never get here because there has to be at least one page.
+ OSL_ASSERT(false);
+ return -1;
+ }
+}
+
+
+
+
+void SlotManager::NotifyEditModeChange (void)
+{
+ SfxBindings& rBindings (mrSlideSorter.GetViewShell()->GetViewFrame()->GetBindings());
+ rBindings.Invalidate(SID_PRESENTATION);
+ rBindings.Invalidate(SID_INSERTPAGE);
+ rBindings.Invalidate(SID_DUPLICATE_PAGE);
+}
+
+
+
+
+//-----------------------------------------------------------------------------
+
+namespace {
+
+
+
+SlideExclusionState GetSlideExclusionState (model::PageEnumeration& rPageSet)
+{
+ SlideExclusionState eState (UNDEFINED);
+ BOOL bState;
+
+ // Get toggle state of the selected pages.
+ while (rPageSet.HasMoreElements() && eState!=MIXED)
+ {
+ bState = rPageSet.GetNextElement()->GetPage()->IsExcluded();
+ switch (eState)
+ {
+ case UNDEFINED:
+ // Use the first selected page to set the inital value.
+ eState = bState ? EXCLUDED : INCLUDED;
+ break;
+
+ case EXCLUDED:
+ // The pages before where all not part of the show,
+ // this one is.
+ if ( ! bState)
+ eState = MIXED;
+ break;
+
+ case INCLUDED:
+ // The pages before where all part of the show,
+ // this one is not.
+ if (bState)
+ eState = MIXED;
+ break;
+
+ case MIXED:
+ default:
+ // No need to change anything.
+ break;
+ }
+ }
+
+ return eState;
+}
+
+} // end of anonymous namespace
+
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsTransferable.cxx b/sd/source/ui/slidesorter/controller/SlsTransferable.cxx
index 20ddc937469c..efda2eb1e4eb 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsTransferable.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsTransferable.cxx
@@ -28,7 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
-#include "SlsTransferable.hxx"
+#include "controller/SlsTransferable.hxx"
#include "SlideSorterViewShell.hxx"
#include "View.hxx"
@@ -39,9 +39,11 @@ Transferable::Transferable (
SdDrawDocument* pSrcDoc,
::sd::View* pWorkView,
BOOL bInitOnGetData,
- SlideSorterViewShell* pViewShell)
+ SlideSorterViewShell* pViewShell,
+ const ::std::vector<Representative>& rRepresentatives)
: SdTransferable (pSrcDoc, pWorkView, bInitOnGetData),
- mpViewShell(pViewShell)
+ mpViewShell(pViewShell),
+ maRepresentatives(rRepresentatives)
{
if (mpViewShell != NULL)
StartListening(*mpViewShell);
@@ -49,6 +51,7 @@ Transferable::Transferable (
+
Transferable::~Transferable (void)
{
if (mpViewShell != NULL)
@@ -89,4 +92,10 @@ void Transferable::Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint)
+const ::std::vector<Transferable::Representative>& Transferable::GetRepresentatives (void) const
+{
+ return maRepresentatives;
+}
+
+
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
new file mode 100644
index 000000000000..6a85192f8418
--- /dev/null
+++ b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
@@ -0,0 +1,301 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "controller/SlsVisibleAreaManager.hxx"
+#include "controller/SlideSorterController.hxx"
+#include "controller/SlsProperties.hxx"
+#include "controller/SlsAnimationFunction.hxx"
+#include "controller/SlsScrollBarManager.hxx"
+#include "controller/SlsCurrentSlideManager.hxx"
+
+
+namespace sd { namespace slidesorter { namespace controller {
+
+namespace {
+ class VisibleAreaScroller
+ {
+ public:
+ VisibleAreaScroller (
+ SlideSorter& rSlideSorter,
+ const Point aStart,
+ const Point aEnd);
+ void operator() (const double nValue);
+ private:
+ SlideSorter& mrSlideSorter;
+ Point maStart;
+ const Point maEnd;
+ const ::boost::function<double(double)> maAccelerationFunction;
+ };
+
+} // end of anonymous namespace
+
+
+
+VisibleAreaManager::VisibleAreaManager (SlideSorter& rSlideSorter)
+ : mrSlideSorter(rSlideSorter),
+ maVisibleRequests(),
+ mnScrollAnimationId(Animator::NotAnAnimationId),
+ maRequestedVisibleTopLeft(),
+ meRequestedAnimationMode(Animator::AM_Immediate),
+ mbIsCurrentSlideTrackingActive(true),
+ mnDisableCount(0)
+{
+}
+
+
+
+
+VisibleAreaManager::~VisibleAreaManager (void)
+{
+}
+
+
+
+
+void VisibleAreaManager::ActivateCurrentSlideTracking (void)
+{
+ mbIsCurrentSlideTrackingActive = true;
+}
+
+
+
+
+void VisibleAreaManager::DeactivateCurrentSlideTracking (void)
+{
+ mbIsCurrentSlideTrackingActive = false;
+}
+
+
+
+
+void VisibleAreaManager::RequestVisible (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bForce)
+{
+ if (rpDescriptor)
+ {
+ if (mnDisableCount == 0)
+ {
+ maVisibleRequests.push_back(
+ mrSlideSorter.GetView().GetLayouter().GetPageObjectBox(
+ rpDescriptor->GetPageIndex(),
+ true));
+ }
+ if (bForce && ! mbIsCurrentSlideTrackingActive)
+ ActivateCurrentSlideTracking();
+ MakeVisible();
+ }
+}
+
+
+
+
+void VisibleAreaManager::RequestCurrentSlideVisible (void)
+{
+ if (mbIsCurrentSlideTrackingActive && mnDisableCount==0)
+ RequestVisible(
+ mrSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide());
+}
+
+
+
+
+void VisibleAreaManager::MakeVisible (void)
+{
+ if (maVisibleRequests.empty())
+ return;
+
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if ( ! pWindow)
+ return;
+ const Point aCurrentTopLeft (pWindow->PixelToLogic(Point(0,0)));
+
+ const ::boost::optional<Point> aNewVisibleTopLeft (GetRequestedTopLeft());
+ maVisibleRequests.clear();
+ if ( ! aNewVisibleTopLeft)
+ return;
+
+ // We now know what the visible area shall be. Scroll accordingly
+ // unless that is not already the visible area or a running scroll
+ // animation has it as its target area.
+ if (mnScrollAnimationId!=Animator::NotAnAnimationId
+ && maRequestedVisibleTopLeft==aNewVisibleTopLeft)
+ return;
+
+ // Stop a running animation.
+ if (mnScrollAnimationId != Animator::NotAnAnimationId)
+ mrSlideSorter.GetController().GetAnimator()->RemoveAnimation(mnScrollAnimationId);
+
+ maRequestedVisibleTopLeft = aNewVisibleTopLeft.get();
+ VisibleAreaScroller aAnimation(
+ mrSlideSorter,
+ aCurrentTopLeft,
+ maRequestedVisibleTopLeft);
+ if (meRequestedAnimationMode==Animator::AM_Animated
+ && mrSlideSorter.GetProperties()->IsSmoothSelectionScrolling())
+ {
+ mnScrollAnimationId = mrSlideSorter.GetController().GetAnimator()->AddAnimation(
+ aAnimation,
+ 0,
+ 300);
+ }
+ else
+ {
+ // Execute the animation at its final value.
+ aAnimation(1.0);
+ }
+ meRequestedAnimationMode = Animator::AM_Immediate;
+}
+
+
+
+
+::boost::optional<Point> VisibleAreaManager::GetRequestedTopLeft (void) const
+{
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if ( ! pWindow)
+ return ::boost::optional<Point>();
+
+ // Get the currently visible area and the model area.
+ const Rectangle aVisibleArea (pWindow->PixelToLogic(
+ Rectangle(
+ Point(0,0),
+ pWindow->GetOutputSizePixel())));
+ const Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea());
+
+ sal_Int32 nVisibleTop (aVisibleArea.Top());
+ const sal_Int32 nVisibleWidth (aVisibleArea.GetWidth());
+ sal_Int32 nVisibleLeft (aVisibleArea.Left());
+ const sal_Int32 nVisibleHeight (aVisibleArea.GetHeight());
+
+ // Find the longest run of boxes whose union fits into the visible area.
+ Rectangle aBoundingBox;
+ for (::std::vector<Rectangle>::const_iterator
+ iBox(maVisibleRequests.begin()),
+ iEnd(maVisibleRequests.end());
+ iBox!=iEnd;
+ ++iBox)
+ {
+ if (nVisibleTop+nVisibleHeight <= iBox->Bottom())
+ nVisibleTop = iBox->Bottom()-nVisibleHeight;
+ if (nVisibleTop > iBox->Top())
+ nVisibleTop = iBox->Top();
+
+ if (nVisibleLeft+nVisibleWidth <= iBox->Right())
+ nVisibleLeft = iBox->Right()-nVisibleWidth;
+ if (nVisibleLeft > iBox->Left())
+ nVisibleLeft = iBox->Left();
+
+ // Make sure the visible area does not move outside the model area.
+ if (nVisibleTop + nVisibleHeight > aModelArea.Bottom())
+ nVisibleTop = aModelArea.Bottom() - nVisibleHeight;
+ if (nVisibleTop < aModelArea.Top())
+ nVisibleTop = aModelArea.Top();
+
+ if (nVisibleLeft + nVisibleWidth > aModelArea.Right())
+ nVisibleLeft = aModelArea.Right() - nVisibleWidth;
+ if (nVisibleLeft < aModelArea.Left())
+ nVisibleLeft = aModelArea.Left();
+ }
+
+ const Point aRequestedTopLeft (nVisibleLeft, nVisibleTop);
+ if (aRequestedTopLeft == aVisibleArea.TopLeft())
+ return ::boost::optional<Point>();
+ else
+ return ::boost::optional<Point>(aRequestedTopLeft);
+}
+
+
+
+
+//===== VisibleAreaManager::TemporaryDisabler =================================
+
+VisibleAreaManager::TemporaryDisabler::TemporaryDisabler (SlideSorter& rSlideSorter)
+ : mrVisibleAreaManager(rSlideSorter.GetController().GetVisibleAreaManager())
+{
+ ++mrVisibleAreaManager.mnDisableCount;
+}
+
+
+
+
+VisibleAreaManager::TemporaryDisabler::~TemporaryDisabler (void)
+{
+ --mrVisibleAreaManager.mnDisableCount;
+}
+
+
+
+//===== VerticalVisibleAreaScroller ===========================================
+
+namespace {
+
+const static sal_Int32 gnMaxScrollDistance = 300;
+
+VisibleAreaScroller::VisibleAreaScroller (
+ SlideSorter& rSlideSorter,
+ const Point aStart,
+ const Point aEnd)
+ : mrSlideSorter(rSlideSorter),
+ maStart(aStart),
+ maEnd(aEnd),
+ maAccelerationFunction(
+ controller::AnimationParametricFunction(
+ controller::AnimationBezierFunction (0.1,0.6)))
+{
+ // When the distance to scroll is larger than a threshold then first
+ // jump to within this distance of the final value and start the
+ // animation from there.
+ if (abs(aStart.X()-aEnd.X()) > gnMaxScrollDistance)
+ if (aStart.X() < aEnd.X())
+ maStart.X() = aEnd.X()-gnMaxScrollDistance;
+ else
+ maStart.X() = aEnd.X()+gnMaxScrollDistance;
+ if (abs(aStart.Y()-aEnd.Y()) > gnMaxScrollDistance)
+ if (aStart.Y() < aEnd.Y())
+ maStart.Y() = aEnd.Y()-gnMaxScrollDistance;
+ else
+ maStart.Y() = aEnd.Y()+gnMaxScrollDistance;
+}
+
+
+
+
+void VisibleAreaScroller::operator() (const double nTime)
+{
+ const double nLocalTime (maAccelerationFunction(nTime));
+ mrSlideSorter.GetController().GetScrollBarManager().SetTopLeft(
+ Point(
+ sal_Int32(0.5 + maStart.X() * (1.0 - nLocalTime) + maEnd.X() * nLocalTime),
+ sal_Int32 (0.5 + maStart.Y() * (1.0 - nLocalTime) + maEnd.Y() * nLocalTime)));
+}
+
+} // end of anonymous namespace
+
+} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/makefile.mk b/sd/source/ui/slidesorter/controller/makefile.mk
index 8ab63ddf776c..460ef16ed3f1 100644..100755
--- a/sd/source/ui/slidesorter/controller/makefile.mk
+++ b/sd/source/ui/slidesorter/controller/makefile.mk
@@ -45,25 +45,23 @@ PRJINC=..$/..
SLOFILES = \
$(SLO)$/SlideSorterController.obj \
$(SLO)$/SlsAnimator.obj \
+ $(SLO)$/SlsAnimationFunction.obj \
$(SLO)$/SlsClipboard.obj \
$(SLO)$/SlsCurrentSlideManager.obj \
+ $(SLO)$/SlsDragAndDropContext.obj \
$(SLO)$/SlsFocusManager.obj \
+ $(SLO)$/SlsInsertionIndicatorHandler.obj\
$(SLO)$/SlsListener.obj \
- $(SLO)$/SlsPageObjectFactory.obj \
$(SLO)$/SlsPageSelector.obj \
$(SLO)$/SlsProperties.obj \
$(SLO)$/SlsScrollBarManager.obj \
$(SLO)$/SlsSelectionCommand.obj \
+ $(SLO)$/SlsSelectionFunction.obj \
$(SLO)$/SlsSelectionManager.obj \
+ $(SLO)$/SlsSelectionObserver.obj \
$(SLO)$/SlsSlotManager.obj \
$(SLO)$/SlsTransferable.obj \
- \
- $(SLO)$/SlsHideSlideFunction.obj \
- $(SLO)$/SlsSelectionFunction.obj \
- $(SLO)$/SlsSlideFunction.obj
-
-EXCEPTIONSFILES= \
- $(SLO)$/SlideSorterController.obj
+ $(SLO)$/SlsVisibleAreaManager.obj
# --- Tagets -------------------------------------------------------
diff --git a/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx b/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx
index c828e95d1d02..ba3e9346f28f 100644..100755
--- a/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx
+++ b/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx
@@ -33,8 +33,8 @@
#include <boost/shared_ptr.hpp>
#include <vector>
-class BitmapEx;
class SdrPage;
+class Bitmap;
namespace sd { namespace slidesorter { namespace cache {
@@ -55,7 +55,7 @@ public:
*/
virtual void NotifyPreviewCreation (
CacheKey aKey,
- const ::boost::shared_ptr<BitmapEx>& rPreview) = 0;
+ const Bitmap& rPreview) = 0;
/** Called to determine whether the system is idle and a preview can be
created without annoying the user.
diff --git a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
index 4a5c2b51ac28..bd2b542c5d87 100755..100644
--- a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
+++ b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
@@ -30,10 +30,10 @@
#include "cache/SlsCacheContext.hxx"
#include <sal/types.h>
-#include <vcl/bitmapex.hxx>
-#include <boost/function.hpp>
+#include <tools/gen.hxx>
#include <boost/scoped_ptr.hpp>
-#include <boost/shared_ptr.hpp>
+#include <vcl/bitmap.hxx>
+
namespace sd { namespace slidesorter { namespace view {
class PageObjectViewObjectContact;
@@ -87,37 +87,68 @@ public:
*/
PageCache (
const Size& rPreviewSize,
+ const bool bDoSuperSampling,
const SharedCacheContext& rpCacheContext);
~PageCache (void);
- void ChangeSize(const Size& rPreviewSize);
+ void ChangeSize(
+ const Size& rPreviewSize,
+ const bool bDoSuperSampling);
/** Request a preview bitmap for the specified page object in the
specified size. The returned bitmap may be a preview of the
preview, i.e. either a scaled (up or down) version of a previous
preview (of the wrong size) or an empty bitmap. In this case a
request for the generation of a new preview is created and inserted
- into the request queue. When the preview is available the page
- shape will be told to paint itself again. When it then calls this
- method again if receives the correctly sized preview bitmap.
+ into the request queue. When the preview is available in the right
+ size the page shape will be told to paint itself again. When it
+ then calls this method again if receives the correctly sized preview
+ bitmap.
@param rRequestData
This data is used to determine the preview.
- @param rSize
- The size of the requested preview bitmap.
+ @param bResize
+ When <TRUE/> then when the available bitmap has not the
+ requested size, it is scaled before it is returned. When
+ <FALSE/> then the bitmap is returned in the wrong size and it is
+ the task of the caller to scale it.
@return
Returns a bitmap that is either empty, contains a scaled (up or
down) version or is the requested bitmap.
*/
- BitmapEx GetPreviewBitmap (
- CacheKey aKey,
- const Size& rSize);
+ Bitmap GetPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize);
+
+ Bitmap GetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize);
+ void SetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const Bitmap& rBitmap);
+
+ /** When the requested preview bitmap does not yet exist or is not
+ up-to-date then the rendering of one is scheduled. Otherwise this
+ method does nothing.
+ */
+ void RequestPreviewBitmap (const CacheKey aKey);
+
+ /** Tell the cache that the bitmap associated with the given request
+ data is not up-to-date anymore. This will invalidate all previews
+ in other caches that represent the same page as well.
+ @param bRequestPreview
+ When <TRUE/> then a new preview is requested and will lead
+ eventually to a repaint of the associated page object.
+ */
+ void InvalidatePreviewBitmap (
+ const CacheKey aKey,
+ const bool bRequestPreview);
/** Call this method when a view-object-contact object is being deleted
and does not need (a) its current bitmap in the cache and (b) a
requested new bitmap.
*/
- void ReleasePreviewBitmap (CacheKey aKey);
+ void ReleasePreviewBitmap (const CacheKey aKey);
/** Call this method when all preview bitmaps have to be generated anew.
This is the case when the size of the page objects on the screen has
@@ -127,14 +158,14 @@ public:
are created. When it is <FALSE/> the existing previews are only
marked as not being up-to-date anymore.
*/
- void InvalidateCache (bool bUpdateCache = true);
+ void InvalidateCache (const bool bUpdateCache = true);
/** With the precious flag you can control whether a bitmap can be
removed or reduced in size to make room for other bitmaps or is so
precious that it will not touched. A typical use is to set the
precious flag for exactly the visible pages.
*/
- void SetPreciousFlag (CacheKey aKey, bool bIsPrecious);
+ void SetPreciousFlag (const CacheKey aKey, const bool bIsPrecious);
void Pause (void);
void Resume (void);
diff --git a/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx b/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx
index 50202a7eed3d..71d7778f549f 100644..100755
--- a/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx
+++ b/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx
@@ -103,16 +103,27 @@ public:
marked as out-of-date and will be re-created when they are requested
the next time.
*/
- void InvalidatePreviewBitmap (
+ bool InvalidatePreviewBitmap (
DocumentKey pDocument,
const SdrPage* pPage);
+ /** Invalidate the preview bitmaps for all slides that belong to the
+ specified document. This is necessary after model changes that
+ affect e.g. page number fiels.
+ */
+ void InvalidateAllPreviewBitmaps (DocumentKey pDocument);
+
/** Invalidate all the caches that are currently in use and destroy
those that are not. This is used for example when the high contrast
mode is turned on or off.
*/
void InvalidateAllCaches (void);
+ /** Call this method when a page has been deleted and its preview
+ is not needed anymore.
+ */
+ void ReleasePreviewBitmap (const SdrPage* pPage);
+
private:
/** Singleton instance of the cache manager. Note that this is a weak
pointer. The (implementation class of) ViewShellBase holds a
diff --git a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
index 667aa768ee8f..b6309f80d0b4 100755
--- a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
@@ -37,7 +37,6 @@
#include <sfx2/viewfac.hxx>
#include <tools/link.hxx>
#include <tools/gen.hxx>
-#include <memory>
#include <comphelper/implementationreference.hxx>
namespace sd { namespace slidesorter {
@@ -61,12 +60,15 @@ class Animator;
class Clipboard;
class CurrentSlideManager;
class FocusManager;
+class InsertionIndicatorHandler;
class Listener;
class PageSelector;
-class Properties;
class ScrollBarManager;
+class SelectionFunction;
class SelectionManager;
+class SelectionObserver;
class SlotManager;
+class VisibleAreaManager;
class SlideSorterController
{
@@ -85,6 +87,8 @@ public:
virtual ~SlideSorterController (void);
+ void Dispose (void);
+
/** Place and size the scroll bars and the browser window so that the
given rectangle is filled.
@return
@@ -106,7 +110,8 @@ public:
Rectangle Rearrange (bool bForce = false);
/** Return the descriptor of the page that is rendered under the
- given position.
+ given position. This takes the IsOnlyPreviewTriggersMouseOver
+ property into account.
@return
Returns a pointer to a page descriptor instead of a
reference because when no page is found at the position
@@ -125,9 +130,7 @@ public:
::boost::shared_ptr<CurrentSlideManager> GetCurrentSlideManager (void) const;
::boost::shared_ptr<SlotManager> GetSlotManager (void) const;
::boost::shared_ptr<SelectionManager> GetSelectionManager (void) const;
-
- // forward VCLs PrePaint window event to DrawingLayer
- void PrePaint();
+ ::boost::shared_ptr<InsertionIndicatorHandler> GetInsertionIndicatorHandler (void) const;
/** This method forwards the call to the SlideSorterView and executes
pending operations like moving selected pages into the visible area.
@@ -183,6 +186,12 @@ public:
*/
virtual FunctionReference CreateSelectionFunction (SfxRequest& rRequest);
+ /** When the current function of the view shell is the slide sorter
+ selection function then return a reference to it. Otherwise return
+ an empty reference.
+ */
+ ::rtl::Reference<SelectionFunction> GetCurrentSelectionFunction (void);
+
/** Prepare for a change of the edit mode. Depending on the current
edit mode we may save the selection so that it can be restored when
later changing back to the current edit mode.
@@ -219,11 +228,6 @@ public:
*/
bool IsContextMenuOpen (void) const;
- /** Return a collection of properties that are used througout the slide
- sorter.
- */
- ::boost::shared_ptr<Properties> GetProperties (void) const;
-
/** Provide the set of pages to be displayed in the slide sorter. The
GetDocumentSlides() method can be found only in the SlideSorterModel.
*/
@@ -233,18 +237,24 @@ public:
*/
::boost::shared_ptr<Animator> GetAnimator (void) const;
+ VisibleAreaManager& GetVisibleAreaManager (void) const;
+
+ void CheckForMasterPageAssignment (void);
+
private:
SlideSorter& mrSlideSorter;
model::SlideSorterModel& mrModel;
view::SlideSorterView& mrView;
- ::std::auto_ptr<PageSelector> mpPageSelector;
- ::std::auto_ptr<FocusManager> mpFocusManager;
+ ::boost::scoped_ptr<PageSelector> mpPageSelector;
+ ::boost::scoped_ptr<FocusManager> mpFocusManager;
::boost::shared_ptr<SlotManager> mpSlotManager;
- ::std::auto_ptr<controller::Clipboard> mpClipboard;
- ::std::auto_ptr<ScrollBarManager> mpScrollBarManager;
+ ::boost::scoped_ptr<controller::Clipboard> mpClipboard;
+ ::boost::scoped_ptr<ScrollBarManager> mpScrollBarManager;
mutable ::boost::shared_ptr<CurrentSlideManager> mpCurrentSlideManager;
::boost::shared_ptr<SelectionManager> mpSelectionManager;
+ ::boost::shared_ptr<InsertionIndicatorHandler> mpInsertionIndicatorHandler;
::boost::shared_ptr<Animator> mpAnimator;
+ ::boost::scoped_ptr<VisibleAreaManager> mpVisibleAreaManager;
// The listener listens to UNO events and thus is a UNO object.
// For proper life time management and at the same time free access to
@@ -252,6 +262,7 @@ private:
::rtl::Reference<controller::Listener> mpListener;
int mnModelChangeLockCount;
+ bool mbIsForcedRearrangePending;
bool mbPreModelChangeDone;
bool mbPostModelChangePending;
@@ -286,11 +297,6 @@ private:
*/
bool mbIsContextMenuOpen;
- /** Some slide sorter wide properties that are used in different
- classes.
- */
- ::boost::shared_ptr<Properties> mpProperties;
-
/** Delete the given list of normal pages. This method is a helper
function for DeleteSelectedPages().
@param rSelectedNormalPages
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx
new file mode 100644
index 000000000000..38d0b2b22749
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx
@@ -0,0 +1,180 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_CONTROLLER_ANIMATION_FUNCTION_HXX
+#define SD_SLIDESORTER_CONTROLLER_ANIMATION_FUNCTION_HXX
+
+#include "model/SlsSharedPageDescriptor.hxx"
+#include <basegfx/point/b2dpoint.hxx>
+#include <boost/noncopyable.hpp>
+#include <boost/function.hpp>
+#include <tools/gen.hxx>
+#include <vector>
+
+namespace sd { namespace slidesorter { namespace view {
+class SlideSorterView;
+} } }
+
+
+
+namespace sd { namespace slidesorter { namespace controller {
+
+/** A collection of functions that are usefull when creating animations.
+ They are collected here until a better place is found.
+*/
+class AnimationFunction
+ : private ::boost::noncopyable
+{
+public:
+ /** Acceleration function that maps [0,1] to [0,1] linearly, ie it
+ returns the given time value unaltered.
+ */
+ static double Linear (const double nTime);
+
+ /** Acceleration function that maps [0,1] to [0,1]. Speed starts fast
+ and ends slow following the sine function.
+ */
+ static double FastInSlowOut_Sine (const double nTime);
+
+ /** Acceleration function that maps [0,1] to [0,1]. Speed starts fast
+ and ends slow following the square root function.
+ */
+ static double FastInSlowOut_Root (const double nTime);
+
+ /** Acceleration function that maps [0,1] to [0,0]. Speed starts slow,
+ rises, drops and ends slow following the sine function.
+ */
+ static double SlowInSlowOut_0to0_Sine (const double nTime);
+
+ /** Acceleration function that maps [0,1] to [0,0]. Speed starts slow,
+ rises and drops several times and ends slow following multiple
+ cycles of the the sine function.
+ */
+ static double Vibrate_Sine (const double nTime);
+
+ /** Scale point linearly.
+ */
+ static Point ScalePoint (const Point& rPoint, const double nTime);
+
+ /** Blend two points together according to the given weight.
+ */
+ static double Blend (const double nStartValue, const double nEndValue, const double nWeight);
+
+ /** Apply a gradual visual state change. The kind of change, i.e. the
+ previous and the new states are expected to be already set. This
+ method only adjusts the blending of the visual representation from
+ one state to the other.
+ */
+ static void ApplyVisualStateChange (
+ const model::SharedPageDescriptor& rpDescriptor,
+ view::SlideSorterView& rView,
+ const double nTime);
+
+ /** Apply a gradual change of a previously set offset to the location of
+ a page object.
+ */
+ static void ApplyLocationOffsetChange (
+ const model::SharedPageDescriptor& rpDescriptor,
+ view::SlideSorterView& rView,
+ const Point aLocationOffset);
+
+ /** Apply a gradual change the alpha value from the old value to a
+ new value (set prior to this call.)
+ */
+ static void ApplyButtonAlphaChange(
+ const model::SharedPageDescriptor& rpDescriptor,
+ view::SlideSorterView& rView,
+ const double nButtonAlpha,
+ const double nButtonBarAlpha);
+};
+
+
+
+
+class AnimationBezierFunction
+{
+public:
+ /** Create a cubic bezier curve whose start and end points are given
+ implicitly as P0=(0,0) and P3=(1,1).
+ */
+ AnimationBezierFunction (
+ const double nX1,
+ const double nY1,
+ const double nX2,
+ const double nY2);
+
+ /** Create a cubic bezier curve whose start and end points are given
+ implicitly as P0=(0,0) and P3=(1,1). The second control point is
+ implicitly given as P2=(1-nY1,1-nX1).
+ */
+ AnimationBezierFunction (
+ const double nX1,
+ const double nY1);
+
+ ::basegfx::B2DPoint operator() (const double nT);
+
+private:
+ const double mnX1;
+ const double mnY1;
+ const double mnX2;
+ const double mnY2;
+
+ double EvaluateComponent (
+ const double nT,
+ const double nV1,
+ const double nV2);
+};
+
+
+
+
+/** Turn a parametric function into one whose y-Values depend on its
+ x-Values. Note a lot of interpolation takes place. The resulting
+ accuracy should be good enough for the purpose of acceleration
+ function for animations.
+*/
+class AnimationParametricFunction
+{
+public:
+ typedef ::boost::function<basegfx::B2DPoint(double)> ParametricFunction;
+ AnimationParametricFunction (const ParametricFunction& rFunction);
+
+ double operator() (const double nX);
+
+private:
+ /** y-Values of the parametric function given to the constructor
+ evaluated (and interpolated) for evenly spaced x-Values.
+ */
+ ::std::vector<double> maY;
+};
+
+
+
+
+} } } // end of namespace ::sd::slidesorter::controller
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx b/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx
index 50c23e3dff4e..2d8418e49631 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx
@@ -29,6 +29,8 @@
#define SD_SLIDESORTER_CONTROLLER_ANIMATOR_HXX
#include "SlideSorter.hxx"
+#include "view/SlideSorterView.hxx"
+#include <canvas/elapsedtime.hxx>
#include <vcl/timer.hxx>
#include <sal/types.h>
#include <vector>
@@ -46,51 +48,94 @@ class Animator
: private ::boost::noncopyable
{
public:
+ /** In some circumstances we have to avoid animation and jump to the
+ final animation state immediately. Use this enum instead of a bool
+ to be more expressive.
+ */
+ enum AnimationMode { AM_Animated, AM_Immediate };
+
Animator (SlideSorter& rSlideSorter);
~Animator (void);
+ /** When disposed the animator will stop its work immediately and not
+ process any timer events anymore.
+ */
+ void Dispose (void);
+
/** An animation object is called with values between 0 and 1 as single
argument to its operator() method.
*/
- typedef ::boost::function1<void, double> AnimationFunction;
+ typedef ::boost::function1<void, double> AnimationFunctor;
+ typedef ::boost::function0<void> FinishFunctor;
+
+ typedef sal_Int32 AnimationId;
+ static const AnimationId NotAnAnimationId = -1;
/** Schedule a new animation for execution. The () operator of that
animation will be called with increasing values between 0 and 1 for
the specified duration.
@param rAnimation
The animation operation.
+ @param nStartOffset
+ Time in milli seconds before the animation is started.
@param nDuration
The duration in milli seconds.
*/
- void AddAnimation (
- const AnimationFunction& rAnimation,
- const sal_Int32 nDuration);
+ AnimationId AddAnimation (
+ const AnimationFunctor& rAnimation,
+ const sal_Int32 nStartOffset,
+ const sal_Int32 nDuration,
+ const FinishFunctor& rFinishFunctor = FinishFunctor());
+
+ AnimationId AddInfiniteAnimation (
+ const AnimationFunctor& rAnimation,
+ const double nDelta);
+
+ /** Abort and remove an animation. In order to reduce the bookkeeping
+ on the caller side, it is OK to call this method with an animation
+ function that is not currently being animated. Such a call is
+ silently ignored.
+ */
+ void RemoveAnimation (const AnimationId nAnimationId);
+
+ /** A typical use case for this method is the temporary shutdown of the
+ slidesorter when the slide sorter bar is put into a cache due to a
+ change of the edit mode.
+ */
+ void RemoveAllAnimations (void);
private:
SlideSorter& mrSlideSorter;
Timer maTimer;
-
+ bool mbIsDisposed;
class Animation;
typedef ::std::vector<boost::shared_ptr<Animation> > AnimationList;
AnimationList maAnimations;
+ ::canvas::tools::ElapsedTime maElapsedTime;
- class DrawLock;
- ::boost::scoped_ptr<DrawLock> mpDrawLock;
+ ::boost::scoped_ptr<view::SlideSorterView::DrawLock> mpDrawLock;
+
+ AnimationId mnNextAnimationId;
DECL_LINK(TimeoutHandler, Timer*);
/** Execute one step of every active animation.
+ @param nTime
+ Time measured in milli seconds with some arbitrary reference point.
@return
When one or more animation has finished then <TRUE/> is
returned. Call CleanUpAnimationList() in this case.
*/
- bool ServeAnimations (void);
+ bool ProcessAnimations (const double nTime);
/** Remove animations that have expired.
*/
void CleanUpAnimationList (void);
+
+ void RequestNextFrame (const double nFrameStart = 0);
};
+
} } } // end of namespace ::sd::slidesorter::controller
#endif
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
index 0bdbd7cb569f..9b7b1f5ec2d3 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
@@ -24,11 +24,12 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+
#ifndef SD_SLIDESORTER_CLIPBOARD
#define SD_SLIDESORTER_CLIPBOARD
#include "ViewClipboard.hxx"
-
+#include "controller/SlsSelectionObserver.hxx"
#include <sal/types.h>
#include <tools/solar.h>
#include <svx/svdpage.hxx>
@@ -96,6 +97,8 @@ public:
USHORT nPage = SDRPAGE_NOTFOUND,
USHORT nLayer = SDRPAGE_NOTFOUND);
+ void Abort (void);
+
protected:
virtual USHORT DetermineInsertPosition (
const SdTransferable& rTransferable);
@@ -127,6 +130,15 @@ private:
*/
bool mbUpdateSelectionPending;
+ /** Used when a drop is executed to combine all undo actions into one.
+ Typically created in ExecuteDrop() and released in DragFinish().
+ */
+ class UndoContext;
+ ::boost::scoped_ptr<UndoContext> mpUndoContext;
+
+ ::boost::scoped_ptr<SelectionObserver::Context> mpSelectionObserverContext;
+ ULONG mnDragFinishedUserEventId;
+
void CreateSlideTransferable (
::Window* pWindow,
bool bDrag);
@@ -208,6 +220,11 @@ private:
::sd::Window* pTargetWindow,
USHORT nPage,
USHORT nLayer);
+
+ /** Asynchronous part of DragFinished. The argument is the sal_Int8
+ nDropAction, disguised as void*.
+ */
+ DECL_LINK(ProcessDragFinished, void*);
};
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsCurrentSlideManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsCurrentSlideManager.hxx
index b0f3a75b540c..f49207a0bd48 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsCurrentSlideManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsCurrentSlideManager.hxx
@@ -29,6 +29,8 @@
#define SD_SLIDESORTER_CURRENT_SLIDE_MANAGER_HXX
#include "model/SlsSharedPageDescriptor.hxx"
+#include <vcl/timer.hxx>
+#include <tools/link.hxx>
#include <com/sun/star/drawing/XDrawPage.hpp>
class SdPage;
@@ -43,6 +45,10 @@ namespace sd { namespace slidesorter { namespace controller {
/** Manage the current slide. This includes setting the according flags at
the PageDescriptor objects and setting the current slide at the main
view shell.
+
+ Switching pages is triggered only after a little delay. This allows
+ fast travelling through a larger set of slides without having to wait
+ for the edit view to update its content after every slide change.
*/
class CurrentSlideManager
{
@@ -57,14 +63,24 @@ public:
/** Call this when the current page of the main view shell has been
switched. Use SwitchCurrentSlide() to initiate such a switch.
*/
- void CurrentSlideHasChanged (const sal_Int32 nSlideIndex);
+ void NotifyCurrentSlideChange (const sal_Int32 nSlideIndex);
+ void NotifyCurrentSlideChange (const SdPage* pPage);
/** Call this method to switch the current page of the main view shell
to the given slide. Use CurrentSlideHasChanged() when the current
slide change has been initiated by someone else.
+ @param nSlideIndex
+ Zero based index in the range [0,number-of-slides).
+ @param bUpdateSelection
+ When <TRUE/> then the page selection is cleared and only the new
+ current slide is selected.
*/
- void SwitchCurrentSlide (const sal_Int32 nSlideIndex);
- void SwitchCurrentSlide (const model::SharedPageDescriptor& rpSlide);
+ void SwitchCurrentSlide (
+ const sal_Int32 nSlideIndex,
+ const bool bUpdateSelection = false);
+ void SwitchCurrentSlide (
+ const model::SharedPageDescriptor& rpSlide,
+ const bool bUpdateSelection = false);
/** Return the page descriptor for the current slide. Note, that when
there is no current slide then the returned pointer is empty.
@@ -83,9 +99,14 @@ private:
SlideSorter& mrSlideSorter;
sal_Int32 mnCurrentSlideIndex;
model::SharedPageDescriptor mpCurrentSlide;
+ /** Timer to control the delay after which to ask
+ XController/ViewShellBase to switch to another slide.
+ */
+ Timer maSwitchPageDelayTimer;
bool IsCurrentSlideIsValid (void);
void SetCurrentSlideAtViewShellBase (const model::SharedPageDescriptor& rpSlide);
+ void SetCurrentSlideAtTabControl (const model::SharedPageDescriptor& rpSlide);
void SetCurrentSlideAtXController (const model::SharedPageDescriptor& rpSlide);
/** When switching from one slide to a new current slide then this
@@ -97,6 +118,8 @@ private:
method connects to the new current slide.
*/
void AcquireCurrentSlide (const sal_Int32 nSlideIndex);
+
+ DECL_LINK(SwitchPageCallback,void*);
};
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx
index ecc02e8590c1..1d5aaee7a130 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx
@@ -120,16 +120,6 @@ public:
*/
sal_Int32 GetFocusedPageIndex (void) const;
- /** DEPRECATED. (Use equivalent SetFocusedPage(sal_Int32) instead.
-
- Set the focus to the page with the given index. This does not make
- the focus visible.
- @param nPageIndex
- Index of a page as it is accepted by the slide sorter model.
- The index is not checked for validity.
- */
- void FocusPage (sal_Int32 nPageIndex);
-
/** Set the focused page to the one described by the given page
descriptor. The visibility of the focus indicator is not modified.
@param rDescriptor
@@ -145,6 +135,8 @@ public:
*/
void SetFocusedPage (sal_Int32 nPageIndex);
+ void SetFocusedPageToCurrentPage (void);
+
/** Return <TRUE/> when the focus inidcator is currently shown. A
prerequisite is that the window managed by this focus manager has
the input focus as indicated by a <TRUE/> return value of
@@ -203,6 +195,12 @@ private:
::std::vector<Link> maFocusChangeListeners;
+ /** When vertical wrap is active then pressing UP in the top row moves
+ the focus to the bottom row, DOWN in the bottom row moves the focus
+ to the top row.
+ */
+ bool mbIsVerticalWrapActive;
+
/** Reset the focus state of the given descriptor and request a repaint
so that the focus indicator is hidden.
@param pDescriptor
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx b/sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx
new file mode 100644
index 000000000000..e257c5729b10
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx
@@ -0,0 +1,153 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_INSERTION_INDICATOR_HANDLER_HXX
+#define SD_SLIDESORTER_INSERTION_INDICATOR_HANDLER_HXX
+
+#include "view/SlsInsertAnimator.hxx"
+
+#include "view/SlsLayouter.hxx"
+
+namespace sd { namespace slidesorter { class SlideSorter; } }
+namespace sd { namespace slidesorter { namespace model {
+class PageEnumeration;
+} } }
+namespace sd { namespace slidesorter { namespace view {
+class InsertAnimator;
+class InsertionIndicatorOverlay;
+} } }
+
+
+namespace sd { namespace slidesorter { namespace controller {
+
+class Transferable;
+
+
+/** Manage the visibility and location of the insertion indicator. Its
+ actual display is controlled by the InsertionIndicatorOverlay.
+*/
+class InsertionIndicatorHandler
+{
+public:
+ InsertionIndicatorHandler (SlideSorter& rSlideSorter);
+ ~InsertionIndicatorHandler (void);
+
+ enum Mode { CopyMode, MoveMode, UnknownMode };
+ static Mode GetModeFromDndAction (const sal_Int8 nDndAction);
+
+ /** Activate the insertion marker at the given coordinates.
+ */
+ void Start (const bool bIsOverSourceView);
+
+ /** Deactivate the insertion marker.
+ */
+ void End (const controller::Animator::AnimationMode eMode);
+
+ /** This context make sure that the insertion indicator is shown
+ (provided that the clipboard is not empty) while the context is
+ alive. Typically used while a context menu is displayed.
+ */
+ class ForceShowContext
+ {
+ public:
+ ForceShowContext (const ::boost::shared_ptr<InsertionIndicatorHandler>& rpHandler);
+ ~ForceShowContext (void);
+ private:
+ const ::boost::shared_ptr<InsertionIndicatorHandler> mpHandler;
+ };
+
+ /** Update the indicator icon from the current transferable (from the
+ clipboard or an active drag and drop operation.)
+ */
+ void UpdateIndicatorIcon (const Transferable* pTransferable);
+
+ /** Set the position of the insertion marker to the given coordinates.
+ */
+ void UpdatePosition (
+ const Point& rMouseModelPosition,
+ const Mode eMode);
+ void UpdatePosition (
+ const Point& rMouseModelPosition,
+ const sal_Int8 nDndAction);
+
+ /** Return whether the insertion marker is active.
+ */
+ bool IsActive (void) const;
+
+ /** Return the insertion index that corresponds with the current
+ graphical location of the insertion indicator.
+ */
+ sal_Int32 GetInsertionPageIndex (void) const;
+
+ /** Determine whether moving the current selection to the current
+ position of the insertion marker would alter the document. This
+ would be the case when the selection is not consecutive or would be
+ moved to a position outside and not adjacent to the selection.
+ */
+ bool IsInsertionTrivial (
+ const sal_Int32 nInsertionIndex,
+ const Mode eMode) const;
+ /** This method is like the other variant. It operates implicitly
+ on the current insertion index as would be returned by
+ GetInsertionPageIndex().
+ */
+ bool IsInsertionTrivial (const sal_Int8 nDndAction);
+
+private:
+ SlideSorter& mrSlideSorter;
+ ::boost::shared_ptr<view::InsertAnimator> mpInsertAnimator;
+ ::boost::shared_ptr<view::InsertionIndicatorOverlay> mpInsertionIndicatorOverlay;
+ view::InsertPosition maInsertPosition;
+ Mode meMode;
+ bool mbIsInsertionTrivial;
+ bool mbIsActive;
+ bool mbIsReadOnly;
+ bool mbIsOverSourceView;
+ Size maIconSize;
+ bool mbIsForcedShow;
+
+ void SetPosition (
+ const Point& rPoint,
+ const Mode eMode);
+ ::boost::shared_ptr<view::InsertAnimator> GetInsertAnimator (void);
+
+ /** Make the insertion indicator visible (that is the show part) and
+ keep it visible, even when the mouse leaves the window (that is the
+ force part). We need this when a context menu is displayed (mouse
+ over the popup menu triggers a mouse leave event) while the
+ insertion indicator remains visible in the background.
+
+ In effect all calls to End() are ignored until ForceEnd() is called.
+ */
+ void ForceShow (void);
+ void ForceEnd (void);
+};
+
+
+} } } // end of namespace ::sd::slidesorter::controller
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx b/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx
index 57aaf9293301..b0a9cfa148cb 100755..100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx
@@ -69,16 +69,29 @@ public:
void SelectAllPages (void);
void DeselectAllPages (void);
+
/** Update the selection state of all page descriptors to be the same as
- that of the pages of the SdDrawDocument they describe and issue
+ that of the corresponding pages of the SdPage objects and issue
redraw requests where necessary.
*/
- void UpdateAllPages (void);
+ void GetCoreSelection (void);
+
+ /** Update the selection state of the SdPage objects to be the same as
+ that of the correspinding page descriptors.
+ */
+ void SetCoreSelection (void);
+ /** Select the specified descriptor. The selection state of the other
+ descriptors is not affected.
+ */
void SelectPage (int nPageIndex);
- /** Select the descriptor that is associated with the given page.
+ /** Select the descriptor that is associated with the given page. The
+ selection state of the other descriptors is not affected.
*/
void SelectPage (const SdPage* pPage);
+ /** Select the specified descriptor. The selection state of the other
+ descriptors is not affected.
+ */
void SelectPage (const model::SharedPageDescriptor& rpDescriptor);
/** Return whether the specified page is selected. This convenience
@@ -89,9 +102,19 @@ public:
bool IsPageSelected (int nPageIndex);
/** Deselect the descriptor that is associated with the given page.
+ @param bUpdateCurrentPage
+ When <TRUE/> then the current page is updated to the first slide
+ of the remaining selection.
*/
- void DeselectPage (int nPageIndex);
- void DeselectPage (const model::SharedPageDescriptor& rpDescriptor);
+ void DeselectPage (
+ int nPageIndex,
+ const bool bUpdateCurrentPage = true);
+ void DeselectPage (
+ const SdPage* pPage,
+ const bool bUpdateCurrentPage = true);
+ void DeselectPage (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bUpdateCurrentPage = true);
/** This convenience method returns the same number of pages that
SlideSorterModel.GetPageCount() returns. It is included here so
@@ -101,35 +124,6 @@ public:
int GetPageCount (void) const;
int GetSelectedPageCount (void) const;
- void PrepareModelChange (void);
- void HandleModelChange (void);
-
- /** Enable the broadcasting of selection change events. This calls the
- SlideSorterController::SelectionHasChanged() method to do the actual
- work. When EnableBroadcasting has been called as many times as
- DisableBroadcasting() was called before and the selection has been
- changed in the mean time, this change will be broadcasted.
- */
- void EnableBroadcasting (bool bMakeSelectionVisible = true);
-
- /** Disable the broadcasting o selectio change events. Subsequent
- changes of the selection will set a flag that triggers the sending
- of events when EnableBroadcasting() is called.
- */
- void DisableBroadcasting (void);
-
- /** Return the descriptor of the most recently selected page. This
- works only when the page has not been de-selected in the mean time.
- This method helps the view when it scrolls the selection into the
- visible area.
- @return
- When the selection is empty or when the most recently selected
- page has been deselected already (but other pages are still
- selected) then NULL is returned, even when a selection did exist
- but has been cleared.
- */
- model::SharedPageDescriptor GetMostRecentlySelectedPage (void) const;
-
/** Return the anchor for a range selection. This usually is the first
selected page after all pages have been deselected.
@return
@@ -156,10 +150,46 @@ public:
the last call to GetPageSelection() it is still valid to call
this method with the selection. When pages have been inserted
or removed the result may be unexpected.
+ @param bUpdateCurrentPage
+ When <TRUE/> (the default value) then after setting the
+ selection update the current page to the first page of the
+ selection.
+ When called from withing UpdateCurrentPage() then this flag is
+ used to prevent a recursion loop.
*/
- void SetPageSelection (const ::boost::shared_ptr<PageSelection>& rSelection);
+ void SetPageSelection (
+ const ::boost::shared_ptr<PageSelection>& rSelection,
+ const bool bUpdateCurrentPage = true);
- void UpdateCurrentPage (const model::SharedPageDescriptor& rCurrentPageDescriptor);
+ /** Call this method after the the model has changed to set the number
+ of selected pages.
+ */
+ void CountSelectedPages (void);
+
+ /** Use the UpdateLock whenever you do a complex selection, i.e. call
+ more than one method in a row. An active lock prevents intermediate
+ changes of the current slide.
+ */
+ class UpdateLock
+ {
+ public:
+ UpdateLock (SlideSorter& rSlideSorter);
+ UpdateLock (PageSelector& rPageSelector);
+ ~UpdateLock (void);
+ void Release (void);
+ private:
+ PageSelector* mpSelector;
+ };
+
+ class BroadcastLock
+ {
+ public:
+ BroadcastLock (SlideSorter& rSlideSorter);
+ BroadcastLock (PageSelector& rPageSelector);
+ ~BroadcastLock (void);
+ private:
+ PageSelector& mrSelector;
+ };
private:
model::SlideSorterModel& mrModel;
@@ -172,8 +202,26 @@ private:
/// Anchor for a range selection.
model::SharedPageDescriptor mpSelectionAnchor;
model::SharedPageDescriptor mpCurrentPage;
+ sal_Int32 mnUpdateLockCount;
+ bool mbIsUpdateCurrentPagePending;
- void CountSelectedPages (void);
+ /** Enable the broadcasting of selection change events. This calls the
+ SlideSorterController::SelectionHasChanged() method to do the actual
+ work. When EnableBroadcasting has been called as many times as
+ DisableBroadcasting() was called before and the selection has been
+ changed in the mean time, this change will be broadcasted.
+ */
+ void EnableBroadcasting (void);
+
+ /** Disable the broadcasting of selection change events. Subsequent
+ changes of the selection will set a flag that triggers the sending
+ of events when EnableBroadcasting() is called.
+ */
+ void DisableBroadcasting (void);
+
+ void UpdateCurrentPage (const bool bUpdateOnlyWhenPending = false);
+
+ void CheckConsistency (void) const;
};
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx b/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
index 51e353d696b9..06d239c81da3 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
@@ -40,6 +40,11 @@ public:
Properties (void);
~Properties (void);
+ /** Call this method after receiving a VCLEVENT_APPLICATION_DATACHANGED
+ event.
+ */
+ void HandleDataChangeEvent (void);
+
/** When this method returns <TRUE/> then the current slide is
highlighted in the view. The default value is <FALSE/>.
*/
@@ -108,6 +113,15 @@ public:
bool IsUIReadOnly (void) const;
void SetUIReadOnly (const bool bIsUIReadOnly);
+ /** The mouse over effect (and whether a mouse motion starts a multi
+ selection or a drag-and-drop) can be triggered by just the preview
+ area or the whole page object area.
+ */
+ bool IsOnlyPreviewTriggersMouseOver (void) const;
+ void SetOnlyPreviewTriggersMouseOver (const bool bFlag);
+
+ bool IsHighContrastModeActive (void) const;
+
private:
bool mbIsHighlightCurrentSlide;
bool mbIsShowSelection;
@@ -120,6 +134,8 @@ private:
Color maSelectionColor;
Color maHighlightColor;
bool mbIsUIReadOnly;
+ bool mbIsOnlyPreviewTriggersMouseOver;
+ bool mbIsHighContrastModeActive;
};
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx
index c93ed7708650..fa2aae6111fb 100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx
@@ -28,10 +28,13 @@
#ifndef SD_SLIDESORTER_SLIDE_SORTER_SCROLL_BAR_MANAGER_HXX
#define SD_SLIDESORTER_SLIDE_SORTER_SCROLL_BAR_MANAGER_HXX
+#include "SlideSorter.hxx"
+
#include <tools/link.hxx>
#include <tools/gen.hxx>
#include <vcl/timer.hxx>
#include <boost/shared_ptr.hpp>
+#include <boost/function.hpp>
class Point;
class Rectangle;
@@ -110,30 +113,34 @@ public:
bool bScrollToCurrentPosition = true);
/** Place the scroll bars inside the given area. When the available
- area is not large enough for the content to display the resulting
- behaviour depends on the mbUseVerticalScrollBar flag. When it is
- set to true then a vertical scroll bar is shown. Otherwise the
- height of the returned area is enlarged so that the content fits
- into it.
+ area is not large enough for the content to display the horizontal
+ and/or vertical scroll bar is enabled.
@param rAvailableArea
The scroll bars will be placed inside this rectangle. It is
expected to be given in pixel relative to its parent.
+ @param bIsHorizontalScrollBarAllowed
+ Only when this flag is <TRUE/> the horizontal scroll may be
+ displayed.
+ @param bIsVerticalScrollBarAllowed
+ Only when this flag is <TRUE/> the horizontal scroll may be
+ displayed.
@return
Returns the space that remains after the scroll bars are
- placed. When the mbUseVerticalScrollBar flag is false then the
- returned rectangle may be larger than the given one.
+ placed.
*/
- Rectangle PlaceScrollBars (const Rectangle& rAvailableArea);
+ Rectangle PlaceScrollBars (
+ const Rectangle& rAvailableArea,
+ const bool bIsHorizontalScrollBarAllowed,
+ const bool bIsVerticalScrollBarAllowed);
- /** Update the vertical scroll bar so that the visible area has the
- given top value.
+ /** Update the vertical and horizontal scroll bars so that the visible
+ area has the given top and left values.
*/
- void SetTop (const sal_Int32 nTop);
+ void SetTopLeft (const Point aNewTopLeft);
- /** Update the horizontal scroll bar so that the visible area has the
- given left value.
- */
- void SetLeft (const sal_Int32 nLeft);
+ sal_Int32 GetTop (void) const;
+
+ sal_Int32 GetLeft (void) const;
/** Return the width of the vertical scroll bar, which--when
shown--should be fixed in contrast to its height.
@@ -154,14 +161,35 @@ public:
/** Call this method to scroll a window while the mouse is in dragging a
selection. If the mouse is near the window border or is outside the
window then scroll the window accordingly.
+ @param rMouseWindowPosition
+ The mouse position for which the scroll amount is calculated.
+ @param rAutoScrollFunctor
+ Every time when the window is scrolled then this functor is executed.
@return
When the window is scrolled then this method returns <TRUE/>.
When the window is not changed then <FALSE/> is returned.
*/
- bool AutoScroll (const Point& rMouseWindowPosition);
+ bool AutoScroll (
+ const Point& rMouseWindowPosition,
+ const ::boost::function<void(void)>& rAutoScrollFunctor);
void StopAutoScroll (void);
+ enum Orientation { Orientation_Horizontal, Orientation_Vertical };
+ enum Unit { Unit_Pixel, Unit_Slide };
+ /** Scroll the slide sorter by setting the thumbs of the scroll bars and
+ by moving the content of the content window.
+ @param eOrientation
+ Defines whether to scroll horizontally or vertically.
+ @param eUnit
+ Defines whether the distance is a pixel value or the number of
+ slides to scroll.
+ */
+ void Scroll(
+ const Orientation eOrientation,
+ const Unit eUnit,
+ const sal_Int32 nDistance);
+
private:
SlideSorter& mrSlideSorter;
@@ -197,11 +225,14 @@ private:
*/
Timer maAutoScrollTimer;
Size maAutoScrollOffset;
+ bool mbIsAutoScrollActive;
/** The content window is the one whose view port is controlled by the
scroll bars.
*/
- ::boost::shared_ptr<sd::Window> mpContentWindow;
+ SharedSdWindow mpContentWindow;
+
+ ::boost::function<void(void)> maAutoScrollFunctor;
void SetWindowOrigin (
double nHorizontalPosition,
@@ -217,7 +248,10 @@ private:
The area that is enclosed by the scroll bars is returned. It
will be filled with the SlideSorterView.
*/
- Rectangle DetermineScrollBarVisibilities (const Rectangle& rAvailableArea);
+ Rectangle DetermineScrollBarVisibilities(
+ const Rectangle& rAvailableArea,
+ const bool bIsHorizontalScrollBarAllowed,
+ const bool bIsVerticalScrollBarAllowed);
/** Typically called by DetermineScrollBarVisibilities() this method
tests a specific configuration of the two scroll bars being visible
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
index 79b8a1ff5d44..9dcd0abb646c 100755..100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
@@ -28,10 +28,13 @@
#ifndef SD_SLIDESORTER_SELECTION_FUNCTION_HXX
#define SD_SLIDESORTER_SELECTION_FUNCTION_HXX
-#include "controller/SlsSlideFunction.hxx"
#include "model/SlsSharedPageDescriptor.hxx"
-#include <tools/list.hxx>
-#include <memory>
+#include "controller/SlsFocusManager.hxx"
+#include "controller/SlsInsertionIndicatorHandler.hxx"
+#include "fupoor.hxx"
+#include <svtools/transfer.hxx>
+#include <boost/noncopyable.hpp>
+#include <boost/scoped_ptr.hpp>
class SdSlideViewShell;
class SdWindow;
@@ -46,9 +49,12 @@ class SlideSorter;
namespace sd { namespace slidesorter { namespace controller {
class SlideSorterController;
+class DragAndDropContext;
+
class SelectionFunction
- : public SlideFunction
+ : public FuPoor,
+ private ::boost::noncopyable
{
public:
TYPEINFO();
@@ -60,10 +66,9 @@ public:
virtual BOOL MouseMove(const MouseEvent& rMEvt);
virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Paint(const Rectangle&, ::sd::Window* );
- virtual void Activate(); // Function aktivieren
- virtual void Deactivate(); // Function deaktivieren
+ virtual void Activate();
+ virtual void Deactivate();
virtual void ScrollStart();
virtual void ScrollEnd();
@@ -86,6 +91,42 @@ public:
*/
virtual bool cancel();
+ void MouseDragged (
+ const AcceptDropEvent& rEvent,
+ const sal_Int8 nDragAction);
+
+ /** Turn of substitution display and insertion indicator.
+ */
+ void NotifyDragFinished (void);
+
+ /** Call when drag-and-drop or multi selection is started or stopped in
+ order to update permission of mouse over indication.
+ */
+ void UpdateMouseOverIndicationPermission (void);
+
+ class EventDescriptor;
+ class ModeHandler;
+ friend class ModeHandler;
+ enum Mode
+ {
+ NormalMode,
+ MultiSelectionMode,
+ DragAndDropMode,
+ ButtonMode
+ };
+ void SwitchToNormalMode (void);
+ void SwitchToDragAndDropMode(const Point aMousePosition);
+ void SwitchToMultiSelectionMode (const Point aMousePosition, const sal_uInt32 nEventCode);
+ bool SwitchToButtonMode (void);
+
+ void ResetShiftKeySelectionAnchor (void);
+ /** Special case handling for when the context menu is hidden. This
+ method will reinitialize the current mouse position to prevent the
+ mouse motion during the time the context menu is displayed from
+ being interpreted as drag-and-drop start.
+ */
+ void ResetMouseAnchor (void);
+
protected:
SlideSorter& mrSlideSorter;
SlideSorterController& mrController;
@@ -97,11 +138,6 @@ protected:
virtual ~SelectionFunction();
private:
- class SubstitutionHandler;
- class EventDescriptor;
-
- /// Set in MouseButtonDown this flag indicates that a page has been hit.
- bool mbPageHit;
/// The rectangle of the mouse drag selection.
Rectangle maDragSelectionRectangle;
@@ -118,20 +154,17 @@ private:
*/
bool mbProcessingMouseButtonDown;
- ::std::auto_ptr<SubstitutionHandler> mpSubstitutionHandler;
+ bool mbIsDeselectionPending;
- DECL_LINK( DragSlideHdl, Timer* );
- void StartDrag (void);
-
- /** Set the selection to exactly the specified page and also set it as
- the current page.
+ /** Remember the slide where the shift key was pressed and started a
+ multiselection via keyboard.
*/
- void SetCurrentPage (const model::SharedPageDescriptor& rpDescriptor);
+ sal_Int32 mnShiftKeySelectionAnchor;
- /** When the view on which this selection function is working is the
- main view then the view is switched to the regular editing view.
+ /** The selection function can be in one of several mutually
+ exclusive modes.
*/
- void SwitchView (const model::SharedPageDescriptor& rpDescriptor);
+ ::boost::shared_ptr<ModeHandler> mpModeHandler;
/** Make the slide nOffset slides away of the current one the new
current slide. When the new index is outside the range of valid
@@ -142,63 +175,31 @@ private:
*/
void GotoNextPage (int nOffset);
+ /** Make the slide with the given index the new current slide.
+ @param nIndex
+ Index of the new current slide. When the new index is outside
+ the range of valid page numbers it is clipped to that range.
+ */
+ void GotoPage (int nIndex);
+
void ProcessMouseEvent (sal_uInt32 nEventType, const MouseEvent& rEvent);
void ProcessKeyEvent (const KeyEvent& rEvent);
// What follows are a couple of helper methods that are used by
// ProcessMouseEvent().
- /// Select the specified page and set the selection anchor.
- void SelectHitPage (const model::SharedPageDescriptor& rpDescriptor);
- /// Deselect the specified page.
- void DeselectHitPage (const model::SharedPageDescriptor& rpDescriptor);
- /// Deselect all pages.
- void DeselectAllPages (void);
+ void ProcessEvent (EventDescriptor& rEvent);
- /** for a possibly following mouse motion by starting the drag timer
- that after a short time of pressed but un-moved mouse starts a drag
- operation.
- */
- void PrepareMouseMotion (const Point& aMouseModelPosition);
-
- /** Select all pages between and including the selection anchor and the
- specified page.
- */
- void RangeSelect (const model::SharedPageDescriptor& rpDescriptor);
+ void MoveFocus (
+ const FocusManager::FocusMoveDirection eDirection,
+ const bool bIsShiftDown,
+ const bool bIsControlDown);
- /** Start a rectangle selection at the given position.
- */
- void StartRectangleSelection (const Point& aMouseModelPosition);
+ void StopDragAndDrop (void);
- /** Update the rectangle selection so that the given position becomes
- the new second point of the selection rectangle.
- */
- void UpdateRectangleSelection (const Point& aMouseModelPosition);
-
- /** Select all pages that lie completly in the selection rectangle.
- */
- void ProcessRectangleSelection (bool bToggleSelection);
-
- /** Compute a numerical code that describes a mouse event and that can
- be used for fast look up of the appropriate reaction.
- */
- sal_uInt32 EncodeMouseEvent (
- const EventDescriptor& rDescriptor,
- const MouseEvent& rEvent) const;
-
- /** Compute a numerical code that describes a key event and that can
- be used for fast look up of the appropriate reaction.
- */
- sal_uInt32 EncodeKeyEvent (
- const EventDescriptor& rDescriptor,
- const KeyEvent& rEvent) const;
-
- void EventPreprocessing (const EventDescriptor& rEvent);
- bool EventProcessing (const EventDescriptor& rEvent);
- void EventPostprocessing (const EventDescriptor& rEvent);
+ void SwitchMode (const ::boost::shared_ptr<ModeHandler>& rpHandler);
};
} } } // end of namespace ::sd::slidesorter::controller
#endif
-
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx
index c0fab6da84c6..a9617a88c2e6 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx
@@ -29,8 +29,10 @@
#define SD_SLIDESORTER_CONTROLLER_SELECTION_MANAGER_HXX
#include "model/SlsSharedPageDescriptor.hxx"
+#include "controller/SlsAnimator.hxx"
#include <sal/types.h>
#include <tools/gen.hxx>
+#include <basegfx/range/b2irectangle.hxx>
#include <vector>
class Link;
@@ -43,6 +45,7 @@ class SlideSorter;
namespace sd { namespace slidesorter { namespace controller {
class SlideSorterController;
+class SelectionObserver;
/** This class is a part of the controller and handles the selection of
slides.
@@ -62,12 +65,13 @@ public:
/** Delete the currently selected slides. When this method returns the
selection is empty.
+ @param bSelectFollowingPage
+ When <TRUE/> then after deleting the selected pages make the
+ slide after the last selected page the new current page.
+ When <FALSE/> then make the first slide before the selected
+ pages the new current slide.
*/
- void DeleteSelectedPages (void);
-
- /** Move the maked pages to a position directly after the specified page.
- */
- bool MoveSelectedPages (const sal_Int32 nTargetPage);
+ void DeleteSelectedPages (const bool bSelectFollowingPage = true);
/** Call this method after the selection has changed (possible several
calls to the PageSelector) to invalidate the relevant slots and send
@@ -75,42 +79,6 @@ public:
*/
void SelectionHasChanged (const bool bMakeSelectionVisible = true);
- /** Return <TRUE/> when the selection has changed but has not yet been
- moved to the visible area of the slide sorter view.
- */
- bool IsMakeSelectionVisiblePending (void) const;
-
- enum SelectionHint { SH_FIRST, SH_LAST, SH_RECENT };
-
- /** Try to make all currently selected page objects visible, i.e. set
- the origin so that the page objects lie inside the visible area.
- When the selection is empty then the visible area is not modified.
-
- <p>This method, and the ones is calls, look into the Properties
- object of the SlideSorter in order to determine whether the current
- selection is to be displayed centered.</p>
- @param eSelectionHint
- This is an advice on which selected page object to handle with
- the highest priority when the whole selection does not fit into
- the visible area.
- @return
- Returns the vertical translation of the visible area. It is 0
- when no update of the visible area was done.
- */
- Size MakeSelectionVisible (
- const SelectionHint eSelectionHint = SH_RECENT);
-
- /** Modify the origin of the visible area so that the given rectangle
- comes into view. This is done with the smallest change: no
- scrolling takes place when the given rectangle already lies in the
- visible area. Otherwise either the top or the bottom of the given
- rectangle is aligned with the top or the bottom of the visible area.
- @return
- Returns the vertical translation of the visible area. It is 0
- when no update of the visible area was done.
- */
- Size MakeRectangleVisible (const Rectangle& rBox);
-
/** Add a listener that is called when the selection of the slide sorter
changes.
@param rListener
@@ -143,6 +111,8 @@ public:
*/
void SetInsertionPosition (const sal_Int32 nInsertionPosition);
+ ::boost::shared_ptr<SelectionObserver> GetSelectionObserver (void) const;
+
private:
SlideSorter& mrSlideSorter;
SlideSorterController& mrController;
@@ -166,6 +136,17 @@ private:
*/
sal_Int32 mnInsertionPosition;
+ /** Animation id for a scroll animation the will eventually set the top
+ and left of the visible area to maRequestedTopLeft.
+ */
+ Animator::AnimationId mnAnimationId;
+ Point maRequestedTopLeft;
+
+ class PageInsertionListener;
+ ::boost::scoped_ptr<PageInsertionListener> mpPageInsertionListener;
+
+ ::boost::shared_ptr<SelectionObserver> mpSelectionObserver;
+
/** Delete the given list of normal pages. This method is a helper
function for DeleteSelectedPages().
@param rSelectedNormalPages
@@ -179,31 +160,6 @@ private:
A list of master pages. Supplying normal pages is an error.
*/
void DeleteSelectedMasterPages (const ::std::vector<SdPage*>& rSelectedMasterPages);
-
- /** Return <TRUE/> when the given rectangle, that typically is the
- bounding box of all currently selected slides, does not fit entirely
- into the visible area of the slide sorter view.
- */
- bool DoesSelectionExceedVisibleArea (const Rectangle& rSelectionBox) const;
-
- /** When not all currently selected slides fit into the visible area of
- the slide sorter view, and thus DoesSelectionExceedVisibleArea()
- would return <TRUE/>, then it is the task of this method to
- determine which part of the selection to move into the visible area.
- @param rpFirst
- The first selected slide. Must not be an empty pointer.
- @param rpLast
- The last selected slide. Must not be an empty pointer.
- @param eSelectionHint
- This hint tells the method on which slide to concentrate,
- i.e. which slide has to be inside the returned visible area.
- @return
- Returns the new visible area.
- */
- Rectangle ResolveLargeSelection (
- const model::SharedPageDescriptor& rpFirst,
- const model::SharedPageDescriptor& rpLast,
- const SelectionHint eSelectionHint);
};
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx
new file mode 100644
index 000000000000..0fb45b403af1
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_CONTROLLER_SELECTION_OBSERVER_HXX
+#define SD_SLIDESORTER_CONTROLLER_SELECTION_OBSERVER_HXX
+
+#include <tools/gen.hxx>
+#include <vector>
+#include <boost/shared_ptr.hpp>
+
+namespace sd { namespace slidesorter {
+class SlideSorter;
+} }
+
+class SdDrawDocument;
+class SdrPage;
+
+namespace sd { namespace slidesorter { namespace controller {
+
+/** Observe insertions and deletions of pages between calls to
+ StartObservation() and EndObservation(). When the later is called
+ the selection is set to just the newly inserted pages.
+*/
+class SelectionObserver
+{
+public:
+ SelectionObserver (SlideSorter& rSlideSorter);
+ virtual ~SelectionObserver (void);
+
+ void NotifyPageEvent (const SdrPage* pPage);
+ void StartObservation (void);
+ void AbortObservation (void);
+ void EndObservation (void);
+
+ /** Use this little class instead of calling StartObservation and
+ EndObservation directly so that EndObservation is not forgotten or
+ omitted due to an exception or some break or return in the middle of
+ code.
+ */
+ class Context
+ {
+ public:
+ Context (SlideSorter& rSlideSorter);
+ ~Context(void);
+ void Abort (void);
+ private:
+ ::boost::shared_ptr<SelectionObserver> mpSelectionObserver;
+ };
+
+private:
+ SlideSorter& mrSlideSorter;
+ SdDrawDocument* mpDocument;
+ bool mbIsOvservationActive;
+
+ ::std::vector<const SdPage*> maInsertedPages;
+ ::std::vector<sal_Int32> maDeletedPages;
+};
+
+} } } // end of namespace ::sd::slidesorter::controller
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
index 0e58d5d3b411..d2c9f7481624 100755..100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
@@ -27,6 +27,7 @@
#ifndef SD_SLIDESORTER_SLOT_MANAGER_HXX
#define SD_SLIDESORTER_SLOT_MANAGER_HXX
+#include "model/SlsSharedPageDescriptor.hxx"
#include <tools/link.hxx>
#include <memory>
#include <queue>
@@ -71,6 +72,21 @@ public:
void ExecuteCommandAsynchronously (::std::auto_ptr<Command> pCommand);
+ /** Exclude or include one slide or all selected slides.
+ @param rpDescriptor
+ When the pointer is empty then apply the new state to all
+ selected pages. Otherwise apply the new state to just the
+ specified state.
+ */
+ void ChangeSlideExclusionState (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bExcludeSlide);
+
+ /** Call this after a change from normal mode to master mode or back.
+ The affected slots are invalidated.
+ */
+ void NotifyEditModeChange (void);
+
private:
/// The controller for which we manage the slot calls.
SlideSorter& mrSlideSorter;
@@ -93,6 +109,13 @@ private:
*/
void InsertSlide (SfxRequest& rRequest);
+ void DuplicateSelectedSlides (SfxRequest& rRequest);
+
+ /** Use one of several ways to determine where to insert a new page.
+ This can be the current selection or the insertion indicator.
+ */
+ sal_Int32 GetInsertionPosition (void);
+
DECL_LINK(UserEventCallback, void*);
};
diff --git a/sd/source/ui/slidesorter/controller/SlsTransferable.hxx b/sd/source/ui/slidesorter/inc/controller/SlsTransferable.hxx
index f527fd4768b9..289fb1f5f072 100644
--- a/sd/source/ui/slidesorter/controller/SlsTransferable.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsTransferable.hxx
@@ -31,17 +31,13 @@
#include "sdxfer.hxx"
class SdDrawDocument;
-namespace sd
-{
- class pWorkView;
- namespace slidesorter
- {
- class SlideSorterViewShell;
- }
-}
+namespace sd { namespace slidesorter {
+class SlideSorterViewShell;
+} }
namespace sd { namespace slidesorter { namespace controller {
+
/** This class exists to have DragFinished call the correct object: the
SlideSorterViewShell instead of the old SlideView.
*/
@@ -49,18 +45,39 @@ class Transferable
: public SdTransferable
{
public:
+ class Representative
+ {
+ public:
+ Representative (const Bitmap& rBitmap, const bool bIsExcluded)
+ : maBitmap(rBitmap), mbIsExcluded(bIsExcluded) {}
+ Representative (const Representative& rOther)
+ : maBitmap(rOther.maBitmap), mbIsExcluded(rOther.mbIsExcluded) {}
+ Representative operator= (Representative& rOther)
+ { if (&rOther != this) {maBitmap = rOther.maBitmap; mbIsExcluded = rOther.mbIsExcluded; }
+ return *this;
+ }
+
+ Bitmap maBitmap;
+ bool mbIsExcluded;
+ };
+
+
Transferable (
SdDrawDocument* pSrcDoc,
::sd::View* pWorkView,
BOOL bInitOnGetData,
- SlideSorterViewShell* pViewShell);
+ SlideSorterViewShell* pViewShell,
+ const ::std::vector<Representative>& rRepresentatives);
virtual ~Transferable (void);
virtual void DragFinished (sal_Int8 nDropAction);
+ const ::std::vector<Representative>& GetRepresentatives (void) const;
+
private:
SlideSorterViewShell* mpViewShell;
+ const ::std::vector<Representative> maRepresentatives;
virtual void Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint);
};
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx
new file mode 100644
index 000000000000..cdaf9b1588ea
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VISIBLE_AREA_MANAGER_HXX
+#define SD_SLIDESORTER_VISIBLE_AREA_MANAGER_HXX
+
+#include "controller/SlsAnimator.hxx"
+#include "model/SlsSharedPageDescriptor.hxx"
+#include <boost/noncopyable.hpp>
+#include <boost/optional.hpp>
+
+namespace sd { namespace slidesorter { namespace controller {
+
+
+/** Manage requests for scrolling page objects into view.
+*/
+class VisibleAreaManager
+ : public ::boost::noncopyable
+{
+public:
+ VisibleAreaManager (SlideSorter& rSlideSorter);
+ ~VisibleAreaManager (void);
+
+ void ActivateCurrentSlideTracking (void);
+ void DeactivateCurrentSlideTracking (void);
+
+ /** Request the current slide to be moved into the visible area.
+ This request is only obeyed when the current slide tracking is
+ active.
+ @see ActivateCurrentSlideTracking() and DeactivateCurrentSlideTracking()
+ */
+ void RequestCurrentSlideVisible (void);
+
+ /** Request to make the specified page object visible.
+ */
+ void RequestVisible (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bForce = false);
+
+ /** Temporarily disable the update of the visible area.
+ */
+ class TemporaryDisabler
+ {
+ public:
+ TemporaryDisabler (SlideSorter& rSlideSorter);
+ ~TemporaryDisabler (void);
+ private:
+ VisibleAreaManager& mrVisibleAreaManager;
+ };
+
+private:
+ SlideSorter& mrSlideSorter;
+
+ /** List of rectangle that someone wants to be moved into the visible
+ area.
+ Cleared on every call to ForgetVisibleRequests() and MakeVisible().
+ */
+ ::std::vector<Rectangle> maVisibleRequests;
+
+ /** Animation id for a scroll animation that sets the top
+ and left of the visible area to maRequestedVisibleTopLeft.
+ */
+ Animator::AnimationId mnScrollAnimationId;
+ Point maRequestedVisibleTopLeft;
+ Animator::AnimationMode meRequestedAnimationMode;
+ bool mbIsCurrentSlideTrackingActive;
+ int mnDisableCount;
+
+ void MakeVisible (void);
+ ::boost::optional<Point> GetRequestedTopLeft (void) const;
+};
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx b/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx
index 4ade19087304..9dfd861fd5cf 100755..100644
--- a/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx
@@ -36,6 +36,7 @@ class SdDrawDocument;
#include "pres.hxx"
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <osl/mutex.hxx>
+#include <vcl/region.hxx>
#include <memory>
#include <vector>
@@ -43,6 +44,9 @@ class SdDrawDocument;
namespace css = ::com::sun::star;
+class SdrPage;
+class SdPage;
+
namespace sd { namespace slidesorter {
class SlideSorter;
} }
@@ -55,6 +59,9 @@ namespace sd { namespace slidesorter { namespace model {
class DocumentPageContainer;
+inline sal_Int32 FromCoreIndex (const USHORT nCoreIndex) { return (nCoreIndex-1)/2; }
+inline USHORT ToCoreIndex (const sal_Int32 nIndex) { return nIndex*2+1; }
+
/** The model of the slide sorter gives access to the slides that are to be
displayed in the slide sorter view. Via the SetDocumentSlides() method
this set of slides can be modified (but do not call it directly, use
@@ -64,8 +71,10 @@ class SlideSorterModel
{
public:
SlideSorterModel (SlideSorter& rSlideSorter);
+ void Init (void);
virtual ~SlideSorterModel (void);
+ void Dispose (void);
/** This method is present to let the view create a ShowView for
displaying slides.
@@ -83,6 +92,9 @@ public:
*/
bool SetEditMode (EditMode eEditMode);
+ /** Set the edit mode to that currently used by the controller.
+ */
+ bool SetEditModeFromController (void);
EditMode GetEditMode (void) const;
PageKind GetPageType (void) const;
@@ -126,6 +138,25 @@ public:
sal_Int32 GetIndex (
const ::com::sun::star::uno::Reference<com::sun::star::drawing::XDrawPage>& rxSlide) const;
+ /** Return a page descriptor for the given SdrPage. Page descriptors
+ are created on demand. The page descriptor is found (or not found)
+ in (at most) linear time. Note that all page descriptors in front of
+ the one associated with the given XDrawPage are created when not yet
+ present. When the SdrPage is not found then all descriptors are
+ created.
+ @return
+ Returns the index to the requested page descriptor or -1 when
+ there is no such page descriptor.
+ */
+ sal_Int32 GetIndex (const SdrPage* pPage) const;
+
+ /** Return an index for accessing an SdrModel that corresponds to the
+ given SlideSorterModel index. In many cases we just have to apply
+ the n*2+1 magic. Only when a special model is set, like a custom
+ slide show, then the returned value is different.
+ */
+ USHORT GetCoreIndex (const sal_Int32 nIndex) const;
+
/** Call this method after the document has changed its structure. This
will get the model in sync with the SdDrawDocument. This method
tries not to throw away to much information already gathered. This
@@ -144,16 +175,9 @@ public:
*/
void SynchronizeDocumentSelection (void);
- /** Replace the factory for the creation of the page objects and
- contacts with the given object. The old factory is destroyed.
- */
- void SetPageObjectFactory(
- ::std::auto_ptr<controller::PageObjectFactory> pPageObjectFactory);
-
- /** Return the page object factory. It none has been set so far or it
- has been reset, then a new one is created.
+ /** Set the selection of the called model to exactly that of the document.
*/
- const controller::PageObjectFactory& GetPageObjectFactory (void) const;
+ void SynchronizeModelSelection (void);
/** Return the mutex so that the caller can lock it and then safely
access the model.
@@ -179,6 +203,29 @@ public:
*/
void UpdatePageList (void);
+ bool IsReadOnly (void) const;
+
+ /** The current selection is saved by copying the ST_Selected state into
+ ST_WasSelected for slides.
+ */
+ void SaveCurrentSelection (void);
+
+ /** The current selection is restored from the ST_WasSelected state from
+ the slides.
+ @returns
+ The returned region has to be repainted to reflect the updated
+ selection states.
+ */
+ Region RestoreSelection (void);
+
+ /** Typically called from controller::Listener this method handles the
+ insertion and deletion of single pages.
+ @return
+ Returns <TRUE/> when the given page is relevant for the current
+ page kind and edit mode.
+ */
+ bool NotifyPageEvent (const SdrPage* pPage);
+
private:
mutable ::osl::Mutex maMutex;
SlideSorter& mrSlideSorter;
@@ -187,13 +234,16 @@ private:
EditMode meEditMode;
typedef ::std::vector<SharedPageDescriptor> DescriptorContainer;
mutable DescriptorContainer maPageDescriptors;
- mutable ::std::auto_ptr<controller::PageObjectFactory> mpPageObjectFactory;
/** Resize the descriptor container according to current values of
page kind and edit mode.
*/
void AdaptSize (void);
+ SdPage* GetPage (const sal_Int32 nCoreIndex) const;
+ void InsertSlide (SdPage* pPage);
+ void DeleteSlide (const SdPage* pPage);
+ void UpdateIndices (const sal_Int32 nFirstIndex);
};
} } } // end of namespace ::sd::slidesorter::model
diff --git a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
index 81877ce7465c..276f1a7c10a7 100755..100644
--- a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
@@ -28,6 +28,7 @@
#ifndef SD_SLIDESORTER_PAGE_DESCRIPTOR_HXX
#define SD_SLIDESORTER_PAGE_DESCRIPTOR_HXX
+#include "model/SlsVisualState.hxx"
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <tools/gen.hxx>
#include <tools/link.hxx>
@@ -36,21 +37,11 @@
#include <memory>
#include <boost/enable_shared_from_this.hpp>
+#include <boost/scoped_ptr.hpp>
-class SdPage;
-
-namespace sdr { namespace contact {
-class ObjectContact;
-} }
-
-namespace sd { namespace slidesorter { namespace view {
-class PageObject;
-class PageObjectViewObjectContact;
-} } }
-namespace sd { namespace slidesorter { namespace controller {
-class PageObjectFactory;
-} } }
+class SdPage;
+class SdrPage;
namespace sd { namespace slidesorter { namespace model {
@@ -87,8 +78,7 @@ public:
PageDescriptor (
const css::uno::Reference<css::drawing::XDrawPage>& rxPage,
SdPage* pPage,
- const sal_Int32 nIndex,
- const controller::PageObjectFactory& rPageObjectFactory);
+ const sal_Int32 nIndex);
~PageDescriptor (void);
@@ -100,33 +90,22 @@ public:
*/
css::uno::Reference<css::drawing::XDrawPage> GetXDrawPage (void) const;
- /** Return the page shape that is used for visualizing the page.
+ /** Returns the index of the page as it is displayed in the view as page
+ number. The value may differ from the index returned by the
+ XDrawPage when there are hidden slides and the XIndexAccess used to
+ access the model filters them out.
*/
- view::PageObject* GetPageObject (void);
- void ReleasePageObject (void);
+ sal_Int32 GetPageIndex (void) const;
+ void SetPageIndex (const sal_Int32 nIndex);
- /** Return <TRUE/> when the page object is fully or parially visible. */
- bool IsVisible (void) const;
+ bool UpdateMasterPage (void);
- /** Set the visible state that is returned by the IsVisible() method.
- This method is typically called by the view who renders the object
- onto the screen.
- */
- void SetVisible (bool bVisible);
+ enum State { ST_Visible, ST_Selected, ST_WasSelected,
+ ST_Focused, ST_MouseOver, ST_Current, ST_Excluded };
- /** Make sure that the page is selected and return whether the
- selection state changed.
- */
- bool Select (void);
- /** Make sure that the page is not selected and return whether the
- selection state changed.
- */
- bool Deselect (void);
+ bool HasState (const State eState) const;
- /** Return whether the page is selected (and thus bypasses the internal
- mbIsSelected flag.
- */
- bool IsSelected (void) const;
+ bool SetState (const State eState, const bool bStateValue);
/** Set the internal mbIsSelected flag to the selection state of the
page. Use this method to synchronize a page descriptor with the
@@ -137,70 +116,39 @@ public:
returned. When they were the same this method returns
<FALSE/>.
*/
- bool UpdateSelection (void);
-
- bool IsFocused (void) const;
- void SetFocus (void);
- void RemoveFocus (void);
-
- view::PageObjectViewObjectContact* GetViewObjectContact (void) const;
-
- void SetViewObjectContact (
- view::PageObjectViewObjectContact* pViewObjectContact);
+ bool GetCoreSelection (void);
- /** Return the currently used page object factory.
+ /** Set the selection flags of the SdPage objects to the corresponding
+ selection states of the page descriptors.
*/
- const controller::PageObjectFactory& GetPageObjectFactory (void) const;
+ void SetCoreSelection (void);
- /** Replace the current page object factory by the given one.
- */
- void SetPageObjectFactory (const controller::PageObjectFactory& rFactory);
-
- void SetModelBorder (const SvBorder& rBorder);
- SvBorder GetModelBorder (void) const;
+ VisualState& GetVisualState (void);
- /** The size of the area in which the page number is displayed is
- calculated by the SlideSorterView and then stored in the page
- descriptors so that the contact objects can access them. The
- contact objects can not calculate them on demand because the total
- number of slides is needed to do that and this number is not known
- to the contact objects.
- */
- void SetPageNumberAreaModelSize (const Size& rSize);
- Size GetPageNumberAreaModelSize (void) const;
-
- /** Set or revoke the state of this slide being the current slide.
- */
- void SetIsCurrentPage (const bool bIsCurrent);
+ Rectangle GetBoundingBox (void) const;
+ Point GetLocation (const bool bIgnoreLocation = false) const;
+ void SetBoundingBox (const Rectangle& rBoundingBox);
private:
SdPage* mpPage;
css::uno::Reference<css::drawing::XDrawPage> mxPage;
- /** This index is displayed as page number in the view. It may or may
- not be actual page index.
- */
- const sal_Int32 mnIndex;
-
- /// The factory that is used to create PageObject objects.
- const controller::PageObjectFactory* mpPageObjectFactory;
+ SdrPage const* mpMasterPage;
- /** The page object will be destroyed by the page into which it has
- been inserted.
+ /** This index is displayed as page number in the view. It may or may
+ not be the actual page index.
*/
- view::PageObject* mpPageObject;
-
- bool mbIsSelected;
- bool mbIsVisible;
- bool mbIsFocused;
- bool mbIsCurrent;
+ sal_Int32 mnIndex;
- view::PageObjectViewObjectContact* mpViewObjectContact;
+ Rectangle maBoundingBox;
+ VisualState maVisualState;
- /// The borders in model coordinates arround the page object.
- SvBorder maModelBorder;
+ bool mbIsSelected : 1;
+ bool mbWasSelected : 1;
+ bool mbIsVisible : 1;
+ bool mbIsFocused : 1;
+ bool mbIsCurrent : 1;
+ bool mbIsMouseOver : 1;
- /// The size of the page number area in model coordinates.
- Size maPageNumberAreaModelSize;
// Do not use the copy constructor operator. It is not implemented.
PageDescriptor (const PageDescriptor& rDescriptor);
diff --git a/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx b/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx
new file mode 100644
index 000000000000..03b242fdd29a
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VISUAL_STATE_HXX
+#define SD_SLIDESORTER_VISUAL_STATE_HXX
+
+#include <sal/types.h>
+#include <tools/gen.hxx>
+#include <boost/function.hpp>
+
+namespace sd { namespace slidesorter { namespace model {
+
+class PageDescriptor;
+
+/** This class gives access to values related to the visualization of page
+ objects. This includes animation state when blending from one state to
+ another.
+*/
+class VisualState
+{
+public:
+ enum State {
+ VS_Selected,
+ VS_Focused,
+ VS_Current,
+ VS_Excluded,
+ VS_None };
+
+ VisualState (const sal_Int32 nPageId);
+ ~VisualState (void);
+
+ State GetCurrentVisualState (void) const;
+ State GetOldVisualState (void) const;
+ void SetVisualState (const State eState);
+ double GetVisualStateBlend (void) const;
+ void SetVisualStateBlend (const double nBlend);
+
+ void UpdateVisualState (const PageDescriptor& rDescriptor);
+
+ void SetMouseOverState (const bool bIsMouseOver);
+
+ sal_Int32 GetStateAnimationId (void) const;
+ void SetStateAnimationId (const sal_Int32 nAnimationId);
+
+ Point GetLocationOffset (void) const;
+ bool SetLocationOffset (const Point& rPoint);
+ sal_Int32 GetLocationAnimationId (void) const;
+ void SetLocationAnimationId (const sal_Int32 nAnimationId);
+
+ double GetButtonAlpha (void) const;
+ void SetButtonAlpha (const double nAlpha);
+ double GetButtonBarAlpha (void) const;
+ void SetButtonBarAlpha (const double nAlpha);
+ sal_Int32 GetButtonAlphaAnimationId (void) const;
+ void SetButtonAlphaAnimationId (const sal_Int32 nAnimationId);
+
+ sal_Int32 mnPageId; // For debugging
+
+private:
+ State meCurrentVisualState;
+ State meOldVisualState;
+ double mnVisualStateBlend;
+ sal_Int32 mnStateAnimationId;
+ bool mbOldMouseOverState;
+ bool mbCurrentMouseOverState;
+
+ Point maLocationOffset;
+ sal_Int32 mnLocationAnimationId;
+
+ double mnButtonAlpha;
+ double mnButtonBarAlpha;
+ sal_Int32 mnButtonAlphaAnimationId;
+};
+
+} } } // end of namespace ::sd::slidesorter::model
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
index 2ef520b1df89..f28287b15a0e 100755..100644
--- a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
@@ -28,28 +28,29 @@
#ifndef SD_SLIDESORTER_SLIDE_SORTER_VIEW_HXX
#define SD_SLIDESORTER_SLIDE_SORTER_VIEW_HXX
-#include "View.hxx"
-
+#include "SlideSorter.hxx"
+#include "model/SlsPageDescriptor.hxx"
#include "model/SlsSharedPageDescriptor.hxx"
+#include "view/SlsLayouter.hxx"
+#include "view/SlsILayerPainter.hxx"
+#include "View.hxx"
#include <sfx2/viewfrm.hxx>
#include "pres.hxx"
#include <tools/gen.hxx>
+#include <svx/svdmodel.hxx>
+#include <vcl/region.hxx>
+#include <vcl/outdev.hxx>
+#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
#include <memory>
#include <boost/shared_ptr.hpp>
+#include <boost/noncopyable.hpp>
class Point;
-namespace sdr { namespace contact {
-class ObjectContact;
-} }
-
-namespace sd { namespace slidesorter {
-class SlideSorter;
-} }
-
namespace sd { namespace slidesorter { namespace controller {
class SlideSorterController;
+class Properties;
} } }
namespace sd { namespace slidesorter { namespace cache {
@@ -62,15 +63,20 @@ class SlideSorterModel;
namespace sd { namespace slidesorter { namespace view {
+class ButtonBar;
+class LayeredDevice;
class Layouter;
-class ViewOverlay;
+class PageObjectPainter;
+class SelectionPainter;
+class ToolTip;
class SlideSorterView
- : public View
+ : public sd::View,
+ public ::boost::noncopyable
{
public:
- TYPEINFO();
+ TYPEINFO ();
/** Create a new view for the slide sorter.
@param rViewShell
@@ -79,53 +85,24 @@ public:
*/
SlideSorterView (SlideSorter& rSlideSorter);
+ void Init (void);
virtual ~SlideSorterView (void);
+ void Dispose (void);
- enum Orientation { HORIZONTAL, VERTICAL };
- void SetOrientation (const Orientation eOrientation);
- Orientation GetOrientation (void) const;
+ /** Set the general way of layouting the page objects. Note that this
+ method does not trigger any repaints or layouts.
+ */
+ bool SetOrientation (const Layouter::Orientation eOrientation);
+ Layouter::Orientation GetOrientation (void) const;
void RequestRepaint (void);
void RequestRepaint (const model::SharedPageDescriptor& rDescriptor);
+ void RequestRepaint (const Rectangle& rRepaintBox);
+ void RequestRepaint (const Region& rRepaintRegion);
Rectangle GetModelArea (void);
- enum CoordinateSystem { CS_SCREEN, CS_MODEL };
- enum BoundingBoxType { BBT_SHAPE, BBT_INFO };
-
- /** Return the rectangle that bounds the page object represented by the
- given page descriptor.
- @param rDescriptor
- The descriptor of the page for which to return the bounding box.
- @param eCoordinateSystem
- Specifies whether to return the screen or model coordinates.
- @param eBoundingBoxType
- Specifies whether to return the bounding box of only the page
- object or the one that additionally includes other displayed
- information like page name and fader symbol.
- */
- Rectangle GetPageBoundingBox (
- const model::SharedPageDescriptor& rpDescriptor,
- CoordinateSystem eCoordinateSystem,
- BoundingBoxType eBoundingBoxType) const;
-
- /** Return the rectangle that bounds the page object represented by the
- given page index .
- @param nIndex
- The index of the page for which to return the bounding box.
- @param eCoordinateSystem
- Specifies whether to return the screen or model coordinates.
- @param eBoundingBoxType
- Specifies whether to return the bounding box of only the page
- object or the one that additionally includes other displayed
- information like page name and fader symbol.
- */
- Rectangle GetPageBoundingBox (
- sal_Int32 nIndex,
- CoordinateSystem eCoordinateSystem,
- BoundingBoxType eBoundingBoxType) const;
-
/** Return the index of the page that is rendered at the given position.
@param rPosition
The position is expected to be in pixel coordinates.
@@ -163,12 +140,17 @@ public:
void HandleDrawModeChange (void);
virtual void Resize (void);
- virtual void CompleteRedraw (OutputDevice* pDevice, const Region& rPaintArea, sdr::contact::ViewObjectContactRedirector* pRedirector = 0L);
- virtual void InvalidateOneWin (
- ::Window& rWindow);
- virtual void InvalidateOneWin (
- ::Window& rWindow,
- const Rectangle& rPaintArea );
+ virtual void CompleteRedraw (
+ OutputDevice* pDevice,
+ const Region& rPaintArea,
+ sdr::contact::ViewObjectContactRedirector* pRedirector = NULL);
+ void Paint (OutputDevice& rDevice, const Rectangle& rRepaintArea);
+
+ virtual void ConfigurationChanged (
+ utl::ConfigurationBroadcaster* pBroadcaster,
+ sal_uInt32 nHint);
+
+ void HandleDataChangeEvent (void);
void Layout (void);
/** This tells the view that it has to re-determine the visibility of
@@ -178,13 +160,10 @@ public:
/** Return the window to which this view renders its output.
*/
- ::sd::Window* GetWindow (void) const;
-
+ // ::boost::shared_ptr<sd::Window> GetWindow (void) const;
::boost::shared_ptr<cache::PageCache> GetPreviewCache (void);
- view::ViewOverlay& GetOverlay (void);
-
/** Set the bounding box of the insertion marker in model coordinates.
It will be painted as a dark rectangle that fills the given box.
@@ -205,19 +184,18 @@ public:
*/
void SetSelectionRectangleVisibility (bool bVisible);
- typedef ::std::pair<sal_Int32,sal_Int32> PageRange;
/** Return the range of currently visible page objects including the
first and last one in that range.
@return
The returned pair of page object indices is empty when the
second index is lower than the first.
*/
- PageRange GetVisiblePageRange (void);
+ Pair GetVisiblePageRange (void);
/** Add a shape to the page. Typically used from inside
PostModelChange().
*/
- void AddSdrObject (SdrObject& rObject);
+ // void AddSdrObject (SdrObject& rObject);
/** Add a listener that is called when the set of visible slides.
@param rListener
@@ -234,71 +212,87 @@ public:
*/
void RemoveVisibilityChangeListener (const Link& rListener);
+ /** The page under the mouse is not highlighted in some contexts. Call
+ this method on context changes.
+ */
+ void UpdatePageUnderMouse (bool bAnimate);
+ void UpdatePageUnderMouse (
+ const Point& rMousePosition,
+ const bool bIsMouseButtonDown,
+ const bool bAnimate = true);
+ void UpdatePageUnderMouse (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point& rMousePosition,
+ const bool bIsMouseButtonDown,
+ const bool bAnimate = true);
+ void SetPageUnderMouse (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bAnimate = true);
+
+ bool SetState (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const model::PageDescriptor::State eState,
+ const bool bStateValue,
+ const bool bAnimate = true);
+
+ void UpdateOrientation (void);
+
+ ::boost::shared_ptr<PageObjectPainter> GetPageObjectPainter (void);
+ ::boost::shared_ptr<LayeredDevice> GetLayeredDevice (void) const;
+
+ class DrawLock
+ {
+ public:
+ DrawLock (view::SlideSorterView& rView, const SharedSdWindow& rpWindow);
+ DrawLock (SlideSorter& rSlideSorter);
+ ~DrawLock (void);
+ /** When the DrawLock is disposed then it will not request a repaint
+ on destruction.
+ */
+ void Dispose (void);
+ private:
+ view::SlideSorterView& mrView;
+ SharedSdWindow mpWindow;
+ };
+
+ ButtonBar& GetButtonBar (void) const;
+ ToolTip& GetToolTip (void) const;
+
protected:
virtual void Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint);
private:
SlideSorter& mrSlideSorter;
model::SlideSorterModel& mrModel;
- /// This model is used for the maPage object and for the page visualizers
- /// (SdrPageObj)
- SdrModel maPageModel;
- /** This page acts as container for the page objects that represent the
- pages of the document that is represented by the SlideSorterModel.
- */
- SdrPage* mpPage;
+ bool mbIsDisposed;
::std::auto_ptr<Layouter> mpLayouter;
bool mbPageObjectVisibilitiesValid;
::boost::shared_ptr<cache::PageCache> mpPreviewCache;
- ::std::auto_ptr<ViewOverlay> mpViewOverlay;
-
- int mnFirstVisiblePageIndex;
- int mnLastVisiblePageIndex;
-
- SvBorder maPagePixelBorder;
-
+ ::boost::shared_ptr<LayeredDevice> mpLayeredDevice;
+ Range maVisiblePageRange;
bool mbModelChangedWhileModifyEnabled;
-
Size maPreviewSize;
-
bool mbPreciousFlagUpdatePending;
-
- Size maPageNumberAreaModelSize;
- SvBorder maModelBorder;
-
- Orientation meOrientation;
-
+ Layouter::Orientation meOrientation;
+ ::boost::shared_ptr<controller::Properties> mpProperties;
+ model::SharedPageDescriptor mpPageUnderMouse;
+ sal_Int32 mnButtonUnderMouse;
+ ::boost::shared_ptr<PageObjectPainter> mpPageObjectPainter;
+ ::boost::shared_ptr<SelectionPainter> mpSelectionPainter;
+ Region maRedrawRegion;
+ SharedILayerPainter mpBackgroundPainter;
+ ::boost::scoped_ptr<ButtonBar> mpButtonBar;
+ ::boost::scoped_ptr<ToolTip> mpToolTip;
+ bool mbIsRearrangePending;
::std::vector<Link> maVisibilityChangeListeners;
- /** Adapt the coordinates of the given bounding box according to the
- other parameters.
- @param rModelPageObjectBoundingBox
- Bounding box given in model coordinates that bounds only the
- page object.
- @param eCoordinateSystem
- When CS_SCREEN is given then the bounding box is converted into
- screen coordinates.
- @param eBoundingBoxType
- When BBT_INFO is given then the bounding box is made larger so
- that it encloses all relevant displayed information.
- */
- void AdaptBoundingBox (
- Rectangle& rModelPageObjectBoundingBox,
- CoordinateSystem eCoordinateSystem,
- BoundingBoxType eBoundingBoxType) const;
-
/** Determine the visibility of all page objects.
*/
void DeterminePageObjectVisibilities (void);
- /** Update the page borders used by the layouter by using those returned
- by the first page. Call this function when the model changes,
- especially when the number of pages changes, or when the window is
- resized as the borders may be device dependent.
- */
- void UpdatePageBorders (void);
-
void UpdatePreciousFlags (void);
+ void RequestRearrange (void);
+ void Rearrange (void);
};
diff --git a/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx b/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx
new file mode 100644
index 000000000000..460c915f8a56
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx
@@ -0,0 +1,362 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VIEW_BUTTON_BAR_HXX
+#define SD_SLIDESORTER_VIEW_BUTTON_BAR_HXX
+
+#include "model/SlsSharedPageDescriptor.hxx"
+#include <tools/gen.hxx>
+#include <rtl/ustring.hxx>
+#include <vcl/bitmapex.hxx>
+#include <vcl/bmpacc.hxx>
+#include <boost/scoped_ptr.hpp>
+
+namespace sd { namespace slidesorter {
+class SlideSorter;
+} }
+
+
+namespace sd { namespace slidesorter { namespace view {
+
+class Theme;
+
+class Button;
+typedef ::boost::shared_ptr<Button> SharedButton;
+
+/** This is a container of buttons and a coordinating controller.
+ The last means that it receives mouse events and forwards them to
+ the right button.
+*/
+class ButtonBar
+{
+public:
+ ButtonBar (SlideSorter& rSlideSorter);
+ ~ButtonBar (void);
+
+ void ProcessButtonDownEvent (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point aMouseModelLocation);
+ void ProcessButtonUpEvent (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point aMouseModelLocation);
+ void ProcessMouseMotionEvent (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point aMouseModelLocation,
+ const bool bIsMouseButtonDown);
+
+ void ResetPage (void);
+
+ /** Return the number of buttons that are to be displayed in page
+ objects which the mouse hovers over.
+ @param bIsExcluded
+ When this flag is <TRUE/> then return the number of
+ buttons that is to be displayed for pages that are
+ excluded from the slide show.
+ */
+ sal_Int32 GetButtonCount (const bool bIsExcluded) const;
+
+ /** Return the specified button.
+ @param nIndex
+ Valid values lie in the range [0,GetButtonCount()).
+ @param bIsExcluded
+ When this flag is <TRUE/> then return a button that is to
+ be displayed for pages that are excluded from the slide
+ show.
+ @return
+ Returns an empty pointer when the given index is not valid.
+ */
+ ::boost::shared_ptr<Button> GetButton (
+ const bool bIsExcluded,
+ const sal_Int32 nIndex) const;
+
+ bool IsMouseOverBar (void) const;
+
+ /** Paint the specified page object. When this is not the same as the
+ one under the mouse (mpDescriptor) then the buttons are all
+ painted in their normal state.
+ */
+ void Paint (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpPageDescriptor);
+
+ bool IsMouseOverButton (void) const;
+
+ void RequestLayout (void);
+
+ /** Return the help text for the button under the mouse.
+ @return
+ When the mouse is not over a button then an empty string
+ is returned.
+ */
+ ::rtl::OUString GetButtonHelpText (void) const;
+
+ /** Request the button bar to be shown.
+ @param bAnimate
+ This flag controls whether to just show the button bar (<FALSE/>)
+ or to fade it in smoothly (<TRUE/>.)
+ */
+ void RequestFadeIn (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bAnimate);
+
+ /** Request the button bar to be hidden.
+ @param bAnimate
+ This flag controls whether to just hide the button bar (<FALSE/>)
+ or to fade it out smoothly (<TRUE/>.)
+ */
+ void RequestFadeOut (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bAnimate);
+
+ /** Return whether the button bar is visible for the givn descriptor (or
+ being faded in.)
+ */
+ bool IsVisible (const model::SharedPageDescriptor& rpDescriptor);
+
+ void HandleDataChangeEvent (void);
+
+ class BackgroundTheme;
+
+ /** While at least one Lock object exists the button bar will not be
+ displayed. Used, e.g. during a mouse multiselection to avoid
+ confusing and unhelpfull visual signals.
+ */
+ class Lock
+ {
+ public:
+ Lock (SlideSorter& rSlideSorter);
+ ~Lock (void);
+ private:
+ ButtonBar& mrButtonBar;
+ };
+
+private:
+ SlideSorter& mrSlideSorter;
+ Size maPageObjectSize;
+ Rectangle maButtonBoundingBox;
+ Point maBackgroundLocation;
+ model::SharedPageDescriptor mpDescriptor;
+ bool mbIsExcluded;
+ boost::shared_ptr<Button> mpButtonUnderMouse;
+ // The button on which the mouse button was pressed.
+ boost::shared_ptr<Button> mpDownButton;
+ ::std::vector<SharedButton> maRegularButtons;
+ ::std::vector<SharedButton> maExcludedButtons;
+ BitmapEx maNormalBackground;
+ BitmapEx maButtonDownBackground;
+ bool mbIsMouseOverBar;
+ ::boost::scoped_ptr<BackgroundTheme> mpBackgroundTheme;
+ int mnLockCount;
+
+ /** Remember the specified page. If it differs from mpDescriptor then
+ the buttons are placed anew.
+ @return
+ The returned flag indicates wether the mpDescriptor member
+ is set to a new value.
+ */
+ bool SetPage (const model::SharedPageDescriptor& rpDescriptor);
+ SharedButton GetButtonAt (const Point aModelLocation);
+ bool SetButtonUnderMouse (const SharedButton& rButton = SharedButton());
+ void PaintButtonBackground (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpPageDescriptor,
+ const Point aOffset);
+ void LayoutButtons (const Size aPageModelSize);
+ bool LayoutButtons (void);
+ BitmapEx CreateBackground (
+ const OutputDevice& rTemplateDevice,
+ const bool bIsButtonDown) const;
+ bool IsMouseOverBar (const Point aModelLocation) const;
+ void StartFadeAnimation (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const double nTargetAlpha,
+ const bool bFadeIn);
+
+ void AcquireLock (void);
+ void ReleaseLock (void);
+};
+
+
+
+
+class Button
+{
+public:
+ Button (
+ SlideSorter& rSlideSorter,
+ const ::rtl::OUString& rsHelpText);
+ virtual ~Button (void);
+
+ enum State { State_Normal, State_Hover, State_Down };
+ enum IconSize { IconSize_Large, IconSize_Medium, IconSize_Small };
+
+ /** Set a new state.
+ @return
+ When the new state is different from the old state
+ then <TRUE/> is returned.
+ */
+ bool SetState (const State eState);
+ State GetState (void) const;
+
+ virtual void Place (const Rectangle aButtonBarBox) = 0;
+ virtual void Paint (
+ OutputDevice& rDevice,
+ const Point aOffset,
+ const double nAlpha,
+ const ::boost::shared_ptr<Theme>& rpTheme) const = 0;
+ virtual void ProcessClick (const model::SharedPageDescriptor& rpDescriptor) = 0;
+
+ /** Return the bounding box of the layouted button.
+ */
+ Rectangle GetBoundingBox (void) const;
+ /** Return the minimum size required to completely paint the
+ button.
+ */
+ virtual Size GetSize (void) const = 0;
+ virtual Size GetSize (const IconSize eIconSize) const = 0;
+ ::rtl::OUString GetHelpText (void) const;
+ bool IsDown (void) const;
+ void SetActiveState (const bool bIsActive);
+ bool IsActive (void) const;
+ void SetIconSize (const IconSize eIconSize);
+ IconSize GetIconSize (void) const;
+ /** By default a button is always enabled. Override to change this.
+ */
+ virtual bool IsEnabled (void) const;
+
+protected:
+ SlideSorter& mrSlideSorter;
+ State meState;
+ Rectangle maBoundingBox;
+ const ::rtl::OUString msHelpText;
+ // Buttons that lie (partly) outside the button bar are deactivated.
+ bool mbIsActive;
+ IconSize meIconSize;
+};
+
+
+
+class TextButton : public Button
+{
+public:
+ TextButton (
+ SlideSorter& rSlideSorter,
+ const ::rtl::OUString& rsText,
+ const ::rtl::OUString& rsHelpText);
+
+ virtual void Place (const Rectangle aButtonBarBox);
+ virtual void Paint (
+ OutputDevice& rDevice,
+ const Point aOffset,
+ const double nAlpha,
+ const ::boost::shared_ptr<Theme>& rpTheme) const;
+ virtual Size GetSize (void) const;
+ virtual Size GetSize (const IconSize eIconSize) const;
+
+private:
+ const ::rtl::OUString msText;
+};
+
+
+
+class ImageButton : public Button
+{
+public:
+ ImageButton (
+ SlideSorter& rSlideSorter,
+ const BitmapEx& rLargeIcon,
+ const BitmapEx& rLargeHoverIcon,
+ const BitmapEx& rMediumIcon,
+ const BitmapEx& rMediumHoverIcon,
+ const BitmapEx& rSmallIcon,
+ const BitmapEx& rSmallHoverIcon,
+ const ::rtl::OUString& rsHelpText);
+
+ virtual void Place (const Rectangle aButtonBarBox);
+ virtual void Paint (
+ OutputDevice& rDevice,
+ const Point aOffset,
+ const double nAlpha,
+ const ::boost::shared_ptr<Theme>& rpTheme) const;
+ virtual Size GetSize (void) const;
+ virtual Size GetSize (const IconSize eIconSize) const;
+
+private:
+ const BitmapEx maLargeIcon;
+ const BitmapEx maLargeHoverIcon;
+ const BitmapEx maMediumIcon;
+ const BitmapEx maMediumHoverIcon;
+ const BitmapEx maSmallIcon;
+ const BitmapEx maSmallHoverIcon;
+};
+
+
+class UnhideButton : public ImageButton
+{
+public:
+ UnhideButton (SlideSorter& rSlideSorter);
+
+protected:
+ virtual void ProcessClick (const model::SharedPageDescriptor& rpDescriptor);
+};
+
+
+class StartShowButton : public ImageButton
+{
+public:
+ StartShowButton (SlideSorter& rSlideSorter);
+ virtual bool IsEnabled (void) const;
+
+protected:
+ virtual void ProcessClick (const model::SharedPageDescriptor& rpDescriptor);
+};
+
+
+class HideButton : public ImageButton
+{
+public:
+ HideButton (SlideSorter& rSlideSorter);
+
+protected:
+ virtual void ProcessClick (const model::SharedPageDescriptor& rpDescriptor);
+};
+
+
+class DuplicateButton : public ImageButton
+{
+public:
+ DuplicateButton (SlideSorter& rSlideSorter);
+ virtual bool IsEnabled (void) const;
+
+protected:
+ virtual void ProcessClick (const model::SharedPageDescriptor& rpDescriptor);
+};
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/tools/inc/tools/download.hxx b/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx
index b187433927cd..853890ee5894 100644
--- a/tools/inc/tools/download.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx
@@ -25,32 +25,36 @@
*
************************************************************************/
-#ifndef _DOWNLOAD_HXX
-#define _DOWNLOAD_HXX
-
-// Forward declarations
-class String;
-class Link;
-
-#define DOWNLOAD_SUCCESS 0
-#define DOWNLOAD_CONNECT 1
-#define DOWNLOAD_LOCATION 2
-#define DOWNLOAD_ABORT 3
-#define DOWNLOAD_FILEACCESS 4
-#define DOWNLOAD_INSTALL 5
-#define DOWNLOAD_ERROR 6
-
-class Downloader
-/* ***************************************************************************
-Purpose: Abstract base class for a file downloader
-*************************************************************************** */
+#ifndef SD_SLIDESORTER_VIEW_LAYER_PAINTER_HXX
+#define SD_SLIDESORTER_VIEW_LAYER_PAINTER_HXX
+
+#include <boost/shared_ptr.hpp>
+#include <sal/types.h>
+
+class OutputDevice;
+class Rectangle;
+
+namespace sd { namespace slidesorter { namespace view {
+
+class ILayerInvalidator
{
public:
- Downloader() {};
+ virtual void Invalidate (const Rectangle& rInvalidationBox) = 0;
+};
+typedef ::boost::shared_ptr<ILayerInvalidator> SharedILayerInvalidator;
- virtual void Download(const String &rDestLocation,
- const String &rSourceLocation,
- const Link &rFinishedLink) = 0;
+class ILayerPainter
+{
+public:
+ virtual void SetLayerInvalidator (
+ const SharedILayerInvalidator& rpInvalidator) = 0;
+ virtual void Paint (
+ OutputDevice& rDevice,
+ const Rectangle& rRepaintArea) = 0;
};
+typedef ::boost::shared_ptr<ILayerPainter> SharedILayerPainter;
+
+
+} } } // end of namespace ::sd::slidesorter::view
#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx b/sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx
new file mode 100644
index 000000000000..cfd789818408
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VIEW_INSERT_ANIMATOR_HXX
+#define SD_SLIDESORTER_VIEW_INSERT_ANIMATOR_HXX
+
+#include "controller/SlsAnimator.hxx"
+#include <boost/scoped_ptr.hpp>
+#include <boost/noncopyable.hpp>
+
+namespace sd { namespace slidesorter { namespace view {
+
+class InsertPosition;
+
+
+/** Animate the positions of page objects to make room at the insert
+ position while a move or copy operation takes place.
+*/
+class InsertAnimator
+ : private ::boost::noncopyable
+{
+public:
+ InsertAnimator (SlideSorter& rSlideSorter);
+
+ /** Set the position at which we have to make room for the display of an
+ icon.
+ */
+ void SetInsertPosition (const InsertPosition& rInsertPosition);
+
+ enum ResetMode { RM_Normal, RM_AbortAnimations };
+ /** Restore the normal position of all page objects.
+ @param eMode
+ This flag controls wether to start an animation that ends in the
+ normal positions of all slides (AM_Animated) or to restore the
+ normal positions immediately (AM_Immediate).
+ */
+ void Reset (const controller::Animator::AnimationMode eMode);
+
+private:
+ class Implementation;
+ ::boost::shared_ptr<Implementation> mpImplementation;
+};
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx b/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx
new file mode 100644
index 000000000000..a9a640d978cf
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx
@@ -0,0 +1,131 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_INSERTION_INDICATOR_OVERLAY_HXX
+#define SD_SLIDESORTER_INSERTION_INDICATOR_OVERLAY_HXX
+
+#include "model/SlsSharedPageDescriptor.hxx"
+#include "view/SlsILayerPainter.hxx"
+#include "controller/SlsTransferable.hxx"
+
+#include <tools/gen.hxx>
+#include <vcl/bitmapex.hxx>
+#include <boost/scoped_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <vector>
+
+class OutputDevice;
+class SdPage;
+
+namespace sd { namespace slidesorter {
+class SlideSorter;
+} }
+
+namespace sd { namespace slidesorter { namespace model {
+class PageEnumeration;
+} } }
+
+namespace sd { namespace slidesorter { namespace controller {
+class Transferable;
+} } }
+
+namespace sd { namespace slidesorter { namespace view {
+
+class FramePainter;
+class LayeredDevice;
+
+/** The insertion indicator is painted as a vertical or horizonal bar
+ in the space between slides.
+*/
+class InsertionIndicatorOverlay
+ : public ILayerPainter,
+ public ::boost::enable_shared_from_this<InsertionIndicatorOverlay>
+{
+public:
+ InsertionIndicatorOverlay (SlideSorter& rSlideSorter);
+ virtual ~InsertionIndicatorOverlay (void);
+
+ virtual void SetLayerInvalidator (const SharedILayerInvalidator& rpInvalidator);
+
+ void Create (const controller::Transferable* pTransferable);
+
+ /** Given a position in model coordinates this method calculates the
+ insertion marker both as an index in the document and as a location
+ used for drawing the insertion indicator.
+ */
+ void SetLocation (const Point& rPosition);
+
+ Size GetSize (void) const;
+
+ virtual void Paint (
+ OutputDevice& rDevice,
+ const Rectangle& rRepaintArea);
+
+ bool IsVisible (void) const;
+ void Hide (void);
+ void Show (void);
+
+ Rectangle GetBoundingBox (void) const;
+
+private:
+ SlideSorter& mrSlideSorter;
+ bool mbIsVisible;
+ const sal_Int32 mnLayerIndex;
+ SharedILayerInvalidator mpLayerInvalidator;
+ // Center of the insertion indicator.
+ Point maLocation;
+ BitmapEx maIcon;
+ Point maIconOffset;
+ ::boost::scoped_ptr<FramePainter> mpShadowPainter;
+
+ void SetPositionAndSize (const Rectangle& rBoundingBox);
+ void SelectRepresentatives (
+ model::PageEnumeration& rSelection,
+ ::std::vector<model::SharedPageDescriptor>& rDescriptors) const;
+ Point PaintRepresentatives (
+ OutputDevice& rContent,
+ const Size aPreviewSize,
+ const sal_Int32 nOffset,
+ const ::std::vector<controller::Transferable::Representative>& rPages) const;
+ void PaintPageCount (
+ OutputDevice& rDevice,
+ const sal_Int32 nSelectionCount,
+ const Size aPreviewSize,
+ const Point aFirstPageOffset) const;
+ /** Setup the insertion indicator by creating the icon. It consists of
+ scaled down previews of some of the selected pages.
+ */
+ void Create (
+ const ::std::vector<controller::Transferable::Representative>& rPages,
+ const sal_Int32 nSelectionCount);
+};
+
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx
index 9b1fd996e9c0..4d19e41e881b 100755..100644
--- a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx
@@ -28,18 +28,26 @@
#ifndef SD_SLIDESORTER_VIEW_LAYOUTER_HXX
#define SD_SLIDESORTER_VIEW_LAYOUTER_HXX
+#include "SlideSorter.hxx"
+#include "view/SlsPageObjectLayouter.hxx"
+#include "view/SlsTheme.hxx"
#include <sal/types.h>
#include <tools/fract.hxx>
#include <vcl/mapmod.hxx>
#include <vector>
#include <utility>
+
class MapMode;
class OutputDevice;
class Size;
namespace sd { namespace slidesorter { namespace view {
+class InsertPosition;
+
+
+
/** Calculate the size and position of page objects displayed by a slide
sorter. The layouter takes into account various input values:
1.) Size of the window in which the slide sorter is displayed.
@@ -66,9 +74,14 @@ namespace sd { namespace slidesorter { namespace view {
class Layouter
{
public:
- Layouter (void);
+ enum Orientation { HORIZONTAL, VERTICAL, GRID };
+
+ Layouter (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<Theme>& rpTheme);
~Layouter (void);
+ ::boost::shared_ptr<PageObjectLayouter> GetPageObjectLayouter (void) const;
/** Set the horizontal and vertical borders in pixel coordinates between
the enclosing window and page objects. The borders may be painted
larger then the given values when the space for the insertion marker
@@ -89,23 +102,6 @@ public:
void SetBorders (sal_Int32 nLeftBorder, sal_Int32 nRightBorder,
sal_Int32 nTopBorder, sal_Int32 nBottomBorder);
- /** Set the borders arround every page object.
- @param nLeftBorder
- A negative value indicates that the left border shall not be
- modified. A value of 0 is the default.
- @param nRightBorder
- A negative value indicates that the left border shall not be
- modified. A value of 0 is the default.
- @param nTopBorder
- A negative value indicates that the left border shall not be
- modified. A value of 0 is the default.
- @param nBottomBorder
- A negative value indicates that the left border shall not be
- modified. A value of 0 is the default.
- */
- void SetPageBorders (sal_Int32 nLeftBorder, sal_Int32 nRightBorder,
- sal_Int32 nTopBorder, sal_Int32 nBottomBorder);
-
/** Set the interval of valid column counts. When nMinimalColumnCount
<= nMaximalColumnCount is not fullfilled then the call is ignored.
@param nMinimalColumnCount
@@ -120,37 +116,46 @@ public:
/** Central method of this class. It takes the input values and
calculates the output values. Both given sizes must not be 0 in any
dimension or the call is ignored.
+ @param eOrientation
+ This defines the generaly layout and specifies whether there may
+ be more than one row or more than one column.
@param rWindowSize
The size of the window in pixels that the slide sorter is
- displayed in.
- @param rPageObjectSize
+ displayed in. This can differ from the size of mpWindow during
+ detection of whether or not the scroll bars should be visible.
+ @param rPreviewModelSize
Size of each page in model coordinates.
- @param pDevice
- The map mode of this output device is adapted to the new layout
- of the page objects.
+ @param rpWindow
+ The map mode of this window is adapted to the new layout of the
+ page objects.
@return
The return value indicates whether the Get... methods can be
used to obtain valid values (<TRUE/>).
*/
- bool RearrangeHorizontal (
+ bool Rearrange (
+ const Orientation eOrientation,
const Size& rWindowSize,
- const Size& rPageObjectSize,
- OutputDevice* pDevice,
+ const Size& rPreviewModelSize,
const sal_uInt32 nPageCount);
- bool RearrangeVertical (
- const Size& rWindowSize,
- const Size& rPageObjectSize,
- OutputDevice* pDevice);
/** Change the zoom factor. This does not change the general layout
(number of columns).
*/
- void SetZoom (Fraction nZoomFactor, OutputDevice* pDevice);
+ void _SetZoom (double nZoomFactor);
+ void _SetZoom (Fraction nZoomFactor);
/** Return the number of columns.
*/
sal_Int32 GetColumnCount (void) const;
+ sal_Int32 GetRowCount (void) const;
+
+ sal_Int32 GetRow (const sal_Int32 nIndex) const;
+
+ sal_Int32 GetColumn (const sal_Int32 nIndex) const;
+
+ sal_Int32 GetIndex (const sal_Int32 nRow, const sal_Int32 nColumn) const;
+
/** Return the scale factor that can be set at the map mode of the
output window.
*/
@@ -158,52 +163,25 @@ public:
Size GetPageObjectSize (void) const;
- /** Return the bounding box in model coordinates of the nIndex-th page
+ /** Return the bounding box in window coordinates of the nIndex-th page
object.
*/
- Rectangle GetPageObjectBox (sal_Int32 nIndex) const;
+ Rectangle GetPageObjectBox (
+ const sal_Int32 nIndex,
+ const bool bIncludeBorderAndGap = false) const;
/** Return the bounding box in model coordinates of the page that
contains the given amount of page objects.
*/
- Rectangle GetPageBox (sal_Int32 nObjectCount) const;
-
- /** Return the rectangle that bounds the insertion marker that is
- specified by the parameters.
- @param nIndex
- Index of the page object from which the position of the marker
- will be calculated.
- @param bVertical
- When <TRUE/> then the insertion marker will be calculated with a
- vertical orientation positioned to the left or right of the
- specified page object. A horizontal orientation is indicated by
- <FALSE/>. In this case the marker will be positioned above or
- below the page object.
- @param bLeftOrTop
- This flag indicates whether the insertion marker will be
- positioned above or to the left (<TRUE/>) the page object. When
- <FALSE/> is given then the marker will be positioned below or to
- the right of the page object.
- */
- Rectangle GetInsertionMarkerBox (
- sal_Int32 nIndex,
- bool bVertical,
- bool bLeftOrTop) const;
+ Rectangle GetTotalBoundingBox (void) const;
/** Return the index of the first fully or partially visible page
object. This takes into account only the vertical dimension.
- */
- sal_Int32 GetIndexOfFirstVisiblePageObject (
- const Rectangle& rVisibleArea) const;
-
- /** Return the index of the last fully or partially visible page
- object. This takes into account only the vertical dimension.
@return
- The returned index may be larger than the number of existing
+ The second index may be larger than the number of existing
page objects.
*/
- sal_Int32 GetIndexOfLastVisiblePageObject (
- const Rectangle& rVisibleArea) const;
+ Range GetRangeOfVisiblePageObjects (const Rectangle& rVisibleArea) const;
/** Return the index of the page object that is rendered at the given
point.
@@ -216,167 +194,103 @@ public:
the actual page area the index of that page is returned;
otherwise -1 would be returned to indicate that no page object
has been hit.
+ @param bClampToValidRange
+ When <TRUE/> then values outside the valid range [0,mnPageCount)
+ are mapped to 0 (when smaller than 0) or mnPageCount-1 when
+ equal to or larger than mnPageCount.
+ When <FALSE/> then -1 is returned for values outside the valid range.
@return
The returned index may be larger than the number of existing
page objects.
*/
sal_Int32 GetIndexAtPoint (
const Point& rModelPosition,
- bool bIncludePageBorders = false) const;
-
- /** Return the page index of where to do an insert operation when the
- user would release the the mouse button at the given position after
- a drag operation.
- @param rPosition
+ const bool bIncludePageBorders = false,
+ const bool bClampToValidRange = true) const;
+
+ /** Return an object that describes the logical and visual properties of
+ where to do an insert operation when the user would release the the
+ mouse button at the given position after a drag operation and of
+ where and how to display an insertion indicator.
+ @param rModelPosition
The position in the model coordinate system for which to
determine the insertion page index. The position does not have
to be over a page object to return a valid value.
- @param bAllowVerticalPosition
- When this flag is <TRUE/> then the vertical gaps between rows
- may be taken into account for calculating the insertion index as
- well as the horizontal gaps between columns. This will happen
- only when there is only one column.
- (better name, anyone?)
- @return
- Returns the page index, as accepted by the slide sorter model,
- of the page after which an insertion would take place. An index
- of 0 means that insertion will take place before the first page,
- An index equal to or greater than the page count means to insert
- after the last page.
- A value of -1 indicates that no valid insertion index exists for
- the given point.
+ @param rIndicatorSize
+ The size of the insertion indicator. This size is used to adapt
+ the location when at the left or right of a row or at the top or
+ bottom of a column.
+ @param rModel
+ The model is used to get access to the selection states of the
+ pages. This in turn is used to determine the visual bounding
+ boxes.
*/
- sal_Int32 GetInsertionIndex (
+ InsertPosition GetInsertPosition (
const Point& rModelPosition,
- bool bAllowVerticalPosition) const;
+ const Size& rIndicatorSize,
+ model::SlideSorterModel& rModel) const;
+
+ Range GetValidHorizontalSizeRange (void) const;
+ Range GetValidVerticalSizeRange (void) const;
+
+ class Implementation;
+
+private:
+ ::boost::scoped_ptr<Implementation> mpImplementation;
+ SharedSdWindow mpWindow;
+};
- typedef ::std::pair<double,double> DoublePoint;
- /** Transform a point given in model coordinates in to layouter
- coordinates. Layouter coordinates are floating point numbers where
- the integer part denotes a row or a column and the part after the
- decimal point is a relative position in that row or column.
- */
- DoublePoint ConvertModelToLayouterCoordinates (
- const Point& rModelPoint) const;
- /** Transform a point given in layouter coordinates to model
- coordinates. See ConvertModelToLayouterCoordinates for a
- description of layouter coordinates.
- */
- Point ConvertLayouterToModelCoordinates (
- const DoublePoint&rLayouterPoint) const;
- typedef ::std::vector<Rectangle> BackgroundRectangleList;
+
+
+/** Collect all values concerning the logical and visual properties of the
+ insertion position that is used for drag-and-drop and copy-and-past.
+*/
+class InsertPosition
+{
+public:
+ InsertPosition (void);
+ InsertPosition& operator= (const InsertPosition& rInsertPosition);
+ bool operator== (const InsertPosition& rInsertPosition) const;
+ bool operator!= (const InsertPosition& rInsertPosition) const;
+
+ void SetLogicalPosition (
+ const sal_Int32 nRow,
+ const sal_Int32 nColumn,
+ const sal_Int32 nIndex,
+ const bool bIsAtRunStart,
+ const bool bIsAtRunEnd,
+ const bool bIsExtraSpaceNeeded);
+ void SetGeometricalPosition(
+ const Point aLocation,
+ const Point aLeadingOffset,
+ const Point aTrailingOffset);
+
+ sal_Int32 GetRow (void) const { return mnRow; }
+ sal_Int32 GetColumn (void) const { return mnColumn; }
+ sal_Int32 GetIndex (void) const { return mnIndex; }
+ Point GetLocation (void) const { return maLocation; }
+ Point GetLeadingOffset (void) const { return maLeadingOffset; }
+ Point GetTrailingOffset (void) const { return maTrailingOffset; }
+ bool IsAtRunStart (void) const { return mbIsAtRunStart; }
+ bool IsAtRunEnd (void) const { return mbIsAtRunEnd; }
+ bool IsExtraSpaceNeeded (void) const { return mbIsExtraSpaceNeeded; }
private:
- class ScreenAndModelValue {public:
- sal_Int32 mnScreen,mnModel;
- explicit ScreenAndModelValue (sal_Int32 nScreen, sal_Int32 nModel = 0)
- : mnScreen(nScreen),mnModel(nModel) {}
- };
- ScreenAndModelValue mnRequestedLeftBorder;
- ScreenAndModelValue mnRequestedRightBorder;
- ScreenAndModelValue mnRequestedTopBorder;
- ScreenAndModelValue mnRequestedBottomBorder;
- ScreenAndModelValue mnLeftBorder;
- ScreenAndModelValue mnRightBorder;
- ScreenAndModelValue mnTopBorder;
- ScreenAndModelValue mnBottomBorder;
- ScreenAndModelValue mnLeftPageBorder;
- ScreenAndModelValue mnRightPageBorder;
- ScreenAndModelValue mnTopPageBorder;
- ScreenAndModelValue mnBottomPageBorder;
- ScreenAndModelValue mnVerticalGap;
- ScreenAndModelValue mnHorizontalGap;
- ScreenAndModelValue mnInsertionMarkerThickness;
- ScreenAndModelValue mnTotalVerticalGap;
- ScreenAndModelValue mnTotalHorizontalGap;
- sal_Int32 mnMinimalWidth;
- sal_Int32 mnPreferredWidth;
- sal_Int32 mnMaximalWidth;
- sal_Int32 mnMinimalColumnCount;
- sal_Int32 mnMaximalColumnCount;
- sal_Int32 mnColumnCount;
- Size maPageObjectModelSize;
- Size maPageObjectPixelSize;
-
- BackgroundRectangleList maBackgroundRectangleList;
-
- enum GapMembership { GM_NONE, GM_PREVIOUS, GM_BOTH, GM_NEXT,
- GM_PAGE_BORDER};
-
- /** Calculate the row that the point with the given vertical coordinate
- is over. The horizontal component is ignored.
- @param nYPosition
- Vertical position in model coordinates.
- @param bIncludeBordersAndGaps
- When this flag is <TRUE/> then the area of borders and gaps are
- interpreted as belonging to one of the rows.
- @param eGapMembership
- Specifies to what row the gap areas belong. Here GM_NONE
- corresponds to bIncludeBordersAndGaps being <FALSE/>. When
- GM_BOTH is given then the upper half is associated to the row
- above and the lower half to the row below. Values of
- GM_PREVIOUS and GM_NEXT associate the whole gap area with the
- row above or below respectively.
- */
- sal_Int32 GetRowAtPosition (
- sal_Int32 nYPosition,
- bool bIncludeBordersAndGaps,
- GapMembership eGapMembership = GM_NONE) const;
-
- /** Calculate the column that the point with the given horizontal
- coordinate is over. The verical component is ignored.
- @param nXPosition
- Horizontal position in model coordinates.
- @param bIncludeBordersAndGaps
- When this flag is <TRUE/> then the area of borders and gaps are
- interpreted as belonging to one of the columns.
- @param eGapMembership
- Specifies to what column the gap areas belong. Here GM_NONE
- corresponds to bIncludeBordersAndGaps being <FALSE/>. When
- GM_BOTH is given then the left half is associated with the
- column at the left and the right half with the column to the
- right. Values of GM_PREVIOUS and GM_NEXT associate the whole
- gap area with the column to the left or right respectively.
- */
- sal_Int32 GetColumnAtPosition (
- sal_Int32 nXPosition,
- bool bIncludeBordersAndGaps,
- GapMembership eGapMembership = GM_NONE) const;
-
- /** This method is typically called from GetRowAtPosition() and
- GetColumnAtPosition() to handle a position that lies inside the gap
- between two adjacent rows or columns.
- @param nDistanceIntoGap
- Vertical distance from the bottom of the upper row down into the
- gap or or horizontal distance from the right edge right into the
- gap.
- @param eGapMemberhship
- This value decides what areas in the gap belong to which (or no)
- row or column.
- @param nIndex
- The row index of the upper row or the column index of the left
- column.
- @param nLeftOrTopPageBorder
- Width in model coordinates of the border the the right of or
- below a page.
- @param nGap
- Width or height of the gap in model coordiantes between the
- page borders.
- @return
- Returns either the index of the upper row (as given as nRow), the
- index of the lower row (nRow+1) or -1 to indicate that the
- position belongs to no row.
- */
- sal_Int32 ResolvePositionInGap (
- sal_Int32 nDistanceIntoGap,
- GapMembership eGapMembership,
- sal_Int32 nIndex,
- sal_Int32 nLeftOrTopPageBorder,
- sal_Int32 nGap) const;
+ sal_Int32 mnRow;
+ sal_Int32 mnColumn;
+ sal_Int32 mnIndex;
+ bool mbIsAtRunStart : 1;
+ bool mbIsAtRunEnd : 1;
+ bool mbIsExtraSpaceNeeded : 1;
+ Point maLocation;
+ Point maLeadingOffset;
+ Point maTrailingOffset;
};
+
+
} } } // end of namespace ::sd::slidesorter::view
#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx
new file mode 100644
index 000000000000..8e61a8b1b47c
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx
@@ -0,0 +1,145 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_PAGE_OBJECT_LAYOUTER_HXX
+#define SD_SLIDESORTER_PAGE_OBJECT_LAYOUTER_HXX
+
+#include "SlideSorter.hxx"
+#include "model/SlsSharedPageDescriptor.hxx"
+#include "tools/gen.hxx"
+#include <vcl/image.hxx>
+
+namespace sd { namespace slidesorter { namespace view {
+
+
+/** In contrast to the Layouter that places page objects in the view, the
+ PageObjectLayouter places the parts of individual page objects like page
+ number area, borders, preview.
+*/
+class PageObjectLayouter
+{
+public:
+ /** Create a new PageObjectLayouter object.
+ @param rPageObjectSize
+ In general either the width or the height will be 0 in order to
+ signal that this size component has to be calculated from the other.
+ This calculation will make the preview as large as possible.
+ @param nPageCount
+ The page count is used to determine how wide the page number
+ area has to be, how many digits to except for the largest page number.
+ */
+ PageObjectLayouter(
+ const ::boost::shared_ptr<Theme>& rpTheme,
+ const Size& rPageObjectWindowSize,
+ const Size& rPreviewModelSize,
+ const SharedSdWindow& rpWindow,
+ const sal_Int32 nPageCount);
+ ~PageObjectLayouter(void);
+
+ enum Part {
+ // The focus indicator is painted outside the actual page object.
+ FocusIndicator,
+ // This is the outer bounding box that includes the preview, page
+ // number, title.
+ PageObject,
+ // Bounding box of the actual preview.
+ Preview,
+ // Bounding box of the mouse indicator indicator frame.
+ MouseOverIndicator,
+ // Bounding box of the page number.
+ PageNumber,
+ // Bounding box of the pane name.
+ Name,
+ // Indicator whether or not there is a slide transition associated
+ // with this slide.
+ TransitionEffectIndicator
+ };
+ /** Two coordinate systems are supported. They differ only in
+ translation not in scale. Both relate to pixel values in the window.
+ A position in the model coordinate system does not change when the window content is
+ scrolled up or down. In the window coordinate system (relative
+ to the top left point of the window)scrolling leads to different values.
+ */
+ enum CoordinateSystem {
+ WindowCoordinateSystem,
+ ModelCoordinateSystem
+ };
+
+ /** Return the bounding box of the page object or one of its graphical
+ parts.
+ @param rWindow
+ This device is used to translate between model and window
+ coordinates.
+ @param rpPageDescriptor
+ The page for which to calculate the bounding box. This may be
+ NULL. When it is NULL then a generic bounding box is calculated
+ for the location (0,0).
+ @param ePart
+ The part of the page object for which to return the bounding
+ box.
+ @param eCoodinateSystem
+ The bounding box can be returned in model and in pixel
+ (window) coordinates.
+ */
+ Rectangle GetBoundingBox (
+ const model::SharedPageDescriptor& rpPageDescriptor,
+ const Part ePart,
+ const CoordinateSystem eCoordinateSystem);
+ Rectangle GetBoundingBox (
+ const Point& rPageObjectLocation,
+ const Part ePart,
+ const CoordinateSystem eCoordinateSystem);
+ Size GetSize (
+ const Part ePart,
+ const CoordinateSystem eCoordinateSystem);
+
+ Image GetTransitionEffectIcon (void) const;
+
+private:
+ SharedSdWindow mpWindow;
+ Size maPageObjectSize;
+ double mnModelToWindowScale;
+ Rectangle maFocusIndicatorBoundingBox;
+ Rectangle maPageObjectBoundingBox;
+ Rectangle maPageNumberAreaBoundingBox;
+ Rectangle maPreviewBoundingBox;
+ Rectangle maTransitionEffectBoundingBox;
+ const Image maTransitionEffectIcon;
+ const ::boost::shared_ptr<Font> mpPageNumberFont;
+
+ Size GetPageNumberAreaSize (const int nPageCount);
+ Rectangle CalculatePreviewBoundingBox (
+ Size& rPageObjectSize,
+ const Size& rPreviewModelSize,
+ const sal_Int32 nPageNumberAreaWidth,
+ const sal_Int32 nFocusIndicatorWidth);
+};
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
new file mode 100644
index 000000000000..e4e28a2e38b2
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
@@ -0,0 +1,138 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_PAGE_OBJECT_PAINTER_HEADER
+#define SD_SLIDESORTER_PAGE_OBJECT_PAINTER_HEADER
+
+#include "SlideSorter.hxx"
+#include "model/SlsPageDescriptor.hxx"
+#include "view/SlsLayouter.hxx"
+#include "view/SlsTheme.hxx"
+#include <boost/scoped_ptr.hpp>
+
+namespace sd { namespace slidesorter { namespace cache {
+class PageCache;
+} } }
+
+namespace sd { namespace slidesorter { namespace view {
+
+class ButtonBar;
+class Layouter;
+class PageObjectLayouter;
+class FramePainter;
+
+class PageObjectPainter
+{
+public:
+ PageObjectPainter (const SlideSorter& rSlideSorter);
+ ~PageObjectPainter (void);
+
+ void PaintPageObject (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor);
+
+ void NotifyResize (const bool bForce = false);
+
+ /** Called when the theme changes, either because it is replaced with
+ another or because the system colors have changed. So, even when
+ the given theme is the same object as the one already in use by this
+ painter everything that depends on the theme is updated.
+ */
+ void SetTheme (const ::boost::shared_ptr<view::Theme>& rpTheme);
+
+ /** Return a preview bitmap for the given page descriptor. When the
+ page is excluded from the show then the preview is marked
+ accordingly.
+ @rpDescriptor
+ Defines the page for which to return the preview.
+ @pReferenceDevice
+ When not <NULL/> then this reference device is used to created a
+ compatible bitmap.
+ @return
+ The returned bitmap may have a different size then the preview area.
+ */
+ Bitmap GetPreviewBitmap (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const OutputDevice* pReferenceDevice) const;
+
+private:
+ const Layouter& mrLayouter;
+ ::boost::shared_ptr<PageObjectLayouter> mpPageObjectLayouter;
+ ::boost::shared_ptr<cache::PageCache> mpCache;
+ ::boost::shared_ptr<controller::Properties> mpProperties;
+ ::boost::shared_ptr<view::Theme> mpTheme;
+ ::boost::shared_ptr<Font> mpPageNumberFont;
+ ::boost::scoped_ptr<FramePainter> mpShadowPainter;
+ ::boost::scoped_ptr<FramePainter> mpFocusBorderPainter;
+ Bitmap maNormalBackground;
+ Bitmap maSelectionBackground;
+ Bitmap maFocusedSelectionBackground;
+ Bitmap maFocusedBackground;
+ Bitmap maMouseOverBackground;
+ Bitmap maMouseOverFocusedBackground;
+ Bitmap maMouseOverSelectedAndFocusedBackground;
+ ::rtl::OUString msUnhideString;
+ ButtonBar& mrButtonBar;
+
+ void PaintBackground (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor);
+ void PaintPreview (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor) const;
+ void PaintPageNumber (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor) const;
+ void PaintTransitionEffect (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor) const;
+ void PaintBorder (
+ OutputDevice& rDevice,
+ const Theme::GradientColorType eColorType,
+ const Rectangle& rBox) const;
+ Bitmap& GetBackgroundForState (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const OutputDevice& rTemplateDevice);
+ Bitmap& GetBackground(
+ Bitmap& rBackground,
+ Theme::GradientColorType eType,
+ const OutputDevice& rTemplateDevice,
+ const bool bHasFocusBorder);
+ Bitmap CreateBackgroundBitmap(
+ const OutputDevice& rReferenceDevice,
+ const Theme::GradientColorType eType,
+ const bool bHasFocusBorder) const;
+ Bitmap CreateMarkedPreview(
+ const Size& rSize,
+ const Bitmap& rPreview,
+ const BitmapEx& rOverlay,
+ const OutputDevice* pReferenceDevice) const;
+};
+
+} } } // end of namespace sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsResource.hrc b/sd/source/ui/slidesorter/inc/view/SlsResource.hrc
new file mode 100644
index 000000000000..2b85a37d35dc
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsResource.hrc
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_ICONS_HRC
+#define SD_SLIDESORTER_ICONS_HRC
+
+#include "glob.hrc"
+
+#define IMAGE_COMMAND1_LARGE 1
+#define IMAGE_COMMAND1_LARGE_HOVER 2
+#define IMAGE_COMMAND1_MEDIUM 3
+#define IMAGE_COMMAND1_MEDIUM_HOVER 4
+#define IMAGE_COMMAND1_SMALL 5
+#define IMAGE_COMMAND1_SMALL_HOVER 6
+
+#define IMAGE_COMMAND1_LARGE_HC 7
+#define IMAGE_COMMAND1_LARGE_HOVER_HC 8
+#define IMAGE_COMMAND1_MEDIUM_HC 9
+#define IMAGE_COMMAND1_MEDIUM_HOVER_HC 10
+#define IMAGE_COMMAND1_SMALL_HC 11
+#define IMAGE_COMMAND1_SMALL_HOVER_HC 12
+
+
+#define IMAGE_COMMAND2_LARGE 20
+#define IMAGE_COMMAND2_LARGE_HOVER 21
+#define IMAGE_COMMAND2_MEDIUM 22
+#define IMAGE_COMMAND2_MEDIUM_HOVER 23
+#define IMAGE_COMMAND2_SMALL 24
+#define IMAGE_COMMAND2_SMALL_HOVER 25
+
+#define IMAGE_COMMAND2_LARGE_HC 26
+#define IMAGE_COMMAND2_LARGE_HOVER_HC 27
+#define IMAGE_COMMAND2_MEDIUM_HC 28
+#define IMAGE_COMMAND2_MEDIUM_HOVER_HC 29
+#define IMAGE_COMMAND2_SMALL_HC 30
+#define IMAGE_COMMAND2_SMALL_HOVER_HC 31
+
+#define IMAGE_COMMAND2B_LARGE 40
+#define IMAGE_COMMAND2B_LARGE_HOVER 41
+#define IMAGE_COMMAND2B_MEDIUM 42
+#define IMAGE_COMMAND2B_MEDIUM_HOVER 43
+#define IMAGE_COMMAND2B_SMALL 44
+#define IMAGE_COMMAND2B_SMALL_HOVER 45
+
+#define IMAGE_COMMAND2B_LARGE_HC 46
+#define IMAGE_COMMAND2B_LARGE_HOVER_HC 47
+#define IMAGE_COMMAND2B_MEDIUM_HC 48
+#define IMAGE_COMMAND2B_MEDIUM_HOVER_HC 49
+#define IMAGE_COMMAND2B_SMALL_HC 50
+#define IMAGE_COMMAND2B_SMALL_HOVER_HC 51
+
+
+#define IMAGE_COMMAND3_LARGE 60
+#define IMAGE_COMMAND3_LARGE_HOVER 61
+#define IMAGE_COMMAND3_MEDIUM 62
+#define IMAGE_COMMAND3_MEDIUM_HOVER 63
+#define IMAGE_COMMAND3_SMALL 64
+#define IMAGE_COMMAND3_SMALL_HOVER 65
+
+#define IMAGE_COMMAND3_LARGE_HC 66
+#define IMAGE_COMMAND3_LARGE_HOVER_HC 67
+#define IMAGE_COMMAND3_MEDIUM_HC 68
+#define IMAGE_COMMAND3_MEDIUM_HOVER_HC 69
+#define IMAGE_COMMAND3_SMALL_HC 70
+#define IMAGE_COMMAND3_SMALL_HOVER_HC 71
+
+#define IMAGE_BUTTONBAR_LARGE 80
+#define IMAGE_BUTTONBAR_LARGE_HC 81
+#define IMAGE_BUTTONBAR_MEDIUM 82
+#define IMAGE_BUTTONBAR_MEDIUM_HC 83
+#define IMAGE_BUTTONBAR_SMALL 84
+#define IMAGE_BUTTONBAR_SMALL_HC 85
+
+#define IMAGE_SHADOW 90
+#define IMAGE_INSERT_SHADOW 91
+#define IMAGE_HIDE_SLIDE_OVERLAY 92
+#define IMAGE_FOCUS_BORDER 93
+
+#define STRING_DRAG_AND_DROP_PAGES 101
+#define STRING_DRAG_AND_DROP_SLIDES 102
+
+#define STRING_COMMAND1 110
+#define STRING_COMMAND2_A 111
+#define STRING_COMMAND2_B 112
+#define STRING_COMMAND3 113
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
new file mode 100644
index 000000000000..2b39e6d2a3ee
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
@@ -0,0 +1,236 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VIEW_THEME_HXX
+#define SD_SLIDESORTER_VIEW_THEME_HXX
+
+#include "model/SlsVisualState.hxx"
+
+#include <vcl/bitmapex.hxx>
+#include <vcl/font.hxx>
+#include <vcl/gradient.hxx>
+#include <tools/color.hxx>
+
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+
+
+namespace sd { namespace slidesorter { namespace controller {
+class Properties;
+} } }
+
+namespace sd { namespace slidesorter { namespace view {
+
+
+/** Collection of colors and styles that are used to paint the slide sorter
+ view.
+*/
+class Theme
+{
+public:
+ Theme (const ::boost::shared_ptr<controller::Properties>& rpProperties);
+
+ /** Call this method to update some colors as response to a change of
+ a system color change.
+ */
+ void Update (
+ const ::boost::shared_ptr<controller::Properties>& rpProperties);
+
+ // BitmapEx GetInsertIndicatorIcon (void) const;
+
+ enum FontType {
+ Font_PageNumber,
+ Font_PageCount,
+ Font_Button
+ };
+ static ::boost::shared_ptr<Font> GetFont (
+ const FontType eType,
+ const OutputDevice& rDevice);
+
+ enum ColorType {
+ Color_Background,
+ Color_ButtonBackground,
+ Color_ButtonText,
+ Color_ButtonTextHover,
+ Color_PageNumberDefault,
+ Color_PageNumberHover,
+ Color_PageNumberHighContrast,
+ Color_PageNumberBrightBackground,
+ Color_PageNumberDarkBackground,
+ Color_Selection,
+ Color_PreviewBorder,
+ Color_PageCountFontColor,
+ _ColorType_Size_
+ };
+ ColorData GetColor (const ColorType eType);
+ void SetColor (const ColorType eType, const ColorData aColorData);
+
+ enum GradientColorType {
+ Gradient_NormalPage,
+ Gradient_SelectedPage,
+ Gradient_SelectedAndFocusedPage,
+ Gradient_MouseOverPage,
+ Gradient_MouseOverSelectedAndFocusedPage,
+ Gradient_FocusedPage,
+ Gradient_ButtonBackground,
+ _GradientColorType_Size_
+ };
+ enum GradientColorClass {
+ Border1,
+ Border2,
+ Fill1,
+ Fill2,
+ Base
+ };
+ ColorData GetGradientColor (
+ const GradientColorType eType,
+ const GradientColorClass eClass);
+ sal_Int32 GetGradientOffset (
+ const GradientColorType eType,
+ const GradientColorClass eClass);
+ void SetGradient (
+ const GradientColorType eType,
+ const ColorData aBaseColor,
+ const sal_Int32 nSaturationOverride,
+ const sal_Int32 nBrightnessOverride,
+ const sal_Int32 nFillStartOffset,
+ const sal_Int32 nFillEndOffset,
+ const sal_Int32 nBorderStartOffset,
+ const sal_Int32 nBorderEndOffset);
+ sal_Int32 GetGradientSaturationOverride (const GradientColorType eType);
+ sal_Int32 GetGradientBrightnessOverride (const GradientColorType eType);
+ void SetGradientSaturationOverride (const GradientColorType eType, const sal_Int32 nValue);
+ void SetGradientBrightnessOverride (const GradientColorType eType, const sal_Int32 nValue);
+
+ enum IconType
+ {
+ Icon_RawShadow,
+ Icon_RawInsertShadow,
+ Icon_HideSlideOverlay,
+ Icon_FocusBorder,
+ Icon_ButtonBarLarge,
+ Icon_ButtonBarMedium,
+ Icon_ButtonBarSmall,
+ Icon_Command1Large,
+ Icon_Command1LargeHover,
+ Icon_Command1Medium,
+ Icon_Command1MediumHover,
+ Icon_Command1Small,
+ Icon_Command1SmallHover,
+ Icon_Command2Large,
+ Icon_Command2LargeHover,
+ Icon_Command2Medium,
+ Icon_Command2MediumHover,
+ Icon_Command2Small,
+ Icon_Command2SmallHover,
+ Icon_Command2BLarge,
+ Icon_Command2BLargeHover,
+ Icon_Command2BMedium,
+ Icon_Command2BMediumHover,
+ Icon_Command2BSmall,
+ Icon_Command2BSmallHover,
+ Icon_Command3Large,
+ Icon_Command3LargeHover,
+ Icon_Command3Medium,
+ Icon_Command3MediumHover,
+ Icon_Command3Small,
+ Icon_Command3SmallHover,
+ _IconType_Size_
+ };
+ const BitmapEx& GetIcon (const IconType eType);
+
+ enum IntegerValueType
+ {
+ Integer_ButtonCornerRadius,
+ Integer_ButtonMaxAlpha,
+ Integer_ButtonBarMaxAlpha,
+ Integer_ButtonPaintType,
+ Integer_ButtonBorder,
+ Integer_ButtonGap,
+ Integer_ButtonFadeInDelay,
+ Integer_ButtonFadeInDuration,
+ Integer_ButtonFadeOutDelay,
+ Integer_ButtonFadeOutDuration,
+ Integer_ToolTipDelay,
+ Integer_FocusIndicatorWidth,
+ _IntegerValueType_Size_
+ };
+ sal_Int32 GetIntegerValue (const IntegerValueType eType) const;
+ void SetIntegerValue (const IntegerValueType eType, const sal_Int32 nValue);
+
+ enum StringType
+ {
+ String_Unhide,
+ String_DragAndDropPages,
+ String_DragAndDropSlides,
+ String_Command1,
+ String_Command2,
+ String_Command2B,
+ String_Command3,
+ _StringType_Size_
+ };
+ ::rtl::OUString GetString (const StringType eType) const;
+
+private:
+ bool mbIsHighContrastMode;
+ class GradientDescriptor
+ {
+ public:
+ ColorData maBaseColor;
+
+ sal_Int32 mnSaturationOverride;
+ sal_Int32 mnBrightnessOverride;
+
+ ColorData maFillColor1;
+ ColorData maFillColor2;
+ ColorData maBorderColor1;
+ ColorData maBorderColor2;
+
+ sal_Int32 mnFillOffset1;
+ sal_Int32 mnFillOffset2;
+ sal_Int32 mnBorderOffset1;
+ sal_Int32 mnBorderOffset2;
+ };
+ ColorData maBackgroundColor;
+ ColorData maPageBackgroundColor;
+ ::std::vector<GradientDescriptor> maGradients;
+ ::std::vector<BitmapEx> maIcons;
+ ::std::vector<ColorData> maColor;
+ ::std::vector<sal_Int32> maIntegerValues;
+ ::std::vector<rtl::OUString> maStrings;
+
+ GradientDescriptor& GetGradient (const GradientColorType eType);
+ /** Guarded initialization of the specified icon in the maIcons
+ container. Call only while a LocalResource object is active.
+ */
+ void InitializeIcon (const IconType eType, USHORT nResourceId);
+};
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx b/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx
new file mode 100644
index 000000000000..b633b1f3f5ca
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VIEW_TOOL_TIP_HXX
+#define SD_SLIDESORTER_VIEW_TOOL_TIP_HXX
+
+#include "SlideSorter.hxx"
+#include "model/SlsSharedPageDescriptor.hxx"
+
+namespace sd { namespace slidesorter { namespace view {
+
+/** Manage the display of tool tips. The tool tip text changes when the
+ mouse is moved from slide to slide or from button to button.
+ After the mouse enters a slide the first display of the tool tip is
+ delayed for a short time in order to not draw attention from the slide
+ or its button bar.
+*/
+class ToolTip
+{
+public:
+ ToolTip (SlideSorter& rSlideSorter);
+ ~ToolTip (void);
+
+ /** Set a new page. This modifies the default help text. After a page
+ change a timer is started to delay the display of the tool tip for
+ the new page.
+ @param rpPage
+ When this is empty then the tool tip is hidden.
+ */
+ void SetPage (const model::SharedPageDescriptor& rpPage);
+
+ /** Set and show the default help text.
+ */
+ void ShowDefaultHelpText (const ::rtl::OUString& rsHelpText);
+
+ /** Show a previously set default help text.
+ */
+ void ShowDefaultHelpText (void);
+
+ /** Show a temporary help text.
+ */
+ void ShowHelpText (const ::rtl::OUString& rsHelpText);
+
+ /** Hide the tool tip.
+ @return
+ Returns whether the tool tip was visible at the time this method
+ was called.
+ */
+ bool Hide (void);
+
+private:
+ SlideSorter& mrSlideSorter;
+ model::SharedPageDescriptor mpDescriptor;
+ ::rtl::OUString msDefaultHelpText;
+ ::rtl::OUString msCurrentHelpText;
+ ULONG mnHelpWindowHandle;
+ Timer maTimer;
+
+ /** Request to show the tool tip.
+ @param bForce
+ When <TRUE/> then the tool tip is show right away. Otherwise it
+ is shown after a short delay.
+ */
+ void Show (const bool bForce);
+ void DoShow (void);
+
+ DECL_LINK(DelayTrigger, void*);
+};
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx b/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx
deleted file mode 100644
index 4ff076f72560..000000000000
--- a/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx
+++ /dev/null
@@ -1,273 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef SD_SLIDESORTER_VIEW_OVERLAY_HXX
-#define SD_SLIDESORTER_VIEW_OVERLAY_HXX
-
-#include "model/SlsSharedPageDescriptor.hxx"
-
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <osl/mutex.hxx>
-#include <svx/sdr/overlay/overlayobject.hxx>
-#include <tools/gen.hxx>
-#include <vector>
-#include <boost/weak_ptr.hpp>
-#include <boost/noncopyable.hpp>
-
-class OutputDevice;
-class Region;
-
-
-namespace sd { namespace slidesorter {
-class SlideSorter;
-} }
-
-namespace sd { namespace slidesorter { namespace model {
-class PageEnumeration;
-} } }
-
-namespace sd { namespace slidesorter { namespace controller {
-class SlideSorterController;
-} } }
-
-namespace sdr { namespace overlay {
-class OverlayManager;
-} }
-
-namespace sd { namespace slidesorter { namespace view {
-
-
-class InsertionIndicatorOverlay;
-class PageObjectViewObjectContact;
-class SelectionRectangleOverlay;
-class SubstitutionOverlay;
-class ViewOverlay;
-
-/** This base class of slide sorter overlays uses the drawing layer overlay
- support for the display.
-*/
-class OverlayBase
- : public sdr::overlay::OverlayObject
-{
-public:
- OverlayBase (ViewOverlay& rViewOverlay);
- virtual ~OverlayBase (void);
-
-protected:
- ::osl::Mutex maMutex;
-
- ViewOverlay& mrViewOverlay;
-
- /** Make sure that the overlay object is registered at the
- OverlayManager. This registration is done on demand.
- */
- void EnsureRegistration (void);
- void RemoveRegistration();
-};
-
-
-
-
-/** During internal drag and drop the outlines of the selected slides are
- painted at the mouse position in dashed lines.
-*/
-class SubstitutionOverlay
- : public OverlayBase
-{
-public:
- SubstitutionOverlay (ViewOverlay& rViewOverlay);
- virtual ~SubstitutionOverlay (void);
-
- /** Setup the substitution display of the given set of selected pages.
- The given mouse position is remembered so that it later can be
- returned by GetPosition(). This is a convenience feature.
- */
- void Create (
- model::PageEnumeration& rSelection,
- const Point& rPosition);
-
- /** Clear the substitution display. Until the next call of Create() no
- substution is painted.
- */
- void Clear (void);
-
- /** Move the substitution display by the given amount of pixels.
- */
- void Move (const Point& rOffset);
- void SetPosition (const Point& rPosition);
- Point GetPosition (void) const;
-
- // react on stripe definition change
- virtual void stripeDefinitionHasChanged();
-
-protected:
- // geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
-
-private:
- Point maPosition;
- basegfx::B2DPolyPolygon maShapes;
-};
-
-
-
-
-/** Slides can be selected by drawing a selection rectangle in the slide
- sorter. When the left mouse button is released all slides that are at
- least partially in the rectangle are selected.
-*/
-class SelectionRectangleOverlay
- : public OverlayBase
-{
-public:
- SelectionRectangleOverlay (ViewOverlay& rViewOverlay);
- virtual ~SelectionRectangleOverlay();
-
- void Start (const Point& rAnchor);
- void Update (const Point& rSecondCorner);
-
- Rectangle GetSelectionRectangle (void);
-
- // react on stripe definition change
- virtual void stripeDefinitionHasChanged();
-
-protected:
- // geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
-
-private:
- Point maAnchor;
- Point maSecondCorner;
-};
-
-
-
-
-/** The insertion indicator is painted as a vertical or horizonal bar
- in the space between slides.
-*/
-class InsertionIndicatorOverlay
- : public OverlayBase
-{
-public:
- InsertionIndicatorOverlay (ViewOverlay& rViewOverlay);
- virtual ~InsertionIndicatorOverlay();
-
- /** Given a position in model coordinates this method calculates the
- insertion marker both as an index in the document and as a rectangle
- used for drawing the insertion indicator.
- */
- void SetPosition (const Point& rPosition);
-
- sal_Int32 GetInsertionPageIndex (void) const;
-
-protected:
- // geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
-
-private:
- sal_Int32 mnInsertionIndex;
- Rectangle maBoundingBox;
-
- void SetPositionAndSize (const Rectangle& rBoundingBox);
-};
-
-
-
-
-/** Paint a frame around the slide preview under the mouse. The actual
- painting is done by the PageObjectViewObjectContact of the slidesorter.
-*/
-class MouseOverIndicatorOverlay
- : public OverlayBase
-{
-public:
- MouseOverIndicatorOverlay (ViewOverlay& rViewOverlay);
- virtual ~MouseOverIndicatorOverlay (void);
-
- /** Set the page object for which to paint a mouse over indicator.
- @param pContact
- A value of <NULL/> indicates to not paint the mouse over indicator.
- */
- void SetSlideUnderMouse (const model::SharedPageDescriptor& rpDescriptor);
-
-protected:
- // geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
-
-private:
- /** The page under the mouse is stored as weak shared pointer so that
- model changes can be handled without having the SlideSorterModel
- inform this class explicitly.
- */
- ::boost::weak_ptr<model::PageDescriptor> mpPageUnderMouse;
-
- view::PageObjectViewObjectContact* GetViewObjectContact (void) const;
-};
-
-
-
-
-/** The view overlay manages and paints some indicators that are painted on
- top of the regular view content (the page objects). It is separated
- from the view to allow the indicators to be altered in position and size
- without repainting the whole view content (inside that the bounding box
- of the indicator). This is achieved by using the drawing layer overlay
- support.
-
- The view overlay itself simply gives access to the more specialized
- classes that handle individual indicators.
-
-*/
-class ViewOverlay
-{
-public:
- ViewOverlay (SlideSorter& rSlideSorter);
- ~ViewOverlay (void);
-
- SelectionRectangleOverlay& GetSelectionRectangleOverlay (void);
- MouseOverIndicatorOverlay& GetMouseOverIndicatorOverlay (void);
- InsertionIndicatorOverlay& GetInsertionIndicatorOverlay (void);
- SubstitutionOverlay& GetSubstitutionOverlay (void);
-
- SlideSorter& GetSlideSorter (void) const;
-
- sdr::overlay::OverlayManager* GetOverlayManager (void) const;
-
-private:
- SlideSorter& mrSlideSorter;
- SelectionRectangleOverlay maSelectionRectangleOverlay;
- MouseOverIndicatorOverlay maMouseOverIndicatorOverlay;
- InsertionIndicatorOverlay maInsertionIndicatorOverlay;
- SubstitutionOverlay maSubstitutionOverlay;
-};
-
-
-
-} } } // end of namespace ::sd::slidesorter::view
-
-#endif
diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index 0bf9052f5382..5eaf64db7bf8 100755..100644
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -33,10 +33,10 @@
#include "model/SlsPageDescriptor.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "controller/SlideSorterController.hxx"
-#include "controller/SlsPageObjectFactory.hxx"
#include "controller/SlsProperties.hxx"
#include "controller/SlsPageSelector.hxx"
#include "controller/SlsCurrentSlideManager.hxx"
+#include "controller/SlsSlotManager.hxx"
#include "view/SlideSorterView.hxx"
#include "taskpane/SlideSorterCacheDisplay.hxx"
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
@@ -46,6 +46,7 @@
#include "ViewShellBase.hxx"
#include "DrawViewShell.hxx"
+#include "DrawDocShell.hxx"
#include "drawdoc.hxx"
#include "sdpage.hxx"
#include "FrameView.hxx"
@@ -67,6 +68,56 @@ namespace {
private:
Reference<drawing::XDrawPage> mxSlide;
};
+
+ bool PrintModel (const SlideSorterModel& rModel)
+ {
+ for (sal_Int32 nIndex=0,nCount=rModel.GetPageCount(); nIndex<nCount; ++nIndex)
+ {
+ SharedPageDescriptor pDescriptor (rModel.GetPageDescriptor(nIndex));
+ if (pDescriptor)
+ {
+ OSL_TRACE("%d %d %d %d %x",
+ nIndex,
+ pDescriptor->GetPageIndex(),
+ pDescriptor->GetVisualState().mnPageId,
+ FromCoreIndex(pDescriptor->GetPage()->GetPageNum()),
+ pDescriptor->GetPage());
+ }
+ else
+ {
+ OSL_TRACE("%d", nIndex);
+ }
+ }
+
+ return true;
+ }
+ bool CheckModel (const SlideSorterModel& rModel)
+ {
+ for (sal_Int32 nIndex=0,nCount=rModel.GetPageCount(); nIndex<nCount; ++nIndex)
+ {
+ SharedPageDescriptor pDescriptor (rModel.GetPageDescriptor(nIndex));
+ if ( ! pDescriptor)
+ {
+ PrintModel(rModel);
+ OSL_ASSERT(pDescriptor);
+ return false;
+ }
+ if (nIndex != pDescriptor->GetPageIndex())
+ {
+ PrintModel(rModel);
+ OSL_ASSERT(nIndex == pDescriptor->GetPageIndex());
+ return false;
+ }
+ if (nIndex != pDescriptor->GetVisualState().mnPageId)
+ {
+ PrintModel(rModel);
+ OSL_ASSERT(nIndex == pDescriptor->GetVisualState().mnPageId);
+ return false;
+ }
+ }
+
+ return true;
+ }
}
@@ -78,8 +129,7 @@ SlideSorterModel::SlideSorterModel (SlideSorter& rSlideSorter)
mxSlides(),
mePageKind(PK_STANDARD),
meEditMode(EM_PAGE),
- maPageDescriptors(0),
- mpPageObjectFactory(NULL)
+ maPageDescriptors(0)
{
}
@@ -94,6 +144,21 @@ SlideSorterModel::~SlideSorterModel (void)
+void SlideSorterModel::Init (void)
+{
+}
+
+
+
+
+void SlideSorterModel::Dispose (void)
+{
+ ClearDescriptorList ();
+}
+
+
+
+
SdDrawDocument* SlideSorterModel::GetDocument (void)
{
if (mrSlideSorter.GetViewShellBase() != NULL)
@@ -158,20 +223,11 @@ SharedPageDescriptor SlideSorterModel::GetPageDescriptor (
pDescriptor = maPageDescriptors[nPageIndex];
if (pDescriptor == NULL && bCreate && mxSlides.is())
{
- SdDrawDocument* pModel = const_cast<SlideSorterModel*>(this)->GetDocument();
- SdPage* pPage = NULL;
- if (pModel != NULL)
- {
- if (meEditMode == EM_PAGE)
- pPage = pModel->GetSdPage ((USHORT)nPageIndex, mePageKind);
- else
- pPage = pModel->GetMasterSdPage ((USHORT)nPageIndex, mePageKind);
- }
+ SdPage* pPage = GetPage(nPageIndex);
pDescriptor.reset(new PageDescriptor (
Reference<drawing::XDrawPage>(mxSlides->getByIndex(nPageIndex),UNO_QUERY),
pPage,
- nPageIndex,
- GetPageObjectFactory()));
+ nPageIndex));
maPageDescriptors[nPageIndex] = pDescriptor;
}
}
@@ -234,6 +290,59 @@ sal_Int32 SlideSorterModel::GetIndex (const Reference<drawing::XDrawPage>& rxSli
+sal_Int32 SlideSorterModel::GetIndex (const SdrPage* pPage) const
+{
+ if (pPage == NULL)
+ return -1;
+
+ ::osl::MutexGuard aGuard (maMutex);
+
+ // First try to guess the right index.
+ sal_Int16 nNumber ((pPage->GetPageNum()-1)/2);
+ SharedPageDescriptor pDescriptor (GetPageDescriptor(nNumber, false));
+ if (pDescriptor.get() != NULL
+ && pDescriptor->GetPage() == pPage)
+ {
+ return nNumber;
+ }
+
+ // Guess was wrong, iterate over all slides and search for the right
+ // one.
+ const sal_Int32 nCount (maPageDescriptors.size());
+ for (sal_Int32 nIndex=0; nIndex<nCount; ++nIndex)
+ {
+ pDescriptor = maPageDescriptors[nIndex];
+
+ // Make sure that the descriptor exists. Without it the given slide
+ // can not be found.
+ if (pDescriptor.get() == NULL)
+ {
+ // Call GetPageDescriptor() to create the missing descriptor.
+ pDescriptor = GetPageDescriptor(nIndex, true);
+ }
+
+ if (pDescriptor->GetPage() == pPage)
+ return nIndex;
+ }
+
+ return -1;
+}
+
+
+
+
+USHORT SlideSorterModel::GetCoreIndex (const sal_Int32 nIndex) const
+{
+ SharedPageDescriptor pDescriptor (GetPageDescriptor(nIndex));
+ if (pDescriptor)
+ return pDescriptor->GetPage()->GetPageNum();
+ else
+ return mxSlides->getCount()*2+1;
+}
+
+
+
+
/** For now this method uses a trivial algorithm: throw away all descriptors
and create them anew (on demand). The main problem that we are facing
when designing a better algorithm is that we can not compare pointers to
@@ -244,8 +353,39 @@ sal_Int32 SlideSorterModel::GetIndex (const Reference<drawing::XDrawPage>& rxSli
void SlideSorterModel::Resync (void)
{
::osl::MutexGuard aGuard (maMutex);
- ClearDescriptorList ();
- AdaptSize();
+
+ // Check if document and this model really differ.
+ bool bIsUpToDate (true);
+ SdDrawDocument* pDocument = GetDocument();
+ if (pDocument!=NULL && maPageDescriptors.size()==pDocument->GetSdPageCount(mePageKind))
+ {
+ for (sal_Int32 nIndex=0,nCount=maPageDescriptors.size(); nIndex<nCount; ++nIndex)
+ {
+ if (maPageDescriptors[nIndex]
+ && maPageDescriptors[nIndex]->GetPage()
+ != GetPage(nIndex))
+ {
+ OSL_TRACE("page %d differs\n", nIndex);
+ bIsUpToDate = false;
+ break;
+ }
+ }
+ }
+ else
+ {
+ bIsUpToDate = false;
+ OSL_TRACE("models differ");
+ }
+
+ if ( ! bIsUpToDate)
+ {
+ SynchronizeDocumentSelection(); // Try to make the current selection persistent.
+ ClearDescriptorList ();
+ AdaptSize();
+ SynchronizeModelSelection();
+ mrSlideSorter.GetController().GetPageSelector().CountSelectedPages();
+ }
+ CheckModel(*this);
}
@@ -253,21 +393,26 @@ void SlideSorterModel::Resync (void)
void SlideSorterModel::ClearDescriptorList (void)
{
- ::osl::MutexGuard aGuard (maMutex);
+ DescriptorContainer aDescriptors;
+
+ {
+ ::osl::MutexGuard aGuard (maMutex);
+ aDescriptors.swap(maPageDescriptors);
+ }
- // Clear the cache of page descriptors.
- DescriptorContainer::iterator I;
- for (I=maPageDescriptors.begin(); I!=maPageDescriptors.end(); I++)
+ for (DescriptorContainer::iterator iDescriptor=aDescriptors.begin(), iEnd=aDescriptors.end();
+ iDescriptor!=iEnd;
+ ++iDescriptor)
{
- if (I->get() != NULL)
+ if (iDescriptor->get() != NULL)
{
- if ( ! I->unique())
+ if ( ! iDescriptor->unique())
{
- OSL_TRACE("SlideSorterModel::ClearDescriptorList: trying to delete page descriptor that is still used with count %d", I->use_count());
+ OSL_TRACE("SlideSorterModel::ClearDescriptorList: trying to delete page descriptor that is still used with count %d", iDescriptor->use_count());
// No assertion here because that can hang the office when
// opening a dialog from here.
}
- I->reset();
+ iDescriptor->reset();
}
}
}
@@ -283,44 +428,23 @@ void SlideSorterModel::SynchronizeDocumentSelection (void)
while (aAllPages.HasMoreElements())
{
SharedPageDescriptor pDescriptor (aAllPages.GetNextElement());
- pDescriptor->GetPage()->SetSelected (pDescriptor->IsSelected());
- }
-}
-
-void SlideSorterModel::SetPageObjectFactory(
- ::std::auto_ptr<controller::PageObjectFactory> pPageObjectFactory)
-{
- ::osl::MutexGuard aGuard (maMutex);
-
- mpPageObjectFactory = pPageObjectFactory;
- // When a NULL pointer was given then create a default factory.
- const controller::PageObjectFactory& rFactory (GetPageObjectFactory());
- PageEnumeration aAllPages (PageEnumerationProvider::CreateAllPagesEnumeration(*this));
- while (aAllPages.HasMoreElements())
- {
- SharedPageDescriptor pDescriptor (aAllPages.GetNextElement());
- pDescriptor->SetPageObjectFactory(rFactory);
+ pDescriptor->GetPage()->SetSelected(pDescriptor->HasState(PageDescriptor::ST_Selected));
}
}
-const controller::PageObjectFactory&
- SlideSorterModel::GetPageObjectFactory (void) const
+void SlideSorterModel::SynchronizeModelSelection (void)
{
::osl::MutexGuard aGuard (maMutex);
- if (mpPageObjectFactory.get() == NULL)
+ PageEnumeration aAllPages (PageEnumerationProvider::CreateAllPagesEnumeration(*this));
+ while (aAllPages.HasMoreElements())
{
- // We have to create a new factory. The pointer is mutable so we
- // are alowed to do so.
- mpPageObjectFactory = ::std::auto_ptr<controller::PageObjectFactory> (
- new controller::PageObjectFactory(
- mrSlideSorter.GetView().GetPreviewCache(),
- mrSlideSorter.GetController().GetProperties()));
+ SharedPageDescriptor pDescriptor (aAllPages.GetNextElement());
+ pDescriptor->SetState(PageDescriptor::ST_Selected, pDescriptor->GetPage()->IsSelected());
}
- return *mpPageObjectFactory.get();
}
@@ -340,7 +464,7 @@ void SlideSorterModel::SetDocumentSlides (
::osl::MutexGuard aGuard (maMutex);
// Reset the current page so to cause everbody to release references to it.
- mrSlideSorter.GetController().GetCurrentSlideManager()->CurrentSlideHasChanged(-1);
+ mrSlideSorter.GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(-1);
mxSlides = rxSlides;
Resync();
@@ -350,24 +474,27 @@ void SlideSorterModel::SetDocumentSlides (
{
SdPage* pPage = pViewShell->getCurrentPage();
if (pPage != NULL)
- mrSlideSorter.GetController().GetCurrentSlideManager()->CurrentSlideHasChanged(
- GetIndex(Reference<drawing::XDrawPage>(pPage->getUnoPage(), UNO_QUERY)));
+ mrSlideSorter.GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
+ pPage);
else
{
// No current page. This can only be when the slide sorter is
// the main view shell. Get current slide form frame view.
const FrameView* pFrameView = pViewShell->GetFrameView();
if (pFrameView != NULL)
- mrSlideSorter.GetController().GetCurrentSlideManager()->CurrentSlideHasChanged(
+ mrSlideSorter.GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
pFrameView->GetSelectedPage());
else
{
// No frame view. As a last resort use the first slide as
// current slide.
- mrSlideSorter.GetController().GetCurrentSlideManager()->CurrentSlideHasChanged(0);
+ mrSlideSorter.GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
+ sal_Int32(0));
}
}
}
+
+ mrSlideSorter.GetController().GetSlotManager()->NotifyEditModeChange();
}
@@ -439,4 +566,170 @@ void SlideSorterModel::AdaptSize (void)
maPageDescriptors.resize(0);
}
+
+
+
+bool SlideSorterModel::IsReadOnly (void) const
+{
+ if (mrSlideSorter.GetViewShellBase() != NULL
+ && mrSlideSorter.GetViewShellBase()->GetDocShell())
+ return mrSlideSorter.GetViewShellBase()->GetDocShell()->IsReadOnly();
+ else
+ return true;
+}
+
+
+
+
+void SlideSorterModel::SaveCurrentSelection (void)
+{
+ PageEnumeration aPages (PageEnumerationProvider::CreateAllPagesEnumeration(*this));
+ while (aPages.HasMoreElements())
+ {
+ SharedPageDescriptor pDescriptor (aPages.GetNextElement());
+ pDescriptor->SetState(
+ PageDescriptor::ST_WasSelected,
+ pDescriptor->HasState(PageDescriptor::ST_Selected));
+ }
+}
+
+
+
+
+Region SlideSorterModel::RestoreSelection (void)
+{
+ Region aRepaintRegion;
+ PageEnumeration aPages (PageEnumerationProvider::CreateAllPagesEnumeration(*this));
+ while (aPages.HasMoreElements())
+ {
+ SharedPageDescriptor pDescriptor (aPages.GetNextElement());
+ if (pDescriptor->SetState(
+ PageDescriptor::ST_Selected,
+ pDescriptor->HasState(PageDescriptor::ST_WasSelected)))
+ {
+ aRepaintRegion.Union(pDescriptor->GetBoundingBox());
+ }
+ }
+ return aRepaintRegion;
+}
+
+
+
+
+bool SlideSorterModel::NotifyPageEvent (const SdrPage* pSdrPage)
+{
+ ::osl::MutexGuard aGuard (maMutex);
+
+ SdPage* pPage = const_cast<SdPage*>(dynamic_cast<const SdPage*>(pSdrPage));
+ if (pPage == NULL)
+ return false;
+
+ // We are only interested in pages that are currently served by this
+ // model.
+ if (pPage->GetPageKind() != mePageKind)
+ return false;
+ if (pPage->IsMasterPage() != (meEditMode==EM_MASTERPAGE))
+ return false;
+
+ if (pPage->IsInserted())
+ InsertSlide(pPage);
+ else
+ DeleteSlide(pPage);
+ CheckModel(*this);
+
+ return true;
+}
+
+
+
+
+void SlideSorterModel::InsertSlide (SdPage* pPage)
+{
+ // Find the index at which to insert the given page.
+ USHORT nCoreIndex (pPage->GetPageNum());
+ sal_Int32 nIndex (FromCoreIndex(nCoreIndex));
+ if (pPage != GetPage(nIndex))
+ return;
+
+ // Check that the pages in the document before and after the given page
+ // are present in this model.
+ if (nIndex>0)
+ if (GetPage(nIndex-1) != GetPageDescriptor(nIndex-1)->GetPage())
+ return;
+ if (size_t(nIndex)<maPageDescriptors.size()-1)
+ if (GetPage(nIndex+1) != GetPageDescriptor(nIndex)->GetPage())
+ return;
+
+ // Insert the given page at index nIndex
+ maPageDescriptors.insert(
+ maPageDescriptors.begin()+nIndex,
+ SharedPageDescriptor(
+ new PageDescriptor (
+ Reference<drawing::XDrawPage>(mxSlides->getByIndex(nIndex),UNO_QUERY),
+ pPage,
+ nIndex)));
+
+ // Update page indices.
+ UpdateIndices(nIndex+1);
+ OSL_TRACE("page inserted");
+}
+
+
+
+
+void SlideSorterModel::DeleteSlide (const SdPage* pPage)
+{
+ const sal_Int32 nIndex (GetIndex(pPage));
+ if (maPageDescriptors[nIndex])
+ if (maPageDescriptors[nIndex]->GetPage() != pPage)
+ return;
+
+ maPageDescriptors.erase(maPageDescriptors.begin()+nIndex);
+ UpdateIndices(nIndex);
+ OSL_TRACE("page removed");
+}
+
+
+
+
+void SlideSorterModel::UpdateIndices (const sal_Int32 nFirstIndex)
+{
+ for (sal_Int32 nDescriptorIndex=0,nCount=maPageDescriptors.size();
+ nDescriptorIndex<nCount;
+ ++nDescriptorIndex)
+ {
+ SharedPageDescriptor& rpDescriptor (maPageDescriptors[nDescriptorIndex]);
+ if (rpDescriptor)
+ if (nDescriptorIndex < nFirstIndex)
+ {
+ if (rpDescriptor->GetPageIndex()!=nDescriptorIndex)
+ {
+ OSL_ASSERT(rpDescriptor->GetPageIndex()==nDescriptorIndex);
+ }
+ }
+ else
+ {
+ rpDescriptor->SetPageIndex(nDescriptorIndex);
+ }
+ }
+}
+
+
+
+
+SdPage* SlideSorterModel::GetPage (const sal_Int32 nSdIndex) const
+{
+ SdDrawDocument* pModel = const_cast<SlideSorterModel*>(this)->GetDocument();
+ if (pModel != NULL)
+ {
+ if (meEditMode == EM_PAGE)
+ return pModel->GetSdPage ((USHORT)nSdIndex, mePageKind);
+ else
+ return pModel->GetMasterSdPage ((USHORT)nSdIndex, mePageKind);
+ }
+ else
+ return NULL;
+}
+
+
} } } // end of namespace ::sd::slidesorter::model
diff --git a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
index ffd93cbf0a13..24d744e459d6 100755..100644
--- a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
+++ b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
@@ -29,9 +29,6 @@
#include "precompiled_sd.hxx"
#include "model/SlsPageDescriptor.hxx"
-#include "view/SlsPageObject.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
-#include "controller/SlsPageObjectFactory.hxx"
#include "sdpage.hxx"
#include "drawdoc.hxx"
@@ -39,31 +36,35 @@
#include <svx/svdopage.hxx>
#include <svx/svdpagv.hxx>
#include <svx/sdr/contact/viewcontact.hxx>
+#include <svx/sdr/contact/viewobjectcontact.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
namespace sd { namespace slidesorter { namespace model {
+
PageDescriptor::PageDescriptor (
const Reference<drawing::XDrawPage>& rxPage,
SdPage* pPage,
- const sal_Int32 nIndex,
- const controller::PageObjectFactory& rPageObjectFactory)
+ const sal_Int32 nIndex)
: mpPage(pPage),
mxPage(rxPage),
+ mpMasterPage(NULL),
mnIndex(nIndex),
- mpPageObjectFactory(&rPageObjectFactory),
- mpPageObject(NULL),
+ maBoundingBox(),
+ maVisualState(nIndex),
mbIsSelected(false),
+ mbWasSelected(false),
mbIsVisible(false),
mbIsFocused(false),
mbIsCurrent(false),
- mpViewObjectContact(NULL),
- maModelBorder(0,0,0,0),
- maPageNumberAreaModelSize(0,0)
+ mbIsMouseOver(false)
{
+ OSL_ASSERT(mpPage);
OSL_ASSERT(mpPage == SdPage::getImplementation(rxPage));
+ if (mpPage!=NULL && mpPage->TRG_HasMasterPage())
+ mpMasterPage = &mpPage->TRG_GetMasterPage();
}
@@ -92,48 +93,31 @@ Reference<drawing::XDrawPage> PageDescriptor::GetXDrawPage (void) const
-view::PageObject* PageDescriptor::GetPageObject (void)
+sal_Int32 PageDescriptor::GetPageIndex (void) const
{
- if (mpPageObject==NULL && mpPageObjectFactory!=NULL && mpPage != NULL)
- {
- mpPageObject = mpPageObjectFactory->CreatePageObject(mpPage, shared_from_this());
- }
-
- return mpPageObject;
+ return mnIndex;
}
-void PageDescriptor::ReleasePageObject (void)
+void PageDescriptor::SetPageIndex (const sal_Int32 nNewIndex)
{
- mpPageObject = NULL;
+ mnIndex = nNewIndex;
+ maVisualState.mnPageId = nNewIndex;
}
-bool PageDescriptor::IsVisible (void) const
+bool PageDescriptor::UpdateMasterPage (void)
{
- return mbIsVisible;
-}
-
-
-
-
-void PageDescriptor::SetVisible (bool bIsVisible)
-{
- mbIsVisible = bIsVisible;
-}
-
-
-
-
-bool PageDescriptor::Select (void)
-{
- if ( ! IsSelected())
+ const SdrPage* pMaster = NULL;
+ if (mpPage!=NULL && mpPage->TRG_HasMasterPage())
+ pMaster = &mpPage->TRG_GetMasterPage();
+ if (mpMasterPage != pMaster)
{
- mbIsSelected = true;
+ mpMasterPage = pMaster;
return true;
}
else
@@ -143,137 +127,161 @@ bool PageDescriptor::Select (void)
-bool PageDescriptor::Deselect (void)
+bool PageDescriptor::HasState (const State eState) const
{
- if (IsSelected())
+ switch (eState)
{
- mbIsSelected = false;
- return true;
- }
- else
- return false;
-}
+ case ST_Visible:
+ return mbIsVisible;
+ case ST_Selected:
+ return mbIsSelected;
+ case ST_WasSelected:
+ return mbWasSelected;
+ case ST_Focused:
+ return mbIsFocused;
-bool PageDescriptor::IsSelected (void) const
-{
- return mbIsSelected;
-}
-
+ case ST_MouseOver:
+ return mbIsMouseOver;
+ case ST_Current:
+ return mbIsCurrent;
+ case ST_Excluded:
+ return mpPage!=NULL && mpPage->IsExcluded();
-bool PageDescriptor::UpdateSelection (void)
-{
- if (mpPage!=NULL && (mpPage->IsSelected()==TRUE) != mbIsSelected)
- {
- mbIsSelected = ! mbIsSelected;
- return true;
+ default:
+ OSL_ASSERT(false);
+ return false;
}
- else
- return false;
-}
-
-
-
-
-bool PageDescriptor::IsFocused (void) const
-{
- return mbIsFocused;
-}
-
-
-
-
-void PageDescriptor::SetFocus (void)
-{
- mbIsFocused = true;
-}
-
-
-
-
-void PageDescriptor::RemoveFocus (void)
-{
- mbIsFocused = false;
-}
-
-
-
-
-view::PageObjectViewObjectContact*
- PageDescriptor::GetViewObjectContact (void) const
-{
- return mpViewObjectContact;
}
-void PageDescriptor::SetViewObjectContact (
- view::PageObjectViewObjectContact* pViewObjectContact)
+bool PageDescriptor::SetState (const State eState, const bool bNewStateValue)
{
- mpViewObjectContact = pViewObjectContact;
-}
-
-
-
+ bool bModified (false);
+ switch (eState)
+ {
+ case ST_Visible:
+ bModified = (bNewStateValue!=mbIsVisible);
+ if (bModified)
+ mbIsVisible = bNewStateValue;
+ break;
+
+ case ST_Selected:
+ bModified = (bNewStateValue!=mbIsSelected);
+ if (bModified)
+ mbIsSelected = bNewStateValue;
+ break;
+
+ case ST_WasSelected:
+ bModified = (bNewStateValue!=mbWasSelected);
+ if (bModified)
+ mbWasSelected = bNewStateValue;
+ break;
+
+ case ST_Focused:
+ bModified = (bNewStateValue!=mbIsFocused);
+ if (bModified)
+ mbIsFocused = bNewStateValue;
+ break;
+
+ case ST_MouseOver:
+ bModified = (bNewStateValue!=mbIsMouseOver);
+ if (bModified)
+ mbIsMouseOver = bNewStateValue;
+ break;
+
+ case ST_Current:
+ bModified = (bNewStateValue!=mbIsCurrent);
+ if (bModified)
+ mbIsCurrent = bNewStateValue;
+ break;
+
+ case ST_Excluded:
+ // This is a state of the page and has to be handled differently
+ // from the view-only states.
+ if (mpPage != NULL)
+ if (bNewStateValue != (mpPage->IsExcluded()==TRUE))
+ {
+ mpPage->SetExcluded(bNewStateValue);
+ bModified = true;
+ }
+ break;
+ }
-const controller::PageObjectFactory&
- PageDescriptor::GetPageObjectFactory (void) const
-{
- return *mpPageObjectFactory;
+ if (bModified)
+ maVisualState.UpdateVisualState(*this);
+ return bModified;
}
-void PageDescriptor::SetPageObjectFactory (
- const controller::PageObjectFactory& rFactory)
+VisualState& PageDescriptor::GetVisualState (void)
{
- mpPageObjectFactory = &rFactory;
+ return maVisualState;
}
-void PageDescriptor::SetModelBorder (const SvBorder& rBorder)
+bool PageDescriptor::GetCoreSelection (void)
{
- maModelBorder = rBorder;
+ if (mpPage!=NULL && (mpPage->IsSelected()==TRUE) != mbIsSelected)
+ return SetState(ST_Selected, !mbIsSelected);
+ else
+ return false;
}
-SvBorder PageDescriptor::GetModelBorder (void) const
+void PageDescriptor::SetCoreSelection (void)
{
- return maModelBorder;
+ if (mpPage != NULL)
+ if (HasState(ST_Selected))
+ mpPage->SetSelected(TRUE);
+ else
+ mpPage->SetSelected(FALSE);
+ else
+ {
+ OSL_ASSERT(mpPage!=NULL);
+ }
}
-void PageDescriptor::SetPageNumberAreaModelSize (const Size& rSize)
+Rectangle PageDescriptor::GetBoundingBox (void) const
{
- maPageNumberAreaModelSize = rSize;
+ Rectangle aBox (maBoundingBox);
+ const Point aOffset (maVisualState.GetLocationOffset());
+ aBox.Move(aOffset.X(), aOffset.Y());
+ return aBox;
}
-Size PageDescriptor::GetPageNumberAreaModelSize (void) const
+Point PageDescriptor::GetLocation (const bool bIgnoreOffset) const
{
- return maPageNumberAreaModelSize;
+ if (bIgnoreOffset)
+ return maBoundingBox.TopLeft();
+ else
+ return maBoundingBox.TopLeft() + maVisualState.GetLocationOffset();
}
-void PageDescriptor::SetIsCurrentPage (const bool bIsCurrent)
+void PageDescriptor::SetBoundingBox (const Rectangle& rBoundingBox)
{
- mbIsCurrent = bIsCurrent;
+ maBoundingBox = rBoundingBox;
}
diff --git a/sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx b/sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx
index c8c17e21819e..3a25989f084e 100644..100755
--- a/sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx
+++ b/sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx
@@ -56,7 +56,7 @@ class SelectedPagesPredicate
public:
bool operator() (const SharedPageDescriptor& rpDescriptor)
{
- return rpDescriptor->IsSelected();
+ return rpDescriptor->HasState(PageDescriptor::ST_Selected);
}
};
@@ -68,7 +68,7 @@ class VisiblePagesPredicate
public:
bool operator() (const SharedPageDescriptor& rpDescriptor)
{
- return rpDescriptor->IsVisible();
+ return rpDescriptor->HasState(PageDescriptor::ST_Visible);
}
};
diff --git a/sd/source/ui/slidesorter/model/SlsVisualState.cxx b/sd/source/ui/slidesorter/model/SlsVisualState.cxx
new file mode 100644
index 000000000000..3dee5e914ab9
--- /dev/null
+++ b/sd/source/ui/slidesorter/model/SlsVisualState.cxx
@@ -0,0 +1,236 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "model/SlsVisualState.hxx"
+#include "model/SlsPageDescriptor.hxx"
+#include "controller/SlsAnimator.hxx"
+
+namespace sd { namespace slidesorter { namespace model {
+
+VisualState::VisualState (const sal_Int32 nPageId)
+ : mnPageId(nPageId),
+ meCurrentVisualState(VS_None),
+ meOldVisualState(VS_None),
+ mnVisualStateBlend(1.0),
+ mnStateAnimationId(controller::Animator::NotAnAnimationId),
+ maLocationOffset(0,0),
+ mnLocationAnimationId(controller::Animator::NotAnAnimationId),
+ mnButtonAlpha(1.0),
+ mnButtonBarAlpha(1.0),
+ mnButtonAlphaAnimationId(controller::Animator::NotAnAnimationId)
+{
+}
+
+
+
+
+VisualState::~VisualState (void)
+{
+ if (mnStateAnimationId != controller::Animator::NotAnAnimationId
+ || mnLocationAnimationId != controller::Animator::NotAnAnimationId)
+ {
+ OSL_ASSERT(mnStateAnimationId == controller::Animator::NotAnAnimationId);
+ OSL_ASSERT(mnLocationAnimationId == controller::Animator::NotAnAnimationId);
+ }
+}
+
+
+
+
+VisualState::State VisualState::GetCurrentVisualState (void) const
+{
+ return meCurrentVisualState;
+}
+
+
+
+
+VisualState::State VisualState::GetOldVisualState (void) const
+{
+ return meOldVisualState;
+}
+
+
+
+
+void VisualState::SetVisualState (const State eState)
+{
+ meOldVisualState = meCurrentVisualState;
+ meCurrentVisualState = eState;
+ mnVisualStateBlend = 1.0;
+}
+
+
+
+
+double VisualState::GetVisualStateBlend (void) const
+{
+ return mnVisualStateBlend;
+}
+
+
+
+
+void VisualState::SetVisualStateBlend (const double nBlend)
+{
+ mnVisualStateBlend = nBlend;
+}
+
+
+
+
+void VisualState::UpdateVisualState (const PageDescriptor& rDescriptor)
+{
+ if (rDescriptor.HasState(PageDescriptor::ST_Excluded))
+ SetVisualState(VS_Excluded);
+ else if (rDescriptor.HasState(PageDescriptor::ST_Current))
+ SetVisualState(VS_Current);
+ else if (rDescriptor.HasState(PageDescriptor::ST_Focused))
+ SetVisualState(VS_Focused);
+ else if (rDescriptor.HasState(PageDescriptor::ST_Selected))
+ SetVisualState(VS_Selected);
+ else
+ SetVisualState(VS_None);
+
+ SetMouseOverState(rDescriptor.HasState(PageDescriptor::ST_MouseOver));
+}
+
+
+
+
+void VisualState::SetMouseOverState (const bool bIsMouseOver)
+{
+ mbOldMouseOverState = mbCurrentMouseOverState;
+ mbCurrentMouseOverState = bIsMouseOver;
+}
+
+
+
+
+sal_Int32 VisualState::GetStateAnimationId (void) const
+{
+ return mnStateAnimationId;
+}
+
+
+
+
+void VisualState::SetStateAnimationId (const sal_Int32 nAnimationId)
+{
+ mnStateAnimationId = nAnimationId;
+}
+
+
+
+
+Point VisualState::GetLocationOffset (void) const
+{
+ return maLocationOffset;
+}
+
+
+
+
+bool VisualState::SetLocationOffset (const Point& rOffset)
+{
+ if (maLocationOffset != rOffset)
+ {
+ maLocationOffset = rOffset;
+ return true;
+ }
+ else
+ return false;
+}
+
+
+
+
+sal_Int32 VisualState::GetLocationAnimationId (void) const
+{
+ return mnLocationAnimationId;
+}
+
+
+
+
+void VisualState::SetLocationAnimationId (const sal_Int32 nAnimationId)
+{
+ mnLocationAnimationId = nAnimationId;
+}
+
+
+
+
+double VisualState::GetButtonAlpha (void) const
+{
+ return mnButtonAlpha;
+}
+
+
+
+
+void VisualState::SetButtonAlpha (const double nAlpha)
+{
+ mnButtonAlpha = nAlpha;
+}
+
+
+
+
+double VisualState::GetButtonBarAlpha (void) const
+{
+ return mnButtonBarAlpha;
+}
+
+
+
+
+void VisualState::SetButtonBarAlpha (const double nAlpha)
+{
+ mnButtonBarAlpha = nAlpha;
+}
+
+
+
+
+sal_Int32 VisualState::GetButtonAlphaAnimationId (void) const
+{
+ return mnButtonAlphaAnimationId;
+}
+
+
+
+
+void VisualState::SetButtonAlphaAnimationId (const sal_Int32 nAnimationId)
+{
+ mnButtonAlphaAnimationId = nAnimationId;
+}
+
+
+} } } // end of namespace ::sd::slidesorter::model
diff --git a/sd/source/ui/slidesorter/model/makefile.mk b/sd/source/ui/slidesorter/model/makefile.mk
index 9c8979fe3767..0347d05a8100 100644..100755
--- a/sd/source/ui/slidesorter/model/makefile.mk
+++ b/sd/source/ui/slidesorter/model/makefile.mk
@@ -46,6 +46,7 @@ SLOFILES = \
$(SLO)$/SlsPageDescriptor.obj \
$(SLO)$/SlsPageEnumeration.obj \
$(SLO)$/SlsPageEnumerationProvider.obj \
+ $(SLO)$/SlsVisualState.obj \
$(SLO)$/SlideSorterModel.obj
EXCEPTIONSFILES=
diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
index 768dd5f9458a..c19c6c331d28 100644..100755
--- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
@@ -33,7 +33,10 @@
#include "SlideSorterViewShell.hxx"
#include "controller/SlideSorterController.hxx"
#include "controller/SlsScrollBarManager.hxx"
+#include "controller/SlsProperties.hxx"
+#include "controller/SlsAnimator.hxx"
#include "view/SlideSorterView.hxx"
+#include "view/SlsTheme.hxx"
#include "model/SlideSorterModel.hxx"
#include "glob.hrc"
@@ -132,10 +135,13 @@ SlideSorter::SlideSorter (
mpViewShell(&rViewShell),
mpViewShellBase(&rViewShell.GetViewShellBase()),
mpContentWindow(rpContentWindow),
+ mbOwnesContentWindow(false),
mpHorizontalScrollBar(rpHorizontalScrollBar),
mpVerticalScrollBar(rpVerticalScrollBar),
mpScrollBarBox(rpScrollBarBox),
- mbLayoutPending(true)
+ mbLayoutPending(true),
+ mpProperties(new controller::Properties()),
+ mpTheme(new view::Theme(mpProperties))
{
}
@@ -154,10 +160,13 @@ SlideSorter::SlideSorter (
mpViewShell(pViewShell),
mpViewShellBase(&rBase),
mpContentWindow(new ContentWindow(rParentWindow,*this )),
+ mbOwnesContentWindow(true),
mpHorizontalScrollBar(new ScrollBar(&rParentWindow,WinBits(WB_HSCROLL | WB_DRAG))),
mpVerticalScrollBar(new ScrollBar(&rParentWindow,WinBits(WB_VSCROLL | WB_DRAG))),
mpScrollBarBox(new ScrollBarBox(&rParentWindow)),
- mbLayoutPending(true)
+ mbLayoutPending(true),
+ mpProperties(new controller::Properties()),
+ mpTheme(new view::Theme(mpProperties))
{
}
@@ -169,24 +178,37 @@ void SlideSorter::Init (void)
if (mpViewShellBase != NULL)
mxControllerWeak = mpViewShellBase->GetController();
+ // Reinitialize colors in Properties with window specific values.
+ if (mpContentWindow)
+ {
+ mpProperties->SetBackgroundColor(
+ mpContentWindow->GetSettings().GetStyleSettings().GetWindowColor());
+ mpProperties->SetTextColor(
+ mpContentWindow->GetSettings().GetStyleSettings().GetWindowTextColor());
+ mpProperties->SetSelectionColor(
+ mpContentWindow->GetSettings().GetStyleSettings().GetMenuHighlightColor());
+ mpProperties->SetHighlightColor(
+ mpContentWindow->GetSettings().GetStyleSettings().GetMenuHighlightColor());
+ }
+
CreateModelViewController ();
SetupListeners ();
// Initialize the window.
- ::sd::Window* pWindow = GetActiveWindow();
- if (pWindow != NULL)
+ SharedSdWindow pContentWindow (GetContentWindow());
+ if (pContentWindow)
{
- ::Window* pParentWindow = pWindow->GetParent();
+ ::Window* pParentWindow = pContentWindow->GetParent();
if (pParentWindow != NULL)
pParentWindow->SetBackground(Wallpaper());
- pWindow->SetBackground(Wallpaper());
- pWindow->SetViewOrigin (Point(0,0));
+ pContentWindow->SetBackground(Wallpaper());
+ pContentWindow->SetViewOrigin (Point(0,0));
// We do our own scrolling while dragging a page selection.
- pWindow->SetUseDropScroll (false);
+ pContentWindow->SetUseDropScroll (false);
// Change the winbits so that the active window accepts the focus.
- pWindow->SetStyle ((pWindow->GetStyle() & ~WB_DIALOGCONTROL) | WB_TABSTOP);
- pWindow->Hide();
+ pContentWindow->SetStyle ((pContentWindow->GetStyle() & ~WB_DIALOGCONTROL) | WB_TABSTOP);
+ pContentWindow->Hide();
// Set view pointer of base class.
SetupControls(pParentWindow);
@@ -204,6 +226,12 @@ SlideSorter::~SlideSorter (void)
ReleaseListeners();
+ // Dispose model, view and controller to avoid calls between them when
+ // they are being destructed and one or two of them are already gone.
+ mpSlideSorterController->Dispose();
+ mpSlideSorterView->Dispose();
+ mpSlideSorterModel->Dispose();
+
// Reset the auto pointers explicitly to control the order of destruction.
mpSlideSorterController.reset();
mpSlideSorterView.reset();
@@ -212,6 +240,17 @@ SlideSorter::~SlideSorter (void)
mpHorizontalScrollBar.reset();
mpVerticalScrollBar.reset();
mpScrollBarBox.reset();
+
+ if (mbOwnesContentWindow)
+ {
+ OSL_ASSERT(mpContentWindow.unique());
+ }
+ else
+ {
+ // Assume that outside this class only the owner holds a reference
+ // to the content window.
+ OSL_ASSERT(mpContentWindow.use_count()==2);
+ }
mpContentWindow.reset();
}
@@ -297,7 +336,7 @@ void SlideSorter::Paint (const Rectangle& rRepaintArea)
-::boost::shared_ptr<sd::Window> SlideSorter::GetContentWindow (void) const
+::SharedSdWindow SlideSorter::GetContentWindow (void) const
{
return mpContentWindow;
}
@@ -305,17 +344,6 @@ void SlideSorter::Paint (const Rectangle& rRepaintArea)
-::sd::Window* SlideSorter::GetActiveWindow (void) const
-{
- if (mpViewShell != NULL)
- return mpViewShell->GetActiveWindow();
- else
- return mpContentWindow.get();
-}
-
-
-
-
ViewShellBase* SlideSorter::GetViewShellBase (void) const
{
return mpViewShellBase;
@@ -343,8 +371,8 @@ void SlideSorter::SetupControls (::Window* )
void SlideSorter::SetupListeners (void)
{
- ::sd::Window* pWindow = GetActiveWindow();
- if (pWindow != NULL)
+ SharedSdWindow pWindow (GetContentWindow());
+ if (pWindow)
{
::Window* pParentWindow = pWindow->GetParent();
if (pParentWindow != NULL)
@@ -375,10 +403,9 @@ void SlideSorter::ReleaseListeners (void)
{
mpSlideSorterController->GetScrollBarManager().Disconnect();
- ::sd::Window* pWindow = GetActiveWindow();
- if (pWindow != NULL)
+ SharedSdWindow pWindow (GetContentWindow());
+ if (pWindow)
{
-
pWindow->RemoveEventListener(
LINK(mpSlideSorterController.get(),
controller::SlideSorterController,
@@ -413,7 +440,12 @@ void SlideSorter::CreateModelViewController (void)
mpSlideSorterController.reset(CreateController());
DBG_ASSERT (mpSlideSorterController.get()!=NULL,
"Can not create controller for slide browser");
+
+ // Now that model, view, and controller are constructed, do the
+ // initialization that relies on all three being in place.
+ mpSlideSorterModel->Init();
mpSlideSorterController->Init();
+ mpSlideSorterView->Init();
}
@@ -460,26 +492,21 @@ void SlideSorter::ArrangeGUIElements (
{
Point aOrigin (rOffset);
- if (rSize.Width()!=0 && rSize.Height()!=0)
+ if (rSize.Width()>0
+ && rSize.Height()>0
+ && GetContentWindow()
+ && GetContentWindow()->IsVisible())
{
// Prevent untimely redraws while the view is not yet correctly
// resized.
- mpSlideSorterView->LockRedraw (TRUE);
- if (GetActiveWindow() != NULL)
- GetActiveWindow()->EnablePaint (FALSE);
+ view::SlideSorterView::DrawLock aLock (*this);
+ GetContentWindow()->EnablePaint (FALSE);
- // maAllWindowRectangle =
mpSlideSorterController->Resize (Rectangle(aOrigin, rSize));
- if (GetActiveWindow() != NULL)
- GetActiveWindow()->EnablePaint (TRUE);
+ GetContentWindow()->EnablePaint (TRUE);
mbLayoutPending = false;
- mpSlideSorterView->LockRedraw (FALSE);
- }
- else
- {
- // maAllWindowRectangle = Rectangle();
}
}
@@ -506,6 +533,9 @@ SvBorder SlideSorter::GetBorder (void)
bool SlideSorter::RelocateToWindow (::Window* pParentWindow)
{
+ // Stop all animations for they have been started for the old window.
+ mpSlideSorterController->GetAnimator()->RemoveAllAnimations();
+
ReleaseListeners();
if (mpViewShell != NULL)
@@ -517,8 +547,8 @@ bool SlideSorter::RelocateToWindow (::Window* pParentWindow)
// For accessibility we have to shortly hide the content window. This
// triggers the construction of a new accessibility object for the new
// view shell. (One is created earlier while the construtor of the base
- // class is executed. At that time the correct accessibility object can
- // not be constructed.)
+ // class is executed. But because at that time the correct
+ // accessibility object can not be constructed we do that now.)
if (mpContentWindow.get() !=NULL)
{
mpContentWindow->Hide();
@@ -540,9 +570,8 @@ void SlideSorter::SetCurrentFunction (const FunctionReference& rpFunction)
}
else
{
- ::boost::shared_ptr<ContentWindow> pWindow
- = ::boost::dynamic_pointer_cast<ContentWindow>(GetContentWindow());
- if (pWindow.get() != NULL)
+ ContentWindow* pWindow = dynamic_cast<ContentWindow*>(GetContentWindow().get());
+ if (pWindow != NULL)
pWindow->SetCurrentFunction(rpFunction);
}
}
@@ -550,6 +579,24 @@ void SlideSorter::SetCurrentFunction (const FunctionReference& rpFunction)
+::boost::shared_ptr<controller::Properties> SlideSorter::GetProperties (void) const
+{
+ OSL_ASSERT(mpProperties);
+ return mpProperties;
+}
+
+
+
+
+::boost::shared_ptr<view::Theme> SlideSorter::GetTheme (void) const
+{
+ OSL_ASSERT(mpTheme);
+ return mpTheme;
+}
+
+
+
+
//===== ContentWindow =========================================================
namespace {
@@ -644,8 +691,10 @@ long ContentWindow::Notify (NotifyEvent& rEvent)
-
} // end of anonymous namespace
+
+
+
} } // end of namespace ::sd::slidesorter
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
index 787086b4596e..89388734bf8c 100755
--- a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
@@ -34,6 +34,7 @@
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "view/SlideSorterView.hxx"
+#include "view/SlsLayouter.hxx"
#include "DrawController.hxx"
#include <toolkit/helper/vclunohelper.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -46,7 +47,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
using ::rtl::OUString;
-using ::sd::slidesorter::view::SlideSorterView;
+using ::sd::slidesorter::view::Layouter;
namespace sd { namespace slidesorter {
@@ -266,7 +267,7 @@ void SAL_CALL SlideSorterService::setCurrentPage(const Reference<drawing::XDrawP
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL)
- mpSlideSorter->GetController().GetCurrentSlideManager()->CurrentSlideHasChanged(
+ mpSlideSorter->GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
mpSlideSorter->GetModel().GetIndex(rxSlide));
}
@@ -317,7 +318,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsHighlightCurrentSlide (void)
if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
return false;
else
- return mpSlideSorter->GetController().GetProperties()->IsHighlightCurrentSlide();
+ return mpSlideSorter->GetProperties()->IsHighlightCurrentSlide();
}
@@ -329,7 +330,7 @@ void SAL_CALL SlideSorterService::setIsHighlightCurrentSlide (sal_Bool bValue)
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
{
- mpSlideSorter->GetController().GetProperties()->SetHighlightCurrentSlide(bValue);
+ mpSlideSorter->GetProperties()->SetHighlightCurrentSlide(bValue);
controller::SlideSorterController::ModelChangeLock aLock (mpSlideSorter->GetController());
mpSlideSorter->GetController().HandleModelChange();
}
@@ -345,7 +346,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsShowSelection (void)
if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
return false;
else
- return mpSlideSorter->GetController().GetProperties()->IsShowSelection();
+ return mpSlideSorter->GetProperties()->IsShowSelection();
}
@@ -356,7 +357,7 @@ void SAL_CALL SlideSorterService::setIsShowSelection (sal_Bool bValue)
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetShowSelection(bValue);
+ mpSlideSorter->GetProperties()->SetShowSelection(bValue);
}
@@ -369,7 +370,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsShowFocus (void)
if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
return false;
else
- return mpSlideSorter->GetController().GetProperties()->IsShowFocus();
+ return mpSlideSorter->GetProperties()->IsShowFocus();
}
@@ -380,7 +381,7 @@ void SAL_CALL SlideSorterService::setIsShowFocus (sal_Bool bValue)
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetShowFocus(bValue);
+ mpSlideSorter->GetProperties()->SetShowFocus(bValue);
}
@@ -393,7 +394,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsCenterSelection (void)
if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
return false;
else
- return mpSlideSorter->GetController().GetProperties()->IsCenterSelection();
+ return mpSlideSorter->GetProperties()->IsCenterSelection();
}
@@ -404,7 +405,7 @@ void SAL_CALL SlideSorterService::setIsCenterSelection (sal_Bool bValue)
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetCenterSelection(bValue);
+ mpSlideSorter->GetProperties()->SetCenterSelection(bValue);
}
@@ -417,7 +418,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsSuspendPreviewUpdatesDuringFullScreen
if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
return true;
else
- return mpSlideSorter->GetController().GetProperties()
+ return mpSlideSorter->GetProperties()
->IsSuspendPreviewUpdatesDuringFullScreenPresentation();
}
@@ -430,7 +431,7 @@ void SAL_CALL SlideSorterService::setIsSuspendPreviewUpdatesDuringFullScreenPres
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()
+ mpSlideSorter->GetProperties()
->SetSuspendPreviewUpdatesDuringFullScreenPresentation(bValue);
}
@@ -444,7 +445,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsOrientationVertical (void)
if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
return true;
else
- return mpSlideSorter->GetView().GetOrientation() == SlideSorterView::VERTICAL;
+ return mpSlideSorter->GetView().GetOrientation() != Layouter::HORIZONTAL;
}
@@ -456,8 +457,8 @@ void SAL_CALL SlideSorterService::setIsOrientationVertical (sal_Bool bValue)
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
mpSlideSorter->GetView().SetOrientation(bValue
- ? SlideSorterView::VERTICAL
- : SlideSorterView::HORIZONTAL);
+ ? Layouter::GRID
+ : Layouter::HORIZONTAL);
}
@@ -470,7 +471,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsSmoothScrolling (void)
if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
return false;
else
- return mpSlideSorter->GetController().GetProperties()->IsSmoothSelectionScrolling();
+ return mpSlideSorter->GetProperties()->IsSmoothSelectionScrolling();
}
@@ -481,7 +482,7 @@ void SAL_CALL SlideSorterService::setIsSmoothScrolling (sal_Bool bValue)
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetSmoothSelectionScrolling(bValue);
+ mpSlideSorter->GetProperties()->SetSmoothSelectionScrolling(bValue);
}
@@ -495,7 +496,7 @@ util::Color SAL_CALL SlideSorterService::getBackgroundColor (void)
return util::Color();
else
return util::Color(
- mpSlideSorter->GetController().GetProperties()->GetBackgroundColor().GetColor());
+ mpSlideSorter->GetProperties()->GetBackgroundColor().GetColor());
}
@@ -506,8 +507,7 @@ void SAL_CALL SlideSorterService::setBackgroundColor (util::Color aBackgroundCol
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetBackgroundColor(
- Color(aBackgroundColor));
+ mpSlideSorter->GetProperties()->SetBackgroundColor(Color(aBackgroundColor));
}
@@ -521,7 +521,7 @@ util::Color SAL_CALL SlideSorterService::getTextColor (void)
return util::Color();
else
return util::Color(
- mpSlideSorter->GetController().GetProperties()->GetTextColor().GetColor());
+ mpSlideSorter->GetProperties()->GetTextColor().GetColor());
}
@@ -532,8 +532,7 @@ void SAL_CALL SlideSorterService::setTextColor (util::Color aTextColor)
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetTextColor(
- Color(aTextColor));
+ mpSlideSorter->GetProperties()->SetTextColor(Color(aTextColor));
}
@@ -547,7 +546,7 @@ util::Color SAL_CALL SlideSorterService::getSelectionColor (void)
return util::Color();
else
return util::Color(
- mpSlideSorter->GetController().GetProperties()->GetSelectionColor().GetColor());
+ mpSlideSorter->GetProperties()->GetSelectionColor().GetColor());
}
@@ -558,8 +557,7 @@ void SAL_CALL SlideSorterService::setSelectionColor (util::Color aSelectionColor
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetSelectionColor(
- Color(aSelectionColor));
+ mpSlideSorter->GetProperties()->SetSelectionColor(Color(aSelectionColor));
}
@@ -573,7 +571,7 @@ util::Color SAL_CALL SlideSorterService::getHighlightColor (void)
return util::Color();
else
return util::Color(
- mpSlideSorter->GetController().GetProperties()->GetHighlightColor().GetColor());
+ mpSlideSorter->GetProperties()->GetHighlightColor().GetColor());
}
@@ -584,8 +582,7 @@ void SAL_CALL SlideSorterService::setHighlightColor (util::Color aHighlightColor
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetHighlightColor(
- Color(aHighlightColor));
+ mpSlideSorter->GetProperties()->SetHighlightColor(Color(aHighlightColor));
}
@@ -597,7 +594,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsUIReadOnly (void)
if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
return true;
else
- return mpSlideSorter->GetController().GetProperties()->IsUIReadOnly();
+ return mpSlideSorter->GetProperties()->IsUIReadOnly();
}
@@ -608,8 +605,7 @@ void SAL_CALL SlideSorterService::setIsUIReadOnly (sal_Bool bIsUIReadOnly)
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetUIReadOnly(
- bIsUIReadOnly);
+ mpSlideSorter->GetProperties()->SetUIReadOnly(bIsUIReadOnly);
}
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index 86ec4002cd02..f8e7e13cdd2b 100755
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -39,6 +39,8 @@
#include "controller/SlsSlotManager.hxx"
#include "controller/SlsCurrentSlideManager.hxx"
#include "controller/SlsSelectionManager.hxx"
+#include "controller/SlsSelectionFunction.hxx"
+#include "controller/SlsProperties.hxx"
#include "view/SlideSorterView.hxx"
#include "view/SlsLayouter.hxx"
#include "model/SlideSorterModel.hxx"
@@ -97,8 +99,11 @@ TYPEINIT1(SlideSorterViewShell, ViewShell);
SfxViewFrame* pFrame,
ViewShellBase& rViewShellBase,
::Window* pParentWindow,
- FrameView* pFrameViewArgument)
+ FrameView* pFrameViewArgument,
+ const bool bIsCenterPane)
{
+ (void)bIsCenterPane;
+
::boost::shared_ptr<SlideSorterViewShell> pViewShell;
try
{
@@ -124,7 +129,8 @@ SlideSorterViewShell::SlideSorterViewShell (
::Window* pParentWindow,
FrameView* pFrameViewArgument)
: ViewShell (pFrame, pParentWindow, rViewShellBase),
- mpSlideSorter()
+ mpSlideSorter(),
+ mbIsArrangeGUIElementsPending(true)
{
meShellType = ST_SLIDE_SORTER;
@@ -188,8 +194,8 @@ void SlideSorterViewShell::Initialize (void)
// the new view shell. (One is created earlier while the construtor
// of the base class is executed. At that time the correct
// accessibility object can not be constructed.)
- ::Window* pWindow = mpSlideSorter->GetActiveWindow();
- if (pWindow != NULL)
+ SharedSdWindow pWindow (mpSlideSorter->GetContentWindow());
+ if (pWindow)
{
pWindow->Hide();
pWindow->Show();
@@ -299,8 +305,17 @@ SlideSorter& SlideSorterViewShell::GetSlideSorter (void) const
bool SlideSorterViewShell::RelocateToParentWindow (::Window* pParentWindow)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
- return mpSlideSorter->RelocateToWindow(pParentWindow);
+ OSL_ASSERT(mpSlideSorter);
+ if ( ! mpSlideSorter)
+ return false;
+
+ if (pParentWindow == NULL)
+ WriteFrameViewData();
+ const bool bSuccess (mpSlideSorter->RelocateToWindow(pParentWindow));
+ if (pParentWindow != NULL)
+ ReadFrameViewData(mpFrameView);
+
+ return bSuccess;
}
@@ -377,6 +392,11 @@ SdPage* SlideSorterViewShell::GetActualPage (void)
pCurrentPage = pDescriptor->GetPage();
}
+ if (pCurrentPage == NULL)
+ {
+
+ }
+
return pCurrentPage;
}
@@ -496,23 +516,13 @@ void SlideSorterViewShell::ExecStatusBar (SfxRequest& rRequest)
-void SlideSorterViewShell::PrePaint()
-{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
- if (mpSlideSorter.get() != NULL)
- mpSlideSorter->GetController().PrePaint();
-}
-
-
-
-
void SlideSorterViewShell::Paint (
const Rectangle& rBBox,
::sd::Window* pWindow)
{
SetActiveWindow (pWindow);
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
- if (mpSlideSorter.get() != NULL)
+ OSL_ASSERT(mpSlideSorter);
+ if (mpSlideSorter)
mpSlideSorter->GetController().Paint(rBBox,pWindow);
}
@@ -521,10 +531,24 @@ void SlideSorterViewShell::Paint (
void SlideSorterViewShell::ArrangeGUIElements (void)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
- mpSlideSorter->ArrangeGUIElements(
- maViewPos,
- maViewSize);
+ if (IsActive())
+ {
+ OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ mpSlideSorter->ArrangeGUIElements(maViewPos, maViewSize);
+ mbIsArrangeGUIElementsPending = false;
+ }
+ else
+ mbIsArrangeGUIElementsPending = true;
+}
+
+
+
+
+void SlideSorterViewShell::Activate (BOOL bIsMDIActivate)
+{
+ ViewShell::Activate(bIsMDIActivate);
+ if (mbIsArrangeGUIElementsPending)
+ ArrangeGUIElements();
}
@@ -559,28 +583,38 @@ void SlideSorterViewShell::ReadFrameViewData (FrameView* pFrameView)
view::SlideSorterView& rView (mpSlideSorter->GetView());
USHORT nSlidesPerRow (pFrameView->GetSlidesPerRow());
- if (nSlidesPerRow == 0 || ! IsMainViewShell())
+ if (nSlidesPerRow > 0
+ && rView.GetOrientation() == view::Layouter::GRID
+ && IsMainViewShell())
{
- // When a value of 0 (automatic) is given or the the slide
- // sorter is displayed in a side pane then we ignore the value
- // of the frame view and adapt the number of columns
- // automatically to the window width.
- rView.GetLayouter().SetColumnCount(1,5);
- }
- else
rView.GetLayouter().SetColumnCount(nSlidesPerRow,nSlidesPerRow);
+ }
+ if (IsMainViewShell())
+ mpSlideSorter->GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
+ mpFrameView->GetSelectedPage());
mpSlideSorter->GetController().Rearrange(true);
// DrawMode for 'main' window
if (GetActiveWindow()->GetDrawMode() != pFrameView->GetDrawMode() )
GetActiveWindow()->SetDrawMode( pFrameView->GetDrawMode() );
}
+
+ // When this slide sorter is not displayed in the main window then we do
+ // not share the same frame view and have to find other ways to acquire
+ // certain values.
+ if ( ! IsMainViewShell())
+ {
+ ::boost::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell();
+ if (pMainViewShell.get() != NULL)
+ mpSlideSorter->GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
+ pMainViewShell->getCurrentPage());
+ }
}
-void SlideSorterViewShell::WriteFrameViewData()
+void SlideSorterViewShell::WriteFrameViewData (void)
{
OSL_ASSERT(mpSlideSorter.get()!=NULL);
if (mpFrameView != NULL)
@@ -595,9 +629,11 @@ void SlideSorterViewShell::WriteFrameViewData()
SdPage* pActualPage = GetActualPage();
if (pActualPage != NULL)
{
+ if (IsMainViewShell())
+ mpFrameView->SetSelectedPage((pActualPage->GetPageNum()- 1) / 2);
+ // else
// The slide sorter is not expected to switch the current page
// other then by double clicks. That is handled seperatly.
- // mpFrameView->SetSelectedPage((pActualPage->GetPageNum()- 1) / 2);
}
else
{
@@ -619,13 +655,13 @@ void SlideSorterViewShell::SetZoom (long int )
// the window.
}
+
+
+
void SlideSorterViewShell::SetZoomRect (const Rectangle& rZoomRect)
{
OSL_ASSERT(mpSlideSorter.get()!=NULL);
- Size aPageSize (mpSlideSorter->GetView().GetPageBoundingBox(
- 0,
- view::SlideSorterView::CS_MODEL,
- view::SlideSorterView::BBT_SHAPE).GetSize());
+ Size aPageSize (mpSlideSorter->GetView().GetLayouter().GetPageObjectSize());
Rectangle aRect(rZoomRect);
diff --git a/sd/source/ui/slidesorter/shell/makefile.mk b/sd/source/ui/slidesorter/shell/makefile.mk
index 94209c34dc2b..94209c34dc2b 100644..100755
--- a/sd/source/ui/slidesorter/shell/makefile.mk
+++ b/sd/source/ui/slidesorter/shell/makefile.mk
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index d2c2310329a6..f3637e55e63c 100755..100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -34,11 +34,14 @@
#include "SlideSorterViewShell.hxx"
#include "ViewShell.hxx"
#include "SlsViewCacheContext.hxx"
+#include "SlsLayeredDevice.hxx"
#include "view/SlsLayouter.hxx"
-#include "view/SlsViewOverlay.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
+#include "view/SlsPageObjectLayouter.hxx"
+#include "view/SlsPageObjectPainter.hxx"
+#include "view/SlsILayerPainter.hxx"
+#include "view/SlsButtonBar.hxx"
+#include "view/SlsToolTip.hxx"
#include "controller/SlideSorterController.hxx"
-#include "controller/SlsPageObjectFactory.hxx"
#include "controller/SlsProperties.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
@@ -46,10 +49,9 @@
#include "cache/SlsPageCache.hxx"
#include "cache/SlsPageCacheManager.hxx"
#include "cache/SlsCacheContext.hxx"
-#include "view/SlsPageObject.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
#include "taskpane/SlideSorterCacheDisplay.hxx"
#include "DrawDocShell.hxx"
+#include "PaneDockingWindow.hxx"
#include "drawdoc.hxx"
#include "sdpage.hxx"
@@ -62,60 +64,135 @@
#include <svx/svdopage.hxx>
#include <svx/xlndsit.hxx>
#include <svx/xlnclit.hxx>
-#include <com/sun/star/presentation/FadeEffect.hpp>
#include <vcl/svapp.hxx>
+#include <vcl/scrbar.hxx>
#include <tools/poly.hxx>
#include <vcl/lineinfo.hxx>
#include <algorithm>
-#include <svx/sdr/contact/objectcontact.hxx>
#include <svx/sdrpagewindow.hxx>
#include <svl/itempool.hxx>
-#include <svl/itempool.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+#include <canvas/elapsedtime.hxx>
+//#define DEBUG_TIMING
+#include <svl/itempool.hxx>
+#ifdef DEBUG_TIMING
+#include <vector>
+#endif
#include <boost/foreach.hpp>
+
using namespace std;
using namespace ::sd::slidesorter::model;
+using namespace ::drawinglayer::primitive2d;
+
namespace sd { namespace slidesorter { namespace view {
-TYPEINIT1(SlideSorterView, ::sd::View);
+namespace {
+ /** Wrapper around the SlideSorterView that supports the IPainter
+ interface and that allows the LayeredDevice to hold the
+ SlideSorterView (held as scoped_ptr by the SlideSorter) as
+ shared_ptr.
+ */
+ class Painter : public ILayerPainter
+ {
+ public:
+ Painter (SlideSorterView& rView) : mrView(rView) {}
+ virtual ~Painter (void) {}
+
+ virtual void Paint (OutputDevice& rDevice, const Rectangle& rRepaintArea)
+ {
+ mrView.Paint(rDevice,rRepaintArea);
+ }
+
+ virtual void SetLayerInvalidator (const SharedILayerInvalidator&) {}
+
+ private:
+ SlideSorterView& mrView;
+ };
+}
+
+
+
+class BackgroundPainter
+ : public ILayerPainter,
+ public ::boost::noncopyable
+{
+public:
+ BackgroundPainter (const Color aBackgroundColor) : maBackgroundColor(aBackgroundColor) {}
+ virtual ~BackgroundPainter (void) {}
+
+ virtual void Paint (OutputDevice& rDevice, const Rectangle& rRepaintArea)
+ {
+ rDevice.SetFillColor(maBackgroundColor);
+ rDevice.SetLineColor();
+ rDevice.DrawRect(rRepaintArea);
+ }
+
+ virtual void SetLayerInvalidator (const SharedILayerInvalidator&) {}
+
+ void SetColor (const Color aColor) { maBackgroundColor = aColor; }
+
+private:
+ Color maBackgroundColor;
+};
+
+TYPEINIT1(SlideSorterView, ::sd::View);
+
SlideSorterView::SlideSorterView (SlideSorter& rSlideSorter)
: ::sd::View (
- rSlideSorter.GetModel().GetDocument(),
- NULL,
- rSlideSorter.GetViewShell()),
- mrSlideSorter(rSlideSorter),
- mrModel(rSlideSorter.GetModel()),
- maPageModel(),
- mpPage(new SdrPage(maPageModel)),
- mpLayouter (new Layouter ()),
- mbPageObjectVisibilitiesValid (false),
- mpPreviewCache(),
- mpViewOverlay (new ViewOverlay(rSlideSorter)),
- mnFirstVisiblePageIndex(0),
- mnLastVisiblePageIndex(-1),
- mbModelChangedWhileModifyEnabled(true),
- maPreviewSize(0,0),
- mbPreciousFlagUpdatePending(true),
- maPageNumberAreaModelSize(0,0),
- maModelBorder(),
- meOrientation(VERTICAL)
+ rSlideSorter.GetModel().GetDocument(),
+ rSlideSorter.GetContentWindow().get(),
+ rSlideSorter.GetViewShell()),
+ mrSlideSorter(rSlideSorter),
+ mrModel(rSlideSorter.GetModel()),
+ mbIsDisposed(false),
+ mpLayouter (new Layouter(rSlideSorter.GetContentWindow(), rSlideSorter.GetTheme())),
+ mbPageObjectVisibilitiesValid (false),
+ mpPreviewCache(),
+ mpLayeredDevice(new LayeredDevice(rSlideSorter.GetContentWindow())),
+ maVisiblePageRange(-1,-1),
+ mbModelChangedWhileModifyEnabled(true),
+ maPreviewSize(0,0),
+ mbPreciousFlagUpdatePending(true),
+ meOrientation(Layouter::GRID),
+ mpProperties(rSlideSorter.GetProperties()),
+ mpPageUnderMouse(),
+ mnButtonUnderMouse(-1),
+ mpPageObjectPainter(),
+ mpSelectionPainter(),
+ mpBackgroundPainter(
+ new BackgroundPainter(mrSlideSorter.GetTheme()->GetColor(Theme::Color_Background))),
+ mpButtonBar(new ButtonBar(mrSlideSorter)),
+ mpToolTip(new ToolTip(mrSlideSorter)),
+ mbIsRearrangePending(true),
+ maVisibilityChangeListeners()
{
// Hide the page that contains the page objects.
SetPageVisible (FALSE);
- // call FreezeIdRanges() at the pool from the newly constructed SdrModel,
- // else creating SfxItemSets on it will complain
- maPageModel.GetItemPool().FreezeIdRanges();
- // add the page to the model (no, this is NOT done by the constructor :-( )
- maPageModel.InsertPage(mpPage);
+ // Register the background painter on level 1 to avoid the creation of a
+ // background buffer.
+ mpLayeredDevice->RegisterPainter(mpBackgroundPainter, 1);
+
+ // Wrap a shared_ptr-held-wrapper around this view and register it as
+ // painter at the layered device. There is no explicit destruction: in
+ // the SlideSorterView destructor the layered device is destroyed and
+ // with it the only reference to the wrapper which therefore is also
+ // destroyed.
+ SharedILayerPainter pPainter (new Painter(*this));
- // show page
- LocalModelHasChanged();
+ // The painter is placed on level 1 to avoid buffering. This should be
+ // a little faster during animations because the previews are painted
+ // directly into the window, not via the buffer.
+ mpLayeredDevice->RegisterPainter(pPainter, 1);
}
@@ -123,41 +200,57 @@ SlideSorterView::SlideSorterView (SlideSorter& rSlideSorter)
SlideSorterView::~SlideSorterView (void)
{
- // Inform the contact objects to disconnect from the preview cache.
- // Otherwise each dying contact object invalidates its preview. When
- // the previews are kept for a later re-use than this invalidation is
- // not wanted.
- ::boost::shared_ptr<cache::PageCache> pEmptyCache;
- model::PageEnumeration aPageEnumeration (
- model::PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
- while (aPageEnumeration.HasMoreElements())
+ if ( ! mbIsDisposed)
{
- view::PageObjectViewObjectContact* pContact
- = aPageEnumeration.GetNextElement()->GetViewObjectContact();
- if (pContact != NULL)
- pContact->SetCache(pEmptyCache);
+ OSL_ASSERT(mbIsDisposed);
+ Dispose();
}
+}
+
+
+
+
+void SlideSorterView::Init (void)
+{
+ HandleModelChange();
+}
+
+
+
+
+void SlideSorterView::Dispose (void)
+{
+ mpSelectionPainter.reset();
+
+ mpLayeredDevice->Dispose();
mpPreviewCache.reset();
- // hide the page to avoid problems in the view when deleting
+ SetPageUnderMouse(SharedPageDescriptor(),false);
+
+ // Hide the page to avoid problems in the view when deleting
// visualized objects
HideSdrPage();
// Deletion of the objects and the page will be done in SdrModel
// destructor (as long as objects and pages are added)
+
+ OSL_ASSERT(mpLayeredDevice.unique());
+ mpLayeredDevice.reset();
+
+ mbIsDisposed = true;
}
-sal_Int32 SlideSorterView::GetPageIndexAtPoint (const Point& rPosition) const
+sal_Int32 SlideSorterView::GetPageIndexAtPoint (const Point& rWindowPosition) const
{
sal_Int32 nIndex (-1);
- ::sd::Window* pWindow = GetWindow();
- if (pWindow != NULL)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
{
- nIndex = mpLayouter->GetIndexAtPoint (pWindow->PixelToLogic (rPosition));
+ nIndex = mpLayouter->GetIndexAtPoint(pWindow->PixelToLogic(rWindowPosition), false, false);
// Clip the page index against the page count.
if (nIndex >= mrModel.GetPageCount())
@@ -180,12 +273,8 @@ Layouter& SlideSorterView::GetLayouter (void)
void SlideSorterView::ModelHasChanged (void)
{
- if (mbModelChangedWhileModifyEnabled)
- {
- controller::SlideSorterController::ModelChangeLock alock( mrSlideSorter.GetController() );
- mrSlideSorter.GetController().HandleModelChange();
- LocalModelHasChanged();
- }
+ // Ignore this call. Rely on hints sent by the model to get informed of
+ // model changes.
}
@@ -197,16 +286,6 @@ void SlideSorterView::LocalModelHasChanged(void)
// First call our base class.
View::ModelHasChanged ();
-
- // Then re-set the page as current page that contains the page objects.
- ShowSdrPage(mpPage);
-
- // Initialize everything that depends on a page view, now that we have
- // one.
- // SetApplicationDocumentColor(
- // Application::GetSettings().GetStyleSettings().GetWindowColor());
-
- UpdatePageBorders();
}
@@ -214,19 +293,8 @@ void SlideSorterView::LocalModelHasChanged(void)
void SlideSorterView::PreModelChange (void)
{
- // Reset the slide under the mouse. It will be set to the correct slide
- // on the next mouse motion.
- GetOverlay().GetMouseOverIndicatorOverlay().SetSlideUnderMouse(SharedPageDescriptor());
-
- // Tell the page descriptors of the model that the page objects do not
- // exist anymore.
- model::PageEnumeration aPageEnumeration (
- model::PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
- while (aPageEnumeration.HasMoreElements())
- aPageEnumeration.GetNextElement()->ReleasePageObject();
-
- // Remove all page objects from the page.
- mpPage->Clear();
+ // Reset the slide under the mouse. It will be re-set in PostModelChange().
+ SetPageUnderMouse(SharedPageDescriptor());
}
@@ -240,16 +308,10 @@ void SlideSorterView::PostModelChange (void)
model::PageEnumeration aPageEnumeration (
model::PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
- UpdatePageBorders();
- while (aPageEnumeration.HasMoreElements())
- {
- SdrPageObj* pPageObject = aPageEnumeration.GetNextElement()->GetPageObject();
- if (pPageObject != NULL)
- AddSdrObject(*pPageObject);
- }
// The new page objects have to be scaled and positioned.
- Layout ();
+ RequestRearrange();
+ RequestRepaint();
}
@@ -271,18 +333,30 @@ void SlideSorterView::HandleModelChange (void)
void SlideSorterView::HandleDrawModeChange (void)
{
- UpdatePageBorders();
-
// Replace the preview cache with a new and empty one. The
// PreviewRenderer that is used by the cache is replaced by this as
// well.
mpPreviewCache.reset();
GetPreviewCache()->InvalidateCache(true);
- mrModel.SetPageObjectFactory(
- ::std::auto_ptr<controller::PageObjectFactory>(
- new controller::PageObjectFactory(
- GetPreviewCache(),
- mrSlideSorter.GetController().GetProperties())));
+
+ RequestRepaint();
+}
+
+
+
+
+void SlideSorterView::HandleDataChangeEvent (void)
+{
+ GetPageObjectPainter()->SetTheme(mrSlideSorter.GetTheme());
+
+ // Update the color used by the background painter.
+ ::boost::shared_ptr<BackgroundPainter> pPainter (
+ ::boost::dynamic_pointer_cast<BackgroundPainter>(mpBackgroundPainter));
+ if (pPainter)
+ pPainter->SetColor(mrSlideSorter.GetTheme()->GetColor(Theme::Color_Background));
+
+ if (mpButtonBar)
+ mpButtonBar->HandleDataChangeEvent();
RequestRepaint();
}
@@ -292,31 +366,120 @@ void SlideSorterView::HandleDrawModeChange (void)
void SlideSorterView::Resize (void)
{
- ::sd::Window* pWindow = GetWindow();
- if (mrModel.GetPageCount()>0 && pWindow != NULL)
+ UpdateOrientation();
+
+ mpLayeredDevice->Resize();
+ RequestRearrange();
+}
+
+
+
+
+void SlideSorterView::RequestRearrange (void)
+{
+ mbIsRearrangePending = true;
+ Rearrange();
+}
+
+
+
+
+void SlideSorterView::Rearrange (void)
+{
+ if ( ! mbIsRearrangePending)
+ return;
+ if (mrModel.GetPageCount() <= 0)
+ return;
+
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if ( ! pWindow)
+ return;
+ const Size aWindowSize (pWindow->GetSizePixel());
+ if (aWindowSize.Width()<=0 || aWindowSize.Height()<=0)
+ return;
+
+ const bool bRearrangeSuccess (
+ mpLayouter->Rearrange (
+ meOrientation,
+ aWindowSize,
+ mrModel.GetPageDescriptor(0)->GetPage()->GetSize(),
+ mrModel.GetPageCount()));
+ if (bRearrangeSuccess)
+ {
+ mbIsRearrangePending = false;
+ Layout();
+ UpdatePageUnderMouse(false);
+ // RequestRepaint();
+ }
+}
+
+
+
+
+void SlideSorterView::UpdateOrientation (void)
+{
+ // The layout of slides depends on whether the slide sorter is
+ // displayed in the center or the side pane.
+ if (mrSlideSorter.GetViewShell()->IsMainViewShell())
+ SetOrientation(Layouter::GRID);
+ else
{
- UpdatePageBorders();
- bool bRearrangeSuccess (false);
- if (meOrientation == HORIZONTAL)
+ // Get access to the docking window.
+ ::Window* pWindow = mrSlideSorter.GetContentWindow().get();
+ PaneDockingWindow* pDockingWindow = NULL;
+ while (pWindow!=NULL && pDockingWindow==NULL)
{
- bRearrangeSuccess = mpLayouter->RearrangeHorizontal (
- pWindow->GetSizePixel(),
- mrModel.GetPageDescriptor(0)->GetPage()->GetSize(),
- pWindow,
- mrModel.GetPageCount());
+ pDockingWindow = dynamic_cast<PaneDockingWindow*>(pWindow);
+ pWindow = pWindow->GetParent();
}
- else
+
+ if (pDockingWindow != NULL)
{
- bRearrangeSuccess = mpLayouter->RearrangeVertical (
- pWindow->GetSizePixel(),
- mrModel.GetPageDescriptor(0)->GetPage()->GetSize(),
- pWindow);
+ const long nScrollBarSize (
+ Application::GetSettings().GetStyleSettings().GetScrollBarSize());
+ switch (pDockingWindow->GetOrientation())
+ {
+ case PaneDockingWindow::HorizontalOrientation:
+ if (SetOrientation(Layouter::HORIZONTAL))
+ {
+ const Range aRange (mpLayouter->GetValidVerticalSizeRange());
+ pDockingWindow->SetValidSizeRange(Range(
+ aRange.Min() + nScrollBarSize,
+ aRange.Max() + nScrollBarSize));
+ }
+ break;
+
+ case PaneDockingWindow::VerticalOrientation:
+ if (SetOrientation(Layouter::VERTICAL))
+ {
+ const Range aRange (mpLayouter->GetValidHorizontalSizeRange());
+ pDockingWindow->SetValidSizeRange(Range(
+ aRange.Min() + nScrollBarSize,
+ aRange.Max() + nScrollBarSize));
+ }
+ break;
+
+ case PaneDockingWindow::UnknownOrientation:
+ if (SetOrientation(Layouter::GRID))
+ {
+ const sal_Int32 nAdditionalSize (10);
+ pDockingWindow->SetMinOutputSizePixel(Size(
+ mpLayouter->GetValidHorizontalSizeRange().Min()
+ + nScrollBarSize
+ + nAdditionalSize,
+ mpLayouter->GetValidVerticalSizeRange().Min()
+ + nScrollBarSize
+ + nAdditionalSize));
+ }
+ return;
+ }
}
-
- if (bRearrangeSuccess)
+ else
{
- Layout();
- pWindow->Invalidate();
+ // We are not placed in a docking window. One possible reason
+ // is that the slide sorter is temporarily into a cache and was
+ // reparented to a non-docking window.
+ SetOrientation(Layouter::GRID);
}
}
}
@@ -326,38 +489,40 @@ void SlideSorterView::Resize (void)
void SlideSorterView::Layout ()
{
- ::sd::Window* pWindow = GetWindow();
- if (pWindow != NULL)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
{
// Set the model area, i.e. the smallest rectangle that includes all
// page objects.
- Rectangle aViewBox (mpLayouter->GetPageBox(mrModel.GetPageCount()));
+ const Rectangle aViewBox (mpLayouter->GetTotalBoundingBox());
pWindow->SetViewOrigin (aViewBox.TopLeft());
pWindow->SetViewSize (aViewBox.GetSize());
- Size aPageObjectPixelSize (pWindow->LogicToPixel(mpLayouter->GetPageObjectSize()));
- if (maPreviewSize != aPageObjectPixelSize && mpPreviewCache.get()!=NULL)
+ ::boost::shared_ptr<PageObjectLayouter> pPageObjectLayouter(
+ mpLayouter->GetPageObjectLayouter());
+ if (pPageObjectLayouter)
{
- mpPreviewCache->ChangeSize(aPageObjectPixelSize);
- maPreviewSize = aPageObjectPixelSize;
+ const Size aNewPreviewSize (mpLayouter->GetPageObjectLayouter()->GetSize(
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::WindowCoordinateSystem));
+ if (maPreviewSize != aNewPreviewSize && GetPreviewCache())
+ {
+ mpPreviewCache->ChangeSize(aNewPreviewSize, true);
+ maPreviewSize = aNewPreviewSize;
+ }
}
// Iterate over all page objects and place them relative to the
// containing page.
model::PageEnumeration aPageEnumeration (
model::PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
- int nIndex = 0;
while (aPageEnumeration.HasMoreElements())
{
model::SharedPageDescriptor pDescriptor (aPageEnumeration.GetNextElement());
- SdrPageObj* pPageObject = pDescriptor->GetPageObject();
- Rectangle aPageObjectBox (mpLayouter->GetPageObjectBox (nIndex));
- pPageObject->SetSnapRect(aPageObjectBox);
-
- nIndex += 1;
+ pDescriptor->SetBoundingBox(mpLayouter->GetPageObjectBox(pDescriptor->GetPageIndex()));
}
- // Set the page so that it encloses all page objects.
- mpPage->SetSize (aViewBox.GetSize());
+
+ GetPageObjectPainter()->NotifyResize();
}
InvalidatePageObjectVisibilities ();
@@ -376,71 +541,56 @@ void SlideSorterView::InvalidatePageObjectVisibilities (void)
void SlideSorterView::DeterminePageObjectVisibilities (void)
{
- ::sd::Window* pWindow = GetWindow();
- if (pWindow != NULL)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
{
// Set this flag to true here so that an invalidate during the
// visibility calculation can correctly invalidate it again.
mbPageObjectVisibilitiesValid = true;
- Rectangle aViewArea (
- Point(0,0),
- pWindow->GetSizePixel());
- aViewArea = pWindow->PixelToLogic (aViewArea);
- int nFirstIndex =
- mpLayouter->GetIndexOfFirstVisiblePageObject (aViewArea);
- int nLastIndex =
- mpLayouter->GetIndexOfLastVisiblePageObject (aViewArea);
+ Rectangle aViewArea (pWindow->PixelToLogic(Rectangle(Point(0,0),pWindow->GetSizePixel())));
+ const Range aRange (mpLayouter->GetRangeOfVisiblePageObjects(aViewArea));
+ const Range aUnion(
+ ::std::min(maVisiblePageRange.Min(), aRange.Min()),
+ ::std::max(maVisiblePageRange.Max(), aRange.Max()));
// For page objects that just dropped off the visible area we
// decrease the priority of pending requests for preview bitmaps.
-
- int nMinIndex = ::std::min (mnFirstVisiblePageIndex, nFirstIndex);
- int nMaxIndex = ::std::max (mnLastVisiblePageIndex, nLastIndex);
- if (mnFirstVisiblePageIndex!=nFirstIndex || mnLastVisiblePageIndex!=nLastIndex)
+ if (maVisiblePageRange != aRange)
mbPreciousFlagUpdatePending |= true;
+
model::SharedPageDescriptor pDescriptor;
- view::PageObjectViewObjectContact* pContact;
- for (int nIndex=nMinIndex; nIndex<=nMaxIndex; nIndex++)
+ for (int nIndex=aUnion.Min(); nIndex<=aUnion.Max(); nIndex++)
{
- // Determine the visibility before and after the change so that
- // we can handle the page objects for which the visibility has
- // changed.
- bool bWasVisible = nIndex>=mnFirstVisiblePageIndex
- && nIndex<=mnLastVisiblePageIndex;
- bool bIsVisible = nIndex>=nFirstIndex && nIndex<=nLastIndex;
-
- // Get the view-object-contact.
- if (bWasVisible != bIsVisible)
- {
- pContact = NULL;
- pDescriptor = mrModel.GetPageDescriptor(nIndex);
- if (pDescriptor.get() != NULL)
- pContact = pDescriptor->GetViewObjectContact();
-
- if (pDescriptor.get() != NULL)
- pDescriptor->SetVisible(bIsVisible);
- }
-
+ pDescriptor = mrModel.GetPageDescriptor(nIndex);
+ if (pDescriptor.get() != NULL)
+ SetState(
+ pDescriptor,
+ PageDescriptor::ST_Visible,
+ aRange.IsInside(nIndex));
}
- if (mnFirstVisiblePageIndex != nFirstIndex
- || mnLastVisiblePageIndex != nLastIndex)
+ // Broadcast a change of the set of visible page objects.
+ if (maVisiblePageRange != aRange)
{
- mnFirstVisiblePageIndex = nFirstIndex;
- mnLastVisiblePageIndex = nLastIndex;
+ maVisiblePageRange = aRange;
- // Tell the listeners that the visibility of some objects has changed.
- ::std::vector<Link> aChangeListeners (maVisibilityChangeListeners);
+ // Tell the listeners that the visibility of some objects has
+ // changed.
+ ::std::vector<Link>& aChangeListeners (maVisibilityChangeListeners);
for (::std::vector<Link>::const_iterator
- iListener=aChangeListeners.begin(),
- iEnd=aChangeListeners.end();
- iListener!=iEnd;
- ++iListener)
+ iLink(aChangeListeners.begin()),
+ iEnd(aChangeListeners.end());
+ iLink!=iEnd;
+ ++iLink)
{
- iListener->Call(NULL);
+ iLink->Call(NULL);
}
}
+
+
+ // Restore the mouse over state.
+ UpdatePageUnderMouse(true);
}
}
@@ -464,9 +614,9 @@ void SlideSorterView::UpdatePreciousFlags (void)
{
pCache->SetPreciousFlag(
pDescriptor->GetPage(),
- (nIndex>=mnFirstVisiblePageIndex && nIndex<=mnLastVisiblePageIndex));
+ maVisiblePageRange.IsInside(nIndex));
SSCD_SET_VISIBILITY(mrModel.GetDocument(), nIndex,
- (nIndex>=mnFirstVisiblePageIndex && nIndex<=mnLastVisiblePageIndex));
+ maVisiblePageRange.IsInside(nIndex));
}
else
{
@@ -482,16 +632,21 @@ void SlideSorterView::UpdatePreciousFlags (void)
-void SlideSorterView::SetOrientation (const Orientation eOrientation)
+bool SlideSorterView::SetOrientation (const Layouter::Orientation eOrientation)
{
- meOrientation = eOrientation;
- RequestRepaint();
+ if (meOrientation != eOrientation)
+ {
+ meOrientation = eOrientation;
+ return true;
+ }
+ else
+ return false;
}
-SlideSorterView::Orientation SlideSorterView::GetOrientation (void) const
+Layouter::Orientation SlideSorterView::GetOrientation (void) const
{
return meOrientation;
}
@@ -501,9 +656,15 @@ SlideSorterView::Orientation SlideSorterView::GetOrientation (void) const
void SlideSorterView::RequestRepaint (void)
{
- ::sd::Window* pWindow = GetWindow();
- if (pWindow != NULL)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
+ {
+ mpLayeredDevice->InvalidateAllLayers(
+ Rectangle(
+ pWindow->PixelToLogic(Point(0,0)),
+ pWindow->PixelToLogic(pWindow->GetSizePixel())));
pWindow->Invalidate();
+ }
}
@@ -511,197 +672,230 @@ void SlideSorterView::RequestRepaint (void)
void SlideSorterView::RequestRepaint (const model::SharedPageDescriptor& rpDescriptor)
{
- ::sd::Window* pWindow = GetWindow();
- if (pWindow != NULL)
- pWindow->Invalidate(
- GetPageBoundingBox (
- rpDescriptor,
- CS_MODEL,
- BBT_INFO));
+ if (rpDescriptor)
+ RequestRepaint(rpDescriptor->GetBoundingBox());
}
-Rectangle SlideSorterView::GetModelArea (void)
+void SlideSorterView::RequestRepaint (const Rectangle& rRepaintBox)
{
- return Rectangle (
- Point (0,0),
- Size (mpPage->GetSize().Width(),mpPage->GetSize().Height()));
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
+ {
+ mpLayeredDevice->InvalidateAllLayers(rRepaintBox);
+ pWindow->Invalidate(rRepaintBox);
+ }
}
-
-Rectangle SlideSorterView::GetPageBoundingBox (
- const model::SharedPageDescriptor& rpDescriptor,
- CoordinateSystem eCoordinateSystem,
- BoundingBoxType eBoundingBoxType) const
+void SlideSorterView::RequestRepaint (const Region& rRepaintRegion)
{
- Rectangle aBBox;
- SdrObject* pPageObject = rpDescriptor->GetPageObject();
- if (pPageObject != NULL)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
{
- aBBox = pPageObject->GetCurrentBoundRect();
- AdaptBoundingBox (aBBox, eCoordinateSystem, eBoundingBoxType);
+ mpLayeredDevice->InvalidateAllLayers(rRepaintRegion);
+ pWindow->Invalidate(rRepaintRegion);
}
-
- return aBBox;
}
-Rectangle SlideSorterView::GetPageBoundingBox (
- sal_Int32 nIndex,
- CoordinateSystem eCoordinateSystem,
- BoundingBoxType eBoundingBoxType) const
+Rectangle SlideSorterView::GetModelArea (void)
{
- Rectangle aBBox;
- if (nIndex >= 0 && nIndex<mrModel.GetPageCount())
+ return mpLayouter->GetTotalBoundingBox();
+}
+
+
+#ifdef DEBUG_TIMING
+static ::canvas::tools::ElapsedTime gaTimer;
+static const size_t gFrameTimeCount (10);
+static size_t gFrameTimeIndex (0);
+static ::std::vector<double> gFrameTimes (gFrameTimeCount, 0);
+static double gFrameTimeSum (0);
+static const Rectangle gFrameTimeBox (10,10,150,20);
+static double gnLastFrameStart = 0;
+#endif
+
+void SlideSorterView::CompleteRedraw (
+ OutputDevice* pDevice,
+ const Region& rPaintArea,
+ sdr::contact::ViewObjectContactRedirector* pRedirector)
+{
+ (void)pRedirector;
+#ifdef DEBUG_TIMING
+ const double nStartTime (gaTimer.getElapsedTime());
+ OSL_TRACE("SlideSorterView::CompleteRedraw start at %f, %s",
+ nStartTime,
+ mnLockRedrawSmph ? "locked" : "");
+#endif
+
+ if (pDevice == NULL || pDevice!=mrSlideSorter.GetContentWindow().get())
+ return;
+
+ // The parent implementation of CompleteRedraw is called only when
+ // painting is locked. We do all the painting ourself. When painting
+ // is locked the parent implementation keeps track of the repaint
+ // requests and later, when painting is unlocked, calls CompleteRedraw
+ // for all missed repaints.
+
+ if (mnLockRedrawSmph == 0)
+ {
+ mrSlideSorter.GetContentWindow()->IncrementLockCount();
+ if (mpLayeredDevice->HandleMapModeChange())
+ DeterminePageObjectVisibilities();
+ mpLayeredDevice->Repaint(rPaintArea);
+ mrSlideSorter.GetContentWindow()->DecrementLockCount();
+ }
+ else
{
- aBBox = mpLayouter->GetPageObjectBox(nIndex);
- AdaptBoundingBox (aBBox, eCoordinateSystem, eBoundingBoxType);
+ maRedrawRegion.Union(rPaintArea);
}
- return aBBox;
+#ifdef DEBUG_TIMING
+ const double nEndTime (gaTimer.getElapsedTime());
+ OSL_TRACE("SlideSorterView::CompleteRedraw end at %f after %fms", nEndTime, (nEndTime-nStartTime)*1000);
+ gFrameTimeSum -= gFrameTimes[gFrameTimeIndex];
+ gFrameTimes[gFrameTimeIndex] = nStartTime - gnLastFrameStart;
+ gnLastFrameStart = nStartTime;
+ gFrameTimeSum += gFrameTimes[gFrameTimeIndex];
+ gFrameTimeIndex = (gFrameTimeIndex+1) % gFrameTimeCount;
+
+
+ mrSlideSorter.GetContentWindow()->SetFillColor(COL_BLUE);
+ mrSlideSorter.GetContentWindow()->DrawRect(gFrameTimeBox);
+ mrSlideSorter.GetContentWindow()->SetTextColor(COL_WHITE);
+ mrSlideSorter.GetContentWindow()->DrawText(
+ gFrameTimeBox,
+ ::rtl::OUString::valueOf(1 / (gFrameTimeSum / gFrameTimeCount)),
+ TEXT_DRAW_RIGHT | TEXT_DRAW_VCENTER);
+ // mrSlideSorter.GetContentWindow()->Invalidate(gFrameTimeBox);
+#endif
}
-void SlideSorterView::CompleteRedraw(OutputDevice* pDevice, const Region& rPaintArea, sdr::contact::ViewObjectContactRedirector* pRedirector)
+void SlideSorterView::Paint (
+ OutputDevice& rDevice,
+ const Rectangle& rRepaintArea)
{
- if (mnLockRedrawSmph == 0)
- {
- // Update the page visibilities when they have been invalidated.
- if ( ! mbPageObjectVisibilitiesValid)
- DeterminePageObjectVisibilities();
+ if ( ! mpPageObjectPainter)
+ if ( ! GetPageObjectPainter())
+ return;
- if (mbPreciousFlagUpdatePending)
- UpdatePreciousFlags();
+ // Update the page visibilities when they have been invalidated.
+ if ( ! mbPageObjectVisibilitiesValid)
+ DeterminePageObjectVisibilities();
- // Call the base class InitRedraw even when re-drawing is locked to
- // let it remember the request for a redraw.
- View::CompleteRedraw (pDevice, rPaintArea, pRedirector);
- }
- else
+ if (mbPreciousFlagUpdatePending)
+ UpdatePreciousFlags();
+
+ if (mbIsRearrangePending)
+ Rearrange();
+
+ // Paint all page objects that are fully or partially inside the
+ // repaint region.
+ const Range aRange (mpLayouter->GetRangeOfVisiblePageObjects(rRepaintArea));
+ for (sal_Int32 nIndex=aRange.Min(); nIndex<=aRange.Max(); ++nIndex)
{
- // In sd::View::CompleteRedraw() this call is recorded and given
- // region is painted when the view is unlocked.
- View::CompleteRedraw (pDevice, rPaintArea, pRedirector);
+ model::SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nIndex));
+ if (!pDescriptor || ! pDescriptor->HasState(PageDescriptor::ST_Visible))
+ continue;
+
+ mpPageObjectPainter->PaintPageObject(rDevice, pDescriptor);
}
}
-void SlideSorterView::InvalidateOneWin (::Window& rWindow)
+void SlideSorterView::ConfigurationChanged (
+ utl::ConfigurationBroadcaster* pBroadcaster,
+ sal_uInt32 nHint)
{
- // if ( IsInvalidateAllowed() )
- View::InvalidateOneWin (rWindow);
+ // Some changes of the configuration (some of the colors for example)
+ // may affect the previews. Throw away the old ones and create new ones.
+ cache::PageCacheManager::Instance()->InvalidateAllCaches();
+
+ ::sd::View::ConfigurationChanged(pBroadcaster, nHint);
+ RequestRepaint();
+
}
-void SlideSorterView::InvalidateOneWin (
- ::Window& rWindow,
- const Rectangle& rPaintArea)
+::boost::shared_ptr<cache::PageCache> SlideSorterView::GetPreviewCache (void)
{
- // if( IsInvalidateAllowed() )
- View::InvalidateOneWin (rWindow, rPaintArea);
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow && mpPreviewCache.get() == NULL)
+ {
+ mpPreviewCache.reset(
+ new cache::PageCache(
+ mpLayouter->GetPageObjectSize(),
+ false,
+ cache::SharedCacheContext(new ViewCacheContext(mrSlideSorter))));
+ }
+
+ return mpPreviewCache;
}
-::sd::Window* SlideSorterView::GetWindow (void) const
+Pair SlideSorterView::GetVisiblePageRange (void)
{
- return static_cast< ::sd::Window*>(GetFirstOutputDevice());
+ if ( ! mbPageObjectVisibilitiesValid)
+ DeterminePageObjectVisibilities();
+ return maVisiblePageRange;
}
-void SlideSorterView::AdaptBoundingBox (
- Rectangle& rModelPageObjectBoundingBox,
- CoordinateSystem eCoordinateSystem,
- BoundingBoxType eBoundingBoxType) const
+void SlideSorterView::AddVisibilityChangeListener (const Link& rListener)
{
- CoordinateSystem aCurrentCoordinateSystem = CS_MODEL;
- ::sd::Window* pWindow = GetWindow();
- if (pWindow != NULL)
+ if (::std::find (
+ maVisibilityChangeListeners.begin(),
+ maVisibilityChangeListeners.end(),
+ rListener) == maVisibilityChangeListeners.end())
{
- if (eBoundingBoxType == BBT_INFO)
- {
- // Make the box larger so that it encloses all relevant
- // displayed information.
- if (aCurrentCoordinateSystem == CS_MODEL)
- {
- // The relevant offsets are given in pixel values. Therefore
- // transform the box first into screen coordinates.
- rModelPageObjectBoundingBox
- = pWindow->LogicToPixel (rModelPageObjectBoundingBox);
- aCurrentCoordinateSystem = CS_SCREEN;
- }
- rModelPageObjectBoundingBox.Left() -= maPagePixelBorder.Left();
- rModelPageObjectBoundingBox.Right() += maPagePixelBorder.Right();
- rModelPageObjectBoundingBox.Top() -= maPagePixelBorder.Top();
- rModelPageObjectBoundingBox.Bottom() += maPagePixelBorder.Bottom();
- }
-
- // Make sure that the bounding box is given in the correct coordinate
- // system.
- if (eCoordinateSystem != aCurrentCoordinateSystem)
- {
- if (eCoordinateSystem == CS_MODEL)
- rModelPageObjectBoundingBox
- = pWindow->PixelToLogic (rModelPageObjectBoundingBox);
- else
- rModelPageObjectBoundingBox
- = pWindow->LogicToPixel (rModelPageObjectBoundingBox);
- }
+ maVisibilityChangeListeners.push_back(rListener);
}
}
-::boost::shared_ptr<cache::PageCache> SlideSorterView::GetPreviewCache (void)
+void SlideSorterView::RemoveVisibilityChangeListener(const Link&rListener)
{
- ::sd::Window* pWindow = GetWindow();
- if (pWindow != NULL && mpPreviewCache.get() == NULL)
- {
- maPreviewSize = pWindow->LogicToPixel(mpLayouter->GetPageObjectSize());
- mpPreviewCache.reset(
- new cache::PageCache(
- maPreviewSize,
- cache::SharedCacheContext(new ViewCacheContext(mrSlideSorter.GetModel(), *this))));
- }
-
- return mpPreviewCache;
+ maVisibilityChangeListeners.erase (
+ ::std::find (
+ maVisibilityChangeListeners.begin(),
+ maVisibilityChangeListeners.end(),
+ rListener));
}
-ViewOverlay& SlideSorterView::GetOverlay (void)
+ButtonBar& SlideSorterView::GetButtonBar (void) const
{
- return *mpViewOverlay.get();
+ OSL_ASSERT(mpButtonBar);
+ return *mpButtonBar;
}
-SlideSorterView::PageRange SlideSorterView::GetVisiblePageRange (void)
+ToolTip& SlideSorterView::GetToolTip (void) const
{
- const int nMaxPageIndex (mrModel.GetPageCount() - 1);
- if ( ! mbPageObjectVisibilitiesValid)
- DeterminePageObjectVisibilities();
- return PageRange(
- ::std::min(mnFirstVisiblePageIndex,nMaxPageIndex),
- ::std::min(mnLastVisiblePageIndex, nMaxPageIndex));
+ OSL_ASSERT(mpToolTip);
+ return *mpToolTip;
}
@@ -719,103 +913,220 @@ void SlideSorterView::Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint
-void SlideSorterView::UpdatePageBorders (void)
+void SlideSorterView::UpdatePageUnderMouse (bool bAnimate)
{
- maPagePixelBorder = SvBorder();
- ::sd::Window* pWindow = GetWindow();
- if (mrModel.GetPageCount()>0 && pWindow!=NULL)
+ ::boost::shared_ptr<ScrollBar> pVScrollBar (mrSlideSorter.GetVerticalScrollBar());
+ ::boost::shared_ptr<ScrollBar> pHScrollBar (mrSlideSorter.GetHorizontalScrollBar());
+ if ((pVScrollBar && pVScrollBar->IsVisible() && pVScrollBar->IsTracking())
+ || (pHScrollBar && pHScrollBar->IsVisible() && pHScrollBar->IsTracking()))
{
- // Calculate the border in model coordinates.
- maPageNumberAreaModelSize = PageObjectViewObjectContact::CalculatePageNumberAreaModelSize (
- pWindow,
- mrModel.GetPageCount());
- maModelBorder = PageObjectViewObjectContact::CalculatePageModelBorder (
- pWindow,
- mrModel.GetPageCount());
-
- // Depending on values in the global properties the border has to be
- // extended a little bit.
- ::boost::shared_ptr<controller::Properties> pProperties(
- mrSlideSorter.GetController().GetProperties());
- if (pProperties.get()!=NULL && pProperties->IsHighlightCurrentSlide())
+ // One of the scroll bars is tracking mouse movement. Do not
+ // highlight the slide under the mouse in this case.
+ SetPageUnderMouse(SharedPageDescriptor(),false);
+ return;
+ }
+
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow && pWindow->IsVisible() && ! pWindow->IsMouseCaptured())
+ {
+ const Window::PointerState aPointerState (pWindow->GetPointerState());
+ const Rectangle aWindowBox (pWindow->GetPosPixel(), pWindow->GetSizePixel());
+ if (aWindowBox.IsInside(aPointerState.maPos))
{
- Size aBorderSize (pWindow->PixelToLogic (Size(3,3)));
- maModelBorder.Left() += aBorderSize.Width();
- maModelBorder.Right() += aBorderSize.Width();
- maModelBorder.Top() += aBorderSize.Height();
- maModelBorder.Bottom() += aBorderSize.Height();
+ UpdatePageUnderMouse (
+ aPointerState.maPos,
+ (aPointerState.mnState & MOUSE_LEFT)!=0,
+ bAnimate);
+ return;
}
+ }
- // Set the border at all page descriptors so that the contact
- // objects have access to them.
- model::PageEnumeration aPageEnumeration (
- model::PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
- while (aPageEnumeration.HasMoreElements())
+ SetPageUnderMouse(SharedPageDescriptor(),false);
+}
+
+
+
+
+void SlideSorterView::UpdatePageUnderMouse (
+ const Point& rMousePosition,
+ const bool bIsMouseButtonDown,
+ const bool bAnimate)
+{
+ UpdatePageUnderMouse(
+ mrSlideSorter.GetController().GetPageAt(rMousePosition),
+ rMousePosition,
+ bIsMouseButtonDown,
+ bAnimate);
+}
+
+
+
+
+void SlideSorterView::UpdatePageUnderMouse (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point& rMousePosition,
+ const bool bIsMouseButtonDown,
+ const bool bAnimate)
+{
+ // Update the page under the mouse.
+ SetPageUnderMouse(rpDescriptor, bAnimate);
+
+ // Tell the button bar about the new mouse position.
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ const Point aMouseModelPosition (pWindow->PixelToLogic(rMousePosition));
+
+ ::boost::shared_ptr<ViewShell> pMainViewShell (mrSlideSorter.GetViewShellBase()->GetMainViewShell());
+ if (pMainViewShell
+ && pMainViewShell->GetShellType()!=ViewShell::ST_DRAW)
+ {
+ const bool bIsMouseOverButtonBar (GetButtonBar().IsMouseOverBar());
+ GetButtonBar().ProcessMouseMotionEvent(rpDescriptor, aMouseModelPosition, bIsMouseButtonDown);
+ // Set the help text of the slide when the mouse was moved from the
+ // button bar back over the preview.
+ if (rpDescriptor
+ && GetButtonBar().IsMouseOverBar() != bIsMouseOverButtonBar
+ && bIsMouseOverButtonBar)
{
- model::SharedPageDescriptor pDescriptor (aPageEnumeration.GetNextElement());
- pDescriptor->SetModelBorder(maModelBorder);
- pDescriptor->SetPageNumberAreaModelSize(maPageNumberAreaModelSize);
+ mpToolTip->ShowDefaultHelpText();
}
-
- // Convert the borders to pixel coordinates and store them for later
- // use.
- Size aTopLeftBorders(pWindow->LogicToPixel(
- Size (maModelBorder.Left(), maModelBorder.Top())));
- Size aBottomRightBorders(pWindow->LogicToPixel(
- Size (maModelBorder.Right(), maModelBorder.Bottom())));
- maPagePixelBorder = SvBorder (
- aTopLeftBorders.Width(),
- aTopLeftBorders.Height(),
- aBottomRightBorders.Width(),
- aBottomRightBorders.Height());
}
-
- // Finally tell the layouter about the borders.
- mpLayouter->SetBorders (2,5,4,5);
- mpLayouter->SetPageBorders (
- maPagePixelBorder.Left(),
- maPagePixelBorder.Right(),
- maPagePixelBorder.Top(),
- maPagePixelBorder.Bottom());
}
-void SlideSorterView::AddSdrObject (SdrObject& rObject)
+void SlideSorterView::SetPageUnderMouse (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bAnimate)
{
- mpPage->InsertObject(&rObject);
- rObject.SetModel(&maPageModel);
+ if (mpPageUnderMouse != rpDescriptor)
+ {
+ if (mpPageUnderMouse)
+ SetState(mpPageUnderMouse, PageDescriptor::ST_MouseOver, false, bAnimate);
+
+ mpPageUnderMouse = rpDescriptor;
+
+ if (mpPageUnderMouse)
+ SetState(mpPageUnderMouse, PageDescriptor::ST_MouseOver, true, bAnimate);
+
+ // Change the quick help text to display the name of the page under
+ // the mouse.
+ mpToolTip->SetPage(rpDescriptor);
+ }
}
-void SlideSorterView::AddVisibilityChangeListener (const Link& rListener)
+bool SlideSorterView::SetState (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const PageDescriptor::State eState,
+ const bool bStateValue,
+ const bool bAnimate)
{
- if (::std::find (
- maVisibilityChangeListeners.begin(),
- maVisibilityChangeListeners.end(),
- rListener) == maVisibilityChangeListeners.end())
+ model::SharedPageDescriptor pDescriptor (rpDescriptor);
+ if ( ! pDescriptor)
+ return false;
+
+ const bool bModified (pDescriptor->SetState(eState, bStateValue));
+ if ( ! bModified)
+ return false;
+
+ // When the page object is not visible (i.e. not on the screen then
+ // nothing has to be painted.
+ if (pDescriptor->HasState(PageDescriptor::ST_Visible))
{
- maVisibilityChangeListeners.push_back(rListener);
+ // For most states a change of that state leads to visible
+ // difference and we have to request a repaint.
+ if (eState != PageDescriptor::ST_WasSelected)
+ RequestRepaint(pDescriptor);
}
+
+ ::boost::shared_ptr<ViewShell> pMainViewShell(mrSlideSorter.GetViewShellBase()->GetMainViewShell());
+ if (pMainViewShell
+ && pMainViewShell->GetShellType()!=ViewShell::ST_DRAW)
+ {
+ // Fade in or out the buttons.
+ if (eState == PageDescriptor::ST_MouseOver)
+ {
+ if (bStateValue)
+ GetButtonBar().RequestFadeIn(rpDescriptor, bAnimate);
+ else
+ GetButtonBar().RequestFadeOut(rpDescriptor, bAnimate);
+ }
+ }
+
+ return bModified;
}
-void SlideSorterView::RemoveVisibilityChangeListener(const Link&rListener)
+::boost::shared_ptr<PageObjectPainter> SlideSorterView::GetPageObjectPainter (void)
{
- maVisibilityChangeListeners.erase (
- ::std::find (
- maVisibilityChangeListeners.begin(),
- maVisibilityChangeListeners.end(),
- rListener));
+ if ( ! mpPageObjectPainter)
+ mpPageObjectPainter.reset(new PageObjectPainter(mrSlideSorter));
+ return mpPageObjectPainter;
+}
+
+
+
+
+::boost::shared_ptr<LayeredDevice> SlideSorterView::GetLayeredDevice (void) const
+{
+ return mpLayeredDevice;
}
+//===== SlideSorterView::DrawLock =============================================
+
+SlideSorterView::DrawLock::DrawLock (
+ view::SlideSorterView& rView,
+ const SharedSdWindow& rpWindow)
+ : mrView(rView),
+ mpWindow(rpWindow)
+{
+ if (mrView.mnLockRedrawSmph == 0)
+ mrView.maRedrawRegion.SetEmpty();
+ ++mrView.mnLockRedrawSmph;
+}
+
+
+
+
+SlideSorterView::DrawLock::DrawLock (SlideSorter& rSlideSorter)
+ : mrView(rSlideSorter.GetView()),
+ mpWindow(rSlideSorter.GetContentWindow())
+{
+ if (mrView.mnLockRedrawSmph == 0)
+ mrView.maRedrawRegion.SetEmpty();
+ ++mrView.mnLockRedrawSmph;
+}
+
+
+
+
+SlideSorterView::DrawLock::~DrawLock (void)
+{
+ OSL_ASSERT(mrView.mnLockRedrawSmph>0);
+ --mrView.mnLockRedrawSmph;
+ if (mrView.mnLockRedrawSmph == 0)
+ if (mpWindow)
+ {
+ mpWindow->Invalidate(mrView.maRedrawRegion);
+ mpWindow->Update();
+ }
+}
+
+
+
+
+void SlideSorterView::DrawLock::Dispose (void)
+{
+ mpWindow.reset();
+}
+
} } } // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
new file mode 100644
index 000000000000..70655caeda2a
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
@@ -0,0 +1,1558 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "view/SlsButtonBar.hxx"
+
+#include "SlideSorter.hxx"
+#include "model/SlsPageDescriptor.hxx"
+#include "model/SlideSorterModel.hxx"
+#include "view/SlsTheme.hxx"
+#include "view/SlideSorterView.hxx"
+#include "view/SlsToolTip.hxx"
+#include "controller/SlideSorterController.hxx"
+#include "controller/SlsSlotManager.hxx"
+#include "controller/SlsCurrentSlideManager.hxx"
+#include "controller/SlsPageSelector.hxx"
+#include "controller/SlsAnimator.hxx"
+#include "controller/SlsAnimationFunction.hxx"
+#include "app.hrc"
+#include "drawdoc.hxx"
+#include <svx/svxids.hrc>
+#include <sfx2/dispatch.hxx>
+#include <vcl/bmpacc.hxx>
+#include <vcl/virdev.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <com/sun/star/presentation/XPresentation2.hpp>
+#include <boost/bind.hpp>
+
+using ::com::sun::star::uno::Any;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::beans::PropertyValue;
+using ::com::sun::star::presentation::XPresentation2;
+
+namespace sd { namespace slidesorter { namespace view {
+
+/** Base class for the painter of the background bar onto which the buttons
+ are painted. It also provides some size information.
+*/
+class ButtonBar::BackgroundTheme
+{
+public:
+ BackgroundTheme(
+ const ::boost::shared_ptr<Theme>& rpTheme,
+ const ::std::vector<SharedButton>& rButtons);
+ /** Set the preview bounding box, the maximal area in which to display
+ buttons. A call to this method triggers a call to Layout().
+ */
+ void SetPreviewBoundingBox (const Rectangle& rPreviewBoundingBox);
+ Button::IconSize GetIconSize (void) const;
+
+ virtual BitmapEx CreateBackground (
+ const OutputDevice& rTemplateDevice,
+ const bool bIsButtonDown) const = 0;
+ virtual Point GetBackgroundLocation (void) = 0;
+ virtual Rectangle GetButtonArea (void) = 0;
+
+protected:
+ ::boost::shared_ptr<Theme> mpTheme;
+ Rectangle maPreviewBoundingBox;
+ Size maMinimumLargeButtonAreaSize;
+ Size maMinimumMediumButtonAreaSize;
+ Size maMinimumSmallButtonAreaSize;
+ Button::IconSize meIconSize;
+
+ virtual void Layout (void) = 0;
+
+private:
+ void UpdateMinimumIconSizes(const ::std::vector<SharedButton>& rButtons);
+};
+
+
+namespace {
+ /** Rectangular button bar that covers the whole width of the preview.
+ */
+ class RectangleBackgroundTheme : public ButtonBar::BackgroundTheme
+ {
+ public:
+ RectangleBackgroundTheme(
+ const ::boost::shared_ptr<Theme>& rpTheme,
+ const ::std::vector<SharedButton>& rButtons);
+ virtual BitmapEx CreateBackground (
+ const OutputDevice& rTemplateDevice,
+ const bool bIsButtonDown) const;
+ virtual Point GetBackgroundLocation (void);
+ virtual Rectangle GetButtonArea (void);
+ protected:
+ virtual void Layout (void);
+ private:
+ sal_Int32 mnBarHeight;
+ };
+
+ /** Button bar is composed of three images, the left and right end of
+ the bar and the center image. Buttons are only placed over the
+ center image. The center image is painted as is, it is not scaled.
+ */
+ class BitmapBackgroundTheme : public ButtonBar::BackgroundTheme
+ {
+ public:
+ BitmapBackgroundTheme(
+ const ::boost::shared_ptr<Theme>& rpTheme,
+ const ::std::vector<SharedButton>& rButtons);
+ virtual BitmapEx CreateBackground (
+ const OutputDevice& rTemplateDevice,
+ const bool bIsButtonDown) const;
+ virtual Point GetBackgroundLocation (void);
+ virtual Rectangle GetButtonArea (void);
+ protected:
+ virtual void Layout (void);
+ private:
+ Rectangle maButtonArea;
+ Point maBackgroundLocation;
+ };
+
+ /** The source mask is essentially multiplied with the given alpha value.
+ The result is writen to the result mask.
+ */
+ void AdaptTransparency (AlphaMask& rMask, const AlphaMask& rSourceMask, const double nAlpha)
+ {
+ BitmapWriteAccess* pBitmap = rMask.AcquireWriteAccess();
+ const BitmapReadAccess* pSourceBitmap = const_cast<AlphaMask&>(rSourceMask).AcquireReadAccess();
+
+ if (pBitmap!=NULL && pSourceBitmap!=NULL)
+ {
+ const sal_Int32 nWidth (pBitmap->Width());
+ const sal_Int32 nHeight (pBitmap->Height());
+
+ for (sal_Int32 nY = 0; nY<nHeight; ++nY)
+ for (sal_Int32 nX = 0; nX<nWidth; ++nX)
+ {
+ const BYTE nValue (255 - pSourceBitmap->GetPixel(nY, nX).GetBlueOrIndex());
+ const BYTE nNewValue (nValue * (1-nAlpha));
+ pBitmap->SetPixel(nY, nX, 255-nNewValue);
+ }
+ }
+ }
+
+} // end of anonymous namespace
+
+
+//===== ButtonBar::Lock =======================================================
+
+ButtonBar::Lock::Lock (SlideSorter& rSlideSorter)
+ : mrButtonBar(rSlideSorter.GetView().GetButtonBar())
+{
+ mrButtonBar.AcquireLock();
+}
+
+
+
+
+ButtonBar::Lock::~Lock (void)
+{
+ mrButtonBar.ReleaseLock();
+}
+
+
+
+
+//===== ButtonBar =============================================================
+
+ButtonBar::ButtonBar (SlideSorter& rSlideSorter)
+ : mrSlideSorter(rSlideSorter),
+ maPageObjectSize(0,0),
+ maButtonBoundingBox(),
+ maBackgroundLocation(),
+ mpDescriptor(),
+ mbIsExcluded(false),
+ mpButtonUnderMouse(),
+ mpDownButton(),
+ maRegularButtons(),
+ maExcludedButtons(),
+ maNormalBackground(),
+ maButtonDownBackground(),
+ mbIsMouseOverBar(false),
+ mpBackgroundTheme(),
+ mnLockCount(0)
+{
+ HandleDataChangeEvent();
+}
+
+
+
+
+ButtonBar::~ButtonBar (void)
+{
+}
+
+
+
+
+void ButtonBar::ProcessButtonDownEvent (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point aMouseModelLocation)
+{
+ SetButtonUnderMouse(GetButtonAt(aMouseModelLocation));
+ if (mpButtonUnderMouse)
+ mpButtonUnderMouse->SetState(Button::State_Down);
+ mpDownButton = mpButtonUnderMouse;
+
+ mrSlideSorter.GetView().RequestRepaint(rpDescriptor);
+}
+
+
+
+
+void ButtonBar::ProcessButtonUpEvent (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point aMouseModelLocation)
+{
+ SetButtonUnderMouse(GetButtonAt(aMouseModelLocation));
+ if (mpButtonUnderMouse)
+ {
+ mpButtonUnderMouse->SetState(Button::State_Hover);
+ if (mpButtonUnderMouse == mpDownButton)
+ {
+ // This is done only when the buttons are sufficiently visible.
+ if (mpDescriptor->GetVisualState().GetButtonAlpha()<0.7)
+ {
+ mpButtonUnderMouse->ProcessClick(mpDescriptor);
+ mbIsExcluded = mpDescriptor->HasState(model::PageDescriptor::ST_Excluded);
+ ProcessMouseMotionEvent (rpDescriptor, aMouseModelLocation, false);
+ }
+ }
+ }
+ mpDownButton.reset();
+ mrSlideSorter.GetView().RequestRepaint(rpDescriptor);
+}
+
+
+
+
+void ButtonBar::ProcessMouseMotionEvent (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point aMouseModelLocation,
+ const bool bIsMouseButtonDown)
+{
+ model::SharedPageDescriptor pOldDescriptor (mpDescriptor);
+ bool bPageHasChanged (false);
+ bool bButtonHasChanged (false);
+ bool bButtonStateHasChanged (false);
+
+ // Update the page object for which to manage the buttons.
+ bPageHasChanged = SetPage(rpDescriptor);
+ mbIsMouseOverBar = IsMouseOverBar(aMouseModelLocation);
+
+ // Update button under mouse.
+ if (rpDescriptor)
+ {
+ bButtonHasChanged = SetButtonUnderMouse(GetButtonAt(aMouseModelLocation));
+
+ if (mpButtonUnderMouse)
+ {
+ // When the mouse button is down, mark the button under the
+ // mouse only as pressed when it is the same button the mouse
+ // button was pressed over, and where the button release would
+ // lead to a click action.
+ if (bIsMouseButtonDown)
+ {
+ if (mpButtonUnderMouse==mpDownButton)
+ bButtonStateHasChanged = mpButtonUnderMouse->SetState(Button::State_Down);
+ }
+ else
+ bButtonStateHasChanged = mpButtonUnderMouse->SetState(Button::State_Hover);
+ }
+ }
+
+ // Show a quick help text when the mouse is over a button.
+ if (bButtonHasChanged)
+ {
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
+ {
+ if (mpButtonUnderMouse)
+ mrSlideSorter.GetView().GetToolTip().ShowHelpText(mpButtonUnderMouse->GetHelpText());
+ else
+ mrSlideSorter.GetView().GetToolTip().ShowDefaultHelpText();
+ }
+ }
+
+ if (bPageHasChanged || bButtonHasChanged || bButtonStateHasChanged)
+ {
+ if (pOldDescriptor)
+ mrSlideSorter.GetView().RequestRepaint(pOldDescriptor);
+ if (mpDescriptor && pOldDescriptor!=mpDescriptor)
+ mrSlideSorter.GetView().RequestRepaint(mpDescriptor);
+ }
+}
+
+
+
+
+void ButtonBar::ResetPage (void)
+{
+ SetPage(model::SharedPageDescriptor());
+}
+
+
+
+
+bool ButtonBar::SetPage (const model::SharedPageDescriptor& rpDescriptor)
+{
+ if (mpDescriptor != rpDescriptor)
+ {
+ mpDescriptor = rpDescriptor;
+
+ if (mpDescriptor)
+ mbIsExcluded = mpDescriptor->HasState(model::PageDescriptor::ST_Excluded);
+ else
+ mbIsExcluded = false;
+ SetButtonUnderMouse();
+ mpDownButton.reset();
+
+ return true;
+ }
+ else
+ return false;
+}
+
+
+
+
+sal_Int32 ButtonBar::GetButtonCount (const bool bIsExcluded) const
+{
+ if (bIsExcluded)
+ return maExcludedButtons.size();
+ else
+ return maRegularButtons.size();
+}
+
+
+
+
+::boost::shared_ptr<Button> ButtonBar::GetButton (
+ const bool bIsExcluded,
+ const sal_Int32 nIndex) const
+{
+ const ::std::vector<boost::shared_ptr<Button> >& rButtons (bIsExcluded
+ ? maExcludedButtons
+ : maRegularButtons);
+
+ if (nIndex<0 || sal_uInt32(nIndex)>=rButtons.size())
+ {
+ OSL_ASSERT(nIndex<0 || sal_uInt32(nIndex)>=rButtons.size());
+ return ::boost::shared_ptr<Button>();
+ }
+ else
+ return rButtons[sal_uInt32(nIndex)];
+}
+
+
+
+
+SharedButton ButtonBar::GetButtonAt (const Point aModelLocation)
+{
+ if (IsMouseOverBar(aModelLocation))
+ {
+ const Point aLocalLocation (aModelLocation - mpDescriptor->GetBoundingBox().TopLeft());
+ ::std::vector<SharedButton>& rButtons (
+ mbIsExcluded ? maExcludedButtons : maRegularButtons);
+ for (sal_uInt32 nIndex=0; nIndex<rButtons.size(); ++nIndex)
+ {
+ if (rButtons[sal_uInt32(nIndex)]->GetBoundingBox().IsInside(aLocalLocation))
+ {
+ if (rButtons[sal_uInt32(nIndex)]->IsEnabled())
+ return rButtons[sal_uInt32(nIndex)];
+ else
+ return SharedButton();
+ }
+ }
+ }
+
+ return SharedButton();
+}
+
+
+
+
+bool ButtonBar::IsMouseOverBar (void) const
+{
+ return mbIsMouseOverBar;
+}
+
+
+
+
+bool ButtonBar::SetButtonUnderMouse (const SharedButton& rButton)
+{
+ if (mpButtonUnderMouse != rButton)
+ {
+ if (mpButtonUnderMouse)
+ mpButtonUnderMouse->SetState(Button::State_Normal);
+
+ mpButtonUnderMouse = rButton;
+
+ return true;
+ }
+ else
+ return false;
+}
+
+
+
+
+void ButtonBar::Paint (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor)
+{
+ if ( ! rpDescriptor)
+ return;
+
+ const double nButtonBarAlpha (rpDescriptor->GetVisualState().GetButtonBarAlpha());
+ if (nButtonBarAlpha >= 1)
+ return;
+
+ LayoutButtons(rpDescriptor->GetBoundingBox().GetSize());
+
+ const Point aOffset (rpDescriptor->GetBoundingBox().TopLeft());
+
+ // Paint the background.
+ PaintButtonBackground(rDevice, rpDescriptor, aOffset);
+
+ // Paint the buttons.
+ const ::std::vector<SharedButton>& rButtons (
+ rpDescriptor->HasState(model::PageDescriptor::ST_Excluded)
+ ? maExcludedButtons
+ : maRegularButtons);
+
+
+ const double nButtonAlpha (rpDescriptor->GetVisualState().GetButtonAlpha());
+ for (sal_uInt32 nIndex=0; nIndex<rButtons.size(); ++nIndex)
+ rButtons[nIndex]->Paint(
+ rDevice,
+ aOffset,
+ nButtonAlpha,
+ mrSlideSorter.GetTheme());
+}
+
+
+
+
+bool ButtonBar::IsMouseOverButton (void) const
+{
+ return mpButtonUnderMouse;
+}
+
+
+
+
+void ButtonBar::PaintButtonBackground (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point aOffset)
+{
+ BitmapEx* pBitmap = NULL;
+ if (maButtonDownBackground.IsEmpty() || maNormalBackground.IsEmpty())
+ {
+ if (mpBackgroundTheme)
+ {
+ maButtonDownBackground = mpBackgroundTheme->CreateBackground(rDevice, true);
+ maNormalBackground = mpBackgroundTheme->CreateBackground(rDevice, false);
+ }
+ }
+ if (mpButtonUnderMouse && mpButtonUnderMouse->IsDown())
+ pBitmap = &maButtonDownBackground;
+ else
+ pBitmap = &maNormalBackground;
+ if (pBitmap != NULL)
+ {
+ AlphaMask aMask (pBitmap->GetSizePixel());
+ AdaptTransparency(
+ aMask,
+ pBitmap->GetAlpha(),
+ rpDescriptor->GetVisualState().GetButtonBarAlpha());
+ rDevice.DrawBitmapEx(maBackgroundLocation+aOffset, BitmapEx(pBitmap->GetBitmap(), aMask));
+ }
+}
+
+
+
+
+bool ButtonBar::IsMouseOverBar (const Point aModelLocation) const
+{
+ if ( ! mpDescriptor || ! mpDescriptor->GetBoundingBox().IsInside(aModelLocation))
+ return false;
+
+ if ( ! maButtonBoundingBox.IsInside(aModelLocation - mpDescriptor->GetBoundingBox().TopLeft()))
+ return false;
+
+ return true;
+}
+
+
+
+
+void ButtonBar::RequestLayout (void)
+{
+ maPageObjectSize = Size(0,0);
+}
+
+
+
+
+void ButtonBar::LayoutButtons (const Size aPageObjectSize)
+{
+ if (maPageObjectSize != aPageObjectSize)
+ {
+ maPageObjectSize = aPageObjectSize;
+
+ if (mpBackgroundTheme)
+ {
+ mpBackgroundTheme->SetPreviewBoundingBox(
+ mrSlideSorter.GetView().GetLayouter().GetPageObjectLayouter()->GetBoundingBox(
+ Point(0,0),
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::ModelCoordinateSystem));
+ LayoutButtons();
+ }
+
+ // Release the background bitmaps so that on the next paint
+ // they are created anew in the right size.
+ maNormalBackground.SetEmpty();
+ maButtonDownBackground.SetEmpty();
+ }
+}
+
+
+
+
+bool ButtonBar::LayoutButtons (void)
+{
+ const sal_Int32 nGap (mrSlideSorter.GetTheme()->GetIntegerValue(Theme::Integer_ButtonGap));
+ const sal_Int32 nBorder (mrSlideSorter.GetTheme()->GetIntegerValue(Theme::Integer_ButtonBorder));
+
+ const Button::IconSize eIconSize (mpBackgroundTheme->GetIconSize());
+
+ // Tell buttons which size they are.
+ for (sal_uInt32 nIndex=0; nIndex<maExcludedButtons.size(); ++nIndex)
+ maExcludedButtons[nIndex]->SetIconSize(eIconSize);
+ for (sal_uInt32 nIndex=0; nIndex<maRegularButtons.size(); ++nIndex)
+ maRegularButtons[nIndex]->SetIconSize(eIconSize);
+
+ // Determine maximal height and total width of the buttons.
+ // Start with the buttons used for the excluded state.
+ sal_Int32 nMaximumHeight (0);
+ sal_Int32 nExcludedTotalWidth ((maExcludedButtons.size()-1) * nGap + 2*nBorder);
+ for (sal_uInt32 nIndex=0; nIndex<maExcludedButtons.size(); ++nIndex)
+ {
+ const Size aSize (maExcludedButtons[nIndex]->GetSize());
+ if (aSize.Height() > nMaximumHeight)
+ nMaximumHeight = aSize.Height();
+ nExcludedTotalWidth += aSize.Width();
+ }
+
+ // Do the same for the regular buttons.
+ sal_Int32 nRegularTotalWidth ((maRegularButtons.size()-1) * nGap + 2*nBorder);
+ for (sal_uInt32 nIndex=0; nIndex<maRegularButtons.size(); ++nIndex)
+ {
+ const Size aSize (maRegularButtons[nIndex]->GetSize());
+ if (aSize.Height() > nMaximumHeight)
+ nMaximumHeight = aSize.Height();
+ nRegularTotalWidth += aSize.Width();
+ }
+ nMaximumHeight += 2*nBorder;
+
+ // Set up the bounding box of the button bar.
+ maButtonBoundingBox = mpBackgroundTheme->GetButtonArea();
+ maBackgroundLocation = mpBackgroundTheme->GetBackgroundLocation();
+ if (mrSlideSorter.GetTheme()->GetIntegerValue(Theme::Integer_ButtonPaintType) == 1)
+ {
+ // Center the buttons.
+ maButtonBoundingBox.Left() += (maButtonBoundingBox.GetWidth() - nRegularTotalWidth)/2;
+ maButtonBoundingBox.Right() = maButtonBoundingBox.Left() + nRegularTotalWidth - 1;
+ }
+
+ // Place the buttons.
+ Rectangle aBox (maButtonBoundingBox);
+ aBox.Right() -= nBorder;
+ for (sal_Int32 nIndex=maRegularButtons.size()-1; nIndex>=0; --nIndex)
+ {
+ maRegularButtons[nIndex]->Place(aBox);
+ aBox.Right() = maRegularButtons[nIndex]->GetBoundingBox().Left() - nGap;
+ }
+
+ // For slides excluded from the show there is only one icon placed
+ // exactly like the second of the regular icons.
+ if (maRegularButtons.size()>=2 && maExcludedButtons.size()>=1)
+ {
+ aBox = maRegularButtons[1]->GetBoundingBox();
+ maExcludedButtons[0]->Place(aBox);
+ }
+
+ // We return true only when there is no inactive button.
+ for (sal_uInt32 nIndex=0; nIndex<maExcludedButtons.size(); ++nIndex)
+ if ( ! maExcludedButtons[nIndex]->IsActive())
+ return false;
+ for (sal_uInt32 nIndex=0; nIndex<maRegularButtons.size(); ++nIndex)
+ if ( ! maRegularButtons[nIndex]->IsActive())
+ return false;
+
+ return true;
+}
+
+
+
+
+void ButtonBar::RequestFadeIn (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bAnimate)
+{
+ if ( ! rpDescriptor)
+ return;
+ if (mnLockCount > 0)
+ return;
+
+ const double nMinAlpha (0);
+ if ( ! bAnimate)
+ {
+ rpDescriptor->GetVisualState().SetButtonAlpha(nMinAlpha);
+ rpDescriptor->GetVisualState().SetButtonBarAlpha(nMinAlpha);
+ }
+ else
+ StartFadeAnimation(rpDescriptor, nMinAlpha, true);
+}
+
+
+
+
+void ButtonBar::RequestFadeOut (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bAnimate)
+{
+ if ( ! rpDescriptor)
+ return;
+ if (mnLockCount > 0)
+ return;
+
+ const double nMaxAlpha (1);
+ if ( ! bAnimate)
+ {
+ rpDescriptor->GetVisualState().SetButtonAlpha(nMaxAlpha);
+ rpDescriptor->GetVisualState().SetButtonBarAlpha(nMaxAlpha);
+ }
+ else
+ StartFadeAnimation(rpDescriptor, nMaxAlpha, false);
+}
+
+
+
+
+bool ButtonBar::IsVisible (const model::SharedPageDescriptor& rpDescriptor)
+{
+ const double nMaxAlpha (1);
+ return rpDescriptor && rpDescriptor->GetVisualState().GetButtonBarAlpha() < nMaxAlpha;
+}
+
+
+
+
+void ButtonBar::HandleDataChangeEvent (void)
+{
+ maExcludedButtons.clear();
+ maExcludedButtons.push_back(::boost::shared_ptr<Button>(new UnhideButton(mrSlideSorter)));
+
+ maRegularButtons.clear();
+ maRegularButtons.push_back(::boost::shared_ptr<Button>(new StartShowButton(mrSlideSorter)));
+ maRegularButtons.push_back(::boost::shared_ptr<Button>(new HideButton(mrSlideSorter)));
+ maRegularButtons.push_back(::boost::shared_ptr<Button>(new DuplicateButton(mrSlideSorter)));
+
+ mpBackgroundTheme.reset(
+ new BitmapBackgroundTheme(
+ mrSlideSorter.GetTheme(),
+ maRegularButtons));
+
+ // Force layout on next Paint().
+ maPageObjectSize = Size(0,0);
+}
+
+
+
+
+void ButtonBar::StartFadeAnimation (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const double nTargetAlpha,
+ const bool bFadeIn)
+{
+ model::SharedPageDescriptor pDescriptor (rpDescriptor);
+
+ const double nCurrentButtonAlpha (pDescriptor->GetVisualState().GetButtonAlpha());
+ const double nCurrentButtonBarAlpha (pDescriptor->GetVisualState().GetButtonBarAlpha());
+
+ // Stop a running animation.
+ const controller::Animator::AnimationId nId (
+ pDescriptor->GetVisualState().GetButtonAlphaAnimationId());
+ if (nId != controller::Animator::NotAnAnimationId)
+ mrSlideSorter.GetController().GetAnimator()->RemoveAnimation(nId);
+
+ // Prepare the blending functors that translate [0,1] animation
+ // times into alpha values of buttons and button bar.
+ const ::boost::function<double(double)> aButtonBlendFunctor (
+ ::boost::bind(
+ controller::AnimationFunction::Blend,
+ nCurrentButtonAlpha,
+ nTargetAlpha,
+ ::boost::bind(controller::AnimationFunction::Linear, _1)));
+ const ::boost::function<double(double)> aButtonBarBlendFunctor (
+ ::boost::bind(
+ controller::AnimationFunction::Blend,
+ nCurrentButtonBarAlpha,
+ nTargetAlpha,
+ ::boost::bind(controller::AnimationFunction::Linear, _1)));
+
+ // Delay the fade in a little bit when the buttons are not visible at
+ // all so that we do not leave a trail of half-visible buttons when the
+ // mouse is moved across the screen. No delay on fade out or when the
+ // buttons are already showing. Fade out is faster than fade in.
+ const double nDelay (nCurrentButtonBarAlpha>0 && nCurrentButtonBarAlpha<1
+ ? 0
+ : (mrSlideSorter.GetTheme()->GetIntegerValue(bFadeIn
+ ? Theme::Integer_ButtonFadeInDelay
+ : Theme::Integer_ButtonFadeOutDelay)));
+ const double nDuration (mrSlideSorter.GetTheme()->GetIntegerValue(bFadeIn
+ ? Theme::Integer_ButtonFadeInDuration
+ : Theme::Integer_ButtonFadeOutDuration));
+ pDescriptor->GetVisualState().SetButtonAlphaAnimationId(
+ mrSlideSorter.GetController().GetAnimator()->AddAnimation(
+ ::boost::bind(
+ controller::AnimationFunction::ApplyButtonAlphaChange,
+ pDescriptor,
+ ::boost::ref(mrSlideSorter.GetView()),
+ ::boost::bind(aButtonBlendFunctor, _1),
+ ::boost::bind(aButtonBarBlendFunctor, _1)),
+ nDelay,
+ nDuration,
+ ::boost::bind(
+ &model::VisualState::SetButtonAlphaAnimationId,
+ ::boost::ref(pDescriptor->GetVisualState()),
+ controller::Animator::NotAnAnimationId)
+ ));
+}
+
+
+
+
+void ButtonBar::AcquireLock (void)
+{
+ if (mnLockCount == 0 && mpDescriptor)
+ RequestFadeOut(mpDescriptor, true);
+
+ ++mnLockCount;
+}
+
+
+
+
+void ButtonBar::ReleaseLock (void)
+{
+ --mnLockCount;
+
+ if (mnLockCount == 0 && mpDescriptor)
+ RequestFadeIn(mpDescriptor, true);
+}
+
+
+
+
+//===== BackgroundTheme =====================================================
+
+ButtonBar::BackgroundTheme::BackgroundTheme (
+ const ::boost::shared_ptr<Theme>& rpTheme,
+ const ::std::vector<SharedButton>& rButtons)
+ : mpTheme(rpTheme)
+{
+ UpdateMinimumIconSizes(rButtons);
+}
+
+
+
+
+void ButtonBar::BackgroundTheme::SetPreviewBoundingBox (const Rectangle& rPreviewBoundingBox)
+{
+ maPreviewBoundingBox = rPreviewBoundingBox;
+ Layout();
+}
+
+
+
+
+void ButtonBar::BackgroundTheme::UpdateMinimumIconSizes (
+ const ::std::vector<SharedButton>& rButtons)
+{
+ OSL_ASSERT(mpTheme);
+
+ sal_Int32 nMaximumHeightLarge (0);
+ sal_Int32 nMaximumHeightMedium (0);
+ sal_Int32 nMaximumHeightSmall (0);
+ const sal_Int32 nGap (mpTheme->GetIntegerValue(Theme::Integer_ButtonGap));
+ const sal_Int32 nBorder (mpTheme->GetIntegerValue(Theme::Integer_ButtonBorder));
+ sal_Int32 nTotalWidthLarge ((rButtons.size()-1) * nGap + 2*nBorder);
+ sal_Int32 nTotalWidthMedium ((rButtons.size()-1) * nGap + 2*nBorder);
+ sal_Int32 nTotalWidthSmall ((rButtons.size()-1) * nGap + 2*nBorder);
+ for (sal_uInt32 nIndex=0; nIndex<rButtons.size(); ++nIndex)
+ {
+ // Update large size.
+ Size aSize = rButtons[nIndex]->GetSize(Button::IconSize_Large);
+ if (aSize.Height() > nMaximumHeightLarge)
+ nMaximumHeightLarge = aSize.Height();
+ nTotalWidthLarge += aSize.Width();
+
+ // Update medium size.
+ aSize = rButtons[nIndex]->GetSize(Button::IconSize_Medium);
+ if (aSize.Height() > nMaximumHeightMedium)
+ nMaximumHeightMedium = aSize.Height();
+ nTotalWidthMedium += aSize.Width();
+
+ // Update small size.
+ aSize = rButtons[nIndex]->GetSize(Button::IconSize_Small);
+ if (aSize.Height() > nMaximumHeightSmall)
+ nMaximumHeightSmall = aSize.Height();
+ nTotalWidthSmall += aSize.Width();
+ }
+ maMinimumLargeButtonAreaSize = Size(nTotalWidthLarge, nMaximumHeightLarge+2*nBorder);
+ maMinimumMediumButtonAreaSize = Size(nTotalWidthMedium, nMaximumHeightMedium+2*nBorder);
+ maMinimumSmallButtonAreaSize = Size(nTotalWidthSmall, nMaximumHeightSmall+2*nBorder);
+}
+
+
+
+
+Button::IconSize ButtonBar::BackgroundTheme::GetIconSize (void) const
+{
+ return meIconSize;
+}
+
+
+
+
+//===== RectangleBackgroundTheme ============================================
+
+RectangleBackgroundTheme::RectangleBackgroundTheme (
+ const ::boost::shared_ptr<Theme>& rpTheme,
+ const ::std::vector<SharedButton>& rButtons)
+ : BackgroundTheme(rpTheme, rButtons),
+ mnBarHeight(0)
+{
+}
+
+
+
+
+BitmapEx RectangleBackgroundTheme::CreateBackground (
+ const OutputDevice& rTemplateDevice,
+ const bool bIsButtonDown) const
+{
+ OSL_ASSERT(mpTheme);
+
+ // Setup background color.
+ Color aTopFillColor (mpTheme->GetGradientColor(
+ Theme::Gradient_ButtonBackground,
+ Theme::Fill1));
+ Color aTopBorderColor (mpTheme->GetGradientColor(
+ Theme::Gradient_ButtonBackground,
+ Theme::Border1));
+ Color aBottomFillColor (mpTheme->GetGradientColor(
+ Theme::Gradient_ButtonBackground,
+ Theme::Fill2));
+ Color aBottomBorderColor (mpTheme->GetGradientColor(
+ Theme::Gradient_ButtonBackground,
+ Theme::Border2));
+ if (bIsButtonDown)
+ {
+ aTopFillColor.DecreaseLuminance(50);
+ aTopBorderColor.DecreaseLuminance(50);
+ aBottomFillColor.DecreaseLuminance(50);
+ aBottomBorderColor.DecreaseLuminance(50);
+ }
+
+ const int nWidth (maPreviewBoundingBox.GetWidth()+2);
+ const int nHeight (mnBarHeight);
+ const int nCenter (nHeight / 2);
+
+ VirtualDevice aDevice (rTemplateDevice, 0, 8);
+ aDevice.SetOutputSizePixel(Size(nWidth,nHeight));
+
+ // Fill upper and lower half.
+ aDevice.SetLineColor();
+ aDevice.SetFillColor(aTopFillColor);
+ aDevice.DrawRect(Rectangle(0,0,nWidth-1,nCenter));
+ aDevice.SetFillColor(aBottomFillColor);
+ aDevice.DrawRect(Rectangle(0,nCenter,nWidth-1,nHeight-1));
+
+ // Draw border.
+ aDevice.SetFillColor();
+ aDevice.SetLineColor(aTopBorderColor);
+ aDevice.DrawLine(Point(0,nCenter),Point(0,0));
+ aDevice.DrawLine(Point(0,0), Point(nWidth-1,0));
+ aDevice.DrawLine(Point(nWidth-1,0),Point(nWidth-1,nCenter));
+ aDevice.SetLineColor(aBottomBorderColor);
+ aDevice.DrawLine(Point(0,nCenter),Point(0,nHeight-1));
+ aDevice.DrawLine(Point(0,nHeight-1), Point(nWidth-1,nHeight-1));
+ aDevice.DrawLine(Point(nWidth-1,nHeight-1),Point(nWidth-1,nCenter));
+
+ return aDevice.GetBitmapEx(Point(0,0), Size(nWidth,nHeight));
+}
+
+
+
+
+Point RectangleBackgroundTheme::GetBackgroundLocation (void)
+{
+ return Point(
+ maPreviewBoundingBox.Left()-1,
+ maPreviewBoundingBox.Bottom() - mnBarHeight + 2);
+}
+
+
+
+
+Rectangle RectangleBackgroundTheme::GetButtonArea (void)
+{
+ return Rectangle(
+ maPreviewBoundingBox.Left(),
+ maPreviewBoundingBox.Bottom() - mnBarHeight + 2,
+ maPreviewBoundingBox.Right(),
+ maPreviewBoundingBox.Bottom());
+}
+
+
+
+
+void RectangleBackgroundTheme::Layout (void)
+{
+ if (maPreviewBoundingBox.GetWidth() < maMinimumLargeButtonAreaSize.Width())
+ if (maPreviewBoundingBox.GetWidth() < maMinimumMediumButtonAreaSize.Width())
+ {
+ meIconSize = Button::IconSize_Small;
+ mnBarHeight = maMinimumSmallButtonAreaSize.Height();
+ }
+ else
+ {
+ meIconSize = Button::IconSize_Medium;
+ mnBarHeight = maMinimumMediumButtonAreaSize.Height();
+ }
+ else
+ {
+ meIconSize = Button::IconSize_Large;
+ mnBarHeight = maMinimumLargeButtonAreaSize.Height();
+ }
+}
+
+
+
+
+//===== BitmapBackgroundTheme =================================================
+
+BitmapBackgroundTheme::BitmapBackgroundTheme (
+ const ::boost::shared_ptr<Theme>& rpTheme,
+ const ::std::vector<SharedButton>& rButtons)
+ : BackgroundTheme(rpTheme, rButtons),
+ maButtonArea(),
+ maBackgroundLocation()
+{
+}
+
+
+
+
+BitmapEx BitmapBackgroundTheme::CreateBackground (
+ const OutputDevice& rTemplateDevice,
+ const bool bIsButtonDown) const
+{
+ (void)rTemplateDevice;
+ (void)bIsButtonDown;
+
+ OSL_ASSERT(mpTheme);
+
+ // Get images.
+ switch (meIconSize)
+ {
+ case Button::IconSize_Large:
+ default:
+ return mpTheme->GetIcon(Theme::Icon_ButtonBarLarge);
+
+ case Button::IconSize_Medium:
+ return mpTheme->GetIcon(Theme::Icon_ButtonBarMedium);
+
+ case Button::IconSize_Small:
+ return mpTheme->GetIcon(Theme::Icon_ButtonBarSmall);
+ }
+}
+
+
+
+
+Point BitmapBackgroundTheme::GetBackgroundLocation (void)
+{
+ return maBackgroundLocation;
+}
+
+
+
+
+Rectangle BitmapBackgroundTheme::GetButtonArea (void)
+{
+ return maButtonArea;
+}
+
+
+
+
+void BitmapBackgroundTheme::Layout (void)
+{
+ Size aImageSize (mpTheme->GetIcon(Theme::Icon_ButtonBarLarge).GetSizePixel());
+ if (aImageSize.Width() >= maPreviewBoundingBox.GetWidth())
+ {
+ aImageSize = mpTheme->GetIcon(Theme::Icon_ButtonBarMedium).GetSizePixel();
+ if (aImageSize.Width() >= maPreviewBoundingBox.GetWidth())
+ {
+ meIconSize = Button::IconSize_Small;
+ aImageSize = mpTheme->GetIcon(Theme::Icon_ButtonBarSmall).GetSizePixel();
+ }
+ else
+ meIconSize = Button::IconSize_Medium;
+ }
+ else
+ {
+ meIconSize = Button::IconSize_Large;
+ }
+
+ maBackgroundLocation = Point(
+ maPreviewBoundingBox.Left()
+ + (maPreviewBoundingBox.GetWidth()-aImageSize.Width())/2,
+ maPreviewBoundingBox.Bottom() - aImageSize.Height());
+ maButtonArea = Rectangle(maBackgroundLocation, aImageSize);
+}
+
+
+
+
+//===== Button ================================================================
+
+Button::Button (
+ SlideSorter& rSlideSorter,
+ const ::rtl::OUString& rsHelpText)
+ : mrSlideSorter(rSlideSorter),
+ meState(State_Normal),
+ maBoundingBox(),
+ msHelpText(rsHelpText),
+ mbIsActive(false),
+ meIconSize(IconSize_Large)
+{
+}
+
+
+
+
+Button::~Button (void)
+{
+}
+
+
+
+
+bool Button::SetState (const State eState)
+{
+ if (meState != eState)
+ {
+ meState = eState;
+ return true;
+ }
+ else
+ return false;
+}
+
+
+
+
+Button::State Button::GetState (void) const
+{
+ return meState;
+}
+
+
+
+
+Rectangle Button::GetBoundingBox (void) const
+{
+ if (mbIsActive)
+ return maBoundingBox;
+ else
+ return Rectangle();
+}
+
+
+
+
+::rtl::OUString Button::GetHelpText (void) const
+{
+ if (mbIsActive)
+ return msHelpText;
+ else
+ return ::rtl::OUString();
+}
+
+
+
+
+bool Button::IsDown (void) const
+{
+ return mbIsActive && meState==State_Down;
+}
+
+
+
+
+void Button::SetActiveState (const bool bIsActive)
+{
+ mbIsActive = bIsActive;
+}
+
+
+
+
+bool Button::IsActive (void) const
+{
+ return mbIsActive;
+}
+
+
+
+
+void Button::SetIconSize (const IconSize eIconSize)
+{
+ meIconSize = eIconSize;
+}
+
+
+
+
+Button::IconSize Button::GetIconSize (void) const
+{
+ return meIconSize;
+}
+
+
+
+
+bool Button::IsEnabled (void) const
+{
+ return true;
+}
+
+
+
+
+//===== TextButton ============================================================
+
+TextButton::TextButton (
+ SlideSorter& rSlideSorter,
+ const ::rtl::OUString& rsText,
+ const ::rtl::OUString& rsHelpText)
+ : Button(rSlideSorter, rsHelpText),
+ msText(rsText)
+{
+}
+
+
+
+
+void TextButton::Place (const Rectangle aButtonBarBox)
+{
+ maBoundingBox = aButtonBarBox;
+ SetActiveState(true);
+}
+
+
+
+
+void TextButton::Paint (
+ OutputDevice& rDevice,
+ const Point aOffset,
+ const double nAlpha,
+ const ::boost::shared_ptr<Theme>& rpTheme) const
+{
+ (void)nAlpha;
+
+ if (mbIsActive)
+ {
+ // Paint text over the button background.
+ if (meState == State_Normal)
+ rDevice.SetTextColor(rpTheme->GetColor(Theme::Color_ButtonText));
+ else
+ rDevice.SetTextColor(rpTheme->GetColor(Theme::Color_ButtonTextHover));
+ Rectangle aBox (maBoundingBox);
+ aBox += aOffset;
+ rDevice.DrawText(aBox, msText, TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER);
+ }
+}
+
+
+
+
+Size TextButton::GetSize (void) const
+{
+ return Size();
+}
+
+
+
+
+Size TextButton::GetSize (const Button::IconSize) const
+{
+ return Size();
+}
+
+
+
+
+//===== ImageButon ============================================================
+
+ImageButton::ImageButton (
+ SlideSorter& rSlideSorter,
+ const BitmapEx& rLargeIcon,
+ const BitmapEx& rLargeHoverIcon,
+ const BitmapEx& rMediumIcon,
+ const BitmapEx& rMediumHoverIcon,
+ const BitmapEx& rSmallIcon,
+ const BitmapEx& rSmallHoverIcon,
+ const ::rtl::OUString& rsHelpText)
+ : Button(rSlideSorter, rsHelpText),
+ maLargeIcon(rLargeIcon),
+ maLargeHoverIcon(rLargeHoverIcon.IsEmpty() ? rLargeIcon : rLargeHoverIcon),
+ maMediumIcon(rMediumIcon),
+ maMediumHoverIcon(rMediumHoverIcon.IsEmpty() ? rMediumIcon : rMediumHoverIcon),
+ maSmallIcon(rSmallIcon),
+ maSmallHoverIcon(rSmallHoverIcon.IsEmpty() ? rSmallIcon : rSmallHoverIcon)
+{
+}
+
+
+
+
+void ImageButton::Place (const Rectangle aButtonBarBox)
+{
+ const sal_Int32 nWidth (GetSize().Width());
+ maBoundingBox = Rectangle(
+ aButtonBarBox.Right() - nWidth,
+ aButtonBarBox.Top(),
+ aButtonBarBox.Right(),
+ aButtonBarBox.Bottom());
+ SetActiveState(aButtonBarBox.IsInside(maBoundingBox));
+}
+
+
+
+
+void ImageButton::Paint (
+ OutputDevice& rDevice,
+ const Point aOffset,
+ const double nAlpha,
+ const ::boost::shared_ptr<Theme>& rpTheme) const
+{
+ (void)rpTheme;
+
+ if ( ! mbIsActive)
+ return;
+
+ const USHORT nSavedAntialiasingMode (rDevice.GetAntialiasing());
+ rDevice.SetAntialiasing(nSavedAntialiasingMode | ANTIALIASING_ENABLE_B2DDRAW);
+
+ rDevice.SetLineColor();
+
+ // Choose icon.
+ BitmapEx aIcon;
+ switch (meIconSize)
+ {
+ case IconSize_Large:
+ default:
+ if (meState == State_Normal)
+ aIcon = maLargeIcon;
+ else
+ aIcon = maLargeHoverIcon;
+ break;
+
+ case IconSize_Medium:
+ if (meState == State_Normal)
+ aIcon = maMediumIcon;
+ else
+ aIcon = maMediumHoverIcon;
+ break;
+
+ case IconSize_Small:
+ if (meState == State_Normal)
+ aIcon = maSmallIcon;
+ else
+ aIcon = maSmallHoverIcon;
+ break;
+ }
+
+ // Paint icon.
+ if ( ! aIcon.IsEmpty())
+ {
+ AlphaMask aMask (aIcon.GetSizePixel());
+ AdaptTransparency(aMask, aIcon.GetAlpha(), nAlpha);
+ rDevice.DrawBitmapEx(
+ Point(
+ maBoundingBox.Left()
+ + aOffset.X()
+ + (maBoundingBox.GetWidth()-aIcon.GetSizePixel().Width())/2,
+ maBoundingBox.Top()
+ + aOffset.Y()
+ + (maBoundingBox.GetHeight()-aIcon.GetSizePixel().Height())/2),
+ BitmapEx(aIcon.GetBitmap(), aMask));
+ }
+
+ rDevice.SetAntialiasing(nSavedAntialiasingMode);
+}
+
+
+
+
+Size ImageButton::GetSize (void) const
+{
+ return GetSize(meIconSize);
+}
+
+
+
+
+Size ImageButton::GetSize (const Button::IconSize eIconSize) const
+{
+ switch (eIconSize)
+ {
+ case IconSize_Large:
+ default:
+ return maLargeIcon.GetSizePixel();
+
+ case IconSize_Medium:
+ return maMediumIcon.GetSizePixel();
+
+ case IconSize_Small:
+ return maSmallIcon.GetSizePixel();
+ }
+}
+
+
+
+
+//===== UnhideButton ==========================================================
+
+UnhideButton::UnhideButton (SlideSorter& rSlideSorter)
+ : ImageButton(
+ rSlideSorter,
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BLarge),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BLargeHover),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BMedium),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BMediumHover),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BSmall),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BSmallHover),
+ rSlideSorter.GetTheme()->GetString(Theme::String_Command2B))
+{
+}
+
+
+
+
+void UnhideButton::ProcessClick (const model::SharedPageDescriptor& rpDescriptor)
+{
+ if ( ! rpDescriptor)
+ return;
+ mrSlideSorter.GetController().GetSlotManager()->ChangeSlideExclusionState(
+ (rpDescriptor->HasState(model::PageDescriptor::ST_Selected)
+ ? model::SharedPageDescriptor()
+ : rpDescriptor),
+ false);
+}
+
+
+
+
+//===== StartSlideShowButton ==================================================
+
+StartShowButton::StartShowButton (SlideSorter& rSlideSorter)
+ : ImageButton(
+ rSlideSorter,
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1Large),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1LargeHover),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1Medium),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1MediumHover),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1Small),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1SmallHover),
+ rSlideSorter.GetTheme()->GetString(Theme::String_Command1))
+{
+}
+
+
+
+
+bool StartShowButton::IsEnabled (void) const
+{
+ ViewShell* pViewShell = mrSlideSorter.GetViewShell();
+ if (pViewShell == NULL)
+ return false;
+ SfxDispatcher* pDispatcher = pViewShell->GetDispatcher();
+ if (pDispatcher == NULL)
+ return false;
+
+ const SfxPoolItem* pState = NULL;
+ const SfxItemState eState (pDispatcher->QueryState(SID_PRESENTATION, pState));
+ return (eState & SFX_ITEM_DISABLED) == 0;
+}
+
+
+
+
+void StartShowButton::ProcessClick (const model::SharedPageDescriptor& rpDescriptor)
+{
+ // Hide the tool tip early, while the slide show still intializes.
+ mrSlideSorter.GetView().GetToolTip().SetPage(model::SharedPageDescriptor());
+
+ Reference< XPresentation2 > xPresentation(
+ mrSlideSorter.GetModel().GetDocument()->getPresentation());
+ if (xPresentation.is())
+ {
+ Sequence<PropertyValue> aProperties (1);
+ aProperties[0].Name = ::rtl::OUString::createFromAscii("FirstPage");
+ const ::rtl::OUString sName (rpDescriptor->GetPage()->GetName());
+ aProperties[0].Value = Any(sName);
+ xPresentation->startWithArguments(aProperties);
+ }
+}
+
+
+
+
+//===== HideButton ============================================================
+
+HideButton::HideButton (SlideSorter& rSlideSorter)
+ : ImageButton(
+ rSlideSorter,
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2Large),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2LargeHover),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2Medium),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2MediumHover),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2Small),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2SmallHover),
+ rSlideSorter.GetTheme()->GetString(Theme::String_Command2))
+{
+}
+
+
+
+
+void HideButton::ProcessClick (const model::SharedPageDescriptor& rpDescriptor)
+{
+ if ( ! rpDescriptor)
+ return;
+ mrSlideSorter.GetController().GetSlotManager()->ChangeSlideExclusionState(
+ (rpDescriptor->HasState(model::PageDescriptor::ST_Selected)
+ ? model::SharedPageDescriptor()
+ : rpDescriptor),
+ true);
+}
+
+
+
+
+//===== DuplicateButton =======================================================
+
+DuplicateButton::DuplicateButton (SlideSorter& rSlideSorter)
+ : ImageButton(
+ rSlideSorter,
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3Large),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3LargeHover),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3Medium),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3MediumHover),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3Small),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3SmallHover),
+ rSlideSorter.GetTheme()->GetString(Theme::String_Command3))
+{
+}
+
+
+
+
+bool DuplicateButton::IsEnabled (void) const
+{
+ ViewShell* pViewShell = mrSlideSorter.GetViewShell();
+ if (pViewShell == NULL)
+ return false;
+ SfxDispatcher* pDispatcher = pViewShell->GetDispatcher();
+ if (pDispatcher == NULL)
+ return false;
+
+ const SfxPoolItem* pState = NULL;
+ const SfxItemState eState (pDispatcher->QueryState(
+ SID_DUPLICATE_PAGE,
+ pState));
+ return (eState & SFX_ITEM_DISABLED) == 0;
+}
+
+
+
+
+void DuplicateButton::ProcessClick (const model::SharedPageDescriptor& rpDescriptor)
+{
+ if ( ! rpDescriptor)
+ return;
+
+ mrSlideSorter.GetView().SetPageUnderMouse(model::SharedPageDescriptor(),false);
+
+ // When the page under the button is not selected then set the
+ // selection to just this page.
+ if ( ! rpDescriptor->HasState(model::PageDescriptor::ST_Selected))
+ {
+ mrSlideSorter.GetController().GetPageSelector().DeselectAllPages();
+ mrSlideSorter.GetController().GetPageSelector().SelectPage(rpDescriptor);
+ }
+ // Duplicate the selected pages. Insert the new pages right
+ // after the current selection and select them
+ if (mrSlideSorter.GetViewShell() != NULL
+ && mrSlideSorter.GetViewShell()->GetDispatcher() != NULL)
+ {
+ mrSlideSorter.GetViewShell()->GetDispatcher()->Execute(
+ SID_DUPLICATE_PAGE,
+ SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
+ }
+}
+
+
+
+} } } // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx
new file mode 100644
index 000000000000..c62c32e7d841
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx
@@ -0,0 +1,265 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "SlsFramePainter.hxx"
+#include <vcl/outdev.hxx>
+#include <vcl/bmpacc.hxx>
+
+
+namespace sd { namespace slidesorter { namespace view {
+
+FramePainter::FramePainter (const BitmapEx& rShadowBitmap)
+ : maTopLeft(rShadowBitmap,-1,-1),
+ maTop(rShadowBitmap,0,-1),
+ maTopRight(rShadowBitmap,+1,-1),
+ maLeft(rShadowBitmap,-1,0),
+ maRight(rShadowBitmap,+1,0),
+ maBottomLeft(rShadowBitmap,-1,+1),
+ maBottom(rShadowBitmap,0,+1),
+ maBottomRight(rShadowBitmap,+1,+1),
+ maCenter(rShadowBitmap,0,0),
+ mbIsValid(false)
+{
+ if (rShadowBitmap.GetSizePixel().Width() == rShadowBitmap.GetSizePixel().Height()
+ && (rShadowBitmap.GetSizePixel().Width()-1)%2 == 0
+ && ((rShadowBitmap.GetSizePixel().Width()-1)/2)%2 == 1)
+ {
+ mbIsValid = true;
+ }
+ else
+ {
+ OSL_ASSERT(rShadowBitmap.GetSizePixel().Width() == rShadowBitmap.GetSizePixel().Height());
+ OSL_ASSERT((rShadowBitmap.GetSizePixel().Width()-1)%2 == 0);
+ OSL_ASSERT(((rShadowBitmap.GetSizePixel().Width()-1)/2)%2 == 1);
+ }
+}
+
+
+
+
+FramePainter::~FramePainter (void)
+{
+}
+
+
+
+
+void FramePainter::PaintFrame (
+ OutputDevice& rDevice,
+ const Rectangle aBox) const
+{
+ if ( ! mbIsValid)
+ return;
+
+ // Paint the shadow.
+ maTopLeft.PaintCorner(rDevice, aBox.TopLeft());
+ maTopRight.PaintCorner(rDevice, aBox.TopRight());
+ maBottomLeft.PaintCorner(rDevice, aBox.BottomLeft());
+ maBottomRight.PaintCorner(rDevice, aBox.BottomRight());
+ maLeft.PaintSide(rDevice, aBox.TopLeft(), aBox.BottomLeft(), maTopLeft, maBottomLeft);
+ maRight.PaintSide(rDevice, aBox.TopRight(), aBox.BottomRight(), maTopRight, maBottomRight);
+ maTop.PaintSide(rDevice, aBox.TopLeft(), aBox.TopRight(), maTopLeft, maTopRight);
+ maBottom.PaintSide(rDevice, aBox.BottomLeft(), aBox.BottomRight(), maBottomLeft, maBottomRight);
+ maCenter.PaintCenter(rDevice,aBox);
+}
+
+
+
+
+void FramePainter::AdaptColor (
+ const Color aNewColor,
+ const bool bEraseCenter)
+{
+ // Get the source color.
+ if (maCenter.maBitmap.IsEmpty())
+ return;
+ BitmapReadAccess* pReadAccess = maCenter.maBitmap.GetBitmap().AcquireReadAccess();
+ if (pReadAccess == NULL)
+ return;
+ const Color aSourceColor = pReadAccess->GetColor(0,0);
+ maCenter.maBitmap.GetBitmap().ReleaseAccess(pReadAccess);
+
+ // Erase the center bitmap.
+ if (bEraseCenter)
+ maCenter.maBitmap.SetEmpty();
+
+ // Replace the color in all bitmaps.
+ maTopLeft.maBitmap.Replace(aSourceColor, aNewColor, 0);
+ maTop.maBitmap.Replace(aSourceColor, aNewColor, 0);
+ maTopRight.maBitmap.Replace(aSourceColor, aNewColor, 0);
+ maLeft.maBitmap.Replace(aSourceColor, aNewColor, 0);
+ maCenter.maBitmap.Replace(aSourceColor, aNewColor, 0);
+ maRight.maBitmap.Replace(aSourceColor, aNewColor, 0);
+ maBottomLeft.maBitmap.Replace(aSourceColor, aNewColor, 0);
+ maBottom.maBitmap.Replace(aSourceColor, aNewColor, 0);
+ maBottomRight.maBitmap.Replace(aSourceColor, aNewColor, 0);
+}
+
+
+
+
+//===== FramePainter::OffsetBitmap ============================================
+
+FramePainter::OffsetBitmap::OffsetBitmap (
+ const BitmapEx& rBitmap,
+ const sal_Int32 nHorizontalPosition,
+ const sal_Int32 nVerticalPosition)
+ : maBitmap(),
+ maOffset()
+{
+ OSL_ASSERT(nHorizontalPosition>=-1 && nHorizontalPosition<=+1);
+ OSL_ASSERT(nVerticalPosition>=-1 && nVerticalPosition<=+1);
+
+ const sal_Int32 nS (1);
+ const sal_Int32 nC (::std::max<sal_Int32>(0,(rBitmap.GetSizePixel().Width()-nS)/2));
+ const sal_Int32 nO (nC/2);
+
+ const Point aOrigin(
+ nHorizontalPosition<0 ? 0 : (nHorizontalPosition == 0 ? nC : nC+nS),
+ nVerticalPosition<0 ? 0 : (nVerticalPosition == 0 ? nC : nC+nS));
+ const Size aSize(
+ nHorizontalPosition==0 ? nS : nC,
+ nVerticalPosition==0 ? nS : nC);
+ maBitmap = BitmapEx(rBitmap, aOrigin, aSize);
+ if (maBitmap.IsEmpty())
+ return;
+ maOffset = Point(
+ nHorizontalPosition<0 ? -nO : nHorizontalPosition>0 ? -nO : 0,
+ nVerticalPosition<0 ? -nO : nVerticalPosition>0 ? -nO : 0);
+
+ // Enlarge the side bitmaps so that painting the frame requires less
+ // paint calls.
+ const sal_Int32 nSideBitmapSize (64);
+ if (nHorizontalPosition == 0 && nVerticalPosition == 0)
+ {
+ maBitmap.Scale(Size(nSideBitmapSize,nSideBitmapSize), BMP_SCALE_FAST);
+ }
+ else if (nHorizontalPosition == 0)
+ {
+ maBitmap.Scale(Size(nSideBitmapSize,aSize.Height()), BMP_SCALE_FAST);
+ }
+ else if (nVerticalPosition == 0)
+ {
+ maBitmap.Scale(Size(maBitmap.GetSizePixel().Width(), nSideBitmapSize), BMP_SCALE_FAST);
+ }
+}
+
+
+
+
+void FramePainter::OffsetBitmap::PaintCorner (
+ OutputDevice& rDevice,
+ const Point& rAnchor) const
+{
+ if ( ! maBitmap.IsEmpty())
+ rDevice.DrawBitmapEx(rAnchor+maOffset, maBitmap);
+}
+
+
+
+
+void FramePainter::OffsetBitmap::PaintSide (
+ OutputDevice& rDevice,
+ const Point& rAnchor1,
+ const Point& rAnchor2,
+ const OffsetBitmap& rCornerBitmap1,
+ const OffsetBitmap& rCornerBitmap2) const
+{
+ if (maBitmap.IsEmpty())
+ return;
+
+ const Size aBitmapSize (maBitmap.GetSizePixel());
+ if (rAnchor1.Y() == rAnchor2.Y())
+ {
+ // Side is horizontal.
+ const sal_Int32 nY (rAnchor1.Y() + maOffset.Y());
+ const sal_Int32 nLeft (
+ rAnchor1.X()
+ + rCornerBitmap1.maBitmap.GetSizePixel().Width()
+ + rCornerBitmap1.maOffset.X());
+ const sal_Int32 nRight (
+ rAnchor2.X()
+ + rCornerBitmap2.maOffset.X()\
+ - 1);
+ for (sal_Int32 nX=nLeft; nX<=nRight; nX+=aBitmapSize.Width())
+ {
+ rDevice.DrawBitmapEx(
+ Point(nX,nY),
+ Size(std::min(aBitmapSize.Width(),static_cast<long>(nRight-nX+1)),aBitmapSize.Height()),
+ maBitmap);
+ }
+ }
+ else if (rAnchor1.X() == rAnchor2.X())
+ {
+ // Side is vertical.
+ const sal_Int32 nX (rAnchor1.X() + maOffset.X());
+ const sal_Int32 nTop (
+ rAnchor1.Y()
+ + rCornerBitmap1.maBitmap.GetSizePixel().Height()
+ + rCornerBitmap1.maOffset.Y());
+ const sal_Int32 nBottom (
+ rAnchor2.Y()
+ + rCornerBitmap2.maOffset.Y()
+ - 1);
+ for (sal_Int32 nY=nTop; nY<=nBottom; nY+=aBitmapSize.Height())
+ {
+ rDevice.DrawBitmapEx(
+ Point(nX,nY),
+ Size(aBitmapSize.Width(), std::min(aBitmapSize.Height(), static_cast<long>(nBottom-nY+1))),
+ maBitmap);
+ }
+ }
+ else
+ {
+ // Diagonal sides indicatee an error.
+ OSL_ASSERT(false);
+ }
+}
+
+
+
+
+void FramePainter::OffsetBitmap::PaintCenter (
+ OutputDevice& rDevice,
+ const Rectangle& rBox) const
+{
+ const Size aBitmapSize (maBitmap.GetSizePixel());
+ for (sal_Int32 nY=rBox.Top(); nY<=rBox.Bottom(); nY+=aBitmapSize.Height())
+ for (sal_Int32 nX=rBox.Left(); nX<=rBox.Right(); nX+=aBitmapSize.Width())
+ rDevice.DrawBitmapEx(
+ Point(nX,nY),
+ Size(
+ ::std::min(aBitmapSize.Width(), rBox.Right()-nX+1),
+ std::min(aBitmapSize.Height(), rBox.Bottom()-nY+1)),
+ maBitmap);
+}
+
+
+
+} } } // end of namespace sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsFramePainter.hxx b/sd/source/ui/slidesorter/view/SlsFramePainter.hxx
new file mode 100644
index 000000000000..96ccf51c6323
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsFramePainter.hxx
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VIEW_FRAME_PAINTER_HXX
+#define SD_SLIDESORTER_VIEW_FRAME_PAINTER_HXX
+
+#include <vcl/bitmapex.hxx>
+
+
+namespace sd { namespace slidesorter { namespace view {
+
+class FramePainter
+{
+public:
+ FramePainter (const BitmapEx& rBitmap);
+ ~FramePainter (void);
+
+ /** Paint a border around the given box by using a set of bitmaps for
+ the corners and sides.
+ */
+ void PaintFrame (OutputDevice&rDevice, const Rectangle aBox) const;
+
+ /** Special functionality that takes the color from the center
+ bitmap and replaces that color in all bitmaps by the given new
+ color. Alpha values are not modified.
+ @param bClearCenterBitmap
+ When <TRUE/> then the center bitmap is erased.
+ */
+ void AdaptColor (const Color aNewColor, const bool bClearCenterBitmap);
+
+private:
+ /** Bitmap with offset that is used when the bitmap is painted. The bitmap
+ */
+ class OffsetBitmap {
+ public:
+ BitmapEx maBitmap;
+ Point maOffset;
+
+ /** Create one of the eight shadow bitmaps from one that combines
+ them all. This larger bitmap is expected to have dimension NxN
+ with N=1+2*M. Of this larger bitmap there are created four
+ corner bitmaps of size 2*M x 2*M and four side bitmaps of sizes
+ 1xM (top and bottom) and Mx1 (left and right). The corner
+ bitmaps have each one quadrant of size MxM that is painted under
+ the interior of the frame.
+ @param rBitmap
+ The larger bitmap of which the eight shadow bitmaps are cut
+ out from.
+ @param nHorizontalPosition
+ Valid values are -1 (left), 0 (center), and +1 (right).
+ @param nVerticalPosition
+ Valid values are -1 (top), 0 (center), and +1 (bottom).
+ */
+ OffsetBitmap (
+ const BitmapEx& rBitmap,
+ const sal_Int32 nHorizontalPosition,
+ const sal_Int32 nVerticalPosition);
+
+ /** Use the given device to paint the bitmap at the location that is
+ the sum of the given anchor and the internal offset.
+ */
+ void PaintCorner (OutputDevice& rDevice, const Point& rAnchor) const;
+
+ /** Use the given device to paint the bitmap stretched between the
+ two given locations. Offsets of the adjacent corner bitmaps and
+ the offset of the side bitmap are used to determine the area
+ that is to be filled with the side bitmap.
+ */
+ void PaintSide (
+ OutputDevice& rDevice,
+ const Point& rAnchor1,
+ const Point& rAnchor2,
+ const OffsetBitmap& rCornerBitmap1,
+ const OffsetBitmap& rCornerBitmap2) const;
+
+ /** Fill the given rectangle with the bitmap.
+ */
+ void PaintCenter (
+ OutputDevice& rDevice,
+ const Rectangle& rBox) const;
+ };
+ OffsetBitmap maTopLeft;
+ OffsetBitmap maTop;
+ OffsetBitmap maTopRight;
+ OffsetBitmap maLeft;
+ OffsetBitmap maRight;
+ OffsetBitmap maBottomLeft;
+ OffsetBitmap maBottom;
+ OffsetBitmap maBottomRight;
+ OffsetBitmap maCenter;
+ bool mbIsValid;
+};
+
+
+} } } // end of namespace sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
new file mode 100644
index 000000000000..1d98a217ff90
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
@@ -0,0 +1,535 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "view/SlsInsertAnimator.hxx"
+#include "controller/SlideSorterController.hxx"
+#include "controller/SlsAnimationFunction.hxx"
+#include "view/SlideSorterView.hxx"
+#include "view/SlsLayouter.hxx"
+#include "model/SlideSorterModel.hxx"
+#include "model/SlsPageEnumerationProvider.hxx"
+
+#include <set>
+#include <boost/bind.hpp>
+#include <boost/enable_shared_from_this.hpp>
+
+namespace sd { namespace slidesorter { namespace view {
+
+namespace {
+
+class PageObjectRun;
+
+class AnimatorAccess
+{
+public:
+ virtual void AddRun (const ::boost::shared_ptr<PageObjectRun> pRun) = 0;
+ virtual void RemoveRun (const ::boost::shared_ptr<PageObjectRun> pRun) = 0;
+ virtual model::SlideSorterModel& GetModel (void) const = 0;
+ virtual view::SlideSorterView& GetView (void) const = 0;
+ virtual ::boost::shared_ptr<controller::Animator> GetAnimator (void) = 0;
+ virtual SharedSdWindow GetContentWindow (void) = 0;
+};
+
+
+/** Controller of the position offsets of all page objects in one row or one
+ column.
+*/
+class PageObjectRun : public ::boost::enable_shared_from_this<PageObjectRun>
+{
+public:
+ PageObjectRun (
+ AnimatorAccess& rAnimatorAccess,
+ const sal_Int32 nRunIndex,
+ const sal_Int32 nStartIndex,
+ const sal_Int32 nEndIndex);
+ ~PageObjectRun (void);
+
+ void operator () (const double nTime);
+
+ void UpdateOffsets(
+ const InsertPosition& rInsertPosition,
+ const view::Layouter& GetLayouter);
+ void ResetOffsets (const controller::Animator::AnimationMode eMode);
+
+ /// Index of the row or column that this run represents.
+ sal_Int32 mnRunIndex;
+ /// The index at which to make place for the insertion indicator (-1 for
+ /// no indicator).
+ sal_Int32 mnLocalInsertIndex;
+ /// Index of the first page in the run.
+ sal_Int32 mnStartIndex;
+ /// Index of the last page in the run.
+ sal_Int32 mnEndIndex;
+ /// Offset of each item in the run at the start of the current animation.
+ ::std::vector<Point> maStartOffset;
+ /// Target offset of each item in the run at the end of the current animation.
+ ::std::vector<Point> maEndOffset;
+ /// Time at which the current animation started.
+ double mnStartTime;
+
+ class Comparator
+ {
+ public: bool operator() (
+ const ::boost::shared_ptr<PageObjectRun>& rpRunA,
+ const ::boost::shared_ptr<PageObjectRun>& rpRunB) const
+ {
+ return rpRunA->mnRunIndex < rpRunB->mnRunIndex;
+ }
+ };
+private:
+ controller::Animator::AnimationId mnAnimationId;
+ AnimatorAccess& mrAnimatorAccess;
+ ::boost::function<double(double)> maAccelerationFunction;
+
+ Rectangle GetInnerBoundingBox (
+ const view::Layouter& rLayouter,
+ const sal_Int32 nIndex) const;
+ void RestartAnimation (void);
+};
+typedef ::boost::shared_ptr<PageObjectRun> SharedPageObjectRun;
+
+
+Point Blend (const Point& rPointA, const Point& rPointB, const double nT)
+{
+ return Point(
+ sal_Int32(rPointA.X() * (1-nT) + rPointB.X() * nT),
+ sal_Int32(rPointA.Y() * (1-nT) + rPointB.Y() * nT));
+}
+
+} // end of anonymous namespace
+
+
+
+class InsertAnimator::Implementation : public AnimatorAccess
+{
+public:
+ Implementation (SlideSorter& rSlideSorter);
+ virtual ~Implementation (void);
+
+ void SetInsertPosition (
+ const InsertPosition& rInsertPosition,
+ const controller::Animator::AnimationMode eAnimationMode);
+
+ virtual void AddRun (const ::boost::shared_ptr<PageObjectRun> pRun);
+ virtual void RemoveRun (const ::boost::shared_ptr<PageObjectRun> pRun);
+
+ virtual model::SlideSorterModel& GetModel (void) const { return mrModel; }
+ virtual view::SlideSorterView& GetView (void) const { return mrView; }
+ virtual ::boost::shared_ptr<controller::Animator> GetAnimator (void) { return mpAnimator; }
+ virtual SharedSdWindow GetContentWindow (void) { return mrSlideSorter.GetContentWindow(); }
+
+private:
+ model::SlideSorterModel& mrModel;
+ view::SlideSorterView& mrView;
+ SlideSorter& mrSlideSorter;
+ ::boost::shared_ptr<controller::Animator> mpAnimator;
+ typedef ::std::set<SharedPageObjectRun, PageObjectRun::Comparator> RunContainer;
+ RunContainer maRuns;
+ InsertPosition maInsertPosition;
+
+ void StopAnimation (void);
+ SharedPageObjectRun GetRun (
+ view::Layouter& rLayouter,
+ const InsertPosition& rInsertPosition,
+ const bool bCreate = true);
+ RunContainer::iterator FindRun (const sal_Int32 nRunIndex) const;
+};
+
+
+
+
+
+//===== InsertAnimator ========================================================
+
+InsertAnimator::InsertAnimator (SlideSorter& rSlideSorter)
+ : mpImplementation(new Implementation(rSlideSorter))
+{
+}
+
+
+
+
+void InsertAnimator::SetInsertPosition (const InsertPosition& rInsertPosition)
+{
+ mpImplementation->SetInsertPosition(rInsertPosition, controller::Animator::AM_Animated);
+}
+
+
+
+
+void InsertAnimator::Reset (const controller::Animator::AnimationMode eMode)
+{
+ mpImplementation->SetInsertPosition(InsertPosition(), eMode);
+}
+
+
+
+
+//===== InsertAnimator::Implementation ========================================
+
+InsertAnimator::Implementation::Implementation (SlideSorter& rSlideSorter)
+ : mrModel(rSlideSorter.GetModel()),
+ mrView(rSlideSorter.GetView()),
+ mrSlideSorter(rSlideSorter),
+ mpAnimator(rSlideSorter.GetController().GetAnimator()),
+ maRuns(),
+ maInsertPosition()
+{
+}
+
+
+
+
+InsertAnimator::Implementation::~Implementation (void)
+{
+ SetInsertPosition(InsertPosition(), controller::Animator::AM_Immediate);
+}
+
+
+
+
+void InsertAnimator::Implementation::SetInsertPosition (
+ const InsertPosition& rInsertPosition,
+ const controller::Animator::AnimationMode eMode)
+{
+ if (maInsertPosition == rInsertPosition)
+ return;
+
+ SharedPageObjectRun pOldRun (GetRun(mrView.GetLayouter(), maInsertPosition));
+ SharedPageObjectRun pCurrentRun (GetRun(mrView.GetLayouter(), rInsertPosition));
+ maInsertPosition = rInsertPosition;
+
+ // When the new insert position is in a different run then move the page
+ // objects in the old run to their default positions.
+ if (pOldRun != pCurrentRun)
+ {
+ if (pOldRun)
+ pOldRun->ResetOffsets(eMode);
+ }
+
+ if (pCurrentRun)
+ {
+ pCurrentRun->UpdateOffsets(rInsertPosition, mrView.GetLayouter());
+ }
+}
+
+
+
+
+SharedPageObjectRun InsertAnimator::Implementation::GetRun (
+ view::Layouter& rLayouter,
+ const InsertPosition& rInsertPosition,
+ const bool bCreate)
+{
+ const sal_Int32 nRow (rInsertPosition.GetRow());
+ if (nRow < 0)
+ return SharedPageObjectRun();
+
+ RunContainer::iterator iRun (maRuns.end());
+ if (rLayouter.GetColumnCount() == 1)
+ {
+ // There is only one run that contains all slides.
+ if (maRuns.empty() && bCreate)
+ maRuns.insert(SharedPageObjectRun(new PageObjectRun(
+ *this,
+ 0,
+ 0,
+ mrModel.GetPageCount()-1)));
+ iRun = maRuns.begin();
+ }
+ else
+ {
+ iRun = FindRun(nRow);
+ if (iRun == maRuns.end() && bCreate)
+ {
+ // Create a new run.
+ const sal_Int32 nStartIndex (rLayouter.GetIndex(nRow, 0));
+ const sal_Int32 nEndIndex (rLayouter.GetIndex(nRow, rLayouter.GetColumnCount()-1));
+ if (nStartIndex <= nEndIndex)
+ {
+ iRun = maRuns.insert(SharedPageObjectRun(new PageObjectRun(
+ *this,
+ nRow,
+ nStartIndex,
+ nEndIndex))).first;
+ OSL_ASSERT(iRun != maRuns.end());
+ }
+ }
+ }
+
+ if (iRun != maRuns.end())
+ return *iRun;
+ else
+ return SharedPageObjectRun();
+}
+
+
+
+
+InsertAnimator::Implementation::RunContainer::iterator
+ InsertAnimator::Implementation::FindRun (const sal_Int32 nRunIndex) const
+{
+ return std::find_if(
+ maRuns.begin(),
+ maRuns.end(),
+ ::boost::bind(
+ ::std::equal_to<sal_Int32>(),
+ ::boost::bind(&PageObjectRun::mnRunIndex, _1),
+ nRunIndex));
+}
+
+
+
+
+void InsertAnimator::Implementation::AddRun (const ::boost::shared_ptr<PageObjectRun> pRun)
+{
+ if (pRun)
+ {
+ maRuns.insert(pRun);
+ }
+ else
+ {
+ OSL_ASSERT(pRun);
+ }
+}
+
+
+
+
+
+void InsertAnimator::Implementation::RemoveRun (const ::boost::shared_ptr<PageObjectRun> pRun)
+{
+ if (pRun)
+ {
+ // Do not remove runs that show the space for the insertion indicator.
+ if (pRun->mnLocalInsertIndex == -1)
+ {
+ InsertAnimator::Implementation::RunContainer::iterator iRun (FindRun(pRun->mnRunIndex));
+ if (iRun != maRuns.end())
+ {
+ OSL_ASSERT(*iRun == pRun);
+ maRuns.erase(iRun);
+ }
+ }
+ }
+ else
+ {
+ OSL_ASSERT(pRun);
+ }
+}
+
+
+
+
+
+//===== PageObjectRun =========================================================
+
+PageObjectRun::PageObjectRun (
+ AnimatorAccess& rAnimatorAccess,
+ const sal_Int32 nRunIndex,
+ const sal_Int32 nStartIndex,
+ const sal_Int32 nEndIndex)
+ : mnRunIndex(nRunIndex),
+ mnLocalInsertIndex(-1),
+ mnStartIndex(nStartIndex),
+ mnEndIndex(nEndIndex),
+ maStartOffset(),
+ maEndOffset(),
+ mnStartTime(-1),
+ mnAnimationId(controller::Animator::NotAnAnimationId),
+ mrAnimatorAccess(rAnimatorAccess),
+ maAccelerationFunction(
+ controller::AnimationParametricFunction(
+ controller::AnimationBezierFunction (0.1,0.7)))
+{
+ maStartOffset.resize(nEndIndex - nStartIndex + 1);
+ maEndOffset.resize(nEndIndex - nStartIndex + 1);
+}
+
+
+
+
+PageObjectRun::~PageObjectRun (void)
+{
+}
+
+
+
+
+Rectangle PageObjectRun::GetInnerBoundingBox (
+ const view::Layouter& rLayouter,
+ const sal_Int32 nIndex) const
+{
+ model::SharedPageDescriptor pDescriptor (
+ mrAnimatorAccess.GetModel().GetPageDescriptor(nIndex));
+ if (pDescriptor)
+ if (pDescriptor->HasState(model::PageDescriptor::ST_Selected))
+ return rLayouter.GetPageObjectLayouter()->GetBoundingBox(
+ pDescriptor,
+ PageObjectLayouter::PageObject,
+ PageObjectLayouter::ModelCoordinateSystem);
+ else
+ return rLayouter.GetPageObjectLayouter()->GetBoundingBox(
+ pDescriptor,
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::ModelCoordinateSystem);
+ else
+ return Rectangle();
+}
+
+
+
+
+void PageObjectRun::UpdateOffsets(
+ const InsertPosition& rInsertPosition,
+ const view::Layouter& rLayouter)
+{
+ const bool bIsVertical (rLayouter.GetColumnCount()==1);
+ const sal_Int32 nLocalInsertIndex(bIsVertical
+ ? rInsertPosition.GetRow()
+ : rInsertPosition.GetColumn());
+ if (nLocalInsertIndex != mnLocalInsertIndex)
+ {
+ mnLocalInsertIndex = nLocalInsertIndex;
+
+ model::SlideSorterModel& rModel (mrAnimatorAccess.GetModel());
+ const sal_Int32 nRunLength (mnEndIndex - mnStartIndex + 1);
+ for (sal_Int32 nIndex=0; nIndex<nRunLength; ++nIndex)
+ {
+ model::SharedPageDescriptor pDescriptor(rModel.GetPageDescriptor(nIndex+mnStartIndex));
+ if (pDescriptor)
+ maStartOffset[nIndex] = pDescriptor->GetVisualState().GetLocationOffset();
+ maEndOffset[nIndex] = nIndex < mnLocalInsertIndex
+ ? rInsertPosition.GetLeadingOffset()
+ : rInsertPosition.GetTrailingOffset();
+ if (bIsVertical)
+ maEndOffset[nIndex].X() = 0;
+ else
+ maEndOffset[nIndex].Y() = 0;
+ }
+ RestartAnimation();
+ }
+}
+
+
+
+
+void PageObjectRun::ResetOffsets (const controller::Animator::AnimationMode eMode)
+{
+ mnLocalInsertIndex = -1;
+ const sal_Int32 nRunLength (mnEndIndex - mnStartIndex + 1);
+ model::SlideSorterModel& rModel (mrAnimatorAccess.GetModel());
+ view::SlideSorterView& rView (mrAnimatorAccess.GetView());
+ for (sal_Int32 nIndex=0; nIndex<nRunLength; ++nIndex)
+ {
+ model::SharedPageDescriptor pDescriptor(rModel.GetPageDescriptor(nIndex+mnStartIndex));
+ if (pDescriptor)
+ if (eMode == controller::Animator::AM_Animated)
+ maStartOffset[nIndex] = pDescriptor->GetVisualState().GetLocationOffset();
+ else
+ {
+ const Rectangle aOldBoundingBox (pDescriptor->GetBoundingBox());
+ pDescriptor->GetVisualState().SetLocationOffset(Point(0,0));
+ rView.RequestRepaint(aOldBoundingBox);
+ rView.RequestRepaint(pDescriptor);
+ }
+ maEndOffset[nIndex] = Point(0,0);
+ }
+ if (eMode == controller::Animator::AM_Animated)
+ RestartAnimation();
+ else
+ mrAnimatorAccess.RemoveRun(shared_from_this());
+}
+
+
+
+
+void PageObjectRun::RestartAnimation (void)
+{
+ // Stop the current animation.
+ if (mnAnimationId != controller::Animator::NotAnAnimationId)
+ {
+ mrAnimatorAccess.GetAnimator()->RemoveAnimation(mnAnimationId);
+ }
+
+ // Restart the animation.
+ mrAnimatorAccess.AddRun(shared_from_this());
+ mnAnimationId = mrAnimatorAccess.GetAnimator()->AddAnimation(
+ ::boost::ref(*this),
+ 0,
+ 300,
+ ::boost::bind(
+ &AnimatorAccess::RemoveRun,
+ ::boost::ref(mrAnimatorAccess),
+ shared_from_this()));
+}
+
+
+
+
+void PageObjectRun::operator () (const double nGlobalTime)
+{
+ if (mnStartTime < 0)
+ mnStartTime = nGlobalTime;
+
+ double nLocalTime (nGlobalTime - mnStartTime);
+ if (nLocalTime > 1.0)
+ nLocalTime = 1.0;
+ nLocalTime = maAccelerationFunction(nLocalTime);
+
+ model::SlideSorterModel& rModel (mrAnimatorAccess.GetModel());
+ view::SlideSorterView& rView (mrAnimatorAccess.GetView());
+ for (sal_Int32 nIndex=mnStartIndex; nIndex<=mnEndIndex; ++nIndex)
+ {
+ model::SharedPageDescriptor pDescriptor (rModel.GetPageDescriptor(nIndex));
+ if ( ! pDescriptor)
+ continue;
+ const Rectangle aOldBoundingBox (pDescriptor->GetBoundingBox());
+ pDescriptor->GetVisualState().SetLocationOffset(
+ Blend(
+ maStartOffset[nIndex-mnStartIndex],
+ maEndOffset[nIndex-mnStartIndex],
+ nLocalTime));
+
+ // Request a repaint of the old and new bounding box (which largely overlap.)
+ rView.RequestRepaint(aOldBoundingBox);
+ rView.RequestRepaint(pDescriptor);
+ }
+
+ // Call Flush to make
+ // a) animations a bit more smooth and
+ // b) on Mac without the Flush a Reset of the page locations is not properly
+ // visualized when the mouse leaves the window during drag-and-drop.
+ mrAnimatorAccess.GetContentWindow()->Flush();
+}
+
+
+
+
+} } } // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
new file mode 100644
index 000000000000..abaa5a43b215
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
@@ -0,0 +1,448 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "view/SlsInsertionIndicatorOverlay.hxx"
+
+#include "SlideSorter.hxx"
+#include "model/SlsPageEnumeration.hxx"
+#include "view/SlideSorterView.hxx"
+#include "view/SlsLayouter.hxx"
+#include "view/SlsPageObjectLayouter.hxx"
+#include "view/SlsTheme.hxx"
+#include "cache/SlsPageCache.hxx"
+#include "SlsFramePainter.hxx"
+#include "SlsLayeredDevice.hxx"
+#include "DrawDocShell.hxx"
+#include "drawdoc.hxx"
+#include "sdpage.hxx"
+#include "sdmod.hxx"
+
+#include <vcl/virdev.hxx>
+#include <basegfx/range/b2drectangle.hxx>
+#include <basegfx/tools/canvastools.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+
+
+namespace {
+
+
+static const double gnPreviewOffsetScale = 1.0 / 8.0;
+
+
+
+Rectangle GrowRectangle (const Rectangle& rBox, const sal_Int32 nOffset)
+{
+ return Rectangle (
+ rBox.Left() - nOffset,
+ rBox.Top() - nOffset,
+ rBox.Right() + nOffset,
+ rBox.Bottom() + nOffset);
+}
+
+sal_Int32 RoundToInt (const double nValue) { return sal_Int32(::rtl::math::round(nValue)); }
+
+} // end of anonymous namespace
+
+
+namespace sd { namespace slidesorter { namespace view {
+
+
+//===== InsertionIndicatorOverlay ===========================================
+
+const static sal_Int32 gnShadowBorder = 3;
+const static sal_Int32 gnSuperScaleFactor = 1;
+
+InsertionIndicatorOverlay::InsertionIndicatorOverlay (SlideSorter& rSlideSorter)
+ : mrSlideSorter(rSlideSorter),
+ mbIsVisible(false),
+ mnLayerIndex(2),
+ mpLayerInvalidator(),
+ maLocation(),
+ maIcon(),
+ maIconOffset(),
+ mpShadowPainter(
+ new FramePainter(mrSlideSorter.GetTheme()->GetIcon(Theme::Icon_RawInsertShadow)))
+{
+}
+
+
+
+
+InsertionIndicatorOverlay::~InsertionIndicatorOverlay (void)
+{
+ Hide();
+}
+
+
+
+
+void InsertionIndicatorOverlay::Create (const controller::Transferable* pTransferable)
+{
+ if (pTransferable == NULL)
+ return;
+
+ sal_Int32 nSelectionCount (0);
+ if (pTransferable->HasPageBookmarks())
+ nSelectionCount = pTransferable->GetPageBookmarks().Count();
+ else
+ {
+ DrawDocShell* pDataDocShell = dynamic_cast<DrawDocShell*>(&pTransferable->GetDocShell());
+ if (pDataDocShell != NULL)
+ {
+ SdDrawDocument* pDataDocument = pDataDocShell->GetDoc();
+ if (pDataDocument != NULL)
+ nSelectionCount = pDataDocument->GetSdPageCount(PK_STANDARD);
+ }
+ }
+ Create(pTransferable->GetRepresentatives(), nSelectionCount);
+}
+
+
+
+
+void InsertionIndicatorOverlay::Create (
+ const ::std::vector<controller::Transferable::Representative>& rRepresentatives,
+ const sal_Int32 nSelectionCount)
+{
+ view::Layouter& rLayouter (mrSlideSorter.GetView().GetLayouter());
+ ::boost::shared_ptr<view::PageObjectLayouter> pPageObjectLayouter (
+ rLayouter.GetPageObjectLayouter());
+ ::boost::shared_ptr<view::Theme> pTheme (mrSlideSorter.GetTheme());
+ const Size aOriginalPreviewSize (pPageObjectLayouter->GetSize(
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::WindowCoordinateSystem));
+
+ const double nPreviewScale (0.5);
+ const Size aPreviewSize (
+ RoundToInt(aOriginalPreviewSize.Width()*nPreviewScale),
+ RoundToInt(aOriginalPreviewSize.Height()*nPreviewScale));
+ const sal_Int32 nOffset (
+ RoundToInt(Min(aPreviewSize.Width(),aPreviewSize.Height()) * gnPreviewOffsetScale));
+
+ // Determine size and offset depending on the number of previews.
+ sal_Int32 nCount (rRepresentatives.size());
+ if (nCount > 0)
+ --nCount;
+ Size aIconSize(
+ aPreviewSize.Width() + 2 * gnShadowBorder + nCount*nOffset,
+ aPreviewSize.Height() + 2 * gnShadowBorder + nCount*nOffset);
+ maIconOffset = Point(gnShadowBorder, gnShadowBorder);
+
+ // Create virtual devices for bitmap and mask whose bitmaps later be
+ // combined to form the BitmapEx of the icon.
+ VirtualDevice aContent (
+ *mrSlideSorter.GetContentWindow(),
+ 0,
+ 0);
+ aContent.SetOutputSizePixel(aIconSize);
+
+ aContent.SetFillColor();
+ aContent.SetLineColor(pTheme->GetColor(Theme::Color_PreviewBorder));
+ const Point aOffset = PaintRepresentatives(aContent, aPreviewSize, nOffset, rRepresentatives);
+
+ PaintPageCount(aContent, nSelectionCount, aPreviewSize, aOffset);
+
+ maIcon = aContent.GetBitmapEx(Point(0,0), aIconSize);
+ maIcon.Scale(aIconSize);
+}
+
+
+
+
+void InsertionIndicatorOverlay::SelectRepresentatives (
+ model::PageEnumeration& rSelection,
+ ::std::vector<model::SharedPageDescriptor>& rDescriptors) const
+{
+ sal_Int32 nCount (0);
+ while (rSelection.HasMoreElements())
+ {
+ if (nCount++ >= 3)
+ break;
+ rDescriptors.push_back(rSelection.GetNextElement());
+ }
+}
+
+
+
+
+Point InsertionIndicatorOverlay::PaintRepresentatives (
+ OutputDevice& rContent,
+ const Size aPreviewSize,
+ const sal_Int32 nOffset,
+ const ::std::vector<controller::Transferable::Representative>& rRepresentatives) const
+{
+ const Point aOffset (0,rRepresentatives.size()==1 ? -nOffset : 0);
+
+ // Paint the pages.
+ Point aPageOffset (0,0);
+ double nTransparency (0);
+ const BitmapEx aExclusionOverlay (mrSlideSorter.GetTheme()->GetIcon(Theme::Icon_HideSlideOverlay));
+ for (sal_Int32 nIndex=2; nIndex>=0; --nIndex)
+ {
+ if (rRepresentatives.size() <= sal_uInt32(nIndex))
+ continue;
+ switch(nIndex)
+ {
+ case 0 :
+ aPageOffset = Point(0, nOffset);
+ nTransparency = 0.85;
+ break;
+ case 1:
+ aPageOffset = Point(nOffset, 0);
+ nTransparency = 0.75;
+ break;
+ case 2:
+ aPageOffset = Point(2*nOffset, 2*nOffset);
+ nTransparency = 0.65;
+ break;
+ }
+ aPageOffset += aOffset;
+ aPageOffset.X() += gnShadowBorder;
+ aPageOffset.Y() += gnShadowBorder;
+
+ // Paint the preview.
+ Bitmap aPreview (rRepresentatives[nIndex].maBitmap);
+ const Size aSuperSampleSize(
+ aPreviewSize.Width()*gnSuperScaleFactor,
+ aPreviewSize.Height()*gnSuperScaleFactor);
+ aPreview.Scale(aPreviewSize, BMP_SCALE_INTERPOLATE);
+ rContent.DrawBitmapEx(aPageOffset, aPreview);
+
+ // When the page is marked as excluded from the slide show then
+ // paint an overlay that visualizes this.
+ if (rRepresentatives[nIndex].mbIsExcluded)
+ {
+ const Region aSavedClipRegion (rContent.GetClipRegion());
+ rContent.IntersectClipRegion(Rectangle(aPageOffset, aPreviewSize));
+ // Paint bitmap tiled over the preview to mark it as excluded.
+ const sal_Int32 nIconWidth (aExclusionOverlay.GetSizePixel().Width());
+ const sal_Int32 nIconHeight (aExclusionOverlay.GetSizePixel().Height());
+ if (nIconWidth>0 && nIconHeight>0)
+ {
+ for (sal_Int32 nX=0; nX<aPreviewSize.Width(); nX+=nIconWidth)
+ for (sal_Int32 nY=0; nY<aPreviewSize.Height(); nY+=nIconHeight)
+ rContent.DrawBitmapEx(Point(nX,nY)+aPageOffset, aExclusionOverlay);
+ }
+ rContent.SetClipRegion(aSavedClipRegion);
+ }
+
+ // Tone down the bitmap. The further back the darker it becomes.
+ Rectangle aBox (
+ aPageOffset.X(),
+ aPageOffset.Y(),
+ aPageOffset.X()+aPreviewSize.Width()-1,
+ aPageOffset.Y()+aPreviewSize.Height()-1);
+ rContent.SetFillColor(COL_BLACK);
+ rContent.SetLineColor();
+ rContent.DrawTransparent(
+ ::basegfx::B2DPolyPolygon(::basegfx::tools::createPolygonFromRect(
+ ::basegfx::B2DRectangle(aBox.Left(), aBox.Top(), aBox.Right()+1, aBox.Bottom()+1),
+ 0,
+ 0)),
+ nTransparency);
+
+ // Draw border around preview.
+ Rectangle aBorderBox (GrowRectangle(aBox, 1));
+ rContent.SetLineColor(COL_GRAY);
+ rContent.SetFillColor();
+ rContent.DrawRect(aBorderBox);
+
+ // Draw shadow around preview.
+ mpShadowPainter->PaintFrame(rContent, aBorderBox);
+ }
+
+ return aPageOffset;
+}
+
+
+
+
+void InsertionIndicatorOverlay::PaintPageCount (
+ OutputDevice& rDevice,
+ const sal_Int32 nSelectionCount,
+ const Size aPreviewSize,
+ const Point aFirstPageOffset) const
+{
+ // Paint the number of slides.
+ ::boost::shared_ptr<view::Theme> pTheme (mrSlideSorter.GetTheme());
+ ::boost::shared_ptr<Font> pFont(Theme::GetFont(Theme::Font_PageCount, rDevice));
+ if (pFont)
+ {
+ ::rtl::OUString sNumber (::rtl::OUString::valueOf(nSelectionCount));
+
+ // Determine the size of the (painted) text and create a bounding
+ // box that centers the text on the first preview.
+ rDevice.SetFont(*pFont);
+ Rectangle aTextBox;
+ rDevice.GetTextBoundRect(aTextBox, sNumber);
+ Point aTextOffset (aTextBox.TopLeft());
+ Size aTextSize (aTextBox.GetSize());
+ // Place text inside the first page preview.
+ Point aTextLocation(aFirstPageOffset);
+ // Center the text.
+ aTextLocation += Point(
+ (aPreviewSize.Width()-aTextBox.GetWidth())/2,
+ (aPreviewSize.Height()-aTextBox.GetHeight())/2);
+ aTextBox = Rectangle(aTextLocation, aTextSize);
+
+ // Paint background, border and text.
+ static const sal_Int32 nBorder = 5;
+ rDevice.SetFillColor(pTheme->GetColor(Theme::Color_Selection));
+ rDevice.SetLineColor(pTheme->GetColor(Theme::Color_Selection));
+ rDevice.DrawRect(GrowRectangle(aTextBox, nBorder));
+
+ rDevice.SetFillColor();
+ rDevice.SetLineColor(pTheme->GetColor(Theme::Color_PageCountFontColor));
+ rDevice.DrawRect(GrowRectangle(aTextBox, nBorder-1));
+
+ rDevice.SetTextColor(pTheme->GetColor(Theme::Color_PageCountFontColor));
+ rDevice.DrawText(aTextBox.TopLeft()-aTextOffset, sNumber);
+ }
+}
+
+
+
+
+void InsertionIndicatorOverlay::SetLocation (const Point& rLocation)
+{
+ const Point aTopLeft (
+ rLocation - Point(
+ maIcon.GetSizePixel().Width()/2,
+ maIcon.GetSizePixel().Height()/2));
+ if (maLocation != aTopLeft)
+ {
+ const Rectangle aOldBoundingBox (GetBoundingBox());
+
+ maLocation = aTopLeft;
+
+ if (mpLayerInvalidator && IsVisible())
+ {
+ mpLayerInvalidator->Invalidate(aOldBoundingBox);
+ mpLayerInvalidator->Invalidate(GetBoundingBox());
+ }
+ }
+}
+
+
+
+
+void InsertionIndicatorOverlay::Paint (
+ OutputDevice& rDevice,
+ const Rectangle& rRepaintArea)
+{
+ (void)rRepaintArea;
+
+ if ( ! IsVisible())
+ return;
+
+ rDevice.DrawImage(maLocation, maIcon);
+}
+
+
+
+
+void InsertionIndicatorOverlay::SetLayerInvalidator (const SharedILayerInvalidator& rpInvalidator)
+{
+ mpLayerInvalidator = rpInvalidator;
+
+ if (mbIsVisible && mpLayerInvalidator)
+ mpLayerInvalidator->Invalidate(GetBoundingBox());
+}
+
+
+
+
+bool InsertionIndicatorOverlay::IsVisible (void) const
+{
+ return mbIsVisible;
+}
+
+
+
+
+void InsertionIndicatorOverlay::Show (void)
+{
+ if ( ! mbIsVisible)
+ {
+ mbIsVisible = true;
+
+ ::boost::shared_ptr<LayeredDevice> pLayeredDevice (
+ mrSlideSorter.GetView().GetLayeredDevice());
+ if (pLayeredDevice)
+ {
+ pLayeredDevice->RegisterPainter(shared_from_this(), mnLayerIndex);
+ if (mpLayerInvalidator)
+ mpLayerInvalidator->Invalidate(GetBoundingBox());
+ }
+ }
+}
+
+
+
+
+void InsertionIndicatorOverlay::Hide (void)
+{
+ if (mbIsVisible)
+ {
+ mbIsVisible = false;
+
+ ::boost::shared_ptr<LayeredDevice> pLayeredDevice (
+ mrSlideSorter.GetView().GetLayeredDevice());
+ if (pLayeredDevice)
+ {
+ if (mpLayerInvalidator)
+ mpLayerInvalidator->Invalidate(GetBoundingBox());
+ pLayeredDevice->RemovePainter(shared_from_this(), mnLayerIndex);
+ }
+ }
+}
+
+
+
+
+Rectangle InsertionIndicatorOverlay::GetBoundingBox (void) const
+{
+ return Rectangle(maLocation, maIcon.GetSizePixel());
+}
+
+
+
+
+Size InsertionIndicatorOverlay::GetSize (void) const
+{
+ return Size(
+ maIcon.GetSizePixel().Width() + 10,
+ maIcon.GetSizePixel().Height() + 10);
+}
+
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
new file mode 100644
index 000000000000..e3303278111f
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
@@ -0,0 +1,565 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "SlsLayeredDevice.hxx"
+
+#include <vcl/window.hxx>
+#include <vcl/virdev.hxx>
+
+#include <boost/bind.hpp>
+#include <boost/function.hpp>
+
+
+namespace sd { namespace slidesorter { namespace view {
+
+namespace {
+static const sal_Int32 gnMaximumLayerCount = 8;
+
+class LayerInvalidator : public ILayerInvalidator
+{
+public:
+ LayerInvalidator (
+ const ::boost::shared_ptr<LayeredDevice>& rpLayeredDevice,
+ const SharedSdWindow& rpTargetWindow,
+ const int nLayer)
+ : mpLayeredDevice(rpLayeredDevice),
+ mpTargetWindow(rpTargetWindow),
+ mnLayer(nLayer)
+ {
+ }
+
+ virtual void Invalidate (const Rectangle& rInvalidationBox)
+ {
+ mpLayeredDevice->Invalidate(rInvalidationBox, mnLayer);
+ mpTargetWindow->Invalidate(rInvalidationBox);
+ }
+
+private:
+ const ::boost::shared_ptr<LayeredDevice> mpLayeredDevice;
+ SharedSdWindow mpTargetWindow;
+ const int mnLayer;
+};
+
+void DeviceCopy (
+ OutputDevice& rTargetDevice,
+ OutputDevice& rSourceDevice,
+ const Rectangle& rBox)
+{
+ rTargetDevice.DrawOutDev(
+ rBox.TopLeft(),
+ rBox.GetSize(),
+ rBox.TopLeft(),
+ rBox.GetSize(),
+ rSourceDevice);
+}
+
+
+void ForAllRectangles (const Region& rRegion, ::boost::function<void(const Rectangle&)> aFunction)
+{
+ OSL_ASSERT(aFunction);
+
+ if (rRegion.GetRectCount() <= 1)
+ {
+ aFunction(rRegion.GetBoundRect());
+ }
+ else
+ {
+ Region aMutableRegionCopy (rRegion);
+ RegionHandle aHandle(aMutableRegionCopy.BeginEnumRects());
+ Rectangle aBox;
+ while (aMutableRegionCopy.GetNextEnumRect(aHandle, aBox))
+ aFunction(aBox);
+ aMutableRegionCopy.EndEnumRects(aHandle);
+ }
+}
+
+class Layer : private ::boost::noncopyable
+{
+public:
+ Layer (void);
+ ~Layer (void);
+
+ void Initialize (const SharedSdWindow& rpTargetWindow);
+ void InvalidateRectangle (const Rectangle& rInvalidationBox);
+ void InvalidateRegion (const Region& rInvalidationRegion);
+ void Validate (const MapMode& rMapMode);
+ void Repaint (
+ OutputDevice& rTargetDevice,
+ const Rectangle& rRepaintRectangle);
+ void Resize (const Size& rSize);
+ void AddPainter (const SharedILayerPainter& rpPainter);
+ void RemovePainter (const SharedILayerPainter& rpPainter);
+ bool HasPainter (void) const;
+ void Dispose (void);
+
+private:
+ ::boost::shared_ptr<VirtualDevice> mpLayerDevice;
+ ::std::vector<SharedILayerPainter> maPainters;
+ Region maInvalidationRegion;
+
+ void ValidateRectangle (const Rectangle& rBox);
+};
+typedef ::boost::shared_ptr<Layer> SharedLayer;
+
+
+} // end of anonymous namespace
+
+
+class LayeredDevice::LayerContainer : public ::std::vector<SharedLayer>
+{
+public:
+ LayerContainer (void) {}
+ ~LayerContainer (void) {}
+};
+
+
+
+
+//===== LayeredDevice =========================================================
+
+LayeredDevice::LayeredDevice (const SharedSdWindow& rpTargetWindow)
+ : mpTargetWindow(rpTargetWindow),
+ mpLayers(new LayerContainer()),
+ mpBackBuffer(new VirtualDevice(*mpTargetWindow)),
+ maSavedMapMode(rpTargetWindow->GetMapMode())
+{
+ mpBackBuffer->SetOutputSizePixel(mpTargetWindow->GetSizePixel());
+}
+
+
+
+
+LayeredDevice::~LayeredDevice (void)
+{
+}
+
+
+
+
+void LayeredDevice::Invalidate (
+ const Rectangle& rInvalidationArea,
+ const sal_Int32 nLayer)
+{
+ if (nLayer<0 || size_t(nLayer)>=mpLayers->size())
+ {
+ OSL_ASSERT(nLayer>=0 && size_t(nLayer)<mpLayers->size());
+ return;
+ }
+
+ (*mpLayers)[nLayer]->InvalidateRectangle(rInvalidationArea);
+}
+
+
+
+
+void LayeredDevice::InvalidateAllLayers (const Rectangle& rInvalidationArea)
+{
+ for (sal_uInt32 nLayer=0; nLayer<mpLayers->size(); ++nLayer)
+ (*mpLayers)[nLayer]->InvalidateRectangle(rInvalidationArea);
+}
+
+
+
+
+void LayeredDevice::InvalidateAllLayers (const Region& rInvalidationRegion)
+{
+ for (sal_uInt32 nLayer=0; nLayer<mpLayers->size(); ++nLayer)
+ (*mpLayers)[nLayer]->InvalidateRegion(rInvalidationRegion);
+}
+
+
+
+
+void LayeredDevice::RegisterPainter (
+ const SharedILayerPainter& rpPainter,
+ const sal_Int32 nLayer)
+{
+ OSL_ASSERT(mpLayers);
+ if ( ! rpPainter)
+ {
+ OSL_ASSERT(rpPainter);
+ return;
+ }
+ if (nLayer<0 || nLayer>=gnMaximumLayerCount)
+ {
+ OSL_ASSERT(nLayer>=0 && nLayer<gnMaximumLayerCount);
+ return;
+ }
+
+ // Provide the layers.
+ if (sal_uInt32(nLayer) >= mpLayers->size())
+ {
+ const sal_Int32 nOldLayerCount (mpLayers->size());
+ mpLayers->resize(nLayer+1);
+
+ for (size_t nIndex=nOldLayerCount; nIndex<mpLayers->size(); ++nIndex)
+ (*mpLayers)[nIndex].reset(new Layer());
+ }
+
+ (*mpLayers)[nLayer]->AddPainter(rpPainter);
+ if (nLayer == 0)
+ (*mpLayers)[nLayer]->Initialize(mpTargetWindow);
+
+ rpPainter->SetLayerInvalidator(
+ SharedILayerInvalidator(new LayerInvalidator(shared_from_this(),mpTargetWindow,nLayer)));
+}
+
+
+
+
+void LayeredDevice::RemovePainter (
+ const SharedILayerPainter& rpPainter,
+ const sal_Int32 nLayer)
+{
+ if ( ! rpPainter)
+ {
+ OSL_ASSERT(rpPainter);
+ return;
+ }
+ if (nLayer<0 || size_t(nLayer)>=mpLayers->size())
+ {
+ OSL_ASSERT(nLayer>=0 && size_t(nLayer)<mpLayers->size());
+ return;
+ }
+
+ rpPainter->SetLayerInvalidator(SharedILayerInvalidator());
+
+ (*mpLayers)[nLayer]->RemovePainter(rpPainter);
+
+ // Remove top most layers that do not contain any painters.
+ while ( ! mpLayers->empty() && ! mpLayers->back()->HasPainter())
+ mpLayers->erase(mpLayers->end()-1);
+}
+
+
+
+
+bool LayeredDevice::HasPainter (const sal_Int32 nLayer)
+{
+ return nLayer>=0
+ && sal_uInt32(nLayer)<mpLayers->size()
+ && (*mpLayers)[nLayer]->HasPainter();
+}
+
+
+
+
+void LayeredDevice::Repaint (const Region& rRepaintRegion)
+{
+ // Validate the contents of all layers (that have their own devices.)
+ ::std::for_each(
+ mpLayers->begin(),
+ mpLayers->end(),
+ ::boost::bind(&Layer::Validate, _1, mpTargetWindow->GetMapMode()));
+
+ ForAllRectangles(rRepaintRegion, ::boost::bind(&LayeredDevice::RepaintRectangle, this, _1));
+}
+
+
+
+
+void LayeredDevice::RepaintRectangle (const Rectangle& rRepaintRectangle)
+{
+ if (mpLayers->size() == 0)
+ return;
+ else if (mpLayers->size() == 1)
+ {
+ // Just copy the main layer into the target device.
+ (*mpLayers)[0]->Repaint(*mpTargetWindow, rRepaintRectangle);
+ }
+ else
+ {
+ // Paint all layers first into the back buffer (to avoid flickering
+ // due to synchronous paints) and then copy that into the target
+ // device.
+ mpBackBuffer->SetMapMode(mpTargetWindow->GetMapMode());
+ ::std::for_each(
+ mpLayers->begin(),
+ mpLayers->end(),
+ ::boost::bind(&Layer::Repaint, _1, ::boost::ref(*mpBackBuffer), rRepaintRectangle));
+
+ DeviceCopy(*mpTargetWindow, *mpBackBuffer, rRepaintRectangle);
+ }
+}
+
+
+
+
+void LayeredDevice::Resize (void)
+{
+ const Size aSize (mpTargetWindow->GetSizePixel());
+ mpBackBuffer->SetOutputSizePixel(aSize);
+ ::std::for_each(mpLayers->begin(), mpLayers->end(), ::boost::bind(&Layer::Resize, _1, aSize));
+}
+
+
+
+
+void LayeredDevice::Dispose (void)
+{
+ ::std::for_each(mpLayers->begin(), mpLayers->end(), ::boost::bind(&Layer::Dispose, _1));
+ mpLayers->clear();
+}
+
+
+
+
+bool LayeredDevice::HandleMapModeChange (void)
+{
+ const MapMode& rMapMode (mpTargetWindow->GetMapMode());
+ if (maSavedMapMode == rMapMode)
+ return false;
+
+ const Rectangle aLogicWindowBox (
+ mpTargetWindow->PixelToLogic(Rectangle(Point(0,0), mpTargetWindow->GetSizePixel())));
+ if (maSavedMapMode.GetScaleX() != rMapMode.GetScaleX()
+ || maSavedMapMode.GetScaleY() != rMapMode.GetScaleY()
+ || maSavedMapMode.GetMapUnit() != rMapMode.GetMapUnit())
+ {
+ // When the scale has changed then we have to paint everything.
+ InvalidateAllLayers(aLogicWindowBox);
+ }
+ else if (maSavedMapMode.GetOrigin() != rMapMode.GetOrigin())
+ {
+ // Window has been scrolled. Adapt contents of backbuffers and
+ // layer devices.
+ const Point aDelta (rMapMode.GetOrigin() - maSavedMapMode.GetOrigin());
+ mpBackBuffer->CopyArea(
+ aLogicWindowBox.TopLeft(),
+ mpTargetWindow->PixelToLogic(Point(0,0), maSavedMapMode),
+ aLogicWindowBox.GetSize());
+
+ // Invalidate the area(s) that have been exposed.
+ const Rectangle aWindowBox (Point(0,0), mpTargetWindow->GetSizePixel());
+ if (aDelta.Y() < 0)
+ InvalidateAllLayers(mpTargetWindow->PixelToLogic(Rectangle(
+ aWindowBox.Left(),
+ aWindowBox.Bottom()+aDelta.Y(),
+ aWindowBox.Right(),
+ aWindowBox.Bottom())));
+ else if (aDelta.Y() > 0)
+ InvalidateAllLayers(mpTargetWindow->PixelToLogic(Rectangle(
+ aWindowBox.Left(),
+ aWindowBox.Top(),
+ aWindowBox.Right(),
+ aWindowBox.Top()+aDelta.Y())));
+ if (aDelta.X() < 0)
+ InvalidateAllLayers(mpTargetWindow->PixelToLogic(Rectangle(
+ aWindowBox.Right()+aDelta.X(),
+ aWindowBox.Top(),
+ aWindowBox.Right(),
+ aWindowBox.Bottom())));
+ else if (aDelta.X() > 0)
+ InvalidateAllLayers(mpTargetWindow->PixelToLogic(Rectangle(
+ aWindowBox.Left(),
+ aWindowBox.Top(),
+ aWindowBox.Left()+aDelta.X(),
+ aWindowBox.Bottom())));
+ }
+ else
+ {
+ // Can this happen? Lets trigger a warning when it does.
+ OSL_ASSERT(false);
+ }
+
+ maSavedMapMode = rMapMode;
+
+ return true;
+}
+
+
+
+
+//===== Layer =================================================================
+
+Layer::Layer (void)
+ : mpLayerDevice(),
+ maPainters(),
+ maInvalidationRegion()
+{
+}
+
+
+
+
+Layer::~Layer (void)
+{
+}
+
+
+
+
+void Layer::Initialize (const SharedSdWindow& rpTargetWindow)
+{
+#if 0
+ (void)rpTargetWindow;
+#else
+ if ( ! mpLayerDevice)
+ {
+ mpLayerDevice.reset(new VirtualDevice(*rpTargetWindow));
+ mpLayerDevice->SetOutputSizePixel(rpTargetWindow->GetSizePixel());
+ }
+#endif
+}
+
+
+
+
+void Layer::InvalidateRectangle (const Rectangle& rInvalidationBox)
+{
+ maInvalidationRegion.Union(rInvalidationBox);
+}
+
+
+
+
+void Layer::InvalidateRegion (const Region& rInvalidationRegion)
+{
+ maInvalidationRegion.Union(rInvalidationRegion);
+}
+
+
+
+
+void Layer::Validate (const MapMode& rMapMode)
+{
+ if (mpLayerDevice && ! maInvalidationRegion.IsEmpty())
+ {
+ Region aRegion (maInvalidationRegion);
+ maInvalidationRegion.SetEmpty();
+
+ mpLayerDevice->SetMapMode(rMapMode);
+ ForAllRectangles(
+ aRegion,
+ ::boost::bind(&Layer::ValidateRectangle, this, _1));
+ }
+}
+
+
+
+
+void Layer::ValidateRectangle (const Rectangle& rBox)
+{
+ if ( ! mpLayerDevice)
+ return;
+ const Region aSavedClipRegion (mpLayerDevice->GetClipRegion());
+ mpLayerDevice->IntersectClipRegion(rBox);
+
+ for (::std::vector<SharedILayerPainter>::const_iterator
+ iPainter(maPainters.begin()),
+ iEnd(maPainters.end());
+ iPainter!=iEnd;
+ ++iPainter)
+ {
+ (*iPainter)->Paint(*mpLayerDevice, rBox);
+ }
+
+ mpLayerDevice->SetClipRegion(aSavedClipRegion);
+}
+
+
+
+
+void Layer::Repaint (
+ OutputDevice& rTargetDevice,
+ const Rectangle& rRepaintRectangle)
+{
+ if (mpLayerDevice)
+ {
+ DeviceCopy(rTargetDevice, *mpLayerDevice, rRepaintRectangle);
+ }
+ else
+ {
+ ::std::for_each(
+ maPainters.begin(),
+ maPainters.end(),
+ ::boost::bind(&ILayerPainter::Paint,
+ _1,
+ ::boost::ref(rTargetDevice),
+ rRepaintRectangle));
+ }
+}
+
+
+
+
+void Layer::Resize (const Size& rSize)
+{
+ if (mpLayerDevice)
+ {
+ mpLayerDevice->SetOutputSizePixel(rSize);
+ maInvalidationRegion = Rectangle(Point(0,0), rSize);
+ }
+}
+
+
+
+
+void Layer::AddPainter (const SharedILayerPainter& rpPainter)
+{
+ OSL_ASSERT(::std::find(maPainters.begin(), maPainters.end(), rpPainter) == maPainters.end());
+
+ maPainters.push_back(rpPainter);
+}
+
+
+
+
+void Layer::RemovePainter (const SharedILayerPainter& rpPainter)
+{
+ const ::std::vector<SharedILayerPainter>::iterator iPainter (
+ ::std::find(maPainters.begin(), maPainters.end(), rpPainter));
+ if (iPainter != maPainters.end())
+ {
+ maPainters.erase(iPainter);
+ }
+ else
+ {
+ DBG_ASSERT(false,"LayeredDevice::RemovePainter called for painter that is not registered");
+ }
+}
+
+
+
+
+bool Layer::HasPainter (void) const
+{
+ return !maPainters.empty();
+}
+
+
+
+
+void Layer::Dispose (void)
+{
+ maPainters.clear();
+}
+
+
+} } } // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx
new file mode 100644
index 000000000000..8b2398221548
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VIEW_LAYERED_DEVICE_HXX
+#define SD_SLIDESORTER_VIEW_LAYERED_DEVICE_HXX
+
+#include "view/SlsILayerPainter.hxx"
+#include "SlideSorter.hxx"
+
+#include <tools/gen.hxx>
+#include <vcl/region.hxx>
+#include <vcl/virdev.hxx>
+
+#include <boost/noncopyable.hpp>
+#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <vector>
+
+class Window;
+
+namespace sd { namespace slidesorter { namespace view {
+
+/** A simple wrapper around an OutputDevice that provides support for
+ independent layers and buffering.
+ Each layer may contain any number of painters.
+*/
+class LayeredDevice
+ : public ::boost::enable_shared_from_this<LayeredDevice>
+
+{
+public:
+ LayeredDevice (const SharedSdWindow& rpTargetWindow);
+ ~LayeredDevice (void);
+
+ void Invalidate (
+ const Rectangle& rInvalidationBox,
+ const sal_Int32 nLayer);
+ void InvalidateAllLayers (
+ const Rectangle& rInvalidationBox);
+ void InvalidateAllLayers (
+ const Region& rInvalidationRegion);
+
+ void RegisterPainter (
+ const SharedILayerPainter& rPainter,
+ const sal_Int32 nLayer);
+
+ void RemovePainter (
+ const SharedILayerPainter& rPainter,
+ const sal_Int32 nLayer);
+
+ bool HasPainter (const sal_Int32 nLayer);
+
+ bool HandleMapModeChange (void);
+ void Repaint (const Region& rRepaintRegion);
+
+ void Resize (void);
+
+ void Dispose (void);
+
+private:
+ SharedSdWindow mpTargetWindow;
+ class LayerContainer;
+ ::boost::scoped_ptr<LayerContainer> mpLayers;
+ ::boost::scoped_ptr<VirtualDevice> mpBackBuffer;
+ MapMode maSavedMapMode;
+
+ void RepaintRectangle (const Rectangle& rRepaintRectangle);
+};
+
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/view/SlsLayouter.cxx b/sd/source/ui/slidesorter/view/SlsLayouter.cxx
index 3767a655c48b..ee81dbc45202 100755..100644
--- a/sd/source/ui/slidesorter/view/SlsLayouter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsLayouter.cxx
@@ -28,38 +28,304 @@
#include "precompiled_sd.hxx"
#include "view/SlsLayouter.hxx"
-
-#include <vcl/outdev.hxx>
+#include "model/SlideSorterModel.hxx"
+#include "model/SlsPageDescriptor.hxx"
+#include "Window.hxx"
#include <rtl/math.hxx>
+#include <basegfx/numeric/ftools.hxx>
+
+namespace {
+ sal_Int32 RoundToInt (const double nValue)
+ {
+ return sal_Int32(::rtl::math::round(nValue));
+ }
+}
+
namespace sd { namespace slidesorter { namespace view {
-Layouter::Layouter (void)
- : mnRequestedLeftBorder(10),
- mnRequestedRightBorder(10),
- mnRequestedTopBorder(10),
- mnRequestedBottomBorder(10),
- mnLeftBorder(10),
- mnRightBorder(10),
- mnTopBorder(10),
- mnBottomBorder(10),
- mnLeftPageBorder(0),
- mnRightPageBorder(0),
- mnTopPageBorder(0),
- mnBottomPageBorder(0),
- mnVerticalGap (20),
- mnHorizontalGap (20),
- mnInsertionMarkerThickness (4),
- mnTotalVerticalGap(0),
- mnTotalHorizontalGap(0),
- mnMinimalWidth (100),
- mnPreferredWidth (200),
- mnMaximalWidth (300),
- mnMinimalColumnCount (1),
- mnMaximalColumnCount (5),
- mnColumnCount (1),
- maPageObjectModelSize (1,1),
- maPageObjectPixelSize (1,1)
+class Layouter::Implementation
+{
+public:
+ SharedSdWindow mpWindow;
+ sal_Int32 mnRequestedLeftBorder;
+ sal_Int32 mnRequestedRightBorder;
+ sal_Int32 mnRequestedTopBorder;
+ sal_Int32 mnRequestedBottomBorder;
+ sal_Int32 mnLeftBorder;
+ sal_Int32 mnRightBorder;
+ sal_Int32 mnTopBorder;
+ sal_Int32 mnBottomBorder;
+ sal_Int32 mnVerticalGap;
+ sal_Int32 mnHorizontalGap;
+ Size maMinimalSize;
+ Size maPreferredSize;
+ Size maMaximalSize;
+ sal_Int32 mnMinimalColumnCount;
+ sal_Int32 mnMaximalColumnCount;
+ sal_Int32 mnPageCount;
+ sal_Int32 mnColumnCount;
+ sal_Int32 mnRowCount;
+ /// The maximum number of columns. Can only be larger than the current
+ /// number of columns when there are not enough pages to fill all
+ /// available columns.
+ sal_Int32 mnMaxColumnCount;
+ /// The maximum number of rows. Can only be larger than the current
+ /// number of rows when there are not enough pages to fill all available
+ /// rows.
+ sal_Int32 mnMaxRowCount;
+ Size maPageObjectSize;
+ ::boost::shared_ptr<PageObjectLayouter> mpPageObjectLayouter;
+ ::boost::shared_ptr<view::Theme> mpTheme;
+
+ /** Specify how the gap between two page objects is associated with the
+ page objects.
+ */
+ enum GapMembership {
+ GM_NONE, // Gap is not associated with any page object.
+ GM_PREVIOUS, // The whole gap is associated with the previous page
+ // object (left or above the gap.)
+ GM_BOTH, // Half of the gap is associated with previous, half
+ // with the next page object.
+ GM_NEXT, // The whole gap is associated with the next page
+ // object (right or below the gap.)
+ GM_PAGE_BORDER
+ };
+
+ static Implementation* Create (
+ const Implementation& rImplementation,
+ const Layouter::Orientation eOrientation);
+
+ virtual Layouter::Orientation GetOrientation (void) const = 0;
+
+ bool Rearrange (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize,
+ const sal_uInt32 nPageCount);
+
+ /** Calculate the row that the point with the given vertical coordinate
+ is over. The horizontal component is ignored.
+ @param nYPosition
+ Vertical position in model coordinates.
+ @param bIncludeBordersAndGaps
+ When this flag is <TRUE/> then the area of borders and gaps are
+ interpreted as belonging to one of the rows.
+ @param eGapMembership
+ Specifies to what row the gap areas belong. Here GM_NONE
+ corresponds to bIncludeBordersAndGaps being <FALSE/>. When
+ GM_BOTH is given then the upper half is associated to the row
+ above and the lower half to the row below. Values of
+ GM_PREVIOUS and GM_NEXT associate the whole gap area with the
+ row above or below respectively.
+ */
+ sal_Int32 GetRowAtPosition (
+ sal_Int32 nYPosition,
+ bool bIncludeBordersAndGaps,
+ GapMembership eGapMembership = GM_NONE) const;
+
+ /** Calculate the column that the point with the given horizontal
+ coordinate is over. The verical component is ignored.
+ @param nXPosition
+ Horizontal position in model coordinates.
+ @param bIncludeBordersAndGaps
+ When this flag is <TRUE/> then the area of borders and gaps are
+ interpreted as belonging to one of the columns.
+ @param eGapMembership
+ Specifies to what column the gap areas belong.
+ */
+ sal_Int32 GetColumnAtPosition (
+ sal_Int32 nXPosition,
+ bool bIncludeBordersAndGaps,
+ GapMembership eGapMembership = GM_NONE) const;
+
+ /** This method is typically called from GetRowAtPosition() and
+ GetColumnAtPosition() to handle a position that lies inside the gap
+ between two adjacent rows or columns.
+ @param nDistanceIntoGap
+ Vertical distance from the bottom of the upper row down into the
+ gap or or horizontal distance from the right edge right into the
+ gap.
+ @param eGapMemberhship
+ This value decides what areas in the gap belong to which (or no)
+ row or column.
+ @param nIndex
+ The row index of the upper row or the column index of the left
+ column.
+ @param nGap
+ Width or height of the gap in model coordiantes between the
+ page borders.
+ @return
+ Returns either the index of the upper row (as given as nRow), the
+ index of the lower row (nRow+1) or -1 to indicate that the
+ position belongs to no row.
+ */
+ sal_Int32 ResolvePositionInGap (
+ sal_Int32 nDistanceIntoGap,
+ GapMembership eGapMembership,
+ sal_Int32 nIndex,
+ sal_Int32 nGap) const;
+
+ /** Calculate the logical part of the insert position, i.e. the page
+ after whicht to insert.
+ */
+ virtual void CalculateLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const = 0;
+
+ /** Calculate the geometrical part of the insert position, i.e. the
+ location of where to display the insertion indicator and the
+ distances about which the leading and trailing pages have to be
+ moved to make room for the indicator.
+ */
+ void CalculateGeometricPosition (
+ InsertPosition& rPosition,
+ const Size& rIndicatorSize,
+ const bool bIsVertical,
+ model::SlideSorterModel& rModel) const;
+
+ /** Return the bounding box of the preview or, when selected, of the page
+ object. Thus, it returns something like a visual bounding box.
+ */
+ Rectangle GetInnerBoundingBox (
+ model::SlideSorterModel& rModel,
+ const sal_Int32 nIndex) const;
+
+ Range GetValidHorizontalSizeRange (void) const;
+ Range GetValidVerticalSizeRange (void) const;
+
+ Range GetRangeOfVisiblePageObjects (const Rectangle& aVisibleArea) const;
+ sal_Int32 GetIndex (
+ const sal_Int32 nRow,
+ const sal_Int32 nColumn,
+ const bool bClampToValidRange) const;
+
+ Rectangle GetPageObjectBox (
+ const sal_Int32 nIndex,
+ const bool bIncludeBorderAndGap = false) const;
+
+ Rectangle GetPageObjectBox (
+ const sal_Int32 nRow,
+ const sal_Int32 nColumn) const;
+
+ Rectangle AddBorderAndGap (
+ const Rectangle& rBoundingBox,
+ const sal_Int32 nRow,
+ const sal_Int32 nColumn) const;
+
+ Rectangle GetTotalBoundingBox (void) const;
+
+ virtual ~Implementation (void);
+
+protected:
+ Implementation (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<view::Theme>& rpTheme);
+ Implementation (const Implementation& rImplementation);
+
+ virtual void CalculateRowAndColumnCount (const Size& rWindowSize) = 0;
+ virtual void CalculateMaxRowAndColumnCount (const Size& rWindowSize) = 0;
+ virtual Size CalculateTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize) const = 0;
+ Size GetTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize,
+ const bool bCalculateWidth,
+ const bool bCalculateHeight) const;
+ void CalculateVerticalLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const;
+};
+
+
+/** The vertical layouter has one column and as many rows as there are
+ pages.
+*/
+class VerticalImplementation : public Layouter::Implementation
+{
+public:
+ VerticalImplementation (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<view::Theme>& rpTheme);
+ VerticalImplementation (const Implementation& rImplementation);
+
+ virtual Layouter::Orientation GetOrientation (void) const;
+
+ void CalculateLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const;
+
+protected:
+ virtual void CalculateRowAndColumnCount (const Size& rWindowSize);
+ virtual void CalculateMaxRowAndColumnCount (const Size& rWindowSize);
+ virtual Size CalculateTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize) const;
+};
+
+
+/** The horizontal layouter has one row and as many columns as there are
+ pages.
+*/
+class HorizontalImplementation : public Layouter::Implementation
+{
+public:
+ HorizontalImplementation (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<view::Theme>& rpTheme);
+ HorizontalImplementation (const Implementation& rImplementation);
+
+ virtual Layouter::Orientation GetOrientation (void) const;
+
+ void CalculateLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const;
+
+protected:
+ virtual void CalculateRowAndColumnCount (const Size& rWindowSize);
+ virtual void CalculateMaxRowAndColumnCount (const Size& rWindowSize);
+ virtual Size CalculateTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize) const;
+};
+
+
+/** The number of columns of the grid layouter is defined via a control in
+ the slide sorter tool bar. The number of rows is calculated from the
+ number of columns and the number of pages.
+*/
+class GridImplementation : public Layouter::Implementation
+{
+public:
+ GridImplementation (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<view::Theme>& rpTheme);
+ GridImplementation (const Implementation& rImplementation);
+
+ virtual Layouter::Orientation GetOrientation (void) const;
+
+ void CalculateLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const;
+
+protected:
+ virtual void CalculateRowAndColumnCount (const Size& rWindowSize);
+ virtual void CalculateMaxRowAndColumnCount (const Size& rWindowSize);
+ virtual Size CalculateTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize) const;
+};
+
+
+
+
+//===== Layouter ==============================================================
+
+Layouter::Layouter (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<Theme>& rpTheme)
+ : mpImplementation(new GridImplementation(rpWindow, rpTheme)),
+ mpWindow(rpWindow)
{
}
@@ -71,39 +337,30 @@ Layouter::~Layouter (void)
}
-void Layouter::SetBorders (
- sal_Int32 nLeftBorder,
- sal_Int32 nRightBorder,
- sal_Int32 nTopBorder,
- sal_Int32 nBottomBorder)
+
+
+::boost::shared_ptr<PageObjectLayouter> Layouter::GetPageObjectLayouter (void) const
{
- if (nLeftBorder >= 0)
- mnRequestedLeftBorder.mnScreen = nLeftBorder;
- if (nRightBorder >= 0)
- mnRequestedRightBorder.mnScreen = nRightBorder;
- if (nTopBorder >= 0)
- mnRequestedTopBorder.mnScreen = nTopBorder;
- if (nBottomBorder >= 0)
- mnRequestedBottomBorder.mnScreen = nBottomBorder;
+ return mpImplementation->mpPageObjectLayouter;
}
-void Layouter::SetPageBorders (
+void Layouter::SetBorders (
sal_Int32 nLeftBorder,
sal_Int32 nRightBorder,
sal_Int32 nTopBorder,
sal_Int32 nBottomBorder)
{
if (nLeftBorder >= 0)
- mnLeftPageBorder.mnScreen = nLeftBorder;
+ mpImplementation->mnRequestedLeftBorder = nLeftBorder;
if (nRightBorder >= 0)
- mnRightPageBorder.mnScreen = nRightBorder;
+ mpImplementation->mnRequestedRightBorder = nRightBorder;
if (nTopBorder >= 0)
- mnTopPageBorder.mnScreen = nTopBorder;
+ mpImplementation->mnRequestedTopBorder = nTopBorder;
if (nBottomBorder >= 0)
- mnBottomPageBorder.mnScreen = nBottomBorder;
+ mpImplementation->mnRequestedBottomBorder = nBottomBorder;
}
@@ -115,389 +372,157 @@ void Layouter::SetColumnCount (
{
if (nMinimalColumnCount <= nMaximalColumnCount)
{
- mnMinimalColumnCount = nMinimalColumnCount;
- mnMaximalColumnCount = nMaximalColumnCount;
+ mpImplementation->mnMinimalColumnCount = nMinimalColumnCount;
+ mpImplementation->mnMaximalColumnCount = nMaximalColumnCount;
}
}
-bool Layouter::RearrangeHorizontal (
+bool Layouter::Rearrange (
+ const Orientation eOrientation,
const Size& rWindowSize,
- const Size& rPageObjectSize,
- OutputDevice* pDevice,
+ const Size& rPageSize,
const sal_uInt32 nPageCount)
{
- if (rWindowSize.Width() > 0
- && rWindowSize.Height() > 0
- && rPageObjectSize.Width() > 0
- && rPageObjectSize.Height() > 0)
- {
- mnTotalHorizontalGap.mnScreen = mnHorizontalGap.mnScreen
- + mnRightPageBorder.mnScreen + mnLeftPageBorder.mnScreen;
- mnTotalVerticalGap.mnScreen = mnVerticalGap.mnScreen
- + mnTopPageBorder.mnScreen + mnBottomPageBorder.mnScreen;
-
- // Calculate the column count.
- mnColumnCount = nPageCount;
-
- // Update the border values. The insertion marker has to have space.
- mnLeftBorder.mnScreen = mnRequestedLeftBorder.mnScreen;
- mnTopBorder.mnScreen = mnRequestedTopBorder.mnScreen;
- mnRightBorder.mnScreen = mnRequestedRightBorder.mnScreen;
- mnBottomBorder.mnScreen = mnRequestedBottomBorder.mnScreen;
- if (mnColumnCount > 1)
- {
- int nMinimumBorderWidth = mnInsertionMarkerThickness.mnScreen
- + mnHorizontalGap.mnScreen/2;
- if (mnLeftBorder.mnScreen < nMinimumBorderWidth)
- mnLeftBorder.mnScreen = nMinimumBorderWidth;
- if (mnRightBorder.mnScreen < nMinimumBorderWidth)
- mnRightBorder.mnScreen = nMinimumBorderWidth;
- }
- else
- {
- int nMinimumBorderHeight = mnInsertionMarkerThickness.mnScreen
- + mnVerticalGap.mnScreen/2;
- if (mnTopBorder.mnScreen < nMinimumBorderHeight)
- mnTopBorder.mnScreen = nMinimumBorderHeight;
- if (mnBottomBorder.mnScreen < nMinimumBorderHeight)
- mnBottomBorder.mnScreen = nMinimumBorderHeight;
- }
+ OSL_ASSERT(mpWindow);
- // Calculate the width of each page object.
- sal_uInt32 nTargetHeight = 0;
- sal_uInt32 nRowCount = 1;
- if (mnColumnCount > 0)
- nTargetHeight = (rWindowSize.Height()
- - mnTopBorder.mnScreen
- - mnBottomBorder.mnScreen
- - nRowCount * (mnTopPageBorder.mnScreen
- + mnBottomPageBorder.mnScreen)
- - (nRowCount-1) * mnTotalVerticalGap.mnScreen
- )
- / nRowCount;
- sal_uInt32 nMinimalHeight (
- mnMinimalWidth * rPageObjectSize.Height() / rPageObjectSize.Width());
- sal_uInt32 nMaximalHeight (
- mnMaximalWidth * rPageObjectSize.Height() / rPageObjectSize.Width());
- if (nTargetHeight < nMinimalHeight)
- nTargetHeight = nMinimalHeight;
- if (nTargetHeight > nMaximalHeight)
- nTargetHeight = nMaximalHeight;
-
- // Initialize the device with some arbitrary zoom factor just in
- // case that the current zoom factor is numerically instable when
- // used in a multiplication.
- MapMode aMapMode (pDevice->GetMapMode());
- aMapMode.SetScaleX (Fraction(1,1));
- aMapMode.SetScaleY (Fraction(1,1));
- pDevice->SetMapMode (aMapMode);
-
- // Calculate the resulting scale factor and the page object size in
- // pixels.
- maPageObjectModelSize = rPageObjectSize;
- int nPagePixelHeight (pDevice->LogicToPixel(maPageObjectModelSize).Height());
-
- // Adapt the layout of the given output device to the new layout of
- // page objects. The zoom factor is set so that the page objects in
- // one column fill the screen.
- Fraction aScaleFactor (nTargetHeight, nPagePixelHeight);
- SetZoom (aMapMode.GetScaleX() * aScaleFactor, pDevice);
-
- return true;
- }
- else
- return false;
+ if (eOrientation != mpImplementation->GetOrientation())
+ mpImplementation.reset(Implementation::Create(*mpImplementation, eOrientation));
+
+ return mpImplementation->Rearrange(rWindowSize, rPageSize, nPageCount);
}
-bool Layouter::RearrangeVertical (
- const Size& rWindowSize,
- const Size& rPageObjectSize,
- OutputDevice* pDevice)
+void Layouter::_SetZoom (double nZoomFactor)
{
- if (rWindowSize.Width() > 0
- && rWindowSize.Height() > 0
- && rPageObjectSize.Width() > 0
- && rPageObjectSize.Height() > 0)
- {
- mnTotalHorizontalGap.mnScreen = mnHorizontalGap.mnScreen
- + mnRightPageBorder.mnScreen + mnLeftPageBorder.mnScreen;
- mnTotalVerticalGap.mnScreen = mnVerticalGap.mnScreen
- + mnTopPageBorder.mnScreen + mnBottomPageBorder.mnScreen;
-
- // Calculate the column count.
- mnColumnCount = (rWindowSize.Width()
- - mnRequestedLeftBorder.mnScreen - mnRequestedRightBorder.mnScreen)
- / (mnPreferredWidth + mnTotalHorizontalGap.mnScreen);
- if (mnColumnCount < mnMinimalColumnCount)
- mnColumnCount = mnMinimalColumnCount;
- if (mnColumnCount > mnMaximalColumnCount)
- mnColumnCount = mnMaximalColumnCount;
-
- // Update the border values. The insertion marker has to have space.
- mnLeftBorder.mnScreen = mnRequestedLeftBorder.mnScreen;
- mnTopBorder.mnScreen = mnRequestedTopBorder.mnScreen;
- mnRightBorder.mnScreen = mnRequestedRightBorder.mnScreen;
- mnBottomBorder.mnScreen = mnRequestedBottomBorder.mnScreen;
- if (mnColumnCount > 1)
- {
- int nMinimumBorderWidth = mnInsertionMarkerThickness.mnScreen
- + mnHorizontalGap.mnScreen/2;
- if (mnLeftBorder.mnScreen < nMinimumBorderWidth)
- mnLeftBorder.mnScreen = nMinimumBorderWidth;
- if (mnRightBorder.mnScreen < nMinimumBorderWidth)
- mnRightBorder.mnScreen = nMinimumBorderWidth;
- }
- else
- {
- int nMinimumBorderHeight = mnInsertionMarkerThickness.mnScreen
- + mnVerticalGap.mnScreen/2;
- if (mnTopBorder.mnScreen < nMinimumBorderHeight)
- mnTopBorder.mnScreen = nMinimumBorderHeight;
- if (mnBottomBorder.mnScreen < nMinimumBorderHeight)
- mnBottomBorder.mnScreen = nMinimumBorderHeight;
- }
-
- // Calculate the width of each page object.
- sal_Int32 nTargetWidth = 0;
- if (mnColumnCount > 0)
- nTargetWidth = (rWindowSize.Width()
- - mnLeftBorder.mnScreen
- - mnRightBorder.mnScreen
- - mnColumnCount * (mnRightPageBorder.mnScreen
- + mnLeftPageBorder.mnScreen)
- - (mnColumnCount-1) * mnTotalHorizontalGap.mnScreen
- )
- / mnColumnCount;
- if (nTargetWidth < mnMinimalWidth)
- nTargetWidth = mnMinimalWidth;
- if (nTargetWidth > mnMaximalWidth)
- nTargetWidth = mnMaximalWidth;
-
- // Initialize the device with some arbitrary zoom factor just in
- // case that the current zoom factor is numerically instable when
- // used in a multiplication.
- MapMode aMapMode (pDevice->GetMapMode());
- aMapMode.SetScaleX (Fraction(1,1));
- aMapMode.SetScaleY (Fraction(1,1));
- pDevice->SetMapMode (aMapMode);
-
- // Calculate the resulting scale factor and the page object size in
- // pixels.
- maPageObjectModelSize = rPageObjectSize;
- int nPagePixelWidth (pDevice->LogicToPixel (maPageObjectModelSize).Width());
-
- // Adapt the layout of the given output device to the new layout of
- // page objects. The zoom factor is set so that the page objects in
- // one row fill the screen.
- Fraction aScaleFactor (nTargetWidth, nPagePixelWidth);
- SetZoom (aMapMode.GetScaleX() * aScaleFactor, pDevice);
-
- return true;
- }
- else
- return false;
+ _SetZoom(Fraction(nZoomFactor));
}
-void Layouter::SetZoom (Fraction nZoomFactor, OutputDevice* pDevice)
+void Layouter::_SetZoom (Fraction nZoomFactor)
{
- MapMode aMapMode (pDevice->GetMapMode());
+ OSL_ASSERT(mpWindow);
+
+ MapMode aMapMode (mpWindow->GetMapMode());
aMapMode.SetScaleX (nZoomFactor);
aMapMode.SetScaleY (nZoomFactor);
- maPageObjectPixelSize = pDevice->LogicToPixel (maPageObjectModelSize);
- pDevice->SetMapMode (aMapMode);
+ mpWindow->SetMapMode (aMapMode);
+}
- // Transform frequently used values from pixel to model coordinates.
- Size aTotalGap (pDevice->PixelToLogic (Size (
- mnTotalHorizontalGap.mnScreen,
- mnTotalVerticalGap.mnScreen)));
- mnTotalHorizontalGap.mnModel = aTotalGap.Width();
- mnTotalVerticalGap.mnModel = aTotalGap.Height();
- Size aGap (pDevice->PixelToLogic (Size (
- mnHorizontalGap.mnScreen,
- mnVerticalGap.mnScreen)));
- mnHorizontalGap.mnModel = aGap.Width();
- mnVerticalGap.mnModel = aGap.Height();
- Size aTopLeftBorder (pDevice->PixelToLogic (Size (
- mnLeftBorder.mnScreen,
- mnTopBorder.mnScreen)));
- mnLeftBorder.mnModel = aTopLeftBorder.Width();
- mnTopBorder.mnModel = aTopLeftBorder.Height();
+sal_Int32 Layouter::GetColumnCount (void) const
+{
+ return mpImplementation->mnColumnCount;
+}
- Size aBottomRightBorder (pDevice->PixelToLogic (Size (
- mnLeftBorder.mnScreen,
- mnTopBorder.mnScreen)));
- mnRightBorder.mnModel = aBottomRightBorder.Width();
- mnBottomBorder.mnModel = aBottomRightBorder.Height();
- Size aTopLeftPageBorder (pDevice->PixelToLogic (Size (
- mnLeftPageBorder.mnScreen,
- mnTopPageBorder.mnScreen)));
- mnLeftPageBorder.mnModel = aTopLeftPageBorder.Width();
- mnTopPageBorder.mnModel = aTopLeftPageBorder.Height();
- Size aBottomRightPageBorder (pDevice->PixelToLogic (Size (
- mnRightPageBorder.mnScreen,
- mnBottomPageBorder.mnScreen)));
- mnRightPageBorder.mnModel = aBottomRightPageBorder.Width();
- mnBottomPageBorder.mnModel = aBottomRightPageBorder.Height();
- mnInsertionMarkerThickness.mnModel = pDevice->PixelToLogic (
- Size(mnInsertionMarkerThickness.mnScreen,0)).Width();
+sal_Int32 Layouter::GetRowCount (void) const
+{
+ return mpImplementation->mnRowCount;
}
-sal_Int32 Layouter::GetColumnCount (void) const
+sal_Int32 Layouter::GetRow (const sal_Int32 nIndex) const
{
- return mnColumnCount;
+ return nIndex / mpImplementation->mnColumnCount;
}
-Size Layouter::GetPageObjectSize (void) const
+sal_Int32 Layouter::GetColumn (const sal_Int32 nIndex) const
{
- return maPageObjectModelSize;
+ return nIndex % mpImplementation->mnColumnCount;
}
-Rectangle Layouter::GetPageObjectBox (sal_Int32 nIndex) const
+sal_Int32 Layouter::GetIndex (const sal_Int32 nRow, const sal_Int32 nColumn) const
{
- int nColumn = nIndex % mnColumnCount;
- int nRow = nIndex / mnColumnCount;
- return Rectangle (
- Point (mnLeftBorder.mnModel
- + nColumn * maPageObjectModelSize.Width()
- + mnLeftPageBorder.mnModel
- + (nColumn>0 ? nColumn : 0) * mnTotalHorizontalGap.mnModel,
- mnTopBorder.mnModel
- + nRow * maPageObjectModelSize.Height()
- + mnTopPageBorder.mnModel
- + (nRow>0 ? nRow : 0) * mnTotalVerticalGap.mnModel),
- maPageObjectModelSize);
+ return mpImplementation->GetIndex(nRow,nColumn,true);
}
-Rectangle Layouter::GetPageBox (sal_Int32 nObjectCount) const
+Size Layouter::GetPageObjectSize (void) const
{
- sal_Int32 nHorizontalSize = 0;
- sal_Int32 nVerticalSize = 0;
- if (mnColumnCount > 0)
- {
- sal_Int32 nRowCount = (nObjectCount+mnColumnCount-1) / mnColumnCount;
- nHorizontalSize =
- mnLeftBorder.mnModel
- + mnRightBorder.mnModel
- + mnColumnCount * maPageObjectModelSize.Width()
- + mnLeftPageBorder.mnModel + mnRightPageBorder.mnModel;
- if (mnColumnCount > 1)
- nHorizontalSize
- += (mnColumnCount-1) * mnTotalHorizontalGap.mnModel;
- nVerticalSize =
- mnTopBorder.mnModel
- + mnBottomBorder.mnModel
- + nRowCount * maPageObjectModelSize.Height()
- + mnTopPageBorder.mnModel + mnBottomPageBorder.mnModel;
- if (nRowCount > 1)
- nVerticalSize += (nRowCount-1) * mnTotalVerticalGap.mnModel;
- }
+ return mpImplementation->maPageObjectSize;
+}
- return Rectangle (
- Point(0,0),
- Size (nHorizontalSize, nVerticalSize)
- );
+
+
+
+Rectangle Layouter::GetPageObjectBox (
+ const sal_Int32 nIndex,
+ const bool bIncludeBorderAndGap) const
+{
+ return mpImplementation->GetPageObjectBox(nIndex, bIncludeBorderAndGap);
}
-Rectangle Layouter::GetInsertionMarkerBox (
- sal_Int32 nIndex,
- bool bVertical,
- bool bLeftOrTop) const
+Rectangle Layouter::GetTotalBoundingBox (void) const
{
- Rectangle aBox (GetPageObjectBox (nIndex));
+ return mpImplementation->GetTotalBoundingBox();
+}
+
+
+
+
+InsertPosition Layouter::GetInsertPosition (
+ const Point& rModelPosition,
+ const Size& rIndicatorSize,
+ model::SlideSorterModel& rModel) const
+{
+ InsertPosition aPosition;
+ mpImplementation->CalculateLogicalInsertPosition(
+ rModelPosition,
+ aPosition);
+ mpImplementation->CalculateGeometricPosition(
+ aPosition,
+ rIndicatorSize,
+ GetColumnCount()==1,
+ rModel);
+ return aPosition;
+}
- if (bVertical)
- {
- sal_Int32 nHorizontalInsertionMarkerOffset
- = (mnHorizontalGap.mnModel-mnInsertionMarkerThickness.mnModel) / 2;
- if (bLeftOrTop)
- {
- // Left.
- aBox.Left() -= mnLeftPageBorder.mnModel
- + mnHorizontalGap.mnModel
- - nHorizontalInsertionMarkerOffset;
- }
- else
- {
- // Right.
- aBox.Left() = aBox.Right()
- + mnRightPageBorder.mnModel
- + nHorizontalInsertionMarkerOffset;
- }
- aBox.Right() = aBox.Left() + mnInsertionMarkerThickness.mnModel;
- }
- else
- {
- sal_Int32 nVerticalInsertionMarkerOffset
- = (mnVerticalGap.mnModel - mnInsertionMarkerThickness.mnModel) / 2;
- if (bLeftOrTop)
- {
- // Above.
- aBox.Top() -= mnTopPageBorder.mnModel
- + mnVerticalGap.mnModel
- - nVerticalInsertionMarkerOffset;
- }
- else
- {
- // Below.
- aBox.Top() = aBox.Bottom()
- + mnBottomPageBorder.mnModel
- + nVerticalInsertionMarkerOffset;
- }
- aBox.Bottom() = aBox.Top() + mnInsertionMarkerThickness.mnModel;
- }
- return aBox;
+
+
+Range Layouter::GetValidHorizontalSizeRange (void) const
+{
+ return mpImplementation->GetValidHorizontalSizeRange();
}
-sal_Int32 Layouter::GetIndexOfFirstVisiblePageObject (
- const Rectangle& aVisibleArea) const
+Range Layouter::GetValidVerticalSizeRange (void) const
{
- sal_Int32 nRow = GetRowAtPosition (aVisibleArea.Top(), true, GM_BOTH);
- return nRow * mnColumnCount;
+ return mpImplementation->GetValidVerticalSizeRange();
}
-sal_Int32 Layouter::GetIndexOfLastVisiblePageObject (
- const Rectangle& aVisibleArea) const
+Range Layouter::GetRangeOfVisiblePageObjects (const Rectangle& aVisibleArea) const
{
- sal_Int32 nRow = GetRowAtPosition (aVisibleArea.Bottom(),
- true, GM_BOTH);
- return (nRow+1) * mnColumnCount - 1;
+ return mpImplementation->GetRangeOfVisiblePageObjects(aVisibleArea);
}
@@ -505,128 +530,188 @@ sal_Int32 Layouter::GetIndexOfLastVisiblePageObject (
sal_Int32 Layouter::GetIndexAtPoint (
const Point& rPosition,
- bool bIncludePageBorders) const
+ const bool bIncludePageBorders,
+ const bool bClampToValidRange) const
{
- sal_Int32 nRow = GetRowAtPosition (rPosition.Y(),
- bIncludePageBorders,
- bIncludePageBorders ? GM_PAGE_BORDER : GM_NONE);
- sal_Int32 nColumn = GetColumnAtPosition (rPosition.X(),
- bIncludePageBorders,
- bIncludePageBorders ? GM_PAGE_BORDER : GM_NONE);
-
- if (nRow >= 0 && nColumn >= 0)
- return nRow * mnColumnCount + nColumn;
- else
- return -1;
+ const sal_Int32 nRow (
+ mpImplementation->GetRowAtPosition (
+ rPosition.Y(),
+ bIncludePageBorders,
+ bIncludePageBorders ? Implementation::GM_PAGE_BORDER : Implementation::GM_NONE));
+ const sal_Int32 nColumn (
+ mpImplementation->GetColumnAtPosition (
+ rPosition.X(),
+ bIncludePageBorders,
+ bIncludePageBorders ? Implementation::GM_PAGE_BORDER : Implementation::GM_NONE));
+
+ return mpImplementation->GetIndex(nRow,nColumn,bClampToValidRange);
}
-/** Calculation of the insertion index:
- 1. Determine the row. rPoint has to be in the row between upper and
- lower border. If it is in a horizontal gap or border an invalid
- insertion index (-1, which is a valid return value) will be returned.
- 2. Determine the column. Here both vertical borders and vertical gaps
- will yield valid return values. The horizontal positions between the
- center of page objects in column i and the center of page objects in
- column i+1 will return column i+1 as insertion index.
+//===== Layouter::Implementation ==============================================
- When there is only one column and bAllowVerticalPosition is true than
- take the vertical areas between rows into account as well.
-*/
-sal_Int32 Layouter::GetInsertionIndex (
- const Point& rPosition,
- bool bAllowVerticalPosition) const
+Layouter::Implementation* Layouter::Implementation::Create (
+ const Implementation& rImplementation,
+ const Layouter::Orientation eOrientation)
{
- sal_Int32 nIndex = -1;
+ switch (eOrientation)
+ {
+ case HORIZONTAL: return new HorizontalImplementation(rImplementation);
+ case VERTICAL: return new VerticalImplementation(rImplementation);
+ case GRID:
+ default: return new GridImplementation(rImplementation);
+ }
+}
- sal_Int32 nRow = GetRowAtPosition (rPosition.Y(), true,
- (mnColumnCount==1 && bAllowVerticalPosition) ? GM_BOTH : GM_BOTH);
- sal_Int32 nColumn = GetColumnAtPosition (rPosition.X(), true, GM_BOTH);
- if (nRow >= 0 && nColumn >= 0)
- nIndex = nRow * mnColumnCount + nColumn;
- return nIndex;
+
+Layouter::Implementation::Implementation (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<view::Theme>& rpTheme)
+ : mpWindow(rpWindow),
+ mnRequestedLeftBorder(5),
+ mnRequestedRightBorder(5),
+ mnRequestedTopBorder(5),
+ mnRequestedBottomBorder(5),
+ mnLeftBorder(5),
+ mnRightBorder(5),
+ mnTopBorder(5),
+ mnBottomBorder(5),
+ mnVerticalGap (10 - 2*rpTheme->GetIntegerValue(Theme::Integer_FocusIndicatorWidth)),
+ mnHorizontalGap(10 - 2*rpTheme->GetIntegerValue(Theme::Integer_FocusIndicatorWidth)),
+ maMinimalSize(132,98),
+ maPreferredSize(200,150),
+ maMaximalSize(300,200),
+ mnMinimalColumnCount(1),
+ mnMaximalColumnCount(15),
+ mnPageCount(0),
+ mnColumnCount(1),
+ mnRowCount(0),
+ mnMaxColumnCount(0),
+ mnMaxRowCount(0),
+ maPageObjectSize(1,1),
+ mpPageObjectLayouter(),
+ mpTheme(rpTheme)
+{
}
-Layouter::DoublePoint
- Layouter::ConvertModelToLayouterCoordinates (
- const Point& rModelPoint) const
+Layouter::Implementation::Implementation (const Implementation& rImplementation)
+ : mpWindow(rImplementation.mpWindow),
+ mnRequestedLeftBorder(rImplementation.mnRequestedLeftBorder),
+ mnRequestedRightBorder(rImplementation.mnRequestedRightBorder),
+ mnRequestedTopBorder(rImplementation.mnRequestedTopBorder),
+ mnRequestedBottomBorder(rImplementation.mnRequestedBottomBorder),
+ mnLeftBorder(rImplementation.mnLeftBorder),
+ mnRightBorder(rImplementation.mnRightBorder),
+ mnTopBorder(rImplementation.mnTopBorder),
+ mnBottomBorder(rImplementation.mnBottomBorder),
+ mnVerticalGap(rImplementation.mnVerticalGap),
+ mnHorizontalGap(rImplementation.mnHorizontalGap),
+ maMinimalSize(rImplementation.maMinimalSize),
+ maPreferredSize(rImplementation.maPreferredSize),
+ maMaximalSize(rImplementation.maMaximalSize),
+ mnMinimalColumnCount(rImplementation.mnMinimalColumnCount),
+ mnMaximalColumnCount(rImplementation.mnMaximalColumnCount),
+ mnPageCount(rImplementation.mnPageCount),
+ mnColumnCount(rImplementation.mnColumnCount),
+ mnRowCount(rImplementation.mnRowCount),
+ mnMaxColumnCount(rImplementation.mnMaxColumnCount),
+ mnMaxRowCount(rImplementation.mnMaxRowCount),
+ maPageObjectSize(rImplementation.maPageObjectSize),
+ mpPageObjectLayouter(),
+ mpTheme(rImplementation.mpTheme)
{
- sal_Int32 nColumn = GetColumnAtPosition (rModelPoint.X(), true, GM_BOTH);
- sal_Int32 nColumnWidth
- = maPageObjectModelSize.Width() + mnTotalHorizontalGap.mnModel;
- sal_Int32 nDistanceIntoColumn =
- rModelPoint.X() - mnLeftBorder.mnModel - mnLeftPageBorder.mnModel
- - nColumn * nColumnWidth;
+}
+
+
- sal_Int32 nRow = GetRowAtPosition (rModelPoint.Y(), true, GM_BOTH);
- sal_Int32 nRowHeight
- = maPageObjectModelSize.Height() + mnTotalVerticalGap.mnModel;
- sal_Int32 nDistanceIntoRow =
- rModelPoint.Y() - mnTopBorder.mnModel - mnTopPageBorder.mnModel
- - nRow * nRowHeight;
- return DoublePoint (
- nColumn + double(nDistanceIntoColumn) / double(nColumnWidth),
- nRow + double(nDistanceIntoRow) / double(nRowHeight));
+Layouter::Implementation::~Implementation (void)
+{
}
-Point Layouter::ConvertLayouterToModelCoordinates (
- const DoublePoint & rLayouterPoint) const
+bool Layouter::Implementation::Rearrange (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize,
+ const sal_uInt32 nPageCount)
{
- sal_Int32 nColumn = (sal_Int32) ::rtl::math::round(rLayouterPoint.first,
- 0,rtl_math_RoundingMode_Floor);
- sal_Int32 nColumnWidth
- = maPageObjectModelSize.Width() + mnTotalHorizontalGap.mnModel;
- sal_Int32 nDistanceIntoColumn
- = (sal_Int32)((rLayouterPoint.first - nColumn) * nColumnWidth);
+ mnPageCount = nPageCount;
- sal_Int32 nRow = (sal_Int32) ::rtl::math::round(rLayouterPoint.second,
- 0,rtl_math_RoundingMode_Floor);
- sal_Int32 nRowHeight
- = maPageObjectModelSize.Height() + mnTotalVerticalGap.mnModel;
- sal_Int32 nDistanceIntoRow
- = (sal_Int32)((rLayouterPoint.second - nRow) * nRowHeight);
+ // Return early when the window or the model have not yet been initialized.
+ if (rWindowSize.Width()<=0 || rWindowSize.Height()<=0)
+ return false;
+ if (rPreviewModelSize.Width()<=0 || rPreviewModelSize.Height()<=0)
+ return false;
- return Point (
- mnLeftBorder.mnModel + mnLeftPageBorder.mnModel
- + nColumn * nColumnWidth + nDistanceIntoColumn,
- mnTopBorder.mnModel + mnTopPageBorder.mnModel
- + nRow * nRowHeight + nDistanceIntoRow);
+ CalculateRowAndColumnCount(rWindowSize);
+
+ // Update the border values.
+ mnLeftBorder = mnRequestedLeftBorder;
+ mnTopBorder = mnRequestedTopBorder;
+ mnRightBorder = mnRequestedRightBorder;
+ mnBottomBorder = mnRequestedBottomBorder;
+ if (mnColumnCount > 1)
+ {
+ int nMinimumBorderWidth = mnHorizontalGap/2;
+ if (mnLeftBorder < nMinimumBorderWidth)
+ mnLeftBorder = nMinimumBorderWidth;
+ if (mnRightBorder < nMinimumBorderWidth)
+ mnRightBorder = nMinimumBorderWidth;
+ }
+ else
+ {
+ int nMinimumBorderHeight = mnVerticalGap/2;
+ if (mnTopBorder < nMinimumBorderHeight)
+ mnTopBorder = nMinimumBorderHeight;
+ if (mnBottomBorder < nMinimumBorderHeight)
+ mnBottomBorder = nMinimumBorderHeight;
+ }
+
+ mpPageObjectLayouter.reset(
+ new PageObjectLayouter(
+ mpTheme,
+ CalculateTargetSize(rWindowSize, rPreviewModelSize),
+ rPreviewModelSize,
+ mpWindow,
+ mnPageCount));
+ maPageObjectSize = mpPageObjectLayouter->GetSize(
+ PageObjectLayouter::FocusIndicator,
+ PageObjectLayouter::WindowCoordinateSystem);
+
+ CalculateMaxRowAndColumnCount(rWindowSize);
+
+ return true;
}
-sal_Int32 Layouter::GetRowAtPosition (
+sal_Int32 Layouter::Implementation::GetRowAtPosition (
sal_Int32 nYPosition,
bool bIncludeBordersAndGaps,
GapMembership eGapMembership) const
{
sal_Int32 nRow = -1;
- const sal_Int32 nY = nYPosition
- - mnTopBorder.mnModel - mnTopPageBorder.mnModel;
+ const sal_Int32 nY = nYPosition - mnTopBorder;
if (nY >= 0)
{
// Vertical distance from one row to the next.
- const sal_Int32 nRowOffset (
- maPageObjectModelSize.Height() + mnTotalVerticalGap.mnModel);
+ const sal_Int32 nRowOffset (maPageObjectSize.Height() + mnVerticalGap);
// Calculate row consisting of page objects and gap below.
nRow = nY / nRowOffset;
- const sal_Int32 nDistanceIntoGap (
- (nY - nRow*nRowOffset) - maPageObjectModelSize.Height());
+ const sal_Int32 nDistanceIntoGap ((nY - nRow*nRowOffset) - maPageObjectSize.Height());
// When inside the gap below then nYPosition is not over a page
// object.
if (nDistanceIntoGap > 0)
@@ -634,8 +719,7 @@ sal_Int32 Layouter::GetRowAtPosition (
nDistanceIntoGap,
eGapMembership,
nRow,
- mnBottomPageBorder.mnModel,
- mnVerticalGap.mnModel);
+ mnVerticalGap);
}
else if (bIncludeBordersAndGaps)
{
@@ -650,20 +734,18 @@ sal_Int32 Layouter::GetRowAtPosition (
-sal_Int32 Layouter::GetColumnAtPosition (
+sal_Int32 Layouter::Implementation::GetColumnAtPosition (
sal_Int32 nXPosition,
bool bIncludeBordersAndGaps,
GapMembership eGapMembership) const
{
sal_Int32 nColumn = -1;
- sal_Int32 nX = nXPosition
- - mnLeftBorder.mnModel - mnLeftPageBorder.mnModel;
+ sal_Int32 nX = nXPosition - mnLeftBorder;
if (nX >= 0)
{
// Horizontal distance from one column to the next.
- const sal_Int32 nColumnOffset (
- maPageObjectModelSize.Width() + mnTotalHorizontalGap.mnModel);
+ const sal_Int32 nColumnOffset (maPageObjectSize.Width() + mnHorizontalGap);
// Calculate row consisting of page objects and gap below.
nColumn = nX / nColumnOffset;
@@ -672,8 +754,7 @@ sal_Int32 Layouter::GetColumnAtPosition (
else if (nColumn >= mnColumnCount)
nColumn = mnColumnCount-1;
- const sal_Int32 nDistanceIntoGap (
- (nX - nColumn*nColumnOffset) - maPageObjectModelSize.Width());
+ const sal_Int32 nDistanceIntoGap ((nX - nColumn*nColumnOffset) - maPageObjectSize.Width());
// When inside the gap at the right then nXPosition is not over a
// page object.
if (nDistanceIntoGap > 0)
@@ -681,8 +762,7 @@ sal_Int32 Layouter::GetColumnAtPosition (
nDistanceIntoGap,
eGapMembership,
nColumn,
- mnRightPageBorder.mnModel,
- mnHorizontalGap.mnModel);
+ mnHorizontalGap);
}
else if (bIncludeBordersAndGaps)
{
@@ -697,11 +777,10 @@ sal_Int32 Layouter::GetColumnAtPosition (
-sal_Int32 Layouter::ResolvePositionInGap (
+sal_Int32 Layouter::Implementation::ResolvePositionInGap (
sal_Int32 nDistanceIntoGap,
GapMembership eGapMembership,
sal_Int32 nIndex,
- sal_Int32 nLeftOrTopPageBorder,
sal_Int32 nGap) const
{
switch (eGapMembership)
@@ -714,7 +793,7 @@ sal_Int32 Layouter::ResolvePositionInGap (
case GM_BOTH:
{
// The lower half of the gap belongs to the next row or column.
- sal_Int32 nFirstHalfGapWidth = nLeftOrTopPageBorder + nGap / 2;
+ sal_Int32 nFirstHalfGapWidth = nGap / 2;
if (nDistanceIntoGap > nFirstHalfGapWidth)
nIndex ++;
break;
@@ -730,9 +809,9 @@ sal_Int32 Layouter::ResolvePositionInGap (
break;
case GM_PAGE_BORDER:
- if (nDistanceIntoGap > nLeftOrTopPageBorder)
+ if (nDistanceIntoGap > 0)
{
- if (nDistanceIntoGap > nLeftOrTopPageBorder + nGap)
+ if (nDistanceIntoGap > nGap)
{
// Inside the border of the next row or column.
nIndex ++;
@@ -755,4 +834,719 @@ sal_Int32 Layouter::ResolvePositionInGap (
+void Layouter::Implementation::CalculateGeometricPosition (
+ InsertPosition& rPosition,
+ const Size& rIndicatorSize,
+ const bool bIsVertical,
+ model::SlideSorterModel& rModel) const
+{
+ // 1. Determine right/bottom of the leading page and the left/top of the
+ // trailing page object and how to distribute the missing space.
+ sal_Int32 nLeadingLocation (0);
+ sal_Int32 nTrailingLocation (0);
+ bool bIsLeadingFixed (false);
+ bool bIsTrailingFixed (false);
+ sal_Int32 nSecondaryLocation (0);
+ const sal_Int32 nIndex (rPosition.GetIndex());
+
+ if (rPosition.IsAtRunStart())
+ {
+ // Place indicator at the top of the column.
+ const Rectangle aOuterBox (GetPageObjectBox(nIndex));
+ const Rectangle aInnerBox (GetInnerBoundingBox(rModel, nIndex));
+ if (bIsVertical)
+ {
+ nLeadingLocation = aOuterBox.Top();
+ nTrailingLocation = aInnerBox.Top();
+ nSecondaryLocation = aInnerBox.Center().X();
+ }
+ else
+ {
+ nLeadingLocation = aOuterBox.Left();
+ nTrailingLocation = aInnerBox.Left();
+ nSecondaryLocation = aInnerBox.Center().Y();
+ }
+ bIsLeadingFixed = true;
+ }
+ else if (rPosition.IsAtRunEnd())
+ {
+ // Place indicator at the bottom/right of the column/row.
+
+ const Rectangle aOuterBox (GetPageObjectBox(nIndex-1));
+ const Rectangle aInnerBox (GetInnerBoundingBox(rModel, nIndex-1));
+ if (bIsVertical)
+ {
+ nLeadingLocation = aInnerBox.Bottom();
+ nTrailingLocation = aOuterBox.Bottom();
+ nSecondaryLocation = aInnerBox.Center().X();
+ }
+ else
+ {
+ nLeadingLocation = aInnerBox.Right();
+ nTrailingLocation = aOuterBox.Right();
+ nSecondaryLocation = aInnerBox.Center().Y();
+ }
+ bIsTrailingFixed = true;
+ if ( ! rPosition.IsExtraSpaceNeeded())
+ bIsLeadingFixed = true;
+ }
+ else
+ {
+ // Place indicator between two rows/columns.
+ const Rectangle aBox1 (GetInnerBoundingBox(rModel, nIndex-1));
+ const Rectangle aBox2 (GetInnerBoundingBox(rModel, nIndex));
+ if (bIsVertical)
+ {
+ nLeadingLocation = aBox1.Bottom();
+ nTrailingLocation = aBox2.Top();
+ nSecondaryLocation = (aBox1.Center().X() + aBox2.Center().X()) / 2;
+ }
+ else
+ {
+ nLeadingLocation = aBox1.Right();
+ nTrailingLocation = aBox2.Left();
+ nSecondaryLocation = (aBox1.Center().Y() + aBox2.Center().Y()) / 2;
+ }
+ }
+
+ // 2. Calculate the location of the insert indicator and the offsets of
+ // leading and trailing pages.
+ const sal_Int32 nAvailableSpace (nTrailingLocation - nLeadingLocation);
+ const sal_Int32 nRequiredSpace (bIsVertical ? rIndicatorSize.Height():rIndicatorSize.Width());
+ const sal_Int32 nMissingSpace (::std::max(sal_Int32(0), nRequiredSpace - nAvailableSpace));
+ sal_Int32 nPrimaryLocation (0);
+ sal_Int32 nLeadingOffset (0);
+ sal_Int32 nTrailingOffset (0);
+ if (bIsLeadingFixed)
+ {
+ nPrimaryLocation = nLeadingLocation + nRequiredSpace/2;
+ if ( ! bIsTrailingFixed)
+ nTrailingOffset = nMissingSpace;
+ }
+ else if (bIsTrailingFixed)
+ {
+ nPrimaryLocation = nTrailingLocation - nRequiredSpace/2;
+ nLeadingOffset = -nMissingSpace;
+ }
+ else
+ {
+ nPrimaryLocation = (nLeadingLocation + nTrailingLocation) /2;
+ nLeadingOffset = -nMissingSpace/2;
+ nTrailingOffset = nMissingSpace + nLeadingOffset;
+ }
+
+ if (bIsVertical)
+ {
+ rPosition.SetGeometricalPosition(
+ Point(nSecondaryLocation, nPrimaryLocation),
+ Point(0, nLeadingOffset),
+ Point(0, nTrailingOffset));
+ }
+ else
+ {
+ rPosition.SetGeometricalPosition(
+ Point(nPrimaryLocation, nSecondaryLocation),
+ Point(nLeadingOffset, 0),
+ Point(nTrailingOffset, 0));
+ }
+}
+
+
+
+
+Rectangle Layouter::Implementation::GetInnerBoundingBox (
+ model::SlideSorterModel& rModel,
+ const sal_Int32 nIndex) const
+{
+ model::SharedPageDescriptor pDescriptor (rModel.GetPageDescriptor(nIndex));
+ if ( ! pDescriptor)
+ return Rectangle();
+
+ const Point aLocation (pDescriptor->GetLocation(true));
+ if (pDescriptor->HasState(model::PageDescriptor::ST_Selected))
+ return mpPageObjectLayouter->GetBoundingBox(
+ aLocation,
+ PageObjectLayouter::PageObject,
+ PageObjectLayouter::ModelCoordinateSystem);
+ else
+ return mpPageObjectLayouter->GetBoundingBox(
+ aLocation,
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::ModelCoordinateSystem);
+}
+
+
+
+
+Range Layouter::Implementation::GetValidHorizontalSizeRange (void) const
+{
+ return Range(
+ mnLeftBorder + maMinimalSize.Width() + mnRightBorder,
+ mnLeftBorder + maMaximalSize.Width() + mnRightBorder);
+}
+
+
+
+
+Range Layouter::Implementation::GetValidVerticalSizeRange (void) const
+{
+ return Range(
+ mnTopBorder + maMinimalSize.Height() + mnBottomBorder,
+ mnTopBorder + maMaximalSize.Height() + mnBottomBorder);
+}
+
+
+
+
+Range Layouter::Implementation::GetRangeOfVisiblePageObjects (const Rectangle& aVisibleArea) const
+{
+ const sal_Int32 nRow0 (GetRowAtPosition(aVisibleArea.Top(), true, GM_NEXT));
+ const sal_Int32 nCol0 (GetColumnAtPosition(aVisibleArea.Left(),true, GM_NEXT));
+ const sal_Int32 nRow1 (GetRowAtPosition(aVisibleArea.Bottom(), true, GM_PREVIOUS));
+ const sal_Int32 nCol1 (GetColumnAtPosition(aVisibleArea.Right(), true, GM_PREVIOUS));
+
+ // When start and end lie in different rows then the range may include
+ // slides outside (left or right of) the given area.
+ return Range(GetIndex(nRow0,nCol0,true), GetIndex(nRow1,nCol1,true));
+}
+
+
+
+
+Size Layouter::Implementation::GetTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize,
+ const bool bCalculateWidth,
+ const bool bCalculateHeight) const
+{
+ (void)rPreviewModelSize;
+
+ if (mnColumnCount<=0 || mnRowCount<=0)
+ return maPreferredSize;
+ if ( ! (bCalculateWidth || bCalculateHeight))
+ {
+ OSL_ASSERT(bCalculateWidth || bCalculateHeight);
+ return maPreferredSize;
+ }
+
+ // Calculate the width of each page object.
+ Size aTargetSize (0,0);
+ if (bCalculateWidth)
+ aTargetSize.setWidth(
+ (rWindowSize.Width() - mnLeftBorder - mnRightBorder
+ - (mnColumnCount-1) * mnHorizontalGap)
+ / mnColumnCount);
+ else if (bCalculateHeight)
+ aTargetSize.setHeight(
+ (rWindowSize.Height() - mnTopBorder - mnBottomBorder
+ - (mnRowCount-1) * mnVerticalGap)
+ / mnRowCount);
+
+ if (bCalculateWidth)
+ {
+ if (aTargetSize.Width() < maMinimalSize.Width())
+ aTargetSize.setWidth(maMinimalSize.Width());
+ else if (aTargetSize.Width() > maMaximalSize.Width())
+ aTargetSize.setWidth(maMaximalSize.Width());
+ }
+ else if (bCalculateHeight)
+ {
+ if (aTargetSize.Height() < maMinimalSize.Height())
+ aTargetSize.setHeight(maMinimalSize.Height());
+ else if (aTargetSize.Height() > maMaximalSize.Height())
+ aTargetSize.setHeight(maMaximalSize.Height());
+ }
+
+ return aTargetSize;
+}
+
+
+
+
+sal_Int32 Layouter::Implementation::GetIndex (
+ const sal_Int32 nRow,
+ const sal_Int32 nColumn,
+ const bool bClampToValidRange) const
+{
+ if (nRow >= 0 && nColumn >= 0)
+ {
+ const sal_Int32 nIndex (nRow * mnColumnCount + nColumn);
+ if (nIndex >= mnPageCount)
+ if (bClampToValidRange)
+ return mnPageCount-1;
+ else
+ return -1;
+ else
+ return nIndex;
+ }
+ else if (bClampToValidRange)
+ return 0;
+ else
+ return -1;
+}
+
+
+
+
+Rectangle Layouter::Implementation::GetPageObjectBox (
+ const sal_Int32 nIndex,
+ const bool bIncludeBorderAndGap) const
+{
+ const sal_Int32 nRow (nIndex / mnColumnCount);
+ const sal_Int32 nColumn (nIndex % mnColumnCount);
+
+ const Rectangle aBoundingBox (GetPageObjectBox(nRow,nColumn));
+ if (bIncludeBorderAndGap)
+ return AddBorderAndGap(aBoundingBox, nRow, nColumn);
+ else
+ return aBoundingBox;
+}
+
+
+
+
+Rectangle Layouter::Implementation::GetPageObjectBox (
+ const sal_Int32 nRow,
+ const sal_Int32 nColumn) const
+{
+ return Rectangle(
+ Point (mnLeftBorder
+ + nColumn * maPageObjectSize.Width()
+ + (nColumn>0 ? nColumn : 0) * mnHorizontalGap,
+ mnTopBorder
+ + nRow * maPageObjectSize.Height()
+ + (nRow>0 ? nRow : 0) * mnVerticalGap),
+ maPageObjectSize);
+}
+
+
+
+
+
+Rectangle Layouter::Implementation::AddBorderAndGap (
+ const Rectangle& rBoundingBox,
+ const sal_Int32 nRow,
+ const sal_Int32 nColumn) const
+{
+ Rectangle aBoundingBox (rBoundingBox);
+
+ if (nColumn == 0)
+ aBoundingBox.Left() = 0;
+ else
+ aBoundingBox.Left() -= mnHorizontalGap/2;
+ if (nColumn == mnColumnCount-1)
+ aBoundingBox.Right() += mnRightBorder;
+ else
+ aBoundingBox.Right() += mnHorizontalGap/2;
+ if (nRow == 0)
+ aBoundingBox.Top() = 0;
+ else
+ aBoundingBox.Top() -= mnVerticalGap/2;
+ if (nRow == mnRowCount-1)
+ aBoundingBox.Bottom() += mnBottomBorder;
+ else
+ aBoundingBox.Bottom() += mnVerticalGap/2;
+ return aBoundingBox;
+}
+
+
+
+
+Rectangle Layouter::Implementation::GetTotalBoundingBox (void) const
+{
+ sal_Int32 nHorizontalSize = 0;
+ sal_Int32 nVerticalSize = 0;
+ if (mnColumnCount > 0)
+ {
+ sal_Int32 nRowCount = (mnPageCount+mnColumnCount-1) / mnColumnCount;
+ nHorizontalSize =
+ mnLeftBorder
+ + mnRightBorder
+ + mnColumnCount * maPageObjectSize.Width();
+ if (mnColumnCount > 1)
+ nHorizontalSize += (mnColumnCount-1) * mnHorizontalGap;
+ nVerticalSize =
+ mnTopBorder
+ + mnBottomBorder
+ + nRowCount * maPageObjectSize.Height();
+ if (nRowCount > 1)
+ nVerticalSize += (nRowCount-1) * mnVerticalGap;
+ }
+
+ return Rectangle (
+ Point(0,0),
+ Size (nHorizontalSize, nVerticalSize)
+ );
+}
+
+
+
+
+void Layouter::Implementation::CalculateVerticalLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const
+{
+ const sal_Int32 nY = rModelPosition.Y() - mnTopBorder + maPageObjectSize.Height()/2;
+ const sal_Int32 nRowHeight (maPageObjectSize.Height() + mnVerticalGap);
+ const sal_Int32 nRow (::std::min(mnPageCount, nY / nRowHeight));
+ rPosition.SetLogicalPosition (
+ nRow,
+ 0,
+ nRow,
+ (nRow == 0),
+ (nRow == mnRowCount),
+ (nRow >= mnMaxRowCount));
+}
+
+
+
+
+//===== HorizontalImplementation ================================================
+
+HorizontalImplementation::HorizontalImplementation (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<view::Theme>& rpTheme)
+ : Implementation(rpWindow, rpTheme)
+{
+}
+
+
+
+
+HorizontalImplementation::HorizontalImplementation (const Implementation& rImplementation)
+ : Implementation(rImplementation)
+{
+}
+
+
+
+
+Layouter::Orientation HorizontalImplementation::GetOrientation (void) const
+{
+ return Layouter::HORIZONTAL;
+}
+
+
+
+
+void HorizontalImplementation::CalculateRowAndColumnCount (const Size& rWindowSize)
+{
+ (void)rWindowSize;
+
+ // Row and column count are fixed (for a given page count.)
+ mnColumnCount = mnPageCount;
+ mnRowCount = 1;
+}
+
+
+
+
+void HorizontalImplementation::CalculateMaxRowAndColumnCount (const Size& rWindowSize)
+{
+ mnMaxColumnCount = (rWindowSize.Width() - mnLeftBorder - mnRightBorder)
+ / (maPageObjectSize.Width() + mnHorizontalGap);
+ mnMaxRowCount = 1;
+}
+
+
+
+
+Size HorizontalImplementation::CalculateTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize) const
+{
+ return Implementation::GetTargetSize(rWindowSize, rPreviewModelSize, false, true);
+}
+
+
+
+
+void HorizontalImplementation::CalculateLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const
+{
+ const sal_Int32 nX = rModelPosition.X() - mnLeftBorder + maPageObjectSize.Width()/2;
+ const sal_Int32 nColumnWidth (maPageObjectSize.Width() + mnHorizontalGap);
+ const sal_Int32 nColumn (::std::min(mnPageCount, nX / nColumnWidth));
+ rPosition.SetLogicalPosition (
+ 0,
+ nColumn,
+ nColumn,
+ (nColumn == 0),
+ (nColumn == mnColumnCount),
+ (nColumn >= mnMaxColumnCount));
+}
+
+
+
+
+//===== VerticalImplementation ================================================
+
+VerticalImplementation::VerticalImplementation (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<view::Theme>& rpTheme)
+ : Implementation(rpWindow, rpTheme)
+{
+}
+
+
+
+
+VerticalImplementation::VerticalImplementation (const Implementation& rImplementation)
+ : Implementation(rImplementation)
+{
+}
+
+
+
+
+Layouter::Orientation VerticalImplementation::GetOrientation (void) const
+{
+ return Layouter::VERTICAL;
+}
+
+
+
+
+void VerticalImplementation::CalculateRowAndColumnCount (const Size& rWindowSize)
+{
+ (void)rWindowSize;
+
+ // Row and column count are fixed (for a given page count.)
+ mnRowCount = mnPageCount;
+ mnColumnCount = 1;
+
+}
+
+
+
+
+void VerticalImplementation::CalculateMaxRowAndColumnCount (const Size& rWindowSize)
+{
+ mnMaxRowCount = (rWindowSize.Height() - mnTopBorder - mnBottomBorder)
+ / (maPageObjectSize.Height() + mnVerticalGap);
+ mnMaxColumnCount = 1;
+}
+
+
+
+
+Size VerticalImplementation::CalculateTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize) const
+{
+ return Implementation::GetTargetSize(rWindowSize, rPreviewModelSize, true, false);
+}
+
+
+
+
+void VerticalImplementation::CalculateLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const
+{
+ return CalculateVerticalLogicalInsertPosition(rModelPosition, rPosition);
+}
+
+
+
+
+//===== GridImplementation ================================================
+
+GridImplementation::GridImplementation (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<view::Theme>& rpTheme)
+ : Implementation(rpWindow, rpTheme)
+{
+}
+
+
+
+
+GridImplementation::GridImplementation (const Implementation& rImplementation)
+ : Implementation(rImplementation)
+{
+}
+
+
+
+
+Layouter::Orientation GridImplementation::GetOrientation (void) const
+{
+ return Layouter::GRID;
+}
+
+
+
+
+void GridImplementation::CalculateRowAndColumnCount (const Size& rWindowSize)
+{
+ // Calculate the column count.
+ mnColumnCount
+ = (rWindowSize.Width() - mnRequestedLeftBorder - mnRequestedRightBorder)
+ / (maPreferredSize.Width() + mnHorizontalGap);
+ if (mnColumnCount < mnMinimalColumnCount)
+ mnColumnCount = mnMinimalColumnCount;
+ if (mnColumnCount > mnMaximalColumnCount)
+ mnColumnCount = mnMaximalColumnCount;
+ mnRowCount = (mnPageCount + mnColumnCount-1)/mnColumnCount;
+}
+
+
+
+
+void GridImplementation::CalculateMaxRowAndColumnCount (const Size& rWindowSize)
+{
+ mnMaxColumnCount = (rWindowSize.Width() - mnLeftBorder - mnRightBorder)
+ / (maPageObjectSize.Width() + mnHorizontalGap);
+ mnMaxRowCount = (rWindowSize.Height() - mnTopBorder - mnBottomBorder)
+ / (maPageObjectSize.Height() + mnVerticalGap);
+}
+
+
+
+
+
+Size GridImplementation::CalculateTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize) const
+{
+ return Implementation::GetTargetSize(rWindowSize, rPreviewModelSize, true, true);
+}
+
+
+
+
+void GridImplementation::CalculateLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const
+{
+ if (mnColumnCount == 1)
+ {
+ CalculateVerticalLogicalInsertPosition(rModelPosition, rPosition);
+ }
+ else
+ {
+ // Handle the general case of more than one column.
+ sal_Int32 nRow (::std::min(
+ mnRowCount-1,
+ GetRowAtPosition (rModelPosition.Y(), true, GM_BOTH)));
+ const sal_Int32 nX = rModelPosition.X() - mnLeftBorder + maPageObjectSize.Width()/2;
+ const sal_Int32 nColumnWidth (maPageObjectSize.Width() + mnHorizontalGap);
+ sal_Int32 nColumn (::std::min(mnColumnCount, nX / nColumnWidth));
+ sal_Int32 nIndex (nRow * mnColumnCount + nColumn);
+ bool bIsAtRunEnd (nColumn == mnColumnCount);
+
+ if (nIndex >= mnPageCount)
+ {
+ nIndex = mnPageCount;
+ nRow = mnRowCount-1;
+ nColumn = ::std::min(::std::min(mnPageCount, mnColumnCount), nColumn);
+ bIsAtRunEnd = true;
+ }
+
+ rPosition.SetLogicalPosition (
+ nRow,
+ nColumn,
+ nIndex,
+ (nColumn == 0),
+ bIsAtRunEnd,
+ (nColumn >= mnMaxColumnCount));
+ }
+}
+
+
+
+
+//===== InsertPosition ========================================================
+
+InsertPosition::InsertPosition (void)
+ : mnRow(-1),
+ mnColumn(-1),
+ mnIndex(-1),
+ mbIsAtRunStart(false),
+ mbIsAtRunEnd(false),
+ mbIsExtraSpaceNeeded(false),
+ maLocation(0,0),
+ maLeadingOffset(0,0),
+ maTrailingOffset(0,0)
+{
+}
+
+
+
+
+InsertPosition& InsertPosition::operator= (const InsertPosition& rInsertPosition)
+{
+ if (this != &rInsertPosition)
+ {
+ mnRow = rInsertPosition.mnRow;
+ mnColumn = rInsertPosition.mnColumn;
+ mnIndex = rInsertPosition.mnIndex;
+ mbIsAtRunStart = rInsertPosition.mbIsAtRunStart;
+ mbIsAtRunEnd = rInsertPosition.mbIsAtRunEnd;
+ mbIsExtraSpaceNeeded = rInsertPosition.mbIsExtraSpaceNeeded;
+ maLocation = rInsertPosition.maLocation;
+ maLeadingOffset = rInsertPosition.maLeadingOffset;
+ maTrailingOffset = rInsertPosition.maTrailingOffset;
+ }
+ return *this;
+}
+
+
+
+
+bool InsertPosition::operator== (const InsertPosition& rInsertPosition) const
+{
+ // Do not compare the geometrical information (maLocation).
+ return mnRow==rInsertPosition.mnRow
+ && mnColumn==rInsertPosition.mnColumn
+ && mnIndex==rInsertPosition.mnIndex
+ && mbIsAtRunStart==rInsertPosition.mbIsAtRunStart
+ && mbIsAtRunEnd==rInsertPosition.mbIsAtRunEnd
+ && mbIsExtraSpaceNeeded==rInsertPosition.mbIsExtraSpaceNeeded;
+}
+
+
+
+
+bool InsertPosition::operator!= (const InsertPosition& rInsertPosition) const
+{
+ return !operator==(rInsertPosition);
+}
+
+
+
+
+void InsertPosition::SetLogicalPosition (
+ const sal_Int32 nRow,
+ const sal_Int32 nColumn,
+ const sal_Int32 nIndex,
+ const bool bIsAtRunStart,
+ const bool bIsAtRunEnd,
+ const bool bIsExtraSpaceNeeded)
+{
+ mnRow = nRow;
+ mnColumn = nColumn;
+ mnIndex = nIndex;
+ mbIsAtRunStart = bIsAtRunStart;
+ mbIsAtRunEnd = bIsAtRunEnd;
+ mbIsExtraSpaceNeeded = bIsExtraSpaceNeeded;
+}
+
+
+
+
+void InsertPosition::SetGeometricalPosition(
+ const Point aLocation,
+ const Point aLeadingOffset,
+ const Point aTrailingOffset)
+{
+ maLocation = aLocation;
+ maLeadingOffset = aLeadingOffset;
+ maTrailingOffset = aTrailingOffset;
+}
+
+
+
} } } // end of namespace ::sd::slidesorter::namespace
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
new file mode 100644
index 000000000000..d798fa27accb
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
@@ -0,0 +1,287 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "view/SlsPageObjectLayouter.hxx"
+
+#include "model/SlsPageDescriptor.hxx"
+#include "view/SlsFontProvider.hxx"
+#include "view/SlsTheme.hxx"
+#include "tools/IconCache.hxx"
+#include "Window.hxx"
+#include "res_bmp.hrc"
+
+namespace sd { namespace slidesorter { namespace view {
+
+namespace {
+const static sal_Int32 gnLeftPageNumberOffset = 2;
+const static sal_Int32 gnRightPageNumberOffset = 5;
+const static sal_Int32 gnOuterBorderWidth = 5;
+const static sal_Int32 gnInfoAreaMinWidth = 26;
+}
+
+PageObjectLayouter::PageObjectLayouter (
+ const ::boost::shared_ptr<Theme>& rpTheme,
+ const Size& rPageObjectWindowSize,
+ const Size& rPageSize,
+ const SharedSdWindow& rpWindow,
+ const sal_Int32 nPageCount)
+ : mpWindow(rpWindow),
+ maPageObjectSize(rPageObjectWindowSize.Width(), rPageObjectWindowSize.Height()),
+ mnModelToWindowScale(1),
+ maPageObjectBoundingBox(),
+ maPageNumberAreaBoundingBox(),
+ maPreviewBoundingBox(),
+ maTransitionEffectBoundingBox(),
+ maTransitionEffectIcon(IconCache::Instance().GetIcon(BMP_FADE_EFFECT_INDICATOR)),
+ mpPageNumberFont(Theme::GetFont(Theme::Font_PageNumber, *rpWindow))
+{
+ const Size aPageNumberAreaSize (GetPageNumberAreaSize(nPageCount));
+
+ const int nMaximumBorderWidth (gnOuterBorderWidth);
+ const int nFocusIndicatorWidth (rpTheme->GetIntegerValue(Theme::Integer_FocusIndicatorWidth));
+
+ maPreviewBoundingBox = CalculatePreviewBoundingBox(
+ maPageObjectSize,
+ Size(rPageSize.Width(), rPageSize.Height()),
+ aPageNumberAreaSize.Width(),
+ nFocusIndicatorWidth);
+ maFocusIndicatorBoundingBox = Rectangle(Point(0,0), maPageObjectSize);
+ maPageObjectBoundingBox = Rectangle(
+ Point(
+ nFocusIndicatorWidth,
+ nFocusIndicatorWidth),
+ Size(
+ maPageObjectSize.Width()-2*nFocusIndicatorWidth,
+ maPageObjectSize.Height()-2*nFocusIndicatorWidth));
+
+ maPageNumberAreaBoundingBox = Rectangle(
+ Point(
+ std::max(gnLeftPageNumberOffset,
+ sal_Int32(maPreviewBoundingBox.Left()
+ - gnRightPageNumberOffset
+ - aPageNumberAreaSize.Width())),
+ nMaximumBorderWidth),
+ aPageNumberAreaSize);
+
+ const Size aIconSize (maTransitionEffectIcon.GetSizePixel());
+ maTransitionEffectBoundingBox = Rectangle(
+ Point(
+ (maPreviewBoundingBox.Left() - aIconSize.Width()) / 2,
+ maPreviewBoundingBox.Bottom() - aIconSize.Height()),
+ aIconSize);
+}
+
+
+
+
+PageObjectLayouter::~PageObjectLayouter(void)
+{
+}
+
+
+
+
+Rectangle PageObjectLayouter::CalculatePreviewBoundingBox (
+ Size& rPageObjectSize,
+ const Size& rPageSize,
+ const sal_Int32 nPageNumberAreaWidth,
+ const sal_Int32 nFocusIndicatorWidth)
+{
+ const sal_Int32 nIconWidth (maTransitionEffectIcon.GetSizePixel().Width());
+ const sal_Int32 nLeftAreaWidth (
+ ::std::max(
+ gnInfoAreaMinWidth,
+ gnRightPageNumberOffset
+ + ::std::max(
+ nPageNumberAreaWidth,
+ nIconWidth)));
+ sal_Int32 nPreviewWidth;
+ sal_Int32 nPreviewHeight;
+ const double nPageAspectRatio (double(rPageSize.Width()) / double(rPageSize.Height()));
+ if (rPageObjectSize.Height() == 0)
+ {
+ // Calculate height so that the preview fills the available
+ // horizontal space completely while observing the aspect ratio of
+ // the preview.
+ nPreviewWidth = rPageObjectSize.Width()
+ - nLeftAreaWidth - gnOuterBorderWidth - 2*nFocusIndicatorWidth - 1;
+ nPreviewHeight = ::basegfx::fround(nPreviewWidth / nPageAspectRatio);
+ rPageObjectSize.setHeight(nPreviewHeight + 2*gnOuterBorderWidth + 2*nFocusIndicatorWidth + 1);
+ }
+ else if (rPageObjectSize.Width() == 0)
+ {
+ // Calculate the width of the page object so that the preview fills
+ // the available vertical space completely while observing the
+ // aspect ratio of the preview.
+ nPreviewHeight = rPageObjectSize.Height() - 2*gnOuterBorderWidth - 2*nFocusIndicatorWidth - 1;
+ nPreviewWidth = ::basegfx::fround(nPreviewHeight * nPageAspectRatio);
+ rPageObjectSize.setWidth(nPreviewWidth
+ + nLeftAreaWidth + gnOuterBorderWidth + 2*nFocusIndicatorWidth + 1);
+
+ }
+ else
+ {
+ // The size of the page object is given. Calculate the size of the
+ // preview.
+ nPreviewWidth = rPageObjectSize.Width()
+ - nLeftAreaWidth - gnOuterBorderWidth - 2*nFocusIndicatorWidth - 1;
+ nPreviewHeight = rPageObjectSize.Height()
+ - gnOuterBorderWidth - 2*nFocusIndicatorWidth - 1;
+ if (double(nPreviewWidth)/double(nPreviewHeight) > nPageAspectRatio)
+ nPreviewWidth = ::basegfx::fround(nPreviewHeight * nPageAspectRatio);
+ else
+ nPreviewHeight = ::basegfx::fround(nPreviewWidth / nPageAspectRatio);
+ }
+ // When the preview does not fill the available space completely then
+ // place it flush right and vertically centered.
+ const int nLeft (rPageObjectSize.Width()
+ - gnOuterBorderWidth - nPreviewWidth - nFocusIndicatorWidth - 1);
+ const int nTop ((rPageObjectSize.Height() - nPreviewHeight)/2);
+ return Rectangle(
+ nLeft,
+ nTop,
+ nLeft + nPreviewWidth,
+ nTop + nPreviewHeight);
+}
+
+
+
+
+Rectangle PageObjectLayouter::GetBoundingBox (
+ const model::SharedPageDescriptor& rpPageDescriptor,
+ const Part ePart,
+ const CoordinateSystem eCoordinateSystem)
+{
+ OSL_ASSERT(rpPageDescriptor);
+ Point aLocation (rpPageDescriptor ? rpPageDescriptor->GetLocation() : Point(0,0));
+ return GetBoundingBox(aLocation, ePart, eCoordinateSystem);
+}
+
+
+
+
+Rectangle PageObjectLayouter::GetBoundingBox (
+ const Point& rPageObjectLocation,
+ const Part ePart,
+ const CoordinateSystem eCoordinateSystem)
+{
+ Rectangle aBoundingBox;
+ switch (ePart)
+ {
+ case FocusIndicator:
+ aBoundingBox = maFocusIndicatorBoundingBox;
+ break;
+
+ case PageObject:
+ case MouseOverIndicator:
+ aBoundingBox = maPageObjectBoundingBox;
+ break;
+
+ case Preview:
+ aBoundingBox = maPreviewBoundingBox;
+ break;
+
+ case PageNumber:
+ aBoundingBox = maPageNumberAreaBoundingBox;
+ break;
+
+ case Name:
+ aBoundingBox = maPageNumberAreaBoundingBox;
+ break;
+
+ case TransitionEffectIndicator:
+ aBoundingBox = maTransitionEffectBoundingBox;
+ break;
+ }
+
+ // Adapt coordinates to the requested coordinate system.
+ Point aLocation (rPageObjectLocation);
+ if (eCoordinateSystem == WindowCoordinateSystem)
+ aLocation += mpWindow->GetMapMode().GetOrigin();
+
+ return Rectangle(
+ aBoundingBox.TopLeft() + aLocation,
+ aBoundingBox.BottomRight() + aLocation);
+}
+
+
+
+
+Size PageObjectLayouter::GetSize (
+ const Part ePart,
+ const CoordinateSystem eCoordinateSystem)
+{
+ return GetBoundingBox(Point(0,0), ePart, eCoordinateSystem).GetSize();
+}
+
+
+
+
+Size PageObjectLayouter::GetPageNumberAreaSize (const int nPageCount)
+{
+ OSL_ASSERT(mpWindow);
+
+ // Set the correct font.
+ Font aOriginalFont (mpWindow->GetFont());
+ if (mpPageNumberFont)
+ mpWindow->SetFont(*mpPageNumberFont);
+
+ String sPageNumberTemplate;
+ if (nPageCount < 10)
+ sPageNumberTemplate = String::CreateFromAscii("9");
+ else if (nPageCount < 100)
+ sPageNumberTemplate = String::CreateFromAscii("99");
+ else if (nPageCount < 200)
+ // Just for the case that 1 is narrower than 9.
+ sPageNumberTemplate = String::CreateFromAscii("199");
+ else if (nPageCount < 1000)
+ sPageNumberTemplate = String::CreateFromAscii("999");
+ else
+ sPageNumberTemplate = String::CreateFromAscii("9999");
+ // More then 9999 pages are not handled.
+
+ const Size aSize (
+ mpWindow->GetTextWidth(sPageNumberTemplate),
+ mpWindow->GetTextHeight());
+
+ mpWindow->SetFont(aOriginalFont);
+
+ return aSize;
+}
+
+
+
+
+Image PageObjectLayouter::GetTransitionEffectIcon (void) const
+{
+ return maTransitionEffectIcon;
+}
+
+
+} } } // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
new file mode 100644
index 000000000000..8d5b1cfbcdc8
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
@@ -0,0 +1,580 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "view/SlsPageObjectPainter.hxx"
+
+#include "model/SlsPageDescriptor.hxx"
+#include "view/SlideSorterView.hxx"
+#include "view/SlsPageObjectLayouter.hxx"
+#include "view/SlsLayouter.hxx"
+#include "view/SlsTheme.hxx"
+#include "view/SlsButtonBar.hxx"
+#include "SlsFramePainter.hxx"
+#include "cache/SlsPageCache.hxx"
+#include "controller/SlsProperties.hxx"
+#include "Window.hxx"
+#include "sdpage.hxx"
+#include "sdresid.hxx"
+#include <vcl/svapp.hxx>
+#include <vcl/vclenum.hxx>
+#include <vcl/virdev.hxx>
+#include <boost/scoped_ptr.hpp>
+
+using namespace ::drawinglayer::primitive2d;
+
+namespace sd { namespace slidesorter { namespace view {
+
+namespace {
+
+UINT8 Blend (
+ const UINT8 nValue1,
+ const UINT8 nValue2,
+ const double nWeight)
+{
+ const double nValue (nValue1*(1-nWeight) + nValue2 * nWeight);
+ if (nValue < 0)
+ return 0;
+ else if (nValue > 255)
+ return 255;
+ else
+ return (UINT8)nValue;
+}
+
+sal_uInt8 ClampColorChannel (const double nValue)
+{
+ if (nValue <= 0)
+ return 0;
+ else if (nValue >= 255)
+ return 255;
+ else
+ return sal_uInt8(nValue);
+}
+
+sal_uInt8 CalculateColorChannel(
+ const double nColor1,
+ const double nColor2,
+ const double nAlpha1,
+ const double nAlpha2,
+ const double nAlpha0)
+{
+ if (nAlpha0 == 0)
+ return 0;
+
+ const double nColor0 ((nAlpha1*nColor1 + nAlpha1*nAlpha2*nColor1 + nAlpha2*nColor2) / nAlpha0);
+ return ClampColorChannel(255 * nColor0);
+}
+
+} // end of anonymous namespace
+
+
+
+
+//===== PageObjectPainter =====================================================
+
+PageObjectPainter::PageObjectPainter (
+ const SlideSorter& rSlideSorter)
+ : mrLayouter(rSlideSorter.GetView().GetLayouter()),
+ mpPageObjectLayouter(),
+ mpCache(rSlideSorter.GetView().GetPreviewCache()),
+ mpProperties(rSlideSorter.GetProperties()),
+ mpTheme(rSlideSorter.GetTheme()),
+ mpPageNumberFont(Theme::GetFont(Theme::Font_PageNumber, *rSlideSorter.GetContentWindow())),
+ mpShadowPainter(new FramePainter(mpTheme->GetIcon(Theme::Icon_RawShadow))),
+ mpFocusBorderPainter(new FramePainter(mpTheme->GetIcon(Theme::Icon_FocusBorder))),
+ maNormalBackground(),
+ maSelectionBackground(),
+ maFocusedSelectionBackground(),
+ maMouseOverBackground(),
+ maMouseOverFocusedBackground(),
+ msUnhideString(mpTheme->GetString(Theme::String_Unhide)),
+ mrButtonBar(rSlideSorter.GetView().GetButtonBar())
+{
+ // Replace the color (not the alpha values) in the focus border with a
+ // color derived from the current selection color.
+ Color aColor (mpTheme->GetColor(Theme::Color_Selection));
+ USHORT nHue, nSat, nBri;
+ aColor.RGBtoHSB(nHue, nSat, nBri);
+ aColor = Color::HSBtoRGB(nHue, 28, 65);
+ mpFocusBorderPainter->AdaptColor(aColor, true);
+}
+
+
+
+
+PageObjectPainter::~PageObjectPainter (void)
+{
+}
+
+
+
+
+void PageObjectPainter::PaintPageObject (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor)
+{
+ // The page object layouter is quite volatile. It may have been replaced
+ // since the last call. Update it now.
+ mpPageObjectLayouter = mrLayouter.GetPageObjectLayouter();
+ if ( ! mpPageObjectLayouter)
+ {
+ OSL_ASSERT(mpPageObjectLayouter);
+ return;
+ }
+
+ // Turn off antialiasing to avoid the bitmaps from being shifted by
+ // fractions of a pixel and thus show blurry edges.
+ const USHORT nSavedAntialiasingMode (rDevice.GetAntialiasing());
+ rDevice.SetAntialiasing(nSavedAntialiasingMode & ~ANTIALIASING_ENABLE_B2DDRAW);
+
+ PaintBackground(rDevice, rpDescriptor);
+ PaintPreview(rDevice, rpDescriptor);
+ PaintPageNumber(rDevice, rpDescriptor);
+ PaintTransitionEffect(rDevice, rpDescriptor);
+ mrButtonBar.Paint(rDevice, rpDescriptor);
+
+ rDevice.SetAntialiasing(nSavedAntialiasingMode);
+}
+
+
+
+
+void PageObjectPainter::NotifyResize (const bool bForce)
+{
+ (void)bForce;
+ maNormalBackground.SetEmpty();
+ maSelectionBackground.SetEmpty();
+ maFocusedSelectionBackground.SetEmpty();
+ maFocusedBackground.SetEmpty();
+ maMouseOverBackground.SetEmpty();
+ maMouseOverFocusedBackground.SetEmpty();
+ maMouseOverSelectedAndFocusedBackground.SetEmpty();
+}
+
+
+
+
+void PageObjectPainter::SetTheme (const ::boost::shared_ptr<view::Theme>& rpTheme)
+{
+ mpTheme = rpTheme;
+ NotifyResize(true);
+}
+
+
+
+
+void PageObjectPainter::PaintBackground (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor)
+{
+ const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
+ rpDescriptor,
+ PageObjectLayouter::FocusIndicator,
+ PageObjectLayouter::ModelCoordinateSystem));
+
+ const Bitmap& rBackground (GetBackgroundForState(rpDescriptor, rDevice));
+ rDevice.DrawBitmap(aBox.TopLeft(), rBackground);
+
+ // Fill the interior of the preview area with the default background
+ // color of the page.
+ SdPage* pPage = rpDescriptor->GetPage();
+ if (pPage != NULL)
+ {
+ rDevice.SetFillColor(pPage->GetPageBackgroundColor(NULL));
+ rDevice.SetLineColor(pPage->GetPageBackgroundColor(NULL));
+ const Rectangle aPreviewBox (mpPageObjectLayouter->GetBoundingBox(
+ rpDescriptor,
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::ModelCoordinateSystem));
+ rDevice.DrawRect(aPreviewBox);
+ }
+}
+
+
+
+
+void PageObjectPainter::PaintPreview (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor) const
+{
+ const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
+ rpDescriptor,
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::ModelCoordinateSystem));
+
+ if (mpCache != NULL)
+ {
+ const SdrPage* pPage = rpDescriptor->GetPage();
+ mpCache->SetPreciousFlag(pPage, true);
+
+ const Bitmap aPreview (GetPreviewBitmap(rpDescriptor, &rDevice));
+ if ( ! aPreview.IsEmpty())
+ if (aPreview.GetSizePixel() != aBox.GetSize())
+ rDevice.DrawBitmap(aBox.TopLeft(), aBox.GetSize(), aPreview);
+ else
+ rDevice.DrawBitmap(aBox.TopLeft(), aPreview);
+ }
+}
+
+
+
+
+Bitmap PageObjectPainter::CreateMarkedPreview (
+ const Size& rSize,
+ const Bitmap& rPreview,
+ const BitmapEx& rOverlay,
+ const OutputDevice* pReferenceDevice) const
+{
+ ::boost::scoped_ptr<VirtualDevice> pDevice;
+ if (pReferenceDevice != NULL)
+ pDevice.reset(new VirtualDevice(*pReferenceDevice));
+ else
+ pDevice.reset(new VirtualDevice());
+ pDevice->SetOutputSizePixel(rSize);
+
+ pDevice->DrawBitmap(Point(0,0), rSize, rPreview);
+
+ // Paint bitmap tiled over the preview to mark it as excluded.
+ const sal_Int32 nIconWidth (rOverlay.GetSizePixel().Width());
+ const sal_Int32 nIconHeight (rOverlay.GetSizePixel().Height());
+ if (nIconWidth>0 && nIconHeight>0)
+ {
+ for (sal_Int32 nX=0; nX<rSize.Width(); nX+=nIconWidth)
+ for (sal_Int32 nY=0; nY<rSize.Height(); nY+=nIconHeight)
+ pDevice->DrawBitmapEx(Point(nX,nY), rOverlay);
+ }
+ return pDevice->GetBitmap(Point(0,0), rSize);
+}
+
+
+
+
+Bitmap PageObjectPainter::GetPreviewBitmap (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const OutputDevice* pReferenceDevice) const
+{
+ const SdrPage* pPage = rpDescriptor->GetPage();
+ const bool bIsExcluded (rpDescriptor->HasState(model::PageDescriptor::ST_Excluded));
+
+ if (bIsExcluded)
+ {
+ Bitmap aMarkedPreview (mpCache->GetMarkedPreviewBitmap(pPage,false));
+ const Rectangle aPreviewBox (mpPageObjectLayouter->GetBoundingBox(
+ rpDescriptor,
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::ModelCoordinateSystem));
+ if (aMarkedPreview.IsEmpty() || aMarkedPreview.GetSizePixel()!=aPreviewBox.GetSize())
+ {
+ aMarkedPreview = CreateMarkedPreview(
+ aPreviewBox.GetSize(),
+ mpCache->GetPreviewBitmap(pPage,true),
+ mpTheme->GetIcon(Theme::Icon_HideSlideOverlay),
+ pReferenceDevice);
+ mpCache->SetMarkedPreviewBitmap(pPage, aMarkedPreview);
+ }
+ return aMarkedPreview;
+ }
+ else
+ {
+ return mpCache->GetPreviewBitmap(pPage,false);
+ }
+}
+
+
+
+
+void PageObjectPainter::PaintPageNumber (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor) const
+{
+ const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
+ rpDescriptor,
+ PageObjectLayouter::PageNumber,
+ PageObjectLayouter::ModelCoordinateSystem));
+
+ // Determine the color of the page number.
+ Color aPageNumberColor (mpTheme->GetColor(Theme::Color_PageNumberDefault));
+ if (rpDescriptor->HasState(model::PageDescriptor::ST_MouseOver) ||
+ rpDescriptor->HasState(model::PageDescriptor::ST_Selected))
+ {
+ // Page number is painted on background for hover or selection or
+ // both. Each of these background colors has a predefined luminance
+ // which is compatible with the PageNumberHover color.
+ aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberHover));
+ }
+ else
+ {
+ const Color aBackgroundColor (mpTheme->GetColor(Theme::Color_Background));
+ const sal_Int32 nBackgroundLuminance (aBackgroundColor.GetLuminance());
+ // When the background color is black then this is interpreted as
+ // high contrast mode and the font color is set to white.
+ if (nBackgroundLuminance == 0)
+ aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberHighContrast));
+ else
+ {
+ // Compare luminance of default page number color and background
+ // color. When the two are similar then use a darker
+ // (preferred) or brighter font color.
+ const sal_Int32 nFontLuminance (aPageNumberColor.GetLuminance());
+ if (abs(nBackgroundLuminance - nFontLuminance) < 60)
+ if (nBackgroundLuminance > nFontLuminance-30)
+ aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberBrightBackground));
+ else
+ aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberDarkBackground));
+ }
+ }
+
+ // Paint the page number.
+ OSL_ASSERT(rpDescriptor->GetPage()!=NULL);
+ const sal_Int32 nPageNumber ((rpDescriptor->GetPage()->GetPageNum() - 1) / 2 + 1);
+ const String sPageNumber (String::CreateFromInt32(nPageNumber));
+ rDevice.SetFont(*mpPageNumberFont);
+ rDevice.SetTextColor(aPageNumberColor);
+ rDevice.DrawText(aBox, sPageNumber, TEXT_DRAW_RIGHT | TEXT_DRAW_VCENTER);
+}
+
+
+
+
+void PageObjectPainter::PaintTransitionEffect (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor) const
+{
+ const SdPage* pPage = rpDescriptor->GetPage();
+ if (pPage!=NULL && pPage->getTransitionType() > 0)
+ {
+ const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
+ rpDescriptor,
+ PageObjectLayouter::TransitionEffectIndicator,
+ PageObjectLayouter::ModelCoordinateSystem));
+
+ rDevice.DrawBitmapEx(
+ aBox.TopLeft(),
+ mpPageObjectLayouter->GetTransitionEffectIcon().GetBitmapEx());
+ }
+}
+
+
+
+
+Bitmap& PageObjectPainter::GetBackgroundForState (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const OutputDevice& rReferenceDevice)
+{
+ enum State { None = 0x00, Selected = 0x01, MouseOver = 0x02, Focused = 0x04 };
+ const State eState (State(
+ (rpDescriptor->HasState(model::PageDescriptor::ST_Selected) ? Selected : None)
+ | (rpDescriptor->HasState(model::PageDescriptor::ST_MouseOver) ? MouseOver : None)
+ | (rpDescriptor->HasState(model::PageDescriptor::ST_Focused) ? Focused : None)));
+
+ switch (eState)
+ {
+ case MouseOver | Selected | Focused:
+ return GetBackground(
+ maMouseOverSelectedAndFocusedBackground,
+ Theme::Gradient_MouseOverSelectedAndFocusedPage,
+ rReferenceDevice,
+ true);
+
+ case MouseOver | Selected:
+ case MouseOver:
+ return GetBackground(
+ maMouseOverBackground,
+ Theme::Gradient_MouseOverPage,
+ rReferenceDevice,
+ false);
+
+ case MouseOver | Focused:
+ return GetBackground(
+ maMouseOverFocusedBackground,
+ Theme::Gradient_MouseOverPage,
+ rReferenceDevice,
+ true);
+
+ case Selected | Focused:
+ return GetBackground(
+ maFocusedSelectionBackground,
+ Theme::Gradient_SelectedAndFocusedPage,
+ rReferenceDevice,
+ true);
+
+ case Selected:
+ return GetBackground(
+ maSelectionBackground,
+ Theme::Gradient_SelectedPage,
+ rReferenceDevice,
+ false);
+
+ case Focused:
+ return GetBackground(
+ maFocusedBackground,
+ Theme::Gradient_FocusedPage,
+ rReferenceDevice,
+ true);
+
+ case None:
+ default:
+ return GetBackground(
+ maNormalBackground,
+ Theme::Gradient_NormalPage,
+ rReferenceDevice,
+ false);
+ }
+}
+
+
+
+
+Bitmap& PageObjectPainter::GetBackground(
+ Bitmap& rBackground,
+ Theme::GradientColorType eType,
+ const OutputDevice& rReferenceDevice,
+ const bool bHasFocusBorder)
+{
+ if (rBackground.IsEmpty())
+ rBackground = CreateBackgroundBitmap(rReferenceDevice, eType, bHasFocusBorder);
+ return rBackground;
+}
+
+
+
+
+Bitmap PageObjectPainter::CreateBackgroundBitmap(
+ const OutputDevice& rReferenceDevice,
+ const Theme::GradientColorType eColorType,
+ const bool bHasFocusBorder) const
+{
+ const Size aSize (mpPageObjectLayouter->GetSize(
+ PageObjectLayouter::FocusIndicator,
+ PageObjectLayouter::WindowCoordinateSystem));
+ const Rectangle aPageObjectBox (mpPageObjectLayouter->GetBoundingBox(
+ Point(0,0),
+ PageObjectLayouter::PageObject,
+ PageObjectLayouter::ModelCoordinateSystem));
+ VirtualDevice aBitmapDevice (rReferenceDevice);
+ aBitmapDevice.SetOutputSizePixel(aSize);
+
+ // Fill the background with the background color of the slide sorter.
+ const Color aBackgroundColor (mpTheme->GetColor(Theme::Color_Background));
+ OSL_TRACE("filling background of page object bitmap with color %x", aBackgroundColor.GetColor());
+ aBitmapDevice.SetFillColor(aBackgroundColor);
+ aBitmapDevice.SetLineColor(aBackgroundColor);
+ aBitmapDevice.DrawRect(Rectangle(Point(0,0), aSize));
+
+ // Paint the slide area with a linear gradient that starts some pixels
+ // below the top and ends some pixels above the bottom.
+ const Color aTopColor(mpTheme->GetGradientColor(eColorType, Theme::Fill1));
+ const Color aBottomColor(mpTheme->GetGradientColor(eColorType, Theme::Fill2));
+ if (aTopColor != aBottomColor)
+ {
+ const sal_Int32 nHeight (aPageObjectBox.GetHeight());
+ const sal_Int32 nDefaultConstantSize(nHeight/4);
+ const sal_Int32 nMinimalGradientSize(40);
+ const sal_Int32 nY1 (
+ ::std::max<sal_Int32>(
+ 0,
+ ::std::min<sal_Int32>(
+ nDefaultConstantSize,
+ (nHeight - nMinimalGradientSize)/2)));
+ const sal_Int32 nY2 (nHeight-nY1);
+ const sal_Int32 nTop (aPageObjectBox.Top());
+ for (sal_Int32 nY=0; nY<nHeight; ++nY)
+ {
+ if (nY<=nY1)
+ aBitmapDevice.SetLineColor(aTopColor);
+ else if (nY>=nY2)
+ aBitmapDevice.SetLineColor(aBottomColor);
+ else
+ {
+ Color aColor (aTopColor);
+ aColor.Merge(aBottomColor, 255 * (nY2-nY) / (nY2-nY1));
+ aBitmapDevice.SetLineColor(aColor);
+ }
+ aBitmapDevice.DrawLine(
+ Point(aPageObjectBox.Left(), nY+nTop),
+ Point(aPageObjectBox.Right(), nY+nTop));
+ }
+ }
+ else
+ {
+ aBitmapDevice.SetFillColor(aTopColor);
+ aBitmapDevice.DrawRect(aPageObjectBox);
+ }
+
+ // Paint the simple border and, for some backgrounds, the focus border.
+ if (bHasFocusBorder)
+ mpFocusBorderPainter->PaintFrame(aBitmapDevice, aPageObjectBox);
+ else
+ PaintBorder(aBitmapDevice, eColorType, aPageObjectBox);
+
+ // Get bounding box of the preview around which a shadow is painted.
+ // Compensate for the border around the preview.
+ const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
+ Point(0,0),
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::ModelCoordinateSystem));
+ Rectangle aFrameBox (aBox.Left()-1,aBox.Top()-1,aBox.Right()+1,aBox.Bottom()+1);
+ mpShadowPainter->PaintFrame(aBitmapDevice, aFrameBox);
+
+ return aBitmapDevice.GetBitmap (Point(0,0),aSize);
+}
+
+
+
+
+void PageObjectPainter::PaintBorder (
+ OutputDevice& rDevice,
+ const Theme::GradientColorType eColorType,
+ const Rectangle& rBox) const
+{
+ rDevice.SetFillColor();
+ const sal_Int32 nBorderWidth (1);
+ for (int nIndex=0; nIndex<nBorderWidth; ++nIndex)
+ {
+ const int nDelta (nIndex);
+ rDevice.SetLineColor(mpTheme->GetGradientColor(eColorType, Theme::Border2));
+ rDevice.DrawLine(
+ Point(rBox.Left()-nDelta, rBox.Top()-nDelta),
+ Point(rBox.Left()-nDelta, rBox.Bottom()+nDelta));
+ rDevice.DrawLine(
+ Point(rBox.Left()-nDelta, rBox.Bottom()+nDelta),
+ Point(rBox.Right()+nDelta, rBox.Bottom()+nDelta));
+ rDevice.DrawLine(
+ Point(rBox.Right()+nDelta, rBox.Bottom()+nDelta),
+ Point(rBox.Right()+nDelta, rBox.Top()-nDelta));
+
+ rDevice.SetLineColor(mpTheme->GetGradientColor(eColorType, Theme::Border1));
+ rDevice.DrawLine(
+ Point(rBox.Left()-nDelta, rBox.Top()-nDelta),
+ Point(rBox.Right()+nDelta, rBox.Top()-nDelta));
+ }
+}
+
+
+
+} } } // end of namespace sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx
deleted file mode 100755
index 303e78eeff61..000000000000
--- a/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "precompiled_sd.hxx"
-
-#include "view/SlsPageObjectViewContact.hxx"
-
-#include "model/SlsPageDescriptor.hxx"
-#include "controller/SlsPageObjectFactory.hxx"
-
-#include <svx/svdopage.hxx>
-#include <tools/debug.hxx>
-
-#include <basegfx/polygon/b2dpolygontools.hxx>
-#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
-
-using namespace ::sdr::contact;
-
-namespace sd { namespace slidesorter { namespace view {
-
-
-PageObjectViewContact::PageObjectViewContact (
- SdrPageObj& rPageObj,
- const model::SharedPageDescriptor& rpDescriptor)
- : ViewContactOfPageObj (rPageObj),
- mbInDestructor(false),
- mpDescriptor(rpDescriptor)
-{
-}
-
-PageObjectViewContact::~PageObjectViewContact (void)
-{
- // remember that this instance is in destruction
- mbInDestructor = true;
-}
-
-
-
-ViewObjectContact&
- PageObjectViewContact::CreateObjectSpecificViewObjectContact(
- ObjectContact& rObjectContact)
-{
- OSL_ASSERT(mpDescriptor.get()!=NULL);
-
- ViewObjectContact* pResult
- = mpDescriptor->GetPageObjectFactory().CreateViewObjectContact (
- rObjectContact,
- *this);
- DBG_ASSERT (pResult!=NULL,
- "PageObjectViewContact::CreateObjectSpecificViewObjectContact() was not able to create object.");
- return *pResult;
-}
-
-const SdrPage* PageObjectViewContact::GetPage (void) const
-{
- // when this instance itself is in destruction, do no longer
- // provide the referenced page to VOC childs of this OC. This
- // happens e.g. in destructor which destroys all child-VOCs which
- // may in their implementation still reference their VC from
- // their own destructor
- if (!mbInDestructor)
- return GetReferencedPage();
- else
- return NULL;
-}
-
-void PageObjectViewContact::ActionChanged (void)
-{
- ViewContactOfPageObj::ActionChanged();
-}
-
-SdrPageObj& PageObjectViewContact::GetPageObject (void) const
-{
- return ViewContactOfPageObj::GetPageObj();
-}
-
-drawinglayer::primitive2d::Primitive2DSequence PageObjectViewContact::createViewIndependentPrimitive2DSequence() const
-{
- // ceate graphical visualisation data. Since this is the view-independent version which should not be used,
- // create a replacement graphic visualisation here. Use GetLastBoundRect to access the model data directly
- // which is aOutRect for SdrPageObj.
- OSL_ASSERT(mpDescriptor.get()!=NULL);
- Rectangle aModelRectangle(GetPageObj().GetLastBoundRect());
- const SvBorder aBorder(mpDescriptor->GetModelBorder());
-
- aModelRectangle.Left() -= aBorder.Left();
- aModelRectangle.Right() += aBorder.Right();
- aModelRectangle.Top() -= aBorder.Top();
- aModelRectangle.Bottom() += aBorder.Bottom();
-
- const basegfx::B2DRange aModelRange(aModelRectangle.Left(), aModelRectangle.Top(), aModelRectangle.Right(), aModelRectangle.Bottom());
- const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aModelRange));
- const basegfx::BColor aYellow(1.0, 1.0, 0.0);
- const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow));
-
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
-}
-
-} } } // end of namespace ::sd::slidesorter::view
-
-// eof
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx
deleted file mode 100755
index b1e4e80fdf1f..000000000000
--- a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx
+++ /dev/null
@@ -1,1403 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "precompiled_sd.hxx"
-
-#include "view/SlsPageObjectViewObjectContact.hxx"
-
-#include "controller/SlsProperties.hxx"
-#include "view/SlideSorterView.hxx"
-#include "view/SlsPageObjectViewContact.hxx"
-#include "view/SlsPageObject.hxx"
-#include "view/SlsFontProvider.hxx"
-#include "model/SlsPageDescriptor.hxx"
-#include "cache/SlsPageCache.hxx"
-#include "cache/SlsPageCacheManager.hxx"
-#include "res_bmp.hrc"
-#include "tools/IconCache.hxx"
-#include "PreviewRenderer.hxx"
-
-#include "sdpage.hxx"
-#include "sdresid.hxx"
-#include "glob.hrc"
-#include "drawdoc.hxx"
-#include <svx/sdr/contact/displayinfo.hxx>
-#include <svx/sdr/contact/viewcontact.hxx>
-#include <svx/svdopage.hxx>
-#include <svx/svdpagv.hxx>
-#include <svx/xlndsit.hxx>
-#include <svx/xlnclit.hxx>
-#include <svx/svdoutl.hxx>
-#include <svx/sdrpagewindow.hxx>
-#include <vcl/bitmap.hxx>
-#include <vcl/outdev.hxx>
-#include <vcl/virdev.hxx>
-#include <vcl/lineinfo.hxx>
-#include <tools/color.hxx>
-#include <boost/shared_ptr.hpp>
-#include <com/sun/star/uno/Exception.hpp>
-#include <vcl/svapp.hxx>
-#include <tools/diagnose_ex.h>
-
-using namespace ::sdr::contact;
-using namespace ::sd::slidesorter::model;
-
-using drawinglayer::primitive2d::Primitive2DReference;
-using drawinglayer::primitive2d::Primitive2DSequence;
-
-namespace sd { namespace slidesorter { namespace view {
-
-
-const sal_Int32 PageObjectViewObjectContact::mnSelectionIndicatorOffset = 2;
-const sal_Int32 PageObjectViewObjectContact::mnSelectionIndicatorThickness = 3;
-const sal_Int32 PageObjectViewObjectContact::mnFocusIndicatorOffset = 3;
-const sal_Int32 PageObjectViewObjectContact::mnFadeEffectIndicatorOffset = 9;
-const sal_Int32 PageObjectViewObjectContact::mnFadeEffectIndicatorSize = 14;
-const sal_Int32 PageObjectViewObjectContact::mnPageNumberOffset = 9;
-const sal_Int32 PageObjectViewObjectContact::mnMouseOverEffectOffset = 3;
-const sal_Int32 PageObjectViewObjectContact::mnMouseOverEffectThickness = 1;
-
-PageObjectViewObjectContact::PageObjectViewObjectContact (
- ObjectContact& rObjectContact,
- ViewContact& rViewContact,
- const ::boost::shared_ptr<cache::PageCache>& rpCache,
- const ::boost::shared_ptr<controller::Properties>& rpProperties)
- : ViewObjectContactOfPageObj(rObjectContact, rViewContact),
- mbInDestructor(false),
- mxCurrentPageContents(),
- mpCache(rpCache),
- mpProperties(rpProperties)
-{
- SharedPageDescriptor pDescriptor (GetPageDescriptor());
- OSL_ASSERT(pDescriptor.get()!=NULL);
- if (pDescriptor.get() != NULL)
- pDescriptor->SetViewObjectContact(this);
-}
-
-
-
-
-PageObjectViewObjectContact::~PageObjectViewObjectContact (void)
-{
- mbInDestructor = true;
-
- GetPageDescriptor()->SetViewObjectContact(NULL);
-
- if (mpCache.get() != NULL)
- {
- const SdrPage* pPage = GetPage();
-
- if(pPage)
- {
- mpCache->ReleasePreviewBitmap(GetPage());
- }
- }
-}
-
-
-
-
-void PageObjectViewObjectContact::SetCache (const ::boost::shared_ptr<cache::PageCache>& rpCache)
-{
- mpCache = rpCache;
-}
-
-
-
-
-Rectangle PageObjectViewObjectContact::GetBoundingBox (
- OutputDevice& rDevice,
- BoundingBoxType eType,
- CoordinateSystem eCoordinateSystem) const
-{
- // Most of the bounding boxes are based on the bounding box of the preview.
- // SdrPageObj is a SdrObject, so use SdrObject::aOutRect as model data
- const PageObjectViewContact& rPaObVOC(static_cast<PageObjectViewContact&>(GetViewContact()));
- Rectangle aBoundingBox(rPaObVOC.GetPageObject().GetLastBoundRect());
-
- CoordinateSystem eCurrentCoordinateSystem (ModelCoordinateSystem);
- switch(eType)
- {
- case PageObjectBoundingBox:
- {
- const SvBorder aPageDescriptorBorder(GetPageDescriptor()->GetModelBorder());
- aBoundingBox.Left() -= aPageDescriptorBorder.Left();
- aBoundingBox.Top() -= aPageDescriptorBorder.Top();
- aBoundingBox.Right() += aPageDescriptorBorder.Right();
- aBoundingBox.Bottom() += aPageDescriptorBorder.Bottom();
- break;
- }
- case PreviewBoundingBox:
- {
- // The aBoundingBox already has the right value.
- break;
- }
- case MouseOverIndicatorBoundingBox:
- {
- const sal_Int32 nBorderWidth (mnMouseOverEffectOffset+mnMouseOverEffectThickness);
- const Size aBorderSize (rDevice.PixelToLogic(Size(nBorderWidth,nBorderWidth)));
- aBoundingBox.Left() -= aBorderSize.Width();
- aBoundingBox.Top() -= aBorderSize.Height();
- aBoundingBox.Right() += aBorderSize.Width();
- aBoundingBox.Bottom() += aBorderSize.Height();
- break;
- }
- case FocusIndicatorBoundingBox:
- {
- const sal_Int32 nBorderWidth (mnFocusIndicatorOffset+1);
- const Size aBorderSize (rDevice.PixelToLogic(Size(nBorderWidth,nBorderWidth)));
- aBoundingBox.Left() -= aBorderSize.Width();
- aBoundingBox.Top() -= aBorderSize.Height();
- aBoundingBox.Right() += aBorderSize.Width();
- aBoundingBox.Bottom() += aBorderSize.Height();
- break;
- }
- case SelectionIndicatorBoundingBox:
- {
- const sal_Int32 nBorderWidth(mnSelectionIndicatorOffset+mnSelectionIndicatorThickness);
- const Size aBorderSize (rDevice.PixelToLogic(Size(nBorderWidth,nBorderWidth)));
- aBoundingBox.Left() -= aBorderSize.Width();
- aBoundingBox.Top() -= aBorderSize.Height();
- aBoundingBox.Right() += aBorderSize.Width();
- aBoundingBox.Bottom() += aBorderSize.Height();
- break;
- }
- case PageNumberBoundingBox:
- {
- Size aModelOffset = rDevice.PixelToLogic(Size(mnPageNumberOffset,mnPageNumberOffset));
- Size aNumberSize (GetPageDescriptor()->GetPageNumberAreaModelSize());
- aBoundingBox = Rectangle (
- Point (
- aBoundingBox.Left() - aModelOffset.Width() - aNumberSize.Width(),
- aBoundingBox.Top()),
- aNumberSize);
- break;
- }
-
- case NameBoundingBox:
- break;
-
- case FadeEffectIndicatorBoundingBox:
- Size aModelOffset = rDevice.PixelToLogic(Size (0, mnFadeEffectIndicatorOffset));
- // Flush left just outside the selection rectangle.
- aBoundingBox = Rectangle (
- Point (
- aBoundingBox.Left(),
- aBoundingBox.Bottom() + aModelOffset.Height()
- ),
- rDevice.PixelToLogic (
- IconCache::Instance().GetIcon(BMP_FADE_EFFECT_INDICATOR).GetSizePixel())
- );
- break;
- }
-
- // Make sure the bounding box uses the requested coordinate system.
- if (eCurrentCoordinateSystem != eCoordinateSystem)
- {
- if (eCoordinateSystem == ModelCoordinateSystem)
- aBoundingBox = Rectangle(
- rDevice.PixelToLogic(aBoundingBox.TopLeft()),
- rDevice.PixelToLogic(aBoundingBox.GetSize()));
- else
- aBoundingBox = Rectangle(
- rDevice.LogicToPixel(aBoundingBox.TopLeft()),
- rDevice.LogicToPixel(aBoundingBox.GetSize()));
- }
- return aBoundingBox;
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// example implementation for primitive usage for PageObjectViewObjectContact
-
-} } } // end of namespace ::sd::slidesorter::view
-
-#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
-#include <sd_primitivetypes2d.hxx>
-#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
-#include <drawinglayer/primitive2d/textprimitive2d.hxx>
-#include <drawinglayer/geometry/viewinformation2d.hxx>
-#include <svx/sdr/contact/objectcontact.hxx>
-
-namespace sd { namespace slidesorter { namespace view {
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// All primitives for SdrPageObject visualisation are based on one range which describes
-// the size of the inner rectangle for PagePreview visualisation. Use a common implementation
-// class for all derived SdPageObjectPrimitives. The SdPageObjectBasePrimitive itself
-// is pure virtual
-
-class SdPageObjectBasePrimitive : public drawinglayer::primitive2d::BufferedDecompositionPrimitive2D
-{
-private:
- // the inner range of the SdPageObject visualisation
- basegfx::B2DRange maRange;
-
-public:
- // constructor and destructor
- SdPageObjectBasePrimitive(const basegfx::B2DRange& rRange);
- virtual ~SdPageObjectBasePrimitive();
-
- // data access
- const basegfx::B2DRange& getPageObjectRange() const { return maRange; }
-
- // compare operator
- virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const;
-};
-
-SdPageObjectBasePrimitive::SdPageObjectBasePrimitive(const basegfx::B2DRange& rRange)
-: drawinglayer::primitive2d::BufferedDecompositionPrimitive2D(),
- maRange(rRange)
-{
-}
-
-SdPageObjectBasePrimitive::~SdPageObjectBasePrimitive()
-{
-}
-
-bool SdPageObjectBasePrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const
-{
- if(drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::operator==(rPrimitive))
- {
- const SdPageObjectBasePrimitive& rCompare = static_cast< const SdPageObjectBasePrimitive& >(rPrimitive);
- return (getPageObjectRange() == rCompare.getPageObjectRange());
- }
-
- return false;
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// SdPageObjectPrimitive for selected visualisation
-
-class SdPageObjectPageBitmapPrimitive : public SdPageObjectBasePrimitive
-{
-private:
- // the bitmap containing the PagePreview
- BitmapEx maBitmapEx;
-
-protected:
- // method which is to be used to implement the local decomposition of a 2D primitive.
- virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
-
-public:
- // constructor and destructor
- SdPageObjectPageBitmapPrimitive(
- const basegfx::B2DRange& rRange,
- const BitmapEx& rBitmapEx);
- ~SdPageObjectPageBitmapPrimitive();
-
- // data access
- const BitmapEx& getBitmapEx() const { return maBitmapEx; }
-
- // compare operator
- virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const;
-
- // provide unique ID
- DeclPrimitrive2DIDBlock()
-};
-
-Primitive2DSequence SdPageObjectPageBitmapPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
-{
- // add bitmap primitive
- // to avoid scaling, use the Bitmap pixel size as primitive size
- basegfx::B2DHomMatrix aBitmapTransform;
- const Size aBitmapSize(getBitmapEx().GetSizePixel());
- const basegfx::B2DVector aBitmapSizeLogic(rViewInformation.getInverseObjectToViewTransformation() *
- basegfx::B2DVector(aBitmapSize.getWidth() - 1, aBitmapSize.getHeight() - 1));
-
- // short form for scale and translate transformation
- aBitmapTransform.set(0L, 0L, aBitmapSizeLogic.getX());
- aBitmapTransform.set(1L, 1L, aBitmapSizeLogic.getY());
- aBitmapTransform.set(0L, 2L, getPageObjectRange().getMinX());
- aBitmapTransform.set(1L, 2L, getPageObjectRange().getMinY());
-
- // add a BitmapPrimitive2D to the result
- const Primitive2DReference xReference(
- new drawinglayer::primitive2d::BitmapPrimitive2D(getBitmapEx(), aBitmapTransform));
- return Primitive2DSequence(&xReference, 1);
-}
-
-SdPageObjectPageBitmapPrimitive::SdPageObjectPageBitmapPrimitive(
- const basegfx::B2DRange& rRange,
- const BitmapEx& rBitmapEx)
-: SdPageObjectBasePrimitive(rRange),
- maBitmapEx(rBitmapEx)
-{
-}
-
-SdPageObjectPageBitmapPrimitive::~SdPageObjectPageBitmapPrimitive()
-{
-}
-
-bool SdPageObjectPageBitmapPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const
-{
- if(SdPageObjectBasePrimitive::operator==(rPrimitive))
- {
- const SdPageObjectPageBitmapPrimitive& rCompare = static_cast< const SdPageObjectPageBitmapPrimitive& >(rPrimitive);
- return (getBitmapEx() == rCompare.getBitmapEx());
- }
-
- return false;
-}
-
-ImplPrimitrive2DIDBlock(SdPageObjectPageBitmapPrimitive, PRIMITIVE2D_ID_SDPAGEOBJECTPAGEBITMAPPRIMITIVE)
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// SdPageObjectPrimitive for selected visualisation
-
-class SdPageObjectSelectPrimitive : public SdPageObjectBasePrimitive
-{
-private:
- /// Gap between border of page object and inside of selection rectangle.
- static const sal_Int32 mnSelectionIndicatorOffset;
-
- /// Thickness of the selection rectangle.
- static const sal_Int32 mnSelectionIndicatorThickness;
-
-protected:
- // method which is to be used to implement the local decomposition of a 2D primitive.
- virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
-
-public:
- // constructor and destructor
- SdPageObjectSelectPrimitive(const basegfx::B2DRange& rRange);
- ~SdPageObjectSelectPrimitive();
-
- // provide unique ID
- DeclPrimitrive2DIDBlock()
-};
-
-const sal_Int32 SdPageObjectSelectPrimitive::mnSelectionIndicatorOffset(1);
-const sal_Int32 SdPageObjectSelectPrimitive::mnSelectionIndicatorThickness(3);
-
-Primitive2DSequence SdPageObjectSelectPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
-{
- Primitive2DSequence xRetval(2);
-
- // since old Width/Height calculations always added a single pixel value,
- // it is necessary to create a inner range which is one display unit less
- // at the bottom right.
- const basegfx::B2DVector aDiscretePixel(rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 1.0));
- const basegfx::B2DRange aAdaptedInnerRange(
- getPageObjectRange().getMinX(), getPageObjectRange().getMinY(),
- getPageObjectRange().getMaxX() - aDiscretePixel.getX(), getPageObjectRange().getMaxY() - aDiscretePixel.getY());
-
- // PaintSelectionIndicator replacement. Grow by offset first
- basegfx::B2DRange aDiscreteOuterRange(aAdaptedInnerRange);
- aDiscreteOuterRange.grow(mnSelectionIndicatorOffset * aDiscretePixel.getX());
-
- // Remember inner border. Make it one bigger in top left since polygons
- // do not paint their lower-right corners. Since this is the inner polygon,
- // the top-left corders are the ones to grow here
- const basegfx::B2DRange aDiscreteInnerRange(
- aDiscreteOuterRange.getMinimum() + aDiscretePixel,
- aDiscreteOuterRange.getMaximum() - aDiscretePixel);
-
- // grow by line width
- aDiscreteOuterRange.grow((mnSelectionIndicatorThickness - 1) * aDiscretePixel.getX());
-
- // create a PolyPolygon from those ranges. For the outer polygon, round edges by
- // giving a relative radius to the polygon creator (use mnSelectionIndicatorThickness here, too)
- const double fPixelFactor(aDiscretePixel.getX() * (mnSelectionIndicatorThickness + 2.5));
- const double fRelativeRadiusX(fPixelFactor / ::std::max(aDiscreteOuterRange.getWidth(), 1.0));
- const double fRelativeRadiusY(fPixelFactor / ::std::max(aDiscreteOuterRange.getHeight(), 1.0));
- basegfx::B2DPolyPolygon aFramePolyPolygon;
- const basegfx::B2DPolygon aRoundedOuterPolygon(basegfx::tools::createPolygonFromRect(aDiscreteOuterRange, fRelativeRadiusX, fRelativeRadiusY));
-
- aFramePolyPolygon.append(aRoundedOuterPolygon);
- aFramePolyPolygon.append(basegfx::tools::createPolygonFromRect(aDiscreteInnerRange));
-
- // add colored PolyPolygon
- const svtools::ColorConfig aColorConfig;
- static bool bTestWithBrightColors(false);
- const basegfx::BColor aFrameColor(bTestWithBrightColors ? basegfx::BColor(0,1,0) : Application::GetSettings().GetStyleSettings().GetMenuHighlightColor().getBColor());
-
- xRetval[0] = Primitive2DReference(
- new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(aFramePolyPolygon, aFrameColor));
-
- // add aRoundedOuterPolygon again as non-filled line polygon to get the roundungs
- // painted correctly
- xRetval[1] = Primitive2DReference(
- new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aRoundedOuterPolygon, aFrameColor));
-
- return xRetval;
-}
-
-SdPageObjectSelectPrimitive::SdPageObjectSelectPrimitive(const basegfx::B2DRange& rRange)
-: SdPageObjectBasePrimitive(rRange)
-{
-}
-
-SdPageObjectSelectPrimitive::~SdPageObjectSelectPrimitive()
-{
-}
-
-ImplPrimitrive2DIDBlock(SdPageObjectSelectPrimitive, PRIMITIVE2D_ID_SDPAGEOBJECTSELECTPRIMITIVE)
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// SdPageObjectPrimitive for border around bitmap visualisation
-
-class SdPageObjectBorderPrimitive : public SdPageObjectBasePrimitive
-{
-protected:
- // method which is to be used to implement the local decomposition of a 2D primitive.
- virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
-
-public:
- // constructor and destructor
- SdPageObjectBorderPrimitive(const basegfx::B2DRange& rRange);
- ~SdPageObjectBorderPrimitive();
-
- // provide unique ID
- DeclPrimitrive2DIDBlock()
-};
-
-Primitive2DSequence SdPageObjectBorderPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
-{
- // since old Width/Height calculations always added a single pixel value,
- // it is necessary to create a inner range which is one display unit less
- // at the bottom right.
- const basegfx::B2DVector aDiscretePixel(rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 1.0));
- const basegfx::B2DRange aAdaptedInnerRange(
- getPageObjectRange().getMinX(), getPageObjectRange().getMinY(),
- getPageObjectRange().getMaxX() - aDiscretePixel.getX(), getPageObjectRange().getMaxY() - aDiscretePixel.getY());
-
- // Paint_Border replacement. (use aBorderColor)
- static bool bTestWithBrightColors(false);
- const svtools::ColorConfig aColorConfig;
- const basegfx::BColor aBorderColor(bTestWithBrightColors ? basegfx::BColor(1,0,0) : Color(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor).getBColor());
-
- const Primitive2DReference xReference(
- new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(basegfx::tools::createPolygonFromRect(aAdaptedInnerRange), aBorderColor));
- return Primitive2DSequence(&xReference, 1);
-}
-
-SdPageObjectBorderPrimitive::SdPageObjectBorderPrimitive(const basegfx::B2DRange& rRange)
-: SdPageObjectBasePrimitive(rRange)
-{
-}
-
-SdPageObjectBorderPrimitive::~SdPageObjectBorderPrimitive()
-{
-}
-
-ImplPrimitrive2DIDBlock(SdPageObjectBorderPrimitive, PRIMITIVE2D_ID_SDPAGEOBJECTBORDERPRIMITIVE)
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// SdPageObjectPrimitive for focus visualisation
-
-class SdPageObjectFocusPrimitive : public SdPageObjectBasePrimitive
-{
-private:
- /// Gap between border of page object and inside of focus rectangle.
- static const sal_Int32 mnFocusIndicatorOffset;
- const bool mbContrastToSelected;
-
-protected:
- // method which is to be used to implement the local decomposition of a 2D primitive.
- virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
-
-public:
- // constructor and destructor
- SdPageObjectFocusPrimitive(const basegfx::B2DRange& rRange, const bool bContrast);
- ~SdPageObjectFocusPrimitive();
-
- // provide unique ID
- DeclPrimitrive2DIDBlock()
-};
-
-const sal_Int32 SdPageObjectFocusPrimitive::mnFocusIndicatorOffset(2);
-
-Primitive2DSequence SdPageObjectFocusPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
-{
- Primitive2DSequence xRetval(2);
-
- // since old Width/Height calculations always added a single pixel value,
- // it is necessary to create a inner range which is one display unit less
- // at the bottom right.
- const basegfx::B2DVector aDiscretePixel(rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 1.0));
- const basegfx::B2DRange aAdaptedInnerRange(
- getPageObjectRange().getMinX(), getPageObjectRange().getMinY(),
- getPageObjectRange().getMaxX() - aDiscretePixel.getX(), getPageObjectRange().getMaxY() - aDiscretePixel.getY());
-
- // Paint_FocusIndicator replacement. (black and white).
- // imitate Paint_DottedRectangle: First paint a white rectangle and above it a black dotted one
- basegfx::B2DRange aFocusIndicatorRange(aAdaptedInnerRange);
- aFocusIndicatorRange.grow(mnFocusIndicatorOffset * aDiscretePixel.getX());
-
- // create polygon
- const basegfx::B2DPolygon aIndicatorPolygon(basegfx::tools::createPolygonFromRect(aFocusIndicatorRange));
-
- const StyleSettings& rStyleSettings(Application::GetSettings().GetStyleSettings());
-
- // "background" rectangle
- const Color aBackgroundColor(mbContrastToSelected ? rStyleSettings.GetMenuHighlightColor() : rStyleSettings.GetWindowColor());
- xRetval[0] = Primitive2DReference(
- new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aIndicatorPolygon, Color(COL_WHITE).getBColor()));
-
- // dotted black rectangle with same geometry
- ::std::vector< double > aDotDashArray;
-
- const sal_Int32 nFocusIndicatorWidth (3);
- aDotDashArray.push_back(nFocusIndicatorWidth *aDiscretePixel.getX());
- aDotDashArray.push_back(nFocusIndicatorWidth * aDiscretePixel.getX());
-
- // prepare line and stroke attributes
- const Color aLineColor(mbContrastToSelected ? rStyleSettings.GetMenuHighlightTextColor() : rStyleSettings.GetWindowTextColor());
- const drawinglayer::attribute::LineAttribute aLineAttribute(aLineColor.getBColor());
- const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(
- aDotDashArray, 2.0 * nFocusIndicatorWidth * aDiscretePixel.getX());
-
-
- xRetval[1] = Primitive2DReference(
- new drawinglayer::primitive2d::PolygonStrokePrimitive2D(aIndicatorPolygon, aLineAttribute, aStrokeAttribute));
-
- return xRetval;
-}
-
-SdPageObjectFocusPrimitive::SdPageObjectFocusPrimitive(const basegfx::B2DRange& rRange, const bool bContrast)
- : SdPageObjectBasePrimitive(rRange),
- mbContrastToSelected(bContrast)
-{
-}
-
-SdPageObjectFocusPrimitive::~SdPageObjectFocusPrimitive()
-{
-}
-
-ImplPrimitrive2DIDBlock(SdPageObjectFocusPrimitive, PRIMITIVE2D_ID_SDPAGEOBJECTFOCUSPRIMITIVE)
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// SdPageObjectPrimitive for fade effect visualisation
-
-class SdPageObjectFadeNameNumberPrimitive : public SdPageObjectBasePrimitive
-{
-private:
- /// Size of width and height of the fade effect indicator in pixels.
- static const sal_Int32 mnFadeEffectIndicatorOffset;
-
- /// Size of width and height of the comments indicator in pixels.
- static const sal_Int32 mnCommentsIndicatorOffset;
-
- /// Gap between border of page object and number rectangle.
- static const sal_Int32 mnPageNumberOffset;
-
- /// the indicator bitmaps. Static since it is usable outside this primitive
- /// for size comparisons
- static BitmapEx* mpFadeEffectIconBitmap;
- static BitmapEx* mpCommentsIconBitmap;
-
- /// page name, number and needed infos
- String maPageName;
- sal_uInt32 mnPageNumber;
- Font maPageNameFont;
- Size maPageNumberAreaModelSize;
-
- // bitfield
- bool mbShowFadeEffectIcon : 1;
- bool mbShowCommentsIcon : 1;
- bool mbExcluded : 1;
-
- // private helpers
- const BitmapEx& getFadeEffectIconBitmap() const;
-
-protected:
- // method which is to be used to implement the local decomposition of a 2D primitive.
- virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
-
-public:
- // constructor and destructor
- SdPageObjectFadeNameNumberPrimitive(
- const basegfx::B2DRange& rRange,
- const String& rPageName,
- sal_uInt32 nPageNumber,
- const Font& rPageNameFont,
- const Size& rPageNumberAreaModelSize,
- bool bShowFadeEffectIcon,
- bool bShowCommentsIcon,
- bool bExcluded);
- ~SdPageObjectFadeNameNumberPrimitive();
-
- // data access
- const String& getPageName() const { return maPageName; }
- sal_uInt32 getPageNumber() const { return mnPageNumber; }
- const Font& getPageNameFont() const { return maPageNameFont; }
- const Size& getPageNumberAreaModelSize() const { return maPageNumberAreaModelSize; }
- bool getShowFadeEffectIcon() const { return mbShowFadeEffectIcon; }
- bool getShowCommentsIcon() const { return mbShowCommentsIcon; }
- bool getExcluded() const { return mbExcluded; }
-
- // compare operator
- virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const;
-
- // provide unique ID
- DeclPrimitrive2DIDBlock()
-};
-
-const sal_Int32 SdPageObjectFadeNameNumberPrimitive::mnFadeEffectIndicatorOffset(9);
-const sal_Int32 SdPageObjectFadeNameNumberPrimitive::mnPageNumberOffset(9);
-BitmapEx* SdPageObjectFadeNameNumberPrimitive::mpFadeEffectIconBitmap = 0;
-
-const BitmapEx& SdPageObjectFadeNameNumberPrimitive::getFadeEffectIconBitmap() const
-{
- if(mpFadeEffectIconBitmap == NULL)
- {
- // prepare FadeEffectIconBitmap on demand
- const sal_uInt16 nIconId(Application::GetSettings().GetStyleSettings().GetHighContrastMode()
- ? BMP_FADE_EFFECT_INDICATOR_H
- : BMP_FADE_EFFECT_INDICATOR);
- const BitmapEx aFadeEffectIconBitmap(IconCache::Instance().GetIcon(nIconId).GetBitmapEx());
- const_cast< SdPageObjectFadeNameNumberPrimitive* >(this)->mpFadeEffectIconBitmap = new BitmapEx(aFadeEffectIconBitmap);
- }
-
- return *mpFadeEffectIconBitmap;
-}
-
-
-const sal_Int32 SdPageObjectFadeNameNumberPrimitive::mnCommentsIndicatorOffset(9);
-BitmapEx* SdPageObjectFadeNameNumberPrimitive::mpCommentsIconBitmap = 0;
-
-Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
-{
- const xub_StrLen nTextLength(getPageName().Len());
- const sal_uInt32 nCount(
- (getShowFadeEffectIcon() ? 1 : 0) + // FadeEffect icon
- (nTextLength ? 1 : 0) + // PageName
- 1 + // PageNumber (always)
- (getExcluded() ? 2 : 0) // PageNumber crossed out
- );
- sal_uInt32 nInsert(0);
- Primitive2DSequence xRetval(nCount);
-
- // since old Width/Height calculations always added a single pixel value,
- // it is necessary to create a inner range which is one display unit less
- // at the bottom right.
- const basegfx::B2DVector aDiscretePixel(rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 1.0));
- const basegfx::B2DRange aAdaptedInnerRange(
- getPageObjectRange().getMinX(), getPageObjectRange().getMinY(),
- getPageObjectRange().getMaxX() - aDiscretePixel.getX(), getPageObjectRange().getMaxY() - aDiscretePixel.getY());
-
- // preapre TextLayouter
- drawinglayer::primitive2d::TextLayouterDevice aTextLayouter;
- aTextLayouter.setFont(getPageNameFont());
-
- // get font attributes
- basegfx::B2DVector aTextSizeAttribute;
- const drawinglayer::attribute::FontAttribute aFontAttribute(
- drawinglayer::primitive2d::getFontAttributeFromVclFont(
- aTextSizeAttribute,
- getPageNameFont(),
- false,
- false));
-
- // prepare locale; this may need some more information in the future
- const ::com::sun::star::lang::Locale aLocale;
-
- // prepare font color from System
- const basegfx::BColor aFontColor(Application::GetSettings().GetStyleSettings().GetFontColor().getBColor());
-
- if(getShowFadeEffectIcon())
- {
- // prepare fFadeEffect Sizes
- const basegfx::B2DVector aFadeEffectBitmapSizeLogic(rViewInformation.getInverseObjectToViewTransformation() *
- basegfx::B2DVector(
- getFadeEffectIconBitmap().GetSizePixel().getWidth() - 1,
- getFadeEffectIconBitmap().GetSizePixel().getHeight() - 1));
-
- // Paint_FadeEffectIndicator replacement.
- // create transformation. To avoid bitmap scaling, use bitmap size as size
- basegfx::B2DHomMatrix aBitmapTransform;
-
- // short form for scale and translate transformation
- aBitmapTransform.set(0L, 0L, aFadeEffectBitmapSizeLogic.getX());
- aBitmapTransform.set(1L, 1L, aFadeEffectBitmapSizeLogic.getY());
- aBitmapTransform.set(0L, 2L, aAdaptedInnerRange.getMinX());
- aBitmapTransform.set(1L, 2L, aAdaptedInnerRange.getMaxY() + ((mnFadeEffectIndicatorOffset + 1) * aDiscretePixel.getX()));
-
- xRetval[nInsert++] = Primitive2DReference(
- new drawinglayer::primitive2d::BitmapPrimitive2D(getFadeEffectIconBitmap(), aBitmapTransform));
- }
-
- if(nTextLength)
- {
- // prepare fFadeEffect Sizes since it consumes from text size
- const basegfx::B2DVector aFadeEffectBitmapSizeLogic(rViewInformation.getInverseObjectToViewTransformation() *
- basegfx::B2DVector(
- getFadeEffectIconBitmap().GetSizePixel().getWidth() - 1,
- getFadeEffectIconBitmap().GetSizePixel().getHeight() - 1));
-
- // Paint_PageName replacement. Get text size
- const double fTextWidth(aTextLayouter.getTextWidth(getPageName(), 0, nTextLength));
- const double fTextHeight(getPageNameFont().GetHeight());
- const double fFadeEffectWidth(aFadeEffectBitmapSizeLogic.getX() * 2.0);
- const double fFadeEffectTextGap(((mnFadeEffectIndicatorOffset + 2) * aDiscretePixel.getX()));
- String aPageName(getPageName());
-
- // calculate text start position
- double fStartX(
- aAdaptedInnerRange.getMaxX()
- - fTextWidth
- + (aDiscretePixel.getX() * 3.0));
- const double fStartY(
- aAdaptedInnerRange.getMaxY()
- + fTextHeight
- + fFadeEffectTextGap);
- const bool bNeedClipping(fStartX < aAdaptedInnerRange.getMinX() + fFadeEffectWidth);
-
- // if text is too big, clip it
- if(bNeedClipping)
- {
- // new left start
- fStartX = aAdaptedInnerRange.getMinX() + fFadeEffectWidth;
-
- // find out how many characters to use
- const double fAvailableLength(aAdaptedInnerRange.getWidth() - fFadeEffectWidth);
- static const String aThreePoints(String::CreateFromAscii("..."));
- const double fWidthThreePoints(aTextLayouter.getTextWidth(aThreePoints, 0, aThreePoints.Len()));
- xub_StrLen a(1);
-
- for(; a < (xub_StrLen)nTextLength; a++)
- {
- const double fSnippetLength(aTextLayouter.getTextWidth(aPageName, 0, a));
-
- if(fSnippetLength + fWidthThreePoints > fAvailableLength)
- {
- break;
- }
- }
-
- // build new string
- aPageName = String(aPageName, 0, a - 1);
- aPageName += aThreePoints;
- }
-
- // fill text matrix
- basegfx::B2DHomMatrix aTextMatrix;
-
- aTextMatrix.set(0, 0, aTextSizeAttribute.getX());
- aTextMatrix.set(1, 1, aTextSizeAttribute.getY());
- aTextMatrix.set(0, 2, fStartX);
- aTextMatrix.set(1, 2, fStartY);
-
- // prepare DXTextArray (can be empty one)
- const ::std::vector< double > aDXArray;
-
- // create Text primitive and add to target
- xRetval[nInsert++] = Primitive2DReference(
- new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
- aTextMatrix,
- aPageName,
- 0,
- aPageName.Len(),
- aDXArray,
- aFontAttribute,
- aLocale,
- aFontColor));
- }
-
- {
- // Paint_PageNumber replacement. Get the range where it shall be centered and prepare the string
- const double fLeft(aAdaptedInnerRange.getMinX() - (mnPageNumberOffset * aDiscretePixel.getX()) - getPageNumberAreaModelSize().Width());
- const double fTop(aAdaptedInnerRange.getMinY());
- const basegfx::B2DRange aNumberRange(fLeft, fTop,
- fLeft + getPageNumberAreaModelSize().Width(), fTop + getPageNumberAreaModelSize().Height());
- const String aPageNumber(String::CreateFromInt32(getPageNumber()));
- const xub_StrLen nNumberLen(aPageNumber.Len());
-
- // Get text size
- const double fTextWidth(aTextLayouter.getTextWidth(aPageNumber, 0, nNumberLen));
- const double fTextHeight(getPageNameFont().GetHeight());
-
- // get text start postion
- const double fStartX(aNumberRange.getCenterX() - (fTextWidth / 2.0));
- const double fStartY(aNumberRange.getMinY() + fTextHeight + aDiscretePixel.getX());
-
- // fill text matrix
- basegfx::B2DHomMatrix aTextMatrix;
-
- aTextMatrix.set(0, 0, aTextSizeAttribute.getX());
- aTextMatrix.set(1, 1, aTextSizeAttribute.getY());
- aTextMatrix.set(0, 2, fStartX);
- aTextMatrix.set(1, 2, fStartY);
-
- // prepare DXTextArray (can be empty one)
- const ::std::vector< double > aDXArray;
-
- // create Text primitive
- xRetval[nInsert++] = Primitive2DReference(
- new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
- aTextMatrix,
- aPageNumber,
- 0,
- nNumberLen,
- aDXArray,
- aFontAttribute,
- aLocale,
- aFontColor));
-
- if(getExcluded())
- {
- // create a box with strikethrough from top left to bottom right
- const basegfx::BColor aActiveColor(Application::GetSettings().GetStyleSettings().GetActiveColor().getBColor());
- basegfx::B2DPolygon aStrikethrough;
-
- aStrikethrough.append(aNumberRange.getMinimum());
- aStrikethrough.append(aNumberRange.getMaximum());
-
- xRetval[nInsert++] = Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
- basegfx::tools::createPolygonFromRect(aNumberRange), aActiveColor));
-
- xRetval[nInsert++] = Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
- aStrikethrough, aActiveColor));
- }
- }
-
- return xRetval;
-}
-
-SdPageObjectFadeNameNumberPrimitive::SdPageObjectFadeNameNumberPrimitive(
- const basegfx::B2DRange& rRange,
- const String& rPageName,
- sal_uInt32 nPageNumber,
- const Font& rPageNameFont,
- const Size& rPageNumberAreaModelSize,
- bool bShowFadeEffectIcon,
- bool bShowCommentsIcon,
- bool bExcluded)
-: SdPageObjectBasePrimitive(rRange),
- maPageName(rPageName),
- mnPageNumber(nPageNumber),
- maPageNameFont(rPageNameFont),
- maPageNumberAreaModelSize(rPageNumberAreaModelSize),
- mbShowFadeEffectIcon(bShowFadeEffectIcon),
- mbShowCommentsIcon(bShowCommentsIcon),
- mbExcluded(bExcluded)
-{
-}
-
-SdPageObjectFadeNameNumberPrimitive::~SdPageObjectFadeNameNumberPrimitive()
-{
-}
-
-bool SdPageObjectFadeNameNumberPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const
-{
- if(SdPageObjectBasePrimitive::operator==(rPrimitive))
- {
- const SdPageObjectFadeNameNumberPrimitive& rCompare = static_cast< const SdPageObjectFadeNameNumberPrimitive& >(rPrimitive);
-
- return (getPageName() == rCompare.getPageName()
- && getPageNumber() == rCompare.getPageNumber()
- && getPageNameFont() == rCompare.getPageNameFont()
- && getPageNumberAreaModelSize() == rCompare.getPageNumberAreaModelSize()
- && getShowFadeEffectIcon() == rCompare.getShowFadeEffectIcon()
- && getExcluded() == rCompare.getExcluded());
- }
-
- return false;
-}
-
-ImplPrimitrive2DIDBlock(SdPageObjectFadeNameNumberPrimitive, PRIMITIVE2D_ID_SDPAGEOBJECTFADENAMENUMBERPRIMITIVE)
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// createPrimitive2DSequence
-//
-// This method will replace the whole painting mechanism. Task is no longer to paint stuff to an OutDev,
-// but to provide the necessary geometrical information using primitives.
-
-Primitive2DSequence PageObjectViewObjectContact::createPrimitive2DSequence(const sdr::contact::DisplayInfo& rDisplayInfo) const
-{
- // OutputDevice* pDevice = rDisplayInfo.GetDIOutputDevice();
- OutputDevice* pDevice = GetObjectContact().TryToGetOutputDevice();
-
- // get primitive vector from parent class. Do remember the contents for later use; this
- // is done to create the page content renderer (see PagePrimitiveExtractor in svx) at the
- // original object and to setup the draw hierarchy there so that changes to VCs of displayed
- // objects will lead to InvalidatePartOfView-calls which will be forwarded from the helper-OC
- // to this VOC in calling a ActionChanged().
- //
- // This already produces the displayable page content as a primitive sequence, complete with
- // embedding in the page visualizer, clipping if needed and object and aspect ratio
- // preparations. It would thus be the base for creating the cached visualisation, too,
- // by just painting extactly this primitive sequence.
- //
- // Currently, this slows down PagePane display heavily. Reason is that the current mechanism
- // to react on a SdrObject change in an edit view is to react on the ModelChange and to completely
- // reset the PagePane (delete SdrPageObjs, re-create and layout them). This works, but kicks
- // the complete sequence of primitive creation at VOCs and VCs and their buffering out of
- // memory each time. So there are two choices:
- //
- // 1, disable getting the sequence of primtives
- // -> invalidate uses ModelChange
- // -> cache repaint uses complete view creation and repainting
- //
- // 2, create and use the sequence of primitives
- // -> invalidate would not need ModelChange, no destroy/recreate of SdrObjects, no rearrange,
- // the invalidate and the following repaint would exactly update the SdrPages involved and
- // use the DrawingLayer provided ActionChanged() invalidations over the VOCs and VCs
- // -> cache repaint could use the here offered sequence of primitives to re-create the bitmap
- // (just hand over the local member to the cache)
- //
- // For the moment i will use (1) and disable primitive creation for SdrPageObj contents here
-
- // const_cast< PageObjectViewObjectContact* >(this)->mxCurrentPageContents = ViewObjectContactOfPageObj::createPrimitive2DSequence(rDisplayInfo);
-
- // assert when this call is issued indirectly from the destructor of
- // this instance. This is not allowed and needs to be looked at
-#ifdef DBG_UTIL
- if(mbInDestructor)
- {
- OSL_ENSURE(false, "Higher call inside PageObjectViewObjectContact in destructor (!)");
- }
-#endif
-
- // Check if buffering can and shall be done.
- if (pDevice != NULL
- && !GetObjectContact().isOutputToPrinter()
- && !GetObjectContact().isOutputToRecordingMetaFile()
- && !mbInDestructor)
- {
- // get inner and outer logic rectangles. Use model data directly for creation. Do NOT use getBoundRect()/
- // getSnapRect() functionality; these will use the sequence of primitives in the long run itself. SdrPageObj
- // is a SdrObject, so use SdrObject::aOutRect as model data. Access using GetLastBoundRect() to not execute anything
- PageObjectViewContact& rPaObVOC(static_cast< PageObjectViewContact& >(GetViewContact()));
- const Rectangle aInnerLogic(rPaObVOC.GetPageObject().GetLastBoundRect());
-
- // get BitmapEx from cache. Do exactly the same as Paint_Preview() to avoid a repaint loop
- // caused by slightly different pixel sizes of what the cache sees as pixel size and what is
- // calculated here in discrete coordinates. This includes to not use LogicToPiyel on the Rectangle,
- // but to do the same as the GetBoundingBox() implementation
- const Rectangle aInnerPixel(Rectangle(pDevice->LogicToPixel(aInnerLogic.TopLeft()), pDevice->LogicToPixel(aInnerLogic.GetSize())));
- BitmapEx aBitmapEx(const_cast< PageObjectViewObjectContact* >(this)->GetPreview(rDisplayInfo, aInnerPixel));
-
- // prepare inner range
- const basegfx::B2DRange aInnerRange(aInnerLogic.Left(), aInnerLogic.Top(), aInnerLogic.Right(), aInnerLogic.Bottom());
-
- // provide default parameters
- String aPageName;
- Font aPageNameFont;
- sal_uInt32 nPageNumber(0);
- Size aPageNumberAreaModelSize;
- bool bShowFadeEffectIcon(false);
- bool bShowCommentsIcon(false);
- bool bExcluded(false);
-
- if(GetPage())
- {
- const SdPage* pPage = static_cast<const SdPage*>(GetPage());
-
- // decide if fade effect indicator will be painted
- if(pPage->getTransitionType() > 0)
- {
- bShowFadeEffectIcon = true;
- }
-
- bShowCommentsIcon = !pPage->getAnnotations().empty();
-
- // prepare PageName, PageNumber, font and AreaModelSize
- aPageName = pPage->GetName();
- aPageNameFont = *FontProvider::Instance().GetFont(*pDevice);
- nPageNumber = ((pPage->GetPageNum() - 1) / 2) + 1;
- aPageNumberAreaModelSize = GetPageDescriptor()->GetPageNumberAreaModelSize();
-
- if(!aPageName.Len())
- {
- aPageName = String(SdResId(STR_PAGE));
- aPageName += String::CreateFromInt32(nPageNumber);
- }
-
- // decide if page is excluded
- bExcluded = pPage->IsExcluded();
- }
-
- // create specialized primitives for focus, select and PagePreview itself
- const bool bCreateBitmap(!aBitmapEx.IsEmpty());
- const bool bCreateFocused(GetPageDescriptor()->IsFocused());
- const bool bCreateSelected(GetPageDescriptor()->IsSelected());
-
- const sal_uInt32 nCount(
- (bCreateBitmap ? 1 : 0) + // bitmap itself
- 1 + // border around bitmap (always)
- 1 + // FadeEffect, PageName and PageNumber visualisation (always)
- (bCreateFocused ? 1 : 0) + // create focused
- (bCreateSelected ? 1 : 0) // create selected
- );
- sal_uInt32 nInsert(0);
- Primitive2DSequence xRetval(nCount);
-
- if(bCreateBitmap)
- {
- // add selection indicator if used
- xRetval[nInsert++] = Primitive2DReference(new SdPageObjectPageBitmapPrimitive(aInnerRange, aBitmapEx));
- }
-
- if(true)
- {
- // add border (always)
- xRetval[nInsert++] = Primitive2DReference(new SdPageObjectBorderPrimitive(aInnerRange));
- }
-
- if(true)
- {
- // add fade effext, page name and number if used
- xRetval[nInsert++] = Primitive2DReference(new SdPageObjectFadeNameNumberPrimitive(
- aInnerRange,
- aPageName,
- nPageNumber,
- aPageNameFont,
- aPageNumberAreaModelSize,
- bShowFadeEffectIcon,
- bShowCommentsIcon,
- bExcluded));
- }
-
- if(bCreateSelected)
- {
- // add selection indicator if used
- xRetval[nInsert++] = Primitive2DReference(new SdPageObjectSelectPrimitive(aInnerRange));
- }
-
- if(bCreateFocused)
- {
- // add focus indicator if used
- xRetval[nInsert++] = Primitive2DReference(new SdPageObjectFocusPrimitive(aInnerRange, bCreateSelected));
- }
-
- return xRetval;
- }
- else
- {
- // Call parent. Output to printer or metafile will use vector data, not cached bitmaps
- return ViewObjectContactOfPageObj::createPrimitive2DSequence(rDisplayInfo);
- }
-}
-
-BitmapEx PageObjectViewObjectContact::CreatePreview (const DisplayInfo& /*rDisplayInfo*/)
-{
- const SdPage* pPage = static_cast<const SdPage*>(GetPage());
- OutputDevice* pDevice = GetObjectContact().TryToGetOutputDevice();
-
- if(pDevice)
- {
- Rectangle aPreviewPixelBox (GetBoundingBox(*pDevice,PreviewBoundingBox,PixelCoordinateSystem));
-
- PreviewRenderer aRenderer (pDevice);
- Image aPreview (aRenderer.RenderPage(
- pPage,
- aPreviewPixelBox.GetSize(),
- String()));
-
- return aPreview.GetBitmapEx();
- }
- else
- {
- return BitmapEx();
- }
-}
-
-
-
-
-BitmapEx PageObjectViewObjectContact::GetPreview (
- const DisplayInfo& rDisplayInfo,
- const Rectangle& rNewSizePixel)
-{
- BitmapEx aBitmap;
-
- try
- {
- // assert when this call is issued indirectly from the destructor of
- // this instance. This is not allowed and needs to be looked at
- OSL_ENSURE(!mbInDestructor, "Higher call inside PageObjectViewObjectContact in destructor (!)");
-
- if (!mbInDestructor)
- {
- if (mpCache != NULL)
- {
- aBitmap = mpCache->GetPreviewBitmap(
- GetPage(),
- rNewSizePixel.GetSize());
- mpCache->SetPreciousFlag(GetPage(), true);
- }
- else
- aBitmap = CreatePreview(rDisplayInfo);
- }
- }
- catch (const ::com::sun::star::uno::Exception&)
- {
- DBG_UNHANDLED_EXCEPTION();
- }
-
- return aBitmap;
-}
-
-
-
-
-const SdrPage* PageObjectViewObjectContact::GetPage (void) const
-{
- return static_cast<PageObjectViewContact&>(GetViewContact()).GetPage();
-}
-
-
-
-
-void PageObjectViewObjectContact::ActionChanged (void)
-{
- // Even when we are called from destructor we still have to invalide
- // the preview bitmap in the cache.
- const SdrPage* pPage = GetPage();
-
- if(pPage)
- {
- SdDrawDocument* pDocument = dynamic_cast<SdDrawDocument*>(pPage->GetModel());
- if (mpCache!=NULL && pPage!=NULL && pDocument!=NULL)
- {
- cache::PageCacheManager::Instance()->InvalidatePreviewBitmap(
- pDocument->getUnoModel(),
- pPage);
- }
- }
-
- // call parent
- ViewObjectContactOfPageObj::ActionChanged();
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// helper MouseOverEffectPrimitive
-//
-// Used to allow view-dependent primitive definition. For that purpose, the
-// initially created primitive (here: in createMouseOverEffectPrimitive2DSequence())
-// always has to be view-independent, but the decomposition is made view-dependent.
-// Very simple primitive which just remembers the discrete data and applies
-// it at decomposition time.
-
-class MouseOverEffectPrimitive : public drawinglayer::primitive2d::BufferedDecompositionPrimitive2D
-{
-private:
- basegfx::B2DRange maLogicRange;
- sal_uInt32 mnDiscreteOffset;
- sal_uInt32 mnDiscreteWidth;
- basegfx::BColor maRGBColor;
-
-protected:
- virtual drawinglayer::primitive2d::Primitive2DSequence create2DDecomposition(
- const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
-
-public:
- MouseOverEffectPrimitive(
- const basegfx::B2DRange& rLogicRange,
- sal_uInt32 nDiscreteOffset,
- sal_uInt32 nDiscreteWidth,
- const basegfx::BColor& rRGBColor)
- : drawinglayer::primitive2d::BufferedDecompositionPrimitive2D(),
- maLogicRange(rLogicRange),
- mnDiscreteOffset(nDiscreteOffset),
- mnDiscreteWidth(nDiscreteWidth),
- maRGBColor(rRGBColor)
- {}
-
- // data access
- const basegfx::B2DRange& getLogicRange() const { return maLogicRange; }
- sal_uInt32 getDiscreteOffset() const { return mnDiscreteOffset; }
- sal_uInt32 getDiscreteWidth() const { return mnDiscreteWidth; }
- const basegfx::BColor& getRGBColor() const { return maRGBColor; }
-
- virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const;
-
- DeclPrimitrive2DIDBlock()
-};
-
-drawinglayer::primitive2d::Primitive2DSequence MouseOverEffectPrimitive::create2DDecomposition(
- const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
-{
- // get logic sizes in object coordinate system
- const double fDiscreteWidth((rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 0.0)).getLength());
- const double fOffset(fDiscreteWidth * getDiscreteOffset());
- const double fWidth(fDiscreteWidth * getDiscreteWidth());
-
- // create range (one pixel less to get a good fitting)
- basegfx::B2DRange aRange(
- getLogicRange().getMinimum(),
- getLogicRange().getMaximum() - basegfx::B2DTuple(fDiscreteWidth, fDiscreteWidth));
-
- // grow range
- aRange.grow(fOffset - (fWidth * 0.5));
-
- // create fat line with parameters. The formerly hand-painted edge
- // roundings will now be done using rounded edges of this fat line
- const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(aRange));
- const drawinglayer::attribute::LineAttribute aLineAttribute(getRGBColor(), fWidth);
- const drawinglayer::primitive2d::Primitive2DReference xReference(
- new drawinglayer::primitive2d::PolygonStrokePrimitive2D(
- aPolygon,
- aLineAttribute));
-
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
-}
-
-bool MouseOverEffectPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const
-{
- if(drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::operator==(rPrimitive))
- {
- const MouseOverEffectPrimitive& rCompare = static_cast< const MouseOverEffectPrimitive& >(rPrimitive);
-
- return (getLogicRange() == rCompare.getLogicRange()
- && getDiscreteOffset() == rCompare.getDiscreteOffset()
- && getDiscreteWidth() == rCompare.getDiscreteWidth()
- && getRGBColor() == rCompare.getRGBColor());
- }
-
- return false;
-}
-
-ImplPrimitrive2DIDBlock(MouseOverEffectPrimitive, PRIMITIVE2D_ID_SDMOUSEOVEREFFECTPRIMITIVE)
-
-//////////////////////////////////////////////////////////////////////////////
-
-drawinglayer::primitive2d::Primitive2DSequence PageObjectViewObjectContact::createMouseOverEffectPrimitive2DSequence()
-{
- drawinglayer::primitive2d::Primitive2DSequence aRetval;
-
- if(GetPageDescriptor()->IsSelected() && mpProperties.get() && mpProperties->IsShowSelection())
- {
- // When the selection frame is visualized the mouse over frame is not
- // visible and does not have to be created.
- }
- else
- {
- const PageObjectViewContact& rPaObVOC(static_cast<PageObjectViewContact&>(GetViewContact()));
- const Rectangle aBoundingBox(rPaObVOC.GetPageObject().GetLastBoundRect());
- const basegfx::B2DRange aLogicRange(aBoundingBox.Left(), aBoundingBox.Top(), aBoundingBox.Right(), aBoundingBox.Bottom());
- const basegfx::BColor aSelectionColor(mpProperties->GetSelectionColor().getBColor());
- const drawinglayer::primitive2d::Primitive2DReference aReference(
- new MouseOverEffectPrimitive(
- aLogicRange,
- mnMouseOverEffectOffset,
- mnMouseOverEffectThickness,
- aSelectionColor));
-
- aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
- }
-
- return aRetval;
-}
-
-
-
-
-SvBorder PageObjectViewObjectContact::CalculatePageModelBorder (
- OutputDevice* pDevice,
- int nPageCount)
-{
- SvBorder aModelBorder;
-
- if (pDevice != NULL)
- {
- // 1. Initialize the border with the values that do not depend on
- // the device.
- Size aTopLeftBorders (pDevice->PixelToLogic (Size (
- mnPageNumberOffset+1,
- mnSelectionIndicatorOffset + mnSelectionIndicatorThickness)));
- Size aBottomRightBorders (pDevice->PixelToLogic (Size (
- mnSelectionIndicatorOffset + mnSelectionIndicatorThickness,
- mnFadeEffectIndicatorOffset)));
- aModelBorder = SvBorder (
- aTopLeftBorders.Width(),
- aTopLeftBorders.Height(),
- aBottomRightBorders.Width(),
- aBottomRightBorders.Height());
-
-
- // 2. Add the device dependent values.
-
- // Calculate the area of the page number.
- Size aPageNumberModelSize (
- CalculatePageNumberAreaModelSize (pDevice, nPageCount));
-
- // Update the border.
- aModelBorder.Left() += aPageNumberModelSize.Width();
- // The height of the page number area is the same as the height of
- // the page name area.
- aModelBorder.Bottom() += aPageNumberModelSize.Height();
- }
-
- return aModelBorder;
-}
-
-
-
-
-Size PageObjectViewObjectContact::CalculatePageNumberAreaModelSize (
- OutputDevice* pDevice,
- int nPageCount)
-{
- // Set the correct font.
- Font aOriginalFont (pDevice->GetFont());
- pDevice->SetFont(*FontProvider::Instance().GetFont(*pDevice));
-
- String sPageNumberTemplate;
- if (nPageCount < 10)
- sPageNumberTemplate = String::CreateFromAscii("9");
- else if (nPageCount < 100)
- sPageNumberTemplate = String::CreateFromAscii("99");
- else if (nPageCount < 200)
- // Just for the case that 1 is narrower than 9.
- sPageNumberTemplate = String::CreateFromAscii("199");
- else if (nPageCount < 1000)
- sPageNumberTemplate = String::CreateFromAscii("999");
- else
- sPageNumberTemplate = String::CreateFromAscii("9999");
- // More then 9999 pages are not handled.
-
- Size aSize (
- pDevice->GetTextWidth (sPageNumberTemplate),
- pDevice->GetTextHeight ());
-
- pDevice->SetFont (aOriginalFont);
-
- return aSize;
-}
-
-
-
-
-model::SharedPageDescriptor
- PageObjectViewObjectContact::GetPageDescriptor (void) const
-{
- PageObjectViewContact& rViewContact (
- static_cast<PageObjectViewContact&>(GetViewContact()));
- PageObject& rPageObject (
- static_cast<PageObject&>(rViewContact.GetPageObject()));
- return rPageObject.GetDescriptor();
-}
-
-
-
-} } } // end of namespace ::sd::slidesorter::view
diff --git a/writerfilter/source/doctok/doctokutil.cxx b/sd/source/ui/slidesorter/view/SlsResource.hxx
index 7d94b525550b..515c3a79a0ec 100644
--- a/writerfilter/source/doctok/doctokutil.cxx
+++ b/sd/source/ui/slidesorter/view/SlsResource.hxx
@@ -25,29 +25,23 @@
*
************************************************************************/
-#include <util.hxx>
+#ifndef SD_SLIDESORTER_RESOURCE_HXX
+#define SD_SLIDESORTER_RESOURCE_HXX
-using namespace ::std;
+#include "view/SlsResource.hrc"
+#include "sdresid.hxx"
+#include <tools/rc.hxx>
-namespace writerfilter {
-namespace doctok {
-void util_assert(bool bTest)
-{
- if (! bTest)
- clog << "ASSERT!\n" << endl;
-}
+namespace sd { namespace slidesorter { namespace view {
-void printBytes(ostream & o, const string & str)
+class LocalResource : public Resource
{
- unsigned int nCount = str.size();
- for (unsigned int n = 0; n < nCount; ++n)
- {
- unsigned char c = static_cast<unsigned char>(str[n]);
- if (c < 128 && isprint(c))
- o << str[n];
- else
- o << ".";
- }
-}
+public:
+ LocalResource (const sal_uInt16 nResourceId) : Resource(SdResId(nResourceId)){}
+ ~LocalResource (void) { FreeResource(); }
+};
+
+
+} } } // end of namespace ::sd::slidesorter::view
-}}
+#endif
diff --git a/sd/source/ui/slidesorter/view/SlsResource.src b/sd/source/ui/slidesorter/view/SlsResource.src
new file mode 100644
index 000000000000..13f6cd08c775
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsResource.src
@@ -0,0 +1,314 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "view/SlsResource.hrc"
+
+Resource RID_SLIDESORTER_ICONS
+{
+ Image IMAGE_COMMAND1_LARGE
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_large.png" ; };
+ };
+ Image IMAGE_COMMAND1_LARGE_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_large_hover.png" ; };
+ };
+ Image IMAGE_COMMAND1_MEDIUM
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_medium.png" ; };
+ };
+ Image IMAGE_COMMAND1_MEDIUM_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_medium_hover.png" ; };
+ };
+ Image IMAGE_COMMAND1_SMALL
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_small.png" ; };
+ };
+ Image IMAGE_COMMAND1_SMALL_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_small_hover.png" ; };
+ };
+
+ Image IMAGE_COMMAND1_LARGE_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_large_hc.png" ; };
+ };
+ Image IMAGE_COMMAND1_LARGE_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_large_hover_hc.png" ; };
+ };
+ Image IMAGE_COMMAND1_MEDIUM_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_medium_hc.png" ; };
+ };
+ Image IMAGE_COMMAND1_MEDIUM_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_medium_hover_hc.png" ; };
+ };
+ Image IMAGE_COMMAND1_SMALL_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_small_hc.png" ; };
+ };
+ Image IMAGE_COMMAND1_SMALL_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_small_hover_hc.png" ; };
+ };
+
+
+ Image IMAGE_COMMAND2_LARGE
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_large.png" ; };
+ };
+ Image IMAGE_COMMAND2_LARGE_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_large_hover.png" ; };
+ };
+ Image IMAGE_COMMAND2_MEDIUM
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_medium.png" ; };
+ };
+ Image IMAGE_COMMAND2_MEDIUM_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_medium_hover.png" ; };
+ };
+ Image IMAGE_COMMAND2_SMALL
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_small.png" ; };
+ };
+ Image IMAGE_COMMAND2_SMALL_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_small_hover.png" ; };
+ };
+
+ Image IMAGE_COMMAND2_LARGE_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_large_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2_LARGE_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_large_hover_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2_MEDIUM_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_medium_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2_MEDIUM_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_medium_hover_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2_SMALL_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_small_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2_SMALL_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_small_hover_hc.png" ; };
+ };
+
+
+ Image IMAGE_COMMAND2B_LARGE
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_large.png" ; };
+ };
+ Image IMAGE_COMMAND2B_LARGE_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_large_hover.png" ; };
+ };
+ Image IMAGE_COMMAND2B_MEDIUM
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_medium.png" ; };
+ };
+ Image IMAGE_COMMAND2B_MEDIUM_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_medium_hover.png" ; };
+ };
+ Image IMAGE_COMMAND2B_SMALL
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_small.png" ; };
+ };
+ Image IMAGE_COMMAND2B_SMALL_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_small_hover.png" ; };
+ };
+
+ Image IMAGE_COMMAND2B_LARGE_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_large_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2B_LARGE_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_large_hover_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2B_MEDIUM_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_medium_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2B_MEDIUM_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_medium_hover_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2B_SMALL_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_small_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2B_SMALL_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_small_hover_hc.png" ; };
+ };
+
+
+ Image IMAGE_COMMAND3_LARGE
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_large.png" ; };
+ };
+ Image IMAGE_COMMAND3_LARGE_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_large_hover.png" ; };
+ };
+ Image IMAGE_COMMAND3_MEDIUM
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_medium.png" ; };
+ };
+ Image IMAGE_COMMAND3_MEDIUM_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_medium_hover.png" ; };
+ };
+ Image IMAGE_COMMAND3_SMALL
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_small.png" ; };
+ };
+ Image IMAGE_COMMAND3_SMALL_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_small_hover.png" ; };
+ };
+
+ Image IMAGE_COMMAND3_LARGE_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_large_hc.png" ; };
+ };
+ Image IMAGE_COMMAND3_LARGE_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_large_hover_hc.png" ; };
+ };
+ Image IMAGE_COMMAND3_MEDIUM_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_medium_hc.png" ; };
+ };
+ Image IMAGE_COMMAND3_MEDIUM_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_medium_hover_hc.png" ; };
+ };
+ Image IMAGE_COMMAND3_SMALL_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_small_hc.png" ; };
+ };
+ Image IMAGE_COMMAND3_SMALL_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_small_hover_hc.png" ; };
+ };
+
+
+ Image IMAGE_BUTTONBAR_LARGE
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command_background_large.png" ; };
+ };
+ Image IMAGE_BUTTONBAR_MEDIUM
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command_background_medium.png" ; };
+ };
+ Image IMAGE_BUTTONBAR_SMALL
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command_background_small.png" ; };
+ };
+
+ Image IMAGE_BUTTONBAR_LARGE_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command_background_large_hc.png" ; };
+ };
+ Image IMAGE_BUTTONBAR_MEDIUM_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command_background_medium_hc.png" ; };
+ };
+ Image IMAGE_BUTTONBAR_SMALL_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command_background_small_hc.png" ; };
+ };
+
+
+
+ Image IMAGE_SHADOW
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_shadow.png" ; };
+ };
+
+ Image IMAGE_INSERT_SHADOW
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_insert_shadow.png" ; };
+ };
+
+ Image IMAGE_HIDE_SLIDE_OVERLAY
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_hide_slide_overlay.png" ; };
+ };
+
+ Image IMAGE_FOCUS_BORDER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_focus_border.png" ; };
+ };
+
+
+ String STRING_DRAG_AND_DROP_PAGES
+ {
+ Text [ en-US ] = "Drag and Drop Pages" ;
+ };
+
+ String STRING_DRAG_AND_DROP_SLIDES
+ {
+ Text [ en-US ] = "Drag and Drop Slides" ;
+ };
+
+ String STRING_COMMAND1
+ {
+ Text [ en-US ] = "Start Slide Show" ;
+ };
+
+ String STRING_COMMAND2_A
+ {
+ Text [ en-US ] = "Hide Slide" ;
+ };
+
+ String STRING_COMMAND2_B
+ {
+ Text [ en-US ] = "Show Slide" ;
+ };
+
+ String STRING_COMMAND3
+ {
+ Text [ en-US ] = "Duplicate Slide" ;
+ };
+};
diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx
new file mode 100644
index 000000000000..7357d7ea00b8
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx
@@ -0,0 +1,535 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "view/SlsTheme.hxx"
+#include "SlsResource.hxx"
+#include "controller/SlsProperties.hxx"
+#include "sdresid.hxx"
+#include <tools/color.hxx>
+#include <vcl/outdev.hxx>
+#include <vcl/image.hxx>
+#include <vcl/svapp.hxx>
+#include <svtools/colorcfg.hxx>
+
+namespace sd { namespace slidesorter { namespace view {
+
+const static ColorData Black = 0x000000;
+const static ColorData White = 0xffffff;
+
+
+
+ColorData ChangeLuminance (const ColorData aColorData, const int nValue)
+{
+ Color aColor (aColorData);
+ if (nValue > 0)
+ aColor.IncreaseLuminance(nValue);
+ else
+ aColor.DecreaseLuminance(-nValue);
+ return aColor.GetColor();
+}
+
+ColorData HGBAdapt (
+ const ColorData aColorData,
+ const sal_Int32 nNewSaturation,
+ const sal_Int32 nNewBrightness)
+{
+ USHORT nHue (0);
+ USHORT nSaturation (0);
+ USHORT nBrightness (0);
+ Color(aColorData).RGBtoHSB(nHue, nSaturation, nBrightness);
+ return Color::HSBtoRGB(
+ nHue,
+ nNewSaturation>=0 ? nNewSaturation : nSaturation,
+ nNewBrightness>=0 ? nNewBrightness : nBrightness);
+}
+
+
+
+
+Theme::Theme (const ::boost::shared_ptr<controller::Properties>& rpProperties)
+ : maBackgroundColor(rpProperties->GetBackgroundColor().GetColor()),
+ maPageBackgroundColor(COL_WHITE),
+ maGradients(),
+ maIcons(),
+ maColor(),
+ maIntegerValues()
+{
+ {
+ LocalResource aResource (RID_SLIDESORTER_ICONS);
+
+ maStrings.resize(_StringType_Size_);
+ maStrings[String_DragAndDropPages] = String(SdResId(STRING_DRAG_AND_DROP_PAGES));
+ maStrings[String_DragAndDropSlides] = String(SdResId(STRING_DRAG_AND_DROP_SLIDES));
+ maStrings[String_Command1] = String(SdResId(STRING_COMMAND1));
+ maStrings[String_Command2] = String(SdResId(STRING_COMMAND2_A));
+ maStrings[String_Command2B] = String(SdResId(STRING_COMMAND2_B));
+ maStrings[String_Command3] = String(SdResId(STRING_COMMAND3));
+
+ maColor.resize(_ColorType_Size_);
+ maColor[Color_Background] = maBackgroundColor;
+ maColor[Color_ButtonBackground] = Black;
+ maColor[Color_ButtonText] = 0xc0c0c0;
+ maColor[Color_ButtonTextHover] = White;
+ maColor[Color_PageNumberDefault] = 0x0808080;
+ maColor[Color_PageNumberHover] = 0x4c4c4c;
+ maColor[Color_PageNumberHighContrast] = White;
+ maColor[Color_PageNumberBrightBackground] = 0x333333;
+ maColor[Color_PageNumberDarkBackground] = 0xcccccc;
+ maColor[Color_PreviewBorder] = 0x949599;
+
+ maIntegerValues.resize(_IntegerValueType_Size_);
+ maIntegerValues[Integer_ButtonCornerRadius] = 3;
+ maIntegerValues[Integer_ButtonMaxAlpha] = 0;
+ maIntegerValues[Integer_ButtonBarMaxAlpha] = 0;
+ maIntegerValues[Integer_ButtonPaintType] = 1;
+ maIntegerValues[Integer_ButtonBorder] = 4;
+ maIntegerValues[Integer_ButtonGap] = 0;
+ maIntegerValues[Integer_ButtonFadeInDelay] = 800;
+ maIntegerValues[Integer_ButtonFadeInDuration] = 100;
+ maIntegerValues[Integer_ButtonFadeOutDelay] = 0;
+ maIntegerValues[Integer_ButtonFadeOutDuration] = 100;
+ maIntegerValues[Integer_ToolTipDelay] = 1000;
+ maIntegerValues[Integer_FocusIndicatorWidth] = 3;
+ }
+
+ Update(rpProperties);
+}
+
+
+
+
+void Theme::Update (const ::boost::shared_ptr<controller::Properties>& rpProperties)
+{
+ const bool bSavedHighContrastMode (mbIsHighContrastMode);
+ mbIsHighContrastMode = rpProperties->IsHighContrastModeActive();
+
+ // Set up colors.
+ maBackgroundColor = rpProperties->GetBackgroundColor().GetColor();
+ maPageBackgroundColor = svtools::ColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
+
+ maColor[Color_Background] = maBackgroundColor;
+
+ maGradients.resize(_GradientColorType_Size_);
+
+ maColor[Color_Background] = maBackgroundColor;
+ const ColorData aSelectionColor (rpProperties->GetSelectionColor().GetColor());
+ maColor[Color_Selection] = aSelectionColor;
+ if (Color(aSelectionColor).IsBright())
+ maColor[Color_PageCountFontColor] = Black;
+ else
+ maColor[Color_PageCountFontColor] = White;
+
+ // Set up gradients.
+ SetGradient(Gradient_SelectedPage, aSelectionColor, 50, 50, +100,+100, +50,+25);
+ SetGradient(Gradient_MouseOverPage, aSelectionColor, 75, 75, +100,+100, +50,+25);
+ SetGradient(Gradient_SelectedAndFocusedPage, aSelectionColor, 50, 50, +100,+100, -50,-75);
+ SetGradient(Gradient_MouseOverSelectedAndFocusedPage, aSelectionColor, 75, 75, +100,+100, -50,-75);
+ SetGradient(Gradient_FocusedPage, aSelectionColor, -1,-1, 0,0, -50,-75);
+
+ SetGradient(Gradient_ButtonBackground, Black, -1,-1, 0,0, 0,0);
+ SetGradient(Gradient_NormalPage, maBackgroundColor, -1,-1, 0,0, 0,0);
+
+ // The focused gradient needs special handling because its fill color is
+ // like that of the NormalPage gradient.
+ GetGradient(Gradient_FocusedPage).maFillColor1 = GetGradient(Gradient_NormalPage).maFillColor1;
+ GetGradient(Gradient_FocusedPage).maFillColor2 = GetGradient(Gradient_NormalPage).maFillColor2;
+
+ // Set up icons.
+ if (bSavedHighContrastMode != mbIsHighContrastMode || maIcons.empty())
+ {
+ LocalResource aResource (RID_SLIDESORTER_ICONS);
+
+ maIcons.resize(_IconType_Size_);
+ if (mbIsHighContrastMode)
+ {
+ InitializeIcon(Icon_RawShadow, IMAGE_SHADOW);
+ InitializeIcon(Icon_RawInsertShadow, IMAGE_INSERT_SHADOW);
+ InitializeIcon(Icon_HideSlideOverlay, IMAGE_HIDE_SLIDE_OVERLAY);
+
+ InitializeIcon(Icon_ButtonBarLarge, IMAGE_BUTTONBAR_LARGE_HC);
+ InitializeIcon(Icon_ButtonBarMedium, IMAGE_BUTTONBAR_MEDIUM_HC);
+ InitializeIcon(Icon_ButtonBarSmall, IMAGE_BUTTONBAR_SMALL_HC);
+
+ InitializeIcon(Icon_Command1Large, IMAGE_COMMAND1_LARGE_HC);
+ InitializeIcon(Icon_Command1LargeHover, IMAGE_COMMAND1_LARGE_HOVER_HC);
+ InitializeIcon(Icon_Command1Medium, IMAGE_COMMAND1_MEDIUM_HC);
+ InitializeIcon(Icon_Command1MediumHover, IMAGE_COMMAND1_MEDIUM_HOVER_HC);
+ InitializeIcon(Icon_Command1Small, IMAGE_COMMAND1_SMALL_HC);
+ InitializeIcon(Icon_Command1SmallHover, IMAGE_COMMAND1_SMALL_HOVER_HC);
+
+ InitializeIcon(Icon_Command2Large, IMAGE_COMMAND2_LARGE_HC);
+ InitializeIcon(Icon_Command2LargeHover, IMAGE_COMMAND2_LARGE_HOVER_HC);
+ InitializeIcon(Icon_Command2Medium, IMAGE_COMMAND2_MEDIUM_HC);
+ InitializeIcon(Icon_Command2MediumHover, IMAGE_COMMAND2_MEDIUM_HOVER_HC);
+ InitializeIcon(Icon_Command2Small, IMAGE_COMMAND2_SMALL_HC);
+ InitializeIcon(Icon_Command2SmallHover, IMAGE_COMMAND2_SMALL_HOVER_HC);
+
+ InitializeIcon(Icon_Command2BLarge, IMAGE_COMMAND2B_LARGE_HC);
+ InitializeIcon(Icon_Command2BLargeHover, IMAGE_COMMAND2B_LARGE_HOVER_HC);
+ InitializeIcon(Icon_Command2BMedium, IMAGE_COMMAND2B_MEDIUM_HC);
+ InitializeIcon(Icon_Command2BMediumHover, IMAGE_COMMAND2B_MEDIUM_HOVER_HC);
+ InitializeIcon(Icon_Command2BSmall, IMAGE_COMMAND2B_SMALL_HC);
+ InitializeIcon(Icon_Command2BSmallHover, IMAGE_COMMAND2B_SMALL_HOVER_HC);
+
+ InitializeIcon(Icon_Command3Large, IMAGE_COMMAND3_LARGE_HC);
+ InitializeIcon(Icon_Command3LargeHover, IMAGE_COMMAND3_LARGE_HOVER_HC);
+ InitializeIcon(Icon_Command3Medium, IMAGE_COMMAND3_SMALL_HC);
+ InitializeIcon(Icon_Command3MediumHover, IMAGE_COMMAND3_SMALL_HOVER_HC);
+ InitializeIcon(Icon_Command3Small, IMAGE_COMMAND3_SMALL_HC);
+ InitializeIcon(Icon_Command3SmallHover, IMAGE_COMMAND3_SMALL_HOVER_HC);
+ }
+ else
+ {
+ InitializeIcon(Icon_RawShadow, IMAGE_SHADOW);
+ InitializeIcon(Icon_RawInsertShadow, IMAGE_INSERT_SHADOW);
+ InitializeIcon(Icon_HideSlideOverlay, IMAGE_HIDE_SLIDE_OVERLAY);
+
+ InitializeIcon(Icon_ButtonBarLarge, IMAGE_BUTTONBAR_LARGE);
+ InitializeIcon(Icon_ButtonBarMedium, IMAGE_BUTTONBAR_MEDIUM);
+ InitializeIcon(Icon_ButtonBarSmall, IMAGE_BUTTONBAR_SMALL);
+
+ InitializeIcon(Icon_Command1Large, IMAGE_COMMAND1_LARGE);
+ InitializeIcon(Icon_Command1LargeHover, IMAGE_COMMAND1_LARGE_HOVER);
+ InitializeIcon(Icon_Command1Medium, IMAGE_COMMAND1_MEDIUM);
+ InitializeIcon(Icon_Command1MediumHover, IMAGE_COMMAND1_MEDIUM_HOVER);
+ InitializeIcon(Icon_Command1Small, IMAGE_COMMAND1_SMALL);
+ InitializeIcon(Icon_Command1SmallHover, IMAGE_COMMAND1_SMALL_HOVER);
+
+ InitializeIcon(Icon_Command2Large, IMAGE_COMMAND2_LARGE);
+ InitializeIcon(Icon_Command2LargeHover, IMAGE_COMMAND2_LARGE_HOVER);
+ InitializeIcon(Icon_Command2Medium, IMAGE_COMMAND2_MEDIUM);
+ InitializeIcon(Icon_Command2MediumHover, IMAGE_COMMAND2_MEDIUM_HOVER);
+ InitializeIcon(Icon_Command2Small, IMAGE_COMMAND2_SMALL);
+ InitializeIcon(Icon_Command2SmallHover, IMAGE_COMMAND2_SMALL_HOVER);
+
+ InitializeIcon(Icon_Command2BLarge, IMAGE_COMMAND2B_LARGE);
+ InitializeIcon(Icon_Command2BLargeHover, IMAGE_COMMAND2B_LARGE_HOVER);
+ InitializeIcon(Icon_Command2BMedium, IMAGE_COMMAND2B_MEDIUM);
+ InitializeIcon(Icon_Command2BMediumHover, IMAGE_COMMAND2B_MEDIUM_HOVER);
+ InitializeIcon(Icon_Command2BSmall, IMAGE_COMMAND2B_SMALL);
+ InitializeIcon(Icon_Command2BSmallHover, IMAGE_COMMAND2B_SMALL_HOVER);
+
+ InitializeIcon(Icon_Command3Large, IMAGE_COMMAND3_LARGE);
+ InitializeIcon(Icon_Command3LargeHover, IMAGE_COMMAND3_LARGE_HOVER);
+ InitializeIcon(Icon_Command3Medium, IMAGE_COMMAND3_MEDIUM);
+ InitializeIcon(Icon_Command3MediumHover, IMAGE_COMMAND3_MEDIUM_HOVER);
+ InitializeIcon(Icon_Command3Small, IMAGE_COMMAND3_SMALL);
+ InitializeIcon(Icon_Command3SmallHover, IMAGE_COMMAND3_SMALL_HOVER);
+ }
+ InitializeIcon(Icon_FocusBorder, IMAGE_FOCUS_BORDER);
+ }
+}
+
+
+
+
+::boost::shared_ptr<Font> Theme::GetFont (
+ const FontType eType,
+ const OutputDevice& rDevice)
+{
+ ::boost::shared_ptr<Font> pFont;
+
+ switch (eType)
+ {
+ case Font_PageNumber:
+ pFont.reset(new Font(Application::GetSettings().GetStyleSettings().GetAppFont()));
+ pFont->SetTransparent(TRUE);
+ pFont->SetWeight(WEIGHT_BOLD);
+ break;
+
+ case Font_PageCount:
+ pFont.reset(new Font(Application::GetSettings().GetStyleSettings().GetAppFont()));
+ pFont->SetTransparent(TRUE);
+ pFont->SetWeight(WEIGHT_NORMAL);
+ {
+ const Size aSize (pFont->GetSize());
+ pFont->SetSize(Size(aSize.Width()*5/3, aSize.Height()*5/3));
+ }
+ break;
+
+ case Font_Button:
+ pFont.reset(new Font(Application::GetSettings().GetStyleSettings().GetAppFont()));
+ pFont->SetTransparent(TRUE);
+ pFont->SetWeight(WEIGHT_BOLD);
+ {
+ const Size aSize (pFont->GetSize());
+ pFont->SetSize(Size(aSize.Width()*4/3, aSize.Height()*4/3));
+ }
+ break;
+ }
+
+ if (pFont)
+ {
+ // Transform the point size to pixel size.
+ const MapMode aFontMapMode (MAP_POINT);
+ const Size aFontSize (rDevice.LogicToPixel(pFont->GetSize(), aFontMapMode));
+
+ // Transform the font size to the logical coordinates of the device.
+ pFont->SetSize(rDevice.PixelToLogic(aFontSize));
+ }
+
+ return pFont;
+}
+
+
+
+
+ColorData Theme::GetColor (const ColorType eType)
+{
+ if (eType>=0 && sal_uInt32(eType)<maColor.size())
+ return maColor[eType];
+ else
+ return 0;
+}
+
+
+
+
+void Theme::SetColor (
+ const ColorType eType,
+ const ColorData aData)
+{
+ if (eType>=0 && sal_uInt32(eType)<maColor.size())
+ maColor[eType] = aData;
+}
+
+
+
+
+ColorData Theme::GetGradientColor (
+ const GradientColorType eType,
+ const GradientColorClass eClass)
+{
+ GradientDescriptor& rDescriptor (GetGradient(eType));
+
+ switch (eClass)
+ {
+ case Border1: return rDescriptor.maBorderColor1;
+ case Border2: return rDescriptor.maBorderColor2;
+ case Fill1: return rDescriptor.maFillColor1;
+ case Fill2: return rDescriptor.maFillColor2;
+ default: OSL_ASSERT(false); // fall through
+ case Base: return rDescriptor.maBaseColor;
+ }
+}
+
+
+
+
+sal_Int32 Theme::GetGradientOffset (
+ const GradientColorType eType,
+ const GradientColorClass eClass)
+{
+ GradientDescriptor& rDescriptor (GetGradient(eType));
+
+ switch (eClass)
+ {
+ case Border1: return rDescriptor.mnBorderOffset1;
+ case Border2: return rDescriptor.mnBorderOffset2;
+ case Fill1: return rDescriptor.mnFillOffset1;
+ case Fill2: return rDescriptor.mnFillOffset2;
+ default: OSL_ASSERT(false); // fall through
+ case Base: return 0;
+ }
+}
+
+
+
+
+void Theme::SetGradient (
+ const GradientColorType eType,
+ const ColorData aBaseColor,
+ const sal_Int32 nSaturationOverride,
+ const sal_Int32 nBrightnessOverride,
+ const sal_Int32 nFillStartOffset,
+ const sal_Int32 nFillEndOffset,
+ const sal_Int32 nBorderStartOffset,
+ const sal_Int32 nBorderEndOffset)
+{
+ GradientDescriptor& rGradient (GetGradient(eType));
+
+ rGradient.maBaseColor = aBaseColor;
+
+ rGradient.mnSaturationOverride = nSaturationOverride;
+ rGradient.mnBrightnessOverride = nBrightnessOverride;
+ const ColorData aColor (nSaturationOverride>=0 || nBrightnessOverride>=0
+ ? HGBAdapt(aBaseColor, nSaturationOverride, nBrightnessOverride)
+ : aBaseColor);
+
+ rGradient.maFillColor1 = ChangeLuminance(aColor, nFillStartOffset);
+ rGradient.maFillColor2 = ChangeLuminance(aColor, nFillEndOffset);
+ rGradient.maBorderColor1 = ChangeLuminance(aColor, nBorderStartOffset);
+ rGradient.maBorderColor2 = ChangeLuminance(aColor, nBorderEndOffset);
+
+ rGradient.mnFillOffset1 = nFillStartOffset;
+ rGradient.mnFillOffset2 = nFillEndOffset;
+ rGradient.mnBorderOffset1 = nBorderStartOffset;
+ rGradient.mnBorderOffset2 = nBorderEndOffset;
+}
+
+
+
+
+sal_Int32 Theme::GetGradientSaturationOverride (const GradientColorType eType)
+{
+ GradientDescriptor& rGradient (GetGradient(eType));
+ return rGradient.mnSaturationOverride;
+}
+
+
+
+
+sal_Int32 Theme::GetGradientBrightnessOverride (const GradientColorType eType)
+{
+ GradientDescriptor& rGradient (GetGradient(eType));
+ return rGradient.mnBrightnessOverride;
+}
+
+
+
+
+void Theme::SetGradientSaturationOverride (const GradientColorType eType, const sal_Int32 nValue)
+{
+ GradientDescriptor& rGradient (GetGradient(eType));
+ SetGradient(
+ eType,
+ rGradient.maBaseColor,
+ nValue,
+ rGradient.mnBrightnessOverride,
+ rGradient.mnFillOffset1,
+ rGradient.mnFillOffset2,
+ rGradient.mnBorderOffset1,
+ rGradient.mnBorderOffset2);
+}
+
+
+
+
+void Theme::SetGradientBrightnessOverride (const GradientColorType eType, const sal_Int32 nValue)
+{
+ GradientDescriptor& rGradient (GetGradient(eType));
+ SetGradient(eType,
+ rGradient.maBaseColor,
+ rGradient.mnSaturationOverride,
+ nValue,
+ rGradient.mnFillOffset1,
+ rGradient.mnFillOffset2,
+ rGradient.mnBorderOffset1,
+ rGradient.mnBorderOffset2);
+}
+
+
+
+
+const BitmapEx& Theme::GetIcon (const IconType eType)
+{
+ if (eType>=0 && size_t(eType)<maIcons.size())
+ return maIcons[eType];
+ else
+ {
+ OSL_ASSERT(eType>=0 && size_t(eType)<maIcons.size());
+ return maIcons[0];
+ }
+}
+
+
+
+
+sal_Int32 Theme::GetIntegerValue (const IntegerValueType eType) const
+{
+ if (eType>=0 && size_t(eType)<maIntegerValues.size())
+ return maIntegerValues[eType];
+ else
+ {
+ OSL_ASSERT(eType>=0 && size_t(eType)<maIntegerValues.size());
+ return 0;
+ }
+}
+
+
+
+
+void Theme::SetIntegerValue (const IntegerValueType eType, const sal_Int32 nValue)
+{
+ if (eType>=0 && size_t(eType)<maIntegerValues.size())
+ maIntegerValues[eType] = nValue;
+ else
+ {
+ OSL_ASSERT(eType>=0 && size_t(eType)<maIntegerValues.size());
+ }
+}
+
+
+
+
+::rtl::OUString Theme::GetString (const StringType eType) const
+{
+ if (eType>=0 && size_t(eType)<maStrings.size())
+ return maStrings[eType];
+ else
+ {
+ OSL_ASSERT(eType>=0 && size_t(eType)<maStrings.size());
+ return ::rtl::OUString();
+ }
+}
+
+
+
+
+Theme::GradientDescriptor& Theme::GetGradient (const GradientColorType eType)
+{
+ if (eType>=0 && size_t(eType)<maGradients.size())
+ return maGradients[eType];
+ else
+ {
+ OSL_ASSERT(eType>=0 && size_t(eType)<maGradients.size());
+ return maGradients[0];
+ }
+}
+
+
+
+
+void Theme::InitializeIcon (const IconType eType, USHORT nResourceId)
+{
+ if (eType>=0 && size_t(eType)<maIcons.size())
+ {
+ const BitmapEx aIcon (Image(SdResId(nResourceId)).GetBitmapEx());
+ maIcons[eType] = aIcon;
+ }
+ else
+ {
+ OSL_ASSERT(eType>=0 && size_t(eType)<maIcons.size());
+ }
+}
+
+
+
+
+} } } // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsToolTip.cxx b/sd/source/ui/slidesorter/view/SlsToolTip.cxx
new file mode 100644
index 000000000000..211760ef2002
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsToolTip.cxx
@@ -0,0 +1,230 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "view/SlsToolTip.hxx"
+#include "view/SlideSorterView.hxx"
+#include "view/SlsLayouter.hxx"
+#include "view/SlsTheme.hxx"
+#include "sdpage.hxx"
+#include "sdresid.hxx"
+#include "glob.hrc"
+#include <vcl/help.hxx>
+
+using ::rtl::OUString;
+
+namespace sd { namespace slidesorter { namespace view {
+
+ToolTip::ToolTip (SlideSorter& rSlideSorter)
+ : mrSlideSorter(rSlideSorter),
+ msDefaultHelpText(),
+ msCurrentHelpText(),
+ mnHelpWindowHandle(0),
+ maTimer()
+{
+ maTimer.SetTimeout(rSlideSorter.GetTheme()->GetIntegerValue(Theme::Integer_ToolTipDelay));
+ maTimer.SetTimeoutHdl(LINK(this, ToolTip, DelayTrigger));
+}
+
+
+
+
+ToolTip::~ToolTip (void)
+{
+ maTimer.Stop();
+ Hide();
+}
+
+
+
+
+void ToolTip::SetPage (const model::SharedPageDescriptor& rpDescriptor)
+{
+ if (mpDescriptor != rpDescriptor)
+ {
+ maTimer.Stop();
+ Hide();
+
+ mpDescriptor = rpDescriptor;
+
+ if (mpDescriptor)
+ {
+ SdPage* pPage = mpDescriptor->GetPage();
+ OUString sHelpText;
+ if (pPage != NULL)
+ sHelpText = pPage->GetName();
+ else
+ {
+ OSL_ASSERT(mpDescriptor->GetPage() != NULL);
+ }
+ if (sHelpText.getLength() == 0)
+ {
+ sHelpText = String(SdResId(STR_PAGE));
+ sHelpText += String::CreateFromInt32(mpDescriptor->GetPageIndex()+1);
+ }
+
+ msDefaultHelpText = sHelpText;
+ msCurrentHelpText = sHelpText;
+ Show(false);
+ }
+ else
+ {
+ msDefaultHelpText = OUString();
+ msCurrentHelpText = OUString();
+ }
+ }
+}
+
+
+
+
+void ToolTip::ShowDefaultHelpText (const ::rtl::OUString& rsHelpText)
+{
+ if (msDefaultHelpText != rsHelpText)
+ {
+ const bool bIsVisible (Hide());
+
+ msDefaultHelpText = rsHelpText;
+ msCurrentHelpText = rsHelpText;
+
+ Show(bIsVisible);
+ }
+}
+
+
+
+
+void ToolTip::ShowDefaultHelpText (void)
+{
+ if (msCurrentHelpText != msDefaultHelpText)
+ {
+ const bool bIsVisible (Hide());
+
+ msCurrentHelpText = msDefaultHelpText;
+
+ Show(bIsVisible);
+ }
+}
+
+
+
+
+void ToolTip::ShowHelpText (const ::rtl::OUString& rsHelpText)
+{
+ if (msCurrentHelpText != rsHelpText)
+ {
+ const bool bIsVisible (Hide());
+
+ msCurrentHelpText = rsHelpText;
+
+ Show(bIsVisible);
+ }
+}
+
+
+
+
+void ToolTip::Show (const bool bNoDelay)
+{
+ if (bNoDelay)
+ DoShow();
+ else
+ maTimer.Start();
+}
+
+
+
+
+void ToolTip::DoShow (void)
+{
+ if (maTimer.IsActive())
+ {
+ // The delay timer is active. Wait for it to trigger the showing of
+ // the tool tip.
+ return;
+ }
+
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (msCurrentHelpText.getLength()>0 && pWindow)
+ {
+ Rectangle aBox (
+ mrSlideSorter.GetView().GetLayouter().GetPageObjectLayouter()->GetBoundingBox(
+ mpDescriptor,
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::WindowCoordinateSystem));
+
+ // Do not show the help text when the (lower edge of the ) preview
+ // is not visible. The tool tip itself may still be outside the
+ // window.
+ if (aBox.Bottom() >= pWindow->GetSizePixel().Height())
+ return;
+
+ ::Window* pParent (pWindow.get());
+ while (pParent!=NULL && pParent->GetParent()!=NULL)
+ pParent = pParent->GetParent();
+ const Point aOffset (pWindow->GetWindowExtentsRelative(pParent).TopLeft());
+
+ // We do not know how high the tool tip will be but want its top
+ // edge not its bottom to be at a specific position (a little below
+ // the preview). Therefore we use a little trick and place the tool
+ // tip at the top of a rectangle that is placed below the preview.
+ aBox.Move(aOffset.X(), aOffset.Y() + aBox.GetHeight() + 3);
+ mnHelpWindowHandle = Help::ShowTip(
+ pWindow.get(),
+ aBox,
+ msCurrentHelpText,
+ QUICKHELP_CENTER | QUICKHELP_TOP);
+ }
+}
+
+
+
+
+bool ToolTip::Hide (void)
+{
+ if (mnHelpWindowHandle>0)
+ {
+ Help::HideTip(mnHelpWindowHandle);
+ mnHelpWindowHandle = 0;
+ return true;
+ }
+ else
+ return false;
+}
+
+
+
+
+IMPL_LINK(ToolTip, DelayTrigger, void*, EMPTYARG)
+{
+ DoShow();
+
+ return 0;
+}
+
+} } } // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx b/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
index 57872105e1cc..f46e205e7ba8 100644..100755
--- a/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
+++ b/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
@@ -24,18 +24,16 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
#include "precompiled_sd.hxx"
#include "SlsViewCacheContext.hxx"
+#include "SlideSorter.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "view/SlideSorterView.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
#include "sdpage.hxx"
#include "Window.hxx"
#include "drawdoc.hxx"
@@ -48,11 +46,9 @@
namespace sd { namespace slidesorter { namespace view {
-ViewCacheContext::ViewCacheContext (
- model::SlideSorterModel& rModel,
- SlideSorterView& rView)
- : mrModel(rModel),
- mrView(rView)
+ViewCacheContext::ViewCacheContext (SlideSorter& rSlideSorter)
+ : mrModel(rSlideSorter.GetModel()),
+ mrSlideSorter(rSlideSorter)
{
}
@@ -68,22 +64,17 @@ ViewCacheContext::~ViewCacheContext (void)
void ViewCacheContext::NotifyPreviewCreation (
cache::CacheKey aKey,
- const ::boost::shared_ptr<BitmapEx>& rPreview)
+ const Bitmap&)
{
- (void)rPreview;
const model::SharedPageDescriptor pDescriptor (GetDescriptor(aKey));
if (pDescriptor.get() != NULL)
{
- // Use direct view-invalidate here and no ActionChanged() at the VC
- // since the VC is a PageObjectViewObjectContact and in its ActionChanged()
- // implementation invalidates the cache entry again.
- view::PageObjectViewObjectContact* pContact = pDescriptor->GetViewObjectContact();
- if (pContact != NULL)
- pContact->GetObjectContact().InvalidatePartOfView(pContact->getObjectRange());
+ // Force a repaint that will trigger their re-creation.
+ mrSlideSorter.GetView().RequestRepaint(pDescriptor);
}
else
{
- OSL_ASSERT(pDescriptor.get() != NULL);
+ OSL_ASSERT(pDescriptor);
}
}
@@ -92,7 +83,7 @@ void ViewCacheContext::NotifyPreviewCreation (
bool ViewCacheContext::IsIdle (void)
{
- sal_Int32 nIdleState (tools::IdleDetection::GetIdleState(mrView.GetWindow()));
+ sal_Int32 nIdleState (tools::IdleDetection::GetIdleState(mrSlideSorter.GetContentWindow().get()));
if (nIdleState == tools::IdleDetection::IDET_IDLE)
return true;
else
@@ -104,7 +95,8 @@ bool ViewCacheContext::IsIdle (void)
bool ViewCacheContext::IsVisible (cache::CacheKey aKey)
{
- return GetDescriptor(aKey)->IsVisible();
+ const model::SharedPageDescriptor pDescriptor (GetDescriptor(aKey));
+ return pDescriptor && pDescriptor->HasState(model::PageDescriptor::ST_Visible);
}
diff --git a/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx b/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx
index e29b65068d1d..0f52047b4769 100644..100755
--- a/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx
+++ b/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx
@@ -35,9 +35,11 @@ namespace sd { namespace slidesorter { namespace model {
class SlideSorterModel;
} } }
-namespace sd { namespace slidesorter { namespace view {
+namespace sd { namespace slidesorter {
+class SlideSorter;
+} }
-class SlideSorterView;
+namespace sd { namespace slidesorter { namespace view {
/** The cache context for the SlideSorter as used by Draw and Impress. See
the base class for documentation of the individual methods.
@@ -45,11 +47,9 @@ class SlideSorterView;
class ViewCacheContext : public cache::CacheContext
{
public:
- ViewCacheContext (
- model::SlideSorterModel& rModel,
- SlideSorterView& rView);
+ ViewCacheContext (SlideSorter& rSlideSorter);
virtual ~ViewCacheContext (void);
- virtual void NotifyPreviewCreation (cache::CacheKey aKey, const ::boost::shared_ptr<BitmapEx>& rPreview);
+ virtual void NotifyPreviewCreation (cache::CacheKey aKey, const Bitmap& rPreview);
virtual bool IsIdle (void);
virtual bool IsVisible (cache::CacheKey aKey);
virtual const SdrPage* GetPage (cache::CacheKey aKey);
@@ -59,7 +59,7 @@ public:
private:
model::SlideSorterModel& mrModel;
- SlideSorterView& mrView;
+ SlideSorter& mrSlideSorter;
model::SharedPageDescriptor GetDescriptor (cache::CacheKey aKey);
};
diff --git a/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx b/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx
deleted file mode 100644
index 32576240036c..000000000000
--- a/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx
+++ /dev/null
@@ -1,606 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "precompiled_sd.hxx"
-
-#include "view/SlsViewOverlay.hxx"
-
-#include "SlideSorter.hxx"
-#include "model/SlideSorterModel.hxx"
-#include "model/SlsPageDescriptor.hxx"
-#include "model/SlsPageEnumeration.hxx"
-#include "view/SlideSorterView.hxx"
-#include "SlideSorterViewShell.hxx"
-#include "view/SlsLayouter.hxx"
-#include "view/SlsPageObject.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
-#include "ViewShell.hxx"
-#include "ViewShellBase.hxx"
-#include "UpdateLockManager.hxx"
-
-#include "Window.hxx"
-#include "sdpage.hxx"
-
-#include <basegfx/range/b2drectangle.hxx>
-#include <basegfx/range/b2drange.hxx>
-#include <basegfx/range/b2irange.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/polygon/b2dpolygon.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
-#include <basegfx/polygon/b2dpolypolygontools.hxx>
-#include <basegfx/matrix/b2dhommatrixtools.hxx>
-
-#include <svx/sdr/overlay/overlaymanager.hxx>
-#include <svx/svdpagv.hxx>
-#include <svx/sdrpagewindow.hxx>
-#include <vcl/svapp.hxx>
-
-#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
-#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
-
-using namespace ::sdr::overlay;
-
-namespace {
- const static sal_Int32 gnSubstitutionStripeLength (3);
-}
-
-namespace sd { namespace slidesorter { namespace view {
-
-//===== ViewOverlay =========================================================
-
-ViewOverlay::ViewOverlay (SlideSorter& rSlideSorter)
- : mrSlideSorter(rSlideSorter),
- maSelectionRectangleOverlay(*this),
- maMouseOverIndicatorOverlay(*this),
- maInsertionIndicatorOverlay(*this),
- maSubstitutionOverlay(*this)
-{
-}
-
-
-
-
-ViewOverlay::~ViewOverlay (void)
-{
-}
-
-
-
-
-SelectionRectangleOverlay& ViewOverlay::GetSelectionRectangleOverlay (void)
-{
- return maSelectionRectangleOverlay;
-}
-
-
-
-
-MouseOverIndicatorOverlay& ViewOverlay::GetMouseOverIndicatorOverlay (void)
-{
- return maMouseOverIndicatorOverlay;
-}
-
-
-
-
-InsertionIndicatorOverlay& ViewOverlay::GetInsertionIndicatorOverlay (void)
-{
- return maInsertionIndicatorOverlay;
-}
-
-
-
-
-SubstitutionOverlay& ViewOverlay::GetSubstitutionOverlay (void)
-{
- return maSubstitutionOverlay;
-}
-
-
-
-
-SlideSorter& ViewOverlay::GetSlideSorter (void) const
-{
- return mrSlideSorter;
-}
-
-
-
-
-OverlayManager* ViewOverlay::GetOverlayManager (void) const
-{
- OverlayManager* pOverlayManager = NULL;
-
- SlideSorterView& rView (mrSlideSorter.GetView());
- SdrPageView* pPageView = rView.GetSdrPageView();
- if (pPageView != NULL && pPageView->PageWindowCount()>0)
- {
- SdrPageWindow* pPageWindow = pPageView->GetPageWindow(0);
- if (pPageWindow != NULL)
- pOverlayManager = pPageWindow->GetOverlayManager();
- }
-
- return pOverlayManager;
-}
-
-
-
-
-//===== OverlayBase =========================================================
-
-OverlayBase::OverlayBase (ViewOverlay& rViewOverlay)
- : OverlayObject(Color(0,0,0)),
- mrViewOverlay(rViewOverlay)
-{
- setVisible(false);
-}
-
-
-
-
-OverlayBase::~OverlayBase (void)
-{
- OSL_ENSURE(!getOverlayManager(), "Please call RemoveRegistration() in the derived class; it's too late to call it in the base class since virtual methods will be missing when called in the destructor.");
-}
-
-
-
-
-void OverlayBase::EnsureRegistration (void)
-{
- if (getOverlayManager() == NULL)
- {
- OverlayManager* pOverlayManager = mrViewOverlay.GetOverlayManager();
- if (pOverlayManager != NULL)
- pOverlayManager->add(*this);
- }
-}
-
-
-
-
-void OverlayBase::RemoveRegistration()
-{
- OverlayManager* pOverlayManager = getOverlayManager();
- if (pOverlayManager != NULL)
- pOverlayManager->remove(*this);
-}
-
-
-
-
-//===== SubstitutionOverlay =================================================
-
-SubstitutionOverlay::SubstitutionOverlay (ViewOverlay& rViewOverlay)
- : OverlayBase(rViewOverlay),
- maPosition(0,0),
- maShapes()
-{
-}
-
-
-
-
-SubstitutionOverlay::~SubstitutionOverlay (void)
-{
- RemoveRegistration();
-}
-
-
-
-
-void SubstitutionOverlay::Create (
- model::PageEnumeration& rSelection,
- const Point& rPosition)
-{
- EnsureRegistration();
-
- maPosition = rPosition;
-
- maShapes.clear();
- while (rSelection.HasMoreElements())
- {
- const Rectangle aBox (rSelection.GetNextElement()->GetPageObject()->GetCurrentBoundRect());
- basegfx::B2DRectangle aB2DBox(
- aBox.Left(),
- aBox.Top(),
- aBox.Right(),
- aBox.Bottom());
- maShapes.append(basegfx::tools::createPolygonFromRect(aB2DBox), 4);
- }
-
- setVisible(maShapes.count() > 0);
- // The selection indicator may have been visible already so call
- // objectChange() to enforce an update.
- objectChange();
-}
-
-
-
-
-void SubstitutionOverlay::Clear (void)
-{
- maShapes.clear();
- setVisible(false);
-}
-
-
-
-
-void SubstitutionOverlay::Move (const Point& rOffset)
-{
- const basegfx::B2DHomMatrix aTranslation(basegfx::tools::createTranslateB2DHomMatrix(rOffset.X(), rOffset.Y()));
-
- maShapes.transform(aTranslation);
- maPosition += rOffset;
-
- objectChange();
-}
-
-
-
-
-void SubstitutionOverlay::SetPosition (const Point& rPosition)
-{
- Move(rPosition - GetPosition());
-}
-
-
-
-
-Point SubstitutionOverlay::GetPosition (void) const
-{
- return maPosition;
-}
-
-
-
-
-drawinglayer::primitive2d::Primitive2DSequence SubstitutionOverlay::createOverlayObjectPrimitive2DSequence()
-{
- drawinglayer::primitive2d::Primitive2DSequence aRetval;
- const sal_uInt32 nCount(maShapes.count());
-
- if(nCount && getOverlayManager())
- {
- aRetval.realloc(nCount);
- const basegfx::BColor aRGBColorA(getOverlayManager()->getStripeColorA().getBColor());
- const basegfx::BColor aRGBColorB(getOverlayManager()->getStripeColorB().getBColor());
-
- for(sal_uInt32 a(0); a < nCount; a++)
- {
- aRetval[a] = drawinglayer::primitive2d::Primitive2DReference(
- new drawinglayer::primitive2d::PolygonMarkerPrimitive2D(
- maShapes.getB2DPolygon(a),
- aRGBColorA,
- aRGBColorB,
- gnSubstitutionStripeLength));
- }
- }
-
- return aRetval;
-}
-
-void SubstitutionOverlay::stripeDefinitionHasChanged()
-{
- // react on OverlayManager's stripe definition change
- objectChange();
-}
-
-
-//===== SelectionRectangleOverlay ===========================================
-
-SelectionRectangleOverlay::SelectionRectangleOverlay (ViewOverlay& rViewOverlay)
- : OverlayBase (rViewOverlay),
- maAnchor(0,0),
- maSecondCorner(0,0)
-{
-}
-
-
-
-SelectionRectangleOverlay::~SelectionRectangleOverlay()
-{
- RemoveRegistration();
-}
-
-
-
-
-Rectangle SelectionRectangleOverlay::GetSelectionRectangle (void)
-{
- return Rectangle(maAnchor, maSecondCorner);
-}
-
-
-
-
-void SelectionRectangleOverlay::Start (const Point& rAnchor)
-{
- EnsureRegistration();
- setVisible(false);
- maAnchor = rAnchor;
-}
-
-
-
-
-void SelectionRectangleOverlay::Update (const Point& rSecondCorner)
-{
- maSecondCorner = rSecondCorner;
- setVisible(true);
- // The selection rectangle may have been visible already so call
- // objectChange() to enforce an update.
- objectChange();
-}
-
-
-
-
-drawinglayer::primitive2d::Primitive2DSequence SelectionRectangleOverlay::createOverlayObjectPrimitive2DSequence()
-{
- drawinglayer::primitive2d::Primitive2DSequence aRetval;
- const basegfx::B2DRange aRange(maAnchor.X(), maAnchor.Y(), maSecondCorner.X(), maSecondCorner.Y());
- const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(aRange));
-
- if(aPolygon.count())
- {
- const basegfx::BColor aRGBColorA(getOverlayManager()->getStripeColorA().getBColor());
- const basegfx::BColor aRGBColorB(getOverlayManager()->getStripeColorB().getBColor());
- const drawinglayer::primitive2d::Primitive2DReference xReference(
- new drawinglayer::primitive2d::PolygonMarkerPrimitive2D(
- aPolygon,
- aRGBColorA,
- aRGBColorB,
- gnSubstitutionStripeLength));
-
- aRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
- }
-
- return aRetval;
-}
-
-void SelectionRectangleOverlay::stripeDefinitionHasChanged()
-{
- // react on OverlayManager's stripe definition change
- objectChange();
-}
-
-
-
-
-//===== InsertionIndicatorOverlay ===========================================
-
-InsertionIndicatorOverlay::InsertionIndicatorOverlay (ViewOverlay& rViewOverlay)
- : OverlayBase (rViewOverlay),
- mnInsertionIndex(-1),
- maBoundingBox()
-{
-}
-
-
-
-
-InsertionIndicatorOverlay::~InsertionIndicatorOverlay()
-{
- RemoveRegistration();
-}
-
-
-
-
-void InsertionIndicatorOverlay::SetPositionAndSize (const Rectangle& aNewBoundingBox)
-{
- EnsureRegistration();
- maBoundingBox = aNewBoundingBox;
- setVisible( ! maBoundingBox.IsEmpty());
- // The insertion indicator may have been visible already so call
- // objectChange() to enforce an update.
- objectChange();
-}
-
-
-
-
-void InsertionIndicatorOverlay::SetPosition (const Point& rPoint)
-{
- static const bool bAllowHorizontalInsertMarker = true;
- Layouter& rLayouter (mrViewOverlay.GetSlideSorter().GetView().GetLayouter());
- USHORT nPageCount
- = (USHORT)mrViewOverlay.GetSlideSorter().GetModel().GetPageCount();
-
- sal_Int32 nInsertionIndex = rLayouter.GetInsertionIndex (rPoint,
- bAllowHorizontalInsertMarker);
- if (nInsertionIndex >= nPageCount)
- nInsertionIndex = nPageCount-1;
- sal_Int32 nDrawIndex = nInsertionIndex;
-
- bool bVertical = false;
- bool bLeftOrTop = false;
- if (nInsertionIndex >= 0)
- {
- // Now that we know where to insert, we still have to determine
- // where to draw the marker. There are two decisions to make:
- // 1. Draw a vertical or a horizontal insert marker.
- // The horizontal one may only be chosen when there is only one
- // column.
- // 2. The vertical (standard) insert marker may be painted left to
- // the insert page or right of the previous one. When both pages
- // are in the same row this makes no difference. Otherwise the
- // posiotions are at the left and right ends of two rows.
-
- Point aPageCenter (rLayouter.GetPageObjectBox (
- nInsertionIndex).Center());
-
- if (bAllowHorizontalInsertMarker
- && rLayouter.GetColumnCount() == 1)
- {
- bVertical = false;
- bLeftOrTop = (rPoint.Y() <= aPageCenter.Y());
- }
- else
- {
- bVertical = true;
- bLeftOrTop = (rPoint.X() <= aPageCenter.X());
- }
-
- // Add one when the mark was painted below or to the right of the
- // page object.
- if ( ! bLeftOrTop)
- nInsertionIndex += 1;
- }
-
- mnInsertionIndex = nInsertionIndex;
-
- Rectangle aBox;
- if (mnInsertionIndex >= 0)
- aBox = rLayouter.GetInsertionMarkerBox (
- nDrawIndex,
- bVertical,
- bLeftOrTop);
- SetPositionAndSize (aBox);
-}
-
-
-
-
-sal_Int32 InsertionIndicatorOverlay::GetInsertionPageIndex (void) const
-{
- return mnInsertionIndex;
-}
-
-
-
-
-drawinglayer::primitive2d::Primitive2DSequence InsertionIndicatorOverlay::createOverlayObjectPrimitive2DSequence()
-{
- drawinglayer::primitive2d::Primitive2DSequence aRetval(2);
- const basegfx::B2DRange aRange(maBoundingBox.Left(), maBoundingBox.Top(), maBoundingBox.Right(), maBoundingBox.Bottom());
- const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(aRange));
- const basegfx::BColor aRGBColor(Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetFontColor().getBColor());
-
- aRetval[0] = drawinglayer::primitive2d::Primitive2DReference(
- new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
- basegfx::B2DPolyPolygon(aPolygon),
- aRGBColor));
- aRetval[1] = drawinglayer::primitive2d::Primitive2DReference(
- new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
- aPolygon,
- aRGBColor));
-
- return aRetval;
-}
-
-
-
-
-//===== MouseOverIndicatorOverlay ===========================================
-
-MouseOverIndicatorOverlay::MouseOverIndicatorOverlay (ViewOverlay& rViewOverlay)
- : OverlayBase (rViewOverlay),
- mpPageUnderMouse()
-{
-}
-
-
-
-
-MouseOverIndicatorOverlay::~MouseOverIndicatorOverlay (void)
-{
- RemoveRegistration();
-}
-
-
-
-
-void MouseOverIndicatorOverlay::SetSlideUnderMouse (
- const model::SharedPageDescriptor& rpDescriptor)
-{
- ViewShellBase* pBase = mrViewOverlay.GetSlideSorter().GetViewShellBase();
- if (pBase==NULL || ! pBase->GetUpdateLockManager()->IsLocked())
- {
- model::SharedPageDescriptor pDescriptor;
- if ( ! mpPageUnderMouse.expired())
- {
- try
- {
- pDescriptor = model::SharedPageDescriptor(mpPageUnderMouse);
- }
- catch (::boost::bad_weak_ptr)
- {
- }
- }
-
- if (pDescriptor != rpDescriptor)
- {
- // Switch to the new (possibly empty) descriptor.
- mpPageUnderMouse = rpDescriptor;
-
- EnsureRegistration();
-
- // Show the indicator when a valid page descriptor is given.
- setVisible( ! mpPageUnderMouse.expired());
- // The mouse over indicator may have been visible already so call
- // objectChange() to enforce an update.
- objectChange();
- }
- }
-}
-
-
-
-
-drawinglayer::primitive2d::Primitive2DSequence MouseOverIndicatorOverlay::createOverlayObjectPrimitive2DSequence()
-{
- view::PageObjectViewObjectContact* pContact = GetViewObjectContact();
-
- if(pContact)
- {
- return pContact->createMouseOverEffectPrimitive2DSequence();
- }
-
- return drawinglayer::primitive2d::Primitive2DSequence();
-}
-
-
-
-
-view::PageObjectViewObjectContact* MouseOverIndicatorOverlay::GetViewObjectContact (void) const
-{
- if ( ! mpPageUnderMouse.expired())
- {
- model::SharedPageDescriptor pDescriptor (mpPageUnderMouse);
- return pDescriptor->GetViewObjectContact();
- }
- return NULL;
-}
-
-
-
-
-} } } // end of namespace ::sd::slidesorter::view
-
diff --git a/sd/source/ui/slidesorter/view/makefile.mk b/sd/source/ui/slidesorter/view/makefile.mk
index 388139b1cee9..3c5fc39c3ede 100644..100755
--- a/sd/source/ui/slidesorter/view/makefile.mk
+++ b/sd/source/ui/slidesorter/view/makefile.mk
@@ -35,6 +35,8 @@ ENABLE_EXCEPTIONS=TRUE
AUTOSEG=true
PRJINC=..$/..
+IMGLST_SRS=$(SRS)$/$(TARGET).srs
+
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
@@ -42,18 +44,24 @@ PRJINC=..$/..
# --- Files --------------------------------------------------------
-SLOFILES = \
- $(SLO)$/SlsFontProvider.obj \
- $(SLO)$/SlsPageObject.obj \
- $(SLO)$/SlsPageObjectViewContact.obj \
- $(SLO)$/SlsPageObjectViewObjectContact.obj \
- $(SLO)$/SlsLayouter.obj \
- $(SLO)$/SlideSorterView.obj \
- $(SLO)$/SlsViewCacheContext.obj \
- $(SLO)$/SlsViewOverlay.obj
-
-EXCEPTIONSFILES= \
- $(SLO)$/SlsPageObjectViewObjectContact.obj
+SRS1NAME=$(TARGET)
+SRC1FILES = \
+ SlsResource.src
+
+SLOFILES = \
+ $(SLO)$/SlideSorterView.obj \
+ $(SLO)$/SlsButtonBar.obj \
+ $(SLO)$/SlsFontProvider.obj \
+ $(SLO)$/SlsFramePainter.obj \
+ $(SLO)$/SlsInsertAnimator.obj \
+ $(SLO)$/SlsInsertionIndicatorOverlay.obj\
+ $(SLO)$/SlsLayeredDevice.obj \
+ $(SLO)$/SlsLayouter.obj \
+ $(SLO)$/SlsPageObjectLayouter.obj \
+ $(SLO)$/SlsPageObjectPainter.obj \
+ $(SLO)$/SlsTheme.obj \
+ $(SLO)$/SlsToolTip.obj \
+ $(SLO)$/SlsViewCacheContext.obj
# --- Tagets -------------------------------------------------------
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx
index 35b02497575e..94940d19ebd1 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx
@@ -153,7 +153,7 @@ bool MasterPageContainerQueue::RequestPreview (const SharedMasterPageDescriptor&
PreviewCreationRequest::CompareToken(rpDescriptor->maToken)));
// When a request for the same token exists then the lowest of the
// two priorities is used.
- if (HasRequest(rpDescriptor->maToken))
+ if (iRequest != mpRequestQueue->end())
if (iRequest->mnPriority < nPriority)
{
mpRequestQueue->erase(iRequest);
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index c416e689efcf..3b6e8339c22d 100755..100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -43,6 +43,11 @@
#include <tools/link.hxx>
#include <vcl/svapp.hxx>
#include <tools/diagnose_ex.h>
+#include <svx/sdr/contact/viewobjectcontact.hxx>
+#include <svx/sdr/contact/viewcontact.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
namespace sd {
@@ -50,6 +55,26 @@ namespace sd {
const int PreviewRenderer::snSubstitutionTextSize = 11;
const int PreviewRenderer::snFrameWidth = 1;
+namespace {
+ /** This incarnation of the ViewObjectContactRedirector filters away all
+ PageObj objects, unconditionally.
+ */
+ class ViewRedirector : public ::sdr::contact::ViewObjectContactRedirector
+ {
+ public:
+ ViewRedirector (void);
+ virtual ~ViewRedirector (void);
+ virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence(
+ const sdr::contact::ViewObjectContact& rOriginal,
+ const sdr::contact::DisplayInfo& rDisplayInfo);
+ };
+}
+
+
+
+
+//===== PreviewRenderer =======================================================
+
PreviewRenderer::PreviewRenderer (
OutputDevice* pTemplate,
const bool bHasFrame)
@@ -66,7 +91,10 @@ PreviewRenderer::PreviewRenderer (
mpPreviewDevice->SetBackground(pTemplate->GetBackground());
}
else
- mpPreviewDevice->SetBackground(Wallpaper(COL_WHITE));
+ {
+ mpPreviewDevice->SetBackground(Wallpaper(
+ Application::GetSettings().GetStyleSettings().GetWindowColor()));
+ }
}
@@ -85,7 +113,8 @@ Image PreviewRenderer::RenderPage (
const SdPage* pPage,
const sal_Int32 nWidth,
const String& rSubstitutionText,
- const bool bObeyHighContrastMode)
+ const bool bObeyHighContrastMode,
+ const bool bDisplayPresentationObjects)
{
if (pPage != NULL)
{
@@ -95,7 +124,12 @@ Image PreviewRenderer::RenderPage (
const sal_Int32 nFrameWidth (mbHasFrame ? snFrameWidth : 0);
const sal_Int32 nHeight (sal::static_int_cast<sal_Int32>(
(nWidth - 2*nFrameWidth) / nAspectRatio + 2*nFrameWidth + 0.5));
- return RenderPage (pPage, Size(nWidth,nHeight), rSubstitutionText, bObeyHighContrastMode);
+ return RenderPage (
+ pPage,
+ Size(nWidth,nHeight),
+ rSubstitutionText,
+ bObeyHighContrastMode,
+ bDisplayPresentationObjects);
}
else
return Image();
@@ -108,7 +142,8 @@ Image PreviewRenderer::RenderPage (
const SdPage* pPage,
Size aPixelSize,
const String& rSubstitutionText,
- const bool bObeyHighContrastMode)
+ const bool bObeyHighContrastMode,
+ const bool bDisplayPresentationObjects)
{
Image aPreview;
@@ -116,10 +151,10 @@ Image PreviewRenderer::RenderPage (
{
try
{
- if (Initialize (pPage, aPixelSize, bObeyHighContrastMode))
+ if (Initialize(pPage, aPixelSize, bObeyHighContrastMode))
{
- PaintPage (pPage);
- PaintSubstitutionText (rSubstitutionText);
+ PaintPage(pPage, bDisplayPresentationObjects);
+ PaintSubstitutionText(rSubstitutionText);
PaintFrame();
Size aSize (mpPreviewDevice->GetOutputSizePixel());
@@ -154,17 +189,17 @@ Image PreviewRenderer::RenderSubstitution (
mpPreviewDevice->SetOutputSizePixel(rPreviewPixelSize);
// Adjust contrast mode.
- bool bUseContrast = Application::GetSettings().GetStyleSettings().
- GetHighContrastMode();
+ const bool bUseContrast (
+ Application::GetSettings().GetStyleSettings().GetHighContrastMode());
mpPreviewDevice->SetDrawMode (bUseContrast
? ViewShell::OUTPUT_DRAWMODE_CONTRAST
: ViewShell::OUTPUT_DRAWMODE_COLOR);
- // Set a map mode makes a typical substitution text completely
+ // Set a map mode that makes a typical substitution text completely
// visible.
MapMode aMapMode (mpPreviewDevice->GetMapMode());
aMapMode.SetMapUnit(MAP_100TH_MM);
- double nFinalScale (25.0 * rPreviewPixelSize.Width() / 28000.0);
+ const double nFinalScale (25.0 * rPreviewPixelSize.Width() / 28000.0);
aMapMode.SetScaleX(nFinalScale);
aMapMode.SetScaleY(nFinalScale);
const sal_Int32 nFrameWidth (mbHasFrame ? snFrameWidth : 0);
@@ -173,7 +208,7 @@ Image PreviewRenderer::RenderSubstitution (
mpPreviewDevice->SetMapMode (aMapMode);
// Clear the background.
- Rectangle aPaintRectangle (
+ const Rectangle aPaintRectangle (
Point(0,0),
mpPreviewDevice->GetOutputSizePixel());
mpPreviewDevice->EnableMapMode(FALSE);
@@ -187,7 +222,7 @@ Image PreviewRenderer::RenderSubstitution (
PaintSubstitutionText (rSubstitutionText);
PaintFrame();
- Size aSize (mpPreviewDevice->GetOutputSizePixel());
+ const Size aSize (mpPreviewDevice->GetOutputSizePixel());
aPreview = mpPreviewDevice->GetBitmap (
mpPreviewDevice->PixelToLogic(Point(0,0)),
mpPreviewDevice->PixelToLogic(aSize));
@@ -261,6 +296,8 @@ bool PreviewRenderer::Initialize (
rOutliner.SetDefaultLanguage(pDocument->GetLanguage(EE_CHAR_LANGUAGE));
mpView->SetApplicationBackgroundColor(
Color(aColorConfig.GetColorValue(svtools::APPBACKGROUND).nColor));
+ mpPreviewDevice->SetBackground(Wallpaper(aPageBackgroundColor));
+ mpPreviewDevice->Erase();
bSuccess = true;
}
@@ -280,7 +317,9 @@ void PreviewRenderer::Cleanup (void)
-void PreviewRenderer::PaintPage (const SdPage* pPage)
+void PreviewRenderer::PaintPage (
+ const SdPage* pPage,
+ const bool bDisplayPresentationObjects)
{
// Paint the page.
Rectangle aPaintRectangle (Point(0,0), pPage->GetSize());
@@ -288,18 +327,22 @@ void PreviewRenderer::PaintPage (const SdPage* pPage)
// Turn off online spelling and redlining.
SdrOutliner* pOutliner = NULL;
- ULONG nOriginalControlWord = 0;
+ ULONG nSavedControlWord (0);
if (mpDocShellOfView!=NULL && mpDocShellOfView->GetDoc()!=NULL)
{
pOutliner = &mpDocShellOfView->GetDoc()->GetDrawOutliner();
- nOriginalControlWord = pOutliner->GetControlWord();
- pOutliner->SetControlWord(
- (nOriginalControlWord & ~EE_CNTRL_ONLINESPELLING));
+ nSavedControlWord = pOutliner->GetControlWord();
+ pOutliner->SetControlWord((nSavedControlWord & ~EE_CNTRL_ONLINESPELLING));
}
+ // Use a special redirector to prevent PresObj shapes from being painted.
+ boost::scoped_ptr<ViewRedirector> pRedirector;
+ if ( ! bDisplayPresentationObjects)
+ pRedirector.reset(new ViewRedirector());
+
try
{
- mpView->CompleteRedraw (mpPreviewDevice.get(), aRegion);
+ mpView->CompleteRedraw(mpPreviewDevice.get(), aRegion, pRedirector.get());
}
catch (const ::com::sun::star::uno::Exception&)
{
@@ -308,7 +351,7 @@ void PreviewRenderer::PaintPage (const SdPage* pPage)
// Restore the previous online spelling and redlining states.
if (pOutliner != NULL)
- pOutliner->SetControlWord(nOriginalControlWord);
+ pOutliner->SetControlWord(nSavedControlWord);
}
@@ -371,23 +414,26 @@ void PreviewRenderer::SetupOutputSize (
// First set the map mode to some arbitrary scale that is numerically
// stable.
MapMode aMapMode (mpPreviewDevice->GetMapMode());
- aMapMode.SetMapUnit(MAP_100TH_MM);
- double nInitialScale = 1;
- aMapMode.SetScaleX (Fraction(nInitialScale));
- aMapMode.SetScaleY (Fraction(nInitialScale));
- aMapMode.SetOrigin (Point(0,0));
+ aMapMode.SetMapUnit(MAP_PIXEL);
// Adapt it to the desired width.
const Size aPageModelSize (rPage.GetSize());
- const Size aOutputSize = mpPreviewDevice->LogicToPixel(rPage.GetSize(), aMapMode);
- const sal_Int32 nFrameWidth (mbHasFrame ? snFrameWidth : 0);
- const double nFinalScale (nInitialScale * (rFramePixelSize.Width()-2*nFrameWidth)
- / aOutputSize.Width());
- aMapMode.SetScaleX (nFinalScale);
- aMapMode.SetScaleY (nFinalScale);
- aMapMode.SetOrigin (mpPreviewDevice->PixelToLogic(
- Point(nFrameWidth,nFrameWidth),aMapMode));
-
+ if (aPageModelSize.Width()>0 || aPageModelSize.Height()>0)
+ {
+ const sal_Int32 nFrameWidth (mbHasFrame ? snFrameWidth : 0);
+ aMapMode.SetScaleX(
+ Fraction(rFramePixelSize.Width()-2*nFrameWidth-1, aPageModelSize.Width()));
+ aMapMode.SetScaleY(
+ Fraction(rFramePixelSize.Height()-2*nFrameWidth-1, aPageModelSize.Height()));
+ aMapMode.SetOrigin(mpPreviewDevice->PixelToLogic(Point(nFrameWidth,nFrameWidth),aMapMode));
+ }
+ else
+ {
+ // We should never get here.
+ OSL_ASSERT(false);
+ aMapMode.SetScaleX(1.0);
+ aMapMode.SetScaleY(1.0);
+ }
mpPreviewDevice->SetMapMode (aMapMode);
mpPreviewDevice->SetOutputSizePixel(rFramePixelSize);
}
@@ -414,10 +460,17 @@ void PreviewRenderer::ProvideView (DrawDocShell* pDocShell)
{
mpView.reset (new DrawView (pDocShell, mpPreviewDevice.get(), NULL));
}
- mpView->SetPreviewRenderer( sal_True );
- mpView->SetBordVisible(FALSE);
- mpView->SetPageBorderVisible(FALSE);
- mpView->SetPageVisible(TRUE);
+ mpView->SetPreviewRenderer(true);
+#if 1
+ mpView->SetPageVisible(false);
+ mpView->SetPageBorderVisible(true);
+ mpView->SetBordVisible(false);
+#else
+ // This works in the slide sorter but prevents the master page
+ // background being painted in the list of current master pages in the
+ // task manager.
+ mpView->SetPagePaintingAllowed(false);
+#endif
}
@@ -499,4 +552,56 @@ void PreviewRenderer::Notify(SfxBroadcaster&, const SfxHint& rHint)
+
+//===== ViewRedirector ========================================================
+
+namespace {
+
+ViewRedirector::ViewRedirector (void)
+{
+}
+
+
+
+
+ViewRedirector::~ViewRedirector (void)
+{
+}
+
+
+
+
+drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedPrimitive2DSequence(
+ const sdr::contact::ViewObjectContact& rOriginal,
+ const sdr::contact::DisplayInfo& rDisplayInfo)
+{
+ SdrObject* pObject = rOriginal.GetViewContact().TryToGetSdrObject();
+
+ if (pObject==NULL || pObject->GetPage() == NULL)
+ {
+ // not a SdrObject visualisation (maybe e.g. page) or no page
+ return sdr::contact::ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(
+ rOriginal,
+ rDisplayInfo);
+ }
+
+ const bool bDoCreateGeometry (pObject->GetPage()->checkVisibility( rOriginal, rDisplayInfo, true));
+
+ if ( ! bDoCreateGeometry
+ && (pObject->GetObjInventor() != SdrInventor || pObject->GetObjIdentifier() != OBJ_PAGE))
+ {
+ return drawinglayer::primitive2d::Primitive2DSequence();
+ }
+
+ if (pObject->IsEmptyPresObj())
+ return drawinglayer::primitive2d::Primitive2DSequence();
+
+ return sdr::contact::ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(
+ rOriginal,
+ rDisplayInfo);
+}
+
+} // end of anonymous namespace
+
+
} // end of namespace ::sd
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 2bc98cd66de3..3c99baa3ee79 100755
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -812,14 +812,16 @@ sal_Bool DrawController::convertFastPropertyValue (
else if (mxSubController.is())
{
rConvertedValue = rValue;
- rOldValue = mxSubController->getFastPropertyValue(nHandle);
- bResult = (rOldValue != rConvertedValue);
- /* bResult = mpSubController->convertFastPropertyValue(
- rConvertedValue,
- rOldValue,
- nHandle,
- rValue);
- */
+ try
+ {
+ rOldValue = mxSubController->getFastPropertyValue(nHandle);
+ bResult = (rOldValue != rConvertedValue);
+ }
+ catch(beans::UnknownPropertyException aException)
+ {
+ // The prperty is unknown and thus an illegal argument to this method.
+ throw com::sun::star::lang::IllegalArgumentException();
+ }
}
return bResult;
diff --git a/sd/source/ui/unoidl/SdUnoSlideView.cxx b/sd/source/ui/unoidl/SdUnoSlideView.cxx
index a6502711ee72..4e788db90928 100755
--- a/sd/source/ui/unoidl/SdUnoSlideView.cxx
+++ b/sd/source/ui/unoidl/SdUnoSlideView.cxx
@@ -35,7 +35,7 @@
#include "SlideSorter.hxx"
#include "controller/SlideSorterController.hxx"
#include "controller/SlsPageSelector.hxx"
-#include "controller/SlsSelectionManager.hxx"
+#include "controller/SlsCurrentSlideManager.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
@@ -104,7 +104,6 @@ sal_Bool SAL_CALL SdUnoSlideView::select (const Any& aSelection)
}
}
}
- rSlideSorterController.GetSelectionManager()->MakeSelectionVisible();
return bOk;
}
@@ -161,19 +160,30 @@ void SAL_CALL SdUnoSlideView::removeSelectionChangeListener (
//----- XDrawView -------------------------------------------------------------
void SAL_CALL SdUnoSlideView::setCurrentPage (
- const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& )
- throw(::com::sun::star::uno::RuntimeException)
+ const css::uno::Reference<css::drawing::XDrawPage>& rxDrawPage)
+ throw(css::uno::RuntimeException)
{
+ Reference<beans::XPropertySet> xProperties (rxDrawPage, UNO_QUERY);
+ if (xProperties.is())
+ {
+ sal_uInt16 nPageNumber(0);
+ if (xProperties->getPropertyValue(::rtl::OUString::createFromAscii("Number")) >>= nPageNumber)
+ {
+ mrSlideSorter.GetController().GetCurrentSlideManager()->SwitchCurrentSlide(
+ nPageNumber-1,
+ true);
+ }
+ }
}
-::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL
+css::uno::Reference<css::drawing::XDrawPage > SAL_CALL
SdUnoSlideView::getCurrentPage (void)
- throw(::com::sun::star::uno::RuntimeException)
+ throw(css::uno::RuntimeException)
{
- return Reference<drawing::XDrawPage>();
+ return mrSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide()->GetXDrawPage();
}
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index b28e7dc496a9..ddbf5cfc4388 100755
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1250,6 +1250,7 @@ public:
return;
bool bIsValueChanged = processProperties( rOptions );
+ bool bIsPaperChanged = false;
// The RenderDevice property is handled specially: its value is
// stored in mpPrinter instead of being retrieved on demand.
@@ -1261,14 +1262,21 @@ public:
VCLXDevice* pDevice = VCLXDevice::GetImplementation(xRenderDevice);
OutputDevice* pOut = pDevice ? pDevice->GetOutputDevice() : NULL;
mpPrinter = dynamic_cast<Printer*>(pOut);
+ Size aPageSizePixel = mpPrinter ? mpPrinter->GetPaperSizePixel() : Size();
+ if( aPageSizePixel != maPrinterPageSizePixel )
+ {
+ bIsPaperChanged = true;
+ maPrinterPageSizePixel = aPageSizePixel;
+ }
}
if (bIsValueChanged)
{
if ( ! mpOptions )
mpOptions.reset(new PrintOptions(*this, maSlidesPerPage));
- PreparePages();
}
+ if( bIsValueChanged || bIsPaperChanged )
+ PreparePages();
}
@@ -1398,6 +1406,7 @@ private:
ViewShellBase& mrBase;
bool mbIsDisposed;
Printer* mpPrinter;
+ Size maPrinterPageSizePixel;
::boost::scoped_ptr<PrintOptions> mpOptions;
::std::vector< ::boost::shared_ptr< ::sd::PrinterPage> > maPrinterPages;
::boost::scoped_ptr<DrawView> mpPrintView;
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 3102dc726a61..7aaba7d9c4fa 100755
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -958,7 +958,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
SdPage* DrawViewShell::CreateOrDuplicatePage (
SfxRequest& rRequest,
PageKind ePageKind,
- SdPage* pPage)
+ SdPage* pPage,
+ const sal_Int32 nInsertPosition)
{
SdPage* pNewPage = NULL;
if (ePageKind == PK_STANDARD && meEditMode != EM_MASTERPAGE)
@@ -967,7 +968,7 @@ SdPage* DrawViewShell::CreateOrDuplicatePage (
{
mpDrawView->SdrEndTextEdit();
}
- pNewPage = ViewShell::CreateOrDuplicatePage (rRequest, ePageKind, pPage);
+ pNewPage = ViewShell::CreateOrDuplicatePage (rRequest, ePageKind, pPage, nInsertPosition);
}
return pNewPage;
}
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 5166c392292c..f758a65953d5 100755
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1565,7 +1565,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if ( bDisableEditHyperlink )
rSet.DisableItem( SID_OPEN_HYPERLINK );
-#if defined WIN || defined WNT || defined UNX
+#if defined WNT || defined UNX
if( !mxScannerManager.is() )
{
rSet.DisableItem( SID_TWAIN_SELECT );
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx
index 8bfdefd240da..7ce0b577ed9e 100755..100644
--- a/sd/source/ui/view/viewshe3.cxx
+++ b/sd/source/ui/view/viewshe3.cxx
@@ -215,7 +215,8 @@ void ViewShell::GetMenuState( SfxItemSet &rSet )
SdPage* ViewShell::CreateOrDuplicatePage (
SfxRequest& rRequest,
PageKind ePageKind,
- SdPage* pPage)
+ SdPage* pPage,
+ const sal_Int32 nInsertPosition)
{
USHORT nSId = rRequest.GetSlot();
SdDrawDocument* pDocument = GetDoc();
@@ -254,7 +255,8 @@ SdPage* ViewShell::CreateOrDuplicatePage (
&& rBase.GetMainViewShell()->GetShellType()!=ViewShell::ST_DRAW)
{
framework::FrameworkHelper::Instance(GetViewShellBase())->RequestTaskPanel(
- framework::FrameworkHelper::msLayoutTaskPanelURL);
+ framework::FrameworkHelper::msLayoutTaskPanelURL,
+ false);
}
*/
@@ -376,7 +378,8 @@ SdPage* ViewShell::CreateOrDuplicatePage (
eStandardLayout,
eNotesLayout,
bIsPageBack,
- bIsPageObj);
+ bIsPageObj,
+ nInsertPosition);
// Select exactly the new page.
USHORT nPageCount (pDocument->GetSdPageCount(ePageKind));
for (USHORT i=0; i<nPageCount; i++)
@@ -399,7 +402,8 @@ SdPage* ViewShell::CreateOrDuplicatePage (
eStandardLayout,
eNotesLayout,
bIsPageBack,
- bIsPageObj);
+ bIsPageObj,
+ nInsertPosition);
break;
case SID_DUPLICATE_PAGE:
@@ -413,7 +417,8 @@ SdPage* ViewShell::CreateOrDuplicatePage (
eStandardLayout,
eNotesLayout,
bIsPageBack,
- bIsPageObj);
+ bIsPageObj,
+ nInsertPosition);
break;
default:
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index c1f4bc070bcf..7885d07e5f2c 100755
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -684,9 +684,9 @@ long ViewShell::Notify(NotifyEvent& rNEvt, ::sd::Window* pWin)
}
-BOOL ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWin)
+bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWin)
{
- BOOL bDone = FALSE;
+ bool bDone = false;
switch( rCEvt.GetCommand() )
{
@@ -736,7 +736,7 @@ BOOL ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
Invalidate( SID_ATTR_ZOOM );
Invalidate( SID_ATTR_ZOOMSLIDER );
- bDone = TRUE;
+ bDone = true;
}
}
else
@@ -752,7 +752,7 @@ BOOL ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
rCEvt.IsMouseEvent(),(const void *) &aWheelData );
bDone = pWin->HandleScrollCommand( aReWrite,
mpHorizontalScrollBar.get(),
- mpVerticalScrollBar.get());
+ mpVerticalScrollBar.get()) == TRUE;
}
}
}
diff --git a/sd/uiconfig/sdraw/toolbar/findbar.xml b/sd/uiconfig/sdraw/toolbar/findbar.xml
index 9ef9d8a1a78f..078c0fc5bed5 100644
--- a/sd/uiconfig/sdraw/toolbar/findbar.xml
+++ b/sd/uiconfig/sdraw/toolbar/findbar.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find &amp; Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/>
+ <toolbar:toolbaritem xlink:href=".uno:FindText"/>
+ <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
+ <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
+ <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:visible="false"/>
</toolbar:toolbar>
diff --git a/sd/uiconfig/simpress/toolbar/findbar.xml b/sd/uiconfig/simpress/toolbar/findbar.xml
index 9ef9d8a1a78f..0338d3156195 100644
--- a/sd/uiconfig/simpress/toolbar/findbar.xml
+++ b/sd/uiconfig/simpress/toolbar/findbar.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find &amp; Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/>
+ <toolbar:toolbaritem xlink:href=".uno:FindText"/>
+ <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
+ <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
+ <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:visible="false"/>
</toolbar:toolbar>
diff --git a/sd/util/makefile.mk b/sd/util/makefile.mk
index 088057e90ce0..8cc7bd3345e6 100755
--- a/sd/util/makefile.mk
+++ b/sd/util/makefile.mk
@@ -50,6 +50,7 @@ RESLIB1SRSFILES=\
$(SRS)$/notes.srs \
$(SRS)$/animui.srs \
$(SRS)$/slideshow.srs \
+ $(SRS)$/slsview.srs \
$(SRS)$/uitable.srs \
$(SRS)$/view.srs \
$(SRS)$/uiannotations.srs \
@@ -85,7 +86,7 @@ SHL1STDLIBS+= \
$(CPPUHELPERLIB) \
$(CPPULIB) \
$(VOSLIB) \
- $(CANVASLIB) \
+ $(CANVASTOOLSLIB) \
$(SALLIB) \
$(AVMEDIALIB)
diff --git a/set_soenv.in b/set_soenv.in
index 01a7ff2e4182..b39e397c0f7d 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1930,6 +1930,8 @@ ToFile( "HYPHEN_LIB", "@HYPHEN_LIB@", "e" );
ToFile( "SYSTEM_MYTHES", "@SYSTEM_MYTHES@", "e" );
ToFile( "MYTHES_CFLAGS", "@MYTHES_CFLAGS@", "e" );
ToFile( "MYTHES_LIBS", "@MYTHES_LIBS@", "e" );
+ToFile( "SYSTEM_LIBTEXTCAT", "@SYSTEM_LIBTEXTCAT@","e" );
+ToFile( "SYSTEM_LIBTEXTCAT_DATA","@SYSTEM_LIBTEXTCAT_DATA@","e" );
ToFile( "PAM", "@PAM@", "e" );
ToFile( "NEW_SHADOW_API", "@NEW_SHADOW_API@", "e" );
ToFile( "PAM_LINK", "@PAM_LINK@", "e" );
diff --git a/setup_native/scripts/admin.pl b/setup_native/scripts/admin.pl
index f5f2d207b5ed..3e058af172f6 100644
--- a/setup_native/scripts/admin.pl
+++ b/setup_native/scripts/admin.pl
@@ -298,6 +298,69 @@ sub get_sourcepath_from_filename_and_includepath
return \$onefile;
}
+##############################################################
+# Removing all empty directories below a specified directory
+##############################################################
+
+sub remove_empty_dirs_in_folder
+{
+ my ( $dir, $firstrun ) = @_;
+
+ if ( $firstrun )
+ {
+ print "Removing superfluous directories\n";
+ }
+
+ my @content = ();
+
+ $dir =~ s/\Q$separator\E\s*$//;
+
+ if ( -d $dir )
+ {
+ opendir(DIR, $dir);
+ @content = readdir(DIR);
+ closedir(DIR);
+
+ my $oneitem;
+
+ foreach $oneitem (@content)
+ {
+ if ((!($oneitem eq ".")) && (!($oneitem eq "..")))
+ {
+ my $item = $dir . $separator . $oneitem;
+
+ if ( -d $item ) # recursive
+ {
+ remove_empty_dirs_in_folder($item, 0);
+ }
+ }
+ }
+
+ # try to remove empty directory
+ my $returnvalue = rmdir $dir;
+
+ # if ( $returnvalue ) { print "Successfully removed empty dir $dir\n"; }
+ }
+}
+
+####################################################
+# Detecting the directory with extensions
+####################################################
+
+sub get_extensions_dir
+{
+ my ( $unopkgfile ) = @_;
+
+ my $localbranddir = $unopkgfile;
+ get_path_from_fullqualifiedname(\$localbranddir); # "program" dir in brand layer
+ get_path_from_fullqualifiedname(\$localbranddir); # root dir in brand layer
+ $localbranddir =~ s/\Q$separator\E\s*$//;
+ my $extensiondir = $localbranddir . $separator . "share" . $separator . "extensions";
+ my $preregdir = $localbranddir . $separator . "share" . $separator . "prereg" . $separator . "bundled";
+
+ return ($extensiondir, $preregdir);
+}
+
########################################################
# Finding all files with a specified file extension
# in a specified directory.
@@ -880,7 +943,6 @@ sub copy_files_into_directory_structure
print "Copying files\n";
my $unopkgfile = "";
- my @extensions = ();
for ( my $i = 1; $i <= $maxsequence; $i++ )
{
@@ -923,8 +985,6 @@ sub copy_files_into_directory_structure
if ( ! $copyreturn) { exit_program("ERROR: Could not copy $source to $dest\n"); }
- # Collecting all extensions
- if ( $destfile =~ /\.oxt\s*$/ ) { push(@extensions, $destfile); }
# Searching unopkg.exe
if ( $destfile =~ /unopkg\.exe\s*$/ ) { $unopkgfile = $destfile; }
# if (( $^O =~ /cygwin/i ) && ( $destfile =~ /\.exe\s*$/ )) { change_privileges($destfile, "775"); }
@@ -935,7 +995,7 @@ sub copy_files_into_directory_structure
# }
}
- return ($unopkgfile, \@extensions);
+ return ($unopkgfile);
}
######################################################
@@ -1026,12 +1086,19 @@ sub get_temppath
}
####################################################################################
-# Registering one extension
+# Registering extensions
####################################################################################
-sub register_one_extension
+sub register_extensions_sync
{
- my ($unopkgfile, $extension, $temppath) = @_;
+ my ($unopkgfile, $localtemppath, $preregdir) = @_;
+
+ if ( $preregdir eq "" )
+ {
+ my $logtext = "ERROR: Failed to determine \"prereg\" folder for extension registration! Please check your installation set.";
+ print $logtext . "\n";
+ exit_program($logtext);
+ }
my $from = cwd();
@@ -1051,22 +1118,17 @@ sub register_one_extension
$path_displayed = 1;
}
- $temppath =~ s/\\/\//g;
- $temppath = "/".$temppath;
-
- # Converting path of $extension for cygwin
-
- my $localextension = $extension;
- if ( $^O =~ /cygwin/i ) {
- $localextension = qx{cygpath -w "$extension"};
- $localextension =~ s/\\/\\\\/g;
- }
+ $localtemppath =~ s/\\/\//g;
if ( $^O =~ /cygwin/i ) {
$executable = "./" . $executable;
+ $preregdir = qx{cygpath -m "$preregdir"};
+ chomp($preregdir);
}
- my $systemcall = $executable . " add --shared --verbose --suppress-license " . "\"" . $localextension . "\"" . " -env:UserInstallation=file://" . $temppath . " 2\>\&1 |";
+ $preregdir =~ s/\/\s*$//g;
+
+ my $systemcall = $executable . " sync --verbose -env:BUNDLED_EXTENSIONS_USER=\"file:///" . $preregdir . "\"" . " -env:UserInstallation=file:///" . $localtemppath . " 2\>\&1 |";
print "... $systemcall\n";
@@ -1094,26 +1156,20 @@ sub register_one_extension
sub register_extensions
{
- my ($unopkgfile, $extensions, $temppath) = @_;
+ my ($unopkgfile, $temppath, $preregdir) = @_;
- if ( $#{$extensions} > -1 )
- {
- print "Registering extensions:\n";
+ print "Registering extensions:\n";
- if (( ! -f $unopkgfile ) || ( $unopkgfile eq "" ))
- {
- print("WARNING: Could not find unopkg.exe (Language Pack?)!\n");
- }
- else
- {
- foreach $extension ( @{$extensions} ) { register_one_extension($unopkgfile, $extension, $temppath); }
- remove_complete_directory($temppath, 1)
- }
+ if (( ! -f $unopkgfile ) || ( $unopkgfile eq "" ))
+ {
+ print("WARNING: Could not find unopkg.exe (Language Pack?)!\n");
}
else
{
- print "No extensions to register.\n";
+ register_extensions_sync($unopkgfile, $temppath, $preregdir);
+ remove_complete_directory($temppath, 1);
}
+
}
####################################################################################
@@ -1357,7 +1413,7 @@ my ( $filehash, $fileorder, $maxsequence ) = analyze_file_file($filecontent);
my $fullpathhash = create_directory_structure($dirhash, $targetdir);
# Copying files
-my ($unopkgfile, $extensions) = copy_files_into_directory_structure($fileorder, $filehash, $componenthash, $fullpathhash, $maxsequence, $unpackdir, $installdir, $dirhash);
+my ($unopkgfile) = copy_files_into_directory_structure($fileorder, $filehash, $componenthash, $fullpathhash, $maxsequence, $unpackdir, $installdir, $dirhash);
if ( $^O =~ /cygwin/i ) { change_privileges_full($targetdir); }
my $msidatabase = $targetdir . $separator . $databasefilename;
@@ -1369,10 +1425,14 @@ $filename = $helperdir . $separator . "CustomAction.idt";
$filecontent = read_file($filename);
my $register_extensions_exists = analyze_customaction_file($filecontent);
+# Removing empty dirs in extension folder
+my ( $extensionfolder, $preregdir ) = get_extensions_dir($unopkgfile);
+if ( -d $extensionfolder ) { remove_empty_dirs_in_folder($extensionfolder, 1); }
+
if ( $register_extensions_exists )
{
# Registering extensions
- register_extensions($unopkgfile, $extensions, $temppath);
+ register_extensions($unopkgfile, $temppath, $preregdir);
}
# Saving info in Summary Information Stream of msi database (required for following patches)
diff --git a/setup_native/scripts/install_linux.sh b/setup_native/scripts/install_linux.sh
index fe4be73f77ea..c33fe989554f 100644
--- a/setup_native/scripts/install_linux.sh
+++ b/setup_native/scripts/install_linux.sh
@@ -121,6 +121,14 @@ then
exit 2
fi
+# #163256# check if we are on a debian system...
+if rpm --help | grep debian >/dev/null;
+then
+ DEBIAN_FLAGS="--force-debian --nodeps"
+else
+ DEBIAN_FLAGS=
+fi
+
#
# Determine whether this should be an update or a fresh install
#
@@ -227,7 +235,7 @@ FAKEDBRPM=/tmp/fake-db-1.0-$$.noarch.rpm
linenum=???
tail -n +$linenum $0 > $FAKEDBRPM
-rpm --upgrade --ignoresize --dbpath $RPM_DB_PATH $FAKEDBRPM
+rpm ${DEBIAN_FLAGS} --upgrade --ignoresize --dbpath $RPM_DB_PATH $FAKEDBRPM
rm -f $FAKEDBRPM
@@ -253,7 +261,7 @@ echo "Installing the RPMs"
ABSROOT=`cd ${INSTALLDIR}; pwd`
RELOCATIONS=`rpm -qp --qf "--relocate %{PREFIXES}=${ABSROOT}%{PREFIXES} \n" $RPMLIST | sort -u | tr -d "\012"`
-UserInstallation=\$BRAND_BASE_DIR/../UserInstallation rpm $RPMCMD --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST
+UserInstallation=\$BRAND_BASE_DIR/../UserInstallation rpm ${DEBIAN_FLAGS} $RPMCMD --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST
#
# Create a link into the users home directory
@@ -268,11 +276,11 @@ if [ "$UPDATE" = "yes" -a ! -f $INSTALLDIR/program/bootstraprc ]
then
echo
echo "Update failed due to a bug in RPM, uninstalling .."
- rpm --erase -v --nodeps --dbpath $RPM_DB_PATH `rpm --query --queryformat "%{NAME} " --package $RPMLIST --dbpath $RPM_DB_PATH`
+ rpm ${DEBIAN_FLAGS} --erase -v --nodeps --dbpath $RPM_DB_PATH `rpm --query --queryformat "%{NAME} " --package $RPMLIST --dbpath $RPM_DB_PATH`
echo
echo "Now re-installing new packages .."
echo
- rpm --install --nodeps --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST
+ rpm ${DEBIAN_FLAGS} --install --nodeps --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST
echo
fi
diff --git a/setup_native/source/java/javaversion.dat b/setup_native/source/java/javaversion.dat
index a629a4037269..bb935ac2ce58 100755
--- a/setup_native/source/java/javaversion.dat
+++ b/setup_native/source/java/javaversion.dat
@@ -26,30 +26,30 @@
#*************************************************************************
# GUI String in the installer ("Java Runtime Environment (${JAVAVERSION})")
-JAVAVERSION=Java 6 Update 20
-WINDOWSJAVAVERSION=Java 6 Update 20
+JAVAVERSION=Java 6 Update 21
+WINDOWSJAVAVERSION=Java 6 Update 21
# Windows (scp2 and downloadtemplate.nsi)
-WINDOWSJAVAFILENAME=jre-6u20-windows-i586.exe
-WINDOWSJAVAREGISTRYENTRY=1.6.0_20
+WINDOWSJAVAFILENAME=jre-6u21-windows-i586.exe
+WINDOWSJAVAREGISTRYENTRY=1.6.0_21
# Linux (scp2)
-LINUXJAVAFILENAME=jre-6u20-linux-i586.rpm
+LINUXJAVAFILENAME=jre-6u21-linux-i586.rpm
# Linux (rpmUnit.xml, rpm -qp <filename> )
-LINUXJAVANAME=jre-1.6.0_20-fcs
+LINUXJAVANAME=jre-1.6.0_21-fcs
# Linux-x64 (scp2)
-LINUXX64JAVAFILENAME=jre-6u20-linux-amd64.rpm
+LINUXX64JAVAFILENAME=jre-6u21-linux-amd64.rpm
# Solaris Sparc (scp2)
-SOLSJAVARTPACKED=SUNWj6rt_1_6_0_20_sparc.tar.gz
-SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_20_sparc.tar.gz
-SOLSJAVAMANPACKED=SUNWj6man_1_6_0_20_sparc.tar.gz
+SOLSJAVARTPACKED=SUNWj6rt_1_6_0_21_sparc.tar.gz
+SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_21_sparc.tar.gz
+SOLSJAVAMANPACKED=SUNWj6man_1_6_0_21_sparc.tar.gz
# Solaris x86 (scp2)
-SOLIJAVARTPACKED=SUNWj6rt_1_6_0_20_x86.tar.gz
-SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_20_x86.tar.gz
-SOLIJAVAMANPACKED=SUNWj6man_1_6_0_20_x86.tar.gz
+SOLIJAVARTPACKED=SUNWj6rt_1_6_0_21_x86.tar.gz
+SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_21_x86.tar.gz
+SOLIJAVAMANPACKED=SUNWj6man_1_6_0_21_x86.tar.gz
# Solaris (pkgUnit.xml, needs only to be changed in major changes)
SOLARISJAVART=SUNWj6rt
diff --git a/setup_native/source/java/javaversion2.dat b/setup_native/source/java/javaversion2.dat
index a629a4037269..bb935ac2ce58 100644
--- a/setup_native/source/java/javaversion2.dat
+++ b/setup_native/source/java/javaversion2.dat
@@ -26,30 +26,30 @@
#*************************************************************************
# GUI String in the installer ("Java Runtime Environment (${JAVAVERSION})")
-JAVAVERSION=Java 6 Update 20
-WINDOWSJAVAVERSION=Java 6 Update 20
+JAVAVERSION=Java 6 Update 21
+WINDOWSJAVAVERSION=Java 6 Update 21
# Windows (scp2 and downloadtemplate.nsi)
-WINDOWSJAVAFILENAME=jre-6u20-windows-i586.exe
-WINDOWSJAVAREGISTRYENTRY=1.6.0_20
+WINDOWSJAVAFILENAME=jre-6u21-windows-i586.exe
+WINDOWSJAVAREGISTRYENTRY=1.6.0_21
# Linux (scp2)
-LINUXJAVAFILENAME=jre-6u20-linux-i586.rpm
+LINUXJAVAFILENAME=jre-6u21-linux-i586.rpm
# Linux (rpmUnit.xml, rpm -qp <filename> )
-LINUXJAVANAME=jre-1.6.0_20-fcs
+LINUXJAVANAME=jre-1.6.0_21-fcs
# Linux-x64 (scp2)
-LINUXX64JAVAFILENAME=jre-6u20-linux-amd64.rpm
+LINUXX64JAVAFILENAME=jre-6u21-linux-amd64.rpm
# Solaris Sparc (scp2)
-SOLSJAVARTPACKED=SUNWj6rt_1_6_0_20_sparc.tar.gz
-SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_20_sparc.tar.gz
-SOLSJAVAMANPACKED=SUNWj6man_1_6_0_20_sparc.tar.gz
+SOLSJAVARTPACKED=SUNWj6rt_1_6_0_21_sparc.tar.gz
+SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_21_sparc.tar.gz
+SOLSJAVAMANPACKED=SUNWj6man_1_6_0_21_sparc.tar.gz
# Solaris x86 (scp2)
-SOLIJAVARTPACKED=SUNWj6rt_1_6_0_20_x86.tar.gz
-SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_20_x86.tar.gz
-SOLIJAVAMANPACKED=SUNWj6man_1_6_0_20_x86.tar.gz
+SOLIJAVARTPACKED=SUNWj6rt_1_6_0_21_x86.tar.gz
+SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_21_x86.tar.gz
+SOLIJAVAMANPACKED=SUNWj6man_1_6_0_21_x86.tar.gz
# Solaris (pkgUnit.xml, needs only to be changed in major changes)
SOLARISJAVART=SUNWj6rt
diff --git a/setup_native/source/packinfo/package.txt b/setup_native/source/packinfo/package.txt
new file mode 100644
index 000000000000..4ec319646932
--- /dev/null
+++ b/setup_native/source/packinfo/package.txt
@@ -0,0 +1 @@
+DO NOT DELETE THIS FILE \ No newline at end of file
diff --git a/setup_native/source/packinfo/packinfo_office.txt b/setup_native/source/packinfo/packinfo_office.txt
index 903e1834e764..fb04b347fcdf 100755
--- a/setup_native/source/packinfo/packinfo_office.txt
+++ b/setup_native/source/packinfo/packinfo_office.txt
@@ -477,6 +477,7 @@ End
Start
module = "gid_Module_Root_Extension_Oooimprovement"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-oooimprovement"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-oooimprovement"
@@ -492,6 +493,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Af"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-af"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-af"
@@ -507,6 +509,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Ca"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-ca"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-ca"
@@ -522,6 +525,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Cs"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-cs"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-cs"
@@ -537,6 +541,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Da"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-da"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-da"
@@ -552,6 +557,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_De_AT"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-de-AT"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-de-AT"
@@ -567,6 +573,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_De_CH"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-de-CH"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-de-CH"
@@ -582,6 +589,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_De_DE"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-de-DE"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-de-DE"
@@ -597,6 +605,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_En"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-en"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-en"
@@ -612,6 +621,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Es"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-es"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-es"
@@ -627,6 +637,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Et"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-et"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-et"
@@ -642,6 +653,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Fr"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-fr"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-fr"
@@ -657,6 +669,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Gl"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-gl"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-dict-gl"
@@ -672,6 +685,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_He"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-he"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-he"
@@ -687,6 +701,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Hu"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-hu"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-hu"
@@ -702,6 +717,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_It"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-it"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-it"
@@ -717,6 +733,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Ku_Tr"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ku-TR"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ku-TR"
@@ -732,6 +749,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Lt"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-lt"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-lt"
@@ -747,6 +765,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Ne"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-ne"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-ne"
@@ -762,6 +781,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Nl"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-nl"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-nl"
@@ -777,6 +797,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_No"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-no"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-no"
@@ -792,6 +813,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Pl"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-pl"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-pl"
@@ -807,6 +829,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Pt"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-pt"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-pt"
@@ -822,6 +845,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Ro"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-ro"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-ro"
@@ -837,6 +861,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Ru"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-ru"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-ru"
@@ -852,6 +877,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Sk"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-sk"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-sk"
@@ -867,6 +893,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Sl"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-sl"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-sl"
@@ -882,6 +909,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Sr"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-sr"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-sr"
@@ -897,6 +925,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Sv"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-sv"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-sv"
@@ -912,6 +941,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Sw"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-sw"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-sw"
@@ -927,6 +957,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Th"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-th"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-th"
@@ -942,6 +973,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Vi"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-vi"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-dict-vi"
@@ -957,6 +989,7 @@ End
Start
module = "gid_Module_Root_Extension_Dictionary_Zu"
+script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-zu"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-zu"
diff --git a/setup_native/source/packinfo/shellscripts_extensions.txt b/setup_native/source/packinfo/shellscripts_extensions.txt
index 424962e3d874..c73e7fae5838 100755
--- a/setup_native/source/packinfo/shellscripts_extensions.txt
+++ b/setup_native/source/packinfo/shellscripts_extensions.txt
@@ -27,7 +27,7 @@ fi
#
DISKLESS_SRVC=`echo $$BASEDIR | /usr/bin/grep export/Solaris_[1-9][0-9]/usr_$${ARCH}.all`
if [ "$$DISKLESS_SRVC" ]; then
- UNOPKG=/export/Solaris_11/usr_`uname -p`.all/opt/staroffice9/program/unopkg
+ UNOPKG=/export/Solaris_11/usr_`uname -p`.allPRODUCTDIRECTORYNAME/program/unopkg
POSTRUN=$$PKG_INSTALL_ROOT/usr_`uname -p`.all/usr/lib/postrun
CLIENT_BASEDIR=$$PKG_INSTALL_ROOT/usr_$${ARCH}.all
else
@@ -38,18 +38,20 @@ fi
if [ -x $$POSTRUN ]; then
( echo "test -x \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" || exit 0"
echo "umask 022"
- echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" add --shared --suppress-license --bundled \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}\" \"-env:UserInstallation=file:////$$INSTDIR\" '-env:UNO_JAVA_JFW_INSTALL_DATA=\$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'"
+ echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" sync \"-env:BUNDLED_EXTENSIONS_USER=file:////$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" \"-env:UserInstallation=file:////$$INSTDIR\" '-env:UNO_JAVA_JFW_INSTALL_DATA=\$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'"
+ echo "find \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" -type f -exec chmod 644 {} \\;"
) | $$POSTRUN -b -c UNOPKG
if [ "$$?" != "0" ]; then
- echo "\nERROR: Installation of UNO extension ${OXTFILENAME}"
+ echo "\nERROR: Installation of UNO extensions"
echo " through $$POSTRUN failed."
exit 1
fi
else
# No postrun available, try running unopkg directly
- "$$UNOPKG" add --shared --suppress-license --bundled "$$BASEDIR/PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ "$$UNOPKG" sync "-env:BUNDLED_EXTENSIONS_USER=file:////////$$BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file:////////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ find "$$BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \;
if [ "$$?" != "0" ]; then
- echo "\nERROR: Installation of UNO extension ${OXTFILENAME} failed."
+ echo "\nERROR: Installation of UNO extensions failed."
test "$$BASEDIR" = "$$CLIENT_BASEDIR" || echo "ERROR: alternate root install requires SUNWpostrun package to be installed"
echo 'ERROR: Make sure the runtime requirements (operating system, patch level, architecture) are met.'
exit 1
@@ -63,7 +65,8 @@ fi
exit 0
END
-%preremove << END
+%postremove << END
+
if [ -n "$$TMPDIR" ]; then
UNOPKGTMP="$$TMPDIR"
elif [ -n "$$TMP" ]; then
@@ -89,15 +92,17 @@ if [ -x $$PKG_INSTALL_ROOT/usr/lib/postrun ]; then
( echo "test -x \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" || exit 0"
echo "cd \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program\""
echo "umask 022"
- echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" remove --shared --bundled \"${OXTFILENAME}\" \"-env:UserInstallation=file:////$$INSTDIR\" '-env:UNO_JAVA_JFW_INSTALL_DATA=\$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'"
+ echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" sync \"-env:BUNDLED_EXTENSIONS_USER=file:////$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" \"-env:UserInstallation=file:////$$INSTDIR\" '-env:UNO_JAVA_JFW_INSTALL_DATA=\$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'"
+ echo "find \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" -type f -exec chmod 644 {} \\;"
echo "rm -rf \"$$INSTDIR\""
) | $$PKG_INSTALL_ROOT/usr/lib/postrun -c UNOPKG
else
# No postrun available, try running unopkg directly
test -x $$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg || exit 0
- "$$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg" remove --shared --bundled "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ "$$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file:////////$$BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file:////////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ echo "find \"$$BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" -type f -exec chmod 644 {} \\;"
if [ "$$?" != "0" ]; then
- echo "\nERROR: Removal of UNO extension ${OXTFILENAME} failed."
+ echo "\nERROR: Removal of UNO extension failed."
test "$$BASEDIR" = "$$CLIENT_BASEDIR" || echo "ERROR: alternate root uninstall requires SUNWpostrun package to be installed"
echo 'ERROR: Make sure the runtime requirements (operating system, patch level, architecture) are met.'
exit 1
@@ -115,44 +120,6 @@ END
%format rpm
-# As remove does not need the oxt file, this could potentially
-# be done in the postinstall script as well.
-%preinstall << END
-# if this is an update, remove the old package instance first
-test "$$1" = "2" || exit 0
-
-#Find the temp dir
-if [ -n "$$TMPDIR" ]; then
- UNOPKGTMP="$$TMPDIR"
-elif [ -n "$$TMP" ]; then
- UNOPKGTMP="$$TMP"
-elif [ -d "/tmp" ]; then
- UNOPKGTMP="/tmp"
-else
- echo "No tmp directory found!"
- exit 1
-fi
-
-#Create the command which creates a temporary directory
-if [ -x "/bin/mktemp" ]
-then
- INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"`
-else
- INSTDIR="$${UNOPKGTMP}/userinstall.$$$$"
- mkdir "$$INSTDIR"
-fi
-
-if [ -x "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" ]; then
- "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" remove --shared --bundled "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
-fi
-
-if [ -n "$$INSTDIR" ]; then
- rm -rf "$$INSTDIR"
-fi
-
-exit 0
-END
-
%postinstall << END
#Find the temp dir
if [ -n "$$TMPDIR" ]; then
@@ -176,7 +143,8 @@ else
fi
if [ -x "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" ]; then
- "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" add --shared --suppress-license --shared "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}" "-env:UserInstallation=file://////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file:////$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ find "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \;
fi
if [ -n "$$INSTDIR" ]; then
@@ -185,13 +153,9 @@ fi
exit 0
-
END
-%preremove << END
-# if this is an update, just do nothing
-test "$$1" = "0" || exit 0
-
+%postremove << END
#Find the temp dir
if [ -n "$$TMPDIR" ]; then
UNOPKGTMP="$$TMPDIR"
@@ -214,7 +178,8 @@ else
fi
if [ -x "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" ]; then
- "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" remove --shared --bundled "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file:////$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ find "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \;
fi
if [ -n "$$INSTDIR" ]; then
@@ -226,53 +191,6 @@ END
%format deb
-# As remove does not need the oxt file, this could potentially
-# be done in the postinstall script as well.
-%preinstall << END
-# if this is an update, remove the old package instance first
-if [ "$$1" != "upgrade" ]
-then
- exit 0
-fi
-
-#Find the temp dir
-if [ -n "$$TMPDIR" ]
-then
- UNOPKGTMP="$$TMPDIR"
-elif [ -n "$$TMP" ]
-then
- UNOPKGTMP="$$TMP"
-elif [ -d "/tmp" ]
-then
- UNOPKGTMP="/tmp"
-else
- echo "No tmp directory found!"
- exit 1
-fi
-
-
-#Create the command which creates a temporary directory
-if [ -x "/bin/mktemp" ]
-then
- INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"`
-else
- INSTDIR="$${UNOPKGTMP}/userinstall.$$$$"
- mkdir "$$INSTDIR"
-fi
-
-if [ -x "PRODUCTDIRECTORYNAME/program/unopkg" ]
-then
- "PRODUCTDIRECTORYNAME/program/unopkg" remove --shared --bundled "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
-fi
-
-if [ -n "$$INSTDIR" ]
-then
- rm -rf "$$INSTDIR"
-fi
-
-exit 0
-END
-
%postinstall << END
#Find the temp dir
if [ -n "$$TMPDIR" ]
@@ -299,7 +217,8 @@ else
fi
if [ -x "PRODUCTDIRECTORYNAME/program/unopkg" ]; then
- "PRODUCTDIRECTORYNAME/program/unopkg" add --shared --suppress-license --bundled "PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}" "-env:UserInstallation=file://////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ "PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file://////PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file://////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ find "PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \;
fi
if [ -n "$$INSTDIR" ]
@@ -309,18 +228,10 @@ fi
exit 0
-
END
-%preremove << END
-# if this is an update, just do nothing
-
-if [ "$$1" = "upgrade" ]
-then
- exit 0
-fi
-
-#Find the temp dir
+%postremove << END
+# Find the temp dir
if [ -n "$$TMPDIR" ]
then
UNOPKGTMP="$$TMPDIR"
@@ -346,7 +257,8 @@ fi
if [ -x "PRODUCTDIRECTORYNAME/program/unopkg" ]
then
- "PRODUCTDIRECTORYNAME/program/unopkg" remove --shared --bundled "${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ "PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file://////PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file://////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ find "PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \;
fi
if [ -n "$$INSTDIR" ]
diff --git a/setup_native/source/win32/customactions/languagepacks/exports.dxp b/setup_native/source/win32/customactions/languagepacks/exports.dxp
index d01befd5d0d9..c098a38d547f 100644
--- a/setup_native/source/win32/customactions/languagepacks/exports.dxp
+++ b/setup_native/source/win32/customactions/languagepacks/exports.dxp
@@ -2,3 +2,5 @@ SetProductInstallationPath
RegisterLanguagePack
GetUserInstallMode
IsOfficeRunning
+RegisterExtensions
+
diff --git a/setup_native/source/win32/customactions/languagepacks/makefile.mk b/setup_native/source/win32/customactions/languagepacks/makefile.mk
index 69526077c509..8da47ab1cc4f 100644
--- a/setup_native/source/win32/customactions/languagepacks/makefile.mk
+++ b/setup_native/source/win32/customactions/languagepacks/makefile.mk
@@ -77,6 +77,7 @@ STDSHL+= \
#SHL1LIBS = $(SLB)$/$(TARGET).lib
SHL1OBJS = $(SLOFILES) \
+ $(SLO)$/registerextensions.obj \
$(SLO)$/seterror.obj
SHL1TARGET = $(TARGET)
diff --git a/setup_native/source/win32/customactions/patch/exports.dxp b/setup_native/source/win32/customactions/patch/exports.dxp
index b57f2838bf34..dd5eb4dcf7c8 100755
--- a/setup_native/source/win32/customactions/patch/exports.dxp
+++ b/setup_native/source/win32/customactions/patch/exports.dxp
@@ -7,3 +7,5 @@ IsOfficeRunning
SetFeatureState
SetNewFeatureState
ShowOnlineUpdateDialog
+RegisterExtensions
+RemoveExtensions
diff --git a/setup_native/source/win32/customactions/patch/makefile.mk b/setup_native/source/win32/customactions/patch/makefile.mk
index cb8733de20b6..57705389248f 100755
--- a/setup_native/source/win32/customactions/patch/makefile.mk
+++ b/setup_native/source/win32/customactions/patch/makefile.mk
@@ -76,6 +76,7 @@ SHL1OBJS = $(SLOFILES) \
$(SLO)$/shutdown_quickstart.obj \
$(SLO)$/quickstarter.obj \
$(SLO)$/upgrade.obj \
+ $(SLO)$/registerextensions.obj \
$(SLO)$/seterror.obj
SHL1TARGET = $(TARGET)
diff --git a/setup_native/source/win32/customactions/shellextensions/completeinstallpath.cxx b/setup_native/source/win32/customactions/shellextensions/completeinstallpath.cxx
new file mode 100644
index 000000000000..7d09e79b9ec7
--- /dev/null
+++ b/setup_native/source/win32/customactions/shellextensions/completeinstallpath.cxx
@@ -0,0 +1,180 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define _WIN32_WINDOWS 0x0410
+#ifdef _MSC_VER
+#pragma warning(push, 1) /* disable warnings within system headers */
+#endif
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <msiquery.h>
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+#include <malloc.h>
+
+#ifdef UNICODE
+#define _UNICODE
+#define _tstring wstring
+#else
+#define _tstring string
+#endif
+#include <tchar.h>
+#include <string>
+
+using namespace std;
+
+namespace
+{
+ std::_tstring GetMsiProperty( MSIHANDLE handle, const std::_tstring& sProperty )
+ {
+ std::_tstring result;
+ TCHAR szDummy[1] = TEXT("");
+ DWORD nChars = 0;
+
+ if ( MsiGetProperty( handle, sProperty.c_str(), szDummy, &nChars ) == ERROR_MORE_DATA )
+ {
+ DWORD nBytes = ++nChars * sizeof(TCHAR);
+ LPTSTR buffer = reinterpret_cast<LPTSTR>(_alloca(nBytes));
+ ZeroMemory( buffer, nBytes );
+ MsiGetProperty(handle, sProperty.c_str(), buffer, &nChars);
+ result = buffer;
+ }
+
+ return result;
+ }
+} // namespace
+
+extern "C" UINT __stdcall CompleteInstallPath( MSIHANDLE handle )
+{
+ // This CustomAction is necessary for updates from OOo 3.0, OOo 3.1 and OOo 3.2 to versions
+ // OOo 3.3 or later. This is caused by a change of INSTALLLOCATION, that starting with OOo 3.3
+ // contains the name of the product again (instead of only "c:\program files"). Unfortunately
+ // this causes in an update installation, that INSTALLLOCATION is set to "c:\program files",
+ // so that in an OOo 3.3 or later, the directory "program" or "share" are directly created
+ // below "c:\program files".
+
+ TCHAR szValue[8192];
+ DWORD nValueSize = sizeof(szValue);
+ HKEY hKey;
+ std::_tstring sInstDir;
+ std::_tstring mystr;
+
+ // Reading property OFFICEDIRHOSTNAME_, that contains the part of the path behind
+ // the program files folder.
+
+ std::_tstring sInstallLocation = GetMsiProperty( handle, TEXT("INSTALLLOCATION") );
+ std::_tstring sOfficeDirHostname = GetMsiProperty( handle, TEXT("OFFICEDIRHOSTNAME_") );
+
+ // If sInstallLocation ends with (contains) the string sOfficeDirHostname,
+ // INSTALLLOCATION is good and nothing has to be done here.
+
+ bool pathCompletionRequired = true;
+
+ if ( _tcsstr( sInstallLocation.c_str(), sOfficeDirHostname.c_str() ) )
+ {
+ pathCompletionRequired = false; // nothing to do
+ // mystr = "Nothing to do, officedir is included into installlocation";
+ // MessageBox( NULL, mystr.c_str(), "It is part of installlocation", MB_OK );
+ }
+
+ // If the path INSTALLLOCATION does not end with this string, INSTALLLOCATION is maybe
+ // transfered from an OOo 3.0, OOo 3.1 and OOo 3.2 and need to be changed therefore.
+
+ if ( pathCompletionRequired )
+ {
+ std::_tstring sManufacturer = GetMsiProperty( handle, TEXT("Manufacturer") );
+ std::_tstring sDefinedName = GetMsiProperty( handle, TEXT("DEFINEDPRODUCT") );
+ std::_tstring sUpgradeCode = GetMsiProperty( handle, TEXT("UpgradeCode") );
+
+ // sUpdateVersion can be "3.0", "3.1" or "3.2"
+
+ std::_tstring sProductKey30 = "Software\\" + sManufacturer + "\\" + sDefinedName +
+ "\\" + "3.0" + "\\" + sUpgradeCode;
+
+ std::_tstring sProductKey31 = "Software\\" + sManufacturer + "\\" + sDefinedName +
+ "\\" + "3.1" + "\\" + sUpgradeCode;
+
+ std::_tstring sProductKey32 = "Software\\" + sManufacturer + "\\" + sDefinedName +
+ "\\" + "3.2" + "\\" + sUpgradeCode;
+
+ // mystr = "ProductKey: " + sProductKey;
+ // MessageBox( NULL, mystr.c_str(), "ProductKey", MB_OK );
+
+ // mystr = "Checking registry";
+ // MessageBox( NULL, mystr.c_str(), "registry search", MB_OK );
+
+ bool oldVersionExists = false;
+
+ if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey30.c_str(), &hKey ) )
+ {
+ oldVersionExists = true;
+ RegCloseKey( hKey );
+ }
+ else if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey31.c_str(), &hKey ) )
+ {
+ oldVersionExists = true;
+ RegCloseKey( hKey );
+ }
+ else if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey32.c_str(), &hKey ) )
+ {
+ oldVersionExists = true;
+ RegCloseKey( hKey );
+ }
+ else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey30.c_str(), &hKey ) )
+ {
+ oldVersionExists = true;
+ RegCloseKey( hKey );
+ }
+ else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey31.c_str(), &hKey ) )
+ {
+ oldVersionExists = true;
+ RegCloseKey( hKey );
+ }
+ else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey32.c_str(), &hKey ) )
+ {
+ oldVersionExists = true;
+ RegCloseKey( hKey );
+ }
+
+ if ( oldVersionExists )
+ {
+ // Adding the new path content sOfficeDirHostname
+ sInstallLocation = sInstallLocation + sOfficeDirHostname;
+ // Setting the new property value
+ MsiSetProperty(handle, TEXT("INSTALLLOCATION"), sInstallLocation.c_str());
+ // mystr = "Setting path to: " + sInstallLocation;
+ // MessageBox( NULL, mystr.c_str(), "sInstallLocation", MB_OK );
+ }
+ }
+
+ // mystr = "Ending with INSTALLLOCATION: " + sInstallLocation;
+ // MessageBox( NULL, mystr.c_str(), "END", MB_OK );
+
+ return ERROR_SUCCESS;
+}
diff --git a/setup_native/source/win32/customactions/shellextensions/exports.dxp b/setup_native/source/win32/customactions/shellextensions/exports.dxp
index 0e53492e460f..5826d339274a 100644
--- a/setup_native/source/win32/customactions/shellextensions/exports.dxp
+++ b/setup_native/source/win32/customactions/shellextensions/exports.dxp
@@ -5,7 +5,10 @@ DeinstallStartmenuFolderIcon
SetProductInstallMode
RebuildShellIconCache
ExecutePostUninstallScript
+CompleteInstallPath
MigrateInstallPath
+RegisterExtensions
+RemoveExtensions
CheckInstallDirectory
SetAdminInstallProperty
CreateLayerLinks
diff --git a/setup_native/source/win32/customactions/shellextensions/makefile.mk b/setup_native/source/win32/customactions/shellextensions/makefile.mk
index 9eef136a82a4..23fe24bb6ceb 100644
--- a/setup_native/source/win32/customactions/shellextensions/makefile.mk
+++ b/setup_native/source/win32/customactions/shellextensions/makefile.mk
@@ -58,10 +58,12 @@ SLOFILES = \
$(SLO)$/iconcache.obj \
$(SLO)$/postuninstall.obj \
$(SLO)$/migrateinstallpath.obj \
+ $(SLO)$/completeinstallpath.obj \
$(SLO)$/checkdirectory.obj \
$(SLO)$/setadmininstall.obj \
$(SLO)$/layerlinks.obj \
$(SLO)$/dotnetcheck.obj \
+ $(SLO)$/registerextensions.obj \
$(SLO)$/copyeditiondata.obj \
$(SLO)$/vistaspecial.obj \
$(SLO)$/checkrunningoffice.obj \
diff --git a/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx b/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx
index 3906d2584fd1..9eaad6959a63 100644
--- a/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx
@@ -319,202 +319,56 @@ extern "C" UINT __stdcall RegisterExtensions(MSIHANDLE handle)
{
std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") );
std::_tstring sUnoPkgFile = sInstDir + TEXT("program\\unopkg.exe");
- std::_tstring sShareInstallDir = sInstDir + TEXT("share\\extension\\install\\");
- std::_tstring sPattern = sShareInstallDir + TEXT("*.oxt");
std::_tstring mystr;
WIN32_FIND_DATA aFindFileData;
mystr = "unopkg file: " + sUnoPkgFile;
- // MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
-
- mystr = "oxt file directory: " + sShareInstallDir;
- // MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
+ //MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
// Find unopkg.exe
-
HANDLE hFindUnopkg = FindFirstFile( sUnoPkgFile.c_str(), &aFindFileData );
if ( hFindUnopkg != INVALID_HANDLE_VALUE )
{
// unopkg.exe exists in program directory
- // Finding all oxt files in sShareInstallDir
-
- HANDLE hFindOxt = FindFirstFile( sPattern.c_str(), &aFindFileData );
-
- if ( hFindOxt != INVALID_HANDLE_VALUE )
- {
- bool fNextFile = false;
-
- do
- {
- const std::_tstring sTempFolder(createTempFolder());
- std::_tstring sOxtFile = sShareInstallDir + aFindFileData.cFileName;
- std::_tstring sCommandPart1 = sUnoPkgFile + " add --shared --suppress-license --bundled " + "\"" + sOxtFile + "\"";
- std::_tstring sCommand = sCommandPart1
- + TEXT(" -env:UNO_JAVA_JFW_INSTALL_DATA=$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml")
- + TEXT(" -env:UserInstallation=") + sTempFolder;
- mystr = "Command: " + sCommand;
- // MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
-
- DWORD exitCode = 0;
- bool fSuccess = ExecuteCommand( sCommand.c_str(), & exitCode);
- // unopkg in OOo 2.2.1 and early had a bug that it failed when receiving
- // a bootstrap parameter (-env:...) then it exited with a value != 0.
- if (fSuccess && exitCode != 0)
- {
- std::_tstring sCommand = sCommandPart1;
- mystr = "Command: " + sCommand;
- // MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
- fSuccess = ExecuteCommand( sCommand.c_str(), & exitCode);
- }
- deleteTempFolder(sTempFolder);
-
- // if ( fSuccess )
- // {
- // mystr = "Executed successfully!";
- // MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
- // }
- // else
- // {
- // mystr = "An error occured during execution!";
- // MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
- // }
-
- fNextFile = FindNextFile( hFindOxt, &aFindFileData );
-
- } while ( fNextFile );
-
- FindClose( hFindOxt );
- }
+ const std::_tstring sTempFolder(createTempFolder());
+ std::_tstring sCommandPart1 = sUnoPkgFile + " sync";
+ std::_tstring sCommand = sCommandPart1
+ + TEXT(" -env:BUNDLED_EXTENSIONS_USER=$BRAND_BASE_DIR/share/prereg/bundled")
+ + TEXT(" -env:UNO_JAVA_JFW_INSTALL_DATA=$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml")
+ + TEXT(" -env:UserInstallation=") + sTempFolder;
+ mystr = "Command: " + sCommand;
+ //MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
+
+ DWORD exitCode = 0;
+ bool fSuccess = ExecuteCommand( sCommand.c_str(), & exitCode);
+
+ deleteTempFolder(sTempFolder);
+
+// if ( fSuccess )
+// {
+// mystr = "Executed successfully!";
+// MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
+// }
+// else
+// {
+// mystr = "An error occured during execution!";
+// MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
+// }
+
+ FindClose( hFindUnopkg );
}
- // else
- // {
- // mystr = "Error: Did not find " + sUnoPkgFile;
- // MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
- // }
+// else
+// {
+// mystr = "Error: Did not find " + sUnoPkgFile;
+// MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
+// }
return ERROR_SUCCESS;
}
-extern "C" UINT __stdcall DeregisterExtensions(MSIHANDLE handle)
-{
- std::_tstring mystr;
-
- // Finding the product with the help of the propery FINDPRODUCT,
- // that contains a Windows Registry key, that points to the install location.
-
- TCHAR szValue[8192];
- DWORD nValueSize = sizeof(szValue);
- HKEY hKey;
- std::_tstring sInstDir;
-
- std::_tstring sProductKey = GetMsiProperty( handle, TEXT("FINDPRODUCT") );
- // MessageBox( NULL, sProductKey.c_str(), "Titel", MB_OK );
-
- if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) )
- {
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
- {
- sInstDir = szValue;
- }
- RegCloseKey( hKey );
- }
- else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) )
- {
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
- {
- sInstDir = szValue;
- }
- RegCloseKey( hKey );
- }
- else
- {
- return ERROR_SUCCESS;
- }
-
- // MessageBox( NULL, sInstDir.c_str(), "install location", MB_OK );
-
- // Searching for the unopkg.exe
-
- std::_tstring sUnoPkgFile = sInstDir + TEXT("program\\unopkg.exe");
- std::_tstring sShareInstallDir = sInstDir + TEXT("share\\extension\\install\\");
- std::_tstring sPattern = sShareInstallDir + TEXT("*.oxt");
-
- WIN32_FIND_DATA aFindFileData;
-
- // Find unopkg.exe
-
- HANDLE hFindUnopkg = FindFirstFile( sUnoPkgFile.c_str(), &aFindFileData );
-
- if ( hFindUnopkg != INVALID_HANDLE_VALUE )
- {
- // unopkg.exe exists in program directory
-
- // Finding all oxt files in sShareInstallDir
-
- HANDLE hFindOxt = FindFirstFile( sPattern.c_str(), &aFindFileData );
-
- if ( hFindOxt != INVALID_HANDLE_VALUE )
- {
- bool fNextFile = false;
-
- do
- {
- const std::_tstring sTempFolder(createTempFolder());
- // When removing extensions, only the oxt file name is required, without path
- // Therefore no quoting is required
- // std::_tstring sOxtFile = sShareInstallDir + aFindFileData.cFileName;
- std::_tstring sOxtFile = aFindFileData.cFileName;
- std::_tstring sCommandPart1 = sUnoPkgFile + " remove --shared --bundled " + "\""
- + sOxtFile + "\"";
- std::_tstring sCommand = sCommandPart1
- + TEXT(" -env:UNO_JAVA_JFW_INSTALL_DATA=$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml")
- + TEXT(" -env:UserInstallation=") + sTempFolder;
-
- mystr = "Command: " + sCommand;
- //MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
- DWORD exitCode = 0;
- bool fSuccess = ExecuteCommand( sCommand.c_str(), & exitCode);
- // unopkg in OOo 2.2.1 and early had a bug that it failed when receiving
- // a bootstrap parameter (-env:...) then it exited with a value != 0.
- if (fSuccess && exitCode != 0)
- {
- std::_tstring sCommand = sCommandPart1;
- mystr = "Command: " + sCommand;
- //MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
- fSuccess = ExecuteCommand( sCommand.c_str(), & exitCode);
- }
-
- deleteTempFolder(sTempFolder);
-
- if ( fSuccess )
- {
- mystr = "Executed successfully!";
- // MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
- }
- else
- {
- mystr = "An error occured during execution!";
- // MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
- }
-
- fNextFile = FindNextFile( hFindOxt, &aFindFileData );
-
- } while ( fNextFile );
-
- FindClose( hFindOxt );
- }
- }
- // else
- // {
- // mystr = "Not found: " + sUnoPkgFile;
- // MessageBox(NULL, mystr.c_str(), "Command", MB_OK);
- // }
-
- return ERROR_SUCCESS;
-}
extern "C" UINT __stdcall RemoveExtensions(MSIHANDLE handle)
{
@@ -529,7 +383,7 @@ extern "C" UINT __stdcall RemoveExtensions(MSIHANDLE handle)
std::_tstring sInstDir;
std::_tstring sProductKey = GetMsiProperty( handle, TEXT("FINDPRODUCT") );
- // MessageBox( NULL, sProductKey.c_str(), "Titel", MB_OK );
+ //MessageBox( NULL, sProductKey.c_str(), "Titel", MB_OK );
if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) )
{
@@ -552,22 +406,22 @@ extern "C" UINT __stdcall RemoveExtensions(MSIHANDLE handle)
return ERROR_SUCCESS;
}
- // Removing complete directory "share\uno_packages\cache"
+ // Removing complete directory "Basis\presets\bundled"
- std::_tstring sCacheDir = sInstDir + TEXT("share\\uno_packages\\cache");
+ std::_tstring sCacheDir = sInstDir + TEXT("share\\prereg\\bundled");
bool fSuccess = RemoveCompleteDirectory( sCacheDir );
- if ( fSuccess )
- {
- mystr = "Executed successfully!";
- // MessageBox(NULL, mystr.c_str(), "Main methode", MB_OK);
- }
- else
- {
- mystr = "An error occured during execution!";
- // MessageBox(NULL, mystr.c_str(), "Main methode", MB_OK);
- }
+// if ( fSuccess )
+// {
+// mystr = "Executed successfully!";
+// MessageBox(NULL, mystr.c_str(), "Main methode", MB_OK);
+// }
+// else
+// {
+// mystr = "An error occured during execution!";
+// MessageBox(NULL, mystr.c_str(), "Main methode", MB_OK);
+// }
return ERROR_SUCCESS;
}
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index e4d3ff023b3b..48ffc5727dc1 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -62,7 +62,6 @@ class Timer;
class SfxItemSet;
class DateTime;
class SvStringsDtor;
-class SvEaMgr;
#define S2BS(s) ByteString( s, RTL_TEXTENCODING_MS_1252 )
@@ -208,8 +207,6 @@ public:
SvStream* GetInStream();
SvStream* GetOutStream();
- SvEaMgr* GetEaMgr();
-
sal_Bool Commit();
sal_Bool IsStorage();
diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index 63eb9e8c876f..9473ac126bd7 100755..100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -293,6 +293,7 @@ public:
sal_Bool IsReadOnlyUI() const;
void SetNoName();
sal_Bool IsInModalMode() const;
+ sal_Bool IsInPrepareClose() const;
//<!--Added by PengYunQuan for Validity Cell Range Picker
virtual sal_Bool AcceptStateUpdate() const;
//-->Added by PengYunQuan for Validity Cell Range Picker
@@ -346,6 +347,9 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
virtual void UpdateLinks();
+ // called for a few slots like SID_SAVE[AS]DOC, SID_PRINTDOC[DIRECT], derived classes may abort the action
+ virtual sal_Bool QuerySlotExecutable( USHORT nSlotId );
+
sal_Bool SaveChildren(BOOL bObjectsOnly=FALSE);
sal_Bool SaveAsChildren( SfxMedium &rMedium );
sal_Bool SwitchChildrenPersistance(
diff --git a/sfx2/inc/sfx2/titledockwin.hxx b/sfx2/inc/sfx2/titledockwin.hxx
index ebb4497a0ba2..2728cc621138 100644
--- a/sfx2/inc/sfx2/titledockwin.hxx
+++ b/sfx2/inc/sfx2/titledockwin.hxx
@@ -100,6 +100,11 @@ namespace sfx2
ToolBox& GetToolBox() { return m_aToolbox; }
const ToolBox& GetToolBox() const { return m_aToolbox; }
+ /** Return the border that is painted around the inner window as
+ decoration.
+ */
+ SvBorder GetDecorationBorder (void) const { return m_aBorder; }
+
protected:
// Window overridables
virtual void Paint( const Rectangle& i_rArea );
@@ -153,6 +158,11 @@ namespace sfx2
since the last Paint().
*/
bool m_bLayoutPending;
+
+ /** Height of the title bar. Calculated in impl_layout().
+ */
+ int m_nTitleBarHeight;
+
};
//......................................................................................................................
diff --git a/sfx2/qa/cppunit/makefile.mk b/sfx2/qa/cppunit/makefile.mk
index 2794c2ae92bb..dce0b86a0619 100644
--- a/sfx2/qa/cppunit/makefile.mk
+++ b/sfx2/qa/cppunit/makefile.mk
@@ -35,6 +35,13 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
+#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/sfx2/qa/cppunit/test_metadatable.cxx b/sfx2/qa/cppunit/test_metadatable.cxx
index 903be6920327..6a0be13a9c53 100644
--- a/sfx2/qa/cppunit/test_metadatable.cxx
+++ b/sfx2/qa/cppunit/test_metadatable.cxx
@@ -27,10 +27,12 @@
#include "precompiled_sfx2.hxx"
+#include "preextstl.h"
#include <cppunit/TestAssert.h>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
+#include "postextstl.h"
#include <rtl/ustrbuf.hxx>
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 6e13894feb49..7e4e9921573a 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -129,7 +129,7 @@
#include <sfx2/mnuitem.hxx>
#endif
-#if defined( WIN ) || defined( WNT ) || defined( OS2 )
+#if defined( WNT ) || defined( OS2 )
#define DDE_AVAILABLE
#endif
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index d615d90ff37a..7399742d1e94 100644
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -30,9 +30,6 @@
#include <basic/basmgr.hxx>
#include <basic/sbstar.hxx>
-#ifdef WIN
-#define _TL_LANG_SPECIAL
-#endif
#include <svl/svdde.hxx>
#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 10e3c9b1a04a..20b7abb5d087 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -28,7 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
#include <tools/svwin.h>
#endif
@@ -211,7 +211,7 @@ BOOL SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
{
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
static BOOL bInWinExec = FALSE;
#endif
USHORT nLinkType = pSvLink->GetUpdateMode();
@@ -258,7 +258,7 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
// ansonsten unter Win/WinNT die Applikation direkt starten
}
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
// Server nicht da, starten und nochmal versuchen
if( !bInWinExec )
@@ -291,7 +291,7 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
}
}
else
-#endif // WIN / WNT
+#endif // WNT
{
nError = DDELINK_ERROR_APP;
}
diff --git a/sfx2/source/appl/makefile.mk b/sfx2/source/appl/makefile.mk
index 72ac94a9b38e..30f74355077a 100644
--- a/sfx2/source/appl/makefile.mk
+++ b/sfx2/source/appl/makefile.mk
@@ -101,7 +101,6 @@ SFX_OBJECTS = \
$(SLO)$/module.obj \
$(SLO)$/newhelp.obj \
$(SLO)$/opengrf.obj \
- $(SLO)$/sfxdll.obj \
$(SLO)$/sfxhelp.obj \
$(SLO)$/sfxpicklist.obj \
$(SLO)$/shutdownicon.obj \
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 0ad62ae1eec1..3d848d4d5648 100755..100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1525,19 +1525,6 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent,
{
// Dateiname
String aFile( pInfoItem->GetValue() );
-#ifdef WIN
- if ( aFile.Len() <= 8 )
- {
- String sTmp( SfxResId( STR_NONAME ) );
- USHORT nLen = Min( (USHORT)8, sTmp.Len() );
-
- if ( sTmp.Copy( 0, nLen ).Lower() ==
- aFile.Copy( 0, nLen ).Lower() )
- {
- aFile = pInfoItem->GetValue();
- }
- }
-#endif
INetURLObject aURL;
aURL.SetSmartProtocol( INET_PROT_FILE );
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index b0890a3ee781..7198c84b7127 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1954,7 +1954,7 @@ void FileDialogHelper_Impl::addGraphicFilter()
}
}
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
if ( aExtensions.Len() > 240 )
aExtensions = DEFINE_CONST_UNICODE( FILEDIALOG_FILTER_ALL );
#endif
@@ -2748,7 +2748,7 @@ void FileDialogHelper::SetDisplayDirectory( const String& _rPath )
if ( sFolder.getLength() == 0 )
{
// _rPath is not a valid path -> fallback to home directory
- NAMESPACE_VOS( OSecurity ) aSecurity;
+ vos:: OSecurity aSecurity;
aSecurity.getHomeDir( sFolder );
}
mpImp->displayFolder( sFolder );
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index d32ee843cbf2..2ac8f6a43fee 100755..100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -245,6 +245,36 @@ SfxSecurityPage_Impl::SfxSecurityPage_Impl( SfxSecurityPage &rTabPage, const Sfx
m_aRecordChangesCB.SetStyle( m_aRecordChangesCB.GetStyle() | WB_EARLYTOGGLE );
m_aRecordChangesCB.SetToggleHdl( LINK( this, SfxSecurityPage_Impl, RecordChangesCBToggleHdl ) );
m_aChangeProtectionPB.SetClickHdl( LINK( this, SfxSecurityPage_Impl, ChangeProtectionPBHdl ) );
+
+
+ // #i112277: for the time being (OOO 3.3) the following options should not
+ // be available. In the long run however it is planned to implement the yet
+ // missing functionality. Thus now we hide them and move the remaining ones up.
+ m_aNewPasswordToOpenFL.Hide();
+ m_aNewPasswordToOpenFT.Hide();
+ m_aNewPasswordToOpenED.Hide();
+ m_aConfirmPasswordToOpenFT.Hide();
+ m_aConfirmPasswordToOpenED.Hide();
+ m_aNewPasswordInfoFT.Hide();
+ m_aNewPasswordToModifyFL.Hide();
+ m_aNewPasswordToModifyFT.Hide();
+ m_aNewPasswordToModifyED.Hide();
+ m_aConfirmPasswordToModifyFT.Hide();
+ m_aConfirmPasswordToModifyED.Hide();
+ const long nDelta = m_aOptionsFL.GetPosPixel().Y() - m_aNewPasswordToOpenFL.GetPosPixel().Y();
+ Point aPos;
+ aPos = m_aOptionsFL.GetPosPixel();
+ aPos.Y() -= nDelta;
+ m_aOptionsFL.SetPosPixel( aPos );
+ aPos = m_aOpenReadonlyCB.GetPosPixel();
+ aPos.Y() -= nDelta;
+ m_aOpenReadonlyCB.SetPosPixel( aPos );
+ aPos = m_aRecordChangesCB.GetPosPixel();
+ aPos.Y() -= nDelta;
+ m_aRecordChangesCB.SetPosPixel( aPos );
+ aPos = m_aChangeProtectionPB.GetPosPixel();
+ aPos.Y() -= nDelta;
+ m_aChangeProtectionPB.SetPosPixel( aPos );
}
diff --git a/sfx2/source/dialog/securitypage.src b/sfx2/source/dialog/securitypage.src
index fee60404d01c..fee60404d01c 100755..100644
--- a/sfx2/source/dialog/securitypage.src
+++ b/sfx2/source/dialog/securitypage.src
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index 58a61d66ba8b..4be0948d8047 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -51,6 +51,7 @@ namespace sfx2
,m_aContentWindow( this, WB_DIALOGCONTROL )
,m_aBorder( 3, 1, 3, 3 )
,m_bLayoutPending( false )
+ ,m_nTitleBarHeight(0)
{
impl_construct();
}
@@ -139,23 +140,23 @@ namespace sfx2
Size aWindowSize( GetOutputSizePixel() );
// position the tool box
- int nTitleBarHeight( GetSettings().GetStyleSettings().GetTitleHeight() );
- if ( aToolBoxSize.Height() > nTitleBarHeight )
- nTitleBarHeight = aToolBoxSize.Height();
+ m_nTitleBarHeight = GetSettings().GetStyleSettings().GetTitleHeight();
+ if ( aToolBoxSize.Height() > m_nTitleBarHeight )
+ m_nTitleBarHeight = aToolBoxSize.Height();
m_aToolbox.SetPosSizePixel(
Point(
aWindowSize.Width() - aToolBoxSize.Width(),
- ( nTitleBarHeight - aToolBoxSize.Height() ) / 2
+ ( m_nTitleBarHeight - aToolBoxSize.Height() ) / 2
),
aToolBoxSize
);
// Place the content window.
- if ( nTitleBarHeight < aToolBoxSize.Height() )
- nTitleBarHeight = aToolBoxSize.Height();
- aWindowSize.Height() -= nTitleBarHeight;
+ if ( m_nTitleBarHeight < aToolBoxSize.Height() )
+ m_nTitleBarHeight = aToolBoxSize.Height();
+ aWindowSize.Height() -= m_nTitleBarHeight;
m_aContentWindow.SetPosSizePixel(
- Point( m_aBorder.Left(), nTitleBarHeight + m_aBorder.Top() ),
+ Point( m_aBorder.Left(), m_nTitleBarHeight + m_aBorder.Top() ),
Size(
aWindowSize.Width() - m_aBorder.Left() - m_aBorder.Right(),
aWindowSize.Height() - m_aBorder.Top() - m_aBorder.Bottom()
@@ -175,11 +176,6 @@ namespace sfx2
Push( PUSH_FONT | PUSH_FILLCOLOR | PUSH_LINECOLOR );
- int nTitleBarHeight( GetSettings().GetStyleSettings().GetTitleHeight() );
- const Size aToolBoxSize = m_aToolbox.CalcWindowSizePixel();
- if ( aToolBoxSize.Height() > nTitleBarHeight )
- nTitleBarHeight = aToolBoxSize.Height();
-
SetFillColor( GetSettings().GetStyleSettings().GetDialogColor() );
SetLineColor();
@@ -194,7 +190,7 @@ namespace sfx2
int nInnerLeft = nOuterLeft + m_aBorder.Left() - 1;
int nOuterRight = aWindowSize.Width() - 1;
int nInnerRight = nOuterRight - m_aBorder.Right() + 1;
- int nInnerTop = nTitleBarHeight + m_aBorder.Top() - 1;
+ int nInnerTop = m_nTitleBarHeight + m_aBorder.Top() - 1;
int nOuterBottom = aWindowSize.Height() - 1;
int nInnerBottom = nOuterBottom - m_aBorder.Bottom() + 1;
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index c063546da1c7..066f366b09bd 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -489,6 +489,13 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
case SID_SAVEASDOC:
case SID_SAVEDOC:
{
+ // derived class may decide to abort this
+ if( !QuerySlotExecutable( nId ) )
+ {
+ rReq.SetReturnValue( SfxBoolItem( 0, FALSE ) );
+ return;
+ }
+
//!! detaillierte Auswertung eines Fehlercodes
SfxObjectShellRef xLock( this );
@@ -895,7 +902,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
rReq.Done();
}
-//--------------------------------------------------------------------
+//-------------------------------------------------------------------------
void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
{
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 49188defc4f1..6c4bdf56ba26 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -195,6 +195,13 @@ sal_Bool SfxObjectShell::SaveAs( SfxMedium& rMedium )
//-------------------------------------------------------------------------
+sal_Bool SfxObjectShell::QuerySlotExecutable( USHORT /*nSlotId*/ )
+{
+ return sal_True;
+}
+
+//-------------------------------------------------------------------------
+
sal_Bool GetPasswd_Impl( const SfxItemSet* pSet, ::rtl::OUString& rPasswd )
{
const SfxPoolItem* pItem = NULL;
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index f202266dd74e..b7567b89f02f 100755..100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -526,6 +526,13 @@ SfxObjectShell* SfxObjectShell::Current()
return pFrame ? pFrame->GetObjectShell() : 0;
}
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::IsInPrepareClose() const
+{
+ return pImp->bInPrepareClose;
+}
+
//------------------------------------------------------------------------
struct BoolEnv_Impl
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index b5a9536b12c5..7ef9fe0d2f19 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -977,6 +977,8 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString&
aArgs.remove( "BreakMacroSignature" );
aArgs.remove( "Stream" );
aArgs.remove( "InputStream" );
+ aArgs.remove( "URL" );
+ aArgs.remove( "Frame" );
// TODO/LATER: all the parameters that are accepted by ItemSet of the DocShell must be removed here
@@ -988,6 +990,10 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString&
SfxAllItemSet aSet( pObjectShell->GetPool() );
TransformParameters( SID_OPENDOC, rArgs, aSet );
+ // the arguments are not allowed to reach the medium
+ aSet.ClearItem( SID_FILE_NAME );
+ aSet.ClearItem( SID_FILLFRAME );
+
pMedium->GetItemSet()->Put( aSet );
SFX_ITEMSET_ARG( &aSet, pItem, SfxStringItem, SID_FILTER_NAME, sal_False );
if ( pItem )
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 035fd3f794de..dcda416a3d16 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -813,6 +813,13 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
xNewObj->SetModifyPasswordEntered( sal_False );
xNewObj->SetReadOnly();
}
+ else if ( rReq.GetSlot() == SID_EDITDOC && bForEdit && !xNewObj->IsReadOnlyMedium() )
+ {
+ // the filter might request setting of the document to readonly state
+ // but in case of SID_EDITDOC it should not happen if the document
+ // can be opened for editing
+ xNewObj->SetReadOnlyUI( sal_False );
+ }
if ( xNewObj->IsDocShared() )
{
@@ -1172,10 +1179,6 @@ void SfxViewFrame::DoActivate( sal_Bool bUI, SfxViewFrame* pOldFrame )
DBG_CHKTHIS(SfxViewFrame, 0);
SFX_APP();
-#ifdef WIN
- pSfxApp->TestFreeResources_Impl();
-#endif
-
pDispatcher->DoActivate_Impl( bUI, pOldFrame );
// Wenn ich einen parent habe und dieser ist kein parent des alten
@@ -1240,9 +1243,6 @@ void SfxViewFrame::DoDeactivate(sal_Bool bUI, SfxViewFrame* pNewFrame )
pFrame = pFrame->GetParentViewFrame();
}
}
-#ifdef WIN
- pSfxApp->TestFreeResources_Impl();
-#endif
}
//------------------------------------------------------------------------
@@ -2144,6 +2144,8 @@ SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc
aTransformLoadArgs.remove( "Hidden" );
::rtl::OUString sURL( RTL_CONSTASCII_USTRINGPARAM( "private:object" ) );
+ if ( !sURL.getLength() )
+ sURL = i_rDoc.GetFactory().GetFactoryURL();
Reference< XComponentLoader > xLoader( i_rFrame, UNO_QUERY_THROW );
xLoader->loadComponentFromURL( sURL, ::rtl::OUString::createFromAscii( "_self" ), 0,
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 5b317e4b770b..4ed0173be8e1 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -700,6 +700,14 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
case SID_PRINTDOCDIRECT:
{
SfxObjectShell* pDoc = GetObjectShell();
+
+ // derived class may decide to abort this
+ if( !pDoc->QuerySlotExecutable( nId ) )
+ {
+ rReq.SetReturnValue( SfxBoolItem( 0, FALSE ) );
+ return;
+ }
+
bool bDetectHidden = ( !bSilent && pDoc );
if ( bDetectHidden && pDoc->QueryHiddenInformation( WhenPrinting, NULL ) != RET_YES )
break;
diff --git a/shell/inc/internal/utilities.hxx b/shell/inc/internal/utilities.hxx
index 4701a2682446..c67787c5cb9d 100755
--- a/shell/inc/internal/utilities.hxx
+++ b/shell/inc/internal/utilities.hxx
@@ -84,6 +84,12 @@ bool HasOnlySpaces(const std::wstring& String);
Windows Locale Identifier corresponding to input LocaleSet.
*/
+//---------------------------------
+/** Convert a long path name using Windows api call GetShortPathName
+*/
+std::wstring getShortPathName( const std::wstring& aLongName );
+
+
#ifndef OS2
LCID LocaleSetToLCID( const LocaleSet_t & Locale );
#endif
diff --git a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx
index f8816668f8ab..ab6c8bae2922 100644..100755
--- a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx
+++ b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx
@@ -152,14 +152,15 @@ HRESULT STDMETHODCALLTYPE CColumnInfo::GetColumnInfo(DWORD dwIndex, SHCOLUMNINFO
//
//-----------------------------
- HRESULT STDMETHODCALLTYPE CColumnInfo::GetItemData(LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData)
+HRESULT STDMETHODCALLTYPE CColumnInfo::GetItemData(LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData)
{
if (IsOOFileExtension(pscd->pwszExt))
{
try
{
+ std::wstring fname = getShortPathName( std::wstring( pscd->wszFile ) );
- CMetaInfoReader meta_info_accessor(WStringToString(pscd->wszFile));
+ CMetaInfoReader meta_info_accessor(WStringToString(fname));
VariantClear(pvarData);
diff --git a/shell/source/win32/shlxthandler/infotips/infotips.cxx b/shell/source/win32/shlxthandler/infotips/infotips.cxx
index 72da8c9e7060..c6bf925ac6a9 100644..100755
--- a/shell/source/win32/shlxthandler/infotips/infotips.cxx
+++ b/shell/source/win32/shlxthandler/infotips/infotips.cxx
@@ -353,6 +353,8 @@ HRESULT STDMETHODCALLTYPE CInfoTip::Load(LPCOLESTR pszFileName, DWORD /*dwMode*/
m_FileNameOnly = std::wstring(begin, end);
+ fname = getShortPathName( fname );
+
std::string fnameA = WStringToString(fname);
// #115531#
diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx
index adcf2b2f8ddf..30151fc5dd75 100755
--- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx
+++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx
@@ -657,7 +657,8 @@ SCODE STDMETHODCALLTYPE COooFilter::IsDirty()
SCODE STDMETHODCALLTYPE COooFilter::Load(LPCWSTR pszFileName, DWORD /*dwMode*/)
{
// Load just sets the filename for GetChunk to read and ignores the mode
- m_pwszFileName = pszFileName;
+ m_pwszFileName = getShortPathName( pszFileName );
+
// Open the file previously specified in call to IPersistFile::Load and get content.
try
{
diff --git a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
index 3f495a7aa53d..13d1a57fefd8 100644..100755
--- a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
+++ b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
@@ -237,14 +237,14 @@ HRESULT STDMETHODCALLTYPE CPropertyHdl::Initialize( IStream *pStream, DWORD grfM
try
{
pMetaInfoReader = new CMetaInfoReader( (void*)pStream, &z_filefunc );
+ LoadProperties( pMetaInfoReader );
+ delete pMetaInfoReader;
}
catch (const std::exception& e)
{
OutputDebugStringFormat( "CPropertyHdl::Initialize: Caught exception [%s]", e.what() );
return E_FAIL;
}
-
- LoadProperties( pMetaInfoReader );
/*
// load extended properties and search content
_LoadExtendedProperties();
diff --git a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
index a45c7967f233..d668479d5ff5 100755
--- a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
+++ b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
@@ -157,13 +157,26 @@ HRESULT STDMETHODCALLTYPE CPropertySheet::Initialize(
NULL,
0)))
{
- DragQueryFileA(
- reinterpret_cast<HDROP>(medium.hGlobal),
- 0,
- m_szFileName,
- sizeof(m_szFileName));
-
- hr = S_OK;
+ UINT size = DragQueryFile( reinterpret_cast<HDROP>(medium.hGlobal), 0, 0, 0 );
+ if ( size != 0 )
+ {
+ TCHAR * buffer = new TCHAR[ size + 1 ];
+ UINT result_size = DragQueryFile( reinterpret_cast<HDROP>(medium.hGlobal),
+ 0, buffer, size + 1 );
+ if ( result_size != 0 )
+ {
+ std::wstring fname = getShortPathName( buffer );
+ std::string fnameA = WStringToString( fname );
+ ZeroMemory( m_szFileName, sizeof( m_szFileName ) );
+ strncpy( m_szFileName, fnameA.c_str(), ( sizeof( m_szFileName ) - 1 ) );
+ hr = S_OK;
+ }
+ else
+ hr = E_INVALIDARG;
+ delete [] buffer;
+ }
+ else
+ hr = E_INVALIDARG;
}
else
hr = E_INVALIDARG;
@@ -320,24 +333,29 @@ BOOL CALLBACK CPropertySheet::PropPageStatisticsProc(HWND hwnd, UINT uiMsg, WPAR
//##################################
void CPropertySheet::InitPropPageSummary(HWND hwnd, LPPROPSHEETPAGE /*lppsp*/)
{
- CMetaInfoReader metaInfo(m_szFileName);
-
- SetWindowText(GetDlgItem(hwnd,IDC_TITLE), metaInfo.getTagData( META_INFO_TITLE ).c_str() );
- SetWindowText(GetDlgItem(hwnd,IDC_AUTHOR), metaInfo.getTagData( META_INFO_AUTHOR ).c_str() );
- SetWindowText(GetDlgItem(hwnd,IDC_SUBJECT), metaInfo.getTagData( META_INFO_SUBJECT ).c_str() );
- SetWindowText(GetDlgItem(hwnd,IDC_KEYWORDS), metaInfo.getTagData( META_INFO_KEYWORDS ).c_str() );
-
- // comments read from meta.xml use "\n" for return, but this will not displayable in Edit control, add
- // "\r" before "\n" to form "\r\n" in order to display return in Edit control.
- std::wstring tempStr = metaInfo.getTagData( META_INFO_DESCRIPTION ).c_str();
- std::wstring::size_type itor = tempStr.find ( L"\n" , 0 );
- while (itor != std::wstring::npos)
+ try
+ {
+ CMetaInfoReader metaInfo(m_szFileName);
+
+ SetWindowText(GetDlgItem(hwnd,IDC_TITLE), metaInfo.getTagData( META_INFO_TITLE ).c_str() );
+ SetWindowText(GetDlgItem(hwnd,IDC_AUTHOR), metaInfo.getTagData( META_INFO_AUTHOR ).c_str() );
+ SetWindowText(GetDlgItem(hwnd,IDC_SUBJECT), metaInfo.getTagData( META_INFO_SUBJECT ).c_str() );
+ SetWindowText(GetDlgItem(hwnd,IDC_KEYWORDS), metaInfo.getTagData( META_INFO_KEYWORDS ).c_str() );
+
+ // comments read from meta.xml use "\n" for return, but this will not displayable in Edit control, add
+ // "\r" before "\n" to form "\r\n" in order to display return in Edit control.
+ std::wstring tempStr = metaInfo.getTagData( META_INFO_DESCRIPTION ).c_str();
+ std::wstring::size_type itor = tempStr.find ( L"\n" , 0 );
+ while (itor != std::wstring::npos)
+ {
+ tempStr.insert(itor, L"\r");
+ itor = tempStr.find(L"\n", itor + 2);
+ }
+ SetWindowText(GetDlgItem(hwnd,IDC_COMMENTS), tempStr.c_str());
+ }
+ catch (const std::exception&)
{
- tempStr.insert(itor, L"\r");
- itor = tempStr.find(L"\n", itor + 2);
}
- SetWindowText(GetDlgItem(hwnd,IDC_COMMENTS), tempStr.c_str());
-
}
//---------------------------------
@@ -345,22 +363,23 @@ void CPropertySheet::InitPropPageSummary(HWND hwnd, LPPROPSHEETPAGE /*lppsp*/)
*/
void CPropertySheet::InitPropPageStatistics(HWND hwnd, LPPROPSHEETPAGE /*lppsp*/)
{
- CMetaInfoReader metaInfo(m_szFileName);
-
- document_statistic_reader_ptr doc_stat_reader = create_document_statistic_reader(m_szFileName, &metaInfo);
+ try
+ {
+ CMetaInfoReader metaInfo(m_szFileName);
- statistic_group_list_t sgl;
- doc_stat_reader->read(&sgl);
+ document_statistic_reader_ptr doc_stat_reader = create_document_statistic_reader(m_szFileName, &metaInfo);
- list_view_builder_ptr lv_builder = create_list_view_builder(
- GetDlgItem(hwnd, IDC_STATISTICSLIST),
- GetResString(IDS_PROPERTY),
- GetResString(IDS_PROPERTY_VALUE));
+ statistic_group_list_t sgl;
+ doc_stat_reader->read(&sgl);
- lv_builder->build(sgl);
+ list_view_builder_ptr lv_builder = create_list_view_builder(
+ GetDlgItem(hwnd, IDC_STATISTICSLIST),
+ GetResString(IDS_PROPERTY),
+ GetResString(IDS_PROPERTY_VALUE));
+ lv_builder->build(sgl);
+ }
+ catch (const std::exception&)
+ {
+ }
}
-
-
-
-
diff --git a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
index 13f49c8a2efd..62fd306317be 100644..100755
--- a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
+++ b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
@@ -367,7 +367,8 @@ HRESULT STDMETHODCALLTYPE CThumbviewer::Extract(HBITMAP *phBmpImage)
try
{
- std::auto_ptr<ZipFile> zipfile(new ZipFile(WStringToString(filename_)));
+ std::wstring fname = getShortPathName( filename_ );
+ std::auto_ptr<ZipFile> zipfile( new ZipFile( WStringToString( fname ) ) );
if (zipfile->HasContent(THUMBNAIL_CONTENT))
{
diff --git a/shell/source/win32/shlxthandler/util/fileextensions.cxx b/shell/source/win32/shlxthandler/util/fileextensions.cxx
index b8de490a5c47..13e3535c7aa7 100644..100755
--- a/shell/source/win32/shlxthandler/util/fileextensions.cxx
+++ b/shell/source/win32/shlxthandler/util/fileextensions.cxx
@@ -27,6 +27,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_shell.hxx"
+#include "algorithm"
#include "internal/fileextensions.hxx"
//------------------------------------
@@ -87,9 +88,17 @@ std::string get_file_name_extension(const std::string& file_name)
/** Return the type of a file
*/
+char easytolower( char in )
+{
+ if( in<='Z' && in>='A' )
+ return in-('Z'-'z');
+ return in;
+}
+
File_Type_t get_file_type(const std::string& file_name)
{
std::string fext = get_file_name_extension(file_name);
+ std::transform(fext.begin(), fext.end(), fext.begin(), easytolower);
if (std::string::npos != WRITER_FILE_EXTENSIONS.find(fext))
return WRITER;
diff --git a/shell/source/win32/shlxthandler/util/utilities.cxx b/shell/source/win32/shlxthandler/util/utilities.cxx
index f721c4113aa8..005e4689cdce 100644..100755
--- a/shell/source/win32/shlxthandler/util/utilities.cxx
+++ b/shell/source/win32/shlxthandler/util/utilities.cxx
@@ -148,6 +148,28 @@ bool HasOnlySpaces(const std::wstring& String)
return true;
}
+//---------------------------------
+/** helper function to convert windows pathes to short form.
+ @returns
+ shortend path.
+*/
+
+std::wstring getShortPathName( const std::wstring& aLongName )
+{
+ std::wstring shortName = aLongName;
+ long length = GetShortPathName( aLongName.c_str(), NULL, 0 );
+
+ if ( length != 0 )
+ {
+ TCHAR* buffer = new TCHAR[ length+1 ];
+ length = GetShortPathName( aLongName.c_str(), buffer, length );
+ if ( length != 0 )
+ shortName = std::wstring( buffer );
+ delete [] buffer;
+ }
+ return shortName;
+}
+
/** convert LocaleSet pair into Microsoft List of Locale ID (LCID)
according to ISO-639 and ISO-3166.
http://etext.lib.virginia.edu/tei/iso639.html
diff --git a/smoketestoo_native/makefile.mk b/smoketestoo_native/makefile.mk
index 80982856602d..e954549fdca9 100644
--- a/smoketestoo_native/makefile.mk
+++ b/smoketestoo_native/makefile.mk
@@ -33,6 +33,13 @@ ENABLE_EXCEPTIONS = TRUE
CFLAGSCXX += $(CPPUNIT_CFLAGS)
+#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
+
SLOFILES = $(SHL1OBJS)
SHL1TARGET = smoketest
diff --git a/smoketestoo_native/smoketest.cxx b/smoketestoo_native/smoketest.cxx
index e2cb51127f47..fd283327c738 100644
--- a/smoketestoo_native/smoketest.cxx
+++ b/smoketestoo_native/smoketest.cxx
@@ -28,6 +28,8 @@
#include "sal/config.h"
#include "boost/noncopyable.hpp"
+#include "com/sun/star/awt/XCallback.hpp"
+#include "com/sun/star/awt/XRequestCallback.hpp"
#include "com/sun/star/beans/PropertyState.hpp"
#include "com/sun/star/beans/PropertyValue.hpp"
#include "com/sun/star/document/MacroExecMode.hpp"
@@ -40,15 +42,18 @@
#include "com/sun/star/frame/XModel.hpp"
#include "com/sun/star/frame/XNotifyingDispatch.hpp"
#include "com/sun/star/lang/EventObject.hpp"
+#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/RuntimeException.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/util/URL.hpp"
+#include <preextstl.h>
#include "cppuhelper/implbase1.hxx"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
#include "cppunit/plugin/TestPlugIn.h"
+#include <postextstl.h>
#include "osl/conditn.hxx"
#include "osl/diagnose.h"
#include "rtl/ustring.h"
@@ -94,6 +99,29 @@ void Listener::dispatchFinished(css::frame::DispatchResultEvent const & Result)
result_->condition.set();
}
+class Callback: public cppu::WeakImplHelper1< css::awt::XCallback > {
+public:
+ Callback(
+ css::uno::Reference< css::frame::XNotifyingDispatch > const & dispatch,
+ css::util::URL const & url,
+ css::uno::Sequence< css::beans::PropertyValue > const & arguments,
+ css::uno::Reference< css::frame::XDispatchResultListener > const &
+ listener):
+ dispatch_(dispatch), url_(url), arguments_(arguments),
+ listener_(listener)
+ { OSL_ASSERT(dispatch.is()); }
+
+private:
+ virtual void SAL_CALL notify(css::uno::Any const &)
+ throw (css::uno::RuntimeException)
+ { dispatch_->dispatchWithNotification(url_, arguments_, listener_); }
+
+ css::uno::Reference< css::frame::XNotifyingDispatch > dispatch_;
+ css::util::URL url_;
+ css::uno::Sequence< css::beans::PropertyValue > arguments_;
+ css::uno::Reference< css::frame::XDispatchResultListener > listener_;
+};
+
class Test: public CppUnit::TestFixture {
public:
virtual void setUp();
@@ -135,8 +163,7 @@ void Test::test() {
RTL_CONSTASCII_USTRINGPARAM(
"vnd.sun.star.script:Standard.Global.StartTestWithDefaultOptions?"
"language=Basic&location=document"));
- Result result;
- css::uno::Reference< css::frame::XNotifyingDispatch >(
+ css::uno::Reference< css::frame::XNotifyingDispatch > disp(
css::uno::Reference< css::frame::XDispatchProvider >(
css::uno::Reference< css::frame::XController >(
css::uno::Reference< css::frame::XModel >(
@@ -154,9 +181,18 @@ void Test::test() {
css::uno::UNO_SET_THROW)->getFrame(),
css::uno::UNO_QUERY_THROW)->queryDispatch(
url, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_self")), 0),
- css::uno::UNO_QUERY_THROW)->dispatchWithNotification(
- url, css::uno::Sequence< css::beans::PropertyValue >(),
- new Listener(&result));
+ css::uno::UNO_QUERY_THROW);
+ Result result;
+ // Shifted to main thread to work around potential deadlocks (i112867):
+ css::uno::Reference< css::awt::XRequestCallback >(
+ connection_.getFactory()->createInstance( //TODO: AsyncCallback ctor
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.AsyncCallback"))),
+ css::uno::UNO_QUERY_THROW)->addCallback(
+ new Callback(
+ disp, url, css::uno::Sequence< css::beans::PropertyValue >(),
+ new Listener(&result)),
+ css::uno::Any());
result.condition.wait();
CPPUNIT_ASSERT(result.success);
CPPUNIT_ASSERT_EQUAL(rtl::OUString(), result.result);
diff --git a/soldep/bootstrp/prj.cxx b/soldep/bootstrp/prj.cxx
index dfb29fe74754..36495a429de8 100644
--- a/soldep/bootstrp/prj.cxx
+++ b/soldep/bootstrp/prj.cxx
@@ -41,31 +41,21 @@
//#define TEST 1
-#ifdef MAC
-#define putenv(x)
-#endif
-
-#if defined(DOS) || defined(WNT) || defined(OS2)
+#if defined(WNT) || defined(OS2)
#define LIST_DELIMETER ';'
#else
#ifdef UNX
#define LIST_DELIMETER ':'
#else
-#ifdef MAC
-#define LIST_DELIMETER ','
-#endif
#endif
#endif
-#if defined(DOS) || defined(WNT) || defined(OS2) || defined(WIN)
+#if defined(WNT) || defined(OS2)
#define PATH_DELIMETER '\\'
#else
#ifdef UNX
#define PATH_DELIMETER '/'
#else
-#ifdef MAC
-#define PATH_DELIMETER ':'
-#endif
#endif
#endif
@@ -142,14 +132,6 @@ ByteString SimpleConfig::GetNextLine()
ByteString aEraseString;
for ( USHORT i = 0; i<= nLength; i++)
{
-#ifdef MAC
- if ( aTmpStr.GetChar( i ) == '"')
- {
- if ( bFound) bFound = FALSE;
- else bFound = TRUE;
- aTmpStr.SetChar( i, '\t' );
- }
-#endif
if ( aTmpStr.GetChar( i ) == 0x20 && !bFound )
aTmpStr.SetChar( i, 0x09 );
}
diff --git a/soldep/inc/soldep/prj.hxx b/soldep/inc/soldep/prj.hxx
index 53feb3c03cf5..e5582301a9e4 100644
--- a/soldep/inc/soldep/prj.hxx
+++ b/soldep/inc/soldep/prj.hxx
@@ -382,7 +382,7 @@ private:
ByteString aStarName; // no idee what this should be
protected:
- NAMESPACE_VOS( OMutex ) aMutex;
+ vos:: OMutex aMutex;
USHORT nStarMode;
SolarFileList aFileList;
diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index 66afeec6e2c7..987d7fbb5bea 100755..100644
--- a/solenv/bin/build.pl
+++ b/solenv/bin/build.pl
@@ -45,6 +45,7 @@
use lib ("$ENV{SOLARENV}/bin/modules");
use SourceConfig;
+ use RepositoryHelper;
my $in_so_env = 0;
if (defined $ENV{COMMON_ENV_TOOLS}) {
@@ -139,6 +140,8 @@
$html = '';
@ignored_errors = ();
%incompatibles = ();
+ %skip_modules = ();
+ %exclude_branches = ();
$only_platform = ''; # the only platform to prepare
$only_common = ''; # the only common output tree to delete when preparing
%build_modes = ();
@@ -167,8 +170,8 @@
$html_last_updated = 0;
%jobs_hash = ();
$html_path = undef;
- $html_file = CorrectPath($ENV{SOLARSRC} . '/' . $ENV{INPATH}. '.build.html');
$build_finished = 0;
+ $html_file = '';
%had_error = (); # hack for misteriuos windows problems - try run dmake 2 times if first time there was an error
$mkout = CorrectPath("$ENV{SOLARENV}/bin/mkout.pl");
%weights_hash = (); # hash contains info about how many modules are dependent from one module
@@ -209,7 +212,6 @@
get_options();
- $html_file = CorrectPath($html_path . '/' . $ENV{INPATH}. '.build.html') if (defined $html_path);
# my $temp_html_file = CorrectPath($tmp_dir. '/' . $ENV{INPATH}. '.build.html');
get_build_modes();
%deliver_env = ();
@@ -225,12 +227,26 @@
$deliver_env{'OUTPATH'}++;
$deliver_env{'L10N_framework'}++;
};
+ $StandDir = get_stand_dir(); # This also sets $initial_module
+ $source_config = SourceConfig -> new($StandDir);
+
+ if ($html) {
+ if (defined $html_path) {
+ $html_file = CorrectPath($html_path . '/' . $ENV{INPATH}. '.build.html');
+ } else {
+ my $log_directory = Cwd::realpath(CorrectPath($StandDir . '/..')) . '/log';
+ if ((!-d $log_directory) && (!mkdir($log_directory))) {
+ print_error("Cannot create $log_directory for writing html file\n");
+ };
+ $html_file = $log_directory . '/' . $ENV{INPATH}. '.build.html';
+ print "\nPath to html status page: $html_file\n";
+ };
+ };
if ($generate_config && ($clear_config || (scalar keys %remove_from_config)||(scalar keys %add_to_config))) {
generate_config_file();
exit 0;
}
- $StandDir = get_stand_dir(); # This also sets $initial_module
get_module_and_buildlist_paths();
provide_consistency() if (defined $ENV{CWS_WORK_STAMP} && defined($ENV{COMMON_ENV_TOOLS}));
@@ -342,7 +358,6 @@ sub rename_file {
};
sub generate_config_file {
- my $source_config = SourceConfig->new();
$source_config->add_active_modules([keys %add_to_config], 1) if (scalar %add_to_config);
$source_config->remove_activated_modules([keys %remove_from_config], 1) if (scalar %remove_from_config);
$source_config->remove_all_activated_modules() if ($clear_config);
@@ -556,23 +571,36 @@ sub get_build_list_path {
# Get dependencies hash of the current and all parent projects
#
sub get_parent_deps {
- my (%parents_deps_hash, $module, $parent);
my $prj_dir = shift;
my $deps_hash = shift;
- my @unresolved_parents = get_parents_array($prj_dir);
- $parents_deps_hash{$_}++ foreach (@unresolved_parents);
- $$deps_hash{$prj_dir} = \%parents_deps_hash;
- while ($module = pop(@unresolved_parents)) {
+ my @unresolved_parents = ($prj_dir);
+ my %skipped_branches = ();
+ while (my $module = pop(@unresolved_parents)) {
+ next if (defined $$deps_hash{$module});
my %parents_deps_hash = ();
- $parents_deps_hash{$_}++ foreach (get_parents_array($module));
+ foreach (get_parents_array($module)) {
+ if (defined $exclude_branches{$_}) {
+ $skipped_branches{$_}++;
+ next;
+ };
+ $parents_deps_hash{$_}++;
+ }
$$deps_hash{$module} = \%parents_deps_hash;
foreach $Parent (keys %parents_deps_hash) {
- if (!defined($$deps_hash{$Parent})) {
+ if (!defined($$deps_hash{$Parent}) && (!defined $exclude_branches{$module})) {
push (@unresolved_parents, $Parent);
};
};
};
check_deps_hash($deps_hash);
+ foreach (keys %skipped_branches) {
+ print $echo . "Skipping module's $_ branch\n";
+ delete $exclude_branches{$_};
+ };
+ my @missing_branches = keys %exclude_branches;
+ if (scalar @missing_branches) {
+ print_error("For $prj_dir branche(s): \"@missing_branches\" not found\n");
+ };
};
sub store_weights {
@@ -605,18 +633,18 @@ sub expand_dependencies {
};
#
-# This procedure fills out the %reversed_dependencies hash,
-# the hash contaninig the info about modules "waiting" for the module
+# This procedure fills the second hash with reversed dependencies,
+# ie, with info about modules "waiting" for the module
#
sub reverse_dependensies {
- my $deps_hash = shift;
+ my ($deps_hash, $reversed) = @_;
foreach my $module (keys %$deps_hash) {
foreach (keys %{$$deps_hash{$module}}) {
- if (defined $reversed_dependencies{$_}) {
- ${$reversed_dependencies{$_}}{$module}++
+ if (defined $$reversed{$_}) {
+ ${$$reversed{$_}}{$module}++
} else {
my %single_module_dep_hash = ($module => 1);
- $reversed_dependencies{$_} = \%single_module_dep_hash;
+ $$reversed{$_} = \%single_module_dep_hash;
};
};
};
@@ -635,8 +663,12 @@ sub build_all {
};
modules_classify(keys %global_deps_hash);
expand_dependencies (\%global_deps_hash);
-# prepare_build_from(\%global_deps_hash) if (scalar keys %incompatibles);
- prepare_incompatible_build(\%global_deps_hash) if ($incompatible);
+ prepare_incompatible_build(\%global_deps_hash) if ($incompatible && (!$build_from_with_branches));
+ if ($build_from_with_branches) {
+ my %reversed_full_deps_hash = ();
+ reverse_dependensies(\%global_deps_hash, \%reversed_full_deps_hash);
+ prepare_build_from_with_branches(\%global_deps_hash, \%reversed_full_deps_hash);
+ }
if ($build_all_cont || $build_since) {
prepare_build_all_cont(\%global_deps_hash);
};
@@ -653,13 +685,13 @@ sub build_all {
print_error("There are modules:\n@missing_modules\n\nthat should be built, but they are not activated. Please, verify your $source_config_file.\n");
};
};
- foreach my $module (%dead_parents) {
+ foreach my $module (keys %dead_parents, keys %skip_modules) {
remove_from_dependencies($module, \%global_deps_hash);
delete ($global_deps_hash{$module}) if (defined $global_deps_hash{$module});
};
store_weights(\%global_deps_hash);
backup_deps_hash(\%global_deps_hash, \%global_deps_hash_backup);
- reverse_dependensies(\%global_deps_hash_backup);
+ reverse_dependensies(\%global_deps_hash_backup, \%reversed_dependencies);
$modules_number = scalar keys %global_deps_hash;
initialize_html_info($_) foreach (keys %global_deps_hash);
if ($processes_to_run) {
@@ -1100,6 +1132,7 @@ sub get_commands {
while ($arg = pop(@dmake_args)) {
$dmake .= ' '.$arg;
};
+ $dmake .= ' verbose=true' if ($html);
};
#
@@ -1110,34 +1143,44 @@ sub get_stand_dir {
$ENV{mk_tmp} = '';
die "No environment set\n";
};
- my $StandDir;
- if ( defined $ENV{PWD} ) {
- $StandDir = $ENV{PWD};
- } elsif (defined $ENV{_cwd}) {
- $StandDir = $ENV{_cwd};
- } else {
- $StandDir = cwd();
- };
- my $previous_dir = '';
- do {
- foreach (@possible_build_lists) {# ('build.lst', 'build.xlist');
- if (-e $StandDir . '/prj/'.$_) {
- $initial_module = File::Basename::basename($StandDir);
- $build_list_paths{$initial_module} =$StandDir . '/prj/'.$_;
- $StandDir = File::Basename::dirname($StandDir);
- $module_paths{$initial_module} = $StandDir . "/$initial_module";
+ my $repository_helper = RepositoryHelper->new();
+ my $StandDir = $repository_helper->get_repository_root();
+ my $initial_dir = $repository_helper->get_initial_directory();
+ if ($StandDir eq $initial_dir) {
+ print_error('Found no project to build');
+ };
+ $initial_module = substr($initial_dir, length($StandDir) + 1);
+ if ($initial_module =~ /(\\|\/)/) {
+ $initial_module = $`;
+ };
+ $module_paths{$initial_module} = $StandDir . "/$initial_module";
+# $build_list_paths{$initial_module} =$StandDir . '/prj/'.$_;
+# if ( defined $ENV{PWD} ) {
+# $StandDir = $ENV{PWD};
+# } elsif (defined $ENV{_cwd}) {
+# $StandDir = $ENV{_cwd};
+# } else {
+# $StandDir = cwd();
+# };
+# my $previous_dir = '';
+# do {
+# foreach (@possible_build_lists) {# ('build.lst', 'build.xlist');
+# if (-e $StandDir . '/prj/'.$_) {
+# $initial_module = File::Basename::basename($StandDir);
+# $build_list_paths{$initial_module} =$StandDir . '/prj/'.$_;
+# $StandDir = File::Basename::dirname($StandDir);
+# $module_paths{$initial_module} = $StandDir . "/$initial_module";
return $StandDir;
- } elsif ($StandDir eq $previous_dir) {
- $ENV{mk_tmp} = '';
- print_error('Found no project to build');
- };
- };
- $previous_dir = $StandDir;
- $StandDir = File::Basename::dirname(Cwd::realpath($StandDir));
- print_error('Found no project to build') if (!$StandDir);
- }
-# while (chdir '..');
- while (chdir "$StandDir");
+# } elsif ($StandDir eq $previous_dir) {
+# $ENV{mk_tmp} = '';
+# print_error('Found no project to build');
+# };
+# };
+# $previous_dir = $StandDir;
+# $StandDir = File::Basename::dirname(Cwd::realpath($StandDir));
+# print_error('Found no project to build') if (!$StandDir);
+# }
+# while (chdir "$StandDir");
};
#
@@ -1236,7 +1279,7 @@ sub check_deps_hash {
$jobs_hash{$key} = { SHORT_NAME => $string,
BUILD_NUMBER => $build_number,
STATUS => 'waiting',
- LOG_PATH => $module . "/$ENV{INPATH}/misc/logs/$log_name",
+ LOG_PATH => '../' . $source_config->get_module_repository($module) . "/$module/$ENV{INPATH}/misc/logs/$log_name",
LONG_LOG_PATH => CorrectPath($module_paths{$module} . "/$ENV{INPATH}/misc/logs/$log_name"),
START_TIME => 0,
FINISH_TIME => 0,
@@ -1392,7 +1435,7 @@ sub print_error {
sub usage {
print STDERR "\nbuild\n";
- print STDERR "Syntax: build [--all|-a[:prj_name]]|[--from|-f prj_name1[:prj_name2] [prj_name3 [...]]]|[--since|-c prj_name] [--with_branches|-b]|[--prepare|-p][:platform] [--deliver|-d [--dlv_switch deliver_switch]]] [-P processes|--server [--setenvstring \"string\"] [--client_timeout MIN] [--port port1[:port2:...:portN]]] [--show|-s] [--help|-h] [--file|-F] [--ignore|-i] [--version|-V] [--mode|-m OOo[,SO[,EXT]] [--html [--html_path html_file_path] [--dontgraboutput]] [--pre_job=pre_job_sring] [--job=job_string|-j] [--post_job=post_job_sring] [--stoponerror] [--genconf [--removeall|--clear|--remove|--add [module1,module2[,...,moduleN]]]] [--interactive]\n";
+ print STDERR "Syntax: build [--all|-a[:prj_name]]|[--from|-f prj_name1[:prj_name2] [prj_name3 [...]]]|[--since|-c prj_name] [--with_branches prj_name1[:prj_name2] [--skip prj_name1[:prj_name2] [prj_name3 [...]] [prj_name3 [...]|-b]|[--prepare|-p][:platform] [--deliver|-d [--dlv_switch deliver_switch]]] [-P processes|--server [--setenvstring \"string\"] [--client_timeout MIN] [--port port1[:port2:...:portN]]] [--show|-s] [--help|-h] [--file|-F] [--ignore|-i] [--version|-V] [--mode|-m OOo[,SO[,EXT]] [--html [--html_path html_file_path] [--dontgraboutput]] [--pre_job=pre_job_sring] [--job=job_string|-j] [--post_job=post_job_sring] [--stoponerror] [--genconf [--removeall|--clear|--remove|--add [module1,module2[,...,moduleN]]]] [--exclude_branch_from prj_name1[:prj_name2] [prj_name3 [...]]] [--interactive]\n";
print STDERR "Example1: build --from sfx2\n";
print STDERR " - build all projects dependent from sfx2, starting with sfx2, finishing with the current module\n";
print STDERR "Example2: build --all:sfx2\n";
@@ -1405,9 +1448,11 @@ sub usage {
print STDERR "\nSwitches:\n";
print STDERR " --all - build all projects from very beginning till current one\n";
print STDERR " --from - build all projects dependent from the specified (including it) till current one\n";
+ print STDERR " --exclude_branch_from - exclude module(s) and its branch from the build\n";
print STDERR " --mode OOo - build only projects needed for OpenOffice.org\n";
print STDERR " --prepare - clear all projects for incompatible build from prj_name till current one [for platform] (cws version)\n";
- print STDERR " --with_branches- build all projects in neighbour branches and current branch starting from actual project\n";
+ print STDERR " --with_branches- the same as \"--from\" but with build all projects in neighbour branches\n";
+ print STDERR " --skip - do not build certain module(s)\n";
print STDERR " --since - build all projects beginning from the specified till current one (the same as \"--all:prj_name\", but skipping prj_name)\n";
print STDERR " --checkmodules - check if all required parent projects are availlable\n";
print STDERR " --show - show what is going to be built\n";
@@ -1462,19 +1507,25 @@ sub get_options {
$arg =~ /^--dlv_switch$/ and $dlv_switch = shift @ARGV and next;
$arg =~ /^--file$/ and $cmd_file = shift @ARGV and next;
$arg =~ /^-F$/ and $cmd_file = shift @ARGV and next;
+ $arg =~ /^--skip$/ and get_modules_passed(\%skip_modules) and next;
- $arg =~ /^--with_branches$/ and $build_all_parents = 1
- and $build_from_with_branches = shift @ARGV and next;
- $arg =~ /^-b$/ and $build_all_parents = 1
- and $build_from_with_branches = shift @ARGV and next;
-
+ if ($arg =~ /^--with_branches$/ || $arg =~ /^-b$/) {
+ $build_from_with_branches = 1;
+ $build_all_parents = 1;
+ get_modules_passed(\%incompatibles);
+ next;
+ };
$arg =~ /^--all:(\S+)$/ and $build_all_parents = 1
and $build_all_cont = $1 and next;
$arg =~ /^-a:(\S+)$/ and $build_all_parents = 1
and $build_all_cont = $1 and next;
if ($arg =~ /^--from$/ || $arg =~ /^-f$/) {
$build_all_parents = 1;
- get_incomp_projects();
+ get_modules_passed(\%incompatibles);
+ next;
+ };
+ if ($arg =~ /^--exclude_branch_from$/) {
+ get_modules_passed(\%exclude_branches);
next;
};
$arg =~ /^--prepare$/ and $prepare = 1 and next;
@@ -1527,8 +1578,12 @@ sub get_options {
print_error("\"--html_path\" switch is used only with \"--html\"") if ($html_path);
print_error("\"--dontgraboutput\" switch is used only with \"--html\"") if ($dont_grab_output);
};
+ if ((scalar keys %exclude_branches) && !$build_all_parents) {
+ print_error("\"--exclude_branch_from\" is not applicable for one module builds!!");
+ };
$grab_output = 0 if ($dont_grab_output);
print_error('Switches --with_branches and --all collision') if ($build_from_with_branches && $build_all_cont);
+ print_error('Switch --skip is for building multiple modules only!!') if ((scalar keys %skip_modules) && (!$build_all_parents));
# print_error('Please prepare the workspace on one of UNIX platforms') if ($prepare && ($ENV{GUI} ne 'UNX'));
print_error('Switches --with_branches and --since collision') if ($build_from_with_branches && $build_since);
if ($show) {
@@ -1593,7 +1648,6 @@ sub get_options {
sub get_module_and_buildlist_paths {
if ($build_all_parents || $checkparents) {
- my $source_config = SourceConfig -> new($StandDir);
$source_config_file = $source_config->get_config_file_path();
$active_modules{$_}++ foreach ($source_config->get_active_modules());
my %active_modules_copy = %active_modules;
@@ -1652,7 +1706,13 @@ sub cancel_build {
$message_part .= "--from @broken_modules_names\n";
};
} else {
- $message_part .= "--all:@broken_modules_names\n";
+ if ($processes_to_run) {
+ $message_part .= "--from ";
+ } else {
+ $message_part .= "--all:";
+ };
+ $message_part .= "@broken_modules_names\n";
+
};
if ($broken_modules_number && $build_all_parents) {
print "\n";
@@ -2109,12 +2169,12 @@ sub modules_classify {
#
# This procedure provides consistency for cws
-# and optimized build (ie in case of -with_branches, -all:prj_name
+# and optimized build (ie in case of --with_branches, -all:prj_name
# and -since switches)
#
sub provide_consistency {
check_dir();
- foreach $var_ref (\$build_from_with_branches, \$build_all_cont, \$build_since) {
+ foreach $var_ref (\$build_all_cont, \$build_since) {
if ($$var_ref) {
return if (defined $module_paths{$$var_ref});
print_error("Cannot find module '$$var_ref'", 9);
@@ -2257,6 +2317,20 @@ sub fix_permissions {
chmod '0664', $file;
};
+sub prepare_build_from_with_branches {
+ ($full_deps_hash, $reversed_full_deps_hash) = @_;
+ foreach my $prerequisite (keys %$full_deps_hash) {
+ foreach my $dependent_module (keys %incompatibles) {
+ if (defined ${$$reversed_full_deps_hash{$prerequisite}}{$dependent_module}) {
+ remove_from_dependencies($prerequisite, $full_deps_hash);
+ delete $$full_deps_hash{$prerequisite};
+# print "Removed $prerequisite\n";
+ last;
+ };
+ };
+ };
+};
+
#
# Removes projects which it is not necessary to build
# in incompatible build
@@ -2268,7 +2342,6 @@ sub prepare_incompatible_build {
if (!defined $$deps_hash{$module}) {
print_error("The module $initial_module is independent from $module\n");
}
- delete $incompatibles{$module};
$incompatibles{$module} = $$deps_hash{$module};
delete $$deps_hash{$module};
}
@@ -2286,8 +2359,8 @@ sub prepare_incompatible_build {
@modules_built = keys %$deps_hash;
%add_to_config = %$deps_hash;
if ($prepare) {
- if ((!defined $ENV{UPDATER}) || (defined $ENV{CWS_WORK_STAMP})) {
- SourceConfig->new()->add_active_modules([keys %add_to_config], 0);
+ if ((!(defined $ENV{UPDATER} && (!defined $ENV{CWS_WORK_STAMP}))) || (defined $ENV{CWS_WORK_STAMP})) {
+ $source_config->add_active_modules([keys %add_to_config], 0);
}
clear_delivered();
}
@@ -2332,21 +2405,6 @@ sub prepare_incompatible_build {
#
# Removes projects which it is not necessary to build
-# with -with_branches switch
-#
-#sub prepare_build_from {
-# my ($prj, $deps_hash);
-# $deps_hash = shift;
-# my %from_deps_hash = (); # hash of dependencies of the -from project
-# get_parent_deps($build_from_with_branches, \%from_deps_hash);
-# foreach $prj (keys %from_deps_hash) {
-# delete $$deps_hash{$prj};
-# remove_from_dependencies($prj, $deps_hash);
-# };
-#};
-
-#
-# Removes projects which it is not necessary to build
# with --all:prj_name or --since switch
#
sub prepare_build_all_cont {
@@ -2412,7 +2470,8 @@ sub get_list_of_modules {
# };
};
-sub get_incomp_projects {
+sub get_modules_passed {
+ my $hash_ref = shift;
my $option = '';
while ($option = shift @ARGV) {
if ($option =~ /^-+/) {
@@ -2424,7 +2483,7 @@ sub get_incomp_projects {
print_error("\'--from\' switch collision") if ($build_all_cont);
$build_all_cont = $';
};
- $incompatibles{$option}++;
+ $$hash_ref{$option}++;
};
};
};
diff --git a/solenv/bin/jpropex b/solenv/bin/jpropex
deleted file mode 100755
index 2d62d13b093e..000000000000
--- a/solenv/bin/jpropex
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-if [ x${SOLARENV}x = xx ]; then
- echo No environment found, please use 'configure' or 'setsolar'
- exit 1
-fi
-if [ x${JAVA_HOME}x = xx ]; then
- echo No Java found!
- exit 1
-fi
-exec java -DSOLARSRC=${SOLARSRC} -DWORK_STAMP=${WORK_STAMP} -DUSE_SHELL= -jar ${SOLARVER}/${INPATH}/bin${UPDMINOREXT}/jpropex.jar "$@"
diff --git a/solenv/bin/modules/RepositoryHelper.pm b/solenv/bin/modules/RepositoryHelper.pm
new file mode 100644
index 000000000000..7677376be70e
--- /dev/null
+++ b/solenv/bin/modules/RepositoryHelper.pm
@@ -0,0 +1,205 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+#*************************************************************************
+#
+# RepositoryHelper - Perl for working with repositories and underlying SCM
+#
+# usage: see below
+#
+#*************************************************************************
+
+package RepositoryHelper;
+
+use strict;
+
+
+use Carp;
+use Cwd qw (cwd);
+use File::Basename;
+#use File::Temp qw(tmpnam);
+
+my $debug = 0;
+
+##### profiling #####
+
+##### ctor #####
+
+sub new {
+ my $proto = shift;
+ my $class = ref($proto) || $proto;
+ my $initial_directory = shift;
+ if ($initial_directory) {
+ $initial_directory = Cwd::realpath($initial_directory);
+ } else {
+ if ( defined $ENV{PWD} ) {
+ $initial_directory = $ENV{PWD};
+ } elsif (defined $ENV{_cwd}) {
+ $initial_directory = $ENV{_cwd};
+ } else {
+ $initial_directory = cwd();
+ };
+ };
+ my $self = {};
+ $self->{INITIAL_DIRECTORY} = $initial_directory;
+ $self->{REPOSITORY_ROOT} = undef;
+ $self->{REPOSITORY_NAME} = undef;
+ $self->{SCM_NAME} = undef;
+ detect_repository($self);
+ bless($self, $class);
+ return $self;
+}
+
+##### methods #####
+sub get_repository_root
+{
+ my $self = shift;
+ return $self->{REPOSITORY_ROOT};
+}
+
+sub get_initial_directory
+{
+ my $self = shift;
+ return $self->{INITIAL_DIRECTORY};
+}
+
+sub get_scm_name
+{
+ my $self = shift;
+ return$self->{SCM_NAME};
+}
+
+##### private methods #####
+sub search_for_hg {
+ my $self = shift;
+ my $hg_root;
+ my $scm_name = 'hg';
+ if (open(COMMAND, "$scm_name root 2>&1 |")) {
+ foreach (<COMMAND>) {
+ next if (/^Not trusting file/);
+ chomp;
+ $hg_root = $_;
+ last;
+ };
+ close COMMAND;
+ chomp $hg_root;
+ if ($hg_root !~ /There is no Mercurial repository here/) {
+ $self->{REPOSITORY_ROOT} = $hg_root;
+ $self->{SCM_NAME} = $scm_name;
+ return 1;
+ };
+ };
+ return 0;
+};
+
+sub search_via_build_lst {
+ my $self = shift;
+ my @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names
+ my $previous_dir = '';
+ my $rep_root_candidate = $self->{INITIAL_DIRECTORY};
+ do {
+ foreach (@possible_build_lists) {# ('build.lst', 'build.xlist');
+ if (-e $rep_root_candidate . '/prj/'.$_) {
+ $self->{REPOSITORY_ROOT} = File::Basename::dirname($rep_root_candidate);
+ return 1;
+ } elsif ($rep_root_candidate eq $previous_dir) {
+ return 0;
+ };
+ };
+ $previous_dir = $rep_root_candidate;
+ $rep_root_candidate = File::Basename::dirname(Cwd::realpath($rep_root_candidate));
+ return 0 if (!$rep_root_candidate);
+ }
+ while (chdir "$rep_root_candidate");
+};
+
+sub detect_repository {
+ my $self = shift;
+ return if (search_via_build_lst($self));
+ chdir $self->{INITIAL_DIRECTORY};
+ return if (search_for_hg($self));
+ croak('Cannot determine source directory/repository for ' . $self->{INITIAL_DIRECTORY});
+};
+
+##### finish #####
+
+1; # needed by use or require
+
+__END__
+
+=head1 NAME
+
+RepositoryHelper - Perl module for working with repositories and underlying SCM
+
+=head1 SYNOPSIS
+
+ # example that will analyze sources and return the source root directory
+
+ use RepositoryHelper;
+
+ # Create a new instance:
+ $a = RepositoryHelper->new();
+
+ # Get repositories for the actual workspace:
+ $a->get_repository_root();
+
+
+=head1 DESCRIPTION
+
+RepositoryHelper is a perlPerl module for working with repositories and underlying SCM
+in the database.
+
+Methods:
+
+RepositoryHelper::new()
+
+Creates a new instance of RepositoryHelper. Can be initialized by: some path which likely to belong to a repository, default - empty, the current dir will be taken.
+
+RepositoryHelper::get_repository_root()
+
+Returns the repository root, retrieved by SCM methods or on educated guess...
+
+RepositoryHelper::get_initial_directory()
+
+Returns full path to the initialistion directory.
+
+=head2 EXPORT
+
+RepositoryHelper::new()
+RepositoryHelper::get_repository_root()
+RepositoryHelper::get_scm_name()
+RepositoryHelper::get_initial_directory()
+
+=head1 AUTHOR
+
+Vladimir Glazunov, vg@openoffice.org
+
+=head1 SEE ALSO
+
+perl(1).
+
+=cut
diff --git a/solenv/bin/modules/SourceConfig.pm b/solenv/bin/modules/SourceConfig.pm
index 9379b7764d0a..dfaa797d8f48 100644..100755
--- a/solenv/bin/modules/SourceConfig.pm
+++ b/solenv/bin/modules/SourceConfig.pm
@@ -38,10 +38,11 @@ package SourceConfig;
use strict;
use constant SOURCE_CONFIG_FILE_NAME => 'source_config';
-use constant SOURCE_CONFIG_VERSION => 2;
+use constant SOURCE_CONFIG_VERSION => 3;
use Carp;
use Cwd;
+use RepositoryHelper;
use File::Basename;
use File::Temp qw(tmpnam);
@@ -75,8 +76,9 @@ sub new {
$source_root .= '/..';
}
} else {
- $source_root = Cwd::realpath($ENV{SOURCE_ROOT_DIR});
+ $source_root = $ENV{SOURCE_ROOT_DIR};
};
+ $source_root = Cwd::realpath($source_root);
$self->{SOURCE_ROOT} = $source_root;
$self->{DEBUG} = 0;
$self->{VERBOSE} = 0;
@@ -94,14 +96,16 @@ sub new {
$self->{WARNINGS} = [];
$self->{REPORT_MESSAGES} = [];
$self->{CONFIG_FILE_CONTENT} = [];
- $self->{DEFAULT_REPOSITORY} = undef;
if (defined $self->{USER_SOURCE_ROOT}) {
${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT};
- $self->{DEFAULT_REPOSITORY} = File::Basename::basename($self->{USER_SOURCE_ROOT});
};
$self->{SOURCE_CONFIG_FILE} = get_config_file($self->{SOURCE_ROOT}) if (!defined $self->{SOURCE_CONFIG_FILE});
$self->{SOURCE_CONFIG_DEFAULT} = $self->{SOURCE_ROOT} .'/'.SOURCE_CONFIG_FILE_NAME;
+ if (defined $self->{USER_SOURCE_ROOT}) {
+ ${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT};
+ };
read_config_file($self);
+ get_module_paths($self);
bless($self, $class);
return $self;
}
@@ -118,6 +122,19 @@ sub get_repositories
return sort keys %{$self->{REPOSITORIES}};
}
+sub add_repository
+{
+ my $self = shift;
+ my $new_rep_path = shift;
+ $new_rep_path = Cwd::realpath($new_rep_path);
+ my $new_rep_name = File::Basename::basename($new_rep_path);
+ if (defined ${$self->{REPOSITORIES}}{$new_rep_name}) {
+ croak("Repository $new_rep_name is already defined!!");
+ };
+ ${$self->{REPOSITORIES}}{$new_rep_name} = $new_rep_path;
+ $self -> get_repository_module_paths($new_rep_name);
+}
+
sub get_config_file_default_path {
my $self = shift;
return $self->{SOURCE_CONFIG_DEFAULT};
@@ -131,7 +148,6 @@ sub get_config_file_path {
sub get_module_repository {
my $self = shift;
my $module = shift;
- $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}});
if (defined ${$self->{MODULE_REPOSITORY}}{$module}) {
return ${$self->{MODULE_REPOSITORY}}{$module};
} else {
@@ -143,7 +159,6 @@ sub get_module_repository {
sub get_module_path {
my $self = shift;
my $module = shift;
- $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}});
if (defined ${$self->{MODULE_PATHS}}{$module}) {
return ${$self->{MODULE_PATHS}}{$module};
} else {
@@ -155,10 +170,17 @@ sub get_module_path {
sub get_module_build_list {
my $self = shift;
my $module = shift;
- $self -> get_buildlist_paths() if (!scalar keys %{$self->{MODULE_BUILD_LIST_PATHS}});
if (defined ${$self->{MODULE_BUILD_LIST_PATHS}}{$module}) {
return ${$self->{MODULE_BUILD_LIST_PATHS}}{$module};
} else {
+ my @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names
+ foreach (@possible_build_lists) {
+ my $possible_path = ${$self->{MODULE_PATHS}}{$module} . "/prj/$_";
+ if (-e $possible_path) {
+ ${$self->{MODULE_BUILD_LIST_PATHS}}{$module} = $possible_path;
+ return $possible_path;
+ };
+ };
Carp::cluck("No build list in module $module found!!\n") if ($self->{DEBUG});
return undef;
};
@@ -168,7 +190,6 @@ sub get_all_modules
{
my $self = shift;
my $module = shift;
- $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}});
return sort keys %{$self->{MODULE_PATHS}};
};
@@ -178,7 +199,6 @@ sub get_active_modules
if (scalar keys %{$self->{ACTIVATED_MODULES}}) {
return sort keys %{$self->{ACTIVATED_MODULES}};
}
- $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}});
return sort keys %{$self->{REAL_MODULES}};
}
@@ -189,49 +209,42 @@ sub is_active
if (scalar keys %{$self->{ACTIVATED_MODULES}}) {
return exists ($self->{ACTIVATED_MODULES}{$module});
}
- $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}});
return exists ($self->{REAL_MODULES}{$module});
}
##### private methods #####
-sub get_buildlist_paths {
+sub get_repository_module_paths {
my $self = shift;
- $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}});
- my @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names
- foreach my $module (keys %{$self->{MODULE_PATHS}}) {
- foreach (@possible_build_lists) {
- my $possible_path = ${$self->{MODULE_PATHS}}{$module} . "/prj/$_";
- ${$self->{MODULE_BUILD_LIST_PATHS}}{$module} = $possible_path if (-e $possible_path);
+ my $repository = shift;
+ my $repository_path = ${$self->{REPOSITORIES}}{$repository};
+ if (opendir DIRHANDLE, $repository_path) {
+ foreach my $module (readdir(DIRHANDLE)) {
+ next if (($module =~ /^\.+/) || (!-d "$repository_path/$module"));
+ my $module_entry = $module;
+ if (($module !~ s/\.lnk$//) && ($module !~ s/\.link$//)) {
+ $self->{REAL_MODULES}{$module}++;
+ }
+ my $possible_path = "$repository_path/$module_entry";
+ if (-d $possible_path) {
+ if (defined ${$self->{MODULE_PATHS}}{$module}) {
+ close DIRHANDLE;
+ croak("Ambiguous paths for module $module: $possible_path and " . ${$self->{MODULE_PATHS}}{$module});
+ };
+ ${$self->{MODULE_PATHS}}{$module} = $possible_path;
+ ${$self->{MODULE_REPOSITORY}}{$module} = $repository;
+ }
};
+ close DIRHANDLE;
+ } else {
+ croak("Cannot read $repository_path repository content");
};
};
sub get_module_paths {
my $self = shift;
foreach my $repository (keys %{$self->{REPOSITORIES}}) {
- my $repository_path = ${$self->{REPOSITORIES}}{$repository};
- if (opendir DIRHANDLE, $repository_path) {
- foreach my $module (readdir(DIRHANDLE)) {
- next if (($module =~ /^\.+/) || (!-d "$repository_path/$module"));
- my $module_entry = $module;
- if (($module !~ s/\.lnk$//) && ($module !~ s/\.link$//)) {
- $self->{REAL_MODULES}{$module}++;
- }
- my $possible_path = "$repository_path/$module_entry";
- if (-d $possible_path) {
- if (defined ${$self->{MODULE_PATHS}}{$module}) {
- close DIRHANDLE;
- croak("Ambiguous paths for module $module: $possible_path and " . ${$self->{MODULE_PATHS}}{$module});
- };
- ${$self->{MODULE_PATHS}}{$module} = $possible_path;
- ${$self->{MODULE_REPOSITORY}}{$module} = $repository;
- }
- };
- close DIRHANDLE;
- } else {
- croak("Cannot read $_ repository content");
- };
+ get_repository_module_paths($self, $repository);
};
my @false_actives = ();
foreach (keys %{$self->{ACTIVATED_MODULES}}) {
@@ -248,31 +261,21 @@ sub get_config_file {
return '';
};
-sub get_hg_root {
+#
+# Fallback - fallback repository is based on RepositoryHelper educated guess
+#
+sub get_fallback_repository {
my $self = shift;
- return $self->{USER_SOURCE_ROOT} if (defined $self->{USER_SOURCE_ROOT});
- my $hg_root;
- if (open(COMMAND, "hg root 2>&1 |")) {
- foreach (<COMMAND>) {
- next if (/^Not trusting file/);
- chomp;
- $hg_root = $_;
- last;
- };
- close COMMAND;
- chomp $hg_root;
- if ($hg_root !~ /There is no Mercurial repository here/) {
- return $hg_root;
- };
- };
- croak('Cannot open find source_config and/or determine hg root directory for ' . cwd());
+ my $repository_root = RepositoryHelper->new()->get_repository_root();
+ ${$self->{REPOSITORIES}}{File::Basename::basename($repository_root)} = $repository_root;
};
sub read_config_file {
my $self = shift;
if (!$self->{SOURCE_CONFIG_FILE}) {
- my $repository_root = get_hg_root($self);
- ${$self->{REPOSITORIES}}{File::Basename::basename($repository_root)} = $repository_root;
+ if (!defined $self->{USER_SOURCE_ROOT}) {
+ get_fallback_repository($self);
+ };
return;
};
my $repository_section = 0;
@@ -304,11 +307,9 @@ sub read_config_file {
my $repository_source_path = $self->{SOURCE_ROOT} . "/$1";
if (defined $ENV{UPDMINOREXT}) {
$repository_source_path .= $ENV{UPDMINOREXT};
- };
- if ((defined $self->{DEFAULT_REPOSITORY}) && (${$self->{REPOSITORIES}}{$self->{DEFAULT_REPOSITORY}} eq $repository_source_path)) {
- delete ${$self->{REPOSITORIES}}{$self->{DEFAULT_REPOSITORY}};
- $self->{DEFAULT_REPOSITORY} = undef;
-
+ if (defined ${$self->{REPOSITORIES}}{$1.$ENV{UPDMINOREXT}}) {
+ delete ${$self->{REPOSITORIES}}{$1.$ENV{UPDMINOREXT}};
+ };
};
${$self->{REPOSITORIES}}{$1} = $repository_source_path;
${$self->{ACTIVATED_REPOSITORIES}}{$1}++;
@@ -323,9 +324,7 @@ sub read_config_file {
};
close SOURCE_CONFIG_FILE;
if (!scalar keys %{$self->{REPOSITORIES}}) {
- # Fallback - default repository is the directory where is our module...
- my $hg_root = get_hg_root($self);
- ${$self->{REPOSITORIES}}{File::Basename::basename($hg_root)} = $hg_root;
+ get_fallback_repository($self);
};
} else {
croak('Cannot open ' . $self->{SOURCE_CONFIG_FILE} . 'for reading');
@@ -379,15 +378,18 @@ sub remove_activated_modules {
sub add_active_repositories {
my $self = shift;
$self->{NEW_REPOSITORIES} = shift;
- croak('Empty module list passed for adding to source_config') if (!scalar @{$self->{NEW_REPOSITORIES}});
+ croak('Empty repository list passed for addition to source_config') if (!scalar @{$self->{NEW_REPOSITORIES}});
$self->{VERBOSE} = shift;
+ foreach (@{$self->{NEW_REPOSITORIES}}) {
+ $self->add_repository($_);
+ };
generate_config_file($self);
};
sub add_active_modules {
my $self = shift;
$self->{NEW_MODULES} = shift;
- croak('Empty module list passed for adding to source_config') if (!scalar @{$self->{NEW_MODULES}});
+ croak('Empty module list passed for addition to source_config') if (!scalar @{$self->{NEW_MODULES}});
$self->{VERBOSE} = shift;
generate_config_file($self);
};
@@ -535,6 +537,8 @@ SourceConfig - Perl extension for parsing general info databases
# Get repositories for the actual workspace:
$a->get_repositories();
+ # Add a repository new_repository for the actual workspace (via full path):
+ $a->add_repository(/DEV300/new_repository);
=head1 DESCRIPTION
@@ -559,6 +563,11 @@ SourceConfig::get_repositories()
Returns sorted list of active repositories for the actual workspace
+SourceConfig::add_repository(REPOSITORY_PATH)
+
+Adds a repository to the list of active repositories
+
+
SourceConfig::get_active_modules()
Returns a sorted list of active modules
@@ -622,6 +631,7 @@ Removes all activated repositories from the source_config file
SourceConfig::new()
SourceConfig::get_version()
SourceConfig::get_repositories()
+SourceConfig::add_repository()
SourceConfig::get_active_modules()
SourceConfig::get_all_modules()
SourceConfig::get_module_path($module)
diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm
index f8e35f208251..8b828b85335f 100644
--- a/solenv/bin/modules/installer/epmfile.pm
+++ b/solenv/bin/modules/installer/epmfile.pm
@@ -762,33 +762,13 @@ sub replace_many_variables_in_shellscripts
foreach $key (keys %{$variableshashref})
{
my $value = $variableshashref->{$key};
- if ( ! $value =~ /.oxt/ ) { $value = lc($value); } # lowercase !
- if ( $installer::globals::issolarisbuild) { $value =~ s/\.org/org/g; } # openofficeorg instead of openoffice.org
+ # $value = lc($value); # lowercase !
+ # if ( $installer::globals::issolarisbuild) { $value =~ s/\.org/org/g; } # openofficeorg instead of openoffice.org
replace_variable_in_shellscripts($scriptref, $value, $key);
}
}
#######################################
-# Setting oxt file name variable
-#######################################
-
-sub set_oxt_filename
-{
- my ($filesinpackage, $allvariables) = @_;
-
- for ( my $i = 0; $i <= $#{$filesinpackage}; $i++ )
- {
- my $onefile = ${$filesinpackage}[$i];
- if ( $onefile->{'Name'} =~ /.oxt\s*$/ )
- {
- $allvariables->{'OXTFILENAME'} = $onefile->{'Name'};
- # $allvariables->{'FULLOXTFILENAME'} = $onefile->{'destination'};
- last; # only one oxt file for each rpm!
- }
- }
-}
-
-#######################################
# Adding shell scripts to epm file
#######################################
@@ -796,9 +776,6 @@ sub adding_shellscripts_to_epm_file
{
my ($epmfileref, $shellscriptsfilename, $localrootpath, $allvariableshashref, $filesinpackage) = @_;
- # Setting variable for ${OXTFILENAME} into $allvariableshashref, if this is a RPM with an extension
- set_oxt_filename($filesinpackage, $allvariableshashref);
-
# $installer::globals::shellscriptsfilename
push( @{$epmfileref}, "\n\n" );
@@ -1803,26 +1780,27 @@ sub is_extension_package
# share/extension/install
######################################################################
-sub get_extension_name
+sub contains_extension_dir
{
my ($prototypefile) = @_;
- my $extensionName = "";
+ my $contains_extension_dir = 0;
+
+ # d none opt/openoffice.org3/share/extensions/
for ( my $i = 0; $i <= $#{$prototypefile}; $i++ )
{
my $line = ${$prototypefile}[$i];
- if ( $line =~ /^\s*f\s+none\s+share\/extension\/install\/(\w+?\.oxt)\s*\=/ )
+ if ( $line =~ /^\s*d\s+none\s.*\/share\/extensions\// )
{
- $extensionName = $1;
+ $contains_extension_dir = 1;
last;
}
}
- return $extensionName;
+ return $contains_extension_dir;
}
-
############################################################
# A Solaris patch contains 7 specific scripts
############################################################
@@ -1839,9 +1817,9 @@ sub add_scripts_into_prototypefile
$path = $path . $installer::globals::separator;
my @newlines = ();
- my $extensionname = get_extension_name($prototypefile);
+ my $is_extension_package = contains_extension_dir($prototypefile);
- if ( $extensionname ne "" )
+ if ( $is_extension_package )
{
for ( my $i = 0; $i <= $#installer::globals::solarispatchscriptsforextensions; $i++ )
{
@@ -1865,9 +1843,7 @@ sub add_scripts_into_prototypefile
my $scriptfile = installer::files::read_file($sourcefilename);
# Replacing variables
- my $oldstring = "\$\{OXTFILENAME\}";
- replace_variables_in_shellscripts_for_patch($scriptfile, $destpath, $oldstring, $extensionname);
- $oldstring = "PRODUCTDIRECTORYNAME";
+ my $oldstring = "PRODUCTDIRECTORYNAME";
replace_variables_in_shellscripts_for_patch($scriptfile, $destpath, $oldstring, $staticpath);
# Saving file
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index ccef960e0337..582bd8c708b1 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -184,7 +184,7 @@ BEGIN
$installertypedir = "";
$controlledmakecabversion = "5";
$saved_packages_path = "";
- $max_lang_length = 65;
+ $max_lang_length = 50;
$globalblock = "Globals";
$rootmodulegid = "";
%alllangmodules = ();
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index fdf9fc6fa4c3..518edc683c3d 100644
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -71,9 +71,10 @@ sub get_extensions_dir
my $extensiondir = $subfolderdir . $installer::globals::separator;
if ( $installer::globals::officedirhostname ne "" ) { $extensiondir = $extensiondir . $installer::globals::officedirhostname . $installer::globals::separator; }
- $extensiondir = $extensiondir . "share" . $installer::globals::separator . "extensions";
+ my $extensionsdir = $extensiondir . "share" . $installer::globals::separator . "extensions";
+ my $preregdir = $extensiondir . "share" . $installer::globals::separator . "prereg" . $installer::globals::separator . "bundled";
- return $extensiondir;
+ return ( $extensionsdir, $preregdir );
}
####################################################
@@ -82,21 +83,24 @@ sub get_extensions_dir
sub register_extensions
{
- my ($officedir, $languagestringref) = @_;
+ my ($officedir, $languagestringref, $preregdir) = @_;
+
+ my $infoline = "";
+
+ if ( $preregdir eq "" )
+ {
+ $infoline = "ERROR: Failed to determine directory \"prereg\" for extension registration! Please check your installation set.\n";
+ push( @installer::globals::logfileinfo, $infoline);
+ installer::exiter::exit_program($infoline, "register_extensions");
+ }
my $programdir = $officedir . $installer::globals::separator;
- # if ( $installer::globals::sundirhostname ne "" ) { $programdir = $programdir . $installer::globals::sundirhostname . $installer::globals::separator; }
if ( $installer::globals::officedirhostname ne "" ) { $programdir = $programdir . $installer::globals::officedirhostname . $installer::globals::separator; }
$programdir = $programdir . "program";
my $from = cwd();
chdir($programdir);
- my $infoline = "";
-
- # my $unopkgfile = $officedir . $installer::globals::separator . "program" .
- # $installer::globals::separator . $installer::globals::unopkgfile;
-
my $unopkgfile = $installer::globals::unopkgfile;
my $unopkgexists = 1;
@@ -107,87 +111,73 @@ sub register_extensions
push( @installer::globals::logfileinfo, $infoline);
}
- # my $extensiondir = $officedir . $installer::globals::separator . "share" .
- # $installer::globals::separator . "extension" .
- # $installer::globals::separator . "install";
-
- my $extensiondir = ".." . $installer::globals::separator . "share" . $installer::globals::separator . "extension" . $installer::globals::separator . "install";
-
- my $allextensions = installer::systemactions::find_file_with_file_extension("oxt", $extensiondir);
+ if ( ! -f $unopkgfile )
+ {
+ $unopkgexists = 0;
+ $infoline = "Info: File $unopkgfile does not exist! Extensions cannot be registered.\n";
+ push( @installer::globals::logfileinfo, $infoline);
+ }
- if (( $#{$allextensions} > -1 ) && ( $unopkgexists ))
+ if ( $unopkgexists )
{
my $currentdir = cwd();
print "... current dir: $currentdir ...\n";
$infoline = "Current dir: $currentdir\n";
push( @installer::globals::logfileinfo, $infoline);
- for ( my $i = 0; $i <= $#{$allextensions}; $i++ )
- {
- my $oneextension = $extensiondir . $installer::globals::separator . ${$allextensions}[$i];
-
- # my $systemcall = $unopkgfile . " add --shared --suppress-license " . "\"" . $oneextension . "\"";
+ if ( ! -f $unopkgfile ) { installer::exiter::exit_program("ERROR: $unopkgfile not found!", "register_extensions"); }
- if ( ! -f $unopkgfile ) { installer::exiter::exit_program("ERROR: $unopkgfile not found!", "register_extensions"); }
- if ( ! -f $oneextension ) { installer::exiter::exit_program("ERROR: $oneextension not found!", "register_extensions"); }
+ my $localtemppath = installer::systemactions::create_directories("uno", $languagestringref);
- my $localtemppath = installer::systemactions::create_directories("uno", $languagestringref);
+ my $slash = "";
- if ( $installer::globals::iswindowsbuild )
+ if ( $installer::globals::iswindowsbuild )
+ {
+ if ( $^O =~ /cygwin/i )
{
- if ( $^O =~ /cygwin/i )
- {
- $localtemppath = $installer::globals::cyg_temppath;
- }
- else
- {
- $windowsslash = "\/";
- }
- $localtemppath =~ s/\\/\//g;
- $localtemppath = "/".$localtemppath;
+ $localtemppath = $installer::globals::cyg_temppath;
+ $preregdir = qx{cygpath -m "$preregdir"};
+ chomp($preregdir);
}
- my $systemcall = $unopkgfile . " add --shared --suppress-license --verbose " . $oneextension . " -env:UserInstallation=file://" . $localtemppath . " 2\>\&1 |";
+ $localtemppath =~ s/\\/\//g;
+ $slash = "/"; # Third slash for Windows. Other OS pathes already start with "/"
+ }
- print "... $systemcall ...\n";
+ $preregdir =~ s/\/\s*$//g;
- $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ my $systemcall = $unopkgfile . " sync --verbose -env:BUNDLED_EXTENSIONS_USER=\"file://" . $slash . $preregdir . "\"" . " -env:UserInstallation=file://" . $slash . $localtemppath . " 2\>\&1 |";
- my @unopkgoutput = ();
+ print "... $systemcall ...\n";
- open (UNOPKG, $systemcall);
- while (<UNOPKG>)
- {
- my $lastline = $_;
- push(@unopkgoutput, $lastline);
- }
- close (UNOPKG);
+ $infoline = "Systemcall: $systemcall\n";
+ push( @installer::globals::logfileinfo, $infoline);
- my $returnvalue = $?; # $? contains the return value of the systemcall
+ my @unopkgoutput = ();
- if ($returnvalue)
- {
- # Writing content of @unopkgoutput only in the error case into the log file. Sometimes it
- # contains strings like "Error" even in the case of success. This causes a packaging error
- # when the log file is analyzed at the end, even if there is no real error.
- for ( my $j = 0; $j <= $#unopkgoutput; $j++ ) { push( @installer::globals::logfileinfo, "$unopkgoutput[$j]"); }
+ open (UNOPKG, $systemcall);
+ while (<UNOPKG>)
+ {
+ my $lastline = $_;
+ push(@unopkgoutput, $lastline);
+ }
+ close (UNOPKG);
- $infoline = "ERROR: Could not execute \"$systemcall\"!\nExitcode: '$returnvalue'\n";
- push( @installer::globals::logfileinfo, $infoline);
- installer::exiter::exit_program("ERROR: $systemcall failed!", "register_extensions");
- }
- else
- {
- $infoline = "Success: Executed \"$systemcall\" successfully!\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
+ my $returnvalue = $?; # $? contains the return value of the systemcall
+
+ if ($returnvalue)
+ {
+ # Writing content of @unopkgoutput only in the error case into the log file. Sometimes it
+ # contains strings like "Error" even in the case of success. This causes a packaging error
+ # when the log file is analyzed at the end, even if there is no real error.
+ for ( my $j = 0; $j <= $#unopkgoutput; $j++ ) { push( @installer::globals::logfileinfo, "$unopkgoutput[$j]"); }
+
+ $infoline = "ERROR: Could not execute \"$systemcall\"!\nExitcode: '$returnvalue'\n";
+ push( @installer::globals::logfileinfo, $infoline);
+ installer::exiter::exit_program("ERROR: $systemcall failed!", "register_extensions");
}
- }
- else
- {
- if ( ! ( $#{$allextensions} > -1 ))
+ else
{
- $infoline = "No extensions located in directory $extensiondir.\n";
+ $infoline = "Success: Executed \"$systemcall\" successfully!\n";
push( @installer::globals::logfileinfo, $infoline);
}
}
@@ -662,6 +652,7 @@ sub create_simple_package
if ( $onedir->{'HostName'} )
{
my $destdir = $subfolderdir . $installer::globals::separator . $onedir->{'HostName'};
+
if ( ! -d $destdir )
{
if ( $^O =~ /cygwin/i ) # Cygwin performance check
@@ -787,19 +778,18 @@ sub create_simple_package
system($localcall);
}
- # Registering the extensions
-
- # installer::logger::print_message( "... registering extensions ...\n" );
- # installer::logger::include_header_into_logfile("Registering extensions:");
- # register_extensions($subfolderdir, $languagestringref);
-
installer::logger::print_message( "... removing superfluous directories ...\n" );
installer::logger::include_header_into_logfile("Removing superfluous directories:");
- my $extensionfolder = get_extensions_dir($subfolderdir);
-
+ my ( $extensionfolder, $preregdir ) = get_extensions_dir($subfolderdir);
installer::systemactions::remove_empty_dirs_in_folder($extensionfolder);
+ # Registering the extensions
+
+ installer::logger::print_message( "... registering extensions ...\n" );
+ installer::logger::include_header_into_logfile("Registering extensions:");
+ register_extensions($subfolderdir, $languagestringref, $preregdir);
+
if ( $installer::globals::compiler =~ /^unxmacx/ )
{
installer::worker::put_scpactions_into_installset("$installdir/$packagename");
diff --git a/solenv/bin/modules/installer/windows/property.pm b/solenv/bin/modules/installer/windows/property.pm
index e9f122a54d86..35866103d9fa 100644
--- a/solenv/bin/modules/installer/windows/property.pm
+++ b/solenv/bin/modules/installer/windows/property.pm
@@ -316,6 +316,11 @@ sub set_important_properties
{
my $onepropertyline = "OFFICEDIRHOSTNAME" . "\t" . $installer::globals::officedirhostname . "\n";
push(@{$propertyfile}, $onepropertyline);
+
+ my $localofficedirhostname = $installer::globals::officedirhostname;
+ $localofficedirhostname =~ s/\//\\/g;
+ $onepropertyline = "OFFICEDIRHOSTNAME_" . "\t" . $localofficedirhostname . "\n";
+ push(@{$propertyfile}, $onepropertyline);
}
if ( $installer::globals::sundirhostname )
diff --git a/solenv/bin/modules/installer/ziplist.pm b/solenv/bin/modules/installer/ziplist.pm
index ddc98c43bdb7..9a5460cacb3c 100644
--- a/solenv/bin/modules/installer/ziplist.pm
+++ b/solenv/bin/modules/installer/ziplist.pm
@@ -806,6 +806,7 @@ sub add_variables_to_allvariableshashref
$variableshashref->{'PRODUCTMINOR'} = $localminor;
$variableshashref->{'PRODUCTBUILDID'} = $installer::globals::buildid;
+ $variableshashref->{'SYSTEM_LIBTEXTCAT_DATA'} = $ENV{'SYSTEM_LIBTEXTCAT_DATA'} , if( defined $ENV{'SYSTEM_LIBTEXTCAT_DATA'} && $ENV{'SYSTEM_LIBTEXTCAT_DATA'} ne "" );
}
1;
diff --git a/solenv/bin/subsequenttests b/solenv/bin/subsequenttests
index 34e6b8034c70..3caa84293f3e 100755
--- a/solenv/bin/subsequenttests
+++ b/solenv/bin/subsequenttests
@@ -47,7 +47,7 @@ while (@ARGV) {
}
my @testpaths = ();
-my $sc = SourceConfig->new();
+my $sc = SourceConfig->new($ENV{'SOLARSRC'});
my $module;
foreach $module ($sc->get_active_modules()) {
my $buildlst = $sc->get_module_build_list($module);
diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini
index b8a075737b22..67f074f610ce 100644
--- a/solenv/config/sdev300.ini
+++ b/solenv/config/sdev300.ini
@@ -9,7 +9,7 @@ common
BMP_WRITES_FLAG TRUE
BUILD_SPECIAL TRUE
BUILD_STAX YES
- BUILD_TYPE SO OOo EXT BINFILTER MORE_FONTS BSH CURL DICTIONARIES HSQLDB HUNSPELL HYPHEN MYTHES JPEG LIBXML2 LIBXMLSEC LPSOLVE MOZ NEON TWAIN PYTHON ZLIB SANE UNIXODBC X11_EXTENSIONS LIBWPD EPM ODK MSFONTEXTRACT MATHMLDTD BOOST MDDS EXPAT CRASHREP BERKELEYDB LIBXSLT SUN AGG GTK ICU SYSTRAY_GTK JAVAINSTALLER2 VIGRA OPENSSL JFREEREPORT APACHE_COMMONS TOMCAT REPORTBUILDER SDEXT SWEXT XPDF LUCENE REDLAND SAXON WRITER2LATEX NSS L10N GRAPHITE MYSQLCPPCONN MYSQLC CPPUNIT
+ BUILD_TYPE SO OOo EXT BINFILTER MORE_FONTS BSH CURL DICTIONARIES HSQLDB HUNSPELL HYPHEN MYTHES JPEG LIBXML2 LIBXMLSEC LPSOLVE MOZ NEON TWAIN PYTHON ZLIB SANE UNIXODBC X11_EXTENSIONS LIBWPD EPM ODK MSFONTEXTRACT MATHMLDTD BOOST MDDS EXPAT CRASHREP BERKELEYDB LIBXSLT SUN AGG GTK ICU SYSTRAY_GTK JAVAINSTALLER2 VIGRA OPENSSL JFREEREPORT APACHE_COMMONS TOMCAT REPORTBUILDER SDEXT SWEXT XPDF LUCENE REDLAND SAXON WRITER2LATEX NSS L10N GRAPHITE MYSQLCPPCONN MYSQLC CPPUNIT LIBTEXTCAT LIBTEXTCATDATA AFMS
common_build TRUE
COMMON_OUTDIR common
CONFIG_PROJECT config_office
diff --git a/solenv/inc/_tg_srs.mk b/solenv/inc/_tg_srs.mk
index 063f98f2f322..a71216f0a7e9 100644
--- a/solenv/inc/_tg_srs.mk
+++ b/solenv/inc/_tg_srs.mk
@@ -28,7 +28,7 @@ $(foreach,i,$(SRC1FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF)
$(COMMAND_ECHO)-$(MKDIR) $(@:d)
$(COMMAND_ECHO)-$(RM) $@
$(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME)
- $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
+ $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
$(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@
$(COMMAND_ECHO)-$(RM) $@.$(INPATH)
@@ -81,7 +81,7 @@ $(foreach,i,$(SRC2FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF)
$(COMMAND_ECHO)-$(MKDIR) $(@:d)
$(COMMAND_ECHO)-$(RM) $@
$(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME)
- $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
+ $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
$(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@
$(COMMAND_ECHO)-$(RM) $@.$(INPATH)
@@ -134,7 +134,7 @@ $(foreach,i,$(SRC3FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF)
$(COMMAND_ECHO)-$(MKDIR) $(@:d)
$(COMMAND_ECHO)-$(RM) $@
$(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME)
- $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
+ $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
$(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@
$(COMMAND_ECHO)-$(RM) $@.$(INPATH)
@@ -187,7 +187,7 @@ $(foreach,i,$(SRC4FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF)
$(COMMAND_ECHO)-$(MKDIR) $(@:d)
$(COMMAND_ECHO)-$(RM) $@
$(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME)
- $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
+ $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
$(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@
$(COMMAND_ECHO)-$(RM) $@.$(INPATH)
@@ -240,7 +240,7 @@ $(foreach,i,$(SRC5FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF)
$(COMMAND_ECHO)-$(MKDIR) $(@:d)
$(COMMAND_ECHO)-$(RM) $@
$(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME)
- $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
+ $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
$(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@
$(COMMAND_ECHO)-$(RM) $@.$(INPATH)
@@ -293,7 +293,7 @@ $(foreach,i,$(SRC6FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF)
$(COMMAND_ECHO)-$(MKDIR) $(@:d)
$(COMMAND_ECHO)-$(RM) $@
$(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME)
- $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
+ $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
$(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@
$(COMMAND_ECHO)-$(RM) $@.$(INPATH)
@@ -346,7 +346,7 @@ $(foreach,i,$(SRC7FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF)
$(COMMAND_ECHO)-$(MKDIR) $(@:d)
$(COMMAND_ECHO)-$(RM) $@
$(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME)
- $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
+ $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
$(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@
$(COMMAND_ECHO)-$(RM) $@.$(INPATH)
@@ -399,7 +399,7 @@ $(foreach,i,$(SRC8FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF)
$(COMMAND_ECHO)-$(MKDIR) $(@:d)
$(COMMAND_ECHO)-$(RM) $@
$(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME)
- $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
+ $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
$(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@
$(COMMAND_ECHO)-$(RM) $@.$(INPATH)
@@ -452,7 +452,7 @@ $(foreach,i,$(SRC9FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF)
$(COMMAND_ECHO)-$(MKDIR) $(@:d)
$(COMMAND_ECHO)-$(RM) $@
$(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME)
- $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
+ $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
$(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@
$(COMMAND_ECHO)-$(RM) $@.$(INPATH)
@@ -505,7 +505,7 @@ $(foreach,i,$(SRC10FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF)
$(COMMAND_ECHO)-$(MKDIR) $(@:d)
$(COMMAND_ECHO)-$(RM) $@
$(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME)
- $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
+ $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
$(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@
$(COMMAND_ECHO)-$(RM) $@.$(INPATH)
diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk
index 0c06cef68b75..dccfa1008d68 100644
--- a/solenv/inc/minor.mk
+++ b/solenv/inc/minor.mk
@@ -1,5 +1,5 @@
RSCVERSION=300
-RSCREVISION=300m86(Build:9518)
-BUILD=9518
-LAST_MINOR=m86
+RSCREVISION=300m87(Build:9522)
+BUILD=9522
+LAST_MINOR=m87
SOURCEVERSION=DEV300
diff --git a/solenv/inc/rules.mk b/solenv/inc/rules.mk
index 63c4d0cef28c..7ad8fd19f33f 100644
--- a/solenv/inc/rules.mk
+++ b/solenv/inc/rules.mk
@@ -722,7 +722,7 @@ $(COMMONMISC)/$(TARGET)/%.ulf : %.ulf
@echo "Making: " $(@:f)
$(COMMAND_ECHO)-$(MKDIR) $(@:d)
$(COMMAND_ECHO)-$(RM) $@
- $(COMMAND_ECHO)$(ULFEX) $(ULFEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
+ $(COMMAND_ECHO)$(ULFEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
$(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@
$(COMMAND_ECHO)-$(RM) $@.$(INPATH)
diff --git a/solenv/inc/set_wntx64.mk b/solenv/inc/set_wntx64.mk
index bf2ca9314f33..412fb3bd2821 100755..100644
--- a/solenv/inc/set_wntx64.mk
+++ b/solenv/inc/set_wntx64.mk
@@ -42,6 +42,10 @@ LIBMGR_X64=$(WRAPCMD) $(LIBMGR_X64_BINARY) $(NOLOGO)
IMPLIB_X64=$(WRAPCMD) $(LIBMGR_X64_BINARY)
USE_CFLAGS_X64=-c -nologo -Gs $(NOLOGO) -Zm500 -Zc:forScope,wchar_t- -GR
+
+# Stack buffer overrun detection.
+CFLAGS+=-GS
+
USE_CDEFS_X64+= -DWIN32 -D_AMD64_=1 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NON_CONFORMING_SWPRINTFS
.IF "$(debug)"!=""
USE_CFLAGS_X64+=-Zi -Fd$(MISC_X64)/$(@:b).pdb
@@ -78,6 +82,15 @@ CDEFSOBJMT_X64+=-D_MT
LINKFLAGS_X64=/MAP /OPT:NOREF
.ENDIF
+# excetion handling protection
+LINKFLAGS+=-safeseh
+
+# enable DEP
+LINKFLAGS+=-nxcompat
+
+# enable ASLR
+LINKFLAGS+=-dynamicbase
+
.IF "$(PRODUCT)"!="full"
LINKFLAGS_X64+= -NODEFAULTLIB -DEBUG
.ELSE # "$(PRODUCT)"!="full"
diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk
index 76407f9f0384..68bbc797d8af 100644
--- a/solenv/inc/settings.mk
+++ b/solenv/inc/settings.mk
@@ -967,9 +967,6 @@ RSC=$(AUGMENT_LIBRARY_PATH) $(FLIPCMD) $(SOLARBINDIR)/rsc
.IF "$(VERBOSE)" == "FALSE"
VERBOSITY=-quiet
ZIP_VERBOSITY=-q
- TRANSEX_VERBOSITY=-QQ
- CFGEX_VERBOSITY=-QQ
- ULFEX_VERBOSITY=-QQ
.ENDIF
.ENDIF # "$(VERBOSE)" == "TRUE"
COMPILE_ECHO_SWITCH=
diff --git a/solenv/inc/target.mk b/solenv/inc/target.mk
index 1a4ad6e182a0..0fe06145879d 100644
--- a/solenv/inc/target.mk
+++ b/solenv/inc/target.mk
@@ -1518,7 +1518,7 @@ $(LOCALIZE_ME_DEST) .PHONY : $(LOCALIZE_ME) $(LOCALIZESDF)
.ENDIF # "$(LASTRUN_MERGED)"=="TRUE"
$(COMMAND_ECHO)-$(MKDIR) $(@:d)
$(COMMAND_ECHO)-$(RM) $@
- $(COMMAND_ECHO)$(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:b:+"_tmpl")$(@:e) -o $(@:d)/$(@:b:+"_tmpl")$(@:e).$(INPATH) -m $(LOCALIZESDF) -l all
+ $(COMMAND_ECHO)$(TRANSEX) -p $(PRJNAME) -i $(@:b:+"_tmpl")$(@:e) -o $(@:d)/$(@:b:+"_tmpl")$(@:e).$(INPATH) -m $(LOCALIZESDF) -l all
$(COMMAND_ECHO)$(RENAME) $(@:d)$(@:b:+"_tmpl")$(@:e).$(INPATH) $@
.ENDIF # "$(WITH_LANG)"==""
@@ -2043,6 +2043,7 @@ $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(BIN))/hid.lst .PHONY :
.INCLUDE : tg_merge.mk
.INCLUDE : tg_propmerge.mk
+.INCLUDE : tg_xmerge.mk
wordcount:
wc *.* >> $(TMP)/wc.lst
diff --git a/solenv/inc/tg_config.mk b/solenv/inc/tg_config.mk
index bbc720ed600e..cfe2fe147ebe 100644
--- a/solenv/inc/tg_config.mk
+++ b/solenv/inc/tg_config.mk
@@ -137,7 +137,7 @@ $(XCU_LANG) : $(LOCALIZESDF)
$(PROCESSOUT)/merge/$(PACKAGEDIR)/%.xcu : %.xcu
@-$(MKDIRHIER) $(@:d)
- $(COMMAND_ECHO)$(CFGEX) $(CFGEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $@ -m $(LOCALIZESDF) -l all
+ $(COMMAND_ECHO)$(CFGEX) -p $(PRJNAME) -i $(@:f) -o $@ -m $(LOCALIZESDF) -l all
.IF "$(XCU_LANG)" != ""
$(XCU_LANG) : $(XSLDIR)/alllang.xsl
diff --git a/solenv/inc/tg_help.mk b/solenv/inc/tg_help.mk
index aa62b1cf477f..89f1ebabec6c 100644..100755
--- a/solenv/inc/tg_help.mk
+++ b/solenv/inc/tg_help.mk
@@ -45,7 +45,7 @@ $(COMMONMISC)$/{$(aux_alllangiso)}$/$(SHELL_PACKAGE)$/%.xhp :| %.xhp
$(COMMONMISC)$/$(TARGET).done : $(HLANGXHPFILES)
.IF "$(WITH_LANG)"!=""
- $(AUGMENT_LIBRARY_PATH) $(HELPEX) -QQ -p $(PRJNAME) -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(COMMONMISC) -y $(SHELL_PACKAGE) -l all -lf $(aux_alllangiso:t",") -m $(LOCALIZESDF) && $(TOUCH) $@
+ $(AUGMENT_LIBRARY_PATH) $(HELPEX) -p $(PRJNAME) -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(COMMONMISC) -y $(SHELL_PACKAGE) -l all -lf $(aux_alllangiso:t",") -m $(LOCALIZESDF) && $(TOUCH) $@
.ELSE # "$(WITH_LANG)"!=""
cp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES)))) $(COMMONMISC)$/en-US$/$(SHELL_PACKAGE) && $(TOUCH) $@
.ENDIF # "$(WITH_LANG)"!=""
diff --git a/solenv/inc/tg_srs.mk b/solenv/inc/tg_srs.mk
index 347dd25569de..4e70eb06b1b4 100644
--- a/solenv/inc/tg_srs.mk
+++ b/solenv/inc/tg_srs.mk
@@ -56,7 +56,7 @@ $(foreach,i,$(SRC$(TNR)FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESD
$(COMMAND_ECHO)-$(MKDIR) $(@:d)
$(COMMAND_ECHO)-$(RM) $@
$(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME)
- $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
+ $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all
$(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@
$(COMMAND_ECHO)-$(RM) $@.$(INPATH)
diff --git a/solenv/inc/tg_xmerge.mk b/solenv/inc/tg_xmerge.mk
new file mode 100755
index 000000000000..fa3e2297184f
--- /dev/null
+++ b/solenv/inc/tg_xmerge.mk
@@ -0,0 +1,109 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+.IF "$(XTXFILES)"!=""
+
+ALLTAR : $(MISC)/$(TARGET).xtx.pmerge.mk $(XTXFILES)
+
+.IF "$(L10NEXT)"==""
+L10NEXT:=.txt
+.ENDIF
+
+$(MISC)/$(TARGET).xtx.pmerge.mk : $(XTXFILES)
+
+$(XTXFILES) : $(LOCALIZESDF)
+
+.INCLUDE .IGNORE : $(MISC)/$(TARGET).xtx.pmerge.mk
+
+.IF "$(alllangiso)"!="$(last_merge)"
+XTXMERGEPHONY:=.PHONY
+.ENDIF # "$(alllangiso)" != "$(last_merge)"
+
+$(MISC)/$(TARGET)/%$(L10NEXT) $(XTXMERGEPHONY) : %.xtx
+ @@-$(MKDIRHIER) $(@:d)
+.IF "$(WITH_LANG)"==""
+ $(COMMAND_ECHO)$(COPY) $< $@
+.ELSE # "$(WITH_LANG)"==""
+ @@-$(RM) $@
+ $(COMMAND_ECHO)@noop $(assign XTXMERGELIST+:=$(<:f))
+ $(COMMAND_ECHO)@noop $(assign XTXDESTDIR:=$(@:d))
+.ENDIF # "$(WITH_LANG)"==""
+
+$(MISC)/$(TARGET).xtx.pmerge.mk : $(XTXMERGELIST)
+.IF "$(WITH_LANG)"!=""
+# xtxex command file requirements:
+# - one file per line
+# - no spaces
+# - no empty lines
+# $(uniq ...) to workaround $assign adding the value twice...
+ @noop $(assign XTXMERGEFILELIST:=$(uniq $(XTXMERGELIST)))
+ $(COMMAND_ECHO) $(SOLARBINDIR)/xtxex -p $(PRJNAME) -r $(PRJ) -o $(XTXDESTDIR) -i @$(mktmp $(XTXMERGEFILELIST:t"\n":s/ //)) -l $(alllangiso:s/ /,/) -f $(alllangiso:s/ /,/) -m $(LOCALIZESDF) -s"[path]/[fileNoExt]_[language]$(L10NEXT)"
+.ENDIF # "$(WITH_LANG)"!=""
+
+ @-$(RM) $@
+ $(COMMAND_ECHO)echo last_merge=$(alllangiso) > $@
+.ENDIF # "$(XTXFILES)"!=""
+
+.IF "$(TREEFILE)"!=""
+ALLTAR : $(MISC)/$(TARGET).tree.pmerge.mk $(TREEFILE)
+
+$(MISC)/$(TARGET).tree.pmerge.mk : $(TREEFILE)
+
+$(TREEFILE) : $(LOCALIZESDF)
+
+.INCLUDE .IGNORE : $(MISC)/$(TARGET).tree.pmerge.mk
+
+.IF "$(alllangiso)"!="$(last_merge)"
+TREEMERGEPHONY:=.PHONY
+.ENDIF # "$(alllangiso)" != "$(last_merge)"
+
+$(OUT_HELP)/en-US/help.tree $(TREEMERGEPHONY) : help.tree
+ @@-$(MKDIRHIER) $(@:d)
+.IF "$(WITH_LANG)"==""
+ $(COMMAND_ECHO)$(COPY) $< $@
+.ELSE # "$(WITH_LANG)"==""
+ @@-$(RM) $@
+ $(COMMAND_ECHO)@noop $(assign TREEMERGELIST+:=$(<:f))
+ $(COMMAND_ECHO)@noop $(assign TREEDESTDIR:=$(@:d:d:d))
+.ENDIF # "$(WITH_LANG)"==""
+
+$(MISC)/$(TARGET).tree.pmerge.mk : $(TREEMERGELIST)
+.IF "$(WITH_LANG)"!=""
+# xtxex command file requirements:
+# - one file per line
+# - no spaces
+# - no empty lines
+# $(uniq ...) to workaround $assign adding the value twice...
+ @noop $(assign TREEMERGEFILELIST:=$(uniq $(TREEMERGELIST)))
+# Variables for the pattern filename,fileNoExt,language,extension,pathPrefix,pathPostFix,path
+ $(COMMAND_ECHO) $(SOLARBINDIR)/xhtex -p $(PRJNAME) -r $(PRJ) -o $(TREEDESTDIR) -i @$(mktmp $(TREEMERGEFILELIST:t"\n":s/ //)) -l $(alllangiso:s/ /,/) -f $(alllangiso:s/ /,/) -m $(LOCALIZESDF) -s"[path]/[language]/[fileNoExt].tree"
+.ENDIF # "$(WITH_LANG)"!=""
+ @-$(RM) $@
+ $(COMMAND_ECHO)echo last_merge=$(alllangiso) > $@
+.ENDIF # "$(TREEFILE)"!=""
+
+
diff --git a/solenv/inc/version.hrc b/solenv/inc/version.hrc
index 9c2b9be4189a..426e55437e1b 100644..100755
--- a/solenv/inc/version.hrc
+++ b/solenv/inc/version.hrc
@@ -26,7 +26,7 @@
*************************************************************************/
#define VERSION 3
-#define SUBVERSION 3
+#define SUBVERSION 4
//#define VERVARIANT 0 // never define this one, will be provided by build environment (BUILD_ID)
// .0 + VER_CONCEPT
// .100 + VER_ALPHA
@@ -38,7 +38,7 @@
#define VER_FINAL 0
#define VER_DAY 1
-#define VER_MONTH 1
+#define VER_MONTH 8
#define VER_YEAR 2010
#ifndef VER_FIRSTYEAR
diff --git a/solenv/inc/version.lst b/solenv/inc/version.lst
index ac49f6c6fcf6..5dd3a2a37fad 100644
--- a/solenv/inc/version.lst
+++ b/solenv/inc/version.lst
@@ -26,5 +26,5 @@
#*************************************************************************
OOOBASEVERSIONMAJOR=3
-OOOBASEVERSIONMINOR=3
+OOOBASEVERSIONMINOR=4
OOOBASEVERSIONMICRO=0
diff --git a/solenv/inc/version_so.hrc b/solenv/inc/version_so.hrc
index 9773f10fdddf..5493a1587b7c 100644..100755
--- a/solenv/inc/version_so.hrc
+++ b/solenv/inc/version_so.hrc
@@ -25,8 +25,8 @@
*
*************************************************************************/
-#define VERSION 9
-#define SUBVERSION 3
+#define VERSION 3
+#define SUBVERSION 4
//#define VERVARIANT 0 // never define this one, will be provided by build environment (BUILD_ID)
// .0 + VER_CONCEPT
// .100 + VER_ALPHA
@@ -38,7 +38,7 @@
#define VER_FINAL 0
#define VER_DAY 1
-#define VER_MONTH 1
+#define VER_MONTH 8
#define VER_YEAR 2010
#ifndef VER_FIRSTYEAR
diff --git a/solenv/inc/wntmsci10.mk b/solenv/inc/wntmsci10.mk
index 6ed8327c8506..5c959f7d0e3c 100644
--- a/solenv/inc/wntmsci10.mk
+++ b/solenv/inc/wntmsci10.mk
@@ -34,7 +34,7 @@ JAVAFLAGSDEBUG=-g
# SOLAR JAva Unterstuetzung nur fuer wntmsci
ASM=ml
-AFLAGS=/c /Cp /coff
+AFLAGS=/c /Cp /coff /safeseh
# architecture dependent flags for the C and C++ compiler that can be changed by
# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
diff --git a/solenv/inc/wntmsci11.mk b/solenv/inc/wntmsci11.mk
index b270a6a25cfe..972feb0a8fdc 100644
--- a/solenv/inc/wntmsci11.mk
+++ b/solenv/inc/wntmsci11.mk
@@ -34,7 +34,7 @@ JAVAFLAGSDEBUG=-g
# SOLAR JAva Unterstuetzung nur fuer wntmsci
ASM=ml
-AFLAGS=/c /Cp /coff
+AFLAGS=/c /Cp /coff /safeseh
# architecture dependent flags for the C and C++ compiler that can be changed by
# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
@@ -82,6 +82,10 @@ COMPILE_ECHO_FILE=
# lookup":
# -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800
CFLAGS+=-Zm500 -Zc:forScope,wchar_t- -GR
+
+# Stack buffer overrun detection.
+CFLAGS+=-GS
+
CFLAGS+=-c -nologo -Gs $(NOLOGO)
CDEFS+= -D_X86_=1 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NON_CONFORMING_SWPRINTFS
@@ -235,8 +239,17 @@ LINKOUTPUTFILTER= $(PIPEERROR) $(GREP) -v "LNK4197:"
LINKFLAGS=/MAP /OPT:NOREF
.ENDIF
+# excetion handling protection
+LINKFLAGS+=-safeseh
+
+# enable DEP
+LINKFLAGS+=-nxcompat
+
+# enable ASLR
+LINKFLAGS+=-dynamicbase
+
.IF "$(linkinc)" != ""
-LINKFLAGS=-NODEFAULTLIB -INCREMENTAL:YES -DEBUG
+LINKFLAGS+=-NODEFAULTLIB -INCREMENTAL:YES -DEBUG
MAPFILE=
_VC_MANIFEST_INC=1
.ELSE # "$(linkinc)" != ""
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index 07711133bf4b..dd6ba6202bbe 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -41,13 +41,7 @@
#include "stgdir.hxx"
#include "stgio.hxx"
-#if defined(W31)
- #include <tools/svwin.h>
- #define memcpy hmemcpy
- #define __HUGE _huge
-#else
- #define __HUGE
-#endif
+#define __HUGE
///////////////////////////// class StgFAT ///////////////////////////////
diff --git a/starmath/inc/applicat.hxx b/starmath/inc/applicat.hxx
index 9c756496ae95..38fcf2b8445c 100644
--- a/starmath/inc/applicat.hxx
+++ b/starmath/inc/applicat.hxx
@@ -51,10 +51,6 @@ class SvxErrorHandler;
**
**/
-#ifdef WIN
-#define RELEASE "WIN304"
-#endif
-
#ifdef PM2
#define RELEASE "PM304"
#endif
diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx
index f632131d834f..4d13ea48185e 100644..100755
--- a/starmath/inc/format.hxx
+++ b/starmath/inc/format.hxx
@@ -109,6 +109,7 @@ class SmFormat : public SfxBroadcaster
USHORT vSize[SIZ_END + 1];
USHORT vDist[DIS_END + 1];
SmHorAlign eHorAlign;
+ INT16 nGreekCharStyle;
BOOL bIsTextmode,
bScaleNormalBrackets;
@@ -138,6 +139,9 @@ public:
BOOL IsTextmode() const { return bIsTextmode; }
void SetTextmode(BOOL bVal) { bIsTextmode = bVal; }
+ INT16 GetGreekCharStyle() const { return nGreekCharStyle; }
+ void SetGreekCharStyle(INT16 nVal) { nGreekCharStyle = nVal; }
+
BOOL IsScaleNormalBrackets() const { return bScaleNormalBrackets; }
void SetScaleNormalBrackets(BOOL bVal) { bScaleNormalBrackets = bVal; }
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 6ef89ea5ec1b..92c9d4621292 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -311,19 +311,10 @@ class SmTextNode : public SmVisibleNode
USHORT nFontDesc;
protected:
- SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP)
- : SmVisibleNode(eNodeType, rNodeToken)
- {
- nFontDesc = nFontDescP;
- }
+ SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP );
public:
- SmTextNode(const SmToken &rNodeToken, USHORT nFontDescP)
- : SmVisibleNode(NTEXT, rNodeToken)
- {
- nFontDesc = nFontDescP;
- }
-
+ SmTextNode(const SmToken &rNodeToken, USHORT nFontDescP );
USHORT GetFontDesc() const { return nFontDesc; }
void SetText(const XubString &rText) { aText = rText; }
@@ -347,15 +338,13 @@ public:
class SmSpecialNode : public SmTextNode
{
+ bool bIsFromGreekSymbolSet;
+
protected:
- SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc)
- : SmTextNode(eNodeType, rNodeToken, _nFontDesc)
- {}
+ SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc);
public:
- SmSpecialNode(const SmToken &rNodeToken)
- : SmTextNode(NSPECIAL, rNodeToken, FNT_MATH) //! default Font nicht immer richtig
- {}
+ SmSpecialNode(const SmToken &rNodeToken);
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx
index 503859485095..51e8ad0b8642 100644
--- a/starmath/inc/symbol.hxx
+++ b/starmath/inc/symbol.hxx
@@ -38,7 +38,10 @@
#include <map>
#include <vector>
#include <set>
+#include <functional>
+#include <algorithm>
+#include "unomodel.hxx"
#include "utility.hxx"
#include "smmod.hxx"
@@ -133,6 +136,15 @@ typedef std::map< String, SmSym, lt_String > SymbolMap_t;
// vector of pointers to the actual symbols in the above container
typedef std::vector< const SmSym * > SymbolPtrVec_t;
+struct lt_SmSymPtr : public std::binary_function< const SmSym *, const SmSym *, bool >
+{
+ bool operator() ( const SmSym *pSym1, const SmSym *pSym2 )
+ {
+ return pSym1->GetCharacter() < pSym2->GetCharacter();
+ }
+};
+
+
class SmSymbolManager : public SfxListener
{
SymbolMap_t m_aSymbols;
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index bf62157a30d3..43c0fbe27dd0 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -42,7 +42,6 @@ using namespace com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::beans;
-#define A2OU(x) rtl::OUString::createFromAscii( x )
static const char* aRootName = "Office.Math";
@@ -127,6 +126,7 @@ static const char * aMathPropNames[] =
static const char * aFormatPropNames[] =
{
"StandardFormat/Textmode",
+ "StandardFormat/GreekCharStyle",
"StandardFormat/ScaleNormalBracket",
"StandardFormat/HorizontalAlignment",
"StandardFormat/BaseSize",
@@ -994,6 +994,10 @@ void SmMathConfig::LoadFormat()
if (pVal->hasValue() && (*pVal >>= bTmp))
pFormat->SetTextmode( bTmp );
++pVal;
+ // StandardFormat/GreekCharStyle
+ if (pVal->hasValue() && (*pVal >>= nTmp16))
+ pFormat->SetGreekCharStyle( nTmp16 );
+ ++pVal;
// StandardFormat/ScaleNormalBracket
if (pVal->hasValue() && (*pVal >>= bTmp))
pFormat->SetScaleNormalBrackets( bTmp );
@@ -1069,6 +1073,8 @@ void SmMathConfig::SaveFormat()
// StandardFormat/Textmode
*pValue++ <<= (BOOL) pFormat->IsTextmode();
+ // StandardFormat/GreekCharStyle
+ *pValue++ <<= (INT16) pFormat->GetGreekCharStyle();
// StandardFormat/ScaleNormalBracket
*pValue++ <<= (BOOL) pFormat->IsScaleNormalBrackets();
// StandardFormat/HorizontalAlignment
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 037f2fc1dff8..0dc58c8ed640 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1485,6 +1485,7 @@ IMPL_LINK( SmSymbolDialog, GetClickHdl, Button *, EMPTYARG pButton )
{
XubString aText ('%');
aText += pSym->GetName();
+ aText += (sal_Unicode)' ';
rViewSh.GetViewFrame()->GetDispatcher()->Execute(
SID_INSERTTEXT, SFX_CALLMODE_STANDARD,
@@ -1600,6 +1601,9 @@ BOOL SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
aSymbolSetName = rSymbolSetName;
aSymbolSet = rSymbolMgr.GetSymbolSet( aSymbolSetName );
+ // sort symbols by Unicode position (useful for displaying Greek characters alphabetically)
+ std::sort( aSymbolSet.begin(), aSymbolSet.end(), lt_SmSymPtr() );
+
aSymbolSetDisplay.SetSymbolSet( aSymbolSet );
if (aSymbolSet.size() > 0)
SelectSymbol(0);
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 49739af72972..ab1382b97879 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -131,9 +131,9 @@ void SmDocShell::SFX_NOTIFY(SfxBroadcaster&, const TypeId&,
{
case HINT_FORMATCHANGED:
SetFormulaArranged(FALSE);
- nModifyCount++; //! merkwuerdig...
- // ohne dies wird die Grafik letztlich
- // nicht geupdatet
+
+ nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
+
Repaint();
break;
}
@@ -211,11 +211,19 @@ void SmDocShell::SetFormat(SmFormat& rFormat)
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetFormat" );
aFormat = rFormat;
- SetFormulaArranged(FALSE);
- SmViewShell *pViewSh = SmGetActiveView();
- if (pViewSh)
- pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_GAPHIC_SM);
- SetModified(TRUE);
+ SetFormulaArranged( FALSE );
+ SetModified( TRUE );
+
+ nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
+
+ // don't use SmGetActiveView since the view shell might not be active (0 pointer)
+ // if for example the Basic Macro dialog currently has the focus. Thus:
+ SfxViewFrame* pFrm = SfxViewFrame::GetFirst( this );
+ while (pFrm)
+ {
+ pFrm->GetBindings().Invalidate(SID_GAPHIC_SM);
+ pFrm = SfxViewFrame::GetNext( *pFrm, this );
+ }
}
String SmDocShell::GetAccessibleText()
@@ -241,7 +249,7 @@ void SmDocShell::Parse()
delete pTree;
ReplaceBadChars();
pTree = aInterpreter.Parse(aText);
- nModifyCount++;
+ nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
SetFormulaArranged( FALSE );
}
@@ -1123,13 +1131,9 @@ void SmDocShell::Execute(SfxRequest& rReq)
case SID_TEXT:
{
- const SfxStringItem& rItem =
- (const SfxStringItem&)rReq.GetArgs()->Get(SID_TEXT);
-
+ const SfxStringItem& rItem = (const SfxStringItem&)rReq.GetArgs()->Get(SID_TEXT);
if (GetText() != rItem.GetValue())
- {
SetText(rItem.GetValue());
- }
}
break;
@@ -1222,6 +1226,10 @@ void SmDocShell::GetState(SfxItemSet &rSet)
break;
case SID_GAPHIC_SM:
+ //! very old (pre UNO) and ugly hack to invalidate the SmGraphicWindow.
+ //! If nModifyCount gets changed then the call below will implicitly notify
+ //! SmGraphicController::StateChanged and there the window gets invalidated.
+ //! Thus all the 'nModifyCount++' before invalidating this slot.
rSet.Put(SfxInt16Item(SID_GAPHIC_SM, nModifyCount));
break;
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index f7093f9c3815..020376c05dfb 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -252,6 +252,7 @@ IMPL_LINK( SmEditWindow, ModifyTimerHdl, Timer *, EMPTYARG /*pTimer*/ )
SmModule *pp = SM_MOD();
if (pp->GetConfig()->IsAutoRedraw())
Flush();
+ aModifyTimer.Stop();
return 0;
}
@@ -279,6 +280,7 @@ IMPL_LINK(SmEditWindow, CursorMoveTimerHdl, Timer *, EMPTYARG /*pTimer*/)
aOldSelection = aNewSelection;
}
}
+ aCursorMoveTimer.Stop();
return 0;
}
@@ -435,7 +437,7 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt)
SmViewShell *pView = GetView();
if ( pView && !pView->KeyInput(rKEvt) )
{
- /* fuert bei F1 (Hilfe) zum Zerstoeren von this! */
+ /* fuert bei F1 (Hilfe) zum Zerstoeren von this! */
Flush();
if ( aModifyTimer.IsActive() )
aModifyTimer.Stop();
@@ -734,6 +736,9 @@ void SmEditWindow::InsertCommand(USHORT nCommand)
pEditView->SetSelection(aSelection);
}
+ aModifyTimer.Start();
+ aCursorMoveTimer.Start();
+
GrabFocus();
}
}
@@ -917,7 +922,11 @@ void SmEditWindow::InsertText(const String& Text)
{
DBG_ASSERT( pEditView, "EditView missing" );
if (pEditView)
+ {
pEditView->InsertText(Text);
+ aModifyTimer.Start();
+ aCursorMoveTimer.Start();
+ }
}
void SmEditWindow::Flush()
@@ -928,9 +937,11 @@ void SmEditWindow::Flush()
pEditEngine->ClearModifyFlag();
SmViewShell *pViewSh = rCmdBox.GetView();
if (pViewSh)
+ {
pViewSh->GetViewFrame()->GetDispatcher()->Execute(
SID_TEXT, SFX_CALLMODE_STANDARD,
new SfxStringItem(SID_TEXT, GetText()), 0L);
+ }
}
if (aCursorMoveTimer.IsActive())
diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx
index 18aaed4c841c..e92d1a5e97aa 100644
--- a/starmath/source/format.cxx
+++ b/starmath/source/format.cxx
@@ -112,8 +112,9 @@ SmFormat::SmFormat()
{
nVersion = SM_FMT_VERSION_NOW;
- eHorAlign = AlignCenter;
- bIsTextmode = bScaleNormalBrackets = FALSE;
+ eHorAlign = AlignCenter;
+ nGreekCharStyle = 0;
+ bIsTextmode = bScaleNormalBrackets = FALSE;
vSize[SIZ_TEXT] = 100;
vSize[SIZ_INDEX] = 60;
@@ -191,6 +192,7 @@ SmFormat & SmFormat::operator = (const SmFormat &rFormat)
SetVersion (rFormat.GetVersion());
SetHorAlign(rFormat.GetHorAlign());
SetTextmode(rFormat.IsTextmode());
+ SetGreekCharStyle(rFormat.GetGreekCharStyle());
SetScaleNormalBrackets(rFormat.IsScaleNormalBrackets());
USHORT i;
@@ -212,6 +214,7 @@ BOOL SmFormat::operator == (const SmFormat &rFormat) const
{
BOOL bRes = aBaseSize == rFormat.aBaseSize &&
eHorAlign == rFormat.eHorAlign &&
+ nGreekCharStyle == rFormat.nGreekCharStyle &&
bIsTextmode == rFormat.bIsTextmode &&
bScaleNormalBrackets == rFormat.bScaleNormalBrackets;
diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk
index 596060397e18..a409e55d2462 100644
--- a/starmath/source/makefile.mk
+++ b/starmath/source/makefile.mk
@@ -36,6 +36,8 @@ LIBTARGET=NO
# --- Settings -----------------------------------------------------
+ENABLE_EXCEPTIONS=TRUE
+
.INCLUDE : settings.mk
# --- Files --------------------------------------------------------
@@ -84,24 +86,6 @@ SLOFILES = \
$(SLO1FILES) \
$(SLO2FILES)
-EXCEPTIONSFILES = \
- $(SLO)$/register.obj \
- $(SLO)$/accessibility.obj \
- $(SLO)$/cfgitem.obj \
- $(SLO)$/dialog.obj \
- $(SLO)$/document.obj \
- $(SLO)$/node.obj \
- $(SLO)$/parse.obj \
- $(SLO)$/mathmlimport.obj \
- $(SLO)$/mathmlexport.obj \
- $(SLO)$/mathtype.obj \
- $(SLO)$/smdll.obj \
- $(SLO)$/view.obj \
- $(SLO)$/unomodel.obj \
- $(SLO)$/smdetect.obj \
- $(SLO)$/symbol.obj \
- $(SLO)$/unodoc.obj
-
LIB1TARGET = \
$(SLB)$/$(TARGET).lib
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 36eb9d3884b5..bec69eb01b95 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -75,7 +75,6 @@
#include <memory>
#include "mathmlexport.hxx"
-#include "mathtype.hxx"
#include <starmath.hrc>
#include <unomodel.hxx>
#include <document.hxx>
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index dd90caaf6d45..36c009757eac 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -71,7 +71,6 @@ one go*/
#include <memory>
#include "mathmlimport.hxx"
-#include "mathtype.hxx"
#include <starmath.hrc>
#include <unomodel.hxx>
#include <document.hxx>
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 4601b2f84fec..b986a046b205 100644..100755
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -28,7 +28,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_starmath.hxx"
-#define APPEND(str,ascii) str.AppendAscii(RTL_CONSTASCII_STRINGPARAM(ascii))
+#include "node.hxx"
+#include "rect.hxx"
+#include "symbol.hxx"
+#include "smmod.hxx"
+#include "document.hxx"
+#include "view.hxx"
+#include "mathtype.hxx"
+
#include <tools/gen.hxx>
#include <tools/fract.hxx>
#include <rtl/math.hxx>
@@ -38,23 +45,14 @@
#include <vcl/outdev.hxx>
#include <sfx2/module.hxx>
-
-#include "node.hxx"
-#include <rect.hxx>
-#include "symbol.hxx"
-#include "smmod.hxx"
-#include <document.hxx>
-#include <view.hxx>
-#ifndef _MATHTYPE_HXX
-#include "mathtype.hxx"
-#endif
-
#include <math.h>
#include <float.h>
// define this to draw rectangles for debugging
//#define SM_RECT_DEBUG
+#define APPEND(str,ascii) str.AppendAscii(RTL_CONSTASCII_STRINGPARAM(ascii))
+
////////////////////////////////////////
// SmTmpDevice
// Allows for font and color changes. The original settings will be restored
@@ -2355,6 +2353,20 @@ void SmRectangleNode::Draw(OutputDevice &rDev, const Point &rPosition) const
/**************************************************************************/
+SmTextNode::SmTextNode( SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP ) :
+ SmVisibleNode(eNodeType, rNodeToken)
+{
+ nFontDesc = nFontDescP;
+}
+
+
+SmTextNode::SmTextNode( const SmToken &rNodeToken, USHORT nFontDescP ) :
+ SmVisibleNode(NTEXT, rNodeToken)
+{
+ nFontDesc = nFontDescP;
+}
+
+
void SmTextNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
{
SmNode::Prepare(rFormat, rDocShell);
@@ -2798,6 +2810,36 @@ void SmAttributNode::CreateTextFromNode(String &rText)
/**************************************************************************/
+bool lcl_IsFromGreekSymbolSet( const String &rTokenText )
+{
+ bool bRes = false;
+
+ // valid symbol name needs to have a '%' at pos 0 and at least an additonal char
+ if (rTokenText.Len() > 2 && rTokenText.GetBuffer()[0] == (sal_Unicode)'%')
+ {
+ String aName( rTokenText.Copy(1) );
+ SmSym *pSymbol = SM_MOD()->GetSymbolManager().GetSymbolByName( aName );
+ if (pSymbol && GetExportSymbolSetName( pSymbol->GetSymbolSetName() ).EqualsAscii( "Greek" ) )
+ bRes = true;
+ }
+
+ return bRes;
+}
+
+
+SmSpecialNode::SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc) :
+ SmTextNode(eNodeType, rNodeToken, _nFontDesc)
+{
+ bIsFromGreekSymbolSet = lcl_IsFromGreekSymbolSet( rNodeToken.aText );
+}
+
+
+SmSpecialNode::SmSpecialNode(const SmToken &rNodeToken) :
+ SmTextNode(NSPECIAL, rNodeToken, FNT_MATH) //! default Font nicht immer richtig
+{
+ bIsFromGreekSymbolSet = lcl_IsFromGreekSymbolSet( rNodeToken.aText );
+}
+
void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
{
@@ -2806,7 +2848,8 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell
const SmSym *pSym;
SmModule *pp = SM_MOD();
- if (NULL != (pSym = pp->GetSymbolManager().GetSymbolByName(GetToken().aText)))
+ String aName( GetToken().aText.Copy(1) );
+ if (NULL != (pSym = pp->GetSymbolManager().GetSymbolByName( aName )))
{
SetText( pSym->GetCharacter() );
GetFont() = pSym->GetFace();
@@ -2832,6 +2875,33 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell
SetAttribut(ATTR_BOLD);
Flags() |= FLG_FONT;
+
+ if (bIsFromGreekSymbolSet)
+ {
+ DBG_ASSERT( GetText().Len() == 1, "a symbol should only consist of 1 char!" );
+ bool bItalic = false;
+ INT16 nStyle = rFormat.GetGreekCharStyle();
+ DBG_ASSERT( nStyle >= 0 && nStyle <= 2, "unexpected value for GreekCharStyle" );
+ if (nStyle == 1)
+ bItalic = true;
+ else if (nStyle == 2)
+ {
+ String aTmp( GetText() );
+ if (aTmp.Len() > 0)
+ {
+ const sal_Unicode cUppercaseAlpha = 0x0391;
+ const sal_Unicode cUppercaseOmega = 0x03A9;
+ sal_Unicode cChar = aTmp.GetBuffer()[0];
+ // uppercase letters should be straight and lowercase letters italic
+ bItalic = !(cUppercaseAlpha <= cChar && cChar <= cUppercaseOmega);
+ }
+ }
+
+ if (bItalic)
+ Attributes() |= ATTR_ITALIC;
+ else
+ Attributes() &= ~ATTR_ITALIC;;
+ }
};
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 15971d0c38af..d12f3df07400 100755..100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -741,14 +741,14 @@ void SmParser::NextToken()
CurToken.nLevel = 5;
CurToken.aText = String();
CurToken.nRow = sal::static_int_cast< xub_StrLen >(Row);
- CurToken.nCol = nTmpStart - ColOff + 1;
+ CurToken.nCol = nTmpStart - ColOff;
if (aTmpRes.TokenType & KParseType::IDENTNAME)
{
xub_StrLen n = sal::static_int_cast< xub_StrLen >(aTmpRes.EndPos - nTmpStart);
CurToken.eType = TSPECIAL;
- CurToken.aText = BufferString.Copy( sal::static_int_cast< xub_StrLen >(nTmpStart), n );
+ CurToken.aText = BufferString.Copy( sal::static_int_cast< xub_StrLen >(nTmpStart-1), n+1 );
DBG_ASSERT( aTmpRes.EndPos > rnEndPos,
"empty identifier" );
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index e248f9726629..5208ce3644ce 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -290,6 +290,28 @@ void SmSymbolManager::Load()
DBG_ERROR( "no symbol set found" );
m_bModified = false;
}
+
+ // now add a %i... symbol to the 'iGreek' set for every symbol found in the 'Greek' set.
+ SmLocalizedSymbolData aLocalizedData;
+ const String aGreekSymbolSetName( aLocalizedData.GetUiSymbolSetName( A2OU("Greek") ) );
+ const SymbolPtrVec_t aGreekSymbols( GetSymbolSet( aGreekSymbolSetName ) );
+ String aSymbolSetName( (sal_Unicode) 'i' );
+ aSymbolSetName += aGreekSymbolSetName;
+ size_t nSymbols = aGreekSymbols.size();
+ for (size_t i = 0; i < nSymbols; ++i)
+ {
+ // make the new symbol a copy but with ITALIC_NORMAL, and add it to iGreek
+ const SmSym &rSym = *aGreekSymbols[i];
+ Font aFont( rSym.GetFace() );
+ DBG_ASSERT( aFont.GetItalic() == ITALIC_NONE, "expected Font with ITALIC_NONE, failed." );
+ aFont.SetItalic( ITALIC_NORMAL );
+ String aSymbolName( (sal_Unicode)'i' );
+ aSymbolName += rSym.GetName();
+ SmSym aSymbol( aSymbolName, aFont, rSym.GetCharacter(),
+ aSymbolSetName, TRUE /*bIsPredefined*/ );
+
+ AddOrReplaceSymbol( aSymbol );
+ }
}
void SmSymbolManager::Save()
@@ -314,10 +336,21 @@ void SmSymbolManager::Save()
}
DBG_ASSERT(pSym - pSymbols == nSaveSymbolCnt, "wrong number of symbols" );
#endif
+
+ // prepare to skip symbols from iGreek on saving
+ SmLocalizedSymbolData aLocalizedData;
+ String aSymbolSetName( (sal_Unicode) 'i' );
+ aSymbolSetName += aLocalizedData.GetUiSymbolSetName( A2OU("Greek") );
+
SymbolPtrVec_t aTmp( GetSymbols() );
std::vector< SmSym > aSymbols;
for (size_t i = 0; i < aTmp.size(); ++i)
- aSymbols.push_back( *aTmp[i] );
+ {
+ // skip symbols from iGreek set since those symbols always get added
+ // by computational means in SmSymbolManager::Load
+ if (aTmp[i]->GetSymbolSetName() != aSymbolSetName)
+ aSymbols.push_back( *aTmp[i] );
+ }
rCfg.SetSymbols( aSymbols );
#if 0
delete [] pSymbols;
diff --git a/starmath/source/types.cxx b/starmath/source/types.cxx
index a861db5a0c79..e63d46c79e9b 100644
--- a/starmath/source/types.cxx
+++ b/starmath/source/types.cxx
@@ -38,7 +38,7 @@ sal_Unicode ConvertMathPrivateUseAreaToUnicode( sal_Unicode cChar )
if (IsInPrivateUseArea( cChar ))
{
DBG_ASSERT( 0, "Error: private use area characters should no longer be in use!" );
- cRes = (sal_Unicode) '&'; // just some character that should easily be notice as odd in the context
+ cRes = (sal_Unicode) '@'; // just some character that should easily be notice as odd in the context
}
return cRes;
}
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 013831f6e44e..9d008f326d2f 100755..100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -203,6 +203,7 @@ enum SmModelPropertyHandles
HANDLE_RELATIVE_FONT_HEIGHT_OPERATORS,
HANDLE_RELATIVE_FONT_HEIGHT_LIMITS,
HANDLE_IS_TEXT_MODE,
+ HANDLE_GREEK_CHAR_STYLE,
HANDLE_ALIGNMENT,
HANDLE_RELATIVE_SPACING,
HANDLE_RELATIVE_LINE_SPACING,
@@ -273,6 +274,7 @@ PropertySetInfo * lcl_createModelPropertyInfo ()
{ RTL_CONSTASCII_STRINGPARAM( "Formula" ), HANDLE_FORMULA , &::getCppuType((const OUString*)0), PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM( "IsScaleAllBrackets" ), HANDLE_IS_SCALE_ALL_BRACKETS , &::getBooleanCppuType(), PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM( "IsTextMode" ), HANDLE_IS_TEXT_MODE , &::getBooleanCppuType(), PROPERTY_NONE, 0},
+ { RTL_CONSTASCII_STRINGPARAM( "GreekCharStyle" ), HANDLE_GREEK_CHAR_STYLE, &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM( "LeftMargin" ), HANDLE_LEFT_MARGIN , &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, DIS_LEFTSPACE },
{ RTL_CONSTASCII_STRINGPARAM( "PrinterName" ), HANDLE_PRINTER_NAME , &::getCppuType((const OUString*)0), PROPERTY_NONE, 0 },
{ RTL_CONSTASCII_STRINGPARAM( "PrinterSetup" ), HANDLE_PRINTER_SETUP , &::getCppuType((const Sequence < sal_Int8 >*)0), PROPERTY_NONE, 0 },
@@ -593,6 +595,16 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
}
break;
+ case HANDLE_GREEK_CHAR_STYLE :
+ {
+ sal_Int16 nVal = 0;
+ *pValues >>= nVal;
+ if (nVal < 0 || nVal > 2)
+ throw IllegalArgumentException();
+ aFormat.SetGreekCharStyle( nVal );
+ }
+ break;
+
case HANDLE_ALIGNMENT :
{
// SmHorAlign uses the same values as HorizontalAlignment
@@ -824,6 +836,10 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
}
break;
+ case HANDLE_GREEK_CHAR_STYLE :
+ *pValue <<= (sal_Int16)aFormat.GetGreekCharStyle();
+ break;
+
case HANDLE_ALIGNMENT :
// SmHorAlign uses the same values as HorizontalAlignment
*pValue <<= (sal_Int16)aFormat.GetHorAlign();
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 886d409931b2..0087595703ca 100755..100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1545,8 +1545,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
case SID_INSERTTEXT:
{
const SfxStringItem& rItem =
- (const SfxStringItem&)rReq.GetArgs()->Get(SID_INSERTTEXT);
-
+ (const SfxStringItem&)rReq.GetArgs()->Get(SID_INSERTTEXT);
if (pWin)
pWin->InsertText(rItem.GetValue());
break;
diff --git a/stlport/prj/d.lst b/stlport/prj/d.lst
index f379d7d14c36..29848a6475e3 100644
--- a/stlport/prj/d.lst
+++ b/stlport/prj/d.lst
@@ -17,6 +17,7 @@ mkdir: %_DEST%\inc%_EXT%\stl\wrap_std\h
..\%__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
diff --git a/tools/inc/tools/postextstl.h b/stlport/systemstlguards/postextstl.h
index 81a21e25c15b..81a21e25c15b 100644
--- a/tools/inc/tools/postextstl.h
+++ b/stlport/systemstlguards/postextstl.h
diff --git a/tools/inc/tools/preextstl.h b/stlport/systemstlguards/preextstl.h
index 27aed38686f0..763f0dfa79f3 100644
--- a/tools/inc/tools/preextstl.h
+++ b/stlport/systemstlguards/preextstl.h
@@ -33,7 +33,10 @@
# include <istream>
# include <fstream>
# include <iostream>
+# include <sstream>
# include <vector>
+# include <deque>
+# include <set>
# include <list>
# include <map>
//3. Now force inclusion of native headers to get their std:: definitions
@@ -58,7 +61,10 @@
# include _STLP_NATIVE_HEADER(ostream)
# include _STLP_NATIVE_HEADER(istream)
# include _STLP_NATIVE_HEADER(iostream)
+# include _STLP_NATIVE_HEADER(sstream)
# include _STLP_NATIVE_HEADER(vector)
+# include _STLP_NATIVE_HEADER(deque)
+# include _STLP_NATIVE_HEADER(set)
# include _STLP_NATIVE_HEADER(list)
# include _STLP_NATIVE_HEADER(map)
# if defined(_GNUC__)
diff --git a/svl/inc/svl/zforlist.hxx b/svl/inc/svl/zforlist.hxx
index 598295797ea6..5492759d4d36 100644
--- a/svl/inc/svl/zforlist.hxx
+++ b/svl/inc/svl/zforlist.hxx
@@ -520,6 +520,15 @@ public:
String& sOutString, Color** ppColor,
LanguageType eLnge = LANGUAGE_DONTKNOW );
+ /** Format a string according to a format code string to be scanned.
+ @return
+ <FALSE/> if format code contains an error
+ <TRUE/> else, in which case the string and color are returned.
+ */
+ BOOL GetPreviewString( const String& sFormatString, const String& sPreviewString,
+ String& sOutString, Color** ppColor,
+ LanguageType eLnge = LANGUAGE_DONTKNOW );
+
/** Test whether the format code string is already present in container
@return
NUMBERFORMAT_ENTRY_NOT_FOUND if not found, else the format index.
diff --git a/svl/source/numbers/nbdll.cxx b/svl/source/numbers/nbdll.cxx
deleted file mode 100644
index b93eda3e7f37..000000000000
--- a/svl/source/numbers/nbdll.cxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svl.hxx"
-
-#ifdef WIN
-#include <svwin.h>
-
-#ifndef _SYSDEP_HXX
-#include <sysdep.hxx>
-#endif
-
-// Statische DLL-Verwaltungs-Variablen
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-
-/***************************************************************************
-|*
-|* LibMain()
-|*
-|* Beschreibung Initialisierungsfunktion der DLL
-|* Ersterstellung TH 05.05.93
-|* Letzte Aenderung TH 05.05.93
-|*
-***************************************************************************/
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-/***************************************************************************
-|*
-|* WEP()
-|*
-|* Beschreibung DLL-Deinitialisierung
-|* Ersterstellung TH 05.05.93
-|* Letzte Aenderung TH 05.05.93
-|*
-***************************************************************************/
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index cb66a75558c2..7343a0a9c0e6 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -1697,6 +1697,58 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
return FALSE;
}
+BOOL SvNumberFormatter::GetPreviewString( const String& sFormatString,
+ const String& sPreviewString,
+ String& sOutString,
+ Color** ppColor,
+ LanguageType eLnge )
+{
+ if (sFormatString.Len() == 0) // no empty string
+ return FALSE;
+
+ xub_StrLen nCheckPos = STRING_NOTFOUND;
+ sal_uInt32 nKey;
+ if (eLnge == LANGUAGE_DONTKNOW)
+ eLnge = IniLnge;
+ ChangeIntl(eLnge); // switch if needed
+ eLnge = ActLnge;
+ String sTmpString = sFormatString;
+ SvNumberformat* p_Entry = new SvNumberformat( sTmpString,
+ pFormatScanner,
+ pStringScanner,
+ nCheckPos,
+ eLnge);
+ if (nCheckPos == 0) // String ok
+ {
+ String aNonConstPreview( sPreviewString);
+ // May have to create standard formats for this locale.
+ sal_uInt32 CLOffset = ImpGenerateCL(eLnge);
+ nKey = ImpIsEntry( p_Entry->GetFormatstring(), CLOffset, eLnge);
+ if (nKey != NUMBERFORMAT_ENTRY_NOT_FOUND) // already present
+ GetOutputString( aNonConstPreview, nKey, sOutString, ppColor);
+ else
+ {
+ // If the format is valid but not a text format and does not
+ // include a text subformat, an empty string would result. Same as
+ // in SvNumberFormatter::GetOutputString()
+ if (p_Entry->IsTextFormat() || p_Entry->HasTextFormat())
+ p_Entry->GetOutputString( aNonConstPreview, sOutString, ppColor);
+ else
+ {
+ *ppColor = NULL;
+ sOutString = sPreviewString;
+ }
+ }
+ delete p_Entry;
+ return TRUE;
+ }
+ else
+ {
+ delete p_Entry;
+ return FALSE;
+ }
+}
+
sal_uInt32 SvNumberFormatter::TestNewString(const String& sFormatString,
LanguageType eLnge)
{
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 707b2362f0ed..97f06171a4fc 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2057,7 +2057,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
OutString = rScan.GetFalseString();
return FALSE;
}
- if (eType & NUMBERFORMAT_TEXT && bStandard)
+ if (eType & NUMBERFORMAT_TEXT)
{
ImpGetOutputStandard(fNumber, OutString);
return FALSE;
@@ -2086,7 +2086,9 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if (!nLen)
return false;
- if (nLen > 11)
+ // #i112250# With the 10-decimal limit, small numbers are formatted as "0".
+ // Switch to scientific in that case, too:
+ if (nLen > 11 || (OutString.EqualsAscii("0") && fNumber != 0.0))
{
sal_uInt16 nStandardPrec = rScan.GetStandardPrec();
nStandardPrec = ::std::min(nStandardPrec, static_cast<sal_uInt16>(14)); // limits to 14 decimals
diff --git a/svl/source/svdde/ddedata.cxx b/svl/source/svdde/ddedata.cxx
index ba67d451be34..369306c22874 100644
--- a/svl/source/svdde/ddedata.cxx
+++ b/svl/source/svdde/ddedata.cxx
@@ -41,10 +41,6 @@
#include <osl/thread.h>
-#if defined( WIN ) && defined( MSC )
-#pragma code_seg( "SVDDE_MISC_CODE" )
-#endif
-
// --- DdeData::DdeData() ------------------------------------------
DdeData::DdeData()
@@ -164,10 +160,10 @@ ULONG DdeData::GetExternalFormat( ULONG nFmt )
default:
{
-#if defined(WNT) || defined(WIN) || defined( PM2 )
+#if defined(WNT) || defined( PM2 )
String aName( SotExchange::GetFormatName( nFmt ) );
-#if defined(WNT) || defined(WIN)
+#if defined(WNT)
if( aName.Len() )
nFmt = RegisterClipboardFormat( reinterpret_cast<LPCWSTR>(aName.GetBuffer()) );
@@ -203,7 +199,7 @@ ULONG DdeData::GetInternalFormat( ULONG nFmt )
break;
default:
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
if( nFmt >= CF_MAX )
{
TCHAR szName[ 256 ];
diff --git a/svl/source/svdde/ddedll.cxx b/svl/source/svdde/ddedll.cxx
deleted file mode 100644
index a71662dd5e63..000000000000
--- a/svl/source/svdde/ddedll.cxx
+++ /dev/null
@@ -1,64 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svl.hxx"
-#ifdef WIN
-
-
-#include <sysdep.hxx> // included svwin.h
-
-// Statische DLL-Verwaltungs-Variablen
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-/***************************************************************************
-|* LibMain()
-|* Beschreibung Initialisierungsfunktion der DLL
-***************************************************************************/
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-/***************************************************************************
-|* WEP()
-|* Beschreibung DLL-Deinitialisierung
-***************************************************************************/
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/svl/source/svdde/ddestrg.cxx b/svl/source/svdde/ddestrg.cxx
index 4f0e2464a276..007c9f56c544 100644
--- a/svl/source/svdde/ddestrg.cxx
+++ b/svl/source/svdde/ddestrg.cxx
@@ -33,10 +33,6 @@
#include "ddeimp.hxx"
#include <svl/svdde.hxx>
-#if defined( WIN ) && defined( MSC )
-#pragma code_seg( "SVDDE_MISC_CODE" )
-#endif
-
// --- DdeString::DdeString() --------------------------------------
DdeString::DdeString( DWORD hDdeInst, const sal_Unicode* p ) :
diff --git a/svtools/inc/fltdefs.hxx b/svtools/inc/fltdefs.hxx
index 8ef3f2ab3740..86462c2faa33 100644
--- a/svtools/inc/fltdefs.hxx
+++ b/svtools/inc/fltdefs.hxx
@@ -34,7 +34,7 @@
#define _FLTDEFS_HXX
-#if defined ( WIN ) || defined ( WNT )
+#if defined ( WNT )
#define RGBQUAD RGBQUADWIN
@@ -53,21 +53,6 @@ typedef struct RGBQUAD
} RGBQUAD;
-#ifdef WIN
-typedef BYTE huge* PDIBBYTE;
-#define MEMCPY hmemcpy
-#define GLOBALALLOC(nSize) ((PDIBBYTE)GlobalLock(GlobalAlloc(GHND,(nSize))))
-#define GLOBALHANDLE(pPointer) ((HGLOBAL)GlobalHandle((*((size_t*)&(pPointer)+1))))
-#define GLOBALFREE(pPointer) (GlobalUnlock(GLOBALHANDLE((pPointer))))
-#define MEMSET( pDst, cByte, nCount ) \
-{ \
- PDIBBYTE pTmp = (PDIBBYTE) pDst; \
- for ( ULONG i = 0; i < nCount; i++ )\
- *pTmp++ = cByte; \
-}
-
-#else
-
typedef BYTE* PDIBBYTE;
#define MEMCPY memcpy
#define MEMSET memset
@@ -75,7 +60,6 @@ typedef BYTE* PDIBBYTE;
#define GLOBALFREE(pPointer) (GlobalFree((HGLOBAL)pPointer))
#define GLOBALHANDLE(pPointer) ((HGLOBAL)(pPointer))
-#endif
#else
typedef BYTE* PDIBBYTE;
diff --git a/svtools/inc/rtfout.hxx b/svtools/inc/rtfout.hxx
index 12a125635132..b9bfbc901848 100644
--- a/svtools/inc/rtfout.hxx
+++ b/svtools/inc/rtfout.hxx
@@ -41,7 +41,7 @@ class SvStream;
class SVT_DLLPUBLIC RTFOutFuncs
{
public:
-#if defined(MAC) || defined(UNX)
+#if defined(UNX)
static const sal_Char sNewLine; // nur \012 oder \015
#else
static const sal_Char __FAR_DATA sNewLine[]; // \015\012
diff --git a/svtools/inc/svtools/htmlout.hxx b/svtools/inc/svtools/htmlout.hxx
index 888286b231ee..1a21f1154602 100644
--- a/svtools/inc/svtools/htmlout.hxx
+++ b/svtools/inc/svtools/htmlout.hxx
@@ -60,7 +60,7 @@ struct SVT_DLLPUBLIC HTMLOutContext
struct HTMLOutFuncs
{
-#if defined(MAC) || defined(UNX)
+#if defined(UNX)
static const sal_Char sNewLine; // nur \012 oder \015
#else
static const sal_Char __FAR_DATA sNewLine[]; // \015\012
diff --git a/svtools/inc/svtools/svtdata.hxx b/svtools/inc/svtools/svtdata.hxx
index 9faadaff7305..1501afbb6157 100644
--- a/svtools/inc/svtools/svtdata.hxx
+++ b/svtools/inc/svtools/svtdata.hxx
@@ -40,11 +40,10 @@ class ImpSvtData
public:
SfxItemDesruptorList_Impl * pItemDesruptList;
ResMgr * pResMgr;
- ResMgr * pPatchResMgr;
private:
ImpSvtData():
- pItemDesruptList(0), pResMgr(0), pPatchResMgr(0)
+ pItemDesruptList(0), pResMgr(0)
{}
~ImpSvtData();
@@ -52,25 +51,12 @@ private:
public:
ResMgr * GetResMgr(const ::com::sun::star::lang::Locale aLocale);
ResMgr * GetResMgr(); // VCL dependant, only available in SVT, not in SVL!
- ResMgr * GetPatchResMgr();
- ResMgr * GetPatchResMgr(const ::com::sun::star::lang::Locale& aLocale);
static ImpSvtData & GetSvtData();
};
//============================================================================
-class SvpResId: public ResId
-{
-public:
- SvpResId( USHORT nId, const ::com::sun::star::lang::Locale aLocale ):
- ResId( nId, *ImpSvtData::GetSvtData().GetResMgr( aLocale ) ) {}
-
- // VCL dependant, only available in SVT, not in SVL!
- SvpResId( USHORT nId );
-};
-
-
class SvtResId: public ResId
{
public:
diff --git a/svtools/inc/svtools/svxbox.hxx b/svtools/inc/svtools/svxbox.hxx
index 25deba4d091c..a4a920e692be 100644
--- a/svtools/inc/svtools/svxbox.hxx
+++ b/svtools/inc/svtools/svxbox.hxx
@@ -129,11 +129,7 @@ enum SvxComboBoxStyle
SVX_CBS_LOWER = 0x02,
SVX_CBS_ALL = 0x04,
SVX_CBS_FILENAME = 0x08,
-#ifdef WIN
- SVX_CBS_SW_FILENAME = SVX_CBS_FILENAME | SVX_CBS_LOWER
-#else
SVX_CBS_SW_FILENAME = SVX_CBS_FILENAME
-#endif
};
// class SvxComboBox -----------------------------------------------------
diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx
index 70d9d1623ef2..e33251050b81 100644
--- a/svtools/source/config/menuoptions.cxx
+++ b/svtools/source/config/menuoptions.cxx
@@ -314,8 +314,16 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames )
// We need values from ALL notified configuration keys.
DBG_ASSERT( !(seqPropertyNames.getLength()!=seqValues.getLength()), "SvtMenuOptions_Impl::Notify()\nI miss some values of configuration keys!\n" );
- sal_Bool bMenuIcons = true;
- sal_Bool bSystemMenuIcons = true;
+ sal_Bool bMenuSettingsChanged = sal_False;
+ sal_Bool bMenuIcons = sal_True;
+ sal_Bool bSystemMenuIcons = sal_True;
+ if (m_nMenuIcons == 2)
+ bMenuIcons = (sal_Bool)(Application::GetSettings().GetStyleSettings().GetUseImagesInMenus());
+ else
+ {
+ bSystemMenuIcons = sal_False;
+ bMenuIcons = m_nMenuIcons ? sal_True : sal_False;
+ }
// Step over list of property names and get right value from coreesponding value list to set it on internal members!
sal_Int32 nCount = seqPropertyNames.getLength();
@@ -334,12 +342,12 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames )
else if( seqPropertyNames[nProperty] == PROPERTYNAME_SHOWICONSINMENUES )
{
DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\ShowIconsInMenues\"?" );
- seqValues[nProperty] >>= bMenuIcons;
+ bMenuSettingsChanged = seqValues[nProperty] >>= bMenuIcons;
}
else if( seqPropertyNames[nProperty] == PROPERTYNAME_SYSTEMICONSINMENUES )
{
DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\IsSystemIconsInMenus\"?" );
- seqValues[nProperty] >>= bSystemMenuIcons;
+ bMenuSettingsChanged = seqValues[nProperty] >>= bSystemMenuIcons;
}
#if OSL_DEBUG_LEVEL > 1
@@ -347,7 +355,8 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames )
#endif
}
- m_nMenuIcons = bSystemMenuIcons ? 2 : bMenuIcons;
+ if ( bMenuSettingsChanged )
+ m_nMenuIcons = bSystemMenuIcons ? 2 : bMenuIcons;
for ( USHORT n=0; n<aList.Count(); n++ )
aList.GetObject(n)->Call( this );
@@ -377,11 +386,13 @@ void SvtMenuOptions_Impl::Commit()
break;
//Output cache of current setting as possibly modified by System Theme for older version
case PROPERTYHANDLE_SHOWICONSINMENUES : {
- seqValues[nProperty] <<=(sal_Bool)(Application::GetSettings().GetStyleSettings().GetUseImagesInMenus());
+ sal_Bool bValue = (sal_Bool)(Application::GetSettings().GetStyleSettings().GetUseImagesInMenus());
+ seqValues[nProperty] <<= bValue;
}
break;
case PROPERTYHANDLE_SYSTEMICONSINMENUES : {
- seqValues[nProperty] <<= (m_nMenuIcons == 2 ? sal_True : sal_False) ;
+ sal_Bool bValue = (m_nMenuIcons == 2 ? sal_True : sal_False) ;
+ seqValues[nProperty] <<= bValue;
}
break;
}
diff --git a/svtools/source/contnr/ctrdll.cxx b/svtools/source/contnr/ctrdll.cxx
deleted file mode 100644
index 463c6ccc8b35..000000000000
--- a/svtools/source/contnr/ctrdll.cxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svtools.hxx"
-
-#ifdef WIN
-#include <svwin.h>
-
-#ifndef _SYSDEP_HXX
-#include <sysdep.hxx>
-#endif
-
-// Statische DLL-Verwaltungs-Variablen
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-
-/***************************************************************************
-|*
-|* LibMain()
-|*
-|* Beschreibung Initialisierungsfunktion der DLL
-|* Ersterstellung TH 05.05.93
-|* Letzte Aenderung TH 05.05.93
-|*
-***************************************************************************/
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-/***************************************************************************
-|*
-|* WEP()
-|*
-|* Beschreibung DLL-Deinitialisierung
-|* Ersterstellung TH 05.05.93
-|* Letzte Aenderung TH 05.05.93
-|*
-***************************************************************************/
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/svtools/source/contnr/svicnvw.cxx b/svtools/source/contnr/svicnvw.cxx
index 20bcfe0fe33a..b16cd67d12a5 100644
--- a/svtools/source/contnr/svicnvw.cxx
+++ b/svtools/source/contnr/svicnvw.cxx
@@ -550,9 +550,6 @@ void SvIconView::EditItemText( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
aRect.Bottom() += 2; // sieht huebscher aus
-#ifdef WIN
- aRect.Bottom() += 4;
-#endif
#ifdef OS2
#if OS2_SINGLE_LINE_EDIT
diff --git a/svtools/source/contnr/svimpicn.cxx b/svtools/source/contnr/svimpicn.cxx
index 2d4c9cf2df0e..d1e471953663 100644
--- a/svtools/source/contnr/svimpicn.cxx
+++ b/svtools/source/contnr/svimpicn.cxx
@@ -1702,11 +1702,6 @@ void SvImpIconView::PositionScrollBars( long nRealWidth, long nRealHeight )
Point aPos( 0, nRealHeight );
aPos.Y() -= nHorSBarHeight;
-#ifdef WIN
- // vom linken und unteren Rand ein Pixel abschneiden
- aPos.Y()++;
- aPos.X()--;
-#endif
#ifdef OS2
aPos.Y()++;
#endif
@@ -1717,7 +1712,7 @@ void SvImpIconView::PositionScrollBars( long nRealWidth, long nRealHeight )
aPos.X() = nRealWidth; aPos.Y() = 0;
aPos.X() -= nVerSBarWidth;
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
aPos.X()++;
aPos.Y()--;
#endif
@@ -1809,7 +1804,7 @@ void SvImpIconView::AdjustScrollBars()
// size ver scrollbar
long nThumb = aVerSBar.GetThumbPos();
Size aSize( nVerSBarWidth, nRealHeight );
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
aSize.Height() += 2;
#endif
#ifdef OS2
@@ -1834,7 +1829,7 @@ void SvImpIconView::AdjustScrollBars()
nThumb = aHorSBar.GetThumbPos();
aSize.Width() = nRealWidth;
aSize.Height() = nHorSBarHeight;
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
aSize.Width()++;
#endif
#ifdef OS2
@@ -1842,7 +1837,7 @@ void SvImpIconView::AdjustScrollBars()
if( nResult & 0x0001 ) // vertikale Scrollbar ?
aSize.Width()--;
#endif
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
if( nResult & 0x0001 ) // vertikale Scrollbar ?
{
aSize.Width()++;
@@ -1868,7 +1863,7 @@ void SvImpIconView::AdjustScrollBars()
nRealWidth++;
#endif
aOutputSize.Width() = nRealWidth;
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
if( nResult & 0x0002 ) // hor scrollbar ?
nRealHeight++; // weil unterer Rand geclippt wird
#endif
diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx
index fb71f64772ad..a69253c69629 100644
--- a/svtools/source/contnr/svlbox.cxx
+++ b/svtools/source/contnr/svlbox.cxx
@@ -1518,6 +1518,13 @@ void SvLBox::MakeVisible( SvLBoxEntry* )
void SvLBox::Command( const CommandEvent& i_rCommandEvent )
{
DBG_CHKTHIS(SvLBox,0);
+
+ if ( COMMAND_STARTDRAG == i_rCommandEvent.GetCommand() )
+ {
+ Point aEventPos( i_rCommandEvent.GetMousePosPixel() );
+ MouseEvent aMouseEvt( aEventPos, 1, MOUSE_SELECT, MOUSE_LEFT );
+ MouseButtonUp( aMouseEvt );
+ }
Control::Command( i_rCommandEvent );
}
@@ -1775,6 +1782,10 @@ void SvLBox::StartDrag( sal_Int8, const Point& rPosPixel )
{
DBG_CHKTHIS(SvLBox,0);
+ Point aEventPos( rPosPixel );
+ MouseEvent aMouseEvt( aEventPos, 1, MOUSE_SELECT, MOUSE_LEFT );
+ MouseButtonUp( aMouseEvt );
+
nOldDragMode = GetDragDropMode();
if ( !nOldDragMode )
return;
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index 3395dffc28f5..1b96f1ac89e4 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -139,16 +139,6 @@ void SvTreeEntryList::DestroyAll()
}
-
-
-#if defined (WIN) && defined (MSC)
-// siehe BugId 42896: Die Funktionen Prev, PrevVisible, Next, NextVisible
-// (andere?) funktionieren nicht mit Optimierung.
-#pragma optimize ("", off)
-#endif
-
-
-
/*************************************************************************
|*
|* SvTreeList::
diff --git a/svtools/source/control/ctrldll.cxx b/svtools/source/control/ctrldll.cxx
deleted file mode 100644
index 2f3ff037be31..000000000000
--- a/svtools/source/control/ctrldll.cxx
+++ /dev/null
@@ -1,78 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svtools.hxx"
-
-#ifdef WIN
-#include <svwin.h>
-
-#ifndef _SYSDEP_HXX
-#include <sysdep.hxx>
-#endif
-
-// Statische DLL-Verwaltungs-Variablen
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-/***************************************************************************
-|*
-|* LibMain()
-|*
-|* Beschreibung Initialisierungsfunktion der DLL
-|* Ersterstellung TH 05.05.93
-|* Letzte Aenderung TH 05.05.93
-|*
-***************************************************************************/
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-/***************************************************************************
-|*
-|* WEP()
-|*
-|* Beschreibung DLL-Deinitialisierung
-|* Ersterstellung TH 05.05.93
-|* Letzte Aenderung TH 05.05.93
-|*
-***************************************************************************/
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx
index b0e77d658931..798ff87e02ac 100644
--- a/svtools/source/dialogs/filedlg2.cxx
+++ b/svtools/source/dialogs/filedlg2.cxx
@@ -347,7 +347,7 @@ IMPL_LINK( ImpPathDialog, ClickHdl, Button*, pBtn )
if ( pBtn == pHomeBtn )
{
::rtl::OUString aHomeDir;
- NAMESPACE_VOS( OSecurity ) aSecurity;
+ vos:: OSecurity aSecurity;
if ( aSecurity.getHomeDir( aHomeDir ) )
{
DirEntry aFile ( aHomeDir );
diff --git a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
index 038930ef80ee..8ca6ba2b124e 100644
--- a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
+++ b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
@@ -49,7 +49,7 @@
#include <unotools/syslocale.hxx>
#include "vcl/svapp.hxx"
-#if defined WIN || (defined OS2 && !defined ICC)
+#if (defined OS2 && !defined ICC)
#define EXPDLG_FUNCTION_NAME "_DoExportDialog"
#else
#define EXPDLG_FUNCTION_NAME "DoExportDialog"
diff --git a/svtools/source/filter.vcl/filter/filter.cxx b/svtools/source/filter.vcl/filter/filter.cxx
index c8a79d3a35cd..db1f4c11cf94 100644
--- a/svtools/source/filter.vcl/filter/filter.cxx
+++ b/svtools/source/filter.vcl/filter/filter.cxx
@@ -79,7 +79,7 @@
#define PMGCHUNG_msOG 0x6d734f47 // Microsoft Office Animated GIF
-#if defined WIN || (defined OS2 && !defined ICC)
+#if (defined OS2 && !defined ICC)
#define IMPORT_FUNCTION_NAME "_GraphicImport"
#define EXPORT_FUNCTION_NAME "_GraphicExport"
diff --git a/svtools/source/filter.vcl/filter/filter2.cxx b/svtools/source/filter.vcl/filter/filter2.cxx
index de2bef64ba6e..6abab2626516 100644
--- a/svtools/source/filter.vcl/filter/filter2.cxx
+++ b/svtools/source/filter.vcl/filter/filter2.cxx
@@ -1201,7 +1201,7 @@ BOOL GraphicDescriptor::ImpDetectPCT( SvStream& rStm, BOOL )
nFormat = GFF_PCT;
else
{
- BYTE sBuf[4];
+ BYTE sBuf[3]={0};
rStm.Seek( nStmPos + 522 );
rStm.Read( sBuf, 3 );
diff --git a/svtools/source/filter.vcl/filter/fldll.cxx b/svtools/source/filter.vcl/filter/fldll.cxx
deleted file mode 100644
index b44e08835f34..000000000000
--- a/svtools/source/filter.vcl/filter/fldll.cxx
+++ /dev/null
@@ -1,76 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svtools.hxx"
-
-#ifdef WIN
-#include <svwin.h>
-
-// Statische DLL-Verwaltungs-Variablen
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-
-/***************************************************************************
-|*
-|* LibMain()
-|*
-|* Beschreibung Initialisierungsfunktion der DLL
-|* Ersterstellung TH 05.05.93
-|* Letzte Aenderung TH 05.05.93
-|*
-***************************************************************************/
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-/***************************************************************************
-|*
-|* WEP()
-|*
-|* Beschreibung DLL-Deinitialisierung
-|* Ersterstellung TH 05.05.93
-|* Letzte Aenderung TH 05.05.93
-|*
-***************************************************************************/
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
diff --git a/svtools/source/filter.vcl/filter/sgfbram.cxx b/svtools/source/filter.vcl/filter/sgfbram.cxx
index 43cf0fbbacd3..3d1a71f5a2db 100644
--- a/svtools/source/filter.vcl/filter/sgfbram.cxx
+++ b/svtools/source/filter.vcl/filter/sgfbram.cxx
@@ -37,10 +37,6 @@
#include "sgffilt.hxx"
#include "sgfbram.hxx"
-#if defined( WIN ) && defined( MSC )
-#pragma code_seg( "SVTOOLS_FILTER4", "SVTOOLS_CODE" )
-#endif
-
/*************************************************************************
|*
|* operator>>( SvStream&, SgfHeader& )
diff --git a/svtools/source/filter.vcl/filter/sgvmain.cxx b/svtools/source/filter.vcl/filter/sgvmain.cxx
index e175380244b3..293c6dab7964 100644
--- a/svtools/source/filter.vcl/filter/sgvmain.cxx
+++ b/svtools/source/filter.vcl/filter/sgvmain.cxx
@@ -110,20 +110,11 @@
//
////////////////////////////////////////////////////////////////////////////////////////////////////
-#if defined( WIN ) && defined( MSC )
-#pragma code_seg( "svtools", "AUTO_CODE" )
-#endif
-
////////////////////////////////////////////////////////////////////////////////////////////////////
// Fuer Fontuebersetzung ///////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
SgfFontLst* pSgfFonts = 0;
-#if defined( WIN ) && defined( MSC )
-#pragma code_seg( "SVTOOLS_FILTER3", "SVTOOLS_CODE" )
-static void AntiMscBug() {}
-#endif
-
////////////////////////////////////////////////////////////////////////////////////////////////////
// Fuer Kreisunterarten, Text und gedrehte Rechtecke ///////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1137,7 +1128,3 @@ for n:=0 to 63 do
end;
*/
-#if defined( WIN ) && defined( MSC )
-#pragma code_seg( "svtools", "AUTO_CODE" )
-#endif
-
diff --git a/svtools/source/filter.vcl/filter/sgvspln.cxx b/svtools/source/filter.vcl/filter/sgvspln.cxx
index 7a23e85f4dbe..d695e171a194 100644
--- a/svtools/source/filter.vcl/filter/sgvspln.cxx
+++ b/svtools/source/filter.vcl/filter/sgvspln.cxx
@@ -33,11 +33,6 @@
#include <tools/poly.hxx>
-#if defined( WIN ) && defined( MSC )
-#pragma code_seg( "SVTOOLS_FILTER2", "SVTOOLS_CODE" )
-#pragma optimize( "", off )
-#endif
-
#if defined( PM2 ) && defined( __BORLANDC__ )
#pragma option -Od
#endif
diff --git a/svtools/source/filter.vcl/filter/sgvtext.cxx b/svtools/source/filter.vcl/filter/sgvtext.cxx
index 4a0be80b55be..9a82cd486599 100644
--- a/svtools/source/filter.vcl/filter/sgvtext.cxx
+++ b/svtools/source/filter.vcl/filter/sgvtext.cxx
@@ -38,10 +38,6 @@
extern SgfFontLst* pSgfFonts;
-#if defined( WIN ) && defined( MSC )
-#pragma code_seg( "SVTOOLS_FILTER1", "SVTOOLS_CODE" )
-#endif
-
#ifndef abs
#define abs(x) ((x)<0 ? -(x) : (x))
#endif
@@ -621,7 +617,7 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr
switch (Atr.GetFont()) {
case 92500: case 92501: case 92504: case 92505:
{
-#if defined(WIN) || defined(WNT) || defined(PM2)
+#if defined(WNT) || defined(PM2)
FNam=String::CreateFromAscii( "Times New Roman" ); // CG Times ist unter Windows und OS/2 Times New Roman
#else
FNam=String::CreateFromAscii( "Times" ); // ansonsten ist das einfach Times
@@ -630,7 +626,7 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr
aFont.SetFamily(FAMILY_ROMAN);
} break;
case 94021: case 94022: case 94023: case 94024: {
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
FNam=String::CreateFromAscii( "Arial", 5 ); // Univers ist unter Windows Arial
#else
FNam=String::CreateFromAscii( "Helvetica" ); // und ansonsten Helvetica
@@ -639,7 +635,7 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr
StdBrei=47;
} break;
case 93950: case 93951: case 93952: case 93953: {
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
FNam=String::CreateFromAscii( "Courier New" ); // Der Vector-Courierfont unter Windows heisst Courier New
#else
FNam=String::CreateFromAscii( "Courier" ); // ansonsten ist und bleibt Courier immer Courier
diff --git a/svtools/source/filter.vcl/jpeg/jpeg.h b/svtools/source/filter.vcl/jpeg/jpeg.h
index deb06600474c..82a2f80a838c 100644
--- a/svtools/source/filter.vcl/jpeg/jpeg.h
+++ b/svtools/source/filter.vcl/jpeg/jpeg.h
@@ -51,11 +51,7 @@ struct JPEGCreateBitmapParam
typedef struct my_error_mgr* my_error_ptr;
typedef unsigned char BYTE;
-#ifdef WIN
-typedef unsigned char _huge* HPBYTE;
-#else
typedef unsigned char* HPBYTE;
-#endif
void* JPEGMalloc( size_t size );
void JPEGFree( void *ptr );
diff --git a/svtools/source/filter.vcl/wmf/winwmf.cxx b/svtools/source/filter.vcl/wmf/winwmf.cxx
index f7c4f51ce1e2..cea1ab490b04 100644
--- a/svtools/source/filter.vcl/wmf/winwmf.cxx
+++ b/svtools/source/filter.vcl/wmf/winwmf.cxx
@@ -1081,6 +1081,8 @@ void WMFReader::ReadWMF()
nEMFRec = 0;
nEMFSize = 0;
+ sal_Bool bEMFAvailable = sal_False;
+
pOut->SetMapMode( MM_ANISOTROPIC );
pOut->SetWinOrg( Point() );
pOut->SetWinExt( Size( 1, 1 ) );
@@ -1117,50 +1119,53 @@ void WMFReader::ReadWMF()
break;
}
- if( aBmpSaveList.Count() &&
- ( nFunction != W_META_STRETCHDIB ) &&
- ( nFunction != W_META_DIBBITBLT ) &&
- ( nFunction != W_META_DIBSTRETCHBLT ) )
- {
- pOut->ResolveBitmapActions( aBmpSaveList );
- }
- if ( !nSkipActions )
- ReadRecordParams( nFunction );
- else
- nSkipActions--;
-
- if( pEMFStream && nEMFRecCount == nEMFRec )
+ if ( !bEMFAvailable )
{
- GDIMetaFile aMeta;
- pEMFStream->Seek( 0 );
- EnhWMFReader* pEMFReader = new EnhWMFReader ( *pEMFStream, aMeta );
- BOOL bRead = pEMFReader->ReadEnhWMF();
- delete pEMFReader; // destroy first!!!
-
- if( bRead )
+ if( aBmpSaveList.Count() &&
+ ( nFunction != W_META_STRETCHDIB ) &&
+ ( nFunction != W_META_DIBBITBLT ) &&
+ ( nFunction != W_META_DIBSTRETCHBLT ) )
{
- pOut->AddFromGDIMetaFile( aMeta );
- pOut->SetrclFrame( Rectangle(0, 0, aMeta.GetPrefSize().Width(), aMeta.GetPrefSize().Height() ));
- // we have successfully read the embedded EMF data
- // no need to process WMF data further
- break;
+ pOut->ResolveBitmapActions( aBmpSaveList );
}
+ if ( !nSkipActions )
+ ReadRecordParams( nFunction );
else
+ nSkipActions--;
+
+ if( pEMFStream && nEMFRecCount == nEMFRec )
{
- // something went wrong
- // continue with WMF, don't try this again
- delete pEMFStream;
- pEMFStream = NULL;
- }
+ GDIMetaFile aMeta;
+ pEMFStream->Seek( 0 );
+ EnhWMFReader* pEMFReader = new EnhWMFReader ( *pEMFStream, aMeta );
+ bEMFAvailable = pEMFReader->ReadEnhWMF();
+ delete pEMFReader; // destroy first!!!
+ if( bEMFAvailable )
+ {
+ pOut->AddFromGDIMetaFile( aMeta );
+ pOut->SetrclFrame( Rectangle(0, 0, aMeta.GetPrefSize().Width(), aMeta.GetPrefSize().Height() ));
+
+ // the stream needs to be set to the wmf end position,
+ // otherwise the GfxLink that is created will be incorrect
+ // (leading to graphic loss after swapout/swapin).
+ // so we will proceed normally, but are ignoring further wmf
+ // records
+ }
+ else
+ {
+ // something went wrong
+ // continue with WMF, don't try this again
+ delete pEMFStream;
+ pEMFStream = NULL;
+ }
+ }
}
-
nPos += nRecSize * 2;
if ( nPos <= nEndPos )
pWMF->Seek( nPos );
else
pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR );
-
}
}
else
diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx
index ec34ed07f25d..dc01de750b06 100644
--- a/svtools/source/java/javainteractionhandler.cxx
+++ b/svtools/source/java/javainteractionhandler.cxx
@@ -147,24 +147,8 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
// No suitable JRE found
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
m_bJavaNotFound_Handled = true;
- //We first try to get the patch resource svp680xxx.res
- //If the resource is not found then svt680xxx.res is used
- ResId idWBX = SvtResId(WARNINGBOX_JAVANOTFOUND);
- SvpResId pidPatchWBX(WARNINGBOX_JAVANOTFOUND);
- pidPatchWBX.SetRT(RSC_WARNINGBOX);
- ResMgr *pMgrWB = pidPatchWBX.GetResMgr();
- if (pMgrWB && pMgrWB->IsAvailable(pidPatchWBX))
- idWBX = pidPatchWBX;
- WarningBox aWarningBox( NULL, idWBX);
-
- String aTitle;
- SvpResId pidString(STR_WARNING_JAVANOTFOUND);
- pidString.SetRT(RSC_STRING);
- ResMgr *pmgr = pidString.GetResMgr();
- if ( pmgr && pmgr->IsAvailable(pidString))
- aTitle = String(pidString);
- else
- aTitle = String( SvtResId( STR_WARNING_JAVANOTFOUND ));
+ WarningBox aWarningBox( NULL, SvtResId( WARNINGBOX_JAVANOTFOUND ) );
+ String aTitle( SvtResId( STR_WARNING_JAVANOTFOUND ) );
aWarningBox.SetText( aTitle );
nResult = aWarningBox.Execute();
@@ -182,24 +166,8 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
// javavendors.xml was updated and Java has not been configured yet
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
m_bInvalidSettings_Handled = true;
- //We first try to get the patch resource svp680xxx.res
- //If the resource is not found then svt680xxx.res is used
- ResId idWBX = SvtResId(WARNINGBOX_INVALIDJAVASETTINGS);
- SvpResId pidPatchWBX(WARNINGBOX_INVALIDJAVASETTINGS);
- pidPatchWBX.SetRT(RSC_WARNINGBOX);
- ResMgr *pMgrWB = pidPatchWBX.GetResMgr();
- if (pMgrWB && pMgrWB->IsAvailable(pidPatchWBX))
- idWBX = pidPatchWBX;
- WarningBox aWarningBox( NULL, idWBX);
-
- String aTitle;
- SvpResId pidString(STR_WARNING_INVALIDJAVASETTINGS);
- pidString.SetRT(RSC_STRING);
- ResMgr *pmgr = pidString.GetResMgr();
- if ( pmgr && pmgr->IsAvailable(pidString))
- aTitle = String(pidString);
- else
- aTitle = String( SvtResId(STR_WARNING_INVALIDJAVASETTINGS));
+ WarningBox aWarningBox( NULL, SvtResId( WARNINGBOX_INVALIDJAVASETTINGS ) );
+ String aTitle( SvtResId(STR_WARNING_INVALIDJAVASETTINGS));
aWarningBox.SetText( aTitle );
nResult = aWarningBox.Execute();
@@ -216,27 +184,8 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
m_bJavaDisabled_Handled = true;
// Java disabled. Give user a chance to enable Java inside Office.
- //We first try to get the patch resource svp680xxx.res
- //If the resource is not found then svt680xxx.res is used
- ResId idQBX = SvtResId( QBX_JAVADISABLED );
- SvpResId pidPatchQBX(QBX_JAVADISABLED);
- pidPatchQBX.SetRT(RSC_QUERYBOX);
- ResMgr *pMgrQB = pidPatchQBX.GetResMgr();
-
- if (pMgrQB && pMgrQB->IsAvailable(pidPatchQBX))
- idQBX = pidPatchQBX;
-
- QueryBox aQueryBox(NULL, idQBX);
-
- String aTitle;
-
- SvpResId pidString(STR_QUESTION_JAVADISABLED);
- pidString.SetRT(RSC_STRING);
- ResMgr *pmgr = pidString.GetResMgr();
- if ( pmgr && pmgr->IsAvailable(pidString))
- aTitle = String(pidString);
- else
- aTitle = String( SvtResId( STR_QUESTION_JAVADISABLED ));
+ QueryBox aQueryBox( NULL, SvtResId( QBX_JAVADISABLED ) );
+ String aTitle( SvtResId( STR_QUESTION_JAVADISABLED ) );
aQueryBox.SetText( aTitle );
nResult = aQueryBox.Execute();
@@ -260,24 +209,8 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
// Java not correctly installed, or damaged
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
m_bVMCreationFailure_Handled = true;
- //We first try to get the patch resource svp680xxx.res
- //If the resource is not found then svt680xxx.res is used
- ResId idEBX = SvtResId(ERRORBOX_JVMCREATIONFAILED);
- SvpResId pidPatchEBX(ERRORBOX_JVMCREATIONFAILED);
- pidPatchEBX.SetRT(RSC_ERRORBOX);
- ResMgr *pMgrEB = pidPatchEBX.GetResMgr();
- if (pMgrEB && pMgrEB->IsAvailable(pidPatchEBX))
- idEBX = pidPatchEBX;
- ErrorBox aErrorBox( NULL, idEBX);
-
- String aTitle;
- SvpResId pidString(STR_ERROR_JVMCREATIONFAILED);
- pidString.SetRT(RSC_STRING);
- ResMgr *pmgr = pidString.GetResMgr();
- if ( pmgr && pmgr->IsAvailable(pidString))
- aTitle = String(pidString);
- else
- aTitle = String( SvtResId(STR_ERROR_JVMCREATIONFAILED));
+ ErrorBox aErrorBox( NULL, SvtResId( ERRORBOX_JVMCREATIONFAILED ) );
+ String aTitle( SvtResId( STR_ERROR_JVMCREATIONFAILED ) );
aErrorBox.SetText( aTitle );
nResult = aErrorBox.Execute();
@@ -295,24 +228,8 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
//before it can be used.
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
m_bRestartRequired_Handled = true;
- //We first try to get the patch resource svp680xxx.res
- //If the resource is not found then svt680xxx.res is used
- ResId idEBX = SvtResId(ERRORBOX_RESTARTREQUIRED);
- SvpResId pidPatchEBX(ERRORBOX_RESTARTREQUIRED);
- pidPatchEBX.SetRT(RSC_ERRORBOX);
- ResMgr *pMgrEB = pidPatchEBX.GetResMgr();
- if (pMgrEB && pMgrEB->IsAvailable(pidPatchEBX))
- idEBX = pidPatchEBX;
- ErrorBox aErrorBox(NULL, idEBX);
-
- String aTitle;
- SvpResId pidString(STR_ERROR_RESTARTREQUIRED);
- pidString.SetRT(RSC_STRING);
- ResMgr *pmgr = pidString.GetResMgr();
- if ( pmgr && pmgr->IsAvailable(pidString))
- aTitle = String(pidString);
- else
- aTitle = String( SvtResId(STR_ERROR_RESTARTREQUIRED));
+ ErrorBox aErrorBox(NULL, SvtResId( ERRORBOX_RESTARTREQUIRED ) );
+ String aTitle( SvtResId( STR_ERROR_RESTARTREQUIRED ) );
aErrorBox.SetText( aTitle );
nResult = aErrorBox.Execute();
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx
index bf9e87d33a74..8834f5497e5a 100644
--- a/svtools/source/misc/ehdl.cxx
+++ b/svtools/source/misc/ehdl.cxx
@@ -64,7 +64,7 @@ static USHORT aWndFunc(
{
- NAMESPACE_VOS( OGuard ) aGuard( Application::GetSolarMutex() );
+ vos:: OGuard aGuard( Application::GetSolarMutex() );
// aus den Flags die benoetigten WinBits ermitteln
WinBits eBits=0;
@@ -377,7 +377,7 @@ BOOL SfxErrorHandler::GetErrorString(
*/
{
- NAMESPACE_VOS( OGuard ) aGuard( Application::GetSolarMutex() );
+ vos:: OGuard aGuard( Application::GetSolarMutex() );
BOOL bRet = FALSE;
rStr=String(SvtResId(RID_ERRHDL_CLASS));
@@ -454,7 +454,7 @@ BOOL SfxErrorContext::GetString(ULONG nErrId, String &rStr)
}
if( pMgr )
{
- NAMESPACE_VOS( OGuard ) aGuard( Application::GetSolarMutex() );
+ vos:: OGuard aGuard( Application::GetSolarMutex() );
ResId aResId( nResId, *pMgr );
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index 25f23e2ef00b..4378e0acd234 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -57,10 +57,6 @@ UINT16 IMapObject::nActualTextEncoding = (UINT16) RTL_TEXTENCODING_DONTKNOW;
/******************************************************************************/
-#ifdef WIN
-#pragma optimize ( "", off )
-#endif
-
IMapObject::IMapObject()
: bActive( false )
, nReadVersion( 0 )
@@ -1224,9 +1220,3 @@ void ImageMap::Read( SvStream& rIStm, const String& rBaseURL )
rIStm.SetNumberFormatInt( nOldFormat );
}
-
-#ifdef WIN
-#pragma optimize ( "", on )
-#endif
-
-
diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx
index 9834fe0fcb76..587a31d4f098 100644
--- a/svtools/source/misc/imap2.cxx
+++ b/svtools/source/misc/imap2.cxx
@@ -28,9 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svtools.hxx"
-#ifdef WIN
-#include <sysdep.hxx>
-#endif
#include <string.h>
// #include <math.h>
#include <vcl/svapp.hxx>
@@ -48,9 +45,6 @@
#include <svtools/imapcirc.hxx>
#include <svtools/imappoly.hxx>
-#ifdef WIN
-#include <sysdep.hxx>
-#endif
#include <string.h>
#include <math.h>
diff --git a/svtools/source/misc/svtdata.cxx b/svtools/source/misc/svtdata.cxx
index 65715f635883..7a04b3276c9f 100644
--- a/svtools/source/misc/svtdata.cxx
+++ b/svtools/source/misc/svtdata.cxx
@@ -61,25 +61,6 @@ ResMgr * ImpSvtData::GetResMgr()
return GetResMgr(Application::GetSettings().GetUILocale());
}
-ResMgr * ImpSvtData::GetPatchResMgr(const ::com::sun::star::lang::Locale& aLocale)
-{
- if (!pPatchResMgr)
- {
- pPatchResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(svp), aLocale);
- }
- return pPatchResMgr;
-}
-
-ResMgr * ImpSvtData::GetPatchResMgr()
-{
- return GetPatchResMgr(Application::GetSettings().GetUILocale());
-}
-
-SvpResId::SvpResId( USHORT nId ) :
- ResId( nId, *ImpSvtData::GetSvtData().GetPatchResMgr() )
-{
-}
-
//============================================================================
// static
ImpSvtData & ImpSvtData::GetSvtData()
diff --git a/svx/inc/svdstr.hrc b/svx/inc/svdstr.hrc
index f1bc8cfdae19..d778bf40326b 100644
--- a/svx/inc/svdstr.hrc
+++ b/svx/inc/svdstr.hrc
@@ -756,6 +756,7 @@
//BFS01#define SIP_SDRATTRSET_GRAF (SIP_Begin + 258)
#define SIP_SA_MARKERS (SIP_Begin + 258)
+#define SIP_SA_PAGESHADOW35X35 (SIP_Begin + 259)
#define SIP_SA_FINE_MARKERS (SIP_Begin + 260)
// #100499#
diff --git a/svx/inc/svimbase.hxx b/svx/inc/svimbase.hxx
index 3d43e5fb9aac..ba10f76b01f9 100644
--- a/svx/inc/svimbase.hxx
+++ b/svx/inc/svimbase.hxx
@@ -36,11 +36,7 @@
// - Defines -
// -----------
-#ifdef WIN
-#define _SVHUGE huge
-#else
#define _SVHUGE
-#endif
// ----------------
// - SimDepthType -
diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc
index d193652b57fc..fd7561bb7192 100755..100644
--- a/svx/inc/svx/dialogs.hrc
+++ b/svx/inc/svx/dialogs.hrc
@@ -956,7 +956,9 @@
#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_6 (RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + 6)//?
#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_7 (RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + 7)//?
-#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1190)
+#define RID_SVXSTR_FINDBAR_FIND (RID_SVX_START + 1190)
+
+#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1191)
// ----------------------------------------------------------------------------
// if we have _a_lot_ time, we should group the resource ids by type, instead
diff --git a/svx/inc/svx/svdedtv.hxx b/svx/inc/svx/svdedtv.hxx
index 98e76bf28969..83429ae6c58e 100644
--- a/svx/inc/svx/svdedtv.hxx
+++ b/svx/inc/svx/svdedtv.hxx
@@ -208,7 +208,6 @@ public:
// verwendet. NotifyNewUndoAction() wird in diesem Fall erst beim letzten
// EndUndo() gerufen. NotifyNewUndoAction() wird nicht gerufen bei einer
// leeren Klammerung.
-#ifndef WIN
void BegUndo() { pMod->BegUndo(); } // Undo-Klammerung auf
void BegUndo(const String& rComment) { pMod->BegUndo(rComment); } // Undo-Klammerung auf
void BegUndo(const String& rComment, const String& rObjDescr, SdrRepeatFunc eFunc=SDRREPFUNC_OBJ_NONE) { pMod->BegUndo(rComment,rObjDescr,eFunc); } // Undo-Klammerung auf
@@ -218,17 +217,6 @@ public:
// nur nach dem 1. BegUndo oder vor dem letzten EndUndo:
void SetUndoComment(const String& rComment) { pMod->SetUndoComment(rComment); }
void SetUndoComment(const String& rComment, const String& rObjDescr) { pMod->SetUndoComment(rComment,rObjDescr); }
-#else // ifndef WIN
- void BegUndo();
- void BegUndo(const String& rComment);
- void BegUndo(const String& rComment, const String& rObjDescr, SdrRepeatFunc eFunc=SDRREPFUNC_OBJ_NONE);
- void BegUndo(SdrUndoGroup* pUndoGrp);
- void EndUndo(); // Undo-Klammerung zu (inkl BroadcastEdges)
- void AddUndo(SdrUndoAction* pUndo);
- // nur nach dem 1. BegUndo oder vor dem letzten EndUndo:
- void SetUndoComment(const String& rComment);
- void SetUndoComment(const String& rComment, const String& rObjDescr);
-#endif
bool IsUndoEnabled() const;
std::vector< SdrUndoAction* > CreateConnectorUndo( SdrObject& rO );
diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx
index 328efedd98f0..b1bb7d74887f 100644
--- a/svx/inc/svx/svdmodel.hxx
+++ b/svx/inc/svx/svdmodel.hxx
@@ -53,11 +53,11 @@ class OutputDevice;
#include <vos/ref.hxx>
-#if defined(UNX) || defined(WIN) || defined(WNT)
+#if defined(UNX) || defined(WNT)
#define DEGREE_CHAR ((sal_Unicode)176) /* 0xB0 = Ansi */
#endif
-#if defined(DOS) || defined(OS2)
+#if defined(OS2)
#define DEGREE_CHAR ((sal_Unicode)248) /* 0xF8 = IBM PC (Erw. ASCII) */
#endif
diff --git a/svx/inc/svx/xpoly.hxx b/svx/inc/svx/xpoly.hxx
index 409d957cae84..28b7e3dcdd3e 100644
--- a/svx/inc/svx/xpoly.hxx
+++ b/svx/inc/svx/xpoly.hxx
@@ -45,11 +45,7 @@ class OutputDevice;
#define XPOLYPOLY_APPEND 0xFFFF
#define XPOLY_APPEND 0xFFFF
-#ifdef WIN // Windows 16 Bit
-#define XPOLY_MAXPOINTS 8160 /* =0xFF00/sizeof(Point), also mit etwas Platz! */
-#else
#define XPOLY_MAXPOINTS 0xFFF0 /* Auch fuer die 32-Bitter etwas Luft lassen */
-#endif
/************************************************************************/
// Punktstile im XPolygon:
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index 036f700e6e96..0b06a74c280d 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -240,7 +240,7 @@ void E3dScene::SetDefaultAttributes(E3dDefaultAttributes& /*rDefault*/)
#endif
// Fuer WIN95/NT die FP-Exceptions abschalten
-#if defined(WNT) || defined(WIN)
+#if defined(WNT)
#define SC_FPEXCEPTIONS_ON() _control87( _MCW_EM, 0 )
#define SC_FPEXCEPTIONS_OFF() _control87( _MCW_EM, _MCW_EM )
SC_FPEXCEPTIONS_OFF();
diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
index b80b6fcbba88..ad65b647001e 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
@@ -44,6 +44,10 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <svx/sdr/primitive2d/sdrattributecreator.hxx>
#include <svx/sdr/primitive2d/sdrdecompositiontools.hxx>
+#include <vcl/lazydelete.hxx>
+#include "svdstr.hrc"
+#include "svdglob.hxx"
+#include <drawinglayer/primitive2d/discreteshadowprimitive2d.hxx>
#include <drawinglayer/attribute/sdrfillattribute.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -131,31 +135,54 @@ namespace sdr
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageShadow::createViewIndependentPrimitive2DSequence() const
{
+ static bool bUseOldPageShadow(false);
const SdrPage& rPage = getPage();
basegfx::B2DHomMatrix aPageMatrix;
aPageMatrix.set(0, 0, (double)rPage.GetWdt());
aPageMatrix.set(1, 1, (double)rPage.GetHgt());
- // create page shadow polygon
- const double fPageBorderFactor(1.0 / 256.0);
- basegfx::B2DPolygon aPageShadowPolygon;
- aPageShadowPolygon.append(basegfx::B2DPoint(1.0, fPageBorderFactor));
- aPageShadowPolygon.append(basegfx::B2DPoint(1.0 + fPageBorderFactor, fPageBorderFactor));
- aPageShadowPolygon.append(basegfx::B2DPoint(1.0 + fPageBorderFactor, 1.0 + fPageBorderFactor));
- aPageShadowPolygon.append(basegfx::B2DPoint(fPageBorderFactor, 1.0 + fPageBorderFactor));
- aPageShadowPolygon.append(basegfx::B2DPoint(fPageBorderFactor, 1.0));
- aPageShadowPolygon.append(basegfx::B2DPoint(1.0, 1.0));
- aPageShadowPolygon.setClosed(true);
- aPageShadowPolygon.transform(aPageMatrix);
-
- // We have only the page information, not the view information. Use the
- // svtools::FONTCOLOR color for initialisation
- const svtools::ColorConfig aColorConfig;
- const Color aShadowColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor);
- const basegfx::BColor aRGBShadowColor(aShadowColor.getBColor());
- const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aPageShadowPolygon), aRGBShadowColor));
+ if(bUseOldPageShadow)
+ {
+ // create page shadow polygon
+ const double fPageBorderFactor(1.0 / 256.0);
+ basegfx::B2DPolygon aPageShadowPolygon;
+ aPageShadowPolygon.append(basegfx::B2DPoint(1.0, fPageBorderFactor));
+ aPageShadowPolygon.append(basegfx::B2DPoint(1.0 + fPageBorderFactor, fPageBorderFactor));
+ aPageShadowPolygon.append(basegfx::B2DPoint(1.0 + fPageBorderFactor, 1.0 + fPageBorderFactor));
+ aPageShadowPolygon.append(basegfx::B2DPoint(fPageBorderFactor, 1.0 + fPageBorderFactor));
+ aPageShadowPolygon.append(basegfx::B2DPoint(fPageBorderFactor, 1.0));
+ aPageShadowPolygon.append(basegfx::B2DPoint(1.0, 1.0));
+ aPageShadowPolygon.setClosed(true);
+ aPageShadowPolygon.transform(aPageMatrix);
+
+ // We have only the page information, not the view information. Use the
+ // svtools::FONTCOLOR color for initialisation
+ const svtools::ColorConfig aColorConfig;
+ const Color aShadowColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor);
+ const basegfx::BColor aRGBShadowColor(aShadowColor.getBColor());
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
+ basegfx::B2DPolyPolygon(aPageShadowPolygon),
+ aRGBShadowColor));
+
+ return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ }
+ else
+ {
+ static vcl::DeleteOnDeinit<drawinglayer::primitive2d::DiscreteShadow>
+ aDiscreteShadow(new drawinglayer::primitive2d::DiscreteShadow(
+ BitmapEx(ResId(SIP_SA_PAGESHADOW35X35, *ImpGetResMgr()))));
+ if (aDiscreteShadow.get() != NULL)
+ {
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::DiscreteShadowPrimitive2D(
+ aPageMatrix,
+ *aDiscreteShadow.get()));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ }
+ return drawinglayer::primitive2d::Primitive2DSequence();
+ }
}
ViewContactOfPageShadow::ViewContactOfPageShadow(ViewContactOfSdrPage& rParentViewContactOfSdrPage)
@@ -313,11 +340,17 @@ namespace sdr
const SdrPage& rPage = getPage();
const basegfx::B2DRange aPageBorderRange(0.0, 0.0, (double)rPage.GetWdt(), (double)rPage.GetHgt());
- // We have only the page information, not the view information. Use the
- // svtools::FONTCOLOR color for initialisation
- const svtools::ColorConfig aColorConfig;
- const Color aBorderColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor);
- const basegfx::BColor aRGBBorderColor(aBorderColor.getBColor());
+ // Changed to 0x949599 for renaissance, before svtools::FONTCOLOR was used.
+ // Added old case as fallback for HighContrast.
+ basegfx::BColor aRGBBorderColor(0x94 / (double)0xff, 0x95 / (double)0xff, 0x99 / (double)0xff);
+
+ if(Application::GetSettings().GetStyleSettings().GetHighContrastMode())
+ {
+ const svtools::ColorConfig aColorConfig;
+ const Color aBorderColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor);
+
+ aRGBBorderColor = aBorderColor.getBColor();
+ }
if(rPage.getPageBorderOnlyLeftRight())
{
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx
index c751ba2ada76..f7145dcd9d73 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx
@@ -320,6 +320,12 @@ namespace sdr
return false;
}
+ // no page shadow for high contrast mode
+ if(GetObjectContact().isDrawModeHighContrast())
+ {
+ return false;
+ }
+
return true;
}
} // end of namespace contact
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 5eae04dbbc87..26966a543f1c 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -1039,46 +1039,6 @@ void SdrEditView::ReplaceObjectAtView(SdrObject* pOldObj, SdrPageView& rPV, SdrO
////////////////////////////////////////////////////////////////////////////////////////////////////
-#ifdef WIN
-void SdrEditView::BegUndo() // Undo-Klammerung auf
-{
- pMod->BegUndo();
-}
-
-void SdrEditView::BegUndo(const String& rComment) // Undo-Klammerung auf
-{
- pMod->BegUndo(rComment);
-}
-
-void SdrEditView::BegUndo(const String& rComment, const String& rObjDescr,
- SdrRepeatFunc eFunc) // Undo-Klammerung auf
-{
- pMod->BegUndo(rComment,rObjDescr,eFunc);
-}
-
-void SdrEditView::BegUndo(SdrUndoGroup* pUndoGrp) // Undo-Klammerung auf
-{
- pMod->BegUndo(pUndoGrp);
-}
-
-void SdrEditView::AddUndo(SdrUndoAction* pUndo) // Action hinzufuegen
-{
- pMod->AddUndo(pUndo);
-}
- // nur nach dem 1. BegUndo oder vor dem letzten EndUndo:
-void SdrEditView::SetUndoComment(const String& rComment)
-{
- pMod->SetUndoComment(rComment);
-}
-
-
-void SdrEditView::SetUndoComment(const String& rComment,
- const String& rObjDescr)
-{
- pMod->SetUndoComment(rComment,rObjDescr);
-}
-#endif
-
bool SdrEditView::IsUndoEnabled() const
{
return pMod->IsUndoEnabled();
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index fffcac00e46c..ee9e8f48634b 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1063,8 +1063,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
/** handle mouse over effects for handles */
BOOL SdrMarkView::MouseMove(const MouseEvent& rMEvt, Window* pWin)
{
- const ULONG nHdlCount = aHdl.GetHdlCount();
- if( nHdlCount )
+ if(aHdl.GetHdlCount())
{
SdrHdl* pMouseOverHdl = 0;
if( !rMEvt.IsLeaveWindow() && pWin )
@@ -1074,6 +1073,8 @@ BOOL SdrMarkView::MouseMove(const MouseEvent& rMEvt, Window* pWin)
}
// notify last mouse over handle that he lost the mouse
+ const ULONG nHdlCount = aHdl.GetHdlCount();
+
for(ULONG nHdl = 0; nHdl < nHdlCount; nHdl++ )
{
SdrHdl* pCurrentHdl = GetHdl(nHdl);
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index 4c600cba821f..31582d652dc4 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -171,10 +171,8 @@ FASTBOOL SdrCircObj::PaintNeedsXPolyCirc() const
// und wenn nicht WIN dann (erstmal) auch fuer Kreis-/Ellipsenausschnitte
// und Kreis-/Ellipsenboegen (wg. Genauigkeit)
FASTBOOL bNeed=aGeo.nDrehWink!=0 || aGeo.nShearWink!=0 || meCircleKind==OBJ_CCUT;
-#ifndef WIN
// Wenn nicht Win, dann fuer alle ausser Vollkreis (erstmal!!!)
if (meCircleKind!=OBJ_CIRC) bNeed=TRUE;
-#endif
const SfxItemSet& rSet = GetObjectItemSet();
if(!bNeed)
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index bad1401c2305..03e3dc31a94f 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -580,10 +580,6 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C
rOut.SetLineColor( aColor );
bool bMap0=rOut.IsMapModeEnabled();
-#ifdef WIN // SetPixel-Profiling fuer Windows
- COLORREF aWinColRef=PALETTERGB(aColor.GetRed()>>8,aColor.GetGreen()>>8,aColor.GetBlue()>>8);
- HDC aWinhDC=Sysdepen::GethDC(rOut);
-#endif
long nWrX=0;//aWriterPageOffset.X();
long nWrY=0;//aWriterPageOffset.Y();
diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src
index 1317a0e1328d..000e20cf24d4 100644
--- a/svx/source/svdraw/svdstr.src
+++ b/svx/source/svdraw/svdstr.src
@@ -2746,6 +2746,11 @@ String SIP_SA_GRAFRESERVE4 { Text = "" ; };
String SIP_SA_GRAFRESERVE5 { Text = "" ; };
String SIP_SA_GRAFRESERVE6 { Text = "" ; };
+Bitmap SIP_SA_PAGESHADOW35X35
+{
+ File = "pageshadow35x35.png";
+};
+
Bitmap SIP_SA_MARKERS
{
File = "markers.bmp";
diff --git a/svx/source/tbxctrls/makefile.mk b/svx/source/tbxctrls/makefile.mk
index 73a178d97594..a9ea745f3cc0 100644
--- a/svx/source/tbxctrls/makefile.mk
+++ b/svx/source/tbxctrls/makefile.mk
@@ -74,6 +74,7 @@ SRC1FILES = \
lboxctrl.src \
linectrl.src \
tbcontrl.src \
+ tbunosearchcontrollers.src \
tbxdraw.src \
grafctrl.src
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 5dcaf6fd5e72..e446d3d3b9d5 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -29,6 +29,8 @@
#include "precompiled_svx.hxx"
#include "tbunosearchcontrollers.hxx"
+#include <svx/dialogs.hrc>
+#include <svx/dialmgr.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
@@ -91,7 +93,7 @@ FindTextFieldControl::~FindTextFieldControl()
void FindTextFieldControl::InitControls_Impl()
{
- SetText( String( ::rtl::OUString::createFromAscii("Find") ) );
+ SetText( SVX_RESSTR( RID_SVXSTR_FINDBAR_FIND ) );
SetControlForeground(GetSettings().GetStyleSettings().GetDisableColor());
EnableAutocomplete(TRUE, TRUE);
@@ -174,7 +176,7 @@ long FindTextFieldControl::PreNotify( NotifyEvent& rNEvt )
case EVENT_LOSEFOCUS:
if ( GetText().Len() == 0 )
{
- SetText( String( ::rtl::OUString::createFromAscii("Find") ) );
+ SetText( SVX_RESSTR( RID_SVXSTR_FINDBAR_FIND ) );
SetControlForeground(GetSettings().GetStyleSettings().GetDisableColor());
m_bToClearTextField = sal_True;
}
diff --git a/transex3/java/jpropex/java/Main.java b/svx/source/tbxctrls/tbunosearchcontrollers.src
index 23dc477ddec3..9a256ae0cabb 100644
--- a/transex3/java/jpropex/java/Main.java
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.src
@@ -25,14 +25,9 @@
*
************************************************************************/
+#include <svx/dialogs.hrc>
-class Main
+String RID_SVXSTR_FINDBAR_FIND
{
-
- public static void main( String args[] )
- {
- JPropEx jpropex = new JPropEx( args );
- //jpropex.init();
- }
-}
-
+ Text [ en-US ] = "Find" ;
+};
diff --git a/svx/util/svxpch.cxx b/svx/util/svxpch.cxx
index a59ef4b90a74..b8f6b92b38db 100644
--- a/svx/util/svxpch.cxx
+++ b/svx/util/svxpch.cxx
@@ -29,7 +29,7 @@
#include "precompiled_svx.hxx"
#include <thread.hxx>
#include <sysdep.hxx>
-#if defined(WNT) || defined (WIN)
+#if defined(WNT)
#include <svwin.h>
#endif
#include <tlintl.hxx>
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 10befb703b96..1e26b0f0e2bd 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -79,6 +79,9 @@ class SwList;
#include "comphelper/implementationreference.hxx"
#include <com/sun/star/chart2/data/XDataProvider.hpp>
#include <com/sun/star/linguistic2/XProofreadingIterator.hpp>
+#ifdef FUTURE_VBA
+#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
+#endif
#include <hash_map>
#include <stringhash.hxx>
@@ -405,7 +408,9 @@ class SW_DLLPUBLIC SwDoc :
// table of forbidden characters of this document
vos::ORef<SvxForbiddenCharactersTable> xForbiddenCharsTable;
-
+#ifdef FUTURE_VBA
+ com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > mxVbaEvents;
+#endif
// --> OD 2007-10-26 #i83479#
public:
struct lessThanNodeNum
@@ -2128,7 +2133,9 @@ public:
{
return n32DummyCompatabilityOptions2;
}
-
+#ifdef FUTURE_VBA
+ com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > GetVbaEventProcessor();
+#endif
::sfx2::IXmlIdRegistry& GetXmlIdRegistry();
::sw::MetaFieldManager & GetMetaFieldManager();
SfxObjectShell* CreateCopy(bool bCallInitNew) const;
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index f1ae3e241b1b..5ca8cb83d234 100755
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -119,6 +119,9 @@
#include <osl/diagnose.h>
#include <osl/interlck.h>
+#ifdef FUTURE_VBA
+#include <vbahelper/vbaaccesshelper.hxx>
+#endif
/* @@@MAINTAINABILITY-HORROR@@@
Probably unwanted dependency on SwDocShell
@@ -1182,7 +1185,7 @@ static void lcl_FormatPostIt(
pIDCO->SplitNode( *aPam.GetPoint(), false );
aStr = pField->GetPar2();
-#if defined( WIN ) || defined( WNT ) || defined( PM2 )
+#if defined( WNT ) || defined( PM2 )
// Bei Windows und Co alle CR rausschmeissen
aStr.EraseAllChars( '\r' );
#endif
@@ -2721,6 +2724,27 @@ void SwDoc::ChkCondColls()
}
}
+#ifdef FUTURE_VBA
+uno::Reference< script::vba::XVBAEventProcessor >
+SwDoc::GetVbaEventProcessor()
+{
+ if( !mxVbaEvents.is() && pDocShell && ooo::vba::isAlienWordDoc( *pDocShell ) )
+ {
+ try
+ {
+ uno::Reference< frame::XModel > xModel( pDocShell->GetModel(), uno::UNO_SET_THROW );
+ uno::Sequence< uno::Any > aArgs(1);
+ aArgs[0] <<= xModel;
+ mxVbaEvents.set( ooo::vba::createVBAUnoAPIServiceWithArgs( pDocShell, "com.sun.star.script.vba.VBATextEventProcessor" , aArgs ), uno::UNO_QUERY_THROW );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+ return mxVbaEvents;
+}
+#endif
+
void SwDoc::setExternalData(::sw::tExternalDataType eType,
::sw::tExternalDataPointer pPayload)
{
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index d99293071048..c9ab4a591383 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1318,8 +1318,12 @@ void SwEditShell::MoveContinuationPosToEndOfCheckedSentence()
void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck)
{
+ // Note: rNewPortions.size() == 0 is valid and happens when the whole
+ // sentence got removed in the dialog
+
ASSERT( pSpellIter, "SpellIter missing" );
- if(pSpellIter)
+ if(pSpellIter &&
+ pSpellIter->GetLastPortions().size() > 0) // no portions -> no text to be changed
{
const SpellPortions& rLastPortions = pSpellIter->GetLastPortions();
const SpellContentPositions rLastPositions = pSpellIter->GetLastPositions();
@@ -1330,9 +1334,6 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
// iterate over the new portions, beginning at the end to take advantage of the previously
// saved content positions
- if(!rLastPortions.size())
- return;
-
pDoc->StartUndo( UNDO_OVERWRITE, NULL );
StartAction();
@@ -1344,6 +1345,10 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
sal_uInt32 nRedlinePortions = lcl_CountRedlines(rLastPortions);
if((rLastPortions.size() - nRedlinePortions) == rNewPortions.size())
{
+ DBG_ASSERT( rNewPortions.size() > 0, "rNewPortions should not be empty here" );
+ DBG_ASSERT( rLastPortions.size() > 0, "rLastPortions should not be empty here" );
+ DBG_ASSERT( rLastPositions.size() > 0, "rLastPositions should not be empty here" );
+
//the simple case: the same number of elements on both sides
//each changed element has to be applied to the corresponding source element
svx::SpellPortions::const_iterator aCurrentNewPortion = rNewPortions.end();
@@ -1357,8 +1362,17 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
//jump over redline portions
while(aCurrentOldPortion->bIsHidden)
{
- --aCurrentOldPortion;
- --aCurrentOldPosition;
+ if (aCurrentOldPortion != rLastPortions.begin() &&
+ aCurrentOldPosition != rLastPositions.begin())
+ {
+ --aCurrentOldPortion;
+ --aCurrentOldPosition;
+ }
+ else
+ {
+ DBG_ASSERT( 0, "ApplyChangedSentence: iterator positions broken" );
+ break;
+ }
}
if ( !pCrsr->HasMark() )
pCrsr->SetMark();
@@ -1398,6 +1412,8 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
}
else
{
+ DBG_ASSERT( rLastPositions.size() > 0, "rLastPositions should not be empty here" );
+
//select the complete sentence
SpellContentPositions::const_iterator aCurrentEndPosition = rLastPositions.end();
--aCurrentEndPosition;
diff --git a/sw/source/core/except/errhdl.cxx b/sw/source/core/except/errhdl.cxx
index 6a36186eb439..a0bae4d76cf1 100644
--- a/sw/source/core/except/errhdl.cxx
+++ b/sw/source/core/except/errhdl.cxx
@@ -31,21 +31,12 @@
#include "stdlib.h"
-#ifdef WIN
-#endif
#include <tools/debug.hxx>
#include <vcl/svapp.hxx>
#include <vcl/sound.hxx>
#include <errhdl.hxx>
#include <error.h> // fuer die defines von ERR_SW6MSG_ ...
-// break into CodeView
-#if defined(ZTC) && defined(WIN)
-#define CVBREAK asm( 0xCC );
-#endif
-#if defined(MSC) && defined(WIN)
-#define CVBREAK __asm int 3;
-#endif
#ifndef CVBREAK
#define CVBREAK
#endif
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index c47bd63e70ad..e35c27d0464b 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -58,9 +58,6 @@
#endif
#include <math.h>
-#ifdef MAC
-#include <stdlib.h>
-#endif
#include <float.h>
using namespace ::com::sun::star;
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 4133433702a3..17e4b1ed4873 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -30,10 +30,6 @@
#include <com/sun/star/embed/EmbedMisc.hpp>
#include "hintids.hxx"
-#ifdef WIN
-#define _FESHVIEW_ONLY_INLINE_NEEDED
-#endif
-
#include <svx/sdrobjectfilter.hxx>
#include <svx/svditer.hxx>
#include <svx/svdobj.hxx>
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index 8a1e8fe9ea7a..e52fc31fb0b5 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -650,9 +650,11 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b
{
const SwRect& rBoundRect = bExtend ? maPageRects[ nPageIdx++ ] : pPage->Frm();
- if ( !pSize && rBoundRect.IsInside( rPt ) ||
- pSize && rBoundRect.IsOver( aRect ) )
+ if ( (!pSize && rBoundRect.IsInside(rPt)) ||
+ (pSize && rBoundRect.IsOver(aRect)) )
+ {
pRet = static_cast<const SwPageFrm*>(pPage);
+ }
pPage = pPage->GetNext();
}
@@ -1719,8 +1721,8 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren
else
{
if ( pMasterTable == pTableFrm ||
- ( bStart && pMasterTable->IsAnFollow( pTableFrm ) ||
- !bStart && pTableFrm->IsAnFollow( pMasterTable ) ) )
+ ( (bStart && pMasterTable->IsAnFollow(pTableFrm)) ||
+ (!bStart && pTableFrm->IsAnFollow(pMasterTable)) ) )
{
pRet = pMasterCell;
break;
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index b51b2efc0a51..aec3fde909f1 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1073,23 +1073,33 @@ BOOL SwLayAction::TurboAction()
|* Letzte Aenderung MA 18. Jul. 96
|*
|*************************************************************************/
-const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom )
+static bool lcl_IsInvaLay( const SwFrm *pFrm, long nBottom )
+{
+ if (
+ !pFrm->IsValid() ||
+ (pFrm->IsCompletePaint() && pFrm->Frm().Top() < nBottom)
+ )
+ {
+ return true;
+ }
+ return false;
+}
+
+static const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom )
{
ASSERT( pFrm->IsLayoutFrm(), "FindFirstInvaLay, no LayFrm" );
- if ( !pFrm->IsValid() || pFrm->IsCompletePaint() &&
- pFrm->Frm().Top() < nBottom )
+ if (lcl_IsInvaLay(pFrm, nBottom))
return pFrm;
pFrm = ((SwLayoutFrm*)pFrm)->Lower();
while ( pFrm )
{
if ( pFrm->IsLayoutFrm() )
{
- if ( !pFrm->IsValid() || pFrm->IsCompletePaint() &&
- pFrm->Frm().Top() < nBottom )
+ if (lcl_IsInvaLay(pFrm, nBottom))
return pFrm;
const SwFrm *pTmp;
- if ( 0 != (pTmp = ::lcl_FindFirstInvaLay( pFrm, nBottom )) )
+ if ( 0 != (pTmp = lcl_FindFirstInvaLay( pFrm, nBottom )) )
return pTmp;
}
pFrm = pFrm->GetNext();
@@ -1097,7 +1107,7 @@ const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom )
return 0;
}
-const SwFrm *lcl_FindFirstInvaCntnt( const SwLayoutFrm *pLay, long nBottom,
+static const SwFrm *lcl_FindFirstInvaCntnt( const SwLayoutFrm *pLay, long nBottom,
const SwCntntFrm *pFirst )
{
const SwCntntFrm *pCnt = pFirst ? pFirst->GetNextCntntFrm() :
@@ -1144,7 +1154,7 @@ const SwFrm *lcl_FindFirstInvaCntnt( const SwLayoutFrm *pLay, long nBottom,
}
// --> OD 2005-02-21 #i37877# - consider drawing objects
-const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage,
+static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage,
long _nBottom )
{
ASSERT( _pPage->GetSortedObjs(), "FindFirstInvaObj, no Objs" )
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index b45f1bcb2ceb..01f09f2c41c3 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -2358,9 +2358,9 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
static const long nOuterClickDiff = 1000000;
// adjust borders for these special cases:
- if ( bFirstColumn && !bRTL || bLastColumn && bRTL )
+ if ( (bFirstColumn && !bRTL) || (bLastColumn && bRTL) )
aPageRectWithBorders.SubLeft( nOuterClickDiff );
- if ( bLastColumn && !bRTL || bFirstColumn && bRTL )
+ if ( (bLastColumn && !bRTL) || (bFirstColumn && bRTL) )
aPageRectWithBorders.AddRight( nOuterClickDiff );
if ( bFirstRow )
aPageRectWithBorders.SubTop( nOuterClickDiff );
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index be9c84cc88af..f70caa7ea710 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -81,8 +81,8 @@ void ValidateTxt( SwFrm *pFrm ) // Freund vom Frame
{
if ( ( ! pFrm->IsVertical() &&
pFrm->Frm().Width() == pFrm->GetUpper()->Prt().Width() ) ||
- pFrm->IsVertical() &&
- pFrm->Frm().Height() == pFrm->GetUpper()->Prt().Height() )
+ ( pFrm->IsVertical() &&
+ pFrm->Frm().Height() == pFrm->GetUpper()->Prt().Height() ) )
pFrm->bValidSize = sal_True;
/*
pFrm->bValidPrtArea = sal_True;
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 60b476839705..36eaed83795c 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -916,12 +916,20 @@ USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd )
while( nStop < nEnd && nStop < nNextChg )
{
cChar = m_Text.GetChar( nStop );
- if( CH_TAB == cChar || CH_BREAK == cChar ||
- CHAR_HARDBLANK == cChar || CHAR_HARDHYPHEN == cChar ||
+ if (
+ CH_TAB == cChar ||
+ CH_BREAK == cChar ||
+ CHAR_HARDBLANK == cChar ||
+ CHAR_HARDHYPHEN == cChar ||
CHAR_SOFTHYPHEN == cChar ||
- ( CH_TXTATR_BREAKWORD == cChar || CH_TXTATR_INWORD == cChar ) &&
- ( 0 == ( pHint = aIter.GetAttr( nStop ) ) ) )
+ (
+ (CH_TXTATR_BREAKWORD == cChar || CH_TXTATR_INWORD == cChar) &&
+ (0 == (pHint = aIter.GetAttr(nStop)))
+ )
+ )
+ {
break;
+ }
else
++nStop;
}
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 0ae80fb5306f..8ce4f6523ba0 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1593,8 +1593,8 @@ xub_StrLen SwTxtFormatter::FormatLine( const xub_StrLen nStartPos )
}
else
{
- bBuild = ( GetInfo().GetTxtFly()->IsOn() && ChkFlyUnderflow( GetInfo() )
- || GetInfo().CheckFtnPortion( pCurr ) );
+ bBuild = ( GetInfo().GetTxtFly()->IsOn() && ChkFlyUnderflow(GetInfo()) )
+ || GetInfo().CheckFtnPortion(pCurr);
if( bBuild )
{
GetInfo().SetNumDone( bOldNumDone );
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 2bd7a46ac09f..50dbe9fdc451 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -495,7 +495,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
if( ( nDiff > 0 &&
( GetEnd() < GetInfo().GetTxt().Len() ||
( nDiff > nTmpHeight/2 && GetPrevLine() ) ) ) ||
- nDiff >= 0 && bNextUndersized )
+ (nDiff >= 0 && bNextUndersized) )
{
SwArrowPortion aArrow( GetInfo() );
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index db245de1e28b..df915fc7192b 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -2027,10 +2027,10 @@ sal_Bool SwTxtFly::ForEach( const SwRect &rRect, SwRect* pRect, sal_Bool bAvoid
// <--
if( aFly.IsEmpty() || !aFly.IsOver( rRect ) )
continue;
- if( !bRet ||
+ if( !bRet || (
( !pCurrFrm->IsRightToLeft() &&
( (aFly.*fnRect->fnGetLeft)() <
- (pRect->*fnRect->fnGetLeft)() ) ||
+ (pRect->*fnRect->fnGetLeft)() ) ) ||
( pCurrFrm->IsRightToLeft() &&
( (aFly.*fnRect->fnGetRight)() >
(pRect->*fnRect->fnGetRight)() ) ) ) )
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index ff79d2266ba7..77b969433ed7 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -538,7 +538,7 @@ void SwFntObj::CreateScrFont( const ViewShell& rSh, const OutputDevice& rOut )
void SwFntObj::GuessLeading( const ViewShell&
-#if defined(WNT) || defined(WIN) || defined(PM2)
+#if defined(WNT) || defined(PM2)
rSh
#endif
, const FontMetric& rMet )
@@ -551,7 +551,7 @@ void SwFntObj::GuessLeading( const ViewShell&
return;
}
-#if defined(WNT) || defined(WIN) || defined(PM2)
+#if defined(WNT) || defined(PM2)
OutputDevice *pWin = rSh.GetWin() ?
rSh.GetWin() :
GetpApp()->GetDefaultDevice();
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 49e111e9053f..02c21242a220 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -77,11 +77,11 @@
#include <txtfrm.hxx> // SwTxtFrm
#include <scriptinfo.hxx>
-#if defined(WIN) || defined(WNT) || defined(PM2)
+#if defined(WNT) || defined(PM2)
#define FNT_LEADING_HACK
#endif
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
#define FNT_ATM_HACK
#endif
diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx
index 5d8b0a19a4d2..92537c7b213b 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -69,7 +69,7 @@ SwASCWriter::SwASCWriter( const String& rFltNm )
break;
case 'A':
-#if !defined(WIN) && !defined(WNT)
+#if !defined(WNT)
aNewOpts.SetCharSet( RTL_TEXTENCODING_MS_1252 );
aNewOpts.SetParaFlags( LINEEND_CRLF );
#endif
diff --git a/sw/source/filter/ww8/dump/ww8struc.hxx b/sw/source/filter/ww8/dump/ww8struc.hxx
index e43d5354037a..aa566098fd6e 100644
--- a/sw/source/filter/ww8/dump/ww8struc.hxx
+++ b/sw/source/filter/ww8/dump/ww8struc.hxx
@@ -62,7 +62,7 @@ inline void Set_UInt32( BYTE *& p, UINT32 n )
#if defined OSL_BIGENDIAN || SAL_TYPES_ALIGNMENT4 > 2 || defined UNX
#define __WW8_NEEDS_COPY
#else
-#if defined WNT || defined WIN || defined OS2
+#if defined WNT || defined OS2
#define __WW8_NEEDS_PACK
#pragma pack(2)
#endif
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 952ab3f2767f..e22ca1c9b731 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3804,9 +3804,11 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
void MSWordExportBase::OutputStartNode( const SwStartNode & rNode)
{
+#if 0
#ifdef DEBUG
::std::clog << "<OutWW8_SwStartNode>" << dbg_out(&rNode) << ::std::endl;
#endif
+#endif
ww8::WW8TableNodeInfo::Pointer_t pNodeInfo =
mpTableInfo->getTableNodeInfo( &rNode );
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index ba932c33c479..24f36b047a4e 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1857,7 +1857,7 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
bool wwSectionManager::SectionIsProtected(const wwSection &rSection) const
{
- return (!rSection.IsNotProtected());
+ return (mrReader.pWwFib->fReadOnlyRecommended && !rSection.IsNotProtected());
}
void wwSectionManager::SetHdFt(wwSection &rSection, int nSect,
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 025cf0f588f4..c87035f208a1 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1164,6 +1164,7 @@ private:
bool GetFontParams(USHORT, FontFamily&, String&, FontPitch&,
rtl_TextEncoding&);
bool SetNewFontAttr(USHORT nFCode, bool bSetEnums, USHORT nWhich);
+ USHORT CorrectResIdForCharset(CharSet nCharSet, USHORT nWhich);
void ResetCharSetVars();
void ResetCJKCharSetVars();
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 1588944e179b..b298f3721b00 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -3551,6 +3551,23 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
return true;
}
+USHORT SwWW8ImplReader::CorrectResIdForCharset(CharSet nCharSet, USHORT nWhich)
+{
+ USHORT nResult = 0;
+
+ switch (nCharSet) {
+ case RTL_TEXTENCODING_MS_932:
+ nResult = RES_CHRATR_CJK_FONT;
+ break;
+
+ default:
+ nResult = nWhich;
+ break;
+ }
+
+ return nResult;
+}
+
bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums,
USHORT nWhich)
{
@@ -3600,6 +3617,8 @@ bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums,
SvxFontItem aFont( eFamily, aName, aEmptyStr, ePitch, eDstCharSet, nWhich);
+ nWhich = CorrectResIdForCharset(eSrcCharSet, nWhich);
+
if( bSetEnums )
{
if( pAktColl ) // StyleDef
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 9cb3caffa7cc..c84a0eb2d035 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -119,7 +119,10 @@
#include <com/sun/star/ui/dialogs/ListboxControlActions.hpp>
#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
-
+#ifdef FUTURE_VBA
+#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
+#include <com/sun/star/script/vba/VBAEventId.hpp>
+#endif
#include <editeng/acorrcfg.hxx>
#include <SwStyleNameMapper.hxx>
@@ -137,7 +140,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
using ::rtl::OUString;
using namespace ::sfx2;
-
extern BOOL FindPhyStyle( SwDoc& , const String& , SfxStyleFamily );
/*--------------------------------------------------------------------
@@ -188,6 +190,26 @@ void SwDocShell::DoFlushDocInfo()
}
}
+#ifdef FUTURE_VBA
+void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVBAEventProcessor >& xVbaEvents, const SfxHint& rHint )
+{
+ using namespace com::sun::star::script::vba::VBAEventId;
+ if ( rHint.ISA( SfxEventHint ) )
+ {
+ uno::Sequence< uno::Any > aArgs;
+ ULONG nEventId = ((SfxEventHint&)rHint).GetEventId();
+ switch( nEventId )
+ {
+ case SFX_EVENT_CREATEDOC:
+ xVbaEvents->processVbaEvent( DOCUMENT_NEW, aArgs );
+ break;
+ case SFX_EVENT_OPENDOC:
+ xVbaEvents->processVbaEvent( DOCUMENT_OPEN, aArgs );
+ break;
+ }
+ }
+}
+#endif
/*--------------------------------------------------------------------
Beschreibung: Benachrichtigung bei geaenderter DocInfo
@@ -202,6 +224,12 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
return ;
}
+#ifdef FUTURE_VBA
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor();
+ if( xVbaEvents.is() )
+ lcl_processCompatibleSfxHint( xVbaEvents, rHint );
+#endif
+
USHORT nAction = 0;
if( rHint.ISA(SfxSimpleHint) )
{
@@ -283,6 +311,18 @@ USHORT SwDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
if( TRUE == nRet ) //Unbedingt auf TRUE abfragen! (RET_NEWTASK)
EndListening( *this );
+#ifdef FUTURE_VBA
+ if( pDoc && IsInPrepareClose() )
+ {
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor();
+ if( xVbaEvents.is() )
+ {
+ using namespace com::sun::star::script::vba::VBAEventId;
+ uno::Sequence< uno::Any > aArgs;
+ xVbaEvents->processVbaEvent( DOCUMENT_CLOSE, aArgs );
+ }
+ }
+#endif
return nRet;
}
diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx
index f793a7f854b7..c93409441be9 100644
--- a/sw/source/ui/docvw/romenu.cxx
+++ b/sw/source/ui/docvw/romenu.cxx
@@ -238,9 +238,13 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
EnableItem( MN_READONLY_COPY, FALSE );
eState = pVFrame->GetBindings().QueryState( SID_EDITDOC, pState );
- if(eState < SFX_ITEM_DEFAULT ||
- rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI())
+ if (
+ eState < SFX_ITEM_DEFAULT ||
+ (rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI())
+ )
+ {
EnableItem( MN_READONLY_EDITDOC, FALSE );
+ }
if ( !sURL.Len() )
{
diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx
index 298e5cb7611e..436f4bd27df6 100644
--- a/sw/source/ui/envelp/envimg.cxx
+++ b/sw/source/ui/envelp/envimg.cxx
@@ -51,7 +51,7 @@
#include <unomid.h>
-#ifdef WIN
+#ifdef WNT
#define NEXTLINE UniString::CreateFromAscii("\r\n")
#else
#define NEXTLINE '\n'
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index 95001f897702..2088ce591bbe 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -559,10 +559,10 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
(nTypeId == TYP_SEQFLD && nWhich == RES_SETEXPFLD &&
(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) ||
- ((nTypeId == TYP_INPUTFLD || nTypeId == TYP_FORMELFLD) &&
+ ((nTypeId == TYP_INPUTFLD || nTypeId == TYP_FORMELFLD) &&
(nWhich == RES_USERFLD ||
- nWhich == RES_SETEXPFLD &&
- !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) ) )
+ (nWhich == RES_SETEXPFLD &&
+ !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ))) ) )
{
String* pNew = new String(pFldType->GetName());
rToFill.Insert(pNew, rToFill.Count());
diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx
index 0c31a9ab977f..a0d7ebf03ca1 100644
--- a/sw/source/ui/inc/swlbox.hxx
+++ b/sw/source/ui/inc/swlbox.hxx
@@ -76,11 +76,7 @@ namespace nsSwComboBoxStyle
const SwComboBoxStyle CBS_LOWER = 0x02;
const SwComboBoxStyle CBS_ALL = 0x04;
const SwComboBoxStyle CBS_FILENAME = 0x08;
-#ifdef WIN
- const SwComboBoxStyle CBS_SW_FILENAME = CBS_FILENAME | CBS_LOWER;
-#else
const SwComboBoxStyle CBS_SW_FILENAME = CBS_FILENAME;
-#endif
}
class SW_DLLPUBLIC SwComboBox : public ComboBox
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index d63149eb7c4f..a21dc8cfb30e 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -452,7 +452,7 @@ public:
inline SwEditWin &GetEditWin() { return *pEditWin; }
inline const SwEditWin &GetEditWin () const { return *pEditWin; }
-#if defined WIN || defined WNT || defined UNX
+#if defined WNT || defined UNX
void ScannerEventHdl( const ::com::sun::star::lang::EventObject& rEventObject );
#endif
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index f5ad209d195a..d8e1eed0f3fc 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -1539,7 +1539,7 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
if ( bState != aPageCollCB.GetSavedValue() ||
( bState &&
aPageCollLB.GetSelectEntryPos() != aPageCollLB.GetSavedValue() )
- || aPageNoNF.IsEnabled() && aPageNoNF.IsValueModified())
+ || (aPageNoNF.IsEnabled() && aPageNoNF.IsValueModified()) )
{
String sPage;
diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx
index 20dc6035dc36..73ec9ab71dd4 100644
--- a/sw/source/ui/uiview/uivwimp.cxx
+++ b/sw/source/ui/uiview/uivwimp.cxx
@@ -294,7 +294,7 @@ SwScannerEventListener::~SwScannerEventListener()
void SAL_CALL SwScannerEventListener::disposing( const EventObject& rEventObject) throw(uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
-#if defined WIN || defined WNT || defined UNX
+#if defined WNT || defined UNX
if( pView )
pView->ScannerEventHdl( rEventObject );
#endif
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 4396ff03807c..15c94782883f 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -1759,7 +1759,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
/*-----------------02.12.96 12:36-------------------
--------------------------------------------------*/
-#if defined WIN || defined WNT || defined UNX
+#if defined WNT || defined UNX
void SwView::ScannerEventHdl( const EventObject& /*rEventObject*/ )
{
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 3a7003ff7bca..eeab95b5bccd 100755..100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -913,7 +913,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
GetViewFrame()->GetBindings().Invalidate( nSlot );
}
break;
-#if defined WIN || defined WNT || defined UNX
+#if defined WNT || defined UNX
case SID_TWAIN_SELECT:
case SID_TWAIN_TRANSFER:
GetViewImpl()->ExecuteScan( rReq );
diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx
index b0d5f71744c9..40ba6e3c6d2d 100755..100644
--- a/sw/source/ui/uiview/viewstat.cxx
+++ b/sw/source/ui/uiview/viewstat.cxx
@@ -228,7 +228,7 @@ void SwView::GetState(SfxItemSet &rSet)
break;
case SID_TWAIN_SELECT:
case SID_TWAIN_TRANSFER:
-#if defined WIN || defined WNT || defined UNX
+#if defined WNT || defined UNX
{
if(!SW_MOD()->GetScannerManager().is())
rSet.DisableItem(nWhich);
diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx
index e9b8fdf6feef..e221cf01376e 100644
--- a/sw/source/ui/utlui/glbltree.cxx
+++ b/sw/source/ui/utlui/glbltree.cxx
@@ -1241,11 +1241,20 @@ BOOL SwGlobalTree::Update(BOOL bHard)
GlobalDocContentType eType = pLeft->GetType();
SvLBoxEntry* pEntry = GetEntry(i);
String sTemp = GetEntryText(pEntry);
- if(eType != pRight->GetType() ||
- eType == GLBLDOC_SECTION &&
- (pLeft->GetSection()->GetSectionName() != sTemp) ||
- eType == GLBLDOC_TOXBASE && pLeft->GetTOX()->GetTitle() != sTemp)
- bCopy = bRet = TRUE;
+ if (
+ eType != pRight->GetType() ||
+ (
+ eType == GLBLDOC_SECTION &&
+ pLeft->GetSection()->GetSectionName() != sTemp
+ ) ||
+ (
+ eType == GLBLDOC_TOXBASE &&
+ pLeft->GetTOX()->GetTitle() != sTemp
+ )
+ )
+ {
+ bCopy = bRet = TRUE;
+ }
}
}
if(bCopy || bHard)
diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx
index baf059c51c32..b059c12a4a50 100644
--- a/sw/source/ui/utlui/numfmtlb.cxx
+++ b/sw/source/ui/utlui/numfmtlb.cxx
@@ -368,13 +368,22 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
ULONG nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM );
ULONG nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM );
- if(nDefFmt == nSysNumFmt||
- nDefFmt == nSysShortDateFmt||
- nDefFmt == nSysLongDateFmt||
- bSysLang && (nDefFmt == nNumFormatForLanguage ||
- nDefFmt == nShortDateFormatForLanguage ||
- nDefFmt == nLongDateFormatForLanguage ))
+ if (
+ nDefFmt == nSysNumFmt ||
+ nDefFmt == nSysShortDateFmt ||
+ nDefFmt == nSysLongDateFmt ||
+ (
+ bSysLang &&
+ (
+ nDefFmt == nNumFormatForLanguage ||
+ nDefFmt == nShortDateFormatForLanguage ||
+ nDefFmt == nLongDateFormatForLanguage
+ )
+ )
+ )
+ {
sValue += String(SW_RES(RID_STR_SYSTEM));
+ }
nPos = InsertEntry(sValue, nPos); // Als ersten numerischen Eintrag einfuegen
SetEntryData(nPos, (void*)nDefFmt);
diff --git a/sw/source/ui/vba/makefile.mk b/sw/source/ui/vba/makefile.mk
index c09f81320040..b6d0d7994295 100644
--- a/sw/source/ui/vba/makefile.mk
+++ b/sw/source/ui/vba/makefile.mk
@@ -91,6 +91,7 @@ SLOFILES= \
$(SLO)$/vbapagesetup.obj \
$(SLO)$/vbasection.obj \
$(SLO)$/vbasections.obj \
+ $(SLO)$/vbaeventshelper.obj \
# --- Targets ------------------------------------------------------
diff --git a/sw/source/ui/vba/service.cxx b/sw/source/ui/vba/service.cxx
index c21e8de37b5e..9f9cbff204dd 100644
--- a/sw/source/ui/vba/service.cxx
+++ b/sw/source/ui/vba/service.cxx
@@ -52,6 +52,11 @@ namespace wrapformat
extern sdecl::ServiceDecl const serviceDecl;
}
+namespace vbaeventshelper
+{
+extern sdecl::ServiceDecl const serviceDecl;
+}
+
extern "C"
{
void SAL_CALL component_getImplementationEnvironment(
@@ -68,7 +73,7 @@ extern "C"
// Component registration
return component_writeInfoHelper( pServiceManager, pRegistryKey,
- globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl );
+ globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl, vbaeventshelper::serviceDecl );
}
void * SAL_CALL component_getFactory(
@@ -77,7 +82,7 @@ extern "C"
{
OSL_TRACE("In component_getFactory for %s", pImplName );
void* pRet = component_getFactoryHelper(
- pImplName, pServiceManager, pRegistryKey, globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl );
+ pImplName, pServiceManager, pRegistryKey, globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl, vbaeventshelper::serviceDecl );
OSL_TRACE("Ret is 0x%x", pRet);
return pRet;
}
diff --git a/sw/source/ui/vba/vbabookmarks.cxx b/sw/source/ui/vba/vbabookmarks.cxx
index c17c9f50f422..609b8f9df767 100644
--- a/sw/source/ui/vba/vbabookmarks.cxx
+++ b/sw/source/ui/vba/vbabookmarks.cxx
@@ -41,15 +41,14 @@ using namespace ::com::sun::star;
class BookmarksEnumeration : public EnumerationHelperImpl
{
uno::Reference< frame::XModel > mxModel;
- uno::WeakReference< XHelperInterface > mxParent;
public:
- BookmarksEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), mxModel( xModel ), mxParent( xParent ) {}
+ BookmarksEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mxModel( xModel ) {}
virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
uno::Reference< container::XNamed > xNamed( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
rtl::OUString aName = xNamed->getName();
- return uno::makeAny( uno::Reference< word::XBookmark > ( new SwVbaBookmark( mxParent, m_xContext, mxModel, aName ) ) );
+ return uno::makeAny( uno::Reference< word::XBookmark > ( new SwVbaBookmark( m_xParent, m_xContext, mxModel, aName ) ) );
}
};
diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx
index 8ee1e9880b7a..41a7e607533e 100644
--- a/sw/source/ui/vba/vbadocuments.cxx
+++ b/sw/source/ui/vba/vbadocuments.cxx
@@ -76,7 +76,7 @@ class DocumentEnumImpl : public EnumerationHelperImpl
{
uno::Any m_aApplication;
public:
- DocumentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Any& aApplication ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), m_aApplication( aApplication ) {}
+ DocumentEnumImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Any& aApplication ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_aApplication( aApplication ) {}
virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
@@ -102,7 +102,7 @@ SwVbaDocuments::createEnumeration() throw (uno::RuntimeException)
// safer to create an enumeration based on this objects state
// rather than one effectively based of the desktop component
uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
- return new DocumentEnumImpl( mxContext, xEnumerationAccess->createEnumeration(), Application() );
+ return new DocumentEnumImpl( mxParent, mxContext, xEnumerationAccess->createEnumeration(), Application() );
}
uno::Any
diff --git a/sw/source/ui/vba/vbaeventshelper.cxx b/sw/source/ui/vba/vbaeventshelper.cxx
new file mode 100755
index 000000000000..abe4abb6e757
--- /dev/null
+++ b/sw/source/ui/vba/vbaeventshelper.cxx
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "vbaeventshelper.hxx"
+#include <com/sun/star/script/vba/VBAEventId.hpp>
+#include <vbahelper/helperdecl.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::script::vba::VBAEventId;
+using namespace ::ooo::vba;
+
+// ============================================================================
+
+SwVbaEventsHelper::SwVbaEventsHelper( uno::Sequence< css::uno::Any > const& aArgs, uno::Reference< uno::XComponentContext > const& xContext ) :
+ VbaEventsHelperBase( aArgs, xContext )
+{
+ registerEventHandler( DOCUMENT_NEW, "Document_New", EVENTHANDLER_DOCUMENT );
+ registerEventHandler( AUTO_NEW, "AutoNew", EVENTHANDLER_GLOBAL );
+ registerEventHandler( DOCUMENT_OPEN, "Document_Open", EVENTHANDLER_DOCUMENT );
+ registerEventHandler( AUTO_OPEN, "AutoOpen", EVENTHANDLER_GLOBAL );
+ registerEventHandler( DOCUMENT_CLOSE, "Document_Close", EVENTHANDLER_DOCUMENT );
+ registerEventHandler( AUTO_CLOSE, "AutoClose", EVENTHANDLER_GLOBAL );
+}
+
+SwVbaEventsHelper::~SwVbaEventsHelper()
+{
+}
+
+bool SwVbaEventsHelper::implEventsEnabled() throw (uno::RuntimeException)
+{
+ return true;
+}
+
+bool SwVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue,
+ const EventHandlerInfo& rInfo, const uno::Sequence< uno::Any >& /*rArgs*/ ) throw (uno::RuntimeException)
+{
+ switch( rInfo.mnEventId )
+ {
+ case DOCUMENT_NEW:
+ rEventQueue.push_back( AUTO_NEW );
+ break;
+ case DOCUMENT_OPEN:
+ rEventQueue.push_back( AUTO_OPEN );
+ break;
+ case DOCUMENT_CLOSE:
+ rEventQueue.push_back( AUTO_CLOSE );
+ break;
+ }
+ return true;
+}
+
+uno::Sequence< uno::Any > SwVbaEventsHelper::implBuildArgumentList( const EventHandlerInfo& /*rInfo*/,
+ const uno::Sequence< uno::Any >& /*rArgs*/ ) throw (lang::IllegalArgumentException)
+{
+ // no event handler expects any arguments
+ return uno::Sequence< uno::Any >();
+}
+
+void SwVbaEventsHelper::implPostProcessEvent( EventQueue& /*rEventQueue*/,
+ const EventHandlerInfo& /*rInfo*/, bool /*bSuccess*/, bool /*bCancel*/ ) throw (uno::RuntimeException)
+{
+ // nothing to do after any event
+}
+
+::rtl::OUString SwVbaEventsHelper::implGetDocumentModuleName( const EventHandlerInfo& /*rInfo*/,
+ const uno::Sequence< uno::Any >& /*rArgs*/ ) const throw (lang::IllegalArgumentException)
+{
+ // TODO: get actual codename from document
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ThisDocument" ) );
+}
+
+// ============================================================================
+
+namespace vbaeventshelper
+{
+namespace sdecl = comphelper::service_decl;
+sdecl::class_<SwVbaEventsHelper, sdecl::with_args<true> > serviceImpl;
+extern sdecl::ServiceDecl const serviceDecl(
+ serviceImpl,
+ "SwVbaEventsHelper",
+ "com.sun.star.document.vba.VBATextEventProcessor" );
+}
+
+// ============================================================================
diff --git a/sw/source/ui/vba/vbaeventshelper.hxx b/sw/source/ui/vba/vbaeventshelper.hxx
new file mode 100755
index 000000000000..af1c06c0341f
--- /dev/null
+++ b/sw/source/ui/vba/vbaeventshelper.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SW_VBAEVENTS_HXX
+#define SW_VBAEVENTS_HXX
+
+#include <vbahelper/vbaeventshelperbase.hxx>
+
+// ============================================================================
+
+class SwVbaEventsHelper : public VbaEventsHelperBase
+{
+public:
+ SwVbaEventsHelper(
+ const css::uno::Sequence< css::uno::Any >& rArgs,
+ const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ virtual ~SwVbaEventsHelper();
+
+protected:
+ virtual bool implEventsEnabled() throw (css::uno::RuntimeException);
+ virtual bool implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::uno::RuntimeException);
+ virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException);
+ virtual void implPostProcessEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, bool bSuccess, bool bCancel ) throw (css::uno::RuntimeException);
+ virtual ::rtl::OUString implGetDocumentModuleName( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) const throw (css::lang::IllegalArgumentException);
+};
+
+// ============================================================================
+
+#endif
+
diff --git a/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx
index faa53fa657b5..c0f887f0f249 100644
--- a/sw/source/ui/vba/vbasections.cxx
+++ b/sw/source/ui/vba/vbasections.cxx
@@ -120,14 +120,13 @@ public:
class SectionsEnumWrapper : public EnumerationHelperImpl
{
uno::Reference< frame::XModel > mxModel;
- uno::WeakReference< XHelperInterface > mxParent;
public:
- SectionsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), mxModel( xModel ), mxParent( xParent ) {}
+ SectionsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mxModel( xModel ){}
virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xPageProps( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
- return uno::makeAny( uno::Reference< word::XSection > ( new SwVbaSection( mxParent, m_xContext, mxModel, xPageProps ) ) );
+ return uno::makeAny( uno::Reference< word::XSection > ( new SwVbaSection( m_xParent, m_xContext, mxModel, xPageProps ) ) );
}
};
diff --git a/sw/uiconfig/sglobal/toolbar/findbar.xml b/sw/uiconfig/sglobal/toolbar/findbar.xml
index 9ef9d8a1a78f..078c0fc5bed5 100644
--- a/sw/uiconfig/sglobal/toolbar/findbar.xml
+++ b/sw/uiconfig/sglobal/toolbar/findbar.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find &amp; Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/>
+ <toolbar:toolbaritem xlink:href=".uno:FindText"/>
+ <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
+ <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
+ <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:visible="false"/>
</toolbar:toolbar>
diff --git a/sw/uiconfig/sweb/toolbar/findbar.xml b/sw/uiconfig/sweb/toolbar/findbar.xml
index 9ef9d8a1a78f..0338d3156195 100644
--- a/sw/uiconfig/sweb/toolbar/findbar.xml
+++ b/sw/uiconfig/sweb/toolbar/findbar.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find &amp; Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/>
+ <toolbar:toolbaritem xlink:href=".uno:FindText"/>
+ <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
+ <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
+ <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:visible="false"/>
</toolbar:toolbar>
diff --git a/sw/uiconfig/swriter/toolbar/findbar.xml b/sw/uiconfig/swriter/toolbar/findbar.xml
index 9ef9d8a1a78f..0338d3156195 100644
--- a/sw/uiconfig/swriter/toolbar/findbar.xml
+++ b/sw/uiconfig/swriter/toolbar/findbar.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find &amp; Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/>
+ <toolbar:toolbaritem xlink:href=".uno:FindText"/>
+ <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
+ <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
+ <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:visible="false"/>
</toolbar:toolbar>
diff --git a/sw/uiconfig/swxform/toolbar/findbar.xml b/sw/uiconfig/swxform/toolbar/findbar.xml
index 9ef9d8a1a78f..0338d3156195 100644
--- a/sw/uiconfig/swxform/toolbar/findbar.xml
+++ b/sw/uiconfig/swxform/toolbar/findbar.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" />
- <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find &amp; Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/>
+ <toolbar:toolbaritem xlink:href=".uno:FindText"/>
+ <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
+ <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
+ <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:visible="false"/>
</toolbar:toolbar>
diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk
index 2907264d89cf..ce1419b34065 100644
--- a/sw/util/makefile.mk
+++ b/sw/util/makefile.mk
@@ -367,7 +367,7 @@ SHL5STDLIBS= \
$(I18NISOLANGLIB) \
$(EDITENGLIB) \
$(SVXCORELIB) \
- $(SVXMSFILTERLIB)
+ $(MSFILTERLIB)
SHL5DEPN=$(SHL1TARGETN)
SHL5LIBS=$(SLB)$/$(TARGET_VBA).lib
diff --git a/swext/mediawiki/help/makefile.mk b/swext/mediawiki/help/makefile.mk
index 010533be5689..1cb200a1860f 100644
--- a/swext/mediawiki/help/makefile.mk
+++ b/swext/mediawiki/help/makefile.mk
@@ -68,6 +68,6 @@ $(OUT_HELP)$/{$(MEDIAWIKI_LANG)}$/$(PACKAGE)$/%.xhp :| %.xhp
$(OUT_MEDIAWIKI)$/$(TARGET).done : $(LOCALIZESDF) $(XHPFILES) $(HLANGXHPFILES)
- @$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(HELPEX) -QQ -p $(PRJNAME) -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(OUT_HELP) -y $(PACKAGE) -l all -lf $(MEDIAWIKI_LANG:t",") -m $(LOCALIZESDF) && $(TOUCH) $@
+ @$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(HELPEX) -p $(PRJNAME) -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(OUT_HELP) -y $(PACKAGE) -l all -lf $(MEDIAWIKI_LANG:t",") -m $(LOCALIZESDF) && $(TOUCH) $@
.ENDIF
diff --git a/test/source/cpp/makefile.mk b/test/source/cpp/makefile.mk
index 8494bd4aaa05..04eedea3c670 100644
--- a/test/source/cpp/makefile.mk
+++ b/test/source/cpp/makefile.mk
@@ -35,6 +35,13 @@ VISIBILITY_HIDDEN = TRUE
CDEFS += -DOOO_DLLIMPLEMENTATION_TEST
CFLAGSCXX += $(CPPUNIT_CFLAGS)
+#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
+
SLOFILES = \
$(SLO)/getargument.obj \
$(SLO)/officeconnection.obj \
diff --git a/test/source/cpp/officeconnection.cxx b/test/source/cpp/officeconnection.cxx
index ccfd2cd0a069..b77fb59e4fff 100644
--- a/test/source/cpp/officeconnection.cxx
+++ b/test/source/cpp/officeconnection.cxx
@@ -33,7 +33,9 @@
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/uno/Reference.hxx"
#include "cppuhelper/bootstrap.hxx"
+#include <preextstl.h>
#include "cppunit/TestAssert.h"
+#include <postextstl.h>
#include "osl/process.h"
#include "osl/time.h"
#include "sal/types.h"
diff --git a/testautomation/chart2/optional/includes/loadsave/ch2_xml_format.inc b/testautomation/chart2/optional/includes/loadsave/ch2_xml_format.inc
index fee95afb3f8e..ef61dc36e704 100644
--- a/testautomation/chart2/optional/includes/loadsave/ch2_xml_format.inc
+++ b/testautomation/chart2/optional/includes/loadsave/ch2_xml_format.inc
@@ -221,10 +221,10 @@ testcase tCompareXMLFormatLoad
SAXSeekElement("chart:plot-area")
'/// If the attribute value of 'table:cell-range-address' is 'Sheet1.A1:Sheet1.B2'
'///+ the second characteristics validation has been passed.
- if SAXGetAttributeValue("table:cell-range-address") = "Sheet1.A1:B2" then
+ if SAXGetAttributeValue("table:cell-range-address") = "Sheet1.A1:Sheet1.B2" then
printlog "The cell range for chart:plot-area is correct"
else
- warnlog "#i100780#: The cell range is not Sheet1.A1:B2, it is " & SaxGetAttributeValue("table:cell-range-address")
+ warnlog "The cell range is not Sheet1.A1:Sheet1.B2, it is " & SaxGetAttributeValue("table:cell-range-address")
endif
printlog "Seek for chart:series"
printlog " |-chart:series"
@@ -232,10 +232,10 @@ testcase tCompareXMLFormatLoad
SAXSeekElement("chart:series")
'/// If the attribute valie of 'chart:values-cell-range-address' is Sheet1.A1:Sheet1.A2''
'///+ the hird characteristics validation has been passed.
- if SAXGetAttributeValue("chart:values-cell-range-address") = "Sheet1.A1:A2" then
+ if SAXGetAttributeValue("chart:values-cell-range-address") = "Sheet1.A1:Sheet1.A2" then
printlog "The cell range for chart:series is correct"
else
- warnlog "#i100780#: The cell range is not Sheet1.A1:A2, it is " & SaxGetAttributeValue("chart:values-cell-range-address")
+ warnlog "The cell range is not Sheet1.A1:Sheet1.A2, it is " & SaxGetAttributeValue("chart:values-cell-range-address")
endif
' DEBUG: printlog "I'm here: " & SAXGetElementName
'/// Close the XML editor.
diff --git a/testautomation/extensions/optional/includes/extensions.inc b/testautomation/extensions/optional/includes/extensions.inc
index 90a7e17e16cc..db115274e19d 100755
--- a/testautomation/extensions/optional/includes/extensions.inc
+++ b/testautomation/extensions/optional/includes/extensions.inc
@@ -620,16 +620,24 @@ testcase tExtensionsFunction
' uninstall all components, that were installed
a = listCount(aRemovePackages())
ToolsPackageManager
+
kontext "PackageManager"
If PackageManager.exists(10) then
+
BrowsePackages.typeKeys("<home>")
+ waitslot()
+
ii = 1
while (ii < BrowsePackages.getItemCount +1)
+
+ wait( 2000 ) ' Required, Extension Manager needs time to populate
kontext "PackageManager"
'BrowsePackages.typeKeys("+")
'BrowsePackages.typeKeys("<down>")
sTemp2 = sTemp
BrowsePackages.select ii
+ waitslot()
+
sTemp = BrowsePackages.getItemText (ii,1)
if right(sTemp,3) = "oxt" then
for x = 1 to a
@@ -665,7 +673,7 @@ testcase tExtensionsFunction
ii = ii+1
wend
kontext "PackageManager"
- PackageManager.close
+ hCloseDialog( PackageManager, "close" )
else
qaErrorLog "disabling installed extensions failed;"
endif
diff --git a/testautomation/extensions/optional/includes/location.inc b/testautomation/extensions/optional/includes/location.inc
index c23fdfdf922b..262495666cbb 100755
--- a/testautomation/extensions/optional/includes/location.inc
+++ b/testautomation/extensions/optional/includes/location.inc
@@ -61,14 +61,15 @@ testcase tExtensionLocation
warnlog( "Macro execution warning is missing" )
endif
- irc = hMacroOrganizerRunMacro( MACRO_NAME )
- if ( irc = 0 ) then
- warnlog( "No macro with the given name could be found, aborting" )
- kontext "Makro"
- if ( Makro.exists() ) then
- Makro.close()
- endif
+ hMacroOrganizerRunMacro( MACRO_NAME )
+
+ kontext "Makro"
+ if ( Makro.exists( 1 ) ) then
+ warnlog( "Macro was not executed")
+ Makro.close()
goto endsub
+ else
+ printlog( "Macro was executed")
endif
kontext "active"
@@ -84,11 +85,8 @@ testcase tExtensionLocation
warnlog( "No messagebox displayed, please check that the macro is executed" )
endif
- irc = hExtensionAddGUI( cWorkPath & EXTENSION_NAME , "verbose,InstallForUser" )
- irc = hMacroOrganizerRunMacro( MACRO_NAME )
- if ( irc = 0 ) then
- warnlog( "No macro with the given name could be found" )
- endif
+ hExtensionAddGUI( cWorkPath & EXTENSION_NAME , "verbose,InstallForUser" )
+ hMacroOrganizerRunMacro( MACRO_NAME )
kontext "active"
if ( active.exists( 2 ) ) then
diff --git a/testautomation/extensions/optional/includes/platforms.inc b/testautomation/extensions/optional/includes/platforms.inc
index db5d791498c6..eaac40b777cb 100755..100644
--- a/testautomation/extensions/optional/includes/platforms.inc
+++ b/testautomation/extensions/optional/includes/platforms.inc
@@ -75,7 +75,7 @@ testcase tExtensionPlatforms
end select
printlog( "" )
- printlog( "Current extension: " & cCurrentExtensionFile )
+ printlog( "("+iCurrentExtension+"/"+iExtensionCount+") Current extension: " & cCurrentExtensionFile )
iStatus = hExtensionAddGUI( cCurrentExtensionPath, "InstallForUser, NoLicense, NoUpdate, Verbose" )
if ( iStatus = -7 or iStatus >= 0 ) then
diff --git a/testautomation/framework/optional/includes/basic_spectemplate.inc b/testautomation/framework/optional/includes/basic_spectemplate.inc
index eeed6b047141..7fc265837f78 100755..100644
--- a/testautomation/framework/optional/includes/basic_spectemplate.inc
+++ b/testautomation/framework/optional/includes/basic_spectemplate.inc
@@ -94,10 +94,12 @@ testcase tBasicSpecTemplate
printlog( "Load the file again" )
hFileOpen( cWorkFile )
hAllowMacroExecution()
+
+ ' This sleep here is needed after loading the document otherwise the document is closed too early during execution of the macros, which results in basic runtime error messagebox, that can not be handled.
+ SLEEP(1)
printlog( "Cleanup: Close the document and delete the file" )
hDestroyDocument()
hDeleteFile( cWorkFile )
-
endcase
diff --git a/testautomation/framework/optional/includes/extras_modify_objects.inc b/testautomation/framework/optional/includes/extras_modify_objects.inc
index f2e4717d2e96..964d28a95b77 100755
--- a/testautomation/framework/optional/includes/extras_modify_objects.inc
+++ b/testautomation/framework/optional/includes/extras_modify_objects.inc
@@ -41,8 +41,8 @@ testcase tModifyObjects( iMode as integer, cCategory as string, sVer as string )
const CFN = "tModifyObjects::"
const RESTART = 15
- const TEMPLATE_COUNT = 236 ' For en-US/StarOffice, numbers may differ for Languages/Brands
- const SAMPLE_COUNT = 60 ' For en-US/StarOffice, numbers may differ for Languages/Brands
+ const TEMPLATE_COUNT = 236 ' For en-US/Oracle Open Office, numbers may differ for Languages/Brands
+ const SAMPLE_COUNT = 56 ' For en-US/Oracle Open Office, numbers may differ for Languages/Brands
dim iObjectFolder as integer
diff --git a/testautomation/framework/optional/includes/security_macrosecurity.inc b/testautomation/framework/optional/includes/security_macrosecurity.inc
index 93b4811de44f..3df134d83d33 100755
--- a/testautomation/framework/optional/includes/security_macrosecurity.inc
+++ b/testautomation/framework/optional/includes/security_macrosecurity.inc
@@ -55,12 +55,10 @@ testcase tMacroSecurityLevels( cFileFormat )
dim cWorkFile as string
cWorkFile = gTesttoolPath & "framework\optional\input\BasicDocs\"
cWorkFile = cWorkFile & "basic" & hGetSuffix( cFileFormat )
- cWorkFile = convertpath( cWorkFile )
- cWorkFile = convertToURL( cWorkFile )
dim iSecLevel as integer
- const EXPECTED_MESSAGECOUNT = 1
+ const EXPECTED_MESSAGECOUNT = 0
const ALLOW_ONE_EXTRA_MESSAGEBOX = 1
const ALLOW_NO_EXTRA_MESSAGEBOXES = 0
@@ -92,7 +90,11 @@ testcase tMacroSecurityLevels( cFileFormat )
case GC_MACRO_SECURITY_LEVEL_LOW :
if ( not hIdentifyExecutedMacro() ) then
- warnlog( "#i110184# - Macro was not executed" )
+ if ( gApplication = "MATH" ) then
+ qaerrorlog( "#i110184# - Macro was not executed" )
+ else
+ warnlog( "Macro was not excuted" )
+ endif
endif
case GC_MACRO_SECURITY_LEVEL_MEDIUM :
@@ -102,12 +104,19 @@ testcase tMacroSecurityLevels( cFileFormat )
endif
if ( not hIdentifyExecutedMacro() ) then
- warnlog( "#i110184# - Macro was not executed" )
+ if ( gApplication = "MATH" ) then
+ qaerrorlog( "#i110184# - Macro was not executed" )
+ else
+ warnlog( "Macro was not excuted" )
+ endif
endif
case GC_MACRO_SECURITY_LEVEL_HIGH :
- if ( not hHandleActivesOnLoad( EXPECTED_MESSAGECOUNT , ALLOW_ONE_EXTRA_MESSAGEBOX ) ) then
+ kontext "Active"
+ hCloseDialog( Active, "ok" )
+
+ if ( not hHandleActivesOnLoad( EXPECTED_MESSAGECOUNT , ALLOW_NO_EXTRA_MESSAGEBOXES ) ) then
warnlog( "#i53710# unexpected second messagebox" )
endif
@@ -117,6 +126,9 @@ testcase tMacroSecurityLevels( cFileFormat )
case GC_MACRO_SECURITY_LEVEL_VERYHIGH :
+ kontext "Active"
+ hCloseDialog( Active, "ok" )
+
if ( not hHandleActivesOnLoad( EXPECTED_MESSAGECOUNT , ALLOW_NO_EXTRA_MESSAGEBOXES ) ) then
warnlog( "#i53710# unexpected second messagebox" )
endif
diff --git a/testautomation/framework/optional/input/gridcontrol.odt b/testautomation/framework/optional/input/gridcontrol.odt
index 46be0c44a065..2f467b3f2852 100755
--- a/testautomation/framework/optional/input/gridcontrol.odt
+++ b/testautomation/framework/optional/input/gridcontrol.odt
Binary files differ
diff --git a/testautomation/framework/required/f_programmability_dialogs.bas b/testautomation/framework/required/f_programmability_dialogs.bas
index 925334027592..7965a842d5f4 100644
--- a/testautomation/framework/required/f_programmability_dialogs.bas
+++ b/testautomation/framework/required/f_programmability_dialogs.bas
@@ -38,7 +38,6 @@ sub main
use "framework\required\includes\basic_organizer.inc"
use "framework\required\includes\basic_dialog_export.inc"
use "framework\required\includes\basic_dialog_i18n_import.inc"
- use "framework\required\includes\scripting_basics.inc"
use "framework\required\includes\script_organizers.inc"
call hStatusIn( "framework" , "f_programmability_dialogs.bas" )
@@ -47,8 +46,7 @@ sub main
call tUpdtBasicOrganizer()
call tUpdtDialogExport()
call tBasicDialogI18nImport()
- call tScripting() ' script organizer nodes if no documents are open
- call tUpdtScriptCount() ' script organizer nodes with one open document
+ call tUpdtScripts() ' script organizer nodes with one open document
call hStatusOut()
end sub
@@ -64,7 +62,8 @@ sub LoadIncludeFiles
use "global\tools\includes\optional\t_basic_organizer_tools.inc"
use "global\tools\includes\optional\t_treelist_tools.inc"
use "global\tools\includes\optional\t_docfuncs.inc"
- use "global\tools\includes\optional\t_filetools.inc"
+ use "global\tools\includes\optional\t_filetools.inc"
+ use "global\tools\includes\optional\t_listfuncs.inc"
use "framework\tools\includes\formcontrols.inc"
use "framework\tools\includes\pbrowser_tools.inc"
diff --git a/testautomation/framework/required/includes/basic_dialog_i18n.inc b/testautomation/framework/required/includes/basic_dialog_i18n.inc
index 3c95be08a9d6..162f0cc040cd 100755
--- a/testautomation/framework/required/includes/basic_dialog_i18n.inc
+++ b/testautomation/framework/required/includes/basic_dialog_i18n.inc
@@ -49,6 +49,7 @@ testcase tUpdtBasicDialogI18n
printlog( "Click Manage Languages on ToolsCollectionBar")
kontext "ToolsCollectionBar"
if ( ToolsCollectionBar.exists( DIALOG_DEFAULT_TIMEOUT ) ) then
+ wait( 500 )
hClickButton( ManageLanguage )
else
warnlog( "<ToolsCollectionBar> is not open, is the test environment dirty?" )
diff --git a/testautomation/framework/required/includes/script_organizers.inc b/testautomation/framework/required/includes/script_organizers.inc
index 6082a3313ce0..b9ed8420134e 100755
--- a/testautomation/framework/required/includes/script_organizers.inc
+++ b/testautomation/framework/required/includes/script_organizers.inc
@@ -31,80 +31,118 @@
'*
'\******************************************************************************
-testcase tUpdtScriptCount
- dim sDialog as string
+testcase tUpdtScripts
printlog( "Resource test for macros and scripts / related dialogs" )
- const SCRIPTING_DIALOGS = 5
+ if ( gIsoLang <> "en-US" ) then
+ printlog( "No testing for languages other than en_US" )
+ goto endsub
+ endif
- dim aScriptCount( SCRIPTING_DIALOGS )
+ const SCRIPTING_DIALOGS = 5
- aScriptCount( 1 ) = 10 ' JavaScript
- aScriptCount( 2 ) = 14 ' BeanShell
-
- if ( lcase( gPlatform ) = "osx" ) then
- aScriptCount( 3 ) = 8 ' Python
- aScriptCount( 5 ) = 600 ' Run Macro
- else
- aScriptCount( 3 ) = 10 ' Python
- aScriptCount( 5 ) = 602 ' Run Macro
- endif
+ const DLG_JAVASCRIPT = "JavaScript"
+ const DLG_BEANSHELL = "BeanShell"
+ const DLG_PYTHON = "Python"
+ const DLG_BASIC_ORG = "BasicOrganizer"
+ const DLG_RUN_MACRO = "RunMacro"
- if ( gOOo ) then
- aScriptCount( 4 ) = 585 ' Makro Organizer
- aScriptCount( 5 ) = aScriptCount( 5 ) - 1 ' Run Macro
- else
- ' Makro Organizer
- aScriptCount( 4 ) = 586
- endif
+ ' This is the build specific part of the filename including substrings for
+ ' the productname and language.
+ dim sProductString as string : sProductString = gProductName & "_" & gISOLang & "_"
+
+ ' define platforms that have different scriptcount
+ if ( lcase( gPlatGroup ) = "w95" ) then sProductString = sProductString & "win_"
+ if ( lcase( gPlatform ) = "osx" ) then sProductString = sProductString & "osx_"
+
+ ' replace all blanks
+ sProductString = hStringReplaceChar( sProductString, " ", "-" )
+
+ ' This is where reference file is located, the filename is yet incomplete
+ dim sInputPath as string
+ sInputPath = gTesttoolPath & "framework/required/input/scripts/" & sProductString
+
+ ' This is where we store the reference file if differences are found.
+ dim sOutputPath as string
+ sOutputPath = gOfficePath & "user/work/" & sProductString
+
+ ' These contain the input and output paths (fully qualified)
+ dim sFileIn as string
+ dim sFileOut as string
+
+ ' Array that contains the scriptnames for all organizers
+ dim cScriptNamesList( 1000 ) as string
+ dim sDialog as string
dim iCurrentDialog as integer
- dim iCurrentScriptCount as integer
-
+
+ dim iDiffCount as integer
+
hInitSingleDoc()
for iCurrentDialog = 1 to SCRIPTING_DIALOGS
- printlog( "" )
- select case iCurrentDialog
- case 1: sDialog = "JavaScript"
- ToolsMacrosOrganizeMacrosJavaScript
- kontext "ScriptOrganizer"
- iCurrentScriptCount = hExpandAllNodes( ScriptTreeList )
- ScriptOrganizer.cancel()
- case 2: sDialog = "BeanShell"
- ToolsMacrosOrganizeMacrosBeanShell
- kontext "ScriptOrganizer"
- iCurrentScriptCount = hExpandAllNodes( ScriptTreeList )
- ScriptOrganizer.cancel()
- case 3: sDialog = "Python"
- ToolsMacrosOrganizeMacrosPython
- kontext "ScriptOrganizer"
- iCurrentScriptCount = hExpandAllNodes( ScriptTreeList )
- ScriptOrganizer.cancel()
- case 4: sDialog = "Makro Organizer"
- ToolsMacro_uno
- Kontext "Makro"
- hExpandAllNodes( MakroAus )
- iCurrentScriptCount = hGetScriptCount( MakroAus, MakroListe )
- Makro.close()
- case 5: sDialog = "Run Macro"
- ToolsMacrosRunMacro
- kontext "ScriptSelector"
- hExpandAllNodes( LibraryTreeList )
- iCurrentScriptCount = hGetScriptCount( LibraryTreeList, ScriptList )
- ScriptSelector.cancel()
+ ListAllDelete( cScriptNamesList() )
+
+ ' Build complete filename and identify dialog for logging and case selection
+ select case ( iCurrentDialog )
+ case 1 : sDialog = DLG_JAVASCRIPT
+ case 2 : sDialog = DLG_BEANSHELL
+ case 3 : sDialog = DLG_PYTHON
+ case 4 : sDialog = DLG_BASIC_ORG
+ case 5 : sDialog = DLG_RUN_MACRO
end select
- printlog( sDialog )
-
- if ( aScriptCount( iCurrentDialog ) <> iCurrentScriptCount ) then
- warnlog( "Incorrect number of scripts for this dialog: '" + sDialog + "' expected:" + aScriptCount( iCurrentDialog ) + ", but is:" & iCurrentScriptCount )
- else
- printlog( "Number of scripts is ok" )
- endif
+ printlog( "" )
+ sFileIn = convertpath( sInputPath & sDialog & ".txt" )
+ sFileOut = convertpath( sOutputPath & sDialog & ".txt" )
+
+ printlog( "Open <" & sDialog & "> and access the treelist object" )
+
+ ' Note: hGetAllNodeNames() is a *global* function defined in t_treelist_tools.inc
+ ' DLG_BASIC_ORG and DLG_RUN_MACRO have - in addition to the treelist -
+ ' a separate script list. To get those scripts a little more effort is
+ ' required which is done in the *local* function hGetScriptNames()
+
+ select case ( sDialog )
+ case DLG_JAVASCRIPT: ToolsMacrosOrganizeMacrosJavaScript
+ kontext "ScriptOrganizer"
+ hGetAllNodeNames( ScriptTreeList, cScriptNamesList() )
+ case DLG_BEANSHELL: ToolsMacrosOrganizeMacrosBeanShell
+ kontext "ScriptOrganizer"
+ hGetAllNodeNames( ScriptTreeList, cScriptNamesList() )
+ case DLG_PYTHON: ToolsMacrosOrganizeMacrosPython
+ kontext "ScriptOrganizer"
+ hGetAllNodeNames( ScriptTreeList, cScriptNamesList() )
+ case DLG_BASIC_ORG: ToolsMacro_uno
+ Kontext "Makro"
+ hGetScriptNames( MakroAus, MakroListe, cScriptNamesList() )
+ case DLG_RUN_MACRO: ToolsMacrosRunMacro
+ kontext "ScriptSelector"
+ hGetScriptNames( LibraryTreeList, ScriptList, cScriptNamesList() )
+ end select
+ printlog( "Compare to reference list, create new one if differences were found" )
+ iDiffCount = hManageComparisionList( sFileIn, sFileOut, cScriptNamesList() )
+
+ if ( iDiffCount <> 0 ) then warnlog( "The number of scripts has changed, please review." )
+
+
+ printlog( "Close <" & sDialog & ">" )
+ select case ( sDialog )
+ case DLG_JAVASCRIPT :
+ ScriptOrganizer.cancel()
+ case DLG_BEANSHELL :
+ ScriptOrganizer.cancel()
+ case DLG_PYTHON :
+ ScriptOrganizer.cancel()
+ case DLG_BASIC_ORG :
+ Makro.close()
+ case DLG_RUN_MACRO :
+ ScriptSelector.cancel()
+ end select
+
next iCurrentDialog
hCloseDocument()
@@ -113,15 +151,44 @@ endcase
'*******************************************************************************
-function hGetScriptCount( oTree as object, oList as object ) as integer
+sub hGetScriptNames( oTreeList as object, oScriptList as object, cItemList() as string )
- dim iCurrentTreeItem as integer
- dim iScriptCount as integer : iScriptCount = 0
-
- for iCurrentTreeItem = 1 to oTree.getItemCount()
- oTree.select( iCurrentTreeItem )
- iScriptCount = iScriptCount + oList.getItemCount()
- next iCurrentTreeItem
- hGetScriptCount() = iScriptCount
-
-end function
+ ' oTreeList is the treelist object (left pane)
+ ' oScriptList is the script list (right pane)
+ ' cScriptList() is filled with the scriptnames of the form
+ ' <module>:<script name> like "CommonLang:LoadLanguages"
+
+ dim iCurrentTreeListItem as integer
+ dim iObjectsInTreelist as integer
+
+ dim cModuleName as string
+ dim cReferenceString as string
+
+ dim iScriptCount as integer
+ dim iCurrentScript as integer
+ dim cScriptList( 1000 ) as string
+
+ ' Get the number of nodes from the modules treelist
+ iObjectsInTreeList = hExpandAllNodes( oTreeList )
+
+ ' For each item in the modules treelist get the number of scripts (right pane)
+ for iCurrentTreeListItem = 1 to iObjectsInTreeList
+
+ ' Get the name of the current treelist node, append it to the list
+ ' (otherwise it does not appear if it has no scripts)
+ cModuleName = hGetNodeName( oTreeList, iCurrentTreeListItem )
+ hListAppend( cModuleName, cItemList() )
+
+ ' Get the number of scripts from the right pane, reset the array in advance
+ ListAllDelete( cScriptList() )
+ iScriptCount = hGetListItems( oScriptList, cScriptList() )
+
+ ' Build the string for the reference list and append it to cScriptList()
+ for iCurrentScript = 1 to iScriptCount
+ cReferenceString = cModuleName & ":" & cScriptList( iCurrentScript )
+ hListAppend( cReferenceString, cItemList() )
+ next iCurrentScript
+
+ next iCurrentTreeListItem
+
+end sub \ No newline at end of file
diff --git a/testautomation/framework/required/includes/smoketest.inc b/testautomation/framework/required/includes/smoketest.inc
index 24ef362a1bf1..d4e327a21ad7 100755
--- a/testautomation/framework/required/includes/smoketest.inc
+++ b/testautomation/framework/required/includes/smoketest.inc
@@ -33,6 +33,10 @@
testcase tSmokeTest
+ if ( not hCheckForBinfilters() ) then
+ goto endsub
+ endif
+
printlog( "Smoketest (10er-Test) from Release Engineering" )
dim sLocation as string
dim i,x,a as integer
diff --git a/testautomation/framework/required/includes/topten.inc b/testautomation/framework/required/includes/topten.inc
index a08d59c8064e..fdfdb49fec97 100755
--- a/testautomation/framework/required/includes/topten.inc
+++ b/testautomation/framework/required/includes/topten.inc
@@ -33,33 +33,37 @@
sub topten
- gApplication = "WRITER"
- call Top_ten_test
-
- gApplication = "CALC"
- call Top_ten_test
-
- gApplication = "IMPRESS"
- call Top_ten_test
-
- gApplication = "DRAW"
- call Top_ten_test
-
- gApplication = "MATH"
- call Top_ten_test
-
- gApplication = "HTML"
- call Top_ten_test
-
- gApplication = "MASTERDOCUMENT"
- call Top_ten_test
+ ' we need the binary filters (.sxw etc.) for this test but beginning with
+ ' OOo 3.3 these are optional
+ if ( hCheckForBinfilters() ) then
+ gApplication = "WRITER"
+ call Top_ten_test
+
+ gApplication = "CALC"
+ call Top_ten_test
+ gApplication = "IMPRESS"
+ call Top_ten_test
+
+ gApplication = "DRAW"
+ call Top_ten_test
+
+ gApplication = "MATH"
+ call Top_ten_test
+
+ gApplication = "HTML"
+ call Top_ten_test
+
+ gApplication = "MASTERDOCUMENT"
+ call Top_ten_test
+ endif
end sub
'*******************************************************************************
testcase Top_ten_test
- dim sUserWorkDirectory as string
+
+ dim sUserWorkDirectory as string
dim sFilename_native as String
dim sFilename_export as String
dim sFilter_native as string
diff --git a/testautomation/framework/required/includes/window_functions.inc b/testautomation/framework/required/includes/window_functions.inc
index acc5e7a5219d..6917639d30f8 100755
--- a/testautomation/framework/required/includes/window_functions.inc
+++ b/testautomation/framework/required/includes/window_functions.inc
@@ -196,8 +196,18 @@ end sub
testcase tCheckWindowTitle( sApplication as string, sReference as string )
+ if ( sApplication = "soffice" ) then
+
+
printlog( "Update test for the office window titles" )
+ ' This is a Testtool-only problem that the product name is not displayed
+ ' after calling hCloseDocument() on the last document.
+ if ( sApplication = "soffice" ) then
+ qaerrorlog( "#i113760# - Product name missing for backing window" )
+ goto endsub
+ endif
+
const BASIC_MODULE = "tCheckWindowTitle"
const STRING_NOT_FOUND = 0
const STRING_LEFTMOST = 1
@@ -217,21 +227,12 @@ testcase tCheckWindowTitle( sApplication as string, sReference as string )
printlog( "Application: " & sApplication & "; Title should be: " & sReference )
printlog( "Open the work windows (documents)" )
hInitSingleDoc()
- hCreateDocument()
printlog( "Verify that the correct window is open" )
select case sApplication
- case "swriter" :
- case "sglobal" :
- case "sweb" :
- case "scalc" :
- case "simpress":
- case "sdraw" :
- case "smath" :
case "basic" : hInitBasicIDE( BASIC_MODULE )
- case "chart" :
- case "database":
case "soffice" : hFileCloseAll()
+ case else : hCreateDocument()
end select
' Note: The Testtool connection string does not belong to the window caption
@@ -290,16 +291,7 @@ testcase tCheckWindowTitle( sApplication as string, sReference as string )
printlog( "Cleanup after test" )
select case sApplication
- case "swriter" :
- case "sglobal" :
- case "sweb" :
- case "scalc" :
- case "simpress":
- case "sdraw" :
- case "smath" :
case "basic" : hDestroyDocument()
- case "chart" :
- case "database":
case "soffice" : hCreateDocument()
end select
diff --git a/testautomation/framework/required/includes/wizard_agenda.inc b/testautomation/framework/required/includes/wizard_agenda.inc
index a192be35015e..d423d2fd7c62 100755
--- a/testautomation/framework/required/includes/wizard_agenda.inc
+++ b/testautomation/framework/required/includes/wizard_agenda.inc
@@ -81,17 +81,16 @@ testcase tUpdtWizardAgenda
hWaitForObject( TemplateName, 3000 )
TemplateName.setText( cTemplateName )
hSetTemplateSavePath( cTemplatePath )
-
- hFinishWizard( 1 )
+
+ kontext "AutopilotAgenda"
+ hClickButton( CreateButton )
- iErr = hHandleSaveError()
- if ( iErr = 1 ) then
+ if ( hHandleSaveError() = 1 ) then
kontext "AutopilotAgenda"
- hFinishWizard( 1 )
+ hClickButton( CreateButton )
endif
- brc = hDestroyDocument()
- if ( not brc ) then qaerrorlog( "#i59233# The wizard does not display the new template" )
+ if ( not hDestroyDocument() ) then qaerrorlog( "#i59233# The wizard does not display the new template" )
hFileCloseAll()
hDeleteFile( cTemplatePath )
diff --git a/testautomation/framework/required/includes/wizard_documentconverter.inc b/testautomation/framework/required/includes/wizard_documentconverter.inc
index cca037b16680..b99cef0a9c6c 100755
--- a/testautomation/framework/required/includes/wizard_documentconverter.inc
+++ b/testautomation/framework/required/includes/wizard_documentconverter.inc
@@ -49,18 +49,11 @@ testcase tUpdtWizardDocumentConverter
dim iCurrentFile as integer
hInitSingleDoc()
-
- irc = hOpenWizardWithMenu( "DOCCONV" )
- if ( irc <> 0 ) then
- warnlog( "Unable to open requested wizard, aborting test" )
- goto endsub
- endif
-
sTargetFile = hGetWorkPath()
sLogFile = sTargetFile & "Logfile.odt"
-
- stargetFile = sTargetFile & "docconv1" & hGetSuffix( "current" )
-
+ sTargetFile = sTargetFile & "docconv1" & hGetSuffix( "current" )
+
+ FileWizardDocumentConverter
Kontext "DocumentConverter"
hWaitForObject( CreateLogfile, 3000 )
@@ -85,7 +78,7 @@ testcase tUpdtWizardDocumentConverter
printlog( "Page " & 1 + iDocumentType & " is visible" )
else
warnlog( "Cannot access page 2, aborting test" )
- hFinishWizard()
+ hCloseDialog( DocumentConverter, "Cancel" )
goto endsub
endif
diff --git a/testautomation/framework/required/includes/wizard_euroconverter.inc b/testautomation/framework/required/includes/wizard_euroconverter.inc
index 87b32b5abf08..aeee35c59282 100755
--- a/testautomation/framework/required/includes/wizard_euroconverter.inc
+++ b/testautomation/framework/required/includes/wizard_euroconverter.inc
@@ -53,12 +53,7 @@ testcase tUpdtWizardEuroconverter
hInitSingleDoc()
- irc = hOpenWizardWithMenu( "EUROCONV" )
- if ( irc <> 0 ) then
- warnlog( "Failed to open the Euroconverter, aborting test" )
- hDestroyDocument()
- goto endsub
- endif
+ FileWizardEuroConverter
kontext "AutopilotEuroKonverter"
call DialogTest( AutopilotEuroKonverter , 1 )
@@ -124,7 +119,7 @@ testcase tUpdtWizardEuroconverter
kontext "AutopilotEuroKonverter"
call DialogTest( AutopilotEuroKonverter , 2 )
- hFinishWizard( 1 )
+ hClickButton( Konvertieren )
hDestroyDocument()
hDeleteFile( cTargetDir & TARGET_FILE )
diff --git a/testautomation/framework/required/includes/wizard_fax.inc b/testautomation/framework/required/includes/wizard_fax.inc
index bbd75f66a327..07fcc562dddc 100755
--- a/testautomation/framework/required/includes/wizard_fax.inc
+++ b/testautomation/framework/required/includes/wizard_fax.inc
@@ -35,9 +35,6 @@ testcase tUpdtWizardFax
printlog( "Resource test for the fax wizard" )
- dim iErr as integer
- dim brc as boolean
-
dim cTemplateName as string
dim cTemplatePath as string
@@ -74,14 +71,14 @@ testcase tUpdtWizardFax
TemplateName.setText( cTemplateName )
hSetTemplateSavePath( cTemplatePath )
-
- hFinishWizard( 1 )
+
+ kontext "AutopilotFax"
+ hClickButton( FinishButton )
kontext "StandardBar"
hWaitForObject( Speichern, 5000 )
- brc = hDestroyDocument()
- if ( not brc ) then qaerrorlog( "#i59233# The wizard does not display the new template" )
+ if ( not hDestroyDocument() ) then qaerrorlog( "#i59233# The wizard does not display the new template" )
printlog( "Delete the user-template: " & cTemplatePath )
hDeleteFile( cTemplatePath )
diff --git a/testautomation/framework/required/includes/wizard_firsttime.inc b/testautomation/framework/required/includes/wizard_firsttime.inc
index 63c79966b41e..657a68ada3d0 100755
--- a/testautomation/framework/required/includes/wizard_firsttime.inc
+++ b/testautomation/framework/required/includes/wizard_firsttime.inc
@@ -64,10 +64,6 @@ testcase tUpdtWizardFirsttime
NextBtn.click()
endif
-
-
-
-
printlog( "Check the license page" )
kontext "TabFirstStartLicense"
if ( TabFirstStartLicense.exists( 2 ) ) then
@@ -198,7 +194,7 @@ testcase tUpdtWizardFirsttime
LoadQuickstarter.unCheck()
printlog( "Closing Tools/Options" )
Kontext "OptionenDlg"
- OptionenDlg.cancel()
+ hCloseDialog( OptionenDlg, "cancel" )
printlog( "Restarting program" )
call ExitRestartTheOffice()
else
@@ -218,16 +214,12 @@ testcase tUpdtWizardFirsttime
endif
Kontext "OptionenDlg"
- if ( OptionenDlg.exists() ) then
- OptionenDlg.cancel()
- endif
+ hCloseDialog( OptionenDlg, "cancel, optional" )
' due to issue i105248 the Quickstart disabler needs to get called again, because the First Start Wizard resets the veto
call hDisableQuickstarterAPI()
- do while( getDocumentCount() > 0 )
- call hCloseDocument()
- loop
+ hFileCloseAll()
endcase
diff --git a/testautomation/framework/required/includes/wizard_letter.inc b/testautomation/framework/required/includes/wizard_letter.inc
index 1c0cb05031f0..4f68a04cbd8b 100755
--- a/testautomation/framework/required/includes/wizard_letter.inc
+++ b/testautomation/framework/required/includes/wizard_letter.inc
@@ -35,10 +35,6 @@ testcase tUpdtWizardLetter
printlog( "Resource test for the letter-wizard" )
- dim iErr as integer
- dim brc as boolean
- dim irc as integer
-
' Build the filename we want to save the template as.
dim cTemplateName as string
cTemplateName = "FWK-Testtool-Template-letterWizard.ott"
@@ -158,8 +154,9 @@ testcase tUpdtWizardLetter
printlog( " * name the template for further usage" )
TemplateName.setText( cTemplateName )
hSetTemplateSavePath( cTemplatePath )
-
- hFinishWizard( 1 )
+
+ kontext "AutopilotLetter"
+ hClickButton( FinishButton )
if ( gOOo ) then
kontext "UseOfThisTemplate"
@@ -171,22 +168,19 @@ testcase tUpdtWizardLetter
endif
endif
- iErr = hHandleSaveError()
- if ( iErr = 1 ) then
+ if ( hHandleSaveError() = 1 ) then
kontext "AutopilotLetter"
- hFinishWizard( 1 )
+ hClickButton( FinishButton )
endif
- brc = hDestroyDocument()
- if ( not brc ) then qaerrorlog( "#i59233# The wizard does not display the new template" )
+ if ( not hDestroyDocument() ) then qaerrorlog( "#i59233# The wizard does not display the new template" )
else
warnlog( "Autopilot Letter not open/exceeded timeout" )
endif
hDeleteFile( cTemplatePath )
- irc = hDeleteUserTemplates()
- if ( irc <> 0 ) then
+ if ( hDeleteUserTemplates() <> 0 ) then
printlog( "Unexpectedly deleted user template(s), please check")
endif
diff --git a/testautomation/framework/required/includes/wizard_presentation.inc b/testautomation/framework/required/includes/wizard_presentation.inc
index 68143b3cdc3c..53e2e0d3a50b 100755
--- a/testautomation/framework/required/includes/wizard_presentation.inc
+++ b/testautomation/framework/required/includes/wizard_presentation.inc
@@ -57,8 +57,9 @@ testcase tUpdtWizardPresentation
printlog( "Page 3" )
kontext "AutopilotPraesentation3"
call DialogTest( AutopilotPraesentation3 )
-
- hFinishWizard( 1 )
+
+ kontext "AutopilotPraesentation3"
+ hCloseDialog( AutopilotPraesentation3, "ok" )
else
warnlog( "Presentation wizard not open/exceeded timeout" )
endif
diff --git a/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_BasicOrganizer.txt b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_BasicOrganizer.txt
new file mode 100755
index 000000000000..49400346a1a0
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_BasicOrganizer.txt
@@ -0,0 +1,657 @@
+My Macros
+Standard
+Module1
+Module1:Main
+OpenOffice.org Macros
+Depot
+CommonLang
+CommonLang:LoadLanguage
+CommonLang:CompleteMarketList
+CommonLang:LocalizedCurrencies
+CommonLang:LoadDepotDialogs
+CommonLang:InitializeStartUpModel
+Currency
+Currency:Startup
+Currency:EnableGoOnButton
+Currency:CloseStartUpDialog
+Currency:DisposeDocument
+Currency:ChooseMarket
+Currency:ConvertStylesCurrencies
+Currency:SwitchNumberFormat
+Currency:Numberformat
+Currency:CheckFormatType
+Depot
+Depot:Initialize
+Depot:Buy
+Depot:Sell
+Depot:Reset
+Depot:TransactionOk
+Depot:SelectStockname
+Depot:HandleStocks
+Depot:CancelStockRate
+Depot:CancelTransaction
+Depot:CommitStockRate
+Depot:EnableTransactionControls
+Depot:SetupTransactionControls
+Depot:AddShortCuttoControl
+Depot:OpenStockRatePage
+Depot:SelectStockNameForRates
+Depot:ToggleStockRateControls
+Depot:InitializeStockRatesControls
+Internet
+Internet:CheckHistoryControls
+Internet:InsertCompanyHistory
+Internet:InternetUpdate
+Internet:GetCurrentRate
+Internet:UpdateValue
+Internet:StringToDate
+Internet:UpdateChart
+Internet:CalculateChartafterSplit
+Lang_de
+Lang_de:LoadGermanLanguage
+Lang_en
+Lang_en:LoadEnglishLanguage
+Lang_es
+Lang_es:LoadSpanishLanguage
+Lang_fr
+Lang_fr:LoadFrenchLanguage
+Lang_it
+Lang_it:LoadItalianLanguage
+Lang_ja
+Lang_ja:LoadJapaneseLanguage
+Lang_ko
+Lang_ko:LoadKoreanLanguage
+Lang_sv
+Lang_sv:LoadSwedishLanguage
+Lang_tw
+Lang_tw:LoadChineseTradLanguage
+Lang_zh
+Lang_zh:LoadChineseSimpleLanguage
+tools
+tools:RemoveSheet
+tools:InitializeStatusLine
+tools:MakeRangeVisible
+tools:GetRowIndex
+tools:GetTransactionCount
+tools:GetStocksCount
+tools:FillListbox
+tools:CellValuetoControl
+tools:RemoveStockRows
+tools:AddValueToCellContent
+tools:CheckInputDate
+tools:InsertCurrentValue
+tools:SplitCellValue
+tools:GetStockRowIndex
+tools:GetStockID
+tools:CheckDocLocale
+Euro
+AutoPilotRun
+AutoPilotRun:StartAutoPilot
+AutoPilotRun:ConvertDocuments
+AutoPilotRun:InitializeDocument
+AutoPilotRun:ChangeToNextProgressStep
+AutoPilotRun:StoreDocument
+AutoPilotRun:SwapExtent
+AutoPilotRun:InitializeThirdStep
+AutoPilotRun:ToggleProgressStep
+AutoPilotRun:EnableStep2DialogControls
+AutoPilotRun:InitializeProgressPage
+AutoPilotRun:AssignFileName
+AutoPilotRun:ToggleGoOnButton
+AutoPilotRun:CallFolderPicker
+AutoPilotRun:CallFilePicker
+AutoPilotRun:PreviousStep
+Common
+Common:RetrieveDocumentObjects
+Common:CancelTask
+Common:ConvertDocument
+Common:SwitchNumberFormat
+Common:Numberformat
+Common:CheckFormatType
+Common:StartConversion
+Common:IncreaseStatusValue
+Common:SelectCurrency
+Common:FillUpCurrencyListbox
+Common:InitializeProgressbar
+Common:EndStatusLine
+ConvertRun
+ConvertRun:Main
+ConvertRun:SelectListItem
+ConvertRun:RetrieveEnableValue
+ConvertRun:EnableStep1DialogControls
+ConvertRun:ConvertRangesOrStylesOfDocument
+ConvertRun:ConvertWholeDocument
+ConvertRun:EmptySelection
+ConvertRun:AddSelectedRangeToSelRangesEnum
+ConvertRun:GetPreSelectedRange
+ConvertRun:AddRangeToListbox
+ConvertRun:CheckRangeSelection
+ConvertRun:FieldinList
+ConvertRun:CheckLocale
+ConvertRun:SetOptionValuestoNull
+ConvertRun:SetStatusLineText
+Hard
+Hard:CreateRangeList
+Hard:CreateRangeEnumeration
+Hard:AddSheetRanges
+Hard:SelectRange
+Hard:ConvertThehardWay
+Hard:ConvertCellCurrencies
+Hard:ModifyObjectValuewithCurrFactor
+Hard:CheckIfRangeisCurrency
+Hard:CountColumnsForRow
+Hard:CountRangeCells
+Init
+Init:InitializeResources
+Init:InitializeLanguages
+Init:InitializeCurrencies
+Init:InitializeControls
+Init:InitializeConverter
+Init:InitializeCurrencyValues
+Init:InitializeLocales
+Protect
+Protect:UnprotectSheetsWithPassWord
+Protect:UnprotectSheet
+Protect:UnprotectSheetWithDialog
+Protect:ExecutePasswordDialog
+Protect:ReadPassword
+Protect:RejectPassword
+Protect:ReprotectSheets
+Protect:AddSheettoUnprotectionlist
+Protect:CheckSheetProtection
+Soft
+Soft:CreateStyleEnumeration
+Soft:MakeStyleEnumeration
+Soft:AssignRangestoStyle
+Soft:AssignCellFormatRanges
+Soft:DeselectStyle
+Soft:RetrieveRangeNamefromAddress
+Soft:RetrieveSheetoutofRangeName
+Soft:RetrieveRangeoutofRangeName
+Soft:ConvertTheSoftWay
+Soft:GetAssignedRanges
+Writer
+Writer:ConvertWriterTables
+Writer:ModifyObjectValuewithCurrFactor
+Writer:ConvertTextFields
+FormWizard
+DBMeta
+DBMeta:GetDatabaseNames
+DBMeta:GetSelectedDBMetaData
+DBMeta:GetConnection
+DBMeta:GetDBMetaData
+DBMeta:GetTableMetaData
+DBMeta:GetSpecificFieldNames
+DBMeta:CreateDBForm
+DBMeta:AddOrRemoveBinaryFieldsToWidthList
+DBMeta:CreateCommandTypeList
+DBMeta:GetCurrentMetaValues
+DBMeta:AssignFieldLength
+develop
+develop:PositionControls
+develop:ResetPosSizes
+develop:RepositionColumnarLeftControls
+develop:ResetDBShape
+develop:InitializePosSizes
+develop:InsertTextControl
+develop:InsertDBControl
+develop:InsertTimeStampShape
+develop:GetLabelDiffHeight
+develop:CheckJustifiedPosition
+develop:GetCorrWidth
+develop:AdjustLineWidth
+develop:CheckOuterPoints
+develop:PositionGridControl
+develop:SetupGridColumn
+develop:ControlCaptionstoStandardLayout
+develop:GroupShapesTogether
+FormWizard
+FormWizard:Main
+FormWizard:MainWithDefault
+FormWizard:FormGetFields
+FormWizard:FillUpFieldsListbox
+FormWizard:PreviousStep
+FormWizard:NextStep
+FormWizard:InitializeLayoutSettings
+FormWizard:ToggleDatabasePage
+FormWizard:CommitLastDocumentChanges
+FormWizard:StoreFormInDatabase
+FormWizard:StoreForm
+FormWizard:EmptyFieldsListboxes
+FormWizard:DeleteFirstTableListBoxEntry
+FormWizard:DeleteFirstListboxEntry
+Language
+Language:LoadLanguage
+Language:SetDialogLanguage
+Language:InitializeWidthList
+Layouter
+Layouter:InsertControl
+Layouter:ArrangeControls
+Layouter:OpenFormDocument
+Layouter:InitializeLabelValues
+Layouter:ConfigurePageStyle
+Layouter:ChangeBorderLayouts
+Layouter:ChangeLabelAlignments
+Layouter:ChangeArrangemode
+Layouter:ToggleBorderGroup
+Layouter:ToggleAlignGroup
+Layouter:ToggleLayoutPage
+Layouter:DestroyControlShapes
+Layouter:SwitchArrangementButtons
+Layouter:SwitchBorderMode
+Layouter:SwitchAlignMode
+tools
+tools:SetProgressValue
+tools:GetPreferredWidth
+tools:GetPreferredHeight
+tools:GetPeerSize
+tools:TwipToCM
+tools:TwipTo100telMM
+tools:TwipToPixel
+tools:PixelTo100thMMX
+tools:PixelTo100thMMY
+tools:GetPoint
+tools:GetSize
+tools:ImportStyles
+tools:SetNumerics
+tools:RemoveShapes
+tools:RemoveNirwanaShapes
+tools:ShapesToNirwana
+tools:CalcUniqueContentName
+tools:CountItemsInArray
+tools:GetDBHeight
+tools:GetFormWizardPaths
+tools:GetFilterName
+Gimmicks
+AutoText
+AutoText:Main
+AutoText:InsertStringToCell
+ChangeAllChars
+ChangeAllChars:ChangeAllChars
+ChangeAllChars:ReplaceAllStrings
+ChangeAllChars:ReplaceStrings
+GetTexts
+GetTexts:Main
+GetTexts:GetCalcStrings
+GetTexts:GetCellTexts
+GetTexts:GetAnnotations
+GetTexts:GetNamedRanges
+GetTexts:GetCalcGraphicNames
+GetTexts:GetParagraphTexts
+GetTexts:GetChartStrings
+GetTexts:GetFrameTexts
+GetTexts:GetTextFieldStrings
+GetTexts:GetLinkedFileNames
+GetTexts:GetSectionNames
+GetTexts:GetWriterStrings
+GetTexts:GetDrawPageTitles
+GetTexts:GetPageStrings
+GetTexts:GetDrawStrings
+GetTexts:GetDocumentProps
+GetTexts:GetHyperlinks
+GetTexts:GetGraphicNames
+GetTexts:GetStyles
+GetTexts:GetControlStrings
+GetTexts:GetControlContent
+GetTexts:WriteStringtoLogFile
+GetTexts:MakeLogHeadLine
+ReadDir
+ReadDir:Main
+ReadDir:TreeInfo
+ReadDir:CreateTextShape
+ReadDir:CalculateXPoint
+ReadDir:DrawLine
+ReadDir:GetSourceDirectory
+ReadDir:ReadSourceDirectory
+ReadDir:CloseDialog
+ReadDir:AdjustPageHeight
+ReadDir:SetNewLevels
+ReadDir:CheckPageWidth
+ReadDir:ToggleDialogControls
+Userfields
+Userfields:StartChangesUserfields
+Userfields:FillDialog
+Userfields:ScrollControls
+Userfields:ScrollTextFieldInfo
+Userfields:StopMacro
+Userfields:SaveSettings
+Userfields:ToggleButtons
+Userfields:InitializeUserFamily
+Userfields:AddRecord
+Userfields:FillupTextFields
+Userfields:StepToRecord
+Userfields:SelectCurrentFields
+Userfields:DeleteCurrentSettings
+ImportWizard
+API
+API:OpenRegKey
+API:GetDefaultPath
+API:GetTemplateDefaultPath
+API:QueryValueEx
+API:QueryValue
+DialogModul
+DialogModul:FillStep_Welcome
+DialogModul:FillStep_InputPaths
+DialogModul:FillUpApplicationList
+DialogModul:InitializePathsforCurrentApplication
+DialogModul:AssignPathToCurrentApplication
+DialogModul:SaveStep_InputPath
+DialogModul:ToggleInputPaths
+DialogModul:MakeSummaryString
+DialogModul:FillStep_Summary
+DialogModul:FillStep_Progress
+DialogModul:GetFilterTracingLogPath
+DialogModul:CheckMSImportAvailability
+DialogModul:SetupMSConfiguration
+DialogModul:SetupXMLConfiguration
+DialogModul:CheckControlPath
+DialogModul:CheckInputPaths
+DialogModul:CheckTextBoxPath
+DialogModul:InitializeProgressPage
+DialogModul:SetProgressDisplay
+DialogModul:TakoverFolderName
+DialogModul:FinalizeDialogButtons
+FilesModul
+FilesModul:ReadCollectionPaths
+FilesModul:GetApplicationIndex
+FilesModul:InterruptProcess
+FilesModul:AddCollectionPath
+FilesModul:SetExtension
+FilesModul:AddFilterNameToPathItem
+FilesModul:CheckIfToAddPathToCollection
+FilesModul:CollectPaths
+FilesModul:ConvertAllDocuments
+FilesModul:AddListtoFilesList
+FilesModul:GetTargetTemplatePath
+FilesModul:GetFilterName
+FilesModul:SearchArrayforPartString
+FilesModul:CreateLogTable
+FilesModul:GetSize
+FilesModul:InsertCommandButtonatViewCursor
+FilesModul:CreateLogDocument
+FilesModul:GetFilterTracingLogPath
+FilesModul:InsertTargetUrlToLogDocument
+FilesModul:InsertSourceUrlToLogDocument
+FilesModul:InsertHyperLinkToLogCell
+FilesModul:InsertCommentToLogCell
+FilesModul:AddLogStatistics
+FilesModul:CheckIfMacroExists
+FilesModul:CheckPassWordProtection
+FilesModul:OpenLogDocument
+FilesModul:MergeRange
+FilesModul:ConcatComment
+Language
+Language:LoadLanguage
+Language:GetApplResourceArray
+Main
+Main:Main
+Main:NextStep
+Main:PrevStep
+Main:CancelTask
+Main:TemplateDirSearchDialog
+Main:RepaintHeaderPreview
+Main:CheckModuleInstallation
+Main:CheckInstalledModule
+Main:ToggleCheckboxes
+Main:ToggleCheckboxesWithBoolean
+Main:ToggleNextButton
+Main:TakeOverPathSettings
+Main:GetImportWizardPaths
+Schedule
+BankHoliday
+BankHoliday:Main
+BankHoliday:CalEasterTable
+BankHoliday:CalOrthodoxEasterTable
+BankHoliday:CalInitGlobalVariablesDate
+BankHoliday:CalInsertBankholiday
+BankHoliday:CalMaxDayInMonth
+BankHoliday:CalGetIntOfShortMonthName
+BankHoliday:CalInsertOwnDataInTables
+BankHoliday:GetMonthDate
+BankHoliday:GetNextWeekDay
+BankHoliday:AddFollowUpHolidays
+CalendarMain
+CalendarMain:CalAutopilotTable
+CalendarMain:SetupNumberFormatter
+CalendarMain:AddNumberFormat
+CalendarMain:CalChooseCalendar
+CalendarMain:CalcmdCancel
+CalendarMain:CalcmdOk
+CreateTable
+CreateTable:CalCreateYearTable
+CreateTable:CalCreateMonthTable
+CreateTable:FormatCalCells
+DlgControl
+DlgControl:Main
+DlgControl:CalcmdDeleteSelect
+DlgControl:CalSaveOwnEventControls
+DlgControl:CalMouseMoved
+DlgControl:SelectState
+DlgControl:MouseLeavesImage
+DlgControl:CalClearInputMask
+DlgControl:CalmdSwitchOwnDataOrGeneral
+DlgControl:ToggleInsertButton
+DlgControl:CalUpdateNewEventFrame
+GermanHolidays
+GermanHolidays:Main
+GermanHolidays:CalGetGermanLandAtMousePos
+GermanHolidays:CalFindWholeYearHolidays_GERMANY
+Language
+Language:LoadLanguage
+LocalHolidays
+LocalHolidays:Main
+LocalHolidays:FindWholeYearHolidays_FRANCE
+LocalHolidays:FindWholeYearHolidays_SWED
+LocalHolidays:FindWholeYearHolidays_FI
+LocalHolidays:FindWholeYearHolidays_DK
+LocalHolidays:FindWholeYearHolidays_ITA
+LocalHolidays:FindWholeYearHolidays_TRK
+LocalHolidays:CalculateturkishReligousHolidays
+LocalHolidays:FindWholeYearHolidays_GREEK
+LocalHolidays:FindWholeYearHolidays_SPAIN
+LocalHolidays:FindWholeYearHolidays_PORT
+LocalHolidays:FindWholeYearHolidays_NL
+LocalHolidays:FindWholeYearHolidays_PL
+LocalHolidays:FindWholeYearHolidays_RU
+LocalHolidays:FindWholeYearHolidays_US
+LocalHolidays:FindWholeYearHolidays_JP
+LocalHolidays:FindWholeYearHolidays_TW
+LocalHolidays:FindWholeYearHolidays_CN
+LocalHolidays:CalculateChineseNewYear
+LocalHolidays:CalculateJapaneseSpringDay
+LocalHolidays:CalculateJapaneseAutumnDay
+OwnEvents
+OwnEvents:Main
+OwnEvents:CalSaveOwnData
+OwnEvents:CalLoadOwnData
+OwnEvents:CalCreateDateStrOfInput
+OwnEvents:CalcmdInsertData
+OwnEvents:GetSelectedDateUnits
+OwnEvents:GetDateUnits
+OwnEvents:CalGetNameOfEvent
+OwnEvents:CheckInsertedDates
+OwnEvents:GetOwnMonth
+ScriptBindingLibrary
+Template
+Autotext
+Autotext:Main
+Autotext:CreateUserDatafield
+Autotext:CreateBullet
+Autotext:CreatePlaceholder
+Correspondence
+Correspondence:Main
+Correspondence:Placeholder
+Correspondence:Database
+Correspondence:LoadLanguageCorrespondence
+Correspondence:GetFieldName
+Correspondence:OK
+Correspondence:InsertDBField
+Correspondence:InsertPlaceholder
+ModuleAgenda
+ModuleAgenda:Initialize
+ModuleAgenda:LoadLanguageAgenda
+ModuleAgenda:ModifyTemplate
+ModuleAgenda:NewTopic
+ModuleAgenda:FinishAgenda
+ModuleAgenda:CreateBookMarkCursor
+ModuleAgenda:DeleteButtons
+ModuleAgenda:GetOptionValues
+Samples
+Samples:PrepareForEditing
+Samples:ShowStyles
+Samples:SelectStyle
+Samples:SaveCurrentStyles
+Samples:RestoreCurrentStyles
+Samples:CloseStyleDialog
+Samples:KillTempFile
+Tools
+Debug
+Debug:ActivateReadOnlyFlag
+Debug:DeactivateReadOnlyFlag
+Debug:SetBasicReadOnlyFlag
+Debug:WritedbgInfo
+Debug:WriteDbgString
+Debug:printdbgInfo
+Debug:ShowArray
+Debug:ShowPropertyValues
+Debug:ShowNameValuePair
+Debug:ShowElementNames
+Debug:ShowSupportedServiceNames
+Debug:ShowAvailableServiceNames
+Debug:ShowCommands
+Debug:ProtectCurrentSheets
+Debug:FillDocument
+Listbox
+Listbox:MergeList
+Listbox:RemoveListItems
+Listbox:InitializeListboxProcedures
+Listbox:CopyListboxItems
+Listbox:FormMoveSelected
+Listbox:FormMoveAll
+Listbox:FormRemoveSelected
+Listbox:FormRemoveAll
+Listbox:MoveSelectedListBox
+Listbox:MoveOrderedSelectedListbox
+Listbox:RemoveSelected
+Listbox:SetNewSelection
+Listbox:ToggleListboxControls
+Listbox:FormSetMoveRights
+Listbox:AddSingleItemToListbox
+Listbox:EmptyListbox
+Listbox:SelectListboxItem
+Listbox:GetSelectedListboxItems
+Listbox:RemoveListboxItemByName
+Listbox:GetItemPos
+Misc
+Misc:Main
+Misc:RegisterNewDataSource
+Misc:ConnecttoDatabase
+Misc:GetStarOfficeLocale
+Misc:GetRegistryKeyContent
+Misc:GetProductname
+Misc:OpenDocument
+Misc:TaskonDesktop
+Misc:RetrieveFileName
+Misc:GetPathSettings
+Misc:GetOfficeSubPath
+Misc:ShowNoOfficePathError
+Misc:InitResources
+Misc:GetResText
+Misc:CutPathView
+Misc:DeleteInputCells
+Misc:ChangeValueofRange
+Misc:ReplaceRangeValues
+Misc:GetValueofCellbyName
+Misc:DuplicateRow
+Misc:GetStringofCellbyName
+Misc:GetCellByName
+Misc:ChangeCellValue
+Misc:GetDocumentType
+Misc:GetNumberFormatType
+Misc:ProtectSheets
+Misc:UnprotectSheets
+Misc:GetRowIndex
+Misc:GetColumnIndex
+Misc:CopySheetbyName
+Misc:ToggleWindow
+Misc:CheckNewSheetname
+Misc:AddNewSheetName
+Misc:GetSheetIndex
+Misc:GetLastUsedRow
+Misc:ModifyBorderLineWidth
+Misc:AttachBasicMacroToEvent
+Misc:ModifyPropertyValue
+Misc:GetPropertyValueIndex
+Misc:DispatchSlot
+Misc:IsFatOffice
+Misc:GetLocale
+Misc:ToggleDesignMode
+Misc:isHighContrast
+Misc:CreateNewDocument
+Misc:DisposeDocument
+Misc:CalIsLeapYear
+ModuleControls
+ModuleControls:getControlModel
+ModuleControls:GetControlShape
+ModuleControls:getControlView
+ModuleControls:DisposeControl
+ModuleControls:GetControlGroupModel
+ModuleControls:GetRefValue
+ModuleControls:GetRefValueOfControlGroup
+ModuleControls:GetOptionGroupValue
+ModuleControls:WriteOptValueToCell
+ModuleControls:LoadDialog
+ModuleControls:GetFolderName
+ModuleControls:GetFileName
+ModuleControls:StoreDocument
+ModuleControls:AddFiltersToDialog
+ModuleControls:SwitchMousePointer
+ModuleControls:ShowOverwriteAllDialog
+ModuleControls:SetOVERWRITEToQuery
+ModuleControls:SetOVERWRITEToAlways
+ModuleControls:SetOVERWRITEToNever
+Strings
+Strings:ElimChar
+Strings:DeleteStr
+Strings:FindPartString
+Strings:PartStringInArray
+Strings:RTrimStr
+Strings:LTRimChar
+Strings:ArrayOutOfString
+Strings:ClearArray
+Strings:ClearMultiDimArray
+Strings:FieldinArray
+Strings:FieldinList
+Strings:IndexinArray
+Strings:MultiArrayInListbox
+Strings:StringInMultiArray
+Strings:GetIndexInMultiArray
+Strings:GetIndexForPartStringinMultiArray
+Strings:ArrayfromMultiArray
+Strings:ReplaceString
+Strings:FindSecondValue
+Strings:Power
+Strings:Round
+Strings:FileNameoutofPath
+Strings:GetFileNameExtension
+Strings:GetFileNameWithoutExtension
+Strings:DirectoryNameoutofPath
+Strings:CountCharsinString
+Strings:BubbleSortList
+Strings:GetValueoutofList
+Strings:AddListtoList
+Strings:CheckDouble
+UCB
+UCB:Main
+UCB:ReadDirectories
+UCB:AddFoldertoList
+UCB:AddFileNameToList
+UCB:RetrieveDocTitle
+UCB:GetRealFileContent
+UCB:CopyRecursively
+UCB:ShowHelperDialog
+UCB:SaveDataToFile
+UCB:LoadDataFromFile
+UCB:CreateFolder
+Untitled 1
+Standard
diff --git a/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_BeanShell.txt b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_BeanShell.txt
new file mode 100755
index 000000000000..5fd31835476e
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_BeanShell.txt
@@ -0,0 +1,14 @@
+My Macros
+OpenOffice.org Macros
+Capitalise
+capitalise.bsh
+HelloWorld
+helloworld.bsh
+Highlight
+ButtonPressHandler.bsh
+ShowDialog.bsh
+MemoryUsage
+memusage.bsh
+WordCount
+wordcount.bsh
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_JavaScript.txt b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_JavaScript.txt
new file mode 100755
index 000000000000..06f63f48530c
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_JavaScript.txt
@@ -0,0 +1,10 @@
+My Macros
+OpenOffice.org Macros
+ExportSheetsToHTML
+exportsheetstohtml.js
+HelloWorld
+helloworld.js
+Highlight
+ButtonPressHandler.js
+ShowDialog.js
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_Python.txt b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_Python.txt
new file mode 100755
index 000000000000..93f69e69e7b0
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_Python.txt
@@ -0,0 +1,10 @@
+My Macros
+OpenOffice.org Macros
+Capitalise
+capitalisePython
+HelloWorld
+HelloWorldPython
+pythonSamples
+TableSample
+createTable
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_RunMacro.txt b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_RunMacro.txt
new file mode 100755
index 000000000000..74378128ac9b
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_RunMacro.txt
@@ -0,0 +1,681 @@
+My Macros
+Standard
+Module1
+Module1:Main
+OpenOffice.org Macros
+Capitalise
+Capitalise:capitalise.bsh
+Capitalise:capitalisePython
+Depot
+Depot
+Depot:AddShortCuttoControl
+Depot:Buy
+Depot:CancelStockRate
+Depot:CancelTransaction
+Depot:CommitStockRate
+Depot:EnableTransactionControls
+Depot:HandleStocks
+Depot:Initialize
+Depot:InitializeStockRatesControls
+Depot:OpenStockRatePage
+Depot:Reset
+Depot:SelectStockname
+Depot:SelectStockNameForRates
+Depot:Sell
+Depot:SetupTransactionControls
+Depot:ToggleStockRateControls
+Depot:TransactionOk
+CommonLang
+CommonLang:CompleteMarketList
+CommonLang:InitializeStartUpModel
+CommonLang:LoadDepotDialogs
+CommonLang:LoadLanguage
+CommonLang:LocalizedCurrencies
+Currency
+Currency:CheckFormatType
+Currency:ChooseMarket
+Currency:CloseStartUpDialog
+Currency:ConvertStylesCurrencies
+Currency:DisposeDocument
+Currency:EnableGoOnButton
+Currency:Numberformat
+Currency:Startup
+Currency:SwitchNumberFormat
+Internet
+Internet:CalculateChartafterSplit
+Internet:CheckHistoryControls
+Internet:GetCurrentRate
+Internet:InsertCompanyHistory
+Internet:InternetUpdate
+Internet:StringToDate
+Internet:UpdateChart
+Internet:UpdateValue
+Lang_de
+Lang_de:LoadGermanLanguage
+tools
+tools:AddValueToCellContent
+tools:CellValuetoControl
+tools:CheckDocLocale
+tools:CheckInputDate
+tools:FillListbox
+tools:GetRowIndex
+tools:GetStockID
+tools:GetStockRowIndex
+tools:GetStocksCount
+tools:GetTransactionCount
+tools:InitializeStatusLine
+tools:InsertCurrentValue
+tools:MakeRangeVisible
+tools:RemoveSheet
+tools:RemoveStockRows
+tools:SplitCellValue
+Lang_en
+Lang_en:LoadEnglishLanguage
+Lang_fr
+Lang_fr:LoadFrenchLanguage
+Lang_it
+Lang_it:LoadItalianLanguage
+Lang_es
+Lang_es:LoadSpanishLanguage
+Lang_sv
+Lang_sv:LoadSwedishLanguage
+Lang_zh
+Lang_zh:LoadChineseSimpleLanguage
+Lang_tw
+Lang_tw:LoadChineseTradLanguage
+Lang_ko
+Lang_ko:LoadKoreanLanguage
+Lang_ja
+Lang_ja:LoadJapaneseLanguage
+Euro
+ConvertRun
+ConvertRun:AddRangeToListbox
+ConvertRun:AddSelectedRangeToSelRangesEnum
+ConvertRun:CheckLocale
+ConvertRun:CheckRangeSelection
+ConvertRun:ConvertRangesOrStylesOfDocument
+ConvertRun:ConvertWholeDocument
+ConvertRun:EmptySelection
+ConvertRun:EnableStep1DialogControls
+ConvertRun:FieldinList
+ConvertRun:GetPreSelectedRange
+ConvertRun:Main
+ConvertRun:RetrieveEnableValue
+ConvertRun:SelectListItem
+ConvertRun:SetOptionValuestoNull
+ConvertRun:SetStatusLineText
+AutoPilotRun
+AutoPilotRun:AssignFileName
+AutoPilotRun:CallFilePicker
+AutoPilotRun:CallFolderPicker
+AutoPilotRun:ChangeToNextProgressStep
+AutoPilotRun:ConvertDocuments
+AutoPilotRun:EnableStep2DialogControls
+AutoPilotRun:InitializeDocument
+AutoPilotRun:InitializeProgressPage
+AutoPilotRun:InitializeThirdStep
+AutoPilotRun:PreviousStep
+AutoPilotRun:StartAutoPilot
+AutoPilotRun:StoreDocument
+AutoPilotRun:SwapExtent
+AutoPilotRun:ToggleGoOnButton
+AutoPilotRun:ToggleProgressStep
+Hard
+Hard:AddSheetRanges
+Hard:CheckIfRangeisCurrency
+Hard:ConvertCellCurrencies
+Hard:ConvertThehardWay
+Hard:CountColumnsForRow
+Hard:CountRangeCells
+Hard:CreateRangeEnumeration
+Hard:CreateRangeList
+Hard:ModifyObjectValuewithCurrFactor
+Hard:SelectRange
+Soft
+Soft:AssignCellFormatRanges
+Soft:AssignRangestoStyle
+Soft:ConvertTheSoftWay
+Soft:CreateStyleEnumeration
+Soft:DeselectStyle
+Soft:GetAssignedRanges
+Soft:MakeStyleEnumeration
+Soft:RetrieveRangeNamefromAddress
+Soft:RetrieveRangeoutofRangeName
+Soft:RetrieveSheetoutofRangeName
+Init
+Init:InitializeControls
+Init:InitializeConverter
+Init:InitializeCurrencies
+Init:InitializeCurrencyValues
+Init:InitializeLanguages
+Init:InitializeLocales
+Init:InitializeResources
+Common
+Common:CancelTask
+Common:CheckFormatType
+Common:ConvertDocument
+Common:EndStatusLine
+Common:FillUpCurrencyListbox
+Common:IncreaseStatusValue
+Common:InitializeProgressbar
+Common:Numberformat
+Common:RetrieveDocumentObjects
+Common:SelectCurrency
+Common:StartConversion
+Common:SwitchNumberFormat
+Writer
+Writer:ConvertTextFields
+Writer:ConvertWriterTables
+Writer:ModifyObjectValuewithCurrFactor
+Protect
+Protect:AddSheettoUnprotectionlist
+Protect:CheckSheetProtection
+Protect:ExecutePasswordDialog
+Protect:ReadPassword
+Protect:RejectPassword
+Protect:ReprotectSheets
+Protect:UnprotectSheet
+Protect:UnprotectSheetsWithPassWord
+Protect:UnprotectSheetWithDialog
+ExportSheetsToHTML
+ExportSheetsToHTML:exportsheetstohtml.js
+FormWizard
+FormWizard
+FormWizard:CommitLastDocumentChanges
+FormWizard:DeleteFirstListboxEntry
+FormWizard:DeleteFirstTableListBoxEntry
+FormWizard:EmptyFieldsListboxes
+FormWizard:FillUpFieldsListbox
+FormWizard:FormGetFields
+FormWizard:InitializeLayoutSettings
+FormWizard:Main
+FormWizard:MainWithDefault
+FormWizard:NextStep
+FormWizard:PreviousStep
+FormWizard:StoreForm
+FormWizard:StoreFormInDatabase
+FormWizard:ToggleDatabasePage
+Layouter
+Layouter:ArrangeControls
+Layouter:ChangeArrangemode
+Layouter:ChangeBorderLayouts
+Layouter:ChangeLabelAlignments
+Layouter:ConfigurePageStyle
+Layouter:DestroyControlShapes
+Layouter:InitializeLabelValues
+Layouter:InsertControl
+Layouter:OpenFormDocument
+Layouter:SwitchAlignMode
+Layouter:SwitchArrangementButtons
+Layouter:SwitchBorderMode
+Layouter:ToggleAlignGroup
+Layouter:ToggleBorderGroup
+Layouter:ToggleLayoutPage
+Language
+Language:InitializeWidthList
+Language:LoadLanguage
+Language:SetDialogLanguage
+DBMeta
+DBMeta:AddOrRemoveBinaryFieldsToWidthList
+DBMeta:AssignFieldLength
+DBMeta:CreateCommandTypeList
+DBMeta:CreateDBForm
+DBMeta:GetConnection
+DBMeta:GetCurrentMetaValues
+DBMeta:GetDatabaseNames
+DBMeta:GetDBMetaData
+DBMeta:GetSelectedDBMetaData
+DBMeta:GetSpecificFieldNames
+DBMeta:GetTableMetaData
+tools
+tools:CalcUniqueContentName
+tools:CountItemsInArray
+tools:GetDBHeight
+tools:GetFilterName
+tools:GetFormWizardPaths
+tools:GetPeerSize
+tools:GetPoint
+tools:GetPreferredHeight
+tools:GetPreferredWidth
+tools:GetSize
+tools:ImportStyles
+tools:PixelTo100thMMX
+tools:PixelTo100thMMY
+tools:RemoveNirwanaShapes
+tools:RemoveShapes
+tools:SetNumerics
+tools:SetProgressValue
+tools:ShapesToNirwana
+tools:TwipTo100telMM
+tools:TwipToCM
+tools:TwipToPixel
+develop
+develop:AdjustLineWidth
+develop:CheckJustifiedPosition
+develop:CheckOuterPoints
+develop:ControlCaptionstoStandardLayout
+develop:GetCorrWidth
+develop:GetLabelDiffHeight
+develop:GroupShapesTogether
+develop:InitializePosSizes
+develop:InsertDBControl
+develop:InsertTextControl
+develop:InsertTimeStampShape
+develop:PositionControls
+develop:PositionGridControl
+develop:RepositionColumnarLeftControls
+develop:ResetDBShape
+develop:ResetPosSizes
+develop:SetupGridColumn
+Gimmicks
+GetTexts
+GetTexts:GetAnnotations
+GetTexts:GetCalcGraphicNames
+GetTexts:GetCalcStrings
+GetTexts:GetCellTexts
+GetTexts:GetChartStrings
+GetTexts:GetControlContent
+GetTexts:GetControlStrings
+GetTexts:GetDocumentProps
+GetTexts:GetDrawPageTitles
+GetTexts:GetDrawStrings
+GetTexts:GetFrameTexts
+GetTexts:GetGraphicNames
+GetTexts:GetHyperlinks
+GetTexts:GetLinkedFileNames
+GetTexts:GetNamedRanges
+GetTexts:GetPageStrings
+GetTexts:GetParagraphTexts
+GetTexts:GetSectionNames
+GetTexts:GetStyles
+GetTexts:GetTextFieldStrings
+GetTexts:GetWriterStrings
+GetTexts:Main
+GetTexts:MakeLogHeadLine
+GetTexts:WriteStringtoLogFile
+Userfields
+Userfields:AddRecord
+Userfields:DeleteCurrentSettings
+Userfields:FillDialog
+Userfields:FillupTextFields
+Userfields:InitializeUserFamily
+Userfields:SaveSettings
+Userfields:ScrollControls
+Userfields:ScrollTextFieldInfo
+Userfields:SelectCurrentFields
+Userfields:StartChangesUserfields
+Userfields:StepToRecord
+Userfields:StopMacro
+Userfields:ToggleButtons
+ChangeAllChars
+ChangeAllChars:ChangeAllChars
+ChangeAllChars:ReplaceAllStrings
+ChangeAllChars:ReplaceStrings
+AutoText
+AutoText:InsertStringToCell
+AutoText:Main
+ReadDir
+ReadDir:AdjustPageHeight
+ReadDir:CalculateXPoint
+ReadDir:CheckPageWidth
+ReadDir:CloseDialog
+ReadDir:CreateTextShape
+ReadDir:DrawLine
+ReadDir:GetSourceDirectory
+ReadDir:Main
+ReadDir:ReadSourceDirectory
+ReadDir:SetNewLevels
+ReadDir:ToggleDialogControls
+ReadDir:TreeInfo
+HelloWorld
+HelloWorld:helloworld.bsh
+HelloWorld:helloworld.js
+HelloWorld:HelloWorld.printHW
+HelloWorld:HelloWorldPython
+Highlight
+Highlight:ButtonPressHandler.bsh
+Highlight:ButtonPressHandler.js
+Highlight:HighlightText.showForm
+Highlight:ShowDialog.bsh
+Highlight:ShowDialog.js
+ImportWizard
+Main
+Main:CancelTask
+Main:CheckInstalledModule
+Main:CheckModuleInstallation
+Main:GetImportWizardPaths
+Main:Main
+Main:NextStep
+Main:PrevStep
+Main:RepaintHeaderPreview
+Main:TakeOverPathSettings
+Main:TemplateDirSearchDialog
+Main:ToggleCheckboxes
+Main:ToggleCheckboxesWithBoolean
+Main:ToggleNextButton
+DialogModul
+DialogModul:AssignPathToCurrentApplication
+DialogModul:CheckControlPath
+DialogModul:CheckInputPaths
+DialogModul:CheckMSImportAvailability
+DialogModul:CheckTextBoxPath
+DialogModul:FillStep_InputPaths
+DialogModul:FillStep_Progress
+DialogModul:FillStep_Summary
+DialogModul:FillStep_Welcome
+DialogModul:FillUpApplicationList
+DialogModul:FinalizeDialogButtons
+DialogModul:GetFilterTracingLogPath
+DialogModul:InitializePathsforCurrentApplication
+DialogModul:InitializeProgressPage
+DialogModul:MakeSummaryString
+DialogModul:SaveStep_InputPath
+DialogModul:SetProgressDisplay
+DialogModul:SetupMSConfiguration
+DialogModul:SetupXMLConfiguration
+DialogModul:TakoverFolderName
+DialogModul:ToggleInputPaths
+Language
+Language:GetApplResourceArray
+Language:LoadLanguage
+FilesModul
+FilesModul:AddCollectionPath
+FilesModul:AddFilterNameToPathItem
+FilesModul:AddListtoFilesList
+FilesModul:AddLogStatistics
+FilesModul:CheckIfMacroExists
+FilesModul:CheckIfToAddPathToCollection
+FilesModul:CheckPassWordProtection
+FilesModul:CollectPaths
+FilesModul:ConcatComment
+FilesModul:ConvertAllDocuments
+FilesModul:CreateLogDocument
+FilesModul:CreateLogTable
+FilesModul:GetApplicationIndex
+FilesModul:GetFilterName
+FilesModul:GetFilterTracingLogPath
+FilesModul:GetSize
+FilesModul:GetTargetTemplatePath
+FilesModul:InsertCommandButtonatViewCursor
+FilesModul:InsertCommentToLogCell
+FilesModul:InsertHyperLinkToLogCell
+FilesModul:InsertSourceUrlToLogDocument
+FilesModul:InsertTargetUrlToLogDocument
+FilesModul:InterruptProcess
+FilesModul:MergeRange
+FilesModul:OpenLogDocument
+FilesModul:ReadCollectionPaths
+FilesModul:SearchArrayforPartString
+FilesModul:SetExtension
+API
+API:GetDefaultPath
+API:GetTemplateDefaultPath
+API:OpenRegKey
+API:QueryValue
+API:QueryValueEx
+MemoryUsage
+MemoryUsage:MemoryUsage.updateMemoryUsage
+MemoryUsage:memusage.bsh
+Schedule
+OwnEvents
+OwnEvents:CalcmdInsertData
+OwnEvents:CalCreateDateStrOfInput
+OwnEvents:CalGetNameOfEvent
+OwnEvents:CalLoadOwnData
+OwnEvents:CalSaveOwnData
+OwnEvents:CheckInsertedDates
+OwnEvents:GetDateUnits
+OwnEvents:GetOwnMonth
+OwnEvents:GetSelectedDateUnits
+OwnEvents:Main
+CalendarMain
+CalendarMain:AddNumberFormat
+CalendarMain:CalAutopilotTable
+CalendarMain:CalChooseCalendar
+CalendarMain:CalcmdCancel
+CalendarMain:CalcmdOk
+CalendarMain:SetupNumberFormatter
+BankHoliday
+BankHoliday:AddFollowUpHolidays
+BankHoliday:CalEasterTable
+BankHoliday:CalGetIntOfShortMonthName
+BankHoliday:CalInitGlobalVariablesDate
+BankHoliday:CalInsertBankholiday
+BankHoliday:CalInsertOwnDataInTables
+BankHoliday:CalMaxDayInMonth
+BankHoliday:CalOrthodoxEasterTable
+BankHoliday:GetMonthDate
+BankHoliday:GetNextWeekDay
+BankHoliday:Main
+DlgControl
+DlgControl:CalClearInputMask
+DlgControl:CalcmdDeleteSelect
+DlgControl:CalmdSwitchOwnDataOrGeneral
+DlgControl:CalMouseMoved
+DlgControl:CalSaveOwnEventControls
+DlgControl:CalUpdateNewEventFrame
+DlgControl:Main
+DlgControl:MouseLeavesImage
+DlgControl:SelectState
+DlgControl:ToggleInsertButton
+Language
+Language:LoadLanguage
+CreateTable
+CreateTable:CalCreateMonthTable
+CreateTable:CalCreateYearTable
+CreateTable:FormatCalCells
+GermanHolidays
+GermanHolidays:CalFindWholeYearHolidays_GERMANY
+GermanHolidays:CalGetGermanLandAtMousePos
+GermanHolidays:Main
+LocalHolidays
+LocalHolidays:CalculateChineseNewYear
+LocalHolidays:CalculateJapaneseAutumnDay
+LocalHolidays:CalculateJapaneseSpringDay
+LocalHolidays:CalculateturkishReligousHolidays
+LocalHolidays:FindWholeYearHolidays_CN
+LocalHolidays:FindWholeYearHolidays_DK
+LocalHolidays:FindWholeYearHolidays_FI
+LocalHolidays:FindWholeYearHolidays_FRANCE
+LocalHolidays:FindWholeYearHolidays_GREEK
+LocalHolidays:FindWholeYearHolidays_ITA
+LocalHolidays:FindWholeYearHolidays_JP
+LocalHolidays:FindWholeYearHolidays_NL
+LocalHolidays:FindWholeYearHolidays_PL
+LocalHolidays:FindWholeYearHolidays_PORT
+LocalHolidays:FindWholeYearHolidays_RU
+LocalHolidays:FindWholeYearHolidays_SPAIN
+LocalHolidays:FindWholeYearHolidays_SWED
+LocalHolidays:FindWholeYearHolidays_TRK
+LocalHolidays:FindWholeYearHolidays_TW
+LocalHolidays:FindWholeYearHolidays_US
+LocalHolidays:Main
+ScriptBindingLibrary
+Template
+ModuleAgenda
+ModuleAgenda:CreateBookMarkCursor
+ModuleAgenda:DeleteButtons
+ModuleAgenda:FinishAgenda
+ModuleAgenda:GetOptionValues
+ModuleAgenda:Initialize
+ModuleAgenda:LoadLanguageAgenda
+ModuleAgenda:ModifyTemplate
+ModuleAgenda:NewTopic
+Correspondence
+Correspondence:Database
+Correspondence:GetFieldName
+Correspondence:InsertDBField
+Correspondence:InsertPlaceholder
+Correspondence:LoadLanguageCorrespondence
+Correspondence:Main
+Correspondence:OK
+Correspondence:Placeholder
+Samples
+Samples:CloseStyleDialog
+Samples:KillTempFile
+Samples:PrepareForEditing
+Samples:RestoreCurrentStyles
+Samples:SaveCurrentStyles
+Samples:SelectStyle
+Samples:ShowStyles
+Autotext
+Autotext:CreateBullet
+Autotext:CreatePlaceholder
+Autotext:CreateUserDatafield
+Autotext:Main
+Tools
+ModuleControls
+ModuleControls:AddFiltersToDialog
+ModuleControls:DisposeControl
+ModuleControls:GetControlGroupModel
+ModuleControls:getControlModel
+ModuleControls:GetControlShape
+ModuleControls:getControlView
+ModuleControls:GetFileName
+ModuleControls:GetFolderName
+ModuleControls:GetOptionGroupValue
+ModuleControls:GetRefValue
+ModuleControls:GetRefValueOfControlGroup
+ModuleControls:LoadDialog
+ModuleControls:SetOVERWRITEToAlways
+ModuleControls:SetOVERWRITEToNever
+ModuleControls:SetOVERWRITEToQuery
+ModuleControls:ShowOverwriteAllDialog
+ModuleControls:StoreDocument
+ModuleControls:SwitchMousePointer
+ModuleControls:WriteOptValueToCell
+Strings
+Strings:AddListtoList
+Strings:ArrayfromMultiArray
+Strings:ArrayOutOfString
+Strings:BubbleSortList
+Strings:CheckDouble
+Strings:ClearArray
+Strings:ClearMultiDimArray
+Strings:CountCharsinString
+Strings:DeleteStr
+Strings:DirectoryNameoutofPath
+Strings:ElimChar
+Strings:FieldinArray
+Strings:FieldinList
+Strings:FileNameoutofPath
+Strings:FindPartString
+Strings:FindSecondValue
+Strings:GetFileNameExtension
+Strings:GetFileNameWithoutExtension
+Strings:GetIndexForPartStringinMultiArray
+Strings:GetIndexInMultiArray
+Strings:GetValueoutofList
+Strings:IndexinArray
+Strings:LTRimChar
+Strings:MultiArrayInListbox
+Strings:PartStringInArray
+Strings:Power
+Strings:ReplaceString
+Strings:Round
+Strings:RTrimStr
+Strings:StringInMultiArray
+Misc
+Misc:AddNewSheetName
+Misc:AttachBasicMacroToEvent
+Misc:CalIsLeapYear
+Misc:ChangeCellValue
+Misc:ChangeValueofRange
+Misc:CheckNewSheetname
+Misc:ConnecttoDatabase
+Misc:CopySheetbyName
+Misc:CreateNewDocument
+Misc:CutPathView
+Misc:DeleteInputCells
+Misc:DispatchSlot
+Misc:DisposeDocument
+Misc:DuplicateRow
+Misc:GetCellByName
+Misc:GetColumnIndex
+Misc:GetDocumentType
+Misc:GetLastUsedRow
+Misc:GetLocale
+Misc:GetNumberFormatType
+Misc:GetOfficeSubPath
+Misc:GetPathSettings
+Misc:GetProductname
+Misc:GetPropertyValueIndex
+Misc:GetRegistryKeyContent
+Misc:GetResText
+Misc:GetRowIndex
+Misc:GetSheetIndex
+Misc:GetStarOfficeLocale
+Misc:GetStringofCellbyName
+Misc:GetValueofCellbyName
+Misc:InitResources
+Misc:IsFatOffice
+Misc:isHighContrast
+Misc:Main
+Misc:ModifyBorderLineWidth
+Misc:ModifyPropertyValue
+Misc:OpenDocument
+Misc:ProtectSheets
+Misc:RegisterNewDataSource
+Misc:ReplaceRangeValues
+Misc:RetrieveFileName
+Misc:ShowNoOfficePathError
+Misc:TaskonDesktop
+Misc:ToggleDesignMode
+Misc:ToggleWindow
+Misc:UnprotectSheets
+UCB
+UCB:AddFileNameToList
+UCB:AddFoldertoList
+UCB:CopyRecursively
+UCB:CreateFolder
+UCB:GetRealFileContent
+UCB:LoadDataFromFile
+UCB:Main
+UCB:ReadDirectories
+UCB:RetrieveDocTitle
+UCB:SaveDataToFile
+UCB:ShowHelperDialog
+Listbox
+Listbox:AddSingleItemToListbox
+Listbox:CopyListboxItems
+Listbox:EmptyListbox
+Listbox:FormMoveAll
+Listbox:FormMoveSelected
+Listbox:FormRemoveAll
+Listbox:FormRemoveSelected
+Listbox:FormSetMoveRights
+Listbox:GetItemPos
+Listbox:GetSelectedListboxItems
+Listbox:InitializeListboxProcedures
+Listbox:MergeList
+Listbox:MoveOrderedSelectedListbox
+Listbox:MoveSelectedListBox
+Listbox:RemoveListboxItemByName
+Listbox:RemoveListItems
+Listbox:RemoveSelected
+Listbox:SelectListboxItem
+Listbox:SetNewSelection
+Listbox:ToggleListboxControls
+Debug
+Debug:ActivateReadOnlyFlag
+Debug:DeactivateReadOnlyFlag
+Debug:FillDocument
+Debug:printdbgInfo
+Debug:ProtectCurrentSheets
+Debug:SetBasicReadOnlyFlag
+Debug:ShowArray
+Debug:ShowAvailableServiceNames
+Debug:ShowCommands
+Debug:ShowElementNames
+Debug:ShowNameValuePair
+Debug:ShowPropertyValues
+Debug:ShowSupportedServiceNames
+Debug:WritedbgInfo
+Debug:WriteDbgString
+WordCount
+WordCount:wordcount.bsh
+pythonSamples
+TableSample
+TableSample:createTable
+Untitled 1
+Standard
diff --git a/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_BasicOrganizer.txt b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_BasicOrganizer.txt
new file mode 100755
index 000000000000..49400346a1a0
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_BasicOrganizer.txt
@@ -0,0 +1,657 @@
+My Macros
+Standard
+Module1
+Module1:Main
+OpenOffice.org Macros
+Depot
+CommonLang
+CommonLang:LoadLanguage
+CommonLang:CompleteMarketList
+CommonLang:LocalizedCurrencies
+CommonLang:LoadDepotDialogs
+CommonLang:InitializeStartUpModel
+Currency
+Currency:Startup
+Currency:EnableGoOnButton
+Currency:CloseStartUpDialog
+Currency:DisposeDocument
+Currency:ChooseMarket
+Currency:ConvertStylesCurrencies
+Currency:SwitchNumberFormat
+Currency:Numberformat
+Currency:CheckFormatType
+Depot
+Depot:Initialize
+Depot:Buy
+Depot:Sell
+Depot:Reset
+Depot:TransactionOk
+Depot:SelectStockname
+Depot:HandleStocks
+Depot:CancelStockRate
+Depot:CancelTransaction
+Depot:CommitStockRate
+Depot:EnableTransactionControls
+Depot:SetupTransactionControls
+Depot:AddShortCuttoControl
+Depot:OpenStockRatePage
+Depot:SelectStockNameForRates
+Depot:ToggleStockRateControls
+Depot:InitializeStockRatesControls
+Internet
+Internet:CheckHistoryControls
+Internet:InsertCompanyHistory
+Internet:InternetUpdate
+Internet:GetCurrentRate
+Internet:UpdateValue
+Internet:StringToDate
+Internet:UpdateChart
+Internet:CalculateChartafterSplit
+Lang_de
+Lang_de:LoadGermanLanguage
+Lang_en
+Lang_en:LoadEnglishLanguage
+Lang_es
+Lang_es:LoadSpanishLanguage
+Lang_fr
+Lang_fr:LoadFrenchLanguage
+Lang_it
+Lang_it:LoadItalianLanguage
+Lang_ja
+Lang_ja:LoadJapaneseLanguage
+Lang_ko
+Lang_ko:LoadKoreanLanguage
+Lang_sv
+Lang_sv:LoadSwedishLanguage
+Lang_tw
+Lang_tw:LoadChineseTradLanguage
+Lang_zh
+Lang_zh:LoadChineseSimpleLanguage
+tools
+tools:RemoveSheet
+tools:InitializeStatusLine
+tools:MakeRangeVisible
+tools:GetRowIndex
+tools:GetTransactionCount
+tools:GetStocksCount
+tools:FillListbox
+tools:CellValuetoControl
+tools:RemoveStockRows
+tools:AddValueToCellContent
+tools:CheckInputDate
+tools:InsertCurrentValue
+tools:SplitCellValue
+tools:GetStockRowIndex
+tools:GetStockID
+tools:CheckDocLocale
+Euro
+AutoPilotRun
+AutoPilotRun:StartAutoPilot
+AutoPilotRun:ConvertDocuments
+AutoPilotRun:InitializeDocument
+AutoPilotRun:ChangeToNextProgressStep
+AutoPilotRun:StoreDocument
+AutoPilotRun:SwapExtent
+AutoPilotRun:InitializeThirdStep
+AutoPilotRun:ToggleProgressStep
+AutoPilotRun:EnableStep2DialogControls
+AutoPilotRun:InitializeProgressPage
+AutoPilotRun:AssignFileName
+AutoPilotRun:ToggleGoOnButton
+AutoPilotRun:CallFolderPicker
+AutoPilotRun:CallFilePicker
+AutoPilotRun:PreviousStep
+Common
+Common:RetrieveDocumentObjects
+Common:CancelTask
+Common:ConvertDocument
+Common:SwitchNumberFormat
+Common:Numberformat
+Common:CheckFormatType
+Common:StartConversion
+Common:IncreaseStatusValue
+Common:SelectCurrency
+Common:FillUpCurrencyListbox
+Common:InitializeProgressbar
+Common:EndStatusLine
+ConvertRun
+ConvertRun:Main
+ConvertRun:SelectListItem
+ConvertRun:RetrieveEnableValue
+ConvertRun:EnableStep1DialogControls
+ConvertRun:ConvertRangesOrStylesOfDocument
+ConvertRun:ConvertWholeDocument
+ConvertRun:EmptySelection
+ConvertRun:AddSelectedRangeToSelRangesEnum
+ConvertRun:GetPreSelectedRange
+ConvertRun:AddRangeToListbox
+ConvertRun:CheckRangeSelection
+ConvertRun:FieldinList
+ConvertRun:CheckLocale
+ConvertRun:SetOptionValuestoNull
+ConvertRun:SetStatusLineText
+Hard
+Hard:CreateRangeList
+Hard:CreateRangeEnumeration
+Hard:AddSheetRanges
+Hard:SelectRange
+Hard:ConvertThehardWay
+Hard:ConvertCellCurrencies
+Hard:ModifyObjectValuewithCurrFactor
+Hard:CheckIfRangeisCurrency
+Hard:CountColumnsForRow
+Hard:CountRangeCells
+Init
+Init:InitializeResources
+Init:InitializeLanguages
+Init:InitializeCurrencies
+Init:InitializeControls
+Init:InitializeConverter
+Init:InitializeCurrencyValues
+Init:InitializeLocales
+Protect
+Protect:UnprotectSheetsWithPassWord
+Protect:UnprotectSheet
+Protect:UnprotectSheetWithDialog
+Protect:ExecutePasswordDialog
+Protect:ReadPassword
+Protect:RejectPassword
+Protect:ReprotectSheets
+Protect:AddSheettoUnprotectionlist
+Protect:CheckSheetProtection
+Soft
+Soft:CreateStyleEnumeration
+Soft:MakeStyleEnumeration
+Soft:AssignRangestoStyle
+Soft:AssignCellFormatRanges
+Soft:DeselectStyle
+Soft:RetrieveRangeNamefromAddress
+Soft:RetrieveSheetoutofRangeName
+Soft:RetrieveRangeoutofRangeName
+Soft:ConvertTheSoftWay
+Soft:GetAssignedRanges
+Writer
+Writer:ConvertWriterTables
+Writer:ModifyObjectValuewithCurrFactor
+Writer:ConvertTextFields
+FormWizard
+DBMeta
+DBMeta:GetDatabaseNames
+DBMeta:GetSelectedDBMetaData
+DBMeta:GetConnection
+DBMeta:GetDBMetaData
+DBMeta:GetTableMetaData
+DBMeta:GetSpecificFieldNames
+DBMeta:CreateDBForm
+DBMeta:AddOrRemoveBinaryFieldsToWidthList
+DBMeta:CreateCommandTypeList
+DBMeta:GetCurrentMetaValues
+DBMeta:AssignFieldLength
+develop
+develop:PositionControls
+develop:ResetPosSizes
+develop:RepositionColumnarLeftControls
+develop:ResetDBShape
+develop:InitializePosSizes
+develop:InsertTextControl
+develop:InsertDBControl
+develop:InsertTimeStampShape
+develop:GetLabelDiffHeight
+develop:CheckJustifiedPosition
+develop:GetCorrWidth
+develop:AdjustLineWidth
+develop:CheckOuterPoints
+develop:PositionGridControl
+develop:SetupGridColumn
+develop:ControlCaptionstoStandardLayout
+develop:GroupShapesTogether
+FormWizard
+FormWizard:Main
+FormWizard:MainWithDefault
+FormWizard:FormGetFields
+FormWizard:FillUpFieldsListbox
+FormWizard:PreviousStep
+FormWizard:NextStep
+FormWizard:InitializeLayoutSettings
+FormWizard:ToggleDatabasePage
+FormWizard:CommitLastDocumentChanges
+FormWizard:StoreFormInDatabase
+FormWizard:StoreForm
+FormWizard:EmptyFieldsListboxes
+FormWizard:DeleteFirstTableListBoxEntry
+FormWizard:DeleteFirstListboxEntry
+Language
+Language:LoadLanguage
+Language:SetDialogLanguage
+Language:InitializeWidthList
+Layouter
+Layouter:InsertControl
+Layouter:ArrangeControls
+Layouter:OpenFormDocument
+Layouter:InitializeLabelValues
+Layouter:ConfigurePageStyle
+Layouter:ChangeBorderLayouts
+Layouter:ChangeLabelAlignments
+Layouter:ChangeArrangemode
+Layouter:ToggleBorderGroup
+Layouter:ToggleAlignGroup
+Layouter:ToggleLayoutPage
+Layouter:DestroyControlShapes
+Layouter:SwitchArrangementButtons
+Layouter:SwitchBorderMode
+Layouter:SwitchAlignMode
+tools
+tools:SetProgressValue
+tools:GetPreferredWidth
+tools:GetPreferredHeight
+tools:GetPeerSize
+tools:TwipToCM
+tools:TwipTo100telMM
+tools:TwipToPixel
+tools:PixelTo100thMMX
+tools:PixelTo100thMMY
+tools:GetPoint
+tools:GetSize
+tools:ImportStyles
+tools:SetNumerics
+tools:RemoveShapes
+tools:RemoveNirwanaShapes
+tools:ShapesToNirwana
+tools:CalcUniqueContentName
+tools:CountItemsInArray
+tools:GetDBHeight
+tools:GetFormWizardPaths
+tools:GetFilterName
+Gimmicks
+AutoText
+AutoText:Main
+AutoText:InsertStringToCell
+ChangeAllChars
+ChangeAllChars:ChangeAllChars
+ChangeAllChars:ReplaceAllStrings
+ChangeAllChars:ReplaceStrings
+GetTexts
+GetTexts:Main
+GetTexts:GetCalcStrings
+GetTexts:GetCellTexts
+GetTexts:GetAnnotations
+GetTexts:GetNamedRanges
+GetTexts:GetCalcGraphicNames
+GetTexts:GetParagraphTexts
+GetTexts:GetChartStrings
+GetTexts:GetFrameTexts
+GetTexts:GetTextFieldStrings
+GetTexts:GetLinkedFileNames
+GetTexts:GetSectionNames
+GetTexts:GetWriterStrings
+GetTexts:GetDrawPageTitles
+GetTexts:GetPageStrings
+GetTexts:GetDrawStrings
+GetTexts:GetDocumentProps
+GetTexts:GetHyperlinks
+GetTexts:GetGraphicNames
+GetTexts:GetStyles
+GetTexts:GetControlStrings
+GetTexts:GetControlContent
+GetTexts:WriteStringtoLogFile
+GetTexts:MakeLogHeadLine
+ReadDir
+ReadDir:Main
+ReadDir:TreeInfo
+ReadDir:CreateTextShape
+ReadDir:CalculateXPoint
+ReadDir:DrawLine
+ReadDir:GetSourceDirectory
+ReadDir:ReadSourceDirectory
+ReadDir:CloseDialog
+ReadDir:AdjustPageHeight
+ReadDir:SetNewLevels
+ReadDir:CheckPageWidth
+ReadDir:ToggleDialogControls
+Userfields
+Userfields:StartChangesUserfields
+Userfields:FillDialog
+Userfields:ScrollControls
+Userfields:ScrollTextFieldInfo
+Userfields:StopMacro
+Userfields:SaveSettings
+Userfields:ToggleButtons
+Userfields:InitializeUserFamily
+Userfields:AddRecord
+Userfields:FillupTextFields
+Userfields:StepToRecord
+Userfields:SelectCurrentFields
+Userfields:DeleteCurrentSettings
+ImportWizard
+API
+API:OpenRegKey
+API:GetDefaultPath
+API:GetTemplateDefaultPath
+API:QueryValueEx
+API:QueryValue
+DialogModul
+DialogModul:FillStep_Welcome
+DialogModul:FillStep_InputPaths
+DialogModul:FillUpApplicationList
+DialogModul:InitializePathsforCurrentApplication
+DialogModul:AssignPathToCurrentApplication
+DialogModul:SaveStep_InputPath
+DialogModul:ToggleInputPaths
+DialogModul:MakeSummaryString
+DialogModul:FillStep_Summary
+DialogModul:FillStep_Progress
+DialogModul:GetFilterTracingLogPath
+DialogModul:CheckMSImportAvailability
+DialogModul:SetupMSConfiguration
+DialogModul:SetupXMLConfiguration
+DialogModul:CheckControlPath
+DialogModul:CheckInputPaths
+DialogModul:CheckTextBoxPath
+DialogModul:InitializeProgressPage
+DialogModul:SetProgressDisplay
+DialogModul:TakoverFolderName
+DialogModul:FinalizeDialogButtons
+FilesModul
+FilesModul:ReadCollectionPaths
+FilesModul:GetApplicationIndex
+FilesModul:InterruptProcess
+FilesModul:AddCollectionPath
+FilesModul:SetExtension
+FilesModul:AddFilterNameToPathItem
+FilesModul:CheckIfToAddPathToCollection
+FilesModul:CollectPaths
+FilesModul:ConvertAllDocuments
+FilesModul:AddListtoFilesList
+FilesModul:GetTargetTemplatePath
+FilesModul:GetFilterName
+FilesModul:SearchArrayforPartString
+FilesModul:CreateLogTable
+FilesModul:GetSize
+FilesModul:InsertCommandButtonatViewCursor
+FilesModul:CreateLogDocument
+FilesModul:GetFilterTracingLogPath
+FilesModul:InsertTargetUrlToLogDocument
+FilesModul:InsertSourceUrlToLogDocument
+FilesModul:InsertHyperLinkToLogCell
+FilesModul:InsertCommentToLogCell
+FilesModul:AddLogStatistics
+FilesModul:CheckIfMacroExists
+FilesModul:CheckPassWordProtection
+FilesModul:OpenLogDocument
+FilesModul:MergeRange
+FilesModul:ConcatComment
+Language
+Language:LoadLanguage
+Language:GetApplResourceArray
+Main
+Main:Main
+Main:NextStep
+Main:PrevStep
+Main:CancelTask
+Main:TemplateDirSearchDialog
+Main:RepaintHeaderPreview
+Main:CheckModuleInstallation
+Main:CheckInstalledModule
+Main:ToggleCheckboxes
+Main:ToggleCheckboxesWithBoolean
+Main:ToggleNextButton
+Main:TakeOverPathSettings
+Main:GetImportWizardPaths
+Schedule
+BankHoliday
+BankHoliday:Main
+BankHoliday:CalEasterTable
+BankHoliday:CalOrthodoxEasterTable
+BankHoliday:CalInitGlobalVariablesDate
+BankHoliday:CalInsertBankholiday
+BankHoliday:CalMaxDayInMonth
+BankHoliday:CalGetIntOfShortMonthName
+BankHoliday:CalInsertOwnDataInTables
+BankHoliday:GetMonthDate
+BankHoliday:GetNextWeekDay
+BankHoliday:AddFollowUpHolidays
+CalendarMain
+CalendarMain:CalAutopilotTable
+CalendarMain:SetupNumberFormatter
+CalendarMain:AddNumberFormat
+CalendarMain:CalChooseCalendar
+CalendarMain:CalcmdCancel
+CalendarMain:CalcmdOk
+CreateTable
+CreateTable:CalCreateYearTable
+CreateTable:CalCreateMonthTable
+CreateTable:FormatCalCells
+DlgControl
+DlgControl:Main
+DlgControl:CalcmdDeleteSelect
+DlgControl:CalSaveOwnEventControls
+DlgControl:CalMouseMoved
+DlgControl:SelectState
+DlgControl:MouseLeavesImage
+DlgControl:CalClearInputMask
+DlgControl:CalmdSwitchOwnDataOrGeneral
+DlgControl:ToggleInsertButton
+DlgControl:CalUpdateNewEventFrame
+GermanHolidays
+GermanHolidays:Main
+GermanHolidays:CalGetGermanLandAtMousePos
+GermanHolidays:CalFindWholeYearHolidays_GERMANY
+Language
+Language:LoadLanguage
+LocalHolidays
+LocalHolidays:Main
+LocalHolidays:FindWholeYearHolidays_FRANCE
+LocalHolidays:FindWholeYearHolidays_SWED
+LocalHolidays:FindWholeYearHolidays_FI
+LocalHolidays:FindWholeYearHolidays_DK
+LocalHolidays:FindWholeYearHolidays_ITA
+LocalHolidays:FindWholeYearHolidays_TRK
+LocalHolidays:CalculateturkishReligousHolidays
+LocalHolidays:FindWholeYearHolidays_GREEK
+LocalHolidays:FindWholeYearHolidays_SPAIN
+LocalHolidays:FindWholeYearHolidays_PORT
+LocalHolidays:FindWholeYearHolidays_NL
+LocalHolidays:FindWholeYearHolidays_PL
+LocalHolidays:FindWholeYearHolidays_RU
+LocalHolidays:FindWholeYearHolidays_US
+LocalHolidays:FindWholeYearHolidays_JP
+LocalHolidays:FindWholeYearHolidays_TW
+LocalHolidays:FindWholeYearHolidays_CN
+LocalHolidays:CalculateChineseNewYear
+LocalHolidays:CalculateJapaneseSpringDay
+LocalHolidays:CalculateJapaneseAutumnDay
+OwnEvents
+OwnEvents:Main
+OwnEvents:CalSaveOwnData
+OwnEvents:CalLoadOwnData
+OwnEvents:CalCreateDateStrOfInput
+OwnEvents:CalcmdInsertData
+OwnEvents:GetSelectedDateUnits
+OwnEvents:GetDateUnits
+OwnEvents:CalGetNameOfEvent
+OwnEvents:CheckInsertedDates
+OwnEvents:GetOwnMonth
+ScriptBindingLibrary
+Template
+Autotext
+Autotext:Main
+Autotext:CreateUserDatafield
+Autotext:CreateBullet
+Autotext:CreatePlaceholder
+Correspondence
+Correspondence:Main
+Correspondence:Placeholder
+Correspondence:Database
+Correspondence:LoadLanguageCorrespondence
+Correspondence:GetFieldName
+Correspondence:OK
+Correspondence:InsertDBField
+Correspondence:InsertPlaceholder
+ModuleAgenda
+ModuleAgenda:Initialize
+ModuleAgenda:LoadLanguageAgenda
+ModuleAgenda:ModifyTemplate
+ModuleAgenda:NewTopic
+ModuleAgenda:FinishAgenda
+ModuleAgenda:CreateBookMarkCursor
+ModuleAgenda:DeleteButtons
+ModuleAgenda:GetOptionValues
+Samples
+Samples:PrepareForEditing
+Samples:ShowStyles
+Samples:SelectStyle
+Samples:SaveCurrentStyles
+Samples:RestoreCurrentStyles
+Samples:CloseStyleDialog
+Samples:KillTempFile
+Tools
+Debug
+Debug:ActivateReadOnlyFlag
+Debug:DeactivateReadOnlyFlag
+Debug:SetBasicReadOnlyFlag
+Debug:WritedbgInfo
+Debug:WriteDbgString
+Debug:printdbgInfo
+Debug:ShowArray
+Debug:ShowPropertyValues
+Debug:ShowNameValuePair
+Debug:ShowElementNames
+Debug:ShowSupportedServiceNames
+Debug:ShowAvailableServiceNames
+Debug:ShowCommands
+Debug:ProtectCurrentSheets
+Debug:FillDocument
+Listbox
+Listbox:MergeList
+Listbox:RemoveListItems
+Listbox:InitializeListboxProcedures
+Listbox:CopyListboxItems
+Listbox:FormMoveSelected
+Listbox:FormMoveAll
+Listbox:FormRemoveSelected
+Listbox:FormRemoveAll
+Listbox:MoveSelectedListBox
+Listbox:MoveOrderedSelectedListbox
+Listbox:RemoveSelected
+Listbox:SetNewSelection
+Listbox:ToggleListboxControls
+Listbox:FormSetMoveRights
+Listbox:AddSingleItemToListbox
+Listbox:EmptyListbox
+Listbox:SelectListboxItem
+Listbox:GetSelectedListboxItems
+Listbox:RemoveListboxItemByName
+Listbox:GetItemPos
+Misc
+Misc:Main
+Misc:RegisterNewDataSource
+Misc:ConnecttoDatabase
+Misc:GetStarOfficeLocale
+Misc:GetRegistryKeyContent
+Misc:GetProductname
+Misc:OpenDocument
+Misc:TaskonDesktop
+Misc:RetrieveFileName
+Misc:GetPathSettings
+Misc:GetOfficeSubPath
+Misc:ShowNoOfficePathError
+Misc:InitResources
+Misc:GetResText
+Misc:CutPathView
+Misc:DeleteInputCells
+Misc:ChangeValueofRange
+Misc:ReplaceRangeValues
+Misc:GetValueofCellbyName
+Misc:DuplicateRow
+Misc:GetStringofCellbyName
+Misc:GetCellByName
+Misc:ChangeCellValue
+Misc:GetDocumentType
+Misc:GetNumberFormatType
+Misc:ProtectSheets
+Misc:UnprotectSheets
+Misc:GetRowIndex
+Misc:GetColumnIndex
+Misc:CopySheetbyName
+Misc:ToggleWindow
+Misc:CheckNewSheetname
+Misc:AddNewSheetName
+Misc:GetSheetIndex
+Misc:GetLastUsedRow
+Misc:ModifyBorderLineWidth
+Misc:AttachBasicMacroToEvent
+Misc:ModifyPropertyValue
+Misc:GetPropertyValueIndex
+Misc:DispatchSlot
+Misc:IsFatOffice
+Misc:GetLocale
+Misc:ToggleDesignMode
+Misc:isHighContrast
+Misc:CreateNewDocument
+Misc:DisposeDocument
+Misc:CalIsLeapYear
+ModuleControls
+ModuleControls:getControlModel
+ModuleControls:GetControlShape
+ModuleControls:getControlView
+ModuleControls:DisposeControl
+ModuleControls:GetControlGroupModel
+ModuleControls:GetRefValue
+ModuleControls:GetRefValueOfControlGroup
+ModuleControls:GetOptionGroupValue
+ModuleControls:WriteOptValueToCell
+ModuleControls:LoadDialog
+ModuleControls:GetFolderName
+ModuleControls:GetFileName
+ModuleControls:StoreDocument
+ModuleControls:AddFiltersToDialog
+ModuleControls:SwitchMousePointer
+ModuleControls:ShowOverwriteAllDialog
+ModuleControls:SetOVERWRITEToQuery
+ModuleControls:SetOVERWRITEToAlways
+ModuleControls:SetOVERWRITEToNever
+Strings
+Strings:ElimChar
+Strings:DeleteStr
+Strings:FindPartString
+Strings:PartStringInArray
+Strings:RTrimStr
+Strings:LTRimChar
+Strings:ArrayOutOfString
+Strings:ClearArray
+Strings:ClearMultiDimArray
+Strings:FieldinArray
+Strings:FieldinList
+Strings:IndexinArray
+Strings:MultiArrayInListbox
+Strings:StringInMultiArray
+Strings:GetIndexInMultiArray
+Strings:GetIndexForPartStringinMultiArray
+Strings:ArrayfromMultiArray
+Strings:ReplaceString
+Strings:FindSecondValue
+Strings:Power
+Strings:Round
+Strings:FileNameoutofPath
+Strings:GetFileNameExtension
+Strings:GetFileNameWithoutExtension
+Strings:DirectoryNameoutofPath
+Strings:CountCharsinString
+Strings:BubbleSortList
+Strings:GetValueoutofList
+Strings:AddListtoList
+Strings:CheckDouble
+UCB
+UCB:Main
+UCB:ReadDirectories
+UCB:AddFoldertoList
+UCB:AddFileNameToList
+UCB:RetrieveDocTitle
+UCB:GetRealFileContent
+UCB:CopyRecursively
+UCB:ShowHelperDialog
+UCB:SaveDataToFile
+UCB:LoadDataFromFile
+UCB:CreateFolder
+Untitled 1
+Standard
diff --git a/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_BeanShell.txt b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_BeanShell.txt
new file mode 100755
index 000000000000..5fd31835476e
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_BeanShell.txt
@@ -0,0 +1,14 @@
+My Macros
+OpenOffice.org Macros
+Capitalise
+capitalise.bsh
+HelloWorld
+helloworld.bsh
+Highlight
+ButtonPressHandler.bsh
+ShowDialog.bsh
+MemoryUsage
+memusage.bsh
+WordCount
+wordcount.bsh
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_JavaScript.txt b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_JavaScript.txt
new file mode 100755
index 000000000000..06f63f48530c
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_JavaScript.txt
@@ -0,0 +1,10 @@
+My Macros
+OpenOffice.org Macros
+ExportSheetsToHTML
+exportsheetstohtml.js
+HelloWorld
+helloworld.js
+Highlight
+ButtonPressHandler.js
+ShowDialog.js
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_Python.txt b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_Python.txt
new file mode 100755
index 000000000000..01e660758894
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_Python.txt
@@ -0,0 +1,8 @@
+My Macros
+OpenOffice.org Macros
+Capitalise
+HelloWorld
+HelloWorldPython
+pythonSamples
+TableSample
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_RunMacro.txt b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_RunMacro.txt
new file mode 100755
index 000000000000..5468a699f850
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_osx_RunMacro.txt
@@ -0,0 +1,679 @@
+My Macros
+Standard
+Module1
+Module1:Main
+OpenOffice.org Macros
+Capitalise
+Capitalise:capitalise.bsh
+Depot
+Depot
+Depot:AddShortCuttoControl
+Depot:Buy
+Depot:CancelStockRate
+Depot:CancelTransaction
+Depot:CommitStockRate
+Depot:EnableTransactionControls
+Depot:HandleStocks
+Depot:Initialize
+Depot:InitializeStockRatesControls
+Depot:OpenStockRatePage
+Depot:Reset
+Depot:SelectStockname
+Depot:SelectStockNameForRates
+Depot:Sell
+Depot:SetupTransactionControls
+Depot:ToggleStockRateControls
+Depot:TransactionOk
+CommonLang
+CommonLang:CompleteMarketList
+CommonLang:InitializeStartUpModel
+CommonLang:LoadDepotDialogs
+CommonLang:LoadLanguage
+CommonLang:LocalizedCurrencies
+Currency
+Currency:CheckFormatType
+Currency:ChooseMarket
+Currency:CloseStartUpDialog
+Currency:ConvertStylesCurrencies
+Currency:DisposeDocument
+Currency:EnableGoOnButton
+Currency:Numberformat
+Currency:Startup
+Currency:SwitchNumberFormat
+Internet
+Internet:CalculateChartafterSplit
+Internet:CheckHistoryControls
+Internet:GetCurrentRate
+Internet:InsertCompanyHistory
+Internet:InternetUpdate
+Internet:StringToDate
+Internet:UpdateChart
+Internet:UpdateValue
+Lang_de
+Lang_de:LoadGermanLanguage
+tools
+tools:AddValueToCellContent
+tools:CellValuetoControl
+tools:CheckDocLocale
+tools:CheckInputDate
+tools:FillListbox
+tools:GetRowIndex
+tools:GetStockID
+tools:GetStockRowIndex
+tools:GetStocksCount
+tools:GetTransactionCount
+tools:InitializeStatusLine
+tools:InsertCurrentValue
+tools:MakeRangeVisible
+tools:RemoveSheet
+tools:RemoveStockRows
+tools:SplitCellValue
+Lang_en
+Lang_en:LoadEnglishLanguage
+Lang_fr
+Lang_fr:LoadFrenchLanguage
+Lang_it
+Lang_it:LoadItalianLanguage
+Lang_es
+Lang_es:LoadSpanishLanguage
+Lang_sv
+Lang_sv:LoadSwedishLanguage
+Lang_zh
+Lang_zh:LoadChineseSimpleLanguage
+Lang_tw
+Lang_tw:LoadChineseTradLanguage
+Lang_ko
+Lang_ko:LoadKoreanLanguage
+Lang_ja
+Lang_ja:LoadJapaneseLanguage
+Euro
+ConvertRun
+ConvertRun:AddRangeToListbox
+ConvertRun:AddSelectedRangeToSelRangesEnum
+ConvertRun:CheckLocale
+ConvertRun:CheckRangeSelection
+ConvertRun:ConvertRangesOrStylesOfDocument
+ConvertRun:ConvertWholeDocument
+ConvertRun:EmptySelection
+ConvertRun:EnableStep1DialogControls
+ConvertRun:FieldinList
+ConvertRun:GetPreSelectedRange
+ConvertRun:Main
+ConvertRun:RetrieveEnableValue
+ConvertRun:SelectListItem
+ConvertRun:SetOptionValuestoNull
+ConvertRun:SetStatusLineText
+AutoPilotRun
+AutoPilotRun:AssignFileName
+AutoPilotRun:CallFilePicker
+AutoPilotRun:CallFolderPicker
+AutoPilotRun:ChangeToNextProgressStep
+AutoPilotRun:ConvertDocuments
+AutoPilotRun:EnableStep2DialogControls
+AutoPilotRun:InitializeDocument
+AutoPilotRun:InitializeProgressPage
+AutoPilotRun:InitializeThirdStep
+AutoPilotRun:PreviousStep
+AutoPilotRun:StartAutoPilot
+AutoPilotRun:StoreDocument
+AutoPilotRun:SwapExtent
+AutoPilotRun:ToggleGoOnButton
+AutoPilotRun:ToggleProgressStep
+Hard
+Hard:AddSheetRanges
+Hard:CheckIfRangeisCurrency
+Hard:ConvertCellCurrencies
+Hard:ConvertThehardWay
+Hard:CountColumnsForRow
+Hard:CountRangeCells
+Hard:CreateRangeEnumeration
+Hard:CreateRangeList
+Hard:ModifyObjectValuewithCurrFactor
+Hard:SelectRange
+Soft
+Soft:AssignCellFormatRanges
+Soft:AssignRangestoStyle
+Soft:ConvertTheSoftWay
+Soft:CreateStyleEnumeration
+Soft:DeselectStyle
+Soft:GetAssignedRanges
+Soft:MakeStyleEnumeration
+Soft:RetrieveRangeNamefromAddress
+Soft:RetrieveRangeoutofRangeName
+Soft:RetrieveSheetoutofRangeName
+Init
+Init:InitializeControls
+Init:InitializeConverter
+Init:InitializeCurrencies
+Init:InitializeCurrencyValues
+Init:InitializeLanguages
+Init:InitializeLocales
+Init:InitializeResources
+Common
+Common:CancelTask
+Common:CheckFormatType
+Common:ConvertDocument
+Common:EndStatusLine
+Common:FillUpCurrencyListbox
+Common:IncreaseStatusValue
+Common:InitializeProgressbar
+Common:Numberformat
+Common:RetrieveDocumentObjects
+Common:SelectCurrency
+Common:StartConversion
+Common:SwitchNumberFormat
+Writer
+Writer:ConvertTextFields
+Writer:ConvertWriterTables
+Writer:ModifyObjectValuewithCurrFactor
+Protect
+Protect:AddSheettoUnprotectionlist
+Protect:CheckSheetProtection
+Protect:ExecutePasswordDialog
+Protect:ReadPassword
+Protect:RejectPassword
+Protect:ReprotectSheets
+Protect:UnprotectSheet
+Protect:UnprotectSheetsWithPassWord
+Protect:UnprotectSheetWithDialog
+ExportSheetsToHTML
+ExportSheetsToHTML:exportsheetstohtml.js
+FormWizard
+FormWizard
+FormWizard:CommitLastDocumentChanges
+FormWizard:DeleteFirstListboxEntry
+FormWizard:DeleteFirstTableListBoxEntry
+FormWizard:EmptyFieldsListboxes
+FormWizard:FillUpFieldsListbox
+FormWizard:FormGetFields
+FormWizard:InitializeLayoutSettings
+FormWizard:Main
+FormWizard:MainWithDefault
+FormWizard:NextStep
+FormWizard:PreviousStep
+FormWizard:StoreForm
+FormWizard:StoreFormInDatabase
+FormWizard:ToggleDatabasePage
+Layouter
+Layouter:ArrangeControls
+Layouter:ChangeArrangemode
+Layouter:ChangeBorderLayouts
+Layouter:ChangeLabelAlignments
+Layouter:ConfigurePageStyle
+Layouter:DestroyControlShapes
+Layouter:InitializeLabelValues
+Layouter:InsertControl
+Layouter:OpenFormDocument
+Layouter:SwitchAlignMode
+Layouter:SwitchArrangementButtons
+Layouter:SwitchBorderMode
+Layouter:ToggleAlignGroup
+Layouter:ToggleBorderGroup
+Layouter:ToggleLayoutPage
+Language
+Language:InitializeWidthList
+Language:LoadLanguage
+Language:SetDialogLanguage
+DBMeta
+DBMeta:AddOrRemoveBinaryFieldsToWidthList
+DBMeta:AssignFieldLength
+DBMeta:CreateCommandTypeList
+DBMeta:CreateDBForm
+DBMeta:GetConnection
+DBMeta:GetCurrentMetaValues
+DBMeta:GetDatabaseNames
+DBMeta:GetDBMetaData
+DBMeta:GetSelectedDBMetaData
+DBMeta:GetSpecificFieldNames
+DBMeta:GetTableMetaData
+tools
+tools:CalcUniqueContentName
+tools:CountItemsInArray
+tools:GetDBHeight
+tools:GetFilterName
+tools:GetFormWizardPaths
+tools:GetPeerSize
+tools:GetPoint
+tools:GetPreferredHeight
+tools:GetPreferredWidth
+tools:GetSize
+tools:ImportStyles
+tools:PixelTo100thMMX
+tools:PixelTo100thMMY
+tools:RemoveNirwanaShapes
+tools:RemoveShapes
+tools:SetNumerics
+tools:SetProgressValue
+tools:ShapesToNirwana
+tools:TwipTo100telMM
+tools:TwipToCM
+tools:TwipToPixel
+develop
+develop:AdjustLineWidth
+develop:CheckJustifiedPosition
+develop:CheckOuterPoints
+develop:ControlCaptionstoStandardLayout
+develop:GetCorrWidth
+develop:GetLabelDiffHeight
+develop:GroupShapesTogether
+develop:InitializePosSizes
+develop:InsertDBControl
+develop:InsertTextControl
+develop:InsertTimeStampShape
+develop:PositionControls
+develop:PositionGridControl
+develop:RepositionColumnarLeftControls
+develop:ResetDBShape
+develop:ResetPosSizes
+develop:SetupGridColumn
+Gimmicks
+GetTexts
+GetTexts:GetAnnotations
+GetTexts:GetCalcGraphicNames
+GetTexts:GetCalcStrings
+GetTexts:GetCellTexts
+GetTexts:GetChartStrings
+GetTexts:GetControlContent
+GetTexts:GetControlStrings
+GetTexts:GetDocumentProps
+GetTexts:GetDrawPageTitles
+GetTexts:GetDrawStrings
+GetTexts:GetFrameTexts
+GetTexts:GetGraphicNames
+GetTexts:GetHyperlinks
+GetTexts:GetLinkedFileNames
+GetTexts:GetNamedRanges
+GetTexts:GetPageStrings
+GetTexts:GetParagraphTexts
+GetTexts:GetSectionNames
+GetTexts:GetStyles
+GetTexts:GetTextFieldStrings
+GetTexts:GetWriterStrings
+GetTexts:Main
+GetTexts:MakeLogHeadLine
+GetTexts:WriteStringtoLogFile
+Userfields
+Userfields:AddRecord
+Userfields:DeleteCurrentSettings
+Userfields:FillDialog
+Userfields:FillupTextFields
+Userfields:InitializeUserFamily
+Userfields:SaveSettings
+Userfields:ScrollControls
+Userfields:ScrollTextFieldInfo
+Userfields:SelectCurrentFields
+Userfields:StartChangesUserfields
+Userfields:StepToRecord
+Userfields:StopMacro
+Userfields:ToggleButtons
+ChangeAllChars
+ChangeAllChars:ChangeAllChars
+ChangeAllChars:ReplaceAllStrings
+ChangeAllChars:ReplaceStrings
+AutoText
+AutoText:InsertStringToCell
+AutoText:Main
+ReadDir
+ReadDir:AdjustPageHeight
+ReadDir:CalculateXPoint
+ReadDir:CheckPageWidth
+ReadDir:CloseDialog
+ReadDir:CreateTextShape
+ReadDir:DrawLine
+ReadDir:GetSourceDirectory
+ReadDir:Main
+ReadDir:ReadSourceDirectory
+ReadDir:SetNewLevels
+ReadDir:ToggleDialogControls
+ReadDir:TreeInfo
+HelloWorld
+HelloWorld:helloworld.bsh
+HelloWorld:helloworld.js
+HelloWorld:HelloWorld.printHW
+HelloWorld:HelloWorldPython
+Highlight
+Highlight:ButtonPressHandler.bsh
+Highlight:ButtonPressHandler.js
+Highlight:HighlightText.showForm
+Highlight:ShowDialog.bsh
+Highlight:ShowDialog.js
+ImportWizard
+Main
+Main:CancelTask
+Main:CheckInstalledModule
+Main:CheckModuleInstallation
+Main:GetImportWizardPaths
+Main:Main
+Main:NextStep
+Main:PrevStep
+Main:RepaintHeaderPreview
+Main:TakeOverPathSettings
+Main:TemplateDirSearchDialog
+Main:ToggleCheckboxes
+Main:ToggleCheckboxesWithBoolean
+Main:ToggleNextButton
+DialogModul
+DialogModul:AssignPathToCurrentApplication
+DialogModul:CheckControlPath
+DialogModul:CheckInputPaths
+DialogModul:CheckMSImportAvailability
+DialogModul:CheckTextBoxPath
+DialogModul:FillStep_InputPaths
+DialogModul:FillStep_Progress
+DialogModul:FillStep_Summary
+DialogModul:FillStep_Welcome
+DialogModul:FillUpApplicationList
+DialogModul:FinalizeDialogButtons
+DialogModul:GetFilterTracingLogPath
+DialogModul:InitializePathsforCurrentApplication
+DialogModul:InitializeProgressPage
+DialogModul:MakeSummaryString
+DialogModul:SaveStep_InputPath
+DialogModul:SetProgressDisplay
+DialogModul:SetupMSConfiguration
+DialogModul:SetupXMLConfiguration
+DialogModul:TakoverFolderName
+DialogModul:ToggleInputPaths
+Language
+Language:GetApplResourceArray
+Language:LoadLanguage
+FilesModul
+FilesModul:AddCollectionPath
+FilesModul:AddFilterNameToPathItem
+FilesModul:AddListtoFilesList
+FilesModul:AddLogStatistics
+FilesModul:CheckIfMacroExists
+FilesModul:CheckIfToAddPathToCollection
+FilesModul:CheckPassWordProtection
+FilesModul:CollectPaths
+FilesModul:ConcatComment
+FilesModul:ConvertAllDocuments
+FilesModul:CreateLogDocument
+FilesModul:CreateLogTable
+FilesModul:GetApplicationIndex
+FilesModul:GetFilterName
+FilesModul:GetFilterTracingLogPath
+FilesModul:GetSize
+FilesModul:GetTargetTemplatePath
+FilesModul:InsertCommandButtonatViewCursor
+FilesModul:InsertCommentToLogCell
+FilesModul:InsertHyperLinkToLogCell
+FilesModul:InsertSourceUrlToLogDocument
+FilesModul:InsertTargetUrlToLogDocument
+FilesModul:InterruptProcess
+FilesModul:MergeRange
+FilesModul:OpenLogDocument
+FilesModul:ReadCollectionPaths
+FilesModul:SearchArrayforPartString
+FilesModul:SetExtension
+API
+API:GetDefaultPath
+API:GetTemplateDefaultPath
+API:OpenRegKey
+API:QueryValue
+API:QueryValueEx
+MemoryUsage
+MemoryUsage:MemoryUsage.updateMemoryUsage
+MemoryUsage:memusage.bsh
+Schedule
+OwnEvents
+OwnEvents:CalcmdInsertData
+OwnEvents:CalCreateDateStrOfInput
+OwnEvents:CalGetNameOfEvent
+OwnEvents:CalLoadOwnData
+OwnEvents:CalSaveOwnData
+OwnEvents:CheckInsertedDates
+OwnEvents:GetDateUnits
+OwnEvents:GetOwnMonth
+OwnEvents:GetSelectedDateUnits
+OwnEvents:Main
+CalendarMain
+CalendarMain:AddNumberFormat
+CalendarMain:CalAutopilotTable
+CalendarMain:CalChooseCalendar
+CalendarMain:CalcmdCancel
+CalendarMain:CalcmdOk
+CalendarMain:SetupNumberFormatter
+BankHoliday
+BankHoliday:AddFollowUpHolidays
+BankHoliday:CalEasterTable
+BankHoliday:CalGetIntOfShortMonthName
+BankHoliday:CalInitGlobalVariablesDate
+BankHoliday:CalInsertBankholiday
+BankHoliday:CalInsertOwnDataInTables
+BankHoliday:CalMaxDayInMonth
+BankHoliday:CalOrthodoxEasterTable
+BankHoliday:GetMonthDate
+BankHoliday:GetNextWeekDay
+BankHoliday:Main
+DlgControl
+DlgControl:CalClearInputMask
+DlgControl:CalcmdDeleteSelect
+DlgControl:CalmdSwitchOwnDataOrGeneral
+DlgControl:CalMouseMoved
+DlgControl:CalSaveOwnEventControls
+DlgControl:CalUpdateNewEventFrame
+DlgControl:Main
+DlgControl:MouseLeavesImage
+DlgControl:SelectState
+DlgControl:ToggleInsertButton
+Language
+Language:LoadLanguage
+CreateTable
+CreateTable:CalCreateMonthTable
+CreateTable:CalCreateYearTable
+CreateTable:FormatCalCells
+GermanHolidays
+GermanHolidays:CalFindWholeYearHolidays_GERMANY
+GermanHolidays:CalGetGermanLandAtMousePos
+GermanHolidays:Main
+LocalHolidays
+LocalHolidays:CalculateChineseNewYear
+LocalHolidays:CalculateJapaneseAutumnDay
+LocalHolidays:CalculateJapaneseSpringDay
+LocalHolidays:CalculateturkishReligousHolidays
+LocalHolidays:FindWholeYearHolidays_CN
+LocalHolidays:FindWholeYearHolidays_DK
+LocalHolidays:FindWholeYearHolidays_FI
+LocalHolidays:FindWholeYearHolidays_FRANCE
+LocalHolidays:FindWholeYearHolidays_GREEK
+LocalHolidays:FindWholeYearHolidays_ITA
+LocalHolidays:FindWholeYearHolidays_JP
+LocalHolidays:FindWholeYearHolidays_NL
+LocalHolidays:FindWholeYearHolidays_PL
+LocalHolidays:FindWholeYearHolidays_PORT
+LocalHolidays:FindWholeYearHolidays_RU
+LocalHolidays:FindWholeYearHolidays_SPAIN
+LocalHolidays:FindWholeYearHolidays_SWED
+LocalHolidays:FindWholeYearHolidays_TRK
+LocalHolidays:FindWholeYearHolidays_TW
+LocalHolidays:FindWholeYearHolidays_US
+LocalHolidays:Main
+ScriptBindingLibrary
+Template
+ModuleAgenda
+ModuleAgenda:CreateBookMarkCursor
+ModuleAgenda:DeleteButtons
+ModuleAgenda:FinishAgenda
+ModuleAgenda:GetOptionValues
+ModuleAgenda:Initialize
+ModuleAgenda:LoadLanguageAgenda
+ModuleAgenda:ModifyTemplate
+ModuleAgenda:NewTopic
+Correspondence
+Correspondence:Database
+Correspondence:GetFieldName
+Correspondence:InsertDBField
+Correspondence:InsertPlaceholder
+Correspondence:LoadLanguageCorrespondence
+Correspondence:Main
+Correspondence:OK
+Correspondence:Placeholder
+Samples
+Samples:CloseStyleDialog
+Samples:KillTempFile
+Samples:PrepareForEditing
+Samples:RestoreCurrentStyles
+Samples:SaveCurrentStyles
+Samples:SelectStyle
+Samples:ShowStyles
+Autotext
+Autotext:CreateBullet
+Autotext:CreatePlaceholder
+Autotext:CreateUserDatafield
+Autotext:Main
+Tools
+ModuleControls
+ModuleControls:AddFiltersToDialog
+ModuleControls:DisposeControl
+ModuleControls:GetControlGroupModel
+ModuleControls:getControlModel
+ModuleControls:GetControlShape
+ModuleControls:getControlView
+ModuleControls:GetFileName
+ModuleControls:GetFolderName
+ModuleControls:GetOptionGroupValue
+ModuleControls:GetRefValue
+ModuleControls:GetRefValueOfControlGroup
+ModuleControls:LoadDialog
+ModuleControls:SetOVERWRITEToAlways
+ModuleControls:SetOVERWRITEToNever
+ModuleControls:SetOVERWRITEToQuery
+ModuleControls:ShowOverwriteAllDialog
+ModuleControls:StoreDocument
+ModuleControls:SwitchMousePointer
+ModuleControls:WriteOptValueToCell
+Strings
+Strings:AddListtoList
+Strings:ArrayfromMultiArray
+Strings:ArrayOutOfString
+Strings:BubbleSortList
+Strings:CheckDouble
+Strings:ClearArray
+Strings:ClearMultiDimArray
+Strings:CountCharsinString
+Strings:DeleteStr
+Strings:DirectoryNameoutofPath
+Strings:ElimChar
+Strings:FieldinArray
+Strings:FieldinList
+Strings:FileNameoutofPath
+Strings:FindPartString
+Strings:FindSecondValue
+Strings:GetFileNameExtension
+Strings:GetFileNameWithoutExtension
+Strings:GetIndexForPartStringinMultiArray
+Strings:GetIndexInMultiArray
+Strings:GetValueoutofList
+Strings:IndexinArray
+Strings:LTRimChar
+Strings:MultiArrayInListbox
+Strings:PartStringInArray
+Strings:Power
+Strings:ReplaceString
+Strings:Round
+Strings:RTrimStr
+Strings:StringInMultiArray
+Misc
+Misc:AddNewSheetName
+Misc:AttachBasicMacroToEvent
+Misc:CalIsLeapYear
+Misc:ChangeCellValue
+Misc:ChangeValueofRange
+Misc:CheckNewSheetname
+Misc:ConnecttoDatabase
+Misc:CopySheetbyName
+Misc:CreateNewDocument
+Misc:CutPathView
+Misc:DeleteInputCells
+Misc:DispatchSlot
+Misc:DisposeDocument
+Misc:DuplicateRow
+Misc:GetCellByName
+Misc:GetColumnIndex
+Misc:GetDocumentType
+Misc:GetLastUsedRow
+Misc:GetLocale
+Misc:GetNumberFormatType
+Misc:GetOfficeSubPath
+Misc:GetPathSettings
+Misc:GetProductname
+Misc:GetPropertyValueIndex
+Misc:GetRegistryKeyContent
+Misc:GetResText
+Misc:GetRowIndex
+Misc:GetSheetIndex
+Misc:GetStarOfficeLocale
+Misc:GetStringofCellbyName
+Misc:GetValueofCellbyName
+Misc:InitResources
+Misc:IsFatOffice
+Misc:isHighContrast
+Misc:Main
+Misc:ModifyBorderLineWidth
+Misc:ModifyPropertyValue
+Misc:OpenDocument
+Misc:ProtectSheets
+Misc:RegisterNewDataSource
+Misc:ReplaceRangeValues
+Misc:RetrieveFileName
+Misc:ShowNoOfficePathError
+Misc:TaskonDesktop
+Misc:ToggleDesignMode
+Misc:ToggleWindow
+Misc:UnprotectSheets
+UCB
+UCB:AddFileNameToList
+UCB:AddFoldertoList
+UCB:CopyRecursively
+UCB:CreateFolder
+UCB:GetRealFileContent
+UCB:LoadDataFromFile
+UCB:Main
+UCB:ReadDirectories
+UCB:RetrieveDocTitle
+UCB:SaveDataToFile
+UCB:ShowHelperDialog
+Listbox
+Listbox:AddSingleItemToListbox
+Listbox:CopyListboxItems
+Listbox:EmptyListbox
+Listbox:FormMoveAll
+Listbox:FormMoveSelected
+Listbox:FormRemoveAll
+Listbox:FormRemoveSelected
+Listbox:FormSetMoveRights
+Listbox:GetItemPos
+Listbox:GetSelectedListboxItems
+Listbox:InitializeListboxProcedures
+Listbox:MergeList
+Listbox:MoveOrderedSelectedListbox
+Listbox:MoveSelectedListBox
+Listbox:RemoveListboxItemByName
+Listbox:RemoveListItems
+Listbox:RemoveSelected
+Listbox:SelectListboxItem
+Listbox:SetNewSelection
+Listbox:ToggleListboxControls
+Debug
+Debug:ActivateReadOnlyFlag
+Debug:DeactivateReadOnlyFlag
+Debug:FillDocument
+Debug:printdbgInfo
+Debug:ProtectCurrentSheets
+Debug:SetBasicReadOnlyFlag
+Debug:ShowArray
+Debug:ShowAvailableServiceNames
+Debug:ShowCommands
+Debug:ShowElementNames
+Debug:ShowNameValuePair
+Debug:ShowPropertyValues
+Debug:ShowSupportedServiceNames
+Debug:WritedbgInfo
+Debug:WriteDbgString
+WordCount
+WordCount:wordcount.bsh
+pythonSamples
+TableSample
+Untitled 1
+Standard
diff --git a/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_BasicOrganizer.txt b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_BasicOrganizer.txt
new file mode 100755
index 000000000000..49400346a1a0
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_BasicOrganizer.txt
@@ -0,0 +1,657 @@
+My Macros
+Standard
+Module1
+Module1:Main
+OpenOffice.org Macros
+Depot
+CommonLang
+CommonLang:LoadLanguage
+CommonLang:CompleteMarketList
+CommonLang:LocalizedCurrencies
+CommonLang:LoadDepotDialogs
+CommonLang:InitializeStartUpModel
+Currency
+Currency:Startup
+Currency:EnableGoOnButton
+Currency:CloseStartUpDialog
+Currency:DisposeDocument
+Currency:ChooseMarket
+Currency:ConvertStylesCurrencies
+Currency:SwitchNumberFormat
+Currency:Numberformat
+Currency:CheckFormatType
+Depot
+Depot:Initialize
+Depot:Buy
+Depot:Sell
+Depot:Reset
+Depot:TransactionOk
+Depot:SelectStockname
+Depot:HandleStocks
+Depot:CancelStockRate
+Depot:CancelTransaction
+Depot:CommitStockRate
+Depot:EnableTransactionControls
+Depot:SetupTransactionControls
+Depot:AddShortCuttoControl
+Depot:OpenStockRatePage
+Depot:SelectStockNameForRates
+Depot:ToggleStockRateControls
+Depot:InitializeStockRatesControls
+Internet
+Internet:CheckHistoryControls
+Internet:InsertCompanyHistory
+Internet:InternetUpdate
+Internet:GetCurrentRate
+Internet:UpdateValue
+Internet:StringToDate
+Internet:UpdateChart
+Internet:CalculateChartafterSplit
+Lang_de
+Lang_de:LoadGermanLanguage
+Lang_en
+Lang_en:LoadEnglishLanguage
+Lang_es
+Lang_es:LoadSpanishLanguage
+Lang_fr
+Lang_fr:LoadFrenchLanguage
+Lang_it
+Lang_it:LoadItalianLanguage
+Lang_ja
+Lang_ja:LoadJapaneseLanguage
+Lang_ko
+Lang_ko:LoadKoreanLanguage
+Lang_sv
+Lang_sv:LoadSwedishLanguage
+Lang_tw
+Lang_tw:LoadChineseTradLanguage
+Lang_zh
+Lang_zh:LoadChineseSimpleLanguage
+tools
+tools:RemoveSheet
+tools:InitializeStatusLine
+tools:MakeRangeVisible
+tools:GetRowIndex
+tools:GetTransactionCount
+tools:GetStocksCount
+tools:FillListbox
+tools:CellValuetoControl
+tools:RemoveStockRows
+tools:AddValueToCellContent
+tools:CheckInputDate
+tools:InsertCurrentValue
+tools:SplitCellValue
+tools:GetStockRowIndex
+tools:GetStockID
+tools:CheckDocLocale
+Euro
+AutoPilotRun
+AutoPilotRun:StartAutoPilot
+AutoPilotRun:ConvertDocuments
+AutoPilotRun:InitializeDocument
+AutoPilotRun:ChangeToNextProgressStep
+AutoPilotRun:StoreDocument
+AutoPilotRun:SwapExtent
+AutoPilotRun:InitializeThirdStep
+AutoPilotRun:ToggleProgressStep
+AutoPilotRun:EnableStep2DialogControls
+AutoPilotRun:InitializeProgressPage
+AutoPilotRun:AssignFileName
+AutoPilotRun:ToggleGoOnButton
+AutoPilotRun:CallFolderPicker
+AutoPilotRun:CallFilePicker
+AutoPilotRun:PreviousStep
+Common
+Common:RetrieveDocumentObjects
+Common:CancelTask
+Common:ConvertDocument
+Common:SwitchNumberFormat
+Common:Numberformat
+Common:CheckFormatType
+Common:StartConversion
+Common:IncreaseStatusValue
+Common:SelectCurrency
+Common:FillUpCurrencyListbox
+Common:InitializeProgressbar
+Common:EndStatusLine
+ConvertRun
+ConvertRun:Main
+ConvertRun:SelectListItem
+ConvertRun:RetrieveEnableValue
+ConvertRun:EnableStep1DialogControls
+ConvertRun:ConvertRangesOrStylesOfDocument
+ConvertRun:ConvertWholeDocument
+ConvertRun:EmptySelection
+ConvertRun:AddSelectedRangeToSelRangesEnum
+ConvertRun:GetPreSelectedRange
+ConvertRun:AddRangeToListbox
+ConvertRun:CheckRangeSelection
+ConvertRun:FieldinList
+ConvertRun:CheckLocale
+ConvertRun:SetOptionValuestoNull
+ConvertRun:SetStatusLineText
+Hard
+Hard:CreateRangeList
+Hard:CreateRangeEnumeration
+Hard:AddSheetRanges
+Hard:SelectRange
+Hard:ConvertThehardWay
+Hard:ConvertCellCurrencies
+Hard:ModifyObjectValuewithCurrFactor
+Hard:CheckIfRangeisCurrency
+Hard:CountColumnsForRow
+Hard:CountRangeCells
+Init
+Init:InitializeResources
+Init:InitializeLanguages
+Init:InitializeCurrencies
+Init:InitializeControls
+Init:InitializeConverter
+Init:InitializeCurrencyValues
+Init:InitializeLocales
+Protect
+Protect:UnprotectSheetsWithPassWord
+Protect:UnprotectSheet
+Protect:UnprotectSheetWithDialog
+Protect:ExecutePasswordDialog
+Protect:ReadPassword
+Protect:RejectPassword
+Protect:ReprotectSheets
+Protect:AddSheettoUnprotectionlist
+Protect:CheckSheetProtection
+Soft
+Soft:CreateStyleEnumeration
+Soft:MakeStyleEnumeration
+Soft:AssignRangestoStyle
+Soft:AssignCellFormatRanges
+Soft:DeselectStyle
+Soft:RetrieveRangeNamefromAddress
+Soft:RetrieveSheetoutofRangeName
+Soft:RetrieveRangeoutofRangeName
+Soft:ConvertTheSoftWay
+Soft:GetAssignedRanges
+Writer
+Writer:ConvertWriterTables
+Writer:ModifyObjectValuewithCurrFactor
+Writer:ConvertTextFields
+FormWizard
+DBMeta
+DBMeta:GetDatabaseNames
+DBMeta:GetSelectedDBMetaData
+DBMeta:GetConnection
+DBMeta:GetDBMetaData
+DBMeta:GetTableMetaData
+DBMeta:GetSpecificFieldNames
+DBMeta:CreateDBForm
+DBMeta:AddOrRemoveBinaryFieldsToWidthList
+DBMeta:CreateCommandTypeList
+DBMeta:GetCurrentMetaValues
+DBMeta:AssignFieldLength
+develop
+develop:PositionControls
+develop:ResetPosSizes
+develop:RepositionColumnarLeftControls
+develop:ResetDBShape
+develop:InitializePosSizes
+develop:InsertTextControl
+develop:InsertDBControl
+develop:InsertTimeStampShape
+develop:GetLabelDiffHeight
+develop:CheckJustifiedPosition
+develop:GetCorrWidth
+develop:AdjustLineWidth
+develop:CheckOuterPoints
+develop:PositionGridControl
+develop:SetupGridColumn
+develop:ControlCaptionstoStandardLayout
+develop:GroupShapesTogether
+FormWizard
+FormWizard:Main
+FormWizard:MainWithDefault
+FormWizard:FormGetFields
+FormWizard:FillUpFieldsListbox
+FormWizard:PreviousStep
+FormWizard:NextStep
+FormWizard:InitializeLayoutSettings
+FormWizard:ToggleDatabasePage
+FormWizard:CommitLastDocumentChanges
+FormWizard:StoreFormInDatabase
+FormWizard:StoreForm
+FormWizard:EmptyFieldsListboxes
+FormWizard:DeleteFirstTableListBoxEntry
+FormWizard:DeleteFirstListboxEntry
+Language
+Language:LoadLanguage
+Language:SetDialogLanguage
+Language:InitializeWidthList
+Layouter
+Layouter:InsertControl
+Layouter:ArrangeControls
+Layouter:OpenFormDocument
+Layouter:InitializeLabelValues
+Layouter:ConfigurePageStyle
+Layouter:ChangeBorderLayouts
+Layouter:ChangeLabelAlignments
+Layouter:ChangeArrangemode
+Layouter:ToggleBorderGroup
+Layouter:ToggleAlignGroup
+Layouter:ToggleLayoutPage
+Layouter:DestroyControlShapes
+Layouter:SwitchArrangementButtons
+Layouter:SwitchBorderMode
+Layouter:SwitchAlignMode
+tools
+tools:SetProgressValue
+tools:GetPreferredWidth
+tools:GetPreferredHeight
+tools:GetPeerSize
+tools:TwipToCM
+tools:TwipTo100telMM
+tools:TwipToPixel
+tools:PixelTo100thMMX
+tools:PixelTo100thMMY
+tools:GetPoint
+tools:GetSize
+tools:ImportStyles
+tools:SetNumerics
+tools:RemoveShapes
+tools:RemoveNirwanaShapes
+tools:ShapesToNirwana
+tools:CalcUniqueContentName
+tools:CountItemsInArray
+tools:GetDBHeight
+tools:GetFormWizardPaths
+tools:GetFilterName
+Gimmicks
+AutoText
+AutoText:Main
+AutoText:InsertStringToCell
+ChangeAllChars
+ChangeAllChars:ChangeAllChars
+ChangeAllChars:ReplaceAllStrings
+ChangeAllChars:ReplaceStrings
+GetTexts
+GetTexts:Main
+GetTexts:GetCalcStrings
+GetTexts:GetCellTexts
+GetTexts:GetAnnotations
+GetTexts:GetNamedRanges
+GetTexts:GetCalcGraphicNames
+GetTexts:GetParagraphTexts
+GetTexts:GetChartStrings
+GetTexts:GetFrameTexts
+GetTexts:GetTextFieldStrings
+GetTexts:GetLinkedFileNames
+GetTexts:GetSectionNames
+GetTexts:GetWriterStrings
+GetTexts:GetDrawPageTitles
+GetTexts:GetPageStrings
+GetTexts:GetDrawStrings
+GetTexts:GetDocumentProps
+GetTexts:GetHyperlinks
+GetTexts:GetGraphicNames
+GetTexts:GetStyles
+GetTexts:GetControlStrings
+GetTexts:GetControlContent
+GetTexts:WriteStringtoLogFile
+GetTexts:MakeLogHeadLine
+ReadDir
+ReadDir:Main
+ReadDir:TreeInfo
+ReadDir:CreateTextShape
+ReadDir:CalculateXPoint
+ReadDir:DrawLine
+ReadDir:GetSourceDirectory
+ReadDir:ReadSourceDirectory
+ReadDir:CloseDialog
+ReadDir:AdjustPageHeight
+ReadDir:SetNewLevels
+ReadDir:CheckPageWidth
+ReadDir:ToggleDialogControls
+Userfields
+Userfields:StartChangesUserfields
+Userfields:FillDialog
+Userfields:ScrollControls
+Userfields:ScrollTextFieldInfo
+Userfields:StopMacro
+Userfields:SaveSettings
+Userfields:ToggleButtons
+Userfields:InitializeUserFamily
+Userfields:AddRecord
+Userfields:FillupTextFields
+Userfields:StepToRecord
+Userfields:SelectCurrentFields
+Userfields:DeleteCurrentSettings
+ImportWizard
+API
+API:OpenRegKey
+API:GetDefaultPath
+API:GetTemplateDefaultPath
+API:QueryValueEx
+API:QueryValue
+DialogModul
+DialogModul:FillStep_Welcome
+DialogModul:FillStep_InputPaths
+DialogModul:FillUpApplicationList
+DialogModul:InitializePathsforCurrentApplication
+DialogModul:AssignPathToCurrentApplication
+DialogModul:SaveStep_InputPath
+DialogModul:ToggleInputPaths
+DialogModul:MakeSummaryString
+DialogModul:FillStep_Summary
+DialogModul:FillStep_Progress
+DialogModul:GetFilterTracingLogPath
+DialogModul:CheckMSImportAvailability
+DialogModul:SetupMSConfiguration
+DialogModul:SetupXMLConfiguration
+DialogModul:CheckControlPath
+DialogModul:CheckInputPaths
+DialogModul:CheckTextBoxPath
+DialogModul:InitializeProgressPage
+DialogModul:SetProgressDisplay
+DialogModul:TakoverFolderName
+DialogModul:FinalizeDialogButtons
+FilesModul
+FilesModul:ReadCollectionPaths
+FilesModul:GetApplicationIndex
+FilesModul:InterruptProcess
+FilesModul:AddCollectionPath
+FilesModul:SetExtension
+FilesModul:AddFilterNameToPathItem
+FilesModul:CheckIfToAddPathToCollection
+FilesModul:CollectPaths
+FilesModul:ConvertAllDocuments
+FilesModul:AddListtoFilesList
+FilesModul:GetTargetTemplatePath
+FilesModul:GetFilterName
+FilesModul:SearchArrayforPartString
+FilesModul:CreateLogTable
+FilesModul:GetSize
+FilesModul:InsertCommandButtonatViewCursor
+FilesModul:CreateLogDocument
+FilesModul:GetFilterTracingLogPath
+FilesModul:InsertTargetUrlToLogDocument
+FilesModul:InsertSourceUrlToLogDocument
+FilesModul:InsertHyperLinkToLogCell
+FilesModul:InsertCommentToLogCell
+FilesModul:AddLogStatistics
+FilesModul:CheckIfMacroExists
+FilesModul:CheckPassWordProtection
+FilesModul:OpenLogDocument
+FilesModul:MergeRange
+FilesModul:ConcatComment
+Language
+Language:LoadLanguage
+Language:GetApplResourceArray
+Main
+Main:Main
+Main:NextStep
+Main:PrevStep
+Main:CancelTask
+Main:TemplateDirSearchDialog
+Main:RepaintHeaderPreview
+Main:CheckModuleInstallation
+Main:CheckInstalledModule
+Main:ToggleCheckboxes
+Main:ToggleCheckboxesWithBoolean
+Main:ToggleNextButton
+Main:TakeOverPathSettings
+Main:GetImportWizardPaths
+Schedule
+BankHoliday
+BankHoliday:Main
+BankHoliday:CalEasterTable
+BankHoliday:CalOrthodoxEasterTable
+BankHoliday:CalInitGlobalVariablesDate
+BankHoliday:CalInsertBankholiday
+BankHoliday:CalMaxDayInMonth
+BankHoliday:CalGetIntOfShortMonthName
+BankHoliday:CalInsertOwnDataInTables
+BankHoliday:GetMonthDate
+BankHoliday:GetNextWeekDay
+BankHoliday:AddFollowUpHolidays
+CalendarMain
+CalendarMain:CalAutopilotTable
+CalendarMain:SetupNumberFormatter
+CalendarMain:AddNumberFormat
+CalendarMain:CalChooseCalendar
+CalendarMain:CalcmdCancel
+CalendarMain:CalcmdOk
+CreateTable
+CreateTable:CalCreateYearTable
+CreateTable:CalCreateMonthTable
+CreateTable:FormatCalCells
+DlgControl
+DlgControl:Main
+DlgControl:CalcmdDeleteSelect
+DlgControl:CalSaveOwnEventControls
+DlgControl:CalMouseMoved
+DlgControl:SelectState
+DlgControl:MouseLeavesImage
+DlgControl:CalClearInputMask
+DlgControl:CalmdSwitchOwnDataOrGeneral
+DlgControl:ToggleInsertButton
+DlgControl:CalUpdateNewEventFrame
+GermanHolidays
+GermanHolidays:Main
+GermanHolidays:CalGetGermanLandAtMousePos
+GermanHolidays:CalFindWholeYearHolidays_GERMANY
+Language
+Language:LoadLanguage
+LocalHolidays
+LocalHolidays:Main
+LocalHolidays:FindWholeYearHolidays_FRANCE
+LocalHolidays:FindWholeYearHolidays_SWED
+LocalHolidays:FindWholeYearHolidays_FI
+LocalHolidays:FindWholeYearHolidays_DK
+LocalHolidays:FindWholeYearHolidays_ITA
+LocalHolidays:FindWholeYearHolidays_TRK
+LocalHolidays:CalculateturkishReligousHolidays
+LocalHolidays:FindWholeYearHolidays_GREEK
+LocalHolidays:FindWholeYearHolidays_SPAIN
+LocalHolidays:FindWholeYearHolidays_PORT
+LocalHolidays:FindWholeYearHolidays_NL
+LocalHolidays:FindWholeYearHolidays_PL
+LocalHolidays:FindWholeYearHolidays_RU
+LocalHolidays:FindWholeYearHolidays_US
+LocalHolidays:FindWholeYearHolidays_JP
+LocalHolidays:FindWholeYearHolidays_TW
+LocalHolidays:FindWholeYearHolidays_CN
+LocalHolidays:CalculateChineseNewYear
+LocalHolidays:CalculateJapaneseSpringDay
+LocalHolidays:CalculateJapaneseAutumnDay
+OwnEvents
+OwnEvents:Main
+OwnEvents:CalSaveOwnData
+OwnEvents:CalLoadOwnData
+OwnEvents:CalCreateDateStrOfInput
+OwnEvents:CalcmdInsertData
+OwnEvents:GetSelectedDateUnits
+OwnEvents:GetDateUnits
+OwnEvents:CalGetNameOfEvent
+OwnEvents:CheckInsertedDates
+OwnEvents:GetOwnMonth
+ScriptBindingLibrary
+Template
+Autotext
+Autotext:Main
+Autotext:CreateUserDatafield
+Autotext:CreateBullet
+Autotext:CreatePlaceholder
+Correspondence
+Correspondence:Main
+Correspondence:Placeholder
+Correspondence:Database
+Correspondence:LoadLanguageCorrespondence
+Correspondence:GetFieldName
+Correspondence:OK
+Correspondence:InsertDBField
+Correspondence:InsertPlaceholder
+ModuleAgenda
+ModuleAgenda:Initialize
+ModuleAgenda:LoadLanguageAgenda
+ModuleAgenda:ModifyTemplate
+ModuleAgenda:NewTopic
+ModuleAgenda:FinishAgenda
+ModuleAgenda:CreateBookMarkCursor
+ModuleAgenda:DeleteButtons
+ModuleAgenda:GetOptionValues
+Samples
+Samples:PrepareForEditing
+Samples:ShowStyles
+Samples:SelectStyle
+Samples:SaveCurrentStyles
+Samples:RestoreCurrentStyles
+Samples:CloseStyleDialog
+Samples:KillTempFile
+Tools
+Debug
+Debug:ActivateReadOnlyFlag
+Debug:DeactivateReadOnlyFlag
+Debug:SetBasicReadOnlyFlag
+Debug:WritedbgInfo
+Debug:WriteDbgString
+Debug:printdbgInfo
+Debug:ShowArray
+Debug:ShowPropertyValues
+Debug:ShowNameValuePair
+Debug:ShowElementNames
+Debug:ShowSupportedServiceNames
+Debug:ShowAvailableServiceNames
+Debug:ShowCommands
+Debug:ProtectCurrentSheets
+Debug:FillDocument
+Listbox
+Listbox:MergeList
+Listbox:RemoveListItems
+Listbox:InitializeListboxProcedures
+Listbox:CopyListboxItems
+Listbox:FormMoveSelected
+Listbox:FormMoveAll
+Listbox:FormRemoveSelected
+Listbox:FormRemoveAll
+Listbox:MoveSelectedListBox
+Listbox:MoveOrderedSelectedListbox
+Listbox:RemoveSelected
+Listbox:SetNewSelection
+Listbox:ToggleListboxControls
+Listbox:FormSetMoveRights
+Listbox:AddSingleItemToListbox
+Listbox:EmptyListbox
+Listbox:SelectListboxItem
+Listbox:GetSelectedListboxItems
+Listbox:RemoveListboxItemByName
+Listbox:GetItemPos
+Misc
+Misc:Main
+Misc:RegisterNewDataSource
+Misc:ConnecttoDatabase
+Misc:GetStarOfficeLocale
+Misc:GetRegistryKeyContent
+Misc:GetProductname
+Misc:OpenDocument
+Misc:TaskonDesktop
+Misc:RetrieveFileName
+Misc:GetPathSettings
+Misc:GetOfficeSubPath
+Misc:ShowNoOfficePathError
+Misc:InitResources
+Misc:GetResText
+Misc:CutPathView
+Misc:DeleteInputCells
+Misc:ChangeValueofRange
+Misc:ReplaceRangeValues
+Misc:GetValueofCellbyName
+Misc:DuplicateRow
+Misc:GetStringofCellbyName
+Misc:GetCellByName
+Misc:ChangeCellValue
+Misc:GetDocumentType
+Misc:GetNumberFormatType
+Misc:ProtectSheets
+Misc:UnprotectSheets
+Misc:GetRowIndex
+Misc:GetColumnIndex
+Misc:CopySheetbyName
+Misc:ToggleWindow
+Misc:CheckNewSheetname
+Misc:AddNewSheetName
+Misc:GetSheetIndex
+Misc:GetLastUsedRow
+Misc:ModifyBorderLineWidth
+Misc:AttachBasicMacroToEvent
+Misc:ModifyPropertyValue
+Misc:GetPropertyValueIndex
+Misc:DispatchSlot
+Misc:IsFatOffice
+Misc:GetLocale
+Misc:ToggleDesignMode
+Misc:isHighContrast
+Misc:CreateNewDocument
+Misc:DisposeDocument
+Misc:CalIsLeapYear
+ModuleControls
+ModuleControls:getControlModel
+ModuleControls:GetControlShape
+ModuleControls:getControlView
+ModuleControls:DisposeControl
+ModuleControls:GetControlGroupModel
+ModuleControls:GetRefValue
+ModuleControls:GetRefValueOfControlGroup
+ModuleControls:GetOptionGroupValue
+ModuleControls:WriteOptValueToCell
+ModuleControls:LoadDialog
+ModuleControls:GetFolderName
+ModuleControls:GetFileName
+ModuleControls:StoreDocument
+ModuleControls:AddFiltersToDialog
+ModuleControls:SwitchMousePointer
+ModuleControls:ShowOverwriteAllDialog
+ModuleControls:SetOVERWRITEToQuery
+ModuleControls:SetOVERWRITEToAlways
+ModuleControls:SetOVERWRITEToNever
+Strings
+Strings:ElimChar
+Strings:DeleteStr
+Strings:FindPartString
+Strings:PartStringInArray
+Strings:RTrimStr
+Strings:LTRimChar
+Strings:ArrayOutOfString
+Strings:ClearArray
+Strings:ClearMultiDimArray
+Strings:FieldinArray
+Strings:FieldinList
+Strings:IndexinArray
+Strings:MultiArrayInListbox
+Strings:StringInMultiArray
+Strings:GetIndexInMultiArray
+Strings:GetIndexForPartStringinMultiArray
+Strings:ArrayfromMultiArray
+Strings:ReplaceString
+Strings:FindSecondValue
+Strings:Power
+Strings:Round
+Strings:FileNameoutofPath
+Strings:GetFileNameExtension
+Strings:GetFileNameWithoutExtension
+Strings:DirectoryNameoutofPath
+Strings:CountCharsinString
+Strings:BubbleSortList
+Strings:GetValueoutofList
+Strings:AddListtoList
+Strings:CheckDouble
+UCB
+UCB:Main
+UCB:ReadDirectories
+UCB:AddFoldertoList
+UCB:AddFileNameToList
+UCB:RetrieveDocTitle
+UCB:GetRealFileContent
+UCB:CopyRecursively
+UCB:ShowHelperDialog
+UCB:SaveDataToFile
+UCB:LoadDataFromFile
+UCB:CreateFolder
+Untitled 1
+Standard
diff --git a/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_BeanShell.txt b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_BeanShell.txt
new file mode 100755
index 000000000000..5fd31835476e
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_BeanShell.txt
@@ -0,0 +1,14 @@
+My Macros
+OpenOffice.org Macros
+Capitalise
+capitalise.bsh
+HelloWorld
+helloworld.bsh
+Highlight
+ButtonPressHandler.bsh
+ShowDialog.bsh
+MemoryUsage
+memusage.bsh
+WordCount
+wordcount.bsh
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_JavaScript.txt b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_JavaScript.txt
new file mode 100755
index 000000000000..06f63f48530c
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_JavaScript.txt
@@ -0,0 +1,10 @@
+My Macros
+OpenOffice.org Macros
+ExportSheetsToHTML
+exportsheetstohtml.js
+HelloWorld
+helloworld.js
+Highlight
+ButtonPressHandler.js
+ShowDialog.js
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_Python.txt b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_Python.txt
new file mode 100755
index 000000000000..93f69e69e7b0
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_Python.txt
@@ -0,0 +1,10 @@
+My Macros
+OpenOffice.org Macros
+Capitalise
+capitalisePython
+HelloWorld
+HelloWorldPython
+pythonSamples
+TableSample
+createTable
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_RunMacro.txt b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_RunMacro.txt
new file mode 100755
index 000000000000..74378128ac9b
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/OpenOffice.org_en-US_win_RunMacro.txt
@@ -0,0 +1,681 @@
+My Macros
+Standard
+Module1
+Module1:Main
+OpenOffice.org Macros
+Capitalise
+Capitalise:capitalise.bsh
+Capitalise:capitalisePython
+Depot
+Depot
+Depot:AddShortCuttoControl
+Depot:Buy
+Depot:CancelStockRate
+Depot:CancelTransaction
+Depot:CommitStockRate
+Depot:EnableTransactionControls
+Depot:HandleStocks
+Depot:Initialize
+Depot:InitializeStockRatesControls
+Depot:OpenStockRatePage
+Depot:Reset
+Depot:SelectStockname
+Depot:SelectStockNameForRates
+Depot:Sell
+Depot:SetupTransactionControls
+Depot:ToggleStockRateControls
+Depot:TransactionOk
+CommonLang
+CommonLang:CompleteMarketList
+CommonLang:InitializeStartUpModel
+CommonLang:LoadDepotDialogs
+CommonLang:LoadLanguage
+CommonLang:LocalizedCurrencies
+Currency
+Currency:CheckFormatType
+Currency:ChooseMarket
+Currency:CloseStartUpDialog
+Currency:ConvertStylesCurrencies
+Currency:DisposeDocument
+Currency:EnableGoOnButton
+Currency:Numberformat
+Currency:Startup
+Currency:SwitchNumberFormat
+Internet
+Internet:CalculateChartafterSplit
+Internet:CheckHistoryControls
+Internet:GetCurrentRate
+Internet:InsertCompanyHistory
+Internet:InternetUpdate
+Internet:StringToDate
+Internet:UpdateChart
+Internet:UpdateValue
+Lang_de
+Lang_de:LoadGermanLanguage
+tools
+tools:AddValueToCellContent
+tools:CellValuetoControl
+tools:CheckDocLocale
+tools:CheckInputDate
+tools:FillListbox
+tools:GetRowIndex
+tools:GetStockID
+tools:GetStockRowIndex
+tools:GetStocksCount
+tools:GetTransactionCount
+tools:InitializeStatusLine
+tools:InsertCurrentValue
+tools:MakeRangeVisible
+tools:RemoveSheet
+tools:RemoveStockRows
+tools:SplitCellValue
+Lang_en
+Lang_en:LoadEnglishLanguage
+Lang_fr
+Lang_fr:LoadFrenchLanguage
+Lang_it
+Lang_it:LoadItalianLanguage
+Lang_es
+Lang_es:LoadSpanishLanguage
+Lang_sv
+Lang_sv:LoadSwedishLanguage
+Lang_zh
+Lang_zh:LoadChineseSimpleLanguage
+Lang_tw
+Lang_tw:LoadChineseTradLanguage
+Lang_ko
+Lang_ko:LoadKoreanLanguage
+Lang_ja
+Lang_ja:LoadJapaneseLanguage
+Euro
+ConvertRun
+ConvertRun:AddRangeToListbox
+ConvertRun:AddSelectedRangeToSelRangesEnum
+ConvertRun:CheckLocale
+ConvertRun:CheckRangeSelection
+ConvertRun:ConvertRangesOrStylesOfDocument
+ConvertRun:ConvertWholeDocument
+ConvertRun:EmptySelection
+ConvertRun:EnableStep1DialogControls
+ConvertRun:FieldinList
+ConvertRun:GetPreSelectedRange
+ConvertRun:Main
+ConvertRun:RetrieveEnableValue
+ConvertRun:SelectListItem
+ConvertRun:SetOptionValuestoNull
+ConvertRun:SetStatusLineText
+AutoPilotRun
+AutoPilotRun:AssignFileName
+AutoPilotRun:CallFilePicker
+AutoPilotRun:CallFolderPicker
+AutoPilotRun:ChangeToNextProgressStep
+AutoPilotRun:ConvertDocuments
+AutoPilotRun:EnableStep2DialogControls
+AutoPilotRun:InitializeDocument
+AutoPilotRun:InitializeProgressPage
+AutoPilotRun:InitializeThirdStep
+AutoPilotRun:PreviousStep
+AutoPilotRun:StartAutoPilot
+AutoPilotRun:StoreDocument
+AutoPilotRun:SwapExtent
+AutoPilotRun:ToggleGoOnButton
+AutoPilotRun:ToggleProgressStep
+Hard
+Hard:AddSheetRanges
+Hard:CheckIfRangeisCurrency
+Hard:ConvertCellCurrencies
+Hard:ConvertThehardWay
+Hard:CountColumnsForRow
+Hard:CountRangeCells
+Hard:CreateRangeEnumeration
+Hard:CreateRangeList
+Hard:ModifyObjectValuewithCurrFactor
+Hard:SelectRange
+Soft
+Soft:AssignCellFormatRanges
+Soft:AssignRangestoStyle
+Soft:ConvertTheSoftWay
+Soft:CreateStyleEnumeration
+Soft:DeselectStyle
+Soft:GetAssignedRanges
+Soft:MakeStyleEnumeration
+Soft:RetrieveRangeNamefromAddress
+Soft:RetrieveRangeoutofRangeName
+Soft:RetrieveSheetoutofRangeName
+Init
+Init:InitializeControls
+Init:InitializeConverter
+Init:InitializeCurrencies
+Init:InitializeCurrencyValues
+Init:InitializeLanguages
+Init:InitializeLocales
+Init:InitializeResources
+Common
+Common:CancelTask
+Common:CheckFormatType
+Common:ConvertDocument
+Common:EndStatusLine
+Common:FillUpCurrencyListbox
+Common:IncreaseStatusValue
+Common:InitializeProgressbar
+Common:Numberformat
+Common:RetrieveDocumentObjects
+Common:SelectCurrency
+Common:StartConversion
+Common:SwitchNumberFormat
+Writer
+Writer:ConvertTextFields
+Writer:ConvertWriterTables
+Writer:ModifyObjectValuewithCurrFactor
+Protect
+Protect:AddSheettoUnprotectionlist
+Protect:CheckSheetProtection
+Protect:ExecutePasswordDialog
+Protect:ReadPassword
+Protect:RejectPassword
+Protect:ReprotectSheets
+Protect:UnprotectSheet
+Protect:UnprotectSheetsWithPassWord
+Protect:UnprotectSheetWithDialog
+ExportSheetsToHTML
+ExportSheetsToHTML:exportsheetstohtml.js
+FormWizard
+FormWizard
+FormWizard:CommitLastDocumentChanges
+FormWizard:DeleteFirstListboxEntry
+FormWizard:DeleteFirstTableListBoxEntry
+FormWizard:EmptyFieldsListboxes
+FormWizard:FillUpFieldsListbox
+FormWizard:FormGetFields
+FormWizard:InitializeLayoutSettings
+FormWizard:Main
+FormWizard:MainWithDefault
+FormWizard:NextStep
+FormWizard:PreviousStep
+FormWizard:StoreForm
+FormWizard:StoreFormInDatabase
+FormWizard:ToggleDatabasePage
+Layouter
+Layouter:ArrangeControls
+Layouter:ChangeArrangemode
+Layouter:ChangeBorderLayouts
+Layouter:ChangeLabelAlignments
+Layouter:ConfigurePageStyle
+Layouter:DestroyControlShapes
+Layouter:InitializeLabelValues
+Layouter:InsertControl
+Layouter:OpenFormDocument
+Layouter:SwitchAlignMode
+Layouter:SwitchArrangementButtons
+Layouter:SwitchBorderMode
+Layouter:ToggleAlignGroup
+Layouter:ToggleBorderGroup
+Layouter:ToggleLayoutPage
+Language
+Language:InitializeWidthList
+Language:LoadLanguage
+Language:SetDialogLanguage
+DBMeta
+DBMeta:AddOrRemoveBinaryFieldsToWidthList
+DBMeta:AssignFieldLength
+DBMeta:CreateCommandTypeList
+DBMeta:CreateDBForm
+DBMeta:GetConnection
+DBMeta:GetCurrentMetaValues
+DBMeta:GetDatabaseNames
+DBMeta:GetDBMetaData
+DBMeta:GetSelectedDBMetaData
+DBMeta:GetSpecificFieldNames
+DBMeta:GetTableMetaData
+tools
+tools:CalcUniqueContentName
+tools:CountItemsInArray
+tools:GetDBHeight
+tools:GetFilterName
+tools:GetFormWizardPaths
+tools:GetPeerSize
+tools:GetPoint
+tools:GetPreferredHeight
+tools:GetPreferredWidth
+tools:GetSize
+tools:ImportStyles
+tools:PixelTo100thMMX
+tools:PixelTo100thMMY
+tools:RemoveNirwanaShapes
+tools:RemoveShapes
+tools:SetNumerics
+tools:SetProgressValue
+tools:ShapesToNirwana
+tools:TwipTo100telMM
+tools:TwipToCM
+tools:TwipToPixel
+develop
+develop:AdjustLineWidth
+develop:CheckJustifiedPosition
+develop:CheckOuterPoints
+develop:ControlCaptionstoStandardLayout
+develop:GetCorrWidth
+develop:GetLabelDiffHeight
+develop:GroupShapesTogether
+develop:InitializePosSizes
+develop:InsertDBControl
+develop:InsertTextControl
+develop:InsertTimeStampShape
+develop:PositionControls
+develop:PositionGridControl
+develop:RepositionColumnarLeftControls
+develop:ResetDBShape
+develop:ResetPosSizes
+develop:SetupGridColumn
+Gimmicks
+GetTexts
+GetTexts:GetAnnotations
+GetTexts:GetCalcGraphicNames
+GetTexts:GetCalcStrings
+GetTexts:GetCellTexts
+GetTexts:GetChartStrings
+GetTexts:GetControlContent
+GetTexts:GetControlStrings
+GetTexts:GetDocumentProps
+GetTexts:GetDrawPageTitles
+GetTexts:GetDrawStrings
+GetTexts:GetFrameTexts
+GetTexts:GetGraphicNames
+GetTexts:GetHyperlinks
+GetTexts:GetLinkedFileNames
+GetTexts:GetNamedRanges
+GetTexts:GetPageStrings
+GetTexts:GetParagraphTexts
+GetTexts:GetSectionNames
+GetTexts:GetStyles
+GetTexts:GetTextFieldStrings
+GetTexts:GetWriterStrings
+GetTexts:Main
+GetTexts:MakeLogHeadLine
+GetTexts:WriteStringtoLogFile
+Userfields
+Userfields:AddRecord
+Userfields:DeleteCurrentSettings
+Userfields:FillDialog
+Userfields:FillupTextFields
+Userfields:InitializeUserFamily
+Userfields:SaveSettings
+Userfields:ScrollControls
+Userfields:ScrollTextFieldInfo
+Userfields:SelectCurrentFields
+Userfields:StartChangesUserfields
+Userfields:StepToRecord
+Userfields:StopMacro
+Userfields:ToggleButtons
+ChangeAllChars
+ChangeAllChars:ChangeAllChars
+ChangeAllChars:ReplaceAllStrings
+ChangeAllChars:ReplaceStrings
+AutoText
+AutoText:InsertStringToCell
+AutoText:Main
+ReadDir
+ReadDir:AdjustPageHeight
+ReadDir:CalculateXPoint
+ReadDir:CheckPageWidth
+ReadDir:CloseDialog
+ReadDir:CreateTextShape
+ReadDir:DrawLine
+ReadDir:GetSourceDirectory
+ReadDir:Main
+ReadDir:ReadSourceDirectory
+ReadDir:SetNewLevels
+ReadDir:ToggleDialogControls
+ReadDir:TreeInfo
+HelloWorld
+HelloWorld:helloworld.bsh
+HelloWorld:helloworld.js
+HelloWorld:HelloWorld.printHW
+HelloWorld:HelloWorldPython
+Highlight
+Highlight:ButtonPressHandler.bsh
+Highlight:ButtonPressHandler.js
+Highlight:HighlightText.showForm
+Highlight:ShowDialog.bsh
+Highlight:ShowDialog.js
+ImportWizard
+Main
+Main:CancelTask
+Main:CheckInstalledModule
+Main:CheckModuleInstallation
+Main:GetImportWizardPaths
+Main:Main
+Main:NextStep
+Main:PrevStep
+Main:RepaintHeaderPreview
+Main:TakeOverPathSettings
+Main:TemplateDirSearchDialog
+Main:ToggleCheckboxes
+Main:ToggleCheckboxesWithBoolean
+Main:ToggleNextButton
+DialogModul
+DialogModul:AssignPathToCurrentApplication
+DialogModul:CheckControlPath
+DialogModul:CheckInputPaths
+DialogModul:CheckMSImportAvailability
+DialogModul:CheckTextBoxPath
+DialogModul:FillStep_InputPaths
+DialogModul:FillStep_Progress
+DialogModul:FillStep_Summary
+DialogModul:FillStep_Welcome
+DialogModul:FillUpApplicationList
+DialogModul:FinalizeDialogButtons
+DialogModul:GetFilterTracingLogPath
+DialogModul:InitializePathsforCurrentApplication
+DialogModul:InitializeProgressPage
+DialogModul:MakeSummaryString
+DialogModul:SaveStep_InputPath
+DialogModul:SetProgressDisplay
+DialogModul:SetupMSConfiguration
+DialogModul:SetupXMLConfiguration
+DialogModul:TakoverFolderName
+DialogModul:ToggleInputPaths
+Language
+Language:GetApplResourceArray
+Language:LoadLanguage
+FilesModul
+FilesModul:AddCollectionPath
+FilesModul:AddFilterNameToPathItem
+FilesModul:AddListtoFilesList
+FilesModul:AddLogStatistics
+FilesModul:CheckIfMacroExists
+FilesModul:CheckIfToAddPathToCollection
+FilesModul:CheckPassWordProtection
+FilesModul:CollectPaths
+FilesModul:ConcatComment
+FilesModul:ConvertAllDocuments
+FilesModul:CreateLogDocument
+FilesModul:CreateLogTable
+FilesModul:GetApplicationIndex
+FilesModul:GetFilterName
+FilesModul:GetFilterTracingLogPath
+FilesModul:GetSize
+FilesModul:GetTargetTemplatePath
+FilesModul:InsertCommandButtonatViewCursor
+FilesModul:InsertCommentToLogCell
+FilesModul:InsertHyperLinkToLogCell
+FilesModul:InsertSourceUrlToLogDocument
+FilesModul:InsertTargetUrlToLogDocument
+FilesModul:InterruptProcess
+FilesModul:MergeRange
+FilesModul:OpenLogDocument
+FilesModul:ReadCollectionPaths
+FilesModul:SearchArrayforPartString
+FilesModul:SetExtension
+API
+API:GetDefaultPath
+API:GetTemplateDefaultPath
+API:OpenRegKey
+API:QueryValue
+API:QueryValueEx
+MemoryUsage
+MemoryUsage:MemoryUsage.updateMemoryUsage
+MemoryUsage:memusage.bsh
+Schedule
+OwnEvents
+OwnEvents:CalcmdInsertData
+OwnEvents:CalCreateDateStrOfInput
+OwnEvents:CalGetNameOfEvent
+OwnEvents:CalLoadOwnData
+OwnEvents:CalSaveOwnData
+OwnEvents:CheckInsertedDates
+OwnEvents:GetDateUnits
+OwnEvents:GetOwnMonth
+OwnEvents:GetSelectedDateUnits
+OwnEvents:Main
+CalendarMain
+CalendarMain:AddNumberFormat
+CalendarMain:CalAutopilotTable
+CalendarMain:CalChooseCalendar
+CalendarMain:CalcmdCancel
+CalendarMain:CalcmdOk
+CalendarMain:SetupNumberFormatter
+BankHoliday
+BankHoliday:AddFollowUpHolidays
+BankHoliday:CalEasterTable
+BankHoliday:CalGetIntOfShortMonthName
+BankHoliday:CalInitGlobalVariablesDate
+BankHoliday:CalInsertBankholiday
+BankHoliday:CalInsertOwnDataInTables
+BankHoliday:CalMaxDayInMonth
+BankHoliday:CalOrthodoxEasterTable
+BankHoliday:GetMonthDate
+BankHoliday:GetNextWeekDay
+BankHoliday:Main
+DlgControl
+DlgControl:CalClearInputMask
+DlgControl:CalcmdDeleteSelect
+DlgControl:CalmdSwitchOwnDataOrGeneral
+DlgControl:CalMouseMoved
+DlgControl:CalSaveOwnEventControls
+DlgControl:CalUpdateNewEventFrame
+DlgControl:Main
+DlgControl:MouseLeavesImage
+DlgControl:SelectState
+DlgControl:ToggleInsertButton
+Language
+Language:LoadLanguage
+CreateTable
+CreateTable:CalCreateMonthTable
+CreateTable:CalCreateYearTable
+CreateTable:FormatCalCells
+GermanHolidays
+GermanHolidays:CalFindWholeYearHolidays_GERMANY
+GermanHolidays:CalGetGermanLandAtMousePos
+GermanHolidays:Main
+LocalHolidays
+LocalHolidays:CalculateChineseNewYear
+LocalHolidays:CalculateJapaneseAutumnDay
+LocalHolidays:CalculateJapaneseSpringDay
+LocalHolidays:CalculateturkishReligousHolidays
+LocalHolidays:FindWholeYearHolidays_CN
+LocalHolidays:FindWholeYearHolidays_DK
+LocalHolidays:FindWholeYearHolidays_FI
+LocalHolidays:FindWholeYearHolidays_FRANCE
+LocalHolidays:FindWholeYearHolidays_GREEK
+LocalHolidays:FindWholeYearHolidays_ITA
+LocalHolidays:FindWholeYearHolidays_JP
+LocalHolidays:FindWholeYearHolidays_NL
+LocalHolidays:FindWholeYearHolidays_PL
+LocalHolidays:FindWholeYearHolidays_PORT
+LocalHolidays:FindWholeYearHolidays_RU
+LocalHolidays:FindWholeYearHolidays_SPAIN
+LocalHolidays:FindWholeYearHolidays_SWED
+LocalHolidays:FindWholeYearHolidays_TRK
+LocalHolidays:FindWholeYearHolidays_TW
+LocalHolidays:FindWholeYearHolidays_US
+LocalHolidays:Main
+ScriptBindingLibrary
+Template
+ModuleAgenda
+ModuleAgenda:CreateBookMarkCursor
+ModuleAgenda:DeleteButtons
+ModuleAgenda:FinishAgenda
+ModuleAgenda:GetOptionValues
+ModuleAgenda:Initialize
+ModuleAgenda:LoadLanguageAgenda
+ModuleAgenda:ModifyTemplate
+ModuleAgenda:NewTopic
+Correspondence
+Correspondence:Database
+Correspondence:GetFieldName
+Correspondence:InsertDBField
+Correspondence:InsertPlaceholder
+Correspondence:LoadLanguageCorrespondence
+Correspondence:Main
+Correspondence:OK
+Correspondence:Placeholder
+Samples
+Samples:CloseStyleDialog
+Samples:KillTempFile
+Samples:PrepareForEditing
+Samples:RestoreCurrentStyles
+Samples:SaveCurrentStyles
+Samples:SelectStyle
+Samples:ShowStyles
+Autotext
+Autotext:CreateBullet
+Autotext:CreatePlaceholder
+Autotext:CreateUserDatafield
+Autotext:Main
+Tools
+ModuleControls
+ModuleControls:AddFiltersToDialog
+ModuleControls:DisposeControl
+ModuleControls:GetControlGroupModel
+ModuleControls:getControlModel
+ModuleControls:GetControlShape
+ModuleControls:getControlView
+ModuleControls:GetFileName
+ModuleControls:GetFolderName
+ModuleControls:GetOptionGroupValue
+ModuleControls:GetRefValue
+ModuleControls:GetRefValueOfControlGroup
+ModuleControls:LoadDialog
+ModuleControls:SetOVERWRITEToAlways
+ModuleControls:SetOVERWRITEToNever
+ModuleControls:SetOVERWRITEToQuery
+ModuleControls:ShowOverwriteAllDialog
+ModuleControls:StoreDocument
+ModuleControls:SwitchMousePointer
+ModuleControls:WriteOptValueToCell
+Strings
+Strings:AddListtoList
+Strings:ArrayfromMultiArray
+Strings:ArrayOutOfString
+Strings:BubbleSortList
+Strings:CheckDouble
+Strings:ClearArray
+Strings:ClearMultiDimArray
+Strings:CountCharsinString
+Strings:DeleteStr
+Strings:DirectoryNameoutofPath
+Strings:ElimChar
+Strings:FieldinArray
+Strings:FieldinList
+Strings:FileNameoutofPath
+Strings:FindPartString
+Strings:FindSecondValue
+Strings:GetFileNameExtension
+Strings:GetFileNameWithoutExtension
+Strings:GetIndexForPartStringinMultiArray
+Strings:GetIndexInMultiArray
+Strings:GetValueoutofList
+Strings:IndexinArray
+Strings:LTRimChar
+Strings:MultiArrayInListbox
+Strings:PartStringInArray
+Strings:Power
+Strings:ReplaceString
+Strings:Round
+Strings:RTrimStr
+Strings:StringInMultiArray
+Misc
+Misc:AddNewSheetName
+Misc:AttachBasicMacroToEvent
+Misc:CalIsLeapYear
+Misc:ChangeCellValue
+Misc:ChangeValueofRange
+Misc:CheckNewSheetname
+Misc:ConnecttoDatabase
+Misc:CopySheetbyName
+Misc:CreateNewDocument
+Misc:CutPathView
+Misc:DeleteInputCells
+Misc:DispatchSlot
+Misc:DisposeDocument
+Misc:DuplicateRow
+Misc:GetCellByName
+Misc:GetColumnIndex
+Misc:GetDocumentType
+Misc:GetLastUsedRow
+Misc:GetLocale
+Misc:GetNumberFormatType
+Misc:GetOfficeSubPath
+Misc:GetPathSettings
+Misc:GetProductname
+Misc:GetPropertyValueIndex
+Misc:GetRegistryKeyContent
+Misc:GetResText
+Misc:GetRowIndex
+Misc:GetSheetIndex
+Misc:GetStarOfficeLocale
+Misc:GetStringofCellbyName
+Misc:GetValueofCellbyName
+Misc:InitResources
+Misc:IsFatOffice
+Misc:isHighContrast
+Misc:Main
+Misc:ModifyBorderLineWidth
+Misc:ModifyPropertyValue
+Misc:OpenDocument
+Misc:ProtectSheets
+Misc:RegisterNewDataSource
+Misc:ReplaceRangeValues
+Misc:RetrieveFileName
+Misc:ShowNoOfficePathError
+Misc:TaskonDesktop
+Misc:ToggleDesignMode
+Misc:ToggleWindow
+Misc:UnprotectSheets
+UCB
+UCB:AddFileNameToList
+UCB:AddFoldertoList
+UCB:CopyRecursively
+UCB:CreateFolder
+UCB:GetRealFileContent
+UCB:LoadDataFromFile
+UCB:Main
+UCB:ReadDirectories
+UCB:RetrieveDocTitle
+UCB:SaveDataToFile
+UCB:ShowHelperDialog
+Listbox
+Listbox:AddSingleItemToListbox
+Listbox:CopyListboxItems
+Listbox:EmptyListbox
+Listbox:FormMoveAll
+Listbox:FormMoveSelected
+Listbox:FormRemoveAll
+Listbox:FormRemoveSelected
+Listbox:FormSetMoveRights
+Listbox:GetItemPos
+Listbox:GetSelectedListboxItems
+Listbox:InitializeListboxProcedures
+Listbox:MergeList
+Listbox:MoveOrderedSelectedListbox
+Listbox:MoveSelectedListBox
+Listbox:RemoveListboxItemByName
+Listbox:RemoveListItems
+Listbox:RemoveSelected
+Listbox:SelectListboxItem
+Listbox:SetNewSelection
+Listbox:ToggleListboxControls
+Debug
+Debug:ActivateReadOnlyFlag
+Debug:DeactivateReadOnlyFlag
+Debug:FillDocument
+Debug:printdbgInfo
+Debug:ProtectCurrentSheets
+Debug:SetBasicReadOnlyFlag
+Debug:ShowArray
+Debug:ShowAvailableServiceNames
+Debug:ShowCommands
+Debug:ShowElementNames
+Debug:ShowNameValuePair
+Debug:ShowPropertyValues
+Debug:ShowSupportedServiceNames
+Debug:WritedbgInfo
+Debug:WriteDbgString
+WordCount
+WordCount:wordcount.bsh
+pythonSamples
+TableSample
+TableSample:createTable
+Untitled 1
+Standard
diff --git a/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_BasicOrganizer.txt b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_BasicOrganizer.txt
new file mode 100755
index 000000000000..07564201b883
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_BasicOrganizer.txt
@@ -0,0 +1,663 @@
+My Macros
+Standard
+Module1
+Module1:Main
+Oracle Open Office Macros
+basic
+Module1
+Module1:Main
+Depot
+CommonLang
+CommonLang:LoadLanguage
+CommonLang:CompleteMarketList
+CommonLang:LocalizedCurrencies
+CommonLang:LoadDepotDialogs
+CommonLang:InitializeStartUpModel
+Currency
+Currency:Startup
+Currency:EnableGoOnButton
+Currency:CloseStartUpDialog
+Currency:DisposeDocument
+Currency:ChooseMarket
+Currency:ConvertStylesCurrencies
+Currency:SwitchNumberFormat
+Currency:Numberformat
+Currency:CheckFormatType
+Depot
+Depot:Initialize
+Depot:Buy
+Depot:Sell
+Depot:Reset
+Depot:TransactionOk
+Depot:SelectStockname
+Depot:HandleStocks
+Depot:CancelStockRate
+Depot:CancelTransaction
+Depot:CommitStockRate
+Depot:EnableTransactionControls
+Depot:SetupTransactionControls
+Depot:AddShortCuttoControl
+Depot:OpenStockRatePage
+Depot:SelectStockNameForRates
+Depot:ToggleStockRateControls
+Depot:InitializeStockRatesControls
+Internet
+Internet:CheckHistoryControls
+Internet:InsertCompanyHistory
+Internet:InternetUpdate
+Internet:GetCurrentRate
+Internet:UpdateValue
+Internet:StringToDate
+Internet:UpdateChart
+Internet:CalculateChartafterSplit
+Lang_de
+Lang_de:LoadGermanLanguage
+Lang_en
+Lang_en:LoadEnglishLanguage
+Lang_es
+Lang_es:LoadSpanishLanguage
+Lang_fr
+Lang_fr:LoadFrenchLanguage
+Lang_it
+Lang_it:LoadItalianLanguage
+Lang_ja
+Lang_ja:LoadJapaneseLanguage
+Lang_ko
+Lang_ko:LoadKoreanLanguage
+Lang_sv
+Lang_sv:LoadSwedishLanguage
+Lang_tw
+Lang_tw:LoadChineseTradLanguage
+Lang_zh
+Lang_zh:LoadChineseSimpleLanguage
+tools
+tools:RemoveSheet
+tools:InitializeStatusLine
+tools:MakeRangeVisible
+tools:GetRowIndex
+tools:GetTransactionCount
+tools:GetStocksCount
+tools:FillListbox
+tools:CellValuetoControl
+tools:RemoveStockRows
+tools:AddValueToCellContent
+tools:CheckInputDate
+tools:InsertCurrentValue
+tools:SplitCellValue
+tools:GetStockRowIndex
+tools:GetStockID
+tools:CheckDocLocale
+Euro
+AutoPilotRun
+AutoPilotRun:StartAutoPilot
+AutoPilotRun:ConvertDocuments
+AutoPilotRun:InitializeDocument
+AutoPilotRun:ChangeToNextProgressStep
+AutoPilotRun:StoreDocument
+AutoPilotRun:SwapExtent
+AutoPilotRun:InitializeThirdStep
+AutoPilotRun:ToggleProgressStep
+AutoPilotRun:EnableStep2DialogControls
+AutoPilotRun:InitializeProgressPage
+AutoPilotRun:AssignFileName
+AutoPilotRun:ToggleGoOnButton
+AutoPilotRun:CallFolderPicker
+AutoPilotRun:CallFilePicker
+AutoPilotRun:PreviousStep
+Common
+Common:RetrieveDocumentObjects
+Common:CancelTask
+Common:ConvertDocument
+Common:SwitchNumberFormat
+Common:Numberformat
+Common:CheckFormatType
+Common:StartConversion
+Common:IncreaseStatusValue
+Common:SelectCurrency
+Common:FillUpCurrencyListbox
+Common:InitializeProgressbar
+Common:EndStatusLine
+ConvertRun
+ConvertRun:Main
+ConvertRun:SelectListItem
+ConvertRun:RetrieveEnableValue
+ConvertRun:EnableStep1DialogControls
+ConvertRun:ConvertRangesOrStylesOfDocument
+ConvertRun:ConvertWholeDocument
+ConvertRun:EmptySelection
+ConvertRun:AddSelectedRangeToSelRangesEnum
+ConvertRun:GetPreSelectedRange
+ConvertRun:AddRangeToListbox
+ConvertRun:CheckRangeSelection
+ConvertRun:FieldinList
+ConvertRun:CheckLocale
+ConvertRun:SetOptionValuestoNull
+ConvertRun:SetStatusLineText
+Hard
+Hard:CreateRangeList
+Hard:CreateRangeEnumeration
+Hard:AddSheetRanges
+Hard:SelectRange
+Hard:ConvertThehardWay
+Hard:ConvertCellCurrencies
+Hard:ModifyObjectValuewithCurrFactor
+Hard:CheckIfRangeisCurrency
+Hard:CountColumnsForRow
+Hard:CountRangeCells
+Init
+Init:InitializeResources
+Init:InitializeLanguages
+Init:InitializeCurrencies
+Init:InitializeControls
+Init:InitializeConverter
+Init:InitializeCurrencyValues
+Init:InitializeLocales
+Protect
+Protect:UnprotectSheetsWithPassWord
+Protect:UnprotectSheet
+Protect:UnprotectSheetWithDialog
+Protect:ExecutePasswordDialog
+Protect:ReadPassword
+Protect:RejectPassword
+Protect:ReprotectSheets
+Protect:AddSheettoUnprotectionlist
+Protect:CheckSheetProtection
+Soft
+Soft:CreateStyleEnumeration
+Soft:MakeStyleEnumeration
+Soft:AssignRangestoStyle
+Soft:AssignCellFormatRanges
+Soft:DeselectStyle
+Soft:RetrieveRangeNamefromAddress
+Soft:RetrieveSheetoutofRangeName
+Soft:RetrieveRangeoutofRangeName
+Soft:ConvertTheSoftWay
+Soft:GetAssignedRanges
+Writer
+Writer:ConvertWriterTables
+Writer:ModifyObjectValuewithCurrFactor
+Writer:ConvertTextFields
+FormWizard
+DBMeta
+DBMeta:GetDatabaseNames
+DBMeta:GetSelectedDBMetaData
+DBMeta:GetConnection
+DBMeta:GetDBMetaData
+DBMeta:GetTableMetaData
+DBMeta:GetSpecificFieldNames
+DBMeta:CreateDBForm
+DBMeta:AddOrRemoveBinaryFieldsToWidthList
+DBMeta:CreateCommandTypeList
+DBMeta:GetCurrentMetaValues
+DBMeta:AssignFieldLength
+develop
+develop:PositionControls
+develop:ResetPosSizes
+develop:RepositionColumnarLeftControls
+develop:ResetDBShape
+develop:InitializePosSizes
+develop:InsertTextControl
+develop:InsertDBControl
+develop:InsertTimeStampShape
+develop:GetLabelDiffHeight
+develop:CheckJustifiedPosition
+develop:GetCorrWidth
+develop:AdjustLineWidth
+develop:CheckOuterPoints
+develop:PositionGridControl
+develop:SetupGridColumn
+develop:ControlCaptionstoStandardLayout
+develop:GroupShapesTogether
+FormWizard
+FormWizard:Main
+FormWizard:MainWithDefault
+FormWizard:FormGetFields
+FormWizard:FillUpFieldsListbox
+FormWizard:PreviousStep
+FormWizard:NextStep
+FormWizard:InitializeLayoutSettings
+FormWizard:ToggleDatabasePage
+FormWizard:CommitLastDocumentChanges
+FormWizard:StoreFormInDatabase
+FormWizard:StoreForm
+FormWizard:EmptyFieldsListboxes
+FormWizard:DeleteFirstTableListBoxEntry
+FormWizard:DeleteFirstListboxEntry
+Language
+Language:LoadLanguage
+Language:SetDialogLanguage
+Language:InitializeWidthList
+Layouter
+Layouter:InsertControl
+Layouter:ArrangeControls
+Layouter:OpenFormDocument
+Layouter:InitializeLabelValues
+Layouter:ConfigurePageStyle
+Layouter:ChangeBorderLayouts
+Layouter:ChangeLabelAlignments
+Layouter:ChangeArrangemode
+Layouter:ToggleBorderGroup
+Layouter:ToggleAlignGroup
+Layouter:ToggleLayoutPage
+Layouter:DestroyControlShapes
+Layouter:SwitchArrangementButtons
+Layouter:SwitchBorderMode
+Layouter:SwitchAlignMode
+tools
+tools:SetProgressValue
+tools:GetPreferredWidth
+tools:GetPreferredHeight
+tools:GetPeerSize
+tools:TwipToCM
+tools:TwipTo100telMM
+tools:TwipToPixel
+tools:PixelTo100thMMX
+tools:PixelTo100thMMY
+tools:GetPoint
+tools:GetSize
+tools:ImportStyles
+tools:SetNumerics
+tools:RemoveShapes
+tools:RemoveNirwanaShapes
+tools:ShapesToNirwana
+tools:CalcUniqueContentName
+tools:CountItemsInArray
+tools:GetDBHeight
+tools:GetFormWizardPaths
+tools:GetFilterName
+Gimmicks
+AutoText
+AutoText:Main
+AutoText:InsertStringToCell
+ChangeAllChars
+ChangeAllChars:ChangeAllChars
+ChangeAllChars:ReplaceAllStrings
+ChangeAllChars:ReplaceStrings
+GetTexts
+GetTexts:Main
+GetTexts:GetCalcStrings
+GetTexts:GetCellTexts
+GetTexts:GetAnnotations
+GetTexts:GetNamedRanges
+GetTexts:GetCalcGraphicNames
+GetTexts:GetParagraphTexts
+GetTexts:GetChartStrings
+GetTexts:GetFrameTexts
+GetTexts:GetTextFieldStrings
+GetTexts:GetLinkedFileNames
+GetTexts:GetSectionNames
+GetTexts:GetWriterStrings
+GetTexts:GetDrawPageTitles
+GetTexts:GetPageStrings
+GetTexts:GetDrawStrings
+GetTexts:GetDocumentProps
+GetTexts:GetHyperlinks
+GetTexts:GetGraphicNames
+GetTexts:GetStyles
+GetTexts:GetControlStrings
+GetTexts:GetControlContent
+GetTexts:WriteStringtoLogFile
+GetTexts:MakeLogHeadLine
+ReadDir
+ReadDir:Main
+ReadDir:TreeInfo
+ReadDir:CreateTextShape
+ReadDir:CalculateXPoint
+ReadDir:DrawLine
+ReadDir:GetSourceDirectory
+ReadDir:ReadSourceDirectory
+ReadDir:CloseDialog
+ReadDir:AdjustPageHeight
+ReadDir:SetNewLevels
+ReadDir:CheckPageWidth
+ReadDir:ToggleDialogControls
+Userfields
+Userfields:StartChangesUserfields
+Userfields:FillDialog
+Userfields:ScrollControls
+Userfields:ScrollTextFieldInfo
+Userfields:StopMacro
+Userfields:SaveSettings
+Userfields:ToggleButtons
+Userfields:InitializeUserFamily
+Userfields:AddRecord
+Userfields:FillupTextFields
+Userfields:StepToRecord
+Userfields:SelectCurrentFields
+Userfields:DeleteCurrentSettings
+ImportWizard
+API
+API:OpenRegKey
+API:GetDefaultPath
+API:GetTemplateDefaultPath
+API:QueryValueEx
+API:QueryValue
+DialogModul
+DialogModul:FillStep_Welcome
+DialogModul:FillStep_InputPaths
+DialogModul:FillUpApplicationList
+DialogModul:InitializePathsforCurrentApplication
+DialogModul:AssignPathToCurrentApplication
+DialogModul:SaveStep_InputPath
+DialogModul:ToggleInputPaths
+DialogModul:MakeSummaryString
+DialogModul:FillStep_Summary
+DialogModul:FillStep_Progress
+DialogModul:GetFilterTracingLogPath
+DialogModul:CheckMSImportAvailability
+DialogModul:SetupMSConfiguration
+DialogModul:SetupXMLConfiguration
+DialogModul:CheckControlPath
+DialogModul:CheckInputPaths
+DialogModul:CheckTextBoxPath
+DialogModul:InitializeProgressPage
+DialogModul:SetProgressDisplay
+DialogModul:TakoverFolderName
+DialogModul:FinalizeDialogButtons
+FilesModul
+FilesModul:ReadCollectionPaths
+FilesModul:GetApplicationIndex
+FilesModul:InterruptProcess
+FilesModul:AddCollectionPath
+FilesModul:SetExtension
+FilesModul:AddFilterNameToPathItem
+FilesModul:CheckIfToAddPathToCollection
+FilesModul:CollectPaths
+FilesModul:ConvertAllDocuments
+FilesModul:AddListtoFilesList
+FilesModul:GetTargetTemplatePath
+FilesModul:GetFilterName
+FilesModul:SearchArrayforPartString
+FilesModul:CreateLogTable
+FilesModul:GetSize
+FilesModul:InsertCommandButtonatViewCursor
+FilesModul:CreateLogDocument
+FilesModul:GetFilterTracingLogPath
+FilesModul:InsertTargetUrlToLogDocument
+FilesModul:InsertSourceUrlToLogDocument
+FilesModul:InsertHyperLinkToLogCell
+FilesModul:InsertCommentToLogCell
+FilesModul:AddLogStatistics
+FilesModul:CheckIfMacroExists
+FilesModul:CheckPassWordProtection
+FilesModul:OpenLogDocument
+FilesModul:MergeRange
+FilesModul:ConcatComment
+Language
+Language:LoadLanguage
+Language:GetApplResourceArray
+Main
+Main:Main
+Main:NextStep
+Main:PrevStep
+Main:CancelTask
+Main:TemplateDirSearchDialog
+Main:RepaintHeaderPreview
+Main:CheckModuleInstallation
+Main:CheckInstalledModule
+Main:ToggleCheckboxes
+Main:ToggleCheckboxesWithBoolean
+Main:ToggleNextButton
+Main:TakeOverPathSettings
+Main:GetImportWizardPaths
+Schedule
+BankHoliday
+BankHoliday:Main
+BankHoliday:CalEasterTable
+BankHoliday:CalOrthodoxEasterTable
+BankHoliday:CalInitGlobalVariablesDate
+BankHoliday:CalInsertBankholiday
+BankHoliday:CalMaxDayInMonth
+BankHoliday:CalGetIntOfShortMonthName
+BankHoliday:CalInsertOwnDataInTables
+BankHoliday:GetMonthDate
+BankHoliday:GetNextWeekDay
+BankHoliday:AddFollowUpHolidays
+CalendarMain
+CalendarMain:CalAutopilotTable
+CalendarMain:SetupNumberFormatter
+CalendarMain:AddNumberFormat
+CalendarMain:CalChooseCalendar
+CalendarMain:CalcmdCancel
+CalendarMain:CalcmdOk
+CreateTable
+CreateTable:CalCreateYearTable
+CreateTable:CalCreateMonthTable
+CreateTable:FormatCalCells
+DlgControl
+DlgControl:Main
+DlgControl:CalcmdDeleteSelect
+DlgControl:CalSaveOwnEventControls
+DlgControl:CalMouseMoved
+DlgControl:SelectState
+DlgControl:MouseLeavesImage
+DlgControl:CalClearInputMask
+DlgControl:CalmdSwitchOwnDataOrGeneral
+DlgControl:ToggleInsertButton
+DlgControl:CalUpdateNewEventFrame
+GermanHolidays
+GermanHolidays:Main
+GermanHolidays:CalGetGermanLandAtMousePos
+GermanHolidays:CalFindWholeYearHolidays_GERMANY
+Language
+Language:LoadLanguage
+LocalHolidays
+LocalHolidays:Main
+LocalHolidays:FindWholeYearHolidays_FRANCE
+LocalHolidays:FindWholeYearHolidays_SWED
+LocalHolidays:FindWholeYearHolidays_FI
+LocalHolidays:FindWholeYearHolidays_DK
+LocalHolidays:FindWholeYearHolidays_ITA
+LocalHolidays:FindWholeYearHolidays_TRK
+LocalHolidays:CalculateturkishReligousHolidays
+LocalHolidays:FindWholeYearHolidays_GREEK
+LocalHolidays:FindWholeYearHolidays_SPAIN
+LocalHolidays:FindWholeYearHolidays_PORT
+LocalHolidays:FindWholeYearHolidays_NL
+LocalHolidays:FindWholeYearHolidays_PL
+LocalHolidays:FindWholeYearHolidays_RU
+LocalHolidays:FindWholeYearHolidays_US
+LocalHolidays:FindWholeYearHolidays_JP
+LocalHolidays:FindWholeYearHolidays_TW
+LocalHolidays:FindWholeYearHolidays_CN
+LocalHolidays:CalculateChineseNewYear
+LocalHolidays:CalculateJapaneseSpringDay
+LocalHolidays:CalculateJapaneseAutumnDay
+OwnEvents
+OwnEvents:Main
+OwnEvents:CalSaveOwnData
+OwnEvents:CalLoadOwnData
+OwnEvents:CalCreateDateStrOfInput
+OwnEvents:CalcmdInsertData
+OwnEvents:GetSelectedDateUnits
+OwnEvents:GetDateUnits
+OwnEvents:CalGetNameOfEvent
+OwnEvents:CheckInsertedDates
+OwnEvents:GetOwnMonth
+ScriptBindingLibrary
+Template
+Autotext
+Autotext:Main
+Autotext:CreateUserDatafield
+Autotext:CreateBullet
+Autotext:CreatePlaceholder
+Correspondence
+Correspondence:Main
+Correspondence:Placeholder
+Correspondence:Database
+Correspondence:LoadLanguageCorrespondence
+Correspondence:GetFieldName
+Correspondence:OK
+Correspondence:InsertDBField
+Correspondence:InsertPlaceholder
+ModuleAgenda
+ModuleAgenda:Initialize
+ModuleAgenda:LoadLanguageAgenda
+ModuleAgenda:ModifyTemplate
+ModuleAgenda:NewTopic
+ModuleAgenda:FinishAgenda
+ModuleAgenda:CreateBookMarkCursor
+ModuleAgenda:DeleteButtons
+ModuleAgenda:GetOptionValues
+Samples
+Samples:PrepareForEditing
+Samples:ShowStyles
+Samples:SelectStyle
+Samples:SaveCurrentStyles
+Samples:RestoreCurrentStyles
+Samples:CloseStyleDialog
+Samples:KillTempFile
+Tools
+Debug
+Debug:ActivateReadOnlyFlag
+Debug:DeactivateReadOnlyFlag
+Debug:SetBasicReadOnlyFlag
+Debug:WritedbgInfo
+Debug:WriteDbgString
+Debug:printdbgInfo
+Debug:ShowArray
+Debug:ShowPropertyValues
+Debug:ShowNameValuePair
+Debug:ShowElementNames
+Debug:ShowSupportedServiceNames
+Debug:ShowAvailableServiceNames
+Debug:ShowCommands
+Debug:ProtectCurrentSheets
+Debug:FillDocument
+Listbox
+Listbox:MergeList
+Listbox:RemoveListItems
+Listbox:InitializeListboxProcedures
+Listbox:CopyListboxItems
+Listbox:FormMoveSelected
+Listbox:FormMoveAll
+Listbox:FormRemoveSelected
+Listbox:FormRemoveAll
+Listbox:MoveSelectedListBox
+Listbox:MoveOrderedSelectedListbox
+Listbox:RemoveSelected
+Listbox:SetNewSelection
+Listbox:ToggleListboxControls
+Listbox:FormSetMoveRights
+Listbox:AddSingleItemToListbox
+Listbox:EmptyListbox
+Listbox:SelectListboxItem
+Listbox:GetSelectedListboxItems
+Listbox:RemoveListboxItemByName
+Listbox:GetItemPos
+Misc
+Misc:Main
+Misc:RegisterNewDataSource
+Misc:ConnecttoDatabase
+Misc:GetStarOfficeLocale
+Misc:GetRegistryKeyContent
+Misc:GetProductname
+Misc:OpenDocument
+Misc:TaskonDesktop
+Misc:RetrieveFileName
+Misc:GetPathSettings
+Misc:GetOfficeSubPath
+Misc:ShowNoOfficePathError
+Misc:InitResources
+Misc:GetResText
+Misc:CutPathView
+Misc:DeleteInputCells
+Misc:ChangeValueofRange
+Misc:ReplaceRangeValues
+Misc:GetValueofCellbyName
+Misc:DuplicateRow
+Misc:GetStringofCellbyName
+Misc:GetCellByName
+Misc:ChangeCellValue
+Misc:GetDocumentType
+Misc:GetNumberFormatType
+Misc:ProtectSheets
+Misc:UnprotectSheets
+Misc:GetRowIndex
+Misc:GetColumnIndex
+Misc:CopySheetbyName
+Misc:ToggleWindow
+Misc:CheckNewSheetname
+Misc:AddNewSheetName
+Misc:GetSheetIndex
+Misc:GetLastUsedRow
+Misc:ModifyBorderLineWidth
+Misc:AttachBasicMacroToEvent
+Misc:ModifyPropertyValue
+Misc:GetPropertyValueIndex
+Misc:DispatchSlot
+Misc:IsFatOffice
+Misc:GetLocale
+Misc:ToggleDesignMode
+Misc:isHighContrast
+Misc:CreateNewDocument
+Misc:DisposeDocument
+Misc:CalIsLeapYear
+ModuleControls
+ModuleControls:getControlModel
+ModuleControls:GetControlShape
+ModuleControls:getControlView
+ModuleControls:DisposeControl
+ModuleControls:GetControlGroupModel
+ModuleControls:GetRefValue
+ModuleControls:GetRefValueOfControlGroup
+ModuleControls:GetOptionGroupValue
+ModuleControls:WriteOptValueToCell
+ModuleControls:LoadDialog
+ModuleControls:GetFolderName
+ModuleControls:GetFileName
+ModuleControls:StoreDocument
+ModuleControls:AddFiltersToDialog
+ModuleControls:SwitchMousePointer
+ModuleControls:ShowOverwriteAllDialog
+ModuleControls:SetOVERWRITEToQuery
+ModuleControls:SetOVERWRITEToAlways
+ModuleControls:SetOVERWRITEToNever
+Strings
+Strings:ElimChar
+Strings:DeleteStr
+Strings:FindPartString
+Strings:PartStringInArray
+Strings:RTrimStr
+Strings:LTRimChar
+Strings:ArrayOutOfString
+Strings:ClearArray
+Strings:ClearMultiDimArray
+Strings:FieldinArray
+Strings:FieldinList
+Strings:IndexinArray
+Strings:MultiArrayInListbox
+Strings:StringInMultiArray
+Strings:GetIndexInMultiArray
+Strings:GetIndexForPartStringinMultiArray
+Strings:ArrayfromMultiArray
+Strings:ReplaceString
+Strings:FindSecondValue
+Strings:Power
+Strings:Round
+Strings:FileNameoutofPath
+Strings:GetFileNameExtension
+Strings:GetFileNameWithoutExtension
+Strings:DirectoryNameoutofPath
+Strings:CountCharsinString
+Strings:BubbleSortList
+Strings:GetValueoutofList
+Strings:AddListtoList
+Strings:CheckDouble
+UCB
+UCB:Main
+UCB:ReadDirectories
+UCB:AddFoldertoList
+UCB:AddFileNameToList
+UCB:RetrieveDocTitle
+UCB:GetRealFileContent
+UCB:CopyRecursively
+UCB:ShowHelperDialog
+UCB:SaveDataToFile
+UCB:LoadDataFromFile
+UCB:CreateFolder
+WikiEditor
+Module1
+Module1:Main
+Untitled 1
+Standard
diff --git a/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_BeanShell.txt b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_BeanShell.txt
new file mode 100755
index 000000000000..141bebef85d5
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_BeanShell.txt
@@ -0,0 +1,14 @@
+My Macros
+Oracle Open Office Macros
+Capitalise
+capitalise.bsh
+HelloWorld
+helloworld.bsh
+Highlight
+ButtonPressHandler.bsh
+ShowDialog.bsh
+MemoryUsage
+memusage.bsh
+WordCount
+wordcount.bsh
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_JavaScript.txt b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_JavaScript.txt
new file mode 100755
index 000000000000..09ea2fbc3203
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_JavaScript.txt
@@ -0,0 +1,10 @@
+My Macros
+Oracle Open Office Macros
+ExportSheetsToHTML
+exportsheetstohtml.js
+HelloWorld
+helloworld.js
+Highlight
+ButtonPressHandler.js
+ShowDialog.js
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_Python.txt b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_Python.txt
new file mode 100755
index 000000000000..dfe18f127bef
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_Python.txt
@@ -0,0 +1,10 @@
+My Macros
+Oracle Open Office Macros
+Capitalise
+capitalisePython
+HelloWorld
+HelloWorldPython
+pythonSamples
+TableSample
+createTable
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_RunMacro.txt b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_RunMacro.txt
new file mode 100755
index 000000000000..e8154b562c23
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_RunMacro.txt
@@ -0,0 +1,687 @@
+My Macros
+Standard
+Module1
+Module1:Main
+WikiEditor
+Module1
+Module1:Main
+basic
+Module1
+Module1:Main
+Oracle Open Office Macros
+Capitalise
+Capitalise:capitalise.bsh
+Capitalise:capitalisePython
+Depot
+Depot
+Depot:AddShortCuttoControl
+Depot:Buy
+Depot:CancelStockRate
+Depot:CancelTransaction
+Depot:CommitStockRate
+Depot:EnableTransactionControls
+Depot:HandleStocks
+Depot:Initialize
+Depot:InitializeStockRatesControls
+Depot:OpenStockRatePage
+Depot:Reset
+Depot:SelectStockname
+Depot:SelectStockNameForRates
+Depot:Sell
+Depot:SetupTransactionControls
+Depot:ToggleStockRateControls
+Depot:TransactionOk
+CommonLang
+CommonLang:CompleteMarketList
+CommonLang:InitializeStartUpModel
+CommonLang:LoadDepotDialogs
+CommonLang:LoadLanguage
+CommonLang:LocalizedCurrencies
+Currency
+Currency:CheckFormatType
+Currency:ChooseMarket
+Currency:CloseStartUpDialog
+Currency:ConvertStylesCurrencies
+Currency:DisposeDocument
+Currency:EnableGoOnButton
+Currency:Numberformat
+Currency:Startup
+Currency:SwitchNumberFormat
+Internet
+Internet:CalculateChartafterSplit
+Internet:CheckHistoryControls
+Internet:GetCurrentRate
+Internet:InsertCompanyHistory
+Internet:InternetUpdate
+Internet:StringToDate
+Internet:UpdateChart
+Internet:UpdateValue
+Lang_de
+Lang_de:LoadGermanLanguage
+tools
+tools:AddValueToCellContent
+tools:CellValuetoControl
+tools:CheckDocLocale
+tools:CheckInputDate
+tools:FillListbox
+tools:GetRowIndex
+tools:GetStockID
+tools:GetStockRowIndex
+tools:GetStocksCount
+tools:GetTransactionCount
+tools:InitializeStatusLine
+tools:InsertCurrentValue
+tools:MakeRangeVisible
+tools:RemoveSheet
+tools:RemoveStockRows
+tools:SplitCellValue
+Lang_en
+Lang_en:LoadEnglishLanguage
+Lang_fr
+Lang_fr:LoadFrenchLanguage
+Lang_it
+Lang_it:LoadItalianLanguage
+Lang_es
+Lang_es:LoadSpanishLanguage
+Lang_sv
+Lang_sv:LoadSwedishLanguage
+Lang_zh
+Lang_zh:LoadChineseSimpleLanguage
+Lang_tw
+Lang_tw:LoadChineseTradLanguage
+Lang_ko
+Lang_ko:LoadKoreanLanguage
+Lang_ja
+Lang_ja:LoadJapaneseLanguage
+Euro
+ConvertRun
+ConvertRun:AddRangeToListbox
+ConvertRun:AddSelectedRangeToSelRangesEnum
+ConvertRun:CheckLocale
+ConvertRun:CheckRangeSelection
+ConvertRun:ConvertRangesOrStylesOfDocument
+ConvertRun:ConvertWholeDocument
+ConvertRun:EmptySelection
+ConvertRun:EnableStep1DialogControls
+ConvertRun:FieldinList
+ConvertRun:GetPreSelectedRange
+ConvertRun:Main
+ConvertRun:RetrieveEnableValue
+ConvertRun:SelectListItem
+ConvertRun:SetOptionValuestoNull
+ConvertRun:SetStatusLineText
+AutoPilotRun
+AutoPilotRun:AssignFileName
+AutoPilotRun:CallFilePicker
+AutoPilotRun:CallFolderPicker
+AutoPilotRun:ChangeToNextProgressStep
+AutoPilotRun:ConvertDocuments
+AutoPilotRun:EnableStep2DialogControls
+AutoPilotRun:InitializeDocument
+AutoPilotRun:InitializeProgressPage
+AutoPilotRun:InitializeThirdStep
+AutoPilotRun:PreviousStep
+AutoPilotRun:StartAutoPilot
+AutoPilotRun:StoreDocument
+AutoPilotRun:SwapExtent
+AutoPilotRun:ToggleGoOnButton
+AutoPilotRun:ToggleProgressStep
+Hard
+Hard:AddSheetRanges
+Hard:CheckIfRangeisCurrency
+Hard:ConvertCellCurrencies
+Hard:ConvertThehardWay
+Hard:CountColumnsForRow
+Hard:CountRangeCells
+Hard:CreateRangeEnumeration
+Hard:CreateRangeList
+Hard:ModifyObjectValuewithCurrFactor
+Hard:SelectRange
+Soft
+Soft:AssignCellFormatRanges
+Soft:AssignRangestoStyle
+Soft:ConvertTheSoftWay
+Soft:CreateStyleEnumeration
+Soft:DeselectStyle
+Soft:GetAssignedRanges
+Soft:MakeStyleEnumeration
+Soft:RetrieveRangeNamefromAddress
+Soft:RetrieveRangeoutofRangeName
+Soft:RetrieveSheetoutofRangeName
+Init
+Init:InitializeControls
+Init:InitializeConverter
+Init:InitializeCurrencies
+Init:InitializeCurrencyValues
+Init:InitializeLanguages
+Init:InitializeLocales
+Init:InitializeResources
+Common
+Common:CancelTask
+Common:CheckFormatType
+Common:ConvertDocument
+Common:EndStatusLine
+Common:FillUpCurrencyListbox
+Common:IncreaseStatusValue
+Common:InitializeProgressbar
+Common:Numberformat
+Common:RetrieveDocumentObjects
+Common:SelectCurrency
+Common:StartConversion
+Common:SwitchNumberFormat
+Writer
+Writer:ConvertTextFields
+Writer:ConvertWriterTables
+Writer:ModifyObjectValuewithCurrFactor
+Protect
+Protect:AddSheettoUnprotectionlist
+Protect:CheckSheetProtection
+Protect:ExecutePasswordDialog
+Protect:ReadPassword
+Protect:RejectPassword
+Protect:ReprotectSheets
+Protect:UnprotectSheet
+Protect:UnprotectSheetsWithPassWord
+Protect:UnprotectSheetWithDialog
+ExportSheetsToHTML
+ExportSheetsToHTML:exportsheetstohtml.js
+FormWizard
+FormWizard
+FormWizard:CommitLastDocumentChanges
+FormWizard:DeleteFirstListboxEntry
+FormWizard:DeleteFirstTableListBoxEntry
+FormWizard:EmptyFieldsListboxes
+FormWizard:FillUpFieldsListbox
+FormWizard:FormGetFields
+FormWizard:InitializeLayoutSettings
+FormWizard:Main
+FormWizard:MainWithDefault
+FormWizard:NextStep
+FormWizard:PreviousStep
+FormWizard:StoreForm
+FormWizard:StoreFormInDatabase
+FormWizard:ToggleDatabasePage
+Layouter
+Layouter:ArrangeControls
+Layouter:ChangeArrangemode
+Layouter:ChangeBorderLayouts
+Layouter:ChangeLabelAlignments
+Layouter:ConfigurePageStyle
+Layouter:DestroyControlShapes
+Layouter:InitializeLabelValues
+Layouter:InsertControl
+Layouter:OpenFormDocument
+Layouter:SwitchAlignMode
+Layouter:SwitchArrangementButtons
+Layouter:SwitchBorderMode
+Layouter:ToggleAlignGroup
+Layouter:ToggleBorderGroup
+Layouter:ToggleLayoutPage
+Language
+Language:InitializeWidthList
+Language:LoadLanguage
+Language:SetDialogLanguage
+DBMeta
+DBMeta:AddOrRemoveBinaryFieldsToWidthList
+DBMeta:AssignFieldLength
+DBMeta:CreateCommandTypeList
+DBMeta:CreateDBForm
+DBMeta:GetConnection
+DBMeta:GetCurrentMetaValues
+DBMeta:GetDatabaseNames
+DBMeta:GetDBMetaData
+DBMeta:GetSelectedDBMetaData
+DBMeta:GetSpecificFieldNames
+DBMeta:GetTableMetaData
+tools
+tools:CalcUniqueContentName
+tools:CountItemsInArray
+tools:GetDBHeight
+tools:GetFilterName
+tools:GetFormWizardPaths
+tools:GetPeerSize
+tools:GetPoint
+tools:GetPreferredHeight
+tools:GetPreferredWidth
+tools:GetSize
+tools:ImportStyles
+tools:PixelTo100thMMX
+tools:PixelTo100thMMY
+tools:RemoveNirwanaShapes
+tools:RemoveShapes
+tools:SetNumerics
+tools:SetProgressValue
+tools:ShapesToNirwana
+tools:TwipTo100telMM
+tools:TwipToCM
+tools:TwipToPixel
+develop
+develop:AdjustLineWidth
+develop:CheckJustifiedPosition
+develop:CheckOuterPoints
+develop:ControlCaptionstoStandardLayout
+develop:GetCorrWidth
+develop:GetLabelDiffHeight
+develop:GroupShapesTogether
+develop:InitializePosSizes
+develop:InsertDBControl
+develop:InsertTextControl
+develop:InsertTimeStampShape
+develop:PositionControls
+develop:PositionGridControl
+develop:RepositionColumnarLeftControls
+develop:ResetDBShape
+develop:ResetPosSizes
+develop:SetupGridColumn
+Gimmicks
+GetTexts
+GetTexts:GetAnnotations
+GetTexts:GetCalcGraphicNames
+GetTexts:GetCalcStrings
+GetTexts:GetCellTexts
+GetTexts:GetChartStrings
+GetTexts:GetControlContent
+GetTexts:GetControlStrings
+GetTexts:GetDocumentProps
+GetTexts:GetDrawPageTitles
+GetTexts:GetDrawStrings
+GetTexts:GetFrameTexts
+GetTexts:GetGraphicNames
+GetTexts:GetHyperlinks
+GetTexts:GetLinkedFileNames
+GetTexts:GetNamedRanges
+GetTexts:GetPageStrings
+GetTexts:GetParagraphTexts
+GetTexts:GetSectionNames
+GetTexts:GetStyles
+GetTexts:GetTextFieldStrings
+GetTexts:GetWriterStrings
+GetTexts:Main
+GetTexts:MakeLogHeadLine
+GetTexts:WriteStringtoLogFile
+Userfields
+Userfields:AddRecord
+Userfields:DeleteCurrentSettings
+Userfields:FillDialog
+Userfields:FillupTextFields
+Userfields:InitializeUserFamily
+Userfields:SaveSettings
+Userfields:ScrollControls
+Userfields:ScrollTextFieldInfo
+Userfields:SelectCurrentFields
+Userfields:StartChangesUserfields
+Userfields:StepToRecord
+Userfields:StopMacro
+Userfields:ToggleButtons
+ChangeAllChars
+ChangeAllChars:ChangeAllChars
+ChangeAllChars:ReplaceAllStrings
+ChangeAllChars:ReplaceStrings
+AutoText
+AutoText:InsertStringToCell
+AutoText:Main
+ReadDir
+ReadDir:AdjustPageHeight
+ReadDir:CalculateXPoint
+ReadDir:CheckPageWidth
+ReadDir:CloseDialog
+ReadDir:CreateTextShape
+ReadDir:DrawLine
+ReadDir:GetSourceDirectory
+ReadDir:Main
+ReadDir:ReadSourceDirectory
+ReadDir:SetNewLevels
+ReadDir:ToggleDialogControls
+ReadDir:TreeInfo
+HelloWorld
+HelloWorld:helloworld.bsh
+HelloWorld:helloworld.js
+HelloWorld:HelloWorld.printHW
+HelloWorld:HelloWorldPython
+Highlight
+Highlight:ButtonPressHandler.bsh
+Highlight:ButtonPressHandler.js
+Highlight:HighlightText.showForm
+Highlight:ShowDialog.bsh
+Highlight:ShowDialog.js
+ImportWizard
+Main
+Main:CancelTask
+Main:CheckInstalledModule
+Main:CheckModuleInstallation
+Main:GetImportWizardPaths
+Main:Main
+Main:NextStep
+Main:PrevStep
+Main:RepaintHeaderPreview
+Main:TakeOverPathSettings
+Main:TemplateDirSearchDialog
+Main:ToggleCheckboxes
+Main:ToggleCheckboxesWithBoolean
+Main:ToggleNextButton
+DialogModul
+DialogModul:AssignPathToCurrentApplication
+DialogModul:CheckControlPath
+DialogModul:CheckInputPaths
+DialogModul:CheckMSImportAvailability
+DialogModul:CheckTextBoxPath
+DialogModul:FillStep_InputPaths
+DialogModul:FillStep_Progress
+DialogModul:FillStep_Summary
+DialogModul:FillStep_Welcome
+DialogModul:FillUpApplicationList
+DialogModul:FinalizeDialogButtons
+DialogModul:GetFilterTracingLogPath
+DialogModul:InitializePathsforCurrentApplication
+DialogModul:InitializeProgressPage
+DialogModul:MakeSummaryString
+DialogModul:SaveStep_InputPath
+DialogModul:SetProgressDisplay
+DialogModul:SetupMSConfiguration
+DialogModul:SetupXMLConfiguration
+DialogModul:TakoverFolderName
+DialogModul:ToggleInputPaths
+Language
+Language:GetApplResourceArray
+Language:LoadLanguage
+FilesModul
+FilesModul:AddCollectionPath
+FilesModul:AddFilterNameToPathItem
+FilesModul:AddListtoFilesList
+FilesModul:AddLogStatistics
+FilesModul:CheckIfMacroExists
+FilesModul:CheckIfToAddPathToCollection
+FilesModul:CheckPassWordProtection
+FilesModul:CollectPaths
+FilesModul:ConcatComment
+FilesModul:ConvertAllDocuments
+FilesModul:CreateLogDocument
+FilesModul:CreateLogTable
+FilesModul:GetApplicationIndex
+FilesModul:GetFilterName
+FilesModul:GetFilterTracingLogPath
+FilesModul:GetSize
+FilesModul:GetTargetTemplatePath
+FilesModul:InsertCommandButtonatViewCursor
+FilesModul:InsertCommentToLogCell
+FilesModul:InsertHyperLinkToLogCell
+FilesModul:InsertSourceUrlToLogDocument
+FilesModul:InsertTargetUrlToLogDocument
+FilesModul:InterruptProcess
+FilesModul:MergeRange
+FilesModul:OpenLogDocument
+FilesModul:ReadCollectionPaths
+FilesModul:SearchArrayforPartString
+FilesModul:SetExtension
+API
+API:GetDefaultPath
+API:GetTemplateDefaultPath
+API:OpenRegKey
+API:QueryValue
+API:QueryValueEx
+MemoryUsage
+MemoryUsage:MemoryUsage.updateMemoryUsage
+MemoryUsage:memusage.bsh
+Schedule
+OwnEvents
+OwnEvents:CalcmdInsertData
+OwnEvents:CalCreateDateStrOfInput
+OwnEvents:CalGetNameOfEvent
+OwnEvents:CalLoadOwnData
+OwnEvents:CalSaveOwnData
+OwnEvents:CheckInsertedDates
+OwnEvents:GetDateUnits
+OwnEvents:GetOwnMonth
+OwnEvents:GetSelectedDateUnits
+OwnEvents:Main
+CalendarMain
+CalendarMain:AddNumberFormat
+CalendarMain:CalAutopilotTable
+CalendarMain:CalChooseCalendar
+CalendarMain:CalcmdCancel
+CalendarMain:CalcmdOk
+CalendarMain:SetupNumberFormatter
+BankHoliday
+BankHoliday:AddFollowUpHolidays
+BankHoliday:CalEasterTable
+BankHoliday:CalGetIntOfShortMonthName
+BankHoliday:CalInitGlobalVariablesDate
+BankHoliday:CalInsertBankholiday
+BankHoliday:CalInsertOwnDataInTables
+BankHoliday:CalMaxDayInMonth
+BankHoliday:CalOrthodoxEasterTable
+BankHoliday:GetMonthDate
+BankHoliday:GetNextWeekDay
+BankHoliday:Main
+DlgControl
+DlgControl:CalClearInputMask
+DlgControl:CalcmdDeleteSelect
+DlgControl:CalmdSwitchOwnDataOrGeneral
+DlgControl:CalMouseMoved
+DlgControl:CalSaveOwnEventControls
+DlgControl:CalUpdateNewEventFrame
+DlgControl:Main
+DlgControl:MouseLeavesImage
+DlgControl:SelectState
+DlgControl:ToggleInsertButton
+Language
+Language:LoadLanguage
+CreateTable
+CreateTable:CalCreateMonthTable
+CreateTable:CalCreateYearTable
+CreateTable:FormatCalCells
+GermanHolidays
+GermanHolidays:CalFindWholeYearHolidays_GERMANY
+GermanHolidays:CalGetGermanLandAtMousePos
+GermanHolidays:Main
+LocalHolidays
+LocalHolidays:CalculateChineseNewYear
+LocalHolidays:CalculateJapaneseAutumnDay
+LocalHolidays:CalculateJapaneseSpringDay
+LocalHolidays:CalculateturkishReligousHolidays
+LocalHolidays:FindWholeYearHolidays_CN
+LocalHolidays:FindWholeYearHolidays_DK
+LocalHolidays:FindWholeYearHolidays_FI
+LocalHolidays:FindWholeYearHolidays_FRANCE
+LocalHolidays:FindWholeYearHolidays_GREEK
+LocalHolidays:FindWholeYearHolidays_ITA
+LocalHolidays:FindWholeYearHolidays_JP
+LocalHolidays:FindWholeYearHolidays_NL
+LocalHolidays:FindWholeYearHolidays_PL
+LocalHolidays:FindWholeYearHolidays_PORT
+LocalHolidays:FindWholeYearHolidays_RU
+LocalHolidays:FindWholeYearHolidays_SPAIN
+LocalHolidays:FindWholeYearHolidays_SWED
+LocalHolidays:FindWholeYearHolidays_TRK
+LocalHolidays:FindWholeYearHolidays_TW
+LocalHolidays:FindWholeYearHolidays_US
+LocalHolidays:Main
+ScriptBindingLibrary
+Template
+ModuleAgenda
+ModuleAgenda:CreateBookMarkCursor
+ModuleAgenda:DeleteButtons
+ModuleAgenda:FinishAgenda
+ModuleAgenda:GetOptionValues
+ModuleAgenda:Initialize
+ModuleAgenda:LoadLanguageAgenda
+ModuleAgenda:ModifyTemplate
+ModuleAgenda:NewTopic
+Correspondence
+Correspondence:Database
+Correspondence:GetFieldName
+Correspondence:InsertDBField
+Correspondence:InsertPlaceholder
+Correspondence:LoadLanguageCorrespondence
+Correspondence:Main
+Correspondence:OK
+Correspondence:Placeholder
+Samples
+Samples:CloseStyleDialog
+Samples:KillTempFile
+Samples:PrepareForEditing
+Samples:RestoreCurrentStyles
+Samples:SaveCurrentStyles
+Samples:SelectStyle
+Samples:ShowStyles
+Autotext
+Autotext:CreateBullet
+Autotext:CreatePlaceholder
+Autotext:CreateUserDatafield
+Autotext:Main
+Tools
+ModuleControls
+ModuleControls:AddFiltersToDialog
+ModuleControls:DisposeControl
+ModuleControls:GetControlGroupModel
+ModuleControls:getControlModel
+ModuleControls:GetControlShape
+ModuleControls:getControlView
+ModuleControls:GetFileName
+ModuleControls:GetFolderName
+ModuleControls:GetOptionGroupValue
+ModuleControls:GetRefValue
+ModuleControls:GetRefValueOfControlGroup
+ModuleControls:LoadDialog
+ModuleControls:SetOVERWRITEToAlways
+ModuleControls:SetOVERWRITEToNever
+ModuleControls:SetOVERWRITEToQuery
+ModuleControls:ShowOverwriteAllDialog
+ModuleControls:StoreDocument
+ModuleControls:SwitchMousePointer
+ModuleControls:WriteOptValueToCell
+Strings
+Strings:AddListtoList
+Strings:ArrayfromMultiArray
+Strings:ArrayOutOfString
+Strings:BubbleSortList
+Strings:CheckDouble
+Strings:ClearArray
+Strings:ClearMultiDimArray
+Strings:CountCharsinString
+Strings:DeleteStr
+Strings:DirectoryNameoutofPath
+Strings:ElimChar
+Strings:FieldinArray
+Strings:FieldinList
+Strings:FileNameoutofPath
+Strings:FindPartString
+Strings:FindSecondValue
+Strings:GetFileNameExtension
+Strings:GetFileNameWithoutExtension
+Strings:GetIndexForPartStringinMultiArray
+Strings:GetIndexInMultiArray
+Strings:GetValueoutofList
+Strings:IndexinArray
+Strings:LTRimChar
+Strings:MultiArrayInListbox
+Strings:PartStringInArray
+Strings:Power
+Strings:ReplaceString
+Strings:Round
+Strings:RTrimStr
+Strings:StringInMultiArray
+Misc
+Misc:AddNewSheetName
+Misc:AttachBasicMacroToEvent
+Misc:CalIsLeapYear
+Misc:ChangeCellValue
+Misc:ChangeValueofRange
+Misc:CheckNewSheetname
+Misc:ConnecttoDatabase
+Misc:CopySheetbyName
+Misc:CreateNewDocument
+Misc:CutPathView
+Misc:DeleteInputCells
+Misc:DispatchSlot
+Misc:DisposeDocument
+Misc:DuplicateRow
+Misc:GetCellByName
+Misc:GetColumnIndex
+Misc:GetDocumentType
+Misc:GetLastUsedRow
+Misc:GetLocale
+Misc:GetNumberFormatType
+Misc:GetOfficeSubPath
+Misc:GetPathSettings
+Misc:GetProductname
+Misc:GetPropertyValueIndex
+Misc:GetRegistryKeyContent
+Misc:GetResText
+Misc:GetRowIndex
+Misc:GetSheetIndex
+Misc:GetStarOfficeLocale
+Misc:GetStringofCellbyName
+Misc:GetValueofCellbyName
+Misc:InitResources
+Misc:IsFatOffice
+Misc:isHighContrast
+Misc:Main
+Misc:ModifyBorderLineWidth
+Misc:ModifyPropertyValue
+Misc:OpenDocument
+Misc:ProtectSheets
+Misc:RegisterNewDataSource
+Misc:ReplaceRangeValues
+Misc:RetrieveFileName
+Misc:ShowNoOfficePathError
+Misc:TaskonDesktop
+Misc:ToggleDesignMode
+Misc:ToggleWindow
+Misc:UnprotectSheets
+UCB
+UCB:AddFileNameToList
+UCB:AddFoldertoList
+UCB:CopyRecursively
+UCB:CreateFolder
+UCB:GetRealFileContent
+UCB:LoadDataFromFile
+UCB:Main
+UCB:ReadDirectories
+UCB:RetrieveDocTitle
+UCB:SaveDataToFile
+UCB:ShowHelperDialog
+Listbox
+Listbox:AddSingleItemToListbox
+Listbox:CopyListboxItems
+Listbox:EmptyListbox
+Listbox:FormMoveAll
+Listbox:FormMoveSelected
+Listbox:FormRemoveAll
+Listbox:FormRemoveSelected
+Listbox:FormSetMoveRights
+Listbox:GetItemPos
+Listbox:GetSelectedListboxItems
+Listbox:InitializeListboxProcedures
+Listbox:MergeList
+Listbox:MoveOrderedSelectedListbox
+Listbox:MoveSelectedListBox
+Listbox:RemoveListboxItemByName
+Listbox:RemoveListItems
+Listbox:RemoveSelected
+Listbox:SelectListboxItem
+Listbox:SetNewSelection
+Listbox:ToggleListboxControls
+Debug
+Debug:ActivateReadOnlyFlag
+Debug:DeactivateReadOnlyFlag
+Debug:FillDocument
+Debug:printdbgInfo
+Debug:ProtectCurrentSheets
+Debug:SetBasicReadOnlyFlag
+Debug:ShowArray
+Debug:ShowAvailableServiceNames
+Debug:ShowCommands
+Debug:ShowElementNames
+Debug:ShowNameValuePair
+Debug:ShowPropertyValues
+Debug:ShowSupportedServiceNames
+Debug:WritedbgInfo
+Debug:WriteDbgString
+WordCount
+WordCount:wordcount.bsh
+pythonSamples
+TableSample
+TableSample:createTable
+Untitled 1
+Standard
diff --git a/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_BasicOrganizer.txt b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_BasicOrganizer.txt
new file mode 100755
index 000000000000..072608199d8b
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_BasicOrganizer.txt
@@ -0,0 +1,660 @@
+My Macros
+Standard
+Module1
+Module1:Main
+Oracle Open Office Macros
+basic
+Module1
+Module1:Main
+Depot
+CommonLang
+CommonLang:LoadLanguage
+CommonLang:CompleteMarketList
+CommonLang:LocalizedCurrencies
+CommonLang:LoadDepotDialogs
+CommonLang:InitializeStartUpModel
+Currency
+Currency:Startup
+Currency:EnableGoOnButton
+Currency:CloseStartUpDialog
+Currency:DisposeDocument
+Currency:ChooseMarket
+Currency:ConvertStylesCurrencies
+Currency:SwitchNumberFormat
+Currency:Numberformat
+Currency:CheckFormatType
+Depot
+Depot:Initialize
+Depot:Buy
+Depot:Sell
+Depot:Reset
+Depot:TransactionOk
+Depot:SelectStockname
+Depot:HandleStocks
+Depot:CancelStockRate
+Depot:CancelTransaction
+Depot:CommitStockRate
+Depot:EnableTransactionControls
+Depot:SetupTransactionControls
+Depot:AddShortCuttoControl
+Depot:OpenStockRatePage
+Depot:SelectStockNameForRates
+Depot:ToggleStockRateControls
+Depot:InitializeStockRatesControls
+Internet
+Internet:CheckHistoryControls
+Internet:InsertCompanyHistory
+Internet:InternetUpdate
+Internet:GetCurrentRate
+Internet:UpdateValue
+Internet:StringToDate
+Internet:UpdateChart
+Internet:CalculateChartafterSplit
+Lang_de
+Lang_de:LoadGermanLanguage
+Lang_en
+Lang_en:LoadEnglishLanguage
+Lang_es
+Lang_es:LoadSpanishLanguage
+Lang_fr
+Lang_fr:LoadFrenchLanguage
+Lang_it
+Lang_it:LoadItalianLanguage
+Lang_ja
+Lang_ja:LoadJapaneseLanguage
+Lang_ko
+Lang_ko:LoadKoreanLanguage
+Lang_sv
+Lang_sv:LoadSwedishLanguage
+Lang_tw
+Lang_tw:LoadChineseTradLanguage
+Lang_zh
+Lang_zh:LoadChineseSimpleLanguage
+tools
+tools:RemoveSheet
+tools:InitializeStatusLine
+tools:MakeRangeVisible
+tools:GetRowIndex
+tools:GetTransactionCount
+tools:GetStocksCount
+tools:FillListbox
+tools:CellValuetoControl
+tools:RemoveStockRows
+tools:AddValueToCellContent
+tools:CheckInputDate
+tools:InsertCurrentValue
+tools:SplitCellValue
+tools:GetStockRowIndex
+tools:GetStockID
+tools:CheckDocLocale
+Euro
+AutoPilotRun
+AutoPilotRun:StartAutoPilot
+AutoPilotRun:ConvertDocuments
+AutoPilotRun:InitializeDocument
+AutoPilotRun:ChangeToNextProgressStep
+AutoPilotRun:StoreDocument
+AutoPilotRun:SwapExtent
+AutoPilotRun:InitializeThirdStep
+AutoPilotRun:ToggleProgressStep
+AutoPilotRun:EnableStep2DialogControls
+AutoPilotRun:InitializeProgressPage
+AutoPilotRun:AssignFileName
+AutoPilotRun:ToggleGoOnButton
+AutoPilotRun:CallFolderPicker
+AutoPilotRun:CallFilePicker
+AutoPilotRun:PreviousStep
+Common
+Common:RetrieveDocumentObjects
+Common:CancelTask
+Common:ConvertDocument
+Common:SwitchNumberFormat
+Common:Numberformat
+Common:CheckFormatType
+Common:StartConversion
+Common:IncreaseStatusValue
+Common:SelectCurrency
+Common:FillUpCurrencyListbox
+Common:InitializeProgressbar
+Common:EndStatusLine
+ConvertRun
+ConvertRun:Main
+ConvertRun:SelectListItem
+ConvertRun:RetrieveEnableValue
+ConvertRun:EnableStep1DialogControls
+ConvertRun:ConvertRangesOrStylesOfDocument
+ConvertRun:ConvertWholeDocument
+ConvertRun:EmptySelection
+ConvertRun:AddSelectedRangeToSelRangesEnum
+ConvertRun:GetPreSelectedRange
+ConvertRun:AddRangeToListbox
+ConvertRun:CheckRangeSelection
+ConvertRun:FieldinList
+ConvertRun:CheckLocale
+ConvertRun:SetOptionValuestoNull
+ConvertRun:SetStatusLineText
+Hard
+Hard:CreateRangeList
+Hard:CreateRangeEnumeration
+Hard:AddSheetRanges
+Hard:SelectRange
+Hard:ConvertThehardWay
+Hard:ConvertCellCurrencies
+Hard:ModifyObjectValuewithCurrFactor
+Hard:CheckIfRangeisCurrency
+Hard:CountColumnsForRow
+Hard:CountRangeCells
+Init
+Init:InitializeResources
+Init:InitializeLanguages
+Init:InitializeCurrencies
+Init:InitializeControls
+Init:InitializeConverter
+Init:InitializeCurrencyValues
+Init:InitializeLocales
+Protect
+Protect:UnprotectSheetsWithPassWord
+Protect:UnprotectSheet
+Protect:UnprotectSheetWithDialog
+Protect:ExecutePasswordDialog
+Protect:ReadPassword
+Protect:RejectPassword
+Protect:ReprotectSheets
+Protect:AddSheettoUnprotectionlist
+Protect:CheckSheetProtection
+Soft
+Soft:CreateStyleEnumeration
+Soft:MakeStyleEnumeration
+Soft:AssignRangestoStyle
+Soft:AssignCellFormatRanges
+Soft:DeselectStyle
+Soft:RetrieveRangeNamefromAddress
+Soft:RetrieveSheetoutofRangeName
+Soft:RetrieveRangeoutofRangeName
+Soft:ConvertTheSoftWay
+Soft:GetAssignedRanges
+Writer
+Writer:ConvertWriterTables
+Writer:ModifyObjectValuewithCurrFactor
+Writer:ConvertTextFields
+FormWizard
+DBMeta
+DBMeta:GetDatabaseNames
+DBMeta:GetSelectedDBMetaData
+DBMeta:GetConnection
+DBMeta:GetDBMetaData
+DBMeta:GetTableMetaData
+DBMeta:GetSpecificFieldNames
+DBMeta:CreateDBForm
+DBMeta:AddOrRemoveBinaryFieldsToWidthList
+DBMeta:CreateCommandTypeList
+DBMeta:GetCurrentMetaValues
+DBMeta:AssignFieldLength
+develop
+develop:PositionControls
+develop:ResetPosSizes
+develop:RepositionColumnarLeftControls
+develop:ResetDBShape
+develop:InitializePosSizes
+develop:InsertTextControl
+develop:InsertDBControl
+develop:InsertTimeStampShape
+develop:GetLabelDiffHeight
+develop:CheckJustifiedPosition
+develop:GetCorrWidth
+develop:AdjustLineWidth
+develop:CheckOuterPoints
+develop:PositionGridControl
+develop:SetupGridColumn
+develop:ControlCaptionstoStandardLayout
+develop:GroupShapesTogether
+FormWizard
+FormWizard:Main
+FormWizard:MainWithDefault
+FormWizard:FormGetFields
+FormWizard:FillUpFieldsListbox
+FormWizard:PreviousStep
+FormWizard:NextStep
+FormWizard:InitializeLayoutSettings
+FormWizard:ToggleDatabasePage
+FormWizard:CommitLastDocumentChanges
+FormWizard:StoreFormInDatabase
+FormWizard:StoreForm
+FormWizard:EmptyFieldsListboxes
+FormWizard:DeleteFirstTableListBoxEntry
+FormWizard:DeleteFirstListboxEntry
+Language
+Language:LoadLanguage
+Language:SetDialogLanguage
+Language:InitializeWidthList
+Layouter
+Layouter:InsertControl
+Layouter:ArrangeControls
+Layouter:OpenFormDocument
+Layouter:InitializeLabelValues
+Layouter:ConfigurePageStyle
+Layouter:ChangeBorderLayouts
+Layouter:ChangeLabelAlignments
+Layouter:ChangeArrangemode
+Layouter:ToggleBorderGroup
+Layouter:ToggleAlignGroup
+Layouter:ToggleLayoutPage
+Layouter:DestroyControlShapes
+Layouter:SwitchArrangementButtons
+Layouter:SwitchBorderMode
+Layouter:SwitchAlignMode
+tools
+tools:SetProgressValue
+tools:GetPreferredWidth
+tools:GetPreferredHeight
+tools:GetPeerSize
+tools:TwipToCM
+tools:TwipTo100telMM
+tools:TwipToPixel
+tools:PixelTo100thMMX
+tools:PixelTo100thMMY
+tools:GetPoint
+tools:GetSize
+tools:ImportStyles
+tools:SetNumerics
+tools:RemoveShapes
+tools:RemoveNirwanaShapes
+tools:ShapesToNirwana
+tools:CalcUniqueContentName
+tools:CountItemsInArray
+tools:GetDBHeight
+tools:GetFormWizardPaths
+tools:GetFilterName
+Gimmicks
+AutoText
+AutoText:Main
+AutoText:InsertStringToCell
+ChangeAllChars
+ChangeAllChars:ChangeAllChars
+ChangeAllChars:ReplaceAllStrings
+ChangeAllChars:ReplaceStrings
+GetTexts
+GetTexts:Main
+GetTexts:GetCalcStrings
+GetTexts:GetCellTexts
+GetTexts:GetAnnotations
+GetTexts:GetNamedRanges
+GetTexts:GetCalcGraphicNames
+GetTexts:GetParagraphTexts
+GetTexts:GetChartStrings
+GetTexts:GetFrameTexts
+GetTexts:GetTextFieldStrings
+GetTexts:GetLinkedFileNames
+GetTexts:GetSectionNames
+GetTexts:GetWriterStrings
+GetTexts:GetDrawPageTitles
+GetTexts:GetPageStrings
+GetTexts:GetDrawStrings
+GetTexts:GetDocumentProps
+GetTexts:GetHyperlinks
+GetTexts:GetGraphicNames
+GetTexts:GetStyles
+GetTexts:GetControlStrings
+GetTexts:GetControlContent
+GetTexts:WriteStringtoLogFile
+GetTexts:MakeLogHeadLine
+ReadDir
+ReadDir:Main
+ReadDir:TreeInfo
+ReadDir:CreateTextShape
+ReadDir:CalculateXPoint
+ReadDir:DrawLine
+ReadDir:GetSourceDirectory
+ReadDir:ReadSourceDirectory
+ReadDir:CloseDialog
+ReadDir:AdjustPageHeight
+ReadDir:SetNewLevels
+ReadDir:CheckPageWidth
+ReadDir:ToggleDialogControls
+Userfields
+Userfields:StartChangesUserfields
+Userfields:FillDialog
+Userfields:ScrollControls
+Userfields:ScrollTextFieldInfo
+Userfields:StopMacro
+Userfields:SaveSettings
+Userfields:ToggleButtons
+Userfields:InitializeUserFamily
+Userfields:AddRecord
+Userfields:FillupTextFields
+Userfields:StepToRecord
+Userfields:SelectCurrentFields
+Userfields:DeleteCurrentSettings
+ImportWizard
+API
+API:OpenRegKey
+API:GetDefaultPath
+API:GetTemplateDefaultPath
+API:QueryValueEx
+API:QueryValue
+DialogModul
+DialogModul:FillStep_Welcome
+DialogModul:FillStep_InputPaths
+DialogModul:FillUpApplicationList
+DialogModul:InitializePathsforCurrentApplication
+DialogModul:AssignPathToCurrentApplication
+DialogModul:SaveStep_InputPath
+DialogModul:ToggleInputPaths
+DialogModul:MakeSummaryString
+DialogModul:FillStep_Summary
+DialogModul:FillStep_Progress
+DialogModul:GetFilterTracingLogPath
+DialogModul:CheckMSImportAvailability
+DialogModul:SetupMSConfiguration
+DialogModul:SetupXMLConfiguration
+DialogModul:CheckControlPath
+DialogModul:CheckInputPaths
+DialogModul:CheckTextBoxPath
+DialogModul:InitializeProgressPage
+DialogModul:SetProgressDisplay
+DialogModul:TakoverFolderName
+DialogModul:FinalizeDialogButtons
+FilesModul
+FilesModul:ReadCollectionPaths
+FilesModul:GetApplicationIndex
+FilesModul:InterruptProcess
+FilesModul:AddCollectionPath
+FilesModul:SetExtension
+FilesModul:AddFilterNameToPathItem
+FilesModul:CheckIfToAddPathToCollection
+FilesModul:CollectPaths
+FilesModul:ConvertAllDocuments
+FilesModul:AddListtoFilesList
+FilesModul:GetTargetTemplatePath
+FilesModul:GetFilterName
+FilesModul:SearchArrayforPartString
+FilesModul:CreateLogTable
+FilesModul:GetSize
+FilesModul:InsertCommandButtonatViewCursor
+FilesModul:CreateLogDocument
+FilesModul:GetFilterTracingLogPath
+FilesModul:InsertTargetUrlToLogDocument
+FilesModul:InsertSourceUrlToLogDocument
+FilesModul:InsertHyperLinkToLogCell
+FilesModul:InsertCommentToLogCell
+FilesModul:AddLogStatistics
+FilesModul:CheckIfMacroExists
+FilesModul:CheckPassWordProtection
+FilesModul:OpenLogDocument
+FilesModul:MergeRange
+FilesModul:ConcatComment
+Language
+Language:LoadLanguage
+Language:GetApplResourceArray
+Main
+Main:Main
+Main:NextStep
+Main:PrevStep
+Main:CancelTask
+Main:TemplateDirSearchDialog
+Main:RepaintHeaderPreview
+Main:CheckModuleInstallation
+Main:CheckInstalledModule
+Main:ToggleCheckboxes
+Main:ToggleCheckboxesWithBoolean
+Main:ToggleNextButton
+Main:TakeOverPathSettings
+Main:GetImportWizardPaths
+Schedule
+BankHoliday
+BankHoliday:Main
+BankHoliday:CalEasterTable
+BankHoliday:CalOrthodoxEasterTable
+BankHoliday:CalInitGlobalVariablesDate
+BankHoliday:CalInsertBankholiday
+BankHoliday:CalMaxDayInMonth
+BankHoliday:CalGetIntOfShortMonthName
+BankHoliday:CalInsertOwnDataInTables
+BankHoliday:GetMonthDate
+BankHoliday:GetNextWeekDay
+BankHoliday:AddFollowUpHolidays
+CalendarMain
+CalendarMain:CalAutopilotTable
+CalendarMain:SetupNumberFormatter
+CalendarMain:AddNumberFormat
+CalendarMain:CalChooseCalendar
+CalendarMain:CalcmdCancel
+CalendarMain:CalcmdOk
+CreateTable
+CreateTable:CalCreateYearTable
+CreateTable:CalCreateMonthTable
+CreateTable:FormatCalCells
+DlgControl
+DlgControl:Main
+DlgControl:CalcmdDeleteSelect
+DlgControl:CalSaveOwnEventControls
+DlgControl:CalMouseMoved
+DlgControl:SelectState
+DlgControl:MouseLeavesImage
+DlgControl:CalClearInputMask
+DlgControl:CalmdSwitchOwnDataOrGeneral
+DlgControl:ToggleInsertButton
+DlgControl:CalUpdateNewEventFrame
+GermanHolidays
+GermanHolidays:Main
+GermanHolidays:CalGetGermanLandAtMousePos
+GermanHolidays:CalFindWholeYearHolidays_GERMANY
+Language
+Language:LoadLanguage
+LocalHolidays
+LocalHolidays:Main
+LocalHolidays:FindWholeYearHolidays_FRANCE
+LocalHolidays:FindWholeYearHolidays_SWED
+LocalHolidays:FindWholeYearHolidays_FI
+LocalHolidays:FindWholeYearHolidays_DK
+LocalHolidays:FindWholeYearHolidays_ITA
+LocalHolidays:FindWholeYearHolidays_TRK
+LocalHolidays:CalculateturkishReligousHolidays
+LocalHolidays:FindWholeYearHolidays_GREEK
+LocalHolidays:FindWholeYearHolidays_SPAIN
+LocalHolidays:FindWholeYearHolidays_PORT
+LocalHolidays:FindWholeYearHolidays_NL
+LocalHolidays:FindWholeYearHolidays_PL
+LocalHolidays:FindWholeYearHolidays_RU
+LocalHolidays:FindWholeYearHolidays_US
+LocalHolidays:FindWholeYearHolidays_JP
+LocalHolidays:FindWholeYearHolidays_TW
+LocalHolidays:FindWholeYearHolidays_CN
+LocalHolidays:CalculateChineseNewYear
+LocalHolidays:CalculateJapaneseSpringDay
+LocalHolidays:CalculateJapaneseAutumnDay
+OwnEvents
+OwnEvents:Main
+OwnEvents:CalSaveOwnData
+OwnEvents:CalLoadOwnData
+OwnEvents:CalCreateDateStrOfInput
+OwnEvents:CalcmdInsertData
+OwnEvents:GetSelectedDateUnits
+OwnEvents:GetDateUnits
+OwnEvents:CalGetNameOfEvent
+OwnEvents:CheckInsertedDates
+OwnEvents:GetOwnMonth
+ScriptBindingLibrary
+Template
+Autotext
+Autotext:Main
+Autotext:CreateUserDatafield
+Autotext:CreateBullet
+Autotext:CreatePlaceholder
+Correspondence
+Correspondence:Main
+Correspondence:Placeholder
+Correspondence:Database
+Correspondence:LoadLanguageCorrespondence
+Correspondence:GetFieldName
+Correspondence:OK
+Correspondence:InsertDBField
+Correspondence:InsertPlaceholder
+ModuleAgenda
+ModuleAgenda:Initialize
+ModuleAgenda:LoadLanguageAgenda
+ModuleAgenda:ModifyTemplate
+ModuleAgenda:NewTopic
+ModuleAgenda:FinishAgenda
+ModuleAgenda:CreateBookMarkCursor
+ModuleAgenda:DeleteButtons
+ModuleAgenda:GetOptionValues
+Samples
+Samples:PrepareForEditing
+Samples:ShowStyles
+Samples:SelectStyle
+Samples:SaveCurrentStyles
+Samples:RestoreCurrentStyles
+Samples:CloseStyleDialog
+Samples:KillTempFile
+Tools
+Debug
+Debug:ActivateReadOnlyFlag
+Debug:DeactivateReadOnlyFlag
+Debug:SetBasicReadOnlyFlag
+Debug:WritedbgInfo
+Debug:WriteDbgString
+Debug:printdbgInfo
+Debug:ShowArray
+Debug:ShowPropertyValues
+Debug:ShowNameValuePair
+Debug:ShowElementNames
+Debug:ShowSupportedServiceNames
+Debug:ShowAvailableServiceNames
+Debug:ShowCommands
+Debug:ProtectCurrentSheets
+Debug:FillDocument
+Listbox
+Listbox:MergeList
+Listbox:RemoveListItems
+Listbox:InitializeListboxProcedures
+Listbox:CopyListboxItems
+Listbox:FormMoveSelected
+Listbox:FormMoveAll
+Listbox:FormRemoveSelected
+Listbox:FormRemoveAll
+Listbox:MoveSelectedListBox
+Listbox:MoveOrderedSelectedListbox
+Listbox:RemoveSelected
+Listbox:SetNewSelection
+Listbox:ToggleListboxControls
+Listbox:FormSetMoveRights
+Listbox:AddSingleItemToListbox
+Listbox:EmptyListbox
+Listbox:SelectListboxItem
+Listbox:GetSelectedListboxItems
+Listbox:RemoveListboxItemByName
+Listbox:GetItemPos
+Misc
+Misc:Main
+Misc:RegisterNewDataSource
+Misc:ConnecttoDatabase
+Misc:GetStarOfficeLocale
+Misc:GetRegistryKeyContent
+Misc:GetProductname
+Misc:OpenDocument
+Misc:TaskonDesktop
+Misc:RetrieveFileName
+Misc:GetPathSettings
+Misc:GetOfficeSubPath
+Misc:ShowNoOfficePathError
+Misc:InitResources
+Misc:GetResText
+Misc:CutPathView
+Misc:DeleteInputCells
+Misc:ChangeValueofRange
+Misc:ReplaceRangeValues
+Misc:GetValueofCellbyName
+Misc:DuplicateRow
+Misc:GetStringofCellbyName
+Misc:GetCellByName
+Misc:ChangeCellValue
+Misc:GetDocumentType
+Misc:GetNumberFormatType
+Misc:ProtectSheets
+Misc:UnprotectSheets
+Misc:GetRowIndex
+Misc:GetColumnIndex
+Misc:CopySheetbyName
+Misc:ToggleWindow
+Misc:CheckNewSheetname
+Misc:AddNewSheetName
+Misc:GetSheetIndex
+Misc:GetLastUsedRow
+Misc:ModifyBorderLineWidth
+Misc:AttachBasicMacroToEvent
+Misc:ModifyPropertyValue
+Misc:GetPropertyValueIndex
+Misc:DispatchSlot
+Misc:IsFatOffice
+Misc:GetLocale
+Misc:ToggleDesignMode
+Misc:isHighContrast
+Misc:CreateNewDocument
+Misc:DisposeDocument
+Misc:CalIsLeapYear
+ModuleControls
+ModuleControls:getControlModel
+ModuleControls:GetControlShape
+ModuleControls:getControlView
+ModuleControls:DisposeControl
+ModuleControls:GetControlGroupModel
+ModuleControls:GetRefValue
+ModuleControls:GetRefValueOfControlGroup
+ModuleControls:GetOptionGroupValue
+ModuleControls:WriteOptValueToCell
+ModuleControls:LoadDialog
+ModuleControls:GetFolderName
+ModuleControls:GetFileName
+ModuleControls:StoreDocument
+ModuleControls:AddFiltersToDialog
+ModuleControls:SwitchMousePointer
+ModuleControls:ShowOverwriteAllDialog
+ModuleControls:SetOVERWRITEToQuery
+ModuleControls:SetOVERWRITEToAlways
+ModuleControls:SetOVERWRITEToNever
+Strings
+Strings:ElimChar
+Strings:DeleteStr
+Strings:FindPartString
+Strings:PartStringInArray
+Strings:RTrimStr
+Strings:LTRimChar
+Strings:ArrayOutOfString
+Strings:ClearArray
+Strings:ClearMultiDimArray
+Strings:FieldinArray
+Strings:FieldinList
+Strings:IndexinArray
+Strings:MultiArrayInListbox
+Strings:StringInMultiArray
+Strings:GetIndexInMultiArray
+Strings:GetIndexForPartStringinMultiArray
+Strings:ArrayfromMultiArray
+Strings:ReplaceString
+Strings:FindSecondValue
+Strings:Power
+Strings:Round
+Strings:FileNameoutofPath
+Strings:GetFileNameExtension
+Strings:GetFileNameWithoutExtension
+Strings:DirectoryNameoutofPath
+Strings:CountCharsinString
+Strings:BubbleSortList
+Strings:GetValueoutofList
+Strings:AddListtoList
+Strings:CheckDouble
+UCB
+UCB:Main
+UCB:ReadDirectories
+UCB:AddFoldertoList
+UCB:AddFileNameToList
+UCB:RetrieveDocTitle
+UCB:GetRealFileContent
+UCB:CopyRecursively
+UCB:ShowHelperDialog
+UCB:SaveDataToFile
+UCB:LoadDataFromFile
+UCB:CreateFolder
+Untitled 1
+Standard
diff --git a/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_BeanShell.txt b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_BeanShell.txt
new file mode 100755
index 000000000000..141bebef85d5
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_BeanShell.txt
@@ -0,0 +1,14 @@
+My Macros
+Oracle Open Office Macros
+Capitalise
+capitalise.bsh
+HelloWorld
+helloworld.bsh
+Highlight
+ButtonPressHandler.bsh
+ShowDialog.bsh
+MemoryUsage
+memusage.bsh
+WordCount
+wordcount.bsh
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_JavaScript.txt b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_JavaScript.txt
new file mode 100755
index 000000000000..09ea2fbc3203
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_JavaScript.txt
@@ -0,0 +1,10 @@
+My Macros
+Oracle Open Office Macros
+ExportSheetsToHTML
+exportsheetstohtml.js
+HelloWorld
+helloworld.js
+Highlight
+ButtonPressHandler.js
+ShowDialog.js
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_Python.txt b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_Python.txt
new file mode 100755
index 000000000000..b15ae4c69f69
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_Python.txt
@@ -0,0 +1,8 @@
+My Macros
+Oracle Open Office Macros
+Capitalise
+HelloWorld
+HelloWorldPython
+pythonSamples
+TableSample
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_RunMacro.txt b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_RunMacro.txt
new file mode 100755
index 000000000000..d0a84dcd41f5
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_osx_RunMacro.txt
@@ -0,0 +1,682 @@
+My Macros
+Standard
+Module1
+Module1:Main
+basic
+Module1
+Module1:Main
+Oracle Open Office Macros
+Capitalise
+Capitalise:capitalise.bsh
+Depot
+Depot
+Depot:AddShortCuttoControl
+Depot:Buy
+Depot:CancelStockRate
+Depot:CancelTransaction
+Depot:CommitStockRate
+Depot:EnableTransactionControls
+Depot:HandleStocks
+Depot:Initialize
+Depot:InitializeStockRatesControls
+Depot:OpenStockRatePage
+Depot:Reset
+Depot:SelectStockname
+Depot:SelectStockNameForRates
+Depot:Sell
+Depot:SetupTransactionControls
+Depot:ToggleStockRateControls
+Depot:TransactionOk
+CommonLang
+CommonLang:CompleteMarketList
+CommonLang:InitializeStartUpModel
+CommonLang:LoadDepotDialogs
+CommonLang:LoadLanguage
+CommonLang:LocalizedCurrencies
+Currency
+Currency:CheckFormatType
+Currency:ChooseMarket
+Currency:CloseStartUpDialog
+Currency:ConvertStylesCurrencies
+Currency:DisposeDocument
+Currency:EnableGoOnButton
+Currency:Numberformat
+Currency:Startup
+Currency:SwitchNumberFormat
+Internet
+Internet:CalculateChartafterSplit
+Internet:CheckHistoryControls
+Internet:GetCurrentRate
+Internet:InsertCompanyHistory
+Internet:InternetUpdate
+Internet:StringToDate
+Internet:UpdateChart
+Internet:UpdateValue
+Lang_de
+Lang_de:LoadGermanLanguage
+tools
+tools:AddValueToCellContent
+tools:CellValuetoControl
+tools:CheckDocLocale
+tools:CheckInputDate
+tools:FillListbox
+tools:GetRowIndex
+tools:GetStockID
+tools:GetStockRowIndex
+tools:GetStocksCount
+tools:GetTransactionCount
+tools:InitializeStatusLine
+tools:InsertCurrentValue
+tools:MakeRangeVisible
+tools:RemoveSheet
+tools:RemoveStockRows
+tools:SplitCellValue
+Lang_en
+Lang_en:LoadEnglishLanguage
+Lang_fr
+Lang_fr:LoadFrenchLanguage
+Lang_it
+Lang_it:LoadItalianLanguage
+Lang_es
+Lang_es:LoadSpanishLanguage
+Lang_sv
+Lang_sv:LoadSwedishLanguage
+Lang_zh
+Lang_zh:LoadChineseSimpleLanguage
+Lang_tw
+Lang_tw:LoadChineseTradLanguage
+Lang_ko
+Lang_ko:LoadKoreanLanguage
+Lang_ja
+Lang_ja:LoadJapaneseLanguage
+Euro
+ConvertRun
+ConvertRun:AddRangeToListbox
+ConvertRun:AddSelectedRangeToSelRangesEnum
+ConvertRun:CheckLocale
+ConvertRun:CheckRangeSelection
+ConvertRun:ConvertRangesOrStylesOfDocument
+ConvertRun:ConvertWholeDocument
+ConvertRun:EmptySelection
+ConvertRun:EnableStep1DialogControls
+ConvertRun:FieldinList
+ConvertRun:GetPreSelectedRange
+ConvertRun:Main
+ConvertRun:RetrieveEnableValue
+ConvertRun:SelectListItem
+ConvertRun:SetOptionValuestoNull
+ConvertRun:SetStatusLineText
+AutoPilotRun
+AutoPilotRun:AssignFileName
+AutoPilotRun:CallFilePicker
+AutoPilotRun:CallFolderPicker
+AutoPilotRun:ChangeToNextProgressStep
+AutoPilotRun:ConvertDocuments
+AutoPilotRun:EnableStep2DialogControls
+AutoPilotRun:InitializeDocument
+AutoPilotRun:InitializeProgressPage
+AutoPilotRun:InitializeThirdStep
+AutoPilotRun:PreviousStep
+AutoPilotRun:StartAutoPilot
+AutoPilotRun:StoreDocument
+AutoPilotRun:SwapExtent
+AutoPilotRun:ToggleGoOnButton
+AutoPilotRun:ToggleProgressStep
+Hard
+Hard:AddSheetRanges
+Hard:CheckIfRangeisCurrency
+Hard:ConvertCellCurrencies
+Hard:ConvertThehardWay
+Hard:CountColumnsForRow
+Hard:CountRangeCells
+Hard:CreateRangeEnumeration
+Hard:CreateRangeList
+Hard:ModifyObjectValuewithCurrFactor
+Hard:SelectRange
+Soft
+Soft:AssignCellFormatRanges
+Soft:AssignRangestoStyle
+Soft:ConvertTheSoftWay
+Soft:CreateStyleEnumeration
+Soft:DeselectStyle
+Soft:GetAssignedRanges
+Soft:MakeStyleEnumeration
+Soft:RetrieveRangeNamefromAddress
+Soft:RetrieveRangeoutofRangeName
+Soft:RetrieveSheetoutofRangeName
+Init
+Init:InitializeControls
+Init:InitializeConverter
+Init:InitializeCurrencies
+Init:InitializeCurrencyValues
+Init:InitializeLanguages
+Init:InitializeLocales
+Init:InitializeResources
+Common
+Common:CancelTask
+Common:CheckFormatType
+Common:ConvertDocument
+Common:EndStatusLine
+Common:FillUpCurrencyListbox
+Common:IncreaseStatusValue
+Common:InitializeProgressbar
+Common:Numberformat
+Common:RetrieveDocumentObjects
+Common:SelectCurrency
+Common:StartConversion
+Common:SwitchNumberFormat
+Writer
+Writer:ConvertTextFields
+Writer:ConvertWriterTables
+Writer:ModifyObjectValuewithCurrFactor
+Protect
+Protect:AddSheettoUnprotectionlist
+Protect:CheckSheetProtection
+Protect:ExecutePasswordDialog
+Protect:ReadPassword
+Protect:RejectPassword
+Protect:ReprotectSheets
+Protect:UnprotectSheet
+Protect:UnprotectSheetsWithPassWord
+Protect:UnprotectSheetWithDialog
+ExportSheetsToHTML
+ExportSheetsToHTML:exportsheetstohtml.js
+FormWizard
+FormWizard
+FormWizard:CommitLastDocumentChanges
+FormWizard:DeleteFirstListboxEntry
+FormWizard:DeleteFirstTableListBoxEntry
+FormWizard:EmptyFieldsListboxes
+FormWizard:FillUpFieldsListbox
+FormWizard:FormGetFields
+FormWizard:InitializeLayoutSettings
+FormWizard:Main
+FormWizard:MainWithDefault
+FormWizard:NextStep
+FormWizard:PreviousStep
+FormWizard:StoreForm
+FormWizard:StoreFormInDatabase
+FormWizard:ToggleDatabasePage
+Layouter
+Layouter:ArrangeControls
+Layouter:ChangeArrangemode
+Layouter:ChangeBorderLayouts
+Layouter:ChangeLabelAlignments
+Layouter:ConfigurePageStyle
+Layouter:DestroyControlShapes
+Layouter:InitializeLabelValues
+Layouter:InsertControl
+Layouter:OpenFormDocument
+Layouter:SwitchAlignMode
+Layouter:SwitchArrangementButtons
+Layouter:SwitchBorderMode
+Layouter:ToggleAlignGroup
+Layouter:ToggleBorderGroup
+Layouter:ToggleLayoutPage
+Language
+Language:InitializeWidthList
+Language:LoadLanguage
+Language:SetDialogLanguage
+DBMeta
+DBMeta:AddOrRemoveBinaryFieldsToWidthList
+DBMeta:AssignFieldLength
+DBMeta:CreateCommandTypeList
+DBMeta:CreateDBForm
+DBMeta:GetConnection
+DBMeta:GetCurrentMetaValues
+DBMeta:GetDatabaseNames
+DBMeta:GetDBMetaData
+DBMeta:GetSelectedDBMetaData
+DBMeta:GetSpecificFieldNames
+DBMeta:GetTableMetaData
+tools
+tools:CalcUniqueContentName
+tools:CountItemsInArray
+tools:GetDBHeight
+tools:GetFilterName
+tools:GetFormWizardPaths
+tools:GetPeerSize
+tools:GetPoint
+tools:GetPreferredHeight
+tools:GetPreferredWidth
+tools:GetSize
+tools:ImportStyles
+tools:PixelTo100thMMX
+tools:PixelTo100thMMY
+tools:RemoveNirwanaShapes
+tools:RemoveShapes
+tools:SetNumerics
+tools:SetProgressValue
+tools:ShapesToNirwana
+tools:TwipTo100telMM
+tools:TwipToCM
+tools:TwipToPixel
+develop
+develop:AdjustLineWidth
+develop:CheckJustifiedPosition
+develop:CheckOuterPoints
+develop:ControlCaptionstoStandardLayout
+develop:GetCorrWidth
+develop:GetLabelDiffHeight
+develop:GroupShapesTogether
+develop:InitializePosSizes
+develop:InsertDBControl
+develop:InsertTextControl
+develop:InsertTimeStampShape
+develop:PositionControls
+develop:PositionGridControl
+develop:RepositionColumnarLeftControls
+develop:ResetDBShape
+develop:ResetPosSizes
+develop:SetupGridColumn
+Gimmicks
+GetTexts
+GetTexts:GetAnnotations
+GetTexts:GetCalcGraphicNames
+GetTexts:GetCalcStrings
+GetTexts:GetCellTexts
+GetTexts:GetChartStrings
+GetTexts:GetControlContent
+GetTexts:GetControlStrings
+GetTexts:GetDocumentProps
+GetTexts:GetDrawPageTitles
+GetTexts:GetDrawStrings
+GetTexts:GetFrameTexts
+GetTexts:GetGraphicNames
+GetTexts:GetHyperlinks
+GetTexts:GetLinkedFileNames
+GetTexts:GetNamedRanges
+GetTexts:GetPageStrings
+GetTexts:GetParagraphTexts
+GetTexts:GetSectionNames
+GetTexts:GetStyles
+GetTexts:GetTextFieldStrings
+GetTexts:GetWriterStrings
+GetTexts:Main
+GetTexts:MakeLogHeadLine
+GetTexts:WriteStringtoLogFile
+Userfields
+Userfields:AddRecord
+Userfields:DeleteCurrentSettings
+Userfields:FillDialog
+Userfields:FillupTextFields
+Userfields:InitializeUserFamily
+Userfields:SaveSettings
+Userfields:ScrollControls
+Userfields:ScrollTextFieldInfo
+Userfields:SelectCurrentFields
+Userfields:StartChangesUserfields
+Userfields:StepToRecord
+Userfields:StopMacro
+Userfields:ToggleButtons
+ChangeAllChars
+ChangeAllChars:ChangeAllChars
+ChangeAllChars:ReplaceAllStrings
+ChangeAllChars:ReplaceStrings
+AutoText
+AutoText:InsertStringToCell
+AutoText:Main
+ReadDir
+ReadDir:AdjustPageHeight
+ReadDir:CalculateXPoint
+ReadDir:CheckPageWidth
+ReadDir:CloseDialog
+ReadDir:CreateTextShape
+ReadDir:DrawLine
+ReadDir:GetSourceDirectory
+ReadDir:Main
+ReadDir:ReadSourceDirectory
+ReadDir:SetNewLevels
+ReadDir:ToggleDialogControls
+ReadDir:TreeInfo
+HelloWorld
+HelloWorld:helloworld.bsh
+HelloWorld:helloworld.js
+HelloWorld:HelloWorld.printHW
+HelloWorld:HelloWorldPython
+Highlight
+Highlight:ButtonPressHandler.bsh
+Highlight:ButtonPressHandler.js
+Highlight:HighlightText.showForm
+Highlight:ShowDialog.bsh
+Highlight:ShowDialog.js
+ImportWizard
+Main
+Main:CancelTask
+Main:CheckInstalledModule
+Main:CheckModuleInstallation
+Main:GetImportWizardPaths
+Main:Main
+Main:NextStep
+Main:PrevStep
+Main:RepaintHeaderPreview
+Main:TakeOverPathSettings
+Main:TemplateDirSearchDialog
+Main:ToggleCheckboxes
+Main:ToggleCheckboxesWithBoolean
+Main:ToggleNextButton
+DialogModul
+DialogModul:AssignPathToCurrentApplication
+DialogModul:CheckControlPath
+DialogModul:CheckInputPaths
+DialogModul:CheckMSImportAvailability
+DialogModul:CheckTextBoxPath
+DialogModul:FillStep_InputPaths
+DialogModul:FillStep_Progress
+DialogModul:FillStep_Summary
+DialogModul:FillStep_Welcome
+DialogModul:FillUpApplicationList
+DialogModul:FinalizeDialogButtons
+DialogModul:GetFilterTracingLogPath
+DialogModul:InitializePathsforCurrentApplication
+DialogModul:InitializeProgressPage
+DialogModul:MakeSummaryString
+DialogModul:SaveStep_InputPath
+DialogModul:SetProgressDisplay
+DialogModul:SetupMSConfiguration
+DialogModul:SetupXMLConfiguration
+DialogModul:TakoverFolderName
+DialogModul:ToggleInputPaths
+Language
+Language:GetApplResourceArray
+Language:LoadLanguage
+FilesModul
+FilesModul:AddCollectionPath
+FilesModul:AddFilterNameToPathItem
+FilesModul:AddListtoFilesList
+FilesModul:AddLogStatistics
+FilesModul:CheckIfMacroExists
+FilesModul:CheckIfToAddPathToCollection
+FilesModul:CheckPassWordProtection
+FilesModul:CollectPaths
+FilesModul:ConcatComment
+FilesModul:ConvertAllDocuments
+FilesModul:CreateLogDocument
+FilesModul:CreateLogTable
+FilesModul:GetApplicationIndex
+FilesModul:GetFilterName
+FilesModul:GetFilterTracingLogPath
+FilesModul:GetSize
+FilesModul:GetTargetTemplatePath
+FilesModul:InsertCommandButtonatViewCursor
+FilesModul:InsertCommentToLogCell
+FilesModul:InsertHyperLinkToLogCell
+FilesModul:InsertSourceUrlToLogDocument
+FilesModul:InsertTargetUrlToLogDocument
+FilesModul:InterruptProcess
+FilesModul:MergeRange
+FilesModul:OpenLogDocument
+FilesModul:ReadCollectionPaths
+FilesModul:SearchArrayforPartString
+FilesModul:SetExtension
+API
+API:GetDefaultPath
+API:GetTemplateDefaultPath
+API:OpenRegKey
+API:QueryValue
+API:QueryValueEx
+MemoryUsage
+MemoryUsage:MemoryUsage.updateMemoryUsage
+MemoryUsage:memusage.bsh
+Schedule
+OwnEvents
+OwnEvents:CalcmdInsertData
+OwnEvents:CalCreateDateStrOfInput
+OwnEvents:CalGetNameOfEvent
+OwnEvents:CalLoadOwnData
+OwnEvents:CalSaveOwnData
+OwnEvents:CheckInsertedDates
+OwnEvents:GetDateUnits
+OwnEvents:GetOwnMonth
+OwnEvents:GetSelectedDateUnits
+OwnEvents:Main
+CalendarMain
+CalendarMain:AddNumberFormat
+CalendarMain:CalAutopilotTable
+CalendarMain:CalChooseCalendar
+CalendarMain:CalcmdCancel
+CalendarMain:CalcmdOk
+CalendarMain:SetupNumberFormatter
+BankHoliday
+BankHoliday:AddFollowUpHolidays
+BankHoliday:CalEasterTable
+BankHoliday:CalGetIntOfShortMonthName
+BankHoliday:CalInitGlobalVariablesDate
+BankHoliday:CalInsertBankholiday
+BankHoliday:CalInsertOwnDataInTables
+BankHoliday:CalMaxDayInMonth
+BankHoliday:CalOrthodoxEasterTable
+BankHoliday:GetMonthDate
+BankHoliday:GetNextWeekDay
+BankHoliday:Main
+DlgControl
+DlgControl:CalClearInputMask
+DlgControl:CalcmdDeleteSelect
+DlgControl:CalmdSwitchOwnDataOrGeneral
+DlgControl:CalMouseMoved
+DlgControl:CalSaveOwnEventControls
+DlgControl:CalUpdateNewEventFrame
+DlgControl:Main
+DlgControl:MouseLeavesImage
+DlgControl:SelectState
+DlgControl:ToggleInsertButton
+Language
+Language:LoadLanguage
+CreateTable
+CreateTable:CalCreateMonthTable
+CreateTable:CalCreateYearTable
+CreateTable:FormatCalCells
+GermanHolidays
+GermanHolidays:CalFindWholeYearHolidays_GERMANY
+GermanHolidays:CalGetGermanLandAtMousePos
+GermanHolidays:Main
+LocalHolidays
+LocalHolidays:CalculateChineseNewYear
+LocalHolidays:CalculateJapaneseAutumnDay
+LocalHolidays:CalculateJapaneseSpringDay
+LocalHolidays:CalculateturkishReligousHolidays
+LocalHolidays:FindWholeYearHolidays_CN
+LocalHolidays:FindWholeYearHolidays_DK
+LocalHolidays:FindWholeYearHolidays_FI
+LocalHolidays:FindWholeYearHolidays_FRANCE
+LocalHolidays:FindWholeYearHolidays_GREEK
+LocalHolidays:FindWholeYearHolidays_ITA
+LocalHolidays:FindWholeYearHolidays_JP
+LocalHolidays:FindWholeYearHolidays_NL
+LocalHolidays:FindWholeYearHolidays_PL
+LocalHolidays:FindWholeYearHolidays_PORT
+LocalHolidays:FindWholeYearHolidays_RU
+LocalHolidays:FindWholeYearHolidays_SPAIN
+LocalHolidays:FindWholeYearHolidays_SWED
+LocalHolidays:FindWholeYearHolidays_TRK
+LocalHolidays:FindWholeYearHolidays_TW
+LocalHolidays:FindWholeYearHolidays_US
+LocalHolidays:Main
+ScriptBindingLibrary
+Template
+ModuleAgenda
+ModuleAgenda:CreateBookMarkCursor
+ModuleAgenda:DeleteButtons
+ModuleAgenda:FinishAgenda
+ModuleAgenda:GetOptionValues
+ModuleAgenda:Initialize
+ModuleAgenda:LoadLanguageAgenda
+ModuleAgenda:ModifyTemplate
+ModuleAgenda:NewTopic
+Correspondence
+Correspondence:Database
+Correspondence:GetFieldName
+Correspondence:InsertDBField
+Correspondence:InsertPlaceholder
+Correspondence:LoadLanguageCorrespondence
+Correspondence:Main
+Correspondence:OK
+Correspondence:Placeholder
+Samples
+Samples:CloseStyleDialog
+Samples:KillTempFile
+Samples:PrepareForEditing
+Samples:RestoreCurrentStyles
+Samples:SaveCurrentStyles
+Samples:SelectStyle
+Samples:ShowStyles
+Autotext
+Autotext:CreateBullet
+Autotext:CreatePlaceholder
+Autotext:CreateUserDatafield
+Autotext:Main
+Tools
+ModuleControls
+ModuleControls:AddFiltersToDialog
+ModuleControls:DisposeControl
+ModuleControls:GetControlGroupModel
+ModuleControls:getControlModel
+ModuleControls:GetControlShape
+ModuleControls:getControlView
+ModuleControls:GetFileName
+ModuleControls:GetFolderName
+ModuleControls:GetOptionGroupValue
+ModuleControls:GetRefValue
+ModuleControls:GetRefValueOfControlGroup
+ModuleControls:LoadDialog
+ModuleControls:SetOVERWRITEToAlways
+ModuleControls:SetOVERWRITEToNever
+ModuleControls:SetOVERWRITEToQuery
+ModuleControls:ShowOverwriteAllDialog
+ModuleControls:StoreDocument
+ModuleControls:SwitchMousePointer
+ModuleControls:WriteOptValueToCell
+Strings
+Strings:AddListtoList
+Strings:ArrayfromMultiArray
+Strings:ArrayOutOfString
+Strings:BubbleSortList
+Strings:CheckDouble
+Strings:ClearArray
+Strings:ClearMultiDimArray
+Strings:CountCharsinString
+Strings:DeleteStr
+Strings:DirectoryNameoutofPath
+Strings:ElimChar
+Strings:FieldinArray
+Strings:FieldinList
+Strings:FileNameoutofPath
+Strings:FindPartString
+Strings:FindSecondValue
+Strings:GetFileNameExtension
+Strings:GetFileNameWithoutExtension
+Strings:GetIndexForPartStringinMultiArray
+Strings:GetIndexInMultiArray
+Strings:GetValueoutofList
+Strings:IndexinArray
+Strings:LTRimChar
+Strings:MultiArrayInListbox
+Strings:PartStringInArray
+Strings:Power
+Strings:ReplaceString
+Strings:Round
+Strings:RTrimStr
+Strings:StringInMultiArray
+Misc
+Misc:AddNewSheetName
+Misc:AttachBasicMacroToEvent
+Misc:CalIsLeapYear
+Misc:ChangeCellValue
+Misc:ChangeValueofRange
+Misc:CheckNewSheetname
+Misc:ConnecttoDatabase
+Misc:CopySheetbyName
+Misc:CreateNewDocument
+Misc:CutPathView
+Misc:DeleteInputCells
+Misc:DispatchSlot
+Misc:DisposeDocument
+Misc:DuplicateRow
+Misc:GetCellByName
+Misc:GetColumnIndex
+Misc:GetDocumentType
+Misc:GetLastUsedRow
+Misc:GetLocale
+Misc:GetNumberFormatType
+Misc:GetOfficeSubPath
+Misc:GetPathSettings
+Misc:GetProductname
+Misc:GetPropertyValueIndex
+Misc:GetRegistryKeyContent
+Misc:GetResText
+Misc:GetRowIndex
+Misc:GetSheetIndex
+Misc:GetStarOfficeLocale
+Misc:GetStringofCellbyName
+Misc:GetValueofCellbyName
+Misc:InitResources
+Misc:IsFatOffice
+Misc:isHighContrast
+Misc:Main
+Misc:ModifyBorderLineWidth
+Misc:ModifyPropertyValue
+Misc:OpenDocument
+Misc:ProtectSheets
+Misc:RegisterNewDataSource
+Misc:ReplaceRangeValues
+Misc:RetrieveFileName
+Misc:ShowNoOfficePathError
+Misc:TaskonDesktop
+Misc:ToggleDesignMode
+Misc:ToggleWindow
+Misc:UnprotectSheets
+UCB
+UCB:AddFileNameToList
+UCB:AddFoldertoList
+UCB:CopyRecursively
+UCB:CreateFolder
+UCB:GetRealFileContent
+UCB:LoadDataFromFile
+UCB:Main
+UCB:ReadDirectories
+UCB:RetrieveDocTitle
+UCB:SaveDataToFile
+UCB:ShowHelperDialog
+Listbox
+Listbox:AddSingleItemToListbox
+Listbox:CopyListboxItems
+Listbox:EmptyListbox
+Listbox:FormMoveAll
+Listbox:FormMoveSelected
+Listbox:FormRemoveAll
+Listbox:FormRemoveSelected
+Listbox:FormSetMoveRights
+Listbox:GetItemPos
+Listbox:GetSelectedListboxItems
+Listbox:InitializeListboxProcedures
+Listbox:MergeList
+Listbox:MoveOrderedSelectedListbox
+Listbox:MoveSelectedListBox
+Listbox:RemoveListboxItemByName
+Listbox:RemoveListItems
+Listbox:RemoveSelected
+Listbox:SelectListboxItem
+Listbox:SetNewSelection
+Listbox:ToggleListboxControls
+Debug
+Debug:ActivateReadOnlyFlag
+Debug:DeactivateReadOnlyFlag
+Debug:FillDocument
+Debug:printdbgInfo
+Debug:ProtectCurrentSheets
+Debug:SetBasicReadOnlyFlag
+Debug:ShowArray
+Debug:ShowAvailableServiceNames
+Debug:ShowCommands
+Debug:ShowElementNames
+Debug:ShowNameValuePair
+Debug:ShowPropertyValues
+Debug:ShowSupportedServiceNames
+Debug:WritedbgInfo
+Debug:WriteDbgString
+WordCount
+WordCount:wordcount.bsh
+pythonSamples
+TableSample
+Untitled 1
+Standard
diff --git a/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_BasicOrganizer.txt b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_BasicOrganizer.txt
new file mode 100755
index 000000000000..87d91eff5ab5
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_BasicOrganizer.txt
@@ -0,0 +1,657 @@
+My Macros
+Standard
+Module1
+Module1:Main
+Oracle Open Office Macros
+Depot
+CommonLang
+CommonLang:LoadLanguage
+CommonLang:CompleteMarketList
+CommonLang:LocalizedCurrencies
+CommonLang:LoadDepotDialogs
+CommonLang:InitializeStartUpModel
+Currency
+Currency:Startup
+Currency:EnableGoOnButton
+Currency:CloseStartUpDialog
+Currency:DisposeDocument
+Currency:ChooseMarket
+Currency:ConvertStylesCurrencies
+Currency:SwitchNumberFormat
+Currency:Numberformat
+Currency:CheckFormatType
+Depot
+Depot:Initialize
+Depot:Buy
+Depot:Sell
+Depot:Reset
+Depot:TransactionOk
+Depot:SelectStockname
+Depot:HandleStocks
+Depot:CancelStockRate
+Depot:CancelTransaction
+Depot:CommitStockRate
+Depot:EnableTransactionControls
+Depot:SetupTransactionControls
+Depot:AddShortCuttoControl
+Depot:OpenStockRatePage
+Depot:SelectStockNameForRates
+Depot:ToggleStockRateControls
+Depot:InitializeStockRatesControls
+Internet
+Internet:CheckHistoryControls
+Internet:InsertCompanyHistory
+Internet:InternetUpdate
+Internet:GetCurrentRate
+Internet:UpdateValue
+Internet:StringToDate
+Internet:UpdateChart
+Internet:CalculateChartafterSplit
+Lang_de
+Lang_de:LoadGermanLanguage
+Lang_en
+Lang_en:LoadEnglishLanguage
+Lang_es
+Lang_es:LoadSpanishLanguage
+Lang_fr
+Lang_fr:LoadFrenchLanguage
+Lang_it
+Lang_it:LoadItalianLanguage
+Lang_ja
+Lang_ja:LoadJapaneseLanguage
+Lang_ko
+Lang_ko:LoadKoreanLanguage
+Lang_sv
+Lang_sv:LoadSwedishLanguage
+Lang_tw
+Lang_tw:LoadChineseTradLanguage
+Lang_zh
+Lang_zh:LoadChineseSimpleLanguage
+tools
+tools:RemoveSheet
+tools:InitializeStatusLine
+tools:MakeRangeVisible
+tools:GetRowIndex
+tools:GetTransactionCount
+tools:GetStocksCount
+tools:FillListbox
+tools:CellValuetoControl
+tools:RemoveStockRows
+tools:AddValueToCellContent
+tools:CheckInputDate
+tools:InsertCurrentValue
+tools:SplitCellValue
+tools:GetStockRowIndex
+tools:GetStockID
+tools:CheckDocLocale
+Euro
+AutoPilotRun
+AutoPilotRun:StartAutoPilot
+AutoPilotRun:ConvertDocuments
+AutoPilotRun:InitializeDocument
+AutoPilotRun:ChangeToNextProgressStep
+AutoPilotRun:StoreDocument
+AutoPilotRun:SwapExtent
+AutoPilotRun:InitializeThirdStep
+AutoPilotRun:ToggleProgressStep
+AutoPilotRun:EnableStep2DialogControls
+AutoPilotRun:InitializeProgressPage
+AutoPilotRun:AssignFileName
+AutoPilotRun:ToggleGoOnButton
+AutoPilotRun:CallFolderPicker
+AutoPilotRun:CallFilePicker
+AutoPilotRun:PreviousStep
+Common
+Common:RetrieveDocumentObjects
+Common:CancelTask
+Common:ConvertDocument
+Common:SwitchNumberFormat
+Common:Numberformat
+Common:CheckFormatType
+Common:StartConversion
+Common:IncreaseStatusValue
+Common:SelectCurrency
+Common:FillUpCurrencyListbox
+Common:InitializeProgressbar
+Common:EndStatusLine
+ConvertRun
+ConvertRun:Main
+ConvertRun:SelectListItem
+ConvertRun:RetrieveEnableValue
+ConvertRun:EnableStep1DialogControls
+ConvertRun:ConvertRangesOrStylesOfDocument
+ConvertRun:ConvertWholeDocument
+ConvertRun:EmptySelection
+ConvertRun:AddSelectedRangeToSelRangesEnum
+ConvertRun:GetPreSelectedRange
+ConvertRun:AddRangeToListbox
+ConvertRun:CheckRangeSelection
+ConvertRun:FieldinList
+ConvertRun:CheckLocale
+ConvertRun:SetOptionValuestoNull
+ConvertRun:SetStatusLineText
+Hard
+Hard:CreateRangeList
+Hard:CreateRangeEnumeration
+Hard:AddSheetRanges
+Hard:SelectRange
+Hard:ConvertThehardWay
+Hard:ConvertCellCurrencies
+Hard:ModifyObjectValuewithCurrFactor
+Hard:CheckIfRangeisCurrency
+Hard:CountColumnsForRow
+Hard:CountRangeCells
+Init
+Init:InitializeResources
+Init:InitializeLanguages
+Init:InitializeCurrencies
+Init:InitializeControls
+Init:InitializeConverter
+Init:InitializeCurrencyValues
+Init:InitializeLocales
+Protect
+Protect:UnprotectSheetsWithPassWord
+Protect:UnprotectSheet
+Protect:UnprotectSheetWithDialog
+Protect:ExecutePasswordDialog
+Protect:ReadPassword
+Protect:RejectPassword
+Protect:ReprotectSheets
+Protect:AddSheettoUnprotectionlist
+Protect:CheckSheetProtection
+Soft
+Soft:CreateStyleEnumeration
+Soft:MakeStyleEnumeration
+Soft:AssignRangestoStyle
+Soft:AssignCellFormatRanges
+Soft:DeselectStyle
+Soft:RetrieveRangeNamefromAddress
+Soft:RetrieveSheetoutofRangeName
+Soft:RetrieveRangeoutofRangeName
+Soft:ConvertTheSoftWay
+Soft:GetAssignedRanges
+Writer
+Writer:ConvertWriterTables
+Writer:ModifyObjectValuewithCurrFactor
+Writer:ConvertTextFields
+FormWizard
+DBMeta
+DBMeta:GetDatabaseNames
+DBMeta:GetSelectedDBMetaData
+DBMeta:GetConnection
+DBMeta:GetDBMetaData
+DBMeta:GetTableMetaData
+DBMeta:GetSpecificFieldNames
+DBMeta:CreateDBForm
+DBMeta:AddOrRemoveBinaryFieldsToWidthList
+DBMeta:CreateCommandTypeList
+DBMeta:GetCurrentMetaValues
+DBMeta:AssignFieldLength
+develop
+develop:PositionControls
+develop:ResetPosSizes
+develop:RepositionColumnarLeftControls
+develop:ResetDBShape
+develop:InitializePosSizes
+develop:InsertTextControl
+develop:InsertDBControl
+develop:InsertTimeStampShape
+develop:GetLabelDiffHeight
+develop:CheckJustifiedPosition
+develop:GetCorrWidth
+develop:AdjustLineWidth
+develop:CheckOuterPoints
+develop:PositionGridControl
+develop:SetupGridColumn
+develop:ControlCaptionstoStandardLayout
+develop:GroupShapesTogether
+FormWizard
+FormWizard:Main
+FormWizard:MainWithDefault
+FormWizard:FormGetFields
+FormWizard:FillUpFieldsListbox
+FormWizard:PreviousStep
+FormWizard:NextStep
+FormWizard:InitializeLayoutSettings
+FormWizard:ToggleDatabasePage
+FormWizard:CommitLastDocumentChanges
+FormWizard:StoreFormInDatabase
+FormWizard:StoreForm
+FormWizard:EmptyFieldsListboxes
+FormWizard:DeleteFirstTableListBoxEntry
+FormWizard:DeleteFirstListboxEntry
+Language
+Language:LoadLanguage
+Language:SetDialogLanguage
+Language:InitializeWidthList
+Layouter
+Layouter:InsertControl
+Layouter:ArrangeControls
+Layouter:OpenFormDocument
+Layouter:InitializeLabelValues
+Layouter:ConfigurePageStyle
+Layouter:ChangeBorderLayouts
+Layouter:ChangeLabelAlignments
+Layouter:ChangeArrangemode
+Layouter:ToggleBorderGroup
+Layouter:ToggleAlignGroup
+Layouter:ToggleLayoutPage
+Layouter:DestroyControlShapes
+Layouter:SwitchArrangementButtons
+Layouter:SwitchBorderMode
+Layouter:SwitchAlignMode
+tools
+tools:SetProgressValue
+tools:GetPreferredWidth
+tools:GetPreferredHeight
+tools:GetPeerSize
+tools:TwipToCM
+tools:TwipTo100telMM
+tools:TwipToPixel
+tools:PixelTo100thMMX
+tools:PixelTo100thMMY
+tools:GetPoint
+tools:GetSize
+tools:ImportStyles
+tools:SetNumerics
+tools:RemoveShapes
+tools:RemoveNirwanaShapes
+tools:ShapesToNirwana
+tools:CalcUniqueContentName
+tools:CountItemsInArray
+tools:GetDBHeight
+tools:GetFormWizardPaths
+tools:GetFilterName
+Gimmicks
+AutoText
+AutoText:Main
+AutoText:InsertStringToCell
+ChangeAllChars
+ChangeAllChars:ChangeAllChars
+ChangeAllChars:ReplaceAllStrings
+ChangeAllChars:ReplaceStrings
+GetTexts
+GetTexts:Main
+GetTexts:GetCalcStrings
+GetTexts:GetCellTexts
+GetTexts:GetAnnotations
+GetTexts:GetNamedRanges
+GetTexts:GetCalcGraphicNames
+GetTexts:GetParagraphTexts
+GetTexts:GetChartStrings
+GetTexts:GetFrameTexts
+GetTexts:GetTextFieldStrings
+GetTexts:GetLinkedFileNames
+GetTexts:GetSectionNames
+GetTexts:GetWriterStrings
+GetTexts:GetDrawPageTitles
+GetTexts:GetPageStrings
+GetTexts:GetDrawStrings
+GetTexts:GetDocumentProps
+GetTexts:GetHyperlinks
+GetTexts:GetGraphicNames
+GetTexts:GetStyles
+GetTexts:GetControlStrings
+GetTexts:GetControlContent
+GetTexts:WriteStringtoLogFile
+GetTexts:MakeLogHeadLine
+ReadDir
+ReadDir:Main
+ReadDir:TreeInfo
+ReadDir:CreateTextShape
+ReadDir:CalculateXPoint
+ReadDir:DrawLine
+ReadDir:GetSourceDirectory
+ReadDir:ReadSourceDirectory
+ReadDir:CloseDialog
+ReadDir:AdjustPageHeight
+ReadDir:SetNewLevels
+ReadDir:CheckPageWidth
+ReadDir:ToggleDialogControls
+Userfields
+Userfields:StartChangesUserfields
+Userfields:FillDialog
+Userfields:ScrollControls
+Userfields:ScrollTextFieldInfo
+Userfields:StopMacro
+Userfields:SaveSettings
+Userfields:ToggleButtons
+Userfields:InitializeUserFamily
+Userfields:AddRecord
+Userfields:FillupTextFields
+Userfields:StepToRecord
+Userfields:SelectCurrentFields
+Userfields:DeleteCurrentSettings
+ImportWizard
+API
+API:OpenRegKey
+API:GetDefaultPath
+API:GetTemplateDefaultPath
+API:QueryValueEx
+API:QueryValue
+DialogModul
+DialogModul:FillStep_Welcome
+DialogModul:FillStep_InputPaths
+DialogModul:FillUpApplicationList
+DialogModul:InitializePathsforCurrentApplication
+DialogModul:AssignPathToCurrentApplication
+DialogModul:SaveStep_InputPath
+DialogModul:ToggleInputPaths
+DialogModul:MakeSummaryString
+DialogModul:FillStep_Summary
+DialogModul:FillStep_Progress
+DialogModul:GetFilterTracingLogPath
+DialogModul:CheckMSImportAvailability
+DialogModul:SetupMSConfiguration
+DialogModul:SetupXMLConfiguration
+DialogModul:CheckControlPath
+DialogModul:CheckInputPaths
+DialogModul:CheckTextBoxPath
+DialogModul:InitializeProgressPage
+DialogModul:SetProgressDisplay
+DialogModul:TakoverFolderName
+DialogModul:FinalizeDialogButtons
+FilesModul
+FilesModul:ReadCollectionPaths
+FilesModul:GetApplicationIndex
+FilesModul:InterruptProcess
+FilesModul:AddCollectionPath
+FilesModul:SetExtension
+FilesModul:AddFilterNameToPathItem
+FilesModul:CheckIfToAddPathToCollection
+FilesModul:CollectPaths
+FilesModul:ConvertAllDocuments
+FilesModul:AddListtoFilesList
+FilesModul:GetTargetTemplatePath
+FilesModul:GetFilterName
+FilesModul:SearchArrayforPartString
+FilesModul:CreateLogTable
+FilesModul:GetSize
+FilesModul:InsertCommandButtonatViewCursor
+FilesModul:CreateLogDocument
+FilesModul:GetFilterTracingLogPath
+FilesModul:InsertTargetUrlToLogDocument
+FilesModul:InsertSourceUrlToLogDocument
+FilesModul:InsertHyperLinkToLogCell
+FilesModul:InsertCommentToLogCell
+FilesModul:AddLogStatistics
+FilesModul:CheckIfMacroExists
+FilesModul:CheckPassWordProtection
+FilesModul:OpenLogDocument
+FilesModul:MergeRange
+FilesModul:ConcatComment
+Language
+Language:LoadLanguage
+Language:GetApplResourceArray
+Main
+Main:Main
+Main:NextStep
+Main:PrevStep
+Main:CancelTask
+Main:TemplateDirSearchDialog
+Main:RepaintHeaderPreview
+Main:CheckModuleInstallation
+Main:CheckInstalledModule
+Main:ToggleCheckboxes
+Main:ToggleCheckboxesWithBoolean
+Main:ToggleNextButton
+Main:TakeOverPathSettings
+Main:GetImportWizardPaths
+Schedule
+BankHoliday
+BankHoliday:Main
+BankHoliday:CalEasterTable
+BankHoliday:CalOrthodoxEasterTable
+BankHoliday:CalInitGlobalVariablesDate
+BankHoliday:CalInsertBankholiday
+BankHoliday:CalMaxDayInMonth
+BankHoliday:CalGetIntOfShortMonthName
+BankHoliday:CalInsertOwnDataInTables
+BankHoliday:GetMonthDate
+BankHoliday:GetNextWeekDay
+BankHoliday:AddFollowUpHolidays
+CalendarMain
+CalendarMain:CalAutopilotTable
+CalendarMain:SetupNumberFormatter
+CalendarMain:AddNumberFormat
+CalendarMain:CalChooseCalendar
+CalendarMain:CalcmdCancel
+CalendarMain:CalcmdOk
+CreateTable
+CreateTable:CalCreateYearTable
+CreateTable:CalCreateMonthTable
+CreateTable:FormatCalCells
+DlgControl
+DlgControl:Main
+DlgControl:CalcmdDeleteSelect
+DlgControl:CalSaveOwnEventControls
+DlgControl:CalMouseMoved
+DlgControl:SelectState
+DlgControl:MouseLeavesImage
+DlgControl:CalClearInputMask
+DlgControl:CalmdSwitchOwnDataOrGeneral
+DlgControl:ToggleInsertButton
+DlgControl:CalUpdateNewEventFrame
+GermanHolidays
+GermanHolidays:Main
+GermanHolidays:CalGetGermanLandAtMousePos
+GermanHolidays:CalFindWholeYearHolidays_GERMANY
+Language
+Language:LoadLanguage
+LocalHolidays
+LocalHolidays:Main
+LocalHolidays:FindWholeYearHolidays_FRANCE
+LocalHolidays:FindWholeYearHolidays_SWED
+LocalHolidays:FindWholeYearHolidays_FI
+LocalHolidays:FindWholeYearHolidays_DK
+LocalHolidays:FindWholeYearHolidays_ITA
+LocalHolidays:FindWholeYearHolidays_TRK
+LocalHolidays:CalculateturkishReligousHolidays
+LocalHolidays:FindWholeYearHolidays_GREEK
+LocalHolidays:FindWholeYearHolidays_SPAIN
+LocalHolidays:FindWholeYearHolidays_PORT
+LocalHolidays:FindWholeYearHolidays_NL
+LocalHolidays:FindWholeYearHolidays_PL
+LocalHolidays:FindWholeYearHolidays_RU
+LocalHolidays:FindWholeYearHolidays_US
+LocalHolidays:FindWholeYearHolidays_JP
+LocalHolidays:FindWholeYearHolidays_TW
+LocalHolidays:FindWholeYearHolidays_CN
+LocalHolidays:CalculateChineseNewYear
+LocalHolidays:CalculateJapaneseSpringDay
+LocalHolidays:CalculateJapaneseAutumnDay
+OwnEvents
+OwnEvents:Main
+OwnEvents:CalSaveOwnData
+OwnEvents:CalLoadOwnData
+OwnEvents:CalCreateDateStrOfInput
+OwnEvents:CalcmdInsertData
+OwnEvents:GetSelectedDateUnits
+OwnEvents:GetDateUnits
+OwnEvents:CalGetNameOfEvent
+OwnEvents:CheckInsertedDates
+OwnEvents:GetOwnMonth
+ScriptBindingLibrary
+Template
+Autotext
+Autotext:Main
+Autotext:CreateUserDatafield
+Autotext:CreateBullet
+Autotext:CreatePlaceholder
+Correspondence
+Correspondence:Main
+Correspondence:Placeholder
+Correspondence:Database
+Correspondence:LoadLanguageCorrespondence
+Correspondence:GetFieldName
+Correspondence:OK
+Correspondence:InsertDBField
+Correspondence:InsertPlaceholder
+ModuleAgenda
+ModuleAgenda:Initialize
+ModuleAgenda:LoadLanguageAgenda
+ModuleAgenda:ModifyTemplate
+ModuleAgenda:NewTopic
+ModuleAgenda:FinishAgenda
+ModuleAgenda:CreateBookMarkCursor
+ModuleAgenda:DeleteButtons
+ModuleAgenda:GetOptionValues
+Samples
+Samples:PrepareForEditing
+Samples:ShowStyles
+Samples:SelectStyle
+Samples:SaveCurrentStyles
+Samples:RestoreCurrentStyles
+Samples:CloseStyleDialog
+Samples:KillTempFile
+Tools
+Debug
+Debug:ActivateReadOnlyFlag
+Debug:DeactivateReadOnlyFlag
+Debug:SetBasicReadOnlyFlag
+Debug:WritedbgInfo
+Debug:WriteDbgString
+Debug:printdbgInfo
+Debug:ShowArray
+Debug:ShowPropertyValues
+Debug:ShowNameValuePair
+Debug:ShowElementNames
+Debug:ShowSupportedServiceNames
+Debug:ShowAvailableServiceNames
+Debug:ShowCommands
+Debug:ProtectCurrentSheets
+Debug:FillDocument
+Listbox
+Listbox:MergeList
+Listbox:RemoveListItems
+Listbox:InitializeListboxProcedures
+Listbox:CopyListboxItems
+Listbox:FormMoveSelected
+Listbox:FormMoveAll
+Listbox:FormRemoveSelected
+Listbox:FormRemoveAll
+Listbox:MoveSelectedListBox
+Listbox:MoveOrderedSelectedListbox
+Listbox:RemoveSelected
+Listbox:SetNewSelection
+Listbox:ToggleListboxControls
+Listbox:FormSetMoveRights
+Listbox:AddSingleItemToListbox
+Listbox:EmptyListbox
+Listbox:SelectListboxItem
+Listbox:GetSelectedListboxItems
+Listbox:RemoveListboxItemByName
+Listbox:GetItemPos
+Misc
+Misc:Main
+Misc:RegisterNewDataSource
+Misc:ConnecttoDatabase
+Misc:GetStarOfficeLocale
+Misc:GetRegistryKeyContent
+Misc:GetProductname
+Misc:OpenDocument
+Misc:TaskonDesktop
+Misc:RetrieveFileName
+Misc:GetPathSettings
+Misc:GetOfficeSubPath
+Misc:ShowNoOfficePathError
+Misc:InitResources
+Misc:GetResText
+Misc:CutPathView
+Misc:DeleteInputCells
+Misc:ChangeValueofRange
+Misc:ReplaceRangeValues
+Misc:GetValueofCellbyName
+Misc:DuplicateRow
+Misc:GetStringofCellbyName
+Misc:GetCellByName
+Misc:ChangeCellValue
+Misc:GetDocumentType
+Misc:GetNumberFormatType
+Misc:ProtectSheets
+Misc:UnprotectSheets
+Misc:GetRowIndex
+Misc:GetColumnIndex
+Misc:CopySheetbyName
+Misc:ToggleWindow
+Misc:CheckNewSheetname
+Misc:AddNewSheetName
+Misc:GetSheetIndex
+Misc:GetLastUsedRow
+Misc:ModifyBorderLineWidth
+Misc:AttachBasicMacroToEvent
+Misc:ModifyPropertyValue
+Misc:GetPropertyValueIndex
+Misc:DispatchSlot
+Misc:IsFatOffice
+Misc:GetLocale
+Misc:ToggleDesignMode
+Misc:isHighContrast
+Misc:CreateNewDocument
+Misc:DisposeDocument
+Misc:CalIsLeapYear
+ModuleControls
+ModuleControls:getControlModel
+ModuleControls:GetControlShape
+ModuleControls:getControlView
+ModuleControls:DisposeControl
+ModuleControls:GetControlGroupModel
+ModuleControls:GetRefValue
+ModuleControls:GetRefValueOfControlGroup
+ModuleControls:GetOptionGroupValue
+ModuleControls:WriteOptValueToCell
+ModuleControls:LoadDialog
+ModuleControls:GetFolderName
+ModuleControls:GetFileName
+ModuleControls:StoreDocument
+ModuleControls:AddFiltersToDialog
+ModuleControls:SwitchMousePointer
+ModuleControls:ShowOverwriteAllDialog
+ModuleControls:SetOVERWRITEToQuery
+ModuleControls:SetOVERWRITEToAlways
+ModuleControls:SetOVERWRITEToNever
+Strings
+Strings:ElimChar
+Strings:DeleteStr
+Strings:FindPartString
+Strings:PartStringInArray
+Strings:RTrimStr
+Strings:LTRimChar
+Strings:ArrayOutOfString
+Strings:ClearArray
+Strings:ClearMultiDimArray
+Strings:FieldinArray
+Strings:FieldinList
+Strings:IndexinArray
+Strings:MultiArrayInListbox
+Strings:StringInMultiArray
+Strings:GetIndexInMultiArray
+Strings:GetIndexForPartStringinMultiArray
+Strings:ArrayfromMultiArray
+Strings:ReplaceString
+Strings:FindSecondValue
+Strings:Power
+Strings:Round
+Strings:FileNameoutofPath
+Strings:GetFileNameExtension
+Strings:GetFileNameWithoutExtension
+Strings:DirectoryNameoutofPath
+Strings:CountCharsinString
+Strings:BubbleSortList
+Strings:GetValueoutofList
+Strings:AddListtoList
+Strings:CheckDouble
+UCB
+UCB:Main
+UCB:ReadDirectories
+UCB:AddFoldertoList
+UCB:AddFileNameToList
+UCB:RetrieveDocTitle
+UCB:GetRealFileContent
+UCB:CopyRecursively
+UCB:ShowHelperDialog
+UCB:SaveDataToFile
+UCB:LoadDataFromFile
+UCB:CreateFolder
+Untitled 1
+Standard
diff --git a/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_BeanShell.txt b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_BeanShell.txt
new file mode 100755
index 000000000000..141bebef85d5
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_BeanShell.txt
@@ -0,0 +1,14 @@
+My Macros
+Oracle Open Office Macros
+Capitalise
+capitalise.bsh
+HelloWorld
+helloworld.bsh
+Highlight
+ButtonPressHandler.bsh
+ShowDialog.bsh
+MemoryUsage
+memusage.bsh
+WordCount
+wordcount.bsh
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_JavaScript.txt b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_JavaScript.txt
new file mode 100755
index 000000000000..09ea2fbc3203
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_JavaScript.txt
@@ -0,0 +1,10 @@
+My Macros
+Oracle Open Office Macros
+ExportSheetsToHTML
+exportsheetstohtml.js
+HelloWorld
+helloworld.js
+Highlight
+ButtonPressHandler.js
+ShowDialog.js
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_Python.txt b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_Python.txt
new file mode 100755
index 000000000000..dfe18f127bef
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_Python.txt
@@ -0,0 +1,10 @@
+My Macros
+Oracle Open Office Macros
+Capitalise
+capitalisePython
+HelloWorld
+HelloWorldPython
+pythonSamples
+TableSample
+createTable
+Untitled 1
diff --git a/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_RunMacro.txt b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_RunMacro.txt
new file mode 100755
index 000000000000..6b6a9b2520a3
--- /dev/null
+++ b/testautomation/framework/required/input/scripts/Oracle-Open-Office_en-US_win_RunMacro.txt
@@ -0,0 +1,681 @@
+My Macros
+Standard
+Module1
+Module1:Main
+Oracle Open Office Macros
+Capitalise
+Capitalise:capitalise.bsh
+Capitalise:capitalisePython
+Depot
+Depot
+Depot:AddShortCuttoControl
+Depot:Buy
+Depot:CancelStockRate
+Depot:CancelTransaction
+Depot:CommitStockRate
+Depot:EnableTransactionControls
+Depot:HandleStocks
+Depot:Initialize
+Depot:InitializeStockRatesControls
+Depot:OpenStockRatePage
+Depot:Reset
+Depot:SelectStockname
+Depot:SelectStockNameForRates
+Depot:Sell
+Depot:SetupTransactionControls
+Depot:ToggleStockRateControls
+Depot:TransactionOk
+CommonLang
+CommonLang:CompleteMarketList
+CommonLang:InitializeStartUpModel
+CommonLang:LoadDepotDialogs
+CommonLang:LoadLanguage
+CommonLang:LocalizedCurrencies
+Currency
+Currency:CheckFormatType
+Currency:ChooseMarket
+Currency:CloseStartUpDialog
+Currency:ConvertStylesCurrencies
+Currency:DisposeDocument
+Currency:EnableGoOnButton
+Currency:Numberformat
+Currency:Startup
+Currency:SwitchNumberFormat
+Internet
+Internet:CalculateChartafterSplit
+Internet:CheckHistoryControls
+Internet:GetCurrentRate
+Internet:InsertCompanyHistory
+Internet:InternetUpdate
+Internet:StringToDate
+Internet:UpdateChart
+Internet:UpdateValue
+Lang_de
+Lang_de:LoadGermanLanguage
+tools
+tools:AddValueToCellContent
+tools:CellValuetoControl
+tools:CheckDocLocale
+tools:CheckInputDate
+tools:FillListbox
+tools:GetRowIndex
+tools:GetStockID
+tools:GetStockRowIndex
+tools:GetStocksCount
+tools:GetTransactionCount
+tools:InitializeStatusLine
+tools:InsertCurrentValue
+tools:MakeRangeVisible
+tools:RemoveSheet
+tools:RemoveStockRows
+tools:SplitCellValue
+Lang_en
+Lang_en:LoadEnglishLanguage
+Lang_fr
+Lang_fr:LoadFrenchLanguage
+Lang_it
+Lang_it:LoadItalianLanguage
+Lang_es
+Lang_es:LoadSpanishLanguage
+Lang_sv
+Lang_sv:LoadSwedishLanguage
+Lang_zh
+Lang_zh:LoadChineseSimpleLanguage
+Lang_tw
+Lang_tw:LoadChineseTradLanguage
+Lang_ko
+Lang_ko:LoadKoreanLanguage
+Lang_ja
+Lang_ja:LoadJapaneseLanguage
+Euro
+ConvertRun
+ConvertRun:AddRangeToListbox
+ConvertRun:AddSelectedRangeToSelRangesEnum
+ConvertRun:CheckLocale
+ConvertRun:CheckRangeSelection
+ConvertRun:ConvertRangesOrStylesOfDocument
+ConvertRun:ConvertWholeDocument
+ConvertRun:EmptySelection
+ConvertRun:EnableStep1DialogControls
+ConvertRun:FieldinList
+ConvertRun:GetPreSelectedRange
+ConvertRun:Main
+ConvertRun:RetrieveEnableValue
+ConvertRun:SelectListItem
+ConvertRun:SetOptionValuestoNull
+ConvertRun:SetStatusLineText
+AutoPilotRun
+AutoPilotRun:AssignFileName
+AutoPilotRun:CallFilePicker
+AutoPilotRun:CallFolderPicker
+AutoPilotRun:ChangeToNextProgressStep
+AutoPilotRun:ConvertDocuments
+AutoPilotRun:EnableStep2DialogControls
+AutoPilotRun:InitializeDocument
+AutoPilotRun:InitializeProgressPage
+AutoPilotRun:InitializeThirdStep
+AutoPilotRun:PreviousStep
+AutoPilotRun:StartAutoPilot
+AutoPilotRun:StoreDocument
+AutoPilotRun:SwapExtent
+AutoPilotRun:ToggleGoOnButton
+AutoPilotRun:ToggleProgressStep
+Hard
+Hard:AddSheetRanges
+Hard:CheckIfRangeisCurrency
+Hard:ConvertCellCurrencies
+Hard:ConvertThehardWay
+Hard:CountColumnsForRow
+Hard:CountRangeCells
+Hard:CreateRangeEnumeration
+Hard:CreateRangeList
+Hard:ModifyObjectValuewithCurrFactor
+Hard:SelectRange
+Soft
+Soft:AssignCellFormatRanges
+Soft:AssignRangestoStyle
+Soft:ConvertTheSoftWay
+Soft:CreateStyleEnumeration
+Soft:DeselectStyle
+Soft:GetAssignedRanges
+Soft:MakeStyleEnumeration
+Soft:RetrieveRangeNamefromAddress
+Soft:RetrieveRangeoutofRangeName
+Soft:RetrieveSheetoutofRangeName
+Init
+Init:InitializeControls
+Init:InitializeConverter
+Init:InitializeCurrencies
+Init:InitializeCurrencyValues
+Init:InitializeLanguages
+Init:InitializeLocales
+Init:InitializeResources
+Common
+Common:CancelTask
+Common:CheckFormatType
+Common:ConvertDocument
+Common:EndStatusLine
+Common:FillUpCurrencyListbox
+Common:IncreaseStatusValue
+Common:InitializeProgressbar
+Common:Numberformat
+Common:RetrieveDocumentObjects
+Common:SelectCurrency
+Common:StartConversion
+Common:SwitchNumberFormat
+Writer
+Writer:ConvertTextFields
+Writer:ConvertWriterTables
+Writer:ModifyObjectValuewithCurrFactor
+Protect
+Protect:AddSheettoUnprotectionlist
+Protect:CheckSheetProtection
+Protect:ExecutePasswordDialog
+Protect:ReadPassword
+Protect:RejectPassword
+Protect:ReprotectSheets
+Protect:UnprotectSheet
+Protect:UnprotectSheetsWithPassWord
+Protect:UnprotectSheetWithDialog
+ExportSheetsToHTML
+ExportSheetsToHTML:exportsheetstohtml.js
+FormWizard
+FormWizard
+FormWizard:CommitLastDocumentChanges
+FormWizard:DeleteFirstListboxEntry
+FormWizard:DeleteFirstTableListBoxEntry
+FormWizard:EmptyFieldsListboxes
+FormWizard:FillUpFieldsListbox
+FormWizard:FormGetFields
+FormWizard:InitializeLayoutSettings
+FormWizard:Main
+FormWizard:MainWithDefault
+FormWizard:NextStep
+FormWizard:PreviousStep
+FormWizard:StoreForm
+FormWizard:StoreFormInDatabase
+FormWizard:ToggleDatabasePage
+Layouter
+Layouter:ArrangeControls
+Layouter:ChangeArrangemode
+Layouter:ChangeBorderLayouts
+Layouter:ChangeLabelAlignments
+Layouter:ConfigurePageStyle
+Layouter:DestroyControlShapes
+Layouter:InitializeLabelValues
+Layouter:InsertControl
+Layouter:OpenFormDocument
+Layouter:SwitchAlignMode
+Layouter:SwitchArrangementButtons
+Layouter:SwitchBorderMode
+Layouter:ToggleAlignGroup
+Layouter:ToggleBorderGroup
+Layouter:ToggleLayoutPage
+Language
+Language:InitializeWidthList
+Language:LoadLanguage
+Language:SetDialogLanguage
+DBMeta
+DBMeta:AddOrRemoveBinaryFieldsToWidthList
+DBMeta:AssignFieldLength
+DBMeta:CreateCommandTypeList
+DBMeta:CreateDBForm
+DBMeta:GetConnection
+DBMeta:GetCurrentMetaValues
+DBMeta:GetDatabaseNames
+DBMeta:GetDBMetaData
+DBMeta:GetSelectedDBMetaData
+DBMeta:GetSpecificFieldNames
+DBMeta:GetTableMetaData
+tools
+tools:CalcUniqueContentName
+tools:CountItemsInArray
+tools:GetDBHeight
+tools:GetFilterName
+tools:GetFormWizardPaths
+tools:GetPeerSize
+tools:GetPoint
+tools:GetPreferredHeight
+tools:GetPreferredWidth
+tools:GetSize
+tools:ImportStyles
+tools:PixelTo100thMMX
+tools:PixelTo100thMMY
+tools:RemoveNirwanaShapes
+tools:RemoveShapes
+tools:SetNumerics
+tools:SetProgressValue
+tools:ShapesToNirwana
+tools:TwipTo100telMM
+tools:TwipToCM
+tools:TwipToPixel
+develop
+develop:AdjustLineWidth
+develop:CheckJustifiedPosition
+develop:CheckOuterPoints
+develop:ControlCaptionstoStandardLayout
+develop:GetCorrWidth
+develop:GetLabelDiffHeight
+develop:GroupShapesTogether
+develop:InitializePosSizes
+develop:InsertDBControl
+develop:InsertTextControl
+develop:InsertTimeStampShape
+develop:PositionControls
+develop:PositionGridControl
+develop:RepositionColumnarLeftControls
+develop:ResetDBShape
+develop:ResetPosSizes
+develop:SetupGridColumn
+Gimmicks
+GetTexts
+GetTexts:GetAnnotations
+GetTexts:GetCalcGraphicNames
+GetTexts:GetCalcStrings
+GetTexts:GetCellTexts
+GetTexts:GetChartStrings
+GetTexts:GetControlContent
+GetTexts:GetControlStrings
+GetTexts:GetDocumentProps
+GetTexts:GetDrawPageTitles
+GetTexts:GetDrawStrings
+GetTexts:GetFrameTexts
+GetTexts:GetGraphicNames
+GetTexts:GetHyperlinks
+GetTexts:GetLinkedFileNames
+GetTexts:GetNamedRanges
+GetTexts:GetPageStrings
+GetTexts:GetParagraphTexts
+GetTexts:GetSectionNames
+GetTexts:GetStyles
+GetTexts:GetTextFieldStrings
+GetTexts:GetWriterStrings
+GetTexts:Main
+GetTexts:MakeLogHeadLine
+GetTexts:WriteStringtoLogFile
+Userfields
+Userfields:AddRecord
+Userfields:DeleteCurrentSettings
+Userfields:FillDialog
+Userfields:FillupTextFields
+Userfields:InitializeUserFamily
+Userfields:SaveSettings
+Userfields:ScrollControls
+Userfields:ScrollTextFieldInfo
+Userfields:SelectCurrentFields
+Userfields:StartChangesUserfields
+Userfields:StepToRecord
+Userfields:StopMacro
+Userfields:ToggleButtons
+ChangeAllChars
+ChangeAllChars:ChangeAllChars
+ChangeAllChars:ReplaceAllStrings
+ChangeAllChars:ReplaceStrings
+AutoText
+AutoText:InsertStringToCell
+AutoText:Main
+ReadDir
+ReadDir:AdjustPageHeight
+ReadDir:CalculateXPoint
+ReadDir:CheckPageWidth
+ReadDir:CloseDialog
+ReadDir:CreateTextShape
+ReadDir:DrawLine
+ReadDir:GetSourceDirectory
+ReadDir:Main
+ReadDir:ReadSourceDirectory
+ReadDir:SetNewLevels
+ReadDir:ToggleDialogControls
+ReadDir:TreeInfo
+HelloWorld
+HelloWorld:helloworld.bsh
+HelloWorld:helloworld.js
+HelloWorld:HelloWorld.printHW
+HelloWorld:HelloWorldPython
+Highlight
+Highlight:ButtonPressHandler.bsh
+Highlight:ButtonPressHandler.js
+Highlight:HighlightText.showForm
+Highlight:ShowDialog.bsh
+Highlight:ShowDialog.js
+ImportWizard
+Main
+Main:CancelTask
+Main:CheckInstalledModule
+Main:CheckModuleInstallation
+Main:GetImportWizardPaths
+Main:Main
+Main:NextStep
+Main:PrevStep
+Main:RepaintHeaderPreview
+Main:TakeOverPathSettings
+Main:TemplateDirSearchDialog
+Main:ToggleCheckboxes
+Main:ToggleCheckboxesWithBoolean
+Main:ToggleNextButton
+DialogModul
+DialogModul:AssignPathToCurrentApplication
+DialogModul:CheckControlPath
+DialogModul:CheckInputPaths
+DialogModul:CheckMSImportAvailability
+DialogModul:CheckTextBoxPath
+DialogModul:FillStep_InputPaths
+DialogModul:FillStep_Progress
+DialogModul:FillStep_Summary
+DialogModul:FillStep_Welcome
+DialogModul:FillUpApplicationList
+DialogModul:FinalizeDialogButtons
+DialogModul:GetFilterTracingLogPath
+DialogModul:InitializePathsforCurrentApplication
+DialogModul:InitializeProgressPage
+DialogModul:MakeSummaryString
+DialogModul:SaveStep_InputPath
+DialogModul:SetProgressDisplay
+DialogModul:SetupMSConfiguration
+DialogModul:SetupXMLConfiguration
+DialogModul:TakoverFolderName
+DialogModul:ToggleInputPaths
+Language
+Language:GetApplResourceArray
+Language:LoadLanguage
+FilesModul
+FilesModul:AddCollectionPath
+FilesModul:AddFilterNameToPathItem
+FilesModul:AddListtoFilesList
+FilesModul:AddLogStatistics
+FilesModul:CheckIfMacroExists
+FilesModul:CheckIfToAddPathToCollection
+FilesModul:CheckPassWordProtection
+FilesModul:CollectPaths
+FilesModul:ConcatComment
+FilesModul:ConvertAllDocuments
+FilesModul:CreateLogDocument
+FilesModul:CreateLogTable
+FilesModul:GetApplicationIndex
+FilesModul:GetFilterName
+FilesModul:GetFilterTracingLogPath
+FilesModul:GetSize
+FilesModul:GetTargetTemplatePath
+FilesModul:InsertCommandButtonatViewCursor
+FilesModul:InsertCommentToLogCell
+FilesModul:InsertHyperLinkToLogCell
+FilesModul:InsertSourceUrlToLogDocument
+FilesModul:InsertTargetUrlToLogDocument
+FilesModul:InterruptProcess
+FilesModul:MergeRange
+FilesModul:OpenLogDocument
+FilesModul:ReadCollectionPaths
+FilesModul:SearchArrayforPartString
+FilesModul:SetExtension
+API
+API:GetDefaultPath
+API:GetTemplateDefaultPath
+API:OpenRegKey
+API:QueryValue
+API:QueryValueEx
+MemoryUsage
+MemoryUsage:MemoryUsage.updateMemoryUsage
+MemoryUsage:memusage.bsh
+Schedule
+OwnEvents
+OwnEvents:CalcmdInsertData
+OwnEvents:CalCreateDateStrOfInput
+OwnEvents:CalGetNameOfEvent
+OwnEvents:CalLoadOwnData
+OwnEvents:CalSaveOwnData
+OwnEvents:CheckInsertedDates
+OwnEvents:GetDateUnits
+OwnEvents:GetOwnMonth
+OwnEvents:GetSelectedDateUnits
+OwnEvents:Main
+CalendarMain
+CalendarMain:AddNumberFormat
+CalendarMain:CalAutopilotTable
+CalendarMain:CalChooseCalendar
+CalendarMain:CalcmdCancel
+CalendarMain:CalcmdOk
+CalendarMain:SetupNumberFormatter
+BankHoliday
+BankHoliday:AddFollowUpHolidays
+BankHoliday:CalEasterTable
+BankHoliday:CalGetIntOfShortMonthName
+BankHoliday:CalInitGlobalVariablesDate
+BankHoliday:CalInsertBankholiday
+BankHoliday:CalInsertOwnDataInTables
+BankHoliday:CalMaxDayInMonth
+BankHoliday:CalOrthodoxEasterTable
+BankHoliday:GetMonthDate
+BankHoliday:GetNextWeekDay
+BankHoliday:Main
+DlgControl
+DlgControl:CalClearInputMask
+DlgControl:CalcmdDeleteSelect
+DlgControl:CalmdSwitchOwnDataOrGeneral
+DlgControl:CalMouseMoved
+DlgControl:CalSaveOwnEventControls
+DlgControl:CalUpdateNewEventFrame
+DlgControl:Main
+DlgControl:MouseLeavesImage
+DlgControl:SelectState
+DlgControl:ToggleInsertButton
+Language
+Language:LoadLanguage
+CreateTable
+CreateTable:CalCreateMonthTable
+CreateTable:CalCreateYearTable
+CreateTable:FormatCalCells
+GermanHolidays
+GermanHolidays:CalFindWholeYearHolidays_GERMANY
+GermanHolidays:CalGetGermanLandAtMousePos
+GermanHolidays:Main
+LocalHolidays
+LocalHolidays:CalculateChineseNewYear
+LocalHolidays:CalculateJapaneseAutumnDay
+LocalHolidays:CalculateJapaneseSpringDay
+LocalHolidays:CalculateturkishReligousHolidays
+LocalHolidays:FindWholeYearHolidays_CN
+LocalHolidays:FindWholeYearHolidays_DK
+LocalHolidays:FindWholeYearHolidays_FI
+LocalHolidays:FindWholeYearHolidays_FRANCE
+LocalHolidays:FindWholeYearHolidays_GREEK
+LocalHolidays:FindWholeYearHolidays_ITA
+LocalHolidays:FindWholeYearHolidays_JP
+LocalHolidays:FindWholeYearHolidays_NL
+LocalHolidays:FindWholeYearHolidays_PL
+LocalHolidays:FindWholeYearHolidays_PORT
+LocalHolidays:FindWholeYearHolidays_RU
+LocalHolidays:FindWholeYearHolidays_SPAIN
+LocalHolidays:FindWholeYearHolidays_SWED
+LocalHolidays:FindWholeYearHolidays_TRK
+LocalHolidays:FindWholeYearHolidays_TW
+LocalHolidays:FindWholeYearHolidays_US
+LocalHolidays:Main
+ScriptBindingLibrary
+Template
+ModuleAgenda
+ModuleAgenda:CreateBookMarkCursor
+ModuleAgenda:DeleteButtons
+ModuleAgenda:FinishAgenda
+ModuleAgenda:GetOptionValues
+ModuleAgenda:Initialize
+ModuleAgenda:LoadLanguageAgenda
+ModuleAgenda:ModifyTemplate
+ModuleAgenda:NewTopic
+Correspondence
+Correspondence:Database
+Correspondence:GetFieldName
+Correspondence:InsertDBField
+Correspondence:InsertPlaceholder
+Correspondence:LoadLanguageCorrespondence
+Correspondence:Main
+Correspondence:OK
+Correspondence:Placeholder
+Samples
+Samples:CloseStyleDialog
+Samples:KillTempFile
+Samples:PrepareForEditing
+Samples:RestoreCurrentStyles
+Samples:SaveCurrentStyles
+Samples:SelectStyle
+Samples:ShowStyles
+Autotext
+Autotext:CreateBullet
+Autotext:CreatePlaceholder
+Autotext:CreateUserDatafield
+Autotext:Main
+Tools
+ModuleControls
+ModuleControls:AddFiltersToDialog
+ModuleControls:DisposeControl
+ModuleControls:GetControlGroupModel
+ModuleControls:getControlModel
+ModuleControls:GetControlShape
+ModuleControls:getControlView
+ModuleControls:GetFileName
+ModuleControls:GetFolderName
+ModuleControls:GetOptionGroupValue
+ModuleControls:GetRefValue
+ModuleControls:GetRefValueOfControlGroup
+ModuleControls:LoadDialog
+ModuleControls:SetOVERWRITEToAlways
+ModuleControls:SetOVERWRITEToNever
+ModuleControls:SetOVERWRITEToQuery
+ModuleControls:ShowOverwriteAllDialog
+ModuleControls:StoreDocument
+ModuleControls:SwitchMousePointer
+ModuleControls:WriteOptValueToCell
+Strings
+Strings:AddListtoList
+Strings:ArrayfromMultiArray
+Strings:ArrayOutOfString
+Strings:BubbleSortList
+Strings:CheckDouble
+Strings:ClearArray
+Strings:ClearMultiDimArray
+Strings:CountCharsinString
+Strings:DeleteStr
+Strings:DirectoryNameoutofPath
+Strings:ElimChar
+Strings:FieldinArray
+Strings:FieldinList
+Strings:FileNameoutofPath
+Strings:FindPartString
+Strings:FindSecondValue
+Strings:GetFileNameExtension
+Strings:GetFileNameWithoutExtension
+Strings:GetIndexForPartStringinMultiArray
+Strings:GetIndexInMultiArray
+Strings:GetValueoutofList
+Strings:IndexinArray
+Strings:LTRimChar
+Strings:MultiArrayInListbox
+Strings:PartStringInArray
+Strings:Power
+Strings:ReplaceString
+Strings:Round
+Strings:RTrimStr
+Strings:StringInMultiArray
+Misc
+Misc:AddNewSheetName
+Misc:AttachBasicMacroToEvent
+Misc:CalIsLeapYear
+Misc:ChangeCellValue
+Misc:ChangeValueofRange
+Misc:CheckNewSheetname
+Misc:ConnecttoDatabase
+Misc:CopySheetbyName
+Misc:CreateNewDocument
+Misc:CutPathView
+Misc:DeleteInputCells
+Misc:DispatchSlot
+Misc:DisposeDocument
+Misc:DuplicateRow
+Misc:GetCellByName
+Misc:GetColumnIndex
+Misc:GetDocumentType
+Misc:GetLastUsedRow
+Misc:GetLocale
+Misc:GetNumberFormatType
+Misc:GetOfficeSubPath
+Misc:GetPathSettings
+Misc:GetProductname
+Misc:GetPropertyValueIndex
+Misc:GetRegistryKeyContent
+Misc:GetResText
+Misc:GetRowIndex
+Misc:GetSheetIndex
+Misc:GetStarOfficeLocale
+Misc:GetStringofCellbyName
+Misc:GetValueofCellbyName
+Misc:InitResources
+Misc:IsFatOffice
+Misc:isHighContrast
+Misc:Main
+Misc:ModifyBorderLineWidth
+Misc:ModifyPropertyValue
+Misc:OpenDocument
+Misc:ProtectSheets
+Misc:RegisterNewDataSource
+Misc:ReplaceRangeValues
+Misc:RetrieveFileName
+Misc:ShowNoOfficePathError
+Misc:TaskonDesktop
+Misc:ToggleDesignMode
+Misc:ToggleWindow
+Misc:UnprotectSheets
+UCB
+UCB:AddFileNameToList
+UCB:AddFoldertoList
+UCB:CopyRecursively
+UCB:CreateFolder
+UCB:GetRealFileContent
+UCB:LoadDataFromFile
+UCB:Main
+UCB:ReadDirectories
+UCB:RetrieveDocTitle
+UCB:SaveDataToFile
+UCB:ShowHelperDialog
+Listbox
+Listbox:AddSingleItemToListbox
+Listbox:CopyListboxItems
+Listbox:EmptyListbox
+Listbox:FormMoveAll
+Listbox:FormMoveSelected
+Listbox:FormRemoveAll
+Listbox:FormRemoveSelected
+Listbox:FormSetMoveRights
+Listbox:GetItemPos
+Listbox:GetSelectedListboxItems
+Listbox:InitializeListboxProcedures
+Listbox:MergeList
+Listbox:MoveOrderedSelectedListbox
+Listbox:MoveSelectedListBox
+Listbox:RemoveListboxItemByName
+Listbox:RemoveListItems
+Listbox:RemoveSelected
+Listbox:SelectListboxItem
+Listbox:SetNewSelection
+Listbox:ToggleListboxControls
+Debug
+Debug:ActivateReadOnlyFlag
+Debug:DeactivateReadOnlyFlag
+Debug:FillDocument
+Debug:printdbgInfo
+Debug:ProtectCurrentSheets
+Debug:SetBasicReadOnlyFlag
+Debug:ShowArray
+Debug:ShowAvailableServiceNames
+Debug:ShowCommands
+Debug:ShowElementNames
+Debug:ShowNameValuePair
+Debug:ShowPropertyValues
+Debug:ShowSupportedServiceNames
+Debug:WritedbgInfo
+Debug:WriteDbgString
+WordCount
+WordCount:wordcount.bsh
+pythonSamples
+TableSample
+TableSample:createTable
+Untitled 1
+Standard
diff --git a/testautomation/framework/tools/includes/toolbar_tools.inc b/testautomation/framework/tools/includes/toolbar_tools.inc
index 63117227becc..66c6c27982d0 100755
--- a/testautomation/framework/tools/includes/toolbar_tools.inc
+++ b/testautomation/framework/tools/includes/toolbar_tools.inc
@@ -200,7 +200,8 @@ function hStandardbarItemGetCount() as integer
'///<ul>
dim iToolbarItemsCurrent as integer
- const EXPECTED_TOOLBAR_ITEMCOUNT = 30
+ const DEFAULT_TOOLBAR_ITEMCOUNT = 30
+ const WEBLOG_PUBLISHER = 2
const CFN = "hStandardbarItemGetCount::"
@@ -226,13 +227,14 @@ function hStandardbarItemGetCount() as integer
' violate Sun's patching policy. So StarSuite/StarOffice now have 30 or 31
' items on the standardbar, OOo and its spinoffs have 30.
-
- if ( iToolbarItemsCurrent = EXPECTED_TOOLBAR_ITEMCOUNT ) then
- printlog( CFN & "Correct number of items on the StandardBar. Good" )
- else
- warnlog( CFN & "Expected: " & EXPECTED_TOOLBAR_ITEMCOUNT & _
- " entries, found: " & iToolbarItemsCurrent )
- endif
+ select case ( iToolbarItemsCurrent )
+ case DEFAULT_TOOLBAR_ITEMCOUNT
+ printlog( CFN & "Default number of items found" )
+ case DEFAULT_TOOLBAR_ITEMCOUNT + WEBLOG_PUBLISHER
+ printlog( CFN & "Default icons + Weblog publisher icons found" )
+ case else
+ warnlog( CFN & "Number of icons is unexpected: " & iToolbarItemsCurrent )
+ end select
'///+<li>close the context menu</li>
hMenuClose()
diff --git a/testautomation/framework/tools/includes/wizards.inc b/testautomation/framework/tools/includes/wizards.inc
index 274d862a8520..380f84141d34 100755
--- a/testautomation/framework/tools/includes/wizards.inc
+++ b/testautomation/framework/tools/includes/wizards.inc
@@ -31,328 +31,6 @@
'*
'\******************************************************************************
-function hOpenWizardWithMenu( cType as string ) as integer
-
- const CFN = "hOpenWizardWithMenu::"
-
- '///<h3>Open a wizard via menu</h3>
- '///<i>Starting point: Any plain document</i><br>
- '///<i>Uses: framework/tools/input/menuentries.txt</i><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Name of Wizard (string). Known Wizards are:</li>
- '///<ul>
- '///+<li>&quot;LETTER&quot;</li>
- '///+<li>&quot;FAX&quot;</li>
- '///+<li>&quot;AGENDA&quot;</li>
- '///+<li>&quot;PRESENTATION&quot;</li>
- '///+<li>&quot;WEBPAGE&quot;</li>
- '///+<li>&quot;DOCCONV&quot;</li>
- '///+<li>&quot;EUROCONV&quot;</li>
- '///+<li>&quot;ADDRESS&quot;</li>
- '///+<li>&quot;MAILMERGE&quot;</li>
- '///</ul>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Errorcode (integer)</li>
- '///<ul>
- '///+<li>0: The expected wizard is open</li>
- '///+<li>1: No wizard is open</li>
- '///+<li>2: The incorrect wizard is open</li>
- '///+<li>3: The requested wizard is unknown to this function</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
- dim iMainMenuPosition as integer ' position in the main menu
- dim iMenuPosition as integer ' the position of the menuentry
- dim iWizardMenuPosition as integer ' the position of the wizards menu
- dim iWizardID as integer ' a unique number to identify the wizard
- dim iWait as integer ' time of the wizard to open
- dim iOpen as integer ' identifier for the open dialog
- dim brc as boolean ' some multi purpose boolean returnvalue
-
- hOpenWizardWithMenu() = 0
-
- '///+<li>find out where in the menustructure the wizards are located</li>
- printlog( "Requested Wizard: " & cType )
- iWizardID = hGetWizardParams( cType , "ID" )
- iMainMenuPosition = hGetWizardParams( cType , "MAIN" )
- iMenuPosition = hGetWizardParams( cType , "SUB" )
- iWizardMenuPosition = 4 ' This is the "Wizards" menuentry below "File"
-
- try
- kontext "DocumentWriter"
- hUseMenu()
-
- '///+<li>Open the 'File' menu</li>
- printlog( CFN & "Open Menu at pos " & iMainMenuPosition )
- hMenuSelectNr( iMainMenuPosition )
- WaitSlot( 2000 )
-
- '///+<li>if we are in the filemenu the wizards are below a submenu</li>
- if ( iMainMenuPosition = 1 ) then
- printlog( CFN & "Select wizards-submenu at pos " & iWizardMenuPosition )
- hMenuSelectNr( iWizardMenuPosition )
- WaitSlot( 2000 )
- else
- printlog( CFN & "Wizard is not in File-Menu" )
- endif
-
- '///+<li>try to click the menuentry where we expect the wizard</li>
- printlog( CFN & "Select " & cType & " wizard at pos " & iMenuPosition )
- hMenuSelectNr( iMenuPosition )
- WaitSlot( 2000 )
- brc = true
- catch
- ' we end up here, when the menuitems could not be accessed
- printlog( CFN & "Error accessing menuentry for wizard" )
- hOpenWizardwithMenu() = 1
- brc = false
- endcatch
-
- if ( not brc ) then
- printlog( CFN & "Trying to open wizard using the slot" )
- select case iWizardId
- case 1 : FileAutopilotLetter
- case 2 : FileAutopilotFax
- case 3 : FileAutopilotAgenda
- case 4 : FileAutopilotPresentation
- end select
- endif
-
- '///+<li>wait for a wizard to open, iOpen is the number of the menuitem</li>
- iOpen = hWaitForWizard()
-
- '///+<li>Verify that the correct wizard is open. iOpen should match iMenuPosition</li>
- ' This works because the menu-positions are unique. BEWARE!
- if ( iOpen <> iWizardID ) then
-
- qaerrorlog( CFN & "Incorrect Wizard is open, did the menu-order change?" )
-
- hFinishWizard( 2 )
- hOpenWizardWithMenu() = 2
-
- else
-
- hOpenWizardWithMenu() = 0
-
- endif
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
-function hFinishWizard( iMode as integer ) as boolean
-
- const CFN = "hFinishWizard::"
-
- '///<h3>Finish or cancel a wizard</h3>
- '///<i>Starting point: Any known wizard must be open</i><br>
- '///<i>If several wizards are open at the same time the outcome is undefined</i><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Closing method (integer). Valid options are:</li>
- '///<ul>
- '///+<li>1: Click Finish-Button</li>
- '///+<li>2: Click Cancel-Button</li>
- '///+<li>3: Use Accelerator for Finish-Button</li>
- '///</ul>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Errorcode (boolean)</li>
- '///<ul>
- '///+<li>TRUE: If everything is ok</li>
- '///+<li>FALSE: On any error (including incorrect function parameters)</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
- '///+<li>Handle possible errors when invoking this function</li>
- if ( ( iMode < 1 ) or ( iMode > 3 ) ) then
- printlog( CFN & "Invalid iMode = " & iMode )
- hFinishWizard() = false
- exit function
- endif
-
- dim cAccel as string
- dim iWait as integer
- dim brc as boolean : brc = false
-
-
- '///+<li>Try to close the wizard</li>
- for iWait = 1 to 5
-
- Kontext "AutopilotLetter"
- if ( AutopilotLetter.exists() ) then
- select case iMode
- case 1 : hWaitForObject( FinishButton, 3000 ) : FinishButton.click()
- case 2 : AutopilotLetter.cancel()
- case 3 : cAccel = hGetAccel( "Finish_Wizard" )
- AutopilotLetter.typeKeys( cAccel )
- end select
- brc = true
- exit for
- endif
-
- Kontext "AutopilotFax"
- if ( AutopilotFax.exists() ) then
- select case iMode
- case 1 : hWaitForObject( FinishButton, 3000 ) : FinishButton.click()
- case 2 : AutopilotFax.cancel()
- case 3 : cAccel = hGetAccel( "Finish_Wizard" )
- AutopilotFax.typeKeys( cAccel )
- end select
- brc = true
- exit for
- endif
-
- Kontext "AutopilotAgenda"
- if ( AutopilotAgenda.exists() ) then
- select case iMode
- case 1 : hWaitForObject( createButton, 3000 ) : createButton.click()
- case 2 : hWaitForObject( cancelButton, 3000 ) : cancelButton.click()
- case 3 : cAccel = hGetAccel( "Finish_Wizard" )
- AutopilotAgenda.typeKeys( cAccel )
- end select
- brc = true
- exit for
- endif
-
- Kontext "MailMergeWizard"
- if ( MailMergeWizard.exists() ) then
- select case iMode
- case 1 : MailMergeWizard.OK()
- case 2 : MailMergeWizard.Cancel()
- case 3 : cAccel = hGetAccel( "Finish_Wizard" )
- MailMergeWizard.typeKeys( cAccel )
- end select
- brc = true
- exit for
- endif
-
- Kontext "AutopilotPraesentation3"
- if ( AutopilotPraesentation3.exists() ) then
- select case iMode
- case 1 : AutopilotPraesentation3.OK()
- case 2 : AutopilotPraesentation3.Cancel()
- case 3 : cAccel = hGetAccel( "Finish_Wizard" )
- AutopilotPraesentation3.typeKeys( cAccel )
- end select
- brc = true
- exit for
- endif
-
- Kontext "AutoPilotEuroKonverter"
- if ( AutoPilotEuroKonverter.exists() ) then
- select case iMode
- case 1 : hWaitForObject( Konvertieren, 3000 ) : Konvertieren.click()
- case 2 : hWaitForObject( abbrechen , 3000 ) : abbrechen.click()
- case 3 : cAccel = hGetAccel( "Finish_Wizard" )
- AutoPilotEuroKonverter.typeKeys( cAccel )
- end select
- brc = true
- exit for
- endif
-
- next iWait
-
- '///+<li>Verify that no wizard is open anymore</li>
- if ( brc ) then
- printlog( CFN & "Closed wizard" )
- hFinishWizard() = true
- else
- qaerrorlog( CFN & "No (known) wizard is present to be closed" )
- hFinishWizard() = false
- endif
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
-function hGetWizardParams( cType as string, cParam as string ) as integer
-
- const CFN = "hGetWizardParams::"
-
- '///<h3>Retrieve the location of a wizard in the menu</h3>
- '///<i>Uses: framework/tools/input/menuentries.txt</i><br>
- '///<i>Refer to inline documentation for further information</i><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Name of Wizard (string). Valid options are:</li>
- '///<ul>
- '///+<li>&quot;LETTER&quot;</li>
- '///+<li>&quot;FAX&quot;</li>
- '///+<li>&quot;AGENDA&quot;</li>
- '///+<li>&quot;PRESENTATION&quot;</li>
- '///+<li>&quot;WEBPAGE&quot;</li>
- '///+<li>&quot;DOCCONV&quot;</li>
- '///+<li>&quot;EUROCONV&quot;</li>
- '///+<li>&quot;ADDRESS&quot;</li>
- '///+<li>&quot;MAILMERGE&quot;</li>
- '///</ul>
- '///+<li>Menu Position (string). Valid options are:</li>
- '///<ul>
- '///+<li>&quot;ID&quot; - This is a unique id for the wizard</li>
- '///+<li>&quot;MAIN&quot; - Main menu position (e.g. &quot;File&quot;</li>
- '///+<li>&quot;SUB&quot; - Position below main menu</li>
- '///</ul>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Position of a menu entry (integer)</li>
- '///<ul>
- '///+<li>0: Invalid function parameter</li>
- '///+<li>1-n: Position of the item in the menu</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
- dim iParam as integer
-
- dim cInputArray( 200 ) as string
- dim iArraySize as integer
-
- dim cFile as string
- cFile = gTesttoolPath & "framework\tools\input\menuentries.txt"
- cFile = convertpath( cFile )
-
- '///+<li>Lowercase all function parameters</li>
- cType = ucase( cType )
- cParam = ucase( cParam )
-
- '///+<li>Read in the section containing the waizard parameters</li>
- '///+<li>Retrieve the requested value from the section</li>
- iArraySize = hGetDataFileSection( cFile , cInputArray() , ctype , "" , "" )
- if ( iArraySize = 3 ) then
-
- select case cParam
- case "ID"
- iParam = hGetValueForKeyAsInt( cInputArray() , "iWizardId" )
- case "MAIN"
- iParam = hGetValueForKeyAsInt( cInputArray() , "iMainMenuPosition" )
- case "SUB"
- iParam = hGetValueForKeyAsInt( cInputArray() , "iMenuPosition" )
- end select
-
- hGetWizardParams() = iParam
- else
- qaerrorlog( CFN & "hGetDataFileSection returned invalid data" )
- hGetWizardParams() = 0
- endif
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
function hWaitForWizard() as integer
const CFN = "hWaitForWizard::"
diff --git a/testautomation/framework/tools/input/menuentries.txt b/testautomation/framework/tools/input/menuentries.txt
deleted file mode 100755
index e1517412bc26..000000000000
--- a/testautomation/framework/tools/input/menuentries.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-# This file contains the position of the menuentries for all
-# wizards ∧assigns them a unique number
-# iWizardId = Unique number
-# iMenuPosition = Position below the main menu entry
-# iMainMenuPosition = Position ∈main menu, e.g. "File"
-
-[LETTER]
-iWizardID=1
-iMenuPosition=1
-iMainMenuPosition=1
-
-[FAX]
-iWizardID=2
-iMenuPosition=2
-iMainMenuPosition=1
-
-[AGENDA]
-iWizardID=3
-iMenuPosition=3
-iMainMenuPosition=1
-
-[PRESENTATION]
-iWizardID=4
-iMenuPosition=4
-iMainMenuPosition=1
-
-[WEBPAGE]
-iWizardID=5
-iMenuPosition=5
-iMainMenuPosition=1
-
-[DOCCONV]
-iWizardID=6
-iMenuPosition=6
-iMainMenuPosition=1
-
-[EUROCONV]
-iWizardID=7
-iMenuPosition=7
-iMainMenuPosition=1
-
-[ADDRESS]
-iWizardID=8
-iMenuPosition=8
-iMainMenuPosition=1
-
-[MAILMERGE]
-iWizardID=11
-iMenuPosition=11
-iMainMenuPosition=7
diff --git a/testautomation/global/required/includes/g_findbar.inc b/testautomation/global/required/includes/g_findbar.inc
index 38af3edd28aa..dd8e9062b604 100644
--- a/testautomation/global/required/includes/g_findbar.inc
+++ b/testautomation/global/required/includes/g_findbar.inc
@@ -87,7 +87,7 @@ testcase tUpdtFindBar()
warnlog( "Messagebox missing <No matches found>" )
endif
- warnlog( "#i111984 - exclude <SearchDialog> button from testing" )
+ qaerrorlog( "#i111984 - exclude <SearchDialog> button from testing" )
goto skip_SearchDialog
printlog( "Search dialog button may not be visible by default" )
diff --git a/testautomation/global/sid/e_all.sid b/testautomation/global/sid/e_all.sid
index 866251e652ac..4c7800ba8676 100644
--- a/testautomation/global/sid/e_all.sid
+++ b/testautomation/global/sid/e_all.sid
@@ -20,6 +20,8 @@ FileAutopilotPresentation SID_SD_AUTOPILOT
FileAutopilotAddressDataSource SID_ADDRESS_DATA_SOURCE
FirstTimeWizard service:com.sun.star.comp.desktop.FirstStart?start
FileWizardsWebPage service:com.sun.star.wizards.web.CallWizard?start
+FileWizardDocumentConverter sym:vnd.sun.star.script:ImportWizard.Main.Main?language=Basic&location=application
+FileWizardEuroConverter sym:vnd.sun.star.script:Euro.AutoPilotRun.StartAutoPilot?language=Basic&location=application
FileCloseAndReturn SID_CLOSEDOC
FileSaveCopy SID_SAVEASDOC
FileClose .uno:CloseDoc
diff --git a/testautomation/global/tools/includes/optional/t_listfuncs.inc b/testautomation/global/tools/includes/optional/t_listfuncs.inc
index 8aefe8720939..c90d077db651 100755
--- a/testautomation/global/tools/includes/optional/t_listfuncs.inc
+++ b/testautomation/global/tools/includes/optional/t_listfuncs.inc
@@ -140,6 +140,9 @@ function hManageComparisionList( sFileIn as string, sFileOut as string, sListOut
'///<ul>
const CFN = "hManageComparisionList::"
+
+ ' maximum lines per file. Currently this limit is determined by the help
+ ' tests which have up to 22000 entries + reseve.
const FILESIZE = 25000
const COMPARE_SUCCESS = 0
const ENCODING_UTF8 = "UTF8"
@@ -148,39 +151,33 @@ function hManageComparisionList( sFileIn as string, sFileOut as string, sListOut
dim aReferenceList( FILESIZE ) as string
if ( GVERBOSE ) then printlog( CFN & "Reading: " & sFileIn )
- ' disabled hGetDataFileSection because some lists contain a #
- ' (hash) as value which is identified as comment by the function.
- ' Fixing this for hGetDataFileSection() would break compatibility
- ' to other functions both in framework and global module
- 'hgetDataFileSection( sFileIn , aReferenceList() , "" , "" , "" )
+
+ ' Do not use hGetDataFileSection() as strings in some lists may begin with a
+ ' "#" which is interpreted as a comment by hGetDataFileSection()
listread( aReferenceList(), sFileIn, ENCODING_UTF8 )
+
+ ' Word of caution: If the number of new items equals the number of removed items
+ ' this function returns 0 -> success. This case is highly unlikely to ever happen
+ ' unless someone renames scripts.
irc = hListCompare( sListOut() , aReferenceList() )
- ' A this point there are three possible states:
- ' a) the reference list does not exist
- ' b) the comparision failed
- ' c) the comparision succeeded
- ' only if hListCompare() returns 0 the testrun is successful.
- ' This means that on any error, the ref-list will be written so it can be
- ' directly reviewed/compared to the "faulty" list without having to run this
- ' test again (after deleting the ref-file)
'///+<li>In case the lists are not identical, write the new one to the local work directory</li>
if ( irc = COMPARE_SUCCESS ) then
printlog( CFN & "Comparision succeeded" )
hManageComparisionList() = COMPARE_SUCCESS
else
- if ( GVERBOSE ) then
- printlog( CFN & "The two compared lists differ. There are two likely reasons:" )
- printlog( CFN & "1) The reference file does not exist at all" )
- printlog( CFN & "2) Reference and actual UI-Content do not match." )
- printlog( CFN & "Verify and copy the file: " & sFileOut )
- printlog( CFN & "to this location........: " & sFileIn )
- endif
+ printlog( CFN & "The two compared lists differ. There are a number of possible reasons:" )
+ printlog( CFN & "- Installation requirements are not met (setup /a?, missing packages?)" )
+ printlog( CFN & "- Reference and actual UI-Content do not match: File an issue." )
+ printlog( CFN & "- The reference file does not exist: Follow steps below." )
+ printlog( CFN & "Verify and copy the file: " & sFileOut )
+ printlog( CFN & "to this location........: " & sFileIn )
+ printlog( CFN & "Check this file into the SCM or attach it to an issue" )
listwrite( sListOut(), sFileOut, ENCODING_UTF8 )
hManageComparisionList() = irc
endif
-
- '///+<li>Return 0 if the lists are identical, 1 if not and 2-4 on any other error</li>
+
+ '///+<li>Return number of differences between the lists</li>
'///</ul>
end function
@@ -266,7 +263,7 @@ function hListCompare( aListOne() as String, aListTwo() as String ) as integer
if ( ListCount( aTwoOnlyList() ) > 0 ) then
printlog( CFN & "Objects have been removed from the list" )
hListPrint( aTwoOnlyList() , "Items found in list TWO only (MISSING)" )
- hListCompare() = ListCount( aOneOnlyList() ) * -1
+ hListCompare() = ListCount( aTwoOnlyList() ) * -1
end if
'///</ul>
@@ -428,7 +425,7 @@ function hCountMatchesInList( acItemList() as string, cSearchTerm as string ) as
endif
next iCurrentItem
-if ( GVERBOSE ) then printlog( CFN & "Exit with result: " & iHitCount )
+ if ( GVERBOSE ) then printlog( CFN & "Exit with result: " & iHitCount )
hCountMatchesInList() = iHitCount
end function
diff --git a/testautomation/global/tools/includes/optional/t_treelist_tools.inc b/testautomation/global/tools/includes/optional/t_treelist_tools.inc
index 5477022dc160..e9c254ac07b4 100755
--- a/testautomation/global/tools/includes/optional/t_treelist_tools.inc
+++ b/testautomation/global/tools/includes/optional/t_treelist_tools.inc
@@ -255,6 +255,15 @@ end function
'*******************************************************************************
+function hGetAllNodeNames( oControl as object , lsList() as string ) as integer
+
+ hExpandAllNodes( oControl )
+ hGetAllNodeNames() = hGetVisibleNodeNames( oControl, lsList() )
+
+end function
+
+'*******************************************************************************
+
function hGetVisibleNodeNames( oControl as object , lsList() as string ) as integer
'///<h3>Retrieve the names of all nodes in a treelist</h3>
diff --git a/testautomation/global/tools/includes/required/t_filters.inc b/testautomation/global/tools/includes/required/t_filters.inc
index afb1bf999c52..243483be9e7d 100755
--- a/testautomation/global/tools/includes/required/t_filters.inc
+++ b/testautomation/global/tools/includes/required/t_filters.inc
@@ -34,6 +34,21 @@
private const LENGTH_OF_FILTERFILE = 100
private const FILE_DATA_SIZE = 300
+function hCheckForBinfilters() as boolean
+
+ try
+ hGetSuffix( "569" )
+ hCheckForBinfilters() = true
+ catch
+ warnlog( "Optional legacy filters package is not installed" )
+ printlog( "Please restart the setup to install the missing filters" )
+ hCheckForBinfilters() = false
+ endcatch
+
+end function
+
+'*******************************************************************************
+
function hGetSuffix( optional cBuildId as string ) as string
' This function retrieves the suffix depending on the build id (e.g. 680)
diff --git a/testautomation/graphics/optional/g_spellcheck.bas b/testautomation/graphics/optional/g_spellcheck.bas
index 7dad1b0d9e40..f8a8eb6c0668 100644..100755
--- a/testautomation/graphics/optional/g_spellcheck.bas
+++ b/testautomation/graphics/optional/g_spellcheck.bas
@@ -42,19 +42,16 @@ sub main
use "graphics\optional\includes\global\g_spellcheck.inc"
hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () )
-
- PrintLog "-------------------------" + gApplication + "-------------------"
- Call tiToolsSpellcheckCorrect
- Call tiToolsSpellcheckError
- Call tiToolsSpellcheckCheck
- Call tToolsSpellcheckAutoSpellcheck
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ call tiToolsSpellcheckCheck_AlwaysIgnore
+ call tiToolsSpellcheckCheck_Change
+ call tiToolsSpellcheckCheck_ChangeAll
gApplication = "DRAW"
PrintLog "-------------------------" + gApplication + "-------------------"
- Call tiToolsSpellcheckCorrect
- Call tiToolsSpellcheckError
- Call tiToolsSpellcheckCheck
- Call tToolsSpellcheckAutoSpellcheck
+ call tiToolsSpellcheckCheck_AlwaysIgnore
+ call tiToolsSpellcheckCheck_Change
+ call tiToolsSpellcheckCheck_ChangeAll
Call hStatusOut
end sub
diff --git a/testautomation/graphics/optional/i_only_updt_1.bas b/testautomation/graphics/optional/i_only_updt_1.bas
index fd1e4ae68215..98d226424f00 100644..100755
--- a/testautomation/graphics/optional/i_only_updt_1.bas
+++ b/testautomation/graphics/optional/i_only_updt_1.bas
@@ -58,7 +58,7 @@ sub main
call im_004_
call id_004
call id_005
- call id_006
+ call id_Tools
Call hStatusOut
end sub
diff --git a/testautomation/graphics/optional/includes/global/g_clipexport.inc b/testautomation/graphics/optional/includes/global/g_clipexport.inc
index 64385ffd78c3..c9569cbf8741 100644
--- a/testautomation/graphics/optional/includes/global/g_clipexport.inc
+++ b/testautomation/graphics/optional/includes/global/g_clipexport.inc
@@ -165,87 +165,138 @@ global Text5 as string
global Text6 as string
global Text7 as string
+'--------------------------- Tests for Writer ----------------------------------
+sub writertest
+
+ try
+ call Make_And_Check_Formatted_Text_Line_From_Application
+ catch
+ warnlog "Something went wrong with testing writertest"
+ endcatch
+
+ try
+ call Make_Rectangle_From_Application
+ call Full_test_Draw
+ call Full_test_Impress
+ call Full_test_Writer
+ call Full_test_Calc
+ catch
+ warnlog "something wrong with testing writertest"
+ endcatch
+end sub ' big one
+
+'---------------------------- Tests for Calc -----------------------------------
+sub calctest
+
+ try
+ call Make_Rectangle_From_Application
+ call Full_test_Draw
+ call Full_test_Impress
+ call Full_test_Writer
+ call Full_test_Calc
+ catch
+ warnlog "something wrong with calctest"
+ endcatch
+ printlog "currently no specific tests from Calc"
+end sub
+
+'-------------------------------------------------------------------------------
+sub tClipboardFromDrawTest
+
+ EnableQAErrors = false
+ FromApp2 = gApplication
+ printlog "gApplication = " + gApplication
+
+ select case( gApplication )
+ case "WRITER" : call writertest()
+ case "CALC" : call calctest()
+ case else : warnlog( "Unsupported gApplication provided: " & gApplication )
+ end select
+
+end sub
+
'------------------------------- "object"-dependant tests ----------------------
-try
- call Make_Rectangle_From_Application
- call Full_test_Draw
- call Full_test_Impress
- call Full_test_Writer
- call Full_test_Calc
-catch
- warnlog "something wrong with testing Rectangle"
-endcatch
-
-try
- call Make_Make3dObject_From_Application
- call Full_test_Draw
- call Small_test_Impress
- call Small_test_Calc
- call Small_test_Writer
-catch
- warnlog "something wrong with testing 3dObject"
-endcatch
-
-'qaerrorlog "Make_CurveObject_From_Application needs an overview - FHA"
-try
- call Make_CurveObject_From_Application
- call Small_test_Draw
- call Small_test_Impress
- call Small_test_Calc
- call Small_test_Writer
-catch
- warnlog "something wrong with testing CurveObj"
-endcatch
-
-try
- call Make_ConnectorObject_From_Application
- call Small_test_Draw
- call Small_test_Impress
- call Small_test_Calc
- call Small_test_Writer
-catch
- warnlog "something wrong with testing ConnectorObject"
-endcatch
-
-try
- call Make_LineObject_From_Application
- call Small_test_Draw
- call Small_test_Impress
- ' call Small_test_Calc
- ' call Small_test_Writer
-catch
- warnlog "something wrong with testing LineObject"
-endcatch
-
-try
-catch
- warnlog "something wrong with testing ConnectorObject"
-endcatch
-
-try
- call Make_Circle_From_Application
- call Small_test_Draw
- call Small_test_Impress
- call Small_test_Calc
- call Small_test_Writer
-catch
- warnlog "something wrong with testing Circle"
-endcatch
-
-try
- call Make_TextSquare_From_Application
- call Small_test_Draw
- call Small_test_Impress
- call Small_test_Calc
- call Small_test_Writer
-
-catch
- warnlog "something wrong with testing TextSquare"
-endcatch
-
-call clear_all_and_close
-Printlog "tClipboardFromDrawTest finished"
+sub g_clipexport
+ try
+ call Make_Rectangle_From_Application
+ call Full_test_Draw
+ call Full_test_Impress
+ call Full_test_Writer
+ call Full_test_Calc
+ catch
+ warnlog "something wrong with testing Rectangle"
+ endcatch
+
+ try
+ call Make_Make3dObject_From_Application
+ call Full_test_Draw
+ call Small_test_Impress
+ call Small_test_Calc
+ call Small_test_Writer
+ catch
+ warnlog "something wrong with testing 3dObject"
+ endcatch
+
+ 'qaerrorlog "Make_CurveObject_From_Application needs an overview - FHA"
+ try
+ call Make_CurveObject_From_Application
+ call Small_test_Draw
+ call Small_test_Impress
+ call Small_test_Calc
+ call Small_test_Writer
+ catch
+ warnlog "something wrong with testing CurveObj"
+ endcatch
+
+ try
+ call Make_ConnectorObject_From_Application
+ call Small_test_Draw
+ call Small_test_Impress
+ call Small_test_Calc
+ call Small_test_Writer
+ catch
+ warnlog "something wrong with testing ConnectorObject"
+ endcatch
+
+ try
+ call Make_LineObject_From_Application
+ call Small_test_Draw
+ call Small_test_Impress
+ ' call Small_test_Calc
+ ' call Small_test_Writer
+ catch
+ warnlog "something wrong with testing LineObject"
+ endcatch
+
+ try
+ catch
+ warnlog "something wrong with testing ConnectorObject"
+ endcatch
+
+ try
+ call Make_Circle_From_Application
+ call Small_test_Draw
+ call Small_test_Impress
+ call Small_test_Calc
+ call Small_test_Writer
+ catch
+ warnlog "something wrong with testing Circle"
+ endcatch
+
+ try
+ call Make_TextSquare_From_Application
+ call Small_test_Draw
+ call Small_test_Impress
+ call Small_test_Calc
+ call Small_test_Writer
+
+ catch
+ warnlog "something wrong with testing TextSquare"
+ endcatch
+
+ call clear_all_and_close
+ Printlog "tClipboardFromDrawTest finished"
end sub
diff --git a/testautomation/graphics/optional/includes/global/g_clipexport2.inc b/testautomation/graphics/optional/includes/global/g_clipexport2.inc
index fae2cdcc7820..44fb7bbd5070 100644
--- a/testautomation/graphics/optional/includes/global/g_clipexport2.inc
+++ b/testautomation/graphics/optional/includes/global/g_clipexport2.inc
@@ -61,7 +61,7 @@ sub MakeRectangle
end sub
'-------------------------------------------------------------------------------
-sub MakeCircle
+testcase MakeCircle
printlog "Create Circle"
if gApplication = "WRITER" then
@@ -81,10 +81,10 @@ sub MakeCircle
gMouseUp (30,30)
sleep 1
-end sub
+endcase
'-------------------------------------------------------------------------------
-sub Make3dObject
+testcase Make3dObject
printlog "Create 3dObject"
if (Ucase(gApplication) = "CALC") then
@@ -158,10 +158,10 @@ sub Make3dObject
endif
end if
-end sub
+endcase
'-------------------------------------------------------------------------------
-sub MakeCurveObject
+testcase MakeCurveObject
if (Ucase(gApplication) = "WRITER") then
warnlog "Cant make circle in this application"
@@ -195,10 +195,10 @@ sub MakeCurveObject
hMenuItemUnCheck (7)
sleep 1
-end sub
+endcase
'-------------------------------------------------------------------------------
-sub MakeLineObject
+testcase MakeLineObject
if gApplication = "WRITER" then
warnlog "Currently no support for line-object in this application"
@@ -224,10 +224,10 @@ sub MakeLineObject
Kontext "Arrowshapes"
Arrowshapes.Close
-end sub
+endcase
'-------------------------------------------------------------------------------
-sub MakeConnectorObject
+testcase MakeConnectorObject
if gApplication = "WRITER" then
warnlog "Cant make connector in this application"
@@ -268,7 +268,7 @@ sub MakeConnectorObject
gMouseUp (30,37)
end if
-end sub
+endcase
'-------------------------------------------------------------------------------
sub MakeFormattedTextLine
diff --git a/testautomation/graphics/optional/includes/global/g_clipexport3.inc b/testautomation/graphics/optional/includes/global/g_clipexport3.inc
index 5a6e86ac2a9c..63eb77cd6134 100644
--- a/testautomation/graphics/optional/includes/global/g_clipexport3.inc
+++ b/testautomation/graphics/optional/includes/global/g_clipexport3.inc
@@ -412,7 +412,7 @@ sub Check_Text_Formatting
SetKontextApplication
printlog " Check_Text_Formatting Ends"
-
+end suB
'----------------------------------------------------------------------------------------------------
sub Check_Colors_Borders_Attributes
@@ -558,26 +558,10 @@ sub Check_Colors_Borders_Attributes
ColorModel = Farbmodell.GetSelText
printlog " " + ColorModel
- select case iSprache ' Prepared for future language-problematics.
- if ColorR <> R.GetText then Warnlog "Wrong R-Color. Should be: " + ColorR + " but was: " + R.GetText
- if ColorG <> G.GetText then Warnlog "Wrong V-Color. Should be: " + ColorG + " but was: " + G.GetText
- if ColorB <> B.GetText then Warnlog "Wrong B-Color. Should be: " + ColorB + " but was: " + B.GetText
- Else
if ColorC <> C.GetText then Warnlog "Wrong C-Color. Should be: " + ColorC + " but was: " + C.GetText
if ColorM <> M.GetText then Warnlog "Wrong M-Color. Should be: " + ColorM + " but was: " + M.GetText
if ColorY <> Y.GetText then Warnlog "Wrong J-Color. Should be: " + ColorY + " but was: " + Y.GetText
if ColorK <> K.GetText then Warnlog "Wrong N-Color. Should be: " + ColorK + " but was: " + K.GetText
- End if
- if ColorR <> R.GetText then Warnlog "Wrong R-Color. Should be: " + ColorR + " but was: " + R.GetText
- if ColorG <> G.GetText then Warnlog "Wrong G-Color. Should be: " + ColorG + " but was: " + G.GetText
- if ColorB <> B.GetText then Warnlog "Wrong B-Color. Should be: " + ColorB + " but was: " + B.GetText
- Else
- if ColorC <> C.GetText then Warnlog "Wrong C-Color. Should be: " + ColorC + " but was: " + C.GetText
- if ColorM <> M.GetText then Warnlog "Wrong M-Color. Should be: " + ColorM + " but was: " + M.GetText
- if ColorY <> Y.GetText then Warnlog "Wrong Y-Color. Should be: " + ColorY + " but was: " + Y.GetText
- if ColorK <> K.GetText then Warnlog "Wrong K-Color. Should be: " + ColorK + " but was: " + K.GetText
- End if
- end select
Kontext
Active.setpage TabFarbverlaeufe
@@ -624,7 +608,8 @@ sub Check_Colors_Borders_Attributes
Printlog "End of one application"
- '---------------------------------- Set the Kontext to the current Application ----------------------------------'
+end sub
+ '---------------------------------- Set the Kontext to the current Application ----------------------------------'
sub SetKontextApplication
sleep 1
@@ -698,7 +683,7 @@ sub New_Writer
end sub
'-------------------------------------------------------------------------------
-sub Choose_Toapplication
+testcase Choose_Toapplication
For ToAppCounter = 1 to 4
@@ -724,6 +709,6 @@ sub Choose_Toapplication
Call hNewDocument
SetKontextApplication
-end sub
+endcase
'--------------------------------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/global/g_edit.inc b/testautomation/graphics/optional/includes/global/g_edit.inc
index 869e6730cf0d..fdff948d0bfb 100644
--- a/testautomation/graphics/optional/includes/global/g_edit.inc
+++ b/testautomation/graphics/optional/includes/global/g_edit.inc
@@ -258,6 +258,7 @@ testcase tEditObjectEdit
else
Call hNewDocument
+ call sSelectEmptyLayout
sleep 1 '/// new document ///'
InsertObjectOLEObject '/// insert writer ole object ///'
Kontext "OLEObjektEinfuegen"
diff --git a/testautomation/graphics/optional/includes/global/g_spellcheck.inc b/testautomation/graphics/optional/includes/global/g_spellcheck.inc
index 74f6177287ef..7f0993d09df5 100644
--- a/testautomation/graphics/optional/includes/global/g_spellcheck.inc
+++ b/testautomation/graphics/optional/includes/global/g_spellcheck.inc
@@ -29,398 +29,210 @@
'*
'* short description :
'*
-'*******************************************************************
-'*
-' #1 tiToolsSpellcheckCorrect
-' #1 tiToolsSpellcheckError
-' #1 tiToolsSpellcheckCheck
-' #1 tToolsSpellcheckAutoSpellcheck
-'*
'\*******************************************************************
-testcase tiToolsSpellcheckCorrect
- if iSprache = 48 then
- qaerrorlog "This test is not adapted for polish, 48."
- got endsub
+testcase tiToolsSpellcheckCheck_AlwaysIgnore
+
+ Dim sExt as string
+
+ Dim sWrongWord as String
+ Dim sRightWord as string
+
+ dim aWords(2) as string
+ aWords() = getWordsForLanguage()
+
+ sWrongWord = aWords(0)
+ sRightWord = aWords(1)
+
+ if(sWrongWord = "" OR sRightWord = "") then ' if any word is empty then the test should stop
+ qaerrorlog "no spellcheck test for the langauges " + iSprache + " available."
+ goto endsub
endif
- Dim DieDatei as String
- dim lFiles(100) as string
- dim i as integer
- dim iFiles as integer
-
- lFiles(0)=0
- Printlog "- Checking Dictionary-Files" ' borrowed from w_106.inc
- select case iSprache
- case 01 : DieDatei = "01-44-hyph.dat"
- case else : DieDatei = "" & iSprache & "-hyph.dat"
- end select
- DieDatei = Convertpath(gNetzOfficePath + "share\dict\" + DieDatei)
- if gPlatGroup <> "unx" then
- if (Dir(DieDatei) = "") then
- if bAsianLan then
- printlog "Dictionary not found : " + DieDatei + ", but is AsianLan, so OK :-)"
- else
- if gNetzInst then
- printlog "Dictionary not found : " + DieDatei
- else
- warnlog "Dictionary not found : " + DieDatei
- end if
- end if
- else
- Printlog " Dictionary has been installed : " + DieDatei
- end if
- end if
- iFiles = GetFileList (Convertpath (gNetzOfficePath + "share\dict\"), "*.dat" ,lFiles())
- for i = 1 to iFiles
- printlog " " + i + ": " + DateiExtract(lFiles(i))
- next i
+ delete_word_from_dictionary(sWrongWord,"IgnoreAllList")
- Call hNewDocument
- ' sleep 2
- ToolsSpellcheck
- Kontext "Active"
- if Active.Exists(5) then
- try
- printlog "Message: Finished: Want to continue at the beginning? '" + active.gettext + "'"
- Active.No
- catch
- Warnlog "The Active-dialoge didn't have a No-button, tries with OK instead."
- Active.Ok
- endcatch
+ if Ucase(gApplication) = "DRAW" then
+ sExt = ".odg"
else
- Warnlog "No 'Spellcheck finished, do you wish to continue?' message appeared"
- end if
- sleep 2
+ sExt = ".odp"
+ endif
- PrintLog "- Spellcheck with correct text"
- select case iSprache
- case 01 : hTextrahmenErstellen ("This is a text without any error.<Return>",10,10,50,20)
- case 33 : hTextrahmenErstellen ("Il nous faut donc un de temps pour examiner avec soin tous les dossiers.<Return>",10,10,70,20)
- case 34 : hTextrahmenErstellen ("Este es un chico muy importante.",10,10,50,20)
- case 36 : hTextrahmenErstellen ("akit a b�r�s�g vagy a szab�lys�rt�si hat�s�g a eltiltott",10,10,70,20)
- case 39 : hTextrahmenErstellen ("La ringraziamo per l'interesse mostrato a collaborare con la firma.<Return>",10,10,70,20)
- case 46 : hTextrahmenErstellen ("Det varierar vad som behandlas och ur vilket perspektiv.<Return>",10,10,50,20)
- case 49 : hTextrahmenErstellen ("Dies ist ein Text ohne Fehler.<Return>",10,10,50,20)
- case 55 : hTextrahmenErstellen ("Esta poderia ser a resposta para suas preces?<Return>",10,10,50,20)
- case else :
- if bAsianLan then
- printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-) will use english instaed"
- ' there was smth wrong, try to find out :
- kontext
- if active.exists then
- printlog "ERROR: active: '"+active.gettext+"'"
- active.ok
- end if
- hTextrahmenErstellen ("This is a text without any error.<Return>",10,10,50,20)
- else
- Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here"
- hTextrahmenErstellen ("This is a text without any error.<Return>",10,10,50,20)
- end if
- end select
- ToolsSpellcheck
- WaitSlot (2000)
- Kontext "Active"
- if active.exists(5) then
- printlog "Message: spellchecking has finished?: '" + active.gettext + "'"
- Active.OK
+ Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_"+iSprache+sExt)
+ call fMakeDocumentWritable()
+
+ sleep(1)
+
+ ' Perform the test now:
+ printlog "Call Tools->Spellcheck"
+ ToolsSpellcheck
+ sleep(2)
+ Kontext "Spellcheck"
+ printlog "Click button 'Always ignore' on dialog."
+ IgnoreAll.Click
+ Sleep 2
+
+ ToolsOptions
+ printlog "Select in category 'Languagesettings' entry 'Writing Aids.'"
+ hToolsOptions ("LANGUAGESETTINGS","WRITINGAIDS")
+
+ fSelectWithString(Benutzerwoerterbuch,"IgnoreAllList")
+
+ Bearbeiten.Click
+
+ Kontext "BenutzerwoerterbuchBearbeiten"
+ if(Inhalt.getText <> sWrongWord) then
+ warnlog " added word is not in dictionary: '" + Buch.getSelText + "'"
else
- errorLog "Spellcheck started :"
- Kontext "Spellcheck"
- if Spellcheck.exists then
- errorlog " - spellcheck came up and will be closed now"
- Spellcheck.Close
- else
- printlog "spellcheck didn't come up"
- end if
+ printlog " added word is in dictionary: '" + Buch.getSelText + "'"
end if
- WaitSlot (2000)
+
+ printlog "Close dialog 'Edit Custom Dictionary'."
+ BenutzerwoerterbuchBearbeiten.Close
+ Kontext "ExtrasOptionenDlg"
+ printlog "Close the Option dialog."
+ ExtrasOptionenDlg.OK
+
+ printlog "Close document"
Call hCloseDocument
-endcase 'tiToolsSpellcheckCorrect
-'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-testcase tiToolsSpellcheckError
- if iSprache = 48 then
- qaerrorlog "This test is not adapted for polish, 48."
- got endsub
- endif
- Dim Fehler$
- Dim Sprachenname$
- Dim Dummy$
- Dim FehlerText$
- Dim i as integer
-
- printlog "New document"
- Call hNewDocument
- printlog "Selecting language case: " & iSprache
- select case iSprache
- case 01 : FehlerText$ = "Thatt is a failure test." : Fehler$ = "Thatt" : Sprachenname$ = "English (US)"
- case 34 : FehlerText$ = "Ezte es un chico muy importante." : Fehler$ = "Ezte" : Sprachenname$ = "Niederlaendisch"
- case 33 : FehlerText$ = "Ler nous faut donc un de temps pour examiner." : Fehler$ = "Ler" : Sprachenname$ = "Franzoesisch"
- case 36 : FehlerText$ = "Boszniai americkai kontingens háromnegyedesek – mintegy négyezer katona – magyarországi telepítése egy éven belül megtörténhet" : Fehler$ = "tellepítésel" : Sprachenname$ = "Ungarisch"
- case 39 : FehlerText$ = "Ringrarziamo per l'interessa mostrato a collaborare con la firma." : Fehler$ = "Ringrarziamo" : Sprachenname$ = "Italienisch"
- case 46 : FehlerText$ = "Detd varierar vad som behandlas och ur vilket perspektiv." : Fehler$ = "Detd" : Sprachenname$ = "Schwedisch"
- case 49 : FehlerText$ = "Diees ist ein Fehler." : Fehler$ = "Diees" : Sprachenname$ = "Deutsch"
- case 55 : FehlerText$ = "Eesta poderia ser a resposta para suas preces?": Fehler$ = "Eesta" : Sprachenname$ = "Portugiesisch"
- case else :
- if bAsianLan then
- printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-) using english"
- FehlerText$ = "Thatt is a failure test."
- Fehler$ = "Thatt"
- Sprachenname$ = "English (US)"
- call hSetSpellHypLanguage
- else
- Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here"
- end if
- end select
- printlog "Error Text taken for testing is: " & FehlerText$
- sleep 2
+ ' remove the word again from the dictionary
+ delete_word_from_dictionary(sWrongWord,"IgnoreAllList")
+
+endcase 'tiToolsSpellcheckCheck
+'-------------------------------------------------------------------------------
+testcase tiToolsSpellcheckCheck_Change
- printlog "Delete ignore word list"
- if (not wIgnorierenlisteLoeschen) then
- qaErrorLog "Can't get into Dictionary lists"
+ Dim sExt as string
+ Dim sWrongWord as String
+ Dim sRightWord as string
+
+ dim aWords(2) as string
+ aWords() = getWordsForLanguage()
+
+ sWrongWord = aWords(0)
+ sRightWord = aWords(1)
+
+ if(sWrongWord = "" OR sRightWord = "") then ' if any word is empty then the test should stop
+ qaerrorlog "no spellcheck test for the langauges " + iSprache + " available."
goto endsub
- end if
- printlog "Setting doc language to english"
- ToolsOptions
- Kontext "ExtrasOptionenDlg"
- hToolsOptions("LANGUAGESETTINGS","Languages")
- Westlich.Select 34
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- printlog "Create 1 textbox with 1 spelling error (test replace always)"
- hTextrahmenErstellen (FehlerText$,30,30,90,40)
+ endif
+
+ if Ucase(gApplication) = "DRAW" then
+ sExt = ".odg"
+ else
+ sExt = ".odp"
+ endif
+
+ Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_"+iSprache+sExt)
+
+ call fMakeDocumentWritable
- hTypeKeys "<HOME>"
- printlog "Call 'Tools->Spellcheck->Check'"
+ ' Perform the test now:
+ printlog "Call Tools->Spellcheck"
ToolsSpellcheck
- printlog "Spellcheck dialog has to come up, wrong word is selected."
+ sleep(2)
Kontext "Spellcheck"
- if Spellcheck.Exists then
- printlog "There has to be at least ONE suggestion."
- if (Suggestions.GetItemCount < 1) then
- printlog "If no suggestion avilable:"
- warnlog " - no suggestion for the language: "+DictionaryLanguage.GetSelIndex+" '"+DictionaryLanguage.GetSelText+"' , press check button..."
- printlog "+ press button 'Check word'"
- Pruefen.click
- if (Suggestions.GetItemCount < 1) then
- warnlog " STILL no suggestions :-( errors will follow "
- else
- printlog " - now suggestion for the language: "+DictionaryLanguage.GetSelIndex+" '"+DictionaryLanguage.GetSelText+"'" + Suggestions.GetItemCount
- end if
- end if
- Dummy$=Suggestions.GetItemText (1)
- printlog "Select first spellcheck suggestion (click it!)."
- Suggestions.Select (1)
- printlog "Check if textfield 'word' has changed to selected word."
- if (Suggestions.GetSelText <> Dummy$) Then
- Warnlog "Suggestion not used"
- else
- Printlog "Suggestion is used"
- end if
- sleep 1
- kontext "Spellcheck"
- printlog "click button 'Always replace'"
- ChangeAll.Click
- printlog "spellcheck dialog has to disappear and"
- printlog "There has to come up only one active: 'Spellcheck of entire document has been completed [OK]'"
- Kontext "Active"
- if Active.Exists(5) then
- Printlog "Message: Spellchecking has finished?: '" + active.gettext + "'"
- Active.OK
- else
- Printlog "'Change All' seems to have worked correctly."
- Kontext "Spellcheck"
- Spellcheck.Close
- Kontext "Active"
- if active.exists(5) then
- Printlog "Spellcheck dialog closed'" + active.gettext + "'"
- Active.OK
- else
- Printlog "Spellcheck dialog closed'"
- end if
- end if
+ printlog "Click button 'Change' on dialog."
+ Change.Click
+ sleep(10)
+ SpellcheckClose.click
+
+ if Ucase(gApplication) = "DRAW" then
+ Kontext "DocumentDraw"
+ DocumentDraw.TypeKeys("<TAB>",true)
+ DocumentDraw.TypeKeys("<SPACE>",true)
else
- Warnlog " Error not recognized by the Spellchecker"
- if active.exists(5) then
- Kontext "Active"
- printlog "Message: spellchecking has finished?: '" + active.gettext + "'"
- Active.OK
- end if
- end if
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys("<TAB>",true)
+ DocumentImpress.TypeKeys("<SPACE>",true)
+ endif
- printlog "delete textbox"
EditSelectAll
- hTypeKeys "<DELETE>"
- sleep 1
+ EditCopy
+
+ dim s as string
+ s = getClipBoard()
- printlog "Create same textbox again (test IGNORE function)."
- Printlog "Check function Ignore"
- hTextrahmenErstellen (FehlerText$,30,30,80,40)
- printlog "All 'Tools->Spellcheck->Check'."
-
- 'printlog "Setting Text to english"
- 'sleep 1
- 'EditSelectAll
- 'FormatCharacter
- 'sleep 1
- 'Kontext
- 'Messagebox.SetPage TabFont
- 'Kontext "TabFont"
- 'Language.Select 41
- 'TabFont.OK
+ printlog s
- ToolsSpellcheck
- Kontext "Spellcheck"
- printlog "press button 'Ignore'"
- IgnoreOnce.Click
- printlog "spellcheck dialog has to disappear and "
- printlog " There has to come up only one active: 'Spellcheck of entire document has been completed [OK]'."
- Kontext "Active"
- if Active.Exists(5) Then
- Printlog " Spellcheck ended because of only 1 defined error. And Ignore worked.'" + active.gettext + "'"
- Active.OK
+ if(Instr(s,sWrongWord) <> 0) then
+ warnlog "word not changed. '" + s + "' contains still wrong word '" + sWrongWord + "'"
else
- Printlog " 'Ignore Once' seems to work correctly."
- Kontext "Spellcheck"
- Spellcheck.Close
- Kontext "Active"
- if active.exists(5) then
- Printlog " Spellcheck dialog closed'" + active.gettext + "'"
- Active.OK
- else
- Printlog " Spellcheck dialog closed'"
- end if
- end if
+ printlog "word changed."
+ endif
- printlog "Call 'Tools->Spellcheck->Check."
- ToolsSpellcheck
- Kontext "Spellcheck"
- if Spellcheck.Exists Then
- Printlog " Ignore worked"
- Spellcheck.Close
- Kontext "Active"
- if active.exists(5) then
- Printlog " " + active.gettext + "'"
- Active.OK
- else
- Printlog " Spellcheck dialog closed'"
- end if
+ if(Instr(s,sRightWord) <> 0) then
+ printlog "word changed."
else
- Warnlog " Spellcheck ended even we only ignored the error"
- end if
+ warnlog "word not changed."
+ endif
+
+ printlog "Close document"
+ Call hCloseDocument
- printlog "delete textbox."
- EditSelectAll
- hTypeKeys "<DELETE>"
- sleep 1
+endcase
+'-------------------------------------------------------------------------------
+testcase tiToolsSpellcheckCheck_ChangeAll
+
+
+
+ Dim sExt as string
+ Dim sRightWord as String
+ Dim sWrongWord as string
+
+ dim aWords(2) as string
+ aWords() = getWordsForLanguage()
+
+ sWrongWord = aWords(0)
+ sRightWord = aWords(1)
+
+ if(sWrongWord = "" OR sRightWord = "") then ' if any word is empty then the test should stop
+ qaerrorlog "no spellcheck test for the langauges " + iSprache + " available."
+ goto endsub
+ endif
+
+ 'delete_word_from_dictionary(sWord,"IgnoreListAll")
+
+ if Ucase(gApplication) = "DRAW" then
+ sExt = ".odg"
+ else
+ sExt = ".odp"
+ endif
+
+ Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_"+iSprache+sExt)
+
+ call fMakeDocumentWritable()
- printlog "create same textbox again (test ALWAYS IGNORE function)."
- hTextrahmenErstellen (FehlerText$,30,30,60,40)
-
- 'printlog "Setting Text to english"
- 'sleep 1
- 'EditSelectAll
- 'FormatCharacter
- 'sleep 1
- 'Kontext
- 'Messagebox.SetPage TabFont
- 'Kontext "TabFont"
- 'Language.Select 41
- 'TabFont.OK
-
- printlog "Call 'Tools->Spellcheck->Check'."
+ ' Perform the test now:
+ printlog "Call Tools->Spellcheck"
ToolsSpellcheck
+ sleep(2)
Kontext "Spellcheck"
- printlog "click button 'Always Ignore."
- IgnoreAll.Click
- printlog "spellcheck dialog has to disappear and"
- printlog "There has to come up only one active: 'Spellcheck of entire document has been completed [OK]'."
- Kontext "Active"
- if active.exists(5) then
- Printlog " Spellcheck ended because of only 1 defined error. And Ignore worked.'" + active.gettext + "'"
- Active.OK
- else
- Printlog " 'Ignore All' seems to work."
- Kontext "Spellcheck"
- Spellcheck.Close
- Kontext "Active"
- if active.exists(5) then
- Printlog " Spellcheck dialog closed'" + active.gettext + "'"
- Active.OK
- else
- Printlog " Spellcheck dialog closed'"
- end if
- end if
+ printlog "Click button 'Change' on dialog."
+ ChangeAll.Click
+ 'TODO: check result beware of issue 110688
+ Sleep 2
- Printlog "- Delete ignore list"
- sleep 1
- printlog "Delete ignore word list."
- if (not wIgnorierenlisteLoeschen) then
- qaErrorLog "Can't get into Dictionary lists"
- goto endsub
- end if
+ SpellCheckClose.click
+
+ printlog "Close document"
Call hCloseDocument
-endcase 'tiToolsSpellcheckError
-'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-testcase tiToolsSpellcheckCheck
- if iSprache = 48 then
- qaerrorlog "This test is not adapted for polish, 48."
- got endsub
- endif
- Dim Datei$
- Dim sWord(2) as string
- Dim i as integer
- Dim j as integer
- Dim s as integer
- Dim AlleBuecher as integer
- Dim sExt as string
- Dim sWordOne as string
- Dim sWordTwo as string
- Dim iBooks as integer
- Dim bWordFound(2) as boolean
- Dim iSuggestions as integer
- Dim iWord(2) as integer
- Dim bFound as boolean
-
- Select Case Ucase(gApplication)
- case "DRAW" : sExt = ".odg"
- case "IMPRESS" : sExt = ".odp"
- end select
+endcase
- printlog "Load prepared document containing 4 errors : graphics\\required\\input\\recht_" & iSprache & sExt
- if (not bAsianLan) then
- printlog "Check if the document is writable."
- Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_"+iSprache+sExt)
- else
- Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_1"+sExt)
- end if
- if fIsDocumentWritable = false then
- printlog "Make the document writable and check if it's succesfull."
- if fMakeDocumentWritable = false then
- warnlog "The document can't be make writeable. Test stopped."
- goto endsub
- end if
- end if
- select case iSprache ' sWord(1)=red : sWord(2)=turquoise
- case 01 : sWord(1) = "documente" : sWord(2) = "expriss"
- case 33 : sWord(1) = "intercu" : sWord(2) = "Lees"
- case 34 : sWord(1) = "afekto" : sWord(2) = "fratternal"
- case 36 : sWord(1) = "szeerint" : sWord(2) = "tervvezi"
- case 39 : sWord(1) = "Millano" : sWord(2) = "tarrget"
- case 46 : sWord(1) = "desa" : sWord(2) = "occh"
- case 49 : sWord(1) = "Texxt" : sWord(2) = "reichtt"
- case 55 : sWord(1) = "esktava" : sWord(2) = "noitee"
- case else :
- if bAsianLan then
- sWord(1) = "documente" : sWord(2) = "expriss"
- else
- Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create the file"
- end if
- end select
- sleep 2
- Printlog "Delete all added words from dictionaries."
+
+
+
+'-------------------------------------------------------------------------------
+function delete_all_added_words(aWords)
+
+ '/// this function delete the words in sWords in all user dictionaries
+
+ Dim iBookCounter as integer
+ Dim iWordCounter as integer
+ Dim iBooks as integer
+
+ Printlog "Delete the given words from dictionaries."
printlog "Call Tools->Options."
ToolsOptions
printlog "Select in category 'Languagesettings' entry 'Writing Aids.'"
@@ -428,487 +240,138 @@ testcase tiToolsSpellcheckCheck
sleep 1
Kontext "WRITINGAIDS"
sleep 1
- printlog "Click on button 'edit' in section 'User-defined dictionaries.'"
- if (fGetIntoDictionary) then
- qaErrorLog "wTSC"
- goto endsub
- end if
+ printlog "select the first User-defined dictionaries and click EDIT"
+ Benutzerwoerterbuch.select 1
+ Bearbeiten.Click
+
Kontext "BenutzerwoerterbuchBearbeiten"
sleep 1
- printlog "Check every book, if it contains the words that will be added in this test."
- iBooks = Buch.getItemCount
- bWordFound(1) = false
- bWordFound(2) = false
- for i = 1 to iBooks
- Buch.select(i)
+ printlog "Check every book, if it contains the words."
+ iBooks = Buch.getItemCount
+ for iBookCounter = 1 to iBooks
+ Buch.select(iBookCounter)
printlog "Items in Booklist: " & WordList.getItemCount
- for j = 1 to 2
- Wort.setText sWord(j)
+ for iWordCounter = 1 to uBound(aWords)
+ Wort.setText aWords(iWordCounter)
sleep 1
if ((not neu.isEnabled) and Loeschen.isEnabled) then
printlog "If it contains the word, press button 'delete'."
Loeschen.click
- bWordFound(j) = true
- printlog "Added word WAS in dictionary: '" + Buch.getSelText + "' - '" + sWord(j) + "'"
+ printlog "Added word WAS in dictionary: '" + Buch.getSelText + "' - '" + aWords(iWordCounter) + "'"
end if
- next j
- next i
- if (bWordFound(1) OR bWordFound(2))then
- qaErrorLog "Word was found in dictionary - check why it was there. '" + sWord(1) + "': " + bWordFound(1) + " '" + sWord(2) + "': " + bWordFound(2)
- end if
+ next iWordCounter
+ next iBookCounter
printlog "Close dialog 'Edit Custom Dictionary.'"
BenutzerwoerterbuchBearbeiten.Close
sleep 1
Kontext "ExtrasOptionenDlg"
printlog "Press button 'OK' on dialog 'Writing Aids'."
ExtrasOptionenDlg.OK
- printlog "Call dialog again and delete all remaining words from dictionary 'IgnoreAllList'."
- if (not wIgnorierenlisteLoeschen) then
- qaErrorLog "Can't get into Dictionary lists"
- goto endsub
- end if
-
- printlog "Test if spellcheck dialog comes up and check/set direction of spellcheck."
- printlog "Call 'Tools->Spellcheck->Check'."
- ToolsSpellcheck
- Kontext "Spellcheck"
- WaitSlot (1000)
- printlog "If no dictionary for the language is available, a messagebox comes up:"
- printlog ". . . 'Error executing the spellcheck.: Language is not supported by spellchecker funtion."
- kontext "active"
- if active.exists(5) then
- warnlog "$Language is not supported by spellchecker funtion: '" + active.gettext + "'"
- Active.OK
- printlog ". . . exiting testcase."
- goto endsub
- end if
- Kontext "Spellcheck"
- printlog "Close dialog 'Spellcheck'."
- Spellcheck.Close
- Kontext "Active"
- if active.exists(5) then
- Warnlog " Should not be any message here: " + active.gettext + "'"
- Active.OK
- else
- printlog "Spellcheck ended, dialog closed"
- end if
- printlog "Select all."
- hTypeKeys "<MOD1 A>"
- printlog "Check presupposition: 12 Words have to be complained about."
- printlog "All 'Tools->Spellcheck->Check'."
- ToolsSpellcheck
- WaitSlot (2000)
- Kontext "Spellcheck"
- printlog "Click button 'Ignore' 12 times."
-
- for i = 1 to 11
- Kontext "Spellcheck"
- IgnoreOnce.Click
- Kontext "Active"
- if active.exists(5) then
- warnlog "Presupposition not met: there are less than 12 errors in the document! " + i
- Active.OK
- printlog "If errors < 12 -> exiting testcase."
- goto endsub
- end if
- next i
- Kontext "Spellcheck"
- IgnoreOnce.Click
- printlog "Spellcheck dialog has to disapear and messagebox with OK has to come up."
- Kontext "Active"
- if active.exists(5) then
- printlog "Active dialog said: " + active.gettext + "'"
- Active.OK
- end if
- Kontext "Spellcheck"
- if Spellcheck.Exists(5) then
- warnlog "Presupposition not met: there are more than 12 errors in the document!"
- Spellcheck.Close
- kontext "Active"
- if active.exists(5) then
- Active.OK
- else
- printlog "bug fixed #111972# "
- end if
- printlog "If errors > 12 -> exiting testcase."
- goto endsub
- else
- Kontext "Active"
- if active.exists(5) then
- warnlog "There was a Message where none was supposed to be: '" + active.gettext + "'"
- Active.NO
- end if
- printlog "Presupposition met: there are 12 errors in the document!"
- end if
-
- printlog "Perform the test now:"
- printlog "Call 'Tools->Spellcheck->Check'"
- ToolsSpellcheck
- WaitSlot (2000)
- Kontext "Spellcheck"
- Printlog "----------------------------------------------------------------------------"
- Printlog "1st Test: - Ignore now"
- printlog "1st error: ignore : 1st pink word in 1st Paragraph."
- printlog "Backwards: last green word in 3rd Paragraph."
- sWordOne = Suggestions.GetSelText
- printlog "********* Suggestion word found: '" + sWordOne + "'"
- printlog "##### suggestions: "+Suggestions.GetItemCount+"; Language: "+DictionaryLanguage.getSelText '+" ; dictionary: "+woerterbuch.getSelText
- if (Suggestions.GetItemCount > 0) then
- printlog "----- "+i+": "+Suggestions.GetSelText (1)
- end if
- printlog "Click button 'Ignore'."
- IgnoreOnce.Click
- Sleep 2
-
- Printlog "----------------------------------------------------------------------------"
- Printlog "2nd Test: - Add"
- printlog "2nd error: add : 1st red word in 1st Paragraph -> hasn't to show up anymore from now on."
- printlog "Backwards: last turquoise word in 3rd Paragraph -> hasn't to show up anymore from now on."
- printlog "Check if word in textfield 'Word' changed."
- printlog "(Check if it is the expected next error - you have to look into the source code for the right word!)."
- sWordTwo = Suggestions.GetSelText
- if (sWordOne = sWordTwo) then
- warnlog "Ignore didn't work? Spellcheck didn't go on"
- end if
- if (sWord(iWord(1)) <> sWordTwo) then
- Printlog "The errornous word '" + sWord(iWord(1)) + "' would be replaced with: '" + sWordTwo + "'"
- end if
- printlog "********* word found: '" + sWordTwo + "'"
- printlog "##### suggestions: "+Suggestions.GetItemCount+"; Language: "+DictionaryLanguage.getSelText ' +" ; dictionary: "+woerterbuch.getSelText
- if (Suggestions.GetItemCount > 0) then
- printlog "----- "+i+": "+Suggestions.GetSelText (1)
- end if
- Sleep 1
- printlog "Click button 'Add' on dialog '"
- AddToDictionary.Click
- Sleep 2
- printlog "The menu has: " + MenuGetItemCount + " entries."
- hMenuSelectNr(1) 'Default
- Kontext "Active"
- if Active.Exists(5) Then
- Warnlog " - Word could not be added to dictionary: '" + active.getText + "'"
- Active.OK
- Sleep 1
- end if
- printlog "Check in options, if word exists in word list."
- printlog "Click button 'Options' on dialog 'Spellcheck'."
- Kontext "Spellcheck"
- SpellcheckOptions.Click
- Kontext "TabLinguistik"
- printlog "Click button 'Edit ...' on dialog 'Writing Aids' in section 'User-defined dictionaries'."
- if TabLinguistik.exists(5) then
- sleep 3
- if (fGetIntoDictionary) then
- qaErrorLog "wTSC"
- goto endsub
- end if
- else
- qaerrorlog "baeh"
- end if
- Kontext "BenutzerwoerterbuchBearbeiten"
- printlog "Check every book, if it contains the added word."
- if not BenutzerwoerterbuchBearbeiten.exists(5) then
- sleep 5
- qaerrorlog "baeh"
- end if
- iBooks = Buch.getItemCount
- bWordFound(1) = false
- for i = 1 to iBooks
- Buch.select(i)
- printlog "Book number selected: " & i
- Wort.setText sWord(iWord(1))
- sleep 1
- if ((not neu.isEnabled) and Loeschen.isEnabled) then
- bWordFound(1) = true
- printlog "Added word is in dictionary: '" + Buch.getSelText + "'"
- end if
- next i
- if (not bWordFound(1)) then
- warnlog "Word was not added to dictionary"
- end if
- printlog "Cancel dialog 'Edit Custom Dictionary'."
- BenutzerwoerterbuchBearbeiten.Close
- Kontext "TabLinguistik"
- printlog "Cancel dialog 'Writing Aids'."
- TabLinguistik.Close
- Kontext "Spellcheck"
-
- Printlog "----------------------------------------------------------------------------"
- Printlog " 3rd Test: - Always Ignore"
- printlog "3rd error: always ignore : 1st turquoise word in 1st Paragraph -> hasn't to show up anymore from now on."
- printlog "Check if word in textfield 'Word' changed."
- printlog "(check if it is the expected next error - you have to look into the source code for the right word!)"
- sWordOne = sWordTwo
- sWordTwo = Suggestions.GetSelText 'wort.getText
- if (sWordOne = sWordTwo) then
- warnlog "Add didn't work? Spellcheck didn't go on."
- end if
- if (sWord(iWord(2)) <> sWordTwo) then
- Printlog "The erroneous word '" + sWord(iWord(2)) + "' would be replaced with: '" + sWordTwo + "'"
- else
- warnlog "ERROR: SAME WORD in the dictionary as in the text??? Must be wrong."
- end if
- printlog "********* word found: '" + sWordTwo + "'"
- printlog "##### suggestions: "+Suggestions.GetItemCount+"; Language: "+DictionaryLanguage.getSelText ' +" ; dictionary: "+DictionaryLanguage.getSelText 'Wort.GetItemCount 'Woerterbuch.GetSelText
- if (Suggestions.GetItemCount > 0) then 'Wort.GetItemCount > 0) then
- printlog "----- "+i+": "+Suggestions.GetItemText (1) 'Wort.GetItemText (1)
- end if
- Sleep 1
- printlog "Click button 'Always ignore' on dialog."
- IgnoreAll.Click
- Sleep 2
- printlog "Check in options, if word exists in word list."
- printlog "Click button 'Options' on dialog 'Spellcheck'."
- SpellcheckOptions.Click
- Kontext "TabLinguistik"
- printlog "Click button 'Edit ...' on dialog 'Writing Aids' in section 'User-defined dictionaries."
- if TabLinguistik.exists(5) then
- sleep 3 'culprint swedish windows; wait until butrton exists?
- if (fGetIntoDictionary) then
- qaErrorLog "wTSC"
- goto endsub
- end if
- else
- qaerrorlog "baeh"
- end if
- Kontext "BenutzerwoerterbuchBearbeiten"
- if not BenutzerwoerterbuchBearbeiten.exists(5) then
- sleep 3
- qaerrorlog "baeh"
- end if
- printlog "Check every book, if it contains the added word."
- iBooks = Buch.getItemCount
- bWordFound(2) = false
- for i = 1 to iBooks
- Kontext "BenutzerwoerterbuchBearbeiten"
- Buch.select(i)
- Inhalt.setText sWord(iWord(2)) 'Wort.setText sWord(iWord(2))
- sleep 1
- if ((not neu.isEnabled) and Loeschen.isEnabled) then
- bWordFound(2) = true
- printlog " added word is in dictionary: '" + Buch.getSelText + "'"
- end if
- next i
- if (not bWordFound(2)) then
- warnlog "Word was not added to dictionary, #ixxxxxx"
- end if
- printlog "Cancel dialog 'Edit Custom Dictionary'."
- BenutzerwoerterbuchBearbeiten.Close
- Kontext "TabLinguistik"
- printlog "Cancel dialog 'Writing Aids'."
- TabLinguistik.Close
- kontext "Spellcheck"
-
- Printlog "----------------------------------------------------------------------------"
- Printlog "4th test: - Replace"
- printlog "4th error: replace : 1st green word in 1st Paragraph."
- printlog "Check if word in textfield 'Word' changed."
- printlog "(check if it is the expected next error - you have to look into the source code for the right word!)."
- sWordOne = sWordTwo
- sWordTwo = Suggestions.GetSelText
- if (sWordOne = sWordTwo) then
- warnlog "Always ignore didn't work? Spellcheck didn't go on."
- end if
- printlog "********* word found: '" + sWordTwo + "'"
- iSuggestions = Suggestions.GetItemCount
- printlog "##### suggestions: " + iSuggestions + "; Language: "+DictionaryLanguage.getSelText '+"; dictionary: "+woerterbuch.getSelText
- if (Suggestions.GetItemCount > 0) then
- printlog "----- "+i+": "+Suggestions.GetItemText (1)
- end if
- Sleep 1
- printlog "Click button 'Replace'."
- if (iSuggestions > 0) then
- Change.click
- else
- qaerrorlog "Please change the text in the file, so the spellchecker can make a suggestion for the word: '" + sWordTwo + "'"
- IgnoreOnce.Click
- end if
-
- Printlog "----------------------------------------------------------------------------"
- Printlog "5th Test: - Always Replace"
- printlog "5th error: always replace : 1st pink word in 2nd Paragraph -> hasn't to show up anymore from now on."
- printlog "backwards: 1st green word in 2nd Paragraph -> hasn't to show up anymore from now on."
- printlog "check if word in textfield 'Word' changed."
- printlog "(check if it is the expected next error - you have to look into the source code for the right word!)."
- sWordOne = sWordTwo
- sWordTwo = Suggestions.GetSelText
- if (sWordOne = sWordTwo) then
- warnlog "Replace didn't work? Spellcheck didn't go on"
- end if
- printlog "********* word found: '" + sWordTwo + "'"
- iSuggestions = Suggestions.GetItemCount
- printlog "##### suggestions: " + iSuggestions + "; Language: "+DictionaryLanguage.getSelText ' +" ; dictionary: "+woerterbuch.getSelText
- if (Suggestions.GetItemCount > 0) then
- printlog "----- "+i+": "+Suggestions.GetItemText (1)
- end if
- Sleep 1
- printlog "click button 'Always Replace'."
- if (iSuggestions > 0) then
- ChangeAll.click
- else
- qaErrorLog "Please change the text in the file, so the spellchecker can make a suggestion for the word: '" + sWordTwo + "'"
- IgnoreOnce.Click
- end if
+
+end function
+'-------------------------------------------------------------------------------
+function delete_word_from_dictionary(sWord as String, sDictionary as String)
- printlog "2 errors are left: 4th word (green) in 2nd and 3rd paragraph."
- printlog "backwards: 1st word (pink) in 2nd and 1st paragraph."
- Kontext "Spellcheck"
- sWordOne = sWordTwo
- sWordTwo = Suggestions.GetSelText
- if (sWordOne <> sWordTwo) then
- printlog sWordTwo
- else
- warnlog "there is anopther word left, that wasn't expected!. '" + sWordTwo +"'"
- end if
- printlog "Click button 'Ignore' 2 times."
- IgnoreOnce.Click
+ '/// this function delete the words in sWords in all user dictionaries
- Kontext "Spellcheck"
- sWordOne = sWordTwo
- sWordTwo = Suggestions.GetSelText
- if (sWordOne <> sWordTwo) then
- warnlog "there is anopther word left, that wasn't expected!. '" + sWordTwo +"'"
- else
- printlog sWordTwo
- end if
- printlog "Click button 'Ignore' 2 times."
- IgnoreOnce.Click
- Kontext "Active"
- if active.exists(5) then
- printlog "Spellcheck works :-) '" + active.gettext + "'"
- Active.No
- else
- warnlog "Spellcheck didn't work :-(! there are still errors in the document."
- Kontext "Spellcheck"
- Spellcheck.Close
- Kontext "Active"
- if active.exists(5) then
- qaErrorLog " Spellcheck dialog closed'" + active.gettext + "'"
- Active.No
- end if
- end if
- sleep 2
+ Dim iBookCounter as integer
+ Dim iWordCounter as integer
+ Dim iBooks as integer
- Printlog "Delete all added words from dictionaries."
+ Printlog "Delete the given word from dictionaries."
printlog "Call Tools->Options."
ToolsOptions
- printlog "Select in category 'Languagesettings' entry 'Writing Aids'."
+ printlog "Select in category 'Languagesettings' entry 'Writing Aids.'"
hToolsOptions ("LANGUAGESETTINGS","WRITINGAIDS")
sleep 1
Kontext "WRITINGAIDS"
- printlog "Click on button 'edit' in section 'User-defined dictionaries'."
- if (fGetIntoDictionary) then
- qaErrorLog "wTSC"
- goto endsub
- end if
+ sleep 1
+ printlog "select the dictionary and click EDIT"
+
+ fSelectWithString(Benutzerwoerterbuch,sDictionary)
+
+ Bearbeiten.Click
+
Kontext "BenutzerwoerterbuchBearbeiten"
- printlog "Check every book, if it contains the added word."
- iBooks = Buch.getItemCount
- bWordFound(1) = false
- bWordFound(2) = false
- for i = 1 to iBooks
- Buch.select(i)
- for j = 1 to 2
- Wort.setText sWord(j)
- sleep 1
- if ((not neu.isEnabled) and Loeschen.isEnabled) then
- printlog "If it contains the word, press button 'delete'."
- Loeschen.click
- bWordFound(j) = true
- printlog " added word is in dictionary: '" + Buch.getSelText + "' - '" + sWord(j) + "'"
- end if
- next j
- next i
- if ((not bWordFound(1)) AND (not bWordFound(2)))then
- warnlog "Word was not found in dictionary. '" + sWord(1) + "': " + bWordFound(1) + " '" + sWord(2) + "': " + bWordFound(2)
+
+ Wort.setText sWord
+ sleep 1
+ if ((not neu.isEnabled) and Loeschen.isEnabled) then
+ printlog "If it contains the word, press button 'delete'."
+ Loeschen.click
+ printlog "Added word WAS in dictionary: '" + Buch.getSelText + "' - '" + sWord + "'"
end if
- printlog "Close dialog 'Edit Custom Dictionary'."
+
+ printlog "Close dialog 'Edit Custom Dictionary.'"
BenutzerwoerterbuchBearbeiten.Close
sleep 1
Kontext "ExtrasOptionenDlg"
- printlog "press button 'OK' on dialog 'Writing Aids'."
+ printlog "Press button 'OK' on dialog 'Writing Aids'."
ExtrasOptionenDlg.OK
- printlog "Call dialog again and delete all remaining words from dictionary 'IgnoreAllList'."
- if (not wIgnorierenlisteLoeschen) then
- qaErrorLog "Can't get into Dictionary lists"
- goto endsub
- end if
- printlog "Close document"
- Call hCloseDocument
-endcase 'tiToolsSpellcheckCheck
+end function
-'-------------------------------------------------------------------------------
-testcase tToolsSpellcheckAutoSpellcheck
-
- QaErrorLog "#i81928# - outcommented tToolsSpellcheckAutoSpellcheck due to bug."
- goto endsub
- dim i as integer
- dim x as integer
- dim y as integer
- dim q as integer
- dim z as integer
- dim iResult as long
- dim iTemp as long
- dim iTemp2 as long
- dim sTemp as string
- dim sCompare as string
- dim iCompare as long
- dim iError as long
- dim sError as string
-
- call hNewDocument
-
- call hTextrahmenErstellen ("Ein Tipp: Schiffahrt schreibt man nun mit 3f Tunfisch Amboss a", 10, 10, 90, 50)
+function fSelectWithString(oControl as Object,sText as String)
- EditSelectAll
- setCharacterLanguage(glLocale(4))
- sleep 10
- printlog "## check ENGLISH auto spellchecking"
- iError = 0
- ' Get underlined words / wrong recognized words by spellchecker
- iResult = sAnalyseContextMenu(11, iError)
- sTemp = sLongToBinary(iResult, 11)
- sError = sLongToBinary(iError, 11)
- ' reference of words, which should be underlined
- sCompare = "11011001011"
- iCompare = sBinaryToLong(sCompare)
- ' compare result with reference -> get the difference
- iTemp = not (iResult EQV iCompare)
- ' eliminate errors from open bugs -> get the real errors
- iTemp2 = iTemp AND NOT iError
- if (iTemp2 > 0) then
- warnlog "wrong words are not underlined? Should be: " + sCompare
- warnlog "Is: " + sTemp
- warnlog "Differences: " + sLongToBinary(iTemp, 11)
- warnlog "Wrong after merging errors from bugs " + sLongToBinary(iTemp2, 11)
- end if
+ dim iCounter as Integer
+ dim iNumberOfItems as Integer
+ iNumberOfItems = oControl.getItemCount()
- sleep 1
- ' call hTypeKeys "<F2>"
- call hTypeKeys "<mod1 end> <Shift mod1 home>"
- setCharacterLanguage(glLocale(6))
- sleep 10
- printlog "## check GERMAN auto spellchecking"
- iError = 0
- iResult = sAnalyseContextMenu(11, iError)
- sTemp = sLongToBinary(iResult, 11)
- sError = sLongToBinary(iError, 11)
- sCompare = "00010000000"
- iCompare = sBinaryToLong(sCompare)
- ' compare result with reference -> get the difference
- iTemp = not (iResult EQV iCompare)
- ' eliminate errors from open bugs -> get the real errors
- iTemp2 = iTemp AND NOT iError
- if (iTemp2 > 0) then
- warnlog "wrong words are not underlined? Should be: " + sCompare
- warnlog "Is: " + sTemp
- warnlog "Differences: " + sLongToBinary(iTemp, 11)
- warnlog "Wrong after merging errors from bugs " + sLongToBinary(iTemp2, 11)
- end if
- printlog "-----------------------------------"
+ for iCounter = 1 to iNumberOfItems
+ oControl.select iCounter
+ if( Instr(oControl.getSelText,sText) <> 0 ) then ' the correct entry is selected
+ iCounter = iNumberOfItems ' stop the loop
+ endif
+ next
- hCloseDocument()
-endcase 'tToolsSpellcheckAutoSpellcheck
+end function
-'-------------------------------------------------------------------------------
+
+function getWordsForLanguage()
+
+ dim sWrongWord as String
+ dim sRightWord as String
+ dim aWords(2) as String
+
+ select case iSprache
+ case 1 :
+ sWrongWord = "documente"
+ sRightWord = "document"
+ case 31 :
+ sWrongWord = "miejn"
+ sRightWord = "mijn"
+ case 33 :
+ sWrongWord = "projjet"
+ sRightWord = "projet"
+ case 34 :
+ sWrongWord = "lazsos"
+ sRightWord = "lazos"
+ case 36 :
+ sWrongWord = "Bozniai"
+ sRightWord = "Boszniai"
+ case 39 :
+ sWrongWord = "borrdo"
+ sRightWord = "borro"
+ case 46 :
+ sWrongWord = "desa"
+ sRightWord = "edas"
+ case 48 :
+ sWrongWord = "werrsji"
+ sRightWord = "wersji"
+ case 49 :
+ sWrongWord = "Feehlern"
+ sRightWord = "Fehlern"
+ case 55 :
+ sWrongWord = "Elle"
+ sRightWord = "Elze"
+ case else :
+ sWrongWord = ""
+ sRightWord = ""
+ end select
+
+ aWords(0) = sWrongWord
+ aWords(1) = sRightWord
+
+ getWordsForLanguage = aWords
+
+end function
diff --git a/testautomation/graphics/optional/includes/global/g_tools.inc b/testautomation/graphics/optional/includes/global/g_tools.inc
index b760ad7b1b0f..c54881a0b68e 100644
--- a/testautomation/graphics/optional/includes/global/g_tools.inc
+++ b/testautomation/graphics/optional/includes/global/g_tools.inc
@@ -289,7 +289,7 @@ testcase tiToolsThesaurusContextMenu
endif
Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_" + iSprache + sExt)
-
+ Call sMakeReadOnlyDocumentEditable
Call hTextrahmenErstellen (sWord,20,20,50,30)
sleep 1
diff --git a/testautomation/graphics/optional/includes/impress/i_us2_present.inc b/testautomation/graphics/optional/includes/impress/i_us2_present.inc
index 1a844f299c2d..eeeeb5effb6b 100644
--- a/testautomation/graphics/optional/includes/impress/i_us2_present.inc
+++ b/testautomation/graphics/optional/includes/impress/i_us2_present.inc
@@ -145,6 +145,7 @@ testcase i_us2_pres1
DocumentImpress.UseMenu
hMenuSelectNr (4)
hMenuSelectNr (1)
+ call sSelectEmptyLayout
sleep (1)
kontext "Slides"
diff --git a/testautomation/graphics/optional/includes/impress/i_us_present.inc b/testautomation/graphics/optional/includes/impress/i_us_present.inc
index 4a711cf0a902..41ccd13660d5 100644
--- a/testautomation/graphics/optional/includes/impress/i_us_present.inc
+++ b/testautomation/graphics/optional/includes/impress/i_us_present.inc
@@ -52,12 +52,6 @@ testcase i_us_presentation1
printlog "New master"
MenuSelect(MenuGetItemID(1))
sleep (1)
- ViewMasterPage
- kontext "Slides"
- SlidesControl.OpenContextMenu(true)
- sleep (2)
- MenuSelect(MenuGetItemID(1)) 'New Master
- sleep (1)
printlog " Inserted second Master-Slide"
@@ -120,7 +114,6 @@ testcase i_us_presentation1
if ExportierenDlg.IsVisible(5) then
printlog " Gallery-object correctly copied into Slide."
ExportierenDlg.Close
- ToolsGallery
WaitSlot (2000)
end if
kontext "GraphicObjectbar"
@@ -128,33 +121,7 @@ testcase i_us_presentation1
kontext "DocumentImpress"
ViewToolbarsPicture
end if
- Kontext "Gallery"
- View.TypeKeys "<HOME><RIGHT><RIGHT>"
- printlog "'OpenContextMenu"
- View.TypeKeys "<SHIFT F10>"
- sleep (2)
- MenuSelect(MenuGetItemID(1)) 'Insert
- sleep (2)
- MenuSelect(MenuGetItemID(1)) 'Copy
- sleep (2)
- printlog "Check that we really got a copy of the object "
- kontext "DocumentImpress"
- DocumentImpress.OpenContextMenu(true)
- sleep (2)
- MenuSelect 27353
- sleep (2)
- Kontext "ExportierenDlg"
- if ExportierenDlg.IsVisible(5) then
- printlog " Gallery-object correctly copied into Slide."
- ExportierenDlg.Close
- else
- warnlog " Doesn't seem like we copied anything from the Gallery... ?"
- end if
- kontext "GraphicObjectbar"
- if GraphicObjectbar.Exists(5) = FALSE then
- kontext "DocumentImpress"
- ViewToolbarsPicture
- end if
+
kontext "Gallery"
Gallerys.Select (iPictures)
printlog " 50% Transparency"
@@ -172,14 +139,7 @@ testcase i_us_presentation1
Width.SetText "16"
Height.SetText "16"
Mosaic.OK
- kontext "GraphicFilterBar"
- GraphicFilterBar.Close
- ToolsGallery
- WaitSlot (1000)
- kontext "DocumentImpress"
- hTypeKeys "<TAB>"
- sleep (1)
-
+
kontext "GraphicFilterBar"
Mosaic.Click
@@ -254,7 +214,7 @@ testcase i_us_presentation2
MenuSelect(MenuGetItemID(1)) 'New Slide 'No 2
printlog " Inserted second normal Slide"
-
+ call sSelectEmptyLayout
printlog "2. Layouts: Text. Bild: Gallery: Animation - Gif"
Kontext "Tasks"
printlog "to get to the very first position"
@@ -275,11 +235,16 @@ testcase i_us_presentation2
printlog " Did the 'mistake' to FadeIn/Out the Slidepane"
- printlog "activating the input picture area"
- kontext "DocumentImpress"
- DocumentImpress.TypeKeys "<TAB>",2
- DocumentImpress.TypeKeys "<RETURN>"
- sleep (1)
+
+InsertGraphicsFromFile
+Kontext "GrafikEinfuegenDlg"
+if GrafikEinfuegenDlg.exists(5) then
+printlog " The Insertgraphics-dialogue showed up correctly."
+sleep (5)
+else
+warnlog " The Insertgraphics-dialogue didn't show up."
+endif
+
printlog "Graphics-Import-dialogue. Select i_us_large.jpg"
Kontext "GrafikEinfuegenDlg"
diff --git a/testautomation/graphics/required/includes/global/gallery2.inc b/testautomation/graphics/required/includes/global/gallery2.inc
index 0662b3412ba7..97f28a99849a 100644
--- a/testautomation/graphics/required/includes/global/gallery2.inc
+++ b/testautomation/graphics/required/includes/global/gallery2.inc
@@ -102,6 +102,7 @@ testcase tLoad100GalleryGraphicFiles
'/// + Deleting the graphic with &lt;delete&gt; of the keyboard
'/// <i>Loop ends</i>
x = LoadGraphic ( lsGraphics(t), corLoad )
+ sleep(1)
printlog
catch
ExceptLog
diff --git a/testautomation/graphics/required/includes/global/id_001.inc b/testautomation/graphics/required/includes/global/id_001.inc
index 18555fcfcb4d..5e2b4912f6e7 100644
--- a/testautomation/graphics/required/includes/global/id_001.inc
+++ b/testautomation/graphics/required/includes/global/id_001.inc
@@ -30,7 +30,34 @@
'* short description :
'*
'\******************************************************************************
-
+sub id_001
+
+ printLog Chr(13) + "--------- id_001 ----------"
+
+ qaerrorlog "#74988# tiFilePassword outcommented due to bug. -FHA"
+ call tiFilePassword
+ call tiFileSaveAs
+ call tiFileReload
+ call tiFileVersion
+ printlog " File->Send not possible to test, because extrnal prg get's called!"
+ call tiFileTemplates
+ ' Call tiFileNew instead i call:
+ call tmFileNewFromTemplate
+ call tmFileOpen
+ call tmFileClose
+ call tmFileSave
+ call tmFileSaveAs
+ call tmFileExit
+
+ call tmFileSaveAll
+ call tmFileProperties
+ call tdFileExport
+ call tmFilePrinterSetting
+ ' special cases
+ ' Call AutoPilot 'inc\desktop\autopilo.inc
+ call tmFileExit ' don't test because unpredictable behaviour
+end sub
+'------------------------------------------------------------------------------
testcase tiFileSaveAs
dim sFileName as string ' test document & new created doc
diff --git a/testautomation/graphics/required/includes/global/id_002.inc b/testautomation/graphics/required/includes/global/id_002.inc
index 2aac13baadf1..8f4e7cf1bffc 100644
--- a/testautomation/graphics/required/includes/global/id_002.inc
+++ b/testautomation/graphics/required/includes/global/id_002.inc
@@ -30,6 +30,27 @@
'* short description :
'*
'\******************************************************************************
+sub id_002
+
+ printLog Chr(13) + "--------- id_002 ----------"
+
+ call tiEditUndoRedo
+ call tiEditRepeat
+ call tiEditCutPasteCopySelectall
+ call tiEditPasteSpecial
+ call tiEditSearchAndReplace
+ call tiEditDuplicate
+ call tEditPoints
+ call tiEditFields
+ call tdEditDeleteSlide
+ call tiEditLinks
+ call tiEditImageMap
+ call tiEditObjectProperties
+ call tiEditObjectEdit
+ call tiEditPlugIn
+ call tiEditHyperlink
+end sub
+'-------------------------------------------------------------------------
testcase tiEditUndoRedo
printlog " open application"
diff --git a/testautomation/graphics/required/includes/global/id_003.inc b/testautomation/graphics/required/includes/global/id_003.inc
index 65e11b8a4e31..e7c47b2c434c 100644
--- a/testautomation/graphics/required/includes/global/id_003.inc
+++ b/testautomation/graphics/required/includes/global/id_003.inc
@@ -30,6 +30,21 @@
'* short description :
'*
'\******************************************************************************
+
+sub id_003
+
+ printLog Chr(13) + "--------- id_003 ----------"
+
+ call tiViewNavigator
+ call tiViewZoom
+ call tiViewToolbar
+ Call tToolsCustomize 'global\required\include
+ call tiViewDisplayQuality
+ call tiViewLayer
+ call tViewSnapLines
+ call tViewGrid
+end sub
+'-------------------------------------------------------------------------
testcase tiViewNavigator
printlog " open application "
diff --git a/testautomation/graphics/required/includes/global/id_004.inc b/testautomation/graphics/required/includes/global/id_004.inc
index 3e4d3d86c07a..42b0170fe6ef 100644
--- a/testautomation/graphics/required/includes/global/id_004.inc
+++ b/testautomation/graphics/required/includes/global/id_004.inc
@@ -30,6 +30,34 @@
'* short description :
'*
'\******************************************************************************
+sub id_004
+
+ printLog Chr(13) + "--------- id_004 ----------"
+
+ call tiInsertSlide
+ call tiInsertDuplicateSlide
+ ' v expand slide
+ ' v summary slide
+ call tiInsertField
+ call tiInsertSpecialCharacter
+ call tiInsertHyperlink
+ call tiInsertScan
+ call tiInsertGraphic
+ call tiInsertObjectSound
+ call tiInsertObjectVideo
+ call tiInsertObjectSound
+ call tiInsertObjectVideo
+ call tiInsertChart
+ call tiInsertObjectOLEObjects
+ call tiInsertSpreadsheet
+ call tiInsertFormula
+ call tiInsertFloatingFrame
+ call tiInsertFile
+ call tiInsertPlugin
+ call tiInsertSnappointLine
+ call tdInsertLayer ' IMPRESS: Edit->Layer->Insert
+end sub
+'------------------------------------------------------------------------------
testcase tiInsertSlide
printlog "Dateiname.settext Convertpath (gTesttoolPath + global\input\graf_inp\stabler.tif) "
diff --git a/testautomation/graphics/required/includes/global/id_005.inc b/testautomation/graphics/required/includes/global/id_005.inc
index 07783761b452..6ec5a5988235 100644
--- a/testautomation/graphics/required/includes/global/id_005.inc
+++ b/testautomation/graphics/required/includes/global/id_005.inc
@@ -30,6 +30,33 @@
'* short description :
'*
'\******************************************************************************
+sub id_005
+
+ printLog Chr(13) + "--------- id_005 ----------"
+
+ call tiFormatDefault
+ call tiFormatLine
+ call tdFormatArea
+ call tiFormatText
+ call tiFormatPositionAndSize
+ call tiFormatCharacter
+ call tiFormatControlForm
+ ' ^ Form
+ call tiFormatDimensions
+ call tiFormatConnector
+ call tiFormat3D_Effects
+ call tiFormatNumberingBullets
+ call tiFormatCaseCharacter
+ call tiFormatParagraph
+ call tiFormatPage
+ call tiFormatStylesAndFormatting
+ call tiFormatStylesSlideDesign
+ call tiFormatFontwork
+ call tiFormatGroup
+ printlog " format->group is also modify->group "
+ ' tiFormatLayer ' not in impress
+end sub
+'------------------------------------------------------------------------------
testcase tiFormatDefault
printlog "open application"
@@ -985,8 +1012,8 @@ testcase tiFormatStylesSlideDesign
DeleteUnusedBackgrounds.check
printlog "click button 'Load...'"
Laden.Click
- kontext "Neu"
- printlog "click button 'more'"
+ sleep (10)
+ Kontext "Neu"
Zusaetze.click
sleep 1
kontext "Neu"
diff --git a/testautomation/graphics/required/includes/global/id_006.inc b/testautomation/graphics/required/includes/global/id_006.inc
index 0b210157e333..434959a7ac2d 100644
--- a/testautomation/graphics/required/includes/global/id_006.inc
+++ b/testautomation/graphics/required/includes/global/id_006.inc
@@ -30,7 +30,6 @@
'* short description :
'*
'\**********************************************************************************
-
sub id_Tools
printLog "--------- id_006 ----------"
call tiToolsSpellchecking
diff --git a/testautomation/graphics/required/includes/global/id_007.inc b/testautomation/graphics/required/includes/global/id_007.inc
index 17a4456ccb5f..29791d4b716f 100644
--- a/testautomation/graphics/required/includes/global/id_007.inc
+++ b/testautomation/graphics/required/includes/global/id_007.inc
@@ -29,8 +29,33 @@
'*
'* short description :
'*
-'\**********************************************************************************
-
+'\******************************************************************************
+
+sub id_007
+
+ printLog Chr(13) + "--------- id_007 ----------"
+ ' in imp available via context menu, in draw via modify menu
+
+ call tdModifyFlipVertikal
+ call tdModifyFlipHorizontal
+ call tdContextConvertIntoCurve
+ call tdContextConvertIntoPolygon
+ call tdContextConvertIntoContour
+ call tdContextConvertInto3D
+ call tdContextConvertIntoRotationObject
+ call tdContextConvertIntoBitmap
+ call tdContextConvertIntoMetaFile
+ call tdModifyArrange
+ call tdModifyArrangeObjects
+ call tdModifyAlignment
+ call tdContextDistribution
+ call tdContextDescriptionObject
+ call tdContextNameObject
+ call tdModifyConnectBreak
+ call tdModifyShapes
+ call tdModifyCombineSplit
+end sub
+'-------------------------------------------------------------------------------
testcase tdModifyFlipVertikal
'/// open application ///'
diff --git a/testautomation/graphics/required/includes/global/id_008.inc b/testautomation/graphics/required/includes/global/id_008.inc
index 4add85a48463..8848c7337dac 100644
--- a/testautomation/graphics/required/includes/global/id_008.inc
+++ b/testautomation/graphics/required/includes/global/id_008.inc
@@ -30,7 +30,15 @@
'* short description :
'*
'\*****************************************************************
+sub id_008
+ printLog Chr(13) + "--------- id_008 ----------"
+
+ Call tiWindowNewWindow
+ call tidWindow123
+
+end sub
+'-------------------------------------------------------------------------------
testcase tiWindowNewWindow
'/// open application ///'
diff --git a/testautomation/graphics/required/includes/global/id_009.inc b/testautomation/graphics/required/includes/global/id_009.inc
index 57ff31138cb8..d03d99b6050c 100644
--- a/testautomation/graphics/required/includes/global/id_009.inc
+++ b/testautomation/graphics/required/includes/global/id_009.inc
@@ -30,7 +30,19 @@
'* short description : Testcases to test the Help-Menu.
'*
'\******************************************************************************
-'
+sub id_009
+
+ printLog Chr(13) + "--------- id_009 ----------"
+
+ call tCheckIfTheHelpExists
+ Call tmHelpContents
+ Call tmHelpHelpAgent
+ Call tmHelpTips
+ Call tmHelpExtendedTips
+ Call tmHelpAboutStarOffice
+
+end sub
+'------------------------------------------------------------------------------
testcase tmHelpHelpAgent
Call hNewDocument
diff --git a/testautomation/graphics/required/includes/global/id_011.inc b/testautomation/graphics/required/includes/global/id_011.inc
index 0bc68567839d..186c5e1b51ef 100644
--- a/testautomation/graphics/required/includes/global/id_011.inc
+++ b/testautomation/graphics/required/includes/global/id_011.inc
@@ -30,7 +30,18 @@
'* short description :
'*
'\******************************************************************************
+sub id_011
+ printLog Chr(13) + "--------- id_011 ----------"
+
+ call tdBezierToolbar
+ call tiDrawObjectBar
+ call tiTextToolbar
+ call tiGraphicsObjectBar
+ call tiGluepointToolbar
+
+end sub
+'-------------------------------------------------------------------------------
testcase tiTextToolbar
Dim iWaitIndex as integer
diff --git a/testautomation/graphics/required/includes/impress/im_003_.inc b/testautomation/graphics/required/includes/impress/im_003_.inc
index 685a9d7e69cd..3c73b7827d21 100644
--- a/testautomation/graphics/required/includes/impress/im_003_.inc
+++ b/testautomation/graphics/required/includes/impress/im_003_.inc
@@ -210,12 +210,18 @@ testcase tiViewToolbar_1
Dim NumberOfGraphicModes as integer
Dim iCurrentGraphicsMode as integer
-
dim TestFile as string
+ dim i as integer
+
TestFile = ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp")
printlog "open application "
Call hNewDocument
+ Call sSelectEmptyLayout
+ printlog "delete default content"
+ hUseAsyncSlot( "EditSelectAll" )
+ Kontext "DocumentImpress"
+ DocumentImpress.typeKeys("<DELETE>",true)
printlog "Insert->Graphic... : global\input\graf_inp\desp.bmp "
hUseAsyncSlot( "InsertGraphicsFromFile" )
@@ -235,8 +241,17 @@ testcase tiViewToolbar_1
printlog "select graphic "
hUseAsyncSlot( "EditSelectAll" )
- Kontext "GraphicObjectbar"
printlog "The Graphics Toolbar has to be visible now; If not -> ERROR "
+ ' workaround for i113609; there should have been a style selected without elements on creating the document - what failed; the elements should have been deleted before inserting the grafik in this test - which failed; so the workaround is to use <tab> to travel to the graphic selection here:
+ for i=1 to 3
+ Kontext "GraphicObjectbar"
+ if ( not GraphicObjectbar.Exists( DEFAULT_DELAY ) ) Then
+ hTypeKeys("<tab>")
+ qaerrorlog "delete default content failed"
+ end if
+ next i
+
+ Kontext "GraphicObjectbar"
if ( GraphicObjectbar.Exists( DEFAULT_DELAY ) ) Then
Printlog "- graphic object toolbar exists"
diff --git a/testautomation/graphics/required/includes/impress/im_004_.inc b/testautomation/graphics/required/includes/impress/im_004_.inc
index 02587ea83df9..2c55bc4c2f13 100644
--- a/testautomation/graphics/required/includes/impress/im_004_.inc
+++ b/testautomation/graphics/required/includes/impress/im_004_.inc
@@ -49,6 +49,7 @@ testcase tiInsertSlideExpandSummary
Kontext "DocumentImpressOutlineView"
printlog "Type 2 rows "
DocumentImpressOutlineView.TypeKeys "Herbert<Return>Rudi"
+ sleep(1)
printlog "View->Master View->Drawing View "
ViewWorkspaceDrawingView
WaitSlot()
diff --git a/testautomation/graphics/required/input/recht_1.odg b/testautomation/graphics/required/input/recht_1.odg
index 7463fbaf16ef..720c437fad93 100755
--- a/testautomation/graphics/required/input/recht_1.odg
+++ b/testautomation/graphics/required/input/recht_1.odg
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_1.odp b/testautomation/graphics/required/input/recht_1.odp
index 24442ce94654..fbad5296d1b1 100755
--- a/testautomation/graphics/required/input/recht_1.odp
+++ b/testautomation/graphics/required/input/recht_1.odp
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_3.odg b/testautomation/graphics/required/input/recht_3.odg
index c2f3461b9877..b2df97654ead 100755
--- a/testautomation/graphics/required/input/recht_3.odg
+++ b/testautomation/graphics/required/input/recht_3.odg
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_3.odp b/testautomation/graphics/required/input/recht_3.odp
index 768fbad4b780..84ab26098ca7 100644..100755
--- a/testautomation/graphics/required/input/recht_3.odp
+++ b/testautomation/graphics/required/input/recht_3.odp
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_31.odg b/testautomation/graphics/required/input/recht_31.odg
index abe6d48edee1..e7b1c456163e 100755
--- a/testautomation/graphics/required/input/recht_31.odg
+++ b/testautomation/graphics/required/input/recht_31.odg
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_31.odp b/testautomation/graphics/required/input/recht_31.odp
index 23f5c77c141d..4f74eee30cb4 100644..100755
--- a/testautomation/graphics/required/input/recht_31.odp
+++ b/testautomation/graphics/required/input/recht_31.odp
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_33.odg b/testautomation/graphics/required/input/recht_33.odg
index 1288c85f2e97..03b6119a0157 100755
--- a/testautomation/graphics/required/input/recht_33.odg
+++ b/testautomation/graphics/required/input/recht_33.odg
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_33.odp b/testautomation/graphics/required/input/recht_33.odp
index c6acada2537e..c49571f517e2 100644..100755
--- a/testautomation/graphics/required/input/recht_33.odp
+++ b/testautomation/graphics/required/input/recht_33.odp
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_34.odg b/testautomation/graphics/required/input/recht_34.odg
index b3fd1da6db78..5789dd14fb07 100755
--- a/testautomation/graphics/required/input/recht_34.odg
+++ b/testautomation/graphics/required/input/recht_34.odg
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_34.odp b/testautomation/graphics/required/input/recht_34.odp
index 2dcbd561f9e5..fec4da84f204 100644..100755
--- a/testautomation/graphics/required/input/recht_34.odp
+++ b/testautomation/graphics/required/input/recht_34.odp
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_36.odg b/testautomation/graphics/required/input/recht_36.odg
index 81951c928e8f..a328b9827ca6 100755
--- a/testautomation/graphics/required/input/recht_36.odg
+++ b/testautomation/graphics/required/input/recht_36.odg
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_36.odp b/testautomation/graphics/required/input/recht_36.odp
index 45f7fd3a47cb..318c75fb17d9 100644..100755
--- a/testautomation/graphics/required/input/recht_36.odp
+++ b/testautomation/graphics/required/input/recht_36.odp
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_39.odg b/testautomation/graphics/required/input/recht_39.odg
index 0ef147755258..6f0404a13e72 100755
--- a/testautomation/graphics/required/input/recht_39.odg
+++ b/testautomation/graphics/required/input/recht_39.odg
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_39.odp b/testautomation/graphics/required/input/recht_39.odp
index bf649b488030..777844272121 100644..100755
--- a/testautomation/graphics/required/input/recht_39.odp
+++ b/testautomation/graphics/required/input/recht_39.odp
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_46.odg b/testautomation/graphics/required/input/recht_46.odg
index 1ad25dad2739..35abb966363b 100755
--- a/testautomation/graphics/required/input/recht_46.odg
+++ b/testautomation/graphics/required/input/recht_46.odg
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_46.odp b/testautomation/graphics/required/input/recht_46.odp
index e9de83b58c8b..2c73a2a83371 100644..100755
--- a/testautomation/graphics/required/input/recht_46.odp
+++ b/testautomation/graphics/required/input/recht_46.odp
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_48.odg b/testautomation/graphics/required/input/recht_48.odg
index 1e3206ffcd7d..ec17c200c483 100755
--- a/testautomation/graphics/required/input/recht_48.odg
+++ b/testautomation/graphics/required/input/recht_48.odg
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_48.odp b/testautomation/graphics/required/input/recht_48.odp
index f836b0521f8b..6350630495fb 100644..100755
--- a/testautomation/graphics/required/input/recht_48.odp
+++ b/testautomation/graphics/required/input/recht_48.odp
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_48.sxd b/testautomation/graphics/required/input/recht_48.sxd
deleted file mode 100755
index ef01f9ff9b9f..000000000000
--- a/testautomation/graphics/required/input/recht_48.sxd
+++ /dev/null
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_48.sxi b/testautomation/graphics/required/input/recht_48.sxi
deleted file mode 100755
index bdbd34003ebb..000000000000
--- a/testautomation/graphics/required/input/recht_48.sxi
+++ /dev/null
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_49.odg b/testautomation/graphics/required/input/recht_49.odg
index 0898a8b99a5c..d3bd17ae64b2 100755
--- a/testautomation/graphics/required/input/recht_49.odg
+++ b/testautomation/graphics/required/input/recht_49.odg
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_49.odp b/testautomation/graphics/required/input/recht_49.odp
index 88c93c2856b4..d8c6e495c4f5 100644..100755
--- a/testautomation/graphics/required/input/recht_49.odp
+++ b/testautomation/graphics/required/input/recht_49.odp
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_55.odg b/testautomation/graphics/required/input/recht_55.odg
index fc21ecba132a..6f4f649b13c0 100755
--- a/testautomation/graphics/required/input/recht_55.odg
+++ b/testautomation/graphics/required/input/recht_55.odg
Binary files differ
diff --git a/testautomation/graphics/required/input/recht_55.odp b/testautomation/graphics/required/input/recht_55.odp
index 6e78d94e8c49..001e79a700f7 100644..100755
--- a/testautomation/graphics/required/input/recht_55.odp
+++ b/testautomation/graphics/required/input/recht_55.odp
Binary files differ
diff --git a/testautomation/graphics/tools/id_tools.inc b/testautomation/graphics/tools/id_tools.inc
index c774710c89fa..4f919dfe36fe 100644
--- a/testautomation/graphics/tools/id_tools.inc
+++ b/testautomation/graphics/tools/id_tools.inc
@@ -264,53 +264,47 @@ function fMakeDocumentWritable() as boolean
printlog "Document is already writable."
fMakeDocumentWritable = true
endif
-
+ sleep(1)
end function
'-------------------------------------------------------------------------------
-function fGetSizeXY (sX as string, sY as string, bRetrieveOnly as boolean) as Boolean
-
- const RC_FAILURE = -1
-
- dim sTx as string
- dim sTy as string
-
- fGetSizeXY() = True
-
- if ( hUseAsyncSlot( "ContextPositionAndSize" ) <> RC_FAILURE ) then
-
- kontext
- active.SetPage TabPositionAndSize
-
- kontext "TabPositionAndSize"
- if ( TabPositionAndSize.exists( 2 ) ) then
- sTx = Width.GetText()
- sTy = Height.GetText()
- hCloseDialog( TabPositionAndSize, "ok" )
- else
- warnlog "Couldn't switch tab page :-( "
- endif
-
- if ( bRetrieveOnly ) then ' Get the Values only
- sY = sTy
- sX = sTx
- else ' Get the Values and compare them
- if ( not LiberalMeasurement (sX,sTx) ) then
- warnlog "width is different :-( should: '"+sX+"' is: '"+sTx+"'" + "eventually a result of i35519"
- fGetSizeXY() = False
- endif
- if (not LiberalMeasurement (sY,sTy) ) then
- warnlog "hight is different :-( should: '"+sY+"' is: '"+sTy+"'" + "eventually a result of i35519"
- fGetSizeXY() = False
- endif
- endif
- else
- warnlog( "Failed to open <Position And Size> dialog" )
- endif
-
+function fGetSizeXY (sX as string, sY as string, bGet as boolean) as Boolean
+ dim sTx as string
+ dim sTy as string
+ dim bReturn as boolean
+
+ bReturn = True
+ try
+ ContextPositionAndSize
+ catch
+ warnlog "couldn't call 'ContextPositionAndSize' no object selected ?"
+ endcatch
+ kontext
+ active.SetPage TabPositionAndSize
+ kontext "TabPositionAndSize"
+ if TabPositionAndSize.exists (5) then
+ sTx = Width.GetText
+ sTy = Height.GetText
+ TabPositionAndSize.OK
+ else
+ warnlog "Couldn't switch tab page :-( "
+ endif
+ if bGet then ' Get the Values only
+ sY = sTy
+ sX = sTx
+ else ' Get the Values and COMPARE them
+ if (LiberalMeasurement (sX,sTx) <> TRUE) then
+ warnlog "width is different :-( should: '"+sX+"' is: '"+sTx+"'" + "eventually a result of i35519"
+ bReturn = False
+ endif
+ if (LiberalMeasurement (sY,sTy) <> TRUE) then
+ warnlog "hight is different :-( should: '"+sY+"' is: '"+sTy+"'" + "eventually a result of i35519"
+ bReturn = False
+ endif
+ bGet = bReturn
+ endif
end function
-
'-------------------------------------------------------------------------
function hCallExport ( cFileName as String , sFilter as String, optional bSelection as boolean ) as Boolean
diff --git a/testautomation/graphics/tools/id_tools_2.inc b/testautomation/graphics/tools/id_tools_2.inc
index 6c5ca705f8c4..60836bdb274a 100644
--- a/testautomation/graphics/tools/id_tools_2.inc
+++ b/testautomation/graphics/tools/id_tools_2.inc
@@ -181,56 +181,6 @@ sub sPrintCheckOrder (optional bcheck as boolean)
Printlog "-----------------------------------"
end sub
-'--------------------------- Tests for Writer ----------------------------------
-sub writertest
-
- try
- call Make_And_Check_Formatted_Text_Line_From_Application
- catch
- warnlog "Something went wrong with testing writertest"
- endcatch
-
- try
- call Make_Rectangle_From_Application
- call Full_test_Draw
- call Full_test_Impress
- call Full_test_Writer
- call Full_test_Calc
- catch
- warnlog "something wrong with testing writertest"
- endcatch
-end sub ' big one
-
-'---------------------------- Tests for Calc -----------------------------------
-sub calctest
-
- try
- call Make_Rectangle_From_Application
- call Full_test_Draw
- call Full_test_Impress
- call Full_test_Writer
- call Full_test_Calc
- catch
- warnlog "something wrong with calctest"
- endcatch
- printlog "currently no specific tests from Calc"
-end sub
-
-'-------------------------------------------------------------------------------
-sub tClipboardFromDrawTest
-
- EnableQAErrors = false
- FromApp2 = gApplication
- printlog "gApplication = " + gApplication
-
- select case( gApplication )
- case "WRITER" : call writertest()
- case "CALC" : call calctest()
- case else : warnlog( "Unsupported gApplication provided: " & gApplication )
- end select
-
-end sub
-
'-------------------------------------------------------------------------------
sub Select_Copy
@@ -572,6 +522,7 @@ sub LoadGraphic ( sFile as String, bOK as Boolean ) as boolean
Dim iHMax
if app.FileLen(sFile) = "0" then warnlog " the file (" + (sFile) + ") seems to be zero bytes large."
call hGrafikEinfuegen ( sFile )
+ sleep (1)
FormatGraphics
Kontext
Active.SetPage TabType
@@ -620,212 +571,7 @@ sub GetOnlyGraphics ( OldList() as String, NewList() as String )
end if
next i
end sub
-
-'-------------------------------------------------------------------------
-sub id_001
-
- printLog Chr(13) + "--------- id_001 ----------"
-
- qaerrorlog "#74988# tiFilePassword outcommented due to bug. -FHA"
- call tiFilePassword
- call tiFileSaveAs
- call tiFileReload
- call tiFileVersion
- printlog " File->Send not possible to test, because extrnal prg get's called!"
- call tiFileTemplates
- ' Call tiFileNew instead i call:
- call tmFileNewFromTemplate
- call tmFileOpen
- call tmFileClose
- call tmFileSave
- call tmFileSaveAs
- call tmFileExit
-
- call tmFileSaveAll
- call tmFileProperties
- call tdFileExport
- call tmFilePrinterSetting
- ' special cases
- ' Call AutoPilot 'inc\desktop\autopilo.inc
- call tmFileExit ' don't test because unpredictable behaviour
-end sub
-
-'------------------------------------------------------------------------------
-sub id_002
-
- printLog Chr(13) + "--------- id_002 ----------"
-
- call tiEditUndoRedo
- call tiEditRepeat
- call tiEditCutPasteCopySelectall
- call tiEditPasteSpecial
- call tiEditSearchAndReplace
- call tiEditDuplicate
- call tEditPoints
- call tiEditFields
- call tdEditDeleteSlide
- call tiEditLinks
- call tiEditImageMap
- call tiEditObjectProperties
- call tiEditObjectEdit
- call tiEditPlugIn
- call tiEditHyperlink
-end sub
-
-'-------------------------------------------------------------------------
-sub id_003
-
- printLog Chr(13) + "--------- id_003 ----------"
-
- call tiViewNavigator
- call tiViewZoom
- call tiViewToolbar
- Call tToolsCustomize 'global\required\include
- call tiViewDisplayQuality
- call tiViewLayer
- call tViewSnapLines
- call tViewGrid
-end sub
-
-'-------------------------------------------------------------------------
-sub id_004
-
- printLog Chr(13) + "--------- id_004 ----------"
-
- call tiInsertSlide
- call tiInsertDuplicateSlide
- ' v expand slide
- ' v summary slide
- call tiInsertField
- call tiInsertSpecialCharacter
- call tiInsertHyperlink
- call tiInsertScan
- call tiInsertGraphic
- call tiInsertObjectSound
- call tiInsertObjectVideo
- call tiInsertObjectSound
- call tiInsertObjectVideo
- call tiInsertChart
- call tiInsertObjectOLEObjects
- call tiInsertSpreadsheet
- call tiInsertFormula
- call tiInsertFloatingFrame
- call tiInsertFile
- call tiInsertPlugin
- call tiInsertSnappointLine
- call tdInsertLayer ' IMPRESS: Edit->Layer->Insert
-end sub
-
-'------------------------------------------------------------------------------
-sub id_005
-
- printLog Chr(13) + "--------- id_005 ----------"
-
- call tiFormatDefault
- call tiFormatLine
- call tdFormatArea
- call tiFormatText
- call tiFormatPositionAndSize
- call tiFormatCharacter
- call tiFormatControlForm
- ' ^ Form
- call tiFormatDimensions
- call tiFormatConnector
- call tiFormat3D_Effects
- call tiFormatNumberingBullets
- call tiFormatCaseCharacter
- call tiFormatParagraph
- call tiFormatPage
- call tiFormatStylesAndFormatting
- call tiFormatStylesSlideDesign
- call tiFormatFontwork
- call tiFormatGroup
- printlog " format->group is also modify->group "
- ' tiFormatLayer ' not in impress
-end sub
-
-'------------------------------------------------------------------------------
-sub id_006
-
- printLog Chr(13) + "--------- id_006 ----------"
-
- call tiToolsSpellchecking
- call tiToolsSpellcheckingAutomatic
- call tiToolsThesaurus
- call tiToolsHyphenation
- call tiToolsAutoCorrect
- call tChineseTranslation
- call tiToolsMacro
- call tiToolsGallery
- call tiToolsEyedropper
- call tiToolsOptions ' get just called one time here...
- Call tToolsOptionsTest ' global one
-end sub
-
'-------------------------------------------------------------------------------
-sub id_007
-
- printLog Chr(13) + "--------- id_007 ----------"
- ' in imp available via context menu, in draw via modify menu
-
- call tdModifyFlipVertikal
- call tdModifyFlipHorizontal
- call tdContextConvertIntoCurve
- call tdContextConvertIntoPolygon
- call tdContextConvertIntoContour
- call tdContextConvertInto3D
- call tdContextConvertIntoRotationObject
- call tdContextConvertIntoBitmap
- call tdContextConvertIntoMetaFile
- call tdModifyArrange
- call tdModifyArrangeObjects
- call tdModifyAlignment
- call tdContextDistribution
- call tdContextDescriptionObject
- call tdContextNameObject
- call tdModifyConnectBreak
- call tdModifyShapes
- call tdModifyCombineSplit
-end sub
-
-'-------------------------------------------------------------------------------
-sub id_008
-
- printLog Chr(13) + "--------- id_008 ----------"
-
- Call tiWindowNewWindow
- call tidWindow123
-end sub
-
-'------------------------------------------------------------------------------
-sub id_009
-
- printLog Chr(13) + "--------- id_009 ----------"
-
- call tCheckIfTheHelpExists
- Call tmHelpContents
- Call tmHelpHelpAgent
- Call tmHelpTips
- Call tmHelpExtendedTips
- Call tmHelpAboutStarOffice
-
-end sub
-
-'------------------------------------------------------------------------------
-sub id_011
-
- printLog Chr(13) + "--------- id_011 ----------"
-
- call tdBezierToolbar
- call tiDrawObjectBar
- call tiTextToolbar
- call tiGraphicsObjectBar
- call tiGluepointToolbar
-
-end sub
-
-'-------------------------------------------------------------------------------'
-
sub hWalkTheStyles (optional a as integer,optional b as integer)
dim i as integer
@@ -991,4 +737,4 @@ sub sSelectEmptyLayout
else
printlog "No change of Layout needed."
endif
-end sub \ No newline at end of file
+end sub
diff --git a/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc b/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc
index 296387d64f93..a2e3f5a70598 100755..100644
--- a/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc
+++ b/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc
@@ -238,6 +238,7 @@ testcase tFileOpenCSV
Oeffnen.Click
Kontext "TextImport"
TextImport.ok
+ sleep (2)
Printlog " - CSV import dialog is in function"
Kontext "DocumentCalc"
printlog " Close document"
diff --git a/testautomation/spreadsheet/tools/input/Functionnames.ods b/testautomation/spreadsheet/tools/input/Functionnames.ods
index e7d59b7e990e..1d9f3edab848 100755
--- a/testautomation/spreadsheet/tools/input/Functionnames.ods
+++ b/testautomation/spreadsheet/tools/input/Functionnames.ods
Binary files differ
diff --git a/testautomation/writer/optional/includes/autocorrection/w_autocorrect1.inc b/testautomation/writer/optional/includes/autocorrection/w_autocorrect1.inc
index f360034d7433..694c3dec0de4 100755
--- a/testautomation/writer/optional/includes/autocorrection/w_autocorrect1.inc
+++ b/testautomation/writer/optional/includes/autocorrection/w_autocorrect1.inc
@@ -1049,7 +1049,7 @@ testcase tToolsAutocorrectOptions_8
firstLine = "1. FirstLine"
testContent = "Test1"
- hopeResult = "1.Test1"
+ hopeResult = "2. Test1"
Call wTypeKeys firstLine
Call wTypeKeys "<Return>"
diff --git a/testautomation/writer/optional/includes/fields/w_fields5.inc b/testautomation/writer/optional/includes/fields/w_fields5.inc
index 067366ddbe0e..334d01906307 100755
--- a/testautomation/writer/optional/includes/fields/w_fields5.inc
+++ b/testautomation/writer/optional/includes/fields/w_fields5.inc
@@ -667,7 +667,7 @@ endcase
'-----------------------------------------------------------------
testcase tVariablesDDEFieldManual
- warnlog "#i112079#testcase must be reworked"
+ qaerrorlog "#i112079#testcase must be reworked"
goto endsub
Dim sDDEFile as String
@@ -759,7 +759,7 @@ endcase
'-----------------------------------------------------------------
testcase tVariablesDDEFieldAutomatic
- warnlog "#i112079#testcase must be reworked"
+ qaerrorlog "#i112079#testcase must be reworked"
goto endsub
qaerrorlog "#i102792# - tVariablesDDEFieldAutomatic outcommented. Fields not updated."
diff --git a/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc b/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc
index 0bd255e472b3..84a5c5281f8b 100755..100644
--- a/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc
+++ b/testautomation/writer/optional/includes/formatpage/w_formatpage1.inc
@@ -53,18 +53,18 @@ testcase tFormatPage_1
PrintLog "- Open format/page dialog"
'/// <b> Open format/page dialog </b> ///
-
+
Call hNewDocument
-
+
'/// 1. via Mouse clicks in Menu: Format-Page
try
fFormatPageWriter("TabSeite")
TabSeite.Cancel
catch
endcatch
-
+
'/// 2. via shortcuts in menu (manual test is needed)
-
+
'/// 3. via Context menu when Cursor is in the document
try
hMenuSelectNr(5)
@@ -77,7 +77,7 @@ testcase tFormatPage_1
TabSeite.Cancel
catch
endcatch
-
+
Call hCloseDocument
endcase
@@ -125,21 +125,21 @@ endcase
testcase tFormatPage_3
Dim iTextLength as integer
-
+
PrintLog "- Test Landscape in tabpage Page"
'/// Test Landscape in tabpage Page
-
+
Call hNewDocument
Call wOptionsUndo( "Grundschriften" )
-
+
'/// Input a long test string
Call wTypeKeys "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQ"
Call wTypeKeys "<Mod1 Home>"
Call wTypeKeys "<Shift End>"
EditCopy
iTextLength = Len(GetClipBoardtext)
-
+
'/// Format/Page , tabpage page , check 'Landscape'
fFormatPageWriter("TabSeite")
Papierformat.Select 2 ' A4 Paper
@@ -147,14 +147,14 @@ testcase tFormatPage_3
Quer.Check
Wait 500
TabSeite.OK
-
+
'/// Check if Checkbox -- Landscape works fine
Call wTypeKeys "<Mod1 Home>"
Call wTypeKeys "<Shift End>"
EditCopy
wait 500
if Len(GetClipboardText) <= iTextLength then Warnlog "Checkbox Landscape doesn't work fine!"
-
+
Call hCloseDocument
endcase
@@ -166,14 +166,14 @@ testcase tFormatPage_4
Dim iFormat as Integer
Dim sWidth as String
Dim sHeight as String
-
+
iFormat = 2 'A4 paper
-
+
PrintLog "- Width and Height boxes must change after changing between Portrait and Landscape"
'/// Width and Height boxes must change after changing between Portrait and Landscape
-
+
Call hNewDocument
-
+
'/// Format/Page tabpage page ,
'/// + check 'Portrait' first and get width and height ,
'/// + then change from Portrait to Landscape
@@ -185,13 +185,13 @@ testcase tFormatPage_4
Sleep 1
sWidth = Breite.GetText
sHeight = Hoehe.GetText
-
+
Quer.Check
Sleep 1
if Breite.GetText <> sHeight then Warnlog "Width isn't changed when changing from Portrait to Landscape !"
if Hoehe.GetText <> sWidth then Warnlog "Height isn't changed when changing from Portrait to Landscape !"
TabSeite.Cancel
-
+
'/// Format/Page tabpage page ,
'/// + check 'Landscape' first and get width and height ,
'/// + then change from Landscape to Portrait
@@ -203,13 +203,13 @@ testcase tFormatPage_4
Sleep 1
sWidth = Breite.GetText
sHeight = Hoehe.GetText
-
+
Hoch.Check
Sleep 1
if Breite.GetText <> sHeight then Warnlog "Width isn't changed when changing from Landscape to Portrait !"
if Hoehe.GetText <> sWidth then Warnlog "Height isn't changed when changing from Landscape to Portrait !"
TabSeite.Cancel
-
+
Call hCloseDocument
endcase
@@ -222,28 +222,28 @@ testcase tFormatPage_5
Dim sWidth as String , sHeight as String
Dim sLeft as String , sRight as String , sUp as String , sBottom as String ' set page size
Dim sLeft1 as String , sRight1 as String , sUp1 as String , sBottom1 as String ' get page size
-
+
iFormat = 2 'A4 paper
sWidth = "20" + gSeperator + "00" + gMeasurementUnit
sHeight = "25" + gSeperator + "00" + gMeasurementUnit
-
+
sLeft = "15" + gSeperator + "00" + gMeasurementUnit
sRight = "15" + gSeperator + "00" + gMeasurementUnit
sUp = "15" + gSeperator + "00" + gMeasurementUnit
sBottom = "15" + gSeperator + "00" + gMeasurementUnit
-
+
sLeft1 = "15" + gSeperator + "00" + gMeasurementUnit
sRight1 = "4" + gSeperator + "50" + gMeasurementUnit
sUp1 = "15" + gSeperator + "00" + gMeasurementUnit
sBottom1 = "9" + gSeperator + "50" + gMeasurementUnit
-
+
PrintLog "- The sum of 'Left margin' and 'Right margin' must always stay below the Paper width."
PrintLog " (Same for top/bottom and height)"
'/// The sum of "Left margin" and "Right margin" must always stay below the Paper width.
'/// (Same for top/bottom and height)
-
+
Call hNewDocument
-
+
'/// Format/Page , tabpage Page , set width and height , close the dialog
fFormatPageWriter("TabSeite")
Papierformat.Select iFormat
@@ -255,7 +255,7 @@ testcase tFormatPage_5
Hoehe.SetText sHeight
Wait 500
TabSeite.OK
-
+
'/// Format/Page , tabpage Page ,
'/// + Set the sum of "Left margin" and "Right margin" more than Width
fFormatPageWriter("TabSeite")
@@ -264,13 +264,13 @@ testcase tFormatPage_5
Rechts.SetText sRight
Wait 500
TabSeite.OK
-
+
'/// Check if the setting is OK
fFormatPageWriter("TabSeite")
if Left$(Links.GetText,5) <> Left$(sLeft1,5) then Warnlog "The Margin(left) is wrong!"
if Left$(Rechts.GetText,4) <> Left$(sRight1,4) then Warnlog "The Margin(right) is wrong!"
TabSeite.Cancel
-
+
'/// Format/Page , tabpage Page ,
'/// + Set the sum of "Up margin" and "Bottom margin" more than Heigth
fFormatPageWriter("TabSeite")
@@ -279,13 +279,13 @@ testcase tFormatPage_5
Unten.SetText sBottom
Wait 500
TabSeite.OK
-
+
'/// Check if the setting is OK
fFormatPageWriter("TabSeite")
if Left$(Oben.GetText,5) <> Left$(sUp1,5) then Warnlog "The Margin(Up) is wrong!"
if Left$(Unten.GetText,4) <> Left$(sBottom1,4) then Warnlog "The Margin(Bottom) is wrong!"
TabSeite.Cancel
-
+
Call hCloseDocument
endcase
@@ -298,22 +298,22 @@ testcase tFormatPage_6
Dim iFormatLayout as Integer , iReferenceStyle as Integer
Dim sWidth as String, sHeight as String
Dim sLeft as String , sRight as String , sUp as String , sBottom as String
-
+
iPaperTray = 1 : iPageLayout = 2
iFormatLayout = 2 : iReferenceStyle = 5
-
+
sWidth = "20" + gSeperator + "00" + gMeasurementUnit
sHeight = "25" + gSeperator + "00" + gMeasurementUnit
sLeft = "2" + gSeperator + "00" + gMeasurementUnit
sRight = "2" + gSeperator + "00" + gMeasurementUnit
sUp = "2" + gSeperator + "00" + gMeasurementUnit
sBottom = "2" + gSeperator + "00" + gMeasurementUnit
-
+
PrintLog "- Test Pre-defined formats"
'/// Test Pre-defined formats
-
+
Call hNewDocument
-
+
'/// Format/Page , tabpage page , do some configuration
fFormatPageWriter("TabSeite")
Hoch.Check
@@ -341,15 +341,15 @@ testcase tFormatPage_6
AbsatzVorlage.Select iReferenceStyle
Wait 500
TabSeite.OK
-
+
'/// Save the file , close the file and reload the file
Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\tFormatPage_6.odt", "writer8")
Call hCloseDocument
-
+
Call hNewDocument
-
+
Call hFileOpen(gOfficepath + "user\work\tFormatPage_6.odt")
-
+
'/// Check if Pre-defined formats are correct
fFormatPageWriter("TabSeite")
if Hoch.IsChecked <> TRUE then Warnlog "Portrait should be checked!"
@@ -365,7 +365,7 @@ testcase tFormatPage_6
if Einschalten.IsChecked <> TRUE then Warnlog "Portrait should be checked!"
if AbsatzVorlage.GetSelIndex <> iReferenceStyle then Warnlog "The reference style is wrong!"
TabSeite.Cancel
-
+
Call hCloseDocument
endcase
@@ -378,22 +378,22 @@ testcase tFormatPage_7
Dim iFormatLayout as Integer , iReferenceStyle as Integer
Dim sWidth as String , sHeight as String
Dim sLeft as String , sRight as String , sUp as String , sBottom as String
-
+
iPaperTray = 1 : iPageLayout = 2
iFormatLayout = 2 : iReferenceStyle = 5
-
+
sWidth = "20" + gSeperator + "00" + gMeasurementUnit
sHeight = "25" + gSeperator + "00" + gMeasurementUnit
sLeft = "2" + gSeperator + "00" + gMeasurementUnit
sRight = "2" + gSeperator + "00" + gMeasurementUnit
sUp = "2" + gSeperator + "00" + gMeasurementUnit
sBottom = "2" + gSeperator + "00" + gMeasurementUnit
-
+
PrintLog "- Test user defined formats"
'/// Test user defined formats
-
+
Call hNewDocument
-
+
'/// Format/Page , tabpage page , do some configuration
fFormatPageWriter("TabSeite")
Hoch.Check
@@ -421,7 +421,7 @@ testcase tFormatPage_7
AbsatzVorlage.Select iReferenceStyle
Wait 500
TabSeite.OK
-
+
'/// Check if user defined formats are correct
fFormatPageWriter("TabSeite")
if Hoch.IsChecked <> TRUE then Warnlog "Portrait should be checked!"
@@ -437,7 +437,7 @@ testcase tFormatPage_7
if Einschalten.IsChecked <> TRUE then Warnlog "Portrait should be checked!"
if AbsatzVorlage.GetSelIndex <> iReferenceStyle then Warnlog "The reference style is wrong!"
TabSeite.Cancel
-
+
Call hCloseDocument
endcase
@@ -479,7 +479,7 @@ testcase tFormatPage_8
Warnlog "Listbox 'Text Direction' is visible though asian support is disabled"
end if
TabSeite.Cancel
-
+
if RecheckCTLSupport = True then
Call ActiveDeactivateCTLSupport(TRUE)
else
@@ -551,16 +551,16 @@ testcase tFormatPage_10
Dim RecheckAsianSupport as string
RecheckCTLSupport = gCTLSup
RecheckAsianSupport = gAsianSup
-
+
PrintLog "- when Asian support and CTL are all enabled , 3 entries should be in Text Direction listbox"
'/// when Asian support and CTL are all enabled , 3 entries should be in Text Direction listbox
-
+
Call hNewDocument
-
+
'/// Set Asian support enabled and Set CTL enabled
Call ActiveDeactivateAsianSupport(TRUE)
Call ActiveDeactivateCTLSupport(TRUE)
-
+
'/// Check if there are 3 entires in Text Direction listbox
fFormatPageWriter("TabSeite")
if Textfluss.GetItemCount <> 3 then
@@ -578,7 +578,7 @@ testcase tFormatPage_10
else
Call ActiveDeactivateAsianSupport(FALSE)
end if
-
+
Call hCloseDocument
endcase
@@ -843,6 +843,8 @@ testcase tFormatPage_15
sFormat = "Som sidformatmall"
case 49: sType = "Seite"
sFormat = "Wie Seitenvorlage"
+ case 50: sType = "Stran"
+ sFormat = "Kot predloga za stran"
case 55 : sType = "Estatísticas"
sFormat = "Como Estilo de Página"
case 81 : sType = "ページ"
@@ -856,12 +858,12 @@ testcase tFormatPage_15
case else : QAErrorLog "The test does not support the language " + iSprache
Goto endsub
end select
-
+
PrintLog "- Insertfields / other / Document / Type/Page -> As page Style must be set."
'/// Insertfield / other / Document / Type/Page -> As page Style must be set.
-
+
Call hNewDocument
-
+
'/// InsertFields / other , tabpage document , select page ,
'/// + check if Page format is right
Call fInsertFieldsOther("TabDokumentFeldbefehle")
diff --git a/testautomation/writer/optional/includes/formatpage/w_formatpage3.inc b/testautomation/writer/optional/includes/formatpage/w_formatpage3.inc
index 2d34c23d82fb..784f6dad28cc 100755..100644
--- a/testautomation/writer/optional/includes/formatpage/w_formatpage3.inc
+++ b/testautomation/writer/optional/includes/formatpage/w_formatpage3.inc
@@ -641,6 +641,7 @@ testcase tFormatPage_37
case 39 : sHeader = "Riga d'intestazione"
case 46 : sHeader = "Sidhuvud"
case 49 : sHeader = "Kopfzeile"
+ case 50 : sHeader = "Glava"
case 55 : sHeader = "Cabeçalho"
case 81 : sHeader = "ヘッダ"
case 82 : sHeader = "머리글"
@@ -689,6 +690,7 @@ testcase tFormatPage_38
case 39 : sFooter = "Piè di pagina"
case 46 : sFooter = "Sidfot"
case 49 : sFooter = "Fußzeile"
+ case 50 : sFooter = "Noga"
case 55 : sFooter = "Rodapé"
case 81 : sFooter = "フッタ"
case 82 : sFooter = "바닥글"
@@ -866,23 +868,23 @@ testcase tFormatPage_41
Dim sWidthColumn1 as String
Dim sWidthColumn2 as String
Dim sWidthColumn3 as String
-
+
sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testColumnInPage2.sxw")
sColumn = "3"
sWidthColumn1 = "2" + gSeperator + "00"
sWidthColumn2 = "4" + gSeperator + "00"
-
+
PrintLog "- create columns with different width "
'/// create columns with different width
-
+
Call hNewDocument
-
+
'/// Open test file testColumnInPage2.sxw
'/// + (The test file includes 2 pages , some text is
'/// + in 1st page and another is in 2nd page)
Call hFileOpen(sTestFile)
Call sMakeReadOnlyDocumentEditable
-
+
'/// Create 3 with different columns . formatPage ,
'/// + tabpage columns , set 3 columns
Call fFormatPageWriter("TabSpalten")
@@ -899,14 +901,14 @@ testcase tFormatPage_41
sWidthColumn3 = Spaltenbreite3.GetText
wait 500
TabSpalten.OK
-
+
'/// Check if columns' width is right
fFormatPageWriter("TabSpalten")
if Left$(Spaltenbreite1.GetText,4) <> sWidthColumn1 then Warnlog "the column1's width isn't set correctly !"
if Left$(Spaltenbreite2.GetText,4) <> sWidthColumn2 then Warnlog "the column2's width isn't set correctly !"
if Spaltenbreite3.GetText <> sWidthColumn3 then Warnlog "the column3's width isn't set correctly !"
TabSpalten.Cancel
-
+
'detailed check for column1
Kontext
EditSearchAndReplace
@@ -916,12 +918,12 @@ testcase tFormatPage_41
SearchAll.Click
Sleep 1
FindAndReplace.Close
-
+
Call wTypeKeys "<Home>"
Call wTypeKeys "<Shift End>"
EditCopy
if Len(GetClipboardText) > 8 then Warnlog "Something wrong in the column1"
-
+
'detailed check for column2
Kontext
EditSearchAndReplace
@@ -931,12 +933,12 @@ testcase tFormatPage_41
SearchAll.Click
Sleep 1
FindAndReplace.Close
-
+
Call wTypeKeys "<Home>"
Call wTypeKeys "<Shift End>"
EditCopy
if Len(GetClipboardText) > 14 then Warnlog "Something wrong in the column2"
-
+
printlog " Close active document "
Do Until GetDocumentCount = 0
Call hCloseDocument
diff --git a/testautomation/writer/optional/includes/formatpage/w_formatpage4.inc b/testautomation/writer/optional/includes/formatpage/w_formatpage4.inc
index 60b8182fd15d..9b800e3bad4b 100755..100644
--- a/testautomation/writer/optional/includes/formatpage/w_formatpage4.inc
+++ b/testautomation/writer/optional/includes/formatpage/w_formatpage4.inc
@@ -58,32 +58,32 @@ testcase tFormatPage_48
printlog "No test with asian lovale, because checkbox 'Asian language support' is disabled by default!"
goto endsub
end select
-
+
sTestText1 = "This is the test!"
sTestText2 = "That isn't a test!"
-
+
PrintLog "- Text flow direction test Right to Left (Vertical) - Paragraph"
'/// Text flow direction test Right to Left (Vertical) - Paragraph
-
+
Call hNewDocument
-
+
'/// Set Asian language support enabled
Call ActiveDeactivateCTLSupport(FALSE)
Call ActiveDeactivateAsianSupport(TRUE)
-
+
'/// Input some test words
Call wTypeKeys sTestText1
Call wTypeKeys "<Return>"
Call wTypeKeys sTestText2
Sleep 1
-
+
'/// formatPage , tabpage page, select right to left (vertical)
fFormatPageWriter("TabSeite")
Textfluss.Select 2
Sleep 1
TabSeite.OK
Sleep 2
-
+
'/// Check if the direction of the test words is changed
Call wTypeKeys "<MOD1 Home>"
Call wTypeKeys "<Shift Down>", 4
@@ -92,7 +92,7 @@ testcase tFormatPage_48
if GetClipboardText <> "This" then
Warnlog "Something wrong in first word - get " &GetClipboardText
end if
-
+
Call wTypeKeys "<Home><Left>"
Call wTypeKeys "<Shift Down>" , 4
Sleep 1
@@ -100,11 +100,11 @@ testcase tFormatPage_48
if GetClipboardText <> "That" then
Warnlog "Something wrong in second word - get " &GetClipboardText
end if
-
+
if RecheckAsianSupport = False then
Call ActiveDeactivateAsianSupport(FALSE)
end if
-
+
Call hCloseDocument
endcase
@@ -116,32 +116,32 @@ testcase tFormatPage_49
Dim sTestText as String
Dim RecheckAsianSupport as boolean
RecheckAsianSupport = gAsianSup
-
+
sTestText = "This is the test!"
-
+
PrintLog "- Text flow direction test Right to Left (Vertical) - Section"
'/// Text flow direction test Right to Left (Vertical) - Section
-
+
Call hNewDocument
-
+
'/// Set Asian language support enabled
Call ActiveDeactivateAsianSupport(TRUE)
-
+
'/// Insert a section
fInsertSection("TabBereiche")
TabBereiche.OK
-
+
'/// insert something in the section
Call wTypeKeys "<Up>"
Call wTypeKeys sTestText
-
+
'/// formatPage , tabpage page, select right to left (vertical)
fFormatPageWriter("TabSeite")
Textfluss.Select 2
Sleep 1
TabSeite.OK
Sleep 2
-
+
'/// Check if the direction of the test words is changed
Call wTypeKeys "<Home>"
Call wTypeKeys "<Shift Down>" , 4
@@ -151,7 +151,7 @@ testcase tFormatPage_49
if RecheckAsianSupport = False then
Call ActiveDeactivateAsianSupport(FALSE)
end if
-
+
Call hCloseDocument
endcase
@@ -165,12 +165,12 @@ testcase tFormatPage_50
PrintLog "- Text flow direction test Right to Left (Vertical) - Footnotes"
'/// Text flow direction test Right to Left (Vertical) - Footnotes
-
+
Call hNewDocument
-
+
'/// Set Asian language support enabled
Call ActiveDeactivateAsianSupport(TRUE)
-
+
'/// Insert a footnotes
InsertFootnote
Kontext "FussnoteEinfuegen"
@@ -179,17 +179,17 @@ testcase tFormatPage_50
Sleep 1
FussnoteEinfuegen.OK
Sleep 1
-
+
Call wTypeKeys "<PageUp>"
Sleep 1
-
+
'/// formatPage , tabpage page, select right to left (vertical)
Call fFormatPageWriter("TabSeite")
Textfluss.Select 2
Sleep 1
TabSeite.OK
Sleep 2
-
+
'/// Check if the direction of the footnote is changed
Call wTypeKeys "<Down>"
try
@@ -199,7 +199,7 @@ testcase tFormatPage_50
Warnlog "Should NOT execute edit/footnote when focus is under the footnote"
catch
endcatch
-
+
Call wTypeKeys "<Up>"
try
EditFootnote
@@ -212,7 +212,7 @@ testcase tFormatPage_50
if RecheckAsianSupport = False then
Call ActiveDeactivateAsianSupport(FALSE)
end if
-
+
Call hCloseDocument
endcase
@@ -223,15 +223,15 @@ testcase tFormatPage_51
Dim RecheckAsianSupport as boolean
RecheckAsianSupport = gAsianSup
-
+
PrintLog "- Text flow direction test Right to Left (Vertical) - Endnotes"
'/// Text flow direction test Right to Left (Vertical) - Endnotes
-
+
Call hNewDocument
-
+
'/// Set Asian language support enabled
Call ActiveDeactivateAsianSupport(TRUE)
-
+
'/// Insert a endnotes
InsertFootnote
Kontext "FussnoteEinfuegen"
@@ -240,17 +240,17 @@ testcase tFormatPage_51
Sleep 1
FussnoteEinfuegen.OK
Sleep 1
-
+
Call wTypeKeys "<PageUp>"
Sleep 1
-
+
'/// formatPage , tabpage page, select right to left (vertical)
Call fFormatPageWriter("TabSeite")
Textfluss.Select 2
Sleep 1
TabSeite.OK
Sleep 2
-
+
'/// Check if the direction of the endnote is changed
Call wTypeKeys "<Down>"
try
@@ -260,7 +260,7 @@ testcase tFormatPage_51
Warnlog "Should NOT execute edit/footnote when focus is under the endnote"
catch
endcatch
-
+
Call wTypeKeys "<Up>"
try
EditFootnote
@@ -273,7 +273,7 @@ testcase tFormatPage_51
if RecheckAsianSupport = False then
Call ActiveDeactivateAsianSupport(FALSE)
end if
-
+
Call hCloseDocument
endcase
@@ -285,20 +285,20 @@ testcase tFormatPage_52
Dim sTest1 as String , sTest2 as String , sTest3 as String
Dim RecheckAsianSupport as boolean
RecheckAsianSupport = gAsianSup
-
+
sTest1 = "A1" : sTest2 = "B1" : sTest3 = "A2"
-
+
PrintLog "- Text flow direction test Right to Left (Vertical) - Table"
'/// Text flow direction test Right to Left (Vertical) - Table
-
+
Call hNewDocument
-
+
'/// Set Asian language support enabled
Call ActiveDeactivateAsianSupport(TRUE)
-
+
'/// Insert a table
Call hTabelleEinfuegen
-
+
'/// + input some string in the table , like
'/// a1 b1
'/// a2
@@ -312,14 +312,14 @@ testcase tFormatPage_52
wait 500
Call wTypeKeys sTest3
Call wTypeKeys "<Up><Home>" 'so far, the focus should be in front of A1
-
+
'/// formatPage , tabpage page, select right to left (vertical)
Call fFormatPageWriter("TabSeite")
Textfluss.Select 2
Sleep 1
TabSeite.OK
Sleep 2
-
+
'/// Check if the direction of the table is changed
Call wTypeKeys "<Shift Down>" , 2
Sleep 1
@@ -327,7 +327,7 @@ testcase tFormatPage_52
if GetClipboardText <> sTest1 then
Warnlog "1st word in table is wrong!"
end if
-
+
Call wTypeKeys "<Down>"
Call wTypeKeys "<Shift Down>" , 2
Sleep 1
@@ -335,7 +335,7 @@ testcase tFormatPage_52
if GetClipboardText <> sTest2 then
Warnlog "2nd word in table is wrong!"
end if
-
+
Call wTypeKeys "<Left><Up>"
Call wTypeKeys "<Shift Home>"
Sleep 1
@@ -347,7 +347,7 @@ testcase tFormatPage_52
if RecheckAsianSupport = False then
Call ActiveDeactivateAsianSupport(FALSE)
end if
-
+
Call hCloseDocument
endcase
@@ -355,36 +355,36 @@ endcase
'-------------------------------------------------------------------------------------------
testcase tFormatPage_53
-
+
Dim sTest as String
Dim sTestFile as String
Dim RecheckAsianSupport as boolean
RecheckAsianSupport = gAsianSup
-
+
sTest = "Test"
sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\formatpage\testColumnVertical.sxw")
-
+
PrintLog "- Text flow direction test Right to Left (Vertical) - Column"
'/// Text flow direction test Right to Left (Vertical) - Column
-
+
Call hNewDocument
-
+
'/// Set Asian language support enabled
Call ActiveDeactivateAsianSupport(TRUE)
-
+
'/// Open test file testColumnVertical.sxw
'/// + There are 8 columns in the page , and a test
'/// + word is in 3rd column
Call hFileOpen(sTestFile)
Call sMakeReadOnlyDocumentEditable
-
+
'/// formatPage , tabpage page, select right to left (vertical)
Call fFormatPageWriter("TabSeite")
Textfluss.Select 2
Sleep 1
TabSeite.OK
Sleep 2
-
+
'/// Check if the direction of the column is changed
Kontext
EditSearchAndReplace
@@ -395,20 +395,20 @@ testcase tFormatPage_53
Sleep 1
FindAndReplace.Close
Sleep 1
-
+
Call wTypeKeys "<Down>"
Sleep 1
-
+
Call wTypeKeys "<Shift Up>" , 4
EditCopy
if GetClipboardText <> sTest then
Warnlog "the test word is wrong!"
end if
-
+
if RecheckAsianSupport = False then
Call ActiveDeactivateAsianSupport(FALSE)
end if
-
+
printlog " Close active document "
Do Until GetDocumentCount = 0
Call hCloseDocument
@@ -626,6 +626,7 @@ testcase tFormatPage_58
case 39 : sDefaultShadowColor = "Grigio"
case 46 : sDefaultShadowColor = "Grått"
case 49 : sDefaultShadowColor = "Grau"
+ case 50 : sDefaultShadowColor = "Siva"
case 55 : sDefaultShadowColor = "Cinza"
case 81 : sDefaultShadowColor = "ç°è‰²"
case 82 : sDefaultShadowColor = "회색"
@@ -749,7 +750,7 @@ testcase tFormatPage_60
Oben.SetText sSpacingToContentsU
Unten.SetText sSpacingToContentsB
StilFarbe.Select iBorderColor 'set border color
-
+
Position.TypeKeys "<Right>" , 4
Sleep 2
Groesse.SetText sShadowDistance
diff --git a/testautomation/writer/optional/includes/number/w_206_.inc b/testautomation/writer/optional/includes/number/w_206_.inc
index 70d47bd12bf4..ae7698017216 100755
--- a/testautomation/writer/optional/includes/number/w_206_.inc
+++ b/testautomation/writer/optional/includes/number/w_206_.inc
@@ -358,11 +358,11 @@ testcase tToolsNumbering6
Warnlog "First paragraph not 'This is the first' but: " & sClipBrd(0)
end if
Case 2
- if sClipBrd(1) <> "1.This is the second" then
+ if sClipBrd(1) <> "1. This is the second" then
Warnlog "First paragraph not '1.This is the second' but: " & sClipBrd(1)
end if
Case 3
- if sClipBrd(2) <> "2.This is the third" then
+ if sClipBrd(2) <> "2. This is the third" then
Warnlog "First paragraph not '2.This is the third' but: " & sClipBrd(2)
end if
end select
@@ -472,12 +472,12 @@ testcase tToolsNumbering7
end if
end if
Case 2
- if sClipBrd(1) <> "1.1.My second number" then
- Warnlog "#128041#First paragraph not '1.1.My second number' but: " & sClipBrd(1)
+ if sClipBrd(1) <> "1. 1.My second number" then
+ Warnlog "#128041#Second paragraph not '1. 1.My second number' but: " & sClipBrd(1)
end if
Case 3
- if sClipBrd(2) <> "2.2.My third number" then
- Warnlog "#128041#First paragraph not '2.2.My third number' but: " & sClipBrd(2)
+ if sClipBrd(2) <> "2. 2.My third number" then
+ Warnlog "#128041#Third paragraph not '2. 2.My third number' but: " & sClipBrd(2)
end if
end select
next i
@@ -707,16 +707,16 @@ testcase tToolsNumbering11
For i = 1 to 3
Select Case i
Case 1
- if sClipBrd(0) <> "11A new first paragraph" then
- Warnlog "First Heading not: '11A new first paragraph' but: " & sClipBrd(0)
+ if sClipBrd(0) <> "1 1A new first paragraph" then
+ Warnlog "First Heading not: '1 1A new first paragraph' but: " & sClipBrd(0)
end if
Case 2
- if sClipBrd(1) <> "22" then
- Warnlog "First paragraph not '22' but: " & sClipBrd(1)
+ if sClipBrd(1) <> "2 2" then
+ Warnlog "First paragraph not '2 2' but: " & sClipBrd(1)
end if
Case 3
- if sClipBrd(2) <> "33A new third paragraph" then
- Warnlog "First paragraph not '33A new third paragraph' but: " & sClipBrd(2)
+ if sClipBrd(2) <> "3 3A new third paragraph" then
+ Warnlog "First paragraph not '3 3A new third paragraph' but: " & sClipBrd(2)
end if
end select
next i
diff --git a/testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc b/testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc
index 8412302d6c35..5e13f9353891 100755
--- a/testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc
+++ b/testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc
@@ -467,11 +467,11 @@ testcase i103265
end if
Case 2:
if GetClipboardText <> "1. Test" then
- Warnlog "First hyperlink not correctly jumped to. Not '# 1. Test' but " & GetClipboardtext
+ Warnlog "Second hyperlink not correctly jumped to. Not '# 1. Test' but " & GetClipboardtext
end if
Case 3:
- if GetClipboardText <> "Test " then
- Warnlog "First hyperlink not correctly jumped to. Not 'Test' but " & GetClipboardtext
+ if GetClipboardText <> "1 Test " then
+ Warnlog "Third hyperlink not correctly jumped to. Not '1 Test' but " & GetClipboardtext
end if
end select
next i
diff --git a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc
index b1576b494469..886f7fa91967 100755..100644
--- a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc
+++ b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc
@@ -57,7 +57,7 @@ testcase tToolsSpellcheckWithShortcut
Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer."
exit sub
end if
-
+
call hFileOpen (TheFile,false)
Call sMakeReadOnlyDocumentEditable
@@ -69,12 +69,13 @@ testcase tToolsSpellcheckWithShortcut
case 39 : Call wTypeKeys ("Don Cara Mio, capitoliooo?<Home>")
case 49 : Call wTypeKeys ("Dies ist ein Rechtschreibtexxxxt<Home>")
case 46 : Call wTypeKeys ("Det här är en rättstavningstexxxxt<Home>")
+ case 50 : Call wTypeKeys ("To je test Ärkvana<Home>")
case 07 : Printlog "- No Spellcheck in Russian!"
goto endsub
case 48 : Printlog "- No Spellcheck in Polish!"
goto endsub
case 55 : Printlog "- No Spellcheck in Brazilian!"
- goto endsub
+ goto endsub
case 81 : Printlog "- No Spellcheck in Japanese!"
goto endsub
case 82 : Printlog "- No Spellcheck in Korean!"
@@ -92,10 +93,10 @@ testcase tToolsSpellcheckWithShortcut
Call wTypeKeys "<HOME>" 'Setting cursor to beginning
Call wTypeKeys "<F7>" 'Calling spellchecker with shortcut
sleep (1)
-
+
Kontext "Active"
if Active.Exists(1) then 'checking if messagebox comes up
- if Active.getRT = 304 then 'checking ressource type
+ if Active.getRT = 304 then 'checking ressource type
Active.OK
else
printlog "No message Box!"
@@ -178,6 +179,7 @@ testcase tToolsSpellcheckCorrect
case 46 : FFText = "Den här filen innehåller viktig programinformation.<Return>"
case 48 : FFText = "Nie wolno w zadnim wypadku przerywa uruchomionego serwisu !<Return>"
case 49 : FFText = "Dies ist ein Text ohne Fehler.<Return>"
+ case 50 : FFText = "To je besedilo brez napake.<Return>"
case 55 : FFText = "Ele ouviu passos silenciosos atrás dele. Isso não estava certo.<Return>"
case else : QAErrorLog " - The language " + iSprache +" has no defined language text. No Test !"
exit Sub
@@ -263,6 +265,9 @@ testcase tToolsSpellcheck1Mistake
case 49 : sErrorSampleText = "Diees ist ein Fehler."
sWordToBeChecked = "Diees"
sLanguageName = "Deutsch (Deutschland)"
+ case 50 : sErrorSampleText = "Tuki je nekaj narobe."
+ sWordToBeChecked = "Tuki"
+ sLanguageName = "SlovenÅ¡Äina"
case 55 : sErrorSampleText = "Esta poderia ser a respista para suas preces?"
sWordToBeChecked = "respista"
sLanguageName = "Português (Brasil)"
@@ -305,13 +310,13 @@ testcase tToolsSpellcheck1Mistake
Call hCloseDocument
goto endsub
end if
- printlog "Current selected dictionary language is: " & DictionaryLanguage.GetSelText
+ printlog "Current selected dictionary language is: " & DictionaryLanguage.GetSelText
' Dictionary Language is language dependend. Function to be created
printlog " - check language"
'if DictionaryLanguage.GetSelText <> gLanguage then Warnlog "Dictionary language " + DictionaryLanguage.GetSelText +" selected"
printlog " - replace wrong word with a suggestion"
'/// replace wrong word with a suggestion ///
-
+
if trim$(NotInDictionary.GetText) <> trim(sErrorSampleText) then
warnlog " " & sErrorSampleText & " has not been detected as mistake. Detected mistake is:" & NotInDictionary.GetText
end if
@@ -343,7 +348,7 @@ testcase tToolsSpellcheck1Mistake
Active.No
endcatch
end if
-
+
Kontext "Spellcheck"
if Spellcheck.Exists then SpellcheckClose.Click
@@ -377,7 +382,7 @@ testcase tToolsSpellcheckForward
QAErrorLog "The language " + iSprache +" has no defined Errortext. No test!" 'iSystemSprache
goto endsub
end select
-
+
if gApplication = "MASTERDOCUMENT" then
if wInsertDocumentinMasterDoc(InsFile) = False then goto endsub
EditPaste
@@ -387,7 +392,7 @@ testcase tToolsSpellcheckForward
end if
'/// point cursor to beginning of document and execute spellcheck ///
Call wTypeKeys "<Mod1 Home>"
-
+
select case iSprache
case 01 : sDummy = "exprass" : sWordToBeAdded = "pablischer"
case 07 : sDummy = "решаaт" : sWordToBeAdded = "кaнкретных"
@@ -401,6 +406,7 @@ testcase tToolsSpellcheckForward
case 46 : sDummy = "handbroken" : sWordToBeAdded = "viktikt"
case 48 : sDummy = "znajdujacej" : sWordToBeAdded = "usuniete"
case 49 : sDummy = "reichtt" : sWordToBeAdded = "viierter"
+ case 50 : sDummy = "Paglejmo" : sWordToBeAdded = "Ätrto"
case 55 : sDummy = "horat" : sWordToBeAdded = "dpa"
end select
@@ -537,7 +543,7 @@ testcase tToolsSpellcheckOnlyOneWord
Dim InsFile as string
Dim ReplacedWith as String
Dim i as integer
-
+
'/// Open specified document depending on language to check spellcheck ///
'/// document has 1 defined wrong word ///
PrintLog "- Tools / Spellchecking / Check only one word"
@@ -550,7 +556,7 @@ testcase tToolsSpellcheckOnlyOneWord
QAErrorLog "The language " + iSprache +" has no defined Errortext. No test!"
goto endsub
end select
-
+
if gApplication = "MASTERDOCUMENT" then
if wInsertDocumentinMasterDoc(InsFile) = False then goto endsub
EditPaste
@@ -559,7 +565,7 @@ testcase tToolsSpellcheckOnlyOneWord
Call sMakeReadOnlyDocumentEditable
end if
Call wTypeKeys "<Mod1 Home>"
-
+
select case iSprache
case 01 : sWordToBeChecked = "excetionally" ' this word is wrong
case 07 : sWordToBeChecked = "КaнÑтитуции"
@@ -573,6 +579,7 @@ testcase tToolsSpellcheckOnlyOneWord
case 46 : sWordToBeChecked = "avrttades" ' this word is wrong
case 48 : sWordToBeChecked = "stosowanei" ' this word is wrong
case 49 : sWordToBeChecked = "georaphischen" ' this word is wrong
+ case 50 : sWordToBeChecked = "ssmo" ' this word is wrong
case 55 : sWordToBeChecked = "Veigo" ' this word is wrong
end select
@@ -613,7 +620,7 @@ testcase tToolsSpellcheckOnlyOneWord
ToolsSpellcheckWriter
Kontext "Active"
if Active.Exists then
- if Active.GetRT = 304 then
+ if Active.GetRT = 304 then
Warnlog "Spellcheck doesn't work correctly:" & Active.Gettext
try
Active.Ok
@@ -659,11 +666,11 @@ testcase tToolsSpellcheckOnlyOneWord
Warnlog Active.Gettext
endcatch
end if
- end if
-
+ end if
+
Kontext "Spellcheck"
if Spellcheck.Exists then SpellcheckClose.Click
-
+
Call wTypeKeys "<Mod1 Shift Left>"
try
EditCopy
@@ -705,10 +712,10 @@ testcase tToolsSpellcheckOnlyOneWord
Spellcheck.Close
end if
end if
-
+
Kontext "Spellcheck"
if Spellcheck.Exists then Spellcheck.Close
-
+
'/// Close document ///
Call hCloseDocument
endcase
@@ -738,8 +745,8 @@ testcase tToolsSpellcheckAutomatic
Call sMakeReadOnlyDocumentEditable
'/// Enable Auto-Spellcheck in options
- Call wEnableAutoSpellcheck ( true )
-
+ Call wEnableAutoSpellcheck ( true )
+
'/// Check Auto-Spellcheck and insert a sentence with 2 mistakes ///
printlog " - write text"
select case iSprache
@@ -766,7 +773,7 @@ testcase tToolsSpellcheckAutomatic
case 36 : wTypeKeys "A hétezres koszovói amerikai kontingens jelentos részét is a magyarországi bázison helyezi majd el."
iError1 = 1 : iError2 = 4
sError1 = "hétezres" : sError1 = "jelentos"
- sDefaultFormat = "Alapértelmezett"
+ sDefaultFormat = "Alapértelmezett"
case 39 : wTypeKeys "La sfumaturar è statsi modificata senza salvare "
iError1 = 1 : iError2 = 2
sError1 = "sfumaturar" : sError1 = "statsi"
@@ -787,10 +794,14 @@ testcase tToolsSpellcheckAutomatic
iError1 = 1 : iError2 = 2
sError1 = "hiaer" : sError1 = "swei"
sDefaultFormat = "Standard"
+ case 50 : wTypeKeys "Tuki sta dve napki"
+ iError1 = 1 : iError2 = 2
+ sError1 = "Tuki" : sError1 = "napki"
+ sDefaultFormat = "Standard"
case 55 : wTypeKeys "Aqui poderá elimitnar componentes já instalados ou instalar novos compotentes numa "
iError1 = 2 : iError2 = 7
sError1 = "elimitnar" : sError1 = "compotentes"
- sDefaultFormat = "Padrão"
+ sDefaultFormat = "Padrão"
case 81 : Printlog "- No Spellcheck in Japanese!"
Call hCloseDocument
goto endsub
@@ -809,7 +820,7 @@ testcase tToolsSpellcheckAutomatic
end select
Call wTypeKeys "<Space><Return>"
-
+
printlog " - relieve mistake"
Call wTypeKeys "<Up><Home>"
Call wTypeKeys "<Mod1 Right>", iError1
@@ -921,7 +932,7 @@ testcase tToolsSpellcheckChangeLanguageAttribute
QAErrorLog "The language " + iSprache +" has no defined Errortext. No test!" 'iSystemSprache
goto endsub
end select
-
+
if gApplication = "MASTERDOCUMENT" then
if wInsertDocumentinMasterDoc(InsFile) = False then goto endsub
EditPaste
@@ -930,7 +941,7 @@ testcase tToolsSpellcheckChangeLanguageAttribute
Call sMakeReadOnlyDocumentEditable
end if
Call wTypeKeys "<Mod1 Home>"
-
+
select case iSprache
case 01 : sWordToBeChecked = "excetionally" ' this word is wrong
case 03 : sWordToBeChecked = "semstre" ' this word is wrong
@@ -944,6 +955,7 @@ testcase tToolsSpellcheckChangeLanguageAttribute
case 46 : sWordToBeChecked = "avrttades" ' this word is wrong
case 48 : sWordToBeChecked = "stosowanei" ' this word is wrong
case 49 : sWordToBeChecked = "georaphischen" ' this word is wrong
+ case 50 : sWordToBeChecked = "ssmo" ' this word is wrong
case 55 : sWordToBeChecked = "Veigo" ' this word is wrong
end select
@@ -1011,7 +1023,7 @@ testcase tToolsSpellcheckChangeLanguageAttribute
Suggestions.Select 1
ReplacedWith = Suggestions.GetSelText
printlog "- replace with word: " & ReplacedWith
- i = DictionaryLanguage.GetItemCount + 1
+ i = DictionaryLanguage.GetItemCount + 1
end if
end if
next i
@@ -1045,7 +1057,7 @@ testcase tToolsSpellcheckChangeLanguageAttribute
wait 500
Call wTypeKeys "<Mod1 Home>"
printlog "- find replaced word"
-
+
EditSearchAndReplace
Kontext "FindAndReplace"
try
@@ -1073,7 +1085,7 @@ testcase tToolsSpellcheckChangeLanguageAttribute
Kontext
Active.Setpage TabFont
Kontext "TabFont"
- try
+ try
if Language.GetSelText <> CurrentLanguage then
if Language.GetSelText = PriorLanguage then
Warnlog "Language Attributes has not been set to" & CurrentLanguage
@@ -1118,7 +1130,7 @@ testcase tToolsSpellcheckButtonChange
QAErrorLog "The language " + iSprache +" has no defined Errortext. No test!" 'iSystemSprache
goto endsub
end select
-
+
if gApplication = "MASTERDOCUMENT" then
if wInsertDocumentinMasterDoc(InsFile) = False then goto endsub
EditPaste
@@ -1185,7 +1197,7 @@ testcase tToolsSpellcheckButtonChangeAll
QAErrorLog "The language " + iSprache +" has no defined Errortext. No test!" 'iSystemSprache
goto endsub
end select
-
+
if gApplication = "MASTERDOCUMENT" then
if wInsertDocumentinMasterDoc(InsFile) = False then goto endsub
EditPaste
@@ -1222,7 +1234,7 @@ testcase tToolsSpellcheckButtonChangeAll
end if
'/// Close document
Call hCloseDocument
-
+
endcase
' *******************************************************************
@@ -1257,6 +1269,7 @@ testcase tToolsThesaurus
case 46 : sWordInitial = "Däng"
case 48 : sWordInitial = "wypowiedź"
case 49 : sWordInitial = "Mann"
+ case 50 : sWordInitial = "smisel"
case 55 : Printlog "- No Thesaurus in Portuguese (Brazil) !"
goto endsub
case 81 : Printlog "- No Thesaurus in Japanese!"
@@ -1282,7 +1295,7 @@ testcase tToolsThesaurus
'/// Call Thesaurus without a written word ///
ToolsLanguageThesaurus
Kontext "Thesaurus"
- if CurrentWord.GetSelText <> "" then Warnlog "- Though no word has been selected Current Word textfield is filled !"
+ if CurrentWord.GetSelText <> "" then Warnlog "- Though no word has been selected Current Word textfield is filled !"
if ReplaceWith.GetText <> "" then Warnlog "- Though no word has been selected there is a replacetext in the textfield!"
printlog "Set language dependent word in textfield Current Word"
CurrentWord.Settext sWordInitial
@@ -1307,11 +1320,11 @@ testcase tToolsThesaurus
end if
Call hCloseDocument
wait 500
-
+
printlog " Open new preformatted-document where the formatting is set to the language we wish to test."
call hFileOpen (TheFile,false)
- Call sMakeReadOnlyDocumentEditable
-
+ Call sMakeReadOnlyDocumentEditable
+
Call wTypeKeys sWordInitial
Call wTypeKeys "<Home><Right><Right>"
@@ -1320,12 +1333,12 @@ testcase tToolsThesaurus
Kontext "Thesaurus"
wait 500
if CurrentWord.GetSeltext = sWordInitial then
- sWordToBeFound = ReplaceWith.Gettext
+ sWordToBeFound = ReplaceWith.Gettext
if Alternatives.GetItemCount > 0 then
printlog "Select last entry in alternatives list"
Alternatives.Select Alternatives.GetItemCount
Alternatives.TypeKeys "<Space>"
- if ReplaceWith.Gettext = sWordToBeFound then
+ if ReplaceWith.Gettext = sWordToBeFound then
Warnlog "Though alternative was selected replace with was not changed"
else
sWordToBeFound = ReplaceWith.Gettext
@@ -1344,21 +1357,22 @@ testcase tToolsThesaurus
end if
Call wTypeKeys "<Home><Shift End><Delete>"
- Call wTypeKeys sWordInitial
-
+ Call wTypeKeys sWordInitial
+
printlog "- Replace unchecked ( Cursor at words end )"
ToolsLanguageThesaurus
Kontext "Thesaurus"
wait 500
if CurrentWord.GetSeltext = sWordInitial then
- sWordToBeFound = ReplaceWith.Gettext
- if Alternatives.GetItemCount > 0 then
+ sWordToBeFound = ReplaceWith.Gettext
+ if Alternatives.GetItemCount > 0 then
printlog "Select last entry in alternatives list"
Alternatives.Select Alternatives.GetItemCount
- Alternatives.TypeKeys "<Space>"
- if ReplaceWith.Gettext = sWordToBeFound then
+
+ if ReplaceWith.Gettext = sWordToBeFound then
Warnlog "Though alternative was selected replace with was not changed"
else
+ Alternatives.TypeKeys "<Space>"
sWordToBeFound = ReplaceWith.Gettext
end if
Thesaurus.OK
@@ -1373,7 +1387,7 @@ testcase tToolsThesaurus
else
Warnlog "Current word is not selected word !"
end if
-
+
'/// Close thesaurus and writerdocument ///
Call hCloseDocument
endcase
@@ -1411,6 +1425,7 @@ testcase tToolsThesaurusSynonyms
case 46 : sWordInitial = "Däng"
case 48 : sWordInitial = "wypowiedź"
case 49 : sWordInitial = "Mann"
+ case 50 : sWordInitial = "smisel"
case 55 : Printlog "- No Thesaurus in Portuguese (Brazil) !"
goto endsub
case 81 : Printlog "- No Thesaurus in Japanese!"
@@ -1460,6 +1475,3 @@ testcase tToolsThesaurusSynonyms
Call hCloseDocument
endcase
-
-
-
diff --git a/testautomation/writer/optional/input/linguistik/050.odt b/testautomation/writer/optional/input/linguistik/050.odt
new file mode 100755
index 000000000000..3a90c03e99aa
--- /dev/null
+++ b/testautomation/writer/optional/input/linguistik/050.odt
Binary files differ
diff --git a/testautomation/writer/optional/input/spellcheck/Language_Guessing_Sample_Texts.odt b/testautomation/writer/optional/input/spellcheck/Language_Guessing_Sample_Texts.odt
index e66f7a3d6c43..ae765bd5f220 100755
--- a/testautomation/writer/optional/input/spellcheck/Language_Guessing_Sample_Texts.odt
+++ b/testautomation/writer/optional/input/spellcheck/Language_Guessing_Sample_Texts.odt
Binary files differ
diff --git a/testautomation/writer/optional/input/spellcheck/spellcheck_50.odt b/testautomation/writer/optional/input/spellcheck/spellcheck_50.odt
new file mode 100755
index 000000000000..30f9d7cdc76b
--- /dev/null
+++ b/testautomation/writer/optional/input/spellcheck/spellcheck_50.odt
Binary files differ
diff --git a/testautomation/writer/optional/input/spellcheck/st1_2_50.odt b/testautomation/writer/optional/input/spellcheck/st1_2_50.odt
new file mode 100755
index 000000000000..7402e851bb65
--- /dev/null
+++ b/testautomation/writer/optional/input/spellcheck/st1_2_50.odt
Binary files differ
diff --git a/testautomation/writer/required/includes/w_020_.inc b/testautomation/writer/required/includes/w_020_.inc
index d5f4709d9c21..9235d1b83d7b 100755
--- a/testautomation/writer/required/includes/w_020_.inc
+++ b/testautomation/writer/required/includes/w_020_.inc
@@ -54,6 +54,8 @@ sub w_020_
Call tHtmlDoc_TB_Rest
gApplication = "WRITER"
+ Call tUpdtFindBar()
+
end sub
'-----------------------------------------------------------
diff --git a/testautomation/writer/required/w_updt.bas b/testautomation/writer/required/w_updt.bas
index e9fc5aab6458..b8779647281b 100755
--- a/testautomation/writer/required/w_updt.bas
+++ b/testautomation/writer/required/w_updt.bas
@@ -86,6 +86,7 @@ sub LoadIncludeFiles
use "global\required\includes\g_001.inc"
use "global\required\includes\g_option.inc" ' global subroutines for Tools / Options
use "global\required\includes\g_printing.inc"
+ use "global\required\includes\g_findbar.inc"
use "global\tools\includes\optional\t_xml_filter1.inc" ' global routines for XML-functionality
use "global\tools\includes\optional\t_docfuncs.inc"
use "global\tools\includes\optional\t_control_objects.inc"
diff --git a/toolkit/inc/toolkit/awt/vclxdevice.hxx b/toolkit/inc/toolkit/awt/vclxdevice.hxx
index 62753a36136d..bb1c35078055 100644
--- a/toolkit/inc/toolkit/awt/vclxdevice.hxx
+++ b/toolkit/inc/toolkit/awt/vclxdevice.hxx
@@ -58,7 +58,7 @@ class TOOLKIT_DLLPUBLIC VCLXDevice : public ::com::sun::star::awt::XDevice,
friend class VCLXGraphics;
private:
- NAMESPACE_VOS(IMutex)& mrMutex; // Reference to SolarMutex
+ vos::IMutex& mrMutex; // Reference to SolarMutex
OutputDevice* mpOutputDevice;
public:
@@ -66,7 +66,7 @@ public:
sal_uInt32 nFlags;
protected:
- NAMESPACE_VOS(IMutex)& GetMutex() { return mrMutex; }
+ vos::IMutex& GetMutex() { return mrMutex; }
void DestroyOutputDevice();
public:
diff --git a/toolkit/inc/toolkit/awt/vclxgraphics.hxx b/toolkit/inc/toolkit/awt/vclxgraphics.hxx
index 5fda9ac947ee..6a076a5339b8 100644
--- a/toolkit/inc/toolkit/awt/vclxgraphics.hxx
+++ b/toolkit/inc/toolkit/awt/vclxgraphics.hxx
@@ -60,7 +60,7 @@ class VCLXGraphics : public ::com::sun::star::awt::XGraphics,
public ::cppu::OWeakObject
{
private:
- NAMESPACE_VOS(IMutex)& mrMutex; // Reference to SolarMutex
+ vos::IMutex& mrMutex; // Reference to SolarMutex
::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice> mxDevice; // nur um bei getDevice() immer das gleiche zurueckzugeben
OutputDevice* mpOutputDevice;
@@ -73,7 +73,7 @@ private:
Region* mpClipRegion;
protected:
- NAMESPACE_VOS(IMutex)& GetMutex() { return mrMutex; }
+ vos::IMutex& GetMutex() { return mrMutex; }
public:
VCLXGraphics();
diff --git a/toolkit/inc/toolkit/helper/throbberimpl.hxx b/toolkit/inc/toolkit/helper/throbberimpl.hxx
index 5ca6ec83d330..b944a74b65d2 100644
--- a/toolkit/inc/toolkit/helper/throbberimpl.hxx
+++ b/toolkit/inc/toolkit/helper/throbberimpl.hxx
@@ -43,7 +43,7 @@ namespace toolkit
class Throbber_Impl
{
private:
- NAMESPACE_VOS(IMutex)& mrMutex; // Reference to SolarMutex
+ vos::IMutex& mrMutex; // Reference to SolarMutex
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > > maImageList;
::com::sun::star::uno::Reference< VCLXWindow > mxParent;
@@ -55,7 +55,7 @@ namespace toolkit
DECL_LINK( TimeOutHdl, Throbber_Impl* );
- NAMESPACE_VOS(IMutex)& GetMutex() { return mrMutex; }
+ vos::IMutex& GetMutex() { return mrMutex; }
public:
Throbber_Impl( ::com::sun::star::uno::Reference< VCLXWindow > xParent,
diff --git a/toolkit/qa/unoapi/knownissues.xcl b/toolkit/qa/unoapi/knownissues.xcl
index 429d7693c833..7f8896a35597 100644
--- a/toolkit/qa/unoapi/knownissues.xcl
+++ b/toolkit/qa/unoapi/knownissues.xcl
@@ -241,9 +241,6 @@ toolkit.AccessibleMenu::com::sun::star::accessibility::XAccessibleValue
toolkit.AccessibleMenuBar::com::sun::star::accessibility::XAccessibleEventBroadcaster
toolkit.AccessibleMenuBar::com::sun::star::accessibility::XAccessibleSelection
-### i111076 ###
-toolkit.Toolkit::com::sun::star::awt::XDataTransferProviderAccess
-
### i111113 ###
toolkit.AccessibleStatusBarItem::com::sun::star::accessibility::XAccessibleComponent
toolkit.AccessibleStatusBarItem::com::sun::star::accessibility::XAccessibleContext
diff --git a/toolkit/qa/unoapi/toolkit.sce b/toolkit/qa/unoapi/toolkit.sce
index 5a148feee573..00af010d23d6 100644
--- a/toolkit/qa/unoapi/toolkit.sce
+++ b/toolkit/qa/unoapi/toolkit.sce
@@ -8,10 +8,10 @@
#i86110 -o toolkit.AccessibleList
#i86110 -o toolkit.AccessibleListBox
#i86110 -o toolkit.AccessibleListItem
-#i111047# -o toolkit.AccessibleMenu
-#i111047# -o toolkit.AccessibleMenuBar
+-o toolkit.AccessibleMenu
+-o toolkit.AccessibleMenuBar
#i86009 -o toolkit.AccessibleMenuItem
-#i111047# -o toolkit.AccessibleMenuSeparator
+-o toolkit.AccessibleMenuSeparator
#i52607 -o toolkit.AccessiblePopupMenu
#i86107,i86110 -o toolkit.AccessibleRadioButton
-o toolkit.AccessibleScrollBar
diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx
index bfbdb531e8d2..edaf64799d43 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -109,7 +109,7 @@ void VCLXGraphics::InitOutputDevice( sal_uInt16 nFlags )
{
if(mpOutputDevice)
{
- NAMESPACE_VOS(OGuard) aVclGuard( Application::GetSolarMutex() );
+ vos::OGuard aVclGuard( Application::GetSolarMutex() );
if ( nFlags & INITOUTDEV_FONT )
{
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index f85e29c21099..1af422bf7f00 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -659,7 +659,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
if ( nType )
{
- NAMESPACE_VOS(OGuard) aVclGuard( Application::GetSolarMutex() );
+ vos::OGuard aVclGuard( Application::GetSolarMutex() );
switch ( (WindowType)nType )
{
case WINDOW_CANCELBUTTON:
diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx
index daea557d241a..3572607772dc 100644
--- a/toolkit/source/awt/vclxwindow1.cxx
+++ b/toolkit/source/awt/vclxwindow1.cxx
@@ -93,7 +93,7 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle )
// create system parent data
SystemParentData aSysParentData;
aSysParentData.nSize = sizeof ( SystemParentData );
-#if defined( WIN ) || defined( WNT ) || defined ( OS2 )
+#if defined( WNT ) || defined ( OS2 )
aSysParentData.hWnd = (HWND) nHandle;
#elif defined( QUARTZ )
aSysParentData.pView = reinterpret_cast<NSView*>(nHandle);
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index eb45dd521d9a..075080906900 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -653,7 +653,7 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent
// #82300# - 2000-12-21 - fs@openoffice.org
if (bNeedNewPeer && xParent.is())
{
- NAMESPACE_VOS(OGuard) aVclGuard( Application::GetSolarMutex() );
+ vos::OGuard aVclGuard( Application::GetSolarMutex() );
// and now this is the final withdrawal:
// With 83561, I have no other idea than locking the SolarMutex here ....
// I really hate the fact that VCL is not theadsafe ....
diff --git a/tools/inc/bootstrp/prj.hxx b/tools/inc/bootstrp/prj.hxx
index 2d7664b8b69f..994418bae4b5 100644
--- a/tools/inc/bootstrp/prj.hxx
+++ b/tools/inc/bootstrp/prj.hxx
@@ -264,7 +264,7 @@ private:
static Link aDBNotFoundHdl;
protected:
- NAMESPACE_VOS( OMutex ) aMutex;
+ vos:: OMutex aMutex;
USHORT nStarMode;
SolarFileList aFileList;
diff --git a/tools/inc/poly.h b/tools/inc/poly.h
index e6678e071f28..9228715b8da7 100644
--- a/tools/inc/poly.h
+++ b/tools/inc/poly.h
@@ -39,15 +39,8 @@
class ImplPolygonData
{
public:
-#ifdef WIN
- Point huge* mpPointAry;
- BYTE* mpFlagAry;
- GLOBALHANDLE mhPoints;
-#else
Point* mpPointAry;
BYTE* mpFlagAry;
-#endif
-
USHORT mnPoints;
ULONG mnRefCount;
};
diff --git a/tools/inc/tools/chapi.hxx b/tools/inc/tools/chapi.hxx
deleted file mode 100644
index 0acfe4cb2ca5..000000000000
--- a/tools/inc/tools/chapi.hxx
+++ /dev/null
@@ -1,68 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _CHAPI_HXX
-#define _CHAPI_HXX
-
-#include <tools/solar.h>
-
-class ChannelAgentItem;
-class INetURLObject;
-class String;
-
-enum RequestType {
- REQTYP_LOCAL_FILE = 1,
- REQTYP_MEMORY = 2
-};
-
-class ChApi
-{
-public:
- virtual ~ChApi() {}
-
- virtual void ShutDownAgent() = 0;
- virtual void SetLastSuccUpd() = 0;
-
- virtual void GetChannelObject( const INetURLObject& rURL, RequestType eStreamType,
- const String& rFileName ) = 0;
- virtual void AddChannelItem( const String& aChName, const INetURLObject& aTransmitter,
- const String& aChannel, USHORT nUpdPeriode,
- const String& rChAgentName ) = 0;
- virtual void DelChannelItem( const String& aChName ) = 0;
- virtual void SetChTransmitter( const String& aChName, const String& rNewVal ) = 0;
- virtual void SetChannel( const String& aChName, const String& rNewVal ) = 0;
- virtual void SetChannelName( const String& aChName, const String& rNewVal ) = 0;
- virtual void SetChUpdPeriode( const String& aChName, USHORT nUpdPeriode ) = 0;
- virtual void SetChannelAgentName( const String& aChName, const String& rNewVal ) = 0;
-
- virtual void SetUpdateTransmitter(ChannelAgentItem* pAgent, const INetURLObject& rTransmitter) = 0;
-};
-
-////////////////////////////////////////////////////////////////////////////////
-//
-
-#endif //_CHAPI_HXX
diff --git a/tools/inc/tools/fsys.hxx b/tools/inc/tools/fsys.hxx
index 880768c89d8c..5ef51803734b 100644
--- a/tools/inc/tools/fsys.hxx
+++ b/tools/inc/tools/fsys.hxx
@@ -159,21 +159,10 @@ enum FSysExact
// - Char-Set -
// ------------
-#if defined(WIN) || defined(W30)
-
-// MS-Windows has different char-sets for file-system and user-interface
-String Gui2FSys( const String& rStr );
-String FSys2Gui( const String& rStr );
-#define GUI2FSYS(s) Gui2FSys( s )
-#define FSYS2GUI(s) FSys2Gui( s )
-
-#else
-
-// all other OS have the same char-set for both
+// Was different for WIN, no longer needed...
#define GUI2FSYS(s) s
#define FSYS2GUI(s) s
-#endif
// ------------
// - FileStat -
diff --git a/tools/inc/tools/pstm.hxx b/tools/inc/tools/pstm.hxx
index 0d14385e5f08..2575ccae8f3e 100644
--- a/tools/inc/tools/pstm.hxx
+++ b/tools/inc/tools/pstm.hxx
@@ -60,16 +60,7 @@ public:
};
/************************** S v R t t i B a s e **************************/
-/*
-#if defined (DOS) && defined (STC)
-#ifdef WIN
-#error Fuer Win muss der Kram virtual sein (MM/MH)
-#endif
-class SvRttiBase : public SvRefBase
-#else
-class SvRttiBase : virtual public SvRefBase
-#endif
-*/
+
class TOOLS_DLLPUBLIC SvRttiBase : public SvRefBase
{
public:
diff --git a/tools/inc/tools/simplerm.hxx b/tools/inc/tools/simplerm.hxx
index c16fe41abc0b..6b8f31147f96 100644
--- a/tools/inc/tools/simplerm.hxx
+++ b/tools/inc/tools/simplerm.hxx
@@ -46,7 +46,7 @@ class InternalResMgr;
class TOOLS_DLLPUBLIC SimpleResMgr
{
protected:
- NAMESPACE_VOS(OMutex) m_aAccessSafety;
+ vos::OMutex m_aAccessSafety;
InternalResMgr* m_pResImpl;
public:
diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h
index 096d34d05b9e..cc7c189fbf84 100644
--- a/tools/inc/tools/solar.h
+++ b/tools/inc/tools/solar.h
@@ -275,42 +275,6 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); }
/* dll file extensions *******************************************************/
-/* many of these platforms are historic */
-#define SYSTEM_WINMSCI 1
-#define SYSTEM_WNTMSCI 2
-#define SYSTEM_WNTMSCA 3
-#define SYSTEM_WNTMSCP 4
-#define SYSTEM_WNTMSCM 5
-#define SYSTEM_OS2BLCI 6
-#define SYSTEM_OS2ICCI 7
-#define SYSTEM_OS2ICCI3 8
-#define SYSTEM_UNXLNXI 9
-#define SYSTEM_UNXSOLS 10
-#define SYSTEM_UNXBSDI 11
-#define SYSTEM_UNXBSDA 12
-#define SYSTEM_UNXSCOI 13
-#define SYSTEM_UNXAIXP 14
-#define SYSTEM_UNXHPXR 15
-#define SYSTEM_UNXSNIM 16
-#define SYSTEM_UNXMVSG 17
-#define SYSTEM_UNXIRXM 18
-// #define SYSTEM_MACOSP 19
-#define SYSTEM_UNXFBSDI 20
-#define SYSTEM_UNXSOLI 21
-#define SYSTEM_WINBLCI 22
-#define SYSTEM_UNXMACXP 23
-#define SYSTEM_UNXLNXP 24
-#define SYSTEM_UNXBSDS 25
-#define SYSTEM_UNXLNXR 26
-#define SYSTEM_UNXLNX3 28
-#define SYSTEM_UNXLNXS 29
-#define SYSTEM_UNXLNXX 30
-#define SYSTEM_UNXSOGS 31
-#define SYSTEM_UNXSOGI 32
-#define SYSTEM_UNXMACXI 33
-#define SYSTEM_OS2GCCI 34
-#define SYSTEM_WNTGCCI 99
-
#if defined WNT
#if defined(__MINGW32__)
#define __DLLEXTENSION "gi"
@@ -383,7 +347,6 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); }
// -----------------------------------------------------------------------
-#define NOOLDSTRING
#ifndef NOREPLACESTRING
#define UniString String
#define XubString String
@@ -409,7 +372,7 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); }
#define LIBRARY_CONCAT4( s1, s2, s3, s4 ) \
s1 s2 s3 s4
-#if defined WIN || defined WNT || defined OS2
+#if defined WNT || defined OS2
#define SVLIBRARY( Base ) \
LIBRARY_CONCAT3( Base, __DLLEXTENSION, ".DLL" )
#define SVLIBRARYLANG( Base, Lang ) \
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index 8b86a1835596..1e438a1296b6 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -441,14 +441,6 @@ typedef struct _UniStringData
#pragma pack()
#endif
-// -------------------
-// - UniString-Types -
-// -------------------
-
-#ifndef NOOLDSTRING
-#define WSTRING_MAXLEN STRING_MAXLEN
-#endif
-
// -------------
// - UniString -
// -------------
diff --git a/tools/inc/tools/urlkeys.hxx b/tools/inc/tools/urlkeys.hxx
deleted file mode 100644
index 28122657b7d4..000000000000
--- a/tools/inc/tools/urlkeys.hxx
+++ /dev/null
@@ -1,77 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef __URLKEYS_HXX
-#define __URLKEYS_HXX
-
-// Defines for common keys in URL files
-
-// ANSI version
-
-#define A_URLSECTION_SHORTCUT "InternetShortcut"
-#define A_URLKEY_URL "URL"
-#define A_URLKEY_TITLE "Title"
-#define A_URLKEY_TARGET "Target"
-#define A_URLKEY_FRAME "Frame"
-#define A_URLKEY_OPENAS "OpenAs"
-#define A_URLKEY_SOICON "SOIcon"
-#define A_URLKEY_WIN_ICONFILE "IconFile"
-#define A_URLKEY_WIN_ICONINDEX "IconIndex"
-#define A_URLKEY_WORKDIR "WorkingDirectory"
-#define A_URLKEY_ARGUMENTS "Arguments"
-#define A_URLKEY_INTERN_ORIGURL "[URL]"
-
-// Unicode version
-
-#define U_URLSECTION_SHORTCUT L"InternetShortcut"
-#define U_URLKEY_URL L"URL"
-#define U_URLKEY_TITLE L"Title"
-#define U_URLKEY_TARGET L"Target"
-#define U_URLKEY_FRAME L"Frame"
-#define U_URLKEY_OPENAS L"OpenAs"
-#define U_URLKEY_SOICON L"SOIcon"
-#define U_URLKEY_WIN_ICONFILE L"IconFile"
-#define U_URLKEY_WIN_ICONINDEX L"IconIndex"
-#define U_URLKEY_WORKDIR L"WorkingDirectory"
-#define U_URLKEY_ARGUMENTS L"Arguments"
-#define U_URLKEY_INTERN_ORIGURL L"[URL]"
-
-# define URLSECTION_SHORTCUT U_URLSECTION_SHORTCUT
-# define URLKEY_URL U_URLKEY_URL
-# define URLKEY_TITLE U_URLKEY_TITLE
-# define URLKEY_TARGET U_URLKEY_TARGET
-# define URLKEY_FRAME U_URLKEY_FRAME
-# define URLKEY_OPENAS U_URLKEY_OPENAS
-# define URLKEY_SOICON U_URLKEY_SOICON
-# define URLKEY_WIN_ICONFILE U_URLKEY_WIN_ICONFILE
-# define URLKEY_WIN_ICONINDEX U_URLKEY_WIN_ICONINDEX
-# define URLKEY_WORKDIR U_URLKEY_WORKDIR
-# define URLKEY_ARGUMENTS U_URLKEY_ARGUMENTS
-# define URLKEY_INTERN_ORIGURL U_URLKEY_INTERN_ORIGURL
-
-#endif // __URLKEYS_HXX
-
diff --git a/tools/prj/d.lst b/tools/prj/d.lst
index e0291c2f8ad0..f2c508342015 100644
--- a/tools/prj/d.lst
+++ b/tools/prj/d.lst
@@ -34,9 +34,6 @@ mkdir: %_DEST%\inc%_EXT%\bootstrp
..\inc\tools\postx.h %_DEST%\inc%_EXT%\tools\postx.h
..\inc\tools\prex.h %_DEST%\inc%_EXT%\tools\prex.h
-..\inc\tools\postextstl.h %_DEST%\inc%_EXT%\tools\postextstl.h
-..\inc\tools\preextstl.h %_DEST%\inc%_EXT%\tools\preextstl.h
-
..\inc\tools\svlibrary.hxx %_DEST%\inc%_EXT%\tools\svlibrary.hxx
..\inc\tools\solarmutex.hxx %_DEST%\inc%_EXT%\tools\solarmutex.hxx
..\inc\tools\wintypes.hxx %_DEST%\inc%_EXT%\tools\wintypes.hxx
@@ -48,7 +45,6 @@ mkdir: %_DEST%\inc%_EXT%\bootstrp
..\inc\tools\appendunixshellword.hxx %_DEST%\inc%_EXT%\tools\appendunixshellword.hxx
..\inc\tools\bigint.hxx %_DEST%\inc%_EXT%\tools\bigint.hxx
..\inc\tools\cachestr.hxx %_DEST%\inc%_EXT%\tools\cachestr.hxx
-..\inc\tools\chapi.hxx %_DEST%\inc%_EXT%\tools\chapi.hxx
..\inc\tools\color.hxx %_DEST%\inc%_EXT%\tools\color.hxx
..\inc\tools\contnr.hxx %_DEST%\inc%_EXT%\tools\contnr.hxx
..\inc\tools\date.hxx %_DEST%\inc%_EXT%\tools\date.hxx
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index 1bd43bffc4e7..74a2142db692 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -136,13 +136,13 @@ BOOL bInRedirection = TRUE;
#else
BOOL bInRedirection = FALSE;
#endif
-static NAMESPACE_VOS( OMutex )* pRedirectMutex = 0;
+static vos:: OMutex * pRedirectMutex = 0;
//------------------------------------------------------------------------
void FSysRedirector::Register( FSysRedirector *pRedirector )
{
if ( pRedirector )
- pRedirectMutex = new NAMESPACE_VOS( OMutex );
+ pRedirectMutex = new vos:: OMutex ;
else
DELETEZ( pRedirectMutex );
_pRedirector = pRedirector;
@@ -165,7 +165,7 @@ void FSysRedirector::DoRedirect( String &rPath )
// Redirection is acessible only by one thread per time
// dont move the guard behind the bInRedirection check!!!
// think of nested calls (when called from callback)
- NAMESPACE_VOS( OGuard ) aGuard( pRedirectMutex );
+ vos:: OGuard aGuard( pRedirectMutex );
// if already in redirection, dont redirect
if ( bInRedirection )
@@ -1040,8 +1040,8 @@ DirEntry* DirEntry::ImpChangeParent( DirEntry* pNewParent, BOOL bNormalize )
BOOL DirEntry::Exists( FSysAccess nAccess ) const
{
#ifndef BOOTSTRAP
- static NAMESPACE_VOS(OMutex) aLocalMutex;
- NAMESPACE_VOS(OGuard) aGuard( aLocalMutex );
+ static vos::OMutex aLocalMutex;
+ vos::OGuard aGuard( aLocalMutex );
#endif
if ( !IsValid() )
return FALSE;
diff --git a/tools/source/fsys/fstat.cxx b/tools/source/fsys/fstat.cxx
index acdbe6bae510..a55c56b6efbb 100644
--- a/tools/source/fsys/fstat.cxx
+++ b/tools/source/fsys/fstat.cxx
@@ -28,11 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_tools.hxx"
-#if defined( WIN)
-#include <stdio.h>
-#include <dos.h>
-#endif
-
#ifdef UNX
#include <errno.h>
#endif
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index 37e9dedf9259..5dc41f292668 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -244,8 +244,8 @@ ColorData Color::HSBtoRGB( USHORT nHue, USHORT nSat, USHORT nBri )
f = dH - n;
UINT8 a = (UINT8) ( nB * ( 100 - nSat ) / 100 );
- UINT8 b = (UINT8) ( nB * ( 100 - ( (double)nSat * f + 0.5 ) ) / 100 );
- UINT8 c = (UINT8) ( nB * ( 100 - ( (double)nSat * ( 1.0 - f ) + 0.5 ) ) / 100 );
+ UINT8 b = (UINT8) ( nB * ( 100 - ( (double)nSat * f ) ) / 100 );
+ UINT8 c = (UINT8) ( nB * ( 100 - ( (double)nSat * ( 1.0 - f ) ) ) / 100 );
switch( n )
{
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index daeaf8e4c3a5..d05fcac331f2 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -837,18 +837,18 @@ void ResMgr::RscError_Impl( const sal_Char* pMessage, ResMgr* pResMgr,
static void RscException_Impl()
{
- switch ( NAMESPACE_VOS(OSignalHandler)::raise( OSL_SIGNAL_USER_RESOURCEFAILURE, (void*)"" ) )
+ switch ( vos::OSignalHandler::raise( OSL_SIGNAL_USER_RESOURCEFAILURE, (void*)"" ) )
{
- case NAMESPACE_VOS(OSignalHandler)::TAction_CallNextHandler:
+ case vos::OSignalHandler::TAction_CallNextHandler:
abort();
- case NAMESPACE_VOS(OSignalHandler)::TAction_Ignore:
+ case vos::OSignalHandler::TAction_Ignore:
return;
- case NAMESPACE_VOS(OSignalHandler)::TAction_AbortApplication:
+ case vos::OSignalHandler::TAction_AbortApplication:
abort();
- case NAMESPACE_VOS(OSignalHandler)::TAction_KillApplication:
+ case vos::OSignalHandler::TAction_KillApplication:
exit(-1);
}
}
@@ -1919,7 +1919,7 @@ SimpleResMgr* SimpleResMgr::Create( const sal_Char* pPrefixName, com::sun::star:
// -----------------------------------------------------------------------
bool SimpleResMgr::IsAvailable( RESOURCE_TYPE _resourceType, sal_uInt32 _resourceId )
{
- NAMESPACE_VOS(OGuard) aGuard(m_aAccessSafety);
+ vos::OGuard aGuard(m_aAccessSafety);
if ( ( RSC_STRING != _resourceType ) && ( RSC_RESOURCE != _resourceType ) )
return false;
@@ -1931,7 +1931,7 @@ bool SimpleResMgr::IsAvailable( RESOURCE_TYPE _resourceType, sal_uInt32 _resourc
// -----------------------------------------------------------------------
UniString SimpleResMgr::ReadString( sal_uInt32 nId )
{
- NAMESPACE_VOS(OGuard) aGuard(m_aAccessSafety);
+ vos::OGuard aGuard(m_aAccessSafety);
DBG_ASSERT( m_pResImpl, "SimpleResMgr::ReadString : have no impl class !" );
// perhaps constructed with an invalid filename ?
@@ -2002,7 +2002,7 @@ const ::com::sun::star::lang::Locale& SimpleResMgr::GetLocale() const
sal_uInt32 SimpleResMgr::ReadBlob( sal_uInt32 nId, void** pBuffer )
{
- NAMESPACE_VOS(OGuard) aGuard(m_aAccessSafety);
+ vos::OGuard aGuard(m_aAccessSafety);
DBG_ASSERT( m_pResImpl, "SimpleResMgr::ReadBlob : have no impl class !" );
diff --git a/tools/source/solar/solar.c b/tools/source/solar/solar.c
deleted file mode 100644
index 608f0baf5129..000000000000
--- a/tools/source/solar/solar.c
+++ /dev/null
@@ -1,562 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-/* POSIX defines that a program is undefined after a SIG_SEGV. The
- * code stopped working on Linux Kernel 2.6 so I have moved this back to
- * use FORK.
- * If at a later time the signals work correctly with the Linux Kernel 2.6
- * then this change may be reverted although not strictly posix safe. */
-#define USE_FORK_TO_CHECK 1
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-
-#include <unistd.h>
-#include <sys/types.h>
-
-#define I_STDARG
-#ifdef I_STDARG
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#define NO_USE_FORK_TO_CHECK
-#ifdef USE_FORK_TO_CHECK
-#include <sys/wait.h>
-#else
-#include <signal.h>
-#include <setjmp.h>
-#endif
-
-#define printTypeSize(Type,Name) printf( "sizeof(%s)\t= %d\n", Name, sizeof (Type) )
-
-#define isSignedType(Type) (((Type)-1) < 0)
-#define printTypeSign(Type,Name) printf( "%s\t= %s %s\n", Name, ( isSignedType(Type) ? "signed" : "unsigned" ), Name )
-
-
-/*************************************************************************
-|*
-|* IsBigEndian()
-|*
-|* Beschreibung True, wenn CPU BigEndian ist
-|*
-|* Ersterstellung EG 26.06.96
-|* Letzte Aenderung
-|*
-*************************************************************************/
-int IsBigEndian()
-{
- long l = 1;
- return ! *(char*)&l;
-}
-
-/*************************************************************************
-|*
-|* IsStackGrowingDown()
-|*
-|* Beschreibung True, wenn der Stack nach unten waechst
-|*
-|* Ersterstellung EG 26.06.96
-|* Letzte Aenderung
-|*
-*************************************************************************/
-int IsStackGrowingDown_2( int * pI )
-{
- int i = 1;
- return ((unsigned long)&i) < (unsigned long)pI;
-}
-
-int IsStackGrowingDown()
-{
- int i = 1;
- return IsStackGrowingDown_2(&i);
-}
-
-/*************************************************************************
-|*
-|* GetStackAlignment()
-|*
-|* Beschreibung Alignment von char Parametern, die (hoffentlich)
-|* ueber den Stack uebergeben werden
-|*
-|* Ersterstellung EG 26.06.96
-|* Letzte Aenderung
-|*
-*************************************************************************/
-int GetStackAlignment_3( char*p, long l, int i, short s, char b, char c, ... )
-{
- if ( IsStackGrowingDown() )
- return &c - &b;
- else
- return &b - &c;
-}
-
-int GetStackAlignment_2( char*p, long l, int i, short s, char b, char c )
-{
- if ( IsStackGrowingDown() )
- return &c - &b;
- else
- return &b - &c;
-}
-
-int GetStackAlignment()
-{
- int nStackAlignment = GetStackAlignment_3(0,1,2,3,4,5);
- if ( nStackAlignment != GetStackAlignment_2(0,1,2,3,4,5) )
- printf( "Pascal calling convention\n" );
- return nStackAlignment;
-}
-
-
-/*************************************************************************
-|*
-|* Typdeclarations for memory access test functions
-|*
-*************************************************************************/
-typedef enum { t_char, t_short, t_int, t_long, t_double } Type;
-typedef int (*TestFunc)( Type, void* );
-
-
-/*************************************************************************
-|*
-|* PrintArgs()
-|*
-|* Beschreibung Testfunktion fuer variable Parameter
-|*
-|* Ersterstellung EG 26.06.96
-|* Letzte Aenderung
-|*
-*************************************************************************/
-#ifdef I_STDARG
-void PrintArgs( int p, ... )
-#else
-void PrintArgs( p, va_alist )
-int p;
-va_dcl
-#endif
-{
- int value;
- va_list ap;
-
-#ifdef I_STDARG
- va_start( ap, p );
-#else
- va_start( ap );
-#endif
-
- printf( "value = %d", p );
-
- while ( ( value = va_arg(ap, int) ) != 0 )
- printf( " %d", value );
-
- printf( "\n" );
- va_end(ap);
-}
-
-#ifndef USE_FORK_TO_CHECK
-/*************************************************************************
-|*
-|* SignalHdl()
-|*
-|* Beschreibung faengt SIGBUS und SIGSEGV in check() ab
-|*
-|* Ersterstellung EG 26.06.96
-|* Letzte Aenderung
-|*
-*************************************************************************/
-static jmp_buf check_env;
-static int bSignal;
-void SignalHdl( int sig )
-{
- bSignal = 1;
-
- fprintf( stderr, "Signal %d caught\n", sig );
- signal( SIGSEGV, SIG_DFL );
- signal( SIGBUS, SIG_DFL );
- siglongjmp( check_env, sig );
-}
-#endif
-
-/*************************************************************************
-|*
-|* check()
-|*
-|* Beschreibung Testet MemoryZugriff (read/write)
-|*
-|* Ersterstellung EG 26.06.96
-|* Letzte Aenderung
-|*
-*************************************************************************/
-int check( TestFunc func, Type eT, void* p )
-{
-#ifdef USE_FORK_TO_CHECK
- pid_t nChild = fork();
- if ( nChild )
- {
- int exitVal;
- wait( &exitVal );
- if ( exitVal & 0xff )
- return -1;
- else
- return exitVal >> 8;
- }
- else
- {
- exit( func( eT, p ) );
- }
-#else
- int result;
-
- bSignal = 0;
-
- if ( !sigsetjmp( check_env, 1 ) )
- {
- signal( SIGSEGV, SignalHdl );
- signal( SIGBUS, SignalHdl );
- result = func( eT, p );
- signal( SIGSEGV, SIG_DFL );
- signal( SIGBUS, SIG_DFL );
- }
-
- if ( bSignal )
- return -1;
- else
- return 0;
-#endif
-}
-
-/*************************************************************************
-|*
-|* GetAtAddress()
-|*
-|* Beschreibung memory read access
-|*
-|* Ersterstellung EG 26.06.96
-|* Letzte Aenderung
-|*
-*************************************************************************/
-int GetAtAddress( Type eT, void* p )
-{
- switch ( eT )
- {
- case t_char: return *((char*)p);
- case t_short: return *((short*)p);
- case t_int: return *((int*)p);
- case t_long: return *((long*)p);
- case t_double: return *((double*)p);
- }
- abort();
-}
-
-/*************************************************************************
-|*
-|* SetAtAddress()
-|*
-|* Beschreibung memory write access
-|*
-|* Ersterstellung EG 26.06.96
-|* Letzte Aenderung
-|*
-*************************************************************************/
-int SetAtAddress( Type eT, void* p )
-{
- switch ( eT )
- {
- case t_char: return *((char*)p) = 0;
- case t_short: return *((short*)p) = 0;
- case t_int: return *((int*)p) = 0;
- case t_long: return *((long*)p) = 0;
- case t_double: return *((double*)p)= 0;
- }
- abort();
-}
-
-char* TypeName( Type eT )
-{
- switch ( eT )
- {
- case t_char: return "char";
- case t_short: return "short";
- case t_int: return "int";
- case t_long: return "long";
- case t_double: return "double";
- }
- abort();
-}
-
-/*************************************************************************
-|*
-|* Check(Get|Set)Access()
-|*
-|* Beschreibung Testet MemoryZugriff (read/write)
-|* Zugriffsverletzungen werden abgefangen
-|*
-|* Ersterstellung EG 26.06.96
-|* Letzte Aenderung
-|*
-*************************************************************************/
-int CheckGetAccess( Type eT, void* p )
-{
- int b;
- b = -1 != check( (TestFunc)GetAtAddress, eT, p );
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr,
- "%s read %s at %p\n",
- (b? "can" : "can not" ), TypeName(eT), p );
-#endif
- return b;
-}
-int CheckSetAccess( Type eT, void* p )
-{
- int b;
-
- b = -1 != check( (TestFunc)SetAtAddress, eT, p );
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr,
- "%s write %s at %p\n",
- (b? "can" : "can not" ), TypeName(eT), p );
-#endif
- return b;
-}
-
-/*************************************************************************
-|*
-|* GetAlignment()
-|*
-|* Beschreibung Bestimmt das Alignment verschiedener Typen
-|*
-|* Ersterstellung EG 26.06.96
-|* Letzte Aenderung
-|*
-*************************************************************************/
-int GetAlignment( Type eT )
-{
- char a[ 16*8 ];
- long p = (long)(void*)a;
- int i;
-
- /* clear a[...] to set legal value for double access */
- for ( i = 0; i < 16*8; i++ )
- a[i] = 0;
-
- p = ( p + 0xF ) & ~0xF;
- for ( i = 1; i < 16; i++ )
- if ( CheckGetAccess( eT, (void*)(p+i) ) )
- return i;
- return 0;
-}
-
-/*************************************************************************
-|*
-|* struct Description
-|*
-|* Beschreibung Beschreibt die Parameter der Architektur
-|*
-|* Ersterstellung EG 26.06.96
-|* Letzte Aenderung
-|*
-*************************************************************************/
-struct Description
-{
- int bBigEndian;
- int bStackGrowsDown;
- int nStackAlignment;
- int nAlignment[3]; /* 2,4,8 */
-};
-
-/*************************************************************************
-|*
-|* Description_Ctor()
-|*
-|* Beschreibung Bestimmt die Parameter der Architektur
-|*
-|* Ersterstellung EG 26.06.96
-|* Letzte Aenderung
-|*
-*************************************************************************/
-void Description_Ctor( struct Description* pThis )
-{
- pThis->bBigEndian = IsBigEndian();
- pThis->bStackGrowsDown = IsStackGrowingDown();
- pThis->nStackAlignment = GetStackAlignment();
-
- if ( sizeof(short) != 2 )
- abort();
- pThis->nAlignment[0] = GetAlignment( t_short );
- if ( sizeof(int) != 4 )
- abort();
- pThis->nAlignment[1] = GetAlignment( t_int );
-
- if ( sizeof(long) == 8 )
- pThis->nAlignment[2] = GetAlignment( t_long );
- else if ( sizeof(double) == 8 )
- pThis->nAlignment[2] = GetAlignment( t_double );
- else
- abort();
-}
-
-/*************************************************************************
-|*
-|* Description_Print()
-|*
-|* Beschreibung Schreibt die Parameter der Architektur als Header
-|*
-|* Ersterstellung EG 26.06.96
-|* Letzte Aenderung
-|*
-*************************************************************************/
-void Description_Print( struct Description* pThis, char* name )
-{
- int i;
- FILE* f = fopen( name, "w" );
- if( ! f ) {
- fprintf( stderr, "Unable to open file %s: %s\n", name, strerror( errno ) );
- exit( 99 );
- }
- fprintf( f, "#define __%s\n",
- pThis->bBigEndian ? "BIGENDIAN" : "LITTLEENDIAN" );
- for ( i = 0; i < 3; i++ )
- fprintf( f, "#define __ALIGNMENT%d\t%d\n",
- 1 << (i+1), pThis->nAlignment[i] );
- fprintf( f, "/* Stack alignment is not used... */\n" );
- fprintf( f, "#define __STACKALIGNMENT\t%d\n", pThis->nStackAlignment );
- fprintf( f, "#define __STACKDIRECTION\t%d\n",
- pThis->bStackGrowsDown ? -1 : 1 );
- fprintf( f, "#define __SIZEOFCHAR\t%d\n", sizeof( char ) );
- fprintf( f, "#define __SIZEOFSHORT\t%d\n", sizeof( short ) );
- fprintf( f, "#define __SIZEOFINT\t%d\n", sizeof( int ) );
- fprintf( f, "#define __SIZEOFLONG\t%d\n", sizeof( long ) );
- fprintf( f, "#define __SIZEOFPOINTER\t%d\n", sizeof( void* ) );
- fprintf( f, "#define __SIZEOFDOUBLE\t%d\n", sizeof( double ) );
- fprintf( f, "#define __IEEEDOUBLE\n" );
- fclose( f );
-}
-
-/*************************************************************************
-|*
-|* InfoMemoryAccess()
-|*
-|* Beschreibung Informeller Bytezugriffstest
-|*
-|* Ersterstellung EG 26.06.96
-|* Letzte Aenderung
-|*
-*************************************************************************/
-void InfoMemoryAccess( char* p )
-{
- if ( CheckGetAccess( t_char, p ) )
- printf( "can read address %p\n", p );
- else
- printf( "can not read address %p\n", p );
-
- if ( CheckSetAccess( t_char, p ) )
- printf( "can write address %p\n", p );
- else
- printf( "can not write address %p\n", p );
-}
-
-/*************************************************************************
-|*
-|* InfoMemoryTypeAccess()
-|*
-|* Beschreibung Informeller Zugriffstest verschiedener Typen
-|*
-|* Ersterstellung EG 15.08.96
-|* Letzte Aenderung
-|*
-*************************************************************************/
-void InfoMemoryTypeAccess( Type eT )
-{
- char a[64];
- int i;
-
- /* clear a[...] to set legal value for double access */
- for ( i = 0; i < 64; i++ )
- a[i] = 0;
-
- for ( i = 56; i >= 7; i >>= 1 )
- {
- printf( "Zugriff %s auf %i-Aligned Adresse : ", TypeName( eT ), i / 7 );
- printf( ( CheckGetAccess( eT, (long*)&a[i] ) ? "OK\n" : "ERROR\n" ) );
- }
-}
-/************************************************************************
- *
- * Use C code to determine the characteristics of the building platform.
- *
- ************************************************************************/
-int main( int argc, char* argv[] )
-{
- printTypeSign( char, "char" );
- printTypeSign( short, "short" );
- printTypeSign( int, "int" );
- printTypeSign( long, "long" );
-
- printTypeSize( char, "char" );
- printTypeSize( short, "short" );
- printTypeSize( int, "int" );
- printTypeSize( long, "long" );
- printTypeSize( float, "float" );
- printTypeSize( double, "double" );
- printTypeSize( void *, "void *" );
-
- if ( IsBigEndian() )
- printf( "BIGENDIAN (Sparc, MC680x0, RS6000, IP22, IP32, g3)\n" );
- else
- printf( "LITTLEENDIAN (Intel, VAX, PowerPC)\n" );
-
- if( IsStackGrowingDown() )
- printf( "Stack waechst nach unten\n" );
- else
- printf( "Stack waechst nach oben\n" );
-
- printf( "STACKALIGNMENT : %d\n", GetStackAlignment() );
-
- /* PrintArgs( 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 ); */
-
- if ( argc > 1 )
- {
- struct Description description;
- Description_Ctor( &description );
- Description_Print( &description, argv[1] );
- }
- {
- char* p = NULL;
- InfoMemoryAccess( p );
- p = (char*)&p;
- InfoMemoryAccess( p );
- InfoMemoryTypeAccess( t_short );
- InfoMemoryTypeAccess( t_int );
- InfoMemoryTypeAccess( t_long );
- InfoMemoryTypeAccess( t_double );
- }
-
- exit( 0 );
-}
diff --git a/tools/source/stream/strmos2.cxx b/tools/source/stream/strmos2.cxx
index d211d7790b08..a35fc7731767 100644
--- a/tools/source/stream/strmos2.cxx
+++ b/tools/source/stream/strmos2.cxx
@@ -757,108 +757,4 @@ void SvFileStream::SetSize( ULONG nSize )
}
}
-#if 0
-/*************************************************************************
-|*
-|* SvSharedMemoryStream::AllocateMemory()
-|*
-|* Beschreibung STREAM.SDW
-|* Ersterstellung CL 05.05.95
-|* Letzte Aenderung CL 05.05.95
-|*
-*************************************************************************/
-
-sal_Bool SvSharedMemoryStream::AllocateMemory( ULONG nNewSize )
-{
- DBG_ASSERT(aHandle==0,"Keine Handles unter OS/2");
- DBG_ASSERT(nNewSize,"Cannot allocate zero Bytes");
- APIRET nRet = DosAllocSharedMem( (void**)&pBuf, (PSZ)NULL, nNewSize,
- PAG_READ | PAG_WRITE | PAG_COMMIT |
- OBJ_GIVEABLE | OBJ_GETTABLE | OBJ_ANY);
- return( nRet == 0 );
-}
-
-/*************************************************************************
-|*
-|* SvSharedMemoryStream::ReAllocateMemory() (Bozo-Algorithmus)
-|*
-|* Beschreibung STREAM.SDW
-|* Ersterstellung CL 05.05.95
-|* Letzte Aenderung CL 05.05.95
-|*
-*************************************************************************/
-
-sal_Bool SvSharedMemoryStream::ReAllocateMemory( long nDiff )
-{
- DBG_ASSERT(aHandle==0,"Keine Handles unter OS/2");
- sal_Bool bRetVal = FALSE;
- ULONG nNewSize = nSize + nDiff;
- if( nNewSize )
- {
- // neuen Speicher nicht ueber AllocateMemory holen, da wir den
- // alten Speicher behalten wollen, falls nicht genuegend Platz
- // fuer den neuen Block da ist
- char* pNewBuf;
- APIRET nRet = DosAllocSharedMem( (void**)&pNewBuf,(PSZ)NULL,nNewSize,
- PAG_READ | PAG_WRITE | PAG_COMMIT |
- OBJ_GIVEABLE | OBJ_GETTABLE | OBJ_ANY);
- DBG_ASSERT(!nRet,"DosAllocSharedMem failed");
-
- if( !nRet )
- {
- bRetVal = TRUE; // Success!
- if( nNewSize < nSize ) // Verkleinern ?
- {
- memcpy( pNewBuf, pBuf, (size_t)nNewSize );
- if( nPos > nNewSize )
- nPos = 0L;
- if( nEndOfData >= nNewSize )
- nEndOfData = nNewSize-1L;
- }
- else
- memcpy( pNewBuf, pBuf, (size_t)nSize );
-
- FreeMemory(); // den alten Block loeschen ...
- // und den neuen Block in Dienst stellen
- pBuf = (sal_uInt8*)pNewBuf;
- nSize = nNewSize;
- }
- }
- else
- {
- bRetVal = TRUE;
- FreeMemory();
- pBuf = 0;
- nSize = 0;
- nEndOfData = 0;
- }
- return bRetVal;
-}
-
-void SvSharedMemoryStream::FreeMemory()
-{
- DBG_ASSERT(aHandle==0,"Keine Handles unter OS/2");
- DosFreeMem( pBuf );
-}
-
-/*************************************************************************
-|*
-|* SvSharedMemoryStream::SetHandle()
-|*
-|* Beschreibung STREAM.SDW
-|* Ersterstellung OV 05.10.95
-|* Letzte Aenderung OV 05.10.95
-|*
-*************************************************************************/
-
-void* SvSharedMemoryStream::SetHandle( void* aNewHandle, sal_Size nSize,
- sal_Bool bOwnsData, sal_Size nEOF )
-{
- DBG_ERROR("OS/2 does not support memory handles");
- // return SetBuffer(aNewHandle, nSize, bOwnsData, nEOF );
- return 0;
-}
-
-
-#endif // 0
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index 88ccb2113e0d..f3c5d642ed6e 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -60,7 +60,7 @@ DECLARE_LIST( InternalStreamLockList, InternalStreamLock* )
namespace { struct LockList : public rtl::Static< InternalStreamLockList, LockList > {}; }
#ifndef BOOTSTRAP
-namespace { struct LockMutex : public rtl::Static< NAMESPACE_VOS(OMutex), LockMutex > {}; }
+namespace { struct LockMutex : public rtl::Static< vos::OMutex, LockMutex > {}; }
#endif
class InternalStreamLock
@@ -111,7 +111,7 @@ InternalStreamLock::~InternalStreamLock()
sal_Bool InternalStreamLock::LockFile( sal_Size nStart, sal_Size nEnd, SvFileStream* pStream )
{
#ifndef BOOTSTRAP
- NAMESPACE_VOS( OGuard ) aGuard( LockMutex::get() );
+ vos:: OGuard aGuard( LockMutex::get() );
#endif
ByteString aFileName(pStream->GetFileName(), osl_getThreadTextEncoding());
struct stat aStat;
@@ -161,7 +161,7 @@ sal_Bool InternalStreamLock::LockFile( sal_Size nStart, sal_Size nEnd, SvFileStr
void InternalStreamLock::UnlockFile( sal_Size nStart, sal_Size nEnd, SvFileStream* pStream )
{
#ifndef BOOTSTRAP
- NAMESPACE_VOS( OGuard ) aGuard( LockMutex::get() );
+ vos:: OGuard aGuard( LockMutex::get() );
#endif
InternalStreamLock* pLock = NULL;
InternalStreamLockList &rLockList = LockList::get();
diff --git a/tools/source/testtoolloader/testtoolloader.cxx b/tools/source/testtoolloader/testtoolloader.cxx
index ca269ef6eea2..21a1a715dc08 100644
--- a/tools/source/testtoolloader/testtoolloader.cxx
+++ b/tools/source/testtoolloader/testtoolloader.cxx
@@ -56,16 +56,16 @@ static bool bLoggerStarted = false;
sal_uInt32 GetCommandLineParamCount()
{
- NAMESPACE_VOS( OStartupInfo ) aStartInfo;
+ vos:: OStartupInfo aStartInfo;
return aStartInfo.getCommandArgCount();
}
String GetCommandLineParam( sal_uInt32 nParam )
{
- NAMESPACE_VOS( OStartupInfo ) aStartInfo;
+ vos:: OStartupInfo aStartInfo;
::rtl::OUString aParam;
- NAMESPACE_VOS( OStartupInfo )::TStartupError eError = aStartInfo.getCommandArg( nParam, aParam );
- if ( eError == NAMESPACE_VOS( OStartupInfo )::E_None )
+ vos:: OStartupInfo ::TStartupError eError = aStartInfo.getCommandArg( nParam, aParam );
+ if ( eError == vos:: OStartupInfo ::E_None )
return String( aParam );
else
{
diff --git a/tools/win/inc/dll.hxx b/tools/win/inc/dll.hxx
index 2a91aefc0fa9..f28b07974c61 100644
--- a/tools/win/inc/dll.hxx
+++ b/tools/win/inc/dll.hxx
@@ -28,31 +28,6 @@
#ifndef _DLL_HXX
#define _DLL_HXX
-#ifdef WIN
-
-#include <tools/svwin.h>
-
-// ----------------------
-// - Zugriffsfunktionen -
-// ----------------------
-
-struct SVDATA;
-
-extern "C"
-{
-// IN APPDATA.ASM
-SVDATA* FAR PASCAL GetSVData();
-}
-
-// IN TOOLSDLL.CXX
-void SetSVData( SVDATA* pSVData );
-
-#endif
-
-// -------------------------------
-// - Sonstige Funktionen fuer SV -
-// -------------------------------
-
// Um Resourcen wieder freizugeben
inline void ImpDeInitWinTools() {}
diff --git a/tools/win/inc/toolsdll.hxx b/tools/win/inc/toolsdll.hxx
deleted file mode 100644
index a6b1546763bc..000000000000
--- a/tools/win/inc/toolsdll.hxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _TOOLSDLL_HXX
-#define _TOOLSDLL_HXX
-
-#ifdef WIN
-
-#ifndef _STRING_H
-#include <string.h>
-#endif
-#include <tools/svwin.h>
-#include <tools/solar.h>
-#include <tools/shl.hxx>
-
-// ----------------
-// - MemMgr-Daten -
-// ----------------
-
-// Anzahl Freispeicherlisten
-#define MEM_FREELIST_COUNT 15
-
-
-// --------------
-// - Tools-Data -
-// --------------
-
-struct SVDATA;
-struct FreeBlock;
-
-struct MemData
-{
- FreeBlock* pFirstBlocks[MEM_FREELIST_COUNT]; // Erste Bloecke in Freispeicherlisten
- void* pNewHandler; // New-Handler
- int nMultiThread; // MultiThread an/aus
-};
-
-struct ToolsData
-{
- // !!! SVDATA muss in jedem Fall ganz vorne in der Struktur stehen !!!
- SVDATA* pSVData; // Pointer auf StarView-Daten
- HANDLE hMem; // Handler der Tools-Daten
- MemData aMemD; // Daten der Speicherverwaltung
- void* aAppData[SHL_COUNT]; // Daten fuer andere Shared Libs
-};
-
-
-// ----------------------
-// - Zugriffsfunktionen -
-// ----------------------
-
-// IN APPDATA.ASM
-extern "C"
-{
-ToolsData* FAR PASCAL ImpGetAppData();
-void FAR PASCAL ImpSetAppData( ToolsData* pData );
-}
-
-// IN TOOLSDLL.CXX
-ToolsData* ImpGetToolsData();
-
-#endif
-
-#endif // _DLL_HXX
diff --git a/tools/win/source/dll/toolsdll.cxx b/tools/win/source/dll/toolsdll.cxx
index 8fc9888021bb..3d934edfe71d 100644
--- a/tools/win/source/dll/toolsdll.cxx
+++ b/tools/win/source/dll/toolsdll.cxx
@@ -29,7 +29,6 @@
#include "precompiled_tools.hxx"
#include <tools/svwin.h>
#include <dll.hxx>
-#include <toolsdll.hxx>
#include <tools/shl.hxx>
// =======================================================================
diff --git a/transex3/java/jpropex/build.xml b/transex3/java/jpropex/build.xml
deleted file mode 100755
index d74fb3975d0f..000000000000
--- a/transex3/java/jpropex/build.xml
+++ /dev/null
@@ -1,169 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- Copyright 2000, 2010 Oracle and/or its affiliates.
-
- OpenOffice.org - a multi-platform office productivity suite
-
- This file is part of OpenOffice.org.
-
- OpenOffice.org is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License version 3
- only, as published by the Free Software Foundation.
-
- OpenOffice.org is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License version 3 for more details
- (a copy is included in the LICENSE file that accompanied this code).
-
- You should have received a copy of the GNU Lesser General Public License
- version 3 along with OpenOffice.org. If not, see
- <http://www.openoffice.org/license.html>
- for a copy of the LGPLv3 License.
-
--->
-<project name="jpropex" default="main" basedir=".">
-
- <!-- ================================================================= -->
- <!-- settings -->
- <!-- ================================================================= -->
-
- <!-- name of this sub target used in recursive builds -->
- <property name="target" value="jpropex"/>
-
- <!-- name of jar file created, without .jar extension -->
- <property name="jarname" value="jpropex"/>
-
- <!-- relative path to project directory -->
- <property name="prj" value="."/>
-
- <!-- build output directory -->
- <property name="out" value="build"/>
-
- <!-- build directories -->
- <property name="build.dir" value="${out}"/>
- <property name="build.class" value="${build.dir}/class/jpropex"/>
- <property name="build.misc" value="${build.dir}/misc/jpropex"/>
-
- <!-- start of java source code package structure -->
- <property name="java.dir" value="java"/>
-
- <!-- define how to handle CLASSPATH environment -->
- <property name="build.sysclasspath" value="ignore"/>
-
- <!-- classpath settings for compile and javadoc tasks -->
- <path id="classpath">
- <pathelement location="."/>
- <pathelement location="${build.class}"/>
- </path>
-
- <!-- name to display in documentation -->
- <!-- <property name="docname" value="l10n converter"/> -->
-
- <!-- set "modern" java compiler -->
- <property name="build.compiler" value="modern"/>
-
- <!-- set wether we want to compile with debug information -->
- <property name="debug" value="on"/>
-
- <!-- set wether we want to compile with optimisation -->
- <property name="optimize" value="off"/>
-
- <!-- set wether we want to compile with or without deprecation -->
- <property name="deprecation" value="on"/>
-
- <target name="info">
- <echo message="--------------------"/>
- <echo message="${target}"/>
- <echo message="--------------------"/>
- </target>
-
- <!-- ================================================================= -->
- <!-- custom targets -->
- <!-- ================================================================= -->
-
- <!-- the main target, called in recursive builds -->
- <target name="main" depends="info,prepare,compile,jar"/>
-
- <!-- prepare output directories -->
- <target name="prepare">
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${build.class}"/>
- <mkdir dir="${build.misc}"/>
- </target>
-
-
- <target name="res" depends="prepare">
- <copy todir="${build.class}">
- <fileset dir="${java.dir}">
- <include name="**/*.properties"/>
- <include name="**/*.css"/>
- <include name="**/*.dtd"/>
- <include name="**/*.form"/>
- <include name="**/*.gif "/>
- <include name="**/*.htm"/>
- <include name="**/*.html"/>
- <include name="**/*.js"/>
- <include name="**/*.mod"/>
- <include name="**/*.sql"/>
- <include name="**/*.xml"/>
- <include name="**/*.xsl"/>
- <include name="**/*.map"/>
-
- </fileset>
- </copy>
- </target>
-
-
- <target name="compile" depends="prepare,res">
- <javac destdir="${build.class}"
- debug="${debug}"
- deprecation="${deprication}"
- optimize="${optimize}"
- classpathref="classpath">
- <src path="${java.dir}"/>
- <include name="**/*.java"/>
- </javac>
- </target>
-
- <!-- clean up -->
- <target name="clean" depends="prepare">
- <delete includeEmptyDirs="true">
- <fileset dir="${build.class}">
- <patternset>
- <include name="${package}/**/*.class"/>
- </patternset>
- </fileset>
- </delete>
- </target>
-
- <!-- create jar file -->
- <target name="jar" depends="prepare,compile" if="build.class">
- <jar jarfile="${build.class}/${jarname}.jar"
- basedir="${build.class}"
- manifest="${jarname}.MF">
- <include name="**/*.class"/>
- <include name="**/*.properties"/>
- <include name="**/*.css"/>
- <include name="**/*.dtd"/>
- <include name="**/*.form"/>
- <include name="**/*.gif "/>
- <include name="**/*.htm"/>
- <include name="**/*.html"/>
- <include name="**/*.js"/>
- <include name="**/*.mod"/>
- <include name="**/*.sql"/>
- <include name="**/*.xml"/>
- <include name="**/*.xsl"/>
- <include name="**/*.map"/>
- </jar>
- </target>
-
- <target name="test" depends="prepare">
- </target>
-
-</project>
-
diff --git a/transex3/java/jpropex/java/JPropEx.java b/transex3/java/jpropex/java/JPropEx.java
deleted file mode 100644
index 20175febe5d5..000000000000
--- a/transex3/java/jpropex/java/JPropEx.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-import java.util.*;
-import java.io.*;
-
-public class JPropEx
-{
- private String inputFileArg;
- private String outputFileArg;
- private String pathPrefixArg;
- private String pathPostfixArg;
- private String projectArg;
- private String rootArg;
- private Vector forcedLangsArg;
- private Vector langsArg;
- private String inputSdfFileArg;
- private boolean isQuiet = false;
- private final String resourceType = "javaproperties";
- private final String sourceLanguage = "en-US";
- //private SdfData data;
-
- public JPropEx()
- {
- //data = new SdfData();
- }
-
- public JPropEx( String args[] )
- {
- super();
- parseArguments( args );
- testArguments();
- if( inputSdfFileArg != null && inputSdfFileArg.length() > 0 )
- merge();
- else
- extract();
- }
-
- private String getSimpleArg( String[] args , int x )
- {
- if( x < args.length ) x++;
- else
- {
- System.err.println("ERROR: Missing arg for "+args[ x ]+"\n");
- help();
- }
- return args[ x ];
- }
- private Vector getComplexArg( String[] args , int x )
- {
- if( x < args.length ) x++;
- else
- {
- System.err.println("ERROR: Missing arg for "+args[ x ]+"\n");
- help();
- }
- String value = args[ x ];
- Vector values = new Vector( Arrays.asList( value.split(",") ) );
- return values;
- }
-
- private void help()
- {
- System.out.println("jpropex extract / merge java properties files");
- System.exit( -1 );
- }
-
- private void extract()
- {
- SdfData data = new SdfData();
- java.util.Properties prop = loadProp( inputFileArg );
-
- // Get a prototype that already contains the most common settings
- SdfEntity dolly = prepareSdfObj();
- String key;
- SdfEntity currentStr;
- String value;
- for( Enumeration e = prop.propertyNames() ; e.hasMoreElements() ; )
- {
- key = (String) e.nextElement();
- currentStr = (SdfEntity) dolly.clone();
- // Set the new LID and the string text
- currentStr.setLid( key );
- value = prop.getProperty( key , "" );
- //if( value.equals("") ) System.err.println("Warning: in file "+inputFileArg+" the string with the key "+key+" has a empty string!");
- currentStr.setText( (prop.getProperty( key )).replaceAll("\t" , " " ) ); // TODO: Quoting!!!!
- data.add( currentStr );
- }
- data.write( outputFileArg );
- }
-
- private SdfEntity prepareSdfObj()
- {
- String path = makeAbs( inputFileArg );
- path = path.replace( rootArg + "/" , "" );
- path = path.replace("/","\\");
- return new SdfEntity( projectArg , path , "" /* dummy1 */ , resourceType , "", "" , "" , "" , "" /* dummy2 */ ,
- sourceLanguage , "", "" , "" , "" , "2002-02-02 02:02:02" );
- }
-
- private void merge()
- {
- SdfData data = getSdfData();
- if( inputFileArg.startsWith("@") )
- {
- // Read files
- Vector fileList = readFileList( inputFileArg );
- for( Enumeration e = fileList.elements(); e.hasMoreElements(); )
- mergeFile( (String) e.nextElement() , data );
- }
- else
- {
- // Single file
- mergeFile( inputFileArg , data );
- }
- }
-
- private Vector readFileList( String filename )
- {
- Vector lines = new Vector();
- try
- {
- BufferedReader in = new BufferedReader( new FileReader( filename.substring( 1 ) ) );
- while( in.ready() )
- lines.add( in.readLine() );
- }
- catch( IOException e )
- {
- System.out.println("ERROR: Can't open file '"+filename.substring( 1 )+"'");
- System.exit( -1 );
- }
- return lines;
- }
-
- private void mergeFile( String filename , SdfData data )
- {
- java.util.Properties sourceProp = loadProp( filename );
- Vector langs = getLanguages( data );
- HashMap props = new HashMap();
- // Create a properties object for every language
- for( Enumeration e = langs.elements(); e.hasMoreElements();)
- {
-
- props.put( (String)e.nextElement() , new java.util.Properties() );
- }
- // Get a prototype that already contains the most common settings
-
- SdfEntity dolly = prepareSdfObj();
- String key;
- String sourceString;
- SdfEntity curStr;
- SdfEntity curEntity;
- SdfEntity mergedEntity;
- String curLang;
- for( Enumeration e = sourceProp.propertyNames() ; e.hasMoreElements() ; ) // For all property keys
- {
- key = (String) e.nextElement();
- sourceString = sourceProp.getProperty( key );
- curStr = (SdfEntity) dolly.clone();
- curStr.setLid( key );
- for( Enumeration lang = langs.elements(); lang.hasMoreElements(); ) // merge in every language
- {
- curEntity = (SdfEntity) curStr.clone();
- curLang = (String) lang.nextElement();
- curEntity.setLangid( curLang );
- mergedEntity = data.get( curEntity );
- if( mergedEntity == null )
- {
- // if case there is not translation the fallback to the en-US source string
- ( (java.util.Properties) props.get( curLang )).setProperty( curEntity.getLid() , sourceString );
- }
- else
- {
- // Set the merged text from the sdf file
- ( (java.util.Properties) props.get( curLang )).setProperty( mergedEntity.getLid() , mergedEntity.getText() ); // TODO: Quoting ???
- }
- }
-
- }
- // Now write them out
- String lang;
- for( Iterator i = props.keySet().iterator() ; i.hasNext() ; )
- {
- lang = (String) i.next();
- writeSinglePropertiesFile( filename , (java.util.Properties) props.get( lang ) , lang );
- }
- }
- private void writeSinglePropertiesFile( String filename , java.util.Properties prop , String lang )
- {
- // Prepare path to file
- int filenameIdx = filename.lastIndexOf( "/" ) > 0 ? filename.lastIndexOf( "/" )+1 : 0 ;
- String path = new String();
- String name = new String();
- if( pathPrefixArg != null && pathPrefixArg.length()>0 && pathPostfixArg != null && pathPostfixArg.length()>0 )
- {
- path = new StringBuffer().append( pathPrefixArg ).append( "/" ).append( lang ).append( "/" ).append( pathPostfixArg ).append( "/" ).toString();
- name = new StringBuffer().append( filename.substring( filenameIdx , filename.lastIndexOf( ".properties" ) ) )
- .append( "_" ).append( lang.replaceAll("-","_") ).append( ".properties" ).toString();
- }
- else if( outputFileArg != null && outputFileArg.length()>0 )
- {
- name = outputFileArg;
- name += new StringBuffer().append( inputFileArg.substring( filenameIdx , filename.lastIndexOf( ".properties" ) ) )
- .append( "_" ).append( lang.replaceAll("-","_") ).append( ".properties" ).toString();
-
- //name = outputFileArg;
- }
- else
- {
- System.err.println("ERROR: No outputfile specified .. either -o or -x -y !");
- System.exit( -1 );
- }
-
- File dir = new File( path );
- try
- {
- if( !dir.exists() && path.length()>0 )
- {
- if( !dir.mkdirs() )
- {
- System.out.println("ERROR: Can't create directory '"+path+"' !!!");
- System.exit( -1 );
- }
- }
- }
- catch( SecurityException e )
- {
- System.out.println("ERROR: Can't create directory '"+path+"'!!!Wrong Permissions?");
- System.exit( -1 );
- }
- path += name;
- // Write the properties file
- System.out.println("DBG: Writing to "+path);
- try{
- BufferedOutputStream out = new BufferedOutputStream( new FileOutputStream( path ) );
- if( prop == null )
- System.out.println("DBG: prop == null!!!");
- prop.store( out , "" ); // Legal headers?
- }
- catch( IOException e )
- {
- System.out.println("ERROR: Can't write file '"+path+"' !!!!");
- System.exit( -1 );
- }
- }
-
- private SdfData getSdfData()
- {
- SdfData data = new SdfData( inputSdfFileArg );
- data.read();
- return data;
- }
- private Vector getLanguages( SdfData data )
- {
- Vector langs = new Vector();
-
- if( ((String)langsArg.get( 0 )).equalsIgnoreCase( "all" ) ) // for "-l all" use all languages found in the -m sdf file
- langs.addAll( data.getLanguages() );
- else
- langs.addAll( langsArg ); // use the langs giving by -l
-
- if( forcedLangsArg != null )
- langs.addAll( forcedLangsArg );
-
- return removeDupes( langs );
- }
- private Vector removeDupes( Vector vec )
- {
- Collection coll = new LinkedHashSet( vec );
- return new Vector( coll );
- }
- private java.util.Properties loadProp( String filename )
- {
- java.util.Properties prop = new java.util.Properties();
- try
- {
- prop.load( new BufferedInputStream( new NoLocalizeFilter( new FileInputStream( filename ) ) ) );
- }
- catch( IOException e )
- {
- System.err.println("ERROR: Can't read file '"+filename+"'!!!");
- }
- return prop;
- }
- private void parseArguments( String[] args )
- {
-
- if( args.length == 0 )
- {
- System.out.println("ERROR: No args???");
- help();
- System.exit( -1 );
- }
- for( int x = 0; x < args.length ; x++ )
- {
- if( args[ x ].equalsIgnoreCase("-i") )
- {
- // Input resource file
- inputFileArg = getSimpleArg( args , x );
- }
- else if( args[ x ].equalsIgnoreCase("-o") )
- {
- // Output sdf file
- outputFileArg = getSimpleArg( args , x );
- }
- else if( args[ x ].equalsIgnoreCase("-x") )
- {
- // path prefix
- pathPrefixArg = getSimpleArg( args , x );
- }
- else if( args[ x ].equalsIgnoreCase("-y") )
- {
- // path postfix
- pathPostfixArg = getSimpleArg( args , x );
- }
- else if( args[ x ].equalsIgnoreCase("-p") )
- {
- // project
- projectArg = getSimpleArg( args , x );
- }
- else if( args[ x ].equalsIgnoreCase("-r") )
- {
- // root
- rootArg = getSimpleArg( args , x );
- rootArg = makeAbs( rootArg );
- }
- else if( args[ x ].equalsIgnoreCase("-lf") )
- {
- // forced langs
- forcedLangsArg = getComplexArg( args , x );
- }
- else if( args[ x ].equalsIgnoreCase("-l") )
- {
- // langs
- langsArg = getComplexArg( args , x );
- }
- else if( args[ x ].equalsIgnoreCase("-m") )
- {
- // input sdf file
- inputSdfFileArg = getSimpleArg( args , x );
- }
- else if( args[ x ].equalsIgnoreCase("-qq") )
- {
- isQuiet = true;
- }
- }
- }
- private String makeAbs( String path )
- {
- File file;
- try
- {
- file = new File( path );
- return file.getCanonicalPath();
- }catch( IOException e )
- {
- e.printStackTrace();
- System.exit( -1 );
- }
- return null;
- }
- private boolean testArguments()
- {
- // nice merge
- if( inputSdfFileArg != null && inputSdfFileArg.length()>0 )
- // nice merge
- return projectArg != null && rootArg != null && inputFileArg != null && pathPrefixArg != null && pathPostfixArg != null && langsArg != null &&
- projectArg.length()>0 && rootArg.length()>0 && inputFileArg.length()>0 && pathPrefixArg.length()>0 && pathPostfixArg.length()>0 && langsArg.size()>0 ;
- else
- // nice extract
- return projectArg != null && rootArg != null && inputFileArg != null && outputFileArg != null && langsArg != null &&
- projectArg.length()>0 && rootArg.length()>0 && inputFileArg.length()>0 && outputFileArg.length()>0 && langsArg.size()>0;
- }
-
-}
diff --git a/transex3/java/jpropex/java/NoLocalizeFilter.java b/transex3/java/jpropex/java/NoLocalizeFilter.java
deleted file mode 100644
index c1e62fc951a8..000000000000
--- a/transex3/java/jpropex/java/NoLocalizeFilter.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-import java.io.*;
-import java.util.regex.*;
-
-// exit if the sequence x-no-localize is found in stream!
-public class NoLocalizeFilter extends FilterInputStream
-{
- InputStream in;
-// Pattern p = Pattern.compile("[\\s]*#[\\s]*x-no-translate");
-
- public NoLocalizeFilter( InputStream in ) {
- super(in);
- this.in = in;
- }
- public int read(byte[] b, int off, int len) throws IOException
- {
- String search = new String( b );
-// Matcher m = p.matcher( search );
- if( search.contains("x-no-translate" ) ) // TODO: fixme!
- {
-// System.out.println("found x-no-translate");
- in.close();
- close();
- System.exit( 0 );
- }
- return in.read( b , off , len );
- }
-}
diff --git a/transex3/java/jpropex/java/OrderedHashMap.java b/transex3/java/jpropex/java/OrderedHashMap.java
deleted file mode 100644
index a462d598b307..000000000000
--- a/transex3/java/jpropex/java/OrderedHashMap.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-import java.util.*;
-
-// LinkedHashMap implrementation
-public class OrderedHashMap
-{
- private HashMap hm = new HashMap();
- private LinkedList list = new LinkedList();
-
- public Iterator iterator() { return list.iterator(); }
-
- public boolean isEmpty() { return hm.isEmpty(); }
- public Object get( Object key ) { return hm.get( key ); }
- public Object get( int index ) { return hm.get( list.get( index ) ); }
- public Iterator keys() { return list.iterator(); }
- public Object add( Object key , Object value )
- {
- list.add( key );
- return hm.put( key, value );
- }
- public Object add( int index , Object key , Object value )
- {
- list.add( index , key );
- return hm.put( key, value );
- }
- public Object remove( Object key )
- {
- list.remove( list.indexOf( key ) );
- return hm.remove( key );
- }
- public void move( int idxFrom , int idxTo )
- {
- Object key = list.get( idxFrom );
- list.remove( idxFrom );
- list.add( idxTo , key );
- }
- public void move( Object key , int idxTo )
- {
- move( list.indexOf( key ) , idxTo );
- }
- public int size()
- {
- return hm.size();
- }
- public Enumeration elements()
- {
- return new OHMenum( this );
- }
-}
-
-final class OHMenum implements Enumeration
-{
- OrderedHashMap ohm;
- int index = 0;
-
- private OHMenum(){};
- public OHMenum( OrderedHashMap ohm ){
- this.ohm = ohm ;
- }
-
- public boolean hasMoreElements()
- {
- return index < ohm.size();
- }
- public Object nextElement()
- {
- return ohm.get( index++ );
- }
-}
diff --git a/transex3/java/jpropex/java/SdfData.java b/transex3/java/jpropex/java/SdfData.java
deleted file mode 100644
index 60f218c0ae15..000000000000
--- a/transex3/java/jpropex/java/SdfData.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-import java.util.*;
-import java.io.*;
-
-public class SdfData
-{
- private String filename;
- private OrderedHashMap ohm;
- private LinkedHashSet languagesFound;
-
- public SdfData()
- {
- languagesFound = new LinkedHashSet();
- ohm = new OrderedHashMap();
- languagesFound = new LinkedHashSet();
- }
- public SdfData( String filename ){
- this();
- this.filename = filename;
- }
-
- public LinkedHashSet getLanguages()
- {
- return languagesFound;
- }
- public SdfEntity get( SdfEntity obj )
- {
- return (SdfEntity) ohm.get( (String)obj.getId() );
- }
- public SdfEntity get( String key ){
- return (SdfEntity) ohm.get( key );
- }
- public void add( SdfEntity obj )
- {
- ohm.add( obj.getId() , obj );
- }
-
- public void read()
- {
- BufferedReader in;
- try
- {
- in = new BufferedReader( new FileReader( filename ) );
- SdfEntity entity;
- while( in.ready() )
- {
- String line = in.readLine();
- if( line.length() > 0 )
- {
- entity = new SdfEntity( line );
- ohm.add( entity.getId() , entity ); // test if is valid
- languagesFound.add( entity.getLangid() );
- }
- }
- in.close();
- }
- catch( IOException e )
- {
- System.out.println("Error: reading file " + filename);
- System.exit( -1 );
- }
- }
- public void write( String filename )
- {
- FileWriter out;
- try
- {
- out = new FileWriter( filename , true ); // Always append
- for( Enumeration e = ohm.elements(); e.hasMoreElements(); )
- {
- out.write( ( (SdfEntity) e.nextElement() ).toString() + "\n" );
- }
- out.close();
- }
- catch( IOException e )
- {
- System.out.println("Error: Can't write to file " + filename);
- System.exit( -1 );
- }
- }
-}
diff --git a/transex3/java/jpropex/java/SdfEntity.java b/transex3/java/jpropex/java/SdfEntity.java
deleted file mode 100644
index e2c1606ee7c2..000000000000
--- a/transex3/java/jpropex/java/SdfEntity.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-public class SdfEntity implements Cloneable{
- private String project = new String("");
- private String source_file = new String("");
- private String dummy1 = new String("");
- private String resource_type= new String("");
- private String gid = new String("");
- private String lid = new String("");
- private String helpid = new String("");
- private String platform = new String("");
- private String dummy2 = new String("");
- private String langid = new String("");
- private String text = new String("");
- private String helptext = new String("");
- private String quickhelptext= new String("");
- private String title = new String("");
- private String date = new String("");
-
- public static int PROJECT_POS = 0;
- public static int SOURCE_FILE_POS = 1;
- public static int DUMMY1_POS = 2;
- public static int RESOURCE_TYPE_POS = 3;
- public static int GID_POS = 4;
- public static int LID_POS = 5;
- public static int HELPID_POS = 6;
- public static int PLATFORM_POS = 7;
- public static int DUMMY2_POS = 8;
- public static int LANGID_POS = 9;
- public static int TEXT_POS = 10;
- public static int HELPTEXT_POS = 11;
- public static int QUICKHELPTEXT_POS = 12;
- public static int TITLE_POS = 13;
- public static int DATE_POS = 14;
-
- public Object clone()
- {
- try
- {
- return super.clone();
- }
- catch( CloneNotSupportedException e )
- {
- System.out.println("ERROR: Can not clone, soemthing is broken here ....");
- System.exit( -1 );
- }
- return null; // dummy
- }
-
- public SdfEntity( String line ){
- // isValid?
- setProperties( line ) ;
- }
- public SdfEntity(String project, String source_file, String dummy1, String resource_type, String gid, String lid, String helpid, String platform, String dummy2, String langid, String text, String helptext, String quickhelptext, String title , String date) {
- super();
- this.project = project;
- this.source_file = source_file;
- this.dummy1 = dummy1;
- this.resource_type = resource_type;
- this.gid = gid;
- this.lid = lid;
- this.helpid = helpid;
- this.platform = platform;
- this.dummy2 = dummy2;
- this.langid = langid;
- this.text = text;
- this.helptext = helptext;
- this.quickhelptext = quickhelptext;
- this.title = title;
- this.date = date;
- }
-
- public void setProperties( String line ){
-
- String[] splitted = line.split("\t");
-
- setProject( splitted[ SdfEntity.PROJECT_POS ] );
- setSource_file( splitted[ SdfEntity.SOURCE_FILE_POS ] );
- setDummy1( splitted[ SdfEntity.DUMMY1_POS ] );
- setResource_type( splitted[ SdfEntity.RESOURCE_TYPE_POS ] );
- setGid( splitted[ SdfEntity.GID_POS ] );
- setLid( splitted[ SdfEntity.LID_POS ] );
- setHelpid( splitted[ SdfEntity.HELPID_POS ] );
- setPlatform( splitted[ SdfEntity.PLATFORM_POS ] );
- setDummy2( splitted[ SdfEntity.DUMMY2_POS ] );
- setLangid( splitted[ SdfEntity.LANGID_POS ] );
- setText( splitted[ SdfEntity.TEXT_POS ] );
- setHelptext( splitted[ SdfEntity.HELPTEXT_POS ] );
- setQuickhelptext( splitted[ SdfEntity.QUICKHELPTEXT_POS ] );
- setTitle( splitted[ SdfEntity.TITLE_POS ] );
- setDate( splitted[ SdfEntity.DATE_POS ] );
- }
-
- public String getFileId(){
- return project+"\\"+source_file;
- }
- public String getResourcePath(){
- return source_file.substring(0 , source_file.lastIndexOf( "\\" )-1 );
- }
- public String toString(){
- return project+"\t"+source_file+"\t"+dummy1+"\t"+resource_type+"\t"+gid+"\t"
- +lid+"\t"+helpid+"\t"+platform+"\t"+dummy2+"\t"+langid+"\t"
- +text+"\t"+helptext+"\t"+quickhelptext+"\t"+title+"\t"+date;
- }
- public String getId(){
- return project+gid+lid+source_file+resource_type+platform+helpid;
- }
-
- public String getDummy1() {
- return dummy1;
- }
-
- public void setDummy1(String dummy1) {
- this.dummy1 = dummy1;
- }
-
- public String getPlatform() {
- return platform;
- }
-
- public void setPlatform(String platform) {
- this.platform = platform;
- }
-
- public String getDummy2() {
- return dummy2;
- }
-
- public void setDummy2(String dummy2) {
- this.dummy2 = dummy2;
- }
-
- public String getGid() {
- return gid;
- }
-
- public void setGid(String gid) {
- this.gid = gid;
- }
-
- public String getHelpid() {
- return helpid;
- }
-
- public void setHelpid(String helpid) {
- this.helpid = helpid;
- }
-
- public String getHelptext() {
- return helptext;
- }
-
- public void setHelptext(String helptext) {
- this.helptext = helptext;
- }
-
- public String getLangid() {
- return langid;
- }
-
- public void setLangid(String langid) {
- this.langid = langid;
- }
-
- public String getLid() {
- return lid;
- }
-
- public void setLid(String lid) {
- this.lid = lid;
- }
-
- public String getProject() {
- return project;
- }
-
- public void setProject(String project) {
- this.project = project;
- }
-
- public String getQuickhelptext() {
- return quickhelptext;
- }
-
- public void setQuickhelptext(String quickhelptext) {
- this.quickhelptext = quickhelptext;
- }
-
- public String getResource_type() {
- return resource_type;
- }
-
- public void setResource_type(String resource_type) {
- this.resource_type = resource_type;
- }
-
- public String getSource_file() {
- return source_file;
- }
-
- public void setSource_file(String source_file) {
- this.source_file = source_file;
- }
-
- public String getText() {
- return text;
- }
-
- public void setText(String text) {
- this.text = text;
- }
-
- public String getTitle() {
- return title;
- }
-
- public void setTitle(String title) {
- this.title = title;
- }
- public String getDate() {
- return date;
- }
- public void setDate(String date) {
- this.date = date;
- }
-
-
-}
diff --git a/transex3/java/jpropex/jpropex b/transex3/java/jpropex/jpropex
deleted file mode 100755
index 2d62d13b093e..000000000000
--- a/transex3/java/jpropex/jpropex
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-if [ x${SOLARENV}x = xx ]; then
- echo No environment found, please use 'configure' or 'setsolar'
- exit 1
-fi
-if [ x${JAVA_HOME}x = xx ]; then
- echo No Java found!
- exit 1
-fi
-exec java -DSOLARSRC=${SOLARSRC} -DWORK_STAMP=${WORK_STAMP} -DUSE_SHELL= -jar ${SOLARVER}/${INPATH}/bin${UPDMINOREXT}/jpropex.jar "$@"
diff --git a/transex3/java/jpropex/jpropex.MF b/transex3/java/jpropex/jpropex.MF
deleted file mode 100755
index 3e22e7e9bfbf..000000000000
--- a/transex3/java/jpropex/jpropex.MF
+++ /dev/null
@@ -1 +0,0 @@
-Main-Class: Main
diff --git a/ucb/source/ucp/odma/odma_lib.cxx b/ucb/source/ucp/odma/odma_lib.cxx
index 774bcf5f6323..cf9da3a2b942 100644
--- a/ucb/source/ucp/odma/odma_lib.cxx
+++ b/ucb/source/ucp/odma/odma_lib.cxx
@@ -78,10 +78,6 @@ namespace odma
if (bLoaded)
return sal_True;
::rtl::OUString sPath;
- #ifdef WIN
- sPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ODMA.DLL"));
-
- #endif
#ifdef WNT
sPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ODMA32.DLL"));
#endif
diff --git a/ucb/source/ucp/package/makefile.mk b/ucb/source/ucp/package/makefile.mk
index 8c6dcda31829..a8cdf7430703 100644
--- a/ucb/source/ucp/package/makefile.mk
+++ b/ucb/source/ucp/package/makefile.mk
@@ -68,6 +68,7 @@ SHL1IMPLIB=i$(TARGET)
SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1STDLIBS=\
+ $(COMPHELPERLIB) \
$(CPPUHELPERLIB) \
$(CPPULIB) \
$(SALLIB) \
diff --git a/ucb/source/ucp/package/pkguri.cxx b/ucb/source/ucp/package/pkguri.cxx
index feb8daec7905..8424ed906e92 100644
--- a/ucb/source/ucp/package/pkguri.cxx
+++ b/ucb/source/ucp/package/pkguri.cxx
@@ -36,6 +36,7 @@
#include "rtl/ustrbuf.hxx"
#include "osl/diagnose.h"
+#include "comphelper/storagehelper.hxx"
#include "../inc/urihelper.hxx"
@@ -85,7 +86,7 @@ void PackageUri::init() const
if ( ( m_aUri.getLength() < PACKAGE_URL_SCHEME_LENGTH + 4 ) )
{
// error, but remember that we did a init().
- m_aPath = rtl::OUString::createFromAscii( "/" );
+ m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
return;
}
@@ -100,7 +101,7 @@ void PackageUri::init() const
!= sal_Unicode( '/' ) ) )
{
// error, but remember that we did a init().
- m_aPath = rtl::OUString::createFromAscii( "/" );
+ m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
return;
}
@@ -128,8 +129,8 @@ void PackageUri::init() const
{
m_aParam +=
( m_aParam.getLength()
- ? ::rtl::OUString::createFromAscii( "&purezip" )
- : ::rtl::OUString::createFromAscii( "?purezip" ) );
+ ? ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "&purezip" ) )
+ : ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "?purezip" ) ) );
}
aPureUri = aPureUri.replaceAt( 0,
@@ -143,7 +144,7 @@ void PackageUri::init() const
// Only <scheme>:/// - Empty authority
// error, but remember that we did a init().
- m_aPath = rtl::OUString::createFromAscii( "/" );
+ m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
return;
}
else if ( nEnd == ( aPureUri.getLength() - 1 ) )
@@ -154,7 +155,7 @@ void PackageUri::init() const
// Only <scheme>://// or <scheme>://<something>//
// error, but remember that we did a init().
- m_aPath = rtl::OUString::createFromAscii( "/" );
+ m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
return;
}
@@ -175,7 +176,7 @@ void PackageUri::init() const
nStart, aPureUri.getLength() - nStart, aNormPackage );
m_aPackage
= ::ucb_impl::urihelper::decodeSegment( aNormPackage );
- m_aPath = rtl::OUString::createFromAscii( "/" );
+ m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
m_aUri = m_aUri.replaceAt( 0,
( nParam >= 0 )
? nParam
@@ -193,16 +194,19 @@ void PackageUri::init() const
{
m_aPath = aPureUri.copy( nEnd + 1 );
- // Empty path segments or encoded slashes?
- if ( m_aPath.indexOf(
- rtl::OUString::createFromAscii( "//" ) ) != -1
- || m_aPath.indexOf(
- rtl::OUString::createFromAscii( "%2F" ) ) != -1
- || m_aPath.indexOf(
- rtl::OUString::createFromAscii( "%2f" ) ) != -1 )
+ // Unexpected sequences of characters:
+ // - empty path segments
+ // - encoded slashes
+ // - parent folder segments ".."
+ // - current folder segments "."
+ if ( m_aPath.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "//" ) ) ) != -1
+ || m_aPath.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "%2F" ) ) ) != -1
+ || m_aPath.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "%2f" ) ) ) != -1
+ || ::comphelper::OStorageHelper::PathHasSegment( m_aPath, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".." ) ) )
+ || ::comphelper::OStorageHelper::PathHasSegment( m_aPath, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ) )
{
// error, but remember that we did a init().
- m_aPath = rtl::OUString::createFromAscii( "/" );
+ m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
return;
}
@@ -239,7 +243,7 @@ void PackageUri::init() const
else
{
// error, but remember that we did a init().
- m_aPath = rtl::OUString::createFromAscii( "/" );
+ m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
}
}
}
diff --git a/unotools/inc/unotools/configpathes.hxx b/unotools/inc/unotools/configpathes.hxx
index 2a1e76abf1fc..4e537193b22f 100644
--- a/unotools/inc/unotools/configpathes.hxx
+++ b/unotools/inc/unotools/configpathes.hxx
@@ -76,6 +76,9 @@ namespace utl
If this is not a valid configuration path, it is interpreted as
a single name of a node.
+ @param _sOutPath
+ If non-null, contains the remainder of the path upon return.
+
@returns
The plain (non-escaped) name of the node that is the first step
when traversing <var>_sInPath</var>.<BR/>
@@ -83,7 +86,8 @@ namespace utl
configuration path, it is returned unaltered.
*/
- UNOTOOLS_DLLPUBLIC ::rtl::OUString extractFirstFromConfigurationPath(::rtl::OUString const& _sInPath);
+ UNOTOOLS_DLLPUBLIC ::rtl::OUString extractFirstFromConfigurationPath(
+ ::rtl::OUString const& _sInPath, ::rtl::OUString* _sOutPath = 0);
//----------------------------------------------------------------------------
/** check whether a path is to a nested node with respect to a parent path.
diff --git a/unotools/source/config/configpathes.cxx b/unotools/source/config/configpathes.cxx
index dc66854a8d43..5e7a4c80813e 100644
--- a/unotools/source/config/configpathes.cxx
+++ b/unotools/source/config/configpathes.cxx
@@ -154,7 +154,7 @@ sal_Bool splitLastFromConfigurationPath(OUString const& _sInPath,
}
//----------------------------------------------------------------------------
-OUString extractFirstFromConfigurationPath(OUString const& _sInPath)
+OUString extractFirstFromConfigurationPath(OUString const& _sInPath, OUString* _sOutPath)
{
sal_Int32 nSep = _sInPath.indexOf('/');
sal_Int32 nBracket = _sInPath.indexOf('[');
@@ -179,8 +179,7 @@ OUString extractFirstFromConfigurationPath(OUString const& _sInPath)
nBracket = nEnd;
}
OSL_ENSURE(nEnd > nStart && _sInPath[nBracket] == ']', "Invalid config path: improper mismatch of quote or bracket");
- OSL_DEBUG_ONLY(nSep = nBracket+1);
- OSL_ENSURE(nSep == _sInPath.getLength() || _sInPath[nSep] == '/', "Invalid config path: brackets not followed by slash");
+ OSL_ENSURE((nBracket+1 == _sInPath.getLength() && nSep == -1) || (_sInPath[nBracket+1] == '/' && nSep == nBracket+1), "Invalid config path: brackets not followed by slash");
}
else // ... but our initial element name is in simple form
nStart = 0;
@@ -188,6 +187,12 @@ OUString extractFirstFromConfigurationPath(OUString const& _sInPath)
OUString sResult = (nEnd >= 0) ? _sInPath.copy(nStart, nEnd-nStart) : _sInPath;
lcl_resolveCharEntities(sResult);
+
+ if (_sOutPath != 0)
+ {
+ *_sOutPath = (nSep >= 0) ? _sInPath.copy(nSep + 1) : OUString();
+ }
+
return sResult;
}
diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx
index 2a03896502a9..fb4a6bf508b3 100644
--- a/unoxml/source/dom/node.cxx
+++ b/unoxml/source/dom/node.cxx
@@ -43,13 +43,19 @@
#include "attr.hxx"
#include <com/sun/star/xml/sax/FastToken.hpp>
-
+#include "rtl/instance.hxx"
+#include "osl/mutex.hxx"
#include "../events/eventdispatcher.hxx"
#include "../events/mutationevent.hxx"
#include <boost/bind.hpp>
#include <algorithm>
+namespace {
+//see CNode::remove
+ struct NodeMutex: public ::rtl::Static<osl::Mutex, NodeMutex> {};
+}
+
namespace DOM
{
void pushContext(Context& io_rContext)
@@ -131,6 +137,18 @@ namespace DOM
void CNode::remove(const xmlNodePtr aNode)
{
+ //Using the guard here protects against races when at the same time
+ //CNode::get() is called. This fix helps in many cases but is still
+ //incorrect. remove is called from ~CNode. That is, while the object
+ //is being destructed it can still be obtained by calling CNode::get().
+ //Another bug currently prevents the correct destruction of CNodes. So
+ //the destructor is rarely called.
+ //
+ //Doing this right would probably mean to store WeakReferences in the
+ //map and also guard oder functions. To keep the risk at a minimum
+ //we keep this imperfect fix for the upcoming release and fix it later
+ //properly (http://qa.openoffice.org/issues/show_bug.cgi?id=113682)
+ ::osl::MutexGuard guard(NodeMutex::get());
nodemap_t::iterator i = CNode::theNodeMap.find(aNode);
if (i != CNode::theNodeMap.end())
{
@@ -145,7 +163,8 @@ namespace DOM
CNode* pNode = 0;
if (aNode == NULL)
return 0;
-
+ //see CNode::remove
+ ::osl::MutexGuard guard(NodeMutex::get());
//check whether there is already an instance for this node
nodemap_t::const_iterator i = CNode::theNodeMap.find(aNode);
if (i != CNode::theNodeMap.end())
diff --git a/vbahelper/inc/vbahelper/vbaapplicationbase.hxx b/vbahelper/inc/vbahelper/vbaapplicationbase.hxx
index e2a5a3bff5da..6902bc7b5042 100644
--- a/vbahelper/inc/vbahelper/vbaapplicationbase.hxx
+++ b/vbahelper/inc/vbahelper/vbaapplicationbase.hxx
@@ -53,17 +53,20 @@ public:
virtual void SAL_CALL setScreenUpdating(sal_Bool bUpdate) throw (css::uno::RuntimeException);
virtual sal_Bool SAL_CALL getDisplayStatusBar() throw (css::uno::RuntimeException);
virtual void SAL_CALL setDisplayStatusBar(sal_Bool bDisplayStatusBar) throw (css::uno::RuntimeException);
- virtual ::sal_Bool SAL_CALL getInteractive() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setInteractive( ::sal_Bool bInteractive ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getInteractive() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setInteractive( ::sal_Bool bInteractive ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setVisible( ::sal_Bool bVisible ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual ::rtl::OUString SAL_CALL getVersion() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getVBE() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getVBProjects() throw (css::uno::RuntimeException);
+
virtual void SAL_CALL Run( const ::rtl::OUString& MacroName, const css::uno::Any& varg1, const css::uno::Any& varg2, const css::uno::Any& varg3, const css::uno::Any& varg4, const css::uno::Any& varg5, const css::uno::Any& varg6, const css::uno::Any& varg7, const css::uno::Any& varg8, const css::uno::Any& varg9, const css::uno::Any& varg10, const css::uno::Any& varg11, const css::uno::Any& varg12, const css::uno::Any& varg13, const css::uno::Any& varg14, const css::uno::Any& varg15, const css::uno::Any& varg16, const css::uno::Any& varg17, const css::uno::Any& varg18, const css::uno::Any& varg19, const css::uno::Any& varg20, const css::uno::Any& varg21, const css::uno::Any& varg22, const css::uno::Any& varg23, const css::uno::Any& varg24, const css::uno::Any& varg25, const css::uno::Any& varg26, const css::uno::Any& varg27, const css::uno::Any& varg28, const css::uno::Any& varg29, const css::uno::Any& varg30 ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL OnTime( const ::com::sun::star::uno::Any& aEarliestTime, const ::rtl::OUString& aFunction, const ::com::sun::star::uno::Any& aLatestTime, const ::com::sun::star::uno::Any& aSchedule ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL OnTime( const css::uno::Any& aEarliestTime, const ::rtl::OUString& aFunction, const css::uno::Any& aLatestTime, const css::uno::Any& aSchedule ) throw (css::uno::RuntimeException);
virtual float SAL_CALL CentimetersToPoints( float _Centimeters ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL Undo( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL Quit( ) throw (::com::sun::star::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL getVBE() throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL SAL_CALL getVBProjects() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Undo() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Quit() throw (css::uno::RuntimeException);
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
diff --git a/vbahelper/inc/vbahelper/vbacollectionimpl.hxx b/vbahelper/inc/vbahelper/vbacollectionimpl.hxx
index 36102116c7b3..5bd58b44adaf 100644
--- a/vbahelper/inc/vbahelper/vbacollectionimpl.hxx
+++ b/vbahelper/inc/vbahelper/vbacollectionimpl.hxx
@@ -133,11 +133,12 @@ protected:
class VBAHELPER_DLLPUBLIC EnumerationHelperImpl : public EnumerationHelper_BASE
{
protected:
+ css::uno::WeakReference< ov::XHelperInterface > m_xParent;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
css::uno::Reference< css::container::XEnumeration > m_xEnumeration;
public:
- EnumerationHelperImpl( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XEnumeration >& xEnumeration ) throw ( css::uno::RuntimeException ) : m_xContext( xContext ), m_xEnumeration( xEnumeration ) { }
+ EnumerationHelperImpl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XEnumeration >& xEnumeration ) throw ( css::uno::RuntimeException ) : m_xParent( xParent ), m_xContext( xContext ), m_xEnumeration( xEnumeration ) { }
virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (css::uno::RuntimeException) { return m_xEnumeration->hasMoreElements(); }
};
diff --git a/vbahelper/inc/vbahelper/vbadocumentbase.hxx b/vbahelper/inc/vbahelper/vbadocumentbase.hxx
index 7131e1963b26..2588b7da1720 100644
--- a/vbahelper/inc/vbahelper/vbadocumentbase.hxx
+++ b/vbahelper/inc/vbahelper/vbadocumentbase.hxx
@@ -52,9 +52,7 @@ public:
virtual ::rtl::OUString SAL_CALL getFullName() throw (css::uno::RuntimeException);
virtual sal_Bool SAL_CALL getSaved() throw (css::uno::RuntimeException);
virtual void SAL_CALL setSaved( sal_Bool bSave ) throw (css::uno::RuntimeException);
-
- virtual css::uno::Any SAL_CALL getVBProject() throw (css::uno::RuntimeException); // Michhael E. Bohn
-
+ virtual css::uno::Any SAL_CALL getVBProject() throw (css::uno::RuntimeException);
// Methods
virtual void SAL_CALL Close( const css::uno::Any &bSaveChanges,
diff --git a/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx b/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx
new file mode 100755
index 000000000000..89d355db71f9
--- /dev/null
+++ b/vbahelper/inc/vbahelper/vbaeventshelperbase.hxx
@@ -0,0 +1,162 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef VBAHELPER_VBAEVENTSHELPERBASE_HXX
+#define VBAHELPER_VBAEVENTSHELPERBASE_HXX
+
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include <map>
+#include <deque>
+#include "vbahelper/vbahelper.hxx"
+
+namespace com { namespace sun { namespace star {
+ namespace uno { class XComponentContext; }
+} } }
+
+// ============================================================================
+
+typedef ::cppu::WeakImplHelper2< css::script::vba::XVBAEventProcessor, css::lang::XEventListener > VbaEventsHelperBase_BASE;
+
+class VBAHELPER_DLLPUBLIC VbaEventsHelperBase : public VbaEventsHelperBase_BASE
+{
+public:
+ VbaEventsHelperBase(
+ const css::uno::Sequence< css::uno::Any >& rArgs,
+ const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ virtual ~VbaEventsHelperBase();
+
+ // XVBAEventProcessor
+ virtual sal_Bool SAL_CALL hasVbaEventHandler( sal_Int32 nEventId, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+ virtual void SAL_CALL processVbaEvent( sal_Int32 nEventId, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException, css::script::provider::ScriptFrameworkErrorException, css::util::VetoException, css::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const css::lang::EventObject& aSource ) throw (css::uno::RuntimeException);
+
+protected:
+ // ------------------------------------------------------------------------
+
+ enum EventHandlerType { EVENTHANDLER_GLOBAL, EVENTHANDLER_DOCUMENT };
+ struct EventHandlerInfo
+ {
+ sal_Int32 mnEventId;
+ ::rtl::OUString maMacroName;
+ EventHandlerType meType;
+ sal_Int32 mnCancelIndex;
+ css::uno::Any maUserData;
+ };
+
+ /** Registers a supported event handler.
+
+ @param nEventId Event identifier from com.sun.star.script.vba.EventIdentifier.
+ @param pcMacroName Name of the associated VBA event handler macro.
+ @param eType Document event or global event.
+ @param nCancelIndex 0-based index of Cancel parameter, or -1.
+ @param rUserData User data for free usage in derived implementations. */
+ void registerEventHandler(
+ sal_Int32 nEventId,
+ const sal_Char* pcMacroName,
+ EventHandlerType eType = EVENTHANDLER_DOCUMENT,
+ sal_Int32 nCancelIndex = -1,
+ const css::uno::Any& rUserData = css::uno::Any() );
+
+ /** Throws, if the passed sequence does not contain a value at the specified index. */
+ static inline void checkArgument( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException)
+ { if( rArgs.getLength() <= nIndex ) throw css::lang::IllegalArgumentException(); }
+
+ /** Throws, if the passed sequence does not contain a value of a specific at the specified index. */
+ template< typename Type >
+ static inline void checkArgumentType( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException)
+ { if( (rArgs.getLength() <= nIndex) || !rArgs[ nIndex ].has< Type >() ) throw css::lang::IllegalArgumentException(); }
+
+ // ------------------------------------------------------------------------
+
+ struct EventQueueEntry
+ {
+ sal_Int32 mnEventId;
+ css::uno::Sequence< css::uno::Any > maArgs;
+ inline /*implicit*/ EventQueueEntry( sal_Int32 nEventId ) : mnEventId( nEventId ) {}
+ inline EventQueueEntry( sal_Int32 nEventId, const css::uno::Sequence< css::uno::Any >& rArgs ) : mnEventId( nEventId ), maArgs( rArgs ) {}
+ };
+ typedef ::std::deque< EventQueueEntry > EventQueue;
+
+ /** Derived classes return whether event processing is enabled. Throws if
+ the instance is in an invalid state. */
+ virtual bool implEventsEnabled() throw (css::uno::RuntimeException) = 0;
+
+ /** Derived classes do additional prpeparations and return whether the
+ event handler has to be called. */
+ virtual bool implPrepareEvent(
+ EventQueue& rEventQueue,
+ const EventHandlerInfo& rInfo,
+ const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::uno::RuntimeException) = 0;
+
+ /** Derived classes have to return the argument list for the specified VBA event handler. */
+ virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList(
+ const EventHandlerInfo& rInfo,
+ const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException) = 0;
+
+ /** Derived classes may do additional postprocessing. Called even if the
+ event handler does not exist, or if an error occured during execution. */
+ virtual void implPostProcessEvent(
+ EventQueue& rEventQueue,
+ const EventHandlerInfo& rInfo,
+ bool bSuccess,
+ bool bCancel ) throw (css::uno::RuntimeException) = 0;
+
+ /** Derived classes have to return the name of the Basic document module. */
+ virtual ::rtl::OUString implGetDocumentModuleName(
+ const EventHandlerInfo& rInfo,
+ const css::uno::Sequence< css::uno::Any >& rArgs ) const throw (css::lang::IllegalArgumentException) = 0;
+
+private:
+ /** Returns the event handler info struct for the specified event, or throws. */
+ const EventHandlerInfo& getEventHandlerInfo( sal_Int32 nEventId ) const throw (css::lang::IllegalArgumentException);
+
+ /** Searches the event handler in the document and returns its full script path. */
+ ::rtl::OUString getEventHandlerPath(
+ const EventHandlerInfo& rInfo,
+ const css::uno::Sequence< css::uno::Any >& rArgs ) const throw (css::lang::IllegalArgumentException);
+
+ /** Removes this instance from all broadcasters. */
+ void stopListening();
+
+protected:
+ css::uno::Reference< css::frame::XModel > mxModel;
+ SfxObjectShell* mpShell;
+
+private:
+ typedef ::std::map< sal_Int32, EventHandlerInfo > EventHandlerMap;
+
+ EventHandlerMap maEvents;
+ bool mbDisposed;
+};
+
+// ============================================================================
+
+#endif
diff --git a/vbahelper/inc/vbahelper/vbaglobalbase.hxx b/vbahelper/inc/vbahelper/vbaglobalbase.hxx
index e75cbb7e7af8..61aaa1d65657 100644
--- a/vbahelper/inc/vbahelper/vbaglobalbase.hxx
+++ b/vbahelper/inc/vbahelper/vbaglobalbase.hxx
@@ -32,16 +32,16 @@
typedef InheritedHelperInterfaceImpl1< ov::XGlobalsBase > Globals_BASE;
class VBAHELPER_DLLPUBLIC VbaGlobalsBase : public Globals_BASE
-
{
protected:
+ rtl::OUString msDocCtxName;
bool hasServiceName( const rtl::OUString& serviceName );
void init( const css::uno::Sequence< css::beans::PropertyValue >& aInitArgs );
public:
VbaGlobalsBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const rtl::OUString& sDocCtxName );
- virtual ~VbaGlobalsBase(){};
+ virtual ~VbaGlobalsBase();
// XMultiServiceFactory
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( const ::rtl::OUString& aServiceSpecifier ) throw (css::uno::Exception, css::uno::RuntimeException);
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier, const css::uno::Sequence< css::uno::Any >& Arguments ) throw (css::uno::Exception, css::uno::RuntimeException);
diff --git a/vbahelper/inc/vbahelper/vbahelper.hxx b/vbahelper/inc/vbahelper/vbahelper.hxx
index 33613bb76091..a1eca84bbdf8 100644
--- a/vbahelper/inc/vbahelper/vbahelper.hxx
+++ b/vbahelper/inc/vbahelper/vbahelper.hxx
@@ -63,6 +63,7 @@ namespace ooo
throw css::lang::IllegalArgumentException();
return aSomething;
}
+ VBAHELPER_DLLPUBLIC css::uno::Reference< css::uno::XInterface > getUnoDocModule( const String& aModName, SfxObjectShell* pShell );
VBAHELPER_DLLPUBLIC SfxObjectShell* getSfxObjShell( const css::uno::Reference< css::frame::XModel >& xModel ) throw ( css::uno::RuntimeException);
VBAHELPER_DLLPUBLIC css::uno::Reference< css::uno::XInterface > createVBAUnoAPIService( SfxObjectShell* pShell, const sal_Char* _pAsciiName ) throw (css::uno::RuntimeException);
diff --git a/vbahelper/inc/vbahelper/vbahelperinterface.hxx b/vbahelper/inc/vbahelper/vbahelperinterface.hxx
index 21339631e1ed..b095b5cd2823 100644
--- a/vbahelper/inc/vbahelper/vbahelperinterface.hxx
+++ b/vbahelper/inc/vbahelper/vbahelperinterface.hxx
@@ -28,6 +28,8 @@
#define OOVBAAPI_VBA_HELPERINTERFACE_HXX
#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase3.hxx>
#include <ooo/vba/XHelperInterface.hpp>
#include <vbahelper/vbahelper.hxx>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -68,6 +70,7 @@ protected:
css::uno::Reference< css::uno::XComponentContext > mxContext;
public:
InheritedHelperInterfaceImpl() {}
+ InheritedHelperInterfaceImpl( const css::uno::Reference< css::uno::XComponentContext >& xContext ) : mxContext( xContext ) {}
InheritedHelperInterfaceImpl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : mxParent( xParent ), mxContext( xContext ) {}
virtual rtl::OUString& getServiceImplName() = 0;
virtual css::uno::Sequence<rtl::OUString> getServiceNames() = 0;
@@ -86,7 +89,6 @@ public:
return xNameAccess->getByName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Application" ) ) );
}
-
// XServiceInfo Methods
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (css::uno::RuntimeException) { return getServiceImplName(); }
virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (css::uno::RuntimeException)
@@ -101,19 +103,39 @@ public:
}
virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (css::uno::RuntimeException)
{
- css::uno::Sequence< rtl::OUString > aNames = getServiceNames();;
+ css::uno::Sequence< rtl::OUString > aNames = getServiceNames();
return aNames;
}
};
template< typename Ifc1 >
class VBAHELPER_DLLPUBLIC InheritedHelperInterfaceImpl1 : public InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper1< Ifc1 > >
+{
+ typedef InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper1< Ifc1 > > Base;
+public:
+ InheritedHelperInterfaceImpl1< Ifc1 >() {}
+ InheritedHelperInterfaceImpl1< Ifc1 >( const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xContext ) {}
+ InheritedHelperInterfaceImpl1< Ifc1 >( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xParent, xContext ) {}
+};
+template< typename Ifc1, typename Ifc2 >
+class VBAHELPER_DLLPUBLIC InheritedHelperInterfaceImpl2 : public InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper2< Ifc1, Ifc2 > >
{
-typedef InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper1< Ifc1 > > Base;
+ typedef InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper2< Ifc1, Ifc2 > > Base;
public:
- InheritedHelperInterfaceImpl1< Ifc1 > ( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xParent, xContext ) {}
+ InheritedHelperInterfaceImpl2< Ifc1, Ifc2 >() {}
+ InheritedHelperInterfaceImpl2< Ifc1, Ifc2 >( const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xContext ) {}
+ InheritedHelperInterfaceImpl2< Ifc1, Ifc2 >( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xParent, xContext ) {}
+};
+template< typename Ifc1, typename Ifc2, typename Ifc3 >
+class VBAHELPER_DLLPUBLIC InheritedHelperInterfaceImpl3 : public InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper3< Ifc1, Ifc2, Ifc3 > >
+{
+ typedef InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper3< Ifc1, Ifc2, Ifc3 > > Base;
+public:
+ InheritedHelperInterfaceImpl3< Ifc1, Ifc2, Ifc3 >() {}
+ InheritedHelperInterfaceImpl3< Ifc1, Ifc2, Ifc3 >( const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xContext ) {}
+ InheritedHelperInterfaceImpl3< Ifc1, Ifc2, Ifc3 >( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xParent, xContext ) {}
};
// ============================================================================
diff --git a/vbahelper/prj/d.lst b/vbahelper/prj/d.lst
index d683e97c8b90..2d20ab1f982d 100644
--- a/vbahelper/prj/d.lst
+++ b/vbahelper/prj/d.lst
@@ -26,3 +26,4 @@ mkdir: %_DEST%\inc%_EXT%\basic
..\inc\vbahelper\vbatextframe.hxx %_DEST%\inc%_EXT%\vbahelper\vbatextframe.hxx
..\inc\vbahelper\vbashaperange.hxx %_DEST%\inc%_EXT%\vbahelper\vbashaperange.hxx
..\inc\vbahelper\vbapagesetupbase.hxx %_DEST%\inc%_EXT%\vbahelper\vbapagesetupbase.hxx
+..\inc\vbahelper\vbaeventshelperbase.hxx %_DEST%\inc%_EXT%\vbahelper\vbaeventshelperbase.hxx
diff --git a/vbahelper/source/msforms/vbacontrols.cxx b/vbahelper/source/msforms/vbacontrols.cxx
index 1284b36be463..8d01687ef905 100644
--- a/vbahelper/source/msforms/vbacontrols.cxx
+++ b/vbahelper/source/msforms/vbacontrols.cxx
@@ -74,12 +74,20 @@ private:
public:
ControlArrayWrapper( const uno::Reference< awt::XControl >& xDialog )
{
- mxDialog.set( xDialog, uno::UNO_QUERY_THROW );
- uno::Sequence< uno::Reference< awt::XControl > > sXControls = mxDialog->getControls();
+ try
+ {
+ mxDialog.set( xDialog, uno::UNO_QUERY_THROW );
+ uno::Sequence< uno::Reference< awt::XControl > > sXControls = mxDialog->getControls();
- msNames.realloc( sXControls.getLength() );
- for ( sal_Int32 i = 0; i < sXControls.getLength(); ++i )
- SetArrayElementTo( sXControls[ i ], i );
+ msNames.realloc( sXControls.getLength() );
+ for ( sal_Int32 i = 0; i < sXControls.getLength(); ++i )
+ SetArrayElementTo( sXControls[ i ], i );
+ }
+ catch( uno::Exception& )
+ {
+ // accept the case when the dialog already does not exist
+ // in this case the wrapper should work in dummy mode
+ }
}
static rtl::OUString getControlName( const uno::Reference< awt::XControl >& xCtrl )
@@ -186,7 +194,7 @@ ScVbaControls::ScVbaControls( const uno::Reference< XHelperInterface >& xParent,
const css::uno::Reference< awt::XControl >& xDialog )
: ControlsImpl_BASE( xParent, xContext, lcl_controlsWrapper( xDialog ) )
{
- mxDialog.set( xDialog, uno::UNO_QUERY_THROW );
+ mxDialog.set( xDialog, uno::UNO_QUERY );
}
uno::Reference< container::XEnumeration >
@@ -349,13 +357,16 @@ void SAL_CALL ScVbaControls::Remove( const uno::Any& StringKeyOrIndex )
}
catch( uno::RuntimeException& )
{
- throw;
+ // the exceptions are not rethrown, impossibility to find or remove the control is currently not reported
+ // since in most cases it means just that the controls is already not there, the VBA seems to do it in the same way
+
+ // throw;
}
catch( uno::Exception& e )
{
- throw lang::WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can not create AXControl!" ) ),
- uno::Reference< uno::XInterface >(),
- uno::makeAny( e ) );
+ // throw lang::WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can not create AXControl!" ) ),
+ // uno::Reference< uno::XInterface >(),
+ // uno::makeAny( e ) );
}
}
diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx
index 1ce403fc19c3..2a4cecfc2338 100644
--- a/vbahelper/source/msforms/vbauserform.cxx
+++ b/vbahelper/source/msforms/vbauserform.cxx
@@ -185,7 +185,9 @@ ScVbaUserForm::hasMethod( const ::rtl::OUString& /*aName*/ ) throw (uno::Runtime
uno::Any SAL_CALL
ScVbaUserForm::Controls( const uno::Any& index ) throw (uno::RuntimeException)
{
- uno::Reference< awt::XControl > xDialogControl( m_xDialog, uno::UNO_QUERY_THROW );
+ // if the dialog already closed we should do nothing, but the VBA will call methods of the Controls objects
+ // thus we have to provide a dummy object in this case
+ uno::Reference< awt::XControl > xDialogControl( m_xDialog, uno::UNO_QUERY );
uno::Reference< XCollection > xControls( new ScVbaControls( this, mxContext, xDialogControl ) );
if ( index.hasValue() )
return uno::makeAny( xControls->Item( index, uno::Any() ) );
diff --git a/vbahelper/source/vbahelper/makefile.mk b/vbahelper/source/vbahelper/makefile.mk
index 47ad44b3d0ed..22ed40a3adfa 100644
--- a/vbahelper/source/vbahelper/makefile.mk
+++ b/vbahelper/source/vbahelper/makefile.mk
@@ -65,6 +65,8 @@ SLOFILES=\
$(SLO)$/vbashaperange.obj \
$(SLO)$/vbatextframe.obj \
$(SLO)$/vbapagesetupbase.obj \
+ $(SLO)$/vbaeventshelperbase.obj
+
# --- Targets -------------------------------------------------------
.INCLUDE : target.mk
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index 6d2c51066ca2..326c150edade 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -24,39 +24,37 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+
#include "vbahelper/vbaapplicationbase.hxx"
+
#include <com/sun/star/container/XIndexAccess.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp> //Michael E. Bohn
-#include <com/sun/star/lang/XMultiComponentFactory.hpp> //Michael E. Bohn
-#include <com/sun/star/lang/XComponent.hpp> //Michael E. Bohn
-#include <com/sun/star/container/XEnumeration.hpp> //Michael E. Bohn
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XMultiComponentFactory.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
-#include <com/sun/star/document/XEmbeddedScripts.hpp> //Michael E. Bohn
-#include <ooo/vba/XVBAAppService.hpp> //Michael E. Bohn
+#include <com/sun/star/document/XEmbeddedScripts.hpp>
#include <com/sun/star/awt/XWindow2.hpp>
-
-#include "vbacommandbars.hxx"
+#include <hash_map>
#include <filter/msfilter/msvbahelper.hxx>
#include <tools/datetime.hxx>
-// start basic includes
#include <basic/sbx.hxx>
#include <basic/sbstar.hxx>
#include <basic/sbuno.hxx>
#include <basic/sbmeth.hxx>
#include <basic/sbmod.hxx>
-// end basic includes
-#include <hash_map>
+#include "vbacommandbars.hxx"
-using namespace com::sun::star;
-using namespace ooo::vba;
+using namespace ::com::sun::star;
+using namespace ::ooo::vba;
#define OFFICEVERSION "11.0"
@@ -162,6 +160,9 @@ typedef ::std::hash_map< VbaTimerInfo, VbaTimer*, VbaTimerInfoHash, ::std::equal
struct VbaApplicationBase_Impl
{
VbaTimerHashMap m_aTimerHash;
+ sal_Bool mbVisible;
+
+ inline VbaApplicationBase_Impl() : mbVisible( sal_True ) {}
virtual ~VbaApplicationBase_Impl()
{
@@ -185,7 +186,6 @@ VbaApplicationBase::VbaApplicationBase( const uno::Reference< uno::XComponentCon
VbaApplicationBase::~VbaApplicationBase()
{
- m_pImpl = 0;
delete m_pImpl;
}
@@ -268,6 +268,16 @@ void SAL_CALL VbaApplicationBase::setInteractive( ::sal_Bool bInteractive )
xWindow->setEnable( bInteractive );
}
+sal_Bool SAL_CALL VbaApplicationBase::getVisible() throw (uno::RuntimeException)
+{
+ return m_pImpl->mbVisible; // dummy implementation
+}
+
+void SAL_CALL VbaApplicationBase::setVisible( sal_Bool bVisible ) throw (uno::RuntimeException)
+{
+ m_pImpl->mbVisible = bVisible; // dummy implementation
+}
+
uno::Any SAL_CALL
VbaApplicationBase::CommandBars( const uno::Any& aIndex ) throw (uno::RuntimeException)
{
@@ -407,63 +417,50 @@ float SAL_CALL VbaApplicationBase::CentimetersToPoints( float _Centimeters ) thr
return ( _Centimeters * rate );
}
-// inserted by Michael E. Bohn
uno::Any SAL_CALL VbaApplicationBase::getVBE() throw (uno::RuntimeException)
{
- uno::Any aAny;
- uno::Reference< ::lang::XMultiComponentFactory > xServiceManager = mxContext->getServiceManager();
- try
- {
- uno::Reference < ::uno::XInterface > xInterface = xServiceManager->createInstanceWithContext( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAAppService" )),mxContext);
- uno::Reference < ::ooo::vba::XVBAAppService > xVBAAppService (xInterface, ::uno::UNO_QUERY_THROW );
- if (xVBAAppService.is()){
- uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- return xVBAAppService->getVBE( this, mxContext, xModel);
- }
-
- }catch(uno::Exception* e)
- {
- }
- return aAny;
+ try // return empty object on error
+ {
+ uno::Sequence< uno::Any > aArgs( 2 );
+ aArgs[ 0 ] <<= uno::Reference< XHelperInterface >( this );
+ aArgs[ 1 ] <<= getCurrentDocument();
+ uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW );
+ uno::Reference< uno::XInterface > xVBE = xServiceManager->createInstanceWithArgumentsAndContext(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBE" ) ), aArgs, mxContext );
+ return uno::Any( xVBE );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ return uno::Any();
}
uno::Any SAL_CALL
VbaApplicationBase::getVBProjects() throw (uno::RuntimeException)
{
- uno::Any aAny;
- uno::Reference< ::lang::XMultiComponentFactory > xServiceManager = mxContext->getServiceManager();
- try
- {
- uno::Reference < ::uno::XInterface > xInterface = xServiceManager->createInstanceWithContext( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAAppService" )),mxContext);
- uno::Reference < ::ooo::vba::XVBAAppService > xVBAAppService (xInterface, ::uno::UNO_QUERY_THROW );
- if (xVBAAppService.is()){
- uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- uno::Reference< document::XEmbeddedScripts > xEnbeddedScripts ( xModel, uno::UNO_QUERY_THROW );
- uno::Reference< script::XStorageBasedLibraryContainer > xMacroStorageBasedLibraryContainer = xEnbeddedScripts->getBasicLibraries();
- uno::Reference< script::XStorageBasedLibraryContainer > xDialogStorageBasedLibraryContainer = xEnbeddedScripts->getDialogLibraries();
- uno::Reference< script::XLibraryContainer > xMacroLibraryContainer ( xMacroStorageBasedLibraryContainer, uno::UNO_QUERY_THROW );
- uno::Reference< script::XLibraryContainer > xDialogLibraryContainer( xDialogStorageBasedLibraryContainer, uno::UNO_QUERY_THROW );
- return xVBAAppService->getVBProjects(this, mxContext, xModel, xMacroLibraryContainer, xDialogLibraryContainer);
- }
-
- }catch(uno::Exception* e)
- {
- }
- return aAny;
-
-
-
+ try // return empty object on error
+ {
+ uno::Sequence< uno::Any > aArgs( 2 );
+ aArgs[ 0 ] <<= uno::Reference< XHelperInterface >( this );
+ aArgs[ 1 ] <<= getCurrentDocument();
+ uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW );
+ uno::Reference< uno::XInterface > xVBProjects = xServiceManager->createInstanceWithArgumentsAndContext(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBProjects" ) ), aArgs, mxContext );
+ return uno::Any( xVBProjects );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ return uno::Any();
}
-
-
-
rtl::OUString&
VbaApplicationBase::getServiceImplName()
{
static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("VbaApplicationBase") );
return sImplName;
}
+
uno::Sequence<rtl::OUString>
VbaApplicationBase::getServiceNames()
{
diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx
index f27f2de53c8a..65f7f4bcfbeb 100644
--- a/vbahelper/source/vbahelper/vbadocumentbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx
@@ -24,9 +24,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include <vbahelper/vbadocumentbase.hxx>
-#include <vbahelper/helperdecl.hxx>
-#include <comphelper/unwrapargs.hxx>
+
+#include "vbahelper/vbadocumentbase.hxx"
+#include "vbahelper/helperdecl.hxx"
#include <com/sun/star/util/XModifiable.hpp>
#include <com/sun/star/util/XProtectable.hpp>
@@ -35,8 +35,8 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/document/XEmbeddedScripts.hpp> //Michael E. Bohn
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <ooo/vba/XVBADocService.hpp>
+#include <comphelper/unwrapargs.hxx>
#include <tools/urlobj.hxx>
#include <osl/file.hxx>
@@ -206,40 +206,25 @@ VbaDocumentBase::Activate() throw (uno::RuntimeException)
xFrame->activate();
}
-// ---- Michael E.Bohn Start-----
-
uno::Any SAL_CALL
VbaDocumentBase::getVBProject() throw (uno::RuntimeException)
-
{
- uno::Any aAny;
- uno::Reference< ::lang::XMultiComponentFactory > xServiceManager = mxContext->getServiceManager();
- try
- {
- uno::Reference < ::uno::XInterface > xInterface = xServiceManager->createInstanceWithContext( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBADocService" )),mxContext);
- uno::Reference < ::ooo::vba::XVBADocService > xVBADocService (xInterface, ::uno::UNO_QUERY_THROW );
- if (xVBADocService.is()){
- uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
- uno::Reference< document::XEmbeddedScripts > xEnbeddedScripts ( xModel, uno::UNO_QUERY_THROW );
- uno::Reference< script::XStorageBasedLibraryContainer > xMacroStorageBasedLibraryContainer = xEnbeddedScripts->getBasicLibraries();
- uno::Reference< script::XStorageBasedLibraryContainer > xDialogStorageBasedLibraryContainer = xEnbeddedScripts->getDialogLibraries();
- uno::Reference< script::XLibraryContainer > xMacroLibraryContainer ( xMacroStorageBasedLibraryContainer, uno::UNO_QUERY_THROW );
- uno::Reference< script::XLibraryContainer > xDialogLibraryContainer( xDialogStorageBasedLibraryContainer, uno::UNO_QUERY_THROW );
-
- return xVBADocService->getVBProject( this, mxContext, xModel, xMacroLibraryContainer, xDialogLibraryContainer );
- }
-
- }catch(uno::Exception* e)
- {
- }
- return aAny;
-
+ try // return empty object on error
+ {
+ uno::Sequence< uno::Any > aArgs( 2 );
+ aArgs[ 0 ] <<= uno::Reference< XHelperInterface >( this );
+ aArgs[ 1 ] <<= mxModel;
+ uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW );
+ uno::Reference< uno::XInterface > xVBProjects = xServiceManager->createInstanceWithArgumentsAndContext(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBProject" ) ), aArgs, mxContext );
+ return uno::Any( xVBProjects );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ return uno::Any();
}
-
-// ---- Michael E.Bohn End -----
-
-
rtl::OUString&
VbaDocumentBase::getServiceImplName()
{
diff --git a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx
new file mode 100755
index 000000000000..16a8671df601
--- /dev/null
+++ b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx
@@ -0,0 +1,218 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "vbahelper/vbaeventshelperbase.hxx"
+#include <filter/msfilter/msvbahelper.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::ooo::vba;
+
+// ============================================================================
+
+VbaEventsHelperBase::VbaEventsHelperBase( const uno::Sequence< uno::Any >& rArgs, const uno::Reference< uno::XComponentContext >& /*xContext*/ ) :
+ mpShell( 0 ),
+ mbDisposed( false )
+{
+ try
+ {
+ mxModel = getXSomethingFromArgs< frame::XModel >( rArgs, 0, false );
+ mpShell = getSfxObjShell( mxModel );
+
+ // add dispose listener
+ uno::Reference< lang::XComponent > xComponent( mxModel, uno::UNO_QUERY_THROW );
+ xComponent->addEventListener( this );
+ }
+ catch( uno::Exception& )
+ {
+ }
+}
+
+VbaEventsHelperBase::~VbaEventsHelperBase()
+{
+ stopListening();
+}
+
+sal_Bool SAL_CALL VbaEventsHelperBase::hasVbaEventHandler( sal_Int32 nEventId, const uno::Sequence< uno::Any >& rArgs )
+ throw (lang::IllegalArgumentException, uno::RuntimeException)
+{
+ // getEventHandlerInfo() throws, if unknown event dentifier has been passed
+ const EventHandlerInfo& rInfo = getEventHandlerInfo( nEventId );
+ // getEventHandlerPath() searches for the macro in the document
+ return getEventHandlerPath( rInfo, rArgs ).getLength() > 0;
+}
+
+void SAL_CALL VbaEventsHelperBase::processVbaEvent( sal_Int32 nEventId, const uno::Sequence< uno::Any >& rArgs )
+ throw (lang::IllegalArgumentException, script::provider::ScriptFrameworkErrorException, util::VetoException, uno::RuntimeException)
+{
+ /* Derived classes may add new event identifiers to be processed while
+ processing the original event. All unprocessed events are collected in
+ a queue. First element in the queue is the next event to be processed. */
+ EventQueue aEventQueue;
+ aEventQueue.push_back( EventQueueEntry( nEventId, rArgs ) );
+
+ /* bEnabled will track if event processing is enabled. Every event handler
+ may disable handling of other events. */
+ bool bEnabled = true;
+
+ /* bCancel will contain the current Cancel value. It is possible that
+ multiple events will try to modify the Cancel value. Every event
+ handler receives the Cancel value of the previous event handler. */
+ bool bCancel = false;
+
+ /* bSuccess will change to true if at least one event handler has been
+ executed successfully. */
+ bool bSuccess = false;
+
+ /* Loop as long as there are more events to be processed, and as event
+ handling is still enabled. Derived classes may add new events to be
+ processed in the virtual implPrepareEvent() function. */
+ while( bEnabled && !aEventQueue.empty() )
+ {
+ /* Check that all class members are available, and that we are not
+ disposed (this may have happened at any time during execution of
+ the last event handler). */
+ if( mbDisposed || !mxModel.is() || !mpShell )
+ throw uno::RuntimeException();
+
+ // get info for next event
+ const EventHandlerInfo& rInfo = getEventHandlerInfo( aEventQueue.front().mnEventId );
+ uno::Sequence< uno::Any > aEventArgs = aEventQueue.front().maArgs;
+ aEventQueue.pop_front();
+
+ // let derived classes decide whether event processing is still enabled
+ bEnabled = implEventsEnabled();
+ // let derived classes prepare the event, they may add new events for next iteration
+ if( bEnabled && implPrepareEvent( aEventQueue, rInfo, aEventArgs ) )
+ {
+ // search the event handler macro in the document
+ ::rtl::OUString aMacroPath = getEventHandlerPath( rInfo, aEventArgs );
+ bool bEventSuccess = false;
+ if( aMacroPath.getLength() > 0 )
+ {
+ // build the argument list
+ uno::Sequence< uno::Any > aVbaArgs = implBuildArgumentList( rInfo, aEventArgs );
+ // insert current cancel value
+ if( rInfo.mnCancelIndex >= 0 )
+ {
+ if( rInfo.mnCancelIndex >= aVbaArgs.getLength() )
+ throw lang::IllegalArgumentException();
+ aVbaArgs[ rInfo.mnCancelIndex ] <<= bCancel;
+ }
+ // execute the event handler
+ uno::Any aRet, aCaller;
+ bEventSuccess = executeMacro( mpShell, aMacroPath, aVbaArgs, aRet, aCaller );
+ // extract new cancel value
+ if( rInfo.mnCancelIndex >= 0 )
+ {
+ if( rInfo.mnCancelIndex >= aVbaArgs.getLength() )
+ throw lang::IllegalArgumentException();
+ // cancel value may be boolean or any integer type, Any(bool) does not extract to sal_Int32
+ bool bNewCancel = false;
+ sal_Int32 nNewCancel = 0;
+ if( aVbaArgs[ rInfo.mnCancelIndex ] >>= bNewCancel )
+ bCancel = bNewCancel;
+ else if( aVbaArgs[ rInfo.mnCancelIndex ] >>= nNewCancel )
+ bCancel = nNewCancel != 0;
+ }
+ }
+ // post processing (also, if event handler does not exist, or on error
+ implPostProcessEvent( aEventQueue, rInfo, bEventSuccess, bCancel );
+ // global success, if at least one event handler succeeded
+ bSuccess |= bEventSuccess;
+ }
+ }
+
+ // if event handlers want to cancel the event, do so regardless of any errors
+ if( bCancel )
+ throw util::VetoException();
+
+ // if no event handler finished successfully, throw
+ if( !bSuccess )
+ throw script::provider::ScriptFrameworkErrorException();
+}
+
+void SAL_CALL VbaEventsHelperBase::disposing( const lang::EventObject& /*aSource*/ ) throw (uno::RuntimeException)
+{
+ OSL_TRACE( "VbaEventsHelperBase::disposing" );
+ stopListening();
+ mbDisposed = true;
+}
+
+// protected ------------------------------------------------------------------
+
+void VbaEventsHelperBase::registerEventHandler( sal_Int32 nEventId,
+ const sal_Char* pcMacroName, EventHandlerType eType, sal_Int32 nCancelIndex, const uno::Any& rUserData )
+{
+ EventHandlerInfo& rInfo = maEvents[ nEventId ];
+ rInfo.mnEventId = nEventId;
+ rInfo.maMacroName = ::rtl::OUString::createFromAscii( pcMacroName );
+ rInfo.meType = eType;
+ rInfo.mnCancelIndex = nCancelIndex;
+ rInfo.maUserData = rUserData;
+}
+
+// private --------------------------------------------------------------------
+
+const VbaEventsHelperBase::EventHandlerInfo& VbaEventsHelperBase::getEventHandlerInfo(
+ sal_Int32 nEventId ) const throw (lang::IllegalArgumentException)
+{
+ EventHandlerMap::const_iterator aIt = maEvents.find( nEventId );
+ if( aIt == maEvents.end() )
+ throw lang::IllegalArgumentException();
+ return aIt->second;
+}
+
+::rtl::OUString VbaEventsHelperBase::getEventHandlerPath( const EventHandlerInfo& rInfo,
+ const uno::Sequence< uno::Any >& rArgs ) const throw (lang::IllegalArgumentException)
+{
+ ::rtl::OUString aMacroName;
+ switch( rInfo.meType )
+ {
+ case EVENTHANDLER_GLOBAL:
+ aMacroName = rInfo.maMacroName;
+ break;
+ case EVENTHANDLER_DOCUMENT:
+ aMacroName = ::rtl::OUStringBuffer( implGetDocumentModuleName( rInfo, rArgs ) ).
+ append( sal_Unicode( '.' ) ).append( rInfo.maMacroName ).makeStringAndClear();
+ break;
+ }
+ return resolveVBAMacro( mpShell, aMacroName ).ResolvedMacro();
+}
+
+void VbaEventsHelperBase::stopListening()
+{
+ if( !mbDisposed ) try
+ {
+ uno::Reference< lang::XComponent > xComponent( mxModel, uno::UNO_QUERY_THROW );
+ xComponent->removeEventListener( this );
+ }
+ catch( uno::Exception& )
+ {
+ }
+}
+
+// ============================================================================
diff --git a/vbahelper/source/vbahelper/vbaglobalbase.cxx b/vbahelper/source/vbahelper/vbaglobalbase.cxx
index c7c33b93b1a3..e0df37583df5 100644
--- a/vbahelper/source/vbahelper/vbaglobalbase.cxx
+++ b/vbahelper/source/vbahelper/vbaglobalbase.cxx
@@ -35,22 +35,50 @@ using namespace ooo::vba;
rtl::OUString sApplication( RTL_CONSTASCII_USTRINGPARAM("Application") );
+// special key to return the Application
+rtl::OUString sAppService( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.Application") );
+
VbaGlobalsBase::VbaGlobalsBase(
const uno::Reference< ov::XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext >& xContext, const rtl::OUString& sDocCtxName )
-: Globals_BASE( xParent, xContext )
+: Globals_BASE( xParent, xContext ), msDocCtxName( sDocCtxName )
{
// overwrite context with custom one ( that contains the application )
+ // wrap the service manager as we don't want the disposing context to tear down the 'normal' ServiceManager ( or at least thats what the code appears like it wants to do )
+ uno::Any aSrvMgr;
+ if ( xContext.is() && xContext->getServiceManager().is() )
+ {
+ aSrvMgr = uno::makeAny( xContext->getServiceManager()->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.stoc.OServiceManagerWrapper") ), xContext ) );
+ }
+
::cppu::ContextEntry_Init aHandlerContextInfo[] =
{
::cppu::ContextEntry_Init( sApplication, uno::Any() ),
::cppu::ContextEntry_Init( sDocCtxName, uno::Any() ),
+ ::cppu::ContextEntry_Init( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.lang.theServiceManager" ) ), aSrvMgr )
};
-
- mxContext = ::cppu::createComponentContext( aHandlerContextInfo, sizeof( aHandlerContextInfo ) / sizeof( aHandlerContextInfo[0] ), xContext );
-
+ // don't pass a delegate, this seems to introduce yet another cyclic dependency ( and
+ // some strange behavior
+ mxContext = ::cppu::createComponentContext( aHandlerContextInfo, sizeof( aHandlerContextInfo ) / sizeof( aHandlerContextInfo[0] ), NULL );
}
+VbaGlobalsBase::~VbaGlobalsBase()
+{
+ try
+ {
+ uno::Reference< container::XNameContainer > xNameContainer( mxContext, uno::UNO_QUERY );
+ if ( xNameContainer.is() )
+ {
+ // release document reference ( we don't wan't the component context trying to dispose that )
+ xNameContainer->removeByName( msDocCtxName );
+ // release application reference, as it is holding onto the context
+ xNameContainer->removeByName( sApplication );
+ }
+ }
+ catch ( const uno::Exception& )
+ {
+ }
+}
void
VbaGlobalsBase::init( const uno::Sequence< beans::PropertyValue >& aInitArgs )
@@ -74,19 +102,30 @@ uno::Reference< uno::XInterface > SAL_CALL
VbaGlobalsBase::createInstance( const ::rtl::OUString& aServiceSpecifier ) throw (uno::Exception, uno::RuntimeException)
{
uno::Reference< uno::XInterface > xReturn;
-
- if ( hasServiceName( aServiceSpecifier ) )
+ if ( aServiceSpecifier.equals( sAppService ) )
+ {
+ // try to extract the Application from the context
+ uno::Reference< container::XNameContainer > xNameContainer( mxContext, uno::UNO_QUERY );
+ xNameContainer->getByName( sApplication ) >>= xReturn;
+ }
+ else if ( hasServiceName( aServiceSpecifier ) )
xReturn = mxContext->getServiceManager()->createInstanceWithContext( aServiceSpecifier, mxContext );
return xReturn;
}
uno::Reference< uno::XInterface > SAL_CALL
-VbaGlobalsBase::createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier, const uno::Sequence< uno::Any >& Arguments ) throw (uno::Exception, uno::RuntimeException)
+VbaGlobalsBase::createInstanceWithArguments( const ::rtl::OUString& aServiceSpecifier, const uno::Sequence< uno::Any >& Arguments ) throw (uno::Exception, uno::RuntimeException)
{
uno::Reference< uno::XInterface > xReturn;
- if ( hasServiceName( ServiceSpecifier ) )
- xReturn = mxContext->getServiceManager()->createInstanceWithArgumentsAndContext( ServiceSpecifier, Arguments, mxContext );
+ if ( aServiceSpecifier.equals( sAppService ) )
+ {
+ // try to extract the Application from the context
+ uno::Reference< container::XNameContainer > xNameContainer( mxContext, uno::UNO_QUERY );
+ xNameContainer->getByName( sApplication ) >>= xReturn;
+ }
+ else if ( hasServiceName( aServiceSpecifier ) )
+ xReturn = mxContext->getServiceManager()->createInstanceWithArgumentsAndContext( aServiceSpecifier, Arguments, mxContext );
return xReturn;
}
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 1953d0772f3c..7cd82dff9536 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -1404,6 +1404,26 @@ void UserFormGeometryHelper::setHeight( double nHeight )
return points;
}
+ uno::Reference< uno::XInterface > getUnoDocModule( const String& aModName, SfxObjectShell* pShell )
+ {
+ uno::Reference< uno::XInterface > xIf;
+ if ( pShell )
+ {
+ rtl::OUString sProj( RTL_CONSTASCII_USTRINGPARAM("Standard") );
+ BasicManager* pBasMgr = pShell->GetBasicManager();
+ if ( pBasMgr && pBasMgr->GetName().Len() )
+ sProj = pShell->GetBasicManager()->GetName();
+ StarBASIC* pBasic = pShell->GetBasicManager()->GetLib( sProj );
+ if ( pBasic )
+ {
+ SbModule* pMod = pBasic->FindModule( aModName );
+ if ( pMod )
+ xIf = pMod->GetUnoModule();
+ }
+ }
+ return xIf;
+ }
+
SfxObjectShell* getSfxObjShell( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
{
SfxObjectShell* pFoundShell = NULL;
diff --git a/vcl/aqua/inc/salframeview.h b/vcl/aqua/inc/salframeview.h
index 0174c1a68832..996ca54cdfce 100755
--- a/vcl/aqua/inc/salframeview.h
+++ b/vcl/aqua/inc/salframeview.h
@@ -37,6 +37,7 @@
}
-(id)initWithSalFrame: (AquaSalFrame*)pFrame;
-(MacOSBOOL)canBecomeKeyWindow;
+-(void)displayIfNeeded;
-(void)windowDidBecomeKey: (NSNotification*)pNotification;
-(void)windowDidResignKey: (NSNotification*)pNotification;
-(void)windowDidChangeScreen: (NSNotification*)pNotification;
diff --git a/vcl/aqua/inc/salsys.h b/vcl/aqua/inc/salsys.h
index 6f5c45880e68..ae20706a1756 100644
--- a/vcl/aqua/inc/salsys.h
+++ b/vcl/aqua/inc/salsys.h
@@ -55,11 +55,6 @@ public:
virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen );
virtual rtl::OUString GetScreenName( unsigned int nScreen );
- // overload pure virtual methods
- virtual int ShowNativeDialog( const String& rTitle,
- const String& rMessage,
- const std::list< String >& rButtons,
- int nDefButton );
virtual int ShowNativeMessageBox( const String& rTitle,
const String& rMessage,
int nButtonCombination,
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index a90488b98b46..cce018ac6229 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -371,13 +371,13 @@ SalYieldMutex::SalYieldMutex()
void SalYieldMutex::acquire()
{
OMutex::acquire();
- mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier();
+ mnThreadId = vos::OThread::getCurrentIdentifier();
mnCount++;
}
void SalYieldMutex::release()
{
- if ( mnThreadId == NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+ if ( mnThreadId == vos::OThread::getCurrentIdentifier() )
{
if ( mnCount == 1 )
mnThreadId = 0;
@@ -390,7 +390,7 @@ sal_Bool SalYieldMutex::tryToAcquire()
{
if ( OMutex::tryToAcquire() )
{
- mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier();
+ mnThreadId = vos::OThread::getCurrentIdentifier();
mnCount++;
return sal_True;
}
@@ -537,7 +537,7 @@ ULONG AquaSalInstance::ReleaseYieldMutex()
{
SalYieldMutex* pYieldMutex = mpSalYieldMutex;
if ( pYieldMutex->GetThreadId() ==
- NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+ vos::OThread::getCurrentIdentifier() )
{
ULONG nCount = pYieldMutex->GetAcquireCount();
ULONG n = nCount;
@@ -976,6 +976,9 @@ void AquaSalInstance::DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo )
XubString AquaSalInstance::GetDefaultPrinter()
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
if( ! maDefaultPrinter.getLength() )
{
NSPrintInfo* pPI = [NSPrintInfo sharedPrintInfo];
@@ -1000,6 +1003,9 @@ XubString AquaSalInstance::GetDefaultPrinter()
SalInfoPrinter* AquaSalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
ImplJobSetup* pSetupData )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
SalInfoPrinter* pNewInfoPrinter = NULL;
if( pQueueInfo )
{
@@ -1015,6 +1021,9 @@ SalInfoPrinter* AquaSalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueI
void AquaSalInstance::DestroyInfoPrinter( SalInfoPrinter* pPrinter )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
delete pPrinter;
}
diff --git a/vcl/aqua/source/app/salsys.cxx b/vcl/aqua/source/app/salsys.cxx
index 3b548099feef..cf5cf00b7fe4 100644
--- a/vcl/aqua/source/app/salsys.cxx
+++ b/vcl/aqua/source/app/salsys.cxx
@@ -30,9 +30,11 @@
#include "tools/rc.hxx"
#include "vcl/svids.hrc"
+#include "vcl/button.hxx"
#include "salsys.h"
#include "saldata.hxx"
+#include "salinst.h"
#include "rtl/ustrbuf.hxx"
using namespace rtl;
@@ -114,12 +116,22 @@ rtl::OUString AquaSalSystem::GetScreenName( unsigned int nScreen )
return aRet;
}
-int AquaSalSystem::ShowNativeDialog( const String& rTitle,
- const String& rMessage,
- const std::list< String >& rButtons,
- int nDefButton )
+static NSString* getStandardString( int nButtonId )
{
- return 0;
+ rtl::OUString aText( Button::GetStandardText( nButtonId ) );
+ if( ! aText.getLength() ) // this is for bad cases, we might be missing the vcl resource
+ {
+ switch( nButtonId )
+ {
+ case BUTTON_OK: aText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OK" ) );break;
+ case BUTTON_ABORT: aText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Abort" ) );break;
+ case BUTTON_CANCEL: aText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cancel" ) );break;
+ case BUTTON_RETRY: aText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Retry" ) );break;
+ case BUTTON_YES: aText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Yes" ) );break;
+ case BUTTON_NO : aText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No" ) );break;
+ }
+ }
+ return aText.getLength() ? CreateNSString( aText) : nil;
}
int AquaSalSystem::ShowNativeMessageBox( const String& rTitle,
@@ -127,5 +139,82 @@ int AquaSalSystem::ShowNativeMessageBox( const String& rTitle,
int nButtonCombination,
int nDefaultButton)
{
- return 0;
+ NSString* pTitle = CreateNSString( rTitle );
+ NSString* pMessage = CreateNSString( rMessage );
+
+ struct id_entry
+ {
+ int nCombination;
+ int nDefaultButton;
+ int nTextIds[3];
+ } aButtonIds[] =
+ {
+ { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK, { BUTTON_OK, -1, -1 } },
+ { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK, { BUTTON_OK, BUTTON_CANCEL, -1 } },
+ { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL, { BUTTON_CANCEL, BUTTON_OK, -1 } },
+ { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_ABORT_RETRY_IGNORE, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_ABORT, { BUTTON_ABORT, BUTTON_IGNORE, BUTTON_RETRY } },
+ { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_ABORT_RETRY_IGNORE, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY, { BUTTON_RETRY, BUTTON_IGNORE, BUTTON_ABORT } },
+ { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_ABORT_RETRY_IGNORE, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE, { BUTTON_IGNORE, BUTTON_IGNORE, BUTTON_ABORT } },
+ { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES, { BUTTON_YES, BUTTON_NO, BUTTON_CANCEL } },
+ { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO, { BUTTON_NO, BUTTON_YES, BUTTON_CANCEL } },
+ { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL, { BUTTON_CANCEL, BUTTON_YES, BUTTON_NO } },
+ { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES, { BUTTON_YES, BUTTON_NO, -1 } },
+ { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO, { BUTTON_NO, BUTTON_YES, -1 } },
+ { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY, { BUTTON_RETRY, BUTTON_CANCEL, -1 } },
+ { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL, { BUTTON_CANCEL, BUTTON_RETRY, -1 } }
+ };
+
+ NSString* pDefText = nil;
+ NSString* pAltText = nil;
+ NSString* pOthText = nil;
+
+ unsigned int nC;
+ for( nC = 0; nC < sizeof(aButtonIds)/sizeof(aButtonIds[0]); nC++ )
+ {
+ if( aButtonIds[nC].nCombination == nButtonCombination )
+ {
+ if( aButtonIds[nC].nDefaultButton == nDefaultButton )
+ {
+ if( aButtonIds[nC].nTextIds[0] != -1 )
+ pDefText = getStandardString( aButtonIds[nC].nTextIds[0] );
+ if( aButtonIds[nC].nTextIds[1] != -1 )
+ pAltText = getStandardString( aButtonIds[nC].nTextIds[1] );
+ if( aButtonIds[nC].nTextIds[2] != -1 )
+ pOthText = getStandardString( aButtonIds[nC].nTextIds[2] );
+ break;
+ }
+ }
+ }
+
+
+ int nResult = NSRunAlertPanel( pTitle, pMessage, pDefText, pAltText, pOthText );
+
+ if( pTitle )
+ [pTitle release];
+ if( pMessage )
+ [pMessage release];
+ if( pDefText )
+ [pDefText release];
+ if( pAltText )
+ [pAltText release];
+ if( pOthText )
+ [pOthText release];
+
+ int nRet = 0;
+ if( nC < sizeof(aButtonIds)/sizeof(aButtonIds[0]) && nResult >= 1 && nResult <= 3 )
+ {
+ int nPressed = aButtonIds[nC].nTextIds[nResult-1];
+ switch( nPressed )
+ {
+ case BUTTON_NO: nRet = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO; break;
+ case BUTTON_YES: nRet = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES; break;
+ case BUTTON_OK: nRet = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK; break;
+ case BUTTON_CANCEL: nRet = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL; break;
+ case BUTTON_ABORT: nRet = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_ABORT; break;
+ case BUTTON_RETRY: nRet = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY; break;
+ case BUTTON_IGNORE: nRet = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE; break;
+ }
+ }
+
+ return nRet;
}
diff --git a/vcl/aqua/source/dtrans/DragSource.cxx b/vcl/aqua/source/dtrans/DragSource.cxx
index adb247d70711..1a8f950e50d4 100644
--- a/vcl/aqua/source/dtrans/DragSource.cxx
+++ b/vcl/aqua/source/dtrans/DragSource.cxx
@@ -38,6 +38,7 @@
#include "DragSourceContext.hxx"
#include "aqua_clipboard.hxx"
#include "DragActionConversion.hxx"
+#include "salframe.h"
#include <rtl/ustring.h>
#include <memory>
@@ -158,6 +159,7 @@ Sequence<OUString> dragSource_getSupportedServiceNames()
DragSource::DragSource():
WeakComponentImplHelper3<XDragSource, XInitialization, XServiceInfo>(m_aMutex),
mView(NULL),
+ mpFrame(NULL),
mLastMouseEventBeforeStartDrag(nil),
m_MouseButton(0)
{
@@ -166,8 +168,9 @@ DragSource::DragSource():
DragSource::~DragSource()
{
- [(id <MouseEventListener>)mView unregisterMouseEventListener: mDragSourceHelper];
- [mDragSourceHelper release];
+ if( mpFrame && AquaSalFrame::isAlive( mpFrame ) )
+ [(id <MouseEventListener>)mView unregisterMouseEventListener: mDragSourceHelper];
+ [mDragSourceHelper release];
}
@@ -197,6 +200,13 @@ void SAL_CALL DragSource::initialize(const Sequence< Any >& aArguments)
throw Exception(OUString(RTL_CONSTASCII_USTRINGPARAM("DragSource::initialize: Provided view doesn't support mouse listener")),
static_cast<OWeakObject*>(this));
}
+ NSWindow* pWin = [mView window];
+ if( ! pWin || ![pWin respondsToSelector: @selector(getSalFrame)] )
+ {
+ throw Exception(OUString(RTL_CONSTASCII_USTRINGPARAM("DragSource::initialize: Provided view is not attached to a vcl frame")),
+ static_cast<OWeakObject*>(this));
+ }
+ mpFrame = (AquaSalFrame*)[pWin performSelector: @selector(getSalFrame)];
mDragSourceHelper = [[DragSourceHelper alloc] initWithDragSource: this];
diff --git a/vcl/aqua/source/dtrans/DragSource.hxx b/vcl/aqua/source/dtrans/DragSource.hxx
index 5d02b9874149..f8f55176a308 100644
--- a/vcl/aqua/source/dtrans/DragSource.hxx
+++ b/vcl/aqua/source/dtrans/DragSource.hxx
@@ -46,6 +46,7 @@
class DragSource;
+class AquaSalFrame;
/* The functions declared in this protocol are actually
declared in vcl/aqua/inc/salframe.h. Because we want
@@ -120,6 +121,7 @@ public:
com::sun::star::uno::Reference< com::sun::star::datatransfer::dnd::XDragSourceContext > mXCurrentContext;
id mView;
+ AquaSalFrame* mpFrame;
NSEvent* mLastMouseEventBeforeStartDrag;
DragSourceHelper* mDragSourceHelper;
com::sun::star::awt::MouseEvent mMouseEvent;
diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
index d00fc9a6cd0e..d19290d8320a 100644
--- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
+++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
@@ -112,7 +112,7 @@ class ControllerProperties
maLocalizedStrings( VclResId( SV_PRINT_NATIVE_STRINGS ) )
{
mpState->bNeedRestart = false;
- DBG_ASSERT( maLocalizedStrings.Count() >= 4, "resources not found !" );
+ DBG_ASSERT( maLocalizedStrings.Count() >= 5, "resources not found !" );
}
rtl::OUString getMoreString()
@@ -122,6 +122,13 @@ class ControllerProperties
: rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "More" ) );
}
+ rtl::OUString getPrintSelectionString()
+ {
+ return maLocalizedStrings.Count() >= 5
+ ? rtl::OUString( maLocalizedStrings.GetString( 4 ) )
+ : rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Print selection only" ) );
+ }
+
void updatePrintJob()
{
// TODO: refresh page count etc from mpController
@@ -246,7 +253,11 @@ class ControllerProperties
PropertyValue* pVal = mpController->getValue( name_it->second );
if( pVal )
{
- pVal->Value <<= i_bValue;
+ // ugly
+ if( name_it->second.equalsAscii( "PrintContent" ) )
+ pVal->Value <<= i_bValue ? sal_Int32(2) : sal_Int32(0);
+ else
+ pVal->Value <<= i_bValue;
updatePrintJob();
}
}
@@ -283,7 +294,7 @@ class ControllerProperties
-1;
std::map< int, rtl::OUString >::const_iterator name_it = maTagToPropertyName.find( nTag );
- if( name_it != maTagToPropertyName.end() )
+ if( name_it != maTagToPropertyName.end() && ! name_it->second.equalsAscii( "PrintContent" ) )
{
MacOSBOOL bEnabled = mpController->isUIOptionEnabled( name_it->second ) ? YES : NO;
if( pCtrl )
@@ -768,6 +779,319 @@ static void linebreakCell( NSCell* pBtn, const rtl::OUString& i_rText )
}
}
+static void addSubgroup( NSView* pCurParent, long& rCurY, const rtl::OUString& rText )
+{
+ NSControl* pTextView = createLabel( rText );
+ [pCurParent addSubview: [pTextView autorelease]];
+ NSRect aTextRect = [pTextView frame];
+ // move to nCurY
+ aTextRect.origin.y = rCurY - aTextRect.size.height;
+ [pTextView setFrame: aTextRect];
+
+ NSRect aSepRect = { { aTextRect.size.width + 1, aTextRect.origin.y }, { 100, 6 } };
+ NSBox* pBox = [[NSBox alloc] initWithFrame: aSepRect];
+ [pBox setBoxType: NSBoxSeparator];
+ [pCurParent addSubview: [pBox autorelease]];
+
+ // update nCurY
+ rCurY = aTextRect.origin.y - 5;
+}
+
+static void addBool( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachOffset,
+ const rtl::OUString& rText, sal_Bool bEnabled,
+ const rtl::OUString& rProperty, sal_Bool bValue,
+ std::vector<ColumnItem >& rRightColumn,
+ ControllerProperties* pControllerProperties,
+ ControlTarget* pCtrlTarget
+ )
+{
+ NSRect aCheckRect = { { rCurX + nAttachOffset, 0 }, { 0, 15 } };
+ NSButton* pBtn = [[NSButton alloc] initWithFrame: aCheckRect];
+ [pBtn setButtonType: NSSwitchButton];
+ [pBtn setState: bValue ? NSOnState : NSOffState];
+ if( ! bEnabled )
+ [pBtn setEnabled: NO];
+ linebreakCell( [pBtn cell], rText );
+ [pBtn sizeToFit];
+ [pCurParent addSubview: [pBtn autorelease]];
+
+ rRightColumn.push_back( ColumnItem( pBtn ) );
+
+ // connect target
+ [pBtn setTarget: pCtrlTarget];
+ [pBtn setAction: @selector(triggered:)];
+ int nTag = pControllerProperties->addNameTag( rProperty );
+ pControllerProperties->addObservedControl( pBtn );
+ [pBtn setTag: nTag];
+
+ aCheckRect = [pBtn frame];
+
+ // move to rCurY
+ aCheckRect.origin.y = rCurY - aCheckRect.size.height;
+ [pBtn setFrame: aCheckRect];
+
+ // update rCurY
+ rCurY = aCheckRect.origin.y - 5;
+}
+
+static void addRadio( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachOffset,
+ const rtl::OUString& rText,
+ const rtl::OUString& rProperty, Sequence< rtl::OUString > rChoices, sal_Int32 nSelectValue,
+ std::vector<ColumnItem >& rLeftColumn,
+ std::vector<ColumnItem >& rRightColumn,
+ ControllerProperties* pControllerProperties,
+ ControlTarget* pCtrlTarget
+ )
+{
+ sal_Int32 nOff = 0;
+ if( rText.getLength() )
+ {
+ // add a label
+ NSControl* pTextView = createLabel( rText );
+ NSRect aTextRect = [pTextView frame];
+ aTextRect.origin.x = rCurX + nAttachOffset;
+ [pCurParent addSubview: [pTextView autorelease]];
+
+ rLeftColumn.push_back( ColumnItem( pTextView ) );
+
+ // move to nCurY
+ aTextRect.origin.y = rCurY - aTextRect.size.height;
+ [pTextView setFrame: aTextRect];
+
+ // update nCurY
+ rCurY = aTextRect.origin.y - 5;
+
+ // indent the radio group relative to the text
+ // nOff = 20;
+ }
+
+ // setup radio matrix
+ NSButtonCell* pProto = [[NSButtonCell alloc] init];
+
+ NSRect aRadioRect = { { rCurX + nOff, 0 }, { 280 - rCurX, 5*rChoices.getLength() } };
+ [pProto setTitle: @"RadioButtonGroup"];
+ [pProto setButtonType: NSRadioButton];
+ NSMatrix* pMatrix = [[NSMatrix alloc] initWithFrame: aRadioRect
+ mode: NSRadioModeMatrix
+ prototype: (NSCell*)pProto
+ numberOfRows: rChoices.getLength()
+ numberOfColumns: 1];
+ // set individual titles
+ NSArray* pCells = [pMatrix cells];
+ for( sal_Int32 m = 0; m < rChoices.getLength(); m++ )
+ {
+ NSCell* pCell = [pCells objectAtIndex: m];
+ filterAccelerator( rChoices[m] );
+ linebreakCell( pCell, rChoices[m] );
+ // connect target and action
+ [pCell setTarget: pCtrlTarget];
+ [pCell setAction: @selector(triggered:)];
+ int nTag = pControllerProperties->addNameAndValueTag( rProperty, m );
+ pControllerProperties->addObservedControl( pCell );
+ [pCell setTag: nTag];
+ // set current selection
+ if( nSelectValue == m )
+ [pMatrix selectCellAtRow: m column: 0];
+ }
+ [pMatrix sizeToFit];
+ aRadioRect = [pMatrix frame];
+
+ // move it down, so it comes to the correct position
+ aRadioRect.origin.y = rCurY - aRadioRect.size.height;
+ [pMatrix setFrame: aRadioRect];
+ [pCurParent addSubview: [pMatrix autorelease]];
+
+ rRightColumn.push_back( ColumnItem( pMatrix ) );
+
+ // update nCurY
+ rCurY = aRadioRect.origin.y - 5;
+
+ [pProto release];
+}
+
+static void addList( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachOffset,
+ const rtl::OUString& rText,
+ const rtl::OUString& rProperty, const Sequence< rtl::OUString > rChoices, sal_Int32 nSelectValue,
+ std::vector<ColumnItem >& rLeftColumn,
+ std::vector<ColumnItem >& rRightColumn,
+ ControllerProperties* pControllerProperties,
+ ControlTarget* pCtrlTarget
+ )
+{
+ // don't indent attached lists, looks bad in the existing cases
+ NSControl* pTextView = createLabel( rText );
+ [pCurParent addSubview: [pTextView autorelease]];
+ rLeftColumn.push_back( ColumnItem( pTextView ) );
+ NSRect aTextRect = [pTextView frame];
+ aTextRect.origin.x = rCurX /* + nAttachOffset*/;
+
+ // don't indent attached lists, looks bad in the existing cases
+ NSRect aBtnRect = { { rCurX /*+ nAttachOffset*/ + aTextRect.size.width, 0 }, { 0, 15 } };
+ NSPopUpButton* pBtn = [[NSPopUpButton alloc] initWithFrame: aBtnRect pullsDown: NO];
+
+ // iterate options
+ for( sal_Int32 m = 0; m < rChoices.getLength(); m++ )
+ {
+ NSString* pItemText = CreateNSString( rChoices[m] );
+ [pBtn addItemWithTitle: pItemText];
+ NSMenuItem* pItem = [pBtn itemWithTitle: pItemText];
+ int nTag = pControllerProperties->addNameAndValueTag( rProperty, m );
+ [pItem setTag: nTag];
+ [pItemText release];
+ }
+
+ [pBtn selectItemAtIndex: nSelectValue];
+
+ // add the button to observed controls for enabled state changes
+ // also add a tag just for this purpose
+ pControllerProperties->addObservedControl( pBtn );
+ [pBtn setTag: pControllerProperties->addNameTag( rProperty )];
+
+ [pBtn sizeToFit];
+ [pCurParent addSubview: [pBtn autorelease]];
+
+ rRightColumn.push_back( ColumnItem( pBtn ) );
+
+ // connect target and action
+ [pBtn setTarget: pCtrlTarget];
+ [pBtn setAction: @selector(triggered:)];
+
+ // move to nCurY
+ aBtnRect = [pBtn frame];
+ aBtnRect.origin.y = rCurY - aBtnRect.size.height;
+ [pBtn setFrame: aBtnRect];
+
+ // align label
+ aTextRect.origin.y = aBtnRect.origin.y + (aBtnRect.size.height - aTextRect.size.height)/2;
+ [pTextView setFrame: aTextRect];
+
+ // update rCurY
+ rCurY = aBtnRect.origin.y - 5;
+}
+
+static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachOffset,
+ const rtl::OUString rCtrlType,
+ const rtl::OUString& rText,
+ const rtl::OUString& rProperty, const PropertyValue* pValue,
+ sal_Int64 nMinValue, sal_Int64 nMaxValue,
+ std::vector<ColumnItem >& rLeftColumn,
+ std::vector<ColumnItem >& rRightColumn,
+ ControllerProperties* pControllerProperties,
+ ControlTarget* pCtrlTarget
+ )
+{
+ sal_Int32 nOff = 0;
+ if( rText.getLength() )
+ {
+ // add a label
+ NSControl* pTextView = createLabel( rText );
+ [pCurParent addSubview: [pTextView autorelease]];
+
+ rLeftColumn.push_back( ColumnItem( pTextView ) );
+
+ // move to nCurY
+ NSRect aTextRect = [pTextView frame];
+ aTextRect.origin.x = rCurX + nAttachOffset;
+ aTextRect.origin.y = rCurY - aTextRect.size.height;
+ [pTextView setFrame: aTextRect];
+
+ // update nCurY
+ rCurY = aTextRect.origin.y - 5;
+
+ // and set the offset for the real edit field
+ nOff = aTextRect.size.width + 5;
+ }
+
+ NSRect aFieldRect = { { rCurX + nOff + nAttachOffset, 0 }, { 100, 25 } };
+ NSTextField* pFieldView = [[NSTextField alloc] initWithFrame: aFieldRect];
+ [pFieldView setEditable: YES];
+ [pFieldView setSelectable: YES];
+ [pFieldView setDrawsBackground: YES];
+ [pFieldView sizeToFit]; // FIXME: this does nothing
+ [pCurParent addSubview: [pFieldView autorelease]];
+
+ rRightColumn.push_back( ColumnItem( pFieldView ) );
+
+ // add the field to observed controls for enabled state changes
+ // also add a tag just for this purpose
+ pControllerProperties->addObservedControl( pFieldView );
+ int nTag = pControllerProperties->addNameTag( rProperty );
+ [pFieldView setTag: nTag];
+ // pControllerProperties->addNamedView( pFieldView, aPropertyName );
+
+ // move to nCurY
+ aFieldRect.origin.y = rCurY - aFieldRect.size.height;
+ [pFieldView setFrame: aFieldRect];
+
+ if( rCtrlType.equalsAscii( "Range" ) )
+ {
+ // add a stepper control
+ NSRect aStepFrame = { { aFieldRect.origin.x + aFieldRect.size.width + 5,
+ aFieldRect.origin.y },
+ { 15, aFieldRect.size.height } };
+ NSStepper* pStep = [[NSStepper alloc] initWithFrame: aStepFrame];
+ [pStep setIncrement: 1];
+ [pStep setValueWraps: NO];
+ [pStep setTag: nTag];
+ [pCurParent addSubview: [pStep autorelease]];
+
+ rRightColumn.back().pSubControl = pStep;
+
+ pControllerProperties->addObservedControl( pStep );
+ [pStep setTarget: pCtrlTarget];
+ [pStep setAction: @selector(triggered:)];
+
+ // constrain the text field to decimal numbers
+ NSNumberFormatter* pFormatter = [[NSNumberFormatter alloc] init];
+ [pFormatter setFormatterBehavior: NSNumberFormatterBehavior10_4];
+ [pFormatter setNumberStyle: NSNumberFormatterDecimalStyle];
+ [pFormatter setAllowsFloats: NO];
+ [pFormatter setMaximumFractionDigits: 0];
+ if( nMinValue != nMaxValue )
+ {
+ [pFormatter setMinimum: [[NSNumber numberWithInt: nMinValue] autorelease]];
+ [pStep setMinValue: nMinValue];
+ [pFormatter setMaximum: [[NSNumber numberWithInt: nMaxValue] autorelease]];
+ [pStep setMaxValue: nMaxValue];
+ }
+ [pFieldView setFormatter: pFormatter];
+
+ sal_Int64 nSelectVal = 0;
+ if( pValue && pValue->Value.hasValue() )
+ pValue->Value >>= nSelectVal;
+
+ [pFieldView setIntValue: nSelectVal];
+ [pStep setIntValue: nSelectVal];
+
+ pControllerProperties->addViewPair( pFieldView, pStep );
+ // connect target and action
+ [pFieldView setTarget: pCtrlTarget];
+ [pFieldView setAction: @selector(triggeredNumeric:)];
+ [pStep setTarget: pCtrlTarget];
+ [pStep setAction: @selector(triggeredNumeric:)];
+ }
+ else
+ {
+ // connect target and action
+ [pFieldView setTarget: pCtrlTarget];
+ [pFieldView setAction: @selector(triggered:)];
+
+ if( pValue && pValue->Value.hasValue() )
+ {
+ rtl::OUString aValue;
+ pValue->Value >>= aValue;
+ if( aValue.getLength() )
+ {
+ NSString* pText = CreateNSString( aValue );
+ [pFieldView setStringValue: pText];
+ [pText release];
+ }
+ }
+ }
+
+ // update nCurY
+ rCurY = aFieldRect.origin.y - 5;
+}
@implementation AquaPrintAccessoryView
+(NSObject*)setupPrinterPanel: (NSPrintOperation*)pOp withController: (vcl::PrinterController*)pController withState: (PrintAccessoryViewState*)pState;
@@ -792,6 +1116,54 @@ static void linebreakCell( NSCell* pBtn, const rtl::OUString& i_rText )
ControlTarget* pCtrlTarget = [[ControlTarget alloc] initWithControllerMap: pControllerProperties];
std::vector< ColumnItem > aLeftColumn, aRightColumn;
+
+ // ugly:
+ // prepend a "selection" checkbox if the properties have such a selection in PrintContent
+ bool bAddSelectionCheckBox = false, bSelectionBoxEnabled = false, bSelectionBoxChecked = false;
+ for( int i = 0; i < rOptions.getLength(); i++ )
+ {
+ Sequence< beans::PropertyValue > aOptProp;
+ rOptions[i].Value >>= aOptProp;
+
+ rtl::OUString aCtrlType;
+ rtl::OUString aPropertyName;
+ Sequence< rtl::OUString > aChoices;
+ Sequence< sal_Bool > aChoicesDisabled;
+ sal_Int32 aSelectionChecked = 0;
+ for( int n = 0; n < aOptProp.getLength(); n++ )
+ {
+ const beans::PropertyValue& rEntry( aOptProp[ n ] );
+ if( rEntry.Name.equalsAscii( "ControlType" ) )
+ {
+ rEntry.Value >>= aCtrlType;
+ }
+ else if( rEntry.Name.equalsAscii( "Choices" ) )
+ {
+ rEntry.Value >>= aChoices;
+ }
+ else if( rEntry.Name.equalsAscii( "ChoicesDisabled" ) )
+ {
+ rEntry.Value >>= aChoicesDisabled;
+ }
+ else if( rEntry.Name.equalsAscii( "Property" ) )
+ {
+ PropertyValue aVal;
+ rEntry.Value >>= aVal;
+ aPropertyName = aVal.Name;
+ if( aPropertyName.equalsAscii( "PrintContent" ) )
+ aVal.Value >>= aSelectionChecked;
+ }
+ }
+ if( aCtrlType.equalsAscii( "Radio" ) &&
+ aPropertyName.equalsAscii( "PrintContent" ) &&
+ aChoices.getLength() > 2 )
+ {
+ bAddSelectionCheckBox = true;
+ bSelectionBoxEnabled = aChoicesDisabled.getLength() < 2 || ! aChoicesDisabled[2];
+ bSelectionBoxChecked = (aSelectionChecked==2);
+ break;
+ }
+ }
for( int i = 0; i < rOptions.getLength(); i++ )
{
@@ -803,6 +1175,7 @@ static void linebreakCell( NSCell* pBtn, const rtl::OUString& i_rText )
rtl::OUString aCtrlType;
rtl::OUString aText;
rtl::OUString aPropertyName;
+ rtl::OUString aGroupHint;
Sequence< rtl::OUString > aChoices;
sal_Int64 nMinValue = 0, nMaxValue = 0;
long nAttachOffset = 0;
@@ -852,6 +1225,10 @@ static void linebreakCell( NSCell* pBtn, const rtl::OUString& i_rText )
{
rEntry.Value >>= bIgnore;
}
+ else if( rEntry.Name.equalsAscii( "GroupingHint" ) )
+ {
+ rEntry.Value >>= aGroupHint;
+ }
}
if( aCtrlType.equalsAscii( "Group" ) ||
@@ -894,6 +1271,15 @@ static void linebreakCell( NSCell* pBtn, const rtl::OUString& i_rText )
// clear columns
aLeftColumn.clear();
aRightColumn.clear();
+
+ if( bAddSelectionCheckBox )
+ {
+ addBool( pCurParent, nCurX, nCurY, 0,
+ pControllerProperties->getPrintSelectionString(), bSelectionBoxEnabled,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ), bSelectionBoxChecked,
+ aRightColumn, pControllerProperties, pCtrlTarget );
+ bAddSelectionCheckBox = false;
+ }
}
if( aCtrlType.equalsAscii( "Subgroup" ) && pCurParent )
@@ -902,302 +1288,56 @@ static void linebreakCell( NSCell* pBtn, const rtl::OUString& i_rText )
if( bIgnore )
continue;
- NSControl* pTextView = createLabel( aText );
- [pCurParent addSubview: [pTextView autorelease]];
- NSRect aTextRect = [pTextView frame];
- // move to nCurY
- aTextRect.origin.y = nCurY - aTextRect.size.height;
- [pTextView setFrame: aTextRect];
-
- NSRect aSepRect = { { aTextRect.size.width + 1, aTextRect.origin.y }, { 100, 6 } };
- NSBox* pBox = [[NSBox alloc] initWithFrame: aSepRect];
- [pBox setBoxType: NSBoxSeparator];
- [pCurParent addSubview: [pBox autorelease]];
-
- // update nCurY
- nCurY = aTextRect.origin.y - 5;
+ addSubgroup( pCurParent, nCurY, aText );
}
else if( bIgnoreSubgroup || bIgnore )
+ {
continue;
+ }
else if( aCtrlType.equalsAscii( "Bool" ) && pCurParent )
{
- NSRect aCheckRect = { { nCurX + nAttachOffset, 0 }, { 0, 15 } };
- NSButton* pBtn = [[NSButton alloc] initWithFrame: aCheckRect];
- [pBtn setButtonType: NSSwitchButton];
sal_Bool bVal = sal_False;
PropertyValue* pVal = pController->getValue( aPropertyName );
if( pVal )
pVal->Value >>= bVal;
- [pBtn setState: bVal ? NSOnState : NSOffState];
- linebreakCell( [pBtn cell], aText );
- [pBtn sizeToFit];
- [pCurParent addSubview: [pBtn autorelease]];
-
- aRightColumn.push_back( ColumnItem( pBtn ) );
-
- // connect target
- [pBtn setTarget: pCtrlTarget];
- [pBtn setAction: @selector(triggered:)];
- int nTag = pControllerProperties->addNameTag( aPropertyName );
- pControllerProperties->addObservedControl( pBtn );
- [pBtn setTag: nTag];
-
- aCheckRect = [pBtn frame];
-
- // move to nCurY
- aCheckRect.origin.y = nCurY - aCheckRect.size.height;
- [pBtn setFrame: aCheckRect];
-
- // update nCurY
- nCurY = aCheckRect.origin.y - 5;
+ addBool( pCurParent, nCurX, nCurY, nAttachOffset,
+ aText, true, aPropertyName, bVal,
+ aRightColumn, pControllerProperties, pCtrlTarget );
}
else if( aCtrlType.equalsAscii( "Radio" ) && pCurParent )
{
- sal_Int32 nOff = 0;
- if( aText.getLength() )
- {
- // add a label
- NSControl* pTextView = createLabel( aText );
- NSRect aTextRect = [pTextView frame];
- aTextRect.origin.x = nCurX + nAttachOffset;
- [pCurParent addSubview: [pTextView autorelease]];
-
- aLeftColumn.push_back( ColumnItem( pTextView ) );
-
- // move to nCurY
- aTextRect.origin.y = nCurY - aTextRect.size.height;
- [pTextView setFrame: aTextRect];
-
- // update nCurY
- nCurY = aTextRect.origin.y - 5;
-
- // indent the radio group relative to the text
- // nOff = 20;
- }
-
- // setup radio matrix
- NSButtonCell* pProto = [[NSButtonCell alloc] init];
-
- NSRect aRadioRect = { { nCurX + nOff, 0 }, { 280 - nCurX, 5*aChoices.getLength() } };
- [pProto setTitle: @"RadioButtonGroup"];
- [pProto setButtonType: NSRadioButton];
- NSMatrix* pMatrix = [[NSMatrix alloc] initWithFrame: aRadioRect
- mode: NSRadioModeMatrix
- prototype: (NSCell*)pProto
- numberOfRows: aChoices.getLength()
- numberOfColumns: 1];
// get currently selected value
sal_Int32 nSelectVal = 0;
PropertyValue* pVal = pController->getValue( aPropertyName );
if( pVal && pVal->Value.hasValue() )
pVal->Value >>= nSelectVal;
- // set individual titles
- NSArray* pCells = [pMatrix cells];
- for( sal_Int32 m = 0; m < aChoices.getLength(); m++ )
- {
- NSCell* pCell = [pCells objectAtIndex: m];
- filterAccelerator( aChoices[m] );
- linebreakCell( pCell, aChoices[m] );
- //NSString* pTitle = CreateNSString( aChoices[m] );
- //[pCell setTitle: pTitle];
- // connect target and action
- [pCell setTarget: pCtrlTarget];
- [pCell setAction: @selector(triggered:)];
- int nTag = pControllerProperties->addNameAndValueTag( aPropertyName, m );
- pControllerProperties->addObservedControl( pCell );
- [pCell setTag: nTag];
- //[pTitle release];
- // set current selection
- if( nSelectVal == m )
- [pMatrix selectCellAtRow: m column: 0];
- }
- [pMatrix sizeToFit];
- aRadioRect = [pMatrix frame];
- // move it down, so it comes to the correct position
- aRadioRect.origin.y = nCurY - aRadioRect.size.height;
- [pMatrix setFrame: aRadioRect];
- [pCurParent addSubview: [pMatrix autorelease]];
-
- aRightColumn.push_back( ColumnItem( pMatrix ) );
-
- // update nCurY
- nCurY = aRadioRect.origin.y - 5;
-
- [pProto release];
+ addRadio( pCurParent, nCurX, nCurY, nAttachOffset,
+ aText, aPropertyName, aChoices, nSelectVal,
+ aLeftColumn, aRightColumn,
+ pControllerProperties, pCtrlTarget );
}
else if( aCtrlType.equalsAscii( "List" ) && pCurParent )
{
- // don't indent attached lists, looks bad in the existing cases
- NSControl* pTextView = createLabel( aText );
- [pCurParent addSubview: [pTextView autorelease]];
- aLeftColumn.push_back( ColumnItem( pTextView ) );
- NSRect aTextRect = [pTextView frame];
- aTextRect.origin.x = nCurX /* + nAttachOffset*/;
-
- // don't indent attached lists, looks bad in the existing cases
- NSRect aBtnRect = { { nCurX /*+ nAttachOffset*/ + aTextRect.size.width, 0 }, { 0, 15 } };
- NSPopUpButton* pBtn = [[NSPopUpButton alloc] initWithFrame: aBtnRect pullsDown: NO];
-
- // iterate options
- for( sal_Int32 m = 0; m < aChoices.getLength(); m++ )
- {
- NSString* pItemText = CreateNSString( aChoices[m] );
- [pBtn addItemWithTitle: pItemText];
- NSMenuItem* pItem = [pBtn itemWithTitle: pItemText];
- int nTag = pControllerProperties->addNameAndValueTag( aPropertyName, m );
- [pItem setTag: nTag];
- [pItemText release];
- }
-
PropertyValue* pVal = pController->getValue( aPropertyName );
sal_Int32 aSelectVal = 0;
if( pVal && pVal->Value.hasValue() )
pVal->Value >>= aSelectVal;
- [pBtn selectItemAtIndex: aSelectVal];
-
- // add the button to observed controls for enabled state changes
- // also add a tag just for this purpose
- pControllerProperties->addObservedControl( pBtn );
- [pBtn setTag: pControllerProperties->addNameTag( aPropertyName )];
-
- [pBtn sizeToFit];
- [pCurParent addSubview: [pBtn autorelease]];
-
- aRightColumn.push_back( ColumnItem( pBtn ) );
-
- // connect target and action
- [pBtn setTarget: pCtrlTarget];
- [pBtn setAction: @selector(triggered:)];
-
- // move to nCurY
- aBtnRect = [pBtn frame];
- aBtnRect.origin.y = nCurY - aBtnRect.size.height;
- [pBtn setFrame: aBtnRect];
-
- // align label
- aTextRect.origin.y = aBtnRect.origin.y + (aBtnRect.size.height - aTextRect.size.height)/2;
- [pTextView setFrame: aTextRect];
- // update nCurY
- nCurY = aBtnRect.origin.y - 5;
+ addList( pCurParent, nCurX, nCurY, nAttachOffset,
+ aText, aPropertyName, aChoices, aSelectVal,
+ aLeftColumn, aRightColumn,
+ pControllerProperties, pCtrlTarget );
}
else if( (aCtrlType.equalsAscii( "Edit" ) || aCtrlType.equalsAscii( "Range" )) && pCurParent )
{
- sal_Int32 nOff = 0;
- if( aText.getLength() )
- {
- // add a label
- NSControl* pTextView = createLabel( aText );
- [pCurParent addSubview: [pTextView autorelease]];
-
- aLeftColumn.push_back( ColumnItem( pTextView ) );
-
- // move to nCurY
- NSRect aTextRect = [pTextView frame];
- aTextRect.origin.x = nCurX + nAttachOffset;
- aTextRect.origin.y = nCurY - aTextRect.size.height;
- [pTextView setFrame: aTextRect];
-
- // update nCurY
- nCurY = aTextRect.origin.y - 5;
-
- // and set the offset for the real edit field
- nOff = aTextRect.size.width + 5;
- }
-
- NSRect aFieldRect = { { nCurX + nOff + nAttachOffset, 0 }, { 100, 25 } };
- NSTextField* pFieldView = [[NSTextField alloc] initWithFrame: aFieldRect];
- [pFieldView setEditable: YES];
- [pFieldView setSelectable: YES];
- [pFieldView setDrawsBackground: YES];
- [pFieldView sizeToFit]; // FIXME: this does nothing
- [pCurParent addSubview: [pFieldView autorelease]];
-
- aRightColumn.push_back( ColumnItem( pFieldView ) );
-
- // add the field to observed controls for enabled state changes
- // also add a tag just for this purpose
- pControllerProperties->addObservedControl( pFieldView );
- int nTag = pControllerProperties->addNameTag( aPropertyName );
- [pFieldView setTag: nTag];
- // pControllerProperties->addNamedView( pFieldView, aPropertyName );
-
- // move to nCurY
- aFieldRect.origin.y = nCurY - aFieldRect.size.height;
- [pFieldView setFrame: aFieldRect];
-
// current value
PropertyValue* pVal = pController->getValue( aPropertyName );
- if( aCtrlType.equalsAscii( "Range" ) )
- {
- // add a stepper control
- NSRect aStepFrame = { { aFieldRect.origin.x + aFieldRect.size.width + 5,
- aFieldRect.origin.y },
- { 15, aFieldRect.size.height } };
- NSStepper* pStep = [[NSStepper alloc] initWithFrame: aStepFrame];
- [pStep setIncrement: 1];
- [pStep setValueWraps: NO];
- [pStep setTag: nTag];
- [pCurParent addSubview: [pStep autorelease]];
-
- aRightColumn.back().pSubControl = pStep;
-
- pControllerProperties->addObservedControl( pStep );
- [pStep setTarget: pCtrlTarget];
- [pStep setAction: @selector(triggered:)];
-
- // constrain the text field to decimal numbers
- NSNumberFormatter* pFormatter = [[NSNumberFormatter alloc] init];
- [pFormatter setFormatterBehavior: NSNumberFormatterBehavior10_4];
- [pFormatter setNumberStyle: NSNumberFormatterDecimalStyle];
- [pFormatter setAllowsFloats: NO];
- [pFormatter setMaximumFractionDigits: 0];
- if( nMinValue != nMaxValue )
- {
- [pFormatter setMinimum: [[NSNumber numberWithInt: nMinValue] autorelease]];
- [pStep setMinValue: nMinValue];
- [pFormatter setMaximum: [[NSNumber numberWithInt: nMaxValue] autorelease]];
- [pStep setMaxValue: nMaxValue];
- }
- [pFieldView setFormatter: pFormatter];
-
- sal_Int64 nSelectVal = 0;
- if( pVal && pVal->Value.hasValue() )
- pVal->Value >>= nSelectVal;
-
- [pFieldView setIntValue: nSelectVal];
- [pStep setIntValue: nSelectVal];
-
- pControllerProperties->addViewPair( pFieldView, pStep );
- // connect target and action
- [pFieldView setTarget: pCtrlTarget];
- [pFieldView setAction: @selector(triggeredNumeric:)];
- [pStep setTarget: pCtrlTarget];
- [pStep setAction: @selector(triggeredNumeric:)];
- }
- else
- {
- // connect target and action
- [pFieldView setTarget: pCtrlTarget];
- [pFieldView setAction: @selector(triggered:)];
-
- if( pVal && pVal->Value.hasValue() )
- {
- rtl::OUString aValue;
- pVal->Value >>= aValue;
- if( aValue.getLength() )
- {
- NSString* pText = CreateNSString( aValue );
- [pFieldView setStringValue: pText];
- [pText release];
- }
- }
- }
-
- // update nCurY
- nCurY = aFieldRect.origin.y - 5;
-
+ addEdit( pCurParent, nCurX, nCurY, nAttachOffset,
+ aCtrlType, aText, aPropertyName, pVal,
+ nMinValue, nMaxValue,
+ aLeftColumn, aRightColumn,
+ pControllerProperties, pCtrlTarget );
}
}
else
@@ -1205,7 +1345,7 @@ static void linebreakCell( NSCell* pBtn, const rtl::OUString& i_rText )
DBG_ERROR( "Unsupported UI option" );
}
}
-
+
pControllerProperties->updateEnableState();
adjustViewAndChildren( pCurParent, aMaxTabSize, aLeftColumn, aRightColumn );
diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index 1c0401f769b5..ff4edcbf83f9 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -445,7 +445,7 @@ ULONG AquaSalInfoPrinter::GetCapabilities( const ImplJobSetup* i_pSetupData, USH
case PRINTER_CAPABILITIES_COPIES:
return 0xffff;
case PRINTER_CAPABILITIES_COLLATECOPIES:
- return 0;
+ return 0xffff;
case PRINTER_CAPABILITIES_SETORIENTATION:
return 1;
case PRINTER_CAPABILITIES_SETDUPLEX:
@@ -634,6 +634,8 @@ BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName,
}
[pPrintDict setObject: [[NSNumber numberWithInt: nCopies] autorelease] forKey: NSPrintCopies];
+ if( nCopies > 1 )
+ [pPrintDict setObject: [[NSNumber numberWithBool: pPrinter->IsCollateCopy()] autorelease] forKey: NSPrintMustCollate];
[pPrintDict setObject: [[NSNumber numberWithBool: YES] autorelease] forKey: NSPrintDetailedErrorReporting];
[pPrintDict setObject: [[NSNumber numberWithInt: 1] autorelease] forKey: NSPrintFirstPage];
// #i103253# weird: for some reason, autoreleasing the value below like the others above
diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index b14354e1b4bd..ce4370c57b9f 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -207,8 +207,6 @@ void AquaSalFrame::initWindowAndView()
UpdateFrameGeometry();
- // setContentView causes a display; in multithreaded use this can deadlock
- //YieldMutexReleaser aRel;
[mpWindow setContentView: mpView];
}
@@ -293,6 +291,9 @@ BOOL AquaSalFrame::PostEvent( void *pData )
// -----------------------------------------------------------------------
void AquaSalFrame::SetTitle(const XubString& rTitle)
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
NSString* pTitle = CreateNSString( rTitle );
[mpWindow setTitle: pTitle];
@@ -331,6 +332,9 @@ void AquaSalFrame::SetIcon( USHORT )
void AquaSalFrame::SetRepresentedURL( const rtl::OUString& i_rDocURL )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
if( i_rDocURL.indexOfAsciiL( "file:", 5 ) == 0 )
{
rtl::OUString aSysPath;
@@ -356,12 +360,12 @@ void AquaSalFrame::initShow()
if( mpParent ) // center relative to parent
{
// center on parent
- long nNewX = mpParent->maGeometry.nX + (mpParent->maGeometry.nWidth - maGeometry.nWidth)/2;
+ long nNewX = mpParent->maGeometry.nX + ((long)mpParent->maGeometry.nWidth - (long)maGeometry.nWidth)/2;
if( nNewX < aScreenRect.Left() )
nNewX = aScreenRect.Left();
if( long(nNewX + maGeometry.nWidth) > aScreenRect.Right() )
nNewX = aScreenRect.Right() - maGeometry.nWidth-1;
- long nNewY = mpParent->maGeometry.nY + (mpParent->maGeometry.nHeight - maGeometry.nHeight)/2;
+ long nNewY = mpParent->maGeometry.nY + ((long)mpParent->maGeometry.nHeight - (long)maGeometry.nHeight)/2;
if( nNewY < aScreenRect.Top() )
nNewY = aScreenRect.Top();
if( nNewY > aScreenRect.Bottom() )
@@ -401,6 +405,9 @@ void AquaSalFrame::SendPaintEvent( const Rectangle* pRect )
void AquaSalFrame::Show(BOOL bVisible, BOOL bNoActivate)
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
mbShown = bVisible;
if(bVisible)
{
@@ -411,8 +418,6 @@ void AquaSalFrame::Show(BOOL bVisible, BOOL bNoActivate)
// trigger filling our backbuffer
SendPaintEvent();
- //YieldMutexReleaser aRel;
-
if( bNoActivate || [mpWindow canBecomeKeyWindow] == NO )
[mpWindow orderFront: NSApp];
else
@@ -443,8 +448,6 @@ void AquaSalFrame::Show(BOOL bVisible, BOOL bNoActivate)
if( mpMenu && mpMenu->mbMenuBar && AquaSalMenu::pCurrentMenuBar == mpMenu )
AquaSalMenu::setDefaultMenu();
- //YieldMutexReleaser aRel;
-
// #i90440# #i94443# work around the focus going back to some other window
// if a child gets hidden for a parent window
if( mpParent && mpParent->mbShown && [mpWindow isKeyWindow] )
@@ -468,6 +471,9 @@ void AquaSalFrame::Enable( BOOL bEnable )
void AquaSalFrame::SetMinClientSize( long nWidth, long nHeight )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
mnMinWidth = nWidth;
mnMinHeight = nHeight;
@@ -490,6 +496,9 @@ void AquaSalFrame::SetMinClientSize( long nWidth, long nHeight )
void AquaSalFrame::SetMaxClientSize( long nWidth, long nHeight )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
mnMaxWidth = nWidth;
mnMaxHeight = nHeight;
@@ -516,6 +525,9 @@ void AquaSalFrame::SetMaxClientSize( long nWidth, long nHeight )
void AquaSalFrame::SetClientSize( long nWidth, long nHeight )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
if( mpWindow )
{
NSSize aSize = { nWidth, nHeight };
@@ -548,6 +560,9 @@ void AquaSalFrame::GetClientSize( long& rWidth, long& rHeight )
void AquaSalFrame::SetWindowState( const SalFrameState* pState )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
// set normal state
NSRect aStateRect = [mpWindow frame];
aStateRect = [NSWindow contentRectForFrameRect: aStateRect styleMask: mnStyleMask];
@@ -565,7 +580,6 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState )
// relase and acquire mutex again since this call can block waiting for an internal lock
{
- //YieldMutexReleaser aRel;
[mpWindow setFrame: aStateRect display: NO];
}
@@ -596,8 +610,6 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState )
SendPaintEvent();
// tell the system the views need to be updated
- //YieldMutexReleaser aRel;
-
[mpWindow display];
}
}
@@ -606,6 +618,9 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState )
BOOL AquaSalFrame::GetWindowState( SalFrameState* pState )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
pState->mnMask = SAL_FRAMESTATE_MASK_X |
SAL_FRAMESTATE_MASK_Y |
SAL_FRAMESTATE_MASK_WIDTH |
@@ -642,6 +657,9 @@ BOOL AquaSalFrame::GetWindowState( SalFrameState* pState )
void AquaSalFrame::SetScreenNumber(unsigned int nScreen)
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
NSArray* pScreens = [NSScreen screens];
Rectangle aRet;
NSScreen* pScreen = nil;
@@ -673,6 +691,9 @@ void AquaSalFrame::SetScreenNumber(unsigned int nScreen)
void AquaSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
if( mbFullScreen == bFullScreen )
return;
@@ -731,7 +752,6 @@ void AquaSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay )
maFullScreenRect = [mpWindow frame];
{
- //YieldMutexReleaser aRel;
[mpWindow setFrame: [NSWindow frameRectForContentRect: aNewContentRect styleMask: mnStyleMask] display: mbShown ? YES : NO];
}
@@ -743,7 +763,6 @@ void AquaSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay )
else
{
{
- //YieldMutexReleaser aRel;
[mpWindow setFrame: maFullScreenRect display: mbShown ? YES : NO];
}
UpdateFrameGeometry();
@@ -782,6 +801,9 @@ public:
void AquaSalFrame::StartPresentation( BOOL bStart )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
if( bStart )
{
mpActivityTimer.reset( new PreventSleepTimer() );
@@ -806,6 +828,12 @@ void AquaSalFrame::SetAlwaysOnTop( BOOL bOnTop )
void AquaSalFrame::ToTop(USHORT nFlags)
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
if( ! (nFlags & SAL_FRAME_TOTOP_RESTOREWHENMIN) )
{
if( ! [mpWindow isVisible] || [mpWindow isMiniaturized] )
@@ -859,6 +887,9 @@ NSCursor* AquaSalFrame::getCurrentCursor() const
void AquaSalFrame::SetPointer( PointerStyle ePointerStyle )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
if( ePointerStyle >= POINTER_COUNT || ePointerStyle == mePointerStyle )
return;
mePointerStyle = ePointerStyle;
@@ -885,6 +916,10 @@ void AquaSalFrame::Flush( void )
if( !(mbGraphics && mpGraphics && mpView && mbShown) )
return;
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
+
[mpView setNeedsDisplay: YES];
// outside of the application's event loop (e.g. IntroWindow)
@@ -903,6 +938,9 @@ void AquaSalFrame::Flush( const Rectangle& rRect )
if( !(mbGraphics && mpGraphics && mpView && mbShown) )
return;
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
NSRect aNSRect = { {rRect.Left(), rRect.Top()}, { rRect.GetWidth(), rRect.GetHeight() } };
VCLToCocoa( aNSRect, false );
[mpView setNeedsDisplayInRect: aNSRect];
@@ -922,7 +960,8 @@ void AquaSalFrame::Sync()
{
if( mbGraphics && mpGraphics && mpView && mbShown )
{
- //YieldMutexReleaser aRel;
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
[mpView setNeedsDisplay: YES];
[mpView display];
@@ -1146,6 +1185,9 @@ void AquaSalFrame::getResolution( long& o_rDPIX, long& o_rDPIY )
// doesn't make the anything cleaner for now
void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
[mpView lockFocus];
StyleSettings aStyleSettings = rSettings.GetStyleSettings();
@@ -1257,6 +1299,9 @@ void AquaSalFrame::Beep( SoundType eSoundType )
void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, USHORT nFlags)
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
USHORT nEvent = 0;
if( [mpWindow isMiniaturized] )
@@ -1321,7 +1366,6 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, USHOR
// do not display yet, we need to update our backbuffer
{
- //YieldMutexReleaser aRel;
[mpWindow setFrame: [NSWindow frameRectForContentRect: aContentRect styleMask: mnStyleMask] display: NO];
}
@@ -1336,13 +1380,15 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, USHOR
SendPaintEvent();
// now inform the system that the views need to be drawn
- //YieldMutexReleaser aRel;
[mpWindow display];
}
}
void AquaSalFrame::GetWorkArea( Rectangle& rRect )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
NSScreen* pScreen = [mpWindow screen];
if( pScreen == nil )
pScreen = [NSScreen mainScreen];
@@ -1356,6 +1402,9 @@ void AquaSalFrame::GetWorkArea( Rectangle& rRect )
SalPointerState AquaSalFrame::GetPointerState()
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
SalPointerState state;
state.mnState = 0;
@@ -1463,6 +1512,9 @@ void AquaSalFrame::DrawMenuBar()
void AquaSalFrame::SetMenu( SalMenu* pSalMenu )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
AquaSalMenu* pMenu = static_cast<AquaSalMenu*>(pSalMenu);
DBG_ASSERT( ! pMenu || pMenu->mbMenuBar, "setting non menubar on frame" );
mpMenu = pMenu;
@@ -1472,6 +1524,9 @@ void AquaSalFrame::SetMenu( SalMenu* pSalMenu )
void AquaSalFrame::SetExtendedFrameStyle( SalExtStyle nStyle )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
if( (mnExtStyle & SAL_FRAME_EXT_STYLE_DOCMODIFIED) != (nStyle & SAL_FRAME_EXT_STYLE_DOCMODIFIED) )
[mpWindow setDocumentEdited: (nStyle & SAL_FRAME_EXT_STYLE_DOCMODIFIED) ? YES : NO];
mnExtStyle = nStyle;
@@ -1576,6 +1631,9 @@ void AquaSalFrame::CaptureMouse( BOOL bCapture )
void AquaSalFrame::ResetClipRegion()
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
// release old path and indicate no clipping
CGPathRelease( mrClippingPath );
mrClippingPath = NULL;
@@ -1591,6 +1649,9 @@ void AquaSalFrame::ResetClipRegion()
void AquaSalFrame::BeginSetClipRegion( ULONG nRects )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
// release old path
if( mrClippingPath )
{
@@ -1609,6 +1670,9 @@ void AquaSalFrame::BeginSetClipRegion( ULONG nRects )
void AquaSalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
if( nWidth && nHeight )
{
NSRect aRect = { { nX, nY }, { nWidth, nHeight } };
@@ -1619,6 +1683,9 @@ void AquaSalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight
void AquaSalFrame::EndSetClipRegion()
{
+ // #i113170# may not be the main thread if called from UNO API
+ SalData::ensureThreadAutoreleasePool();
+
if( ! maClippingRects.empty() )
{
mrClippingPath = CGPathCreateMutable();
diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm
index 25dadf0e592b..935c987f65cc 100755
--- a/vcl/aqua/source/window/salframeview.mm
+++ b/vcl/aqua/source/window/salframeview.mm
@@ -162,6 +162,20 @@ static AquaSalFrame* getMouseContainerFrame()
return mpFrame;
}
+-(void)displayIfNeeded
+{
+ if( GetSalData() && GetSalData()->mpFirstInstance )
+ {
+ vos::IMutex* pMutex = GetSalData()->mpFirstInstance->GetYieldMutex();
+ if( pMutex )
+ {
+ pMutex->acquire();
+ [super displayIfNeeded];
+ pMutex->release();
+ }
+ }
+}
+
-(MacOSBOOL)containsMouse
{
// is this event actually inside that NSWindow ?
@@ -572,8 +586,11 @@ private:
-(void)mouseEntered: (NSEvent*)pEvent
{
s_pMouseFrame = mpFrame;
-
- [self sendMouseEventToFrame:pEvent button:s_nLastButton eventtype:SALEVENT_MOUSEMOVE];
+
+ // #i107215# the only mouse events we get when inactive are enter/exit
+ // actually we would like to have all of them, but better none than some
+ if( [NSApp isActive] )
+ [self sendMouseEventToFrame:pEvent button:s_nLastButton eventtype:SALEVENT_MOUSEMOVE];
}
-(void)mouseExited: (NSEvent*)pEvent
@@ -581,7 +598,10 @@ private:
if( s_pMouseFrame == mpFrame )
s_pMouseFrame = NULL;
- [self sendMouseEventToFrame:pEvent button:s_nLastButton eventtype:SALEVENT_MOUSELEAVE];
+ // #i107215# the only mouse events we get when inactive are enter/exit
+ // actually we would like to have all of them, but better none than some
+ if( [NSApp isActive] )
+ [self sendMouseEventToFrame:pEvent button:s_nLastButton eventtype:SALEVENT_MOUSELEAVE];
}
-(void)rightMouseDown: (NSEvent*)pEvent
diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx
index fa185c32dcda..ab92445b5e03 100644
--- a/vcl/inc/vcl/button.hxx
+++ b/vcl/inc/vcl/button.hxx
@@ -132,7 +132,7 @@ protected:
SAL_DLLPRIVATE WinBits ImplInitStyle( const Window* pPrevWindow, WinBits nStyle );
SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
SAL_DLLPRIVATE void ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags,
- const Rectangle& rRect, bool bLayout );
+ const Rectangle& rRect, bool bLayout, bool bMenuBtnSep );
SAL_DLLPRIVATE void ImplDrawPushButton( bool bLayout = false );
using Button::ImplGetTextStyle;
SAL_DLLPRIVATE USHORT ImplGetTextStyle( ULONG nDrawFlags ) const;
diff --git a/vcl/source/window/dndevdis.hxx b/vcl/inc/vcl/dndevdis.hxx
index 5b91bd0713ec..5b91bd0713ec 100644
--- a/vcl/source/window/dndevdis.hxx
+++ b/vcl/inc/vcl/dndevdis.hxx
diff --git a/vcl/source/window/dndlcon.hxx b/vcl/inc/vcl/dndlcon.hxx
index 5a41a20e4271..5a41a20e4271 100644
--- a/vcl/source/window/dndlcon.hxx
+++ b/vcl/inc/vcl/dndlcon.hxx
diff --git a/vcl/inc/vcl/gdimtf.hxx b/vcl/inc/vcl/gdimtf.hxx
index 06f7a0d14a2e..636fc4a979f3 100644
--- a/vcl/inc/vcl/gdimtf.hxx
+++ b/vcl/inc/vcl/gdimtf.hxx
@@ -158,6 +158,8 @@ public:
sal_Bool IsEqual( const GDIMetaFile& rMtf ) const;
BOOL Mirror( ULONG nMirrorFlags );
void Move( long nX, long nY );
+ // additional Move method getting specifics how to handle MapMode( MAP_PIXEL )
+ void Move( long nX, long nY, long nDPIX, long nDPIY );
void Scale( double fScaleX, double fScaleY );
void Scale( const Fraction& rScaleX, const Fraction& rScaleY );
void Rotate( long nAngle10 );
diff --git a/vcl/inc/vcl/graphite_adaptors.hxx b/vcl/inc/vcl/graphite_adaptors.hxx
index e58881c9f463..ae2ff2962adb 100644
--- a/vcl/inc/vcl/graphite_adaptors.hxx
+++ b/vcl/inc/vcl/graphite_adaptors.hxx
@@ -55,11 +55,11 @@
#include "vcl/dllapi.h"
// Libraries
-#include <tools/preextstl.h>
+#include <preextstl.h>
#include <graphite/GrClient.h>
#include <graphite/Font.h>
#include <graphite/ITextSource.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
// Module type definitions and forward declarations.
//
diff --git a/vcl/inc/vcl/graphite_features.hxx b/vcl/inc/vcl/graphite_features.hxx
index 47f4c3a01e7f..47b8f062e299 100644
--- a/vcl/inc/vcl/graphite_features.hxx
+++ b/vcl/inc/vcl/graphite_features.hxx
@@ -29,11 +29,11 @@
// Parse a string of features specified as ; separated pairs.
// e.g.
// 1001=1&2002=2&fav1=0
-#include <tools/preextstl.h>
+#include <preextstl.h>
#include <graphite/GrClient.h>
#include <graphite/Font.h>
#include <graphite/GrFeature.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
namespace grutils
{
diff --git a/vcl/inc/vcl/graphite_layout.hxx b/vcl/inc/vcl/graphite_layout.hxx
index 765a154a9898..cd22abdcdb26 100644
--- a/vcl/inc/vcl/graphite_layout.hxx
+++ b/vcl/inc/vcl/graphite_layout.hxx
@@ -40,13 +40,13 @@
#include <vector>
#include <utility>
// Libraries
-#include <tools/preextstl.h>
+#include <preextstl.h>
#include <graphite/GrClient.h>
#include <graphite/Font.h>
#include <graphite/GrConstants.h>
#include <graphite/GrAppData.h>
#include <graphite/SegmentAux.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
// Platform
#include <vcl/sallayout.hxx>
#include <vcl/dllapi.h>
diff --git a/vcl/inc/vcl/ilstbox.hxx b/vcl/inc/vcl/ilstbox.hxx
index 33f60a1e8a2f..ac278f76f65b 100644
--- a/vcl/inc/vcl/ilstbox.hxx
+++ b/vcl/inc/vcl/ilstbox.hxx
@@ -396,6 +396,7 @@ private:
mbHScroll : 1, // HScroll an oder aus
mbAutoHScroll : 1; // AutoHScroll an oder aus
Link maScrollHdl; // Weil der vom ImplListBoxWindow selbst benoetigt wird.
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer;
protected:
virtual void GetFocus();
@@ -500,6 +501,7 @@ public:
// pb: #106948# explicit mirroring for calc
inline void EnableMirroring() { maLBWindow.EnableMirroring(); }
+ inline void SetDropTraget(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& i_xDNDListenerContainer){ mxDNDListenerContainer= i_xDNDListenerContainer; }
};
// -----------------------------
diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx
index af83b2db40e1..be7633f13d53 100644
--- a/vcl/inc/vcl/print.hxx
+++ b/vcl/inc/vcl/print.hxx
@@ -521,6 +521,7 @@ public:
SAL_DLLPRIVATE void setPrinter( const boost::shared_ptr<Printer>& );
SAL_DLLPRIVATE void setOptionChangeHdl( const Link& );
SAL_DLLPRIVATE void createProgressDialog();
+ SAL_DLLPRIVATE bool isProgressCanceled() const;
SAL_DLLPRIVATE void setMultipage( const MultiPageSetup& );
SAL_DLLPRIVATE const MultiPageSetup& getMultipage() const;
SAL_DLLPRIVATE void setLastPage( sal_Bool i_bLastPage );
diff --git a/vcl/inc/vcl/splitwin.hxx b/vcl/inc/vcl/splitwin.hxx
index 4aa1ca16785c..f028c6969b16 100644
--- a/vcl/inc/vcl/splitwin.hxx
+++ b/vcl/inc/vcl/splitwin.hxx
@@ -201,6 +201,18 @@ public:
BOOL bPropGreat = FALSE );
void SetItemSize( USHORT nId, long nNewSize );
long GetItemSize( USHORT nId ) const;
+ /** Set a range that limits the (variable part of the) size with an
+ upper and a lower bound (both are valid values themselves.)
+ @param nId
+ Id of the item for which the size limits are set.
+ @param aRange
+ Values of -1 define missing bounds, thus setting a range (-1,-1)
+ (the default) removes the size limitiation.
+ */
+ void SetItemSizeRange (USHORT nId, const Range aRange);
+ /** Return the current size limits for the specified item.
+ */
+ Range GetItemSizeRange (USHORT nId) const;
long GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const;
void SetItemBits( USHORT nId, SplitWindowItemBits nNewBits );
SplitWindowItemBits GetItemBits( USHORT nId ) const;
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 980e0f1c5b58..b91afbbae9fe 100755
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -424,7 +424,10 @@ ImplStyleData::ImplStyleData()
mnPushButtonStyle = 0;
mnTabControlStyle = 0;
mnLogoDisplayTime = LOGO_DISPLAYTIME_STARTTIME;
- mnDragFullOptions = 0;
+ mnDragFullOptions = DRAGFULL_OPTION_WINDOWMOVE | DRAGFULL_OPTION_WINDOWSIZE |
+ DRAGFULL_OPTION_OBJECTMOVE | DRAGFULL_OPTION_OBJECTSIZE |
+ DRAGFULL_OPTION_DOCKING | DRAGFULL_OPTION_SPLIT |
+ DRAGFULL_OPTION_SCROLL;
mnAnimationOptions = 0;
mnSelectionOptions = 0;
mnDisplayOptions = 0;
@@ -1041,6 +1044,8 @@ BOOL StyleSettings::operator ==( const StyleSettings& rSet ) const
(mpData->mnUseSystemUIFonts == rSet.mpData->mnUseSystemUIFonts) &&
(mpData->mnUseFlatBorders == rSet.mpData->mnUseFlatBorders) &&
(mpData->mnUseFlatMenues == rSet.mpData->mnUseFlatMenues) &&
+ (mpData->mnSymbolsStyle == rSet.mpData->mnSymbolsStyle) &&
+ (mpData->mnPreferredSymbolsStyle == rSet.mpData->mnPreferredSymbolsStyle) &&
(mpData->maFaceColor == rSet.mpData->maFaceColor) &&
(mpData->maCheckedColor == rSet.mpData->maCheckedColor) &&
(mpData->maLightColor == rSet.mpData->maLightColor) &&
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index d4f29e224e7b..db7649a90258 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -896,7 +896,8 @@ void PushButton::ImplInitSettings( BOOL bFont,
// #i38498#: do not check for GetParent()->IsChildTransparentModeEnabled()
// otherwise the formcontrol button will be overdrawn due to PARENTCLIPMODE_NOCLIP
// for radio and checkbox this is ok as they shoud appear transparent in documents
- if ( IsNativeControlSupported( CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL ) )
+ if ( IsNativeControlSupported( CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL ) ||
+ (GetStyle() & WB_FLATBUTTON) != 0 )
{
EnableChildTransparentMode( TRUE );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
@@ -1155,7 +1156,9 @@ static void ImplDrawBtnDropDownArrow( OutputDevice* pDev,
void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags,
const Rectangle& rRect,
- bool bLayout )
+ bool bLayout,
+ bool bMenuBtnSep
+ )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Rectangle aInRect = rRect;
@@ -1203,19 +1206,22 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags
aSize.Width() -= ( 5 + nSymbolSize );
ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, nImageSep,
- nDrawFlags, nTextStyle, NULL, (GetStyle() & WB_FLATBUTTON) != 0 );
+ nDrawFlags, nTextStyle, NULL, true );
}
else
ImplCalcSymbolRect( aInRect );
if( ! bLayout )
{
- DecorationView aDecoView( pDev );
long nDistance = (aInRect.GetHeight() > 10) ? 2 : 1;
- long nX = aInRect.Left() - 2*nDistance;;
- Point aStartPt( nX, aInRect.Top()+nDistance );
- Point aEndPt( nX, aInRect.Bottom()-nDistance );
- aDecoView.DrawSeparator( aStartPt, aEndPt );
+ DecorationView aDecoView( pDev );
+ if( bMenuBtnSep )
+ {
+ long nX = aInRect.Left() - 2*nDistance;;
+ Point aStartPt( nX, aInRect.Top()+nDistance );
+ Point aEndPt( nX, aInRect.Bottom()-nDistance );
+ aDecoView.DrawSeparator( aStartPt, aEndPt );
+ }
aDecoView.DrawSymbol( aInRect, SYMBOL_SPIN_DOWN, aColor, nStyle );
aInRect.Left() -= 2*nDistance;
ImplSetSymbolRect( aInRect );
@@ -1227,7 +1233,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags
// FIXME: (GetStyle() & WB_FLATBUTTON) != 0 is preliminary
// in the next major this should be replaced by "true"
ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, nImageSep, nDrawFlags,
- nTextStyle, IsSymbol() ? &aSymbolRect : NULL, (GetStyle() & WB_FLATBUTTON) != 0 );
+ nTextStyle, IsSymbol() ? &aSymbolRect : NULL, true );
if ( IsSymbol() && ! bLayout )
{
@@ -1356,6 +1362,12 @@ void PushButton::ImplDrawPushButton( bool bLayout )
return;
bool bRollOver = (IsMouseOver() && aInRect.IsInside( GetPointerPosPixel() ));
+ bool bDrawMenuSep = true;
+ if( (GetStyle() & WB_FLATBUTTON) )
+ {
+ if( ! bRollOver && ! HasFocus() )
+ bDrawMenuSep = false;
+ }
if ( (bNativeOK=IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == TRUE )
{
PushButtonValue aControlValue;
@@ -1406,7 +1418,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
// draw content using the same aInRect as non-native VCL would do
ImplDrawPushButtonContent( this,
(nState&CTRL_STATE_ROLLOVER) ? WINDOW_DRAW_ROLLOVER : 0,
- aInRect, bLayout );
+ aInRect, bLayout, bDrawMenuSep );
if ( HasFocus() )
ShowFocus( ImplGetFocusRect() );
@@ -1432,7 +1444,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
}
// draw content
- ImplDrawPushButtonContent( this, 0, aInRect, bLayout );
+ ImplDrawPushButtonContent( this, 0, aInRect, bLayout, bDrawMenuSep );
if( ! bLayout && HasFocus() )
{
@@ -1753,7 +1765,7 @@ void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
nButtonStyle |= BUTTON_DRAW_CHECKED;
aRect = aDecoView.DrawButton( aRect, nButtonStyle );
- ImplDrawPushButtonContent( pDev, nFlags, aRect, false );
+ ImplDrawPushButtonContent( pDev, nFlags, aRect, false, true );
pDev->Pop();
}
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 786b190069c4..a692cbea0260 100755
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -122,6 +122,7 @@ struct DDInfo
BOOL bStarterOfDD;
BOOL bDroppedInMe;
BOOL bVisCursor;
+ BOOL bIsStringSupported;
DDInfo()
{
@@ -130,6 +131,7 @@ struct DDInfo
bStarterOfDD = FALSE;
bDroppedInMe = FALSE;
bVisCursor = FALSE;
+ bIsStringSupported = FALSE;
}
};
@@ -3062,17 +3064,26 @@ void Edit::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent&
rDTDE.Context->dropComplete( bChanges );
}
-void Edit::dragEnter( const ::com::sun::star::datatransfer::dnd::DropTargetDragEnterEvent& ) throw (::com::sun::star::uno::RuntimeException)
+void Edit::dragEnter( const ::com::sun::star::datatransfer::dnd::DropTargetDragEnterEvent& rDTDE ) throw (::com::sun::star::uno::RuntimeException)
{
if ( !mpDDInfo )
{
mpDDInfo = new DDInfo;
}
-// sal_Bool bTextContent = mbReadOnly ? sal_False : sal_True; // quiery from rDTDEE.SupportedDataFlavors()
-// if ( bTextContent )
-// rDTDEE.Context->acceptDrop(datatransfer::dnd::DNDConstants::ACTION_COPY_OR_MOVE);
-// else
-// rDTDEE.Context->rejectDrop();
+ // search for string data type
+ const Sequence< com::sun::star::datatransfer::DataFlavor >& rFlavors( rDTDE.SupportedDataFlavors );
+ sal_Int32 nEle = rFlavors.getLength();
+ mpDDInfo->bIsStringSupported = FALSE;
+ for( sal_Int32 i = 0; i < nEle; i++ )
+ {
+ sal_Int32 nIndex = 0;
+ rtl::OUString aMimetype = rFlavors[i].MimeType.getToken( 0, ';', nIndex );
+ if( aMimetype.equalsAscii( "text/plain" ) )
+ {
+ mpDDInfo->bIsStringSupported = TRUE;
+ break;
+ }
+ }
}
void Edit::dragExit( const ::com::sun::star::datatransfer::dnd::DropTargetEvent& ) throw (::com::sun::star::uno::RuntimeException)
@@ -3104,7 +3115,7 @@ void Edit::dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDragEv
aSel.Justify();
// Don't accept drop in selection or read-only field...
- if ( IsReadOnly() || aSel.IsInside( mpDDInfo->nDropPos ) )
+ if ( IsReadOnly() || aSel.IsInside( mpDDInfo->nDropPos ) || ! mpDDInfo->bIsStringSupported )
{
ImplHideDDCursor();
rDTDE.Context->rejectDrag();
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index eb8c20d1d803..03527bf083a7 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -44,9 +44,10 @@
#include "tools/debug.hxx"
+#include <vcl/dndevdis.hxx>
+#include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
-
- // =======================================================================
+// =======================================================================
ListBox::ListBox( WindowType nType ) : Control( nType )
{
@@ -119,6 +120,8 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle )
Control::ImplInit( pParent, nStyle, NULL );
SetBackground();
+ ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener> xDrop = new DNDEventDispatcher(this);
+
if( nStyle & WB_DROPDOWN )
{
sal_Int32 nLeft, nTop, nRight, nBottom;
@@ -145,16 +148,19 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle )
mpFloatWin = new ImplListBoxFloatingWindow( this );
mpFloatWin->SetAutoWidth( TRUE );
mpFloatWin->SetPopupModeEndHdl( LINK( this, ListBox, ImplPopupModeEndHdl ) );
+ mpFloatWin->GetDropTarget()->addDropTargetListener(xDrop);
mpImplWin = new ImplWin( this, (nStyle & (WB_LEFT|WB_RIGHT|WB_CENTER))|WB_NOBORDER );
mpImplWin->SetMBDownHdl( LINK( this, ListBox, ImplClickBtnHdl ) );
mpImplWin->SetUserDrawHdl( LINK( this, ListBox, ImplUserDrawHdl ) );
mpImplWin->Show();
+ mpImplWin->GetDropTarget()->addDropTargetListener(xDrop);
mpBtn = new ImplBtn( this, WB_NOLIGHTBORDER | WB_RECTSTYLE );
ImplInitDropDownButton( mpBtn );
mpBtn->SetMBDownHdl( LINK( this, ListBox, ImplClickBtnHdl ) );
mpBtn->Show();
+ mpBtn->GetDropTarget()->addDropTargetListener(xDrop);
}
@@ -170,6 +176,9 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle )
mpImplLB->SetPosPixel( Point() );
mpImplLB->Show();
+ mpImplLB->GetDropTarget()->addDropTargetListener(xDrop);
+ mpImplLB->SetDropTraget(xDrop);
+
if ( mpFloatWin )
{
mpFloatWin->SetImplListBox( mpImplLB );
@@ -1612,7 +1621,6 @@ const Wallpaper& ListBox::GetDisplayBackground() const
}
// =======================================================================
-
MultiListBox::MultiListBox( Window* pParent, WinBits nStyle ) :
ListBox( WINDOW_MULTILISTBOX )
{
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 9e2a21b43e37..ec476157fbeb 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -961,8 +961,8 @@ BOOL Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
const long nScanlineSize = pWriteAcc->GetScanlineSize();
const long nNewWidth1 = nNewWidth - 1L;
const long nNewHeight1 = nNewHeight - 1L;
- const long nWidth1 = pReadAcc->Width() - 1L;
- const long nHeight1 = pReadAcc->Height() - 1L;
+ const long nWidth = pReadAcc->Width();
+ const long nHeight = pReadAcc->Height();
long* pLutX = new long[ nNewWidth ];
long* pLutY = new long[ nNewHeight ];
long nX, nY, nMapY, nActY = 0L;
@@ -970,10 +970,10 @@ BOOL Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
if( nNewWidth1 && nNewHeight1 )
{
for( nX = 0L; nX < nNewWidth; nX++ )
- pLutX[ nX ] = nX * nWidth1 / nNewWidth1;
+ pLutX[ nX ] = nX * nWidth / nNewWidth;
for( nY = 0L; nY < nNewHeight; nY++ )
- pLutY[ nY ] = nY * nHeight1 / nNewHeight1;
+ pLutY[ nY ] = nY * nHeight / nNewHeight;
while( nActY < nNewHeight )
{
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 01b34286a086..818a31a10c0f 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -841,6 +841,49 @@ void GDIMetaFile::Move( long nX, long nY )
}
}
+void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY )
+{
+ const Size aBaseOffset( nX, nY );
+ Size aOffset( aBaseOffset );
+ VirtualDevice aMapVDev;
+
+ aMapVDev.EnableOutput( FALSE );
+ aMapVDev.SetReferenceDevice( nDPIX, nDPIY );
+ aMapVDev.SetMapMode( GetPrefMapMode() );
+
+ for( MetaAction* pAct = (MetaAction*) First(); pAct; pAct = (MetaAction*) Next() )
+ {
+ const long nType = pAct->GetType();
+ MetaAction* pModAct;
+
+ if( pAct->GetRefCount() > 1 )
+ {
+ Replace( pModAct = pAct->Clone(), GetCurPos() );
+ pAct->Delete();
+ }
+ else
+ pModAct = pAct;
+
+ if( ( META_MAPMODE_ACTION == nType ) ||
+ ( META_PUSH_ACTION == nType ) ||
+ ( META_POP_ACTION == nType ) )
+ {
+ pModAct->Execute( &aMapVDev );
+ if( aMapVDev.GetMapMode().GetMapUnit() == MAP_PIXEL )
+ {
+ aOffset = aMapVDev.LogicToPixel( aBaseOffset, GetPrefMapMode() );
+ MapMode aMap( aMapVDev.GetMapMode() );
+ aOffset.Width() = aOffset.Width() * (double)aMap.GetScaleX();
+ aOffset.Height() = aOffset.Height() * (double)aMap.GetScaleY();
+ }
+ else
+ aOffset = aMapVDev.LogicToLogic( aBaseOffset, GetPrefMapMode(), aMapVDev.GetMapMode() );
+ }
+
+ pModAct->Move( aOffset.Width(), aOffset.Height() );
+ }
+}
+
// ------------------------------------------------------------------------
void GDIMetaFile::Scale( double fScaleX, double fScaleY )
diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx
index 476ac3ca44a9..3105850c4fbf 100644
--- a/vcl/source/gdi/impimage.cxx
+++ b/vcl/source/gdi/impimage.cxx
@@ -553,14 +553,14 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
// -----------------------------------------------------------------------
void ImplImageBmp::ImplUpdateDisplayBmp( OutputDevice*
-#if defined WIN || defined WNT
+#if defined WNT
pOutDev
#endif
)
{
if( !mpDisplayBmp && !maBmpEx.IsEmpty() )
{
-#if defined WIN || defined WNT
+#if defined WNT
if( maBmpEx.IsAlpha() )
mpDisplayBmp = new BitmapEx( maBmpEx );
else
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 752a4222bcb2..94f07b8f17d1 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -4078,7 +4078,7 @@ void MetaCommentAction::Move( long nXMove, long nYMove )
aMemStm >> aFill;
PolyPolygon aPath;
aFill.getPath( aPath );
- aPath.Scale( nXMove, nYMove );
+ aPath.Move( nXMove, nYMove );
aFill.setPath( aPath );
aDest << aFill;
}
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index c4185a77382e..63bc233ef4e0 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -1327,11 +1327,11 @@ void ImplDevFontList::InitGenericGlyphFallback( void ) const
"msmincho", "fzmingti", "fzheiti", "ipamincho", "sazanamimincho", "kochimincho", "",
"sunbatang", "sundotum", "baekmukdotum", "gulim", "batang", "dotum", "",
"hgmincholightj", "msunglightsc", "msunglighttc", "hymyeongjolightk", "",
- "tahoma", "dejavusans", "timesnewroman", "lucidatypewriter", "lucidasans", "nimbussansl", "",
+ "tahoma", "dejavusans", "timesnewroman", "liberationsans", "",
"shree", "mangal", "",
"raavi", "shruti", "tunga", "",
"latha", "gautami", "kartika", "vrinda", "",
- "shayyalmt", "naskmt", "",
+ "shayyalmt", "naskmt", "scheherazade", "",
"david", "nachlieli", "lucidagrande", "",
"norasi", "angsanaupc", "",
"khmerossystem", "",
@@ -1381,6 +1381,7 @@ void ImplDevFontList::InitGenericGlyphFallback( void ) const
}
}
+#ifdef SAL_FONTENUM_STABLE_ON_PLATFORM // #i113472#
// sort the list of fonts for glyph fallback by quality (highest first)
// #i33947# keep the EUDC font at the front of the list
// an insertion sort is good enough for this short list
@@ -1396,6 +1397,7 @@ void ImplDevFontList::InitGenericGlyphFallback( void ) const
break;
pFallbackList[ j+1 ] = pTestFont;
}
+#endif
#if defined(HDU_DEBUG)
for( int i = 0; i < nMaxLevel; ++i )
@@ -3146,17 +3148,17 @@ long OutputDevice::ImplGetTextWidth( const SalLayout& rSalLayout ) const
// -----------------------------------------------------------------------
void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
- long nX, long nY, long nWidth, long nHeight )
+ long nDistX, long nDistY, long nWidth, long nHeight )
{
+ long nX = nDistX;
+ long nY = nDistY;
+
short nOrientation = mpFontEntry->mnOrientation;
if ( nOrientation )
{
// Rotate rect without rounding problems for 90 degree rotations
if ( !(nOrientation % 900) )
{
- nX -= nBaseX;
- nY -= nBaseY;
-
if ( nOrientation == 900 )
{
long nTemp = nX;
@@ -3184,12 +3186,11 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
nHeight = nTemp;
nX -= nWidth;
}
-
- nX += nBaseX;
- nY += nBaseY;
}
else
{
+ nX += nBaseX;
+ nY += nBaseY;
// inflate because polygons are drawn smaller
Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) );
Polygon aPoly( aRect );
@@ -3199,6 +3200,8 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
}
}
+ nX += nBaseX;
+ nY += nBaseY;
mpGraphics->DrawRect( nX, nY, nWidth, nHeight, this );
}
@@ -3219,7 +3222,7 @@ void OutputDevice::ImplDrawTextBackground( const SalLayout& rSalLayout )
mpGraphics->SetFillColor( ImplColorToSal( GetTextFillColor() ) );
mbInitFillColor = TRUE;
- ImplDrawTextRect( nX, nY, nX, nY-mpFontEntry->maMetric.mnAscent-mnEmphasisAscent,
+ ImplDrawTextRect( nX, nY, 0, -(mpFontEntry->maMetric.mnAscent + mnEmphasisAscent),
nWidth,
mpFontEntry->mnLineHeight+mnEmphasisAscent+mnEmphasisDescent );
}
@@ -3504,7 +3507,7 @@ static void ImplDrawWavePixel( long nOriginX, long nOriginY,
// -----------------------------------------------------------------------
void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
- long nStartX, long nStartY,
+ long nDistX, long nDistY,
long nWidth, long nHeight,
long nLineWidth, short nOrientation,
const Color& rColor )
@@ -3512,6 +3515,9 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
if ( !nHeight )
return;
+ long nStartX = nBaseX + nDistX;
+ long nStartY = nBaseY + nDistY;
+
// Bei Hoehe von 1 Pixel reicht es, eine Linie auszugeben
if ( (nLineWidth == 1) && (nHeight == 1) )
{
@@ -3526,7 +3532,6 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
ImplRotatePos( nBaseX, nBaseY, nEndX, nEndY, nOrientation );
}
mpGraphics->DrawLine( nStartX, nStartY, nEndX, nEndY, this );
-
}
else
{
@@ -3626,7 +3631,7 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
// -----------------------------------------------------------------------
void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY,
- long nX, long nY, long nWidth,
+ long nDistX, long nDistY, long nWidth,
FontUnderline eTextLine,
Color aColor,
BOOL bIsAbove )
@@ -3652,7 +3657,7 @@ void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY,
nLineWidth = 1;
if ( eTextLine == UNDERLINE_BOLDWAVE )
nLineWidth *= 2;
- nLinePos += nY - (nLineHeight / 2);
+ nLinePos += nDistY - (nLineHeight / 2);
long nLineWidthHeight = ((nLineWidth*mnDPIX)+(mnDPIY/2))/mnDPIY;
if ( eTextLine == UNDERLINE_DOUBLEWAVE )
{
@@ -3673,16 +3678,16 @@ void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY,
nLineDY2 = 1;
nLinePos -= nLineWidthHeight-nLineDY2;
- ImplDrawWaveLine( nBaseX, nBaseY, nX, nLinePos, nWidth, nLineHeight,
+ ImplDrawWaveLine( nBaseX, nBaseY, nDistX, nLinePos, nWidth, nLineHeight,
nLineWidth, mpFontEntry->mnOrientation, aColor );
nLinePos += nLineWidthHeight+nLineDY;
- ImplDrawWaveLine( nBaseX, nBaseY, nX, nLinePos, nWidth, nLineHeight,
+ ImplDrawWaveLine( nBaseX, nBaseY, nDistX, nLinePos, nWidth, nLineHeight,
nLineWidth, mpFontEntry->mnOrientation, aColor );
}
else
{
nLinePos -= nLineWidthHeight/2;
- ImplDrawWaveLine( nBaseX, nBaseY, nX, nLinePos, nWidth, nLineHeight,
+ ImplDrawWaveLine( nBaseX, nBaseY, nDistX, nLinePos, nWidth, nLineHeight,
nLineWidth, mpFontEntry->mnOrientation, aColor );
}
}
@@ -3690,7 +3695,7 @@ void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY,
// -----------------------------------------------------------------------
void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
- long nX, long nY, long nWidth,
+ long nDistX, long nDistY, long nWidth,
FontUnderline eTextLine,
Color aColor,
BOOL bIsAbove )
@@ -3700,6 +3705,8 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
long nLinePos = 0;
long nLinePos2 = 0;
+ const long nY = nDistY;
+
if ( eTextLine > UNDERLINE_LAST )
eTextLine = UNDERLINE_SINGLE;
@@ -3767,7 +3774,7 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
mpGraphics->SetFillColor( ImplColorToSal( aColor ) );
mbInitFillColor = TRUE;
- long nLeft = nX;
+ long nLeft = nDistX;
switch ( eTextLine )
{
@@ -3920,7 +3927,7 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
// -----------------------------------------------------------------------
void OutputDevice::ImplDrawStrikeoutLine( long nBaseX, long nBaseY,
- long nX, long nY, long nWidth,
+ long nDistX, long nDistY, long nWidth,
FontStrikeout eStrikeout,
Color aColor )
{
@@ -3929,6 +3936,8 @@ void OutputDevice::ImplDrawStrikeoutLine( long nBaseX, long nBaseY,
long nLinePos = 0;
long nLinePos2 = 0;
+ long nY = nDistY;
+
if ( eStrikeout > STRIKEOUT_LAST )
eStrikeout = STRIKEOUT_SINGLE;
@@ -3961,7 +3970,7 @@ void OutputDevice::ImplDrawStrikeoutLine( long nBaseX, long nBaseY,
mpGraphics->SetFillColor( ImplColorToSal( aColor ) );
mbInitFillColor = TRUE;
- long nLeft = nX;
+ const long& nLeft = nDistX;
switch ( eStrikeout )
{
@@ -3982,7 +3991,7 @@ void OutputDevice::ImplDrawStrikeoutLine( long nBaseX, long nBaseY,
// -----------------------------------------------------------------------
void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
- long nX, long nY, long nWidth,
+ long nDistX, long nDistY, long nWidth,
FontStrikeout eStrikeout,
Color aColor )
{
@@ -4016,12 +4025,12 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
// calculate acceptable strikeout length
// allow the strikeout to be one pixel larger than the text it strikes out
- long nMaxWidth = nStrikeoutWidth / 2;
+ long nMaxWidth = nStrikeoutWidth * 3 / 4;
if ( nMaxWidth < 2 )
nMaxWidth = 2;
nMaxWidth += nWidth + 1;
- int nStrikeStrLen = (nMaxWidth + nStrikeoutWidth - 1) / nStrikeoutWidth;
+ int nStrikeStrLen = (nMaxWidth - 1) / nStrikeoutWidth;
// if the text width is smaller than the strikeout text, then do not
// strike out at all. This case requires user interaction, e.g. adding
// a space to the text
@@ -4036,7 +4045,9 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
const String aStrikeoutText( aChars, xub_StrLen(nStrikeStrLen) );
if( mpFontEntry->mnOrientation )
- ImplRotatePos( nBaseX, nBaseY, nX, nY, mpFontEntry->mnOrientation );
+ ImplRotatePos( 0, 0, nDistX, nDistY, mpFontEntry->mnOrientation );
+ nBaseX += nDistX;
+ nBaseY += nDistY;
// strikeout text has to be left aligned
ULONG nOrigTLM = mnTextLayoutMode;
@@ -4052,7 +4063,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
SetTextColor( aColor );
ImplInitTextColor();
- pLayout->DrawBase() = Point( nX+mnTextOffX, nY+mnTextOffY );
+ pLayout->DrawBase() = Point( nBaseX+mnTextOffX, nBaseY+mnTextOffY );
pLayout->DrawText( *mpGraphics );
pLayout->Release();
@@ -4062,8 +4073,8 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
// -----------------------------------------------------------------------
-void OutputDevice::ImplDrawTextLine( long nBaseX,
- long nX, long nY, long nWidth,
+void OutputDevice::ImplDrawTextLine( long nX, long nY,
+ long nDistX, long nWidth,
FontStrikeout eStrikeout,
FontUnderline eUnderline,
FontUnderline eOverline,
@@ -4079,10 +4090,14 @@ void OutputDevice::ImplDrawTextLine( long nBaseX,
BOOL bUnderlineDone = FALSE;
BOOL bOverlineDone = FALSE;
- // TODO: fix rotated text
if ( IsRTLEnabled() )
+ {
// --- RTL --- mirror at basex
- nX = nBaseX - nWidth - (nX - nBaseX - 1);
+ long nXAdd = nWidth - nDistX;
+ if( mpFontEntry->mnOrientation )
+ nXAdd = FRound( nXAdd * cos( mpFontEntry->mnOrientation * F_PI1800 ) );
+ nX += nXAdd - 1;
+ }
if ( !IsTextLineColor() )
aUnderlineColor = GetTextColor();
@@ -4095,7 +4110,7 @@ void OutputDevice::ImplDrawTextLine( long nBaseX,
(eUnderline == UNDERLINE_DOUBLEWAVE) ||
(eUnderline == UNDERLINE_BOLDWAVE) )
{
- ImplDrawWaveTextLine( nBaseX, nY, nX, nY, nWidth, eUnderline, aUnderlineColor, bUnderlineAbove );
+ ImplDrawWaveTextLine( nX, nY, nDistX, 0, nWidth, eUnderline, aUnderlineColor, bUnderlineAbove );
bUnderlineDone = TRUE;
}
if ( (eOverline == UNDERLINE_SMALLWAVE) ||
@@ -4103,25 +4118,25 @@ void OutputDevice::ImplDrawTextLine( long nBaseX,
(eOverline == UNDERLINE_DOUBLEWAVE) ||
(eOverline == UNDERLINE_BOLDWAVE) )
{
- ImplDrawWaveTextLine( nBaseX, nY, nX, nY, nWidth, eOverline, aOverlineColor, TRUE );
+ ImplDrawWaveTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, TRUE );
bOverlineDone = TRUE;
}
if ( (eStrikeout == STRIKEOUT_SLASH) ||
(eStrikeout == STRIKEOUT_X) )
{
- ImplDrawStrikeoutChar( nBaseX, nY, nX, nY, nWidth, eStrikeout, aStrikeoutColor );
+ ImplDrawStrikeoutChar( nX, nY, nDistX, 0, nWidth, eStrikeout, aStrikeoutColor );
bStrikeoutDone = TRUE;
}
if ( !bUnderlineDone )
- ImplDrawStraightTextLine( nBaseX, nY, nX, nY, nWidth, eUnderline, aUnderlineColor, bUnderlineAbove );
+ ImplDrawStraightTextLine( nX, nY, nDistX, 0, nWidth, eUnderline, aUnderlineColor, bUnderlineAbove );
if ( !bOverlineDone )
- ImplDrawStraightTextLine( nBaseX, nY, nX, nY, nWidth, eOverline, aOverlineColor, TRUE );
+ ImplDrawStraightTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, TRUE );
if ( !bStrikeoutDone )
- ImplDrawStrikeoutLine( nBaseX, nY, nX, nY, nWidth, eStrikeout, aStrikeoutColor );
+ ImplDrawStrikeoutLine( nX, nY, nDistX, 0, nWidth, eStrikeout, aStrikeoutColor );
}
// -----------------------------------------------------------------------
@@ -4131,34 +4146,49 @@ void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout,
{
if( bWordLine )
{
- Point aPos, aStartPt;
- sal_Int32 nWidth = 0, nAdvance=0;
+ // draw everything relative to the layout base point
+ const Point aStartPt = rSalLayout.DrawBase();
+ // calculate distance of each word from the base point
+ Point aPos;
+ sal_Int32 nDist = 0, nWidth = 0, nAdvance=0;
for( int nStart = 0;;)
{
+ // iterate through the layouted glyphs
sal_GlyphId nGlyphIndex;
if( !rSalLayout.GetNextGlyphs( 1, &nGlyphIndex, aPos, nStart, &nAdvance ) )
break;
+ // calculate the boundaries of each word
if( !rSalLayout.IsSpacingGlyph( nGlyphIndex ) )
{
if( !nWidth )
{
- aStartPt = aPos;//rSalLayout.DrawBase() - (aPos - rSalLayout.DrawOffset());
+ // get the distance to the base point (as projected to baseline)
+ nDist = aPos.X() - aStartPt.X();
+ if( mpFontEntry->mnOrientation )
+ {
+ const long nDY = aPos.Y() - aStartPt.Y();
+ const double fRad = mpFontEntry->mnOrientation * F_PI1800;
+ nDist = FRound( nDist*cos(fRad) - nDY*sin(fRad) );
+ }
}
+ // update the length of the textline
nWidth += nAdvance;
}
else if( nWidth > 0 )
{
- ImplDrawTextLine( rSalLayout.DrawBase().X(), aStartPt.X(), aStartPt.Y(), nWidth,
+ // draw the textline for each word
+ ImplDrawTextLine( aStartPt.X(), aStartPt.Y(), nDist, nWidth,
eStrikeout, eUnderline, eOverline, bUnderlineAbove );
nWidth = 0;
}
}
+ // draw textline for the last word
if( nWidth > 0 )
{
- ImplDrawTextLine( rSalLayout.DrawBase().X(), aStartPt.X(), aStartPt.Y(), nWidth,
+ ImplDrawTextLine( aStartPt.X(), aStartPt.Y(), nDist, nWidth,
eStrikeout, eUnderline, eOverline, bUnderlineAbove );
}
}
@@ -4166,7 +4196,7 @@ void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout,
{
Point aStartPt = rSalLayout.GetDrawPosition();
int nWidth = rSalLayout.GetTextWidth() / rSalLayout.GetUnitsPerPixel();
- ImplDrawTextLine( rSalLayout.DrawBase().X(), aStartPt.X(), aStartPt.Y(), nWidth,
+ ImplDrawTextLine( aStartPt.X(), aStartPt.Y(), 0, nWidth,
eStrikeout, eUnderline, eOverline, bUnderlineAbove );
}
}
@@ -4185,7 +4215,7 @@ void OutputDevice::ImplDrawMnemonicLine( long nX, long nY, long nWidth )
nX = nBaseX - nWidth - (nX - nBaseX - 1);
}
- ImplDrawTextLine( nBaseX, nX, nY, nWidth, STRIKEOUT_NONE, UNDERLINE_SINGLE, UNDERLINE_NONE, FALSE );
+ ImplDrawTextLine( nX, nY, 0, nWidth, STRIKEOUT_NONE, UNDERLINE_SINGLE, UNDERLINE_NONE, FALSE );
}
// -----------------------------------------------------------------------
@@ -5433,7 +5463,7 @@ void OutputDevice::DrawTextLine( const Point& rPos, long nWidth,
Point aPos = ImplLogicToDevicePixel( rPos );
nWidth = ImplLogicWidthToDevicePixel( nWidth );
aPos += Point( mnTextOffX, mnTextOffY );
- ImplDrawTextLine( aPos.X(), aPos.X(), aPos.Y(), nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove );
+ ImplDrawTextLine( aPos.X(), aPos.X(), 0, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove );
if( mpAlphaVDev )
mpAlphaVDev->DrawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove );
@@ -5510,7 +5540,7 @@ void OutputDevice::DrawWaveLine( const Point& rStartPos, const Point& rEndPos,
if( nWaveHeight > pFontEntry->maMetric.mnWUnderlineSize )
nWaveHeight = pFontEntry->maMetric.mnWUnderlineSize;
- ImplDrawWaveLine( nStartX, nStartY, nStartX, nStartY,
+ ImplDrawWaveLine( nStartX, nStartY, 0, 0,
nEndX-nStartX, nWaveHeight, 1,
nOrientation, GetLineColor() );
if( mpAlphaVDev )
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 7b7f3bbcb4d3..09cf1734eb6f 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -67,6 +67,7 @@
#include "cppuhelper/implbase1.hxx"
#include <icc/sRGB-IEC61966-2.1.hxx>
#include <vcl/lineinfo.hxx>
+#include "vcl/strhelper.hxx"
using namespace vcl;
using namespace rtl;
@@ -10839,7 +10840,7 @@ sal_Int32 PDFWriterImpl::setOutlineItemText( sal_Int32 nItem, const OUString& rT
if( nItem < 1 || nItem >= (sal_Int32)m_aOutline.size() )
return -1;
- m_aOutline[ nItem ].m_aTitle = rText;
+ m_aOutline[ nItem ].m_aTitle = psp::WhitespaceToSpace( rText );
return 0;
}
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index f6bd81ef1bea..8b4bf5163839 100644..100755
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -186,17 +186,17 @@ public:
{}
~ImplPrinterControllerData() { delete mpProgress; }
- Size getRealPaperSize( const Size& i_rPageSize ) const
+ Size getRealPaperSize( const Size& i_rPageSize, bool bNoNUP ) const
{
if( maFixedPageSize.Width() > 0 && maFixedPageSize.Height() > 0 )
return maFixedPageSize;
- if( maMultiPage.nRows * maMultiPage.nColumns > 1 )
+ if( maMultiPage.nRows * maMultiPage.nColumns > 1 && ! bNoNUP )
return maMultiPage.aPaperSize;
return i_rPageSize;
}
bool isFixedPageSize() const
{ return maFixedPageSize.Width() != 0 && maFixedPageSize.Height() != 0; }
- PrinterController::PageSize modifyJobSetup( const Sequence< PropertyValue >& i_rProps );
+ PrinterController::PageSize modifyJobSetup( const Sequence< PropertyValue >& i_rProps, bool bNoNUP );
};
PrinterController::PrinterController()
@@ -446,8 +446,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
if( ! aDlg.Execute() )
{
GDIMetaFile aPageFile;
- i_pController->setLastPage( sal_True );
- i_pController->getFilteredPageFile( 0, aPageFile );
+ i_pController->abortJob();
return;
}
if( aDlg.isPrintToFile() )
@@ -455,9 +454,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
rtl::OUString aFile = queryFile( pController->getPrinter().get() );
if( ! aFile.getLength() )
{
- GDIMetaFile aPageFile;
- i_pController->setLastPage( sal_True );
- i_pController->getFilteredPageFile( 0, aPageFile );
+ i_pController->abortJob();
return;
}
pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LocalFileName" ) ),
@@ -596,17 +593,25 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
i_pController->jobStarted();
int nJobs = 1;
- int nRepeatCount = bUserCopy ? mnCopyCount : 1;
+ int nOuterRepeatCount = 1;
+ int nInnerRepeatCount = 1;
+ if( bUserCopy )
+ {
+ if( mbCollateCopy )
+ nOuterRepeatCount = mnCopyCount;
+ else
+ nInnerRepeatCount = mnCopyCount;
+ }
if( bSinglePrintJobs )
{
nJobs = mnCopyCount;
nCopies = 1;
- nRepeatCount = 1;
+ nOuterRepeatCount = nInnerRepeatCount = 1;
}
for( int nJobIteration = 0; nJobIteration < nJobs; nJobIteration++ )
{
- bool bError = false;
+ bool bError = false, bAborted = false;
if( mpPrinter->StartJob( pPrintFile,
i_rJobName,
Application::GetDisplayName(),
@@ -618,13 +623,26 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
mbJobActive = TRUE;
i_pController->createProgressDialog();
int nPages = i_pController->getFilteredPageCount();
- for( int nIteration = 0; nIteration < nRepeatCount; nIteration++ )
+ for( int nOuterIteration = 0; nOuterIteration < nOuterRepeatCount && ! bAborted; nOuterIteration++ )
{
- for( int nPage = 0; nPage < nPages; nPage++ )
+ for( int nPage = 0; nPage < nPages && ! bAborted; nPage++ )
{
- if( nPage == nPages-1 && nIteration == nRepeatCount-1 && nJobIteration == nJobs-1 )
- i_pController->setLastPage( sal_True );
- i_pController->printFilteredPage( nPage );
+ for( int nInnerIteration = 0; nInnerIteration < nInnerRepeatCount && ! bAborted; nInnerIteration++ )
+ {
+ if( nPage == nPages-1 &&
+ nOuterIteration == nOuterRepeatCount-1 &&
+ nInnerIteration == nInnerRepeatCount-1 &&
+ nJobIteration == nJobs-1 )
+ {
+ i_pController->setLastPage( sal_True );
+ }
+ i_pController->printFilteredPage( nPage );
+ if( i_pController->isProgressCanceled() )
+ {
+ i_pController->abortJob();
+ bAborted = true;
+ }
+ }
}
// FIXME: duplex ?
}
@@ -740,7 +758,7 @@ bool PrinterController::setupPrinter( Window* i_pParent )
return bRet;
}
-PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( const Sequence< PropertyValue >& i_rProps )
+PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( const Sequence< PropertyValue >& i_rProps, bool bNoNUP )
{
PrinterController::PageSize aPageSize;
aPageSize.aSize = mpPrinter->GetPaperSize();
@@ -775,7 +793,7 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons
if( aSetSize.Width && aSetSize.Height )
{
Size aSetPaperSize( aSetSize.Width, aSetSize.Height );
- Size aRealPaperSize( getRealPaperSize( aSetPaperSize ) );
+ Size aRealPaperSize( getRealPaperSize( aSetPaperSize, bNoNUP ) );
if( aRealPaperSize != aCurSize )
aIsSize = aSetSize;
}
@@ -785,7 +803,7 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons
aPageSize.aSize.Width() = aIsSize.Width;
aPageSize.aSize.Height() = aIsSize.Height;
- Size aRealPaperSize( getRealPaperSize( aPageSize.aSize ) );
+ Size aRealPaperSize( getRealPaperSize( aPageSize.aSize, bNoNUP ) );
if( aRealPaperSize != aCurSize )
mpPrinter->SetPaperSizeUser( aRealPaperSize, ! isFixedPageSize() );
}
@@ -851,7 +869,7 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag
mpImplData->mpPrinter->SetMapMode( aMapMode );
// modify job setup if necessary
- PrinterController::PageSize aPageSize = mpImplData->modifyJobSetup( aPageParm );
+ PrinterController::PageSize aPageSize = mpImplData->modifyJobSetup( aPageParm, true );
o_rMtf.SetPrefSize( aPageSize.aSize );
o_rMtf.SetPrefMapMode( aMapMode );
@@ -933,7 +951,7 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
rMPS.nTopMargin == 0 && rMPS.nBottomMargin == 0 )
{
PrinterController::PageSize aPageSize = getPageFile( i_nFilteredPage, o_rMtf, i_bMayUseCache );
- Size aPaperSize = mpImplData->getRealPaperSize( aPageSize.aSize );
+ Size aPaperSize = mpImplData->getRealPaperSize( aPageSize.aSize, true );
mpImplData->mpPrinter->SetMapMode( MapMode( MAP_100TH_MM ) );
mpImplData->mpPrinter->SetPaperSizeUser( aPaperSize, ! mpImplData->isFixedPageSize() );
if( aPaperSize != aPageSize.aSize )
@@ -942,7 +960,7 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
o_rMtf.WindStart();
long nDX = (aPaperSize.Width() - aPageSize.aSize.Width()) / 2;
long nDY = (aPaperSize.Height() - aPageSize.aSize.Height()) / 2;
- o_rMtf.Move( nDX, nDY );
+ o_rMtf.Move( nDX, nDY, mpImplData->mpPrinter->ImplGetDPIX(), mpImplData->mpPrinter->ImplGetDPIY() );
o_rMtf.WindStart();
o_rMtf.SetPrefSize( aPaperSize );
aPageSize.aSize = aPaperSize;
@@ -955,7 +973,7 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
sal_Bool bIsLastPage = mpImplData->mbLastPage;
mpImplData->mbLastPage = sal_False;
- Size aPaperSize( mpImplData->getRealPaperSize( mpImplData->maMultiPage.aPaperSize ) );
+ Size aPaperSize( mpImplData->getRealPaperSize( mpImplData->maMultiPage.aPaperSize, false ) );
// multi page area: page size minus margins + one time spacing right and down
// the added spacing is so each subpage can be calculated including its spacing
@@ -1017,7 +1035,7 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
long nOffY = (aSubPageSize.Height() - long(double(aPageSize.aSize.Height()) * fScale)) / 2;
long nX = rMPS.nLeftMargin + nOffX + nAdvX * nCellX;
long nY = rMPS.nTopMargin + nOffY + nAdvY * nCellY;
- aPageFile.Move( nX, nY );
+ aPageFile.Move( nX, nY, mpImplData->mpPrinter->ImplGetDPIX(), mpImplData->mpPrinter->ImplGetDPIY() );
aPageFile.WindStart();
// calculate border rectangle
Rectangle aSubPageRect( Point( nX, nY ),
@@ -1137,7 +1155,7 @@ void PrinterController::printFilteredPage( int i_nPage )
{
Point aPageOffset( mpImplData->mpPrinter->GetPageOffset() );
aPageFile.WindStart();
- aPageFile.Move( -aPageOffset.X(), -aPageOffset.Y() );
+ aPageFile.Move( -aPageOffset.X(), -aPageOffset.Y(), mpImplData->mpPrinter->ImplGetDPIX(), mpImplData->mpPrinter->ImplGetDPIY() );
}
GDIMetaFile aCleanedFile;
@@ -1169,6 +1187,13 @@ void PrinterController::jobFinished( view::PrintableState )
void PrinterController::abortJob()
{
setJobState( view::PrintableState_JOB_ABORTED );
+ // applications (well, sw) depend on a page request with "IsLastPage" = true
+ // to free resources, else they (well, sw) will crash eventually
+ setLastPage( sal_True );
+ delete mpImplData->mpProgress;
+ mpImplData->mpProgress = NULL;
+ GDIMetaFile aMtf;
+ getPageFile( 0, aMtf, false );
}
void PrinterController::setLastPage( sal_Bool i_bLastPage )
@@ -1522,6 +1547,11 @@ void PrinterController::createProgressDialog()
mpImplData->mpProgress->reset();
}
+bool PrinterController::isProgressCanceled() const
+{
+ return mpImplData->mpProgress && mpImplData->mpProgress->isCanceled();
+}
+
void PrinterController::setMultipage( const MultiPageSetup& i_rMPS )
{
mpImplData->maMultiPage = i_rMPS;
diff --git a/vcl/source/glyphs/graphite_cache.cxx b/vcl/source/glyphs/graphite_cache.cxx
index 389accd631f0..7682cdb6c8ba 100644
--- a/vcl/source/glyphs/graphite_cache.cxx
+++ b/vcl/source/glyphs/graphite_cache.cxx
@@ -36,10 +36,10 @@
#include <tools/debug.hxx>
#include <vcl/sallayout.hxx>
-#include <tools/preextstl.h>
+#include <preextstl.h>
#include <graphite/GrClient.h>
#include <graphite/Segment.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
#include <rtl/ustring.hxx>
#include <vcl/graphite_layout.hxx>
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index 9d7efc79400e..9d4d2529249d 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -67,13 +67,13 @@
#include <unicode/uscript.h>
// Graphite Libraries (must be after vcl headers on windows)
-#include <tools/preextstl.h>
+#include <preextstl.h>
#include <graphite/GrClient.h>
#include <graphite/Font.h>
#include <graphite/ITextSource.h>
#include <graphite/Segment.h>
#include <graphite/SegmentPainter.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
#include <vcl/graphite_layout.hxx>
#include <vcl/graphite_features.hxx>
@@ -594,21 +594,39 @@ bool GraphiteLayout::LayoutText(ImplLayoutArgs & rArgs)
{
#ifdef GRCACHE
GrSegRecord * pSegRecord = NULL;
- gr::Segment * pSegment = CreateSegment(rArgs, &pSegRecord);
- if (!pSegment)
- return false;
-
+ gr::Segment * pSegment = NULL;
+ // Graphite can in rare cases crash with a zero length
+ if (rArgs.mnMinCharPos < rArgs.mnEndCharPos)
+ {
+ pSegment = CreateSegment(rArgs, &pSegRecord);
+ if (!pSegment)
+ return false;
+ }
+ else
+ {
+ clear();
+ return true;
+ }
// layout the glyphs as required by OpenOffice
bool success = LayoutGlyphs(rArgs, pSegment, pSegRecord);
if (pSegRecord) pSegRecord->unlock();
else delete pSegment;
#else
- gr::Segment * pSegment = CreateSegment(rArgs);
- if (!pSegment)
- return false;
- bool success = LayoutGlyphs(rArgs, pSegment);
- delete pSegment;
+ gr::Segment * pSegment = NULL;
+ bool success = true;
+ if (rArgs.mnMinCharPos < rArgs.mnEndCharPos)
+ {
+ pSegment = CreateSegment(rArgs);
+ if (!pSegment)
+ return false;
+ success = LayoutGlyphs(rArgs, pSegment);
+ if (pSegment) delete pSegment;
+ }
+ else
+ {
+ clear();
+ }
#endif
return success;
}
@@ -659,7 +677,7 @@ public:
return hash;
};
protected:
- virtual void UniqueCacheInfo(std::wstring & stuFace, bool & fBold, bool & fItalic)
+ virtual void UniqueCacheInfo( ext_std::wstring& stuFace, bool& fBold, bool& fItalic )
{
#ifdef WIN32
dynamic_cast<GraphiteWinFont&>(mrRealFont).UniqueCacheInfo(stuFace, fBold, fItalic);
@@ -722,7 +740,7 @@ gr::Segment * GraphiteLayout::CreateSegment(ImplLayoutArgs& rArgs)
(GraphiteCacheHandler::instance).getCache(aFontHash);
if (pCache)
{
- *pSegRecord = pCache->getSegment(rArgs, bRtl, nSegCharLimit);
+ *pSegRecord = pCache->getSegment(rArgs, bRtl, limit);
if (*pSegRecord)
{
pSegment = (*pSegRecord)->getSegment();
@@ -736,7 +754,34 @@ gr::Segment * GraphiteLayout::CreateSegment(ImplLayoutArgs& rArgs)
(*pSegRecord)->clearVectors();
}
mpTextSrc->switchLayoutArgs(rArgs);
- return pSegment;
+ if (limit > rArgs.mnMinCharPos && limit == rArgs.mnEndCharPos
+ && pSegment->stopCharacter() != limit)
+ {
+ // check that the last character is not part of a ligature
+ glyph_set_range_t aGlyphSet = pSegment->charToGlyphs(limit - 1);
+ if (aGlyphSet.first == aGlyphSet.second)
+ {
+ // no glyphs associated with this glyph - occurs mid ligature
+ pSegment = NULL;
+ *pSegRecord = NULL;
+ }
+ else
+ {
+ while (aGlyphSet.first != aGlyphSet.second)
+ {
+ int lastChar = static_cast<int>((*aGlyphSet.first).lastChar());
+ if (lastChar >= limit)
+ {
+ pSegment = NULL;
+ *pSegRecord = NULL;
+ break;
+ }
+ aGlyphSet.first++;
+ }
+ }
+ }
+ if (pSegment)
+ return pSegment;
}
}
#endif
@@ -1058,7 +1103,7 @@ void GraphiteLayout::ApplyDXArray(ImplLayoutArgs &args, std::vector<int> & rDelt
{
nXOffset = args.mpDXArray[nChars - 1] - mvCharDxs[nChars - 1];
}
- int nPrevClusterGlyph = (bRtl)? mvGlyphs.size() : -1;
+ int nPrevClusterGlyph = (bRtl)? (signed)mvGlyphs.size() : -1;
int nPrevClusterLastChar = -1;
for (size_t i = 0; i < nChars; i++)
{
diff --git a/vcl/source/glyphs/graphite_textsrc.hxx b/vcl/source/glyphs/graphite_textsrc.hxx
index 3912977cc9be..388f8a631b49 100644
--- a/vcl/source/glyphs/graphite_textsrc.hxx
+++ b/vcl/source/glyphs/graphite_textsrc.hxx
@@ -59,11 +59,11 @@
#include "vcl/dllapi.h"
// Libraries
-#include <tools/preextstl.h>
+#include <preextstl.h>
#include <graphite/GrClient.h>
#include <graphite/Font.h>
#include <graphite/ITextSource.h>
-#include <tools/postextstl.h>
+#include <postextstl.h>
// Module type definitions and forward declarations.
//
diff --git a/vcl/source/src/print.src b/vcl/source/src/print.src
index 58f0a477c848..010cae338e0e 100644
--- a/vcl/source/src/print.src
+++ b/vcl/source/src/print.src
@@ -488,5 +488,6 @@ StringArray SV_PRINT_NATIVE_STRINGS
< "Page number"; >;
< "Number of pages"; >;
< "More"; >;
+ < "Print selection only"; >;
};
};
diff --git a/vcl/source/window/dndevdis.cxx b/vcl/source/window/dndevdis.cxx
index efc49be6fbf8..e4d5a8c4c0eb 100644
--- a/vcl/source/window/dndevdis.cxx
+++ b/vcl/source/window/dndevdis.cxx
@@ -28,8 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <dndevdis.hxx>
-#include <dndlcon.hxx>
+#include <vcl/dndevdis.hxx>
+#include <vcl/dndlcon.hxx>
#include <vcl/window.h>
#include <vos/mutex.hxx>
diff --git a/vcl/source/window/dndlcon.cxx b/vcl/source/window/dndlcon.cxx
index c5d78dd6bae3..07819e76f957 100644
--- a/vcl/source/window/dndlcon.cxx
+++ b/vcl/source/window/dndlcon.cxx
@@ -28,7 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include<dndlcon.hxx>
+#include <vcl/dndlcon.hxx>
using namespace ::cppu;
using namespace ::com::sun::star::uno;
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 81676eba3be4..e77eacb2fddf 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -3722,7 +3722,7 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM
if ( GetItemCount() )
{
SalMenu* pMenu = ImplGetSalMenu();
- if( pMenu && pMenu->ShowNativePopupMenu( pWin, aRect, nPopupModeFlags | FLOATWIN_POPUPMODE_GRABFOCUS ) )
+ if( pMenu && bRealExecute && pMenu->ShowNativePopupMenu( pWin, aRect, nPopupModeFlags | FLOATWIN_POPUPMODE_GRABFOCUS ) )
{
pWin->StopExecute(0);
pWin->doShutdown();
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 4490bfb3dbeb..a0be94674328 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -498,8 +498,10 @@ void PrintDialog::NUpTabPage::showAdvancedControls( bool i_bShow )
void PrintDialog::NUpTabPage::setupLayout()
{
- Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) );
- long nIndent = 3*aBorder.Width();
+ Size aBorder( LogicToPixel( Size( 6, 6 ), MapMode( MAP_APPFONT ) ) );
+ /* According to OOo style guide, the horizontal indentation of child
+ elements to their parent element should always be 6 map units. */
+ long nIndent = aBorder.Width();
maLayout.setParentWindow( this );
maLayout.setOuterBorder( aBorder.Width() );
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 689c56cbe619..62fbe2e507f3 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -49,7 +49,8 @@
// =======================================================================
-// Achtung: Darf keine Objekte enthalten, da mit memmove/memcpy gearbeitet wird
+// Attention: Must not contain non-PODs because array is enlarged/copied
+// with the use of memmove/memcpy.
struct ImplSplitItem
{
long mnSize;
@@ -71,6 +72,10 @@ struct ImplSplitItem
SplitWindowItemBits mnBits;
BOOL mbFixed;
BOOL mbSubSize;
+ /// Minimal width or height of the item. -1 means no restriction.
+ long mnMinSize;
+ /// Maximal width or height of the item. -1 means no restriction.
+ long mnMaxSize;
};
struct ImplSplitSet
@@ -85,6 +90,28 @@ struct ImplSplitSet
BOOL mbCalcPix;
};
+
+
+/** Check whether the given size is inside the valid range defined by
+ [rItem.mnMinSize,rItem.mnMaxSize]. When it is not inside it then return
+ the upper or lower bound, respectively. Otherwise return the given size
+ unmodified.
+ Note that either mnMinSize and/or mnMaxSize can be -1 in which case the
+ size has not lower or upper bound.
+*/
+namespace {
+ long ValidateSize (const long nSize, const ImplSplitItem rItem)
+ {
+ if (rItem.mnMinSize>=0 && nSize<rItem.mnMinSize)
+ return rItem.mnMinSize;
+ else if (rItem.mnMaxSize>0 && nSize>rItem.mnMaxSize)
+ return rItem.mnMaxSize;
+ else
+ return nSize;
+ }
+}
+
+
#define SPLITWIN_SPLITSIZE 3
#define SPLITWIN_SPLITSIZEEX 4
#define SPLITWIN_SPLITSIZEEXLN 6
@@ -2850,7 +2877,7 @@ void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize,
DBG_ASSERT( !ImplFindItem( mpMainSet, nId, nDbgDummy ), "SplitWindow::InsertItem() - Id already exists" );
#endif
- // Size muss min. 1 sein
+ // Size has to be at least 1.
if ( nSize < 1 )
nSize = 1;
@@ -2858,7 +2885,7 @@ void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize,
ImplSplitSet* pNewSet;
ImplSplitItem* pItem;
- // Platz fuer neues Item schaffen
+ // Make room for the new item.
if ( nPos > pSet->mnItems )
nPos = pSet->mnItems;
ImplSplitItem* pNewItems = new ImplSplitItem[pSet->mnItems+1];
@@ -2871,19 +2898,21 @@ void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize,
pSet->mnItems++;
pSet->mbCalcPix = TRUE;
- // Item anlegen und erweitern
+ // Create and initialize item.
pItem = &(pSet->mpItems[nPos]);
memset( pItem, 0, sizeof( ImplSplitItem ) );
pItem->mnSize = nSize;
pItem->mnId = nId;
pItem->mnBits = nBits;
+ pItem->mnMinSize=-1;
+ pItem->mnMaxSize=-1;
if ( pWindow )
{
pItem->mpWindow = pWindow;
pItem->mpOrgParent = pWindow->GetParent();
- // Window mit SplitWindow verbinden
+ // Attach window to SplitWindow.
pWindow->Hide();
pWindow->SetParent( this );
}
@@ -3251,6 +3280,10 @@ void SplitWindow::SplitItem( USHORT nId, long nNewSize,
nItems = pSet->mnItems;
pItems = pSet->mpItems;
+ // When there is an explicit minimum or maximum size then move nNewSize
+ // into that range (when it is not yet already in it.)
+ nNewSize = ValidateSize(nNewSize, pItems[nPos]);
+
if ( mbCalc )
{
pItems[nPos].mnSize = nNewSize;
@@ -3552,6 +3585,36 @@ long SplitWindow::GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const
return 0;
}
+
+
+
+void SplitWindow::SetItemSizeRange (USHORT nId, const Range aRange)
+{
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem(mpBaseSet, nId, nPos);
+
+ if (pSet != NULL)
+ {
+ pSet->mpItems[nPos].mnMinSize = aRange.Min();
+ pSet->mpItems[nPos].mnMaxSize = aRange.Max();
+ }
+}
+
+
+
+
+Range SplitWindow::GetItemSizeRange (USHORT nId) const
+{
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem(mpBaseSet, nId, nPos);
+
+ if (pSet != NULL)
+ return Range (pSet->mpItems[nPos].mnMinSize, pSet->mpItems[nPos].mnMaxSize);
+ else
+ return Range(-1,-1);
+}
+
+
// -----------------------------------------------------------------------
void SplitWindow::SetItemBits( USHORT nId, SplitWindowItemBits nNewBits )
diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx
index c09dc464b809..1adabe487492 100644
--- a/vcl/source/window/taskpanelist.cxx
+++ b/vcl/source/window/taskpanelist.cxx
@@ -206,7 +206,7 @@ BOOL TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent )
BOOL bFocusInList = FALSE;
KeyCode aKeyCode = aKeyEvent.GetKeyCode();
BOOL bForward = !aKeyCode.IsShift();
- if( aKeyCode.GetCode() == KEY_F6 ) // F6
+ if( aKeyCode.GetCode() == KEY_F6 && ! aKeyCode.IsMod2() ) // F6
{
bSplitterOnly = aKeyCode.IsMod1() && aKeyCode.IsShift();
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 35641ab8d6f9..adedbde4c0f2 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -88,8 +88,8 @@
#include "vcl/dialog.hxx"
#include "vcl/unowrap.hxx"
-#include "dndlcon.hxx"
-#include "dndevdis.hxx"
+#include "vcl/dndlcon.hxx"
+#include "vcl/dndevdis.hxx"
#include "vcl/impbmpconv.hxx"
#include "unotools/confignode.hxx"
#include "vcl/gdimtf.hxx"
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 7b0512a1320b..c964ad0d739b 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -62,7 +62,7 @@
#include <vcl/salgdi.hxx>
#include <vcl/menu.hxx>
-#include <dndlcon.hxx>
+#include <vcl/dndlcon.hxx>
#include <com/sun/star/datatransfer/dnd/XDragSource.hpp>
#include <com/sun/star/awt/MouseEvent.hpp>
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index 13492f3d4a5c..ad33cdf67de6 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -77,11 +77,10 @@ atk_wrapper_focus_idle_handler (gpointer data)
uno::Reference< accessibility::XAccessible > xAccessible = xNextFocusObject;
if( xAccessible.get() == reinterpret_cast < accessibility::XAccessible * > (data) )
{
+ AtkObject *atk_obj = xAccessible.is() ? atk_object_wrapper_ref( xAccessible ) : NULL;
// Gail does not notify focus changes to NULL, so do we ..
- if( xAccessible.is() )
+ if( atk_obj )
{
- AtkObject *atk_obj = atk_object_wrapper_ref( xAccessible );
-
#ifdef ENABLE_TRACING
fprintf(stderr, "notifying focus event for %p\n", atk_obj);
#endif
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 1f1c469bf9a1..322530b881cc 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -489,6 +489,7 @@ class GtkXLib : public SalXLib
GSource *m_pUserEvent;
oslMutex m_aDispatchMutex;
oslCondition m_aDispatchCondition;
+ XIOErrorHandler m_aOrigGTKXIOErrorHandler;
public:
static gboolean timeoutFn(gpointer data);
@@ -522,6 +523,7 @@ GtkXLib::GtkXLib()
m_pUserEvent = NULL;
m_aDispatchCondition = osl_createCondition();
m_aDispatchMutex = osl_createMutex();
+ m_aOrigGTKXIOErrorHandler = NULL;
}
GtkXLib::~GtkXLib()
@@ -535,6 +537,9 @@ GtkXLib::~GtkXLib()
osl_setCondition( m_aDispatchCondition );
osl_destroyCondition( m_aDispatchCondition );
osl_destroyMutex( m_aDispatchMutex );
+
+ PopXErrorLevel();
+ XSetIOErrorHandler (m_aOrigGTKXIOErrorHandler);
}
void GtkXLib::Init()
@@ -596,6 +601,10 @@ void GtkXLib::Init()
// init gtk/gdk
gtk_init_check( &nParams, &pCmdLineAry );
+ //gtk_init_check sets XError/XIOError handlers, we want our own one
+ m_aOrigGTKXIOErrorHandler = XSetIOErrorHandler ( (XIOErrorHandler)X11SalData::XIOErrorHdl );
+ PushXErrorLevel( !!getenv( "SAL_IGNOREXERRORS" ) );
+
for (i = 0; i < nParams; i++ )
g_free( pCmdLineAry[i] );
delete [] pCmdLineAry;
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 68617c8c16be..faedc7e5e600 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -76,7 +76,7 @@ void GtkHookedYieldMutex::ThreadsLeave()
#if OSL_DEBUG_LEVEL > 1
if( mnThreadId &&
- mnThreadId != NAMESPACE_VOS(OThread)::getCurrentIdentifier())
+ mnThreadId != vos::OThread::getCurrentIdentifier())
fprintf( stderr, "\n\n--- A different thread owns the mutex ...---\n\n\n");
#endif
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 9d3ce6b137cd..b8a3ac773a8f 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -732,12 +732,6 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
const ImplControlValue& aValue,
const OUString& rCaption )
{
- if( (nType==CTRL_CHECKBOX) && (nPart==PART_ENTIRE_CONTROL) &&
- aValue.getTristateVal() == BUTTONVALUE_MIXED )
- {
- return drawNativeMixedStateCheck( nType, nPart, rControlRegion, nState, aValue, rCaption );
- }
-
BOOL returnVal = FALSE;
// get a GC with current clipping region set
SelectFont();
@@ -895,55 +889,6 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
return( returnVal );
}
-BOOL GtkSalGraphics::drawNativeMixedStateCheck( ControlType nType,
- ControlPart nPart,
- const Rectangle& rControlRegion,
- ControlState nState,
- const ImplControlValue& aValue,
- const OUString& rCaption )
-{
- // need to emulate something for mixed state
-
- // do this via pixmap since some themes don't care for regions
- bool bOldNeedPixmapPaint = bNeedPixmapPaint;
- bNeedPixmapPaint = true;
-
- Rectangle aCtrlRect = rControlRegion;
- BOOL returnVal = FALSE;
- SelectFont();
-
- // draw upper half in off state
- const_cast<ImplControlValue&>(aValue).setTristateVal( BUTTONVALUE_OFF );
- XLIB_Region aRegion = XCreateRegion();
- XRectangle aXRect = { aCtrlRect.Left(), aCtrlRect.Top(), aCtrlRect.GetWidth(), aCtrlRect.GetHeight() };
- const unsigned short nH = aXRect.height/2;
- aXRect.height -= nH;
- XUnionRectWithRegion( &aXRect, aRegion, aRegion );
- SetClipRegion( pFontGC_, aRegion );
- XDestroyRegion( aRegion );
-
- returnVal = drawNativeControl( nType, nPart, rControlRegion, nState, aValue, rCaption );
-
- if( returnVal )
- {
- // draw lower half in on state
- const_cast<ImplControlValue&>(aValue).setTristateVal( BUTTONVALUE_ON );
- aXRect.y += nH;
- aRegion = XCreateRegion();
- XUnionRectWithRegion( &aXRect, aRegion, aRegion );
- SetClipRegion( pFontGC_, aRegion );
- XDestroyRegion( aRegion );
- returnVal = drawNativeControl( nType, nPart, rControlRegion, nState, aValue, rCaption );
- }
-
- // clean up
- bNeedPixmapPaint = bOldNeedPixmapPaint;
- const_cast<ImplControlValue&>(aValue).setTristateVal( BUTTONVALUE_MIXED );
- SetClipRegion( pFontGC_ );
- return returnVal;
-}
-
-
/*
* DrawNativeControlText()
*
@@ -1378,7 +1323,8 @@ BOOL GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable,
{
GtkStateType stateType;
GtkShadowType shadowType;
- BOOL isChecked = (aValue.getTristateVal()==BUTTONVALUE_ON) ? TRUE : FALSE;
+ bool isChecked = (aValue.getTristateVal() == BUTTONVALUE_ON);
+ bool isInconsistent = (aValue.getTristateVal() == BUTTONVALUE_MIXED);
GdkRectangle clipRect;
gint x,y;
@@ -1393,7 +1339,7 @@ BOOL GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable,
y = rControlRectangle.Top() + (rControlRectangle.GetHeight()-indicator_size)/2;
// Set the shadow based on if checked or not so we get a checkmark.
- shadowType = isChecked ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
+ shadowType = isChecked ? GTK_SHADOW_IN : isInconsistent ? GTK_SHADOW_ETCHED_IN : GTK_SHADOW_OUT;
NWSetWidgetState( gWidgetData[m_nScreen].gCheckWidget, nState, stateType );
GTK_TOGGLE_BUTTON(gWidgetData[m_nScreen].gCheckWidget)->active = isChecked;
@@ -2291,11 +2237,10 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
const ImplControlValue& aValue,
const OUString& )
{
- OSL_ASSERT( aValue.getType() == CTRL_TAB_ITEM );
+ OSL_ASSERT( nType != CTRL_TAB_ITEM || aValue.getType() == CTRL_TAB_ITEM );
GdkPixmap * pixmap;
Rectangle pixmapRect;
Rectangle tabRect;
- const TabitemValue * pTabitemValue = static_cast<const TabitemValue *>(&aValue);
GtkStateType stateType;
GtkShadowType shadowType;
if( ! gWidgetData[ m_nScreen ].gCacheTabItems )
@@ -2311,9 +2256,8 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
if( !aCachePage.GetSize() )
aCachePage.SetSize( 1 );
- if ( !pTabitemValue && (nType==CTRL_TAB_ITEM) )
+ if ( (nType == CTRL_TAB_ITEM) && (aValue.getType() != CTRL_TAB_ITEM) )
{
- std::fprintf( stderr, "NWPaintGTKTabItem() received a NULL TabitemValue. Cannot draw native tab\n" );
return( false );
}
@@ -2326,6 +2270,7 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
pixmapRect = rControlRectangle;
if ( nType == CTRL_TAB_ITEM )
{
+ const TabitemValue * pTabitemValue = static_cast<const TabitemValue *>(&aValue);
if ( !pTabitemValue->isFirst() )
{
// GTK+ tabs overlap on the right edge (the top tab obscures the
@@ -2534,7 +2479,6 @@ BOOL GtkSalGraphics::NWPaintGTKToolbar(
gint g_x=0, g_y=0, g_w=10, g_h=10;
bool bPaintButton = true;
GtkWidget* pButtonWidget = gWidgetData[m_nScreen].gToolbarButtonWidget;
- const gchar* pButtonDetail = "button";
GdkRectangle clipRect;
NWEnsureGTKToolbar( m_nScreen );
@@ -2593,13 +2537,18 @@ BOOL GtkSalGraphics::NWPaintGTKToolbar(
{
pButtonWidget = gWidgetData[m_nScreen].gToolbarToggleWidget;
shadowType = GTK_SHADOW_IN;
+ stateType = GTK_STATE_ACTIVE;
// special case stateType value for depressed toggle buttons
// cf. gtk+/gtk/gtktogglebutton.c (gtk_toggle_button_update_state)
- if( ! (nState & (CTRL_STATE_PRESSED|CTRL_STATE_ROLLOVER)) )
- stateType = GTK_STATE_ACTIVE;
- pButtonDetail = "togglebutton";
+ if( (nState & (CTRL_STATE_ROLLOVER|CTRL_STATE_PRESSED)) )
+ {
+ stateType = GTK_STATE_PRELIGHT;
+ shadowType = GTK_SHADOW_OUT;
+ }
bPaintButton = true;
}
+ else
+ stateType = GTK_STATE_PRELIGHT; // only for bPaintButton = true, in which case always rollver is meant
NWSetWidgetState( pButtonWidget, nState, stateType );
gtk_widget_ensure_style( pButtonWidget );
@@ -2657,7 +2606,7 @@ BOOL GtkSalGraphics::NWPaintGTKToolbar(
stateType,
shadowType,
&clipRect,
- pButtonWidget, pButtonDetail, x, y, w, h );
+ pButtonWidget, "button", x, y, w, h );
}
}
}
diff --git a/vcl/unx/headless/svpinst.cxx b/vcl/unx/headless/svpinst.cxx
index 466b56868900..5c3be54f9ddc 100644
--- a/vcl/unx/headless/svpinst.cxx
+++ b/vcl/unx/headless/svpinst.cxx
@@ -302,7 +302,7 @@ vos::IMutex* SvpSalInstance::GetYieldMutex()
ULONG SvpSalInstance::ReleaseYieldMutex()
{
if ( m_aYieldMutex.GetThreadId() ==
- NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+ vos::OThread::getCurrentIdentifier() )
{
ULONG nCount = m_aYieldMutex.GetAcquireCount();
ULONG n = nCount;
@@ -464,13 +464,13 @@ SvpSalYieldMutex::SvpSalYieldMutex()
void SvpSalYieldMutex::acquire()
{
OMutex::acquire();
- mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier();
+ mnThreadId = vos::OThread::getCurrentIdentifier();
mnCount++;
}
void SvpSalYieldMutex::release()
{
- if ( mnThreadId == NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+ if ( mnThreadId == vos::OThread::getCurrentIdentifier() )
{
if ( mnCount == 1 )
mnThreadId = 0;
@@ -483,7 +483,7 @@ sal_Bool SvpSalYieldMutex::tryToAcquire()
{
if ( OMutex::tryToAcquire() )
{
- mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier();
+ mnThreadId = vos::OThread::getCurrentIdentifier();
mnCount++;
return sal_True;
}
diff --git a/vcl/unx/headless/svpinst.hxx b/vcl/unx/headless/svpinst.hxx
index 284a2d11cd82..d931a2735ff9 100644
--- a/vcl/unx/headless/svpinst.hxx
+++ b/vcl/unx/headless/svpinst.hxx
@@ -46,11 +46,11 @@
// SalYieldMutex
// -------------------------------------------------------------------------
-class SvpSalYieldMutex : public NAMESPACE_VOS(OMutex)
+class SvpSalYieldMutex : public vos::OMutex
{
protected:
ULONG mnCount;
- NAMESPACE_VOS(OThread)::TThreadIdentifier mnThreadId;
+ vos::OThread::TThreadIdentifier mnThreadId;
public:
SvpSalYieldMutex();
@@ -60,7 +60,7 @@ public:
virtual sal_Bool tryToAcquire();
ULONG GetAcquireCount() const { return mnCount; }
- NAMESPACE_VOS(OThread)::TThreadIdentifier GetThreadId() const { return mnThreadId; }
+ vos::OThread::TThreadIdentifier GetThreadId() const { return mnThreadId; }
};
// ---------------
diff --git a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx b/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
index 7544a566d8ae..38c79b3e11df 100644
--- a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
@@ -178,10 +178,6 @@ protected:
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
-
- BOOL drawNativeMixedStateCheck( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
- ControlState nState, const ImplControlValue& aValue,
- const rtl::OUString& rCaption );
};
#endif // _VCL_GTKGDI_HXX
diff --git a/vcl/unx/inc/saldata.hxx b/vcl/unx/inc/saldata.hxx
index 7e38e0a89bf2..939437060750 100644
--- a/vcl/unx/inc/saldata.hxx
+++ b/vcl/unx/inc/saldata.hxx
@@ -63,6 +63,7 @@ protected:
SalDisplay *m_pSalDisplay;
pthread_t hMainThread_;
rtl::OUString maLocalHostName;
+ rtl::OUString maUnicodeAccumulator;
public:
X11SalData();
@@ -90,6 +91,7 @@ public:
const rtl::OUString& GetLocalHostName() const
{ return maLocalHostName; }
+ rtl::OUString& GetUnicodeAccumulator() { return maUnicodeAccumulator; }
static int XErrorHdl( Display*, XErrorEvent* );
static int XIOErrorHdl( Display* );
diff --git a/vcl/unx/inc/salframe.h b/vcl/unx/inc/salframe.h
index ed173e61fe61..9786bac76f35 100644
--- a/vcl/unx/inc/salframe.h
+++ b/vcl/unx/inc/salframe.h
@@ -208,6 +208,10 @@ public:
bool isMapped() const { return bMapped_; }
bool hasFocus() const { return mbInputFocus; }
+ void beginUnicodeSequence();
+ bool appendUnicodeSequence( sal_Unicode );
+ bool endUnicodeSequence();
+
virtual SalGraphics* GetGraphics();
virtual void ReleaseGraphics( SalGraphics* pGraphics );
diff --git a/vcl/unx/inc/salinst.h b/vcl/unx/inc/salinst.h
index d73d67f81425..8f4719f098f0 100644
--- a/vcl/unx/inc/salinst.h
+++ b/vcl/unx/inc/salinst.h
@@ -39,11 +39,11 @@
#include <vcl/dllapi.h>
#include <vcl/salinst.hxx>
-class VCL_DLLPUBLIC SalYieldMutex : public NAMESPACE_VOS(OMutex)
+class VCL_DLLPUBLIC SalYieldMutex : public vos::OMutex
{
protected:
ULONG mnCount;
- NAMESPACE_VOS(OThread)::TThreadIdentifier mnThreadId;
+ vos::OThread::TThreadIdentifier mnThreadId;
public:
SalYieldMutex();
@@ -53,7 +53,7 @@ public:
virtual sal_Bool tryToAcquire();
ULONG GetAcquireCount() const { return mnCount; }
- NAMESPACE_VOS(OThread)::TThreadIdentifier GetThreadId() const { return mnThreadId; }
+ vos::OThread::TThreadIdentifier GetThreadId() const { return mnThreadId; }
};
// -=-= SalInstanceData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index 13a0d1093c8e..acf8c91ab5db 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -2255,7 +2255,7 @@ void SalX11Display::Yield()
XEvent aEvent;
DBG_ASSERT( static_cast<SalYieldMutex*>(GetSalData()->m_pInstance->GetYieldMutex())->GetThreadId() ==
- NAMESPACE_VOS(OThread)::getCurrentIdentifier(),
+ vos::OThread::getCurrentIdentifier(),
"will crash soon since solar mutex not locked in SalDisplay::Yield" );
XNextEvent( pDisp_, &aEvent );
diff --git a/vcl/unx/source/app/salinst.cxx b/vcl/unx/source/app/salinst.cxx
index 8a8db44cefcd..49a9cceb8617 100644
--- a/vcl/unx/source/app/salinst.cxx
+++ b/vcl/unx/source/app/salinst.cxx
@@ -66,13 +66,13 @@ SalYieldMutex::SalYieldMutex()
void SalYieldMutex::acquire()
{
OMutex::acquire();
- mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier();
+ mnThreadId = vos::OThread::getCurrentIdentifier();
mnCount++;
}
void SalYieldMutex::release()
{
- if ( mnThreadId == NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+ if ( mnThreadId == vos::OThread::getCurrentIdentifier() )
{
if ( mnCount == 1 )
mnThreadId = 0;
@@ -85,7 +85,7 @@ sal_Bool SalYieldMutex::tryToAcquire()
{
if ( OMutex::tryToAcquire() )
{
- mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier();
+ mnThreadId = vos::OThread::getCurrentIdentifier();
mnCount++;
return True;
}
@@ -231,7 +231,7 @@ ULONG X11SalInstance::ReleaseYieldMutex()
{
SalYieldMutex* pYieldMutex = mpSalYieldMutex;
if ( pYieldMutex->GetThreadId() ==
- NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+ vos::OThread::getCurrentIdentifier() )
{
ULONG nCount = pYieldMutex->GetAcquireCount();
ULONG n = nCount;
diff --git a/vcl/unx/source/dtrans/X11_selection.cxx b/vcl/unx/source/dtrans/X11_selection.cxx
index 7f205407b21b..403ee9707a94 100644
--- a/vcl/unx/source/dtrans/X11_selection.cxx
+++ b/vcl/unx/source/dtrans/X11_selection.cxx
@@ -28,15 +28,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+#include "saldisp.hxx"
+#include "saldata.hxx"
+
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
+
#include "tools/prex.h"
#include <X11/Xatom.h>
#include <X11/keysym.h>
-#include <X11/Xlib.h>
-#include <X11/X.h>
#include <X11/Xutil.h>
#include "tools/postx.h"
#if defined(LINUX) || defined(NETBSD) || defined (FREEBSD)
@@ -3259,6 +3261,8 @@ void SelectionManager::startDrag(
return;
}
+ SalFrame* pCaptureFrame = NULL;
+
{
ClearableMutexGuard aGuard(m_aMutex);
@@ -3327,6 +3331,32 @@ void SelectionManager::startDrag(
None,
None,
CurrentTime );
+ /* if we could not grab the pointer here, there is a chance
+ that the pointer is grabbed by the other vcl display (the main loop)
+ so let's break that grab an reset it later
+
+ remark: this whole code should really be molten into normal vcl so only
+ one display is used ....
+ */
+ if( nPointerGrabSuccess != GrabSuccess )
+ {
+ vos::IMutex& rSolarMutex( Application::GetSolarMutex() );
+ if( rSolarMutex.tryToAcquire() )
+ {
+ pCaptureFrame = GetX11SalData()->GetDisplay()->GetCaptureFrame();
+ if( pCaptureFrame )
+ {
+ GetX11SalData()->GetDisplay()->CaptureMouse( NULL );
+ nPointerGrabSuccess =
+ XGrabPointer( m_pDisplay, it->second.m_aRootWindow, True,
+ DRAG_EVENT_MASK,
+ GrabModeAsync, GrabModeAsync,
+ None,
+ None,
+ CurrentTime );
+ }
+ }
+ }
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "%d\n", nPointerGrabSuccess );
#endif
@@ -3349,6 +3379,16 @@ void SelectionManager::startDrag(
aGuard.clear();
if( listener.is() )
listener->dragDropEnd( aDragFailedEvent );
+ if( pCaptureFrame )
+ {
+ vos::IMutex& rSolarMutex( Application::GetSolarMutex() );
+ if( rSolarMutex.tryToAcquire() )
+ GetX11SalData()->GetDisplay()->CaptureMouse( pCaptureFrame );
+#if OSL_DEBUG_LEVEL > 0
+ else
+ OSL_ENSURE( 0, "failed to acquire SolarMutex to reset capture frame" );
+#endif
+ }
return;
}
@@ -3428,6 +3468,17 @@ void SelectionManager::startDrag(
XUngrabKeyboard( m_pDisplay, CurrentTime );
XFlush( m_pDisplay );
+ if( pCaptureFrame )
+ {
+ vos::IMutex& rSolarMutex( Application::GetSolarMutex() );
+ if( rSolarMutex.tryToAcquire() )
+ GetX11SalData()->GetDisplay()->CaptureMouse( pCaptureFrame );
+#if OSL_DEBUG_LEVEL > 0
+ else
+ OSL_ENSURE( 0, "failed to acquire SolarMutex to reset capture frame" );
+#endif
+ }
+
m_aDragRunning.reset();
if( listener.is() )
@@ -3915,6 +3966,18 @@ void SelectionManager::deregisterHandler( Atom selection )
// ------------------------------------------------------------------------
+static bool bWasError = false;
+
+extern "C"
+{
+ int local_xerror_handler(Display* , XErrorEvent*)
+ {
+ bWasError = true;
+ return 0;
+ }
+ typedef int(*xerror_hdl_t)(Display*,XErrorEvent*);
+}
+
void SelectionManager::registerDropTarget( XLIB_Window aWindow, DropTarget* pTarget )
{
MutexGuard aGuard(m_aMutex);
@@ -3926,18 +3989,31 @@ void SelectionManager::registerDropTarget( XLIB_Window aWindow, DropTarget* pTar
OSL_ASSERT( "attempt to register window as drop target twice" );
else if( aWindow && m_pDisplay )
{
- XSelectInput( m_pDisplay, aWindow, PropertyChangeMask );
-
- // set XdndAware
- XChangeProperty( m_pDisplay, aWindow, m_nXdndAware, XA_ATOM, 32, PropModeReplace, (unsigned char*)&nXdndProtocolRevision, 1 );
-
DropTargetEntry aEntry( pTarget );
- // get root window of window (in 99.999% of all cases this will be
- // DefaultRootWindow( m_pDisplay )
- int x, y;
- unsigned int w, h, bw, d;
- XGetGeometry( m_pDisplay, aWindow, &aEntry.m_aRootWindow,
- &x, &y, &w, &h, &bw, &d );
+ bWasError=false;
+ /* #i100000# ugly workaround: gtk sets its own XErrorHandler which is not suitable for us
+ unfortunately XErrorHandler is not per display, so this is just and ugly hack
+ Need to remove separate display and integrate clipboard/dnd into vcl's unx code ASAP
+ */
+ xerror_hdl_t pOldHandler = XSetErrorHandler( local_xerror_handler );
+ XSelectInput( m_pDisplay, aWindow, PropertyChangeMask );
+ if( ! bWasError )
+ {
+ // set XdndAware
+ XChangeProperty( m_pDisplay, aWindow, m_nXdndAware, XA_ATOM, 32, PropModeReplace, (unsigned char*)&nXdndProtocolRevision, 1 );
+ if( ! bWasError )
+ {
+ // get root window of window (in 99.999% of all cases this will be
+ // DefaultRootWindow( m_pDisplay )
+ int x, y;
+ unsigned int w, h, bw, d;
+ XGetGeometry( m_pDisplay, aWindow, &aEntry.m_aRootWindow,
+ &x, &y, &w, &h, &bw, &d );
+ }
+ }
+ XSetErrorHandler( pOldHandler );
+ if(bWasError)
+ return;
m_aDropTargets[ aWindow ] = aEntry;
}
else
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx
index ae21c3aa9f7b..9215f2e25b16 100644
--- a/vcl/unx/source/gdi/salgdi.cxx
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -1127,6 +1127,8 @@ bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPoly
basegfx::B2DTrapezoidVector aB2DTrapVector;
basegfx::tools::trapezoidSubdivide( aB2DTrapVector, aPolyPoly );
const int nTrapCount = aB2DTrapVector.size();
+ if( !nTrapCount )
+ return true;
const bool bDrawn = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency );
return bDrawn;
}
@@ -1238,12 +1240,17 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, double
basegfx::tools::createLineTrapezoidFromB2DPolygon( aB2DTrapVector, aPolygon, rLineWidth.getX() );
// draw tesselation result
- const int nTrapCount = aB2DTrapVector.size();
- const bool bDrawOk = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency );
+ if( ! aB2DTrapVector.empty() )
+ {
+ const int nTrapCount = aB2DTrapVector.size();
+ const bool bDrawOk = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency );
- // restore the original brush GC
- nBrushColor_ = aKeepBrushColor;
- return bDrawOk;
+ // restore the original brush GC
+ nBrushColor_ = aKeepBrushColor;
+ return bDrawOk;
+ }
+ else
+ return true;
}
// get the area polygon for the line polygon
diff --git a/vcl/unx/source/window/salframe.cxx b/vcl/unx/source/window/salframe.cxx
index b0248662a2a2..9934277302e1 100644
--- a/vcl/unx/source/window/salframe.cxx
+++ b/vcl/unx/source/window/salframe.cxx
@@ -3144,6 +3144,100 @@ GetAlternateKeyCode( const USHORT nKeyCode )
return aAlternate;
}
+void X11SalFrame::beginUnicodeSequence()
+{
+ rtl::OUString& rSeq( GetX11SalData()->GetUnicodeAccumulator() );
+ DeletionListener aDeleteWatch( this );
+
+ if( rSeq.getLength() )
+ endUnicodeSequence();
+
+ rSeq = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "u" ) );
+
+ if( ! aDeleteWatch.isDeleted() )
+ {
+ USHORT nTextAttr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE;
+ SalExtTextInputEvent aEv;
+ aEv.mnTime = 0;
+ aEv.maText = rSeq;
+ aEv.mpTextAttr = &nTextAttr;
+ aEv.mnCursorPos = 0;
+ aEv.mnDeltaStart = 0;
+ aEv.mnCursorFlags = 0;
+ aEv.mbOnlyCursor = FALSE;
+
+ CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aEv);
+ }
+}
+
+bool X11SalFrame::appendUnicodeSequence( sal_Unicode c )
+{
+ bool bRet = false;
+ rtl::OUString& rSeq( GetX11SalData()->GetUnicodeAccumulator() );
+ if( rSeq.getLength() > 0 )
+ {
+ // range check
+ if( (c >= sal_Unicode('0') && c <= sal_Unicode('9')) ||
+ (c >= sal_Unicode('a') && c <= sal_Unicode('f')) ||
+ (c >= sal_Unicode('A') && c <= sal_Unicode('F')) )
+ {
+ rtl::OUStringBuffer aBuf( rSeq.getLength() + 1 );
+ aBuf.append( rSeq );
+ aBuf.append( c );
+ rSeq = aBuf.makeStringAndClear();
+ std::vector<USHORT> attribs( rSeq.getLength(), SAL_EXTTEXTINPUT_ATTR_UNDERLINE );
+
+ SalExtTextInputEvent aEv;
+ aEv.mnTime = 0;
+ aEv.maText = rSeq;
+ aEv.mpTextAttr = &attribs[0];
+ aEv.mnCursorPos = 0;
+ aEv.mnDeltaStart = 0;
+ aEv.mnCursorFlags = 0;
+ aEv.mbOnlyCursor = FALSE;
+
+ CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aEv);
+ bRet = true;
+ }
+ else
+ bRet = endUnicodeSequence();
+ }
+ else
+ endUnicodeSequence();
+ return bRet;
+}
+
+bool X11SalFrame::endUnicodeSequence()
+{
+ rtl::OUString& rSeq( GetX11SalData()->GetUnicodeAccumulator() );
+
+ DeletionListener aDeleteWatch( this );
+ if( rSeq.getLength() > 1 && rSeq.getLength() < 6 )
+ {
+ // cut the "u"
+ rtl::OUString aNumbers( rSeq.copy( 1 ) );
+ sal_Int32 nValue = aNumbers.toInt32( 16 );
+ if( nValue >= 32 )
+ {
+ USHORT nTextAttr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE;
+ SalExtTextInputEvent aEv;
+ aEv.mnTime = 0;
+ aEv.maText = rtl::OUString( sal_Unicode(nValue) );
+ aEv.mpTextAttr = &nTextAttr;
+ aEv.mnCursorPos = 0;
+ aEv.mnDeltaStart = 0;
+ aEv.mnCursorFlags = 0;
+ aEv.mbOnlyCursor = FALSE;
+ CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aEv);
+ }
+ }
+ bool bWasInput = rSeq.getLength() > 0;
+ rSeq = rtl::OUString();
+ if( bWasInput && ! aDeleteWatch.isDeleted() )
+ CallCallback(SALEVENT_ENDEXTTEXTINPUT, NULL);
+ return bWasInput;
+}
+
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
{
@@ -3189,6 +3283,9 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
if( pEvent->state & Mod1Mask )
nModCode |= KEY_MOD2;
+ if( nModCode != (KEY_SHIFT|KEY_MOD1) )
+ endUnicodeSequence();
+
if( nKeySym == XK_Shift_L || nKeySym == XK_Shift_R
|| nKeySym == XK_Control_L || nKeySym == XK_Control_R
|| nKeySym == XK_Alt_L || nKeySym == XK_Alt_R
@@ -3312,6 +3409,33 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
if( !nKeyCode && !nLen && !nKeyString)
return 0;
+ DeletionListener aDeleteWatch( this );
+
+ if( nModCode == (KEY_SHIFT | KEY_MOD1) && pEvent->type == XLIB_KeyPress )
+ {
+ USHORT nSeqKeyCode = pDisplay_->GetKeyCode( nUnmodifiedKeySym, &aDummy );
+ if( nSeqKeyCode == KEY_U )
+ {
+ beginUnicodeSequence();
+ return 1;
+ }
+ else if( nSeqKeyCode >= KEY_0 && nSeqKeyCode <= KEY_9 )
+ {
+ if( appendUnicodeSequence( sal_Unicode( '0' ) + sal_Unicode(nSeqKeyCode - KEY_0) ) )
+ return 1;
+ }
+ else if( nSeqKeyCode >= KEY_A && nSeqKeyCode <= KEY_F )
+ {
+ if( appendUnicodeSequence( sal_Unicode( 'a' ) + sal_Unicode(nSeqKeyCode - KEY_A) ) )
+ return 1;
+ }
+ else
+ endUnicodeSequence();
+ }
+
+ if( aDeleteWatch.isDeleted() )
+ return 0;
+
rtl_TextEncoding nEncoding;
if (mpInputContext != NULL && mpInputContext->IsMultiLingual() )
@@ -3370,8 +3494,6 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
nSize = 0;
}
- DeletionListener aDeleteWatch( this );
-
if ( mpInputContext != NULL
&& mpInputContext->UseContext()
&& KeyRelease != pEvent->type
diff --git a/vcl/util/makefile2.pmk b/vcl/util/makefile2.pmk
index df9ba1a214d7..ac2977ca8eab 100644
--- a/vcl/util/makefile2.pmk
+++ b/vcl/util/makefile2.pmk
@@ -36,6 +36,6 @@ CFLAGSCXX+=$(OBJCXXFLAGS)
#building with stlport, but graphite was not built with stlport
.IF "$(USE_SYSTEM_STL)"!="YES"
.IF "$(SYSTEM_GRAPHITE)"=="YES"
-CDEFS += -DADAPT_EXT_STL
+CFLAGSCXX+=-DADAPT_EXT_STL
.ENDIF
.ENDIF
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 6f0c98279e7b..806d3b420b33 100755
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -2894,6 +2894,11 @@ void GraphiteWinLayout::RestoreDC(gr::Segment & segment) const
bool GraphiteWinLayout::LayoutText( ImplLayoutArgs & args)
{
+ if (args.mnMinCharPos >= args.mnEndCharPos)
+ {
+ maImpl.clear();
+ return true;
+ }
HFONT hUnRotatedFont;
if (args.mnOrientation)
{
diff --git a/vos/inc/vos/execabl.hxx b/vos/inc/vos/execabl.hxx
index 04e0ef837b02..5788fb598662 100644
--- a/vos/inc/vos/execabl.hxx
+++ b/vos/inc/vos/execabl.hxx
@@ -50,7 +50,7 @@ namespace vos
@version 0.1
*/
-class IExecutable : public NAMESPACE_VOS(IReference)
+class IExecutable : public vos::IReference
{
public:
@@ -82,8 +82,8 @@ public:
/** OExecutable
added default impl. of IReferenceCounter
*/
-class OExecutable : public NAMESPACE_VOS(IExecutable),
- public NAMESPACE_VOS(OReference)
+class OExecutable : public vos::IExecutable,
+ public vos::OReference
{
public:
diff --git a/vos/inc/vos/macros.hxx b/vos/inc/vos/macros.hxx
index ca1b750d67f4..be91b6d00aa2 100644
--- a/vos/inc/vos/macros.hxx
+++ b/vos/inc/vos/macros.hxx
@@ -149,9 +149,6 @@
// def. for arbitrary namespace
#define VOS_NAMESPACE(class_name, name_space) name_space::class_name
-// sal_Int16 def. for namespace vos
-#define NAMESPACE_VOS(class_name) vos::class_name
-
// sal_Int16 def. for namespace std
#define NAMESPACE_STD(class_name) std::class_name
diff --git a/vos/inc/vos/pipe.hxx b/vos/inc/vos/pipe.hxx
index e9b1145a36ee..ce378272c9b9 100644
--- a/vos/inc/vos/pipe.hxx
+++ b/vos/inc/vos/pipe.hxx
@@ -48,10 +48,10 @@ class OStreamPipe;
/** Represents a pipe.
*/
-class OPipe : public NAMESPACE_VOS(OReference),
- public NAMESPACE_VOS(OObject)
+class OPipe : public vos::OReference,
+ public vos::OObject
{
- VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OPipe));
+ VOS_DECLARE_CLASSINFO(vos::OPipe);
public:
/*
@@ -101,7 +101,7 @@ public:
@param Security
*/
OPipe(const ::rtl::OUString& strName, TPipeOption Options,
- const NAMESPACE_VOS(OSecurity)& rSecurity);
+ const vos::OSecurity& rSecurity);
/** Copy constructor.
*/
@@ -132,7 +132,7 @@ public:
@return True if socket was successfully created.
*/
sal_Bool SAL_CALL create(const ::rtl::OUString& strName, TPipeOption Options,
- const NAMESPACE_VOS(OSecurity)& rSecurity);
+ const vos::OSecurity& rSecurity);
/** Assignment operator. If pipe was already created, the old one will
be discarded.
@@ -191,10 +191,10 @@ public:
/** A pipe to send or receive a stream of data.
*/
-class OStreamPipe : public NAMESPACE_VOS(OPipe),
- public NAMESPACE_VOS(IStream)
+class OStreamPipe : public vos::OPipe,
+ public vos::IStream
{
- VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OStreamPipe));
+ VOS_DECLARE_CLASSINFO(vos::OStreamPipe);
public:
/** Creates an unattached pipe. You must attach the pipe to an oslPipe
diff --git a/vos/inc/vos/process.hxx b/vos/inc/vos/process.hxx
index e41a050acaa0..0b98278d117e 100644
--- a/vos/inc/vos/process.hxx
+++ b/vos/inc/vos/process.hxx
@@ -284,7 +284,7 @@ class OExtCommandLineImpl;
class OExtCommandLine : public OObject
{
VOS_DECLARE_CLASSINFO(VOS_NAMESPACE(OExtCommandLine, vos));
- static NAMESPACE_VOS(OExtCommandLineImpl)* pExtImpl;
+ static vos::OExtCommandLineImpl* pExtImpl;
public:
diff --git a/vos/inc/vos/refernce.hxx b/vos/inc/vos/refernce.hxx
index 25f0f39eb0f3..8f5a0ec799fb 100644
--- a/vos/inc/vos/refernce.hxx
+++ b/vos/inc/vos/refernce.hxx
@@ -82,7 +82,7 @@ private:
ORefCount& SAL_CALL operator= (const ORefCount&);
};
-class OReference : public NAMESPACE_VOS(IReference)
+class OReference : public vos::IReference
{
public:
OReference();
diff --git a/vos/inc/vos/signal.hxx b/vos/inc/vos/signal.hxx
index ea9db4850490..f2bff35998ec 100644
--- a/vos/inc/vos/signal.hxx
+++ b/vos/inc/vos/signal.hxx
@@ -46,7 +46,7 @@ SignalHandlerFunction_impl signalHandlerFunction_impl;
@version 1.0
*/
-class OSignalHandler : public NAMESPACE_VOS(OObject)
+class OSignalHandler : public vos::OObject
{
VOS_DECLARE_CLASSINFO(VOS_NAMESPACE(OSignalHandler, vos));
diff --git a/vos/inc/vos/socket.hxx b/vos/inc/vos/socket.hxx
index cfd51fbb069b..f803a455129c 100644
--- a/vos/inc/vos/socket.hxx
+++ b/vos/inc/vos/socket.hxx
@@ -189,7 +189,7 @@ public:
/** Base class for socket addresses.
*/
-class ISocketAddr : public NAMESPACE_VOS(ISocketTypes)
+class ISocketAddr : public vos::ISocketTypes
{
public:
virtual ~ISocketAddr() { }
@@ -202,11 +202,11 @@ public:
virtual sal_Bool SAL_CALL operator== (oslSocketAddr Addr)= 0;
};
-class OSocketAddr : public NAMESPACE_VOS(ISocketAddr),
- public NAMESPACE_VOS(OObject)
+class OSocketAddr : public vos::ISocketAddr,
+ public vos::OObject
{
- VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OSocketAddr));
+ VOS_DECLARE_CLASSINFO(vos::OSocketAddr);
public:
/** Creates socket address of unknown type.
@@ -274,9 +274,9 @@ protected:
/** Represents an internet-address.
*/
-class OInetSocketAddr : public NAMESPACE_VOS(OSocketAddr)
+class OInetSocketAddr : public vos::OSocketAddr
{
- VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OInetSocketAddr));
+ VOS_DECLARE_CLASSINFO(vos::OInetSocketAddr);
public:
/** Creates an empty internet-address (INADDR_ANY).
@@ -359,9 +359,9 @@ public:
/** Represents an IPX/SPX address.
*/
-class OIpxSocketAddr : public NAMESPACE_VOS(OSocketAddr)
+class OIpxSocketAddr : public vos::OSocketAddr
{
- VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OIpxSocketAddr));
+ VOS_DECLARE_CLASSINFO(vos::OIpxSocketAddr);
public:
typedef oslSocketIpxNetNumber TIpxNetNumber;
@@ -430,11 +430,11 @@ public:
/** Represents a socket.
*/
-class OSocket : public NAMESPACE_VOS(ISocketTypes),
- public NAMESPACE_VOS(OReference),
- public NAMESPACE_VOS(OObject)
+class OSocket : public vos::ISocketTypes,
+ public vos::OReference,
+ public vos::OObject
{
- VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OSocket));
+ VOS_DECLARE_CLASSINFO(vos::OSocket);
protected:
typedef ORefObj<oslSocket> SockRef;
@@ -809,10 +809,10 @@ public:
/** A socket to send or receive a stream of data.
*/
-class OStreamSocket : public NAMESPACE_VOS(OSocket),
- public NAMESPACE_VOS(IStream)
+class OStreamSocket : public vos::OSocket,
+ public vos::IStream
{
- VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OStreamSocket));
+ VOS_DECLARE_CLASSINFO(vos::OStreamSocket);
public:
/** Creates an unattached socket. You must attach the socket to an oslSocket
@@ -952,9 +952,9 @@ protected:
/** A socket to accept incoming connections.
*/
-class OAcceptorSocket : public NAMESPACE_VOS(OSocket)
+class OAcceptorSocket : public vos::OSocket
{
- VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OAcceptorSocket));
+ VOS_DECLARE_CLASSINFO(vos::OAcceptorSocket);
public:
/** Creates a socket that can accept connections.
@@ -1014,9 +1014,9 @@ public:
/** A socket to initiate a conenction.
*/
-class OConnectorSocket : public NAMESPACE_VOS(OStreamSocket)
+class OConnectorSocket : public vos::OStreamSocket
{
- VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OConnectorSocket));
+ VOS_DECLARE_CLASSINFO(vos::OConnectorSocket);
public:
/** Creates a socket that can accept connections.
@@ -1050,9 +1050,9 @@ public:
/** A connectionless socket to send and receive datagrams.
*/
-class ODatagramSocket : public NAMESPACE_VOS(OSocket)
+class ODatagramSocket : public vos::OSocket
{
- VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(ODatagramSocket));
+ VOS_DECLARE_CLASSINFO(vos::ODatagramSocket);
public:
/** Creates a datagram socket.
diff --git a/vos/inc/vos/stream.hxx b/vos/inc/vos/stream.hxx
index 5e25aa1d103a..6df13d5ddb28 100644
--- a/vos/inc/vos/stream.hxx
+++ b/vos/inc/vos/stream.hxx
@@ -37,7 +37,7 @@ namespace vos
/** Adds seeking capabilities to IStream
*/
-class IPositionableStream : public NAMESPACE_VOS(IStream)
+class IPositionableStream : public vos::IStream
{
public:
@@ -75,8 +75,8 @@ protected:
/** Implements IPositionableStream
*/
-class OStream : public NAMESPACE_VOS(OObject),
- public NAMESPACE_VOS(IPositionableStream)
+class OStream : public vos::OObject,
+ public vos::IPositionableStream
{
VOS_DECLARE_CLASSINFO(VOS_NAMESPACE(OStream, vos));
diff --git a/vos/inc/vos/thread.hxx b/vos/inc/vos/thread.hxx
index 16f64c0e0812..d84fdfdadccc 100644
--- a/vos/inc/vos/thread.hxx
+++ b/vos/inc/vos/thread.hxx
@@ -53,8 +53,8 @@ ThreadWorkerFunction_impl threadWorkerFunction_impl;
@version 1.0
*/
-class OThread : public NAMESPACE_VOS(IRunnable),
- public NAMESPACE_VOS(OObject)
+class OThread : public vos::IRunnable,
+ public vos::OObject
{
VOS_DECLARE_CLASSINFO(VOS_NAMESPACE(OThread, vos));
@@ -203,7 +203,7 @@ protected:
friend void threadWorkerFunction_impl(void *);
};
-class OThreadData : public NAMESPACE_VOS(OObject)
+class OThreadData : public vos::OObject
{
VOS_DECLARE_CLASSINFO(VOS_NAMESPACE(OThreadData, vos));
diff --git a/vos/source/pipe.cxx b/vos/source/pipe.cxx
index a7d8e655414d..777d1a76b36b 100644
--- a/vos/source/pipe.cxx
+++ b/vos/source/pipe.cxx
@@ -138,7 +138,7 @@ sal_Bool OPipe::create( const rtl::OUString& strName, TPipeOption Options )
/*****************************************************************************/
sal_Bool OPipe::create( const rtl::OUString& strName,
TPipeOption Options,
- const NAMESPACE_VOS(OSecurity)& rSecurity )
+ const vos::OSecurity& rSecurity )
{
// if this was a valid pipe, decrease reference
if ((m_pPipeRef) && (m_pPipeRef->release() == 0))
diff --git a/vos/source/process.cxx b/vos/source/process.cxx
index 71c8729d9023..59b1af3223d4 100644
--- a/vos/source/process.cxx
+++ b/vos/source/process.cxx
@@ -485,7 +485,7 @@ void OExtCommandLineImpl::init()
namespace
{
- struct lclMutex : public rtl::Static< NAMESPACE_VOS(OMutex), lclMutex > {};
+ struct lclMutex : public rtl::Static< vos::OMutex, lclMutex > {};
}
OExtCommandLineImpl* OExtCommandLine::pExtImpl=0;
diff --git a/vos/source/signal.cxx b/vos/source/signal.cxx
index 1f879f8b225c..eb1b65191918 100644
--- a/vos/source/signal.cxx
+++ b/vos/source/signal.cxx
@@ -35,7 +35,7 @@ using namespace vos;
oslSignalAction vos::signalHandlerFunction_impl(
void * pthis, oslSignalInfo * pInfo)
{
- NAMESPACE_VOS(OSignalHandler)* pThis= (NAMESPACE_VOS(OSignalHandler)*)pthis;
+ vos::OSignalHandler* pThis= (vos::OSignalHandler*)pthis;
return ((oslSignalAction)pThis->signal(pInfo));
}
diff --git a/vos/source/thread.cxx b/vos/source/thread.cxx
index 8b2c8826b753..94cdfbdf970b 100644
--- a/vos/source/thread.cxx
+++ b/vos/source/thread.cxx
@@ -34,7 +34,7 @@ using namespace vos;
void vos::threadWorkerFunction_impl(void * pthis)
{
- NAMESPACE_VOS(OThread)* pThis= (NAMESPACE_VOS(OThread)*)pthis;
+ vos::OThread* pThis= (vos::OThread*)pthis;
// call Handler-Function of OThread-derived class
pThis->run();
diff --git a/vos/source/timer.cxx b/vos/source/timer.cxx
index 1c1e2385b60c..a365415672e9 100644
--- a/vos/source/timer.cxx
+++ b/vos/source/timer.cxx
@@ -41,7 +41,7 @@
class OTimerManagerCleanup;
-class NAMESPACE_VOS(OTimerManager) : public NAMESPACE_VOS(OThread)
+class vos::OTimerManager : public vos::OThread
{
public:
@@ -53,13 +53,13 @@ public:
~OTimerManager();
/// register timer
- sal_Bool SAL_CALL registerTimer(NAMESPACE_VOS(OTimer)* pTimer);
+ sal_Bool SAL_CALL registerTimer(vos::OTimer* pTimer);
/// unregister timer
- sal_Bool SAL_CALL unregisterTimer(NAMESPACE_VOS(OTimer)* pTimer);
+ sal_Bool SAL_CALL unregisterTimer(vos::OTimer* pTimer);
/// lookup timer
- sal_Bool SAL_CALL lookupTimer(const NAMESPACE_VOS(OTimer)* pTimer);
+ sal_Bool SAL_CALL lookupTimer(const vos::OTimer* pTimer);
/// retrieves the "Singleton" TimerManager Instance
static OTimerManager* SAL_CALL getTimerManager();
@@ -77,17 +77,17 @@ protected:
virtual void SAL_CALL onTerminated();
// sorted-queue data
- NAMESPACE_VOS(OTimer)* m_pHead;
+ vos::OTimer* m_pHead;
// List Protection
- NAMESPACE_VOS(OMutex) m_Lock;
+ vos::OMutex m_Lock;
// Signal the insertion of a timer
- NAMESPACE_VOS(OCondition) m_notEmpty;
+ vos::OCondition m_notEmpty;
// Synchronize access to OTimerManager
- static NAMESPACE_VOS(OMutex) m_Access;
+ static vos::OMutex m_Access;
// "Singleton Pattern"
- static NAMESPACE_VOS(OTimerManager)* m_pManager;
+ static vos::OTimerManager* m_pManager;
friend class OTimerManagerCleanup;
@@ -267,8 +267,8 @@ TTimeValue OTimer::getRemainingTime() const
// Timer manager
//
-OMutex NAMESPACE_VOS(OTimerManager)::m_Access;
-OTimerManager* NAMESPACE_VOS(OTimerManager)::m_pManager=0;
+OMutex vos::OTimerManager::m_Access;
+OTimerManager* vos::OTimerManager::m_pManager=0;
OTimerManager::OTimerManager()
{
diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx
index d119e0e84312..99602ceab924 100644
--- a/writerfilter/inc/dmapper/DomainMapper.hxx
+++ b/writerfilter/inc/dmapper/DomainMapper.hxx
@@ -145,8 +145,6 @@ private:
rtl::OUString getBracketStringFromEnum(const sal_Int32 nIntValue, const bool bIsPrefix = true);
com::sun::star::style::TabAlign getTabAlignFromValue(const sal_Int32 nIntValue);
sal_Unicode getFillCharFromValue(const sal_Int32 nIntValue);
- void resolveAttributeProperties(Value & val);
- void resolveSprmProps(Sprm & sprm_);
sal_Int32 mnBackgroundColor;
bool mbIsHighlightSet;
};
diff --git a/writerfilter/inc/resourcemodel/Protocol.hxx b/writerfilter/inc/resourcemodel/Protocol.hxx
index d0405861f695..2f4c9f6261ba 100644
--- a/writerfilter/inc/resourcemodel/Protocol.hxx
+++ b/writerfilter/inc/resourcemodel/Protocol.hxx
@@ -30,6 +30,8 @@
#ifndef INCLUDE_WRITERFILTER_PROTOCOL_HXX
#define INCLUDE_WRITERFILTER_PROTOCOL_HXX
+#ifdef DEBUG
+
#include <boost/shared_ptr.hpp>
#include "WW8ResourceModel.hxx"
#include "TagLogger.hxx"
@@ -95,4 +97,6 @@ public:
};
}
+
+#endif // DEBUG
#endif // INCLUDE_WRITERFILTER_PROTOCOL_HXX
diff --git a/tools/inc/tools/eacopier.hxx b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
index c80eeb0d35cc..c1c500545055 100644
--- a/tools/inc/tools/eacopier.hxx
+++ b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
@@ -24,24 +24,17 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _EACOPIER_HXX
-#define _EACOPIER_HXX
+#ifndef INCLUDED_RESOURCE_MODEL_HELPER_HXX
+#define INCLUDED_RESOURCE_MODEL_HELPER_HXX
-#include <tools/solar.h>
+#include <resourcemodel/WW8ResourceModel.hxx>
-class SvFileStream;
+namespace writerfilter {
+namespace resourcemodel {
-class EA_Copier
-{
- static EA_Copier* _pCopier;
+void WRITERFILTER_DLLPUBLIC resolveSprmProps(Properties & rHandler, Sprm & rSprm);
+void WRITERFILTER_DLLPUBLIC resolveAttributeProperties(Properties & rHandler, Value & rValue);
-public:
- static void Register( EA_Copier* pCopier );
- static EA_Copier* Get();
-
- virtual ~EA_Copier();
- virtual BOOL Copy( const SvFileStream& rFrom, const SvFileStream& rTo ) const = 0;
-};
-
-#endif
+}}
+#endif // INCLUDED_RESOURCE_MODEL_HELPER_HXX
diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx b/writerfilter/inc/resourcemodel/TagLogger.hxx
index cf58dc3be8c3..055656832761 100644
--- a/writerfilter/inc/resourcemodel/TagLogger.hxx
+++ b/writerfilter/inc/resourcemodel/TagLogger.hxx
@@ -28,7 +28,10 @@
#ifndef INCLUDED_TAG_LOGGER_HXX
#define INCLUDED_TAG_LOGGER_HXX
+#ifdef DEBUG
+
#include <rtl/ustring.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
#include <WriterFilterDllApi.hxx>
#include <resourcemodel/WW8ResourceModel.hxx>
#include <string>
@@ -76,8 +79,10 @@ namespace writerfilter
void addAttr(string name, string value);
void addAttr(string name, const ::rtl::OUString & value);
void addAttr(string name, sal_uInt32 nValue);
+ void addAttr(string name, uno::Any rAny);
void addTag(Pointer_t pTag);
void chars(const string & rChars);
+ void chars(const ::rtl::OUString & rChars);
const string & getTag() const;
string toString() const;
@@ -93,6 +98,7 @@ namespace writerfilter
stack<XMLTag::Pointer_t> mTags;
XMLTag::Pointer_t currentTag() const;
XMLTag::Pointer_t mpRoot;
+ string mFileName;
TagLogger();
@@ -101,12 +107,15 @@ namespace writerfilter
static Pointer_t getInstance(const char * name);
+ void setFileName(const string & rName);
+
void startDocument();
void element(const string & name);
void startElement(const string & name);
void attribute(const string & name, const string & value);
void attribute(const string & name, const ::rtl::OUString & value);
void attribute(const string & name, sal_uInt32 value);
+ void attribute(const string & name, const uno::Any aAny);
void addTag(XMLTag::Pointer_t pTag);
void chars(const string & chars);
void chars(const ::rtl::OUString & chars);
@@ -142,5 +151,9 @@ namespace writerfilter
virtual void attribute(Id name, Value & val);
virtual void sprm(Sprm & sprm);
};
+
+WRITERFILTER_DLLPUBLIC XMLTag::Pointer_t unoPropertySetToTag(uno::Reference<beans::XPropertySet> rPropSet);
}
+
+#endif // DEBUG
#endif // INCLUDED_TAG_LOGGER_HXX
diff --git a/writerfilter/inc/resourcemodel/util.hxx b/writerfilter/inc/resourcemodel/util.hxx
index 360dfc3d4113..0a700513576a 100644
--- a/writerfilter/inc/resourcemodel/util.hxx
+++ b/writerfilter/inc/resourcemodel/util.hxx
@@ -39,10 +39,12 @@ namespace writerfilter
string WRITERFILTER_DLLPUBLIC xmlify(const string & str);
+#ifdef DEBUG
string WRITERFILTER_DLLPUBLIC propertysetToString
(uno::Reference<beans::XPropertySet> const & rProps);
string toString(uno::Reference< text::XTextRange > textRange);
string toString(const string & rString);
+#endif
}
#endif // INCLUDED_RESOURCEMODEL_UTIL_HXX
diff --git a/writerfilter/qa/complex/ooxml/LoadDocuments.java b/writerfilter/qa/complex/ooxml/LoadDocuments.java
new file mode 100644
index 000000000000..6f05391b6d21
--- /dev/null
+++ b/writerfilter/qa/complex/ooxml/LoadDocuments.java
@@ -0,0 +1,51 @@
+
+package complex.ooxml;
+import com.sun.star.lang.XMultiServiceFactory;
+import complexlib.ComplexTestCase;
+import java.io.File;
+import com.sun.star.text.XTextDocument;
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ *
+ * @author hb137859
+ */
+public class LoadDocuments extends ComplexTestCase {
+ private XMultiServiceFactory m_xMSF;
+
+ @Override
+ public String[] getTestMethodNames() {
+ return new String [] {
+ "test1"
+ };
+ }
+
+ public void before() throws Exception {
+ m_xMSF = (XMultiServiceFactory) param.getMSF();
+ }
+
+ public void test1() {
+ String testDocumentsPath = util.utils.getFullTestDocName("");
+ log.println("Test documents in:" + testDocumentsPath);
+
+ File dir = new File(testDocumentsPath);
+ String [] files = dir.list();
+
+ if (files != null) {
+ for (int i = 0; i < files.length; ++i) {
+ log.println(files[i]);
+ String url = util.utils.getFullTestURL(files[i]);
+ log.println(url);
+
+ XTextDocument xDoc = util.WriterTools.loadTextDoc(m_xMSF, url);
+ util.DesktopTools.closeDoc(xDoc);
+ }
+ } else {
+ failed();
+ }
+ }
+}
diff --git a/writerfilter/qa/complex/ooxml/makefile.mk b/writerfilter/qa/complex/ooxml/makefile.mk
new file mode 100644
index 000000000000..b57a0f5279f5
--- /dev/null
+++ b/writerfilter/qa/complex/ooxml/makefile.mk
@@ -0,0 +1,90 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.5.198.1 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ = ..$/..$/..
+TARGET = PropertyValues
+PRJNAME = $(TARGET)
+PACKAGE = complex$/ooxml
+
+# --- Settings -----------------------------------------------------
+.INCLUDE: settings.mk
+
+
+#----- compile .java files -----------------------------------------
+
+JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
+JAVAFILES = LoadDocuments.java
+JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+
+#----- make a jar from compiled files ------------------------------
+
+MAXLINELENGTH = 100000
+
+JARCLASSDIRS = $(PACKAGE)
+JARTARGET = $(TARGET).jar
+JARCOMPRESS = TRUE
+
+# --- Parameters for the test --------------------------------------
+
+# start an office if the parameter is set for the makefile
+.IF "$(OFFICE)" == ""
+CT_APPEXECCOMMAND =
+.ELSE
+CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
+.ENDIF
+
+# test base is java complex
+CT_TESTBASE = -TestBase java_complex
+
+# build package name with "." instead of $/
+CT_PACKAGE = -o $(PACKAGE:s\$/\.\)
+
+# start the runner application
+CT_APP = org.openoffice.Runner
+
+# --- Targets ------------------------------------------------------
+
+.IF "$(depend)" == ""
+ALL: ALLTAR
+.ELSE
+ALL: ALLDEP
+.ENDIF
+
+.INCLUDE : target.mk
+
+run: \
+ LoadDocuments
+
+RUN: run
+
+LoadDocuments:
+ +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).LoadDocuments
+
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 64af3a953eef..65dfb4c5fcec 100644..100755
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -27,6 +27,7 @@
#include "PageBordersHandler.hxx"
#include <dmapper/DomainMapper.hxx>
+#include <resourcemodel/ResourceModelHelper.hxx>
#include <DomainMapper_Impl.hxx>
#include <ConversionHelper.hxx>
#include <NumberingManager.hxx>
@@ -69,6 +70,7 @@
#include <com/sun/star/text/TextGridMode.hpp>
#include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
#include <com/sun/star/text/WritingMode.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
#include <com/sun/star/text/XFootnote.hpp>
#include <com/sun/star/style/NumberingType.hpp>
#include <comphelper/types.hxx>
@@ -98,6 +100,10 @@ using namespace ::com::sun::star;
using namespace ::rtl;
namespace writerfilter {
+
+using resourcemodel::resolveSprmProps;
+using resourcemodel::resolveAttributeProperties;
+
namespace dmapper{
#ifdef DEBUG_DOMAINMAPPER
@@ -198,6 +204,9 @@ void DomainMapper::attribute(Id nName, Value & val)
static ::rtl::OUString sLocalBookmarkName;
sal_Int32 nIntValue = val.getInt();
rtl::OUString sStringValue = val.getString();
+
+ SectionPropertyMap * pSectionContext = m_pImpl->GetSectionContext();
+
// printf ( "DomainMapper::attribute(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)nName, (unsigned int)nIntValue, ::rtl::OUStringToOString(sStringValue, RTL_TEXTENCODING_DONTKNOW).getStr());
if( nName >= NS_rtf::LN_WIDENT && nName <= NS_rtf::LN_LCBSTTBFUSSR )
m_pImpl->GetFIB().SetData( nName, nIntValue );
@@ -1459,7 +1468,7 @@ void DomainMapper::attribute(Id nName, Value & val)
case NS_rtf::LN_sed:
/* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
//section properties
- resolveAttributeProperties(val);
+ resolveAttributeProperties(*this, val);
break;
case NS_rtf::LN_tbdAdd:
/* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
@@ -2133,6 +2142,36 @@ void DomainMapper::attribute(Id nName, Value & val)
case NS_ooxml::LN_endtrackchange:
m_pImpl->RemoveCurrentRedline( );
break;
+ case NS_ooxml::LN_CT_DocGrid_linePitch:
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
+ {
+ //see SwWW8ImplReader::SetDocumentGrid
+ OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
+ if(pSectionContext)
+ {
+ pSectionContext->SetGridLinePitch( ConversionHelper::convertTwipToMM100( nIntValue ) );
+ }
+ }
+ break;
+ case NS_ooxml::LN_CT_DocGrid_charSpace:
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
+ {
+ OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
+ if(pSectionContext)
+ {
+ pSectionContext->SetDxtCharSpace( nIntValue );
+ }
+ }
+ break;
+ case NS_ooxml::LN_CT_DocGrid_type:
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
+ {
+ if (pSectionContext != NULL)
+ {
+ pSectionContext->SetGridType(nIntValue);
+ }
+ }
+ break;
default:
{
#if OSL_DEBUG_LEVEL > 0
@@ -2167,7 +2206,7 @@ void DomainMapper::sprm(Sprm & rSprm)
void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmType )
{
#ifdef DEBUG_DOMAINMAPPER
- dmapper_logger->startElement("sprm");
+ dmapper_logger->startElement("DomainMapper.sprm");
dmapper_logger->chars(rSprm.toString());
#endif
OSL_ENSURE(rContext.get(), "PropertyMap has to be valid!");
@@ -2176,14 +2215,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
sal_uInt32 nSprmId = rSprm.getId();
//needed for page properties
- SectionPropertyMap* pSectionContext = 0;
- //the section context is not availabe before the first call of startSectionGroup()
- if( !m_pImpl->IsAnyTableImport() )
- {
- PropertyMapPtr pContext = m_pImpl->GetTopContextOfType(CONTEXT_SECTION);
- OSL_ENSURE(pContext.get(), "Section context is not in the stack!");
- pSectionContext = dynamic_cast< SectionPropertyMap* >( pContext.get() );
- }
+ SectionPropertyMap * pSectionContext = m_pImpl->GetSectionContext();
//TODO: In rtl-paragraphs the meaning of left/right are to be exchanged
bool bExchangeLeftRight = false;
@@ -2221,8 +2253,9 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
break; // sprmPFSideBySide
case NS_sprm::LN_PFKeep: // sprmPFKeep
- /* WRITERFILTERSTATUS: done: 0, planned: 3, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
/* WRITERFILTERSTATUS: comment: */
+ rContext->Insert(PROP_PARA_SPLIT, true, uno::makeAny(nIntValue ? false : true));
break;
case NS_sprm::LN_PFKeepFollow: // sprmPFKeepFollow
/* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 1 */
@@ -2297,7 +2330,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
}
//create a new tab stop property - this is done with the contained properties
- resolveSprmProps(rSprm);
+ resolveSprmProps(*this, rSprm);
//add this property
rContext->Insert(PROP_PARA_TAB_STOPS, true, uno::makeAny( m_pImpl->GetCurrentTabStopAndClear()));
}
@@ -2430,7 +2463,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
case NS_ooxml::LN_CT_PrBase_pBdr: //paragraph border
/* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
- resolveSprmProps(rSprm);
+ resolveSprmProps(*this, rSprm);
break;
/* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
case NS_sprm::LN_PBrcTop: // sprmPBrcTop
@@ -2584,7 +2617,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
break; // sprmPFLocked
case NS_sprm::LN_PFWidowControl:
case NS_ooxml::LN_CT_PPrBase_widowControl:
- /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
{
uno::Any aVal( uno::makeAny( sal_Int8(nIntValue ? 2 : 0 )));
rContext->Insert( PROP_PARA_WIDOWS, true, aVal );
@@ -2641,8 +2674,16 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
}
break; // sprmPOutLvl
case NS_sprm::LN_PFBiDi:
- /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
+ rContext->Insert(PROP_WRITING_MODE, false, uno::makeAny( text::WritingMode2::RL_TB ));
+ rContext->Insert(PROP_PARA_ADJUST, false, uno::makeAny( style::ParagraphAdjust_RIGHT ));
+
break; // sprmPFBiDi
+ case NS_ooxml::LN_EG_SectPrContents_bidi:
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
+ if (pSectionContext != NULL)
+ pSectionContext->Insert(PROP_WRITING_MODE,false, uno::makeAny( text::WritingMode2::RL_TB));
+ break;
case NS_sprm::LN_PFNumRMIns:
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
break; // sprmPFNumRMIns
@@ -2692,7 +2733,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
break; // sprmCChs
case NS_sprm::LN_CSymbol: // sprmCSymbol
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
- resolveSprmProps(rSprm); //resolves LN_FONT and LN_CHAR
+ resolveSprmProps(*this, rSprm); //resolves LN_FONT and LN_CHAR
break;
case NS_sprm::LN_CFOle2:
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
@@ -2701,7 +2742,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
break; // sprmCIdCharType
case NS_sprm::LN_CHighlight:
- /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
{
sal_Int32 nColor = 0;
if(true ==( mbIsHighlightSet = getColorFromIndex(nIntValue, nColor)))
@@ -2729,7 +2770,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
break; // sprmCPlain
case NS_sprm::LN_CKcd:
- /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
rContext->Insert(PROP_CHAR_EMPHASIS, true, uno::makeAny ( getEmphasisValue (nIntValue)));
break; // sprmCKcd
case NS_sprm::LN_CFEmboss:// sprmCFEmboss
@@ -2843,6 +2884,13 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
/* WRITERFILTERSTATUS: */
{
uno::Any aBold( uno::makeAny( nIntValue ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL ) );
+
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->startElement("charWeight");
+ dmapper_logger->attribute("weight", nIntValue ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL);
+ dmapper_logger->endElement("charWeight");
+#endif
+
rContext->Insert(ePropertyId, true, aBold );
if( nSprmId != NS_sprm::LN_CFBoldBi ) // sprmCFBoldBi
rContext->Insert(PROP_CHAR_WEIGHT_ASIAN, true, aBold );
@@ -3079,7 +3127,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
break; // sprmCPropRMark
case NS_sprm::LN_CSfxText:
- /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
// The file-format has many character animations. We have only
// one, so we use it always. Suboptimal solution though.
if (nIntValue)
@@ -3109,7 +3157,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
break; // sprmCBrc
case NS_sprm::LN_CShd:
- /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
break; // sprmCShd
case NS_sprm::LN_CIdslRMarkDel:
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
@@ -3515,7 +3563,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
break;
case NS_sprm::LN_SDxtCharSpace:
{
- /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
if(pSectionContext)
{
@@ -3525,7 +3573,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
break; // sprmSDxtCharSpace
case NS_sprm::LN_SDyaLinePitch: // sprmSDyaLinePitch
{
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
//see SwWW8ImplReader::SetDocumentGrid
OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
if(pSectionContext)
@@ -3570,8 +3618,9 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
}
break; // sprmSClm
case NS_sprm::LN_STextFlow:
- {
+ case NS_ooxml::LN_EG_SectPrContents_textDirection:
/* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
+ {
/* 0 HoriLR 1 Vert TR 2 Vert TR 3 Vert TT 4 HoriLT
only 0 and 1 can be imported correctly
*/
@@ -3589,7 +3638,16 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
break;
default:;
}
- rContext->Insert(PROP_WRITING_MODE, false, uno::makeAny( nDirection ) );
+
+ PropertyMap * pTargetContext = rContext.get();
+
+ if (pSectionContext != NULL &&
+ nSprmId == NS_ooxml::LN_EG_SectPrContents_textDirection)
+ {
+ pTargetContext = pSectionContext;
+ }
+
+ pTargetContext->Insert(PROP_WRITING_MODE, false, uno::makeAny( nDirection ) );
}
break; // sprmSTextFlow
case NS_sprm::LN_TJc: // sprmTJc
@@ -3718,11 +3776,11 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
break;//undocumented section properties
case NS_sprm::LN_CEastAsianLayout:
/* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
- resolveSprmProps(rSprm);
+ resolveSprmProps(*this, rSprm);
break;
case NS_ooxml::LN_CT_Tabs_tab:
/* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
- resolveSprmProps(rSprm);
+ resolveSprmProps(*this, rSprm);
m_pImpl->IncorporateTabStop(m_pImpl->m_aCurrentTabStop);
m_pImpl->m_aCurrentTabStop = DeletableTabStop();
break;
@@ -3739,58 +3797,58 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
m_pImpl->InitTabStopFromStyle( aStyleTabStops );
}
}
- resolveSprmProps(rSprm);
+ resolveSprmProps(*this, rSprm);
rContext->Insert(PROP_PARA_TAB_STOPS, true, uno::makeAny( m_pImpl->GetCurrentTabStopAndClear()));
}
break;
case NS_ooxml::LN_CT_PPr_sectPr:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_EG_RPrBase_color:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_EG_RPrBase_rFonts:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_EG_RPrBase_bdr:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_EG_RPrBase_eastAsianLayout:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_EG_RPrBase_u:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_EG_RPrBase_lang:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_CT_PPrBase_spacing:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_CT_PPrBase_ind:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_CT_RPrDefault_rPr:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_CT_PPrDefault_pPr:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_CT_DocDefaults_pPrDefault:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_CT_DocDefaults_rPrDefault:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_CT_Style_pPr:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_CT_Style_rPr:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_CT_PPr_rPr:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_CT_PPrBase_numPr:
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
- resolveSprmProps(rSprm);
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
+ resolveSprmProps(*this, rSprm);
break;
case NS_ooxml::LN_EG_SectPrContents_footnotePr:
- /* WRITERFILTERSTATUS: done: 1ß0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_EG_SectPrContents_endnotePr:
/* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
m_pImpl->SetInFootnoteProperties( NS_ooxml::LN_EG_SectPrContents_footnotePr == nSprmId );
- resolveSprmProps(rSprm);
+ resolveSprmProps(*this, rSprm);
break;
case NS_ooxml::LN_EG_SectPrContents_lnNumType:
/* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
{
- resolveSprmProps(rSprm);
+ resolveSprmProps(*this, rSprm);
LineNumberSettings aSettings = m_pImpl->GetLineNumberSettings();
aSettings.bIsOn = true;
m_pImpl->SetLineNumberSettings( aSettings );
@@ -3827,7 +3885,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
{
//TODO: What about style sheet import of frame properties
}
- resolveSprmProps(rSprm);
+ resolveSprmProps(*this, rSprm);
}
break;
case NS_ooxml::LN_EG_SectPrContents_pgSz:
@@ -3839,7 +3897,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
CT_PageSz.h = aLetter.getHeight();
}
CT_PageSz.orient = false;
- resolveSprmProps(rSprm);
+ resolveSprmProps(*this, rSprm);
OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
if(pSectionContext)
{
@@ -3853,7 +3911,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
case NS_ooxml::LN_EG_SectPrContents_pgMar:
/* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
m_pImpl->InitPageMargins();
- resolveSprmProps(rSprm);
+ resolveSprmProps(*this, rSprm);
OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
if(pSectionContext)
{
@@ -3908,6 +3966,9 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
}
}
break;
+ case NS_ooxml::LN_EG_SectPrContents_docGrid:
+ resolveSprmProps(*this, rSprm);
+ break;
case NS_ooxml::LN_EG_SectPrContents_pgBorders:
{
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
@@ -3960,7 +4021,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
case NS_ooxml::LN_CT_TblPrBase_tblCellMar: //cell margins
/* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
{
- resolveSprmProps(rSprm);//contains LN_CT_TblCellMar_top, LN_CT_TblCellMar_left, LN_CT_TblCellMar_bottom, LN_CT_TblCellMar_right
+ resolveSprmProps(*this, rSprm);//contains LN_CT_TblCellMar_top, LN_CT_TblCellMar_left, LN_CT_TblCellMar_bottom, LN_CT_TblCellMar_right
}
break;
case NS_ooxml::LN_CT_TblCellMar_top:
@@ -4003,7 +4064,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
}
break;
case NS_sprm::LN_CFNoProof: //0x875 no grammar and spell checking, unsupported
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
break;
case NS_ooxml::LN_anchor_anchor: // at_character drawing
/* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
@@ -4104,7 +4165,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
/* WRITERFILTERSTATUS: done: 100, planned: 5, spent: 0 */
{
m_pImpl->AddNewRedline( );
- resolveSprmProps( rSprm );
+ resolveSprmProps(*this, rSprm );
// now the properties author, date and id should be available
sal_Int32 nToken = m_pImpl->GetCurrentRedlineToken();
switch( nToken & 0xffff )
@@ -4160,7 +4221,21 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
//TODO: determines whether top/bottom paragraph spacing is added if equal styles are following - unsupported
break;
case NS_ooxml::LN_EG_SectPrContents_formProt: //section protection, only form editing is enabled - unsupported
- /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
+ case NS_ooxml::LN_EG_SectPrContents_vAlign:
+ case NS_ooxml::LN_EG_RPrBase_fitText:
+ /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
+ break;
+ case NS_ooxml::LN_ffdata:
+ {
+ writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
+ if (pProperties.get() != NULL)
+ {
+ FFDataHandler::Pointer_t pFFDataHandler(new FFDataHandler());
+
+ pProperties->resolve(*pFFDataHandler);
+ m_pImpl->SetFieldFFData(pFFDataHandler);
+ }
+ }
break;
default:
{
@@ -4173,7 +4248,8 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
}
#ifdef DEBUG_DOMAINMAPPER
- dmapper_logger->endElement("sprm");
+ dmapper_logger->addTag(rContext->toTag());
+ dmapper_logger->endElement("DomainMapper.sprm");
#endif
}
/*-- 09.06.2006 09:52:13---------------------------------------------------
@@ -4183,13 +4259,13 @@ void DomainMapper::entry(int /*pos*/,
writerfilter::Reference<Properties>::Pointer_t ref)
{
#ifdef DEBUG_DOMAINMAPPER
- dmapper_logger->startElement("entry");
+ dmapper_logger->startElement("DomainMapper.entry");
#endif
ref->resolve(*this);
#ifdef DEBUG_DOMAINMAPPER
- dmapper_logger->endElement("entry");
+ dmapper_logger->endElement("DomainMapper.entry");
#endif
}
/*-- 09.06.2006 09:52:13---------------------------------------------------
@@ -4357,6 +4433,12 @@ void DomainMapper::text(const sal_uInt8 * data_, size_t len)
{
//TODO: Determine the right text encoding (FIB?)
::rtl::OUString sText( (const sal_Char*) data_, len, RTL_TEXTENCODING_MS_1252 );
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->startElement("text");
+ dmapper_logger->chars(sText);
+ dmapper_logger->endElement("text");
+#endif
+
try
{
if(len == 1)
@@ -4423,11 +4505,6 @@ void DomainMapper::text(const sal_uInt8 * data_, size_t len)
pContext.reset(new PropertyMap());
m_pImpl->appendTextPortion( sText, pContext );
-#ifdef DEBUG_DOMAINMAPPER
- dmapper_logger->startElement("text");
- dmapper_logger->chars(sText);
- dmapper_logger->endElement("text");
-#endif
}
}
catch( const uno::RuntimeException& )
@@ -4819,21 +4896,6 @@ rtl::OUString DomainMapper::getBracketStringFromEnum(const sal_Int32 nIntValue,
}
}
-void DomainMapper::resolveSprmProps(Sprm & rSprm)
-{
- writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
- if( pProperties.get())
- pProperties->resolve(*this);
-}
-
-void DomainMapper::resolveAttributeProperties(Value & val)
-{
- writerfilter::Reference<Properties>::Pointer_t pProperties = val.getProperties();
- if( pProperties.get())
- pProperties->resolve(*this);
-}
-
-
com::sun::star::style::TabAlign DomainMapper::getTabAlignFromValue(const sal_Int32 nIntValue)
{
switch (nIntValue)
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 452391fe6300..8783421faaaf 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -99,14 +99,14 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
sal_Int32 nIntValue = ((pValue.get() != NULL) ? pValue->getInt() : 0);
switch ( nSprmId )
{
- /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */
case 0xf661: //sprmTTRLeft left table indent
- /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
case 0xf614: // sprmTTPreferredWidth - preferred table width
- /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
case NS_ooxml::LN_CT_TblPrBase_tblW: //90722;
- /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
case NS_ooxml::LN_CT_TblPrBase_tblInd: //90725
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
{
//contains unit and value
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
@@ -132,9 +132,9 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
}
}
break;
- /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */
case 0x3404:// sprmTTableHeader
case NS_ooxml::LN_CT_TrPrBase_tblHeader: //90704
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
// if nIntValue == 1 then the row is a repeated header line
// to prevent later rows from increasing the repeating m_nHeaderRepeat is set to NULL when repeating stops
if( nIntValue > 0 && m_nHeaderRepeat >= 0 )
@@ -147,8 +147,8 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
else
m_nHeaderRepeat = -1;
break;
- /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */
case 0xd608: // TDefTable
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
{
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
@@ -178,8 +178,8 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
}
}
break;
- /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */
case 0xD605: // sprmTTableBorders
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
{
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
@@ -193,14 +193,14 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
}
}
break;
- /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
case 0xd632 : //sprmTNewSpacing
- /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
+ /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
case 0xd634 : //sprmTNewSpacing
+ /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
//TODO: sprms contain default (TNew) and actual border spacing of cells - not resolvable yet
break;
- /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
case 0xd613: //sprmTGridLineProps
+ /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
// TODO: needs a handler
/*contains:
GridLineProps">
@@ -216,8 +216,8 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
*/
break;
- /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
case 0x740a : //sprmTTlp
+ /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
//TODO: Table look specifier
break;
case 0x6816 : //unknown
@@ -227,10 +227,11 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
case 0x7479 : //unknown
case 0xf617 : //unknown
case 0xf618 : //unknown
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
bRet = false;
break;
- /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */
case NS_ooxml::LN_CT_TblPrBase_tblStyle: //table style name
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
{
m_sTableStyleName = pValue->getString();
TablePropertyMapPtr pPropMap( new TablePropertyMap );
@@ -238,14 +239,14 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
insertTableProps(pPropMap);
}
break;
- /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */
case NS_ooxml::LN_CT_TblGridBase_gridCol:
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
{
getCurrentGrid()->push_back( ConversionHelper::convertTwipToMM100( nIntValue ) );
}
break;
- /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */
case NS_ooxml::LN_CT_TcPrBase_vMerge : //vertical merge
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
{
// values can be: LN_Value_ST_Merge_restart, LN_Value_ST_Merge_continue, in reality the second one is a 0
TablePropertyMapPtr pMergeProps( new TablePropertyMap );
@@ -253,8 +254,8 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
cellProps( pMergeProps);
}
break;
- /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */
case NS_ooxml::LN_CT_TcPrBase_gridSpan: //number of grid positions spanned by this cell
+ /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
{
#if DEBUG_DOMAINMAPPER
dmapper_logger->startElement("tablemanager.GridSpan");
@@ -264,13 +265,14 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
m_nGridSpan = nIntValue;
}
break;
- /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
case NS_ooxml::LN_CT_TblPrBase_tblLook:
+ /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
break; //todo: table look specifier
- /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
case NS_ooxml::LN_CT_TcPrBase_tcW:
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
break; //fixed column width is not supported
case NS_ooxml::LN_CT_TrPrBase_cnfStyle:
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
{
TablePropertyMapPtr pProps( new TablePropertyMap );
pProps->Insert( PROP_CNF_STYLE, true, uno::makeAny( pValue->getString( ) ) );
@@ -278,9 +280,11 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
}
break;
case NS_ooxml::LN_CT_PPrBase_cnfStyle:
+ /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
// TODO cnfStyle on a paragraph
break;
case NS_ooxml::LN_CT_TcPrBase_cnfStyle:
+ /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
{
TablePropertyMapPtr pProps( new TablePropertyMap );
pProps->Insert( PROP_CNF_STYLE, true, uno::makeAny( pValue->getString( ) ) );
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index c6d347a37281..4c176b59b4ef 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -69,6 +69,7 @@
#include <com/sun/star/util/XNumberFormats.hpp>
#include <rtl/ustrbuf.hxx>
#include <rtl/string.h>
+#include "FieldTypes.hxx"
#include <tools/string.hxx>
#ifdef DEBUG_DOMAINMAPPER
@@ -89,269 +90,6 @@ using namespace ::com::sun::star;
using namespace ::rtl;
namespace writerfilter {
namespace dmapper{
-/*-- 08.09.2006 09:39:50---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-//defaultswitch { Upper FirstCap Lower }
-//Numberingswitch { Arabic, ALPHABETIC, ...} see lcl_ParseNumberingType
-enum FieldId
-{
- /* ADDRESSBLOCK \d \* MERGEFORMAT -> Addressblock completely unsupported*/
- FIELD_ADDRESSBLOCK
- /* ADVANCE \d downvalue \l leftvalue \r rightvalue \u upvalue \x xvalue \y yvalue -> unsupported*/
- ,FIELD_ADVANCE
- /* ASK bookmarkname "hint" \d defaultanswer \o \* MERGEFORMAT ->
- the hint is not always quoted, inputfield with default answer, prompt before merge (\o)
- */
- ,FIELD_ASK
- /* AUTONUM \* Numberingswitch ->
- mapped to sequence field "AutoNr"
- */
- ,FIELD_AUTONUM
- /* AUTONUMLGL \* Numberingswitch ->
- mapped to sequence field "AutoNr"
- */
- ,FIELD_AUTONUMLGL
- /* AUTONUMOUT \* Numberingswitch ->
- mapped to sequence field "AutoNr"
- */
- ,FIELD_AUTONUMOUT
- /* AUTHOR NewAuthor \* defaultswitch \* MERGEFORMAT ->
- mapped to sequence field "AutoNr"
- */
- ,FIELD_AUTHOR
- /* COMMENTS "comment" \* MERGEFORMAT ->
- Docinfo-Comments
- */
- ,FIELD_COMMENTS
- /* CREATEDATE \h \* MERGEFORMAT ->
- docinfo-created-date
- */
- ,FIELD_CREATEDATE
- /* DATE \@ "number format" \s \* MERGEFORMAT ->
- ww8filterimprovement: multiple languages now supported
- */
- ,FIELD_DATE
- /* DOCPROPERTY propertyname \* MERGEFORMAT ->
- ww8filterimprovement: some fields imported as functionally equivalent fields if possible,
- the others imported as UserField
- */
- ,FIELD_DOCPROPERTY
- /* DOCVARIABLE Name \* MERGEFORMAT ->
- ww8filterimprovement: now imported as user fields
- */
- ,FIELD_DOCVARIABLE
- /* EDITTIME \# "displayformat" \* Numberingswitch \* MERGEFORMAT ->
- DocInfo-Modified-Date
- ww8filterimprovement: multiple languages now supported
- */
- ,FIELD_EDITTIME
- /* FILLIN "text to fill in" \d defaultanswer \o \* MERGEFORMAT ->
- Function-InputField
- */
- ,FIELD_FILLIN
- /* FILENAME \p \* * MERGEFORMAT ->
- file name (\p with path)
- */
- ,FIELD_FILENAME
- /* FILESIZE \* NumberingType \* MERGEFORMAT ->
- not imported in old ww8 filter, see lcl_ParseNumberingType
- todo find alternative field
- */
- ,FIELD_FILESIZE
- /* =formula \# "number format"
- todo find alternative field
- */
- ,FIELD_FORMULA
- /* GOTOBUTTON text \* MERGEFORMAT ->
- not imported in old ww8 filter
- todo find alternative field
- */
- ,FIELD_GOTOBUTTON
- /* HYPERLINK "link" \* MERGEFORMAT ->
- not imported in old ww8 filter
- ww8filterimprovement: now imported as hyperlink
- */
- ,FIELD_HYPERLINK
- /* IF condition "then text" "else text" ->
- not imported in old ww8 filter
- ww8filterimprovement: now imported
- todo: condition, if text, else text still missing
- */
- ,FIELD_IF
- /* INFO NameOfInfo \* MERGEFORMAT -> old
- todo: filter imports wrong?
- */
- ,FIELD_INFO
- /* INCLUDEPICTURE path \* MERGEFORMAT->
- old filter imports an embedded picture
- todo: not yet supported
- */
- ,FIELD_INCLUDEPICTURE
- /* KEYWORDS keyword \* defaultswitch \* Numberingswitch \* MERGEFORMAT ->
- DocInfo Keywords
- */
- ,FIELD_KEYWORDS
- /* LASTSAVEDBY \* MERGEFORMAT ->
- DocInfo-Modified-Author
- */
- ,FIELD_LASTSAVEDBY
- /* MACROBUTTON MacroName quick help text ->
- Macro field
- */
- ,FIELD_MACROBUTTON
- /* MERGEFIELD ColumName \b prefix \f suffix \* MERGEFORMAT ->
- ww8filterimprovement: column-only API now upporterd
- */
- ,FIELD_MERGEFIELD
- /* MERGEREC \* MERGEFORMAT ->
- RecordNumber field, maybe without db name
- todo: currently unchecked
- */
- ,FIELD_MERGEREC
- /* MERGESEQ \* MERGEFORMAT ->
- not imported in old ww8 filter
- ww8filterimprovement: now imported
- todo: currently unchecked
- */
- ,FIELD_MERGESEQ
- /* NEXT text ->
- Next record
- todo: currently unchecked
- */
- ,FIELD_NEXT
- /* NEXTIF condition
- todo: condition not imported
- */
- ,FIELD_NEXTIF
- /* PAGE \* Numberingswitch \* MERGEFORMAT ->
- see lcl_ParseNumberingType
- */
- ,FIELD_PAGE
- /* REF targetbkm \f \* MERGEFORMAT ->
- imports a ShowVariable (bookmarkname)?
- \h hyerlink to paragraph
- \p relative to para above/below
- \f refenence number
- \d separator number separator
- \n paragraph number
- \r paragraph number in relative context
- \t suppres non delimiters
- \w paragraph number in full context
- \* Upper/Lower...
- */
- ,FIELD_REF //
- /* REVNUM \* Numberingswitch \* MERGEFORMAT ->
- DocInfo-revision number
- */
- ,FIELD_REVNUM
- /* SAVEDATE \@ "NumberFormat"\* MERGEFORMAT ->
- DocInfo-modified-date
- */
- ,FIELD_SAVEDATE
- /* SECTION \* NumberFormat \* MERGEFORMAT ->
- not imported in old ww8 filter see lcl_ParseNumberingType
- todo: find alternative
- */
- ,FIELD_SECTION
- /* SECTIONPAGES \* NumberFormat \* MERGEFORMAT ->
- not imported in old ww8 filter see lcl_ParseNumberingType
- todo: find alternative
- */
- ,FIELD_SECTIONPAGES
- /* SEQ sequencename \h \c \n \r \s \* MERGEFORMAT ->
- number range name:sequencename value:sequencename+1
- todo: only partially implemented, switches unsupported
- */
- ,FIELD_SEQ
- /* SET bookmarkname newtext \* MERGEFORMAT ->
- SetVariable bookmarkname = newtext
- todo: not implemented yet
- */
- ,FIELD_SET
- /* SKIPIF condition \* MERGEFORMAT ->
- ??
- todo: not implemented yet
- */
- ,FIELD_SKIPIF
- /* STYLEREF stylename \* MERGEFORMAT ->
- not imported in old ww8 filter
- todo: add an equivalent field type
- */
- ,FIELD_STYLEREF
- /* SUBJECT subject \* Defaultswitch \* MERGEFORMAT ->
- DocInfo - subject
- */
- ,FIELD_SUBJECT
- /* SYMBOL symbolnumber \* MERGEFORMAT ->
- inserts a special char (symbolnumber)
- todo: find alternative
- */
- ,FIELD_SYMBOL
- /* TEMPLATE \* Defaultswitch \* MERGEFORMAT
- TemplateName field
- */
- ,FIELD_TEMPLATE
- /* TIME \@ "number format" \* MERGEFORMAT
- ww8filterimprovement: multiple languages now supported
- */
- ,FIELD_TIME
- /* TITLE \* Defaultswitch \* MERGEFORMAT ->
- DocInfo-title
- */
- ,FIELD_TITLE
- /* USERINITIALS newinitials \* MERGEFORMAT ->
- ExtendedUser field (SHORTCUT)
- */
- ,FIELD_USERINITIALS
- /* USERADDRESS \* MERGEFORMAT ->
- not imported in old ww8 filter
- todo: find alternative
- */
- ,FIELD_USERADDRESS
- /* USERNAME newusername \* MERGEFORMAT ->
- not imported in old ww8 filter
- todo: import as extended user field(s)
- */
- ,FIELD_USERNAME
- /*
- TOC options:
- \a Builds a table of figures but does not include the captions's label and number
- \b Uses a bookmark to specify area of document from which to build table of contents
- \c Builds a table of figures of the given label
- \d Defines the separator between sequence and page numbers
- \f Builds a table of contents using TC entries instead of outline levels
- \h Hyperlinks the entries and page numbers within the table of contents
- \l Defines the TC entries field level used to build a table of contents
- \n Builds a table of contents or a range of entries, sucah as “1-9”, in a table of contents without page numbers
- \o Builds a table of contents by using outline levels instead of TC entries
- \p Defines the separator between the table entry and its page number
- \s Builds a table of contents by using a sequence type
- \t Builds a table of contents by using style names other than the standard outline styles
- \u Builds a table of contents by using the applied paragraph outline level
- \w Preserve tab characters within table entries
- \x Preserve newline characters within table entries
- \z Hides page numbers within the table of contens when shown in Web Layout View
- */
- ,FIELD_TOC
- /*
- TOC entry: “text”
- \f TC entry in doc with multiple tables
- \l Outline Level
- \n Suppress page numbers
- example: TOC "EntryText \f \l 2 \n
- */
- ,FIELD_TC
- /* document statistic - number of characters
- */
- ,FIELD_NUMCHARS
- /* document statistic - number of words
- */
- ,FIELD_NUMWORDS
- /* document statistic - number of pages
- */
- ,FIELD_NUMPAGES
-};
struct FieldConversion
{
::rtl::OUString sWordCommand;
@@ -2543,6 +2281,10 @@ uno::Reference< beans::XPropertySet > DomainMapper_Impl::FindOrCreateFieldMaster
-----------------------------------------------------------------------*/
void DomainMapper_Impl::PushFieldContext()
{
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->element("pushFieldContext");
+#endif
+
uno::Reference< text::XTextAppend > xTextAppend = m_aTextAppendStack.top().xTextAppend;
//insert a dummy char to make sure the start range doesn't move together with the to-be-appended text
xTextAppend->appendTextPortion(::rtl::OUString( '-' ), uno::Sequence< beans::PropertyValue >() );
@@ -2585,11 +2327,74 @@ void FieldContext::AppendCommand(const ::rtl::OUString& rPart)
{
m_sCommand += rPart;
}
+
+::std::vector<rtl::OUString> FieldContext::GetCommandParts() const
+{
+ ::std::vector<rtl::OUString> aResult;
+ sal_Int32 nIndex = 0;
+ bool bInString = false;
+ OUString sPart;
+ while (nIndex != -1)
+ {
+ OUString sToken = GetCommand().getToken(0, ' ', nIndex);
+ bool bInStringNext = bInString;
+
+ if (sToken.getLength() == 0)
+ continue;
+
+ if (sToken.getStr()[0] == '"')
+ {
+ bInStringNext = true;
+ sToken = sToken.copy(1);
+ }
+ if (sToken.getStr()[sToken.getLength() - 1] == '"')
+ {
+ bInStringNext = false;
+ sToken = sToken.copy(0, sToken.getLength() - 1);
+ }
+
+ if (bInString)
+ {
+ if (bInStringNext)
+ {
+ sPart += OUString(' ');
+ sPart += sToken;
+ }
+ else
+ {
+ sPart += sToken;
+ aResult.push_back(sPart);
+ }
+ }
+ else
+ {
+ if (bInStringNext)
+ {
+ sPart = sToken;
+ }
+ else
+ {
+ aResult.push_back(sToken);
+ }
+ }
+
+ bInString = bInStringNext;
+ }
+
+ return aResult;
+}
+
/*-- 29.01.2007 11:33:15---------------------------------------------------
//collect the pieces of the command
-----------------------------------------------------------------------*/
void DomainMapper_Impl::AppendFieldCommand(::rtl::OUString& rPartOfCommand)
{
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->startElement("appendFieldCommand");
+ dmapper_logger->chars(rPartOfCommand);
+ dmapper_logger->endElement("appendFieldCommand");
+#endif
+
FieldContextPtr pContext = m_aFieldStack.top();
OSL_ENSURE( pContext.get(), "no field context available");
if( pContext.get() )
@@ -2601,89 +2406,499 @@ void DomainMapper_Impl::AppendFieldCommand(::rtl::OUString& rPartOfCommand)
-----------------------------------------------------------------------*/
typedef std::multimap < sal_Int32, ::rtl::OUString > TOCStyleMap;
+
+const FieldConversionMap_t & lcl_GetFieldConversion()
+{
+static FieldConversionMap_t aFieldConversionMap;
+static bool bFilled = false;
+if(!bFilled)
+{
+ static const FieldConversion aFields[] =
+ {
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ADDRESSBLOCK")), "", "", FIELD_ADDRESSBLOCK },
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ADVANCE")), "", "", FIELD_ADVANCE },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ASK")), "SetExpression", "SetExpression", FIELD_ASK },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUM")), "SetExpression", "SetExpression", FIELD_AUTONUM },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUMLGL")), "SetExpression", "SetExpression", FIELD_AUTONUMLGL },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUMOUT")), "SetExpression", "SetExpression", FIELD_AUTONUMOUT },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTHOR")), "Author", "", FIELD_AUTHOR },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE")), "DateTime", "", FIELD_DATE },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("COMMENTS")), "DocInfo.Description", "", FIELD_COMMENTS },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CREATEDATE")), "DocInfo.CreateDateTime", "", FIELD_CREATEDATE },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOCPROPERTY")), "", "", FIELD_DOCPROPERTY },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOCVARIABLE")), "User", "", FIELD_DOCVARIABLE },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EDITTIME")), "DocInfo.EditTime", "", FIELD_EDITTIME },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILLIN")), "Input", "", FIELD_FILLIN },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILENAME")), "FileName", "", FIELD_FILENAME },
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILESIZE")), "", "", FIELD_FILESIZE },
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FORMULA")), "", "", FIELD_FORMULA },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FORMCHECKBOX")), "", "", FIELD_FORMCHECKBOX},
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FORMDROPDOWN")), "", "", FIELD_FORMDROWDOWN},
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FORMTEXT")), "Input", "", FIELD_FORMTEXT},
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GOTOBUTTON")), "", "", FIELD_GOTOBUTTON },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HYPERLINK")), "", "", FIELD_HYPERLINK },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IF")), "ConditionalText", "", FIELD_IF },
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INFO")), "","", FIELD_INFO },
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INCLUDEPICTURE")), "", "", FIELD_INCLUDEPICTURE},
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KEYWORDS")), "DocInfo.KeyWords", "", FIELD_KEYWORDS },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LASTSAVEDBY")), "DocInfo.ChangeAuthor", "", FIELD_LASTSAVEDBY },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MACROBUTTON")), "Macro", "", FIELD_MACROBUTTON },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGEFIELD")), "Database", "Database", FIELD_MERGEFIELD},
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGEREC")), "DatabaseNumberOfSet", "", FIELD_MERGEREC },
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGESEQ")), "", "", FIELD_MERGESEQ },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NEXT")), "DatabaseNextSet", "", FIELD_NEXT },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NEXTIF")), "DatabaseNextSet", "", FIELD_NEXTIF },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PAGE")), "PageNumber", "", FIELD_PAGE },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REF")), "GetReference", "", FIELD_REF },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REVNUM")), "DocInfo.Revision", "", FIELD_REVNUM },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SAVEDATE")), "DocInfo.Change", "", FIELD_SAVEDATE },
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SECTION")), "", "", FIELD_SECTION },
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SECTIONPAGES")), "", "", FIELD_SECTIONPAGES },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SEQ")), "SetExpression", "SetExpression", FIELD_SEQ },
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SET")), "","", FIELD_SET },
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SKIPIF")),"", "", FIELD_SKIPIF },
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("STYLEREF")),"", "", FIELD_STYLEREF },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SUBJECT")), "DocInfo.Subject", "", FIELD_SUBJECT },
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SYMBOL")),"", "", FIELD_SYMBOL },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TEMPLATE")), "TemplateName", "", FIELD_TEMPLATE},
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME")), "DateTime", "", FIELD_TIME },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TITLE")), "DocInfo.Title", "", FIELD_TITLE },
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERINITIALS")), "ExtendedUser", "", FIELD_USERINITIALS},
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERADDRESS")), "", "", FIELD_USERADDRESS },
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERNAME")), "ExtendedUser", "", FIELD_USERNAME }
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TOC")), "com.sun.star.text.ContentIndex", "", FIELD_TOC},
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TC")), "com.sun.star.text.ContentIndexMark", "", FIELD_TC},
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMCHARS")), "CharacterCount", "", FIELD_NUMCHARS},
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMWORDS")), "WordCount", "", FIELD_NUMWORDS},
+ {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMPAGES")), "PageCount", "", FIELD_NUMPAGES},
+
+// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")), "", "", FIELD_},
+
+ };
+ size_t nConversions = sizeof(aFields)/sizeof(FieldConversion);
+ for( size_t nConversion = 0; nConversion < nConversions; ++nConversion)
+ {
+ aFieldConversionMap.insert( FieldConversionMap_t::value_type(
+ aFields[nConversion].sWordCommand,
+ aFields[nConversion] ));
+ }
+
+ bFilled = true;
+ }
+
+ return aFieldConversionMap;
+}
+
+void DomainMapper_Impl::handleFieldAsk
+ (FieldContextPtr pContext,
+ PropertyNameSupplier& rPropNameSupplier,
+ uno::Reference< uno::XInterface > & xFieldInterface,
+ uno::Reference< beans::XPropertySet > xFieldProperties)
+{
+ //doesn the command contain a variable name?
+ ::rtl::OUString sVariable, sHint;
+
+ sVariable = lcl_ExctractAskVariableAndHint( pContext->GetCommand(),
+ sHint );
+ if(sVariable.getLength())
+ {
+ // determine field master name
+ uno::Reference< beans::XPropertySet > xMaster =
+ FindOrCreateFieldMaster
+ ("com.sun.star.text.FieldMaster.SetExpression", sVariable );
+
+ // attach the master to the field
+ uno::Reference< text::XDependentTextField > xDependentField
+ ( xFieldInterface, uno::UNO_QUERY_THROW );
+ xDependentField->attachTextFieldMaster( xMaster );
+
+ // set input flag at the field
+ xFieldProperties->setPropertyValue(
+ rPropNameSupplier.GetName(PROP_IS_INPUT), uno::makeAny( true ));
+ // set the prompt
+ xFieldProperties->setPropertyValue(
+ rPropNameSupplier.GetName(PROP_HINT),
+ uno::makeAny( sHint ));
+ }
+ else
+ {
+ //don't insert the field
+ //todo: maybe import a 'normal' input field here?
+ xFieldInterface = 0;
+ }
+}
+
+void DomainMapper_Impl::handleAutoNum
+ (FieldContextPtr pContext,
+ PropertyNameSupplier& rPropNameSupplier,
+ uno::Reference< uno::XInterface > & xFieldInterface,
+ uno::Reference< beans::XPropertySet > xFieldProperties)
+{
+ //create a sequence field master "AutoNr"
+ uno::Reference< beans::XPropertySet > xMaster =
+ FindOrCreateFieldMaster
+ ("com.sun.star.text.FieldMaster.SetExpression",
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoNr") ));
+
+ xMaster->setPropertyValue( rPropNameSupplier.GetName(PROP_SUB_TYPE),
+ uno::makeAny(text::SetVariableType::SEQUENCE));
+
+ //apply the numbering type
+ xFieldProperties->setPropertyValue(
+ rPropNameSupplier.GetName(PROP_NUMBERING_TYPE),
+ uno::makeAny( lcl_ParseNumberingType(pContext->GetCommand()) ));
+ // attach the master to the field
+ uno::Reference< text::XDependentTextField > xDependentField
+ ( xFieldInterface, uno::UNO_QUERY_THROW );
+ xDependentField->attachTextFieldMaster( xMaster );
+}
+
+void DomainMapper_Impl::handleAuthor
+ (FieldContextPtr pContext,
+ PropertyNameSupplier& rPropNameSupplier,
+ uno::Reference< uno::XInterface > & /*xFieldInterface*/,
+ uno::Reference< beans::XPropertySet > xFieldProperties)
+{
+ xFieldProperties->setPropertyValue
+ ( rPropNameSupplier.GetName(PROP_FULL_NAME), uno::makeAny( true ));
+ ::rtl::OUString sParam =
+ lcl_ExtractParameter(pContext->GetCommand(), sizeof(" AUTHOR") );
+ if(sParam.getLength())
+ {
+ xFieldProperties->setPropertyValue(
+ rPropNameSupplier.GetName( PROP_IS_FIXED ),
+ uno::makeAny( true ));
+ //PROP_CURRENT_PRESENTATION is set later anyway
+ }
+}
+
+ void DomainMapper_Impl::handleDocProperty
+ (FieldContextPtr pContext,
+ PropertyNameSupplier& rPropNameSupplier,
+ uno::Reference< uno::XInterface > & xFieldInterface,
+ uno::Reference< beans::XPropertySet > xFieldProperties)
+{
+ //some docproperties should be imported as document statistic fields, some as DocInfo fields
+ //others should be user fields
+ ::rtl::OUString sParam =
+ lcl_ExtractParameter(pContext->GetCommand(), sizeof(" DOCPROPERTY") );
+
+ if(sParam.getLength())
+ {
+ #define SET_ARABIC 0x01
+ #define SET_FULL_NAME 0x02
+ struct DocPropertyMap
+ {
+ const sal_Char* pDocPropertyName;
+ const sal_Char* pServiceName;
+ sal_uInt8 nFlags;
+ };
+ static const DocPropertyMap aDocProperties[] =
+ {
+ {"Author", "Author", SET_FULL_NAME},
+ {"CreateTime", "DocInfo.CreateDateTime", 0},
+ {"Characters", "CharacterCount", SET_ARABIC},
+ {"Comments", "DocInfo.Description", 0},
+ {"Keywords", "DocInfo.KeyWords", 0},
+ {"LastPrinted", "DocInfo.PrintDateTime", 0},
+ {"LastSavedBy", "DocInfo.ChangeAuthor", 0},
+ {"LastSavedTime", "DocInfo.ChangeDateTime", 0},
+ {"Paragraphs", "ParagraphCount", SET_ARABIC},
+ {"RevisionNumber", "DocInfo.Revision", 0},
+ {"Subject", "DocInfo.Subject", 0},
+ {"Template", "TemplateName", 0},
+ {"Title", "DocInfo.Title", 0},
+ {"TotalEditingTime", "DocInfo.EditTime", 9},
+ {"Words", "WordCount", SET_ARABIC}
+
+ //other available DocProperties:
+ //Bytes, Category, CharactersWithSpaces, Company
+ //HyperlinkBase,
+ //Lines, Manager, NameofApplication, ODMADocId, Pages,
+ //Security,
+ };
+ //search for a field mapping
+ ::rtl::OUString sFieldServiceName;
+ sal_uInt16 nMap = 0;
+ for( ; nMap < sizeof(aDocProperties) / sizeof(DocPropertyMap);
+ ++nMap )
+ {
+ if(sParam.equalsAscii(aDocProperties[nMap].pDocPropertyName))
+ {
+ sFieldServiceName =
+ ::rtl::OUString::createFromAscii
+ (aDocProperties[nMap].pServiceName);
+ break;
+ }
+ }
+ ::rtl::OUString sServiceName(RTL_CONSTASCII_USTRINGPARAM
+ ("com.sun.star.text.TextField."));
+ bool bIsCustomField = false;
+ if(!sFieldServiceName.getLength())
+ {
+ //create a custom property field
+ sServiceName +=
+ ::rtl::OUString::createFromAscii("DocInfo.Custom");
+ bIsCustomField = true;
+ }
+ else
+ {
+ sServiceName += sFieldServiceName;
+ }
+ xFieldInterface = m_xTextFactory->createInstance(sServiceName);
+ xFieldProperties =
+ uno::Reference< beans::XPropertySet >( xFieldInterface,
+ uno::UNO_QUERY_THROW);
+ if( bIsCustomField )
+ xFieldProperties->setPropertyValue(
+ rPropNameSupplier.GetName(PROP_NAME), uno::makeAny( sParam ));
+ else
+ {
+ if(0 != (aDocProperties[nMap].nFlags & SET_ARABIC))
+ xFieldProperties->setPropertyValue(
+ rPropNameSupplier.GetName(PROP_NUMBERING_TYPE),
+ uno::makeAny( style::NumberingType::ARABIC ));
+ else if(0 != (aDocProperties[nMap].nFlags & SET_FULL_NAME))
+ xFieldProperties->setPropertyValue(
+ rPropNameSupplier.GetName(PROP_FULL_NAME),
+ uno::makeAny( true ));
+ }
+ }
+
+#undef SET_ARABIC
+#undef SET_FULL_NAME
+}
+
+void DomainMapper_Impl::handleToc
+ (FieldContextPtr pContext,
+ PropertyNameSupplier& rPropNameSupplier,
+ uno::Reference< uno::XInterface > & /*xFieldInterface*/,
+ uno::Reference< beans::XPropertySet > /*xFieldProperties*/,
+ const ::rtl::OUString & sTOCServiceName)
+{
+ ::rtl::OUString sValue;
+ bool bTableOfFigures = false;
+ bool bHyperlinks = false;
+ bool bFromOutline = false;
+ bool bFromEntries = false;
+ sal_Int16 nMaxLevel = 10;
+ ::rtl::OUString sTemplate;
+ ::rtl::OUString sChapterNoSeparator;
+// \a Builds a table of figures but does not include the captions's label and number
+ if( lcl_FindInCommand( pContext->GetCommand(), 'a', sValue ))
+ { //make it a table of figures
+ bTableOfFigures = true;
+ }
+// \b Uses a bookmark to specify area of document from which to build table of contents
+// if( lcl_FindInCommand( pContext->GetCommand(), 'b', sValue ))
+// { //todo: sValue contains the bookmark name - unsupported feature
+// }
+ if( lcl_FindInCommand( pContext->GetCommand(), 'c', sValue ))
+// \c Builds a table of figures of the given label
+ {
+ //todo: sValue contains the label's name
+ bTableOfFigures = true;
+ }
+// \d Defines the separator between sequence and page numbers
+ if( lcl_FindInCommand( pContext->GetCommand(), 'd', sValue ))
+ {
+ //todo: insert the chapter number into each level and insert the separator additionally
+ sChapterNoSeparator = sValue;
+ }
+// \f Builds a table of contents using TC entries instead of outline levels
+ if( lcl_FindInCommand( pContext->GetCommand(), 'f', sValue ))
+ {
+ //todo: sValue can contain a TOC entry identifier - use unclear
+ bFromEntries = true;
+ }
+// \h Hyperlinks the entries and page numbers within the table of contents
+ if( lcl_FindInCommand( pContext->GetCommand(), 'h', sValue ))
+ {
+ //todo: make all entries to hyperlinks
+ bHyperlinks = true;
+ }
+// \l Defines the TC entries field level used to build a table of contents
+// if( lcl_FindInCommand( pContext->GetCommand(), 'l', sValue ))
+// {
+ //todo: entries can only be included completely
+// }
+// \n Builds a table of contents or a range of entries, sucah as “1-9”, in a table of contents without page numbers
+// if( lcl_FindInCommand( pContext->GetCommand(), 'n', sValue ))
+// {
+ //todo: what does the description mean?
+// }
+// \o Builds a table of contents by using outline levels instead of TC entries
+ if( lcl_FindInCommand( pContext->GetCommand(), 'o', sValue ))
+ {
+ bFromOutline = true;
+ UniString sParam( sValue );
+ xub_StrLen nIndex = 0;
+ sParam.GetToken( 0, '-', nIndex );
+ nMaxLevel = sal_Int16( sParam.Copy( nIndex ).ToInt32( ) );
+ }
+// \p Defines the separator between the table entry and its page number
+ if( lcl_FindInCommand( pContext->GetCommand(), 'p', sValue ))
+ { }
+// \s Builds a table of contents by using a sequence type
+ if( lcl_FindInCommand( pContext->GetCommand(), 's', sValue ))
+ { }
+// \t Builds a table of contents by using style names other than the standard outline styles
+ if( lcl_FindInCommand( pContext->GetCommand(), 't', sValue ))
+ {
+ sal_Int32 nPos = 0;
+ ::rtl::OUString sToken = sValue.getToken( 1, '"', nPos);
+ sTemplate = sToken.getLength() ? sToken : sValue;
+ }
+// \u Builds a table of contents by using the applied paragraph outline level
+ if( lcl_FindInCommand( pContext->GetCommand(), 'u', sValue ))
+ {
+ bFromOutline = true;
+ //todo: what doesn 'the applied paragraph outline level' refer to?
+ }
+// \w Preserve tab characters within table entries
+// if( lcl_FindInCommand( pContext->GetCommand(), 'w', sValue ))
+// {
+ //todo: not supported
+// }
+// \x Preserve newline characters within table entries
+// if( lcl_FindInCommand( pContext->GetCommand(), 'x', sValue ))
+// {
+ //todo: unsupported
+// }
+// \z Hides page numbers within the table of contens when shown in Web Layout View
+// if( lcl_FindInCommand( pContext->GetCommand(), 'z', sValue ))
+// { //todo: unsupported feature }
+
+ //if there's no option then it should be created from outline
+ if( !bFromOutline && !bFromEntries && !sTemplate.getLength() )
+ bFromOutline = true;
+
+ uno::Reference< beans::XPropertySet > xTOC(
+ m_xTextFactory->createInstance
+ ( bTableOfFigures ?
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM
+ ("com.sun.star.text.IllustrationsIndex"))
+ : sTOCServiceName),
+ uno::UNO_QUERY_THROW);
+ xTOC->setPropertyValue(rPropNameSupplier.GetName( PROP_TITLE ), uno::makeAny(::rtl::OUString()));
+ if( !bTableOfFigures )
+ {
+ xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_LEVEL ), uno::makeAny( nMaxLevel ) );
+ xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_OUTLINE ), uno::makeAny( bFromOutline ));
+ xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_MARKS ), uno::makeAny( bFromEntries ));
+ if( sTemplate.getLength() )
+ {
+ //the string contains comma separated the names and related levels
+ //like: "Heading 1,1,Heading 2,2"
+ TOCStyleMap aMap;
+ sal_Int32 nLevel;
+ sal_Int32 nPosition = 0;
+ while( nPosition >= 0)
+ {
+ ::rtl::OUString sStyleName = sTemplate.getToken( 0, ',', nPosition );
+ //empty tokens should be skipped
+ while( !sStyleName.getLength() && nPosition > 0 )
+ sStyleName = sTemplate.getToken( 0, ',', nPosition );
+ nLevel = sTemplate.getToken( 0, ',', nPosition ).toInt32();
+ if( !nLevel )
+ nLevel = 1;
+ if( sStyleName.getLength() )
+ aMap.insert( TOCStyleMap::value_type(nLevel, sStyleName) );
+ }
+ uno::Reference< container::XIndexReplace> xParaStyles;
+ xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_PARAGRAPH_STYLES)) >>= xParaStyles;
+ for( nLevel = 1; nLevel < 10; ++nLevel)
+ {
+ sal_Int32 nLevelCount = aMap.count( nLevel );
+ if( nLevelCount )
+ {
+ TOCStyleMap::iterator aTOCStyleIter = aMap.find( nLevel );
+
+ uno::Sequence< rtl::OUString> aStyles( nLevelCount );
+ for ( sal_Int32 nStyle = 0; nStyle < nLevelCount; ++nStyle, ++aTOCStyleIter )
+ {
+ aStyles[nStyle] = aTOCStyleIter->second;
+ }
+ xParaStyles->replaceByIndex(nLevel - 1, uno::makeAny(aStyles));
+ }
+ }
+ xTOC->setPropertyValue(rPropNameSupplier.GetName(PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES), uno::makeAny( true ));
+
+ }
+ if(bHyperlinks || sChapterNoSeparator.getLength())
+ {
+ uno::Reference< container::XIndexReplace> xLevelFormats;
+ xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_FORMAT)) >>= xLevelFormats;
+ sal_Int32 nLevelCount = xLevelFormats->getCount();
+ //start with level 1, 0 is the header level
+ for( sal_Int32 nLevel = 1; nLevel < nLevelCount; ++nLevel)
+ {
+ uno::Sequence< beans::PropertyValues > aLevel;
+ xLevelFormats->getByIndex( nLevel ) >>= aLevel;
+ //create a copy of the level and add two new entries - hyperlink start and end
+ bool bChapterNoSeparator = sChapterNoSeparator.getLength() > 0;
+ sal_Int32 nAdd = (bHyperlinks && bChapterNoSeparator) ? 4 : 2;
+ uno::Sequence< beans::PropertyValues > aNewLevel( aLevel.getLength() + nAdd);
+ beans::PropertyValues* pNewLevel = aNewLevel.getArray();
+ if( bHyperlinks )
+ {
+ beans::PropertyValues aHyperlink(1);
+ aHyperlink[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE );
+ aHyperlink[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_HYPERLINK_START );
+ pNewLevel[0] = aHyperlink;
+ aHyperlink[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_HYPERLINK_END );
+ pNewLevel[aNewLevel.getLength() -1] = aHyperlink;
+ }
+ if( bChapterNoSeparator )
+ {
+ beans::PropertyValues aChapterNo(2);
+ aChapterNo[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE );
+ aChapterNo[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_CHAPTER_INFO );
+ aChapterNo[1].Name = rPropNameSupplier.GetName( PROP_CHAPTER_FORMAT );
+ //todo: is ChapterFormat::Number correct?
+ aChapterNo[1].Value <<= (sal_Int16)text::ChapterFormat::NUMBER;
+ pNewLevel[aNewLevel.getLength() - (bHyperlinks ? 4 : 2) ] = aChapterNo;
+
+ beans::PropertyValues aChapterSeparator(2);
+ aChapterSeparator[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE );
+ aChapterSeparator[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_TEXT );
+ aChapterSeparator[1].Name = rPropNameSupplier.GetName( PROP_TEXT );
+ aChapterSeparator[1].Value <<= sChapterNoSeparator;
+ pNewLevel[aNewLevel.getLength() - (bHyperlinks ? 3 : 1)] = aChapterSeparator;
+ }
+ //copy the 'old' entries except the last (page no)
+ for( sal_Int32 nToken = 0; nToken < aLevel.getLength() - 1; ++nToken)
+ {
+ pNewLevel[nToken + 1] = aLevel[nToken];
+ }
+ //copy page no entry (last or last but one depending on bHyperlinks
+ sal_Int32 nPageNo = aNewLevel.getLength() - (bHyperlinks ? 2 : 3);
+ pNewLevel[nPageNo] = aLevel[aLevel.getLength() - 1];
+
+ xLevelFormats->replaceByIndex( nLevel, uno::makeAny( aNewLevel ) );
+ }
+ }
+ }
+ pContext->SetTOC( xTOC );
+}
+
+
/*-- 29.01.2007 11:33:16---------------------------------------------------
//the field command has to be closed (0x14 appeared)
-----------------------------------------------------------------------*/
void DomainMapper_Impl::CloseFieldCommand()
{
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->element("closeFieldCommand");
+#endif
+
FieldContextPtr pContext = m_aFieldStack.top();
OSL_ENSURE( pContext.get(), "no field context available");
if( pContext.get() )
{
- static FieldConversionMap_t aFieldConversionMap;
- static bool bFilled = false;
m_bSetUserFieldContent = false;
- if(!bFilled)
- {
- static const FieldConversion aFields[] =
- {
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ADDRESSBLOCK")), "", "", FIELD_ADDRESSBLOCK },
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ADVANCE")), "", "", FIELD_ADVANCE },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ASK")), "SetExpression", "SetExpression", FIELD_ASK },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUM")), "SetExpression", "SetExpression", FIELD_AUTONUM },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUMLGL")), "SetExpression", "SetExpression", FIELD_AUTONUMLGL },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUMOUT")), "SetExpression", "SetExpression", FIELD_AUTONUMOUT },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTHOR")), "Author", "", FIELD_AUTHOR },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE")), "DateTime", "", FIELD_DATE },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("COMMENTS")), "DocInfo.Description", "", FIELD_COMMENTS },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CREATEDATE")), "DocInfo.CreateDateTime", "", FIELD_CREATEDATE },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOCPROPERTY")), "", "", FIELD_DOCPROPERTY },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOCVARIABLE")), "User", "", FIELD_DOCVARIABLE },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EDITTIME")), "DocInfo.EditTime", "", FIELD_EDITTIME },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILLIN")), "Input", "", FIELD_FILLIN },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILENAME")), "FileName", "", FIELD_FILENAME },
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILESIZE")), "", "", FIELD_FILESIZE },
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FORMULA")), "", "", FIELD_FORMULA
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GOTOBUTTON")), "", "", FIELD_GOTOBUTTON },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HYPERLINK")), "", "", FIELD_HYPERLINK },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IF")), "ConditionalText", "", FIELD_IF },
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INFO")), "","", FIELD_INFO },
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INCLUDEPICTURE")), "", "", FIELD_INCLUDEPICTURE},
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KEYWORDS")), "DocInfo.KeyWords", "", FIELD_KEYWORDS },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LASTSAVEDBY")), "DocInfo.ChangeAuthor", "", FIELD_LASTSAVEDBY },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MACROBUTTON")), "Macro", "", FIELD_MACROBUTTON },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGEFIELD")), "Database", "Database", FIELD_MERGEFIELD},
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGEREC")), "DatabaseNumberOfSet", "", FIELD_MERGEREC },
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGESEQ")), "", "", FIELD_MERGESEQ },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NEXT")), "DatabaseNextSet", "", FIELD_NEXT },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NEXTIF")), "DatabaseNextSet", "", FIELD_NEXTIF },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PAGE")), "PageNumber", "", FIELD_PAGE },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REF")), "GetReference", "", FIELD_REF },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REVNUM")), "DocInfo.Revision", "", FIELD_REVNUM },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SAVEDATE")), "DocInfo.Change", "", FIELD_SAVEDATE },
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SECTION")), "", "", FIELD_SECTION },
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SECTIONPAGES")), "", "", FIELD_SECTIONPAGES },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SEQ")), "SetExpression", "SetExpression", FIELD_SEQ },
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SET")), "","", FIELD_SET },
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SKIPIF")),"", "", FIELD_SKIPIF },
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("STYLEREF")),"", "", FIELD_STYLEREF },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SUBJECT")), "DocInfo.Subject", "", FIELD_SUBJECT },
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SYMBOL")),"", "", FIELD_SYMBOL },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TEMPLATE")), "TemplateName", "", FIELD_TEMPLATE},
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME")), "DateTime", "", FIELD_TIME },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TITLE")), "DocInfo.Title", "", FIELD_TITLE },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERINITIALS")), "ExtendedUser", "", FIELD_USERINITIALS},
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERADDRESS")), "", "", FIELD_USERADDRESS },
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERNAME")), "ExtendedUser", "", FIELD_USERNAME }
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TOC")), "com.sun.star.text.ContentIndex", "", FIELD_TOC},
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TC")), "com.sun.star.text.ContentIndexMark", "", FIELD_TC},
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMCHARS")), "CharacterCount", "", FIELD_NUMCHARS},
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMWORDS")), "WordCount", "", FIELD_NUMWORDS},
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMPAGES")), "PageCount", "", FIELD_NUMPAGES},
-
- // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")), "", "", FIELD_},
-
- };
- size_t nConversions = sizeof(aFields)/sizeof(FieldConversion);
- for( size_t nConversion = 0; nConversion < nConversions; ++nConversion)
- {
- aFieldConversionMap.insert( FieldConversionMap_t::value_type(
- aFields[nConversion].sWordCommand,
- aFields[nConversion] ));
- }
+ FieldConversionMap_t aFieldConversionMap = lcl_GetFieldConversion();
- bFilled = true;
- }
try
{
uno::Reference< uno::XInterface > xFieldInterface;
@@ -2697,14 +2912,31 @@ void DomainMapper_Impl::CloseFieldCommand()
if(aIt != aFieldConversionMap.end())
{
uno::Reference< beans::XPropertySet > xFieldProperties;
- if( FIELD_HYPERLINK != aIt->second.eFieldId &&
- FIELD_DOCPROPERTY != aIt->second.eFieldId &&
- FIELD_TOC != aIt->second.eFieldId &&
- FIELD_TC != aIt->second.eFieldId)
+ bool bCreateField = true;
+ switch (aIt->second.eFieldId)
+ {
+ case FIELD_HYPERLINK:
+ case FIELD_DOCPROPERTY:
+ case FIELD_TOC:
+ case FIELD_TC:
+ case FIELD_FORMCHECKBOX:
+ bCreateField = false;
+ break;
+ default:
+ break;
+ }
+ if( bCreateField)
{
//add the service prefix
OUString sServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField."));
sServiceName += ::rtl::OUString::createFromAscii(aIt->second.cFieldServiceName );
+
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->startElement("fieldService");
+ dmapper_logger->chars(sServiceName);
+ dmapper_logger->endElement("fieldService");
+#endif
+
xFieldInterface = m_xTextFactory->createInstance(sServiceName);
xFieldProperties = uno::Reference< beans::XPropertySet >( xFieldInterface, uno::UNO_QUERY_THROW);
}
@@ -2714,69 +2946,15 @@ void DomainMapper_Impl::CloseFieldCommand()
case FIELD_ADDRESSBLOCK: break;
case FIELD_ADVANCE : break;
case FIELD_ASK :
- {
- //doesn the command contain a variable name?
- ::rtl::OUString sVariable, sHint;
-
- sVariable = lcl_ExctractAskVariableAndHint( pContext->GetCommand(), sHint );
- if(sVariable.getLength())
- {
- // determine field master name
- uno::Reference< beans::XPropertySet > xMaster = FindOrCreateFieldMaster(
- "com.sun.star.text.FieldMaster.SetExpression", sVariable );
-
- // attach the master to the field
- uno::Reference< text::XDependentTextField > xDependentField( xFieldInterface, uno::UNO_QUERY_THROW );
- xDependentField->attachTextFieldMaster( xMaster );
-
- // set input flag at the field
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_IS_INPUT), uno::makeAny( true ));
- // set the prompt
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_HINT),
- uno::makeAny( sHint ));
- }
- else
- {
- //don't insert the field
- //todo: maybe import a 'normal' input field here?
- xFieldInterface = 0;
- }
- }
+ handleFieldAsk(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties);
break;
case FIELD_AUTONUM :
case FIELD_AUTONUMLGL :
case FIELD_AUTONUMOUT :
- {
- //create a sequence field master "AutoNr"
- uno::Reference< beans::XPropertySet > xMaster = FindOrCreateFieldMaster(
- "com.sun.star.text.FieldMaster.SetExpression",
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoNr") ));
-
- xMaster->setPropertyValue( rPropNameSupplier.GetName(PROP_SUB_TYPE),
- uno::makeAny(text::SetVariableType::SEQUENCE));
-
- //apply the numbering type
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_NUMBERING_TYPE),
- uno::makeAny( lcl_ParseNumberingType(pContext->GetCommand()) ));
- // attach the master to the field
- uno::Reference< text::XDependentTextField > xDependentField( xFieldInterface, uno::UNO_QUERY_THROW );
- xDependentField->attachTextFieldMaster( xMaster );
- }
+ handleAutoNum(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties);
break;
case FIELD_AUTHOR :
- {
- xFieldProperties->setPropertyValue( rPropNameSupplier.GetName(PROP_FULL_NAME), uno::makeAny( true ));
- ::rtl::OUString sParam = lcl_ExtractParameter(pContext->GetCommand(), sizeof(" AUTHOR") );
- if(sParam.getLength())
- {
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName( PROP_IS_FIXED ), uno::makeAny( true ));
- //PROP_CURRENT_PRESENTATION is set later anyway
- }
- }
+ handleAuthor(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties);
break;
case FIELD_DATE:
{
@@ -2807,86 +2985,7 @@ void DomainMapper_Impl::CloseFieldCommand()
}
break;
case FIELD_DOCPROPERTY :
- {
- //some docproperties should be imported as document statistic fields, some as DocInfo fields
- //others should be user fields
- ::rtl::OUString sParam = lcl_ExtractParameter(pContext->GetCommand(), sizeof(" DOCPROPERTY") );
- if(sParam.getLength())
- {
- #define SET_ARABIC 0x01
- #define SET_FULL_NAME 0x02
- struct DocPropertyMap
- {
- const sal_Char* pDocPropertyName;
- const sal_Char* pServiceName;
- sal_uInt8 nFlags;
- };
- static const DocPropertyMap aDocProperties[] =
- {
- {"Author", "Author", SET_FULL_NAME},
- {"CreateTime", "DocInfo.CreateDateTime", 0},
- {"Characters", "CharacterCount", SET_ARABIC},
- {"Comments", "DocInfo.Description", 0},
- {"Keywords", "DocInfo.KeyWords", 0},
- {"LastPrinted", "DocInfo.PrintDateTime", 0},
- {"LastSavedBy", "DocInfo.ChangeAuthor", 0},
- {"LastSavedTime", "DocInfo.ChangeDateTime", 0},
- {"Paragraphs", "ParagraphCount", SET_ARABIC},
- {"RevisionNumber", "DocInfo.Revision", 0},
- {"Subject", "DocInfo.Subject", 0},
- {"Template", "TemplateName", 0},
- {"Title", "DocInfo.Title", 0},
- {"TotalEditingTime", "DocInfo.EditTime", 9},
- {"Words", "WordCount", SET_ARABIC}
-
- //other available DocProperties:
- //Bytes, Category, CharactersWithSpaces, Company
- //HyperlinkBase,
- //Lines, Manager, NameofApplication, ODMADocId, Pages,
- //Security,
- };
- //search for a field mapping
- ::rtl::OUString sFieldServiceName;
- sal_uInt16 nMap = 0;
- for( ; nMap < sizeof(aDocProperties) / sizeof(DocPropertyMap); ++nMap )
- {
- if(sParam.equalsAscii(aDocProperties[nMap].pDocPropertyName))
- {
- sFieldServiceName = ::rtl::OUString::createFromAscii(aDocProperties[nMap].pServiceName);
- break;
- }
- }
- ::rtl::OUString sServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField."));
- bool bIsCustomField = false;
- if(!sFieldServiceName.getLength())
- {
- //create a custom property field
- sServiceName += ::rtl::OUString::createFromAscii("DocInfo.Custom");
- bIsCustomField = true;
- }
- else
- {
- sServiceName += sFieldServiceName;
- }
- xFieldInterface = m_xTextFactory->createInstance(sServiceName);
- xFieldProperties = uno::Reference< beans::XPropertySet >( xFieldInterface, uno::UNO_QUERY_THROW);
- if( bIsCustomField )
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_NAME), uno::makeAny( sParam ));
- else
- {
- if(0 != (aDocProperties[nMap].nFlags & SET_ARABIC))
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_NUMBERING_TYPE),
- uno::makeAny( style::NumberingType::ARABIC ));
- else if(0 != (aDocProperties[nMap].nFlags & SET_FULL_NAME))
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_FULL_NAME), uno::makeAny( true ));
- }
- }
- }
- #undef SET_ARABIC
- #undef SET_FULL_NAME
+ handleDocProperty(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties);
break;
case FIELD_DOCVARIABLE :
{
@@ -2919,13 +3018,79 @@ void DomainMapper_Impl::CloseFieldCommand()
break;
case FIELD_FILESIZE : break;
case FIELD_FORMULA : break;
+ case FIELD_FORMCHECKBOX :
+ {
+ FFDataHandler::Pointer_t
+ pFFDataHandler(pContext->getFFDataHandler());
+ FormControlHelper::Pointer_t
+ pFormControlHelper(new FormControlHelper
+ (FIELD_FORMCHECKBOX,
+ m_xTextDocument, pFFDataHandler));
+ pContext->setFormControlHelper(pFormControlHelper);
+ }
+ break;
+ case FIELD_FORMDROPDOWN : break;
+ case FIELD_FORMTEXT :
+ {
+ FFDataHandler::Pointer_t pFFDataHandler
+ (pContext->getFFDataHandler());
+
+ xFieldProperties->setPropertyValue
+ (rPropNameSupplier.GetName(PROP_HINT),
+ uno::makeAny(pFFDataHandler->getStatusText()));
+ xFieldProperties->setPropertyValue
+ (rPropNameSupplier.GetName(PROP_HELP),
+ uno::makeAny(pFFDataHandler->getHelpText()));
+ xFieldProperties->setPropertyValue
+ (rPropNameSupplier.GetName(PROP_CONTENT),
+ uno::makeAny(pFFDataHandler->getTextDefault()));
+ }
+ break;
case FIELD_GOTOBUTTON : break;
case FIELD_HYPERLINK:
{
- sal_Int32 nStartQuote = pContext->GetCommand().indexOf( '\"' );
- sal_Int32 nEndQuote = nStartQuote < pContext->GetCommand().getLength() + 1 ? pContext->GetCommand().indexOf( '\"', nStartQuote + 1) : -1;
- if( nEndQuote > 0)
- pContext->SetHyperlinkURL( pContext->GetCommand().copy(nStartQuote + 1, nEndQuote - nStartQuote - 1) );
+ ::std::vector<rtl::OUString> aParts = pContext->GetCommandParts();
+ ::std::vector<rtl::OUString>::const_iterator aItEnd = aParts.end();
+ ::std::vector<rtl::OUString>::const_iterator aPartIt = aParts.begin();
+
+ OUString sURL;
+
+ while (aPartIt != aItEnd)
+ {
+ if (aPartIt->equalsAscii("\\l"))
+ {
+ aPartIt++;
+
+ if (aPartIt == aItEnd)
+ break;
+
+ sURL = OUString('#');
+ sURL += *aPartIt;
+ }
+ else if (aPartIt->equalsAscii("\\m") ||
+ aPartIt->equalsAscii("\\n"))
+ {
+ }
+ else if (aPartIt->equalsAscii("\\o") ||
+ aPartIt->equalsAscii("\\t"))
+ {
+ aPartIt++;
+
+ if (aPartIt == aItEnd)
+ break;
+ }
+ else
+ {
+ sURL = *aPartIt;
+ }
+
+ aPartIt++;
+ }
+
+ if (sURL.getLength() > 0)
+ {
+ pContext->SetHyperlinkURL(sURL);
+ }
}
break;
case FIELD_IF : break;
@@ -3065,211 +3230,8 @@ void DomainMapper_Impl::CloseFieldCommand()
case FIELD_USERNAME : //todo: user name is firstname + lastname
break;
case FIELD_TOC:
- {
- ::rtl::OUString sValue;
- bool bTableOfFigures = false;
- bool bHyperlinks = false;
- bool bFromOutline = false;
- bool bFromEntries = false;
- sal_Int16 nMaxLevel = 10;
- ::rtl::OUString sTemplate;
- ::rtl::OUString sChapterNoSeparator;
- // \a Builds a table of figures but does not include the captions's label and number
- if( lcl_FindInCommand( pContext->GetCommand(), 'a', sValue ))
- { //make it a table of figures
- bTableOfFigures = true;
- }
- // \b Uses a bookmark to specify area of document from which to build table of contents
- // if( lcl_FindInCommand( pContext->GetCommand(), 'b', sValue ))
- // { //todo: sValue contains the bookmark name - unsupported feature
- // }
- if( lcl_FindInCommand( pContext->GetCommand(), 'c', sValue ))
- // \c Builds a table of figures of the given label
- {
- //todo: sValue contains the label's name
- bTableOfFigures = true;
- }
- // \d Defines the separator between sequence and page numbers
- if( lcl_FindInCommand( pContext->GetCommand(), 'd', sValue ))
- {
- //todo: insert the chapter number into each level and insert the separator additionally
- sChapterNoSeparator = sValue;
- }
- // \f Builds a table of contents using TC entries instead of outline levels
- if( lcl_FindInCommand( pContext->GetCommand(), 'f', sValue ))
- {
- //todo: sValue can contain a TOC entry identifier - use unclear
- bFromEntries = true;
- }
- // \h Hyperlinks the entries and page numbers within the table of contents
- if( lcl_FindInCommand( pContext->GetCommand(), 'h', sValue ))
- {
- //todo: make all entries to hyperlinks
- bHyperlinks = true;
- }
- // \l Defines the TC entries field level used to build a table of contents
- // if( lcl_FindInCommand( pContext->GetCommand(), 'l', sValue ))
- // {
- //todo: entries can only be included completely
- // }
- // \n Builds a table of contents or a range of entries, sucah as “1-9”, in a table of contents without page numbers
- // if( lcl_FindInCommand( pContext->GetCommand(), 'n', sValue ))
- // {
- //todo: what does the description mean?
- // }
- // \o Builds a table of contents by using outline levels instead of TC entries
- if( lcl_FindInCommand( pContext->GetCommand(), 'o', sValue ))
- {
- bFromOutline = true;
- UniString sParam( sValue );
- xub_StrLen nIndex = 0;
- sParam.GetToken( 0, '-', nIndex );
- nMaxLevel = sal_Int16( sParam.Copy( nIndex ).ToInt32( ) );
- }
- // \p Defines the separator between the table entry and its page number
- if( lcl_FindInCommand( pContext->GetCommand(), 'p', sValue ))
- { }
- // \s Builds a table of contents by using a sequence type
- if( lcl_FindInCommand( pContext->GetCommand(), 's', sValue ))
- { }
- // \t Builds a table of contents by using style names other than the standard outline styles
- if( lcl_FindInCommand( pContext->GetCommand(), 't', sValue ))
- {
- sal_Int32 nPos = 0;
- ::rtl::OUString sToken = sValue.getToken( 1, '"', nPos);
- sTemplate = sToken.getLength() ? sToken : sValue;
- }
- // \u Builds a table of contents by using the applied paragraph outline level
- if( lcl_FindInCommand( pContext->GetCommand(), 'u', sValue ))
- {
- bFromOutline = true;
- //todo: what doesn 'the applied paragraph outline level' refer to?
- }
- // \w Preserve tab characters within table entries
- // if( lcl_FindInCommand( pContext->GetCommand(), 'w', sValue ))
- // {
- //todo: not supported
- // }
- // \x Preserve newline characters within table entries
- // if( lcl_FindInCommand( pContext->GetCommand(), 'x', sValue ))
- // {
- //todo: unsupported
- // }
- // \z Hides page numbers within the table of contens when shown in Web Layout View
- // if( lcl_FindInCommand( pContext->GetCommand(), 'z', sValue ))
- // { //todo: unsupported feature }
-
- //if there's no option then it should be created from outline
- if( !bFromOutline && !bFromEntries && !sTemplate.getLength() )
- bFromOutline = true;
-
- uno::Reference< beans::XPropertySet > xTOC(
- m_xTextFactory->createInstance(
- bTableOfFigures ?
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.IllustrationsIndex")) :
- ::rtl::OUString::createFromAscii(aIt->second.cFieldServiceName)),
- uno::UNO_QUERY_THROW);
- xTOC->setPropertyValue(rPropNameSupplier.GetName( PROP_TITLE ), uno::makeAny(::rtl::OUString()));
- if( !bTableOfFigures )
- {
- xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_LEVEL ), uno::makeAny( nMaxLevel ) );
- xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_OUTLINE ), uno::makeAny( bFromOutline ));
- xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_MARKS ), uno::makeAny( bFromEntries ));
- if( sTemplate.getLength() )
- {
- //the string contains comma separated the names and related levels
- //like: "Heading 1,1,Heading 2,2"
- TOCStyleMap aMap;
- sal_Int32 nLevel;
- sal_Int32 nPosition = 0;
- while( nPosition >= 0)
- {
- ::rtl::OUString sStyleName = sTemplate.getToken( 0, ',', nPosition );
- //empty tokens should be skipped
- while( !sStyleName.getLength() && nPosition > 0 )
- sStyleName = sTemplate.getToken( 0, ',', nPosition );
- nLevel = sTemplate.getToken( 0, ',', nPosition ).toInt32();
- if( !nLevel )
- nLevel = 1;
- if( sStyleName.getLength() )
- aMap.insert( TOCStyleMap::value_type(nLevel, sStyleName) );
- }
- uno::Reference< container::XIndexReplace> xParaStyles;
- xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_PARAGRAPH_STYLES)) >>= xParaStyles;
- for( nLevel = 1; nLevel < 10; ++nLevel)
- {
- sal_Int32 nLevelCount = aMap.count( nLevel );
- if( nLevelCount )
- {
- TOCStyleMap::iterator aTOCStyleIter = aMap.find( nLevel );
-
- uno::Sequence< rtl::OUString> aStyles( nLevelCount );
- for ( sal_Int32 nStyle = 0; nStyle < nLevelCount; ++nStyle, ++aTOCStyleIter )
- {
- aStyles[nStyle] = aTOCStyleIter->second;
- }
- xParaStyles->replaceByIndex(nLevel - 1, uno::makeAny(aStyles));
- }
- }
- xTOC->setPropertyValue(rPropNameSupplier.GetName(PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES), uno::makeAny( true ));
-
- }
- if(bHyperlinks || sChapterNoSeparator.getLength())
- {
- uno::Reference< container::XIndexReplace> xLevelFormats;
- xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_FORMAT)) >>= xLevelFormats;
- sal_Int32 nLevelCount = xLevelFormats->getCount();
- //start with level 1, 0 is the header level
- for( sal_Int32 nLevel = 1; nLevel < nLevelCount; ++nLevel)
- {
- uno::Sequence< beans::PropertyValues > aLevel;
- xLevelFormats->getByIndex( nLevel ) >>= aLevel;
- //create a copy of the level and add two new entries - hyperlink start and end
- bool bChapterNoSeparator = sChapterNoSeparator.getLength() > 0;
- sal_Int32 nAdd = (bHyperlinks && bChapterNoSeparator) ? 4 : 2;
- uno::Sequence< beans::PropertyValues > aNewLevel( aLevel.getLength() + nAdd);
- beans::PropertyValues* pNewLevel = aNewLevel.getArray();
- if( bHyperlinks )
- {
- beans::PropertyValues aHyperlink(1);
- aHyperlink[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE );
- aHyperlink[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_HYPERLINK_START );
- pNewLevel[0] = aHyperlink;
- aHyperlink[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_HYPERLINK_END );
- pNewLevel[aNewLevel.getLength() -1] = aHyperlink;
- }
- if( bChapterNoSeparator )
- {
- beans::PropertyValues aChapterNo(2);
- aChapterNo[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE );
- aChapterNo[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_CHAPTER_INFO );
- aChapterNo[1].Name = rPropNameSupplier.GetName( PROP_CHAPTER_FORMAT );
- //todo: is ChapterFormat::Number correct?
- aChapterNo[1].Value <<= (sal_Int16)text::ChapterFormat::NUMBER;
- pNewLevel[aNewLevel.getLength() - (bHyperlinks ? 4 : 2) ] = aChapterNo;
-
- beans::PropertyValues aChapterSeparator(2);
- aChapterSeparator[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE );
- aChapterSeparator[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_TEXT );
- aChapterSeparator[1].Name = rPropNameSupplier.GetName( PROP_TEXT );
- aChapterSeparator[1].Value <<= sChapterNoSeparator;
- pNewLevel[aNewLevel.getLength() - (bHyperlinks ? 3 : 1)] = aChapterSeparator;
- }
- //copy the 'old' entries except the last (page no)
- for( sal_Int32 nToken = 0; nToken < aLevel.getLength() - 1; ++nToken)
- {
- pNewLevel[nToken + 1] = aLevel[nToken];
- }
- //copy page no entry (last or last but one depending on bHyperlinks
- sal_Int32 nPageNo = aNewLevel.getLength() - (bHyperlinks ? 2 : 3);
- pNewLevel[nPageNo] = aLevel[aLevel.getLength() - 1];
-
- xLevelFormats->replaceByIndex( nLevel, uno::makeAny( aNewLevel ) );
- }
- }
- }
- pContext->SetTOC( xTOC );
- }
+ handleToc(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties,
+ ::rtl::OUString::createFromAscii(aIt->second.cFieldServiceName));
break;
case FIELD_TC :
{
@@ -3343,6 +3305,11 @@ bool DomainMapper_Impl::IsFieldResultAsString()
-----------------------------------------------------------------------*/
void DomainMapper_Impl::SetFieldResult( ::rtl::OUString& rResult )
{
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->startElement("setFieldResult");
+ dmapper_logger->chars(rResult);
+#endif
+
FieldContextPtr pContext = m_aFieldStack.top();
OSL_ENSURE( pContext.get(), "no field context available");
if( pContext.get() )
@@ -3388,11 +3355,32 @@ void DomainMapper_Impl::SetFieldResult( ::rtl::OUString& rResult )
}
}
+void DomainMapper_Impl::SetFieldFFData(FFDataHandler::Pointer_t pFFDataHandler)
+{
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->startElement("setFieldFFData");
+#endif
+
+ FieldContextPtr pContext = m_aFieldStack.top();
+ if (pContext.get())
+ {
+ pContext->setFFDataHandler(pFFDataHandler);
+ }
+
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->endElement("setFieldFFData");
+#endif
+}
+
/*-- 29.01.2007 11:33:17---------------------------------------------------
//the end of field is reached (0x15 appeared) - the command might still be open
-----------------------------------------------------------------------*/
void DomainMapper_Impl::PopFieldContext()
{
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->element("popFieldContext");
+#endif
+
FieldContextPtr pContext = m_aFieldStack.top();
OSL_ENSURE( pContext.get(), "no field context available");
if( pContext.get() )
@@ -3426,15 +3414,23 @@ void DomainMapper_Impl::PopFieldContext()
uno::Reference< text::XTextAppendAndConvert > xTextAppendAndConvert( xTextAppend, uno::UNO_QUERY_THROW );
xTextAppendAndConvert->appendTextContent( xToInsert, uno::Sequence< beans::PropertyValue >() );
}
- else if(pContext->GetHyperlinkURL().getLength())
+ else
{
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
- xCrsr->gotoEnd( true );
+ FormControlHelper::Pointer_t pFormControlHelper(pContext->getFormControlHelper());
+ if (pFormControlHelper.get() != NULL)
+ {
+ uno::Reference<text::XTextRange> xTxtRange(xCrsr, uno::UNO_QUERY);
+ pFormControlHelper->insertControl(xTxtRange);
+ }
+ else if(pContext->GetHyperlinkURL().getLength())
+ {
+ PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
+ xCrsr->gotoEnd( true );
- uno::Reference< beans::XPropertySet > xCrsrProperties( xCrsr, uno::UNO_QUERY_THROW );
- xCrsrProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_HYPER_LINK_U_R_L), uno::
- makeAny(pContext->GetHyperlinkURL()));
+ uno::Reference< beans::XPropertySet > xCrsrProperties( xCrsr, uno::UNO_QUERY_THROW );
+ xCrsrProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_HYPER_LINK_U_R_L), uno::
+ makeAny(pContext->GetHyperlinkURL()));
+ }
}
}
}
@@ -3757,4 +3753,19 @@ void DomainMapper_Impl::ApplySettingsTable()
}
}
}
+
+SectionPropertyMap * DomainMapper_Impl::GetSectionContext()
+{
+ SectionPropertyMap* pSectionContext = 0;
+ //the section context is not availabe before the first call of startSectionGroup()
+ if( !IsAnyTableImport() )
+ {
+ PropertyMapPtr pContext = GetTopContextOfType(CONTEXT_SECTION);
+ OSL_ENSURE(pContext.get(), "Section context is not in the stack!");
+ pSectionContext = dynamic_cast< SectionPropertyMap* >( pContext.get() );
+ }
+
+ return pSectionContext;
+}
+
}}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 00881d45968f..145e19412a75 100644..100755
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -52,6 +52,8 @@
#include <SettingsTable.hxx>
#include <GraphicImport.hxx>
#include <OLEHandler.hxx>
+#include <FFDataHandler.hxx>
+#include <FormControlHelper.hxx>
#include <map>
#include <string.h>
@@ -134,6 +136,8 @@ class FieldContext
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xTOC;//TOX
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xTC;//TOX entry
::rtl::OUString m_sHyperlinkURL;
+ FFDataHandler::Pointer_t m_pFFDataHandler;
+ FormControlHelper::Pointer_t m_pFormControlHelper;
public:
FieldContext(::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xStart);
@@ -159,6 +163,13 @@ public:
void SetHyperlinkURL( const ::rtl::OUString& rURL ) { m_sHyperlinkURL = rURL; }
const ::rtl::OUString& GetHyperlinkURL() { return m_sHyperlinkURL; }
+ void setFFDataHandler(FFDataHandler::Pointer_t pFFDataHandler) { m_pFFDataHandler = pFFDataHandler; }
+ FFDataHandler::Pointer_t getFFDataHandler() const { return m_pFFDataHandler; }
+
+ void setFormControlHelper(FormControlHelper::Pointer_t pFormControlHelper) { m_pFormControlHelper = pFormControlHelper; }
+ FormControlHelper::Pointer_t getFormControlHelper() const { return m_pFormControlHelper; }
+
+ ::std::vector<rtl::OUString> GetCommandParts() const;
};
struct TextAppendContext
@@ -487,12 +498,40 @@ public:
bool IsOpenField() const;
//collect the pieces of the command
void AppendFieldCommand(::rtl::OUString& rPartOfCommand);
+ void handleFieldAsk
+ (FieldContextPtr pContext,
+ PropertyNameSupplier& rPropNameSupplier,
+ uno::Reference< uno::XInterface > & xFieldInterface,
+ uno::Reference< beans::XPropertySet > xFieldProperties);
+ void handleAutoNum
+ (FieldContextPtr pContext,
+ PropertyNameSupplier& rPropNameSupplier,
+ uno::Reference< uno::XInterface > & xFieldInterface,
+ uno::Reference< beans::XPropertySet > xFieldProperties);
+ void handleAuthor
+ (FieldContextPtr pContext,
+ PropertyNameSupplier& rPropNameSupplier,
+ uno::Reference< uno::XInterface > & xFieldInterface,
+ uno::Reference< beans::XPropertySet > xFieldProperties);
+ void handleDocProperty
+ (FieldContextPtr pContext,
+ PropertyNameSupplier& rPropNameSupplier,
+ uno::Reference< uno::XInterface > & xFieldInterface,
+ uno::Reference< beans::XPropertySet > xFieldProperties);
+ void handleToc
+ (FieldContextPtr pContext,
+ PropertyNameSupplier& rPropNameSupplier,
+ uno::Reference< uno::XInterface > & xFieldInterface,
+ uno::Reference< beans::XPropertySet > xFieldProperties,
+ const ::rtl::OUString & sTOCServiceName);
//the field command has to be closed (0x14 appeared)
void CloseFieldCommand();
//the _current_ fields require a string type result while TOCs accept richt results
bool IsFieldResultAsString();
//apply the result text to the related field
void SetFieldResult( ::rtl::OUString& rResult );
+ // set FFData of top field context
+ void SetFieldFFData( FFDataHandler::Pointer_t pFFDataHandler );
//the end of field is reached (0x15 appeared) - the command might still be open
void PopFieldContext();
@@ -557,7 +596,7 @@ public:
void ResetParaRedline( );
void ApplySettingsTable();
-
+ SectionPropertyMap * GetSectionContext();
};
} //namespace dmapper
} //namespace writerfilter
diff --git a/writerfilter/source/dmapper/FFData.xml b/writerfilter/source/dmapper/FFData.xml
new file mode 100644
index 000000000000..525f59391dc4
--- /dev/null
+++ b/writerfilter/source/dmapper/FFData.xml
@@ -0,0 +1,58 @@
+<model>
+ <class name="FFDataHandler">
+ <parent name="Properties"/>
+ <typedef name="Pointer_t" type="shared_ptr"/>
+ <typedef name="DropDownEntries_t">
+ <vector type="OUString"/>
+ </typedef>
+ <member name="name" type="OUString"/>
+ <member name="enabled" type="bool"/>
+ <member name="calcOnExit" type="bool"/>
+ <member name="entryMacro" type="OUString"/>
+ <member name="exitMacro" type="OUString"/>
+ <member name="helpTextType" type="sal_uInt32"/>
+ <member name="helpText" type="OUString"/>
+ <member name="statusTextType" type="sal_uInt32"/>
+ <member name="statusText" type="OUString"/>
+ <member name="checkboxHeight" type="sal_uInt32"/>
+ <member name="checkboxAutoHeight" type="bool"/>
+ <member name="checkboxDefault" type="bool"/>
+ <member name="checkboxChecked" type="bool"/>
+ <member name="dropDownResult" type="OUString"/>
+ <member name="dropDownDefault" type="OUString"/>
+ <member name="dropDownEntries" type="DropDownEntries_t"/>
+ <member name="textType" type="sal_uInt32"/>
+ <member name="textMaxLength" type="sal_uInt32"/>
+ <member name="textDefault" type="OUString"/>
+ <member name="textFormat" type="OUString"/>
+ <sprm>
+ <element name="name" action="set" id="NS_ooxml::LN_CT_FFData_name"/>
+ <element name="enabled" action="set" id="NS_ooxml::LN_CT_FFData_enabled"/>
+ <element name="calcOnExit" action="set" id="NS_ooxml::LN_CT_FFData_calcOnExit"/>
+ <element name="entryMacro" action="set" id="NS_ooxml::LN_CT_FFData_entryMacro"/>
+ <element name="exitMacro" action="set" id="NS_ooxml::LN_CT_FFData_exitMacro"/>
+ <element name="helpText" action="resolve" id="NS_ooxml::LN_CT_FFData_helpText"/>
+ <element name="statusText" action="resolve" id="NS_ooxml::LN_CT_FFData_statusText"/>
+ <element name="size" member="checkboxHeight" action="set" id="NS_ooxml::LN_CT_FFCheckBox_size"/>
+ <element name="sizeAuto" member="checkboxAutoHeight" action="set" id="NS_ooxml::LN_CT_FFCheckBox_sizeAuto"/>
+ <element name="default" member="checkboxDefault" action="set" id="NS_ooxml::LN_CT_FFCheckBox_default"/>
+ <element name="checked" member="checkboxChecked" action="set" id="NS_ooxml::LN_CT_FFCheckBox_checked"/>
+ <element name="checkBox" action="resolve" id="NS_ooxml::LN_CT_FFData_checkBox"/>
+ <element name="result" member="dropDownResult" action="set" id="NS_ooxml::LN_CT_FFDDList_result"/>
+ <element name="default" member="dropDownDefault" action="set" id="NS_ooxml::LN_CT_FFDDList_default"/>
+ <element name="listEntry" member="dropDownEntries" action="pushback" id="NS_ooxml::LN_CT_FFDDList_listEntry"/>
+ <element name="ddList" action="resolve" id="NS_ooxml::LN_CT_FFData_ddList"/>
+ <element name="type" member="textType" action="set" id="NS_ooxml::LN_CT_FFTextInput_type"/>
+ <element name="default" member="textDefault" action="set" id="NS_ooxml::LN_CT_FFTextInput_default"/>
+ <element name="maxLength" member="textMaxLength" action="set" id="NS_ooxml::LN_CT_FFTextInput_maxLength"/>
+ <element name="format" member="textFormat" action="set" id="NS_ooxml::LN_CT_FFTextInput_format"/>
+ <element name="textInput" action="resolve" id="NS_ooxml::LN_CT_FFData_textInput"/>
+ </sprm>
+ <attribute>
+ <attribute name="helpText:type" member="helpTextType" id="NS_ooxml::LN_CT_FFHelpText_type"/>
+ <attribute name="helpText:val" member="helpText" id="NS_ooxml::LN_CT_FFHelpText_val"/>
+ <attribute name="statusText:type" member="statusTextType" id="NS_ooxml::LN_CT_FFStatusText_type"/>
+ <attribute name="statusText:val" member="statusText" id="NS_ooxml::LN_CT_FFStatusText_val"/>
+ </attribute>
+ </class>
+</model> \ No newline at end of file
diff --git a/writerfilter/source/dmapper/FFDataHandler.cxx b/writerfilter/source/dmapper/FFDataHandler.cxx
new file mode 100644
index 000000000000..9f9430401161
--- /dev/null
+++ b/writerfilter/source/dmapper/FFDataHandler.cxx
@@ -0,0 +1,483 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: PropertyMap.hxx,v $
+ * $Revision: 1.18 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "FFDataHandler.hxx"
+
+#include <ooxml/resourceids.hxx>
+#ifdef DEBUG_DOMAINMAPPER
+#include <resourcemodel/QNameToString.hxx>
+#include "dmapperLoggers.hxx"
+#endif
+namespace writerfilter {
+namespace dmapper {
+
+/************************
+ * class: FFDataHandler *
+ ************************/
+
+FFDataHandler::FFDataHandler()
+: m_bEnabled(false),
+ m_bCalcOnExit(false),
+ m_nHelpTextType(0),
+ m_nStatusTextType(0),
+ m_nCheckboxHeight(0),
+ m_bCheckboxAutoHeight(false),
+ m_bCheckboxDefault(false),
+ m_bCheckboxChecked(false),
+ m_nTextType(0),
+ m_nTextMaxLength(0)
+{
+}
+
+
+FFDataHandler::~FFDataHandler()
+{
+}
+
+// member: FFDataHandler::name
+void FFDataHandler::setName(const rtl::OUString & r_sName)
+{
+ m_sName = r_sName;
+}
+
+const rtl::OUString & FFDataHandler::getName() const
+{
+ return m_sName;
+}
+
+// member: FFDataHandler::enabled
+void FFDataHandler::setEnabled(bool r_enabled)
+{
+ m_bEnabled = r_enabled;
+}
+
+bool FFDataHandler::getEnabled() const
+{
+ return m_bEnabled;
+}
+
+// member: FFDataHandler::calcOnExit
+void FFDataHandler::setCalcOnExit(bool r_calcOnExit)
+{
+ m_bCalcOnExit = r_calcOnExit;
+}
+
+bool FFDataHandler::getCalcOnExit() const
+{
+ return m_bCalcOnExit;
+}
+
+// member: FFDataHandler::entryMacro
+void FFDataHandler::setEntryMacro(const rtl::OUString & r_sEntryMacro)
+{
+ m_sEntryMacro = r_sEntryMacro;
+}
+
+const rtl::OUString & FFDataHandler::getEntryMacro() const
+{
+ return m_sEntryMacro;
+}
+
+// member: FFDataHandler::exitMacro
+void FFDataHandler::setExitMacro(const rtl::OUString & r_sExitMacro)
+{
+ m_sExitMacro = r_sExitMacro;
+}
+
+const rtl::OUString & FFDataHandler::getExitMacro() const
+{
+ return m_sExitMacro;
+}
+
+// member: FFDataHandler::helpTextType
+void FFDataHandler::setHelpTextType(sal_uInt32 r_helpTextType)
+{
+ m_nHelpTextType = r_helpTextType;
+}
+
+sal_uInt32 FFDataHandler::getHelpTextType() const
+{
+ return m_nHelpTextType;
+}
+
+// member: FFDataHandler::helpText
+void FFDataHandler::setHelpText(const rtl::OUString & r_sHelpText)
+{
+ m_sHelpText = r_sHelpText;
+}
+
+const rtl::OUString & FFDataHandler::getHelpText() const
+{
+ return m_sHelpText;
+}
+
+// member: FFDataHandler::statusTextType
+void FFDataHandler::setStatusTextType(sal_uInt32 r_statusTextType)
+{
+ m_nStatusTextType = r_statusTextType;
+}
+
+sal_uInt32 FFDataHandler::getStatusTextType() const
+{
+ return m_nStatusTextType;
+}
+
+// member: FFDataHandler::statusText
+void FFDataHandler::setStatusText(const rtl::OUString & r_sStatusText)
+{
+ m_sStatusText = r_sStatusText;
+}
+
+const rtl::OUString & FFDataHandler::getStatusText() const
+{
+ return m_sStatusText;
+}
+
+// member: FFDataHandler::checkboxHeight
+void FFDataHandler::setCheckboxHeight(sal_uInt32 r_checkboxHeight)
+{
+ m_nCheckboxHeight = r_checkboxHeight;
+}
+
+sal_uInt32 FFDataHandler::getCheckboxHeight() const
+{
+ return m_nCheckboxHeight;
+}
+
+// member: FFDataHandler::checkboxAutoHeight
+void FFDataHandler::setCheckboxAutoHeight(bool r_checkboxAutoHeight)
+{
+ m_bCheckboxAutoHeight = r_checkboxAutoHeight;
+}
+
+bool FFDataHandler::getCheckboxAutoHeight() const
+{
+ return m_bCheckboxAutoHeight;
+}
+
+// member: FFDataHandler::checkboxDefault
+void FFDataHandler::setCheckboxDefault(bool r_checkboxDefault)
+{
+ m_bCheckboxDefault = r_checkboxDefault;
+}
+
+bool FFDataHandler::getCheckboxDefault() const
+{
+ return m_bCheckboxDefault;
+}
+
+// member: FFDataHandler::checkboxChecked
+void FFDataHandler::setCheckboxChecked(bool r_checkboxChecked)
+{
+ m_bCheckboxChecked = r_checkboxChecked;
+}
+
+bool FFDataHandler::getCheckboxChecked() const
+{
+ return m_bCheckboxChecked;
+}
+
+// member: FFDataHandler::dropDownResult
+void FFDataHandler::setDropDownResult(const rtl::OUString & r_sDropDownResult)
+{
+ m_sDropDownResult = r_sDropDownResult;
+}
+
+const rtl::OUString & FFDataHandler::getDropDownResult() const
+{
+ return m_sDropDownResult;
+}
+
+// member: FFDataHandler::dropDownDefault
+void FFDataHandler::setDropDownDefault(const rtl::OUString & r_sDropDownDefault)
+{
+ m_sDropDownDefault = r_sDropDownDefault;
+}
+
+const rtl::OUString & FFDataHandler::getDropDownDefault() const
+{
+ return m_sDropDownDefault;
+}
+
+// member: FFDataHandler::dropDownEntries
+void FFDataHandler::setDropDownEntries(const FFDataHandler::DropDownEntries_t & r_dropDownEntries)
+{
+ m_DropDownEntries = r_dropDownEntries;
+}
+
+const FFDataHandler::DropDownEntries_t & FFDataHandler::getDropDownEntries() const
+{
+ return m_DropDownEntries;
+}
+
+void FFDataHandler::dropDownEntriesPushBack(const rtl::OUString & r_Element)
+{
+ m_DropDownEntries.push_back(r_Element);
+}
+
+// member: FFDataHandler::textType
+void FFDataHandler::setTextType(sal_uInt32 r_textType)
+{
+ m_nTextType = r_textType;
+}
+
+sal_uInt32 FFDataHandler::getTextType() const
+{
+ return m_nTextType;
+}
+
+// member: FFDataHandler::textMaxLength
+void FFDataHandler::setTextMaxLength(sal_uInt32 r_textMaxLength)
+{
+ m_nTextMaxLength = r_textMaxLength;
+}
+
+sal_uInt32 FFDataHandler::getTextMaxLength() const
+{
+ return m_nTextMaxLength;
+}
+
+// member: FFDataHandler::textDefault
+void FFDataHandler::setTextDefault(const rtl::OUString & r_sTextDefault)
+{
+ m_sTextDefault = r_sTextDefault;
+}
+
+const rtl::OUString & FFDataHandler::getTextDefault() const
+{
+ return m_sTextDefault;
+}
+
+// member: FFDataHandler::textFormat
+void FFDataHandler::setTextFormat(const rtl::OUString & r_sTextFormat)
+{
+ m_sTextFormat = r_sTextFormat;
+}
+
+const rtl::OUString & FFDataHandler::getTextFormat() const
+{
+ return m_sTextFormat;
+}
+
+
+void FFDataHandler::sprm(Sprm & r_Sprm)
+{
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->startElement("FFDataHandler.sprm");
+ dmapper_logger->chars(r_Sprm.toString());
+#endif
+ switch(r_Sprm.getId())
+ {
+ case NS_ooxml::LN_CT_FFData_name:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_sName = r_Sprm.getValue()->getString();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFData_enabled:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_bEnabled = r_Sprm.getValue()->getInt();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFData_calcOnExit:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_bCalcOnExit = r_Sprm.getValue()->getInt();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFData_entryMacro:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_sEntryMacro = r_Sprm.getValue()->getString();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFData_exitMacro:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_sExitMacro = r_Sprm.getValue()->getString();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFData_helpText:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ resolveSprm(r_Sprm);
+ }
+ break;
+ case NS_ooxml::LN_CT_FFData_statusText:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ resolveSprm(r_Sprm);
+ }
+ break;
+ case NS_ooxml::LN_CT_FFCheckBox_size:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_nCheckboxHeight = r_Sprm.getValue()->getInt();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFCheckBox_sizeAuto:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_bCheckboxAutoHeight = r_Sprm.getValue()->getInt();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFCheckBox_default:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_bCheckboxDefault = r_Sprm.getValue()->getInt();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFCheckBox_checked:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_bCheckboxChecked = r_Sprm.getValue()->getInt();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFData_checkBox:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ resolveSprm(r_Sprm);
+ }
+ break;
+ case NS_ooxml::LN_CT_FFDDList_result:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_sDropDownResult = r_Sprm.getValue()->getString();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFDDList_default:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_sDropDownDefault = r_Sprm.getValue()->getString();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFDDList_listEntry:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_DropDownEntries.push_back(r_Sprm.getValue()->getString());;
+ }
+ break;
+ case NS_ooxml::LN_CT_FFData_ddList:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ resolveSprm(r_Sprm);
+ }
+ break;
+ case NS_ooxml::LN_CT_FFTextInput_type:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_nTextType = r_Sprm.getValue()->getInt();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFTextInput_default:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_sTextDefault = r_Sprm.getValue()->getString();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFTextInput_maxLength:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_nTextMaxLength = r_Sprm.getValue()->getInt();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFTextInput_format:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_sTextFormat = r_Sprm.getValue()->getString();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFData_textInput:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ resolveSprm(r_Sprm);
+ }
+ break;
+ default:
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->element("unhandled");
+#endif
+ break;
+ }
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->endElement("FFDataHandler.sprm");
+#endif
+}
+
+void FFDataHandler::resolveSprm(Sprm & r_Sprm)
+{
+ writerfilter::Reference<Properties>::Pointer_t pProperties = r_Sprm.getProps();
+ if( pProperties.get())
+ pProperties->resolve(*this);
+}
+
+void FFDataHandler::attribute(Id name, Value & val)
+{
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->startElement("FFDataHandler.attribute");
+ dmapper_logger->attribute("name", (*QNameToString::Instance())(name));
+ dmapper_logger->attribute("value", val.toString());
+ dmapper_logger->endElement("FFDataHandler.attribute");
+#endif
+ switch (name)
+ {
+ case NS_ooxml::LN_CT_FFHelpText_type:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_nHelpTextType = val.getInt();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFHelpText_val:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_sHelpText = val.getString();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFStatusText_type:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_nStatusTextType = val.getInt();
+ }
+ break;
+ case NS_ooxml::LN_CT_FFStatusText_val:
+ /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */
+ {
+ m_sStatusText = val.getString();
+ }
+ break;
+ default:
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->element("unhandled");
+#endif
+ break;
+ }
+}
+
+}}
diff --git a/writerfilter/source/dmapper/FFDataHandler.hxx b/writerfilter/source/dmapper/FFDataHandler.hxx
new file mode 100644
index 000000000000..fb7a4ccee950
--- /dev/null
+++ b/writerfilter/source/dmapper/FFDataHandler.hxx
@@ -0,0 +1,161 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: PropertyMap.hxx,v $
+ * $Revision: 1.18 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef INCLUDED_FFDataHandler_HXX
+#define INCLUDED_FFDataHandler_HXX
+#include <resourcemodel/WW8ResourceModel.hxx>
+#include <rtl/ustring.hxx>
+namespace writerfilter {
+namespace dmapper {
+class FFDataHandler : public Properties
+{
+public:
+ // typedefs
+ typedef ::boost::shared_ptr<FFDataHandler> Pointer_t;
+ typedef ::std::vector<rtl::OUString> DropDownEntries_t;
+
+ // constructor
+ FFDataHandler();
+ // destructor
+ virtual ~FFDataHandler();
+
+ // member: name
+ void setName(const rtl::OUString & r_sName);
+ const rtl::OUString & getName() const;
+
+ // member: enabled
+ void setEnabled(bool r_enabled);
+ bool getEnabled() const;
+
+ // member: calcOnExit
+ void setCalcOnExit(bool r_calcOnExit);
+ bool getCalcOnExit() const;
+
+ // member: entryMacro
+ void setEntryMacro(const rtl::OUString & r_sEntryMacro);
+ const rtl::OUString & getEntryMacro() const;
+
+ // member: exitMacro
+ void setExitMacro(const rtl::OUString & r_sExitMacro);
+ const rtl::OUString & getExitMacro() const;
+
+ // member: helpTextType
+ void setHelpTextType(sal_uInt32 r_helpTextType);
+ sal_uInt32 getHelpTextType() const;
+
+ // member: helpText
+ void setHelpText(const rtl::OUString & r_sHelpText);
+ const rtl::OUString & getHelpText() const;
+
+ // member: statusTextType
+ void setStatusTextType(sal_uInt32 r_statusTextType);
+ sal_uInt32 getStatusTextType() const;
+
+ // member: statusText
+ void setStatusText(const rtl::OUString & r_sStatusText);
+ const rtl::OUString & getStatusText() const;
+
+ // member: checkboxHeight
+ void setCheckboxHeight(sal_uInt32 r_checkboxHeight);
+ sal_uInt32 getCheckboxHeight() const;
+
+ // member: checkboxAutoHeight
+ void setCheckboxAutoHeight(bool r_checkboxAutoHeight);
+ bool getCheckboxAutoHeight() const;
+
+ // member: checkboxDefault
+ void setCheckboxDefault(bool r_checkboxDefault);
+ bool getCheckboxDefault() const;
+
+ // member: checkboxChecked
+ void setCheckboxChecked(bool r_checkboxChecked);
+ bool getCheckboxChecked() const;
+
+ // member: dropDownResult
+ void setDropDownResult(const rtl::OUString & r_sDropDownResult);
+ const rtl::OUString & getDropDownResult() const;
+
+ // member: dropDownDefault
+ void setDropDownDefault(const rtl::OUString & r_sDropDownDefault);
+ const rtl::OUString & getDropDownDefault() const;
+
+ // member: dropDownEntries
+ void setDropDownEntries(const DropDownEntries_t & r_dropDownEntries);
+ const DropDownEntries_t & getDropDownEntries() const;
+ void dropDownEntriesPushBack(const rtl::OUString & r_Element);
+
+ // member: textType
+ void setTextType(sal_uInt32 r_textType);
+ sal_uInt32 getTextType() const;
+
+ // member: textMaxLength
+ void setTextMaxLength(sal_uInt32 r_textMaxLength);
+ sal_uInt32 getTextMaxLength() const;
+
+ // member: textDefault
+ void setTextDefault(const rtl::OUString & r_sTextDefault);
+ const rtl::OUString & getTextDefault() const;
+
+ // member: textFormat
+ void setTextFormat(const rtl::OUString & r_sTextFormat);
+ const rtl::OUString & getTextFormat() const;
+
+ // sprm
+ void sprm(Sprm & r_sprm);
+ void resolveSprm(Sprm & r_sprm);
+
+ // attribute
+ void attribute(Id name, Value & val);
+
+private:
+ rtl::OUString m_sName;
+ bool m_bEnabled;
+ bool m_bCalcOnExit;
+ rtl::OUString m_sEntryMacro;
+ rtl::OUString m_sExitMacro;
+ sal_uInt32 m_nHelpTextType;
+ rtl::OUString m_sHelpText;
+ sal_uInt32 m_nStatusTextType;
+ rtl::OUString m_sStatusText;
+ sal_uInt32 m_nCheckboxHeight;
+ bool m_bCheckboxAutoHeight;
+ bool m_bCheckboxDefault;
+ bool m_bCheckboxChecked;
+ rtl::OUString m_sDropDownResult;
+ rtl::OUString m_sDropDownDefault;
+ DropDownEntries_t m_DropDownEntries;
+ sal_uInt32 m_nTextType;
+ sal_uInt32 m_nTextMaxLength;
+ rtl::OUString m_sTextDefault;
+ rtl::OUString m_sTextFormat;
+};
+
+
+}}
+#endif //INCLUDED_FFDataHandler_HXX
diff --git a/writerfilter/source/dmapper/FieldTypes.hxx b/writerfilter/source/dmapper/FieldTypes.hxx
new file mode 100644
index 000000000000..d0a98efcb0fb
--- /dev/null
+++ b/writerfilter/source/dmapper/FieldTypes.hxx
@@ -0,0 +1,299 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef INCLUDED_FIELD_TYPES_HXX
+#define INCLUDED_FIELD_TYPES_HXX
+
+namespace writerfilter {
+namespace dmapper {
+
+enum FieldId
+{
+ /* ADDRESSBLOCK \d \* MERGEFORMAT -> Addressblock completely unsupported*/
+ FIELD_ADDRESSBLOCK
+ /* ADVANCE \d downvalue \l leftvalue \r rightvalue \u upvalue \x xvalue \y yvalue -> unsupported*/
+ ,FIELD_ADVANCE
+ /* ASK bookmarkname "hint" \d defaultanswer \o \* MERGEFORMAT ->
+ the hint is not always quoted, inputfield with default answer, prompt before merge (\o)
+ */
+ ,FIELD_ASK
+ /* AUTONUM \* Numberingswitch ->
+ mapped to sequence field "AutoNr"
+ */
+ ,FIELD_AUTONUM
+ /* AUTONUMLGL \* Numberingswitch ->
+ mapped to sequence field "AutoNr"
+ */
+ ,FIELD_AUTONUMLGL
+ /* AUTONUMOUT \* Numberingswitch ->
+ mapped to sequence field "AutoNr"
+ */
+ ,FIELD_AUTONUMOUT
+ /* AUTHOR NewAuthor \* defaultswitch \* MERGEFORMAT ->
+ mapped to sequence field "AutoNr"
+ */
+ ,FIELD_AUTHOR
+ /* COMMENTS "comment" \* MERGEFORMAT ->
+ Docinfo-Comments
+ */
+ ,FIELD_COMMENTS
+ /* CREATEDATE \h \* MERGEFORMAT ->
+ docinfo-created-date
+ */
+ ,FIELD_CREATEDATE
+ /* DATE \@ "number format" \s \* MERGEFORMAT ->
+ ww8filterimprovement: multiple languages now supported
+ */
+ ,FIELD_DATE
+ /* DOCPROPERTY propertyname \* MERGEFORMAT ->
+ ww8filterimprovement: some fields imported as functionally equivalent fields if possible,
+ the others imported as UserField
+ */
+ ,FIELD_DOCPROPERTY
+ /* DOCVARIABLE Name \* MERGEFORMAT ->
+ ww8filterimprovement: now imported as user fields
+ */
+ ,FIELD_DOCVARIABLE
+ /* EDITTIME \# "displayformat" \* Numberingswitch \* MERGEFORMAT ->
+ DocInfo-Modified-Date
+ ww8filterimprovement: multiple languages now supported
+ */
+ ,FIELD_EDITTIME
+ /* FILLIN "text to fill in" \d defaultanswer \o \* MERGEFORMAT ->
+ Function-InputField
+ */
+ ,FIELD_FILLIN
+ /* FILENAME \p \* * MERGEFORMAT ->
+ file name (\p with path)
+ */
+ ,FIELD_FILENAME
+ /* FILESIZE \* NumberingType \* MERGEFORMAT ->
+ not imported in old ww8 filter, see lcl_ParseNumberingType
+ todo find alternative field
+ */
+ ,FIELD_FILESIZE
+ /* =formula \# "number format"
+ todo find alternative field
+ */
+ ,FIELD_FORMULA
+ /* FORMCHECKBOX */
+ ,FIELD_FORMCHECKBOX
+ /* FORMDROPDOWN */
+ ,FIELD_FORMDROPDOWN
+ /* FORMTEXT */
+ ,FIELD_FORMTEXT
+ /* GOTOBUTTON text \* MERGEFORMAT ->
+ not imported in old ww8 filter
+ todo find alternative field
+ */
+ ,FIELD_GOTOBUTTON
+ /* HYPERLINK "link" \* MERGEFORMAT ->
+ not imported in old ww8 filter
+ ww8filterimprovement: now imported as hyperlink
+ */
+ ,FIELD_HYPERLINK
+ /* IF condition "then text" "else text" ->
+ not imported in old ww8 filter
+ ww8filterimprovement: now imported
+ todo: condition, if text, else text still missing
+ */
+ ,FIELD_IF
+ /* INFO NameOfInfo \* MERGEFORMAT -> old
+ todo: filter imports wrong?
+ */
+ ,FIELD_INFO
+ /* INCLUDEPICTURE path \* MERGEFORMAT->
+ old filter imports an embedded picture
+ todo: not yet supported
+ */
+ ,FIELD_INCLUDEPICTURE
+ /* KEYWORDS keyword \* defaultswitch \* Numberingswitch \* MERGEFORMAT ->
+ DocInfo Keywords
+ */
+ ,FIELD_KEYWORDS
+ /* LASTSAVEDBY \* MERGEFORMAT ->
+ DocInfo-Modified-Author
+ */
+ ,FIELD_LASTSAVEDBY
+ /* MACROBUTTON MacroName quick help text ->
+ Macro field
+ */
+ ,FIELD_MACROBUTTON
+ /* MERGEFIELD ColumName \b prefix \f suffix \* MERGEFORMAT ->
+ ww8filterimprovement: column-only API now upporterd
+ */
+ ,FIELD_MERGEFIELD
+ /* MERGEREC \* MERGEFORMAT ->
+ RecordNumber field, maybe without db name
+ todo: currently unchecked
+ */
+ ,FIELD_MERGEREC
+ /* MERGESEQ \* MERGEFORMAT ->
+ not imported in old ww8 filter
+ ww8filterimprovement: now imported
+ todo: currently unchecked
+ */
+ ,FIELD_MERGESEQ
+ /* NEXT text ->
+ Next record
+ todo: currently unchecked
+ */
+ ,FIELD_NEXT
+ /* NEXTIF condition
+ todo: condition not imported
+ */
+ ,FIELD_NEXTIF
+ /* PAGE \* Numberingswitch \* MERGEFORMAT ->
+ see lcl_ParseNumberingType
+ */
+ ,FIELD_PAGE
+ /* REF targetbkm \f \* MERGEFORMAT ->
+ imports a ShowVariable (bookmarkname)?
+ \h hyerlink to paragraph
+ \p relative to para above/below
+ \f refenence number
+ \d separator number separator
+ \n paragraph number
+ \r paragraph number in relative context
+ \t suppres non delimiters
+ \w paragraph number in full context
+ \* Upper/Lower...
+ */
+ ,FIELD_REF //
+ /* REVNUM \* Numberingswitch \* MERGEFORMAT ->
+ DocInfo-revision number
+ */
+ ,FIELD_REVNUM
+ /* SAVEDATE \@ "NumberFormat"\* MERGEFORMAT ->
+ DocInfo-modified-date
+ */
+ ,FIELD_SAVEDATE
+ /* SECTION \* NumberFormat \* MERGEFORMAT ->
+ not imported in old ww8 filter see lcl_ParseNumberingType
+ todo: find alternative
+ */
+ ,FIELD_SECTION
+ /* SECTIONPAGES \* NumberFormat \* MERGEFORMAT ->
+ not imported in old ww8 filter see lcl_ParseNumberingType
+ todo: find alternative
+ */
+ ,FIELD_SECTIONPAGES
+ /* SEQ sequencename \h \c \n \r \s \* MERGEFORMAT ->
+ number range name:sequencename value:sequencename+1
+ todo: only partially implemented, switches unsupported
+ */
+ ,FIELD_SEQ
+ /* SET bookmarkname newtext \* MERGEFORMAT ->
+ SetVariable bookmarkname = newtext
+ todo: not implemented yet
+ */
+ ,FIELD_SET
+ /* SKIPIF condition \* MERGEFORMAT ->
+ ??
+ todo: not implemented yet
+ */
+ ,FIELD_SKIPIF
+ /* STYLEREF stylename \* MERGEFORMAT ->
+ not imported in old ww8 filter
+ todo: add an equivalent field type
+ */
+ ,FIELD_STYLEREF
+ /* SUBJECT subject \* Defaultswitch \* MERGEFORMAT ->
+ DocInfo - subject
+ */
+ ,FIELD_SUBJECT
+ /* SYMBOL symbolnumber \* MERGEFORMAT ->
+ inserts a special char (symbolnumber)
+ todo: find alternative
+ */
+ ,FIELD_SYMBOL
+ /* TEMPLATE \* Defaultswitch \* MERGEFORMAT
+ TemplateName field
+ */
+ ,FIELD_TEMPLATE
+ /* TIME \@ "number format" \* MERGEFORMAT
+ ww8filterimprovement: multiple languages now supported
+ */
+ ,FIELD_TIME
+ /* TITLE \* Defaultswitch \* MERGEFORMAT ->
+ DocInfo-title
+ */
+ ,FIELD_TITLE
+ /* USERINITIALS newinitials \* MERGEFORMAT ->
+ ExtendedUser field (SHORTCUT)
+ */
+ ,FIELD_USERINITIALS
+ /* USERADDRESS \* MERGEFORMAT ->
+ not imported in old ww8 filter
+ todo: find alternative
+ */
+ ,FIELD_USERADDRESS
+ /* USERNAME newusername \* MERGEFORMAT ->
+ not imported in old ww8 filter
+ todo: import as extended user field(s)
+ */
+ ,FIELD_USERNAME
+ /*
+ TOC options:
+ \a Builds a table of figures but does not include the captions's label and number
+ \b Uses a bookmark to specify area of document from which to build table of contents
+ \c Builds a table of figures of the given label
+ \d Defines the separator between sequence and page numbers
+ \f Builds a table of contents using TC entries instead of outline levels
+ \h Hyperlinks the entries and page numbers within the table of contents
+ \l Defines the TC entries field level used to build a table of contents
+ \n Builds a table of contents or a range of entries, sucah as “1-9”, in a table of contents without page numbers
+ \o Builds a table of contents by using outline levels instead of TC entries
+ \p Defines the separator between the table entry and its page number
+ \s Builds a table of contents by using a sequence type
+ \t Builds a table of contents by using style names other than the standard outline styles
+ \u Builds a table of contents by using the applied paragraph outline level
+ \w Preserve tab characters within table entries
+ \x Preserve newline characters within table entries
+ \z Hides page numbers within the table of contens when shown in Web Layout View
+ */
+ ,FIELD_TOC
+ /*
+ TOC entry: “text”
+ \f TC entry in doc with multiple tables
+ \l Outline Level
+ \n Suppress page numbers
+ example: TOC "EntryText \f \l 2 \n
+ */
+ ,FIELD_TC
+ /* document statistic - number of characters
+ */
+ ,FIELD_NUMCHARS
+ /* document statistic - number of words
+ */
+ ,FIELD_NUMWORDS
+ /* document statistic - number of pages
+ */
+ ,FIELD_NUMPAGES
+};
+
+}}
+#endif // INCLUDED_FIELD_TYPES_HXX
diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx
new file mode 100644
index 000000000000..eebf921f4963
--- /dev/null
+++ b/writerfilter/source/dmapper/FormControlHelper.cxx
@@ -0,0 +1,309 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <math.h>
+
+#include <com/sun/star/awt/XControlModel.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XIndexContainer.hpp>
+#include <com/sun/star/drawing/XControlShape.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <com/sun/star/form/XForm.hpp>
+#include <com/sun/star/form/XFormComponent.hpp>
+#include <com/sun/star/form/XFormsSupplier.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/text/TextContentAnchorType.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Type.hxx>
+
+#include "FormControlHelper.hxx"
+
+namespace writerfilter {
+namespace dmapper {
+
+using namespace ::com::sun::star;
+
+struct FormControlHelper::FormControlHelper_Impl
+{
+ FieldId m_eFieldId;
+ awt::Size aSize;
+ uno::Reference<drawing::XDrawPage> rDrawPage;
+ uno::Reference<form::XForm> rForm;
+ uno::Reference<form::XFormComponent> rFormComponent;
+ uno::Reference<lang::XMultiServiceFactory> rServiceFactory;
+ uno::Reference<text::XTextDocument> rTextDocument;
+
+ uno::Reference<drawing::XDrawPage> getDrawPage();
+ uno::Reference<lang::XMultiServiceFactory> getServiceFactory();
+ uno::Reference<form::XForm> getForm();
+ uno::Reference<container::XIndexContainer> getFormComps();
+};
+
+uno::Reference<drawing::XDrawPage> FormControlHelper::FormControlHelper_Impl::getDrawPage()
+{
+ if (! rDrawPage.is())
+ {
+ uno::Reference<drawing::XDrawPageSupplier>
+ xDrawPageSupplier(rTextDocument, uno::UNO_QUERY);
+ if (xDrawPageSupplier.is())
+ rDrawPage = xDrawPageSupplier->getDrawPage();
+ }
+
+ return rDrawPage;
+}
+
+uno::Reference<lang::XMultiServiceFactory> FormControlHelper::FormControlHelper_Impl::getServiceFactory()
+{
+ if (! rServiceFactory.is())
+ rServiceFactory = uno::Reference<lang::XMultiServiceFactory>(rTextDocument, uno::UNO_QUERY);
+
+ return rServiceFactory;
+}
+
+uno::Reference<form::XForm> FormControlHelper::FormControlHelper_Impl::getForm()
+{
+ if (! rForm.is())
+ {
+ uno::Reference<form::XFormsSupplier> xFormsSupplier(getDrawPage(), uno::UNO_QUERY);
+
+ if (xFormsSupplier.is())
+ {
+ uno::Reference<container::XNameContainer> xFormsNamedContainer(xFormsSupplier->getForms());
+ static ::rtl::OUString sDOCXForm(RTL_CONSTASCII_USTRINGPARAM("DOCX-Standard"));
+
+ ::rtl::OUString sFormName(sDOCXForm);
+ sal_uInt16 nUnique = 0;
+
+ while (xFormsNamedContainer->hasByName(sFormName))
+ {
+ ++nUnique;
+ sFormName = sDOCXForm;
+ sFormName += ::rtl::OUString::valueOf(nUnique);
+ }
+
+ uno::Reference<uno::XInterface>
+ xForm(getServiceFactory()->createInstance
+ (::rtl::OUString
+ (RTL_CONSTASCII_USTRINGPARAM
+ ("com.sun.star.form.component.Form"))));
+ if (xForm.is())
+ {
+ uno::Reference<beans::XPropertySet>
+ xFormProperties(xForm, uno::UNO_QUERY);
+ uno::Any aAny(sFormName);
+ static ::rtl::OUString sName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")));
+ xFormProperties->setPropertyValue(sName, aAny);
+ }
+
+ rForm = uno::Reference<form::XForm>(xForm, uno::UNO_QUERY);
+
+ uno::Reference<container::XIndexContainer> xForms(xFormsNamedContainer, uno::UNO_QUERY);
+ uno::Any aAny(xForm);
+ xForms->insertByIndex(xForms->getCount(), aAny);
+ }
+ }
+
+ return rForm;
+}
+
+uno::Reference<container::XIndexContainer> FormControlHelper::FormControlHelper_Impl::getFormComps()
+{
+ uno::Reference<container::XIndexContainer> xIndexContainer(getForm(), uno::UNO_QUERY);
+
+ return xIndexContainer;
+}
+
+FormControlHelper::FormControlHelper(FieldId eFieldId,
+ uno::Reference<text::XTextDocument> rTextDocument,
+ FFDataHandler::Pointer_t pFFData)
+ : m_pFFData(pFFData), m_pImpl(new FormControlHelper_Impl)
+{
+ m_pImpl->m_eFieldId = eFieldId;
+ m_pImpl->rTextDocument = rTextDocument;
+}
+
+FormControlHelper::~FormControlHelper()
+{
+}
+
+bool FormControlHelper::createCheckbox(uno::Reference<text::XTextRange> xTextRange,
+ const ::rtl::OUString & rControlName)
+{
+ uno::Reference<lang::XMultiServiceFactory>
+ xServiceFactory(m_pImpl->getServiceFactory());
+
+ if (! xServiceFactory.is())
+ return false;
+
+ uno::Reference<uno::XInterface> xInterface =
+ xServiceFactory->createInstance
+ (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.CheckBox")));
+
+ if (!xInterface.is())
+ return false;
+
+ m_pImpl->rFormComponent = uno::Reference<form::XFormComponent>(xInterface, uno::UNO_QUERY);
+ if (!m_pImpl->rFormComponent.is())
+ return false;
+
+ uno::Reference<beans::XPropertySet> xPropSet(xInterface, uno::UNO_QUERY);
+
+ sal_uInt32 nCheckBoxHeight = 16 * m_pFFData->getCheckboxHeight();
+
+ if (m_pFFData->getCheckboxAutoHeight())
+ {
+ uno::Reference<beans::XPropertySet> xTextRangeProps(xTextRange, uno::UNO_QUERY);
+
+ try
+ {
+ static ::rtl::OUString sCharHeight(RTL_CONSTASCII_USTRINGPARAM("CharHeight"));
+ float fCheckBoxHeight = 0.0;
+ xTextRangeProps->getPropertyValue(sCharHeight) >>= fCheckBoxHeight;
+ nCheckBoxHeight = floor(fCheckBoxHeight * 35.3);
+ }
+ catch (beans::UnknownPropertyException & rException)
+ {
+ }
+ }
+
+ m_pImpl->aSize.Width = nCheckBoxHeight;
+ m_pImpl->aSize.Height = m_pImpl->aSize.Width;
+
+ uno::Any aAny;
+ if (m_pFFData->getStatusText().getLength())
+ {
+ aAny <<= m_pFFData->getStatusText();
+
+ xPropSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpText")), aAny);
+ }
+
+ aAny <<= m_pFFData->getCheckboxChecked();
+ xPropSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultState")), aAny);
+
+ if (m_pFFData->getHelpText().getLength())
+ {
+ aAny <<= m_pFFData->getHelpText();
+ xPropSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpF1Text")), aAny);
+ }
+
+ aAny <<= rControlName;
+ xPropSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), aAny);
+
+ return true;
+}
+
+bool FormControlHelper::insertControl(uno::Reference<text::XTextRange> xTextRange)
+{
+ bool bCreated = false;
+
+ uno::Reference<container::XNameContainer> xFormCompsByName(m_pImpl->getForm(), uno::UNO_QUERY);
+ uno::Reference<container::XIndexContainer> xFormComps(m_pImpl->getFormComps());
+ if (! xFormComps.is())
+ return false;
+
+ static ::rtl::OUString sControl(RTL_CONSTASCII_USTRINGPARAM("Control"));
+
+ sal_Int32 nControl = 0;
+ bool bDone = false;
+ ::rtl::OUString sControlName;
+
+ do
+ {
+ ::rtl::OUString sTmp(sControl);
+ sTmp += ::rtl::OUString::valueOf(nControl);
+
+ nControl++;
+ if (! xFormCompsByName->hasByName(sTmp))
+ {
+ sControlName = sTmp;
+ bDone = true;
+ }
+ }
+ while (! bDone);
+
+ switch (m_pImpl->m_eFieldId)
+ {
+ case FIELD_FORMCHECKBOX:
+ bCreated = createCheckbox(xTextRange, sControlName);
+ break;
+ default:
+ break;
+ }
+
+ if (!bCreated)
+ return false;
+
+ uno::Any aAny(m_pImpl->rFormComponent);
+ xFormComps->insertByIndex(xFormComps->getCount(), aAny);
+
+ if (! m_pImpl->getServiceFactory().is())
+ return false;
+
+ uno::Reference<uno::XInterface> xInterface =
+ m_pImpl->getServiceFactory()->createInstance
+ (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape")));
+
+ if (! xInterface.is())
+ return false;
+
+ uno::Reference<drawing::XShape> xShape(xInterface, uno::UNO_QUERY);
+
+ if (! xShape.is())
+ return false;
+
+ xShape->setSize(m_pImpl->aSize);
+
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+
+ sal_uInt16 nTmp = text::TextContentAnchorType_AS_CHARACTER;
+ aAny <<= nTmp;
+
+ static const ::rtl::OUString sAnchorType(RTL_CONSTASCII_USTRINGPARAM("AnchorType"));
+ xShapeProps->setPropertyValue(sAnchorType, aAny);
+
+ static const ::rtl::OUString sVertOrient(RTL_CONSTASCII_USTRINGPARAM("VertOrient"));
+ nTmp = text::VertOrientation::CENTER;
+ aAny <<= nTmp;
+ xShapeProps->setPropertyValue(sVertOrient, aAny);
+
+ aAny <<= xTextRange;
+
+ static const ::rtl::OUString sTextRange(RTL_CONSTASCII_USTRINGPARAM("TextRange"));
+ xShapeProps->setPropertyValue(sTextRange, aAny);
+
+ uno::Reference<drawing::XControlShape> xControlShape(xShape, uno::UNO_QUERY);
+ uno::Reference<awt::XControlModel> xControlModel(m_pImpl->rFormComponent, uno::UNO_QUERY);
+ xControlShape->setControl(xControlModel);
+
+ m_pImpl->getDrawPage()->add(xShape);
+
+ return true;
+}
+
+}}
diff --git a/tools/inc/tools/agapi.hxx b/writerfilter/source/dmapper/FormControlHelper.hxx
index 9c71bd35c6cc..21b50912a039 100644
--- a/tools/inc/tools/agapi.hxx
+++ b/writerfilter/source/dmapper/FormControlHelper.hxx
@@ -24,44 +24,41 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+#ifndef INCLUDED_FORM_CONTROL_HELPER_HXX
+#define INCLUDED_FORM_CONTROL_HELPER_HXX
-#ifndef _AGAPI_HXX
-#define _AGAPI_HXX
+#include <FFDataHandler.hxx>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include "FieldTypes.hxx"
-#include <tools/solar.h>
+namespace writerfilter {
+namespace dmapper {
-class INetURLObject;
-class ChannelList;
-class AgentItem;
-class String;
+using namespace ::com::sun::star;
-class AgentApi
+class FormControlHelper
{
-protected:
- friend class ChannelList;
-
- AgentItem* pChannelAgent;
- virtual BOOL StartAgent() = 0;
-
- AgentApi(AgentItem* pAgent) { pChannelAgent = pAgent; }
-
public:
- virtual ~AgentApi() {}
+ typedef boost::shared_ptr<FormControlHelper> Pointer_t;
+ FormControlHelper(FieldId eFieldId,
+ uno::Reference<text::XTextDocument> rTextDocument,
+ FFDataHandler::Pointer_t pFFData);
+ ~FormControlHelper();
- virtual void InitAgent() = 0;
- virtual void ShutDownAgent() = 0;
+ bool insertControl(uno::Reference<text::XTextRange> xTextRange);
- virtual BOOL NewDataPermission(const String& rChannelName) = 0;
- virtual void NewData(const String& rChannelName,
- const INetURLObject& rURL) = 0;
- virtual void NotifyChannelObjFile(const INetURLObject& rURL,
- const String& rFileName) = 0;
- virtual void NotifyChannelObjData(const INetURLObject& rURL,
- void* pBuffer, long nOffset, long nLen, long nTotalLen) = 0;
+private:
+ FFDataHandler::Pointer_t m_pFFData;
+ struct FormControlHelper_Impl;
+ typedef boost::shared_ptr<FormControlHelper_Impl> ImplPointer_t;
+ ImplPointer_t m_pImpl;
- virtual void RegisterChannels() = 0;
- virtual void RegisterUpdateTransmitter() = 0;
+ bool createCheckbox(uno::Reference<text::XTextRange> xTextRange,
+ const ::rtl::OUString & rControlName);
};
-#endif //_AGAPI_HXX
+}
+}
+#endif // INCLUDED_FORM_CONTROL_HELPER_HXX
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx
index fb99f254ef86..abb2ca46a9c9 100644
--- a/writerfilter/source/dmapper/PropertyIds.cxx
+++ b/writerfilter/source/dmapper/PropertyIds.cxx
@@ -320,6 +320,8 @@ const rtl::OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const
case PROP_OUTLINE_LEVEL : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OutlineLevel")); break;
case PROP_LISTTAB_STOP_POSITION : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ListtabStopPosition")); break;
case PROP_POSITION_AND_SPACE_MODE : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PositionAndSpaceMode")); break;
+ case PROP_PARA_SPLIT: sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParaSplit")); break;
+ case PROP_HELP: sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Help")); break;
case PROP_HEADING_STYLE_NAME: sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HeadingStyleName")); break;
// case : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")); break;
// case : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")); break;
diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx
index 1d5992cc212c..2066cf58f530 100644
--- a/writerfilter/source/dmapper/PropertyIds.hxx
+++ b/writerfilter/source/dmapper/PropertyIds.hxx
@@ -284,6 +284,8 @@ enum PropertyIds
/*248*/ ,PROP_LISTTAB_STOP_POSITION
/*249*/ ,PROP_POSITION_AND_SPACE_MODE
/*250*/ ,PROP_HEADING_STYLE_NAME
+/*251*/ ,PROP_PARA_SPLIT
+/*252*/ ,PROP_HELP
};
struct PropertyNameSupplier_Impl;
class PropertyNameSupplier
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index aa8a29c5e6a2..11930fb01972 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/text/WritingMode.hpp>
#include <com/sun/star/text/XTextColumns.hpp>
#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/TextGridMode.hpp>
#include <com/sun/star/text/XTextCopy.hpp>
#include "dmapperLoggers.hxx"
#include "PropertyMapHelper.hxx"
@@ -155,6 +156,18 @@ XMLTag::Pointer_t PropertyMap::toTag() const
sal_Int32 aInt;
aMapIter->second >>= aInt;
pTag->addAttr("value", aInt);
+
+ sal_uInt32 auInt;
+ aMapIter->second >>= auInt;
+ pTag->addAttr("unsignedValue", auInt);
+
+ float aFloat;
+ aMapIter->second >>= aFloat;
+ pTag->addAttr("floatValue", aFloat);
+
+ ::rtl::OUString aStr;
+ aMapIter->second >>= auInt;
+ pTag->addAttr("stringValue", aStr);
}
catch (...) {
}
@@ -244,6 +257,7 @@ SectionPropertyMap::SectionPropertyMap(bool bIsFirstSection) :
,m_nDzaGutter( 0 )
,m_bGutterRTL( false )
,m_bSFBiDi( false )
+ ,m_nGridType(0)
,m_nGridLinePitch( 1 )
,m_nDxtCharSpace( 0 )
,m_nLnnMod( 0 )
@@ -274,7 +288,7 @@ SectionPropertyMap::SectionPropertyMap(bool bIsFirstSection) :
uno::Any aFalse( ::uno::makeAny( false ) );
Insert( PROP_GRID_DISPLAY, false, aFalse);
Insert( PROP_GRID_PRINT, false, aFalse);
-
+ Insert( PROP_GRID_MODE, false, uno::makeAny(text::TextGridMode::NONE));
if( m_bIsFirstSection )
@@ -908,6 +922,22 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
nRubyHeight = 0;
operator[]( PropertyDefinition( PROP_GRID_RUBY_HEIGHT, false )) = uno::makeAny( nRubyHeight );
+ sal_Int16 nGridMode = text::TextGridMode::NONE;
+
+ switch (m_nGridType)
+ {
+ case NS_ooxml::LN_Value_wordprocessingml_ST_DocGrid_lines:
+ nGridMode = text::TextGridMode::LINES;
+ break;
+ case NS_ooxml::LN_Value_wordprocessingml_ST_DocGrid_linesAndChars:
+ nGridMode = text::TextGridMode::LINES_AND_CHARS;
+ break;
+ default:
+ break;
+ }
+
+ operator[](PropertyDefinition(PROP_GRID_MODE, false)) = uno::makeAny(nGridMode);
+
_ApplyProperties( xFollowPageStyle );
//todo: creating a "First Page" style depends on HasTitlePage und _fFacingPage_
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx
index 0efe7e3ba433..16886530f324 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -193,6 +193,7 @@ class SectionPropertyMap : public PropertyMap
bool m_bGutterRTL;
bool m_bSFBiDi;
+ sal_Int32 m_nGridType;
sal_Int32 m_nGridLinePitch;
sal_Int32 m_nDxtCharSpace;
@@ -266,6 +267,7 @@ public:
void SetDzaGutter( sal_Int32 nSet ) {m_nDzaGutter = nSet; }
void SetSFBiDi( bool bSet ) { m_bSFBiDi = bSet;}
+ void SetGridType(sal_Int32 nSet) { m_nGridType = nSet; }
void SetGridLinePitch( sal_Int32 nSet ) { m_nGridLinePitch = nSet; }
void SetDxtCharSpace( sal_Int32 nSet ) { m_nDxtCharSpace = nSet; }
diff --git a/writerfilter/source/dmapper/PropertyMapHelper.cxx b/writerfilter/source/dmapper/PropertyMapHelper.cxx
index 555003774113..4fb4c759289d 100644
--- a/writerfilter/source/dmapper/PropertyMapHelper.cxx
+++ b/writerfilter/source/dmapper/PropertyMapHelper.cxx
@@ -32,6 +32,7 @@
#include <resourcemodel/TagLogger.hxx>
#include "PropertyMapHelper.hxx"
+#ifdef DEBUG
namespace writerfilter
{
namespace dmapper
@@ -39,7 +40,7 @@ namespace dmapper
using namespace ::com::sun::star;
- XMLTag::Pointer_t lcl_TableColumnSeparatorsToTag(const uno::Any & rTableColumnSeparators)
+XMLTag::Pointer_t lcl_TableColumnSeparatorsToTag(const uno::Any & rTableColumnSeparators)
{
uno::Sequence<text::TableColumnSeparator> aSeq;
rTableColumnSeparators >>= aSeq;
@@ -127,3 +128,4 @@ XMLTag::Pointer_t lcl_PropertyValueSeqSeqToTag(PropertyValueSeqSeq_t rPropValSeq
}
}
+#endif // DEBUG
diff --git a/writerfilter/source/dmapper/PropertyMapHelper.hxx b/writerfilter/source/dmapper/PropertyMapHelper.hxx
index fc9ea0a85bb4..4a528f1736c0 100644
--- a/writerfilter/source/dmapper/PropertyMapHelper.hxx
+++ b/writerfilter/source/dmapper/PropertyMapHelper.hxx
@@ -28,6 +28,7 @@
*
************************************************************************/
+#ifdef DEBUG
#include "PropertyMap.hxx"
#include <com/sun/star/beans/PropertyValues.hpp>
@@ -46,3 +47,4 @@ typedef uno::Sequence<PropertyValueSeq_t> PropertyValueSeqSeq_t;
XMLTag::Pointer_t lcl_PropertyValueSeqSeqToTag(PropertyValueSeqSeq_t & rPropValSeqSeq);
}
}
+#endif // DEBUG
diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx
index deb65c7c8cba..e711240b65d0 100644..100755
--- a/writerfilter/source/dmapper/SettingsTable.cxx
+++ b/writerfilter/source/dmapper/SettingsTable.cxx
@@ -28,6 +28,7 @@
*
************************************************************************/
+#include <resourcemodel/ResourceModelHelper.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <SettingsTable.hxx>
@@ -37,7 +38,15 @@
#include <ConversionHelper.hxx>
#include <rtl/ustring.hxx>
+#ifdef DEBUG_DOMAINMAPPER
+#include <resourcemodel/QNameToString.hxx>
+#include "dmapperLoggers.hxx"
+#endif
+
namespace writerfilter {
+
+using resourcemodel::resolveSprmProps;
+
namespace dmapper
{
@@ -56,6 +65,21 @@ struct SettingsTable_Impl
bool m_bNoPunctuationKerning;
bool m_doNotIncludeSubdocsInStats; // Do Not Include Content in Text Boxes, Footnotes, and Endnotes in Document Statistics)
bool m_bRecordChanges;
+ int m_nEdit;
+ bool m_bFormatting;
+ bool m_bEnforcement;
+ int m_nCryptProviderType;
+ int m_nCryptAlgorithmClass;
+ int m_nCryptAlgorithmType;
+ ::rtl::OUString m_sCryptAlgorithmSid;
+ int m_nCryptSpinCount;
+ ::rtl::OUString m_sCryptProvider;
+ ::rtl::OUString m_sAlgIdExt;
+ ::rtl::OUString m_sAlgIdExtSource;
+ ::rtl::OUString m_sCryptProviderTypeExt;
+ ::rtl::OUString m_sCryptProviderTypeExtSource;
+ ::rtl::OUString m_sHash;
+ ::rtl::OUString m_sSalt;
SettingsTable_Impl( DomainMapper& rDMapper, const uno::Reference< lang::XMultiServiceFactory > xTextFactory ) :
m_rDMapper( rDMapper )
@@ -65,6 +89,13 @@ struct SettingsTable_Impl
, m_bNoPunctuationKerning(false)
, m_doNotIncludeSubdocsInStats(false)
, m_bRecordChanges(false)
+ , m_nEdit(NS_ooxml::LN_Value_wordprocessingml_ST_DocProtect_none)
+ , m_bFormatting(false)
+ , m_bEnforcement(false)
+ , m_nCryptProviderType(NS_ooxml::LN_Value_wordprocessingml_ST_CryptProv_rsaAES)
+ , m_nCryptAlgorithmClass(NS_ooxml::LN_Value_wordprocessingml_ST_AlgClass_hash)
+ , m_nCryptAlgorithmType(NS_ooxml::LN_Value_wordprocessingml_ST_AlgType_typeAny)
+ , m_nCryptSpinCount(0)
{}
};
@@ -79,8 +110,15 @@ SettingsTable::~SettingsTable()
delete m_pImpl;
}
-void SettingsTable::attribute(Id /*Name*/, Value & val)
+void SettingsTable::attribute(Id nName, Value & val)
{
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->startElement("SettingsTable.attribute");
+ dmapper_logger->attribute("name", (*QNameToString::Instance())(nName));
+ dmapper_logger->attribute("value", val.toString());
+#endif
+
+ (void) nName;
int nIntValue = val.getInt();
(void)nIntValue;
::rtl::OUString sValue = val.getString();
@@ -99,10 +137,18 @@ void SettingsTable::attribute(Id /*Name*/, Value & val)
}
}
#endif
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->endElement("SettingsTable.attribute");
+#endif
}
void SettingsTable::sprm(Sprm& rSprm)
{
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->startElement("SettingsTable.sprm");
+ dmapper_logger->chars(rSprm.toString());
+#endif
+
sal_uInt32 nSprmId = rSprm.getId();
Value::Pointer_t pValue = rSprm.getValue();
@@ -184,11 +230,20 @@ void SettingsTable::sprm(Sprm& rSprm)
m_pImpl->m_bRecordChanges = bool(rSprm.getValue( )->getInt( ) );
}
break;
+ case NS_ooxml::LN_CT_Settings_documentProtection:
+ {
+ resolveSprmProps(*this, rSprm);
+ }
+ break;
default:
{
OSL_ENSURE( false, "unknown sprmid in SettingsTable::sprm()");
}
}
+
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->endElement("SettingsTable.sprm");
+#endif
}
void SettingsTable::entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref)
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 8b2dbc4d9756..5f2e2268abb8 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -417,6 +417,7 @@ void StyleSheetTable::attribute(Id Name, Value & val)
#ifdef DEBUG_DOMAINMAPPER
dmapper_logger->startElement("StyleSheetTable.attribute");
dmapper_logger->attribute("name", (*QNameToString::Instance())(Name));
+ dmapper_logger->attribute("value", val.toString());
#endif
OSL_ENSURE( m_pImpl->m_pCurrentEntry, "current entry has to be set here");
@@ -534,10 +535,9 @@ void StyleSheetTable::attribute(Id Name, Value & val)
break;
default:
{
- //----> debug
- int nVal = val.getInt();
- ++nVal;
- //<---- debug
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->element("unhandled");
+#endif
}
break;
}
@@ -599,7 +599,6 @@ void StyleSheetTable::sprm(Sprm & rSprm)
break;
case NS_ooxml::LN_CT_Style_tblPr: //contains table properties
case NS_ooxml::LN_CT_Style_tblStylePr: //contains to table properties
- case NS_ooxml::LN_CT_DocDefaults_pPrDefault:
case NS_ooxml::LN_CT_DocDefaults_rPrDefault:
case NS_ooxml::LN_CT_TblPrBase_tblInd: //table properties - at least width value and type
case NS_ooxml::LN_EG_RPrBase_rFonts: //table fonts
@@ -682,19 +681,30 @@ void StyleSheetTable::sprm(Sprm & rSprm)
break;
case NS_ooxml::LN_CT_Style_pPr:
/* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
+ // no break
case NS_ooxml::LN_CT_Style_rPr:
/* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
+ // no break
default:
- if (!m_pImpl->m_pCurrentEntry)
- break;
- TablePropertiesHandlerPtr pTblHandler( new TablePropertiesHandler( true ) );
- pTblHandler->SetProperties( m_pImpl->m_pCurrentEntry->pProperties );
- if ( !pTblHandler->sprm( rSprm ) )
{
- m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pCurrentEntry->pProperties );
- m_pImpl->m_rDMapper.sprm( rSprm );
- m_pImpl->m_rDMapper.PopStyleSheetProperties( );
+ if (!m_pImpl->m_pCurrentEntry)
+ break;
+
+ TablePropertiesHandlerPtr pTblHandler( new TablePropertiesHandler( true ) );
+ pTblHandler->SetProperties( m_pImpl->m_pCurrentEntry->pProperties );
+ if ( !pTblHandler->sprm( rSprm ) )
+ {
+ m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pCurrentEntry->pProperties );
+
+ PropertyMapPtr pProps(new PropertyMap());
+ m_pImpl->m_rDMapper.sprm( rSprm, pProps );
+
+ m_pImpl->m_pCurrentEntry->pProperties->insert(pProps);
+
+ m_pImpl->m_rDMapper.PopStyleSheetProperties( );
+ }
}
+ break;
}
#ifdef DEBUG_DOMAINMAPPER
@@ -798,6 +808,10 @@ uno::Sequence< ::rtl::OUString > PropValVector::getNames()
-----------------------------------------------------------------------*/
void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
{
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->startElement("applyStyleSheets");
+#endif
+
try
{
uno::Reference< style::XStyleFamiliesSupplier > xStylesSupplier( m_pImpl->m_xTextDocument, uno::UNO_QUERY_THROW );
@@ -956,11 +970,24 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
PropValVector aSortedPropVals;
for( sal_Int32 nProp = 0; nProp < aPropValues.getLength(); ++nProp)
{
- // Don't add the style name properties
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->startElement("propvalue");
+ dmapper_logger->attribute("name", aPropValues[nProp].Name);
+ dmapper_logger->attribute("value", aPropValues[nProp].Value);
+#endif
+ // Don't add the style name properties
bool bIsParaStyleName = aPropValues[nProp].Name.equalsAscii( "ParaStyleName" );
bool bIsCharStyleName = aPropValues[nProp].Name.equalsAscii( "CharStyleName" );
- if ( !bInsert && !bIsParaStyleName && !bIsCharStyleName )
+ if ( !bIsParaStyleName && !bIsCharStyleName )
+ {
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->element("insert");
+#endif
aSortedPropVals.Insert( aPropValues[nProp] );
+ }
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->endElement("propvalue");
+#endif
}
if(bAddFollowStyle)
{
@@ -1009,7 +1036,15 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
}
}
if(bInsert)
+ {
xStyles->insertByName( sConvertedStyleName, uno::makeAny( xStyle) );
+#ifdef DEBUG_DOMAINMAPPER
+ uno::Reference<beans::XPropertySet> xProps(xStyle, uno::UNO_QUERY);
+ dmapper_logger->startElement("insertStyle");
+ dmapper_logger->addTag(unoPropertySetToTag(xProps));
+ dmapper_logger->endElement("insertStyle");
+#endif
+ }
}
++aIt;
}
@@ -1020,6 +1055,10 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
(void)rEx;
OSL_ENSURE( false, "Styles could not be imported completely");
}
+
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->endElement("applyStyleSheets");
+#endif
}
/*-- 22.06.2006 15:56:56---------------------------------------------------
diff --git a/writerfilter/source/dmapper/ThemeTable.cxx b/writerfilter/source/dmapper/ThemeTable.cxx
index ec9d8ea9d5a5..0f0becf06552 100755
--- a/writerfilter/source/dmapper/ThemeTable.cxx
+++ b/writerfilter/source/dmapper/ThemeTable.cxx
@@ -31,6 +31,10 @@
#include <ooxml/resourceids.hxx>
#endif
#include <stdio.h>
+#ifdef DEBUG_DOMAINMAPPER
+#include "dmapperLoggers.hxx"
+#include <resourcemodel/QNameToString.hxx>
+#endif
namespace writerfilter {
namespace dmapper
@@ -59,6 +63,11 @@ ThemeTable::~ThemeTable()
void ThemeTable::attribute(Id Name, Value & val)
{
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->startElement("ThemeTable.attribute");
+ dmapper_logger->attribute("name", (*QNameToString::Instance())(Name));
+ dmapper_logger->attribute("value", val.toString());
+#endif
// int nIntValue = val.getInt();
::rtl::OUString sValue = val.getString();
// printf ( "ThemeTable::attribute(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)Name, (unsigned int)nIntValue, ::rtl::OUStringToOString(sValue, RTL_TEXTENCODING_DONTKNOW).getStr());
@@ -72,12 +81,23 @@ void ThemeTable::attribute(Id Name, Value & val)
break;
default:
{
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->element("unhandled");
+#endif
}
}
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->endElement("ThemeTable.attribute");
+#endif
}
void ThemeTable::sprm(Sprm& rSprm)
{
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->startElement("ThemeTable.sprm");
+ dmapper_logger->chars(rSprm.toString());
+#endif
+
sal_uInt32 nSprmId = rSprm.getId();
(void)nSprmId;
@@ -126,14 +146,27 @@ void ThemeTable::sprm(Sprm& rSprm)
break;
default:
{
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->element("unhandled");
+#endif
}
}
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->endElement("ThemeTable.sprm");
+#endif
}
void ThemeTable::entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref)
{
- // printf ( "ThemeTable::entry\n");
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->startElement("ThemeTable.entry");
+#endif
+
ref->resolve(*this);
+
+#ifdef DEBUG_DOMAINMAPPER
+ dmapper_logger->endElement("ThemeTable.entry");
+#endif
}
const ::rtl::OUString ThemeTable::getFontNameForTheme(const Id id) const
diff --git a/writerfilter/source/dmapper/dmapperLoggers.hxx b/writerfilter/source/dmapper/dmapperLoggers.hxx
index a19ff4832370..fd9ed722de4a 100644
--- a/writerfilter/source/dmapper/dmapperLoggers.hxx
+++ b/writerfilter/source/dmapper/dmapperLoggers.hxx
@@ -31,6 +31,7 @@
#ifndef INCLUDED_DMAPPER_LOGGERS_HXX
#define INCLUDED_DMAPPER_LOGGERS_HXX
+#ifdef DEBUG
#include <resourcemodel/TagLogger.hxx>
namespace writerfilter {
@@ -38,4 +39,5 @@ namespace writerfilter {
extern TagLogger::Pointer_t dmapper_logger;
}
}
+#endif // DEBUG
#endif // INCLUDED_DMAPPER_LOGGERS_HXX
diff --git a/writerfilter/source/dmapper/genclass.xsl b/writerfilter/source/dmapper/genclass.xsl
new file mode 100644
index 000000000000..eaddab52ea0e
--- /dev/null
+++ b/writerfilter/source/dmapper/genclass.xsl
@@ -0,0 +1,707 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:rng="http://relaxng.org/ns/structure/1.0"
+ xmlns:xalan="http://xml.apache.org/xalan"
+ exclude-result-prefixes = "xalan"
+ xml:indent="true">
+ <xsl:output method="text" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="no"/>
+
+ <xsl:template match="/">
+ <xsl:for-each select="/model/class">
+ <xsl:choose>
+ <xsl:when test="$filetype='inc'">
+ <xsl:call-template name="incfile"/>
+ </xsl:when>
+ <xsl:when test="$filetype='impl'">
+ <xsl:call-template name="implfile"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="license">
+ <xsl:text>/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: PropertyMap.hxx,v $
+ * $Revision: 1.18 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * &lt;http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/&#xa;</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="memberid">
+ <xsl:variable name="member">
+ <xsl:choose>
+ <xsl:when test="@member">
+ <xsl:value-of select="@member"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:for-each select="ancestor::class/member[@name=$member]">
+ <xsl:choose>
+ <xsl:when test="@type='bool'">
+ <xsl:text>m_b</xsl:text>
+ </xsl:when>
+ <xsl:when test="@type='OUString'">
+ <xsl:text>m_s</xsl:text>
+ </xsl:when>
+ <xsl:when test="@type='sal_uInt32'">
+ <xsl:text>m_n</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>m_</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ <xsl:call-template name="capfirst">
+ <xsl:with-param name="string" select="$member"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="incfile">
+ <xsl:call-template name="license"/>
+ <xsl:for-each select="//class">
+ <xsl:variable name="includeguard">
+ <xsl:text>INCLUDED_</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>_HXX</xsl:text>
+ </xsl:variable>
+ <xsl:text>#ifndef </xsl:text>
+ <xsl:value-of select="$includeguard"/>
+ <xsl:text>&#xa;#define </xsl:text>
+ <xsl:value-of select="$includeguard"/>
+ <xsl:text>&#xa;#include &lt;resourcemodel/WW8ResourceModel.hxx></xsl:text>
+ <xsl:text>&#xa;#include &lt;rtl/ustring.hxx></xsl:text>
+ <xsl:text>&#xa;namespace writerfilter {</xsl:text>
+ <xsl:text>&#xa;namespace dmapper {</xsl:text>
+ <xsl:call-template name="classdecl"/>
+ <xsl:text>&#xa;}}</xsl:text>
+ <xsl:text>&#xa;#endif //</xsl:text>
+ <xsl:value-of select="$includeguard"/>
+ <xsl:text>&#xa;</xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="implfile">
+ <xsl:call-template name="license"/>
+ <xsl:for-each select="//class">
+ <xsl:text>#include "</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>.hxx"&#xa;</xsl:text>
+ <xsl:text>&#xa;#include &lt;ooxml/resourceids.hxx></xsl:text>
+ <xsl:text>&#xa;#ifdef DEBUG_DOMAINMAPPER</xsl:text>
+ <xsl:text>&#xa;#include &lt;resourcemodel/QNameToString.hxx></xsl:text>
+ <xsl:text>&#xa;#include "dmapperLoggers.hxx"</xsl:text>
+ <xsl:text>&#xa;#endif</xsl:text>
+ <xsl:text>&#xa;namespace writerfilter {</xsl:text>
+ <xsl:text>&#xa;namespace dmapper {&#xa;</xsl:text>
+ <xsl:call-template name="classimpl"/>
+ <xsl:text>}}&#xa;</xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="classdecl">
+ <xsl:text>&#xa;class </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="parent">
+ <xsl:text> : public </xsl:text>
+ </xsl:if>
+ <xsl:for-each select="parent">
+ <xsl:if test="position() > 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="@name"/>
+ </xsl:for-each>
+ <xsl:text>&#xa;{</xsl:text>
+ <xsl:text>&#xa;public:</xsl:text>
+ <xsl:call-template name="typedefs"/>
+ <xsl:text>&#xa; // constructor</xsl:text>
+ <xsl:text>&#xa; </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>();</xsl:text>
+ <xsl:text>&#xa; // destructor</xsl:text>
+ <xsl:text>&#xa; virtual ~</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>();&#xa;</xsl:text>
+ <xsl:call-template name="memberfuncdecls"/>
+ <xsl:for-each select="sprm">
+ <xsl:text>&#xa; // sprm</xsl:text>
+ <xsl:text>&#xa; void sprm(Sprm &amp; r_sprm);</xsl:text>
+ <xsl:text>&#xa; void resolveSprm(Sprm &amp; r_sprm);&#xa;</xsl:text>
+ </xsl:for-each>
+ <xsl:for-each select="attribute">
+ <xsl:text>&#xa; // attribute</xsl:text>
+ <xsl:text>&#xa; void attribute(Id name, Value &amp; val);&#xa;</xsl:text>
+ </xsl:for-each>
+ <xsl:text>&#xa;private:</xsl:text>
+ <xsl:call-template name="memberdecls"/>
+ <xsl:text>&#xa;};&#xa;&#xa;</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="type">
+ <xsl:param name="name"/>
+ <xsl:choose>
+ <xsl:when test="$name='OUString'">
+ <xsl:text>::rtl::OUString</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="typedefs">
+ <xsl:text>&#xa; // typedefs</xsl:text>
+ <xsl:for-each select="typedef">
+ <xsl:text>&#xa; typedef </xsl:text>
+ <xsl:choose>
+ <xsl:when test="@type = 'shared_ptr'">
+ <xsl:text>::boost::shared_ptr&lt;</xsl:text>
+ <xsl:value-of select="ancestor::class/@name"/>
+ <xsl:text>&gt;</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:for-each select="vector">
+ <xsl:text>::std::vector&lt;</xsl:text>
+ <xsl:call-template name="cctype"/>
+ <xsl:text>&gt;</xsl:text>
+ </xsl:for-each>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>;</xsl:text>
+ </xsl:for-each>
+ <xsl:text>&#xa;</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="settername">
+ <xsl:text>set</xsl:text>
+ <xsl:call-template name="capfirst">
+ <xsl:with-param name="string" select="@name"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="gettername">
+ <xsl:text>get</xsl:text>
+ <xsl:call-template name="capfirst">
+ <xsl:with-param name="string" select="@name"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="pushbackname">
+ <xsl:value-of select="@name"/>
+ <xsl:text>PushBack</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="settersig">
+ <xsl:param name="classname"/>
+ <xsl:variable name="impl">
+ <xsl:if test="string-length($classname) > 0">
+ <xsl:text>true</xsl:text>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:text>void </xsl:text>
+ <xsl:if test="string-length($classname) > 0">
+ <xsl:value-of select="$classname"/>
+ <xsl:text>::</xsl:text>
+ </xsl:if>
+ <xsl:call-template name="settername"/>
+ <xsl:text>(</xsl:text>
+ <xsl:call-template name="constcctyperef">
+ <xsl:with-param name="impl" select="$impl"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="paramname"/>
+ <xsl:text>)</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="gettersig">
+ <xsl:param name="classname"/>
+ <xsl:variable name="impl">
+ <xsl:if test="string-length($classname) > 0">
+ <xsl:text>true</xsl:text>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="type" select="@type"/>
+ <xsl:call-template name="constcctyperef">
+ <xsl:with-param name="impl" select="$impl"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:if test="string-length($classname) > 0">
+ <xsl:value-of select="$classname"/>
+ <xsl:text>::</xsl:text>
+ </xsl:if>
+ <xsl:call-template name="gettername"/>
+ <xsl:text>() const</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="pushbacksig">
+ <xsl:param name="classname"/>
+ <xsl:variable name="pushback">
+ <xsl:call-template name="pushbackname"/>
+ </xsl:variable>
+ <xsl:variable name="type" select="@type"/>
+ <xsl:for-each select="ancestor::class/typedef[@name=$type]">
+ <xsl:for-each select="vector">
+ <xsl:text>void </xsl:text>
+ <xsl:if test="string-length($classname) > 0">
+ <xsl:value-of select="$classname"/>
+ <xsl:text>::</xsl:text>
+ </xsl:if>
+ <xsl:value-of select="$pushback"/>
+ <xsl:text>(</xsl:text>
+ <xsl:call-template name="constcctyperef">
+ <xsl:with-param name="deep">true</xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> r_Element</xsl:text>
+ <xsl:text>)</xsl:text>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="memberfuncdecls">
+ <xsl:for-each select="member">
+ <xsl:text>&#xa; // member: </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>&#xa; </xsl:text>
+ <xsl:call-template name="settersig"/>
+ <xsl:text>;</xsl:text>
+ <xsl:text>&#xa; </xsl:text>
+ <xsl:call-template name="gettersig"/>
+ <xsl:text>;&#xa; </xsl:text>
+ <xsl:variable name="pushback">
+ <xsl:call-template name="pushbacksig"/>
+ </xsl:variable>
+ <xsl:if test="string-length($pushback) > 0">
+ <xsl:value-of select="$pushback"/>
+ <xsl:text>;&#xa;</xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="memberdecls">
+ <xsl:for-each select="member">
+ <xsl:text>&#xa; </xsl:text>
+ <xsl:call-template name="cctype"/>
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="memberid"/>
+ <xsl:text>;</xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="cctype">
+ <xsl:param name="deep"/>
+ <xsl:param name="impl"/>
+ <xsl:variable name="type" select="@type"/>
+ <xsl:variable name="try1">
+ <xsl:if test="$deep='true'">
+ <xsl:for-each select="ancestor::class/typedef[@name=$type]">
+ <xsl:for-each select="vector">
+ <xsl:call-template name="cctype">
+ <xsl:with-param name="impl" select="$impl"/>
+ <xsl:with-param name="deep" select="$deep"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="string-length($try1) > 0">
+ <xsl:value-of select="$try1"/>
+ </xsl:when>
+ <xsl:when test="@type='OUString'">
+ <xsl:text>rtl::OUString</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$impl='true'">
+ <xsl:for-each select="ancestor::class">
+ <xsl:variable name="classname" select="@name"/>
+ <xsl:for-each select="typedef[@name=$type]">
+ <xsl:value-of select="$classname"/>
+ <xsl:text>::</xsl:text>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:value-of select="@type"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="constcctype">
+ <xsl:param name="impl"/>
+ <xsl:choose>
+ <xsl:when test="@type='bool' or @type='sal_uInt32'">
+ <xsl:value-of select="@type"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>const </xsl:text>
+ <xsl:call-template name="cctype">
+ <xsl:with-param name="impl" select="$impl"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="constcctyperef">
+ <xsl:param name="impl"/>
+ <xsl:choose>
+ <xsl:when test="@type='bool' or @type='sal_uInt32'">
+ <xsl:value-of select="@type"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="constcctype">
+ <xsl:with-param name="impl" select="$impl"/>
+ </xsl:call-template>
+ <xsl:text> &amp;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="capfirst">
+ <xsl:param name="string"/>
+ <xsl:variable name="first" select="translate(substring($string, 1,1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+ <xsl:value-of select="concat($first, substring($string, 2))"/>
+ </xsl:template>
+
+ <xsl:template name="paramname">
+ <xsl:choose>
+ <xsl:when test="@type='OUString'">
+ <xsl:text>r_s</xsl:text>
+ <xsl:call-template name="capfirst">
+ <xsl:with-param name="string" select="@name"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>r_</xsl:text>
+ <xsl:value-of select="@name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="setterimpl">
+ <xsl:call-template name="settersig">
+ <xsl:with-param name="classname" select="ancestor::class/@name"/>
+ </xsl:call-template>
+ <xsl:text>&#xa;{</xsl:text>
+ <xsl:text>&#xa; </xsl:text>
+ <xsl:call-template name="memberid"/>
+ <xsl:text> = </xsl:text>
+ <xsl:call-template name="paramname"/>
+ <xsl:text>;</xsl:text>
+ <xsl:text>&#xa;}&#xa;&#xa;</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="getterimpl">
+ <xsl:call-template name="gettersig">
+ <xsl:with-param name="classname" select="ancestor::class/@name"/>
+ </xsl:call-template>
+ <xsl:text>&#xa;{</xsl:text>
+ <xsl:text>&#xa; return </xsl:text>
+ <xsl:call-template name="memberid"/>
+ <xsl:text>;</xsl:text>
+ <xsl:text>&#xa;}&#xa;&#xa;</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="pushbackimpl">
+ <xsl:variable name="sig">
+ <xsl:call-template name="pushbacksig">
+ <xsl:with-param name="classname" select="ancestor::class/@name"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="string-length($sig) > 0">
+ <xsl:value-of select="$sig"/>
+ <xsl:text>&#xa;{</xsl:text>
+ <xsl:text>&#xa; </xsl:text>
+ <xsl:call-template name="memberid"/>
+ <xsl:text>.push_back(r_Element);</xsl:text>
+ <xsl:text>&#xa;}&#xa;&#xa;</xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="getvalue">
+ <xsl:param name="valuePrefix"/>
+ <xsl:choose>
+ <xsl:when test="@type='OUString'">
+ <xsl:value-of select="$valuePrefix"/>
+ <xsl:text>getString()</xsl:text>
+ </xsl:when>
+ <xsl:when test="@type='bool' or @type='sal_uInt32'">
+ <xsl:value-of select="$valuePrefix"/>
+ <xsl:text>getInt()</xsl:text>
+ </xsl:when>
+ <xsl:when test="@type">
+ <xsl:variable name="type" select="@type"/>
+ <xsl:for-each select="ancestor::class/typedef[@name=$type]">
+ <xsl:call-template name="getvalue">
+ <xsl:with-param name="valuePrefix" select="$valuePrefix"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="member">
+ <xsl:choose>
+ <xsl:when test="@member">
+ <xsl:value-of select="@member"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:for-each select="ancestor::class/member[@name=$member]">
+ <xsl:call-template name="getvalue">
+ <xsl:with-param name="valuePrefix" select="$valuePrefix"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:for-each select="vector">
+ <xsl:call-template name="getvalue">
+ <xsl:with-param name="valuePrefix" select="$valuePrefix"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="sprmactionset">
+ <xsl:param name="valuePrefix"/>
+ <xsl:text>&#xa; {</xsl:text>
+ <xsl:text>&#xa; </xsl:text>
+ <xsl:call-template name="memberid"/>
+ <xsl:text> = </xsl:text>
+ <xsl:call-template name="getvalue">
+ <xsl:with-param name="valuePrefix" select="$valuePrefix"/>
+ </xsl:call-template>
+ <xsl:text>;&#xa; }</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="sprmactionpushback">
+ <xsl:param name="valuePrefix"/>
+ <xsl:text>&#xa; {</xsl:text>
+ <xsl:text>&#xa; </xsl:text>
+ <xsl:call-template name="memberid"/>
+ <xsl:text>.push_back(</xsl:text>
+ <xsl:call-template name="getvalue">
+ <xsl:with-param name="valuePrefix" select="$valuePrefix"/>
+ </xsl:call-template>
+ <xsl:text>);</xsl:text>
+ <xsl:text>;&#xa; }</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="sprmactionresolve">
+ <xsl:text>&#xa; {</xsl:text>
+ <xsl:text>&#xa; resolveSprm(r_Sprm);</xsl:text>
+ <xsl:text>&#xa; }</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="sprmaction">
+ <xsl:param name="valuePrefix"/>
+ <xsl:choose>
+ <xsl:when test="@action='set'">
+ <xsl:call-template name="sprmactionset">
+ <xsl:with-param name="valuePrefix" select="$valuePrefix"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="@action='pushback'">
+ <xsl:call-template name="sprmactionpushback">
+ <xsl:with-param name="valuePrefix" select="$valuePrefix"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="@action='resolve'">
+ <xsl:call-template name="sprmactionresolve"/>
+ </xsl:when>
+ <xsl:otherwise/>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="sprmimpl">
+ <xsl:for-each select="sprm">
+ <xsl:text>&#xa;void </xsl:text>
+ <xsl:variable name="classname" select="ancestor::class/@name"/>
+ <xsl:value-of select="$classname"/>
+ <xsl:text>::sprm(Sprm &amp; r_Sprm)</xsl:text>
+ <xsl:text>&#xa;{</xsl:text>
+ <xsl:text>&#xa;#ifdef DEBUG_DOMAINMAPPER</xsl:text>
+ <xsl:text>&#xa; dmapper_logger->startElement("</xsl:text>
+ <xsl:value-of select="$classname"/>
+ <xsl:text>.sprm");</xsl:text>
+ <xsl:text>&#xa; dmapper_logger->chars(r_Sprm.toString());</xsl:text>
+ <xsl:text>&#xa;#endif</xsl:text>
+ <xsl:text>&#xa; switch(r_Sprm.getId())</xsl:text>
+ <xsl:text>&#xa; {</xsl:text>
+ <xsl:for-each select="element">
+ <xsl:text>&#xa; case </xsl:text>
+ <xsl:value-of select="@id"/>
+ <xsl:text>:</xsl:text>
+ <xsl:text>&#xa; /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */</xsl:text>
+ <xsl:call-template name="sprmaction">
+ <xsl:with-param name="valuePrefix">r_Sprm.getValue()-&gt;</xsl:with-param>
+ </xsl:call-template>
+ <xsl:text>&#xa; break;</xsl:text>
+ </xsl:for-each>
+ <xsl:text>&#xa; default:</xsl:text>
+ <xsl:text>&#xa;#ifdef DEBUG_DOMAINMAPPER</xsl:text>
+ <xsl:text>&#xa; dmapper_logger->element("unhandled");</xsl:text>
+ <xsl:text>&#xa;#endif DEBUG_DOMAINMAPPER</xsl:text>
+ <xsl:text>&#xa; break;</xsl:text>
+ <xsl:text>&#xa; }</xsl:text>
+ <xsl:text>&#xa;#ifdef DEBUG_DOMAINMAPPER</xsl:text>
+ <xsl:text>&#xa; dmapper_logger->endElement("</xsl:text>
+ <xsl:value-of select="$classname"/>
+ <xsl:text>.sprm");</xsl:text>
+ <xsl:text>&#xa;#endif</xsl:text>
+ <xsl:text>&#xa;}&#xa;</xsl:text>
+ <xsl:text>&#xa;void </xsl:text>
+ <xsl:value-of select="ancestor::class/@name"/>
+ <xsl:text>::resolveSprm(Sprm &amp; r_Sprm)</xsl:text>
+ <xsl:text>&#xa;{</xsl:text>
+ <xsl:text>&#xa; writerfilter::Reference&lt;Properties&gt;::Pointer_t pProperties = r_Sprm.getProps();</xsl:text>
+ <xsl:text>&#xa; if( pProperties.get())</xsl:text>
+ <xsl:text>&#xa; pProperties->resolve(*this);</xsl:text>
+ <xsl:text>&#xa;}&#xa;</xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="attrimpl">
+ <xsl:for-each select="attribute">
+ <xsl:text>&#xa;void </xsl:text>
+ <xsl:variable name="classname" select="ancestor::class/@name"/>
+ <xsl:value-of select="$classname"/>
+ <xsl:text>::</xsl:text>
+ <xsl:text>attribute(Id name, Value &amp; val)</xsl:text>
+ <xsl:text>&#xa;{</xsl:text>
+ <xsl:text>&#xa;#ifdef DEBUG_DOMAINMAPPER</xsl:text>
+ <xsl:text>&#xa; dmapper_logger->startElement("</xsl:text>
+ <xsl:value-of select="$classname"/>
+ <xsl:text>.attribute");</xsl:text>
+ <xsl:text>&#xa; dmapper_logger->attribute("name", (*QNameToString::Instance())(name));</xsl:text>
+ <xsl:text>&#xa; dmapper_logger->attribute("value", val.toString());</xsl:text>
+ <xsl:text>&#xa; dmapper_logger->endElement("</xsl:text>
+ <xsl:value-of select="$classname"/>
+ <xsl:text>.attribute");</xsl:text>
+ <xsl:text>&#xa;#endif</xsl:text>
+ <xsl:text>&#xa; switch (name)</xsl:text>
+ <xsl:text>&#xa; {</xsl:text>
+ <xsl:for-each select="attribute">
+ <xsl:text>&#xa; case </xsl:text>
+ <xsl:value-of select="@id"/>
+ <xsl:text>:</xsl:text>
+ <xsl:text>&#xa; /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */</xsl:text>
+ <xsl:call-template name="sprmactionset">
+ <xsl:with-param name="valuePrefix">val.</xsl:with-param>
+ </xsl:call-template>
+ <xsl:text>&#xa; break;</xsl:text>
+ </xsl:for-each>
+ <xsl:text>&#xa; default:</xsl:text>
+ <xsl:text>&#xa;#ifdef DEBUG_DOMAINMAPPER</xsl:text>
+ <xsl:text>&#xa; dmapper_logger->element("unhandled");</xsl:text>
+ <xsl:text>&#xa;#endif DEBUG_DOMAINMAPPER</xsl:text>
+ <xsl:text>&#xa; break;</xsl:text>
+ <xsl:text>&#xa; }</xsl:text>
+ <xsl:text>&#xa;}&#xa;&#xa;</xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="constructorimpl">
+ <xsl:text>&#xa;</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>::</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>()</xsl:text>
+ <xsl:variable name="memberinits">
+ <xsl:for-each select="member[@type='sal_uInt32' or @type='bool']">
+ <xsl:if test="position() > 1">
+ <xsl:text>,</xsl:text>
+ <xsl:text>&#xa; </xsl:text>
+ </xsl:if>
+ <xsl:call-template name="memberid"/>
+ <xsl:choose>
+ <xsl:when test="@type='sal_uInt32'">
+ <xsl:text>(0)</xsl:text>
+ </xsl:when>
+ <xsl:when test="@type='bool'">
+ <xsl:text>(false)</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:if test="string-length($memberinits) > 0">
+ <xsl:text>&#xa;: </xsl:text>
+ <xsl:value-of select="$memberinits"/>
+ </xsl:if>
+ <xsl:text>&#xa;{</xsl:text>
+ <xsl:text>&#xa;}&#xa;&#xa;</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="destructorimpl">
+ <xsl:text>&#xa;</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>::~</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>()</xsl:text>
+ <xsl:text>&#xa;{</xsl:text>
+ <xsl:text>&#xa;}&#xa;&#xa;</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="classimpl">
+ <xsl:variable name="classname" select="@name"/>
+ <xsl:variable name="comment">
+ <xsl:text>class: </xsl:text>
+ <xsl:value-of select="$classname"/>
+ </xsl:variable>
+ <xsl:variable name="commentfill">
+ <xsl:value-of select="translate($comment, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ: ',
+ '******************************************************')"/>
+ </xsl:variable>
+ <xsl:text>&#xa;/***</xsl:text>
+ <xsl:value-of select="$commentfill"/>
+ <xsl:text>*</xsl:text>
+ <xsl:text>&#xa; * </xsl:text>
+ <xsl:value-of select="$comment"/>
+ <xsl:text> *</xsl:text>
+ <xsl:text>&#xa; **</xsl:text>
+ <xsl:value-of select="$commentfill"/>
+ <xsl:text>**/&#xa;</xsl:text>
+ <xsl:call-template name="constructorimpl"/>
+ <xsl:call-template name="destructorimpl"/>
+ <xsl:for-each select="member">
+ <xsl:text>// member: </xsl:text>
+ <xsl:value-of select="$classname"/>
+ <xsl:text>::</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>&#xa;</xsl:text>
+ <xsl:call-template name="setterimpl"/>
+ <xsl:call-template name="getterimpl"/>
+ <xsl:call-template name="pushbackimpl"/>
+ </xsl:for-each>
+ <xsl:call-template name="sprmimpl"/>
+ <xsl:call-template name="attrimpl"/>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/writerfilter/source/dmapper/makefile.mk b/writerfilter/source/dmapper/makefile.mk
index 4b9636855562..300dfb31d959 100644..100755
--- a/writerfilter/source/dmapper/makefile.mk
+++ b/writerfilter/source/dmapper/makefile.mk
@@ -47,6 +47,8 @@ SLOFILES= \
$(SLO)$/DomainMapperTableHandler.obj \
$(SLO)$/DomainMapperTableManager.obj \
$(SLO)$/DomainMapper_Impl.obj \
+ $(SLO)$/FFDataHandler.obj \
+ $(SLO)$/FormControlHelper.obj \
$(SLO)$/FontTable.obj \
$(SLO)$/GraphicHelpers.obj \
$(SLO)$/GraphicImport.obj \
diff --git a/writerfilter/source/doctok/WW8DocumentImpl.cxx b/writerfilter/source/doctok/WW8DocumentImpl.cxx
index 27dfd68e4eb8..fee0abc85fe7 100644
--- a/writerfilter/source/doctok/WW8DocumentImpl.cxx
+++ b/writerfilter/source/doctok/WW8DocumentImpl.cxx
@@ -157,6 +157,7 @@ WW8Document::~WW8Document()
{
}
+#ifdef DEBUG
class WW8IdToString : public IdToString
{
public:
@@ -173,6 +174,7 @@ public:
return s;
}
};
+#endif
WW8DocumentImpl::~WW8DocumentImpl()
{
@@ -185,6 +187,9 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false)
mpDocStream = getSubStream(::rtl::OUString::createFromAscii
("WordDocument"));
+ mpSummaryInformationStream = getSubStream(::rtl::OUString::createFromAscii
+ ("\5SummaryInformation"));
+
try
{
mpDataStream = getSubStream(::rtl::OUString::createFromAscii
@@ -1077,6 +1082,24 @@ writerfilter::Reference<Table>::Pointer_t WW8DocumentImpl::getStyleSheet() const
return pResult;
}
+writerfilter::Reference<Table>::Pointer_t WW8DocumentImpl::getAssocTable() const
+{
+ writerfilter::Reference<Table>::Pointer_t pResult;
+
+ if (mpFib->get_lcbSttbfAssoc() > 0)
+ {
+ WW8Sttbf::Pointer_t pSttbfAssoc
+ (new WW8Sttbf(*mpTableStream,
+ mpFib->get_fcSttbfAssoc(),
+ mpFib->get_lcbSttbfAssoc()));
+
+ pResult = writerfilter::Reference<Table>::Pointer_t
+ (new WW8SttbTableResource(pSttbfAssoc));
+ }
+
+ return pResult;
+}
+
sal_uInt32 WW8DocumentImpl::getHeaderCount() const
{
sal_uInt32 nResult = 0;
@@ -1281,6 +1304,19 @@ WW8DocumentImpl::getField(const CpAndFc & rCpAndFc) const
return mpFieldHelper->getField(rCpAndFc);
}
+writerfilter::Reference<Properties>::Pointer_t
+WW8DocumentImpl::getDocumentProperties() const
+{
+ writerfilter::Reference<Properties>::Pointer_t pResult;
+
+ if (mpFib->get_lcbDop() > 0)
+ {
+ pResult.reset(new WW8DopBase(*mpTableStream, mpFib->get_fcDop(), mpFib->get_lcbDop()));
+ }
+
+ return pResult;
+}
+
WW8FLD::Pointer_t WW8DocumentImpl::getCurrentFLD() const
{
return mpFLD;
@@ -1632,7 +1668,7 @@ void WW8DocumentImpl::resolve(Stream & rStream)
//output.addItem(mTextboxHeaderEndCpAndFc.toString());
-#if 0
+#if 1
output.addItem("<substream-names>");
output.addItem(mpStream->getSubStreamNames());
output.addItem("</substream-names>");
@@ -1641,6 +1677,11 @@ void WW8DocumentImpl::resolve(Stream & rStream)
{
mpDocStream->dump(output);
}
+
+ if (mpSummaryInformationStream.get() != NULL)
+ {
+ mpSummaryInformationStream->dump(output);
+ }
#endif
writerfilter::Reference<Properties>::Pointer_t pFib
@@ -1743,6 +1784,11 @@ void WW8DocumentImpl::resolve(Stream & rStream)
clog << e.getText() << endl;
}
+ writerfilter::Reference<Table>::Pointer_t pAssocTable = getAssocTable();
+
+ if (pAssocTable.get() != NULL)
+ rStream.table(NS_rtf::LN_SttbAssoc, pAssocTable);
+
writerfilter::Reference<Table>::Pointer_t pListTable = getListTable();
if (pListTable.get() != NULL)
@@ -1845,6 +1891,9 @@ void WW8DocumentImpl::resolve(Stream & rStream)
startSectionGroup(rStream);
rStream.info(pIt->toString());
+ if (nSectionIndex == 0)
+ rStream.props(getDocumentProperties());
+
sal_uInt32 nHeaderStartIndex = 6 + nSectionIndex * 6;
sal_uInt32 nHeaderEndIndex = nHeaderStartIndex + 6;
diff --git a/writerfilter/source/doctok/WW8DocumentImpl.hxx b/writerfilter/source/doctok/WW8DocumentImpl.hxx
index 9b123ae54cde..a1f7e8abb2b4 100644
--- a/writerfilter/source/doctok/WW8DocumentImpl.hxx
+++ b/writerfilter/source/doctok/WW8DocumentImpl.hxx
@@ -284,6 +284,9 @@ class WW8DocumentImpl : public WW8Document
/// pointer to the compound object stream of the document
WW8Stream::Pointer_t mpCompObjStream;
+ /// pointer to the summayry information stream of the document
+ WW8Stream::Pointer_t mpSummaryInformationStream;
+
/// pointer to the piece table
WW8PieceTable::Pointer_t mpPieceTable;
@@ -554,6 +557,11 @@ public:
writerfilter::Reference<Table>::Pointer_t getStyleSheet() const;
/**
+ Return reference to associated data.
+ */
+ writerfilter::Reference<Table>::Pointer_t getAssocTable() const;
+
+ /**
Return count of headers/footers.
*/
sal_uInt32 getHeaderCount() const;
@@ -677,6 +685,13 @@ public:
getField(const CpAndFc & rCpAndFc) const;
/**
+ Return document properties.
+
+ */
+ writerfilter::Reference<Properties>::Pointer_t
+ getDocumentProperties() const;
+
+ /**
Return current field descriptor.
*/
WW8FLD::Pointer_t getCurrentFLD() const;
diff --git a/writerfilter/source/doctok/WW8FontTable.cxx b/writerfilter/source/doctok/WW8FontTable.cxx
index f29d2ea4a343..7391763f347e 100644
--- a/writerfilter/source/doctok/WW8FontTable.cxx
+++ b/writerfilter/source/doctok/WW8FontTable.cxx
@@ -52,11 +52,6 @@ void WW8FontTable::initPayload()
mnPlcfPayloadOffset = nOffset;
}
-sal_uInt32 WW8FontTable::calcPayloadOffset()
-{
- return 0;
-}
-
sal_uInt32 WW8FontTable::getEntryCount()
{
return entryOffsets.size() - 1;
diff --git a/writerfilter/source/doctok/WW8LFOTable.cxx b/writerfilter/source/doctok/WW8LFOTable.cxx
index 2164c4887c8b..1197ef7f190d 100644
--- a/writerfilter/source/doctok/WW8LFOTable.cxx
+++ b/writerfilter/source/doctok/WW8LFOTable.cxx
@@ -62,13 +62,6 @@ void WW8LFOTable::initPayload()
payloadOffsets.push_back(nOffsetLFOData);
}
-sal_uInt32 WW8LFOTable::calcPayloadOffset()
-{
- sal_uInt32 nResult = 4 + getEntryCount() * WW8LFO::getSize();
-
- return nResult;
-}
-
sal_uInt32 WW8LFOTable::getEntryCount()
{
return getU32(0);
diff --git a/writerfilter/source/doctok/WW8ListTable.cxx b/writerfilter/source/doctok/WW8ListTable.cxx
index f70c7740dff2..15ef3039d8da 100644
--- a/writerfilter/source/doctok/WW8ListTable.cxx
+++ b/writerfilter/source/doctok/WW8ListTable.cxx
@@ -68,11 +68,6 @@ void WW8ListTable::initPayload()
entryOffsets.push_back(nOffset);
}
-sal_uInt32 WW8ListTable::calcPayloadOffset()
-{
- return 0;
-}
-
sal_uInt32 WW8ListTable::getEntryCount()
{
return getU16(0);
diff --git a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
index a576640905ce..da72435d5efb 100644
--- a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
+++ b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
@@ -27,7 +27,6 @@
#include <WW8ResourceModelImpl.hxx>
#include <resources.hxx>
-#include <util.hxx>
#include <WW8OutputWithDepth.hxx>
#include <resourcemodel/TableManager.hxx>
#include <rtl/string.hxx>
diff --git a/writerfilter/source/doctok/WW8StreamImpl.cxx b/writerfilter/source/doctok/WW8StreamImpl.cxx
index 4418839919d4..585673bfa887 100644
--- a/writerfilter/source/doctok/WW8StreamImpl.cxx
+++ b/writerfilter/source/doctok/WW8StreamImpl.cxx
@@ -39,7 +39,9 @@ namespace doctok
{
using namespace ::com::sun::star;
- TagLogger::Pointer_t debug_logger(TagLogger::getInstance("DEBUG"));
+#ifdef DEBUG
+TagLogger::Pointer_t debug_logger(TagLogger::getInstance("DEBUG"));
+#endif
WW8Stream::~WW8Stream()
{
diff --git a/writerfilter/source/doctok/WW8StructBase.cxx b/writerfilter/source/doctok/WW8StructBase.cxx
index 7d03e8763c69..746034f4b177 100644
--- a/writerfilter/source/doctok/WW8StructBase.cxx
+++ b/writerfilter/source/doctok/WW8StructBase.cxx
@@ -26,7 +26,6 @@
************************************************************************/
#include <WW8StructBase.hxx>
-#include <util.hxx>
namespace writerfilter {
namespace doctok {
diff --git a/writerfilter/source/doctok/WW8StyleSheet.cxx b/writerfilter/source/doctok/WW8StyleSheet.cxx
index 797554f984e3..3bf08eee430c 100644
--- a/writerfilter/source/doctok/WW8StyleSheet.cxx
+++ b/writerfilter/source/doctok/WW8StyleSheet.cxx
@@ -46,11 +46,6 @@ void WW8StyleSheet::initPayload()
entryOffsets.push_back(nOffset);
}
-sal_uInt32 WW8StyleSheet::calcPayloadOffset()
-{
- return 0;
-}
-
sal_uInt32 WW8StyleSheet::calcSize()
{
return getCount();
diff --git a/writerfilter/source/doctok/doctokLoggers.hxx b/writerfilter/source/doctok/doctokLoggers.hxx
index 8df90348a249..b7dc7e0aa48f 100644
--- a/writerfilter/source/doctok/doctokLoggers.hxx
+++ b/writerfilter/source/doctok/doctokLoggers.hxx
@@ -28,6 +28,8 @@
#ifndef INCLUDED_DOCTOK_LOGGERS_HXX
#define INCLUDED_DOCTOK_LOGGERS_HXX
+#ifdef DEBUG
+
#include <resourcemodel/TagLogger.hxx>
namespace writerfilter {
@@ -36,5 +38,5 @@ namespace writerfilter {
}
}
-
+#endif // DEBUG
#endif // INCLUDED_DOCTOK_LOGGERS_HXX
diff --git a/writerfilter/source/doctok/dopbase.xml b/writerfilter/source/doctok/dopbase.xml
new file mode 100644
index 000000000000..8beb21d8cf08
--- /dev/null
+++ b/writerfilter/source/doctok/dopbase.xml
@@ -0,0 +1,91 @@
+<model>
+ <ww8resource name="DopBase" resource="Properties">
+ <bitfield size="4" type="U32">
+ <bits name="fFacingPages" bits="1" token="rtf:fFacingPages"/>
+ <bits name="unused1" bits="1" token="rtf:unused1"/>
+ <bits name="fPMHMainDoc" bits="1" token="rtf:fPMHMainDoc"/>
+ <bits name="unused2" bits="2" token="rtf:unused2"/>
+ <bits name="fpc" bits="2" token="rtf:fpc"/>
+ <bits name="unused3" bits="1" token="rtf:unused3"/>
+ <bits name="unused4" bits="8" token="rtf:unused4"/>
+ <bits name="rncFtn" bits="2" token="rtf:rncFtn"/>
+ <bits name="nFtn" bits="14" token="rtf:nFtn"/>
+ </bitfield>
+ <bitfield size="4" type="U32">
+ <bits name="unused5" bits="1" token="rtf:unused5"/>
+ <bits name="unused6" bits="1" token="rtf:unused6"/>
+ <bits name="unused7" bits="1" token="rtf:unused7"/>
+ <bits name="unused8" bits="1" token="rtf:unused8"/>
+ <bits name="unused9" bits="1" token="rtf:unused9"/>
+ <bits name="unused10" bits="1" token="rtf:unused10"/>
+ <bits name="fSplAllDone" bits="1" token="rtf:fSplAllDone"/>
+ <bits name="fSplAllClean" bits="1" token="rtf:fSplAllClean"/>
+ <bits name="fSplHideErrors" bits="1" token="rtf:fSplHideErrors"/>
+ <bits name="fGramHideErrors" bits="1" token="rtf:fGramHideErrors"/>
+ <bits name="fLabelDoc" bits="1" token="rtf:fLabelDoc"/>
+ <bits name="fHyphCapitals" bits="1" token="rtf:fHyphCapitals"/>
+ <bits name="fAutoHyphen" bits="1" token="rtf:fAutoHyphen"/>
+ <bits name="fFormNoFields" bits="1" token="rtf:fFormNoFields"/>
+ <bits name="fLinkStyles" bits="1" token="rtf:fLinkStyles"/>
+ <bits name="fRevMarking" bits="1" token="rtf:fRevMarking"/>
+ <bits name="unused11" bits="1" token="rtf:unused11"/>
+ <bits name="fExactCWords" bits="1" token="rtf:fExactCWords"/>
+ <bits name="fPagHidden" bits="1" token="rtf:fPagHidden"/>
+ <bits name="fPagResults" bits="1" token="rtf:fPagResults"/>
+ <bits name="fLockAtn" bits="1" token="rtf:fLockAtn"/>
+ <bits name="fMirrorMargins" bits="1" token="rtf:fMirrorMargins"/>
+ <bits name="fWord97Compat" bits="1" token="rtf:fWord97Compat"/>
+ <bits name="unused12" bits="1" token="rtf:unused12"/>
+ <bits name="unused13" bits="1" token="rtf:unused13"/>
+ <bits name="fProtEnabled" bits="1" token="rtf:fProtEnabled"/>
+ <bits name="fDispFormFldSel" bits="1" token="rtf:fDispFormFldSel"/>
+ <bits name="fRMView" bits="1" token="rtf:fRMView"/>
+ <bits name="fRMPrint" bits="1" token="rtf:fRMPrint"/>
+ <bits name="fLockVbaProj" bits="1" token="rtf:fLockVbaProj"/>
+ <bits name="fLockRev" bits="1" token="rtf:fLockRev"/>
+ <bits name="fEmbedFonts" bits="1" token="rtf:fEmbedFonts"/>
+ </bitfield>
+ <attribute name="copts60" type="U16" size="2" token="rtf:copts60"/>
+ <attribute name="dxaTab" type="U16" size="2" token="rtf:dxaTab"/>
+ <attribute name="cpgWebOpt" type="U16" size="2" token="rtf:cpgWebOpt"/>
+ <attribute name="dxaHotZ" type="U16" size="2" token="rtf:dxaHotZ"/>
+ <attribute name="cConsecHypLim" type="U16" size="2" token="rtf:cConsecHypLim"/>
+ <attribute name="wSpare2" type="U16" size="2" token="rtf:wSpare2"/>
+ <attribute name="dttmCreated" type="U32" size="4" token="rtf:dttmCreated"/>
+ <attribute name="dttmRevised" type="U32" size="4" token="rtf:dttmRevised"/>
+ <attribute name="dttmLastPrint" type="U32" size="4" token="rtf:dttmLastPrint"/>
+ <attribute name="nRevision" type="U16" size="2" token="rtf:nRevision"/>
+ <attribute name="tmEdited" type="U32" size="4" token="rtf:tmEdited"/>
+ <attribute name="cWords" type="U32" size="4" token="rtf:cWords"/>
+ <attribute name="cCh" type="U32" size="4" token="rtf:cCh"/>
+ <attribute name="cPg" type="U16" size="2" token="rtf:cPg"/>
+ <attribute name="cParas" type="U32" size="4" token="rtf:cParas"/>
+ <bitfield size="4" type="U32">
+ <bits name="rncEdn" bits="2" token="rtf:rncEdn"/>
+ <bits name="nEdn" bits="14" token="rtf:"/>
+ <bits name="epc" bits="2" token="rtf:"/>
+ <bits name="unused14" bits="4" token="rtf:unused14"/>
+ <bits name="unused15" bits="4" token="rtf:unused15"/>
+ <bits name="fPrintFormData" bits="1" token="rtf:fPrintFormData"/>
+ <bits name="fSaveFormData" bits="1" token="rtf:fSaveFormData"/>
+ <bits name="fShadeFormData" bits="1" token="rtf:fShadeFormData"/>
+ <bits name="fShadeMergeFields" bits="1" token="rtf:fShadeMergeFields"/>
+ <bits name="reserved2" bits="1" token="rtf:reserved2"/>
+ <bits name="fIncludeSubdocsInStats" bits="1" token="rtf:fIncludeSubdocsInStats"/>
+ </bitfield>
+ <attribute name="cLines" type="U32" size="4" token="rtf:cLines"/>
+ <attribute name="cWordsWithSubdocs" type="U32" size="4" token="rtf:cWordsWithSubdocs"/>
+ <attribute name="cChWithSubdocs" type="U32" size="4" token="rtf:cChWithSubdocs"/>
+ <attribute name="cPgWithSubdocs" type="U16" size="2" token="rtf:cPgWithSubdocs"/>
+ <attribute name="cParasWithSubdocs" type="U32" size="4" token="rtf:cParasWithSubdocs"/>
+ <attribute name="cLinesWithSubdocs" type="U32" size="4" token="rtf:cLinesWithSubdocs"/>
+ <attribute name="lKeyProtDoc" type="U32" size="4" token="rtf:lKeyProtDoc"/>
+ <bitfield size="2" type="U16">
+ <bits name="wvkoSaved" bits="3" token="rtf:wvkoSaved"/>
+ <bits name="pctWwdSaved" bits="9" token="rtf:pctWwdSaved"/>
+ <bits name="zkSaved" bits="2" token="rtf:zkSaved"/>
+ <bits name="unused16" bits="1" token="rtf:unused16"/>
+ <bits name="iGutterPos" bits="1" token="rtf:iGutterPos"/>
+ </bitfield>
+ </ww8resource>
+</model> \ No newline at end of file
diff --git a/writerfilter/source/doctok/makefile.mk b/writerfilter/source/doctok/makefile.mk
index 6a407a0b91ea..ff03079f2c7a 100644
--- a/writerfilter/source/doctok/makefile.mk
+++ b/writerfilter/source/doctok/makefile.mk
@@ -58,7 +58,6 @@ SLOFILES= \
$(SLO)$/WW8LFOTable.obj \
$(SLO)$/WW8ListTable.obj \
$(SLO)$/resources.obj \
- $(SLO)$/doctokutil.obj \
$(SLO)$/WW8CpAndFc.obj \
$(SLO)$/WW8StructBase.obj \
$(SLO)$/WW8Clx.obj \
diff --git a/writerfilter/source/doctok/resources.xmi b/writerfilter/source/doctok/resources.xmi
index cfcd2ac7e67e..926e046d37b9 100644
--- a/writerfilter/source/doctok/resources.xmi
+++ b/writerfilter/source/doctok/resources.xmi
@@ -552,6 +552,21 @@
</UML:ModelElement.stereotype>
</UML:Attribute>
</UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="SttbAssoc">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:SttbAssoc</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
</UML:Class>
<!--Class dummy-->
<!--Classes without stereotype-->
@@ -578,6 +593,4611 @@
</UML:Class>
<!--Resources-->
<!--WW8 resources-->
+ <!--Class DopBase-->
+ <UML:Class xmi.id="DopBase" name="DopBase">
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8resource"/>
+ </UML:ModelElement.stereotype>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>84</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="size"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fFacingPages">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>31</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x80000000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fFacingPages</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="unused1">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>30</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x40000000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:unused1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fPMHMainDoc">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>29</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x20000000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fPMHMainDoc</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="unused2">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>27</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x18000000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:unused2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fpc">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>25</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x6000000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fpc</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="unused3">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>24</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x000000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:unused3</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="unused4">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>16</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0xff0000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>8</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:unused4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="rncFtn">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>14</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0xc000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:rncFtn</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="nFtn">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x3fff</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>14</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:nFtn</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="unused5">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>31</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x80000000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:unused5</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="unused6">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>30</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x40000000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:unused6</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="unused7">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>29</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x20000000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:unused7</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="unused8">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>28</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x0000000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:unused8</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="unused9">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>27</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x8000000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:unused9</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="unused10">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>26</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x4000000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:unused10</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fSplAllDone">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>25</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x2000000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fSplAllDone</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fSplAllClean">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>24</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x000000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fSplAllClean</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fSplHideErrors">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>23</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x800000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fSplHideErrors</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fGramHideErrors">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>22</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x400000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fGramHideErrors</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fLabelDoc">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>21</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x200000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fLabelDoc</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fHyphCapitals">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>20</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x00000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fHyphCapitals</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fAutoHyphen">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>19</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x80000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fAutoHyphen</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fFormNoFields">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>18</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x40000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fFormNoFields</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fLinkStyles">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>17</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x20000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fLinkStyles</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fRevMarking">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>16</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x0000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fRevMarking</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="unused11">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>15</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x8000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:unused11</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fExactCWords">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>14</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x4000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fExactCWords</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fPagHidden">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>13</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x2000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fPagHidden</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fPagResults">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>12</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fPagResults</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fLockAtn">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>11</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x800</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fLockAtn</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fMirrorMargins">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>10</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x400</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fMirrorMargins</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fWord97Compat">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>9</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x200</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fWord97Compat</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="unused12">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>8</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x00</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:unused12</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="unused13">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>7</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x80</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:unused13</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fProtEnabled">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>6</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x40</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fProtEnabled</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fDispFormFldSel">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>5</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x20</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fDispFormFldSel</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fRMView">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fRMView</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fRMPrint">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>3</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x8</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fRMPrint</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fLockVbaProj">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fLockVbaProj</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fLockRev">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fLockRev</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fEmbedFonts">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fEmbedFonts</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="copts60">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>8</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:copts60</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U16"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="dxaTab">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>10</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:dxaTab</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U16"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="cpgWebOpt">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>12</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:cpgWebOpt</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U16"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="dxaHotZ">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>14</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:dxaHotZ</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U16"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="cConsecHypLim">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>16</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:cConsecHypLim</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U16"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="wSpare2">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>18</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:wSpare2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U16"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="dttmCreated">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>20</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:dttmCreated</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="dttmRevised">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>24</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:dttmRevised</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="dttmLastPrint">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>28</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:dttmLastPrint</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="nRevision">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>32</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:nRevision</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U16"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="tmEdited">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>34</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:tmEdited</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="cWords">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>38</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:cWords</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="cCh">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>42</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:cCh</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="cPg">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>46</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:cPg</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U16"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="cParas">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>48</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:cParas</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="rncEdn">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>52</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>30</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0xc0000000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:rncEdn</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="nEdn">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>52</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>16</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x3fff0000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>14</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="epc">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>52</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>14</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0xc000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="unused14">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>52</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>10</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x3c00</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:unused14</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="unused15">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>52</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>6</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x3c0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:unused15</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fPrintFormData">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>52</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>5</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x20</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fPrintFormData</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fSaveFormData">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>52</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fSaveFormData</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fShadeFormData">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>52</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>3</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x8</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fShadeFormData</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fShadeMergeFields">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>52</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fShadeMergeFields</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="reserved2">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>52</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:reserved2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="fIncludeSubdocsInStats">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>52</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:fIncludeSubdocsInStats</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="cLines">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>56</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:cLines</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="cWordsWithSubdocs">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>60</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:cWordsWithSubdocs</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="cChWithSubdocs">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>64</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:cChWithSubdocs</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="cPgWithSubdocs">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>68</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:cPgWithSubdocs</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U16"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="cParasWithSubdocs">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>70</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:cParasWithSubdocs</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="cLinesWithSubdocs">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>74</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:cLinesWithSubdocs</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="lKeyProtDoc">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>78</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:lKeyProtDoc</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U32"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="wvkoSaved">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>82</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>13</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0xe000</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>3</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:wvkoSaved</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U16"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="pctWwdSaved">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>82</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x1ff0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>9</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:pctWwdSaved</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U16"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="zkSaved">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>82</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0xc</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:zkSaved</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U16"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="unused16">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>82</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:unused16</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U16"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="iGutterPos">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>82</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:iGutterPos</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U16"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Generalization isSpecification="false" xmi.id="DopBase-Properties">
+ <UML:Generalization.child>
+ <UML:Class xmi.idref="DopBase"/>
+ </UML:Generalization.child>
+ <UML:Generalization.parent>
+ <UML:Class xmi.idref="Properties"/>
+ </UML:Generalization.parent>
+ </UML:Generalization>
+ <!--Class DopBase-->
<!--Class ListLevel-->
<UML:Class xmi.id="ListLevel" name="ListLevel">
<UML:ModelElement.stereotype>
@@ -2322,6 +6942,9 @@
<UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref="plcf"/>
</UML:ModelElement.stereotype>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8nopayloadoffset"/>
+ </UML:ModelElement.stereotype>
<UML:ModelElement.taggedValue>
<UML:TaggedValue>
<UML:TaggedValue.dataValue>rtf:LISTTABLE</UML:TaggedValue.dataValue>
@@ -3116,6 +7739,9 @@
<UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref="plcf"/>
</UML:ModelElement.stereotype>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8nopayloadoffset"/>
+ </UML:ModelElement.stereotype>
<UML:ModelElement.taggedValue>
<UML:TaggedValue>
<UML:TaggedValue.dataValue>rtf:LFOTABLE</UML:TaggedValue.dataValue>
@@ -3140,6 +7766,9 @@
<UML:Stereotype xmi.idref="ww8resource"/>
</UML:ModelElement.stereotype>
<UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8nopayloadoffset"/>
+ </UML:ModelElement.stereotype>
+ <UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref="plcf"/>
</UML:ModelElement.stereotype>
<UML:ModelElement.taggedValue>
@@ -4784,7 +9413,13 @@
<UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref="plcf"/>
</UML:ModelElement.stereotype>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8nopayloadoffset"/>
+ </UML:ModelElement.stereotype>
<UML:Classifier.feature>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8nocalcsize"/>
+ </UML:ModelElement.stereotype>
<UML:Attribute name="size">
<UML:ModelElement.taggedValue>
<UML:TaggedValue>
@@ -22897,6 +27532,9 @@
<UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref="ww8resource"/>
</UML:ModelElement.stereotype>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8nocalcsize"/>
+ </UML:ModelElement.stereotype>
<UML:ModelElement.taggedValue>
<UML:TaggedValue>
<UML:TaggedValue.dataValue>10</UML:TaggedValue.dataValue>
@@ -32214,6 +36852,9 @@
<UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref="ww8resource"/>
</UML:ModelElement.stereotype>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8nopayloadoffset"/>
+ </UML:ModelElement.stereotype>
<UML:ModelElement.taggedValue>
<UML:TaggedValue>
<UML:TaggedValue.dataValue>0xC60D</UML:TaggedValue.dataValue>
@@ -38863,6 +43504,9 @@
<UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref="ww8resource"/>
</UML:ModelElement.stereotype>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8nocalcsize"/>
+ </UML:ModelElement.stereotype>
<UML:ModelElement.taggedValue>
<UML:TaggedValue>
<UML:TaggedValue.dataValue>0xD609</UML:TaggedValue.dataValue>
@@ -40194,6 +44838,9 @@
<UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref="ww8resource"/>
</UML:ModelElement.stereotype>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8nocalcsize"/>
+ </UML:ModelElement.stereotype>
<UML:ModelElement.taggedValue>
<UML:TaggedValue>
<UML:TaggedValue.dataValue>0xD61A</UML:TaggedValue.dataValue>
@@ -40258,6 +44905,9 @@
<UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref="ww8resource"/>
</UML:ModelElement.stereotype>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8nocalcsize"/>
+ </UML:ModelElement.stereotype>
<UML:ModelElement.taggedValue>
<UML:TaggedValue>
<UML:TaggedValue.dataValue>0xD61B</UML:TaggedValue.dataValue>
@@ -40322,6 +44972,9 @@
<UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref="ww8resource"/>
</UML:ModelElement.stereotype>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8nocalcsize"/>
+ </UML:ModelElement.stereotype>
<UML:ModelElement.taggedValue>
<UML:TaggedValue>
<UML:TaggedValue.dataValue>0xD61C</UML:TaggedValue.dataValue>
@@ -40386,6 +45039,9 @@
<UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref="ww8resource"/>
</UML:ModelElement.stereotype>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8nocalcsize"/>
+ </UML:ModelElement.stereotype>
<UML:ModelElement.taggedValue>
<UML:TaggedValue>
<UML:TaggedValue.dataValue>0xD61D</UML:TaggedValue.dataValue>
@@ -40450,6 +45106,9 @@
<UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref="ww8resource"/>
</UML:ModelElement.stereotype>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8nocalcsize"/>
+ </UML:ModelElement.stereotype>
<UML:ModelElement.taggedValue>
<UML:TaggedValue>
<UML:TaggedValue.dataValue>0xD613</UML:TaggedValue.dataValue>
@@ -40963,6 +45622,9 @@
<UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref="ww8sprm"/>
</UML:ModelElement.stereotype>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8nocalcsize"/>
+ </UML:ModelElement.stereotype>
<UML:ModelElement.taggedValue>
<UML:TaggedValue>
<UML:TaggedValue.dataValue>0xd670</UML:TaggedValue.dataValue>
@@ -43371,7 +48033,7 @@
</UML:ModelElement.taggedValue>
<UML:ModelElement.taggedValue>
<UML:TaggedValue>
- <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.dataValue>2</UML:TaggedValue.dataValue>
<UML:TaggedValue.type>
<UML:TagDefinition xmi.idref="offset"/>
</UML:TaggedValue.type>
@@ -43429,7 +48091,7 @@
</UML:ModelElement.taggedValue>
<UML:ModelElement.taggedValue>
<UML:TaggedValue>
- <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.dataValue>2</UML:TaggedValue.dataValue>
<UML:TaggedValue.type>
<UML:TagDefinition xmi.idref="offset"/>
</UML:TaggedValue.type>
@@ -43487,7 +48149,7 @@
</UML:ModelElement.taggedValue>
<UML:ModelElement.taggedValue>
<UML:TaggedValue>
- <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.dataValue>2</UML:TaggedValue.dataValue>
<UML:TaggedValue.type>
<UML:TagDefinition xmi.idref="offset"/>
</UML:TaggedValue.type>
diff --git a/writerfilter/source/doctok/resources.xsl b/writerfilter/source/doctok/resources.xsl
index e1fc68ba5323..5ff0efe0edd1 100644
--- a/writerfilter/source/doctok/resources.xsl
+++ b/writerfilter/source/doctok/resources.xsl
@@ -301,14 +301,15 @@ class </xsl:text>
*/
static sal_uInt32 getSize() { return </xsl:text>
<xsl:value-of select='$size'/>
- <xsl:text>; }
-
+ <xsl:text>; }</xsl:text>
+ <xsl:if test="not(.//UML:Stereotype[@xmi.ref='ww8nocalcsize'])">
+ <xsl:text>
/**
Calculate actual size.
*/
- sal_uInt32 calcSize();
-
- </xsl:text>
+ sal_uInt32 calcSize();
+ </xsl:text>
+ </xsl:if>
<xsl:if test='.//UML:Stereotype[@xmi.idref ="plcf"]'>
<xsl:text>
/**
@@ -319,13 +320,15 @@ class </xsl:text>
sal_uInt32 getEntryOffset(sal_uInt32 nIndex)
{
return entryOffsets[nIndex];
- }
-
+ }</xsl:text>
+ <xsl:if test="not(.//UML:Stereotype[@xmi.idref='ww8nopayloadoffset'])">
+ <xsl:text>
/**
Calculate offset for payload.
*/
- sal_uInt32 calcPayloadOffset();
-
+ sal_uInt32 calcPayloadOffset();</xsl:text>
+ </xsl:if>
+ <xsl:text>
/**
Set offset for payloads.
diff --git a/writerfilter/source/doctok/xmigen.xsl b/writerfilter/source/doctok/xmigen.xsl
index d6eab5846fd4..f184dcfed4d2 100644
--- a/writerfilter/source/doctok/xmigen.xsl
+++ b/writerfilter/source/doctok/xmigen.xsl
@@ -184,6 +184,76 @@
</UML:Generalization>
</xsl:template>
+ <xsl:template match="sprm">
+ <xsl:variable name="isww8resource">
+ <xsl:choose>
+ <xsl:when test="count(*) > 0">YES</xsl:when>
+ <xsl:otherwise>NO</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <UML:Class>
+ <xsl:attribute name="xmi.id">
+ <xsl:value-of select="@name"/>
+ </xsl:attribute>
+ <xsl:attribute name="name">
+ <xsl:value-of select="@name"/>
+ </xsl:attribute>
+ <xsl:if test="$isww8resource='YES'">
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8resource"/>
+ </UML:ModelElement.stereotype>
+ </xsl:if>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8sprm"/>
+ </UML:ModelElement.stereotype>
+ <xsl:call-template name="taggedvalue">
+ <xsl:with-param name="type">sprmcode</xsl:with-param>
+ <xsl:with-param name="value" select="@code"/>
+ </xsl:call-template>
+ <xsl:call-template name="taggedvalue">
+ <xsl:with-param name="type">sprmid</xsl:with-param>
+ <xsl:with-param name="value" select="@token"/>
+ </xsl:call-template>
+ <xsl:call-template name="taggedvalue">
+ <xsl:with-param name="type">kind</xsl:with-param>
+ <xsl:with-param name="value" select="@kind"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="*"/>
+ </UML:Class>
+ <xsl:if test="$isww8resource='YES'">
+ <xsl:call-template name="generalization">
+ <xsl:with-param name="parent">Properties</xsl:with-param>
+ <xsl:with-param name="child" select="@name"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="generalization">
+ <xsl:param name="parent"/>
+ <xsl:param name="child"/>
+ <UML:Generalization isSpecification="false">
+ <xsl:attribute name="xmi.id">
+ <xsl:value-of select="$child"/>
+ <xsl:text>-</xsl:text>
+ <xsl:value-of select="$parent"/>
+ </xsl:attribute>
+ <UML:Generalization.child>
+ <UML:Class>
+ <xsl:attribute name="xmi.idref">
+ <xsl:value-of select="$child"/>
+ </xsl:attribute>
+ </UML:Class>
+ </UML:Generalization.child>
+ <UML:Generalization.parent>
+ <UML:Class xmi.idref="Properties">
+ <xsl:attribute name="xmi.idref">
+ <xsl:value-of select="$parent"/>
+ </xsl:attribute>
+ </UML:Class>
+ </UML:Generalization.parent>
+ </UML:Generalization>
+ </xsl:template>
+
<xsl:template name="taggedvalue">
<xsl:param name="type"/>
<xsl:param name="value"/>
@@ -278,7 +348,7 @@
<xsl:template match="bitfield">
<xsl:variable name="offset">
- <xsl:value-of select="sum(preceding-sibling::*/@size)"/>
+ <xsl:call-template name="calcoffset"/>
</xsl:variable>
<xsl:for-each select="bits">
<xsl:call-template name="bits">
diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx
index 911689996b07..10e7cefa591f 100644
--- a/writerfilter/source/filter/ImportFilter.cxx
+++ b/writerfilter/source/filter/ImportFilter.cxx
@@ -87,13 +87,18 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes
}
#ifdef DEBUG_ELEMENT
- writerfilter::TagLogger::Pointer_t debugLogger
- (writerfilter::TagLogger::getInstance("DEBUG"));
- debugLogger->startDocument();
-
- writerfilter::TagLogger::Pointer_t dmapperLogger
- (writerfilter::TagLogger::getInstance("DOMAINMAPPER"));
- dmapperLogger->startDocument();
+ OUString sURL = aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_URL(), OUString() );
+ ::std::string sURLc = OUStringToOString(sURL, RTL_TEXTENCODING_ASCII_US).getStr();
+
+ writerfilter::TagLogger::Pointer_t debugLogger
+ (writerfilter::TagLogger::getInstance("DEBUG"));
+ debugLogger->setFileName(sURLc);
+ debugLogger->startDocument();
+
+ writerfilter::TagLogger::Pointer_t dmapperLogger
+ (writerfilter::TagLogger::getInstance("DOMAINMAPPER"));
+ dmapperLogger->setFileName(sURLc);
+ dmapperLogger->startDocument();
#endif
writerfilter::dmapper::SourceDocumentType eType =
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index 2700a28959cc..248334136de5 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -42,7 +42,11 @@ using ::com::sun::star::xml::sax::SAXException;
namespace writerfilter {
namespace ooxml
{
+
+#ifdef DEBUG
TagLogger::Pointer_t debug_logger(TagLogger::getInstance("DEBUG"));
+#endif
+
using namespace ::std;
OOXMLDocumentImpl::OOXMLDocumentImpl
diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx
index 6fac03898e42..964d9e1cb5ee 100755
--- a/writerfilter/source/ooxml/OOXMLFactory.cxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.cxx
@@ -263,7 +263,13 @@ OOXMLFactory::createFastChildContext(OOXMLFastContextHandler * pHandler,
OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine);
- return createFastChildContextFromFactory(pHandler, pFactory, Element);
+ uno::Reference< xml::sax::XFastContextHandler> ret;
+
+ //Avoid handling unknown tokens and recursing to death
+ if ((Element & 0xffff) < OOXML_FAST_TOKENS_END)
+ ret = createFastChildContextFromFactory(pHandler, pFactory, Element);
+
+ return ret;
}
void OOXMLFactory::characters(OOXMLFastContextHandler * pHandler,
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 4fbcff0de0a7..20ee49258c00 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -100,7 +100,7 @@ static string resourceToString
set<OOXMLFastContextHandler *> aSetContexts;
-
+#ifdef DEBUG
class OOXMLIdToString : public IdToString
{
public:
@@ -119,6 +119,7 @@ public:
return s;
}
};
+#endif
/*
class OOXMLFastContextHandler
@@ -136,8 +137,7 @@ OOXMLFastContextHandler::OOXMLFastContextHandler
mnTableDepth(0),
mnInstanceNumber(mnInstanceCount),
mnRefCount(0),
- m_xContext(context),
- mbFallback(false)
+ m_xContext(context)
{
mnInstanceCount++;
aSetContexts.insert(this);
@@ -159,7 +159,7 @@ OOXMLFastContextHandler::OOXMLFastContextHandler
mnTableDepth(0),
mnInstanceNumber(mnInstanceCount),
mnRefCount(0),
- mbFallback(false)
+ m_xContext(pContext->m_xContext)
{
if (pContext != NULL)
{
@@ -182,29 +182,6 @@ OOXMLFastContextHandler::~OOXMLFastContextHandler()
aSetContexts.erase(this);
}
-void OOXMLFastContextHandler::dumpOpenContexts()
-{
- debug_logger->startElement("open-contexts");
- XMLTag aTag("open-contexts");
-
- set<OOXMLFastContextHandler *>::iterator aIt(aSetContexts.begin());
- while (aIt != aSetContexts.end())
- {
- debug_logger->startElement("open-context");
- debug_logger->addTag((*aIt)->toTag());
- debug_logger->endElement("open-context");
-
- aIt++;
- }
-
- static char buffer[256];
- snprintf(buffer, sizeof(buffer), "%" SAL_PRI_SIZET "u",
- aSetContexts.size());
-
- debug_logger->attribute("count", buffer);
- debug_logger->endElement("open-contexts");
-}
-
#ifdef DEBUG_MEMORY
void SAL_CALL OOXMLFastContextHandler::acquire()
throw ()
@@ -232,11 +209,6 @@ void SAL_CALL OOXMLFastContextHandler::release()
}
#endif
-sal_uInt32 OOXMLFastContextHandler::getInstanceNumber() const
-{
- return mnInstanceNumber;
-}
-
// ::com::sun::star::xml::sax::XFastContextHandler:
void SAL_CALL OOXMLFastContextHandler::startFastElement
(Token_t Element,
@@ -462,6 +434,7 @@ void OOXMLFastContextHandler::lcl_endAction(Token_t Element)
OOXMLFactory::getInstance()->endAction(this, Element);
}
+#ifdef DEBUG
XMLTag::Pointer_t OOXMLFastContextHandler::toPropertiesTag
(OOXMLPropertySet::Pointer_t pProps)
{
@@ -511,6 +484,7 @@ string OOXMLFastContextHandler::toString() const
{
return toTag()->toString();
}
+#endif
string OOXMLFastContextHandler::getResourceString() const
{
@@ -548,16 +522,6 @@ Id OOXMLFastContextHandler::getDefine() const
return mnDefine;
}
-void OOXMLFastContextHandler::setFallback(bool bFallback)
-{
- mbFallback = bFallback;
-}
-
-bool OOXMLFastContextHandler::isFallback() const
-{
- return mbFallback;
-}
-
OOXMLParserState::Pointer_t OOXMLFastContextHandler::getParserState() const
{
return mpParserState;
@@ -1030,26 +994,6 @@ void OOXMLFastContextHandler::sendTableProperties()
#endif
}
-void OOXMLFastContextHandler::clearCellProps()
-{
-#ifdef DEBUG_ELEMENT
- debug_logger->element("clearCellProps");
-#endif
-
- mpParserState->setCellProperties(OOXMLPropertySet::Pointer_t
- (new OOXMLPropertySetImpl()));
-}
-
-void OOXMLFastContextHandler::clearRowProps()
-{
-#ifdef DEBUG_ELEMENT
- debug_logger->element("clearRowProps");
-#endif
-
- mpParserState->setRowProperties(OOXMLPropertySet::Pointer_t
- (new OOXMLPropertySetImpl()));
-}
-
void OOXMLFastContextHandler::clearTableProps()
{
#ifdef DEBUG_ELEMENT
@@ -1107,11 +1051,6 @@ void OOXMLFastContextHandler::setDefaultStringValue()
{
}
-const ::rtl::OUString & OOXMLFastContextHandler::getText() const
-{
- return aEmptyStr;
-}
-
void OOXMLFastContextHandler::setDocument(OOXMLDocument * pDocument)
{
mpParserState->setDocument(pDocument);
@@ -1296,19 +1235,6 @@ OOXMLFastContextHandler::getComponentContext()
}
/*
- class OOXMLFastContextHandlerNoResource
- */
-OOXMLFastContextHandlerNoResource::OOXMLFastContextHandlerNoResource
-(OOXMLFastContextHandler * pContext)
-: OOXMLFastContextHandler(pContext)
-{
-}
-
-OOXMLFastContextHandlerNoResource::~OOXMLFastContextHandlerNoResource()
-{
-}
-
-/*
class OOXMLFastContextHandlerStream
*/
@@ -1352,12 +1278,6 @@ void OOXMLFastContextHandlerStream::sendProperty(Id nId)
sText.getLength());
}
-void OOXMLFastContextHandlerStream::setPropertySetAttrs
-(OOXMLPropertySet::Pointer_t pPropertySetAttrs)
-{
- mpPropertySetAttrs = pPropertySetAttrs;
-}
-
OOXMLPropertySet::Pointer_t
OOXMLFastContextHandlerStream::getPropertySetAttrs() const
{
@@ -1439,6 +1359,7 @@ OOXMLValue::Pointer_t OOXMLFastContextHandlerProperties::getValue() const
return OOXMLValue::Pointer_t(new OOXMLPropertySetValue(mpPropertySet));
}
+#ifdef DEBUG
XMLTag::Pointer_t OOXMLFastContextHandlerProperties::toTag() const
{
XMLTag::Pointer_t pTag(OOXMLFastContextHandler::toTag());
@@ -1446,6 +1367,7 @@ XMLTag::Pointer_t OOXMLFastContextHandlerProperties::toTag() const
return pTag;
}
+#endif
void OOXMLFastContextHandlerProperties::newProperty
(const Id & rId, OOXMLValue::Pointer_t pVal)
@@ -1980,72 +1902,6 @@ void OOXMLFastContextHandlerTextTable::lcl_endFastElement
class OOXMLFastContextHandlerShape
*/
-class ShapesNoAdd:
- public ::cppu::WeakImplHelper1<
- drawing::XShapes>
-{
-public:
- explicit ShapesNoAdd(uno::Reference< uno::XComponentContext > const & context, uno::Reference< drawing::XShapes> const & xShapes);
-
-private:
- // container::XElementAccess:
- virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException);
- virtual ::sal_Bool SAL_CALL hasElements() throw (uno::RuntimeException);
-
- // container::XIndexAccess:
- virtual ::sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException);
- virtual uno::Any SAL_CALL getByIndex(::sal_Int32 Index) throw (uno::RuntimeException, lang::IndexOutOfBoundsException, lang::WrappedTargetException);
-
- // drawing::XShapes:
- virtual void SAL_CALL add(const uno::Reference< drawing::XShape > & xShape) throw (uno::RuntimeException);
- virtual void SAL_CALL remove(const uno::Reference< drawing::XShape > & xShape) throw (uno::RuntimeException);
-
- ShapesNoAdd(ShapesNoAdd &); // not defined
- void operator =(ShapesNoAdd &); // not defined
-
- virtual ~ShapesNoAdd() {}
-
- uno::Reference< uno::XComponentContext > m_xContext;
- uno::Reference< drawing::XShapes > m_xShapes;
-};
-
-ShapesNoAdd::ShapesNoAdd(uno::Reference< uno::XComponentContext > const & context, uno::Reference< drawing::XShapes> const & xShapes) :
-m_xContext(context), m_xShapes(xShapes)
-{}
-
-// container::XElementAccess:
-uno::Type SAL_CALL ShapesNoAdd::getElementType() throw (uno::RuntimeException)
-{
- return m_xShapes->getElementType();
-}
-
-::sal_Bool SAL_CALL ShapesNoAdd::hasElements() throw (uno::RuntimeException)
-{
- return m_xShapes->hasElements();
-}
-
-// container::XIndexAccess:
-::sal_Int32 SAL_CALL ShapesNoAdd::getCount() throw (uno::RuntimeException)
-{
- return m_xShapes->getCount();
-}
-
-uno::Any SAL_CALL ShapesNoAdd::getByIndex(::sal_Int32 Index) throw (uno::RuntimeException, lang::IndexOutOfBoundsException, lang::WrappedTargetException)
-{
- return m_xShapes->getByIndex(Index);
-}
-
-// drawing::XShapes:
-void SAL_CALL ShapesNoAdd::add(const uno::Reference< drawing::XShape > &
- ) throw (uno::RuntimeException)
-{
-}
-
-void SAL_CALL ShapesNoAdd::remove(const uno::Reference< drawing::XShape > & xShape) throw (uno::RuntimeException)
-{
- m_xShapes->remove(xShape);
-}
-
OOXMLFastContextHandlerShape::OOXMLFastContextHandlerShape
(OOXMLFastContextHandler * pContext)
: OOXMLFastContextHandlerProperties(pContext), m_bShapeSent( false ),
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
index b67f86fda3e7..0c441f62a180 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
@@ -132,10 +132,6 @@ public:
virtual ResourceEnum_t getResource() const { return STREAM; }
- static XMLTag::Pointer_t toPropertiesTag(OOXMLPropertySet::Pointer_t);
- virtual XMLTag::Pointer_t toTag() const;
- virtual string toString() const;
-
virtual void attributes
(const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
throw (uno::RuntimeException, xml::sax::SAXException);
@@ -179,18 +175,9 @@ public:
void setDefine(Id nDefine);
Id getDefine() const;
- void setFallback(bool bFallbac);
- bool isFallback() const;
OOXMLParserState::Pointer_t getParserState() const;
-#ifdef DEBUG_MEMORY
- virtual void SAL_CALL acquire() throw();
- virtual void SAL_CALL release() throw();
-#endif
-
- sal_uInt32 getInstanceNumber() const;
-
void sendTableDepth() const;
void setHandle();
@@ -227,8 +214,6 @@ public:
void sendCellProperties();
void sendRowProperties();
void sendTableProperties();
- void clearCellProps();
- void clearRowProps();
void clearTableProps();
void clearProps();
@@ -237,10 +222,18 @@ public:
virtual void setDefaultHexValue();
virtual void setDefaultStringValue();
- const ::rtl::OUString & getText() const;
-
void sendPropertyToParent();
- static void dumpOpenContexts();
+
+#ifdef DEBUG
+ static XMLTag::Pointer_t toPropertiesTag(OOXMLPropertySet::Pointer_t);
+ virtual XMLTag::Pointer_t toTag() const;
+ virtual string toString() const;
+#endif
+
+#ifdef DEBUG_MEMORY
+ virtual void SAL_CALL acquire() throw();
+ virtual void SAL_CALL release() throw();
+#endif
protected:
OOXMLFastContextHandler * mpParent;
@@ -302,14 +295,6 @@ private:
static sal_uInt32 mnInstanceCount;
- bool mbFallback;
-};
-
-class OOXMLFastContextHandlerNoResource : public OOXMLFastContextHandler
-{
-public:
- OOXMLFastContextHandlerNoResource(OOXMLFastContextHandler * pContext);
- virtual ~OOXMLFastContextHandlerNoResource();
};
class OOXMLFastContextHandlerStream : public OOXMLFastContextHandler
@@ -329,10 +314,10 @@ public:
void handleHyperlink();
protected:
- void setPropertySetAttrs(OOXMLPropertySet::Pointer_t pPropertySetAttrs);
virtual void resolvePropertySetAttrs();
virtual void lcl_characters(const ::rtl::OUString & aChars)
throw (uno::RuntimeException, xml::sax::SAXException);
+
private:
mutable OOXMLPropertySet::Pointer_t mpPropertySetAttrs;
};
@@ -346,8 +331,6 @@ public:
virtual OOXMLValue::Pointer_t getValue() const;
virtual ResourceEnum_t getResource() const { return PROPERTIES; }
- virtual XMLTag::Pointer_t toTag() const;
-
virtual void newProperty(const Id & nId, OOXMLValue::Pointer_t pVal);
void handleXNotes();
@@ -360,6 +343,10 @@ public:
virtual void setPropertySet(OOXMLPropertySet::Pointer_t pPropertySet);
virtual OOXMLPropertySet::Pointer_t getPropertySet() const;
+#ifdef DEBUG
+ virtual XMLTag::Pointer_t toTag() const;
+#endif
+
protected:
/// the properties
OOXMLPropertySet::Pointer_t mpPropertySet;
diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
index 7007a2b6c436..1768d486c80d 100644
--- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
@@ -152,13 +152,6 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
return OOXMLFactory::getInstance()->createFastChildContextFromStart(getContextHandler().get(), Element);
}
-OOXMLParserState::Pointer_t OOXMLFastDocumentHandler::getParserState() const
-{
- OOXMLParserState::Pointer_t pParserState;
-
- return getContextHandler()->getParserState();
-}
-
uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
OOXMLFastDocumentHandler::createUnknownChildContext
(const ::rtl::OUString &
diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx
index 9a7fc611e3a9..ca322e0c2098 100644
--- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx
@@ -95,8 +95,6 @@ public:
void setDocument(OOXMLDocument * pDocument);
void setXNoteId(const ::rtl::OUString & rXNoteId);
- OOXMLParserState::Pointer_t getParserState() const;
-
void setIsSubstream( bool bSubstream );
private:
diff --git a/writerfilter/source/ooxml/OOXMLFastHelper.hxx b/writerfilter/source/ooxml/OOXMLFastHelper.hxx
index 2d21083487ff..5d4587922a54 100644
--- a/writerfilter/source/ooxml/OOXMLFastHelper.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastHelper.hxx
@@ -84,8 +84,6 @@ OOXMLFastHelper<T>::createAndSetParent
debug_logger->attribute("context", pHandler->getType());
debug_logger->attribute("token", fastTokenToId(pTmp->getToken()));
debug_logger->attribute("id", (*QNameToString::Instance())(nId));
- if (pTmp->isFallback())
- debug_logger->attribute("fallback", "yes");
debug_logger->startElement("created");
debug_logger->addTag(pTmp->toTag());
@@ -119,8 +117,6 @@ OOXMLFastHelper<T>::createAndSetParentAndDefine
snprintf(buffer, sizeof(buffer), "0x%08" SAL_PRIxUINT32, nId);
debug_logger->attribute("idnum", buffer);
- if (pTmp->isFallback())
- debug_logger->attribute("fallback", "yes");
debug_logger->startElement("created");
debug_logger->addTag(pTmp->toTag());
@@ -158,9 +154,6 @@ OOXMLFastHelper<T>::createAndSetParentRef
debug_logger->attribute("context", pHandler->getType());
debug_logger->attribute("type", fastTokenToId(nToken));
- if (pTmp->isFallback())
- debug_logger->attribute("fallback", "yes");
-
debug_logger->startElement("created");
debug_logger->chars(pTmp->getType());
debug_logger->endElement("created");
diff --git a/writerfilter/source/ooxml/OOXMLParserState.cxx b/writerfilter/source/ooxml/OOXMLParserState.cxx
index e38593777a55..fb347d02048e 100644
--- a/writerfilter/source/ooxml/OOXMLParserState.cxx
+++ b/writerfilter/source/ooxml/OOXMLParserState.cxx
@@ -103,11 +103,6 @@ bool OOXMLParserState::isForwardEvents() const
return mbForwardEvents;
}
-void OOXMLParserState::incContextCount()
-{
- mnContexts++;
-}
-
const string OOXMLParserState::getHandle() const
{
char sBuffer[256];
@@ -122,11 +117,6 @@ void OOXMLParserState::setHandle()
mnHandle = mnContexts;
}
-unsigned int OOXMLParserState::getContextCount() const
-{
- return mnContexts;
-}
-
void OOXMLParserState::setDocument(OOXMLDocument * pDocument)
{
mpDocument = pDocument;
@@ -147,44 +137,11 @@ const rtl::OUString & OOXMLParserState::getXNoteId() const
return mpDocument->getXNoteId();
}
-void OOXMLParserState::setXNoteType(const Id & rId)
-{
- mpDocument->setXNoteType(rId);
-}
-
-const Id & OOXMLParserState::getXNoteType() const
-{
- return mpDocument->getXNoteType();
-}
-
const ::rtl::OUString & OOXMLParserState::getTarget() const
{
return mpDocument->getTarget();
}
-void OOXMLParserState::newCharacterProperty(const Id & rId,
- OOXMLValue::Pointer_t pVal)
-{
- if (rId != 0x0)
- {
- if (mpCharacterProps.get() == NULL)
- mpCharacterProps =
- OOXMLPropertySet::Pointer_t(new OOXMLPropertySetImpl());
-
- OOXMLPropertyImpl::Pointer_t pProperty
- (new OOXMLPropertyImpl(rId, pVal, OOXMLPropertyImpl::ATTRIBUTE));
-
-#ifdef DEBUG_PROPERTIES
- debug_logger->startElement("<newCharacterProperty");
- debug_logger->chars(pProperty->toString());
- debug_logger->endElement("newCharacterProperty");
-#endif
-
- mpCharacterProps->add(pProperty);
- }
-
-}
-
void OOXMLParserState::resolveCharacterProperties(Stream & rStream)
{
if (mpCharacterProps.get() != NULL)
@@ -202,11 +159,6 @@ void OOXMLParserState::resolveCharacterProperties(Stream & rStream)
}
}
-OOXMLPropertySet::Pointer_t OOXMLParserState::getCharacterProperties() const
-{
- return mpCharacterProps;
-}
-
void OOXMLParserState::setCharacterProperties
(OOXMLPropertySet::Pointer_t pProps)
{
@@ -317,6 +269,22 @@ void OOXMLParserState::endTable()
mTableProps.pop();
}
+void OOXMLParserState::incContextCount()
+{
+ mnContexts++;
+}
+
+#ifdef DEBUG
+unsigned int OOXMLParserState::getContextCount() const
+{
+ return mnContexts;
+}
+
+string OOXMLParserState::toString() const
+{
+ return toTag()->toString();
+}
+
XMLTag::Pointer_t OOXMLParserState::toTag() const
{
XMLTag::Pointer_t pTag(new XMLTag("parserstate"));
@@ -352,10 +320,6 @@ XMLTag::Pointer_t OOXMLParserState::toTag() const
return pTag;
}
-
-string OOXMLParserState::toString() const
-{
- return toTag()->toString();
-}
+#endif
}}
diff --git a/writerfilter/source/ooxml/OOXMLParserState.hxx b/writerfilter/source/ooxml/OOXMLParserState.hxx
index affdd7dbe61c..2dd118a5b96b 100644
--- a/writerfilter/source/ooxml/OOXMLParserState.hxx
+++ b/writerfilter/source/ooxml/OOXMLParserState.hxx
@@ -29,9 +29,12 @@
#include <stack>
#include <ooxml/OOXMLDocument.hxx>
-#include <resourcemodel/TagLogger.hxx>
#include "OOXMLPropertySetImpl.hxx"
+#ifdef DEBUG
+#include <resourcemodel/TagLogger.hxx>
+#endif
+
namespace writerfilter {
namespace ooxml
{
@@ -76,24 +79,18 @@ public:
void setForwardEvents(bool bForwardEvents);
bool isForwardEvents() const;
- void incContextCount();
const string getHandle() const;
void setHandle();
- unsigned int getContextCount() const;
void setDocument(OOXMLDocument * pDocument);
OOXMLDocument * getDocument() const;
void setXNoteId(const rtl::OUString & rId);
const rtl::OUString & getXNoteId() const;
- void setXNoteType(const Id & rId);
- const Id & getXNoteType() const;
const rtl::OUString & getTarget() const;
- void newCharacterProperty(const Id & rId, OOXMLValue::Pointer_t pVal);
void resolveCharacterProperties(Stream & rStream);
- OOXMLPropertySet::Pointer_t getCharacterProperties() const;
void setCharacterProperties(OOXMLPropertySet::Pointer_t pProps);
void resolveCellProperties(Stream & rStream);
void setCellProperties(OOXMLPropertySet::Pointer_t pProps);
@@ -105,8 +102,15 @@ public:
void startTable();
void endTable();
+ void incContextCount();
+
+#ifdef DEBUG
+public:
+ unsigned int getContextCount() const;
string toString() const;
XMLTag::Pointer_t toTag() const;
+#endif
+
};
}}
diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
index 2f8844f1af01..f106972b23c0 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
@@ -198,10 +198,6 @@ OOXMLValue::OOXMLValue()
{
}
-OOXMLValue::OOXMLValue(const rtl::OUString & /*rValue*/)
-{
-}
-
OOXMLValue::~OOXMLValue()
{
}
@@ -659,24 +655,6 @@ string OOXMLHexValue::toString() const
}
/*
- class OOXMLListValue
-*/
-OOXMLListValue::OOXMLListValue()
-: OOXMLIntegerValue(0)
-{
-}
-
-OOXMLListValue::OOXMLListValue(sal_Int32 nValue)
-: OOXMLIntegerValue(nValue)
-{
-}
-
-
-OOXMLListValue::~OOXMLListValue()
-{
-}
-
-/*
class OOXMLShapeValue
*/
diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx
index 78c39b79d515..a04fc5f5d1af 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx
@@ -48,7 +48,6 @@ class OOXMLValue : public Value
{
public:
typedef boost::shared_ptr<OOXMLValue> Pointer_t;
- OOXMLValue(const rtl::OUString & rValue);
OOXMLValue();
virtual ~OOXMLValue();
@@ -222,14 +221,6 @@ public:
virtual OOXMLValue * clone() const;
};
-class OOXMLListValue : public OOXMLIntegerValue
-{
-public:
- OOXMLListValue();
- OOXMLListValue(sal_Int32 nValue);
- virtual ~OOXMLListValue();
-};
-
class OOXMLShapeValue : public OOXMLValue
{
protected:
diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
index 91188eeda701..8b879f4b0aec 100644
--- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
@@ -69,22 +69,6 @@ OOXMLStreamImpl::OOXMLStreamImpl
}
OOXMLStreamImpl::OOXMLStreamImpl
-(uno::Reference<uno::XComponentContext> xContext,
- uno::Reference<io::XInputStream> xStorageStream, const rtl::OUString & rId)
-: mxContext(xContext),
- mxStorageStream(xStorageStream),
- mnStreamType(UNKNOWN),
- msId(rId)
-{
- mxStorage.set
- (comphelper::OStorageHelper::GetStorageOfFormatFromInputStream
- (OFOPXML_STORAGE_FORMAT_STRING, mxStorageStream));
- mxRelationshipAccess.set(mxStorage, uno::UNO_QUERY_THROW);
-
- init();
-}
-
-OOXMLStreamImpl::OOXMLStreamImpl
(OOXMLStreamImpl & rOOXMLStream, const rtl::OUString & rId)
: mxContext(rOOXMLStream.mxContext),
mxStorageStream(rOOXMLStream.mxStorageStream),
diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.hxx b/writerfilter/source/ooxml/OOXMLStreamImpl.hxx
index 64682fab250c..15409fe8ae2a 100644
--- a/writerfilter/source/ooxml/OOXMLStreamImpl.hxx
+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.hxx
@@ -71,10 +71,6 @@ public:
uno::Reference<io::XInputStream> xStorageStream,
StreamType_t nType);
OOXMLStreamImpl(OOXMLStreamImpl & rStream, const rtl::OUString & rId);
- OOXMLStreamImpl
- (uno::Reference<uno::XComponentContext> xContext,
- uno::Reference<io::XInputStream> xStorageStream,
- const rtl::OUString & rId);
virtual ~OOXMLStreamImpl();
diff --git a/writerfilter/source/ooxml/attrsprm.xsl b/writerfilter/source/ooxml/attrsprm.xsl
new file mode 100644
index 000000000000..9351b1b874c9
--- /dev/null
+++ b/writerfilter/source/ooxml/attrsprm.xsl
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:rng="http://relaxng.org/ns/structure/1.0"
+ xmlns:xalan="http://xml.apache.org/xalan"
+ exclude-result-prefixes = "xalan"
+ xml:indent="true">
+ <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="no"/>
+
+ <xsl:include href="factorytools.xsl"/>
+
+ <xsl:template match="/">
+ <class>
+ <xsl:for-each select="//rng:define[@name='CT_FFData']">
+ <xsl:call-template name="sprm"/>
+ <xsl:call-template name="attribute"/>
+ </xsl:for-each>
+ </class>
+ </xsl:template>
+
+ <xsl:template name="sprminner">
+ <xsl:variable name="defname" select="@name"/>
+ <xsl:for-each select=".//rng:ref[not(ancestor::rng:element or ancestor::rng:attribute)]">
+ <xsl:call-template name="sprminner"/>
+ </xsl:for-each>
+ <xsl:for-each select=".//rng:element">
+ <xsl:for-each select="rng:ref">
+ <xsl:variable name="refname" select="@name"/>
+ <xsl:for-each select="ancestor::namespace/rng:grammar/rng:define[@name=$refname]">
+ <xsl:call-template name="sprminner"/>
+ </xsl:for-each>
+ </xsl:for-each>
+ <element>
+ <xsl:variable name="elementname" select="@name"/>
+ <xsl:attribute name="name">
+ <xsl:value-of select="@name"/>
+ </xsl:attribute>
+ <xsl:for-each select="rng:ref">
+ <xsl:variable name="refname" select="@name"/>
+ <xsl:for-each select="ancestor::namespace/resource[@name=$refname]">
+ <xsl:attribute name="action">
+ <xsl:choose>
+ <xsl:when test="@resource='Properties'">
+ <xsl:text>resolve</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>set</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:for-each>
+ <xsl:for-each select="ancestor::namespace/resource[@name=$defname]">
+ <xsl:for-each select="element[@name=$elementname]">
+ <xsl:attribute name="id">
+ <xsl:call-template name="idtoqname">
+ <xsl:with-param name="id">
+ <xsl:value-of select="@tokenid"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+ </element>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="sprm">
+ <sprm>
+ <xsl:call-template name="sprminner"/>
+ </sprm>
+ </xsl:template>
+
+ <xsl:template name="attributeinner">
+ <xsl:param name="parent"/>
+ <xsl:for-each select=".//rng:ref[not(ancestor::rng:element or ancestor::rng:attribute)]">
+ <xsl:variable name="refname" select="@name"/>
+ <xsl:comment><xsl:value-of select="$newparent"/></xsl:comment>
+ <xsl:for-each select="ancestor::namespace/rng:grammar/rng:define[@name=$refname]">
+ <xsl:call-template name="attributeinner">
+ <xsl:with-param name="parent" select="$parent"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:for-each>
+ <xsl:for-each select=".//rng:element">
+ <xsl:variable name="newparent">
+ <xsl:if test="string-length($parent)">
+ <xsl:value-of select="$parent"/>
+ <xsl:text>:</xsl:text>
+ </xsl:if>
+ <xsl:value-of select="@name"/>
+ </xsl:variable>
+ <xsl:for-each select="rng:ref">
+ <xsl:variable name="refname" select="@name"/>
+ <xsl:for-each select="ancestor::namespace/rng:grammar/rng:define[@name=$refname]">
+ <xsl:call-template name="attributeinner">
+ <xsl:with-param name="parent" select="$newparent"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+ <xsl:variable name="defname" select="@name"/>
+ <xsl:variable name="resource">
+ <xsl:for-each select="ancestor::namespace/resource[@name=$defname]">
+ <xsl:value-of select="@resource"/>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:if test="$resource='Properties'">
+ <xsl:for-each select=".//rng:attribute">
+ <xsl:variable name="attrname" select="@name"/>
+ <attribute>
+ <xsl:attribute name="name">
+ <xsl:if test="string-length($parent) > 0">
+ <xsl:value-of select="$parent"/>
+ <xsl:text>:</xsl:text>
+ </xsl:if>
+ <xsl:value-of select="$attrname"/>
+ </xsl:attribute>
+ <xsl:for-each select="ancestor::namespace/resource[@name=$defname]">
+ <xsl:for-each select="attribute[@name=$attrname]">
+ <xsl:attribute name="id">
+ <xsl:call-template name="idtoqname">
+ <xsl:with-param name="id">
+ <xsl:value-of select="@tokenid"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:for-each>
+ </xsl:for-each>
+ </attribute>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="attribute">
+ <attribute>
+ <xsl:call-template name="attributeinner"/>
+ </attribute>
+ </xsl:template>
+
+</xsl:stylesheet> \ No newline at end of file
diff --git a/writerfilter/source/ooxml/dummyannotate.xsl b/writerfilter/source/ooxml/dummyannotate.xsl
index 029fd6aef569..0fcc1e0dcbc7 100644
--- a/writerfilter/source/ooxml/dummyannotate.xsl
+++ b/writerfilter/source/ooxml/dummyannotate.xsl
@@ -838,7 +838,7 @@ sed "s/wml/</xsl:text>
<xsl:template match="/">
<out>
- <xsl:apply-templates select="//rng:define[@name='OLEObject']"
+ <xsl:apply-templates select="//rng:define[@name='CT_DocGrid']"
mode='resourcesPropertySetValue'/>
</out>
</xsl:template>
diff --git a/writerfilter/source/ooxml/factoryimpl_ns.xsl b/writerfilter/source/ooxml/factoryimpl_ns.xsl
index 55d986932aec..533c3d16ae23 100644
--- a/writerfilter/source/ooxml/factoryimpl_ns.xsl
+++ b/writerfilter/source/ooxml/factoryimpl_ns.xsl
@@ -150,7 +150,20 @@ for a rng:define
-->
<xsl:template name="factoryattributetoresourcemapinner">
+ <xsl:variable name="defname" select="@name"/>
+ <xsl:for-each select=".//rng:ref[not(ancestor::rng:element or ancestor::rng:attribute)]">
+ <xsl:variable name="name" select="@name"/>
+ <xsl:for-each select="ancestor::namespace/rng:grammar/rng:define[@name=$name]">
+ <xsl:call-template name="factoryattributetoresourcemapinner"/>
+ </xsl:for-each>
+ </xsl:for-each>
+
<xsl:for-each select=".//rng:attribute">
+ <xsl:if test="position()=1">
+ <xsl:text>
+ // </xsl:text>
+ <xsl:value-of select="$defname"/>
+ </xsl:if>
<xsl:variable name="mynsid" select="generate-id(ancestor::namespace)"/>
<xsl:variable name="resource">
<xsl:for-each select="rng:ref">
@@ -161,6 +174,9 @@ for a rng:define
<xsl:for-each select=".//rng:text">
<xsl:text>String</xsl:text>
</xsl:for-each>
+ <xsl:for-each select=".//rng:data[@type='base64Binary']">
+ <xsl:text>String</xsl:text>
+ </xsl:for-each>
</xsl:variable>
<xsl:variable name="refdefine1">
@@ -201,13 +217,6 @@ for a rng:define
</xsl:choose>
</xsl:for-each>
-
- <xsl:for-each select=".//rng:ref[not(ancestor::rng:element or ancestor::rng:attribute)]">
- <xsl:variable name="name" select="@name"/>
- <xsl:for-each select="ancestor::namespace/rng:grammar/rng:define[@name=$name]">
- <xsl:call-template name="factoryattributetoresourcemapinner"/>
- </xsl:for-each>
- </xsl:for-each>
</xsl:template>
<!-- factoryattributetoresourcemap -->
@@ -283,25 +292,6 @@ ListValueMapPointer </xsl:text>
<!-- factoryelementtoresorucemapinner -->
<xsl:template name="factorycreateelementmapinner">
- <xsl:for-each select=".//rng:element">
- <xsl:variable name="resource">
- <xsl:for-each select="rng:ref">
- <xsl:call-template name="contextresource"/>
- </xsl:for-each>
- </xsl:variable>
- <xsl:if test="string-length($resource) > 0">
- <xsl:text>
- (*pMap)[</xsl:text>
- <xsl:call-template name="fasttoken"/>
- <xsl:text>] = CreateElement(RT_</xsl:text>
- <xsl:value-of select="$resource"/>
- <xsl:text>, </xsl:text>
- <xsl:for-each select="rng:ref">
- <xsl:call-template name="idforref"/>
- </xsl:for-each>
- <xsl:text>);</xsl:text>
- </xsl:if>
- </xsl:for-each>
<xsl:for-each select=".//rng:ref[not(ancestor::rng:element or ancestor::rng:attribute)]">
<xsl:variable name="name" select="@name"/>
<xsl:variable name="block">
@@ -329,6 +319,25 @@ ListValueMapPointer </xsl:text>
<xsl:value-of select="$block1"/>
</xsl:if>
</xsl:for-each>
+ <xsl:for-each select=".//rng:element">
+ <xsl:variable name="resource">
+ <xsl:for-each select="rng:ref">
+ <xsl:call-template name="contextresource"/>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:if test="string-length($resource) > 0">
+ <xsl:text>
+ (*pMap)[</xsl:text>
+ <xsl:call-template name="fasttoken"/>
+ <xsl:text>] = CreateElement(RT_</xsl:text>
+ <xsl:value-of select="$resource"/>
+ <xsl:text>, </xsl:text>
+ <xsl:for-each select="rng:ref">
+ <xsl:call-template name="idforref"/>
+ </xsl:for-each>
+ <xsl:text>);</xsl:text>
+ </xsl:if>
+ </xsl:for-each>
</xsl:template>
<xsl:template name="factorycreateelementmapfromstart">
@@ -610,6 +619,25 @@ string </xsl:text>
<xsl:template name="factorytokentoidmapinner">
<xsl:variable name="name" select="@name"/>
+ <xsl:for-each select=".//rng:ref[not(ancestor::rng:element or ancestor::rng:attribute)]">
+ <xsl:variable name="refname" select="@name"/>
+ <xsl:variable name="refblock1">
+ <xsl:for-each
+ select="ancestor::rng:grammar/rng:define[@name=$refname]">
+ <xsl:call-template name="factorytokentoidmapinner"/>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="string-length($refblock1) = 0">
+ <xsl:for-each select="ancestor::model/namespace/rng:grammar/rng:define[@name=$refname]">
+ <xsl:call-template name="factorytokentoidmapinner"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$refblock1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
<xsl:variable name="body">
<xsl:for-each select="ancestor::namespace/resource[@name=$name]">
<xsl:for-each select="element[@tokenid]|attribute[@tokenid]">
@@ -630,25 +658,6 @@ string </xsl:text>
<xsl:value-of select="$name"/>
<xsl:value-of select="$body"/>
</xsl:if>
- <xsl:for-each select=".//rng:ref[not(ancestor::rng:element or ancestor::rng:attribute)]">
- <xsl:variable name="refname" select="@name"/>
- <xsl:variable name="refblock1">
- <xsl:for-each
- select="ancestor::rng:grammar/rng:define[@name=$refname]">
- <xsl:call-template name="factorytokentoidmapinner"/>
- </xsl:for-each>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="string-length($refblock1) = 0">
- <xsl:for-each select="ancestor::model/namespace/rng:grammar/rng:define[@name=$refname]">
- <xsl:call-template name="factorytokentoidmapinner"/>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$refblock1"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
</xsl:template>
<xsl:template name="factorytokentoidmap">
diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeProperties.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeProperties.xsl
deleted file mode 100644
index 9904907317cc..000000000000
--- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeProperties.xsl
+++ /dev/null
@@ -1,93 +0,0 @@
-<!--
-/*************************************************************************
- *
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- Copyright 2000, 2010 Oracle and/or its affiliates.
-
- OpenOffice.org - a multi-platform office productivity suite
-
- This file is part of OpenOffice.org.
-
- OpenOffice.org is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License version 3
- only, as published by the Free Software Foundation.
-
- OpenOffice.org is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License version 3 for more details
- (a copy is included in the LICENSE file that accompanied this code).
-
- You should have received a copy of the GNU Lesser General Public License
- version 3 along with OpenOffice.org. If not, see
- <http://www.openoffice.org/license.html>
- for a copy of the LGPLv3 License.
-
- ************************************************************************/
-
--->
-<xsl:stylesheet
- version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
- xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
- xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
- xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
- xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
- xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
- xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
- xmlns:math="http://www.w3.org/1998/Math/MathML"
- xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
- xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
- xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
- xmlns:ooo="http://openoffice.org/2004/office"
- xmlns:ooow="http://openoffice.org/2004/writer"
- xmlns:oooc="http://openoffice.org/2004/calc"
- xmlns:dom="http://www.w3.org/2001/xml-events"
- xmlns:xforms="http://www.w3.org/2002/xforms"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:rng="http://relaxng.org/ns/structure/1.0"
- xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
- xmlns:UML = 'org.omg.xmi.namespace.UML' xml:space="default">
- <xsl:output method="text" />
- <xsl:param name="prefix"/>
-
- <xsl:include href="resourcestools.xsl"/>
-
- <xsl:template match="/">
- <out xml:space="preserve">
- <xsl:call-template name="licenseheader"/>
- <xsl:text>
-#include &lt;iostream&gt;
-#include &lt;doctok/resourceids.hxx&gt;
-#include &lt;ooxml/resourceids.hxx&gt;
-#include "OOXMLfastresources.hxx"
-#include "OOXMLFastTokens.hxx"
-#include "OOXMLFastHelper.hxx"
-#include "OOXMLvalues.hxx"
-#include "Handler.hxx"
-
-/// @cond GENERATED
-
-namespace writerfilter {
-namespace ooxml {
-using namespace ::std;
-
- </xsl:text>
- <xsl:call-template name="fastcontextimpls"><xsl:with-param name="ns">dml-shapeProperties</xsl:with-param></xsl:call-template>
- <xsl:text>
-}}
-/// @endcond GENERATED
-&#xa;</xsl:text></out></xsl:template>
-
- <xsl:template match="*"/>
-</xsl:stylesheet>
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 15bb57e18087..b7046a495bd8 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -19,6 +19,7 @@
<token tokenid="ooxml:trackchange"/>
<token tokenid="ooxml:object"/>
<token tokenid="ooxml:tblStart"/>
+ <token tokenid="ooxml:ffdata"/>
<namespace name="dml-stylesheet" url="http://schemas.openxmlformats.org/drawingml/2006/main" file="dml-stylesheet.rng">
<start name="theme"/>
<start name="themeOverride"/>
@@ -14105,7 +14106,7 @@
<xs:documentation>Cryptographic Hashing Algorithm</xs:documentation>
</attribute>
<attribute name="cryptSpinCount">
- <text/>
+ <ref name="ST_DecimalNumber"/>
<xs:documentation>Iterations to Run Hashing Algorithm</xs:documentation>
</attribute>
<attribute name="cryptProvider">
@@ -15079,7 +15080,7 @@
</define>
<define name="CT_FFTextType">
<attribute name="val">
- <text/>
+ <ref name="ST_FFName"/>
<xs:documentation>Text Box Form Field Type Values</xs:documentation>
</attribute>
</define>
@@ -15206,7 +15207,7 @@
</define>
<define name="CT_FFHelpText">
<attribute name="type">
- <text/>
+ <ref name="ST_InfoTextType"/>
<xs:documentation>Help Text Type</xs:documentation>
</attribute>
<attribute name="val">
@@ -15216,7 +15217,7 @@
</define>
<define name="CT_FFStatusText">
<attribute name="type">
- <text/>
+ <ref name="ST_InfoTextType"/>
<xs:documentation>Status Text Type</xs:documentation>
</attribute>
<attribute name="val">
@@ -15750,15 +15751,15 @@
</define>
<define name="CT_DocGrid">
<attribute name="type">
- <text/>
+ <ref name="ST_DocGrid"/>
<xs:documentation>Document Grid Type</xs:documentation>
</attribute>
<attribute name="linePitch">
- <text/>
+ <ref name="ST_DecimalNumber"/>
<xs:documentation>Document Grid Line Pitch</xs:documentation>
</attribute>
<attribute name="charSpace">
- <text/>
+ <ref name="ST_DecimalNumber"/>
<xs:documentation>Document Grid Character Pitch</xs:documentation>
</attribute>
</define>
@@ -21754,11 +21755,11 @@
<attribute name="val" tokenid="ooxml:CT_Kinsoku_val"/>
</resource>
<resource name="ST_TextDirection" resource="List">
- <value tokenid="ooxml:Value_ST_TextDirection_lrTb">lrTb</value>
- <value tokenid="ooxml:Value_ST_TextDirection_tbRl">tbRl</value>
- <value tokenid="ooxml:Value_ST_TextDirection_btLr">btLr</value>
- <value tokenid="ooxml:Value_ST_TextDirection_lrTbV">lrTbV</value>
- <value tokenid="ooxml:Value_ST_TextDirection_tbRlV">tbRlV</value>
+ <value tokenid="0">lrTb</value>
+ <value tokenid="1">tbRl</value>
+ <value tokenid="3">btLr</value>
+ <value tokenid="4">lrTbV</value>
+ <value tokenid="5">tbRlV</value>
<value tokenid="ooxml:Value_ST_TextDirection_tbLrV">tbLrV</value>
</resource>
<resource name="CT_TextDirection" resource="Value">
@@ -21855,6 +21856,24 @@
<action name="start" action="clearProps"/>
<action name="end" action="mark" sendtokenid="ooxml:endtrackchange"/>
</resource>
+ <resource name="EG_RangeMarkupElements" resource="Properties">
+ <element name="bookmarkStart" tokenid="ooxml:EG_RangeMarkupElements_bookmarkStart"/>
+ <element name="bookmarkEnd" tokenid="ooxml:EG_RangeMarkupElements_bookmarkEnd"/>
+ <element name="moveFromRangeStart" tokenid="ooxml:EG_RangeMarkupElements_moveFromRangeStart"/>
+ <element name="moveFromRangeEnd" tokenid="ooxml:EG_RangeMarkupElements_moveFromRangeEnd"/>
+ <element name="moveToRangeStart" tokenid="ooxml:EG_RangeMarkupElements_moveToRangeStart"/>
+ <element name="moveToRangeEnd" tokenid="ooxml:EG_RangeMarkupElements_moveToRangeEnd"/>
+ <element name="commentRangeStart" tokenid="ooxml:EG_RangeMarkupElements_commentRangeStart"/>
+ <element name="commentRangeEnd" tokenid="ooxml:EG_RangeMarkupElements_commentRangeEnd"/>
+ <element name="customXmlInsRangeStart" tokenid="ooxml:EG_RangeMarkupElements_customXmlInsRangeStart"/>
+ <element name="customXmlInsRangeEnd" tokenid="ooxml:EG_RangeMarkupElements_customXmlInsRangeEnd"/>
+ <element name="customXmlDelRangeStart" tokenid="ooxml:EG_RangeMarkupElements_customXmlDelRangeStart"/>
+ <element name="customXmlDelRangeEnd" tokenid="ooxml:EG_RangeMarkupElements_customXmlDelRangeEnd"/>
+ <element name="customXmlMoveFromRangeStart" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveFromRangeStart"/>
+ <element name="customXmlMoveFromRangeEnd" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveFromRangeEnd"/>
+ <element name="customXmlMoveToRangeStart" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveToRangeStart"/>
+ <element name="customXmlMoveToRangeEnd" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveToRangeEnd"/>
+ </resource>
<resource name="CT_NumPr" resource="Properties">
<kind name="paragraph"/>
<element name="ilvl" tokenid="sprm:PIlvl"/>
@@ -22037,6 +22056,8 @@
<element name="checkBox" tokenid="ooxml:CT_FFData_checkBox"/>
<element name="ddList" tokenid="ooxml:CT_FFData_ddList"/>
<element name="textInput" tokenid="ooxml:CT_FFData_textInput"/>
+ <action name="end" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:ffdata"/>
+ <action name="end" action="clearProps"/>
</resource>
<resource name="CT_FFHelpText" resource="Properties">
<attribute name="type" tokenid="ooxml:CT_FFHelpText_type"/>
@@ -22046,6 +22067,23 @@
<attribute name="type" tokenid="ooxml:CT_FFStatusText_type"/>
<attribute name="val" tokenid="ooxml:CT_FFStatusText_val"/>
</resource>
+ <resource name="CT_FFCheckBox" resource="Properties">
+ <element name="size" tokenid="ooxml:CT_FFCheckBox_size"/>
+ <element name="sizeAuto" tokenid="ooxml:CT_FFCheckBox_sizeAuto"/>
+ <element name="default" tokenid="ooxml:CT_FFCheckBox_default"/>
+ <element name="checked" tokenid="ooxml:CT_FFCheckBox_checked"/>
+ </resource>
+ <resource name="CT_FFDDList" resource="Properties">
+ <element name="result" tokenid="ooxml:CT_FFDDList_result"/>
+ <element name="default" tokenid="ooxml:CT_FFDDList_default"/>
+ <element name="listEntry" tokenid="ooxml:CT_FFDDList_listEntry"/>
+ </resource>
+ <resource name="CT_FFTextInput" resource="Properties">
+ <element name="type" tokenid="ooxml:CT_FFTextInput_type"/>
+ <element name="default" tokenid="ooxml:CT_FFTextInput_default"/>
+ <element name="maxLength" tokenid="ooxml:CT_FFTextInput_maxLength"/>
+ <element name="format" tokenid="ooxml:CT_FFTextInput_format"/>
+ </resource>
<resource name="ST_SectionMark" resource="List">
<value tokenid="0">continuous</value>
<value tokenid="1">nextColumn</value>
@@ -22209,6 +22247,11 @@
<value name="linesAndChars" tokenid="ooxml:Value_wordprocessingml_ST_DocGrid_linesAndChars">linesAndChars</value>
<value name="snapToChars" tokenid="ooxml:Value_wordprocessingml_ST_DocGrid_snapToChars">snapToChars</value>
</resource>
+ <resource name="CT_DocGrid" resource="Properties">
+ <attribute name="type" tokenid="ooxml:CT_DocGrid_type"/>
+ <attribute name="linePitch" tokenid="ooxml:CT_DocGrid_linePitch"/>
+ <attribute name="charSpace" tokenid="ooxml:CT_DocGrid_charSpace"/>
+ </resource>
<resource name="ST_HdrFtr" resource="List">
<value tokenid="ooxml:Value_ST_HrdFtr_even">even</value>
<value tokenid="ooxml:Value_ST_HrdFtr_default">default</value>
@@ -22429,10 +22472,10 @@
<element name="u" tokenid="ooxml:EG_RPrBase_u"/>
<element name="effect" tokenid="sprm:CSfxText"/>
<element name="bdr" tokenid="ooxml:EG_RPrBase_bdr"/>
- <element name="shd" tokenid="ooxml:EG_RPrBase_shd"/>
+ <element name="shd" tokenid="sprm:CShd"/>
<element name="fitText" tokenid="ooxml:EG_RPrBase_fitText"/>
<element name="vertAlign" tokenid="ooxml:EG_RPrBase_vertAlign"/>
- <element name="rtl" tokenid="ooxml:EG_RPrBase_rtl"/>
+ <element name="rtl" tokenid="sprm:CFBiDi"/>
<element name="cs" tokenid="sprm:CComplexScript"/>
<element name="em" tokenid="sprm:CKcd"/>
<element name="lang" tokenid="ooxml:EG_RPrBase_lang"/>
diff --git a/writerfilter/source/ooxml/ooxmlLoggers.hxx b/writerfilter/source/ooxml/ooxmlLoggers.hxx
index b58a41bdabcd..54191244b968 100644
--- a/writerfilter/source/ooxml/ooxmlLoggers.hxx
+++ b/writerfilter/source/ooxml/ooxmlLoggers.hxx
@@ -28,6 +28,8 @@
#ifndef INCLUDED_OOXML_LOGGERS_HXX
#define INCLUDED_OOXML_LOGGERS_HXX
+#ifdef DEBUG
+
#include <resourcemodel/TagLogger.hxx>
namespace writerfilter {
@@ -35,4 +37,5 @@ namespace writerfilter {
extern TagLogger::Pointer_t debug_logger;
}
}
+#endif
#endif // INCLUDED_OOXML_LOGGERS_HXX
diff --git a/writerfilter/source/ooxml/status.sh b/writerfilter/source/ooxml/status.sh
index e06382b13aa1..c36ad0d65a37 100755
--- a/writerfilter/source/ooxml/status.sh
+++ b/writerfilter/source/ooxml/status.sh
@@ -8,15 +8,13 @@ echo "<stage1>"
xsltproc analyzemodel.xsl model.xml | tail -n +2
-mdfind -onlyin $SEARCHIN "case NS_" |
-xargs -J % grep -A 1 -n "case NS_" % |
-grep "cxx" |
+find $SEARCHIN -name "*.cxx" -exec grep -nH -A 1 "case NS_" {} \; |
grep -v "//.*case NS_" |
sed 's#'$SEARCHIN'##' |
sed 's#\(^[^:]*\):\([0-9]*\):#<qname file="\1" line="\2"#' |
sed 's#[/* ]*case \(NS_.*\):.*# qname="\1"/>#' |
sed 's#.*WRITERFILTERSTATUS: done: \([0-9]*\), planned: \([0-9.]*\), spent: \([0-9.]*\).*#<status done="\1" planned="\2" spent="\3"/>#' |
-grep -v "WRITERFILTERSTATUS:" |
+sed 's#.*WRITERFILTERSTATUS:.*#<status done="100"/>#' |
sed 's#^.*-[0-9][0-9]*-.*$#<nostatus/>#' |
grep -v "^--"
diff --git a/writerfilter/source/resourcemodel/Protocol.cxx b/writerfilter/source/resourcemodel/Protocol.cxx
index 7ae3c06f2675..51d12eb4f2d6 100644
--- a/writerfilter/source/resourcemodel/Protocol.cxx
+++ b/writerfilter/source/resourcemodel/Protocol.cxx
@@ -28,6 +28,7 @@
*
************************************************************************/
+#ifdef DEBUG
#include <stdio.h>
#include <rtl/ustrbuf.hxx>
#include <resourcemodel/Protocol.hxx>
@@ -214,3 +215,4 @@ void TableProtocol::entry(int pos,
}
}
+#endif // DEBUG
diff --git a/writerfilter/source/doctok/util.hxx b/writerfilter/source/resourcemodel/ResourceModelHelper.cxx
index df534b28a5bc..fee286fb4570 100644
--- a/writerfilter/source/doctok/util.hxx
+++ b/writerfilter/source/resourcemodel/ResourceModelHelper.cxx
@@ -25,33 +25,24 @@
*
************************************************************************/
-#ifndef INCLUDED_UTIL_HXX
-#define INCLUDED_UTIL_HXX
-
-#include <string>
-#include <iostream>
+#include "resourcemodel/ResourceModelHelper.hxx"
namespace writerfilter {
-namespace doctok {
-using namespace ::std;
-
-/**
- Assertion
+namespace resourcemodel {
- @bTest if false the assertion is raised
-*/
-void util_assert(bool bTest);
+void resolveSprmProps(Properties & rHandler, Sprm & rSprm)
+{
+ writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
+ if( pProperties.get())
+ pProperties->resolve(rHandler);
+}
-/**
- Print string to ostream.
+void resolveAttributeProperties(Properties & rHandler, Value & val)
+{
+ writerfilter::Reference<Properties>::Pointer_t pProperties = val.getProperties();
+ if( pProperties.get())
+ pProperties->resolve(rHandler);
+}
- Printable characters are passed without change. Non-printable
- characters are replaced by '.'.
- @param o ostream for output
- @param str string to print
- */
-void printBytes(ostream & o, const string & str);
}}
-
-#endif // INCLUDED_UTIL_HXX
diff --git a/writerfilter/source/resourcemodel/TagLogger.cxx b/writerfilter/source/resourcemodel/TagLogger.cxx
index 1d9b23623e56..f19bef7c01d1 100644
--- a/writerfilter/source/resourcemodel/TagLogger.cxx
+++ b/writerfilter/source/resourcemodel/TagLogger.cxx
@@ -25,6 +25,7 @@
*
************************************************************************/
+#ifdef DEBUG
#include <fstream>
#include <string.h>
#include <resourcemodel/TagLogger.hxx>
@@ -51,11 +52,65 @@ namespace writerfilter
void XMLTag::addAttr(string sName, sal_uInt32 nValue)
{
- char buffer[256];
+ static char buffer[256];
snprintf(buffer, sizeof(buffer), "%" SAL_PRIdINT32, nValue);
addAttr(sName, buffer);
}
+void XMLTag::addAttr(string sName, uno::Any aAny)
+{
+ string aTmpStrInt;
+ string aTmpStrFloat;
+ string aTmpStrString;
+
+ static char buffer[256];
+
+ try
+ {
+ sal_Int32 nInt = 0;
+ aAny >>= nInt;
+
+ snprintf(buffer, sizeof(buffer), "%" SAL_PRIdINT32,
+ nInt);
+
+ aTmpStrInt = buffer;
+ }
+ catch (uno::Exception aExcept)
+ {
+ aTmpStrInt = "exception";
+ }
+
+ try
+ {
+ float nFloat = 0.0;
+ aAny >>= nFloat;
+
+ snprintf(buffer, sizeof(buffer), "%f",
+ nFloat);
+
+ aTmpStrFloat = buffer;
+ }
+ catch (uno::Exception aExcept)
+ {
+ aTmpStrFloat = "exception";
+ }
+
+ try
+ {
+ ::rtl::OUString aStr;
+ aAny >>= aStr;
+
+ aTmpStrString = OUStringToOString(aStr, RTL_TEXTENCODING_ASCII_US).getStr();
+ }
+ catch (uno::Exception aExcept)
+ {
+ aTmpStrString = "exception";
+ }
+
+ addAttr(sName, "i:" + aTmpStrInt + " f:" + aTmpStrFloat + " s:" +
+ aTmpStrString);
+}
+
void XMLTag::addTag(XMLTag::Pointer_t pTag)
{
if (pTag != XMLTag::Pointer_t())
@@ -64,9 +119,14 @@ namespace writerfilter
void XMLTag::chars(const string & rChars)
{
- mChars = rChars;
+ mChars += rChars;
}
+void XMLTag::chars(const ::rtl::OUString & rChars)
+{
+ chars(OUStringToOString(rChars, RTL_TEXTENCODING_ASCII_US).getStr());
+}
+
const string & XMLTag::getTag() const
{
return mTag;
@@ -162,6 +222,7 @@ namespace writerfilter
static TagLoggerHashMap_t * tagLoggers = NULL;
TagLogger::TagLogger()
+ : mFileName("writerfilter")
{
}
@@ -169,6 +230,11 @@ namespace writerfilter
{
}
+ void TagLogger::setFileName(const string & rName)
+ {
+ mFileName = rName;
+ }
+
TagLogger::Pointer_t TagLogger::getInstance(const char * name)
{
if (tagLoggers == NULL)
@@ -233,6 +299,11 @@ namespace writerfilter
currentTag()->addAttr(name, value);
}
+void TagLogger::attribute(const string & name, const uno::Any aAny)
+{
+ currentTag()->addAttr(name, aAny);
+}
+
void TagLogger::addTag(XMLTag::Pointer_t pTag)
{
currentTag()->addTag(pTag);
@@ -287,7 +358,18 @@ namespace writerfilter
else
fileName += "/tmp";
- fileName += "/writerfilter.";
+ string sPrefix = aIt->second->mFileName;
+ size_t nLastSlash = sPrefix.find_last_of('/');
+ size_t nLastBackslash = sPrefix.find_last_of('\\');
+ size_t nCutPos = nLastSlash;
+ if (nLastBackslash < nCutPos)
+ nCutPos = nLastBackslash;
+ if (nCutPos < sPrefix.size())
+ sPrefix = sPrefix.substr(nCutPos + 1);
+
+ fileName += "/";
+ fileName += sPrefix;
+ fileName +=".";
fileName += name;
fileName += ".xml";
@@ -336,7 +418,7 @@ namespace writerfilter
static char sBuffer[256];
snprintf(sBuffer, sizeof(sBuffer),
- "0x%" SAL_PRIxUINT32 "x, %" SAL_PRIxUINT32 "d", rSprm.getId(),
+ "0x%" SAL_PRIxUINT32 ", %" SAL_PRIuUINT32, rSprm.getId(),
rSprm.getId());
pTag->addAttr("id", sBuffer);
pTag->addAttr("value", rSprm.getValue()->toString());
@@ -347,4 +429,39 @@ namespace writerfilter
}
+XMLTag::Pointer_t unoPropertySetToTag(uno::Reference<beans::XPropertySet> rPropSet)
+{
+ uno::Reference<beans::XPropertySetInfo> xPropSetInfo(rPropSet->getPropertySetInfo());
+ uno::Sequence<beans::Property> aProps(xPropSetInfo->getProperties());
+
+ XMLTag::Pointer_t pResult(new XMLTag("unoPropertySet"));
+
+ for (int i = 0; i < aProps.getLength(); ++i)
+ {
+ XMLTag::Pointer_t pPropTag(new XMLTag("property"));
+
+ ::rtl::OUString sName(aProps[i].Name);
+
+ pPropTag->addAttr("name", sName);
+ try
+ {
+ pPropTag->addAttr("value", rPropSet->getPropertyValue(sName));
+ }
+ catch (uno::Exception aException)
+ {
+ XMLTag::Pointer_t pException(new XMLTag("exception"));
+
+ pException->chars("getPropertyValue(\"");
+ pException->chars(sName);
+ pException->chars("\")");
+ pPropTag->addTag(pException);
+ }
+
+ pResult->addTag(pPropTag);
+ }
+
+ return pResult;
+}
+
}
+#endif // DEBUG
diff --git a/writerfilter/source/resourcemodel/makefile.mk b/writerfilter/source/resourcemodel/makefile.mk
index f3869f30611b..bb5bc05ac1bd 100644
--- a/writerfilter/source/resourcemodel/makefile.mk
+++ b/writerfilter/source/resourcemodel/makefile.mk
@@ -54,6 +54,7 @@ SLOFILES= \
$(SLO)$/resourcemodel.obj \
$(SLO)$/util.obj \
$(SLO)$/TagLogger.obj \
+ $(SLO)$/ResourceModelHelper.obj \
$(SLO)$/WW8Analyzer.obj \
$(SLO)$/Protocol.obj
diff --git a/writerfilter/source/resourcemodel/resourcemodel.cxx b/writerfilter/source/resourcemodel/resourcemodel.cxx
index 9b45834c5ce3..096792c76b8e 100644
--- a/writerfilter/source/resourcemodel/resourcemodel.cxx
+++ b/writerfilter/source/resourcemodel/resourcemodel.cxx
@@ -481,12 +481,6 @@ void WW8PropertiesHandler::attribute(Id name, Value & val)
output.addItem("</attribute>");
}
-bool WW8PropertiesHandler::compare(SprmSharedPointer_t sprm1,
- SprmSharedPointer_t sprm2)
-{
- return sprm1->getId() < sprm2->getId();
-}
-
void WW8PropertiesHandler::sprm(Sprm & sprm_)
{
string tmpStr = "<sprm id=\"";
diff --git a/writerfilter/source/resourcemodel/resourcemodel.hxx b/writerfilter/source/resourcemodel/resourcemodel.hxx
index b316f4c912f9..9f59e68b9e1f 100644
--- a/writerfilter/source/resourcemodel/resourcemodel.hxx
+++ b/writerfilter/source/resourcemodel/resourcemodel.hxx
@@ -76,8 +76,6 @@ public:
void dumpSprm(SprmSharedPointer_t sprm);
void dumpSprms();
-
- static bool compare(SprmSharedPointer_t sprm1, SprmSharedPointer_t sprm2);
};
class WW8BinaryObjHandler : public BinaryObj
diff --git a/writerfilter/source/resourcemodel/util.cxx b/writerfilter/source/resourcemodel/util.cxx
index 47d325654d5b..3d041d18c126 100644
--- a/writerfilter/source/resourcemodel/util.cxx
+++ b/writerfilter/source/resourcemodel/util.cxx
@@ -64,6 +64,37 @@ void logger(string prefix, string message)
logger_stream().flush();
}
+ string xmlify(const string & str)
+ {
+ string result = "";
+ char sBuffer[16];
+
+ for (string::const_iterator aIt = str.begin(); aIt != str.end(); ++aIt)
+ {
+ char c = *aIt;
+
+ if (isprint(c) && c != '\"')
+ {
+ if (c == '<')
+ result += "&lt;";
+ else if (c == '>')
+ result += "&gt;";
+ else if (c == '&')
+ result += "&amp;";
+ else
+ result += c;
+ }
+ else
+ {
+ snprintf(sBuffer, sizeof(sBuffer), "\\%03d", c);
+ result += sBuffer;
+ }
+ }
+
+ return result;
+ }
+
+#ifdef DEBUG
string propertysetToString(uno::Reference<beans::XPropertySet> const & xPropSet)
{
string sResult;
@@ -368,57 +399,29 @@ string propertysetToString(uno::Reference<beans::XPropertySet> const & xPropSet)
return sResult;
}
- string xmlify(const string & str)
- {
- string result = "";
- char sBuffer[16];
-
- for (string::const_iterator aIt = str.begin(); aIt != str.end(); ++aIt)
- {
- char c = *aIt;
-
- if (isprint(c) && c != '\"')
- {
- if (c == '<')
- result += "&lt;";
- else if (c == '>')
- result += "&gt;";
- else if (c == '&')
- result += "&amp;";
- else
- result += c;
- }
- else
- {
- snprintf(sBuffer, sizeof(sBuffer), "\\%03d", c);
- result += sBuffer;
- }
- }
- return result;
- }
+string toString(uno::Reference< text::XTextRange > textRange)
+{
+ string result;
- string toString(uno::Reference< text::XTextRange > textRange)
+ if (textRange.get())
{
- string result;
-
- if (textRange.get())
- {
- rtl::OUString aOUStr = textRange->getString();
- rtl::OString aOStr(aOUStr.getStr(), aOUStr.getLength(), RTL_TEXTENCODING_ASCII_US );
-
- result = aOStr.getStr();
- }
- else
- {
- result="(nil)";
- }
+ rtl::OUString aOUStr = textRange->getString();
+ rtl::OString aOStr(aOUStr.getStr(), aOUStr.getLength(), RTL_TEXTENCODING_ASCII_US );
- return result;
+ result = aOStr.getStr();
}
-
- string toString(const string & rString)
+ else
{
- return rString;
+ result="(nil)";
}
+
+ return result;
+}
+
+string toString(const string & rString)
+{
+ return rString;
+}
+#endif
}
diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx
index d892c10f4f5d..f4843d54ace1 100644
--- a/xmloff/inc/xmloff/xmltoken.hxx
+++ b/xmloff/inc/xmloff/xmltoken.hxx
@@ -3107,6 +3107,9 @@ namespace xmloff { namespace token {
XML_N_CHART_EXT,
XML_COORDINATE_REGION,
+ XML_DIAGONAL_BL_TR_WIDTHS,
+ XML_DIAGONAL_TL_BR_WIDTHS,
+
XML_TOKEN_END
};
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 2e92c4a6a97d..a3d4a0c48d02 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -3107,6 +3107,9 @@ namespace xmloff { namespace token {
TOKEN( "http://openoffice.org/2010/chart", XML_N_CHART_EXT ),
TOKEN( "coordinate-region", XML_COORDINATE_REGION ),
+ TOKEN( "diagonal-bl-tr-widths", XML_DIAGONAL_BL_TR_WIDTHS ),
+ TOKEN( "diagonal-tl-br-widths", XML_DIAGONAL_TL_BR_WIDTHS ),
+
#if OSL_DEBUG_LEVEL > 0
{ 0, NULL, NULL, XML_TOKEN_END }
#else