summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--avmedia/prj/build.lst2
-rw-r--r--basic/inc/basic/sbstar.hxx2
-rwxr-xr-xbasic/inc/basic/vbahelper.hxx86
-rw-r--r--basic/prj/build.lst2
-rw-r--r--basic/source/app/app.cxx9
-rw-r--r--basic/source/app/app.hxx1
-rw-r--r--basic/source/app/appwin.cxx8
-rw-r--r--basic/source/basmgr/basmgr.cxx2
-rw-r--r--basic/source/basmgr/makefile.mk3
-rwxr-xr-xbasic/source/basmgr/vbahelper.cxx212
-rw-r--r--basic/source/classes/sb.cxx193
-rw-r--r--[-rwxr-xr-x]basic/source/classes/sbxmod.cxx108
-rw-r--r--basic/source/comp/scanner.cxx20
-rw-r--r--basic/source/inc/sbdiagnose.hxx34
-rw-r--r--basic/source/runtime/dllmgr.cxx17
-rw-r--r--basic/source/runtime/makefile.mk3
-rw-r--r--basic/source/runtime/rtlproto.hxx1
-rw-r--r--basic/source/runtime/sbdiagnose.cxx134
-rw-r--r--basic/source/runtime/stdobj.cxx2
-rwxr-xr-xbasic/source/runtime/step2.cxx2
-rw-r--r--configmgr/source/access.cxx100
-rw-r--r--configmgr/source/xcuparser.cxx26
-rw-r--r--connectivity/inc/connectivity/predicateinput.hxx8
-rw-r--r--connectivity/inc/connectivity/sqlnode.hxx2
-rw-r--r--connectivity/prj/build.lst2
-rw-r--r--connectivity/qa/connectivity/tools/CRMDatabase.java5
-rw-r--r--connectivity/source/commontools/FValue.cxx49
-rw-r--r--connectivity/source/commontools/predicateinput.cxx136
-rw-r--r--connectivity/source/drivers/ado/AColumn.cxx5
-rw-r--r--connectivity/source/drivers/ado/AConnection.cxx5
-rw-r--r--connectivity/source/drivers/file/fcomp.cxx4
-rwxr-xr-xconnectivity/source/drivers/macab/MacabRecord.cxx2
-rw-r--r--connectivity/source/parse/PColumn.cxx16
-rw-r--r--connectivity/source/parse/sqlbison.y474
-rw-r--r--connectivity/source/parse/sqlflex.l27
-rw-r--r--connectivity/source/parse/sqliterator.cxx34
-rw-r--r--connectivity/source/parse/sqlnode.cxx2
-rw-r--r--desktop/os2/source/applauncher/makefile.mk6
-rw-r--r--desktop/os2/source/applauncher/os2quickstart.cxx (renamed from desktop/os2/source/applauncher/quickstart.cxx)0
-rw-r--r--desktop/prj/build.lst7
-rw-r--r--desktop/prj/d.lst7
-rw-r--r--desktop/source/app/app.cxx16
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/dp_manager.cxx22
-rw-r--r--desktop/source/deployment/registry/component/dp_component.cxx26
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/registry/dp_backend.cxx59
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/dp_backenddb.cxx5
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/migration.cxx0
-rw-r--r--desktop/util/ooverinfo.rc2
-rwxr-xr-xdesktop/util/ooverinfo2.rc2
-rw-r--r--[-rwxr-xr-x]desktop/util/verinfo.rc4
-rw-r--r--desktop/win32/source/QuickStart/OOQuickStart.rc (renamed from sysui/source/win32/QuickStart/OOQuickStart.rc)8
-rw-r--r--desktop/win32/source/QuickStart/QuickStart.cpp (renamed from sysui/source/win32/QuickStart/QuickStart.cpp)0
-rw-r--r--desktop/win32/source/QuickStart/QuickStart.h (renamed from sysui/source/win32/QuickStart/QuickStart.h)0
-rw-r--r--desktop/win32/source/QuickStart/StdAfx.h (renamed from sysui/source/win32/QuickStart/StdAfx.h)0
-rw-r--r--desktop/win32/source/QuickStart/makefile.mk (renamed from sysui/source/win32/QuickStart/makefile.mk)0
-rw-r--r--desktop/win32/source/QuickStart/resource.h (renamed from sysui/source/win32/QuickStart/resource.h)0
-rw-r--r--desktop/win32/source/QuickStart/so/QuickStart.rc (renamed from sysui/source/win32/QuickStart/so/QuickStart.rc)8
-rw-r--r--desktop/win32/source/QuickStart/so/makefile.mk (renamed from sysui/source/win32/QuickStart/so/makefile.mk)4
-rw-r--r--desktop/win32/source/applauncher/makefile.mk4
-rw-r--r--desktop/win32/source/guiloader/makefile.mk4
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx2
-rw-r--r--drawinglayer/source/attribute/fontattribute.cxx20
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx2
-rw-r--r--drawinglayer/source/processor2d/canvasprocessor.cxx5
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx2
-rw-r--r--editeng/inc/editeng/editrids.hrc39
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/fontitem.hxx21
-rw-r--r--[-rwxr-xr-x]editeng/inc/editeng/splwrap.hxx0
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/svxacorr.hxx1
-rw-r--r--editeng/prj/build.lst2
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editobj.cxx4
-rw-r--r--editeng/source/editeng/edtspell.cxx7
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/edtspell.hxx1
-rwxr-xr-xediteng/source/editeng/impedit2.cxx22
-rwxr-xr-xediteng/source/editeng/impedit4.cxx10
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/textconv.cxx10
-rw-r--r--editeng/source/items/numitem.cxx2
-rw-r--r--editeng/source/items/page.src148
-rw-r--r--editeng/source/items/paperinf.cxx46
-rwxr-xr-x[-rw-r--r--]editeng/source/items/textitem.cxx20
-rwxr-xr-x[-rw-r--r--]editeng/source/misc/svxacorr.cxx51
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/unofdesc.cxx10
-rw-r--r--formula/inc/formula/compiler.hrc126
-rw-r--r--formula/inc/formula/opcode.hxx4
-rw-r--r--formula/source/core/resource/core_resource.src24
-rw-r--r--formula/source/ui/dlg/formula.cxx5
-rw-r--r--formula/source/ui/dlg/parawin.cxx24
-rw-r--r--formula/source/ui/dlg/parawin.hxx26
-rw-r--r--fpicker/prj/build.lst2
-rw-r--r--fpicker/source/office/iodlg.cxx1
-rw-r--r--fpicker/source/office/iodlg.hrc1
-rw-r--r--fpicker/source/office/iodlg.src4
-rw-r--r--framework/inc/services/substitutepathvars.hxx205
-rw-r--r--framework/prj/build.lst2
-rwxr-xr-xframework/qa/complex/path_substitution/PathSubstitutionTest.java24
-rw-r--r--framework/qa/unoapi/makefile.mk48
-rw-r--r--framework/source/classes/fwktabwindow.cxx3
-rwxr-xr-x[-rw-r--r--]framework/source/services/backingwindow.cxx57
-rwxr-xr-x[-rw-r--r--]framework/source/services/substitutepathvars.cxx335
-rw-r--r--framework/util/fwk.component3
-rw-r--r--framework/util/fwl.component3
-rw-r--r--officecfg/prj/build.lst2
-rwxr-xr-xofficecfg/registry/data/org/openoffice/Office/Canvas.xcu2
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu12
-rw-r--r--officecfg/registry/data/org/openoffice/Setup.xcu2
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Calc.xcs2
-rw-r--r--officecfg/util/makefile.mk1
-rw-r--r--readlicense_oo/prj/build.lst2
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/SwingInvocation.java44
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java44
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java77
-rw-r--r--sfx2/inc/sfx2/dinfdlg.hxx2
-rw-r--r--sfx2/inc/sfx2/mgetempl.hxx2
-rw-r--r--sfx2/inc/sfx2/module.hxx12
-rwxr-xr-xsfx2/inc/sfx2/sfx.hrc3
-rw-r--r--sfx2/prj/build.lst2
-rw-r--r--sfx2/qa/cppunit/makefile.mk86
-rw-r--r--sfx2/qa/unoapi/makefile.mk48
-rw-r--r--sfx2/source/appl/module.cxx34
-rw-r--r--sfx2/source/appl/sfx.src5
-rw-r--r--sfx2/source/config/evntconf.cxx2
-rw-r--r--sfx2/source/control/unoctitm.cxx2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx15
-rw-r--r--sfx2/source/dialog/dinfdlg.hrc4
-rw-r--r--sfx2/source/dialog/dinfdlg.src4
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx2
-rw-r--r--sfx2/source/dialog/mgetempl.cxx2
-rw-r--r--sfx2/source/dialog/newstyle.cxx1
-rw-r--r--sfx2/source/dialog/passwd.cxx1
-rw-r--r--sfx2/source/dialog/passwd.hrc3
-rw-r--r--sfx2/source/dialog/passwd.src37
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/securitypage.src0
-rw-r--r--sfx2/source/dialog/tabdlg.cxx5
-rw-r--r--sfx2/source/dialog/templdlg.cxx2
-rw-r--r--sfx2/source/dialog/templdlg.hrc3
-rw-r--r--sfx2/source/dialog/templdlg.src4
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx46
-rw-r--r--sfx2/source/doc/objxtor.cxx5
-rw-r--r--[-rwxr-xr-x]sfx2/source/doc/syspath.cxx0
-rwxr-xr-x[-rw-r--r--]sfx2/source/inc/helpid.hrc0
-rwxr-xr-x[-rw-r--r--]sfx2/source/view/viewprn.cxx83
-rwxr-xr-xshell/prj/build.lst2
-rw-r--r--svx/inc/float3d.hrc4
-rw-r--r--svx/inc/svx/bmpmask.hxx7
-rw-r--r--svx/inc/svx/chrtitem.hxx34
-rwxr-xr-xsvx/inc/svx/dialogs.hrc16
-rw-r--r--svx/inc/svx/float3d.hxx26
-rw-r--r--svx/inc/svx/fontworkgallery.hxx2
-rw-r--r--svx/inc/svx/hdft.hxx2
-rw-r--r--svx/inc/svx/svdstr.hrc8
-rw-r--r--svx/prj/build.lst2
-rw-r--r--svx/source/dialog/_bmpmask.cxx43
-rw-r--r--svx/source/dialog/bmpmask.hrc6
-rw-r--r--svx/source/dialog/bmpmask.src55
-rw-r--r--svx/source/dialog/ctredlin.cxx18
-rw-r--r--svx/source/dialog/ctredlin.hrc9
-rw-r--r--svx/source/dialog/ctredlin.src36
-rw-r--r--svx/source/dialog/dlgctl3d.cxx2
-rw-r--r--svx/source/dialog/dlgctrl.src7
-rw-r--r--svx/source/dialog/hdft.cxx16
-rw-r--r--svx/source/dialog/optgrid.cxx11
-rw-r--r--svx/source/dialog/rubydialog.cxx8
-rw-r--r--svx/source/dialog/sdstring.src121
-rw-r--r--svx/source/dialog/srchdlg.cxx8
-rw-r--r--svx/source/dialog/svxruler.cxx2
-rw-r--r--svx/source/engine3d/float3d.cxx110
-rw-r--r--svx/source/engine3d/float3d.src55
-rw-r--r--svx/source/fmcomp/fmgridif.cxx3
-rw-r--r--svx/source/fmcomp/gridctrl.cxx12
-rw-r--r--svx/source/form/fmobj.cxx4
-rw-r--r--svx/source/form/fmpage.cxx5
-rw-r--r--svx/source/form/fmpgeimp.cxx76
-rw-r--r--svx/source/form/fmshell.cxx6
-rw-r--r--svx/source/form/fmundo.cxx78
-rw-r--r--svx/source/form/formcontroller.cxx7
-rw-r--r--svx/source/gallery2/galbrws1.cxx3
-rw-r--r--svx/source/gallery2/galbrws2.cxx24
-rw-r--r--svx/source/gallery2/gallery.src82
-rw-r--r--svx/source/inc/fmpgeimp.hxx4
-rw-r--r--svx/source/items/chrtitem.cxx34
-rwxr-xr-x[-rw-r--r--]svx/source/mnuctrls/fntctl.cxx2
-rwxr-xr-x[-rw-r--r--]svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx0
-rwxr-xr-xsvx/source/sdr/contact/viewobjectcontactofunocontrol.cxx3
-rw-r--r--svx/source/stbctrls/pszctrl.cxx2
-rwxr-xr-x[-rw-r--r--]svx/source/svdraw/svdibrow.cxx6
-rwxr-xr-x[-rw-r--r--]svx/source/svdraw/svdmodel.cxx40
-rw-r--r--svx/source/svdraw/svdouno.cxx71
-rw-r--r--svx/source/svdraw/svdstr.src82
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx2
-rw-r--r--svx/source/tbxctrls/colrctrl.src33
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx2
-rw-r--r--svx/source/tbxctrls/itemwin.cxx4
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx8
-rw-r--r--svx/source/tbxctrls/tbcontrl.src6
-rw-r--r--sysui/desktop/icons/makefile.mk63
-rw-r--r--sysui/desktop/icons/so7-base-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so7-calc-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so7-calc-tem.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so7-chart-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so7-draw-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so7-draw-tem.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so7-impress-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so7-impress-tem.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so7-master-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so7-math-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so7-writer-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so7-writer-tem.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-base-app.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-base-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-calc-app.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-calc-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-calc-tem.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-chart-doc.icobin10134 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-configuration.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-draw-app.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-draw-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-draw-tem.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-empty-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-empty-tem.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-image-doc.icobin10134 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-impress-app.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-impress-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-impress-tem.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-macro-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-main-app.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-master-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-math-app.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-math-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-open.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-printer.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-web-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-writer-app.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-writer-doc.icobin25214 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so8-writer-tem.icobin25214 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_base_app.icobin295606 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so9_base_doc.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_calc_app.icobin295606 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so9_calc_doc.icobin295606 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so9_calc_tem.icobin295606 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so9_chart_doc.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_draw_app.icobin295606 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so9_draw_doc.icobin295606 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so9_draw_tem.icobin295606 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so9_empty_doc.icobin295606 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so9_empty_tem.icobin295606 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so9_global_doc.icobin295606 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so9_html_doc.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_impress_app.icobin295606 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so9_impress_doc.icobin295606 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so9_impress_tem.icobin295606 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so9_macro_doc.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_main_app.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_math_app.icobin295606 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so9_math_doc.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_open.icobin295606 -> 0 bytes
-rwxr-xr-xsysui/desktop/icons/so9_writer_app.icobin295606 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so9_writer_doc.icobin295606 -> 0 bytes
-rw-r--r--sysui/desktop/icons/so9_writer_tem.icobin295606 -> 0 bytes
-rw-r--r--sysui/prj/build.lst8
-rw-r--r--sysui/prj/d.lst4
-rw-r--r--[-rwxr-xr-x]ucb/source/core/cmdenv.cxx0
-rw-r--r--ucb/source/ucp/tdoc/tdoc_docmgr.cxx125
-rw-r--r--ucb/source/ucp/tdoc/tdoc_docmgr.hxx34
-rw-r--r--uui/prj/build.lst2
-rwxr-xr-x[-rw-r--r--]uui/source/ids.hrc0
-rwxr-xr-x[-rw-r--r--]uui/source/logindlg.src0
-rwxr-xr-x[-rw-r--r--]uui/source/masterpasscrtdlg.cxx0
-rwxr-xr-x[-rw-r--r--]uui/source/passworddlg.hrc0
-rwxr-xr-x[-rw-r--r--]uui/source/passworderrs.src0
-rw-r--r--vbahelper/source/vbahelper/vbaapplicationbase.cxx13
-rw-r--r--vbahelper/source/vbahelper/vbadocumentbase.cxx13
-rw-r--r--vbahelper/source/vbahelper/vbadocumentsbase.cxx61
-rw-r--r--xmlhelp/source/com/sun/star/help/HelpIndexer.java8
-rwxr-xr-x[-rw-r--r--]xmlhelp/source/cxxhelp/provider/databases.cxx52
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.hxx2
-rwxr-xr-x[-rw-r--r--]xmlhelp/source/cxxhelp/provider/db.cxx45
-rwxr-xr-x[-rw-r--r--]xmlhelp/source/cxxhelp/provider/db.hxx21
-rw-r--r--xmloff/Library_xo.mk2
-rw-r--r--xmloff/inc/SchXMLImport.hxx8
-rw-r--r--xmloff/inc/xmloff/PageMasterStyleMap.hxx17
-rw-r--r--xmloff/inc/xmloff/SchXMLImportHelper.hxx2
-rw-r--r--xmloff/inc/xmloff/txtprmap.hxx8
-rw-r--r--xmloff/inc/xmloff/xmlmetai.hxx10
-rw-r--r--xmloff/inc/xmloff/xmltoken.hxx8
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx128
-rw-r--r--xmloff/source/chart/SchXMLChartContext.hxx15
-rwxr-xr-xxmloff/source/chart/SchXMLEnumConverter.cxx104
-rwxr-xr-xxmloff/source/chart/SchXMLEnumConverter.hxx39
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx230
-rw-r--r--xmloff/source/chart/SchXMLImport.cxx22
-rwxr-xr-xxmloff/source/chart/SchXMLLegendContext.cxx229
-rwxr-xr-xxmloff/source/chart/SchXMLLegendContext.hxx46
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx9
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx2
-rw-r--r--xmloff/source/chart/makefile.mk2
-rw-r--r--xmloff/source/core/xmlexp.cxx9
-rw-r--r--xmloff/source/core/xmltoken.cxx8
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx21
-rw-r--r--xmloff/source/draw/shapeexport.cxx2
-rwxr-xr-x[-rw-r--r--]xmloff/source/forms/handler/property_handler_base.cxx0
-rwxr-xr-x[-rw-r--r--]xmloff/source/forms/handler/vcl_date_handler.cxx0
-rwxr-xr-x[-rw-r--r--]xmloff/source/forms/handler/vcl_date_handler.hxx0
-rwxr-xr-x[-rw-r--r--]xmloff/source/forms/handler/vcl_time_handler.cxx0
-rwxr-xr-x[-rw-r--r--]xmloff/source/forms/handler/vcl_time_handler.hxx0
-rwxr-xr-x[-rw-r--r--]xmloff/source/forms/property_group.hxx0
-rwxr-xr-x[-rw-r--r--]xmloff/source/forms/property_meta_data.hxx0
-rw-r--r--xmloff/source/meta/xmlmetai.cxx113
-rw-r--r--xmloff/source/style/PageMasterExportPropMapper.cxx46
-rw-r--r--xmloff/source/style/PageMasterImportPropMapper.cxx79
-rw-r--r--xmloff/source/style/PageMasterStyleMap.cxx28
-rw-r--r--xmloff/source/style/xmlnume.cxx24
-rw-r--r--xmloff/source/style/xmlnumi.cxx16
-rw-r--r--xmloff/source/text/XMLAutoTextEventExport.cxx3
-rw-r--r--xmloff/source/text/txtexppr.cxx123
-rw-r--r--xmloff/source/text/txtimppr.cxx78
-rw-r--r--xmloff/source/text/txtprhdl.cxx3
-rw-r--r--xmloff/source/text/txtprmap.cxx27
-rw-r--r--xmloff/source/transform/PropertyActionsOOo.cxx2
319 files changed, 4571 insertions, 2401 deletions
diff --git a/avmedia/prj/build.lst b/avmedia/prj/build.lst
index 2348b606dcab..7d9343b916fd 100644
--- a/avmedia/prj/build.lst
+++ b/avmedia/prj/build.lst
@@ -1,4 +1,4 @@
-av avmedia : l10n tools sfx2 LIBXSLT:libxslt NULL
+av avmedia : L10N:l10n tools sfx2 LIBXSLT:libxslt NULL
av avmedia usr1 - all av_mkout NULL
av avmedia\prj get - all av_prj NULL
av avmedia\inc get - all av_inv NULL
diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx
index 9eeee5f71d7c..5b00fe68a421 100644
--- a/basic/inc/basic/sbstar.hxx
+++ b/basic/inc/basic/sbstar.hxx
@@ -48,6 +48,7 @@ class BasicLibInfo; // info block for basic manager
class SbTextPortions;
class SbMethod;
class BasicManager;
+class DocBasicItem;
class StarBASICImpl;
@@ -57,6 +58,7 @@ class StarBASIC : public SbxObject
friend class SbiExpression; // Access to RTL
friend class SbiInstance;
friend class SbiRuntime;
+ friend class DocBasicItem;
StarBASICImpl* mpStarBASICImpl;
diff --git a/basic/inc/basic/vbahelper.hxx b/basic/inc/basic/vbahelper.hxx
new file mode 100755
index 000000000000..0d99387965fe
--- /dev/null
+++ b/basic/inc/basic/vbahelper.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef BASIC_VBAHELPR_HXX
+#define BASIC_VBAHELPR_HXX
+
+#include <com/sun/star/frame/XModel.hpp>
+
+namespace basic {
+namespace vba {
+
+/* This header contains public helper functions for VBA used from this module
+ and from other VBA implementation modules such as vbahelper.
+ */
+
+// ============================================================================
+
+/** Locks or unlocks the controllers of all documents that have the same type
+ as the specified document.
+
+ First, the global module manager (com.sun.star.frame.ModuleManager) is
+ asked for the type of the passed model, and all open documents with the
+ same type will be locked or unlocked.
+
+ @param rxModel
+ A document model determining the type of the documents to be locked or
+ unlocked.
+
+ @param bLockControllers
+ Passing true will lock all controllers, passing false will unlock them.
+ */
+void lockControllersOfAllDocuments(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel,
+ sal_Bool bLockControllers );
+
+// ============================================================================
+
+/** Enables or disables the container windows of all controllers of all
+ documents that have the same type as the specified document.
+
+ First, the global module manager (com.sun.star.frame.ModuleManager) is
+ asked for the type of the passed model, and the container windows of all
+ open documents with the same type will be enabled or disabled.
+
+ @param rxModel
+ A document model determining the type of the documents to be enabled or
+ disabled.
+
+ @param bEnableWindows
+ Passing true will enable all container windows of all controllers,
+ passing false will disable them.
+ */
+void enableContainerWindowsOfAllDocuments(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel,
+ sal_Bool bEnableWindows );
+
+// ============================================================================
+
+} // namespace vba
+} // namespace basic
+
+#endif
diff --git a/basic/prj/build.lst b/basic/prj/build.lst
index 8eab007313ec..17a34fa5bd9f 100644
--- a/basic/prj/build.lst
+++ b/basic/prj/build.lst
@@ -1,4 +1,4 @@
-sb basic : l10n offuh oovbaapi svtools xmlscript framework salhelper LIBXSLT:libxslt NULL
+sb basic : L10N:l10n offuh oovbaapi svtools xmlscript framework salhelper LIBXSLT:libxslt NULL
sb basic usr1 - all sb_mkout NULL
sb basic\inc nmake - all sb_inc NULL
sb basic\source\app nmake - all sb_app sb_class sb_inc NULL
diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx
index cd3e1dd0061f..34f9e5096fb1 100644
--- a/basic/source/app/app.cxx
+++ b/basic/source/app/app.cxx
@@ -857,6 +857,15 @@ void BasicFrame::Resize()
}
}
+Rectangle BasicFrame::GetInnerRect() const
+{
+ Rectangle aRect( Point(0,0), GetOutputSizePixel() );
+ aRect.Bottom() = pStatus->GetPosPixel().Y()-1;
+ if( aRect.Bottom() < 0 ) // sanity check
+ aRect.Bottom() = 0;
+ return aRect;
+}
+
void BasicFrame::Move()
{
Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
diff --git a/basic/source/app/app.hxx b/basic/source/app/app.hxx
index 5a501ec5efcf..47dd5056fb58 100644
--- a/basic/source/app/app.hxx
+++ b/basic/source/app/app.hxx
@@ -188,6 +188,7 @@ public:
void SetAppMode( const String &aNewMode ){ aAppMode = aNewMode; UpdateTitle(); }
String GenRealString( const String &aResString );
+ Rectangle GetInnerRect() const;
};
diff --git a/basic/source/app/appwin.cxx b/basic/source/app/appwin.cxx
index 4d0a5f95fca4..eb80a96f4183 100644
--- a/basic/source/app/appwin.cxx
+++ b/basic/source/app/appwin.cxx
@@ -121,14 +121,8 @@ void AppWin::Maximize()
pFrame->nMaximizedWindows++;
nWinState = TT_WIN_STATE_MAX;
}
- sal_Int32 nTitleHeight;
- {
- sal_Int32 nDummy1, nDummy2, nDummy3;
- pFrame->GetBorder( nDummy1, nTitleHeight, nDummy2, nDummy3 );
- }
- Size aSize = pFrame->GetOutputSizePixel();
- aSize.Height() -= nTitleHeight;
+ Size aSize = pFrame->GetInnerRect().GetSize();
aSize.Height() -= 2;
aSize.Width() -= 2;
SetSizePixel( aSize );
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index bb686c765f4c..a6a1fb5f23c0 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1975,7 +1975,7 @@ ErrCode BasicManager::ExecuteMacro( String const& i_fullyQualifiedName, String c
sCall += ']';
SbxVariable* pRet = pMethod->GetParent()->Execute( sCall );
- if ( pRet )
+ if ( pRet && ( pRet != pMethod ) )
*i_retValue = *pRet;
return SbxBase::GetError();
}
diff --git a/basic/source/basmgr/makefile.mk b/basic/source/basmgr/makefile.mk
index e08e9cc753bd..615a8e8465ef 100644
--- a/basic/source/basmgr/makefile.mk
+++ b/basic/source/basmgr/makefile.mk
@@ -39,7 +39,8 @@ ENABLE_EXCEPTIONS=TRUE
SLOFILES= \
$(SLO)$/basmgr.obj \
- $(SLO)$/basicmanagerrepository.obj
+ $(SLO)$/basicmanagerrepository.obj\
+ $(SLO)$/vbahelper.obj
# --- Targets -------------------------------------------------------------
diff --git a/basic/source/basmgr/vbahelper.cxx b/basic/source/basmgr/vbahelper.cxx
new file mode 100755
index 000000000000..a09446f2e40b
--- /dev/null
+++ b/basic/source/basmgr/vbahelper.cxx
@@ -0,0 +1,212 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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_basic.hxx"
+
+#include "basic/vbahelper.hxx"
+#include <com/sun/star/container/XEnumeration.hpp>
+#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/frame/XModel2.hpp>
+#include <com/sun/star/frame/XModuleManager.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <comphelper/processfactory.hxx>
+
+namespace basic {
+namespace vba {
+
+using namespace ::com::sun::star;
+
+// ============================================================================
+
+namespace {
+
+/** Creates the global module manager needed to identify the type of documents.
+ */
+uno::Reference< frame::XModuleManager > lclCreateModuleManager()
+{
+ uno::Reference< frame::XModuleManager > xModuleManager;
+ try
+ {
+ uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), uno::UNO_SET_THROW );
+ xModuleManager.set( xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager" ) ) ), uno::UNO_QUERY );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ OSL_ENSURE( xModuleManager.is(), "::basic::vba::lclCreateModuleManager - cannot create module manager" );
+ return xModuleManager;
+}
+
+// ----------------------------------------------------------------------------
+
+/** Returns the document service name of the specified document.
+ */
+::rtl::OUString lclIdentifyDocument( const uno::Reference< frame::XModuleManager >& rxModuleManager, const uno::Reference< frame::XModel >& rxModel )
+{
+ ::rtl::OUString aServiceName;
+ if( rxModuleManager.is() )
+ {
+ try
+ {
+ aServiceName = rxModuleManager->identify( rxModel );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ OSL_ENSURE( aServiceName.getLength() > 0, "::basic::vba::lclIdentifyDocument - cannot identify document" );
+ }
+ return aServiceName;
+}
+
+// ----------------------------------------------------------------------------
+
+/** Returns an enumeration of all open documents.
+ */
+uno::Reference< container::XEnumeration > lclCreateDocumentEnumeration()
+{
+ uno::Reference< container::XEnumeration > xEnumeration;
+ try
+ {
+ uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), uno::UNO_SET_THROW );
+ uno::Reference< frame::XDesktop > xDesktop( xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) ) ), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XEnumerationAccess > xComponentsEA( xDesktop->getComponents(), uno::UNO_SET_THROW );
+ xEnumeration = xComponentsEA->createEnumeration();
+
+ }
+ catch( uno::Exception& )
+ {
+ }
+ OSL_ENSURE( xEnumeration.is(), "::basic::vba::lclCreateDocumentEnumeration - cannot create enumeration of all documents" );
+ return xEnumeration;
+}
+
+// ----------------------------------------------------------------------------
+
+/** Locks or unlocks the controllers of the specified document model.
+ */
+void lclLockControllers( const uno::Reference< frame::XModel >& rxModel, sal_Bool bLockControllers )
+{
+ if( rxModel.is() ) try
+ {
+ if( bLockControllers )
+ rxModel->lockControllers();
+ else
+ rxModel->unlockControllers();
+ }
+ catch( uno::Exception& )
+ {
+ }
+}
+
+// ----------------------------------------------------------------------------
+
+/** Enables or disables the container windows of all controllers of the
+ specified document model.
+ */
+void lclEnableContainerWindows( const uno::Reference< frame::XModel >& rxModel, sal_Bool bEnableWindows )
+{
+ try
+ {
+ uno::Reference< frame::XModel2 > xModel2( rxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XEnumeration > xControllersEnum( xModel2->getControllers(), uno::UNO_SET_THROW );
+ // iterate over all controllers
+ while( xControllersEnum->hasMoreElements() )
+ {
+ try
+ {
+ uno::Reference< frame::XController > xController( xControllersEnum->nextElement(), uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XFrame > xFrame( xController->getFrame(), uno::UNO_SET_THROW );
+ uno::Reference< awt::XWindow > xWindow( xFrame->getContainerWindow(), uno::UNO_SET_THROW );
+ xWindow->setEnable( bEnableWindows );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+}
+
+// ----------------------------------------------------------------------------
+
+typedef void (*ModifyDocumentFunc)( const uno::Reference< frame::XModel >&, sal_Bool );
+
+/** Implementation iterating over all documents that have the same type as the
+ specified model, and calling the passed functor.
+ */
+void lclIterateDocuments( ModifyDocumentFunc pModifyDocumentFunc, const uno::Reference< frame::XModel >& rxModel, sal_Bool bModificator )
+{
+ uno::Reference< frame::XModuleManager > xModuleManager = lclCreateModuleManager();
+ uno::Reference< container::XEnumeration > xDocumentsEnum = lclCreateDocumentEnumeration();
+ ::rtl::OUString aIdentifier = lclIdentifyDocument( xModuleManager, rxModel );
+ if( xModuleManager.is() && xDocumentsEnum.is() && (aIdentifier.getLength() > 0) )
+ {
+ // iterate over all open documents
+ while( xDocumentsEnum->hasMoreElements() )
+ {
+ try
+ {
+ uno::Reference< frame::XModel > xCurrModel( xDocumentsEnum->nextElement(), uno::UNO_QUERY_THROW );
+ ::rtl::OUString aCurrIdentifier = lclIdentifyDocument( xModuleManager, xCurrModel );
+ if( aCurrIdentifier == aIdentifier )
+ pModifyDocumentFunc( xCurrModel, bModificator );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+ }
+ else
+ {
+ // no module manager, no documents enumeration, no identifier -> at least process the passed document
+ pModifyDocumentFunc( rxModel, bModificator );
+ }
+}
+
+} // namespace
+
+// ============================================================================
+
+void lockControllersOfAllDocuments( const uno::Reference< frame::XModel >& rxModel, sal_Bool bLockControllers )
+{
+ lclIterateDocuments( &lclLockControllers, rxModel, bLockControllers );
+}
+
+// ============================================================================
+
+void enableContainerWindowsOfAllDocuments( const uno::Reference< frame::XModel >& rxModel, sal_Bool bEnableWindows )
+{
+ lclIterateDocuments( &lclEnableContainerWindows, rxModel, bEnableWindows );
+}
+
+// ============================================================================
+
+} // namespace vba
+} // namespace basic
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index e2f53dd8ed8e..f8ffa46d48a5 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -55,8 +55,12 @@
#include "sb.hrc"
#include <basrid.hxx>
#include <vos/mutex.hxx>
+#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/util/XCloseBroadcaster.hpp>
+#include <com/sun/star/util/XCloseListener.hpp>
#include "errobject.hxx"
+#include <map>
#include <hash_map>
#include <com/sun/star/script/ModuleType.hpp>
@@ -80,6 +84,143 @@ using com::sun::star::lang::XMultiServiceFactory;
const static String aThisComponent( RTL_CONSTASCII_USTRINGPARAM("ThisComponent") );
const static String aVBAHook( RTL_CONSTASCII_USTRINGPARAM( "VBAGlobals" ) );
+// ============================================================================
+
+class DocBasicItem : public ::cppu::WeakImplHelper1< util::XCloseListener >
+{
+public:
+ explicit DocBasicItem( StarBASIC& rDocBasic );
+ virtual ~DocBasicItem();
+
+ inline const SbxObjectRef& getClassModules() const { return mxClassModules; }
+ inline bool isDocClosed() const { return mbDocClosed; }
+
+ void clearDependingVarsOnDelete( StarBASIC& rDeletedBasic );
+
+ void startListening();
+ void stopListening();
+
+ virtual void SAL_CALL queryClosing( const lang::EventObject& rSource, sal_Bool bGetsOwnership ) throw (util::CloseVetoException, uno::RuntimeException);
+ virtual void SAL_CALL notifyClosing( const lang::EventObject& rSource ) throw (uno::RuntimeException);
+ virtual void SAL_CALL disposing( const lang::EventObject& rSource ) throw (uno::RuntimeException);
+
+private:
+ StarBASIC& mrDocBasic;
+ SbxObjectRef mxClassModules;
+ bool mbDocClosed;
+ bool mbDisposed;
+};
+
+// ----------------------------------------------------------------------------
+
+DocBasicItem::DocBasicItem( StarBASIC& rDocBasic ) :
+ mrDocBasic( rDocBasic ),
+ mxClassModules( new SbxObject( String() ) ),
+ mbDocClosed( false ),
+ mbDisposed( false )
+{
+}
+
+DocBasicItem::~DocBasicItem()
+{
+ stopListening();
+}
+
+void DocBasicItem::clearDependingVarsOnDelete( StarBASIC& rDeletedBasic )
+{
+ mrDocBasic.implClearDependingVarsOnDelete( &rDeletedBasic );
+}
+
+void DocBasicItem::startListening()
+{
+ Any aThisComp;
+ mrDocBasic.GetUNOConstant( "ThisComponent", aThisComp );
+ Reference< util::XCloseBroadcaster > xCloseBC( aThisComp, UNO_QUERY );
+ if( xCloseBC.is() )
+ try { xCloseBC->addCloseListener( this ); } catch( uno::Exception& ) {}
+}
+
+void DocBasicItem::stopListening()
+{
+ if( mbDisposed ) return;
+ mbDisposed = true;
+ Any aThisComp;
+ mrDocBasic.GetUNOConstant( "ThisComponent", aThisComp );
+ Reference< util::XCloseBroadcaster > xCloseBC( aThisComp, UNO_QUERY );
+ if( xCloseBC.is() )
+ try { xCloseBC->removeCloseListener( this ); } catch( uno::Exception& ) {}
+}
+
+void SAL_CALL DocBasicItem::queryClosing( const lang::EventObject& /*rSource*/, sal_Bool /*bGetsOwnership*/ ) throw (util::CloseVetoException, uno::RuntimeException)
+{
+}
+
+void SAL_CALL DocBasicItem::notifyClosing( const lang::EventObject& /*rEvent*/ ) throw (uno::RuntimeException)
+{
+ stopListening();
+ mbDocClosed = true;
+}
+
+void SAL_CALL DocBasicItem::disposing( const lang::EventObject& /*rEvent*/ ) throw (uno::RuntimeException)
+{
+ stopListening();
+}
+
+// ----------------------------------------------------------------------------
+
+namespace {
+
+typedef ::rtl::Reference< DocBasicItem > DocBasicItemRef;
+typedef std::map< const StarBASIC*, DocBasicItemRef > DocBasicItemMap;
+static DocBasicItemMap GaDocBasicItems;
+
+const DocBasicItem* lclFindDocBasicItem( const StarBASIC* pDocBasic )
+{
+ DocBasicItemMap::iterator it = GaDocBasicItems.find( pDocBasic );
+ return (it != GaDocBasicItems.end()) ? it->second.get() : 0;
+}
+
+void lclInsertDocBasicItem( StarBASIC& rDocBasic )
+{
+ DocBasicItemRef& rxDocBasicItem = GaDocBasicItems[ &rDocBasic ];
+ rxDocBasicItem.set( new DocBasicItem( rDocBasic ) );
+ rxDocBasicItem->startListening();
+}
+
+void lclRemoveDocBasicItem( StarBASIC& rDocBasic )
+{
+ DocBasicItemMap::iterator it = GaDocBasicItems.find( &rDocBasic );
+ if( it != GaDocBasicItems.end() )
+ {
+ it->second->stopListening();
+ GaDocBasicItems.erase( it );
+ }
+ DocBasicItemMap::iterator it_end = GaDocBasicItems.end();
+ for( it = GaDocBasicItems.begin(); it != it_end; ++it )
+ it->second->clearDependingVarsOnDelete( rDocBasic );
+}
+
+StarBASIC* lclGetDocBasicForModule( SbModule* pModule )
+{
+ StarBASIC* pRetBasic = NULL;
+ SbxObject* pCurParent = pModule;
+ while( pCurParent->GetParent() != NULL )
+ {
+ pCurParent = pCurParent->GetParent();
+ StarBASIC* pDocBasic = PTR_CAST( StarBASIC, pCurParent );
+ if( pDocBasic != NULL && pDocBasic->IsDocBasic() )
+ {
+ pRetBasic = pDocBasic;
+ break;
+ }
+ }
+ return pRetBasic;
+}
+
+} // namespace
+
+// ============================================================================
+
SbxObject* StarBASIC::getVBAGlobals( )
{
if ( !pVBAGlobals )
@@ -461,6 +602,7 @@ SbxObject* createUserTypeImpl( const String& rClassName )
return pRetObj;
}
+
TYPEINIT1(SbClassModuleObject,SbModule)
SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
@@ -610,8 +752,12 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
SbClassModuleObject::~SbClassModuleObject()
{
+ // do not trigger termination event when document is already closed
if( StarBASIC::IsRunning() )
- triggerTerminateEvent();
+ if( StarBASIC* pDocBasic = lclGetDocBasicForModule( this ) )
+ if( const DocBasicItem* pDocBasicItem = lclFindDocBasicItem( pDocBasic ) )
+ if( !pDocBasicItem->isDocClosed() )
+ triggerTerminateEvent();
// Must be deleted by base class dtor because this data
// is not owned by the SbClassModuleObject object
@@ -699,8 +845,14 @@ SbClassFactory::~SbClassFactory()
void SbClassFactory::AddClassModule( SbModule* pClassModule )
{
+ SbxObjectRef xToUseClassModules = xClassModules;
+
+ if( StarBASIC* pDocBasic = lclGetDocBasicForModule( pClassModule ) )
+ if( const DocBasicItem* pDocBasicItem = lclFindDocBasicItem( pDocBasic ) )
+ xToUseClassModules = pDocBasicItem->getClassModules();
+
SbxObject* pParent = pClassModule->GetParent();
- xClassModules->Insert( pClassModule );
+ xToUseClassModules->Insert( pClassModule );
pClassModule->SetParent( pParent );
}
@@ -717,12 +869,19 @@ SbxBase* SbClassFactory::Create( sal_uInt16, sal_uInt32 )
SbxObject* SbClassFactory::CreateObject( const String& rClassName )
{
- SbxVariable* pVar = xClassModules->Find( rClassName, SbxCLASS_DONTCARE );
+ SbxObjectRef xToUseClassModules = xClassModules;
+
+ if( SbModule* pMod = pMOD )
+ if( StarBASIC* pDocBasic = lclGetDocBasicForModule( pMod ) )
+ if( const DocBasicItem* pDocBasicItem = lclFindDocBasicItem( pDocBasic ) )
+ xToUseClassModules = pDocBasicItem->getClassModules();
+
+ SbxVariable* pVar = xToUseClassModules->Find( rClassName, SbxCLASS_OBJECT );
SbxObject* pRet = NULL;
if( pVar )
{
- SbModule* pMod = (SbModule*)pVar;
- pRet = new SbClassModuleObject( pMod );
+ SbModule* pVarMod = (SbModule*)pVar;
+ pRet = new SbClassModuleObject( pVarMod );
}
return pRet;
}
@@ -734,9 +893,6 @@ SbModule* SbClassFactory::FindClass( const String& rClassName )
return pMod;
}
-typedef std::vector< StarBASIC* > DocBasicVector;
-static DocBasicVector GaDocBasics;
-
StarBASIC::StarBASIC( StarBASIC* p, sal_Bool bIsDocBasic )
: SbxObject( String( RTL_CONSTASCII_USTRINGPARAM("StarBASIC") ) ), bDocBasic( bIsDocBasic )
{
@@ -768,7 +924,7 @@ StarBASIC::StarBASIC( StarBASIC* p, sal_Bool bIsDocBasic )
bQuit = sal_False;
if( bDocBasic )
- GaDocBasics.push_back( this );
+ lclInsertDocBasicItem( *this );
}
// #51727 Override SetModified so that the modified state
@@ -780,6 +936,9 @@ void StarBASIC::SetModified( sal_Bool b )
StarBASIC::~StarBASIC()
{
+ // Needs to be first action as it can trigger events
+ disposeComVariablesForBasic( this );
+
if( !--GetSbData()->nInst )
{
RemoveFactory( pSBFAC );
@@ -812,20 +971,7 @@ StarBASIC::~StarBASIC()
{
SbxError eOld = SbxBase::GetError();
- DocBasicVector::iterator it;
- for( it = GaDocBasics.begin() ; it != GaDocBasics.end() ; ++it )
- {
- if( *it == this )
- {
- GaDocBasics.erase( it );
- break;
- }
- }
- for( it = GaDocBasics.begin() ; it != GaDocBasics.end() ; ++it )
- {
- StarBASIC* pBasic = *it;
- pBasic->implClearDependingVarsOnDelete( this );
- }
+ lclRemoveDocBasicItem( *this );
SbxBase::ResetError();
if( eOld != SbxERR_OK )
@@ -845,7 +991,6 @@ StarBASIC::~StarBASIC()
}
clearUnoMethodsForBasic( this );
- disposeComVariablesForBasic( this );
}
// Override new() operator, so that everyone can create a new instance
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index a268568a410d..c722e680fd8c 100755..100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -36,6 +36,7 @@
#include <svl/brdcst.hxx>
#include <tools/shl.hxx>
#include <basic/sbx.hxx>
+#include "sbdiagnose.hxx"
#include "sb.hxx"
#include <sbjsmeth.hxx>
#include "sbjsmod.hxx"
@@ -54,11 +55,15 @@
#include <basic/basrdll.hxx>
#include <vos/mutex.hxx>
#include <basic/sbobjmod.hxx>
-#include <cppuhelper/implbase2.hxx>
+#include <basic/vbahelper.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <unotools/eventcfg.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/script/ModuleType.hpp>
#include <com/sun/star/script/vba/XVBACompatibility.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/document/XEventBroadcaster.hpp>
+#include <com/sun/star/document/XEventListener.hpp>
using namespace com::sun::star;
@@ -496,24 +501,18 @@ IMPL_LINK( AsyncQuitHandler, OnAsyncQuit, void*, /*pNull*/ )
return 0L;
}
-bool VBAUnlockControllers( StarBASIC* pBasic )
+void VBAUnlockDocuments( StarBASIC* pBasic )
{
- bool bRes = false;
if ( pBasic && pBasic->IsDocBasic() )
{
SbUnoObject* pGlobs = dynamic_cast< SbUnoObject* >( pBasic->Find( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ThisComponent" ) ), SbxCLASS_DONTCARE ) );
- if ( pGlobs ) try
- {
- uno::Reference< frame::XModel > xModel( pGlobs->getUnoAny(), uno::UNO_QUERY_THROW );
- if ( xModel->hasControllersLocked() )
- xModel->unlockControllers();
- bRes = true;
- }
- catch( uno::Exception& )
+ if ( pGlobs )
{
+ uno::Reference< frame::XModel > xModel( pGlobs->getUnoAny(), uno::UNO_QUERY );
+ ::basic::vba::lockControllersOfAllDocuments( xModel, sal_False );
+ ::basic::vba::enableContainerWindowsOfAllDocuments( xModel, sal_True );
}
}
- return bRes;
}
/////////////////////////////////////////////////////////////////////////////
@@ -1180,9 +1179,13 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth )
GlobalRunDeInit();
+#ifdef DBG_UTIL
+ ResetCapturedAssertions();
+#endif
+
// VBA always ensures screenupdating is enabled after completing
if ( mbVBACompat )
- VBAUnlockControllers( PTR_CAST( StarBASIC, GetParent() ) );
+ VBAUnlockDocuments( PTR_CAST( StarBASIC, GetParent() ) );
#ifdef DBG_TRACE_BASIC
dbg_DeInitTrace();
@@ -2162,22 +2165,27 @@ void SbObjModule::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
}
-typedef ::cppu::WeakImplHelper2< awt::XTopWindowListener, awt::XWindowListener > FormObjEventListener_BASE;
+typedef ::cppu::WeakImplHelper3<
+ awt::XTopWindowListener,
+ awt::XWindowListener,
+ document::XEventListener > FormObjEventListener_BASE;
class FormObjEventListenerImpl : public FormObjEventListener_BASE
{
SbUserFormModule* mpUserForm;
uno::Reference< lang::XComponent > mxComponent;
+ uno::Reference< frame::XModel > mxModel;
bool mbDisposed;
sal_Bool mbOpened;
sal_Bool mbActivated;
sal_Bool mbShowing;
- FormObjEventListenerImpl(); // not defined
+
FormObjEventListenerImpl(const FormObjEventListenerImpl&); // not defined
+ FormObjEventListenerImpl& operator=(const FormObjEventListenerImpl&); // not defined
public:
- FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent ) :
- mpUserForm( pUserForm ), mxComponent( xComponent) ,
+ FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent, const uno::Reference< frame::XModel >& xModel ) :
+ mpUserForm( pUserForm ), mxComponent( xComponent), mxModel( xModel ),
mbDisposed( false ), mbOpened( sal_False ), mbActivated( sal_False ), mbShowing( sal_False )
{
if ( mxComponent.is() )
@@ -2194,6 +2202,15 @@ public:
}
catch( uno::Exception& ) {}
}
+
+ if ( mxModel.is() )
+ {
+ try
+ {
+ uno::Reference< document::XEventBroadcaster >( mxModel, uno::UNO_QUERY_THROW )->addEventListener( this );
+ }
+ catch( uno::Exception& ) {}
+ }
}
virtual ~FormObjEventListenerImpl()
@@ -2220,6 +2237,16 @@ public:
catch( uno::Exception& ) {}
}
mxComponent.clear();
+
+ if ( mxModel.is() && !mbDisposed )
+ {
+ try
+ {
+ uno::Reference< document::XEventBroadcaster >( mxModel, uno::UNO_QUERY_THROW )->removeEventListener( this );
+ }
+ catch( uno::Exception& ) {}
+ }
+ mxModel.clear();
}
virtual void SAL_CALL windowOpened( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
@@ -2327,13 +2354,25 @@ public:
{
}
+ virtual void SAL_CALL notifyEvent( const document::EventObject& rEvent ) throw (uno::RuntimeException)
+ {
+ // early dosposing on document event "OnUnload", to be sure Basic still exists when calling VBA "UserForm_Terminate"
+ if( rEvent.EventName == GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ) )
+ {
+ removeListener();
+ mbDisposed = true;
+ if ( mpUserForm )
+ mpUserForm->ResetApiObj(); // will trigger "UserForm_Terminate"
+ }
+ }
+
virtual void SAL_CALL disposing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException)
{
OSL_TRACE("** Userform/Dialog disposing");
+ removeListener();
mbDisposed = true;
- mxComponent.clear();
if ( mpUserForm )
- mpUserForm->ResetApiObj();
+ mpUserForm->ResetApiObj( false ); // pass false (too late to trigger VBA events here)
}
};
@@ -2567,30 +2606,27 @@ void SbUserFormModule::InitObject()
aArgs[ 2 ] <<= m_xModel;
aArgs[ 3 ] <<= rtl::OUString( GetParent()->GetName() );
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 );
+
+ uno::Reference< lang::XComponent > xComponent( m_xDialog, uno::UNO_QUERY_THROW );
// the dialog must be disposed at the end!
- if( xComponent.is() )
+ StarBASIC* pParentBasic = NULL;
+ SbxObject* pCurObject = this;
+ do
{
- StarBASIC* pParentBasic = NULL;
- SbxObject* pCurObject = this;
- do
- {
- SbxObject* pObjParent = pCurObject->GetParent();
- pParentBasic = PTR_CAST( StarBASIC, pObjParent );
- pCurObject = pObjParent;
- }
- while( pParentBasic == NULL && pCurObject != NULL );
-
- OSL_ASSERT( pParentBasic != NULL );
- registerComponentToBeDisposedForBasic( xComponent, pParentBasic );
+ SbxObject* pObjParent = pCurObject->GetParent();
+ pParentBasic = PTR_CAST( StarBASIC, pObjParent );
+ pCurObject = pObjParent;
}
+ while( pParentBasic == NULL && pCurObject != NULL );
+ OSL_ASSERT( pParentBasic != NULL );
+ registerComponentToBeDisposedForBasic( xComponent, pParentBasic );
- // remove old listener if it exists
- if ( m_DialogListener.get() )
+ // if old listener object exists, remove it from dialog and document model
+ if( m_DialogListener.is() )
m_DialogListener->removeListener();
- m_DialogListener = new FormObjEventListenerImpl( this, xComponent );
+ m_DialogListener.set( new FormObjEventListenerImpl( this, xComponent, m_xModel ) );
triggerInitializeEvent();
}
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index e518779b78d5..ad94bbe842c8 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -152,6 +152,16 @@ static SbxDataType GetSuffixType( sal_Unicode c )
// Returnwert ist sal_False bei EOF oder Fehlern
#define BUF_SIZE 80
+namespace {
+
+/** Returns true, if the passed character is a white space character. */
+inline bool lclIsWhitespace( sal_Unicode cChar )
+{
+ return (cChar == ' ') || (cChar == '\t') || (cChar == '\f');
+}
+
+} // namespace
+
sal_Bool SbiScanner::NextSym()
{
// Fuer den EOLN-Fall merken
@@ -177,7 +187,11 @@ sal_Bool SbiScanner::NextSym()
p2 += n;
while( ( n < nLen ) && ( *p2 != '\n' ) && ( *p2 != '\r' ) )
p2++, n++;
- aLine = aBuf.copy( nBufPos, n - nBufPos );
+ // #163944# ignore trailing whitespace
+ sal_Int32 nCopyEndPos = n;
+ while( (nBufPos < nCopyEndPos) && lclIsWhitespace( aBuf[ nCopyEndPos - 1 ] ) )
+ --nCopyEndPos;
+ aLine = aBuf.copy( nBufPos, nCopyEndPos - nBufPos );
if( n < nLen )
{
if( *p2 == '\r' && *( p2+1 ) == '\n' )
@@ -193,7 +207,7 @@ sal_Bool SbiScanner::NextSym()
}
// Leerstellen weg:
- while( *pLine && (( *pLine == ' ' ) || ( *pLine == '\t' ) || ( *pLine == '\f' )) )
+ while( lclIsWhitespace( *pLine ) )
pLine++, nCol++, bSpaces = sal_True;
nCol1 = nCol;
@@ -230,7 +244,7 @@ sal_Bool SbiScanner::NextSym()
{
const sal_Unicode* pTestLine = pLine;
short nTestCol = nCol;
- while( *pTestLine && (( *pTestLine == ' ' ) || ( *pTestLine == '\t' )) )
+ while( lclIsWhitespace( *pTestLine ) )
{
pTestLine++;
nTestCol++;
diff --git a/basic/source/inc/sbdiagnose.hxx b/basic/source/inc/sbdiagnose.hxx
new file mode 100644
index 000000000000..065efdb183e1
--- /dev/null
+++ b/basic/source/inc/sbdiagnose.hxx
@@ -0,0 +1,34 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2011 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef BASIC_SBDIAGNOSE_HXX
+#define BASIC_SBDIAGNOSE_HXX
+
+#ifdef DBG_UTIL
+void ResetCapturedAssertions();
+#endif
+
+#endif // BASIC_SBDIAGNOSE_HXX
diff --git a/basic/source/runtime/dllmgr.cxx b/basic/source/runtime/dllmgr.cxx
index 8cc6ce7edd82..8baf819372ba 100644
--- a/basic/source/runtime/dllmgr.cxx
+++ b/basic/source/runtime/dllmgr.cxx
@@ -36,6 +36,7 @@
#include "basic/sbx.hxx"
#include "basic/sbxvar.hxx"
+#include "runtime.hxx"
#include "osl/thread.h"
#include "rtl/ref.hxx"
#include "rtl/string.hxx"
@@ -266,9 +267,15 @@ SbError marshal(
std::vector< char > & blob, std::size_t offset, MarshalData & data)
{
OSL_ASSERT(variable != 0);
- if ((variable->GetFlags() & SBX_REFERENCE) == 0) {
- if ((variable->GetType() & SbxARRAY) == 0) {
- switch (variable->GetType()) {
+
+ SbxDataType eVarType = variable->GetType();
+ bool bByVal = (variable->GetFlags() & SBX_REFERENCE) == 0;
+ if( !bByVal && !SbiRuntime::isVBAEnabled() && eVarType == SbxSTRING )
+ bByVal = true;
+
+ if (bByVal) {
+ if ((eVarType & SbxARRAY) == 0) {
+ switch (eVarType) {
case SbxINTEGER:
add(blob, variable->GetInteger(), outer ? 4 : 2, offset);
break;
@@ -317,8 +324,8 @@ SbError marshal(
}
}
} else {
- if ((variable->GetType() & SbxARRAY) == 0) {
- switch (variable->GetType()) {
+ if ((eVarType & SbxARRAY) == 0) {
+ switch (eVarType) {
case SbxINTEGER:
case SbxLONG:
case SbxSINGLE:
diff --git a/basic/source/runtime/makefile.mk b/basic/source/runtime/makefile.mk
index 8ca052aaae1a..329448c67e75 100644
--- a/basic/source/runtime/makefile.mk
+++ b/basic/source/runtime/makefile.mk
@@ -54,7 +54,8 @@ SLOFILES= \
$(SLO)$/methods1.obj \
$(SLO)$/props.obj \
$(SLO)$/ddectrl.obj \
- $(SLO)$/dllmgr.obj
+ $(SLO)$/dllmgr.obj \
+ $(SLO)$/sbdiagnose.obj
.IF "$(GUI)$(COM)$(CPU)" == "WNTMSCI"
SLOFILES+= $(SLO)$/wnt.obj
diff --git a/basic/source/runtime/rtlproto.hxx b/basic/source/runtime/rtlproto.hxx
index bb8687ee0db6..bba1867d3591 100644
--- a/basic/source/runtime/rtlproto.hxx
+++ b/basic/source/runtime/rtlproto.hxx
@@ -344,6 +344,7 @@ extern RTLFUNC(CDateToIso);
extern RTLFUNC(CDateFromIso);
extern RTLFUNC(CompatibilityMode);
extern RTLFUNC(CDec);
+extern RTLFUNC(CaptureAssertions);
extern RTLFUNC(Partition); // Fong
diff --git a/basic/source/runtime/sbdiagnose.cxx b/basic/source/runtime/sbdiagnose.cxx
new file mode 100644
index 000000000000..97bfb0a00814
--- /dev/null
+++ b/basic/source/runtime/sbdiagnose.cxx
@@ -0,0 +1,134 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2011 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_basic.hxx"
+
+#include "rtlproto.hxx"
+#include "sbdiagnose.hxx"
+
+#include "basic/sbstar.hxx"
+
+#include <tools/debug.hxx>
+#include <comphelper/flagguard.hxx>
+
+#ifdef DBG_UTIL
+
+static DbgChannelId nRestoreChannelId = 0;
+static DbgChannelId nAssertionChannelId = 0;
+static StarBASICRef xAssertionChannelBasic;
+static String sCaptureFunctionName;
+static bool bReportingAssertion = false;
+
+void ResetCapturedAssertions()
+{
+ if ( nRestoreChannelId != 0 )
+ {
+ DBG_INSTOUTERROR( nRestoreChannelId );
+ }
+ nRestoreChannelId = 0;
+ xAssertionChannelBasic = NULL;
+ sCaptureFunctionName = String();
+ bReportingAssertion = false;
+}
+
+void DbgReportAssertion( const sal_Char* i_assertionMessage )
+{
+ if ( !xAssertionChannelBasic )
+ {
+ ResetCapturedAssertions();
+ return;
+ }
+
+ // prevent infinite recursion
+ if ( bReportingAssertion )
+ return;
+ ::comphelper::FlagRestorationGuard aGuard( bReportingAssertion, true );
+
+ SbxArrayRef const xArguments( new SbxArray( SbxVARIANT ) );
+ SbxVariableRef const xMessageText = new SbxVariable( SbxSTRING );
+ xMessageText->PutString( String::CreateFromAscii( i_assertionMessage ) );
+ xArguments->Put( xMessageText, 1 );
+
+ ErrCode const nError = xAssertionChannelBasic->Call( sCaptureFunctionName, xArguments );
+ if ( ( nError & SbERR_METHOD_NOT_FOUND ) != 0 )
+ ResetCapturedAssertions();
+}
+
+#endif
+
+/// capture assertions, route them to the given given Basic function
+RTLFUNC(CaptureAssertions)
+{
+ (void)bWrite;
+
+ // need exactly one argument
+ if ( rPar.Count() != 2 )
+ {
+ StarBASIC::Error( SbERR_BAD_ARGUMENT );
+ return;
+ }
+
+#ifdef DBG_UTIL
+ DBG_TESTSOLARMUTEX();
+
+ String const sFunctionName = rPar.Get(1)->GetString();
+ if ( sFunctionName.Len() == 0 )
+ {
+ ResetCapturedAssertions();
+ return;
+ }
+
+ if ( nAssertionChannelId == 0 )
+ {
+ // TODO: should we register a named channel at the VCL API, instead of an unnamed channel at the tools API?
+ // A named channel would mean it would appear in the nonpro-debug-options dialog
+ nAssertionChannelId = DbgRegisterUserChannel( &DbgReportAssertion );
+ }
+
+ DbgChannelId const nCurrentChannelId = (DbgChannelId)DbgGetErrorOut();
+ if ( nCurrentChannelId != nAssertionChannelId )
+ {
+ // remember the current channel
+ nRestoreChannelId = nCurrentChannelId;
+
+ // set the new channel
+ DBG_INSTOUTERROR( nAssertionChannelId );
+
+ // ensure OSL assertions are captured, too
+ DbgData aData( *DbgGetData() );
+ aData.bHookOSLAssert = sal_True;
+ DbgUpdateOslHook( &aData );
+ }
+
+ xAssertionChannelBasic = pBasic;
+ sCaptureFunctionName = sFunctionName;
+#else
+ (void)pBasic;
+ (void)rPar;
+ (void)bWrite;
+#endif
+}
+
diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index ecc0dfb3321b..92d8152e60f4 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -147,6 +147,8 @@ static Methods aMethods[] = {
{ "number", SbxDOUBLE, 0,NULL,0 },
{ "CreateObject", SbxOBJECT, 1 | _FUNCTION, RTLNAME( CreateObject ),0 },
{ "class", SbxSTRING, 0,NULL,0 },
+{ "CaptureAssertions", SbxNULL, 1 | _FUNCTION, RTLNAME(CaptureAssertions), 0 },
+ { "methodName", SbxSTRING, 0, NULL, 0 },
{ "CreateUnoListener",SbxOBJECT, 1 | _FUNCTION, RTLNAME( CreateUnoListener ),0 },
{ "prefix", SbxSTRING, 0,NULL,0 },
{ "typename", SbxSTRING, 0,NULL,0 },
diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx
index 02b22a35b732..bbb3668b5b69 100755
--- a/basic/source/runtime/step2.cxx
+++ b/basic/source/runtime/step2.cxx
@@ -521,7 +521,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
pPar->Put( NULL, 0 );
}
// Index-Access bei UnoObjekten beruecksichtigen
- else if( pElem->GetType() == SbxOBJECT && (!pElem->ISA(SbxMethod) || !pElem->IsBroadcaster()) )
+ else if( pElem->GetType() == SbxOBJECT && (!pElem->ISA(SbxMethod) || (bVBAEnabled && !pElem->IsBroadcaster()) ) )
{
pPar = pElem->GetParameters();
if ( pPar )
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 933a414d331c..2548643c7ce1 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -1993,45 +1993,83 @@ rtl::Reference< ChildAccess > Access::getUnmodifiedChild(
}
rtl::Reference< ChildAccess > Access::getSubChild(rtl::OUString const & path) {
- rtl::OUString name;
- bool setElement;
- rtl::OUString templateName;
- sal_Int32 i = Data::parseSegment(
- path, 0, &name, &setElement, &templateName);
- if (i == -1 || (i != path.getLength() && path[i] != '/')) {
- return rtl::Reference< ChildAccess >();
- }
- rtl::Reference< ChildAccess > child(getChild(name));
- if (!child.is()) {
- return rtl::Reference< ChildAccess >();
- }
- if (setElement) {
- rtl::Reference< Node > p(getNode());
- switch (p->kind()) {
- case Node::KIND_LOCALIZED_PROPERTY:
- if (!Components::allLocales(getRootAccess()->getLocale()) ||
- templateName.getLength() != 0)
- {
+ sal_Int32 i = 0;
+ // For backwards compatibility, allow absolute paths where meaningful:
+ if (path.getLength() != 0 && path[0] == '/') {
+ ++i;
+ if (!getRootAccess().is()) {
+ return rtl::Reference< ChildAccess >();
+ }
+ Path abs(getAbsolutePath());
+ for (Path::iterator j(abs.begin()); j != abs.end(); ++j) {
+ rtl::OUString name1;
+ bool setElement1;
+ rtl::OUString templateName1;
+ i = Data::parseSegment(
+ path, i, &name1, &setElement1, &templateName1);
+ if (i == -1 || (i != path.getLength() && path[i] != '/')) {
return rtl::Reference< ChildAccess >();
}
- break;
- case Node::KIND_SET:
- if (templateName.getLength() != 0 &&
- !dynamic_cast< SetNode * >(p.get())->isValidTemplate(
- templateName))
+ rtl::OUString name2;
+ bool setElement2;
+ rtl::OUString templateName2;
+ Data::parseSegment(*j, 0, &name2, &setElement2, &templateName2);
+ if (name1 != name2 || setElement1 != setElement2 ||
+ (setElement1 &&
+ !Data::equalTemplateNames(templateName1, templateName2)))
{
return rtl::Reference< ChildAccess >();
}
- break;
- default:
+ if (i != path.getLength()) {
+ ++i;
+ }
+ }
+ }
+ for (rtl::Reference< Access > parent(this);;) {
+ rtl::OUString name;
+ bool setElement;
+ rtl::OUString templateName;
+ i = Data::parseSegment(path, i, &name, &setElement, &templateName);
+ if (i == -1 || (i != path.getLength() && path[i] != '/')) {
return rtl::Reference< ChildAccess >();
}
+ rtl::Reference< ChildAccess > child(parent->getChild(name));
+ if (!child.is()) {
+ return rtl::Reference< ChildAccess >();
+ }
+ if (setElement) {
+ rtl::Reference< Node > p(parent->getNode());
+ switch (p->kind()) {
+ case Node::KIND_LOCALIZED_PROPERTY:
+ if (!Components::allLocales(getRootAccess()->getLocale()) ||
+ templateName.getLength() != 0)
+ {
+ return rtl::Reference< ChildAccess >();
+ }
+ break;
+ case Node::KIND_SET:
+ if (templateName.getLength() != 0 &&
+ !dynamic_cast< SetNode * >(p.get())->isValidTemplate(
+ templateName))
+ {
+ return rtl::Reference< ChildAccess >();
+ }
+ break;
+ default:
+ return rtl::Reference< ChildAccess >();
+ }
+ }
+ // For backwards compatibility, ignore a final slash after non-value
+ // nodes:
+ if (child->isValue()) {
+ return i == path.getLength()
+ ? child : rtl::Reference< ChildAccess >();
+ } else if (i >= path.getLength() - 1) {
+ return child;
+ }
+ ++i;
+ parent = child.get();
}
- // For backwards compatibility, ignore a final slash after non-value nodes:
- return child->isValue()
- ? (i == path.getLength() ? child : rtl::Reference< ChildAccess >())
- : (i >= path.getLength() - 1
- ? child : child->getSubChild(path.copy(i + 1)));
}
bool Access::setChildProperty(
diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx
index 1a9575bb6726..dc5d08cb4e08 100644
--- a/configmgr/source/xcuparser.cxx
+++ b/configmgr/source/xcuparser.cxx
@@ -1099,17 +1099,25 @@ void XcuParser::handleSetNode(xmlreader::XmlReader & reader, SetNode * set) {
}
break;
case OPERATION_REMOVE:
- // Ignore removal of unknown members, members finalized in a lower
- // layer, and members made mandatory in this or a lower layer:
- if (i != set->getMembers().end() && !state_.top().locked &&
- finalizedLayer >= valueParser_.getLayer() &&
- mandatoryLayer > valueParser_.getLayer())
{
- set->getMembers().erase(i);
+ // Ignore removal of unknown members, members finalized in a lower
+ // layer, and members made mandatory in this or a lower layer;
+ // forget about user-layer removals that no longer remove anything
+ // (so that paired additions/removals in the user layer do not grow
+ // registrymodifications.xcu unbounded):
+ bool known = i != set->getMembers().end();
+ if (known && !state_.top().locked &&
+ finalizedLayer >= valueParser_.getLayer() &&
+ mandatoryLayer > valueParser_.getLayer())
+ {
+ set->getMembers().erase(i);
+ }
+ state_.push(State(true));
+ if (known) {
+ recordModification(false);
+ }
+ break;
}
- state_.push(State(true));
- recordModification(false);
- break;
}
}
diff --git a/connectivity/inc/connectivity/predicateinput.hxx b/connectivity/inc/connectivity/predicateinput.hxx
index 5041fd30c060..2f4dfbbd3146 100644
--- a/connectivity/inc/connectivity/predicateinput.hxx
+++ b/connectivity/inc/connectivity/predicateinput.hxx
@@ -104,6 +104,12 @@ namespace dbtools
::rtl::OUString* _pErrorMessage = NULL
) const;
+ ::rtl::OUString getPredicateValue(
+ const ::rtl::OUString& _sField
+ , const ::rtl::OUString& _rPredicateValue
+ , sal_Bool _bForStatementUse
+ , ::rtl::OUString* _pErrorMessage = NULL) const;
+
private:
::connectivity::OSQLParseNode* implPredicateTree(
::rtl::OUString& _rErrorMessage,
@@ -116,6 +122,8 @@ namespace dbtools
sal_Unicode& _rDecSep,
sal_Unicode& _rThdSep
) const;
+
+ ::rtl::OUString implParseNode(::connectivity::OSQLParseNode* pParseNode,sal_Bool _bForStatementUse) const;
};
//.........................................................................
diff --git a/connectivity/inc/connectivity/sqlnode.hxx b/connectivity/inc/connectivity/sqlnode.hxx
index 04ec8dc153df..2fe688574a0a 100644
--- a/connectivity/inc/connectivity/sqlnode.hxx
+++ b/connectivity/inc/connectivity/sqlnode.hxx
@@ -65,6 +65,8 @@ namespace rtl
{
class OUStringBuffer;
}
+#define ORDER_BY_CHILD_POS 5
+#define TABLE_EXPRESSION_CHILD_COUNT 9
namespace connectivity
{
diff --git a/connectivity/prj/build.lst b/connectivity/prj/build.lst
index 8d16197961fa..509b61cc6f9a 100644
--- a/connectivity/prj/build.lst
+++ b/connectivity/prj/build.lst
@@ -1,4 +1,4 @@
-cn connectivity : shell l10n comphelper MOZ:moz SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb qadevOOo officecfg NSS:nss LIBXSLT:libxslt NULL
+cn connectivity : shell L10N:l10n comphelper MOZ:moz SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb qadevOOo officecfg NSS:nss LIBXSLT:libxslt NULL
cn connectivity usr1 - all cn_mkout NULL
cn connectivity\inc nmake - all cn_inc NULL
cn connectivity\com\sun\star\sdbcx\comp\hsqldb nmake - all cn_jhsqldbdb cn_hsqldb cn_inc NULL
diff --git a/connectivity/qa/connectivity/tools/CRMDatabase.java b/connectivity/qa/connectivity/tools/CRMDatabase.java
index a1b457884948..f9b6d52a8038 100644
--- a/connectivity/qa/connectivity/tools/CRMDatabase.java
+++ b/connectivity/qa/connectivity/tools/CRMDatabase.java
@@ -224,6 +224,7 @@ public class CRMDatabase
// --------------------------------------------------------------------------------------------------------
private void validateUnparseable()
{
+ /*
// The "unparseable" query should be indeed be unparseable by OOo (though a valid HSQL query)
XSingleSelectQueryComposer composer;
QueryDefinition unparseableQuery;
@@ -253,6 +254,7 @@ public class CRMDatabase
if ( !caughtExpected )
throw new RuntimeException( "Somebody improved the parser! This is bad :), since we need an unparsable query here!" );
+ */
}
// --------------------------------------------------------------------------------------------------------
@@ -284,9 +286,10 @@ public class CRMDatabase
m_database.getDataSource().createQuery( "parseable", "SELECT * FROM \"customers\"" );
m_database.getDataSource().createQuery( "parseable native", "SELECT * FROM INFORMATION_SCHEMA.SYSTEM_VIEWS", false );
+/*
m_database.getDataSource().createQuery( "unparseable",
"SELECT {fn DAYOFMONTH ('2001-01-01')} AS \"ID_VARCHAR\" FROM \"products\"", false );
-
+*/
validateUnparseable();
}
}
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index 95aabb821b1a..5ea0e601a9c3 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -787,12 +787,32 @@ sal_Bool operator==(const DateTime& _rLH,const DateTime& _rRH)
bool ORowSetValue::operator==(const ORowSetValue& _rRH) const
{
- if(m_eTypeKind != _rRH.m_eTypeKind)
- return false;
- if ( m_bSigned != _rRH.m_bSigned )
- return false;
- if(m_bNull != _rRH.isNull())
+ if ( m_eTypeKind != _rRH.m_eTypeKind )
+ {
+ switch(m_eTypeKind)
+ {
+ case DataType::FLOAT:
+ case DataType::DOUBLE:
+ case DataType::REAL:
+ return getDouble() == _rRH.getDouble();
+ break;
+ default:
+ switch(_rRH.m_eTypeKind)
+ {
+ case DataType::FLOAT:
+ case DataType::DOUBLE:
+ case DataType::REAL:
+ return getDouble() == _rRH.getDouble();
+ break;
+ default:
+ break;
+ }
+ break;
+ }
return false;
+ }
+ if ( m_bNull != _rRH.isNull() )
+ return false;
if(m_bNull && _rRH.isNull())
return true;
@@ -802,16 +822,29 @@ bool ORowSetValue::operator==(const ORowSetValue& _rRH) const
{
case DataType::VARCHAR:
case DataType::CHAR:
- case DataType::DECIMAL:
- case DataType::NUMERIC:
case DataType::LONGVARCHAR:
{
::rtl::OUString aVal1(m_aValue.m_pString);
::rtl::OUString aVal2(_rRH.m_aValue.m_pString);
- bRet = aVal1 == aVal2;
+ return aVal1 == aVal2;
break;
}
+ default:
+ if ( m_bSigned != _rRH.m_bSigned )
+ return false;
+ break;
+ }
+ switch(m_eTypeKind)
+ {
+ case DataType::DECIMAL:
+ case DataType::NUMERIC:
+ {
+ ::rtl::OUString aVal1(m_aValue.m_pString);
+ ::rtl::OUString aVal2(_rRH.m_aValue.m_pString);
+ bRet = aVal1 == aVal2;
+ }
+ break;
case DataType::FLOAT:
bRet = *(float*)m_aValue.m_pValue == *(float*)_rRH.m_aValue.m_pValue;
break;
diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx
index 8ffebb0cfbda..dbac44b72424 100644
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@ -31,8 +31,10 @@
#include <comphelper/types.hxx>
#include <connectivity/dbtools.hxx>
#include <com/sun/star/sdbc/DataType.hpp>
+#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <osl/diagnose.h>
#include <connectivity/sqlnode.hxx>
+#include <connectivity/PColumn.hxx>
#include <comphelper/numbers.hxx>
//.........................................................................
@@ -325,63 +327,117 @@ namespace dbtools
::rtl::OUString sError;
OSQLParseNode* pParseNode = implPredicateTree( sError, sValue, _rxField );
- if ( _pErrorMessage ) *_pErrorMessage = sError;
+ if ( _pErrorMessage )
+ *_pErrorMessage = sError;
- if ( pParseNode )
+ sReturn = implParseNode(pParseNode,_bForStatementUse);
+ }
+
+ return sReturn;
+ }
+
+ ::rtl::OUString OPredicateInputController::getPredicateValue(
+ const ::rtl::OUString& _sField, const ::rtl::OUString& _rPredicateValue, sal_Bool _bForStatementUse, ::rtl::OUString* _pErrorMessage ) const
+ {
+ ::rtl::OUString sReturn = _rPredicateValue;
+ ::rtl::OUString sError;
+ ::rtl::OUString sField = _sField;
+ sal_Int32 nIndex = 0;
+ sField = sField.getToken(0,'(',nIndex);
+ if(nIndex == -1)
+ sField = _sField;
+ sal_Int32 nType = ::connectivity::OSQLParser::getFunctionReturnType(sField,&m_aParser.getContext());
+ if ( nType == DataType::OTHER || !sField.getLength() )
+ {
+ // first try the international version
+ ::rtl::OUString sSql;
+ sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT * "));
+ sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" FROM x WHERE "));
+ sSql += sField;
+ sSql += _rPredicateValue;
+ ::std::auto_ptr<OSQLParseNode> pParseNode( const_cast< OSQLParser& >( m_aParser ).parseTree( sError, sSql, sal_True ) );
+ nType = DataType::DOUBLE;
+ if ( pParseNode.get() )
{
- OSQLParseNode* pOdbcSpec = pParseNode->getByRule( OSQLParseNode::odbc_fct_spec );
- if ( pOdbcSpec )
+ OSQLParseNode* pColumnRef = pParseNode->getByRule(OSQLParseNode::column_ref);
+ if ( pColumnRef )
{
- if ( !_bForStatementUse )
- {
- if ( ( pOdbcSpec->count() >= 2 )
- && ( SQL_NODE_STRING == pOdbcSpec->getChild(1)->getNodeType() )
- )
- {
+ }
+ }
+ }
- sReturn = pOdbcSpec->getChild(1)->getTokenValue();
- }
- else
- OSL_ENSURE( sal_False, "OPredicateInputController::getPredicateValue: unknown/invalid structure (odbc + param use)!" );
- }
- else
- {
- OSQLParseNode* pFuncSpecParent = pOdbcSpec->getParent();
- OSL_ENSURE( pFuncSpecParent, "OPredicateInputController::getPredicateValue: an ODBC func spec node without parent?" );
- if ( pFuncSpecParent )
- pFuncSpecParent->parseNodeToStr(
- sReturn, m_xConnection, &m_aParser.getContext(), sal_False, sal_True
- );
- }
+ Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData();
+ parse::OParseColumn* pColumn = new parse::OParseColumn( sField,
+ ::rtl::OUString(),
+ ::rtl::OUString(),
+ ::rtl::OUString(),
+ ColumnValue::NULLABLE_UNKNOWN,
+ 0,
+ 0,
+ nType,
+ sal_False,
+ sal_False,
+ xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers());
+ Reference<XPropertySet> xColumn = pColumn;
+ pColumn->setFunction(sal_True);
+ pColumn->setRealName(sField);
+
+ OSQLParseNode* pParseNode = implPredicateTree( sError, _rPredicateValue, xColumn );
+ if ( _pErrorMessage )
+ *_pErrorMessage = sError;
+ return pParseNode ? implParseNode(pParseNode,_bForStatementUse) : sReturn;
+ }
+
+ ::rtl::OUString OPredicateInputController::implParseNode(OSQLParseNode* pParseNode,sal_Bool _bForStatementUse) const
+ {
+ ::rtl::OUString sReturn;
+ if ( pParseNode )
+ {
+ ::std::auto_ptr<OSQLParseNode> pTemp(pParseNode);
+ OSQLParseNode* pOdbcSpec = pParseNode->getByRule( OSQLParseNode::odbc_fct_spec );
+ if ( pOdbcSpec )
+ {
+ if ( _bForStatementUse )
+ {
+ OSQLParseNode* pFuncSpecParent = pOdbcSpec->getParent();
+ OSL_ENSURE( pFuncSpecParent, "OPredicateInputController::getPredicateValue: an ODBC func spec node without parent?" );
+ if ( pFuncSpecParent )
+ pFuncSpecParent->parseNodeToStr(sReturn, m_xConnection, &m_aParser.getContext(), sal_False, sal_True);
}
else
{
- if ( pParseNode->count() >= 3 )
+ OSQLParseNode* pValueNode = pOdbcSpec->getChild(1);
+ if ( SQL_NODE_STRING == pValueNode->getNodeType() )
+ sReturn = pValueNode->getTokenValue();
+ else
+ pValueNode->parseNodeToStr(sReturn, m_xConnection, &m_aParser.getContext(), sal_False, sal_True);
+ // sReturn = pOdbcSpec->getChild(1)->getTokenValue();
+ }
+ }
+ else
+ {
+ if ( pParseNode->count() >= 3 )
+ {
+ OSQLParseNode* pValueNode = pParseNode->getChild(2);
+ OSL_ENSURE( pValueNode, "OPredicateInputController::getPredicateValue: invalid node child!" );
+ if ( !_bForStatementUse )
{
- OSQLParseNode* pValueNode = pParseNode->getChild(2);
- OSL_ENSURE( pValueNode, "OPredicateInputController::getPredicateValue: invalid node child!" );
- if ( !_bForStatementUse )
- {
- if ( SQL_NODE_STRING == pValueNode->getNodeType() )
- sReturn = pValueNode->getTokenValue();
- else
- pValueNode->parseNodeToStr(
- sReturn, m_xConnection, &m_aParser.getContext(), sal_False, sal_True
- );
- }
+ if ( SQL_NODE_STRING == pValueNode->getNodeType() )
+ sReturn = pValueNode->getTokenValue();
else
pValueNode->parseNodeToStr(
sReturn, m_xConnection, &m_aParser.getContext(), sal_False, sal_True
);
}
else
- OSL_ENSURE( sal_False, "OPredicateInputController::getPredicateValue: unknown/invalid structure (noodbc)!" );
+ pValueNode->parseNodeToStr(
+ sReturn, m_xConnection, &m_aParser.getContext(), sal_False, sal_True
+ );
}
-
- delete pParseNode;
+ else
+ OSL_ENSURE( sal_False, "OPredicateInputController::getPredicateValue: unknown/invalid structure (noodbc)!" );
}
}
-
return sReturn;
}
//.........................................................................
diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx
index aa287c185b26..510c2790e777 100644
--- a/connectivity/source/drivers/ado/AColumn.cxx
+++ b/connectivity/source/drivers/ado/AColumn.cxx
@@ -165,7 +165,8 @@ void OAdoColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& r
{
sal_Int32 nVal=0;
rValue >>= nVal;
- m_aColumn.put_NumericScale((sal_Int8)nVal);
+ if ( !m_IsCurrency )
+ m_aColumn.put_NumericScale((sal_Int8)nVal);
}
break;
case PROPERTY_ID_ISNULLABLE:
@@ -212,6 +213,8 @@ void OAdoColumn::fillPropertyValues()
DataTypeEnum eType = m_aColumn.get_Type();
m_IsCurrency = (eType == adCurrency);
+ if ( m_IsCurrency && !m_Scale)
+ m_Scale = 4;
m_Type = ADOS::MapADOType2Jdbc(eType);
sal_Bool bForceTo = sal_True;
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index a7e2ec4df490..6596b9b8d946 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -466,6 +466,11 @@ void OConnection::buildTypeInfo() throw( SQLException)
aInfo->aSimpleType.aLocalTypeName = ADOS::getField(pRecordset,nPos++).get_Value();
aInfo->aSimpleType.nMinimumScale = ADOS::getField(pRecordset,nPos++).get_Value();
aInfo->aSimpleType.nMaximumScale = ADOS::getField(pRecordset,nPos++).get_Value();
+ if ( adCurrency == aInfo->eType && !aInfo->aSimpleType.nMaximumScale)
+ {
+ aInfo->aSimpleType.nMinimumScale = 4;
+ aInfo->aSimpleType.nMaximumScale = 4;
+ }
aInfo->aSimpleType.nNumPrecRadix = ADOS::getField(pRecordset,nPos++).get_Value();
// Now that we have the type info, save it
// in the Hashtable if we don't already have an
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index 4ea918ef3e27..9a303d1f1d27 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -99,7 +99,7 @@ void OPredicateCompiler::start(OSQLParseNode* pSQLParseNode)
OSQLParseNode * pTableExp = pSQLParseNode->getChild(3);
DBG_ASSERT(pTableExp != NULL,"Fehler im Parse Tree");
DBG_ASSERT(SQL_ISRULE(pTableExp,table_exp)," Fehler im Parse Tree");
- DBG_ASSERT(pTableExp->count() == 5,"Fehler im Parse Tree");
+ DBG_ASSERT(pTableExp->count() == TABLE_EXPRESSION_CHILD_COUNT,"Fehler im Parse Tree");
// check that we don't use anything other than count(*) as function
OSQLParseNode* pSelection = pSQLParseNode->getChild(2);
@@ -117,7 +117,7 @@ void OPredicateCompiler::start(OSQLParseNode* pSQLParseNode)
pWhereClause = pTableExp->getChild(1);
- pOrderbyClause = pTableExp->getChild(4);
+ pOrderbyClause = pTableExp->getChild(ORDER_BY_CHILD_POS);
}
else if (SQL_ISRULE(pSQLParseNode,update_statement_searched))
{
diff --git a/connectivity/source/drivers/macab/MacabRecord.cxx b/connectivity/source/drivers/macab/MacabRecord.cxx
index 35817526ff17..e161ece74522 100755
--- a/connectivity/source/drivers/macab/MacabRecord.cxx
+++ b/connectivity/source/drivers/macab/MacabRecord.cxx
@@ -202,7 +202,7 @@ sal_Int32 MacabRecord::compareFields(const macabfield *_field1, const macabfield
result = CFStringCompare(
(CFStringRef) _field1->value,
(CFStringRef) _field2->value,
- 0); // 0 = no options (like ignore case)
+ kCFCompareLocalized); // Specifies that the comparison should take into account differences related to locale, such as the thousands separator character.
break;
case kABDateProperty:
diff --git a/connectivity/source/parse/PColumn.cxx b/connectivity/source/parse/PColumn.cxx
index 10f4b5b4bdcf..8f3014908b10 100644
--- a/connectivity/source/parse/PColumn.cxx
+++ b/connectivity/source/parse/PColumn.cxx
@@ -155,13 +155,15 @@ OParseColumn* OParseColumn::createColumnForResultSet( const Reference< XResultSe
_rxResMetaData->isCurrency( _nColumnPos ),
_rxDBMetaData->supportsMixedCaseQuotedIdentifiers()
);
- pColumn->setTableName( ::dbtools::composeTableName( _rxDBMetaData,
- _rxResMetaData->getCatalogName( _nColumnPos ),
- _rxResMetaData->getSchemaName( _nColumnPos ),
- _rxResMetaData->getTableName( _nColumnPos ),
- sal_False,
- eComplete
- ) );
+ const ::rtl::OUString sTableName = _rxResMetaData->getTableName( _nColumnPos );
+ if ( sTableName.getLength() )
+ pColumn->setTableName( ::dbtools::composeTableName( _rxDBMetaData,
+ _rxResMetaData->getCatalogName( _nColumnPos ),
+ _rxResMetaData->getSchemaName( _nColumnPos ),
+ sTableName,
+ sal_False,
+ eComplete
+ ) );
pColumn->setIsSearchable( _rxResMetaData->isSearchable( _nColumnPos ) );
pColumn->setRealName(_rxResMetaData->getColumnName( _nColumnPos ));
pColumn->setLabel(sLabel);
diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y
index 9709d33fdf76..ad271e855e20 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -217,6 +217,14 @@ using namespace connectivity;
%token <pParseNode> SQL_TOKEN_VALUE SQL_TOKEN_CURRENT_CATALOG SQL_TOKEN_CURRENT_DEFAULT_TRANSFORM_GROUP SQL_TOKEN_CURRENT_PATH SQL_TOKEN_CURRENT_ROLE SQL_TOKEN_CURRENT_SCHEMA SQL_TOKEN_CURRENT_USER
%token <pParseNode> SQL_TOKEN_SESSION_USER SQL_TOKEN_SYSTEM_USER SQL_TOKEN_VARCHAR SQL_TOKEN_VARBINARY SQL_TOKEN_VARYING SQL_TOKEN_OBJECT SQL_TOKEN_NCLOB SQL_TOKEN_NATIONAL
%token <pParseNode> SQL_TOKEN_LARGE SQL_TOKEN_CLOB SQL_TOKEN_BLOB SQL_TOKEN_BIGINT SQL_TOKEN_BINARY SQL_TOKEN_WITHOUT SQL_TOKEN_BOOLEAN SQL_TOKEN_INTERVAL
+// window function
+%token <pParseNode> SQL_TOKEN_OVER SQL_TOKEN_ROW_NUMBER SQL_TOKEN_NTILE SQL_TOKEN_LEAD SQL_TOKEN_LAG SQL_TOKEN_RESPECT SQL_TOKEN_IGNORE SQL_TOKEN_NULLS
+%token <pParseNode> SQL_TOKEN_FIRST_VALUE SQL_TOKEN_LAST_VALUE SQL_TOKEN_NTH_VALUE SQL_TOKEN_FIRST SQL_TOKEN_LAST
+%token <pParseNode> SQL_TOKEN_EXCLUDE SQL_TOKEN_OTHERS SQL_TOKEN_TIES SQL_TOKEN_FOLLOWING SQL_TOKEN_UNBOUNDED SQL_TOKEN_PRECEDING SQL_TOKEN_RANGE SQL_TOKEN_ROWS
+%token <pParseNode> SQL_TOKEN_PARTITION SQL_TOKEN_WINDOW SQL_TOKEN_NO
+// LIMIT and OFFSEt
+%token <pParseNode> SQL_TOKEN_LIMIT SQL_TOKEN_OFFSET SQL_TOKEN_NEXT SQL_TOKEN_ONLY
+
/* operators */
%left SQL_TOKEN_NAME
%left <pParseNode> SQL_TOKEN_OR
@@ -271,7 +279,7 @@ using namespace connectivity;
%type <pParseNode> form_conversion char_translation trim_fct trim_operands trim_spec bit_value_fct bit_substring_fct op_column_commalist
%type <pParseNode> /*bit_concatenation*/ bit_value_exp bit_factor bit_primary collate_clause char_value_fct unique_spec value_exp_commalist in_predicate_value unique_test update_source
%type <pParseNode> function_arg_commalist3 string_function_3Argument function_arg_commalist4 string_function_4Argument function_arg_commalist2 string_function_1Argument string_function_2Argument
-%type <pParseNode> date_function_0Argument date_function_1Argument function_name12 function_name23 function_name1 function_name2 function_name3 function_name0 numeric_function_0Argument numeric_function_1Argument numeric_function_2Argument date_function_3Argument
+%type <pParseNode> date_function_0Argument date_function_1Argument function_name12 function_name23 function_name1 function_name2 function_name3 function_name0 numeric_function_0Argument numeric_function_1Argument numeric_function_2Argument
%type <pParseNode> all query_primary sql_not for_length upper_lower comparison column_val cross_union /*opt_schema_element_list*/
%type <pParseNode> /*op_authorization op_schema*/ nil_fkt schema_element base_table_def base_table_element base_table_element_commalist
%type <pParseNode> column_def odbc_fct_spec odbc_call_spec odbc_fct_type op_parameter union_statement
@@ -286,6 +294,16 @@ using namespace connectivity;
%type <pParseNode> binary_string_type numeric_type boolean_type datetime_type interval_type opt_paren_precision paren_char_length opt_paren_char_large_length paren_character_large_object_length
%type <pParseNode> large_object_length opt_multiplier character_large_object_type national_character_large_object_type binary_large_object_string_type opt_with_or_without_time_zone
%type <pParseNode> approximate_numeric_type exact_numeric_type opt_paren_precision_scale
+/* window function rules */
+%type <pParseNode> window_function window_function_type ntile_function number_of_tiles lead_or_lag_function lead_or_lag lead_or_lag_extent offset default_expression null_treatment
+%type <pParseNode> first_or_last_value_function first_or_last_value nth_value_function nth_row from_first_or_last window_name_or_specification in_line_window_specification opt_lead_or_lag_function
+%type <pParseNode> opt_null_treatment opt_from_first_or_last simple_value_specification dynamic_parameter_specification window_name window_clause window_definition_list window_definition
+%type <pParseNode> new_window_name window_specification_details existing_window_name window_partition_clause window_partition_column_reference_list window_partition_column_reference window_frame_clause
+%type <pParseNode> window_frame_units window_frame_extent window_frame_start window_frame_preceding window_frame_between window_frame_bound_1 window_frame_bound_2 window_frame_bound window_frame_following window_frame_exclusion
+%type <pParseNode> opt_window_frame_clause opt_window_partition_clause opt_existing_window_name window_specification opt_window_frame_exclusion opt_window_clause opt_offset
+%type <pParseNode> opt_fetch_first_row_count fetch_first_clause offset_row_count fetch_first_row_count first_or_next row_or_rows opt_result_offset_clause result_offset_clause
+/* LIMIT and OFFSET */
+%type <pParseNode> opt_limit_offset_clause limit_offset_clause opt_fetch_first_clause
%%
/* Parse Tree an OSQLParser zurueckliefern
@@ -920,19 +938,89 @@ selection:
}
| scalar_exp_commalist
;
+opt_result_offset_clause:
+ /* empty */ {$$ = SQL_NEW_RULE;}
+ | result_offset_clause
+ ;
+result_offset_clause:
+ SQL_TOKEN_OFFSET offset_row_count row_or_rows
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ ;
+opt_fetch_first_row_count:
+ /* empty */ {$$ = SQL_NEW_RULE;}
+ | fetch_first_row_count
+ ;
+first_or_next:
+ SQL_TOKEN_FIRST
+ | SQL_TOKEN_NEXT
+ ;
+row_or_rows:
+ SQL_TOKEN_ROW
+ | SQL_TOKEN_ROWS
+ ;
+opt_fetch_first_clause:
+ /* empty */ {$$ = SQL_NEW_RULE;}
+ | fetch_first_clause
+ ;
+fetch_first_clause:
+ SQL_TOKEN_FETCH first_or_next opt_fetch_first_row_count row_or_rows SQL_TOKEN_ONLY
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ $$->append($5);
+ }
+ ;
+offset_row_count:
+ literal
+ ;
+fetch_first_row_count:
+ literal
+ ;
+opt_limit_offset_clause:
+ /* empty */ {$$ = SQL_NEW_RULE;}
+ | limit_offset_clause
+ ;
+opt_offset:
+ /* empty */ {$$ = SQL_NEW_RULE;}
+ | SQL_TOKEN_OFFSET SQL_TOKEN_INTNUM
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ ;
+limit_offset_clause:
+ SQL_TOKEN_LIMIT SQL_TOKEN_INTNUM opt_offset
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ ;
table_exp:
- from_clause
- opt_where_clause
- opt_group_by_clause
- opt_having_clause
- opt_order_by_clause
- {$$ = SQL_NEW_RULE;
+ from_clause opt_where_clause opt_group_by_clause opt_having_clause opt_window_clause opt_order_by_clause opt_limit_offset_clause opt_result_offset_clause opt_fetch_first_clause
+ {
+ $$ = SQL_NEW_RULE;
$$->append($1);
$$->append($2);
$$->append($3);
$$->append($4);
- $$->append($5);}
+ $$->append($5);
+ $$->append($6);
+ $$->append($7);
+ $$->append($8);
+ $$->append($9);
+ }
;
from_clause:
@@ -1851,10 +1939,10 @@ function_name12:
;
function_name23:
SQL_TOKEN_LOCATE
+ | SQL_TOKEN_DATEDIFF
;
function_name3:
string_function_3Argument
- | date_function_3Argument
;
function_name:
string_function
@@ -1912,8 +2000,6 @@ date_function_1Argument:
| SQL_TOKEN_TIMEVALUE
| SQL_TOKEN_DATEVALUE
;
-date_function_3Argument:
- SQL_TOKEN_DATEDIFF
date_function:
SQL_TOKEN_TIMESTAMPADD
@@ -1951,6 +2037,362 @@ numeric_function:
SQL_TOKEN_RAND
| SQL_TOKEN_TRUNCATE
;
+
+window_function:
+ window_function_type SQL_TOKEN_OVER window_name_or_specification
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ ;
+window_function_type :
+ rank_function_type '(' ')'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($3 = newNode(")", SQL_NODE_PUNCTUATION));
+ }
+ | SQL_TOKEN_ROW_NUMBER '(' ')'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($3 = newNode(")", SQL_NODE_PUNCTUATION));
+ }
+ | general_set_fct
+ | ntile_function
+ | lead_or_lag_function
+ | first_or_last_value_function
+ | nth_value_function
+;
+ntile_function :
+ SQL_TOKEN_NTILE '(' number_of_tiles ')'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($3);
+ $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));
+ }
+ ;
+dynamic_parameter_specification:
+ parameter
+ ;
+simple_value_specification:
+ literal
+ ;
+number_of_tiles :
+ simple_value_specification
+ | dynamic_parameter_specification
+ ;
+opt_lead_or_lag_function:
+ /* empty */ {$$ = SQL_NEW_RULE;}
+ | ',' offset
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1 = newNode(",", SQL_NODE_PUNCTUATION));
+ $$->append($2);
+ }
+ | ',' offset ',' default_expression
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1 = newNode(",", SQL_NODE_PUNCTUATION));
+ $$->append($2);
+ $$->append($3 = newNode(",", SQL_NODE_PUNCTUATION));
+ $$->append($4);
+ }
+ ;
+opt_null_treatment:
+ /* empty */ {$$ = SQL_NEW_RULE;}
+ | null_treatment
+ ;
+
+lead_or_lag_function:
+ lead_or_lag '(' lead_or_lag_extent opt_lead_or_lag_function ')' opt_null_treatment
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($3);
+ $$->append($4);
+ $$->append($5 = newNode(")", SQL_NODE_PUNCTUATION));
+ $$->append($6);
+ }
+ ;
+lead_or_lag:
+ SQL_TOKEN_LEAD
+ | SQL_TOKEN_LAG
+ ;
+lead_or_lag_extent:
+ value_exp
+ ;
+offset:
+ SQL_TOKEN_INTNUM
+ ;
+default_expression:
+ value_exp
+ ;
+null_treatment:
+ SQL_TOKEN_RESPECT SQL_TOKEN_NULLS
+ | SQL_TOKEN_IGNORE SQL_TOKEN_NULLS
+ ;
+first_or_last_value_function:
+ first_or_last_value '(' value_exp ')' opt_null_treatment
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($3);
+ $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));
+ $$->append($5);
+ }
+ ;
+first_or_last_value :
+ SQL_TOKEN_FIRST_VALUE
+ | SQL_TOKEN_LAST_VALUE
+ ;
+opt_from_first_or_last:
+ /* empty */ {$$ = SQL_NEW_RULE;}
+ | from_first_or_last
+ ;
+nth_value_function:
+ SQL_TOKEN_NTH_VALUE '(' value_exp ',' nth_row ')' opt_from_first_or_last opt_null_treatment
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($3);
+ $$->append($4 = newNode(",", SQL_NODE_PUNCTUATION));
+ $$->append($5);
+ $$->append($6 = newNode(")", SQL_NODE_PUNCTUATION));
+ $$->append($7);
+ $$->append($8);
+ }
+ ;
+nth_row:
+ simple_value_specification
+ | dynamic_parameter_specification
+ ;
+from_first_or_last:
+ SQL_TOKEN_FROM SQL_TOKEN_FIRST
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ | SQL_TOKEN_FROM SQL_TOKEN_LAST
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ ;
+window_name:
+ SQL_TOKEN_NAME
+ ;
+window_name_or_specification:
+ window_name
+ | in_line_window_specification
+ ;
+in_line_window_specification:
+ window_specification
+ ;
+opt_window_clause:
+ /* empty */ {$$ = SQL_NEW_RULE;}
+ | window_clause
+ ;
+window_clause:
+ SQL_TOKEN_WINDOW window_definition_list
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ ;
+window_definition_list:
+ window_definition_list ',' window_definition
+ {$1->append($3);
+ $$ = $1;}
+ | window_definition
+ {$$ = SQL_NEW_COMMALISTRULE;
+ $$->append($1);}
+ ;
+window_definition:
+ new_window_name SQL_TOKEN_AS window_specification
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ ;
+new_window_name:
+ window_name
+ ;
+window_specification:
+ '(' window_specification_details ')'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($2);
+ $$->append($3 = newNode(")", SQL_NODE_PUNCTUATION));
+ }
+ ;
+opt_existing_window_name:
+ /* empty */ {$$ = SQL_NEW_RULE;}
+ | existing_window_name
+ ;
+opt_window_partition_clause:
+ /* empty */ {$$ = SQL_NEW_RULE;}
+ | window_partition_clause
+ ;
+opt_window_frame_clause:
+ /* empty */ {$$ = SQL_NEW_RULE;}
+ | window_frame_clause
+ ;
+window_specification_details:
+ opt_existing_window_name
+ opt_window_partition_clause
+ opt_order_by_clause
+ opt_window_frame_clause
+ ;
+existing_window_name:
+ window_name
+ ;
+window_partition_clause:
+ SQL_TOKEN_PARTITION SQL_TOKEN_BY window_partition_column_reference_list
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ ;
+window_partition_column_reference_list:
+ window_partition_column_reference_list ',' window_partition_column_reference
+ {$1->append($3);
+ $$ = $1;}
+ | window_partition_column_reference
+ {$$ = SQL_NEW_COMMALISTRULE;
+ $$->append($1);}
+ ;
+window_partition_column_reference:
+ column_ref opt_collate_clause
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ ;
+opt_window_frame_exclusion:
+ /* empty */ {$$ = SQL_NEW_RULE;}
+ | window_frame_exclusion
+ ;
+window_frame_clause:
+ window_frame_units window_frame_extent opt_window_frame_exclusion
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ ;
+window_frame_units:
+ SQL_TOKEN_ROWS
+ | SQL_TOKEN_RANGE
+ ;
+window_frame_extent:
+ window_frame_start
+ | window_frame_between
+ ;
+window_frame_start:
+ SQL_TOKEN_UNBOUNDED SQL_TOKEN_PRECEDING
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ | window_frame_preceding
+ | SQL_TOKEN_CURRENT SQL_TOKEN_ROW
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ ;
+window_frame_preceding:
+ unsigned_value_spec SQL_TOKEN_PRECEDING
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ ;
+window_frame_between:
+ SQL_TOKEN_BETWEEN window_frame_bound_1 SQL_TOKEN_AND window_frame_bound_2
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ }
+ ;
+window_frame_bound_1:
+ window_frame_bound
+ ;
+window_frame_bound_2:
+ window_frame_bound
+ ;
+window_frame_bound:
+ window_frame_start
+ | SQL_TOKEN_UNBOUNDED SQL_TOKEN_FOLLOWING
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ | window_frame_following
+ ;
+window_frame_following:
+ unsigned_value_spec SQL_TOKEN_FOLLOWING
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ ;
+window_frame_exclusion:
+ SQL_TOKEN_EXCLUDE SQL_TOKEN_CURRENT SQL_TOKEN_ROW
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ | SQL_TOKEN_EXCLUDE SQL_TOKEN_GROUP
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ | SQL_TOKEN_EXCLUDE SQL_TOKEN_TIES
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ | SQL_TOKEN_EXCLUDE SQL_TOKEN_NO SQL_TOKEN_OTHERS
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ ;
op_parameter:
{$$ = SQL_NEW_RULE;}
| '?' SQL_EQUAL
@@ -2005,11 +2447,16 @@ odbc_fct_spec:
$$->append($1);
$$->append($2);
}
+ | SQL_TOKEN_FN set_fct_spec
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
;
odbc_fct_type:
- SQL_TOKEN_FN
- | SQL_TOKEN_D
+ SQL_TOKEN_D
| SQL_TOKEN_T
| SQL_TOKEN_TS
;
@@ -2315,6 +2762,7 @@ value_exp_primary:
| set_fct_spec
| scalar_subquery
| case_expression
+ | window_function
| '(' value_exp ')'
{
$$ = SQL_NEW_RULE;
diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l
index c6723dfd6869..35a9278a8e49 100644
--- a/connectivity/source/parse/sqlflex.l
+++ b/connectivity/source/parse/sqlflex.l
@@ -212,15 +212,19 @@ END {SQL_NEW_KEYWORD(SQL_TOKEN_END); }
EVERY {SQL_NEW_KEYWORD(SQL_TOKEN_EVERY); }
ESCAPE {SQL_NEW_KEYWORD(SQL_TOKEN_ESCAPE); }
EXCEPT {SQL_NEW_KEYWORD(SQL_TOKEN_EXCEPT); }
+EXCLUDE {SQL_NEW_KEYWORD(SQL_TOKEN_EXCLUDE); }
EXISTS {SQL_NEW_KEYWORD(SQL_TOKEN_EXISTS); }
EXP {SQL_NEW_KEYWORD(SQL_TOKEN_EXP); }
EXTRACT {SQL_NEW_KEYWORD(SQL_TOKEN_EXTRACT); }
FALSE {SQL_NEW_KEYWORD(SQL_TOKEN_FALSE); }
FETCH {SQL_NEW_KEYWORD(SQL_TOKEN_FETCH); }
+FIRST {SQL_NEW_KEYWORD(SQL_TOKEN_FIRST); }
+FIRST_VALUE {SQL_NEW_KEYWORD(SQL_TOKEN_FIRST_VALUE); }
FLOAT {SQL_NEW_KEYWORD(SQL_TOKEN_FLOAT); }
FLOOR {SQL_NEW_KEYWORD(SQL_TOKEN_FLOOR); }
FN {SQL_NEW_KEYWORD(SQL_TOKEN_FN); }
+FOLLOWING {SQL_NEW_KEYWORD(SQL_TOKEN_FOLLOWING); }
FOR {SQL_NEW_KEYWORD(SQL_TOKEN_FOR); }
FOREIGN {SQL_NEW_KEYWORD(SQL_TOKEN_FOREIGN); }
FOUND {SQL_NEW_KEYWORD(SQL_TOKEN_FOUND); }
@@ -234,6 +238,7 @@ GROUP {SQL_NEW_KEYWORD(SQL_TOKEN_GROUP); }
HAVING {SQL_NEW_KEYWORD(SQL_TOKEN_HAVING); }
HOUR {SQL_NEW_KEYWORD(SQL_TOKEN_HOUR); }
+IGNORE {SQL_NEW_KEYWORD(SQL_TOKEN_IGNORE); }
IN {SQL_NEW_KEYWORD(SQL_TOKEN_IN); }
INNER {SQL_NEW_KEYWORD(SQL_TOKEN_INNER); }
INSERT {SQL_NEW_KEYWORD(SQL_TOKEN_INSERT); }
@@ -249,12 +254,17 @@ JOIN {SQL_NEW_KEYWORD(SQL_TOKEN_JOIN); }
KEY {SQL_NEW_KEYWORD(SQL_TOKEN_KEY); }
+LAG {SQL_NEW_KEYWORD(SQL_TOKEN_LAG); }
LARGE {SQL_NEW_KEYWORD(SQL_TOKEN_LARGE); }
+LAST {SQL_NEW_KEYWORD(SQL_TOKEN_LAST); }
+LAST_VALUE {SQL_NEW_KEYWORD(SQL_TOKEN_LAST_VALUE); }
LCASE {SQL_NEW_KEYWORD(SQL_TOKEN_LCASE); }
+LEAD {SQL_NEW_KEYWORD(SQL_TOKEN_LEAD); }
LEADING {SQL_NEW_KEYWORD(SQL_TOKEN_LEADING); }
LEFT {SQL_NEW_KEYWORD(SQL_TOKEN_LEFT); }
LENGTH {SQL_NEW_KEYWORD(SQL_TOKEN_LENGTH); }
LIKE {SQL_NEW_KEYWORD(SQL_TOKEN_LIKE); }
+LIMIT {SQL_NEW_KEYWORD(SQL_TOKEN_LIMIT); }
LN {SQL_NEW_KEYWORD(SQL_TOKEN_LN); }
LOCAL {SQL_NEW_KEYWORD(SQL_TOKEN_LOCAL); }
LOCATE {SQL_NEW_KEYWORD(SQL_TOKEN_LOCATE); }
@@ -276,29 +286,40 @@ NATURAL {SQL_NEW_KEYWORD(SQL_TOKEN_NATURAL); }
NCHAR {SQL_NEW_KEYWORD(SQL_TOKEN_NCHAR); }
NCLOB {SQL_NEW_KEYWORD(SQL_TOKEN_NCLOB); }
NEW {SQL_NEW_KEYWORD(SQL_TOKEN_NEW); }
+NEXT {SQL_NEW_KEYWORD(SQL_TOKEN_NEXT); }
+NO {SQL_NEW_KEYWORD(SQL_TOKEN_NO); }
NOT {SQL_NEW_KEYWORD(SQL_TOKEN_NOT); }
NOW {SQL_NEW_KEYWORD(SQL_TOKEN_NOW); }
+NTH_VALUE {SQL_NEW_KEYWORD(SQL_TOKEN_NTH_VALUE); }
+NTILE {SQL_NEW_KEYWORD(SQL_TOKEN_NTILE); }
NULL {SQL_NEW_KEYWORD(SQL_TOKEN_NULL); }
NULLIF {SQL_NEW_KEYWORD(SQL_TOKEN_NULLIF); }
+NULLS {SQL_NEW_KEYWORD(SQL_TOKEN_NULLS); }
NUMERIC {SQL_NEW_KEYWORD(SQL_TOKEN_NUMERIC); }
OBJECT {SQL_NEW_KEYWORD(SQL_TOKEN_OBJECT); }
OCTET_LENGTH {SQL_NEW_KEYWORD(SQL_TOKEN_OCTET_LENGTH); }
OF {SQL_NEW_KEYWORD(SQL_TOKEN_OF); }
+OFFSET {SQL_NEW_KEYWORD(SQL_TOKEN_OFFSET); }
OJ {SQL_NEW_KEYWORD(SQL_TOKEN_OJ); }
OLD {SQL_NEW_KEYWORD(SQL_TOKEN_OLD); }
ON {SQL_NEW_KEYWORD(SQL_TOKEN_ON); }
+ONLY {SQL_NEW_KEYWORD(SQL_TOKEN_ONLY); }
OPTION {SQL_NEW_KEYWORD(SQL_TOKEN_OPTION); }
OR {SQL_NEW_KEYWORD(SQL_TOKEN_OR); }
ORDER {SQL_NEW_KEYWORD(SQL_TOKEN_ORDER); }
+OTHERS {SQL_NEW_KEYWORD(SQL_TOKEN_OTHERS); }
OUTER {SQL_NEW_KEYWORD(SQL_TOKEN_OUTER); }
+OVER {SQL_NEW_KEYWORD(SQL_TOKEN_OVER); }
+PARTITION {SQL_NEW_KEYWORD(SQL_TOKEN_PARTITION); }
PERCENT_RANK {SQL_NEW_KEYWORD(SQL_TOKEN_PERCENT_RANK); }
PERCENTILE_CONT {SQL_NEW_KEYWORD(SQL_TOKEN_PERCENTILE_CONT); }
PERCENTILE_DISC {SQL_NEW_KEYWORD(SQL_TOKEN_PERCENTILE_DISC); }
PI {SQL_NEW_KEYWORD(SQL_TOKEN_PI); }
POSITION {SQL_NEW_KEYWORD(SQL_TOKEN_POSITION); }
POWER {SQL_NEW_KEYWORD(SQL_TOKEN_POWER); }
+PRECEDING {SQL_NEW_KEYWORD(SQL_TOKEN_PRECEDING); }
PRECISION {SQL_NEW_KEYWORD(SQL_TOKEN_PRECISION); }
PRIMARY {SQL_NEW_KEYWORD(SQL_TOKEN_PRIMARY); }
PRIVILEGES {SQL_NEW_KEYWORD(SQL_TOKEN_PRIVILEGES); }
@@ -309,16 +330,20 @@ QUARTER {SQL_NEW_KEYWORD(SQL_TOKEN_QUARTER); }
RADIANS {SQL_NEW_KEYWORD(SQL_TOKEN_RADIANS); }
RAND {SQL_NEW_KEYWORD(SQL_TOKEN_RAND); }
+RANGE {SQL_NEW_KEYWORD(SQL_TOKEN_RANGE); }
RANK {SQL_NEW_KEYWORD(SQL_TOKEN_RANK); }
REAL {SQL_NEW_KEYWORD(SQL_TOKEN_REAL); }
REFERENCES {SQL_NEW_KEYWORD(SQL_TOKEN_REFERENCES); }
REFERENCING {SQL_NEW_KEYWORD(SQL_TOKEN_REFERENCING); }
REPEAT {SQL_NEW_KEYWORD(SQL_TOKEN_REPEAT); }
REPLACE {SQL_NEW_KEYWORD(SQL_TOKEN_REPLACE); }
+RESPECT {SQL_NEW_KEYWORD(SQL_TOKEN_RESPECT); }
ROLLBACK {SQL_NEW_KEYWORD(SQL_TOKEN_ROLLBACK); }
ROUND {SQL_NEW_KEYWORD(SQL_TOKEN_ROUND); }
ROUNDMAGIC {SQL_NEW_KEYWORD(SQL_TOKEN_ROUNDMAGIC); }
ROW {SQL_NEW_KEYWORD(SQL_TOKEN_ROW); }
+ROWS {SQL_NEW_KEYWORD(SQL_TOKEN_ROWS); }
+ROW_NUMBER {SQL_NEW_KEYWORD(SQL_TOKEN_ROW_NUMBER); }
RIGHT {SQL_NEW_KEYWORD(SQL_TOKEN_RIGHT); }
RTRIM {SQL_NEW_KEYWORD(SQL_TOKEN_RTRIM); }
@@ -345,6 +370,7 @@ SYSTEM_USER {SQL_NEW_KEYWORD(SQL_TOKEN_SYSTEM_USER); }
TABLE {SQL_NEW_KEYWORD(SQL_TOKEN_TABLE); }
TAN {SQL_NEW_KEYWORD(SQL_TOKEN_TAN); }
THEN {SQL_NEW_KEYWORD(SQL_TOKEN_THEN); }
+TIES {SQL_NEW_KEYWORD(SQL_TOKEN_TIES); }
TIME {SQL_NEW_KEYWORD(SQL_TOKEN_TIME); }
TIMESTAMP {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMP); }
TIMESTAMPADD {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMPADD); }
@@ -363,6 +389,7 @@ TS {SQL_NEW_KEYWORD(SQL_TOKEN_TS); }
T {SQL_NEW_KEYWORD(SQL_TOKEN_T); }
UCASE {SQL_NEW_KEYWORD(SQL_TOKEN_UCASE); }
+UNBOUNDED {SQL_NEW_KEYWORD(SQL_TOKEN_UNBOUNDED); }
UNION {SQL_NEW_KEYWORD(SQL_TOKEN_UNION); }
UNIQUE {SQL_NEW_KEYWORD(SQL_TOKEN_UNIQUE); }
UNKNOWN {SQL_NEW_KEYWORD(SQL_TOKEN_UNKNOWN); }
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 34ba49566383..e0ea97f1f7aa 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -1068,9 +1068,9 @@ void OSQLParseTreeIterator::traverseByColumnNames(const OSQLParseNode* pSelectNo
OSQLParseNode * pTableExp = pSelectNode->getChild(3);
OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator:table_exp error in parse tree!");
- OSL_ENSURE(pTableExp->count() == 5,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pTableExp->count() == TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator: error in parse tree!");
- sal_uInt32 nPos = ( _bOrder ? 4 : 2 );
+ sal_uInt32 nPos = ( _bOrder ? ORDER_BY_CHILD_POS : 2 );
OSQLParseNode * pOptByClause = pTableExp->getChild(nPos);
OSL_ENSURE(pOptByClause != NULL,"OSQLParseTreeIterator: error in parse tree!");
@@ -1233,7 +1233,7 @@ bool OSQLParseTreeIterator::traverseSelectionCriteria(const OSQLParseNode* pSele
OSQLParseNode * pTableExp = pSelectNode->getChild(3);
OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator: error in parse tree!");
- OSL_ENSURE(pTableExp->count() == 5,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pTableExp->count() == TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator: error in parse tree!");
pWhereClause = pTableExp->getChild(1);
} else if (SQL_ISRULE(pSelectNode,update_statement_searched)) {
@@ -1451,7 +1451,7 @@ void OSQLParseTreeIterator::traverseANDCriteria(OSQLParseNode * pSearchCondition
}
//-----------------------------------------------------------------------------
void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode
- ,const OSQLParseNode* _pColumnRef
+ ,const OSQLParseNode* _pParentNode
,const ::rtl::OUString& _aColumnName
,const ::rtl::OUString& _aTableRange
,const ::rtl::OUString& _rColumnAlias)
@@ -1490,18 +1490,18 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode
}
// found a parameter
- if ( _pColumnRef && (SQL_ISRULE(_pColumnRef,general_set_fct) || SQL_ISRULE(_pColumnRef,set_fct_spec)) )
+ if ( _pParentNode && (SQL_ISRULE(_pParentNode,general_set_fct) || SQL_ISRULE(_pParentNode,set_fct_spec)) )
{// found a function as column_ref
::rtl::OUString sFunctionName;
- _pColumnRef->getChild(0)->parseNodeToStr( sFunctionName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
- const sal_uInt32 nCount = _pColumnRef->count();
+ _pParentNode->getChild(0)->parseNodeToStr( sFunctionName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
+ const sal_uInt32 nCount = _pParentNode->count();
sal_uInt32 i = 0;
for(; i < nCount;++i)
{
- if ( _pColumnRef->getChild(i) == _pParseNode )
+ if ( _pParentNode->getChild(i) == _pParseNode )
break;
}
- sal_Int32 nType = ::connectivity::OSQLParser::getFunctionParameterType( _pColumnRef->getParent()->getChild(0)->getTokenID(), i+1);
+ sal_Int32 nType = ::connectivity::OSQLParser::getFunctionParameterType( _pParentNode->getChild(0)->getTokenID(), i-1);
OParseColumn* pColumn = new OParseColumn( sParameterName,
::rtl::OUString(),
@@ -1552,14 +1552,14 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode
if ( bNotFound )
{
sal_Int32 nType = DataType::VARCHAR;
- OSQLParseNode* pParent = _pColumnRef ? _pColumnRef->getParent() : NULL;
+ OSQLParseNode* pParent = _pParentNode ? _pParentNode->getParent() : NULL;
if ( pParent && (SQL_ISRULE(pParent,general_set_fct) || SQL_ISRULE(pParent,set_fct_spec)) )
{
- const sal_uInt32 nCount = _pColumnRef->count();
+ const sal_uInt32 nCount = _pParentNode->count();
sal_uInt32 i = 0;
for(; i < nCount;++i)
{
- if ( _pColumnRef->getChild(i) == _pParseNode )
+ if ( _pParentNode->getChild(i) == _pParseNode )
break;
}
nType = ::connectivity::OSQLParser::getFunctionParameterType( pParent->getChild(0)->getTokenID(), i+1);
@@ -1967,7 +1967,7 @@ const OSQLParseNode* OSQLParseTreeIterator::getWhereTree() const
OSQLParseNode * pTableExp = m_pParseTree->getChild(3);
OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator: error in parse tree!");
- OSL_ENSURE(pTableExp->count() == 5,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pTableExp->count() == TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator: error in parse tree!");
pWhereClause = pTableExp->getChild(1);
}
@@ -1997,9 +1997,9 @@ const OSQLParseNode* OSQLParseTreeIterator::getOrderTree() const
OSQLParseNode * pTableExp = m_pParseTree->getChild(3);
OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator: error in parse tree!");
- OSL_ENSURE(pTableExp->count() == 5,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pTableExp->count() == TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator: error in parse tree!");
- pOrderClause = pTableExp->getChild(4);
+ pOrderClause = pTableExp->getChild(ORDER_BY_CHILD_POS);
// Wenn es aber eine order_by ist, dann darf sie nicht leer sein:
if(pOrderClause->count() != 3)
pOrderClause = NULL;
@@ -2019,7 +2019,7 @@ const OSQLParseNode* OSQLParseTreeIterator::getGroupByTree() const
OSQLParseNode * pTableExp = m_pParseTree->getChild(3);
OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator: error in parse tree!");
- OSL_ENSURE(pTableExp->count() == 5,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pTableExp->count() == TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator: error in parse tree!");
pGroupClause = pTableExp->getChild(2);
// Wenn es aber eine order_by ist, dann darf sie nicht leer sein:
@@ -2040,7 +2040,7 @@ const OSQLParseNode* OSQLParseTreeIterator::getHavingTree() const
OSQLParseNode * pTableExp = m_pParseTree->getChild(3);
OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator: error in parse tree!");
- OSL_ENSURE(pTableExp->count() == 5,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pTableExp->count() == TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator: error in parse tree!");
pHavingClause = pTableExp->getChild(3);
// Wenn es aber eine order_by ist, dann darf sie nicht leer sein:
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 8f2b3d69812a..9a3abb0d4fc2 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -2468,7 +2468,7 @@ void OSQLParseNode::parseLeaf(::rtl::OUStringBuffer& rString, const SQLParseNode
if (rString.getLength())
rString.appendAscii(" ");
- const ::rtl::OString sT = OSQLParser::TokenIDToStr(m_nNodeID, &rParam.m_rContext);
+ const ::rtl::OString sT = OSQLParser::TokenIDToStr(m_nNodeID, rParam.bInternational ? &rParam.m_rContext : NULL);
rString.append(::rtl::OUString(sT,sT.getLength(),RTL_TEXTENCODING_UTF8));
} break;
case SQL_NODE_STRING:
diff --git a/desktop/os2/source/applauncher/makefile.mk b/desktop/os2/source/applauncher/makefile.mk
index bf71b57c2fdf..7eec8aee9c23 100644
--- a/desktop/os2/source/applauncher/makefile.mk
+++ b/desktop/os2/source/applauncher/makefile.mk
@@ -47,7 +47,7 @@ OBJFILES= \
$(OBJ)$/sbase.obj \
$(OBJ)$/smath.obj \
$(OBJ)$/officeloader.obj \
- $(OBJ)$/quickstart.obj
+ $(OBJ)$/os2quickstart.obj
APP1TARGET=swriter
APP1NOSAL=TRUE
@@ -106,13 +106,13 @@ APP7OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/officeloader.obj
-APP8TARGET=quickstart
+APP8TARGET=os2quickstart
APP8NOSAL=TRUE
APP8LINKRES=$(MISC)$/$(TARGET)8.res
APP8ICON=$(SOLARRESDIR)$/icons$/ooo-main-app.ico
APP8OBJS = \
$(OBJ)$/launcher.obj\
- $(OBJ)$/quickstart.obj
+ $(OBJ)$/os2quickstart.obj
# --- Targets ------------------------------------------------------
diff --git a/desktop/os2/source/applauncher/quickstart.cxx b/desktop/os2/source/applauncher/os2quickstart.cxx
index 63585434bb50..63585434bb50 100644
--- a/desktop/os2/source/applauncher/quickstart.cxx
+++ b/desktop/os2/source/applauncher/os2quickstart.cxx
diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst
index 146579cab8bc..f1dee0761ccd 100644
--- a/desktop/prj/build.lst
+++ b/desktop/prj/build.lst
@@ -1,4 +1,4 @@
-dt desktop : l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg offuh filter LIBXSLT:libxslt NULL
+dt desktop : L10N:l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg offuh filter LIBXSLT:libxslt NULL
dt desktop usr1 - all dt_mkout NULL
dt desktop\inc nmake - all dt_inc NULL
dt desktop\prj get - all dt_prj NULL
@@ -17,6 +17,9 @@ dt desktop\win32\source\guistdio nmake - w dt_guistdio dt_inc N
dt desktop\win32\source\applauncher nmake - w dt_applauncher dt_inc NULL
dt desktop\win32\source\applauncher\ooo nmake - w dt_applauncher_ooo dt_applauncher.w dt_inc NULL
dt desktop\win32\source\rebase nmake - w dt_rebase dt_inc NULL
+dt desktop\win32\source\QuickStart nmake - w dt_win32_quickstart NULL
+dt desktop\win32\source\QuickStart\so nmake - w dt_win32_quickstart_so dt_win32_quickstart.w NULL
+
dt desktop\os2\source\applauncher nmake - p dt_applauncher dt_inc NULL
dt desktop\unx\source\officeloader nmake - u dt_officeloader_unx dt_inc NULL
dt desktop\source\pagein nmake - u dt_pagein dt_inc NULL
@@ -35,7 +38,7 @@ dt desktop\source\deployment\registry\configuration nmake - all dt_dp_registry_c
dt desktop\source\deployment\registry\help nmake - all dt_dp_registry_help dt_inc NULL
dt desktop\source\deployment\registry\executable nmake - all dt_dp_registry_executable dt_inc NULL
dt desktop\scripts nmake - u dt_scripts dt_inc NULL
-dt desktop\util nmake - all dt_util dt_app dt_pagein.u dt_so_comp dt_spl dt_wrapper.w dt_officeloader.w dt_officeloader_unx.u dt_migr dt_rebase.w NULL
+dt desktop\util nmake - all dt_util dt_app dt_pagein.u dt_so_comp dt_spl dt_wrapper.w dt_officeloader.w dt_officeloader_unx.u dt_migr dt_rebase.w dt_win32_quickstart_so.w NULL
dt desktop\zipintro nmake - all dt_zipintro NULL
dt desktop\registry\data\org\openoffice\Office nmake - all sn_regconfig NULL
dt desktop\source\registration\com\sun\star\servicetag\resources get - all sn_svctagres NULL
diff --git a/desktop/prj/d.lst b/desktop/prj/d.lst
index b6e14a5ce722..be7b77388763 100644
--- a/desktop/prj/d.lst
+++ b/desktop/prj/d.lst
@@ -31,7 +31,7 @@ mkdir: %_DEST%\bin%_EXT%\odf4ms
..\%__SRC%\bin\swriter.exe %_DEST%\bin%_EXT%\swriter.exe
..\%__SRC%\bin\sbase.exe %_DEST%\bin%_EXT%\sbase.exe
..\%__SRC%\bin\sweb.exe %_DEST%\bin%_EXT%\sweb.exe
-..\%__SRC%\bin\quickstart.exe %_DEST%\bin%_EXT%\quickstart.exe
+..\%__SRC%\bin\os2quickstart.exe %_DEST%\bin%_EXT%\quickstart.exe
..\%__SRC%\bin\so\scalc.exe %_DEST%\bin%_EXT%\so\scalc.exe
..\%__SRC%\bin\so\sdraw.exe %_DEST%\bin%_EXT%\so\sdraw.exe
..\%__SRC%\bin\so\simpress.exe %_DEST%\bin%_EXT%\so\simpress.exe
@@ -40,6 +40,11 @@ mkdir: %_DEST%\bin%_EXT%\odf4ms
..\%__SRC%\bin\so\sbase.exe %_DEST%\bin%_EXT%\so\sbase.exe
..\%__SRC%\bin\so\sweb.exe %_DEST%\bin%_EXT%\so\sweb.exe
+..\%__SRC%\bin\quickstart.exe %_DEST%\bin%_EXT%\quickstart.exe
+..\%__SRC%\bin\quickstart.exe %_DEST%\bin%_EXT%\install_quickstart.exe
+..\%__SRC%\bin\soquickstart.exe %_DEST%\bin%_EXT%\so\quickstart.exe
+..\%__SRC%\bin\soquickstart.exe %_DEST%\bin%_EXT%\so\install_quickstart.exe
+
..\%__SRC%\misc\soffice.exe.manifest %_DEST%\bin%_EXT%\soffice.exe.manifest
..\%__SRC%\misc\soffice.bin.manifest %_DEST%\bin%_EXT%\soffice.bin.manifest
..\%__SRC%\bin\wrp*.dll %_DEST%\bin%_EXT%\wrp*.dll
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index a2f602082fe4..033a87cfaea2 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -633,7 +633,9 @@ throw()
else if( TypeToCopy == +1 ) // Folder
{
osl::Directory aDir( srcUnqPath );
- aDir.open();
+ err = aDir.open();
+ if ( err != osl::FileBase::E_None )
+ return err;
err = osl::Directory::create( dstUnqPath );
osl::FileBase::RC next = err;
@@ -1215,7 +1217,7 @@ void Desktop::retrieveCrashReporterState()
{
static const ::rtl::OUString CFG_PACKAGE_RECOVERY = ::rtl::OUString::createFromAscii("org.openoffice.Office.Recovery/");
static const ::rtl::OUString CFG_PATH_CRASHREPORTER = ::rtl::OUString::createFromAscii("CrashReporter" );
- static const ::rtl::OUString CFG_ENTRY_ENABLED = ::rtl::OUString::createFromAscii("Enabled" );
+ static const ::rtl::OUString CFG_ENTRY_ENABLED = ::rtl::OUString::createFromAscii("Enabled" );
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
@@ -1627,7 +1629,8 @@ void Desktop::Main()
// there is no other instance using our data files from a remote host
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main -> Lockfile" );
m_pLockfile = new Lockfile;
- if ( !pCmdLineArgs->IsInvisible() && !pCmdLineArgs->IsNoLockcheck() && !m_pLockfile->check( Lockfile_execWarning )) {
+ if ( !pCmdLineArgs->IsHeadless() && !pCmdLineArgs->IsInvisible() &&
+ !pCmdLineArgs->IsNoLockcheck() && !m_pLockfile->check( Lockfile_execWarning )) {
// Lockfile exists, and user clicked 'no'
return;
}
@@ -1802,7 +1805,7 @@ void Desktop::Main()
if ( !pExecGlobals->bRestartRequested )
{
- if ((!pCmdLineArgs->WantsToLoadDocument() ) &&
+ if ((!pCmdLineArgs->WantsToLoadDocument() && !pCmdLineArgs->IsInvisible() && !pCmdLineArgs->IsHeadless() ) &&
(SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SSTARTMODULE)) &&
(!bExistsRecoveryData ) &&
(!bExistsSessionData ) &&
@@ -2116,9 +2119,9 @@ sal_Bool Desktop::InitializeQuickstartMode( Reference< XMultiServiceFactory >& r
// unfortunately this broke the QUARTZ behavior which is to always run
// in quickstart mode since Mac applications do not usually quit
// when the last document closes
- //#ifndef QUARTZ
+ #ifndef QUARTZ
if ( bQuickstart )
- //#endif
+ #endif
{
Reference < XComponent > xQuickstart( rSMgr->createInstanceWithArguments(
DEFINE_CONST_UNICODE( "com.sun.star.office.Quickstart" ), aSeq ),
@@ -3203,6 +3206,7 @@ void Desktop::OpenSplashScreen()
sal_Bool bVisible = sal_False;
// Show intro only if this is normal start (e.g. no server, no quickstart, no printing )
if ( !pCmdLine->IsInvisible() &&
+ !pCmdLine->IsHeadless() &&
!pCmdLine->IsQuickstart() &&
!pCmdLine->IsMinimized() &&
!pCmdLine->IsNoLogo() &&
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 8bd8a6191201..a8a1025959f1 100755..100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -165,7 +165,7 @@ public:
m_bWarnUser( false )
{}
- Dialog * activeDialog() { return m_pDialogHelper->getWindow(); }
+ Dialog * activeDialog() { return m_pDialogHelper ? m_pDialogHelper->getWindow() : NULL; }
void setTitle( const OUString& rNewTitle ) { m_sTitle = rNewTitle; }
void startProgress();
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 2e2c5e2a2f53..89ab4d0b7199 100644..100755
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -63,6 +63,7 @@
#include "com/sun/star/ucb/UnsupportedCommandException.hpp"
#include "boost/bind.hpp"
#include "tools/urlobj.hxx"
+#include "unotools/tempfile.hxx"
#include "osl/file.hxx"
#include <vector>
@@ -636,21 +637,12 @@ OUString PackageManagerImpl::insertToActivationLayer(
::ucbhelper::Content sourceContent(sourceContent_);
Reference<XCommandEnvironment> xCmdEnv(
sourceContent.getCommandEnvironment() );
- OUString destFolder, tempEntry;
- if (::osl::File::createTempFile(
- m_activePackages_expanded.getLength() == 0
- ? 0 : &m_activePackages_expanded,
- 0, &tempEntry ) != ::osl::File::E_None)
- throw RuntimeException(
- OUSTR("::osl::File::createTempFile() failed!"), 0 );
- if (m_activePackages_expanded.getLength() == 0) {
- destFolder = tempEntry;
- }
- else {
- tempEntry = tempEntry.copy( tempEntry.lastIndexOf( '/' ) + 1 );
- // tweak user|share to macrofied url:
- destFolder = makeURL( m_activePackages, tempEntry );
- }
+
+ String baseDir(m_activePackages_expanded);
+ ::utl::TempFile aTemp(&baseDir, sal_False);
+ OUString tempEntry = aTemp.GetURL();
+ tempEntry = tempEntry.copy(tempEntry.lastIndexOf('/') + 1);
+ OUString destFolder = makeURL( m_activePackages, tempEntry);
destFolder += OUSTR("_");
// prepare activation folder:
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index 650a7585d929..0035b67d8ef7 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -1779,17 +1779,23 @@ void BackendImpl::ComponentsPackageImpl::processPackage_(
if (doRegisterPackage) {
ComponentBackendDb::Data data;
data.javaTypeLibrary = false;
- std::vector< css::uno::Reference< css::uno::XInterface > > factories;
- css::uno::Reference< css::uno::XComponentContext > context(
- that->getObject(url), css::uno::UNO_QUERY);
- if (!context.is()) {
- context.set(
- that->insertObject(
- url,
- raise_uno_process(
- that->getComponentContext(), abortChannel)),
- css::uno::UNO_QUERY_THROW);
+ css::uno::Reference< css::uno::XComponentContext > context;
+ if (startup) {
+ context = that->getComponentContext();
+ } else {
+ context.set(that->getObject(url), css::uno::UNO_QUERY);
+ if (!context.is()) {
+ context.set(
+ that->insertObject(
+ url,
+ raise_uno_process(
+ that->getComponentContext(), abortChannel)),
+ css::uno::UNO_QUERY_THROW);
+ }
}
+
+ std::vector< css::uno::Reference< css::uno::XInterface > > factories;
+
css::uno::Reference< css::registry::XSimpleRegistry > registry(
css::uno::Reference< css::lang::XMultiComponentFactory >(
that->getComponentContext()->getServiceManager(),
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index 266d4406cfde..32413f3d11ba 100755..100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -45,6 +45,7 @@
#include "com/sun/star/beans/StringPair.hpp"
#include "com/sun/star/sdbc/XResultSet.hpp"
#include "com/sun/star/sdbc/XRow.hpp"
+#include "unotools/tempfile.hxx"
using namespace ::dp_misc;
@@ -225,42 +226,43 @@ OUString PackageRegistryBackend::createFolder(
OUString const & relUrl,
Reference<ucb::XCommandEnvironment> const & xCmdEnv)
{
- OUString sDataFolder = makeURL(getCachePath(), relUrl);
+ const OUString sDataFolder = makeURL(getCachePath(), relUrl);
//make sure the folder exist
ucbhelper::Content dataContent;
::dp_misc::create_folder(&dataContent, sDataFolder, xCmdEnv);
- OUString sDataFolderURL = dp_misc::expandUnoRcUrl(sDataFolder);
-
- OUString tempEntry;
- if (::osl::File::createTempFile(
- &sDataFolderURL, 0, &tempEntry ) != ::osl::File::E_None)
- throw RuntimeException(
- OUSTR("::osl::File::createTempFile() failed!"), 0 );
- tempEntry = tempEntry.copy( tempEntry.lastIndexOf( '/' ) + 1 );
- OUString destFolder= makeURL(sDataFolder, tempEntry) + OUSTR("_");
- ::ucbhelper::Content destFolderContent;
- dp_misc::create_folder( &destFolderContent, destFolder, xCmdEnv );
-
- return destFolder;
+ const OUString sDataFolderURL = dp_misc::expandUnoRcUrl(sDataFolder);
+ const String baseDir(sDataFolder);
+ const ::utl::TempFile aTemp(&baseDir, sal_True);
+ const OUString url = aTemp.GetURL();
+ return sDataFolder + url.copy(url.lastIndexOf('/'));
}
+//folderURL can have the extension .tmp or .tmp_
+//Before OOo 3.4 the created a tmp file with osl_createTempFile and
+//then created a Folder with a same name and a trailing '_'
+//If the folderURL has no '_' then there is no corresponding tmp file.
void PackageRegistryBackend::deleteTempFolder(
OUString const & folderUrl)
{
- OSL_ASSERT(folderUrl.getLength()
- && folderUrl[folderUrl.getLength() - 1] == '_');
- if (folderUrl.getLength()
- && folderUrl[folderUrl.getLength() - 1] == '_')
+ if (folderUrl.getLength())
{
- const OUString tempFile = folderUrl.copy(0, folderUrl.getLength() - 1);
erase_path( folderUrl, Reference<XCommandEnvironment>(),
false /* no throw: ignore errors */ );
- erase_path( tempFile, Reference<XCommandEnvironment>(),
- false /* no throw: ignore errors */ );
+
+ if (folderUrl[folderUrl.getLength() - 1] == '_')
+ {
+ const OUString tempFile = folderUrl.copy(0, folderUrl.getLength() - 1);
+ erase_path( tempFile, Reference<XCommandEnvironment>(),
+ false /* no throw: ignore errors */ );
+ }
}
}
+//usedFolders can contain folder names which have the extension .tmp or .tmp_
+//Before OOo 3.4 we created a tmp file with osl_createTempFile and
+//then created a Folder with a same name and a trailing '_'
+//If the folderURL has no '_' then there is no corresponding tmp file.
void PackageRegistryBackend::deleteUnusedFolders(
OUString const & relUrl,
::std::list< OUString> const & usedFolders)
@@ -273,12 +275,14 @@ void PackageRegistryBackend::deleteUnusedFolders(
Reference<sdbc::XResultSet> xResultSet(
tempFolder.createCursor(
Sequence<OUString>( &StrTitle::get(), 1 ),
- ::ucbhelper::INCLUDE_DOCUMENTS_ONLY ) );
+ ::ucbhelper::INCLUDE_FOLDERS_ONLY ) );
// get all temp directories:
::std::vector<OUString> tempEntries;
char tmp[] = ".tmp";
+ //Check for ".tmp_" can be removed after OOo 4.0
+ char tmp_[] = ".tmp_";
while (xResultSet->next())
{
OUString title(
@@ -286,21 +290,18 @@ void PackageRegistryBackend::deleteUnusedFolders(
xResultSet, UNO_QUERY_THROW )->getString(
1 /* Title */ ) );
- if (title.endsWithAsciiL(tmp, sizeof(tmp) - 1))
+ if (title.endsWithAsciiL(tmp, sizeof(tmp) - 1)
+ || title.endsWithAsciiL(tmp_, sizeof(tmp_) - 1))
tempEntries.push_back(
makeURLAppendSysPathSegment(sDataFolder, title));
}
for ( ::std::size_t pos = 0; pos < tempEntries.size(); ++pos )
{
- //usedFolders contains the urls to the folders which have
- //a trailing underscore
- const OUString tempFolderName = tempEntries[ pos ] + OUSTR("_");
-
- if (::std::find( usedFolders.begin(), usedFolders.end(), tempFolderName ) ==
+ if (::std::find( usedFolders.begin(), usedFolders.end(), tempEntries[pos] ) ==
usedFolders.end())
{
- deleteTempFolder(tempFolderName);
+ deleteTempFolder(tempEntries[pos]);
}
}
}
diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx
index 9629855aaf11..44e11efdef0e 100644..100755
--- a/desktop/source/deployment/registry/dp_backenddb.cxx
+++ b/desktop/source/deployment/registry/dp_backenddb.cxx
@@ -91,7 +91,10 @@ css::uno::Reference<css::xml::dom::XDocument> BackendDb::getDocument()
::osl::File::RC err = ::osl::DirectoryItem::get(m_urlDb, item);
if (err == ::osl::File::E_None)
{
- m_doc = xDocBuilder->parseURI(m_urlDb);
+ ::ucbhelper::Content descContent(
+ m_urlDb, css::uno::Reference<css::ucb::XCommandEnvironment>());
+ Reference<css::io::XInputStream> xIn = descContent.openStream();
+ m_doc = xDocBuilder->parse(xIn);
}
else if (err == ::osl::File::E_NOENT)
{
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 314537836921..314537836921 100644..100755
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
diff --git a/desktop/util/ooverinfo.rc b/desktop/util/ooverinfo.rc
index 6d92e2a99500..3ddff6b66b02 100644
--- a/desktop/util/ooverinfo.rc
+++ b/desktop/util/ooverinfo.rc
@@ -112,7 +112,7 @@ VS_VERSION_INFO versioninfo
15 ICON "icons\\oasis-formula.ico"
16 ICON "icons\\oasis-web-template.ico"
17 ICON "icons\\empty-document.ico"
-18 ICON "icons\\ooo-configuration.ico"
+18 ICON "icons\\empty-document.ico"
19 ICON "icons\\ooo3_open.ico"
20 ICON "icons\\empty-document.ico"
21 ICON "icons\\ooo3_writer_app.ico"
diff --git a/desktop/util/ooverinfo2.rc b/desktop/util/ooverinfo2.rc
index 17af6818551e..caacb294122d 100755
--- a/desktop/util/ooverinfo2.rc
+++ b/desktop/util/ooverinfo2.rc
@@ -50,7 +50,7 @@ ICON 14 "icons/oasis-database.ico"
ICON 15 "icons/oasis-formula.ico"
ICON 16 "icons/oasis-web-template.ico"
ICON 17 "icons/empty-document.ico"
-ICON 18 "icons/ooo-configuration.ico"
+ICON 18 "icons/empty-document.ico"
ICON 19 "icons/ooo-open.ico"
ICON 20 "icons/empty-document.ico"
ICON 21 "icons/ooo-writer-app.ico"
diff --git a/desktop/util/verinfo.rc b/desktop/util/verinfo.rc
index 7d589956ec83..5a2b03769963 100755..100644
--- a/desktop/util/verinfo.rc
+++ b/desktop/util/verinfo.rc
@@ -117,8 +117,8 @@ VS_VERSION_INFO versioninfo
15 ICON "icons\\oasis-formula.ico"
16 ICON "icons\\oasis-web-template.ico"
17 ICON "icons\\empty-document.ico"
-18 ICON "icons\\so8-configuration.ico"
-19 ICON "icons\\so9_open.ico"
+18 ICON "icons\\empty-document.ico"
+19 ICON "icons\\so9_main_app.ico"
20 ICON "icons\\empty-document.ico"
21 ICON "icons\\so9_writer_app.ico"
22 ICON "icons\\so9_calc_app.ico"
diff --git a/sysui/source/win32/QuickStart/OOQuickStart.rc b/desktop/win32/source/QuickStart/OOQuickStart.rc
index 0dc4dab256b6..9baf7e864f5f 100644
--- a/sysui/source/win32/QuickStart/OOQuickStart.rc
+++ b/desktop/win32/source/QuickStart/OOQuickStart.rc
@@ -31,10 +31,10 @@ LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-ICON_ACTIVE ICON DISCARDABLE "../../desktop/icons/ooo3_main_app.ico"
-IDI_QUICKSTART ICON DISCARDABLE "../../desktop/icons/ooo3_main_app.ico"
-IDI_SMALL ICON DISCARDABLE "../../desktop/icons/ooo3_main_app.ico"
-ICON_INACTIVE ICON DISCARDABLE "../../desktop/icons/ooo3_main_app.ico"
+ICON_ACTIVE ICON DISCARDABLE "icons/ooo3_main_app.ico"
+IDI_QUICKSTART ICON DISCARDABLE "icons/ooo3_main_app.ico"
+IDI_SMALL ICON DISCARDABLE "icons/ooo3_main_app.ico"
+ICON_INACTIVE ICON DISCARDABLE "icons/ooo3_main_app.ico"
/////////////////////////////////////////////////////////////////////////////
diff --git a/sysui/source/win32/QuickStart/QuickStart.cpp b/desktop/win32/source/QuickStart/QuickStart.cpp
index 3467e35524f8..3467e35524f8 100644
--- a/sysui/source/win32/QuickStart/QuickStart.cpp
+++ b/desktop/win32/source/QuickStart/QuickStart.cpp
diff --git a/sysui/source/win32/QuickStart/QuickStart.h b/desktop/win32/source/QuickStart/QuickStart.h
index d0afd98ec430..d0afd98ec430 100644
--- a/sysui/source/win32/QuickStart/QuickStart.h
+++ b/desktop/win32/source/QuickStart/QuickStart.h
diff --git a/sysui/source/win32/QuickStart/StdAfx.h b/desktop/win32/source/QuickStart/StdAfx.h
index a4bdd66f630c..a4bdd66f630c 100644
--- a/sysui/source/win32/QuickStart/StdAfx.h
+++ b/desktop/win32/source/QuickStart/StdAfx.h
diff --git a/sysui/source/win32/QuickStart/makefile.mk b/desktop/win32/source/QuickStart/makefile.mk
index 41242d849dfb..41242d849dfb 100644
--- a/sysui/source/win32/QuickStart/makefile.mk
+++ b/desktop/win32/source/QuickStart/makefile.mk
diff --git a/sysui/source/win32/QuickStart/resource.h b/desktop/win32/source/QuickStart/resource.h
index d34beb00c5c9..d34beb00c5c9 100644
--- a/sysui/source/win32/QuickStart/resource.h
+++ b/desktop/win32/source/QuickStart/resource.h
diff --git a/sysui/source/win32/QuickStart/so/QuickStart.rc b/desktop/win32/source/QuickStart/so/QuickStart.rc
index c48dc2358d0d..732904dc745a 100644
--- a/sysui/source/win32/QuickStart/so/QuickStart.rc
+++ b/desktop/win32/source/QuickStart/so/QuickStart.rc
@@ -31,10 +31,10 @@ LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-ICON_ACTIVE ICON DISCARDABLE "../../../desktop/icons/so9_main_app.ico"
-IDI_QUICKSTART ICON DISCARDABLE "../../../desktop/icons/so9_main_app.ico"
-IDI_SMALL ICON DISCARDABLE "../../../desktop/icons/so9_main_app.ico"
-ICON_INACTIVE ICON DISCARDABLE "../../../desktop/icons/so9_main_app.ico"
+ICON_ACTIVE ICON DISCARDABLE "icons/so9_main_app.ico"
+IDI_QUICKSTART ICON DISCARDABLE "icons/so9_main_app.ico"
+IDI_SMALL ICON DISCARDABLE "icons/so9_main_app.ico"
+ICON_INACTIVE ICON DISCARDABLE "icons/so9_main_app.ico"
/////////////////////////////////////////////////////////////////////////////
diff --git a/sysui/source/win32/QuickStart/so/makefile.mk b/desktop/win32/source/QuickStart/so/makefile.mk
index 6c7897232576..50154c7d50b2 100644
--- a/sysui/source/win32/QuickStart/so/makefile.mk
+++ b/desktop/win32/source/QuickStart/so/makefile.mk
@@ -41,6 +41,8 @@ UWINAPILIB =
# --- Resources ----------------------------------------------------
+.IF "$(LINK_SO)"=="TRUE"
+
RCFILES=QuickStart.rc
INCPRE=..
@@ -68,6 +70,8 @@ APP1STDLIBS+=$(SHELL32LIB)\
APP1NOSVRES=$(RES)$/$(TARGET).res
+.ENDIF # "$(LINK_SO)"=="TRUE"
+
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
diff --git a/desktop/win32/source/applauncher/makefile.mk b/desktop/win32/source/applauncher/makefile.mk
index f0f5743f38a1..d08309bbed24 100644
--- a/desktop/win32/source/applauncher/makefile.mk
+++ b/desktop/win32/source/applauncher/makefile.mk
@@ -53,6 +53,7 @@ OBJFILES= \
$(OBJ)$/sweb.obj
# SO launcher
+.IF "$(LINK_SO)"=="TRUE"
.IF "$(BUILD_SPECIAL)"!=""
APP1DEPN= $(APP1RES) verinfo.rc
APP1TARGET=so$/swriter
@@ -139,7 +140,8 @@ APP7VERINFO=verinfo.rc
APP7PRODUCTDEF+=-DRES_APP_NAME=sweb
-.ENDIF # "$(BUILD_SPECIAL)"!=""
+.ENDIF # "$(BUILD_SPECIAL)"!=""
+.ENDIF # "$(LINK_SO)"=="TRUE"
# --- Targets ------------------------------------------------------
diff --git a/desktop/win32/source/guiloader/makefile.mk b/desktop/win32/source/guiloader/makefile.mk
index 5bb1c523ff19..7912471fba13 100644
--- a/desktop/win32/source/guiloader/makefile.mk
+++ b/desktop/win32/source/guiloader/makefile.mk
@@ -48,14 +48,16 @@ APP1OBJS=\
$(SOLARLIBDIR)$/pathutils-obj.obj
STDLIB1=$(SHLWAPILIB)
+.IF "$(LINK_SO)"=="TRUE"
APP2TARGET=so$/guiloader
APP2NOSAL=TRUE
-APP2ICON=$(SOLARRESDIR)$/icons/so8-main-app.ico
+APP2ICON=$(SOLARRESDIR)$/icons/so9_main_app.ico
APP2OBJS=\
$(OBJ)$/extendloaderenvironment.obj \
$(OBJ)$/genericloader.obj \
$(SOLARLIBDIR)$/pathutils-obj.obj
STDLIB2=$(SHLWAPILIB)
+.ENDIF # "$(LINK_SO)"=="TRUE"
# --- Targets ------------------------------------------------------
diff --git a/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx
index 6dffd80b332e..da7aedc6f983 100644
--- a/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx
+++ b/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx
@@ -65,6 +65,7 @@ namespace drawinglayer
bool bSymbol = false,
bool bVertical = false,
bool bItalic = false,
+ bool bMonospaced = false,
bool bOutline = false,
bool bRTL = false,
bool bBiDiStrong = false);
@@ -89,6 +90,7 @@ namespace drawinglayer
bool getOutline() const;
bool getRTL() const;
bool getBiDiStrong() const;
+ bool getMonospaced() const;
};
} // end of namespace attribute
} // end of namespace drawinglayer
diff --git a/drawinglayer/source/attribute/fontattribute.cxx b/drawinglayer/source/attribute/fontattribute.cxx
index 7d10d3a37384..d4246376d9ca 100644
--- a/drawinglayer/source/attribute/fontattribute.cxx
+++ b/drawinglayer/source/attribute/fontattribute.cxx
@@ -55,6 +55,7 @@ namespace drawinglayer
unsigned mbOutline : 1; // Outline Flag
unsigned mbRTL : 1; // RTL Flag
unsigned mbBiDiStrong : 1; // BiDi Flag
+ unsigned mbMonospaced : 1;
ImpFontAttribute(
const String& rFamilyName,
@@ -63,6 +64,7 @@ namespace drawinglayer
bool bSymbol,
bool bVertical,
bool bItalic,
+ bool bMonospaced,
bool bOutline,
bool bRTL,
bool bBiDiStrong)
@@ -75,7 +77,8 @@ namespace drawinglayer
mbItalic(bItalic),
mbOutline(bOutline),
mbRTL(bRTL),
- mbBiDiStrong(bBiDiStrong)
+ mbBiDiStrong(bBiDiStrong),
+ mbMonospaced(bMonospaced)
{
}
@@ -89,6 +92,7 @@ namespace drawinglayer
bool getOutline() const { return mbOutline; }
bool getRTL() const { return mbRTL; }
bool getBiDiStrong() const { return mbBiDiStrong; }
+ bool getMonospaced() const { return mbMonospaced; }
bool operator==(const ImpFontAttribute& rCompare) const
{
@@ -100,7 +104,8 @@ namespace drawinglayer
&& getItalic() == rCompare.getItalic()
&& getOutline() == rCompare.getOutline()
&& getRTL() == rCompare.getRTL()
- && getBiDiStrong() == rCompare.getBiDiStrong());
+ && getBiDiStrong() == rCompare.getBiDiStrong()
+ && getMonospaced() == rCompare.getMonospaced());
}
static ImpFontAttribute* get_global_default()
@@ -112,7 +117,7 @@ namespace drawinglayer
pDefault = new ImpFontAttribute(
String(), String(),
0,
- false, false, false, false, false, false);
+ false, false, false, false, false, false, false);
// never delete; start with RefCount 1, not 0
pDefault->mnRefCount++;
@@ -129,11 +134,12 @@ namespace drawinglayer
bool bSymbol,
bool bVertical,
bool bItalic,
+ bool bMonospaced,
bool bOutline,
bool bRTL,
bool bBiDiStrong)
: mpFontAttribute(new ImpFontAttribute(
- rFamilyName, rStyleName, nWeight, bSymbol, bVertical, bItalic, bOutline, bRTL, bBiDiStrong))
+ rFamilyName, rStyleName, nWeight, bSymbol, bVertical, bItalic, bMonospaced, bOutline, bRTL, bBiDiStrong))
{
}
@@ -246,6 +252,12 @@ namespace drawinglayer
return mpFontAttribute->getBiDiStrong();
}
+ bool FontAttribute::getMonospaced() const
+ {
+ return mpFontAttribute->getMonospaced();
+ }
+
+
} // end of namespace attribute
} // end of namespace drawinglayer
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index c9774bea3f34..9aafd195a707 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -406,6 +406,7 @@ namespace drawinglayer
aRetval.SetWeight(static_cast<FontWeight>(rFontAttribute.getWeight()));
aRetval.SetItalic(rFontAttribute.getItalic() ? ITALIC_NORMAL : ITALIC_NONE);
aRetval.SetOutline(rFontAttribute.getOutline());
+ aRetval.SetPitch(rFontAttribute.getMonospaced() ? PITCH_FIXED : PITCH_VARIABLE);
aRetval.SetLanguage(MsLangId::convertLocaleToLanguage(rLocale));
#ifdef WIN32
@@ -445,6 +446,7 @@ namespace drawinglayer
RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet(),
rFont.IsVertical(),
ITALIC_NONE != rFont.GetItalic(),
+ PITCH_FIXED == rFont.GetPitch(),
rFont.IsOutline(),
bRTL,
bBiDiStrong);
diff --git a/drawinglayer/source/processor2d/canvasprocessor.cxx b/drawinglayer/source/processor2d/canvasprocessor.cxx
index e20f1a417dcc..23661fe3747b 100644
--- a/drawinglayer/source/processor2d/canvasprocessor.cxx
+++ b/drawinglayer/source/processor2d/canvasprocessor.cxx
@@ -57,6 +57,7 @@
#include <basegfx/tuple/b2i64tuple.hxx>
#include <basegfx/range/b2irange.hxx>
#include <com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp>
+#include <com/sun/star/rendering/PanoseProportion.hpp>
#include <com/sun/star/rendering/CompositeOperation.hpp>
#include <com/sun/star/rendering/StrokeAttributes.hpp>
#include <com/sun/star/rendering/PathJoinType.hpp>
@@ -1517,6 +1518,10 @@ namespace drawinglayer
aFontRequest.FontDescription.IsVertical = rFontAttr.getVertical() ? util::TriState_YES : util::TriState_NO;
// TODO(F2): improve vclenum->panose conversion
aFontRequest.FontDescription.FontDescription.Weight = static_cast< sal_uInt8 >(rFontAttr.getWeight());
+ aFontRequest.FontDescription.FontDescription.Proportion =
+ rFontAttr.getMonospaced()
+ ? rendering::PanoseProportion::MONO_SPACED
+ : rendering::PanoseProportion::ANYTHING;
aFontRequest.FontDescription.FontDescription.Letterform = rFontAttr.getItalic() ? 9 : 0;
// init CellSize to 1.0, else a default font height will be used
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index b845ed189aad..c8899514d5a3 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -865,7 +865,7 @@ namespace drawinglayer
// I have now moved describePDFControl to toolkit, thus i can implement the PDF
// form control support now as follows
::std::auto_ptr< ::vcl::PDFWriter::AnyWidget > pPDFControl;
- ::toolkitform::describePDFControl(rXControl, pPDFControl);
+ ::toolkitform::describePDFControl( rXControl, pPDFControl, *mpPDFExtOutDevData );
if(pPDFControl.get())
{
diff --git a/editeng/inc/editeng/editrids.hrc b/editeng/inc/editeng/editrids.hrc
index dcef661d01b8..209d284a7fde 100644
--- a/editeng/inc/editeng/editrids.hrc
+++ b/editeng/inc/editeng/editrids.hrc
@@ -240,45 +240,6 @@
#define RID_SVXITEMS_WEIGHT_ULTRABOLD (RID_EDIT_START + 167)
#define RID_SVXITEMS_WEIGHT_BLACK (RID_EDIT_START + 168)
-// paper formats
-#define RID_SVXSTR_PAPER_A0 (RID_SVX_START + 169)
-#define RID_SVXSTR_PAPER_A1 (RID_SVX_START + 170)
-#define RID_SVXSTR_PAPER_A2 (RID_SVX_START + 171)
-#define RID_SVXSTR_PAPER_A3 (RID_SVX_START + 172)
-#define RID_SVXSTR_PAPER_A4 (RID_SVX_START + 173)
-#define RID_SVXSTR_PAPER_A5 (RID_SVX_START + 174)
-#define RID_SVXSTR_PAPER_B4_ISO (RID_SVX_START + 175)
-#define RID_SVXSTR_PAPER_B5_ISO (RID_SVX_START + 176)
-#define RID_SVXSTR_PAPER_LETTER (RID_SVX_START + 177)
-#define RID_SVXSTR_PAPER_LEGAL (RID_SVX_START + 178)
-#define RID_SVXSTR_PAPER_TABLOID (RID_SVX_START + 179)
-#define RID_SVXSTR_PAPER_USER (RID_SVX_START + 180)
-#define RID_SVXSTR_PAPER_B6_ISO (RID_SVX_START + 181)
-#define RID_SVXSTR_PAPER_C4 (RID_SVX_START + 182)
-#define RID_SVXSTR_PAPER_C5 (RID_SVX_START + 183)
-#define RID_SVXSTR_PAPER_C6 (RID_SVX_START + 184)
-#define RID_SVXSTR_PAPER_C65 (RID_SVX_START + 185)
-#define RID_SVXSTR_PAPER_DL (RID_SVX_START + 186)
-#define RID_SVXSTR_PAPER_DIA (RID_SVX_START + 187)
-#define RID_SVXSTR_PAPER_SCREEN (RID_SVX_START + 188)
-#define RID_SVXSTR_PAPER_C (RID_SVX_START + 189)
-#define RID_SVXSTR_PAPER_D (RID_SVX_START + 190)
-#define RID_SVXSTR_PAPER_E (RID_SVX_START + 191)
-#define RID_SVXSTR_PAPER_EXECUTIVE (RID_SVX_START + 192)
-#define RID_SVXSTR_PAPER_LEGAL2 (RID_SVX_START + 193)
-#define RID_SVXSTR_PAPER_MONARCH (RID_SVX_START + 194)
-#define RID_SVXSTR_PAPER_COM675 (RID_SVX_START + 195)
-#define RID_SVXSTR_PAPER_COM9 (RID_SVX_START + 196)
-#define RID_SVXSTR_PAPER_COM10 (RID_SVX_START + 197)
-#define RID_SVXSTR_PAPER_COM11 (RID_SVX_START + 198)
-#define RID_SVXSTR_PAPER_COM12 (RID_SVX_START + 199)
-#define RID_SVXSTR_PAPER_KAI16 (RID_SVX_START + 200)
-#define RID_SVXSTR_PAPER_KAI32 (RID_SVX_START + 201)
-#define RID_SVXSTR_PAPER_KAI32BIG (RID_SVX_START + 202)
-#define RID_SVXSTR_PAPER_B4_JIS (RID_SVX_START + 203)
-#define RID_SVXSTR_PAPER_B5_JIS (RID_SVX_START + 204)
-#define RID_SVXSTR_PAPER_B6_JIS (RID_SVX_START + 205)
-
// enum FontItalic -------------------------------------------------------
#define RID_SVXITEMS_ITALIC_BEGIN (RID_EDIT_START + 206)
#define RID_SVXITEMS_ITALIC_NONE (RID_EDIT_START + 206)
diff --git a/editeng/inc/editeng/fontitem.hxx b/editeng/inc/editeng/fontitem.hxx
index 4ec96052769c..c64c8d99d9e4 100644..100755
--- a/editeng/inc/editeng/fontitem.hxx
+++ b/editeng/inc/editeng/fontitem.hxx
@@ -81,30 +81,23 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
// ZugriffsMethoden:
- inline String &GetFamilyName() { return aFamilyName; }
+ void SetFamilyName( const String& rFamilyName ) { aFamilyName = rFamilyName; }
inline const String &GetFamilyName() const { return aFamilyName; }
- inline String &GetStyleName() { return aStyleName; }
+ void SetStyleName(const String &rStyleName ) { aStyleName = rStyleName; }
inline const String &GetStyleName() const { return aStyleName; }
- inline FontFamily &GetFamily() { return eFamily; }
+ void SetFamily( FontFamily _eFamily ) { eFamily = _eFamily; }
inline FontFamily GetFamily() const { return eFamily; }
- inline FontPitch &GetPitch() { return ePitch; }
+ void SetPitch(FontPitch _ePitch ) { ePitch = _ePitch; }
inline FontPitch GetPitch() const { return ePitch; }
- inline rtl_TextEncoding &GetCharSet() { return eTextEncoding; }
+ void SetCharSet(rtl_TextEncoding _eEncoding) { eTextEncoding = _eEncoding; }
+
inline rtl_TextEncoding GetCharSet() const { return eTextEncoding; }
- inline SvxFontItem& operator=(const SvxFontItem& rFont)
- {
- aFamilyName = rFont.GetFamilyName();
- aStyleName = rFont.GetStyleName();
- eFamily = rFont.GetFamily();
- ePitch = rFont.GetPitch();
- eTextEncoding = rFont.GetCharSet();
- return *this;
- }
+ SvxFontItem& operator=(const SvxFontItem& rFont);
static void EnableStoreUnicodeNames( sal_Bool bEnable );
diff --git a/editeng/inc/editeng/splwrap.hxx b/editeng/inc/editeng/splwrap.hxx
index 5e46a96adb9f..5e46a96adb9f 100755..100644
--- a/editeng/inc/editeng/splwrap.hxx
+++ b/editeng/inc/editeng/splwrap.hxx
diff --git a/editeng/inc/editeng/svxacorr.hxx b/editeng/inc/editeng/svxacorr.hxx
index f355a669a304..73dc7664562e 100644..100755
--- a/editeng/inc/editeng/svxacorr.hxx
+++ b/editeng/inc/editeng/svxacorr.hxx
@@ -79,6 +79,7 @@ public:
virtual sal_Bool Delete( xub_StrLen nStt, xub_StrLen nEnd ) = 0;
virtual sal_Bool Insert( xub_StrLen nPos, const String& rTxt ) = 0;
virtual sal_Bool Replace( xub_StrLen nPos, const String& rTxt ) = 0;
+ virtual sal_Bool ReplaceRange( xub_StrLen nPos, xub_StrLen nLen, const String& rTxt ) = 0;
virtual sal_Bool SetAttr( xub_StrLen nStt, xub_StrLen nEnd, sal_uInt16 nSlotId,
SfxPoolItem& ) = 0;
diff --git a/editeng/prj/build.lst b/editeng/prj/build.lst
index 3c714c6dac25..bba7f2666744 100644
--- a/editeng/prj/build.lst
+++ b/editeng/prj/build.lst
@@ -1,3 +1,3 @@
-ed editeng : l10n svtools xmloff linguistic NULL
+ed editeng : L10N:l10n svtools xmloff linguistic NULL
ed editeng\prj nmake - all ed_prj NULL
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index cda87dea9f7d..cb042b721c4d 100644..100755
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -1472,7 +1472,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream )
if ( hConv )
{
SvxFontItem aNewFontItem( rFontItem );
- aNewFontItem.GetFamilyName() = GetFontToSubsFontName( hConv );
+ aNewFontItem.SetFamilyName( GetFontToSubsFontName( hConv ) );
pC->GetAttribs().Remove( nAttr );
XEditAttribute* pNewAttr = CreateAttrib( aNewFontItem, pAttr->GetStart(), pAttr->GetEnd() );
@@ -1503,7 +1503,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream )
if ( hConv )
{
SvxFontItem aNewFontItem( rFontItem );
- aNewFontItem.GetFamilyName() = GetFontToSubsFontName( hConv );
+ aNewFontItem.SetFamilyName( GetFontToSubsFontName( hConv ) );
pC->GetParaAttribs().Put( aNewFontItem );
for ( sal_uInt16 nChar = 0; nChar < pC->GetText().Len(); nChar++ )
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx
index afc329040e29..5fc43f461cac 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -583,8 +583,13 @@ sal_Bool EdtAutoCorrDoc::Insert( sal_uInt16 nPos, const String& rTxt )
sal_Bool EdtAutoCorrDoc::Replace( sal_uInt16 nPos, const String& rTxt )
{
+ return ReplaceRange( nPos, rTxt.Len(), rTxt );
+}
+
+sal_Bool EdtAutoCorrDoc::ReplaceRange( xub_StrLen nPos, xub_StrLen nSourceLength, const String& rTxt )
+{
// Eigentlich ein Replace einfuehren => Entspr. UNDO
- sal_uInt16 nEnd = nPos+rTxt.Len();
+ sal_uInt16 nEnd = nPos+nSourceLength;
if ( nEnd > pCurNode->Len() )
nEnd = pCurNode->Len();
diff --git a/editeng/source/editeng/edtspell.hxx b/editeng/source/editeng/edtspell.hxx
index 3ed82ac367f1..49978cdd310d 100644..100755
--- a/editeng/source/editeng/edtspell.hxx
+++ b/editeng/source/editeng/edtspell.hxx
@@ -158,6 +158,7 @@ public:
virtual sal_Bool Delete( sal_uInt16 nStt, sal_uInt16 nEnd );
virtual sal_Bool Insert( sal_uInt16 nPos, const String& rTxt );
virtual sal_Bool Replace( sal_uInt16 nPos, const String& rTxt );
+ virtual sal_Bool ReplaceRange( xub_StrLen nPos, xub_StrLen nLen, const String& rTxt );
virtual sal_Bool SetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, sal_uInt16 nSlotId, SfxPoolItem& );
virtual sal_Bool SetINetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, const String& rURL );
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index f2a94c2dd1a6..352ff91d2e9e 100755
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -2756,7 +2756,10 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
// get word boundaries in order to clear possible WrongList entries
// and invalidate all the necessary text (everything after and including the
// start of the word)
- EditSelection aCurWord( SelectWord( aCurPaM, i18n::WordType::DICTIONARY_WORD ) );
+ // #i107201# do the expensive SelectWord call only if online spelling is active
+ EditSelection aCurWord;
+ if ( GetStatus().DoOnlineSpelling() )
+ aCurWord = SelectWord( aCurPaM, i18n::WordType::DICTIONARY_WORD );
XubString aText( rStr );
aText.ConvertLineEnd( LINEEND_LF );
@@ -2813,12 +2816,17 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
DBG_ASSERT( pPortion, "Blinde Portion in InsertText" );
- // now remove the Wrongs (red spell check marks) from both words...
- WrongList *pWrongs = aCurPaM.GetNode()->GetWrongList();
- if (pWrongs && pWrongs->HasWrongs())
- pWrongs->ClearWrongs( aCurWord.Min().GetIndex(), aPaM.GetIndex(), aPaM.GetNode() );
- // ... and mark both words as 'to be checked again'
- pPortion->MarkInvalid( aCurWord.Min().GetIndex(), aLine.Len() );
+ if ( GetStatus().DoOnlineSpelling() )
+ {
+ // now remove the Wrongs (red spell check marks) from both words...
+ WrongList *pWrongs = aCurPaM.GetNode()->GetWrongList();
+ if (pWrongs && pWrongs->HasWrongs())
+ pWrongs->ClearWrongs( aCurWord.Min().GetIndex(), aPaM.GetIndex(), aPaM.GetNode() );
+ // ... and mark both words as 'to be checked again'
+ pPortion->MarkInvalid( aCurWord.Min().GetIndex(), aLine.Len() );
+ }
+ else
+ pPortion->MarkInvalid( aCurPaM.GetIndex(), aLine.Len() );
}
if ( nEnd < aText.Len() )
aPaM = ImpInsertParaBreak( aPaM );
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 4b4b5e4514a8..71caa4f176fa 100755
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1682,11 +1682,11 @@ void ImpEditEngine::SetLanguageAndFont(
{
// set new font attribute
SvxFontItem aFontItem = (SvxFontItem&) aNewSet.Get( nFontWhichId );
- aFontItem.GetFamilyName() = pFont->GetName();
- aFontItem.GetFamily() = pFont->GetFamily();
- aFontItem.GetStyleName() = pFont->GetStyleName();
- aFontItem.GetPitch() = pFont->GetPitch();
- aFontItem.GetCharSet() = pFont->GetCharSet();
+ aFontItem.SetFamilyName( pFont->GetName());
+ aFontItem.SetFamily( pFont->GetFamily());
+ aFontItem.SetStyleName( pFont->GetStyleName());
+ aFontItem.SetPitch( pFont->GetPitch());
+ aFontItem.SetCharSet( pFont->GetCharSet() );
aNewSet.Put( aFontItem );
}
diff --git a/editeng/source/editeng/textconv.cxx b/editeng/source/editeng/textconv.cxx
index b92284eb60bf..d2dc1c8a846d 100644..100755
--- a/editeng/source/editeng/textconv.cxx
+++ b/editeng/source/editeng/textconv.cxx
@@ -302,11 +302,11 @@ void TextConvWrapper::SetLanguageAndFont( const ESelection &rESel,
{
// set new font attribute
SvxFontItem aFontItem = (SvxFontItem&) aNewSet.Get( nFontWhichId );
- aFontItem.GetFamilyName() = pFont->GetName();
- aFontItem.GetFamily() = pFont->GetFamily();
- aFontItem.GetStyleName() = pFont->GetStyleName();
- aFontItem.GetPitch() = pFont->GetPitch();
- aFontItem.GetCharSet() = pFont->GetCharSet();
+ aFontItem.SetFamilyName( pFont->GetName());
+ aFontItem.SetFamily( pFont->GetFamily());
+ aFontItem.SetStyleName( pFont->GetStyleName());
+ aFontItem.SetPitch( pFont->GetPitch());
+ aFontItem.SetCharSet(pFont->GetCharSet());
aNewSet.Put( aFontItem );
}
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 8c0e533a40f4..5f2dc3a2d803 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -406,6 +406,8 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
---------------------------------------------------------------------------*/
SvxNumberFormat& SvxNumberFormat::operator=( const SvxNumberFormat& rFormat )
{
+ if (& rFormat == this) { return *this; }
+
SetNumberingType(rFormat.GetNumberingType());
eNumAdjust = rFormat.eNumAdjust ;
nInclUpperLevels = rFormat.nInclUpperLevels ;
diff --git a/editeng/source/items/page.src b/editeng/source/items/page.src
index 9fe7f3013ce6..c528dc8b0bd0 100644
--- a/editeng/source/items/page.src
+++ b/editeng/source/items/page.src
@@ -29,154 +29,6 @@
#include <editeng/editrids.hrc>
-String RID_SVXSTR_PAPER_A0
-{
- Text = "A0" ;
-};
-String RID_SVXSTR_PAPER_A1
-{
- Text = "A1" ;
-};
-String RID_SVXSTR_PAPER_A2
-{
- Text = "A2" ;
-};
-String RID_SVXSTR_PAPER_A3
-{
- Text = "A3" ;
-};
-String RID_SVXSTR_PAPER_A4
-{
- Text = "A4" ;
-};
-String RID_SVXSTR_PAPER_A5
-{
- Text = "A5" ;
-};
-String RID_SVXSTR_PAPER_B4_ISO
-{
- Text = "B4 (ISO)" ;
-};
-String RID_SVXSTR_PAPER_B5_ISO
-{
- Text = "B5 (ISO)" ;
-};
-String RID_SVXSTR_PAPER_LETTER
-{
- Text = "Letter" ;
-};
-String RID_SVXSTR_PAPER_LEGAL
-{
- Text = "Legal" ;
-};
-String RID_SVXSTR_PAPER_TABLOID
-{
- Text = "Tabloid" ;
-};
-String RID_SVXSTR_PAPER_USER
-{
- Text [ en-US ] = "User Defined" ;
-};
-String RID_SVXSTR_PAPER_B6_ISO
-{
- Text = "B6 (ISO)" ;
-};
-String RID_SVXSTR_PAPER_C4
-{
- Text = "C4 Envelope" ;
-};
-String RID_SVXSTR_PAPER_C5
-{
- Text = "C5 Envelope" ;
-};
-String RID_SVXSTR_PAPER_C6
-{
- Text = "C6 Envelope" ;
-};
-String RID_SVXSTR_PAPER_C65
-{
- Text = "C6/5 Envelope" ;
-};
-String RID_SVXSTR_PAPER_DL
-{
- Text = "DL Envelope" ;
-};
-String RID_SVXSTR_PAPER_DIA
-{
- Text = "Dia Slide" ;
-};
-String RID_SVXSTR_PAPER_SCREEN
-{
- Text [ en-US ] = "Screen" ;
-};
-String RID_SVXSTR_PAPER_C
-{
- Text = "C" ;
-};
-String RID_SVXSTR_PAPER_D
-{
- Text = "D" ;
-};
-String RID_SVXSTR_PAPER_E
-{
- Text = "E" ;
-};
-String RID_SVXSTR_PAPER_EXECUTIVE
-{
- Text = "Executive" ;
-};
-String RID_SVXSTR_PAPER_LEGAL2
-{
- Text = "Long Bond" ;
-};
-String RID_SVXSTR_PAPER_MONARCH
-{
- Text = "#8 (Monarch) Envelope" ;
-};
-String RID_SVXSTR_PAPER_COM675
-{
- Text = "#6 3/4 (Personal) Envelope" ;
-};
-String RID_SVXSTR_PAPER_COM9
-{
- Text = "#9 Envelope" ;
-};
-String RID_SVXSTR_PAPER_COM10
-{
- Text = "#10 Envelope" ;
-};
-String RID_SVXSTR_PAPER_COM11
-{
- Text = "#11 Envelope" ;
-};
-String RID_SVXSTR_PAPER_COM12
-{
- Text = "#12 Envelope" ;
-};
-String RID_SVXSTR_PAPER_KAI16
-{
- Text = "16 Kai" ;
-};
-String RID_SVXSTR_PAPER_KAI32
-{
- Text = "32 Kai" ;
-};
-String RID_SVXSTR_PAPER_KAI32BIG
-{
- Text = "Big 32 Kai" ;
-};
-String RID_SVXSTR_PAPER_B4_JIS
-{
- Text = "B4 (JIS)" ;
-};
-String RID_SVXSTR_PAPER_B5_JIS
-{
- Text = "B5 (JIS)" ;
-};
-String RID_SVXSTR_PAPER_B6_JIS
-{
- Text = "B6 (JIS)" ;
-};
String RID_SVXSTR_PAPERBIN
{
Text [ en-US ] = "Paper tray" ;
diff --git a/editeng/source/items/paperinf.cxx b/editeng/source/items/paperinf.cxx
index 3d79b980ec1d..8ba97193c3bc 100644
--- a/editeng/source/items/paperinf.cxx
+++ b/editeng/source/items/paperinf.cxx
@@ -135,51 +135,7 @@ Size SvxPaperInfo::GetDefaultPaperSize( MapUnit eUnit )
String SvxPaperInfo::GetName( Paper ePaper )
{
- sal_uInt16 nResId = 0;
-
- switch ( ePaper )
- {
- case PAPER_A0: nResId = RID_SVXSTR_PAPER_A0; break;
- case PAPER_A1: nResId = RID_SVXSTR_PAPER_A1; break;
- case PAPER_A2: nResId = RID_SVXSTR_PAPER_A2; break;
- case PAPER_A3: nResId = RID_SVXSTR_PAPER_A3; break;
- case PAPER_A4: nResId = RID_SVXSTR_PAPER_A4; break;
- case PAPER_A5: nResId = RID_SVXSTR_PAPER_A5; break;
- case PAPER_B4_ISO: nResId = RID_SVXSTR_PAPER_B4_ISO; break;
- case PAPER_B5_ISO: nResId = RID_SVXSTR_PAPER_B5_ISO; break;
- case PAPER_LETTER: nResId = RID_SVXSTR_PAPER_LETTER; break;
- case PAPER_LEGAL: nResId = RID_SVXSTR_PAPER_LEGAL; break;
- case PAPER_TABLOID: nResId = RID_SVXSTR_PAPER_TABLOID; break;
- case PAPER_USER: nResId = RID_SVXSTR_PAPER_USER; break;
- case PAPER_B6_ISO: nResId = RID_SVXSTR_PAPER_B6_ISO; break;
- case PAPER_ENV_C4: nResId = RID_SVXSTR_PAPER_C4; break;
- case PAPER_ENV_C5: nResId = RID_SVXSTR_PAPER_C5; break;
- case PAPER_ENV_C6: nResId = RID_SVXSTR_PAPER_C6; break;
- case PAPER_ENV_C65: nResId = RID_SVXSTR_PAPER_C65; break;
- case PAPER_ENV_DL: nResId = RID_SVXSTR_PAPER_DL; break;
- case PAPER_SLIDE_DIA: nResId = RID_SVXSTR_PAPER_DIA; break;
- case PAPER_SCREEN: nResId = RID_SVXSTR_PAPER_SCREEN; break;
- case PAPER_C: nResId = RID_SVXSTR_PAPER_C; break;
- case PAPER_D: nResId = RID_SVXSTR_PAPER_D; break;
- case PAPER_E: nResId = RID_SVXSTR_PAPER_E; break;
- case PAPER_EXECUTIVE: nResId = RID_SVXSTR_PAPER_EXECUTIVE;break;
- case PAPER_FANFOLD_LEGAL_DE: nResId = RID_SVXSTR_PAPER_LEGAL2; break;
- case PAPER_ENV_MONARCH: nResId = RID_SVXSTR_PAPER_MONARCH; break;
- case PAPER_ENV_PERSONAL: nResId = RID_SVXSTR_PAPER_COM675; break;
- case PAPER_ENV_9: nResId = RID_SVXSTR_PAPER_COM9; break;
- case PAPER_ENV_10: nResId = RID_SVXSTR_PAPER_COM10; break;
- case PAPER_ENV_11: nResId = RID_SVXSTR_PAPER_COM11; break;
- case PAPER_ENV_12: nResId = RID_SVXSTR_PAPER_COM12; break;
- case PAPER_KAI16: nResId = RID_SVXSTR_PAPER_KAI16; break;
- case PAPER_KAI32: nResId = RID_SVXSTR_PAPER_KAI32; break;
- case PAPER_KAI32BIG: nResId = RID_SVXSTR_PAPER_KAI32BIG; break;
- case PAPER_B4_JIS: nResId = RID_SVXSTR_PAPER_B4_JIS; break;
- case PAPER_B5_JIS: nResId = RID_SVXSTR_PAPER_B5_JIS; break;
- case PAPER_B6_JIS: nResId = RID_SVXSTR_PAPER_B6_JIS; break;
- default: DBG_ERRORFILE( "unknown papersize" );
- }
-
- return ( nResId > 0 ) ? String( EditResId( nResId ) ) : String();
+ return String( Printer::GetPaperName( ePaper ) );
}
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index f1dc1f6c6f85..f0fa8cd02d8f 100644..100755
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -256,6 +256,16 @@ SvxFontItem::SvxFontItem( const FontFamily eFam, const XubString& aName,
}
// -----------------------------------------------------------------------
+SvxFontItem& SvxFontItem::operator=(const SvxFontItem& rFont)
+{
+ aFamilyName = rFont.GetFamilyName();
+ aStyleName = rFont.GetStyleName();
+ eFamily = rFont.GetFamily();
+ ePitch = rFont.GetPitch();
+ eTextEncoding = rFont.GetCharSet();
+ return *this;
+}
+// -----------------------------------------------------------------------
sal_Bool SvxFontItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
@@ -3806,11 +3816,11 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo
aOutTypeArr[ n ].nLanguage,
DEFAULTFONT_FLAGS_ONLYONE, 0 ) );
SvxFontItem* pItem = aItemArr[ n ];
- pItem->GetFamily() = aFont.GetFamily();
- pItem->GetFamilyName() = aFont.GetName();
- pItem->GetStyleName().Erase();
- pItem->GetPitch() = aFont.GetPitch();
- pItem->GetCharSet() = aFont.GetCharSet();
+ pItem->SetFamily( aFont.GetFamily() );
+ pItem->SetFamilyName( aFont.GetName() );
+ pItem->SetStyleName( String() );
+ pItem->SetPitch( aFont.GetPitch());
+ pItem->SetCharSet(aFont.GetCharSet());
}
}
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index e15e92200e0c..1eebd5349fe4 100644..100755
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -47,6 +47,7 @@
#include <com/sun/star/i18n/UnicodeType.hdl>
#include <unotools/collatorwrapper.hxx>
#include <com/sun/star/i18n/CollatorOptions.hpp>
+#include <com/sun/star/i18n/UnicodeScript.hpp>
#include <unotools/localedatawrapper.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -139,6 +140,41 @@ inline int IsUpperLetter( sal_Int32 nCharType )
0 == ( ::com::sun::star::i18n::KCharacterType::LOWER & nCharType);
}
+bool lcl_IsUnsupportedUnicodeChar( CharClass& rCC, const String& rTxt,
+ xub_StrLen nStt, xub_StrLen nEnd )
+{
+ for( ; nStt < nEnd; ++nStt )
+ {
+#if OSL_DEBUG_LEVEL > 1
+ sal_Int32 nCharType;
+ sal_Int32 nChType;
+ nCharType = rCC.getCharacterType( rTxt, nStt );
+ nChType = rCC.getType( rTxt, nStt );
+#endif
+ short nScript = rCC.getScript( rTxt, nStt );
+ switch( nScript )
+ {
+ case ::com::sun::star::i18n::UnicodeScript_kCJKRadicalsSupplement:
+ case ::com::sun::star::i18n::UnicodeScript_kHangulJamo:
+ case ::com::sun::star::i18n::UnicodeScript_kCJKSymbolPunctuation:
+ case ::com::sun::star::i18n::UnicodeScript_kHiragana:
+ case ::com::sun::star::i18n::UnicodeScript_kKatakana:
+ case ::com::sun::star::i18n::UnicodeScript_kHangulCompatibilityJamo:
+ case ::com::sun::star::i18n::UnicodeScript_kEnclosedCJKLetterMonth:
+ case ::com::sun::star::i18n::UnicodeScript_kCJKCompatibility:
+ case ::com::sun::star::i18n::UnicodeScript_k_CJKUnifiedIdeographsExtensionA:
+ case ::com::sun::star::i18n::UnicodeScript_kCJKUnifiedIdeograph:
+ case ::com::sun::star::i18n::UnicodeScript_kHangulSyllable:
+ case ::com::sun::star::i18n::UnicodeScript_kCJKCompatibilityIdeograph:
+ case ::com::sun::star::i18n::UnicodeScript_kHalfwidthFullwidthForm:
+ return true;
+ default: ; //do nothing
+ }
+
+ }
+ return false;
+}
+
sal_Bool lcl_IsSymbolChar( CharClass& rCC, const String& rTxt,
xub_StrLen nStt, xub_StrLen nEnd )
{
@@ -456,7 +492,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
sal_Unicode cSave = rTxt.GetChar( nSttPos );
String sChar( cSave );
rCC.toLower( sChar );
- if( sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar ))
+ if( sChar.GetChar(0) != cSave && rDoc.ReplaceRange( nSttPos, 1, sChar ))
{
if( SaveWordWrdSttLst & nFlags )
rDoc.SaveCpltSttWord( CptlSttWrd, nSttPos, sWord, cSave );
@@ -888,7 +924,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
String sChar( *pWordStt );
rCC.toUpper( sChar );
return sChar != *pWordStt &&
- rDoc.Replace( xub_StrLen( pWordStt - pStart ), sChar );
+ rDoc.ReplaceRange( xub_StrLen( pWordStt - pStart ), 1, sChar );
}
aText = *pPrevPara;
@@ -1068,7 +1104,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
nSttPos = sal::static_int_cast< xub_StrLen >( pWordStt - rTxt.GetBuffer() );
String sChar( cSave );
rCC.toUpper( sChar );
- sal_Bool bRet = sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar );
+ sal_Bool bRet = sChar.GetChar(0) != cSave && rDoc.ReplaceRange( nSttPos, 1, sChar );
// das Wort will vielleicht jemand haben
if( bRet && SaveWordCplSttLst & nFlags )
@@ -1299,7 +1335,7 @@ sal_uLong SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
eLang = MsLangId::getSystemLanguage();
CharClass& rCC = GetCharClass( eLang );
- // Bug 19285: Symbolzeichen nicht anfassen
+ // no symbol characters
if( lcl_IsSymbolChar( rCC, rTxt, nCapLttrPos, nInsPos ))
break;
@@ -1368,13 +1404,16 @@ sal_uLong SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
else
{
nRet = 0;
+ bool bUnsupported = lcl_IsUnsupportedUnicodeChar( rCC, rTxt, nCapLttrPos, nInsPos );
// Grossbuchstabe am Satz-Anfang ??
- if( IsAutoCorrFlag( CptlSttSntnc ) &&
+ if( !bUnsupported &&
+ IsAutoCorrFlag( CptlSttSntnc ) &&
FnCptlSttSntnc( rDoc, rTxt, sal_True, nCapLttrPos, nInsPos, eLang ) )
nRet |= CptlSttSntnc;
// Zwei Grossbuchstaben am Wort-Anfang ??
- if( IsAutoCorrFlag( CptlSttWrd ) &&
+ if( !bUnsupported &&
+ IsAutoCorrFlag( CptlSttWrd ) &&
FnCptlSttWrd( rDoc, rTxt, nCapLttrPos, nInsPos, eLang ) )
nRet |= CptlSttWrd;
diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx
index d81af6ccff0c..bc2245e7e6a9 100644..100755
--- a/editeng/source/uno/unofdesc.cxx
+++ b/editeng/source/uno/unofdesc.cxx
@@ -91,11 +91,11 @@ void SvxUnoFontDescriptor::FillItemSet( const awt::FontDescriptor& rDesc, SfxIte
{
SvxFontItem aFontItem( EE_CHAR_FONTINFO );
- aFontItem.GetFamilyName()= rDesc.Name;
- aFontItem.GetStyleName() = rDesc.StyleName;
- aFontItem.GetFamily() = (FontFamily)rDesc.Family;
- aFontItem.GetCharSet() = rDesc.CharSet;
- aFontItem.GetPitch() = (FontPitch)rDesc.Pitch;
+ aFontItem.SetFamilyName( rDesc.Name);
+ aFontItem.SetStyleName( rDesc.StyleName);
+ aFontItem.SetFamily( (FontFamily)rDesc.Family);
+ aFontItem.SetCharSet( rDesc.CharSet );
+ aFontItem.SetPitch( (FontPitch)rDesc.Pitch);
rSet.Put(aFontItem);
}
diff --git a/formula/inc/formula/compiler.hrc b/formula/inc/formula/compiler.hrc
index e4dc05aca4e9..5c58d9d3e068 100644
--- a/formula/inc/formula/compiler.hrc
+++ b/formula/inc/formula/compiler.hrc
@@ -130,67 +130,71 @@
#define SC_OPCODE_ARC_COS_HYP 95
#define SC_OPCODE_ARC_TAN_HYP 96
#define SC_OPCODE_ARC_COT_HYP 97
-#define SC_OPCODE_EXP 98
-#define SC_OPCODE_LN 99
-#define SC_OPCODE_SQRT 100
-#define SC_OPCODE_FACT 101
-#define SC_OPCODE_GET_YEAR 102 /* date and time */
-#define SC_OPCODE_GET_MONTH 103
-#define SC_OPCODE_GET_DAY 104
-#define SC_OPCODE_GET_HOUR 105
-#define SC_OPCODE_GET_MIN 106
-#define SC_OPCODE_GET_SEC 107
-#define SC_OPCODE_PLUS_MINUS 108 /* miscellaneous */
-#define SC_OPCODE_ABS 109
-#define SC_OPCODE_INT 110
-#define SC_OPCODE_PHI 111
-#define SC_OPCODE_GAUSS 112
-#define SC_OPCODE_IS_EMPTY 113 /* obtain type */
-#define SC_OPCODE_IS_STRING 114
-#define SC_OPCODE_IS_NON_STRING 115
-#define SC_OPCODE_IS_LOGICAL 116
-#define SC_OPCODE_TYPE 117
-#define SC_OPCODE_IS_REF 118
-#define SC_OPCODE_IS_VALUE 119
-#define SC_OPCODE_IS_FORMULA 120
-#define SC_OPCODE_IS_NV 121
-#define SC_OPCODE_IS_ERR 122
-#define SC_OPCODE_IS_ERROR 123
-#define SC_OPCODE_IS_EVEN 124
-#define SC_OPCODE_IS_ODD 125
-#define SC_OPCODE_N 126
-#define SC_OPCODE_GET_DATE_VALUE 127 /* string functions */
-#define SC_OPCODE_GET_TIME_VALUE 128
-#define SC_OPCODE_CODE 129
-#define SC_OPCODE_TRIM 130
-#define SC_OPCODE_UPPER 131
-#define SC_OPCODE_PROPPER 132
-#define SC_OPCODE_LOWER 133
-#define SC_OPCODE_LEN 134
-#define SC_OPCODE_T 135 /* miscellaneous, part 21 */
-#define SC_OPCODE_VALUE 136
-#define SC_OPCODE_CLEAN 137
-#define SC_OPCODE_CHAR 138
-#define SC_OPCODE_LOG10 139
-#define SC_OPCODE_EVEN 140
-#define SC_OPCODE_ODD 141
-#define SC_OPCODE_STD_NORM_DIST 142
-#define SC_OPCODE_FISHER 143
-#define SC_OPCODE_FISHER_INV 144
-#define SC_OPCODE_S_NORM_INV 145
-#define SC_OPCODE_GAMMA_LN 146
-#define SC_OPCODE_ERROR_TYPE 147
-#define SC_OPCODE_ERR_CELL 148
-#define SC_OPCODE_FORMULA 149
-#define SC_OPCODE_ARABIC 150
-#define SC_OPCODE_INFO 151
-#define SC_OPCODE_BAHTTEXT 152
-#define SC_OPCODE_JIS 153
-#define SC_OPCODE_ASC 154
-#define SC_OPCODE_UNICODE 155
-#define SC_OPCODE_UNICHAR 156
-#define SC_OPCODE_GAMMA 157
-#define SC_OPCODE_STOP_1_PAR 158
+#define SC_OPCODE_COSECANT 98
+#define SC_OPCODE_SECANT 99
+#define SC_OPCODE_COSECANT_HYP 100
+#define SC_OPCODE_SECANT_HYP 101
+#define SC_OPCODE_EXP 102
+#define SC_OPCODE_LN 103
+#define SC_OPCODE_SQRT 104
+#define SC_OPCODE_FACT 105
+#define SC_OPCODE_GET_YEAR 106 /* date and time */
+#define SC_OPCODE_GET_MONTH 107
+#define SC_OPCODE_GET_DAY 108
+#define SC_OPCODE_GET_HOUR 109
+#define SC_OPCODE_GET_MIN 110
+#define SC_OPCODE_GET_SEC 111
+#define SC_OPCODE_PLUS_MINUS 112 /* miscellaneous */
+#define SC_OPCODE_ABS 113
+#define SC_OPCODE_INT 114
+#define SC_OPCODE_PHI 115
+#define SC_OPCODE_GAUSS 116
+#define SC_OPCODE_IS_EMPTY 117 /* obtain type */
+#define SC_OPCODE_IS_STRING 118
+#define SC_OPCODE_IS_NON_STRING 119
+#define SC_OPCODE_IS_LOGICAL 120
+#define SC_OPCODE_TYPE 121
+#define SC_OPCODE_IS_REF 122
+#define SC_OPCODE_IS_VALUE 123
+#define SC_OPCODE_IS_FORMULA 124
+#define SC_OPCODE_IS_NV 125
+#define SC_OPCODE_IS_ERR 126
+#define SC_OPCODE_IS_ERROR 127
+#define SC_OPCODE_IS_EVEN 128
+#define SC_OPCODE_IS_ODD 129
+#define SC_OPCODE_N 130
+#define SC_OPCODE_GET_DATE_VALUE 131 /* string functions */
+#define SC_OPCODE_GET_TIME_VALUE 132
+#define SC_OPCODE_CODE 133
+#define SC_OPCODE_TRIM 134
+#define SC_OPCODE_UPPER 135
+#define SC_OPCODE_PROPPER 136
+#define SC_OPCODE_LOWER 137
+#define SC_OPCODE_LEN 138
+#define SC_OPCODE_T 139 /* miscellaneous, part 21 */
+#define SC_OPCODE_VALUE 140
+#define SC_OPCODE_CLEAN 141
+#define SC_OPCODE_CHAR 142
+#define SC_OPCODE_LOG10 143
+#define SC_OPCODE_EVEN 144
+#define SC_OPCODE_ODD 145
+#define SC_OPCODE_STD_NORM_DIST 146
+#define SC_OPCODE_FISHER 147
+#define SC_OPCODE_FISHER_INV 148
+#define SC_OPCODE_S_NORM_INV 149
+#define SC_OPCODE_GAMMA_LN 150
+#define SC_OPCODE_ERROR_TYPE 151
+#define SC_OPCODE_ERR_CELL 152
+#define SC_OPCODE_FORMULA 153
+#define SC_OPCODE_ARABIC 154
+#define SC_OPCODE_INFO 155
+#define SC_OPCODE_BAHTTEXT 156
+#define SC_OPCODE_JIS 157
+#define SC_OPCODE_ASC 158
+#define SC_OPCODE_UNICODE 159
+#define SC_OPCODE_UNICHAR 160
+#define SC_OPCODE_GAMMA 161
+#define SC_OPCODE_STOP_1_PAR 162
/*** Functions with more than one parameters ***/
#define SC_OPCODE_START_2_PAR 201
diff --git a/formula/inc/formula/opcode.hxx b/formula/inc/formula/opcode.hxx
index cfd3af767465..0e70ffc01e44 100644
--- a/formula/inc/formula/opcode.hxx
+++ b/formula/inc/formula/opcode.hxx
@@ -121,6 +121,10 @@ enum OpCodeEnum
ocArcCosHyp = SC_OPCODE_ARC_COS_HYP,
ocArcTanHyp = SC_OPCODE_ARC_TAN_HYP,
ocArcCotHyp = SC_OPCODE_ARC_COT_HYP,
+ ocCosecant = SC_OPCODE_COSECANT,
+ ocSecant = SC_OPCODE_SECANT,
+ ocCosecantHyp = SC_OPCODE_COSECANT_HYP,
+ ocSecantHyp = SC_OPCODE_SECANT_HYP,
ocExp = SC_OPCODE_EXP,
ocLn = SC_OPCODE_LN,
ocSqrt = SC_OPCODE_SQRT,
diff --git a/formula/source/core/resource/core_resource.src b/formula/source/core/resource/core_resource.src
index d2996e78fba7..b8a5f1250941 100644
--- a/formula/source/core/resource/core_resource.src
+++ b/formula/source/core/resource/core_resource.src
@@ -88,6 +88,10 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF
String SC_OPCODE_ARC_COS_HYP { Text = "ACOSH" ; };
String SC_OPCODE_ARC_TAN_HYP { Text = "ATANH" ; };
String SC_OPCODE_ARC_COT_HYP { Text = "ACOTH" ; };
+ String SC_OPCODE_COSECANT { Text = "CSC" ; };
+ String SC_OPCODE_SECANT { Text = "SEC" ; };
+ String SC_OPCODE_COSECANT_HYP { Text = "CSCH" ; };
+ String SC_OPCODE_SECANT_HYP { Text = "SECH" ; };
String SC_OPCODE_EXP { Text = "EXP" ; };
String SC_OPCODE_LN { Text = "LN" ; };
String SC_OPCODE_SQRT { Text = "SQRT" ; };
@@ -412,6 +416,10 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH
String SC_OPCODE_ARC_COS_HYP { Text = "ACOSH" ; };
String SC_OPCODE_ARC_TAN_HYP { Text = "ATANH" ; };
String SC_OPCODE_ARC_COT_HYP { Text = "ACOTH" ; };
+ String SC_OPCODE_COSECANT { Text = "CSC" ; };
+ String SC_OPCODE_SECANT { Text = "SEC" ; };
+ String SC_OPCODE_COSECANT_HYP { Text = "CSCH" ; };
+ String SC_OPCODE_SECANT_HYP { Text = "SECH" ; };
String SC_OPCODE_EXP { Text = "EXP" ; };
String SC_OPCODE_LN { Text = "LN" ; };
String SC_OPCODE_SQRT { Text = "SQRT" ; };
@@ -830,6 +838,22 @@ Resource RID_STRLIST_FUNCTION_NAMES
{
Text [ en-US ] = "ACOTH" ;
};
+ String SC_OPCODE_COSECANT
+ {
+ Text = "CSC" ;
+ };
+ String SC_OPCODE_SECANT
+ {
+ Text = "SEC" ;
+ };
+ String SC_OPCODE_COSECANT_HYP
+ {
+ Text = "CSCH" ;
+ };
+ String SC_OPCODE_SECANT_HYP
+ {
+ Text = "SECH" ;
+ };
String SC_OPCODE_EXP
{
Text [ en-US ] = "EXP";
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 54d1c102d5be..d782f0ee8dcd 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -313,6 +313,11 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
aRefBtn.Hide();
pMEdit = aMEFormula.GetEdit();
+ //IAccessibility2 Implementation 2009-----
+ aMEFormula.SetAccessibleName(aFtFormula.GetText());
+ if (pMEdit)
+ pMEdit->SetAccessibleName(aFtFormula.GetText());
+ //-----IAccessibility2 Implementation 2009
m_aEditHelpId = pMEdit->GetHelpId();
pMEdit->SetUniqueId( m_aEditHelpId );
diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx
index e51f9dc8a9c8..3a21a99b0da7 100644
--- a/formula/source/ui/dlg/parawin.cxx
+++ b/formula/source/ui/dlg/parawin.cxx
@@ -56,24 +56,24 @@ ParaWin::ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos):
aFtArgName ( this, ModuleRes( FT_PARNAME ) ),
aFtArgDesc ( this, ModuleRes( FT_PARDESC ) ),
+ aBtnFx1 ( this, ModuleRes( BTN_FX1 ) ),
aFtArg1 ( this, ModuleRes( FT_ARG1 ) ),
- aFtArg2 ( this, ModuleRes( FT_ARG2 ) ),
- aFtArg3 ( this, ModuleRes( FT_ARG3 ) ),
- aFtArg4 ( this, ModuleRes( FT_ARG4 ) ),
+ aEdArg1 ( this, ModuleRes( ED_ARG1 ) ),
+ aRefBtn1 ( this, ModuleRes( RB_ARG1 ) ),
- aBtnFx1 ( this, ModuleRes( BTN_FX1 ) ),
aBtnFx2 ( this, ModuleRes( BTN_FX2 ) ),
- aBtnFx3 ( this, ModuleRes( BTN_FX3 ) ),
- aBtnFx4 ( this, ModuleRes( BTN_FX4 ) ),
-
- aEdArg1 ( this, ModuleRes( ED_ARG1 ) ),
+ aFtArg2 ( this, ModuleRes( FT_ARG2 ) ),
aEdArg2 ( this, ModuleRes( ED_ARG2 ) ),
- aEdArg3 ( this, ModuleRes( ED_ARG3 ) ),
- aEdArg4 ( this, ModuleRes( ED_ARG4 ) ),
-
- aRefBtn1 ( this, ModuleRes( RB_ARG1 ) ),
aRefBtn2 ( this, ModuleRes( RB_ARG2 ) ),
+
+ aBtnFx3 ( this, ModuleRes( BTN_FX3 ) ),
+ aFtArg3 ( this, ModuleRes( FT_ARG3 ) ),
+ aEdArg3 ( this, ModuleRes( ED_ARG3 ) ),
aRefBtn3 ( this, ModuleRes( RB_ARG3 ) ),
+
+ aBtnFx4 ( this, ModuleRes( BTN_FX4 ) ),
+ aFtArg4 ( this, ModuleRes( FT_ARG4 ) ),
+ aEdArg4 ( this, ModuleRes( ED_ARG4 ) ),
aRefBtn4 ( this, ModuleRes( RB_ARG4 ) ),
aSlider ( this, ModuleRes( WND_SLIDER ) ),
diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx
index 990eafd28ba2..55c2bd7204b8 100644
--- a/formula/source/ui/dlg/parawin.hxx
+++ b/formula/source/ui/dlg/parawin.hxx
@@ -68,25 +68,25 @@ private:
FixedText aFtArgName;
FixedInfo aFtArgDesc;
+ ImageButton aBtnFx1;
FixedText aFtArg1;
- FixedText aFtArg2;
- FixedText aFtArg3;
- FixedText aFtArg4;
+ ArgEdit aEdArg1;
+ RefButton aRefBtn1;
- ImageButton aBtnFx1;
ImageButton aBtnFx2;
- ImageButton aBtnFx3;
- ImageButton aBtnFx4;
-
- ArgEdit aEdArg1;
+ FixedText aFtArg2;
ArgEdit aEdArg2;
+ RefButton aRefBtn2;
+
+ ImageButton aBtnFx3;
+ FixedText aFtArg3;
ArgEdit aEdArg3;
- ArgEdit aEdArg4;
+ RefButton aRefBtn3;
- RefButton aRefBtn1;
- RefButton aRefBtn2;
- RefButton aRefBtn3;
- RefButton aRefBtn4;
+ ImageButton aBtnFx4;
+ FixedText aFtArg4;
+ ArgEdit aEdArg4;
+ RefButton aRefBtn4;
ScrollBar aSlider;
String m_sOptional;
diff --git a/fpicker/prj/build.lst b/fpicker/prj/build.lst
index 52d99ec0759a..1be09c5d8fd1 100644
--- a/fpicker/prj/build.lst
+++ b/fpicker/prj/build.lst
@@ -1,4 +1,4 @@
-fp fpicker : LIBXSLT:libxslt l10n rdbmaker svtools NULL
+fp fpicker : LIBXSLT:libxslt L10N:l10n rdbmaker svtools NULL
fp fpicker\inc nmake - all fp_inc NULL
fp fpicker\source\generic nmake - all fp_generic fp_inc NULL
fp fpicker\source\office nmake - all fp_office fp_inc NULL
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 355203dbe767..13f427351411 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -3015,6 +3015,7 @@ void SvtFileDialog::AddControls_Impl( )
_pPrevBmp = new FixedBitmap( this, WinBits( WB_BORDER ) );
_pPrevBmp->SetBackground( Wallpaper( Color( COL_WHITE ) ) );
_pPrevBmp->Show();
+ _pPrevBmp->SetAccessibleName(SvtResId(STR_PREVIEW));
}
if ( _nExtraBits & SFX_EXTRA_AUTOEXTENSION )
diff --git a/fpicker/source/office/iodlg.hrc b/fpicker/source/office/iodlg.hrc
index b87082b56cbd..42b235ee31af 100644
--- a/fpicker/source/office/iodlg.hrc
+++ b/fpicker/source/office/iodlg.hrc
@@ -70,6 +70,7 @@
#define STR_PATHSELECT 5
#define STR_BUTTONSELECT 6
#define STR_ACTUALVERSION 7
+#define STR_PREVIEW 8
// DLG_SVT_QUERYFOLDERNAME -----------------------
diff --git a/fpicker/source/office/iodlg.src b/fpicker/source/office/iodlg.src
index da2d1cd926b6..2a460797fe56 100644
--- a/fpicker/source/office/iodlg.src
+++ b/fpicker/source/office/iodlg.src
@@ -251,6 +251,10 @@ ModalDialog DLG_SVT_EXPLORERFILE
{
Text [ en-US ] = "Current version";
};
+ String STR_PREVIEW
+ {
+ Text [ en-US ] = "File Preview";
+ };
};
// QueryFolderNameDialog ----------------------------------------------------------
diff --git a/framework/inc/services/substitutepathvars.hxx b/framework/inc/services/substitutepathvars.hxx
index 9bf4b1ead43d..8825386d1b57 100644
--- a/framework/inc/services/substitutepathvars.hxx
+++ b/framework/inc/services/substitutepathvars.hxx
@@ -36,7 +36,7 @@
#include <hash_map>
//_________________________________________________________________________________________________________________
-// my own includes
+// my own includes
//_________________________________________________________________________________________________________________
#include <threadhelp/threadhelpbase.hxx>
#include <macros/generic.hxx>
@@ -46,7 +46,7 @@
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
-// interface includes
+// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
@@ -54,7 +54,7 @@
#include <com/sun/star/util/XStringSubstitution.hpp>
//_________________________________________________________________________________________________________________
-// other includes
+// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/implbase2.hxx>
#include <rtl/ustring.hxx>
@@ -68,24 +68,24 @@ namespace framework
// Must be zero value based
enum EnvironmentType
{
- ET_HOST = 0 ,
- ET_YPDOMAIN ,
- ET_DNSDOMAIN ,
- ET_NTDOMAIN ,
- ET_OS ,
- ET_UNKNOWN ,
- ET_COUNT
+ ET_HOST = 0 ,
+ ET_YPDOMAIN ,
+ ET_DNSDOMAIN ,
+ ET_NTDOMAIN ,
+ ET_OS ,
+ ET_UNKNOWN ,
+ ET_COUNT
};
// Must be zero value based
enum OperatingSystem
{
- OS_WINDOWS = 0,
- OS_UNIX ,
- OS_SOLARIS ,
- OS_LINUX ,
- OS_UNKNOWN ,
- OS_COUNT
+ OS_WINDOWS = 0,
+ OS_UNIX ,
+ OS_SOLARIS ,
+ OS_LINUX ,
+ OS_UNKNOWN ,
+ OS_COUNT
};
struct SubstituteRule
@@ -97,15 +97,16 @@ struct SubstituteRule
EnvironmentType aType ) :
aSubstVariable( aVarName ), aSubstValue( aValue ), aEnvValue( aVal ), aEnvType( aType ) {}
- rtl::OUString aSubstVariable;
- rtl::OUString aSubstValue;
- com::sun::star::uno::Any aEnvValue;
- EnvironmentType aEnvType;
+ rtl::OUString aSubstVariable;
+ rtl::OUString aSubstValue;
+ com::sun::star::uno::Any aEnvValue;
+ EnvironmentType aEnvType;
};
struct SubstitutePathNotify
{
SubstitutePathNotify() {};
+
const com::sun::star::uno::Sequence<rtl::OUString> aPropertyNames;
};
@@ -131,45 +132,45 @@ class SubstitutePathVariables_Impl : public utl::ConfigItem
static OperatingSystem GetOperatingSystemFromString( const rtl::OUString& );
static EnvironmentType GetEnvTypeFromString( const rtl::OUString& );
- void GetSharePointsRules( SubstituteVariables& aSubstVarMap );
+ void GetSharePointsRules( SubstituteVariables& aSubstVarMap );
/** is called from the ConfigManager before application ends or from the
PropertyChangeListener if the sub tree broadcasts changes. */
- virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
- virtual void Commit();
-
- private:
- // Wrapper methods for low-level functions
- OperatingSystem GetOperatingSystem();
- const rtl::OUString& GetYPDomainName();
- const rtl::OUString& GetDNSDomainName();
- const rtl::OUString& GetNTDomainName();
- const rtl::OUString& GetHostName();
-
- sal_Bool FilterRuleSet( const SubstituteRuleVector& aRuleSet, SubstituteRule& aActiveRule );
-
- void ReadSharePointsFromConfiguration( com::sun::star::uno::Sequence< rtl::OUString >& aSharePointsSeq );
- void ReadSharePointRuleSetFromConfiguration( const rtl::OUString& aSharePointName,
- const rtl::OUString& aSharePointNodeName,
- SubstituteRuleVector& aRuleSet );
-
- // Stored values for domains and host
- sal_Bool m_bYPDomainRetrieved;
- rtl::OUString m_aYPDomain;
- sal_Bool m_bDNSDomainRetrieved;
- rtl::OUString m_aDNSDomain;
- sal_Bool m_bNTDomainRetrieved;
- rtl::OUString m_aNTDomain;
- sal_Bool m_bHostRetrieved;
- rtl::OUString m_aHost;
- sal_Bool m_bOSRetrieved;
- OperatingSystem m_eOSType;
-
- Link m_aListenerNotify;
- const rtl::OUString m_aSharePointsNodeName;
- const rtl::OUString m_aDirPropertyName;
- const rtl::OUString m_aEnvPropertyName;
- const rtl::OUString m_aLevelSep;
+ virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+ virtual void Commit();
+
+ private:
+ // Wrapper methods for low-level functions
+ OperatingSystem GetOperatingSystem();
+ const rtl::OUString& GetYPDomainName();
+ const rtl::OUString& GetDNSDomainName();
+ const rtl::OUString& GetNTDomainName();
+ const rtl::OUString& GetHostName();
+
+ bool FilterRuleSet( const SubstituteRuleVector& aRuleSet, SubstituteRule& aActiveRule );
+
+ void ReadSharePointsFromConfiguration( com::sun::star::uno::Sequence< rtl::OUString >& aSharePointsSeq );
+ void ReadSharePointRuleSetFromConfiguration( const rtl::OUString& aSharePointName,
+ const rtl::OUString& aSharePointNodeName,
+ SubstituteRuleVector& aRuleSet );
+
+ // Stored values for domains and host
+ bool m_bYPDomainRetrieved;
+ rtl::OUString m_aYPDomain;
+ bool m_bDNSDomainRetrieved;
+ rtl::OUString m_aDNSDomain;
+ bool m_bNTDomainRetrieved;
+ rtl::OUString m_aNTDomain;
+ bool m_bHostRetrieved;
+ rtl::OUString m_aHost;
+ bool m_bOSRetrieved;
+ OperatingSystem m_eOSType;
+
+ Link m_aListenerNotify;
+ const rtl::OUString m_aSharePointsNodeName;
+ const rtl::OUString m_aDirPropertyName;
+ const rtl::OUString m_aEnvPropertyName;
+ const rtl::OUString m_aLevelSep;
};
enum PreDefVariable
@@ -234,8 +235,8 @@ struct ReSubstUserVarOrder
typedef std::list< ReSubstFixedVarOrder > ReSubstFixedVarOrderVector;
typedef std::list< ReSubstUserVarOrder > ReSubstUserVarOrderVector;
-class SubstitutePathVariables : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
- public ::cppu::WeakImplHelper2< ::com::sun::star::util::XStringSubstitution, css::lang::XServiceInfo>
+class SubstitutePathVariables : private ThreadHelpBase, // Struct for right initalization of mutex member! Must be first of baseclasses.
+ public ::cppu::WeakImplHelper2< ::com::sun::star::util::XStringSubstitution, css::lang::XServiceInfo >
{
friend class SubstitutePathVariables_Impl;
@@ -254,51 +255,51 @@ class SubstitutePathVariables : private ThreadHelpBase
virtual ::rtl::OUString SAL_CALL getSubstituteVariableValue( const ::rtl::OUString& variable )
throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
- protected:
- DECL_LINK( implts_ConfigurationNotify, SubstitutePathNotify* );
-
- void SetPredefinedPathVariables( PredefinedPathVariables& );
- rtl::OUString ConvertOSLtoUCBURL( const rtl::OUString& aOSLCompliantURL ) const;
-
- // Special case (transient) values can change during runtime!
- // Don't store them in the pre defined struct
- rtl::OUString GetWorkPath() const;
- rtl::OUString GetWorkVariableValue() const;
- rtl::OUString GetPathVariableValue() const;
-
- rtl::OUString GetHomeVariableValue() const;
-
- // XStringSubstitution implementation methods
- rtl::OUString impl_substituteVariable( const ::rtl::OUString& aText, sal_Bool bSustRequired )
- throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
- rtl::OUString impl_reSubstituteVariables( const ::rtl::OUString& aText )
- throw (::com::sun::star::uno::RuntimeException);
- ::rtl::OUString impl_getSubstituteVariableValue( const ::rtl::OUString& variable )
- throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
-
- private:
- class VarNameToIndexMap : public std::hash_map< ::rtl::OUString,
- PreDefVariable,
- OUStringHashCode,
- ::std::equal_to< ::rtl::OUString > >
- {
- inline void free()
+ protected:
+ DECL_LINK( implts_ConfigurationNotify, SubstitutePathNotify* );
+
+ void SetPredefinedPathVariables( PredefinedPathVariables& );
+ rtl::OUString ConvertOSLtoUCBURL( const rtl::OUString& aOSLCompliantURL ) const;
+
+ // Special case (transient) values can change during runtime!
+ // Don't store them in the pre defined struct
+ rtl::OUString GetWorkPath() const;
+ rtl::OUString GetWorkVariableValue() const;
+ rtl::OUString GetPathVariableValue() const;
+
+ rtl::OUString GetHomeVariableValue() const;
+
+ // XStringSubstitution implementation methods
+ rtl::OUString impl_substituteVariable( const ::rtl::OUString& aText, bool bSustRequired )
+ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
+ rtl::OUString impl_reSubstituteVariables( const ::rtl::OUString& aText )
+ throw (::com::sun::star::uno::RuntimeException);
+ ::rtl::OUString impl_getSubstituteVariableValue( const ::rtl::OUString& variable )
+ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
+
+ private:
+ class VarNameToIndexMap : public std::hash_map< ::rtl::OUString,
+ PreDefVariable,
+ OUStringHashCode,
+ ::std::equal_to< ::rtl::OUString > >
{
- VarNameToIndexMap().swap( *this );
- }
- };
-
- // heavy used string
- const rtl::OUString m_aVarStart;
- const rtl::OUString m_aVarEnd;
-
- VarNameToIndexMap m_aPreDefVarMap; // Mapping from pre-def variable names to enum for array access
- SubstituteVariables m_aSubstVarMap; // Active rule set map indexed by variable name!
- PredefinedPathVariables m_aPreDefVars; // All predefined variables
- SubstitutePathVariables_Impl m_aImpl; // Implementation class that access the configuration
- ReSubstFixedVarOrderVector m_aReSubstFixedVarOrder; // To speed up resubstitution fixed variables (order for lookup)
- ReSubstUserVarOrderVector m_aReSubstUserVarOrder; // To speed up resubstitution user variables
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
+ inline void free()
+ {
+ VarNameToIndexMap().swap( *this );
+ }
+ };
+
+ // heavy used string
+ const rtl::OUString m_aVarStart;
+ const rtl::OUString m_aVarEnd;
+
+ VarNameToIndexMap m_aPreDefVarMap; // Mapping from pre-def variable names to enum for array access
+ SubstituteVariables m_aSubstVarMap; // Active rule set map indexed by variable name!
+ PredefinedPathVariables m_aPreDefVars; // All predefined variables
+ SubstitutePathVariables_Impl m_aImpl; // Implementation class that access the configuration
+ ReSubstFixedVarOrderVector m_aReSubstFixedVarOrder; // To speed up resubstitution fixed variables (order for lookup)
+ ReSubstUserVarOrderVector m_aReSubstUserVarOrder; // To speed up resubstitution user variables
+ com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
};
}
diff --git a/framework/prj/build.lst b/framework/prj/build.lst
index 2c847918fee4..8fe5b3b2f0ef 100644
--- a/framework/prj/build.lst
+++ b/framework/prj/build.lst
@@ -1,2 +1,2 @@
-fr framework : LIBXSLT:libxslt l10n svtools NULL
+fr framework : LIBXSLT:libxslt L10N:l10n svtools NULL
fr framework\prj nmake - all fr_all NULL
diff --git a/framework/qa/complex/path_substitution/PathSubstitutionTest.java b/framework/qa/complex/path_substitution/PathSubstitutionTest.java
index aeea9907e6bc..e936fbf6ccad 100755
--- a/framework/qa/complex/path_substitution/PathSubstitutionTest.java
+++ b/framework/qa/complex/path_substitution/PathSubstitutionTest.java
@@ -63,20 +63,20 @@ public class PathSubstitutionTest
/**
* Create an array with all substitution variables
*/
- @Before private void initialize()
+ @Before public void initialize()
{
substVars = new VariableContainer();
- substVars.add("$(prog)", false, true);
- substVars.add("$(inst)", false, true);
- substVars.add("$(user)", false, true);
- substVars.add("$(work)", false, true);
- substVars.add("$(home)", false, true);
- substVars.add("$(temp)", false, true);
+ substVars.add("$(prog)", true, true);
+ substVars.add("$(inst)", true, true);
+ substVars.add("$(user)", true, true);
+ substVars.add("$(work)", true, true);
+ substVars.add("$(home)", true, true);
+ substVars.add("$(temp)", true, true);
substVars.add("$(lang)", false, false);
substVars.add("$(langid)", false, false);
substVars.add("$(vlang)", false, false);
// path won't resubstitute
- substVars.add("$(path)", false, false);
+ substVars.add("$(path)", true, false);
}
/**
@@ -106,8 +106,6 @@ public class PathSubstitutionTest
return;
}
-// initialize();
-
for (int i = 0; i < substVars.size(); i++)
{
String var = substVars.getVariable(i);
@@ -148,6 +146,12 @@ public class PathSubstitutionTest
//in middle of text works
substString = "file:///starting/" + var + "/path";
+ String sCanSubstAllPos;
+ if (substVars.onlySubstituteAtBegin(i))
+ sCanSubstAllPos = "NO";
+ else
+ sCanSubstAllPos = "YES";
+ System.out.println("Variable can substitute within string: "+sCanSubstAllPos);
System.out.println("Substitute '" + substString + "'");
newValue = oObj.substituteVariables(substString, false);
System.out.println("Return value '" + newValue + "'");
diff --git a/framework/qa/unoapi/makefile.mk b/framework/qa/unoapi/makefile.mk
new file mode 100644
index 000000000000..38a6cf7cced8
--- /dev/null
+++ b/framework/qa/unoapi/makefile.mk
@@ -0,0 +1,48 @@
+#*************************************************************************
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General 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 "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../..
+PRJNAME = framework
+TARGET = qa_unoapi
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = org/openoffice/framework/qa/unoapi
+JAVATESTFILES = Test.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx
index d7868a3a0857..b41797e63595 100644
--- a/framework/source/classes/fwktabwindow.cxx
+++ b/framework/source/classes/fwktabwindow.cxx
@@ -45,6 +45,7 @@
#include <comphelper/processfactory.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/stream.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/bitmap.hxx>
#include <vcl/image.hxx>
#include <vcl/msgbox.hxx>
@@ -156,7 +157,7 @@ sal_Bool FwkTabPage::CallMethod( const rtl::OUString& rMethod )
}
catch ( uno::Exception& )
{
- DBG_ERRORFILE( "FwkTabPage::CallMethod(): exception of XDialogEventHandler::callHandlerMethod()" );
+ DBG_UNHANDLED_EXCEPTION();
}
}
return bRet;
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index 1d1e877a5a86..780efb1f3c6d 100644..100755
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -400,7 +400,7 @@ void BackingWindow::prepareRecentFileMenu()
void BackingWindow::initBackground()
{
- SetBackground( GetSettings().GetStyleSettings().GetWorkspaceGradient() );
+ SetBackground();
bool bDark = GetSettings().GetStyleSettings().GetHighContrastMode();
if( bDark )
@@ -707,36 +707,39 @@ void BackingWindow::layoutButton(
void BackingWindow::Paint( const Rectangle& )
{
+ Wallpaper aBack( GetSettings().GetStyleSettings().GetWorkspaceGradient() );
+ Region aClip( Rectangle( Point( 0, 0 ), GetOutputSizePixel() ) );
+ Rectangle aBmpRect(maControlRect);
+ aBmpRect.Left() -= nShadowLeft;
+ aBmpRect.Top() -= nShadowTop;
+ aBmpRect.Right() += nShadowRight;
+ aBmpRect.Bottom() += nShadowBottom;
+ aClip.Exclude( aBmpRect );
+ Push( PUSH_CLIPREGION );
+ IntersectClipRegion( aClip );
+ DrawWallpaper( Rectangle( Point( 0, 0 ), GetOutputSizePixel() ), aBack );
+ Pop();
+
+ VirtualDevice aDev( *this );
+ aDev.EnableRTL( IsRTLEnabled() );
+ aDev.SetOutputSizePixel( aBmpRect.GetSize() );
+ Point aOffset( Point( 0, 0 ) - aBmpRect.TopLeft() );
+ aDev.DrawWallpaper( Rectangle( aOffset, GetOutputSizePixel() ), aBack );
// draw bitmap
- if( GetSettings().GetLayoutRTL() )
+ Point aTL( 0, 0 );
+ aDev.DrawBitmapEx( aTL, maBackgroundLeft );
+ aTL.X() += maBackgroundLeft.GetSizePixel().Width();
+ if( !!maBackgroundMiddle )
{
- Point aTL( maControlRect.TopLeft() );
- aTL.X() -= nShadowRight;
- aTL.Y() -= nShadowTop;
- DrawBitmapEx( aTL, maBackgroundLeft );
- aTL.X() += maBackgroundLeft.GetSizePixel().Width();
- if( !!maBackgroundMiddle )
- {
- DrawBitmapEx( aTL, maBackgroundMiddle );
- aTL.X() += maBackgroundMiddle.GetSizePixel().Width();
- }
- DrawBitmapEx( aTL, maBackgroundRight );
- }
- else
- {
- Point aTL( maControlRect.TopLeft() );
- aTL.X() -= nShadowLeft;
- aTL.Y() -= nShadowTop;
- DrawBitmapEx( aTL, maBackgroundLeft );
- aTL.X() += maBackgroundLeft.GetSizePixel().Width();
- if( !!maBackgroundMiddle )
- {
- DrawBitmapEx( aTL, maBackgroundMiddle );
- aTL.X() += maBackgroundMiddle.GetSizePixel().Width();
- }
- DrawBitmapEx( aTL, maBackgroundRight );
+ aDev.DrawBitmapEx( aTL, maBackgroundMiddle );
+ aTL.X() += maBackgroundMiddle.GetSizePixel().Width();
}
+ aDev.DrawBitmapEx( aTL, maBackgroundRight );
+
+ DrawOutDev( aBmpRect.TopLeft(), aBmpRect.GetSize(),
+ Point( 0, 0 ), aBmpRect.GetSize(),
+ aDev );
}
long BackingWindow::Notify( NotifyEvent& rNEvt )
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 90c460b74298..b66d21cfe81c 100644..100755
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -29,7 +29,7 @@
#include "precompiled_framework.hxx"
//_________________________________________________________________________________________________________________
-// my own includes
+// my own includes
//_________________________________________________________________________________________________________________
#include "services/substitutepathvars.hxx"
#include <threadhelp/resetableguard.hxx>
@@ -37,12 +37,12 @@
#include "services.h"
//_________________________________________________________________________________________________________________
-// interface includes
+// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/beans/XPropertySet.hpp>
//_________________________________________________________________________________________________________________
-// includes of other projects
+// includes of other projects
//_________________________________________________________________________________________________________________
#include <unotools/configitem.hxx>
#include <unotools/localfilehelper.hxx>
@@ -69,38 +69,38 @@
#include <string.h>
//_________________________________________________________________________________________________________________
-// Defines
+// Defines
//_________________________________________________________________________________________________________________
//
-#define STRPOS_NOTFOUND (sal_Int32)-1
+#define STRPOS_NOTFOUND (sal_Int32)-1
-#define ASCII_STR( val ) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( val ))
+#define ASCII_STR( val ) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( val ))
-#define SEARCHPATH_DELIMITER ';'
+#define SEARCHPATH_DELIMITER ';'
// Variable start/end characters
-#define SIGN_STARTVARIABLE ASCII_STR("$(")
-#define SIGN_ENDVARIABLE ASCII_STR(")")
+#define SIGN_STARTVARIABLE ASCII_STR("$(")
+#define SIGN_ENDVARIABLE ASCII_STR(")")
// Length of SUBSTITUTE_... to replace it with real values.
-#define REPLACELENGTH_INST 7
-#define REPLACELENGTH_PROG 7
-#define REPLACELENGTH_USER 7
-#define REPLACELENGTH_WORK 7
-#define REPLACELENGTH_HOME 7
-#define REPLACELENGTH_TEMP 7
-#define REPLACELENGTH_PATH 7
+#define REPLACELENGTH_INST 7
+#define REPLACELENGTH_PROG 7
+#define REPLACELENGTH_USER 7
+#define REPLACELENGTH_WORK 7
+#define REPLACELENGTH_HOME 7
+#define REPLACELENGTH_TEMP 7
+#define REPLACELENGTH_PATH 7
#define REPLACELENGTH_INSTPATH 11
#define REPLACELENGTH_PROGPATH 11
#define REPLACELENGTH_USERPATH 11
#define REPLACELENGTH_INSTURL 10
#define REPLACELENGTH_PROGURL 10
#define REPLACELENGTH_USERURL 10
-#define REPLACELENGTH_PATH 7
-#define REPLACELENGTH_LANG 7
-#define REPLACELENGTH_LANGID 9
-#define REPLACELENGTH_VLANG 8
+#define REPLACELENGTH_PATH 7
+#define REPLACELENGTH_LANG 7
+#define REPLACELENGTH_LANGID 9
+#define REPLACELENGTH_VLANG 8
#define REPLACELENGTH_WORKDIRURL 13
// --> PB 2004-10-27 #i32656# - new variable of hierachy service
#define REPLACELENGTH_BASEINSTURL 14
@@ -108,27 +108,28 @@
// <--
// Name of the pre defined path variables
-#define VARIABLE_INST "$(inst)"
-#define VARIABLE_PROG "$(prog)"
-#define VARIABLE_USER "$(user)"
-#define VARIABLE_WORK "$(work)"
-#define VARIABLE_HOME "$(home)"
-#define VARIABLE_TEMP "$(temp)"
-#define VARIABLE_PATH "$(path)"
-#define VARIABLE_LANG "$(lang)"
-#define VARIABLE_LANGID "$(langid)"
-#define VARIABLE_VLANG "$(vlang)"
-#define VARIABLE_INSTPATH "$(instpath)"
-#define VARIABLE_PROGPATH "$(progpath)"
-#define VARIABLE_USERPATH "$(userpath)"
-#define VARIABLE_INSTURL "$(insturl)"
-#define VARIABLE_PROGURL "$(progurl)"
-#define VARIABLE_USERURL "$(userurl)"
-#define VARIABLE_WORKDIRURL "$(workdirurl)"
+#define VARIABLE_INST "$(inst)"
+#define VARIABLE_PROG "$(prog)"
+#define VARIABLE_USER "$(user)"
+#define VARIABLE_WORK "$(work)"
+#define VARIABLE_HOME "$(home)"
+#define VARIABLE_TEMP "$(temp)"
+#define VARIABLE_PATH "$(path)"
+#define VARIABLE_LANG "$(lang)"
+#define VARIABLE_LANGID "$(langid)"
+#define VARIABLE_VLANG "$(vlang)"
+#define VARIABLE_INSTPATH "$(instpath)"
+#define VARIABLE_PROGPATH "$(progpath)"
+#define VARIABLE_USERPATH "$(userpath)"
+#define VARIABLE_INSTURL "$(insturl)"
+#define VARIABLE_PROGURL "$(progurl)"
+#define VARIABLE_USERURL "$(userurl)"
+#define VARIABLE_WORKDIRURL "$(workdirurl)"
// --> PB 2004-10-27 #i32656# - new variable of hierachy service
-#define VARIABLE_BASEINSTURL "$(baseinsturl)"
-#define VARIABLE_USERDATAURL "$(userdataurl)"
+#define VARIABLE_BASEINSTURL "$(baseinsturl)"
+#define VARIABLE_USERDATAURL "$(userdataurl)"
// <--
+#define VARIABLE_BRANDBASEURL "$(brandbaseurl)"
using namespace com::sun::star::uno;
using namespace com::sun::star::beans;
@@ -137,7 +138,7 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::container;
//_________________________________________________________________________________________________________________
-// Namespace
+// Namespace
//_________________________________________________________________________________________________________________
//
@@ -149,6 +150,7 @@ struct FixedVariable
const char* pVarName;
PreDefVariable nEnumValue;
int nStrLen;
+ bool bAbsPath;
};
struct TableEntry
@@ -162,11 +164,11 @@ struct TableEntry
// of the string
static TableEntry aOSTable[OS_COUNT] =
{
- { "WINDOWS" , 7 },
- { "UNIX" , 4 },
- { "SOLARIS" , 7 },
- { "LINUX" , 5 },
- { "" , 0 } // unknown
+ { "WINDOWS" , 7 },
+ { "UNIX" , 4 },
+ { "SOLARIS" , 7 },
+ { "LINUX" , 5 },
+ { "" , 0 } // unknown
};
// Table with valid environment variables
@@ -174,12 +176,12 @@ static TableEntry aOSTable[OS_COUNT] =
// the length of the string.
static TableEntry aEnvTable[ET_COUNT] =
{
- { "HOST" , 4 },
- { "YPDOMAIN" , 8 },
- { "DNSDOMAIN" , 9 },
- { "NTDOMAIN" , 8 },
- { "OS" , 2 },
- { "" , 0 } // unknown
+ { "HOST" , 4 },
+ { "YPDOMAIN" , 8 },
+ { "DNSDOMAIN" , 9 },
+ { "NTDOMAIN" , 8 },
+ { "OS" , 2 },
+ { "" , 0 } // unknown
};
// Priority table for the environment types. Lower numbers define
@@ -187,44 +189,43 @@ static TableEntry aEnvTable[ET_COUNT] =
// that the first match wins!!
static sal_Int16 aEnvPrioTable[ET_COUNT] =
{
- 1, // ET_HOST
- 2, // ET_IPDOMAIN
- 2, // ET_DNSDOMAIN
- 2, // ET_NTDOMAIN
- 3, // ET_OS
- 99, // ET_UNKNOWN
+ 1, // ET_HOST
+ 2, // ET_IPDOMAIN
+ 2, // ET_DNSDOMAIN
+ 2, // ET_NTDOMAIN
+ 3, // ET_OS
+ 99, // ET_UNKNOWN
};
// Table with all fixed/predefined variables supported.
static FixedVariable aFixedVarTable[] =
{
- { VARIABLE_INST, PREDEFVAR_INST, REPLACELENGTH_INST },
- { VARIABLE_PROG, PREDEFVAR_PROG, REPLACELENGTH_PROG },
- { VARIABLE_USER, PREDEFVAR_USER, REPLACELENGTH_USER },
- { VARIABLE_WORK, PREDEFVAR_WORK, REPLACELENGTH_WORK }, // Special variable (transient)!
- { VARIABLE_HOME, PREDEFVAR_HOME, REPLACELENGTH_HOME },
- { VARIABLE_TEMP, PREDEFVAR_TEMP, REPLACELENGTH_TEMP },
- { VARIABLE_PATH, PREDEFVAR_PATH, REPLACELENGTH_PATH },
- { VARIABLE_LANG, PREDEFVAR_LANG, REPLACELENGTH_LANG },
- { VARIABLE_LANGID, PREDEFVAR_LANGID, REPLACELENGTH_LANGID },
- { VARIABLE_VLANG, PREDEFVAR_VLANG, REPLACELENGTH_VLANG },
- { VARIABLE_INSTPATH, PREDEFVAR_INSTPATH, REPLACELENGTH_INSTPATH },
- { VARIABLE_PROGPATH, PREDEFVAR_PROGPATH, REPLACELENGTH_PROGPATH },
- { VARIABLE_USERPATH, PREDEFVAR_USERPATH, REPLACELENGTH_USERPATH },
- { VARIABLE_INSTURL, PREDEFVAR_INSTURL, REPLACELENGTH_INSTURL },
- { VARIABLE_PROGURL, PREDEFVAR_PROGURL, REPLACELENGTH_PROGURL },
- { VARIABLE_USERURL, PREDEFVAR_USERURL, REPLACELENGTH_USERURL },
- { VARIABLE_WORKDIRURL, PREDEFVAR_WORKDIRURL, REPLACELENGTH_WORKDIRURL }, // Special variable (transient) and don't use for resubstitution!
+ { VARIABLE_INST, PREDEFVAR_INST, REPLACELENGTH_INST, true },
+ { VARIABLE_PROG, PREDEFVAR_PROG, REPLACELENGTH_PROG, true },
+ { VARIABLE_USER, PREDEFVAR_USER, REPLACELENGTH_USER, true },
+ { VARIABLE_WORK, PREDEFVAR_WORK, REPLACELENGTH_WORK, true }, // Special variable (transient)!
+ { VARIABLE_HOME, PREDEFVAR_HOME, REPLACELENGTH_HOME, true },
+ { VARIABLE_TEMP, PREDEFVAR_TEMP, REPLACELENGTH_TEMP, true },
+ { VARIABLE_PATH, PREDEFVAR_PATH, REPLACELENGTH_PATH, true },
+ { VARIABLE_LANG, PREDEFVAR_LANG, REPLACELENGTH_LANG, false },
+ { VARIABLE_LANGID, PREDEFVAR_LANGID, REPLACELENGTH_LANGID, false },
+ { VARIABLE_VLANG, PREDEFVAR_VLANG, REPLACELENGTH_VLANG, false },
+ { VARIABLE_INSTPATH, PREDEFVAR_INSTPATH, REPLACELENGTH_INSTPATH, true },
+ { VARIABLE_PROGPATH, PREDEFVAR_PROGPATH, REPLACELENGTH_PROGPATH, true },
+ { VARIABLE_USERPATH, PREDEFVAR_USERPATH, REPLACELENGTH_USERPATH, true },
+ { VARIABLE_INSTURL, PREDEFVAR_INSTURL, REPLACELENGTH_INSTURL, true },
+ { VARIABLE_PROGURL, PREDEFVAR_PROGURL, REPLACELENGTH_PROGURL, true },
+ { VARIABLE_USERURL, PREDEFVAR_USERURL, REPLACELENGTH_USERURL, true },
+ { VARIABLE_WORKDIRURL, PREDEFVAR_WORKDIRURL, REPLACELENGTH_WORKDIRURL,true }, // Special variable (transient) and don't use for resubstitution!
// --> PB 2004-10-27 #i32656# - new variable of hierachy service
- { VARIABLE_BASEINSTURL, PREDEFVAR_BASEINSTURL, REPLACELENGTH_BASEINSTURL },
- { VARIABLE_USERDATAURL, PREDEFVAR_USERDATAURL, REPLACELENGTH_USERDATAURL },
+ { VARIABLE_BASEINSTURL, PREDEFVAR_BASEINSTURL, REPLACELENGTH_BASEINSTURL,true },
+ { VARIABLE_USERDATAURL, PREDEFVAR_USERDATAURL, REPLACELENGTH_USERDATAURL,true },
// <--
- { "$(brandbaseurl)", PREDEFVAR_BRANDBASEURL,
- RTL_CONSTASCII_LENGTH("$(brandbaseurl)") }
+ { VARIABLE_BRANDBASEURL,PREDEFVAR_BRANDBASEURL, RTL_CONSTASCII_LENGTH(VARIABLE_BRANDBASEURL), true }
};
//_________________________________________________________________________________________________________________
-// Implementation helper classes
+// Implementation helper classes
//_________________________________________________________________________________________________________________
//
@@ -252,11 +253,11 @@ EnvironmentType SubstitutePathVariables_Impl::GetEnvTypeFromString( const rtl::O
SubstitutePathVariables_Impl::SubstitutePathVariables_Impl( const Link& aNotifyLink ) :
utl::ConfigItem( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Office.Substitution" ))),
- m_bYPDomainRetrieved( sal_False ),
- m_bDNSDomainRetrieved( sal_False ),
- m_bNTDomainRetrieved( sal_False ),
- m_bHostRetrieved( sal_False ),
- m_bOSRetrieved( sal_False ),
+ m_bYPDomainRetrieved( false ),
+ m_bDNSDomainRetrieved( false ),
+ m_bNTDomainRetrieved( false ),
+ m_bHostRetrieved( false ),
+ m_bOSRetrieved( false ),
m_aListenerNotify( aNotifyLink ),
m_aSharePointsNodeName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SharePoints" ))),
m_aDirPropertyName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/Directory" ))),
@@ -302,10 +303,9 @@ void SubstitutePathVariables_Impl::GetSharePointsRules( SubstituteVariables& aSu
// We have found an active rule
aActiveRule.aSubstVariable = aSharePointNames[ nSharePoints ];
aSubstVarMap.insert( SubstituteVariables::value_type(
- aActiveRule.aSubstVariable, aActiveRule ));
+ aActiveRule.aSubstVariable, aActiveRule ));
}
}
-
++nSharePoints;
}
}
@@ -322,7 +322,7 @@ void SubstitutePathVariables_Impl::Commit()
//_________________________________________________________________________________________________________________
-// private methods
+// private methods
//_________________________________________________________________________________________________________________
//
@@ -407,18 +407,19 @@ const rtl::OUString& SubstitutePathVariables_Impl::GetHostName()
return m_aHost;
}
-sal_Bool SubstitutePathVariables_Impl::FilterRuleSet( const SubstituteRuleVector& aRuleSet, SubstituteRule& aActiveRule )
+bool SubstitutePathVariables_Impl::FilterRuleSet( const SubstituteRuleVector& aRuleSet, SubstituteRule& aActiveRule )
{
- sal_Bool bResult = sal_False;
+ bool bResult = sal_False;
if ( !aRuleSet.empty() )
{
- sal_Int16 nPrioCurrentRule = aEnvPrioTable[ ET_UNKNOWN ];
const sal_uInt32 nCount = aRuleSet.size();
+
+ sal_Int16 nPrioCurrentRule = aEnvPrioTable[ ET_UNKNOWN ];
for ( sal_uInt32 nIndex = 0; nIndex < nCount; nIndex++ )
{
const SubstituteRule& aRule = aRuleSet[nIndex];
- EnvironmentType eEnvType = aRule.aEnvType;
+ EnvironmentType eEnvType = aRule.aEnvType;
// Check if environment type has a higher priority than current one!
if ( nPrioCurrentRule > aEnvPrioTable[eEnvType] )
@@ -433,13 +434,13 @@ sal_Bool SubstitutePathVariables_Impl::FilterRuleSet( const SubstituteRuleVector
aHostStr = aHostStr.toAsciiLowerCase();
// Pattern match if domain environment match
- WildCard aPattern(aHostStr);
- sal_Bool bMatch = aPattern.Matches(aHost);
+ WildCard aPattern(aHostStr);
+ bool bMatch = aPattern.Matches(aHost);
if ( bMatch )
{
- aActiveRule = aRule;
- bResult = sal_True;
- nPrioCurrentRule = aEnvPrioTable[eEnvType];
+ aActiveRule = aRule;
+ bResult = true;
+ nPrioCurrentRule = aEnvPrioTable[eEnvType];
}
}
break;
@@ -462,13 +463,13 @@ sal_Bool SubstitutePathVariables_Impl::FilterRuleSet( const SubstituteRuleVector
aDomain = GetNTDomainName();
// Pattern match if domain environment match
- WildCard aPattern(aDomainStr);
- sal_Bool bMatch = aPattern.Matches(aDomain);
+ WildCard aPattern(aDomainStr);
+ bool bMatch = aPattern.Matches(aDomain);
if ( bMatch )
{
- aActiveRule = aRule;
- bResult = sal_True;
- nPrioCurrentRule = aEnvPrioTable[eEnvType];
+ aActiveRule = aRule;
+ bResult = true;
+ nPrioCurrentRule = aEnvPrioTable[eEnvType];
}
}
break;
@@ -481,24 +482,24 @@ sal_Bool SubstitutePathVariables_Impl::FilterRuleSet( const SubstituteRuleVector
sal_Int16 nValue = 0;
aRule.aEnvValue >>= nValue;
- sal_Bool bUnix = ( eOSType == OS_LINUX ) || ( eOSType == OS_SOLARIS );
+ bool bUnix = ( eOSType == OS_LINUX ) || ( eOSType == OS_SOLARIS );
OperatingSystem eRuleOSType = (OperatingSystem)nValue;
// Match if OS identical or rule is set to UNIX and OS is LINUX/SOLARIS!
if (( eRuleOSType == eOSType ) || ( eRuleOSType == OS_UNIX && bUnix ))
{
- aActiveRule = aRule;
- bResult = sal_True;
- nPrioCurrentRule = aEnvPrioTable[eEnvType];
+ aActiveRule = aRule;
+ bResult = true;
+ nPrioCurrentRule = aEnvPrioTable[eEnvType];
}
}
break;
- case ET_UNKNOWN: // nothing to do
- break;
+ case ET_UNKNOWN: // nothing to do
+ break;
- default:
- break;
+ default:
+ break;
}
}
}
@@ -514,9 +515,9 @@ void SubstitutePathVariables_Impl::ReadSharePointsFromConfiguration( Sequence< r
}
void SubstitutePathVariables_Impl::ReadSharePointRuleSetFromConfiguration(
- const rtl::OUString& aSharePointName,
- const rtl::OUString& aSharePointNodeName,
- SubstituteRuleVector& rRuleSet )
+ const rtl::OUString& aSharePointName,
+ const rtl::OUString& aSharePointNodeName,
+ SubstituteRuleVector& rRuleSet )
{
Sequence< rtl::OUString > aSharePointMappingsNodeNames = GetNodeNames( aSharePointNodeName, utl::CONFIG_NAME_LOCAL_PATH );
@@ -569,7 +570,7 @@ void SubstitutePathVariables_Impl::ReadSharePointRuleSetFromConfiguration(
}
// Decode the environment and optional the operatng system settings
- Any aEnvValue;
+ Any aEnvValue;
EnvironmentType eEnvType = GetEnvTypeFromString( aEnvUsed );
if ( eEnvType == ET_OS )
{
@@ -588,13 +589,12 @@ void SubstitutePathVariables_Impl::ReadSharePointRuleSetFromConfiguration(
}
//*****************************************************************************************************************
-// XInterface, XTypeProvider, XServiceInfo
+// XInterface, XTypeProvider, XServiceInfo
//*****************************************************************************************************************
-DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( SubstitutePathVariables ,
- ::cppu::OWeakObject ,
- SERVICENAME_SUBSTITUTEPATHVARIABLES ,
- IMPLEMENTATIONNAME_SUBSTITUTEPATHVARIABLES
- )
+DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( SubstitutePathVariables ,
+ ::cppu::OWeakObject ,
+ SERVICENAME_SUBSTITUTEPATHVARIABLES ,
+ IMPLEMENTATIONNAME_SUBSTITUTEPATHVARIABLES )
DEFINE_INIT_SERVICE ( SubstitutePathVariables, {} )
@@ -626,16 +626,15 @@ SubstitutePathVariables::SubstitutePathVariables( const Reference< XMultiService
// Sort predefined/fixed variable to path length
for ( i = 0; i < PREDEFVAR_COUNT; i++ )
{
- if (( i != PREDEFVAR_WORKDIRURL ) &&
- ( i != PREDEFVAR_PATH ))
+ if (( i != PREDEFVAR_WORKDIRURL ) && ( i != PREDEFVAR_PATH ))
{
// Special path variables, don't include into automatic resubstituion search!
// $(workdirurl) is not allowed to resubstitute! This variable is the value of path settings entry
// and it could be possible that it will be resubstituted by itself!!
// Example: WORK_PATH=c:\test, $(workdirurl)=WORK_PATH => WORK_PATH=$(workdirurl) and this cannot be substituted!
ReSubstFixedVarOrder aFixedVar;
- aFixedVar.eVariable = aFixedVarTable[i].nEnumValue;
- aFixedVar.nVarValueLength = m_aPreDefVars.m_FixedVar[(sal_Int32)aFixedVar.eVariable].getLength();
+ aFixedVar.eVariable = aFixedVarTable[i].nEnumValue;
+ aFixedVar.nVarValueLength = m_aPreDefVars.m_FixedVar[(sal_Int32)aFixedVar.eVariable].getLength();
m_aReSubstFixedVarOrder.push_back( aFixedVar );
}
}
@@ -650,8 +649,8 @@ SubstitutePathVariables::SubstitutePathVariables( const Reference< XMultiService
aStrBuffer.append( m_aVarStart );
aStrBuffer.append( pIter->second.aSubstVariable );
aStrBuffer.append( m_aVarEnd );
- aUserOrderVar.aVarName = aStrBuffer.makeStringAndClear();
- aUserOrderVar.nVarValueLength = pIter->second.aSubstVariable.getLength();
+ aUserOrderVar.aVarName = aStrBuffer.makeStringAndClear();
+ aUserOrderVar.nVarValueLength = pIter->second.aSubstVariable.getLength();
m_aReSubstUserVarOrder.push_back( aUserOrderVar );
}
m_aReSubstUserVarOrder.sort();
@@ -687,7 +686,7 @@ throw ( NoSuchElementException, RuntimeException )
}
//_________________________________________________________________________________________________________________
-// protected methods
+// protected methods
//_________________________________________________________________________________________________________________
//
@@ -702,7 +701,7 @@ IMPL_LINK( SubstitutePathVariables, implts_ConfigurationNotify, SubstitutePathNo
rtl::OUString SubstitutePathVariables::ConvertOSLtoUCBURL( const rtl::OUString& aOSLCompliantURL ) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::ConvertOSLtoUCBURL" );
- String aResult;
+ String aResult;
rtl::OUString aTemp;
osl::FileBase::getSystemPathFromFileURL( aOSLCompliantURL, aTemp );
@@ -718,7 +717,7 @@ rtl::OUString SubstitutePathVariables::ConvertOSLtoUCBURL( const rtl::OUString&
rtl::OUString SubstitutePathVariables::GetWorkPath() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::GetWorkPath" );
- rtl::OUString aWorkPath;
+ rtl::OUString aWorkPath;
::comphelper::ConfigurationHelper::readDirectKey(
m_xServiceManager,
::rtl::OUString::createFromAscii("org.openoffice.Office.Paths"),
@@ -739,7 +738,7 @@ rtl::OUString SubstitutePathVariables::GetWorkVariableValue() const
::rtl::OUString::createFromAscii("Work"),
::comphelper::ConfigurationHelper::E_READONLY) >>= aWorkPath;
- // fallback to $HOME in case platform dependend config layer does not return
+ // fallback to $HOME in case platform dependend config layer does not return
// an usuable work dir value.
if (aWorkPath.getLength() < 1)
{
@@ -773,7 +772,7 @@ rtl::OUString SubstitutePathVariables::GetPathVariableValue() const
rtl::OUString aPathList( pEnv, strlen( pEnv ), gsl_getSystemTextEncoding() );
rtl::OUStringBuffer aPathStrBuffer( aPathList.getLength() * PATH_EXTEND_FACTOR / 100 );
- sal_Bool bAppendSep = sal_False;
+ bool bAppendSep = false;
sal_Int32 nToken = 0;
do
{
@@ -784,7 +783,7 @@ rtl::OUString SubstitutePathVariables::GetPathVariableValue() const
if ( bAppendSep )
aPathStrBuffer.appendAscii( ";" ); // Office uses ';' as path separator
aPathStrBuffer.append( aTmp );
- bAppendSep = sal_True;
+ bAppendSep = true;
}
}
while(nToken>=0);
@@ -795,7 +794,7 @@ rtl::OUString SubstitutePathVariables::GetPathVariableValue() const
return aRetStr;
}
-rtl::OUString SubstitutePathVariables::impl_substituteVariable( const ::rtl::OUString& rText, sal_Bool bSubstRequired )
+rtl::OUString SubstitutePathVariables::impl_substituteVariable( const ::rtl::OUString& rText, bool bSubstRequired )
throw ( NoSuchElementException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::impl_substituteVariable" );
@@ -811,9 +810,9 @@ throw ( NoSuchElementException, RuntimeException )
// Search for first occure of "$(...".
sal_Int32 nDepth = 0;
sal_Int32 bSubstitutionCompleted = sal_False;
- sal_Int32 nPosition = aWorkText.indexOf( m_aVarStart ); // = first position of "$(" in string
+ sal_Int32 nPosition = aWorkText.indexOf( m_aVarStart ); // = first position of "$(" in string
sal_Int32 nLength = 0; // = count of letters from "$(" to ")" in string
- sal_Bool bVarNotSubstituted = sal_False;
+ bool bVarNotSubstituted = false;
// Have we found any variable like "$(...)"?
if ( nPosition != STRPOS_NOTFOUND )
@@ -826,17 +825,17 @@ throw ( NoSuchElementException, RuntimeException )
}
// Is there something to replace ?
- sal_Bool bWorkRetrieved = sal_False;
- sal_Bool bWorkDirURLRetrieved = sal_False;
+ bool bWorkRetrieved = false;
+ bool bWorkDirURLRetrieved = false;
while ( !bSubstitutionCompleted && nDepth < nMaxRecursiveDepth )
{
while ( ( nPosition != STRPOS_NOTFOUND ) && ( nLength > 3 ) ) // "$(" ")"
{
// YES; Get the next variable for replace.
- sal_Int32 nReplaceLength = 0;
- rtl::OUString aReplacement;
- rtl::OUString aSubString = aWorkText.copy( nPosition, nLength );
- rtl::OUString aSubVarString;
+ sal_Int32 nReplaceLength = 0;
+ rtl::OUString aReplacement;
+ rtl::OUString aSubString = aWorkText.copy( nPosition, nLength );
+ rtl::OUString aSubVarString;
// Path variables are not case sensitive!
aSubVarString = aSubString.toAsciiLowerCase();
@@ -851,17 +850,24 @@ throw ( NoSuchElementException, RuntimeException )
{
// Transient value, retrieve it again
m_aPreDefVars.m_FixedVar[ (PreDefVariable)nIndex ] = GetWorkVariableValue();
- bWorkRetrieved = sal_True;
+ bWorkRetrieved = true;
}
else if ( nIndex == PREDEFVAR_WORKDIRURL && !bWorkDirURLRetrieved )
{
// Transient value, retrieve it again
m_aPreDefVars.m_FixedVar[ (PreDefVariable)nIndex ] = GetWorkPath();
- bWorkDirURLRetrieved = sal_True;
+ bWorkDirURLRetrieved = true;
}
- aReplacement = m_aPreDefVars.m_FixedVar[ (PreDefVariable)nIndex ];
- nReplaceLength = nLength;
+ // Check preconditions to substitue path variables.
+ // 1. A path variable can only be substituted if it follows a SEARCHPATH_DELIMITER ';'!
+ // 2. It's located exactly at the start of the string being substituted!
+ if (( aFixedVarTable[ int( nIndex ) ].bAbsPath && (( nPosition == 0 ) || (( nPosition > 0 ) && ( aWorkText[nPosition-1] == ';')))) ||
+ ( !aFixedVarTable[ int( nIndex ) ].bAbsPath ))
+ {
+ aReplacement = m_aPreDefVars.m_FixedVar[ (PreDefVariable)nIndex ];
+ nReplaceLength = nLength;
+ }
}
else
{
@@ -870,7 +876,7 @@ throw ( NoSuchElementException, RuntimeException )
SubstituteVariables::const_iterator pIter = m_aSubstVarMap.find( aVarName );
if ( pIter != m_aSubstVarMap.end() )
{
- // found!
+ // Found.
aReplacement = pIter->second.aSubstValue;
nReplaceLength = nLength;
}
@@ -885,7 +891,7 @@ throw ( NoSuchElementException, RuntimeException )
else
{
// Variable not known
- bVarNotSubstituted = sal_False;
+ bVarNotSubstituted = false;
nPosition += nLength;
}
@@ -1017,8 +1023,8 @@ throw ( RuntimeException )
}
// Due to a recursive definition this code must exchange variables with variables!
- sal_Bool bResubstitutionCompleted = sal_False;
- sal_Bool bVariableFound = sal_False;
+ bool bResubstitutionCompleted = false;
+ bool bVariableFound = false;
// Get transient predefined path variable $(work) value before starting resubstitution
m_aPreDefVars.m_FixedVar[ PREDEFVAR_WORK ] = GetWorkVariableValue();
@@ -1032,7 +1038,7 @@ throw ( RuntimeException )
sal_Int32 nPos = aURL.indexOf( aValue );
if ( nPos >= 0 )
{
- sal_Bool bMatch = sal_True;
+ bool bMatch = true;
if ( pIterFixed->eVariable == PREDEFVAR_LANG ||
pIterFixed->eVariable == PREDEFVAR_LANGID ||
pIterFixed->eVariable == PREDEFVAR_VLANG )
@@ -1058,7 +1064,7 @@ throw ( RuntimeException )
aStrBuffer.append( m_aPreDefVars.m_FixedVarNames[ (sal_Int32)pIterFixed->eVariable ] ); // Get the variable name for struct var name array!
aStrBuffer.append( aURL.copy( nPos + aValue.getLength(), ( aURL.getLength() - ( nPos + aValue.getLength() )) ));
aURL = aStrBuffer.makeStringAndClear();
- bVariableFound = sal_True; // Resubstitution not finished yet!
+ bVariableFound = true; // Resubstitution not finished yet!
break;
}
}
@@ -1079,12 +1085,12 @@ throw ( RuntimeException )
aStrBuffer.append( m_aVarEnd );
aStrBuffer.append( aURL.copy( nPos + aVarValue.getLength(), ( aURL.getLength() - ( nPos + aVarValue.getLength() )) ));
aURL = aStrBuffer.makeStringAndClear();
- bVariableFound = sal_True; // Resubstitution not finished yet!
+ bVariableFound = true; // Resubstitution not finished yet!
}
}
if ( !bVariableFound )
- bResubstitutionCompleted = sal_True;
+ bResubstitutionCompleted = true;
else
bVariableFound = sal_False; // Next resubstitution
}
@@ -1150,7 +1156,7 @@ throw ( NoSuchElementException, RuntimeException )
void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariables& aPreDefPathVariables )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "SubstitutePathVariables::SetPredefinedPathVariables" );
- Any aAny;
+ Any aAny;
::rtl::OUString aOfficePath;
::rtl::OUString aUserPath;
::rtl::OUString aTmp;
@@ -1170,12 +1176,12 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable
}
aState = utl::Bootstrap::locateUserData( sVal );
+ //There can be the valid case that there is no user installation. For example, "unopkg sync"
+ //is currently (OOo3.4) run as part of the setup. Then no user installation is required.
+ //Therefore we do not assert here.
if( aState == ::utl::Bootstrap::PATH_EXISTS ) {
aPreDefPathVariables.m_FixedVar[ PREDEFVAR_USERPATH ] = ConvertOSLtoUCBURL( sVal );
}
- else {
- LOG_ERROR( "SubstitutePathVariables::SetPredefinedPathVariables", "Bootstrap code has no value for userpath");
- }
// Set $(inst), $(instpath), $(insturl)
aPreDefPathVariables.m_FixedVar[ PREDEFVAR_INSTURL ] = aPreDefPathVariables.m_FixedVar[ PREDEFVAR_INSTPATH ];
@@ -1194,14 +1200,12 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable
// Detect the program directory
// Set $(prog), $(progpath), $(progurl)
INetURLObject aProgObj(
- aPreDefPathVariables.m_FixedVar[ PREDEFVAR_INSTPATH ] );
- if ( !aProgObj.HasError() &&
- aProgObj.insertName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("program")) ) )
+ aPreDefPathVariables.m_FixedVar[ PREDEFVAR_INSTPATH ] );
+ if ( !aProgObj.HasError() && aProgObj.insertName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("program")) ) )
{
- aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGPATH ] = aProgObj.GetMainURL(INetURLObject::NO_DECODE);
- aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGURL ] = aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGPATH ];
- aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROG ] = aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGPATH ];
+ aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGPATH ] = aProgObj.GetMainURL(INetURLObject::NO_DECODE);
+ aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGURL ] = aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGPATH ];
+ aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROG ] = aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGPATH ];
}
// Detect the language type of the current office
@@ -1216,7 +1220,8 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable
// Set $(lang)
aPreDefPathVariables.m_FixedVar[ PREDEFVAR_LANG ] = ConvertOSLtoUCBURL(
- rtl::OUString::createFromAscii( ResMgr::GetLang( aPreDefPathVariables.m_eLanguageType, 0 ) ));
+ rtl::OUString::createFromAscii( ResMgr::GetLang( aPreDefPathVariables.m_eLanguageType, 0 ) ));
+
// Set $(vlang)
aPreDefPathVariables.m_FixedVar[ PREDEFVAR_VLANG ] = aLocaleStr;
@@ -1241,7 +1246,7 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable
aPreDefPathVariables.m_FixedVar[ PREDEFVAR_TEMP ] = ConvertOSLtoUCBURL( aTmp );
aPreDefPathVariables.m_FixedVar[PREDEFVAR_BRANDBASEURL] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR"));
+ RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR"));
rtl::Bootstrap::expandMacros(
aPreDefPathVariables.m_FixedVar[PREDEFVAR_BRANDBASEURL]);
}
diff --git a/framework/util/fwk.component b/framework/util/fwk.component
index e6ceb91e8090..c460ecbccd70 100644
--- a/framework/util/fwk.component
+++ b/framework/util/fwk.component
@@ -139,4 +139,7 @@
<implementation name="com.sun.star.comp.framework.jobs.JobDispatch">
<service name="com.sun.star.frame.ProtocolHandler"/>
</implementation>
+ <implementation name="com.sun.star.comp.framework.TabWindowService">
+ <service name="com.sun.star.ui.dialogs.TabContainerWindow"/>
+ </implementation>
</component>
diff --git a/framework/util/fwl.component b/framework/util/fwl.component
index aa124d1cdc4b..99c5ca7213e6 100644
--- a/framework/util/fwl.component
+++ b/framework/util/fwl.component
@@ -85,9 +85,6 @@
<implementation name="com.sun.star.comp.framework.SimpleTextStatusbarController">
<service name="com.sun.star.frame.StatusbarController"/>
</implementation>
- <implementation name="com.sun.star.comp.framework.TabWindowService">
- <service name="com.sun.star.ui.dialogs.TabContainerWindow"/>
- </implementation>
<implementation name="com.sun.star.comp.framework.ToolBarsMenuController">
<service name="com.sun.star.frame.PopupMenuController"/>
</implementation>
diff --git a/officecfg/prj/build.lst b/officecfg/prj/build.lst
index 04d2cfd87aef..b07a34aee982 100644
--- a/officecfg/prj/build.lst
+++ b/officecfg/prj/build.lst
@@ -1,4 +1,4 @@
-oc officecfg : l10n soltools solenv LIBXSLT:libxslt NULL
+oc officecfg : L10N:l10n soltools solenv LIBXSLT:libxslt NULL
oc officecfg usr1 - all oc_mkout NULL
oc officecfg\registry\schema nmake - all oc_reg_schema NULL
oc officecfg\registry nmake - all oc_reg NULL
diff --git a/officecfg/registry/data/org/openoffice/Office/Canvas.xcu b/officecfg/registry/data/org/openoffice/Office/Canvas.xcu
index 00030d71bf9b..a51ff5b244c8 100755
--- a/officecfg/registry/data/org/openoffice/Office/Canvas.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Canvas.xcu
@@ -14,6 +14,8 @@
<value>
<!-- Matrox G550 - blank display on 2nd head -->
4139 9511 260313131 1 5 13 1 1320
+ <!-- Matrox G550 - blank display (single head?) -->
+ 4139 9511 255987755 1 6 12 1 1930
<!-- Matrox G400 - random crashes -->
4139 1317 54005803 4 5 12 1 1200
<!-- Mobility Radeon M6 16MB - blank screen 1st slide on internal LCD -->
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 5c72d948436f..a30d746d5043 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -170,7 +170,7 @@
</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>
+ <value xml:lang="en-US">Pivot Table Filter</value>
</prop>
</node>
<node oor:name=".uno:NextPage" oor:op="replace">
@@ -323,10 +323,10 @@
</node>
<node oor:name=".uno:DataDataPilotRun" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Start DataPilot...</value>
+ <value xml:lang="en-US">~Create Pivot Table...</value>
</prop>
<prop oor:name="ContextLabel" oor:type="xs:string">
- <value xml:lang="en-US">~Start...</value>
+ <value xml:lang="en-US">~Create...</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
@@ -1131,7 +1131,7 @@
</node>
<node oor:name=".uno:RecalcPivotTable" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Refresh DataPilot</value>
+ <value xml:lang="en-US">~Refresh Pivot Table</value>
</prop>
<prop oor:name="ContextLabel" oor:type="xs:string">
<value xml:lang="en-US">~Refresh</value>
@@ -1139,7 +1139,7 @@
</node>
<node oor:name=".uno:DeletePivotTable" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Delete DataPilot</value>
+ <value xml:lang="en-US">~Delete Pivot Table</value>
</prop>
<prop oor:name="ContextLabel" oor:type="xs:string">
<value xml:lang="en-US">~Delete</value>
@@ -1532,7 +1532,7 @@
</node>
<node oor:name=".uno:DataPilotMenu" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Data~Pilot</value>
+ <value xml:lang="en-US">~Pivot Table</value>
</prop>
</node>
<node oor:name=".uno:EditSheetMenu" oor:op="replace">
diff --git a/officecfg/registry/data/org/openoffice/Setup.xcu b/officecfg/registry/data/org/openoffice/Setup.xcu
index e8b483b8622d..27054b8a3417 100644
--- a/officecfg/registry/data/org/openoffice/Setup.xcu
+++ b/officecfg/registry/data/org/openoffice/Setup.xcu
@@ -348,7 +348,7 @@
<value >swform</value>
</prop>
<prop oor:name="ooSetupFactoryUIName">
- <value>Base: Form Design</value>
+ <value>Base: Database Form</value>
</prop>
<prop oor:name="ooSetupFactoryWindowStateConfigRef">
<value >WriterFormWindowState</value>
diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 913902731f29..aeddefb763c2 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1039,7 +1039,7 @@
with no exception.</desc>
<label>QuotedFieldAsText</label>
</info>
- <value>true</value>
+ <value>false</value>
</prop>
<prop oor:name="DetectSpecialNumbers" oor:type="xs:boolean">
<info>
diff --git a/officecfg/util/makefile.mk b/officecfg/util/makefile.mk
index 332ac90fe2ea..c1fa54277141 100644
--- a/officecfg/util/makefile.mk
+++ b/officecfg/util/makefile.mk
@@ -37,7 +37,6 @@ TARGET=util
$(MISC)$/$(TARGET)_delzip :
-$(RM) $(BIN)$/registry_{$(alllangiso)}.zip
- -$(RM) $(COMMON_OUTPUT)$/bin$/registry_{$(alllangiso)}.zip
$(BIN)$/registry_{$(alllangiso)}.zip : $(MISC)$/$(TARGET)_delzip
cd $(MISC)$/registry$/res$/$(@:b:s/registry_//) && zip -ru ..$/..$/..$/..$/bin$/registry_$(@:b:s/registry_//).zip org/*
diff --git a/readlicense_oo/prj/build.lst b/readlicense_oo/prj/build.lst
index 987672db4ebe..bf438e28fe1d 100644
--- a/readlicense_oo/prj/build.lst
+++ b/readlicense_oo/prj/build.lst
@@ -1,4 +1,4 @@
-ro readlicense_oo : l10n solenv LIBXSLT:libxslt NULL
+ro readlicense_oo : L10N:l10n solenv LIBXSLT:libxslt NULL
ro readlicense_oo usr1 - all ro_root NULL
ro readlicense_oo\docs\readme nmake - all ro_readme NULL
ro readlicense_oo\html nmake - all ro_html NULL
diff --git a/scripting/java/com/sun/star/script/framework/provider/SwingInvocation.java b/scripting/java/com/sun/star/script/framework/provider/SwingInvocation.java
new file mode 100644
index 000000000000..fffb78523798
--- /dev/null
+++ b/scripting/java/com/sun/star/script/framework/provider/SwingInvocation.java
@@ -0,0 +1,44 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2011 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+package com.sun.star.script.framework.provider;
+
+import javax.swing.SwingUtilities;
+
+// On Mac OS X, AWT/Swing must not be accessed from the AppKit thread, so call
+// SwingUtilities.invokeLater always on a fresh thread to avoid that problem
+// (also, the current thread must not wait for that fresh thread to terminate,
+// as that would cause a deadlock if this thread is the AppKit thread):
+public final class SwingInvocation {
+ public static void invoke(final Runnable doRun) {
+ new Thread("SwingInvocation") {
+ public void run() { SwingUtilities.invokeLater(doRun); }
+ }.start();
+ }
+
+ private SwingInvocation() {}
+}
diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java
index 4fd5d85ac28d..167e9297e861 100644
--- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java
+++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java
@@ -47,6 +47,7 @@ import java.util.HashMap;
import com.sun.star.script.provider.XScriptContext;
import com.sun.star.script.framework.provider.ScriptEditor;
+import com.sun.star.script.framework.provider.SwingInvocation;
import com.sun.star.script.framework.container.ScriptMetaData;
import com.sun.star.script.framework.provider.ClassLoaderFactory;
@@ -128,7 +129,9 @@ public class ScriptEditorForBeanShell
*/
public static ScriptEditorForBeanShell getEditor(URL url)
{
- return (ScriptEditorForBeanShell)BEING_EDITED.get(url);
+ synchronized (BEING_EDITED) {
+ return (ScriptEditorForBeanShell)BEING_EDITED.get(url);
+ }
}
/**
@@ -194,8 +197,7 @@ public class ScriptEditorForBeanShell
* @param context The context in which to execute the script
*
*/
- public void edit(XScriptContext context, ScriptMetaData entry) {
-
+ public void edit(final XScriptContext context, ScriptMetaData entry) {
if (entry != null ) {
try {
ClassLoader cl = null;
@@ -205,26 +207,30 @@ public class ScriptEditorForBeanShell
catch (Exception ignore) // TODO re-examine error handling
{
}
+ final ClassLoader theCl = cl;
String sUrl = entry.getParcelLocation();
if ( !sUrl.endsWith( "/" ) )
{
sUrl += "/";
}
sUrl += entry.getLanguageName();
- URL url = entry.getSourceURL();
-
- // check if there is already an editing session for this script
- if (BEING_EDITED.containsKey(url))
- {
- ScriptEditorForBeanShell editor =
- (ScriptEditorForBeanShell) BEING_EDITED.get(url);
-
- editor.frame.toFront();
- }
- else
- {
- new ScriptEditorForBeanShell(context, cl, url);
- }
+ final URL url = entry.getSourceURL();
+ SwingInvocation.invoke(
+ new Runnable() {
+ public void run() {
+ ScriptEditorForBeanShell editor;
+ synchronized (BEING_EDITED) {
+ editor = (ScriptEditorForBeanShell)
+ BEING_EDITED.get(url);
+ if (editor == null) {
+ editor = new ScriptEditorForBeanShell(
+ context, theCl, url);
+ BEING_EDITED.put(url, editor);
+ }
+ }
+ editor.frame.toFront();
+ }
+ });
}
catch (IOException ioe) {
showErrorMessage( "Error loading file: " + ioe.getMessage() );
@@ -269,8 +275,6 @@ public class ScriptEditorForBeanShell
this.model.setView(this.view);
initUI();
frame.show();
-
- BEING_EDITED.put(url, this);
}
private void showErrorMessage(String message) {
@@ -384,7 +388,7 @@ public class ScriptEditorForBeanShell
private void shutdown()
{
- if (BEING_EDITED.containsKey(scriptURL)) {
+ synchronized (BEING_EDITED) {
BEING_EDITED.remove(scriptURL);
}
}
diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java
index b9849d1e4e1d..0b62ece9cc9f 100644
--- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java
+++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java
@@ -36,6 +36,7 @@ import org.mozilla.javascript.tools.debugger.ScopeProvider;
import com.sun.star.script.provider.XScriptContext;
import com.sun.star.script.framework.container.ScriptMetaData;
import com.sun.star.script.framework.provider.ScriptEditor;
+import com.sun.star.script.framework.provider.SwingInvocation;
import com.sun.star.script.framework.log.LogUtils;
import java.io.InputStream;
@@ -45,7 +46,6 @@ import java.net.URL;
import java.util.Map;
import java.util.HashMap;
-import javax.swing.SwingUtilities;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
@@ -117,7 +117,9 @@ public class ScriptEditorForJavaScript implements ScriptEditor
*/
public static ScriptEditorForJavaScript getEditor(URL url)
{
- return (ScriptEditorForJavaScript)BEING_EDITED.get(url);
+ synchronized (BEING_EDITED) {
+ return (ScriptEditorForJavaScript)BEING_EDITED.get(url);
+ }
}
/**
@@ -187,31 +189,25 @@ public class ScriptEditorForJavaScript implements ScriptEditor
sUrl += "/";
}
sUrl += entry.getLanguageName();
- URL url = entry.getSourceURL();
-
- // check if there is already an editing session for this script
- //if (BEING_EDITED.containsKey(url))
- if ( rhinoWindow != null )
- {
- ScriptEditorForJavaScript editor =
- (ScriptEditorForJavaScript) BEING_EDITED.get(url);
- if ( editor == null )
- {
- editor = new ScriptEditorForJavaScript( context, url );
- editor.edit( context, entry );
- }
- else
- {
- rhinoWindow.showScriptWindow( url );
- }
- }
- else
- {
- ScriptEditorForJavaScript editor =
- new ScriptEditorForJavaScript( context, url );
-
- }
- rhinoWindow.toFront();
+ final URL url = entry.getSourceURL();
+ SwingInvocation.invoke(
+ new Runnable() {
+ public void run() {
+ synchronized (BEING_EDITED) {
+ ScriptEditorForJavaScript editor =
+ (ScriptEditorForJavaScript) BEING_EDITED.get(
+ url);
+ if (editor == null) {
+ editor = new ScriptEditorForJavaScript(
+ context, url);
+ BEING_EDITED.put(url, editor);
+ }
+ }
+ assert rhinoWindow != null;
+ rhinoWindow.showScriptWindow(url);
+ rhinoWindow.toFront();
+ }
+ });
}
catch ( IOException e )
{
@@ -234,11 +230,6 @@ public class ScriptEditorForJavaScript implements ScriptEditor
this.scriptURL = url;
- synchronized( ScriptEditorForJavaScript.class )
- {
- BEING_EDITED.put(url, this);
- }
-
}
/**
@@ -274,13 +265,9 @@ public class ScriptEditorForJavaScript implements ScriptEditor
}
final Main sdb = new Main("Rhino JavaScript Debugger");
- swingInvoke(new Runnable() {
- public void run() {
- sdb.pack();
- sdb.setSize(640, 640);
- sdb.setVisible(true);
- }
- });
+ sdb.pack();
+ sdb.setSize(640, 640);
+ sdb.setVisible(true);
sdb.setExitAction(new Runnable() {
public void run() {
sdb.clearAllBreakpoints();
@@ -306,18 +293,6 @@ public class ScriptEditorForJavaScript implements ScriptEditor
}
}
- private static void swingInvoke(Runnable f) {
- if (SwingUtilities.isEventDispatchThread()) {
- f.run();
- return;
- }
- try {
- SwingUtilities.invokeAndWait(f);
- } catch (Exception exc) {
- LogUtils.DEBUG( LogUtils.getTrace( exc ) );
- }
- }
-
private void shutdown()
{
// dereference Rhino Debugger window
diff --git a/sfx2/inc/sfx2/dinfdlg.hxx b/sfx2/inc/sfx2/dinfdlg.hxx
index 8cf17e3f6e4f..61e972c99278 100644
--- a/sfx2/inc/sfx2/dinfdlg.hxx
+++ b/sfx2/inc/sfx2/dinfdlg.hxx
@@ -552,9 +552,9 @@ public:
class SfxCustomPropertiesPage : public SfxTabPage
{
private:
- FixedText m_aPropertiesFT;
CustomPropertiesControl m_aPropertiesCtrl;
PushButton m_aAddBtn;
+ FixedText m_aPropertiesFT; // Sym2_5121----, Moved by Steve Yin
DECL_LINK( AddHdl, PushButton* );
diff --git a/sfx2/inc/sfx2/mgetempl.hxx b/sfx2/inc/sfx2/mgetempl.hxx
index 60375f5272c0..a599163116e5 100644
--- a/sfx2/inc/sfx2/mgetempl.hxx
+++ b/sfx2/inc/sfx2/mgetempl.hxx
@@ -70,9 +70,9 @@ class SfxManageStyleSheetPage : public SfxTabPage
FixedText aFilterFt;
ListBox aFilterLb;
+ FixedLine aDescGb;
FixedInfo aDescFt;
MultiLineEdit aDescED;
- FixedLine aDescGb;
SfxStyleSheetBase *pStyle;
SfxStyleFamilies *pFamilies;
diff --git a/sfx2/inc/sfx2/module.hxx b/sfx2/inc/sfx2/module.hxx
index f944b29c18da..5551df850ff2 100644
--- a/sfx2/inc/sfx2/module.hxx
+++ b/sfx2/inc/sfx2/module.hxx
@@ -34,6 +34,7 @@
#include <sfx2/imgdef.hxx>
#include <sal/types.h>
#include <tools/fldunit.hxx>
+#include <com/sun/star/uno/Reference.hxx>
class ImageList;
@@ -56,6 +57,9 @@ class SfxStbCtrlFactArr_Impl;
class SfxTabPage;
class Window;
+namespace com { namespace sun { namespace star { namespace frame {
+ class XFrame;
+} } } }
//====================================================================
class SFX2_DLLPUBLIC SfxModule : public SfxShell
@@ -97,6 +101,14 @@ public:
static SfxModule* GetActiveModule( SfxViewFrame* pFrame=NULL );
static FieldUnit GetCurrentFieldUnit();
+ /** retrieves the field unit of the module belonging to the document displayed in the given frame
+
+ Effectively, this method looks up the SfxViewFrame belonging to the given XFrame, then the SfxModule belonging to
+ the document in this frame, then this module's field unit.
+
+ Failures in any of those steps are reported as assertion in non-product builds, and then FUNIT_100TH_MM is returned.
+ */
+ static FieldUnit GetModuleFieldUnit( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > const & i_frame );
FieldUnit GetFieldUnit() const;
//#if 0 // _SOLAR__PRIVATE
diff --git a/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc
index ca1d3eb6b8a4..dfa3cc8593ec 100755
--- a/sfx2/inc/sfx2/sfx.hrc
+++ b/sfx2/inc/sfx2/sfx.hrc
@@ -253,6 +253,9 @@
#define STR_ERRUNOEVENTBINDUNG (RID_SFX_START+119)
#define STR_SHARED (RID_SFX_START+120)
#define RID_XMLSEC_DOCUMENTSIGNED (RID_SFX_START+121)
+// IAccessibility2 implementation 2009. ------
+#define STR_ACCTITLE_PRODUCTIVITYTOOLS (RID_SFX_START+157)
+// ------ IAccessibility2 implementation 2009.
//=========================================================================
diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst
index ca582c0aaf12..f25e991f84f4 100644
--- a/sfx2/prj/build.lst
+++ b/sfx2/prj/build.lst
@@ -1,3 +1,3 @@
-sf sfx2 : l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 LIBXSLT:libxslt NULL
+sf sfx2 : L10N:l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 LIBXSLT:libxslt NULL
sf sfx2\prj nmake - all sf_prj NULL
diff --git a/sfx2/qa/cppunit/makefile.mk b/sfx2/qa/cppunit/makefile.mk
new file mode 100644
index 000000000000..b53a04ec43f9
--- /dev/null
+++ b/sfx2/qa/cppunit/makefile.mk
@@ -0,0 +1,86 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General 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 "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ=../..
+PRJNAME=sfx2
+TARGET=qa_cppunit
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.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
+
+# --- Libs ---------------------------------------------------------
+
+SHL1OBJS= \
+ $(SLO)/test_metadatable.obj \
+
+
+SHL1STDLIBS= \
+ $(CPPUNITLIB) \
+ $(SALLIB) \
+ $(CPPULIB) \
+ $(CPPUHELPERLIB) \
+ $(VCLLIB) \
+ $(SFXLIB) \
+
+
+SHL1TARGET= test_metadatable
+SHL1RPATH = NONE
+SHL1IMPLIB= i$(SHL1TARGET)
+# SHL1DEF= $(MISC)/$(SHL1TARGET).def
+DEF1NAME=$(SHL1TARGET)
+# DEF1EXPORTFILE= export.exp
+SHL1VERSIONMAP= version.map
+
+# --- All object files ---------------------------------------------
+
+SLOFILES= \
+ $(SHL1OBJS) \
+
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+.INCLUDE : _cppunit.mk
+
+.END
diff --git a/sfx2/qa/unoapi/makefile.mk b/sfx2/qa/unoapi/makefile.mk
new file mode 100644
index 000000000000..ea91ba4d1c44
--- /dev/null
+++ b/sfx2/qa/unoapi/makefile.mk
@@ -0,0 +1,48 @@
+#*************************************************************************
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General 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 "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../..
+PRJNAME = sfx2
+TARGET = qa_unoapi
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = org/openoffice/sfx2/qa/unoapi
+JAVATESTFILES = Test.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index 90b93cc3748e..87953e134292 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -51,6 +51,7 @@
#include <svl/intitem.hxx>
#include "sfx2/taskpane.hxx"
#include <tools/diagnose_ex.h>
+#include <rtl/strbuf.hxx>
#define SfxModule
#include "sfxslots.hxx"
@@ -423,6 +424,39 @@ SfxModule* SfxModule::GetActiveModule( SfxViewFrame* pFrame )
return pSh ? pSh->GetModule() : 0;
}
+FieldUnit SfxModule::GetModuleFieldUnit( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > const & i_frame )
+{
+ ENSURE_OR_RETURN( i_frame.is(), "SfxModule::GetModuleFieldUnit: invalid frame!", FUNIT_100TH_MM );
+
+ // find SfxViewFrame for the given XFrame
+ SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst();
+ while ( pViewFrame != NULL )
+ {
+ if ( pViewFrame->GetFrame().GetFrameInterface() == i_frame )
+ break;
+ pViewFrame = SfxViewFrame::GetNext( *pViewFrame );
+ }
+ ENSURE_OR_RETURN( pViewFrame != NULL, "SfxModule::GetModuleFieldUnit: unable to find an SfxViewFrame for the given XFrame", FUNIT_100TH_MM );
+
+ // find the module
+ SfxModule const * pModule = GetActiveModule( pViewFrame );
+ ENSURE_OR_RETURN( pModule != NULL, "SfxModule::GetModuleFieldUnit: no SfxModule for the given frame!", FUNIT_100TH_MM );
+
+ SfxPoolItem const * pItem = pModule->GetItem( SID_ATTR_METRIC );
+ if ( pItem == NULL )
+ {
+#if OSL_DEBUG_LEVEL > 0
+ ::rtl::OStringBuffer message;
+ message.append( "SfxModule::GetFieldUnit: no metric item in the module implemented by '" );
+ message.append( typeid( *pModule ).name() );
+ message.append( "'!" );
+ OSL_ENSURE( false, message.makeStringAndClear().getStr() );
+#endif
+ return FUNIT_100TH_MM;
+ }
+ return (FieldUnit)( (SfxUInt16Item*)pItem )->GetValue();
+}
+
FieldUnit SfxModule::GetCurrentFieldUnit()
{
FieldUnit eUnit = FUNIT_INCH;
diff --git a/sfx2/source/appl/sfx.src b/sfx2/source/appl/sfx.src
index c3b734e327de..3bca517c5fd5 100644
--- a/sfx2/source/appl/sfx.src
+++ b/sfx2/source/appl/sfx.src
@@ -40,3 +40,8 @@ String STR_STYLE_FILTER_ALL
Text [ en-US ] = "All Styles" ;
};
+String STR_ACCTITLE_PRODUCTIVITYTOOLS
+{
+ Text [ en-US ] = "%PRODUCTNAME";
+};
+
diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
index 59d3107532a4..31f9105c28aa 100644
--- a/sfx2/source/config/evntconf.cxx
+++ b/sfx2/source/config/evntconf.cxx
@@ -59,7 +59,7 @@
// -----------------------------------------------------------------------
TYPEINIT1(SfxEventHint, SfxHint);
TYPEINIT1(SfxEventNamesItem, SfxPoolItem);
-TYPEINIT1(SfxViewEventHint, SfxHint);
+TYPEINIT1(SfxViewEventHint, SfxEventHint);
using namespace com::sun::star;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 2a54e5b1c638..0bde76cb44b1 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -131,7 +131,7 @@ void SfxUnoControllerItem::UnBind()
void SAL_CALL SfxUnoControllerItem::statusChanged(const ::com::sun::star::frame::FeatureStateEvent& rEvent) throw ( ::com::sun::star::uno::RuntimeException )
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
- DBG_ASSERT( pCtrlItem, "Dispatch hat den StatusListener nicht entfern!" );
+ DBG_ASSERT( pCtrlItem, "dispatch implementation didn't respect our previous removeStatusListener call!" );
if ( rEvent.Requery )
{
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index b8c2bec4ba5a..2d5c383f8b89 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -828,6 +828,7 @@ SfxDocumentPage::SfxDocumentPage( Window* pParent, const SfxItemSet& rItemSet )
bHandleDelete ( sal_False )
{
+ aNameED.SetAccessibleName(String(SfxResId(EDIT_FILE_NAME)));
FreeResource();
ImplUpdateSignatures();
@@ -1818,6 +1819,11 @@ CustomPropertiesWindow::CustomPropertiesWindow( Window* pParent, const ResId& rR
m_aEditLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, EditTimeoutHdl ) );
m_aBoxLoseFocusTimer.SetTimeout( 300 );
m_aBoxLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, BoxTimeoutHdl ) );
+
+ ResMgr* pResMgr = rResId.GetResMgr();
+ m_aNameBox.SetAccessibleName( String( ResId( STR_HEADER_NAME, *pResMgr ) ) );
+ m_aTypeBox.SetAccessibleName( String( ResId( STR_HEADER_TYPE, *pResMgr ) ) );
+ m_aValueEdit.SetAccessibleName( String( ResId( STR_HEADER_VALUE, *pResMgr ) ) );
}
CustomPropertiesWindow::~CustomPropertiesWindow()
@@ -2064,6 +2070,11 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny )
//add lose focus handlers of date/time fields
pNewLine->m_aTypeBox.SetLoseFocusHdl( LINK( this, CustomPropertiesWindow, BoxLoseFocusHdl ) );
+
+ pNewLine->m_aNameBox.SetAccessibleName(m_aNameBox.GetAccessibleName());
+ pNewLine->m_aTypeBox.SetAccessibleName(m_aTypeBox.GetAccessibleName());
+ pNewLine->m_aValueEdit.SetAccessibleName(m_aValueEdit.GetAccessibleName());
+
long nPos = GetVisibleLineCount() * GetLineHeight();
m_aCustomPropertiesLines.push_back( pNewLine );
Window* pWindows[] = { &m_aNameBox, &m_aTypeBox, &m_aValueEdit,
@@ -2384,9 +2395,9 @@ void CustomPropertiesControl::AddLine( const ::rtl::OUString& sName, Any& rAny,
SfxCustomPropertiesPage::SfxCustomPropertiesPage( Window* pParent, const SfxItemSet& rItemSet ) :
SfxTabPage( pParent, SfxResId( TP_CUSTOMPROPERTIES ), rItemSet ),
- m_aPropertiesFT ( this, SfxResId( FT_PROPERTIES ) ),
m_aPropertiesCtrl ( this, SfxResId( CTRL_PROPERTIES ) ),
- m_aAddBtn ( this, SfxResId( BTN_ADD ) )
+ m_aAddBtn ( this, SfxResId( BTN_ADD ) ),
+ m_aPropertiesFT ( this, SfxResId( FT_PROPERTIES ) )
{
FreeResource();
diff --git a/sfx2/source/dialog/dinfdlg.hrc b/sfx2/source/dialog/dinfdlg.hrc
index 5453e3606026..43bd848844a0 100644
--- a/sfx2/source/dialog/dinfdlg.hrc
+++ b/sfx2/source/dialog/dinfdlg.hrc
@@ -153,6 +153,10 @@
#define STR_HEADER_VALUE 92
#define STR_HEADER_ACTION 93
+//IAccessibility2 Implementation 2009-----
+#define EDIT_FILE_NAME 94
+//-----IAccessibility2 Implementation 2009
+
#define PB_OK 100
#define PB_CANCEL 101
#define PB_HELP 102
diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src
index c78347e3dba3..eaa24105bb17 100644
--- a/sfx2/source/dialog/dinfdlg.src
+++ b/sfx2/source/dialog/dinfdlg.src
@@ -303,6 +303,10 @@ TabPage TP_DOCINFODOC
{
Text [ en-US ] = "unknown" ;
};
+ String EDIT_FILE_NAME
+ {
+ Text [ en-US ] = "File Name" ;
+ };
};
// TP_DOCINFOUSER --------------------------------------------------------
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 0f3b35648061..eb6373b5b998 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1566,7 +1566,7 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList,
// the item should remain only if it was set by the dialog
rpSet->ClearItem( SID_SELECTION );
- if( mbExport )
+ if( mbExport && mbHasSelectionBox )
{
try
{
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 454c42896cfe..5cac88236f4a 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -77,9 +77,9 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
aFilterFt ( this, SfxResId( FT_REGION ) ),
aFilterLb ( this, SfxResId( LB_REGION ) ),
+ aDescGb ( this, SfxResId( GB_DESC ) ),
aDescFt ( this, SfxResId( FT_DESC ) ),
aDescED ( this, SfxResId( ED_DESC ) ),
- aDescGb ( this, SfxResId( GB_DESC ) ),
pStyle( &( (SfxStyleDialog*)pParent->GetParent() )->GetStyleSheet() ),
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index 8235333857d5..17bbee8c126f 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -91,6 +91,7 @@ SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& rInPool
aOKBtn.SetClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
aColBox.SetModifyHdl(LINK(this, SfxNewStyleDlg, ModifyHdl));
aColBox.SetDoubleClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
+ aColBox.SetAccessibleName(SfxResId(FL_COL));
SfxStyleSheetBase *pStyle = rPool.First();
while ( pStyle )
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index d9c1ea80636d..47af8e61d81b 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -125,6 +125,7 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
mbAsciiOnly ( false )
{
+ maPasswordED.SetAccessibleName(String(SfxResId(TEXT_PASSWD)));
FreeResource();
// setup layout
diff --git a/sfx2/source/dialog/passwd.hrc b/sfx2/source/dialog/passwd.hrc
index 5c9b07c7a130..dd35a6449dd8 100644
--- a/sfx2/source/dialog/passwd.hrc
+++ b/sfx2/source/dialog/passwd.hrc
@@ -46,6 +46,9 @@
#define FT_PASSWD_CONFIRM2 27
#define ED_PASSWD_CONFIRM2 28
+//IAccessibility2 Implementation 2009-----
+#define TEXT_PASSWD 31
+//-----IAccessibility2 Implementation 2009
#endif
// ******************************************************************* EOF
diff --git a/sfx2/source/dialog/passwd.src b/sfx2/source/dialog/passwd.src
index 426fb9986d5a..beb2f96a5e21 100644
--- a/sfx2/source/dialog/passwd.src
+++ b/sfx2/source/dialog/passwd.src
@@ -129,37 +129,10 @@ ModalDialog DLG_PASSWD
Pos = MAP_APPFONT( 144, 43 );
Size = MAP_APPFONT( 50, 14 );
};
-};
-
-// ********************************************************************** EOF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ String TEXT_PASSWD
+ {
+ Text [ en-US ] = "Password" ;
+ };
+};
diff --git a/sfx2/source/dialog/securitypage.src b/sfx2/source/dialog/securitypage.src
index fee60404d01c..fee60404d01c 100644..100755
--- a/sfx2/source/dialog/securitypage.src
+++ b/sfx2/source/dialog/securitypage.src
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index e9c66e2a5f13..35a5fb766b97 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -697,6 +697,11 @@ void SfxTabDialog::Init_Impl( sal_Bool bFmtFlag, const String* pUserButtonText )
pExampleSet = new SfxItemSet( *pSet );
pOutSet = new SfxItemSet( *pSet->GetPool(), pSet->GetRanges() );
}
+
+ aOKBtn.SetAccessibleRelationMemberOf( &aOKBtn );
+ aCancelBtn.SetAccessibleRelationMemberOf( &aCancelBtn );
+ aHelpBtn.SetAccessibleRelationMemberOf( &aHelpBtn );
+ aResetBtn.SetAccessibleRelationMemberOf( &aResetBtn );
}
// -----------------------------------------------------------------------
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 54df29e63e4a..d8ea47baf32d 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -778,6 +778,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Sfx
bHierarchical ( sal_False ),
bBindingUpdate ( sal_True )
{
+ aFmtLb.SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST));
aFmtLb.SetHelpId( HID_TEMPLATE_FMT );
aFilterLb.SetHelpId( HID_TEMPLATE_FILTER );
aFmtLb.SetStyle( aFmtLb.GetStyle() | WB_SORT | WB_HIDESELECTION );
@@ -1792,6 +1793,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
FillTreeBox();
SelectStyle(aSelectEntry);
+ pTreeBox->SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST));
pTreeBox->Show();
}
}
diff --git a/sfx2/source/dialog/templdlg.hrc b/sfx2/source/dialog/templdlg.hrc
index 58563fb9c160..e39108ce57a9 100644
--- a/sfx2/source/dialog/templdlg.hrc
+++ b/sfx2/source/dialog/templdlg.hrc
@@ -49,4 +49,7 @@
#define BT_VLIST 9
#define BT_TOOL 10
+//IAccessibility2 Implementation 2009-----
+#define STR_STYLE_ELEMTLIST 18
+//-----IAccessibility2 Implementation 2009
diff --git a/sfx2/source/dialog/templdlg.src b/sfx2/source/dialog/templdlg.src
index 60979450d9f6..ff2661181434 100644
--- a/sfx2/source/dialog/templdlg.src
+++ b/sfx2/source/dialog/templdlg.src
@@ -143,6 +143,10 @@ ModalDialog RID_STYLECATALOG
};
};
// Strings ---------------------------------------------------------------
+String STR_STYLE_ELEMTLIST
+{
+ Text [ en-US ] = "Style List" ;
+};
String STR_STYLE_FILTER_HIERARCHICAL
{
Text [ en-US ] = "Hierarchical" ;
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index f18e903eb6e4..41b969fc1e59 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -1142,7 +1142,6 @@ void SAL_CALL SfxDocumentMetaData::init(
m_isInitialized = false;
m_xDoc = i_xDoc;
- m_xDoc->normalize();
// select nodes for standard meta data stuff
xPath->registerNS(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("xlink")),
@@ -1171,26 +1170,49 @@ void SAL_CALL SfxDocumentMetaData::init(
if (!m_xParent.is()) {
// all this create/append stuff may throw DOMException
try {
- css::uno::Reference<css::xml::dom::XElement> xRElem(
- i_xDoc->createElementNS(
+ css::uno::Reference<css::xml::dom::XElement> xRElem;
+ css::uno::Reference<css::xml::dom::XNode> xNode(
+ i_xDoc->getFirstChild());
+ while (xNode.is()) {
+ if (css::xml::dom::NodeType_ELEMENT_NODE ==xNode->getNodeType())
+ {
+ if (xNode->getNamespaceURI().equalsAscii(s_nsODF) &&
+ xNode->getLocalName().equalsAscii("document-meta"))
+ {
+ xRElem.set(xNode, css::uno::UNO_QUERY_THROW);
+ break;
+ }
+ else
+ {
+ OSL_TRACE("SfxDocumentMetaData::init(): "
+ "deleting unexpected root element: %s",
+ ::rtl::OUStringToOString(xNode->getLocalName(),
+ RTL_TEXTENCODING_UTF8).getStr());
+ i_xDoc->removeChild(xNode);
+ xNode = i_xDoc->getFirstChild(); // start over
+ }
+ } else {
+ xNode = xNode->getNextSibling();
+ }
+ }
+ if (!xRElem.is()) {
+ xRElem = i_xDoc->createElementNS(
::rtl::OUString::createFromAscii(s_nsODF),
- ::rtl::OUString::createFromAscii("office:document-meta")));
- css::uno::Reference<css::xml::dom::XNode> xRNode(xRElem,
- css::uno::UNO_QUERY_THROW);
- // NB: the following is a _bad_idea_ with our DOM implementation
- // do _not_ create attributes with xmlns prefix!
-// xRElem->setAttribute(::rtl::OUString::createFromAscii("xmlns:office"),
-// ::rtl::OUString::createFromAscii(s_nsODF));
+ ::rtl::OUString::createFromAscii("office:document-meta"));
+ css::uno::Reference<css::xml::dom::XNode> xRNode(xRElem,
+ css::uno::UNO_QUERY_THROW);
+ i_xDoc->appendChild(xRNode);
+ }
xRElem->setAttributeNS(::rtl::OUString::createFromAscii(s_nsODF),
::rtl::OUString::createFromAscii("office:version"),
::rtl::OUString::createFromAscii("1.0"));
- i_xDoc->appendChild(xRNode);
+ // does not exist, otherwise m_xParent would not be null
css::uno::Reference<css::xml::dom::XNode> xParent (
i_xDoc->createElementNS(
::rtl::OUString::createFromAscii(s_nsODF),
::rtl::OUString::createFromAscii("office:meta")),
css::uno::UNO_QUERY_THROW);
- xRNode->appendChild(xParent);
+ xRElem->appendChild(xParent);
m_xParent = xParent;
} catch (css::xml::dom::DOMException & e) {
css::uno::Any a(e);
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 4255e9bd2939..3da1f374af1c 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -921,11 +921,6 @@ void SfxObjectShell::SetCurrentComponent( const Reference< XInterface >& _rxComp
s_xCurrentComponent = _rxComponent;
if ( pAppMgr )
pAppMgr->SetGlobalUNOConstant( "ThisComponent", makeAny( _rxComponent ) );
-
-#if OSL_DEBUG_LEVEL > 0
- const char* pComponentImplName = _rxComponent.get() ? typeid( *_rxComponent.get() ).name() : "void";
- OSL_TRACE( "current component is a %s\n", pComponentImplName );
-#endif
}
Reference< XInterface > SfxObjectShell::GetCurrentComponent()
diff --git a/sfx2/source/doc/syspath.cxx b/sfx2/source/doc/syspath.cxx
index a1025370ed24..a1025370ed24 100755..100644
--- a/sfx2/source/doc/syspath.cxx
+++ b/sfx2/source/doc/syspath.cxx
diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc
index ef5c168c36f0..ef5c168c36f0 100644..100755
--- a/sfx2/source/inc/helpid.hrc
+++ b/sfx2/source/inc/helpid.hrc
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 515149c5a2d3..b91e8b4848ba 100644..100755
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -80,13 +80,15 @@ class SfxPrinterController : public vcl::PrinterController, public SfxListener
sal_Bool m_bOrigStatus;
sal_Bool m_bNeedsChange;
sal_Bool m_bApi;
+ sal_Bool m_bTempPrinter;
util::DateTime m_aLastPrinted;
::rtl::OUString m_aLastPrintedBy;
Sequence< beans::PropertyValue > getMergedOptions() const;
const Any& getSelectionObject() const;
public:
- SfxPrinterController( const Any& i_rComplete,
+ SfxPrinterController( const boost::shared_ptr<Printer>& i_rPrinter,
+ const Any& i_rComplete,
const Any& i_rSelection,
const Any& i_rViewProp,
const Reference< view::XRenderable >& i_xRender,
@@ -105,7 +107,8 @@ public:
virtual void jobFinished( com::sun::star::view::PrintableState );
};
-SfxPrinterController::SfxPrinterController( const Any& i_rComplete,
+SfxPrinterController::SfxPrinterController( const boost::shared_ptr<Printer>& i_rPrinter,
+ const Any& i_rComplete,
const Any& i_rSelection,
const Any& i_rViewProp,
const Reference< view::XRenderable >& i_xRender,
@@ -113,7 +116,8 @@ SfxPrinterController::SfxPrinterController( const Any& i_rComplete,
SfxViewShell* pView,
const uno::Sequence< beans::PropertyValue >& rProps
)
- : maCompleteSelection( i_rComplete )
+ : PrinterController( i_rPrinter)
+ , maCompleteSelection( i_rComplete )
, maSelection( i_rSelection )
, mxRenderable( i_xRender )
, mpLastPrinter( NULL )
@@ -122,6 +126,7 @@ SfxPrinterController::SfxPrinterController( const Any& i_rComplete,
, m_bOrigStatus( sal_False )
, m_bNeedsChange( sal_False )
, m_bApi(i_bApi)
+ , m_bTempPrinter( i_rPrinter.get() != NULL )
{
if ( mpViewShell )
{
@@ -191,15 +196,19 @@ SfxPrinterController::~SfxPrinterController()
const Any& SfxPrinterController::getSelectionObject() const
{
+ const beans::PropertyValue* pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintSelectionOnly" ) ) );
+ if( pVal )
+ {
+ sal_Bool bSel = sal_False;
+ pVal->Value >>= bSel;
+ return bSel ? maSelection : maCompleteSelection;
+ }
+
sal_Int32 nChoice = 0;
- sal_Bool bSel = sal_False;
- const beans::PropertyValue* pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ) );
+ pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ) );
if( pVal )
pVal->Value >>= nChoice;
- pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintSelectionOnly" ) ) );
- if( pVal )
- pVal->Value >>= bSel;
- return (nChoice > 1 || bSel) ? maSelection : maCompleteSelection;
+ return (nChoice > 1) ? maSelection : maCompleteSelection;
}
Sequence< beans::PropertyValue > SfxPrinterController::getMergedOptions() const
@@ -307,6 +316,7 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt
{
if ( mpObjectShell )
{
+ bool bCopyJobSetup = false;
mpObjectShell->Broadcast( SfxPrintingHint( nState ) );
switch ( nState )
{
@@ -334,6 +344,7 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt
rBind.Invalidate( SID_PRINTDOC );
rBind.Invalidate( SID_PRINTDOCDIRECT );
rBind.Invalidate( SID_SETUPPRINTER );
+ bCopyJobSetup = ! m_bTempPrinter;
break;
}
@@ -341,6 +352,27 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt
break;
}
+ if( bCopyJobSetup && mpViewShell )
+ {
+ // #i114306#
+ // Note: this possibly creates a printer that gets immediately replaced
+ // by a new one. The reason for this is that otherwise we would not get
+ // the printer's SfxItemSet here to copy. Awkward, but at the moment there is no
+ // other way here to get the item set.
+ SfxPrinter* pDocPrt = mpViewShell->GetPrinter(sal_True);
+ if( pDocPrt )
+ {
+ if( pDocPrt->GetName() == getPrinter()->GetName() )
+ pDocPrt->SetJobSetup( getPrinter()->GetJobSetup() );
+ else
+ {
+ SfxPrinter* pNewPrt = new SfxPrinter( pDocPrt->GetOptions().Clone(), getPrinter()->GetName() );
+ pNewPrt->SetJobSetup( getPrinter()->GetJobSetup() );
+ mpViewShell->SetPrinter( pNewPrt, SFX_PRINTER_PRINTER | SFX_PRINTER_JOBSETUP );
+ }
+ }
+ }
+
if ( m_bNeedsChange )
mpObjectShell->EnableSetModified( m_bOrigStatus );
@@ -586,8 +618,23 @@ void SfxViewShell::ExecPrint( const uno::Sequence < beans::PropertyValue >& rPro
aSelection <<= GetObjectShell()->GetModel();
Any aComplete( makeAny( GetObjectShell()->GetModel() ) );
Any aViewProp( makeAny( xController ) );
+ boost::shared_ptr<Printer> aPrt;
- boost::shared_ptr<vcl::PrinterController> pController( new SfxPrinterController( aComplete,
+ const beans::PropertyValue* pVal = rProps.getConstArray();
+ for( sal_Int32 i = 0; i < rProps.getLength(); i++ )
+ {
+ if( pVal[i].Name.equalsAscii( "PrinterName" ) )
+ {
+ rtl::OUString aPrinterName;
+ pVal[i].Value >>= aPrinterName;
+ aPrt.reset( new Printer( aPrinterName ) );
+ break;
+ }
+ }
+
+ boost::shared_ptr<vcl::PrinterController> pController( new SfxPrinterController(
+ aPrt,
+ aComplete,
aSelection,
aViewProp,
GetRenderable(),
@@ -704,10 +751,18 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
}
}
}
- sal_Int32 nLen = aProps.getLength();
- aProps.realloc( nLen + 1 );
- aProps[nLen].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintSelectionOnly" ) );
- aProps[nLen].Value = makeAny( bSelection );
+ // HACK: writer sets the SID_SELECTION item when printing directly and expects
+ // to get only the selection document in that case (see getSelectionObject)
+ // however it also reacts to the PrintContent property. We need this distinction here, too,
+ // else one of the combinations print / print direct and selection / all will not work.
+ // it would be better if writer handled this internally
+ if( nId == SID_PRINTDOCDIRECT )
+ {
+ sal_Int32 nLen = aProps.getLength();
+ aProps.realloc( nLen + 1 );
+ aProps[nLen].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintSelectionOnly" ) );
+ aProps[nLen].Value = makeAny( bSelection );
+ }
ExecPrint( aProps, bIsAPI, (nId == SID_PRINTDOCDIRECT) );
diff --git a/shell/prj/build.lst b/shell/prj/build.lst
index ad157a677bff..abf9af0c0c8e 100755
--- a/shell/prj/build.lst
+++ b/shell/prj/build.lst
@@ -1,4 +1,4 @@
-sl shell : l10n offuh rdbmaker tools sal EXPAT:expat LIBXSLT:libxslt NULL
+sl shell : L10N:l10n offuh rdbmaker tools sal EXPAT:expat LIBXSLT:libxslt NULL
sl shell\inc nmake - all sl_inc NULL
sl shell\source\win32 nmake - w sl_win32 sl_inc NULL
sl shell\source\win32\simplemail nmake - w sl_win32_simplemail sl_inc NULL
diff --git a/svx/inc/float3d.hrc b/svx/inc/float3d.hrc
index 259317275e8b..06b640ebff0e 100644
--- a/svx/inc/float3d.hrc
+++ b/svx/inc/float3d.hrc
@@ -181,4 +181,6 @@
#define BMP_TEX_CIRCLE_H 159
#define BMP_TEX_FILTER_H 160
#define BMP_COLORDLG_H 161
-
+// IAccessibility2 implementation 2009. ------
+#define STR_COLOR_LIGHT_PRE 162
+// ------ IAccessibility2 implementation 2009.
diff --git a/svx/inc/svx/bmpmask.hxx b/svx/inc/svx/bmpmask.hxx
index 39ae551db3dd..ae0ac7b9d630 100644
--- a/svx/inc/svx/bmpmask.hxx
+++ b/svx/inc/svx/bmpmask.hxx
@@ -96,6 +96,9 @@ class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow
PushButton aBtnExec;
FixedLine aGrpQ;
+ FixedText aFt1;
+ FixedText aFt2;
+ FixedText aFt3;
CheckBox aCbx1;
MaskSet* pQSet1;
MetricField aSp1;
@@ -119,9 +122,7 @@ class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow
MaskData* pData;
CheckBox aCbxTrans;
ColorLB aLbColorTrans;
- FixedText aFt1;
- FixedText aFt2;
- FixedText aFt3;
+
const XColorTable* pColTab;
Color aPipetteColor;
SvxBmpMaskSelectItem aSelItem;
diff --git a/svx/inc/svx/chrtitem.hxx b/svx/inc/svx/chrtitem.hxx
index bc68bf1df705..ce1f5ea0753f 100644
--- a/svx/inc/svx/chrtitem.hxx
+++ b/svx/inc/svx/chrtitem.hxx
@@ -114,21 +114,6 @@ enum SvxChartDataDescr
#define CHDESCR_COUNT (CHDESCR_TEXTANDVALUE + 1)
-enum SvxChartLegendPos
-{
- CHLEGEND_NONE,
- CHLEGEND_LEFT,
- CHLEGEND_TOP,
- CHLEGEND_RIGHT,
- CHLEGEND_BOTTOM,
- CHLEGEND_NONE_TOP,
- CHLEGEND_NONE_LEFT,
- CHLEGEND_NONE_RIGHT,
- CHLEGEND_NONE_BOTTOM
-};
-
-#define CHLEGEND_COUNT (CHLEGEND_BOTTOM + 1)
-
enum SvxChartTextOrder
{
CHTXTORDER_SIDEBYSIDE,
@@ -243,25 +228,6 @@ public:
//------------------------------------------------------------------
-class SVX_DLLPUBLIC SvxChartLegendPosItem : public SfxEnumItem
-{
-public:
- TYPEINFO();
- SvxChartLegendPosItem(SvxChartLegendPos eLegendPos /*= CHLEGEND_NONE*/,
- sal_uInt16 nId );
- SvxChartLegendPosItem(SvStream& rIn,
- sal_uInt16 nId );
-
- virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
- virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
-
- sal_uInt16 GetValueCount() const { return CHLEGEND_COUNT; }
- SvxChartLegendPos GetValue() const
- { return (SvxChartLegendPos)SfxEnumItem::GetValue(); }
-};
-
-//------------------------------------------------------------------
-
class SVX_DLLPUBLIC SvxChartTextOrderItem : public SfxEnumItem
{
public:
diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc
index b28b150bd487..3bca44105edd 100755
--- a/svx/inc/svx/dialogs.hrc
+++ b/svx/inc/svx/dialogs.hrc
@@ -52,6 +52,14 @@
#define RID_SVXSTR_LINESTYLE (RID_SVX_START + 173)
#define RID_SVXSTR_FIELDUNIT_TABLE (RID_SVX_START + 311)
#define RID_SVXSTR_COLOR_USER (RID_SVX_START + 250)
+//IAccessibility2 Implementation 2009-----
+#define RID_SVXSTR_GALLERYPROPS_GALTHEME (RID_SVX_START + 251)
+#define RID_SVXSTR_GALLERY_THEMEITEMS (RID_SVX_START + 252)
+#define RID_SVXSTR_GALLERY_THEMENAME (RID_SVX_START + 253)
+#define RID_SVXSTR_GALLERY_FILESFOUND (RID_SVX_START + 254)
+#define RID_SVXSTR_GALLERY_PREVIEW (RID_SVX_START + 255)
+//-----IAccessibility2 Implementation 2009
+
// factory IDs of tabpages implemented in CUI
#define RID_SVXPAGE_CHAR_TWOLINES (RID_SVX_START + 242)
@@ -956,6 +964,9 @@
#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1191)
+//IAccessibility2 Implementation 2009-----
+#define RID_SVXSTR_TEXTCOLOR (RID_SVX_START + 1178)
+//-----IAccessibility2 Implementation 2009
// ----------------------------------------------------------------------------
// if we have _a_lot_ time, we should group the resource ids by type, instead
// of grouping them by semantics. The reason is that resource ids have to be
@@ -1049,5 +1060,10 @@
#define OFA_TP_TABPROPERTIES_TEXT (RID_OFA_START + 245)
#define OFA_TP_HELPERPROG (RID_OFA_START + 249)
+// IAccessibility2 implementation 2009. ------
+#define STR_COLORTABLE (RID_OFA_START + 257)
+#define STR_SWITCH (RID_OFA_START + 258)
+// ------ IAccessibility2 implementation 2009.
+
#endif
diff --git a/svx/inc/svx/float3d.hxx b/svx/inc/svx/float3d.hxx
index 13eb8a697de0..8ad3d618d271 100644
--- a/svx/inc/svx/float3d.hxx
+++ b/svx/inc/svx/float3d.hxx
@@ -84,6 +84,7 @@ private:
ImageButton aBtnUpdate;
ImageButton aBtnAssign;
+ FixedLine aFLGeometrie;
// Geometrie
FixedText aFtPercentDiagonal;
MetricField aMtrPercentDiagonal;
@@ -93,36 +94,35 @@ private:
MetricField aMtrEndAngle;
FixedText aFtDepth;
MetricField aMtrDepth;
- FixedLine aFLGeometrie;
+ FixedLine aFLSegments;
FixedText aFtHorizontal;
NumericField aNumHorizontal;
FixedText aFtVertical;
NumericField aNumVertical;
- FixedLine aFLSegments;
+ FixedLine aFLNormals;
ImageButton aBtnNormalsObj;
ImageButton aBtnNormalsFlat;
ImageButton aBtnNormalsSphere;
ImageButton aBtnNormalsInvert;
ImageButton aBtnTwoSidedLighting;
- FixedLine aFLNormals;
ImageButton aBtnDoubleSided;
-
+ FixedLine aFLRepresentation;
// Darstellung
FixedText aFtShademode;
ListBox aLbShademode;
+ FixedLine aFLShadow;
ImageButton aBtnShadow3d;
FixedText aFtSlant;
MetricField aMtrSlant;
- FixedLine aFLShadow;
FixedText aFtDistance;
MetricField aMtrDistance;
FixedText aFtFocalLeng;
MetricField aMtrFocalLength;
FixedLine aFLCamera;
- FixedLine aFLRepresentation;
+ FixedLine aFLLight;
// Beleuchtung
ImageButton aBtnLight1;
@@ -133,6 +133,7 @@ private:
ImageButton aBtnLight6;
ImageButton aBtnLight7;
ImageButton aBtnLight8;
+ FixedText aFTLightsource;
ColorLB aLbLight1;
ColorLB aLbLight2;
ColorLB aLbLight3;
@@ -143,7 +144,6 @@ private:
ColorLB aLbLight8;
ImageButton aBtnLightColor;
- FixedText aFTLightsource;
// #99694# Keyboard shortcuts activate the next control, so the
// order needed to be changed here
@@ -151,7 +151,7 @@ private:
ColorLB aLbAmbientlight; // ListBox
ImageButton aBtnAmbientColor; // color button
- FixedLine aFLLight;
+ FixedLine aFLTexture;
// Texturen
FixedText aFtTexKind;
@@ -171,9 +171,9 @@ private:
ImageButton aBtnTexCircleY;
FixedText aFtTexFilter;
ImageButton aBtnTexFilter;
- FixedLine aFLTexture;
// Material
+ FixedLine aFLMaterial;
// Materialeditor
FixedText aFtMatFavorites;
ListBox aLbMatFavorites;
@@ -183,20 +183,20 @@ private:
FixedText aFtMatEmission;
ColorLB aLbMatEmission;
ImageButton aBtnEmissionColor;
+ FixedLine aFLMatSpecular;
FixedText aFtMatSpecular;
ColorLB aLbMatSpecular;
ImageButton aBtnSpecularColor;
FixedText aFtMatSpecularIntensity;
MetricField aMtrMatSpecularIntensity;
- FixedLine aFLMatSpecular;
- FixedLine aFLMaterial;
+
+ Svx3DPreviewControl aCtlPreview;
+ SvxLightCtl3D aCtlLightPreview;
// Unterer Teil
ImageButton aBtnConvertTo3D;
ImageButton aBtnLatheObject;
ImageButton aBtnPerspective;
- Svx3DPreviewControl aCtlPreview;
- SvxLightCtl3D aCtlLightPreview;
// der Rest ...
Image aImgLightOn;
diff --git a/svx/inc/svx/fontworkgallery.hxx b/svx/inc/svx/fontworkgallery.hxx
index 36502ccecca5..53c5b9b7bf38 100644
--- a/svx/inc/svx/fontworkgallery.hxx
+++ b/svx/inc/svx/fontworkgallery.hxx
@@ -91,8 +91,8 @@ public:
class SVX_DLLPUBLIC FontWorkGalleryDialog : public ModalDialog
{
- ValueSet maCtlFavorites;
FixedLine maFLFavorites;
+ ValueSet maCtlFavorites;
OKButton maOKButton;
CancelButton maCancelButton;
HelpButton maHelpButton;
diff --git a/svx/inc/svx/hdft.hxx b/svx/inc/svx/hdft.hxx
index adc4745ace83..d30189ce81a0 100644
--- a/svx/inc/svx/hdft.hxx
+++ b/svx/inc/svx/hdft.hxx
@@ -70,6 +70,7 @@ protected:
SvxHFPage( Window* pParent, sal_uInt16 nResId, const SfxItemSet& rSet,
sal_uInt16 nSetId );
+ FixedLine aFrm;
CheckBox aTurnOnBox;
CheckBox aCntSharedBox;
FixedText aLMLbl;
@@ -82,7 +83,6 @@ protected:
FixedText aHeightFT;
MetricField aHeightEdit;
CheckBox aHeightDynBtn;
- FixedLine aFrm;
SvxPageWindow aBspWin;
PushButton aBackgroundBtn;
diff --git a/svx/inc/svx/svdstr.hrc b/svx/inc/svx/svdstr.hrc
index d778bf40326b..2049bc4c3fdc 100644
--- a/svx/inc/svx/svdstr.hrc
+++ b/svx/inc/svx/svdstr.hrc
@@ -185,8 +185,12 @@
#define STR_ObjNameSingulMEDIA (STR_ObjNameBegin + 143)
#define STR_ObjNamePluralMEDIA (STR_ObjNameBegin + 144)
-#define STR_ObjNameEnd (STR_ObjNamePluralMEDIA)
-
+//#define STR_ObjNameEnd (STR_ObjNamePluralMEDIA)
+//IAccessibility2 Implementation 2009-----
+#define STR_ObjNameSingulFONTWORK (STR_ObjNameBegin+145)
+#define STR_ObjNamePluralFONTWORK (STR_ObjNameBegin+146)
+#define STR_ObjNameEnd (STR_ObjNamePluralFONTWORK)
+//-----IAccessibility2 Implementation 2009
#define STR_EditBegin (STR_ObjNameEnd+1)
#define STR_EditWithCopy (STR_EditBegin + 0)
#define STR_EditPosSize (STR_EditBegin + 1)
diff --git a/svx/prj/build.lst b/svx/prj/build.lst
index 7b541b2d77c4..641f4e528793 100644
--- a/svx/prj/build.lst
+++ b/svx/prj/build.lst
@@ -1,2 +1,2 @@
-sx svx : sfx2 l10n oovbaapi connectivity xmloff linguistic jvmfwk avmedia drawinglayer editeng LIBXSLT:libxslt NULL
+sx svx : sfx2 L10N:l10n oovbaapi connectivity xmloff linguistic jvmfwk avmedia drawinglayer editeng LIBXSLT:libxslt NULL
sx svx\prj nmake - all sx_prj NULL
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 9c2a5fc9a3bb..b6b8ca387969 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -417,6 +417,10 @@ SvxBmpMask::SvxBmpMask( SfxBindings *pBindinx,
aBtnExec ( this, BMP_RESID( BTN_EXEC ) ),
aGrpQ ( this, BMP_RESID( GRP_Q ) ),
+ aFt1 ( this, BMP_RESID ( FT_1 ) ),
+ aFt2 ( this, BMP_RESID ( FT_2 ) ),
+ aFt3 ( this, BMP_RESID ( FT_3 ) ),
+
aCbx1 ( this, BMP_RESID( CBX_1 ) ),
pQSet1 ( new MaskSet( this, BMP_RESID( QCOL_1 ) ) ),
aSp1 ( this, BMP_RESID( SP_1 ) ),
@@ -440,9 +444,6 @@ SvxBmpMask::SvxBmpMask( SfxBindings *pBindinx,
pData ( new MaskData( this, *pBindinx ) ),
aCbxTrans ( this, BMP_RESID( CBX_TRANS ) ),
aLbColorTrans ( this, BMP_RESID ( LB_TRANS ) ),
- aFt1 ( this, BMP_RESID ( FT_1 ) ),
- aFt2 ( this, BMP_RESID ( FT_2 ) ),
- aFt3 ( this, BMP_RESID ( FT_3 ) ),
pColTab ( NULL ),
aPipetteColor ( COL_WHITE ),
aSelItem ( SID_BMPMASK_EXEC, *this, *pBindinx ),
@@ -508,6 +509,42 @@ SvxBmpMask::SvxBmpMask( SfxBindings *pBindinx,
pQSet2->Show();
pQSet3->Show();
pQSet4->Show();
+
+ aCbx1.SetAccessibleRelationMemberOf( &aGrpQ );
+ pQSet1->SetAccessibleRelationMemberOf( &aGrpQ );
+ aSp1.SetAccessibleRelationMemberOf( &aGrpQ );
+ aLbColor1.SetAccessibleRelationMemberOf( &aGrpQ );
+ aCbx1.SetAccessibleRelationLabeledBy( &aFt1 );
+ pQSet1->SetAccessibleRelationLabeledBy( &aFt1 );
+ aSp1.SetAccessibleRelationLabeledBy( &aFt2 );
+ aLbColor1.SetAccessibleRelationLabeledBy( &aFt3 );
+ aCbx2.SetAccessibleRelationMemberOf( &aGrpQ );
+ pQSet2->SetAccessibleRelationMemberOf( &aGrpQ );
+ aSp2.SetAccessibleRelationMemberOf( &aGrpQ );
+ aLbColor2.SetAccessibleRelationMemberOf( &aGrpQ );
+ aCbx2.SetAccessibleRelationLabeledBy( &aFt1 );
+ pQSet2->SetAccessibleRelationLabeledBy( &aFt1 );
+ aSp2.SetAccessibleRelationLabeledBy( &aFt2 );
+ aLbColor2.SetAccessibleRelationLabeledBy( &aFt3 );
+ aCbx3.SetAccessibleRelationMemberOf( &aGrpQ );
+ pQSet3->SetAccessibleRelationMemberOf( &aGrpQ );
+ aSp3.SetAccessibleRelationMemberOf( &aGrpQ );
+ aLbColor3.SetAccessibleRelationMemberOf( &aGrpQ );
+ aCbx3.SetAccessibleRelationLabeledBy( &aFt1 );
+ pQSet3->SetAccessibleRelationLabeledBy( &aFt1 );
+ aSp3.SetAccessibleRelationLabeledBy( &aFt2 );
+ aLbColor3.SetAccessibleRelationLabeledBy( &aFt3 );
+ aCbx4.SetAccessibleRelationMemberOf( &aGrpQ );
+ pQSet4->SetAccessibleRelationMemberOf( &aGrpQ );
+ aSp4.SetAccessibleRelationMemberOf( &aGrpQ );
+ aLbColor4.SetAccessibleRelationMemberOf( &aGrpQ );
+ aCbx4.SetAccessibleRelationLabeledBy( &aFt1 );
+ pQSet4->SetAccessibleRelationLabeledBy( &aFt1 );
+ aSp4.SetAccessibleRelationLabeledBy( &aFt2 );
+ aLbColor4.SetAccessibleRelationLabeledBy( &aFt3 );
+ aLbColorTrans.SetAccessibleRelationLabeledBy( &aCbxTrans );
+ aLbColorTrans.SetAccessibleRelationMemberOf( &aGrpQ );
+ aCbxTrans.SetAccessibleRelationMemberOf( &aGrpQ );
}
//-------------------------------------------------------------------------
diff --git a/svx/source/dialog/bmpmask.hrc b/svx/source/dialog/bmpmask.hrc
index 99c9eab04b7b..42fcc244c3f7 100644
--- a/svx/source/dialog/bmpmask.hrc
+++ b/svx/source/dialog/bmpmask.hrc
@@ -27,7 +27,11 @@
#define RID_SVXDLG_BMPMASK (RID_SVX_BMPMASK_START)
#define RID_SVXDLG_BMPMASK_STR_TRANSP (RID_SVX_BMPMASK_START + 1)
#define RID_SVXDLG_BMPMASK_STR_SOURCECOLOR (RID_SVX_BMPMASK_START + 2)
-
+/*IAccessibility2 Implementation 2009-----*/
+#define RID_SVXDLG_BMPMASK_STR_PALETTE (RID_SVX_BMPMASK_START + 3)
+#define RID_SVXDLG_BMPMASK_STR_TOLERANCE (RID_SVX_BMPMASK_START + 4)
+#define RID_SVXDLG_BMPMASK_STR_REPLACEWITH (RID_SVX_BMPMASK_START + 5)
+/*-----IAccessibility2 Implementation 2009*/
#define GRP_Q 1
#define CTR_PIPETTE 1
#define CBX_1 1
diff --git a/svx/source/dialog/bmpmask.src b/svx/source/dialog/bmpmask.src
index 7823007dbe7c..b221f633283a 100644
--- a/svx/source/dialog/bmpmask.src
+++ b/svx/source/dialog/bmpmask.src
@@ -327,47 +327,16 @@ String RID_SVXDLG_BMPMASK_STR_SOURCECOLOR
Text [ en-US ] = "Source Color";
};
- // ********************************************************************** EOF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+String RID_SVXDLG_BMPMASK_STR_PALETTE
+{
+ Text [ en-US ] = "Color Palette";
+};
+String RID_SVXDLG_BMPMASK_STR_TOLERANCE
+{
+ Text [ en-US ] = "Tolerance";
+};
+String RID_SVXDLG_BMPMASK_STR_REPLACEWITH
+{
+ Text [ en-US ] = "Replace with";
+};
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index c3f1f0b17a52..d8adc0560625 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -634,6 +634,7 @@ SvxTPView::SvxTPView( Window * pParent)
aTitle5 ( SVX_RES( STR_TITLE5 ) ),
aStrMyName ( SVX_RES( STR_VIEW) )
{
+ aViewData.SetAccessibleName(String(SVX_RES(STR_TREE)));
FreeResource();
aViewData.SetHelpId(HID_REDLINING_VIEW_DG_VIEW_TABLE);
@@ -826,6 +827,14 @@ SvxTPFilter::SvxTPFilter( Window * pParent)
aStrMyName ( SVX_RES( STR_FILTER) ),
bModified (sal_False)
{
+ aLbDate.SetAccessibleName( String( SVX_RES( STR_DATE_COMBOX) ) );
+ aDfDate.SetAccessibleName( String( SVX_RES( STR_DATE_SPIN) ) );
+ aTfDate.SetAccessibleName( String( SVX_RES( STR_DATE_TIME_SPIN) ) );
+ aDfDate2.SetAccessibleName( String( SVX_RES( STR_DATE_SPIN1) ) );
+ aTfDate2.SetAccessibleName( String( SVX_RES( STR_DATE_TIME_SPIN1) ) );
+ aLbAuthor.SetAccessibleName(aCbAuthor.GetText());
+ aLbAction.SetAccessibleName( String( SVX_RES( STR_ACTION) ) );
+ aEdComment.SetAccessibleName(aCbComment.GetText());
Image aImgTimeHC( SVX_RES( IMG_TIME_H ) );
FreeResource();
@@ -874,6 +883,15 @@ SvxTPFilter::SvxTPFilter( Window * pParent)
HideRange();
ShowAction();
bModified=sal_False;
+
+ aLbDate.SetAccessibleRelationLabeledBy(&aCbDate);
+ aLbAuthor.SetAccessibleRelationLabeledBy(&aCbAuthor);
+ aLbAction.SetAccessibleRelationLabeledBy(&aCbRange);
+ aEdRange.SetAccessibleRelationLabeledBy(&aCbRange);
+ aBtnRange.SetAccessibleRelationLabeledBy(&aCbRange);
+ aEdComment.SetAccessibleRelationLabeledBy(&aCbComment);
+ aDfDate2.SetAccessibleRelationLabeledBy(&aDfDate2);
+ aTfDate2.SetAccessibleRelationLabeledBy(&aTfDate2);
}
void SvxTPFilter::SetRedlinTable(SvxRedlinTable* pTable)
diff --git a/svx/source/dialog/ctredlin.hrc b/svx/source/dialog/ctredlin.hrc
index 23cc504c0573..772d985ae8c0 100644
--- a/svx/source/dialog/ctredlin.hrc
+++ b/svx/source/dialog/ctredlin.hrc
@@ -66,5 +66,12 @@
#define STR_TITLE3 3
#define STR_TITLE4 4
#define STR_TITLE5 5
-//
+//IAccessibility2 Implementation 2009-----
+#define STR_DATE_COMBOX 6
+#define STR_DATE_SPIN 7
+#define STR_DATE_SPIN1 8
+#define STR_DATE_TIME_SPIN 9
+#define STR_DATE_TIME_SPIN1 10
+#define STR_TREE 11
+//-----IAccessibility2 Implementation 2009
diff --git a/svx/source/dialog/ctredlin.src b/svx/source/dialog/ctredlin.src
index e617607ebfad..284ed97ed54e 100644
--- a/svx/source/dialog/ctredlin.src
+++ b/svx/source/dialog/ctredlin.src
@@ -114,7 +114,10 @@ TabPage SID_REDLIN_FILTER_PAGE
ImageBitmap = Bitmap { File = "time.bmp" ; };
MASKCOLOR
};
- QuickHelpText [ en-US ] = "Set Date/Time" ;
+ // IAccessibility2 implementation 2009. ------
+ //QuickHelpText [ en-US ] = "Set Date/Time" ;
+ QuickHelpText [ en-US ] = "Set Start Date/Time" ;
+ // ------ IAccessibility2 implementation 2009.
};
FixedText FT_DATE2
{
@@ -170,7 +173,10 @@ TabPage SID_REDLIN_FILTER_PAGE
ImageBitmap = Bitmap { File = "time.bmp" ; };
MASKCOLOR
};
- QuickHelpText [ en-US ] = "Set Date/Time" ;
+ // IAccessibility2 implementation 2009. ------
+ //QuickHelpText [ en-US ] = "Set Date/Time" ;
+ QuickHelpText [ en-US ] = "Set End Date/Time" ;
+ // ------ IAccessibility2 implementation 2009.
};
CheckBox CB_AUTOR
{
@@ -254,6 +260,32 @@ TabPage SID_REDLIN_FILTER_PAGE
ImageBitmap = Bitmap { File = "time_h.bmp" ; };
MASKCOLOR
};
+ /*IAccessibility2 Implementation 2009-----*/
+ String STR_DATE_COMBOX
+ {
+ Text [ en-US ] = "Date Condition" ;
+ };
+ String STR_DATE_SPIN
+ {
+ Text [ en-US ] = "Start Date" ;
+ };
+ String STR_DATE_SPIN1
+ {
+ Text [ en-US ] = "End Date" ;
+ };
+ String STR_DATE_TIME_SPIN
+ {
+ Text [ en-US ] = "Start Time" ;
+ };
+ String STR_DATE_TIME_SPIN1
+ {
+ Text [ en-US ] = "End Time" ;
+ };
+ String STR_TREE
+ {
+ Text [ en-US ] = "Changes" ;
+ };
+ /*-----IAccessibility2 Implementation 2009*/
};
TabPage SID_REDLIN_VIEW_PAGE
{
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx
index 5f05d360007c..ee59f6ce924d 100644
--- a/svx/source/dialog/dlgctl3d.cxx
+++ b/svx/source/dialog/dlgctl3d.cxx
@@ -45,6 +45,7 @@
#include <svx/xlnwtit.hxx>
#include "helpid.hrc"
#include <algorithm>
+#include <svx/dialmgr.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -1012,6 +1013,7 @@ void SvxLightCtl3D::Init()
maHorScroller.SetHelpId(HID_CTRL3D_HSCROLL);
maVerScroller.SetHelpId(HID_CTRL3D_VSCROLL);
maSwitcher.SetHelpId(HID_CTRL3D_SWITCHER);
+ maSwitcher.SetAccessibleName(String(SVX_RES(STR_SWITCH)));
// Light preview
maLightControl.Show();
diff --git a/svx/source/dialog/dlgctrl.src b/svx/source/dialog/dlgctrl.src
index 2da544673c65..e5962dcef059 100644
--- a/svx/source/dialog/dlgctrl.src
+++ b/svx/source/dialog/dlgctrl.src
@@ -31,4 +31,9 @@ Bitmap RID_SVXCTRL_RECTBTNS
{
File = "rectbtns.bmp" ;
};
-
+/*IAccessibility2 Implementation 2009-----*/
+String STR_SWITCH
+{
+ Text [ en-US ] = "Switch" ;
+};
+/*-----IAccessibility2 Implementation 2009*/
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index 67e34801ca34..b4debaa4eaa4 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -146,6 +146,7 @@ SvxHFPage::SvxHFPage( Window* pParent, sal_uInt16 nResId, const SfxItemSet& rAtt
SfxTabPage( pParent, SVX_RES( nResId ), rAttr ),
+ aFrm ( this, SVX_RES( FL_FRAME ) ),
aTurnOnBox ( this, SVX_RES( CB_TURNON ) ),
aCntSharedBox ( this, SVX_RES( CB_SHARED ) ),
aLMLbl ( this, SVX_RES( FT_LMARGIN ) ),
@@ -158,7 +159,6 @@ SvxHFPage::SvxHFPage( Window* pParent, sal_uInt16 nResId, const SfxItemSet& rAtt
aHeightFT ( this, SVX_RES( FT_HEIGHT ) ),
aHeightEdit ( this, SVX_RES( ED_HEIGHT ) ),
aHeightDynBtn ( this, SVX_RES( CB_HEIGHT_DYN ) ),
- aFrm ( this, SVX_RES( FL_FRAME ) ),
aBspWin ( this, SVX_RES( WN_BSP ) ),
aBackgroundBtn ( this, SVX_RES( BTN_EXTRAS ) ),
@@ -182,6 +182,20 @@ SvxHFPage::SvxHFPage( Window* pParent, sal_uInt16 nResId, const SfxItemSet& rAtt
SetFieldUnit( aHeightEdit, eFUnit );
SetFieldUnit( aLMEdit, eFUnit );
SetFieldUnit( aRMEdit, eFUnit );
+
+ aTurnOnBox.SetAccessibleRelationMemberOf( &aFrm );
+ aCntSharedBox.SetAccessibleRelationMemberOf( &aFrm );
+ aLMLbl.SetAccessibleRelationMemberOf( &aFrm );
+ aLMEdit.SetAccessibleRelationMemberOf( &aFrm );
+ aRMLbl.SetAccessibleRelationMemberOf( &aFrm );
+ aRMEdit.SetAccessibleRelationMemberOf( &aFrm );
+ aDistFT.SetAccessibleRelationMemberOf( &aFrm );
+ aDistEdit.SetAccessibleRelationMemberOf( &aFrm );
+ aDynSpacingCB.SetAccessibleRelationMemberOf( &aFrm );
+ aHeightFT.SetAccessibleRelationMemberOf( &aFrm );
+ aHeightEdit.SetAccessibleRelationMemberOf( &aFrm );
+ aHeightDynBtn.SetAccessibleRelationMemberOf( &aFrm );
+ aBackgroundBtn.SetAccessibleRelationMemberOf(&aFrm);
}
// -----------------------------------------------------------------------
diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx
index 83d8206111f8..a3b367ad878c 100644
--- a/svx/source/dialog/optgrid.cxx
+++ b/svx/source/dialog/optgrid.cxx
@@ -248,6 +248,17 @@ SvxGridTabPage::SvxGridTabPage( Window* pParent, const SfxItemSet& rCoreSet) :
LINK( this, SvxGridTabPage, ChangeDivisionHdl_Impl ) );
aNumFldDivisionY.SetModifyHdl(
LINK( this, SvxGridTabPage, ChangeDivisionHdl_Impl ) );
+
+ ::rtl::OUString sFlResolution( aFlResolution.GetDisplayText() );
+ ::rtl::OUString sFtDrawX(aFtDrawX.GetDisplayText());
+ ::rtl::OUString sFtDrawY(aFtDrawY.GetDisplayText());
+ aMtrFldDrawX.SetAccessibleName( sFtDrawX + sFlResolution );
+ aMtrFldDrawY.SetAccessibleName( sFtDrawY + sFlResolution );
+ ::rtl::OUString sFlDivision( aFlDivision.GetDisplayText() );
+ ::rtl::OUString sFtDivisionX(aFtDivisionX.GetDisplayText());
+ ::rtl::OUString sFtDivisionY(aFtDivisionY.GetDisplayText());
+ aNumFldDivisionX.SetAccessibleName( sFtDivisionX + sFlDivision );
+ aNumFldDivisionY.SetAccessibleName( sFtDivisionY + sFlDivision );
}
//------------------------------------------------------------------------
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index a85fc023eca5..3185263b4fe4 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -277,6 +277,14 @@ SvxRubyDialog::SvxRubyDialog( SfxBindings *pBind, SfxChildWindow *pCW,
}
UpdateColors();
+
+ String leftLabelName = aLeftFT.GetText(), rightLabelName = aRightFT.GetText();
+ aLeft2ED.SetAccessibleName(leftLabelName);
+ aLeft3ED.SetAccessibleName(leftLabelName);
+ aLeft4ED.SetAccessibleName(leftLabelName);
+ aRight2ED.SetAccessibleName(rightLabelName);
+ aRight3ED.SetAccessibleName(rightLabelName);
+ aRight4ED.SetAccessibleName(rightLabelName);
}
/* -----------------------------09.01.01 17:17--------------------------------
diff --git a/svx/source/dialog/sdstring.src b/svx/source/dialog/sdstring.src
index 4b70dda6a151..44982cee0751 100644
--- a/svx/source/dialog/sdstring.src
+++ b/svx/source/dialog/sdstring.src
@@ -1187,103 +1187,26 @@ String RID_SVXSTR_COLOR_USER
Text [ en-US ] = "User" ;
};
+String RID_SVXSTR_GALLERYPROPS_GALTHEME
+{
+ Text [ en-US ] = "Gallery Theme" ;
+};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+//IAccessibility2 Implementation 2009-----
+String RID_SVXSTR_GALLERY_THEMEITEMS
+{
+ Text [ en-US ] = "Theme Items";
+};
+String RID_SVXSTR_GALLERY_THEMENAME
+{
+ Text [ en-US ] = "Theme Name";
+};
+String RID_SVXSTR_GALLERY_FILESFOUND
+{
+ Text [ en-US ] = "Files Found";
+};
+String RID_SVXSTR_GALLERY_PREVIEW
+{
+ Text [ en-US ] = "Preview";
+};
+//-----IAccessibility2 Implementation 2009
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 5f91c6dabacb..97dc2cfaf76d 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -494,6 +494,14 @@ void SvxSearchDialog::Construct_Impl()
{
aJapMatchFullHalfWidthCB.Hide();
}
+
+ aSimilarityBtn.SetAccessibleRelationLabeledBy(&aSimilarityBox);
+ aSimilarityBtn.SetAccessibleRelationMemberOf(&aOptionsFL);
+ aJapOptionsBtn.SetAccessibleRelationLabeledBy(&aJapOptionsCB);
+ aJapOptionsBtn.SetAccessibleRelationMemberOf(&aOptionsFL);
+ aRowsBtn.SetAccessibleRelationMemberOf(&aCalcSearchDirFT);
+ aColumnsBtn.SetAccessibleRelationMemberOf(&aCalcSearchDirFT);
+
//component extension - show component search buttons if the commands
// vnd.sun.star::SearchViaComponent1 and 2 are supported
const uno::Reference< frame::XFrame >xFrame = rBindings.GetActiveFrame();
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 4fbd1f3c288e..abc25d865d06 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -2803,7 +2803,7 @@ void SvxRuler::EvalModifier()
const RulerType eType = GetDragType();
nDragType = DRAG_OBJECT_SIZE_PROPORTIONAL;
if( RULER_TYPE_TAB == eType ||
- ( ( RULER_TYPE_BORDER == eType || RULER_TYPE_MARGIN1 == eType ) &&
+ ( ( RULER_TYPE_BORDER == eType || RULER_TYPE_MARGIN1 == eType || RULER_TYPE_MARGIN2 == eType) &&
pColumnItem ) )
PrepareProportional_Impl(eType);
break;
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index ea33f2089ed0..f1766f01c3ea 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -119,6 +119,7 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings,
aBtnMaterial ( this, SVX_RES( BTN_MATERIAL ) ),
aBtnUpdate ( this, SVX_RES( BTN_UPDATE ) ),
aBtnAssign ( this, SVX_RES( BTN_ASSIGN ) ),
+ aFLGeometrie ( this, SVX_RES( FL_GEOMETRIE ) ),
// Geometrie
aFtPercentDiagonal ( this, SVX_RES( FT_PERCENT_DIAGONAL ) ),
@@ -129,36 +130,36 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings,
aMtrEndAngle ( this, SVX_RES( MTR_END_ANGLE ) ),
aFtDepth ( this, SVX_RES( FT_DEPTH ) ),
aMtrDepth ( this, SVX_RES( MTR_DEPTH ) ),
- aFLGeometrie ( this, SVX_RES( FL_GEOMETRIE ) ),
+ aFLSegments ( this, SVX_RES( FL_SEGMENTS ) ),
aFtHorizontal ( this, SVX_RES( FT_HORIZONTAL ) ),
aNumHorizontal ( this, SVX_RES( NUM_HORIZONTAL ) ),
aFtVertical ( this, SVX_RES( FT_VERTICAL ) ),
aNumVertical ( this, SVX_RES( NUM_VERTICAL ) ),
- aFLSegments ( this, SVX_RES( FL_SEGMENTS ) ),
+ aFLNormals ( this, SVX_RES( FL_NORMALS ) ),
aBtnNormalsObj ( this, SVX_RES( BTN_NORMALS_OBJ ) ),
aBtnNormalsFlat ( this, SVX_RES( BTN_NORMALS_FLAT ) ),
aBtnNormalsSphere ( this, SVX_RES( BTN_NORMALS_SPHERE ) ),
aBtnNormalsInvert ( this, SVX_RES( BTN_NORMALS_INVERT ) ),
aBtnTwoSidedLighting( this, SVX_RES( BTN_TWO_SIDED_LIGHTING ) ),
- aFLNormals ( this, SVX_RES( FL_NORMALS ) ),
aBtnDoubleSided ( this, SVX_RES( BTN_DOUBLE_SIDED ) ),
// Darstellung
+ aFLRepresentation ( this, SVX_RES( FL_REPRESENTATION ) ),
aFtShademode ( this, SVX_RES( FT_SHADEMODE ) ),
aLbShademode ( this, SVX_RES( LB_SHADEMODE ) ),
+ aFLShadow ( this, SVX_RES( FL_SHADOW ) ),
aBtnShadow3d ( this, SVX_RES( BTN_SHADOW_3D ) ),
aFtSlant ( this, SVX_RES( FT_SLANT ) ),
aMtrSlant ( this, SVX_RES( MTR_SLANT ) ),
- aFLShadow ( this, SVX_RES( FL_SHADOW ) ),
aFtDistance ( this, SVX_RES( FT_DISTANCE ) ),
aMtrDistance ( this, SVX_RES( MTR_DISTANCE ) ),
aFtFocalLeng ( this, SVX_RES( FT_FOCAL_LENGTH ) ),
aMtrFocalLength ( this, SVX_RES( MTR_FOCAL_LENGTH ) ),
aFLCamera ( this, SVX_RES( FL_CAMERA ) ),
- aFLRepresentation ( this, SVX_RES( FL_REPRESENTATION ) ),
+ aFLLight ( this, SVX_RES( FL_LIGHT ) ),
// Beleuchtung
aBtnLight1 ( this, SVX_RES( BTN_LIGHT_1 ) ),
@@ -169,6 +170,7 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings,
aBtnLight6 ( this, SVX_RES( BTN_LIGHT_6 ) ),
aBtnLight7 ( this, SVX_RES( BTN_LIGHT_7 ) ),
aBtnLight8 ( this, SVX_RES( BTN_LIGHT_8 ) ),
+ aFTLightsource ( this, SVX_RES( FT_LIGHTSOURCE ) ),
aLbLight1 ( this, SVX_RES( LB_LIGHT_1 ) ),
aLbLight2 ( this, SVX_RES( LB_LIGHT_2 ) ),
aLbLight3 ( this, SVX_RES( LB_LIGHT_3 ) ),
@@ -179,15 +181,13 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings,
aLbLight8 ( this, SVX_RES( LB_LIGHT_8 ) ),
aBtnLightColor ( this, SVX_RES( BTN_LIGHT_COLOR ) ),
- aFTLightsource ( this, SVX_RES( FT_LIGHTSOURCE ) ),
// #99694# Keyboard shortcuts activate the next control, so the
// order needed to be changed here
aFTAmbientlight ( this, SVX_RES( FT_AMBIENTLIGHT ) ), // Text label
aLbAmbientlight ( this, SVX_RES( LB_AMBIENTLIGHT ) ), // ListBox
aBtnAmbientColor ( this, SVX_RES( BTN_AMBIENT_COLOR ) ), // color button
-
- aFLLight ( this, SVX_RES( FL_LIGHT ) ),
+ aFLTexture ( this, SVX_RES( FL_TEXTURE ) ),
// Texturen
aFtTexKind ( this, SVX_RES( FT_TEX_KIND ) ),
@@ -207,7 +207,7 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings,
aBtnTexCircleY ( this, SVX_RES( BTN_TEX_CIRCLE_Y ) ),
aFtTexFilter ( this, SVX_RES( FT_TEX_FILTER ) ),
aBtnTexFilter ( this, SVX_RES( BTN_TEX_FILTER ) ),
- aFLTexture ( this, SVX_RES( FL_TEXTURE ) ),
+ aFLMaterial ( this, SVX_RES( FL_MATERIAL ) ),
// Material
aFtMatFavorites ( this, SVX_RES( FT_MAT_FAVORITES ) ),
@@ -218,20 +218,19 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings,
aFtMatEmission ( this, SVX_RES( FT_MAT_EMISSION ) ),
aLbMatEmission ( this, SVX_RES( LB_MAT_EMISSION ) ),
aBtnEmissionColor ( this, SVX_RES( BTN_EMISSION_COLOR ) ),
+ aFLMatSpecular ( this, SVX_RES( FL_MAT_SPECULAR ) ),
aFtMatSpecular ( this, SVX_RES( FT_MAT_SPECULAR ) ),
aLbMatSpecular ( this, SVX_RES( LB_MAT_SPECULAR ) ),
aBtnSpecularColor ( this, SVX_RES( BTN_SPECULAR_COLOR ) ),
aFtMatSpecularIntensity( this, SVX_RES( FT_MAT_SPECULAR_INTENSITY ) ),
aMtrMatSpecularIntensity( this, SVX_RES( MTR_MAT_SPECULAR_INTENSITY ) ),
- aFLMatSpecular ( this, SVX_RES( FL_MAT_SPECULAR ) ),
- aFLMaterial ( this, SVX_RES( FL_MATERIAL ) ),
+ aCtlPreview ( this, SVX_RES( CTL_PREVIEW ) ),
+ aCtlLightPreview ( this, SVX_RES( CTL_LIGHT_PREVIEW ) ),
// Unterer Bereich
aBtnConvertTo3D ( this, SVX_RES( BTN_CHANGE_TO_3D ) ),
aBtnLatheObject ( this, SVX_RES( BTN_LATHE_OBJ ) ),
aBtnPerspective ( this, SVX_RES( BTN_PERSPECTIVE ) ),
- aCtlPreview ( this, SVX_RES( CTL_PREVIEW ) ),
- aCtlLightPreview ( this, SVX_RES( CTL_LIGHT_PREVIEW ) ),
aImgLightOn ( SVX_RES( RID_SVXIMAGE_LIGHT_ON ) ),
aImgLightOff ( SVX_RES( RID_SVXIMAGE_LIGHT_OFF ) ),
@@ -255,6 +254,11 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings,
mpRemember2DAttributes(NULL),
bOnly3DChanged ( sal_False )
{
+ String accname(SVX_RES(STR_COLOR_LIGHT_PRE));
+ aCtlLightPreview.SetAccessibleName(accname);
+ aCtlPreview.SetAccessibleName(accname);
+ aLbAmbientlight.SetAccessibleName(aFTAmbientlight.GetDisplayText());
+
SETHCIMAGE( aBtnGeo, BMP_GEO_H );
SETHCIMAGE( aBtnRepresentation, BMP_REPRESENTATION_H );
SETHCIMAGE( aBtnLight, BMP_3DLIGHT_H );
@@ -416,6 +420,86 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings,
}
Reset();
+
+ aBtnNormalsObj.SetAccessibleRelationMemberOf( &aFLNormals );
+ aBtnNormalsFlat.SetAccessibleRelationMemberOf( &aFLNormals );
+ aBtnNormalsSphere.SetAccessibleRelationMemberOf( &aFLNormals );
+ aBtnNormalsInvert.SetAccessibleRelationMemberOf( &aFLNormals );
+ aBtnTwoSidedLighting.SetAccessibleRelationMemberOf( &aFLNormals );
+ aBtnDoubleSided.SetAccessibleRelationMemberOf( &aFLNormals );
+
+ aBtnLight1.SetAccessibleRelationMemberOf( &aFLLight );
+ aBtnLight2.SetAccessibleRelationMemberOf( &aFLLight );
+ aBtnLight3.SetAccessibleRelationMemberOf( &aFLLight );
+ aBtnLight4.SetAccessibleRelationMemberOf( &aFLLight );
+ aBtnLight5.SetAccessibleRelationMemberOf( &aFLLight );
+ aBtnLight6.SetAccessibleRelationMemberOf( &aFLLight );
+ aBtnLight7.SetAccessibleRelationMemberOf( &aFLLight );
+ aBtnLight8.SetAccessibleRelationMemberOf( &aFLLight );
+
+ aBtnLight1.SetAccessibleRelationLabeledBy( &aFTLightsource );
+ aBtnLight2.SetAccessibleRelationLabeledBy( &aFTLightsource );
+ aBtnLight3.SetAccessibleRelationLabeledBy( &aFTLightsource );
+ aBtnLight4.SetAccessibleRelationLabeledBy( &aFTLightsource );
+ aBtnLight5.SetAccessibleRelationLabeledBy( &aFTLightsource );
+ aBtnLight6.SetAccessibleRelationLabeledBy( &aFTLightsource );
+ aBtnLight7.SetAccessibleRelationLabeledBy( &aFTLightsource );
+ aBtnLight8.SetAccessibleRelationLabeledBy( &aFTLightsource );
+ aBtnLightColor.SetAccessibleRelationMemberOf( &aFLLight );
+ aBtnLightColor.SetAccessibleRelationLabeledBy( &aFTLightsource );
+ aBtnAmbientColor.SetAccessibleRelationMemberOf( &aFLLight );
+ aBtnAmbientColor.SetAccessibleRelationLabeledBy( &aFTAmbientlight );
+
+ aBtnSpecularColor.SetAccessibleRelationLabeledBy( &aFtMatSpecular );
+ aBtnMatColor.SetAccessibleRelationLabeledBy( &aFtMatColor );
+ aBtnEmissionColor.SetAccessibleRelationLabeledBy( &aFtMatEmission );
+ aBtnTexLuminance.SetAccessibleRelationLabeledBy( &aFtTexKind );
+ aBtnTexColor.SetAccessibleRelationLabeledBy( &aFtTexKind );
+ aBtnTexReplace.SetAccessibleRelationLabeledBy( &aFtTexMode );
+ aBtnTexModulate.SetAccessibleRelationLabeledBy( &aFtTexMode );
+ aBtnTexBlend.SetAccessibleRelationLabeledBy( &aFtTexMode );
+ aBtnTexObjectX.SetAccessibleRelationLabeledBy( &aFtTexProjectionX );
+ aBtnTexParallelX.SetAccessibleRelationLabeledBy( &aFtTexProjectionX );
+ aBtnTexCircleX.SetAccessibleRelationLabeledBy( &aFtTexProjectionX );
+ aBtnTexObjectY.SetAccessibleRelationLabeledBy( &aFtTexProjectionY );
+ aBtnTexParallelY.SetAccessibleRelationLabeledBy( &aFtTexProjectionY );
+ aBtnTexCircleY.SetAccessibleRelationLabeledBy( &aFtTexProjectionY );
+ aBtnTexFilter.SetAccessibleRelationLabeledBy( &aFtTexFilter );
+ aCtlLightPreview.SetAccessibleRelationLabeledBy( &aCtlLightPreview );
+ aBtnNormalsObj.SetAccessibleRelationMemberOf(&aFLNormals);
+ aBtnNormalsFlat.SetAccessibleRelationMemberOf(&aFLNormals);
+ aBtnNormalsSphere.SetAccessibleRelationMemberOf(&aFLNormals);
+ aBtnNormalsInvert.SetAccessibleRelationMemberOf(&aFLNormals);
+ aBtnTwoSidedLighting.SetAccessibleRelationMemberOf(&aFLNormals);
+
+ aBtnShadow3d.SetAccessibleRelationMemberOf(&aFLShadow);
+
+ aBtnLight1.SetAccessibleRelationMemberOf(&aFLLight);
+ aBtnLight2.SetAccessibleRelationMemberOf(&aFLLight);
+ aBtnLight3.SetAccessibleRelationMemberOf(&aFLLight);
+ aBtnLight4.SetAccessibleRelationMemberOf(&aFLLight);
+ aBtnLight5.SetAccessibleRelationMemberOf(&aFLLight);
+ aBtnLight6.SetAccessibleRelationMemberOf(&aFLLight);
+ aBtnLight7.SetAccessibleRelationMemberOf(&aFLLight);
+ aBtnLight8.SetAccessibleRelationMemberOf(&aFLLight);
+
+ aBtnTexLuminance.SetAccessibleRelationMemberOf(&aFLTexture);
+ aBtnTexColor.SetAccessibleRelationMemberOf(&aFLTexture);
+ aBtnTexReplace.SetAccessibleRelationMemberOf(&aFLTexture);
+ aBtnTexModulate.SetAccessibleRelationMemberOf(&aFLTexture);
+ aBtnTexBlend.SetAccessibleRelationMemberOf(&aFLTexture);
+ aBtnTexObjectX.SetAccessibleRelationMemberOf(&aFLTexture);
+ aBtnTexParallelX.SetAccessibleRelationMemberOf(&aFLTexture);
+ aBtnTexCircleX.SetAccessibleRelationMemberOf(&aFLTexture);
+ aBtnTexObjectY.SetAccessibleRelationMemberOf(&aFLTexture);
+ aBtnTexParallelY.SetAccessibleRelationMemberOf(&aFLTexture);
+ aBtnTexCircleY.SetAccessibleRelationMemberOf(&aFLTexture);
+ aBtnTexFilter.SetAccessibleRelationMemberOf(&aFLTexture);
+
+ aBtnMatColor.SetAccessibleRelationMemberOf(&aFLMaterial);
+ aBtnEmissionColor.SetAccessibleRelationMemberOf(&aFLMaterial);
+
+ aBtnSpecularColor.SetAccessibleRelationMemberOf(&aFLMatSpecular);
}
// -----------------------------------------------------------------------
diff --git a/svx/source/engine3d/float3d.src b/svx/source/engine3d/float3d.src
index 1947fead5556..c75ab16e19c2 100644
--- a/svx/source/engine3d/float3d.src
+++ b/svx/source/engine3d/float3d.src
@@ -1438,53 +1438,10 @@ String RID_SVXFLOAT3D_FIX_B
Text [ en-US ] = "B:";
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+// IAccessibility2 implementation 2009. ------
+String STR_COLOR_LIGHT_PRE
+{
+ Text [ en-US ] = "Color Light Preview";
+};
+// ------ IAccessibility2 implementation 2009.
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 47aeceda995b..0dce12e13cfb 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -365,7 +365,8 @@ Reference< XInterface > SAL_CALL FmXGridControl_NewInstance_Impl(const Reference
DBG_NAME(FmXGridControl )
//------------------------------------------------------------------------------
FmXGridControl::FmXGridControl(const Reference< XMultiServiceFactory >& _rxFactory)
- :m_aModifyListeners(*this, GetMutex())
+ :UnoControl( _rxFactory)
+ ,m_aModifyListeners(*this, GetMutex())
,m_aUpdateListeners(*this, GetMutex())
,m_aContainerListeners(*this, GetMutex())
,m_aSelectionListeners(*this, GetMutex())
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 38342bf355ea..26f36802a8f9 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -2001,6 +2001,18 @@ void DbGridControl::AdjustRows()
RowRemoved(GetRowCount() - nDelta, nDelta, sal_False);
// es sind Zeilen weggefallen, dann ab der aktuellen Position neu zeichen
Invalidate();
+
+ sal_Int32 nNewPos = AlignSeekCursor();
+ if (m_bSynchDisplay)
+ DbGridControl_Base::GoToRow(nNewPos);
+
+ SetCurrent(nNewPos);
+ // there are rows so go to the selected current column
+ if (nRecordCount)
+ GoToRowColumnId(nNewPos, GetColumnId(GetCurColumnId()));
+ if (!IsResizing() && GetRowCount())
+ RecalcRows(GetTopRow(), GetVisibleRows(), sal_True);
+ m_aBar.InvalidateAll(m_nCurrentPos, sal_True);
}
else // zuwenig
RowInserted(GetRowCount(), -nDelta, sal_True);
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index 2b7ad83f7f5f..a3a4038e4ab8 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -650,7 +650,9 @@ void FmFormObj::SetUnoControlModel( const Reference< com::sun::star::awt::XContr
{
SdrUnoObj::SetUnoControlModel( _rxModel );
- // TODO: call something like formObjectInserted at the form page, to tell it the new model
+ FmFormPage* pFormPage = PTR_CAST( FmFormPage, GetPage() );
+ if ( pFormPage )
+ pFormPage->GetImpl().formModelAssigned( *this );
impl_checkRefDevice_nothrow( true );
}
diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx
index 480bc5678eaf..bf86964d76de 100644
--- a/svx/source/form/fmpage.cxx
+++ b/svx/source/form/fmpage.cxx
@@ -105,12 +105,15 @@ FmFormPage::FmFormPage(FmFormModel& rModel, StarBASIC* _pBasic, FASTBOOL bMaster
FmFormPage::FmFormPage(const FmFormPage& rPage)
:SdrPage(rPage)
#ifndef SVX_LIGHT
- ,m_pImpl(new FmFormPageImpl( *this, rPage.GetImpl() ) )
+ ,m_pImpl(new FmFormPageImpl( *this ) )
#else
,m_pImpl(NULL)
#endif
,m_pBasic(0)
{
+#ifndef SVX_LIGHT
+ m_pImpl->initFrom( rPage.GetImpl() );
+#endif
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPage::FmFormPage" );
m_sPageName = rPage.m_sPageName;
}
diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx
index e239e982dd66..a0d2f5a3c47a 100644
--- a/svx/source/form/fmpgeimp.cxx
+++ b/svx/source/form/fmpgeimp.cxx
@@ -167,21 +167,18 @@ namespace
}
//------------------------------------------------------------------------------
-FmFormPageImpl::FmFormPageImpl( FmFormPage& _rPage, const FmFormPageImpl& rImpl )
- :m_rPage( _rPage )
- ,m_bFirstActivation( sal_True )
- ,m_bAttemptedFormCreation( false )
+void FmFormPageImpl::initFrom( FmFormPageImpl& i_foreignImpl )
{
- DBG_CTOR(FmFormPageImpl,NULL);
-
// clone the Forms collection
- Reference< XCloneable > xCloneable( const_cast< FmFormPageImpl& >( rImpl ).getForms( false ), UNO_QUERY );
+ const Reference< XNameContainer > xForeignForms( const_cast< FmFormPageImpl& >( i_foreignImpl ).getForms( false ) );
+ const Reference< XCloneable > xCloneable( xForeignForms, UNO_QUERY );
if ( !xCloneable.is() )
{
// great, nothing to do
- OSL_ENSURE( !const_cast< FmFormPageImpl& >( rImpl ).getForms( false ).is(), "FmFormPageImpl::FmFormPageImpl: a non-cloneable forms container!?" );
+ OSL_ENSURE( !xForeignForms.is(), "FmFormPageImpl::FmFormPageImpl: a non-cloneable forms container!?" );
return;
}
+
try
{
m_xForms.set( xCloneable->createClone(), UNO_QUERY_THROW );
@@ -196,7 +193,7 @@ FmFormPageImpl::FmFormPageImpl( FmFormPage& _rPage, const FmFormPageImpl& rImpl
aVisitor.process( FormComponentPair( xCloneable, m_xForms ), aAssignmentProcessor );
// assign the cloned models to their SdrObjects
- SdrObjListIter aForeignIter( rImpl.m_rPage );
+ SdrObjListIter aForeignIter( i_foreignImpl.m_rPage );
SdrObjListIter aOwnIter( m_rPage );
OSL_ENSURE( aForeignIter.IsMore() == aOwnIter.IsMore(), "FmFormPageImpl::FmFormPageImpl: inconsistent number of objects (1)!" );
@@ -208,31 +205,23 @@ FmFormPageImpl::FmFormPageImpl( FmFormPage& _rPage, const FmFormPageImpl& rImpl
bool bForeignIsForm = pForeignObj && ( pForeignObj->GetObjInventor() == FmFormInventor );
bool bOwnIsForm = pOwnObj && ( pOwnObj->GetObjInventor() == FmFormInventor );
- if ( bForeignIsForm != bOwnIsForm )
- {
- OSL_ENSURE( false, "FmFormPageImpl::FmFormPageImpl: inconsistent ordering of objects!" );
- // don't attempt to do further assignments, something's completely messed up
- break;
- }
+ ENSURE_OR_BREAK( bForeignIsForm == bOwnIsForm, "FmFormPageImpl::FmFormPageImpl: inconsistent ordering of objects!" );
+ // if this fires, don't attempt to do further assignments, something's completely messed up
+
if ( !bForeignIsForm )
// no form control -> next round
continue;
Reference< XControlModel > xForeignModel( pForeignObj->GetUnoControlModel() );
- OSL_ENSURE( xForeignModel.is(), "FmFormPageImpl::FmFormPageImpl: control shape without control!" );
- if ( !xForeignModel.is() )
- // the SdrObject does not have a UNO Control Model. This is pathological, but well ... So the cloned
- // SdrObject will also not have a UNO Control Model.
- continue;
-
- OSL_ENSURE( !pOwnObj->GetUnoControlModel().is(), "FmFormPageImpl::FmFormPageImpl: there already is a control model for the target object!" );
+ ENSURE_OR_CONTINUE( xForeignModel.is(), "FmFormPageImpl::FmFormPageImpl: control shape without control!" );
+ // if this fires, the SdrObject does not have a UNO Control Model. This is pathological, but well ...
+ // So the cloned SdrObject will also not have a UNO Control Model.
MapControlModels::const_iterator assignment = aModelAssignment.find( xForeignModel );
- OSL_ENSURE( assignment != aModelAssignment.end(), "FmFormPageImpl::FmFormPageImpl: no clone found for this model!" );
- if ( assignment == aModelAssignment.end() )
- // the source SdrObject has a model, but it is not part of the model hierarchy in rImpl.getForms().
+ ENSURE_OR_CONTINUE( assignment != aModelAssignment.end(), "FmFormPageImpl::FmFormPageImpl: no clone found for this model!" );
+ // if this fires, the source SdrObject has a model, but it is not part of the model hierarchy in
+ // i_foreignImpl.getForms().
// Pathological, too ...
- continue;
pOwnObj->SetUnoControlModel( assignment->second );
}
@@ -275,7 +264,7 @@ namespace
_map->put( makeAny( xControlModel ), makeAny( xControlShape ) );
}
- static void lcl_removeFormObject( const FmFormObj& _object, const Reference< XMap >& _map )
+ static void lcl_removeFormObject_throw( const FmFormObj& _object, const Reference< XMap >& _map, bool i_ignoreNonExistence = false )
{
// the control model
Reference< XControlModel > xControlModel( _object.GetUnoControlModel(), UNO_QUERY );
@@ -287,8 +276,13 @@ namespace
Any aOldAssignment =
#endif
_map->remove( makeAny( xControlModel ) );
- OSL_ENSURE( aOldAssignment == makeAny( Reference< XControlShape >( const_cast< FmFormObj& >( _object ).getUnoShape(), UNO_QUERY ) ),
- "lcl_removeFormObject: map was inconsistent!" );
+ #if OSL_DEBUG_LEVEL > 0
+ (void)aOldAssignment;
+ #endif
+ OSL_ENSURE( !i_ignoreNonExistence ||
+ ( aOldAssignment == makeAny( Reference< XControlShape >( const_cast< FmFormObj& >( _object ).getUnoShape(), UNO_QUERY ) ) ),
+ "lcl_removeFormObject: map was inconsistent!" );
+ (void)i_ignoreNonExistence;
}
}
@@ -703,7 +697,26 @@ Reference< XForm > FmFormPageImpl::findFormForDataSource(
return sName;
}
-//------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
+void FmFormPageImpl::formModelAssigned( const FmFormObj& _object )
+{
+ Reference< XMap > xControlShapeMap( m_aControlShapeMap.get(), UNO_QUERY );
+ if ( !xControlShapeMap.is() )
+ // our map does not exist -> not interested in this event
+ return;
+
+ try
+ {
+ lcl_removeFormObject_throw( _object, xControlShapeMap, false );
+ lcl_insertFormObject_throw( _object, xControlShapeMap );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+//----------------------------------------------------------------------------------------------------------------------
void FmFormPageImpl::formObjectInserted( const FmFormObj& _object )
{
Reference< XMap > xControlShapeMap( m_aControlShapeMap.get(), UNO_QUERY );
@@ -721,6 +734,7 @@ void FmFormPageImpl::formObjectInserted( const FmFormObj& _object )
}
}
+//----------------------------------------------------------------------------------------------------------------------
void FmFormPageImpl::formObjectRemoved( const FmFormObj& _object )
{
Reference< XMap > xControlShapeMap( m_aControlShapeMap.get(), UNO_QUERY );
@@ -730,7 +744,7 @@ void FmFormPageImpl::formObjectRemoved( const FmFormObj& _object )
try
{
- lcl_removeFormObject( _object, xControlShapeMap );
+ lcl_removeFormObject_throw( _object, xControlShapeMap );
}
catch( const Exception& )
{
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 112b47b1107e..4dec747ca431 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -901,19 +901,19 @@ void FmFormShell::GetState(SfxItemSet &rSet)
case SID_FM_USE_WIZARDS:
if ( !SvtModuleOptions().IsModuleInstalled( SvtModuleOptions::E_SDATABASE ) )
rSet.Put( SfxVisibilityItem( nWhich, sal_False ) );
- else if (!m_bDesignMode || !GetFormModel())
+ else if (!GetFormModel())
rSet.DisableItem( nWhich );
else
rSet.Put( SfxBoolItem(nWhich, GetImpl()->GetWizardUsing() ) );
break;
case SID_FM_AUTOCONTROLFOCUS:
- if (!m_bDesignMode || !GetFormModel())
+ if (!GetFormModel())
rSet.DisableItem( nWhich );
else
rSet.Put( SfxBoolItem(nWhich, GetFormModel()->GetAutoControlFocus() ) );
break;
case SID_FM_OPEN_READONLY:
- if (!m_bDesignMode || !GetFormModel())
+ if (!GetFormModel())
rSet.DisableItem( nWhich );
else
rSet.Put( SfxBoolItem(nWhich, GetFormModel()->GetOpenInDesignMode() ) );
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index eee61c5c2dee..ecbfc8afbe1a 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -66,6 +66,7 @@
#include <comphelper/property.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/stl_types.hxx>
+#include <comphelper/componentcontext.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::awt;
@@ -88,7 +89,9 @@ typedef cppu::WeakImplHelper1< XScriptListener > ScriptEventListener_BASE;
class ScriptEventListenerWrapper : public ScriptEventListener_BASE
{
public:
- ScriptEventListenerWrapper( FmFormModel& _rModel) throw ( RuntimeException ) : pModel(&_rModel)
+ ScriptEventListenerWrapper( FmFormModel& _rModel) throw ( RuntimeException )
+ :m_rModel( _rModel )
+ ,m_attemptedListenerCreation( false )
{
}
@@ -98,7 +101,7 @@ public:
// XScriptListener
virtual void SAL_CALL firing(const ScriptEvent& evt) throw(RuntimeException)
{
- setModel();
+ attemptListenerCreation();
if ( m_vbaListener.is() )
{
m_vbaListener->firing( evt );
@@ -107,7 +110,7 @@ public:
virtual Any SAL_CALL approveFiring(const ScriptEvent& evt) throw( com::sun::star::reflection::InvocationTargetException, RuntimeException)
{
- setModel();
+ attemptListenerCreation();
if ( m_vbaListener.is() )
{
return m_vbaListener->approveFiring( evt );
@@ -116,61 +119,32 @@ public:
}
private:
- void setModel()
+ void attemptListenerCreation()
{
- if ( !m_vbaListener.is() )
- {
- Reference < XPropertySet > xProps(
- ::comphelper::getProcessServiceFactory(), UNO_QUERY );
- if ( xProps.is() )
- {
- Reference< XComponentContext > xCtx( xProps->getPropertyValue(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY );
- if ( xCtx.is() )
- {
- Reference< XMultiComponentFactory > xMFac(
- xCtx->getServiceManager(), UNO_QUERY );
-
- // SfxObjectShellRef is good here since the model controls the lifetime of the shell
- SfxObjectShellRef xObjSh = pModel->GetObjectShell();
- Reference< XMultiServiceFactory > xDocFac;
- if ( xObjSh.Is() )
- xDocFac.set( xObjSh->GetModel(), UNO_QUERY );
+ if ( m_attemptedListenerCreation )
+ return;
+ m_attemptedListenerCreation = true;
- if ( xMFac.is() )
- {
- m_vbaListener.set( xMFac->createInstanceWithContext(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "ooo.vba.EventListener" ) ), xCtx ),
- UNO_QUERY_THROW );
- }
- }
- }
+ try
+ {
+ ::comphelper::ComponentContext const aContext( ::comphelper::getProcessServiceFactory() );
+ Reference< XScriptListener > const xScriptListener( aContext.createComponent( "ooo.vba.EventListener" ), UNO_QUERY_THROW );
+ Reference< XPropertySet > const xListenerProps( xScriptListener, UNO_QUERY_THROW );
+ // SfxObjectShellRef is good here since the model controls the lifetime of the shell
+ SfxObjectShellRef const xObjectShell = m_rModel.GetObjectShell();
+ ENSURE_OR_THROW( xObjectShell.Is(), "no object shell!" );
+ xListenerProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Model" ) ), makeAny( xObjectShell->GetModel() ) );
+
+ m_vbaListener = xScriptListener;
}
- Reference< XPropertySet > xProps( m_vbaListener, UNO_QUERY );
- if ( xProps.is() )
+ catch( Exception const & )
{
- try
- {
- // SfxObjectShellRef is good here since the model controls the lifetime of the shell
- SfxObjectShellRef xObjSh = pModel->GetObjectShell();
- if ( xObjSh.Is() && m_vbaListener.is() )
- {
- Any aVal;
- aVal <<= xObjSh->GetModel();
- xProps->setPropertyValue(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Model" ) ),
- aVal );
- }
- }
- catch( Exception& )
- {
- //swallow any errors
- }
+ DBG_UNHANDLED_EXCEPTION();
}
}
- FmFormModel* pModel;
- Reference< XScriptListener > m_vbaListener;
+ FmFormModel& m_rModel;
+ Reference< XScriptListener > m_vbaListener;
+ bool m_attemptedListenerCreation;
};
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index 528661d2abe4..6f6cdbf9c2a6 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -479,7 +479,10 @@ class FmXAutoControl: public UnoControl
friend Reference< XInterface > SAL_CALL FmXAutoControl_NewInstance_Impl();
public:
- FmXAutoControl(){}
+ FmXAutoControl( const ::comphelper::ComponentContext& i_context )
+ :UnoControl( i_context.getLegacyServiceFactory() )
+ {
+ }
virtual ::rtl::OUString GetComponentServiceName() {return ::rtl::OUString::createFromAscii("Edit");}
virtual void SAL_CALL createPeer( const Reference< XToolkit > & rxToolkit, const Reference< XWindowPeer > & rParentPeer ) throw( RuntimeException );
@@ -1451,7 +1454,7 @@ void FormController::toggleAutoFields(sal_Bool bAutoFields)
&& ::comphelper::getBOOL( xField->getPropertyValue( FM_PROP_AUTOINCREMENT ) )
)
{
- replaceControl( xControl, new FmXAutoControl );
+ replaceControl( xControl, new FmXAutoControl( m_aContext ) );
}
}
}
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index dfa4eaad4a9d..3704262833ed 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -41,6 +41,8 @@
#include <com/sun/star/util/DateTime.hpp>
#include "gallery.hrc"
#include <algorithm>
+#include <svx/dialogs.hrc>
+#include <svx/dialmgr.hxx>
#include <svx/svxdlg.hxx> //CHINA001
//CHINA001 #include <svx/dialogs.hrc> //CHINA001
@@ -162,6 +164,7 @@ GalleryBrowser1::GalleryBrowser1( GalleryBrowser* pParent, const ResId& rResId,
mpThemes->SetHelpId( HID_GALLERY_THEMELIST );
mpThemes->SetSelectHdl( LINK( this, GalleryBrowser1, SelectThemeHdl ) );
+ mpThemes->SetAccessibleName(String(SVX_RES( RID_SVXSTR_GALLERYPROPS_GALTHEME ) ) );
for( sal_uIntPtr i = 0, nCount = mpGallery->GetThemeCount(); i < nCount; i++ )
ImplInsertThemeEntry( mpGallery->GetThemeInfo( i ) );
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 98e4d69ee84e..2fff76ba0c76 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -54,8 +54,9 @@
#include "gallery.hrc"
#include <vcl/svapp.hxx>
#include <svx/fmmodel.hxx>
-#include <svx/svxdlg.hxx> //CHINA001
-//CHINA001 #include <svx/dialogs.hrc> //CHINA001
+#include <svx/dialmgr.hxx>
+#include <svx/svxdlg.hxx>
+#include <svx/dialogs.hrc>
// -----------
// - Defines -
@@ -338,6 +339,9 @@ GalleryBrowser2::GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId,
maViewBox.SetSelectHdl( LINK( this, GalleryBrowser2, SelectTbxHdl ) );
maViewBox.Show();
+ mpIconView->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_THEMEITEMS ) ));
+ mpListView->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_THEMEITEMS ) ));
+
maInfoBar.Show();
maSeparator.Show();
@@ -347,6 +351,12 @@ GalleryBrowser2::GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId,
InitSettings();
SetMode( ( GALLERYBROWSERMODE_PREVIEW != GalleryBrowser2::meInitMode ) ? GalleryBrowser2::meInitMode : GALLERYBROWSERMODE_ICON );
+
+ if(maInfoBar.GetText().Len() == 0)
+ mpIconView->SetAccessibleRelationLabeledBy(mpIconView);
+ else
+ mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar);
+ mpIconView->SetAccessibleRelationMemberOf(mpIconView);
}
// -----------------------------------------------------------------------------
@@ -641,6 +651,10 @@ void GalleryBrowser2::SelectTheme( const String& rThemeName )
mpListView = new GalleryListView( this, mpCurTheme );
mpPreview = new GalleryPreview( this, mpCurTheme );
+ mpIconView->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_THEMEITEMS ) ));
+ mpListView->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_THEMEITEMS ) ));
+ mpPreview->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_PREVIEW ) ));
+
const Link aSelectHdl( LINK( this, GalleryBrowser2, SelectObjectHdl ) );
mpIconView->SetSelectHdl( aSelectHdl );
@@ -655,6 +669,12 @@ void GalleryBrowser2::SelectTheme( const String& rThemeName )
maViewBox.EnableItem( TBX_ID_ICON, sal_True );
maViewBox.EnableItem( TBX_ID_LIST, sal_True );
maViewBox.CheckItem( ( GALLERYBROWSERMODE_ICON == GetMode() ) ? TBX_ID_ICON : TBX_ID_LIST, sal_True );
+
+ if(maInfoBar.GetText().Len() == 0)
+ mpIconView->SetAccessibleRelationLabeledBy(mpIconView);
+ else
+ mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar);
+ mpIconView->SetAccessibleRelationMemberOf(mpIconView);
}
// -----------------------------------------------------------------------------
diff --git a/svx/source/gallery2/gallery.src b/svx/source/gallery2/gallery.src
index 39ee6e0e6b1b..8179367cd53d 100644
--- a/svx/source/gallery2/gallery.src
+++ b/svx/source/gallery2/gallery.src
@@ -409,85 +409,3 @@ Menu RID_SVXMN_GALLERY2
};
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/svx/source/inc/fmpgeimp.hxx b/svx/source/inc/fmpgeimp.hxx
index 755c754853dc..9eb91c809d66 100644
--- a/svx/source/inc/fmpgeimp.hxx
+++ b/svx/source/inc/fmpgeimp.hxx
@@ -81,9 +81,10 @@ protected:
public:
FmFormPageImpl( FmFormPage& _rPage );
- FmFormPageImpl( FmFormPage& _rPage, const FmFormPageImpl& rImpl );
~FmFormPageImpl();
+ void initFrom( FmFormPageImpl& i_foreignImpl );
+
// nur wichtig fuer den DesignMode
void setCurForm(::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xForm);
::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> getDefaultForm();
@@ -135,6 +136,7 @@ public:
void formObjectInserted( const FmFormObj& _object );
void formObjectRemoved( const FmFormObj& _object );
+ void formModelAssigned( const FmFormObj& _object );
/** returns an object mapping from control models to drawing shapes.
*/
diff --git a/svx/source/items/chrtitem.cxx b/svx/source/items/chrtitem.cxx
index 114ce405bb69..944a520eb648 100644
--- a/svx/source/items/chrtitem.cxx
+++ b/svx/source/items/chrtitem.cxx
@@ -52,7 +52,6 @@ using namespace ::com::sun::star;
TYPEINIT1_FACTORY(SvxChartStyleItem, SfxEnumItem, new SvxChartStyleItem(CHSTYLE_2D_LINE, 0));
TYPEINIT1(SvxChartDataDescrItem, SfxEnumItem);
-TYPEINIT1(SvxChartLegendPosItem, SfxEnumItem);
TYPEINIT1(SvxChartTextOrderItem, SfxEnumItem);
TYPEINIT1(SvxChartTextOrientItem, SfxEnumItem);
TYPEINIT1(SvxChartIndicateItem, SfxEnumItem);
@@ -127,39 +126,6 @@ SfxPoolItem* SvxChartDataDescrItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) c
/*************************************************************************
|*
-|* SvxChartLegendPosItem
-|*
-*************************************************************************/
-
-SvxChartLegendPosItem::SvxChartLegendPosItem(SvxChartLegendPos eLegendPos,
- sal_uInt16 nId) :
- SfxEnumItem(nId, (sal_uInt16)eLegendPos)
-{
-}
-
-// -----------------------------------------------------------------------
-
-SvxChartLegendPosItem::SvxChartLegendPosItem(SvStream& rIn, sal_uInt16 nId) :
- SfxEnumItem(nId, rIn)
-{
-}
-
-// -----------------------------------------------------------------------
-
-SfxPoolItem* SvxChartLegendPosItem::Clone(SfxItemPool* /*pPool*/) const
-{
- return new SvxChartLegendPosItem(*this);
-}
-
-// -----------------------------------------------------------------------
-
-SfxPoolItem* SvxChartLegendPosItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
-{
- return new SvxChartLegendPosItem(rIn, Which());
-}
-
-/*************************************************************************
-|*
|* SvxChartTextOrderItem
|*
*************************************************************************/
diff --git a/svx/source/mnuctrls/fntctl.cxx b/svx/source/mnuctrls/fntctl.cxx
index 4f51e111c2c3..b10eac69bc54 100644..100755
--- a/svx/source/mnuctrls/fntctl.cxx
+++ b/svx/source/mnuctrls/fntctl.cxx
@@ -148,7 +148,7 @@ void SvxFontMenuControl::Notify( SfxBroadcaster&, const SfxHint& rHint )
IMPL_LINK_INLINE_START( SvxFontMenuControl, MenuSelect, FontNameMenu *, pMen )
{
SvxFontItem aItem( GetId() );
- aItem.GetFamilyName() = pMen->GetCurName();
+ aItem.SetFamilyName(pMen->GetCurName());
GetBindings().GetDispatcher()->Execute( GetId(), SFX_CALLMODE_RECORD, &aItem, 0L );
return 0;
}
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
index 485afe35f9c1..485afe35f9c1 100644..100755
--- a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 5e225e626175..56f9a7bdaaf0 100755
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -57,8 +57,6 @@
#include <com/sun/star/container/XContainer.hpp>
/** === end UNO includes === **/
-#include <toolkit/helper/formpdfexport.hxx>
-#include <vcl/pdfextoutdevdata.hxx>
#include <vcl/svapp.hxx>
#include <vos/mutex.hxx>
#include <comphelper/processfactory.hxx>
@@ -69,7 +67,6 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <drawinglayer/primitive2d/controlprimitive2d.hxx>
-#include <boost/shared_ptr.hpp>
#include <boost/bind.hpp>
/*
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index 094cfbd96ee5..d1bc7d4d610e 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -78,7 +78,7 @@
String SvxPosSizeStatusBarControl::GetMetricStr_Impl( long nVal )
{
// Applikations-Metrik besorgen und setzen
- FieldUnit eOutUnit = SfxModule::GetCurrentFieldUnit();
+ FieldUnit eOutUnit = SfxModule::GetModuleFieldUnit( getFrameInterface() );
FieldUnit eInUnit = FUNIT_100TH_MM;
String sMetric;
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index a951819104aa..82cd950bbbed 100644..100755
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -1258,9 +1258,9 @@ IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse)
case ITEM_XCOLOR: break;
case ITEM_COLOR: break;
case ITEM_FONT: {
- ((SvxFontItem*)pNewItem)->GetFamily()=FAMILY_DONTKNOW;
- ((SvxFontItem*)pNewItem)->GetFamilyName()=aNewText;
- ((SvxFontItem*)pNewItem)->GetStyleName().Erase();
+ ((SvxFontItem*)pNewItem)->SetFamily( FAMILY_DONTKNOW );
+ ((SvxFontItem*)pNewItem)->SetFamilyName(aNewText);
+ ((SvxFontItem*)pNewItem)->SetStyleName( String() );
} break;
case ITEM_FONTHEIGHT: {
sal_uIntPtr nHgt=0;
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 5328e5f1a3d1..30628a10df86 100644..100755
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -836,11 +836,11 @@ void ImpGetDefaultFontsLanguage( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFo
aOutTypeArr[ n ].nFntType, aOutTypeArr[ n ].nLanguage,
DEFAULTFONT_FLAGS_ONLYONE, 0 ));
SvxFontItem* pI = aItemArr[ n ];
- pI->GetFamily() = aFnt.GetFamily();
- pI->GetFamilyName() = aFnt.GetName();
- pI->GetStyleName().Erase();
- pI->GetPitch() = aFnt.GetPitch();
- pI->GetCharSet() = aFnt.GetCharSet();
+ pI->SetFamily( aFnt.GetFamily());
+ pI->SetFamilyName( aFnt.GetName());
+ pI->SetStyleName( String() );
+ pI->SetPitch( aFnt.GetPitch());
+ pI->SetCharSet( aFnt.GetCharSet() );
}
}
@@ -854,29 +854,29 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt
// get DEFAULTFONT_LATIN_TEXT and set at pool as dynamic default
Font aFont(OutputDevice::GetDefaultFont(DEFAULTFONT_LATIN_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0));
- aSvxFontItem.GetFamily() = aFont.GetFamily();
- aSvxFontItem.GetFamilyName() = aFont.GetName();
- aSvxFontItem.GetStyleName().Erase();
- aSvxFontItem.GetPitch() = aFont.GetPitch();
- aSvxFontItem.GetCharSet() = aFont.GetCharSet();
+ aSvxFontItem.SetFamily(aFont.GetFamily());
+ aSvxFontItem.SetFamilyName(aFont.GetName());
+ aSvxFontItem.SetStyleName(String());
+ aSvxFontItem.SetPitch( aFont.GetPitch());
+ aSvxFontItem.SetCharSet( aFont.GetCharSet() );
pItemPool->SetPoolDefaultItem(aSvxFontItem);
// get DEFAULTFONT_CJK_TEXT and set at pool as dynamic default
Font aFontCJK(OutputDevice::GetDefaultFont(DEFAULTFONT_CJK_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0));
- aSvxFontItemCJK.GetFamily() = aFontCJK.GetFamily();
- aSvxFontItemCJK.GetFamilyName() = aFontCJK.GetName();
- aSvxFontItemCJK.GetStyleName().Erase();
- aSvxFontItemCJK.GetPitch() = aFontCJK.GetPitch();
- aSvxFontItemCJK.GetCharSet() = aFontCJK.GetCharSet();
+ aSvxFontItemCJK.SetFamily( aFontCJK.GetFamily());
+ aSvxFontItemCJK.SetFamilyName(aFontCJK.GetName());
+ aSvxFontItemCJK.SetStyleName(String());
+ aSvxFontItemCJK.SetPitch( aFontCJK.GetPitch());
+ aSvxFontItemCJK.SetCharSet( aFontCJK.GetCharSet());
pItemPool->SetPoolDefaultItem(aSvxFontItemCJK);
// get DEFAULTFONT_CTL_TEXT and set at pool as dynamic default
Font aFontCTL(OutputDevice::GetDefaultFont(DEFAULTFONT_CTL_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0));
- aSvxFontItemCTL.GetFamily() = aFontCTL.GetFamily();
- aSvxFontItemCTL.GetFamilyName() = aFontCTL.GetName();
- aSvxFontItemCTL.GetStyleName().Erase();
- aSvxFontItemCTL.GetPitch() = aFontCTL.GetPitch();
- aSvxFontItemCTL.GetCharSet() = aFontCTL.GetCharSet();
+ aSvxFontItemCTL.SetFamily(aFontCTL.GetFamily());
+ aSvxFontItemCTL.SetFamilyName(aFontCTL.GetName());
+ aSvxFontItemCTL.SetStyleName(String());
+ aSvxFontItemCTL.SetPitch( aFontCTL.GetPitch() );
+ aSvxFontItemCTL.SetCharSet( aFontCTL.GetCharSet());
pItemPool->SetPoolDefaultItem(aSvxFontItemCTL);
// set dynamic FontHeight defaults
diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx
index ed6c2170a5f2..cd32145c191d 100644
--- a/svx/source/svdraw/svdouno.cxx
+++ b/svx/source/svdraw/svdouno.cxx
@@ -318,68 +318,25 @@ void SdrUnoObj::operator = (const SdrObject& rObj)
SdrRectObj::operator = (rObj);
// release the reference to the current control model
- SetUnoControlModel(uno::Reference< awt::XControlModel >());
+ SetUnoControlModel( NULL );
- aUnoControlModelTypeName = ((SdrUnoObj&) rObj).aUnoControlModelTypeName;
- aUnoControlTypeName = ((SdrUnoObj&) rObj).aUnoControlTypeName;
+ const SdrUnoObj& rUnoObj = dynamic_cast< const SdrUnoObj& >( rObj );
- // copy the uno control model
- uno::Reference< awt::XControlModel > xCtrl( ((SdrUnoObj&) rObj).GetUnoControlModel(), uno::UNO_QUERY );
- uno::Reference< util::XCloneable > xClone( xCtrl, uno::UNO_QUERY );
+ aUnoControlModelTypeName = rUnoObj.aUnoControlModelTypeName;
+ aUnoControlTypeName = rUnoObj.aUnoControlTypeName;
- if ( xClone.is() )
- {
- // copy the model by cloning
- uno::Reference< awt::XControlModel > xNewModel( xClone->createClone(), uno::UNO_QUERY );
- DBG_ASSERT( xNewModel.is(), "SdrUnoObj::operator =, no control model!");
- xUnoControlModel = xNewModel;
- }
- else
+ // copy the uno control model
+ const uno::Reference< awt::XControlModel > xSourceControlModel( rUnoObj.GetUnoControlModel(), uno::UNO_QUERY );
+ if ( xSourceControlModel.is() )
{
- // copy the model by streaming
- uno::Reference< io::XPersistObject > xObj( xCtrl, uno::UNO_QUERY );
- uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
-
- if ( xObj.is() && xFactory.is() )
+ try
{
- // creating a pipe
- uno::Reference< io::XOutputStream > xOutPipe(xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.io.Pipe")), uno::UNO_QUERY);
- uno::Reference< io::XInputStream > xInPipe(xOutPipe, uno::UNO_QUERY);
-
- // creating the mark streams
- uno::Reference< io::XInputStream > xMarkIn(xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.io.MarkableInputStream")), uno::UNO_QUERY);
- uno::Reference< io::XActiveDataSink > xMarkSink(xMarkIn, uno::UNO_QUERY);
-
- uno::Reference< io::XOutputStream > xMarkOut(xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.io.MarkableOutputStream")), uno::UNO_QUERY);
- uno::Reference< io::XActiveDataSource > xMarkSource(xMarkOut, uno::UNO_QUERY);
-
- // connect mark and sink
- uno::Reference< io::XActiveDataSink > xSink(xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.io.ObjectInputStream")), uno::UNO_QUERY);
-
- // connect mark and source
- uno::Reference< io::XActiveDataSource > xSource(xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.io.ObjectOutputStream")), uno::UNO_QUERY);
-
- uno::Reference< io::XObjectOutputStream > xOutStrm(xSource, uno::UNO_QUERY);
- uno::Reference< io::XObjectInputStream > xInStrm(xSink, uno::UNO_QUERY);
-
- if (xMarkSink.is() && xMarkSource.is() && xSink.is() && xSource.is())
- {
- xMarkSink->setInputStream(xInPipe);
- xMarkSource->setOutputStream(xOutPipe);
- xSink->setInputStream(xMarkIn);
- xSource->setOutputStream(xMarkOut);
-
- // write the object to source
- xOutStrm->writeObject(xObj);
- xOutStrm->closeOutput();
- // read the object
- uno::Reference< awt::XControlModel > xModel(xInStrm->readObject(), uno::UNO_QUERY);
- xInStrm->closeInput();
-
- DBG_ASSERT(xModel.is(), "SdrUnoObj::operator =, keine Model erzeugt");
-
- xUnoControlModel = xModel;
- }
+ uno::Reference< util::XCloneable > xClone( xSourceControlModel, uno::UNO_QUERY_THROW );
+ xUnoControlModel.set( xClone->createClone(), uno::UNO_QUERY_THROW );
+ }
+ catch( const uno::Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
}
}
diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src
index 6690d4a7618b..6c80ba2c383a 100644
--- a/svx/source/svdraw/svdstr.src
+++ b/svx/source/svdraw/svdstr.src
@@ -2865,76 +2865,14 @@ Bitmap SIP_SA_ACCESSIBILITY_CROP_MARKERS
File = "cropmarkersACC.bmp";
};
-// ******************************************************************* EOF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+//IAccessibility2 Implementation 2009-----
+String STR_ObjNameSingulFONTWORK
+{
+ Text [ en-US ] = "font work" ;
+};
+String STR_ObjNamePluralFONTWORK
+{
+ Text [ en-US ] = "font works" ;
+};
+//-----IAccessibility2 Implementation 2009
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index b712bcfe04d2..884a1ac14d3c 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -113,6 +113,7 @@ SvxColorValueSet::SvxColorValueSet( Window* _pParent, WinBits nWinStyle ) :
DragSourceHelper( this ),
bLeft (sal_True)
{
+ SetAccessibleName(String( SVX_RES( STR_COLORTABLE ) ) );
}
/*************************************************************************
@@ -126,6 +127,7 @@ SvxColorValueSet::SvxColorValueSet( Window* _pParent, const ResId& rResId ) :
DragSourceHelper( this ),
bLeft (sal_True)
{
+ SetAccessibleName(String( SVX_RES( STR_COLORTABLE ) ));
}
/*************************************************************************
diff --git a/svx/source/tbxctrls/colrctrl.src b/svx/source/tbxctrls/colrctrl.src
index 023c271c5455..1fdd6df6a39b 100644
--- a/svx/source/tbxctrls/colrctrl.src
+++ b/svx/source/tbxctrls/colrctrl.src
@@ -53,32 +53,11 @@ DockingWindow RID_SVXCTRL_COLOR
Border = FALSE ;
};
};
- // ********************************************************************** EOF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+// IAccessibility2 implementation 2009. ------
+String STR_COLORTABLE
+{
+ Text [ en-US ] = "Color Palette" ;
+};
+// ------ IAccessibility2 implementation 2009.
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 416dc09ca157..403ef97f6319 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -83,8 +83,8 @@ const int nLineCount = 4;
\************************************************************************/
FontWorkGalleryDialog::FontWorkGalleryDialog( SdrView* pSdrView, Window* pParent, sal_uInt16 /*nSID*/ ) :
ModalDialog( pParent, SVX_RES( RID_SVX_MDLG_FONTWORK_GALLERY ) ),
- maCtlFavorites ( this, SVX_RES( CTL_FAVORITES ) ),
maFLFavorites ( this, SVX_RES( FL_FAVORITES ) ),
+ maCtlFavorites ( this, SVX_RES( CTL_FAVORITES ) ),
maOKButton ( this, SVX_RES( BTN_OK ) ),
maCancelButton ( this, SVX_RES( BTN_CANCEL ) ),
maHelpButton ( this, SVX_RES( BTN_HELP ) ),
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index 76fd7d423324..7666c1064e15 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -491,7 +491,7 @@ SvxMetricField::SvxMetricField(
SetLast( 5000 );
SetFirst( 0 );
- eDlgUnit = SfxModule::GetCurrentFieldUnit();
+ eDlgUnit = SfxModule::GetModuleFieldUnit( mxFrame );
SetFieldUnit( *this, eDlgUnit, sal_False );
Show();
}
@@ -576,7 +576,7 @@ void SvxMetricField::SetCoreUnit( SfxMapUnit eUnit )
void SvxMetricField::RefreshDlgUnit()
{
- FieldUnit eTmpUnit = SfxModule::GetCurrentFieldUnit();
+ FieldUnit eTmpUnit = SfxModule::GetModuleFieldUnit( mxFrame );
if ( eDlgUnit != eTmpUnit )
{
eDlgUnit = eTmpUnit;
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 5a4362592738..ad97a61900fa 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -856,6 +856,7 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
{
aColorSet.SetStyle( aColorSet.GetStyle() | WB_NONEFIELD );
aColorSet.SetText( SVX_RESSTR( RID_SVXSTR_TRANSPARENT ) );
+ aColorSet.SetAccessibleName( SVX_RESSTR( RID_SVXSTR_BACKGROUND ) );
}
else if ( SID_ATTR_CHAR_COLOR == theSlotId || SID_ATTR_CHAR_COLOR2 == theSlotId || SID_EXTRUSION_3D_COLOR == theSlotId )
{
@@ -870,8 +871,13 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
{
aColorSet.SetStyle( aColorSet.GetStyle() | WB_NONEFIELD );
aColorSet.SetText( SVX_RESSTR( RID_SVXSTR_AUTOMATIC ) );
+ aColorSet.SetAccessibleName( SVX_RESSTR( RID_SVXSTR_TEXTCOLOR ) );
}
}
+ else
+ {
+ aColorSet.SetAccessibleName( SVX_RESSTR( RID_SVXSTR_FRAME_COLOR ) );
+ }
if ( pColorTable )
{
@@ -1092,6 +1098,7 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFram
SetHelpId( HID_POPUP_FRAME );
SetText( SVX_RESSTR(RID_SVXSTR_FRAME) );
+ aFrameSet.SetAccessibleName( SVX_RESSTR(RID_SVXSTR_FRAME) );
aFrameSet.Show();
}
/*-- 22.09.2004 12:27:50---------------------------------------------------
@@ -1348,6 +1355,7 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame
aLineSet.SetSelectHdl( LINK( this, SvxLineWindow_Impl, SelectHdl ) );
aLineSet.SetText( SVX_RESSTR(STR_NONE) );
+ aLineSet.SetAccessibleName( SVX_RESSTR(RID_SVXSTR_FRAME_STYLE) );
lcl_CalcSizeValueSet( *this, aLineSet, aBmpSize );
SetHelpId( HID_POPUP_LINE );
diff --git a/svx/source/tbxctrls/tbcontrl.src b/svx/source/tbxctrls/tbcontrl.src
index f3e068f56226..f49966e9ae17 100644
--- a/svx/source/tbxctrls/tbcontrl.src
+++ b/svx/source/tbxctrls/tbcontrl.src
@@ -185,5 +185,11 @@ String RID_SVXSTR_MORE
Text [ en-US ] = "More...";
};
+//IAccessibility2 Implementation 2009-----
+String RID_SVXSTR_TEXTCOLOR
+{
+ Text [ en-US ] = "Font color";
+};
+//-----IAccessibility2 Implementation 2009
// ********************************************************************** EOF
diff --git a/sysui/desktop/icons/makefile.mk b/sysui/desktop/icons/makefile.mk
index ac32cdbe453b..ce5b0b70b636 100644
--- a/sysui/desktop/icons/makefile.mk
+++ b/sysui/desktop/icons/makefile.mk
@@ -127,69 +127,6 @@ all: \
$(MISC)$/ooo11-math-doc.ico \
$(MISC)$/ooo11-writer-doc.ico \
$(MISC)$/ooo11-writer-tem.ico \
- $(MISC)$/so8-base-app.ico \
- $(MISC)$/so8-base-doc.ico \
- $(MISC)$/so8-calc-app.ico \
- $(MISC)$/so8-calc-doc.ico \
- $(MISC)$/so8-calc-tem.ico \
- $(MISC)$/so8-chart-doc.ico \
- $(MISC)$/so8-configuration.ico \
- $(MISC)$/so8-draw-app.ico \
- $(MISC)$/so8-draw-doc.ico \
- $(MISC)$/so8-draw-tem.ico \
- $(MISC)$/so8-empty-doc.ico \
- $(MISC)$/so8-empty-tem.ico \
- $(MISC)$/so8-image-doc.ico \
- $(MISC)$/so8-impress-app.ico \
- $(MISC)$/so8-impress-doc.ico \
- $(MISC)$/so8-impress-tem.ico \
- $(MISC)$/so8-macro-doc.ico \
- $(MISC)$/so8-main-app.ico \
- $(MISC)$/so8-master-doc.ico \
- $(MISC)$/so8-math-app.ico \
- $(MISC)$/so8-math-doc.ico \
- $(MISC)$/so8-open.ico \
- $(MISC)$/so8-printer.ico \
- $(MISC)$/so8-web-doc.ico \
- $(MISC)$/so8-writer-app.ico \
- $(MISC)$/so8-writer-doc.ico \
- $(MISC)$/so8-writer-tem.ico \
- $(MISC)$/so9_empty_tem.ico \
- $(MISC)$/so9_math_app.ico \
- $(MISC)$/so9_global_doc.ico \
- $(MISC)$/so9_main_app.ico \
- $(MISC)$/so9_empty_doc.ico \
- $(MISC)$/so9_math_doc.ico \
- $(MISC)$/so9_base_app.ico \
- $(MISC)$/so9_html_doc.ico \
- $(MISC)$/so9_impress_doc.ico \
- $(MISC)$/so9_draw_tem.ico \
- $(MISC)$/so9_writer_tem.ico \
- $(MISC)$/so9_impress_app.ico \
- $(MISC)$/so9_calc_tem.ico \
- $(MISC)$/so9_base_doc.ico \
- $(MISC)$/so9_macro_doc.ico \
- $(MISC)$/so9_calc_doc.ico \
- $(MISC)$/so9_draw_doc.ico \
- $(MISC)$/so9_writer_doc.ico \
- $(MISC)$/so9_calc_app.ico \
- $(MISC)$/so9_impress_tem.ico \
- $(MISC)$/so9_chart_doc.ico \
- $(MISC)$/so9_writer_app.ico \
- $(MISC)$/so9_draw_app.ico \
- $(MISC)$/so9_open.ico \
- $(MISC)$/so7-base-doc.ico \
- $(MISC)$/so7-calc-doc.ico \
- $(MISC)$/so7-calc-tem.ico \
- $(MISC)$/so7-chart-doc.ico \
- $(MISC)$/so7-draw-doc.ico \
- $(MISC)$/so7-draw-tem.ico \
- $(MISC)$/so7-impress-doc.ico \
- $(MISC)$/so7-impress-tem.ico \
- $(MISC)$/so7-master-doc.ico \
- $(MISC)$/so7-math-doc.ico \
- $(MISC)$/so7-writer-doc.ico \
- $(MISC)$/so7-writer-tem.ico \
$(MISC)$/oxt-extension.ico
$(MISC)$/%.ico: %.ico
diff --git a/sysui/desktop/icons/so7-base-doc.ico b/sysui/desktop/icons/so7-base-doc.ico
deleted file mode 100644
index e4beab7270e1..000000000000
--- a/sysui/desktop/icons/so7-base-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so7-calc-doc.ico b/sysui/desktop/icons/so7-calc-doc.ico
deleted file mode 100644
index 8b34fc606c5d..000000000000
--- a/sysui/desktop/icons/so7-calc-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so7-calc-tem.ico b/sysui/desktop/icons/so7-calc-tem.ico
deleted file mode 100644
index d074a214a90b..000000000000
--- a/sysui/desktop/icons/so7-calc-tem.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so7-chart-doc.ico b/sysui/desktop/icons/so7-chart-doc.ico
deleted file mode 100644
index bdc613fb30e2..000000000000
--- a/sysui/desktop/icons/so7-chart-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so7-draw-doc.ico b/sysui/desktop/icons/so7-draw-doc.ico
deleted file mode 100644
index c2881862053a..000000000000
--- a/sysui/desktop/icons/so7-draw-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so7-draw-tem.ico b/sysui/desktop/icons/so7-draw-tem.ico
deleted file mode 100644
index 8d713d0f470e..000000000000
--- a/sysui/desktop/icons/so7-draw-tem.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so7-impress-doc.ico b/sysui/desktop/icons/so7-impress-doc.ico
deleted file mode 100644
index a8f9518e624b..000000000000
--- a/sysui/desktop/icons/so7-impress-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so7-impress-tem.ico b/sysui/desktop/icons/so7-impress-tem.ico
deleted file mode 100644
index ac140b269242..000000000000
--- a/sysui/desktop/icons/so7-impress-tem.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so7-master-doc.ico b/sysui/desktop/icons/so7-master-doc.ico
deleted file mode 100644
index 1c3068715990..000000000000
--- a/sysui/desktop/icons/so7-master-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so7-math-doc.ico b/sysui/desktop/icons/so7-math-doc.ico
deleted file mode 100644
index d1cd9bd4c6bd..000000000000
--- a/sysui/desktop/icons/so7-math-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so7-writer-doc.ico b/sysui/desktop/icons/so7-writer-doc.ico
deleted file mode 100644
index b8eb3df20564..000000000000
--- a/sysui/desktop/icons/so7-writer-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so7-writer-tem.ico b/sysui/desktop/icons/so7-writer-tem.ico
deleted file mode 100644
index 318cce4bc9a7..000000000000
--- a/sysui/desktop/icons/so7-writer-tem.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-base-app.ico b/sysui/desktop/icons/so8-base-app.ico
deleted file mode 100644
index 4a22d3529614..000000000000
--- a/sysui/desktop/icons/so8-base-app.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-base-doc.ico b/sysui/desktop/icons/so8-base-doc.ico
deleted file mode 100644
index bcddbf957630..000000000000
--- a/sysui/desktop/icons/so8-base-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-calc-app.ico b/sysui/desktop/icons/so8-calc-app.ico
deleted file mode 100644
index a28cab56157b..000000000000
--- a/sysui/desktop/icons/so8-calc-app.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-calc-doc.ico b/sysui/desktop/icons/so8-calc-doc.ico
deleted file mode 100644
index 5f293dd82c30..000000000000
--- a/sysui/desktop/icons/so8-calc-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-calc-tem.ico b/sysui/desktop/icons/so8-calc-tem.ico
deleted file mode 100644
index 98bf90678573..000000000000
--- a/sysui/desktop/icons/so8-calc-tem.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-chart-doc.ico b/sysui/desktop/icons/so8-chart-doc.ico
deleted file mode 100644
index 01ff8365434b..000000000000
--- a/sysui/desktop/icons/so8-chart-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-configuration.ico b/sysui/desktop/icons/so8-configuration.ico
deleted file mode 100644
index 57f3b6701b30..000000000000
--- a/sysui/desktop/icons/so8-configuration.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-draw-app.ico b/sysui/desktop/icons/so8-draw-app.ico
deleted file mode 100644
index 6003ccb3d7c3..000000000000
--- a/sysui/desktop/icons/so8-draw-app.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-draw-doc.ico b/sysui/desktop/icons/so8-draw-doc.ico
deleted file mode 100644
index f4f169bd6fb5..000000000000
--- a/sysui/desktop/icons/so8-draw-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-draw-tem.ico b/sysui/desktop/icons/so8-draw-tem.ico
deleted file mode 100644
index d3f63c38dbe0..000000000000
--- a/sysui/desktop/icons/so8-draw-tem.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-empty-doc.ico b/sysui/desktop/icons/so8-empty-doc.ico
deleted file mode 100644
index b71d2b939ca7..000000000000
--- a/sysui/desktop/icons/so8-empty-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-empty-tem.ico b/sysui/desktop/icons/so8-empty-tem.ico
deleted file mode 100644
index 9368b0a81aef..000000000000
--- a/sysui/desktop/icons/so8-empty-tem.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-image-doc.ico b/sysui/desktop/icons/so8-image-doc.ico
deleted file mode 100644
index 11b4f0f6c718..000000000000
--- a/sysui/desktop/icons/so8-image-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-impress-app.ico b/sysui/desktop/icons/so8-impress-app.ico
deleted file mode 100644
index 8fae43dab26d..000000000000
--- a/sysui/desktop/icons/so8-impress-app.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-impress-doc.ico b/sysui/desktop/icons/so8-impress-doc.ico
deleted file mode 100644
index 9a91f89f2900..000000000000
--- a/sysui/desktop/icons/so8-impress-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-impress-tem.ico b/sysui/desktop/icons/so8-impress-tem.ico
deleted file mode 100644
index f84f813f992c..000000000000
--- a/sysui/desktop/icons/so8-impress-tem.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-macro-doc.ico b/sysui/desktop/icons/so8-macro-doc.ico
deleted file mode 100644
index f3742e1274e7..000000000000
--- a/sysui/desktop/icons/so8-macro-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-main-app.ico b/sysui/desktop/icons/so8-main-app.ico
deleted file mode 100644
index aa044ad9c702..000000000000
--- a/sysui/desktop/icons/so8-main-app.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-master-doc.ico b/sysui/desktop/icons/so8-master-doc.ico
deleted file mode 100644
index 27a1d2f61c49..000000000000
--- a/sysui/desktop/icons/so8-master-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-math-app.ico b/sysui/desktop/icons/so8-math-app.ico
deleted file mode 100644
index 956c259c756a..000000000000
--- a/sysui/desktop/icons/so8-math-app.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-math-doc.ico b/sysui/desktop/icons/so8-math-doc.ico
deleted file mode 100644
index e7b88449999f..000000000000
--- a/sysui/desktop/icons/so8-math-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-open.ico b/sysui/desktop/icons/so8-open.ico
deleted file mode 100644
index b77a741b338f..000000000000
--- a/sysui/desktop/icons/so8-open.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-printer.ico b/sysui/desktop/icons/so8-printer.ico
deleted file mode 100644
index 25e61f8de5d5..000000000000
--- a/sysui/desktop/icons/so8-printer.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-web-doc.ico b/sysui/desktop/icons/so8-web-doc.ico
deleted file mode 100644
index 12eeb63cffb2..000000000000
--- a/sysui/desktop/icons/so8-web-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-writer-app.ico b/sysui/desktop/icons/so8-writer-app.ico
deleted file mode 100644
index 15f7f92d4b45..000000000000
--- a/sysui/desktop/icons/so8-writer-app.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-writer-doc.ico b/sysui/desktop/icons/so8-writer-doc.ico
deleted file mode 100644
index da774be1d3ac..000000000000
--- a/sysui/desktop/icons/so8-writer-doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so8-writer-tem.ico b/sysui/desktop/icons/so8-writer-tem.ico
deleted file mode 100644
index 1bdb86c8090f..000000000000
--- a/sysui/desktop/icons/so8-writer-tem.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_base_app.ico b/sysui/desktop/icons/so9_base_app.ico
deleted file mode 100755
index aa7036eb90fc..000000000000
--- a/sysui/desktop/icons/so9_base_app.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_base_doc.ico b/sysui/desktop/icons/so9_base_doc.ico
deleted file mode 100644
index 8cc1d4433c2c..000000000000
--- a/sysui/desktop/icons/so9_base_doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_calc_app.ico b/sysui/desktop/icons/so9_calc_app.ico
deleted file mode 100755
index d7182cad0943..000000000000
--- a/sysui/desktop/icons/so9_calc_app.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_calc_doc.ico b/sysui/desktop/icons/so9_calc_doc.ico
deleted file mode 100644
index 2b9e514cb97b..000000000000
--- a/sysui/desktop/icons/so9_calc_doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_calc_tem.ico b/sysui/desktop/icons/so9_calc_tem.ico
deleted file mode 100644
index 17f4823c4374..000000000000
--- a/sysui/desktop/icons/so9_calc_tem.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_chart_doc.ico b/sysui/desktop/icons/so9_chart_doc.ico
deleted file mode 100644
index b116c81903b3..000000000000
--- a/sysui/desktop/icons/so9_chart_doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_draw_app.ico b/sysui/desktop/icons/so9_draw_app.ico
deleted file mode 100755
index a8b3c3270fc0..000000000000
--- a/sysui/desktop/icons/so9_draw_app.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_draw_doc.ico b/sysui/desktop/icons/so9_draw_doc.ico
deleted file mode 100644
index 51f95046709a..000000000000
--- a/sysui/desktop/icons/so9_draw_doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_draw_tem.ico b/sysui/desktop/icons/so9_draw_tem.ico
deleted file mode 100644
index e4b341175bff..000000000000
--- a/sysui/desktop/icons/so9_draw_tem.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_empty_doc.ico b/sysui/desktop/icons/so9_empty_doc.ico
deleted file mode 100644
index a3970775e3ed..000000000000
--- a/sysui/desktop/icons/so9_empty_doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_empty_tem.ico b/sysui/desktop/icons/so9_empty_tem.ico
deleted file mode 100644
index 1b0088b80277..000000000000
--- a/sysui/desktop/icons/so9_empty_tem.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_global_doc.ico b/sysui/desktop/icons/so9_global_doc.ico
deleted file mode 100644
index ea4ccb383956..000000000000
--- a/sysui/desktop/icons/so9_global_doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_html_doc.ico b/sysui/desktop/icons/so9_html_doc.ico
deleted file mode 100644
index 4e5b8bc99c07..000000000000
--- a/sysui/desktop/icons/so9_html_doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_impress_app.ico b/sysui/desktop/icons/so9_impress_app.ico
deleted file mode 100755
index cf10331c5ff9..000000000000
--- a/sysui/desktop/icons/so9_impress_app.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_impress_doc.ico b/sysui/desktop/icons/so9_impress_doc.ico
deleted file mode 100644
index 5258a8b6aa4c..000000000000
--- a/sysui/desktop/icons/so9_impress_doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_impress_tem.ico b/sysui/desktop/icons/so9_impress_tem.ico
deleted file mode 100644
index dcdbddb3b654..000000000000
--- a/sysui/desktop/icons/so9_impress_tem.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_macro_doc.ico b/sysui/desktop/icons/so9_macro_doc.ico
deleted file mode 100644
index cd004015e63f..000000000000
--- a/sysui/desktop/icons/so9_macro_doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_main_app.ico b/sysui/desktop/icons/so9_main_app.ico
deleted file mode 100755
index 90f193d80dd9..000000000000
--- a/sysui/desktop/icons/so9_main_app.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_math_app.ico b/sysui/desktop/icons/so9_math_app.ico
deleted file mode 100755
index 11fbbf9a494a..000000000000
--- a/sysui/desktop/icons/so9_math_app.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_math_doc.ico b/sysui/desktop/icons/so9_math_doc.ico
deleted file mode 100644
index 622ae939d23a..000000000000
--- a/sysui/desktop/icons/so9_math_doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_open.ico b/sysui/desktop/icons/so9_open.ico
deleted file mode 100755
index 90f193d80dd9..000000000000
--- a/sysui/desktop/icons/so9_open.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_writer_app.ico b/sysui/desktop/icons/so9_writer_app.ico
deleted file mode 100755
index 10c964dba966..000000000000
--- a/sysui/desktop/icons/so9_writer_app.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_writer_doc.ico b/sysui/desktop/icons/so9_writer_doc.ico
deleted file mode 100644
index b0cf11a993c9..000000000000
--- a/sysui/desktop/icons/so9_writer_doc.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/desktop/icons/so9_writer_tem.ico b/sysui/desktop/icons/so9_writer_tem.ico
deleted file mode 100644
index 2e62a1934646..000000000000
--- a/sysui/desktop/icons/so9_writer_tem.ico
+++ /dev/null
Binary files differ
diff --git a/sysui/prj/build.lst b/sysui/prj/build.lst
index 1530997a3ec3..097cae97ed29 100644
--- a/sysui/prj/build.lst
+++ b/sysui/prj/build.lst
@@ -1,6 +1,6 @@
-su sysui : l10n offapi xml2cmp rdbmaker l10ntools setup_native NULL
-su sysui\source\win32\QuickStart nmake - w su_win32_quickstart NULL
-su sysui\source\win32\QuickStart\so nmake - w su_win32_quickstart_so su_win32_quickstart.w NULL
+su sysui : L10N:l10n offapi xml2cmp rdbmaker l10ntools setup_native NULL
+#su sysui\source\win32\QuickStart nmake - w su_win32_quickstart NULL
+#su sysui\source\win32\QuickStart\so nmake - w su_win32_quickstart_so su_win32_quickstart.w NULL
su sysui\desktop\icons nmake - w su_iconsw NULL
su sysui\desktop\os2 nmake - p su_iconsw NULL
su sysui\desktop\macosx nmake - u su_dtmacosx su_dtshare.u NULL
@@ -16,4 +16,4 @@ su sysui\desktop\debian nmake - u su_dtdebian su_dtshare.u
su sysui\desktop\slackware nmake - u su_dtslackware su_dtshare.u NULL
su sysui\desktop\solaris nmake - u su_dtsolaris su_dtshare.u NULL
su sysui\desktop\util nmake - u su_desktop su_dtredhat.u su_dtsuse.u su_dtmdk.u su_dtfreedesktop.u su_dtdebian.u su_dtslackware.u NULL
-su sysui\util nmake - all su_util su_dtsolaris.u su_desktop.u su_win32_quickstart_so.w su_iconsw.w NULL
+su sysui\util nmake - all su_util su_dtsolaris.u su_desktop.u su_iconsw.w NULL
diff --git a/sysui/prj/d.lst b/sysui/prj/d.lst
index c6019cea9a43..918ee8bcbc8f 100644
--- a/sysui/prj/d.lst
+++ b/sysui/prj/d.lst
@@ -15,10 +15,6 @@ mkdir: %_DEST%\bin%_EXT%\desktop-integration\pkg
..\%__SRC%\bin\pkg\*.tar.gz %_DEST%\bin%_EXT%\desktop-integration\pkg\*.tar.gz
..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll
-..\%__SRC%\bin\quickstart.exe %_DEST%\bin%_EXT%\quickstart.exe
-..\%__SRC%\bin\quickstart.exe %_DEST%\bin%_EXT%\install_quickstart.exe
-..\%__SRC%\bin\soquickstart.exe %_DEST%\bin%_EXT%\so\quickstart.exe
-..\%__SRC%\bin\soquickstart.exe %_DEST%\bin%_EXT%\so\install_quickstart.exe
..\%__SRC%\misc\ooo3_main_app.ico %_DEST%\bin%_EXT%\soffice.ico
diff --git a/ucb/source/core/cmdenv.cxx b/ucb/source/core/cmdenv.cxx
index 5c0136fab063..5c0136fab063 100755..100644
--- a/ucb/source/core/cmdenv.cxx
+++ b/ucb/source/core/cmdenv.cxx
diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
index 46aa1ae69ec3..c78ce26dd39a 100644
--- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
@@ -27,14 +27,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_ucb.hxx"
+
/**************************************************************************
TODO
**************************************************************************
- - filter unwanted models notified by global document event broadcaster
- - help documents
- - others, which I don't know yet
-
*************************************************************************/
#include "osl/diagnose.h"
@@ -44,12 +41,13 @@
#include "comphelper/namedvaluecollection.hxx"
#include "comphelper/documentinfo.hxx"
+#include "com/sun/star/awt/XTopWindow.hpp"
#include "com/sun/star/beans/XPropertySet.hpp"
#include "com/sun/star/container/XEnumerationAccess.hpp"
+#include "com/sun/star/document/XStorageBasedDocument.hpp"
#include "com/sun/star/frame/XStorable.hpp"
#include "com/sun/star/lang/DisposedException.hpp"
-#include "com/sun/star/document/XStorageBasedDocument.hpp"
-#include "com/sun/star/awt/XTopWindow.hpp"
+#include "com/sun/star/util/XCloseBroadcaster.hpp"
#include "tdoc_docmgr.hxx"
@@ -60,6 +58,53 @@ using ::comphelper::DocumentInfo;
//=========================================================================
//=========================================================================
//
+// OfficeDocumentsCloseListener Implementation.
+//
+//=========================================================================
+//=========================================================================
+
+//=========================================================================
+//
+// util::XCloseListener
+//
+//=========================================================================
+
+// virtual
+void SAL_CALL OfficeDocumentsManager::OfficeDocumentsCloseListener::queryClosing(
+ const lang::EventObject& /*Source*/, sal_Bool /*GetsOwnership*/ )
+ throw ( util::CloseVetoException,
+ uno::RuntimeException )
+{
+}
+
+//=========================================================================
+void SAL_CALL OfficeDocumentsManager::OfficeDocumentsCloseListener::notifyClosing(
+ const lang::EventObject& Source )
+ throw ( uno::RuntimeException )
+{
+ document::EventObject aDocEvent;
+ aDocEvent.Source = Source.Source;
+ aDocEvent.EventName = rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM( "OfficeDocumentsListener::notifyClosing" ) );
+ m_pManager->notifyEvent( aDocEvent );
+}
+
+//=========================================================================
+//
+// lang::XEventListener (base of util::XCloseListener)
+//
+//=========================================================================
+
+// virtual
+void SAL_CALL OfficeDocumentsManager::OfficeDocumentsCloseListener::disposing(
+ const lang::EventObject& /*Source*/ )
+ throw ( uno::RuntimeException )
+{
+}
+
+//=========================================================================
+//=========================================================================
+//
// OfficeDocumentsManager Implementation.
//
//=========================================================================
@@ -70,7 +115,8 @@ OfficeDocumentsManager::OfficeDocumentsManager(
OfficeDocumentsEventListener * pDocEventListener )
: m_xSMgr( xSMgr ),
m_xDocEvtNotifier( createDocumentEventNotifier( xSMgr ) ),
- m_pDocEventListener( pDocEventListener )
+ m_pDocEventListener( pDocEventListener ),
+ m_xDocCloseListener( new OfficeDocumentsCloseListener( this ) )
{
if ( m_xDocEvtNotifier.is() )
{
@@ -84,7 +130,11 @@ OfficeDocumentsManager::OfficeDocumentsManager(
// virtual
OfficeDocumentsManager::~OfficeDocumentsManager()
{
- OSL_ENSURE( m_aDocs.empty(), "document list not empty!" );
+ //OSL_ENSURE( m_aDocs.empty(), "document list not empty!" );
+ // no need to assert this: Normal shutdown of OOo could already trigger it, since the order in which
+ // objects are actually released/destroyed upon shutdown is not defined. And when we arrive *here*,
+ // OOo *is* shutting down currently, since we're held by the TDOC provider, which is disposed
+ // upon shutdown.
}
//=========================================================================
@@ -188,10 +238,19 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent(
OSL_ENSURE( xStorage.is(), "Got no document storage!" );
rtl:: OUString aDocId = getDocumentId( Event.Source );
- rtl:: OUString aTitle = DocumentInfo::getDocumentTitle( uno::Reference< frame::XModel >( Event.Source, uno::UNO_QUERY ) );
+ rtl:: OUString aTitle = DocumentInfo::getDocumentTitle(
+ uno::Reference< frame::XModel >( Event.Source, uno::UNO_QUERY ) );
m_aDocs[ aDocId ] = StorageInfo( aTitle, xStorage, xModel );
+ uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster(
+ Event.Source, uno::UNO_QUERY );
+ OSL_ENSURE( xCloseBroadcaster.is(),
+ "OnLoadFinished/OnCreate event: got no close broadcaster!" );
+
+ if ( xCloseBroadcaster.is() )
+ xCloseBroadcaster->addCloseListener( m_xDocCloseListener );
+
// Propagate document closure.
OSL_ENSURE( m_pDocEventListener,
"OnLoadFinished/OnCreate event: no owner for insert event propagation!" );
@@ -202,12 +261,18 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent(
}
}
else if ( Event.EventName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "OnUnload" ) ) )
+ RTL_CONSTASCII_STRINGPARAM( "OfficeDocumentsListener::notifyClosing" ) ) )
{
if ( isOfficeDocument( Event.Source ) )
{
// Document has been closed (unloaded)
+ // #163732# - Official event "OnUnload" does not work here. Event
+ // gets fired to early. Other OnUnload listeners called after this
+ // listener may still need TDOC access to the document. Remove the
+ // document from TDOC docs list on XCloseListener::notifyClosing.
+ // See OfficeDocumentsManager::OfficeDocumentsListener::notifyClosing.
+
osl::MutexGuard aGuard( m_aMtx );
uno::Reference< frame::XModel >
@@ -228,8 +293,6 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent(
rtl::OUString aDocId( (*it).first );
m_pDocEventListener->notifyDocumentClosed( aDocId );
}
-
-
break;
}
++it;
@@ -238,8 +301,18 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent(
OSL_ENSURE( it != m_aDocs.end(),
"OnUnload event notified for unknown document!" );
- if( it != m_aDocs.end() )
+ if ( it != m_aDocs.end() )
+ {
+ uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster(
+ Event.Source, uno::UNO_QUERY );
+ OSL_ENSURE( xCloseBroadcaster.is(),
+ "OnUnload event: got no XCloseBroadcaster from XModel" );
+
+ if ( xCloseBroadcaster.is() )
+ xCloseBroadcaster->removeCloseListener( m_xDocCloseListener );
+
m_aDocs.erase( it );
+ }
}
}
else if ( Event.EventName.equalsAsciiL(
@@ -307,7 +380,7 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent(
(*it).second.xStorage = xStorage;
// Adjust title.
- (*it).second.aTitle = DocumentInfo::getDocumentTitle( uno::Reference< frame::XModel >( Event.Source, uno::UNO_QUERY ) );
+ (*it).second.aTitle = DocumentInfo::getDocumentTitle( xModel );
break;
}
++it;
@@ -334,7 +407,7 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent(
if ( (*it).second.xModel == xModel )
{
// Adjust title.
- rtl:: OUString aTitle = DocumentInfo::getDocumentTitle( uno::Reference< frame::XModel >( Event.Source, uno::UNO_QUERY ) );
+ rtl:: OUString aTitle = DocumentInfo::getDocumentTitle( xModel );
(*it).second.aTitle = aTitle;
// Adjust storage.
@@ -354,8 +427,18 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent(
++it;
}
- OSL_ENSURE( it != m_aDocs.end(),
- "TitleChanged event notified for unknown document!" );
+// OSL_ENSURE( it != m_aDocs.end(),
+// "TitleChanged event notified for unknown document!" );
+ // TODO: re-enable this assertion. It has been disabled for now, since it breaks the assertion-free smoketest,
+ // and the fix is more difficult than what can be done now.
+ // The problem is that at the moment, when you close a SFX-based document via API, it will first
+ // fire the notifyClosing event, which will make the OfficeDocumentsManager remove the doc from its list.
+ // Then, it will notify an OnTitleChanged, then an OnUnload. Documents closed via call the notifyClosing
+ // *after* OnUnload and all other On* events.
+ // In agreement with MBA, the implementation for SfxBaseModel::Close should be changed to also send notifyClosing
+ // as last event. When this happens, the assertion here must be enabled, again.
+ // There is no bug for this, yet - IZ is currently down due to the Kenai migration.
+ // 2011-02-23 / frank.schoenheit@sun.com
}
}
}
@@ -475,6 +558,14 @@ void OfficeDocumentsManager::buildDocumentsList()
m_aDocs[ aDocId ]
= StorageInfo( aTitle, xStorage, xModel );
+
+ uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster(
+ xModel, uno::UNO_QUERY );
+ OSL_ENSURE( xCloseBroadcaster.is(),
+ "buildDocumentsList: got no close broadcaster!" );
+
+ if ( xCloseBroadcaster.is() )
+ xCloseBroadcaster->addCloseListener( m_xDocCloseListener );
}
}
}
diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.hxx b/ucb/source/ucp/tdoc/tdoc_docmgr.hxx
index 8f8b2fc117f0..b1c0ed41d9d9 100644
--- a/ucb/source/ucp/tdoc/tdoc_docmgr.hxx
+++ b/ucb/source/ucp/tdoc/tdoc_docmgr.hxx
@@ -39,6 +39,7 @@
#include "com/sun/star/embed/XStorage.hpp"
#include "com/sun/star/frame/XModel.hpp"
#include "com/sun/star/frame/XModuleManager.hpp"
+#include "com/sun/star/util/XCloseListener.hpp"
namespace tdoc_ucp {
@@ -88,6 +89,33 @@ namespace tdoc_ucp {
class OfficeDocumentsManager :
public cppu::WeakImplHelper1< com::sun::star::document::XEventListener >
{
+ class OfficeDocumentsCloseListener :
+ public cppu::WeakImplHelper1< com::sun::star::util::XCloseListener >
+
+ {
+ public:
+ OfficeDocumentsCloseListener( OfficeDocumentsManager * pMgr )
+ : m_pManager( pMgr ) {};
+
+ // util::XCloseListener
+ virtual void SAL_CALL queryClosing(
+ const ::com::sun::star::lang::EventObject& Source,
+ ::sal_Bool GetsOwnership )
+ throw (::com::sun::star::util::CloseVetoException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL notifyClosing(
+ const ::com::sun::star::lang::EventObject& Source )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // lang::XEventListener (base of util::XCloseListener)
+ virtual void SAL_CALL disposing(
+ const com::sun::star::lang::EventObject & Source )
+ throw ( com::sun::star::uno::RuntimeException );
+ private:
+ OfficeDocumentsManager * m_pManager;
+ };
+
public:
OfficeDocumentsManager(
const com::sun::star::uno::Reference<
@@ -131,7 +159,9 @@ namespace tdoc_ucp {
createDocumentEventNotifier(
const com::sun::star::uno::Reference<
com::sun::star::lang::XMultiServiceFactory >& rXSMgr );
+
void buildDocumentsList();
+
bool
isOfficeDocument(
const com::sun::star::uno::Reference<
@@ -163,9 +193,11 @@ namespace tdoc_ucp {
com::sun::star::uno::Reference<
com::sun::star::document::XEventBroadcaster > m_xDocEvtNotifier;
com::sun::star::uno::Reference<
- com::sun::star::frame::XModuleManager > m_xModuleMgr;
+ com::sun::star::frame::XModuleManager > m_xModuleMgr;
DocumentList m_aDocs;
OfficeDocumentsEventListener * m_pDocEventListener;
+ com::sun::star::uno::Reference<
+ com::sun::star::util::XCloseListener > m_xDocCloseListener;
};
} // namespace tdoc_ucp
diff --git a/uui/prj/build.lst b/uui/prj/build.lst
index 6816f8416bdf..b4a009cd0b9e 100644
--- a/uui/prj/build.lst
+++ b/uui/prj/build.lst
@@ -1,4 +1,4 @@
-uu uui : l10n vcl svtools LIBXSLT:libxslt NULL
+uu uui : L10N:l10n vcl svtools LIBXSLT:libxslt NULL
uu uui usr1 - all uu_mkout NULL
uu uui\source nmake - all uu_source NULL
uu uui\util nmake - all uu_util uu_source NULL
diff --git a/uui/source/ids.hrc b/uui/source/ids.hrc
index c292befb1663..c292befb1663 100644..100755
--- a/uui/source/ids.hrc
+++ b/uui/source/ids.hrc
diff --git a/uui/source/logindlg.src b/uui/source/logindlg.src
index 736e0f9ae1df..736e0f9ae1df 100644..100755
--- a/uui/source/logindlg.src
+++ b/uui/source/logindlg.src
diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx
index 1622be0b38ab..1622be0b38ab 100644..100755
--- a/uui/source/masterpasscrtdlg.cxx
+++ b/uui/source/masterpasscrtdlg.cxx
diff --git a/uui/source/passworddlg.hrc b/uui/source/passworddlg.hrc
index e9a8bb5b5b04..e9a8bb5b5b04 100644..100755
--- a/uui/source/passworddlg.hrc
+++ b/uui/source/passworddlg.hrc
diff --git a/uui/source/passworderrs.src b/uui/source/passworderrs.src
index 3d4307ad4f80..3d4307ad4f80 100644..100755
--- a/uui/source/passworderrs.src
+++ b/uui/source/passworderrs.src
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index bddd756f6836..54d280094f2c 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -50,6 +50,7 @@
#include <basic/sbuno.hxx>
#include <basic/sbmeth.hxx>
#include <basic/sbmod.hxx>
+#include <basic/vbahelper.hxx>
#include "vbacommandbars.hxx"
@@ -200,10 +201,8 @@ void SAL_CALL
VbaApplicationBase::setScreenUpdating(sal_Bool bUpdate) throw (uno::RuntimeException)
{
uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- if (bUpdate)
- xModel->unlockControllers();
- else
- xModel->lockControllers();
+ // #163808# use helper from module "basic" to lock all documents of this application
+ ::basic::vba::lockControllersOfAllDocuments( xModel, !bUpdate );
}
sal_Bool SAL_CALL
@@ -262,10 +261,8 @@ void SAL_CALL VbaApplicationBase::setInteractive( ::sal_Bool bInteractive )
throw (uno::RuntimeException)
{
uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW );
- uno::Reference< awt::XWindow > xWindow( xFrame->getContainerWindow(), uno::UNO_SET_THROW );
-
- xWindow->setEnable( bInteractive );
+ // #163808# use helper from module "basic" to enable/disable all container windows of all documents of this application
+ ::basic::vba::enableContainerWindowsOfAllDocuments( xModel, bInteractive );
}
sal_Bool SAL_CALL VbaApplicationBase::getVisible() throw (uno::RuntimeException)
diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx
index 0df38b003556..087e7188c8f6 100644
--- a/vbahelper/source/vbahelper/vbadocumentbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx
@@ -86,11 +86,14 @@ VbaDocumentBase::getName() throw (uno::RuntimeException)
::rtl::OUString
VbaDocumentBase::getPath() throw (uno::RuntimeException)
{
- INetURLObject aURL( getModel()->getURL() );
- rtl::OUString sURL( aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
- sURL = sURL.copy( 0, sURL.getLength() - aURL.GetLastName().getLength() - 1 );
- rtl::OUString sPath;
- ::osl::File::getSystemPathFromFileURL( sURL, sPath );
+ INetURLObject aURL( getModel()->getURL() );
+ rtl::OUString sURL = aURL.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ rtl::OUString sPath;
+ if( sURL.getLength() > 0 )
+ {
+ sURL = sURL.copy( 0, sURL.getLength() - aURL.GetLastName().getLength() - 1 );
+ ::osl::File::getSystemPathFromFileURL( sURL, sPath );
+ }
return sPath;
}
diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx
index f2b70ab231c7..b65a58542b92 100644
--- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx
@@ -24,7 +24,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include <vbahelper/vbadocumentsbase.hxx>
+
+#include "vbahelper/vbadocumentsbase.hxx"
+
#include <comphelper/mediadescriptor.hxx>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/implbase1.hxx>
@@ -49,10 +51,12 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <sfx2/objsh.hxx>
#include <tools/urlobj.hxx>
-#include <vbahelper/vbahelper.hxx>
#include <hash_map>
#include <osl/file.hxx>
+#include "vbahelper/vbahelper.hxx"
+#include "vbahelper/vbaapplicationbase.hxx"
+
using namespace ::ooo::vba;
using namespace ::com::sun::star;
@@ -213,8 +217,39 @@ VbaDocumentsBase::VbaDocumentsBase( const uno::Reference< XHelperInterface >& xP
{
}
+namespace {
+
+void lclSetupComponent( const uno::Reference< lang::XComponent >& rxComponent, sal_Bool bScreenUpdating, sal_Bool bInteractive )
+{
+ if( !bScreenUpdating ) try
+ {
+ uno::Reference< frame::XModel >( rxComponent, uno::UNO_QUERY_THROW )->lockControllers();
+ }
+ catch( uno::Exception& )
+ {
+ }
+
+ if( !bInteractive ) try
+ {
+ uno::Reference< frame::XModel > xModel( rxComponent, uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_SET_THROW );
+ uno::Reference< frame::XFrame > xFrame( xController->getFrame(), uno::UNO_SET_THROW );
+ uno::Reference< awt::XWindow >( xFrame->getContainerWindow(), uno::UNO_SET_THROW )->setEnable( sal_False );
+ }
+ catch( uno::Exception& )
+ {
+ }
+}
+
+} // namespace
+
uno::Any VbaDocumentsBase::createDocument() throw (uno::RuntimeException)
{
+ // #163808# determine state of Application.ScreenUpdating and Application.Interactive symbols (before new document is opened)
+ uno::Reference< XApplicationBase > xApplication( Application(), uno::UNO_QUERY );
+ sal_Bool bScreenUpdating = !xApplication.is() || xApplication->getScreenUpdating();
+ sal_Bool bInteractive = !xApplication.is() || xApplication->getInteractive();
+
uno::Reference< lang::XMultiComponentFactory > xSMgr(
mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
@@ -240,6 +275,10 @@ uno::Any VbaDocumentsBase::createDocument() throw (uno::RuntimeException)
sURL ,
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_blank") ), 0,
aMediaDesc.getAsConstPropertyValueList() );
+
+ // #163808# lock document controllers and container window if specified by application
+ lclSetupComponent( xComponent, bScreenUpdating, bInteractive );
+
return uno::makeAny( xComponent );
}
@@ -259,6 +298,11 @@ void VbaDocumentsBase::closeDocuments() throw (uno::RuntimeException)
// #TODO# #FIXME# can any of the unused params below be used?
uno::Any VbaDocumentsBase::openDocument( const rtl::OUString& rFileName, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (uno::RuntimeException)
{
+ // #163808# determine state of Application.ScreenUpdating and Application.Interactive symbols (before new document is opened)
+ uno::Reference< XApplicationBase > xApplication( Application(), uno::UNO_QUERY );
+ sal_Bool bScreenUpdating = !xApplication.is() || xApplication->getScreenUpdating();
+ sal_Bool bInteractive = !xApplication.is() || xApplication->getInteractive();
+
// we need to detect if this is a URL, if not then assume its a file path
rtl::OUString aURL;
INetURLObject aObj;
@@ -282,19 +326,16 @@ uno::Any VbaDocumentsBase::openDocument( const rtl::OUString& rFileName, const u
uno::Sequence< beans::PropertyValue > sProps( rProps );
sProps.realloc( sProps.getLength() + 1 );
sProps[ sProps.getLength() - 1 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("MacroExecutionMode") );
- sProps[ sProps.getLength() - 1 ].Value <<= uno::makeAny( document::MacroExecMode::ALWAYS_EXECUTE_NO_WARN );
-
- sal_Int32 nIndex = sProps.getLength() - 1;
+ sProps[ sProps.getLength() - 1 ].Value <<= document::MacroExecMode::ALWAYS_EXECUTE_NO_WARN;
if ( ReadOnly.hasValue() )
{
sal_Bool bIsReadOnly = sal_False; ReadOnly >>= bIsReadOnly;
if ( bIsReadOnly )
{
- static const rtl::OUString sReadOnly( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") );
sProps.realloc( sProps.getLength() + 1 );
- sProps[ nIndex ].Name = sReadOnly;
- sProps[ nIndex++ ].Value = uno::makeAny( (sal_Bool)sal_True );
+ sProps[ sProps.getLength() - 1 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") );
+ sProps[ sProps.getLength() - 1 ].Value <<= true;
}
}
@@ -302,6 +343,10 @@ uno::Any VbaDocumentsBase::openDocument( const rtl::OUString& rFileName, const u
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_default") ),
frame::FrameSearchFlag::CREATE,
sProps);
+
+ // #163808# lock document controllers and container window if specified by application
+ lclSetupComponent( xComponent, bScreenUpdating, bInteractive );
+
return uno::makeAny( xComponent );
}
diff --git a/xmlhelp/source/com/sun/star/help/HelpIndexer.java b/xmlhelp/source/com/sun/star/help/HelpIndexer.java
index bd09982daa3e..abb866804b43 100644
--- a/xmlhelp/source/com/sun/star/help/HelpIndexer.java
+++ b/xmlhelp/source/com/sun/star/help/HelpIndexer.java
@@ -40,6 +40,14 @@ import java.io.IOException;
import java.util.Date;
import java.util.zip.ZipOutputStream;
+/**
+ When this tool is used with long path names on Windows, that is paths which start
+ with \\?\, then the caller must make sure that the path is unique. This is achieved
+ by removing '.' and '..' from the path. Paths which are created by
+ osl_getSystemPathFromFileURL fulfill this requirement. This is necessary because
+ lucene is patched to not use File.getCanonicalPath. See long_path.patch in the lucene
+ module.
+ */
public class HelpIndexer extends WeakBase
implements XServiceInfo, XInvocation
{
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index d798f6c42f81..e3749fc1f694 100644..100755
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -416,9 +416,6 @@ rtl::OUString Databases::getInstallPathAsSystemPath()
return m_aInstallDirectoryAsSystemPath;
}
-
-
-
rtl::OUString Databases::getInstallPathAsURL()
{
osl::MutexGuard aGuard( m_aMutex );
@@ -642,22 +639,18 @@ Db* Databases::getBerkeley( const rtl::OUString& Database,
{
Db* table = new Db();
- rtl::OUString fileNameOU;
+ rtl::OUString fileURL;
if( pExtensionPath )
- {
- rtl::OUString aExpandedURL = expandURL( *pExtensionPath );
- aExpandedURL += Language + dbFileName;
- osl::FileBase::getSystemPathFromFileURL( aExpandedURL, fileNameOU );
- }
+ fileURL = expandURL(*pExtensionPath) + Language + dbFileName;
else
- fileNameOU = getInstallPathAsSystemPath() + key;
-
+ fileURL = getInstallPathAsURL() + key;
- rtl::OString fileName( fileNameOU.getStr(),fileNameOU.getLength(),osl_getThreadTextEncoding() );
-
- rtl::OUString fileNameDBHelp( fileNameOU );
+ rtl::OUString fileNameDBHelp( fileURL );
+ //Extensions always use the new format
if( pExtensionPath != NULL )
fileNameDBHelp += rtl::OUString::createFromAscii( "_" );
+ //SimpleFileAccess takes file URLs as arguments!!! Using filenames works accidentally but
+ //fails for example when using long path names on Windows (starting with \\?\)
if( m_xSFA->exists( fileNameDBHelp ) )
{
DBHelp* pDBHelp = new DBHelp( fileNameDBHelp, m_xSFA );
@@ -666,13 +659,13 @@ Db* Databases::getBerkeley( const rtl::OUString& Database,
#ifdef TEST_DBHELP
bool bSuccess;
bool bOldDbAccess = false;
- bSuccess = pDBHelp->testAgainstDb( fileName, bOldDbAccess );
+ bSuccess = pDBHelp->testAgainstDb( fileURL, bOldDbAccess );
bOldDbAccess = true;
- bSuccess = pDBHelp->testAgainstDb( fileName, bOldDbAccess );
+ bSuccess = pDBHelp->testAgainstDb( fileURL, bOldDbAccess );
#endif
}
- else if( table->open( 0,fileName.getStr(),0,DB_BTREE,DB_RDONLY,0644 ) )
+ else if( table->open( 0,fileURL, DB_BTREE,DB_RDONLY,0644 ) )
{
table->close( 0 );
delete table;
@@ -950,17 +943,13 @@ KeywordInfo* Databases::getKeyword( const rtl::OUString& Database,
std::vector<KeywordInfo::KeywordElement> aVector;
KeyDataBaseFileIterator aDbFileIt( m_xContext, *this, Database, Language );
- rtl::OUString fileNameOU;
+ rtl::OUString fileURL;
bool bExtension = false;
- while( (fileNameOU = aDbFileIt.nextDbFile( bExtension )).getLength() > 0 )
+ while( (fileURL = aDbFileIt.nextDbFile( bExtension )).getLength() > 0 )
{
- rtl::OString fileName( fileNameOU.getStr(),
- fileNameOU.getLength(),
- osl_getThreadTextEncoding() );
-
Db table;
- rtl::OUString fileNameDBHelp( fileNameOU );
+ rtl::OUString fileNameDBHelp( fileURL );
if( bExtension )
fileNameDBHelp += rtl::OUString::createFromAscii( "_" );
if( m_xSFA->exists( fileNameDBHelp ) )
@@ -1009,16 +998,16 @@ KeywordInfo* Databases::getKeyword( const rtl::OUString& Database,
#ifdef TEST_DBHELP
bool bSuccess;
bool bOldDbAccess = false;
- bSuccess = aDBHelp.testAgainstDb( fileName, bOldDbAccess );
+ bSuccess = aDBHelp.testAgainstDb( fileURL, bOldDbAccess );
bOldDbAccess = true;
- bSuccess = aDBHelp.testAgainstDb( fileName, bOldDbAccess );
+ bSuccess = aDBHelp.testAgainstDb( fileURL, bOldDbAccess );
int nDummy = 0;
#endif
}
- else if( 0 == table.open( 0,fileName.getStr(),0,DB_BTREE,DB_RDONLY,0644 ) )
+ else if( 0 == table.open( 0,fileURL,DB_BTREE,DB_RDONLY,0644 ) )
{
Db* idmap = getBerkeley( Database,Language );
@@ -1867,6 +1856,7 @@ Db* DataBaseIterator::implGetDbFromPackage( Reference< deployment::XPackage > xP
//===================================================================
// class KeyDataBaseFileIterator
+//returns a file URL
rtl::OUString KeyDataBaseFileIterator::nextDbFile( bool& o_rbExtension )
{
rtl::OUString aRetFile;
@@ -1877,7 +1867,7 @@ rtl::OUString KeyDataBaseFileIterator::nextDbFile( bool& o_rbExtension )
{
case INITIAL_MODULE:
aRetFile =
- m_rDatabases.getInstallPathAsSystemPath() +
+ m_rDatabases.getInstallPathAsURL() +
m_rDatabases.processLang( m_aLanguage ) + aSlash + m_aInitialModule +
rtl::OUString::createFromAscii( ".key" );
@@ -1935,16 +1925,14 @@ rtl::OUString KeyDataBaseFileIterator::nextDbFile( bool& o_rbExtension )
return aRetFile;
}
+//Returns a file URL, that does not contain macros
rtl::OUString KeyDataBaseFileIterator::implGetDbFileFromPackage
( Reference< deployment::XPackage > xPackage )
{
rtl::OUString aExpandedURL =
implGetFileFromPackage( rtl::OUString::createFromAscii( ".key" ), xPackage );
- rtl::OUString aRetFile;
- osl::FileBase::getSystemPathFromFileURL( aExpandedURL, aRetFile );
-
- return aRetFile;
+ return aExpandedURL;
}
diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx
index aa80bf27405b..793edafb480f 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.hxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.hxx
@@ -506,7 +506,7 @@ namespace chelp {
Databases& rDatabases, const rtl::OUString& aInitialModule, const rtl::OUString& aLanguage )
: ExtensionIteratorBase( xContext, rDatabases, aInitialModule, aLanguage )
{}
-
+ //Returns a file URL
rtl::OUString nextDbFile( bool& o_rbExtension );
private:
diff --git a/xmlhelp/source/cxxhelp/provider/db.cxx b/xmlhelp/source/cxxhelp/provider/db.cxx
index abc5acc6381c..3db8f5a3da87 100644..100755
--- a/xmlhelp/source/cxxhelp/provider/db.cxx
+++ b/xmlhelp/source/cxxhelp/provider/db.cxx
@@ -35,6 +35,8 @@
#include "com/sun/star/io/XSeekable.hpp"
+#include "osl/file.hxx"
+#include "osl/thread.hxx"
#ifdef TEST_DBHELP
#include <osl/time.h>
#endif
@@ -115,21 +117,25 @@ void testWriteKeyValue( FILE* pFile, const KeyValPair& rKeyValPair )
fprintf( pFile, "%c", cLF );
}
-bool DBHelp::testAgainstDb( const rtl::OString& fileName, bool bOldDbAccess )
+bool DBHelp::testAgainstDb( const rtl::OUString& fileURL, bool bOldDbAccess )
{
bool bSuccess = true;
KeyValPairVector avKeyValPair;
- rtl::OString aOutFileName = fileName;
- aOutFileName += "_TestOut";
+ rtl::OUString aOutFileName = fileURL;
+ aOutFileName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_TestOut"));
if( bOldDbAccess )
- aOutFileName += "_Old";
- FILE* pFile = fopen( aOutFileName.getStr(), "wb" );
-
+ aOutFileName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_Old"));
+#ifdef WNT
+ FILE* pFile = _wfopen( aOutFileName.getStr(), L"wb" );
+#else
+ rtl::OString sFile = rtl::OUStringToOString(aOutFileName, osl_getThreadTextEncoding());
+ FILE* pFile = fopen( sFile.getStr(), "wb" );
+#endif
// Get all values
Db table;
- if( 0 == table.open( 0,fileName.getStr(),0,DB_BTREE,DB_RDONLY,0644 ) )
+ if( 0 == table.open( 0,fileURL,DB_BTREE,DB_RDONLY,0644 ) )
{
bool first = true;
@@ -206,7 +212,7 @@ bool DBHelp::testAgainstDb( const rtl::OString& fileName, bool bOldDbAccess )
{
if( bFirst )
{
- if( tableTest.open( 0,fileName.getStr(),0,DB_BTREE,DB_RDONLY,0644 ) )
+ if( tableTest.open( 0,fileURL, DB_BTREE,DB_RDONLY,0644 ) )
{
if( pFile != NULL )
fprintf( pFile, "Cannot open database\n" );
@@ -305,11 +311,11 @@ void DBHelp::createHashMap( bool bOptimizeForPerformance )
m_pStringToValPosMap = new StringToValPosMap();
}
- Reference< XInputStream > xIn = m_xSFA->openFileRead( m_aFileName );
+ Reference< XInputStream > xIn = m_xSFA->openFileRead( m_aFileURL );
if( xIn.is() )
{
Sequence< sal_Int8 > aData;
- sal_Int32 nSize = m_xSFA->getSize( m_aFileName );
+ sal_Int32 nSize = m_xSFA->getSize( m_aFileURL );
sal_Int32 nRead = xIn->readBytes( aData, nSize );
const char* pData = (const char*)aData.getConstArray();
@@ -388,7 +394,7 @@ bool DBHelp::getValueForKey( const rtl::OString& rKey, DBData& rValue )
int iValuePos = rValPair.first;
int nValueLen = rValPair.second;
- Reference< XInputStream > xIn = m_xSFA->openFileRead( m_aFileName );
+ Reference< XInputStream > xIn = m_xSFA->openFileRead( m_aFileURL );
if( xIn.is() )
{
Reference< XSeekable > xXSeekable( xIn, UNO_QUERY );
@@ -436,9 +442,9 @@ bool DBHelp::startIteration( void )
{
bool bSuccess = false;
- sal_Int32 nSize = m_xSFA->getSize( m_aFileName );
+ sal_Int32 nSize = m_xSFA->getSize( m_aFileURL );
- Reference< XInputStream > xIn = m_xSFA->openFileRead( m_aFileName );
+ Reference< XInputStream > xIn = m_xSFA->openFileRead( m_aFileURL );
if( xIn.is() )
{
m_nItRead = xIn->readBytes( m_aItData, nSize );
@@ -519,6 +525,19 @@ int Db::open(DB_TXN *txnid,
return db_internal::check_error( err,"Db::open" );
}
+int Db::open(DB_TXN *txnid,
+ ::rtl::OUString const & fileURL,
+ DBTYPE type,
+ u_int32_t flags,
+ int mode)
+{
+ ::rtl::OUString ouPath;
+ ::osl::FileBase::getSystemPathFromFileURL(fileURL, ouPath);
+ const ::rtl::OString sPath = ::rtl::OUStringToOString(ouPath, osl_getThreadTextEncoding());
+ return open(txnid, sPath.getStr(), 0, type, flags, mode);
+}
+
+
int Db::get(DB_TXN *txnid, Dbt *key, Dbt *data, u_int32_t flags)
{
diff --git a/xmlhelp/source/cxxhelp/provider/db.hxx b/xmlhelp/source/cxxhelp/provider/db.hxx
index eb867c0426d3..1e25ab1f579b 100644..100755
--- a/xmlhelp/source/cxxhelp/provider/db.hxx
+++ b/xmlhelp/source/cxxhelp/provider/db.hxx
@@ -118,7 +118,7 @@ namespace berkeleydbproxy {
class DBHelp
{
- rtl::OUString m_aFileName;
+ rtl::OUString m_aFileURL;
StringToDataMap* m_pStringToDataMap;
StringToValPosMap* m_pStringToValPosMap;
com::sun::star::uno::Reference< com::sun::star::ucb::XSimpleFileAccess >
@@ -133,16 +133,21 @@ namespace berkeleydbproxy {
bool implReadLenAndData( const char* pData, int& riPos, DBData& rValue );
public:
- DBHelp( const rtl::OUString& rFileName,
+ //DBHelp must get a fileURL which can then directly be used by simple file access.
+ //SimpleFileAccess requires file URLs as arguments. Passing file path may work but fails
+ //for example when using long file paths on Windows, which start with "\\?\"
+ DBHelp( const rtl::OUString& rFileURL,
com::sun::star::uno::Reference< com::sun::star::ucb::XSimpleFileAccess > xSFA )
- : m_aFileName( rFileName )
+ : m_aFileURL( rFileURL )
, m_pStringToDataMap( NULL )
, m_pStringToValPosMap( NULL )
, m_xSFA( xSFA )
, m_pItData( NULL )
, m_nItRead( -1 )
, m_iItPos( -1 )
- {}
+ {
+ OSL_ASSERT(!rFileURL.compareTo(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:")), 5));
+ }
~DBHelp()
{ releaseHashMap(); }
@@ -150,7 +155,7 @@ namespace berkeleydbproxy {
void releaseHashMap( void );
#ifdef TEST_DBHELP
- bool testAgainstDb( const rtl::OString& fileName, bool bOldDbAccess );
+ bool testAgainstDb( const rtl::OUString& fileURL, bool bOldDbAccess );
#endif
bool getValueForKey( const rtl::OString& rKey, DBData& rValue );
@@ -184,6 +189,12 @@ namespace berkeleydbproxy {
u_int32_t flags,
int mode);
+ int open(DB_TXN *txnid,
+ ::rtl::OUString const & fileURL,
+ DBTYPE type,
+ u_int32_t flags,
+ int mode);
+
int get(DB_TXN* txnid, Dbt *key, Dbt *data, u_int32_t flags);
diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk
index 9576341f0ffb..0544171dbfbd 100644
--- a/xmloff/Library_xo.mk
+++ b/xmloff/Library_xo.mk
@@ -69,8 +69,10 @@ $(eval $(call gb_Library_add_exception_objects,xo,\
xmloff/source/chart/SchXMLAxisContext \
xmloff/source/chart/SchXMLCalculationSettingsContext \
xmloff/source/chart/SchXMLChartContext \
+ xmloff/source/chart/SchXMLEnumConverter \
xmloff/source/chart/SchXMLExport \
xmloff/source/chart/SchXMLImport \
+ xmloff/source/chart/SchXMLLegendContext \
xmloff/source/chart/SchXMLParagraphContext \
xmloff/source/chart/SchXMLPlotAreaContext \
xmloff/source/chart/SchXMLSeries2Context \
diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx
index 936217fb8dc5..6b11e885f72e 100644
--- a/xmloff/inc/SchXMLImport.hxx
+++ b/xmloff/inc/SchXMLImport.hxx
@@ -127,14 +127,6 @@ enum SchXMLPlotAreaAttrTokenMap
XML_TOK_PA_LIGHTING_MODE
};
-enum SchXMLLegendAttrMap
-{
- XML_TOK_LEGEND_POSITION,
- XML_TOK_LEGEND_X,
- XML_TOK_LEGEND_Y,
- XML_TOK_LEGEND_STYLE_NAME
-};
-
enum SchXMLAutoStyleAttrMap
{
XML_TOK_AS_FAMILY,
diff --git a/xmloff/inc/xmloff/PageMasterStyleMap.hxx b/xmloff/inc/xmloff/PageMasterStyleMap.hxx
index 6ca1ba29f2cb..592949ca2b82 100644
--- a/xmloff/inc/xmloff/PageMasterStyleMap.hxx
+++ b/xmloff/inc/xmloff/PageMasterStyleMap.hxx
@@ -83,6 +83,11 @@
#define CTF_PM_PRINT_HEADERS (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0017))
#define CTF_PM_PRINT_OBJECTS (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0018))
#define CTF_PM_PRINT_ZEROVALUES (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0019))
+#define CTF_PM_MARGINALL (XML_PM_CTF_START + 0x001A)
+#define CTF_PM_MARGINTOP (XML_PM_CTF_START + 0x001B)
+#define CTF_PM_MARGINBOTTOM (XML_PM_CTF_START + 0x001C)
+#define CTF_PM_MARGINLEFT (XML_PM_CTF_START + 0x001D)
+#define CTF_PM_MARGINRIGHT (XML_PM_CTF_START + 0x001E)
#define CTF_PM_PAGEUSAGE (XML_PM_CTF_START + 0x0031)
#define CTF_PM_GRAPHICPOSITION (XML_PM_CTF_START + 0x0032)
@@ -118,6 +123,12 @@
#define CTF_PM_HEADERGRAPHICPOSITION (CTF_PM_HEADERFLAG|(XML_PM_CTF_START + 0x0034))
#define CTF_PM_HEADERGRAPHICFILTER (CTF_PM_HEADERFLAG|(XML_PM_CTF_START + 0x0035))
#define CTF_PM_HEADERGRAPHICURL (CTF_PM_HEADERFLAG|(XML_PM_CTF_START + 0x0036))
+#define CTF_PM_HEADERMARGINALL (CTF_PM_HEADERFLAG|CTF_PM_MARGINALL)
+#define CTF_PM_HEADERMARGINTOP (CTF_PM_HEADERFLAG|CTF_PM_MARGINTOP)
+#define CTF_PM_HEADERMARGINBOTTOM (CTF_PM_HEADERFLAG|CTF_PM_MARGINBOTTOM)
+#define CTF_PM_HEADERMARGINLEFT (CTF_PM_HEADERFLAG|CTF_PM_MARGINLEFT)
+#define CTF_PM_HEADERMARGINRIGHT (CTF_PM_HEADERFLAG|CTF_PM_MARGINRIGHT)
+
// footer
#define CTF_PM_FOOTERBORDERALL (CTF_PM_FOOTERFLAG|CTF_PM_BORDERALL)
#define CTF_PM_FOOTERBORDERTOP (CTF_PM_FOOTERFLAG|CTF_PM_BORDERTOP)
@@ -140,6 +151,12 @@
#define CTF_PM_FOOTERGRAPHICPOSITION (CTF_PM_FOOTERFLAG|(XML_PM_CTF_START + 0x0034))
#define CTF_PM_FOOTERGRAPHICFILTER (CTF_PM_FOOTERFLAG|(XML_PM_CTF_START + 0x0035))
#define CTF_PM_FOOTERGRAPHICURL (CTF_PM_FOOTERFLAG|(XML_PM_CTF_START + 0x0036))
+#define CTF_PM_FOOTERMARGINALL (CTF_PM_FOOTERFLAG|CTF_PM_MARGINALL)
+#define CTF_PM_FOOTERMARGINTOP (CTF_PM_FOOTERFLAG|CTF_PM_MARGINTOP)
+#define CTF_PM_FOOTERMARGINBOTTOM (CTF_PM_FOOTERFLAG|CTF_PM_MARGINBOTTOM)
+#define CTF_PM_FOOTERMARGINLEFT (CTF_PM_FOOTERFLAG|CTF_PM_MARGINLEFT)
+#define CTF_PM_FOOTERMARGINRIGHT (CTF_PM_FOOTERFLAG|CTF_PM_MARGINRIGHT)
+
#define CTF_PM_FTN_HEIGTH (XML_PM_CTF_START + 0x0060)
#define CTF_PM_FTN_LINE_WEIGTH (XML_PM_CTF_START + 0x0061)
#define CTF_PM_FTN_LINE_COLOR (XML_PM_CTF_START + 0x0062)
diff --git a/xmloff/inc/xmloff/SchXMLImportHelper.hxx b/xmloff/inc/xmloff/SchXMLImportHelper.hxx
index a618d363137f..afc637aead74 100644
--- a/xmloff/inc/xmloff/SchXMLImportHelper.hxx
+++ b/xmloff/inc/xmloff/SchXMLImportHelper.hxx
@@ -83,7 +83,6 @@ private:
SvXMLTokenMap* mpChartAttrTokenMap;
SvXMLTokenMap* mpPlotAreaAttrTokenMap;
- SvXMLTokenMap* mpLegendAttrTokenMap;
SvXMLTokenMap* mpAutoStyleAttrTokenMap;
SvXMLTokenMap* mpCellAttrTokenMap;
SvXMLTokenMap* mpSeriesAttrTokenMap;
@@ -124,7 +123,6 @@ public:
const SvXMLTokenMap& GetChartAttrTokenMap();
const SvXMLTokenMap& GetPlotAreaAttrTokenMap();
- const SvXMLTokenMap& GetLegendAttrTokenMap();
const SvXMLTokenMap& GetAutoStyleAttrTokenMap();
const SvXMLTokenMap& GetCellAttrTokenMap();
const SvXMLTokenMap& GetSeriesAttrTokenMap();
diff --git a/xmloff/inc/xmloff/txtprmap.hxx b/xmloff/inc/xmloff/txtprmap.hxx
index d64cc1266ef9..a02151cd0993 100644
--- a/xmloff/inc/xmloff/txtprmap.hxx
+++ b/xmloff/inc/xmloff/txtprmap.hxx
@@ -178,6 +178,14 @@
#define CTF_TEXT_DISPLAY (XML_TEXT_CTF_START + 143)
#define CTF_TEXT_CLIP (XML_TEXT_CTF_START + 144)
#define CTF_TEXT_CLIP11 (XML_TEXT_CTF_START + 145)
+#define CTF_PARAMARGINALL (XML_TEXT_CTF_START + 146)
+#define CTF_PARAMARGINALL_REL (XML_TEXT_CTF_START + 147)
+#define CTF_MARGINALL (XML_TEXT_CTF_START + 148)
+#define CTF_MARGINLEFT (XML_TEXT_CTF_START + 149)
+#define CTF_MARGINRIGHT (XML_TEXT_CTF_START + 150)
+#define CTF_MARGINTOP (XML_TEXT_CTF_START + 151)
+#define CTF_MARGINBOTTOM (XML_TEXT_CTF_START + 152)
+
#define TEXT_PROP_MAP_TEXT 0
#define TEXT_PROP_MAP_PARA 1
#define TEXT_PROP_MAP_FRAME 2
diff --git a/xmloff/inc/xmloff/xmlmetai.hxx b/xmloff/inc/xmloff/xmlmetai.hxx
index efdd1d3f024f..2ddd51920054 100644
--- a/xmloff/inc/xmloff/xmlmetai.hxx
+++ b/xmloff/inc/xmloff/xmlmetai.hxx
@@ -25,8 +25,8 @@
*
************************************************************************/
-#ifndef _XMLOFF_XMLMETAI_HXX
-#define _XMLOFF_XMLMETAI_HXX
+#ifndef XMLOFF_XMLMETAI_HXX
+#define XMLOFF_XMLMETAI_HXX
#include "sal/config.h"
#include "xmloff/dllapi.h"
@@ -69,12 +69,6 @@ public:
virtual void EndElement();
-protected:
- /// initialize DocumentProperties object with DOM and base URL
- void initDocumentProperties();
- // set the BuildId property at the importer
- void setBuildId(const ::rtl::OUString & i_rBuildId);
-
public:
static void setBuildId(const ::rtl::OUString & rGenerator,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xImportInfo );
diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx
index ecadbbdc196f..39186a044311 100644
--- a/xmloff/inc/xmloff/xmltoken.hxx
+++ b/xmloff/inc/xmloff/xmltoken.hxx
@@ -3113,6 +3113,12 @@ namespace xmloff { namespace token {
XML_OUTSIDE_MINIMUM,//#i114142#
XML_OUTSIDE_MAXIMUM,//#i114142#
+ XML_LEGEND_EXPANSION, //#i28760#
+ XML_LEGEND_EXPANSION_ASPECT_RATIO, //#i28760#
+ XML_BALANCED, //#i28760#
+ XML_HIGH, //#i28760#
+ XML_WIDE, //#i28760#
+
XML_AXIS_TYPE, //#i25706#
XML_DATE_SCALE,
XML_BASE_TIME_UNIT,
@@ -3124,6 +3130,8 @@ namespace xmloff { namespace token {
XML_MIN_VALUE,
XML_MAX_VALUE,
+ XML_MARGIN, // #i117001#
+
XML_TOKEN_END
};
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 6b42b2e629df..9f9d1cf2bb1d 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -30,6 +30,7 @@
#include "SchXMLChartContext.hxx"
#include "SchXMLImport.hxx"
+#include "SchXMLLegendContext.hxx"
#include "SchXMLPlotAreaContext.hxx"
#include "SchXMLParagraphContext.hxx"
#include "SchXMLTableContext.hxx"
@@ -52,7 +53,6 @@
#include <com/sun/star/chart/XChartDocument.hpp>
#include <com/sun/star/chart/XDiagram.hpp>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
-#include <com/sun/star/chart/ChartLegendPosition.hpp>
#include <com/sun/star/util/XStringMapping.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
@@ -60,7 +60,6 @@
#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/embed/Aspects.hpp>
#include <com/sun/star/embed/XVisualObject.hpp>
-#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/data/XDataSink.hpp>
@@ -234,19 +233,6 @@ uno::Sequence< sal_Int32 > lcl_getNumberSequenceFromString( const ::rtl::OUStrin
} // anonymous namespace
-static __FAR_DATA SvXMLEnumMapEntry aXMLLegendAlignmentMap[] =
-{
-// { XML_LEFT, chart::ChartLegendPosition_LEFT },
- // #i35421#
- { XML_START, chart::ChartLegendPosition_LEFT },
- { XML_TOP, chart::ChartLegendPosition_TOP },
-// { XML_RIGHT, chart::ChartLegendPosition_RIGHT },
- // #i35421#
- { XML_END, chart::ChartLegendPosition_RIGHT },
- { XML_BOTTOM, chart::ChartLegendPosition_BOTTOM },
- { XML_TOKEN_INVALID, 0 }
-};
-
// ----------------------------------------
SchXMLChartContext::SchXMLChartContext( SchXMLImportHelper& rImpHelper,
@@ -1273,115 +1259,3 @@ SvXMLImportContext* SchXMLTitleContext::CreateChildContext(
}
// ----------------------------------------
-
-SchXMLLegendContext::SchXMLLegendContext( SchXMLImportHelper& rImpHelper,
- SvXMLImport& rImport, const rtl::OUString& rLocalName ) :
- SvXMLImportContext( rImport, XML_NAMESPACE_CHART, rLocalName ),
- mrImportHelper( rImpHelper )
-{
-}
-
-void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
-{
- uno::Reference< chart::XChartDocument > xDoc = mrImportHelper.GetChartDocument();
- if( ! xDoc.is())
- return;
-
- // turn on legend
- uno::Reference< beans::XPropertySet > xDocProp( xDoc, uno::UNO_QUERY );
- if( xDocProp.is())
- {
- uno::Any aTrueBool;
- aTrueBool <<= (sal_Bool)(sal_True);
- try
- {
- xDocProp->setPropertyValue( rtl::OUString::createFromAscii( "HasLegend" ), aTrueBool );
- }
- catch( beans::UnknownPropertyException )
- {
- DBG_ERROR( "Property HasLegend not found" );
- }
- }
-
- // parse attributes
- sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
- const SvXMLTokenMap& rAttrTokenMap = mrImportHelper.GetLegendAttrTokenMap();
-
- awt::Point aLegendPos;
- bool bHasXPosition=false;
- bool bHasYPosition=false;
-
- rtl::OUString sAutoStyleName;
-
- for( sal_Int16 i = 0; i < nAttrCount; i++ )
- {
- rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
- rtl::OUString aLocalName;
- rtl::OUString aValue = xAttrList->getValueByIndex( i );
- sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
-
- switch( rAttrTokenMap.Get( nPrefix, aLocalName ))
- {
- case XML_TOK_LEGEND_POSITION:
- {
- // set anchor position
- uno::Reference< beans::XPropertySet > xProp( xDoc->getLegend(), uno::UNO_QUERY );
- if( xProp.is())
- {
- try
- {
- sal_uInt16 nEnumVal;
- if( GetImport().GetMM100UnitConverter().convertEnum( nEnumVal, aValue, aXMLLegendAlignmentMap ))
- {
- uno::Any aAny;
- aAny <<= (chart::ChartLegendPosition)(nEnumVal);
- xProp->setPropertyValue( rtl::OUString::createFromAscii( "Alignment" ), aAny );
- }
- }
- catch( beans::UnknownPropertyException )
- {
- DBG_ERROR( "Property Alignment (legend) not found" );
- }
- }
- }
- break;
-
- case XML_TOK_LEGEND_X:
- GetImport().GetMM100UnitConverter().convertMeasure( aLegendPos.X, aValue );
- bHasXPosition = true;
- break;
- case XML_TOK_LEGEND_Y:
- GetImport().GetMM100UnitConverter().convertMeasure( aLegendPos.Y, aValue );
- bHasYPosition = true;
- break;
- case XML_TOK_LEGEND_STYLE_NAME:
- sAutoStyleName = aValue;
- }
- }
-
- uno::Reference< drawing::XShape > xLegendShape( xDoc->getLegend(), uno::UNO_QUERY );
- if( xLegendShape.is() && bHasXPosition && bHasYPosition )
- xLegendShape->setPosition( aLegendPos );
-
- // set auto-styles for Legend
- uno::Reference< beans::XPropertySet > xProp( xLegendShape, uno::UNO_QUERY );
- if( xProp.is())
- {
- // the fill style has the default "none" in XML, but "solid" in the model.
- xProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" )),
- uno::makeAny( drawing::FillStyle_NONE ));
- const SvXMLStylesContext* pStylesCtxt = mrImportHelper.GetAutoStylesContext();
- if( pStylesCtxt )
- {
- const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(
- mrImportHelper.GetChartFamilyID(), sAutoStyleName );
-
- if( pStyle && pStyle->ISA( XMLPropStyleContext ))
- (( XMLPropStyleContext* )pStyle )->FillPropertySet( xProp );
- }
- }
-}
-
-SchXMLLegendContext::~SchXMLLegendContext()
-{
-}
diff --git a/xmloff/source/chart/SchXMLChartContext.hxx b/xmloff/source/chart/SchXMLChartContext.hxx
index 41f84f783a67..e34b50c4f62d 100644
--- a/xmloff/source/chart/SchXMLChartContext.hxx
+++ b/xmloff/source/chart/SchXMLChartContext.hxx
@@ -171,19 +171,4 @@ public:
const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
};
-// ----------------------------------------
-
-class SchXMLLegendContext : public SvXMLImportContext
-{
-private:
- SchXMLImportHelper& mrImportHelper;
-
-public:
- SchXMLLegendContext( SchXMLImportHelper& rImpHelper,
- SvXMLImport& rImport, const rtl::OUString& rLocalName );
- virtual ~SchXMLLegendContext();
-
- virtual void StartElement( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
-};
-
#endif // _SCH_XMLCHARTCONTEXT_HXX_
diff --git a/xmloff/source/chart/SchXMLEnumConverter.cxx b/xmloff/source/chart/SchXMLEnumConverter.cxx
new file mode 100755
index 000000000000..fd4d7914a2fe
--- /dev/null
+++ b/xmloff/source/chart/SchXMLEnumConverter.cxx
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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_xmloff.hxx"
+#include "SchXMLEnumConverter.hxx"
+
+#include <com/sun/star/chart/ChartLegendPosition.hpp>
+#include <com/sun/star/chart/ChartLegendExpansion.hpp>
+#include <com/sun/star/uno/Any.hxx>
+
+// header for rtl::Static
+#include <rtl/instance.hxx>
+
+using ::rtl::OUString;
+using namespace ::xmloff::token;
+using namespace ::com::sun::star;
+
+namespace
+{
+//-----------------------------------------------------------------------
+
+SvXMLEnumMapEntry aXMLLegendPositionEnumMap[] =
+{
+ { XML_START, chart::ChartLegendPosition_LEFT },
+ { XML_TOP, chart::ChartLegendPosition_TOP },
+ { XML_END, chart::ChartLegendPosition_RIGHT },
+ { XML_BOTTOM, chart::ChartLegendPosition_BOTTOM },
+ { XML_TOKEN_INVALID, 0 }
+};
+
+class XMLLegendPositionPropertyHdl : public XMLEnumPropertyHdl
+{
+public:
+ XMLLegendPositionPropertyHdl()
+ : XMLEnumPropertyHdl( aXMLLegendPositionEnumMap, ::getCppuType((const chart::ChartLegendPosition*)0) ) {}
+ virtual ~XMLLegendPositionPropertyHdl() {};
+};
+
+struct TheLegendPositionPropertyHdl : public rtl::Static< XMLLegendPositionPropertyHdl, TheLegendPositionPropertyHdl >
+{
+};
+
+//-----------------------------------------------------------------------
+
+SvXMLEnumMapEntry aXMLLegendExpansionEnumMap[] =
+{
+ { XML_WIDE, chart::ChartLegendExpansion_WIDE },
+ { XML_HIGH, chart::ChartLegendExpansion_HIGH },
+ { XML_BALANCED, chart::ChartLegendExpansion_BALANCED },
+ { XML_CUSTOM, chart::ChartLegendExpansion_CUSTOM },
+ { XML_TOKEN_INVALID, 0 }
+};
+
+class XMLLegendExpansionPropertyHdl : public XMLEnumPropertyHdl
+{
+public:
+ XMLLegendExpansionPropertyHdl()
+ : XMLEnumPropertyHdl( aXMLLegendExpansionEnumMap, ::getCppuType((const chart::ChartLegendExpansion*)0) ) {}
+ virtual ~XMLLegendExpansionPropertyHdl() {};
+};
+
+struct TheLegendExpansionPropertyHdl : public rtl::Static< XMLLegendExpansionPropertyHdl, TheLegendExpansionPropertyHdl >
+{
+};
+
+//-----------------------------------------------------------------------
+
+}//end anonymous namespace
+
+//-----------------------------------------------------------------------
+
+XMLEnumPropertyHdl& SchXMLEnumConverter::getLegendPositionConverter()
+{
+ return TheLegendPositionPropertyHdl::get();
+}
+XMLEnumPropertyHdl& SchXMLEnumConverter::getLegendExpansionConverter()
+{
+ return TheLegendExpansionPropertyHdl::get();
+}
diff --git a/xmloff/source/chart/SchXMLEnumConverter.hxx b/xmloff/source/chart/SchXMLEnumConverter.hxx
new file mode 100755
index 000000000000..63a9fb7ffb95
--- /dev/null
+++ b/xmloff/source/chart/SchXMLEnumConverter.hxx
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _XML_CHART_ENUM_CONVERTER_HXX_
+#define _XML_CHART_ENUM_CONVERTER_HXX_
+
+#include <xmloff/EnumPropertyHdl.hxx>
+
+class SchXMLEnumConverter
+{
+public:
+ static XMLEnumPropertyHdl& getLegendPositionConverter();//returns a singleton
+ static XMLEnumPropertyHdl& getLegendExpansionConverter();//returns a singleton
+};
+
+#endif // _XML_CHART_ENUM_CONVERTER_HXX_
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index cc13eb2de733..9e9ea12d40e2 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -35,6 +35,8 @@
#include "SchXMLSeriesHelper.hxx"
#include "ColorPropertySet.hxx"
#include "SchXMLTools.hxx"
+#include "SchXMLEnumConverter.hxx"
+
#include <tools/debug.hxx>
#include <rtl/logfile.hxx>
#include <comphelper/processfactory.hxx>
@@ -68,6 +70,7 @@
#include <com/sun/star/chart/XAxisSupplier.hpp>
#include <com/sun/star/chart/XChartDocument.hpp>
#include <com/sun/star/chart/ChartLegendPosition.hpp>
+#include <com/sun/star/chart/ChartLegendExpansion.hpp>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/chart/ChartAxisAssign.hpp>
#include <com/sun/star/chart/ChartAxisType.hpp>
@@ -245,8 +248,8 @@ public:
void addPosition( const ::com::sun::star::awt::Point & rPosition );
void addPosition( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape );
/// add svg size as attribute for current element
- void addSize( const ::com::sun::star::awt::Size & rSize );
- void addSize( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape );
+ void addSize( const ::com::sun::star::awt::Size & rSize, bool bIsOOoNamespace = false );
+ void addSize( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape, bool bIsOOoNamespace = false );
/// fills the member msString with the appropriate String (i.e. "A3")
void getCellAddress( sal_Int32 nCol, sal_Int32 nRow );
/// exports a string as a paragraph element
@@ -599,24 +602,20 @@ OUString lcl_flattenStringSequence( const Sequence< OUString > & rSequence )
return aResult.makeStringAndClear();
}
-OUString lcl_getLabelString( const Reference< chart2::data::XDataSequence > & xLabelSeq )
+void lcl_getLabelStringSequence( Sequence< OUString >& rOutLabels, const Reference< chart2::data::XDataSequence > & xLabelSeq )
{
- Sequence< OUString > aLabels;
-
uno::Reference< chart2::data::XTextualDataSequence > xTextualDataSequence( xLabelSeq, uno::UNO_QUERY );
if( xTextualDataSequence.is())
{
- aLabels = xTextualDataSequence->getTextualData();
+ rOutLabels = xTextualDataSequence->getTextualData();
}
else if( xLabelSeq.is())
{
Sequence< uno::Any > aAnies( xLabelSeq->getData());
- aLabels.realloc( aAnies.getLength());
+ rOutLabels.realloc( aAnies.getLength());
for( sal_Int32 i=0; i<aAnies.getLength(); ++i )
- aAnies[i] >>= aLabels[i];
+ aAnies[i] >>= rOutLabels[i];
}
-
- return lcl_flattenStringSequence( aLabels );
}
sal_Int32 lcl_getMaxSequenceLength(
@@ -636,46 +635,96 @@ sal_Int32 lcl_getMaxSequenceLength(
return nResult;
}
-double lcl_getValueFromSequence( const Reference< chart2::data::XDataSequence > & xSeq, sal_Int32 nIndex )
+uno::Sequence< rtl::OUString > lcl_DataSequenceToStringSequence(
+ const uno::Reference< chart2::data::XDataSequence >& xDataSequence )
{
- double fResult = 0.0;
- ::rtl::math::setNan( &fResult );
- Reference< chart2::data::XNumericalDataSequence > xNumSeq( xSeq, uno::UNO_QUERY );
- if( xNumSeq.is())
+ uno::Sequence< rtl::OUString > aResult;
+ if(!xDataSequence.is())
+ return aResult;
+
+ uno::Reference< chart2::data::XTextualDataSequence > xTextualDataSequence( xDataSequence, uno::UNO_QUERY );
+ if( xTextualDataSequence.is() )
{
- Sequence< double > aValues( xNumSeq->getNumericalData());
- if( nIndex < aValues.getLength() )
- fResult = aValues[nIndex];
+ aResult = xTextualDataSequence->getTextualData();
}
else
{
- Sequence< uno::Any > aAnies( xSeq->getData());
- if( nIndex < aAnies.getLength() )
- aAnies[nIndex] >>= fResult;
+ uno::Sequence< uno::Any > aValues = xDataSequence->getData();
+ aResult.realloc(aValues.getLength());
+
+ for(sal_Int32 nN=aValues.getLength();nN--;)
+ aValues[nN] >>= aResult[nN];
}
- return fResult;
-}
+ return aResult;
+}
::std::vector< double > lcl_getAllValuesFromSequence( const Reference< chart2::data::XDataSequence > & xSeq )
{
double fNan = 0.0;
::rtl::math::setNan( &fNan );
::std::vector< double > aResult;
+ if(!xSeq.is())
+ return aResult;
+ uno::Sequence< double > aValuesSequence;
Reference< chart2::data::XNumericalDataSequence > xNumSeq( xSeq, uno::UNO_QUERY );
- if( xNumSeq.is())
+ if( xNumSeq.is() )
{
- Sequence< double > aValues( xNumSeq->getNumericalData());
- ::std::copy( aValues.getConstArray(), aValues.getConstArray() + aValues.getLength(),
- ::std::back_inserter( aResult ));
+ aValuesSequence = xNumSeq->getNumericalData();
}
- else if( xSeq.is())
+ else
{
- Sequence< uno::Any > aAnies( xSeq->getData());
- aResult.resize( aAnies.getLength(), fNan );
+ Sequence< uno::Any > aAnies( xSeq->getData() );
+ aValuesSequence.realloc( aAnies.getLength() );
for( sal_Int32 i=0; i<aAnies.getLength(); ++i )
- aAnies[i] >>= aResult[i];
+ aAnies[i] >>= aValuesSequence[i];
}
+
+ //special handling for x-values (if x-values do point to categories, indices are used instead )
+ Reference< beans::XPropertySet > xProp( xSeq, uno::UNO_QUERY );
+ if( xProp.is() )
+ {
+ OUString aRole;
+ xProp->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Role") ) ) >>= aRole;
+ if( aRole.match( OUString( RTL_CONSTASCII_USTRINGPARAM( "values-x") ) ) )
+ {
+ //lcl_clearIfNoValuesButTextIsContained - replace by indices if the values are not appropriate
+ bool bHasValue=false;
+ bool bHasText=false;
+ sal_Int32 nCount = aValuesSequence.getLength();
+ for( sal_Int32 j = 0; j < nCount; ++j )
+ {
+ if( !::rtl::math::isNan( aValuesSequence[j] ) )
+ {
+ bHasValue=true;
+ break;
+ }
+ }
+ if(!bHasValue)
+ {
+ //no double value is countained
+ //is there any text?
+ uno::Sequence< rtl::OUString > aStrings( lcl_DataSequenceToStringSequence( xSeq ) );
+ sal_Int32 nTextCount = aStrings.getLength();
+ for( sal_Int32 j = 0; j < nTextCount; ++j )
+ {
+ if( aStrings[j].getLength() )
+ {
+ bHasText=true;
+ break;
+ }
+ }
+ }
+ if( !bHasValue && bHasText )
+ {
+ for( sal_Int32 j = 0; j < nCount; ++j )
+ aValuesSequence[j] = j+1;
+ }
+ }
+ }
+
+ ::std::copy( aValuesSequence.getConstArray(), aValuesSequence.getConstArray() + aValuesSequence.getLength(),
+ ::std::back_inserter( aResult ));
return aResult;
}
@@ -800,15 +849,20 @@ lcl_TableData lcl_getDataForLocalTable(
Sequence< OUString > aSimpleCategories;
if( xAnyDescriptionAccess.is() )
{
+ //categories
if( bSeriesFromColumns )
+ {
aSimpleCategories = xAnyDescriptionAccess->getRowDescriptions();
+ aResult.aComplexRowDescriptions = xAnyDescriptionAccess->getAnyRowDescriptions();
+ }
else
+ {
aSimpleCategories = xAnyDescriptionAccess->getColumnDescriptions();
-
- aResult.aComplexColumnDescriptions = xAnyDescriptionAccess->getAnyColumnDescriptions();
- aResult.aComplexRowDescriptions = xAnyDescriptionAccess->getAnyRowDescriptions();
+ aResult.aComplexColumnDescriptions = xAnyDescriptionAccess->getAnyColumnDescriptions();
+ }
}
+ //series values and series labels
SchXMLExportHelper_Impl::tDataSequenceCont::size_type nNumSequences = aSequencesToExport.size();
SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aBegin( aSequencesToExport.begin());
SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aEnd( aSequencesToExport.end());
@@ -853,19 +907,25 @@ lcl_TableData lcl_getDataForLocalTable(
// iterate over all sequences
size_t nSeqIdx = 0;
+ Sequence< Sequence< OUString > > aComplexLabels(nNumSequences);
for( ; aIt != aEnd; ++aIt, ++nSeqIdx )
{
OUString aRange;
+ Sequence< OUString >& rCurrentComplexLabel = aComplexLabels[nSeqIdx];
if( aIt->first.is())
{
- rLabels[nSeqIdx] = lcl_getLabelString( aIt->first );
+ lcl_getLabelStringSequence( rCurrentComplexLabel, aIt->first );
+ rLabels[nSeqIdx] = lcl_flattenStringSequence( rCurrentComplexLabel );
aRange = aIt->first->getSourceRangeRepresentation();
if( xRangeConversion.is())
aRange = xRangeConversion->convertRangeToXML( aRange );
}
else if( aIt->second.is())
- rLabels[nSeqIdx] = lcl_flattenStringSequence(
+ {
+ rCurrentComplexLabel.realloc(1);
+ rLabels[nSeqIdx] = rCurrentComplexLabel[0] = lcl_flattenStringSequence(
aIt->second->generateLabel( chart2::data::LabelOrigin_SHORT_SIDE ));
+ }
if( bSeriesFromColumns )
aResult.aColumnDescriptions_Ranges.push_back( aRange );
else
@@ -893,6 +953,16 @@ lcl_TableData lcl_getDataForLocalTable(
if( !lcl_SequenceHasUnhiddenData(aIt->first) && !lcl_SequenceHasUnhiddenData(aIt->second) )
aResult.aHiddenColumns.push_back(nSeqIdx);
}
+ Sequence< Sequence< Any > >& rComplexAnyLabels = bSeriesFromColumns ? aResult.aComplexColumnDescriptions : aResult.aComplexRowDescriptions;//#i116544#
+ rComplexAnyLabels.realloc(aComplexLabels.getLength());
+ for( sal_Int32 nN=0; nN<aComplexLabels.getLength();nN++ )
+ {
+ Sequence< OUString >& rSource = aComplexLabels[nN];
+ Sequence< Any >& rTarget = rComplexAnyLabels[nN];
+ rTarget.realloc( rSource.getLength() );
+ for( sal_Int32 i=0; i<rSource.getLength(); i++ )
+ rTarget[i] = uno::makeAny( rSource[i] );
+ }
}
catch( uno::Exception & rEx )
{
@@ -1427,51 +1497,50 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >&
Reference< beans::XPropertySet > xProp( rChartDoc->getLegend(), uno::UNO_QUERY );
if( xProp.is())
{
- chart::ChartLegendPosition aLegendPos = chart::ChartLegendPosition_NONE;
+ // export legend anchor position
try
{
- Any aAny( xProp->getPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "Alignment" ))));
- aAny >>= aLegendPos;
+ Any aAny( xProp->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Alignment" ))));
+ if( SchXMLEnumConverter::getLegendPositionConverter().exportXML( msString, aAny, mrExport.GetMM100UnitConverter() ) )
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_LEGEND_POSITION, msString );
}
catch( beans::UnknownPropertyException & )
{
DBG_WARNING( "Property Align not found in ChartLegend" );
}
- switch( aLegendPos )
+ // export absolute legend position
+ Reference< drawing::XShape > xLegendShape( xProp, uno::UNO_QUERY );
+ addPosition( xLegendShape );
+
+ // export legend size
+ const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
+ if( xLegendShape.is() && nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 && nCurrentODFVersion == SvtSaveOptions::ODFVER_LATEST )//do not export legend-expansion to ODF 1.0 and export size only if extensions are enabled //#i28670# todo: change this dependent on fileformat evolution
{
- case chart::ChartLegendPosition_LEFT:
-// msString = GetXMLToken(XML_LEFT);
- // #i35421# change left->start (not clear why this was done)
- msString = GetXMLToken(XML_START);
- break;
- case chart::ChartLegendPosition_RIGHT:
-// msString = GetXMLToken(XML_RIGHT);
- // #i35421# change right->end (not clear why this was done)
- msString = GetXMLToken(XML_END);
- break;
- case chart::ChartLegendPosition_TOP:
- msString = GetXMLToken(XML_TOP);
- break;
- case chart::ChartLegendPosition_BOTTOM:
- msString = GetXMLToken(XML_BOTTOM);
- break;
- case chart::ChartLegendPosition_NONE:
- case chart::ChartLegendPosition_MAKE_FIXED_SIZE:
- // nothing
- break;
+ try
+ {
+ chart::ChartLegendExpansion nLegendExpansion = chart::ChartLegendExpansion_HIGH;
+ OUString aExpansionString;
+ Any aAny( xProp->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Expansion" ))));
+ bool bHasExpansion = (aAny >>= nLegendExpansion);
+ if( bHasExpansion && SchXMLEnumConverter::getLegendExpansionConverter().exportXML( aExpansionString, aAny, mrExport.GetMM100UnitConverter() ) )
+ {
+ mrExport.AddAttribute( XML_NAMESPACE_STYLE, XML_LEGEND_EXPANSION, aExpansionString );
+ if( nLegendExpansion == chart::ChartLegendExpansion_CUSTOM)
+ {
+ awt::Size aSize( xLegendShape->getSize() );
+ addSize( aSize, true );
+ rtl::OUStringBuffer aAspectRatioString;
+ SvXMLUnitConverter::convertDouble(aAspectRatioString, double(aSize.Width)/double(aSize.Height));
+ mrExport.AddAttribute( XML_NAMESPACE_STYLE, XML_LEGEND_EXPANSION_ASPECT_RATIO, aAspectRatioString.makeStringAndClear() );
+ }
+ }
+ }
+ catch( beans::UnknownPropertyException & )
+ {
+ DBG_WARNING( "Property Expansion not found in ChartLegend" );
+ }
}
-
- // export anchor position
- if( msString.getLength())
- mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_LEGEND_POSITION, msString );
-
- // export absolute position
- msString = OUString();
- Reference< drawing::XShape > xShape( xProp, uno::UNO_QUERY );
- if( xShape.is())
- addPosition( xShape );
}
// write style name
@@ -1767,7 +1836,7 @@ void SchXMLExportHelper_Impl::exportTable()
for( t2DNumberContainer::const_iterator aRowIt( aData.aDataInRows.begin())
; aRowIt != aData.aDataInRows.end()
- ; aRowIt++, nC++, aRowDescriptionsIter++ )
+ ; ++aRowIt, ++nC )
{
SvXMLElementExport aRow( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_ROW, sal_True, sal_True );
@@ -1805,8 +1874,10 @@ void SchXMLExportHelper_Impl::exportTable()
if( !bHasOwnData && aRowDescriptions_RangeIter != aRowDescriptions_RangeEnd )
{
// remind the original range to allow a correct re-association when copying via clipboard
- SchXMLTools::exportRangeToSomewhere( mrExport, *aRowDescriptions_RangeIter++ );
+ SchXMLTools::exportRangeToSomewhere( mrExport, *aRowDescriptions_RangeIter );
+ ++aRowDescriptions_RangeIter;
}
+ ++aRowDescriptionsIter;
}
}
@@ -3535,21 +3606,22 @@ void SchXMLExportHelper_Impl::addPosition( Reference< drawing::XShape > xShape )
addPosition( xShape->getPosition());
}
-void SchXMLExportHelper_Impl::addSize( const awt::Size & rSize )
+void SchXMLExportHelper_Impl::addSize( const awt::Size & rSize, bool bIsOOoNamespace)
{
mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rSize.Width );
msString = msStringBuffer.makeStringAndClear();
- mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_WIDTH, msString );
+ mrExport.AddAttribute( bIsOOoNamespace ? XML_NAMESPACE_CHART_EXT : XML_NAMESPACE_SVG , XML_WIDTH, msString );
+
- mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rSize.Height );
+ mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rSize.Height);
msString = msStringBuffer.makeStringAndClear();
- mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_HEIGHT, msString );
+ mrExport.AddAttribute( bIsOOoNamespace ? XML_NAMESPACE_CHART_EXT : XML_NAMESPACE_SVG, XML_HEIGHT, msString );
}
-void SchXMLExportHelper_Impl::addSize( Reference< drawing::XShape > xShape )
+void SchXMLExportHelper_Impl::addSize( Reference< drawing::XShape > xShape, bool bIsOOoNamespace )
{
if( xShape.is())
- addSize( xShape->getSize() );
+ addSize( xShape->getSize(), bIsOOoNamespace );
}
awt::Size SchXMLExportHelper_Impl::getPageSize( const Reference< chart2::XChartDocument > & xChartDoc ) const
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
index a033dcb60e7d..12bea7e50e1b 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -146,7 +146,6 @@ SchXMLImportHelper::SchXMLImportHelper() :
mpChartAttrTokenMap( 0 ),
mpPlotAreaAttrTokenMap( 0 ),
- mpLegendAttrTokenMap( 0 ),
mpAutoStyleAttrTokenMap( 0 ),
mpCellAttrTokenMap( 0 ),
mpSeriesAttrTokenMap( 0 ),
@@ -172,8 +171,6 @@ SchXMLImportHelper::~SchXMLImportHelper()
delete mpChartAttrTokenMap;
if( mpPlotAreaAttrTokenMap )
delete mpPlotAreaAttrTokenMap;
- if( mpLegendAttrTokenMap )
- delete mpLegendAttrTokenMap;
if( mpAutoStyleAttrTokenMap )
delete mpAutoStyleAttrTokenMap;
if( mpCellAttrTokenMap )
@@ -371,25 +368,6 @@ const SvXMLTokenMap& SchXMLImportHelper::GetPlotAreaAttrTokenMap()
return *mpPlotAreaAttrTokenMap;
}
-const SvXMLTokenMap& SchXMLImportHelper::GetLegendAttrTokenMap()
-{
- if( ! mpLegendAttrTokenMap )
- {
- static __FAR_DATA SvXMLTokenMapEntry aLegendAttrTokenMap[] =
-{
- { XML_NAMESPACE_CHART, XML_LEGEND_POSITION, XML_TOK_LEGEND_POSITION },
- { XML_NAMESPACE_SVG, XML_X, XML_TOK_LEGEND_X },
- { XML_NAMESPACE_SVG, XML_Y, XML_TOK_LEGEND_Y },
- { XML_NAMESPACE_CHART, XML_STYLE_NAME, XML_TOK_LEGEND_STYLE_NAME },
- XML_TOKEN_MAP_END
-};
-
- mpLegendAttrTokenMap = new SvXMLTokenMap( aLegendAttrTokenMap );
- } // if( ! mpLegendAttrTokenMap )
-
- return *mpLegendAttrTokenMap;
-}
-
const SvXMLTokenMap& SchXMLImportHelper::GetAutoStyleAttrTokenMap()
{
if( ! mpAutoStyleAttrTokenMap )
diff --git a/xmloff/source/chart/SchXMLLegendContext.cxx b/xmloff/source/chart/SchXMLLegendContext.cxx
new file mode 100755
index 000000000000..6220fdfca46a
--- /dev/null
+++ b/xmloff/source/chart/SchXMLLegendContext.cxx
@@ -0,0 +1,229 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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_xmloff.hxx"
+#include "SchXMLLegendContext.hxx"
+#include "SchXMLEnumConverter.hxx"
+
+#include <xmloff/xmlnmspe.hxx>
+#include <xmloff/xmlement.hxx>
+#include <xmloff/prstylei.hxx>
+#include <xmloff/nmspmap.hxx>
+#include <xmloff/xmluconv.hxx>
+
+#include <tools/debug.hxx>
+
+#include <com/sun/star/chart/ChartLegendPosition.hpp>
+#include <com/sun/star/chart/ChartLegendExpansion.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+
+using namespace ::xmloff::token;
+using namespace com::sun::star;
+
+using rtl::OUString;
+using com::sun::star::uno::Reference;
+
+//----------------------------------------
+
+namespace
+{
+
+enum LegendAttributeTokens
+{
+ XML_TOK_LEGEND_POSITION,
+ XML_TOK_LEGEND_X,
+ XML_TOK_LEGEND_Y,
+ XML_TOK_LEGEND_STYLE_NAME,
+ XML_TOK_LEGEND_EXPANSION,
+ XML_TOK_LEGEND_EXPANSION_ASPECT_RATIO,
+ XML_TOK_LEGEND_WIDTH,
+ XML_TOK_LEGEND_WIDTH_EXT,
+ XML_TOK_LEGEND_HEIGHT,
+ XML_TOK_LEGEND_HEIGHT_EXT
+};
+
+SvXMLTokenMapEntry aLegendAttributeTokenMap[] =
+{
+ { XML_NAMESPACE_CHART, XML_LEGEND_POSITION, XML_TOK_LEGEND_POSITION },
+ { XML_NAMESPACE_SVG, XML_X, XML_TOK_LEGEND_X },
+ { XML_NAMESPACE_SVG, XML_Y, XML_TOK_LEGEND_Y },
+ { XML_NAMESPACE_CHART, XML_STYLE_NAME, XML_TOK_LEGEND_STYLE_NAME },
+ { XML_NAMESPACE_STYLE, XML_LEGEND_EXPANSION, XML_TOK_LEGEND_EXPANSION },
+ { XML_NAMESPACE_STYLE, XML_LEGEND_EXPANSION_ASPECT_RATIO, XML_TOK_LEGEND_EXPANSION_ASPECT_RATIO },
+ { XML_NAMESPACE_SVG, XML_WIDTH, XML_TOK_LEGEND_WIDTH },
+ { XML_NAMESPACE_CHART_EXT, XML_WIDTH, XML_TOK_LEGEND_WIDTH_EXT },
+ { XML_NAMESPACE_SVG, XML_HEIGHT, XML_TOK_LEGEND_HEIGHT },
+ { XML_NAMESPACE_CHART_EXT, XML_HEIGHT, XML_TOK_LEGEND_HEIGHT_EXT },
+ XML_TOKEN_MAP_END
+};
+
+class LegendAttributeTokenMap : public SvXMLTokenMap
+{
+public:
+ LegendAttributeTokenMap(): SvXMLTokenMap( aLegendAttributeTokenMap ) {}
+ virtual ~LegendAttributeTokenMap() {}
+};
+
+//a LegendAttributeTokenMap Singleton
+struct theLegendAttributeTokenMap : public rtl::Static< LegendAttributeTokenMap, theLegendAttributeTokenMap > {};
+
+}//end anonymous namespace
+
+//----------------------------------------
+
+SchXMLLegendContext::SchXMLLegendContext( SchXMLImportHelper& rImpHelper, SvXMLImport& rImport, const rtl::OUString& rLocalName ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_CHART, rLocalName ),
+ mrImportHelper( rImpHelper )
+{
+}
+
+void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ uno::Reference< chart::XChartDocument > xDoc = mrImportHelper.GetChartDocument();
+ if( !xDoc.is() )
+ return;
+
+ // turn on legend
+ uno::Reference< beans::XPropertySet > xDocProp( xDoc, uno::UNO_QUERY );
+ if( xDocProp.is() )
+ {
+ try
+ {
+ xDocProp->setPropertyValue( rtl::OUString::createFromAscii( "HasLegend" ), uno::makeAny( sal_True ) );
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_ERROR( "Property HasLegend not found" );
+ }
+ }
+
+ uno::Reference< drawing::XShape > xLegendShape( xDoc->getLegend(), uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xLegendProps( xLegendShape, uno::UNO_QUERY );
+ if( !xLegendShape.is() || !xLegendProps.is() )
+ {
+ DBG_ERROR( "legend could not be created" );
+ return;
+ }
+
+ // parse attributes
+ sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
+ const SvXMLTokenMap& rAttrTokenMap = theLegendAttributeTokenMap::get();
+
+ awt::Point aLegendPos;
+ bool bHasXPosition=false;
+ bool bHasYPosition=false;
+ awt::Size aLegendSize;
+ bool bHasWidth=false;
+ bool bHasHeight=false;
+ chart::ChartLegendExpansion nLegendExpansion = chart::ChartLegendExpansion_HIGH;
+ bool bHasExpansion=false;
+
+ rtl::OUString sAutoStyleName;
+ uno::Any aAny;
+
+ for( sal_Int16 i = 0; i < nAttrCount; i++ )
+ {
+ rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
+ rtl::OUString aLocalName;
+ rtl::OUString aValue = xAttrList->getValueByIndex( i );
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+
+ switch( rAttrTokenMap.Get( nPrefix, aLocalName ))
+ {
+ case XML_TOK_LEGEND_POSITION:
+ {
+ try
+ {
+ if( SchXMLEnumConverter::getLegendPositionConverter().importXML( aValue, aAny, GetImport().GetMM100UnitConverter() ) )
+ xLegendProps->setPropertyValue( rtl::OUString::createFromAscii( "Alignment" ), aAny );
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_ERROR( "Property Alignment (legend) not found" );
+ }
+ }
+ break;
+
+ case XML_TOK_LEGEND_X:
+ GetImport().GetMM100UnitConverter().convertMeasure( aLegendPos.X, aValue );
+ bHasXPosition = true;
+ break;
+ case XML_TOK_LEGEND_Y:
+ GetImport().GetMM100UnitConverter().convertMeasure( aLegendPos.Y, aValue );
+ bHasYPosition = true;
+ break;
+ case XML_TOK_LEGEND_STYLE_NAME:
+ sAutoStyleName = aValue;
+ break;
+ case XML_TOK_LEGEND_EXPANSION:
+ SchXMLEnumConverter::getLegendPositionConverter().importXML( aValue, aAny, GetImport().GetMM100UnitConverter() );
+ bHasExpansion = (aAny>>=nLegendExpansion);
+ break;
+ case XML_TOK_LEGEND_EXPANSION_ASPECT_RATIO:
+ break;
+ case XML_TOK_LEGEND_WIDTH:
+ case XML_TOK_LEGEND_WIDTH_EXT:
+ GetImport().GetMM100UnitConverter().convertMeasure( aLegendSize.Width, aValue );
+ bHasWidth = true;
+ break;
+ case XML_TOK_LEGEND_HEIGHT:
+ case XML_TOK_LEGEND_HEIGHT_EXT:
+ GetImport().GetMM100UnitConverter().convertMeasure( aLegendSize.Height, aValue );
+ bHasHeight = true;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if( bHasXPosition && bHasYPosition )
+ xLegendShape->setPosition( aLegendPos );
+
+ if( bHasExpansion && nLegendExpansion!= chart::ChartLegendExpansion_CUSTOM )
+ xLegendProps->setPropertyValue( rtl::OUString::createFromAscii( "Expansion" ), uno::makeAny(nLegendExpansion) );
+ else if( bHasHeight && bHasWidth )
+ xLegendShape->setSize( aLegendSize );
+
+ // the fill style has the default "none" in XML, but "solid" in the model.
+ xLegendProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" )), uno::makeAny( drawing::FillStyle_NONE ));
+
+ // set auto-styles for Legend
+ const SvXMLStylesContext* pStylesCtxt = mrImportHelper.GetAutoStylesContext();
+ if( pStylesCtxt )
+ {
+ const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(
+ mrImportHelper.GetChartFamilyID(), sAutoStyleName );
+
+ if( pStyle && pStyle->ISA( XMLPropStyleContext ))
+ (( XMLPropStyleContext* )pStyle )->FillPropertySet( xLegendProps );
+ }
+}
+
+SchXMLLegendContext::~SchXMLLegendContext()
+{
+}
diff --git a/xmloff/source/chart/SchXMLLegendContext.hxx b/xmloff/source/chart/SchXMLLegendContext.hxx
new file mode 100755
index 000000000000..1841b0cef24b
--- /dev/null
+++ b/xmloff/source/chart/SchXMLLegendContext.hxx
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SCH_XMLLEGENDCONTEXT_HXX_
+#define _SCH_XMLLEGENDCONTEXT_HXX_
+
+#include "SchXMLImport.hxx"
+
+// ----------------------------------------
+
+class SchXMLLegendContext : public SvXMLImportContext
+{
+public:
+ SchXMLLegendContext( SchXMLImportHelper& rImpHelper, SvXMLImport& rImport, const rtl::OUString& rLocalName );
+ virtual ~SchXMLLegendContext();
+
+ virtual void StartElement( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+private:
+ SchXMLImportHelper& mrImportHelper;
+};
+
+#endif // _SCH_XMLLEGENDCONTEXT_HXX_
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index d106398a0fcd..f45f9a5e5f48 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -423,7 +423,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
// values
Reference< chart2::data::XDataSequence > xSeq;
- if( bHasRange )
+ if( bHasRange && m_aSeriesRange.getLength() )
xSeq = SchXMLTools::CreateDataSequence( m_aSeriesRange, mxNewDoc );
Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY );
@@ -442,7 +442,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
tSchXMLIndexWithPart( m_rGlobalSeriesImportInfo.nCurrentDataIndex, SCH_XML_PART_VALUES ), xLabeledSeq ));
// label
- if( bHasLabelRange )
+ if( bHasLabelRange && m_aSeriesLabelRange.getLength() )
{
Reference< chart2::data::XDataSequence > xLabelSequence =
SchXMLTools::CreateDataSequence( m_aSeriesLabelRange, mxNewDoc );
@@ -581,6 +581,11 @@ void SchXMLSeries2Context::EndElement()
aDomainInfos.push_back( aDomainInfo );
m_rGlobalSeriesImportInfo.nCurrentDataIndex++;
}
+ else if( m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress.getLength() )
+ {
+ DomainInfo aDomainInfo( OUString::createFromAscii("values-y"), m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress, m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex ) ;
+ aDomainInfos.push_back( aDomainInfo );
+ }
}
if( bDeleteSeries )
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index a0be5f4ec6a8..2aed07dca617 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -419,7 +419,7 @@ Reference< chart2::data::XDataSequence > CreateDataSequence(
DBG_ERROR( "could not create data sequence" );
}
- if( !xRet.is() && !xChartDoc->hasInternalDataProvider() )
+ if( !xRet.is() && !xChartDoc->hasInternalDataProvider() && rRange.getLength() )
{
//#i103911# switch to internal data in case the parent cannot provide the requested data
xChartDoc->createInternalDataProvider( sal_True /* bCloneExistingData */ );
diff --git a/xmloff/source/chart/makefile.mk b/xmloff/source/chart/makefile.mk
index 2f61a3d6f0e5..3151d633d13f 100644
--- a/xmloff/source/chart/makefile.mk
+++ b/xmloff/source/chart/makefile.mk
@@ -45,12 +45,14 @@ SLOFILES = $(SLO)$/ColorPropertySet.obj \
$(SLO)$/contexts.obj \
$(SLO)$/SchXMLTableContext.obj \
$(SLO)$/SchXMLChartContext.obj \
+ $(SLO)$/SchXMLLegendContext.obj \
$(SLO)$/SchXMLPlotAreaContext.obj \
$(SLO)$/SchXMLAxisContext.obj \
$(SLO)$/SchXMLParagraphContext.obj \
$(SLO)$/SchXMLTextListContext.obj \
$(SLO)$/SchXMLSeriesHelper.obj \
$(SLO)$/SchXMLSeries2Context.obj \
+ $(SLO)$/SchXMLEnumConverter.obj \
$(SLO)$/PropertyMaps.obj \
$(SLO)$/XMLChartStyleContext.obj \
$(SLO)$/XMLErrorIndicatorPropertyHdl.obj \
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 50e0447d4a9d..32b4d322bba2 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -117,8 +117,8 @@ sal_Char __READONLY_DATA sXML_1_2[] = "1.2";
const sal_Char *sOpenOfficeOrgProject ="OpenOffice.org_project";
-const sal_Char s_grddl_xsl[] =
- "http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl";
+// #i115030#: the XSLT is not finished, and not available via HTTP
+const sal_Char s_grddl_xsl[] = "http://FIXME";
#define LOGFILE_AUTHOR "mb93740"
@@ -1315,7 +1315,7 @@ void SvXMLExport::SetBodyAttributes()
}
static void
-lcl_AddGrddl(SvXMLExport & rExport, const sal_Int32 nExportMode)
+lcl_AddGrddl(SvXMLExport & rExport, const sal_Int32 /*nExportMode*/)
{
// check version >= 1.2
switch (rExport.getDefaultVersion()) {
@@ -1324,11 +1324,14 @@ lcl_AddGrddl(SvXMLExport & rExport, const sal_Int32 nExportMode)
default: break;
}
+ // #i115030#: disabled
+#if 0
if (EXPORT_SETTINGS != nExportMode) // meta, content, styles
{
rExport.AddAttribute( XML_NAMESPACE_GRDDL, XML_TRANSFORMATION,
OUString::createFromAscii(s_grddl_xsl) );
}
+#endif
}
sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass )
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 824d28a51a5c..ec0039f16771 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -3113,6 +3113,12 @@ namespace xmloff { namespace token {
TOKEN( "outside-minimum", XML_OUTSIDE_MINIMUM ),
TOKEN( "outside-maximum", XML_OUTSIDE_MAXIMUM ),
+ TOKEN( "legend-expansion", XML_LEGEND_EXPANSION),
+ TOKEN( "legend-expansion-aspect-ratio", XML_LEGEND_EXPANSION_ASPECT_RATIO),
+ TOKEN( "balanced", XML_BALANCED),
+ TOKEN( "high", XML_HIGH),
+ TOKEN( "wide", XML_WIDE),
+
TOKEN( "axis-type", XML_AXIS_TYPE ), //#i25706#
TOKEN( "date-scale", XML_DATE_SCALE ),
TOKEN( "base-time-unit", XML_BASE_TIME_UNIT ),
@@ -3124,6 +3130,8 @@ namespace xmloff { namespace token {
TOKEN( "min-value", XML_MIN_VALUE ),
TOKEN( "max-value", XML_MAX_VALUE ),
+ TOKEN( "margin", XML_MARGIN),
+
#if OSL_DEBUG_LEVEL > 0
{ 0, NULL, NULL, XML_TOKEN_END }
#else
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index 578b3eefc719..7b69609fafe9 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -30,15 +30,11 @@
#include <tools/string.hxx>
-#ifndef _XMLOFF_XMLMETAI_HXX
#include <xmloff/xmlscripti.hxx>
-#endif
#include "sdxmlimp_impl.hxx"
#include "ximpbody.hxx"
-#ifndef _SFX_XMLMETAI_HXX
#include <xmloff/xmlmetai.hxx>
-#endif
#include "ximpstyl.hxx"
#include "xmloff/xmlnmspe.hxx"
#include <xmloff/xmltoken.hxx>
@@ -447,6 +443,17 @@ void SAL_CALL SdXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen
if( xInfoSetInfo->hasPropertyByName( msPreview ) )
xInfoSet->getPropertyValue( msPreview ) >>= mbPreview;
+
+ ::rtl::OUString const sOrganizerMode(
+ RTL_CONSTASCII_USTRINGPARAM("OrganizerMode"));
+ if (xInfoSetInfo->hasPropertyByName(sOrganizerMode))
+ {
+ sal_Bool bStyleOnly(sal_False);
+ if (xInfoSet->getPropertyValue(sOrganizerMode) >>= bStyleOnly)
+ {
+ mbLoadDoc = !bStyleOnly;
+ }
+ }
}
}
@@ -765,7 +772,7 @@ SvXMLImportContext *SdXMLImport::CreateMetaContext(const OUString& rLocalName,
{
SvXMLImportContext* pContext = 0L;
- if (!IsStylesOnlyMode() && (getImportFlags() & IMPORT_META))
+ if (getImportFlags() & IMPORT_META)
{
uno::Reference<xml::sax::XDocumentHandler> xDocBuilder(
mxServiceFactory->createInstance(::rtl::OUString::createFromAscii(
@@ -773,9 +780,11 @@ SvXMLImportContext *SdXMLImport::CreateMetaContext(const OUString& rLocalName,
uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
GetModel(), uno::UNO_QUERY_THROW);
+ uno::Reference<document::XDocumentProperties> const xDocProps(
+ (IsStylesOnlyMode()) ? 0 : xDPS->getDocumentProperties());
pContext = new SvXMLMetaDocumentContext(*this,
XML_NAMESPACE_OFFICE, rLocalName,
- xDPS->getDocumentProperties(), xDocBuilder);
+ xDocProps, xDocBuilder);
}
if(!pContext)
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index aebd513995e3..a8f09f2d99bd 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -711,7 +711,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
if( xSet.is() && ( mrExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) )
{
if( aShapeInfo.meShapeType != XmlShapeTypeDrawPageShape && aShapeInfo.meShapeType != XmlShapeTypePresPageShape &&
- aShapeInfo.meShapeType != XmlShapeTypeHandoutShape )
+ aShapeInfo.meShapeType != XmlShapeTypeHandoutShape && aShapeInfo.meShapeType != XmlShapeTypeDrawChartShape )
try
{
diff --git a/xmloff/source/forms/handler/property_handler_base.cxx b/xmloff/source/forms/handler/property_handler_base.cxx
index d599e0e259fe..d599e0e259fe 100644..100755
--- a/xmloff/source/forms/handler/property_handler_base.cxx
+++ b/xmloff/source/forms/handler/property_handler_base.cxx
diff --git a/xmloff/source/forms/handler/vcl_date_handler.cxx b/xmloff/source/forms/handler/vcl_date_handler.cxx
index a8404ed04e05..a8404ed04e05 100644..100755
--- a/xmloff/source/forms/handler/vcl_date_handler.cxx
+++ b/xmloff/source/forms/handler/vcl_date_handler.cxx
diff --git a/xmloff/source/forms/handler/vcl_date_handler.hxx b/xmloff/source/forms/handler/vcl_date_handler.hxx
index 44a7f7395ceb..44a7f7395ceb 100644..100755
--- a/xmloff/source/forms/handler/vcl_date_handler.hxx
+++ b/xmloff/source/forms/handler/vcl_date_handler.hxx
diff --git a/xmloff/source/forms/handler/vcl_time_handler.cxx b/xmloff/source/forms/handler/vcl_time_handler.cxx
index 98ea739d04a4..98ea739d04a4 100644..100755
--- a/xmloff/source/forms/handler/vcl_time_handler.cxx
+++ b/xmloff/source/forms/handler/vcl_time_handler.cxx
diff --git a/xmloff/source/forms/handler/vcl_time_handler.hxx b/xmloff/source/forms/handler/vcl_time_handler.hxx
index 7ed6f0aa5730..7ed6f0aa5730 100644..100755
--- a/xmloff/source/forms/handler/vcl_time_handler.hxx
+++ b/xmloff/source/forms/handler/vcl_time_handler.hxx
diff --git a/xmloff/source/forms/property_group.hxx b/xmloff/source/forms/property_group.hxx
index bca354f14e92..bca354f14e92 100644..100755
--- a/xmloff/source/forms/property_group.hxx
+++ b/xmloff/source/forms/property_group.hxx
diff --git a/xmloff/source/forms/property_meta_data.hxx b/xmloff/source/forms/property_meta_data.hxx
index f246a7bfd745..f246a7bfd745 100644..100755
--- a/xmloff/source/forms/property_meta_data.hxx
+++ b/xmloff/source/forms/property_meta_data.hxx
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index e2ba207e5cd6..9f5aebece935 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/xml/dom/XSAXDocumentBuilder.hpp>
+#include <com/sun/star/xml/xpath/XXPathAPI.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
@@ -124,6 +125,71 @@ void XMLDocumentBuilderContext::EndElement()
//===========================================================================
+static void
+lcl_initDocumentProperties(SvXMLImport & rImport,
+ uno::Reference<xml::sax::XDocumentHandler> const& xDocBuilder,
+ uno::Reference<document::XDocumentProperties> const& xDocProps)
+{
+ uno::Sequence< uno::Any > aSeq(1);
+ uno::Reference< xml::dom::XSAXDocumentBuilder > const xDB(xDocBuilder,
+ uno::UNO_QUERY_THROW);
+ aSeq[0] <<= xDB->getDocument();
+ uno::Reference< lang::XInitialization > const xInit(xDocProps,
+ uno::UNO_QUERY_THROW);
+ try {
+ xInit->initialize(aSeq);
+ rImport.SetStatistics(xDocProps->getDocumentStatistics());
+ // convert all URLs from relative to absolute
+ xDocProps->setTemplateURL(rImport.GetAbsoluteReference(
+ xDocProps->getTemplateURL()));
+ xDocProps->setAutoloadURL(rImport.GetAbsoluteReference(
+ xDocProps->getAutoloadURL()));
+ SvXMLMetaDocumentContext::setBuildId(
+ xDocProps->getGenerator(), rImport.getImportInfo());
+ } catch (uno::RuntimeException) {
+ throw;
+ } catch (uno::Exception & e) {
+ throw lang::WrappedTargetRuntimeException(
+ ::rtl::OUString::createFromAscii(
+ "SvXMLMetaDocumentContext::initDocumentProperties: "
+ "properties init exception"),
+ rImport, makeAny(e));
+ }
+}
+
+static void
+lcl_initGenerator(SvXMLImport & rImport,
+ uno::Reference<xml::sax::XDocumentHandler> const& xDocBuilder)
+{
+ uno::Reference< xml::dom::XSAXDocumentBuilder > const xDB(xDocBuilder,
+ uno::UNO_QUERY_THROW);
+ uno::Reference< xml::dom::XDocument > const xDoc(xDB->getDocument(),
+ uno::UNO_SET_THROW);
+ try {
+ uno::Reference< xml::xpath::XXPathAPI > const xPath(
+ rImport.getServiceFactory()->createInstance(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.xml.xpath.XPathAPI"))),
+ uno::UNO_QUERY_THROW );
+ xPath->registerNS(GetXMLToken(XML_NP_OFFICE),GetXMLToken(XML_N_OFFICE));
+ xPath->registerNS(GetXMLToken(XML_NP_META), GetXMLToken(XML_N_META));
+
+ ::rtl::OUString const expr(RTL_CONSTASCII_USTRINGPARAM(
+ "string(/office:document-meta/office:meta/meta:generator)"));
+ uno::Reference< xml::xpath::XXPathObject > const xObj(
+ xPath->eval(xDoc.get(), expr), uno::UNO_SET_THROW);
+ OUString const value(xObj->getString());
+ SvXMLMetaDocumentContext::setBuildId(value, rImport.getImportInfo());
+ } catch (uno::RuntimeException) {
+ throw;
+ } catch (uno::Exception & e) {
+ throw lang::WrappedTargetRuntimeException(
+ ::rtl::OUString::createFromAscii(
+ "SvXMLMetaDocumentContext::initGenerator: exception"),
+ rImport, makeAny(e));
+ }
+}
+
SvXMLMetaDocumentContext::SvXMLMetaDocumentContext(SvXMLImport& rImport,
sal_uInt16 nPrfx, const rtl::OUString& rLName,
const uno::Reference<document::XDocumentProperties>& xDocProps,
@@ -132,8 +198,9 @@ SvXMLMetaDocumentContext::SvXMLMetaDocumentContext(SvXMLImport& rImport,
mxDocProps(xDocProps),
mxDocBuilder(xDocBuilder)
{
- DBG_ASSERT(xDocProps.is(), "SvXMLMetaDocumentContext: no document props");
- DBG_ASSERT(xDocBuilder.is(), "SvXMLMetaDocumentContext: no document hdlr");
+// #i103539#: must always read meta.xml for generator, xDocProps unwanted then
+// OSL_ENSURE(xDocProps.is(), "SvXMLMetaDocumentContext: no document props");
+ OSL_ENSURE(xDocBuilder.is(), "SvXMLMetaDocumentContext: no document hdlr");
// here are no attributes
}
@@ -166,6 +233,7 @@ void SvXMLMetaDocumentContext::StartElement(
mxDocBuilder->startElement(
GetImport().GetNamespaceMap().GetQNameByKey(GetPrefix(),
GetXMLToken(XML_DOCUMENT_META)), xAttrList);
+
}
void SvXMLMetaDocumentContext::EndElement()
@@ -175,43 +243,16 @@ void SvXMLMetaDocumentContext::EndElement()
GetImport().GetNamespaceMap().GetQNameByKey(GetPrefix(),
GetXMLToken(XML_DOCUMENT_META)));
mxDocBuilder->endDocument();
- initDocumentProperties();
-}
-
-void SvXMLMetaDocumentContext::initDocumentProperties()
-{
- uno::Sequence< uno::Any > aSeq(1);
- uno::Reference< xml::dom::XSAXDocumentBuilder > xDB (mxDocBuilder,
- uno::UNO_QUERY_THROW);
- aSeq[0] <<= xDB->getDocument();
- uno::Reference< lang::XInitialization > xInit(mxDocProps,
- uno::UNO_QUERY_THROW);
- try {
- xInit->initialize(aSeq);
- GetImport().SetStatistics(mxDocProps->getDocumentStatistics());
- // convert all URLs from relative to absolute
- mxDocProps->setTemplateURL(GetImport().GetAbsoluteReference(
- mxDocProps->getTemplateURL()));
- mxDocProps->setAutoloadURL(GetImport().GetAbsoluteReference(
- mxDocProps->getAutoloadURL()));
- setBuildId(mxDocProps->getGenerator());
- } catch (uno::RuntimeException) {
- throw;
- } catch (uno::Exception & e) {
- throw lang::WrappedTargetRuntimeException(
- ::rtl::OUString::createFromAscii(
- "SvXMLMetaDocumentContext::initDocumentProperties: "
- "properties init exception"),
- GetImport(), makeAny(e));
+ if (mxDocProps.is())
+ {
+ lcl_initDocumentProperties(GetImport(), mxDocBuilder, mxDocProps);
+ }
+ else
+ {
+ lcl_initGenerator(GetImport(), mxDocBuilder);
}
}
-void SvXMLMetaDocumentContext::setBuildId(const ::rtl::OUString & i_rBuildId)
-{
- SvXMLMetaDocumentContext::setBuildId( i_rBuildId, GetImport().getImportInfo() );
-}
-
-//static
void SvXMLMetaDocumentContext::setBuildId(::rtl::OUString const& i_rBuildId, const uno::Reference<beans::XPropertySet>& xImportInfo )
{
OUString sBuildId;
diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx
index fe14231e51c4..d803b79b50a1 100644
--- a/xmloff/source/style/PageMasterExportPropMapper.cxx
+++ b/xmloff/source/style/PageMasterExportPropMapper.cxx
@@ -31,9 +31,7 @@
#include <xmloff/xmltoken.hxx>
#include <comphelper/types.hxx>
#include <com/sun/star/table/BorderLine.hpp>
-#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX
#include <xmloff/PageMasterStyleMap.hxx>
-#endif
#include <tools/debug.hxx>
#include <rtl/ustrbuf.hxx>
#include <comphelper/extract.hxx>
@@ -84,6 +82,12 @@ void lcl_AddState(::std::vector< XMLPropertyState >& rPropState, sal_Int32 nInde
struct XMLPropertyStateBuffer
{
+ XMLPropertyState* pPMMarginAll;
+ XMLPropertyState* pPMMarginTop;
+ XMLPropertyState* pPMMarginBottom;
+ XMLPropertyState* pPMMarginLeft;
+ XMLPropertyState* pPMMarginRight;
+
XMLPropertyState* pPMBorderAll;
XMLPropertyState* pPMBorderTop;
XMLPropertyState* pPMBorderBottom;
@@ -106,7 +110,13 @@ struct XMLPropertyStateBuffer
void ContextFilter( ::std::vector< XMLPropertyState >& rPropState );
};
-XMLPropertyStateBuffer::XMLPropertyStateBuffer() :
+XMLPropertyStateBuffer::XMLPropertyStateBuffer()
+ : pPMMarginAll( NULL )
+ , pPMMarginTop( NULL )
+ , pPMMarginBottom( NULL )
+ , pPMMarginLeft( NULL )
+ , pPMMarginRight( NULL )
+ ,
pPMBorderAll( NULL ),
pPMBorderTop( NULL ),
pPMBorderBottom( NULL ),
@@ -129,6 +139,31 @@ XMLPropertyStateBuffer::XMLPropertyStateBuffer() :
void XMLPropertyStateBuffer::ContextFilter( ::std::vector< XMLPropertyState >& )
{
+ if (pPMMarginAll)
+ {
+ if (pPMMarginTop && pPMMarginBottom && pPMMarginLeft && pPMMarginRight)
+ {
+ sal_Int32 nTop = 0, nBottom = 0, nLeft = 0, nRight = 0;
+
+ pPMMarginTop->maValue >>= nTop;
+ pPMMarginBottom->maValue >>= nBottom;
+ pPMMarginLeft->maValue >>= nLeft;
+ pPMMarginRight->maValue >>= nRight;
+
+ if ((nTop == nBottom) && (nBottom == nLeft) && (nLeft == nRight))
+ {
+ lcl_RemoveState( pPMMarginTop );
+ lcl_RemoveState( pPMMarginBottom );
+ lcl_RemoveState( pPMMarginLeft );
+ lcl_RemoveState( pPMMarginRight );
+ }
+ else
+ lcl_RemoveState( pPMMarginAll );
+ }
+ else
+ lcl_RemoveState( pPMMarginAll );
+ }
+
if( pPMBorderAll )
{
if( pPMBorderTop && pPMBorderBottom && pPMBorderLeft && pPMBorderRight )
@@ -348,6 +383,11 @@ void XMLPageMasterExportPropMapper::ContextFilter(
switch( nSimpleId )
{
+ case CTF_PM_MARGINALL: pBuffer->pPMMarginAll = pProp; break;
+ case CTF_PM_MARGINTOP: pBuffer->pPMMarginTop = pProp; break;
+ case CTF_PM_MARGINBOTTOM: pBuffer->pPMMarginBottom = pProp; break;
+ case CTF_PM_MARGINLEFT: pBuffer->pPMMarginLeft = pProp; break;
+ case CTF_PM_MARGINRIGHT: pBuffer->pPMMarginRight = pProp; break;
case CTF_PM_BORDERALL: pBuffer->pPMBorderAll = pProp; break;
case CTF_PM_BORDERTOP: pBuffer->pPMBorderTop = pProp; break;
case CTF_PM_BORDERBOTTOM: pBuffer->pPMBorderBottom = pProp; break;
diff --git a/xmloff/source/style/PageMasterImportPropMapper.cxx b/xmloff/source/style/PageMasterImportPropMapper.cxx
index 59cff11d65cc..4af6e1ce16e1 100644
--- a/xmloff/source/style/PageMasterImportPropMapper.cxx
+++ b/xmloff/source/style/PageMasterImportPropMapper.cxx
@@ -28,14 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_xmloff.hxx"
-
#include "PageMasterImportPropMapper.hxx"
-#ifndef _XMLOFF_PAGEMASTERPROPMAPPER_HXX
#include "PageMasterPropMapper.hxx"
-#endif
-#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX
#include <xmloff/PageMasterStyleMap.hxx>
-#endif
#include <xmloff/maptype.hxx>
#include <com/sun/star/table/BorderLine.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
@@ -129,7 +124,15 @@ void PageMasterImportPropertyMapper::finished(::std::vector< XMLPropertyState >&
XMLPropertyState* pFooterHeight = NULL;
XMLPropertyState* pFooterMinHeight = NULL;
XMLPropertyState* pFooterDynamic = NULL;
- sal_uInt16 i; // for the "for" loop
+ XMLPropertyState* pAllMarginProperty = NULL;
+ XMLPropertyState* pMargins[4] = { NULL, NULL, NULL, NULL };
+ ::std::auto_ptr<XMLPropertyState> pNewMargins[4];
+ XMLPropertyState* pAllHeaderMarginProperty = NULL;
+ XMLPropertyState* pHeaderMargins[4] = { NULL, NULL, NULL, NULL };
+ ::std::auto_ptr<XMLPropertyState> pNewHeaderMargins[4];
+ XMLPropertyState* pAllFooterMarginProperty = NULL;
+ XMLPropertyState* pFooterMargins[4] = { NULL, NULL, NULL, NULL };
+ ::std::auto_ptr<XMLPropertyState> pNewFooterMargins[4];
::std::vector< XMLPropertyState >::iterator aEnd = rProperties.end();
for (::std::vector< XMLPropertyState >::iterator aIter = rProperties.begin(); aIter != aEnd; ++aIter)
@@ -189,12 +192,60 @@ void PageMasterImportPropertyMapper::finished(::std::vector< XMLPropertyState >&
case CTF_PM_HEADERMINHEIGHT : pHeaderMinHeight = property; break;
case CTF_PM_FOOTERHEIGHT : pFooterHeight = property; break;
case CTF_PM_FOOTERMINHEIGHT : pFooterMinHeight = property; break;
+ case CTF_PM_MARGINALL :
+ pAllMarginProperty = property; break;
+ case CTF_PM_MARGINTOP :
+ pMargins[XML_LINE_TOP] = property; break;
+ case CTF_PM_MARGINBOTTOM:
+ pMargins[XML_LINE_BOTTOM] = property; break;
+ case CTF_PM_MARGINLEFT :
+ pMargins[XML_LINE_LEFT] = property; break;
+ case CTF_PM_MARGINRIGHT :
+ pMargins[XML_LINE_RIGHT] = property; break;
+ case CTF_PM_HEADERMARGINALL :
+ pAllHeaderMarginProperty = property; break;
+ case CTF_PM_HEADERMARGINTOP :
+ pHeaderMargins[XML_LINE_TOP] = property; break;
+ case CTF_PM_HEADERMARGINBOTTOM:
+ pHeaderMargins[XML_LINE_BOTTOM] = property; break;
+ case CTF_PM_HEADERMARGINLEFT :
+ pHeaderMargins[XML_LINE_LEFT] = property; break;
+ case CTF_PM_HEADERMARGINRIGHT :
+ pHeaderMargins[XML_LINE_RIGHT] = property; break;
+ case CTF_PM_FOOTERMARGINALL :
+ pAllFooterMarginProperty = property; break;
+ case CTF_PM_FOOTERMARGINTOP :
+ pFooterMargins[XML_LINE_TOP] = property; break;
+ case CTF_PM_FOOTERMARGINBOTTOM:
+ pFooterMargins[XML_LINE_BOTTOM] = property; break;
+ case CTF_PM_FOOTERMARGINLEFT :
+ pFooterMargins[XML_LINE_LEFT] = property; break;
+ case CTF_PM_FOOTERMARGINRIGHT :
+ pFooterMargins[XML_LINE_RIGHT] = property; break;
}
}
}
- for ( i = 0; i < 4; i++)
+ for (sal_uInt16 i = 0; i < 4; i++)
{
+ if (pAllMarginProperty && !pMargins[i])
+ {
+ pNewMargins[i].reset(new XMLPropertyState(
+ pAllMarginProperty->mnIndex + 1 + i,
+ pAllMarginProperty->maValue));
+ }
+ if (pAllHeaderMarginProperty && !pHeaderMargins[i])
+ {
+ pNewHeaderMargins[i].reset(new XMLPropertyState(
+ pAllHeaderMarginProperty->mnIndex + 1 + i,
+ pAllHeaderMarginProperty->maValue));
+ }
+ if (pAllFooterMarginProperty && !pFooterMargins[i])
+ {
+ pNewFooterMargins[i].reset(new XMLPropertyState(
+ pAllFooterMarginProperty->mnIndex + 1 + i,
+ pAllFooterMarginProperty->maValue));
+ }
if (pAllPaddingProperty && !pPadding[i])
pNewPadding[i] = new XMLPropertyState(pAllPaddingProperty->mnIndex + 1 + i, pAllPaddingProperty->maValue);
if (pAllBorderProperty && !pBorders[i])
@@ -294,8 +345,20 @@ void PageMasterImportPropertyMapper::finished(::std::vector< XMLPropertyState >&
aAny.setValue( &bValue, ::getBooleanCppuType() );
pFooterDynamic = new XMLPropertyState(pFooterMinHeight->mnIndex + 1, aAny);
}
- for (i = 0; i < 4; i++)
+ for (sal_uInt16 i = 0; i < 4; i++)
{
+ if (pNewMargins[i].get())
+ {
+ rProperties.push_back(*pNewMargins[i]);
+ }
+ if (pNewHeaderMargins[i].get())
+ {
+ rProperties.push_back(*pNewHeaderMargins[i]);
+ }
+ if (pNewFooterMargins[i].get())
+ {
+ rProperties.push_back(*pNewFooterMargins[i]);
+ }
if (pNewPadding[i])
{
rProperties.push_back(*pNewPadding[i]);
diff --git a/xmloff/source/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx
index 6dbda70f5125..41d2172ab4fa 100644
--- a/xmloff/source/style/PageMasterStyleMap.cxx
+++ b/xmloff/source/style/PageMasterStyleMap.cxx
@@ -28,10 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_xmloff.hxx"
-#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX
#include <xmloff/PageMasterStyleMap.hxx>
-#endif
-#include "xmloff/xmlnmspe.hxx"
+
+#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmltoken.hxx>
using namespace ::xmloff::token;
@@ -54,10 +53,11 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
PLMAP( "NumberingType", XML_NAMESPACE_STYLE, XML_NUM_LETTER_SYNC, XML_PM_TYPE_NUMLETTERSYNC, 0 ),
PLMAP( "PrinterPaperTray", XML_NAMESPACE_STYLE, XML_PAPER_TRAY_NAME, XML_TYPE_STRING | MID_FLAG_PROPERTY_MAY_EXCEPT, 0 ),
PLMAP( "IsLandscape", XML_NAMESPACE_STYLE, XML_PRINT_ORIENTATION, XML_PM_TYPE_PRINTORIENTATION, 0 ),
- PLMAP( "TopMargin", XML_NAMESPACE_FO, XML_MARGIN_TOP, XML_TYPE_MEASURE, 0 ),
- PLMAP( "BottomMargin", XML_NAMESPACE_FO, XML_MARGIN_BOTTOM, XML_TYPE_MEASURE, 0 ),
- PLMAP( "LeftMargin", XML_NAMESPACE_FO, XML_MARGIN_LEFT, XML_TYPE_MEASURE, 0 ),
- PLMAP( "RightMargin", XML_NAMESPACE_FO, XML_MARGIN_RIGHT, XML_TYPE_MEASURE, 0 ),
+ PLMAP( "TopMargin", XML_NAMESPACE_FO, XML_MARGIN, XML_TYPE_MEASURE, CTF_PM_MARGINALL ),
+ PLMAP( "TopMargin", XML_NAMESPACE_FO, XML_MARGIN_TOP, XML_TYPE_MEASURE, CTF_PM_MARGINTOP ),
+ PLMAP( "BottomMargin", XML_NAMESPACE_FO, XML_MARGIN_BOTTOM, XML_TYPE_MEASURE, CTF_PM_MARGINBOTTOM ),
+ PLMAP( "LeftMargin", XML_NAMESPACE_FO, XML_MARGIN_LEFT, XML_TYPE_MEASURE, CTF_PM_MARGINLEFT ),
+ PLMAP( "RightMargin", XML_NAMESPACE_FO, XML_MARGIN_RIGHT, XML_TYPE_MEASURE, CTF_PM_MARGINRIGHT ),
PLMAP( "TopBorder", XML_NAMESPACE_FO, XML_BORDER, XML_TYPE_BORDER, CTF_PM_BORDERALL ),
PLMAP( "TopBorder", XML_NAMESPACE_FO, XML_BORDER_TOP, XML_TYPE_BORDER, CTF_PM_BORDERTOP ),
PLMAP( "BottomBorder", XML_NAMESPACE_FO, XML_BORDER_BOTTOM, XML_TYPE_BORDER, CTF_PM_BORDERBOTTOM ),
@@ -130,9 +130,10 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
HFMAP( "HeaderHeight", XML_NAMESPACE_SVG, XML_HEIGHT, XML_TYPE_MEASURE, CTF_PM_HEADERHEIGHT ),
HFMAP( "HeaderHeight", XML_NAMESPACE_FO, XML_MIN_HEIGHT, XML_TYPE_MEASURE, CTF_PM_HEADERMINHEIGHT ),
HFMAP( "HeaderIsDynamicHeight", XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_BOOL, CTF_PM_HEADERDYNAMIC ),
- HFMAP( "HeaderLeftMargin", XML_NAMESPACE_FO, XML_MARGIN_LEFT, XML_TYPE_MEASURE, CTF_PM_HEADERFLAG ),
- HFMAP( "HeaderRightMargin", XML_NAMESPACE_FO, XML_MARGIN_RIGHT, XML_TYPE_MEASURE, CTF_PM_HEADERFLAG ),
- HFMAP( "HeaderBodyDistance", XML_NAMESPACE_FO, XML_MARGIN_BOTTOM, XML_TYPE_MEASURE, CTF_PM_HEADERFLAG ),
+ HFMAP( "HeaderLeftMargin", XML_NAMESPACE_FO, XML_MARGIN, XML_TYPE_MEASURE, CTF_PM_HEADERMARGINALL ),
+ HFMAP( "HeaderLeftMargin", XML_NAMESPACE_FO, XML_MARGIN_LEFT, XML_TYPE_MEASURE, CTF_PM_HEADERMARGINLEFT ),
+ HFMAP( "HeaderRightMargin", XML_NAMESPACE_FO, XML_MARGIN_RIGHT, XML_TYPE_MEASURE, CTF_PM_HEADERMARGINRIGHT ),
+ HFMAP( "HeaderBodyDistance", XML_NAMESPACE_FO, XML_MARGIN_BOTTOM, XML_TYPE_MEASURE, CTF_PM_HEADERMARGINBOTTOM ),
HFMAP( "HeaderTopBorder", XML_NAMESPACE_FO, XML_BORDER, XML_TYPE_BORDER, CTF_PM_HEADERBORDERALL ),
HFMAP( "HeaderTopBorder", XML_NAMESPACE_FO, XML_BORDER_TOP, XML_TYPE_BORDER, CTF_PM_HEADERBORDERTOP ),
HFMAP( "HeaderBottomBorder", XML_NAMESPACE_FO, XML_BORDER_BOTTOM, XML_TYPE_BORDER, CTF_PM_HEADERBORDERBOTTOM ),
@@ -160,9 +161,10 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
HFMAP( "FooterHeight", XML_NAMESPACE_SVG, XML_HEIGHT, XML_TYPE_MEASURE, CTF_PM_FOOTERHEIGHT ),
HFMAP( "FooterHeight", XML_NAMESPACE_FO, XML_MIN_HEIGHT, XML_TYPE_MEASURE, CTF_PM_FOOTERMINHEIGHT ),
HFMAP( "FooterIsDynamicHeight", XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_BOOL, CTF_PM_FOOTERDYNAMIC ),
- HFMAP( "FooterLeftMargin", XML_NAMESPACE_FO, XML_MARGIN_LEFT, XML_TYPE_MEASURE, CTF_PM_FOOTERFLAG ),
- HFMAP( "FooterRightMargin", XML_NAMESPACE_FO, XML_MARGIN_RIGHT, XML_TYPE_MEASURE, CTF_PM_FOOTERFLAG ),
- HFMAP( "FooterBodyDistance", XML_NAMESPACE_FO, XML_MARGIN_TOP, XML_TYPE_MEASURE, CTF_PM_FOOTERFLAG ),
+ HFMAP( "FooterLeftMargin", XML_NAMESPACE_FO, XML_MARGIN, XML_TYPE_MEASURE, CTF_PM_FOOTERMARGINALL ),
+ HFMAP( "FooterLeftMargin", XML_NAMESPACE_FO, XML_MARGIN_LEFT, XML_TYPE_MEASURE, CTF_PM_FOOTERMARGINLEFT ),
+ HFMAP( "FooterRightMargin", XML_NAMESPACE_FO, XML_MARGIN_RIGHT, XML_TYPE_MEASURE, CTF_PM_FOOTERMARGINRIGHT ),
+ HFMAP( "FooterBodyDistance", XML_NAMESPACE_FO, XML_MARGIN_TOP, XML_TYPE_MEASURE, CTF_PM_FOOTERMARGINTOP ),
HFMAP( "FooterTopBorder", XML_NAMESPACE_FO, XML_BORDER, XML_TYPE_BORDER, CTF_PM_FOOTERBORDERALL ),
HFMAP( "FooterTopBorder", XML_NAMESPACE_FO, XML_BORDER_TOP, XML_TYPE_BORDER, CTF_PM_FOOTERBORDERTOP ),
HFMAP( "FooterBottomBorder", XML_NAMESPACE_FO, XML_BORDER_BOTTOM, XML_TYPE_BORDER, CTF_PM_FOOTERBORDERBOTTOM ),
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index d4e880f09b52..59849df1a20e 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -298,15 +298,25 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
sTmp.append( nLevel + 1 );
GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_LEVEL, sTmp.makeStringAndClear() );
// #i110694#: no style-name on list-level-style-image
- if ((sTextStyleName.getLength() > 0) && (NumberingType::BITMAP != eType))
+ // #i116149#: neither prefix/suffix
+ if (NumberingType::BITMAP != eType)
{
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
- GetExport().EncodeStyleName( sTextStyleName ) );
+ if (sTextStyleName.getLength() > 0)
+ {
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
+ GetExport().EncodeStyleName( sTextStyleName ) );
+ }
+ if (sPrefix.getLength() > 0)
+ {
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_PREFIX,
+ sPrefix );
+ }
+ if (sSuffix.getLength() > 0)
+ {
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_SUFFIX,
+ sSuffix );
+ }
}
- if( sPrefix.getLength() > 0 )
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_PREFIX, sPrefix );
- if( sSuffix.getLength() > 0 )
- GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_SUFFIX, sSuffix );
enum XMLTokenEnum eElem = XML_LIST_LEVEL_STYLE_NUMBER;
if( NumberingType::CHAR_SPECIAL == eType )
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index 0d45fdc289d0..1417f239082a 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -501,6 +501,22 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
nCount++;
}
+ if (bBullet && sSuffix.getLength())
+ {
+ sal_uInt16 const nVersion(GetImport().getGeneratorVersion());
+ sal_Int32 nUPD;
+ sal_Int32 nBuildId;
+ if (GetImport().getBuildIds(nUPD, nBuildId)
+ && ( (SvXMLImport::OOo_1x == nVersion)
+ || (SvXMLImport::OOo_2x == nVersion)
+ || (310 == nUPD) || (320 == nUPD) || (330 == nUPD)
+ || ((300 == nUPD) && (nBuildId <= 9573))))
+ {
+ // #i93908# OOo < 3.4 wrote a bogus suffix for bullet chars
+ sSuffix = ::rtl::OUString(); // clear it
+ }
+ }
+
Sequence<beans::PropertyValue> aPropSeq( nCount );
if( nCount > 0 )
{
diff --git a/xmloff/source/text/XMLAutoTextEventExport.cxx b/xmloff/source/text/XMLAutoTextEventExport.cxx
index dcef23ba5734..eab3c77efc7f 100644
--- a/xmloff/source/text/XMLAutoTextEventExport.cxx
+++ b/xmloff/source/text/XMLAutoTextEventExport.cxx
@@ -221,6 +221,9 @@ void XMLAutoTextEventExport::addNamespaces()
GetAttrList().AddAttribute(
GetNamespaceMap().GetAttrNameByIndex( XML_NAMESPACE_OOO ),
GetNamespaceMap().GetNameByIndex( XML_NAMESPACE_OOO ) );
+ GetAttrList().AddAttribute(
+ GetNamespaceMap().GetAttrNameByIndex( XML_NAMESPACE_XLINK ),
+ GetNamespaceMap().GetNameByIndex( XML_NAMESPACE_XLINK ) );
}
void XMLAutoTextEventExport::exportEvents()
diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx
index 7b3c7e828683..6bca8e8f4e20 100644
--- a/xmloff/source/text/txtexppr.cxx
+++ b/xmloff/source/text/txtexppr.cxx
@@ -27,8 +27,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_xmloff.hxx"
-#include <tools/debug.hxx>
-#include <xmloff/txtprmap.hxx>
+
+#include "txtexppr.hxx"
+
#include <com/sun/star/table/BorderLine.hpp>
#include <com/sun/star/text/SizeType.hpp>
#include <com/sun/star/text/WrapTextMode.hpp>
@@ -37,7 +38,10 @@
#include <com/sun/star/awt/FontPitch.hpp>
#include <com/sun/star/awt/FontUnderline.hpp>
#include <com/sun/star/text/XChapterNumberingSupplier.hpp>
-#include "txtexppr.hxx"
+
+#include <tools/debug.hxx>
+
+#include <xmloff/txtprmap.hxx>
#include <xmloff/xmlexp.hxx>
#include "XMLSectionFootnoteConfigExport.hxx"
@@ -302,6 +306,26 @@ void XMLTextExportPropertySetMapper::ContextFontHeightFilter(
// helper method; implementation below
bool lcl_IsOutlineStyle(const SvXMLExport&, const OUString&);
+static void
+lcl_checkMultiProperty(XMLPropertyState *const pState,
+ XMLPropertyState *const pRelState)
+{
+ if (pState && pRelState)
+ {
+ sal_Int32 nTemp = 0;
+ pRelState->maValue >>= nTemp;
+ if (100 == nTemp)
+ {
+ pRelState->mnIndex = -1;
+ pRelState->maValue.clear();
+ }
+ else
+ {
+ pState->mnIndex = -1;
+ pState->maValue.clear();
+ }
+ }
+}
void XMLTextExportPropertySetMapper::ContextFilter(
::std::vector< XMLPropertyState >& rProperties,
@@ -444,6 +468,9 @@ void XMLTextExportPropertySetMapper::ContextFilter(
XMLPropertyState* pClip11State = NULL;
XMLPropertyState* pClipState = NULL;
+ XMLPropertyState* pAllParaMargin = NULL;
+ XMLPropertyState* pAllMargin = NULL;
+
sal_Bool bNeedsAnchor = sal_False;
for( ::std::vector< XMLPropertyState >::iterator aIter = rProperties.begin();
@@ -560,6 +587,8 @@ void XMLTextExportPropertySetMapper::ContextFilter(
case CTF_NUMBERINGSTYLENAME: pListStyleName = propertie; break;
case CTF_TEXT_CLIP11: pClip11State = propertie; break;
case CTF_TEXT_CLIP: pClipState = propertie; break;
+ case CTF_PARAMARGINALL: pAllParaMargin = propertie; break;
+ case CTF_MARGINALL: pAllMargin = propertie; break;
}
}
@@ -605,87 +634,21 @@ void XMLTextExportPropertySetMapper::ContextFilter(
}
}
- if( pParaLeftMarginState && pParaLeftMarginRelState )
- {
- sal_Int32 nTemp = 0;
- pParaLeftMarginRelState->maValue >>= nTemp;
- if( nTemp == 100 )
- {
- pParaLeftMarginRelState->mnIndex = -1;
- pParaLeftMarginRelState->maValue.clear();
- }
- else
- {
- pParaLeftMarginState->mnIndex = -1;
- pParaLeftMarginState->maValue.clear();
- }
-
- }
-
- if( pParaRightMarginState && pParaRightMarginRelState )
- {
- sal_Int32 nTemp = 0;
- pParaRightMarginRelState->maValue >>= nTemp;
- if( nTemp == 100 )
- {
- pParaRightMarginRelState->mnIndex = -1;
- pParaRightMarginRelState->maValue.clear();
- }
- else
- {
- pParaRightMarginState->mnIndex = -1;
- pParaRightMarginState->maValue.clear();
- }
- }
-
- if( pParaFirstLineState && pParaFirstLineRelState )
- {
- sal_Int32 nTemp = 0;
- pParaFirstLineRelState->maValue >>= nTemp;
- if( nTemp == 100 )
- {
- pParaFirstLineRelState->mnIndex = -1;
- pParaFirstLineRelState->maValue.clear();
- }
- else
- {
- pParaFirstLineState->mnIndex = -1;
- pParaFirstLineState->maValue.clear();
- }
- }
+ lcl_checkMultiProperty(pParaLeftMarginState, pParaLeftMarginRelState);
+ lcl_checkMultiProperty(pParaRightMarginState, pParaRightMarginRelState);
+ lcl_checkMultiProperty(pParaTopMarginState, pParaTopMarginRelState);
+ lcl_checkMultiProperty(pParaBottomMarginState, pParaBottomMarginRelState);
+ lcl_checkMultiProperty(pParaFirstLineState, pParaFirstLineRelState);
- if( pParaTopMarginState && pParaTopMarginRelState )
+ if (pAllParaMargin)
{
- sal_Int32 nTemp = 0;
- pParaTopMarginRelState->maValue >>= nTemp;
- if( nTemp == 100 )
- {
- pParaTopMarginRelState->mnIndex = -1;
- pParaTopMarginRelState->maValue.clear();
- }
- else
- {
- pParaTopMarginState->mnIndex = -1;
- pParaTopMarginState->maValue.clear();
- }
-
+ pAllParaMargin->mnIndex = -1; // just export individual attributes...
+ pAllParaMargin->maValue.clear();
}
-
- if( pParaBottomMarginState && pParaBottomMarginRelState )
+ if (pAllMargin)
{
- sal_Int32 nTemp = 0;
- pParaBottomMarginRelState->maValue >>= nTemp;
- if( nTemp == 100 )
- {
- pParaBottomMarginRelState->mnIndex = -1;
- pParaBottomMarginRelState->maValue.clear();
- }
- else
- {
- pParaBottomMarginState->mnIndex = -1;
- pParaBottomMarginState->maValue.clear();
- }
-
+ pAllMargin->mnIndex = -1; // just export individual attributes...
+ pAllMargin->maValue.clear();
}
if( pAllBorderWidthState )
diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx
index dceac7a26890..93e8750b8fb2 100644
--- a/xmloff/source/text/txtimppr.cxx
+++ b/xmloff/source/text/txtimppr.cxx
@@ -316,7 +316,12 @@ void XMLTextImportPropertyMapper::finished(
XMLPropertyState* pVertOrientRelAsChar = 0;
XMLPropertyState* pBackTransparency = NULL; // transparency in %
XMLPropertyState* pBackTransparent = NULL; // transparency as boolean
- sal_uInt16 i; // for the "for" loop
+ XMLPropertyState* pAllParaMargin = 0;
+ XMLPropertyState* pParaMargins[4] = { 0, 0, 0, 0 };
+ ::std::auto_ptr<XMLPropertyState> pNewParaMargins[4];
+ XMLPropertyState* pAllMargin = 0;
+ XMLPropertyState* pMargins[4] = { 0, 0, 0, 0 };
+ ::std::auto_ptr<XMLPropertyState> pNewMargins[4];
for( ::std::vector< XMLPropertyState >::iterator aIter = rProperties.begin();
aIter != rProperties.end();
@@ -384,7 +389,31 @@ void XMLTextImportPropertyMapper::finished(
bHasAnyWidth = sal_True; break;
case CTF_BACKGROUND_TRANSPARENCY: pBackTransparency = property; break;
case CTF_BACKGROUND_TRANSPARENT: pBackTransparent = property; break;
-
+ case CTF_PARAMARGINALL:
+ case CTF_PARAMARGINALL_REL:
+ pAllParaMargin = property; break;
+ case CTF_PARALEFTMARGIN:
+ case CTF_PARALEFTMARGIN_REL:
+ pParaMargins[XML_LINE_LEFT] = property; break;
+ case CTF_PARARIGHTMARGIN:
+ case CTF_PARARIGHTMARGIN_REL:
+ pParaMargins[XML_LINE_RIGHT] = property; break;
+ case CTF_PARATOPMARGIN:
+ case CTF_PARATOPMARGIN_REL:
+ pParaMargins[XML_LINE_TOP] = property; break;
+ case CTF_PARABOTTOMMARGIN:
+ case CTF_PARABOTTOMMARGIN_REL:
+ pParaMargins[XML_LINE_BOTTOM] = property; break;
+ case CTF_MARGINALL:
+ pAllMargin = property; break;
+ case CTF_MARGINLEFT:
+ pMargins[XML_LINE_LEFT] = property; break;
+ case CTF_MARGINRIGHT:
+ pMargins[XML_LINE_RIGHT] = property; break;
+ case CTF_MARGINTOP:
+ pMargins[XML_LINE_TOP] = property; break;
+ case CTF_MARGINBOTTOM:
+ pMargins[XML_LINE_BOTTOM] = property; break;
}
}
@@ -401,8 +430,31 @@ void XMLTextImportPropertyMapper::finished(
FontFinished( pFontFamilyNameCTL, pFontStyleNameCTL, pFontFamilyCTL,
pFontPitchCTL, pFontCharSetCTL );
- for( i = 0; i < 4; i++ )
+ for (sal_uInt16 i = 0; i < 4; i++)
{
+ if (pAllParaMargin && !pParaMargins[i])
+ {
+#ifdef DBG_UTIL
+ sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
+ pAllParaMargin->mnIndex + (2*i) + 2 );
+ OSL_ENSURE( nTmp >= CTF_PARALEFTMARGIN &&
+ nTmp <= CTF_PARABOTTOMMARGIN_REL,
+ "wrong property context id" );
+#endif
+ pNewParaMargins[i].reset(new XMLPropertyState(
+ pAllParaMargin->mnIndex + (2*i) + 2, pAllParaMargin->maValue));
+ }
+ if (pAllMargin && !pMargins[i])
+ {
+#ifdef DBG_UTIL
+ sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
+ pAllMargin->mnIndex + i + 1 );
+ OSL_ENSURE( nTmp >= CTF_MARGINLEFT && nTmp <= CTF_MARGINBOTTOM,
+ "wrong property context id" );
+#endif
+ pNewMargins[i].reset(new XMLPropertyState(
+ pAllMargin->mnIndex + i + 1, pAllMargin->maValue));
+ }
if( pAllBorderDistance && !pBorderDistances[i] )
{
#ifdef DBG_UTIL
@@ -506,6 +558,16 @@ void XMLTextImportPropertyMapper::finished(
}
#endif
}
+
+ if (pAllParaMargin)
+ {
+ pAllParaMargin->mnIndex = -1;
+ }
+ if (pAllMargin)
+ {
+ pAllMargin->mnIndex = -1;
+ }
+
if( pAllBorderDistance )
pAllBorderDistance->mnIndex = -1;
@@ -649,8 +711,16 @@ void XMLTextImportPropertyMapper::finished(
delete pNewFontCharSetCTL;
}
- for( i=0; i<4; i++ )
+ for (sal_uInt16 i=0; i<4; i++)
{
+ if (pNewParaMargins[i].get())
+ {
+ rProperties.push_back(*pNewParaMargins[i]);
+ }
+ if (pNewMargins[i].get())
+ {
+ rProperties.push_back(*pNewMargins[i]);
+ }
if( pNewBorderDistances[i] )
{
rProperties.push_back( *pNewBorderDistances[i] );
diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx
index 3a26fe37c794..9c3d50d6f9ed 100644
--- a/xmloff/source/text/txtprhdl.cxx
+++ b/xmloff/source/text/txtprhdl.cxx
@@ -1039,7 +1039,8 @@ sal_Bool XMLTextCombineCharPropHdl_Impl::exportXML(
{
rValue >>= rStrExpValue;
- return sal_True;
+ // #i114107# attribute of type "character": export only if length is 1
+ return (1 == rStrExpValue.getLength()) ? sal_True : sal_False;
}
XMLTextCombineCharPropHdl_Impl::~XMLTextCombineCharPropHdl_Impl()
diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
index fbc53ef3e16e..ff49ecd234f9 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -27,15 +27,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_xmloff.hxx"
+
+#include <xmloff/txtprmap.hxx>
+
#include <tools/debug.hxx>
-#include "xmloff/xmlnmspe.hxx"
+
+#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmltoken.hxx>
-#ifndef _XMLOFF_TXTPRHDL_HXX
#include "txtprhdl.hxx"
-#endif
-#ifndef _XMLOFF_TXTPRMAP_HXX
-#include <xmloff/txtprmap.hxx>
-#endif
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -91,6 +90,9 @@ XMLPropertyMapEntry aXMLParaPropMap[] =
// RES_UNKNOWNATR_CONTAINER
MP_E( "ParaUserDefinedAttributes", TEXT, XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
// RES_LR_SPACE
+ // !!! DO NOT REORDER THE MARGINS !!!
+ MP_E( "ParaLeftMargin", FO, MARGIN, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARAMARGINALL ),
+ MP_E( "ParaLeftMarginRelative", FO, MARGIN, XML_TYPE_PERCENT16, CTF_PARAMARGINALL_REL ),
MP_E( "ParaLeftMargin", FO, MARGIN_LEFT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARALEFTMARGIN ),
MP_E( "ParaLeftMarginRelative", FO, MARGIN_LEFT, XML_TYPE_PERCENT16, CTF_PARALEFTMARGIN_REL ),
MP_E( "ParaRightMargin", FO, MARGIN_RIGHT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARARIGHTMARGIN ),
@@ -578,11 +580,12 @@ XMLPropertyMapEntry aXMLFramePropMap[] =
MG_ED( "VertOrientPosition", SVG, Y, XML_TYPE_MEASURE, 0 ),
// ***** The map for automatic styles starts here *****
// RES_LR_SPACE
- MG_E( "LeftMargin", FO, MARGIN_LEFT, XML_TYPE_MEASURE, 0),
- MG_E( "RightMargin", FO, MARGIN_RIGHT, XML_TYPE_MEASURE, 0 ),
+ MG_E( "LeftMargin", FO, MARGIN, XML_TYPE_MEASURE, CTF_MARGINALL ),
+ MG_E( "LeftMargin", FO, MARGIN_LEFT, XML_TYPE_MEASURE, CTF_MARGINLEFT ),
+ MG_E( "RightMargin", FO, MARGIN_RIGHT, XML_TYPE_MEASURE, CTF_MARGINRIGHT ),
// RES_UL_SPACE
- MG_E( "TopMargin", FO, MARGIN_TOP, XML_TYPE_MEASURE, 0 ),
- MG_E( "BottomMargin", FO, MARGIN_BOTTOM, XML_TYPE_MEASURE, 0 ),
+ MG_E( "TopMargin", FO, MARGIN_TOP, XML_TYPE_MEASURE, CTF_MARGINTOP ),
+ MG_E( "BottomMargin", FO, MARGIN_BOTTOM, XML_TYPE_MEASURE, CTF_MARGINBOTTOM ),
// RES_PAGEDESC
// not required
// RES_BREAK
@@ -852,7 +855,7 @@ XMLPropertyMapEntry *lcl_txtprmap_getMap( sal_uInt16 nType )
break;
case TEXT_PROP_MAP_SHAPE_PARA:
pMap = &(aXMLParaPropMap[1]);
- DBG_ASSERT( pMap->meXMLName == XML_MARGIN_LEFT, "shape para map changed" );
+ OSL_ENSURE( pMap->meXMLName == XML_MARGIN, "shape para map changed" );
break;
case TEXT_PROP_MAP_PARA:
pMap = aXMLParaPropMap;
@@ -862,7 +865,7 @@ XMLPropertyMapEntry *lcl_txtprmap_getMap( sal_uInt16 nType )
break;
case TEXT_PROP_MAP_AUTO_FRAME:
pMap = &(aXMLFramePropMap[13]);
- DBG_ASSERT( pMap->meXMLName == XML_MARGIN_LEFT, "frame map changed" );
+ OSL_ENSURE( pMap->meXMLName == XML_MARGIN, "frame map changed" );
break;
case TEXT_PROP_MAP_SHAPE:
pMap = aXMLShapePropMap;
diff --git a/xmloff/source/transform/PropertyActionsOOo.cxx b/xmloff/source/transform/PropertyActionsOOo.cxx
index bc91561de206..e0b9259787eb 100644
--- a/xmloff/source/transform/PropertyActionsOOo.cxx
+++ b/xmloff/source/transform/PropertyActionsOOo.cxx
@@ -649,6 +649,8 @@ XMLTransformerActionInit aTextPropertyOOoAttrActionTable[] =
NO_PARAMS }, /* #i113645# */
{ XML_NAMESPACE_STYLE, XML_TEXT_OVERLINE_COLOR, XML_ATACTION_REMOVE,
NO_PARAMS }, /* #i113645# */
+ { XML_NAMESPACE_FO, XML_WRAP_OPTION, XML_ATACTION_REMOVE,
+ NO_PARAMS }, /* #i116555# */
{ XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT, NO_PARAMS }
};