diff options
author | Thorsten Behrens <tbehrens@novell.com> | 2011-03-12 02:42:58 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@novell.com> | 2011-03-12 02:42:58 +0100 |
commit | e65c0fe553a9d1b85dcacfff7af9df8231427876 (patch) | |
tree | 250636f82248275ef5c1d491e58e4e3cf136cdff /xmloff/source/forms | |
parent | 35fbb45086c389f91c0d6ff410d814f7567c1ceb (diff) | |
parent | 4fba42e5f98fcc0fa9addf41a793c1d7f11602c8 (diff) |
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Conflicts:
avmedia/inc/avmedia/mediaitem.hxx
avmedia/prj/build.lst
avmedia/source/framework/mediaitem.cxx
avmedia/source/gstreamer/gstcommon.hxx
avmedia/source/gstreamer/gstframegrabber.cxx
avmedia/source/gstreamer/gstframegrabber.hxx
avmedia/source/gstreamer/gstmanager.cxx
avmedia/source/gstreamer/gstmanager.hxx
avmedia/source/gstreamer/gstplayer.cxx
avmedia/source/gstreamer/gstplayer.hxx
avmedia/source/gstreamer/gstuno.cxx
avmedia/source/gstreamer/gstwindow.cxx
avmedia/source/gstreamer/gstwindow.hxx
avmedia/source/gstreamer/makefile.mk
avmedia/source/quicktime/quicktimeuno.cxx
avmedia/source/viewer/mediawindow.cxx
avmedia/source/viewer/mediawindow_impl.cxx
avmedia/source/viewer/mediawindow_impl.hxx
avmedia/source/viewer/mediawindowbase_impl.cxx
avmedia/source/win/winuno.cxx
basic/inc/basic/basmgr.hxx
basic/inc/basic/mybasic.hxx
basic/inc/basic/process.hxx
basic/inc/basic/sbmeth.hxx
basic/inc/basic/sbmod.hxx
basic/inc/basic/sbxdef.hxx
basic/inc/basic/sbxvar.hxx
basic/source/app/app.cxx
basic/source/app/app.hxx
basic/source/app/appbased.cxx
basic/source/app/appedit.cxx
basic/source/app/appwin.cxx
basic/source/app/appwin.hxx
basic/source/app/brkpnts.cxx
basic/source/app/brkpnts.hxx
basic/source/app/dialogs.cxx
basic/source/app/dialogs.hxx
basic/source/app/msgedit.cxx
basic/source/app/mybasic.cxx
basic/source/app/process.cxx
basic/source/app/processw.hxx
basic/source/app/textedit.cxx
basic/source/basmgr/basicmanagerrepository.cxx
basic/source/basmgr/basmgr.cxx
basic/source/classes/disas.cxx
basic/source/classes/eventatt.cxx
basic/source/classes/image.cxx
basic/source/classes/sb.cxx
basic/source/classes/sbunoobj.cxx
basic/source/classes/sbxmod.cxx
basic/source/comp/codegen.cxx
basic/source/comp/dim.cxx
basic/source/comp/exprgen.cxx
basic/source/comp/exprnode.cxx
basic/source/comp/exprtree.cxx
basic/source/comp/sbcomp.cxx
basic/source/inc/expr.hxx
basic/source/inc/object.hxx
basic/source/inc/sbunoobj.hxx
basic/source/runtime/dllmgr-x86.cxx
basic/source/runtime/iosys.cxx
basic/source/runtime/makefile.mk
basic/source/runtime/methods.cxx
basic/source/runtime/methods1.cxx
basic/source/runtime/runtime.cxx
basic/source/runtime/stdobj.cxx
basic/source/runtime/step0.cxx
basic/source/runtime/step1.cxx
basic/source/runtime/step2.cxx
basic/source/sbx/sbxarray.cxx
basic/source/sbx/sbxbase.cxx
basic/source/sbx/sbxbool.cxx
basic/source/sbx/sbxbyte.cxx
basic/source/sbx/sbxcoll.cxx
basic/source/sbx/sbxconv.hxx
basic/source/sbx/sbxcurr.cxx
basic/source/sbx/sbxexec.cxx
basic/source/sbx/sbxint.cxx
basic/source/sbx/sbxobj.cxx
basic/source/sbx/sbxscan.cxx
basic/source/sbx/sbxstr.cxx
basic/source/sbx/sbxvals.cxx
basic/source/sbx/sbxvalue.cxx
basic/source/sbx/sbxvar.cxx
basic/workben/mgrtest.cxx
configmgr/prj/build.lst
configmgr/source/access.cxx
configmgr/source/configurationprovider.cxx
configmgr/source/defaultprovider.cxx
configmgr/source/pad.cxx
configmgr/source/services.cxx
configmgr/source/update.cxx
configmgr/source/xmlreader.cxx
configmgr/source/xmlreader.hxx
connectivity/prj/build.lst
connectivity/qa/complex/connectivity/TestCase.java
connectivity/source/cpool/Zregistration.cxx
connectivity/source/drivers/adabas/Bservices.cxx
connectivity/source/drivers/ado/Aservices.cxx
connectivity/source/drivers/calc/Cservices.cxx
connectivity/source/drivers/calc/makefile.mk
connectivity/source/drivers/dbase/DIndex.cxx
connectivity/source/drivers/dbase/DIndexIter.cxx
connectivity/source/drivers/dbase/DNoException.cxx
connectivity/source/drivers/dbase/DTable.cxx
connectivity/source/drivers/dbase/Dservices.cxx
connectivity/source/drivers/dbase/dindexnode.cxx
connectivity/source/drivers/evoab/LNoException.cxx
connectivity/source/drivers/evoab/LServices.cxx
connectivity/source/drivers/evoab2/NServices.cxx
connectivity/source/drivers/file/FNoException.cxx
connectivity/source/drivers/file/FPreparedStatement.cxx
connectivity/source/drivers/file/FResultSet.cxx
connectivity/source/drivers/file/FStatement.cxx
connectivity/source/drivers/file/quotedstring.cxx
connectivity/source/drivers/flat/ETable.cxx
connectivity/source/drivers/flat/Eservices.cxx
connectivity/source/drivers/hsqldb/Hservices.cxx
connectivity/source/drivers/jdbc/jservices.cxx
connectivity/source/drivers/kab/KServices.cxx
connectivity/source/drivers/macab/MacabServices.cxx
connectivity/source/drivers/mozab/MResultSet.cxx
connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
connectivity/source/drivers/mysql/Yservices.cxx
connectivity/source/drivers/odbc/OFunctions.cxx
connectivity/source/drivers/odbc/oservices.cxx
connectivity/source/inc/dbase/DIndexPage.hxx
connectivity/source/inc/file/FTable.hxx
connectivity/source/manager/mregistration.cxx
connectivity/source/parse/PColumn.cxx
desktop/prj/build.lst
desktop/qa/deployment_misc/test_dp_version.cxx
desktop/source/app/app.cxx
desktop/source/app/appfirststart.cxx
desktop/source/app/cmdlineargs.cxx
desktop/source/app/cmdlineargs.hxx
desktop/source/app/sofficemain.cxx
desktop/source/deployment/gui/dp_gui.hrc
desktop/source/deployment/gui/dp_gui_dialog2.cxx
desktop/source/deployment/gui/dp_gui_dialog2.hxx
desktop/source/deployment/gui/dp_gui_updatedialog.cxx
desktop/source/deployment/gui/dp_gui_updatedialog.hxx
desktop/source/deployment/manager/dp_extensionmanager.cxx
desktop/source/deployment/manager/dp_extensionmanager.hxx
desktop/source/deployment/misc/dp_misc.src
desktop/source/deployment/registry/component/dp_component.cxx
desktop/source/deployment/registry/configuration/dp_configuration.cxx
desktop/source/deployment/registry/dp_backend.cxx
desktop/source/deployment/registry/help/dp_help.cxx
desktop/source/deployment/registry/script/dp_script.cxx
desktop/source/migration/pages.cxx
desktop/source/migration/pages.hxx
desktop/source/migration/wizard.cxx
desktop/source/migration/wizard.hrc
desktop/source/migration/wizard.hxx
desktop/source/migration/wizard.src
desktop/source/pkgchk/unopkg/unopkg_shared.h
desktop/source/so_comp/services.cxx
desktop/source/splash/makefile.mk
desktop/source/splash/services_spl.cxx
desktop/source/splash/splash.cxx
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
editeng/inc/editeng/adjitem.hxx
editeng/inc/editeng/bolnitem.hxx
editeng/inc/editeng/borderline.hxx
editeng/inc/editeng/boxitem.hxx
editeng/inc/editeng/brkitem.hxx
editeng/inc/editeng/brshitem.hxx
editeng/inc/editeng/bulitem.hxx
editeng/inc/editeng/charreliefitem.hxx
editeng/inc/editeng/charrotateitem.hxx
editeng/inc/editeng/charscaleitem.hxx
editeng/inc/editeng/cmapitem.hxx
editeng/inc/editeng/colritem.hxx
editeng/inc/editeng/crsditem.hxx
editeng/inc/editeng/editdata.hxx
editeng/inc/editeng/editeng.hxx
editeng/inc/editeng/editobj.hxx
editeng/inc/editeng/editstat.hxx
editeng/inc/editeng/editview.hxx
editeng/inc/editeng/emphitem.hxx
editeng/inc/editeng/escpitem.hxx
editeng/inc/editeng/fhgtitem.hxx
editeng/inc/editeng/flstitem.hxx
editeng/inc/editeng/fontitem.hxx
editeng/inc/editeng/frmdiritem.hxx
editeng/inc/editeng/fwdtitem.hxx
editeng/inc/editeng/hyznitem.hxx
editeng/inc/editeng/kernitem.hxx
editeng/inc/editeng/langitem.hxx
editeng/inc/editeng/lrspitem.hxx
editeng/inc/editeng/lspcitem.hxx
editeng/inc/editeng/numitem.hxx
editeng/inc/editeng/outliner.hxx
editeng/inc/editeng/paravertalignitem.hxx
editeng/inc/editeng/pmdlitem.hxx
editeng/inc/editeng/postitem.hxx
editeng/inc/editeng/protitem.hxx
editeng/inc/editeng/shaditem.hxx
editeng/inc/editeng/sizeitem.hxx
editeng/inc/editeng/svxacorr.hxx
editeng/inc/editeng/svxfont.hxx
editeng/inc/editeng/svxrtf.hxx
editeng/inc/editeng/swafopt.hxx
editeng/inc/editeng/tstpitem.hxx
editeng/inc/editeng/twolinesitem.hxx
editeng/inc/editeng/txtrange.hxx
editeng/inc/editeng/udlnitem.hxx
editeng/inc/editeng/ulspitem.hxx
editeng/inc/editeng/wghtitem.hxx
editeng/inc/editeng/writingmodeitem.hxx
editeng/inc/editeng/xmlcnitm.hxx
editeng/inc/helpid.hrc
editeng/inc/pch/precompiled_editeng.hxx
editeng/source/editeng/editdbg.cxx
editeng/source/editeng/editdoc.cxx
editeng/source/editeng/editdoc.hxx
editeng/source/editeng/editdoc2.cxx
editeng/source/editeng/editeng.cxx
editeng/source/editeng/editobj.cxx
editeng/source/editeng/editobj2.hxx
editeng/source/editeng/editsel.cxx
editeng/source/editeng/editundo.cxx
editeng/source/editeng/editundo.hxx
editeng/source/editeng/editview.cxx
editeng/source/editeng/edtspell.hxx
editeng/source/editeng/eehtml.cxx
editeng/source/editeng/eehtml.hxx
editeng/source/editeng/eeobj.cxx
editeng/source/editeng/eerdll.cxx
editeng/source/editeng/eertfpar.cxx
editeng/source/editeng/impedit.cxx
editeng/source/editeng/impedit.hxx
editeng/source/editeng/impedit2.cxx
editeng/source/editeng/impedit3.cxx
editeng/source/editeng/impedit4.cxx
editeng/source/editeng/impedit5.cxx
editeng/source/editeng/makefile.mk
editeng/source/items/bulitem.cxx
editeng/source/items/charhiddenitem.cxx
editeng/source/items/flditem.cxx
editeng/source/items/frmitems.cxx
editeng/source/items/makefile.mk
editeng/source/items/numitem.cxx
editeng/source/items/paraitem.cxx
editeng/source/items/svxfont.cxx
editeng/source/items/textitem.cxx
editeng/source/items/writingmodeitem.cxx
editeng/source/items/xmlcnitm.cxx
editeng/source/misc/SvXMLAutoCorrectImport.cxx
editeng/source/misc/svxacorr.cxx
editeng/source/misc/txtrange.cxx
editeng/source/misc/unolingu.cxx
editeng/source/outliner/outleeng.cxx
editeng/source/outliner/outliner.cxx
editeng/source/outliner/outlundo.hxx
editeng/source/outliner/outlvw.cxx
editeng/source/outliner/paralist.cxx
editeng/source/outliner/paralist.hxx
editeng/source/rtf/rtfgrf.cxx
editeng/source/rtf/rtfitem.cxx
editeng/source/rtf/svxrtf.cxx
editeng/source/uno/unoipset.cxx
editeng/util/makefile.mk
embeddedobj/prj/build.lst
embeddedobj/source/commonembedding/miscobj.cxx
eventattacher/prj/build.lst
fileaccess/source/FileAccess.cxx
formula/inc/formula/FormulaCompiler.hxx
formula/inc/formula/token.hxx
formula/inc/formula/tokenarray.hxx
formula/source/core/api/FormulaCompiler.cxx
formula/source/core/api/token.cxx
formula/source/ui/dlg/FormulaHelper.cxx
formula/source/ui/dlg/formula.cxx
formula/source/ui/dlg/parawin.cxx
formula/source/ui/dlg/structpg.cxx
fpicker/prj/d.lst
fpicker/source/aqua/FPentry.cxx
fpicker/source/office/OfficeControlAccess.cxx
fpicker/source/office/iodlg.cxx
fpicker/source/office/iodlg.hxx
fpicker/source/office/iodlg.src
fpicker/source/office/iodlgimp.cxx
fpicker/source/unx/gnome/FPentry.cxx
fpicker/source/unx/gnome/SalGtkFilePicker.cxx
fpicker/source/unx/gnome/SalGtkPicker.cxx
fpicker/source/unx/kde4/KDE4FPEntry.cxx
fpicker/source/win32/filepicker/FPentry.cxx
framework/AllLangResTarget_fwe.mk
framework/inc/dispatch/interaction.hxx
framework/inc/framework/addonmenu.hxx
framework/inc/framework/addonsoptions.hxx
framework/inc/framework/bmkmenu.hxx
framework/inc/framework/imageproducer.hxx
framework/inc/framework/sfxhelperfunctions.hxx
framework/inc/framework/statusbarconfiguration.hxx
framework/inc/framework/titlehelper.hxx
framework/inc/framework/toolboxconfiguration.hxx
framework/inc/threadhelp/lockhelper.hxx
framework/inc/xml/eventsdocumenthandler.hxx
framework/inc/xml/statusbardocumenthandler.hxx
framework/inc/xml/toolboxconfiguration.hxx
framework/inc/xml/toolboxconfigurationdefines.hxx
framework/inc/xml/toolboxdocumenthandler.hxx
framework/prj/build.lst
framework/qa/complex/ModuleManager/makefile.mk
framework/qa/complex/accelerators/makefile.mk
framework/qa/complex/framework/recovery/makefile.mk
framework/qa/complex/imageManager/_XInitialization.java
framework/source/classes/menumanager.cxx
framework/source/dispatch/interaction.cxx
framework/source/fwe/classes/bmkmenu.cxx
framework/source/fwe/helper/actiontriggerhelper.cxx
framework/source/fwe/helper/imageproducer.cxx
framework/source/fwe/xml/menuconfiguration.cxx
framework/source/fwe/xml/toolboxdocumenthandler.cxx
framework/source/helper/uiconfigelementwrapperbase.cxx
framework/source/helper/uielementwrapperbase.cxx
framework/source/inc/pattern/window.hxx
framework/source/jobs/jobdata.cxx
framework/source/layoutmanager/layoutmanager.cxx
framework/source/layoutmanager/panel.hxx
framework/source/loadenv/loadenv.cxx
framework/source/register/registerservices.cxx
framework/source/services/menudocumenthandler.cxx
framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
framework/source/uiconfiguration/uiconfigurationmanager.cxx
framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx
framework/source/uielement/addonstoolbarmanager.cxx
framework/source/uielement/controlmenucontroller.cxx
framework/source/uielement/fontsizemenucontroller.cxx
framework/source/uielement/imagebuttontoolbarcontroller.cxx
framework/source/uielement/macrosmenucontroller.cxx
framework/source/uielement/menubarmanager.cxx
framework/source/uielement/newmenucontroller.cxx
framework/source/uielement/togglebuttontoolbarcontroller.cxx
framework/source/uielement/toolbarmanager.cxx
framework/source/uielement/toolbarsmenucontroller.cxx
framework/test/makefile.mk
framework/test/threadtest/makefile.mk
framework/test/typecfg/makefile.mk
framework/util/guiapps/makefile.mk
framework/util/makefile.mk
idl/inc/bastype.hxx
idl/inc/hash.hxx
idl/inc/lex.hxx
idl/inc/module.hxx
idl/inc/object.hxx
idl/inc/slot.hxx
idl/inc/types.hxx
idl/source/cmptools/hash.cxx
idl/source/cmptools/lex.cxx
idl/source/objects/basobj.cxx
idl/source/objects/bastype.cxx
idl/source/objects/module.cxx
idl/source/objects/object.cxx
idl/source/objects/slot.cxx
idl/source/objects/types.cxx
idl/source/prj/command.cxx
idl/source/prj/database.cxx
idl/source/prj/globals.cxx
idl/source/prj/svidl.cxx
linguistic/inc/linguistic/misc.hxx
linguistic/prj/build.lst
linguistic/source/convdic.cxx
linguistic/source/convdiclist.cxx
linguistic/source/dicimp.cxx
linguistic/source/dlistimp.cxx
linguistic/source/gciterator.cxx
linguistic/source/iprcache.cxx
linguistic/source/lngopt.cxx
linguistic/source/lngprophelp.cxx
linguistic/source/lngsvcmgr.cxx
linguistic/source/lngsvcmgr.hxx
linguistic/source/misc2.cxx
linguistic/workben/sprophelp.cxx
officecfg/registry/data/org/openoffice/VCL.xcu
officecfg/util/makefile.mk
oovbaapi/ooo/vba/XApplicationBase.idl
oovbaapi/ooo/vba/XVBAAppService.idl
oovbaapi/ooo/vba/XVBADocService.idl
oovbaapi/ooo/vba/excel/XApplication.idl
oovbaapi/ooo/vba/excel/XRange.idl
oovbaapi/ooo/vba/excel/XWorkbook.idl
oovbaapi/ooo/vba/excel/XWorksheet.idl
oovbaapi/ooo/vba/word/XApplication.idl
oovbaapi/ooo/vba/word/XGlobals.idl
oovbaapi/ooo/vba/word/XTableOfContents.idl
readlicense_oo/prj/build.lst
scripting/prj/build.lst
scripting/prj/d.lst
scripting/source/basprov/basprov.cxx
scripting/source/basprov/basscript.cxx
scripting/source/basprov/basscript.hxx
scripting/source/dlgprov/dlgprov.cxx
scripting/source/inc/util/util.hxx
scripting/source/protocolhandler/scripthandler.cxx
scripting/source/provider/ProviderCache.cxx
scripting/source/pyprov/makefile.mk
scripting/source/runtimemgr/ScriptNameResolverImpl.cxx
scripting/source/runtimemgr/ScriptRuntimeManager.cxx
scripting/source/runtimemgr/StorageBridge.cxx
scripting/source/storage/ScriptMetadataImporter.cxx
scripting/source/storage/ScriptSecurityManager.cxx
scripting/source/storage/ScriptStorage.cxx
scripting/source/storage/ScriptStorageManager.cxx
sfx2/inc/about.hxx
sfx2/inc/brokenpackageint.hxx
sfx2/inc/docvor.hxx
sfx2/inc/pch/precompiled_sfx2.hxx
sfx2/inc/sfx2/app.hxx
sfx2/inc/sfx2/basmgr.hxx
sfx2/inc/sfx2/bindings.hxx
sfx2/inc/sfx2/childwin.hxx
sfx2/inc/sfx2/ctrlitem.hxx
sfx2/inc/sfx2/dinfdlg.hxx
sfx2/inc/sfx2/dispatch.hxx
sfx2/inc/sfx2/docfilt.hxx
sfx2/inc/sfx2/evntconf.hxx
sfx2/inc/sfx2/fcontnr.hxx
sfx2/inc/sfx2/frame.hxx
sfx2/inc/sfx2/imagemgr.hxx
sfx2/inc/sfx2/imgmgr.hxx
sfx2/inc/sfx2/linksrc.hxx
sfx2/inc/sfx2/macrconf.hxx
sfx2/inc/sfx2/macropg.hxx
sfx2/inc/sfx2/mnuitem.hxx
sfx2/inc/sfx2/mnumgr.hxx
sfx2/inc/sfx2/module.hxx
sfx2/inc/sfx2/msg.hxx
sfx2/inc/sfx2/objsh.hxx
sfx2/inc/sfx2/passwd.hxx
sfx2/inc/sfx2/prnmon.hxx
sfx2/inc/sfx2/request.hxx
sfx2/inc/sfx2/sfx.hrc
sfx2/inc/sfx2/sfxbasemodel.hxx
sfx2/inc/sfx2/sfxhtml.hxx
sfx2/inc/sfx2/sfxresid.hxx
sfx2/inc/sfx2/sfxsids.hrc
sfx2/inc/sfx2/sfxuno.hxx
sfx2/inc/sfx2/shell.hxx
sfx2/inc/sfx2/stbitem.hxx
sfx2/inc/sfx2/styfitem.hxx
sfx2/inc/sfx2/tabdlg.hxx
sfx2/inc/sfx2/tbxctrl.hxx
sfx2/inc/sfx2/tplpitem.hxx
sfx2/inc/sfx2/viewfrm.hxx
sfx2/inc/sfx2/viewsh.hxx
sfx2/inc/sfxbasic.hxx
sfx2/inc/sorgitm.hxx
sfx2/prj/build.lst
sfx2/qa/complex/docinfo/makefile.mk
sfx2/qa/cppunit/makefile.mk
sfx2/sdi/makefile.mk
sfx2/source/appl/app.cxx
sfx2/source/appl/app.hrc
sfx2/source/appl/app.src
sfx2/source/appl/appbas.cxx
sfx2/source/appl/appcfg.cxx
sfx2/source/appl/appchild.cxx
sfx2/source/appl/appmain.cxx
sfx2/source/appl/appmisc.cxx
sfx2/source/appl/appopen.cxx
sfx2/source/appl/appquit.cxx
sfx2/source/appl/appserv.cxx
sfx2/source/appl/appuno.cxx
sfx2/source/appl/childwin.cxx
sfx2/source/appl/fileobj.cxx
sfx2/source/appl/helpinterceptor.cxx
sfx2/source/appl/imagemgr.cxx
sfx2/source/appl/impldde.cxx
sfx2/source/appl/impldde.hxx
sfx2/source/appl/linkmgr2.cxx
sfx2/source/appl/lnkbase2.cxx
sfx2/source/appl/makefile.mk
sfx2/source/appl/module.cxx
sfx2/source/appl/newhelp.cxx
sfx2/source/appl/opengrf.cxx
sfx2/source/appl/sfxdll.cxx
sfx2/source/appl/sfxhelp.cxx
sfx2/source/appl/shutdownicon.cxx
sfx2/source/appl/shutdowniconunx.cxx
sfx2/source/appl/workwin.cxx
sfx2/source/bastyp/fltfnc.cxx
sfx2/source/bastyp/frmhtml.cxx
sfx2/source/bastyp/frmhtmlw.cxx
sfx2/source/bastyp/helper.cxx
sfx2/source/bastyp/minarray.cxx
sfx2/source/bastyp/progress.cxx
sfx2/source/bastyp/sfxhtml.cxx
sfx2/source/config/evntconf.cxx
sfx2/source/control/bindings.cxx
sfx2/source/control/ctrlitem.cxx
sfx2/source/control/dispatch.cxx
sfx2/source/control/macrconf.cxx
sfx2/source/control/macro.cxx
sfx2/source/control/makefile.mk
sfx2/source/control/minfitem.cxx
sfx2/source/control/msg.cxx
sfx2/source/control/msgpool.cxx
sfx2/source/control/objface.cxx
sfx2/source/control/request.cxx
sfx2/source/control/shell.cxx
sfx2/source/control/sorgitm.cxx
sfx2/source/dialog/about.cxx
sfx2/source/dialog/basedlgs.cxx
sfx2/source/dialog/dinfdlg.cxx
sfx2/source/dialog/dinfedt.cxx
sfx2/source/dialog/dockwin.cxx
sfx2/source/dialog/filedlghelper.cxx
sfx2/source/dialog/mailmodel.cxx
sfx2/source/dialog/mailmodelapi.cxx
sfx2/source/dialog/makefile.mk
sfx2/source/dialog/mgetempl.cxx
sfx2/source/dialog/passwd.cxx
sfx2/source/dialog/passwd.hrc
sfx2/source/dialog/printopt.cxx
sfx2/source/dialog/securitypage.cxx
sfx2/source/dialog/splitwin.cxx
sfx2/source/dialog/styfitem.cxx
sfx2/source/dialog/tabdlg.cxx
sfx2/source/dialog/taskpane.cxx
sfx2/source/dialog/templdlg.cxx
sfx2/source/dialog/tplpitem.cxx
sfx2/source/dialog/versdlg.cxx
sfx2/source/doc/QuerySaveDocument.cxx
sfx2/source/doc/SfxDocumentMetaData.cxx
sfx2/source/doc/applet.cxx
sfx2/source/doc/doc.hrc
sfx2/source/doc/doc.src
sfx2/source/doc/docfile.cxx
sfx2/source/doc/docinf.cxx
sfx2/source/doc/doctempl.cxx
sfx2/source/doc/doctemplates.cxx
sfx2/source/doc/docvor.cxx
sfx2/source/doc/guisaveas.cxx
sfx2/source/doc/makefile.mk
sfx2/source/doc/objcont.cxx
sfx2/source/doc/objitem.cxx
sfx2/source/doc/objmisc.cxx
sfx2/source/doc/objserv.cxx
sfx2/source/doc/printhelper.cxx
sfx2/source/doc/sfxacldetect.cxx
sfx2/source/doc/sfxbasemodel.cxx
sfx2/source/inc/applet.hxx
sfx2/source/inc/fltoptint.hxx
sfx2/source/inc/sfxlocal.hrc
sfx2/source/inc/virtmenu.hxx
sfx2/source/inc/workwin.hxx
sfx2/source/menu/mnuitem.cxx
sfx2/source/menu/objmnctl.cxx
sfx2/source/menu/virtmenu.cxx
sfx2/source/notify/eventsupplier.cxx
sfx2/source/notify/makefile.mk
sfx2/source/toolbox/imgmgr.cxx
sfx2/source/toolbox/tbxitem.cxx
sfx2/source/view/frame.cxx
sfx2/source/view/orgmgr.cxx
sfx2/source/view/printer.cxx
sfx2/source/view/prnmon.cxx
sfx2/source/view/viewfrm.cxx
sfx2/source/view/viewprn.cxx
sfx2/source/view/viewsh.cxx
sfx2/util/makefile.mk
sfx2/workben/custompanel/makefile.mk
shell/source/backends/desktopbe/desktopbackend.cxx
shell/source/backends/gconfbe/gconfbackend.cxx
shell/source/backends/kde4be/kde4backend.cxx
shell/source/backends/kdebe/kdebackend.cxx
shell/source/win32/SysShentry.cxx
shell/source/win32/shlxthandler/propsheets/propsheets.cxx
shell/source/win32/simplemail/smplmailentry.cxx
svx/inc/float3d.hrc
svx/inc/fmhelp.hrc
svx/inc/globlmn_tmpl.hrc
svx/inc/helpid.hrc
svx/inc/pch/precompiled_svx.hxx
svx/inc/sjctrl.hxx
svx/inc/srchitem.hxx
svx/inc/svdibrow.hxx
svx/inc/svx/SmartTagItem.hxx
svx/inc/svx/algitem.hxx
svx/inc/svx/camera3d.hxx
svx/inc/svx/chrtitem.hxx
svx/inc/svx/clipfmtitem.hxx
svx/inc/svx/ctredlin.hxx
svx/inc/svx/dbtoolsclient.hxx
svx/inc/svx/deflt3d.hxx
svx/inc/svx/dialogs.hrc
svx/inc/svx/drawitem.hxx
svx/inc/svx/e3ditem.hxx
svx/inc/svx/extrud3d.hxx
svx/inc/svx/flagsdef.hxx
svx/inc/svx/float3d.hxx
svx/inc/svx/frmsel.hxx
svx/inc/svx/gallery.hxx
svx/inc/svx/gallery1.hxx
svx/inc/svx/galtheme.hxx
svx/inc/svx/grfcrop.hxx
svx/inc/svx/hdft.hxx
svx/inc/svx/hlnkitem.hxx
svx/inc/svx/hyprlink.hxx
svx/inc/svx/itemwin.hxx
svx/inc/svx/lathe3d.hxx
svx/inc/svx/linkwarn.hxx
svx/inc/svx/modctrl.hxx
svx/inc/svx/msdffdef.hxx
svx/inc/svx/obj3d.hxx
svx/inc/svx/optgenrl.hxx
svx/inc/svx/optgrid.hxx
svx/inc/svx/pageitem.hxx
svx/inc/svx/paraprev.hxx
svx/inc/svx/postattr.hxx
svx/inc/svx/rotmodit.hxx
svx/inc/svx/ruler.hxx
svx/inc/svx/rulritem.hxx
svx/inc/svx/scene3d.hxx
svx/inc/svx/sdasaitm.hxx
svx/inc/svx/sdasitm.hxx
svx/inc/svx/sdggaitm.hxx
svx/inc/svx/sdmetitm.hxx
svx/inc/svx/sdtaaitm.hxx
svx/inc/svx/sdtaditm.hxx
svx/inc/svx/sdtaitm.hxx
svx/inc/svx/sdtakitm.hxx
svx/inc/svx/sdtfchim.hxx
svx/inc/svx/sdtfsitm.hxx
svx/inc/svx/srchdlg.hxx
svx/inc/svx/svddrag.hxx
svx/inc/svx/svdetc.hxx
svx/inc/svx/svdglue.hxx
svx/inc/svx/svdhlpln.hxx
svx/inc/svx/svdlayer.hxx
svx/inc/svx/svdmark.hxx
svx/inc/svx/svdmodel.hxx
svx/inc/svx/svdoashp.hxx
svx/inc/svx/svdobj.hxx
svx/inc/svx/svdocirc.hxx
svx/inc/svx/svdoedge.hxx
svx/inc/svx/svdogrp.hxx
svx/inc/svx/svdomeas.hxx
svx/inc/svx/svdoole2.hxx
svx/inc/svx/svdorect.hxx
svx/inc/svx/svdotable.hxx
svx/inc/svx/svdotext.hxx
svx/inc/svx/svdovirt.hxx
svx/inc/svx/svdpage.hxx
svx/inc/svx/svdsnpv.hxx
svx/inc/svx/svdtrans.hxx
svx/inc/svx/svdundo.hxx
svx/inc/svx/svimbase.hxx
svx/inc/svx/svx3ditems.hxx
svx/inc/svx/svxdlg.hxx
svx/inc/svx/sxcikitm.hxx
svx/inc/svx/sxekitm.hxx
svx/inc/svx/sxelditm.hxx
svx/inc/svx/sxenditm.hxx
svx/inc/svx/sxmkitm.hxx
svx/inc/svx/sxmtpitm.hxx
svx/inc/svx/sxmuitm.hxx
svx/inc/svx/tabarea.hxx
svx/inc/svx/tabline.hxx
svx/inc/svx/unoprov.hxx
svx/inc/svx/viewlayoutitem.hxx
svx/inc/svx/xbitmap.hxx
svx/inc/svx/xbtmpit.hxx
svx/inc/svx/xcolit.hxx
svx/inc/svx/xfillit0.hxx
svx/inc/svx/xflclit.hxx
svx/inc/svx/xflftrit.hxx
svx/inc/svx/xflgrit.hxx
svx/inc/svx/xflhtit.hxx
svx/inc/svx/xftadit.hxx
svx/inc/svx/xftsfit.hxx
svx/inc/svx/xftshit.hxx
svx/inc/svx/xlineit0.hxx
svx/inc/svx/xlinjoit.hxx
svx/inc/svx/xlnclit.hxx
svx/inc/svx/xlndsit.hxx
svx/inc/svx/xlnedcit.hxx
svx/inc/svx/xlnedit.hxx
svx/inc/svx/xlnedwit.hxx
svx/inc/svx/xlnstcit.hxx
svx/inc/svx/xlnstit.hxx
svx/inc/svx/xlnstwit.hxx
svx/inc/svx/xlnwtit.hxx
svx/inc/svx/xtextit0.hxx
svx/inc/svx/zoomitem.hxx
svx/inc/svx/zoomslideritem.hxx
svx/inc/xpolyimp.hxx
svx/inc/zoom_def.hxx
svx/prj/d.lst
svx/source/accessibility/AccessibleShape.cxx
svx/source/accessibility/DescriptionGenerator.cxx
svx/source/customshapes/EnhancedCustomShapeEngine.cxx
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
svx/source/dialog/_bmpmask.cxx
svx/source/dialog/_contdlg.cxx
svx/source/dialog/connctrl.cxx
svx/source/dialog/contwnd.cxx
svx/source/dialog/ctredlin.cxx
svx/source/dialog/ctredlin.hrc
svx/source/dialog/ctredlin.src
svx/source/dialog/dialcontrol.cxx
svx/source/dialog/dlgctrl.cxx
svx/source/dialog/docrecovery.cxx
svx/source/dialog/fntctrl.cxx
svx/source/dialog/fontwork.cxx
svx/source/dialog/frmsel.cxx
svx/source/dialog/graphctl.cxx
svx/source/dialog/grfflt.cxx
svx/source/dialog/hdft.cxx
svx/source/dialog/hyperdlg.cxx
svx/source/dialog/hyprdlg.hxx
svx/source/dialog/hyprlink.cxx
svx/source/dialog/hyprlink.hxx
svx/source/dialog/hyprlink.src
svx/source/dialog/imapdlg.cxx
svx/source/dialog/imapwnd.cxx
svx/source/dialog/linkwarn.hrc
svx/source/dialog/makefile.mk
svx/source/dialog/optgrid.cxx
svx/source/dialog/orienthelper.cxx
svx/source/dialog/pagectrl.cxx
svx/source/dialog/prtqry.cxx
svx/source/dialog/rlrcitem.cxx
svx/source/dialog/rubydialog.cxx
svx/source/dialog/rulritem.cxx
svx/source/dialog/simptabl.cxx
svx/source/dialog/srchdlg.cxx
svx/source/dialog/svxbmpnumvalueset.cxx
svx/source/dialog/svxruler.cxx
svx/source/dialog/swframeexample.cxx
svx/source/engine3d/float3d.cxx
svx/source/engine3d/float3d.src
svx/source/engine3d/svx3ditems.cxx
svx/source/fmcomp/gridctrl.cxx
svx/source/fmcomp/trace.cxx
svx/source/form/ParseContext.cxx
svx/source/form/datanavi.cxx
svx/source/form/filtnav.cxx
svx/source/form/fmexch.cxx
svx/source/form/fmexpl.cxx
svx/source/form/fmobjfac.cxx
svx/source/form/fmpage.cxx
svx/source/form/fmshell.cxx
svx/source/form/fmshimp.cxx
svx/source/form/fmsrcimp.cxx
svx/source/form/fmvwimp.cxx
svx/source/form/makefile.mk
svx/source/form/tabwin.cxx
svx/source/form/tbxform.cxx
svx/source/form/typemap.cxx
svx/source/gallery2/galbrws1.cxx
svx/source/gallery2/galbrws2.cxx
svx/source/gallery2/galexpl.cxx
svx/source/gallery2/gallery1.cxx
svx/source/gallery2/galtheme.cxx
svx/source/gallery2/makefile.mk
svx/source/gengal/gengal.cxx
svx/source/gengal/makefile.mk
svx/source/inc/fmgroup.hxx
svx/source/intro/about_ooo.hrc
svx/source/intro/iso.src
svx/source/intro/ooo.src
svx/source/items/SmartTagItem.cxx
svx/source/items/algitem.cxx
svx/source/items/chrtitem.cxx
svx/source/items/clipfmtitem.cxx
svx/source/items/customshapeitem.cxx
svx/source/items/drawitem.cxx
svx/source/items/e3ditem.cxx
svx/source/items/grfitem.cxx
svx/source/items/hlnkitem.cxx
svx/source/items/makefile.mk
svx/source/items/pageitem.cxx
svx/source/items/rotmodit.cxx
svx/source/items/viewlayoutitem.cxx
svx/source/items/zoomitem.cxx
svx/source/items/zoomslideritem.cxx
svx/source/src/app.hrc
svx/source/stbctrls/makefile.mk
svx/source/stbctrls/modctrl.cxx
svx/source/stbctrls/xmlsecctrl.cxx
svx/source/stbctrls/zoomctrl.cxx
svx/source/svdraw/clonelist.cxx
svx/source/svdraw/svdattr.cxx
svx/source/svdraw/svdcrtv.cxx
svx/source/svdraw/svdedtv1.cxx
svx/source/svdraw/svdedtv2.cxx
svx/source/svdraw/svdedxv.cxx
svx/source/svdraw/svdetc.cxx
svx/source/svdraw/svdfmtf.cxx
svx/source/svdraw/svdfmtf.hxx
svx/source/svdraw/svdglue.cxx
svx/source/svdraw/svdhdl.cxx
svx/source/svdraw/svdhlpln.cxx
svx/source/svdraw/svdibrow.cxx
svx/source/svdraw/svdlayer.cxx
svx/source/svdraw/svdmodel.cxx
svx/source/svdraw/svdoashp.cxx
svx/source/svdraw/svdobj.cxx
svx/source/svdraw/svdocapt.cxx
svx/source/svdraw/svdocirc.cxx
svx/source/svdraw/svdoedge.cxx
svx/source/svdraw/svdograf.cxx
svx/source/svdraw/svdogrp.cxx
svx/source/svdraw/svdomeas.cxx
svx/source/svdraw/svdomedia.cxx
svx/source/svdraw/svdopath.cxx
svx/source/svdraw/svdotext.cxx
svx/source/svdraw/svdotxdr.cxx
svx/source/svdraw/svdotxed.cxx
svx/source/svdraw/svdotxfl.cxx
svx/source/svdraw/svdotxln.cxx
svx/source/svdraw/svdotxtr.cxx
svx/source/svdraw/svdoutl.cxx
svx/source/svdraw/svdpage.cxx
svx/source/svdraw/svdpagv.cxx
svx/source/svdraw/svdpntv.cxx
svx/source/svdraw/svdpoev.cxx
svx/source/svdraw/svdsnpv.cxx
svx/source/svdraw/svdstr.src
svx/source/svdraw/svdtrans.cxx
svx/source/svdraw/svdundo.cxx
svx/source/svdraw/svdview.cxx
svx/source/svdraw/svdxcgv.cxx
svx/source/table/svdotable.cxx
svx/source/tbxctrls/colorwindow.hxx
svx/source/tbxctrls/extrusioncontrols.cxx
svx/source/tbxctrls/fillctrl.cxx
svx/source/tbxctrls/grafctrl.cxx
svx/source/tbxctrls/itemwin.cxx
svx/source/tbxctrls/layctrl.cxx
svx/source/tbxctrls/lboxctrl.cxx
svx/source/tbxctrls/linectrl.cxx
svx/source/tbxctrls/tbcontrl.cxx
svx/source/tbxctrls/verttexttbxctrl.cxx
svx/source/unodraw/unomod.cxx
svx/source/unodraw/unopage.cxx
svx/source/unodraw/unoprov.cxx
svx/source/unodraw/unoshape.cxx
svx/source/unodraw/unoshtxt.cxx
svx/source/xml/xmlxtexp.cxx
svx/source/xoutdev/_xpoly.cxx
svx/source/xoutdev/xattr.cxx
svx/source/xoutdev/xattr2.cxx
svx/source/xoutdev/xattrbmp.cxx
svx/source/xoutdev/xtabcolr.cxx
svx/util/makefile.mk
svx/workben/edittest.cxx
sysui/desktop/productversion.mk
ucb/prj/build.lst
ucb/source/cacher/cacheserv.cxx
ucb/source/core/ucb1.component
ucb/source/core/ucbserv.cxx
ucb/source/core/ucbstore.cxx
ucb/source/core/ucbstore.hxx
ucb/source/sorter/sortmain.cxx
ucb/source/ucp/file/prov.cxx
ucb/source/ucp/file/shell.cxx
ucb/source/ucp/ftp/ftpservices.cxx
ucb/source/ucp/gio/gio_provider.cxx
ucb/source/ucp/gvfs/gvfs_provider.cxx
ucb/source/ucp/hierarchy/hierarchyservices.cxx
ucb/source/ucp/odma/odma_lib.cxx
ucb/source/ucp/odma/odma_services.cxx
ucb/source/ucp/package/pkgservices.cxx
ucb/source/ucp/tdoc/tdoc_services.cxx
ucb/source/ucp/webdav/ContentProperties.cxx
ucb/source/ucp/webdav/NeonHeadRequest.cxx
ucb/source/ucp/webdav/webdavcontent.cxx
ucb/source/ucp/webdav/webdavservices.cxx
uui/source/iahndl.cxx
uui/source/iahndl.hxx
uui/source/loginerr.hxx
uui/source/nameclashdlg.hxx
uui/source/passcrtdlg.cxx
uui/source/passworddlg.cxx
uui/source/passworddlg.hxx
uui/source/services.cxx
vbahelper/inc/vbahelper/vbahelper.hxx
vbahelper/prj/build.lst
vbahelper/prj/d.lst
vbahelper/source/msforms/makefile.mk
vbahelper/source/msforms/vbauserform.cxx
vbahelper/source/vbahelper/makefile.mk
vbahelper/source/vbahelper/vbaapplicationbase.cxx
vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
vbahelper/source/vbahelper/vbadocumentbase.cxx
vbahelper/source/vbahelper/vbadocumentsbase.cxx
vbahelper/source/vbahelper/vbahelper.cxx
vbahelper/util/makefile.mk
xmlhelp/source/cxxhelp/provider/databases.cxx
xmlhelp/source/cxxhelp/provider/services.cxx
xmlhelp/source/treeview/tvfactory.cxx
xmloff/JunitTest_xmloff_unoapi.mk
xmloff/inc/functional.hxx
xmloff/inc/xmloff/formlayerexport.hxx
xmloff/inc/xmloff/formlayerimport.hxx
xmloff/inc/xmloff/functional.hxx
xmloff/inc/xmloff/shapeimport.hxx
xmloff/inc/xmloff/xmlcnitm.hxx
xmloff/inc/xmloff/xmlnumfi.hxx
xmloff/prj/build.lst
xmloff/source/chart/SchXMLChartContext.cxx
xmloff/source/chart/SchXMLExport.cxx
xmloff/source/chart/SchXMLImport.cxx
xmloff/source/chart/SchXMLLegendContext.hxx
xmloff/source/chart/SchXMLPlotAreaContext.cxx
xmloff/source/core/xmluconv.cxx
xmloff/source/draw/sdxmlexp.cxx
xmloff/source/draw/shapeexport4.cxx
xmloff/source/draw/ximp3dobject.cxx
xmloff/source/draw/ximp3dscene.cxx
xmloff/source/forms/formlayerexport.cxx
xmloff/source/forms/formlayerimport.cxx
xmloff/source/forms/handler/vcl_time_handler.hxx
xmloff/source/forms/layerimport.cxx
xmloff/source/forms/layerimport.hxx
xmloff/source/forms/property_meta_data.hxx
xmloff/source/style/PageHeaderFooterContext.cxx
xmloff/source/style/PageMasterStyleMap.cxx
xmloff/source/style/prstylei.cxx
xmloff/source/style/xmlimppr.cxx
xmloff/source/style/xmlnumfi.cxx
xmloff/source/style/xmlstyle.cxx
xmloff/source/table/tabledesignsimporter.cxx
xmloff/source/text/XMLTextNumRuleInfo.cxx
xmloff/source/text/XMLTextShapeStyleContext.cxx
xmloff/source/text/txtstyle.cxx
xmloff/source/transform/ChartOOoTContext.cxx
xmloff/source/transform/EventOOoTContext.cxx
xmloff/source/transform/TransformerBase.cxx
xmloff/util/makefile.mk
xmlscript/util/xcr.component
Diffstat (limited to 'xmloff/source/forms')
61 files changed, 1677 insertions, 351 deletions
diff --git a/xmloff/source/forms/attriblistmerge.cxx b/xmloff/source/forms/attriblistmerge.cxx index 7fe1a17382a9..7fe1a17382a9 100644..100755 --- a/xmloff/source/forms/attriblistmerge.cxx +++ b/xmloff/source/forms/attriblistmerge.cxx diff --git a/xmloff/source/forms/attriblistmerge.hxx b/xmloff/source/forms/attriblistmerge.hxx index d91917365309..d91917365309 100644..100755 --- a/xmloff/source/forms/attriblistmerge.hxx +++ b/xmloff/source/forms/attriblistmerge.hxx diff --git a/xmloff/source/forms/callbacks.hxx b/xmloff/source/forms/callbacks.hxx index 4bf0f7de2690..4bf0f7de2690 100644..100755 --- a/xmloff/source/forms/callbacks.hxx +++ b/xmloff/source/forms/callbacks.hxx diff --git a/xmloff/source/forms/controlelement.cxx b/xmloff/source/forms/controlelement.cxx index 065b23c53055..7c7e82b9b9a8 100644..100755 --- a/xmloff/source/forms/controlelement.cxx +++ b/xmloff/source/forms/controlelement.cxx @@ -60,6 +60,8 @@ namespace xmloff case HIDDEN: return "hidden"; case GRID: return "grid"; case VALUERANGE: return "value-range"; + case TIME: return "time"; + case DATE: return "date"; default: return "generic-control"; } diff --git a/xmloff/source/forms/controlelement.hxx b/xmloff/source/forms/controlelement.hxx index 65e5cf678323..3da3d6874ccc 100644..100755 --- a/xmloff/source/forms/controlelement.hxx +++ b/xmloff/source/forms/controlelement.hxx @@ -64,6 +64,8 @@ namespace xmloff GRID, VALUERANGE, GENERIC_CONTROL, + TIME, + DATE, UNKNOWN // must be the last element }; diff --git a/xmloff/source/forms/controlpropertyhdl.cxx b/xmloff/source/forms/controlpropertyhdl.cxx index 8823e7623765..8823e7623765 100644..100755 --- a/xmloff/source/forms/controlpropertyhdl.cxx +++ b/xmloff/source/forms/controlpropertyhdl.cxx diff --git a/xmloff/source/forms/controlpropertymap.cxx b/xmloff/source/forms/controlpropertymap.cxx index 0c6c871bd50c..abc9f60a14e4 100644..100755 --- a/xmloff/source/forms/controlpropertymap.cxx +++ b/xmloff/source/forms/controlpropertymap.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> #include <xmloff/maptype.hxx> #include <xmloff/xmltypes.hxx> diff --git a/xmloff/source/forms/controlpropertymap.hxx b/xmloff/source/forms/controlpropertymap.hxx index 16975e2560bd..16975e2560bd 100644..100755 --- a/xmloff/source/forms/controlpropertymap.hxx +++ b/xmloff/source/forms/controlpropertymap.hxx diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index 2142b2ee5b5e..546fa21d4c82 100644..100755 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -31,12 +31,13 @@ #include "elementexport.hxx" #include "strings.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "eventexport.hxx" #include "formenums.hxx" #include "formcellbinding.hxx" #include "formcellbinding.hxx" -#include "xformsexport.hxx" +#include "xmloff/xformsexport.hxx" +#include "property_meta_data.hxx" /** === begin UNO includes === **/ #include <com/sun/star/text/XText.hpp> @@ -323,6 +324,9 @@ namespace xmloff #endif } + // "new-style" properties ... + exportGenericHandlerAttributes(); + // common control attributes exportCommonControlAttributes(); @@ -476,6 +480,84 @@ namespace xmloff } //--------------------------------------------------------------------- + void OControlExport::exportGenericHandlerAttributes() + { + const Sequence< Property > aProperties = m_xPropertyInfo->getProperties(); + for ( const Property* prop = aProperties.getConstArray(); + prop != aProperties.getConstArray() + aProperties.getLength(); + ++prop + ) + { + try + { + // see if this property can already be handled with an IPropertyHandler (which, on the long + // term, should be the case for most, if not all, properties) + const PropertyDescription* propDescription = metadata::getPropertyDescription( prop->Name ); + if ( propDescription == NULL ) + continue; + + // let the factory provide the concrete handler. Note that caching, if desired, is the task + // of the factory + PPropertyHandler handler = (*propDescription->factory)( propDescription->propertyId ); + ENSURE_OR_CONTINUE( handler.get() != NULL, + "OControlExport::exportGenericHandlerAttributes: invalid property handler provided by the factory!" ); + + ::rtl::OUString attributeValue; + if ( propDescription->propertyGroup == NO_GROUP ) + { + // that's a property which has a direct mapping to an attribute + if ( !shouldExportProperty( prop->Name ) ) + // TODO: in the future, we surely need a more sophisticated approach to this, involving the property + // handler, or the property description + { + exportedProperty( prop->Name ); + continue; + } + + const Any propValue = m_xProps->getPropertyValue( prop->Name ); + attributeValue = handler->getAttributeValue( propValue ); + } + else + { + // that's a property which is part of a group of properties, whose values, in their entity, comprise + // a single attribute value + + // retrieve the descriptions of all other properties which add to the attribute value + PropertyDescriptionList descriptions; + metadata::getPropertyGroup( propDescription->propertyGroup, descriptions ); + + // retrieve the values for all those properties + PropertyValues aValues; + for ( PropertyDescriptionList::iterator desc = descriptions.begin(); + desc != descriptions.end(); + ++desc + ) + { + // TODO: XMultiPropertySet? + const Any propValue = m_xProps->getPropertyValue( (*desc)->propertyName ); + aValues[ (*desc)->propertyId ] = propValue; + } + + // let the handler translate into an XML attribute value + attributeValue = handler->getAttributeValue( aValues ); + } + + AddAttribute( + propDescription->attribute.namespacePrefix, + token::GetXMLToken( propDescription->attribute.attributeToken ), + attributeValue + ); + + exportedProperty( prop->Name ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + } + + //--------------------------------------------------------------------- void OControlExport::exportCommonControlAttributes() { size_t i=0; @@ -1414,21 +1496,35 @@ namespace xmloff m_nClassId = FormComponentType::CONTROL; DBG_CHECK_PROPERTY( PROPERTY_CLASSID, sal_Int16 ); m_xProps->getPropertyValue(PROPERTY_CLASSID) >>= m_nClassId; + bool knownType = false; switch (m_nClassId) { case FormComponentType::DATEFIELD: + m_eType = DATE; + knownType = true; + // NO BREAK case FormComponentType::TIMEFIELD: + if ( !knownType ) + { + m_eType = TIME; + knownType = true; + } + m_nIncludeSpecial |= SCA_VALIDATION; + // NO BREAK case FormComponentType::NUMERICFIELD: case FormComponentType::CURRENCYFIELD: case FormComponentType::PATTERNFIELD: - m_eType = FORMATTED_TEXT; + if ( !knownType ) + { + m_eType = FORMATTED_TEXT; + knownType = true; + } // NO BREAK case FormComponentType::TEXTFIELD: { // it's some kind of edit. To know which type we need further investigation - if (FORMATTED_TEXT != m_eType) - { // not coming from the previous cases which had a class id .ne. TEXTFIELD - + if ( !knownType ) + { // check if it's a formatted field if (m_xPropertyInfo->hasPropertyByName(PROPERTY_FORMATKEY)) { @@ -1464,14 +1560,21 @@ namespace xmloff m_eType = TEXT; } } + knownType = true; } - // attributes which are common to all the four types: + // attributes which are common to all the types: // common attributes m_nIncludeCommon = - CCA_NAME | CCA_SERVICE_NAME | CCA_DISABLED | CCA_VALUE | + CCA_NAME | CCA_SERVICE_NAME | CCA_DISABLED | CCA_PRINTABLE | CCA_TAB_INDEX | CCA_TAB_STOP | CCA_TITLE; + if ( ( m_nClassId != FormComponentType::DATEFIELD ) + && ( m_nClassId != FormComponentType::TIMEFIELD ) + ) + // date and time field values are handled differently nowadays + m_nIncludeCommon |= CCA_VALUE; + // database attributes m_nIncludeDatabase = DA_DATA_FIELD | DA_INPUT_REQUIRED; @@ -1495,8 +1598,7 @@ namespace xmloff // max and min values and validation: if (FORMATTED_TEXT == m_eType) { // in general all controls represented as formatted-text have these props - if (FormComponentType::PATTERNFIELD != m_nClassId) - // but the PatternField does not have value limits + if ( FormComponentType::PATTERNFIELD != m_nClassId ) // except the PatternField m_nIncludeSpecial |= SCA_MAX_VALUE | SCA_MIN_VALUE; if (FormComponentType::TEXTFIELD != m_nClassId) @@ -1505,8 +1607,13 @@ namespace xmloff } // if it's not a password field or rich text control, the CurrentValue needs to be stored, too - if ( PASSWORD != m_eType ) + if ( ( PASSWORD != m_eType ) + && ( DATE != m_eType ) + && ( TIME != m_eType ) + ) + { m_nIncludeCommon |= CCA_CURRENT_VALUE; + } } break; diff --git a/xmloff/source/forms/elementexport.hxx b/xmloff/source/forms/elementexport.hxx index dfc0f0ef26ad..979812b0c3ad 100644..100755 --- a/xmloff/source/forms/elementexport.hxx +++ b/xmloff/source/forms/elementexport.hxx @@ -162,6 +162,13 @@ namespace xmloff */ void exportSubTags() throw (::com::sun::star::uno::Exception); + /** adds the attributes which are handled via generic IPropertyHandlers + + <p>In the future, this really should be *all* attribiutes, instead of this shitload of + hand-crafted code we have currently ...</p> + */ + void exportGenericHandlerAttributes(); + /** adds common control attributes to the XMLExport context given <p>The attribute list of the context is not cleared initially, this is the responsibility of the caller.</p> diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 3ab4a9f6506e..4b1c586d312e 100644..100755 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -29,22 +29,21 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include <algorithm> #include "elementimport.hxx" -#include <xmloff/xmlimp.hxx> -#include <xmloff/nmspmap.hxx> -#include <xmloff/xmluconv.hxx> +#include "xmloff/xmlimp.hxx" +#include "xmloff/nmspmap.hxx" +#include "xmloff/xmluconv.hxx" #include "strings.hxx" #include "callbacks.hxx" #include "attriblistmerge.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include "eventimport.hxx" -#include <xmloff/txtstyli.hxx> +#include "xmloff/txtstyli.hxx" #include "formenums.hxx" -#include <xmloff/xmltoken.hxx> +#include "xmloff/xmltoken.hxx" #include "gridcolumnproptranslator.hxx" -#include <comphelper/extract.hxx> -#include <comphelper/types.hxx> +#include "property_description.hxx" +#include "property_meta_data.hxx" /** === begin UNO includes === **/ #include <com/sun/star/text/XText.hpp> @@ -55,9 +54,13 @@ #include <com/sun/star/beans/XPropertyContainer.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> /** === end UNO includes === **/ + #include <tools/urlobj.hxx> +#include <tools/diagnose_ex.h> #include <tools/time.hxx> #include <rtl/logfile.hxx> +#include <comphelper/extract.hxx> +#include <comphelper/types.hxx> #include <algorithm> #include <functional> @@ -158,6 +161,7 @@ namespace xmloff ,m_rEventManager(_rEventManager) ,m_pStyleElement( NULL ) ,m_xParentContainer(_rxParentContainer) + ,m_bImplicitGenericAttributeHandling( true ) { OSL_ENSURE(m_xParentContainer.is(), "OElementImport::OElementImport: invalid parent container!"); } @@ -168,17 +172,41 @@ namespace xmloff } //--------------------------------------------------------------------- + ::rtl::OUString OElementImport::determineDefaultServiceName() const + { + return ::rtl::OUString(); + } + + //--------------------------------------------------------------------- void OElementImport::StartElement(const Reference< sax::XAttributeList >& _rxAttrList) { ENTER_LOG_CONTEXT( "xmloff::OElementImport - importing one element" ); - // call the base class. This should give us enough information (especially the service name) - // to create our UNO element - OPropertyImport::StartElement(_rxAttrList); - // create the element + const SvXMLNamespaceMap& rMap = m_rContext.getGlobalContext().GetNamespaceMap(); + const ::rtl::OUString sImplNameAttribute = rMap.GetQNameByKey( XML_NAMESPACE_FORM, GetXMLToken( XML_CONTROL_IMPLEMENTATION ) ); + const ::rtl::OUString sControlImplementation = _rxAttrList->getValueByName( sImplNameAttribute ); + + // retrieve the service name + if ( sControlImplementation.getLength() > 0 ) + { + ::rtl::OUString sOOoImplementationName; + const sal_uInt16 nImplPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sControlImplementation, &sOOoImplementationName ); + m_sServiceName = ( nImplPrefix == XML_NAMESPACE_OOO ) ? sOOoImplementationName : sControlImplementation; + } + + if ( !m_sServiceName.getLength() ) + determineDefaultServiceName(); + + // create the object *now*. This allows setting properties in the various handleAttribute methods. + // (Though currently not all code is migrated to this pattern, most attributes are still handled + // by remembering the value (via implPushBackPropertyValue), and setting the correct property value + // later (in OControlImport::StartElement).) m_xElement = createElement(); - if ( !m_xInfo.is() && m_xElement.is() ) + if ( m_xElement.is() ) m_xInfo = m_xElement->getPropertySetInfo(); + + // call the base class + OPropertyImport::StartElement( _rxAttrList ); } //--------------------------------------------------------------------- @@ -198,26 +226,61 @@ namespace xmloff if (!m_xElement.is()) return; + // apply the non-generic properties + implApplySpecificProperties(); + + // set the generic properties + implApplyGenericProperties(); + + // set the style properties + if ( m_pStyleElement && m_xElement.is() ) + { + Reference< XPropertySet > xPropTranslation = + new OGridColumnPropertyTranslator( Reference< XMultiPropertySet >( m_xElement, UNO_QUERY ) ); + const_cast< XMLTextStyleContext* >( m_pStyleElement )->FillPropertySet( xPropTranslation ); + + const ::rtl::OUString sNumberStyleName = const_cast< XMLTextStyleContext* >( m_pStyleElement )->GetDataStyleName( ); + if ( sNumberStyleName.getLength() ) + // the style also has a number (sub) style + m_rContext.applyControlNumberStyle( m_xElement, sNumberStyleName ); + } + + // insert the element into the parent container + if (!m_sName.getLength()) + { + OSL_ENSURE(sal_False, "OElementImport::EndElement: did not find a name attribute!"); + m_sName = implGetDefaultName(); + } + + m_xParentContainer->insertByName(m_sName, makeAny(m_xElement)); + LEAVE_LOG_CONTEXT( ); + } + + //--------------------------------------------------------------------- + void OElementImport::implApplySpecificProperties() + { + if ( m_aValues.empty() ) + return; + // set all the properties we collected #if OSL_DEBUG_LEVEL > 0 // check if the object has all the properties // (We do this in the non-pro version only. Doing it all the time would be much to expensive) if ( m_xInfo.is() ) { - PropertyValueArray::iterator aEnd = m_aValues.end(); + PropertyValueArray::const_iterator aEnd = m_aValues.end(); for ( PropertyValueArray::iterator aCheck = m_aValues.begin(); aCheck != aEnd; ++aCheck ) { OSL_ENSURE(m_xInfo->hasPropertyByName(aCheck->Name), - ::rtl::OString("OElementImport::EndElement: read a property (") + ::rtl::OString("OElementImport::implApplySpecificProperties: read a property (") += ::rtl::OString(aCheck->Name.getStr(), aCheck->Name.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString(") which does not exist on the element!")); } } #endif - OSL_ENSURE(!m_aValues.empty(), "OElementImport::EndElement: no properties read!"); // set the properties const Reference< XMultiPropertySet > xMultiProps(m_xElement, UNO_QUERY); @@ -254,7 +317,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, "OElementImport::EndElement: could not set the properties (using the XMultiPropertySet)!"); + OSL_ENSURE(sal_False, "OElementImport::implApplySpecificProperties: could not set the properties (using the XMultiPropertySet)!"); } } @@ -275,42 +338,16 @@ namespace xmloff catch(Exception&) { OSL_ENSURE(sal_False, - ::rtl::OString("OElementImport::EndElement: could not set the property \"") + ::rtl::OString("OElementImport::implApplySpecificProperties: could not set the property \"") += ::rtl::OString(aPropValues->Name.getStr(), aPropValues->Name.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString("\"!")); } } } - - // set the generic properties - implImportGenericProperties(); - - // set the style properties - if ( m_pStyleElement && m_xElement.is() ) - { - Reference< XPropertySet > xPropTranslation = - new OGridColumnPropertyTranslator( Reference< XMultiPropertySet >( m_xElement, UNO_QUERY ) ); - const_cast< XMLTextStyleContext* >( m_pStyleElement )->FillPropertySet( xPropTranslation ); - - const ::rtl::OUString sNumberStyleName = const_cast< XMLTextStyleContext* >( m_pStyleElement )->GetDataStyleName( ); - if ( sNumberStyleName.getLength() ) - // the style also has a number (sub) style - m_rContext.applyControlNumberStyle( m_xElement, sNumberStyleName ); - } - - // insert the element into the parent container - if (!m_sName.getLength()) - { - OSL_ENSURE(sal_False, "OElementImport::EndElement: did not find a name attribute!"); - m_sName = implGetDefaultName(); - } - - m_xParentContainer->insertByName(m_sName, makeAny(m_xElement)); - LEAVE_LOG_CONTEXT( ); } //--------------------------------------------------------------------- - void OElementImport::implImportGenericProperties() + void OElementImport::implApplyGenericProperties() { if ( m_aGenericValues.empty() ) return; @@ -335,7 +372,7 @@ namespace xmloff if ( !xDynamicProperties.is() ) { #if OSL_DEBUG_LEVEL > 0 - ::rtl::OString aMessage( "OElementImport::implImportGenericProperties: encountered an unknown property (" ); + ::rtl::OString aMessage( "OElementImport::implApplyGenericProperties: encountered an unknown property (" ); aMessage += ::rtl::OUStringToOString( aPropValues->Name, RTL_TEXTENCODING_ASCII_US ); aMessage += "), but component is no PropertyBag!"; OSL_ENSURE( false, aMessage.getStr() ); @@ -353,7 +390,7 @@ namespace xmloff m_xInfo = m_xElement->getPropertySetInfo(); } - // determine the type of the value (source forthe following conversion) + // determine the type of the value (source for the following conversion) TypeClass eValueTypeClass = aPropValues->Value.getValueTypeClass(); const sal_Bool bValueIsSequence = TypeClass_SEQUENCE == eValueTypeClass; if ( bValueIsSequence ) @@ -362,7 +399,7 @@ namespace xmloff eValueTypeClass = aSimpleType.getTypeClass(); } - // determine the type of the property (target forthe following conversion) + // determine the type of the property (target for the following conversion) const Property aProperty( m_xInfo->getPropertyByName( aPropValues->Name ) ); TypeClass ePropTypeClass = aProperty.Type.getTypeClass(); const sal_Bool bPropIsSequence = TypeClass_SEQUENCE == ePropTypeClass; @@ -374,18 +411,18 @@ namespace xmloff if ( bPropIsSequence != bValueIsSequence ) { - OSL_ENSURE( false, "OElementImport::implImportGenericProperties: either both value and property should be a sequence, or none of them!" ); + OSL_ENSURE( false, "OElementImport::implApplyGenericProperties: either both value and property should be a sequence, or none of them!" ); continue; } if ( bValueIsSequence ) { OSL_ENSURE( eValueTypeClass == TypeClass_ANY, - "OElementImport::implImportGenericProperties: only ANYs should have been imported as generic list property!" ); + "OElementImport::implApplyGenericProperties: only ANYs should have been imported as generic list property!" ); // (OPropertyImport should produce only Sequencer< Any >, since it cannot know the real type OSL_ENSURE( ePropTypeClass == TypeClass_SHORT, - "OElementImport::implImportGenericProperties: conversion to sequences other than 'sequence< short >' not implemented, yet!" ); + "OElementImport::implApplyGenericProperties: conversion to sequences other than 'sequence< short >' not implemented, yet!" ); Sequence< Any > aXMLValueList; aPropValues->Value >>= aXMLValueList; @@ -428,13 +465,13 @@ namespace xmloff aPropValues->Value <<= static_cast< sal_Int64 >( nVal ); break; default: - OSL_ENSURE( false, "OElementImport::implImportGenericProperties: unsupported value type!" ); + OSL_ENSURE( false, "OElementImport::implApplyGenericProperties: unsupported value type!" ); break; } } break; default: - OSL_ENSURE( false, "OElementImport::implImportGenericProperties: non-double values not supported!" ); + OSL_ENSURE( false, "OElementImport::implApplyGenericProperties: non-double values not supported!" ); break; } } @@ -485,38 +522,117 @@ namespace xmloff } //--------------------------------------------------------------------- - void OElementImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + PropertyGroups::const_iterator OElementImport::impl_matchPropertyGroup( const PropertyGroups& i_propertyGroups ) const { - if (!m_sServiceName.getLength() && - token::IsXMLToken( _rLocalName, token::XML_CONTROL_IMPLEMENTATION)) - { // it's the service name + ENSURE_OR_RETURN( m_xInfo.is(), "OElementImport::impl_matchPropertyGroup: no property set info!", i_propertyGroups.end() ); - ::rtl::OUString sImplName; - const sal_uInt16 nImplPrefix = - GetImport().GetNamespaceMap().GetKeyByAttrName( _rValue, - &sImplName ); - m_sServiceName = XML_NAMESPACE_OOO==nImplPrefix ? sImplName - :_rValue; + for ( PropertyGroups::const_iterator group = i_propertyGroups.begin(); + group != i_propertyGroups.end(); + ++group + ) + { + bool missingProp = false; + for ( PropertyDescriptionList::const_iterator prop = group->begin(); + prop != group->end(); + ++prop + ) + { + if ( !m_xInfo->hasPropertyByName( (*prop)->propertyName ) ) + { + missingProp = true; + break; + } + } + + if ( missingProp ) + // try next group + continue; + + return group; } - else + + return i_propertyGroups.end(); + } + + //--------------------------------------------------------------------- + bool OElementImport::tryGenericAttribute( sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue ) + { + // the generic approach (which I hope all props will be migrated to, on the medium term): property handlers + const AttributeDescription attribute( metadata::getAttributeDescription( _nNamespaceKey, _rLocalName ) ); + if ( attribute.attributeToken != XML_TOKEN_INVALID ) { - if (!m_sName.getLength() && - token::IsXMLToken( _rLocalName, token::XML_NAME)) - // remember the name for later use in EndElement - m_sName = _rValue; + PropertyGroups propertyGroups; + metadata::getPropertyGroupList( attribute, propertyGroups ); + const PropertyGroups::const_iterator pos = impl_matchPropertyGroup( propertyGroups ); + if ( pos == propertyGroups.end() ) + return false; - // maybe it's the style attribute? - if ( token::IsXMLToken( _rLocalName, token::XML_TEXT_STYLE_NAME ) ) + do { - const SvXMLStyleContext* pStyleContext = m_rContext.getStyleElement( _rValue ); - OSL_ENSURE( pStyleContext, "OPropertyImport::handleAttribute: do not know the style!" ); - // remember the element for later usage. - m_pStyleElement = PTR_CAST( XMLTextStyleContext, pStyleContext ); + const PropertyDescriptionList& rProperties( *pos ); + const PropertyDescription* first = *rProperties.begin(); + ENSURE_OR_BREAK( first != NULL, "OElementImport::handleAttribute: invalid property description!" ); + const PPropertyHandler handler = (*first->factory)( first->propertyId ); + ENSURE_OR_BREAK( handler.get() != NULL, "OElementImport::handleAttribute: invalid property handler!" ); + + PropertyValues aValues; + for ( PropertyDescriptionList::const_iterator propDesc = rProperties.begin(); + propDesc != rProperties.end(); + ++propDesc + ) + { + aValues[ (*propDesc)->propertyId ] = Any(); + } + if ( handler->getPropertyValues( _rValue, aValues ) ) + { + for ( PropertyDescriptionList::const_iterator propDesc = rProperties.begin(); + propDesc != rProperties.end(); + ++propDesc + ) + { + implPushBackPropertyValue( (*propDesc)->propertyName, aValues[ (*propDesc)->propertyId ] ); + } + } } - else - // let the base class handle it - OPropertyImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); + while ( false ); + + // handled + return true; } + return false; + } + + //--------------------------------------------------------------------- + bool OElementImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + { + if ( token::IsXMLToken( _rLocalName, token::XML_CONTROL_IMPLEMENTATION ) ) + // ignore this, it has already been handled in OElementImport::StartElement + return true; + + if ( token::IsXMLToken( _rLocalName, token::XML_NAME ) ) + { + if ( !m_sName.getLength() ) + // remember the name for later use in EndElement + m_sName = _rValue; + return true; + } + + // maybe it's the style attribute? + if ( token::IsXMLToken( _rLocalName, token::XML_TEXT_STYLE_NAME ) ) + { + const SvXMLStyleContext* pStyleContext = m_rContext.getStyleElement( _rValue ); + OSL_ENSURE( pStyleContext, "OElementImport::handleAttribute: do not know the style!" ); + // remember the element for later usage. + m_pStyleElement = PTR_CAST( XMLTextStyleContext, pStyleContext ); + return true; + } + + if ( m_bImplicitGenericAttributeHandling ) + if ( tryGenericAttribute( _nNamespaceKey, _rLocalName, _rValue ) ) + return true; + + // let the base class handle it + return OPropertyImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); } //--------------------------------------------------------------------- @@ -554,7 +670,7 @@ namespace xmloff { ::rtl::OUString sLocalAttrName = ::rtl::OUString::createFromAscii(_pAttributeName); if ( !encounteredAttribute( sLocalAttrName ) ) - handleAttribute( XML_NAMESPACE_FORM, sLocalAttrName, ::rtl::OUString::createFromAscii( _pAttributeDefault ) ); + OSL_VERIFY( handleAttribute( XML_NAMESPACE_FORM, sLocalAttrName, ::rtl::OUString::createFromAscii( _pAttributeDefault ) ) ); } } @@ -567,6 +683,7 @@ namespace xmloff :OElementImport(_rImport, _rEventManager, _nPrefix, _rName, _rxParentContainer) ,m_eElementType(OControlElement::UNKNOWN) { + disableImplicitGenericAttributeHandling(); } //--------------------------------------------------------------------- @@ -575,6 +692,38 @@ namespace xmloff :OElementImport(_rImport, _rEventManager, _nPrefix, _rName, _rxParentContainer) ,m_eElementType(_eType) { + disableImplicitGenericAttributeHandling(); + } + + //--------------------------------------------------------------------- + ::rtl::OUString OControlImport::determineDefaultServiceName() const + { + const sal_Char* pServiceName = NULL; + switch ( m_eElementType ) + { + case OControlElement::TEXT: + case OControlElement::TEXT_AREA: + case OControlElement::PASSWORD: pServiceName = "com.sun.star.form.component.TextField"; break; + case OControlElement::FILE: pServiceName = "com.sun.star.form.component.FileControl"; break; + case OControlElement::FORMATTED_TEXT: pServiceName = "com.sun.star.form.component.FormattedField"; break; + case OControlElement::FIXED_TEXT: pServiceName = "com.sun.star.form.component.FixedText"; break; + case OControlElement::COMBOBOX: pServiceName = "com.sun.star.form.component.ComboBox"; break; + case OControlElement::LISTBOX: pServiceName = "com.sun.star.form.component.ListBox"; break; + case OControlElement::BUTTON: pServiceName = "com.sun.star.form.component.CommandButton"; break; + case OControlElement::IMAGE: pServiceName = "com.sun.star.form.component.ImageButton"; break; + case OControlElement::CHECKBOX: pServiceName = "com.sun.star.form.component.CheckBox"; break; + case OControlElement::RADIO: pServiceName = "com.sun.star.form.component.RadioButton"; break; + case OControlElement::FRAME: pServiceName = "com.sun.star.form.component.GroupBox"; break; + case OControlElement::IMAGE_FRAME: pServiceName = "com.sun.star.form.component.DatabaseImageControl"; break; + case OControlElement::HIDDEN: pServiceName = "com.sun.star.form.component.HiddenControl"; break; + case OControlElement::GRID: pServiceName = "com.sun.star.form.component.GridControl"; break; + case OControlElement::TIME: pServiceName = "com.sun.star.form.component.DateField"; break; + case OControlElement::DATE: pServiceName = "com.sun.star.form.component.TimeField"; break; + default: break; + } + if ( pServiceName != NULL ) + return ::rtl::OUString::createFromAscii( pServiceName ); + return ::rtl::OUString(); } //--------------------------------------------------------------------- @@ -585,7 +734,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void OControlImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + bool OControlImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { static const sal_Char* pLinkedCellAttributeName = OAttributeMetaData::getBindingAttributeName(BA_LINKED_CELL); @@ -602,66 +751,84 @@ namespace xmloff m_sControlId = _rValue; } } + return true; } - else if ( _rLocalName.equalsAscii( pLinkedCellAttributeName ) ) + + if ( _rLocalName.equalsAscii( pLinkedCellAttributeName ) ) { // it's the address of a spreadsheet cell m_sBoundCellAddress = _rValue; + return true; } - else if ( _nNamespaceKey == XML_NAMESPACE_XFORMS && IsXMLToken( _rLocalName, XML_BIND ) ) + + if ( _nNamespaceKey == XML_NAMESPACE_XFORMS && IsXMLToken( _rLocalName, XML_BIND ) ) { m_sBindingID = _rValue; + return true; } - else if ( _nNamespaceKey == XML_NAMESPACE_FORM && IsXMLToken( _rLocalName, XML_XFORMS_LIST_SOURCE ) ) + + if ( _nNamespaceKey == XML_NAMESPACE_FORM && IsXMLToken( _rLocalName, XML_XFORMS_LIST_SOURCE ) ) { m_sListBindingID = _rValue; + return true; } - else if ( (_nNamespaceKey == XML_NAMESPACE_FORM && IsXMLToken( _rLocalName, XML_XFORMS_SUBMISSION ) ) || - ( _nNamespaceKey == XML_NAMESPACE_XFORMS && IsXMLToken( _rLocalName, XML_SUBMISSION ) ) ) + + if ( ( ( _nNamespaceKey == XML_NAMESPACE_FORM ) + && IsXMLToken( _rLocalName, XML_XFORMS_SUBMISSION ) + ) + || ( ( _nNamespaceKey == XML_NAMESPACE_XFORMS ) + && IsXMLToken( _rLocalName, XML_SUBMISSION ) + ) + ) { m_sSubmissionID = _rValue; + return true; } - else + + if ( OElementImport::tryGenericAttribute( _nNamespaceKey, _rLocalName, _rValue ) ) + return true; + + static const sal_Char* pValueAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCA_VALUE); + static const sal_Char* pCurrentValueAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCA_CURRENT_VALUE); + static const sal_Char* pMinValueAttributeName = OAttributeMetaData::getSpecialAttributeName(SCA_MIN_VALUE); + static const sal_Char* pMaxValueAttributeName = OAttributeMetaData::getSpecialAttributeName(SCA_MAX_VALUE); + static const sal_Char* pRepeatDelayAttributeName = OAttributeMetaData::getSpecialAttributeName( SCA_REPEAT_DELAY ); + + sal_Int32 nHandle = -1; + if ( _rLocalName.equalsAscii( pValueAttributeName ) ) + nHandle = PROPID_VALUE; + else if ( _rLocalName.equalsAscii( pCurrentValueAttributeName ) ) + nHandle = PROPID_CURRENT_VALUE; + else if ( _rLocalName.equalsAscii( pMinValueAttributeName ) ) + nHandle = PROPID_MIN_VALUE; + else if ( _rLocalName.equalsAscii( pMaxValueAttributeName ) ) + nHandle = PROPID_MAX_VALUE; + if ( nHandle != -1 ) { - static const sal_Char* pValueAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCA_VALUE); - static const sal_Char* pCurrentValueAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCA_CURRENT_VALUE); - static const sal_Char* pMinValueAttributeName = OAttributeMetaData::getSpecialAttributeName(SCA_MIN_VALUE); - static const sal_Char* pMaxValueAttributeName = OAttributeMetaData::getSpecialAttributeName(SCA_MAX_VALUE); - static const sal_Char* pRepeatDelayAttributeName = OAttributeMetaData::getSpecialAttributeName( SCA_REPEAT_DELAY ); - - sal_Int32 nHandle = -1; - if ( _rLocalName.equalsAscii( pValueAttributeName ) ) - nHandle = PROPID_VALUE; - else if ( _rLocalName.equalsAscii( pCurrentValueAttributeName ) ) - nHandle = PROPID_CURRENT_VALUE; - else if ( _rLocalName.equalsAscii( pMinValueAttributeName ) ) - nHandle = PROPID_MIN_VALUE; - else if ( _rLocalName.equalsAscii( pMaxValueAttributeName ) ) - nHandle = PROPID_MAX_VALUE; - if ( nHandle != -1 ) + // for the moment, simply remember the name and the value + PropertyValue aProp; + aProp.Name = _rLocalName; + aProp.Handle = nHandle; + aProp.Value <<= _rValue; + m_aValueProperties.push_back(aProp); + return true; + } + + if ( _rLocalName.equalsAscii( pRepeatDelayAttributeName ) ) + { + ::Time aTime; + sal_Int32 nFractions = 0; + if ( SvXMLUnitConverter::convertTimeDuration( _rValue, aTime, &nFractions ) ) { - // for the moment, simply remember the name and the value PropertyValue aProp; - aProp.Name = _rLocalName; - aProp.Handle = nHandle; - aProp.Value <<= _rValue; - m_aValueProperties.push_back(aProp); - } - else if ( _rLocalName.equalsAscii( pRepeatDelayAttributeName ) ) - { - ::Time aTime; - sal_Int32 nFractions = 0; - if ( SvXMLUnitConverter::convertTimeDuration( _rValue, aTime, &nFractions ) ) - { - PropertyValue aProp; - aProp.Name = PROPERTY_REPEAT_DELAY; - aProp.Value <<= (sal_Int32)( ( ( aTime.GetMSFromTime() / 1000 ) * 1000 ) + nFractions ); + aProp.Name = PROPERTY_REPEAT_DELAY; + aProp.Value <<= (sal_Int32)( ( ( aTime.GetMSFromTime() / 1000 ) * 1000 ) + nFractions ); - implPushBackPropertyValue(aProp); - } + implPushBackPropertyValue(aProp); } - else - OElementImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); + return true; } + + return OElementImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); } //--------------------------------------------------------------------- @@ -714,6 +881,7 @@ namespace xmloff ++aValueProps ) { + bool bSuccess = false; switch (aValueProps->Handle) { case PROPID_VALUE: @@ -723,6 +891,7 @@ namespace xmloff if (!bRetrievedValues) { getValuePropertyNames(m_eElementType, nClassId, pCurrentValueProperty, pValueProperty); + ENSURE_OR_BREAK( pCurrentValueProperty && pValueProperty, "OControlImport::StartElement: illegal value property names!" ); bRetrievedValues = sal_True; } OSL_ENSURE((PROPID_VALUE != aValueProps->Handle) || pValueProperty, @@ -735,6 +904,7 @@ namespace xmloff aValueProps->Name = ::rtl::OUString::createFromAscii(pValueProperty); else aValueProps->Name = ::rtl::OUString::createFromAscii(pCurrentValueProperty); + bSuccess = true; } break; case PROPID_MIN_VALUE: @@ -744,6 +914,7 @@ namespace xmloff if (!bRetrievedValueLimits) { getValueLimitPropertyNames(nClassId, pMinValueProperty, pMaxValueProperty); + ENSURE_OR_BREAK( pMinValueProperty && pMaxValueProperty, "OControlImport::StartElement: illegal value limit property names!" ); bRetrievedValueLimits = sal_True; } OSL_ENSURE((PROPID_MIN_VALUE != aValueProps->Handle) || pMinValueProperty, @@ -756,10 +927,14 @@ namespace xmloff aValueProps->Name = ::rtl::OUString::createFromAscii(pMinValueProperty); else aValueProps->Name = ::rtl::OUString::createFromAscii(pMaxValueProperty); + bSuccess = true; } break; } + if ( !bSuccess ) + continue; + // translate the value implTranslateValueProperty(m_xInfo, *aValueProps); // add the property to the base class' array @@ -980,7 +1155,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void OImagePositionImport::handleAttribute( sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, + bool OImagePositionImport::handleAttribute( sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue ) { if ( _rLocalName == GetXMLToken( XML_IMAGE_POSITION ) ) @@ -990,16 +1165,19 @@ namespace xmloff _rValue, OEnumMapper::getEnumMap( OEnumMapper::epImagePosition ) ) >>= m_nImagePosition ); m_bHaveImagePosition = sal_True; + return true; } - else if ( _rLocalName == GetXMLToken( XML_IMAGE_ALIGN ) ) + + if ( _rLocalName == GetXMLToken( XML_IMAGE_ALIGN ) ) { OSL_VERIFY( PropertyConversion::convertString( m_rContext.getGlobalContext(), ::getCppuType( &m_nImageAlign ), _rValue, OEnumMapper::getEnumMap( OEnumMapper::epImageAlign ) ) >>= m_nImageAlign ); + return true; } - else - OControlImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); + + return OControlImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); } //--------------------------------------------------------------------- @@ -1047,14 +1225,16 @@ namespace xmloff } //--------------------------------------------------------------------- - void OReferredControlImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, + bool OReferredControlImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { static const ::rtl::OUString s_sReferenceAttributeName = ::rtl::OUString::createFromAscii(OAttributeMetaData::getCommonControlAttributeName(CCA_FOR)); if (_rLocalName == s_sReferenceAttributeName) + { m_sReferringControls = _rValue; - else - OControlImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); + return true; + } + return OControlImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); } //===================================================================== @@ -1068,7 +1248,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void OPasswordImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + bool OPasswordImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { static const ::rtl::OUString s_sEchoCharAttributeName = ::rtl::OUString::createFromAscii(OAttributeMetaData::getSpecialAttributeName(SCA_ECHO_CHAR)); if (_rLocalName == s_sEchoCharAttributeName) @@ -1083,9 +1263,9 @@ namespace xmloff else aEchoChar.Value <<= (sal_Int16)0; implPushBackPropertyValue(aEchoChar); + return true; } - else - OControlImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); + return OControlImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); } //===================================================================== @@ -1099,7 +1279,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void ORadioImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + bool ORadioImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { // need special handling for the State & CurrentState properties: // they're stored as booleans, but expected to be int16 properties @@ -1122,9 +1302,9 @@ namespace xmloff implPushBackPropertyValue(aNewValue); } + return true; } - else - OImagePositionImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); + return OImagePositionImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); } //===================================================================== @@ -1138,7 +1318,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void OURLReferenceImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + bool OURLReferenceImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { static const sal_Char* s_pTargetLocationAttributeName = OAttributeMetaData::getCommonControlAttributeName( CCA_TARGET_LOCATION ); static const sal_Char* s_pImageDataAttributeName = OAttributeMetaData::getCommonControlAttributeName( CCA_IMAGE_DATA ); @@ -1157,18 +1337,18 @@ namespace xmloff if ( bMakeAbsolute && ( _rValue.getLength() > 0 ) ) { // make a global URL out of the local one - ::rtl::OUString sAdjustedValue; - // only resolve image related url - // we don't want say form url targets to be resolved - // using ResolveGraphicObjectURL - if ( 0 == _rLocalName.compareToAscii( s_pImageDataAttributeName ) ) - sAdjustedValue = m_rContext.getGlobalContext().ResolveGraphicObjectURL( _rValue, FALSE ); - else - sAdjustedValue = m_rContext.getGlobalContext().GetAbsoluteReference( _rValue ); - OImagePositionImport::handleAttribute( _nNamespaceKey, _rLocalName, sAdjustedValue ); + ::rtl::OUString sAdjustedValue; + // only resolve image related url + // we don't want say form url targets to be resolved + // using ResolveGraphicObjectURL + if ( 0 == _rLocalName.compareToAscii( s_pImageDataAttributeName ) ) + sAdjustedValue = m_rContext.getGlobalContext().ResolveGraphicObjectURL( _rValue, sal_False ); + else + sAdjustedValue = m_rContext.getGlobalContext().GetAbsoluteReference( _rValue ); + return OImagePositionImport::handleAttribute( _nNamespaceKey, _rLocalName, sAdjustedValue ); } - else - OImagePositionImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); + + return OImagePositionImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); } //===================================================================== @@ -1205,14 +1385,14 @@ namespace xmloff } //--------------------------------------------------------------------- - void OValueRangeImport::handleAttribute( sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue ) + bool OValueRangeImport::handleAttribute( sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue ) { if ( _rLocalName.equalsAscii( OAttributeMetaData::getSpecialAttributeName( SCA_STEP_SIZE ) ) ) { GetImport().GetMM100UnitConverter().convertNumber( m_nStepSizeValue, _rValue ); + return true; } - else - OControlImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); + return OControlImport::handleAttribute( _nNamespaceKey, _rLocalName, _rValue ); } //--------------------------------------------------------------------- @@ -1338,7 +1518,7 @@ namespace xmloff } } - // additionally, we need to set the "RichText" property of our element to TRUE + // additionally, we need to set the "RichText" property of our element to sal_True // (the presence of the text:p is used as indicator for the value of the RichText property) sal_Bool bHasRichTextProperty = sal_False; if ( m_xInfo.is() ) @@ -1535,7 +1715,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void OListAndComboImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + bool OListAndComboImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { static const sal_Char* pListSourceAttributeName = OAttributeMetaData::getDatabaseAttributeName(DA_LIST_SOURCE); if ( _rLocalName.equalsAscii(pListSourceAttributeName) ) @@ -1560,12 +1740,16 @@ namespace xmloff } implPushBackPropertyValue( aListSource ); + return true; } - else if ( _rLocalName.equalsAscii( OAttributeMetaData::getBindingAttributeName( BA_LIST_CELL_RANGE ) ) ) + + if ( _rLocalName.equalsAscii( OAttributeMetaData::getBindingAttributeName( BA_LIST_CELL_RANGE ) ) ) { m_sCellListSource = _rValue; + return true; } - else if ( _rLocalName.equalsAscii( OAttributeMetaData::getBindingAttributeName( BA_LIST_LINKING_TYPE ) ) ) + + if ( _rLocalName.equalsAscii( OAttributeMetaData::getBindingAttributeName( BA_LIST_LINKING_TYPE ) ) ) { sal_Int16 nLinkageType = 0; PropertyConversion::convertString( @@ -1576,9 +1760,10 @@ namespace xmloff ) >>= nLinkageType; m_bLinkWithIndexes = ( nLinkageType != 0 ); + return true; } - else - OControlImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); + + return OControlImport::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); } //--------------------------------------------------------------------- @@ -1776,7 +1961,9 @@ namespace xmloff || (OControlElement::FORMATTED_TEXT == _eType) || (OControlElement::CHECKBOX == _eType) || (OControlElement::LISTBOX == _eType) - || (OControlElement::COMBOBOX == _eType), + || (OControlElement::COMBOBOX == _eType) + || (OControlElement::TIME == _eType) + || (OControlElement::DATE == _eType), "OColumnWrapperImport::implCreateChildContext: invalid or unrecognized sub element!"); switch (_eType) @@ -1871,19 +2058,25 @@ namespace xmloff } //--------------------------------------------------------------------- - void OFormImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) + bool OFormImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { // handle the master/details field attributes (they're way too special to let the OPropertyImport handle them) static const ::rtl::OUString s_sMasterFieldsAttributeName = ::rtl::OUString::createFromAscii(OAttributeMetaData::getFormAttributeName(faMasterFields)); static const ::rtl::OUString s_sDetailFieldsAttributeName = ::rtl::OUString::createFromAscii(OAttributeMetaData::getFormAttributeName(faDetailFiels)); - if (s_sMasterFieldsAttributeName == _rLocalName) + if ( s_sMasterFieldsAttributeName == _rLocalName ) + { implTranslateStringListProperty(PROPERTY_MASTERFIELDS, _rValue); - else if (s_sDetailFieldsAttributeName == _rLocalName) + return true; + } + + if ( s_sDetailFieldsAttributeName == _rLocalName ) + { implTranslateStringListProperty(PROPERTY_DETAILFIELDS, _rValue); + return true; + } - else - OFormImport_Base::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); + return OFormImport_Base::handleAttribute(_nNamespaceKey, _rLocalName, _rValue); } //--------------------------------------------------------------------- diff --git a/xmloff/source/forms/elementimport.hxx b/xmloff/source/forms/elementimport.hxx index becea0c0dc64..f5c7cd7740c9 100644..100755 --- a/xmloff/source/forms/elementimport.hxx +++ b/xmloff/source/forms/elementimport.hxx @@ -32,6 +32,9 @@ #include "propertyimport.hxx" #include "controlelement.hxx" #include "valueproperties.hxx" +#include "eventimport.hxx" +#include "logging.hxx" +#include "property_description.hxx" /** === begin UNO includes === **/ #include <com/sun/star/text/XTextCursor.hpp> @@ -40,9 +43,8 @@ #include <com/sun/star/form/XGridColumnFactory.hpp> #include <com/sun/star/script/XEventAttacherManager.hpp> /** === end UNO includes === **/ + #include <comphelper/stl_types.hxx> -#include "eventimport.hxx" -#include "logging.hxx" class XMLTextStyleContext; //......................................................................... @@ -84,22 +86,25 @@ namespace xmloff ,public OStackedLogging { protected: - ::rtl::OUString m_sServiceName; // the service name as extracted from the service-name attribute - ::rtl::OUString m_sName; // the name of the object (redundant, already contained in the base class' array) + ::rtl::OUString m_sServiceName; // the service name as extracted from the service-name attribute + ::rtl::OUString m_sName; // the name of the object (redundant, already contained in the base class' array) OFormLayerXMLImport_Impl& m_rFormImport; // the form import context - IEventAttacherManager& m_rEventManager; // the event attacher manager + IEventAttacherManager& m_rEventManager; // the event attacher manager const XMLTextStyleContext* m_pStyleElement; // the XML element which describes the style we encountered // while reading our element + /// the parent container to insert the new element into ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > - m_xParentContainer; - // the parent container to insert the new element into + m_xParentContainer; - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > - m_xInfo; + /// the element we're creating. Valid after StartElement ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > - m_xElement; // the element we're creating. Valid after StartElement + m_xElement; + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > + m_xInfo; + + bool m_bImplicitGenericAttributeHandling; public: /** ctor @@ -133,7 +138,7 @@ namespace xmloff virtual void EndElement(); // OPropertyImport overridables - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); @@ -159,13 +164,28 @@ namespace xmloff */ void simulateDefaultedAttribute(const sal_Char* _pAttributeName, const ::rtl::OUString& _rPropertyName, const sal_Char* _pAttributeDefault); + /** to be called from within handleAttribute, checks whether the given attribute is covered by our generic + attribute handler mechanisms + */ + bool tryGenericAttribute( sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue ); + + /** controls whether |handleAttribute| implicitly calls |tryGenericAttribute|, or whether the derived class + must do this explicitly at a suitable place in its own |handleAttribute| + */ + void disableImplicitGenericAttributeHandling() { m_bImplicitGenericAttributeHandling = false; } + private: ::rtl::OUString implGetDefaultName() const; - void implImportGenericProperties(); + void implApplyGenericProperties(); + void implApplySpecificProperties(); /** sets the style properties which have been read for the element (if any) */ void implSetStyleProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject ); + + PropertyGroups::const_iterator impl_matchPropertyGroup( const PropertyGroups& i_propertyGroups ) const; + + virtual ::rtl::OUString determineDefaultServiceName() const; }; //===================================================================== @@ -226,7 +246,7 @@ namespace xmloff virtual void EndElement(); // OPropertyImport overridables - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); @@ -240,6 +260,8 @@ namespace xmloff const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >& _rxPropInfo, ::com::sun::star::beans::PropertyValue& /* [in/out] */ _rPropValue); + virtual ::rtl::OUString determineDefaultServiceName() const; + /** registers the given cell address as value binding address for our element <p>The default implementation simply calls registerCellValueBinding at our import @@ -266,7 +288,6 @@ namespace xmloff // OElementImport overridables virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createElement(); - }; // TODO: @@ -296,7 +317,7 @@ namespace xmloff const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& _rxAttrList); // OPropertyImport overridables - virtual void handleAttribute( sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute( sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue ); @@ -322,7 +343,7 @@ namespace xmloff const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& _rxAttrList); // OPropertyImport overridables - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); }; @@ -340,7 +361,7 @@ namespace xmloff ); // OPropertyImport overridables - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); }; @@ -359,7 +380,7 @@ namespace xmloff protected: // OPropertyImport overridables - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); }; @@ -381,7 +402,7 @@ namespace xmloff protected: // OPropertyImport overridables - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); }; @@ -431,7 +452,7 @@ namespace xmloff const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& _rxAttrList ); // OPropertyImport overridables - virtual void handleAttribute( sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute( sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue ); }; @@ -517,7 +538,7 @@ namespace xmloff virtual void EndElement(); // OPropertyImport overridables - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); @@ -716,7 +737,7 @@ namespace xmloff sal_uInt16 _nPrefix, const ::rtl::OUString& _rLocalName); // OPropertyImport overridables - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); diff --git a/xmloff/source/forms/elementimport_impl.hxx b/xmloff/source/forms/elementimport_impl.hxx index ba3ef4a9594f..ba3ef4a9594f 100644..100755 --- a/xmloff/source/forms/elementimport_impl.hxx +++ b/xmloff/source/forms/elementimport_impl.hxx diff --git a/xmloff/source/forms/eventexport.cxx b/xmloff/source/forms/eventexport.cxx index 5a6d84f16fea..5a6d84f16fea 100644..100755 --- a/xmloff/source/forms/eventexport.cxx +++ b/xmloff/source/forms/eventexport.cxx diff --git a/xmloff/source/forms/eventexport.hxx b/xmloff/source/forms/eventexport.hxx index fdddab0df44f..fdddab0df44f 100644..100755 --- a/xmloff/source/forms/eventexport.hxx +++ b/xmloff/source/forms/eventexport.hxx diff --git a/xmloff/source/forms/eventimport.cxx b/xmloff/source/forms/eventimport.cxx index 2ecaa926c4ab..2ecaa926c4ab 100644..100755 --- a/xmloff/source/forms/eventimport.cxx +++ b/xmloff/source/forms/eventimport.cxx diff --git a/xmloff/source/forms/eventimport.hxx b/xmloff/source/forms/eventimport.hxx index b8e21782860c..b8e21782860c 100644..100755 --- a/xmloff/source/forms/eventimport.hxx +++ b/xmloff/source/forms/eventimport.hxx diff --git a/xmloff/source/forms/formattributes.cxx b/xmloff/source/forms/formattributes.cxx index a6358663ea4b..076b85433814 100644..100755 --- a/xmloff/source/forms/formattributes.cxx +++ b/xmloff/source/forms/formattributes.cxx @@ -29,7 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include "formattributes.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include <xmloff/xmluconv.hxx> #include <rtl/ustrbuf.hxx> #include <rtl/logfile.hxx> diff --git a/xmloff/source/forms/formattributes.hxx b/xmloff/source/forms/formattributes.hxx index 28cfb8655ab8..28cfb8655ab8 100644..100755 --- a/xmloff/source/forms/formattributes.hxx +++ b/xmloff/source/forms/formattributes.hxx diff --git a/xmloff/source/forms/formcellbinding.cxx b/xmloff/source/forms/formcellbinding.cxx index 37bacc03999b..37bacc03999b 100644..100755 --- a/xmloff/source/forms/formcellbinding.cxx +++ b/xmloff/source/forms/formcellbinding.cxx diff --git a/xmloff/source/forms/formcellbinding.hxx b/xmloff/source/forms/formcellbinding.hxx index 85fe2fb272ec..85fe2fb272ec 100644..100755 --- a/xmloff/source/forms/formcellbinding.hxx +++ b/xmloff/source/forms/formcellbinding.hxx diff --git a/xmloff/source/forms/formenums.cxx b/xmloff/source/forms/formenums.cxx index e90d4901b093..e90d4901b093 100644..100755 --- a/xmloff/source/forms/formenums.cxx +++ b/xmloff/source/forms/formenums.cxx diff --git a/xmloff/source/forms/formenums.hxx b/xmloff/source/forms/formenums.hxx index 88313e28f109..88313e28f109 100644..100755 --- a/xmloff/source/forms/formenums.hxx +++ b/xmloff/source/forms/formenums.hxx diff --git a/xmloff/source/forms/formevents.cxx b/xmloff/source/forms/formevents.cxx index a86b9d0a0b78..9353d540f8fd 100644..100755 --- a/xmloff/source/forms/formevents.cxx +++ b/xmloff/source/forms/formevents.cxx @@ -29,7 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include "formevents.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include <xmloff/xmlevent.hxx> //......................................................................... diff --git a/xmloff/source/forms/formevents.hxx b/xmloff/source/forms/formevents.hxx index 5f2fea968144..5f2fea968144 100644..100755 --- a/xmloff/source/forms/formevents.hxx +++ b/xmloff/source/forms/formevents.hxx diff --git a/xmloff/source/forms/formlayerexport.cxx b/xmloff/source/forms/formlayerexport.cxx index 897e42bc63ae..8011a5a994f3 100644..100755 --- a/xmloff/source/forms/formlayerexport.cxx +++ b/xmloff/source/forms/formlayerexport.cxx @@ -33,7 +33,7 @@ #include <xmloff/formlayerexport.hxx> #include "strings.hxx" #include "elementexport.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include <xmloff/xmlexp.hxx> #include "layerexport.hxx" #include "propertyexport.hxx" @@ -94,12 +94,6 @@ namespace xmloff } //--------------------------------------------------------------------- - ::rtl::Reference< SvXMLExportPropertyMapper > OFormLayerXMLExport::getStylePropertyMapper() - { - return m_pImpl->getStylePropertyMapper(); - } - - //--------------------------------------------------------------------- void OFormLayerXMLExport::initialize() { m_pImpl->clear(); diff --git a/xmloff/source/forms/formlayerimport.cxx b/xmloff/source/forms/formlayerimport.cxx index c9e861df5e3b..718c3120c481 100644..100755 --- a/xmloff/source/forms/formlayerimport.cxx +++ b/xmloff/source/forms/formlayerimport.cxx @@ -61,12 +61,6 @@ namespace xmloff } //--------------------------------------------------------------------- - ::rtl::Reference< SvXMLImportPropertyMapper > OFormLayerXMLImport::getStylePropertyMapper() const - { - return m_pImpl->getStylePropertyMapper(); - } - - //--------------------------------------------------------------------- void OFormLayerXMLImport::setAutoStyleContext(SvXMLStylesContext* _pNewContext) { m_pImpl->setAutoStyleContext(_pNewContext); diff --git a/xmloff/source/forms/formsimp.cxx b/xmloff/source/forms/formsimp.cxx index 4fd81912482c..cc9b588aed62 100644..100755 --- a/xmloff/source/forms/formsimp.cxx +++ b/xmloff/source/forms/formsimp.cxx @@ -30,7 +30,7 @@ #include "precompiled_xmloff.hxx" #include <com/sun/star/xml/sax/XAttributeList.hpp> #include <xmloff/xmlimp.hxx> -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include <xmloff/nmspmap.hxx> #include <xmloff/formsimp.hxx> @@ -50,7 +50,7 @@ XMLFormsContext::~XMLFormsContext() { } -SvXMLImportContext * XMLFormsContext::CreateChildContext( USHORT nPrefix, const ::rtl::OUString& rLocalName, +SvXMLImportContext * XMLFormsContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ) { return GetImport().GetFormImport()->createContext( nPrefix, rLocalName, xAttrList ); diff --git a/xmloff/source/forms/formstyles.cxx b/xmloff/source/forms/formstyles.cxx index bd00be5fbf43..bd00be5fbf43 100644..100755 --- a/xmloff/source/forms/formstyles.cxx +++ b/xmloff/source/forms/formstyles.cxx diff --git a/xmloff/source/forms/formstyles.hxx b/xmloff/source/forms/formstyles.hxx index fc055df24a1a..fc055df24a1a 100644..100755 --- a/xmloff/source/forms/formstyles.hxx +++ b/xmloff/source/forms/formstyles.hxx diff --git a/xmloff/source/forms/gridcolumnproptranslator.cxx b/xmloff/source/forms/gridcolumnproptranslator.cxx index 9e30b76c3d9a..9e30b76c3d9a 100644..100755 --- a/xmloff/source/forms/gridcolumnproptranslator.cxx +++ b/xmloff/source/forms/gridcolumnproptranslator.cxx diff --git a/xmloff/source/forms/gridcolumnproptranslator.hxx b/xmloff/source/forms/gridcolumnproptranslator.hxx index b45cd08988a8..b45cd08988a8 100644..100755 --- a/xmloff/source/forms/gridcolumnproptranslator.hxx +++ b/xmloff/source/forms/gridcolumnproptranslator.hxx diff --git a/xmloff/source/forms/handler/form_handler_factory.cxx b/xmloff/source/forms/handler/form_handler_factory.cxx new file mode 100755 index 000000000000..72a9edf38f42 --- /dev/null +++ b/xmloff/source/forms/handler/form_handler_factory.cxx @@ -0,0 +1,90 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public 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_xmloff.hxx" + +#include "forms/form_handler_factory.hxx" +#include "vcl_date_handler.hxx" +#include "vcl_time_handler.hxx" + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + namespace + { + static PPropertyHandler s_pVCLDateHandler = NULL; + static PPropertyHandler s_pVCLTimeHandler = NULL; + } + + //================================================================================================================== + //= FormHandlerFactory + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + PPropertyHandler FormHandlerFactory::getFormPropertyHandler( const PropertyId i_propertyId ) + { + PPropertyHandler pHandler( NULL ); + + switch ( i_propertyId ) + { + case PID_DATE_MIN: + case PID_DATE_MAX: + case PID_DEFAULT_DATE: + case PID_DATE: + if ( s_pVCLDateHandler.get() == NULL ) + { + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if ( s_pVCLDateHandler == NULL ) + s_pVCLDateHandler = new VCLDateHandler(); + } + pHandler = s_pVCLDateHandler; + break; + + case PID_TIME_MIN: + case PID_TIME_MAX: + case PID_DEFAULT_TIME: + case PID_TIME: + if ( s_pVCLTimeHandler.get() == NULL ) + { + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if ( s_pVCLTimeHandler == NULL ) + s_pVCLTimeHandler = new VCLTimeHandler(); + } + pHandler = s_pVCLTimeHandler; + break; + + default: + OSL_ENSURE( false, "FormHandlerFactory::getFormPropertyHandler: unknown property ID!" ); + break; + } + + return pHandler; + } + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... diff --git a/xmloff/source/forms/handler/property_handler_base.cxx b/xmloff/source/forms/handler/property_handler_base.cxx new file mode 100755 index 000000000000..d599e0e259fe --- /dev/null +++ b/xmloff/source/forms/handler/property_handler_base.cxx @@ -0,0 +1,61 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public 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_xmloff.hxx" + +#include "property_handler_base.hxx" + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + //================================================================================================================== + //= PropertyHandlerBase + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + PropertyHandlerBase::~PropertyHandlerBase() + { + } + + //------------------------------------------------------------------------------------------------------------------ + oslInterlockedCount SAL_CALL PropertyHandlerBase::acquire() + { + return osl_incrementInterlockedCount( &m_refCount ); + } + + //------------------------------------------------------------------------------------------------------------------ + oslInterlockedCount SAL_CALL PropertyHandlerBase::release() + { + oslInterlockedCount decremented = osl_decrementInterlockedCount( &m_refCount ); + if ( 0 == decremented ) + delete this; + return decremented; + } + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... diff --git a/xmloff/source/forms/handler/property_handler_base.hxx b/xmloff/source/forms/handler/property_handler_base.hxx new file mode 100755 index 000000000000..01f2a9e843f6 --- /dev/null +++ b/xmloff/source/forms/handler/property_handler_base.hxx @@ -0,0 +1,64 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef XMLOFF_PROPERTY_HANDLER_BASE_HXX +#define XMLOFF_PROPERTY_HANDLER_BASE_HXX + +#include "forms/property_handler.hxx" + +#include <osl/interlck.h> + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + //================================================================================================================== + //= PropertyHandlerBase + //================================================================================================================== + class PropertyHandlerBase : public IPropertyHandler + { + protected: + PropertyHandlerBase() + :m_refCount( 0 ) + { + } + + virtual ~PropertyHandlerBase(); + + // IReference + virtual oslInterlockedCount SAL_CALL acquire(); + virtual oslInterlockedCount SAL_CALL release(); + + private: + oslInterlockedCount m_refCount; + }; + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... + +#endif // XMLOFF_PROPERTY_HANDLER_BASE_HXX diff --git a/xmloff/source/forms/handler/vcl_date_handler.cxx b/xmloff/source/forms/handler/vcl_date_handler.cxx new file mode 100755 index 000000000000..a8404ed04e05 --- /dev/null +++ b/xmloff/source/forms/handler/vcl_date_handler.cxx @@ -0,0 +1,114 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public 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_xmloff.hxx" + +#include "vcl_date_handler.hxx" +#include "xmloff/xmluconv.hxx" + +#include <com/sun/star/util/DateTime.hpp> + +#include <tools/diagnose_ex.h> +#include <tools/date.hxx> + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::util::DateTime; + + //================================================================================================================== + //= VCLDateHandler + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + VCLDateHandler::VCLDateHandler() + { + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString VCLDateHandler::getAttributeValue( const PropertyValues& /*i_propertyValues*/ ) const + { + OSL_ENSURE( false, "VCLDateHandler::getAttributeValue: unexpected call!" ); + return ::rtl::OUString(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString VCLDateHandler::getAttributeValue( const Any& i_propertyValue ) const + { + sal_Int32 nVCLDate(0); + OSL_VERIFY( i_propertyValue >>= nVCLDate ); + ::Date aVCLDate( nVCLDate ); + + DateTime aDateTime; // default-inited to 0 + aDateTime.Day = aVCLDate.GetDay(); + aDateTime.Month = aVCLDate.GetMonth(); + aDateTime.Year = aVCLDate.GetYear(); + + ::rtl::OUStringBuffer aBuffer; + SvXMLUnitConverter::convertDateTime( aBuffer, aDateTime, sal_False ); + return aBuffer.makeStringAndClear(); + } + + //------------------------------------------------------------------------------------------------------------------ + bool VCLDateHandler::getPropertyValues( const ::rtl::OUString i_attributeValue, PropertyValues& o_propertyValues ) const + { + sal_Int32 nVCLDate(0); + + DateTime aDateTime; + if ( SvXMLUnitConverter::convertDateTime( aDateTime, i_attributeValue ) ) + { + ::Date aVCLDate( aDateTime.Day, aDateTime.Month, aDateTime.Year ); + nVCLDate = aVCLDate.GetDate(); + } + else + { + // compatibility format, before we wrote those values in XML-schema compatible form + if ( !SvXMLUnitConverter::convertNumber( nVCLDate, i_attributeValue ) ) + { + OSL_ENSURE( false, "VCLDateHandler::getPropertyValues: unknown date format (no XML-schema date, no legacy integer)!" ); + return false; + } + } + + const Any aPropertyValue( makeAny( nVCLDate ) ); + + OSL_ENSURE( o_propertyValues.size() == 1, "VCLDateHandler::getPropertyValues: date strings represent exactly one property - not more, not less!" ); + for ( PropertyValues::iterator prop = o_propertyValues.begin(); + prop != o_propertyValues.end(); + ++prop + ) + { + prop->second = aPropertyValue; + } + return true; + } + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... diff --git a/xmloff/source/forms/handler/vcl_date_handler.hxx b/xmloff/source/forms/handler/vcl_date_handler.hxx new file mode 100755 index 000000000000..44a7f7395ceb --- /dev/null +++ b/xmloff/source/forms/handler/vcl_date_handler.hxx @@ -0,0 +1,55 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef XMLOFF_VCL_DATE_HANDLER_HXX +#define XMLOFF_VCL_DATE_HANDLER_HXX + +#include "property_handler_base.hxx" + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + //================================================================================================================== + //= VCLDateHandler + //================================================================================================================== + class VCLDateHandler : public PropertyHandlerBase + { + public: + VCLDateHandler(); + + // IPropertyHandler + virtual ::rtl::OUString getAttributeValue( const PropertyValues& i_propertyValues ) const; + virtual ::rtl::OUString getAttributeValue( const ::com::sun::star::uno::Any& i_propertyValue ) const; + virtual bool getPropertyValues( const ::rtl::OUString i_attributeValue, PropertyValues& o_propertyValues ) const; + }; + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... + +#endif // XMLOFF_VCL_DATE_HANDLER_HXX diff --git a/xmloff/source/forms/handler/vcl_time_handler.cxx b/xmloff/source/forms/handler/vcl_time_handler.cxx new file mode 100755 index 000000000000..98ea739d04a4 --- /dev/null +++ b/xmloff/source/forms/handler/vcl_time_handler.cxx @@ -0,0 +1,115 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public 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_xmloff.hxx" + +#include "vcl_time_handler.hxx" +#include "xmloff/xmluconv.hxx" + +#include <com/sun/star/util/DateTime.hpp> + +#include <tools/diagnose_ex.h> +#include <tools/time.hxx> + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::util::DateTime; + + //================================================================================================================== + //= VCLTimeHandler + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + VCLTimeHandler::VCLTimeHandler() + { + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString VCLTimeHandler::getAttributeValue( const PropertyValues& /*i_propertyValues*/ ) const + { + OSL_ENSURE( false, "VCLTimeHandler::getAttributeValue: unexpected call!" ); + return ::rtl::OUString(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString VCLTimeHandler::getAttributeValue( const Any& i_propertyValue ) const + { + sal_Int32 nVCLTime(0); + OSL_VERIFY( i_propertyValue >>= nVCLTime ); + ::Time aVCLTime( nVCLTime ); + + DateTime aDateTime; // default-inited to 0 + aDateTime.Hours = aVCLTime.GetHour(); + aDateTime.Minutes = aVCLTime.GetMin(); + aDateTime.Seconds = aVCLTime.GetSec(); + aDateTime.HundredthSeconds = aVCLTime.Get100Sec(); + + ::rtl::OUStringBuffer aBuffer; + SvXMLUnitConverter::convertTime( aBuffer, aDateTime ); + return aBuffer.makeStringAndClear(); + } + + //------------------------------------------------------------------------------------------------------------------ + bool VCLTimeHandler::getPropertyValues( const ::rtl::OUString i_attributeValue, PropertyValues& o_propertyValues ) const + { + sal_Int32 nVCLTime(0); + + DateTime aDateTime; + if ( SvXMLUnitConverter::convertTime( aDateTime, i_attributeValue ) ) + { + ::Time aVCLTime( aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.HundredthSeconds ); + nVCLTime = aVCLTime.GetTime(); + } + else + { + // compatibility format, before we wrote those values in XML-schema compatible form + if ( !SvXMLUnitConverter::convertNumber( nVCLTime, i_attributeValue ) ) + { + OSL_ENSURE( false, "VCLTimeHandler::getPropertyValues: unknown time format (no XML-schema time, no legacy integer)!" ); + return false; + } + } + + const Any aPropertyValue( makeAny( nVCLTime ) ); + + OSL_ENSURE( o_propertyValues.size() == 1, "VCLTimeHandler::getPropertyValues: time strings represent exactly one property - not more, not less!" ); + for ( PropertyValues::iterator prop = o_propertyValues.begin(); + prop != o_propertyValues.end(); + ++prop + ) + { + prop->second = aPropertyValue; + } + return true; + } + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... diff --git a/xmloff/source/forms/handler/vcl_time_handler.hxx b/xmloff/source/forms/handler/vcl_time_handler.hxx new file mode 100755 index 000000000000..0d84be983b01 --- /dev/null +++ b/xmloff/source/forms/handler/vcl_time_handler.hxx @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef XMLOFF_VCL_TIME_HANDLER_HXX +#define XMLOFF_VCL_TIME_HANDLER_HXX + +#include "property_handler_base.hxx" + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + //================================================================================================================== + //= VCLTimeHandler + //================================================================================================================== + class VCLTimeHandler : public PropertyHandlerBase + { + public: + VCLTimeHandler(); + + // IPropertyHandler + virtual ::rtl::OUString getAttributeValue( const PropertyValues& i_propertyValues ) const; + virtual ::rtl::OUString getAttributeValue( const ::com::sun::star::uno::Any& i_propertyValue ) const; + virtual bool getPropertyValues( const ::rtl::OUString i_attributeValue, PropertyValues& o_propertyValues ) const; + }; + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... + +#endif // XMLOFF_VCL_TIME_HANDLER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/ifacecompare.hxx b/xmloff/source/forms/ifacecompare.hxx index e84cd27eaa8d..e84cd27eaa8d 100644..100755 --- a/xmloff/source/forms/ifacecompare.hxx +++ b/xmloff/source/forms/ifacecompare.hxx diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx index d7bc42e756fd..d4fe9f86948e 100644..100755 --- a/xmloff/source/forms/layerexport.cxx +++ b/xmloff/source/forms/layerexport.cxx @@ -34,7 +34,7 @@ #include "strings.hxx" #include <xmloff/xmlexp.hxx> #include <xmloff/nmspmap.hxx> -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include <xmloff/xmluconv.hxx> #include <xmloff/xmlprmap.hxx> #include <xmloff/prhdlfac.hxx> @@ -55,7 +55,7 @@ #include <xmloff/XMLEventExport.hxx> #include "formevents.hxx" #include <xmloff/xmlnumfe.hxx> -#include "xformsexport.hxx" +#include "xmloff/xformsexport.hxx" /** === begin UNO includes === **/ #include <com/sun/star/text/XText.hpp> diff --git a/xmloff/source/forms/layerexport.hxx b/xmloff/source/forms/layerexport.hxx index 30d89ced4343..30d89ced4343 100644..100755 --- a/xmloff/source/forms/layerexport.hxx +++ b/xmloff/source/forms/layerexport.hxx diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx index 6cab1933a51b..e58df16726eb 100644..100755 --- a/xmloff/source/forms/layerimport.cxx +++ b/xmloff/source/forms/layerimport.cxx @@ -59,9 +59,9 @@ #include "controlpropertymap.hxx" #include "formevents.hxx" #include "formcellbinding.hxx" -#include "xformsimport.hxx" +#include "xmloff/xformsimport.hxx" #include <xmloff/xmltoken.hxx> -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include <rtl/logfile.hxx> #include <algorithm> @@ -240,11 +240,6 @@ OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl(SvXMLImport& _rImporter) TabulatorCycle_RECORDS, OEnumMapper::getEnumMap(OEnumMapper::epTabCyle), &::getCppuType( static_cast<TabulatorCycle*>(NULL) )); - // initialize our style map - m_xPropertyHandlerFactory = new OControlPropertyHandlerFactory(); - ::rtl::Reference< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper(getControlStylePropertyMap(), m_xPropertyHandlerFactory.get()); - m_xImportMapper = new SvXMLImportPropertyMapper(xStylePropertiesMapper.get(), _rImporter); - // 'initialize' m_aCurrentPageIds = m_aControlIds.end(); } @@ -419,12 +414,6 @@ void OFormLayerXMLImport_Impl::registerControlReferences(const Reference< XPrope } //--------------------------------------------------------------------- -::rtl::Reference< SvXMLImportPropertyMapper > OFormLayerXMLImport_Impl::getStylePropertyMapper() const -{ - return m_xImportMapper; -} - -//--------------------------------------------------------------------- void OFormLayerXMLImport_Impl::startPage(const Reference< XDrawPage >& _rxDrawPage) { m_xCurrentPageFormsSupp.clear(); diff --git a/xmloff/source/forms/layerimport.hxx b/xmloff/source/forms/layerimport.hxx index 01af7872befe..999156e213fb 100644..100755 --- a/xmloff/source/forms/layerimport.hxx +++ b/xmloff/source/forms/layerimport.hxx @@ -93,10 +93,6 @@ namespace xmloff SvXMLStylesContext* m_pAutoStyles; protected: - // style handling - ::rtl::Reference< XMLPropertyHandlerFactory > m_xPropertyHandlerFactory; - ::rtl::Reference< SvXMLImportPropertyMapper > m_xImportMapper; - DECLARE_STL_USTRINGACCESS_MAP( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >, MapString2PropertySet ); DECLARE_STL_MAP( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >, MapString2PropertySet, ODrawPageCompare, MapDrawPage2Map); @@ -169,10 +165,6 @@ namespace xmloff OFormLayerXMLImport_Impl(SvXMLImport& _rImporter); virtual ~OFormLayerXMLImport_Impl(); - /** retrieves the property mapper form form related auto styles. - */ - ::rtl::Reference< SvXMLImportPropertyMapper > getStylePropertyMapper() const; - /** start importing the forms of the given page */ void startPage( diff --git a/xmloff/source/forms/logging.cxx b/xmloff/source/forms/logging.cxx index 00ae8fe18f0e..00ae8fe18f0e 100644..100755 --- a/xmloff/source/forms/logging.cxx +++ b/xmloff/source/forms/logging.cxx diff --git a/xmloff/source/forms/logging.hxx b/xmloff/source/forms/logging.hxx index 9f355358fc91..9f355358fc91 100644..100755 --- a/xmloff/source/forms/logging.hxx +++ b/xmloff/source/forms/logging.hxx diff --git a/xmloff/source/forms/makefile.mk b/xmloff/source/forms/makefile.mk deleted file mode 100644 index 8c46a4fbf3c9..000000000000 --- a/xmloff/source/forms/makefile.mk +++ /dev/null @@ -1,70 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=xmloff -TARGET=forms - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/officeforms.obj \ - $(SLO)$/formevents.obj \ - $(SLO)$/eventimport.obj \ - $(SLO)$/eventexport.obj \ - $(SLO)$/controlpropertyhdl.obj \ - $(SLO)$/controlpropertymap.obj \ - $(SLO)$/valueproperties.obj \ - $(SLO)$/attriblistmerge.obj \ - $(SLO)$/controlelement.obj \ - $(SLO)$/formlayerexport.obj \ - $(SLO)$/layerexport.obj \ - $(SLO)$/elementexport.obj \ - $(SLO)$/propertyexport.obj \ - $(SLO)$/elementimport.obj \ - $(SLO)$/layerimport.obj \ - $(SLO)$/propertyimport.obj \ - $(SLO)$/formlayerimport.obj \ - $(SLO)$/formattributes.obj \ - $(SLO)$/formenums.obj \ - $(SLO)$/formsimp.obj \ - $(SLO)$/strings.obj \ - $(SLO)$/logging.obj \ - $(SLO)$/formcellbinding.obj \ - $(SLO)$/gridcolumnproptranslator.obj \ - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/xmloff/source/forms/officeforms.cxx b/xmloff/source/forms/officeforms.cxx index c6715e8d1ecb..daa505caf37a 100644..100755 --- a/xmloff/source/forms/officeforms.cxx +++ b/xmloff/source/forms/officeforms.cxx @@ -31,7 +31,7 @@ #include "officeforms.hxx" #include <xmloff/xmluconv.hxx> #include <xmloff/xmltoken.hxx> -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include <xmloff/xmlexp.hxx> #include <xmloff/xmlimp.hxx> #include <xmloff/nmspmap.hxx> @@ -66,7 +66,7 @@ namespace xmloff } //------------------------------------------------------------------------- - SvXMLImportContext* OFormsRootImport::CreateChildContext( USHORT _nPrefix, const ::rtl::OUString& _rLocalName, + SvXMLImportContext* OFormsRootImport::CreateChildContext( sal_uInt16 _nPrefix, const ::rtl::OUString& _rLocalName, const Reference< sax::XAttributeList>& xAttrList ) { return GetImport().GetFormImport()->createContext( _nPrefix, _rLocalName, xAttrList ); diff --git a/xmloff/source/forms/officeforms.hxx b/xmloff/source/forms/officeforms.hxx index 8111c2fcac52..59473641f964 100644..100755 --- a/xmloff/source/forms/officeforms.hxx +++ b/xmloff/source/forms/officeforms.hxx @@ -55,7 +55,7 @@ namespace xmloff virtual ~OFormsRootImport(); // SvXMLImportContext overriabled - virtual SvXMLImportContext * CreateChildContext( USHORT nPrefix, const ::rtl::OUString& rLocalName, + virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& _rxAttrList ); virtual void EndElement(); diff --git a/xmloff/source/forms/property_description.hxx b/xmloff/source/forms/property_description.hxx new file mode 100755 index 000000000000..4edab2e649f7 --- /dev/null +++ b/xmloff/source/forms/property_description.hxx @@ -0,0 +1,140 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef XMLOFF_PROPERTY_DESCRIPTION_HXX +#define XMLOFF_PROPERTY_DESCRIPTION_HXX + +#include "forms/property_handler.hxx" +#include "property_group.hxx" + +#include "xmloff/xmltoken.hxx" + +#include <vector> +#include <list> + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + //================================================================================================================== + //= PropertyDescription + //================================================================================================================== + struct AttributeDescription + { + sal_uInt16 namespacePrefix; // usually XML_NAMESPACE_FORM + ::xmloff::token::XMLTokenEnum attributeToken; + + AttributeDescription() + :namespacePrefix( 0 ) + ,attributeToken( ::xmloff::token::XML_TOKEN_INVALID ) + { + } + + AttributeDescription( + const sal_uInt16 i_namespacePrefix, + const ::xmloff::token::XMLTokenEnum i_attributeToken + ) + :namespacePrefix( i_namespacePrefix ) + ,attributeToken( i_attributeToken ) + { + } + }; + + //.................................................................................................................. + inline bool operator==( const AttributeDescription& i_lhs, const AttributeDescription& i_rhs ) + { + return ( i_lhs.namespacePrefix == i_rhs.namespacePrefix ) + && ( i_lhs.attributeToken == i_rhs.attributeToken ); + } + + //================================================================================================================== + //= PropertyDescription + //================================================================================================================== + struct PropertyDescription + { + /// is the name of the property + const ::rtl::OUString propertyName; + /** denotes the attribute which represents the property. Note that multiple properties might comprise a single + attribute value. + */ + const AttributeDescription attribute; + /// is the factory for creating a handler for reading and writing the property + const PropertyHandlerFactory factory; + /// the unique ID of the property. The property meta data table must not contain two entries with the same property ID + const PropertyId propertyId; + /** the group which the property belongs to. Multiple properties belonging to the same group will, all together, + define the attribute value to be written into the ODF file. + + Consequently, properties which have the same |propertyGroup| value must also have the same |attribute| + and the same |factory| value, with the only exception being NO_GROUP properties. + + Note that the other direction is not given: It is perfectly legitimate to map the same attribute to different + (disjunct) property groups. + */ + const PropertyGroup propertyGroup; + + PropertyDescription() + :propertyName() + ,attribute() + ,factory( NULL ) + ,propertyId( PID_INVALID ) + ,propertyGroup( NO_GROUP ) + { + } + + PropertyDescription( + const ::rtl::OUString& i_propertyName, + const sal_uInt16 i_namespacePrefix, + const ::xmloff::token::XMLTokenEnum i_attributeToken, + const PropertyHandlerFactory i_factory, + const PropertyId i_propertyId, + const PropertyGroup i_propertyGroup + ) + :propertyName( i_propertyName ) + ,attribute( i_namespacePrefix, i_attributeToken ) + ,factory( i_factory ) + ,propertyId( i_propertyId ) + ,propertyGroup( i_propertyGroup ) + { + } + }; + + //================================================================================================================== + //= PropertyDescriptionList + //================================================================================================================== + typedef ::std::vector< const PropertyDescription* > PropertyDescriptionList; + + //================================================================================================================== + //= PropertyGroups + //================================================================================================================== + typedef ::std::list< PropertyDescriptionList > PropertyGroups; + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... + +#endif // XMLOFF_PROPERTY_DESCRIPTION_HXX diff --git a/xmloff/source/forms/property_group.hxx b/xmloff/source/forms/property_group.hxx new file mode 100755 index 000000000000..bca354f14e92 --- /dev/null +++ b/xmloff/source/forms/property_group.hxx @@ -0,0 +1,47 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef XMLOFF_PROPERTY_GROUP_HXX +#define XMLOFF_PROPERTY_GROUP_HXX + +//...................................................................................................................... +namespace xmloff +{ +//...................................................................................................................... + + //================================================================================================================== + //= PropertyGroup + //================================================================================================================== + enum PropertyGroup + { + NO_GROUP + }; + +//...................................................................................................................... +} // namespace xmloff +//...................................................................................................................... + +#endif // XMLOFF_PROPERTY_GROUP_HXX diff --git a/xmloff/source/forms/property_meta_data.cxx b/xmloff/source/forms/property_meta_data.cxx new file mode 100755 index 000000000000..5930d123578c --- /dev/null +++ b/xmloff/source/forms/property_meta_data.cxx @@ -0,0 +1,270 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public 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_xmloff.hxx" + +#include "property_description.hxx" +#include "forms/form_handler_factory.hxx" +#include "strings.hxx" +#include "xmloff/xmltoken.hxx" +#include "xmloff/xmlnmspe.hxx" + +#include <tools/diagnose_ex.h> +#include <tools/debug.hxx> + +#include <hash_map> + +//...................................................................................................................... +namespace xmloff { namespace metadata +{ +//...................................................................................................................... + + using namespace ::xmloff::token; + +#define FORM_SINGLE_PROPERTY( id, att ) \ + PropertyDescription( PROPERTY_##id, XML_NAMESPACE_FORM, att, &FormHandlerFactory::getFormPropertyHandler, PID_##id, NO_GROUP ) + + //================================================================================================================== + //= property meta data + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + namespace + { + const PropertyDescription* lcl_getPropertyMetaData() + { + static const PropertyDescription s_propertyMetaData[] = + { + FORM_SINGLE_PROPERTY( DATE_MIN, XML_MIN_VALUE ), + FORM_SINGLE_PROPERTY( DATE_MAX, XML_MAX_VALUE ), + FORM_SINGLE_PROPERTY( DEFAULT_DATE, XML_VALUE ), + FORM_SINGLE_PROPERTY( DATE, XML_CURRENT_VALUE ), + FORM_SINGLE_PROPERTY( TIME_MIN, XML_MIN_VALUE ), + FORM_SINGLE_PROPERTY( TIME_MAX, XML_MAX_VALUE ), + FORM_SINGLE_PROPERTY( DEFAULT_TIME, XML_VALUE ), + FORM_SINGLE_PROPERTY( TIME, XML_CURRENT_VALUE ), + + PropertyDescription() + }; + return s_propertyMetaData; + } + } + + //------------------------------------------------------------------------------------------------------------------ + namespace + { + // TODO: instead of having all of the below static, it should be some per-instance data. This way, the + // approach used here would scale much better. + // That is, if you have multiple "meta data instances", which manage a small, but closed set of properties, + // then looking looking through those multiple instances would probably be faster than searching within + // one big instance, since in this case, every instance can quickly decide whether it is responsible + // for some attribute or property, and otherwise delegate to the next instance. + + //.............................................................................................................. + typedef ::std::hash_map< ::rtl::OUString, const PropertyDescription*, ::rtl::OUStringHash > DescriptionsByName; + + //.............................................................................................................. + const DescriptionsByName& lcl_getPropertyDescriptions() + { + DBG_TESTSOLARMUTEX(); + static DescriptionsByName s_propertyDescriptionsByName; + if ( s_propertyDescriptionsByName.empty() ) + { + const PropertyDescription* desc = lcl_getPropertyMetaData(); + while ( desc->propertyName.getLength() != 0 ) + { + s_propertyDescriptionsByName[ desc->propertyName ] = desc; + ++desc; + } + } + return s_propertyDescriptionsByName; + } + + //.............................................................................................................. + typedef ::std::map< PropertyGroup, PropertyDescriptionList > IndexedPropertyGroups; + + //.............................................................................................................. + const IndexedPropertyGroups& lcl_getIndexedPropertyGroups() + { + DBG_TESTSOLARMUTEX(); + static IndexedPropertyGroups s_indexedPropertyGroups; + if ( s_indexedPropertyGroups.empty() ) + { + const PropertyDescription* desc = lcl_getPropertyMetaData(); + while ( desc->propertyName.getLength() != 0 ) + { + if ( desc->propertyGroup != NO_GROUP ) + s_indexedPropertyGroups[ desc->propertyGroup ].push_back( desc ); + ++desc; + } + } + return s_indexedPropertyGroups; + } + + //.............................................................................................................. + typedef ::std::hash_map< ::rtl::OUString, XMLTokenEnum, ::rtl::OUStringHash > ReverseTokenLookup; + + //.............................................................................................................. + const ReverseTokenLookup& getReverseTokenLookup() + { + DBG_TESTSOLARMUTEX(); + static ReverseTokenLookup s_reverseTokenLookup; + if ( s_reverseTokenLookup.empty() ) + { + const PropertyDescription* desc = lcl_getPropertyMetaData(); + while ( desc->propertyName.getLength() != 0 ) + { + s_reverseTokenLookup[ token::GetXMLToken( desc->attribute.attributeToken ) ] = desc->attribute.attributeToken; + ++desc; + } + } + return s_reverseTokenLookup; + } + + //.............................................................................................................. + struct AttributeHash : public ::std::unary_function< AttributeDescription, size_t > + { + size_t operator()( const AttributeDescription& i_attribute ) const + { + return size_t( i_attribute.attributeToken * 100 ) + size_t( i_attribute.namespacePrefix ); + } + }; + + //.............................................................................................................. + typedef ::std::hash_multimap< AttributeDescription, PropertyGroup, AttributeHash > AttributeGroups; + + //.............................................................................................................. + const AttributeGroups& lcl_getAttributeGroups() + { + DBG_TESTSOLARMUTEX(); + static AttributeGroups s_attributeGroups; + if ( s_attributeGroups.empty() ) + { + const PropertyDescription* desc = lcl_getPropertyMetaData(); + while ( desc->propertyName.getLength() != 0 ) + { + if ( desc->propertyGroup != NO_GROUP ) + s_attributeGroups.insert( AttributeGroups::value_type( desc->attribute, desc->propertyGroup ) ); + ++desc; + } + } + return s_attributeGroups; + } + + //.............................................................................................................. + typedef ::std::hash_map< AttributeDescription, PropertyGroups, AttributeHash > AttributesWithoutGroup; + + //.............................................................................................................. + const AttributesWithoutGroup& lcl_getAttributesWithoutGroups() + { + DBG_TESTSOLARMUTEX(); + static AttributesWithoutGroup s_attributesWithoutGroup; + if ( s_attributesWithoutGroup.empty() ) + { + const PropertyDescription* desc = lcl_getPropertyMetaData(); + while ( desc->propertyName.getLength() != 0 ) + { + if ( desc->propertyGroup == NO_GROUP ) + { + PropertyDescriptionList singleElementList; + singleElementList.push_back( desc ); + + s_attributesWithoutGroup[ desc->attribute ].push_back( singleElementList ); + } + ++desc; + } + } + return s_attributesWithoutGroup; + } + } + + //------------------------------------------------------------------------------------------------------------------ + const PropertyDescription* getPropertyDescription( const ::rtl::OUString& i_propertyName ) + { + const DescriptionsByName& rAllDescriptions( lcl_getPropertyDescriptions() ); + DescriptionsByName::const_iterator pos = rAllDescriptions.find( i_propertyName ); + if ( pos != rAllDescriptions.end() ) + return pos->second; + return NULL; + } + + //------------------------------------------------------------------------------------------------------------------ + void getPropertyGroup( const PropertyGroup i_propertyGroup, PropertyDescriptionList& o_propertyDescriptions ) + { + OSL_ENSURE( i_propertyGroup != NO_GROUP, "xmloff::metadata::getPropertyGroup: illegal group!" ); + + const IndexedPropertyGroups& rPropertyGroups( lcl_getIndexedPropertyGroups() ); + const IndexedPropertyGroups::const_iterator pos = rPropertyGroups.find( i_propertyGroup ); + if ( pos != rPropertyGroups.end() ) + o_propertyDescriptions = pos->second; + } + + //------------------------------------------------------------------------------------------------------------------ + void getPropertyGroupList( const AttributeDescription& i_attribute, PropertyGroups& o_propertyGroups ) + { + const AttributeGroups& rAttributeGroups = lcl_getAttributeGroups(); + + ::std::pair< AttributeGroups::const_iterator, AttributeGroups::const_iterator > + range = rAttributeGroups.equal_range( i_attribute ); + + if ( range.first == range.second ) + { + // the attribute is not used for any non-trivial group, which means it is mapped directly to + // a single property + const AttributesWithoutGroup& attributesWithoutGroups( lcl_getAttributesWithoutGroups() ); + const AttributesWithoutGroup::const_iterator pos = attributesWithoutGroups.find( i_attribute ); + if ( pos != attributesWithoutGroups.end() ) + o_propertyGroups = pos->second; + } + else + { + const IndexedPropertyGroups& rPropertyGroups = lcl_getIndexedPropertyGroups(); + for ( AttributeGroups::const_iterator group = range.first; group != range.second; ++group ) + { + const PropertyGroup propGroup = group->second; + const IndexedPropertyGroups::const_iterator groupPos = rPropertyGroups.find( propGroup ); + ENSURE_OR_CONTINUE( groupPos != rPropertyGroups.end(), "getPropertyGroupList: inconsistency!" ); + o_propertyGroups.push_back( groupPos->second ); + } + } + } + + //------------------------------------------------------------------------------------------------------------------ + AttributeDescription getAttributeDescription( const sal_uInt16 i_namespacePrefix, const ::rtl::OUString& i_attributeName ) + { + AttributeDescription attribute; + const ReverseTokenLookup& rTokenLookup( getReverseTokenLookup() ); + const ReverseTokenLookup::const_iterator pos = rTokenLookup.find( i_attributeName ); + if ( pos != rTokenLookup.end() ) + { + attribute.namespacePrefix = i_namespacePrefix; + attribute.attributeToken = pos->second; + } + return attribute; + } + +//...................................................................................................................... +} } // namespace xmloff::metadata +//...................................................................................................................... diff --git a/xmloff/source/forms/property_meta_data.hxx b/xmloff/source/forms/property_meta_data.hxx new file mode 100755 index 000000000000..a0f2aa6a1046 --- /dev/null +++ b/xmloff/source/forms/property_meta_data.hxx @@ -0,0 +1,68 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef XMLOFF_PROPERTY_META_DATA_HXX +#define XMLOFF_PROPERTY_META_DATA_HXX + +#include "property_description.hxx" + +//...................................................................................................................... +namespace xmloff { namespace metadata +{ +//...................................................................................................................... + + const PropertyDescription* getPropertyDescription( const ::rtl::OUString& i_propertyName ); + + /** retries the descriptions of all properties which add to the given XML attribute + + <p>Effectively, the complete property map is search for all entries which have the given + namespace/attribute values.</p> + */ + void getPropertyGroup( + const PropertyGroup i_propertyGroup, + PropertyDescriptionList& o_propertyDescriptions + ); + + /** retrieves all known property groups which are mapped to the given attribute + */ + void getPropertyGroupList( + const AttributeDescription& i_attribute, + PropertyGroups& o_propertyGroups + ); + + /** retrieves the attribute descriptor for the attribute given by namespace prefix and attribute name + */ + AttributeDescription + getAttributeDescription( const sal_uInt16 i_namespacePrefix, const ::rtl::OUString& i_attributeName ); + +//...................................................................................................................... +} } // namespace xmloff::metadata +//...................................................................................................................... + +#endif // XMLOFF_PROPERTY_META_DATA_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index ae3063258d5e..1b29f6b82802 100644..100755 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -33,12 +33,11 @@ #include "propertyexport.hxx" #include <xmloff/xmlexp.hxx> #include "strings.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include <xmloff/xmluconv.hxx> #include <xmloff/families.hxx> #include <osl/diagnose.h> #include <com/sun/star/beans/PropertyAttribute.hpp> -#include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/util/Date.hpp> #include <com/sun/star/util/Time.hpp> #include <com/sun/star/util/DateTime.hpp> @@ -73,6 +72,8 @@ namespace xmloff OPropertyExport::OPropertyExport(IFormsExportContext& _rContext, const Reference< XPropertySet >& _rxProps) :m_rContext(_rContext) ,m_xProps(_rxProps) + ,m_xPropertyInfo( m_xProps->getPropertySetInfo() ) + ,m_xPropertyState( _rxProps, UNO_QUERY ) { // caching ::rtl::OUStringBuffer aBuffer; @@ -81,7 +82,6 @@ namespace xmloff m_rContext.getGlobalContext().GetMM100UnitConverter().convertBool(aBuffer, sal_False); m_sValueFalse = aBuffer.makeStringAndClear(); - m_xPropertyInfo = m_xProps->getPropertySetInfo(); OSL_ENSURE(m_xPropertyInfo.is(), "OPropertyExport::OPropertyExport: need an XPropertySetInfo!"); // collect the properties which need to be exported @@ -89,6 +89,18 @@ namespace xmloff } //--------------------------------------------------------------------- + bool OPropertyExport::shouldExportProperty( const ::rtl::OUString& i_propertyName ) const + { + // if the property state is DEFAULT, it does not need to be written - at least + // if it's a built-in property, and not a dynamically-added one. + bool bIsDefaultValue = m_xPropertyState.is() + && ( PropertyState_DEFAULT_VALUE == m_xPropertyState->getPropertyState( i_propertyName ) ); + bool bIsDynamicProperty = m_xPropertyInfo.is() + && ( ( m_xPropertyInfo->getPropertyByName( i_propertyName ).Attributes & PropertyAttribute::REMOVEABLE ) != 0 ); + return ( !bIsDefaultValue || bIsDynamicProperty ); + } + + //--------------------------------------------------------------------- void OPropertyExport::exportRemainingProperties() { // the properties tag (will be created if we have at least one no-default property) @@ -96,9 +108,6 @@ namespace xmloff try { - Reference< XPropertyState > xPropertyState( m_xProps, UNO_QUERY ); - Reference< XPropertySetInfo > xPSI( m_xProps->getPropertySetInfo() ); - Any aValue; ::rtl::OUString sValue; @@ -113,13 +122,7 @@ namespace xmloff #if OSL_DEBUG_LEVEL > 0 const ::rtl::OUString sPropertyName = *aProperty; (void)sPropertyName; #endif - // if the property state is DEFAULT, it does not need to be written - at least - // if it's a built-in property, and not a dynamically-added one. - bool bIsDefaultValue = xPropertyState.is() - && ( PropertyState_DEFAULT_VALUE == xPropertyState->getPropertyState( *aProperty ) ); - bool bIsDynamicProperty = xPSI.is() - && ( ( xPSI->getPropertyByName( *aProperty ).Attributes & PropertyAttribute::REMOVEABLE ) != 0 ); - if ( bIsDefaultValue && !bIsDynamicProperty ) + if ( !shouldExportProperty( *aProperty ) ) continue; // now that we have the first sub-tag we need the form:properties element diff --git a/xmloff/source/forms/propertyexport.hxx b/xmloff/source/forms/propertyexport.hxx index 89c739ae4bd7..e31704c40530 100644..100755 --- a/xmloff/source/forms/propertyexport.hxx +++ b/xmloff/source/forms/propertyexport.hxx @@ -32,6 +32,7 @@ #include "formattributes.hxx" #include <comphelper/stl_types.hxx> #include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/beans/XPropertyState.hpp> #include <callbacks.hxx> #include <xmloff/xmlexp.hxx> #include "callbacks.hxx" @@ -75,10 +76,12 @@ namespace xmloff protected: IFormsExportContext& m_rContext; - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > - m_xProps; - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > - m_xPropertyInfo; + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > + m_xProps; + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > + m_xPropertyInfo; + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState > + m_xPropertyState; // caching ::rtl::OUString m_sValueTrue; @@ -309,6 +312,14 @@ namespace xmloff const sal_Unicode _aQuoteCharacter = '"', const sal_Unicode _aListSeparator = ','); + /** determines whether the given property is to be exported + + <p>Currently, the method simply checks whether the property's state is <em>not</em> PropertyState.DEFAULT, + or whether the property is a dynamic property (i.e. added via an <code>XPropertyContainer</code>). + So, take care when using the method - the heuristics is not applicable for all properties.</p> + */ + bool shouldExportProperty( const ::rtl::OUString& i_propertyName ) const; + /** tries to convert an arbitrary <type scope="com.sun:star.uno">Any</type> into an string <p>If the type contained in the Any is not supported, the returned string will be empty. In the diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 9bd3a2589758..f250821a5c5d 100644..100755 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -35,7 +35,7 @@ #include <osl/diagnose.h> #include <comphelper/extract.hxx> #include "callbacks.hxx" -#include "xmlnmspe.hxx" +#include "xmloff/xmlnmspe.hxx" #include <tools/date.hxx> #include <tools/time.hxx> #include <tools/datetime.hxx> @@ -350,7 +350,7 @@ _rChars } //--------------------------------------------------------------------- -void OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) +bool OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { const OAttribute2Property::AttributeAssignment* pProperty = m_rContext.getAttributeMap().getAttributeTranslation(_rLocalName); if (pProperty) @@ -362,18 +362,21 @@ void OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const ::rtl // convert the value string into the target type aNewValue.Value = PropertyConversion::convertString(m_rContext.getGlobalContext(), pProperty->aPropertyType, _rValue, pProperty->pEnumMap, pProperty->bInverseSemantics); implPushBackPropertyValue( aNewValue ); + return true; } -#if OSL_DEBUG_LEVEL > 0 - else if (!token::IsXMLToken(_rLocalName, token::XML_TYPE)) // xlink:type is valid but ignored for <form:form> + if (!token::IsXMLToken(_rLocalName, token::XML_TYPE)) // xlink:type is valid but ignored for <form:form> { +#if OSL_DEBUG_LEVEL > 0 ::rtl::OString sMessage( "OPropertyImport::handleAttribute: Can't handle the following:\n" ); sMessage += ::rtl::OString( " Attribute name: " ); sMessage += ::rtl::OString( _rLocalName.getStr(), _rLocalName.getLength(), osl_getThreadTextEncoding() ); sMessage += ::rtl::OString( "\n value: " ); sMessage += ::rtl::OString( _rValue.getStr(), _rValue.getLength(), osl_getThreadTextEncoding() ); OSL_ENSURE( sal_False, sMessage.getStr() ); - } #endif + return false; + } + return true; } //===================================================================== diff --git a/xmloff/source/forms/propertyimport.hxx b/xmloff/source/forms/propertyimport.hxx index 2fcd3a206a35..922edbdacbbd 100644..100755 --- a/xmloff/source/forms/propertyimport.hxx +++ b/xmloff/source/forms/propertyimport.hxx @@ -120,7 +120,7 @@ namespace xmloff @param _rValue attribute value */ - virtual void handleAttribute(sal_uInt16 _nNamespaceKey, + virtual bool handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue); diff --git a/xmloff/source/forms/strings.cxx b/xmloff/source/forms/strings.cxx index 222740b7b2ff..222740b7b2ff 100644..100755 --- a/xmloff/source/forms/strings.cxx +++ b/xmloff/source/forms/strings.cxx diff --git a/xmloff/source/forms/strings.hxx b/xmloff/source/forms/strings.hxx index b98cd42f43c7..b98cd42f43c7 100644..100755 --- a/xmloff/source/forms/strings.hxx +++ b/xmloff/source/forms/strings.hxx diff --git a/xmloff/source/forms/valueproperties.cxx b/xmloff/source/forms/valueproperties.cxx index 81d6c5a70bbb..59d1b25de22d 100644..100755 --- a/xmloff/source/forms/valueproperties.cxx +++ b/xmloff/source/forms/valueproperties.cxx @@ -66,16 +66,6 @@ namespace xmloff } break; - case FormComponentType::DATEFIELD: - _rpCurrentValuePropertyName = PROPERTY_DATE; - _rpValuePropertyName = PROPERTY_DEFAULT_DATE; - break; - - case FormComponentType::TIMEFIELD: - _rpCurrentValuePropertyName = PROPERTY_TIME; - _rpValuePropertyName = PROPERTY_DEFAULT_TIME; - break; - case FormComponentType::NUMERICFIELD: case FormComponentType::CURRENCYFIELD: _rpCurrentValuePropertyName = PROPERTY_VALUE; @@ -109,6 +99,10 @@ namespace xmloff _rpCurrentValuePropertyName = PROPERTY_SPINVALUE; _rpValuePropertyName = PROPERTY_DEFAULT_SPINVALUE; break; + + default: + OSL_ENSURE( false, "OValuePropertiesMetaData::getValuePropertyNames: unsupported component type!" ); + break; } } @@ -120,16 +114,6 @@ namespace xmloff _rpMinValuePropertyName = _rpMaxValuePropertyName = NULL; switch (_nFormComponentType) { - case FormComponentType::DATEFIELD: - _rpMinValuePropertyName = PROPERTY_DATE_MIN; - _rpMaxValuePropertyName = PROPERTY_DATE_MAX; - break; - - case FormComponentType::TIMEFIELD: - _rpMinValuePropertyName = PROPERTY_TIME_MIN; - _rpMaxValuePropertyName = PROPERTY_TIME_MAX; - break; - case FormComponentType::NUMERICFIELD: case FormComponentType::CURRENCYFIELD: _rpMinValuePropertyName = PROPERTY_VALUE_MIN; @@ -150,6 +134,10 @@ namespace xmloff _rpMinValuePropertyName = PROPERTY_SPINVALUE_MIN; _rpMaxValuePropertyName = PROPERTY_SPINVALUE_MAX; break; + + default: + OSL_ENSURE( false, "OValuePropertiesMetaData::getValueLimitPropertyNames: unsupported component type!" ); + break; } } @@ -176,7 +164,15 @@ namespace xmloff break; case FormComponentType::DATEFIELD: + _rpValuePropertyName = PROPERTY_DATE; + _rpDefaultValuePropertyName = PROPERTY_DEFAULT_DATE; + break; + case FormComponentType::TIMEFIELD: + _rpValuePropertyName = PROPERTY_TIME; + _rpDefaultValuePropertyName = PROPERTY_DEFAULT_TIME; + break; + case FormComponentType::NUMERICFIELD: case FormComponentType::CURRENCYFIELD: case FormComponentType::PATTERNFIELD: diff --git a/xmloff/source/forms/valueproperties.hxx b/xmloff/source/forms/valueproperties.hxx index f29153653bf4..f29153653bf4 100644..100755 --- a/xmloff/source/forms/valueproperties.hxx +++ b/xmloff/source/forms/valueproperties.hxx |