summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--avmedia/source/framework/makefile.mk1
-rw-r--r--basic/inc/pch/precompiled_basic.hxx2
-rw-r--r--basic/source/runtime/methods.cxx36
-rwxr-xr-xbasic/source/runtime/runtime.cxx2
-rw-r--r--basic/source/sbx/format.src2
-rw-r--r--basic/source/sbx/sbxscan.cxx2
-rw-r--r--configmgr/source/access.cxx14
-rw-r--r--configmgr/source/components.cxx7
-rw-r--r--configmgr/source/components.hxx5
-rw-r--r--configmgr/source/data.cxx14
-rw-r--r--configmgr/source/data.hxx5
-rw-r--r--configmgr/source/rootaccess.cxx11
-rw-r--r--configmgr/source/rootaccess.hxx2
-rw-r--r--configmgr/source/xcuparser.cxx3
-rw-r--r--connectivity/inc/connectivity/PColumn.hxx32
-rw-r--r--connectivity/inc/connectivity/SQLStatementHelper.hxx54
-rw-r--r--connectivity/inc/connectivity/TTableHelper.hxx3
-rw-r--r--connectivity/inc/connectivity/dbtools.hxx38
-rw-r--r--connectivity/inc/connectivity/sdbcx/VColumn.hxx1
-rw-r--r--connectivity/inc/connectivity/sqliterator.hxx8
-rw-r--r--connectivity/inc/connectivity/sqlnode.hxx5
-rw-r--r--connectivity/qa/connectivity/tools/CRMDatabase.java2
-rw-r--r--connectivity/source/commontools/DateConversion.cxx58
-rw-r--r--[-rwxr-xr-x]connectivity/source/commontools/DriversConfig.cxx36
-rw-r--r--connectivity/source/commontools/TColumnsHelper.cxx27
-rw-r--r--connectivity/source/commontools/TTableHelper.cxx5
-rw-r--r--connectivity/source/commontools/dbtools.cxx46
-rw-r--r--connectivity/source/commontools/dbtools2.cxx58
-rw-r--r--connectivity/source/commontools/propertyids.cxx2
-rw-r--r--connectivity/source/drivers/adabas/BColumns.cxx1
-rw-r--r--[-rwxr-xr-x]connectivity/source/drivers/adabas/adabas.xcu5
-rw-r--r--connectivity/source/drivers/ado/AColumn.cxx7
-rw-r--r--[-rwxr-xr-x]connectivity/source/drivers/ado/ado.xcu10
-rw-r--r--connectivity/source/drivers/calc/CTable.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx1
-rw-r--r--[-rwxr-xr-x]connectivity/source/drivers/dbase/dbase.xcu5
-rw-r--r--connectivity/source/drivers/evoab2/NColumns.cxx1
-rw-r--r--connectivity/source/drivers/evoab2/NStatement.cxx7
-rw-r--r--connectivity/source/drivers/file/FColumns.cxx1
-rw-r--r--connectivity/source/drivers/file/FPreparedStatement.cxx1
-rw-r--r--connectivity/source/drivers/file/fcomp.cxx37
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx2
-rw-r--r--[-rwxr-xr-x]connectivity/source/drivers/hsqldb/hsqldb.xcu5
-rw-r--r--[-rwxr-xr-x]connectivity/source/drivers/jdbc/jdbc.xcu5
-rw-r--r--connectivity/source/drivers/kab/KColumns.cxx1
-rw-r--r--connectivity/source/drivers/kab/KStatement.cxx11
-rwxr-xr-xconnectivity/source/drivers/macab/MacabColumns.cxx1
-rwxr-xr-xconnectivity/source/drivers/macab/MacabStatement.cxx11
-rw-r--r--connectivity/source/drivers/mozab/MColumns.cxx1
-rw-r--r--connectivity/source/drivers/mozab/MPreparedStatement.cxx1
-rw-r--r--connectivity/source/drivers/mozab/MResultSet.cxx21
-rw-r--r--connectivity/source/drivers/mysql/YTable.cxx10
-rw-r--r--connectivity/source/drivers/mysql/YTables.cxx14
-rw-r--r--[-rwxr-xr-x]connectivity/source/drivers/mysql/mysql.xcu25
-rw-r--r--connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx2
-rw-r--r--connectivity/source/drivers/odbcbase/OResultSet.cxx2
-rw-r--r--connectivity/source/drivers/odbcbase/OTools.cxx1
-rw-r--r--connectivity/source/inc/mysql/YTables.hxx7
-rw-r--r--connectivity/source/inc/propertyids.hxx2
-rw-r--r--connectivity/source/parse/PColumn.cxx70
-rw-r--r--connectivity/source/parse/sqlbison.y1152
-rw-r--r--connectivity/source/parse/sqlflex.l539
-rw-r--r--connectivity/source/parse/sqliterator.cxx136
-rw-r--r--connectivity/source/parse/sqlnode.cxx55
-rw-r--r--connectivity/source/sdbcx/VColumn.cxx4
-rw-r--r--connectivity/source/sdbcx/VIndexColumn.cxx1
-rw-r--r--connectivity/source/sdbcx/VKeyColumn.cxx1
-rw-r--r--desktop/source/app/app.cxx17
-rw-r--r--desktop/source/deployment/dp_xml.cxx209
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_dialog2.cxx20
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_service.cxx8
-rw-r--r--desktop/source/deployment/gui/makefile.mk1
-rw-r--r--desktop/source/deployment/inc/dp_descriptioninfoset.hxx10
-rw-r--r--desktop/source/deployment/inc/dp_xml.h104
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx6
-rw-r--r--desktop/source/deployment/misc/dp_platform.cxx6
-rw-r--r--desktop/source/migration/migration.cxx589
-rw-r--r--desktop/source/migration/migration_impl.hxx122
-rw-r--r--desktop/source/migration/pages.cxx16
-rw-r--r--desktop/source/migration/pages.hxx8
-rw-r--r--[-rwxr-xr-x]desktop/source/migration/services/oo3extensionmigration.cxx61
-rw-r--r--[-rwxr-xr-x]desktop/source/migration/services/oo3extensionmigration.hxx4
-rw-r--r--desktop/source/migration/wizard.cxx9
-rw-r--r--desktop/source/migration/wizard.hxx3
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx45
-rw-r--r--drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx14
-rw-r--r--drawinglayer/prj/d.lst2
-rw-r--r--drawinglayer/source/primitive2d/metafileprimitive2d.cxx243
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx32
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx53
-rw-r--r--drawinglayer/source/processor3d/shadow3dextractor.cxx76
-rw-r--r--drawinglayer/source/processor3d/zbufferprocessor3d.cxx2
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/editeng.hxx3
-rw-r--r--editeng/inc/editeng/editview.hxx4
-rw-r--r--editeng/inc/editeng/outliner.hxx8
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/splwrap.hxx1
-rw-r--r--editeng/source/editeng/editeng.cxx14
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editview.cxx82
-rw-r--r--editeng/source/editeng/edtspell.cxx12
-rw-r--r--editeng/source/editeng/edtspell.hxx8
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/impedit.cxx13
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/impedit.hxx5
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/impedit2.cxx24
-rw-r--r--editeng/source/editeng/impedit3.cxx2
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/impedit4.cxx72
-rw-r--r--editeng/source/outliner/outlin2.cxx4
-rwxr-xr-x[-rw-r--r--]editeng/source/outliner/outlvw.cxx66
-rw-r--r--embeddedobj/source/inc/oleembobj.hxx2
-rw-r--r--embeddedobj/source/msole/oleembed.cxx105
-rw-r--r--embeddedobj/source/msole/olemisc.cxx3
-rw-r--r--fpicker/source/aqua/resourceprovider.cxx2
-rw-r--r--fpicker/source/office/OfficeFilePicker.src2
-rw-r--r--fpicker/source/office/iodlg.cxx5
-rw-r--r--fpicker/source/office/iodlg.hrc2
-rw-r--r--fpicker/source/office/iodlg.src2
-rw-r--r--fpicker/source/office/iodlgimp.cxx5
-rw-r--r--fpicker/source/unx/gnome/resourceprovider.cxx2
-rw-r--r--fpicker/source/unx/kde4/KDE4FilePicker.cxx2
-rw-r--r--fpicker/source/win32/filepicker/FPentry.cxx4
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx12
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx4
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx2
-rw-r--r--fpicker/source/win32/misc/resourceprovider.cxx2
-rw-r--r--framework/inc/classes/menumanager.hxx3
-rw-r--r--framework/inc/classes/resource.hrc1
-rw-r--r--framework/inc/classes/sfxhelperfunctions.hxx5
-rw-r--r--framework/inc/helper/imageproducer.hxx4
-rwxr-xr-x[-rw-r--r--]framework/inc/helper/mischelper.hxx55
-rw-r--r--framework/inc/helper/popupmenucontrollerbase.hxx145
-rw-r--r--framework/inc/helper/uiconfigelementwrapperbase.hxx3
-rw-r--r--framework/inc/helper/uielementwrapperbase.hxx3
-rw-r--r--framework/inc/threadhelp/fairrwlock.hxx1
-rw-r--r--framework/inc/uielement/controlmenucontroller.hxx7
-rw-r--r--framework/inc/uielement/fontmenucontroller.hxx7
-rw-r--r--framework/inc/uielement/fontsizemenucontroller.hxx7
-rw-r--r--framework/inc/uielement/headermenucontroller.hxx7
-rw-r--r--framework/inc/uielement/langselectionmenucontroller.hxx10
-rw-r--r--framework/inc/uielement/langselectionstatusbarcontroller.hxx17
-rw-r--r--framework/inc/uielement/macrosmenucontroller.hxx7
-rw-r--r--framework/inc/uielement/newmenucontroller.hxx7
-rw-r--r--framework/inc/uielement/objectmenucontroller.hxx7
-rw-r--r--framework/inc/uielement/popupmenucontroller.hxx80
-rw-r--r--framework/inc/uielement/recentfilesmenucontroller.hxx7
-rw-r--r--framework/inc/uielement/toolbarmanager.hxx15
-rw-r--r--framework/inc/uielement/toolbarsmenucontroller.hxx7
-rw-r--r--framework/inc/uielement/uielementtypenames.hxx1
-rw-r--r--framework/prj/d.lst3
-rw-r--r--framework/source/classes/menumanager.cxx2
-rw-r--r--framework/source/classes/resource.src5
-rw-r--r--framework/source/classes/sfxhelperfunctions.cxx23
-rw-r--r--framework/source/helper/imageproducer.cxx2
-rw-r--r--framework/source/helper/makefile.mk1
-rw-r--r--framework/source/helper/mischelper.cxx113
-rw-r--r--framework/source/helper/popupmenucontrollerbase.cxx429
-rw-r--r--framework/source/helper/uiconfigelementwrapperbase.cxx20
-rw-r--r--framework/source/helper/uielementwrapperbase.cxx17
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx8
-rw-r--r--framework/source/register/registertemp.cxx5
-rw-r--r--framework/source/services/backingwindow.cxx156
-rw-r--r--framework/source/services/backingwindow.hxx20
-rw-r--r--framework/source/services/fwk_services.src2
-rw-r--r--framework/source/services/pathsettings.cxx1
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx6
-rw-r--r--framework/source/uiconfiguration/uiconfigurationmanager.cxx3
-rw-r--r--framework/source/uielement/comboboxtoolbarcontroller.cxx1
-rw-r--r--framework/source/uielement/controlmenucontroller.cxx18
-rw-r--r--framework/source/uielement/dropdownboxtoolbarcontroller.cxx1
-rw-r--r--framework/source/uielement/edittoolbarcontroller.cxx1
-rw-r--r--framework/source/uielement/fontmenucontroller.cxx17
-rw-r--r--framework/source/uielement/fontsizemenucontroller.cxx18
-rw-r--r--framework/source/uielement/headermenucontroller.cxx19
-rw-r--r--framework/source/uielement/imagebuttontoolbarcontroller.cxx1
-rw-r--r--framework/source/uielement/langselectionmenucontroller.cxx236
-rw-r--r--framework/source/uielement/langselectionstatusbarcontroller.cxx286
-rw-r--r--framework/source/uielement/macrosmenucontroller.cxx10
-rw-r--r--framework/source/uielement/makefile.mk1
-rw-r--r--framework/source/uielement/newmenucontroller.cxx13
-rw-r--r--framework/source/uielement/objectmenucontroller.cxx7
-rw-r--r--framework/source/uielement/popupmenucontroller.cxx248
-rw-r--r--framework/source/uielement/progressbarwrapper.cxx1
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx44
-rw-r--r--framework/source/uielement/spinfieldtoolbarcontroller.cxx1
-rw-r--r--framework/source/uielement/statusbarmanager.cxx1
-rw-r--r--framework/source/uielement/togglebuttontoolbarcontroller.cxx1
-rw-r--r--framework/source/uielement/toolbarmanager.cxx228
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx24
-rw-r--r--framework/source/uielement/toolbarwrapper.cxx1
-rw-r--r--framework/uiconfig/startmodule/accelerator/en-GB/default.xml28
-rw-r--r--framework/uiconfig/startmodule/accelerator/en-US/default.xml28
-rw-r--r--framework/util/makefile.mk8
-rw-r--r--linguistic/source/convdiclist.cxx1
-rwxr-xr-x[-rw-r--r--]linguistic/source/dicimp.cxx48
-rw-r--r--linguistic/source/dlistimp.cxx7
-rw-r--r--[-rwxr-xr-x]officecfg/registry/data/org/openoffice/Office/Accelerators.xcu45
-rw-r--r--officecfg/registry/data/org/openoffice/Office/Impress.xcu10
-rw-r--r--officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu5
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu20
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu121
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu3813
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu20
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/Factories.xcu38
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu87
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu1593
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu2
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu20
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu20
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu20
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/XFormsWindowState.xcu20
-rw-r--r--[-rwxr-xr-x]officecfg/registry/data/org/openoffice/Setup.xcu49
-rw-r--r--officecfg/registry/data/org/openoffice/VCL.xcu29
-rw-r--r--officecfg/registry/data/org/openoffice/ucb/Configuration.xcu11
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Impress.xcs2794
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs25
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Math.xcs2
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/UI/WindowState.xcs15
-rw-r--r--officecfg/registry/schema/org/openoffice/Setup.xcs16
-rw-r--r--scripting/source/dlgprov/dlgprov.cxx31
-rw-r--r--sfx2/inc/imagemgr.hxx2
-rw-r--r--sfx2/inc/pch/precompiled_sfx2.hxx2
-rw-r--r--sfx2/inc/sfx2/childwin.hxx42
-rw-r--r--sfx2/inc/sfx2/docfac.hxx1
-rw-r--r--sfx2/inc/sfx2/filedlghelper.hxx24
-rw-r--r--sfx2/inc/sfx2/mnumgr.hxx22
-rw-r--r--sfx2/inc/sfx2/module.hxx2
-rw-r--r--sfx2/inc/sfx2/sfxsids.hrc4
-rw-r--r--sfx2/inc/sfx2/taskpane.hxx245
-rw-r--r--sfx2/inc/sfx2/tbxctrl.hxx1
-rw-r--r--sfx2/inc/sfx2/titledockwin.hxx162
-rw-r--r--sfx2/inc/sfx2/viewfrm.hxx66
-rw-r--r--sfx2/prj/build.lst5
-rw-r--r--sfx2/qa/cppunit/makefile.mk74
-rw-r--r--sfx2/qa/cppunit/test_metadatable.cxx280
-rw-r--r--sfx2/qa/cppunit/version.map34
-rw-r--r--sfx2/sdi/frmslots.sdi5
-rw-r--r--sfx2/sdi/sfx.sdi53
-rw-r--r--sfx2/source/appl/app.cxx1
-rw-r--r--sfx2/source/appl/appinit.cxx2
-rw-r--r--sfx2/source/appl/appreg.cxx1
-rw-r--r--sfx2/source/appl/imagemgr.cxx2
-rw-r--r--sfx2/source/appl/module.cxx13
-rw-r--r--sfx2/source/appl/workwin.cxx107
-rw-r--r--sfx2/source/dialog/dialog.hrc31
-rw-r--r--sfx2/source/dialog/dialog.src157
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx10
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx64
-rw-r--r--sfx2/source/dialog/filedlgimpl.hxx2
-rw-r--r--sfx2/source/dialog/makefile.mk15
-rw-r--r--sfx2/source/dialog/taskpane.cxx1283
-rw-r--r--sfx2/source/dialog/taskpane.src (renamed from sfx2/source/dialog/sfxurl.cxx)32
-rw-r--r--sfx2/source/dialog/titledockwin.cxx364
-rw-r--r--sfx2/source/dialog/titledockwin.src39
-rw-r--r--sfx2/source/doc/Metadatable.cxx162
-rw-r--r--sfx2/source/doc/docfac.cxx129
-rw-r--r--sfx2/source/doc/makefile.mk7
-rwxr-xr-xsfx2/source/doc/syspath.cxx48
-rw-r--r--sfx2/source/doc/syspath.hxx44
-rw-r--r--sfx2/source/doc/syspathw32.cxx83
-rw-r--r--sfx2/source/inc/helpid.hrc3
-rw-r--r--sfx2/source/inc/sfxlocal.hrc12
-rw-r--r--sfx2/source/inc/workwin.hxx1
-rw-r--r--sfx2/source/menu/makefile.mk5
-rw-r--r--sfx2/source/menu/menu.hrc4
-rw-r--r--sfx2/source/menu/menu.src15
-rwxr-xr-x[-rw-r--r--]sfx2/source/menu/mnumgr.cxx120
-rwxr-xr-xsfx2/source/menu/thessubmenu.cxx274
-rw-r--r--sfx2/source/menu/thessubmenu.hxx107
-rw-r--r--sfx2/source/view/impviewframe.hxx4
-rw-r--r--sfx2/source/view/viewfrm.cxx67
-rw-r--r--sfx2/source/view/viewprn.cxx45
-rw-r--r--sfx2/util/hidother.src1
-rw-r--r--sfx2/win/res/expdesk.icobin4990 -> 0 bytes
-rw-r--r--sfx2/win/res/expexp.icobin2758 -> 0 bytes
-rw-r--r--sfx2/win/res/expfld.icobin2758 -> 0 bytes
-rw-r--r--sfx2/win/res/expftp.icobin2758 -> 0 bytes
-rw-r--r--sfx2/win/res/exptrash.icobin2758 -> 0 bytes
-rw-r--r--sfx2/win/res/expwork.icobin2758 -> 0 bytes
-rw-r--r--sfx2/win/res/frameset.icobin2758 -> 0 bytes
-rw-r--r--sfx2/win/res/search.icobin2758 -> 0 bytes
-rw-r--r--sfx2/workben/custompanel/CalcWindowState.xcu21
-rw-r--r--sfx2/workben/custompanel/DrawWindowState.xcu21
-rw-r--r--sfx2/workben/custompanel/Factories.xcu21
-rw-r--r--sfx2/workben/custompanel/ImpressWindowState.xcu21
-rw-r--r--sfx2/workben/custompanel/WriterWindowState.xcu35
-rw-r--r--sfx2/workben/custompanel/ctp_factory.cxx167
-rw-r--r--sfx2/workben/custompanel/ctp_factory.hxx83
-rw-r--r--sfx2/workben/custompanel/ctp_panel.cxx270
-rw-r--r--sfx2/workben/custompanel/ctp_panel.hxx124
-rw-r--r--sfx2/workben/custompanel/ctp_services.cxx92
-rw-r--r--sfx2/workben/custompanel/delzip0
-rw-r--r--sfx2/workben/custompanel/description.xml16
-rw-r--r--sfx2/workben/custompanel/makefile.mk120
-rw-r--r--sfx2/workben/custompanel/manifest.xml18
-rw-r--r--sfx2/workben/custompanel/panel.pngbin0 -> 202 bytes
-rw-r--r--svx/inc/extrusioncontrols.hxx390
-rw-r--r--svx/inc/extrusiondepthdialog.hxx60
-rw-r--r--svx/inc/fontworkgallery.hxx139
-rw-r--r--svx/inc/globlmn_tmpl.hrc31
-rw-r--r--svx/inc/helpid.hrc3
-rw-r--r--svx/inc/svdstr.hrc2
-rw-r--r--svx/inc/svx/SpellDialogChildWindow.hxx8
-rwxr-xr-x[-rw-r--r--]svx/inc/svx/dialogs.hrc0
-rw-r--r--svx/inc/svx/extrusioncolorcontrol.hxx56
-rw-r--r--svx/inc/svx/fmshell.hxx22
-rw-r--r--svx/inc/svx/fmtools.hxx1
-rw-r--r--svx/inc/svx/gridctrl.hxx16
-rw-r--r--svx/inc/svx/sdr/overlay/overlaybitmapex.hxx5
-rw-r--r--svx/inc/svx/sdrmasterpagedescriptor.hxx2
-rw-r--r--svx/inc/svx/sdrobjectfilter.hxx58
-rw-r--r--svx/inc/svx/svddef.hxx3
-rw-r--r--svx/inc/svx/svdhdl.hxx14
-rw-r--r--svx/inc/svx/svdmrkv.hxx1
-rw-r--r--svx/inc/svx/svdobj.hxx19
-rw-r--r--svx/inc/svx/svdograf.hxx2
-rw-r--r--svx/inc/svx/svdomedia.hxx2
-rw-r--r--svx/inc/svx/svdotable.hxx1
-rw-r--r--svx/inc/svx/svdpage.hxx1
-rw-r--r--svx/inc/svx/svxids.hrc11
-rw-r--r--svx/inc/svx/sxopitm.hxx6
-rw-r--r--[-rwxr-xr-x]svx/inc/svx/unoshprp.hxx1
-rw-r--r--svx/inc/tbunocontroller.hxx1
-rw-r--r--svx/inc/tbunosearchcontrollers.hxx282
-rw-r--r--svx/prj/build.lst3
-rw-r--r--svx/prj/d.lst146
-rw-r--r--svx/sdi/fmslots.sdi2
-rw-r--r--svx/sdi/svx.sdi81
-rw-r--r--svx/source/core/coreservices.cxx183
-rw-r--r--svx/source/core/makefile.mk47
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx240
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.hxx12
-rw-r--r--svx/source/dialog/makefile.mk2
-rw-r--r--svx/source/dialog/svxruler.cxx40
-rw-r--r--svx/source/engine3d/scene3d.cxx14
-rw-r--r--svx/source/engine3d/view3d.cxx170
-rw-r--r--svx/source/fmcomp/dbaexchange.cxx57
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx21
-rw-r--r--svx/source/fmcomp/gridcell.cxx109
-rw-r--r--svx/source/fmcomp/gridctrl.cxx47
-rw-r--r--svx/source/form/datanavi.cxx2
-rw-r--r--svx/source/form/fmshell.cxx101
-rw-r--r--svx/source/form/fmshimp.cxx31
-rw-r--r--svx/source/form/fmtextcontrolshell.cxx2
-rw-r--r--svx/source/form/fmtools.cxx2
-rw-r--r--svx/source/form/fmview.cxx4
-rw-r--r--svx/source/form/fmvwimp.cxx101
-rw-r--r--svx/source/form/formcontrolfactory.cxx8
-rw-r--r--svx/source/form/navigatortree.cxx2
-rw-r--r--svx/source/form/tabwin.cxx58
-rw-r--r--svx/source/inc/fmprop.hrc1
-rw-r--r--svx/source/inc/fmshimp.hxx3
-rw-r--r--svx/source/inc/fmvwimp.hxx5
-rw-r--r--svx/source/inc/gridcell.hxx3
-rw-r--r--svx/source/intro/iso.src2
-rw-r--r--svx/source/intro/makefile.mk4
-rw-r--r--svx/source/intro/ooo.src4
-rw-r--r--svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx27
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrpage.cxx16
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofgroup.cxx69
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx13
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx23
-rw-r--r--svx/source/sdr/overlay/overlaybitmapex.cxx15
-rw-r--r--svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx8
-rw-r--r--svx/source/svdraw/sdrhittesthelper.cxx2
-rw-r--r--svx/source/svdraw/sdrmasterpagedescriptor.cxx12
-rw-r--r--svx/source/svdraw/svdattr.cxx2
-rw-r--r--svx/source/svdraw/svdedtv.cxx6
-rw-r--r--svx/source/svdraw/svdedtv1.cxx4
-rw-r--r--svx/source/svdraw/svdedtv2.cxx11
-rw-r--r--svx/source/svdraw/svdedxv.cxx2
-rw-r--r--svx/source/svdraw/svdfmtf.cxx63
-rw-r--r--svx/source/svdraw/svdhdl.cxx19
-rw-r--r--svx/source/svdraw/svdmrkv.cxx44
-rw-r--r--svx/source/svdraw/svdobj.cxx52
-rw-r--r--svx/source/svdraw/svdocirc.cxx5
-rw-r--r--svx/source/svdraw/svdoedge.cxx43
-rw-r--r--svx/source/svdraw/svdograf.cxx2
-rw-r--r--svx/source/svdraw/svdomedia.cxx49
-rw-r--r--svx/source/svdraw/svdotextpathdecomposition.cxx104
-rw-r--r--svx/source/svdraw/svdoutl.cxx5
-rw-r--r--svx/source/svdraw/svdpage.cxx52
-rw-r--r--svx/source/svdraw/svdpagv.cxx6
-rw-r--r--svx/source/svdraw/svdstr.src5
-rw-r--r--svx/source/svdraw/svdview.cxx4
-rw-r--r--svx/source/table/svdotable.cxx10
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx1153
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.hxx260
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.src19
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx663
-rw-r--r--svx/source/tbxctrls/fontworkgallery.src12
-rw-r--r--svx/source/tbxctrls/makefile.mk4
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx867
-rw-r--r--svx/source/tbxctrls/toolbarmenu.cxx1029
-rw-r--r--svx/source/tbxctrls/toolbarmenu.hxx90
-rw-r--r--svx/source/toolbars/extrusionbar.cxx3
-rw-r--r--svx/source/unodraw/unoctabl.cxx62
-rw-r--r--svx/source/unodraw/unopage.cxx8
-rw-r--r--svx/source/unodraw/unoshape.cxx18
-rw-r--r--svx/uiconfig/accelerator/default.xml5
-rw-r--r--svx/uiconfig/accelerator/en-US/default.xml29
-rw-r--r--svx/uiconfig/accelerator/es/default.xml29
-rw-r--r--svx/util/makefile.mk4
-rw-r--r--svx/workben/msview/msview.cxx2
-rw-r--r--ucb/prj/build.lst3
-rw-r--r--ucb/source/ucp/ext/makefile.mk65
-rw-r--r--ucb/source/ucp/ext/ucpext_content.cxx672
-rw-r--r--ucb/source/ucp/ext/ucpext_content.hxx154
-rw-r--r--ucb/source/ucp/ext/ucpext_datasupplier.cxx375
-rw-r--r--ucb/source/ucp/ext/ucpext_datasupplier.hxx86
-rw-r--r--ucb/source/ucp/ext/ucpext_provider.cxx208
-rw-r--r--ucb/source/ucp/ext/ucpext_provider.hxx68
-rw-r--r--ucb/source/ucp/ext/ucpext_resultset.cxx99
-rw-r--r--ucb/source/ucp/ext/ucpext_resultset.hxx66
-rw-r--r--ucb/source/ucp/ext/ucpext_services.cxx93
-rw-r--r--uui/source/iahndl-authentication.cxx12
-rw-r--r--uui/source/iahndl-errorhandler.cxx2
-rwxr-xr-x[-rw-r--r--]uui/source/iahndl.cxx24
-rwxr-xr-x[-rw-r--r--]uui/source/iahndl.hxx3
-rw-r--r--xmlhelp/prj/d.lst4
-rw-r--r--xmloff/inc/SchXMLExport.hxx2
-rw-r--r--xmloff/inc/SchXMLImport.hxx2
-rw-r--r--xmloff/inc/xmlnmspe.hxx4
-rw-r--r--xmloff/inc/xmloff/SchXMLExportHelper.hxx179
-rw-r--r--xmloff/inc/xmloff/shapeexport.hxx11
-rw-r--r--xmloff/inc/xmloff/xmltoken.hxx11
-rw-r--r--xmloff/qa/unoapi/knownissues.xcl11
-rw-r--r--xmloff/qa/unoapi/xmloff.sce4
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx348
-rw-r--r--xmloff/source/chart/SchXMLImport.cxx4
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx194
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.hxx60
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx23
-rw-r--r--xmloff/source/chart/SchXMLTools.hxx1
-rw-r--r--xmloff/source/core/xmlexp.cxx2
-rw-r--r--xmloff/source/core/xmlimp.cxx4
-rw-r--r--xmloff/source/core/xmltoken.cxx10
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx9
-rw-r--r--xmloff/source/draw/shapeexport.cxx48
-rw-r--r--xmloff/source/draw/shapeexport2.cxx27
-rw-r--r--xmloff/source/draw/shapeexport4.cxx6
-rw-r--r--xmloff/source/draw/ximpshap.cxx60
-rw-r--r--xmloff/source/draw/ximpshap.hxx3
-rw-r--r--xmloff/source/forms/elementexport.cxx5
-rw-r--r--xmloff/source/forms/valueproperties.cxx2
-rw-r--r--xmloff/source/table/XMLTableExport.cxx10
-rw-r--r--xmloff/source/text/XMLSectionExport.cxx2
-rw-r--r--xmloff/source/text/txtimp.cxx26
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx2
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx3
447 files changed, 20853 insertions, 11114 deletions
diff --git a/avmedia/source/framework/makefile.mk b/avmedia/source/framework/makefile.mk
index 34669d3e9f8a..4185f3cbfc49 100644
--- a/avmedia/source/framework/makefile.mk
+++ b/avmedia/source/framework/makefile.mk
@@ -50,6 +50,7 @@ SLOFILES= \
$(SLO)$/soundhandler.obj
EXCEPTIONSFILES = \
+ $(SLO)$/mediatoolbox.obj \
$(SLO)$/soundhandler.obj
# --- Targets ----------------------------------
diff --git a/basic/inc/pch/precompiled_basic.hxx b/basic/inc/pch/precompiled_basic.hxx
index cab46edc0185..e8f9e004ca6a 100644
--- a/basic/inc/pch/precompiled_basic.hxx
+++ b/basic/inc/pch/precompiled_basic.hxx
@@ -187,7 +187,7 @@
#include "svtools/svmedit.hxx"
#include "svl/svstdarr.hxx"
#include "svtools/svtdata.hxx"
-#include "svl/svtools.hrc"
+#include "svtools/svtools.hrc"
#include "svtools/svtreebx.hxx"
#include "unotools/syslocale.hxx"
#include "svtools/taskbar.hxx"
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index e963de871c32..36fbda5c9097 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -121,8 +121,6 @@ using namespace com::sun::star::io;
#include <io.h>
#endif
-using namespace rtl;
-
#include <basic/sbobjmod.hxx>
static void FilterWhiteSpace( String& rStr )
@@ -210,15 +208,15 @@ String implGetCurDir( void )
}
// TODO: -> SbiGlobals
-static Reference< XSimpleFileAccess3 > getFileAccess( void )
+static com::sun::star::uno::Reference< XSimpleFileAccess3 > getFileAccess( void )
{
- static Reference< XSimpleFileAccess3 > xSFI;
+ static com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI;
if( !xSFI.is() )
{
- Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory();
+ com::sun::star::uno::Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory();
if( xSMgr.is() )
{
- xSFI = Reference< XSimpleFileAccess3 >( xSMgr->createInstance
+ xSFI = com::sun::star::uno::Reference< XSimpleFileAccess3 >( xSMgr->createInstance
( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY );
}
}
@@ -557,7 +555,7 @@ RTLFUNC(ChDrive) // JSM
// Implementation of StepRENAME with UCB
void implStepRenameUCB( const String& aSource, const String& aDest )
{
- Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+ com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
if( xSFI.is() )
{
try
@@ -605,7 +603,7 @@ RTLFUNC(FileCopy) // JSM
// <-- UCB
if( hasUno() )
{
- Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+ com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
if( xSFI.is() )
{
try
@@ -656,7 +654,7 @@ RTLFUNC(Kill) // JSM
// <-- UCB
if( hasUno() )
{
- Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+ com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
if( xSFI.is() )
{
String aFullPath = getFullPath( aFileSpec );
@@ -703,7 +701,7 @@ RTLFUNC(MkDir) // JSM
// <-- UCB
if( hasUno() )
{
- Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+ com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
if( xSFI.is() )
{
try
@@ -804,7 +802,7 @@ RTLFUNC(RmDir) // JSM
// <-- UCB
if( hasUno() )
{
- Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+ com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
if( xSFI.is() )
{
try
@@ -891,7 +889,7 @@ RTLFUNC(FileLen)
// <-- UCB
if( hasUno() )
{
- Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+ com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
if( xSFI.is() )
{
try
@@ -1639,7 +1637,7 @@ RTLFUNC(StrComp)
::utl::TransliterationWrapper* pTransliterationWrapper = GetSbData()->pTransliterationWrapper;
if( !pTransliterationWrapper )
{
- Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory();
+ com::sun::star::uno::Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory();
pTransliterationWrapper = GetSbData()->pTransliterationWrapper =
new ::utl::TransliterationWrapper( xSMgr,
::com::sun::star::i18n::TransliterationModules_IGNORE_CASE |
@@ -2634,7 +2632,7 @@ RTLFUNC(Dir)
// <-- UCB
if( hasUno() )
{
- Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+ com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
if( xSFI.is() )
{
if ( nParCount >= 2 )
@@ -2997,7 +2995,7 @@ RTLFUNC(GetAttr)
// <-- UCB
if( hasUno() )
{
- Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+ com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
if( xSFI.is() )
{
try
@@ -3067,7 +3065,7 @@ RTLFUNC(FileDateTime)
Date aDate;
if( hasUno() )
{
- Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+ com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
if( xSFI.is() )
{
try
@@ -4032,7 +4030,7 @@ RTLFUNC(StrConv)
String aNewStr( aOldStr );
if( nType != 0 )
{
- Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory();
+ com::sun::star::uno::Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory();
::utl::TransliterationWrapper aTransliterationWrapper( xSMgr,nType );
com::sun::star::uno::Sequence<sal_Int32> aOffsets;
aTransliterationWrapper.loadModuleIfNeeded( nLanguage );
@@ -4360,7 +4358,7 @@ RTLFUNC(SetAttr) // JSM
// <-- UCB
if( hasUno() )
{
- Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+ com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
if( xSFI.is() )
{
try
@@ -4474,7 +4472,7 @@ RTLFUNC(FileExists)
// <-- UCB
if( hasUno() )
{
- Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+ com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
if( xSFI.is() )
{
try
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 29e49b0ffde8..ef3e4c056cb6 100755
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -906,7 +906,7 @@ sal_Int32 SbiRuntime::translateErrorToVba( SbError nError, String& rMsg )
{
// TEST, has to be vb here always
#ifdef DBG_UTIL
- SbError nTmp = StarBASIC::GetSfxFromVBError( nError );
+ SbError nTmp = StarBASIC::GetSfxFromVBError( USHORT( nError ) );
DBG_ASSERT( nTmp, "No VB error!" );
#endif
diff --git a/basic/source/sbx/format.src b/basic/source/sbx/format.src
index 8ebe6e93c4bb..7e576134fad5 100644
--- a/basic/source/sbx/format.src
+++ b/basic/source/sbx/format.src
@@ -25,7 +25,7 @@
*
************************************************************************/
-#include "svl/svtools.hrc"
+#include "svtools/svtools.hrc"
String STR_BASICKEY_FORMAT_ON
{
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 6d5d24fcb951..3d45818e6401 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -47,7 +47,7 @@
#include "sbxres.hxx"
#include <basic/sbxbase.hxx>
#include <basic/sbxform.hxx>
-#include <svl/svtools.hrc>
+#include <svtools/svtools.hrc>
#include "basrid.hxx"
#include "runtime.hxx"
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 60f6a4a54e46..190db364cdfe 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -1229,7 +1229,19 @@ rtl::OUString Access::getHierarchicalName() throw (css::uno::RuntimeException) {
OSL_ASSERT(thisIs(IS_ANY));
osl::MutexGuard g(lock);
checkLocalizedPropertyAccess();
- return getRelativePathRepresentation();
+ // For backwards compatibility, return an absolute path representation where
+ // available:
+ rtl::OUStringBuffer path;
+ rtl::Reference< RootAccess > root(getRootAccess());
+ if (root.is()) {
+ path.append(root->getAbsolutePathRepresentation());
+ }
+ rtl::OUString rel(getRelativePathRepresentation());
+ if (path.getLength() != 0 && rel.getLength() != 0) {
+ path.append(sal_Unicode('/'));
+ }
+ path.append(rel);
+ return path.makeStringAndClear();
}
rtl::OUString Access::composeHierarchicalName(
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 7ef1bd3ee3e7..04e6317c959d 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -149,11 +149,12 @@ bool Components::allLocales(rtl::OUString const & locale) {
}
rtl::Reference< Node > Components::resolvePathRepresentation(
- rtl::OUString const & pathRepresentation, Path * path,
- int * finalizedLayer) const
+ rtl::OUString const & pathRepresentation,
+ rtl::OUString * canonicRepresentation, Path * path, int * finalizedLayer)
+ const
{
return data_.resolvePathRepresentation(
- pathRepresentation, path, finalizedLayer);
+ pathRepresentation, canonicRepresentation, path, finalizedLayer);
}
rtl::Reference< Node > Components::getTemplate(
diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx
index a78ed325969d..2e635680c1ce 100644
--- a/configmgr/source/components.hxx
+++ b/configmgr/source/components.hxx
@@ -72,8 +72,9 @@ public:
static bool allLocales(rtl::OUString const & locale);
rtl::Reference< Node > resolvePathRepresentation(
- rtl::OUString const & pathRepresentation, Path * path,
- int * finalizedLayer) const;
+ rtl::OUString const & pathRepresentation,
+ rtl::OUString * canonicRepresenation, Path * path, int * finalizedLayer)
+ const;
rtl::Reference< Node > getTemplate(
int layer, rtl::OUString const & fullName) const;
diff --git a/configmgr/source/data.cxx b/configmgr/source/data.cxx
index 5540a40fd5f4..e12f9596940b 100644
--- a/configmgr/source/data.cxx
+++ b/configmgr/source/data.cxx
@@ -205,7 +205,8 @@ rtl::Reference< Node > Data::findNode(
}
rtl::Reference< Node > Data::resolvePathRepresentation(
- rtl::OUString const & pathRepresentation, Path * path, int * finalizedLayer)
+ rtl::OUString const & pathRepresentation,
+ rtl::OUString * canonicRepresentation, Path * path, int * finalizedLayer)
const
{
if (pathRepresentation.getLength() == 0 || pathRepresentation[0] != '/') {
@@ -216,6 +217,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
}
rtl::OUString seg;
bool setElement;
+ rtl::OUString templateName;
sal_Int32 n = parseSegment(pathRepresentation, 1, &seg, &setElement, 0);
if (n == -1 || setElement)
{
@@ -225,6 +227,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
css::uno::Reference< css::uno::XInterface >());
}
NodeMap::const_iterator i(components.find(seg));
+ rtl::OUStringBuffer canonic;
if (path != 0) {
path->clear();
}
@@ -234,6 +237,10 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
if (!p.is()) {
return p;
}
+ if (canonicRepresentation != 0) {
+ canonic.append(sal_Unicode('/'));
+ canonic.append(createSegment(templateName, seg));
+ }
if (path != 0) {
path->push_back(seg);
}
@@ -248,13 +255,16 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
}
// for backwards compatibility, ignore a final slash
if (n == pathRepresentation.getLength()) {
+ if (canonicRepresentation != 0) {
+ *canonicRepresentation = canonic.makeStringAndClear();
+ }
if (finalizedLayer != 0) {
*finalizedLayer = finalized;
}
return p;
}
parent = p;
- rtl::OUString templateName;
+ templateName = rtl::OUString();
n = parseSegment(
pathRepresentation, n, &seg, &setElement, &templateName);
if (n == -1) {
diff --git a/configmgr/source/data.hxx b/configmgr/source/data.hxx
index 495ca1233878..52353d066b67 100644
--- a/configmgr/source/data.hxx
+++ b/configmgr/source/data.hxx
@@ -74,8 +74,9 @@ struct Data: private boost::noncopyable {
int layer, NodeMap const & map, rtl::OUString const & name);
rtl::Reference< Node > resolvePathRepresentation(
- rtl::OUString const & pathRepresentation, Path * path,
- int * finalizedLayer) const;
+ rtl::OUString const & pathRepresentation,
+ rtl::OUString * canonicRepresenation, Path * path, int * finalizedLayer)
+ const;
rtl::Reference< Node > getTemplate(
int layer, rtl::OUString const & fullName) const;
diff --git a/configmgr/source/rootaccess.cxx b/configmgr/source/rootaccess.cxx
index f8ccc6a31546..95a346d720c2 100644
--- a/configmgr/source/rootaccess.cxx
+++ b/configmgr/source/rootaccess.cxx
@@ -113,6 +113,11 @@ void RootAccess::release() throw () {
Access::release();
}
+rtl::OUString RootAccess::getAbsolutePathRepresentation() {
+ getNode(); // turn pathRepresentation_ into canonic form
+ return pathRepresentation_;
+}
+
rtl::OUString RootAccess::getLocale() const {
return locale_;
}
@@ -136,9 +141,10 @@ rtl::OUString RootAccess::getRelativePathRepresentation() {
rtl::Reference< Node > RootAccess::getNode() {
if (!node_.is()) {
+ rtl::OUString canonic;
int finalizedLayer;
node_ = getComponents().resolvePathRepresentation(
- pathRepresentation_, &path_, &finalizedLayer);
+ pathRepresentation_, &canonic, &path_, &finalizedLayer);
if (!node_.is()) {
throw css::uno::RuntimeException(
(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("cannot find ")) +
@@ -150,6 +156,7 @@ rtl::Reference< Node > RootAccess::getNode() {
// queryInterface on it would cause trouble; therefore,
// RuntimeException.Context is left null here
}
+ pathRepresentation_ = canonic;
OSL_ASSERT(!path_.empty());
name_ = path_.back();
finalized_ = finalizedLayer != Data::NO_LAYER;
@@ -285,7 +292,7 @@ void RootAccess::commitChanges()
Modifications globalMods;
commitChildChanges(
((getComponents().resolvePathRepresentation(
- pathRepresentation_, 0, &finalizedLayer)
+ pathRepresentation_, 0, 0, &finalizedLayer)
== node_) &&
finalizedLayer == Data::NO_LAYER),
&globalMods);
diff --git a/configmgr/source/rootaccess.hxx b/configmgr/source/rootaccess.hxx
index 45d4193d70de..77d945cdbbed 100644
--- a/configmgr/source/rootaccess.hxx
+++ b/configmgr/source/rootaccess.hxx
@@ -78,6 +78,8 @@ public:
virtual void SAL_CALL release() throw ();
+ rtl::OUString getAbsolutePathRepresentation();
+
rtl::OUString getLocale() const;
bool isUpdate() const;
diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx
index f9f439c98916..eda478b18b70 100644
--- a/configmgr/source/xcuparser.cxx
+++ b/configmgr/source/xcuparser.cxx
@@ -395,7 +395,8 @@ void XcuParser::handleItem(XmlReader & reader) {
rtl::OUString path(xmldata::convertFromUtf8(attrPath));
int finalizedLayer;
rtl::Reference< Node > node(
- data_.resolvePathRepresentation(path, &path_, &finalizedLayer));
+ data_.resolvePathRepresentation(
+ path, 0, &path_, &finalizedLayer));
if (!node.is()) {
OSL_TRACE(
"configmgr unknown item %s in %s",
diff --git a/connectivity/inc/connectivity/PColumn.hxx b/connectivity/inc/connectivity/PColumn.hxx
index 8f22de0be964..547cc8fb9970 100644
--- a/connectivity/inc/connectivity/PColumn.hxx
+++ b/connectivity/inc/connectivity/PColumn.hxx
@@ -33,6 +33,7 @@
#include <vos/ref.hxx>
#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
#include <comphelper/proparrhlp.hxx>
namespace connectivity
@@ -49,6 +50,7 @@ namespace connectivity
{
::rtl::OUString m_aRealName;
::rtl::OUString m_aTableName;
+ ::rtl::OUString m_sLabel;
sal_Bool m_bFunction;
sal_Bool m_bDbasePrecisionChanged;
sal_Bool m_bAggregateFunction;
@@ -64,6 +66,7 @@ namespace connectivity
OParseColumn(const ::rtl::OUString& _Name,
const ::rtl::OUString& _TypeName,
const ::rtl::OUString& _DefaultValue,
+ const ::rtl::OUString& _Description,
sal_Int32 _IsNullable,
sal_Int32 _Precision,
sal_Int32 _Scale,
@@ -75,15 +78,17 @@ namespace connectivity
virtual void construct();
void setRealName(const ::rtl::OUString& _rName) { m_aRealName = _rName; }
+ void setLabel(const ::rtl::OUString& i_sLabel) { m_sLabel = i_sLabel; }
void setTableName(const ::rtl::OUString& _rName) { m_aTableName = _rName; }
void setFunction(sal_Bool _bFunction) { m_bFunction = _bFunction; }
void setAggregateFunction(sal_Bool _bFunction) { m_bAggregateFunction = _bFunction; }
void setIsSearchable( sal_Bool _bIsSearchable ) { m_bIsSearchable = _bIsSearchable; }
void setDbasePrecisionChanged(sal_Bool _bDbasePrecisionChanged) { m_bDbasePrecisionChanged = _bDbasePrecisionChanged; }
- ::rtl::OUString getRealName() const { return m_aRealName; }
- ::rtl::OUString getTableName() const { return m_aTableName; }
- sal_Bool getFunction() const { return m_bFunction; }
+ ::rtl::OUString getRealName() const { return m_aRealName; }
+ ::rtl::OUString getLabel() const { return m_sLabel; }
+ ::rtl::OUString getTableName() const { return m_aTableName; }
+ sal_Bool getFunction() const { return m_bFunction; }
sal_Bool getDbasePrecisionChanged() const { return m_bDbasePrecisionChanged; }
public:
@@ -92,16 +97,20 @@ namespace connectivity
static ::vos::ORef< OSQLColumns >
createColumnsForResultSet(
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData >& _rxResMetaData,
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rxDBMetaData
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rxDBMetaData,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& i_xQueryColumns
);
- /** creates a single OParseColumn, as described by a result set meta data instance
+ DECLARE_STL_USTRINGACCESS_MAP(int,StringMap);
+ /** creates a single OParseColumn, as described by a result set meta data instance.
+ The column names are unique.
*/
static OParseColumn*
createColumnForResultSet(
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData >& _rxResMetaData,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rxDBMetaData,
- sal_Int32 _nColumnPos
+ sal_Int32 _nColumnPos,
+ StringMap& _rColumns
);
private:
@@ -125,17 +134,6 @@ namespace connectivity
virtual ~OOrderColumn();
public:
OOrderColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xColumn,sal_Bool _bCase,sal_Bool _bAscending);
- OOrderColumn(const ::rtl::OUString& _Name,
- const ::rtl::OUString& _TypeName,
- const ::rtl::OUString& _DefaultValue,
- sal_Int32 _IsNullable,
- sal_Int32 _Precision,
- sal_Int32 _Scale,
- sal_Int32 _Type,
- sal_Bool _IsAutoIncrement,
- sal_Bool _IsCurrency,
- sal_Bool _bCase
- ,sal_Bool _bAscending);
virtual void construct();
diff --git a/connectivity/inc/connectivity/SQLStatementHelper.hxx b/connectivity/inc/connectivity/SQLStatementHelper.hxx
new file mode 100644
index 000000000000..0d1bb97c7b7f
--- /dev/null
+++ b/connectivity/inc/connectivity/SQLStatementHelper.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dbtools.hxx,v $
+ * $Revision: 1.37 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _CONNECTIVITY_SQLSTATEMENTHELPER_HXX_
+#define _CONNECTIVITY_SQLSTATEMENTHELPER_HXX_
+
+#include "connectivity/dbtoolsdllapi.hxx"
+#include <com/sun/star/beans/XPropertySet.hpp>
+namespace rtl
+{
+ class OUStringBuffer;
+}
+//.........................................................................
+namespace dbtools
+{
+ class OOO_DLLPUBLIC_DBTOOLS ISQLStatementHelper
+ {
+ public:
+ virtual void addComment(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor,::rtl::OUStringBuffer& _rOut) = 0;
+ };
+
+//.........................................................................
+} // namespace dbtools
+//.........................................................................
+
+#endif // _CONNECTIVITY_SQLSTATEMENTHELPER_HXX_
+
diff --git a/connectivity/inc/connectivity/TTableHelper.hxx b/connectivity/inc/connectivity/TTableHelper.hxx
index 9f0a644e0b6d..f99a106bce37 100644
--- a/connectivity/inc/connectivity/TTableHelper.hxx
+++ b/connectivity/inc/connectivity/TTableHelper.hxx
@@ -45,6 +45,7 @@ namespace connectivity
{
::rtl::OUString sName;
::rtl::OUString aField6;
+ ::rtl::OUString sField12; // REMARKS
::rtl::OUString sField13;
sal_Int32 nField5
, nField7
@@ -60,10 +61,12 @@ namespace connectivity
, sal_Int32 _nField7
, sal_Int32 _nField9
, sal_Int32 _nField11
+ , const ::rtl::OUString& _sField12
, const ::rtl::OUString& _sField13
,OrdinalPosition _nPosition )
:sName( _rName )
,aField6(_aField6)
+ ,sField12(_sField12)
,sField13(_sField13)
,nField5(_nField5)
,nField7(_nField7)
diff --git a/connectivity/inc/connectivity/dbtools.hxx b/connectivity/inc/connectivity/dbtools.hxx
index 1503291ef9b7..9b93830aeefe 100644
--- a/connectivity/inc/connectivity/dbtools.hxx
+++ b/connectivity/inc/connectivity/dbtools.hxx
@@ -87,6 +87,7 @@ namespace rtl
//.........................................................................
namespace dbtools
{
+ class ISQLStatementHelper;
typedef ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XConnection > SharedConnection;
enum EComposeRule
@@ -225,6 +226,15 @@ namespace dbtools
const ::rtl::OUString& _rName
);
+ /** returns the primary key columns of the table
+ */
+ OOO_DLLPUBLIC_DBTOOLS ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> getPrimaryKeyColumns_throw(
+ const ::com::sun::star::uno::Any& i_aTable
+ );
+ OOO_DLLPUBLIC_DBTOOLS ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> getPrimaryKeyColumns_throw(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_xTable
+ );
+
/** get fields for a result set given by a "command descriptor"
<p>A command descriptor here means:
@@ -661,6 +671,7 @@ namespace dbtools
OOO_DLLPUBLIC_DBTOOLS
::rtl::OUString createStandardCreateStatement( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,
+ ISQLStatementHelper* _pHelper,
const ::rtl::OUString& _sCreatePattern = ::rtl::OUString());
/** creates the standard sql statement for the key part of a create table statement.
@@ -674,32 +685,39 @@ namespace dbtools
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection);
/** creates the standard sql statement for the column part of a create table statement.
+ @param _pHelper
+ Allow to add special SQL constructs.
@param descriptor
The descriptor of the column.
@param _xConnection
The connection.
- @param _bAddScale
- The scale will also be added when the value is 0.
+ @param _pHelper
+ Allow to add special SQL constructs.
*/
OOO_DLLPUBLIC_DBTOOLS
- ::rtl::OUString createStandardColumnPart( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor,
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,
- const ::rtl::OUString& _sCreatePattern = ::rtl::OUString());
+ ::rtl::OUString createStandardColumnPart( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection
+ ,ISQLStatementHelper* _pHelper = NULL
+ ,const ::rtl::OUString& _sCreatePattern = ::rtl::OUString());
/** creates a SQL CREATE TABLE statement
+
@param descriptor
The descriptor of the new table.
@param _xConnection
The connection.
- @param _bAddScale
- The scale will also be added when the value is 0.
+ @param _pHelper
+ Allow to add special SQL constructs.
+ @param _sCreatePattern
+
@return
The CREATE TABLE statement.
*/
OOO_DLLPUBLIC_DBTOOLS
- ::rtl::OUString createSqlCreateTableStatement( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor,
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,
- const ::rtl::OUString& _sCreatePattern = ::rtl::OUString());
+ ::rtl::OUString createSqlCreateTableStatement( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection
+ ,ISQLStatementHelper* _pHelper = NULL
+ ,const ::rtl::OUString& _sCreatePattern = ::rtl::OUString());
/** creates a SDBC column with the help of getColumns.
@param _xTable
diff --git a/connectivity/inc/connectivity/sdbcx/VColumn.hxx b/connectivity/inc/connectivity/sdbcx/VColumn.hxx
index 2c9fa31a2d7e..0a8c5498cf60 100644
--- a/connectivity/inc/connectivity/sdbcx/VColumn.hxx
+++ b/connectivity/inc/connectivity/sdbcx/VColumn.hxx
@@ -84,6 +84,7 @@ namespace connectivity
OColumn( const ::rtl::OUString& _Name,
const ::rtl::OUString& _TypeName,
const ::rtl::OUString& _DefaultValue,
+ const ::rtl::OUString& _Description,
sal_Int32 _IsNullable,
sal_Int32 _Precision,
sal_Int32 _Scale,
diff --git a/connectivity/inc/connectivity/sqliterator.hxx b/connectivity/inc/connectivity/sqliterator.hxx
index 3b7db6968671..5152b7221f85 100644
--- a/connectivity/inc/connectivity/sqliterator.hxx
+++ b/connectivity/inc/connectivity/sqliterator.hxx
@@ -40,6 +40,7 @@
#include <map>
#include <memory>
+#include <vector>
namespace connectivity
{
@@ -47,6 +48,8 @@ namespace connectivity
class OSQLParseNode;
class OSQLParser;
+ typedef ::std::pair<const OSQLParseNode*,const OSQLParseNode* > TNodePair;
+
enum OSQLStatementType {
SQL_STATEMENT_UNKNOWN,
SQL_STATEMENT_SELECT,
@@ -279,6 +282,10 @@ namespace connectivity
// tries to find the correct type of the function
sal_Int32 getFunctionReturnType(const OSQLParseNode* _pNode );
+
+ // returns a lis of all joined columns
+ ::std::vector< TNodePair >& getJoinConditions() const;
+
private:
/** traverses the list of table names, and filles _rTables
*/
@@ -351,6 +358,7 @@ namespace connectivity
{
m_aErrors = ::com::sun::star::sdbc::SQLException();
}
+ void impl_fillJoinConditions(const OSQLParseNode* i_pJoinCondition);
};
}
diff --git a/connectivity/inc/connectivity/sqlnode.hxx b/connectivity/inc/connectivity/sqlnode.hxx
index 5f1d7137e678..fa283cb5cf04 100644
--- a/connectivity/inc/connectivity/sqlnode.hxx
+++ b/connectivity/inc/connectivity/sqlnode.hxx
@@ -226,6 +226,11 @@ namespace connectivity
concatenation,
char_factor,
bit_value_fct,
+ comparison_predicate_part_2,
+ parenthesized_boolean_value_expression,
+ character_string_type,
+ other_like_predicate_part_2,
+ between_predicate_part_2,
rule_count, // letzter_wert
UNKNOWN_RULE // ID indicating that a node is no rule with a matching Rule-enum value (see getKnownRuleID)
};
diff --git a/connectivity/qa/connectivity/tools/CRMDatabase.java b/connectivity/qa/connectivity/tools/CRMDatabase.java
index c35faac75ff7..a1b457884948 100644
--- a/connectivity/qa/connectivity/tools/CRMDatabase.java
+++ b/connectivity/qa/connectivity/tools/CRMDatabase.java
@@ -285,7 +285,7 @@ public class CRMDatabase
m_database.getDataSource().createQuery( "parseable", "SELECT * FROM \"customers\"" );
m_database.getDataSource().createQuery( "parseable native", "SELECT * FROM INFORMATION_SCHEMA.SYSTEM_VIEWS", false );
m_database.getDataSource().createQuery( "unparseable",
- "SELECT CAST( \"ID\" AS VARCHAR(3) ) AS \"ID_VARCHAR\" FROM \"products\"", false );
+ "SELECT {fn DAYOFMONTH ('2001-01-01')} AS \"ID_VARCHAR\" FROM \"products\"", false );
validateUnparseable();
}
diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx
index a09260782fd6..9f5be37f208f 100644
--- a/connectivity/source/commontools/DateConversion.cxx
+++ b/connectivity/source/commontools/DateConversion.cxx
@@ -126,9 +126,27 @@ using namespace ::com::sun::star::beans;
case DataType::TIMESTAMP:
{
DateTime aDateTime;
+ bool bOk = false;
+ if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_DOUBLE)
+ {
+ double nValue = 0.0;
+ _rVal >>= nValue;
+ aDateTime = DBTypeConversion::toDateTime(nValue);
+ bOk = true;
+ }
+ else if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_STRING)
+ {
+ ::rtl::OUString sValue;
+ _rVal >>= sValue;
+ aDateTime = DBTypeConversion::toDateTime(sValue);
+ bOk = true;
+ }
+ else
+ bOk = _rVal >>= aDateTime;
+ OSL_VERIFY_RES( bOk, "DBTypeConversion::toSQLString: _rVal is not datetime!");
// check if this is really a timestamp or only a date
- if ( _rVal >>= aDateTime )
+ if ( bOk )
{
if (bQuote)
aRet.appendAscii("{TS '");
@@ -142,7 +160,24 @@ using namespace ::com::sun::star::beans;
case DataType::DATE:
{
Date aDate;
- OSL_VERIFY_RES( _rVal >>= aDate, "DBTypeConversion::toSQLString: _rVal is not date!");
+ bool bOk = false;
+ if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_DOUBLE)
+ {
+ double nValue = 0.0;
+ _rVal >>= nValue;
+ aDate = DBTypeConversion::toDate(nValue);
+ bOk = true;
+ }
+ else if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_STRING)
+ {
+ ::rtl::OUString sValue;
+ _rVal >>= sValue;
+ aDate = DBTypeConversion::toDate(sValue);
+ bOk = true;
+ }
+ else
+ bOk = _rVal >>= aDate;
+ OSL_VERIFY_RES( bOk, "DBTypeConversion::toSQLString: _rVal is not date!");
if (bQuote)
aRet.appendAscii("{D '");
aRet.append(DBTypeConversion::toDateString(aDate));
@@ -152,7 +187,24 @@ using namespace ::com::sun::star::beans;
case DataType::TIME:
{
Time aTime;
- OSL_VERIFY_RES( _rVal >>= aTime,"DBTypeConversion::toSQLString: _rVal is not time!");
+ bool bOk = false;
+ if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_DOUBLE)
+ {
+ double nValue = 0.0;
+ _rVal >>= nValue;
+ aTime = DBTypeConversion::toTime(nValue);
+ bOk = true;
+ }
+ else if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_STRING)
+ {
+ ::rtl::OUString sValue;
+ _rVal >>= sValue;
+ aTime = DBTypeConversion::toTime(sValue);
+ bOk = true;
+ }
+ else
+ bOk = _rVal >>= aTime;
+ OSL_VERIFY_RES( bOk,"DBTypeConversion::toSQLString: _rVal is not time!");
if (bQuote)
aRet.appendAscii("{T '");
aRet.append(DBTypeConversion::toTimeString(aTime));
diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx
index f99c637fa396..48c2736cd05a 100755..100644
--- a/connectivity/source/commontools/DriversConfig.cxx
+++ b/connectivity/source/commontools/DriversConfig.cxx
@@ -136,26 +136,26 @@ DriversConfig::DriversConfig(const uno::Reference< lang::XMultiServiceFactory >&
}
// -----------------------------------------------------------------------------
-DriversConfig::~DriversConfig()
-{
-}
-
+DriversConfig::~DriversConfig()
+{
+}
+
// -----------------------------------------------------------------------------
-DriversConfig::DriversConfig( const DriversConfig& _rhs )
-{
- *this = _rhs;
-}
-
+DriversConfig::DriversConfig( const DriversConfig& _rhs )
+{
+ *this = _rhs;
+}
+
// -----------------------------------------------------------------------------
-DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs )
-{
- if ( this != &_rhs )
- {
- m_aNode = _rhs.m_aNode;
- }
- return *this;
-}
-
+DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs )
+{
+ if ( this != &_rhs )
+ {
+ m_aNode = _rhs.m_aNode;
+ }
+ return *this;
+}
+
// -----------------------------------------------------------------------------
::rtl::OUString DriversConfig::getDriverFactoryName(const ::rtl::OUString& _sURL) const
{
diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx
index d6b26dffbe92..325fcfbd0f42 100644
--- a/connectivity/source/commontools/TColumnsHelper.cxx
+++ b/connectivity/source/commontools/TColumnsHelper.cxx
@@ -121,29 +121,7 @@ sdbcx::ObjectType OColumnsHelper::createObject(const ::rtl::OUString& _rName)
if ( pColDesc )
{
Reference<XPropertySet> xPr = m_pTable;
- Reference<XKeysSupplier> xKeysSup(xPr,UNO_QUERY);
- Reference<XNameAccess> xPrimaryKeyColumns;
- if ( xKeysSup.is() )
- {
- const Reference<XIndexAccess> xKeys = xKeysSup->getKeys();
- if ( xKeys.is() )
- {
- ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap();
- const sal_Int32 nKeyCount = xKeys->getCount();
- for(sal_Int32 nKeyIter = 0; nKeyIter < nKeyCount;++nKeyIter)
- {
- const Reference<XPropertySet> xKey(xKeys->getByIndex(nKeyIter),UNO_QUERY_THROW);
- sal_Int32 nType = 0;
- xKey->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_TYPE)) >>= nType;
- if ( nType == KeyType::PRIMARY )
- {
- const Reference<XColumnsSupplier> xColS(xKey,UNO_QUERY_THROW);
- xPrimaryKeyColumns = xColS->getColumns();
- break;
- }
- } // for(sal_Int32 nKeyIter = 0; nKeyIter < nKeyCount;++)
- }
- }
+ const Reference<XNameAccess> xPrimaryKeyColumns = getPrimaryKeyColumns_throw(xPr);
sal_Int32 nField11 = pColDesc->nField11;
if ( nField11 != ColumnValue::NO_NULLS && xPrimaryKeyColumns.is() && xPrimaryKeyColumns->hasByName(_rName) )
{
@@ -152,6 +130,7 @@ sdbcx::ObjectType OColumnsHelper::createObject(const ::rtl::OUString& _rName)
connectivity::sdbcx::OColumn* pRet = new connectivity::sdbcx::OColumn(_rName,
pColDesc->aField6,
pColDesc->sField13,
+ pColDesc->sField12,
nField11,
pColDesc->nField7,
pColDesc->nField9,
@@ -207,7 +186,7 @@ sdbcx::ObjectType OColumnsHelper::appendObject( const ::rtl::OUString& _rForName
aSql += ::dbtools::composeTableName( xMetaData, m_pTable, ::dbtools::eInTableDefinitions, false, false, true );
aSql += ::rtl::OUString::createFromAscii(" ADD ");
- aSql += ::dbtools::createStandardColumnPart(descriptor,m_pTable->getConnection(),m_pTable->getTypeCreatePattern());
+ aSql += ::dbtools::createStandardColumnPart(descriptor,m_pTable->getConnection(),NULL,m_pTable->getTypeCreatePattern());
Reference< XStatement > xStmt = m_pTable->getConnection()->createStatement( );
if ( xStmt.is() )
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index f44b08fa15b7..7d020e9fc4a6 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -210,9 +210,10 @@ namespace
sal_Int32 nField7 = xRow->getInt(7)
, nField9 = xRow->getInt(9)
, nField11= xRow->getInt(11);
- ::rtl::OUString sField13 = xRow->getString(13);
+ ::rtl::OUString sField12 = xRow->getString(12)
+ ,sField13 = xRow->getString(13);
nOrdinalPosition = xRow->getInt( 17 ); // ORDINAL_POSITION
- _out_rColumns.push_back( ColumnDesc( sName,nField5,aField6,nField7,nField9,nField11,sField13, nOrdinalPosition ) );
+ _out_rColumns.push_back( ColumnDesc( sName,nField5,aField6,nField7,nField9,nField11,sField12,sField13, nOrdinalPosition ) );
}
}
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 0b7cb5b5df58..05bcf997268f 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -60,8 +60,10 @@
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XRowSet.hpp>
#include <com/sun/star/sdbc/XRowUpdate.hpp>
+#include <com/sun/star/sdbcx/KeyType.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
#include <com/sun/star/task/XInteractionRequest.hpp>
@@ -528,6 +530,46 @@ Reference< XNameAccess> getTableFields(const Reference< XConnection>& _rxConn,co
Reference< XComponent > xDummy;
return getFieldsByCommandDescriptor( _rxConn, CommandType::TABLE, _rName, xDummy );
}
+//------------------------------------------------------------------------------
+Reference< XNameAccess> getPrimaryKeyColumns_throw(const Any& i_aTable)
+{
+ const Reference< XPropertySet > xTable(i_aTable,UNO_QUERY_THROW);
+ return getPrimaryKeyColumns_throw(xTable);
+}
+//------------------------------------------------------------------------------
+Reference< XNameAccess> getPrimaryKeyColumns_throw(const Reference< XPropertySet >& i_xTable)
+{
+ Reference<XNameAccess> xKeyColumns;
+ const Reference<XKeysSupplier> xKeySup(i_xTable,UNO_QUERY);
+ if ( xKeySup.is() )
+ {
+ const Reference<XIndexAccess> xKeys = xKeySup->getKeys();
+ if ( xKeys.is() )
+ {
+ ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap();
+ const ::rtl::OUString sPropName = rPropMap.getNameByIndex(PROPERTY_ID_TYPE);
+ Reference<XPropertySet> xProp;
+ const sal_Int32 nCount = xKeys->getCount();
+ for(sal_Int32 i = 0;i< nCount;++i)
+ {
+ xProp.set(xKeys->getByIndex(i),UNO_QUERY_THROW);
+ if ( xProp.is() )
+ {
+ sal_Int32 nKeyType = 0;
+ xProp->getPropertyValue(sPropName) >>= nKeyType;
+ if(KeyType::PRIMARY == nKeyType)
+ {
+ const Reference<XColumnsSupplier> xKeyColsSup(xProp,UNO_QUERY_THROW);
+ xKeyColumns = xKeyColsSup->getColumns();
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return xKeyColumns;
+}
//------------------------------------------------------------------------------
namespace
@@ -2051,7 +2093,7 @@ namespace connectivity
void release(oslInterlockedCount& _refCount,
::cppu::OBroadcastHelper& rBHelper,
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface,
+ Reference< XInterface >& _xInterface,
::com::sun::star::lang::XComponent* _pObject)
{
if (osl_decrementInterlockedCount( &_refCount ) == 0)
@@ -2061,7 +2103,7 @@ void release(oslInterlockedCount& _refCount,
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
{
// remember the parent
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xParent;
+ Reference< XInterface > xParent;
{
::osl::MutexGuard aGuard( rBHelper.rMutex );
xParent = _xInterface;
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 7cf12345ae67..c9a878fe1840 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -30,11 +30,10 @@
#include "connectivity/dbtools.hxx"
#include "connectivity/dbconversion.hxx"
#include "connectivity/dbcharset.hxx"
+#include "connectivity/SQLStatementHelper.hxx"
#include <unotools/confignode.hxx>
#include "resource/sharedresources.hxx"
-#ifndef CONNECTIVITY_RESOURCE_COMMON_HRC
#include "resource/common_res.hrc"
-#endif
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
@@ -71,7 +70,7 @@ namespace dbtools
using namespace connectivity;
using namespace comphelper;
-::rtl::OUString createStandardColumnPart(const Reference< XPropertySet >& xColProp,const Reference< XConnection>& _xConnection,const ::rtl::OUString& _sCreatePattern)
+::rtl::OUString createStandardColumnPart(const Reference< XPropertySet >& xColProp,const Reference< XConnection>& _xConnection,ISQLStatementHelper* _pHelper,const ::rtl::OUString& _sCreatePattern)
{
Reference<XDatabaseMetaData> xMetaData = _xConnection->getMetaData();
@@ -186,11 +185,14 @@ namespace dbtools
aSql.append(sAutoIncrementValue);
}
+ if ( _pHelper )
+ _pHelper->addComment(xColProp,aSql);
+
return aSql.makeStringAndClear();
}
// -----------------------------------------------------------------------------
-::rtl::OUString createStandardCreateStatement(const Reference< XPropertySet >& descriptor,const Reference< XConnection>& _xConnection,const ::rtl::OUString& _sCreatePattern)
+::rtl::OUString createStandardCreateStatement(const Reference< XPropertySet >& descriptor,const Reference< XConnection>& _xConnection,ISQLStatementHelper* _pHelper,const ::rtl::OUString& _sCreatePattern)
{
::rtl::OUStringBuffer aSql = ::rtl::OUString::createFromAscii("CREATE TABLE ");
::rtl::OUString sCatalog,sSchema,sTable,sComposedName;
@@ -223,7 +225,7 @@ namespace dbtools
{
if ( (xColumns->getByIndex(i) >>= xColProp) && xColProp.is() )
{
- aSql.append(createStandardColumnPart(xColProp,_xConnection,_sCreatePattern));
+ aSql.append(createStandardColumnPart(xColProp,_xConnection,_pHelper,_sCreatePattern));
aSql.appendAscii(",");
}
}
@@ -364,9 +366,10 @@ namespace
// -----------------------------------------------------------------------------
::rtl::OUString createSqlCreateTableStatement( const Reference< XPropertySet >& descriptor,
const Reference< XConnection>& _xConnection,
+ ISQLStatementHelper* _pHelper,
const ::rtl::OUString& _sCreatePattern)
{
- ::rtl::OUString aSql = ::dbtools::createStandardCreateStatement(descriptor,_xConnection,_sCreatePattern);
+ ::rtl::OUString aSql = ::dbtools::createStandardCreateStatement(descriptor,_xConnection,_pHelper,_sCreatePattern);
const ::rtl::OUString sKeyStmt = ::dbtools::createStandardKeyStatement(descriptor,_xConnection);
if ( sKeyStmt.getLength() )
aSql += sKeyStmt;
@@ -411,7 +414,8 @@ namespace
sal_Int32 nField7 = xRow->getInt(7)
, nField9 = xRow->getInt(9)
, nField11= xRow->getInt(11);
- ::rtl::OUString sField13 = xRow->getString(13);
+ ::rtl::OUString sField12 = xRow->getString(12),
+ sField13 = xRow->getString(13);
::comphelper::disposeComponent(xRow);
sal_Bool bAutoIncrement = _bIsAutoIncrement
@@ -471,6 +475,7 @@ namespace
connectivity::sdbcx::OColumn* pRet = new connectivity::sdbcx::OColumn(_rName,
aField6,
sField13,
+ sField12,
nField11,
nField7,
nField9,
@@ -526,28 +531,7 @@ Reference<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _xTable
_xTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema;
_xTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable;
- Reference<XKeysSupplier> xKeysSup(_xTable,UNO_QUERY);
- Reference<XNameAccess> xPrimaryKeyColumns;
- if ( xKeysSup.is() )
- {
- const Reference<XIndexAccess> xKeys = xKeysSup->getKeys();
- if ( xKeys.is() )
- {
- const sal_Int32 nKeyCount = xKeys->getCount();
- for(sal_Int32 nKeyIter = 0; nKeyIter < nKeyCount;++nKeyIter)
- {
- const Reference<XPropertySet> xKey(xKeys->getByIndex(nKeyIter),UNO_QUERY_THROW);
- sal_Int32 nType = 0;
- xKey->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_TYPE)) >>= nType;
- if ( nType == KeyType::PRIMARY )
- {
- const Reference<XColumnsSupplier> xColS(xKey,UNO_QUERY_THROW);
- xPrimaryKeyColumns = xColS->getColumns();
- break;
- }
- } // for(sal_Int32 nKeyIter = 0; nKeyIter < nKeyCount;++)
- }
- }
+ Reference<XNameAccess> xPrimaryKeyColumns = getPrimaryKeyColumns_throw(_xTable);
xProp = lcl_createSDBCXColumn(xPrimaryKeyColumns,_xConnection,aCatalog, aSchema, aTable, _rName,_rName,_bCase,_bQueryForInfo,_bIsAutoIncrement,_bIsCurrency,_nDataType);
if ( !xProp.is() )
@@ -555,7 +539,7 @@ Reference<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _xTable
xProp = lcl_createSDBCXColumn(xPrimaryKeyColumns,_xConnection,aCatalog, aSchema, aTable, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),_rName,_bCase,_bQueryForInfo,_bIsAutoIncrement,_bIsCurrency,_nDataType);
if ( !xProp.is() )
xProp = new connectivity::sdbcx::OColumn(_rName,
- ::rtl::OUString(),::rtl::OUString(),
+ ::rtl::OUString(),::rtl::OUString(),::rtl::OUString(),
ColumnValue::NULLABLE_UNKNOWN,
0,
0,
@@ -665,19 +649,9 @@ Reference< XTablesSupplier> getDataDefinitionByURLAndConnection(
Reference< XDataDefinitionSupplier > xSupp( xManager->getDriverByURL( _rsUrl ), UNO_QUERY );
if ( xSupp.is() )
+ {
xTablesSup = xSupp->getDataDefinitionByConnection( _xConnection );
-
- // if we don't get the catalog from the original driver we have to try them all.
- if ( !xTablesSup.is() )
- { // !TODO: Why?
- Reference< XEnumerationAccess> xEnumAccess( xManager, UNO_QUERY_THROW );
- Reference< XEnumeration > xEnum( xEnumAccess->createEnumeration(), UNO_QUERY_THROW );
- while ( xEnum.is() && xEnum->hasMoreElements() && !xTablesSup.is() )
- {
- xEnum->nextElement() >>= xSupp;
- if ( xSupp.is() )
- xTablesSup = xSupp->getDataDefinitionByConnection( _xConnection );
- }
+ OSL_ENSURE(xTablesSup.is(),"No table supplier!");
}
}
catch( const Exception& )
diff --git a/connectivity/source/commontools/propertyids.cxx b/connectivity/source/commontools/propertyids.cxx
index f1e31a2c7f0e..b6bae373a7db 100644
--- a/connectivity/source/commontools/propertyids.cxx
+++ b/connectivity/source/commontools/propertyids.cxx
@@ -93,6 +93,7 @@ namespace dbtools
const sal_Char* getPROPERTY_ID_FIELDTYPE() { return "FieldType"; }
const sal_Char* getPROPERTY_ID_VALUE() { return "Value"; }
const sal_Char* getPROPERTY_ID_ACTIVE_CONNECTION() { return "ActiveConnection"; }
+ const sal_Char* getPROPERTY_ID_LABEL() { return "Label"; }
//============================================================
//= error messages
@@ -180,6 +181,7 @@ namespace dbtools
case PROPERTY_ID_HAVINGCLAUSE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ID_HAVINGCLAUSE() ); break; }
case PROPERTY_ID_ISSIGNED: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ID_ISSIGNED() ); break; }
case PROPERTY_ID_ISSEARCHABLE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ID_ISSEARCHABLE() ); break; }
+ case PROPERTY_ID_LABEL: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ID_LABEL() ); break; }
case PROPERTY_ID_APPLYFILTER: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ID_APPLYFILTER() ); break; }
case PROPERTY_ID_FILTER: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ID_FILTER() ); break; }
case PROPERTY_ID_MASTERFIELDS: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ID_MASTERFIELDS() ); break; }
diff --git a/connectivity/source/drivers/adabas/BColumns.cxx b/connectivity/source/drivers/adabas/BColumns.cxx
index 8fc009917fb2..bb0363792c12 100644
--- a/connectivity/source/drivers/adabas/BColumns.cxx
+++ b/connectivity/source/drivers/adabas/BColumns.cxx
@@ -96,6 +96,7 @@ sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _rName)
xRet = new OColumn(_rName,
sTypeName,
xRow->getString(13),
+ xRow->getString(12),
xRow->getInt(11),
nPrec,
xRow->getInt(9),
diff --git a/connectivity/source/drivers/adabas/adabas.xcu b/connectivity/source/drivers/adabas/adabas.xcu
index 20c811bd2d5a..b92067235e15 100755..100644
--- a/connectivity/source/drivers/adabas/adabas.xcu
+++ b/connectivity/source/drivers/adabas/adabas.xcu
@@ -65,6 +65,11 @@
<value></value>
</prop>
</node>
+ <node oor:name="AddIndexAppendix" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
</node>
<node oor:name="Features">
<node oor:name="UseSQL92NamingConstraints" oor:op="replace">
diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx
index bb4b985e3bfc..aa287c185b26 100644
--- a/connectivity/source/drivers/ado/AColumn.cxx
+++ b/connectivity/source/drivers/ado/AColumn.cxx
@@ -65,7 +65,7 @@ void WpADOColumn::Create()
}
// -------------------------------------------------------------------------
OAdoColumn::OAdoColumn(sal_Bool _bCase,OConnection* _pConnection,_ADOColumn* _pColumn)
- : connectivity::sdbcx::OColumn(::rtl::OUString(),::rtl::OUString(),::rtl::OUString(),0,0,0,0,sal_False,sal_False,sal_False,_bCase)
+ : connectivity::sdbcx::OColumn(::rtl::OUString(),::rtl::OUString(),::rtl::OUString(),::rtl::OUString(),0,0,0,0,sal_False,sal_False,sal_False,_bCase)
,m_pConnection(_pConnection)
{
construct();
@@ -183,12 +183,13 @@ void OAdoColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& r
OTools::putValue( m_aColumn.get_Properties(), ::rtl::OUString::createFromAscii( "Autoincrement" ), getBOOL( rValue ) );
break;
+ case PROPERTY_ID_IM001:
case PROPERTY_ID_DESCRIPTION:
- pAdoPropertyName = "Default";
+ pAdoPropertyName = "Description";
break;
case PROPERTY_ID_DEFAULTVALUE:
- pAdoPropertyName = "Description";
+ pAdoPropertyName = "Default";
break;
}
diff --git a/connectivity/source/drivers/ado/ado.xcu b/connectivity/source/drivers/ado/ado.xcu
index 5859d5eecf3e..50c29cf7ba2e 100755..100644
--- a/connectivity/source/drivers/ado/ado.xcu
+++ b/connectivity/source/drivers/ado/ado.xcu
@@ -134,6 +134,11 @@
<value>UserPassword</value>
</prop>
</node>
+ <node oor:name="SupportsColumnDescription" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
</node>
</node>
<node oor:name="sdbc:ado:access:PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=*" oor:op="replace">
@@ -228,6 +233,11 @@
<value>mdb</value>
</prop>
</node>
+ <node oor:name="SupportsColumnDescription" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
</node>
</node>
<node oor:name="sdbc:ado:access:Provider=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=*" oor:op="replace">
diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx
index d95c6263b7ed..a4e5f35825f5 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -526,7 +526,7 @@ void OCalcTable::fillColumns()
aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase);
}
- sdbcx::OColumn* pColumn = new sdbcx::OColumn( aAlias, aTypeName, ::rtl::OUString(),
+ sdbcx::OColumn* pColumn = new sdbcx::OColumn( aAlias, aTypeName, ::rtl::OUString(),::rtl::OUString(),
ColumnValue::NULLABLE, nPrecision, nDecimals,
eType, sal_False, sal_False, bCurrency,
bStoresMixedCaseQuotedIdentifiers);
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 15da50651250..8544e4affda7 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -449,6 +449,7 @@ OSL_TRACE("column type: %c",aDBFColumn.db_typ);
Reference< XPropertySet> xCol = new sdbcx::OColumn(aColumnName,
aTypeName,
::rtl::OUString(),
+ ::rtl::OUString(),
ColumnValue::NULLABLE,
nPrecision,
aDBFColumn.db_dez,
diff --git a/connectivity/source/drivers/dbase/dbase.xcu b/connectivity/source/drivers/dbase/dbase.xcu
index 5e6e7596c3fe..f5de1d53ab0e 100755..100644
--- a/connectivity/source/drivers/dbase/dbase.xcu
+++ b/connectivity/source/drivers/dbase/dbase.xcu
@@ -50,6 +50,11 @@
<value>false</value>
</prop>
</node>
+ <node oor:name="AddIndexAppendix" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
</node>
<node oor:name="Features">
<node oor:name="UseSQL92NamingConstraints" oor:op="replace">
diff --git a/connectivity/source/drivers/evoab2/NColumns.cxx b/connectivity/source/drivers/evoab2/NColumns.cxx
index ddad36e52262..d1854e62181d 100644
--- a/connectivity/source/drivers/evoab2/NColumns.cxx
+++ b/connectivity/source/drivers/evoab2/NColumns.cxx
@@ -66,6 +66,7 @@ sdbcx::ObjectType OEvoabColumns::createObject(const ::rtl::OUString& _rName)
_rName,
xRow->getString(6),
xRow->getString(13),
+ xRow->getString(12),
xRow->getInt(11),
xRow->getInt(7),
xRow->getInt(9),
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index 77598f97380c..feca8f55aeff 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -381,15 +381,16 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
// SQL like
else if( SQL_ISRULE( parseTree, like_predicate ) )
{
- ENSURE_OR_THROW( parseTree->count() >= 4, "unexpected like_predicate structure" );
+ ENSURE_OR_THROW( parseTree->count() == 2, "unexpected like_predicate structure" );
+ const OSQLParseNode* pPart2 = parseTree->getChild(1);
if( ! SQL_ISRULE( parseTree->getChild( 0 ), column_ref) )
m_pConnection->throwGenericSQLException(STR_QUERY_INVALID_LIKE_COLUMN,*this);
::rtl::OUString aColumnName( impl_getColumnRefColumnName_throw( *parseTree->getChild( 0 ) ) );
- OSQLParseNode *pAtom = parseTree->getChild( parseTree->count() - 2 ); // Match String
- bool bNotLike = parseTree->count() == 5;
+ OSQLParseNode *pAtom = pPart2->getChild( pPart2->count() - 2 ); // Match String
+ bool bNotLike = pPart2->getChild(0)->isToken();
if( !( pAtom->getNodeType() == SQL_NODE_STRING ||
pAtom->getNodeType() == SQL_NODE_NAME ||
diff --git a/connectivity/source/drivers/file/FColumns.cxx b/connectivity/source/drivers/file/FColumns.cxx
index 7c70d4c4372d..3c3929a80c50 100644
--- a/connectivity/source/drivers/file/FColumns.cxx
+++ b/connectivity/source/drivers/file/FColumns.cxx
@@ -64,6 +64,7 @@ sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _rName)
sdbcx::OColumn* pRet = new sdbcx::OColumn(_rName,
xRow->getString(6),
xRow->getString(13),
+ xRow->getString(12),
xRow->getInt(11),
xRow->getInt(7),
xRow->getInt(9),
diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx
index 080b2a592aef..68e23360331b 100644
--- a/connectivity/source/drivers/file/FPreparedStatement.cxx
+++ b/connectivity/source/drivers/file/FPreparedStatement.cxx
@@ -511,6 +511,7 @@ UINT32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Refere
Reference<XPropertySet> xParaColumn = new connectivity::parse::OParseColumn(sParameterName
,::rtl::OUString()
,::rtl::OUString()
+ ,::rtl::OUString()
,nNullable
,nPrecision
,nScale
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index 9cf9874dbf10..eeaec1ff40f1 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -288,17 +288,14 @@ OOperand* OPredicateCompiler::execute_COMPARE(OSQLParseNode* pPredicateNode) th
//------------------------------------------------------------------
OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException)
{
- DBG_ASSERT(pPredicateNode->count() >= 4,"OFILECursor: Fehler im Parse Tree");
+ DBG_ASSERT(pPredicateNode->count() == 2,"OFILECursor: Fehler im Parse Tree");
+ const OSQLParseNode* pPart2 = pPredicateNode->getChild(1);
- sal_Int32 ePredicateType;
sal_Unicode cEscape = L'\0';
- if (pPredicateNode->count() == 5)
- ePredicateType = SQLFilterOperator::NOT_LIKE;
- else
- ePredicateType = SQLFilterOperator::LIKE;
+ const bool bNotLike = pPart2->getChild(0)->isToken();
- OSQLParseNode* pAtom = pPredicateNode->getChild(pPredicateNode->count()-2);
- OSQLParseNode* pOptEscape = pPredicateNode->getChild(pPredicateNode->count()-1);
+ OSQLParseNode* pAtom = pPart2->getChild(pPart2->count()-2);
+ OSQLParseNode* pOptEscape = pPart2->getChild(pPart2->count()-1);
if (!(pAtom->getNodeType() == SQL_NODE_STRING || SQL_ISRULE(pAtom,parameter)))
{
@@ -322,9 +319,9 @@ OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw(
execute(pPredicateNode->getChild(0));
execute(pAtom);
- OBoolOperator* pOperator = (ePredicateType == SQLFilterOperator::LIKE)
- ? new OOp_LIKE(cEscape)
- : new OOp_NOTLIKE(cEscape);
+ OBoolOperator* pOperator = bNotLike
+ ? new OOp_NOTLIKE(cEscape)
+ : new OOp_LIKE(cEscape);
m_aCodeList.push_back(pOperator);
return NULL;
@@ -332,11 +329,12 @@ OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw(
//------------------------------------------------------------------
OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException)
{
- DBG_ASSERT(pPredicateNode->count() == 6,"OFILECursor: Fehler im Parse Tree");
+ DBG_ASSERT(pPredicateNode->count() == 2,"OFILECursor: Fehler im Parse Tree");
OSQLParseNode* pColumn = pPredicateNode->getChild(0);
- OSQLParseNode* p1stValue = pPredicateNode->getChild(3);
- OSQLParseNode* p2ndtValue = pPredicateNode->getChild(5);
+ const OSQLParseNode* pPart2 = pPredicateNode->getChild(1);
+ OSQLParseNode* p1stValue = pPart2->getChild(2);
+ OSQLParseNode* p2ndtValue = pPart2->getChild(4);
if (
!(p1stValue->getNodeType() == SQL_NODE_STRING || SQL_ISRULE(p1stValue,parameter))
@@ -346,7 +344,7 @@ OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) thr
m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_INVALID_BETWEEN,NULL);
}
- sal_Bool bNot = SQL_ISTOKEN(pPredicateNode->getChild(1),NOT);
+ sal_Bool bNot = SQL_ISTOKEN(pPart2->getChild(0),NOT);
OOperand* pColumnOp = execute(pColumn);
OOperand* pOb1 = execute(p1stValue);
@@ -411,11 +409,12 @@ OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) thr
//------------------------------------------------------------------
OOperand* OPredicateCompiler::execute_ISNULL(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException)
{
- DBG_ASSERT(pPredicateNode->count() >= 3,"OFILECursor: Fehler im Parse Tree");
- DBG_ASSERT(SQL_ISTOKEN(pPredicateNode->getChild(1),IS),"OFILECursor: Fehler im Parse Tree");
+ DBG_ASSERT(pPredicateNode->count() == 2,"OFILECursor: Fehler im Parse Tree");
+ const OSQLParseNode* pPart2 = pPredicateNode->getChild(1);
+ DBG_ASSERT(SQL_ISTOKEN(pPart2->getChild(0),IS),"OFILECursor: Fehler im Parse Tree");
sal_Int32 ePredicateType;
- if (SQL_ISTOKEN(pPredicateNode->getChild(2),NOT))
+ if (SQL_ISTOKEN(pPart2->getChild(1),NOT))
ePredicateType = SQLFilterOperator::NOT_SQLNULL;
else
ePredicateType = SQLFilterOperator::SQLNULL;
@@ -635,7 +634,6 @@ OOperand* OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode)
switch ( nTokenId )
{
case SQL_TOKEN_CHAR_LENGTH:
- case SQL_TOKEN_CHARACTER_LENGTH:
case SQL_TOKEN_LENGTH:
case SQL_TOKEN_OCTET_LENGTH:
case SQL_TOKEN_ASCII:
@@ -677,7 +675,6 @@ OOperand* OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode)
switch( nTokenId )
{
case SQL_TOKEN_CHAR_LENGTH:
- case SQL_TOKEN_CHARACTER_LENGTH:
case SQL_TOKEN_LENGTH:
case SQL_TOKEN_OCTET_LENGTH:
pOperator = new OOp_CharLength();
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 2d46c3be5bf3..eff2464ce533 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -304,7 +304,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase);
}
- sdbcx::OColumn* pColumn = new sdbcx::OColumn(aAlias,aTypeName,::rtl::OUString(),
+ sdbcx::OColumn* pColumn = new sdbcx::OColumn(aAlias,aTypeName,::rtl::OUString(),::rtl::OUString(),
ColumnValue::NULLABLE,
nPrecision,
nScale,
diff --git a/connectivity/source/drivers/hsqldb/hsqldb.xcu b/connectivity/source/drivers/hsqldb/hsqldb.xcu
index e5ab3cc4ba14..f97b5e357179 100755..100644
--- a/connectivity/source/drivers/hsqldb/hsqldb.xcu
+++ b/connectivity/source/drivers/hsqldb/hsqldb.xcu
@@ -50,6 +50,11 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="AddIndexAppendix" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
</node>
<node oor:name="MetaData">
<node oor:name="SupportsTableCreation" oor:op="replace">
diff --git a/connectivity/source/drivers/jdbc/jdbc.xcu b/connectivity/source/drivers/jdbc/jdbc.xcu
index 59fb95460aa2..f4f599a701d9 100755..100644
--- a/connectivity/source/drivers/jdbc/jdbc.xcu
+++ b/connectivity/source/drivers/jdbc/jdbc.xcu
@@ -189,6 +189,11 @@
<value>oracle.jdbc.driver.OracleDriver</value>
</prop>
</node>
+ <node oor:name="AddIndexAppendix" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
</node>
<node oor:name="Features">
<node oor:name="IgnoreCurrency" oor:op="replace">
diff --git a/connectivity/source/drivers/kab/KColumns.cxx b/connectivity/source/drivers/kab/KColumns.cxx
index d75e782aed7b..4adcbe304c82 100644
--- a/connectivity/source/drivers/kab/KColumns.cxx
+++ b/connectivity/source/drivers/kab/KColumns.cxx
@@ -66,6 +66,7 @@ sdbcx::ObjectType KabColumns::createObject(const ::rtl::OUString& _rName)
_rName,
xRow->getString(6),
xRow->getString(13),
+ xRow->getString(12),
xRow->getInt(11),
xRow->getInt(7),
xRow->getInt(9),
diff --git a/connectivity/source/drivers/kab/KStatement.cxx b/connectivity/source/drivers/kab/KStatement.cxx
index 4164ffe0ee52..f0069fc6875e 100644
--- a/connectivity/source/drivers/kab/KStatement.cxx
+++ b/connectivity/source/drivers/kab/KStatement.cxx
@@ -185,12 +185,13 @@ KabCondition *KabCommonStatement::analyseWhereClause(const OSQLParseNode *pParse
}
}
}
- else if (pParseNode->count() == 4)
+ else if (SQL_ISRULE(pParseNode, test_for_null) || SQL_ISRULE(pParseNode, like_predicate))
{
- const OSQLParseNode *pLeft = pParseNode->getChild(0),
- *pMiddleLeft = pParseNode->getChild(1),
- *pMiddleRight = pParseNode->getChild(2),
- *pRight = pParseNode->getChild(3);
+ const OSQLParseNode *pLeft = pParseNode->getChild(0);
+ const OSQLParseNode* pPart2 = pParseNode->getChild(1);
+ const OSQLParseNode *pMiddleLeft = pPart2->getChild(0),
+ *pMiddleRight = pPart2->getChild(1),
+ *pRight = pPart2->getChild(2);
if (SQL_ISRULE(pParseNode, test_for_null))
{
diff --git a/connectivity/source/drivers/macab/MacabColumns.cxx b/connectivity/source/drivers/macab/MacabColumns.cxx
index 9eccf1a11b73..c1ba3f1fe6d0 100755
--- a/connectivity/source/drivers/macab/MacabColumns.cxx
+++ b/connectivity/source/drivers/macab/MacabColumns.cxx
@@ -66,6 +66,7 @@ sdbcx::ObjectType MacabColumns::createObject(const ::rtl::OUString& _rName)
_rName,
xRow->getString(6),
xRow->getString(13),
+ xRow->getString(12),
xRow->getInt(11),
xRow->getInt(7),
xRow->getInt(9),
diff --git a/connectivity/source/drivers/macab/MacabStatement.cxx b/connectivity/source/drivers/macab/MacabStatement.cxx
index 8ee24921667a..9960ea7a4d97 100755
--- a/connectivity/source/drivers/macab/MacabStatement.cxx
+++ b/connectivity/source/drivers/macab/MacabStatement.cxx
@@ -188,12 +188,13 @@ MacabCondition *MacabCommonStatement::analyseWhereClause(const OSQLParseNode *pP
}
}
}
- else if (pParseNode->count() == 4)
+ else if (SQL_ISRULE(pParseNode, test_for_null) || SQL_ISRULE(pParseNode, like_predicate))
{
- const OSQLParseNode *pLeft = pParseNode->getChild(0),
- *pMiddleLeft = pParseNode->getChild(1),
- *pMiddleRight = pParseNode->getChild(2),
- *pRight = pParseNode->getChild(3);
+ const OSQLParseNode *pLeft = pParseNode->getChild(0);
+ const OSQLParseNode* pPart2 = pParseNode->getChild(1);
+ const OSQLParseNode *pMiddleLeft = pPart2->getChild(0),
+ *pMiddleRight = pPart2->getChild(1),
+ *pRight = pPart2->getChild(2);
if (SQL_ISRULE(pParseNode, test_for_null))
{
diff --git a/connectivity/source/drivers/mozab/MColumns.cxx b/connectivity/source/drivers/mozab/MColumns.cxx
index 17b418899f45..42a33bbc2a98 100644
--- a/connectivity/source/drivers/mozab/MColumns.cxx
+++ b/connectivity/source/drivers/mozab/MColumns.cxx
@@ -74,6 +74,7 @@ sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _rName)
OColumn* pRet = new OColumn(_rName,
sTypeName,
xRow->getString(13),
+ xRow->getString(12),
xRow->getInt(11),
nPrec,
xRow->getInt(9),
diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.cxx b/connectivity/source/drivers/mozab/MPreparedStatement.cxx
index 38caad53b551..5aad943b151a 100644
--- a/connectivity/source/drivers/mozab/MPreparedStatement.cxx
+++ b/connectivity/source/drivers/mozab/MPreparedStatement.cxx
@@ -450,6 +450,7 @@ sal_uInt32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Re
Reference<XPropertySet> xParaColumn = new connectivity::sdbcx::OColumn(sParameterName
,::rtl::OUString()
,::rtl::OUString()
+ ,::rtl::OUString()
,nNullable
,nPrecision
,nScale
diff --git a/connectivity/source/drivers/mozab/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx
index 9602a35a8b29..c7c85770419e 100644
--- a/connectivity/source/drivers/mozab/MResultSet.cxx
+++ b/connectivity/source/drivers/mozab/MResultSet.cxx
@@ -882,7 +882,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
}
else if (SQL_ISRULE(parseTree,like_predicate))
{
- OSL_ENSURE(parseTree->count() >= 4, "Error parsing LIKE predicate");
+ OSL_ENSURE(parseTree->count() == 2, "Error parsing LIKE predicate");
OSL_TRACE("analyseSQL : Got LIKE rule\n");
@@ -895,9 +895,11 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
OSQLParseNode *pColumn;
OSQLParseNode *pAtom;
OSQLParseNode *pOptEscape;
+ const OSQLParseNode* pPart2 = parseTree->getChild(1);
pColumn = parseTree->getChild(0); // Match Item
- pAtom = parseTree->getChild(parseTree->count()-2); // Match String
- pOptEscape = parseTree->getChild(parseTree->count()-1); // Opt Escape Rule
+ pAtom = pPart2->getChild(parseTree->count()-2); // Match String
+ pOptEscape = pPart2->getChild(parseTree->count()-1); // Opt Escape Rule
+ const bool bNot = SQL_ISTOKEN(pPart2->getChild(0), NOT);
if (!(pAtom->getNodeType() == SQL_NODE_STRING ||
pAtom->getNodeType() == SQL_NODE_NAME ||
@@ -945,7 +947,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
matchString.indexOf ( MATCHCHAR ) == -1 )
{
// Simple string , eg. "to match"
- if ( parseTree->count() == 5 )
+ if ( bNot )
op = MQueryOp::DoesNotContain;
else
op = MQueryOp::Contains;
@@ -961,12 +963,12 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
matchString = matchString.replaceAt( 0, 1, rtl::OUString() );
matchString = matchString.replaceAt( matchString.getLength() -1 , 1, rtl::OUString() );
- if ( parseTree->count() == 5 )
+ if (bNot)
op = MQueryOp::DoesNotContain;
else
op = MQueryOp::Contains;
}
- else if ( parseTree->count() == 5 )
+ else if ( bNot )
{
// We currently can't handle a 'NOT LIKE' when there are '%' or
// '_' dispersed throughout
@@ -1020,15 +1022,16 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
}
else if (SQL_ISRULE(parseTree,test_for_null))
{
- OSL_ENSURE(parseTree->count() >= 3,"Error in ParseTree");
- OSL_ENSURE(SQL_ISTOKEN(parseTree->getChild(1),IS),"Error in ParseTree");
+ OSL_ENSURE(parseTree->count() == 2,"Error in ParseTree");
+ const OSQLParseNode* pPart2 = parseTree->getChild(1);
+ OSL_ENSURE(SQL_ISTOKEN(pPart2->getChild(0),IS),"Error in ParseTree");
if (!SQL_ISRULE(parseTree->getChild(0),column_ref))
{
m_pStatement->getOwnConnection()->throwSQLException( STR_QUERY_INVALID_IS_NULL_COLUMN, *this );
}
- if (SQL_ISTOKEN(parseTree->getChild(2),NOT))
+ if (SQL_ISTOKEN(pPart2->getChild(1),NOT))
{
op = MQueryOp::Exists;
}
diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx
index 72383be76c58..06be64f83313 100644
--- a/connectivity/source/drivers/mysql/YTable.cxx
+++ b/connectivity/source/drivers/mysql/YTable.cxx
@@ -220,12 +220,16 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, co
xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bOldAutoIncrement;
descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bAutoIncrement;
bool bColumnNameChanged = false;
+ ::rtl::OUString sOldDesc,sNewDesc;
+ xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DESCRIPTION)) >>= sOldDesc;
+ descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DESCRIPTION)) >>= sNewDesc;
if ( nOldType != nNewType
|| nOldPrec != nNewPrec
|| nOldScale != nNewScale
|| nNewNullable != nOldNullable
- || bOldAutoIncrement != bAutoIncrement )
+ || bOldAutoIncrement != bAutoIncrement
+ || sOldDesc != sNewDesc )
{
// special handling because they change dthe type names to distinguish
// if a column should be an auto_incmrement one
@@ -281,7 +285,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, co
const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( );
sSql += ::dbtools::quoteName(sQuote,colName);
sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" "));
- sSql += OTables::adjustSQL(::dbtools::createStandardColumnPart(descriptor,getConnection(),getTypeCreatePattern()));
+ sSql += OTables::adjustSQL(::dbtools::createStandardColumnPart(descriptor,getConnection(),static_cast<OTables*>(m_pTables),getTypeCreatePattern()));
executeStatement(sSql);
}
m_pColumns->refresh();
@@ -310,7 +314,7 @@ void OMySQLTable::alterColumnType(sal_Int32 nNewType,const ::rtl::OUString& _rCo
::comphelper::copyProperties(_xDescriptor,xProp);
xProp->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE),makeAny(nNewType));
- sSql += OTables::adjustSQL(::dbtools::createStandardColumnPart(xProp,getConnection(),getTypeCreatePattern()));
+ sSql += OTables::adjustSQL(::dbtools::createStandardColumnPart(xProp,getConnection(),static_cast<OTables*>(m_pTables),getTypeCreatePattern()));
executeStatement(sSql);
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx
index b337ddc92390..80bb2baf58c0 100644
--- a/connectivity/source/drivers/mysql/YTables.cxx
+++ b/connectivity/source/drivers/mysql/YTables.cxx
@@ -204,7 +204,7 @@ void OTables::createTable( const Reference< XPropertySet >& descriptor )
{
const Reference< XConnection > xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection();
static const ::rtl::OUString s_sCreatePattern(RTL_CONSTASCII_USTRINGPARAM("(M,D)"));
- const ::rtl::OUString aSql = adjustSQL(::dbtools::createSqlCreateTableStatement(descriptor,xConnection,s_sCreatePattern));
+ const ::rtl::OUString aSql = adjustSQL(::dbtools::createSqlCreateTableStatement(descriptor,xConnection,this,s_sCreatePattern));
Reference< XStatement > xStmt = xConnection->createStatement( );
if ( xStmt.is() )
{
@@ -230,4 +230,14 @@ void OTables::appendNew(const ::rtl::OUString& _rsNewTable)
return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::eInDataManipulation, false, false, false );
}
// -----------------------------------------------------------------------------
-
+void OTables::addComment(const Reference< XPropertySet >& descriptor,::rtl::OUStringBuffer& _rOut)
+{
+ ::rtl::OUString sDesc;
+ descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION)) >>= sDesc;
+ if ( sDesc.getLength() )
+ {
+ _rOut.appendAscii(" COMMENT '");
+ _rOut.append(sDesc);
+ _rOut.appendAscii("'");
+ }
+}
diff --git a/connectivity/source/drivers/mysql/mysql.xcu b/connectivity/source/drivers/mysql/mysql.xcu
index 2fc59be5bdc3..afc5c0d07f5d 100755..100644
--- a/connectivity/source/drivers/mysql/mysql.xcu
+++ b/connectivity/source/drivers/mysql/mysql.xcu
@@ -45,6 +45,11 @@
<value>com.mysql.jdbc.Driver</value>
</prop>
</node>
+ <node oor:name="AddIndexAppendix" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
</node>
<node oor:name="Features">
<node oor:name="UseKeywordAsBeforeAlias" oor:op="replace">
@@ -94,6 +99,11 @@
<value>UserPassword</value>
</prop>
</node>
+ <node oor:name="SupportsColumnDescription" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
</node>
</node>
<node oor:name="sdbc:mysql:odbc:*" oor:op="replace">
@@ -109,6 +119,11 @@
<value></value>
</prop>
</node>
+ <node oor:name="AddIndexAppendix" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
</node>
<node oor:name="Features">
<node oor:name="UseKeywordAsBeforeAlias" oor:op="replace">
@@ -183,6 +198,11 @@
<value></value>
</prop>
</node>
+ <node oor:name="AddIndexAppendix" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
</node>
<node oor:name="Features">
<node oor:name="UseKeywordAsBeforeAlias" oor:op="replace">
@@ -227,6 +247,11 @@
<value>UserPassword</value>
</prop>
</node>
+ <node oor:name="SupportsColumnDescription" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
</node>
</node>
</node>
diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
index 80aacacef576..751ab7cf2988 100644
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
@@ -97,7 +97,7 @@ ODatabaseMetaDataResultSet::~ODatabaseMetaDataResultSet()
osl_incrementInterlockedCount( &m_refCount );
dispose();
}
- delete m_pRowStatusArray;
+ delete [] m_pRowStatusArray;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::disposing(void)
diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx
index da29bcf08c17..7055bd273370 100644
--- a/connectivity/source/drivers/odbcbase/OResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx
@@ -162,7 +162,7 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) :
// -------------------------------------------------------------------------
OResultSet::~OResultSet()
{
- delete m_pRowStatusArray;
+ delete [] m_pRowStatusArray;
delete m_pSkipDeletedSet;
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/odbcbase/OTools.cxx b/connectivity/source/drivers/odbcbase/OTools.cxx
index b892e6336b19..43de55e3505c 100644
--- a/connectivity/source/drivers/odbcbase/OTools.cxx
+++ b/connectivity/source/drivers/odbcbase/OTools.cxx
@@ -391,6 +391,7 @@ void OTools::bindValue( OConnection* _pConnection,
case SQL_TIMESTAMP:
*pLen = sizeof(TIMESTAMP_STRUCT);
*((TIMESTAMP_STRUCT*)_pData) = *(TIMESTAMP_STRUCT*)_pValue;
+ break;
}
}
catch ( ... )
diff --git a/connectivity/source/inc/mysql/YTables.hxx b/connectivity/source/inc/mysql/YTables.hxx
index 421012e3678e..ec19ac83140b 100644
--- a/connectivity/source/inc/mysql/YTables.hxx
+++ b/connectivity/source/inc/mysql/YTables.hxx
@@ -28,12 +28,14 @@
#define CONNECTIVITY_MYSQL_TABLES_HXX
#include "connectivity/sdbcx/VCollection.hxx"
+#include "connectivity/SQLStatementHelper.hxx"
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
namespace connectivity
{
namespace mysql
{
- class OTables : public sdbcx::OCollection
+ class OTables : public sdbcx::OCollection,
+ public ::dbtools::ISQLStatementHelper
{
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData;
@@ -76,6 +78,9 @@ namespace connectivity
@param _sSql in/out
*/
static ::rtl::OUString adjustSQL(const ::rtl::OUString& _sSql);
+
+ // ISQLStatementHelper
+ virtual void addComment(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor,::rtl::OUStringBuffer& _rOut);
};
}
}
diff --git a/connectivity/source/inc/propertyids.hxx b/connectivity/source/inc/propertyids.hxx
index 1f7252158918..b28278b0477d 100644
--- a/connectivity/source/inc/propertyids.hxx
+++ b/connectivity/source/inc/propertyids.hxx
@@ -133,7 +133,7 @@ pProperties[nPos++] = ::com::sun::star::beans::Property(::connectivity::OMetaCon
#define PROPERTY_ID_INVALID_INDEX 41
#define PROPERTY_ID_HY010 43
- // FREE
+#define PROPERTY_ID_LABEL 44
#define PROPERTY_ID_DELIMITER 45
#define PROPERTY_ID_FORMATKEY 46
#define PROPERTY_ID_LOCALE 47
diff --git a/connectivity/source/parse/PColumn.cxx b/connectivity/source/parse/PColumn.cxx
index 21e78ec61fea..43e38f5a1674 100644
--- a/connectivity/source/parse/PColumn.cxx
+++ b/connectivity/source/parse/PColumn.cxx
@@ -42,12 +42,14 @@ using namespace connectivity::parse;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
// -------------------------------------------------------------------------
OParseColumn::OParseColumn(const Reference<XPropertySet>& _xColumn,sal_Bool _bCase)
: connectivity::sdbcx::OColumn( getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)))
, getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME)))
, getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE)))
+ , getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION)))
, getINT32(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE)))
, getINT32(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)))
, getINT32(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)))
@@ -69,6 +71,7 @@ OParseColumn::OParseColumn(const Reference<XPropertySet>& _xColumn,sal_Bool
OParseColumn::OParseColumn( const ::rtl::OUString& _Name,
const ::rtl::OUString& _TypeName,
const ::rtl::OUString& _DefaultValue,
+ const ::rtl::OUString& _Description,
sal_Int32 _IsNullable,
sal_Int32 _Precision,
sal_Int32 _Scale,
@@ -79,6 +82,7 @@ OParseColumn::OParseColumn( const ::rtl::OUString& _Name,
) : connectivity::sdbcx::OColumn(_Name,
_TypeName,
_DefaultValue,
+ _Description,
_IsNullable,
_Precision,
_Scale,
@@ -97,25 +101,52 @@ OParseColumn::OParseColumn( const ::rtl::OUString& _Name,
// -------------------------------------------------------------------------
::vos::ORef< OSQLColumns > OParseColumn::createColumnsForResultSet( const Reference< XResultSetMetaData >& _rxResMetaData,
- const Reference< XDatabaseMetaData >& _rxDBMetaData )
+ const Reference< XDatabaseMetaData >& _rxDBMetaData,const Reference< XNameAccess>& i_xQueryColumns )
{
sal_Int32 nColumnCount = _rxResMetaData->getColumnCount();
::vos::ORef< OSQLColumns > aReturn( new OSQLColumns ); aReturn->get().reserve( nColumnCount );
+ StringMap aColumnMap;
for ( sal_Int32 i = 1; i <= nColumnCount; ++i )
- aReturn->get().push_back( createColumnForResultSet( _rxResMetaData, _rxDBMetaData, i ) );
+ {
+ OParseColumn* pColumn = createColumnForResultSet( _rxResMetaData, _rxDBMetaData, i,aColumnMap );
+ aReturn->get().push_back( pColumn );
+ if ( i_xQueryColumns.is() && i_xQueryColumns->hasByName(pColumn->getRealName()) )
+ {
+ Reference<XPropertySet> xColumn(i_xQueryColumns->getByName(pColumn->getRealName()),UNO_QUERY_THROW);
+ ::rtl::OUString sLabel;
+ xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_LABEL)) >>= sLabel;
+ if ( sLabel.getLength() )
+ pColumn->setLabel(sLabel);
+ }
+ }
return aReturn;
}
// -------------------------------------------------------------------------
OParseColumn* OParseColumn::createColumnForResultSet( const Reference< XResultSetMetaData >& _rxResMetaData,
- const Reference< XDatabaseMetaData >& _rxDBMetaData, sal_Int32 _nColumnPos )
+ const Reference< XDatabaseMetaData >& _rxDBMetaData, sal_Int32 _nColumnPos,StringMap& _rColumns )
{
+ ::rtl::OUString sLabel = _rxResMetaData->getColumnLabel( _nColumnPos );
+ // retrieve the name of the column
+ // check for duplicate entries
+ if(_rColumns.find(sLabel) != _rColumns.end())
+ {
+ ::rtl::OUString sAlias(sLabel);
+ sal_Int32 searchIndex=1;
+ while(_rColumns.find(sAlias) != _rColumns.end())
+ {
+ (sAlias = sLabel) += ::rtl::OUString::valueOf(searchIndex++);
+ }
+ sLabel = sAlias;
+ }
+ _rColumns.insert(StringMap::value_type(sLabel,0));
OParseColumn* pColumn = new OParseColumn(
- _rxResMetaData->getColumnLabel( _nColumnPos ),
+ sLabel,
_rxResMetaData->getColumnTypeName( _nColumnPos ),
::rtl::OUString(),
+ ::rtl::OUString(),
_rxResMetaData->isNullable( _nColumnPos ),
_rxResMetaData->getPrecision( _nColumnPos ),
_rxResMetaData->getScale( _nColumnPos ),
@@ -133,6 +164,7 @@ OParseColumn* OParseColumn::createColumnForResultSet( const Reference< XResultSe
) );
pColumn->setIsSearchable( _rxResMetaData->isSearchable( _nColumnPos ) );
pColumn->setRealName(_rxResMetaData->getColumnName( _nColumnPos ));
+ pColumn->setLabel(sLabel);
return pColumn;
}
@@ -149,7 +181,7 @@ void OParseColumn::construct()
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME), PROPERTY_ID_REALNAME, 0, &m_aRealName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DBASEPRECISIONCHANGED), PROPERTY_ID_DBASEPRECISIONCHANGED, 0, &m_bDbasePrecisionChanged, ::getCppuType(reinterpret_cast<sal_Bool*>(NULL)));
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISSEARCHABLE), PROPERTY_ID_ISSEARCHABLE, 0, &m_bIsSearchable, ::getCppuType(reinterpret_cast< sal_Bool*>(NULL)));
-
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_LABEL), PROPERTY_ID_LABEL, 0, &m_sLabel, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
}
// -----------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OParseColumn::createArrayHelper() const
@@ -169,6 +201,7 @@ OOrderColumn::OOrderColumn( const Reference<XPropertySet>& _xColumn
: connectivity::sdbcx::OColumn( getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)))
, getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME)))
, getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE)))
+ , getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION)))
, getINT32(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE)))
, getINT32(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)))
, getINT32(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)))
@@ -183,33 +216,6 @@ OOrderColumn::OOrderColumn( const Reference<XPropertySet>& _xColumn
construct();
}
// -------------------------------------------------------------------------
-OOrderColumn::OOrderColumn( const ::rtl::OUString& _Name,
- const ::rtl::OUString& _TypeName,
- const ::rtl::OUString& _DefaultValue,
- sal_Int32 _IsNullable,
- sal_Int32 _Precision,
- sal_Int32 _Scale,
- sal_Int32 _Type,
- sal_Bool _IsAutoIncrement,
- sal_Bool _IsCurrency,
- sal_Bool _bCase
- ,sal_Bool _bAscending
- ) : connectivity::sdbcx::OColumn(_Name,
- _TypeName,
- _DefaultValue,
- _IsNullable,
- _Precision,
- _Scale,
- _Type,
- _IsAutoIncrement,
- sal_False,
- _IsCurrency,
- _bCase)
- , m_bAscending(_bAscending)
-{
- construct();
-}
-// -------------------------------------------------------------------------
OOrderColumn::~OOrderColumn()
{
}
diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y
index 4151314d36eb..84e9aa2532ff 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -145,7 +145,7 @@ using namespace connectivity;
%union {
connectivity::OSQLParseNode * pParseNode;
}
-%type <pParseNode> '(' ')' ',' ':' ';' '?' '[' ']' '{' '}' '.'
+%type <pParseNode> '(' ')' ',' ':' ';' '?' '[' ']' '{' '}' '.' 'K' 'M' 'G' 'T' 'P'
%token <pParseNode> SQL_TOKEN_STRING SQL_TOKEN_ACCESS_DATE SQL_TOKEN_INT SQL_TOKEN_REAL_NUM
%token <pParseNode> SQL_TOKEN_INTNUM SQL_TOKEN_APPROXNUM SQL_TOKEN_NOT SQL_TOKEN_NAME
@@ -188,7 +188,7 @@ using namespace connectivity;
/* ODBC KEYWORDS */
%token <pParseNode> SQL_TOKEN_CALL SQL_TOKEN_D SQL_TOKEN_FN SQL_TOKEN_T SQL_TOKEN_TS SQL_TOKEN_OJ
/* string functions */
-%token <pParseNode> SQL_TOKEN_ASCII SQL_TOKEN_BIT_LENGTH SQL_TOKEN_CHAR SQL_TOKEN_CHAR_LENGTH SQL_TOKEN_CHARACTER_LENGTH
+%token <pParseNode> SQL_TOKEN_ASCII SQL_TOKEN_BIT_LENGTH SQL_TOKEN_CHAR SQL_TOKEN_CHAR_LENGTH SQL_TOKEN_SQL_TOKEN_INTNUM
%token <pParseNode> SQL_TOKEN_CONCAT
%token <pParseNode> SQL_TOKEN_DIFFERENCE SQL_TOKEN_INSERT SQL_TOKEN_LCASE SQL_TOKEN_LEFT SQL_TOKEN_LENGTH SQL_TOKEN_LOCATE
%token <pParseNode> SQL_TOKEN_LOCATE_2 SQL_TOKEN_LTRIM SQL_TOKEN_POSITION SQL_TOKEN_REPEAT SQL_TOKEN_REPLACE
@@ -210,6 +210,13 @@ using namespace connectivity;
%token <pParseNode> SQL_TOKEN_EVERY SQL_TOKEN_INTERSECTION SQL_TOKEN_FUSION SQL_TOKEN_COLLECT SQL_TOKEN_VAR_POP SQL_TOKEN_VAR_SAMP
%token <pParseNode> SQL_TOKEN_STDDEV_SAMP SQL_TOKEN_STDDEV_POP
+%token <pParseNode> SQL_TOKEN_RANK SQL_TOKEN_DENSE_RANK SQL_TOKEN_PERCENT_RANK SQL_TOKEN_CUME_DIST SQL_TOKEN_PERCENTILE_CONT SQL_TOKEN_PERCENTILE_DISC SQL_TOKEN_WITHIN SQL_TOKEN_ARRAY_AGG
+%token <pParseNode> SQL_TOKEN_CASE SQL_TOKEN_THEN SQL_TOKEN_END SQL_TOKEN_NULLIF SQL_TOKEN_COALESCE SQL_TOKEN_WHEN SQL_TOKEN_ELSE
+%token <pParseNode> SQL_TOKEN_BEFORE SQL_TOKEN_AFTER SQL_TOKEN_INSTEAD SQL_TOKEN_EACH SQL_TOKEN_REFERENCING SQL_TOKEN_BEGIN SQL_TOKEN_ATOMIC SQL_TOKEN_TRIGGER SQL_TOKEN_ROW SQL_TOKEN_STATEMENT
+%token <pParseNode> SQL_TOKEN_NEW SQL_TOKEN_OLD
+%token <pParseNode> SQL_TOKEN_VALUE SQL_TOKEN_CURRENT_CATALOG SQL_TOKEN_CURRENT_DEFAULT_TRANSFORM_GROUP SQL_TOKEN_CURRENT_PATH SQL_TOKEN_CURRENT_ROLE SQL_TOKEN_CURRENT_SCHEMA SQL_TOKEN_CURRENT_USER
+%token <pParseNode> SQL_TOKEN_SESSION_USER SQL_TOKEN_SYSTEM_USER SQL_TOKEN_VARCHAR SQL_TOKEN_VARBINARY SQL_TOKEN_VARYING SQL_TOKEN_OBJECT SQL_TOKEN_NCLOB SQL_TOKEN_NATIONAL
+%token <pParseNode> SQL_TOKEN_LARGE SQL_TOKEN_CLOB SQL_TOKEN_BLOB SQL_TOKEN_BIGINT SQL_TOKEN_BINARY SQL_TOKEN_WITHOUT SQL_TOKEN_BOOLEAN SQL_TOKEN_INTERVAL
/* operators */
%left SQL_TOKEN_NAME
%left <pParseNode> SQL_TOKEN_OR
@@ -242,10 +249,10 @@ using namespace connectivity;
%type <pParseNode> update_statement_searched target_commalist target opt_where_clause
%type <pParseNode> select_statement selection table_exp from_clause table_ref_commalist table_ref
%type <pParseNode> where_clause opt_group_by_clause column_ref_commalist opt_having_clause
-%type <pParseNode> search_condition predicate comparison_predicate between_predicate
-%type <pParseNode> like_predicate opt_escape test_for_null in_predicate
-%type <pParseNode> all_or_any_predicate any_all_some existence_test subquery
-%type <pParseNode> scalar_exp_commalist parameter_ref literal
+%type <pParseNode> search_condition predicate comparison_predicate comparison_predicate_part_2 between_predicate between_predicate_part_2
+%type <pParseNode> like_predicate opt_escape test_for_null null_predicate_part_2 in_predicate in_predicate_part_2 character_like_predicate_part_2 other_like_predicate_part_2
+%type <pParseNode> all_or_any_predicate any_all_some existence_test subquery quantified_comparison_predicate_part_2
+%type <pParseNode> scalar_exp_commalist parameter_ref literal parenthesized_boolean_value_expression
%type <pParseNode> column_ref data_type column cursor parameter range_variable user /*like_check*/
/* neue Regeln bei OJ */
%type <pParseNode> derived_column as_clause table_name num_primary term num_value_exp
@@ -257,8 +264,8 @@ using namespace connectivity;
%type <pParseNode> qualified_join value_exp query_term join_type outer_join_type join_condition boolean_term
%type <pParseNode> boolean_factor truth_value boolean_test boolean_primary named_columns_join join_spec
%type <pParseNode> cast_operand cast_target factor datetime_value_exp /*interval_value_exp*/ datetime_term datetime_factor
-%type <pParseNode> datetime_primary datetime_value_fct time_zone time_zone_specifier /*interval_term*/ /*interval_qualifier*/
-%type <pParseNode> /*start_field*/ non_second_datetime_field /*end_field*/ /*single_datetime_field*/ extract_field datetime_field time_zone_field
+%type <pParseNode> datetime_primary datetime_value_fct time_zone time_zone_specifier /*interval_term*/ interval_qualifier
+%type <pParseNode> start_field non_second_datetime_field end_field single_datetime_field extract_field datetime_field time_zone_field
%type <pParseNode> extract_source char_length_exp octet_length_exp bit_length_exp select_sublist string_value_exp
%type <pParseNode> char_value_exp concatenation char_factor char_primary string_value_fct char_substring_fct fold
%type <pParseNode> form_conversion char_translation trim_fct trim_operands trim_spec bit_value_fct bit_substring_fct op_column_commalist
@@ -270,6 +277,15 @@ using namespace connectivity;
%type <pParseNode> column_def odbc_fct_spec odbc_call_spec odbc_fct_type op_parameter union_statement
%type <pParseNode> op_odbc_call_parameter odbc_parameter_commalist odbc_parameter function_args_commalist function_arg
%type <pParseNode> catalog_name schema_name table_node numeric_function string_function function_name date_function table_primary_as_range_column opt_as
+%type <pParseNode> ordered_set_function inverse_distribution_function hypothetical_set_function hypothetical_set_function_value_expression_list rank_function_type within_group_specification inverse_distribution_function_type array_aggregate_function inverse_distribution_function_argument
+%type <pParseNode> case_expression else_clause result_expression result case_abbreviation case_specification searched_when_clause simple_when_clause searched_case simple_case
+%type <pParseNode> when_operand_list when_operand case_operand
+%type <pParseNode> trigger_definition trigger_name trigger_action_time trigger_event transition_table_or_variable_list triggered_action trigger_column_list triggered_when_clause triggered_SQL_statement SQL_procedure_statement old_transition_variable_name new_transition_variable_name
+%type <pParseNode> op_referencing op_trigger_columnlist op_triggered_action_for opt_row trigger_for SQL_procedure_statement_list transition_table_or_variable old_transition_table_name new_transition_table_name transition_table_name
+%type <pParseNode> searched_when_clause_list simple_when_clause_list predefined_type opt_char_set_spec opt_collate_clause character_string_type national_character_string_type
+%type <pParseNode> binary_string_type numeric_type boolean_type datetime_type interval_type opt_paren_precision paren_char_length opt_paren_char_large_length paren_character_large_object_length
+%type <pParseNode> large_object_length opt_multiplier character_large_object_type national_character_large_object_type binary_large_object_string_type opt_with_or_without_time_zone
+%type <pParseNode> approximate_numeric_type exact_numeric_type opt_paren_precision_scale
%%
/* Parse Tree an OSQLParser zurueckliefern
@@ -282,25 +298,20 @@ sql_single_statement:
| sql ';'
{ xxx_pGLOBAL_SQLPARSER->setParseTree( $1 ); }
;
-/*
-sql_list:
- sql_ ';'
- {$$ = SQL_NEW_LISTRULE;
- $$->append($1);
- pSqlParseTreeRoot = $1; -- obsolete - Ergebnis in yyval! rdm }
- | sql_list sql ';'
- {$1->append($2);
- $$ = $1;}
- ;
-*/
-
/* schema definition language */
/* Note: other ``sql:sal_Unicode() rules appear later in the grammar */
-/***
+
sql:
- schema
+ manipulative_statement
+ | schema_element
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ }
;
+
+/***
op_authorization:
{$$ = SQL_NEW_RULE;}
@@ -336,7 +347,7 @@ schema:
;
opt_schema_element_list:
- /* empty * / {$$ = SQL_NEW_RULE;}
+ {$$ = SQL_NEW_RULE;}
| schema_glement_list
;
@@ -349,17 +360,12 @@ schema_element_list:
$$ = $1;}
;
*/
-sql:
- schema_element
- {$$ = SQL_NEW_RULE;
- $$->append($1);
- }
- ;
schema_element:
base_table_def
| view_def
| privilege_def
+ | trigger_definition
;
base_table_def:
@@ -676,9 +682,6 @@ sql_not:
/* manipulative statements */
-sql: manipulative_statement
- ;
-
manipulative_statement:
commit_statement
/* | delete_statement_positioned*/
@@ -953,6 +956,10 @@ opt_as:
/* empty */ {$$ = SQL_NEW_RULE;}
| SQL_TOKEN_AS
;
+opt_row:
+ /* empty */ {$$ = SQL_NEW_RULE;}
+ | SQL_TOKEN_ROW
+ ;
table_primary_as_range_column:
{$$ = SQL_NEW_RULE;}
| opt_as SQL_TOKEN_NAME op_column_commalist
@@ -1073,7 +1080,15 @@ boolean_primary:
YYERROR;
}
;
-
+parenthesized_boolean_value_expression:
+ '(' search_condition ')'
+ { // boolean_primary: rule 2
+ $$ = SQL_NEW_RULE;
+ $$->append($1 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($2);
+ $$->append($3 = newNode(")", SQL_NODE_PUNCTUATION));
+ }
+ ;
boolean_test:
boolean_primary
| boolean_primary SQL_TOKEN_IS sql_not truth_value
@@ -1124,7 +1139,13 @@ predicate:
| in_predicate
| like_predicate
;
-
+comparison_predicate_part_2:
+ comparison row_value_constructor
+ {
+ $$ = SQL_NEW_RULE; // comparison_predicate: rule 1
+ $$->append($1);
+ $$->append($2);
+ }
comparison_predicate:
row_value_constructor comparison row_value_constructor
{
@@ -1165,17 +1186,8 @@ comparison:
| SQL_LESSEQ
| SQL_GREATEQ
;
-between_predicate:
- row_value_constructor sql_not SQL_TOKEN_BETWEEN row_value_constructor SQL_TOKEN_AND row_value_constructor
- {$$ = SQL_NEW_RULE; // between_predicate: rule 1
- $$->append($1);
- $$->append($2);
- $$->append($3);
- $$->append($4);
- $$->append($5);
- $$->append($6);
- }
- | sql_not SQL_TOKEN_BETWEEN row_value_constructor SQL_TOKEN_AND row_value_constructor
+between_predicate_part_2:
+ sql_not SQL_TOKEN_BETWEEN row_value_constructor SQL_TOKEN_AND row_value_constructor
{
if (xxx_pGLOBAL_SQLPARSER->inPredicateCheck()) // between_predicate: rule 2
{
@@ -1186,7 +1198,13 @@ between_predicate:
{
OSQLParseNode* pTemp = $$;
$$ = pTemp->removeAt((sal_uInt32)0);
- $$->insert(1,$1);
+ OSQLParseNode* pColumnRef = $$->removeAt((sal_uInt32)0);
+ $$->insert(0,$1);
+ OSQLParseNode* pBetween_predicate = new OSQLInternalNode(aEmptyString, SQL_NODE_RULE,OSQLParser::RuleID(OSQLParseNode::between_predicate));
+ pBetween_predicate->append(pColumnRef);
+ pBetween_predicate->append($$);
+ $$ = pBetween_predicate;
+
delete pTemp;
delete $4;
}
@@ -1197,46 +1215,58 @@ between_predicate:
}
}
else
- YYERROR;
+ {
+ $$ = SQL_NEW_RULE; // between_predicate: rule 1
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ $$->append($5);
+ }
+ }
+between_predicate:
+ row_value_constructor between_predicate_part_2
+ {
+ $$ = SQL_NEW_RULE; // between_predicate: rule 1
+ $$->append($1);
+ $$->append($2);
}
+ | between_predicate_part_2
;
-
-like_predicate:
- row_value_constructor SQL_TOKEN_NOT SQL_TOKEN_LIKE string_value_exp opt_escape
+character_like_predicate_part_2:
+ sql_not SQL_TOKEN_LIKE string_value_exp opt_escape
{
$$ = SQL_NEW_RULE; // like_predicate: rule 1
$$->append($1);
$$->append($2);
$$->append($3);
$$->append($4);
- $$->append($5);
}
- | row_value_constructor SQL_TOKEN_LIKE string_value_exp opt_escape
+ ;
+other_like_predicate_part_2:
+ sql_not SQL_TOKEN_LIKE value_exp_primary opt_escape
{
- $$ = SQL_NEW_RULE; // like_predicate: rule 2
+ $$ = SQL_NEW_RULE; // like_predicate: rule 1
$$->append($1);
$$->append($2);
$$->append($3);
$$->append($4);
}
- | row_value_constructor SQL_TOKEN_NOT SQL_TOKEN_LIKE value_exp_primary opt_escape
+ ;
+like_predicate:
+ row_value_constructor character_like_predicate_part_2
{
- $$ = SQL_NEW_RULE; // like_predicate: rule 3
+ $$ = SQL_NEW_RULE; // like_predicate: rule 1
$$->append($1);
$$->append($2);
- $$->append($3);
- $$->append($4);
- $$->append($5);
}
- | row_value_constructor SQL_TOKEN_LIKE value_exp_primary opt_escape
+ | row_value_constructor other_like_predicate_part_2
{
- $$ = SQL_NEW_RULE; // like_predicate: rule 4
+ $$ = SQL_NEW_RULE; // like_predicate: rule 3
$$->append($1);
$$->append($2);
- $$->append($3);
- $$->append($4);
}
- | sql_not SQL_TOKEN_LIKE string_value_exp opt_escape
+ | character_like_predicate_part_2
{
if (xxx_pGLOBAL_SQLPARSER->inPredicateCheck()) // like_predicate: rule 5
{
@@ -1246,19 +1276,19 @@ like_predicate:
$$ = SQL_NEW_RULE;
$$->append(pColumnRef);
$$->append($1);
- $$->append($2);
- if (xxx_pGLOBAL_SQLPARSER->buildLikeRule($$,$3,$4))
- $$->append($4);
- else
+ OSQLParseNode* p2nd = $1->removeAt(2);
+ OSQLParseNode* p3rd = $1->removeAt(2);
+ if ( !xxx_pGLOBAL_SQLPARSER->buildLikeRule($1,p2nd,p3rd) )
{
delete $$;
YYABORT;
}
+ $1->append(p3rd);
}
else
YYERROR;
}
- | sql_not SQL_TOKEN_LIKE value_exp_primary opt_escape
+ | other_like_predicate_part_2
{
if (xxx_pGLOBAL_SQLPARSER->inPredicateCheck()) // like_predicate: rule 6
{
@@ -1268,14 +1298,14 @@ like_predicate:
$$ = SQL_NEW_RULE;
$$->append(pColumnRef);
$$->append($1);
- $$->append($2);
- if (xxx_pGLOBAL_SQLPARSER->buildLikeRule($$,$3,$4))
- $$->append($4);
- else
+ OSQLParseNode* p2nd = $1->removeAt(2);
+ OSQLParseNode* p3rd = $1->removeAt(2);
+ if ( !xxx_pGLOBAL_SQLPARSER->buildLikeRule($1,p2nd,p3rd) )
{
delete $$;
YYABORT;
}
+ $1->append(p3rd);
}
else
YYERROR;
@@ -1298,16 +1328,23 @@ opt_escape:
}
;
+null_predicate_part_2:
+ SQL_TOKEN_IS sql_not SQL_TOKEN_NULL
+ {
+ $$ = SQL_NEW_RULE; // test_for_null: rule 1
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ ;
test_for_null:
- row_value_constructor SQL_TOKEN_IS sql_not truth_value
+ row_value_constructor null_predicate_part_2
{
$$ = SQL_NEW_RULE; // test_for_null: rule 1
$$->append($1);
$$->append($2);
- $$->append($3);
- $$->append($4);
}
- | SQL_TOKEN_IS sql_not truth_value
+ | null_predicate_part_2
{
if (xxx_pGLOBAL_SQLPARSER->inPredicateCheck())// test_for_null: rule 2
{
@@ -1317,8 +1354,6 @@ test_for_null:
$$ = SQL_NEW_RULE;
$$->append(pColumnRef);
$$->append($1);
- $$->append($2);
- $$->append($3);
}
else
YYERROR;
@@ -1336,16 +1371,23 @@ in_predicate_value:
$$->append($3 = newNode(")", SQL_NODE_PUNCTUATION));
}
;
+in_predicate_part_2:
+ sql_not SQL_TOKEN_IN in_predicate_value
+ {
+ $$ = SQL_NEW_RULE;// in_predicate: rule 1
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ ;
in_predicate:
- row_value_constructor sql_not SQL_TOKEN_IN in_predicate_value
+ row_value_constructor in_predicate_part_2
{
$$ = SQL_NEW_RULE;// in_predicate: rule 1
$$->append($1);
$$->append($2);
- $$->append($3);
- $$->append($4);
}
- | sql_not SQL_TOKEN_IN in_predicate_value
+ | in_predicate_part_2
{
if ( xxx_pGLOBAL_SQLPARSER->inPredicateCheck() )// in_predicate: rule 2
{
@@ -1355,24 +1397,28 @@ in_predicate:
$$ = SQL_NEW_RULE;
$$->append(pColumnRef);
$$->append($1);
- $$->append($2);
- $$->append($3);
- // hello
}
else
YYERROR;
}
;
+quantified_comparison_predicate_part_2:
+ comparison any_all_some subquery
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ ;
all_or_any_predicate:
- row_value_constructor comparison any_all_some subquery
+ row_value_constructor quantified_comparison_predicate_part_2
{
$$ = SQL_NEW_RULE;
$$->append($1);
$$->append($2);
- $$->append($3);
- $$->append($4);
}
- | comparison any_all_some subquery
+ | quantified_comparison_predicate_part_2
{
if(xxx_pGLOBAL_SQLPARSER->inPredicateCheck())
{
@@ -1382,8 +1428,6 @@ all_or_any_predicate:
$$ = SQL_NEW_RULE;
$$->append(pColumnRef);
$$->append($1);
- $$->append($2);
- $$->append($3);
}
else
YYERROR;
@@ -1576,7 +1620,7 @@ char_length_exp:
$$->append($3);
$$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));
}
- | SQL_TOKEN_CHARACTER_LENGTH '(' value_exp ')'
+ | SQL_TOKEN_SQL_TOKEN_INTNUM '(' value_exp ')'
{
$$ = SQL_NEW_RULE;
$$->append($1);
@@ -1682,10 +1726,19 @@ unsigned_value_spec:
;
general_value_spec:
parameter
- | SQL_TOKEN_USER
- | SQL_TOKEN_NULL
- | SQL_TOKEN_FALSE
- | SQL_TOKEN_TRUE
+ | SQL_TOKEN_USER
+ /* | SQL_TOKEN_NULL*/
+ | SQL_TOKEN_FALSE
+ | SQL_TOKEN_TRUE
+ | SQL_TOKEN_VALUE
+ | SQL_TOKEN_CURRENT_CATALOG
+ | SQL_TOKEN_CURRENT_DEFAULT_TRANSFORM_GROUP
+ | SQL_TOKEN_CURRENT_PATH
+ | SQL_TOKEN_CURRENT_ROLE
+ | SQL_TOKEN_CURRENT_SCHEMA
+ | SQL_TOKEN_CURRENT_USER
+ | SQL_TOKEN_SESSION_USER
+ | SQL_TOKEN_SYSTEM_USER
;
set_fct_spec:
general_set_fct
@@ -1962,7 +2015,7 @@ odbc_fct_type:
;
general_set_fct:
- set_fct_type '(' opt_all_distinct value_exp ')'
+ set_fct_type '(' opt_all_distinct function_arg ')'
{
$$ = SQL_NEW_RULE;
$$->append($1);
@@ -1979,7 +2032,7 @@ general_set_fct:
$$->append($3 = newNode("*", SQL_NODE_PUNCTUATION));
$$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));
}
- | SQL_TOKEN_COUNT '(' opt_all_distinct value_exp ')'
+ | SQL_TOKEN_COUNT '(' opt_all_distinct function_arg ')'
{
$$ = SQL_NEW_RULE;
$$->append($1);
@@ -1988,6 +2041,8 @@ general_set_fct:
$$->append($4);
$$->append($5 = newNode(")", SQL_NODE_PUNCTUATION));
}
+ | ordered_set_function
+ | array_aggregate_function
;
set_fct_type:
SQL_TOKEN_AVG
@@ -2006,6 +2061,87 @@ set_fct_type:
| SQL_TOKEN_INTERSECTION
;
+ordered_set_function:
+ hypothetical_set_function
+ | inverse_distribution_function
+ ;
+hypothetical_set_function:
+ rank_function_type '(' hypothetical_set_function_value_expression_list ')' within_group_specification
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($3);
+ $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));
+ $$->append($5);
+ }
+ | rank_function_type '(' hypothetical_set_function_value_expression_list SQL_TOKEN_BY value_exp_commalist ')' within_group_specification
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($3);
+ $$->append($4);
+ $$->append($5);
+ $$->append($6 = newNode(")", SQL_NODE_PUNCTUATION));
+ $$->append($7);
+ }
+ ;
+
+within_group_specification:
+ {
+ $$ = SQL_NEW_RULE;
+ }
+ | SQL_TOKEN_WITHIN SQL_TOKEN_GROUP '(' opt_order_by_clause ')'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($4);
+ $$->append($5 = newNode(")", SQL_NODE_PUNCTUATION));
+ }
+ ;
+hypothetical_set_function_value_expression_list:
+ value_exp_commalist
+ ;
+
+inverse_distribution_function:
+ inverse_distribution_function_type '('inverse_distribution_function_argument ')' within_group_specification
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($3);
+ $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));
+ }
+ ;
+inverse_distribution_function_argument:
+ num_value_exp
+ ;
+inverse_distribution_function_type:
+ SQL_TOKEN_PERCENTILE_CONT
+ | SQL_TOKEN_PERCENTILE_DISC
+ ;
+
+array_aggregate_function:
+ SQL_TOKEN_ARRAY_AGG '(' value_exp opt_order_by_clause ')'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($3);
+ $$->append($4);
+ $$->append($5 = newNode(")", SQL_NODE_PUNCTUATION));
+ }
+ ;
+
+rank_function_type:
+ SQL_TOKEN_RANK
+ | SQL_TOKEN_DENSE_RANK
+ | SQL_TOKEN_PERCENT_RANK
+ | SQL_TOKEN_CUME_DIST
+ ;
outer_join_type:
SQL_TOKEN_LEFT %prec SQL_TOKEN_LEFT
{
@@ -2051,7 +2187,7 @@ join_type:
}
;
cross_union:
- table_ref /*[SQL_TOKEN_CROSS]*/ SQL_TOKEN_CROSS SQL_TOKEN_JOIN table_ref
+ table_ref SQL_TOKEN_CROSS SQL_TOKEN_JOIN table_ref
{
$$ = SQL_NEW_RULE;
$$->append($1);
@@ -2063,7 +2199,7 @@ cross_union:
qualified_join:
/* wenn SQL_TOKEN_NATURAL, dann keine join_spec */
- table_ref /*[SQL_TOKEN_NATURAL]*/ SQL_TOKEN_NATURAL join_type SQL_TOKEN_JOIN table_ref
+ table_ref SQL_TOKEN_NATURAL join_type SQL_TOKEN_JOIN table_ref
{
$$ = SQL_NEW_RULE;
$$->append($1);
@@ -2178,6 +2314,7 @@ value_exp_primary:
| column_ref
| set_fct_spec
| scalar_subquery
+ | case_expression
| '(' value_exp ')'
{
$$ = SQL_NEW_RULE;
@@ -2401,83 +2538,39 @@ non_second_datetime_field:
| SQL_TOKEN_HOUR
| SQL_TOKEN_MINUTE
;
-/*start_field:
- non_second_datetime_field
+start_field:
+ non_second_datetime_field opt_paren_precision
{
$$ = SQL_NEW_RULE;
$$->append($1);
- }
- | non_second_datetime_field '(' SQL_TOKEN_INTNUM ')'
- {
- $$ = SQL_NEW_RULE;
- $$->append($1);
- $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
- $$->append($3);
- $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));
+ $$->append($2);
}
;
end_field:
non_second_datetime_field
+ | SQL_TOKEN_SECOND opt_paren_precision
{
$$ = SQL_NEW_RULE;
$$->append($1);
- }
- | SQL_TOKEN_SECOND
- {
- $$ = SQL_NEW_RULE;
- $$->append($1);
- }
- | SQL_TOKEN_SECOND '(' SQL_TOKEN_INTNUM ')'
- {
- $$ = SQL_NEW_RULE;
- $$->append($1);
- $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
- $$->append($3);
- $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));
+ $$->append($2);
}
;
-*/
-/*
+
single_datetime_field:
- non_second_datetime_field
+ non_second_datetime_field opt_paren_precision
{
$$ = SQL_NEW_RULE;
$$->append($1);
+ $$->append($2);
}
- | non_second_datetime_field '(' SQL_TOKEN_INTNUM ')'
- {
- $$ = SQL_NEW_RULE;
- $$->append($1);
- $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
- $$->append($3);
- $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));
- }
- | SQL_TOKEN_SECOND
- {
- $$ = SQL_NEW_RULE;
- $$->append($1);
- }
- | SQL_TOKEN_SECOND '(' SQL_TOKEN_INTNUM ')'
- {
- $$ = SQL_NEW_RULE;
- $$->append($1);
- $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
- $$->append($3);
- $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));
- }
- | SQL_TOKEN_SECOND '(' SQL_TOKEN_INTNUM ',' SQL_TOKEN_INTNUM ')'
+ | SQL_TOKEN_SECOND opt_paren_precision_scale
{
$$ = SQL_NEW_RULE;
$$->append($1);
- $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
- $$->append($3);
- $$->append($4 = newNode(",", SQL_NODE_PUNCTUATION));
- $$->append($5);
- $$->append($6 = newNode(")", SQL_NODE_PUNCTUATION));
+ $$->append($2);
}
;
-*/
-/*
+
interval_qualifier:
start_field SQL_TOKEN_TO end_field
{
@@ -2486,13 +2579,9 @@ interval_qualifier:
$$->append($2);
$$->append($3);
}
- | single_datetime_field
- {
- $$ = SQL_NEW_RULE;
- $$->append($1);
- }
+ | single_datetime_field
;
-*/
+
function_arg_commalist2:
function_arg ',' function_arg
{$$ = SQL_NEW_COMMALISTRULE;
@@ -2546,6 +2635,21 @@ function_arg:
$$->append($2);
$$->append($3);
}
+ | value_exp SQL_TOKEN_USING value_exp comparison value_exp
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ }
+ | value_exp SQL_TOKEN_BY value_exp_commalist
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
;
function_args_commalist:
function_arg
@@ -2952,59 +3056,384 @@ column_val:
}
;
data_type:
- SQL_TOKEN_CHARACTER
- | SQL_TOKEN_CHARACTER '(' SQL_TOKEN_INTNUM ')'
- {$$ = SQL_NEW_RULE;
+ predefined_type
+ ;
+opt_char_set_spec:
+ {$$ = SQL_NEW_RULE;}
+ | SQL_TOKEN_CHARACTER SQL_TOKEN_SET SQL_TOKEN_NAME
+ {
+ $$ = SQL_NEW_RULE;
$$->append($1);
- $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($2);
$$->append($3);
- $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));}
- | SQL_TOKEN_NUMERIC
- | SQL_TOKEN_NUMERIC '(' SQL_TOKEN_INTNUM ')'
- {$$ = SQL_NEW_RULE;
+ }
+ ;
+opt_collate_clause:
+ {$$ = SQL_NEW_RULE;}
+ | collate_clause
+ ;
+predefined_type:
+ character_string_type opt_char_set_spec opt_collate_clause
+ {
+ $$ = SQL_NEW_RULE;
$$->append($1);
- $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($2);
$$->append($3);
- $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));}
- | SQL_TOKEN_NUMERIC '(' SQL_TOKEN_INTNUM ',' SQL_TOKEN_INTNUM ')'
- {$$ = SQL_NEW_RULE;
+ }
+ | national_character_string_type opt_collate_clause
+ {
+ $$ = SQL_NEW_RULE;
$$->append($1);
- $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($2);
+ }
+ | binary_string_type
+ | numeric_type
+ | boolean_type
+ | datetime_type
+ | interval_type
+ ;
+character_string_type:
+ SQL_TOKEN_CHARACTER opt_paren_precision
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ | SQL_TOKEN_CHAR opt_paren_precision
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ | SQL_TOKEN_CHARACTER SQL_TOKEN_VARYING paren_char_length
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
$$->append($3);
- $$->append($4 = newNode(",", SQL_NODE_PUNCTUATION));
- $$->append($5);
- $$->append($6 = newNode(")", SQL_NODE_PUNCTUATION));}
- | SQL_TOKEN_DECIMAL
- | SQL_TOKEN_DECIMAL '(' SQL_TOKEN_INTNUM ')'
- {$$ = SQL_NEW_RULE;
+ }
+ | SQL_TOKEN_CHAR SQL_TOKEN_VARYING paren_char_length
+ {
+ $$ = SQL_NEW_RULE;
$$->append($1);
- $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($2);
$$->append($3);
- $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));}
- | SQL_TOKEN_DECIMAL '(' SQL_TOKEN_INTNUM ',' SQL_TOKEN_INTNUM ')'
- {$$ = SQL_NEW_RULE;
+ }
+ | SQL_TOKEN_VARCHAR paren_char_length
+ {
+ $$ = SQL_NEW_RULE;
$$->append($1);
- $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($2);
+ }
+ | character_large_object_type
+ ;
+opt_paren_precision:
+ {$$ = SQL_NEW_RULE;}
+ | paren_char_length
+ ;
+paren_char_length:
+ '(' SQL_TOKEN_INTNUM ')'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($2);
+ $$->append($3 = newNode(")", SQL_NODE_PUNCTUATION));
+ }
+ ;
+opt_paren_char_large_length:
+ {$$ = SQL_NEW_RULE;}
+ | paren_character_large_object_length
+ ;
+paren_character_large_object_length:
+ '(' large_object_length ')'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($2);
+ $$->append($3 = newNode(")", SQL_NODE_PUNCTUATION));
+ }
+ ;
+
+large_object_length:
+ SQL_TOKEN_INTNUM opt_multiplier
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ ;
+opt_multiplier:
+ {$$ = SQL_NEW_RULE;}
+ | 'K'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1 = newNode("K", SQL_NODE_PUNCTUATION));
+ }
+ | 'M'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1 = newNode("M", SQL_NODE_PUNCTUATION));
+ }
+ | 'G'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1 = newNode("G", SQL_NODE_PUNCTUATION));
+ }
+ | 'T'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1 = newNode("T", SQL_NODE_PUNCTUATION));
+ }
+ | 'P'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1 = newNode("P", SQL_NODE_PUNCTUATION));
+ }
+ ;
+character_large_object_type:
+ SQL_TOKEN_CHARACTER SQL_TOKEN_LARGE SQL_TOKEN_OBJECT opt_paren_char_large_length
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
$$->append($3);
- $$->append($4 = newNode(",", SQL_NODE_PUNCTUATION));
+ $$->append($4);
+ }
+ | SQL_TOKEN_CHAR SQL_TOKEN_LARGE SQL_TOKEN_OBJECT opt_paren_char_large_length
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ }
+ | SQL_TOKEN_CLOB opt_paren_char_large_length
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ ;
+national_character_string_type:
+ SQL_TOKEN_NATIONAL SQL_TOKEN_CHARACTER opt_paren_precision
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ | SQL_TOKEN_NATIONAL SQL_TOKEN_CHAR opt_paren_precision
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ | SQL_TOKEN_NCHAR opt_paren_precision
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ | SQL_TOKEN_NATIONAL SQL_TOKEN_CHARACTER SQL_TOKEN_VARYING paren_char_length
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ }
+ | SQL_TOKEN_NATIONAL SQL_TOKEN_CHAR SQL_TOKEN_VARYING paren_char_length
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ }
+ | SQL_TOKEN_NCHAR SQL_TOKEN_VARYING paren_char_length
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ | national_character_large_object_type
+ ;
+national_character_large_object_type:
+ SQL_TOKEN_NATIONAL SQL_TOKEN_CHARACTER SQL_TOKEN_LARGE SQL_TOKEN_OBJECT opt_paren_char_large_length
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
$$->append($5);
- $$->append($6 = newNode(")", SQL_NODE_PUNCTUATION));}
- | SQL_TOKEN_INTEGER
- | SQL_TOKEN_SMALLINT
- | SQL_TOKEN_FLOAT
- | SQL_TOKEN_FLOAT '(' SQL_TOKEN_INTNUM ')'
- {$$ = SQL_NEW_RULE;
+ }
+ | SQL_TOKEN_NCHAR SQL_TOKEN_LARGE SQL_TOKEN_OBJECT opt_paren_char_large_length
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ }
+ | SQL_TOKEN_NCLOB opt_paren_char_large_length
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ ;
+binary_string_type:
+ SQL_TOKEN_BINARY opt_paren_precision
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ | SQL_TOKEN_BINARY SQL_TOKEN_VARYING paren_char_length
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ | SQL_TOKEN_VARBINARY paren_char_length
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ | binary_large_object_string_type
+ ;
+binary_large_object_string_type:
+ SQL_TOKEN_BINARY SQL_TOKEN_LARGE SQL_TOKEN_OBJECT opt_paren_char_large_length
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ }
+ | SQL_TOKEN_BLOB opt_paren_char_large_length
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ ;
+numeric_type:
+ exact_numeric_type
+ | approximate_numeric_type
+ ;
+opt_paren_precision_scale:
+ {$$ = SQL_NEW_RULE;}
+ | '(' SQL_TOKEN_INTNUM ')'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($2);
+ $$->append($3 = newNode(")", SQL_NODE_PUNCTUATION));
+ }
+ | '(' SQL_TOKEN_INTNUM ',' SQL_TOKEN_INTNUM ')'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($2);
+ $$->append($3 = newNode(",", SQL_NODE_PUNCTUATION));
+ $$->append($4);
+ $$->append($5 = newNode(")", SQL_NODE_PUNCTUATION));
+ }
+ ;
+exact_numeric_type:
+ SQL_TOKEN_NUMERIC opt_paren_precision_scale
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ | SQL_TOKEN_DECIMAL opt_paren_precision_scale
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ | SQL_TOKEN_DEC opt_paren_precision_scale
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ | SQL_TOKEN_SMALLINT
+ | SQL_TOKEN_INTEGER
+ | SQL_TOKEN_INT
+ | SQL_TOKEN_BIGINT
+ ;
+approximate_numeric_type:
+ SQL_TOKEN_FLOAT '(' SQL_TOKEN_INTNUM ')'
+ {
+ $$ = SQL_NEW_RULE;
$$->append($1);
$$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
$$->append($3);
- $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));}
- | SQL_TOKEN_REAL
- | SQL_TOKEN_DOUBLE SQL_TOKEN_PRECISION
- {$$ = SQL_NEW_RULE;
+ $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));
+ }
+ | SQL_TOKEN_FLOAT
+ | SQL_TOKEN_REAL
+ | SQL_TOKEN_DOUBLE
+ | SQL_TOKEN_DOUBLE SQL_TOKEN_PRECISION
+ {
+ $$ = SQL_NEW_RULE;
$$->append($1);
- $$->append($2);}
+ $$->append($2);
+ }
+ ;
+boolean_type:
+ SQL_TOKEN_BOOLEAN
+;
+datetime_type:
+ SQL_TOKEN_DATE
+ | SQL_TOKEN_TIME opt_paren_precision opt_with_or_without_time_zone
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ | SQL_TOKEN_TIMESTAMP opt_paren_precision opt_with_or_without_time_zone
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ ;
+opt_with_or_without_time_zone:
+ {$$ = SQL_NEW_RULE;}
+ | SQL_TOKEN_WITH SQL_TOKEN_TIME SQL_TOKEN_ZONE
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ | SQL_TOKEN_WITHOUT SQL_TOKEN_TIME SQL_TOKEN_ZONE
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ ;
+interval_type:
+ SQL_TOKEN_INTERVAL interval_qualifier
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
;
-
/* the various things you can name */
column:
@@ -3028,7 +3457,141 @@ column:
$$ = newNode(xxx_pGLOBAL_SQLPARSER->TokenIDToStr(nNod), SQL_NODE_NAME);
}
;
-
+case_expression:
+ case_abbreviation
+ | case_specification
+ ;
+case_abbreviation:
+ SQL_TOKEN_NULLIF '(' value_exp_commalist ')'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($3);
+ $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));
+ }
+ | SQL_TOKEN_COALESCE '(' value_exp ')'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($3);
+ $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));
+ }
+ | SQL_TOKEN_COALESCE '(' value_exp_commalist ')'
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION));
+ $$->append($3);
+ $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));
+ }
+ ;
+case_specification:
+ simple_case
+ | searched_case
+ ;
+simple_case:
+ SQL_TOKEN_CASE case_operand simple_when_clause_list else_clause SQL_TOKEN_END
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ $$->append($5);
+ }
+ ;
+searched_case:
+ SQL_TOKEN_CASE searched_when_clause_list else_clause SQL_TOKEN_END
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ }
+ ;
+simple_when_clause_list:
+ simple_when_clause
+ {
+ $$ = SQL_NEW_LISTRULE;
+ $$->append($1);
+ }
+ | searched_when_clause_list simple_when_clause
+ {
+ $1->append($2);
+ $$ = $1;
+ }
+ ;
+simple_when_clause:
+ SQL_TOKEN_WHEN when_operand_list SQL_TOKEN_THEN result
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ }
+ ;
+when_operand_list:
+ when_operand
+ {$$ = SQL_NEW_COMMALISTRULE;
+ $$->append($1);}
+ | when_operand_list ',' when_operand
+ {$1->append($3);
+ $$ = $1;}
+ ;
+when_operand:
+ row_value_constructor_elem
+ | comparison_predicate_part_2
+ | between_predicate_part_2
+ | in_predicate_part_2
+ | character_like_predicate_part_2
+ | null_predicate_part_2
+;
+searched_when_clause_list:
+ searched_when_clause
+ {
+ $$ = SQL_NEW_LISTRULE;
+ $$->append($1);
+ }
+ | searched_when_clause_list searched_when_clause
+ {
+ $1->append($2);
+ $$ = $1;
+ }
+ ;
+searched_when_clause:
+ SQL_TOKEN_WHEN search_condition SQL_TOKEN_THEN result
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ }
+ ;
+else_clause:
+ {$$ = SQL_NEW_RULE;}
+ | SQL_TOKEN_ELSE result
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ ;
+result:
+ result_expression
+ | SQL_TOKEN_NULL
+ ;
+result_expression:
+ value_exp
+ ;
+case_operand:
+ row_value_constructor_elem
+ ;
+
cursor: SQL_TOKEN_NAME
{$$ = SQL_NEW_RULE;
$$->append($1);}
@@ -3093,6 +3656,195 @@ sql:
}
| '(' sql ')' /* checking predicats */
;
+trigger_definition:
+ SQL_TOKEN_CREATE SQL_TOKEN_TRIGGER trigger_name trigger_action_time trigger_event SQL_TOKEN_ON table_name op_referencing triggered_action
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ $$->append($5);
+ $$->append($6);
+ $$->append($7);
+ $$->append($8);
+ $$->append($9);
+ }
+ ;
+op_referencing:
+ {
+ $$ = SQL_NEW_RULE;
+ }
+ | SQL_TOKEN_REFERENCING transition_table_or_variable_list
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ ;
+trigger_action_time:
+ SQL_TOKEN_BEFORE
+ | SQL_TOKEN_AFTER
+ | SQL_TOKEN_INSTEAD SQL_TOKEN_OF
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+;
+trigger_event:
+ SQL_TOKEN_INSERT
+ | SQL_TOKEN_DELETE
+ | SQL_TOKEN_UPDATE op_trigger_columnlist
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ ;
+op_trigger_columnlist:
+ {
+ $$ = SQL_NEW_RULE;
+ }
+ | SQL_TOKEN_OF trigger_column_list
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ ;
+trigger_column_list:
+ column_commalist
+ ;
+triggered_action:
+ op_triggered_action_for triggered_when_clause triggered_SQL_statement
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ ;
+op_triggered_action_for:
+ {
+ $$ = SQL_NEW_RULE;
+ }
+ | SQL_TOKEN_FOR SQL_TOKEN_EACH trigger_for
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ }
+ ;
+trigger_for:
+ SQL_TOKEN_ROW
+ | SQL_TOKEN_STATEMENT
+ ;
+triggered_when_clause:
+ {
+ $$ = SQL_NEW_RULE;
+ }
+ | SQL_TOKEN_WHEN parenthesized_boolean_value_expression
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ }
+ ;
+triggered_SQL_statement:
+ SQL_procedure_statement
+ | SQL_TOKEN_BEGIN SQL_TOKEN_ATOMIC SQL_procedure_statement_list ';' SQL_TOKEN_END
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4 = newNode(";", SQL_NODE_PUNCTUATION));
+ $$->append($5);
+ }
+ ;
+SQL_procedure_statement_list:
+ SQL_procedure_statement
+ {
+ $$ = SQL_NEW_LISTRULE;
+ $$->append($1);
+ }
+ | SQL_procedure_statement_list ';' SQL_procedure_statement
+ {
+ $1->append($3);
+ $$ = $1;
+ }
+ ;
+SQL_procedure_statement:
+ sql
+ ;
+
+transition_table_or_variable_list:
+ transition_table_or_variable
+ {
+ $$ = SQL_NEW_LISTRULE;
+ $$->append($1);
+ }
+ | transition_table_or_variable_list transition_table_or_variable
+ {
+ $1->append($2);
+ $$ = $1;
+ }
+ ;
+
+transition_table_or_variable:
+ SQL_TOKEN_OLD opt_row opt_as old_transition_variable_name
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ }
+ | SQL_TOKEN_NEW opt_row opt_as new_transition_variable_name
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ }
+ | SQL_TOKEN_OLD SQL_TOKEN_TABLE opt_as old_transition_table_name
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ }
+ | SQL_TOKEN_NEW SQL_TOKEN_TABLE opt_as new_transition_table_name
+ {
+ $$ = SQL_NEW_RULE;
+ $$->append($1);
+ $$->append($2);
+ $$->append($3);
+ $$->append($4);
+ }
+;
+old_transition_table_name:
+ transition_table_name
+;
+new_transition_table_name:
+ transition_table_name
+;
+transition_table_name:
+ SQL_TOKEN_NAME
+;
+old_transition_variable_name:
+ SQL_TOKEN_NAME
+;
+new_transition_variable_name:
+ SQL_TOKEN_NAME
+;
+trigger_name:
+ SQL_TOKEN_NAME
+;
%%
@@ -3507,7 +4259,7 @@ sal_Int16 OSQLParser::buildNode(OSQLParseNode*& pAppend,OSQLParseNode* pCompare,
pColumnRef->append(new OSQLInternalNode(m_sFieldName,SQL_NODE_NAME));
OSQLParseNode* pComp = NULL;
if ( SQL_ISTOKEN( pCompare, BETWEEN) && pLiteral2 )
- pComp = new OSQLInternalNode(aEmptyString, SQL_NODE_RULE,OSQLParser::RuleID(OSQLParseNode::between_predicate));
+ pComp = new OSQLInternalNode(aEmptyString, SQL_NODE_RULE,OSQLParser::RuleID(OSQLParseNode::between_predicate_part_2));
else
pComp = new OSQLInternalNode(aEmptyString, SQL_NODE_RULE,OSQLParser::RuleID(OSQLParseNode::comparison_predicate));
diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l
index 275bd5b34619..c6723dfd6869 100644
--- a/connectivity/source/parse/sqlflex.l
+++ b/connectivity/source/parse/sqlflex.l
@@ -86,15 +86,11 @@ OSQLScanner* xxx_pGLOBAL_SQLSCAN = NULL;
SQLyylval.pParseNode = new OSQLInternalNode(text, token);
#define SQL_NEW_KEYWORD(token) \
- SQLyylval.pParseNode = new OSQLInternalNode(aEmptyString, SQL_NODE_KEYWORD, (token));
+ SQLyylval.pParseNode = new OSQLInternalNode(aEmptyString, SQL_NODE_KEYWORD, (token)); return token;
-#define SQL_NEW_NAME SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_NAME)
-#define SQL_NEW_INTNUM SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_INTNUM)
-#define SQL_NEW_APPROXNUM SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_APPROXNUM)
-#define SQL_NEW_STRING SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_STRING)
-#define SQL_NEW_COMPARISON SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_COMPARISON)
-#define SQL_NEW_AMMSC SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_AMMSC)
-#define SQL_NEW_DATE SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_ACCESS_DATE)
+#define SQL_NEW_INTNUM SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_INTNUM); return SQL_TOKEN_INTNUM;
+#define SQL_NEW_APPROXNUM SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_APPROXNUM); return SQL_TOKEN_APPROXNUM;
+#define SQL_NEW_DATE SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_ACCESS_DATE); return SQL_TOKEN_ACCESS_DATE;
#define YY_INPUT(buf,result,max_size) \
{ \
@@ -122,231 +118,280 @@ OSQLScanner* xxx_pGLOBAL_SQLSCAN = NULL;
%option never-interactive
%%
-[Aa][Bb][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_ABS); return SQL_TOKEN_ABS; }
-[Aa][Cc][Oo][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_ACOS); return SQL_TOKEN_ACOS; }
-[Aa][Ll][Ll] {SQL_NEW_KEYWORD(SQL_TOKEN_ALL); return SQL_TOKEN_ALL; }
-[Aa][Ll][Tt][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_ALTER); return SQL_TOKEN_ALTER; }
-[Aa][Nn][Dd] {SQL_NEW_KEYWORD(SQL_TOKEN_AND); return SQL_TOKEN_AND; }
-[Aa][Nn][Yy] {SQL_NEW_KEYWORD(SQL_TOKEN_ANY); return SQL_TOKEN_ANY; }
-[Aa][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_AS); return SQL_TOKEN_AS; }
-[Aa][Ss][Cc] {SQL_NEW_KEYWORD(SQL_TOKEN_ASC); return SQL_TOKEN_ASC; }
-[Aa][Ss][Cc][Ii][Ii] {SQL_NEW_KEYWORD(SQL_TOKEN_ASCII); return SQL_TOKEN_ASCII; }
-[Aa][Ss][Ii][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_ASIN); return SQL_TOKEN_ASIN; }
-[Aa][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_AT); return SQL_TOKEN_AT; }
-[Aa][Tt][Aa][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_ATAN); return SQL_TOKEN_ATAN; }
-[Aa][Tt][Aa][Nn]2 {SQL_NEW_KEYWORD(SQL_TOKEN_ATAN2); return SQL_TOKEN_ATAN2; }
-[Aa][Uu][Tt][Hh][Oo][Rr][Ii][Zz][Aa][Tt][Ii][Oo][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_AUTHORIZATION); return SQL_TOKEN_AUTHORIZATION; }
-[Aa][Vv][Gg] {SQL_NEW_KEYWORD(SQL_TOKEN_AVG); return SQL_TOKEN_AVG; }
-
-[Bb][Ee][Tt][Ww][Ee][Ee][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_BETWEEN); return SQL_TOKEN_BETWEEN; }
-[Bb][Ii][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_BIT); return SQL_TOKEN_BIT; }
-[Bb][Ii][Tt]_[Ll][Ee][Nn][Gg][Tt][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_BIT_LENGTH); return SQL_TOKEN_BIT_LENGTH; }
-[Bb][Oo][Tt][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_BOTH); return SQL_TOKEN_BOTH; }
-[Bb][Yy] {SQL_NEW_KEYWORD(SQL_TOKEN_BY); return SQL_TOKEN_BY; }
-
-[Cc][Aa][Ll][Ll] {SQL_NEW_KEYWORD(SQL_TOKEN_CALL); return SQL_TOKEN_CALL; }
-[Cc][Aa][Ss][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_CAST); return SQL_TOKEN_CAST; }
-[Cc][Hh][Aa][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_CHAR); return SQL_TOKEN_CHAR; }
-[Cc][Hh][Aa][Rr][Aa][Cc][Tt][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_CHARACTER); return SQL_TOKEN_CHARACTER; }
-[Cc][Hh][Aa][Rr]([Aa][Cc][Tt][Ee][Rr])?_[Ll][Ee][Nn][Gg][Tt][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_CHAR_LENGTH); return SQL_TOKEN_CHAR_LENGTH; }
-[Cc][Hh][Ee][Cc][Kk] {SQL_NEW_KEYWORD(SQL_TOKEN_CHECK); return SQL_TOKEN_CHECK; }
-[Cc][Ee][Ii][Ll][Ii][Nn][Gg] {SQL_NEW_KEYWORD(SQL_TOKEN_CEILING); return SQL_TOKEN_CEILING; }
-[Cc][Oo][Ll][Ll][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_COLLATE); return SQL_TOKEN_COLLATE; }
-COLLECT {SQL_NEW_KEYWORD(SQL_TOKEN_COLLECT); return SQL_TOKEN_COLLECT; }
-[Cc][Oo][Mm][Mm][Ii][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_COMMIT); return SQL_TOKEN_COMMIT; }
-[Cc][Oo][Nn][Cc][Aa][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_CONCAT); return SQL_TOKEN_CONCAT; }
-[Cc][Oo][Nn][Tt][Ii][Nn][Uu][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_CONTINUE); return SQL_TOKEN_CONTINUE; }
-[Cc][Oo][Nn][Vv][Ee][Rr][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_CONVERT); return SQL_TOKEN_CONVERT; }
-[Cc][Oo][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_COS); return SQL_TOKEN_COS; }
-[Cc][Oo][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_COT); return SQL_TOKEN_COT; }
-[Cc][Oo][Uu][Nn][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_COUNT); return SQL_TOKEN_COUNT; }
-[Cc][Rr][Ee][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_CREATE); return SQL_TOKEN_CREATE; }
-[Cc][Rr][Oo][Ss][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_CROSS); return SQL_TOKEN_CROSS; }
-[Cc][Uu][Rr][Rr][Ee][Nn][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT); return SQL_TOKEN_CURRENT; }
-[Cc][Uu][Rr][Rr][Ee][Nn][Tt]_[Dd][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_DATE); return SQL_TOKEN_CURRENT_DATE; }
-[Cc][Uu][Rr][Dd][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_CURDATE); return SQL_TOKEN_CURDATE; }
-[Cc][Uu][Rr][Rr][Ee][Nn][Tt]_[Tt][Ii][Mm][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_TIME); return SQL_TOKEN_CURRENT_TIME; }
-[Cc][Uu][Rr][Tt][Ii][Mm][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_CURTIME); return SQL_TOKEN_CURTIME; }
-[Cc][Uu][Rr][Rr][Ee][Nn][Tt]_[Tt][Ii][Mm][Ee][Ss][Tt][Aa][Mm][Pp] {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_TIMESTAMP); return SQL_TOKEN_CURRENT_TIMESTAMP; }
-[Cc][Uu][Rr][Ss][Oo][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_CURSOR); return SQL_TOKEN_CURSOR; }
-
-[Dd] {SQL_NEW_KEYWORD(SQL_TOKEN_D); return SQL_TOKEN_D; }
-[Dd][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_DATE); return SQL_TOKEN_DATE; }
-[Dd][Aa][Tt][Ee][Dd][Ii][Ff][Ff] {SQL_NEW_KEYWORD(SQL_TOKEN_DATEDIFF); return SQL_TOKEN_DATEDIFF; }
-[Dd][Aa][Tt][Ee][Vv][Aa][Ll][Uu][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_DATEVALUE); return SQL_TOKEN_DATEVALUE; }
-[Dd][Aa][Yy] {SQL_NEW_KEYWORD(SQL_TOKEN_DAY); return SQL_TOKEN_DAY; }
-[Dd][Aa][Yy][Nn][Aa][Mm][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_DAYNAME); return SQL_TOKEN_DAYNAME; }
-[Dd][Aa][Yy][Oo][Ff][Mm][Oo][Nn][Tt][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_DAYOFMONTH); return SQL_TOKEN_DAYOFMONTH; }
-[Dd][Aa][Yy][Oo][Ff][Ww][Ee][Ee][Kk] {SQL_NEW_KEYWORD(SQL_TOKEN_DAYOFWEEK); return SQL_TOKEN_DAYOFWEEK; }
-[Dd][Aa][Yy][Oo][Ff][Yy][Ee][Aa][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_DAYOFYEAR); return SQL_TOKEN_DAYOFYEAR; }
-[Dd][Ee][Cc] {SQL_NEW_KEYWORD(SQL_TOKEN_DEC); return SQL_TOKEN_DEC; }
-[Dd][Ee][Cc][Ii][Mm][Aa][Ll] {SQL_NEW_KEYWORD(SQL_TOKEN_DECIMAL); return SQL_TOKEN_DECIMAL; }
-[Dd][Ee][Cc][Ll][Aa][Rr][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_DECLARE); return SQL_TOKEN_DECLARE; }
-[Dd][Ee][Ff][Aa][Uu][Ll][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_DEFAULT); return SQL_TOKEN_DEFAULT; }
-[Dd][Ee][Gg][Rr][Ee][Ee][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_DEGREES); return SQL_TOKEN_DEGREES; }
-[Dd][Ee][Ll][Ee][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_DELETE); return SQL_TOKEN_DELETE; }
-[Dd][Ee][Ss][Cc] {SQL_NEW_KEYWORD(SQL_TOKEN_DESC); return SQL_TOKEN_DESC; }
-[Dd][Ii][Ff][Ff][Ee][Rr][Ee][Nn][Cc][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_DIFFERENCE); return SQL_TOKEN_DIFFERENCE; }
-[Dd][Ii][Ss][Tt][Ii][Nn][Cc][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_DISTINCT); return SQL_TOKEN_DISTINCT; }
-[Dd][Oo][Uu][Bb][Ll][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_DOUBLE); return SQL_TOKEN_DOUBLE; }
-[Dd][Rr][Oo][Pp] {SQL_NEW_KEYWORD(SQL_TOKEN_DROP); return SQL_TOKEN_DROP; }
-
-EVERY {SQL_NEW_KEYWORD(SQL_TOKEN_EVERY); return SQL_TOKEN_EVERY; }
-[Ee][Ss][Cc][Aa][Pp][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_ESCAPE); return SQL_TOKEN_ESCAPE; }
-[Ee][Xx][Cc][Ee][Pp][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_EXCEPT); return SQL_TOKEN_EXCEPT; }
-[Ee][Xx][Ii][Ss][Tt][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_EXISTS); return SQL_TOKEN_EXISTS; }
-[Ee][Xx][Pp] {SQL_NEW_KEYWORD(SQL_TOKEN_EXP); return SQL_TOKEN_EXP; }
-[Ee][Xx][Tt][Rr][Aa][Cc][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_EXTRACT); return SQL_TOKEN_EXTRACT; }
-
-[Ff][Aa][Ll][Ss][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_FALSE); return SQL_TOKEN_FALSE; }
-[Ff][Ee][Tt][Cc][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_FETCH); return SQL_TOKEN_FETCH; }
-[Ff][Ll][Oo][Aa][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_FLOAT); return SQL_TOKEN_FLOAT; }
-[Ff][Ll][Oo][Oo][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_FLOOR); return SQL_TOKEN_FLOOR; }
-[Ff][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_FN); return SQL_TOKEN_FN; }
-[Ff][Oo][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_FOR); return SQL_TOKEN_FOR; }
-[Ff][Oo][Rr][Ee][Ii][Gg][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_FOREIGN); return SQL_TOKEN_FOREIGN; }
-[Ff][Oo][Uu][Nn][Dd] {SQL_NEW_KEYWORD(SQL_TOKEN_FOUND); return SQL_TOKEN_FOUND; }
-[Ff][Rr][Oo][Mm] {SQL_NEW_KEYWORD(SQL_TOKEN_FROM); return SQL_TOKEN_FROM; }
-[Ff][Uu][Ll][Ll] {SQL_NEW_KEYWORD(SQL_TOKEN_FULL); return SQL_TOKEN_FULL; }
-FUSION {SQL_NEW_KEYWORD(SQL_TOKEN_FUSION); return SQL_TOKEN_FUSION; }
-
-[Gg][Rr][Aa][Nn][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_GRANT); return SQL_TOKEN_GRANT; }
-[Gg][Rr][Oo][Uu][Pp] {SQL_NEW_KEYWORD(SQL_TOKEN_GROUP); return SQL_TOKEN_GROUP; }
-
-[Hh][Aa][Vv][Ii][Nn][Gg] {SQL_NEW_KEYWORD(SQL_TOKEN_HAVING); return SQL_TOKEN_HAVING; }
-[Hh][Oo][Uu][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_HOUR); return SQL_TOKEN_HOUR; }
-
-[Ii][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_IN); return SQL_TOKEN_IN; }
-[Ii][Nn][Nn][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_INNER); return SQL_TOKEN_INNER; }
-[Ii][Nn][Ss][Ee][Rr][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_INSERT); return SQL_TOKEN_INSERT; }
-[Ii][Nn][Tt]([Ee][Gg][Ee][Rr])? {SQL_NEW_KEYWORD(SQL_TOKEN_INTEGER); return SQL_TOKEN_INTEGER; }
-[Ii][Nn][Tt][Ee][Rr][Ss][Ee][Cc][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_INTERSECT); return SQL_TOKEN_INTERSECT; }
-INTERSECTION {SQL_NEW_KEYWORD(SQL_TOKEN_INTERSECTION); return SQL_TOKEN_INTERSECTION; }
-[Ii][Nn][Tt][Oo] {SQL_NEW_KEYWORD(SQL_TOKEN_INTO); return SQL_TOKEN_INTO; }
-[Ii][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_IS); return SQL_TOKEN_IS; }
-
-[Jj][Oo][Ii][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_JOIN); return SQL_TOKEN_JOIN; }
-
-[Kk][Ee][Yy] {SQL_NEW_KEYWORD(SQL_TOKEN_KEY); return SQL_TOKEN_KEY; }
-
-[Ll][Cc][Aa][Ss][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_LCASE); return SQL_TOKEN_LCASE; }
-[Ll][Ee][Aa][Dd][Ii][Nn][Gg] {SQL_NEW_KEYWORD(SQL_TOKEN_LEADING); return SQL_TOKEN_LEADING; }
-[Ll][Ee][Ff][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_LEFT); return SQL_TOKEN_LEFT; }
-[Ll][Ee][Nn][Gg][Tt][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_LENGTH); return SQL_TOKEN_LENGTH; }
-[Ll][Ii][Kk][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_LIKE); return SQL_TOKEN_LIKE; }
-[Ll][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_LN); return SQL_TOKEN_LN; }
-[Ll][Oo][Cc][Aa][Ll] {SQL_NEW_KEYWORD(SQL_TOKEN_LOCAL); return SQL_TOKEN_LOCAL; }
-[Ll][Oo][Cc][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_LOCATE); return SQL_TOKEN_LOCATE; }
-[Ll][Oo][Gg] {SQL_NEW_KEYWORD(SQL_TOKEN_LOG); return SQL_TOKEN_LOG; }
-[Ll][Oo][Gg][Ff] {SQL_NEW_KEYWORD(SQL_TOKEN_LOGF); return SQL_TOKEN_LOGF; }
-[Ll][Oo][Gg]10 {SQL_NEW_KEYWORD(SQL_TOKEN_LOG10); return SQL_TOKEN_LOG10; }
-[Ll][Oo][Ww][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_LOWER); return SQL_TOKEN_LOWER; }
-[Ll][Tt][Rr][Ii][Mm] {SQL_NEW_KEYWORD(SQL_TOKEN_LTRIM); return SQL_TOKEN_LTRIM; }
-
-[Mm][Aa][Xx] {SQL_NEW_KEYWORD(SQL_TOKEN_MAX); return SQL_TOKEN_MAX; }
-[Mm][Ii][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_MIN); return SQL_TOKEN_MIN; }
-[Mm][Ii][Nn][Uu][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_MINUTE); return SQL_TOKEN_MINUTE; }
-[Mm][Oo][Dd] {SQL_NEW_KEYWORD(SQL_TOKEN_MOD); return SQL_TOKEN_MOD; }
-[Mm][Oo][Nn][Tt][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_MONTH); return SQL_TOKEN_MONTH; }
-[Mm][Oo][Nn][Tt][Hh][Nn][Aa][Mm][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_MONTHNAME); return SQL_TOKEN_MONTHNAME; }
-
-[Nn][Aa][Tt][Uu][Rr][Aa][LL] {SQL_NEW_KEYWORD(SQL_TOKEN_NATURAL); return SQL_TOKEN_NATURAL; }
-[Nn][Cc][Hh][Aa][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_NCHAR); return SQL_TOKEN_NCHAR; }
-[Nn][Oo][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_NOT); return SQL_TOKEN_NOT; }
-[Nn][Oo][Ww] {SQL_NEW_KEYWORD(SQL_TOKEN_NOW); return SQL_TOKEN_NOW; }
-[Nn][Uu][Ll][Ll] {SQL_NEW_KEYWORD(SQL_TOKEN_NULL); return SQL_TOKEN_NULL; }
-[Nn][Uu][Mm][Ee][Rr][Ii][Cc] {SQL_NEW_KEYWORD(SQL_TOKEN_NUMERIC); return SQL_TOKEN_NUMERIC; }
-
-[Oo][Cc][Tt][Ee][Tt]_[Ll][Ee][Nn][Gg][Tt][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_OCTET_LENGTH); return SQL_TOKEN_OCTET_LENGTH; }
-[Oo][Ff] {SQL_NEW_KEYWORD(SQL_TOKEN_OF); return SQL_TOKEN_OF; }
-[Oo][Jj] {SQL_NEW_KEYWORD(SQL_TOKEN_OJ); return SQL_TOKEN_OJ; }
-[Oo][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_ON); return SQL_TOKEN_ON; }
-[Oo][Pp][Tt][Ii][Oo][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_OPTION); return SQL_TOKEN_OPTION; }
-[Oo][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_OR); return SQL_TOKEN_OR; }
-[Oo][Rr][Dd][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_ORDER); return SQL_TOKEN_ORDER; }
-[Oo][Uu][Tt][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_OUTER); return SQL_TOKEN_OUTER; }
-
-[Pp][Ii] {SQL_NEW_KEYWORD(SQL_TOKEN_PI); return SQL_TOKEN_PI; }
-[Pp][Oo][Ss][Ii][Tt][Ii][Oo][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_POSITION); return SQL_TOKEN_POSITION; }
-[Pp][Oo][Ww][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_POWER); return SQL_TOKEN_POWER; }
-[Pp][Rr][Ee][Cc][Ii][Ss][Ii][Oo][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_PRECISION); return SQL_TOKEN_PRECISION; }
-[Pp][Rr][Ii][Mm][Aa][Rr][Yy] {SQL_NEW_KEYWORD(SQL_TOKEN_PRIMARY); return SQL_TOKEN_PRIMARY; }
-[Pp][Rr][Ii][Vv][Ii][Ll][Ee][Gg][Ee][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_PRIVILEGES); return SQL_TOKEN_PRIVILEGES; }
-[Pp][Rr][Oo][Cc][Ee][Dd][Uu][Rr][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_PROCEDURE); return SQL_TOKEN_PROCEDURE; }
-[Pp][Uu][Bb][Ll][Ii][Cc] {SQL_NEW_KEYWORD(SQL_TOKEN_PUBLIC); return SQL_TOKEN_PUBLIC; }
-
-[Qq][Uu][Aa][Rr][Tt][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_QUARTER); return SQL_TOKEN_QUARTER; }
-
-[Rr][Aa][Dd][Ii][Aa][Nn][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_RADIANS); return SQL_TOKEN_RADIANS; }
-[Rr][Aa][Nn][Dd] {SQL_NEW_KEYWORD(SQL_TOKEN_RAND); return SQL_TOKEN_RAND; }
-[Rr][Ee][Aa][Ll] {SQL_NEW_KEYWORD(SQL_TOKEN_REAL); return SQL_TOKEN_REAL; }
-[Rr][Ee][Ff][Ee][Rr][Ee][Nn][Cc][Ee][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_REFERENCES); return SQL_TOKEN_REFERENCES; }
-[Rr][Ee][Pp][Ee][Aa][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_REPEAT); return SQL_TOKEN_REPEAT; }
-[Rr][Ee][Pp][Ll][Aa][Cc][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_REPLACE); return SQL_TOKEN_REPLACE; }
-[Rr][Oo][Ll][Ll][Bb][Aa][Cc][Kk] {SQL_NEW_KEYWORD(SQL_TOKEN_ROLLBACK); return SQL_TOKEN_ROLLBACK; }
-[Rr][Oo][Uu][Nn][Dd] {SQL_NEW_KEYWORD(SQL_TOKEN_ROUND); return SQL_TOKEN_ROUND; }
-[Rr][Oo][Uu][Nn][Dd][Mm][Aa][Gg][Ii][Cc] {SQL_NEW_KEYWORD(SQL_TOKEN_ROUNDMAGIC); return SQL_TOKEN_ROUNDMAGIC; }
-[Rr][Ii][Gg][Hh][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_RIGHT); return SQL_TOKEN_RIGHT; }
-[Rr][Tt][Rr][Ii][Mm] {SQL_NEW_KEYWORD(SQL_TOKEN_RTRIM); return SQL_TOKEN_RTRIM; }
-
-[Ss][Cc][Hh][Ee][Mm][Aa] {SQL_NEW_KEYWORD(SQL_TOKEN_SCHEMA); return SQL_TOKEN_SCHEMA; }
-[Ss][Ee][Cc][Oo][Nn][Dd] {SQL_NEW_KEYWORD(SQL_TOKEN_SECOND); return SQL_TOKEN_SECOND; }
-[Ss][Ee][Ll][Ee][Cc][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_SELECT); return SQL_TOKEN_SELECT; }
-[Ss][Ee][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_SET); return SQL_TOKEN_SET; }
-[Ss][Ii][Zz][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_SIZE); return SQL_TOKEN_SIZE; }
-[Ss][Ii][Gg][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_SIGN); return SQL_TOKEN_SIGN; }
-[Ss][Ii][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_SIN); return SQL_TOKEN_SIN; }
-[Ss][Mm][Aa][Ll][Ll][Ii][Nn][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_SMALLINT); return SQL_TOKEN_SMALLINT; }
-[Ss][Oo][Mm][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_SOME); return SQL_TOKEN_SOME; }
-[Ss][Oo][Uu][Nn][Dd][Ee][Xx] {SQL_NEW_KEYWORD(SQL_TOKEN_SOUNDEX); return SQL_TOKEN_SOUNDEX; }
-[Ss][Pp][Aa][Cc][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_SPACE); return SQL_TOKEN_SPACE; }
-[Ss][Qq][Rr][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_SQRT); return SQL_TOKEN_SQRT; }
-STDDEV_POP {SQL_NEW_KEYWORD(SQL_TOKEN_STDDEV_POP); return SQL_TOKEN_STDDEV_POP; }
-STDDEV_SAMP {SQL_NEW_KEYWORD(SQL_TOKEN_STDDEV_SAMP); return SQL_TOKEN_STDDEV_SAMP; }
-[Ss][Uu][Bb][Ss][Tt][Rr][Ii][Nn][Gg] {SQL_NEW_KEYWORD(SQL_TOKEN_SUBSTRING); return SQL_TOKEN_SUBSTRING; }
-[Ss][Uu][Mm] {SQL_NEW_KEYWORD(SQL_TOKEN_SUM); return SQL_TOKEN_SUM; }
-
-[Tt][Aa][Bb][Ll][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_TABLE); return SQL_TOKEN_TABLE; }
-[Tt][Aa][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_TAN); return SQL_TOKEN_TAN; }
-[Tt][Ii][Mm][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_TIME); return SQL_TOKEN_TIME; }
-[Tt][Ii][Mm][Ee][Ss][Tt][Aa][Mm][Pp] {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMP); return SQL_TOKEN_TIMESTAMP; }
-[Tt][Ii][Mm][Ee][Ss][Tt][Aa][Mm][Pp][Aa][Dd][Dd] {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMPADD); return SQL_TOKEN_TIMESTAMPADD; }
-[Tt][Ii][Mm][Ee][Ss][Tt][Aa][Mm][Pp][Dd][Ii][Ff][Ff] {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMPDIFF); return SQL_TOKEN_TIMESTAMPDIFF; }
-[Tt][Ii][Mm][Ee][Vv][Aa][Ll][Uu][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_TIMEVALUE); return SQL_TOKEN_TIMEVALUE; }
-[Tt][Ii][Mm][Ee][Zz][Oo][Nn][Ee]_[Hh][Oo][Uu][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_TIMEZONE_HOUR); return SQL_TOKEN_TIMEZONE_HOUR; }
-[Tt][Ii][Mm][Ee][Zz][Oo][Nn][Ee]_[Mm][Ii][Nn][Uu][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_TIMEZONE_MINUTE); return SQL_TOKEN_TIMEZONE_MINUTE; }
-[Tt][Oo] {SQL_NEW_KEYWORD(SQL_TOKEN_TO); return SQL_TOKEN_TO; }
-[Tt][Rr][Aa][Ii][Ll][Ii][Nn][Gg] {SQL_NEW_KEYWORD(SQL_TOKEN_TRAILING); return SQL_TOKEN_TRAILING; }
-[Tt][Rr][Aa][Nn][Ss][Ll][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_TRANSLATE); return SQL_TOKEN_TRANSLATE; }
-[Tt][Rr][Ii][Mm] {SQL_NEW_KEYWORD(SQL_TOKEN_TRIM); return SQL_TOKEN_TRIM; }
-[Tt][Rr][Uu][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_TRUE); return SQL_TOKEN_TRUE; }
-[Tt][Rr][Uu][Nn][Cc][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_TRUNCATE); return SQL_TOKEN_TRUNCATE; }
-[Tt][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_TS); return SQL_TOKEN_TS; }
-[Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_T); return SQL_TOKEN_T; }
-
-[Uu][Cc][Aa][Ss][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_UCASE); return SQL_TOKEN_UCASE; }
-[Uu][Nn][Ii][Oo][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_UNION); return SQL_TOKEN_UNION; }
-[Uu][Nn][Ii][Qq][Uu][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_UNIQUE); return SQL_TOKEN_UNIQUE; }
-[Uu][Nn][Kk][Nn][Oo][Ww][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_UNKNOWN); return SQL_TOKEN_UNKNOWN; }
-[Uu][Pp][Dd][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_UPDATE); return SQL_TOKEN_UPDATE; }
-[Uu][Pp][Pp][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_UPPER); return SQL_TOKEN_UPPER; }
-[Uu][Ss][Aa][Gg][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_USAGE); return SQL_TOKEN_USAGE; }
-[Uu][Ss][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_USER); return SQL_TOKEN_USER; }
-[Uu][Ss][Ii][Nn][Gg] {SQL_NEW_KEYWORD(SQL_TOKEN_USING); return SQL_TOKEN_USING; }
-
-VAR_POP {SQL_NEW_KEYWORD(SQL_TOKEN_VAR_POP); return SQL_TOKEN_VAR_POP; }
-VAR_SAMP {SQL_NEW_KEYWORD(SQL_TOKEN_VAR_SAMP); return SQL_TOKEN_VAR_SAMP; }
-[Vv][Aa][Ll][Uu][Ee][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_VALUES); return SQL_TOKEN_VALUES; }
-[Vv][Ii][Ee][Ww] {SQL_NEW_KEYWORD(SQL_TOKEN_VIEW); return SQL_TOKEN_VIEW; }
-
-[Ww][Ee][Ee][Kk] {SQL_NEW_KEYWORD(SQL_TOKEN_WEEK); return SQL_TOKEN_WEEK; }
-[Ww][Hh][Ee][Rr][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_WHERE); return SQL_TOKEN_WHERE; }
-[Ww][Ii][Tt][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_WITH); return SQL_TOKEN_WITH; }
-[Ww][Oo][Rr][Kk] {SQL_NEW_KEYWORD(SQL_TOKEN_WORK); return SQL_TOKEN_WORK; }
-
-[Yy][Ee][Aa][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_YEAR); return SQL_TOKEN_YEAR; }
-
-[Zz][Oo][Nn][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_ZONE); return SQL_TOKEN_ZONE; }
+ABS {SQL_NEW_KEYWORD(SQL_TOKEN_ABS); }
+ACOS {SQL_NEW_KEYWORD(SQL_TOKEN_ACOS); }
+AFTER {SQL_NEW_KEYWORD(SQL_TOKEN_AFTER); }
+ALL {SQL_NEW_KEYWORD(SQL_TOKEN_ALL); }
+ALTER {SQL_NEW_KEYWORD(SQL_TOKEN_ALTER); }
+AND {SQL_NEW_KEYWORD(SQL_TOKEN_AND); }
+ANY {SQL_NEW_KEYWORD(SQL_TOKEN_ANY); }
+ARRAY_AGG {SQL_NEW_KEYWORD(SQL_TOKEN_ARRAY_AGG); }
+AS {SQL_NEW_KEYWORD(SQL_TOKEN_AS); }
+ASC {SQL_NEW_KEYWORD(SQL_TOKEN_ASC); }
+ASCII {SQL_NEW_KEYWORD(SQL_TOKEN_ASCII); }
+ASIN {SQL_NEW_KEYWORD(SQL_TOKEN_ASIN); }
+AT {SQL_NEW_KEYWORD(SQL_TOKEN_AT); }
+ATAN {SQL_NEW_KEYWORD(SQL_TOKEN_ATAN); }
+ATAN2 {SQL_NEW_KEYWORD(SQL_TOKEN_ATAN2); }
+ATOMIC {SQL_NEW_KEYWORD(SQL_TOKEN_ATOMIC); }
+AUTHORIZATION {SQL_NEW_KEYWORD(SQL_TOKEN_AUTHORIZATION); }
+AVG {SQL_NEW_KEYWORD(SQL_TOKEN_AVG); }
+
+BEFORE {SQL_NEW_KEYWORD(SQL_TOKEN_BEFORE); }
+BEGIN {SQL_NEW_KEYWORD(SQL_TOKEN_BEGIN); }
+BETWEEN {SQL_NEW_KEYWORD(SQL_TOKEN_BETWEEN); }
+BIGINT {SQL_NEW_KEYWORD(SQL_TOKEN_BIGINT); }
+BINARY {SQL_NEW_KEYWORD(SQL_TOKEN_BINARY); }
+BIT {SQL_NEW_KEYWORD(SQL_TOKEN_BIT); }
+BIT_LENGTH {SQL_NEW_KEYWORD(SQL_TOKEN_BIT_LENGTH); }
+BLOB {SQL_NEW_KEYWORD(SQL_TOKEN_BLOB); }
+BOTH {SQL_NEW_KEYWORD(SQL_TOKEN_BOTH); }
+BY {SQL_NEW_KEYWORD(SQL_TOKEN_BY); }
+
+CALL {SQL_NEW_KEYWORD(SQL_TOKEN_CALL); }
+CASE {SQL_NEW_KEYWORD(SQL_TOKEN_CASE); }
+CAST {SQL_NEW_KEYWORD(SQL_TOKEN_CAST); }
+CEILING {SQL_NEW_KEYWORD(SQL_TOKEN_CEILING); }
+CHAR {SQL_NEW_KEYWORD(SQL_TOKEN_CHAR); }
+CHARACTER {SQL_NEW_KEYWORD(SQL_TOKEN_CHARACTER); }
+CHAR(ACTER)?_LENGTH {SQL_NEW_KEYWORD(SQL_TOKEN_CHAR_LENGTH); }
+CHECK {SQL_NEW_KEYWORD(SQL_TOKEN_CHECK); }
+CLOB {SQL_NEW_KEYWORD(SQL_TOKEN_CLOB); }
+COALESCE {SQL_NEW_KEYWORD(SQL_TOKEN_COALESCE); }
+COLLATE {SQL_NEW_KEYWORD(SQL_TOKEN_COLLATE); }
+COLLECT {SQL_NEW_KEYWORD(SQL_TOKEN_COLLECT); }
+COMMIT {SQL_NEW_KEYWORD(SQL_TOKEN_COMMIT); }
+CONCAT {SQL_NEW_KEYWORD(SQL_TOKEN_CONCAT); }
+CONTINUE {SQL_NEW_KEYWORD(SQL_TOKEN_CONTINUE); }
+CONVERT {SQL_NEW_KEYWORD(SQL_TOKEN_CONVERT); }
+COS {SQL_NEW_KEYWORD(SQL_TOKEN_COS); }
+COT {SQL_NEW_KEYWORD(SQL_TOKEN_COT); }
+COUNT {SQL_NEW_KEYWORD(SQL_TOKEN_COUNT); }
+CREATE {SQL_NEW_KEYWORD(SQL_TOKEN_CREATE); }
+CROSS {SQL_NEW_KEYWORD(SQL_TOKEN_CROSS); }
+CUME_RANK {SQL_NEW_KEYWORD(SQL_TOKEN_CUME_DIST); }
+CURRENT {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT); }
+CURRENT_DATE {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_DATE); }
+CURRENT_CATALOG {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_CATALOG); }
+CURRENT_DEFAULT_TRANSFORM_GROUP {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_DEFAULT_TRANSFORM_GROUP); }
+CURRENT_PATH {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_PATH); }
+CURRENT_ROLE {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_ROLE); }
+CURRENT_SCHEMA {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_SCHEMA); }
+CURRENT_USER {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_USER); }
+CURDATE {SQL_NEW_KEYWORD(SQL_TOKEN_CURDATE); }
+CURRENT_TIME {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_TIME); }
+CURTIME {SQL_NEW_KEYWORD(SQL_TOKEN_CURTIME); }
+CURRENT_TIMESTAMP {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_TIMESTAMP); }
+CURSOR {SQL_NEW_KEYWORD(SQL_TOKEN_CURSOR); }
+
+D {SQL_NEW_KEYWORD(SQL_TOKEN_D); }
+DATE {SQL_NEW_KEYWORD(SQL_TOKEN_DATE); }
+DATEDIFF {SQL_NEW_KEYWORD(SQL_TOKEN_DATEDIFF); }
+DATEVALUE {SQL_NEW_KEYWORD(SQL_TOKEN_DATEVALUE); }
+DAY {SQL_NEW_KEYWORD(SQL_TOKEN_DAY); }
+DAYNAME {SQL_NEW_KEYWORD(SQL_TOKEN_DAYNAME); }
+DAYOFMONTH {SQL_NEW_KEYWORD(SQL_TOKEN_DAYOFMONTH); }
+DAYOFWEEK {SQL_NEW_KEYWORD(SQL_TOKEN_DAYOFWEEK); }
+DAYOFYEAR {SQL_NEW_KEYWORD(SQL_TOKEN_DAYOFYEAR); }
+DEC {SQL_NEW_KEYWORD(SQL_TOKEN_DEC); }
+DECIMAL {SQL_NEW_KEYWORD(SQL_TOKEN_DECIMAL); }
+DECLARE {SQL_NEW_KEYWORD(SQL_TOKEN_DECLARE); }
+DEFAULT {SQL_NEW_KEYWORD(SQL_TOKEN_DEFAULT); }
+DEGREES {SQL_NEW_KEYWORD(SQL_TOKEN_DEGREES); }
+DELETE {SQL_NEW_KEYWORD(SQL_TOKEN_DELETE); }
+DENSE_RANK {SQL_NEW_KEYWORD(SQL_TOKEN_DENSE_RANK); }
+DESC {SQL_NEW_KEYWORD(SQL_TOKEN_DESC); }
+DIFFERENCE {SQL_NEW_KEYWORD(SQL_TOKEN_DIFFERENCE); }
+DISTINCT {SQL_NEW_KEYWORD(SQL_TOKEN_DISTINCT); }
+DOUBLE {SQL_NEW_KEYWORD(SQL_TOKEN_DOUBLE); }
+DROP {SQL_NEW_KEYWORD(SQL_TOKEN_DROP); }
+
+EACH {SQL_NEW_KEYWORD(SQL_TOKEN_EACH); }
+ELSE {SQL_NEW_KEYWORD(SQL_TOKEN_ELSE); }
+END {SQL_NEW_KEYWORD(SQL_TOKEN_END); }
+EVERY {SQL_NEW_KEYWORD(SQL_TOKEN_EVERY); }
+ESCAPE {SQL_NEW_KEYWORD(SQL_TOKEN_ESCAPE); }
+EXCEPT {SQL_NEW_KEYWORD(SQL_TOKEN_EXCEPT); }
+EXISTS {SQL_NEW_KEYWORD(SQL_TOKEN_EXISTS); }
+EXP {SQL_NEW_KEYWORD(SQL_TOKEN_EXP); }
+EXTRACT {SQL_NEW_KEYWORD(SQL_TOKEN_EXTRACT); }
+
+FALSE {SQL_NEW_KEYWORD(SQL_TOKEN_FALSE); }
+FETCH {SQL_NEW_KEYWORD(SQL_TOKEN_FETCH); }
+FLOAT {SQL_NEW_KEYWORD(SQL_TOKEN_FLOAT); }
+FLOOR {SQL_NEW_KEYWORD(SQL_TOKEN_FLOOR); }
+FN {SQL_NEW_KEYWORD(SQL_TOKEN_FN); }
+FOR {SQL_NEW_KEYWORD(SQL_TOKEN_FOR); }
+FOREIGN {SQL_NEW_KEYWORD(SQL_TOKEN_FOREIGN); }
+FOUND {SQL_NEW_KEYWORD(SQL_TOKEN_FOUND); }
+FROM {SQL_NEW_KEYWORD(SQL_TOKEN_FROM); }
+FULL {SQL_NEW_KEYWORD(SQL_TOKEN_FULL); }
+FUSION {SQL_NEW_KEYWORD(SQL_TOKEN_FUSION); }
+
+GRANT {SQL_NEW_KEYWORD(SQL_TOKEN_GRANT); }
+GROUP {SQL_NEW_KEYWORD(SQL_TOKEN_GROUP); }
+
+HAVING {SQL_NEW_KEYWORD(SQL_TOKEN_HAVING); }
+HOUR {SQL_NEW_KEYWORD(SQL_TOKEN_HOUR); }
+
+IN {SQL_NEW_KEYWORD(SQL_TOKEN_IN); }
+INNER {SQL_NEW_KEYWORD(SQL_TOKEN_INNER); }
+INSERT {SQL_NEW_KEYWORD(SQL_TOKEN_INSERT); }
+INSTEAD {SQL_NEW_KEYWORD(SQL_TOKEN_INSTEAD); }
+INT(EGER)? {SQL_NEW_KEYWORD(SQL_TOKEN_INTEGER); }
+INTERSECT {SQL_NEW_KEYWORD(SQL_TOKEN_INTERSECT); }
+INTERVAL {SQL_NEW_KEYWORD(SQL_TOKEN_INTERVAL); }
+INTERSECTION {SQL_NEW_KEYWORD(SQL_TOKEN_INTERSECTION); }
+INTO {SQL_NEW_KEYWORD(SQL_TOKEN_INTO); }
+IS {SQL_NEW_KEYWORD(SQL_TOKEN_IS); }
+
+JOIN {SQL_NEW_KEYWORD(SQL_TOKEN_JOIN); }
+
+KEY {SQL_NEW_KEYWORD(SQL_TOKEN_KEY); }
+
+LARGE {SQL_NEW_KEYWORD(SQL_TOKEN_LARGE); }
+LCASE {SQL_NEW_KEYWORD(SQL_TOKEN_LCASE); }
+LEADING {SQL_NEW_KEYWORD(SQL_TOKEN_LEADING); }
+LEFT {SQL_NEW_KEYWORD(SQL_TOKEN_LEFT); }
+LENGTH {SQL_NEW_KEYWORD(SQL_TOKEN_LENGTH); }
+LIKE {SQL_NEW_KEYWORD(SQL_TOKEN_LIKE); }
+LN {SQL_NEW_KEYWORD(SQL_TOKEN_LN); }
+LOCAL {SQL_NEW_KEYWORD(SQL_TOKEN_LOCAL); }
+LOCATE {SQL_NEW_KEYWORD(SQL_TOKEN_LOCATE); }
+LOG {SQL_NEW_KEYWORD(SQL_TOKEN_LOG); }
+LOGF {SQL_NEW_KEYWORD(SQL_TOKEN_LOGF); }
+LOG10 {SQL_NEW_KEYWORD(SQL_TOKEN_LOG10); }
+LOWER {SQL_NEW_KEYWORD(SQL_TOKEN_LOWER); }
+LTRIM {SQL_NEW_KEYWORD(SQL_TOKEN_LTRIM); }
+
+MAX {SQL_NEW_KEYWORD(SQL_TOKEN_MAX); }
+MIN {SQL_NEW_KEYWORD(SQL_TOKEN_MIN); }
+MINUTE {SQL_NEW_KEYWORD(SQL_TOKEN_MINUTE); }
+MOD {SQL_NEW_KEYWORD(SQL_TOKEN_MOD); }
+MONTH {SQL_NEW_KEYWORD(SQL_TOKEN_MONTH); }
+MONTHNAME {SQL_NEW_KEYWORD(SQL_TOKEN_MONTHNAME); }
+
+NATIONAL {SQL_NEW_KEYWORD(SQL_TOKEN_NATIONAL); }
+NATURAL {SQL_NEW_KEYWORD(SQL_TOKEN_NATURAL); }
+NCHAR {SQL_NEW_KEYWORD(SQL_TOKEN_NCHAR); }
+NCLOB {SQL_NEW_KEYWORD(SQL_TOKEN_NCLOB); }
+NEW {SQL_NEW_KEYWORD(SQL_TOKEN_NEW); }
+NOT {SQL_NEW_KEYWORD(SQL_TOKEN_NOT); }
+NOW {SQL_NEW_KEYWORD(SQL_TOKEN_NOW); }
+NULL {SQL_NEW_KEYWORD(SQL_TOKEN_NULL); }
+NULLIF {SQL_NEW_KEYWORD(SQL_TOKEN_NULLIF); }
+NUMERIC {SQL_NEW_KEYWORD(SQL_TOKEN_NUMERIC); }
+
+OBJECT {SQL_NEW_KEYWORD(SQL_TOKEN_OBJECT); }
+OCTET_LENGTH {SQL_NEW_KEYWORD(SQL_TOKEN_OCTET_LENGTH); }
+OF {SQL_NEW_KEYWORD(SQL_TOKEN_OF); }
+OJ {SQL_NEW_KEYWORD(SQL_TOKEN_OJ); }
+OLD {SQL_NEW_KEYWORD(SQL_TOKEN_OLD); }
+ON {SQL_NEW_KEYWORD(SQL_TOKEN_ON); }
+OPTION {SQL_NEW_KEYWORD(SQL_TOKEN_OPTION); }
+OR {SQL_NEW_KEYWORD(SQL_TOKEN_OR); }
+ORDER {SQL_NEW_KEYWORD(SQL_TOKEN_ORDER); }
+OUTER {SQL_NEW_KEYWORD(SQL_TOKEN_OUTER); }
+
+PERCENT_RANK {SQL_NEW_KEYWORD(SQL_TOKEN_PERCENT_RANK); }
+PERCENTILE_CONT {SQL_NEW_KEYWORD(SQL_TOKEN_PERCENTILE_CONT); }
+PERCENTILE_DISC {SQL_NEW_KEYWORD(SQL_TOKEN_PERCENTILE_DISC); }
+PI {SQL_NEW_KEYWORD(SQL_TOKEN_PI); }
+POSITION {SQL_NEW_KEYWORD(SQL_TOKEN_POSITION); }
+POWER {SQL_NEW_KEYWORD(SQL_TOKEN_POWER); }
+PRECISION {SQL_NEW_KEYWORD(SQL_TOKEN_PRECISION); }
+PRIMARY {SQL_NEW_KEYWORD(SQL_TOKEN_PRIMARY); }
+PRIVILEGES {SQL_NEW_KEYWORD(SQL_TOKEN_PRIVILEGES); }
+PROCEDURE {SQL_NEW_KEYWORD(SQL_TOKEN_PROCEDURE); }
+PUBLIC {SQL_NEW_KEYWORD(SQL_TOKEN_PUBLIC); }
+
+QUARTER {SQL_NEW_KEYWORD(SQL_TOKEN_QUARTER); }
+
+RADIANS {SQL_NEW_KEYWORD(SQL_TOKEN_RADIANS); }
+RAND {SQL_NEW_KEYWORD(SQL_TOKEN_RAND); }
+RANK {SQL_NEW_KEYWORD(SQL_TOKEN_RANK); }
+REAL {SQL_NEW_KEYWORD(SQL_TOKEN_REAL); }
+REFERENCES {SQL_NEW_KEYWORD(SQL_TOKEN_REFERENCES); }
+REFERENCING {SQL_NEW_KEYWORD(SQL_TOKEN_REFERENCING); }
+REPEAT {SQL_NEW_KEYWORD(SQL_TOKEN_REPEAT); }
+REPLACE {SQL_NEW_KEYWORD(SQL_TOKEN_REPLACE); }
+ROLLBACK {SQL_NEW_KEYWORD(SQL_TOKEN_ROLLBACK); }
+ROUND {SQL_NEW_KEYWORD(SQL_TOKEN_ROUND); }
+ROUNDMAGIC {SQL_NEW_KEYWORD(SQL_TOKEN_ROUNDMAGIC); }
+ROW {SQL_NEW_KEYWORD(SQL_TOKEN_ROW); }
+RIGHT {SQL_NEW_KEYWORD(SQL_TOKEN_RIGHT); }
+RTRIM {SQL_NEW_KEYWORD(SQL_TOKEN_RTRIM); }
+
+SCHEMA {SQL_NEW_KEYWORD(SQL_TOKEN_SCHEMA); }
+SECOND {SQL_NEW_KEYWORD(SQL_TOKEN_SECOND); }
+SELECT {SQL_NEW_KEYWORD(SQL_TOKEN_SELECT); }
+SET {SQL_NEW_KEYWORD(SQL_TOKEN_SET); }
+SIZE {SQL_NEW_KEYWORD(SQL_TOKEN_SIZE); }
+SIGN {SQL_NEW_KEYWORD(SQL_TOKEN_SIGN); }
+SIN {SQL_NEW_KEYWORD(SQL_TOKEN_SIN); }
+SMALLINT {SQL_NEW_KEYWORD(SQL_TOKEN_SMALLINT); }
+SOME {SQL_NEW_KEYWORD(SQL_TOKEN_SOME); }
+SOUNDEX {SQL_NEW_KEYWORD(SQL_TOKEN_SOUNDEX); }
+SPACE {SQL_NEW_KEYWORD(SQL_TOKEN_SPACE); }
+SQRT {SQL_NEW_KEYWORD(SQL_TOKEN_SQRT); }
+STDDEV_POP {SQL_NEW_KEYWORD(SQL_TOKEN_STDDEV_POP); }
+STDDEV_SAMP {SQL_NEW_KEYWORD(SQL_TOKEN_STDDEV_SAMP); }
+STATEMENT {SQL_NEW_KEYWORD(SQL_TOKEN_STATEMENT); }
+SUBSTRING {SQL_NEW_KEYWORD(SQL_TOKEN_SUBSTRING); }
+SUM {SQL_NEW_KEYWORD(SQL_TOKEN_SUM); }
+SESSION_USER {SQL_NEW_KEYWORD(SQL_TOKEN_SESSION_USER); }
+SYSTEM_USER {SQL_NEW_KEYWORD(SQL_TOKEN_SYSTEM_USER); }
+
+TABLE {SQL_NEW_KEYWORD(SQL_TOKEN_TABLE); }
+TAN {SQL_NEW_KEYWORD(SQL_TOKEN_TAN); }
+THEN {SQL_NEW_KEYWORD(SQL_TOKEN_THEN); }
+TIME {SQL_NEW_KEYWORD(SQL_TOKEN_TIME); }
+TIMESTAMP {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMP); }
+TIMESTAMPADD {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMPADD); }
+TIMESTAMPDIFF {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMPDIFF); }
+TIMEVALUE {SQL_NEW_KEYWORD(SQL_TOKEN_TIMEVALUE); }
+TIMEZONE_HOUR {SQL_NEW_KEYWORD(SQL_TOKEN_TIMEZONE_HOUR); }
+TIMEZONE_MINUTE {SQL_NEW_KEYWORD(SQL_TOKEN_TIMEZONE_MINUTE); }
+TO {SQL_NEW_KEYWORD(SQL_TOKEN_TO); }
+TRAILING {SQL_NEW_KEYWORD(SQL_TOKEN_TRAILING); }
+TRANSLATE {SQL_NEW_KEYWORD(SQL_TOKEN_TRANSLATE); }
+TRIGGER {SQL_NEW_KEYWORD(SQL_TOKEN_TRIGGER); }
+TRIM {SQL_NEW_KEYWORD(SQL_TOKEN_TRIM); }
+TRUE {SQL_NEW_KEYWORD(SQL_TOKEN_TRUE); }
+TRUNCATE {SQL_NEW_KEYWORD(SQL_TOKEN_TRUNCATE); }
+TS {SQL_NEW_KEYWORD(SQL_TOKEN_TS); }
+T {SQL_NEW_KEYWORD(SQL_TOKEN_T); }
+
+UCASE {SQL_NEW_KEYWORD(SQL_TOKEN_UCASE); }
+UNION {SQL_NEW_KEYWORD(SQL_TOKEN_UNION); }
+UNIQUE {SQL_NEW_KEYWORD(SQL_TOKEN_UNIQUE); }
+UNKNOWN {SQL_NEW_KEYWORD(SQL_TOKEN_UNKNOWN); }
+UPDATE {SQL_NEW_KEYWORD(SQL_TOKEN_UPDATE); }
+UPPER {SQL_NEW_KEYWORD(SQL_TOKEN_UPPER); }
+USAGE {SQL_NEW_KEYWORD(SQL_TOKEN_USAGE); }
+USER {SQL_NEW_KEYWORD(SQL_TOKEN_USER); }
+USING {SQL_NEW_KEYWORD(SQL_TOKEN_USING); }
+
+VARBINARY {SQL_NEW_KEYWORD(SQL_TOKEN_VARBINARY); }
+VARCHAR {SQL_NEW_KEYWORD(SQL_TOKEN_VARCHAR); }
+VARYING {SQL_NEW_KEYWORD(SQL_TOKEN_VARYING); }
+VAR_POP {SQL_NEW_KEYWORD(SQL_TOKEN_VAR_POP); }
+VAR_SAMP {SQL_NEW_KEYWORD(SQL_TOKEN_VAR_SAMP); }
+VALUE {SQL_NEW_KEYWORD(SQL_TOKEN_VALUE); }
+VALUES {SQL_NEW_KEYWORD(SQL_TOKEN_VALUES); }
+VIEW {SQL_NEW_KEYWORD(SQL_TOKEN_VIEW); }
+
+WEEK {SQL_NEW_KEYWORD(SQL_TOKEN_WEEK); }
+WHEN {SQL_NEW_KEYWORD(SQL_TOKEN_WHEN); }
+WHERE {SQL_NEW_KEYWORD(SQL_TOKEN_WHERE); }
+WITH {SQL_NEW_KEYWORD(SQL_TOKEN_WITH); }
+WITHIN {SQL_NEW_KEYWORD(SQL_TOKEN_WITHIN); }
+WITHOUT {SQL_NEW_KEYWORD(SQL_TOKEN_WITHOUT); }
+WORK {SQL_NEW_KEYWORD(SQL_TOKEN_WORK); }
+
+YEAR {SQL_NEW_KEYWORD(SQL_TOKEN_YEAR); }
+
+ZONE {SQL_NEW_KEYWORD(SQL_TOKEN_ZONE); }
"<" { SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_LESS);return SQL_LESS;}
">" { SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_GREAT);return SQL_GREAT;}
@@ -365,31 +410,31 @@ VAR_SAMP {SQL_NEW_KEYWORD(SQL_TOKEN_VAR_S
<SQL>([0-9]+) |
<SQL>([0-9]+"."[0-9]*) |
-<SQL>("."[0-9]*) {SQL_NEW_INTNUM; return SQL_TOKEN_INTNUM;}
+<SQL>("."[0-9]*) {SQL_NEW_INTNUM; }
<SQL>[0-9]+[eE][+-]?[0-9]+ |
<SQL>[0-9]+"."[0-9]*[eE][+-]?[0-9]+ |
-<SQL>"."[0-9]*[eE][+-]?[0-9]+ {SQL_NEW_APPROXNUM; return SQL_TOKEN_APPROXNUM; }
+<SQL>"."[0-9]*[eE][+-]?[0-9]+ {SQL_NEW_APPROXNUM; }
<PREDICATE_GER,PREDICATE_ENG,DATE>[A-Za-z\200-\277\300-\337\340-\357\360-\367\370-\373\374-\375][A-Za-z0-9_%.,*?\200-\277\300-\337\340-\357\360-\367\370-\373\374-\375]* {return gatherNamePre(SQLyytext);}
-<PREDICATE_GER,PREDICATE_ENG>([0-9]+) {SQL_NEW_INTNUM; return SQL_TOKEN_INTNUM;}
-<PREDICATE_ENG>([0-9]{1,3}(","[0-9]{3})+) {SQL_NEW_INTNUM; return SQL_TOKEN_INTNUM;}
-<PREDICATE_GER>([0-9]{1,3}("."[0-9]{3})+) {SQL_NEW_INTNUM; return SQL_TOKEN_INTNUM;}
+<PREDICATE_GER,PREDICATE_ENG>([0-9]+) {SQL_NEW_INTNUM; }
+<PREDICATE_ENG>([0-9]{1,3}(","[0-9]{3})+) {SQL_NEW_INTNUM; }
+<PREDICATE_GER>([0-9]{1,3}("."[0-9]{3})+) {SQL_NEW_INTNUM; }
<PREDICATE_ENG>([0-9]+"."[0-9]+) |
<PREDICATE_ENG>([0-9]{1,3}(","[0-9]{3})+"."[0-9]+) |
-<PREDICATE_ENG>("."[0-9]+) {SQL_NEW_APPROXNUM; return SQL_TOKEN_APPROXNUM; }
+<PREDICATE_ENG>("."[0-9]+) {SQL_NEW_APPROXNUM; }
<PREDICATE_ENG>[0-9]+[eE][+-]?[0-9]+ |
<PREDICATE_ENG>[0-9]+"."[0-9]*[eE][+-]?[0-9]+ |
-<PREDICATE_ENG>"."[0-9]*[eE][+-]?[0-9]+ {SQL_NEW_APPROXNUM; return SQL_TOKEN_APPROXNUM; }
+<PREDICATE_ENG>"."[0-9]*[eE][+-]?[0-9]+ {SQL_NEW_APPROXNUM; }
<PREDICATE_GER>([0-9]+","[0-9]+) |
<PREDICATE_GER>([0-9]{1,3}("."[0-9]{3})+","[0-9]+) |
-<PREDICATE_GER>(","[0-9]+) {SQL_NEW_APPROXNUM; return SQL_TOKEN_APPROXNUM; }
+<PREDICATE_GER>(","[0-9]+) {SQL_NEW_APPROXNUM; }
<PREDICATE_GER>[0-9]+[eE][+-]?[0-9]+ |
<PREDICATE_GER>[0-9]+","[0-9]*[eE][+-]?[0-9]+ |
-<PREDICATE_GER>","[0-9]*[eE][+-]?[0-9]+ {SQL_NEW_APPROXNUM; return SQL_TOKEN_APPROXNUM; }
+<PREDICATE_GER>","[0-9]*[eE][+-]?[0-9]+ {SQL_NEW_APPROXNUM; }
<PREDICATE_GER,PREDICATE_ENG>[0-9.,][A-Za-z0-9_.,%]* {return gatherNamePre(SQLyytext);}
@@ -403,7 +448,7 @@ VAR_SAMP {SQL_NEW_KEYWORD(SQL_TOKEN_VAR_S
<PREDICATE_GER,PREDICATE_ENG,DATE># { return gatherString('#' ,2); }
<DATE>[0-9]{1,4}[^ ]*[0-9] |
-<DATE>[0-9]{1,4}[^ ]*[0-9][ ][0-9]{1,4}[^ ]*[0-9] { SQL_NEW_DATE; return SQL_TOKEN_ACCESS_DATE;}
+<DATE>[0-9]{1,4}[^ ]*[0-9][ ][0-9]{1,4}[^ ]*[0-9] { SQL_NEW_DATE; }
<STRING>["-""+""*""/"":""("")"",""."";""?""{""}"] { return SQLyytext[0]; } /* */
<STRING>"[" { return gatherString(']' ,0); }
@@ -464,7 +509,7 @@ sal_Int32 gatherString( sal_Int32 delim, sal_Int32 nTyp)
{
case 0:
SQL_NEW_NODE(::rtl::OStringToOUString(sBuffer.makeStringAndClear(),RTL_TEXTENCODING_UTF8), SQL_NODE_NAME);
- return SQL_TOKEN_NAME;
+ return SQL_TOKEN_NAME;
case 1:
SQL_NEW_NODE(::rtl::OStringToOUString(sBuffer.makeStringAndClear(),RTL_TEXTENCODING_UTF8), SQL_NODE_STRING);
return SQL_TOKEN_STRING;
@@ -487,7 +532,7 @@ sal_Int32 gatherString( sal_Int32 delim, sal_Int32 nTyp)
}
}
YY_FATAL_ERROR("Unterminated name string");
- return SQL_TOKEN_INVALIDSYMBOL;
+ return SQL_TOKEN_INVALIDSYMBOL;
}
sal_Int32 mapEnumToToken(IParseContext::InternationalKeyCode _eKeyCode )
@@ -562,10 +607,10 @@ sal_Int32 gatherName(const sal_Char* text)
case IParseContext::KEY_INTERSECTION:
nToken = mapEnumToToken(eKeyCode);
SQL_NEW_KEYWORD(nToken);
- return nToken;
+ break;
default:
SQL_NEW_NODE(::rtl::OUString(text,strlen(text),RTL_TEXTENCODING_UTF8), SQL_NODE_NAME);
- return SQL_TOKEN_NAME;
+ return SQL_TOKEN_NAME;
}
}
/**
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index feecc26a4052..e1d805e9a1e5 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -50,6 +50,10 @@
#include "diagnose_ex.h"
#include <rtl/logfile.hxx>
+#define SQL_ISRULEOR2(pParseNode, e1,e2) ((pParseNode)->isRule() && (\
+ (pParseNode)->getRuleID() == OSQLParser::RuleID(OSQLParseNode::e1) || \
+ (pParseNode)->getRuleID() == OSQLParser::RuleID(OSQLParseNode::e2)))
+
using namespace ::comphelper;
using namespace ::connectivity;
using namespace ::connectivity::sdbcx;
@@ -67,6 +71,7 @@ namespace connectivity
{
struct OSQLParseTreeIteratorImpl
{
+ ::std::vector< TNodePair > m_aJoinConditions;
Reference< XConnection > m_xConnection;
Reference< XDatabaseMetaData > m_xDatabaseMetaData;
Reference< XNameAccess > m_xTableContainer;
@@ -476,7 +481,42 @@ void OSQLParseTreeIterator::traverseOneTableName( OSQLTables& _rTables,const OSQ
if ( aTable.is() )
_rTables[ aTableRange ] = aTable;
}
-
+//-----------------------------------------------------------------------------
+void OSQLParseTreeIterator::impl_fillJoinConditions(const OSQLParseNode* i_pJoinCondition)
+{
+ if (i_pJoinCondition->count() == 3 && // Ausdruck is geklammert
+ SQL_ISPUNCTUATION(i_pJoinCondition->getChild(0),"(") &&
+ SQL_ISPUNCTUATION(i_pJoinCondition->getChild(2),")"))
+ {
+ impl_fillJoinConditions(i_pJoinCondition->getChild(1));
+ }
+ else if (SQL_ISRULEOR2(i_pJoinCondition,search_condition,boolean_term) && // AND/OR-Verknuepfung:
+ i_pJoinCondition->count() == 3)
+ {
+ // nur AND Verknüpfung zulassen
+ if ( SQL_ISTOKEN(i_pJoinCondition->getChild(1),AND) )
+ {
+ impl_fillJoinConditions(i_pJoinCondition->getChild(0));
+ impl_fillJoinConditions(i_pJoinCondition->getChild(1));
+ }
+ }
+ else if (SQL_ISRULE(i_pJoinCondition,comparison_predicate))
+ {
+ // only the comparison of columns is allowed
+ OSL_ENSURE(i_pJoinCondition->count() == 3,"OQueryDesignView::InsertJoinConnection: Fehler im Parse Tree");
+ if (SQL_ISRULE(i_pJoinCondition->getChild(0),column_ref) &&
+ SQL_ISRULE(i_pJoinCondition->getChild(2),column_ref) &&
+ i_pJoinCondition->getChild(1)->getNodeType() == SQL_NODE_EQUAL)
+ {
+ m_pImpl->m_aJoinConditions.push_back( TNodePair(i_pJoinCondition->getChild(0),i_pJoinCondition->getChild(2)) );
+ }
+ }
+}
+//-----------------------------------------------------------------------------
+::std::vector< TNodePair >& OSQLParseTreeIterator::getJoinConditions() const
+{
+ return m_pImpl->m_aJoinConditions;
+}
//-----------------------------------------------------------------------------
void OSQLParseTreeIterator::getQualified_join( OSQLTables& _rTables, const OSQLParseNode *pTableRef, ::rtl::OUString& aTableRange )
{
@@ -491,8 +531,30 @@ void OSQLParseTreeIterator::getQualified_join( OSQLTables& _rTables, const OSQLP
traverseOneTableName( _rTables, pNode, aTableRange );
sal_uInt32 nPos = 4;
- if(SQL_ISRULE(pTableRef,cross_union) || pTableRef->getChild(1)->getTokenID() != SQL_TOKEN_NATURAL)
+ if( SQL_ISRULE(pTableRef,cross_union) || pTableRef->getChild(1)->getTokenID() != SQL_TOKEN_NATURAL)
+ {
nPos = 3;
+ // join_condition,named_columns_join
+ if ( SQL_ISRULE( pTableRef, qualified_join ) )
+ {
+ const OSQLParseNode* pJoin_spec = pTableRef->getChild(4);
+ if ( SQL_ISRULE( pJoin_spec, join_condition ) )
+ {
+ impl_fillJoinConditions(pJoin_spec->getChild(1));
+ }
+ else
+ {
+ const OSQLParseNode* pColumnCommalist = pJoin_spec->getChild(2);
+ // Alle Columns in der column_commalist ...
+ for (sal_uInt32 i = 0; i < pColumnCommalist->count(); i++)
+ {
+ const OSQLParseNode * pCol = pColumnCommalist->getChild(i);
+ // add twice because the column must exists in both tables
+ m_pImpl->m_aJoinConditions.push_back( TNodePair(pCol,pCol) );
+ }
+ }
+ }
+ }
pNode = getTableNode(_rTables,pTableRef->getChild(nPos),aTableRange);
if ( isTableNode( pNode ) )
@@ -826,17 +888,17 @@ void OSQLParseTreeIterator::traverseCreateColumns(const OSQLParseNode* pSelectNo
aColumnName = pColumnRef->getChild(0)->getTokenValue();
OSQLParseNode *pDatatype = pColumnRef->getChild(1);
- if (pDatatype && SQL_ISRULE(pDatatype,data_type))
+ if (pDatatype && SQL_ISRULE(pDatatype,character_string_type))
{
- //data type
- // 0 | 1| 2 |3
- //char ( 20 )
- aTypeName = pDatatype->getChild(0)->getTokenValue();
- if (pDatatype->count() == 4
- && SQL_ISPUNCTUATION(pDatatype->getChild(1), "(")
- && SQL_ISPUNCTUATION(pDatatype->getChild(3) , ")") )
+ const OSQLParseNode *pType = pDatatype->getChild(0);
+ aTypeName = pType->getTokenValue();
+ if (pDatatype->count() == 2 && (pType->getTokenID() == SQL_TOKEN_CHAR || pType->getTokenID() == SQL_TOKEN_CHARACTER ))
+ nType = DataType::CHAR;
+
+ const OSQLParseNode *pParams = pDatatype->getChild(pDatatype->count()-1);
+ if ( pParams->count() )
{
- nLen = pDatatype->getChild(2)->getTokenValue().toInt32();
+ nLen = pParams->getChild(1)->getTokenValue().toInt32();
}
}
else if(pDatatype && pDatatype->getNodeType() == SQL_NODE_KEYWORD)
@@ -846,8 +908,8 @@ void OSQLParseTreeIterator::traverseCreateColumns(const OSQLParseNode* pSelectNo
if (aTypeName.getLength())
{
- //TO DO:Create a new class for create statement to handle field length
- OParseColumn* pColumn = new OParseColumn(aColumnName,aTypeName,::rtl::OUString(),
+ //TODO:Create a new class for create statement to handle field length
+ OParseColumn* pColumn = new OParseColumn(aColumnName,aTypeName,::rtl::OUString(),::rtl::OUString(),
ColumnValue::NULLABLE_UNKNOWN,0,0,nType,sal_False,sal_False,isCaseSensitive());
pColumn->setFunction(sal_False);
pColumn->setRealName(aColumnName);
@@ -1115,17 +1177,17 @@ void OSQLParseTreeIterator::traverseParameters(const OSQLParseNode* _pNode)
else
pOther->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
} // if ( SQL_ISRULE(pParent,comparison_predicate) ) // x = X
- else if ( SQL_ISRULE(pParent,like_predicate) )
+ else if ( SQL_ISRULE(pParent,other_like_predicate_part_2) )
{
- const OSQLParseNode* pOther = pParent->getChild(0);
+ const OSQLParseNode* pOther = pParent->getParent()->getChild(0);
if ( SQL_ISRULE( pOther, column_ref ) )
getColumnRange( pOther, sColumnName, sTableRange, aColumnAlias);
else
pOther->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
}
- else if ( SQL_ISRULE(pParent,between_predicate) )
+ else if ( SQL_ISRULE(pParent,between_predicate_part_2) )
{
- const OSQLParseNode* pOther = pParent->getChild(0);
+ const OSQLParseNode* pOther = pParent->getParent()->getChild(0);
if ( SQL_ISRULE( pOther, column_ref ) )
getColumnRange( pOther, sColumnName, sTableRange, aColumnAlias);
else
@@ -1304,17 +1366,19 @@ void OSQLParseTreeIterator::traverseANDCriteria(OSQLParseNode * pSearchCondition
::rtl::OUString aValue;
pSearchCondition->getChild(2)->parseNodeToStr( aValue, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
traverseOnePredicate(pSearchCondition->getChild(0),aValue,pSearchCondition->getChild(2));
+ impl_fillJoinConditions(pSearchCondition);
// if (! aIteratorStatus.IsSuccessful())
// return;
}
else if (SQL_ISRULE(pSearchCondition,like_predicate) /*&& SQL_ISRULE(pSearchCondition->getChild(0),column_ref)*/)
{
- OSL_ENSURE(pSearchCondition->count() >= 4,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pSearchCondition->count() == 2,"OSQLParseTreeIterator: error in parse tree!");
+ const OSQLParseNode* pPart2 = pSearchCondition->getChild(1);
- sal_Int32 nCurentPos = pSearchCondition->count()-2;
+ sal_Int32 nCurentPos = pPart2->count()-2;
- OSQLParseNode * pNum_value_exp = pSearchCondition->getChild(nCurentPos);
- OSQLParseNode * pOptEscape = pSearchCondition->getChild(nCurentPos+1);
+ OSQLParseNode * pNum_value_exp = pPart2->getChild(nCurentPos);
+ OSQLParseNode * pOptEscape = pPart2->getChild(nCurentPos+1);
OSL_ENSURE(pNum_value_exp != NULL,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(pOptEscape != NULL,"OSQLParseTreeIterator: error in parse tree!");
@@ -1344,12 +1408,13 @@ void OSQLParseTreeIterator::traverseANDCriteria(OSQLParseNode * pSearchCondition
}
else if (SQL_ISRULE(pSearchCondition,in_predicate))
{
- OSL_ENSURE(pSearchCondition->count() == 4,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pSearchCondition->count() == 2,"OSQLParseTreeIterator: error in parse tree!");
+ const OSQLParseNode* pPart2 = pSearchCondition->getChild(1);
traverseORCriteria(pSearchCondition->getChild(0));
// if (! aIteratorStatus.IsSuccessful()) return;
- OSQLParseNode* pChild = pSearchCondition->getChild(3);
+ OSQLParseNode* pChild = pPart2->getChild(2);
if ( SQL_ISRULE(pChild->getChild(0),subquery) )
{
traverseTableNames( *m_pImpl->m_pSubTables );
@@ -1367,8 +1432,10 @@ void OSQLParseTreeIterator::traverseANDCriteria(OSQLParseNode * pSearchCondition
}
else if (SQL_ISRULE(pSearchCondition,test_for_null) /*&& SQL_ISRULE(pSearchCondition->getChild(0),column_ref)*/)
{
- OSL_ENSURE(pSearchCondition->count() >= 3,"OSQLParseTreeIterator: error in parse tree!");
- OSL_ENSURE(SQL_ISTOKEN(pSearchCondition->getChild(1),IS),"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pSearchCondition->count() == 2,"OSQLParseTreeIterator: error in parse tree!");
+ const OSQLParseNode* pPart2 = pSearchCondition->getChild(1);
+ (void)pPart2;
+ OSL_ENSURE(SQL_ISTOKEN(pPart2->getChild(0),IS),"OSQLParseTreeIterator: error in parse tree!");
::rtl::OUString aString;
traverseOnePredicate(pSearchCondition->getChild(0),aString,NULL);
@@ -1427,11 +1494,19 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode
{// found a function as column_ref
::rtl::OUString sFunctionName;
_pColumnRef->getChild(0)->parseNodeToStr( sFunctionName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
- sal_Int32 nType = ::connectivity::OSQLParser::getFunctionReturnType( sFunctionName, &m_rParser.getContext() );
+ const sal_uInt32 nCount = _pColumnRef->count();
+ sal_uInt32 i = 0;
+ for(; i < nCount;++i)
+ {
+ if ( _pColumnRef->getChild(i) == _pParseNode )
+ break;
+ }
+ sal_Int32 nType = ::connectivity::OSQLParser::getFunctionParameterType( _pColumnRef->getParent()->getChild(0)->getTokenID(), i+1);
OParseColumn* pColumn = new OParseColumn( sParameterName,
::rtl::OUString(),
::rtl::OUString(),
+ ::rtl::OUString(),
ColumnValue::NULLABLE_UNKNOWN,
0,
0,
@@ -1495,6 +1570,7 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode
OParseColumn* pColumn = new OParseColumn(aNewColName,
::rtl::OUString(),
::rtl::OUString(),
+ ::rtl::OUString(),
ColumnValue::NULLABLE_UNKNOWN,
0,
0,
@@ -1637,6 +1713,7 @@ void OSQLParseTreeIterator::appendColumns(::vos::ORef<OSQLColumns>& _rColumns,co
OParseColumn* pColumn = new OParseColumn(aName
, getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME)))
, getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE)))
+ , getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION)))
, getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE)))
, getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)))
, getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)))
@@ -1714,6 +1791,7 @@ void OSQLParseTreeIterator::setSelectColumnName(::vos::ORef<OSQLColumns>& _rColu
// TODO: does this match with _nType?
// Or should be fill this from the getTypeInfo of the connection?
::rtl::OUString(),
+ ::rtl::OUString(),
ColumnValue::NULLABLE_UNKNOWN,
0,
0,
@@ -1733,7 +1811,7 @@ void OSQLParseTreeIterator::setSelectColumnName(::vos::ORef<OSQLColumns>& _rColu
{
::rtl::OUString aNewColName(getUniqueColumnName(rColumnAlias));
- OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(),
+ OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(),::rtl::OUString(),
ColumnValue::NULLABLE_UNKNOWN,0,0,_nType,sal_False,sal_False,isCaseSensitive());
pColumn->setFunction(sal_True);
pColumn->setAggregateFunction(bAggFkt);
@@ -1754,7 +1832,7 @@ void OSQLParseTreeIterator::setSelectColumnName(::vos::ORef<OSQLColumns>& _rColu
{
::rtl::OUString aNewColName(getUniqueColumnName(rColumnAlias));
- OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(),
+ OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(),::rtl::OUString(),
ColumnValue::NULLABLE_UNKNOWN,0,0,_nType,sal_False,sal_False,isCaseSensitive());
pColumn->setFunction(sal_True);
pColumn->setAggregateFunction(bAggFkt);
@@ -1791,7 +1869,7 @@ void OSQLParseTreeIterator::setSelectColumnName(::vos::ORef<OSQLColumns>& _rColu
{
::rtl::OUString aNewColName(getUniqueColumnName(rColumnAlias));
- OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(),
+ OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(),::rtl::OUString(),
ColumnValue::NULLABLE_UNKNOWN,0,0,DataType::VARCHAR,sal_False,sal_False,isCaseSensitive());
pColumn->setFunction(sal_True);
pColumn->setAggregateFunction(bAggFkt);
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 20b35b21a493..b8bcd5334787 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -677,7 +677,7 @@ void OSQLParseNode::impl_parseTableRangeNodeToString_throw(::rtl::OUStringBuffer
void OSQLParseNode::impl_parseLikeNodeToString_throw( ::rtl::OUStringBuffer& rString, const SQLParseNodeParameter& rParam ) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseNode::impl_parseLikeNodeToString_throw" );
- OSL_ENSURE(count() >= 4,"count != 5: Prepare for GPF");
+ OSL_ENSURE(count() == 2,"count != 2: Prepare for GPF");
const OSQLParseNode* pEscNode = NULL;
const OSQLParseNode* pParaNode = NULL;
@@ -714,13 +714,11 @@ void OSQLParseNode::impl_parseLikeNodeToString_throw( ::rtl::OUStringBuffer& rSt
if (bAddName)
m_aChildren[0]->impl_parseNodeToString_throw( rString, aNewParam );
- m_aChildren[1]->impl_parseNodeToString_throw( rString, aNewParam );
- if(count() == 5)
- m_aChildren[2]->impl_parseNodeToString_throw( rString, aNewParam );
-
- sal_Int32 nCurentPos = m_aChildren.size()-2;
- pParaNode = m_aChildren[nCurentPos];
- pEscNode = m_aChildren[nCurentPos+1];
+ const OSQLParseNode* pPart2 = m_aChildren[1];
+ pPart2->getChild(0)->impl_parseNodeToString_throw( rString, aNewParam );
+ pPart2->getChild(1)->impl_parseNodeToString_throw( rString, aNewParam );
+ pParaNode = pPart2->getChild(2);
+ pEscNode = pPart2->getChild(3);
if (pParaNode->isToken())
{
@@ -1422,7 +1420,12 @@ OSQLParser::OSQLParser(const ::com::sun::star::uno::Reference< ::com::sun::star:
{ OSQLParseNode::datetime_primary, "datetime_primary" },
{ OSQLParseNode::concatenation, "concatenation" },
{ OSQLParseNode::char_factor, "char_factor" },
- { OSQLParseNode::bit_value_fct, "bit_value_fct" }
+ { OSQLParseNode::bit_value_fct, "bit_value_fct" },
+ { OSQLParseNode::comparison_predicate_part_2, "comparison_predicate_part_2" },
+ { OSQLParseNode::parenthesized_boolean_value_expression, "parenthesized_boolean_value_expression" },
+ { OSQLParseNode::character_string_type, "character_string_type" },
+ { OSQLParseNode::other_like_predicate_part_2, "other_like_predicate_part_2" },
+ { OSQLParseNode::between_predicate_part_2, "between_predicate_part_2" }
};
size_t nRuleMapCount = sizeof( aRuleDescriptions ) / sizeof( aRuleDescriptions[0] );
OSL_ENSURE( nRuleMapCount == size_t( OSQLParseNode::rule_count ), "OSQLParser::OSQLParser: added a new rule? Adjust this map!" );
@@ -1984,39 +1987,34 @@ void OSQLParseNode::negateSearchCondition(OSQLParseNode*& pSearchCondition,sal_B
else if(bNegate && (SQL_ISRULE(pSearchCondition,test_for_null) || SQL_ISRULE(pSearchCondition,in_predicate) ||
SQL_ISRULE(pSearchCondition,between_predicate) || SQL_ISRULE(pSearchCondition,boolean_test) ))
{
+ OSQLParseNode* pPart2 = pSearchCondition;
+ if ( !SQL_ISRULE(pSearchCondition,boolean_test) )
+ pPart2 = pSearchCondition->getChild(1);
sal_uInt32 nNotPos = 0;
- // row_value_constructor not SQL_TOKEN_IN in_predicate_value
- // row_value_constructor not SQL_TOKEN_BETWEEN row_value_constructor SQL_TOKEN_AND row_value_constructor
- if ( SQL_ISRULE( pSearchCondition, in_predicate )
- || SQL_ISRULE( pSearchCondition, between_predicate )
- )
+ if ( SQL_ISRULE( pSearchCondition, test_for_null ) )
nNotPos = 1;
- // row_value_constructor SQL_TOKEN_IS not SQL_TOKEN_NULL
- // boolean_primary SQL_TOKEN_IS not truth_value
- else if ( SQL_ISRULE( pSearchCondition, test_for_null )
- || SQL_ISRULE( pSearchCondition, boolean_test )
- )
+ else if ( SQL_ISRULE( pSearchCondition, boolean_test ) )
nNotPos = 2;
- OSQLParseNode* pNot = pSearchCondition->getChild(nNotPos);
+ OSQLParseNode* pNot = pPart2->getChild(nNotPos);
OSQLParseNode* pNotNot = NULL;
if(pNot->isRule())
pNotNot = new OSQLParseNode(::rtl::OUString::createFromAscii("NOT"),SQL_NODE_KEYWORD,SQL_TOKEN_NOT);
else
pNotNot = new OSQLParseNode(::rtl::OUString(),SQL_NODE_RULE,OSQLParser::RuleID(OSQLParseNode::sql_not));
- pSearchCondition->replace(pNot, pNotNot);
+ pPart2->replace(pNot, pNotNot);
delete pNot;
}
else if(bNegate && (SQL_ISRULE(pSearchCondition,like_predicate)))
{
- OSQLParseNode* pCheckForNOT = pSearchCondition->getChild( 1 );
- if ( SQL_ISTOKEN(pCheckForNOT,NOT) )
- delete pSearchCondition->removeAt( 1 );
+ OSQLParseNode* pNot = pSearchCondition->getChild( 1 )->getChild( 0 );
+ OSQLParseNode* pNotNot = NULL;
+ if(pNot->isRule())
+ pNotNot = new OSQLParseNode(::rtl::OUString::createFromAscii("NOT"),SQL_NODE_KEYWORD,SQL_TOKEN_NOT);
else
- {
- OSQLParseNode* pNot = new OSQLParseNode( ::rtl::OUString::createFromAscii( "NOT" ), SQL_NODE_KEYWORD, SQL_TOKEN_NOT );
- pSearchCondition->insert( 1, pNot );
- }
+ pNotNot = new OSQLParseNode(::rtl::OUString(),SQL_NODE_RULE,OSQLParser::RuleID(OSQLParseNode::sql_not));
+ pSearchCondition->getChild( 1 )->replace(pNot, pNotNot);
+ delete pNot;
}
}
//-----------------------------------------------------------------------------
@@ -2554,7 +2552,6 @@ sal_Int32 OSQLParser::getFunctionReturnType(const ::rtl::OUString& _sFunctionNam
else if(sFunctionName.equalsIgnoreAsciiCase(TokenIDToStr(SQL_TOKEN_BIT_LENGTH,pContext))) nType = DataType::INTEGER;
else if(sFunctionName.equalsIgnoreAsciiCase(TokenIDToStr(SQL_TOKEN_CHAR,pContext))) nType = DataType::VARCHAR;
else if(sFunctionName.equalsIgnoreAsciiCase(TokenIDToStr(SQL_TOKEN_CHAR_LENGTH,pContext))) nType = DataType::INTEGER;
- else if(sFunctionName.equalsIgnoreAsciiCase(TokenIDToStr(SQL_TOKEN_CHARACTER_LENGTH,pContext))) nType = DataType::INTEGER;
else if(sFunctionName.equalsIgnoreAsciiCase(TokenIDToStr(SQL_TOKEN_CONCAT,pContext))) nType = DataType::VARCHAR;
else if(sFunctionName.equalsIgnoreAsciiCase(TokenIDToStr(SQL_TOKEN_DIFFERENCE,pContext))) nType = DataType::VARCHAR;
else if(sFunctionName.equalsIgnoreAsciiCase(TokenIDToStr(SQL_TOKEN_INSERT,pContext))) nType = DataType::VARCHAR;
diff --git a/connectivity/source/sdbcx/VColumn.cxx b/connectivity/source/sdbcx/VColumn.cxx
index e4535c713ec7..65bc1b368b1e 100644
--- a/connectivity/source/sdbcx/VColumn.cxx
+++ b/connectivity/source/sdbcx/VColumn.cxx
@@ -89,6 +89,7 @@ OColumn::OColumn(sal_Bool _bCase)
OColumn::OColumn( const ::rtl::OUString& _Name,
const ::rtl::OUString& _TypeName,
const ::rtl::OUString& _DefaultValue,
+ const ::rtl::OUString& _Description,
sal_Int32 _IsNullable,
sal_Int32 _Precision,
sal_Int32 _Scale,
@@ -100,6 +101,7 @@ OColumn::OColumn( const ::rtl::OUString& _Name,
:OColumnDescriptor_BASE(m_aMutex)
,ODescriptor(OColumnDescriptor_BASE::rBHelper,_bCase)
,m_TypeName(_TypeName)
+ ,m_Description(_Description)
,m_DefaultValue(_DefaultValue)
,m_IsNullable(_IsNullable)
,m_Precision(_Precision)
@@ -195,6 +197,7 @@ Reference< XPropertySet > SAL_CALL OColumn::createDataDescriptor( ) throw(Runti
OColumn* pNewColumn = new OColumn( m_Name,
m_TypeName,
m_DefaultValue,
+ m_Description,
m_IsNullable,
m_Precision,
m_Scale,
@@ -203,7 +206,6 @@ Reference< XPropertySet > SAL_CALL OColumn::createDataDescriptor( ) throw(Runti
m_IsRowVersion,
m_IsCurrency,
isCaseSensitive());
- pNewColumn->m_Description = m_Description;
pNewColumn->setNew(sal_True);
return pNewColumn;
}
diff --git a/connectivity/source/sdbcx/VIndexColumn.cxx b/connectivity/source/sdbcx/VIndexColumn.cxx
index 31aaaa3d17ab..ca1649b06384 100644
--- a/connectivity/source/sdbcx/VIndexColumn.cxx
+++ b/connectivity/source/sdbcx/VIndexColumn.cxx
@@ -85,6 +85,7 @@ OIndexColumn::OIndexColumn( sal_Bool _IsAscending,
) : OColumn(_Name,
_TypeName,
_DefaultValue,
+ ::rtl::OUString(),
_IsNullable,
_Precision,
_Scale,
diff --git a/connectivity/source/sdbcx/VKeyColumn.cxx b/connectivity/source/sdbcx/VKeyColumn.cxx
index bbcec5cc0501..97e83f5c633a 100644
--- a/connectivity/source/sdbcx/VKeyColumn.cxx
+++ b/connectivity/source/sdbcx/VKeyColumn.cxx
@@ -85,6 +85,7 @@ OKeyColumn::OKeyColumn( const ::rtl::OUString& _ReferencedColumn,
) : OColumn(_Name,
_TypeName,
_DefaultValue,
+ ::rtl::OUString(),
_IsNullable,
_Precision,
_Scale,
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 5e0460891c30..bba615e0ebbc 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -362,6 +362,8 @@ namespace
: public rtl::Static< String, Version > {};
struct AboutBoxVersion
: public rtl::Static< String, AboutBoxVersion > {};
+ struct OOOVendor
+ : public rtl::Static< String, OOOVendor > {};
struct Extension
: public rtl::Static< String, Extension > {};
struct XMLFileFormatName
@@ -425,6 +427,21 @@ void ReplaceStringHookProc( UniString& rStr )
rStr.SearchAndReplaceAllAscii( "%PRODUCTXMLFILEFORMATNAME", rXMLFileFormatName );
rStr.SearchAndReplaceAllAscii( "%PRODUCTXMLFILEFORMATVERSION", rXMLFileFormatVersion );
}
+ if ( rStr.SearchAscii( "%OOOVENDOR" ) != STRING_NOTFOUND )
+ {
+ String &rOOOVendor = OOOVendor::get();
+
+ if ( !rOOOVendor.Len() )
+ {
+ rtl::OUString aTmp;
+ Any aRet = ::utl::ConfigManager::GetDirectConfigProperty(
+ ::utl::ConfigManager::OOOVENDOR );
+ aRet >>= aTmp;
+ rOOOVendor = aTmp;
+
+ }
+ rStr.SearchAndReplaceAllAscii( "%OOOVENDOR" ,rOOOVendor );
+ }
if ( rStr.SearchAscii( "%WRITERCOMPATIBILITYVERSIONOOO11" ) != STRING_NOTFOUND )
{
diff --git a/desktop/source/deployment/dp_xml.cxx b/desktop/source/deployment/dp_xml.cxx
index 0453ab8372c0..65c48d70c92d 100644
--- a/desktop/source/deployment/dp_xml.cxx
+++ b/desktop/source/deployment/dp_xml.cxx
@@ -44,6 +44,20 @@ namespace dp_misc
//==============================================================================
void xml_parse(
+ Reference<xml::input::XRoot> const & xRoot,
+ ::ucbhelper::Content & ucb_content,
+ Reference<XComponentContext> const & xContext )
+{
+ const Any arg(xRoot);
+ const Reference<xml::sax::XDocumentHandler> xDocHandler(
+ xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+ OUSTR("com.sun.star.xml.input.SaxDocumentHandler"),
+ Sequence<Any>( &arg, 1 ), xContext ), UNO_QUERY_THROW );
+ xml_parse( xDocHandler, ucb_content, xContext );
+ }
+
+//==============================================================================
+void xml_parse(
Reference<xml::sax::XDocumentHandler> const & xDocHandler,
::ucbhelper::Content & ucb_content,
Reference<XComponentContext> const & xContext )
@@ -61,199 +75,4 @@ void xml_parse(
xParser->parseStream( source );
}
-//==============================================================================
-void xml_parse(
- Reference<xml::input::XRoot> const & xRoot,
- ::ucbhelper::Content & ucb_content,
- Reference<XComponentContext> const & xContext )
-{
- const Any arg(xRoot);
- const Reference<xml::sax::XDocumentHandler> xDocHandler(
- xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- OUSTR("com.sun.star.xml.input.SaxDocumentHandler"),
- Sequence<Any>( &arg, 1 ), xContext ), UNO_QUERY_THROW );
- xml_parse( xDocHandler, ucb_content, xContext );
-}
-
-//##############################################################################
-
-//______________________________________________________________________________
-XmlRootElement::XmlRootElement(
- OUString const & uri, OUString const & localname )
- : m_uri( uri )
-{
- m_localname = localname;
-}
-
-//______________________________________________________________________________
-XmlRootElement::~XmlRootElement()
-{
-}
-
-// XRoot
-//______________________________________________________________________________
-void XmlRootElement::startDocument(
- Reference<xml::input::XNamespaceMapping> const & xMapping )
- throw (xml::sax::SAXException, RuntimeException)
-{
- m_xNamespaceMapping = xMapping;
-
- try {
- m_uid = m_xNamespaceMapping->getUidByUri( m_uri );
- }
- catch (container::NoSuchElementException & exc) {
- throw xml::sax::SAXException(
- exc.Message, static_cast<OWeakObject *>(this), Any(exc) );
- }
-}
-
-//______________________________________________________________________________
-void XmlRootElement::endDocument()
- throw (xml::sax::SAXException, RuntimeException)
-{
-}
-
-//______________________________________________________________________________
-void XmlRootElement::processingInstruction(
- OUString const &, OUString const & )
- throw (xml::sax::SAXException, RuntimeException)
-{
-}
-
-//______________________________________________________________________________
-void XmlRootElement::setDocumentLocator(
- Reference<xml::sax::XLocator> const & )
- throw (xml::sax::SAXException, RuntimeException)
-{
-}
-
-//______________________________________________________________________________
-Reference<xml::input::XElement> XmlRootElement::startRootElement(
- sal_Int32 uid, OUString const & localname,
- Reference<xml::input::XAttributes> const & xAttributes )
- throw (xml::sax::SAXException, RuntimeException)
-{
- check_xmlns( uid );
- if (! localname.equals( m_localname )) {
- throw xml::sax::SAXException(
- OUSTR("unexpected root element ") + localname,
- static_cast<OWeakObject *>(this), Any() );
- }
- m_xAttributes = xAttributes;
-
- return this;
-}
-
-//##############################################################################
-
-//______________________________________________________________________________
-XmlElement::~XmlElement()
-{
-}
-
-//______________________________________________________________________________
-void XmlElement::check_xmlns( sal_Int32 uid ) const
- throw (xml::sax::SAXException)
-{
- if (uid != m_uid)
- {
- ::rtl::OUStringBuffer buf;
- buf.appendAscii(
- RTL_CONSTASCII_STRINGPARAM("illegal xml namespace uri=\"") );
- try {
- buf.append( m_xNamespaceMapping->getUriByUid( uid ) );
- }
- catch (container::NoSuchElementException & exc) {
- throw xml::sax::SAXException(
- exc.Message, static_cast<OWeakObject *>(
- const_cast<XmlElement *>(this) ), Any(exc) );
- }
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\"!") );
- throw xml::sax::SAXException(
- buf.makeStringAndClear(),
- static_cast<OWeakObject *>( const_cast<XmlElement *>(this) ),
- Any() );
- }
-}
-
-// XElement
-//______________________________________________________________________________
-Reference<xml::input::XElement> XmlElement::getParent()
- throw (RuntimeException)
-{
- return m_xParent;
-}
-
-//______________________________________________________________________________
-OUString XmlElement::getLocalName()
- throw (RuntimeException)
-{
- return m_localname;
-}
-
-//______________________________________________________________________________
-sal_Int32 XmlElement::getUid()
- throw (RuntimeException)
-{
- return m_uid;
-}
-
-//______________________________________________________________________________
-Reference<xml::input::XAttributes> XmlElement::getAttributes()
- throw (RuntimeException)
-{
- return m_xAttributes;
-}
-
-//______________________________________________________________________________
-void XmlElement::ignorableWhitespace(
- OUString const & )
- throw (xml::sax::SAXException, RuntimeException)
-{
-}
-
-//______________________________________________________________________________
-void XmlElement::characters( OUString const & chars )
- throw (xml::sax::SAXException, RuntimeException)
-{
- m_characters += chars;
-}
-
-//______________________________________________________________________________
-void XmlElement::processingInstruction(
- OUString const &, OUString const & )
- throw (xml::sax::SAXException, RuntimeException)
-{
-}
-
-//______________________________________________________________________________
-void XmlElement::endElement()
- throw (xml::sax::SAXException, RuntimeException)
-{
- m_got_endElement = true;
-}
-
-//______________________________________________________________________________
-Reference<xml::input::XElement> XmlElement::startChildElement(
- sal_Int32 uid, OUString const & localName,
- Reference<xml::input::XAttributes> const & )
- throw (xml::sax::SAXException, RuntimeException)
-{
- ::rtl::OUStringBuffer buf;
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("unexpected element "
- "{ tag=\"") );
- buf.append( localName );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\", uri=\"") );
- try {
- buf.append( m_xNamespaceMapping->getUriByUid( uid ) );
- }
- catch (container::NoSuchElementException & exc) {
- throw xml::sax::SAXException(
- exc.Message, static_cast<OWeakObject *>(this), Any(exc) );
- }
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" }!") );
- throw xml::sax::SAXException(
- buf.makeStringAndClear(), static_cast<OWeakObject *>(this), Any() );
-}
-
}
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index d57fbdb9f4ed..1a66ff38e4a4 100755
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -30,7 +30,7 @@
#include "dp_gui.hrc"
#include "svtools/controldims.hrc"
-#include "svl/svtools.hrc"
+#include "svtools/svtools.hrc"
#include "dp_gui.h"
#include "dp_gui_dialog2.hxx"
@@ -229,7 +229,10 @@ void ExtBoxWithBtns_Impl::RecalcAll()
const sal_Int32 nActive = getSelIndex();
if ( nActive != EXTENSION_LISTBOX_ENTRY_NOTFOUND )
+ {
SetButtonPos( GetEntryRect( nActive ) );
+ SetButtonStatus( GetEntryData( nActive) );
+ }
else
{
m_pOptionsBtn->Hide();
@@ -247,21 +250,6 @@ void ExtBoxWithBtns_Impl::selectEntry( const long nPos )
return;
ExtensionBox_Impl::selectEntry( nPos );
-
- if ( ( nPos >= 0 ) && ( nPos < GetEntryCount() ) )
- {
- if ( IsReallyVisible() )
- {
- SetButtonPos( GetEntryRect( nPos ) );
- }
- SetButtonStatus( GetEntryData( nPos) );
- }
- else
- {
- m_pOptionsBtn->Hide();
- m_pEnableBtn->Hide();
- m_pRemoveBtn->Hide();
- }
}
// -----------------------------------------------------------------------
diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx
index c4269e6ac137..29bedf1b229f 100755
--- a/desktop/source/deployment/gui/dp_gui_service.cxx
+++ b/desktop/source/deployment/gui/dp_gui_service.cxx
@@ -93,6 +93,8 @@ namespace
: public rtl::Static< String, Version > {};
struct AboutBoxVersion
: public rtl::Static< String, AboutBoxVersion > {};
+ struct OOOVendor
+ : public rtl::Static< String, OOOVendor > {};
struct Extension
: public rtl::Static< String, Extension > {};
}
@@ -108,6 +110,7 @@ void ReplaceProductNameHookProc( String& rStr )
String &rVersion = Version::get();
String &rAboutBoxVersion = AboutBoxVersion::get();
String &rExtension = Extension::get();
+ String &rOOOVendor = OOOVendor::get();
if ( !rProductName.Len() )
{
@@ -124,6 +127,10 @@ void ReplaceProductNameHookProc( String& rStr )
aRet >>= aTmp;
rAboutBoxVersion = aTmp;
+ aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::OOOVENDOR );
+ aRet >>= aTmp;
+ rOOOVendor = aTmp;
+
if ( !rExtension.Len() )
{
aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTEXTENSION );
@@ -136,6 +143,7 @@ void ReplaceProductNameHookProc( String& rStr )
rStr.SearchAndReplaceAllAscii( "%PRODUCTNAME", rProductName );
rStr.SearchAndReplaceAllAscii( "%PRODUCTVERSION", rVersion );
rStr.SearchAndReplaceAllAscii( "%ABOUTBOXPRODUCTVERSION", rAboutBoxVersion );
+ rStr.SearchAndReplaceAllAscii( "%OOOVENDOR", rOOOVendor );
rStr.SearchAndReplaceAllAscii( "%PRODUCTEXTENSION", rExtension );
}
}
diff --git a/desktop/source/deployment/gui/makefile.mk b/desktop/source/deployment/gui/makefile.mk
index 6a9c7b6bbb38..52092a077a4b 100644
--- a/desktop/source/deployment/gui/makefile.mk
+++ b/desktop/source/deployment/gui/makefile.mk
@@ -77,6 +77,7 @@ SHL1STDLIBS = \
$(SVTOOLLIB) \
$(SVLLIB) \
$(SVXLIB) \
+ $(SVXCORELIB) \
$(SFXLIB) \
$(DEPLOYMENTMISCLIB) \
$(OLE32LIB)
diff --git a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
index 3d2d56cad00a..37e616bb1a0b 100644
--- a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
+++ b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
@@ -217,16 +217,6 @@ public:
*/
::rtl::OUString getIconURL( sal_Bool bHighContrast ) const;
- /**
- Allow direct access to the XPath functionality.
-
- @return
- direct access to the XPath functionality; null iff this instance was
- constructed with a null <code>element</code>
- */
- ::com::sun::star::uno::Reference< ::com::sun::star::xml::xpath::XXPathAPI >
- getXpath() const;
-
bool hasDescription() const;
private:
diff --git a/desktop/source/deployment/inc/dp_xml.h b/desktop/source/deployment/inc/dp_xml.h
index 41c12f282428..300051bd1512 100644
--- a/desktop/source/deployment/inc/dp_xml.h
+++ b/desktop/source/deployment/inc/dp_xml.h
@@ -52,110 +52,6 @@ void xml_parse(
::ucbhelper::Content & ucb_content,
css::uno::Reference< css::uno::XComponentContext > const & xContext );
-//==============================================================================
-void xml_parse(
- css::uno::Reference< css::xml::input::XRoot > const & xRoot,
- ::ucbhelper::Content & ucb_content,
- css::uno::Reference< css::uno::XComponentContext > const & xContext );
-
-//==============================================================================
-class XmlElement : public ::cppu::WeakImplHelper1< css::xml::input::XElement >
-{
-protected:
- css::uno::Reference<css::xml::input::XNamespaceMapping> m_xNamespaceMapping;
- const css::uno::Reference<css::xml::input::XElement> m_xParent;
- sal_Int32 m_uid;
- ::rtl::OUString m_localname;
- css::uno::Reference<css::xml::input::XAttributes> m_xAttributes;
- ::rtl::OUString m_characters;
- bool m_got_endElement;
-
- void check_xmlns( sal_Int32 uid ) const throw (css::xml::sax::SAXException);
-
- inline XmlElement()
- : m_uid( -1 ),
- m_got_endElement( false )
- {}
- virtual ~XmlElement();
-public:
- inline bool isParsed() const { return m_got_endElement; }
-
- inline XmlElement(
- css::uno::Reference<css::xml::input::XNamespaceMapping>
- const & xMapping,
- css::uno::Reference<css::xml::input::XElement> const & xParent,
- sal_Int32 uid, ::rtl::OUString const & localname,
- css::uno::Reference< css::xml::input::XAttributes >
- const & xAttributes )
- : m_xNamespaceMapping( xMapping ),
- m_xParent( xParent ),
- m_uid( uid ),
- m_localname( localname ),
- m_xAttributes( xAttributes ),
- m_got_endElement( false )
- {}
-
- // XElement
- virtual css::uno::Reference<css::xml::input::XElement> SAL_CALL
- getParent() throw (css::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getLocalName()
- throw (css::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getUid()
- throw (css::uno::RuntimeException);
- virtual css::uno::Reference<css::xml::input::XAttributes> SAL_CALL
- getAttributes() throw (css::uno::RuntimeException);
- virtual void SAL_CALL ignorableWhitespace(
- ::rtl::OUString const & rWhitespaces )
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual void SAL_CALL characters( ::rtl::OUString const & rChars )
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual void SAL_CALL processingInstruction(
- ::rtl::OUString const & Target, ::rtl::OUString const & Data )
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual void SAL_CALL endElement()
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual css::uno::Reference<css::xml::input::XElement> SAL_CALL
- startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
- css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
-};
-
-//==============================================================================
-class XmlRootElement : public ::cppu::ImplInheritanceHelper1<
- XmlElement, css::xml::input::XRoot >
-{
- const ::rtl::OUString m_uri;
-
-protected:
- virtual ~XmlRootElement();
-public:
- inline ::rtl::OUString const & getUri() const
- { return m_uri; }
-
- XmlRootElement(
- ::rtl::OUString const & uri, ::rtl::OUString const & localname );
-
- // XRoot
- virtual void SAL_CALL startDocument(
- css::uno::Reference<css::xml::input::XNamespaceMapping>
- const & xMapping )
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual void SAL_CALL endDocument()
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual void SAL_CALL processingInstruction(
- ::rtl::OUString const & target, ::rtl::OUString const & data )
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual void SAL_CALL setDocumentLocator(
- css::uno::Reference<css::xml::sax::XLocator> const & xLocator )
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual css::uno::Reference<css::xml::input::XElement> SAL_CALL
- startRootElement(
- sal_Int32 uid, ::rtl::OUString const & localname,
- css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
-};
-
}
#endif
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index d97b400f4609..b4132db61f03 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -512,12 +512,6 @@ DescriptionInfoset::getUpdateDownloadUrls() const
::boost::optional< ::rtl::OUString >();
}
-css::uno::Reference< css::xml::xpath::XXPathAPI > DescriptionInfoset::getXpath()
- const
-{
- return m_xpath;
-}
-
::boost::optional< ::rtl::OUString > DescriptionInfoset::getOptionalValue(
::rtl::OUString const & expression) const
{
diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx
index 4a144f3fdf20..ac28b6816708 100644
--- a/desktop/source/deployment/misc/dp_platform.cxx
+++ b/desktop/source/deployment/misc/dp_platform.cxx
@@ -39,6 +39,8 @@
#define PLATFORM_WIN_X86 "windows_x86"
#define PLATFORM_LINUX_X86 "linux_x86"
#define PLATFORM_LINUX_X86_64 "linux_x86_64"
+#define PLATFORM_KFREEBSD_X86 "kfreebsd_x86"
+#define PLATFORM_KFREEBSD_X86_64 "kfreebsd_x86_64"
#define PLATFORM_LINUX_SPARC "linux_sparc"
#define PLATFORM_LINUX_POWERPC "linux_powerpc"
#define PLATFORM_LINUX_POWERPC64 "linux_powerpc64"
@@ -129,6 +131,10 @@ namespace
ret = checkOSandCPU(OUSTR("Linux"), OUSTR("x86"));
else if (token.equals(OUSTR(PLATFORM_LINUX_X86_64)))
ret = checkOSandCPU(OUSTR("Linux"), OUSTR("X86_64"));
+ else if (token.equals(OUSTR(PLATFORM_KFREEBSD_X86)))
+ ret = checkOSandCPU(OUSTR("kFreeBSD"), OUSTR("x86"));
+ else if (token.equals(OUSTR(PLATFORM_KFREEBSD_X86_64)))
+ ret = checkOSandCPU(OUSTR("kFreeBSD"), OUSTR("X86_64"));
else if (token.equals(OUSTR(PLATFORM_LINUX_SPARC)))
ret = checkOSandCPU(OUSTR("Linux"), OUSTR("SPARC"));
else if (token.equals(OUSTR(PLATFORM_LINUX_POWERPC)))
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 4bcbf250907f..c219a839b99a 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -59,6 +59,11 @@
#include <com/sun/star/util/XRefreshable.hpp>
#include <com/sun/star/util/XChangesBatch.hpp>
#include <com/sun/star/util/XStringSubstitution.hpp>
+#include <com/sun/star/embed/ElementModes.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <com/sun/star/ui/XUIConfiguration.hpp>
+#include <com/sun/star/ui/XUIConfigurationStorage.hpp>
+#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
using namespace rtl;
using namespace osl;
@@ -73,6 +78,120 @@ using namespace com::sun::star;
namespace desktop {
+static const ::rtl::OUString ITEM_DESCRIPTOR_COMMANDURL = ::rtl::OUString::createFromAscii("CommandURL");
+static const ::rtl::OUString ITEM_DESCRIPTOR_CONTAINER = ::rtl::OUString::createFromAscii("ItemDescriptorContainer");
+static const ::rtl::OUString ITEM_DESCRIPTOR_LABEL = ::rtl::OUString::createFromAscii("Label");
+
+static const ::rtl::OUString MENU_SEPERATOR = ::rtl::OUString::createFromAscii(" | ");
+static const ::rtl::OUString MENU_SUBMENU = ::rtl::OUString::createFromAscii("...");
+
+::rtl::OUString retrieveLabelFromCommand(const ::rtl::OUString& sCommand, const ::rtl::OUString& sModuleIdentifier)
+{
+ ::rtl::OUString sLabel;
+
+ uno::Reference< container::XNameAccess > xUICommands;
+ uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY );
+ if ( xNameAccess.is() )
+ {
+ uno::Any a = xNameAccess->getByName( sModuleIdentifier );
+ a >>= xUICommands;
+ }
+ if (xUICommands.is())
+ {
+ if ( sCommand.getLength() > 0 )
+ {
+ rtl::OUString aStr;
+ ::uno::Sequence< beans::PropertyValue > aPropSeq;
+ try
+ {
+ uno::Any a( xUICommands->getByName( sCommand ));
+ if ( a >>= aPropSeq )
+ {
+ for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
+ {
+ if ( aPropSeq[i].Name.equalsAscii( "Label" ))
+ {
+ aPropSeq[i].Value >>= aStr;
+ break;
+ }
+ }
+ }
+
+ sLabel = aStr;
+ }
+
+ catch(container::NoSuchElementException&)
+ {
+ sLabel = sCommand;
+ sal_Int32 nIndex = sLabel.indexOf(':');
+ if (nIndex>=0 && nIndex <= sLabel.getLength()-1)
+ sLabel = sLabel.copy(nIndex+1);
+ }
+
+ }
+ }
+
+ return sLabel;
+}
+
+::rtl::OUString stripHotKey( const ::rtl::OUString& str )
+{
+ sal_Int32 index = str.indexOf( '~' );
+ if ( index == -1 )
+ {
+ return str;
+ }
+ else
+ {
+ return str.replaceAt( index, 1, ::rtl::OUString() );
+ }
+}
+
+::rtl::OUString mapModuleShortNameToIdentifier(const ::rtl::OUString& sShortName)
+{
+ ::rtl::OUString sIdentifier;
+
+ if (sShortName.equals(::rtl::OUString::createFromAscii("StartModule")))
+ sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.frame.StartModule");
+
+ else if (sShortName.equals(::rtl::OUString::createFromAscii("swriter")))
+ sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.TextDocument");
+
+ else if (sShortName.equals(::rtl::OUString::createFromAscii("scalc")))
+ sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.sheet.SpreadsheetDocument");
+
+ else if (sShortName.equals(::rtl::OUString::createFromAscii("sdraw")))
+ sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.drawing.DrawingDocument");
+
+ else if (sShortName.equals(::rtl::OUString::createFromAscii("simpress")))
+ sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.presentation.PresentationDocument");
+
+ else if (sShortName.equals(::rtl::OUString::createFromAscii("smath")))
+ sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.formula.FormulaProperties");
+
+ else if (sShortName.equals(::rtl::OUString::createFromAscii("schart")))
+ sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.chart2.ChartDocument");
+
+ else if (sShortName.equals(::rtl::OUString::createFromAscii("BasicIDE")))
+ sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.script.BasicIDE");
+
+ else if (sShortName.equals(::rtl::OUString::createFromAscii("dbapp")))
+ sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.sdb.OfficeDatabaseDocument");
+
+ else if (sShortName.equals(::rtl::OUString::createFromAscii("sglobal")))
+ sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.GlobalDocument");
+
+ else if (sShortName.equals(::rtl::OUString::createFromAscii("sweb")))
+ sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.WebDocument");
+
+ else if (sShortName.equals(::rtl::OUString::createFromAscii("swxform")))
+ sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.xforms.XMLFormDocument");
+
+ else if (sShortName.equals(::rtl::OUString::createFromAscii("sbibliography")))
+ sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.frame.Bibliography");
+
+ return sIdentifier;
+}
static MigrationImpl *pImpl = 0;
static Mutex aMutex;
@@ -160,9 +279,72 @@ sal_Bool MigrationImpl::doMigration()
m_vrFileList = compileFileList();
sal_Bool result = sal_False;
- try{
+ try
+ {
+ NewVersionUIInfo aNewVersionUIInfo;
+ ::std::vector< MigrationModuleInfo > vModulesInfo = dectectUIChangesForAllModules();
+ aNewVersionUIInfo.init(vModulesInfo);
+
copyFiles();
+ const ::rtl::OUString sMenubarResourceURL = ::rtl::OUString::createFromAscii("private:resource/menubar/menubar");
+ const ::rtl::OUString sToolbarResourcePre = ::rtl::OUString::createFromAscii("private:resource/toolbar/");
+ for (sal_uInt32 i=0; i<vModulesInfo.size(); ++i)
+ {
+ ::rtl::OUString sModuleIdentifier = mapModuleShortNameToIdentifier(vModulesInfo[i].sModuleShortName);
+ if (sModuleIdentifier.getLength()==0)
+ continue;
+
+ uno::Sequence< uno::Any > lArgs(2);
+ ::rtl::OUString aOldCfgDataPath = m_aInfo.userdata + ::rtl::OUString::createFromAscii("/user/config/soffice.cfg/modules/");
+ lArgs[0] <<= aOldCfgDataPath + vModulesInfo[i].sModuleShortName;
+ lArgs[1] <<= embed::ElementModes::READ;
+
+ uno::Reference< lang::XSingleServiceFactory > xStorageFactory(m_xFactory->createInstance(::rtl::OUString::createFromAscii("com.sun.star.embed.FileSystemStorageFactory")), uno::UNO_QUERY);
+ uno::Reference< embed::XStorage > xModules;
+
+ xModules = uno::Reference< embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY);
+ uno::Reference< ui::XUIConfigurationManager > xOldCfgManager( m_xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.ui.UIConfigurationManager")), uno::UNO_QUERY );
+ uno::Reference< ui::XUIConfigurationStorage > xOldCfgStorage( xOldCfgManager, uno::UNO_QUERY );
+ uno::Reference< ui::XUIConfigurationPersistence > xOldCfgPersistence( xOldCfgManager, uno::UNO_QUERY );
+
+ if ( xOldCfgStorage.is() && xOldCfgPersistence.is() && xModules.is() )
+ {
+ xOldCfgStorage->setStorage( xModules );
+ xOldCfgPersistence->reload();
+ }
+
+ uno::Reference< ui::XUIConfigurationManager > xCfgManager = aNewVersionUIInfo.getConfigManager(vModulesInfo[i].sModuleShortName);
+
+ if (vModulesInfo[i].bHasMenubar)
+ {
+ uno::Reference< container::XIndexContainer > xOldVersionMenuSettings = uno::Reference< container::XIndexContainer >(xOldCfgManager->getSettings(sMenubarResourceURL, sal_True), uno::UNO_QUERY);
+ uno::Reference< container::XIndexContainer > xNewVersionMenuSettings = aNewVersionUIInfo.getNewMenubarSettings(vModulesInfo[i].sModuleShortName);
+ ::rtl::OUString sParent;
+ compareOldAndNewConfig(sParent, xOldVersionMenuSettings, xNewVersionMenuSettings, sMenubarResourceURL);
+ mergeOldToNewVersion(xCfgManager, xNewVersionMenuSettings, sModuleIdentifier, sMenubarResourceURL);
+ }
+
+ sal_Int32 nToolbars = vModulesInfo[i].m_vToolbars.size();
+ if (nToolbars >0)
+ {
+ for (sal_Int32 j=0; j<nToolbars; ++j)
+ {
+ ::rtl::OUString sToolbarName = vModulesInfo[i].m_vToolbars[j];
+ ::rtl::OUString sToolbarResourceURL = sToolbarResourcePre + sToolbarName;
+
+ uno::Reference< container::XIndexContainer > xOldVersionToolbarSettings = uno::Reference< container::XIndexContainer >(xOldCfgManager->getSettings(sToolbarResourceURL, sal_True), uno::UNO_QUERY);
+ uno::Reference< container::XIndexContainer > xNewVersionToolbarSettings = aNewVersionUIInfo.getNewToolbarSettings(vModulesInfo[i].sModuleShortName, sToolbarName);
+ ::rtl::OUString sParent;
+ compareOldAndNewConfig(sParent, xOldVersionToolbarSettings, xNewVersionToolbarSettings, sToolbarResourceURL);
+ mergeOldToNewVersion(xCfgManager, xNewVersionToolbarSettings, sModuleIdentifier, sToolbarResourceURL);
+ }
+ }
+
+ m_aOldVersionItemsHashMap.clear();
+ m_aNewVersionItemsHashMap.clear();
+ }
+
// execute the migration items from Setup.xcu
copyConfig();
@@ -231,7 +413,7 @@ static void insertSorted(migrations_available& rAvailableMigrations, supported_m
{
rAvailableMigrations.insert(pIter, aSupportedMigration );
bInserted = true;
- break; // i111193: insert invalidates iterator!
+ break;
}
++pIter;
}
@@ -291,10 +473,14 @@ migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigratio
tmpStep.name = seqMigrations[i];
// read included files from current step description
+ ::rtl::OUString aSeqEntry;
if (tmpAccess->getByName(OUString::createFromAscii("IncludedFiles")) >>= tmpSeq)
{
for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
- tmpStep.includeFiles.push_back(tmpSeq[j]);
+ {
+ aSeqEntry = tmpSeq[j];
+ tmpStep.includeFiles.push_back(aSeqEntry);
+ }
}
// exluded files...
@@ -329,7 +515,10 @@ migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigratio
if (tmpAccess->getByName(OUString::createFromAscii("ExcludedExtensions")) >>= tmpSeq)
{
for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
- tmpStep.excludeExtensions.push_back(tmpSeq[j]);
+ {
+ aSeqEntry = tmpSeq[j];
+ tmpStep.excludeExtensions.push_back(aSeqEntry);
+ }
}
// generic service
@@ -781,4 +970,396 @@ void MigrationImpl::runServices()
}
}
+::std::vector< MigrationModuleInfo > MigrationImpl::dectectUIChangesForAllModules() const
+{
+ ::std::vector< MigrationModuleInfo > vModulesInfo;
+ const ::rtl::OUString MENUBAR = ::rtl::OUString::createFromAscii("menubar");
+ const ::rtl::OUString TOOLBAR = ::rtl::OUString::createFromAscii("toolbar");
+
+ uno::Sequence< uno::Any > lArgs(2);
+ lArgs[0] <<= m_aInfo.userdata + ::rtl::OUString::createFromAscii("/user/config/soffice.cfg/modules");
+ lArgs[1] <<= embed::ElementModes::READ;
+
+ uno::Reference< lang::XSingleServiceFactory > xStorageFactory(m_xFactory->createInstance(::rtl::OUString::createFromAscii("com.sun.star.embed.FileSystemStorageFactory")), uno::UNO_QUERY);
+ uno::Reference< embed::XStorage > xModules;
+
+ xModules = uno::Reference< embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY);
+ if (!xModules.is())
+ return vModulesInfo;
+
+ uno::Reference< container::XNameAccess > xAccess = uno::Reference< container::XNameAccess >(xModules, uno::UNO_QUERY);
+ uno::Sequence< ::rtl::OUString > lNames = xAccess->getElementNames();
+ sal_Int32 nLength = lNames.getLength();
+ for (sal_Int32 i=0; i<nLength; ++i)
+ {
+ ::rtl::OUString sModuleShortName = lNames[i];
+ uno::Reference< embed::XStorage > xModule = xModules->openStorageElement(sModuleShortName, embed::ElementModes::READ);
+ if (xModule.is())
+ {
+ MigrationModuleInfo aModuleInfo;
+
+ uno::Reference< embed::XStorage > xMenubar = xModule->openStorageElement(MENUBAR, embed::ElementModes::READ);
+ if (xMenubar.is())
+ {
+ uno::Reference< container::XNameAccess > xNameAccess = uno::Reference< container::XNameAccess >(xMenubar, uno::UNO_QUERY);
+ if (xNameAccess->getElementNames().getLength() > 0)
+ {
+ aModuleInfo.sModuleShortName = sModuleShortName;
+ aModuleInfo.bHasMenubar = sal_True;
+ }
+ }
+
+ uno::Reference< embed::XStorage > xToolbar = xModule->openStorageElement(TOOLBAR, embed::ElementModes::READ);
+ if (xToolbar.is())
+ {
+ const ::rtl::OUString RESOURCEURL_CUSTOM_ELEMENT = ::rtl::OUString::createFromAscii("custom_");
+ sal_Int32 nCustomLen = 7;
+
+ uno::Reference< container::XNameAccess > xNameAccess = uno::Reference< container::XNameAccess >(xToolbar, uno::UNO_QUERY);
+ ::uno::Sequence< ::rtl::OUString > lToolbars = xNameAccess->getElementNames();
+ for (sal_Int32 j=0; j<lToolbars.getLength(); ++j)
+ {
+ ::rtl::OUString sToolbarName = lToolbars[j];
+ if (sToolbarName.getLength()>=nCustomLen &&
+ sToolbarName.copy(0, nCustomLen).equals(RESOURCEURL_CUSTOM_ELEMENT))
+ continue;
+
+ aModuleInfo.sModuleShortName = sModuleShortName;
+ sal_Int32 nIndex = sToolbarName.lastIndexOf('.');
+ if (nIndex > 0)
+ {
+ ::rtl::OUString sExtension(sToolbarName.copy(nIndex));
+ ::rtl::OUString sToolbarResourceName(sToolbarName.copy(0, nIndex));
+ if (sToolbarResourceName.getLength()>0 && sExtension.equalsAsciiL(".xml", 4))
+ aModuleInfo.m_vToolbars.push_back(sToolbarResourceName);
+ }
+ }
+ }
+
+ if (aModuleInfo.sModuleShortName.getLength()>0)
+ vModulesInfo.push_back(aModuleInfo);
+ }
+ }
+
+ return vModulesInfo;
+}
+
+void MigrationImpl::compareOldAndNewConfig(const ::rtl::OUString& sParent,
+ const uno::Reference< container::XIndexContainer >& xIndexOld,
+ const uno::Reference< container::XIndexContainer >& xIndexNew,
+ const ::rtl::OUString& sResourceURL)
+{
+ ::std::vector< MigrationItem > vOldItems;
+ ::std::vector< MigrationItem > vNewItems;
+ uno::Sequence< beans::PropertyValue > aProp;
+ sal_Int32 nOldCount = xIndexOld->getCount();
+ sal_Int32 nNewCount = xIndexNew->getCount();
+
+ for (int n=0; n<nOldCount; ++n)
+ {
+ MigrationItem aMigrationItem;
+ if (xIndexOld->getByIndex(n) >>= aProp)
+ {
+ for(int i=0; i<aProp.getLength(); ++i)
+ {
+ if (aProp[i].Name.equals(ITEM_DESCRIPTOR_COMMANDURL))
+ aProp[i].Value >>= aMigrationItem.m_sCommandURL;
+ else if (aProp[i].Name.equals(ITEM_DESCRIPTOR_CONTAINER))
+ aProp[i].Value >>= aMigrationItem.m_xPopupMenu;
+ }
+
+ if (aMigrationItem.m_sCommandURL.getLength())
+ vOldItems.push_back(aMigrationItem);
+ }
+ }
+
+ for (int n=0; n<nNewCount; ++n)
+ {
+ MigrationItem aMigrationItem;
+ if (xIndexNew->getByIndex(n) >>= aProp)
+ {
+ for(int i=0; i<aProp.getLength(); ++i)
+ {
+ if (aProp[i].Name.equals(ITEM_DESCRIPTOR_COMMANDURL))
+ aProp[i].Value >>= aMigrationItem.m_sCommandURL;
+ else if (aProp[i].Name.equals(ITEM_DESCRIPTOR_CONTAINER))
+ aProp[i].Value >>= aMigrationItem.m_xPopupMenu;
+ }
+
+ if (aMigrationItem.m_sCommandURL.getLength())
+ vNewItems.push_back(aMigrationItem);
+ }
+ }
+
+ ::std::vector< MigrationItem >::iterator it;
+
+ ::rtl::OUString sSibling;
+ for (it = vOldItems.begin(); it!=vOldItems.end(); ++it)
+ {
+ ::std::vector< MigrationItem >::iterator pFound = ::std::find(vNewItems.begin(), vNewItems.end(), *it);
+ if (pFound != vNewItems.end() && it->m_xPopupMenu.is())
+ {
+ ::rtl::OUString sName;
+ if (sParent.getLength()>0)
+ sName = sParent + MENU_SEPERATOR + it->m_sCommandURL;
+ else
+ sName = it->m_sCommandURL;
+ compareOldAndNewConfig(sName, it->m_xPopupMenu, pFound->m_xPopupMenu, sResourceURL);
+ }
+ else if (pFound == vNewItems.end())
+ {
+ MigrationItem aMigrationItem(sParent, sSibling, it->m_sCommandURL, it->m_xPopupMenu);
+ if (m_aOldVersionItemsHashMap.find(sResourceURL)==m_aOldVersionItemsHashMap.end())
+ {
+ ::std::vector< MigrationItem > vMigrationItems;
+ m_aOldVersionItemsHashMap.insert(MigrationHashMap::value_type(sResourceURL, vMigrationItems));
+ m_aOldVersionItemsHashMap[sResourceURL].push_back(aMigrationItem);
+ }
+ else
+ {
+ if (::std::find(m_aOldVersionItemsHashMap[sResourceURL].begin(), m_aOldVersionItemsHashMap[sResourceURL].end(), aMigrationItem)==m_aOldVersionItemsHashMap[sResourceURL].end())
+ m_aOldVersionItemsHashMap[sResourceURL].push_back(aMigrationItem);
+ }
+ }
+
+ sSibling = it->m_sCommandURL;
+ }
+
+ ::rtl::OUString sNewSibling;
+ uno::Reference< container::XIndexContainer > xPopup;
+ for (it = vNewItems.begin(); it!=vNewItems.end(); ++it)
+ {
+ ::std::vector< MigrationItem >::iterator pFound = ::std::find(vOldItems.begin(), vOldItems.end(), *it);
+ if (pFound != vOldItems.end() && it->m_xPopupMenu.is())
+ {
+ ::rtl::OUString sName;
+ if (sParent.getLength()>0)
+ sName = sParent + MENU_SEPERATOR + it->m_sCommandURL;
+ else
+ sName = it->m_sCommandURL;
+ compareOldAndNewConfig(sName, pFound->m_xPopupMenu, it->m_xPopupMenu, sResourceURL);
+ }
+ else if (::std::find(vOldItems.begin(), vOldItems.end(), *it) == vOldItems.end())
+ {
+ MigrationItem aMigrationItem(sParent, sSibling, it->m_sCommandURL, it->m_xPopupMenu);
+ if (m_aNewVersionItemsHashMap.find(sResourceURL)==m_aNewVersionItemsHashMap.end())
+ {
+ ::std::vector< MigrationItem > vMigrationItems;
+ m_aNewVersionItemsHashMap.insert(MigrationHashMap::value_type(sResourceURL, vMigrationItems));
+ m_aNewVersionItemsHashMap[sResourceURL].push_back(aMigrationItem);
+ }
+ else
+ {
+ if (::std::find(m_aNewVersionItemsHashMap[sResourceURL].begin(), m_aNewVersionItemsHashMap[sResourceURL].end(), aMigrationItem)==m_aNewVersionItemsHashMap[sResourceURL].end())
+ m_aNewVersionItemsHashMap[sResourceURL].push_back(aMigrationItem);
+ }
+ }
+ }
+}
+
+void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurationManager >& xCfgManager,
+ const uno::Reference< container::XIndexContainer>& xIndexContainer,
+ const ::rtl::OUString& sModuleIdentifier,
+ const ::rtl::OUString& sResourceURL)
+{
+ MigrationHashMap::iterator pFound = m_aOldVersionItemsHashMap.find(sResourceURL);
+ if (pFound==m_aOldVersionItemsHashMap.end())
+ return;
+
+ ::std::vector< MigrationItem >::iterator it;
+ for (it=pFound->second.begin(); it!=pFound->second.end(); ++it)
+ {
+ uno::Reference< container::XIndexContainer > xTemp = xIndexContainer;
+
+ ::rtl::OUString sParentNodeName = it->m_sParentNodeName;
+ sal_Int32 nIndex = 0;
+ do
+ {
+ ::rtl::OUString sToken = sParentNodeName.getToken(0, '|', nIndex).trim();
+ if (sToken.getLength()<=0)
+ break;
+
+ sal_Int32 nCount = xTemp->getCount();
+ for (sal_Int32 i=0; i<nCount; ++i)
+ {
+ ::rtl::OUString sCommandURL;
+ ::rtl::OUString sLabel;
+ uno::Reference< container::XIndexContainer > xChild;
+
+ uno::Sequence< beans::PropertyValue > aPropSeq;
+ xTemp->getByIndex(i) >>= aPropSeq;
+ for (sal_Int32 j=0; j<aPropSeq.getLength(); ++j)
+ {
+ ::rtl::OUString sPropName = aPropSeq[j].Name;
+ if (sPropName.equals(ITEM_DESCRIPTOR_COMMANDURL))
+ aPropSeq[j].Value >>= sCommandURL;
+ else if (sPropName.equals(ITEM_DESCRIPTOR_LABEL))
+ aPropSeq[j].Value >>= sLabel;
+ else if (sPropName.equals(ITEM_DESCRIPTOR_CONTAINER))
+ aPropSeq[j].Value >>= xChild;
+ }
+
+ if (sCommandURL == sToken)
+ {
+ xTemp = xChild;
+ break;
+ }
+ }
+
+ } while (nIndex>=0);
+
+ if (nIndex == -1)
+ {
+ uno::Sequence< beans::PropertyValue > aPropSeq(3);
+
+ aPropSeq[0].Name = ITEM_DESCRIPTOR_COMMANDURL;
+ aPropSeq[0].Value <<= it->m_sCommandURL;
+ aPropSeq[1].Name = ITEM_DESCRIPTOR_LABEL;
+ aPropSeq[1].Value <<= retrieveLabelFromCommand(it->m_sCommandURL, sModuleIdentifier);
+ aPropSeq[2].Name = ITEM_DESCRIPTOR_CONTAINER;
+ aPropSeq[2].Value <<= it->m_xPopupMenu;
+
+ if (it->m_sPrevSibling.getLength() == 0)
+ xTemp->insertByIndex(0, uno::makeAny(aPropSeq));
+ else if (it->m_sPrevSibling.getLength() > 0)
+ {
+ sal_Int32 nCount = xTemp->getCount();
+ sal_Int32 i = 0;
+ for (; i<nCount; ++i)
+ {
+ ::rtl::OUString sCmd;
+ uno::Sequence< beans::PropertyValue > aTempPropSeq;
+ xTemp->getByIndex(i) >>= aTempPropSeq;
+ for (sal_Int32 j=0; j<aTempPropSeq.getLength(); ++j)
+ {
+ if (aTempPropSeq[j].Name.equals(ITEM_DESCRIPTOR_COMMANDURL))
+ {
+ aTempPropSeq[j].Value >>= sCmd;
+ break;
+ }
+ }
+
+ if (sCmd.equals(it->m_sPrevSibling))
+ break;
+ }
+
+ xTemp->insertByIndex(i+1, uno::makeAny(aPropSeq));
+ }
+ }
+ }
+
+ uno::Reference< container::XIndexAccess > xIndexAccess(xIndexContainer, uno::UNO_QUERY);
+ if (xIndexAccess.is())
+ xCfgManager->replaceSettings(sResourceURL, xIndexAccess);
+
+ uno::Reference< ui::XUIConfigurationPersistence > xUIConfigurationPersistence(xCfgManager, uno::UNO_QUERY);
+ if (xUIConfigurationPersistence.is())
+ xUIConfigurationPersistence->store();
+}
+
+uno::Reference< ui::XUIConfigurationManager > NewVersionUIInfo::getConfigManager(const ::rtl::OUString& sModuleShortName) const
+{
+ uno::Reference< ui::XUIConfigurationManager > xCfgManager;
+
+ for (sal_Int32 i=0; i<m_lCfgManagerSeq.getLength(); ++i)
+ {
+ if (m_lCfgManagerSeq[i].Name.equals(sModuleShortName))
+ {
+ m_lCfgManagerSeq[i].Value >>= xCfgManager;
+ break;
+ }
+ }
+
+ return xCfgManager;
+}
+
+uno::Reference< container::XIndexContainer > NewVersionUIInfo::getNewMenubarSettings(const ::rtl::OUString& sModuleShortName) const
+{
+ uno::Reference< container::XIndexContainer > xNewMenuSettings;
+
+ for (sal_Int32 i=0; i<m_lNewVersionMenubarSettingsSeq.getLength(); ++i)
+ {
+ if (m_lNewVersionMenubarSettingsSeq[i].Name.equals(sModuleShortName))
+ {
+ m_lNewVersionMenubarSettingsSeq[i].Value >>= xNewMenuSettings;
+ break;
+ }
+ }
+
+ return xNewMenuSettings;
+}
+
+uno::Reference< container::XIndexContainer > NewVersionUIInfo::getNewToolbarSettings(const ::rtl::OUString& sModuleShortName, const ::rtl::OUString& sToolbarName) const
+{
+ uno::Reference< container::XIndexContainer > xNewToolbarSettings;
+
+ for (sal_Int32 i=0; i<m_lNewVersionToolbarSettingsSeq.getLength(); ++i)
+ {
+ if (m_lNewVersionToolbarSettingsSeq[i].Name.equals(sModuleShortName))
+ {
+ uno::Sequence< beans::PropertyValue > lToolbarSettingsSeq;
+ m_lNewVersionToolbarSettingsSeq[i].Value >>= lToolbarSettingsSeq;
+ for (sal_Int32 j=0; j<lToolbarSettingsSeq.getLength(); ++j)
+ {
+ if (lToolbarSettingsSeq[j].Name.equals(sToolbarName))
+ {
+ lToolbarSettingsSeq[j].Value >>= xNewToolbarSettings;
+ break;
+ }
+ }
+
+ break;
+ }
+ }
+
+ return xNewToolbarSettings;
+}
+
+void NewVersionUIInfo::init(const ::std::vector< MigrationModuleInfo >& vModulesInfo)
+{
+ m_lCfgManagerSeq.realloc(vModulesInfo.size());
+ m_lNewVersionMenubarSettingsSeq.realloc(vModulesInfo.size());
+ m_lNewVersionToolbarSettingsSeq.realloc(vModulesInfo.size());
+
+ const ::rtl::OUString sModuleCfgSupplier = ::rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier");
+ const ::rtl::OUString sMenubarResourceURL = ::rtl::OUString::createFromAscii("private:resource/menubar/menubar");
+ const ::rtl::OUString sToolbarResourcePre = ::rtl::OUString::createFromAscii("private:resource/toolbar/");
+
+ uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier = uno::Reference< ui::XModuleUIConfigurationManagerSupplier >(::comphelper::getProcessServiceFactory()->createInstance(sModuleCfgSupplier), uno::UNO_QUERY);
+
+ for (sal_uInt32 i=0; i<vModulesInfo.size(); ++i)
+ {
+ ::rtl::OUString sModuleIdentifier = mapModuleShortNameToIdentifier(vModulesInfo[i].sModuleShortName);
+ if (sModuleIdentifier.getLength() > 0)
+ {
+ uno::Reference< ui::XUIConfigurationManager > xCfgManager = xModuleCfgSupplier->getUIConfigurationManager(sModuleIdentifier);
+ m_lCfgManagerSeq[i].Name = vModulesInfo[i].sModuleShortName;
+ m_lCfgManagerSeq[i].Value <<= xCfgManager;
+
+ if (vModulesInfo[i].bHasMenubar)
+ {
+ m_lNewVersionMenubarSettingsSeq[i].Name = vModulesInfo[i].sModuleShortName;
+ m_lNewVersionMenubarSettingsSeq[i].Value <<= xCfgManager->getSettings(sMenubarResourceURL, sal_True);
+ }
+
+ sal_Int32 nToolbars = vModulesInfo[i].m_vToolbars.size();
+ if (nToolbars > 0)
+ {
+ uno::Sequence< beans::PropertyValue > lPropSeq(nToolbars);
+ for (sal_Int32 j=0; j<nToolbars; ++j)
+ {
+ ::rtl::OUString sToolbarName = vModulesInfo[i].m_vToolbars[j];
+ ::rtl::OUString sToolbarResourceURL = sToolbarResourcePre + sToolbarName;
+
+ lPropSeq[j].Name = sToolbarName;
+ lPropSeq[j].Value <<= xCfgManager->getSettings(sToolbarResourceURL, sal_True);
+ }
+
+ m_lNewVersionToolbarSettingsSeq[i].Name = vModulesInfo[i].sModuleShortName;
+ m_lNewVersionToolbarSettingsSeq[i].Value <<= lPropSeq;
+ }
+ }
+ }
+}
+
} // namespace desktop
diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx
index 8cad1cce4b16..f73e44fea523 100644
--- a/desktop/source/migration/migration_impl.hxx
+++ b/desktop/source/migration/migration_impl.hxx
@@ -30,6 +30,7 @@
#include <vector>
#include <algorithm>
#include <memory>
+#include <hash_map>
#include "migration.hxx"
@@ -41,6 +42,13 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/container/XIndexContainer.hpp>
+#include <com/sun/star/lang/XSingleComponentFactory.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/XUIConfigurationManager.hpp>
+#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
#define NS_CSS com::sun::star
#define NS_UNO com::sun::star::uno
@@ -80,6 +88,107 @@ typedef std::vector< migration_step > migrations_v;
typedef std::auto_ptr< migrations_v > migrations_vr;
typedef std::vector< supported_migration > migrations_available;
+//__________________________________________
+/**
+ define the item, e.g.:menuitem, toolbaritem, to be migrated. we keep the information
+ of the command URL, the previous sibling node and the parent node of a item
+*/
+struct MigrationItem
+{
+ ::rtl::OUString m_sParentNodeName;
+ ::rtl::OUString m_sPrevSibling;
+ ::rtl::OUString m_sCommandURL;
+ NS_UNO::Reference< NS_CSS::container::XIndexContainer > m_xPopupMenu;
+
+ MigrationItem()
+ :m_xPopupMenu(0)
+ {
+ }
+
+ MigrationItem(const ::rtl::OUString& sParentNodeName,
+ const ::rtl::OUString& sPrevSibling,
+ const ::rtl::OUString& sCommandURL,
+ const NS_UNO::Reference< NS_CSS::container::XIndexContainer > xPopupMenu)
+ {
+ m_sParentNodeName = sParentNodeName;
+ m_sPrevSibling = sPrevSibling;
+ m_sCommandURL = sCommandURL;
+ m_xPopupMenu = xPopupMenu;
+ }
+
+ MigrationItem& operator=(const MigrationItem& aMigrationItem)
+ {
+ m_sParentNodeName = aMigrationItem.m_sParentNodeName;
+ m_sPrevSibling = aMigrationItem.m_sPrevSibling;
+ m_sCommandURL = aMigrationItem.m_sCommandURL;
+ m_xPopupMenu = aMigrationItem.m_xPopupMenu;
+
+ return *this;
+ }
+
+ sal_Bool operator==(const MigrationItem& aMigrationItem)
+ {
+ return ( aMigrationItem.m_sParentNodeName == m_sParentNodeName &&
+ aMigrationItem.m_sPrevSibling == m_sPrevSibling &&
+ aMigrationItem.m_sCommandURL == m_sCommandURL &&
+ aMigrationItem.m_xPopupMenu.is() == m_xPopupMenu.is() );
+ }
+
+ ::rtl::OUString GetPrevSibling() const { return m_sPrevSibling; }
+};
+
+typedef ::std::hash_map< ::rtl::OUString,
+ ::std::vector< MigrationItem >,
+ ::rtl::OUStringHash,
+ ::std::equal_to< ::rtl::OUString > > MigrationHashMap;
+
+struct MigrationItemInfo
+{
+ ::rtl::OUString m_sResourceURL;
+ MigrationItem m_aMigrationItem;
+
+ MigrationItemInfo(){}
+
+ MigrationItemInfo(const ::rtl::OUString& sResourceURL, const MigrationItem& aMigratiionItem)
+ {
+ m_sResourceURL = sResourceURL;
+ m_aMigrationItem = aMigratiionItem;
+ }
+};
+
+//__________________________________________
+/**
+ information for the UI elements to be migrated for one module
+*/
+struct MigrationModuleInfo
+{
+ ::rtl::OUString sModuleShortName;
+ sal_Bool bHasMenubar;
+ ::std::vector< ::rtl::OUString > m_vToolbars;
+
+ MigrationModuleInfo():bHasMenubar(sal_False){};
+};
+
+//__________________________________________
+/**
+ get the information before copying the ui configuration files of old version to new version
+*/
+class NewVersionUIInfo
+{
+public:
+
+ NS_UNO::Reference< NS_CSS::ui::XUIConfigurationManager > getConfigManager(const ::rtl::OUString& sModuleShortName) const;
+ NS_UNO::Reference< NS_CSS::container::XIndexContainer > getNewMenubarSettings(const ::rtl::OUString& sModuleShortName) const;
+ NS_UNO::Reference< NS_CSS::container::XIndexContainer > getNewToolbarSettings(const ::rtl::OUString& sModuleShortName, const ::rtl::OUString& sToolbarName) const;
+ void init(const ::std::vector< MigrationModuleInfo >& vModulesInfo);
+
+private:
+
+ NS_UNO::Sequence< NS_CSS::beans::PropertyValue > m_lCfgManagerSeq;
+ NS_UNO::Sequence< NS_CSS::beans::PropertyValue > m_lNewVersionMenubarSettingsSeq;
+ NS_UNO::Sequence< NS_CSS::beans::PropertyValue > m_lNewVersionToolbarSettingsSeq;
+};
+
class MigrationImpl
{
@@ -91,6 +200,9 @@ private:
migrations_vr m_vrMigrations; // list of all migration specs from config
install_info m_aInfo; // info about the version being migrated
strings_vr m_vrFileList; // final list of files to be copied
+ MigrationHashMap m_aOldVersionItemsHashMap;
+ MigrationHashMap m_aNewVersionItemsHashMap;
+ ::rtl::OUString m_sModuleIdentifier;
// functions to control the migration process
bool readAvailableMigrations(migrations_available&);
@@ -105,6 +217,16 @@ private:
strings_vr applyPatterns(const strings_v& vSet, const strings_v& vPatterns) const;
NS_UNO::Reference< NS_CSS::container::XNameAccess > getConfigAccess(const sal_Char* path, sal_Bool rw=sal_False);
+ ::std::vector< MigrationModuleInfo > dectectUIChangesForAllModules() const;
+ void compareOldAndNewConfig(const ::rtl::OUString& sParentNodeName,
+ const NS_UNO::Reference< NS_CSS::container::XIndexContainer >& xOldIndexContainer,
+ const NS_UNO::Reference< NS_CSS::container::XIndexContainer >& xNewIndexContainer,
+ const ::rtl::OUString& sToolbarName);
+ void mergeOldToNewVersion(const NS_UNO::Reference< NS_CSS::ui::XUIConfigurationManager >& xCfgManager,
+ const NS_UNO::Reference< NS_CSS::container::XIndexContainer>& xIndexContainer,
+ const ::rtl::OUString& sModuleIdentifier,
+ const ::rtl::OUString& sResourceURL);
+
// actual processing function that perform the migration steps
void copyFiles();
void copyConfig();
diff --git a/desktop/source/migration/pages.cxx b/desktop/source/migration/pages.cxx
index 11cc61ed84ff..53ec488c2082 100644
--- a/desktop/source/migration/pages.cxx
+++ b/desktop/source/migration/pages.cxx
@@ -357,9 +357,9 @@ MigrationPage::MigrationPage(
m_ftBody.SetText( aText );
}
-sal_Bool MigrationPage::commitPage( CommitPageReason _eReason )
+sal_Bool MigrationPage::commitPage( svt::WizardTypes::CommitPageReason _eReason )
{
- if (_eReason == eTravelForward && m_cbMigration.IsChecked() && !m_bMigrationDone)
+ if (_eReason == svt::WizardTypes::eTravelForward && m_cbMigration.IsChecked() && !m_bMigrationDone)
{
GetParent()->EnterWait();
FirstStartWizard* pWizard = dynamic_cast< FirstStartWizard* >( GetParent() );
@@ -433,7 +433,7 @@ UserPage::UserPage( svt::OWizardMachine* parent, const ResId& resid)
}
}
-sal_Bool UserPage::commitPage( CommitPageReason )
+sal_Bool UserPage::commitPage( svt::WizardTypes::CommitPageReason )
{
SvtUserOptions aUserOpt;
aUserOpt.SetFirstName(m_edFirst.GetText());
@@ -463,9 +463,9 @@ UpdateCheckPage::UpdateCheckPage( svt::OWizardMachine* parent, const ResId& resi
_setBold(m_ftHead);
}
-sal_Bool UpdateCheckPage::commitPage( CommitPageReason _eReason )
+sal_Bool UpdateCheckPage::commitPage( svt::WizardTypes::CommitPageReason _eReason )
{
- if ( _eReason == eTravelForward )
+ if ( _eReason == svt::WizardTypes::eTravelForward )
{
try {
Reference < XNameReplace > xUpdateAccess;
@@ -589,9 +589,9 @@ void RegistrationPage::updateButtonStates()
m_rbNever.Show( m_bNeverVisible );
}
-sal_Bool RegistrationPage::commitPage( CommitPageReason _eReason )
+sal_Bool RegistrationPage::commitPage( svt::WizardTypes::CommitPageReason _eReason )
{
- if ( _eReason == eFinish )
+ if ( _eReason == svt::WizardTypes::eFinish )
{
::utl::RegOptions aOptions;
rtl::OUString aEvent;
@@ -665,7 +665,7 @@ void RegistrationPage::executeSingleMode()
// the registration modes "Now" and "Later" are handled by the page
RegistrationPage::RegistrationMode eMode = pPage->getRegistrationMode();
if ( eMode == RegistrationPage::rmNow || eMode == RegistrationPage::rmLater )
- pPage->commitPage( IWizardPage::eFinish );
+ pPage->commitPage( WizardTypes::eFinish );
if ( eMode != RegistrationPage::rmLater )
::utl::RegOptions().removeReminder();
}
diff --git a/desktop/source/migration/pages.hxx b/desktop/source/migration/pages.hxx
index 9740773fe602..776268eb475c 100644
--- a/desktop/source/migration/pages.hxx
+++ b/desktop/source/migration/pages.hxx
@@ -125,7 +125,7 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::awt::XThrobber > m_xThrobber;
public:
MigrationPage( svt::OWizardMachine* parent, const ResId& resid, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XThrobber > xThrobber );
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason );
protected:
virtual void ActivatePage();
@@ -148,7 +148,7 @@ private:
public:
UserPage( svt::OWizardMachine* parent, const ResId& resid);
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason );
protected:
virtual void ActivatePage();
};
@@ -161,7 +161,7 @@ private:
CheckBox m_cbUpdateCheck;
public:
UpdateCheckPage( svt::OWizardMachine* parent, const ResId& resid);
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason );
protected:
virtual void ActivatePage();
@@ -188,7 +188,7 @@ protected:
virtual bool canAdvance() const;
virtual void ActivatePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason );
public:
RegistrationPage( Window* parent, const ResId& resid);
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
index 0b757212eaa6..2e3a8d1d518c 100755..100644
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -373,35 +373,6 @@ bool OO3ExtensionMigration::migrateExtension( const ::rtl::OUString& sSourceDir
return false;
}
-bool OO3ExtensionMigration::copy( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir )
-{
- bool bRet = false;
-
- INetURLObject aSourceObj( sSourceDir );
- INetURLObject aDestObj( sTargetDir );
- String aName = aDestObj.getName();
- aDestObj.removeSegment();
- aDestObj.setFinalSlash();
-
- try
- {
- ::ucbhelper::Content aDestPath( aDestObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
- uno::Reference< ucb::XCommandInfo > xInfo = aDestPath.getCommands();
- ::rtl::OUString aTransferName = ::rtl::OUString::createFromAscii( "transfer" );
- if ( xInfo->hasCommandByName( aTransferName ) )
- {
- aDestPath.executeCommand( aTransferName, uno::makeAny(
- ucb::TransferInfo( sal_False, aSourceObj.GetMainURL( INetURLObject::NO_DECODE ), aName, ucb::NameClash::OVERWRITE ) ) );
- bRet = true;
- }
- }
- catch( uno::Exception& )
- {
- }
-
- return bRet;
-}
-
// -----------------------------------------------------------------------------
// XServiceInfo
@@ -487,32 +458,6 @@ TStringVectorPtr getContent( const ::rtl::OUString& rBaseURL )
return aResult;
}
-// -----------------------------------------------------------------------------
-// XJob
-// -----------------------------------------------------------------------------
-
-void OO3ExtensionMigration::copyConfig( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir )
-{
- ::rtl::OUString sEx1( m_sSourceDir );
- sEx1 += sExcludeDir1;
- ::rtl::OUString sEx2( m_sSourceDir );
- sEx2 += sExcludeDir2;
-
- TStringVectorPtr aList = getContent( sSourceDir );
- TStringVector::const_iterator aI = aList->begin();
- while ( aI != aList->end() )
- {
- ::rtl::OUString sSourceLocalName = aI->copy( sSourceDir.getLength() );
- ::rtl::OUString aTemp = aI->copy( m_sSourceDir.getLength() );
- if ( aTemp != sExcludeDir1 && aTemp != sExcludeDir2 )
- {
- ::rtl::OUString sTargetName = sTargetDir + sSourceLocalName;
- copy( (*aI), sTargetName );
- }
- ++aI;
- }
-}
-
Any OO3ExtensionMigration::execute( const Sequence< beans::NamedValue >& )
throw (lang::IllegalArgumentException, Exception, RuntimeException)
{
@@ -550,12 +495,6 @@ TmpRepositoryCommandEnv::TmpRepositoryCommandEnv()
{
}
-TmpRepositoryCommandEnv::TmpRepositoryCommandEnv(
- uno::Reference< task::XInteractionHandler> const & handler)
- : m_forwardHandler(handler)
-{
-}
-
TmpRepositoryCommandEnv::~TmpRepositoryCommandEnv()
{
}
diff --git a/desktop/source/migration/services/oo3extensionmigration.hxx b/desktop/source/migration/services/oo3extensionmigration.hxx
index 7962da177217..03995652888c 100755..100644
--- a/desktop/source/migration/services/oo3extensionmigration.hxx
+++ b/desktop/source/migration/services/oo3extensionmigration.hxx
@@ -97,8 +97,6 @@ namespace migration
};
::osl::FileBase::RC checkAndCreateDirectory( INetURLObject& rDirURL );
- void copyConfig( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir );
- bool copy( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir );
ScanResult scanExtensionFolder( const ::rtl::OUString& sExtFolder );
void scanUserExtensions( const ::rtl::OUString& sSourceDir, TStringVector& aMigrateExtensions );
bool scanDescriptionXml( const ::rtl::OUString& sDescriptionXmlFilePath );
@@ -138,8 +136,6 @@ namespace migration
public:
virtual ~TmpRepositoryCommandEnv();
TmpRepositoryCommandEnv();
- TmpRepositoryCommandEnv(
- ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler> const & handler);
// XCommandEnvironment
virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > SAL_CALL
diff --git a/desktop/source/migration/wizard.cxx b/desktop/source/migration/wizard.cxx
index 48ee2abc71ca..81a789a613b9 100644
--- a/desktop/source/migration/wizard.cxx
+++ b/desktop/source/migration/wizard.cxx
@@ -219,11 +219,6 @@ FirstStartWizard::FirstStartWizard( Window* pParent, sal_Bool bLicenseNeedsAccep
defaultButton(WZB_NEXT);
}
-void FirstStartWizard::EnableButtonsWhileMigration()
-{
- enableButtons(0xff, sal_True);
-}
-
void FirstStartWizard::DisableButtonsWhileMigration()
{
enableButtons(0xff, sal_False);
@@ -439,10 +434,10 @@ sal_Bool FirstStartWizard::leaveState(WizardState)
return sal_True;
}
-sal_Bool FirstStartWizard::onFinish(sal_Int32 _nResult)
+sal_Bool FirstStartWizard::onFinish()
{
// return sal_True;
- if (svt::RoadmapWizard::onFinish(_nResult))
+ if ( svt::RoadmapWizard::onFinish() )
{
#ifndef OS2 // cannot enable quickstart on first startup, see shutdownicon.cxx comments.
enableQuickstart();
diff --git a/desktop/source/migration/wizard.hxx b/desktop/source/migration/wizard.hxx
index e41bfe373cde..3317880f8bd6 100644
--- a/desktop/source/migration/wizard.hxx
+++ b/desktop/source/migration/wizard.hxx
@@ -62,7 +62,6 @@ public:
virtual short Execute();
virtual long PreNotify( NotifyEvent& rNEvt );
- void EnableButtonsWhileMigration();
void DisableButtonsWhileMigration();
private:
@@ -97,7 +96,7 @@ protected:
virtual TabPage* createPage(WizardState _nState);
virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason );
virtual sal_Bool leaveState(WizardState _nState );
- virtual sal_Bool onFinish(sal_Int32 _nResult);
+ virtual sal_Bool onFinish();
virtual void enterState(WizardState _nState);
// from svt::RoadmapWizard
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx
index 0f426c6ad2ba..6c67bded2b17 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx
@@ -62,11 +62,48 @@ namespace drawinglayer
To get better text quality, it is suggested to handle tis primitive directly
in a renderer. In that case, e.g. hintings on the system can be supported.
+
+ @param maTextTransform
+ The text transformation contains the text start position (always baselined)
+ as translation, the FontSize as scale (where width relative to height defines
+ font scaling and width == height means no font scaling) and the font rotation
+ and shear.
+ When shear is used and a renderer does not support it, it may be better to use
+ the decomposition which will do everything correctly. Same is true for mirroring
+ which would be expressed as negative scalings.
+
+ @param rText
+ The text to be used. Only a part may be used, but a bigger part of the string
+ may be necessary for correct layouting (e.g. international)
+
+ @param aTextPosition
+ The index to the first character to use from rText
+
+ @param aTextLength
+ The number of characters to use from rText
+
+ @param rDXArray
+ The distances between the characters. This parameter may be empty, in that case
+ the renderer is responsible to do something useful. If it is given, it has to be of
+ the size aTextLength. Its values are in logical coordinates and describe the
+ distance for each character to use. This is independent from the font width which
+ is given with maTextTransform. The first value is the offset to use from the start
+ point in FontCoordinateSystem X-Direction (given by maTextTransform) to the start
+ point of the second character
+
+ @param rFontAttribute
+ The font definition
+
+ @param rLocale
+ The locale to use
+
+ @param rFontColor
+ The font color to use
*/
class TextSimplePortionPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
- /// text range transformation from unit range ([0.0 .. 1.0]) to text range
+ /// text transformation (FontCoordinateSystem)
basegfx::B2DHomMatrix maTextTransform;
/// The text, used from maTextPosition up to maTextPosition + maTextLength
@@ -78,10 +115,10 @@ namespace drawinglayer
/// The length for maText usage, starting from maTextPosition
xub_StrLen maTextLength;
- /// The DX array scale-independent in unit coordinates
+ /// The DX array in logic units
::std::vector< double > maDXArray;
- /// The font to use
+ /// The font definition
attribute::FontAttribute maFontAttribute;
/// The Locale for the text
@@ -90,7 +127,7 @@ namespace drawinglayer
/// font color
basegfx::BColor maFontColor;
- /// #i96669# add simple range buffering for this primitive
+ /// #i96669# internal: add simple range buffering for this primitive
basegfx::B2DRange maB2DRange;
protected:
diff --git a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx
index 23d8e7edd913..93ebfeab48e7 100644
--- a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx
+++ b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx
@@ -54,9 +54,12 @@ namespace drawinglayer
class Shadow3DExtractingProcessor : public BaseProcessor3D
{
private:
+ /// typedef for data handling
+ typedef std::vector< primitive2d::BasePrimitive2D* > BasePrimitive2DVector;
+
/// result holding vector (2D) and target vector for stacking (inited to &maPrimitive2DSequence)
- primitive2d::Primitive2DSequence maPrimitive2DSequence;
- primitive2d::Primitive2DSequence* mpPrimitive2DSequence;
+ BasePrimitive2DVector maPrimitive2DSequence;
+ BasePrimitive2DVector* mpPrimitive2DSequence;
/// object transformation for scene for 2d definition
basegfx::B2DHomMatrix maObjectTransformation;
@@ -93,6 +96,10 @@ namespace drawinglayer
*/
virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate);
+ /// helper to convert from BasePrimitive2DVector to primitive2d::Primitive2DSequence
+ const primitive2d::Primitive2DSequence getPrimitive2DSequenceFromBasePrimitive2DVector(
+ const BasePrimitive2DVector& rVector) const;
+
public:
Shadow3DExtractingProcessor(
const geometry::ViewInformation3D& rViewInformation,
@@ -100,9 +107,10 @@ namespace drawinglayer
const basegfx::B3DVector& rLightNormal,
double fShadowSlant,
const basegfx::B3DRange& rContained3DRange);
+ virtual ~Shadow3DExtractingProcessor();
/// data read access
- const primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
+ const primitive2d::Primitive2DSequence getPrimitive2DSequence() const;
const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; }
const basegfx::B3DHomMatrix& getWorldToEye() const { return maWorldToEye; }
const basegfx::B3DHomMatrix& getEyeToView() const { return maEyeToView; }
diff --git a/drawinglayer/prj/d.lst b/drawinglayer/prj/d.lst
index 7ae13f8ebe33..e863e47a3b18 100644
--- a/drawinglayer/prj/d.lst
+++ b/drawinglayer/prj/d.lst
@@ -55,7 +55,6 @@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\primitive3d
..\inc\drawinglayer\primitive3d\baseprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\baseprimitive3d.hxx
..\inc\drawinglayer\primitive3d\groupprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\groupprimitive3d.hxx
..\inc\drawinglayer\primitive3d\hatchtextureprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\hatchtextureprimitive3d.hxx
-..\inc\drawinglayer\primitive2d\hiddengeometryprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\hiddengeometryprimitive3d.hxx
..\inc\drawinglayer\primitive3d\modifiedcolorprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\modifiedcolorprimitive3d.hxx
..\inc\drawinglayer\primitive3d\polygonprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\polygonprimitive3d.hxx
..\inc\drawinglayer\primitive3d\polygontubeprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\polygontubeprimitive3d.hxx
@@ -95,7 +94,6 @@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\processor3d
..\inc\drawinglayer\processor3d\cutfindprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\cutfindprocessor3d.hxx
..\inc\drawinglayer\processor3d\defaultprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\defaultprocessor3d.hxx
..\inc\drawinglayer\processor3d\zbufferprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\zbufferprocessor3d.hxx
-..\inc\drawinglayer\processor3d\tbufferprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\tbufferprocessor3d.hxx
mkdir: %_DEST%\inc%_EXT%\drawinglayer\attribute
..\inc\drawinglayer\attribute\fillgradientattribute.hxx %_DEST%\inc%_EXT%\drawinglayer\attribute\fillgradientattribute.hxx
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 238c47419eb9..6fa1cef2d23f 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -94,8 +94,10 @@ namespace
basegfx::BColor maTextLineColor;
basegfx::BColor maOverlineColor;
- /// clipping, font, etc.
- Region maRegion;
+ /// clipping
+ basegfx::B2DPolyPolygon maClipPolyPoygon;
+
+ /// font, etc.
Font maFont;
RasterOp maRasterOp;
sal_uInt32 mnLayoutMode;
@@ -110,7 +112,7 @@ namespace
bool mbTextFillColor : 1;
bool mbTextLineColor : 1;
bool mbOverlineColor : 1;
- bool mbRegion : 1;
+ bool mbClipPolyPolygonActive : 1;
public:
PropertyHolder()
@@ -122,7 +124,7 @@ namespace
maTextFillColor(),
maTextLineColor(),
maOverlineColor(),
- maRegion(),
+ maClipPolyPoygon(),
maFont(),
maRasterOp(ROP_OVERPAINT),
mnLayoutMode(0),
@@ -134,7 +136,7 @@ namespace
mbTextFillColor(false),
mbTextLineColor(false),
mbOverlineColor(false),
- mbRegion(false)
+ mbClipPolyPolygonActive(false)
{
}
@@ -179,10 +181,10 @@ namespace
bool getOverlineColorActive() const { return mbOverlineColor; }
void setOverlineColorActive(bool bNew) { if(bNew != mbOverlineColor) mbOverlineColor = bNew; }
- const Region& getRegion() const { return maRegion; }
- void setRegion(const Region& rRegion) { if(rRegion != maRegion) maRegion = rRegion; }
- bool getRegionActive() const { return mbRegion; }
- void setRegionActive(bool bNew) { if(bNew != mbRegion) mbRegion = bNew; }
+ const basegfx::B2DPolyPolygon& getClipPolyPolygon() const { return maClipPolyPoygon; }
+ void setClipPolyPolygon(const basegfx::B2DPolyPolygon& rNew) { if(rNew != maClipPolyPoygon) maClipPolyPoygon = rNew; }
+ bool getClipPolyPolygonActive() const { return mbClipPolyPolygonActive; }
+ void setClipPolyPolygonActive(bool bNew) { if(bNew != mbClipPolyPolygonActive) mbClipPolyPolygonActive = bNew; }
const Font& getFont() const { return maFont; }
void setFont(const Font& rFont) { if(rFont != maFont) maFont = rFont; }
@@ -235,6 +237,12 @@ namespace
return maPropertyHolders.size();
}
+ void PushDefault()
+ {
+ PropertyHolder* pNew = new PropertyHolder();
+ maPropertyHolders.push_back(pNew);
+ }
+
void Push(sal_uInt16 nPushFlags)
{
if(nPushFlags)
@@ -291,8 +299,8 @@ namespace
}
if(!(nPushFlags & PUSH_CLIPREGION ))
{
- pLast->setRegion(pTip->getRegion());
- pLast->setRegionActive(pTip->getRegionActive());
+ pLast->setClipPolyPolygon(pTip->getClipPolyPolygon());
+ pLast->setClipPolyPolygonActive(pTip->getClipPolyPolygonActive());
}
if(!(nPushFlags & PUSH_RASTEROP ))
{
@@ -336,11 +344,11 @@ namespace
}
}
}
-
- // execute the pop
- delete maPropertyHolders.back();
- maPropertyHolders.pop_back();
}
+
+ // execute the pop
+ delete maPropertyHolders.back();
+ maPropertyHolders.pop_back();
}
}
@@ -465,25 +473,18 @@ namespace
// the buffer to not delete them in the destructor.
aTargets.clear();
- if(xRetval.hasElements() && rPropertyHolder.getRegionActive())
+ if(xRetval.hasElements() && rPropertyHolder.getClipPolyPolygonActive())
{
- const Region& rRegion = rPropertyHolder.getRegion();
+ const basegfx::B2DPolyPolygon& rClipPolyPolygon = rPropertyHolder.getClipPolyPolygon();
- if(!rRegion.IsEmpty())
+ if(rClipPolyPolygon.count())
{
- basegfx::B2DPolyPolygon aClipPolyPolygon(getB2DPolyPolygonFromRegion(rRegion));
+ const drawinglayer::primitive2d::Primitive2DReference xMask(
+ new drawinglayer::primitive2d::MaskPrimitive2D(
+ rClipPolyPolygon,
+ xRetval));
- if(aClipPolyPolygon.count())
- {
- aClipPolyPolygon.transform(rPropertyHolder.getTransformation());
-
- const drawinglayer::primitive2d::Primitive2DReference xMask(
- new drawinglayer::primitive2d::MaskPrimitive2D(
- aClipPolyPolygon,
- xRetval));
-
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xMask, 1);
- }
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xMask, 1);
}
}
@@ -943,14 +944,17 @@ namespace
default : // case HATCH_SINGLE :
{
aHatchStyle = drawinglayer::attribute::HATCHSTYLE_SINGLE;
+ break;
}
case HATCH_DOUBLE :
{
aHatchStyle = drawinglayer::attribute::HATCHSTYLE_DOUBLE;
+ break;
}
case HATCH_TRIPLE :
{
aHatchStyle = drawinglayer::attribute::HATCHSTYLE_TRIPLE;
+ break;
}
}
@@ -969,53 +973,56 @@ namespace
a new target for embracing new geometry to the current region
*/
void HandleNewClipRegion(
- const Region* pRegion,
+ const basegfx::B2DPolyPolygon& rClipPolyPolygon,
TargetHolders& rTargetHolders,
PropertyHolders& rPropertyHolders)
{
- const bool bNewActive(pRegion && !pRegion->IsEmpty());
+ const bool bNewActive(rClipPolyPolygon.count());
- // #i108636# The handlig of new ClipRegions was not done as good as possible
- // in the first version of this interpreter; e.g. when a ClipRegion was set
+ // #i108636# The handlig of new ClipPolyPolygons was not done as good as possible
+ // in the first version of this interpreter; e.g. when a ClipPolyPolygon was set
// initially and then using a lot of push/pop actions, the pop always leads
- // to setting a 'new' ClipRegion which indeed is the return to the ClipRegion
+ // to setting a 'new' ClipPolyPolygon which indeed is the return to the ClipPolyPolygon
// of the properties next on the stack.
- // This ClipRegion is identical to the current one, so there is no need to
+ //
+ // This ClipPolyPolygon is identical to the current one, so there is no need to
// create a MaskPrimitive2D containing the up-to-now created primitives, but
// this was done before. While this does not lead to wrong primitive
// representations of the metafile data, it creates unneccesarily expensive
- // representations. Just detecting when no really 'new' ClipRegion gets set
+ // representations. Just detecting when no really 'new' ClipPolyPolygon gets set
// solves the problem.
- if(!rPropertyHolders.Current().getRegionActive() && !bNewActive)
+ if(!rPropertyHolders.Current().getClipPolyPolygonActive() && !bNewActive)
{
- // no active region exchanged by no new one, done
+ // no active ClipPolyPolygon exchanged by no new one, done
return;
}
- if(rPropertyHolders.Current().getRegionActive() && bNewActive)
+ if(rPropertyHolders.Current().getClipPolyPolygonActive() && bNewActive)
{
- // active region and new active region
- if(rPropertyHolders.Current().getRegion() == *pRegion)
+ // active ClipPolyPolygon and new active ClipPolyPolygon
+ if(rPropertyHolders.Current().getClipPolyPolygon() == rClipPolyPolygon)
{
- // new region is the same as the old region, done
+ // new is the same as old, done
return;
}
}
- // Here the old region and the new one are definitively different, maybe
+ // Here the old and the new are definitively different, maybe
// old one and/or new one is not active.
- // Handle deletion of old region.The process evtl. created primitives which
- // belong to this active region. These need to be embedded to a
+ // Handle deletion of old ClipPolyPolygon. The process evtl. created primitives which
+ // belong to this active ClipPolyPolygon. These need to be embedded to a
// MaskPrimitive2D accordingly.
- if(rPropertyHolders.Current().getRegionActive() && rTargetHolders.size() > 1)
+ if(rPropertyHolders.Current().getClipPolyPolygonActive() && rTargetHolders.size() > 1)
{
drawinglayer::primitive2d::Primitive2DSequence aSubContent;
- if(!rPropertyHolders.Current().getRegion().IsEmpty() && rTargetHolders.Current().size())
+ if(rPropertyHolders.Current().getClipPolyPolygon().count()
+ && rTargetHolders.Current().size())
{
- aSubContent = rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current());
+ aSubContent = rTargetHolders.Current().getPrimitive2DSequence(
+ rPropertyHolders.Current());
}
rTargetHolders.Pop();
@@ -1030,11 +1037,11 @@ namespace
// apply new settings to current properties by setting
// the new region now
- rPropertyHolders.Current().setRegionActive(bNewActive);
+ rPropertyHolders.Current().setClipPolyPolygonActive(bNewActive);
if(bNewActive)
{
- rPropertyHolders.Current().setRegion(*pRegion);
+ rPropertyHolders.Current().setClipPolyPolygon(rClipPolyPolygon);
// prepare new content holder for new active region
rTargetHolders.Push();
@@ -2134,8 +2141,11 @@ namespace
drawinglayer::primitive2d::Primitive2DSequence xSubContent;
{
rTargetHolders.Push();
+ // #i# for sub-Mteafile contents, do start with new, default render state
+ rPropertyHolders.PushDefault();
interpretMetafile(aGDIMetaFile, rTargetHolders, rPropertyHolders, rViewInformation);
xSubContent = rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current());
+ rPropertyHolders.Pop();
rTargetHolders.Pop();
}
@@ -2411,13 +2421,18 @@ namespace
if(pA->IsClipping())
{
- // new clipping
- HandleNewClipRegion(&pA->GetRegion(), rTargetHolders, rPropertyHolders);
+ // new clipping. Get PolyPolygon and transform with current transformation
+ basegfx::B2DPolyPolygon aNewClipPolyPolygon(getB2DPolyPolygonFromRegion(pA->GetRegion()));
+
+ aNewClipPolyPolygon.transform(rPropertyHolders.Current().getTransformation());
+ HandleNewClipRegion(aNewClipPolyPolygon, rTargetHolders, rPropertyHolders);
}
else
{
// end clipping
- HandleNewClipRegion(0, rTargetHolders, rPropertyHolders);
+ const basegfx::B2DPolyPolygon aEmptyPolyPolygon;
+
+ HandleNewClipRegion(aEmptyPolyPolygon, rTargetHolders, rPropertyHolders);
}
break;
@@ -2431,49 +2446,60 @@ namespace
if(rRectangle.IsEmpty())
{
// intersect with empty rectangle will always give empty
- // region; start new clipping with empty region
- const Region aNewRegion;
- HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders);
+ // ClipPolyPolygon; start new clipping with empty PolyPolygon
+ const basegfx::B2DPolyPolygon aEmptyPolyPolygon;
+
+ HandleNewClipRegion(aEmptyPolyPolygon, rTargetHolders, rPropertyHolders);
}
else
{
- if(rPropertyHolders.Current().getRegionActive())
+ // create transformed ClipRange
+ basegfx::B2DRange aClipRange(
+ rRectangle.Left(), rRectangle.Top(),
+ rRectangle.Right(), rRectangle.Bottom());
+
+ aClipRange.transform(rPropertyHolders.Current().getTransformation());
+
+ if(rPropertyHolders.Current().getClipPolyPolygonActive())
{
- if(rPropertyHolders.Current().getRegion().IsEmpty())
+ if(0 == rPropertyHolders.Current().getClipPolyPolygon().count())
{
- // nothing to do, empty active clip region will stay
+ // nothing to do, empty active clipPolyPolygon will stay
// empty when intersecting
}
else
{
- // AND existing region and new rectangle
+ // AND existing region and new ClipRange
const basegfx::B2DPolyPolygon aOriginalPolyPolygon(
- getB2DPolyPolygonFromRegion(rPropertyHolders.Current().getRegion()));
+ rPropertyHolders.Current().getClipPolyPolygon());
basegfx::B2DPolyPolygon aClippedPolyPolygon;
if(aOriginalPolyPolygon.count())
{
- const basegfx::B2DRange aIntersectRange(
- rRectangle.Left(), rRectangle.Top(),
- rRectangle.Right(), rRectangle.Bottom());
-
aClippedPolyPolygon = basegfx::tools::clipPolyPolygonOnRange(
- aOriginalPolyPolygon, aIntersectRange, true, false);
+ aOriginalPolyPolygon,
+ aClipRange,
+ true,
+ false);
}
if(aClippedPolyPolygon != aOriginalPolyPolygon)
{
// start new clipping with intersected region
- const Region aNewRegion(aClippedPolyPolygon);
- HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders);
+ HandleNewClipRegion(
+ aClippedPolyPolygon,
+ rTargetHolders,
+ rPropertyHolders);
}
}
}
else
{
- // start new clipping with rectangle
- const Region aNewRegion(rRectangle);
- HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders);
+ // start new clipping with ClipRange
+ const basegfx::B2DPolyPolygon aNewClipPolyPolygon(
+ basegfx::tools::createPolygonFromRect(aClipRange));
+
+ HandleNewClipRegion(aNewClipPolyPolygon, rTargetHolders, rPropertyHolders);
}
}
@@ -2488,50 +2514,48 @@ namespace
if(rNewRegion.IsEmpty())
{
// intersect with empty region will always give empty
- // region; start new clipping with empty region
- const Region aNewRegion;
- HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders);
+ // region; start new clipping with empty PolyPolygon
+ const basegfx::B2DPolyPolygon aEmptyPolyPolygon;
+
+ HandleNewClipRegion(aEmptyPolyPolygon, rTargetHolders, rPropertyHolders);
}
else
{
- if(rPropertyHolders.Current().getRegionActive())
+ // get new ClipPolyPolygon, transform it with current transformation
+ basegfx::B2DPolyPolygon aNewClipPolyPolygon(getB2DPolyPolygonFromRegion(rNewRegion));
+ aNewClipPolyPolygon.transform(rPropertyHolders.Current().getTransformation());
+
+ if(rPropertyHolders.Current().getClipPolyPolygonActive())
{
- if(rPropertyHolders.Current().getRegion().IsEmpty())
+ if(0 == rPropertyHolders.Current().getClipPolyPolygon().count())
{
- // nothing to do, empty active clip region will stay empty
+ // nothing to do, empty active clipPolyPolygon will stay empty
// when intersecting with any region
}
else
{
// AND existing and new region
const basegfx::B2DPolyPolygon aOriginalPolyPolygon(
- getB2DPolyPolygonFromRegion(rPropertyHolders.Current().getRegion()));
+ rPropertyHolders.Current().getClipPolyPolygon());
basegfx::B2DPolyPolygon aClippedPolyPolygon;
if(aOriginalPolyPolygon.count())
{
- const basegfx::B2DPolyPolygon aClipPolyPolygon(
- getB2DPolyPolygonFromRegion(rNewRegion));
-
- if(aClipPolyPolygon.count())
- {
- aClippedPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon(
- aOriginalPolyPolygon, aClipPolyPolygon, true, false);
- }
+ aClippedPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon(
+ aOriginalPolyPolygon, aNewClipPolyPolygon, true, false);
}
if(aClippedPolyPolygon != aOriginalPolyPolygon)
{
- // start new clipping with intersected region
- const Region aNewRegion(aClippedPolyPolygon);
- HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders);
+ // start new clipping with intersected ClipPolyPolygon
+ HandleNewClipRegion(aClippedPolyPolygon, rTargetHolders, rPropertyHolders);
}
}
}
else
{
- // start new clipping with new region
- HandleNewClipRegion(&rNewRegion, rTargetHolders, rPropertyHolders);
+ // start new clipping with new ClipPolyPolygon
+ HandleNewClipRegion(aNewClipPolyPolygon, rTargetHolders, rPropertyHolders);
}
}
@@ -2542,24 +2566,31 @@ namespace
/** CHECKED, WORKS WELL */
const MetaMoveClipRegionAction* pA = (const MetaMoveClipRegionAction*)pAction;
- if(rPropertyHolders.Current().getRegionActive())
+ if(rPropertyHolders.Current().getClipPolyPolygonActive())
{
- if(rPropertyHolders.Current().getRegion().IsEmpty())
+ if(0 == rPropertyHolders.Current().getClipPolyPolygon().count())
{
// nothing to do
}
else
{
- // move using old interface
- Region aRegion(rPropertyHolders.Current().getRegion());
-
const sal_Int32 nHor(pA->GetHorzMove());
const sal_Int32 nVer(pA->GetVertMove());
if(0 != nHor || 0 != nVer)
{
- aRegion.Move(nHor, nVer);
- HandleNewClipRegion(&aRegion, rTargetHolders, rPropertyHolders);
+ // prepare translation, add current transformation
+ basegfx::B2DVector aVector(pA->GetHorzMove(), pA->GetVertMove());
+ aVector *= rPropertyHolders.Current().getTransformation();
+ basegfx::B2DHomMatrix aTransform(
+ basegfx::tools::createTranslateB2DHomMatrix(aVector));
+
+ // transform existing region
+ basegfx::B2DPolyPolygon aClipPolyPolygon(
+ rPropertyHolders.Current().getClipPolyPolygon());
+
+ aClipPolyPolygon.transform(aTransform);
+ HandleNewClipRegion(aClipPolyPolygon, rTargetHolders, rPropertyHolders);
}
}
}
@@ -2764,10 +2795,12 @@ namespace
const bool bRegionMayChange(rPropertyHolders.Current().getPushFlags() & PUSH_CLIPREGION);
const bool bRasterOpMayChange(rPropertyHolders.Current().getPushFlags() & PUSH_RASTEROP);
- if(bRegionMayChange && rPropertyHolders.Current().getRegionActive())
+ if(bRegionMayChange && rPropertyHolders.Current().getClipPolyPolygonActive())
{
// end evtl. clipping
- HandleNewClipRegion(0, rTargetHolders, rPropertyHolders);
+ const basegfx::B2DPolyPolygon aEmptyPolyPolygon;
+
+ HandleNewClipRegion(aEmptyPolyPolygon, rTargetHolders, rPropertyHolders);
}
if(bRasterOpMayChange && rPropertyHolders.Current().isRasterOpActive())
@@ -2784,10 +2817,11 @@ namespace
HandleNewRasterOp(rPropertyHolders.Current().getRasterOp(), rTargetHolders, rPropertyHolders);
}
- if(bRegionMayChange && rPropertyHolders.Current().getRegionActive())
+ if(bRegionMayChange && rPropertyHolders.Current().getClipPolyPolygonActive())
{
// start evtl. clipping
- HandleNewClipRegion(&rPropertyHolders.Current().getRegion(), rTargetHolders, rPropertyHolders);
+ HandleNewClipRegion(
+ rPropertyHolders.Current().getClipPolyPolygon(), rTargetHolders, rPropertyHolders);
}
break;
@@ -2935,8 +2969,11 @@ namespace
drawinglayer::primitive2d::Primitive2DSequence xSubContent;
{
rTargetHolders.Push();
+ // #i# for sub-Mteafile contents, do start with new, default render state
+ rPropertyHolders.PushDefault();
interpretMetafile(rContent, rTargetHolders, rPropertyHolders, rViewInformation);
xSubContent = rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current());
+ rPropertyHolders.Pop();
rTargetHolders.Pop();
}
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 0bc1b57113b8..983cc8f58d4f 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1225,17 +1225,16 @@ namespace drawinglayer
{
// need to handle PolyPolygonHatchPrimitive2D here to support XPATHFILL_SEQ_BEGIN/XPATHFILL_SEQ_END
SvtGraphicFill* pSvtGraphicFill = 0;
+ const primitive2d::PolyPolygonHatchPrimitive2D& rHatchCandidate = static_cast< const primitive2d::PolyPolygonHatchPrimitive2D& >(rCandidate);
+ const attribute::FillHatchAttribute& rFillHatchAttribute = rHatchCandidate.getFillHatch();
+ basegfx::B2DPolyPolygon aLocalPolyPolygon(rHatchCandidate.getB2DPolyPolygon());
+ aLocalPolyPolygon.transform(maCurrentTransformation);
if(!mnSvtGraphicFillCount)
{
- const primitive2d::PolyPolygonHatchPrimitive2D& rHatchCandidate = static_cast< const primitive2d::PolyPolygonHatchPrimitive2D& >(rCandidate);
- basegfx::B2DPolyPolygon aLocalPolyPolygon(rHatchCandidate.getB2DPolyPolygon());
- aLocalPolyPolygon.transform(maCurrentTransformation);
-
if(aLocalPolyPolygon.count())
{
// re-create a VCL hatch as base data
- const attribute::FillHatchAttribute& rFillHatchAttribute = rHatchCandidate.getFillHatch();
SvtGraphicFill::HatchType eHatch(SvtGraphicFill::hatchSingle);
switch(rFillHatchAttribute.getStyle())
@@ -1289,9 +1288,22 @@ namespace drawinglayer
// Do use decomposition; encapsulate with SvtGraphicFill
impStartSvtGraphicFill(pSvtGraphicFill);
- process(rCandidate.get2DDecomposition(getViewInformation2D()));
- impEndSvtGraphicFill(pSvtGraphicFill);
+ // #i111954# do NOT use decomposition, but use direct VCL-command
+ // process(rCandidate.get2DDecomposition(getViewInformation2D()));
+ const PolyPolygon aToolsPolyPolygon(aLocalPolyPolygon);
+ const HatchStyle aHatchStyle(
+ attribute::HATCHSTYLE_SINGLE == rFillHatchAttribute.getStyle() ? HATCH_SINGLE :
+ attribute::HATCHSTYLE_DOUBLE == rFillHatchAttribute.getStyle() ? HATCH_DOUBLE :
+ HATCH_TRIPLE);
+
+ mpOutputDevice->DrawHatch(aToolsPolyPolygon,
+ Hatch(aHatchStyle,
+ Color(rFillHatchAttribute.getColor()),
+ basegfx::fround(rFillHatchAttribute.getDistance()),
+ basegfx::fround(rFillHatchAttribute.getAngle() / F_PI1800)));
+
+ impEndSvtGraphicFill(pSvtGraphicFill);
break;
}
case PRIMITIVE2D_ID_POLYPOLYGONGRADIENTPRIMITIVE2D :
@@ -1429,7 +1441,11 @@ namespace drawinglayer
{
// there is already a clip polygon set; build clipped union of
// current mask polygon and new one
- maClipPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon(aMask, maClipPolyPolygon, false, false);
+ maClipPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon(
+ aMask,
+ maClipPolyPolygon,
+ true, // #i106516# we want the inside of aMask, not the outside
+ false);
}
else
{
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index a1b1393a2fac..6a280fcad95e 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -284,20 +284,37 @@ namespace drawinglayer
if(bAllowUsingDrawTransparent && 1 == rContent.getLength())
{
const primitive2d::Primitive2DReference xReference(rContent[0]);
- const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = dynamic_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(xReference.get());
+ const primitive2d::BasePrimitive2D* pBasePrimitive = dynamic_cast< const primitive2d::BasePrimitive2D* >(xReference.get());
- if(pPoPoColor && PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D == pPoPoColor->getPrimitive2DID())
+ if(pBasePrimitive)
{
- // single transparent PolyPolygon identified, use directly
- const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(pPoPoColor->getBColor()));
- mpOutputDevice->SetFillColor(Color(aPolygonColor));
- mpOutputDevice->SetLineColor();
-
- basegfx::B2DPolyPolygon aLocalPolyPolygon(pPoPoColor->getB2DPolyPolygon());
- aLocalPolyPolygon.transform(maCurrentTransformation);
-
- mpOutputDevice->DrawTransparent(aLocalPolyPolygon, rUniTransparenceCandidate.getTransparence());
- bDrawTransparentUsed = true;
+ switch(pBasePrimitive->getPrimitive2DID())
+ {
+ case PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D:
+ {
+ // single transparent PolyPolygon identified, use directly
+ const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = static_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(pBasePrimitive);
+ OSL_ENSURE(pPoPoColor, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+ const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(pPoPoColor->getBColor()));
+ mpOutputDevice->SetFillColor(Color(aPolygonColor));
+ mpOutputDevice->SetLineColor();
+
+ basegfx::B2DPolyPolygon aLocalPolyPolygon(pPoPoColor->getB2DPolyPolygon());
+ aLocalPolyPolygon.transform(maCurrentTransformation);
+
+ mpOutputDevice->DrawTransparent(aLocalPolyPolygon, rUniTransparenceCandidate.getTransparence());
+ bDrawTransparentUsed = true;
+ break;
+ }
+ // #i# need to wait for #i101378# which is in CWS vcl112 to directly paint transparent hairlines
+ //case PRIMITIVE2D_ID_POLYGONHAIRLINEPRIMITIVE2D:
+ //{
+ // // single transparent PolygonHairlinePrimitive2D identified, use directly
+ // const primitive2d::PolygonHairlinePrimitive2D* pPoHair = static_cast< const primitive2d::PolygonHairlinePrimitive2D* >(pBasePrimitive);
+ // OSL_ENSURE(pPoHair, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+ // break;
+ //}
+ }
}
}
@@ -469,19 +486,29 @@ namespace drawinglayer
// This is wrong in principle, but looks nicer. This could also be done here directly
// without VCL usage if needed
const primitive2d::FillHatchPrimitive2D& rFillHatchPrimitive = static_cast< const primitive2d::FillHatchPrimitive2D& >(rCandidate);
+ const attribute::FillHatchAttribute& rFillHatchAttributes = rFillHatchPrimitive.getFillHatch();
// create hatch polygon in range size and discrete coordinates
basegfx::B2DRange aHatchRange(rFillHatchPrimitive.getObjectRange());
aHatchRange.transform(maCurrentTransformation);
const basegfx::B2DPolygon aHatchPolygon(basegfx::tools::createPolygonFromRect(aHatchRange));
+ if(rFillHatchAttributes.isFillBackground())
+ {
+ // #i111846# background fill is active; draw fill polygon
+ const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(rFillHatchPrimitive.getBColor()));
+
+ mpOutputDevice->SetFillColor(Color(aPolygonColor));
+ mpOutputDevice->SetLineColor();
+ mpOutputDevice->DrawPolygon(aHatchPolygon);
+ }
+
// set hatch line color
const basegfx::BColor aHatchColor(maBColorModifierStack.getModifiedColor(rFillHatchPrimitive.getBColor()));
mpOutputDevice->SetFillColor();
mpOutputDevice->SetLineColor(Color(aHatchColor));
// get hatch style
- const attribute::FillHatchAttribute& rFillHatchAttributes = rFillHatchPrimitive.getFillHatch();
HatchStyle eHatchStyle(HATCH_SINGLE);
switch(rFillHatchAttributes.getStyle())
diff --git a/drawinglayer/source/processor3d/shadow3dextractor.cxx b/drawinglayer/source/processor3d/shadow3dextractor.cxx
index 2abbcaa9f83f..9e0c0674ea66 100644
--- a/drawinglayer/source/processor3d/shadow3dextractor.cxx
+++ b/drawinglayer/source/processor3d/shadow3dextractor.cxx
@@ -51,6 +51,25 @@ namespace drawinglayer
{
namespace processor3d
{
+ /// helper to convert from BasePrimitive2DVector to primitive2d::Primitive2DSequence
+ const primitive2d::Primitive2DSequence Shadow3DExtractingProcessor::getPrimitive2DSequenceFromBasePrimitive2DVector(
+ const BasePrimitive2DVector& rVector) const
+ {
+ const sal_uInt32 nCount(rVector.size());
+ primitive2d::Primitive2DSequence aRetval(nCount);
+
+ for(sal_uInt32 a(0); a < nCount; a++)
+ {
+ aRetval[a] = rVector[a];
+ }
+
+ // all entries taken over; no need to delete entries, just reset to
+ // mark as empty
+ const_cast< BasePrimitive2DVector& >(rVector).clear();
+
+ return aRetval;
+ }
+
// as tooling, the process() implementation takes over API handling and calls this
// virtual render method when the primitive implementation is BasePrimitive3D-based.
void Shadow3DExtractingProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate)
@@ -64,8 +83,8 @@ namespace drawinglayer
const primitive3d::ShadowPrimitive3D& rPrimitive = static_cast< const primitive3d::ShadowPrimitive3D& >(rCandidate);
// set new target
- primitive2d::Primitive2DSequence aNewSubList;
- primitive2d::Primitive2DSequence* pLastTargetSequence = mpPrimitive2DSequence;
+ BasePrimitive2DVector aNewSubList;
+ BasePrimitive2DVector* pLastTargetSequence = mpPrimitive2DSequence;
mpPrimitive2DSequence = &aNewSubList;
// activate convert
@@ -84,21 +103,26 @@ namespace drawinglayer
mbConvert = bLastConvert;
mpPrimitive2DSequence = pLastTargetSequence;
- // create 2d shadow primitive with result
- const primitive2d::Primitive2DReference xRef(new primitive2d::ShadowPrimitive2D(rPrimitive.getShadowTransform(), rPrimitive.getShadowColor(), aNewSubList));
+ // create 2d shadow primitive with result. This also fetches all entries
+ // from aNewSubList, so there is no need to delete them
+ primitive2d::BasePrimitive2D* pNew = new primitive2d::ShadowPrimitive2D(
+ rPrimitive.getShadowTransform(),
+ rPrimitive.getShadowColor(),
+ getPrimitive2DSequenceFromBasePrimitive2DVector(aNewSubList));
if(basegfx::fTools::more(rPrimitive.getShadowTransparence(), 0.0))
{
// create simpleTransparencePrimitive, add created primitives
- const primitive2d::Primitive2DSequence aNewTransPrimitiveVector(&xRef, 1L);
- const primitive2d::Primitive2DReference xRef2(new primitive2d::UnifiedTransparencePrimitive2D(aNewTransPrimitiveVector, rPrimitive.getShadowTransparence()));
- primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(*mpPrimitive2DSequence, xRef2);
- }
- else
- {
- // add directly
- primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(*mpPrimitive2DSequence, xRef);
+ const primitive2d::Primitive2DReference xRef(pNew);
+ const primitive2d::Primitive2DSequence aNewTransPrimitiveVector(&xRef, 1);
+
+ pNew = new primitive2d::UnifiedTransparencePrimitive2D(
+ aNewTransPrimitiveVector,
+ rPrimitive.getShadowTransparence());
}
+
+ mpPrimitive2DSequence->push_back(pNew);
+
break;
}
case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D :
@@ -161,8 +185,10 @@ namespace drawinglayer
if(a2DHairline.count())
{
a2DHairline.transform(getObjectTransformation());
- const primitive2d::Primitive2DReference xRef(new primitive2d::PolygonHairlinePrimitive2D(a2DHairline, maPrimitiveColor));
- primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(*mpPrimitive2DSequence, xRef);
+ mpPrimitive2DSequence->push_back(
+ new primitive2d::PolygonHairlinePrimitive2D(
+ a2DHairline,
+ maPrimitiveColor));
}
}
break;
@@ -190,8 +216,10 @@ namespace drawinglayer
if(a2DFill.count())
{
a2DFill.transform(getObjectTransformation());
- const primitive2d::Primitive2DReference xRef(new primitive2d::PolyPolygonColorPrimitive2D(a2DFill, maPrimitiveColor));
- primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(*mpPrimitive2DSequence, xRef);
+ mpPrimitive2DSequence->push_back(
+ new primitive2d::PolyPolygonColorPrimitive2D(
+ a2DFill,
+ maPrimitiveColor));
}
}
break;
@@ -251,6 +279,16 @@ namespace drawinglayer
}
}
+ Shadow3DExtractingProcessor::~Shadow3DExtractingProcessor()
+ {
+ OSL_ENSURE(0 == maPrimitive2DSequence.size(),
+ "OOps, someone used Shadow3DExtractingProcessor, but did not fetch the results (!)");
+ for(sal_uInt32 a(0); a < maPrimitive2DSequence.size(); a++)
+ {
+ delete maPrimitive2DSequence[a];
+ }
+ }
+
basegfx::B2DPolygon Shadow3DExtractingProcessor::impDoShadowProjection(const basegfx::B3DPolygon& rSource)
{
basegfx::B2DPolygon aRetval;
@@ -291,6 +329,12 @@ namespace drawinglayer
return aRetval;
}
+
+ const primitive2d::Primitive2DSequence Shadow3DExtractingProcessor::getPrimitive2DSequence() const
+ {
+ return getPrimitive2DSequenceFromBasePrimitive2DVector(maPrimitive2DSequence);
+ }
+
} // end of namespace processor3d
} // end of namespace drawinglayer
diff --git a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
index 326b9d392999..b06718d01ccb 100644
--- a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
@@ -487,7 +487,7 @@ private:
boost::shared_ptr< drawinglayer::texture::GeoTexSvx > mpTransparenceGeoTexSvx;
drawinglayer::attribute::MaterialAttribute3D maMaterial;
basegfx::B3DPolyPolygon maPolyPolygon;
- sal_uInt32 mfCenterZ;
+ double mfCenterZ;
// bitfield
bool mbModulate : 1;
diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx
index 3d9afded321f..84f4802e7b44 100644..100755
--- a/editeng/inc/editeng/editeng.hxx
+++ b/editeng/inc/editeng/editeng.hxx
@@ -232,6 +232,7 @@ public:
ESelection WordRight( const ESelection& rSelection, USHORT nWordType ) const;
ESelection CursorLeft( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const;
ESelection CursorRight( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const;
+ ESelection SelectSentence( const ESelection& rCurSel ) const;
void Clear();
void SetText( const String& rStr );
@@ -396,7 +397,7 @@ public:
// put spell position to start of current sentence
void PutSpellingToSentenceStart( EditView& rEditView );
//applies a changed sentence
- void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking );
+ void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck );
//deinitialize sentence spelling
void EndSpelling();
diff --git a/editeng/inc/editeng/editview.hxx b/editeng/inc/editeng/editview.hxx
index ccea5d09321e..15052ecc3c0c 100644
--- a/editeng/inc/editeng/editview.hxx
+++ b/editeng/inc/editeng/editview.hxx
@@ -28,6 +28,8 @@
#ifndef _MyEDITVIEW_HXX
#define _MyEDITVIEW_HXX
+#include <com/sun/star/i18n/WordType.hpp>
+
#include <rsc/rscsfx.hxx>
#include <i18npool/lang.h>
#include <tools/color.hxx>
@@ -111,7 +113,7 @@ public:
BOOL HasSelection() const;
ESelection GetSelection() const;
void SetSelection( const ESelection& rNewSel );
- BOOL SelectCurrentWord();
+ BOOL SelectCurrentWord( sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
void IndentBlock();
void UnindentBlock();
diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx
index 2d7afdb8a68c..d167d2a30f8f 100644
--- a/editeng/inc/editeng/outliner.hxx
+++ b/editeng/inc/editeng/outliner.hxx
@@ -389,6 +389,12 @@ public:
Selection GetSurroundingTextSelection() const;
};
+
+// some thesaurus functionality to avoid code duplication in different projects...
+bool EDITENG_DLLPUBLIC GetStatusValueForThesaurusFromContext( String &rStatusVal, LanguageType &rLang, const EditView &rEditView );
+void EDITENG_DLLPUBLIC ReplaceTextWithSynonym( EditView &rEditView, const String &rSynonmText );
+
+
//#if 0 // _SOLAR__PRIVATE
DECLARE_LIST(ViewList,OutlinerView*)
//#else
@@ -1017,7 +1023,7 @@ public:
// put spell position to start of current sentence
void PutSpellingToSentenceStart( EditView& rEditView );
//applies a changed sentence
- void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking );
+ void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck );
void EndSpelling();
/** sets a link that is called at the beginning of a drag operation at an edit view */
diff --git a/editeng/inc/editeng/splwrap.hxx b/editeng/inc/editeng/splwrap.hxx
index 89eb0b53320b..5e46a96adb9f 100644..100755
--- a/editeng/inc/editeng/splwrap.hxx
+++ b/editeng/inc/editeng/splwrap.hxx
@@ -56,6 +56,7 @@ class EDITENG_DLLPUBLIC SvxSpellWrapper {
private:
friend class SvxSpellCheckDialog;
friend class SvxHyphenWordDialog;
+ friend class SvxHyphenWordDialog_Impl;
Window* pWin;
::com::sun::star::uno::Reference<
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 8621f173c250..1b61a405dc18 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -813,6 +813,14 @@ ESelection EditEngine::CursorRight( const ESelection& rSelection, USHORT nCharac
return pE->pImpEditEngine->CreateESel( aSel );
}
+ESelection EditEngine::SelectSentence( const ESelection& rCurSel ) const
+{
+ EditEngine* pE = (EditEngine*)this;
+ EditSelection aCurSel( pE->pImpEditEngine->CreateSel( rCurSel ) );
+ EditSelection aSentenceSel( pE->pImpEditEngine->SelectSentence( aCurSel ) );
+ return pE->pImpEditEngine->CreateESel( aSentenceSel );
+}
+
sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView )
{
DBG_CHKTHIS( EditEngine, 0 );
@@ -2198,7 +2206,7 @@ void EditEngine::EndSpelling()
bool EditEngine::SpellSentence(EditView& rView, ::svx::SpellPortions& rToFill, bool bIsGrammarChecking )
{
DBG_CHKTHIS( EditEngine, 0 );
- return pImpEditEngine->SpellSentence( rView, rToFill, bIsGrammarChecking );
+ return pImpEditEngine->SpellSentence( rView, rToFill, bIsGrammarChecking );
}
/*-- 08.09.2008 11:38:32---------------------------------------------------
@@ -2211,10 +2219,10 @@ void EditEngine::PutSpellingToSentenceStart( EditView& rEditView )
/*-- 13.10.2003 16:43:27---------------------------------------------------
-----------------------------------------------------------------------*/
-void EditEngine::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking )
+void EditEngine::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck )
{
DBG_CHKTHIS( EditEngine, 0 );
- pImpEditEngine->ApplyChangedSentence( rEditView, rNewPortions, bIsGrammarChecking );
+ pImpEditEngine->ApplyChangedSentence( rEditView, rNewPortions, bRecheck );
}
sal_Bool EditEngine::HasConvertibleTextPortion( LanguageType nLang )
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 766023a0038c..642b5e0d9f17 100644..100755
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -40,6 +40,7 @@
#include <svl/languageoptions.hxx>
#include <svtools/ctrltool.hxx>
#include <svtools/langtab.hxx>
+#include <svtools/filter.hxx>
#include <svl/srchitem.hxx>
@@ -62,6 +63,8 @@
#include <editeng/acorrcfg.hxx>
#include <editeng/unolingu.hxx>
#include <editeng/fontitem.hxx>
+#include <unotools/lingucfg.hxx>
+#include <osl/file.hxx>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/beans/PropertyValues.hdl>
@@ -71,6 +74,8 @@
#include <vcl/settings.hxx>
#include <unotools/lingucfg.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+
using ::rtl::OUString;
using namespace com::sun::star;
using namespace com::sun::star::uno;
@@ -1004,6 +1009,26 @@ sal_Bool EditView::IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMa
return pImpEditView->IsWrongSpelledWord( aPaM , bMarkIfWrong );
}
+
+static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl )
+{
+ Image aRes;
+ OUString aTmp;
+ osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp );
+// ::rtl::OString aPath = OString( aTmp.getStr(), aTmp.getLength(), osl_getThreadTextEncoding() );
+#if defined(WNT)
+// aTmp = lcl_Win_GetShortPathName( aTmp );
+#endif
+ Graphic aGraphic;
+ const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) );
+ if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic ) )
+ {
+ aRes = Image( aGraphic.GetBitmapEx() );
+ }
+ return aRes;
+}
+
+
void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack )
{
#ifndef SVX_LIGHT
@@ -1114,25 +1139,54 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack )
else
aPopupMenu.RemoveItem( MN_AUTOCORR ); // Loeschen?
- Reference< XDictionaryList > xDicList( SvxGetDictionaryList() );
+ SvtLinguConfig aCfg;
+ const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
+ Reference< XDictionaryList > xDicList( SvxGetDictionaryList() );
Sequence< Reference< XDictionary > > aDics;
+ const Reference< XDictionary > *pDic = NULL;
if (xDicList.is())
- aDics = xDicList->getDictionaries();
- const Reference< XDictionary > *pDic = aDics.getConstArray();
- sal_uInt16 nLanguage = PIMPEE->GetLanguage( aPaM2 );
- sal_uInt16 nDicCount = (USHORT)aDics.getLength();
- for ( sal_uInt16 i = 0; i < nDicCount; i++ )
{
- Reference< XDictionary > xDic( pDic[i], UNO_QUERY );
+ // add the default positive dictionary to dic-list (if not already done).
+ // This is to ensure that there is at least one dictionary to which
+ // words could be added.
+ uno::Reference< linguistic2::XDictionary > xDic( SvxGetOrCreatePosDic( xDicList ) );
if (xDic.is())
+ xDic->setActive( sal_True );
+
+ aDics = xDicList->getDictionaries();
+ pDic = aDics.getConstArray();
+ sal_uInt16 nCheckedLanguage = PIMPEE->GetLanguage( aPaM2 );
+ sal_uInt16 nDicCount = (USHORT)aDics.getLength();
+ for (sal_uInt16 i = 0; i < nDicCount; i++)
{
- sal_uInt16 nActLanguage = SvxLocaleToLanguage( xDic->getLocale() );
- if( xDic->isActive() &&
- xDic->getDictionaryType() == DictionaryType_POSITIVE &&
- (nLanguage == nActLanguage || LANGUAGE_NONE == nActLanguage ) )
+ uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY );
+ if (!xDicTmp.is() || SvxGetIgnoreAllList() == xDicTmp)
+ continue;
+
+ uno::Reference< frame::XStorable > xStor( xDicTmp, uno::UNO_QUERY );
+ LanguageType nActLanguage = SvxLocaleToLanguage( xDicTmp->getLocale() );
+ if( xDicTmp->isActive()
+ && xDicTmp->getDictionaryType() != linguistic2::DictionaryType_NEGATIVE
+ && (nCheckedLanguage == nActLanguage || LANGUAGE_NONE == nActLanguage )
+ && (!xStor.is() || !xStor->isReadonly()) )
{
- pInsertMenu->InsertItem( MN_DICTSTART + i, xDic->getName() );
+ // the extra 1 is because of the (possible) external
+ // linguistic entry above
+ USHORT nPos = MN_DICTSTART + i;
+ pInsertMenu->InsertItem( nPos, xDicTmp->getName() );
+
+ uno::Reference< lang::XServiceInfo > xSvcInfo( xDicTmp, uno::UNO_QUERY );
+ if (xSvcInfo.is())
+ {
+ OUString aDictionaryImageUrl( aCfg.GetSpellAndGrammarContextDictionaryImage(
+ xSvcInfo->getImplementationName(), bHC) );
+ if (aDictionaryImageUrl.getLength() > 0)
+ {
+ Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) );
+ pInsertMenu->SetItemImage( nPos, aImage );
+ }
+ }
}
}
}
@@ -1256,13 +1310,13 @@ void EditView::SpellIgnoreWord()
pImpEditView->SpellIgnoreOrAddWord( sal_False );
}
-sal_Bool EditView::SelectCurrentWord()
+sal_Bool EditView::SelectCurrentWord( sal_Int16 nWordType )
{
DBG_CHKTHIS( EditView, 0 );
DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
EditSelection aCurSel( pImpEditView->GetEditSelection() );
pImpEditView->DrawSelection();
- aCurSel = PIMPEE->SelectWord( aCurSel.Max() );
+ aCurSel = PIMPEE->SelectWord( aCurSel.Max(), nWordType );
pImpEditView->SetEditSelection( aCurSel );
pImpEditView->DrawSelection();
ShowCursor( sal_True, sal_False );
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx
index fed1394e5fd0..f01381a4ae62 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -208,6 +208,9 @@ void EditSpellWrapper::CheckSpellTo()
pSpellInfo->aSpellTo.nIndex = aPaM.GetNode()->Len();
}
}
+
+//////////////////////////////////////////////////////////////////////
+
SV_IMPL_VARARR( WrongRanges, WrongRange );
WrongList::WrongList()
@@ -220,6 +223,14 @@ WrongList::~WrongList()
{
}
+void WrongList::MarkInvalid( USHORT nS, USHORT nE )
+{
+ if ( ( nInvalidStart == NOT_INVALID ) || ( nInvalidStart > nS ) )
+ nInvalidStart = nS;
+ if ( nInvalidEnd < nE )
+ nInvalidEnd = nE;
+}
+
void WrongList::TextInserted( sal_uInt16 nPos, sal_uInt16 nNew, sal_Bool bPosIsSep )
{
if ( !IsInvalid() )
@@ -527,6 +538,7 @@ sal_Bool WrongList::DbgIsBuggy() const
}
#endif
+//////////////////////////////////////////////////////////////////////
EdtAutoCorrDoc::EdtAutoCorrDoc( ImpEditEngine* pE, ContentNode* pN,
sal_uInt16 nCrsr, xub_Unicode cIns )
diff --git a/editeng/source/editeng/edtspell.hxx b/editeng/source/editeng/edtspell.hxx
index cfe0aaf57e87..851848c5ede0 100644
--- a/editeng/source/editeng/edtspell.hxx
+++ b/editeng/source/editeng/edtspell.hxx
@@ -97,13 +97,7 @@ public:
BOOL IsInvalid() const { return nInvalidStart != NOT_INVALID; }
void SetValid() { nInvalidStart = NOT_INVALID; nInvalidEnd = 0; }
- void MarkInvalid( USHORT nS, USHORT nE )
- {
- if ( ( nInvalidStart == NOT_INVALID ) || ( nInvalidStart > nS ) )
- nInvalidStart = nS;
- if ( nInvalidEnd < nE )
- nInvalidEnd = nE;
- }
+ void MarkInvalid( USHORT nS, USHORT nE );
USHORT Count() const { return WrongRanges::Count(); }
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index b327d2a685bd..9ac7de8e2b7d 100644..100755
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1489,7 +1489,7 @@ void ImpEditView::HideDDCursor()
void ImpEditView::ShowDDCursor( const Rectangle& rRect )
{
- if ( !pDragAndDropInfo->bVisCursor )
+ if ( pDragAndDropInfo && !pDragAndDropInfo->bVisCursor )
{
if ( pOutWin->GetCursor() )
pOutWin->GetCursor()->Hide();
@@ -1544,6 +1544,8 @@ void ImpEditView::dragGestureRecognized( const ::com::sun::star::datatransfer::d
vos::OGuard aVclGuard( Application::GetSolarMutex() );
+ pDragAndDropInfo = NULL;
+
Point aMousePosPixel( rDGE.DragOriginX, rDGE.DragOriginY );
EditSelection aCopySel( GetEditSelection() );
@@ -1717,7 +1719,7 @@ void ImpEditView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDro
DBG_ASSERT( pDragAndDropInfo, "Drop - No Drag&Drop info?!" );
- if ( pDragAndDropInfo->bDragAccepted )
+ if ( pDragAndDropInfo && pDragAndDropInfo->bDragAccepted )
{
pEditEngine->GetBeginDropHdl().Call(GetEditViewPtr());
BOOL bChanges = FALSE;
@@ -1817,7 +1819,7 @@ void ImpEditView::dragExit( const ::com::sun::star::datatransfer::dnd::DropTarge
HideDDCursor();
- if ( !pDragAndDropInfo->bStarterOfDD )
+ if ( pDragAndDropInfo && !pDragAndDropInfo->bStarterOfDD )
{
delete pDragAndDropInfo;
pDragAndDropInfo = NULL;
@@ -1837,7 +1839,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge
{
// sal_Int8 nSupportedActions = bReadOnly ? datatransfer::dnd::DNDConstants::ACTION_COPY : datatransfer::dnd::DNDConstants::ACTION_COPY_OR_MOVE;
- if ( pDragAndDropInfo->bHasValidData /* && ( nSupportedActions & rDTDE.DropAction ) MT: Default = 0x80 ?! */ )
+ if ( pDragAndDropInfo && pDragAndDropInfo->bHasValidData /* && ( nSupportedActions & rDTDE.DropAction ) MT: Default = 0x80 ?! */ )
{
bAccept = sal_True;
@@ -1957,7 +1959,8 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge
if ( !bAccept )
{
HideDDCursor();
- pDragAndDropInfo->bDragAccepted = FALSE;
+ if (pDragAndDropInfo)
+ pDragAndDropInfo->bDragAccepted = FALSE;
rDTDE.Context->rejectDrag();
}
}
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 3bacfc949e3b..ede5acacc698 100644..100755
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -164,6 +164,7 @@ struct SpellInfo
EESpellState eState;
EPaM aSpellStart;
EPaM aSpellTo;
+ EditPaM aCurSentenceStart;
sal_Bool bSpellToEnd;
sal_Bool bMultipleDoc;
::svx::SpellPortions aLastSpellPortions;
@@ -697,6 +698,8 @@ private:
*/
void ImplFillTextMarkingVector(const ::com::sun::star::lang::Locale& rLocale, EEngineData::TextMarkingVector& rTextMarkingVector, const String& rTxt, const USHORT nIdx, const USHORT nLen) const;
+ SpellInfo * CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs );
+
protected:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
@@ -953,7 +956,7 @@ public:
//put spelling back to start of current sentence - needed after switch of grammar support
void PutSpellingToSentenceStart( EditView& rEditView );
//applies a changed sentence
- void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking );
+ void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck );
//deinitialize sentence spelling
void EndSpelling();
//adds one or more portions of text to the SpellPortions depending on language changes
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index bbdfa47e6a57..778942730e71 100644..100755
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -2755,6 +2755,11 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
EditPaM aCurPaM( aPaM ); // fuers Invalidieren
+ // get word boundaries in order to clear possible WrongList entries
+ // and invalidate all the necessary text (everything after and including the
+ // start of the word)
+ EditSelection aCurWord( SelectWord( aCurPaM, i18n::WordType::DICTIONARY_WORD ) );
+
XubString aText( rStr );
aText.ConvertLineEnd( LINEEND_LF );
SfxVoidItem aTabItem( EE_FEATURE_TAB );
@@ -2809,7 +2814,13 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
}
ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
DBG_ASSERT( pPortion, "Blinde Portion in InsertText" );
- pPortion->MarkInvalid( aCurPaM.GetIndex(), aLine.Len() );
+
+ // now remove the Wrongs (red spell check marks) from both words...
+ WrongList *pWrongs = aCurPaM.GetNode()->GetWrongList();
+ if (pWrongs && pWrongs->HasWrongs())
+ pWrongs->ClearWrongs( aCurWord.Min().GetIndex(), aPaM.GetIndex(), aPaM.GetNode() );
+ // ... and mark both words as 'to be checked again'
+ pPortion->MarkInvalid( aCurWord.Min().GetIndex(), aLine.Len() );
}
if ( nEnd < aText.Len() )
aPaM = ImpInsertParaBreak( aPaM );
@@ -4198,7 +4209,18 @@ long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT
DBG_ERROR("svx::ImpEditEngine::GetXPos(), index out of range!");
}
+#if 0
long nPosInPortion = pLine->GetCharPosArray().GetObject( nPos );
+#else
+ // #i74188# (positioning the cursor after deleting components of combined indic characters)
+ SvxFont aTmpFont( pParaPortion->GetNode()->GetCharAttribs().GetDefFont() );
+ SeekCursor( pParaPortion->GetNode(), nPos+1, aTmpFont );
+ aTmpFont.SetPhysFont( GetRefDevice() );
+ ImplInitDigitMode( GetRefDevice(), 0, 0, 0, aTmpFont.GetLanguage() );
+ String sSegment(*pParaPortion->GetNode(), pLine->GetStart(), nPos+1);
+ long nPosInPortion = aTmpFont.QuickGetTextSize( GetRefDevice(),
+ sSegment, 0, nPos+1, NULL ).Width();
+#endif
if ( !pPortion->IsRightToLeft() )
{
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index dbc6767d1f91..08f50a0da884 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3613,7 +3613,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool b
ContentNode* pNode = GetEditDoc().SaveGetObject( 0 );
SeekCursor( pNode, 1, aTmpFont );
Color aFontColor( aTmpFont.GetColor() );
- if( aFontColor == COL_AUTO )
+ if( (aFontColor == COL_AUTO) || IsForceAutoColor() )
aFontColor = GetAutoColor();
// #i69346# check for reverse color of input method attribute
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index c45c6faf2b6a..482cd6d71338 100644..100755
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1455,6 +1455,23 @@ Reference< XSpellChecker1 > ImpEditEngine::GetSpeller()
return xSpeller;
}
+
+SpellInfo * ImpEditEngine::CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs )
+{
+ pSpellInfo = new SpellInfo;
+ pSpellInfo->bMultipleDoc = bMultipleDocs;
+ EditSelection aSentenceSel( SelectSentence( rSel ) );
+// pSpellInfo->aSpellStart = CreateEPaM( aSentenceSel.Min() );
+// pSpellInfo->aSpellTo = CreateEPaM( rSel.HasRange()? aSentenceSel.Max() : aSentenceSel.Min() );
+ // always spell draw objects completely, startting at the top.
+ // (spelling in only a selection or not starting with the top requires
+ // further changes elsewehe to work properly)
+ pSpellInfo->aSpellStart = EPaM();
+ pSpellInfo->aSpellTo = EPaM( EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND );
+ return pSpellInfo;
+}
+
+
EESpellState ImpEditEngine::Spell( EditView* pEditView, sal_Bool bMultipleDoc )
{
#ifdef SVX_LIGHT
@@ -1475,9 +1492,7 @@ EESpellState ImpEditEngine::Spell( EditView* pEditView, sal_Bool bMultipleDoc )
}
EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() );
- pSpellInfo = new SpellInfo;
- pSpellInfo->bMultipleDoc = bMultipleDoc;
- pSpellInfo->aSpellStart = CreateEPaM( SelectWord( aCurSel, ::com::sun::star::i18n::WordType::DICTIONARY_WORD ).Min() );
+ pSpellInfo = CreateSpellInfo( aCurSel, bMultipleDoc );
sal_Bool bIsStart = sal_False;
if ( bMultipleDoc )
@@ -1945,11 +1960,9 @@ void ImpEditEngine::EndSpelling()
void ImpEditEngine::StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc)
{
DBG_ASSERT(!pSpellInfo, "pSpellInfo already set?");
- pSpellInfo = new SpellInfo;
- pSpellInfo->bMultipleDoc = bMultipleDoc;
rEditView.pImpEditView->SetEditSelection( aEditDoc.GetStartPaM() );
EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() );
- pSpellInfo->aSpellStart = CreateEPaM( SelectWord( aCurSel, ::com::sun::star::i18n::WordType::DICTIONARY_WORD ).Min() );
+ pSpellInfo = CreateSpellInfo( aCurSel, bMultipleDoc );
}
/*-- 13.10.2003 16:43:27---------------------------------------------------
Search for the next wrong word within the given selection
@@ -2002,33 +2015,31 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpFindNextError(EditSelection& r
/*-- 13.10.2003 16:43:27---------------------------------------------------
-----------------------------------------------------------------------*/
-bool ImpEditEngine::SpellSentence(EditView& rEditView, ::svx::SpellPortions& rToFill, bool /*bIsGrammarChecking*/ )
+bool ImpEditEngine::SpellSentence(EditView& rEditView,
+ ::svx::SpellPortions& rToFill,
+ bool /*bIsGrammarChecking*/ )
{
#ifdef SVX_LIGHT
#else
bool bRet = false;
+ EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() );
//the pSpellInfo has to be created on demand
if(!pSpellInfo)
- {
- pSpellInfo = new SpellInfo;
- pSpellInfo->bMultipleDoc = sal_True;
- rEditView.pImpEditView->SetEditSelection( aEditDoc.GetStartPaM() );
- EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() );
- pSpellInfo->aSpellStart = CreateEPaM( SelectWord( aCurSel, ::com::sun::star::i18n::WordType::DICTIONARY_WORD ).Min() );
- }
+ pSpellInfo = CreateSpellInfo( aCurSel, true );
+ pSpellInfo->aCurSentenceStart = aCurSel.Min();
DBG_ASSERT( xSpeller.is(), "Kein Speller gesetzt!" );
pSpellInfo->aLastSpellPortions.clear();
pSpellInfo->aLastSpellContentSelections.clear();
rToFill.clear();
- EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() );
//if no selection previously exists the range is extended to the end of the object
if(aCurSel.Min() == aCurSel.Max())
{
ContentNode* pLastNode = aEditDoc.SaveGetObject( aEditDoc.Count()-1);
aCurSel.Max() = EditPaM(pLastNode, pLastNode->Len());
}
+ // check for next error in aCurSel and set aCurSel to that one if any was found
Reference< XSpellAlternatives > xAlt = ImpFindNextError(aCurSel);
- if(xAlt.is())
+ if (xAlt.is())
{
bRet = true;
//find the sentence boundaries
@@ -2060,6 +2071,7 @@ bool ImpEditEngine::SpellSentence(EditView& rEditView, ::svx::SpellPortions& rTo
aCurSel = aNextSel;
}
while( xAlt.is() );
+
//set the selection to the end of the current sentence
rEditView.pImpEditView->SetEditSelection(aSentencePaM.Max());
}
@@ -2173,13 +2185,20 @@ void ImpEditEngine::AddPortionIterated(
/*-- 13.10.2003 16:43:33---------------------------------------------------
-----------------------------------------------------------------------*/
-void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool /*bIsGrammarChecking*/ )
+void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
+ const ::svx::SpellPortions& rNewPortions,
+ bool bRecheck )
{
#ifdef SVX_LIGHT
#else
DBG_ASSERT(pSpellInfo, "pSpellInfo not initialized");
if(pSpellInfo)
{
+ // get current paragraph length to calculate later on how the sentence length changed,
+ // in order to place the cursor at the end of the sentence again
+ EditSelection aOldSel( rEditView.pImpEditView->GetEditSelection() );
+ xub_StrLen nOldLen = aOldSel.Max().GetNode()->Len();
+
UndoActionStart( EDITUNDO_INSERT );
if(pSpellInfo->aLastSpellPortions.size() == rNewPortions.size())
{
@@ -2266,9 +2285,24 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, const ::svx::Spell
}
}
UndoActionEnd( EDITUNDO_INSERT );
+
+ EditPaM aNext;
+ if (bRecheck)
+ aNext = pSpellInfo->aCurSentenceStart;
+ else
+ {
+ // restore cursor position to the end of the modified sentence.
+ // (This will define the continuation position for spell/grammar checking)
+ // First: check if the sentence/para length changed
+ sal_Int32 nDelta = rEditView.pImpEditView->GetEditSelection().Max().GetNode()->Len() - nOldLen;
+ xub_StrLen nEndOfSentence = aOldSel.Max().GetIndex() + nDelta;
+ aNext = EditPaM( aOldSel.Max().GetNode(), nEndOfSentence );
+ }
+ rEditView.pImpEditView->SetEditSelection( aNext );
+
+ FormatAndUpdate();
+ aEditDoc.SetModified(TRUE);
}
- FormatAndUpdate();
- aEditDoc.SetModified(TRUE);
#endif
}
/*-- 08.09.2008 11:33:02---------------------------------------------------
diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx
index 1a49c087265a..81db53b3d474 100644
--- a/editeng/source/outliner/outlin2.cxx
+++ b/editeng/source/outliner/outlin2.cxx
@@ -807,7 +807,7 @@ void Outliner::PutSpellingToSentenceStart( EditView& rEditView )
/*-- 13.10.2003 16:56:25---------------------------------------------------
-----------------------------------------------------------------------*/
-void Outliner::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking )
+void Outliner::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck )
{
- pEditEngine->ApplyChangedSentence( rEditView, rNewPortions, bIsGrammarChecking );
+ pEditEngine->ApplyChangedSentence( rEditView, rNewPortions, bRecheck );
}
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index fa539da6f138..e2a1fabea0ba 100644..100755
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -26,7 +26,11 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
+
#include "precompiled_editeng.hxx"
+
+#include <com/sun/star/i18n/WordType.hpp>
+
#include <svl/intitem.hxx>
#include <editeng/editeng.hxx>
#include <editeng/editview.hxx>
@@ -34,7 +38,9 @@
#include <editeng/eerdll.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/fhgtitem.hxx>
+
#include <svl/style.hxx>
+#include <i18npool/mslangid.hxx>
#define _OUTLINER_CXX
#include <editeng/outliner.hxx>
@@ -59,6 +65,8 @@
#define OL_SCROLL_HOROFFSET 20 /* in % von VisibleSize.Width */
#define OL_SCROLL_VEROFFSET 20 /* in % von VisibleSize.Height */
+using namespace ::com::sun::star;
+
DBG_NAME(OutlinerView)
@@ -972,7 +980,7 @@ void OutlinerView::InsertText( const OutlinerParaObject& rParaObj )
// Eigentlich nicht ganz richtig, das evtl. Einrueckungen
// korrigiert werden muessen, aber das kommt spaeter durch ein
// allgemeingueltiges Import.
- // Dann wird im Inserted gleich ermittelt, was fr eine Einrueckebene
+ // Dann wird im Inserted gleich ermittelt, was f�r eine Einrueckebene
// Moegliche Struktur:
// pImportInfo mit DestPara, DestPos, nFormat, pParaObj...
// Evtl. Problematisch:
@@ -1295,7 +1303,7 @@ void OutlinerView::RemoveAttribs( BOOL bRemoveParaAttribs, USHORT nWhich, BOOL b
- // =====================================================================
+// =====================================================================
// ====================== Einfache Durchreicher =======================
// ======================================================================
@@ -1670,3 +1678,57 @@ Selection OutlinerView::GetSurroundingTextSelection() const
DBG_CHKTHIS(OutlinerView,0);
return pEditView->GetSurroundingTextSelection();
}
+
+
+// ======================================================================
+// ===== some code for thesaurus sub menu within context menu
+// ======================================================================
+
+// returns: true if a word for thesaurus look-up was found at the current cursor position.
+// The status string will be word + iso language string (e.g. "light#en-US")
+bool EDITENG_DLLPUBLIC GetStatusValueForThesaurusFromContext(
+ String &rStatusVal,
+ LanguageType &rLang,
+ const EditView &rEditView )
+{
+ // get text and locale for thesaurus look up
+ String aText;
+ EditEngine *pEditEngine = rEditView.GetEditEngine();
+ ESelection aTextSel( rEditView.GetSelection() );
+ if (!aTextSel.HasRange())
+ aTextSel = pEditEngine->GetWord( aTextSel, i18n::WordType::DICTIONARY_WORD );
+ aText = pEditEngine->GetText( aTextSel );
+ aTextSel.Adjust();
+ LanguageType nLang = pEditEngine->GetLanguage( aTextSel.nStartPara, aTextSel.nStartPos );
+ String aLangText( MsLangId::convertLanguageToIsoString( nLang ) );
+
+ // set word and locale to look up as status value
+ String aStatusVal( aText );
+ aStatusVal.AppendAscii( "#" );
+ aStatusVal += aLangText;
+
+ rStatusVal = aStatusVal;
+ rLang = nLang;
+
+ return aText.Len() > 0;
+}
+
+
+void EDITENG_DLLPUBLIC ReplaceTextWithSynonym( EditView &rEditView, const String &rSynonmText )
+{
+ // get selection to use
+ ESelection aCurSel( rEditView.GetSelection() );
+ if (!rEditView.HasSelection())
+ {
+ // select the same word that was used in GetStatusValueForThesaurusFromContext by calling GetWord.
+ // (In the end both functions will call ImpEditEngine::SelectWord)
+ rEditView.SelectCurrentWord( i18n::WordType::DICTIONARY_WORD );
+ aCurSel = rEditView.GetSelection();
+ }
+
+ // replace word ...
+ rEditView.InsertText( rSynonmText );
+ rEditView.ShowCursor( sal_True, sal_False );
+}
+
+
diff --git a/embeddedobj/source/inc/oleembobj.hxx b/embeddedobj/source/inc/oleembobj.hxx
index 11ecce69834b..fa25274b3136 100644
--- a/embeddedobj/source/inc/oleembobj.hxx
+++ b/embeddedobj/source/inc/oleembobj.hxx
@@ -186,6 +186,8 @@ class OleEmbeddedObject : public ::cppu::WeakImplHelper5
::rtl::OUString m_aTempURL;
+ ::rtl::OUString m_aTempDumpURL;
+
// STAMPIT solution
// the following member is used during verb execution to detect whether the verb execution modifies the object
VerbExecutionController m_aVerbExecutionController;
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
index f57dcb8e7fd8..78ad2c2e5885 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -46,10 +46,16 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XLoadable.hpp>
#include <com/sun/star/document/XStorageBasedDocument.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <rtl/logfile.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <comphelper/mimeconfighelper.hxx>
+#include <comphelper/storagehelper.hxx>
#include <targetstatecontrol.hxx>
@@ -674,6 +680,85 @@ sal_Int32 SAL_CALL OleEmbeddedObject::getCurrentState()
return m_nObjectState;
}
+namespace
+{
+ bool lcl_CopyStream(uno::Reference<io::XInputStream> xIn, uno::Reference<io::XOutputStream> xOut)
+ {
+ const sal_Int32 nChunkSize = 4096;
+ uno::Sequence< sal_Int8 > aData(nChunkSize);
+ sal_Int32 nTotalRead = 0;
+ sal_Int32 nRead;
+ do
+ {
+ nRead = xIn->readBytes(aData, nChunkSize);
+ nTotalRead += nRead;
+ xOut->writeBytes(aData);
+ } while (nRead == nChunkSize);
+ return nTotalRead != 0;
+ }
+
+ //Dump the objects content to a tempfile, just the "CONTENTS" stream if
+ //there is one for non-compound documents, otherwise the whole content.
+ //
+ //On success a file is returned which must be removed by the caller
+ rtl::OUString lcl_ExtractObject(::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory,
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > xObjectStream)
+ {
+ rtl::OUString sUrl;
+
+ // the solution is only active for Unix systems
+#ifndef WNT
+ uno::Reference <beans::XPropertySet> xNativeTempFile(
+ xFactory->createInstance(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile"))), uno::UNO_QUERY_THROW);
+ uno::Reference < io::XStream > xStream(xNativeTempFile, uno::UNO_QUERY_THROW);
+
+ uno::Sequence< uno::Any > aArgs( 2 );
+ aArgs[0] <<= xObjectStream;
+ aArgs[1] <<= (sal_Bool)sal_True; // do not create copy
+ uno::Reference< container::XNameContainer > xNameContainer(
+ xFactory->createInstanceWithArguments(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OLESimpleStorage")),
+ aArgs ), uno::UNO_QUERY_THROW );
+
+ uno::Reference< io::XStream > xCONTENTS;
+ xNameContainer->getByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CONTENTS"))) >>= xCONTENTS;
+
+ sal_Bool bCopied = xCONTENTS.is() && lcl_CopyStream(xCONTENTS->getInputStream(), xStream->getOutputStream());
+
+ uno::Reference< io::XSeekable > xSeekableStor(xObjectStream, uno::UNO_QUERY);
+ if (xSeekableStor.is())
+ xSeekableStor->seek(0);
+
+ if (!bCopied)
+ bCopied = lcl_CopyStream(xObjectStream->getInputStream(), xStream->getOutputStream());
+
+ if (bCopied)
+ {
+ xNativeTempFile->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveFile")),
+ uno::makeAny(sal_False));
+ uno::Any aUrl = xNativeTempFile->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")));
+ aUrl >>= sUrl;
+
+ xNativeTempFile = uno::Reference<beans::XPropertySet>();
+
+ uno::Reference<ucb::XSimpleFileAccess> xSimpleFileAccess(
+ xFactory->createInstance(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))),
+ uno::UNO_QUERY_THROW);
+
+ xSimpleFileAccess->setReadOnly(sUrl, sal_True);
+ }
+ else
+ {
+ xNativeTempFile->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveFile")),
+ uno::makeAny(sal_True));
+ }
+#endif
+ return sUrl;
+ }
+}
+
//----------------------------------------------
void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID )
throw ( lang::IllegalArgumentException,
@@ -789,10 +874,28 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID )
}
if ( !m_pOwnView || !m_pOwnView->Open() )
- throw embed::UnreachableStateException();
+ {
+ //Make a RO copy and see if the OS can find something to at
+ //least display the content for us
+ if (!m_aTempDumpURL.getLength())
+ m_aTempDumpURL = lcl_ExtractObject(m_xFactory, m_xObjectStream);
+
+ if (m_aTempDumpURL.getLength())
+ {
+ uno::Reference< ::com::sun::star::system::XSystemShellExecute > xSystemShellExecute( m_xFactory->createInstance(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute"))),
+ uno::UNO_QUERY_THROW);
+ xSystemShellExecute->execute(m_aTempDumpURL, ::rtl::OUString(), ::com::sun::star::system::SystemShellExecuteFlags::DEFAULTS);
+ }
+ else
+ throw embed::UnreachableStateException();
+ }
}
else
+ {
+
throw embed::UnreachableStateException();
+ }
}
}
diff --git a/embeddedobj/source/msole/olemisc.cxx b/embeddedobj/source/msole/olemisc.cxx
index 698ae719fbf0..adf07e1f522e 100644
--- a/embeddedobj/source/msole/olemisc.cxx
+++ b/embeddedobj/source/msole/olemisc.cxx
@@ -158,6 +158,9 @@ OleEmbeddedObject::~OleEmbeddedObject()
if ( m_aTempURL.getLength() )
KillFile_Impl( m_aTempURL, m_xFactory );
+
+ if ( m_aTempDumpURL.getLength() )
+ KillFile_Impl( m_aTempDumpURL, m_xFactory );
}
//------------------------------------------------------
diff --git a/fpicker/source/aqua/resourceprovider.cxx b/fpicker/source/aqua/resourceprovider.cxx
index 5d958d8e2888..51985208c7ed 100644
--- a/fpicker/source/aqua/resourceprovider.cxx
+++ b/fpicker/source/aqua/resourceprovider.cxx
@@ -38,7 +38,7 @@
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
#ifndef _SVTOOLS_SVTOOLS_HRC_
-#include <svl/svtools.hrc>
+#include <svtools/svtools.hrc>
#endif
#ifndef _SVTOOLS_FILEDLG2_HRC_
diff --git a/fpicker/source/office/OfficeFilePicker.src b/fpicker/source/office/OfficeFilePicker.src
index 77de1dc3918b..8fbbc35a40e5 100644
--- a/fpicker/source/office/OfficeFilePicker.src
+++ b/fpicker/source/office/OfficeFilePicker.src
@@ -25,7 +25,7 @@
*
************************************************************************/
-#include "svl/svtools.hrc"
+#include "svtools/svtools.hrc"
String STR_SVT_FILEPICKER_AUTO_EXTENSION
{
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index c7a18050c3ff..b9d7fac3aa3b 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -57,7 +57,7 @@
#include <unotools/localfilehelper.hxx>
#ifndef _SVTOOLS_HRC
-#include "svl/svtools.hrc"
+#include "svtools/svtools.hrc"
#endif
#ifndef _SVT_HELPID_HRC
#include "svtools/helpid.hrc"
@@ -1587,6 +1587,9 @@ void SvtFileDialog::UpdateControls( const String& rURL )
sText = sURL;
}
+ if ( !sText.Len() && rURL.Len() )
+ // happens, for instance, for URLs which the INetURLObject does not know to belong to a hierarchical scheme
+ sText = rURL;
_pImp->_pFtCurrentPath->SetText( sText );
}
diff --git a/fpicker/source/office/iodlg.hrc b/fpicker/source/office/iodlg.hrc
index 9f5997a4089c..15f5121b0965 100644
--- a/fpicker/source/office/iodlg.hrc
+++ b/fpicker/source/office/iodlg.hrc
@@ -29,7 +29,7 @@
#define _SVTOOLS_IODLGIMPL_HRC
#ifndef _SVTOOLS_HRC
-#include "svl/svtools.hrc"
+#include "svtools/svtools.hrc"
#endif
// ModalDialog DLG_SVT_EXPLORERFILE
diff --git a/fpicker/source/office/iodlg.src b/fpicker/source/office/iodlg.src
index b1712e6b1820..0b3c27b68071 100644
--- a/fpicker/source/office/iodlg.src
+++ b/fpicker/source/office/iodlg.src
@@ -26,7 +26,7 @@
************************************************************************/
// includes ******************************************************************
-#include "svl/svtools.hrc"
+#include "svtools/svtools.hrc"
#include "svtools/helpid.hrc"
#include "iodlg.hrc"
diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx
index 4a7c615a35b3..5e57075a6bb7 100644
--- a/fpicker/source/office/iodlgimp.cxx
+++ b/fpicker/source/office/iodlgimp.cxx
@@ -46,15 +46,12 @@
#include "svtools/fileview.hxx"
#include "svtools/inettbc.hxx"
#include "iodlg.hxx"
-#ifndef _SVTOOLS_IODLGIMPL_HRC
#include "iodlg.hrc"
-#endif
#include "svtools/imagemgr.hxx"
#include <unotools/localfilehelper.hxx>
#include "unotools/useroptions.hxx"
-#ifndef _RTL_INSTANCE_HXX_
#include "rtl/instance.hxx"
-#endif
+#include <svl/svl.hrc>
#define _SVSTDARR_STRINGSSORTDTOR
#define _SVSTDARR_STRINGSDTOR
diff --git a/fpicker/source/unx/gnome/resourceprovider.cxx b/fpicker/source/unx/gnome/resourceprovider.cxx
index dba51c5a606a..393ea7585d5a 100644
--- a/fpicker/source/unx/gnome/resourceprovider.cxx
+++ b/fpicker/source/unx/gnome/resourceprovider.cxx
@@ -40,7 +40,7 @@
#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
-#include <svl/svtools.hrc>
+#include <svtools/svtools.hrc>
#include <svtools/filedlg2.hrc>
//------------------------------------------------------------
diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
index 046147ff4b77..a7fa01a5ece6 100644
--- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
@@ -38,7 +38,7 @@
#include <com/sun/star/ui/dialogs/ControlActions.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
-#include <svl/svtools.hrc>
+#include <svtools/svtools.hrc>
#include <vos/mutex.hxx>
diff --git a/fpicker/source/win32/filepicker/FPentry.cxx b/fpicker/source/win32/filepicker/FPentry.cxx
index f22e1c3abdaf..e93c3bec18ba 100644
--- a/fpicker/source/win32/filepicker/FPentry.cxx
+++ b/fpicker/source/win32/filepicker/FPentry.cxx
@@ -67,14 +67,14 @@ static Reference< XInterface > SAL_CALL createInstance(
if (bVistaOrNewer)
{
- fprintf(stdout, "use special (vista) system file picker ...\n");
+ OSL_TRACE("use special (vista) system file picker ...");
xDlg.set(
static_cast< XFilePicker2* >(
new ::fpicker::win32::vista::VistaFilePicker( rServiceManager ) ) );
}
else
{
- fprintf(stdout, "use normal system file picker ...\n");
+ OSL_TRACE("use normal system file picker ...");
xDlg.set(
static_cast< XFilePicker2* >(
new CFilePicker( rServiceManager ) ) );
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
index c44e4bd65b35..2fadaa6bfdff 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
@@ -259,7 +259,9 @@ STDMETHODIMP VistaFilePickerEventHandler::OnSelectionChange(IFileDialog* /*pDial
//-----------------------------------------------------------------------------------------
STDMETHODIMP VistaFilePickerEventHandler::OnShareViolation(IFileDialog* /*pDialog*/ ,
- IShellItem* /*pItem*/ ,
+
+ IShellItem* /*pItem*/ ,
+
FDE_SHAREVIOLATION_RESPONSE* /*pResponse*/)
{
impl_sendEvent(E_CONTROL_STATE_CHANGED, css::ui::dialogs::CommonFilePickerElementIds::LISTBOX_FILTER);
@@ -308,9 +310,12 @@ STDMETHODIMP VistaFilePickerEventHandler::OnOverwrite(IFileDialog* /*
//-----------------------------------------------------------------------------------------
STDMETHODIMP VistaFilePickerEventHandler::OnItemSelected(IFileDialogCustomize* /*pCustomize*/,
- DWORD nIDCtl ,
+
+ DWORD nIDCtl ,
+
DWORD /*nIDItem*/ )
{
+
impl_sendEvent(E_CONTROL_STATE_CHANGED, static_cast<sal_Int16>( nIDCtl ));
return S_OK;
}
@@ -319,6 +324,7 @@ STDMETHODIMP VistaFilePickerEventHandler::OnItemSelected(IFileDialogCustomize* /
STDMETHODIMP VistaFilePickerEventHandler::OnButtonClicked(IFileDialogCustomize* /*pCustomize*/,
DWORD nIDCtl )
{
+
impl_sendEvent(E_CONTROL_STATE_CHANGED, static_cast<sal_Int16>( nIDCtl));
return S_OK;
}
@@ -353,7 +359,9 @@ STDMETHODIMP VistaFilePickerEventHandler::OnCheckButtonToggled(IFileDialogCustom
if (nIDCtl == css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION)
m_pInternalNotify->onAutoExtensionChanged(bChecked);
+
impl_sendEvent(E_CONTROL_STATE_CHANGED, static_cast<sal_Int16>( nIDCtl));
+
return S_OK;
}
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
index c0296892cb65..ac59a4f65b99 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
@@ -147,6 +147,7 @@ VistaFilePickerImpl::VistaFilePickerImpl()
, m_lLastFiles ()
, m_iEventHandler(new VistaFilePickerEventHandler(this))
, m_bInExecute (sal_False)
+ , m_bWasExecuted (sal_False)
, m_sDirectory ()
, m_sFilename ()
{
@@ -851,6 +852,8 @@ void VistaFilePickerImpl::impl_sta_ShowDialogModal(const RequestRef& rRequest)
// tasks must be done differently .-) (e.g. see impl_sta_getSelectedFiles())
m_bInExecute = sal_True;
+ m_bWasExecuted = sal_True;
+
aLock.clear();
// <- SYNCHRONIZED
@@ -1092,6 +1095,7 @@ void VistaFilePickerImpl::impl_sta_GetControlValue(const RequestRef& rRequest)
return;
css::uno::Any aValue;
+ if( m_bWasExecuted )
switch (nId)
{
case css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_PASSWORD :
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
index 3b0fa43b0dad..6be17935609b 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
@@ -329,6 +329,8 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
/// @todo document me
::sal_Bool m_bInExecute;
+ ::sal_Bool m_bWasExecuted;
+
// handle to parent window
HWND m_hParentWindow;
diff --git a/fpicker/source/win32/misc/resourceprovider.cxx b/fpicker/source/win32/misc/resourceprovider.cxx
index 805f24c315d7..b5448a93008c 100644
--- a/fpicker/source/win32/misc/resourceprovider.cxx
+++ b/fpicker/source/win32/misc/resourceprovider.cxx
@@ -43,7 +43,7 @@
#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
-#include <svl/svtools.hrc>
+#include <svtools/svtools.hrc>
//------------------------------------------------------------
// namespace directives
diff --git a/framework/inc/classes/menumanager.hxx b/framework/inc/classes/menumanager.hxx
index 5c14edde9c03..8826716f1d6f 100644
--- a/framework/inc/classes/menumanager.hxx
+++ b/framework/inc/classes/menumanager.hxx
@@ -82,13 +82,14 @@ class MenuManager : public ThreadHelpBase ,
Menu* pMenu,
sal_Bool bDelete,
sal_Bool bDeleteChildren );
-
+#if 0
MenuManager(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
REFERENCE< XFRAME >& rFrame,
AddonMenu* pAddonMenu,
sal_Bool bDelete,
sal_Bool bDeleteChildren );
+#endif
virtual ~MenuManager();
diff --git a/framework/inc/classes/resource.hrc b/framework/inc/classes/resource.hrc
index a2bf56376913..8c9bd2e854b0 100644
--- a/framework/inc/classes/resource.hrc
+++ b/framework/inc/classes/resource.hrc
@@ -55,6 +55,7 @@
#define STR_SET_LANGUAGE_FOR_PARAGRAPH (RID_STR_START+19)
#define STR_SET_LANGUAGE_FOR_ALL_TEXT (RID_STR_START+20)
#define STR_UNTITLED_DOCUMENT (RID_STR_START+21)
+#define STR_RESET_TO_DEFAULT_LANGUAGE (RID_STR_START+22)
#define POPUPMENU_TOOLBAR_QUICKCUSTOMIZATION (RID_MENU_START+0)
diff --git a/framework/inc/classes/sfxhelperfunctions.hxx b/framework/inc/classes/sfxhelperfunctions.hxx
index ab20e9f0f25f..ac3fa472f249 100644
--- a/framework/inc/classes/sfxhelperfunctions.hxx
+++ b/framework/inc/classes/sfxhelperfunctions.hxx
@@ -40,6 +40,7 @@ typedef svt::StatusbarController* ( *pfunc_setStatusBarControllerCreator)( const
typedef void ( *pfunc_getRefreshToolbars)( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
typedef void ( *pfunc_createDockingWindow)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL );
typedef bool ( *pfunc_isDockingWindowVisible)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL );
+typedef void ( *pfunc_activateToolPanel)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL );
namespace framework
{
@@ -63,6 +64,10 @@ void SAL_CALL CreateDockingWindow( const ::com::sun::star::uno::Reference< ::com
pfunc_isDockingWindowVisible SAL_CALL SetIsDockingWindowVisible( pfunc_isDockingWindowVisible pIsDockingWindowVisible );
bool SAL_CALL IsDockingWindowVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL );
+
+pfunc_activateToolPanel SAL_CALL SetActivateToolPanel( pfunc_activateToolPanel i_pActivator );
+
+void SAL_CALL ActivateToolPanel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL );
}
#endif // __FRAMEWORK_CLASSES_SFXHELPERFUNCTIONS_HXX_
diff --git a/framework/inc/helper/imageproducer.hxx b/framework/inc/helper/imageproducer.hxx
index 6d8885a5fa96..dff0ccfd1049 100644
--- a/framework/inc/helper/imageproducer.hxx
+++ b/framework/inc/helper/imageproducer.hxx
@@ -39,11 +39,11 @@
namespace framework
{
-typedef Image ( *pfunc_getImage)( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast );
+typedef Image ( *pfunc_getImage)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast );
pfunc_getImage SAL_CALL SetImageProducer( pfunc_getImage pGetImageFunc );
-Image SAL_CALL GetImageFromURL( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast );
+Image SAL_CALL GetImageFromURL( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast );
}
diff --git a/framework/inc/helper/mischelper.hxx b/framework/inc/helper/mischelper.hxx
index 96329d4f98b9..6a1886244b54 100644..100755
--- a/framework/inc/helper/mischelper.hxx
+++ b/framework/inc/helper/mischelper.hxx
@@ -34,10 +34,56 @@
#include <i18npool/lang.h>
#include <svl/languageoptions.hxx>
+#include <rtl/ustring.hxx>
+
+#include <set>
+
+class SvtLanguageTable;
+
+
+// flags for script types in use within selection
+#define LS_SCRIPT_LATIN 0x0001
+#define LS_SCRIPT_ASIAN 0x0002
+#define LS_SCRIPT_COMPLEX 0x0004
+
namespace framework
{
+// menu ids for language status bar control
+enum LangMenuIDs
+{
+ MID_LANG_SEL_1 = 1, // need to start with 1 since xPopupMenu->execute will return 0 if the menu is cancelled
+ MID_LANG_SEL_2,
+ MID_LANG_SEL_3,
+ MID_LANG_SEL_4,
+ MID_LANG_SEL_5,
+ MID_LANG_SEL_6,
+ MID_LANG_SEL_7,
+ MID_LANG_SEL_8,
+ MID_LANG_SEL_9,
+ MID_LANG_SEL_NONE,
+ MID_LANG_SEL_RESET,
+ MID_LANG_SEL_MORE,
+
+ MID_LANG_PARA_SEPERATOR,
+ MID_LANG_PARA_STRING,
+
+ MID_LANG_PARA_1,
+ MID_LANG_PARA_2,
+ MID_LANG_PARA_3,
+ MID_LANG_PARA_4,
+ MID_LANG_PARA_5,
+ MID_LANG_PARA_6,
+ MID_LANG_PARA_7,
+ MID_LANG_PARA_8,
+ MID_LANG_PARA_9,
+ MID_LANG_PARA_NONE,
+ MID_LANG_PARA_RESET,
+ MID_LANG_PARA_MORE,
+};
+
+
inline bool IsScriptTypeMatchingToLanguage( sal_Int16 nScriptType, LanguageType nLang )
{
return 0 != (nScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ));
@@ -63,6 +109,15 @@ public:
,sal_Bool& _rIni
,const sal_Char* _pName);
+void FillLangItems( std::set< ::rtl::OUString > &rLangItems,
+ const SvtLanguageTable &rLanguageTable,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > &rxFrame,
+ const LanguageGuessingHelper & rLangGuessHelper,
+ sal_Int16 nScriptType,
+ const ::rtl::OUString & rCurLang,
+ const ::rtl::OUString & rKeyboardLang,
+ const ::rtl::OUString & rGuessedTextLang );
+
} // namespace framework
#endif // __MISC_HELPER_HXX_
diff --git a/framework/inc/helper/popupmenucontrollerbase.hxx b/framework/inc/helper/popupmenucontrollerbase.hxx
deleted file mode 100644
index e723b36aec3b..000000000000
--- a/framework/inc/helper/popupmenucontrollerbase.hxx
+++ /dev/null
@@ -1,145 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef __FRAMEWORK_HELPER_POPUPMENUCONTROLLERBASE_HXX_
-#define __FRAMEWORK_HELPER_POPUPMENUCONTROLLERBASE_HXX_
-
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
-
-#include <threadhelp/threadhelpbase.hxx>
-#include <macros/generic.hxx>
-#include <macros/xinterface.hxx>
-#include <macros/xtypeprovider.hxx>
-#include <macros/xserviceinfo.hxx>
-#include <stdtypes.h>
-
-//_________________________________________________________________________________________________________________
-// interface includes
-//_________________________________________________________________________________________________________________
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/XStatusListener.hpp>
-#include <com/sun/star/frame/XPopupMenuController.hpp>
-#include <com/sun/star/uri/XUriReferenceFactory.hpp>
-#include <com/sun/star/uri/XUriReference.hpp>
-#include <com/sun/star/util/XURLTransformer.hpp>
-//_________________________________________________________________________________________________________________
-// includes of other projects
-//_________________________________________________________________________________________________________________
-#include <toolkit/awt/vclxmenu.hxx>
-#include <cppuhelper/weak.hxx>
-#include <rtl/ustring.hxx>
-
-namespace framework
-{
- class PopupMenuControllerBase : public com::sun::star::lang::XTypeProvider ,
- public com::sun::star::lang::XServiceInfo ,
- public ::com::sun::star::frame::XPopupMenuController ,
- public com::sun::star::lang::XInitialization ,
- public com::sun::star::frame::XStatusListener ,
- public com::sun::star::awt::XMenuListener ,
- public com::sun::star::frame::XDispatchProvider ,
- public com::sun::star::frame::XDispatch ,
- public com::sun::star::lang::XComponent ,
- protected ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
- public ::cppu::OBroadcastHelper ,
- public ::cppu::OWeakObject
- {
- public:
- PopupMenuControllerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
- virtual ~PopupMenuControllerBase();
-
- // XInterface, XTypeProvider, XServiceInfo
- FWK_DECLARE_XINTERFACE
- FWK_DECLARE_XTYPEPROVIDER
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) = 0;
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException) = 0;
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) = 0;
-
- // XPopupMenuController
- virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException);
-
- // XInitialization
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
-
- // XStatusListener
- virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) = 0;
-
- // XMenuListener
- virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
-
- // XDispatchProvider
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& sTarget, sal_Int32 nFlags ) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& lDescriptor ) throw( ::com::sun::star::uno::RuntimeException );
-
- // XDispatch
- virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& seqProperties ) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw( ::com::sun::star::uno::RuntimeException );
-
- // XEventListener
- virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
-
- // XComponent
- virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
-
- protected:
- virtual void resetPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu );
- virtual void impl_setPopupMenu();
- virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL);
- ::rtl::OUString determineBaseURL( const ::rtl::OUString& aURL );
-
-
- bool m_bInitialized;
- bool m_bDisposed;
- rtl::OUString m_aCommandURL;
- rtl::OUString m_aBaseURL;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xDispatch;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
- ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > m_xPopupMenu;
- ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; // container for ALL Listener
- };
-}
-
-#endif // __FRAMEWORK_HELPER_POPUPMENUCONTROLLERBASE_HXX_
diff --git a/framework/inc/helper/uiconfigelementwrapperbase.hxx b/framework/inc/helper/uiconfigelementwrapperbase.hxx
index c3ec5075cc07..05ab216d6f06 100644
--- a/framework/inc/helper/uiconfigelementwrapperbase.hxx
+++ b/framework/inc/helper/uiconfigelementwrapperbase.hxx
@@ -101,6 +101,9 @@ class UIConfigElementWrapperBase : public ::com::sun::star::lang::XTypeProvider
virtual void SAL_CALL setSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& UISettings ) throw (::com::sun::star::uno::RuntimeException);
// XUIElement
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getResourceURL() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException) = 0;
// XUpdatable
diff --git a/framework/inc/helper/uielementwrapperbase.hxx b/framework/inc/helper/uielementwrapperbase.hxx
index e5df1a142826..bc83765b09fe 100644
--- a/framework/inc/helper/uielementwrapperbase.hxx
+++ b/framework/inc/helper/uielementwrapperbase.hxx
@@ -92,6 +92,9 @@ class UIElementWrapperBase : public ::com::sun::star::lang::XTypeProvider
virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException);
// XUIElement
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getResourceURL() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException) = 0;
//-------------------------------------------------------------------------------------------------------------
diff --git a/framework/inc/threadhelp/fairrwlock.hxx b/framework/inc/threadhelp/fairrwlock.hxx
index af9617a9ba47..0f984c8d03f9 100644
--- a/framework/inc/threadhelp/fairrwlock.hxx
+++ b/framework/inc/threadhelp/fairrwlock.hxx
@@ -40,7 +40,6 @@
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/uno/XInterface.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// other includes
diff --git a/framework/inc/uielement/controlmenucontroller.hxx b/framework/inc/uielement/controlmenucontroller.hxx
index a1be2ee47b3b..6e0c9deb03c0 100644
--- a/framework/inc/uielement/controlmenucontroller.hxx
+++ b/framework/inc/uielement/controlmenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -52,6 +52,7 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
@@ -59,8 +60,10 @@
class PopupMenu;
namespace framework
{
- class ControlMenuController : public PopupMenuControllerBase
+ class ControlMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
ControlMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~ControlMenuController();
diff --git a/framework/inc/uielement/fontmenucontroller.hxx b/framework/inc/uielement/fontmenucontroller.hxx
index f14680a49030..79905658839b 100644
--- a/framework/inc/uielement/fontmenucontroller.hxx
+++ b/framework/inc/uielement/fontmenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -50,14 +50,17 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
- class FontMenuController : public PopupMenuControllerBase
+ class FontMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
FontMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~FontMenuController();
diff --git a/framework/inc/uielement/fontsizemenucontroller.hxx b/framework/inc/uielement/fontsizemenucontroller.hxx
index d0afe40154fe..4e5623084908 100644
--- a/framework/inc/uielement/fontsizemenucontroller.hxx
+++ b/framework/inc/uielement/fontsizemenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -51,14 +51,17 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
- class FontSizeMenuController : public PopupMenuControllerBase
+ class FontSizeMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
FontSizeMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~FontSizeMenuController();
diff --git a/framework/inc/uielement/headermenucontroller.hxx b/framework/inc/uielement/headermenucontroller.hxx
index 8ec012e80319..0deeb878156d 100644
--- a/framework/inc/uielement/headermenucontroller.hxx
+++ b/framework/inc/uielement/headermenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -52,14 +52,17 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
- class HeaderMenuController : public PopupMenuControllerBase
+ class HeaderMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
HeaderMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager,bool _bFooter = sal_False );
virtual ~HeaderMenuController();
diff --git a/framework/inc/uielement/langselectionmenucontroller.hxx b/framework/inc/uielement/langselectionmenucontroller.hxx
index 36035040bcad..257638ecd77f 100644
--- a/framework/inc/uielement/langselectionmenucontroller.hxx
+++ b/framework/inc/uielement/langselectionmenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -51,6 +51,7 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
@@ -59,8 +60,10 @@
namespace framework
{
- class LanguageSelectionMenuController : public PopupMenuControllerBase
+ class LanguageSelectionMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
LanguageSelectionMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~LanguageSelectionMenuController();
@@ -99,11 +102,10 @@ namespace framework
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xMenuDispatch_Font;
::rtl::OUString m_aMenuCommandURL_CharDlgForParagraph;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xMenuDispatch_CharDlgForParagraph;
- ::rtl::OUString m_aCurrentLanguage;
::rtl::OUString m_aCurLang;
sal_Int16 m_nScriptType;
::rtl::OUString m_aKeyboardLang;
- ::rtl::OUString m_aGuessedText;
+ ::rtl::OUString m_aGuessedTextLang;
LanguageGuessingHelper m_aLangGuessHelper;
void fillPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu, const Mode rMode );
diff --git a/framework/inc/uielement/langselectionstatusbarcontroller.hxx b/framework/inc/uielement/langselectionstatusbarcontroller.hxx
index 09cd83901b1e..4d46538eb6d6 100644
--- a/framework/inc/uielement/langselectionstatusbarcontroller.hxx
+++ b/framework/inc/uielement/langselectionstatusbarcontroller.hxx
@@ -35,9 +35,15 @@
#include <stdtypes.h>
#include <com/sun/star/linguistic2/XLanguageGuessing.hpp>
#include <svtools/statusbarcontroller.hxx>
+#include <rtl/ustring.hxx>
#include "helper/mischelper.hxx"
+#include <set>
+
+class SvtLanguageTable;
+
+
// component helper namespace
namespace framework {
@@ -86,12 +92,11 @@ class LangSelectionStatusbarController : public svt::StatusbarController
void operator =(LangSelectionStatusbarController &); // not defined
- sal_Bool m_bShowMenu;
- sal_Int16 m_nScriptType;
- ::rtl::OUString m_aCurrentLanguage;
- ::rtl::OUString m_aCurLang;
- ::rtl::OUString m_aKeyboardLang;
- ::rtl::OUString m_aGuessedText;
+ sal_Bool m_bShowMenu; // if the menu is to be displayed or not (depending on the selected object/text)
+ sal_Int16 m_nScriptType; // the flags for the different script types available in the selection, LATIN = 0x0001, ASIAN = 0x0002, COMPLEX = 0x0004
+ ::rtl::OUString m_aCurLang; // the language of the current selection, "*" if there are more than one languages
+ ::rtl::OUString m_aKeyboardLang; // the keyboard language
+ ::rtl::OUString m_aGuessedTextLang; // the 'guessed' language for the selection, "" if none could be guessed
LanguageGuessingHelper m_aLangGuessHelper;
void LangMenu() throw (::com::sun::star::uno::RuntimeException);
diff --git a/framework/inc/uielement/macrosmenucontroller.hxx b/framework/inc/uielement/macrosmenucontroller.hxx
index 6070a44d3564..1e8b9024eaca 100644
--- a/framework/inc/uielement/macrosmenucontroller.hxx
+++ b/framework/inc/uielement/macrosmenucontroller.hxx
@@ -28,7 +28,7 @@
#ifndef __FRAMEWORK_UIELEMENT_MACROSMENUCONTROLLER_HXX_
#define __FRAMEWORK_UIELEMENT_MACROSMENUCONTROLLER_HXX_
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
@@ -40,6 +40,7 @@
#include <com/sun/star/frame/XStatusListener.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/frame/XPopupMenuController.hpp>
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <vcl/menu.hxx>
@@ -47,8 +48,10 @@
namespace framework
{
- class MacrosMenuController : public PopupMenuControllerBase
+ class MacrosMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
struct ExecuteInfo
{
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
diff --git a/framework/inc/uielement/newmenucontroller.hxx b/framework/inc/uielement/newmenucontroller.hxx
index e937623b44b9..5e14b70f0044 100644
--- a/framework/inc/uielement/newmenucontroller.hxx
+++ b/framework/inc/uielement/newmenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -53,6 +53,7 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
@@ -71,8 +72,10 @@ namespace framework
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
};
- class NewMenuController : public PopupMenuControllerBase
+ class NewMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
NewMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~NewMenuController();
diff --git a/framework/inc/uielement/objectmenucontroller.hxx b/framework/inc/uielement/objectmenucontroller.hxx
index 94c1d849e197..7a03dfd1458e 100644
--- a/framework/inc/uielement/objectmenucontroller.hxx
+++ b/framework/inc/uielement/objectmenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -51,14 +51,17 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
- class ObjectMenuController : public PopupMenuControllerBase
+ class ObjectMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
ObjectMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~ObjectMenuController();
diff --git a/framework/inc/uielement/popupmenucontroller.hxx b/framework/inc/uielement/popupmenucontroller.hxx
new file mode 100644
index 000000000000..ef44a4703ca2
--- /dev/null
+++ b/framework/inc/uielement/popupmenucontroller.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __FRAMEWORK_POPUPMENUCONTROLLER_HXX_
+#define __FRAMEWORK_POPUPMENUCONTROLLER_HXX_
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/frame/XPopupMenuController.hpp>
+
+#include "svtools/toolboxcontroller.hxx"
+#include "boost/scoped_ptr.hpp"
+
+#include <macros/xserviceinfo.hxx>
+
+class Window;
+
+namespace framework
+{
+class PopupMenuControllerImpl;
+
+class PopupMenuController : public svt::ToolboxController, public ::com::sun::star::lang::XServiceInfo
+{
+public:
+ PopupMenuController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
+ ~PopupMenuController();
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+
+ // XServiceInfo
+ DECLARE_XSERVICEINFO
+
+ // XComponent
+ virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
+
+ // XStatusListener
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XToolbarController
+ virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL click() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL doubleClick() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException);
+
+ bool CreatePopupMenuController() throw (::com::sun::star::uno::Exception);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XPopupMenuController > mxPopupMenuController;
+ ::com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu > mxPopupMenu;
+};
+
+} // namespace framework
+
+#endif // __FRAMEWORK_POPUPMENUCONTROLLER_HXX_
diff --git a/framework/inc/uielement/recentfilesmenucontroller.hxx b/framework/inc/uielement/recentfilesmenucontroller.hxx
index 40c3a55737c1..26a8e38dd49c 100644
--- a/framework/inc/uielement/recentfilesmenucontroller.hxx
+++ b/framework/inc/uielement/recentfilesmenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -52,6 +52,7 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
@@ -65,8 +66,10 @@ namespace framework
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
};
- class RecentFilesMenuController : public PopupMenuControllerBase
+ class RecentFilesMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
RecentFilesMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~RecentFilesMenuController();
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index 1be8579a4112..5e780edb366b 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -58,7 +58,11 @@
#include <com/sun/star/frame/XToolbarController.hpp>
#include <com/sun/star/ui/ItemStyle.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
+#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
+//shizhoubo
+#include <com/sun/star/frame/XToolbarController.hpp>
+//end
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
@@ -67,6 +71,7 @@
#include <cppuhelper/interfacecontainer.hxx>
#include <vcl/toolbox.hxx>
+#include <vcl/accel.hxx>
namespace com
{
@@ -183,6 +188,9 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetPropsForCommand( const ::rtl::OUString& rCmdURL );
void CreateControllers();
void UpdateControllers();
+ //for update controller via Support Visiable by shizhoubo
+ void UpdateController( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XToolbarController > xController);
+ //end
void AddFrameActionListener();
void AddImageOrientationListener();
void UpdateImageOrientation();
@@ -196,6 +204,9 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
void setToolBarImage(const Image& _aImage,const CommandToInfoMap::const_iterator& _pIter);
void impl_elementChanged(bool _bRemove,const ::com::sun::star::ui::ConfigurationEvent& Event );
+ static bool impl_RetrieveShortcutsFromConfiguration( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration >& rAccelCfg, const rtl::OUString& rCommand, rtl::OUString& rShortCut );
+ bool RetrieveShortcut( const rtl::OUString& rCommandURL, rtl::OUString& rShortCut );
+
protected:
typedef ::std::hash_map< sal_uInt16, ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener > > ToolBarControllerMap;
typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XSubToolbarController > > SubToolBarControllerVector;
@@ -235,6 +246,10 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
Timer m_aAsyncUpdateControllersTimer;
sal_Int16 m_nSymbolsStyle;
MenuDescriptionMap m_aMenuMap;
+ sal_Bool m_bAcceleratorCfg;
+ ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xDocAcceleratorManager;
+ ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xModuleAcceleratorManager;
+ ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xGlobalAcceleratorManager;
};
}
diff --git a/framework/inc/uielement/toolbarsmenucontroller.hxx b/framework/inc/uielement/toolbarsmenucontroller.hxx
index dcb0b57182df..35f517d33e80 100644
--- a/framework/inc/uielement/toolbarsmenucontroller.hxx
+++ b/framework/inc/uielement/toolbarsmenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -54,6 +54,7 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
@@ -63,8 +64,10 @@
namespace framework
{
- class ToolbarsMenuController : public PopupMenuControllerBase
+ class ToolbarsMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
ToolbarsMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~ToolbarsMenuController();
diff --git a/framework/inc/uielement/uielementtypenames.hxx b/framework/inc/uielement/uielementtypenames.hxx
index fcd14c2f8bff..ca7815f90af7 100644
--- a/framework/inc/uielement/uielementtypenames.hxx
+++ b/framework/inc/uielement/uielementtypenames.hxx
@@ -7,5 +7,6 @@
#define UIELEMENTTYPE_STATUSBAR_NAME "statusbar"
#define UIELEMENTTYPE_FLOATINGWINDOW_NAME "floater"
#define UIELEMENTTYPE_PROGRESSBAR_NAME "progressbar"
+#define UIELEMENTTYPE_TOOLPANEL_NAME "toolpanel"
#endif // __FRAMEWORK_UIELEMENT_UIELEMENTTYPENAMES_HXX_
diff --git a/framework/prj/d.lst b/framework/prj/d.lst
index a8640138ba25..7f260f07cf65 100644
--- a/framework/prj/d.lst
+++ b/framework/prj/d.lst
@@ -5,8 +5,6 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\menubar
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\toolbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\accelerator
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\accelerator\en-US
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar
..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid
@@ -47,7 +45,6 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar
..\uiconfig\startmodule\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\menubar\*.xml
..\uiconfig\startmodule\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\toolbar\*.xml
-..\uiconfig\startmodule\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\accelerator\en-US\*.xml
..\uiconfig\startmodule\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar\*.xml
..\source\unotypes\fw?.xml %_DEST%\xml%_EXT%\*.xml
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index 0b2f30093ca8..61cb8eb4a253 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -357,6 +357,7 @@ MenuManager::MenuManager(
SetHdl();
}
+#if 0
// #110897#
MenuManager::MenuManager(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
@@ -413,6 +414,7 @@ MenuManager::MenuManager(
SetHdl();
}
+#endif
void MenuManager::SetHdl()
{
diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src
index d95e0d7213f0..2f8e1bdf2f16 100644
--- a/framework/source/classes/resource.src
+++ b/framework/source/classes/resource.src
@@ -327,6 +327,11 @@ String STR_LANGSTATUS_NONE
Text [ en-US ] = "None (Do not check spelling)" ;
Text [ x-comment ] = " ";
};
+String STR_RESET_TO_DEFAULT_LANGUAGE
+{
+ Text [ en-US ] = "Reset to Default Language" ;
+ Text [ x-comment ] = " ";
+};
String STR_LANGSTATUS_MORE
{
Text [ en-US ] = "More..." ;
diff --git a/framework/source/classes/sfxhelperfunctions.cxx b/framework/source/classes/sfxhelperfunctions.cxx
index 655d96cdb681..c6953b1ea2b9 100644
--- a/framework/source/classes/sfxhelperfunctions.cxx
+++ b/framework/source/classes/sfxhelperfunctions.cxx
@@ -32,11 +32,14 @@
#include <classes/sfxhelperfunctions.hxx>
#endif
+#include <tools/diagnose_ex.h>
+
static pfunc_setToolBoxControllerCreator pToolBoxControllerCreator = NULL;
static pfunc_setStatusBarControllerCreator pStatusBarControllerCreator = NULL;
static pfunc_getRefreshToolbars pRefreshToolbars = NULL;
static pfunc_createDockingWindow pCreateDockingWindow = NULL;
static pfunc_isDockingWindowVisible pIsDockingWindowVisible = NULL;
+static pfunc_activateToolPanel pActivateToolPanel = NULL;
@@ -155,4 +158,24 @@ bool SAL_CALL IsDockingWindowVisible( const ::com::sun::star::uno::Reference< ::
return false;
}
+pfunc_activateToolPanel SAL_CALL SetActivateToolPanel( pfunc_activateToolPanel i_pActivator )
+{
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ pfunc_activateToolPanel pOldFunc = pActivateToolPanel;
+ pActivateToolPanel = i_pActivator;
+ return pOldFunc;
+}
+
+void SAL_CALL ActivateToolPanel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL )
+{
+ pfunc_activateToolPanel pActivator = NULL;
+ {
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ pActivator = pActivateToolPanel;
+ }
+
+ ENSURE_OR_RETURN_VOID( pActivator, "framework::ActivateToolPanel: no activator function!" );
+ (*pActivator)( i_rFrame, i_rPanelURL );
+}
+
}
diff --git a/framework/source/helper/imageproducer.cxx b/framework/source/helper/imageproducer.cxx
index 7870697f42a1..c4cf5921ee11 100644
--- a/framework/source/helper/imageproducer.cxx
+++ b/framework/source/helper/imageproducer.cxx
@@ -44,7 +44,7 @@ pfunc_getImage SAL_CALL SetImageProducer( pfunc_getImage pNewGetImageFunc )
}
-Image SAL_CALL GetImageFromURL( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast )
+Image SAL_CALL GetImageFromURL( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast )
{
if ( _pGetImageFunc )
return _pGetImageFunc( rFrame, aURL, bBig, bHiContrast );
diff --git a/framework/source/helper/makefile.mk b/framework/source/helper/makefile.mk
index 556a9829d27c..ed54c381160c 100644
--- a/framework/source/helper/makefile.mk
+++ b/framework/source/helper/makefile.mk
@@ -53,7 +53,6 @@ SLOFILES= $(SLO)$/ocomponentaccess.obj \
$(SLO)$/networkdomain.obj \
$(SLO)$/acceleratorinfo.obj \
$(SLO)$/uielementwrapperbase.obj \
- $(SLO)$/popupmenucontrollerbase.obj \
$(SLO)$/dockingareadefaultacceptor.obj \
$(SLO)$/uiconfigelementwrapperbase.obj \
$(SLO)$/shareablemutex.obj \
diff --git a/framework/source/helper/mischelper.cxx b/framework/source/helper/mischelper.cxx
index 801714bafcc1..deb5aa023c1b 100644
--- a/framework/source/helper/mischelper.cxx
+++ b/framework/source/helper/mischelper.cxx
@@ -29,10 +29,15 @@
#include "precompiled_framework.hxx"
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/document/XDocumentLanguages.hpp>
#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <tools/debug.hxx>
+#include <vcl/settings.hxx>
+#include <vcl/svapp.hxx>
+#include <i18npool/mslangid.hxx>
+#include <svtools/langtab.hxx>
#include <comphelper/processfactory.hxx>
#include <helper/mischelper.hxx>
#include <services.h>
@@ -45,6 +50,9 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
+using ::rtl::OUString;
+
+
namespace framework
{
@@ -68,20 +76,23 @@ uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGues
return m_xLanguageGuesser;
}
-::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL
- ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceFactory
- ,::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xUICommandLabels
- ,const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame
- ,::rtl::OUString& _rModuleIdentifier
- ,sal_Bool& _rIni
- ,const sal_Char* _pName)
+////////////////////////////////////////////////////////////
+
+::rtl::OUString RetrieveLabelFromCommand(
+ const ::rtl::OUString& aCmdURL,
+ const uno::Reference< lang::XMultiServiceFactory >& _xServiceFactory,
+ uno::Reference< container::XNameAccess >& _xUICommandLabels,
+ const uno::Reference< frame::XFrame >& _xFrame,
+ ::rtl::OUString& _rModuleIdentifier,
+ sal_Bool& _rIni,
+ const sal_Char* _pName)
{
::rtl::OUString aLabel;
// Retrieve popup menu labels
if ( !_xUICommandLabels.is() )
{
- try
+ try
{
if ( !_rIni )
{
@@ -138,5 +149,91 @@ uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGues
return aLabel;
}
+////////////////////////////////////////////////////////////
+
+void FillLangItems( std::set< OUString > &rLangItems,
+ const SvtLanguageTable & rLanguageTable,
+ const uno::Reference< frame::XFrame > & rxFrame,
+ const LanguageGuessingHelper & rLangGuessHelper,
+ sal_Int16 nScriptType,
+ const OUString & rCurLang,
+ const OUString & rKeyboardLang,
+ const OUString & rGuessedTextLang )
+{
+ rLangItems.clear();
+
+ //1--add current language
+ if( rCurLang != OUString() &&
+ LANGUAGE_DONTKNOW != rLanguageTable.GetType( rCurLang ))
+ rLangItems.insert( rCurLang );
+
+ //2--System
+ const AllSettings& rAllSettings = Application::GetSettings();
+ LanguageType rSystemLanguage = rAllSettings.GetLanguage();
+ if( rSystemLanguage != LANGUAGE_DONTKNOW )
+ {
+ if ( IsScriptTypeMatchingToLanguage( nScriptType, rSystemLanguage ))
+ rLangItems.insert( OUString( rLanguageTable.GetString( rSystemLanguage )) );
+ }
+
+ //3--UI
+ LanguageType rUILanguage = rAllSettings.GetUILanguage();
+ if( rUILanguage != LANGUAGE_DONTKNOW )
+ {
+ if ( IsScriptTypeMatchingToLanguage( nScriptType, rUILanguage ))
+ rLangItems.insert( OUString( rLanguageTable.GetString( rUILanguage )) );
+ }
+
+ //4--guessed language
+ uno::Reference< linguistic2::XLanguageGuessing > xLangGuesser( rLangGuessHelper.GetGuesser() );
+ if ( xLangGuesser.is() && rGuessedTextLang.getLength() > 0)
+ {
+ ::com::sun::star::lang::Locale aLocale(xLangGuesser->guessPrimaryLanguage( rGuessedTextLang, 0, rGuessedTextLang.getLength()) );
+ LanguageType nLang = MsLangId::convertLocaleToLanguageWithFallback( aLocale );
+ if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_NONE && nLang != LANGUAGE_SYSTEM
+ && IsScriptTypeMatchingToLanguage( nScriptType, nLang ))
+ rLangItems.insert( rLanguageTable.GetString( nLang ));
+ }
+
+ //5--keyboard language
+ if( rKeyboardLang != OUString())
+ {
+ if ( IsScriptTypeMatchingToLanguage( nScriptType, rLanguageTable.GetType( rKeyboardLang )))
+ rLangItems.insert( rKeyboardLang );
+ }
+
+ //6--all languages used in current document
+ Reference< com::sun::star::frame::XModel > xModel;
+ if ( rxFrame.is() )
+ {
+ Reference< com::sun::star::frame::XController > xController( rxFrame->getController(), UNO_QUERY );
+ if ( xController.is() )
+ xModel = xController->getModel();
+ }
+ Reference< document::XDocumentLanguages > xDocumentLanguages( xModel, UNO_QUERY );
+ /*the description of nScriptType
+ LATIN : 0x001
+ ASIAN : 0x002
+ COMPLEX: 0x004
+ */
+ const sal_Int16 nMaxCount = 7;
+ if ( xDocumentLanguages.is() )
+ {
+ Sequence< Locale > rLocales( xDocumentLanguages->getDocumentLanguages( nScriptType, nMaxCount ));
+ if ( rLocales.getLength() > 0 )
+ {
+ for ( USHORT i = 0; i < rLocales.getLength(); ++i )
+ {
+ if ( rLangItems.size() == static_cast< size_t >(nMaxCount) )
+ break;
+ const Locale& rLocale=rLocales[i];
+ if( IsScriptTypeMatchingToLanguage( nScriptType, rLanguageTable.GetType( rLocale.Language )))
+ rLangItems.insert( OUString( rLocale.Language ) );
+ }
+ }
+ }
+}
+
} // namespace framework
+
diff --git a/framework/source/helper/popupmenucontrollerbase.cxx b/framework/source/helper/popupmenucontrollerbase.cxx
deleted file mode 100644
index cc5d388de9a8..000000000000
--- a/framework/source/helper/popupmenucontrollerbase.cxx
+++ /dev/null
@@ -1,429 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_framework.hxx"
-#include <helper/popupmenucontrollerbase.hxx>
-
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
-#include <threadhelp/resetableguard.hxx>
-#include "services.h"
-
-//_________________________________________________________________________________________________________________
-// interface includes
-//_________________________________________________________________________________________________________________
-#include <com/sun/star/awt/XDevice.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/awt/MenuItemStyle.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-
-//_________________________________________________________________________________________________________________
-// includes of other projects
-//_________________________________________________________________________________________________________________
-
-#ifndef _VCL_MENU_HXX_
-#include <vcl/menu.hxx>
-#endif
-#include <vcl/svapp.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <rtl/logfile.hxx>
-//_________________________________________________________________________________________________________________
-// Defines
-//_________________________________________________________________________________________________________________
-//
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::frame;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::util;
-
-namespace framework
-{
-
-//*****************************************************************************************************************
-// XInterface, XTypeProvider, XServiceInfo
-//*****************************************************************************************************************
-DEFINE_XINTERFACE_11 ( PopupMenuControllerBase ,
- OWeakObject ,
- DIRECT_INTERFACE( css::lang::XTypeProvider ),
- DIRECT_INTERFACE( css::lang::XServiceInfo ),
- DIRECT_INTERFACE( ::com::sun::star::frame::XPopupMenuController ),
- DIRECT_INTERFACE( css::lang::XInitialization ),
- DIRECT_INTERFACE( css::frame::XStatusListener ),
- DIRECT_INTERFACE( css::awt::XMenuListener ),
- DIRECT_INTERFACE( css::frame::XDispatchProvider ),
- DIRECT_INTERFACE( css::frame::XDispatch ),
- DIRECT_INTERFACE( css::lang::XComponent ),
- DERIVED_INTERFACE( css::lang::XEventListener, css::frame::XStatusListener ),
- DERIVED_INTERFACE( css::lang::XEventListener, css::awt::XMenuListener )
- )
-
-DEFINE_XTYPEPROVIDER_10 ( PopupMenuControllerBase ,
- css::lang::XTypeProvider ,
- css::lang::XServiceInfo ,
- ::com::sun::star::frame::XPopupMenuController ,
- css::lang::XInitialization ,
- css::frame::XStatusListener ,
- css::awt::XMenuListener ,
- css::lang::XEventListener ,
- css::frame::XDispatchProvider ,
- css::frame::XDispatch ,
- css::lang::XComponent
- )
-
-PopupMenuControllerBase::PopupMenuControllerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- ThreadHelpBase(),
- ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() ),
- m_bInitialized( false ),
- m_bDisposed( false ),
- m_xServiceManager( xServiceManager ),
- m_aListenerContainer( m_aLock.getShareableOslMutex() )
-{
- if ( m_xServiceManager.is() )
- m_xURLTransformer.set( m_xServiceManager->createInstance(
- SERVICENAME_URLTRANSFORMER),
- UNO_QUERY );
-}
-
-PopupMenuControllerBase::~PopupMenuControllerBase()
-{
-}
-
-// protected function
-void PopupMenuControllerBase::resetPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu )
-{
- VCLXPopupMenu* pPopupMenu = 0;
- if ( rPopupMenu.is() && rPopupMenu->getItemCount() > 0 )
- {
- pPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( rPopupMenu );
- if ( pPopupMenu )
- {
- vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
-
- PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu();
- pVCLPopupMenu->Clear();
- }
- }
-}
-
-void SAL_CALL PopupMenuControllerBase::dispose()
-throw (::com::sun::star::uno::RuntimeException)
-{
- css::uno::Reference< css::lang::XComponent > xThis( static_cast< ::cppu::OWeakObject* >(this), UNO_QUERY );
-
- // Send message to all listener and forget their references.
- css::lang::EventObject aEvent( xThis );
- m_aListenerContainer.disposeAndClear( aEvent );
-
- // Reset our members and set disposed flag
- ResetableGuard aLock( m_aLock );
- m_xFrame.clear();
- m_xDispatch.clear();
- m_xPopupMenu.clear();
- m_xServiceManager.clear();
- m_bDisposed = true;
-}
-
-void SAL_CALL PopupMenuControllerBase::addEventListener(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener )
-throw (::com::sun::star::uno::RuntimeException)
-{
- m_aListenerContainer.addInterface( ::getCppuType( (const css::uno::Reference< css::lang::XEventListener >*)NULL ), xListener );
-}
-
-void SAL_CALL PopupMenuControllerBase::removeEventListener(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener )
-throw (::com::sun::star::uno::RuntimeException)
-{
- m_aListenerContainer.removeInterface( ::getCppuType( (const css::uno::Reference< css::lang::XEventListener >*)NULL ), xListener );
-}
-
-// XEventListener
-void SAL_CALL PopupMenuControllerBase::disposing( const EventObject& ) throw ( RuntimeException )
-{
- ResetableGuard aLock( m_aLock );
- m_xFrame.clear();
- m_xDispatch.clear();
- m_xPopupMenu.clear();
-}
-
-// XMenuListener
-void SAL_CALL PopupMenuControllerBase::highlight( const css::awt::MenuEvent& ) throw (RuntimeException)
-{
-}
-
-void PopupMenuControllerBase::impl_select(const Reference< XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL)
-{
- Sequence<PropertyValue> aArgs;
- OSL_ENSURE(_xDispatch.is(),"PopupMenuControllerBase::impl_select: No dispatch");
- if ( _xDispatch.is() )
- _xDispatch->dispatch( aURL, aArgs );
-}
-
-void SAL_CALL PopupMenuControllerBase::select( const css::awt::MenuEvent& rEvent ) throw (RuntimeException)
-{
- Reference< css::awt::XPopupMenu > xPopupMenu;
- Reference< XDispatch > xDispatch;
- Reference< XMultiServiceFactory > xServiceManager;
-
- if ( m_bDisposed )
- throw DisposedException();
-
- ResetableGuard aLock( m_aLock );
- xPopupMenu = m_xPopupMenu;
- xDispatch = m_xDispatch;
- xServiceManager = m_xServiceManager;
- aLock.unlock();
-
- if ( xPopupMenu.is() )
- {
- VCLXPopupMenu* pPopupMenu = (VCLXPopupMenu *)VCLXPopupMenu::GetImplementation( xPopupMenu );
- if ( pPopupMenu )
- {
- css::util::URL aTargetURL;
- {
- vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
- PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu();
- aTargetURL.Complete = pVCLPopupMenu->GetItemCommand( rEvent.MenuId );
- }
-
- m_xURLTransformer->parseStrict( aTargetURL );
- impl_select(xDispatch,aTargetURL);
- }
- }
-}
-
-void SAL_CALL PopupMenuControllerBase::activate( const css::awt::MenuEvent& ) throw (RuntimeException)
-{
-}
-
-void SAL_CALL PopupMenuControllerBase::deactivate( const css::awt::MenuEvent& ) throw (RuntimeException)
-{
-}
-
-void SAL_CALL PopupMenuControllerBase::updatePopupMenu() throw ( ::com::sun::star::uno::RuntimeException )
-{
- ResetableGuard aLock( m_aLock );
-
- if ( m_bDisposed )
- throw DisposedException();
-
- Reference< XStatusListener > xStatusListener( static_cast< OWeakObject* >( this ), UNO_QUERY );
- Reference< XDispatch > xDispatch( m_xDispatch );
- com::sun::star::util::URL aTargetURL;
- aTargetURL.Complete = m_aCommandURL;
- m_xURLTransformer->parseStrict( aTargetURL );
- aLock.unlock();
-
- // Add/remove status listener to get a status update once
- if ( xDispatch.is() )
- {
- xDispatch->addStatusListener( xStatusListener, aTargetURL );
- xDispatch->removeStatusListener( xStatusListener, aTargetURL );
- }
-}
-
-// XDispatchProvider
-Reference< XDispatch > SAL_CALL
-PopupMenuControllerBase::queryDispatch(
- const URL& /*aURL*/,
- const rtl::OUString& /*sTarget*/,
- sal_Int32 /*nFlags*/ )
-throw( RuntimeException )
-{
- // must be implemented by subclass
- ResetableGuard aLock( m_aLock );
- if ( m_bDisposed )
- throw DisposedException();
-
- return Reference< XDispatch >();
-}
-
-Sequence< Reference< XDispatch > > SAL_CALL PopupMenuControllerBase::queryDispatches( const Sequence< DispatchDescriptor >& lDescriptor ) throw( RuntimeException )
-{
- // Create return list - which must have same size then the given descriptor
- // It's not allowed to pack it!
- ResetableGuard aLock( m_aLock );
- if ( m_bDisposed )
- throw DisposedException();
- aLock.unlock();
-
- sal_Int32 nCount = lDescriptor.getLength();
- css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > lDispatcher( nCount );
-
- // Step over all descriptors and try to get any dispatcher for it.
- for( sal_Int32 i=0; i<nCount; ++i )
- {
- lDispatcher[i] = queryDispatch( lDescriptor[i].FeatureURL ,
- lDescriptor[i].FrameName ,
- lDescriptor[i].SearchFlags );
- }
-
- return lDispatcher;
-}
-
-// XDispatch
-void SAL_CALL
-PopupMenuControllerBase::dispatch(
- const URL& /*aURL*/,
- const Sequence< PropertyValue >& /*seqProperties*/ )
-throw( ::com::sun::star::uno::RuntimeException )
-{
- // must be implemented by subclass
- ResetableGuard aLock( m_aLock );
- if ( m_bDisposed )
- throw DisposedException();
-}
-
-void SAL_CALL
-PopupMenuControllerBase::addStatusListener(
- const Reference< XStatusListener >& xControl,
- const URL& aURL )
-throw( ::com::sun::star::uno::RuntimeException )
-{
- ResetableGuard aLock( m_aLock );
- if ( m_bDisposed )
- throw DisposedException();
- aLock.unlock();
-
- bool bStatusUpdate( false );
- m_aListenerContainer.addInterface( ::getCppuType( (const css::uno::Reference< css::frame::XStatusListener >*)NULL ), xControl );
-
- aLock.lock();
- if ( aURL.Complete.indexOf( m_aBaseURL ) == 0 )
- bStatusUpdate = true;
- aLock.unlock();
-
- if ( bStatusUpdate )
- {
- // Dummy update for popup menu controllers
- FeatureStateEvent aEvent;
- aEvent.FeatureURL = aURL;
- aEvent.IsEnabled = sal_True;
- aEvent.Requery = sal_False;
- aEvent.State = Any();
- xControl->statusChanged( aEvent );
- }
-}
-
-void SAL_CALL PopupMenuControllerBase::removeStatusListener(
- const Reference< XStatusListener >& xControl,
- const URL& /*aURL*/ )
-throw( ::com::sun::star::uno::RuntimeException )
-{
- m_aListenerContainer.removeInterface( ::getCppuType( (const css::uno::Reference< css::frame::XStatusListener >*)NULL ), xControl );
-}
-
-::rtl::OUString PopupMenuControllerBase::determineBaseURL( const ::rtl::OUString& aURL )
-{
- // Just use the main part of the URL for popup menu controllers
- sal_Int32 nQueryPart( 0 );
- sal_Int32 nSchemePart( 0 );
- rtl::OUString aMainURL( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.popup:" ));
-
- nSchemePart = aURL.indexOf( ':' );
- if (( nSchemePart > 0 ) &&
- ( aURL.getLength() > ( nSchemePart+1 )))
- {
- nQueryPart = aURL.indexOf( '?', nSchemePart );
- if ( nQueryPart > 0 )
- aMainURL += aURL.copy( nSchemePart, nQueryPart-nSchemePart );
- else if ( nQueryPart == -1 )
- aMainURL += aURL.copy( nSchemePart+1 );
- }
-
- return aMainURL;
-}
-
-// XInitialization
-void SAL_CALL PopupMenuControllerBase::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException )
-{
- ResetableGuard aLock( m_aLock );
-
- sal_Bool bInitalized( m_bInitialized );
- if ( !bInitalized )
- {
- PropertyValue aPropValue;
- rtl::OUString aCommandURL;
- Reference< XFrame > xFrame;
-
- for ( int i = 0; i < aArguments.getLength(); i++ )
- {
- if ( aArguments[i] >>= aPropValue )
- {
- if ( aPropValue.Name.equalsAscii( "Frame" ))
- aPropValue.Value >>= xFrame;
- else if ( aPropValue.Name.equalsAscii( "CommandURL" ))
- aPropValue.Value >>= aCommandURL;
- }
- }
-
- if ( xFrame.is() && aCommandURL.getLength() )
- {
- m_xFrame = xFrame;
- m_aCommandURL = aCommandURL;
- m_aBaseURL = determineBaseURL( aCommandURL );
- m_bInitialized = true;
- }
- }
-}
-// XPopupMenuController
-void SAL_CALL PopupMenuControllerBase::setPopupMenu( const Reference< css::awt::XPopupMenu >& xPopupMenu ) throw ( RuntimeException )
-{
- ResetableGuard aLock( m_aLock );
-
- if ( m_bDisposed )
- throw DisposedException();
-
- if ( m_xFrame.is() && !m_xPopupMenu.is() )
- {
- // Create popup menu on demand
- vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
-
- m_xPopupMenu = xPopupMenu;
- m_xPopupMenu->addMenuListener( Reference< css::awt::XMenuListener >( (OWeakObject*)this, UNO_QUERY ));
-
- Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
-
- com::sun::star::util::URL aTargetURL;
- aTargetURL.Complete = m_aCommandURL;
- m_xURLTransformer->parseStrict( aTargetURL );
- m_xDispatch = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 );
-
- impl_setPopupMenu();
-
- updatePopupMenu();
- }
-}
-void PopupMenuControllerBase::impl_setPopupMenu()
-{
-}
-}
diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx
index 1ddda0eb0f4d..030ec5bf8cf6 100644
--- a/framework/source/helper/uiconfigelementwrapperbase.cxx
+++ b/framework/source/helper/uiconfigelementwrapperbase.cxx
@@ -45,7 +45,6 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/ui/XUIConfiguration.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
@@ -550,4 +549,23 @@ Reference< XIndexAccess > SAL_CALL UIConfigElementWrapperBase::getSettings( sal_
return m_xConfigData;
}
+Reference< XFrame > SAL_CALL UIConfigElementWrapperBase::getFrame() throw (RuntimeException)
+{
+ ResetableGuard aLock( m_aLock );
+ Reference< XFrame > xFrame( m_xWeakFrame );
+ return xFrame;
+}
+
+::rtl::OUString SAL_CALL UIConfigElementWrapperBase::getResourceURL() throw (RuntimeException)
+{
+ ResetableGuard aLock( m_aLock );
+ return m_aResourceURL;
+}
+
+::sal_Int16 SAL_CALL UIConfigElementWrapperBase::getType() throw (RuntimeException)
+{
+ ResetableGuard aLock( m_aLock );
+ return m_nType;
+}
+
}
diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx
index 85bb1cdb1e60..6329f94b3063 100644
--- a/framework/source/helper/uielementwrapperbase.cxx
+++ b/framework/source/helper/uielementwrapperbase.cxx
@@ -151,6 +151,23 @@ throw ( Exception, RuntimeException )
}
}
+// XUIElement
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL UIElementWrapperBase::getFrame() throw (::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame( m_xWeakFrame );
+ return xFrame;
+}
+
+::rtl::OUString SAL_CALL UIElementWrapperBase::getResourceURL() throw (::com::sun::star::uno::RuntimeException)
+{
+ return m_aResourceURL;
+}
+
+::sal_Int16 SAL_CALL UIElementWrapperBase::getType() throw (::com::sun::star::uno::RuntimeException)
+{
+ return m_nType;
+}
+
// XUpdatable
void SAL_CALL UIElementWrapperBase::update() throw (::com::sun::star::uno::RuntimeException)
{
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 458368bd6581..f72759891acb 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -4707,6 +4707,14 @@ throw (RuntimeException)
impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, true );
}
+ else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolpanel" ))
+ {
+ ReadGuard aReadGuard( m_aLock );
+ css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame );
+ aReadGuard.unlock();
+
+ ActivateToolPanel( m_xFrame, aName );
+ }
}
if ( bNotify )
diff --git a/framework/source/register/registertemp.cxx b/framework/source/register/registertemp.cxx
index dc5682c7d398..7382380ef525 100644
--- a/framework/source/register/registertemp.cxx
+++ b/framework/source/register/registertemp.cxx
@@ -78,6 +78,7 @@
#include <uielement/macrosmenucontroller.hxx>
#include <uielement/newmenucontroller.hxx>
#include <uielement/toolbarsmenucontroller.hxx>
+#include <uielement/popupmenucontroller.hxx>
COMPONENTGETIMPLEMENTATIONENVIRONMENT
@@ -103,6 +104,7 @@ COMPONENTWRITEINFO ( COMPONENTINFO( ::framework::MediaTypeDetectionHelper
COMPONENTINFO( ::framework::DispatchRecorderSupplier )
COMPONENTINFO( ::framework::Oxt_Handler )
COMPONENTINFO( ::framework::License )
+ COMPONENTINFO( ::framework::PopupMenuController )
)
COMPONENTGETFACTORY ( IFFACTORY( ::framework::MediaTypeDetectionHelper )
@@ -126,5 +128,6 @@ COMPONENTGETFACTORY ( IFFACTORY( ::framework::MediaTypeDetectionHelper
IFFACTORY( ::framework::FooterMenuController ) else
IFFACTORY( ::framework::HeaderMenuController ) else
IFFACTORY( ::framework::LanguageSelectionMenuController ) else
- IFFACTORY( ::framework::Oxt_Handler )
+ IFFACTORY( ::framework::Oxt_Handler ) else
+ IFFACTORY( ::framework::PopupMenuController )
)
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index e4d37d1fe059..0f6815a69cc3 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -41,21 +41,26 @@
#include "tools/urlobj.hxx"
#include "unotools/dynamicmenuoptions.hxx"
+#include "unotools/historyoptions.hxx"
#include "svtools/imagemgr.hxx"
-#include "svl/svtools.hrc"
+#include "svtools/svtools.hrc"
#include "comphelper/processfactory.hxx"
#include "comphelper/sequenceashashmap.hxx"
#include "comphelper/configurationhelper.hxx"
+#include "cppuhelper/implbase1.hxx"
+
#include "rtl/strbuf.hxx"
#include "rtl/ustrbuf.hxx"
+#include "osl/file.h"
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/container/XNameAccess.hpp"
#include "com/sun/star/system/XSystemShellExecute.hpp"
#include "com/sun/star/system/SystemShellExecuteFlags.hpp"
#include "com/sun/star/task/XJobExecutor.hpp"
+#include "com/sun/star/util/XStringWidth.hpp"
using namespace ::com::sun::star::beans;
@@ -110,6 +115,20 @@ Size DecoToolBox::getMinSize()
return maMinSize;
}
+class RecentFilesStringLength : public ::cppu::WeakImplHelper1< ::com::sun::star::util::XStringWidth >
+{
+ public:
+ RecentFilesStringLength() {}
+ virtual ~RecentFilesStringLength() {}
+
+ // XStringWidth
+ sal_Int32 SAL_CALL queryStringWidth( const ::rtl::OUString& aString )
+ throw (::com::sun::star::uno::RuntimeException)
+ {
+ return aString.getLength();
+ }
+};
+
#define STC_BUTTON_STYLE (WB_LEFT | WB_VCENTER | WB_FLATBUTTON | WB_BEVELBUTTON)
BackingWindow::BackingWindow( Window* i_pParent ) :
@@ -134,7 +153,8 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
mnLayoutStyle( 0 ),
mpAccExec( NULL ),
mnBtnPos( 120 ),
- mnBtnTop( 150 )
+ mnBtnTop( 150 ),
+ mpRecentMenu( NULL )
{
mnColumnWidth[0] = mnColumnWidth[1] = 0;
mnTextColumnWidth[0] = mnTextColumnWidth[1] = 0;
@@ -233,6 +253,7 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
BackingWindow::~BackingWindow()
{
+ delete mpRecentMenu;
delete mpAccExec;
}
@@ -261,6 +282,116 @@ void BackingWindow::DataChanged( const DataChangedEvent& rDCEvt )
}
}
+void BackingWindow::prepareRecentFileMenu()
+{
+ if( ! mpRecentMenu )
+ mpRecentMenu = new PopupMenu();
+ mpRecentMenu->Clear();
+ maRecentFiles.clear();
+
+ // get recent file list and dispatch arguments
+ Sequence< Sequence< PropertyValue > > aHistoryList( SvtHistoryOptions().GetList( ePICKLIST ) );
+
+ sal_Int32 nPickListMenuItems = ( aHistoryList.getLength() > 99 ) ? 99 : aHistoryList.getLength();
+
+ if( ( nPickListMenuItems > 0 ) )
+ {
+ maRecentFiles.reserve( nPickListMenuItems );
+ for ( sal_Int32 i = 0; i < nPickListMenuItems; i++ )
+ {
+ Sequence< PropertyValue >& rPickListEntry = aHistoryList[i];
+ rtl::OUString aURL, aFilter, aFilterOpt, aTitle;
+
+ for ( sal_Int32 j = 0; j < rPickListEntry.getLength(); j++ )
+ {
+ const Any& a = rPickListEntry[j].Value;
+
+ if ( rPickListEntry[j].Name == HISTORY_PROPERTYNAME_URL )
+ a >>= aURL;
+ else if ( rPickListEntry[j].Name == HISTORY_PROPERTYNAME_FILTER )
+ {
+ a >>= aFilter;
+ sal_Int32 nPos = aFilter.indexOf( '|' );
+ if ( nPos >= 0 )
+ {
+ if ( nPos < ( aFilter.getLength() - 1 ) )
+ aFilterOpt = aFilter.copy( nPos+1 );
+ aFilter = aFilter.copy( 0, nPos-1 );
+ }
+ }
+ else if ( rPickListEntry[j].Name == HISTORY_PROPERTYNAME_TITLE )
+ a >>= aTitle;
+ }
+ maRecentFiles.push_back( LoadRecentFile() );
+ maRecentFiles.back().aTargetURL = aURL;
+
+ sal_Int32 nArgs = aFilterOpt.getLength() ? 4 : 3;
+ Sequence< PropertyValue >& rArgsList( maRecentFiles.back().aArgSeq );
+ rArgsList.realloc( nArgs );
+
+ nArgs--;
+ rArgsList[nArgs].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ));
+ rArgsList[nArgs].Value = makeAny( aFilter );
+
+ if( aFilterOpt.getLength() )
+ {
+ nArgs--;
+ rArgsList[nArgs].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterOptions" ));
+ rArgsList[nArgs].Value = makeAny( aFilterOpt );
+ }
+
+ // documents in the picklist will never be opened as templates
+ nArgs--;
+ rArgsList[nArgs].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AsTemplate" ));
+ rArgsList[nArgs].Value = makeAny( (sal_Bool) sal_False );
+
+ nArgs--;
+ rArgsList[nArgs].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Referer" ));
+ rArgsList[nArgs].Value = makeAny( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:user" ) ) );
+
+ // and finally create an entry in the popupmenu
+ rtl::OUString aMenuTitle;
+ INetURLObject aURLObj( aURL );
+
+ if ( aURLObj.GetProtocol() == INET_PROT_FILE )
+ {
+ // Do handle file URL differently => convert it to a system
+ // path and abbreviate it with a special function:
+ String aFileSystemPath( aURLObj.getFSysPath( INetURLObject::FSYS_DETECT ) );
+
+ rtl::OUString aSystemPath( aFileSystemPath );
+ rtl::OUString aCompactedSystemPath;
+
+ oslFileError nError = osl_abbreviateSystemPath( aSystemPath.pData, &aCompactedSystemPath.pData, 46, NULL );
+ if ( !nError )
+ aMenuTitle = String( aCompactedSystemPath );
+ else
+ aMenuTitle = aSystemPath;
+ }
+ else
+ {
+ // Use INetURLObject to abbreviate all other URLs
+ Reference< util::XStringWidth > xStringLength( new RecentFilesStringLength() );
+ aMenuTitle = aURLObj.getAbbreviated( xStringLength, 46, INetURLObject::DECODE_UNAMBIGUOUS );
+ }
+ rtl::OUStringBuffer aBuf( aMenuTitle.getLength() + 5 );
+ if( i < 9 )
+ {
+ aBuf.append( sal_Unicode( '~' ) );
+ aBuf.append( i+1 );
+ }
+ else if( i == 9 )
+ aBuf.appendAscii( "1~0" );
+ else
+ aBuf.append( i+1 );
+ aBuf.appendAscii( ": " );
+ aBuf.append( aMenuTitle );
+ mpRecentMenu->InsertItem( static_cast<USHORT>(i+1), aBuf.makeStringAndClear() );
+ }
+ maOpenButton.SetPopupMenu( mpRecentMenu );
+ }
+}
+
void BackingWindow::initBackground()
{
SetBackground( GetSettings().GetStyleSettings().GetWorkspaceGradient() );
@@ -327,6 +458,9 @@ void BackingWindow::initBackground()
loadImage( FwkResId( BMP_BACKING_OPENFILE ), maOpenButton );
loadImage( FwkResId( BMP_BACKING_OPENTEMPLATE ), maTemplateButton );
+ maOpenButton.SetMenuMode( MENUBUTTON_MENUMODE_TIMED );
+ maOpenButton.SetSelectHdl( LINK( this, BackingWindow, SelectHdl ) );
+ prepareRecentFileMenu();
}
void BackingWindow::initControls()
@@ -515,7 +649,7 @@ void BackingWindow::initControls()
maWriterButton.GrabFocus();
}
-void BackingWindow::loadImage( const ResId& i_rId, ImageButton& i_rButton )
+void BackingWindow::loadImage( const ResId& i_rId, PushButton& i_rButton )
{
BitmapEx aBmp( i_rId );
Size aImgSize( aBmp.GetSizePixel() );
@@ -530,7 +664,7 @@ void BackingWindow::layoutButton(
const char* i_pURL, int nColumn,
const std::set<rtl::OUString>& i_rURLS,
SvtModuleOptions& i_rOpt, SvtModuleOptions::EModule i_eMod,
- ImageButton& i_rBtn,
+ PushButton& i_rBtn,
MnemonicGenerator& i_rMnemns,
const String& i_rStr
)
@@ -908,6 +1042,20 @@ IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton )
return 0;
}
+IMPL_LINK( BackingWindow, SelectHdl, Button*, pButton )
+{
+ if( pButton == &maOpenButton )
+ {
+ sal_Int32 nItem = sal_Int32(maOpenButton.GetCurItemId())-1;
+ if( nItem >= 0 && nItem < sal_Int32(maRecentFiles.size()) )
+ {
+ Reference< XDispatchProvider > xFrame( mxFrame, UNO_QUERY );
+ dispatchURL( maRecentFiles[nItem].aTargetURL, rtl::OUString(), xFrame, maRecentFiles[nItem].aArgSeq );
+ }
+ }
+ return 0;
+}
+
struct ImplDelayedDispatch
{
Reference< XDispatch > xDispatch;
diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx
index c4d4c9b0b76b..eaf5e9ec5a23 100644
--- a/framework/source/services/backingwindow.hxx
+++ b/framework/source/services/backingwindow.hxx
@@ -31,6 +31,7 @@
#include "rtl/ustring.hxx"
#include "vcl/button.hxx"
+#include "vcl/menubtn.hxx"
#include "vcl/fixed.hxx"
#include "vcl/bitmapex.hxx"
#include "vcl/toolbox.hxx"
@@ -77,6 +78,12 @@ namespace framework
class BackingWindow : public Window
{
+ struct LoadRecentFile
+ {
+ rtl::OUString aTargetURL;
+ com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aArgSeq;
+ };
+
com::sun::star::uno::Reference<com::sun::star::frame::XDesktop> mxDesktop;
com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider > mxDesktopDispatchProvider;
com::sun::star::uno::Reference<com::sun::star::frame::XFrame> mxFrame;
@@ -89,7 +96,7 @@ namespace framework
ImageButton maWriterButton;
ImageButton maCalcButton;
ImageButton maImpressButton;
- ImageButton maOpenButton;
+ MenuButton maOpenButton;
ImageButton maDrawButton;
ImageButton maDBButton;
ImageButton maMathButton;
@@ -123,6 +130,9 @@ namespace framework
long mnBtnPos;
long mnBtnTop;
+ PopupMenu* mpRecentMenu;
+ std::vector< LoadRecentFile > maRecentFiles;
+
static const int nItemId_Extensions = 1;
static const int nItemId_Reg = 2;
static const int nItemId_Info = 3;
@@ -132,11 +142,11 @@ namespace framework
static const int nShadowRight = 45;
static const int nShadowBottom = 50;
- void loadImage( const ResId& i_rId, ImageButton& i_rButton );
+ void loadImage( const ResId& i_rId, PushButton& i_rButton );
void layoutButton( const char* i_pURL, int nColumn, const std::set<rtl::OUString>& i_rURLS,
SvtModuleOptions& i_rOpt, SvtModuleOptions::EModule i_eMod,
- ImageButton& i_rBtn,
+ PushButton& i_rBtn,
MnemonicGenerator& i_rMnemonicGen,
const String& i_rStr = String()
);
@@ -148,10 +158,12 @@ namespace framework
);
DECL_LINK( ClickHdl, Button* );
+ DECL_LINK( SelectHdl, Button* );
DECL_LINK( ToolboxHdl, void* );
void initControls();
void initBackground();
+ void prepareRecentFileMenu();
public:
BackingWindow( Window* pParent );
~BackingWindow();
@@ -160,7 +172,7 @@ namespace framework
virtual void Resize();
virtual long Notify( NotifyEvent& rNEvt );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
- virtual void GetFocus();
+ virtual void GetFocus();
void setOwningFrame( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& xFrame );
};
diff --git a/framework/source/services/fwk_services.src b/framework/source/services/fwk_services.src
index 7ad8b4c3cede..ef037c75778a 100644
--- a/framework/source/services/fwk_services.src
+++ b/framework/source/services/fwk_services.src
@@ -51,7 +51,7 @@ Window DLG_BACKING
};
String STR_BACKING_FILE
{
- Text [ en-US ] = "~Open a document...";
+ Text [ en-US ] = "~Open...";
};
String STR_BACKING_EXTHELP
{
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index e99e08895a3f..5227cb9f302c 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -855,6 +855,7 @@ void PathSettings::impl_setPathValue( sal_Int32 nID ,
::rtl::OUString sVal;
aVal >>= sVal;
OUStringList lList = impl_convertOldStyle2Path(sVal);
+ impl_subst(lList, fa_getSubstitution(), sal_False);
impl_purgeKnownPaths(aChangePath, lList);
if (! impl_isValidPath(lList))
throw css::lang::IllegalArgumentException();
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index 8840aee6a634..193bd63b5ad5 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -120,7 +120,8 @@ static const char* UIELEMENTTYPENAMES[] =
UIELEMENTTYPE_TOOLBAR_NAME,
UIELEMENTTYPE_STATUSBAR_NAME,
UIELEMENTTYPE_FLOATINGWINDOW_NAME,
- UIELEMENTTYPE_PROGRESSBAR_NAME
+ UIELEMENTTYPE_PROGRESSBAR_NAME,
+ UIELEMENTTYPE_TOOLPANEL_NAME
};
static const char RESOURCEURL_PREFIX[] = "private:resource/";
@@ -292,11 +293,12 @@ void ModuleUIConfigurationManager::impl_preloadUIElementTypeList( Layer eLayer,
rHashMap.insert( UIElementDataHashMap::value_type( aUIElementData.aResourceURL, aUIElementData ));
}
}
+ rElementTypeData.bLoaded = true;
}
}
}
- rElementTypeData.bLoaded = true;
+ //rElementTypeData.bLoaded = true;
}
void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType, Layer eLayer, UIElementData& aUIElementData )
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index 4adebdd36c47..e704fe680ae9 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -118,7 +118,8 @@ static const char* UIELEMENTTYPENAMES[] =
UIELEMENTTYPE_TOOLBAR_NAME,
UIELEMENTTYPE_STATUSBAR_NAME,
UIELEMENTTYPE_FLOATINGWINDOW_NAME,
- UIELEMENTTYPE_PROGRESSBAR_NAME
+ UIELEMENTTYPE_PROGRESSBAR_NAME,
+ UIELEMENTTYPE_TOOLPANEL_NAME
};
static const char RESOURCEURL_PREFIX[] = "private:resource/";
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx
index 3921625cc76f..058005ffdc40 100644
--- a/framework/source/uielement/comboboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx
@@ -46,7 +46,6 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/frame/status/ItemStatus.hpp>
#include <com/sun/star/frame/status/ItemState.hpp>
#include <com/sun/star/frame/status/Visibility.hpp>
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index 0672ac69d351..49501194a014 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -61,6 +61,7 @@
#include <vcl/image.hxx>
#include <svtools/menuoptions.hxx>
#include <dispatch/uieventloghelper.hxx>
+#include <vos/mutex.hxx>
// Copied from svx
// Function-Id's
@@ -213,7 +214,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( ControlMenuController
DEFINE_INIT_SERVICE ( ControlMenuController, {} )
ControlMenuController::ControlMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager ),
+ svt::PopupMenuControllerBase( xServiceManager ),
m_pResPopupMenu( 0 )
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
@@ -272,7 +273,7 @@ void SAL_CALL ControlMenuController::disposing( const EventObject& ) throw ( Run
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::ResettableMutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xServiceManager.clear();
@@ -286,7 +287,7 @@ void SAL_CALL ControlMenuController::disposing( const EventObject& ) throw ( Run
// XStatusListener
void SAL_CALL ControlMenuController::statusChanged( const FeatureStateEvent& Event ) throw ( RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::ResettableMutexGuard aLock( m_aMutex );
USHORT nMenuId = 0;
for (sal_uInt32 i=0; i < sizeof(aCommands)/sizeof(aCommands[0]); ++i)
@@ -351,7 +352,7 @@ void ControlMenuController::impl_select(const Reference< XDispatch >& /*_xDispat
void SAL_CALL ControlMenuController::activate( const css::awt::MenuEvent& ) throw (RuntimeException)
{
- ResetableGuard aLock( m_aLock );
+ osl::ResettableMutexGuard aLock( m_aMutex );
if ( m_xPopupMenu.is() )
{
@@ -404,10 +405,9 @@ void ControlMenuController::impl_setPopupMenu()
void SAL_CALL ControlMenuController::updatePopupMenu() throw (::com::sun::star::uno::RuntimeException)
{
- ResetableGuard aLock( m_aLock );
+ osl::ResettableMutexGuard aLock( m_aMutex );
- if ( m_bDisposed )
- throw DisposedException();
+ throwIfDisposed();
if ( m_xFrame.is() && m_xPopupMenu.is() )
{
@@ -435,8 +435,8 @@ void SAL_CALL ControlMenuController::updatePopupMenu() throw (::com::sun::star::
// XInitialization
void SAL_CALL ControlMenuController::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException )
{
- ResetableGuard aLock( m_aLock );
- PopupMenuControllerBase::initialize(aArguments);
+ osl::ResettableMutexGuard aLock( m_aMutex );
+ svt::PopupMenuControllerBase::initialize(aArguments);
m_aBaseURL = ::rtl::OUString();
}
diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
index 43b50eb2a49a..0800103c743e 100644
--- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
@@ -46,7 +46,6 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/frame/status/ItemStatus.hpp>
#include <com/sun/star/frame/status/ItemState.hpp>
#include <com/sun/star/frame/status/Visibility.hpp>
diff --git a/framework/source/uielement/edittoolbarcontroller.cxx b/framework/source/uielement/edittoolbarcontroller.cxx
index 3ad4b11fd1e9..387213d7c3eb 100644
--- a/framework/source/uielement/edittoolbarcontroller.cxx
+++ b/framework/source/uielement/edittoolbarcontroller.cxx
@@ -46,7 +46,6 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/frame/status/ItemStatus.hpp>
#include <com/sun/star/frame/status/ItemState.hpp>
#include <com/sun/star/frame/status/Visibility.hpp>
diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx
index 7110ea5aa519..c2625a951efb 100644
--- a/framework/source/uielement/fontmenucontroller.cxx
+++ b/framework/source/uielement/fontmenucontroller.cxx
@@ -59,6 +59,7 @@
#include <vcl/mnemonic.hxx>
#endif
#include <dispatch/uieventloghelper.hxx>
+#include <vos/mutex.hxx>
//_________________________________________________________________________________________________________________
// Defines
@@ -91,7 +92,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( FontMenuController
DEFINE_INIT_SERVICE ( FontMenuController, {} )
FontMenuController::FontMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager )
+ svt::PopupMenuControllerBase( xServiceManager )
{
}
@@ -145,7 +146,7 @@ void SAL_CALL FontMenuController::disposing( const EventObject& ) throw ( Runtim
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xFontListDispatch.clear();
@@ -164,12 +165,12 @@ void SAL_CALL FontMenuController::statusChanged( const FeatureStateEvent& Event
if ( Event.State >>= aFontDescriptor )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_aFontFamilyName = aFontDescriptor.Name;
}
else if ( Event.State >>= aFontNameSeq )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
if ( m_xPopupMenu.is() )
fillPopupMenu( aFontNameSeq, m_xPopupMenu );
}
@@ -192,7 +193,7 @@ void FontMenuController::impl_select(const Reference< XDispatch >& _xDispatch,co
void SAL_CALL FontMenuController::activate( const css::awt::MenuEvent& ) throw (RuntimeException)
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
if ( m_xPopupMenu.is() )
{
@@ -241,14 +242,14 @@ void FontMenuController::impl_setPopupMenu()
void SAL_CALL FontMenuController::updatePopupMenu() throw ( ::com::sun::star::uno::RuntimeException )
{
- PopupMenuControllerBase::updatePopupMenu();
+ svt::PopupMenuControllerBase::updatePopupMenu();
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
Reference< XDispatch > xDispatch( m_xFontListDispatch );
com::sun::star::util::URL aTargetURL;
aTargetURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontNameList" ));
m_xURLTransformer->parseStrict( aTargetURL );
- aLock.unlock();
+ aLock.clear();
if ( xDispatch.is() )
{
diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx
index 8dbd608a28e0..58cf3a3b02be 100644
--- a/framework/source/uielement/fontsizemenucontroller.cxx
+++ b/framework/source/uielement/fontsizemenucontroller.cxx
@@ -64,6 +64,7 @@
#include <svtools/ctrltool.hxx>
#endif
#include <dispatch/uieventloghelper.hxx>
+#include <vos/mutex.hxx>
//_________________________________________________________________________________________________________________
// Defines
@@ -90,7 +91,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( FontSizeMenuController
DEFINE_INIT_SERVICE ( FontSizeMenuController, {} )
FontSizeMenuController::FontSizeMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager ),
+ svt::PopupMenuControllerBase( xServiceManager ),
m_pHeightArray( 0 ),
m_bRebuildMenu( sal_True )
{
@@ -280,7 +281,7 @@ void SAL_CALL FontSizeMenuController::disposing( const EventObject& ) throw ( Ru
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xCurrentFontDispatch.clear();
@@ -297,7 +298,7 @@ void SAL_CALL FontSizeMenuController::statusChanged( const FeatureStateEvent& Ev
if ( Event.State >>= aFontDescriptor )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_aFontDescriptor = aFontDescriptor;
if ( m_xPopupMenu.is() )
@@ -306,7 +307,7 @@ void SAL_CALL FontSizeMenuController::statusChanged( const FeatureStateEvent& Ev
}
else if ( Event.State >>= aFontHeight )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_aFontHeight = aFontHeight;
if ( m_xPopupMenu.is() )
@@ -341,16 +342,15 @@ void FontSizeMenuController::impl_setPopupMenu()
void SAL_CALL FontSizeMenuController::updatePopupMenu() throw ( ::com::sun::star::uno::RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
- if ( m_bDisposed )
- throw DisposedException();
+ throwIfDisposed();
Reference< XDispatch > xDispatch( m_xCurrentFontDispatch );
com::sun::star::util::URL aTargetURL;
aTargetURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CharFontName" ));
m_xURLTransformer->parseStrict( aTargetURL );
- aLock.unlock();
+ aLock.clear();
if ( xDispatch.is() )
{
@@ -358,6 +358,6 @@ void SAL_CALL FontSizeMenuController::updatePopupMenu() throw ( ::com::sun::star
xDispatch->removeStatusListener( SAL_STATIC_CAST( XStatusListener*, this ), aTargetURL );
}
- PopupMenuControllerBase::updatePopupMenu();
+ svt::PopupMenuControllerBase::updatePopupMenu();
}
}
diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx
index 50b2ed65e2d2..c0d7b48a401b 100644
--- a/framework/source/uielement/headermenucontroller.cxx
+++ b/framework/source/uielement/headermenucontroller.cxx
@@ -50,7 +50,6 @@
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
@@ -65,6 +64,7 @@
#include <rtl/ustrbuf.hxx>
//#include <tools/solar.hrc>
#include <dispatch/uieventloghelper.hxx>
+#include <vos/mutex.hxx>
//_________________________________________________________________________________________________________________
// Defines
@@ -97,7 +97,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( HeaderMenuController
DEFINE_INIT_SERVICE ( HeaderMenuController, {} )
HeaderMenuController::HeaderMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager,bool _bFooter ) :
- PopupMenuControllerBase( xServiceManager )
+ svt::PopupMenuControllerBase( xServiceManager )
,m_bFooter(_bFooter)
{
}
@@ -221,7 +221,7 @@ void SAL_CALL HeaderMenuController::disposing( const EventObject& ) throw ( Runt
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xServiceManager.clear();
@@ -238,7 +238,7 @@ void SAL_CALL HeaderMenuController::statusChanged( const FeatureStateEvent& Even
if ( Event.State >>= xModel )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xModel = xModel;
if ( m_xPopupMenu.is() )
fillPopupMenu( xModel, m_xPopupMenu );
@@ -258,18 +258,17 @@ void HeaderMenuController::impl_select(const Reference< XDispatch >& _xDispatch,
void SAL_CALL HeaderMenuController::updatePopupMenu() throw (::com::sun::star::uno::RuntimeException)
{
- ResetableGuard aLock( m_aLock );
+ osl::ResettableMutexGuard aLock( m_aMutex );
- if ( m_bDisposed )
- throw DisposedException();
+ throwIfDisposed();
Reference< com::sun::star::frame::XModel > xModel( m_xModel );
- aLock.unlock();
+ aLock.clear();
if ( !xModel.is() )
- PopupMenuControllerBase::updatePopupMenu();
+ svt::PopupMenuControllerBase::updatePopupMenu();
- aLock.lock();
+ aLock.reset();
if ( m_xPopupMenu.is() && m_xModel.is() )
fillPopupMenu( m_xModel, m_xPopupMenu );
}
diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
index d9af2fb4f9f9..5126ffdd253a 100644
--- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
@@ -46,7 +46,6 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/frame/XControlNotificationListener.hpp>
#include "com/sun/star/util/XMacroExpander.hpp"
#include "com/sun/star/uno/XComponentContext.hpp"
diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx
index f2c905f237e8..651c9bbfdc86 100644
--- a/framework/source/uielement/langselectionmenucontroller.cxx
+++ b/framework/source/uielement/langselectionmenucontroller.cxx
@@ -27,6 +27,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_framework.hxx"
+
#include <uielement/langselectionmenucontroller.hxx>
//_________________________________________________________________________________________________________________
@@ -63,7 +64,7 @@
#include <com/sun/star/document/XDocumentLanguages.hpp>
#include <com/sun/star/frame/XPopupMenuController.hpp>
#include <com/sun/star/linguistic2/XLanguageGuessing.hpp>
-#include <map>
+
#include <i18npool/mslangid.hxx>
#include <svl/languageoptions.hxx>
#include <com/sun/star/awt/MenuItemStyle.hpp>
@@ -76,6 +77,10 @@
#include <dispatch/uieventloghelper.hxx>
#include "helper/mischelper.hxx"
+#include <vos/mutex.hxx>
+
+#include <map>
+#include <set>
//_________________________________________________________________________________________________________________
// Defines
@@ -88,6 +93,7 @@ using namespace com::sun::star::frame;
using namespace com::sun::star::beans;
using namespace com::sun::star::util;
+using ::rtl::OUString;
namespace framework
{
@@ -101,9 +107,9 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( LanguageSelectionMenuController
DEFINE_INIT_SERVICE ( LanguageSelectionMenuController, {} )
LanguageSelectionMenuController::LanguageSelectionMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager ),
- m_bShowMenu( sal_True )
- ,m_aLangGuessHelper(xServiceManager)
+ svt::PopupMenuControllerBase( xServiceManager ),
+ m_bShowMenu( sal_True ),
+ m_aLangGuessHelper( xServiceManager )
{
}
@@ -116,7 +122,7 @@ void SAL_CALL LanguageSelectionMenuController::disposing( const EventObject& ) t
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xLanguageDispatch.clear();
@@ -132,29 +138,25 @@ void SAL_CALL LanguageSelectionMenuController::statusChanged( const FeatureState
{
vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
- if ( m_bDisposed )
+ if (rBHelper.bDisposed || rBHelper.bInDispose)
return;
m_bShowMenu = sal_True;
- m_nScriptType=7;//set the default value
+ m_nScriptType = LS_SCRIPT_LATIN | LS_SCRIPT_ASIAN | LS_SCRIPT_COMPLEX; //set the default value
- rtl::OUString aStrValue;
- Sequence< ::rtl::OUString > aSeq;
+ OUString aStrValue;
+ Sequence< OUString > aSeq;
- if ( Event.State >>= aStrValue )
- {
- m_aCurrentLanguage=aStrValue;
- }
- else if ( Event.State >>= aSeq )
+ if ( Event.State >>= aSeq )
{
if ( aSeq.getLength() == 4 )
{
// Retrieve all other values from the sequence and
// store it members!
- m_aCurLang=aSeq[0];
- m_nScriptType= static_cast< sal_Int16 >(aSeq[1].toInt32());
- m_aKeyboardLang=aSeq[2];
- m_aGuessedText=aSeq[3];
+ m_aCurLang = aSeq[0];
+ m_nScriptType = static_cast< sal_Int16 >(aSeq[1].toInt32());
+ m_aKeyboardLang = aSeq[2];
+ m_aGuessedTextLang = aSeq[3];
}
}
else if ( !Event.State.hasValue() )
@@ -185,14 +187,14 @@ void LanguageSelectionMenuController::impl_select(const Reference< XDispatch >&
{
Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
if ( xDispatchProvider.is() )
- xDispatch = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 );
+ xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
}
if ( xDispatch.is() )
{
Sequence<PropertyValue> aArgs;
if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper(::rtl::OUString::createFromAscii("LanguageSelectionMenuController")).log(m_xServiceManager, m_xFrame, aTargetURL, aArgs);
+ UiEventLogHelper( OUString::createFromAscii("LanguageSelectionMenuController")).log( m_xServiceManager, m_xFrame, aTargetURL, aArgs );
xDispatch->dispatch( aTargetURL, aArgs );
}
}
@@ -207,22 +209,22 @@ void LanguageSelectionMenuController::impl_setPopupMenu()
// Register for language updates
aTargetURL.Complete = m_aLangStatusCommandURL;
m_xURLTransformer->parseStrict( aTargetURL );
- m_xLanguageDispatch = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 );
+ m_xLanguageDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
// Register for setting languages and opening language dialog
aTargetURL.Complete = m_aMenuCommandURL_Lang;
m_xURLTransformer->parseStrict( aTargetURL );
- m_xMenuDispatch_Lang = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 );
+ m_xMenuDispatch_Lang = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
// Register for opening character dialog
aTargetURL.Complete = m_aMenuCommandURL_Font;
m_xURLTransformer->parseStrict( aTargetURL );
- m_xMenuDispatch_Font = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 );
+ m_xMenuDispatch_Font = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
// Register for opening character dialog with preselected paragraph
aTargetURL.Complete = m_aMenuCommandURL_CharDlgForParagraph;
m_xURLTransformer->parseStrict( aTargetURL );
- m_xMenuDispatch_CharDlgForParagraph = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 );
+ m_xMenuDispatch_CharDlgForParagraph = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
}
void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopupMenu , const Mode eMode )
@@ -244,157 +246,91 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup
String aCmd_Language;
if( eMode == MODE_SetLanguageSelectionMenu )
{
- aCmd_Dialog+=String::CreateFromAscii(".uno:FontDialog?Language:string=*");
- aCmd_Language+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Current_");
+ aCmd_Dialog.AppendAscii(".uno:FontDialog?Language:string=*");
+ aCmd_Language.AppendAscii(".uno:LanguageStatus?Language:string=Current_");
}
else if ( eMode == MODE_SetLanguageParagraphMenu )
{
- aCmd_Dialog+=String::CreateFromAscii(".uno:FontDialogForParagraph");
- aCmd_Language+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Paragraph_");
+ aCmd_Dialog.AppendAscii(".uno:FontDialogForParagraph");
+ aCmd_Language.AppendAscii(".uno:LanguageStatus?Language:string=Paragraph_");
}
else if ( eMode == MODE_SetLanguageAllTextMenu )
{
- aCmd_Dialog+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=*");
- aCmd_Language+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Default_");
+ aCmd_Dialog.AppendAscii(".uno:LanguageStatus?Language:string=*");
+ aCmd_Language.AppendAscii(".uno:LanguageStatus?Language:string=Default_");
}
- //Reference< awt::XMenuExtended > m_xMenuExtended( m_xPopupMenu, UNO_QUERY );
- std::map< ::rtl::OUString, ::rtl::OUString > LangItems;
-
- SvtLanguageTable aLanguageTable;
- USHORT nItemId = 1;
-
- //1--add current language
- if(m_aCurLang.getLength())
+ SvtLanguageTable aLanguageTable;
+
+ // get languages to be displayed in the menu
+ std::set< OUString > aLangItems;
+ FillLangItems( aLangItems, aLanguageTable, m_xFrame, m_aLangGuessHelper,
+ m_nScriptType, m_aCurLang, m_aKeyboardLang, m_aGuessedTextLang );
+
+ //
+ // now add menu entries
+ // the different menues purpose will be handled by the different string
+ // for aCmd_Dialog and aCmd_Language
+ //
+
+ sal_Int16 nItemId = 1; // in this control the item id is not important for executing the command
+ const OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); // multiple languages in current selection
+ const OUString sEmpty; // 'no language found' from language guessing
+ std::map< sal_Int16, OUString > aLangMap;
+ std::set< OUString >::const_iterator it;
+ for (it = aLangItems.begin(); it != aLangItems.end(); ++it)
{
- LangItems[m_aCurLang]=m_aCurLang;
- }
-
- SvtLanguageTable aLangTable;
- //2--System
- const AllSettings& rAllSettings=Application::GetSettings();
- LanguageType rSystemLanguage = rAllSettings.GetLanguage();
- if(rSystemLanguage!=LANGUAGE_DONTKNOW)
- {
- if (IsScriptTypeMatchingToLanguage(m_nScriptType,rSystemLanguage ))
- LangItems[::rtl::OUString(aLangTable.GetString(rSystemLanguage))]=::rtl::OUString(aLangTable.GetString(rSystemLanguage));
- }
-
- //3--UI
- LanguageType rUILanguage = rAllSettings.GetUILanguage();
- if(rUILanguage!=LANGUAGE_DONTKNOW)
- {
- if (IsScriptTypeMatchingToLanguage(m_nScriptType, rUILanguage ))
- LangItems[::rtl::OUString(aLangTable.GetString(rUILanguage))]=::rtl::OUString(aLangTable.GetString(rUILanguage));
- }
-
- //4--guessed language
- uno::Reference< linguistic2::XLanguageGuessing > xLangGuesser( m_aLangGuessHelper.GetGuesser() );
- if (xLangGuesser.is() && m_aGuessedText.getLength() > 0)
- {
- ::com::sun::star::lang::Locale aLocale(xLangGuesser->guessPrimaryLanguage( m_aGuessedText, 0, m_aGuessedText.getLength()) );
- LanguageType nLang = MsLangId::convertLocaleToLanguageWithFallback( aLocale );
- if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_NONE && nLang != LANGUAGE_SYSTEM
- && IsScriptTypeMatchingToLanguage( m_nScriptType, nLang ))
- LangItems[aLangTable.GetString(nLang)]=aLangTable.GetString(nLang);
- }
-
- //5--keyboard language
- if(m_aKeyboardLang!=::rtl::OUString::createFromAscii(""))
- {
- if (IsScriptTypeMatchingToLanguage(m_nScriptType, aLanguageTable.GetType(m_aKeyboardLang)))
- LangItems[m_aKeyboardLang] = m_aKeyboardLang;
- }
-
- //6--all languages used in current document
- Reference< com::sun::star::frame::XModel > xModel;
- if ( m_xFrame.is() )
- {
- Reference< com::sun::star::frame::XController > xController( m_xFrame->getController(), UNO_QUERY );
- if ( xController.is() )
- xModel = xController->getModel();
- }
- Reference< document::XDocumentLanguages > xDocumentLanguages( xModel, UNO_QUERY );
- /*the description of m_nScriptType
- LATIN : 1
- ASIAN : 2
- COMPLEX:4
- LATIN + ASIAN : 3
- LATIN + COMPLEX : 5
- ASIAN + COMPLEX : 6
- LATIN + ASIAN + COMPLEX : 7
- */
-
- sal_Int16 nCount=7;
- if(xDocumentLanguages.is())
- {
- Sequence< Locale > rLocales(xDocumentLanguages->getDocumentLanguages(m_nScriptType,nCount));
- if(rLocales.getLength()>0)
- {
- for(USHORT i = 0; i<rLocales.getLength();++i)
- {
- if (LangItems.size()==7)
- break;
- const Locale& rLocale=rLocales[i];
- if(IsScriptTypeMatchingToLanguage(m_nScriptType, aLanguageTable.GetType(rLocale.Language)))
- LangItems[rLocale.Language] = rLocale.Language;
- }
- }
- }
- std::map< sal_Int16, ::rtl::OUString > LangTable;
-
- const ::rtl::OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*"));
- bool bMultipleLanguages = (eMode != MODE_SetLanguageSelectionMenu) || m_aCurLang.compareToAscii( "*" ) == 0;
- bool bNothingSelected = true;
- MenuItemBits nItemBits = !bMultipleLanguages ? MIB_RADIOCHECK : 0;
- for(std::map< ::rtl::OUString, ::rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it)
- {
- if(it->first != ::rtl::OUString( aLangTable.GetString( LANGUAGE_NONE ) )&&
- it->first != sAsterix &&
- it->first.getLength())
+ const OUString & rStr( *it );
+ if (rStr != OUString( aLanguageTable.GetString( LANGUAGE_NONE ) )&&
+ rStr != sAsterix &&
+ rStr != sEmpty)
{
- ++nItemId;
- pPopupMenu->InsertItem( nItemId,it->first,nItemBits );
- LangTable[nItemId] = it->first;
- if(it->first == m_aCurLang && eMode == MODE_SetLanguageSelectionMenu )
+ pPopupMenu->InsertItem( nItemId, rStr );
+ aCmd = aCmd_Language;
+ aCmd += String( rStr );
+ pPopupMenu->SetItemCommand( nItemId, aCmd );
+ if (rStr == m_aCurLang && eMode == MODE_SetLanguageSelectionMenu )
{
//make a sign for the current language
- pPopupMenu->CheckItem(nItemId,TRUE);
- bNothingSelected = false;
+ pPopupMenu->CheckItem( nItemId, TRUE );
}
- aCmd=aCmd_Language;
- aCmd+=(String)it->first;
- pPopupMenu->SetItemCommand(nItemId,aCmd);
+ aLangMap[ nItemId ] = rStr;
+ ++nItemId;
}
}
- //7--none
- nItemId++;
- pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_NONE )), nItemBits );
- if (bNothingSelected && !bMultipleLanguages)
- pPopupMenu->CheckItem(nItemId,TRUE);
+ // entry for LANGUAGE_NONE
+ ++nItemId;
+ pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_NONE )) );
+ aCmd=aCmd_Language;
+ aCmd.AppendAscii("LANGUAGE_NONE");
+ pPopupMenu->SetItemCommand( nItemId, aCmd );
+
+ // entry for 'Reset to default language'
+ ++nItemId;
+ pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_RESET_TO_DEFAULT_LANGUAGE )) );
aCmd=aCmd_Language;
- aCmd+=String::CreateFromAscii("LANGUAGE_NONE");
- pPopupMenu->SetItemCommand(nItemId,aCmd);
+ aCmd.AppendAscii("RESET_LANGUAGES");
+ pPopupMenu->SetItemCommand( nItemId, aCmd );
- //More...
- nItemId++;
+ // entry for opening the Format/Character dialog
+ ++nItemId;
pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_MORE )));
- pPopupMenu->SetItemCommand(nItemId,aCmd_Dialog);
+ pPopupMenu->SetItemCommand( nItemId, aCmd_Dialog );
}
void SAL_CALL LanguageSelectionMenuController::updatePopupMenu() throw ( ::com::sun::star::uno::RuntimeException )
{
- PopupMenuControllerBase::updatePopupMenu();
+ svt::PopupMenuControllerBase::updatePopupMenu();
// Force status update to get information about the current languages
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
Reference< XDispatch > xDispatch( m_xLanguageDispatch );
com::sun::star::util::URL aTargetURL;
aTargetURL.Complete = m_aLangStatusCommandURL;
m_xURLTransformer->parseStrict( aTargetURL );
- aLock.unlock();
+ aLock.clear();
if ( xDispatch.is() )
{
@@ -421,19 +357,19 @@ void SAL_CALL LanguageSelectionMenuController::updatePopupMenu() throw ( ::com::
// XInitialization
void SAL_CALL LanguageSelectionMenuController::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
sal_Bool bInitalized( m_bInitialized );
if ( !bInitalized )
{
- PopupMenuControllerBase::initialize(aArguments);
+ svt::PopupMenuControllerBase::initialize(aArguments);
if ( m_bInitialized )
{
- m_aLangStatusCommandURL = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:LanguageStatus" ));
+ m_aLangStatusCommandURL = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:LanguageStatus" ));
m_aMenuCommandURL_Lang = m_aLangStatusCommandURL;
- m_aMenuCommandURL_Font = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontDialog" ));
- m_aMenuCommandURL_CharDlgForParagraph = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontDialogForParagraph" ));
+ m_aMenuCommandURL_Font = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontDialog" ));
+ m_aMenuCommandURL_CharDlgForParagraph = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontDialogForParagraph" ));
}
}
}
diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx
index 544597261852..021ee4e8f8df 100644
--- a/framework/source/uielement/langselectionstatusbarcontroller.cxx
+++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx
@@ -27,6 +27,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_framework.hxx"
+
#include <uielement/langselectionstatusbarcontroller.hxx>
#include <classes/fwkresid.hxx>
#include <services.h>
@@ -53,8 +54,6 @@
#include <com/sun/star/frame/XModule.hpp>
#include <com/sun/star/frame/XModel.hpp>
-#include <map>
-#include <set>
#include <classes/fwkresid.hxx>
#ifndef __FRAMEWORK_CLASSES_RESOURCE_HRC_
#include <classes/resource.hrc>
@@ -74,6 +73,9 @@
#include "helper/mischelper.hxx"
+#include <map>
+#include <set>
+
using namespace ::cppu;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -82,9 +84,14 @@ using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::i18n;
using namespace ::com::sun::star::document;
+using ::rtl::OUString;
+
+
namespace framework
{
+////////////////////////////////////////////////////////////
+
DEFINE_XSERVICEINFO_MULTISERVICE ( LangSelectionStatusbarController ,
OWeakObject ,
SERVICENAME_STATUSBARCONTROLLER ,
@@ -94,10 +101,10 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( LangSelectionStatusbarController
DEFINE_INIT_SERVICE ( LangSelectionStatusbarController, {} )
LangSelectionStatusbarController::LangSelectionStatusbarController( const uno::Reference< lang::XMultiServiceFactory >& xServiceManager ) :
- svt::StatusbarController( xServiceManager, uno::Reference< frame::XFrame >(), rtl::OUString(), 0 ),
+ svt::StatusbarController( xServiceManager, uno::Reference< frame::XFrame >(), OUString(), 0 ),
m_bShowMenu( sal_True ),
- m_nScriptType( 7 )
- ,m_aLangGuessHelper(xServiceManager)
+ m_nScriptType( LS_SCRIPT_LATIN | LS_SCRIPT_ASIAN | LS_SCRIPT_COMPLEX ),
+ m_aLangGuessHelper( xServiceManager )
{
}
@@ -178,223 +185,158 @@ throw (::com::sun::star::uno::RuntimeException)
return sal_False;
}
-void LangSelectionStatusbarController::LangMenu()throw (::com::sun::star::uno::RuntimeException)
+void LangSelectionStatusbarController::LangMenu()
+throw (::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "LangSelectionStatusbarController::LangMenu" );
if (!m_bShowMenu)
return;
//add context menu
- const static ::rtl::OUString s_sPopupMenu(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.PopupMenu"));
+ const static OUString s_sPopupMenu(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.PopupMenu"));
Reference< awt::XPopupMenu > xPopupMenu( m_xServiceManager->createInstance( s_sPopupMenu ), UNO_QUERY );
//sub menu that contains all items except the last two items: Separator + Set Language for Paragraph
Reference< awt::XPopupMenu > subPopupMenu(m_xServiceManager->createInstance( s_sPopupMenu ), UNO_QUERY );
- std::set< ::rtl::OUString > LangItems;
-
- SvtLanguageTable aLanguageTable;
- USHORT nItemId=1;
-
- //1--add current language
- if( m_aCurLang != ::rtl::OUString( ) &&
- LANGUAGE_DONTKNOW != aLanguageTable.GetType( m_aCurLang ))
- LangItems.insert( m_aCurLang );
-
- //2--System
- SvtLanguageTable aLangTable;
- const AllSettings& rAllSettings = Application::GetSettings();
- LanguageType rSystemLanguage = rAllSettings.GetLanguage();
- if( rSystemLanguage != LANGUAGE_DONTKNOW )
- {
- if ( IsScriptTypeMatchingToLanguage( m_nScriptType, rSystemLanguage ))
- LangItems.insert( ::rtl::OUString( aLangTable.GetString( rSystemLanguage )) );
- }
-
- //3--UI
- LanguageType rUILanguage = rAllSettings.GetUILanguage();
- if( rUILanguage != LANGUAGE_DONTKNOW )
- {
- if ( IsScriptTypeMatchingToLanguage( m_nScriptType, rUILanguage ))
- LangItems.insert( ::rtl::OUString( aLangTable.GetString( rUILanguage )) );
- }
-
- //4--guessed language
- uno::Reference< linguistic2::XLanguageGuessing > xLangGuesser( m_aLangGuessHelper.GetGuesser() );
- if ( xLangGuesser.is() && m_aGuessedText.getLength() > 0)
- {
- ::com::sun::star::lang::Locale aLocale(xLangGuesser->guessPrimaryLanguage( m_aGuessedText, 0, m_aGuessedText.getLength()) );
- LanguageType nLang = MsLangId::convertLocaleToLanguageWithFallback( aLocale );
- if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_NONE && nLang != LANGUAGE_SYSTEM
- && IsScriptTypeMatchingToLanguage( m_nScriptType, nLang ))
- LangItems.insert( aLangTable.GetString( nLang ));
- }
-
- //5--keyboard language
- if( m_aKeyboardLang != ::rtl::OUString::createFromAscii( "" ))
+ SvtLanguageTable aLanguageTable;
+
+ // get languages to be displayed in the menu
+ std::set< OUString > aLangItems;
+ FillLangItems( aLangItems, aLanguageTable, m_xFrame, m_aLangGuessHelper,
+ m_nScriptType, m_aCurLang, m_aKeyboardLang, m_aGuessedTextLang );
+
+ //
+ // add first few entries to main menu
+ //
+ sal_Int16 nItemId = static_cast< sal_Int16 >(MID_LANG_SEL_1);
+ const OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); // multiple languages in current selection
+ const OUString sEmpty; // 'no language found' from language guessing
+ std::map< sal_Int16, OUString > aLangMap;
+ std::set< OUString >::const_iterator it;
+ for (it = aLangItems.begin(); it != aLangItems.end(); ++it)
{
- if ( IsScriptTypeMatchingToLanguage( m_nScriptType, aLanguageTable.GetType( m_aKeyboardLang )))
- LangItems.insert( m_aKeyboardLang );
- }
-
- //6--all languages used in current document
- Reference< com::sun::star::frame::XModel > xModel;
- if ( m_xFrame.is() )
- {
- Reference< com::sun::star::frame::XController > xController( m_xFrame->getController(), UNO_QUERY );
- if ( xController.is() )
- xModel = xController->getModel();
- }
- Reference< document::XDocumentLanguages > xDocumentLanguages( xModel, UNO_QUERY );
- /*the description of m_nScriptType
- LATIN : 1
- ASIAN : 2
- COMPLEX:4
- LATIN + ASIAN : 3
- LATIN + COMPLEX : 5
- ASIAN + COMPLEX : 6
- LATIN + ASIAN + COMPLEX : 7
- */
-
- sal_Int16 nCount=7;
- if ( xDocumentLanguages.is() )
- {
- Sequence< Locale > rLocales( xDocumentLanguages->getDocumentLanguages( m_nScriptType, nCount ));
- if ( rLocales.getLength() > 0 )
- {
- for ( USHORT i = 0; i<rLocales.getLength();++i )
- {
- if ( LangItems.size() == 7 )
- break;
- const Locale& rLocale=rLocales[i];
- if( IsScriptTypeMatchingToLanguage( m_nScriptType, aLangTable.GetType( rLocale.Language )))
- LangItems.insert( ::rtl::OUString( rLocale.Language ) );
- }
- }
- }
- std::map< sal_Int16, ::rtl::OUString > LangTable;
- bool bMultipleLanguages = m_aCurLang.compareToAscii( "*" ) == 0;
- bool bNothingSelected = true;
- sal_Int16 nMenuItemStyle = !bMultipleLanguages ? css::awt::MenuItemStyle::RADIOCHECK : 0;
-
- for( std::set< ::rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it )
- {
- if ( *it != ::rtl::OUString( aLangTable.GetString( LANGUAGE_NONE ) )&&
- *it != ::rtl::OUString::createFromAscii( "*" ) &&
- *it != ::rtl::OUString::createFromAscii( "" ))
+ const OUString & rStr( *it );
+ if ( rStr != OUString( aLanguageTable.GetString( LANGUAGE_NONE ) ) &&
+ rStr != sAsterix &&
+ rStr != sEmpty)
{
- //nItemId = xPopupMenu->getItemCount()+1;
- nItemId++;
- xPopupMenu->insertItem( nItemId, *it, nMenuItemStyle, nItemId );
- LangTable[nItemId]=*it;
- if( *it == m_aCurLang )
+ DBG_ASSERT( MID_LANG_SEL_1 <= nItemId && nItemId <= MID_LANG_SEL_9,
+ "nItemId outside of expected range!" );
+ xPopupMenu->insertItem( nItemId, rStr, css::awt::MenuItemStyle::RADIOCHECK, nItemId );
+ if ( rStr == m_aCurLang )
{
//make a sign for the current language
xPopupMenu->checkItem( nItemId, TRUE );
- bNothingSelected = false;
}
+ aLangMap[ nItemId ] = rStr;
+ ++nItemId;
}
}
-
- //7--none
- nItemId++;
- xPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), nMenuItemStyle, nItemId );
- if (bNothingSelected && !bMultipleLanguages)
- xPopupMenu->checkItem( nItemId, TRUE );
-
- //More...
- nItemId++;
- xPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_MORE )), 0, nItemId );
-
- for( ::std::set< ::rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it )
+ xPopupMenu->insertItem( MID_LANG_SEL_NONE, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_SEL_NONE );
+ xPopupMenu->insertItem( MID_LANG_SEL_RESET, String( FwkResId( STR_RESET_TO_DEFAULT_LANGUAGE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_SEL_RESET );
+ xPopupMenu->insertItem( MID_LANG_SEL_MORE, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_SEL_MORE );
+
+ //
+ // add entries to submenu ('set language for paragraph')
+ //
+ nItemId = static_cast< sal_Int16 >(MID_LANG_PARA_1);
+ for (it = aLangItems.begin(); it != aLangItems.end(); ++it)
{
- if( *it != ::rtl::OUString( aLangTable.GetString( LANGUAGE_NONE ) )&&
- *it != ::rtl::OUString::createFromAscii( "*" ) &&
- *it != ::rtl::OUString::createFromAscii( "" ))
+ const OUString & rStr( *it );
+ if( rStr != OUString( aLanguageTable.GetString( LANGUAGE_NONE ) )&&
+ rStr != sAsterix &&
+ rStr != sEmpty)
{
- nItemId++;
- subPopupMenu->insertItem( nItemId, *it, 0, nItemId );
- LangTable[nItemId]=*it;
+ DBG_ASSERT( MID_LANG_PARA_1 <= nItemId && nItemId <= MID_LANG_PARA_9,
+ "nItemId outside of expected range!" );
+ subPopupMenu->insertItem( nItemId, rStr, css::awt::MenuItemStyle::RADIOCHECK, nItemId );
+ aLangMap[nItemId] = rStr;
+ ++nItemId;
}
}
- //7--none
- nItemId++;
- subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), 0, nItemId );
- //More
- nItemId++;
- subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_MORE )), 0, nItemId );
+ subPopupMenu->insertItem( MID_LANG_PARA_NONE, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_NONE );
+ subPopupMenu->insertItem( MID_LANG_PARA_RESET, String( FwkResId( STR_RESET_TO_DEFAULT_LANGUAGE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_RESET );
+ subPopupMenu->insertItem( MID_LANG_PARA_MORE, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_MORE );
- nItemId++;
- xPopupMenu->insertSeparator(nItemId);
+ //
+ // add last two entries to main menu
+ //
+ xPopupMenu->insertSeparator( MID_LANG_PARA_SEPERATOR );
+ xPopupMenu->insertItem( MID_LANG_PARA_STRING, String( FwkResId( STR_SET_LANGUAGE_FOR_PARAGRAPH )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_STRING );
+ xPopupMenu->setPopupMenu( MID_LANG_PARA_STRING, subPopupMenu );
- nItemId++;
- xPopupMenu->insertItem( nItemId, String( FwkResId( STR_SET_LANGUAGE_FOR_PARAGRAPH )), 0, nItemId );
- xPopupMenu->setPopupMenu( nItemId, subPopupMenu );
- //display the popup menu and execute every command
+ //
+ // now display the popup menu and execute every command ...
+ //
Reference< awt::XWindowPeer > xParent( m_xParentWindow, UNO_QUERY );
- com::sun::star::awt::Rectangle mRectangle;
+ com::sun::star::awt::Rectangle aRectangle;
Window* pWindow = VCLUnoHelper::GetWindow( m_xParentWindow );
const Point mMousePos = pWindow->GetPointerPosPixel();
- mRectangle.X = mMousePos.X();
- mRectangle.Y = mMousePos.Y();
- sal_Int16 nId = xPopupMenu->execute( xParent, mRectangle, com::sun::star::awt::PopupMenuDirection::EXECUTE_UP+16 );
+ aRectangle.X = mMousePos.X();
+ aRectangle.Y = mMousePos.Y();
+ sal_Int16 nId = xPopupMenu->execute( xParent, aRectangle, com::sun::star::awt::PopupMenuDirection::EXECUTE_UP+16 );
//click "More..."
if ( nId && m_xFrame.is() )
{
uno::Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
util::URL aURL;
- if ( nId < nItemId-3-subPopupMenu->getItemCount() )
+ if (MID_LANG_SEL_1 <= nId && nId <= MID_LANG_SEL_9)
{
- //1..7
//set selected language as current language for selection
- String SelectedLang = LangTable[nId];
- aURL.Complete+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Current_");
- aURL.Complete+=SelectedLang;
+ String aSelectedLang = aLangMap[nId];
+ aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Current_");
+ aURL.Complete += aSelectedLang;
}
- else if ( nId == nItemId-3-subPopupMenu->getItemCount() )
+ else if (nId == MID_LANG_SEL_NONE)
{
- //8
//set None as current language for selection
- aURL.Complete+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Current_LANGUAGE_NONE");
+ aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Current_LANGUAGE_NONE");
+ }
+ else if (nId == MID_LANG_SEL_RESET)
+ {
+ // reset language attributes for selection
+ aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Current_RESET_LANGUAGES");
}
- else if ( nId == nItemId-2-subPopupMenu->getItemCount() )
+ else if (nId == MID_LANG_SEL_MORE)
{
- //9 (more)...
//open the dialog "format/character" for current selection
- aURL.Complete+=String::CreateFromAscii(".uno:FontDialog?Language:string=*");
+ aURL.Complete += OUString::createFromAscii(".uno:FontDialog?Language:string=*");
}
- else if ( nId < nItemId-3 && nId>nItemId-2-subPopupMenu->getItemCount() )
+ else if (MID_LANG_PARA_1 <= nId && nId <= MID_LANG_PARA_9)
{
- //1..7 para
//set selected language for current paragraph
- String SelectedLang = LangTable[nId];
- aURL.Complete+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Paragraph_");
- aURL.Complete+=SelectedLang;
+ String aSelectedLang = aLangMap[nId];
+ aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Paragraph_");
+ aURL.Complete += aSelectedLang;
}
- else if ( nId==nItemId-3 )
+ else if (nId == MID_LANG_PARA_NONE)
{
- //8 para
//set None as language for current paragraph
- aURL.Complete+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Paragraph_LANGUAGE_NONE");
+ aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Paragraph_LANGUAGE_NONE");
}
- else if ( nId==nItemId-2 )
+ else if (nId == MID_LANG_PARA_RESET)
+ {
+ // reset language attributes for paragraph
+ aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Paragraph_RESET_LANGUAGES");
+ }
+ else if (nId == MID_LANG_PARA_MORE)
{
- //9 (more) para...
//open the dialog "format/character" for current paragraph
- aURL.Complete+=String::CreateFromAscii(".uno:FontDialogForParagraph");
+ aURL.Complete += OUString::createFromAscii(".uno:FontDialogForParagraph");
}
- uno::Reference< util::XURLTransformer > xURLTransformer( m_xServiceManager->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), uno::UNO_QUERY );
+ uno::Reference< util::XURLTransformer > xURLTransformer( m_xServiceManager->createInstance( OUString::createFromAscii("com.sun.star.util.URLTransformer" )), uno::UNO_QUERY );
xURLTransformer->parseStrict( aURL );
- uno::Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch(aURL,::rtl::OUString(),0);
+ uno::Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch(aURL, OUString(), 0);
if( xDispatch.is() )
{
uno::Sequence< beans::PropertyValue > aPV;
if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper(::rtl::OUString::createFromAscii("ButtonToolbarController")).log(m_xServiceManager, m_xFrame, aURL, aPV);
+ UiEventLogHelper( OUString::createFromAscii("ButtonToolbarController")).log(m_xServiceManager, m_xFrame, aURL, aPV);
xDispatch->dispatch( aURL, aPV);
}
}
@@ -443,6 +385,13 @@ throw (::com::sun::star::uno::RuntimeException)
void SAL_CALL LangSelectionStatusbarController::statusChanged( const FeatureStateEvent& Event )
throw ( RuntimeException )
{
+ // This function will be called when observed data changes,
+ // for example the selection or keyboard language.
+ // - It displays the language in use in the status bar
+ // - and it stores the relevant data for creating the menu
+ // at some later point in the member variables
+ // m_nScriptType, m_aCurLang, m_aKeyboardLang, m_aGuessedText
+
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "LangSelectionStatusbarController::statusChanged" );
vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
@@ -451,25 +400,22 @@ throw ( RuntimeException )
m_bShowMenu = sal_True;
- m_nScriptType=7;//set the default value
+ m_nScriptType = LS_SCRIPT_LATIN | LS_SCRIPT_ASIAN | LS_SCRIPT_COMPLEX; //set the default value
Window* pWindow = VCLUnoHelper::GetWindow( m_xParentWindow );
if ( pWindow && pWindow->GetType() == WINDOW_STATUSBAR && m_nID != 0 )
{
- rtl::OUString aStrValue;
- Sequence< ::rtl::OUString > aSeq;
+ OUString aStrValue;
+ Sequence< OUString > aSeq;
StatusBar* pStatusBar = (StatusBar *)pWindow;
if ( Event.State >>= aStrValue )
- {
pStatusBar->SetItemText( m_nID, aStrValue );
- m_aCurrentLanguage = aStrValue;
- }
else if ( Event.State >>= aSeq )
{
if ( aSeq.getLength() == 4 )
{
const String aMultipleLangText( FwkResId( STR_LANGSTATUS_MULTIPLE_LANGUAGES ) );
- ::rtl::OUString aStatusText = aSeq[0];
+ OUString aStatusText = aSeq[0];
if ( 0 == aStatusText.compareToAscii( "*" ))
aStatusText = aMultipleLangText;
pStatusBar->SetItemText( m_nID, aStatusText );
@@ -479,7 +425,7 @@ throw ( RuntimeException )
m_aCurLang = aSeq[0];
m_nScriptType = static_cast< sal_Int16 >( aSeq[1].toInt32() );
m_aKeyboardLang = aSeq[2];
- m_aGuessedText = aSeq[3];
+ m_aGuessedTextLang = aSeq[3];
}
}
else if ( !Event.State.hasValue() )
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx
index f0f5d52a47d6..30b0fe5fec1c 100644
--- a/framework/source/uielement/macrosmenucontroller.cxx
+++ b/framework/source/uielement/macrosmenucontroller.cxx
@@ -48,6 +48,7 @@
#include <rtl/ustrbuf.hxx>
#include <dispatch/uieventloghelper.hxx>
#include "helper/mischelper.hxx"
+#include <vos/mutex.hxx>
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
@@ -70,7 +71,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( MacrosMenuController
DEFINE_INIT_SERVICE ( MacrosMenuController, {} )
MacrosMenuController::MacrosMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager ),
+ svt::PopupMenuControllerBase( xServiceManager ),
m_xServiceManager( xServiceManager)
{
}
@@ -92,6 +93,9 @@ void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPo
if ( pVCLPopupMenu )
pPopupMenu = (PopupMenu *)pVCLPopupMenu->GetMenu();
+ if (!pPopupMenu)
+ return;
+
// insert basic
String aCommand = String::CreateFromAscii( ".uno:MacroDialog" );
String aDisplayName = RetrieveLabelFromCommand( aCommand );
@@ -109,7 +113,7 @@ void SAL_CALL MacrosMenuController::disposing( const EventObject& ) throw ( Runt
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
OSL_TRACE("disposing");
m_xFrame.clear();
m_xDispatch.clear();
@@ -126,7 +130,7 @@ void SAL_CALL MacrosMenuController::disposing( const EventObject& ) throw ( Runt
// XStatusListener
void SAL_CALL MacrosMenuController::statusChanged( const FeatureStateEvent& ) throw ( RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
if ( m_xPopupMenu.is() )
{
fillPopupMenu( m_xPopupMenu );
diff --git a/framework/source/uielement/makefile.mk b/framework/source/uielement/makefile.mk
index da4ab3d34c74..b74adb1e176f 100644
--- a/framework/source/uielement/makefile.mk
+++ b/framework/source/uielement/makefile.mk
@@ -79,6 +79,7 @@ SLOFILES= \
$(SLO)$/toolbarmerger.obj \
$(SLO)$/toolbarsmenucontroller.obj \
$(SLO)$/toolbarwrapper.obj \
+ $(SLO)$/popupmenucontroller.obj \
$(SLO)$/uicommanddescription.obj \
# --- Targets ------------------------------------------------------
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index 3ac78726d799..786795ff1d14 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -67,6 +67,7 @@
#include <svtools/acceleratorexecute.hxx>
#include <unotools/moduleoptions.hxx>
#include <dispatch/uieventloghelper.hxx>
+#include <vos/mutex.hxx>
//_________________________________________________________________________________________________________________
// Defines
@@ -326,7 +327,7 @@ void NewMenuController::retrieveShortcutsFromConfiguration(
}
NewMenuController::NewMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager ),
+ svt::PopupMenuControllerBase( xServiceManager ),
m_bShowImages( sal_True ),
m_bHiContrast( sal_False ),
m_bNewMenu( sal_False ),
@@ -399,7 +400,7 @@ void SAL_CALL NewMenuController::disposing( const EventObject& ) throw ( Runtime
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xServiceManager.clear();
@@ -423,12 +424,12 @@ void SAL_CALL NewMenuController::select( const css::awt::MenuEvent& rEvent ) thr
Reference< XMultiServiceFactory > xServiceManager;
Reference< XURLTransformer > xURLTransformer;
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
xPopupMenu = m_xPopupMenu;
xDispatchProvider = Reference< XDispatchProvider >( m_xFrame, UNO_QUERY );
xServiceManager = m_xServiceManager;
xURLTransformer = m_xURLTransformer;
- aLock.unlock();
+ aLock.clear();
css::util::URL aTargetURL;
Sequence< PropertyValue > aArgsList( 1 );
@@ -548,12 +549,12 @@ void NewMenuController::impl_setPopupMenu()
// XInitialization
void SAL_CALL NewMenuController::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
sal_Bool bInitalized( m_bInitialized );
if ( !bInitalized )
{
- PopupMenuControllerBase::initialize( aArguments );
+ svt::PopupMenuControllerBase::initialize( aArguments );
if ( m_bInitialized )
{
diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx
index f4d6aea0d82b..80dccb76db05 100644
--- a/framework/source/uielement/objectmenucontroller.cxx
+++ b/framework/source/uielement/objectmenucontroller.cxx
@@ -59,6 +59,7 @@
#include <tools/urlobj.hxx>
#include <rtl/ustrbuf.hxx>
#include <dispatch/uieventloghelper.hxx>
+#include <vos/mutex.hxx>
//_________________________________________________________________________________________________________________
// Defines
@@ -83,7 +84,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( ObjectMenuController
DEFINE_INIT_SERVICE ( ObjectMenuController, {} )
ObjectMenuController::ObjectMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager )
+ svt::PopupMenuControllerBase( xServiceManager )
{
}
@@ -128,7 +129,7 @@ void SAL_CALL ObjectMenuController::disposing( const EventObject& ) throw ( Runt
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xObjectUpdateDispatch.clear();
@@ -145,7 +146,7 @@ void SAL_CALL ObjectMenuController::statusChanged( const FeatureStateEvent& Even
Sequence < com::sun::star::embed::VerbDescriptor > aVerbCommandSeq;
if ( Event.State >>= aVerbCommandSeq )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
if ( m_xPopupMenu.is() )
fillPopupMenu( aVerbCommandSeq, m_xPopupMenu );
}
diff --git a/framework/source/uielement/popupmenucontroller.cxx b/framework/source/uielement/popupmenucontroller.cxx
new file mode 100644
index 000000000000..328777db2b79
--- /dev/null
+++ b/framework/source/uielement/popupmenucontroller.cxx
@@ -0,0 +1,248 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_framework.hxx"
+
+#include <com/sun/star/awt/XPopupMenu.hpp>
+#include <com/sun/star/frame/XPopupMenuController.hpp>
+
+#include <toolkit/helper/vclunohelper.hxx>
+//#include <toolkit/unohlp.hxx>
+
+#include <rtl/ref.hxx>
+
+#include <vcl/toolbox.hxx>
+#include <vcl/menu.hxx>
+#include <vcl/svapp.hxx>
+#include <vos/mutex.hxx>
+
+#include "uielement/popupmenucontroller.hxx"
+#include "services.h"
+
+using rtl::OUString;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::beans;
+
+// --------------------------------------------------------------------
+
+
+namespace framework
+{
+
+DEFINE_XSERVICEINFO_MULTISERVICE ( PopupMenuController ,
+ OWeakObject ,
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ) ) ,
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.framework.PopupMenuController" ) )
+ )
+
+DEFINE_INIT_SERVICE ( PopupMenuController, {} )
+
+class PopupMenuControllerImpl
+{
+};
+
+//========================================================================
+// class PopupMenuController
+//========================================================================
+
+PopupMenuController::PopupMenuController( const Reference< lang::XMultiServiceFactory >& rServiceManager )
+: svt::ToolboxController( rServiceManager, Reference< frame::XFrame >(), OUString() )
+{
+}
+
+// --------------------------------------------------------------------
+
+PopupMenuController::~PopupMenuController()
+{
+}
+
+// --------------------------------------------------------------------
+// XInterface
+// --------------------------------------------------------------------
+
+Any SAL_CALL PopupMenuController::queryInterface( const Type& aType ) throw (RuntimeException)
+{
+ Any a( ToolboxController::queryInterface( aType ) );
+ if ( a.hasValue() )
+ return a;
+
+ return ::cppu::queryInterface( aType, static_cast< lang::XServiceInfo* >( this ));
+}
+
+// --------------------------------------------------------------------
+
+void SAL_CALL PopupMenuController::acquire() throw ()
+{
+ ToolboxController::acquire();
+}
+
+// --------------------------------------------------------------------
+
+void SAL_CALL PopupMenuController::release() throw ()
+{
+ ToolboxController::release();
+}
+
+// --------------------------------------------------------------------
+// XComponent
+// --------------------------------------------------------------------
+
+void SAL_CALL PopupMenuController::dispose() throw (RuntimeException)
+{
+ if( mxPopupMenuController.is() )
+ {
+ Reference< XComponent > xComponent( mxPopupMenuController, UNO_QUERY );
+ if( xComponent.is() )
+ xComponent->dispose();
+ mxPopupMenuController.clear();
+ }
+
+ mxPopupMenu.clear();
+
+ svt::ToolboxController::dispose();
+}
+
+// --------------------------------------------------------------------
+// XStatusListener
+// --------------------------------------------------------------------
+
+void SAL_CALL PopupMenuController::statusChanged( const frame::FeatureStateEvent& rEvent ) throw ( RuntimeException )
+{
+ svt::ToolboxController::statusChanged(rEvent);
+ enable( rEvent.IsEnabled );
+}
+
+// --------------------------------------------------------------------
+// XToolbarController
+// --------------------------------------------------------------------
+
+void SAL_CALL PopupMenuController::execute( sal_Int16 KeyModifier ) throw (RuntimeException)
+{
+ svt::ToolboxController::execute( KeyModifier );
+}
+
+// --------------------------------------------------------------------
+
+void SAL_CALL PopupMenuController::click() throw (RuntimeException)
+{
+ svt::ToolboxController::click();
+}
+
+// --------------------------------------------------------------------
+
+void SAL_CALL PopupMenuController::doubleClick() throw (RuntimeException)
+{
+ svt::ToolboxController::doubleClick();
+}
+
+// --------------------------------------------------------------------
+
+bool PopupMenuController::CreatePopupMenuController() throw (Exception)
+{
+ Reference< XMultiComponentFactory > xPopupMenuControllerRegistration( getServiceManager()->createInstance( SERVICENAME_POPUPMENUCONTROLLERFACTORY ), UNO_QUERY_THROW );
+
+ Sequence< Any > aSeq( 2 );
+ PropertyValue aPropValue;
+
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleName" ));
+ aPropValue.Value <<= getModuleName();
+ aSeq[0] <<= aPropValue;
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
+ aPropValue.Value <<= m_xFrame;
+ aSeq[1] <<= aPropValue;
+
+ Reference< XPropertySet > xProps( getServiceManager(), UNO_QUERY_THROW );
+ Reference< XComponentContext > xComponentContext( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY_THROW );
+
+ Reference< XPopupMenuController > xPopupMenuController( xPopupMenuControllerRegistration->createInstanceWithArgumentsAndContext( getCommandURL(), aSeq, xComponentContext ), UNO_QUERY );
+ if ( xPopupMenuController.is() )
+ {
+ mxPopupMenuController = xPopupMenuController;
+ return true;
+ }
+ return false;
+}
+
+Reference< awt::XWindow > SAL_CALL PopupMenuController::createPopupWindow() throw (RuntimeException)
+{
+ ::vos::OGuard aSolarLock(Application::GetSolarMutex());
+
+ Reference< awt::XWindow > xRet;
+
+ try
+ {
+ ToolBox* pToolBox = dynamic_cast< ToolBox* >( VCLUnoHelper::GetWindow( getParent() ) );
+ if( !pToolBox )
+ return xRet;
+
+ // get selected button
+ USHORT nItemId = pToolBox->GetDownItemId();
+ if( !nItemId )
+ return xRet;
+
+ ::Rectangle aRect( pToolBox->GetItemRect( nItemId ) );
+
+ if( !mxPopupMenuController.is() && !CreatePopupMenuController() )
+ return xRet;
+
+ if( !mxPopupMenu.is() )
+ {
+ mxPopupMenu = Reference< awt::XPopupMenu >( getServiceManager()->createInstance( DECLARE_ASCII( "stardiv.Toolkit.VCLXPopupMenu" ) ), UNO_QUERY_THROW );
+ mxPopupMenuController->setPopupMenu( mxPopupMenu );
+ }
+ else
+ {
+ mxPopupMenuController->updatePopupMenu();
+
+ }
+ pToolBox->SetItemDown( nItemId, TRUE );
+ Reference< awt::XWindowPeer > xPeer( getParent(), UNO_QUERY_THROW );
+ mxPopupMenu->execute( xPeer, VCLUnoHelper::ConvertToAWTRect( aRect ), 0 );
+ pToolBox->SetItemDown( nItemId, FALSE );
+ }
+ catch( Exception& )
+ {
+ }
+
+ return xRet;
+}
+
+// --------------------------------------------------------------------
+
+Reference< awt::XWindow > SAL_CALL PopupMenuController::createItemWindow( const Reference< awt::XWindow >& /*Parent*/ ) throw (RuntimeException)
+{
+ return Reference< awt::XWindow >();
+}
+
+// --------------------------------------------------------------------
+
+}
+
diff --git a/framework/source/uielement/progressbarwrapper.cxx b/framework/source/uielement/progressbarwrapper.cxx
index 2cd0ed891db6..a20f107ea22e 100644
--- a/framework/source/uielement/progressbarwrapper.cxx
+++ b/framework/source/uielement/progressbarwrapper.cxx
@@ -43,6 +43,7 @@
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/ui/UIElementType.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index cec95485dacd..64f05ed642cb 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -47,7 +47,6 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/awt/MenuItemStyle.hpp>
#include <com/sun/star/util/XStringWidth.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
@@ -64,6 +63,7 @@
#include <osl/file.hxx>
//#include <tools/solar.hrc>
#include <dispatch/uieventloghelper.hxx>
+#include <vos/mutex.hxx>
//_________________________________________________________________________________________________________________
// Defines
@@ -105,7 +105,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( RecentFilesMenuController
DEFINE_INIT_SERVICE ( RecentFilesMenuController, {} )
RecentFilesMenuController::RecentFilesMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager ),
+ svt::PopupMenuControllerBase( xServiceManager ),
m_bDisabled( sal_False )
{
}
@@ -245,11 +245,11 @@ void RecentFilesMenuController::executeEntry( sal_Int32 nIndex )
Reference< XDispatchProvider > xDispatchProvider;
Reference< XMultiServiceFactory > xServiceManager;
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
xPopupMenu = m_xPopupMenu;
xDispatchProvider = Reference< XDispatchProvider >( m_xFrame, UNO_QUERY );
xServiceManager = m_xServiceManager;
- aLock.unlock();
+ aLock.clear();
css::util::URL aTargetURL;
Sequence< PropertyValue > aArgsList;
@@ -312,7 +312,7 @@ void SAL_CALL RecentFilesMenuController::disposing( const EventObject& ) throw (
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xServiceManager.clear();
@@ -325,7 +325,7 @@ void SAL_CALL RecentFilesMenuController::disposing( const EventObject& ) throw (
// XStatusListener
void SAL_CALL RecentFilesMenuController::statusChanged( const FeatureStateEvent& Event ) throw ( RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_bDisabled = !Event.IsEnabled;
}
@@ -336,11 +336,11 @@ void SAL_CALL RecentFilesMenuController::select( const css::awt::MenuEvent& rEve
Reference< XDispatchProvider > xDispatchProvider;
Reference< XMultiServiceFactory > xServiceManager;
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
xPopupMenu = m_xPopupMenu;
xDispatchProvider = Reference< XDispatchProvider >( m_xFrame, UNO_QUERY );
xServiceManager = m_xServiceManager;
- aLock.unlock();
+ aLock.clear();
css::util::URL aTargetURL;
Sequence< PropertyValue > aArgsList;
@@ -355,7 +355,7 @@ void SAL_CALL RecentFilesMenuController::select( const css::awt::MenuEvent& rEve
void SAL_CALL RecentFilesMenuController::activate( const css::awt::MenuEvent& ) throw (RuntimeException)
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
impl_setPopupMenu();
}
@@ -368,17 +368,16 @@ void RecentFilesMenuController::impl_setPopupMenu()
void SAL_CALL RecentFilesMenuController::updatePopupMenu() throw (RuntimeException)
{
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
- if ( m_bDisposed )
- throw DisposedException();
+ throwIfDisposed();
Reference< XStatusListener > xStatusListener( static_cast< OWeakObject* >( this ), UNO_QUERY );
Reference< XDispatch > xDispatch( m_xDispatch );
com::sun::star::util::URL aTargetURL;
aTargetURL.Complete = m_aCommandURL;
m_xURLTransformer->parseStrict( aTargetURL );
- aLock.unlock();
+ aLock.clear();
// Add/remove status listener to get a status update once
if ( xDispatch.is() )
@@ -395,10 +394,9 @@ Reference< XDispatch > SAL_CALL RecentFilesMenuController::queryDispatch(
sal_Int32 /*nFlags*/ )
throw( RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
- if ( m_bDisposed )
- throw DisposedException();
+ throwIfDisposed();
if ( aURL.Complete.indexOf( m_aBaseURL ) == 0 )
return Reference< XDispatch >( static_cast< OWeakObject* >( this ), UNO_QUERY );
@@ -412,10 +410,9 @@ void SAL_CALL RecentFilesMenuController::dispatch(
const Sequence< PropertyValue >& /*seqProperties*/ )
throw( RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
- if ( m_bDisposed )
- throw DisposedException();
+ throwIfDisposed();
if ( aURL.Complete.indexOf( m_aBaseURL ) == 0 )
{
@@ -448,12 +445,11 @@ void SAL_CALL RecentFilesMenuController::addStatusListener(
const URL& aURL )
throw( RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
- if ( m_bDisposed )
- throw DisposedException();
+ throwIfDisposed();
- PopupMenuControllerBase::addStatusListener( xControl, aURL );
+ svt::PopupMenuControllerBase::addStatusListener( xControl, aURL );
}
void SAL_CALL RecentFilesMenuController::removeStatusListener(
@@ -461,7 +457,7 @@ void SAL_CALL RecentFilesMenuController::removeStatusListener(
const URL& aURL )
throw( RuntimeException )
{
- PopupMenuControllerBase::removeStatusListener( xControl, aURL );
+ svt::PopupMenuControllerBase::removeStatusListener( xControl, aURL );
}
IMPL_STATIC_LINK_NOINSTANCE( RecentFilesMenuController, ExecuteHdl_Impl, LoadRecentFile*, pLoadRecentFile )
diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
index 43ad09ffc1ee..dad2775dc453 100644
--- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx
+++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
@@ -49,7 +49,6 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/frame/status/ItemStatus.hpp>
#include <com/sun/star/frame/status/ItemState.hpp>
#include <com/sun/star/frame/status/Visibility.hpp>
diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index cb9cbb2896f7..0bbdbc339a34 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -56,6 +56,7 @@
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/Command.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// other includes
diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx
index a5e4263385fa..cf39edec2a7c 100644
--- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx
@@ -46,7 +46,6 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/frame/XControlNotificationListener.hpp>
#include "com/sun/star/util/XMacroExpander.hpp"
#include "com/sun/star/uno/XComponentContext.hpp"
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 9b0ffa9ce993..f965d38f6b46 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -52,6 +52,7 @@
#endif
#include <classes/addonsoptions.hxx>
#include <uielement/toolbarmerger.hxx>
+#include <helper/acceleratorinfo.hxx>
//_________________________________________________________________________________________________________________
// interface includes
@@ -75,6 +76,7 @@
#include <com/sun/star/ui/UIElementType.hpp>
#include <comphelper/sequence.hxx>
#include <com/sun/star/frame/status/Visibility.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// other includes
@@ -97,11 +99,14 @@
#include <svtools/menuoptions.hxx>
#include <unotools/cmdoptions.hxx>
#include <boost/bind.hpp>
+#include <svtools/acceleratorexecute.hxx>
//_________________________________________________________________________________________________________________
// namespaces
//_________________________________________________________________________________________________________________
+using rtl::OUString;
+
using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::uno;
@@ -258,7 +263,8 @@ ToolBarManager::ToolBarManager( const Reference< XMultiServiceFactory >& rServic
m_xFrame( rFrame ),
m_aListenerContainer( m_aLock.getShareableOslMutex() ),
m_xServiceManager( rServiceManager ),
- m_nSymbolsStyle( SvtMiscOptions().GetCurrentSymbolsStyle() )
+ m_nSymbolsStyle( SvtMiscOptions().GetCurrentSymbolsStyle() ),
+ m_bAcceleratorCfg( sal_False )
{
Window* pWindow = m_pToolBar;
while ( pWindow && !pWindow->IsSystemWindow() )
@@ -511,7 +517,47 @@ void ToolBarManager::UpdateControllers()
}
m_bUpdateControllers = sal_False;
}
+//for update toolbar controller via Support Visible by shizhoubo
+void ToolBarManager::UpdateController( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XToolbarController > xController)
+{
+ RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::ToolBarManager::UpdateControllers" );
+
+ if ( !m_bUpdateControllers )
+ {
+ m_bUpdateControllers = sal_True;
+ try
+ { if(xController.is())
+ {
+ Reference< XUpdatable > xUpdatable( xController, UNO_QUERY );
+ if ( xUpdatable.is() )
+ xUpdatable->update();
+ }
+ }
+ catch ( Exception& )
+ {
+ }
+
+ /* m_bUpdateControllers = sal_True;
+ ToolBarControllerMap::iterator pIter = m_aControllerMap.begin();
+ while ( pIter != m_aControllerMap.end() )
+ {
+ try
+ {
+ Reference< XUpdatable > xUpdatable( pIter->second, UNO_QUERY );
+ if ( xUpdatable.is() )
+ xUpdatable->update();
+ }
+ catch ( Exception& )
+ {
+ }
+ ++pIter;
+ }*/
+
+ }
+ m_bUpdateControllers = sal_False;
+}
+//end
void ToolBarManager::frameAction( const FrameActionEvent& Action )
throw ( RuntimeException )
{
@@ -664,6 +710,9 @@ void SAL_CALL ToolBarManager::dispose() throw( RuntimeException )
m_xFrame.clear();
m_xServiceManager.clear();
+ m_xGlobalAcceleratorManager.clear();
+ m_xModuleAcceleratorManager.clear();
+ m_xDocAcceleratorManager.clear();
m_bDisposed = sal_True;
}
@@ -1050,6 +1099,10 @@ void ToolBarManager::CreateControllers()
aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ));
aPropValue.Value <<= xToolbarWindow;
aPropertyVector.push_back( makeAny( aPropValue ));
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleName" ));
+ aPropValue.Value <<= m_aModuleIdentifier;
+ aPropertyVector.push_back( makeAny( aPropValue ));
+
if ( nWidth > 0 )
{
aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ));
@@ -1059,6 +1112,19 @@ void ToolBarManager::CreateControllers()
Sequence< Any > aArgs( comphelper::containerToSequence( aPropertyVector ));
xInit->initialize( aArgs );
+ //for Support Visiblitly by shizhoubo
+ if (pController)
+ {
+ // rtl::OUString aCommandURL = pController->m_aCommandURL;
+ if(aCommandURL == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:SwitchXFormsDesignMode" )) ||
+ aCommandURL == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ViewDataSourceBrowser" )) ||
+ aCommandURL == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ParaLeftToRight" )) ||
+ aCommandURL == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ParaRightToLeft" ))
+ )
+ pController->setFastPropertyValue_NoBroadcast(1,makeAny(sal_True));
+ }
+
+ //end
}
// Request a item window from the toolbar controller and set it at the VCL toolbar
@@ -1079,6 +1145,31 @@ void ToolBarManager::CreateControllers()
}
}
}
+ //for update Controller via support visiable state by shizhoubo
+ Reference< XPropertySet > xPropSet( xController, UNO_QUERY );
+ if ( xPropSet.is() )
+ {
+ try
+ {
+ sal_Bool bSupportVisiable = sal_True;
+ Any a( xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SupportsVisiable" ))) );
+ a >>= bSupportVisiable;
+ if ( bSupportVisiable )
+ {
+ Reference< XToolbarController > xTbxController( xController, UNO_QUERY );
+ UpdateController(xTbxController);
+ }
+ }
+ catch ( RuntimeException& )
+ {
+ throw;
+ }
+ catch ( Exception& )
+ {
+ }
+ }
+ //end
+
}
AddFrameActionListener();
@@ -1279,13 +1370,31 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
m_pToolBar->InsertItem( nId, aString, nItemBits );
m_pToolBar->SetItemCommand( nId, aCommandURL );
if ( aTooltip.getLength() )
+ {
m_pToolBar->SetQuickHelpText( nId, aTooltip );
+ }
else
- m_pToolBar->SetQuickHelpText( nId, aString );
+ {
+ ::rtl::OUString sQuickHelp( aString );
+ ::rtl::OUString sShortCut;
+ if( RetrieveShortcut( aCommandURL, sShortCut ) )
+ {
+ sQuickHelp += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " (" ) );
+ sQuickHelp += sShortCut;
+ sQuickHelp += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ")" ) );
+ }
+
+ m_pToolBar->SetQuickHelpText( nId, sQuickHelp );
+ }
+
if ( aLabel.getLength() > 0 )
+ {
m_pToolBar->SetItemText( nId, aLabel );
+ }
else
+ {
m_pToolBar->SetItemText( nId, aString );
+ }
m_pToolBar->EnableItem( nId, sal_True );
m_pToolBar->SetItemState( nId, STATE_NOCHECK );
@@ -2128,6 +2237,121 @@ Image ToolBarManager::QueryAddonsImage( const ::rtl::OUString& aCommandURL, bool
return aImage;
}
+bool ToolBarManager::impl_RetrieveShortcutsFromConfiguration(
+ const Reference< XAcceleratorConfiguration >& rAccelCfg,
+ const rtl::OUString& rCommand,
+ rtl::OUString& rShortCut )
+{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ToolBarManager::impl_RetrieveShortcutsFromConfiguration" );
+ if ( rAccelCfg.is() )
+ {
+ try
+ {
+ com::sun::star::awt::KeyEvent aKeyEvent;
+ Sequence< OUString > aCommands(1);
+ aCommands[0] = rCommand;
+
+ Sequence< Any > aSeqKeyCode( rAccelCfg->getPreferredKeyEventsForCommandList( aCommands ) );
+ if( aSeqKeyCode.getLength() == 1 )
+ {
+ if ( aSeqKeyCode[0] >>= aKeyEvent )
+ {
+ rShortCut = svt::AcceleratorExecute::st_AWTKey2VCLKey( aKeyEvent ).GetName();
+ return true;
+ }
+ }
+ }
+ catch ( IllegalArgumentException& )
+ {
+ }
+ }
+
+ return false;
+}
+
+bool ToolBarManager::RetrieveShortcut( const rtl::OUString& rCommandURL, rtl::OUString& rShortCut )
+{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ToolBarManager::RetrieveShortcuts" );
+ if ( m_bModuleIdentified )
+ {
+ Reference< XAcceleratorConfiguration > xDocAccelCfg( m_xDocAcceleratorManager );
+ Reference< XAcceleratorConfiguration > xModuleAccelCfg( m_xModuleAcceleratorManager );
+ Reference< XAcceleratorConfiguration > xGlobalAccelCfg( m_xGlobalAcceleratorManager );
+
+ if ( !m_bAcceleratorCfg )
+ {
+ // Retrieve references on demand
+ m_bAcceleratorCfg = sal_True;
+ if ( !xDocAccelCfg.is() )
+ {
+ Reference< XController > xController = m_xFrame->getController();
+ Reference< XModel > xModel;
+ if ( xController.is() )
+ {
+ xModel = xController->getModel();
+ if ( xModel.is() )
+ {
+ Reference< XUIConfigurationManagerSupplier > xSupplier( xModel, UNO_QUERY );
+ if ( xSupplier.is() )
+ {
+ Reference< XUIConfigurationManager > xDocUICfgMgr( xSupplier->getUIConfigurationManager(), UNO_QUERY );
+ if ( xDocUICfgMgr.is() )
+ {
+ xDocAccelCfg = Reference< XAcceleratorConfiguration >( xDocUICfgMgr->getShortCutManager(), UNO_QUERY );
+ m_xDocAcceleratorManager = xDocAccelCfg;
+ }
+ }
+ }
+ }
+ }
+
+ if ( !xModuleAccelCfg.is() )
+ {
+ Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier( m_xServiceManager->createInstance(
+ SERVICENAME_MODULEUICONFIGURATIONMANAGERSUPPLIER ),
+ UNO_QUERY );
+ try
+ {
+ Reference< XUIConfigurationManager > xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( m_aModuleIdentifier );
+ if ( xUICfgMgr.is() )
+ {
+ xModuleAccelCfg = Reference< XAcceleratorConfiguration >( xUICfgMgr->getShortCutManager(), UNO_QUERY );
+ m_xModuleAcceleratorManager = xModuleAccelCfg;
+ }
+ }
+ catch ( RuntimeException& )
+ {
+ throw;
+ }
+ catch ( Exception& )
+ {
+ }
+ }
+
+ if ( !xGlobalAccelCfg.is() )
+ {
+ xGlobalAccelCfg = Reference< XAcceleratorConfiguration >( m_xServiceManager->createInstance(
+ SERVICENAME_GLOBALACCELERATORCONFIGURATION ),
+ UNO_QUERY );
+ m_xGlobalAcceleratorManager = xGlobalAccelCfg;
+ }
+ }
+
+ bool bFound = false;
+
+ if ( m_xGlobalAcceleratorManager.is() )
+ bFound = impl_RetrieveShortcutsFromConfiguration( xGlobalAccelCfg, rCommandURL, rShortCut );
+ if ( !bFound && m_xModuleAcceleratorManager.is() )
+ bFound = impl_RetrieveShortcutsFromConfiguration( xModuleAccelCfg, rCommandURL, rShortCut );
+ if ( !bFound && m_xDocAcceleratorManager.is() )
+ impl_RetrieveShortcutsFromConfiguration( xGlobalAccelCfg, rCommandURL, rShortCut );
+
+ if( bFound )
+ return true;
+ }
+ return false;
+}
+
}
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 02402205bd1c..d0ddeccfab20 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -58,7 +58,6 @@
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/UIElementType.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
@@ -167,7 +166,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( ToolbarsMenuController
DEFINE_INIT_SERVICE ( ToolbarsMenuController, {} )
ToolbarsMenuController::ToolbarsMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager ),
+ svt::PopupMenuControllerBase( xServiceManager ),
m_aPropUIName( RTL_CONSTASCII_USTRINGPARAM( "UIName" )),
m_aPropResourceURL( RTL_CONSTASCII_USTRINGPARAM( "ResourceURL" )),
m_bModuleIdentified( sal_False ),
@@ -563,7 +562,7 @@ void SAL_CALL ToolbarsMenuController::disposing( const EventObject& ) throw ( Ru
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xDocCfgMgr.clear();
@@ -584,9 +583,9 @@ void SAL_CALL ToolbarsMenuController::statusChanged( const FeatureStateEvent& Ev
sal_Bool bSetCheckmark = sal_False;
sal_Bool bCheckmark = sal_False;
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
Reference< css::awt::XPopupMenu > xPopupMenu( m_xPopupMenu );
- aLock.unlock();
+ aLock.clear();
if ( xPopupMenu.is() )
{
@@ -633,13 +632,13 @@ void SAL_CALL ToolbarsMenuController::select( const css::awt::MenuEvent& rEvent
Reference< XFrame > xFrame;
Reference< XNameAccess > xPersistentWindowState;
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
xPopupMenu = m_xPopupMenu;
xServiceManager = m_xServiceManager;
xURLTransformer = m_xURLTransformer;
xFrame = m_xFrame;
xPersistentWindowState = m_xPersistentWindowState;
- aLock.unlock();
+ aLock.clear();
if ( xPopupMenu.is() )
{
@@ -792,7 +791,7 @@ void SAL_CALL ToolbarsMenuController::activate( const css::awt::MenuEvent& ) thr
Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
Reference< XURLTransformer > xURLTransformer( m_xURLTransformer );
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
fillPopupMenu( m_xPopupMenu );
aCmdVector = m_aCommandVector;
}
@@ -829,10 +828,9 @@ void SAL_CALL ToolbarsMenuController::activate( const css::awt::MenuEvent& ) thr
// XPopupMenuController
void SAL_CALL ToolbarsMenuController::setPopupMenu( const Reference< css::awt::XPopupMenu >& xPopupMenu ) throw ( RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
- if ( m_bDisposed )
- throw DisposedException();
+ throwIfDisposed();
if ( m_xFrame.is() && !m_xPopupMenu.is() )
{
@@ -848,11 +846,11 @@ void SAL_CALL ToolbarsMenuController::setPopupMenu( const Reference< css::awt::X
// XInitialization
void SAL_CALL ToolbarsMenuController::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
sal_Bool bInitalized( m_bInitialized );
if ( !bInitalized )
{
- PopupMenuControllerBase::initialize(aArguments);
+ svt::PopupMenuControllerBase::initialize(aArguments);
if ( m_bInitialized )
{
diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx
index 0e73b5616aa7..5a4fb7cddde4 100644
--- a/framework/source/uielement/toolbarwrapper.cxx
+++ b/framework/source/uielement/toolbarwrapper.cxx
@@ -53,6 +53,7 @@
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/ui/UIElementType.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// other includes
diff --git a/framework/uiconfig/startmodule/accelerator/en-GB/default.xml b/framework/uiconfig/startmodule/accelerator/en-GB/default.xml
deleted file mode 100644
index eefe2b0dde23..000000000000
--- a/framework/uiconfig/startmodule/accelerator/en-GB/default.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_Q" accel:mod1="true" xlink:href=".uno:Quit"/>
- <accel:item accel:code="KEY_N" accel:shift="true" accel:mod1="true" xlink:href=".uno:NewDoc"/>
- <accel:item accel:code="KEY_O" accel:mod1="true" xlink:href=".uno:Open"/>
- <accel:item accel:code="KEY_OPEN" xlink:href=".uno:Open"/>
- <accel:item accel:code="KEY_P" accel:mod1="true" xlink:href=".uno:Print"/>
- <accel:item accel:code="KEY_S" accel:mod1="true" xlink:href=".uno:Save"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" xlink:href=".uno:AddDirect"/>
- <accel:item accel:code="KEY_W" accel:mod1="true" xlink:href=".uno:CloseWin"/>
- <accel:item accel:code="KEY_F4" accel:mod1="true" xlink:href=".uno:CloseWin"/>
- <accel:item accel:code="KEY_X" accel:mod1="true" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_CUT" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_C" accel:mod1="true" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_INSERT" accel:mod1="true" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_COPY" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_V" accel:mod1="true" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_INSERT" accel:shift="true" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_PASTE" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_DELETE" xlink:href=".uno:Delete"/>
- <accel:item accel:code="KEY_A" accel:mod1="true" xlink:href=".uno:SelectAll"/>
- <accel:item accel:code="KEY_F" accel:mod1="true" xlink:href=".uno:SearchDialog"/>
- <accel:item accel:code="KEY_Q" accel:shift="true" accel:mod1="true" xlink:href=".uno:BasicBreak"/>
- <accel:item accel:code="KEY_F4" xlink:href=".uno:ViewDataSourceBrowser"/>
- <accel:item accel:code="KEY_F5" accel:mod1="true" xlink:href=".uno:GrabControlFocus"/>
- <accel:item accel:code="KEY_F7" accel:shift="true" accel:mod1="true" xlink:href=".uno:HangulHanjaConversion"/>
-</accel:acceleratorlist>
diff --git a/framework/uiconfig/startmodule/accelerator/en-US/default.xml b/framework/uiconfig/startmodule/accelerator/en-US/default.xml
deleted file mode 100644
index eefe2b0dde23..000000000000
--- a/framework/uiconfig/startmodule/accelerator/en-US/default.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_Q" accel:mod1="true" xlink:href=".uno:Quit"/>
- <accel:item accel:code="KEY_N" accel:shift="true" accel:mod1="true" xlink:href=".uno:NewDoc"/>
- <accel:item accel:code="KEY_O" accel:mod1="true" xlink:href=".uno:Open"/>
- <accel:item accel:code="KEY_OPEN" xlink:href=".uno:Open"/>
- <accel:item accel:code="KEY_P" accel:mod1="true" xlink:href=".uno:Print"/>
- <accel:item accel:code="KEY_S" accel:mod1="true" xlink:href=".uno:Save"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" xlink:href=".uno:AddDirect"/>
- <accel:item accel:code="KEY_W" accel:mod1="true" xlink:href=".uno:CloseWin"/>
- <accel:item accel:code="KEY_F4" accel:mod1="true" xlink:href=".uno:CloseWin"/>
- <accel:item accel:code="KEY_X" accel:mod1="true" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_CUT" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_C" accel:mod1="true" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_INSERT" accel:mod1="true" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_COPY" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_V" accel:mod1="true" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_INSERT" accel:shift="true" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_PASTE" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_DELETE" xlink:href=".uno:Delete"/>
- <accel:item accel:code="KEY_A" accel:mod1="true" xlink:href=".uno:SelectAll"/>
- <accel:item accel:code="KEY_F" accel:mod1="true" xlink:href=".uno:SearchDialog"/>
- <accel:item accel:code="KEY_Q" accel:shift="true" accel:mod1="true" xlink:href=".uno:BasicBreak"/>
- <accel:item accel:code="KEY_F4" xlink:href=".uno:ViewDataSourceBrowser"/>
- <accel:item accel:code="KEY_F5" accel:mod1="true" xlink:href=".uno:GrabControlFocus"/>
- <accel:item accel:code="KEY_F7" accel:shift="true" accel:mod1="true" xlink:href=".uno:HangulHanjaConversion"/>
-</accel:acceleratorlist>
diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk
index b1b7c691d29f..6a65b9986f1e 100644
--- a/framework/util/makefile.mk
+++ b/framework/util/makefile.mk
@@ -56,7 +56,6 @@ LIB1OBJFILES= \
$(SLO)$/rootitemcontainer.obj \
$(SLO)$/constitemcontainer.obj \
$(SLO)$/jobconst.obj \
- $(SLO)$/popupmenucontrollerbase.obj \
$(SLO)$/mischelper.obj \
$(SLO)$/propertysethelper.obj
@@ -114,6 +113,9 @@ SHL1STDLIBS= \
$(UNOTOOLSLIB) \
$(CPPUHELPERLIB) \
$(TOOLSLIB) \
+ $(SVTOOLLIB) \
+ $(SVLLIB) \
+ $(I18NISOLANGLIB) \
$(VOSLIB) \
$(VCLLIB) \
$(TKLIB) \
@@ -195,7 +197,8 @@ SHL3OBJS= $(SLO)$/mediatypedetectionhelper.obj\
$(SLO)$/dispatchrecorder.obj \
$(SLO)$/dispatchrecordersupplier.obj\
$(SLO)$/dispatchhelper.obj \
- $(SLO)$/popupmenudispatcher.obj \
+ $(SLO)$/popupmenudispatcher.obj \
+ $(SLO)$/popupmenucontroller.obj
SHL3STDLIBS= \
$(FWILIB) \
@@ -205,7 +208,6 @@ SHL3STDLIBS= \
$(SVTOOLLIB) \
$(UNOTOOLSLIB) \
$(TOOLSLIB) \
- $(I18NISOLANGLIB) \
$(COMPHELPERLIB) \
$(CPPUHELPERLIB) \
$(COMPHELPERLIB) \
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index 49ab2b485c13..2916b2ee6eec 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -27,6 +27,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_linguistic.hxx"
+
#include <tools/fsys.hxx>
#include <tools/stream.hxx>
#include <tools/urlobj.hxx>
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 969321ec3991..fe53bf344ac3 100644..100755
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -74,6 +74,12 @@ static const sal_Char* pVerStr5 = "WBSWG5";
static const sal_Char* pVerStr6 = "WBSWG6";
static const sal_Char* pVerOOo7 = "OOoUserDict1";
+static const INT16 DIC_VERSION_DONTKNOW = -1;
+static const INT16 DIC_VERSION_2 = 2;
+static const INT16 DIC_VERSION_5 = 5;
+static const INT16 DIC_VERSION_6 = 6;
+static const INT16 DIC_VERSION_7 = 7;
+
static sal_Bool getTag(const ByteString &rLine,
const sal_Char *pTagName, ByteString &rTagValue)
{
@@ -89,7 +95,7 @@ static sal_Bool getTag(const ByteString &rLine,
INT16 ReadDicVersion( SvStreamPtr &rpStream, USHORT &nLng, BOOL &bNeg )
{
// Sniff the header
- INT16 nDicVersion;
+ INT16 nDicVersion = DIC_VERSION_DONTKNOW;
sal_Char pMagicHeader[MAX_HEADER_LENGTH];
nLng = LANGUAGE_NONE;
@@ -107,7 +113,7 @@ INT16 ReadDicVersion( SvStreamPtr &rpStream, USHORT &nLng, BOOL &bNeg )
sal_Bool bSuccess;
ByteString aLine;
- nDicVersion = 7;
+ nDicVersion = DIC_VERSION_7;
// 1st skip magic / header line
rpStream->ReadLine(aLine);
@@ -160,17 +166,17 @@ INT16 ReadDicVersion( SvStreamPtr &rpStream, USHORT &nLng, BOOL &bNeg )
// Check version magic
if (0 == strcmp( pMagicHeader, pVerStr6 ))
- nDicVersion = 6;
+ nDicVersion = DIC_VERSION_6;
else if (0 == strcmp( pMagicHeader, pVerStr5 ))
- nDicVersion = 5;
+ nDicVersion = DIC_VERSION_5;
else if (0 == strcmp( pMagicHeader, pVerStr2 ))
- nDicVersion = 2;
+ nDicVersion = DIC_VERSION_2;
else
- nDicVersion = -1;
+ nDicVersion = DIC_VERSION_DONTKNOW;
- if (2 == nDicVersion ||
- 5 == nDicVersion ||
- 6 == nDicVersion)
+ if (DIC_VERSION_2 == nDicVersion ||
+ DIC_VERSION_5 == nDicVersion ||
+ DIC_VERSION_6 == nDicVersion)
{
// The language of the dictionary
*rpStream >> nLng;
@@ -203,7 +209,7 @@ DictionaryNeo::DictionaryNeo() :
nLanguage (LANGUAGE_NONE)
{
nCount = 0;
- nDicVersion = -1;
+ nDicVersion = DIC_VERSION_DONTKNOW;
bNeedEntries = FALSE;
bIsModified = bIsActive = FALSE;
bIsReadonly = FALSE;
@@ -220,7 +226,7 @@ DictionaryNeo::DictionaryNeo(const OUString &rName,
nLanguage (nLang)
{
nCount = 0;
- nDicVersion = -1;
+ nDicVersion = DIC_VERSION_DONTKNOW;
bNeedEntries = TRUE;
bIsModified = bIsActive = FALSE;
bIsReadonly = !bWriteable;
@@ -230,8 +236,8 @@ DictionaryNeo::DictionaryNeo(const OUString &rName,
BOOL bExists = FileExists( rMainURL );
if( !bExists )
{
- // save new dictionaries with in 6.0 Format (uses UTF8)
- nDicVersion = 6;
+ // save new dictionaries with in Format 7 (UTF8 plain text)
+ nDicVersion = DIC_VERSION_7;
//! create physical representation of an **empty** dictionary
//! that could be found by the dictionary-list implementation
@@ -303,13 +309,13 @@ ULONG DictionaryNeo::loadEntries(const OUString &rMainURL)
eDicType = bNegativ ? DictionaryType_NEGATIVE : DictionaryType_POSITIVE;
rtl_TextEncoding eEnc = osl_getThreadTextEncoding();
- if (nDicVersion >= 6)
+ if (nDicVersion >= DIC_VERSION_6)
eEnc = RTL_TEXTENCODING_UTF8;
nCount = 0;
- if (6 == nDicVersion ||
- 5 == nDicVersion ||
- 2 == nDicVersion)
+ if (DIC_VERSION_6 == nDicVersion ||
+ DIC_VERSION_5 == nDicVersion ||
+ DIC_VERSION_2 == nDicVersion)
{
USHORT nLen = 0;
sal_Char aWordBuf[ BUFSIZE ];
@@ -363,7 +369,7 @@ ULONG DictionaryNeo::loadEntries(const OUString &rMainURL)
*(aWordBuf + nLen) = 0;
}
}
- else if (7 == nDicVersion)
+ else if (DIC_VERSION_7 == nDicVersion)
{
sal_Bool bSuccess;
ByteString aLine;
@@ -436,10 +442,10 @@ ULONG DictionaryNeo::saveEntries(const OUString &rURL)
ULONG nErr = sal::static_int_cast< ULONG >(-1);
rtl_TextEncoding eEnc = osl_getThreadTextEncoding();
- if (nDicVersion >= 6)
+ if (nDicVersion >= DIC_VERSION_6)
eEnc = RTL_TEXTENCODING_UTF8;
- if (nDicVersion == 7)
+ if (nDicVersion == DIC_VERSION_7)
{
pStream->WriteLine(ByteString (pVerOOo7));
if (0 != (nErr = pStream->GetError()))
@@ -482,7 +488,7 @@ ULONG DictionaryNeo::saveEntries(const OUString &rURL)
// write version
const sal_Char *pVerStr = NULL;
- if (6 == nDicVersion)
+ if (DIC_VERSION_6 == nDicVersion)
pVerStr = pVerStr6;
else
pVerStr = eDicType == DictionaryType_POSITIVE ? pVerStr2 : pVerStr5;
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index be127e0999af..817dbeb311ca 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -28,6 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_linguistic.hxx"
+#include <cppuhelper/factory.hxx>
+#include <i18npool/mslangid.hxx>
#include <osl/file.hxx>
#include <tools/fsys.hxx>
#include <tools/stream.hxx>
@@ -52,6 +54,11 @@
#include "dicimp.hxx"
#include "lngopt.hxx"
+#include "defs.hxx"
+#include "dlistimp.hxx"
+#include "dicimp.hxx"
+#include "lngopt.hxx"
+
//using namespace utl;
using namespace osl;
using namespace rtl;
diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index 243079c3abf1..5c735744104b 100755..100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -67,7 +67,7 @@
</node>
<node oor:name="F5_MOD1" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
- <value xml:lang="en-US">.uno:GrabControlFocus</value>
+ <value xml:lang="en-US">.uno:ToggleControlFocus</value>
</prop>
</node>
<node oor:name="F7_SHIFT_MOD1" oor:op="replace">
@@ -212,7 +212,7 @@
</node>
<node oor:name="F5_MOD1" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
- <value xml:lang="en-US">.uno:GrabControlFocus</value>
+ <value xml:lang="en-US">.uno:ToggleControlFocus</value>
</prop>
</node>
<node oor:name="F7_SHIFT_MOD1" oor:op="replace">
@@ -535,7 +535,7 @@
</node>
<node oor:name="F7_MOD1" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
- <value xml:lang="en-US">.uno:Thesaurus</value>
+ <value xml:lang="en-US">.uno:ThesaurusDialog</value>
</prop>
</node>
<node oor:name="F7_SHIFT" oor:op="replace">
@@ -568,6 +568,11 @@
<value xml:lang="en-US">.uno:CalculateHard</value>
</prop>
</node>
+ <node oor:name="F_MOD1_MOD2" oor:op="replace">
+ <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+ <value xml:lang="en-US">vnd.sun.star.findbar:FocusToFindbar</value>
+ </prop>
+ </node>
<node oor:name="F_SHIFT_MOD1" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="de">.uno:Bold</value>
@@ -1077,7 +1082,7 @@
</node>
<node oor:name="F7_MOD1" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
- <value xml:lang="en-US">.uno:Thesaurus</value>
+ <value xml:lang="en-US">.uno:ThesaurusDialog</value>
</prop>
</node>
<node oor:name="F8" oor:op="replace">
@@ -1090,6 +1095,11 @@
<value xml:lang="en-US">.uno:TextFitToSize</value>
</prop>
</node>
+ <node oor:name="F_MOD1_MOD2" oor:op="replace">
+ <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+ <value xml:lang="en-US">vnd.sun.star.findbar:FocusToFindbar</value>
+ </prop>
+ </node>
<node oor:name="F_SHIFT_MOD1" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="de">.uno:Bold</value>
@@ -1566,6 +1576,11 @@
<value xml:lang="en-US">.uno:UpdateInputFields</value>
</prop>
</node>
+ <node oor:name="F_MOD1_MOD2" oor:op="replace">
+ <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+ <value xml:lang="en-US">vnd.sun.star.findbar:FocusToFindbar</value>
+ </prop>
+ </node>
<node oor:name="F_SHIFT_MOD1" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="de">.uno:Bold</value>
@@ -2041,7 +2056,7 @@
</node>
<node oor:name="F7_MOD1" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
- <value xml:lang="en-US">.uno:Thesaurus</value>
+ <value xml:lang="en-US">.uno:ThesaurusDialog</value>
</prop>
</node>
<node oor:name="F8" oor:op="replace">
@@ -2054,6 +2069,11 @@
<value xml:lang="en-US">.uno:TextFitToSize</value>
</prop>
</node>
+ <node oor:name="F_MOD1_MOD2" oor:op="replace">
+ <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+ <value xml:lang="en-US">vnd.sun.star.findbar:FocusToFindbar</value>
+ </prop>
+ </node>
<node oor:name="F_SHIFT_MOD1" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="de">.uno:Bold</value>
@@ -2597,6 +2617,11 @@
<value xml:lang="en-US">.uno:UpdateInputFields</value>
</prop>
</node>
+ <node oor:name="F_MOD1_MOD2" oor:op="replace">
+ <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+ <value xml:lang="en-US">vnd.sun.star.findbar:FocusToFindbar</value>
+ </prop>
+ </node>
<node oor:name="F_SHIFT_MOD1" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="de">.uno:Bold</value>
@@ -4442,6 +4467,11 @@
<value xml:lang="en-US">.uno:UpdateInputFields</value>
</prop>
</node>
+ <node oor:name="F_MOD1_MOD2" oor:op="replace">
+ <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+ <value xml:lang="en-US">vnd.sun.star.findbar:FocusToFindbar</value>
+ </prop>
+ </node>
<node oor:name="F_SHIFT_MOD1" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="de">.uno:Bold</value>
@@ -5052,6 +5082,11 @@
<value xml:lang="en-US">.uno:UpdateInputFields</value>
</prop>
</node>
+ <node oor:name="F_MOD1_MOD2" oor:op="replace">
+ <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+ <value xml:lang="en-US">vnd.sun.star.findbar:FocusToFindbar</value>
+ </prop>
+ </node>
<node oor:name="F_SHIFT_MOD1" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="de">.uno:Bold</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/Impress.xcu b/officecfg/registry/data/org/openoffice/Office/Impress.xcu
index 8db415e7c57b..353cecfd51c2 100644
--- a/officecfg/registry/data/org/openoffice/Office/Impress.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Impress.xcu
@@ -123,27 +123,27 @@
<node oor:name="ResourceList">
<node oor:name="R0" oor:op="replace">
<prop oor:name="URL">
- <value>private:resource/taskpanel/MasterPages</value>
+ <value>private:resource/toolpanel/DrawingFramework/MasterPages</value>
</prop>
</node>
<node oor:name="R1" oor:op="replace">
<prop oor:name="URL">
- <value>private:resource/taskpanel/Layouts</value>
+ <value>private:resource/toolpanel/DrawingFramework/Layouts</value>
</prop>
</node>
<node oor:name="R2" oor:op="replace">
<prop oor:name="URL">
- <value>private:resource/taskpanel/TableDesign</value>
+ <value>private:resource/toolpanel/DrawingFramework/TableDesign</value>
</prop>
</node>
<node oor:name="R3" oor:op="replace">
<prop oor:name="URL">
- <value>private:resource/taskpanel/CustomAnimations</value>
+ <value>private:resource/toolpanel/DrawingFramework/CustomAnimations</value>
</prop>
</node>
<node oor:name="R4" oor:op="replace">
<prop oor:name="URL">
- <value>private:resource/taskpanel/SlideTransitions</value>
+ <value>private:resource/toolpanel/DrawingFramework/SlideTransitions</value>
</prop>
</node>
</node>
diff --git a/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu b/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu
index 8ef8fcd259e0..0d5dd5e3b499 100644
--- a/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu
@@ -63,5 +63,10 @@
<value>vnd.sun.star.popup:*</value>
</prop>
</node>
+ <node oor:name="com.sun.star.comp.svx.FindbarDispatcher" oor:op="replace">
+ <prop oor:name="Protocols">
+ <value>vnd.sun.star.findbar:*</value>
+ </prop>
+ </node>
</node>
</oor:component-data>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
index c5d32679b108..a427a0caf052 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
@@ -293,6 +293,26 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="private:resource/toolbar/findbar" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>1,0</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Find</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
<node oor:name="private:resource/toolbar/textobjectbar" oor:op="replace">
<prop oor:name="DockPos" oor:type="xs:string">
<value>0,1</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
index 76e6a29003d0..0054c7af24f1 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
@@ -218,6 +218,94 @@
<value>com.sun.star.svx.FontHeightToolBoxController</value>
</prop>
</node>
+ <node oor:name="AssignLayout" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:AssignLayout</value>
+ </prop>
+ <prop oor:name="Module">
+ <value>com.sun.star.presentation.PresentationDocument</value>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.sd.SlideLayoutController</value>
+ </prop>
+ </node>
+ <node oor:name="InsertPage" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:InsertPage</value>
+ </prop>
+ <prop oor:name="Module">
+ <value>com.sun.star.presentation.PresentationDocument</value>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.sd.InsertSlideController</value>
+ </prop>
+ </node>
+ <node oor:name="ExtrusionDirectionFloater" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:ExtrusionDirectionFloater</value>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.svx.ExtrusionDirectionController</value>
+ </prop>
+ </node>
+ <node oor:name="ExtrusionDepthController" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:ExtrusionDepthFloater</value>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.svx.ExtrusionDepthController</value>
+ </prop>
+ </node>
+ <node oor:name="ExtrusionLightingFloater" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:ExtrusionLightingFloater</value>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.svx.ExtrusionLightingController</value>
+ </prop>
+ </node>
+ <node oor:name="ExtrusionSurfaceFloater" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:ExtrusionSurfaceFloater</value>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.svx.ExtrusionSurfaceController</value>
+ </prop>
+ </node>
+ <node oor:name="FontworkAlignmentFloater" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:FontworkAlignmentFloater</value>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.svx.FontworkAlignmentController</value>
+ </prop>
+ </node>
+ <node oor:name="FontworkCharacterSpacingFloater" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:FontworkCharacterSpacingFloater</value>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.svx.FontworkCharacterSpacingController</value>
+ </prop>
+ </node>
<node oor:name="c3" oor:op="replace">
<prop oor:name="Command">
<value>.uno:ChartElementSelector</value>
@@ -295,6 +383,39 @@
<value>com.sun.star.comp.chart2.ShapeToolbarController</value>
</prop>
</node>
+ <node oor:name="com.sun.star.svx.FindTextToolboxController" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:FindText</value>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.svx.FindTextToolboxController</value>
+ </prop>
+ </node>
+ <node oor:name="com.sun.star.svx.DownSearchToolboxController" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:DownSearch</value>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.svx.DownSearchToolboxController</value>
+ </prop>
+ </node>
+ <node oor:name="com.sun.star.svx.UpSearchToolboxController" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:UpSearch</value>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.svx.UpSearchToolboxController</value>
+ </prop>
+ </node>
</node>
<node oor:name="StatusBar">
<node oor:name="c1" oor:op="replace">
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index b4a2fab23fcd..7138636549d6 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -1,1812 +1,2061 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE oor:component-data SYSTEM "../../../../../component-update.dtd">
<oor:component-data oor:name="DrawImpressCommands" oor:package="org.openoffice.Office.UI" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <node oor:name="UserInterface">
- <node oor:name="Commands">
- <node oor:name=".uno:Polygon" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Polygon, filled</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ColorView" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Black &amp; White View</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:RenamePage" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Rename Slide</value>
- </prop>
- </node>
- <node oor:name=".uno:RenameLayer" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Rename</value>
- </prop>
- </node>
- <node oor:name=".uno:Presentation" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Slide Show</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:RehearseTimings" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Rehearse Timings</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:Dia" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">SlideTransition</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ShowSlide" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Sho~w Slide</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:HideSlide" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Hide Slide</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:TextAttributes" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Te~xt...</value>
- </prop>
- </node>
- <node oor:name=".uno:PagesPerRow" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Slides Per Row</value>
- </prop>
- </node>
- <node oor:name=".uno:TextFitToSizeTool" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Fit Text to Frame</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:VerticalTextFitToSizeTool" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Fit Vertical Text to Frame</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:Objects3DToolbox" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">3D Objects</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:Cube" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Cube</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:Sphere" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Sphere</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:Cylinder" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Cylinder</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:Cone" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Cone</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:Cyramid" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Pyramid</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:GlueEditMode" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Glue Points</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:GlueInsertPoint" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Insert Glue Point</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:GluePercent" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Glue Point Relative</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>9</value>
- </prop>
- </node>
- <node oor:name=".uno:GlueEscapeDirection" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Exit Direction</value>
- </prop>
- </node>
- <node oor:name=".uno:GlueHorzAlignCenter" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Glue Point Horizontal Center</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:GlueHorzAlignLeft" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Glue Point Horizontal Left</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:GlueHorzAlignRight" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Glue Point Horizontal Right</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:GlueVertAlignCenter" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Glue Point Vertical Center</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:GlueVertAlignTop" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Glue Point Vertical Top</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:GlueVertAlignBottom" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Glue Point Vertical Bottom</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:Shell3D" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Shell</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:Torus" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Torus</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:HalfSphere" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Half-Sphere</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:GlueEscapeDirectionLeft" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Exit Direction Left</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:GlueEscapeDirectionRight" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Exit Direction Right</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:GlueEscapeDirectionTop" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Exit Direction Top</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:GlueEscapeDirectionBottom" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Exit Direction Bottom</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:InsertToolbox" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Insert</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:Morphing" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Cross-fading...</value>
- </prop>
- </node>
- <node oor:name=".uno:MeasureAttributes" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Dimen~sions...</value>
- </prop>
- </node>
- <node oor:name=".uno:GridFront" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Grid to ~Front</value>
- </prop>
- </node>
- <node oor:name=".uno:HelplinesVisible" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Display Guides</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:HelplinesFront" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Guides to ~Front</value>
- </prop>
- </node>
- <node oor:name=".uno:BeforeObject" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">In Front of ~Object</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:PreviewWindow" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Pre~view</value>
- </prop>
- </node>
- <node oor:name=".uno:CustomAnimation" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Custom Animation...</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:CustomAnimationSchemes" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Animation Schemes...</value>
- </prop>
- </node>
- <node oor:name=".uno:SlideChangeWindow" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Slide Transition...</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorAttributes" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Connector...</value>
- </prop>
- </node>
- <node oor:name=".uno:PresentationDialog" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">S~lide Show Settings...</value>
- </prop>
- </node>
- <node oor:name=".uno:Hyphenation" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Hyphenation</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>9</value>
- </prop>
- </node>
- <node oor:name=".uno:NewRouting" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Reset Routing</value>
- </prop>
- </node>
- <node oor:name=".uno:DuplicatePage" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">D~uplicate Slide</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ExpandPage" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">E~xpand Slide</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:SummaryPage" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Su~mmary Slide</value>
- </prop>
- </node>
- <node oor:name=".uno:LeaveAllGroups" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Exit All Groups</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ParaspaceIncrease" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Increase Spacing</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ParaspaceDecrease" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Decrease Spacing</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:SlideMasterPage" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Slide Master</value>
- </prop>
- </node>
- <node oor:name=".uno:HandoutMasterPage" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Handout Master</value>
- </prop>
- </node>
- <node oor:name=".uno:NotesMasterPage" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Notes Master</value>
- </prop>
- </node>
- <node oor:name=".uno:TitleMasterPage" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Title Slide Master</value>
- </prop>
- </node>
- <node oor:name=".uno:InsertPageQuick" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Insert Slide Direct</value>
- </prop>
- </node>
- <node oor:name=".uno:InsertDateFieldVar" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Dat~e (variable)</value>
- </prop>
- </node>
- <node oor:name=".uno:InsertDateFieldFix" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Date (fixed)</value>
- </prop>
- </node>
- <node oor:name=".uno:InsertTimeFieldVar" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">T~ime (variable)</value>
- </prop>
- </node>
- <node oor:name=".uno:InsertTimeFieldFix" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Time (fixed)</value>
- </prop>
- </node>
- <node oor:name=".uno:InsertPageField" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Page Number</value>
- </prop>
- </node>
+ <node oor:name="UserInterface">
+ <node oor:name="Commands">
+ <node oor:name=".uno:Polygon" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Polygon, filled</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ColorView" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Black &amp; White View</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:RenamePage" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Rename Slide</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:RenameLayer" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Rename</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Presentation" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Slide Show</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:RehearseTimings" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Rehearse Timings</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Dia" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">SlideTransition</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ShowSlide" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Sho~w Slide</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:HideSlide" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Hide Slide</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:TextAttributes" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Te~xt...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:PagesPerRow" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Slides Per Row</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:TextFitToSizeTool" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Fit Text to Frame</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:VerticalTextFitToSizeTool" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Fit Vertical Text to Frame</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Objects3DToolbox" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">3D Objects</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Cube" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Cube</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Sphere" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Sphere</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Cylinder" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Cylinder</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Cone" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Cone</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Cyramid" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Pyramid</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GlueEditMode" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Glue Points</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GlueInsertPoint" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Insert Glue Point</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GluePercent" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Glue Point Relative</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GlueEscapeDirection" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Exit Direction</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GlueHorzAlignCenter" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Glue Point Horizontal Center</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GlueHorzAlignLeft" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Glue Point Horizontal Left</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GlueHorzAlignRight" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Glue Point Horizontal Right</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GlueVertAlignCenter" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Glue Point Vertical Center</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GlueVertAlignTop" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Glue Point Vertical Top</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GlueVertAlignBottom" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Glue Point Vertical Bottom</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Shell3D" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Shell</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Torus" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Torus</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:HalfSphere" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Half-Sphere</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GlueEscapeDirectionLeft" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Exit Direction Left</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GlueEscapeDirectionRight" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Exit Direction Right</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GlueEscapeDirectionTop" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Exit Direction Top</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GlueEscapeDirectionBottom" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Exit Direction Bottom</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertToolbox" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Insert</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Morphing" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Cross-fading...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:MeasureAttributes" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Dimen~sions...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GridFront" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Grid to ~Front</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:HelplinesVisible" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Display Guides</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:HelplinesFront" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Guides to ~Front</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:BeforeObject" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">In Front of ~Object</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:PreviewWindow" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Pre~view</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:CustomAnimation" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Custom Animation...</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:CustomAnimationSchemes" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Animation Schemes...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SlideChangeWindow" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Slide Transition...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorAttributes" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Connector...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:PresentationDialog" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">S~lide Show Settings...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Hyphenation" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Hyphenation</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:NewRouting" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Reset Routing</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DuplicatePage" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">D~uplicate Slide</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ExpandPage" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">E~xpand Slide</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SummaryPage" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Su~mmary Slide</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:LeaveAllGroups" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Exit All Groups</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ParaspaceIncrease" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Increase Spacing</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ParaspaceDecrease" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Decrease Spacing</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SlideMasterPage" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Slide Master</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:HandoutMasterPage" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Handout Master</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:NotesMasterPage" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Notes Master</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:TitleMasterPage" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Title Slide Master</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertPageQuick" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Insert Slide Direct</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertDateFieldVar" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Dat~e (variable)</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertDateFieldFix" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Date (fixed)</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertTimeFieldVar" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">T~ime (variable)</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertTimeFieldFix" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Time (fixed)</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertPageField" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Page Number</value>
+ </prop>
+ </node>
<node oor:name=".uno:InsertPagesField" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
+
<value xml:lang="en-US">Page ~Count</value>
</prop>
</node>
<node oor:name=".uno:ModifyField" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">F~ields...</value>
- </prop>
- </node>
- <node oor:name=".uno:InsertFileField" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~File Name</value>
- </prop>
- </node>
- <node oor:name=".uno:InsertAuthorField" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Author</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:CustomShowDialog" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Custom Slide Show...</value>
- </prop>
- </node>
- <node oor:name=".uno:OutputQualityColor" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Color</value>
- </prop>
- </node>
- <node oor:name=".uno:OutputQualityGrayscale" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Grayscale</value>
- </prop>
- </node>
- <node oor:name=".uno:OutputQualityBlackWhite" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Black and White</value>
- </prop>
- </node>
- <node oor:name=".uno:PreviewQualityColor" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Color</value>
- </prop>
- </node>
- <node oor:name=".uno:PreviewQualityGrayscale" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Grayscale</value>
- </prop>
- </node>
- <node oor:name=".uno:PreviewQualityBlackWhite" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Black and White</value>
- </prop>
- </node>
- <node oor:name=".uno:ConvertInto3D" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">To 3~D</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConvertInto3DLatheFast" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">To 3D ~Rotation Object</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConvertIntoBitmap" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">To ~Bitmap</value>
- </prop>
- </node>
- <node oor:name=".uno:ConvertIntoMetaFile" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">To ~Metafile</value>
- </prop>
- </node>
- <node oor:name=".uno:PackAndGo" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Pack</value>
- </prop>
- </node>
- <node oor:name=".uno:convert_to_contour" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">To C~ontour</value>
- </prop>
- </node>
- <node oor:name=".uno:EditHyperlink" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">H~yperlink...</value>
- </prop>
- </node>
- <node oor:name=".uno:PageSetup" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Page...</value>
- </prop>
- </node>
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">F~ields...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertFileField" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~File Name</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertAuthorField" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Author</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:CustomShowDialog" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Custom Slide Show...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:OutputQualityColor" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Color</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:OutputQualityGrayscale" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Grayscale</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:OutputQualityBlackWhite" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Black and White</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:PreviewQualityColor" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Color</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:PreviewQualityGrayscale" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Grayscale</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:PreviewQualityBlackWhite" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Black and White</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConvertInto3D" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">To 3~D</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConvertInto3DLatheFast" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">To 3D ~Rotation Object</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConvertIntoBitmap" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">To ~Bitmap</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConvertIntoMetaFile" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">To ~Metafile</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:PackAndGo" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Pack</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:convert_to_contour" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">To C~ontour</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:EditHyperlink" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">H~yperlink...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:PageSetup" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Page...</value>
+ </prop>
+ </node>
<node oor:name=".uno:PasteSpecial" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Paste ~Special...</value>
- </prop>
- </node>
- <node oor:name=".uno:CopyObjects" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Duplicat~e...</value>
- </prop>
- </node>
- <node oor:name=".uno:ManageLinks" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Lin~ks...</value>
- </prop>
- </node>
- <node oor:name=".uno:ConvertInto3DLathe" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">In 3D Rotation Object</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:DrawingMode" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Drawing View</value>
- </prop>
- </node>
- <node oor:name=".uno:OutlineMode" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Outline</value>
- </prop>
- </node>
- <node oor:name=".uno:OutputQualityContrast" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~High Contrast</value>
- </prop>
- </node>
- <node oor:name=".uno:DiaMode" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Sli~de Sorter</value>
- </prop>
- </node>
- <node oor:name=".uno:PreviewQualityContrast" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~High Contrast</value>
- </prop>
- </node>
- <node oor:name=".uno:InsertPage" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Slid~e</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ImportFromFile" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~File...</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ZoomPanning" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Shift</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:PixelMode" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Pixel Mode</value>
- </prop>
- </node>
- <node oor:name=".uno:ObjectPosition" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Arrange</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:Combine" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Comb~ine</value>
- </prop>
- </node>
- <node oor:name=".uno:ObjectTitleDescription" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Description...</value>
- </prop>
- </node>
- <node oor:name=".uno:NameGroup" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Name...</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorToolbox" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Connector</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:Forward" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Bring ~Forward</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:Backward" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Send Back~ward</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:MirrorVert" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Vertically</value>
- </prop>
- </node>
- <node oor:name=".uno:MirrorHorz" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Horizontally</value>
- </prop>
- </node>
- <node oor:name=".uno:ChangeBezier" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">To ~Curve</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ChangePolygon" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">To ~Polygon</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:CapturePoint" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Insert Snap Point/Line...</value>
- </prop>
- </node>
- <node oor:name=".uno:ShowRuler" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Ruler</value>
- </prop>
- </node>
- <node oor:name=".uno:InsertLayer" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Layer...</value>
- </prop>
- </node>
- <node oor:name=".uno:ModifyPage" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Slide ~Layout...</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ModifyLayer" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Layer...</value>
- </prop>
- </node>
- <node oor:name=".uno:PageMode" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Normal</value>
- </prop>
- </node>
- <node oor:name=".uno:LayerMode" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Layer</value>
- </prop>
- </node>
- <node oor:name=".uno:MeasureLine" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Dimension Line</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:MasterPage" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Master</value>
- </prop>
- </node>
- <node oor:name=".uno:DiaEffect" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Slide Effects</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:DiaSpeed" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Transition Speed</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:DiaAuto" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">AutoTransition</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:DiaTime" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Time</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:Connector" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Connector</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ActionMode" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Allow Interaction</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:AnimationObjects" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Animated Image...</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:AnimationEffects" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Interaction...</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:PresentationLayout" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Slide D~esign...</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:NotesMode" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Notes ~Page</value>
- </prop>
- </node>
- <node oor:name=".uno:HandoutMode" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">H~andout Page</value>
- </prop>
- </node>
- <node oor:name=".uno:DeletePage" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">D~elete Slide</value>
- </prop>
- </node>
- <node oor:name=".uno:DeleteLayer" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Delete</value>
- </prop>
- </node>
- <node oor:name=".uno:Dismantle" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Split</value>
- </prop>
- </node>
- <node oor:name=".uno:PageStatus" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Slide/Layer</value>
- </prop>
- </node>
- <node oor:name=".uno:LayoutStatus" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Layout</value>
- </prop>
- </node>
- <node oor:name=".uno:CrookRotate" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Set in Circle (perspective)</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:CrookSlant" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Set to circle (slant)</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:CrookStretch" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Set in Circle (distort)</value>
- </prop>
- </node>
- <node oor:name=".uno:Connect" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">C~onnect</value>
- </prop>
- </node>
- <node oor:name=".uno:Break" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Break</value>
- </prop>
- </node>
- <node oor:name=".uno:AdvancedMode" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Effects</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:InteractiveTransparence" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Transparency</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:InteractiveGradient" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Gradient</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:Shear" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Distort</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:BehindObject" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Be~hind Object</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ReverseOrder" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Reverse</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorArrowStart" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Connector Starts with Arrow</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorArrowEnd" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Connector Ends with Arrow</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorArrows" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Connector with Arrows</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorCircleStart" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Connector Starts with Circle</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorCircleEnd" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Connector Ends with Circle</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorCircles" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Connector with Circles</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:TextToolbox" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Text</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorLine" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Straight Connector</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:RectangleToolbox" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Rectangle</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorLineArrowStart" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Straight Connector starts with Arrow</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:EllipseToolbox" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Ellipse</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorLineArrowEnd" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Straight Connector ends with Arrow</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:LineToolbox" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Curve</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorLineArrows" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Straight Connector with Arrows</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorLineCircleStart" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Straight Connector starts with Circle</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorLineCircleEnd" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Straight Connector ends with Circle</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorLineCircles" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Straight Connector with Circles</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorCurve" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Curved Connector</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorCurveArrowStart" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Curved Connector Starts with Arrow</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorCurveArrowEnd" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Curved Connector Ends with Arrow</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorCurveArrows" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Curved Connector with Arrows</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorCurveCircleStart" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Curved Connector Starts with Circle</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorCurveCircleEnd" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Curved Connector Ends with Circle</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorCurveCircles" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Curved Connector with Circles</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorLines" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Line Connector</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorLinesArrowStart" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Line Connector Starts with Arrow</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorLinesArrowEnd" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Line Connector Ends with Arrow</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorLinesArrows" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Line Connector with Arrows</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorLinesCircleStart" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Line Connector Starts with Circle</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorLinesCircleEnd" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Line Connector Ends with Circle</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConnectorLinesCircles" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Line Connector with Circles</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:GraphicDraft" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Picture Placeholders</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:FillDraft" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Contour Mode</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:TextDraft" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Text Placeholders</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:LineDraft" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Line Contour Only</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:HandlesDraft" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Simple Handles</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:SolidCreate" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Modify Object with Attributes</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:HelplinesUse" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Snap to Guides</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:SnapBorder" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Snap to Page Margins</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:SnapFrame" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Snap to Object Border</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:SnapPoints" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Snap to Object Points</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:QuickEdit" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Allow Quick Editing</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:PickThrough" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Select Text Area Only</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ConvertTo1BitThreshold" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">1 Bit Threshold</value>
- </prop>
- </node>
- <node oor:name=".uno:ConvertTo1BitMatrix" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">1 Bit Dithered</value>
- </prop>
- </node>
- <node oor:name=".uno:ConvertTo4BitGrays" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">4 Bit grayscales</value>
- </prop>
- </node>
- <node oor:name=".uno:ConvertTo4BitColors" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">4 Bit color palette</value>
- </prop>
- </node>
- <node oor:name=".uno:ConvertTo8BitGrays" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">8 Bit Grayscales</value>
- </prop>
- </node>
- <node oor:name=".uno:ConvertTo8BitColors" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">8 Bit color palette</value>
- </prop>
- </node>
- <node oor:name=".uno:ConvertToTrueColor" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">24 Bit True Color</value>
- </prop>
- </node>
- <node oor:name=".uno:BigHandles" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Large Handles</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:DoubleClickTextEdit" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Double-click to edit Text</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ClickChangeRotation" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Rotation Mode after Clicking Object</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:ArrowsToolbox" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Lines and Arrows</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:LineArrowStart" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Line Starts with Arrow</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:LineArrowEnd" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Line Ends with Arrow</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:LineArrows" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Line with Arrows</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:LineArrowCircle" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Line with Arrow/Circle</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:LineCircleArrow" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Line with Circle/Arrow</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:LineArrowSquare" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Line with Arrow/Square</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:LineSquareArrow" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Line with Square/Arrow</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:Mirror" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Flip</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:InsertMasterPage" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">New Master</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:DeleteMasterPage" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Delete Master</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:RenameMasterPage" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Rename Master</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:CloseMasterView" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Close Master View</value>
- </prop>
- </node>
- <node oor:name=".uno:SendMailDocAsMS" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">E-mail as ~Microsoft PowerPoint Presentation...</value>
- </prop>
- </node>
- <node oor:name=".uno:SendMailDocAsOOo" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">E-mail as ~OpenDocument Presentation...</value>
- </prop>
- </node>
- </node>
- <node oor:name="Popups">
- <node oor:name=".uno:ModifyMenu" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Modify</value>
- </prop>
- </node>
- <node oor:name=".uno:WorkspaceMenu" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Wor~kspace</value>
- </prop>
- </node>
- <node oor:name=".uno:MirrorMenu" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Flip</value>
- </prop>
- </node>
- <node oor:name=".uno:PreviewDisplayQualityMenu" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Pre~view Mode</value>
- </prop>
- </node>
- <node oor:name=".uno:LayerMenu" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">La~yer</value>
- </prop>
- </node>
- <node oor:name=".uno:GridMenu" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Gr~id</value>
- </prop>
- </node>
- <node oor:name=".uno:ConvertMenu" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Convert</value>
- </prop>
- </node>
- <node oor:name=".uno:ArrangeMenu" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Arrange</value>
- </prop>
- </node>
- <node oor:name=".uno:DisplayQualityMenu" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Color/Grayscale</value>
- </prop>
- </node>
- <node oor:name=".uno:SlideShowMenu" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Slide Show</value>
- </prop>
- </node>
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Paste ~Special...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:CopyObjects" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Duplicat~e...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ManageLinks" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Lin~ks...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConvertInto3DLathe" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">In 3D Rotation Object</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DrawingMode" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Drawing View</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:OutlineMode" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Outline</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:OutputQualityContrast" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~High Contrast</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DiaMode" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Sli~de Sorter</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:PreviewQualityContrast" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~High Contrast</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertPage" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Slid~e</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ImportFromFile" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~File...</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ZoomPanning" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Shift</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:PixelMode" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Pixel Mode</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ObjectPosition" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Arrange</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Combine" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Comb~ine</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ObjectTitleDescription" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Description...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:NameGroup" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Name...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorToolbox" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Connector</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Forward" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Bring ~Forward</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Backward" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Send Back~ward</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:MirrorVert" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Vertically</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:MirrorHorz" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Horizontally</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ChangeBezier" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">To ~Curve</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ChangePolygon" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">To ~Polygon</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:CapturePoint" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Insert Snap Point/Line...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ShowRuler" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Ruler</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertLayer" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Layer...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ModifyPage" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Slide ~Layout...</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ModifyLayer" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Layer...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:PageMode" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Normal</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:LayerMode" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Layer</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:MeasureLine" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Dimension Line</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:MasterPage" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Master</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DiaEffect" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Slide Effects</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DiaSpeed" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Transition Speed</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DiaAuto" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">AutoTransition</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DiaTime" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Time</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Connector" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Connector</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ActionMode" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Allow Interaction</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:AnimationObjects" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Animated Image...</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:AnimationEffects" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Interaction...</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:PresentationLayout" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Slide D~esign...</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:AssignLayout" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Slide Layout</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:NotesMode" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Notes ~Page</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:HandoutMode" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">H~andout Page</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DeletePage" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">D~elete Slide</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DeleteLayer" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Delete</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Dismantle" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Split</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:PageStatus" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Slide/Layer</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:LayoutStatus" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Layout</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:CrookRotate" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Set in Circle (perspective)</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:CrookSlant" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Set to circle (slant)</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:CrookStretch" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Set in Circle (distort)</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Connect" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">C~onnect</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Break" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Break</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:AdvancedMode" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Effects</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InteractiveTransparence" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Transparency</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InteractiveGradient" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Gradient</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Shear" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Distort</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:BehindObject" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Be~hind Object</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ReverseOrder" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Reverse</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorArrowStart" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Connector Starts with Arrow</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorArrowEnd" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Connector Ends with Arrow</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorArrows" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Connector with Arrows</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorCircleStart" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Connector Starts with Circle</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorCircleEnd" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Connector Ends with Circle</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorCircles" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Connector with Circles</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:TextToolbox" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Text</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorLine" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Straight Connector</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:RectangleToolbox" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Rectangle</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorLineArrowStart" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Straight Connector starts with Arrow</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:EllipseToolbox" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Ellipse</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorLineArrowEnd" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Straight Connector ends with Arrow</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:LineToolbox" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Curve</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorLineArrows" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Straight Connector with Arrows</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorLineCircleStart" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Straight Connector starts with Circle</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorLineCircleEnd" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Straight Connector ends with Circle</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorLineCircles" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Straight Connector with Circles</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorCurve" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Curved Connector</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorCurveArrowStart" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Curved Connector Starts with Arrow</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorCurveArrowEnd" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Curved Connector Ends with Arrow</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorCurveArrows" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Curved Connector with Arrows</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorCurveCircleStart" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Curved Connector Starts with Circle</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorCurveCircleEnd" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Curved Connector Ends with Circle</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorCurveCircles" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Curved Connector with Circles</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorLines" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Line Connector</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorLinesArrowStart" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Line Connector Starts with Arrow</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorLinesArrowEnd" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Line Connector Ends with Arrow</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorLinesArrows" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Line Connector with Arrows</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorLinesCircleStart" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Line Connector Starts with Circle</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorLinesCircleEnd" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Line Connector Ends with Circle</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConnectorLinesCircles" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Line Connector with Circles</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GraphicDraft" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Picture Placeholders</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:FillDraft" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Contour Mode</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:TextDraft" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Text Placeholders</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:LineDraft" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Line Contour Only</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:HandlesDraft" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Simple Handles</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SolidCreate" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Modify Object with Attributes</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:HelplinesUse" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Snap to Guides</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SnapBorder" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Snap to Page Margins</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SnapFrame" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Snap to Object Border</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SnapPoints" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Snap to Object Points</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:QuickEdit" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Allow Quick Editing</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:PickThrough" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Select Text Area Only</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConvertTo1BitThreshold" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">1 Bit Threshold</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConvertTo1BitMatrix" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">1 Bit Dithered</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConvertTo4BitGrays" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">4 Bit grayscales</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConvertTo4BitColors" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">4 Bit color palette</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConvertTo8BitGrays" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">8 Bit Grayscales</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConvertTo8BitColors" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">8 Bit color palette</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConvertToTrueColor" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">24 Bit True Color</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:BigHandles" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Large Handles</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DoubleClickTextEdit" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Double-click to edit Text</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ClickChangeRotation" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Rotation Mode after Clicking Object</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ArrowsToolbox" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Lines and Arrows</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:LineArrowStart" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Line Starts with Arrow</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:LineArrowEnd" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Line Ends with Arrow</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:LineArrows" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Line with Arrows</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:LineArrowCircle" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Line with Arrow/Circle</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:LineCircleArrow" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Line with Circle/Arrow</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:LineArrowSquare" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Line with Arrow/Square</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:LineSquareArrow" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Line with Square/Arrow</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:Mirror" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Flip</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+
+ <node oor:name=".uno:InsertMasterPage" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">New Master</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DeleteMasterPage" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Delete Master</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:RenameMasterPage" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Rename Master</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:CloseMasterView" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Close Master View</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SendMailDocAsMS" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">E-mail as ~Microsoft PowerPoint Presentation...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SendMailDocAsOOo" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">E-mail as ~OpenDocument Presentation...</value>
+ </prop>
+ </node>
+ </node>
+ <node oor:name="Popups">
+ <node oor:name=".uno:ModifyMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Modify</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:WorkspaceMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Wor~kspace</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:MirrorMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Flip</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:PreviewDisplayQualityMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Pre~view Mode</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:LayerMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">La~yer</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:GridMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Gr~id</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ConvertMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Convert</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ArrangeMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Arrange</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DisplayQualityMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Color/Grayscale</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SlideShowMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Slide Show</value>
+ </prop>
+ </node>
<!--node oor:name=".uno:ReviewMenu" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">~Review</value>
</prop>
</node-->
<node oor:name=".uno:GroupMenu" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Group</value>
- </prop>
- </node>
- <node oor:name=".uno:SendMenu" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Sen~d</value>
- </prop>
- </node>
- <node oor:name=".uno:TemplatesMenu" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Styl~es</value>
- </prop>
- </node>
- <node oor:name=".uno:SnapLinesMenu" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Guides</value>
- </prop>
- </node>
- <node oor:name=".uno:MasterPageMenu" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Master</value>
- </prop>
- </node>
- <node oor:name=".uno:MasterLayoutsMenu" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Master Lay~outs</value>
- </prop>
- </node>
- <node oor:name=".uno:MasterLayouts" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Master ~Elements...</value>
- </prop>
- </node>
- <node oor:name=".uno:MasterLayoutsNotes" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Notes Master Layout...</value>
- </prop>
- </node>
- <node oor:name=".uno:MasterLayoutsHandouts" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Handout Master Layout...</value>
- </prop>
- </node>
- <node oor:name=".uno:HeaderAndFooter" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Header and Footer...</value>
- </prop>
- </node>
- <node oor:name=".uno:InsertPageNumber" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">P~age Number...</value>
- </prop>
- </node>
- <node oor:name=".uno:InsertDateAndTime" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Date and ~Time...</value>
- </prop>
- </node>
- <node oor:name=".uno:NormalMultiPaneGUI" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Normal</value>
- </prop>
- </node>
- <node oor:name=".uno:SlideSorterMultiPaneGUI" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Sli~de Sorter</value>
- </prop>
- </node>
- <node oor:name=".uno:LeftPaneImpress" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">S~lide Pane</value>
- </prop>
- </node>
- <node oor:name=".uno:LeftPaneDraw" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Page Pane</value>
- </prop>
- </node>
- <node oor:name=".uno:RightPane" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Tas~k Pane</value>
- </prop>
- </node>
- <node oor:name=".uno:MergeCells" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Zellen verbinden</value>
- <value xml:lang="en-US">Merge Cells</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:SplitCell" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Zelle teilen</value>
- <value xml:lang="en-US">Split Cells</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:OptimizeTable" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Optimieren</value>
- <value xml:lang="en-US">Optimize</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:DistributeColumns" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Distribute Columns Evenly</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:DistributeRows" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Distribute Rows Equally </value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:CellVertBottom" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Unten</value>
- <value xml:lang="en-US">Bottom</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:CellVertCenter" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Mittig (vertikal)</value>
- <value xml:lang="en-US">Center ( vertical )</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:CellVertTop" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Oben</value>
- <value xml:lang="en-US">Top</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:InsertRows" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Zeile einfügen</value>
- <value xml:lang="en-US">Insert Row</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Group</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SendMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Sen~d</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:TemplatesMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Styl~es</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SnapLinesMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Guides</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:MasterPageMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Master</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:MasterLayoutsMenu" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Master Lay~outs</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:MasterLayouts" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Master ~Elements...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:MasterLayoutsNotes" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Notes Master Layout...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:MasterLayoutsHandouts" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Handout Master Layout...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:HeaderAndFooter" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Header and Footer...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertPageNumber" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">P~age Number...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertDateAndTime" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Date and ~Time...</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:NormalMultiPaneGUI" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">~Normal</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SlideSorterMultiPaneGUI" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">Sli~de Sorter</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:LeftPaneImpress" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+
+ <value xml:lang="en-US">S~lide Pane</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:LeftPaneDraw" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">~Page Pane</value>
+ </prop>
+ </node>
+
+ <node oor:name=".uno:RightPane" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Tas~k Pane</value>
+ </prop>
+ </node>
+
+ <node oor:name=".uno:MergeCells" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">Zellen verbinden</value>
+ <value xml:lang="en-US">Merge Cells</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SplitCell" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">Zelle teilen</value>
+ <value xml:lang="en-US">Split Cells</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:OptimizeTable" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">Optimieren</value>
+ <value xml:lang="en-US">Optimize</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DistributeColumns" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Distribute Columns Evenly</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DistributeRows" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Distribute Rows Equally </value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:CellVertBottom" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">Unten</value>
+ <value xml:lang="en-US">Bottom</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:CellVertCenter" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">Mittig (vertikal)</value>
+ <value xml:lang="en-US">Center ( vertical )</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:CellVertTop" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">Oben</value>
+ <value xml:lang="en-US">Top</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertRows" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">Zeile einfügen</value>
+ <value xml:lang="en-US">Insert Row</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
<node oor:name=".uno:InsertRowDialog" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">~Rows...</value>
</prop>
</node>
<node oor:name=".uno:InsertColumns" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Spalte einfügen</value>
- <value xml:lang="en-US">Insert Column</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">Spalte einfügen</value>
+ <value xml:lang="en-US">Insert Column</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
<node oor:name=".uno:InsertColumnDialog" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">~Columns...</value>
</prop>
</node>
<node oor:name=".uno:DeleteRows" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Zeile löschen</value>
- <value xml:lang="en-US">Delete Row</value>
- </prop>
- <prop oor:name="ContextLabel" oor:type="xs:string">
- <value xml:lang="de">Zeilen</value>
- <value xml:lang="en-US">~Rows</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:DeleteColumns" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Spalte löschen</value>
- <value xml:lang="en-US">Delete Column</value>
- </prop>
- <prop oor:name="ContextLabel" oor:type="xs:string">
- <value xml:lang="de">Spalten</value>
- <value xml:lang="en-US">~Columns</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:SelectTable" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Tabelle selektieren</value>
- <value xml:lang="en-US">Select Table</value>
- </prop>
- <prop oor:name="ContextLabel" oor:type="xs:string">
- <value xml:lang="de">Tabelle</value>
- <value xml:lang="en-US">~Table</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:EntireColumn" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Spalte selektieren</value>
- <value xml:lang="en-US">Select Column</value>
- </prop>
- <prop oor:name="ContextLabel" oor:type="xs:string">
- <value xml:lang="de">Spalten</value>
- <value xml:lang="en-US">~Columns</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:EntireRow" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Zeile selektieren</value>
- <value xml:lang="en-US">Select Rows</value>
- </prop>
- <prop oor:name="ContextLabel" oor:type="xs:string">
- <value xml:lang="de">Zeilen</value>
- <value xml:lang="en-US">~Rows</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:TableDialog" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Tabelleneigenschaften...</value>
- <value xml:lang="en-US">Ta~ble Properties...</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:AutoSum" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Summe</value>
- <value xml:lang="en-US">Sum</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:TableSort" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">Sorti~eren...</value>
- <value xml:lang="en-US">So~rt...</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:InsertTable" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="de">~Tabelle...</value>
- <value xml:lang="en-US">~Table...</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">Zeile löschen</value>
+ <value xml:lang="en-US">Delete Row</value>
+ </prop>
+ <prop oor:name="ContextLabel" oor:type="xs:string">
+ <value xml:lang="de">Zeilen</value>
+ <value xml:lang="en-US">~Rows</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DeleteColumns" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">Spalte löschen</value>
+ <value xml:lang="en-US">Delete Column</value>
+ </prop>
+ <prop oor:name="ContextLabel" oor:type="xs:string">
+ <value xml:lang="de">Spalten</value>
+ <value xml:lang="en-US">~Columns</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:SelectTable" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">Tabelle selektieren</value>
+ <value xml:lang="en-US">Select Table</value>
+ </prop>
+ <prop oor:name="ContextLabel" oor:type="xs:string">
+ <value xml:lang="de">Tabelle</value>
+ <value xml:lang="en-US">~Table</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:EntireColumn" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">Spalte selektieren</value>
+ <value xml:lang="en-US">Select Column</value>
+ </prop>
+ <prop oor:name="ContextLabel" oor:type="xs:string">
+ <value xml:lang="de">Spalten</value>
+ <value xml:lang="en-US">~Columns</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:EntireRow" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">Zeile selektieren</value>
+ <value xml:lang="en-US">Select Rows</value>
+ </prop>
+ <prop oor:name="ContextLabel" oor:type="xs:string">
+ <value xml:lang="de">Zeilen</value>
+ <value xml:lang="en-US">~Rows</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:TableDialog" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">Tabelleneigenschaften...</value>
+ <value xml:lang="en-US">Ta~ble Properties...</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:AutoSum" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">Summe</value>
+ <value xml:lang="en-US">Sum</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:TableSort" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">Sorti~eren...</value>
+ <value xml:lang="en-US">So~rt...</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:InsertTable" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="de">~Tabelle...</value>
+ <value xml:lang="en-US">~Table...</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
<node oor:name=".uno:Grow" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Increase Font</value>
@@ -1872,5 +2121,5 @@
</prop>
</node>
</node>
- </node>
+ </node>
</oor:component-data>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu
index 53d2ca72cbf4..c0feaba64dc6 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu
@@ -106,6 +106,26 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="private:resource/toolbar/findbar" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>1,0</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Find</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
<node oor:name="private:resource/toolbar/drawingobjectbar" oor:op="replace">
<prop oor:name="DockPos" oor:type="xs:string">
<value>0,1</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Factories.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Factories.xcu
index 83554a37d09e..479c193280bb 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Factories.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Factories.xcu
@@ -45,44 +45,58 @@
</node>
<node oor:name="generic_toolbar_factory" oor:op="replace">
<prop oor:name="Type">
- <value>toolbar</value>
+ <value>toolbar</value>
</prop>
<prop oor:name="Name">
- <value/>
+ <value/>
</prop>
<prop oor:name="Module">
- <value/>
+ <value/>
</prop>
<prop oor:name="FactoryImplementation">
- <value>com.sun.star.comp.framework.ToolBarFactory</value>
+ <value>com.sun.star.comp.framework.ToolBarFactory</value>
</prop>
</node>
<node oor:name="addons_toolbar_factory" oor:op="replace">
<prop oor:name="Type">
- <value>toolbar</value>
+ <value>toolbar</value>
</prop>
<prop oor:name="Name">
- <value>addon_</value>
+ <value>addon_</value>
</prop>
<prop oor:name="Module">
- <value/>
+ <value/>
</prop>
<prop oor:name="FactoryImplementation">
- <value>com.sun.star.comp.framework.AddonsToolBarFactory</value>
+ <value>com.sun.star.comp.framework.AddonsToolBarFactory</value>
</prop>
</node>
<node oor:name="statusbar_factory" oor:op="replace">
<prop oor:name="Type">
- <value>statusbar</value>
+ <value>statusbar</value>
+ </prop>
+ <prop oor:name="Name">
+ <value/>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="FactoryImplementation">
+ <value>com.sun.star.comp.framework.StatusBarFactory</value>
+ </prop>
+ </node>
+ <node oor:name="org.openoffice.Office.Impress.ImpressToolPanelFactory" oor:op="replace">
+ <prop oor:name="Type">
+ <value>toolpanel</value>
</prop>
<prop oor:name="Name">
- <value/>
+ <value>DrawingFramework</value>
</prop>
<prop oor:name="Module">
- <value/>
+ <value>com.sun.star.presentation.PresentationDocument</value>
</prop>
<prop oor:name="FactoryImplementation">
- <value>com.sun.star.comp.framework.StatusBarFactory</value>
+ <value>com.sun.star.drawing.DefaultToolPanelFactory</value>
</prop>
</node>
</node>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index b2759e4f7dbf..ebed194fcffc 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -1277,7 +1277,7 @@
<value xml:lang="en-US">Can't Undo</value>
</prop>
</node>
- <node oor:name=".uno:GrabControlFocus" oor:op="replace">
+ <node oor:name=".uno:ToggleControlFocus" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Control Focus</value>
</prop>
@@ -1459,6 +1459,38 @@
<value>1</value>
</prop>
</node>
+ <node oor:name=".uno:FindText" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Find Text</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:DownSearch" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Find Next</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:UpSearch" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Find Previous</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name="vnd.sun.star.findbar:FocusToFindbar" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Focus to Findbar</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
<node oor:name=".uno:ExtendedHelp" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">What's ~This?</value>
@@ -2090,22 +2122,22 @@
<value>1</value>
</prop>
</node>
- <node oor:name=".uno:ChangeCaseToUpper" oor:op="replace">
+ <node oor:name=".uno:LanguageStatus" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Language Status</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ChooseControls" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Uppercase</value>
+ <value xml:lang="en-US">Insert Controls</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
</node>
- <node oor:name=".uno:LanguageStatus" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Language Status</value>
- </prop>
- </node>
- <node oor:name=".uno:ChooseControls" oor:op="replace">
+ <node oor:name=".uno:ChangeCaseToSentenceCase" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Insert Controls</value>
+ <value xml:lang="en-US">~Sentence case</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
@@ -2113,7 +2145,31 @@
</node>
<node oor:name=".uno:ChangeCaseToLower" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Lowercase</value>
+ <value xml:lang="en-US">~lowercase</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ChangeCaseToUpper" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">~UPPERCASE</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ChangeCaseToTitleCase" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">~Capitalize Every Word</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:ChangeCaseToToggleCase" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">~tOGGLE cASE</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
@@ -2989,7 +3045,7 @@
<value xml:lang="en-US">New FrameSet</value>
</prop>
</node>
- <node oor:name=".uno:Thesaurus" oor:op="replace">
+ <node oor:name=".uno:ThesaurusDialog" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">~Thesaurus...</value>
</prop>
@@ -3420,7 +3476,12 @@
<value>9</value>
</prop>
</node>
- <node oor:name=".uno:RestoreEditingView" oor:op="replace">
+ <node oor:name=".uno:TaskPane" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Task Pane</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:RestoreEditingView" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Restore Editing View</value>
</prop>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu
index 422230b9e0a1..e582c0b9dc27 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version='1.0' encoding='utf-8'?>
<!--***********************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,734 +27,734 @@
************************************************************************ -->
<!DOCTYPE oor:component-data SYSTEM "../../../../../component-update.dtd">
<oor:component-data oor:name="ImpressWindowState" oor:package="org.openoffice.Office.UI" xmlns:install="http://openoffice.org/2004/installation" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <node oor:name="UIElements">
- <node oor:name="States">
- <node oor:name="private:resource/toolbar/extrusionobjectbar" oor:op="replace">
- <prop oor:name="DockingArea" oor:type="xs:int">
- <value>0</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">3D-Settings</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/drawingobjectbar" oor:op="replace">
- <prop oor:name="DockPos" oor:type="xs:string">
- <value>0,1</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="DockingArea" oor:type="xs:int">
- <value>0</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Line and Filling</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/3dobjectsbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">3D-Objects</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/alignmentbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Align</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/arrowsbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Arrows</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/choosemodebar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Mode</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/commontaskbar" oor:op="replace">
- <prop oor:name="DockPos" oor:type="xs:string">
- <value>1,0</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="DockingArea" oor:type="xs:int">
- <value>0</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Presentation</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/connectorsbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Connectors</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/fullscreenbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Style" oor:type="xs:int">
- <value>2</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Full Screen</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="NoClose" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/ellipsesbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Circles and Ovals</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- </node>
+ <node oor:name="UIElements">
+ <node oor:name="States">
+ <node oor:name="private:resource/toolbar/extrusionobjectbar" oor:op="replace">
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">3D-Settings</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/drawingobjectbar" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>0,1</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Line and Filling</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/3dobjectsbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">3D-Objects</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/alignmentbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Align</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/arrowsbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Arrows</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/choosemodebar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Mode</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/commontaskbar" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>1,0</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Presentation</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/connectorsbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Connectors</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/fullscreenbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Style" oor:type="xs:int">
+ <value>2</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Full Screen</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="NoClose" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/ellipsesbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Circles and Ovals</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
<node oor:name="private:resource/toolbar/formtextobjectbar" oor:op="replace">
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Text Box Formatting</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/formsfilterbar" oor:op="replace">
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Form Filter</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="NoClose" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/formsnavigationbar" oor:op="replace">
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Form Navigation</value>
- </prop>
- <prop oor:name="DockPos" oor:type="xs:string">
- <value>0,1</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="DockingArea" oor:type="xs:int">
- <value>1</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/formcontrols" oor:op="replace">
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Form Controls</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/moreformcontrols" oor:op="replace">
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">More Controls</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/formdesign" oor:op="replace">
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Form Design</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/fontworkobjectbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Fontwork</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/fontworkshapetype" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Fontwork Shape</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/graphicobjectbar" oor:op="replace">
- <prop oor:name="DockPos" oor:type="xs:string">
- <value>0,1</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="DockingArea" oor:type="xs:int">
- <value>0</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Picture</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/graffilterbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Graphic Filter</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/outlinetoolbar" oor:op="replace">
- <prop oor:name="DockPos" oor:type="xs:string">
- <value>1,0</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="DockingArea" oor:type="xs:int">
- <value>0</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Outline</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/insertbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Insert</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/linesbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Lines</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/basicshapes" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Basic Shapes</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/symbolshapes" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Symbol Shapes</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/arrowshapes" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Block Arrows</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/flowchartshapes" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Flowchart</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/calloutshapes" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Callouts</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/starshapes" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Stars and Banners</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/optionsbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Options</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/rectanglesbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Rectangles</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/positionbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Position</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/slideviewtoolbar" oor:op="replace">
- <prop oor:name="DockPos" oor:type="xs:string">
- <value>0,1</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="DockingArea" oor:type="xs:int">
- <value>0</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Slide Sorter</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/slideviewobjectbar" oor:op="replace">
- <prop oor:name="DockPos" oor:type="xs:string">
- <value>0,1</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="DockingArea" oor:type="xs:int">
- <value>0</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Slide View</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/standardbar" oor:op="replace">
- <prop oor:name="DockPos" oor:type="xs:string">
- <value>0,0</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="DockingArea" oor:type="xs:int">
- <value>0</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Standard</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/textbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Text</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/textobjectbar" oor:op="replace">
- <prop oor:name="DockPos" oor:type="xs:string">
- <value>0,1</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Text Formatting</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/toolbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="DockingArea" oor:type="xs:int">
- <value>1</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Drawing</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/tableobjectbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Table</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/zoombar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Zoom</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/gluepointsobjectbar" oor:op="replace">
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Gluepoints</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/bezierobjectbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Edit Points</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/viewerbar" oor:op="replace">
- <prop oor:name="DockingArea" oor:type="xs:int">
- <value>0</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Standard (Viewing Mode)</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="NoClose" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/mediaobjectbar" oor:op="replace">
- <prop oor:name="DockPos" oor:type="xs:string">
- <value>0,1</value>
- </prop>
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="DockingArea" oor:type="xs:int">
- <value>1</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Media Playback</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
- <node oor:name="private:resource/toolbar/colorbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Color</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- </node>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Text Box Formatting</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/formsfilterbar" oor:op="replace">
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Form Filter</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="NoClose" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/formsnavigationbar" oor:op="replace">
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Form Navigation</value>
+ </prop>
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>0,1</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/formcontrols" oor:op="replace">
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Form Controls</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/moreformcontrols" oor:op="replace">
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">More Controls</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/formdesign" oor:op="replace">
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Form Design</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/fontworkobjectbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Fontwork</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/fontworkshapetype" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Fontwork Shape</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/graphicobjectbar" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>0,1</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Picture</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/graffilterbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Graphic Filter</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/outlinetoolbar" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>1,0</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Outline</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/insertbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Insert</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/linesbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Lines</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/basicshapes" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Basic Shapes</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/symbolshapes" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Symbol Shapes</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/arrowshapes" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Block Arrows</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/flowchartshapes" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Flowchart</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/calloutshapes" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Callouts</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/starshapes" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Stars and Banners</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/optionsbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Options</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/rectanglesbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Rectangles</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/positionbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Position</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/slideviewtoolbar" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>0,1</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Slide Sorter</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/slideviewobjectbar" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>0,1</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Slide View</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/standardbar" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>0,0</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Standard</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/textbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Text</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/textobjectbar" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>0,1</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Text Formatting</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/toolbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Drawing</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/tableobjectbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Table</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/zoombar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Zoom</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/gluepointsobjectbar" oor:op="replace">
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Gluepoints</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/bezierobjectbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Edit Points</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/viewerbar" oor:op="replace">
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Standard (Viewing Mode)</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="NoClose" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/mediaobjectbar" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>0,1</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Media Playback</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolbar/colorbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Color</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
<node oor:name="private:resource/toolbar/commentsbar" oor:op="replace">
<prop oor:name="Docked" oor:type="xs:boolean">
<value>false</value>
@@ -770,36 +770,91 @@
</prop>
</node>
<node oor:name="private:resource/toolbar/masterviewtoolbar" oor:op="replace">
- <prop oor:name="Docked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="DockingArea" oor:type="xs:int">
- <value>0</value>
- </prop>
- <prop oor:name="Locked" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="Style" oor:type="xs:int">
- <value>0</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="Pos" oor:type="xs:string">
- <value>500,100</value>
- </prop>
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Master View</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="NoClose" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="ContextSensitive" oor:type="xs:boolean">
- <value>true</value>
- </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="Locked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="Style" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="Pos" oor:type="xs:string">
+ <value>500,100</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Master View</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="NoClose" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolpanel/DrawingFramework/MasterPages" oor:op="replace">
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Master Pages</value>
+ </prop>
+ <prop oor:name="ImageURL" oor:type="xs:string">
+ <value>private:commandimage/PresentationLayout</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolpanel/DrawingFramework/Layouts" oor:op="replace">
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Layouts</value>
+ </prop>
+ <prop oor:name="ImageURL" oor:type="xs:string">
+ <value>private:commandimage/ModifyPage</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolpanel/DrawingFramework/TableDesign" oor:op="replace">
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Table Design</value>
+ </prop>
+ <prop oor:name="ImageURL" oor:type="xs:string">
+ <value>private:commandimage/InsertTable</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolpanel/DrawingFramework/CustomAnimations" oor:op="replace">
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Custom Animation</value>
+ </prop>
+ <prop oor:name="ImageURL" oor:type="xs:string">
+ <value>private:commandimage/CustomAnimation</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolpanel/DrawingFramework/SlideTransitions" oor:op="replace">
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Slide Transition</value>
+ </prop>
+ <prop oor:name="ImageURL" oor:type="xs:string">
+ <value>private:commandimage/RehearseTimings</value>
+ </prop>
</node>
<node oor:name="private:resource/toolbar/optimizetablebar" oor:op="replace">
<prop oor:name="Docked" oor:type="xs:boolean">
@@ -815,6 +870,26 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="private:resource/toolbar/findbar" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>1,0</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Find</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
</node>
- </node>
+ </node>
</oor:component-data>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu
index 1a3db34f6e6d..7570fda066ca 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu
@@ -156,7 +156,7 @@
</node>
<node oor:name=".uno:ToolBox" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Formula Elements</value>
+ <value xml:lang="en-US">Elements</value>
</prop>
</node>
<node oor:name=".uno:FormelCursor" oor:op="replace">
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu
index 870e3c5c528b..8bcc180c264b 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu
@@ -52,6 +52,26 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="private:resource/toolbar/findbar" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>1,0</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Find</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
<node oor:name="private:resource/toolbar/textobjectbar" oor:op="replace">
<prop oor:name="DockPos" oor:type="xs:string">
<value>0,1</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu
index 8c0eccc927e9..35844d1bd516 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu
@@ -52,6 +52,26 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="private:resource/toolbar/findbar" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>1,0</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Find</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
<node oor:name="private:resource/toolbar/textobjectbar" oor:op="replace">
<prop oor:name="DockPos" oor:type="xs:string">
<value>0,1</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
index 60417cae30fa..d3790df3ef92 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
@@ -52,6 +52,26 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="private:resource/toolbar/findbar" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>1,0</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Find</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
<node oor:name="private:resource/toolbar/textobjectbar" oor:op="replace">
<prop oor:name="DockPos" oor:type="xs:string">
<value>0,1</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/XFormsWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/XFormsWindowState.xcu
index f78926234b35..76cdc52f5e3a 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/XFormsWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/XFormsWindowState.xcu
@@ -53,6 +53,26 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="private:resource/toolbar/findbar" oor:op="replace">
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>1,0</value>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Find</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
<node oor:name="private:resource/toolbar/textobjectbar" oor:op="replace">
<prop oor:name="DockPos" oor:type="xs:string">
<value>0,1</value>
diff --git a/officecfg/registry/data/org/openoffice/Setup.xcu b/officecfg/registry/data/org/openoffice/Setup.xcu
index 120f212112d6..e8b483b8622d 100755..100644
--- a/officecfg/registry/data/org/openoffice/Setup.xcu
+++ b/officecfg/registry/data/org/openoffice/Setup.xcu
@@ -37,6 +37,10 @@
<prop oor:name="ooSetupVersionAboutBox" install:module="brand">
<value>${ABOUTBOXPRODUCTVERSION}</value>
</prop>
+ <prop oor:name="ooVendor" install:module="brand">
+ <value>${OOOVENDOR}</value>
+ </prop>
+
<prop oor:name="ooSetupExtension" install:module="brand">
<value >${PRODUCTEXTENSION}</value>
</prop>
@@ -86,6 +90,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >scalc</value>
</prop>
@@ -127,6 +134,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >sdraw</value>
</prop>
@@ -168,6 +178,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >simpress</value>
</prop>
@@ -207,6 +220,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >smath</value>
</prop>
@@ -246,6 +262,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >sglobal</value>
</prop>
@@ -287,6 +306,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >swriter</value>
</prop>
@@ -434,6 +456,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >sweb</value>
</prop>
@@ -594,7 +619,7 @@
<value>GenericCategories</value>
</prop>
<prop oor:name="ooSetupFactoryUIName">
- <value xml:lang="en-US">Base: Table Data View</value>
+ <value>Base: Table Data View</value>
</prop>
</node>
<node oor:name="com.sun.star.frame.Bibliography" oor:op="replace">
@@ -616,7 +641,7 @@
<value >GenericCategories</value>
</prop>
<prop oor:name="ooSetupFactoryUIName">
- <value xml:lang="en-US">Bibliography</value>
+ <value>Bibliography</value>
</prop>
</node>
<node oor:name="com.sun.star.script.BasicIDE" oor:op="replace">
@@ -686,6 +711,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >schart</value>
</prop>
@@ -725,6 +753,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >dbapp</value>
</prop>
@@ -801,13 +832,13 @@
<node oor:name="Common" oor:op="replace">
<prop oor:name="IncludedFiles">
<value>
- .*/autotext/.*
- .*/autocorr/.*
- .*/config/.*\.so[bcdegh]
- .*/config/soffice.cfg/modules/.*/toolbar/custom.*\.xml
- .*/config/soffice.cfg/modules/.*/images/.*
- .*/gallery/.*
- .*/template/.*
+ <it>.*/autotext/.*</it>
+ <it>.*/autocorr/.*</it>
+ <it>.*/config/.*\.so[bcdegh]</it>
+ <it>.*/config/soffice.cfg/modules/.*/toolbar/custom.*\.xml</it>
+ <it>.*/config/soffice.cfg/modules/.*/images/.*</it>
+ <it>.*/gallery/.*</it>
+ <it>.*/template/.*</it>
</value>
</prop>
<prop oor:name="IncludedNodes">
diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu
index 36fd48ebf753..33e5c9f26f2f 100644
--- a/officecfg/registry/data/org/openoffice/VCL.xcu
+++ b/officecfg/registry/data/org/openoffice/VCL.xcu
@@ -1434,7 +1434,7 @@
</node>
<node oor:name="arialnarrow" oor:op="replace">
<prop oor:name="SubstFonts">
- <value>arialnarrowmt;helveticanarrow;helmetcondensed;dejavusanscondensed;nimbussanslcondensed;nimbussanscondensed</value>
+ <value>arialnarrowmt;liberationsansnarrow;helveticanarrow;helmetcondensed;dejavusanscondensed;nimbussanslcondensed;nimbussanscondensed</value>
</prop>
<prop oor:name="SubstFontsMS">
<value></value>
@@ -1838,6 +1838,9 @@
</prop>
<prop oor:name="FontType"><value>Normal,SansSerif</value></prop>
</node>
+ <node oor:name="candara" oor:op="replace">
+ <prop oor:name="FontType"><value>Normal,SansSerif</value></prop>
+ </node>
<node oor:name="cambria" oor:op="replace">
<prop oor:name="SubstFonts">
@@ -1846,6 +1849,20 @@
<prop oor:name="FontType"><value>Normal,Serif</value></prop>
</node>
+ <node oor:name="consolas" oor:op="replace">
+ <prop oor:name="FontType"><value>Normal,SansSerif,Fixed</value></prop>
+ <prop oor:name="SubstFontsHTML"><value>monospace</value></prop>
+ </node>
+ <node oor:name="constantia" oor:op="replace">
+ <prop oor:name="FontType"><value>Normal,Serif</value></prop>
+ </node>
+ <node oor:name="corbel" oor:op="replace">
+ <prop oor:name="FontType"><value>Normal,SansSerif</value></prop>
+ </node>
+ <node oor:name="cordia" oor:op="replace">
+ <prop oor:name="FontType"><value>Normal,SansSerif</value></prop>
+ </node>
+
<node oor:name="calisto" oor:op="replace">
<prop oor:name="SubstFonts">
<value>thorndaleamt;thorndale;timesnewroman;nimbusromanno9l;times;timesroman;newyork;timmons;serif;lucidaserif;lucidabright;roman;nimbusromanno9;bookman;itcbookman;garamond;garamondmt;palatino</value>
@@ -2522,7 +2539,7 @@
</node>
<node oor:name="dejavusanscondensed" oor:op="replace">
<prop oor:name="SubstFonts">
- <value>arialnarrow</value>
+ <value>arialnarrow;liberationsansnarrow</value>
</prop>
<prop oor:name="FontWeight"><value>Normal</value></prop>
<prop oor:name="FontWidth"><value>Condensed</value></prop>
@@ -3578,7 +3595,7 @@
</node>
<node oor:name="helveticanarrow" oor:op="replace">
<prop oor:name="SubstFonts">
- <value>arialnarrow;helmetcondensed;dejavusanscondensed;nimbussanslcondensed;nimbussanscondensed</value>
+ <value>arialnarrow;liberationsansnarrow;helmetcondensed;dejavusanscondensed;nimbussanslcondensed;nimbussanscondensed</value>
</prop>
<prop oor:name="SubstFontsMS">
<value></value>
@@ -6521,7 +6538,7 @@
</node>
<node oor:name="sanscondensed" oor:op="replace">
<prop oor:name="SubstFonts">
- <value>arialnarrow;helveticanarrow;helmetcondensed;dejavusanscondensed;nimbussanslcondensed;nimbussanscondensed</value>
+ <value>arialnarrow;liberationsansnarrow;helveticanarrow;helmetcondensed;dejavusanscondensed;nimbussanslcondensed;nimbussanscondensed</value>
</prop>
<prop oor:name="SubstFontsMS">
<value></value>
@@ -6567,7 +6584,7 @@
</node>
<node oor:name="sanslcondensed" oor:op="replace">
<prop oor:name="SubstFonts">
- <value>arialnarrow;helveticanarrow;helmetcondensed;nimbussanslcondensed;nimbussanscondensed;dejavusanscondensed</value>
+ <value>arialnarrow;liberationsansnarrow;helveticanarrow;helmetcondensed;nimbussanslcondensed;nimbussanscondensed;dejavusanscondensed</value>
</prop>
<prop oor:name="SubstFontsMS">
<value></value>
@@ -7142,7 +7159,7 @@
</node>
<node oor:name="swissnarrow" oor:op="replace">
<prop oor:name="SubstFonts">
- <value>dejavuserifcondensed;arialnarrow;helveticanarrow;helmetcondensed;nimbussanslcondensed;nimbussanscondensed</value>
+ <value>dejavuserifcondensed;arialnarrow;liberationsansnarrow;helveticanarrow;helmetcondensed;nimbussanslcondensed;nimbussanscondensed</value>
</prop>
<prop oor:name="SubstFontsMS">
<value></value>
diff --git a/officecfg/registry/data/org/openoffice/ucb/Configuration.xcu b/officecfg/registry/data/org/openoffice/ucb/Configuration.xcu
index df824b593a8d..88d2abef62f3 100644
--- a/officecfg/registry/data/org/openoffice/ucb/Configuration.xcu
+++ b/officecfg/registry/data/org/openoffice/ucb/Configuration.xcu
@@ -175,6 +175,17 @@
<value/>
</prop>
</node>
+ <node oor:name="Provider14" oor:op="replace">
+ <prop oor:name="ServiceName">
+ <value>com.sun.star.ucb.ExtensionContentProvider</value>
+ </prop>
+ <prop oor:name="URLTemplate">
+ <value>vnd.sun.star.extension</value>
+ </prop>
+ <prop oor:name="Arguments">
+ <value/>
+ </prop>
+ </node>
<!-- We want the Provider to be the final fallback provider -->
<node oor:name="Provider999" oor:op="replace" install:module="gio">
<prop oor:name="ServiceName">
diff --git a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
index a5a703c0480c..8317e3e0082d 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
@@ -26,375 +26,380 @@
*
************************************************************************ -->
<!DOCTYPE oor:component-schema SYSTEM "../../../../component-schema.dtd">
-<oor:component-schema xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" oor:name="Impress" oor:package="org.openoffice.Office" xml:lang="en-US"> <info>
- <author>AF</author>
- <desc >Contains configuration items related to the Impress application.</desc>
- </info>
- <import oor:component="org.openoffice.Office.Common"/>
- <templates>
- <group oor:name="MasterPageDescriptor">
+<oor:component-schema xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" oor:name="Impress" oor:package="org.openoffice.Office" xml:lang="en-US">
+ <info>
+ <author>AF</author>
+ <desc >Contains configuration items related to the Impress application.</desc>
+ </info>
+ <import oor:component="org.openoffice.Office.Common"/>
+ <templates>
+ <group oor:name="MasterPageDescriptor">
+ <info>
+ <desc>Describes master pages that belong to the list of recently used master pages.</desc>
+ </info>
+ <prop oor:name="URL" oor:type="xs:string">
+ <info>
+ <desc>The URL of the template document that contains the master page.</desc>
+ </info>
+ </prop>
+ <prop oor:name="Name" oor:type="xs:string">
+ <info>
+ <desc>The internal name of the master page.</desc>
+ </info>
+ </prop>
+ </group>
+ <group oor:name="Resource">
+ <info>
+ <desc>A factory that can create one more resources for the multi pane framework.</desc>
+ </info>
+ <prop oor:name="URL" oor:type="xs:string">
+ <info>
+ <desc>URL of a multi pane framework resource.</desc>
+ </info>
+ </prop>
+ </group>
+ <group oor:name="ResourceFactory">
+ <info>
+ <desc>A factory that can create one more resources for the multi pane framework.</desc>
+ </info>
+ <prop oor:name="ServiceName" oor:type="xs:string">
+ <info>
+ <desc>
+ The service name of the factory. This service is not the factory itself.
+ It is expected to create and register a set of factories when an instance of
+ the service is created.
+ </desc>
+ </info>
+ </prop>
+ <set oor:name="ResourceList" oor:node-type="Resource">
+ <info>
+ <desc>List of URLs of the resources that are created by the factory.</desc>
+ </info>
+ </set>
+ </group>
+ <group oor:name="StartupService">
+ <info>
+ <desc>
+ A service that is instantiated when a framework is initializd for a
+ Draw or Impress document.
+ </desc>
+ </info>
+ <prop oor:name="ServiceName" oor:type="xs:string">
+ <info>
+ <desc>The name of the startup service.</desc>
+ </info>
+ </prop>
+ </group>
+ </templates>
+ <component>
+ <group oor:name="Layout">
+ <info>
+ <desc>Contains general properties of the graphical object representation.</desc>
+ </info>
+ <group oor:name="Display">
+ <info>
+ <desc>Contains general properties of the graphical object representation of screen displays.</desc>
+ </info>
+ <prop oor:name="Ruler" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Layout/Display -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display -->
+ <info>
+ <desc>Indicates whether to show the rulers at the left and at the top of the working area.</desc>
+ <label>Rulers visible</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="Helpline" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Layout/Display -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display -->
+ <info>
+ <desc>Indicates whether to show help-lines that can be created by dragging them from the rulers.</desc>
+ <label>Helplines visible</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="Guide" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Layout/Display -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display -->
+ <info>
+ <desc>Indicates whether to show help-lines when moving an object.</desc>
+ <label>Guides when moving</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="Bezier" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Layout/Display -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display -->
+ <info>
+ <desc>Indicates whether to show all control points in the Bezier curve editor.</desc>
+ <label>All control points in Bezier editor</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="Contour" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Layout/Display -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display -->
+ <info>
+ <desc>Indicates whether to show the outline of all moved objects when moving more then one object at the same time.</desc>
+ <label>Contour of each individual object</label>
+ </info>
+ <value>true</value>
+ </prop>
+ </group>
+ <group oor:name="Other">
+ <info>
+ <desc>Specifies other layout options that do not fit into any other group.</desc>
+ <label>Other Layout Options</label>
+ </info>
+ <group oor:name="TabStop">
+ <!-- OldPath: Impress/Layout -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Tab stops -->
+ <!-- Notice: Default-Nonmetric Value: 1270 1/100 mm-->
+ <info>
+ <desc>Specifies the distance between adjacent tab stops with regard to whether the metric or the non-metric system is currently selected.</desc>
+ <label>Tab stops</label>
+ </info>
+ <prop oor:name="Metric" oor:type="xs:int">
<info>
- <desc>Describes master pages that belong to the list of recently used master pages.</desc>
+ <desc>Specifies the distance between adjacent tab stops in 1/100 mm when the metric system is selected.</desc>
+ <label/>
</info>
- <prop oor:name="URL" oor:type="xs:string">
+ <value>1250</value>
+ </prop>
+ <prop oor:name="NonMetric" oor:type="xs:int">
+ <info>
+ <desc>Specifies the distance between adjacent tab stops in 1/100 mm when the non-metric system is selected.</desc>
+ <label/>
+ </info>
+ <value>1270</value>
+ </prop>
+ </group>
+ <group oor:name="MeasureUnit">
+ <!-- OldPath: Impress/Layout -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation- Layout - [Section] Meas. units -->
+ <info>
+ <desc>Specifies the measurement unit to be used with respect to whether the metric or the non-metric system is selected.</desc>
+ <label>Measurement unit</label>
+ </info>
+ <prop oor:name="Metric" oor:type="xs:int">
+ <info>
+ <desc>Specifies the measurement unit to be used when the metric system is selected.</desc>
+ <label>Measurement unit</label>
+ </info>
+ <constraints>
+ <enumeration oor:value="1">
<info>
- <desc>The URL of the template document that contains the master page.</desc>
+ <desc>Millimeter</desc>
</info>
- </prop>
- <prop oor:name="Name" oor:type="xs:string">
+ </enumeration>
+ <enumeration oor:value="2">
<info>
- <desc>The internal name of the master page.</desc>
+ <desc>Centimeter</desc>
</info>
- </prop>
- </group>
- <group oor:name="Resource">
- <info>
- <desc>A factory that can create one more resources for the multi pane framework.</desc>
- </info>
- <prop oor:name="URL" oor:type="xs:string">
+ </enumeration>
+ <enumeration oor:value="6">
+ <info>
+ <desc>Point</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="7">
<info>
- <desc>URL of a multi pane framework resource.</desc>
+ <desc>Pica</desc>
</info>
- </prop>
- </group>
- <group oor:name="ResourceFactory">
+ </enumeration>
+ <enumeration oor:value="8">
+ <info>
+ <desc>Inch</desc>
+ </info>
+ </enumeration>
+ </constraints>
+ <value>2</value>
+ </prop>
+ <prop oor:name="NonMetric" oor:type="xs:int">
<info>
- <desc>A factory that can create one more resources for the multi pane framework.</desc>
+ <desc>Specifies the measurement unit to be used when the non-metric system is selected.</desc>
+ <label>Measurement unit</label>
</info>
- <prop oor:name="ServiceName" oor:type="xs:string">
+ <constraints>
+ <enumeration oor:value="1">
+ <info>
+ <desc>Millimeter</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="2">
<info>
- <desc>The service name of the factory. This service is not the factory itself.
- It is expected to create and register a set of factories when an instance of
- the service is created.</desc>
+ <desc>Centimeter</desc>
</info>
- </prop>
- <set oor:name="ResourceList" oor:node-type="Resource">
+ </enumeration>
+ <enumeration oor:value="6">
<info>
- <desc>List of URLs of the resources that are created by the factory.</desc>
+ <desc>Point</desc>
</info>
- </set>
- </group>
- <group oor:name="StartupService">
- <info>
- <desc>A service that is instantiated when a framework is initializd for a
- Draw or Impress document.</desc>
- </info>
- <prop oor:name="ServiceName" oor:type="xs:string">
- <info>
- <desc>The name of the startup service.</desc>
- </info>
- </prop>
- </group>
- </templates>
- <component>
- <group oor:name="Layout">
- <info>
- <desc>Contains general properties of the graphical object representation.</desc>
- </info>
- <group oor:name="Display">
- <info>
- <desc>Contains general properties of the graphical object representation of screen displays.</desc>
- </info>
- <prop oor:name="Ruler" oor:type="xs:boolean">
- <!-- OldPath: Impress/Layout/Display -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display -->
- <info>
- <desc>Indicates whether to show the rulers at the left and at the top of the working area.</desc>
- <label>Rulers visible</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="Helpline" oor:type="xs:boolean">
- <!-- OldPath: Impress/Layout/Display -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display -->
- <info>
- <desc>Indicates whether to show help-lines that can be created by dragging them from the rulers.</desc>
- <label>Helplines visible</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="Guide" oor:type="xs:boolean">
- <!-- OldPath: Impress/Layout/Display -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display -->
- <info>
- <desc>Indicates whether to show help-lines when moving an object.</desc>
- <label>Guides when moving</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="Bezier" oor:type="xs:boolean">
- <!-- OldPath: Impress/Layout/Display -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display -->
- <info>
- <desc>Indicates whether to show all control points in the Bezier curve editor.</desc>
- <label>All control points in Bezier editor</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="Contour" oor:type="xs:boolean">
- <!-- OldPath: Impress/Layout/Display -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display -->
- <info>
- <desc>Indicates whether to show the outline of all moved objects when moving more then one object at the same time.</desc>
- <label>Contour of each individual object</label>
- </info>
- <value>true</value>
- </prop>
- </group>
- <group oor:name="Other">
- <info>
- <desc>Specifies other layout options that do not fit into any other group.</desc>
- <label>Other Layout Options</label>
- </info>
- <group oor:name="TabStop">
- <!-- OldPath: Impress/Layout -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Tab stops -->
- <!-- Notice: Default-Nonmetric Value: 1270 1/100 mm-->
- <info>
- <desc>Specifies the distance between adjacent tab stops with regard to whether the metric or the non-metric system is currently selected.</desc>
- <label>Tab stops</label>
- </info>
- <prop oor:name="Metric" oor:type="xs:int">
- <info>
- <desc>Specifies the distance between adjacent tab stops in 1/100 mm when the metric system is selected.</desc>
- <label/>
- </info>
- <value>1250</value>
- </prop>
- <prop oor:name="NonMetric" oor:type="xs:int">
- <info>
- <desc>Specifies the distance between adjacent tab stops in 1/100 mm when the non-metric system is selected.</desc>
- <label/>
- </info>
- <value>1270</value>
- </prop>
- </group>
- <group oor:name="MeasureUnit">
- <!-- OldPath: Impress/Layout -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation- Layout - [Section] Meas. units -->
- <info>
- <desc>Specifies the measurement unit to be used with respect to whether the metric or the non-metric system is selected.</desc>
- <label>Measurement unit</label>
- </info>
- <prop oor:name="Metric" oor:type="xs:int">
- <info>
- <desc>Specifies the measurement unit to be used when the metric system is selected.</desc>
- <label>Measurement unit</label>
- </info>
- <constraints>
- <enumeration oor:value="1">
- <info>
- <desc>Millimeter</desc>
- </info>
- </enumeration>
- <enumeration oor:value="2">
- <info>
- <desc>Centimeter</desc>
- </info>
- </enumeration>
- <enumeration oor:value="6">
- <info>
- <desc>Point</desc>
- </info>
- </enumeration>
- <enumeration oor:value="7">
- <info>
- <desc>Pica</desc>
- </info>
- </enumeration>
- <enumeration oor:value="8">
- <info>
- <desc>Inch</desc>
- </info>
- </enumeration>
- </constraints>
- <value>2</value>
- </prop>
- <prop oor:name="NonMetric" oor:type="xs:int">
- <info>
- <desc>Specifies the measurement unit to be used when the non-metric system is selected.</desc>
- <label>Measurement unit</label>
- </info>
- <constraints>
- <enumeration oor:value="1">
- <info>
- <desc>Millimeter</desc>
- </info>
- </enumeration>
- <enumeration oor:value="2">
- <info>
- <desc>Centimeter</desc>
- </info>
- </enumeration>
- <enumeration oor:value="6">
- <info>
- <desc>Point</desc>
- </info>
- </enumeration>
- <enumeration oor:value="7">
- <info>
- <desc>Pica</desc>
- </info>
- </enumeration>
- <enumeration oor:value="8">
- <info>
- <desc>Inch</desc>
- </info>
- </enumeration>
- </constraints>
- <value>8</value>
- </prop>
- </group>
- </group>
- </group>
- <group oor:name="Content">
- <info>
- <desc>Contains content related configuration items.</desc>
- </info>
- <group oor:name="Display">
- <info>
- <desc>Contains configuration items related to the display of Impress documents.</desc>
- </info>
- <prop oor:name="PicturePlaceholder" oor:type="xs:boolean">
- <!-- OldPath: Impress/Contents/Display -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation - Contents - [Section] Alternative display -->
- <info>
- <desc>Indicates whether to show only the bounding box of graphic-objects like bitmaps and drawings.</desc>
- <label>Picture placeholders</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="ContourMode" oor:type="xs:boolean">
- <!-- OldPath: Impress/Contents/Display -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation - Contents - [Section] Alternative display -->
- <info>
- <desc>Indicates whether to show only outlines of objects such as filled rectangles and filled ellipses.</desc>
- <label>Contour mode</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="TextPlaceholder" oor:type="xs:boolean">
- <!-- OldPath: Impress/Contents/Display -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation - Contents - [Section] Alternative display -->
- <info>
- <desc>Indicates whether to show only a placeholder for text in graphical objects.</desc>
- <label>Text placeholders</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="LineContour" oor:type="xs:boolean">
- <!-- OldPath: Impress/Contents/Display -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation - Contents - [Section] Alternative display -->
- <info>
- <desc>Indicates whether to show only hairlines instead of the true line styles.</desc>
- <label>Line contour only</label>
- </info>
- <value>false</value>
- </prop>
- </group>
- </group>
- <group oor:name="Misc">
- <info>
- <desc>Contains a collection of configuration items for the Impress application that do not fit into another category.</desc>
- </info>
- <prop oor:name="BackgroundCache" oor:type="xs:boolean">
- <!-- OldPath: Impress/Other -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Other [Section] Other -->
- <info>
- <desc>Indicates whether to store master pages in a cache to speed up drawing.</desc>
- <label>Use background cache</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="CopyWhileMoving" oor:type="xs:boolean">
- <!-- OldPath: Impress/Other -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Other [Section] Other -->
- <info>
- <desc>Indicates whether moving while holding the Control key makes a copy of the moved object.</desc>
- <label>Copy while moving</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="ObjectMoveable" oor:type="xs:boolean">
- <!-- OldPath: Impress/Other -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Other [Section] Other -->
- <info>
- <desc>Indicates whether objects can still be moved while in rotating mode.</desc>
- <label>Objects always moveable</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="NoDistort" oor:type="xs:boolean">
- <!-- OldPath: Impress/Other -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Other [Section] Other -->
- <info>
- <desc>Indicates whether objects that are placed on a circle keep their original form, i.e. may be moved and rotated but not resized or otherwise distorted.</desc>
- <label>Don&apos;t distort objects in curve</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="DclickTextedit" oor:type="xs:boolean">
- <!-- OldPath: Impress/Other -->
- <!-- OldLocation: soffice.cfg -->
- <!-- UIHints: Option Bar -->
- <info>
- <desc>Indicates whether a double-click on a text object activates the edit mode.</desc>
- <label>Double-Click Text to Edit</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="RotateClick" oor:type="xs:boolean">
- <!-- OldPath: Impress/Other -->
- <!-- OldLocation: soffice.cfg -->
- <!-- UIHints: Option Bar -->
- <info>
- <desc>Indicates whether a double-click on an object activates the rotation mode.</desc>
- <label>Rotation Mode after clicking object</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="Preview" oor:type="xs:double">
- <!-- OldPath: Impress/Other -->
- <!-- OldLocation: soffice.cfg -->
- <!-- UIHints: Menu: view - preview mode -->
- <info>
- <desc>Specifies the color quality of the preview: 0 - Color, 868 - Grayscale, 5381 - Black/White.</desc>
- <label>Preview-Mode</label>
- </info>
- <constraints>
- <enumeration oor:value="0">
- <info>
- <desc>Color</desc>
- </info>
- </enumeration>
- <enumeration oor:value="868">
- <info>
- <desc>Grayscale</desc>
- </info>
- </enumeration>
- <enumeration oor:value="5381">
- <info>
- <desc>Black/White</desc>
- </info>
- </enumeration>
- </constraints>
- <value>0</value>
- </prop>
+ </enumeration>
+ <enumeration oor:value="7">
+ <info>
+ <desc>Pica</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="8">
+ <info>
+ <desc>Inch</desc>
+ </info>
+ </enumeration>
+ </constraints>
+ <value>8</value>
+ </prop>
+ </group>
+ </group>
+ </group>
+ <group oor:name="Content">
+ <info>
+ <desc>Contains content related configuration items.</desc>
+ </info>
+ <group oor:name="Display">
+ <info>
+ <desc>Contains configuration items related to the display of Impress documents.</desc>
+ </info>
+ <prop oor:name="PicturePlaceholder" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Contents/Display -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation - Contents - [Section] Alternative display -->
+ <info>
+ <desc>Indicates whether to show only the bounding box of graphic-objects like bitmaps and drawings.</desc>
+ <label>Picture placeholders</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="ContourMode" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Contents/Display -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation - Contents - [Section] Alternative display -->
+ <info>
+ <desc>Indicates whether to show only outlines of objects such as filled rectangles and filled ellipses.</desc>
+ <label>Contour mode</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="TextPlaceholder" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Contents/Display -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation - Contents - [Section] Alternative display -->
+ <info>
+ <desc>Indicates whether to show only a placeholder for text in graphical objects.</desc>
+ <label>Text placeholders</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="LineContour" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Contents/Display -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation - Contents - [Section] Alternative display -->
+ <info>
+ <desc>Indicates whether to show only hairlines instead of the true line styles.</desc>
+ <label>Line contour only</label>
+ </info>
+ <value>false</value>
+ </prop>
+ </group>
+ </group>
+ <group oor:name="Misc">
+ <info>
+ <desc>Contains a collection of configuration items for the Impress application that do not fit into another category.</desc>
+ </info>
+ <prop oor:name="BackgroundCache" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Other -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Other [Section] Other -->
+ <info>
+ <desc>Indicates whether to store master pages in a cache to speed up drawing.</desc>
+ <label>Use background cache</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="CopyWhileMoving" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Other -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Other [Section] Other -->
+ <info>
+ <desc>Indicates whether moving while holding the Control key makes a copy of the moved object.</desc>
+ <label>Copy while moving</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="ObjectMoveable" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Other -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Other [Section] Other -->
+ <info>
+ <desc>Indicates whether objects can still be moved while in rotating mode.</desc>
+ <label>Objects always moveable</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="NoDistort" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Other -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Other [Section] Other -->
+ <info>
+ <desc>Indicates whether objects that are placed on a circle keep their original form, i.e. may be moved and rotated but not resized or otherwise distorted.</desc>
+ <label>Don&apos;t distort objects in curve</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="DclickTextedit" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Other -->
+ <!-- OldLocation: soffice.cfg -->
+ <!-- UIHints: Option Bar -->
+ <info>
+ <desc>Indicates whether a double-click on a text object activates the edit mode.</desc>
+ <label>Double-Click Text to Edit</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="RotateClick" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Other -->
+ <!-- OldLocation: soffice.cfg -->
+ <!-- UIHints: Option Bar -->
+ <info>
+ <desc>Indicates whether a double-click on an object activates the rotation mode.</desc>
+ <label>Rotation Mode after clicking object</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="Preview" oor:type="xs:double">
+ <!-- OldPath: Impress/Other -->
+ <!-- OldLocation: soffice.cfg -->
+ <!-- UIHints: Menu: view - preview mode -->
+ <info>
+ <desc>Specifies the color quality of the preview: 0 - Color, 868 - Grayscale, 5381 - Black/White.</desc>
+ <label>Preview-Mode</label>
+ </info>
+ <constraints>
+ <enumeration oor:value="0">
+ <info>
+ <desc>Color</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="868">
+ <info>
+ <desc>Grayscale</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="5381">
+ <info>
+ <desc>Black/White</desc>
+ </info>
+ </enumeration>
+ </constraints>
+ <value>0</value>
+ </prop>
<prop oor:name="ShowComments" oor:type="xs:boolean">
<info>
<author>CL</author>
@@ -404,774 +409,778 @@
<value>true</value>
</prop>
<prop oor:name="SimpleHandles" oor:type="xs:boolean">
- <!-- OldPath: Impress/Other -->
- <!-- OldLocation: soffice.cfg -->
- <!-- UIHints: Optionbar -->
- <info>
- <desc>Indicates whether to show simple (true) or 3D-handles (false).</desc>
- <label>Simple Handles</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="BigHandles" oor:type="xs:boolean">
- <!-- OldPath: Impress/Other -->
- <!-- OldLocation: soffice.cfg -->
- <!-- UIHints: Optionbar -->
- <info>
- <desc>Indicates whether to show big (true) or small (false) handles.</desc>
- <label>Big Handles</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="ModifyWithAttributes" oor:type="xs:boolean">
- <!-- OldPath: Impress/Other -->
- <!-- OldLocation: soffice.cfg -->
- <!-- UIHints: Optionbar -->
- <info>
+ <!-- OldPath: Impress/Other -->
+ <!-- OldLocation: soffice.cfg -->
+ <!-- UIHints: Optionbar -->
+ <info>
+ <desc>Indicates whether to show simple (true) or 3D-handles (false).</desc>
+ <label>Simple Handles</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="BigHandles" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Other -->
+ <!-- OldLocation: soffice.cfg -->
+ <!-- UIHints: Optionbar -->
+ <info>
+ <desc>Indicates whether to show big (true) or small (false) handles.</desc>
+ <label>Big Handles</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="ModifyWithAttributes" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Other -->
+ <!-- OldLocation: soffice.cfg -->
+ <!-- UIHints: Optionbar -->
+ <info>
<author>AF</author>
<desc>Indicates whether the object creation and modification will be visualized using the full object attribute set or wireframe.</desc>
<label>Modify with attributes</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="ShowUndoDeleteWarning" oor:type="xs:boolean">
- <!-- OldPath: -->
- <!-- OldLocation: -->
- <!-- UIHints: UNDO stack delete warnng dialog -->
- <info>
- <author>AW</author>
- <desc>Indicates whether the warning dialog appears when setting a new standard page layout.</desc>
- <label>Show Undo-Stack Delete Warning</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="SlideshowRespectZOrder" oor:type="xs:boolean">
- <!-- OldPath: -->
- <!-- OldLocation: -->
- <!-- UIHints: Slideshow Z order for animations -->
- <info>
- <author>THB</author>
- <desc>Indicates whether the slideshow should respect shape z-order while animating shapes. Disabling this can improve slideshow performance</desc>
- <label>Enable shape z-order during slideshow animations</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="TransitionFiles" oor:type="oor:string-list">
- <!-- OldPath: -->
- <!-- OldLocation: -->
- <!-- UIHints: List of files containing transition effects -->
- <info>
- <author>THB</author>
- <desc>Contains a list of odf files, that define
- slideshow transitions. Values are put through
- macro expansion, so, vnd.sun.star.expand prefix
- is allowed. </desc>
- <label>List of files containing transition effects</label>
- </info>
- <value oor:separator=";">vnd.sun.star.expand:$OOO_BASE_DIR/share/config/soffice.cfg/simpress/transitions.xml</value>
- </prop>
- <prop oor:name="EffectFiles" oor:type="oor:string-list">
- <!-- OldPath: -->
- <!-- OldLocation: -->
- <!-- UIHints: List of files containing object effects -->
- <info>
- <author>THB</author>
- <desc>Contains a list of odf files, that define
- slideshow shape effects. Values are put through
- macro expansion, so, vnd.sun.star.expand prefix
- is allowed.</desc>
- <label>List of files containing object effects</label>
- </info>
- <value oor:separator=";">vnd.sun.star.expand:$OOO_BASE_DIR/share/config/soffice.cfg/simpress/effects.xml</value>
- </prop>
- <prop oor:name="PreviewNewEffects" oor:type="xs:boolean">
- <!-- OldPath: -->
- <!-- OldLocation: -->
- <!-- UIHints: automatic preview checkbox in create new effect dialog -->
- <info>
- <author>CL</author>
- <desc>Indicates whether a selected effect in the custom animation create dialog should be previewed.</desc>
- <label>Automatic preview for new custom animation</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="PreviewChangedEffects" oor:type="xs:boolean">
- <!-- OldPath: -->
- <!-- OldLocation: -->
- <!-- UIHints: automatic preview in custom animation panel -->
- <info>
- <author>CL</author>
- <desc>Indicates whether changes in the custom animation panel should be previewed.</desc>
- <label>Automatic preview for custom animation panel</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="PreviewTransitions" oor:type="xs:boolean">
- <!-- OldPath: -->
- <!-- OldLocation: -->
- <!-- UIHints: automatic preview in slide transtion panel -->
- <info>
- <author>CL</author>
- <desc>Indicates whether changes in the slide transition panel should be previewed.</desc>
- <label>Automatic preview for slide transition panel</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="Display" oor:type="xs:int">
- <!-- OldPath: -->
- <!-- OldLocation: -->
- <!-- UIHints: slide show settings display listbox -->
- <info>
- <author>CL</author>
- <desc>Number of the display used for full screen slide show mode.</desc>
- <label>Display for full screen slide show mode</label>
- </info>
- <value>0</value>
- </prop>
- <group oor:name="TextObject">
- <info>
- <desc>Contains text editing related configuration items.</desc>
- </info>
- <prop oor:name="QuickEditing" oor:type="xs:boolean">
- <!-- OldPath: Impress/Other/Text_Objects -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Other [Section] Text objects -->
- <info>
- <desc>Indicates whether a simple click on a text object changes it to edit mode.</desc>
- <label>Allow quick editing</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="Selectable" oor:type="xs:boolean">
- <!-- OldPath: Impress/Other/Text_Objects -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Other [Section] Text objects -->
- <info>
- <desc>Indicates whether a text frame can only be selected by clicking on the text or by clicking somewhere in the frame.</desc>
- <label>Only text area selectable</label>
- </info>
- <value>true</value>
- </prop>
- </group>
- <group oor:name="NewDoc">
- <info>
- <desc>Specifies configuration items governing the behavior when creating a new document or a new page.</desc>
- <label>Start with AutoPilots</label>
- </info>
- <prop oor:name="AutoPilot" oor:type="xs:boolean">
- <!-- OldPath: Impress/Other/New_Doc -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Other [Section] New document -->
- <info>
- <desc>Indicates whether to show the autopilot when creating a new presentation.</desc>
- <label>Start with AutoPilots</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="Layout" oor:type="xs:boolean">
- <!-- OldPath: Impress/Other/New_Doc -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Other [Section] New document -->
- <info>
- <desc>Indicates whether to show the layout dialog when creating a new page.</desc>
- <label>Start with AutoPilots</label>
- </info>
- <value>true</value>
- </prop>
- </group>
- <group oor:name="Start">
- <info>
- <desc>Specifies configuration items governing behavior when starting a presentation.</desc>
- </info>
- <prop oor:name="CurrentPage" oor:type="xs:boolean">
- <!-- OldPath: Impress/Other/Start -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Other [Section] Start presentation -->
- <info>
- <desc>Indicates whether to start the presentation with the current (true) or the first (false) page.</desc>
- <label>Always with current page</label>
- </info>
- <value>true</value>
- </prop>
- </group>
- <group oor:name="Compatibility">
- <info>
- <desc>Contains the group of options that control the compatibility to other applications.</desc>
- <label>Compatibility options.</label>
- </info>
- <prop oor:name="AddBetween" oor:type="xs:boolean">
- <!-- OldPath: Writer/Other/Compatibility -->
- <!-- UIHints: Tools - Options - Presentation - Other - [Section] Compatibility -->
- <info>
- <author>SJ</author>
- <desc>Specifies if spacing between paragraphs should be added to ensure compatibility to MS Word documents</desc>
- <label>Add spacing between paragraphs</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="PrinterIndependentLayout" oor:type="xs:short">
- <!-- UIHints: Tools - Options - Presentation - Other - [Section] Compatibility -->
- <info>
- <author>AF</author>
- <desc>Indicates whether to use printer independent metrics for document formatting (2) or to use metrics derived from the current printer (1). Refer to com::sun::star::document::PrinterIndependentLayout for valid values.</desc>
- <label>Use printer independent metrics for document formatting</label>
- </info>
- <value>2</value>
- </prop>
- </group>
- <group oor:name="DefaultObjectSize">
- <!-- OldPath: -->
- <!-- OldLocation: -->
- <!-- UIHints: Default size for newly created objects when using CTRL-Return or CTRL-Klick -->
- <info>
- <author>AW</author>
- <desc>Defines the default size of newly created objects using CTRL-Return or CTRL-Click at a object creating Button.</desc>
- <label>Default Object Size</label>
- </info>
- <prop oor:name="Width" oor:type="xs:int">
- <info>
- <desc>[UNIT=1/100 mm]</desc>
- <label/>
- </info>
- <value>8000</value>
- </prop>
- <prop oor:name="Height" oor:type="xs:int">
- <info>
- <desc>[UNIT=1/100 mm]</desc>
- <label/>
- </info>
- <value>5000</value>
- </prop>
- </group>
- </group>
- <group oor:name="Snap">
- <info>
- <desc>Specifies how to force object positions and sizes to the snap grid or to align with other objects.</desc>
- </info>
- <group oor:name="Object">
- <info>
- <desc>Specifies how to force object positions and sizes to predefined locations in relation to other objects.</desc>
- </info>
- <prop oor:name="Grid" oor:type="xs:boolean">
- <!-- OldPath: Impress/Snap/Objects -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to -->
- <info>
- <desc>Indicates whether to snap an object when moved to the next grid point.</desc>
- <label>Grid lines</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="SnapLine" oor:type="xs:boolean">
- <!-- OldPath: Impress/Snap/Objects -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to -->
- <info>
- <desc>Indicates whether to snap at snap lines.</desc>
- <label>Snap lines</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="PageMargin" oor:type="xs:boolean">
- <!-- OldPath: Impress/Snap/Objects -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to -->
- <info>
- <desc>Indicates whether the outline of an object is justified with adjacent page margins.</desc>
- <label>Page margins</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="ObjectFrame" oor:type="xs:boolean">
- <!-- OldPath: Impress/Snap/Objects -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to -->
- <info>
- <desc>Indicates whether to justify the outline of an object to that of an adjacent object.</desc>
- <label>Object frame</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="ObjectPoint" oor:type="xs:boolean">
- <!-- OldPath: Impress/Snap/Objects -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to -->
- <info>
- <desc>Indicates whether to snap corner points of adjacent objects.</desc>
- <label>Object points</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="Range" oor:type="xs:int">
- <!-- OldPath: Impress/Snap/Objects -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to -->
- <info>
- <desc>Specifies the maximal range in pixels along the coordinate axes at which snapping becomes active.</desc>
- <label>Snap range</label>
- </info>
- <constraints>
- <minInclusive oor:value="1">
- <info>
- <desc>Specifies that the minimum snap range is 1.</desc>
- </info>
- </minInclusive>
- <maxInclusive oor:value="50">
- <info>
- <desc>Specifies that the maximal snap range is 50.</desc>
- </info>
- </maxInclusive>
- </constraints>
- <value>5</value>
- </prop>
- </group>
- <group oor:name="Position">
- <info>
- <desc>Specifies constraints regarding the creation and modification of graphical objects.</desc>
- </info>
- <prop oor:name="CreatingMoving" oor:type="xs:boolean">
- <!-- OldPath: Impress/Snap/Position -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position -->
- <info>
- <desc>Indicates whether to restrict the creation of objects to squares, circles, etc. and to retain the x/y ratio when resizing.</desc>
- <label>When creating or moving objects</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="ExtendEdges" oor:type="xs:boolean">
- <!-- OldPath: Impress/Snap/Position -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position -->
- <info>
- <desc>Indicates whether to use the longer (true) or the shorter (false) of the two distances along the coordinates axes from the initial to the current position to determine a new square&apos;s edge length or a new circle&apos;s diameter.</desc>
- <label>Extend edges</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="Rotating" oor:type="xs:boolean">
- <!-- OldPath: Impress/Snap/Position -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position -->
- <info>
- <desc>Indicates whether to use snapping while rotating an object.</desc>
- <label>When rotating</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="RotatingValue" oor:type="xs:int">
- <!-- OldPath: Impress/Snap/Position -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position -->
- <info>
- <desc>Specifies the rotation angle when snapping for rotation is enabled. [UNIT=Degree/100]</desc>
- <label>When rotating</label>
- </info>
- <constraints>
- <minInclusive oor:value="0">
- <info>
- <desc>Specifies that the minimum rotation angle is 0/100 degrees.</desc>
- </info>
- </minInclusive>
- <maxInclusive oor:value="18000">
- <info>
- <desc>Specifies that the maximum rotation angle is 18000/100 degrees.</desc>
- </info>
- </maxInclusive>
- </constraints>
- <value>1500</value>
- </prop>
- <prop oor:name="PointReduction" oor:type="xs:int">
- <!-- OldPath: Impress/Snap/Position -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position -->
- <info>
- <desc>Specifies the maximum angle that you can move a line before it snaps into place in the point editor that connects two points [UNIT=Degree/100].</desc>
- <label>Point reduction</label>
- </info>
- <constraints>
- <minInclusive oor:value="100">
- <info>
- <desc>Specifies that the minimum angle is 100/100 degrees.</desc>
- </info>
- </minInclusive>
- <maxInclusive oor:value="9000">
- <info>
- <desc>Specifies that the maximum angle is 9000/100 degrees.</desc>
- </info>
- </maxInclusive>
- </constraints>
- <value>1500</value>
- </prop>
- </group>
- </group>
- <group oor:name="Grid">
- <info>
- <desc>Defines the handling and display of the snap grid.</desc>
- </info>
- <group oor:name="Option">
- <info>
- <desc>Specifies switches regarding use and display of the snap grid.</desc>
- </info>
- <prop oor:name="SnapToGrid" oor:type="xs:boolean">
- <!-- OldPath: Impress/Grid/Options -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Grid - [Section] Options -->
- <info>
- <desc>Indicates whether to force frames and drawing elements on grid points.</desc>
- <label>Snap to grid</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="VisibleGrid" oor:type="xs:boolean">
- <!-- OldPath: Impress/Grid/Options -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Grid - [Section] Options -->
- <info>
- <desc>Indicates whether to show the grid.</desc>
- <label>Visible grid</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="Synchronize" oor:type="xs:boolean">
- <!-- OldPath: Impress/Grid/Options -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Grid - [Section] Options -->
- <info>
- <desc>Indicates whether to synchronize the resolutions of x- and y-grids.</desc>
- <label>Synchronize axes</label>
- </info>
- <value>false</value>
- </prop>
- </group>
- <group oor:name="Resolution">
- <info>
- <desc>Specifies grid resolution.</desc>
- </info>
- <group oor:name="XAxis">
- <!-- OldPath: Impress/Grid/Resolution -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Grid - [Section] Grid -->
- <!-- Notice: Default-nonmetrical value: 1270 1/100 mm. -->
- <info>
- <desc>Defines the horizontal distance between adjacent grid points.</desc>
- <label>X Axis Resolution</label>
- </info>
- <prop oor:name="Metric" oor:type="xs:int">
- <info>
- <desc>Defines the horizontal distance between adjacent grid points in 1/100 mm, used when the metric system is active.</desc>
- <label/>
- </info>
- <value>1000</value>
- </prop>
- <prop oor:name="NonMetric" oor:type="xs:int">
- <info>
- <desc>Defines the horizontal distance between adjacent grid points in 1/100 mm, used when the non-metric system is active.</desc>
- <label/>
- </info>
- <value>1270</value>
- </prop>
- </group>
- <group oor:name="YAxis">
- <!-- OldPath: Impress/Grid/Resolution -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Grid - [Section] Grid -->
- <!-- Notice: Default- nonmerical value: 1270 1/100 mm. -->
- <info>
- <desc>Defines the vertical distance between adjacent grid points.</desc>
- <label>Y Axis Resolution</label>
- </info>
- <prop oor:name="Metric" oor:type="xs:int">
- <info>
- <desc>Defines the vertical distance between adjacent grid points in 1/100 mm, used when the metric system is active.</desc>
- <label/>
- </info>
- <value>1000</value>
- </prop>
- <prop oor:name="NonMetric" oor:type="xs:int">
- <info>
- <desc>Defines the vertical distance between adjacent grid points in 1/100 mm, used when the non-metric system is active.</desc>
- <label/>
- </info>
- <value>1270</value>
- </prop>
- </group>
- </group>
- <group oor:name="Subdivision">
- <info>
- <desc>Specifies the subdivision of the grid.</desc>
- </info>
- <prop oor:name="XAxis" oor:type="xs:double">
- <!-- OldPath: Impress/Grid/Subdivision -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Grid - [Section] Grid -->
- <!-- Notice: Default value for English Version only: 254 Points) -->
- <info>
- <desc>Specifies the number of points between two adjacent grid points on the X axis.</desc>
- <label>X Axis Subdivision</label>
- </info>
- <value>1</value>
- </prop>
- <prop oor:name="YAxis" oor:type="xs:double">
- <!-- OldPath: Impress/Grid/Subdivision -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Grid - [Section] Grid -->
- <!-- Notice: Default value for English Version only: 254 Points) -->
- <info>
- <desc>Specifies the number of intervals between two adjacent grid points on the Y axis</desc>
- <label>Y Axis Subdivision</label>
- </info>
- <value>1</value>
- </prop>
- </group>
- <group oor:name="SnapGrid">
- <info>
- <desc>Contains the specifications of the snap grid.</desc>
- </info>
- <prop oor:name="Size" oor:type="xs:boolean">
- <!-- OldPath: Impress/Grid/Snap_Grid -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Grid - [Section] Snap grid -->
- <info>
- <desc>Indicates whether to synchronize grid and snap-grid.</desc>
- <label>Size to grid</label>
- </info>
- <value>true</value>
- </prop>
- <group oor:name="XAxis">
- <!-- OldPath: Impress/Grid/Snap_Grid -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Grid - [Section] Snap grid -->
- <!-- Notice: Default-nonmetrical value: 1270 1/100 mm. -->
- <info>
- <desc>Defines the horizontal distance between adjacent points of the snap grid.</desc>
- <label>X axis</label>
- </info>
- <prop oor:name="Metric" oor:type="xs:int">
- <info>
- <desc>Defines the horizontal distance between adjacent points of the snap grid in 1/100 mm, used when the metric system is selected.</desc>
- <label/>
- </info>
- <value>1000</value>
- </prop>
- <prop oor:name="NonMetric" oor:type="xs:int">
- <info>
- <desc>Defines the horizontal distance between adjacent points of the snap grid in 1/100 mm, used when the non-metric system is selected.</desc>
- <label/>
- </info>
- <value>1270</value>
- </prop>
- </group>
- <group oor:name="YAxis">
- <!-- OldPath: Impress/Grid/Snap_Grid -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Grid - [Section] Snap grid -->
- <!-- Notice: Default-Default-nonmetrical value: 1270 1/100 mm. -->
- <info>
- <desc>Defines the vertical distance between adjacent points of the snap grid.</desc>
- <label>Y axis</label>
- </info>
- <prop oor:name="Metric" oor:type="xs:int">
- <info>
- <desc>Defines the vertical distance between adjacent points of the snap grid in 1/100 mm, used when the metric system is selected.</desc>
- <label/>
- </info>
- <value>1000</value>
- </prop>
- <prop oor:name="NonMetric" oor:type="xs:int">
- <info>
- <desc>Defines the vertical distance between adjacent points of the snap grid in 1/100 mm, used when the non-metric system is selected.</desc>
- <label/>
- </info>
- <value>1270</value>
- </prop>
- </group>
- </group>
- </group>
- <group oor:name="Print">
- <info>
- <desc>Defines options regarding the printing of Impress documents.</desc>
- </info>
- <group oor:name="Content">
- <info>
- <desc>Defines options regarding the printing of document content.</desc>
- </info>
- <prop oor:name="Presentation" oor:type="xs:boolean">
- <!-- OldPath: Impress/Print/Contents -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Print - [Section] Contents -->
- <info>
- <desc>Indicates whether the presentation will be printed.</desc>
- <label>Presentation</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="Note" oor:type="xs:boolean">
- <!-- OldPath: Impress/Print/Contents -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Print - [Section] Contents -->
- <info>
- <desc>Indicates whether the notes will be printed.</desc>
- <label>Notes</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="Handout" oor:type="xs:boolean">
- <!-- OldPath: Impress/Print/Contents -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Print - [Section] Contents -->
- <info>
- <desc>Indicates whether the handouts will be printed.</desc>
- <label>Handouts</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="Outline" oor:type="xs:boolean">
- <!-- OldPath: Impress/Print/Contents -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Print - [Section] Contents -->
- <info>
- <desc>Indicates whether the outlines will be printed.</desc>
- <label>Outline</label>
- </info>
- <value>false</value>
- </prop>
- </group>
- <group oor:name="Page">
- <info>
- <desc>Specifies how and which pages will be printed.</desc>
- </info>
- <prop oor:name="PageSize" oor:type="xs:boolean">
- <!-- OldPath: Impress/Print/Page -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options -->
- <info>
- <desc>Indicates whether to enlarge or shrink a document&apos;s page size while printing to fit the physical paper size.</desc>
- <label>Fit to page</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="PageTile" oor:type="xs:boolean">
- <!-- OldPath: Impress/Print/Page -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options -->
- <info>
- <desc>Indicates whether to print the pages&apos; titles at the top of every page.</desc>
- <label>Tile pages</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="Booklet" oor:type="xs:boolean">
- <!-- OldPath: Impress/Print/Page -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options -->
- <info>
- <desc>Indicates whether to print a document in the form of a brochure.</desc>
- <label>Brochure</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="BookletFront" oor:type="xs:boolean">
- <!-- OldPath: Impress/Print/Page -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options -->
- <info>
- <desc>Indicates whether to print the front side pages of a brochure.</desc>
- <label>Front side</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="BookletBack" oor:type="xs:boolean">
- <!-- OldPath: Impress/Print/Page -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options -->
- <info>
- <desc>Indicates whether to print the back side pages of a brochure.</desc>
- <label>Back side</label>
- </info>
- <value>true</value>
- </prop>
- </group>
- <group oor:name="Other">
- <info>
- <desc>Specifies general printing related issues.</desc>
- </info>
- <prop oor:name="PageName" oor:type="xs:boolean">
- <!-- OldPath: Impress/Print -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Print - [Section] Print -->
- <info>
- <desc>Indicates whether to print page names.</desc>
- <label>Page name</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="Date" oor:type="xs:boolean">
- <!-- OldPath: Impress/Print -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Print - [Section] Print -->
- <info>
- <desc>Indicates whether to print the current date at the top of every page.</desc>
- <label>Date</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="Time" oor:type="xs:boolean">
- <!-- OldPath: Impress/Print -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Print - [Section] Print -->
- <info>
- <desc>Indicates whether to print the current time at the top of every page.</desc>
- <label>Time</label>
- </info>
- <value>false</value>
- </prop>
- <prop oor:name="HiddenPage" oor:type="xs:boolean">
- <!-- OldPath: Impress/Print -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Print - [Section] Print -->
- <info>
- <desc>Indicates whether to print hidden pages.</desc>
- <label>Hidden pages</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="Quality" oor:type="xs:int">
- <!-- OldPath: Impress/Print -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Print - [Section] Quality -->
- <info>
- <desc>Specifies the quality of the printed colors.</desc>
- </info>
- <constraints>
- <enumeration oor:value="0">
- <info>
- <desc>Color</desc>
- </info>
- </enumeration>
- <enumeration oor:value="1">
- <info>
- <desc>Grayscale</desc>
- </info>
- </enumeration>
- <enumeration oor:value="2">
- <info>
- <desc>Black/White</desc>
- </info>
- </enumeration>
- </constraints>
- <value>0</value>
- </prop>
- <prop oor:name="FromPrinterSetup" oor:type="xs:boolean">
- <!-- OldPath: Impress/Print -->
- <!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: Tools - Options - Presentation Print [Check box] From printer setup -->
- <info>
- <desc>Indicates whether to use the system settings of the printer to choose the paper tray.</desc>
- <label>From printer setup</label>
- </info>
- <value>false</value>
- </prop>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="ShowUndoDeleteWarning" oor:type="xs:boolean">
+ <!-- OldPath: -->
+ <!-- OldLocation: -->
+ <!-- UIHints: UNDO stack delete warnng dialog -->
+ <info>
+ <author>AW</author>
+ <desc>Indicates whether the warning dialog appears when setting a new standard page layout.</desc>
+ <label>Show Undo-Stack Delete Warning</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="SlideshowRespectZOrder" oor:type="xs:boolean">
+ <!-- OldPath: -->
+ <!-- OldLocation: -->
+ <!-- UIHints: Slideshow Z order for animations -->
+ <info>
+ <author>THB</author>
+ <desc>Indicates whether the slideshow should respect shape z-order while animating shapes. Disabling this can improve slideshow performance</desc>
+ <label>Enable shape z-order during slideshow animations</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="TransitionFiles" oor:type="oor:string-list">
+ <!-- OldPath: -->
+ <!-- OldLocation: -->
+ <!-- UIHints: List of files containing transition effects -->
+ <info>
+ <author>THB</author>
+ <desc>
+ Contains a list of odf files, that define
+ slideshow transitions. Values are put through
+ macro expansion, so, vnd.sun.star.expand prefix
+ is allowed.
+ </desc>
+ <label>List of files containing transition effects</label>
+ </info>
+ <value oor:separator=";">vnd.sun.star.expand:$OOO_BASE_DIR/share/config/soffice.cfg/simpress/transitions.xml</value>
+ </prop>
+ <prop oor:name="EffectFiles" oor:type="oor:string-list">
+ <!-- OldPath: -->
+ <!-- OldLocation: -->
+ <!-- UIHints: List of files containing object effects -->
+ <info>
+ <author>THB</author>
+ <desc>
+ Contains a list of odf files, that define
+ slideshow shape effects. Values are put through
+ macro expansion, so, vnd.sun.star.expand prefix
+ is allowed.
+ </desc>
+ <label>List of files containing object effects</label>
+ </info>
+ <value oor:separator=";">vnd.sun.star.expand:$OOO_BASE_DIR/share/config/soffice.cfg/simpress/effects.xml</value>
+ </prop>
+ <prop oor:name="PreviewNewEffects" oor:type="xs:boolean">
+ <!-- OldPath: -->
+ <!-- OldLocation: -->
+ <!-- UIHints: automatic preview checkbox in create new effect dialog -->
+ <info>
+ <author>CL</author>
+ <desc>Indicates whether a selected effect in the custom animation create dialog should be previewed.</desc>
+ <label>Automatic preview for new custom animation</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="PreviewChangedEffects" oor:type="xs:boolean">
+ <!-- OldPath: -->
+ <!-- OldLocation: -->
+ <!-- UIHints: automatic preview in custom animation panel -->
+ <info>
+ <author>CL</author>
+ <desc>Indicates whether changes in the custom animation panel should be previewed.</desc>
+ <label>Automatic preview for custom animation panel</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="PreviewTransitions" oor:type="xs:boolean">
+ <!-- OldPath: -->
+ <!-- OldLocation: -->
+ <!-- UIHints: automatic preview in slide transtion panel -->
+ <info>
+ <author>CL</author>
+ <desc>Indicates whether changes in the slide transition panel should be previewed.</desc>
+ <label>Automatic preview for slide transition panel</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="Display" oor:type="xs:int">
+ <!-- OldPath: -->
+ <!-- OldLocation: -->
+ <!-- UIHints: slide show settings display listbox -->
+ <info>
+ <author>CL</author>
+ <desc>Number of the display used for full screen slide show mode.</desc>
+ <label>Display for full screen slide show mode</label>
+ </info>
+ <value>0</value>
+ </prop>
+ <group oor:name="TextObject">
+ <info>
+ <desc>Contains text editing related configuration items.</desc>
+ </info>
+ <prop oor:name="QuickEditing" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Other/Text_Objects -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Other [Section] Text objects -->
+ <info>
+ <desc>Indicates whether a simple click on a text object changes it to edit mode.</desc>
+ <label>Allow quick editing</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="Selectable" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Other/Text_Objects -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Other [Section] Text objects -->
+ <info>
+ <desc>Indicates whether a text frame can only be selected by clicking on the text or by clicking somewhere in the frame.</desc>
+ <label>Only text area selectable</label>
+ </info>
+ <value>true</value>
+ </prop>
+ </group>
+ <group oor:name="NewDoc">
+ <info>
+ <desc>Specifies configuration items governing the behavior when creating a new document or a new page.</desc>
+ <label>Start with AutoPilots</label>
+ </info>
+ <prop oor:name="AutoPilot" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Other/New_Doc -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Other [Section] New document -->
+ <info>
+ <desc>Indicates whether to show the autopilot when creating a new presentation.</desc>
+ <label>Start with AutoPilots</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="Layout" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Other/New_Doc -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Other [Section] New document -->
+ <info>
+ <desc>Indicates whether to show the layout dialog when creating a new page.</desc>
+ <label>Start with AutoPilots</label>
+ </info>
+ <value>true</value>
+ </prop>
+ </group>
+ <group oor:name="Start">
+ <info>
+ <desc>Specifies configuration items governing behavior when starting a presentation.</desc>
+ </info>
+ <prop oor:name="CurrentPage" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Other/Start -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Other [Section] Start presentation -->
+ <info>
+ <desc>Indicates whether to start the presentation with the current (true) or the first (false) page.</desc>
+ <label>Always with current page</label>
+ </info>
+ <value>true</value>
+ </prop>
+ </group>
+ <group oor:name="Compatibility">
+ <info>
+ <desc>Contains the group of options that control the compatibility to other applications.</desc>
+ <label>Compatibility options.</label>
+ </info>
+ <prop oor:name="AddBetween" oor:type="xs:boolean">
+ <!-- OldPath: Writer/Other/Compatibility -->
+ <!-- UIHints: Tools - Options - Presentation - Other - [Section] Compatibility -->
+ <info>
+ <author>SJ</author>
+ <desc>Specifies if spacing between paragraphs should be added to ensure compatibility to MS Word documents</desc>
+ <label>Add spacing between paragraphs</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="PrinterIndependentLayout" oor:type="xs:short">
+ <!-- UIHints: Tools - Options - Presentation - Other - [Section] Compatibility -->
+ <info>
+ <author>AF</author>
+ <desc>Indicates whether to use printer independent metrics for document formatting (2) or to use metrics derived from the current printer (1). Refer to com::sun::star::document::PrinterIndependentLayout for valid values.</desc>
+ <label>Use printer independent metrics for document formatting</label>
+ </info>
+ <value>2</value>
+ </prop>
+ </group>
+ <group oor:name="DefaultObjectSize">
+ <!-- OldPath: -->
+ <!-- OldLocation: -->
+ <!-- UIHints: Default size for newly created objects when using CTRL-Return or CTRL-Klick -->
+ <info>
+ <author>AW</author>
+ <desc>Defines the default size of newly created objects using CTRL-Return or CTRL-Click at a object creating Button.</desc>
+ <label>Default Object Size</label>
+ </info>
+ <prop oor:name="Width" oor:type="xs:int">
+ <info>
+ <desc>[UNIT=1/100 mm]</desc>
+ <label/>
+ </info>
+ <value>8000</value>
+ </prop>
+ <prop oor:name="Height" oor:type="xs:int">
+ <info>
+ <desc>[UNIT=1/100 mm]</desc>
+ <label/>
+ </info>
+ <value>5000</value>
+ </prop>
+ </group>
+ </group>
+ <group oor:name="Snap">
+ <info>
+ <desc>Specifies how to force object positions and sizes to the snap grid or to align with other objects.</desc>
+ </info>
+ <group oor:name="Object">
+ <info>
+ <desc>Specifies how to force object positions and sizes to predefined locations in relation to other objects.</desc>
+ </info>
+ <prop oor:name="Grid" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Snap/Objects -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to -->
+ <info>
+ <desc>Indicates whether to snap an object when moved to the next grid point.</desc>
+ <label>Grid lines</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="SnapLine" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Snap/Objects -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to -->
+ <info>
+ <desc>Indicates whether to snap at snap lines.</desc>
+ <label>Snap lines</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="PageMargin" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Snap/Objects -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to -->
+ <info>
+ <desc>Indicates whether the outline of an object is justified with adjacent page margins.</desc>
+ <label>Page margins</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="ObjectFrame" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Snap/Objects -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to -->
+ <info>
+ <desc>Indicates whether to justify the outline of an object to that of an adjacent object.</desc>
+ <label>Object frame</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="ObjectPoint" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Snap/Objects -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to -->
+ <info>
+ <desc>Indicates whether to snap corner points of adjacent objects.</desc>
+ <label>Object points</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="Range" oor:type="xs:int">
+ <!-- OldPath: Impress/Snap/Objects -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to -->
+ <info>
+ <desc>Specifies the maximal range in pixels along the coordinate axes at which snapping becomes active.</desc>
+ <label>Snap range</label>
+ </info>
+ <constraints>
+ <minInclusive oor:value="1">
+ <info>
+ <desc>Specifies that the minimum snap range is 1.</desc>
+ </info>
+ </minInclusive>
+ <maxInclusive oor:value="50">
+ <info>
+ <desc>Specifies that the maximal snap range is 50.</desc>
+ </info>
+ </maxInclusive>
+ </constraints>
+ <value>5</value>
+ </prop>
+ </group>
+ <group oor:name="Position">
+ <info>
+ <desc>Specifies constraints regarding the creation and modification of graphical objects.</desc>
+ </info>
+ <prop oor:name="CreatingMoving" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Snap/Position -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position -->
+ <info>
+ <desc>Indicates whether to restrict the creation of objects to squares, circles, etc. and to retain the x/y ratio when resizing.</desc>
+ <label>When creating or moving objects</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="ExtendEdges" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Snap/Position -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position -->
+ <info>
+ <desc>Indicates whether to use the longer (true) or the shorter (false) of the two distances along the coordinates axes from the initial to the current position to determine a new square&apos;s edge length or a new circle&apos;s diameter.</desc>
+ <label>Extend edges</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="Rotating" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Snap/Position -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position -->
+ <info>
+ <desc>Indicates whether to use snapping while rotating an object.</desc>
+ <label>When rotating</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="RotatingValue" oor:type="xs:int">
+ <!-- OldPath: Impress/Snap/Position -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position -->
+ <info>
+ <desc>Specifies the rotation angle when snapping for rotation is enabled. [UNIT=Degree/100]</desc>
+ <label>When rotating</label>
+ </info>
+ <constraints>
+ <minInclusive oor:value="0">
+ <info>
+ <desc>Specifies that the minimum rotation angle is 0/100 degrees.</desc>
+ </info>
+ </minInclusive>
+ <maxInclusive oor:value="18000">
+ <info>
+ <desc>Specifies that the maximum rotation angle is 18000/100 degrees.</desc>
+ </info>
+ </maxInclusive>
+ </constraints>
+ <value>1500</value>
+ </prop>
+ <prop oor:name="PointReduction" oor:type="xs:int">
+ <!-- OldPath: Impress/Snap/Position -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position -->
+ <info>
+ <desc>Specifies the maximum angle that you can move a line before it snaps into place in the point editor that connects two points [UNIT=Degree/100].</desc>
+ <label>Point reduction</label>
+ </info>
+ <constraints>
+ <minInclusive oor:value="100">
+ <info>
+ <desc>Specifies that the minimum angle is 100/100 degrees.</desc>
+ </info>
+ </minInclusive>
+ <maxInclusive oor:value="9000">
+ <info>
+ <desc>Specifies that the maximum angle is 9000/100 degrees.</desc>
+ </info>
+ </maxInclusive>
+ </constraints>
+ <value>1500</value>
+ </prop>
+ </group>
+ </group>
+ <group oor:name="Grid">
+ <info>
+ <desc>Defines the handling and display of the snap grid.</desc>
+ </info>
+ <group oor:name="Option">
+ <info>
+ <desc>Specifies switches regarding use and display of the snap grid.</desc>
+ </info>
+ <prop oor:name="SnapToGrid" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Grid/Options -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Grid - [Section] Options -->
+ <info>
+ <desc>Indicates whether to force frames and drawing elements on grid points.</desc>
+ <label>Snap to grid</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="VisibleGrid" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Grid/Options -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Grid - [Section] Options -->
+ <info>
+ <desc>Indicates whether to show the grid.</desc>
+ <label>Visible grid</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="Synchronize" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Grid/Options -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Grid - [Section] Options -->
+ <info>
+ <desc>Indicates whether to synchronize the resolutions of x- and y-grids.</desc>
+ <label>Synchronize axes</label>
+ </info>
+ <value>false</value>
+ </prop>
+ </group>
+ <group oor:name="Resolution">
+ <info>
+ <desc>Specifies grid resolution.</desc>
+ </info>
+ <group oor:name="XAxis">
+ <!-- OldPath: Impress/Grid/Resolution -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Grid - [Section] Grid -->
+ <!-- Notice: Default-nonmetrical value: 1270 1/100 mm. -->
+ <info>
+ <desc>Defines the horizontal distance between adjacent grid points.</desc>
+ <label>X Axis Resolution</label>
+ </info>
+ <prop oor:name="Metric" oor:type="xs:int">
+ <info>
+ <desc>Defines the horizontal distance between adjacent grid points in 1/100 mm, used when the metric system is active.</desc>
+ <label/>
+ </info>
+ <value>1000</value>
+ </prop>
+ <prop oor:name="NonMetric" oor:type="xs:int">
+ <info>
+ <desc>Defines the horizontal distance between adjacent grid points in 1/100 mm, used when the non-metric system is active.</desc>
+ <label/>
+ </info>
+ <value>1270</value>
+ </prop>
+ </group>
+ <group oor:name="YAxis">
+ <!-- OldPath: Impress/Grid/Resolution -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Grid - [Section] Grid -->
+ <!-- Notice: Default- nonmerical value: 1270 1/100 mm. -->
+ <info>
+ <desc>Defines the vertical distance between adjacent grid points.</desc>
+ <label>Y Axis Resolution</label>
+ </info>
+ <prop oor:name="Metric" oor:type="xs:int">
+ <info>
+ <desc>Defines the vertical distance between adjacent grid points in 1/100 mm, used when the metric system is active.</desc>
+ <label/>
+ </info>
+ <value>1000</value>
+ </prop>
+ <prop oor:name="NonMetric" oor:type="xs:int">
+ <info>
+ <desc>Defines the vertical distance between adjacent grid points in 1/100 mm, used when the non-metric system is active.</desc>
+ <label/>
+ </info>
+ <value>1270</value>
+ </prop>
+ </group>
+ </group>
+ <group oor:name="Subdivision">
+ <info>
+ <desc>Specifies the subdivision of the grid.</desc>
+ </info>
+ <prop oor:name="XAxis" oor:type="xs:double">
+ <!-- OldPath: Impress/Grid/Subdivision -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Grid - [Section] Grid -->
+ <!-- Notice: Default value for English Version only: 254 Points) -->
+ <info>
+ <desc>Specifies the number of points between two adjacent grid points on the X axis.</desc>
+ <label>X Axis Subdivision</label>
+ </info>
+ <value>1</value>
+ </prop>
+ <prop oor:name="YAxis" oor:type="xs:double">
+ <!-- OldPath: Impress/Grid/Subdivision -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Grid - [Section] Grid -->
+ <!-- Notice: Default value for English Version only: 254 Points) -->
+ <info>
+ <desc>Specifies the number of intervals between two adjacent grid points on the Y axis</desc>
+ <label>Y Axis Subdivision</label>
+ </info>
+ <value>1</value>
+ </prop>
+ </group>
+ <group oor:name="SnapGrid">
+ <info>
+ <desc>Contains the specifications of the snap grid.</desc>
+ </info>
+ <prop oor:name="Size" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Grid/Snap_Grid -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Grid - [Section] Snap grid -->
+ <info>
+ <desc>Indicates whether to synchronize grid and snap-grid.</desc>
+ <label>Size to grid</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <group oor:name="XAxis">
+ <!-- OldPath: Impress/Grid/Snap_Grid -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Grid - [Section] Snap grid -->
+ <!-- Notice: Default-nonmetrical value: 1270 1/100 mm. -->
+ <info>
+ <desc>Defines the horizontal distance between adjacent points of the snap grid.</desc>
+ <label>X axis</label>
+ </info>
+ <prop oor:name="Metric" oor:type="xs:int">
+ <info>
+ <desc>Defines the horizontal distance between adjacent points of the snap grid in 1/100 mm, used when the metric system is selected.</desc>
+ <label/>
+ </info>
+ <value>1000</value>
+ </prop>
+ <prop oor:name="NonMetric" oor:type="xs:int">
+ <info>
+ <desc>Defines the horizontal distance between adjacent points of the snap grid in 1/100 mm, used when the non-metric system is selected.</desc>
+ <label/>
+ </info>
+ <value>1270</value>
+ </prop>
+ </group>
+ <group oor:name="YAxis">
+ <!-- OldPath: Impress/Grid/Snap_Grid -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Grid - [Section] Snap grid -->
+ <!-- Notice: Default-Default-nonmetrical value: 1270 1/100 mm. -->
+ <info>
+ <desc>Defines the vertical distance between adjacent points of the snap grid.</desc>
+ <label>Y axis</label>
+ </info>
+ <prop oor:name="Metric" oor:type="xs:int">
+ <info>
+ <desc>Defines the vertical distance between adjacent points of the snap grid in 1/100 mm, used when the metric system is selected.</desc>
+ <label/>
+ </info>
+ <value>1000</value>
+ </prop>
+ <prop oor:name="NonMetric" oor:type="xs:int">
+ <info>
+ <desc>Defines the vertical distance between adjacent points of the snap grid in 1/100 mm, used when the non-metric system is selected.</desc>
+ <label/>
+ </info>
+ <value>1270</value>
+ </prop>
+ </group>
+ </group>
+ </group>
+ <group oor:name="Print">
+ <info>
+ <desc>Defines options regarding the printing of Impress documents.</desc>
+ </info>
+ <group oor:name="Content">
+ <info>
+ <desc>Defines options regarding the printing of document content.</desc>
+ </info>
+ <prop oor:name="Presentation" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Print/Contents -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Print - [Section] Contents -->
+ <info>
+ <desc>Indicates whether the presentation will be printed.</desc>
+ <label>Presentation</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="Note" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Print/Contents -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Print - [Section] Contents -->
+ <info>
+ <desc>Indicates whether the notes will be printed.</desc>
+ <label>Notes</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="Handout" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Print/Contents -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Print - [Section] Contents -->
+ <info>
+ <desc>Indicates whether the handouts will be printed.</desc>
+ <label>Handouts</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="Outline" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Print/Contents -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Print - [Section] Contents -->
+ <info>
+ <desc>Indicates whether the outlines will be printed.</desc>
+ <label>Outline</label>
+ </info>
+ <value>false</value>
+ </prop>
+ </group>
+ <group oor:name="Page">
+ <info>
+ <desc>Specifies how and which pages will be printed.</desc>
+ </info>
+ <prop oor:name="PageSize" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Print/Page -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options -->
+ <info>
+ <desc>Indicates whether to enlarge or shrink a document&apos;s page size while printing to fit the physical paper size.</desc>
+ <label>Fit to page</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="PageTile" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Print/Page -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options -->
+ <info>
+ <desc>Indicates whether to print the pages&apos; titles at the top of every page.</desc>
+ <label>Tile pages</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="Booklet" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Print/Page -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options -->
+ <info>
+ <desc>Indicates whether to print a document in the form of a brochure.</desc>
+ <label>Brochure</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="BookletFront" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Print/Page -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options -->
+ <info>
+ <desc>Indicates whether to print the front side pages of a brochure.</desc>
+ <label>Front side</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="BookletBack" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Print/Page -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options -->
+ <info>
+ <desc>Indicates whether to print the back side pages of a brochure.</desc>
+ <label>Back side</label>
+ </info>
+ <value>true</value>
+ </prop>
+ </group>
+ <group oor:name="Other">
+ <info>
+ <desc>Specifies general printing related issues.</desc>
+ </info>
+ <prop oor:name="PageName" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Print -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Print - [Section] Print -->
+ <info>
+ <desc>Indicates whether to print page names.</desc>
+ <label>Page name</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="Date" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Print -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Print - [Section] Print -->
+ <info>
+ <desc>Indicates whether to print the current date at the top of every page.</desc>
+ <label>Date</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="Time" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Print -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Print - [Section] Print -->
+ <info>
+ <desc>Indicates whether to print the current time at the top of every page.</desc>
+ <label>Time</label>
+ </info>
+ <value>false</value>
+ </prop>
+ <prop oor:name="HiddenPage" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Print -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Print - [Section] Print -->
+ <info>
+ <desc>Indicates whether to print hidden pages.</desc>
+ <label>Hidden pages</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="Quality" oor:type="xs:int">
+ <!-- OldPath: Impress/Print -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Print - [Section] Quality -->
+ <info>
+ <desc>Specifies the quality of the printed colors.</desc>
+ </info>
+ <constraints>
+ <enumeration oor:value="0">
+ <info>
+ <desc>Color</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="1">
+ <info>
+ <desc>Grayscale</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="2">
+ <info>
+ <desc>Black/White</desc>
+ </info>
+ </enumeration>
+ </constraints>
+ <value>0</value>
+ </prop>
+ <prop oor:name="FromPrinterSetup" oor:type="xs:boolean">
+ <!-- OldPath: Impress/Print -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Presentation Print [Check box] From printer setup -->
+ <info>
+ <desc>Indicates whether to use the system settings of the printer to choose the paper tray.</desc>
+ <label>From printer setup</label>
+ </info>
+ <value>false</value>
+ </prop>
<prop oor:name="HandoutHorizontal" oor:type="xs:boolean">
<!-- UIHints: File - Print - [Section] Print content - [Radio buttons] Horizontal(TRUE)/Vertical(FALSE) -->
<info>
@@ -1179,7 +1188,8 @@
<label>Handout orientation</label>
</info>
<value>false</value>
- </prop> <prop oor:name="PagesPerHandout" oor:type="xs:int">
+ </prop>
+ <prop oor:name="PagesPerHandout" oor:type="xs:int">
<!-- UIHints: File - Print - [Section] Print content - [ListBox] Slides per page -->
<info>
<desc>Specifies the number of slide thumbnails printed on each handout page.</desc>
@@ -1219,274 +1229,292 @@
</constraints>
<value>0</value>
</prop>
- </group>
- </group>
- <group oor:name="Filter">
- <info>
- <desc>Contains the group of options that control the behavior of filters.</desc>
- <label>Filter Options</label>
- </info>
- <group oor:name="Import">
- <info>
- <desc>Contains the group of options that control the behavior of the import filters.</desc>
- <label>Import Filter</label>
- </info>
- <group oor:name="VBA">
- <info>
- <desc>Contains the group of options that control the behavior of the VBA filter.</desc>
- <label>VBA Filter</label>
- </info>
- <prop oor:name="Load" oor:type="xs:boolean">
- <!-- OldPath: Filter/MS_Office/Basic/PowerPoint -->
- <!-- OldLocation: soffice.cfg -->
- <!-- UIHints: Tools Options - Filter Settings Microsoft Office [Section] Microsoft PowerPoint 97/2000 -->
- <info>
- <author>OS</author>
- <desc>Converts VBA Basic into Office Basic as commands (True).</desc>
- <label>Load Basic Code to edit</label>
- </info>
- <value>true</value>
- </prop>
- <prop oor:name="Save" oor:type="xs:boolean">
- <!-- OldPath: Filter/MS_Office/Basic/PowerPoint -->
- <!-- OldLocation: soffice.cfg -->
- <!-- UIHints: Tools Options - Filter Settings Microsoft Office [Section] Microsoft PowerPoint 97/2000 -->
- <info>
- <author>OS</author>
- <desc>Holds original VBA storage for saving in the memory (True).</desc>
- <label>Save Original Basic Code again</label>
- </info>
- <value>true</value>
- </prop>
- </group>
- </group>
- <group oor:name="Export">
- <info>
- <desc>Exports related configuration items.</desc>
- </info>
- <prop oor:name="LastUsed" oor:type="xs:string">
- <!-- OldPath: STARIMPRESS -->
- <!-- OldLocation: soffice.ini -->
- <!-- UIHints: Set after export -->
- <info>
- <desc>Specifies the filter last used to export an Impress document.</desc>
- </info>
- <constraints>
- <enumeration oor:value="HTML">
- <info>
- <desc>HTML</desc>
- </info>
- </enumeration>
- <enumeration oor:value="BMP - MS Windows">
- <info>
- <desc>MS Windows bitmap</desc>
- </info>
- </enumeration>
- <enumeration oor:value="PNG - Portable Network Graphic">
- <info>
- <desc>Portable Network Graphic</desc>
- </info>
- </enumeration>
- <enumeration oor:value="EPS - Encapsulated PostScript">
- <info>
- <desc>Encapsulated PostScript</desc>
- </info>
- </enumeration>
- <enumeration oor:value="GIF - Graphic Interchange">
- <info>
- <desc>Graphic Interchange Format</desc>
- </info>
- </enumeration>
- <enumeration oor:value="JPG - JPEG">
- <info>
- <desc>JPEG</desc>
- </info>
- </enumeration>
- <enumeration oor:value="MET - OS/2 Metafile">
- <info>
- <desc>OS/2 Metafile</desc>
- </info>
- </enumeration>
- <enumeration oor:value="PCT - Mac Pict">
- <info>
- <desc>Mac Pict</desc>
- </info>
- </enumeration>
- <enumeration oor:value="PBM - Portable Bitmap">
- <info>
- <desc>Portable Bitmap</desc>
- </info>
- </enumeration>
- <enumeration oor:value="PGM - Portable Graymap">
- <info>
- <desc>Portable Graymap</desc>
- </info>
- </enumeration>
- <enumeration oor:value="PPM - Portable Pixelmap">
- <info>
- <desc>Portable Pixelmap</desc>
- </info>
- </enumeration>
- <enumeration oor:value="RAS - Sun Rasterfile">
- <info>
- <desc>Sun Rasterfile</desc>
- </info>
- </enumeration>
- <enumeration oor:value="SVM - StarView Metafile">
- <info>
- <desc>StarView Metafile</desc>
- </info>
- </enumeration>
- <enumeration oor:value="WMF - MS Windows Metafile">
- <info>
- <desc>MS Windows Metafile</desc>
- </info>
- </enumeration>
- <enumeration oor:value="XPM">
- <info>
- <desc>XPM</desc>
- </info>
- </enumeration>
- </constraints>
- </prop>
- </group>
- </group>
- <group oor:name="MultiPaneGUI">
+ </group>
+ </group>
+ <group oor:name="Filter">
+ <info>
+ <desc>Contains the group of options that control the behavior of filters.</desc>
+ <label>Filter Options</label>
+ </info>
+ <group oor:name="Import">
+ <info>
+ <desc>Contains the group of options that control the behavior of the import filters.</desc>
+ <label>Import Filter</label>
+ </info>
+ <group oor:name="VBA">
+ <info>
+ <desc>Contains the group of options that control the behavior of the VBA filter.</desc>
+ <label>VBA Filter</label>
+ </info>
+ <prop oor:name="Load" oor:type="xs:boolean">
+ <!-- OldPath: Filter/MS_Office/Basic/PowerPoint -->
+ <!-- OldLocation: soffice.cfg -->
+ <!-- UIHints: Tools Options - Filter Settings Microsoft Office [Section] Microsoft PowerPoint 97/2000 -->
+ <info>
+ <author>OS</author>
+ <desc>Converts VBA Basic into Office Basic as commands (True).</desc>
+ <label>Load Basic Code to edit</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="Save" oor:type="xs:boolean">
+ <!-- OldPath: Filter/MS_Office/Basic/PowerPoint -->
+ <!-- OldLocation: soffice.cfg -->
+ <!-- UIHints: Tools Options - Filter Settings Microsoft Office [Section] Microsoft PowerPoint 97/2000 -->
+ <info>
+ <author>OS</author>
+ <desc>Holds original VBA storage for saving in the memory (True).</desc>
+ <label>Save Original Basic Code again</label>
+ </info>
+ <value>true</value>
+ </prop>
+ </group>
+ </group>
+ <group oor:name="Export">
+ <info>
+ <desc>Exports related configuration items.</desc>
+ </info>
+ <prop oor:name="LastUsed" oor:type="xs:string">
+ <!-- OldPath: STARIMPRESS -->
+ <!-- OldLocation: soffice.ini -->
+ <!-- UIHints: Set after export -->
+ <info>
+ <desc>Specifies the filter last used to export an Impress document.</desc>
+ </info>
+ <constraints>
+ <enumeration oor:value="HTML">
+ <info>
+ <desc>HTML</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="BMP - MS Windows">
+ <info>
+ <desc>MS Windows bitmap</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="PNG - Portable Network Graphic">
+ <info>
+ <desc>Portable Network Graphic</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="EPS - Encapsulated PostScript">
+ <info>
+ <desc>Encapsulated PostScript</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="GIF - Graphic Interchange">
+ <info>
+ <desc>Graphic Interchange Format</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="JPG - JPEG">
+ <info>
+ <desc>JPEG</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="MET - OS/2 Metafile">
+ <info>
+ <desc>OS/2 Metafile</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="PCT - Mac Pict">
+ <info>
+ <desc>Mac Pict</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="PBM - Portable Bitmap">
+ <info>
+ <desc>Portable Bitmap</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="PGM - Portable Graymap">
+ <info>
+ <desc>Portable Graymap</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="PPM - Portable Pixelmap">
+ <info>
+ <desc>Portable Pixelmap</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="RAS - Sun Rasterfile">
+ <info>
+ <desc>Sun Rasterfile</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="SVM - StarView Metafile">
+ <info>
+ <desc>StarView Metafile</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="WMF - MS Windows Metafile">
+ <info>
+ <desc>MS Windows Metafile</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="XPM">
+ <info>
+ <desc>XPM</desc>
+ </info>
+ </enumeration>
+ </constraints>
+ </prop>
+ </group>
+ </group>
+ <group oor:name="MultiPaneGUI">
+ <info>
+ <desc>Options that control the content and appearance of the multi pane GUI.</desc>
+ <label>Multi Pane GUI Options</label>
+ </info>
+ <group oor:name="ToolPanel">
+ <info>
+ <desc>Options that control the tool panel.</desc>
+ <label>Tool Panel Options</label>
+ </info>
+ <set oor:name="RecentlyUsedMasterPages" oor:node-type="MasterPageDescriptor">
+ <info>
+ <desc>List of the URLs of the most recently used master pages.</desc>
+ <label>Recently Used Master Pages</label>
+ </info>
+ </set>
+ </group>
+ <group oor:name="Framework">
+ <info>
+ <desc>Options that control the multi pane framework.</desc>
+ <label>Multi Pane Framework Options</label>
+ </info>
+ <set oor:name="ResourceFactories" oor:node-type="ResourceFactory">
+ <info>
+ <desc>Set of factories and the resources created by them.</desc>
+ <label>Multi Pane Framework Resource Factories</label>
+ </info>
+ </set>
+ <set oor:name="StartupServices" oor:node-type="StartupService">
+ <info>
+ <desc>
+ Set of services that are instantiated every time the
+ framework of a Draw or Impress document is initialized.
+ </desc>
+ <label>Multi Pane Framework Startup Services</label>
+ </info>
+ </set>
+ </group>
+ <group oor:name="SlideSorter">
+ <info>
+ <desc>Values related to the slide sorter.</desc>
+ <label>Slide Sorter Options</label>
+ </info>
+ <group oor:name="PreviewCache">
+ <info>
+ <desc>Values for tuning the preview cache of the slide sorter.</desc>
+ <label>Preview Cache Options</label>
+ </info>
+ <prop oor:name="CacheSize" oor:type="xs:int">
+ <info>
+ <desc>
+ Maximal size of the cache that stores slide
+ preview bitmaps. This size does only cover
+ previews of slides that are not currently
+ visible. Depending on the compression policy
+ this upper bound may be violated.
+ </desc>
+ <label>Preview Cache Size</label>
+ </info>
+ <value>4194304</value>
+ </prop>
+ <prop oor:name="CompactionPolicy" oor:type="xs:string">
<info>
- <desc>Options that control the content and appearance of the multi pane GUI.</desc>
- <label>Multi Pane GUI Options</label>
+ <desc>Technique of how to reduce the memory used by the cache.</desc>
+ <label>Compaction Policy</label>
</info>
- <group oor:name="ToolPanel">
+ <constraints>
+ <enumeration oor:value="None">
<info>
- <desc>Options that control the tool panel.</desc>
- <label>Tool Panel Options</label>
+ <desc>Ignore the maximal cache size.</desc>
</info>
- <set oor:name="RecentlyUsedMasterPages" oor:node-type="MasterPageDescriptor">
- <info>
- <desc>List of the URLs of the most recently used master pages.</desc>
- <label>Recently Used Master Pages</label>
- </info>
- </set>
- </group>
- <group oor:name="Framework">
+ </enumeration>
+ <enumeration oor:value="Compress">
<info>
- <desc>Options that control the multi pane framework.</desc>
- <label>Multi Pane Framework Options</label>
+ <desc>
+ Use the compression policy to compress preview bitmaps
+ that are not visible.
+ </desc>
</info>
- <set oor:name="ResourceFactories" oor:node-type="ResourceFactory">
- <info>
- <desc>Set of factories and the resources created by them.</desc>
- <label>Multi Pane Framework Resource Factories</label>
- </info>
- </set>
- <set oor:name="StartupServices" oor:node-type="StartupService">
- <info>
- <desc>Set of services that are instantiated every time the
- framework of a Draw or Impress document is initialized.</desc>
- <label>Multi Pane Framework Startup Services</label>
- </info>
- </set>
- </group>
- <group oor:name="SlideSorter">
+ </enumeration>
+ </constraints>
+ <value>Compress</value>
+ </prop>
+ <prop oor:name="CompressionPolicy" oor:type="xs:string">
+ <info>
+ <desc>
+ Technique of how to compress preview bitmaps for
+ slides that are moved out of the visible area in
+ order to save cache space.
+ </desc>
+ <label>Compression Policy</label>
+ </info>
+ <constraints>
+ <enumeration oor:value="None">
+ <info>
+ <desc>
+ Keep bitmaps unmodified in cache. This effectively
+ ignores the maximal cache size.
+ </desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="Erase">
+ <info>
+ <desc>Remove preview from cache</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="ResolutionReduction">
+ <info>
+ <desc>
+ Reduce the resolution to a width
+ of 100 Pixels
+ </desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="PNGCompression">
<info>
- <desc>Values related to the slide sorter.</desc>
- <label>Slide Sorter Options</label>
+ <desc>Store preview as compressed PNG bitmap</desc>
</info>
- <group oor:name="PreviewCache">
- <info>
- <desc>Values for tuning the preview cache of the slide sorter.</desc>
- <label>Preview Cache Options</label>
- </info>
- <prop oor:name="CacheSize" oor:type="xs:int">
- <info>
- <desc>Maximal size of the cache that stores slide
- preview bitmaps. This size does only cover
- previews of slides that are not currently
- visible. Depending on the compression policy
- this upper bound may be violated.</desc>
- <label>Preview Cache Size</label>
- </info>
- <value>4194304</value>
- </prop>
- <prop oor:name="CompactionPolicy" oor:type="xs:string">
- <info>
- <desc>Technique of how to reduce the memory used by the cache.</desc>
- <label>Compaction Policy</label>
- </info>
- <constraints>
- <enumeration oor:value="None">
- <info>
- <desc>Ignore the maximal cache size.</desc>
- </info>
- </enumeration>
- <enumeration oor:value="Compress">
- <info>
- <desc>Use the compression policy to compress preview bitmaps
- that are not visible.</desc>
- </info>
- </enumeration>
- </constraints>
- <value>Compress</value>
- </prop>
- <prop oor:name="CompressionPolicy" oor:type="xs:string">
- <info>
- <desc>Technique of how to compress preview bitmaps for
- slides that are moved out of the visible area in
- order to save cache space.</desc>
- <label>Compression Policy</label>
- </info>
- <constraints>
- <enumeration oor:value="None">
- <info>
- <desc>Keep bitmaps unmodified in cache. This effectively
- ignores the maximal cache size.</desc>
- </info>
- </enumeration>
- <enumeration oor:value="Erase">
- <info>
- <desc>Remove preview from cache</desc>
- </info>
- </enumeration>
- <enumeration oor:value="ResolutionReduction">
- <info>
- <desc>Reduce the resolution to a width
- of 100 Pixels</desc>
- </info>
- </enumeration>
- <enumeration oor:value="PNGCompression">
- <info>
- <desc>Store preview as compressed PNG bitmap</desc>
- </info>
- </enumeration>
- </constraints>
- <value>ResolutionReduction</value>
- </prop>
- <prop oor:name="TimeBetweenHighPriorityRequests" oor:type="xs:int">
- <info>
- <desc>Time in milli seconds to wait between processing
- preview creation requests with high priority.</desc>
- <label>Time Between High Priority Requests</label>
- </info>
- <value>10</value>
- </prop>
- <prop oor:name="TimeBetweenLowPriorityRequests" oor:type="xs:int">
- <info>
- <desc>Time in milli seconds to wait between processing
- preview creation requests with low priority.</desc>
- <label>Time Between Low Priority Requests</label>
- </info>
- <value>100</value>
- </prop>
- <prop oor:name="TimeBetweenRequestsDuringShow" oor:type="xs:int">
- <info>
- <desc>Time in milli seconds to wait between processing
- preview creation requestsest when show is running.</desc>
- <label>Time Between Requests During Show</label>
- </info>
- <value>1000</value>
- </prop>
- </group>
- </group>
- </group>
- </component>
+ </enumeration>
+ </constraints>
+ <value>ResolutionReduction</value>
+ </prop>
+ <prop oor:name="TimeBetweenHighPriorityRequests" oor:type="xs:int">
+ <info>
+ <desc>
+ Time in milli seconds to wait between processing
+ preview creation requests with high priority.
+ </desc>
+ <label>Time Between High Priority Requests</label>
+ </info>
+ <value>10</value>
+ </prop>
+ <prop oor:name="TimeBetweenLowPriorityRequests" oor:type="xs:int">
+ <info>
+ <desc>
+ Time in milli seconds to wait between processing
+ preview creation requests with low priority.
+ </desc>
+ <label>Time Between Low Priority Requests</label>
+ </info>
+ <value>100</value>
+ </prop>
+ <prop oor:name="TimeBetweenRequestsDuringShow" oor:type="xs:int">
+ <info>
+ <desc>
+ Time in milli seconds to wait between processing
+ preview creation requestsest when show is running.
+ </desc>
+ <label>Time Between Requests During Show</label>
+ </info>
+ <value>1000</value>
+ </prop>
+ </group>
+ </group>
+ </group>
+ </component>
</oor:component-schema>
diff --git a/officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs b/officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs
index 220d94c89da6..7cb13b70700c 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs
@@ -121,6 +121,31 @@
<label>Spell and grammar context menu dictionary image</label>
</info>
</prop>
+ <prop oor:name="ThesaurusDialogImage" oor:type="xs:string">
+ <info>
+ <desc>The path to the image for the thesaurus dialog.</desc>
+ <label>Thesaurus dialog image</label>
+ </info>
+ </prop>
+ <prop oor:name="ThesaurusDialogImage_HC" oor:type="xs:string">
+ <info>
+ <desc>The path to the image for the thesaurus dialog in high contrast mode.</desc>
+ <label>Thesaurus dialog image</label>
+ </info>
+ </prop>
+ <prop oor:name="SynonymsContextMenuImage" oor:type="xs:string">
+ <info>
+ <desc>The path to the image for the synonyms context menu.</desc>
+ <label>Synonyms context menu image</label>
+ </info>
+ </prop>
+ <prop oor:name="SynonymsContextMenuImage_HC" oor:type="xs:string">
+ <info>
+ <desc>The path to the image for the synonyms context menu in high contrast mode.</desc>
+ <label>Synonyms context menu image</label>
+ </info>
+ </prop>
+
</group>
<group oor:name="GrammarCheckerEntry">
diff --git a/officecfg/registry/schema/org/openoffice/Office/Math.xcs b/officecfg/registry/schema/org/openoffice/Office/Math.xcs
index c1f9e8aa96b2..caa8726b7c72 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Math.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Math.xcs
@@ -351,7 +351,7 @@
<prop oor:name="ToolboxVisible" oor:type="xs:boolean">
<!-- OldPath: Math/View -->
<!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: View - Formula Elements -->
+ <!-- UIHints: View - Elements -->
<info>
<author>TL</author>
<desc>Toggles the visibility of the ToolBox (Selection Box).</desc>
diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/WindowState.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/WindowState.xcs
index 39545cab2391..b56629aca2eb 100644
--- a/officecfg/registry/schema/org/openoffice/Office/UI/WindowState.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/UI/WindowState.xcs
@@ -95,6 +95,21 @@
<desc>Specifies the user interface element name. It is used for floating user interface elements to set the title and for the bubble help.</desc>
</info>
</prop>
+ <prop oor:name="ImageURL" oor:type="xs:string">
+ <info>
+ <desc>Specifies the URL of an image to associate with the user interface element. Any URL scheme supported by the com.sun.star.graphic.GraphicProvider service
+ is suitable here.</desc>
+ </info>
+ <value></value>
+ </prop>
+ <prop oor:name="HelpURL" oor:type="xs:string">
+ <info>
+ <desc>
+ Specifies the help URL of the tool panel.
+ </desc>
+ </info>
+ <value></value>
+ </prop>
<prop oor:name="InternalState" oor:type="xs:int">
<info>
<desc>Specifies an internal state for the user interface element. Please don't change this value it describes an internal value.</desc>
diff --git a/officecfg/registry/schema/org/openoffice/Setup.xcs b/officecfg/registry/schema/org/openoffice/Setup.xcs
index a3d5ba6e5d21..76c4bb17782b 100644
--- a/officecfg/registry/schema/org/openoffice/Setup.xcs
+++ b/officecfg/registry/schema/org/openoffice/Setup.xcs
@@ -155,6 +155,12 @@
<desc>Specifies the name of the standard template file for the factory.</desc>
</info>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged" oor:type="xs:boolean">
+ <!-- UIHints: setup -->
+ <info>
+ <desc>Indicates if the system default template has been changed.</desc>
+ </info>
+ </prop>
<prop oor:name="ooSetupFactoryWindowAttributes" oor:type="xs:string">
<!-- UIHints: setup -->
<info>
@@ -261,7 +267,15 @@
</info>
<value/>
</prop>
- <prop oor:name="ooSetupExtension" oor:type="xs:string">
+ <prop oor:name="ooVendor" oor:type="xs:string">
+ <info>
+ <author>IHI</author>
+ <desc>Specifies the vendor who build the product.</desc>
+ </info>
+ <value/>
+ </prop>
+
+ <prop oor:name="ooSetupExtension" oor:type="xs:string">
<info>
<desc>Specifies the version number that appears on the user interface.</desc>
</info>
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index c372e1f660af..aa6c6cfb966a 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -28,26 +28,22 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_scripting.hxx"
-#ifndef SCRIPTING_DLGPROV_HXX
#include "dlgprov.hxx"
-#endif
#include "dlgevtatt.hxx"
#include <com/sun/star/awt/XControlContainer.hpp>
#include <com/sun/star/awt/XWindowPeer.hpp>
-#ifndef _COM_SUN_STAR_IO_XINPUTSTREAMPROVIDER_HXX_
#include <com/sun/star/io/XInputStreamProvider.hpp>
-#endif
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/script/XLibraryContainer.hpp>
-#ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_
#include <cppuhelper/implementationentry.hxx>
-#endif
+#include <cppuhelper/exc_hlp.hxx>
#include <com/sun/star/beans/XIntrospection.hpp>
#include <com/sun/star/resource/XStringResourceSupplier.hpp>
#include <com/sun/star/resource/XStringResourceManager.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
-#include "com/sun/star/resource/XStringResourceWithLocation.hpp"
+#include <com/sun/star/resource/XStringResourceWithLocation.hpp>
#include <com/sun/star/document/XEmbeddedScripts.hpp>
#include <sfx2/app.hxx>
#include <sfx2/objsh.hxx>
@@ -691,13 +687,22 @@ static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAs
//Reference< XDialog > xDialog;
Reference< XControl > xCtrl;
Reference< XControlModel > xCtrlMod;
- // add support for basic RTL_FUNCTION
- if ( m_BasicInfo.get() )
- xCtrlMod = createDialogModelForBasic();
- else
+ try
+ {
+ // add support for basic RTL_FUNCTION
+ if ( m_BasicInfo.get() )
+ xCtrlMod = createDialogModelForBasic();
+ else
+ {
+ OSL_ENSURE( URL.getLength(), "DialogProviderImpl::getDialog: no URL!" );
+ xCtrlMod = createDialogModel( URL );
+ }
+ }
+ catch ( const RuntimeException& ) { throw; }
+ catch ( const Exception& )
{
- OSL_ENSURE( URL.getLength(), "DialogProviderImpl::getDialog: no URL!" );
- xCtrlMod = createDialogModel( URL );
+ const Any aError( ::cppu::getCaughtException() );
+ throw WrappedTargetRuntimeException( ::rtl::OUString(), *this, aError );
}
if ( xCtrlMod.is() )
{
diff --git a/sfx2/inc/imagemgr.hxx b/sfx2/inc/imagemgr.hxx
index ead9b6988cea..79dc724210c4 100644
--- a/sfx2/inc/imagemgr.hxx
+++ b/sfx2/inc/imagemgr.hxx
@@ -33,4 +33,4 @@
#include <rtl/ustring.hxx>
#include <vcl/image.hxx>
-SFX2_DLLPUBLIC Image SAL_CALL GetImage( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast );
+SFX2_DLLPUBLIC Image SAL_CALL GetImage( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast );
diff --git a/sfx2/inc/pch/precompiled_sfx2.hxx b/sfx2/inc/pch/precompiled_sfx2.hxx
index 8cd8f9d8561f..b43dba7d6673 100644
--- a/sfx2/inc/pch/precompiled_sfx2.hxx
+++ b/sfx2/inc/pch/precompiled_sfx2.hxx
@@ -566,7 +566,7 @@
#include "svl/svdde.hxx"
#include "svl/svstdarr.hxx"
#include "svtools/svtdata.hxx"
-#include "svl/svtools.hrc"
+#include "svtools/svtools.hrc"
#include "unotools/syslocale.hxx"
#include "unotools/syslocaleoptions.hxx"
#include "svl/szitem.hxx"
diff --git a/sfx2/inc/sfx2/childwin.hxx b/sfx2/inc/sfx2/childwin.hxx
index cac0b72f13cf..fd1eb65d54df 100644
--- a/sfx2/inc/sfx2/childwin.hxx
+++ b/sfx2/inc/sfx2/childwin.hxx
@@ -87,13 +87,13 @@ struct SfxChildWinInfo
};
// Factory-Methode eines ChildWindows
-typedef SfxChildWindow* (*SfxChildWinCtor)( Window *pParentWindow,
+typedef SfxChildWindow* (*SfxChildWinCtor)( ::Window *pParentWindow,
sal_uInt16 nId,
SfxBindings *pBindings,
SfxChildWinInfo *pInfo);
// Factory-Methode eines ChildWindowsContexts
-typedef SfxChildWindowContext* (*SfxChildWinContextCtor)( Window *pParentWindow,
+typedef SfxChildWindowContext* (*SfxChildWinContextCtor)( ::Window *pParentWindow,
SfxBindings *pBindings,
SfxChildWinInfo *pInfo);
struct SfxChildWinContextFactory
@@ -143,8 +143,8 @@ struct SfxChildWindow_Impl;
class SFX2_DLLPUBLIC SfxChildWindowContext
{
friend class SfxChildWindow;
- Window* pWindow;
- sal_uInt16 nContextId;
+ ::Window* pWindow;
+ sal_uInt16 nContextId;
protected:
SfxChildWindowContext( sal_uInt16 nId );
@@ -152,9 +152,9 @@ protected:
public:
virtual ~SfxChildWindowContext();
- void SetWindow( Window* pWin )
+ void SetWindow( ::Window* pWin )
{ pWindow=pWin; }
- Window* GetWindow() const
+ ::Window* GetWindow() const
{ return pWindow; }
sal_uInt16 GetContextId() const
{ return nContextId; }
@@ -169,12 +169,12 @@ public:
class SFX2_DLLPUBLIC SfxChildWindow
{
- Window* pParent; // parent window ( Topwindow )
- sal_uInt16 nType; // ChildWindow-Id
+ ::Window* pParent; // parent window ( Topwindow )
+ sal_uInt16 nType; // ChildWindow-Id
protected:
SfxChildAlignment eChildAlignment;// aktuelles ::com::sun::star::drawing::Alignment
- Window* pWindow; // eigentlicher Inhalt
+ ::Window* pWindow; // eigentlicher Inhalt
SfxChildWindow_Impl* pImp; // Imp-Daten
private:
@@ -185,14 +185,14 @@ private:
{ return pContext; }
protected:
- SfxChildWindow(Window *pParentWindow, sal_uInt16 nId);
+ SfxChildWindow(::Window *pParentWindow, sal_uInt16 nId);
public:
virtual ~SfxChildWindow();
void Destroy();
- Window* GetWindow() const
+ ::Window* GetWindow() const
{ return pWindow; }
- Window* GetParent() const
+ ::Window* GetParent() const
{ return pParent; }
SfxChildAlignment GetAlignment() const
{ return eChildAlignment; }
@@ -217,17 +217,17 @@ public:
sal_uInt16 GetContextId() const
{ return pContext ? pContext->GetContextId(): 0; }
- Window* GetContextWindow() const
+ ::Window* GetContextWindow() const
{ return pContext ? pContext->GetWindow(): 0; }
- Window* GetContextWindow( SfxModule *pModule ) const;
+ ::Window* GetContextWindow( SfxModule *pModule ) const;
virtual SfxChildWinInfo GetInfo() const;
void SaveStatus(const SfxChildWinInfo& rInfo);
static void RegisterChildWindow(SfxModule*, SfxChildWinFactory*);
- static SfxChildWindow* CreateChildWindow( sal_uInt16, Window*, SfxBindings*, SfxChildWinInfo&);
+ static SfxChildWindow* CreateChildWindow( sal_uInt16, ::Window*, SfxBindings*, SfxChildWinInfo&);
void SetHideNotDelete( sal_Bool bOn );
sal_Bool IsHideNotDelete() const;
void SetHideAtToggle( sal_Bool bOn );
@@ -258,19 +258,19 @@ public:
//------------------------------------------------------------------
//! demn"achst hinf"allig !
#define SFX_DECL_CHILDWINDOW_CONTEXT(Class) \
- static SfxChildWindowContext* CreateImpl(Window *pParent, \
+ static SfxChildWindowContext* CreateImpl(::Window *pParent, \
SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \
static void RegisterChildWindowContext(SfxModule *pMod=0); \
//! Das Macro der Zukunft ...
#define SFX_DECL_CHILDWINDOWCONTEXT(Class) \
- static SfxChildWindowContext* CreateImpl(Window *pParent, \
+ static SfxChildWindowContext* CreateImpl(::Window *pParent, \
SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \
static void RegisterChildWindowContext(sal_uInt16, SfxModule *pMod=0); \
//! demn"achst hinf"allig !
#define SFX_IMPL_CHILDWINDOW_CONTEXT(Class, MyID, ShellClass) \
- SfxChildWindowContext* __EXPORT Class::CreateImpl( Window *pParent, \
+ SfxChildWindowContext* __EXPORT Class::CreateImpl( ::Window *pParent, \
SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \
{ \
SfxChildWindowContext *pContext = new Class(pParent, \
@@ -290,7 +290,7 @@ public:
// CreateImpl mu\s noch als Parameter die Factory mitbekommen wg. ContextId
// Solange wird diese Id auf 0 gesetzt und in SfxChildWindow::CreateContext gepatched
#define SFX_IMPL_CHILDWINDOWCONTEXT(Class, MyID) \
- SfxChildWindowContext* __EXPORT Class::CreateImpl( Window *pParent, \
+ SfxChildWindowContext* __EXPORT Class::CreateImpl( ::Window *pParent, \
SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \
{ \
SfxChildWindowContext *pContext = new Class(pParent,0,pBindings,pInfo);\
@@ -305,7 +305,7 @@ public:
#define SFX_DECL_CHILDWINDOW(Class) \
public : \
- static SfxChildWindow* CreateImpl(Window *pParent, sal_uInt16 nId, \
+ static SfxChildWindow* CreateImpl(::Window *pParent, sal_uInt16 nId, \
SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \
static void RegisterChildWindow (sal_Bool bVisible=sal_False, SfxModule *pMod=NULL, sal_uInt16 nFlags=0); \
static sal_uInt16 GetChildWindowId ();\
@@ -315,7 +315,7 @@ public:
SFX_IMPL_POS_CHILDWINDOW(Class, MyID, CHILDWIN_NOPOS)
#define SFX_IMPL_POS_CHILDWINDOW(Class, MyID, Pos) \
- SfxChildWindow* __EXPORT Class::CreateImpl( Window *pParent, \
+ SfxChildWindow* __EXPORT Class::CreateImpl( ::Window *pParent, \
sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \
{ \
SfxChildWindow *pWin = new Class(pParent, nId, pBindings, pInfo);\
diff --git a/sfx2/inc/sfx2/docfac.hxx b/sfx2/inc/sfx2/docfac.hxx
index 3cc3eecc7ce7..7468394d2617 100644
--- a/sfx2/inc/sfx2/docfac.hxx
+++ b/sfx2/inc/sfx2/docfac.hxx
@@ -101,6 +101,7 @@ public:
const SfxFilter* GetTemplateFilter() const;
static String GetStandardTemplate( const String& rServiceName );
static void SetStandardTemplate( const String& rServiceName, const String& rTemplateName );
+ static void SetSystemTemplate( const String& rServiceName, const String& rTemplateName );
void SetDocumentServiceName( const rtl::OUString& rServiceName );
const rtl::OUString& GetDocumentServiceName() const;
diff --git a/sfx2/inc/sfx2/filedlghelper.hxx b/sfx2/inc/sfx2/filedlghelper.hxx
index d17553e2b2d0..9b775f8e827d 100644
--- a/sfx2/inc/sfx2/filedlghelper.hxx
+++ b/sfx2/inc/sfx2/filedlghelper.hxx
@@ -102,30 +102,6 @@ class Window;
#define FILE_OPEN_SERVICE_NAME_SYSTEM "com.sun.star.ui.dialogs.SystemFilePicker"
#define FILE_OPEN_SERVICE_NAME_OOO "com.sun.star.ui.dialogs.OfficeFilePicker"
-//*****************************************************************************
-// SfxUrlDialog
-//*****************************************************************************
-
-//#if 0 // _SOLAR__PRIVATE
-#ifndef DONT_USE_FILE_DIALOG_SERVICE
-
-class SfxUrlDialog : public ModalDialog
-{
-private:
- Edit aEdit;
- OKButton aOk;
- CancelButton aCancel;
-
-public:
- SfxUrlDialog( Window* pParent );
-
- String GetUrl() const { return aEdit.GetText(); }
- void SetUrl( const String& rUrl ) { aEdit.SetText( rUrl ); }
-};
-
-#endif
-//#endif
-
//-----------------------------------------------------------------------------
namespace sfx2 {
diff --git a/sfx2/inc/sfx2/mnumgr.hxx b/sfx2/inc/sfx2/mnumgr.hxx
index ee1c81daa603..9c9b566d9d9d 100644
--- a/sfx2/inc/sfx2/mnumgr.hxx
+++ b/sfx2/inc/sfx2/mnumgr.hxx
@@ -102,22 +102,34 @@ private:
DECL_LINK( SelectHdl, void * );
Menu* pSVMenu;
-private:
- // only declared, but not defined: don't allow copying
- SfxPopupMenuManager( const SfxPopupMenuManager& );
- SfxPopupMenuManager& operator=( const SfxPopupMenuManager& );
+ // when #i107205 gets fixed this one should be superfluous.
+ // But right now we want to avoid the memory leak that would otherwise occur,
+ // if we don't delete the pointer that got created in SfxPopupMenuManager::Popup
+ static PopupMenu * pStaticThesSubMenu;
+
+ // only declared, but not defined: don't allow copying
+ SfxPopupMenuManager( const SfxPopupMenuManager& );
+ SfxPopupMenuManager& operator=( const SfxPopupMenuManager& );
public:
SfxPopupMenuManager( const ResId&, SfxBindings& );
SfxPopupMenuManager( PopupMenu*, SfxBindings& );
~SfxPopupMenuManager();
static void ExecutePopup( const ResId&, SfxViewFrame* pViewFrame, const Point& rPoint, Window* pWindow );
+ // @deprecated!!
+ // Don't use this method any longer. The whole class will be removed in the future.
+ // Changing code which relies on Popup would need much more effort.
+ // Please contact cd@openoffice.org if you have questions or need help
static SfxPopupMenuManager* Popup( const ResId& rResId, SfxViewFrame* pFrame,const Point& rPoint, Window* pWindow );
USHORT Execute( const Point& rPos, Window *pWindow );
USHORT Execute( const Point& rPoint, Window* pWindow, va_list pArgs, const SfxPoolItem *pArg1 );
USHORT Execute( const Point& rPoint, Window* pWindow, const SfxPoolItem *pArg1 ... );
+ // @deprecated (start)!!
+ // Don't use these methods any longer. The whole class will be removed in the future.
+ // Changing code which relies on these methods would need much more effort!
+ // Please contact cd@openoffice.org if you have questions or need help
void StartInsert();
void EndInsert();
void CheckItem( USHORT, BOOL );
@@ -125,6 +137,8 @@ public:
void InsertItem( USHORT, const String&, MenuItemBits,
USHORT nPos = MENU_APPEND );
void InsertSeparator( USHORT nPos = MENU_APPEND );
+ // @deprecated (end)
+
void RemoveDisabledEntries();
void AddClipboardFunctions();
Menu* GetSVMenu();
diff --git a/sfx2/inc/sfx2/module.hxx b/sfx2/inc/sfx2/module.hxx
index 793dd8f76cab..ad83bb4a7418 100644
--- a/sfx2/inc/sfx2/module.hxx
+++ b/sfx2/inc/sfx2/module.hxx
@@ -93,6 +93,8 @@ public:
virtual void Invalidate(USHORT nId = 0);
BOOL IsActive() const;
+ /*virtual*/ bool IsChildWindowAvailable( const USHORT i_nId, const SfxViewFrame* i_pViewFrame ) const;
+
static SfxModule* GetActiveModule( SfxViewFrame* pFrame=NULL );
static FieldUnit GetCurrentFieldUnit();
FieldUnit GetFieldUnit() const;
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index bc4c11b53184..275e5c06a7be 100644
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -477,6 +477,9 @@
#define SID_CAPTION (SID_SFX_START + 641)
#define SID_STATUSBARTEXT (SID_SFX_START + 642)
+// id for thesaurs entry in context menu
+#define SID_THES (SID_SFX_START + 698)
+
// default-ids for editing, cursor travellung and selection
#define SID_REDO (SID_SFX_START + 700)
#define SID_UNDO (SID_SFX_START + 701)
@@ -867,6 +870,7 @@
#define SID_HYPERLINK_GETLINK (SID_SVX_START + 361)
#define SID_HYPERLINK_SETLINK (SID_SVX_START + 362)
#define SID_NAVIGATOR (SID_SVX_START + 366)
+#define SID_TASKPANE (SID_SVX_START + 370)
#define SID_ZOOM_NEXT (SID_SVX_START + 402)
#define SID_ZOOM_PREV (SID_SVX_START + 403)
#define SID_INET_DLG (SID_SVX_START + 416)
diff --git a/sfx2/inc/sfx2/taskpane.hxx b/sfx2/inc/sfx2/taskpane.hxx
new file mode 100644
index 000000000000..69ebd866a50b
--- /dev/null
+++ b/sfx2/inc/sfx2/taskpane.hxx
@@ -0,0 +1,245 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SFX_TASKPANE_HXX
+#define SFX_TASKPANE_HXX
+
+#include "sfx2/dllapi.h"
+#include "sfx2/childwin.hxx"
+#include "sfx2/titledockwin.hxx"
+
+#include <svtools/toolpanel/tabalignment.hxx>
+#include <svtools/toolpanel/tabitemcontent.hxx>
+
+#include <boost/scoped_ptr.hpp>
+#include <boost/optional.hpp>
+
+namespace svt
+{
+ class ToolPanelDeck;
+}
+
+//......................................................................................................................
+namespace sfx2
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= ITaskPaneToolPanelAccess
+ //==================================================================================================================
+ class SAL_NO_VTABLE ITaskPaneToolPanelAccess
+ {
+ public:
+ virtual void ActivateToolPanel( const ::rtl::OUString& i_rPanelURL ) = 0;
+ };
+
+ //==================================================================================================================
+ //= TaskPaneWrapper
+ //==================================================================================================================
+ class SFX2_DLLPUBLIC TaskPaneWrapper :public SfxChildWindow
+ ,public ITaskPaneToolPanelAccess
+ {
+ public:
+ TaskPaneWrapper(
+ Window* i_pParent,
+ USHORT i_nId,
+ SfxBindings* i_pBindings,
+ SfxChildWinInfo* i_pInfo
+ );
+
+ SFX_DECL_CHILDWINDOW( TaskPaneWrapper );
+
+ // ITaskPaneToolPanelAccess
+ virtual void ActivateToolPanel( const ::rtl::OUString& i_rPanelURL );
+ };
+
+ //==================================================================================================================
+ //= IToolPanelCompare
+ //==================================================================================================================
+ class SFX2_DLLPUBLIC SAL_NO_VTABLE IToolPanelCompare
+ {
+ public:
+ /** compares to tool panel URLs
+ @return
+ <ul>
+ <li>-1 if the tool panel described by i_rLHS should precede the one described by i_rRHS</li>
+ <li>0 if the two panels have no particular relative order</li>
+ <li>1 if the tool panel described by i_rLHS should succeed the one described by i_rRHS</li>
+
+ */
+ virtual short compareToolPanelsURLs(
+ const ::rtl::OUString& i_rLHS,
+ const ::rtl::OUString& i_rRHS
+ ) const = 0;
+ };
+
+ //==================================================================================================================
+ //= ModuleTaskPane
+ //==================================================================================================================
+ class ModuleTaskPane_Impl;
+ /** SFX-less version of a module dependent task pane, filled with tool panels as specified in the respective
+ module's configuration
+ */
+ class SFX2_DLLPUBLIC ModuleTaskPane : public Window
+ {
+ public:
+ /** creates a new instance
+ @param i_rParentWindow
+ the parent window
+ @param i_rDocumentFrame
+ the frame to which the task pane belongs. Will be passed to any custom tool panels created
+ via an XUIElementFactory. Also, it is used to determine the module which the task pane is
+ responsible for, thus controlling which tool panels are actually available.
+ */
+ ModuleTaskPane(
+ Window& i_rParentWindow,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rDocumentFrame
+ );
+ /** creates a new instance
+ @param i_rParentWindow
+ the parent window
+ @param i_rDocumentFrame
+ the frame to which the task pane belongs. Will be passed to any custom tool panels created
+ via an XUIElementFactory. Also, it is used to determine the module which the task pane is
+ responsible for, thus controlling which tool panels are actually available.
+ @param i_rCompare
+ a comparator for tool panel URLs, which allows controlling the order in which the panels are
+ added to the tool panel deck.
+ */
+ ModuleTaskPane(
+ Window& i_rParentWindow,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rDocumentFrame,
+ const IToolPanelCompare& i_rCompare
+ );
+ ~ModuleTaskPane();
+
+ /** determines whether a given module has any registered tool panels
+ */
+ static bool ModuleHasToolPanels( const ::rtl::OUString& i_rModuleIdentifier );
+ /** determines whether a given module has any registered tool panels
+ */
+ static bool ModuleHasToolPanels( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rDocumentFrame );
+
+ /** provides access to the Window aspect of the PanelDeck
+
+ Be careful with this method. For instance, you're not allowed to insert arbitrary IToolPanel implementations
+ into the deck, as the ModuleTaskPane has certain assumptions about the panel implementations. However,
+ you're allowed to remove and re-insert panels, which have originally been created by the ModuleTaskPane
+ itself.
+ */
+ ::svt::ToolPanelDeck& GetPanelDeck();
+ const ::svt::ToolPanelDeck& GetPanelDeck() const;
+
+ /** returns the position of the panel with the given resource URL
+ */
+ ::boost::optional< size_t >
+ GetPanelPos( const ::rtl::OUString& i_rResourceURL );
+
+ /** returns the resource URL of the panel at the specified position
+ */
+ ::rtl::OUString
+ GetPanelResourceURL( const size_t i_nPanelPos ) const;
+
+ /// sets the "classical" layout of the tool panel deck, using drawers
+ void SetDrawersLayout();
+ /// sets the new layout of the tool panel deck, using tabs
+ void SetTabsLayout( const ::svt::TabAlignment i_eTabAlignment, const ::svt::TabItemContent i_eTabContent );
+
+ protected:
+ // Window overridables
+ virtual void Resize();
+ virtual void GetFocus();
+
+ private:
+ ::boost::scoped_ptr< ModuleTaskPane_Impl > m_pImpl;
+ };
+
+ //==================================================================================================================
+ //= TaskPaneController
+ //==================================================================================================================
+ class TaskPaneController_Impl;
+ /** is a helper class for connecting a ModuleTaskPane and a TitledDockingWindow, for clients of the ModuleTaskPane
+ which do not use the TaskPaneDockingWindow
+
+ The controller will add a drop down menu to the docking window which contains one item for each panel in the
+ panel deck, and allows toggling their visibility.
+ */
+ class SFX2_DLLPUBLIC TaskPaneController
+ {
+ public:
+ TaskPaneController(
+ ModuleTaskPane& i_rTaskPane,
+ TitledDockingWindow& i_rDockingWindow
+ );
+ ~TaskPaneController();
+
+ /** sets the default title to be used for the TitledDockingWindow
+
+ When the controller switches the docking window to "tabbed" mode, then the title of the docking window
+ will contain the name of the currently active panel (since this name isn't to be seen elsewhere).
+ When the controller switches the docking window to "drawer" mode, then the title of the docking window
+ contains the default title as given here (since in this mode, the names of the panels are shown in
+ the drawers).
+ */
+ void SetDefaultTitle( const String& i_rTitle );
+
+ /// activates the panel with the given URL
+ void ActivateToolPanel( const ::rtl::OUString& i_rPanelURL );
+
+ private:
+ ::boost::scoped_ptr< TaskPaneController_Impl > m_pImpl;
+ };
+
+ //==================================================================================================================
+ //= TaskPaneDockingWindow
+ //==================================================================================================================
+ class TaskPaneDockingWindow :public TitledDockingWindow
+ ,public ITaskPaneToolPanelAccess
+ {
+ public:
+ TaskPaneDockingWindow( SfxBindings* i_pBindings, TaskPaneWrapper& i_rWrapper,
+ Window* i_pParent, WinBits i_nBits );
+
+ // ITaskPaneToolPanelAccess
+ virtual void ActivateToolPanel( const ::rtl::OUString& i_rPanelURL );
+
+ protected:
+ // Window overridables
+ virtual void GetFocus();
+
+ // TitledDockingWindow overridables
+ virtual void onLayoutDone();
+
+ private:
+ ModuleTaskPane m_aTaskPane;
+ TaskPaneController m_aPaneController;
+ };
+
+//......................................................................................................................
+} // namespace sfx2
+//......................................................................................................................
+
+#endif // SFX_TASKPANE_HXX
diff --git a/sfx2/inc/sfx2/tbxctrl.hxx b/sfx2/inc/sfx2/tbxctrl.hxx
index d618051e4063..30d82c854642 100644
--- a/sfx2/inc/sfx2/tbxctrl.hxx
+++ b/sfx2/inc/sfx2/tbxctrl.hxx
@@ -243,6 +243,7 @@ protected:
virtual void SAL_CALL release() throw();
// XEventListener
+ using ::cppu::OPropertySetHelper::disposing;
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw( ::com::sun::star::uno::RuntimeException );
// XComponent
diff --git a/sfx2/inc/sfx2/titledockwin.hxx b/sfx2/inc/sfx2/titledockwin.hxx
new file mode 100644
index 000000000000..ebb4497a0ba2
--- /dev/null
+++ b/sfx2/inc/sfx2/titledockwin.hxx
@@ -0,0 +1,162 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SFX_TITLEDOCKWIN_HXX
+#define SFX_TITLEDOCKWIN_HXX
+
+#include "sfx2/dllapi.h"
+#include "sfx2/dockwin.hxx"
+
+#include <vcl/toolbox.hxx>
+#include <tools/svborder.hxx>
+
+//......................................................................................................................
+namespace sfx2
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= TitledDockingWindow
+ //==================================================================================================================
+ class SFX2_DLLPUBLIC TitledDockingWindow : public SfxDockingWindow
+ {
+ public:
+ TitledDockingWindow(
+ SfxBindings* i_pBindings, SfxChildWindow* i_pChildWindow,
+ Window* i_pParent, WinBits i_nStyle = 0
+ );
+
+ TitledDockingWindow( SfxBindings* i_pBindings, SfxChildWindow* i_pChildWindow,
+ Window* i_pParent, const ResId& i_rResId
+ );
+
+ virtual ~TitledDockingWindow();
+
+ /** sets a title to be displayed in the docking window
+ */
+ void SetTitle( const String& i_rTitle );
+ /** returns the current title displayed in the docking window
+
+ Note that if you never called SetTitle before, then this method will not return an empty string,
+ but the window text (Window::GetText), since this is what is displayed as title then.
+ */
+ String GetTitle() const;
+
+ /** adds a drop down item to the toolbox. Usually, this is used to add some kind of menu to the toolbox.
+
+ @param i_rItemText
+ the text to display for the item
+ @param i_nHelpId
+ the help ID for the new toolbox item
+ @param i_rCallback
+ the callback to invoke when the drop item has been clicked
+ @return
+ the ID of the newly created toolbox item
+ */
+ USHORT AddDropDownToolBoxItem( const String& i_rItemText, ULONG i_nHelpId, const Link& i_rCallback )
+ {
+ return impl_addDropDownToolBoxItem( i_rItemText, i_nHelpId, i_rCallback );
+ }
+
+ void SetEndDockingHdl( const Link& i_rEndDockingHdl ) { m_aEndDockingHdl = i_rEndDockingHdl; }
+ const Link& GetEndDockingHdl() const { return m_aEndDockingHdl; }
+
+ /** resets the toolbox. Upon return, the only item in the toolbox is the closer.
+ */
+ void ResetToolBox()
+ {
+ impl_resetToolBox();
+ }
+
+ /** returns the content window, which is to be used as parent window for any content to be displayed
+ in the docking window.
+ */
+ ::Window& GetContentWindow() { return m_aContentWindow; }
+ const ::Window& GetContentWindow() const { return m_aContentWindow; }
+
+ ToolBox& GetToolBox() { return m_aToolbox; }
+ const ToolBox& GetToolBox() const { return m_aToolbox; }
+
+ protected:
+ // Window overridables
+ virtual void Paint( const Rectangle& i_rArea );
+ virtual void Resize();
+ virtual void StateChanged( StateChangedType i_nType );
+ virtual void DataChanged( const DataChangedEvent& i_rDataChangedEvent );
+ virtual void SetText( const String& i_rText );
+
+ // DockingWindow overridables
+ void EndDocking( const Rectangle& rRect, BOOL bFloatMode );
+
+ // own overridables
+ virtual void onLayoutDone();
+
+ protected:
+ /** internal version of ResetToolBox
+ */
+ void impl_resetToolBox();
+
+ /** internal version of AddDropDownToolBoxItem
+ */
+ USHORT impl_addDropDownToolBoxItem( const String& i_rItemText, ULONG i_nHelpId, const Link& i_rCallback );
+
+ /** returns the current title.
+
+ If no title has been set via SetTitle, then the window text (Window::GetText) is returned.
+ */
+ String impl_getTitle() const;
+
+ private:
+ DECL_LINK( OnToolboxItemSelected, ToolBox* );
+
+ void impl_construct();
+ void impl_layout();
+ void impl_scheduleLayout();
+
+ private:
+ String m_sTitle;
+ ToolBox m_aToolbox;
+ Window m_aContentWindow;
+
+ Link m_aEndDockingHdl;
+
+ /** The border that is painted arround the inner window. The bevel
+ shadow lines are part of the border, so where the border is 0 no
+ such line is painted.
+ */
+ SvBorder m_aBorder;
+
+ /** Remember that a layout is pending, i.e. Resize() has been called
+ since the last Paint().
+ */
+ bool m_bLayoutPending;
+ };
+
+//......................................................................................................................
+} // namespace sfx2
+//......................................................................................................................
+
+#endif // SFX_TITLEDOCKWIN_HXX
diff --git a/sfx2/inc/sfx2/viewfrm.hxx b/sfx2/inc/sfx2/viewfrm.hxx
index 8350bc5f0f9d..d376236bf830 100644
--- a/sfx2/inc/sfx2/viewfrm.hxx
+++ b/sfx2/inc/sfx2/viewfrm.hxx
@@ -40,6 +40,8 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/XController2.hpp>
+#include <tools/svborder.hxx>
+
class SfxMacro;
class SvBorder;
class SfxDispatcher;
@@ -70,67 +72,6 @@ SV_DECL_REF(SfxObjectShell)
#endif
//========================================================================
-#include <tools/gen.hxx>
-class SvBorder
-{
- long nTop, nRight, nBottom, nLeft;
-public:
- SvBorder()
- { nTop = nRight = nBottom = nLeft = 0; }
- SvBorder( const Size & rSz )
- { nTop = nBottom = rSz.Height(); nRight = nLeft = rSz.Width(); }
- SvBorder( const Rectangle & rOuter, const Rectangle & rInner );
- SvBorder( long nLeftP, long nTopP, long nRightP, long nBottomP )
- { nLeft = nLeftP; nTop = nTopP; nRight = nRightP; nBottom = nBottomP; }
- BOOL operator == ( const SvBorder & rObj ) const
- {
- return nTop == rObj.nTop && nRight == rObj.nRight &&
- nBottom == rObj.nBottom && nLeft == rObj.nLeft;
- }
- BOOL operator != ( const SvBorder & rObj ) const
- { return !(*this == rObj); }
- SvBorder & operator = ( const SvBorder & rBorder )
- {
- Left() = rBorder.Left();
- Top() = rBorder.Top();
- Right() = rBorder.Right();
- Bottom() = rBorder.Bottom();
- return *this;
- }
- SvBorder & operator += ( const SvBorder & rBorder )
- {
- Left() += rBorder.Left();
- Top() += rBorder.Top();
- Right() += rBorder.Right();
- Bottom() += rBorder.Bottom();
- return *this;
- }
- SvBorder & operator -= ( const SvBorder & rBorder )
- {
- Left() -= rBorder.Left();
- Top() -= rBorder.Top();
- Right() -= rBorder.Right();
- Bottom() -= rBorder.Bottom();
- return *this;
- }
- BOOL IsInside( const SvBorder & rInside )
- {
- return nTop >= rInside.nTop && nRight >= rInside.nRight &&
- nBottom >= rInside.nBottom && nLeft >= rInside.nLeft;
- }
- long & Top() { return nTop; }
- long & Right() { return nRight; }
- long & Bottom() { return nBottom; }
- long & Left() { return nLeft; }
- long Top() const { return nTop; }
- long Right() const { return nRight; }
- long Bottom() const { return nBottom; }
- long Left() const { return nLeft; }
-};
-Rectangle & operator += ( Rectangle & rRect, const SvBorder & rBorder );
-Rectangle & operator -= ( Rectangle & rRect, const SvBorder & rBorder );
-
-
DBG_NAMEEX(SfxViewFrame)
class SFX2_DLLPUBLIC SfxViewFrame: public SfxShell, public SfxListener
{
@@ -228,6 +169,8 @@ public:
String UpdateTitle();
+ static void ActivateToolPanel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL );
+
// interne Handler
SAL_DLLPRIVATE virtual BOOL SetBorderPixelImpl( const SfxViewShell *pSh, const SvBorder &rBorder );
SAL_DLLPRIVATE virtual const SvBorder& GetBorderPixelImpl( const SfxViewShell *pSh ) const;
@@ -304,6 +247,7 @@ public:
SAL_DLLPRIVATE void INetState_Impl(SfxItemSet &);
SAL_DLLPRIVATE void SetCurViewId_Impl( const USHORT i_nID );
+ SAL_DLLPRIVATE void ActivateToolPanel_Impl( const ::rtl::OUString& i_rPanelURL );
//#endif
private:
diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst
index 3e791fbc2000..96320614eaaf 100644
--- a/sfx2/prj/build.lst
+++ b/sfx2/prj/build.lst
@@ -1,8 +1,7 @@
-sf sfx2 : l10n idl basic xmlscript framework shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 NULL
+sf sfx2 : l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 NULL
sf sfx2 usr1 - all sf_mkout NULL
sf sfx2\inc nmake - all sf_inc NULL
sf sfx2\prj get - all sf_prj NULL
-sf sfx2\win\res get - all sf_wres NULL
sf sfx2\mac\res get - all sf_mres NULL
sf sfx2\source\inc get - all sf_sinc NULL
sf sfx2\sdi nmake - all sf_sdi NULL
@@ -20,5 +19,7 @@ sf sfx2\source\statbar nmake - all sf_sbar sf_sdi sf_inc NULL
sf sfx2\source\toolbox nmake - all sf_tbox sf_sdi sf_inc NULL
sf sfx2\source\inet nmake - all sf_inet sf_sdi sf_inc NULL
sf sfx2\source\explorer nmake - all sf_expl sf_sdi sf_inc NULL
+sf sfx2\workben\custompanel nmake - all sf_wb_custompanel NULL
sf sfx2\util nmake - all sf_util sf_appl sf_bast sf_cnfg sf_ctrl sf_dlg sf_doc sf_expl sf_inet sf_menu sf_layout sf_noti sf_sbar sf_tbox sf_view NULL
sf sfx2\qa\unoapi nmake - all sf_qa_unoapi NULL
+sf sfx2\qa\cppunit nmake - all sf_qa_cppunit sf_util NULL
diff --git a/sfx2/qa/cppunit/makefile.mk b/sfx2/qa/cppunit/makefile.mk
new file mode 100644
index 000000000000..2794c2ae92bb
--- /dev/null
+++ b/sfx2/qa/cppunit/makefile.mk
@@ -0,0 +1,74 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General 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=sfx2
+TARGET=qa_cppunit
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+DLLPRE = # no leading "lib" on .so files
+
+# --- Libs ---------------------------------------------------------
+
+SHL1OBJS= \
+ $(SLO)/test_metadatable.obj \
+
+
+SHL1STDLIBS= \
+ $(CPPUNITLIB) \
+ $(SALLIB) \
+ $(CPPULIB) \
+ $(CPPUHELPERLIB) \
+ $(VCLLIB) \
+ $(SFXLIB) \
+
+
+SHL1TARGET= test_metadatable
+SHL1RPATH = NONE
+SHL1IMPLIB= i$(SHL1TARGET)
+# SHL1DEF= $(MISC)/$(SHL1TARGET).def
+DEF1NAME=$(SHL1TARGET)
+# DEF1EXPORTFILE= export.exp
+SHL1VERSIONMAP= version.map
+
+# --- All object files ---------------------------------------------
+
+SLOFILES= \
+ $(SHL1OBJS) \
+
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+.INCLUDE : _cppunit.mk
+
diff --git a/sfx2/qa/cppunit/test_metadatable.cxx b/sfx2/qa/cppunit/test_metadatable.cxx
new file mode 100644
index 000000000000..903be6920327
--- /dev/null
+++ b/sfx2/qa/cppunit/test_metadatable.cxx
@@ -0,0 +1,280 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_sfx2.hxx"
+
+#include <cppunit/TestAssert.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/plugin/TestPlugIn.h>
+
+#include <rtl/ustrbuf.hxx>
+
+#include <com/sun/star/util/DateTime.hpp>
+#include <com/sun/star/util/Date.hpp>
+#include <com/sun/star/util/Duration.hpp>
+
+#include <sfx2/Metadatable.hxx>
+#include <sfx2/XmlIdRegistry.hxx>
+
+
+using namespace ::com::sun::star;
+
+
+namespace {
+
+class MetadatableTest
+ : public ::CppUnit::TestFixture
+{
+public:
+ virtual void setUp();
+ virtual void tearDown();
+
+ void test();
+
+ CPPUNIT_TEST_SUITE(MetadatableTest);
+ CPPUNIT_TEST(test);
+ CPPUNIT_TEST_SUITE_END();
+
+private:
+};
+
+void MetadatableTest::setUp()
+{
+}
+
+void MetadatableTest::tearDown()
+{
+}
+
+
+class MockMetadatable
+ : public ::sfx2::Metadatable
+{
+private:
+ ::sfx2::IXmlIdRegistry & m_rRegistry;
+
+public:
+ MockMetadatable(::sfx2::IXmlIdRegistry & i_rReg,
+ bool const i_isInClip = false)
+ : m_rRegistry(i_rReg)
+ , m_bInClipboard(i_isInClip), m_bInUndo(false), m_bInContent(true) {}
+ bool m_bInClipboard;
+ bool m_bInUndo;
+ bool m_bInContent;
+ virtual bool IsInClipboard() const { return m_bInClipboard; }
+ virtual bool IsInUndo() const { return m_bInUndo; }
+ virtual bool IsInContent() const { return m_bInContent; }
+ virtual ::sfx2::IXmlIdRegistry& GetRegistry() { return m_rRegistry; }
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable > MakeUnoObject() { return 0; }
+};
+
+static bool operator==(beans::StringPair p1, beans::StringPair p2)
+{
+ return p1.First == p2.First && p1.Second == p2.Second;
+}
+
+void MetadatableTest::test()
+{
+ OSL_TRACE("SwMetadatable test(): start\n");
+ ::std::auto_ptr< ::sfx2::IXmlIdRegistry > const pReg(
+ ::sfx2::createXmlIdRegistry(false) );
+ ::std::auto_ptr< ::sfx2::IXmlIdRegistry > const pRegClip(
+ ::sfx2::createXmlIdRegistry(true) );
+
+ MockMetadatable m1(*pReg);
+ MockMetadatable m2(*pReg);
+ MockMetadatable m3(*pReg);
+ MockMetadatable m4(*pReg);
+ MockMetadatable m5(*pReg);
+ ::rtl::OUString empty;
+ ::rtl::OUString content( ::rtl::OUString::createFromAscii("content.xml") );
+ ::rtl::OUString styles ( ::rtl::OUString::createFromAscii("styles.xml") );
+ ::rtl::OUString sid1( ::rtl::OUString::createFromAscii("id1") );
+ ::rtl::OUString sid2( ::rtl::OUString::createFromAscii("id2") );
+ ::rtl::OUString sid3( ::rtl::OUString::createFromAscii("id3") );
+ ::rtl::OUString sid4( ::rtl::OUString::createFromAscii("id4") );
+ beans::StringPair id1(content, sid1);
+ beans::StringPair id2(content, sid2);
+ beans::StringPair id3(content, sid3);
+ beans::StringPair id4(styles, sid4);
+ beans::StringPair id3e(empty, sid3);
+ beans::StringPair id4e(empty, sid4);
+ m1.SetMetadataReference(id1);
+ CPPUNIT_ASSERT_MESSAGE("set failed", m1.GetMetadataReference() == id1);
+ try {
+ m2.SetMetadataReference(id1);
+ CPPUNIT_ASSERT_MESSAGE("set duplicate succeeded", false);
+ } catch (lang::IllegalArgumentException) { }
+ m1.SetMetadataReference(id1);
+ CPPUNIT_ASSERT_MESSAGE("set failed (existing)",
+ m1.GetMetadataReference() == id1);
+ m1.EnsureMetadataReference();
+ CPPUNIT_ASSERT_MESSAGE("ensure failed (existing)",
+ m1.GetMetadataReference() == id1);
+
+ m2.EnsureMetadataReference();
+ beans::StringPair m2id(m2.GetMetadataReference());
+ CPPUNIT_ASSERT_MESSAGE("ensure failed", m2id.Second.getLength());
+ m2.EnsureMetadataReference();
+ CPPUNIT_ASSERT_MESSAGE("ensure failed (idempotent)",
+ m2.GetMetadataReference() == m2id);
+
+ m1.m_bInUndo = true;
+ CPPUNIT_ASSERT_MESSAGE("move to undo failed",
+ !m1.GetMetadataReference().Second.getLength());
+
+ m1.m_bInUndo = false;
+ CPPUNIT_ASSERT_MESSAGE("move from undo failed",
+ m1.GetMetadataReference() == id1);
+
+ m1.m_bInUndo = true;
+ try {
+ m2.SetMetadataReference(id1); // steal!
+ } catch (lang::IllegalArgumentException &) {
+ CPPUNIT_FAIL("set duplicate to undo failed");
+ }
+ m1.m_bInUndo = false;
+ CPPUNIT_ASSERT_MESSAGE("move from undo: duplicate",
+ !m1.GetMetadataReference().Second.getLength());
+
+ m3.RegisterAsCopyOf(m2);
+ CPPUNIT_ASSERT_MESSAGE("copy: source", m2.GetMetadataReference() == id1);
+ CPPUNIT_ASSERT_MESSAGE("copy: duplicate",
+ !m3.GetMetadataReference().Second.getLength());
+ m4.RegisterAsCopyOf(m3);
+ CPPUNIT_ASSERT_MESSAGE("copy: source", m2.GetMetadataReference() == id1);
+ CPPUNIT_ASSERT_MESSAGE("copy: duplicate",
+ !m3.GetMetadataReference().Second.getLength());
+ CPPUNIT_ASSERT_MESSAGE("copy: duplicate",
+ !m4.GetMetadataReference().Second.getLength());
+ m2.m_bInUndo = true;
+ CPPUNIT_ASSERT_MESSAGE("duplicate to undo",
+ m3.GetMetadataReference() == id1);
+ CPPUNIT_ASSERT_MESSAGE("duplicate to undo",
+ !m2.GetMetadataReference().Second.getLength());
+ m2.m_bInUndo = false;
+ CPPUNIT_ASSERT_MESSAGE("duplicate from undo",
+ m2.GetMetadataReference() == id1);
+ CPPUNIT_ASSERT_MESSAGE("duplicate from undo",
+ !m3.GetMetadataReference().Second.getLength());
+
+ m4.EnsureMetadataReference(); // new!
+ beans::StringPair m4id(m4.GetMetadataReference());
+ CPPUNIT_ASSERT_MESSAGE("ensure on duplicate",
+ m4id.Second.getLength() && !(m4id == id1));
+
+ MockMetadatable mc1(*pRegClip, true); // in clipboard
+ MockMetadatable mc2(*pRegClip, true);
+ MockMetadatable mc3(*pRegClip, true);
+ MockMetadatable mc4(*pRegClip, true);
+ MockMetadatable m2p(*pReg);
+ MockMetadatable m3p(*pReg);
+
+ mc1.SetMetadataReference(id2);
+ CPPUNIT_ASSERT_MESSAGE("set failed", mc1.GetMetadataReference() == id2);
+ try {
+ mc2.SetMetadataReference(id2);
+ CPPUNIT_FAIL("set duplicate succeeded");
+ } catch (lang::IllegalArgumentException) { }
+ mc1.SetMetadataReference(id2);
+ CPPUNIT_ASSERT_MESSAGE("set failed (existing)",
+ mc1.GetMetadataReference() == id2);
+ mc1.EnsureMetadataReference();
+ CPPUNIT_ASSERT_MESSAGE("ensure failed (existing)",
+ mc1.GetMetadataReference() == id2);
+ mc2.EnsureMetadataReference();
+ beans::StringPair mc2id(mc2.GetMetadataReference());
+ CPPUNIT_ASSERT_MESSAGE("ensure failed", mc2id.Second.getLength());
+ mc2.EnsureMetadataReference();
+ CPPUNIT_ASSERT_MESSAGE("ensure failed (idempotent)",
+ mc2.GetMetadataReference() == mc2id);
+ mc2.RemoveMetadataReference();
+ CPPUNIT_ASSERT_MESSAGE("remove failed",
+ !mc2.GetMetadataReference().Second.getLength());
+
+ // set up mc2 as copy of m2 and mc3 as copy of m3
+ mc3.RegisterAsCopyOf(m3);
+ CPPUNIT_ASSERT_MESSAGE("copy to clipboard (latent)",
+ !mc3.GetMetadataReference().Second.getLength() );
+ mc2.RegisterAsCopyOf(m2);
+ CPPUNIT_ASSERT_MESSAGE("copy to clipboard (non-latent)",
+ mc2.GetMetadataReference() == id1);
+ // paste mc2 to m2p and mc3 to m3p
+ m2p.RegisterAsCopyOf(mc2);
+ CPPUNIT_ASSERT_MESSAGE("paste from clipboard (non-latent)",
+ !m2p.GetMetadataReference().Second.getLength() );
+ m3p.RegisterAsCopyOf(mc3);
+ CPPUNIT_ASSERT_MESSAGE("paste from clipboard (latent)",
+ !m3p.GetMetadataReference().Second.getLength() );
+ // delete m2, m2p, m3
+ m2.RemoveMetadataReference();
+ CPPUNIT_ASSERT_MESSAGE("remove failed",
+ !m2.GetMetadataReference().Second.getLength());
+ CPPUNIT_ASSERT_MESSAGE("paste-remove (non-latent)",
+ m2p.GetMetadataReference() == id1);
+ m2p.RemoveMetadataReference();
+ CPPUNIT_ASSERT_MESSAGE("remove failed",
+ !m2p.GetMetadataReference().Second.getLength());
+ CPPUNIT_ASSERT_MESSAGE("paste-remove2 (non-latent)",
+ m3.GetMetadataReference() == id1);
+ m3.RemoveMetadataReference();
+ CPPUNIT_ASSERT_MESSAGE("remove failed",
+ !m3.GetMetadataReference().Second.getLength());
+ CPPUNIT_ASSERT_MESSAGE("paste-remove (latent)",
+ m3p.GetMetadataReference() == id1);
+ // delete mc2
+ mc2.SetMetadataReference(beans::StringPair());
+ CPPUNIT_ASSERT_MESSAGE("in clipboard becomes non-latent",
+ !mc3.GetMetadataReference().Second.getLength() );
+ // paste mc2
+ m2p.RegisterAsCopyOf(mc2);
+ CPPUNIT_ASSERT_MESSAGE("remove-paste",
+ !m2p.GetMetadataReference().Second.getLength());
+ CPPUNIT_ASSERT_MESSAGE("remove-paste (stolen)",
+ m3p.GetMetadataReference() == id1);
+
+ // auto-detect stream
+ m5.SetMetadataReference(id3e);
+ CPPUNIT_ASSERT_MESSAGE("auto-detect (content)",
+ m5.GetMetadataReference() == id3);
+ m5.m_bInContent = false;
+ m5.SetMetadataReference(id4e);
+ CPPUNIT_ASSERT_MESSAGE("auto-detect (styles)",
+ m5.GetMetadataReference() == id4);
+
+ OSL_TRACE("sfx2::Metadatable test(): finished\n");
+}
+
+
+CPPUNIT_TEST_SUITE_REGISTRATION(MetadatableTest);
+
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
diff --git a/sfx2/qa/cppunit/version.map b/sfx2/qa/cppunit/version.map
new file mode 100644
index 000000000000..3308588ef6f8
--- /dev/null
+++ b/sfx2/qa/cppunit/version.map
@@ -0,0 +1,34 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+UDK_3_0_0 {
+ global:
+ cppunitTestPlugIn;
+
+ local:
+ *;
+};
diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi
index c4210b801bf6..dbf9267448e1 100644
--- a/sfx2/sdi/frmslots.sdi
+++ b/sfx2/sdi/frmslots.sdi
@@ -50,6 +50,11 @@ interface Window
ExecMethod = ChildWindowExecute ;
StateMethod = ChildWindowState ;
]
+ SID_TASKPANE // status(final|play)
+ [
+ ExecMethod = ChildWindowExecute ;
+ StateMethod = ChildWindowState ;
+ ]
SID_SHOW_BROWSER // ole(no) api(final/play/rec)
[
ExecMethod = ChildWindowExecute ;
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 10a920852848..e4e43c51052f 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3931,6 +3931,33 @@ SfxBoolItem Navigator SID_NAVIGATOR
ToolBoxConfig = TRUE,
GroupId = GID_NAVIGATOR;
]
+
+//--------------------------------------------------------------------------
+SfxBoolItem TaskPane SID_TASKPANE
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
//--------------------------------------------------------------------------
SfxVoidItem RestoreEditingView SID_RESTORE_EDITING_VIEW
@@ -8194,3 +8221,29 @@ SfxInt16Item PasteUnformatted SID_PASTE_UNFORMATTED
GroupId = GID_EDIT;
]
+//--------------------------------------------------------------------------
+// call thesaurus dialog from context menu
+SfxInt16Item ThesaurusFromContext SID_THES
+(SfxStringItem WordReplace SID_THES)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_TEXT;
+]
+
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index d42d203e57f5..6e13894feb49 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -322,6 +322,7 @@ SfxApplication* SfxApplication::GetOrCreate()
::framework::SetStatusBarControllerCreator( SfxStatusBarControllerFactory );
::framework::SetDockingWindowCreator( SfxDockingWindowFactory );
::framework::SetIsDockingWindowVisible( IsDockingWindowVisible );
+ ::framework::SetActivateToolPanel( &SfxViewFrame::ActivateToolPanel );
SfxHelp* pSfxHelp = new SfxHelp;
Application::SetHelp( pSfxHelp );
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index a34a2e0d6a32..08023c5414a6 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -35,7 +35,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <svtools/soerr.hxx>
-#include <svl/svtools.hrc>
+#include <svtools/svtools.hrc>
#include <unotools/saveopt.hxx>
#include <unotools/localisationoptions.hxx>
#include <tools/config.hxx>
diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx
index 47bf98292316..addace134362 100644
--- a/sfx2/source/appl/appreg.cxx
+++ b/sfx2/source/appl/appreg.cxx
@@ -42,6 +42,7 @@
#include "inettbc.hxx"
#include "stbitem.hxx"
#include <sfx2/navigat.hxx>
+#include <sfx2/taskpane.hxx>
#include <sfx2/module.hxx>
#include <sfx2/viewfrm.hxx>
#include "partwnd.hxx"
diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx
index f7cccf2712b8..3b26eae1858d 100644
--- a/sfx2/source/appl/imagemgr.cxx
+++ b/sfx2/source/appl/imagemgr.cxx
@@ -71,7 +71,7 @@ static WeakReference< XModuleUIConfigurationManagerSupplier > m_xModuleCfgMgrSup
static WeakReference< XURLTransformer > m_xURLTransformer;
static ModuleIdToImagegMgr m_aModuleIdToImageMgrMap;
-Image SAL_CALL GetImage( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast )
+Image SAL_CALL GetImage( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast )
{
// TODO/LATeR: shouldn't this become a method at SfxViewFrame?! That would save the UnoTunnel
if ( !rFrame.is() )
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index c8a9742f49cf..895263ef4783 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -49,6 +49,8 @@
#include <sfx2/objface.hxx>
#include <sfx2/viewfrm.hxx>
#include <svl/intitem.hxx>
+#include "sfx2/taskpane.hxx"
+#include <tools/diagnose_ex.h>
#define SfxModule
#include "sfxslots.hxx"
@@ -400,6 +402,17 @@ BOOL SfxModule::IsActive() const
return FALSE;
}
+bool SfxModule::IsChildWindowAvailable( const USHORT i_nId, const SfxViewFrame* i_pViewFrame ) const
+{
+ if ( i_nId != SID_TASKPANE )
+ // by default, assume it is
+ return true;
+
+ const SfxViewFrame* pViewFrame = i_pViewFrame ? i_pViewFrame : GetFrame();
+ ENSURE_OR_RETURN( pViewFrame, "SfxModule::IsChildWindowAvailable: no frame to ask for the module identifier!", false );
+ return ::sfx2::ModuleTaskPane::ModuleHasToolPanels( pViewFrame->GetFrame().GetFrameInterface() );
+}
+
SfxModule* SfxModule::GetActiveModule( SfxViewFrame* pFrame )
{
if ( !pFrame )
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 24cf7dab8095..f9a388deee5c 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -53,6 +53,7 @@
#include <vcl/taskpanelist.hxx>
#include <vcl/toolbox.hxx>
#include <tools/rcid.h>
+#include <tools/diagnose_ex.h>
#include <toolkit/helper/vclunohelper.hxx>
#include <svl/itempool.hxx>
#include <svl/itemiter.hxx>
@@ -1538,6 +1539,16 @@ void SfxWorkWindow::UpdateObjectBars_Impl()
}
}
+bool SfxWorkWindow::AllowChildWindowCreation_Impl( const SfxChildWin_Impl& i_rCW ) const
+{
+ // or checking the availability of child windows, we need access to the module
+ const SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
+ const SfxObjectShell* pShell = pViewFrame ? pViewFrame->GetObjectShell() : NULL;
+ const SfxModule* pModule = pShell ? pShell->GetModule() : NULL;
+ ENSURE_OR_RETURN( pModule, "SfxWorkWindow::UpdateChildWindows_Impl: did not find an SfxModule to ask for the child win availability!", true );
+ return pModule->IsChildWindowAvailable( i_rCW.nId, pViewFrame );
+}
+
void SfxWorkWindow::UpdateChildWindows_Impl()
{
// alle vorhandenen oder in den Kontext gekommenen ChildWindows
@@ -1550,7 +1561,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
{
// Im Kontext ist ein geeignetes ChildWindow erlaubt;
// ist es auch eingeschaltet ?
- if ( pChildWin == 0 && pCW->bCreate )
+ if ( pChildWin == NULL && pCW->bCreate )
{
// Internal docking is only used for embedding into another
// container. We force the floating state of all floatable
@@ -1571,6 +1582,9 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
else
bCreate = TRUE;
+ if ( bCreate )
+ bCreate = AllowChildWindowCreation_Impl( *pCW );
+
// Momentan kein Fenster da, aber es ist eingeschaltet; Fenster
// und ggf. Context erzeugen
if ( bCreate )
@@ -1588,19 +1602,25 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
if ( ( !bIsFullScreen || pChildWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT ) && bAllChildsVisible )
{
// Updatemode ist kompatibel; auf jeden Fall wieder einschalten
- bCreate = TRUE;
- if ( pCW->pCli )
+ bCreate = AllowChildWindowCreation_Impl( *pCW );
+ if ( bCreate )
{
- // Fenster ist direktes Child
- if ( bAllChildsVisible && ( (IsDockingAllowed() && bInternalDockingAllowed) || pCW->pCli->eAlign == SFX_ALIGN_NOALIGNMENT ) )
- pCW->pCli->nVisible |= CHILD_NOT_HIDDEN;
+ if ( pCW->pCli )
+ {
+ // Fenster ist direktes Child
+ if ( bAllChildsVisible && ( (IsDockingAllowed() && bInternalDockingAllowed) || pCW->pCli->eAlign == SFX_ALIGN_NOALIGNMENT ) )
+ pCW->pCli->nVisible |= CHILD_NOT_HIDDEN;
+ }
+ else
+ {
+ if ( pCW->bCreate && IsDockingAllowed() && bInternalDockingAllowed )
+ // Fenster liegt in einem SplitWindow
+ ((SfxDockingWindow*)pChildWin->GetWindow())->Reappear_Impl();
+ }
+
+ if ( pCW->nInterfaceId != pChildWin->GetContextId() )
+ pChildWin->CreateContext( pCW->nInterfaceId, GetBindings() );
}
- else if ( pCW->bCreate && IsDockingAllowed() && bInternalDockingAllowed )
- // Fenster liegt in einem SplitWindow
- ((SfxDockingWindow*)pChildWin->GetWindow())->Reappear_Impl();
-
- if ( pCW->nInterfaceId != pChildWin->GetContextId() )
- pChildWin->CreateContext( pCW->nInterfaceId, GetBindings() );
}
}
}
@@ -2225,7 +2245,7 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
SfxChildWin_Impl *pCW = (*pChildWins)[n];
SfxChildWindow *pChild = pCW->pWin;
- bool bCreationAllowed( sal_True );
+ bool bCreationAllowed( true );
if ( !bInternalDockingAllowed )
{
// Special case for all non-floatable child windows. We have
@@ -2233,43 +2253,51 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
bCreationAllowed = !( pCW->aInfo.nFlags & SFX_CHILDWIN_FORCEDOCK );
}
- if ( pChild && pCW->bCreate && bCreationAllowed )
+ if ( bCreationAllowed )
{
- if ( pChild->QueryClose() )
+ if ( pCW->bCreate )
{
- if ( pChild && pChild->IsHideAtToggle() )
+ if ( pChild )
{
- pCW->bCreate = !pCW->bCreate;
- ShowChildWindow_Impl( nId, pCW->bCreate, bSetFocus );
+ if ( pChild->QueryClose() )
+ {
+ pCW->bCreate = FALSE;
+ if ( pChild->IsHideAtToggle() )
+ {
+ ShowChildWindow_Impl( nId, FALSE, bSetFocus );
+ }
+ else
+ {
+ // Fenster soll ausgeschaltet werdem
+ pChild->SetVisible_Impl( FALSE );
+ RemoveChildWin_Impl( pCW );
+ }
+ }
}
else
{
- // Fenster soll ausgeschaltet werdem
+ // no actual Window exists, yet => just remember the "switched off" state
pCW->bCreate = FALSE;
- pChild->SetVisible_Impl( FALSE );
- RemoveChildWin_Impl( pCW );
}
}
- }
- else if ( pCW->bCreate && bCreationAllowed )
- {
- pCW->bCreate = FALSE;
- }
- else if ( bCreationAllowed )
- {
- pCW->bCreate = TRUE;
-
- if ( pChild )
- {
- ShowChildWindow_Impl( nId, pCW->bCreate, bSetFocus );
- }
else
{
- // Fenster erzeugen
- CreateChildWin_Impl( pCW, bSetFocus );
- if ( !pCW->pWin )
- // Erzeugung war erfolglos
- pCW->bCreate = FALSE;
+ pCW->bCreate = AllowChildWindowCreation_Impl( *pCW );
+ if ( pCW->bCreate )
+ {
+ if ( pChild )
+ {
+ ShowChildWindow_Impl( nId, TRUE, bSetFocus );
+ }
+ else
+ {
+ // create actual Window
+ CreateChildWin_Impl( pCW, bSetFocus );
+ if ( !pCW->pWin )
+ // no success
+ pCW->bCreate = FALSE;
+ }
+ }
}
}
@@ -2488,7 +2516,6 @@ void SfxWorkWindow::ShowChildWindow_Impl(USHORT nId, BOOL bVisible, BOOL bSetFoc
SfxChildWindow *pChildWin = pCW->pWin;
if ( pChildWin )
{
-// pCW->bCreate = bVisible;
if ( bVisible )
{
if ( pCW->pCli )
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index f1e100e17cf5..7f03bf416431 100644
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.hrc
@@ -39,54 +39,24 @@
#define RID_DLG_ALIEN_WARNING ( RC_DIALOG_BEGIN + 0)
#define STR_RESET ( RC_DIALOG_BEGIN + 0)
-#define STR_BASEFMT ( RC_DIALOG_BEGIN + 1)
-#define CB_USE_PASSWD ( RC_DIALOG_BEGIN + 2)
-#define CB_READ_ONLY ( RC_DIALOG_BEGIN + 3)
-#define BTN_MANAGER ( RC_DIALOG_BEGIN + 4)
-#define BTN_STANDARD ( RC_DIALOG_BEGIN + 5)
#define DLG_PASSWD ( RC_DIALOG_BEGIN + 8)
-#define STR_FILEDLG_INSERT ( RC_DIALOG_BEGIN + 10)
#define STR_TABPAGE_MANAGESTYLES ( RC_DIALOG_BEGIN + 12)
#define MSG_TABPAGE_INVALIDNAME ( RC_DIALOG_BEGIN + 13)
#define MSG_TABPAGE_INVALIDSTYLE ( RC_DIALOG_BEGIN + 14)
#define DLG_NEW_STYLE_BY_EXAMPLE ( RC_DIALOG_BEGIN + 15)
#define MSG_POOL_STYLE_NAME ( RC_DIALOG_BEGIN + 16)
-#define MSG_OVERWRITE_STYLE ( RC_DIALOG_BEGIN + 17)
#define MSG_TABPAGE_INVALIDPARENT ( RC_DIALOG_BEGIN + 18)
#define STR_DELETE_STYLE ( RC_DIALOG_BEGIN + 18)
#define STR_DELETE_STYLE_USED ( RC_DIALOG_BEGIN + 20)
-#define LOGO_IMAGELIST ( RC_DIALOG_BEGIN + 45)
#define MN_CONTEXT_TEMPLDLG ( RC_DIALOG_BEGIN + 46)
-#define MSG_LAYOUT_NOT_LOADING ( RC_DIALOG_BEGIN + 49)
-#define ACC_LAYOUT_NOT_LOADING ( RC_DIALOG_BEGIN + 50)
-
-#define MSG_ERR_CANT_EDIT_OLD_FORMAT ( RC_DIALOG_BEGIN + 60 )
-#define MSG_ERR_CANT_EDIT_OPEN_DOCS ( RC_DIALOG_BEGIN + 61 )
-
-#define RID_URLOPEN ( RC_DIALOG_BEGIN + 62 )
-#define RID_URLOPEN_OK 1
-#define RID_URLOPEN_CANCEL 2
-#define RID_URLOPEN_URL 3
-
-#define CB_FILE ( RC_DIALOG_BEGIN + 63 )
-#define CB_URL ( RC_DIALOG_BEGIN + 64 )
-
-#define STR_INTERNET ( RC_DIALOG_BEGIN + 65 )
-#define RID_AUTOHIDE ( RC_DIALOG_BEGIN + 66 )
-
-#define DLG_ONLINE_REGISTER ( RC_DIALOG_BEGIN + 68 )
#define DLG_VERSIONS ( RC_DIALOG_BEGIN + 69 )
#define DLG_COMMENTS ( RC_DIALOG_BEGIN + 70 )
-#define RID_REGISTER_DLG ( RC_DIALOG_BEGIN + 73 )
-#define DLG_PHONE_CONFIGURATION ( RC_DIALOG_BEGIN + 74 )
-#define DLG_RECOGNIZER_ENGINEMODE ( RC_DIALOG_BEGIN + 75 )
#define MSG_ERROR_WRONG_CONFIRM ( RC_DIALOG_BEGIN + 76 )
-#define DLG_RECOGNIZER_SPEAKER ( RC_DIALOG_BEGIN + 77 )
#define STR_APPLY ( RC_DIALOG_BEGIN + 87 )
@@ -104,7 +74,6 @@
#define RID_DLG_SEARCH ( RC_DIALOG_BEGIN + 109 )
#define STR_PDF_EXPORT_SEND ( RC_DIALOG_BEGIN + 120 )
-#define STR_RECHECK_DOCUMENT ( RC_DIALOG_BEGIN + 121 )
#define IMG_INFO ( RC_DIALOG_BEGIN + 122 )
#define RID_EDIT_DURATIONS ( RC_DIALOG_BEGIN + 123 )
#define SFX_PB_EDIT ( RC_DIALOG_BEGIN + 124 )
diff --git a/sfx2/source/dialog/dialog.src b/sfx2/source/dialog/dialog.src
index a54d2c340d04..c39425510ae2 100644
--- a/sfx2/source/dialog/dialog.src
+++ b/sfx2/source/dialog/dialog.src
@@ -31,30 +31,6 @@
#include "helpid.hrc"
#include "sfxlocal.hrc"
- // Imageliste fuer die AboutBox
-ImageList LOGO_IMAGELIST
-{
- Prefix = "an";
- MaskColor = Color
- {
- Red = 0xFFFF ;
- Green = 0x0000 ;
- Blue = 0xFFFF ;
- };
- IdList =
- {
- 1 ;
- 2 ;
- 3 ;
- 4 ;
- 5 ;
- 6 ;
- };
- IdCount =
- {
- 6 ;
- };
-};
String STR_RESET
{
Text [ en-US ] = "~Reset" ;
@@ -63,48 +39,6 @@ String STR_APPLY
{
Text [ en-US ] = "Apply";
};
-String STR_INTERNET
-{
- Text [ en-US ] = "(Internet)" ;
-};
-String STR_BASEFMT
-{
- Text [ en-US ] = "Base format" ;
-};
-CheckBox CB_USE_PASSWD
-{
- HelpId = HID_FILEDLG_USE_PASSWD ;
- Text [ en-US ] = "~Password" ;
-};
-CheckBox CB_READ_ONLY
-{
- HelpId = HID_FILEDLG_READ_ONLY ;
- Text [ en-US ] = "~Read-only" ;
-};
-PushButton CB_FILE
-{
- HelpId = HID_FILEDLG_FILE ;
- Text [ en-US ] = "~File System" ;
-};
-PushButton CB_URL
-{
- HelpId = HID_FILEDLG_URL ;
- Text [ en-US ] = "Int~ernet" ;
-};
-PushButton BTN_MANAGER
-{
- HelpId = HID_FILEDLG_MANAGER ;
- Text [ en-US ] = "~Manager..." ;
-};
-PushButton BTN_STANDARD
-{
- HelpId = HID_FILEDLG_STANDARD ;
- Text [ en-US ] = "~Home" ;
-};
-String STR_FILEDLG_INSERT
-{
- Text [ en-US ] = "Insert File" ;
-};
String STR_TABPAGE_MANAGESTYLES
{
Text [ en-US ] = "Organizer" ;
@@ -131,12 +65,6 @@ InfoBox MSG_POOL_STYLE_NAME
{
Message [ en-US ] = "Name already exists as a default Style.\nPlease choose another name." ;
};
-QueryBox MSG_OVERWRITE_STYLE
-{
- Buttons = WB_YES_NO ;
- DefButton = WB_DEF_NO ;
- Message [ en-US ] = "Style already exists. Overwrite?" ;
-};
String STR_DELETE_STYLE
{
Text [ en-US ] = "Do you really want to delete Style $1?" ;
@@ -170,87 +98,15 @@ Menu MN_CONTEXT_TEMPLDLG
};
};
-InfoBox MSG_LAYOUT_NOT_LOADING
-{
- BUTTONS = WB_OK ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "Loading document without layout." ;
-};
-Accelerator ACC_LAYOUT_NOT_LOADING
-{
- ItemList =
- {
- AcceleratorItem
- {
- Key = KeyCode
- {
- Code = KEY_L ;
- Shift = FALSE ; Modifier1 = TRUE ; Modifier2 = TRUE ;
- };
- Identifier = 1 ;
- };
- };
-};
//------------------------------------------------------------------------
-ErrorBox MSG_ERR_CANT_EDIT_OLD_FORMAT
-{
- Message [ en-US ] = "Cannot edit document info for documents\n in this file format." ;
-};
- //------------------------------------------------------------------------
-ErrorBox MSG_ERR_CANT_EDIT_OPEN_DOCS
-{
- Message [ en-US ] = "Document info of documents\n being currently edited cannot be modified from within the document manager." ;
-};
-ModalDialog RID_URLOPEN
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 204 , 44 ) ;
- Moveable = TRUE ;
- Text [ en-US ] = "Enter URL" ;
- Moveable = TRUE ;
- OKButton RID_URLOPEN_OK
- {
- Pos = MAP_APPFONT ( 148 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton RID_URLOPEN_CANCEL
- {
- Pos = MAP_APPFONT ( 148 , 24 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- Edit RID_URLOPEN_URL
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 16 ) ;
- Size = MAP_APPFONT ( 138 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- };
-};
-Menu RID_AUTOHIDE
-{
- ItemList =
- {
- MenuItem
- {
- Identifier = SID_AUTOHIDE ;
- HelpID = SID_AUTOHIDE ;
- Text [ en-US ] = "Hide" ;
- };
- };
-};
-String RID_AUTOHIDE
-{
- Text [ en-US ] = "Don't Hide" ;
-};
String SID_NAVIGATOR
{
Text [ en-US ] = "Navigator";
};
+String SID_TASKPANE
+{
+ Text [ en-US ] = "Task Pane";
+};
ErrorBox MSG_ERROR_WRONG_CONFIRM
{
@@ -264,11 +120,6 @@ String STR_PDF_EXPORT_SEND
Text [ en-US ] = "Send" ;
};
-String STR_RECHECK_DOCUMENT
-{
- Text [ en-US ] = "Recheck Document" ;
-};
-
Image IMG_INFO
{
ImageBitmap = Bitmap
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 81c2da0ce78d..45ebfeac69f9 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -33,6 +33,7 @@
#include <vcl/svapp.hxx>
#include <sfx2/filedlghelper.hxx>
#include <unotools/localedatawrapper.hxx>
+#include <unotools/cmdoptions.hxx>
#include <comphelper/processfactory.hxx>
#include <svl/urihelper.hxx>
#include <unotools/useroptions.hxx>
@@ -119,6 +120,8 @@ const USHORT HI_TYPE = 2;
const USHORT HI_VALUE = 3;
const USHORT HI_ACTION = 4;
+static const char DOCUMENT_SIGNATURE_MENU_CMD[] = "Signature";
+
//------------------------------------------------------------------------
String CreateSizeText( ULONG nSize, BOOL bExtraBytes = TRUE, BOOL bSmartExtraBytes = FALSE );
String CreateSizeText( ULONG nSize, BOOL bExtraBytes, BOOL bSmartExtraBytes )
@@ -858,6 +861,13 @@ SfxDocumentPage::SfxDocumentPage( Window* pParent, const SfxItemSet& rItemSet )
aNewSize.Width() -= nDelta;
aUseUserDataCB.SetSizePixel( aNewSize );
}
+ // See i96288
+ // Check if the document signature command is enabled
+ // on the main list enable/disable the pushbutton accordingly
+ SvtCommandOptions aCmdOptions;
+ if ( aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( DOCUMENT_SIGNATURE_MENU_CMD ) ) ) )
+ aSignatureBtn.Disable();
}
//------------------------------------------------------------------------
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 5270eb5d4207..7d177d0bbfd8 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -57,6 +57,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/types.hxx>
#include <comphelper/sequenceashashmap.hxx>
+#include <comphelper/stillreadwriteinteraction.hxx>
#include <tools/urlobj.hxx>
#include <vcl/help.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -542,33 +543,13 @@ void FileDialogHelper_Impl::updateExportButton()
// ------------------------------------------------------------------------
void FileDialogHelper_Impl::updateSelectionBox()
{
- if ( !mbExport )
+ if ( !mbHasSelectionBox )
return;
- // Does the selection box exist?
- bool bSelectionBoxFound = false;
- uno::Reference< XControlInformation > xCtrlInfo( mxFileDlg, UNO_QUERY );
- if ( xCtrlInfo.is() )
- {
- Sequence< ::rtl::OUString > aCtrlList = xCtrlInfo->getSupportedControls();
- sal_uInt32 nCount = aCtrlList.getLength();
- for ( sal_uInt32 nCtrl = 0; nCtrl < nCount; ++nCtrl )
- if ( aCtrlList[ nCtrl ].equalsAscii("SelectionBox") )
- {
- bSelectionBoxFound = true;
- break;
- }
- }
-
- if ( bSelectionBoxFound )
- {
- const SfxFilter* pFilter = getCurentSfxFilter();
- updateExtendedControl(
- ExtendedFilePickerElementIds::CHECKBOX_SELECTION,
- ( mbSelectionEnabled && pFilter && ( pFilter->GetFilterFlags() & SFX_FILTER_SUPPORTSSELECTION ) != 0 ) );
- uno::Reference< XFilePickerControlAccess > xCtrlAccess( mxFileDlg, UNO_QUERY );
- xCtrlAccess->setValue( ExtendedFilePickerElementIds::CHECKBOX_SELECTION, 0, makeAny( (sal_Bool)mbSelection ) );
- }
+ const SfxFilter* pFilter = getCurentSfxFilter();
+ mbSelectionFltrEnabled = updateExtendedControl(
+ ExtendedFilePickerElementIds::CHECKBOX_SELECTION,
+ ( mbSelectionEnabled && pFilter && ( pFilter->GetFilterFlags() & SFX_FILTER_SUPPORTSSELECTION ) != 0 ) );
}
// ------------------------------------------------------------------------
@@ -956,6 +937,8 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
mbPwdCheckBoxState = sal_False;
mbSelection = sal_False;
mbSelectionEnabled = sal_True;
+ mbHasSelectionBox = sal_False;
+ mbSelectionFltrEnabled = sal_False;
// default settings
m_nDontFlags = SFX_FILTER_INTERNAL | SFX_FILTER_NOTINFILEDLG | SFX_FILTER_NOTINSTALLED;
@@ -1025,6 +1008,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
nTemplateDescription = TemplateDescription::FILESAVE_AUTOEXTENSION_SELECTION;
mbHasAutoExt = sal_True;
mbIsSaveDlg = sal_True;
+ mbHasSelectionBox = sal_True;
if ( mbExport && !mxFilterCFG.is() && xFactory.is() )
{
mxFilterCFG = uno::Reference< XNameAccess >(
@@ -2073,6 +2057,21 @@ void FileDialogHelper_Impl::saveConfig()
}
}
+ if( mbHasSelectionBox && mbSelectionFltrEnabled )
+ {
+ try
+ {
+ aValue = xDlg->getValue( ExtendedFilePickerElementIds::CHECKBOX_SELECTION, 0 );
+ sal_Bool bSelection = sal_True;
+ aValue >>= bSelection;
+ if ( aUserData.GetTokenCount(' ') < 3 )
+ aUserData.Append(' ');
+ aUserData.SetToken( 2, ' ', String::CreateFromInt32( (sal_Int32) bSelection ) );
+ bWriteConfig = sal_True;
+ }
+ catch( IllegalArgumentException ){}
+ }
+
if ( bWriteConfig )
aDlgOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aUserData ) ) );
}
@@ -2206,6 +2205,17 @@ void FileDialogHelper_Impl::loadConfig()
catch( IllegalArgumentException ){}
}
+ if( mbHasSelectionBox )
+ {
+ sal_Int32 nFlag = aUserData.GetToken( 2, ' ' ).ToInt32();
+ aValue <<= (sal_Bool) nFlag;
+ try
+ {
+ xDlg->setValue( ExtendedFilePickerElementIds::CHECKBOX_SELECTION, 0, aValue );
+ }
+ catch( IllegalArgumentException ){}
+ }
+
if ( !maPath.getLength() )
displayFolder( SvtPathOptions().GetWorkPath() );
}
@@ -2664,10 +2674,12 @@ static int impl_isFolder( const OUString& rPath )
{
}
+ ::rtl::Reference< ::comphelper::StillReadWriteInteraction > aHandler = new ::comphelper::StillReadWriteInteraction( xHandler );
+
try
{
::ucbhelper::Content aContent(
- rPath, new ::ucbhelper::CommandEnvironment( xHandler, uno::Reference< ucb::XProgressHandler >() ) );
+ rPath, new ::ucbhelper::CommandEnvironment( static_cast< task::XInteractionHandler* > ( aHandler.get() ), uno::Reference< ucb::XProgressHandler >() ) );
if ( aContent.isFolder() )
return 1;
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index b023b8fb53a9..6965e14ae84d 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -107,6 +107,8 @@ namespace sfx2
sal_Bool mbPwdCheckBoxState : 1;
sal_Bool mbSelection : 1;
sal_Bool mbSelectionEnabled : 1;
+ sal_Bool mbHasSelectionBox : 1;
+ sal_Bool mbSelectionFltrEnabled : 1;
private:
void addFilters( sal_Int64 nFlags,
diff --git a/sfx2/source/dialog/makefile.mk b/sfx2/source/dialog/makefile.mk
index 87ef0f1a7af1..3d0c53cdb932 100644
--- a/sfx2/source/dialog/makefile.mk
+++ b/sfx2/source/dialog/makefile.mk
@@ -45,7 +45,8 @@ EXCEPTIONSFILES=\
$(SLO)$/recfloat.obj \
$(SLO)$/templdlg.obj \
$(SLO)$/dinfdlg.obj \
- $(SLO)$/dockwin.obj
+ $(SLO)$/dockwin.obj \
+ $(SLO)$/taskpane.obj
SLOFILES =\
$(EXCEPTIONSFILES) \
@@ -60,7 +61,6 @@ SLOFILES =\
$(SLO)$/passwd.obj \
$(SLO)$/printopt.obj \
$(SLO)$/sfxdlg.obj \
- $(SLO)$/sfxurl.obj \
$(SLO)$/splitwin.obj \
$(SLO)$/srchdlg.obj \
$(SLO)$/styfitem.obj \
@@ -68,7 +68,8 @@ SLOFILES =\
$(SLO)$/tabdlg.obj \
$(SLO)$/tplcitem.obj \
$(SLO)$/tplpitem.obj \
- $(SLO)$/versdlg.obj
+ $(SLO)$/versdlg.obj \
+ $(SLO)$/titledockwin.obj
SRS1NAME=$(TARGET)
SRC1FILES =\
@@ -85,7 +86,9 @@ SRC1FILES =\
templdlg.src \
versdlg.src \
printopt.src \
- srchdlg.src
+ srchdlg.src \
+ titledockwin.src \
+ taskpane.src
.IF "$(BUILD_VER_STRING)"!=""
.IF "$(GUI)"=="UNX"
@@ -102,9 +105,9 @@ CFLAGS+=-DBUILD_VER_STRING="$(subst,",\" "$(BUILD_VER_STRING)")"
$(INCCOM)$/cuilib.hxx: makefile.mk
.IF "$(GUI)"=="UNX"
$(RM) $@
- echo \#define DLL_NAME \"libcui$(DLLPOSTFIX)$(DLLPOST)\" >$@
+ @echo \#define DLL_NAME \"libcui$(DLLPOSTFIX)$(DLLPOST)\" >$@
.ELSE
- echo $(EMQ)#define DLL_NAME $(EMQ)"cui$(DLLPOSTFIX)$(DLLPOST)$(EMQ)" >$@
+ @echo $(EMQ)#define DLL_NAME $(EMQ)"cui$(DLLPOSTFIX)$(DLLPOST)$(EMQ)" >$@
.ENDIF
$(SLO)$/sfxdlg.obj : $(INCCOM)$/cuilib.hxx
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
new file mode 100644
index 000000000000..f25485a1401c
--- /dev/null
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -0,0 +1,1283 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_sfx2.hxx"
+
+#include "sfx2/taskpane.hxx"
+#include "imagemgr.hxx"
+#include "sfx2/sfxsids.hrc"
+#include "sfx2/bindings.hxx"
+#include "sfx2/dispatch.hxx"
+#include "sfxresid.hxx"
+#include "sfxlocal.hrc"
+#include "helpid.hrc"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/frame/XModuleManager.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/ui/XToolPanel.hpp>
+#include <com/sun/star/ui/XUIElementFactory.hpp>
+#include <com/sun/star/awt/XWindowPeer.hpp>
+#include <com/sun/star/awt/PosSize.hpp>
+#include <com/sun/star/frame/XModuleManager.hpp>
+#include <com/sun/star/graphic/XGraphicProvider.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/awt/XControl.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+#include <comphelper/types.hxx>
+#include <comphelper/processfactory.hxx>
+#include <tools/diagnose_ex.h>
+#include <svtools/toolpanel/toolpaneldeck.hxx>
+#include <svtools/toolpanel/tablayouter.hxx>
+#include <svtools/toolpanel/drawerlayouter.hxx>
+#include <unotools/confignode.hxx>
+#include <vcl/menu.hxx>
+#include <vcl/svapp.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+
+#include <boost/noncopyable.hpp>
+
+//......................................................................................................................
+namespace sfx2
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::frame::XModuleManager;
+ using ::com::sun::star::container::XNameAccess;
+ using ::com::sun::star::ui::XToolPanel;
+ using ::com::sun::star::ui::XUIElementFactory;
+ using ::com::sun::star::ui::XUIElement;
+ using ::com::sun::star::awt::XWindow;
+ using ::com::sun::star::frame::XModuleManager;
+ using ::com::sun::star::frame::XFrame;
+ using ::com::sun::star::lang::XComponent;
+ using ::com::sun::star::graphic::XGraphicProvider;
+ using ::com::sun::star::graphic::XGraphic;
+ using ::com::sun::star::accessibility::XAccessible;
+ using ::com::sun::star::awt::XControl;
+ /** === end UNO using === **/
+ namespace PosSize = ::com::sun::star::awt::PosSize;
+
+ //==================================================================================================================
+ //= helpers
+ //==================================================================================================================
+ namespace
+ {
+ //--------------------------------------------------------------------------------------------------------------
+ ::utl::OConfigurationTreeRoot lcl_getModuleUIElementStatesConfig( const ::rtl::OUString& i_rModuleIdentifier,
+ const ::rtl::OUString& i_rResourceURL = ::rtl::OUString() )
+ {
+ const ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ ::rtl::OUStringBuffer aPathComposer;
+ try
+ {
+ const Reference< XNameAccess > xModuleAccess( aContext.createComponent( "com.sun.star.frame.ModuleManager" ), UNO_QUERY_THROW );
+ const ::comphelper::NamedValueCollection aModuleProps( xModuleAccess->getByName( i_rModuleIdentifier ) );
+
+ const ::rtl::OUString sWindowStateRef( aModuleProps.getOrDefault( "ooSetupFactoryWindowStateConfigRef", ::rtl::OUString() ) );
+
+ aPathComposer.appendAscii( "org.openoffice.Office.UI." );
+ aPathComposer.append( sWindowStateRef );
+ aPathComposer.appendAscii( "/UIElements/States" );
+ if ( i_rResourceURL.getLength() )
+ {
+ aPathComposer.appendAscii( "/" );
+ aPathComposer.append( i_rResourceURL );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return ::utl::OConfigurationTreeRoot( aContext, aPathComposer.makeStringAndClear(), false );
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString lcl_identifyModule( const Reference< XFrame >& i_rDocumentFrame )
+ {
+ ::rtl::OUString sModuleName;
+ try
+ {
+ const ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ const Reference< XModuleManager > xModuleManager( aContext.createComponent( "com.sun.star.frame.ModuleManager" ), UNO_QUERY_THROW );
+ sModuleName = xModuleManager->identify( i_rDocumentFrame );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return sModuleName;
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ Reference< XFrame > lcl_getFrame( const SfxBindings* i_pBindings )
+ {
+ const SfxViewFrame* pViewFrame = i_pBindings->GetDispatcher()->GetFrame();
+ const SfxFrame& rFrame = pViewFrame->GetFrame();
+ const Reference< XFrame > xFrame( rFrame.GetFrameInterface() );
+ return xFrame;
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString lcl_getPanelHelpURL( const ::utl::OConfigurationNode& i_rPanelConfigNode )
+ {
+ const ::rtl::OUString sHelpURL( ::comphelper::getString( i_rPanelConfigNode.getNodeValue( "HelpURL" ) ) );
+ return sHelpURL;
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ Image lcl_getPanelImage( const Reference< XFrame >& i_rDocFrame, const ::utl::OConfigurationNode& i_rPanelConfigNode )
+ {
+ const ::rtl::OUString sImageURL( ::comphelper::getString( i_rPanelConfigNode.getNodeValue( "ImageURL" ) ) );
+ if ( sImageURL.getLength() )
+ {
+ try
+ {
+ ::comphelper::NamedValueCollection aMediaProperties;
+ aMediaProperties.put( "URL", sImageURL );
+
+ // special handling: if the ImageURL denotes a CommandName, then retrieve the image for that command
+ const sal_Char* pCommandImagePrefix = "private:commandimage/";
+ const sal_Int32 nCommandImagePrefixLen = strlen( pCommandImagePrefix );
+ if ( sImageURL.compareToAscii( pCommandImagePrefix, nCommandImagePrefixLen ) == 0 )
+ {
+ ::rtl::OUStringBuffer aCommandName;
+ aCommandName.appendAscii( ".uno:" );
+ aCommandName.append( sImageURL.copy( nCommandImagePrefixLen ) );
+ const ::rtl::OUString sCommandName( aCommandName.makeStringAndClear() );
+
+ const BOOL bHiContrast( Application::GetSettings().GetStyleSettings().GetHighContrastMode() );
+ const Image aPanelImage( GetImage( i_rDocFrame, sCommandName, FALSE, bHiContrast ) );
+ return aPanelImage.GetXGraphic();
+ }
+
+ // otherwise, delegate to the GraphicProvider
+ const ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ const Reference< XGraphicProvider > xGraphicProvider( aContext.createComponent( "com.sun.star.graphic.GraphicProvider" ), UNO_QUERY_THROW );
+
+ const Reference< XGraphic > xGraphic( xGraphicProvider->queryGraphic( aMediaProperties.getPropertyValues() ), UNO_SET_THROW );
+ return Image( xGraphic );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+ return Image();
+ }
+ }
+
+ //==================================================================================================================
+ //= TaskPaneDockingWindow
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ TaskPaneDockingWindow::TaskPaneDockingWindow( SfxBindings* i_pBindings, TaskPaneWrapper& i_rWrapper, Window* i_pParent, WinBits i_nBits )
+ :TitledDockingWindow( i_pBindings, &i_rWrapper, i_pParent, i_nBits )
+ ,m_aTaskPane( GetContentWindow(), lcl_getFrame( i_pBindings ) )
+ ,m_aPaneController( m_aTaskPane, *this )
+ {
+ m_aTaskPane.Show();
+ SetText( String( SfxResId( SID_TASKPANE ) ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TaskPaneDockingWindow::ActivateToolPanel( const ::rtl::OUString& i_rPanelURL )
+ {
+ m_aPaneController.ActivateToolPanel( i_rPanelURL );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TaskPaneDockingWindow::GetFocus()
+ {
+ TitledDockingWindow::GetFocus();
+ m_aTaskPane.GrabFocus();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TaskPaneDockingWindow::onLayoutDone()
+ {
+ m_aTaskPane.SetPosSizePixel( Point(), GetContentWindow().GetOutputSizePixel() );
+ }
+
+ //==================================================================================================================
+ //= TaskPaneWrapper
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ SFX_IMPL_DOCKINGWINDOW( TaskPaneWrapper, SID_TASKPANE );
+
+ //------------------------------------------------------------------------------------------------------------------
+ TaskPaneWrapper::TaskPaneWrapper( Window* i_pParent, USHORT i_nId, SfxBindings* i_pBindings, SfxChildWinInfo* i_pInfo )
+ :SfxChildWindow( i_pParent, i_nId )
+ {
+ pWindow = new TaskPaneDockingWindow( i_pBindings, *this, i_pParent,
+ WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE);
+ eChildAlignment = SFX_ALIGN_RIGHT;
+
+ pWindow->SetHelpId( HID_TASKPANE_WINDOW );
+ pWindow->SetOutputSizePixel( Size( 300, 450 ) );
+ pWindow->Show();
+
+ dynamic_cast< SfxDockingWindow* >( pWindow )->Initialize( i_pInfo );
+ SetHideNotDelete( TRUE );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TaskPaneWrapper::ActivateToolPanel( const ::rtl::OUString& i_rPanelURL )
+ {
+ TaskPaneDockingWindow* pDockingWindow = dynamic_cast< TaskPaneDockingWindow* >( GetWindow() );
+ ENSURE_OR_RETURN_VOID( pDockingWindow, "TaskPaneWrapper::ActivateToolPanel: invalid docking window implementation!" );
+ pDockingWindow->ActivateToolPanel( i_rPanelURL );
+ }
+
+ //==================================================================================================================
+ //= CustomPanelUIElement
+ //==================================================================================================================
+ class CustomPanelUIElement
+ {
+ public:
+ CustomPanelUIElement()
+ :m_xUIElement()
+ ,m_xToolPanel()
+ ,m_xPanelWindow()
+ {
+ }
+
+ CustomPanelUIElement( const Reference< XUIElement >& i_rUIElement )
+ :m_xUIElement( i_rUIElement, UNO_SET_THROW )
+ ,m_xToolPanel( i_rUIElement->getRealInterface(), UNO_QUERY_THROW )
+ ,m_xPanelWindow( m_xToolPanel->getWindow(), UNO_SET_THROW )
+ {
+ }
+
+ bool is() const { return m_xPanelWindow.is(); }
+
+ const Reference< XUIElement >& getUIElement() const { return m_xUIElement; }
+ const Reference< XToolPanel >& getToolPanel() const { return m_xToolPanel; }
+ const Reference< XWindow >& getPanelWindow() const { return m_xPanelWindow; }
+
+ private:
+ Reference< XUIElement > m_xUIElement;
+ Reference< XToolPanel > m_xToolPanel;
+ Reference< XWindow > m_xPanelWindow;
+ };
+
+ //==================================================================================================================
+ //= CustomToolPanel
+ //==================================================================================================================
+ class CustomToolPanel : public ::svt::ToolPanelBase
+ {
+ public:
+ CustomToolPanel( const ::utl::OConfigurationNode& i_rPanelWindowState, const Reference< XFrame >& i_rFrame );
+
+ virtual ::rtl::OUString GetDisplayName() const;
+ virtual Image GetImage() const;
+ virtual SmartId GetHelpID() const;
+ virtual void Activate( Window& i_rParentWindow );
+ virtual void Deactivate();
+ virtual void SetSizePixel( const Size& i_rPanelWindowSize );
+ virtual void GrabFocus();
+ virtual void Dispose();
+ virtual Reference< XAccessible >
+ CreatePanelAccessible( const Reference< XAccessible >& i_rParentAccessible );
+
+ const ::rtl::OUString&
+ GetResourceURL() const { return m_sResourceURL; }
+
+ protected:
+ ~CustomToolPanel();
+
+ private:
+ bool impl_ensureToolPanelWindow( Window& i_rPanelParentWindow );
+ void impl_updatePanelConfig( const bool i_bVisible ) const;
+
+ private:
+ const ::rtl::OUString m_sUIName;
+ const Image m_aPanelImage;
+ const ::rtl::OUString m_aPanelHelpURL;
+ const ::rtl::OUString m_sResourceURL;
+ const ::rtl::OUString m_sPanelConfigPath;
+ Reference< XFrame > m_xFrame;
+ CustomPanelUIElement m_aCustomPanel;
+ bool m_bAttemptedCreation;
+ };
+
+ //------------------------------------------------------------------------------------------------------------------
+ CustomToolPanel::CustomToolPanel( const ::utl::OConfigurationNode& i_rPanelWindowState, const Reference< XFrame >& i_rFrame )
+ :m_sUIName( ::comphelper::getString( i_rPanelWindowState.getNodeValue( "UIName" ) ) )
+ ,m_aPanelImage( lcl_getPanelImage( i_rFrame, i_rPanelWindowState ) )
+ ,m_aPanelHelpURL( lcl_getPanelHelpURL( i_rPanelWindowState ) )
+ ,m_sResourceURL( i_rPanelWindowState.getLocalName() )
+ ,m_sPanelConfigPath( i_rPanelWindowState.getNodePath() )
+ ,m_xFrame( i_rFrame )
+ ,m_aCustomPanel()
+ ,m_bAttemptedCreation( false )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ CustomToolPanel::~CustomToolPanel()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool CustomToolPanel::impl_ensureToolPanelWindow( Window& i_rPanelParentWindow )
+ {
+ if ( m_bAttemptedCreation )
+ return m_aCustomPanel.is();
+
+ m_bAttemptedCreation = true;
+ try
+ {
+ const ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ const Reference< XUIElementFactory > xFactory( aContext.createComponent( "com.sun.star.ui.UIElementFactoryManager" ), UNO_QUERY_THROW );
+
+ ::comphelper::NamedValueCollection aCreationArgs;
+ aCreationArgs.put( "Frame", makeAny( m_xFrame ) );
+ aCreationArgs.put( "ParentWindow", makeAny( i_rPanelParentWindow.GetComponentInterface() ) );
+
+ const Reference< XUIElement > xElement(
+ xFactory->createUIElement( m_sResourceURL, aCreationArgs.getPropertyValues() ),
+ UNO_SET_THROW );
+
+ m_aCustomPanel = CustomPanelUIElement( xElement );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return m_aCustomPanel.is();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void CustomToolPanel::impl_updatePanelConfig( const bool i_bVisible ) const
+ {
+ ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ ::utl::OConfigurationTreeRoot aConfig( aContext, m_sPanelConfigPath, true );
+
+ aConfig.setNodeValue( "Visible", makeAny( i_bVisible ) );
+ aConfig.commit();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString CustomToolPanel::GetDisplayName() const
+ {
+ return m_sUIName;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Image CustomToolPanel::GetImage() const
+ {
+ return m_aPanelImage;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ SmartId CustomToolPanel::GetHelpID() const
+ {
+ return SmartId( m_aPanelHelpURL );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void CustomToolPanel::Activate( Window& i_rParentWindow )
+ {
+ ENSURE_OR_RETURN_VOID( impl_ensureToolPanelWindow( i_rParentWindow ), "no panel to activate!" );
+
+ // TODO: we might need a mechanism to decide whether the panel should be destroyed/re-created, or (as it is
+ // done now) hidden/shown
+ m_aCustomPanel.getPanelWindow()->setVisible( sal_True );
+
+ // update the panel's configuration
+ impl_updatePanelConfig( true );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void CustomToolPanel::Deactivate()
+ {
+ ENSURE_OR_RETURN_VOID( m_aCustomPanel.is(), "no panel to deactivate!" );
+
+ m_aCustomPanel.getPanelWindow()->setVisible( sal_False );
+
+ // update the panel's configuration
+ impl_updatePanelConfig( false );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void CustomToolPanel::SetSizePixel( const Size& i_rPanelWindowSize )
+ {
+ ENSURE_OR_RETURN_VOID( m_aCustomPanel.is(), "no panel/window to position!" );
+
+ try
+ {
+ m_aCustomPanel.getPanelWindow()->setPosSize( 0, 0, i_rPanelWindowSize.Width(), i_rPanelWindowSize.Height(),
+ PosSize::POSSIZE );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void CustomToolPanel::GrabFocus()
+ {
+ ENSURE_OR_RETURN_VOID( m_aCustomPanel.is(), "no panel/window to focus!" );
+
+ m_aCustomPanel.getPanelWindow()->setFocus();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void CustomToolPanel::Dispose()
+ {
+ if ( !m_bAttemptedCreation )
+ // nothing to dispose
+ return;
+
+ ENSURE_OR_RETURN_VOID( m_aCustomPanel.is(), "no panel to destroy!" );
+ try
+ {
+ Reference< XComponent > xUIElementComponent( m_aCustomPanel.getUIElement(), UNO_QUERY_THROW );
+ xUIElementComponent->dispose();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XAccessible > CustomToolPanel::CreatePanelAccessible( const Reference< XAccessible >& i_rParentAccessible )
+ {
+ ENSURE_OR_RETURN( m_aCustomPanel.is(), "no panel to ask!", NULL );
+
+ Reference< XAccessible > xPanelAccessible;
+ try
+ {
+ xPanelAccessible.set( m_aCustomPanel.getToolPanel()->createAccessible( i_rParentAccessible ), UNO_SET_THROW );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return xPanelAccessible;
+ }
+
+ //==================================================================================================================
+ //= ModuleTaskPane_Impl
+ //==================================================================================================================
+ class ModuleTaskPane_Impl : public ::boost::noncopyable
+ {
+ public:
+ ModuleTaskPane_Impl( ModuleTaskPane& i_rAntiImpl, const Reference< XFrame >& i_rDocumentFrame,
+ const IToolPanelCompare* i_pPanelCompare )
+ :m_rAntiImpl( i_rAntiImpl )
+ ,m_sModuleIdentifier( lcl_identifyModule( i_rDocumentFrame ) )
+ ,m_xFrame( i_rDocumentFrame )
+ ,m_aPanelDeck( i_rAntiImpl )
+ {
+ m_aPanelDeck.Show();
+ OnResize();
+ impl_initFromConfiguration( i_pPanelCompare );
+ }
+
+ ~ModuleTaskPane_Impl()
+ {
+ }
+
+ void OnResize();
+ void OnGetFocus();
+
+ static bool ModuleHasToolPanels( const ::rtl::OUString& i_rModuleIdentifier );
+
+ ::svt::ToolPanelDeck& GetPanelDeck() { return m_aPanelDeck; }
+ const ::svt::ToolPanelDeck& GetPanelDeck() const { return m_aPanelDeck; }
+
+ ::boost::optional< size_t >
+ GetPanelPos( const ::rtl::OUString& i_rResourceURL );
+ ::rtl::OUString
+ GetPanelResourceURL( const size_t i_nPanelPos ) const;
+
+ void SetDrawersLayout();
+ void SetTabsLayout( const ::svt::TabAlignment i_eTabAlignment, const ::svt::TabItemContent i_eTabContent );
+
+ private:
+ void impl_initFromConfiguration( const IToolPanelCompare* i_pPanelCompare );
+
+ static bool
+ impl_isToolPanelResource( const ::rtl::OUString& i_rResourceURL );
+
+ DECL_LINK( OnActivatePanel, void* );
+
+ private:
+ ModuleTaskPane& m_rAntiImpl;
+ const ::rtl::OUString m_sModuleIdentifier;
+ const Reference< XFrame > m_xFrame;
+ ::svt::ToolPanelDeck m_aPanelDeck;
+ };
+
+ //------------------------------------------------------------------------------------------------------------------
+ void ModuleTaskPane_Impl::OnResize()
+ {
+ m_aPanelDeck.SetPosSizePixel( Point(), m_rAntiImpl.GetOutputSizePixel() );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void ModuleTaskPane_Impl::OnGetFocus()
+ {
+ m_aPanelDeck.GrabFocus();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ IMPL_LINK( ModuleTaskPane_Impl, OnActivatePanel, void*, i_pArg )
+ {
+ m_aPanelDeck.ActivatePanel( reinterpret_cast< size_t >( i_pArg ) );
+ return 1L;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool ModuleTaskPane_Impl::impl_isToolPanelResource( const ::rtl::OUString& i_rResourceURL )
+ {
+ return i_rResourceURL.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:resource/toolpanel/" ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void ModuleTaskPane_Impl::impl_initFromConfiguration( const IToolPanelCompare* i_pPanelCompare )
+ {
+ const ::utl::OConfigurationTreeRoot aWindowStateConfig( lcl_getModuleUIElementStatesConfig( m_sModuleIdentifier ) );
+ if ( !aWindowStateConfig.isValid() )
+ return;
+
+ ::rtl::OUString sFirstVisiblePanelResource;
+
+ const Sequence< ::rtl::OUString > aUIElements( aWindowStateConfig.getNodeNames() );
+ for ( const ::rtl::OUString* resource = aUIElements.getConstArray();
+ resource != aUIElements.getConstArray() + aUIElements.getLength();
+ ++resource
+ )
+ {
+ if ( !impl_isToolPanelResource( *resource ) )
+ continue;
+
+ ::utl::OConfigurationNode aResourceNode( aWindowStateConfig.openNode( *resource ) );
+ ::svt::PToolPanel pCustomPanel( new CustomToolPanel( aResourceNode, m_xFrame ) );
+
+ size_t nPanelPos = m_aPanelDeck.GetPanelCount();
+ if ( i_pPanelCompare )
+ {
+ // assuming that nobody will insert hundreths of panels, a simple O(n) search should suffice here ...
+ while ( nPanelPos > 0 )
+ {
+ const short nCompare = i_pPanelCompare->compareToolPanelsURLs(
+ *resource,
+ GetPanelResourceURL( --nPanelPos )
+ );
+ if ( nCompare >= 0 )
+ {
+ ++nPanelPos;
+ break;
+ }
+ }
+ }
+ nPanelPos = m_aPanelDeck.InsertPanel( pCustomPanel, nPanelPos );
+
+ if ( ::comphelper::getBOOL( aResourceNode.getNodeValue( "Visible" ) ) )
+ sFirstVisiblePanelResource = *resource;
+ }
+
+ if ( sFirstVisiblePanelResource.getLength() )
+ {
+ ::boost::optional< size_t > aPanelPos( GetPanelPos( sFirstVisiblePanelResource ) );
+ OSL_ENSURE( !!aPanelPos, "ModuleTaskPane_Impl::impl_isToolPanelResource: just inserted it, and it's not there?!" );
+ if ( !!aPanelPos )
+ m_rAntiImpl.PostUserEvent( LINK( this, ModuleTaskPane_Impl, OnActivatePanel ), reinterpret_cast< void* >( *aPanelPos ) );
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool ModuleTaskPane_Impl::ModuleHasToolPanels( const ::rtl::OUString& i_rModuleIdentifier )
+ {
+ const ::utl::OConfigurationTreeRoot aWindowStateConfig( lcl_getModuleUIElementStatesConfig( i_rModuleIdentifier ) );
+ if ( !aWindowStateConfig.isValid() )
+ return false;
+
+ const Sequence< ::rtl::OUString > aUIElements( aWindowStateConfig.getNodeNames() );
+ for ( const ::rtl::OUString* resource = aUIElements.getConstArray();
+ resource != aUIElements.getConstArray() + aUIElements.getLength();
+ ++resource
+ )
+ {
+ if ( impl_isToolPanelResource( *resource ) )
+ return true;
+ }
+ return false;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::boost::optional< size_t > ModuleTaskPane_Impl::GetPanelPos( const ::rtl::OUString& i_rResourceURL )
+ {
+ ::boost::optional< size_t > aPanelPos;
+ for ( size_t i = 0; i < m_aPanelDeck.GetPanelCount(); ++i )
+ {
+ const ::svt::PToolPanel pPanel( m_aPanelDeck.GetPanel( i ) );
+ const CustomToolPanel* pCustomPanel = dynamic_cast< const CustomToolPanel* >( pPanel.get() );
+ ENSURE_OR_CONTINUE( pCustomPanel != NULL, "ModuleTaskPane_Impl::GetPanelPos: illegal panel implementation!" );
+ if ( pCustomPanel->GetResourceURL() == i_rResourceURL )
+ {
+ aPanelPos = i;
+ break;
+ }
+ }
+ return aPanelPos;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString ModuleTaskPane_Impl::GetPanelResourceURL( const size_t i_nPanelPos ) const
+ {
+ ENSURE_OR_RETURN( i_nPanelPos < m_aPanelDeck.GetPanelCount(), "ModuleTaskPane_Impl::GetPanelResourceURL: illegal panel position!", ::rtl::OUString() );
+ const ::svt::PToolPanel pPanel( m_aPanelDeck.GetPanel( i_nPanelPos ) );
+ const CustomToolPanel* pCustomPanel = dynamic_cast< const CustomToolPanel* >( pPanel.get() );
+ ENSURE_OR_RETURN( pCustomPanel != NULL, "ModuleTaskPane_Impl::GetPanelPos: illegal panel implementation!", ::rtl::OUString() );
+ return pCustomPanel->GetResourceURL();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void ModuleTaskPane_Impl::SetDrawersLayout()
+ {
+ const ::svt::PDeckLayouter pLayouter( m_aPanelDeck.GetLayouter() );
+ const ::svt::DrawerDeckLayouter* pDrawerLayouter = dynamic_cast< const ::svt::DrawerDeckLayouter* >( pLayouter.get() );
+ if ( pDrawerLayouter != NULL )
+ // already have the proper layout
+ return;
+ m_aPanelDeck.SetLayouter( new ::svt::DrawerDeckLayouter( m_aPanelDeck, m_aPanelDeck ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void ModuleTaskPane_Impl::SetTabsLayout( const ::svt::TabAlignment i_eTabAlignment, const ::svt::TabItemContent i_eTabContent )
+ {
+ ::svt::PDeckLayouter pLayouter( m_aPanelDeck.GetLayouter() );
+ ::svt::TabDeckLayouter* pTabLayouter = dynamic_cast< ::svt::TabDeckLayouter* >( pLayouter.get() );
+ if ( ( pTabLayouter != NULL )
+ && ( pTabLayouter->GetTabAlignment() == i_eTabAlignment )
+ && ( pTabLayouter->GetTabItemContent() == i_eTabContent )
+ )
+ // already have the requested layout
+ return;
+
+ if ( pTabLayouter && ( pTabLayouter->GetTabAlignment() == i_eTabAlignment ) )
+ {
+ // changing only the item content does not require a new layouter instance
+ pTabLayouter->SetTabItemContent( i_eTabContent );
+ return;
+ }
+
+ m_aPanelDeck.SetLayouter( new ::svt::TabDeckLayouter( m_aPanelDeck, m_aPanelDeck, i_eTabAlignment, i_eTabContent ) );
+ }
+
+ //==================================================================================================================
+ //= ModuleTaskPane
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ ModuleTaskPane::ModuleTaskPane( Window& i_rParentWindow, const Reference< XFrame >& i_rDocumentFrame )
+ :Window( &i_rParentWindow, WB_DIALOGCONTROL )
+ ,m_pImpl( new ModuleTaskPane_Impl( *this, i_rDocumentFrame, NULL ) )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ModuleTaskPane::ModuleTaskPane( Window& i_rParentWindow, const Reference< XFrame >& i_rDocumentFrame,
+ const IToolPanelCompare& i_rCompare )
+ :Window( &i_rParentWindow, WB_DIALOGCONTROL )
+ ,m_pImpl( new ModuleTaskPane_Impl( *this, i_rDocumentFrame, &i_rCompare ) )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ModuleTaskPane::~ModuleTaskPane()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool ModuleTaskPane::ModuleHasToolPanels( const ::rtl::OUString& i_rModuleIdentifier )
+ {
+ return ModuleTaskPane_Impl::ModuleHasToolPanels( i_rModuleIdentifier );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool ModuleTaskPane::ModuleHasToolPanels( const Reference< XFrame >& i_rDocumentFrame )
+ {
+ return ModuleTaskPane_Impl::ModuleHasToolPanels( lcl_identifyModule( i_rDocumentFrame ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void ModuleTaskPane::Resize()
+ {
+ Window::Resize();
+ m_pImpl->OnResize();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void ModuleTaskPane::GetFocus()
+ {
+ Window::GetFocus();
+ m_pImpl->OnGetFocus();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::svt::ToolPanelDeck& ModuleTaskPane::GetPanelDeck()
+ {
+ return m_pImpl->GetPanelDeck();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ const ::svt::ToolPanelDeck& ModuleTaskPane::GetPanelDeck() const
+ {
+ return m_pImpl->GetPanelDeck();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::boost::optional< size_t > ModuleTaskPane::GetPanelPos( const ::rtl::OUString& i_rResourceURL )
+ {
+ return m_pImpl->GetPanelPos( i_rResourceURL );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString ModuleTaskPane::GetPanelResourceURL( const size_t i_nPanelPos ) const
+ {
+ return m_pImpl->GetPanelResourceURL( i_nPanelPos );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void ModuleTaskPane::SetDrawersLayout()
+ {
+ m_pImpl->SetDrawersLayout();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void ModuleTaskPane::SetTabsLayout( const ::svt::TabAlignment i_eTabAlignment, const ::svt::TabItemContent i_eTabContent )
+ {
+ m_pImpl->SetTabsLayout( i_eTabAlignment, i_eTabContent );
+ }
+
+ // =====================================================================================================================
+ // = PanelSelectorLayout
+ // =====================================================================================================================
+ enum PanelSelectorLayout
+ {
+ LAYOUT_DRAWERS,
+ LAYOUT_TABS_RIGHT,
+ LAYOUT_TABS_LEFT,
+ LAYOUT_TABS_TOP,
+ LAYOUT_TABS_BOTTOM
+ };
+
+ //==================================================================================================================
+ //= helper
+ //==================================================================================================================
+ namespace
+ {
+ PanelSelectorLayout lcl_getTabLayoutFromAlignment( const SfxChildAlignment i_eAlignment )
+ {
+ switch ( i_eAlignment )
+ {
+ case SFX_ALIGN_LEFT:
+ return LAYOUT_TABS_LEFT;
+ case SFX_ALIGN_TOP:
+ return LAYOUT_TABS_TOP;
+ case SFX_ALIGN_BOTTOM:
+ return LAYOUT_TABS_BOTTOM;
+ default:
+ return LAYOUT_TABS_RIGHT;
+ }
+ }
+ }
+
+ // =====================================================================================================================
+ // = PanelDescriptor
+ // =====================================================================================================================
+ /** is a helper class for TaskPaneController_Impl, holding the details about a single panel which is not
+ contained in the IToolPanel implementation itself.
+ */
+ struct PanelDescriptor
+ {
+ ::svt::PToolPanel pPanel;
+ bool bHidden;
+
+ PanelDescriptor()
+ :pPanel()
+ ,bHidden( false )
+ {
+ }
+
+ PanelDescriptor( const ::svt::PToolPanel& i_rPanel )
+ :pPanel( i_rPanel )
+ ,bHidden( false )
+ {
+ }
+ };
+
+ //==================================================================================================================
+ //= TaskPaneController_Impl
+ //==================================================================================================================
+ class TaskPaneController_Impl :public ::boost::noncopyable
+ ,public ::svt::IToolPanelDeckListener
+ {
+ public:
+ TaskPaneController_Impl(
+ ModuleTaskPane& i_rTaskPane,
+ TitledDockingWindow& i_rDockingWindow
+ );
+ ~TaskPaneController_Impl();
+
+ void SetDefaultTitle( const String& i_rTitle );
+ void ActivateToolPanel( const ::rtl::OUString& i_rPanelURL );
+
+ protected:
+ // IToolPanelDeckListener overridables
+ virtual void PanelInserted( const ::svt::PToolPanel& i_pPanel, const size_t i_nPosition );
+ virtual void PanelRemoved( const size_t i_nPosition );
+ virtual void ActivePanelChanged( const ::boost::optional< size_t >& i_rOldActive, const ::boost::optional< size_t >& i_rNewActive );
+ virtual void LayouterChanged( const ::svt::PDeckLayouter& i_rNewLayouter );
+ virtual void Dying();
+
+ private:
+ DECL_LINK( OnToolboxClicked, ToolBox* );
+ DECL_LINK( OnMenuItemSelected, Menu* );
+ DECL_LINK( DockingChanged, TitledDockingWindow* );
+ ::std::auto_ptr< PopupMenu > impl_createPopupMenu() const;
+
+ /// sets the given layout for the panel selector
+ void impl_setLayout( const PanelSelectorLayout i_eLayout, const bool i_bForce = false );
+
+ /// returns the current layout of the panel selector
+ PanelSelectorLayout
+ impl_getLayout() const { return m_eCurrentLayout; }
+
+ void impl_updateDockingWindowTitle();
+ void impl_togglePanelVisibility( const size_t i_nLogicalPanelIndex );
+ size_t impl_getLogicalPanelIndex( const size_t i_nVisibleIndex );
+
+ private:
+ enum MenuId
+ {
+ MID_UNLOCK_TASK_PANEL = 1,
+ MID_LOCK_TASK_PANEL = 2,
+ MID_LAYOUT_TABS = 3,
+ MID_LAYOUT_DRAWERS = 4,
+ MID_FIRST_PANEL = 5
+ };
+
+ private:
+ typedef ::std::vector< PanelDescriptor > PanelDescriptors;
+
+ ModuleTaskPane& m_rTaskPane;
+ TitledDockingWindow& m_rDockingWindow;
+ USHORT m_nViewMenuID;
+ PanelSelectorLayout m_eCurrentLayout;
+ PanelDescriptors m_aPanelRepository;
+ bool m_bTogglingPanelVisibility;
+ ::rtl::OUString m_sDefaultTitle;
+ };
+
+ //------------------------------------------------------------------------------------------------------------------
+ TaskPaneController_Impl::TaskPaneController_Impl( ModuleTaskPane& i_rTaskPane, TitledDockingWindow& i_rDockingWindow )
+ :m_rTaskPane( i_rTaskPane )
+ ,m_rDockingWindow( i_rDockingWindow )
+ ,m_nViewMenuID( 0 )
+ ,m_eCurrentLayout( LAYOUT_DRAWERS )
+ ,m_aPanelRepository()
+ ,m_bTogglingPanelVisibility( false )
+ ,m_sDefaultTitle()
+ {
+ m_rDockingWindow.ResetToolBox();
+ m_nViewMenuID = m_rDockingWindow.AddDropDownToolBoxItem(
+ String( SfxResId( STR_SFX_TASK_PANE_VIEW ) ),
+ HID_TASKPANE_VIEW_MENU,
+ LINK( this, TaskPaneController_Impl, OnToolboxClicked )
+ );
+ m_rDockingWindow.SetEndDockingHdl( LINK( this, TaskPaneController_Impl, DockingChanged ) );
+ impl_setLayout( LAYOUT_DRAWERS, true );
+
+ m_rTaskPane.GetPanelDeck().AddListener( *this );
+
+ // initialize the panel repository
+ for ( size_t i = 0; i < m_rTaskPane.GetPanelDeck().GetPanelCount(); ++i )
+ {
+ ::svt::PToolPanel pPanel( m_rTaskPane.GetPanelDeck().GetPanel( i ) );
+ m_aPanelRepository.push_back( PanelDescriptor( pPanel ) );
+ }
+
+ SetDefaultTitle( String( SfxResId( STR_SFX_TASKS ) ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ TaskPaneController_Impl::~TaskPaneController_Impl()
+ {
+ m_rTaskPane.GetPanelDeck().RemoveListener( *this );
+
+ // remove the panels which are not under the control of the panel deck currently
+ for ( PanelDescriptors::iterator panelPos = m_aPanelRepository.begin();
+ panelPos != m_aPanelRepository.end();
+ ++panelPos
+ )
+ {
+ if ( panelPos->bHidden )
+ panelPos->pPanel->Dispose();
+ }
+ m_aPanelRepository.clear();
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ void TaskPaneController_Impl::SetDefaultTitle( const String& i_rTitle )
+ {
+ m_sDefaultTitle = i_rTitle;
+ impl_updateDockingWindowTitle();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TaskPaneController_Impl::ActivateToolPanel( const ::rtl::OUString& i_rPanelURL )
+ {
+ ::boost::optional< size_t > aPanelPos( m_rTaskPane.GetPanelPos( i_rPanelURL ) );
+ ENSURE_OR_RETURN_VOID( !!aPanelPos, "TaskPaneController_Impl::ActivateToolPanel: no such panel!" );
+
+ if ( aPanelPos == m_rTaskPane.GetPanelDeck().GetActivePanel() )
+ {
+ ::svt::PToolPanel pPanel( m_rTaskPane.GetPanelDeck().GetPanel( *aPanelPos ) );
+ pPanel->GrabFocus();
+ }
+ else
+ {
+ m_rTaskPane.GetPanelDeck().ActivatePanel( aPanelPos );
+ }
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ IMPL_LINK( TaskPaneController_Impl, DockingChanged, TitledDockingWindow*, i_pDockingWindow )
+ {
+ ENSURE_OR_RETURN( i_pDockingWindow && &m_rDockingWindow, "TaskPaneController_Impl::DockingChanged: where does this come from?", 0L );
+
+ if ( impl_getLayout() == LAYOUT_DRAWERS )
+ return 0L;
+
+ impl_setLayout( lcl_getTabLayoutFromAlignment( i_pDockingWindow->GetAlignment() ) );
+ return 1L;
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ IMPL_LINK( TaskPaneController_Impl, OnToolboxClicked, ToolBox*, i_pToolBox )
+ {
+ if ( i_pToolBox->GetCurItemId() == m_nViewMenuID )
+ {
+ i_pToolBox->EndSelection();
+
+ ::std::auto_ptr< PopupMenu > pMenu = impl_createPopupMenu();
+ pMenu->SetSelectHdl( LINK( this, TaskPaneController_Impl, OnMenuItemSelected ) );
+
+ // pass toolbox button rect so the menu can stay open on button up
+ Rectangle aMenuRect( i_pToolBox->GetItemRect( m_nViewMenuID ) );
+ aMenuRect.SetPos( i_pToolBox->GetPosPixel() );
+ pMenu->Execute( &m_rDockingWindow, aMenuRect, POPUPMENU_EXECUTE_DOWN );
+ }
+
+ return 0;
+ }
+
+ // ---------------------------------------------------------------------------------------------------------------------
+ IMPL_LINK( TaskPaneController_Impl, OnMenuItemSelected, Menu*, i_pMenu )
+ {
+ ENSURE_OR_RETURN( i_pMenu, "TaskPaneController_Impl::OnMenuItemSelected: illegal menu!", 0L );
+
+ i_pMenu->Deactivate();
+ switch ( i_pMenu->GetCurItemId() )
+ {
+ case MID_UNLOCK_TASK_PANEL:
+ m_rDockingWindow.SetFloatingMode( TRUE );
+ break;
+
+ case MID_LOCK_TASK_PANEL:
+ m_rDockingWindow.SetFloatingMode( FALSE );
+ break;
+
+ case MID_LAYOUT_DRAWERS:
+ impl_setLayout( LAYOUT_DRAWERS );
+ break;
+
+ case MID_LAYOUT_TABS:
+ impl_setLayout( lcl_getTabLayoutFromAlignment( m_rDockingWindow.GetAlignment() ) );
+ break;
+
+ default:
+ {
+ size_t nPanelIndex = size_t( i_pMenu->GetCurItemId() - MID_FIRST_PANEL );
+ impl_togglePanelVisibility( nPanelIndex );
+ }
+ break;
+ }
+
+ return 1L;
+ }
+
+ // ---------------------------------------------------------------------------------------------------------------------
+ size_t TaskPaneController_Impl::impl_getLogicalPanelIndex( const size_t i_nVisibleIndex )
+ {
+ size_t nLogicalIndex = 0;
+ size_t nVisibleIndex( i_nVisibleIndex );
+ for ( size_t i=0; i < m_aPanelRepository.size(); ++i )
+ {
+ if ( !m_aPanelRepository[i].bHidden )
+ {
+ if ( !nVisibleIndex )
+ break;
+ --nVisibleIndex;
+ }
+ ++nLogicalIndex;
+ }
+ return nLogicalIndex;
+ }
+
+ // ---------------------------------------------------------------------------------------------------------------------
+ void TaskPaneController_Impl::PanelInserted( const ::svt::PToolPanel& i_pPanel, const size_t i_nPosition )
+ {
+ if ( m_bTogglingPanelVisibility )
+ return;
+
+ const size_t nLogicalIndex( impl_getLogicalPanelIndex( i_nPosition ) );
+ m_aPanelRepository.insert( m_aPanelRepository.begin() + nLogicalIndex, PanelDescriptor( i_pPanel ) );
+ }
+
+ // ---------------------------------------------------------------------------------------------------------------------
+ void TaskPaneController_Impl::PanelRemoved( const size_t i_nPosition )
+ {
+ if ( m_bTogglingPanelVisibility )
+ return;
+
+ const size_t nLogicalIndex( impl_getLogicalPanelIndex( i_nPosition ) );
+ m_aPanelRepository.erase( m_aPanelRepository.begin() + nLogicalIndex );
+ }
+
+ // ---------------------------------------------------------------------------------------------------------------------
+ void TaskPaneController_Impl::ActivePanelChanged( const ::boost::optional< size_t >& i_rOldActive, const ::boost::optional< size_t >& i_rNewActive )
+ {
+ if ( impl_getLayout() == LAYOUT_DRAWERS )
+ // no adjustment of the title when we use the classical "drawers" layout
+ return;
+
+ impl_updateDockingWindowTitle( );
+ (void)i_rOldActive;
+ (void)i_rNewActive;
+ }
+
+ // ---------------------------------------------------------------------------------------------------------------------
+ void TaskPaneController_Impl::LayouterChanged( const ::svt::PDeckLayouter& i_rNewLayouter )
+ {
+ // not interested in
+ (void)i_rNewLayouter;
+ }
+
+ // ---------------------------------------------------------------------------------------------------------------------
+ void TaskPaneController_Impl::Dying()
+ {
+ OSL_ENSURE( false, "TaskPaneController_Impl::Dying: unexpected call!" );
+ // We are expected to live longer than the ToolPanelDeck we work with. Since we remove ourself, in our dtor,
+ // as listener from the panel deck, this method here should never be called.
+ }
+
+ // ---------------------------------------------------------------------------------------------------------------------
+ void TaskPaneController_Impl::impl_togglePanelVisibility( const size_t i_nLogicalPanelIndex )
+ {
+ ENSURE_OR_RETURN_VOID( i_nLogicalPanelIndex < m_aPanelRepository.size(), "illegal index" );
+
+ // get the actual panel index, within the deck
+ size_t nActualPanelIndex(0);
+ for ( size_t i=0; i < i_nLogicalPanelIndex; ++i )
+ {
+ if ( !m_aPanelRepository[i].bHidden )
+ ++nActualPanelIndex;
+ }
+
+ ::boost::optional< size_t > aActivatePanel;
+
+ m_bTogglingPanelVisibility = true;
+ if ( m_aPanelRepository[ i_nLogicalPanelIndex ].bHidden )
+ {
+ OSL_VERIFY( m_rTaskPane.GetPanelDeck().InsertPanel( m_aPanelRepository[ i_nLogicalPanelIndex ].pPanel, nActualPanelIndex ) == nActualPanelIndex );
+ // if there has not been an active panel before, activate the newly inserted one
+ ::boost::optional< size_t > aActivePanel( m_rTaskPane.GetPanelDeck().GetActivePanel() );
+ if ( !aActivePanel )
+ aActivatePanel = nActualPanelIndex;
+ }
+ else
+ {
+ OSL_VERIFY( m_rTaskPane.GetPanelDeck().RemovePanel( nActualPanelIndex ).get() == m_aPanelRepository[ i_nLogicalPanelIndex ].pPanel.get() );
+ }
+ m_bTogglingPanelVisibility = false;
+ m_aPanelRepository[ i_nLogicalPanelIndex ].bHidden = !m_aPanelRepository[ i_nLogicalPanelIndex ].bHidden;
+
+ if ( !!aActivatePanel )
+ m_rTaskPane.GetPanelDeck().ActivatePanel( *aActivatePanel );
+ }
+
+ // ---------------------------------------------------------------------------------------------------------------------
+ void TaskPaneController_Impl::impl_setLayout( const PanelSelectorLayout i_eLayout, const bool i_bForce )
+ {
+ if ( !i_bForce && ( m_eCurrentLayout == i_eLayout ) )
+ return;
+
+ switch ( i_eLayout )
+ {
+ case LAYOUT_DRAWERS:
+ m_rTaskPane.SetDrawersLayout();
+ break;
+ case LAYOUT_TABS_TOP:
+ m_rTaskPane.SetTabsLayout( ::svt::TABS_TOP, ::svt::TABITEM_IMAGE_ONLY );
+ break;
+ case LAYOUT_TABS_BOTTOM:
+ m_rTaskPane.SetTabsLayout( ::svt::TABS_BOTTOM, ::svt::TABITEM_IMAGE_ONLY );
+ break;
+ case LAYOUT_TABS_LEFT:
+ m_rTaskPane.SetTabsLayout( ::svt::TABS_LEFT, ::svt::TABITEM_IMAGE_ONLY );
+ break;
+ case LAYOUT_TABS_RIGHT:
+ m_rTaskPane.SetTabsLayout( ::svt::TABS_RIGHT, ::svt::TABITEM_IMAGE_ONLY );
+ break;
+ }
+ m_eCurrentLayout = i_eLayout;
+
+ impl_updateDockingWindowTitle();
+ }
+
+ // ---------------------------------------------------------------------------------------------------------------------
+ void TaskPaneController_Impl::impl_updateDockingWindowTitle()
+ {
+ ::boost::optional< size_t > aActivePanel( m_rTaskPane.GetPanelDeck().GetActivePanel() );
+ if ( !aActivePanel || ( impl_getLayout() == LAYOUT_DRAWERS ) )
+ m_rDockingWindow.SetTitle( m_sDefaultTitle );
+ else
+ {
+ size_t nNewActive( *aActivePanel );
+ for ( size_t i=0; i < m_aPanelRepository.size(); ++i )
+ {
+ if ( m_aPanelRepository[i].bHidden )
+ continue;
+
+ if ( !nNewActive )
+ {
+ m_rDockingWindow.SetTitle( m_aPanelRepository[i].pPanel->GetDisplayName() );
+ break;
+ }
+ --nNewActive;
+ }
+ }
+ }
+
+ // ---------------------------------------------------------------------------------------------------------------------
+ ::std::auto_ptr< PopupMenu > TaskPaneController_Impl::impl_createPopupMenu() const
+ {
+ ::std::auto_ptr<PopupMenu> pMenu( new PopupMenu );
+ FloatingWindow* pMenuWindow = static_cast< FloatingWindow* >( pMenu->GetWindow() );
+ if ( pMenuWindow != NULL )
+ {
+ pMenuWindow->SetPopupModeFlags ( pMenuWindow->GetPopupModeFlags() | FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE );
+ }
+
+ // Add one entry for every tool panel element to individually make
+ // them visible or hide them.
+ USHORT nIndex = MID_FIRST_PANEL;
+ for ( size_t i=0; i<m_aPanelRepository.size(); ++i, ++nIndex )
+ {
+ const PanelDescriptor& rPanelDesc( m_aPanelRepository[i] );
+ pMenu->InsertItem( nIndex, rPanelDesc.pPanel->GetDisplayName(), MIB_CHECKABLE );
+ pMenu->CheckItem( nIndex, !rPanelDesc.bHidden );
+ }
+ pMenu->InsertSeparator();
+
+ #if OSL_DEBUG_LEVEL > 0
+ pMenu->InsertItem( MID_LAYOUT_TABS, String::CreateFromAscii( "Tab-Layout (exp.)" ), MIB_CHECKABLE );
+ pMenu->CheckItem( MID_LAYOUT_TABS, impl_getLayout() != LAYOUT_DRAWERS );
+ pMenu->InsertItem( MID_LAYOUT_DRAWERS, String::CreateFromAscii( "Drawer-Layout" ), MIB_CHECKABLE );
+ pMenu->CheckItem( MID_LAYOUT_DRAWERS, impl_getLayout() == LAYOUT_DRAWERS );
+
+ pMenu->InsertSeparator();
+ #endif
+
+ // Add entry for docking or un-docking the tool panel.
+ if ( m_rDockingWindow.IsFloatingMode() )
+ pMenu->InsertItem(
+ MID_LOCK_TASK_PANEL,
+ String( SfxResId( STR_SFX_DOCK ) )
+ );
+ else
+ pMenu->InsertItem(
+ MID_UNLOCK_TASK_PANEL,
+ String( SfxResId( STR_SFX_UNDOCK ) )
+ );
+
+ pMenu->RemoveDisabledEntries( FALSE, FALSE );
+
+ return pMenu;
+ }
+
+ //==================================================================================================================
+ //= TaskPaneController
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ TaskPaneController::TaskPaneController( ModuleTaskPane& i_rTaskPane, TitledDockingWindow& i_rDockingWindow )
+ :m_pImpl( new TaskPaneController_Impl( i_rTaskPane, i_rDockingWindow ) )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ TaskPaneController::~TaskPaneController()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TaskPaneController::SetDefaultTitle( const String& i_rTitle )
+ {
+ m_pImpl->SetDefaultTitle( i_rTitle );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TaskPaneController::ActivateToolPanel( const ::rtl::OUString& i_rPanelURL )
+ {
+ m_pImpl->ActivateToolPanel( i_rPanelURL );
+ }
+
+//......................................................................................................................
+} // namespace sfx2
+//......................................................................................................................
diff --git a/sfx2/source/dialog/sfxurl.cxx b/sfx2/source/dialog/taskpane.src
index 47e4062ac350..5a955e8587d1 100644
--- a/sfx2/source/dialog/sfxurl.cxx
+++ b/sfx2/source/dialog/taskpane.src
@@ -1,5 +1,4 @@
/*************************************************************************
- *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
@@ -25,17 +24,24 @@
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sfx2.hxx"
-#include <sfx2/filedlghelper.hxx>
-#include <sfxresid.hxx>
-#include <dialog.hrc>
+#include <sfx2/sfx.hrc>
+#include "sfxlocal.hrc"
+
+String STR_SFX_DOCK
+{
+ Text [ en-US ] = "Dock";
+};
+
+String STR_SFX_UNDOCK
+{
+ Text [ en-US ] = "Undock";
+};
-SfxUrlDialog::SfxUrlDialog( Window *pParent )
- : ModalDialog( pParent, SfxResId( RID_URLOPEN ) ),
- aEdit( this, SfxResId(RID_URLOPEN_URL) ),
- aOk( this, SfxResId(RID_URLOPEN_OK) ),
- aCancel( this, SfxResId(RID_URLOPEN_CANCEL) )
+String STR_SFX_TASK_PANE_VIEW
+{
+ Text [ en-US ] = "View";
+};
+String STR_SFX_TASKS
{
- FreeResource();
-}
+ Text [ en-US ] = "Tasks";
+};
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
new file mode 100644
index 000000000000..58a61d66ba8b
--- /dev/null
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -0,0 +1,364 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_sfx2.hxx"
+
+#include "sfx2/titledockwin.hxx"
+#include "sfx2/bindings.hxx"
+#include "sfx2/dispatch.hxx"
+#include "sfxlocal.hrc"
+#include "sfxresid.hxx"
+
+#include <svl/eitem.hxx>
+
+//......................................................................................................................
+namespace sfx2
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= TitledDockingWindow
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ TitledDockingWindow::TitledDockingWindow( SfxBindings* i_pBindings, SfxChildWindow* i_pChildWindow, Window* i_pParent,
+ WinBits i_nStyle )
+ :SfxDockingWindow( i_pBindings, i_pChildWindow, i_pParent, i_nStyle )
+ ,m_sTitle()
+ ,m_aToolbox( this )
+ ,m_aContentWindow( this, WB_DIALOGCONTROL )
+ ,m_aBorder( 3, 1, 3, 3 )
+ ,m_bLayoutPending( false )
+ {
+ impl_construct();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ TitledDockingWindow::TitledDockingWindow( SfxBindings* i_pBindings, SfxChildWindow* i_pChildWindow, Window* i_pParent,
+ const ResId& i_rResId )
+ :SfxDockingWindow( i_pBindings, i_pChildWindow, i_pParent, i_rResId )
+ ,m_sTitle()
+ ,m_aToolbox( this )
+ ,m_aContentWindow( this )
+ ,m_aBorder( 3, 1, 3, 3 )
+ ,m_bLayoutPending( false )
+ {
+ impl_construct();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TitledDockingWindow::impl_construct()
+ {
+ SetBackground( Wallpaper() );
+
+ m_aToolbox.SetSelectHdl( LINK( this, TitledDockingWindow, OnToolboxItemSelected ) );
+ m_aToolbox.SetOutStyle( TOOLBOX_STYLE_FLAT );
+ m_aToolbox.SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetDialogColor() ) );
+ m_aToolbox.Show();
+ impl_resetToolBox();
+
+ m_aContentWindow.Show();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ TitledDockingWindow::~TitledDockingWindow()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TitledDockingWindow::SetTitle( const String& i_rTitle )
+ {
+ m_sTitle = i_rTitle;
+ Invalidate();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ String TitledDockingWindow::GetTitle() const
+ {
+ return impl_getTitle();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TitledDockingWindow::SetText( const String& i_rText )
+ {
+ SfxDockingWindow::SetText( i_rText );
+ if ( m_sTitle.Len() == 0 )
+ // our text is used as title, too => repaint
+ Invalidate();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TitledDockingWindow::Resize()
+ {
+ SfxDockingWindow::Resize();
+ impl_scheduleLayout();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TitledDockingWindow::onLayoutDone()
+ {
+ // not interested in
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TitledDockingWindow::impl_scheduleLayout()
+ {
+ m_bLayoutPending = true;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TitledDockingWindow::impl_layout()
+ {
+ m_bLayoutPending = false;
+
+ m_aToolbox.ShowItem( 1, !IsFloatingMode() );
+
+ const Size aToolBoxSize( m_aToolbox.CalcWindowSizePixel() );
+ Size aWindowSize( GetOutputSizePixel() );
+
+ // position the tool box
+ int nTitleBarHeight( GetSettings().GetStyleSettings().GetTitleHeight() );
+ if ( aToolBoxSize.Height() > nTitleBarHeight )
+ nTitleBarHeight = aToolBoxSize.Height();
+ m_aToolbox.SetPosSizePixel(
+ Point(
+ aWindowSize.Width() - aToolBoxSize.Width(),
+ ( nTitleBarHeight - aToolBoxSize.Height() ) / 2
+ ),
+ aToolBoxSize
+ );
+
+ // Place the content window.
+ if ( nTitleBarHeight < aToolBoxSize.Height() )
+ nTitleBarHeight = aToolBoxSize.Height();
+ aWindowSize.Height() -= nTitleBarHeight;
+ m_aContentWindow.SetPosSizePixel(
+ Point( m_aBorder.Left(), nTitleBarHeight + m_aBorder.Top() ),
+ Size(
+ aWindowSize.Width() - m_aBorder.Left() - m_aBorder.Right(),
+ aWindowSize.Height() - m_aBorder.Top() - m_aBorder.Bottom()
+ )
+ );
+
+ onLayoutDone();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TitledDockingWindow::Paint( const Rectangle& i_rArea )
+ {
+ if ( m_bLayoutPending )
+ impl_layout();
+
+ SfxDockingWindow::Paint( i_rArea );
+
+ Push( PUSH_FONT | PUSH_FILLCOLOR | PUSH_LINECOLOR );
+
+ int nTitleBarHeight( GetSettings().GetStyleSettings().GetTitleHeight() );
+ const Size aToolBoxSize = m_aToolbox.CalcWindowSizePixel();
+ if ( aToolBoxSize.Height() > nTitleBarHeight )
+ nTitleBarHeight = aToolBoxSize.Height();
+
+ SetFillColor( GetSettings().GetStyleSettings().GetDialogColor() );
+ SetLineColor();
+
+ // bold font
+ Font aFont( GetFont() );
+ aFont.SetWeight( WEIGHT_BOLD );
+ SetFont( aFont );
+
+ // Set border values.
+ Size aWindowSize( GetOutputSizePixel() );
+ int nOuterLeft = 0;
+ int nInnerLeft = nOuterLeft + m_aBorder.Left() - 1;
+ int nOuterRight = aWindowSize.Width() - 1;
+ int nInnerRight = nOuterRight - m_aBorder.Right() + 1;
+ int nInnerTop = nTitleBarHeight + m_aBorder.Top() - 1;
+ int nOuterBottom = aWindowSize.Height() - 1;
+ int nInnerBottom = nOuterBottom - m_aBorder.Bottom() + 1;
+
+ // Paint title bar background.
+ Rectangle aTitleBarBox( Rectangle(
+ nOuterLeft,
+ 0,
+ nOuterRight,
+ nInnerTop-1
+ ) );
+ DrawRect( aTitleBarBox );
+
+ if ( nInnerLeft > nOuterLeft )
+ DrawRect( Rectangle( nOuterLeft, nInnerTop, nInnerLeft, nInnerBottom ) );
+ if ( nOuterRight > nInnerRight )
+ DrawRect( Rectangle( nInnerRight, nInnerTop, nOuterRight, nInnerBottom ) );
+ if ( nInnerBottom < nOuterBottom )
+ DrawRect( Rectangle( nOuterLeft, nInnerBottom, nOuterRight, nOuterBottom ) );
+
+ // Paint bevel border.
+ SetFillColor();
+ SetLineColor( GetSettings().GetStyleSettings().GetShadowColor() );
+ if ( m_aBorder.Top() > 0 )
+ DrawLine( Point( nInnerLeft, nInnerTop ), Point( nInnerLeft, nInnerBottom ) );
+ if ( m_aBorder.Left() > 0 )
+ DrawLine( Point( nInnerLeft, nInnerTop ), Point( nInnerRight, nInnerTop ) );
+
+ SetLineColor( GetSettings().GetStyleSettings().GetLightColor() );
+ if ( m_aBorder.Bottom() > 0 )
+ DrawLine( Point( nInnerRight, nInnerBottom ), Point( nInnerLeft, nInnerBottom ) );
+ if ( m_aBorder.Right() > 0 )
+ DrawLine( Point( nInnerRight, nInnerBottom ), Point( nInnerRight, nInnerTop ) );
+
+ // Paint title bar text.
+ SetLineColor( GetSettings().GetStyleSettings().GetActiveTextColor() );
+ aTitleBarBox.Left() += 3;
+ DrawText( aTitleBarBox, impl_getTitle(), TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER | TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK );
+
+ // Restore original values of the output device.
+ Pop();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ String TitledDockingWindow::impl_getTitle() const
+ {
+ return m_sTitle.Len() ? m_sTitle : GetText();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TitledDockingWindow::impl_resetToolBox()
+ {
+ m_aToolbox.Clear();
+
+ // Get the closer bitmap and set it as right most button.
+ Image aImage( SfxResId( SFX_IMG_CLOSE_DOC ) );
+ Image aImageHC( SfxResId( SFX_IMG_CLOSE_DOC_HC ) );
+ m_aToolbox.InsertItem( 1,
+ GetSettings().GetStyleSettings().GetHighContrastMode()
+ ? aImageHC
+ : aImage
+ );
+ m_aToolbox.ShowItem( 1 );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ USHORT TitledDockingWindow::impl_addDropDownToolBoxItem( const String& i_rItemText, ULONG i_nHelpId, const Link& i_rCallback )
+ {
+ // Add the menu before the closer button.
+ const USHORT nItemCount( m_aToolbox.GetItemCount() );
+ const USHORT nItemId( nItemCount + 1 );
+ m_aToolbox.InsertItem( nItemId, i_rItemText, TIB_DROPDOWNONLY, nItemCount > 0 ? nItemCount - 1 : TOOLBOX_APPEND );
+ m_aToolbox.SetHelpId( nItemId, i_nHelpId );
+ m_aToolbox.SetClickHdl( i_rCallback );
+ m_aToolbox.SetDropdownClickHdl( i_rCallback );
+
+ // The tool box has likely changed its size. The title bar has to be
+ // resized.
+ impl_scheduleLayout();
+ Invalidate();
+
+ return nItemId;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ IMPL_LINK( TitledDockingWindow, OnToolboxItemSelected, ToolBox*, pToolBox )
+ {
+ const USHORT nId = pToolBox->GetCurItemId();
+
+ if ( nId == 1 )
+ {
+ // the closer
+ EndTracking();
+ const sal_uInt16 nChildWindowId( GetChildWindow_Impl()->GetType() );
+ const SfxBoolItem aVisibility( nChildWindowId, FALSE );
+ GetBindings().GetDispatcher()->Execute(
+ nChildWindowId,
+ SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
+ &aVisibility,
+ NULL
+ );
+ }
+
+ return 0;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TitledDockingWindow::StateChanged( StateChangedType i_nType )
+ {
+ switch ( i_nType )
+ {
+ case STATE_CHANGE_INITSHOW:
+ impl_scheduleLayout();
+ break;
+ }
+ SfxDockingWindow::StateChanged( i_nType );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TitledDockingWindow::EndDocking( const Rectangle& i_rRect, BOOL i_bFloatMode )
+ {
+ SfxDockingWindow::EndDocking( i_rRect, i_bFloatMode );
+
+ if ( m_aEndDockingHdl.IsSet() )
+ m_aEndDockingHdl.Call( this );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TitledDockingWindow::DataChanged( const DataChangedEvent& i_rDataChangedEvent )
+ {
+ SfxDockingWindow::DataChanged( i_rDataChangedEvent );
+
+ switch ( i_rDataChangedEvent.GetType() )
+ {
+ case DATACHANGED_SETTINGS:
+ if ( ( i_rDataChangedEvent.GetFlags() & SETTINGS_STYLE ) == 0)
+ break;
+ // else fall through.
+ case DATACHANGED_FONTS:
+ case DATACHANGED_FONTSUBSTITUTION:
+ {
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+
+ // Font.
+ Font aFont = rStyleSettings.GetAppFont();
+ if ( IsControlFont() )
+ aFont.Merge( GetControlFont() );
+ SetZoomedPointFont( aFont );
+
+ // Color.
+ Color aColor;
+ if ( IsControlForeground() )
+ aColor = GetControlForeground();
+ else
+ aColor = rStyleSettings.GetButtonTextColor();
+ SetTextColor( aColor );
+ SetTextFillColor();
+
+ impl_scheduleLayout();
+ Invalidate();
+ }
+ break;
+ }
+ }
+
+//......................................................................................................................
+} // namespace sfx2
+//......................................................................................................................
diff --git a/sfx2/source/dialog/titledockwin.src b/sfx2/source/dialog/titledockwin.src
new file mode 100644
index 000000000000..3f52e84ab75d
--- /dev/null
+++ b/sfx2/source/dialog/titledockwin.src
@@ -0,0 +1,39 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <sfx2/sfx.hrc>
+#include "sfxlocal.hrc"
+
+Image SFX_IMG_CLOSE_DOC
+{
+ ImageBitmap = Bitmap { File = "closedoc.png" ; };
+};
+
+Image SFX_IMG_CLOSE_DOC_HC
+{
+ ImageBitmap = Bitmap { File = "closedochc.png" ; };
+};
+
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index 1a51bee5024f..94c5826569f2 100644
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
@@ -1682,168 +1682,6 @@ throw (uno::RuntimeException)
#if OSL_DEBUG_LEVEL > 1
-static ::sfx2::XmlIdRegistryDocument s_Reg;
-static ::sfx2::XmlIdRegistryClipboard s_RegClip;
-
-class MockMetadatable : public ::sfx2::Metadatable
-{
-public:
- MockMetadatable(bool i_isInClip = false) :
- m_bInClipboard(i_isInClip), m_bInUndo(false), m_bInContent(true) {}
- bool m_bInClipboard;
- bool m_bInUndo;
- bool m_bInContent;
- virtual bool IsInClipboard() const { return m_bInClipboard; }
- virtual bool IsInUndo() const { return m_bInUndo; }
- virtual bool IsInContent() const { return m_bInContent; }
- virtual ::sfx2::XmlIdRegistry& GetRegistry() { return m_bInClipboard ? static_cast< ::sfx2::XmlIdRegistry&>(s_RegClip) : static_cast< ::sfx2::XmlIdRegistry&>(s_Reg); }
- virtual ::com::sun::star::uno::Reference<
- ::com::sun::star::rdf::XMetadatable > MakeUnoObject() { return 0; }
-};
-
-bool operator==(beans::StringPair p1, beans::StringPair p2)
-{
- return p1.First == p2.First && p1.Second == p2.Second;
-}
-
-void test()
-{
- OSL_TRACE("SwMetadatable test(): start\n");
- MockMetadatable m1;
- MockMetadatable m2;
- MockMetadatable m3;
- MockMetadatable m4;
- MockMetadatable m5;
- ::rtl::OUString empty;
- ::rtl::OUString content( ::rtl::OUString::createFromAscii("content.xml") );
- ::rtl::OUString styles ( ::rtl::OUString::createFromAscii("styles.xml") );
- ::rtl::OUString sid1( ::rtl::OUString::createFromAscii("id1") );
- ::rtl::OUString sid2( ::rtl::OUString::createFromAscii("id2") );
- ::rtl::OUString sid3( ::rtl::OUString::createFromAscii("id3") );
- ::rtl::OUString sid4( ::rtl::OUString::createFromAscii("id4") );
- beans::StringPair id1(content, sid1);
- beans::StringPair id2(content, sid2);
- beans::StringPair id3(content, sid3);
- beans::StringPair id4(styles, sid4);
- beans::StringPair id3e(empty, sid3);
- beans::StringPair id4e(empty, sid4);
- m1.SetMetadataReference(id1);
- OSL_ENSURE(m1.GetMetadataReference() == id1, "set failed");
- try {
- m2.SetMetadataReference(id1);
- OSL_ENSURE(false, "set duplicate succeeded");
- } catch (lang::IllegalArgumentException) { }
- m1.SetMetadataReference(id1);
- OSL_ENSURE(m1.GetMetadataReference() == id1, "set failed (existing)");
- m1.EnsureMetadataReference();
- OSL_ENSURE(m1.GetMetadataReference() == id1, "ensure failed (existing)");
-
- m2.EnsureMetadataReference();
- beans::StringPair m2id(m2.GetMetadataReference());
- OSL_ENSURE(m2id.Second.getLength(), "ensure failed");
- m2.EnsureMetadataReference();
- OSL_ENSURE(m2.GetMetadataReference() == m2id, "ensure failed (idempotent)");
-
- m1.m_bInUndo = true;
- OSL_ENSURE(!m1.GetMetadataReference().Second.getLength(), "move to undo failed");
-
- m1.m_bInUndo = false;
- OSL_ENSURE(m1.GetMetadataReference() == id1, "move from undo failed");
-
- m1.m_bInUndo = true;
- try {
- m2.SetMetadataReference(id1); // steal!
- } catch (lang::IllegalArgumentException &) {
- OSL_ENSURE(false, "set duplicate to undo failed");
- }
- m1.m_bInUndo = false;
- OSL_ENSURE(!m1.GetMetadataReference().Second.getLength(), "move from undo: duplicate");
-
- m3.RegisterAsCopyOf(m2);
- OSL_ENSURE(m2.GetMetadataReference() == id1, "copy: source");
- OSL_ENSURE(!m3.GetMetadataReference().Second.getLength(), "copy: duplicate");
- m4.RegisterAsCopyOf(m3);
- OSL_ENSURE(m2.GetMetadataReference() == id1, "copy: source");
- OSL_ENSURE(!m3.GetMetadataReference().Second.getLength(), "copy: duplicate");
- OSL_ENSURE(!m4.GetMetadataReference().Second.getLength(), "copy: duplicate");
- m2.m_bInUndo = true;
- OSL_ENSURE(m3.GetMetadataReference() == id1, "duplicate to undo");
- OSL_ENSURE(!m2.GetMetadataReference().Second.getLength(), "duplicate to undo");
- m2.m_bInUndo = false;
- OSL_ENSURE(m2.GetMetadataReference() == id1, "duplicate from undo");
- OSL_ENSURE(!m3.GetMetadataReference().Second.getLength(), "duplicate from undo");
-
- m4.EnsureMetadataReference(); // new!
- beans::StringPair m4id(m4.GetMetadataReference());
- OSL_ENSURE(m4id.Second.getLength() && !(m4id == id1), "ensure on duplicate");
-
- MockMetadatable mc1(true); // in clipboard
- MockMetadatable mc2(true);
- MockMetadatable mc3(true);
- MockMetadatable mc4(true);
- MockMetadatable m2p;
- MockMetadatable m3p;
-
- mc1.SetMetadataReference(id2);
- OSL_ENSURE(mc1.GetMetadataReference() == id2, "set failed");
- try {
- mc2.SetMetadataReference(id2);
- OSL_ENSURE(false, "set duplicate succeeded");
- } catch (lang::IllegalArgumentException) { }
- mc1.SetMetadataReference(id2);
- OSL_ENSURE(mc1.GetMetadataReference() == id2, "set failed (existing)");
- mc1.EnsureMetadataReference();
- OSL_ENSURE(mc1.GetMetadataReference() == id2, "ensure failed (existing)");
- mc2.EnsureMetadataReference();
- beans::StringPair mc2id(mc2.GetMetadataReference());
- OSL_ENSURE(mc2id.Second.getLength(), "ensure failed");
- mc2.EnsureMetadataReference();
- OSL_ENSURE(mc2.GetMetadataReference() == mc2id, "ensure failed (idempotent)");
- mc2.RemoveMetadataReference();
- OSL_ENSURE(!mc2.GetMetadataReference().Second.getLength(), "remove failed");
-
- // set up mc2 as copy of m2 and mc3 as copy of m3
- mc3.RegisterAsCopyOf(m3);
- OSL_ENSURE(!mc3.GetMetadataReference().Second.getLength() , "copy to clipboard (latent)");
- mc2.RegisterAsCopyOf(m2);
- OSL_ENSURE(mc2.GetMetadataReference() == id1, "copy to clipboard (non-latent)");
- // paste mc2 to m2p and mc3 to m3p
- m2p.RegisterAsCopyOf(mc2);
- OSL_ENSURE(!m2p.GetMetadataReference().Second.getLength() , "paste from clipboard (non-latent)");
- m3p.RegisterAsCopyOf(mc3);
- OSL_ENSURE(!m3p.GetMetadataReference().Second.getLength() , "paste from clipboard (latent)");
- // delete m2, m2p, m3
- m2.RemoveMetadataReference();
- OSL_ENSURE(!m2.GetMetadataReference().Second.getLength(), "remove failed");
- OSL_ENSURE(m2p.GetMetadataReference() == id1, "paste-remove (non-latent)");
- m2p.RemoveMetadataReference();
- OSL_ENSURE(!m2p.GetMetadataReference().Second.getLength(), "remove failed");
- OSL_ENSURE(m3.GetMetadataReference() == id1, "paste-remove2 (non-latent)");
- m3.RemoveMetadataReference();
- OSL_ENSURE(!m3.GetMetadataReference().Second.getLength(), "remove failed");
- OSL_ENSURE(m3p.GetMetadataReference() == id1, "paste-remove (latent)");
- // delete mc2
- mc2.SetMetadataReference(beans::StringPair());
- OSL_ENSURE(!mc3.GetMetadataReference().Second.getLength() , "in clipboard becomes non-latent");
- // paste mc2
- m2p.RegisterAsCopyOf(mc2);
- OSL_ENSURE(!m2p.GetMetadataReference().Second.getLength(), "remove-paste");
- OSL_ENSURE(m3p.GetMetadataReference() == id1, "remove-paste (stolen)");
-
- // auto-detect stream
- m5.SetMetadataReference(id3e);
- OSL_ENSURE(m5.GetMetadataReference() == id3, "auto-detect (content)");
- m5.m_bInContent = false;
- m5.SetMetadataReference(id4e);
- OSL_ENSURE(m5.GetMetadataReference() == id4, "auto-detect (styles)");
-
- OSL_TRACE("sfx2::Metadatable test(): finished\n");
-}
-
-struct Test { Test() { test(); } };
-static Test s_test;
-
-
#include <stdio.h>
static void dump(sfx2::XmlIdList_t * pList)
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 48c01a1ac3fe..bfd67210ec44 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -30,13 +30,19 @@
#include <com/sun/star/registry/MergeConflictException.hpp>
#include <com/sun/star/registry/XSimpleRegistry.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <com/sun/star/document/XTypeDetection.hpp>
+#include <com/sun/star/frame/XLoadable.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
#include <comphelper/processfactory.hxx>
#include <tools/config.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/moduleoptions.hxx>
#include <tools/urlobj.hxx>
#include <unotools/ucbstreamhelper.hxx>
+#include <unotools/localfilehelper.hxx>
#include <comphelper/sequenceashashmap.hxx>
+#include <comphelper/configurationhelper.hxx>
#include <sfx2/sfx.hrc>
#include <sfx2/docfilt.hxx>
@@ -49,9 +55,15 @@
#include <sfx2/mnumgr.hxx>
#include "sfxresid.hxx"
#include <sfx2/sfxuno.hxx>
+#include "syspath.hxx"
+#include <osl/file.hxx>
+#include <osl/security.hxx>
#include "doc.hrc"
+#include <assert.h>
+
namespace css = ::com::sun::star;
+using namespace ::com::sun::star;
//========================================================================
@@ -182,13 +194,130 @@ void SfxObjectFactory::SetModule_Impl( SfxModule *pMod )
pImpl->pModule = pMod;
}
+void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const String& rTemplateName )
+{
+ static const int nMaxPathSize = 16000;
+ static ::rtl::OUString SERVICE_FILTER_FACTORY = ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" );
+ static ::rtl::OUString SERVICE_TYPE_DECTECTION = ::rtl::OUString::createFromAscii( "com.sun.star.document.TypeDetection" );
+ static ::rtl::OUString SERVICE_SIMPLE_ACCESS = ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" );
+
+ static ::rtl::OUString CONF_ROOT = ::rtl::OUString::createFromAscii( "/org.openoffice.Setup");
+ static ::rtl::OUString CONF_PATH = ::rtl::OUString::createFromAscii( "Office/Factories/" ) + ::rtl::OUString( rServiceName );
+ static ::rtl::OUString PROP_DEF_TEMPL_CHANGED = ::rtl::OUString::createFromAscii( "ooSetupFactorySystemDefaultTemplateChanged" );
+ static ::rtl::OUString PROP_ACTUAL_FILTER = ::rtl::OUString::createFromAscii( "ooSetupFactoryActualFilter" );
+
+ static ::rtl::OUString DEF_TPL_STR = ::rtl::OUString::createFromAscii("/soffice.");
+
+ String sURL;
+ String sPath;
+ sal_Unicode aPathBuffer[nMaxPathSize];
+ if ( SystemPath::GetUserTemplateLocation( aPathBuffer, nMaxPathSize ))
+ sPath = String( aPathBuffer );
+ ::utl::LocalFileHelper::ConvertPhysicalNameToURL( sPath, sURL );
+
+ ::rtl::OUString aUserTemplateURL( sURL );
+ if ( aUserTemplateURL.getLength() != 0)
+ {
+ try
+ {
+ uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
+ uno::Reference< uno::XInterface > xConfig = ::comphelper::ConfigurationHelper::openConfig(
+ xFactory, CONF_ROOT, ::comphelper::ConfigurationHelper::E_STANDARD );
+
+ ::rtl::OUString aActualFilter;
+ ::comphelper::ConfigurationHelper::readRelativeKey( xConfig, CONF_PATH, PROP_ACTUAL_FILTER ) >>= aActualFilter;
+ sal_Bool bChanged(sal_False);
+ ::comphelper::ConfigurationHelper::readRelativeKey( xConfig, CONF_PATH, PROP_DEF_TEMPL_CHANGED ) >>= bChanged;
+
+ uno::Reference< container::XNameAccess > xFilterFactory(
+ xFactory->createInstance( SERVICE_FILTER_FACTORY ), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xTypeDetection(
+ xFactory->createInstance( SERVICE_TYPE_DECTECTION ), uno::UNO_QUERY_THROW );
+
+ ::rtl::OUString aActualFilterTypeName;
+ uno::Sequence< beans::PropertyValue > aActuralFilterData;
+ xFilterFactory->getByName( aActualFilter ) >>= aActuralFilterData;
+ for ( sal_Int32 nInd = 0; nInd < aActuralFilterData.getLength(); nInd++ )
+ if ( aActuralFilterData[nInd].Name.equalsAscii( "Type" ) )
+ aActuralFilterData[nInd].Value >>= aActualFilterTypeName;
+ ::comphelper::SequenceAsHashMap aProps1( xTypeDetection->getByName( aActualFilterTypeName ) );
+ uno::Sequence< ::rtl::OUString > aAllExt =
+ aProps1.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Extensions" ), uno::Sequence< ::rtl::OUString >() );
+ //To-do: check if aAllExt is empty first
+ ::rtl::OUString aExt = aAllExt[0];
+
+ aUserTemplateURL += DEF_TPL_STR;
+ aUserTemplateURL += aExt;
+
+ uno::Reference< ucb::XSimpleFileAccess > xSimpleFileAccess(
+ xFactory->createInstance( SERVICE_SIMPLE_ACCESS ), uno::UNO_QUERY_THROW );
+
+ ::rtl::OUString aBackupURL;
+ ::osl::Security().getConfigDir(aBackupURL);
+ aBackupURL += ::rtl::OUString::createFromAscii( "/temp" );
+
+ if ( !xSimpleFileAccess->exists( aBackupURL ) )
+ xSimpleFileAccess->createFolder( aBackupURL );
+
+ aBackupURL += DEF_TPL_STR;
+ aBackupURL += aExt;
+
+ if ( rTemplateName.Len() != 0 )
+ {
+ if ( xSimpleFileAccess->exists( aUserTemplateURL ) && !bChanged )
+ xSimpleFileAccess->copy( aUserTemplateURL, aBackupURL );
+
+ uno::Reference< document::XTypeDetection > xTypeDetector( xTypeDetection, uno::UNO_QUERY );
+ ::comphelper::SequenceAsHashMap aProps2( xTypeDetection->getByName( xTypeDetector->queryTypeByURL( rTemplateName ) ) );
+ ::rtl::OUString aFilterName =
+ aProps2.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii("PreferredFilter"), ::rtl::OUString() );
+
+ uno::Sequence< beans::PropertyValue > aArgs( 3 );
+ aArgs[0].Name = ::rtl::OUString::createFromAscii( "FilterName" );
+ aArgs[0].Value <<= aFilterName;
+ aArgs[1].Name = ::rtl::OUString::createFromAscii( "AsTemplate" );
+ aArgs[1].Value <<= sal_True;
+ aArgs[2].Name = ::rtl::OUString::createFromAscii( "URL" );
+ aArgs[2].Value <<= ::rtl::OUString( rTemplateName );
+
+ uno::Reference< frame::XLoadable > xLoadable( xFactory->createInstance( ::rtl::OUString( rServiceName ) ), uno::UNO_QUERY );
+ xLoadable->load( aArgs );
+
+ aArgs.realloc( 2 );
+ aArgs[1].Name = ::rtl::OUString::createFromAscii( "Overwrite" );
+ aArgs[1].Value <<= sal_True;
+
+ uno::Reference< frame::XStorable > xStorable( xLoadable, uno::UNO_QUERY );
+ xStorable->storeToURL( aUserTemplateURL, aArgs );
+ ::comphelper::ConfigurationHelper::writeRelativeKey( xConfig, CONF_PATH, PROP_DEF_TEMPL_CHANGED, uno::makeAny( sal_True ));
+ ::comphelper::ConfigurationHelper::flush( xConfig );
+ }
+ else
+ {
+ DBG_ASSERT( bChanged, "invalid ooSetupFactorySystemDefaultTemplateChanged value!" );
+
+ xSimpleFileAccess->copy( aBackupURL, aUserTemplateURL );
+ xSimpleFileAccess->kill( aBackupURL );
+ ::comphelper::ConfigurationHelper::writeRelativeKey( xConfig, CONF_PATH, PROP_DEF_TEMPL_CHANGED, uno::makeAny( sal_False ));
+ ::comphelper::ConfigurationHelper::flush( xConfig );
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+}
+
void SfxObjectFactory::SetStandardTemplate( const String& rServiceName, const String& rTemplate )
{
SvtModuleOptions::EFactory eFac = SvtModuleOptions::ClassifyFactoryByServiceName(rServiceName);
if (eFac == SvtModuleOptions::E_UNKNOWN_FACTORY)
eFac = SvtModuleOptions::ClassifyFactoryByShortName(rServiceName);
if (eFac != SvtModuleOptions::E_UNKNOWN_FACTORY)
+ {
+ SetSystemTemplate( rServiceName, rTemplate );
SvtModuleOptions().SetFactoryStandardTemplate(eFac, rTemplate);
+ }
}
String SfxObjectFactory::GetStandardTemplate( const String& rServiceName )
diff --git a/sfx2/source/doc/makefile.mk b/sfx2/source/doc/makefile.mk
index b766921e346b..b1bddf82e428 100644
--- a/sfx2/source/doc/makefile.mk
+++ b/sfx2/source/doc/makefile.mk
@@ -83,7 +83,9 @@ SLOFILES = \
$(SLO)$/sfxmodelfactory.obj \
$(SLO)$/sfxacldetect.obj \
$(SLO)$/docstoragemodifylistener.obj \
- $(SLO)$/querytemplate.obj
+ $(SLO)$/querytemplate.obj \
+ $(SLO)$/syspath.obj \
+ $(SLO)$/syspathw32.obj
# $(SLO)$/applet.obj \
@@ -91,7 +93,8 @@ SLOFILES = \
#HACK TO DISABLE PCH
NOOPTFILES= \
- $(SLO)$/sfxacldetect.obj
+ $(SLO)$/sfxacldetect.obj \
+ $(SLO)$/syspathw32.obj
.ENDIF
diff --git a/sfx2/source/doc/syspath.cxx b/sfx2/source/doc/syspath.cxx
new file mode 100755
index 000000000000..a1025370ed24
--- /dev/null
+++ b/sfx2/source/doc/syspath.cxx
@@ -0,0 +1,48 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2008 by Sun Microsystems, Inc.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* $RCSfile: shutdowniconw32.cxx,v $
+* $Revision: 1.48 $
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+// Comment out precompiled statement due to redefinition errors
+#include "precompiled_sfx2.hxx"
+
+#include "syspath.hxx"
+
+extern "C" bool GetUserTemplateLocation(sal_Unicode*, int nSize);
+
+bool SystemPath::GetUserTemplateLocation(sal_Unicode* pFolder, int nSize )
+{
+#ifdef WNT
+ return ::GetUserTemplateLocation( pFolder, nSize );
+#else
+ (void)pFolder;
+ (void)nSize;
+ return false;
+#endif
+}
diff --git a/sfx2/source/doc/syspath.hxx b/sfx2/source/doc/syspath.hxx
new file mode 100644
index 000000000000..015c16f18d26
--- /dev/null
+++ b/sfx2/source/doc/syspath.hxx
@@ -0,0 +1,44 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2008 by Sun Microsystems, Inc.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* $RCSfile: shutdowniconw32.cxx,v $
+* $Revision: 1.48 $
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#ifndef __SYSPATH_HXX__
+#define __SYSPATH_HXX__
+//#pragma warning(disable:4917)
+
+#include <sfx2/dllapi.h>
+
+class SFX2_DLLPUBLIC SystemPath
+{
+public:
+ static bool GetUserTemplateLocation(sal_Unicode*, int nSize);
+};
+
+#endif
+
diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx
new file mode 100644
index 000000000000..73bd84f5249a
--- /dev/null
+++ b/sfx2/source/doc/syspathw32.cxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2008 by Sun Microsystems, Inc.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* $RCSfile: shutdowniconw32.cxx,v $
+* $Revision: 1.48 $
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#ifdef WNT
+#ifdef _MSC_VER
+#pragma warning(disable:4917)
+#endif
+#include <shlobj.h>
+
+static bool _SHGetSpecialFolderW32( int nFolderID, WCHAR* pszFolder, int nSize )
+{
+ LPITEMIDLIST pidl;
+ HRESULT hHdl = SHGetSpecialFolderLocation( NULL, nFolderID, &pidl );
+
+ if( hHdl == NOERROR )
+ {
+ WCHAR *lpFolder = static_cast< WCHAR* >( HeapAlloc( GetProcessHeap(), 0, 16000 ));
+
+ SHGetPathFromIDListW( pidl, lpFolder );
+ wcsncpy( pszFolder, lpFolder, nSize );
+
+ HeapFree( GetProcessHeap(), 0, lpFolder );
+ IMalloc *pMalloc;
+ if( NOERROR == SHGetMalloc(&pMalloc) )
+ {
+ pMalloc->Free( pidl );
+ pMalloc->Release();
+ }
+ }
+ return true;
+}
+
+#endif
+
+// Copied from sal/types.h to circumvent problems with precompiled headers
+// and redefinitions of BOOL, INT32 and other types. Unfortunately tools
+// also define these type incompatible with Win32 types which leads from
+// time to time to very nasty compilation errors. If someone finds a better
+// way to solve these probs please remove this copied part!
+typedef unsigned short sal_uInt16;
+#if ( defined(WIN32) && !defined(__MINGW32__) )
+ typedef wchar_t sal_Unicode;
+#else
+ typedef sal_uInt16 sal_Unicode;
+#endif
+
+extern "C" bool GetUserTemplateLocation(sal_Unicode* pFolder, int nSize)
+{
+#ifdef WNT
+ return _SHGetSpecialFolderW32( CSIDL_TEMPLATES, pFolder, nSize );
+#else
+ (void)pFolder;
+ (void)nSize;
+ return false;
+#endif
+}
diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc
index 29ad461d18da..848446a774e9 100644
--- a/sfx2/source/inc/helpid.hrc
+++ b/sfx2/source/inc/helpid.hrc
@@ -330,7 +330,8 @@
#define HID_CONFIG_SAVE (HID_SFX_START + 310)
#define HID_SEARCHDIALOG (HID_SFX_START + 311)
-
+#define HID_TASKPANE_WINDOW (HID_SFX_START + 312)
+#define HID_TASKPANE_VIEW_MENU (HID_SFX_START + 313)
#define HID_XMLSEC_WARNING_BROKENSIGNATURE (HID_SFX_START + 314)
#define HID_XMLSEC_QUERY_LOSINGSIGNATURE (HID_SFX_START + 315)
#define HID_XMLSEC_QUERY_SAVEBEFORESIGN (HID_SFX_START + 316)
diff --git a/sfx2/source/inc/sfxlocal.hrc b/sfx2/source/inc/sfxlocal.hrc
index fb21cb0ab13c..202ed6f6f00f 100644
--- a/sfx2/source/inc/sfxlocal.hrc
+++ b/sfx2/source/inc/sfxlocal.hrc
@@ -44,6 +44,10 @@
#define STR_SFX_EXPLORERFILE_BUTTONINSERT (RID_SFX_SFXLOCAL_START + 4)
#define STR_SFX_IMPORT_ALL (RID_SFX_SFXLOCAL_START + 5)
#define STR_SFX_EXPLORERFILE_EXPORT (RID_SFX_SFXLOCAL_START + 6)
+#define STR_SFX_DOCK (RID_SFX_SFXLOCAL_START + 7)
+#define STR_SFX_UNDOCK (RID_SFX_SFXLOCAL_START + 8)
+#define STR_SFX_TASK_PANE_VIEW (RID_SFX_SFXLOCAL_START + 9)
+#define STR_SFX_TASKS (RID_SFX_SFXLOCAL_START + 10)
// Controls --------------------------------------------------------------
@@ -55,13 +59,17 @@
#define SFX_PB_PROPERTY_REMOVE (RID_SFX_SFXLOCAL_START + 5)
#define SFX_WIN_PROPERTY_YESNO (RID_SFX_SFXLOCAL_START + 6)
#define SFX_QB_WRONG_TYPE (RID_SFX_SFXLOCAL_START + 7)
-#define SFX_IMG_PROPERTY_REMOVE (RID_SFX_SFXLOCAL_START + 8)
-#define SFX_IMG_PROPERTY_REMOVE_HC (RID_SFX_SFXLOCAL_START + 9)
#define SFX_FLD_DATE (RID_SFX_SFXLOCAL_START + 10)
#define SFX_FLD_TIME (RID_SFX_SFXLOCAL_START + 11)
#define SFX_FLD_DURATION (RID_SFX_SFXLOCAL_START + 12)
#define SFX_ST_DURATION_FORMAT (RID_SFX_SFXLOCAL_START + 13)
+// Images ----------------------------------------------------------------
+
+#define SFX_IMG_PROPERTY_REMOVE (RID_SFX_SFXLOCAL_START + 0)
+#define SFX_IMG_PROPERTY_REMOVE_HC (RID_SFX_SFXLOCAL_START + 1)
+#define SFX_IMG_CLOSE_DOC (RID_SFX_SFXLOCAL_START + 2)
+#define SFX_IMG_CLOSE_DOC_HC (RID_SFX_SFXLOCAL_START + 3)
#endif
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index ae005d1bad88..a82b72bc2947 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -365,6 +365,7 @@ public:
void SetActiveChild_Impl( Window *pChild );
Window* GetActiveChild_Impl();
virtual BOOL ActivateNextChild_Impl( BOOL bForward = TRUE );
+ bool AllowChildWindowCreation_Impl( const SfxChildWin_Impl& i_rCW ) const;
// Methoden f"ur StatusBar
void SetTempStatusBar_Impl( BOOL bSet );
diff --git a/sfx2/source/menu/makefile.mk b/sfx2/source/menu/makefile.mk
index d3b209fc4a45..8b55bd0840ea 100644
--- a/sfx2/source/menu/makefile.mk
+++ b/sfx2/source/menu/makefile.mk
@@ -43,10 +43,11 @@ SRS1NAME=$(TARGET)
SRC1FILES = menu.src
SLOFILES = \
+ $(SLO)$/mnuitem.obj \
$(SLO)$/mnumgr.obj \
- $(SLO)$/virtmenu.obj \
$(SLO)$/objmnctl.obj \
- $(SLO)$/mnuitem.obj
+ $(SLO)$/thessubmenu.obj \
+ $(SLO)$/virtmenu.obj
# --- Tagets -------------------------------------------------------
diff --git a/sfx2/source/menu/menu.hrc b/sfx2/source/menu/menu.hrc
index 5017f980872b..b437f797c26e 100644
--- a/sfx2/source/menu/menu.hrc
+++ b/sfx2/source/menu/menu.hrc
@@ -64,6 +64,10 @@
#define STR_MENU_ADDONS RID_SFX_MENU_START+2
#define STR_MENU_ADDONHELP RID_SFX_MENU_START+3
+#define STR_MENU_SYNONYMS (RID_SFX_MENU_START+11)
+#define STR_MENU_NO_SYNONYM_FOUND (RID_SFX_MENU_START+12)
+#define STR_MENU_THESAURUS (RID_SFX_MENU_START+13)
+
#define MN_CLIPBOARDFUNCS RID_SFX_MENU_START+1
#endif
diff --git a/sfx2/source/menu/menu.src b/sfx2/source/menu/menu.src
index 97c9c7f640fa..a2e07a3348b0 100644
--- a/sfx2/source/menu/menu.src
+++ b/sfx2/source/menu/menu.src
@@ -72,6 +72,21 @@ String STR_MENU_ADDONHELP
Text [ en-US ] = "Add-~On Help" ;
};
+String STR_MENU_SYNONYMS
+{
+ Text [ en-US ] = "Synonyms" ;
+};
+
+String STR_MENU_NO_SYNONYM_FOUND
+{
+ Text [ en-US ] = "(none)" ;
+};
+
+String STR_MENU_THESAURUS
+{
+ Text [ en-US ] = "~Thesaurus..." ;
+};
+
// ******************************************************************* EOF
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx
index ec803718f457..b264a5b47861 100644..100755
--- a/sfx2/source/menu/mnumgr.cxx
+++ b/sfx2/source/menu/mnumgr.cxx
@@ -27,8 +27,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
+
#include <com/sun/star/embed/VerbDescriptor.hpp>
#include <com/sun/star/embed/VerbAttributes.hpp>
+#include <com/sun/star/container/XNamed.hpp>
#ifdef SOLARIS
// HACK: prevent conflict between STLPORT and Workshop headers on Solaris 8
@@ -50,9 +52,14 @@
#include <framework/addonmenu.hxx>
#include <comphelper/processfactory.hxx>
#include <unotools/ucbstreamhelper.hxx>
+#include <unotools/lingucfg.hxx>
#include <tools/urlobj.hxx>
#include <unotools/pathoptions.hxx>
+#include <svl/stritem.hxx>
#include <toolkit/helper/vclunohelper.hxx>
+#include <osl/file.hxx>
+#include <vcl/graph.hxx>
+#include <svtools/filter.hxx>
#include <sfx2/mnumgr.hxx>
@@ -76,10 +83,15 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/objface.hxx>
+#include "thessubmenu.hxx"
+
static const USHORT nCompatVersion = 4;
static const USHORT nVersion = 5;
+// static member initialization
+PopupMenu * SfxPopupMenuManager::pStaticThesSubMenu = NULL;
+
using namespace com::sun::star;
//=========================================================================
@@ -166,6 +178,101 @@ void InsertVerbs_Impl( SfxBindings* pBindings, const com::sun::star::uno::Sequen
}
+//--------------------------------------------------------------------
+
+
+static Image lcl_GetImageFromPngUrl( const ::rtl::OUString &rFileUrl )
+{
+ Image aRes;
+
+ ::rtl::OUString aTmp;
+ osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp );
+
+ Graphic aGraphic;
+ const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) );
+ if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic ) )
+ {
+ aRes = Image( aGraphic.GetBitmapEx() );
+ }
+ return aRes;
+}
+
+
+PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu )
+{
+ //
+ // build thesaurus sub menu if look-up string is available
+ //
+ PopupMenu* pThesSubMenu = 0;
+ SfxPoolItem *pItem = 0;
+ pBindings->QueryState( SID_THES, pItem );
+ String aThesLookUpStr;
+ SfxStringItem *pStrItem = dynamic_cast< SfxStringItem * >(pItem);
+ xub_StrLen nDelimPos = STRING_LEN;
+ if (pStrItem)
+ {
+ aThesLookUpStr = pStrItem->GetValue();
+ nDelimPos = aThesLookUpStr.SearchBackward( '#' );
+ }
+ if (aThesLookUpStr.Len() > 0 && nDelimPos != STRING_NOTFOUND)
+ {
+ // get synonym list for sub menu
+ std::vector< ::rtl::OUString > aSynonyms;
+ SfxThesSubMenuHelper aHelper;
+ ::rtl::OUString aText( aHelper.GetText( aThesLookUpStr, nDelimPos ) );
+ lang::Locale aLocale;
+ aHelper.GetLocale( aLocale, aThesLookUpStr, nDelimPos );
+ const bool bHasMoreSynonyms = aHelper.GetMeanings( aSynonyms, aText, aLocale, 7 /*max number of synonyms to retrieve*/ );
+ (void) bHasMoreSynonyms;
+
+ pThesSubMenu = new PopupMenu;
+ pThesSubMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
+ const size_t nNumSynonyms = aSynonyms.size();
+ if (nNumSynonyms > 0)
+ {
+ SvtLinguConfig aCfg;
+ const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
+
+ Image aImage;
+ String sThesImplName( aHelper.GetThesImplName( aLocale ) );
+ ::rtl::OUString aSynonymsImageUrl( aCfg.GetSynonymsContextImage( sThesImplName, bHC ) );
+ if (sThesImplName.Len() > 0 && aSynonymsImageUrl.getLength() > 0)
+ aImage = Image( lcl_GetImageFromPngUrl( aSynonymsImageUrl ) );
+
+ for (USHORT i = 0; (size_t)i < nNumSynonyms; ++i)
+ {
+ //! item ids should start with values > 0, since 0 has special meaning
+ const USHORT nId = i + 1;
+
+ String aItemText( GetThesaurusReplaceText_Impl( aSynonyms[i] ) );
+ pThesSubMenu->InsertItem( nId, aItemText );
+ ::rtl::OUString aCmd( ::rtl::OUString::createFromAscii( ".uno:ThesaurusFromContext?WordReplace:string=" ) );
+ aCmd += aItemText;
+ pThesSubMenu->SetItemCommand( nId, aCmd );
+
+ if (aSynonymsImageUrl.getLength() > 0)
+ pThesSubMenu->SetItemImage( nId, aImage );
+ }
+ }
+ else // nNumSynonyms == 0
+ {
+ const String aItemText( SfxResId( STR_MENU_NO_SYNONYM_FOUND ) );
+ pThesSubMenu->InsertItem( 1, aItemText, MIB_NOSELECT );
+ }
+ pThesSubMenu->InsertSeparator();
+ const String sThesaurus( SfxResId( STR_MENU_THESAURUS ) );
+ pThesSubMenu->InsertItem( 100, sThesaurus );
+ pThesSubMenu->SetItemCommand( 100, ::rtl::OUString::createFromAscii( ".uno:ThesaurusDialog" ) );
+
+ pSVMenu->InsertSeparator();
+ const String sSynonyms( SfxResId( STR_MENU_SYNONYMS ) );
+ pSVMenu->InsertItem( SID_THES, sSynonyms );
+ pSVMenu->SetPopupMenu( SID_THES, pThesSubMenu );
+ }
+
+ return pThesSubMenu;
+}
+
//--------------------------------------------------------------------
@@ -305,7 +412,9 @@ void SfxPopupMenuManager::RemoveDisabledEntries()
USHORT SfxPopupMenuManager::Execute( const Point& rPos, Window* pWindow )
{
DBG_MEMTEST();
- return ( (PopupMenu*) GetMenu()->GetSVMenu() )->Execute( pWindow, rPos );
+ USHORT nVal = ( (PopupMenu*) GetMenu()->GetSVMenu() )->Execute( pWindow, rPos );
+ delete pStaticThesSubMenu; pStaticThesSubMenu = NULL;
+ return nVal;
}
//--------------------------------------------------------------------
@@ -429,6 +538,10 @@ SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFra
break;
}
+ PopupMenu* pThesSubMenu = InsertThesaurusSubmenu_Impl( &pFrame->GetBindings(), pSVMenu );
+ // #i107205# (see comment in header file)
+ pStaticThesSubMenu = pThesSubMenu;
+
if ( n == nCount )
{
PopupMenu aPop( SfxResId( MN_CLIPBOARDFUNCS ) );
@@ -461,6 +574,7 @@ SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFra
aMgr->RemoveDisabledEntries();
return aMgr;
}
+
return 0;
}
@@ -475,6 +589,8 @@ void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFram
break;
}
+ PopupMenu* pThesSubMenu = InsertThesaurusSubmenu_Impl( &pFrame->GetBindings(), pSVMenu );
+
if ( n == nCount )
{
PopupMenu aPop( SfxResId( MN_CLIPBOARDFUNCS ) );
@@ -507,6 +623,8 @@ void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFram
aPop.RemoveDisabledEntries();
aPop.Execute( rPoint, pWindow );
}
+
+ delete pThesSubMenu;
}
Menu* SfxPopupMenuManager::GetSVMenu()
diff --git a/sfx2/source/menu/thessubmenu.cxx b/sfx2/source/menu/thessubmenu.cxx
new file mode 100755
index 000000000000..de1137bd6a74
--- /dev/null
+++ b/sfx2/source/menu/thessubmenu.cxx
@@ -0,0 +1,274 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: thessubmenu.cxx,v $
+ * $Revision: 1.0 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sfx2.hxx"
+
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/linguistic2/XThesaurus.hpp>
+#include <com/sun/star/linguistic2/XMeaning.hpp>
+#include <com/sun/star/linguistic2/XLinguServiceManager.hpp>
+
+#include <comphelper/processfactory.hxx>
+#include <svl/stritem.hxx>
+#include <tools/debug.hxx>
+#include <vcl/graph.hxx>
+#include <svtools/filter.hxx>
+
+
+#include <vector>
+
+#include <sfx2/bindings.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/viewsh.hxx>
+#include "thessubmenu.hxx"
+
+
+using namespace ::com::sun::star;
+using ::rtl::OUString;
+
+
+// STATIC DATA -----------------------------------------------------------
+
+SFX_IMPL_MENU_CONTROL(SfxThesSubMenuControl, SfxStringItem);
+
+////////////////////////////////////////////////////////////
+
+String GetThesaurusReplaceText_Impl( const ::rtl::OUString &rText )
+{
+ // The strings returned by the thesaurus sometimes have some
+ // explanation text put in between '(' and ')' or a trailing '*'.
+ // These parts should not be put in the ReplaceEdit Text that may get
+ // inserted into the document. Thus we strip them from the text.
+
+ String aText( rText );
+
+ xub_StrLen nPos = aText.Search( sal_Unicode('(') );
+ while (STRING_NOTFOUND != nPos)
+ {
+ xub_StrLen nEnd = aText.Search( sal_Unicode(')'), nPos );
+ if (STRING_NOTFOUND != nEnd)
+ aText.Erase( nPos, nEnd-nPos+1 );
+ else
+ break;
+ nPos = aText.Search( sal_Unicode('(') );
+ }
+
+ nPos = aText.Search( sal_Unicode('*') );
+ if (STRING_NOTFOUND != nPos)
+ aText.Erase( nPos );
+
+ // remove any possible remaining ' ' that may confuse the thesaurus
+ // when it gets called with the text
+ aText.EraseLeadingAndTrailingChars( sal_Unicode(' ') );
+
+ return aText;
+}
+
+////////////////////////////////////////////////////////////
+
+
+/*
+ Ctor; setzt Select-Handler am Menu und traegt Menu
+ in seinen Parent ein.
+ */
+SfxThesSubMenuControl::SfxThesSubMenuControl( USHORT nSlotId, Menu &rMenu, SfxBindings &rBindings )
+ : SfxMenuControl( nSlotId, rBindings ),
+ pMenu(new PopupMenu),
+ rParent(rMenu)
+{
+ rMenu.SetPopupMenu(nSlotId, pMenu);
+ pMenu->SetSelectHdl(LINK(this, SfxThesSubMenuControl, MenuSelect));
+ pMenu->Clear();
+ rParent.EnableItem( GetId(), FALSE );
+}
+
+
+SfxThesSubMenuControl::~SfxThesSubMenuControl()
+{
+ delete pMenu;
+}
+
+
+/*
+ Statusbenachrichtigung;
+ Ist die Funktionalit"at disabled, wird der entsprechende
+ Menueeintrag im Parentmenu disabled, andernfalls wird er enabled.
+ */
+void SfxThesSubMenuControl::StateChanged(
+ USHORT /*nSID*/,
+ SfxItemState eState,
+ const SfxPoolItem* /*pState*/ )
+{
+ rParent.EnableItem(GetId(), SFX_ITEM_AVAILABLE == eState );
+}
+
+
+/*
+ Select-Handler des Menus;
+ das selektierte Verb mit ausgef"uhrt,
+ */
+IMPL_LINK_INLINE_START( SfxThesSubMenuControl, MenuSelect, Menu *, pSelMenu )
+{
+ const USHORT nSlotId = pSelMenu->GetCurItemId();
+ if( nSlotId )
+ GetBindings().Execute(nSlotId);
+ return 1;
+}
+IMPL_LINK_INLINE_END( SfxThesSubMenuControl, MenuSelect, Menu *, pSelMenu )
+
+
+PopupMenu* SfxThesSubMenuControl::GetPopup() const
+{
+ return pMenu;
+}
+
+
+////////////////////////////////////////////////////////////
+
+OUString SfxThesSubMenuHelper::GetText(
+ const String &rLookUpString,
+ xub_StrLen nDelimPos )
+{
+ return OUString( rLookUpString.Copy( 0, nDelimPos ) );
+}
+
+
+void SfxThesSubMenuHelper::GetLocale(
+ lang::Locale /*out */ &rLocale,
+ const String &rLookUpString,
+ xub_StrLen nDelimPos )
+{
+ String aIsoLang( rLookUpString.Copy( nDelimPos + 1) );
+ const xub_StrLen nPos = aIsoLang.Search( '-' );
+ if (nPos != STRING_NOTFOUND)
+ {
+ rLocale.Language = aIsoLang.Copy( 0, nPos );
+ rLocale.Country = aIsoLang.Copy( nPos + 1 );
+ rLocale.Variant = String::EmptyString();
+ }
+}
+
+
+SfxThesSubMenuHelper::SfxThesSubMenuHelper()
+{
+ try
+ {
+ uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
+ m_xLngMgr = uno::Reference< linguistic2::XLinguServiceManager >( xMSF->createInstance(
+ OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.linguistic2.LinguServiceManager" ))), uno::UNO_QUERY_THROW );
+ m_xThesarus = m_xLngMgr->getThesaurus();
+ }
+ catch (uno::Exception &e)
+ {
+ (void) e;
+ DBG_ASSERT( 0, "failed to get thesaurus" );
+ }
+}
+
+
+SfxThesSubMenuHelper::~SfxThesSubMenuHelper()
+{
+}
+
+
+bool SfxThesSubMenuHelper::IsSupportedLocale( const lang::Locale & rLocale ) const
+{
+ return m_xThesarus.is() && m_xThesarus->hasLocale( rLocale );
+}
+
+
+bool SfxThesSubMenuHelper::GetMeanings(
+ std::vector< OUString > & rSynonyms,
+ const OUString & rWord,
+ const lang::Locale & rLocale,
+ sal_Int16 nMaxSynonms )
+{
+ bool bHasMoreSynonyms = false;
+ rSynonyms.clear();
+ if (IsSupportedLocale( rLocale ) && rWord.getLength() && nMaxSynonms > 0)
+ {
+ try
+ {
+ // get all meannings
+ const uno::Sequence< uno::Reference< linguistic2::XMeaning > > aMeaningSeq(
+ m_xThesarus->queryMeanings( rWord, rLocale, uno::Sequence< beans::PropertyValue >() ));
+ const uno::Reference< linguistic2::XMeaning > *pxMeaning = aMeaningSeq.getConstArray();
+ const sal_Int32 nMeanings = aMeaningSeq.getLength();
+
+ // iterate over all meanings until nMaxSynonms are found or all meanings are processed
+ sal_Int32 nCount = 0;
+ sal_Int32 i = 0;
+ for ( ; i < nMeanings && nCount < nMaxSynonms; ++i)
+ {
+ const uno::Sequence< OUString > aSynonymSeq( pxMeaning[i]->querySynonyms() );
+ const OUString *pSynonyms = aSynonymSeq.getConstArray();
+ const sal_Int32 nSynonyms = aSynonymSeq.getLength();
+ sal_Int32 k = 0;
+ for ( ; k < nSynonyms && nCount < nMaxSynonms; ++k)
+ {
+ rSynonyms.push_back( pSynonyms[k] );
+ ++nCount;
+ }
+ bHasMoreSynonyms = k < nSynonyms; // any synonym from this meaning skipped?
+ }
+
+ bHasMoreSynonyms |= i < nMeanings; // any meaning skipped?
+ }
+ catch (uno::Exception &e)
+ {
+ (void) e;
+ DBG_ASSERT( 0, "failed to get synonyms" );
+ }
+ }
+ return bHasMoreSynonyms;
+}
+
+
+String SfxThesSubMenuHelper::GetThesImplName( const lang::Locale &rLocale ) const
+{
+ String aRes;
+ DBG_ASSERT( m_xLngMgr.is(), "LinguServiceManager missing" );
+ if (m_xLngMgr.is())
+ {
+ uno::Sequence< OUString > aServiceNames = m_xLngMgr->getConfiguredServices(
+ OUString::createFromAscii("com.sun.star.linguistic2.Thesaurus"), rLocale );
+ // there should be at most one thesaurus configured for each language
+ DBG_ASSERT( aServiceNames.getLength() <= 1, "more than one thesaurus found. Should not be possible" );
+ if (aServiceNames.getLength() == 1)
+ aRes = aServiceNames[0];
+ }
+ return aRes;
+}
+
+////////////////////////////////////////////////////////////
+
+
diff --git a/sfx2/source/menu/thessubmenu.hxx b/sfx2/source/menu/thessubmenu.hxx
new file mode 100644
index 000000000000..14d7473cb7c0
--- /dev/null
+++ b/sfx2/source/menu/thessubmenu.hxx
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: thessubmenu.hxx,v $
+ * $Revision: 1.0 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _THESSUBMENU_HXX_
+#define _THESSUBMENU_HXX_
+
+#include <com/sun/star/linguistic2/XThesaurus.hpp>
+#include <com/sun/star/linguistic2/XLinguServiceManager.hpp>
+
+#include <vcl/menu.hxx>
+#include <sfx2/mnuitem.hxx>
+
+class SfxBindings;
+class PopupMenu;
+class Menu;
+
+namespace css = ::com::sun::star;
+
+////////////////////////////////////////////////////////////
+
+String GetThesaurusReplaceText_Impl( const ::rtl::OUString &rText );
+
+////////////////////////////////////////////////////////////
+
+class SfxThesSubMenuControl : public SfxMenuControl
+{
+ PopupMenu* pMenu;
+ Menu& rParent;
+
+private:
+ virtual void StateChanged( USHORT, SfxItemState, const SfxPoolItem* pState );
+ DECL_LINK( MenuSelect, Menu * );
+
+public:
+ SfxThesSubMenuControl(USHORT, Menu&, SfxBindings&);
+ ~SfxThesSubMenuControl();
+
+ virtual PopupMenu* GetPopup() const;
+
+ SFX_DECL_MENU_CONTROL();
+};
+
+////////////////////////////////////////////////////////////
+
+class SfxThesSubMenuHelper
+{
+ css::uno::Reference< css::linguistic2::XLinguServiceManager > m_xLngMgr;
+ css::uno::Reference< css::linguistic2::XThesaurus > m_xThesarus;
+
+private:
+
+ // don't use copy c-tor and assignment operator
+ SfxThesSubMenuHelper( const SfxThesSubMenuHelper & );
+ SfxThesSubMenuHelper & operator = ( const SfxThesSubMenuHelper & );
+
+public:
+ SfxThesSubMenuHelper();
+ ~SfxThesSubMenuHelper();
+
+ static ::rtl::OUString GetText( const String &rLookUpString, xub_StrLen nDelimPos );
+
+ // returns the Locale to be used for the selected text when the thesaurus is to be called
+ static void GetLocale( css::lang::Locale /*out */ &rLocale, const String &rLookUpString, xub_StrLen nDelimPos );
+
+ // returns true if the locale is upported by the theasaurus
+ bool IsSupportedLocale( const css::lang::Locale & rLocale ) const;
+
+ // get the first nMax Synonym entries, even if different meanings need to be evaluated
+ bool GetMeanings( std::vector< ::rtl::OUString > & rSynonyms, const ::rtl::OUString & rWord, const css::lang::Locale & rLocale, sal_Int16 nMaxSynonms );
+
+ String GetThesImplName( const css::lang::Locale &rLocale ) const;
+};
+
+////////////////////////////////////////////////////////////
+
+
+#endif
+
+
diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx
index 5460d613c7e8..abe4cb6852d9 100644
--- a/sfx2/source/view/impviewframe.hxx
+++ b/sfx2/source/view/impviewframe.hxx
@@ -31,6 +31,8 @@
#include <svtools/asynclink.hxx>
#include <vcl/window.hxx>
+#include <boost/optional.hpp>
+
struct SfxViewFrame_Impl
{
SvBorder aBorder;
@@ -56,6 +58,8 @@ struct SfxViewFrame_Impl
sal_Bool bWindowWasEnabled:1;
sal_Bool bActive;
String aFactoryName;
+ ::boost::optional< bool >
+ aHasToolPanels;
SfxViewFrame_Impl( SfxFrame& i_rFrame )
: rFrame( i_rFrame )
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 66af0d7ac8ba..189c9a8aae0e 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -44,6 +44,7 @@
#endif
#include <unotools/moduleoptions.hxx>
#include <svl/intitem.hxx>
+#include <svl/visitem.hxx>
#include <svl/stritem.hxx>
#include <svl/eitem.hxx>
#include <svl/slstitm.hxx>
@@ -94,6 +95,8 @@
#include <svtools/asynclink.hxx>
#include <svl/sharecontrolfile.hxx>
+#include <boost/optional.hpp>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::ucb;
@@ -108,6 +111,7 @@ namespace css = ::com::sun::star;
// wg. ViewFrame::Current
#include "appdata.hxx"
+#include <sfx2/taskpane.hxx>
#include <sfx2/app.hxx>
#include <sfx2/objface.hxx>
#include "openflag.hxx"
@@ -169,6 +173,19 @@ TYPEINIT1(SfxViewFrameItem, SfxPoolItem);
//=========================================================================
//-------------------------------------------------------------------------
+namespace
+{
+ bool moduleHasToolPanels( SfxViewFrame_Impl& i_rViewFrameImpl )
+ {
+ if ( !i_rViewFrameImpl.aHasToolPanels )
+ {
+ i_rViewFrameImpl.aHasToolPanels.reset( ::sfx2::ModuleTaskPane::ModuleHasToolPanels(
+ i_rViewFrameImpl.rFrame.GetFrameInterface() ) );
+ }
+ return *i_rViewFrameImpl.aHasToolPanels;
+ }
+}
+//-------------------------------------------------------------------------
void SfxViewFrame::SetDowning_Impl()
{
pImp->bIsDowning = sal_True;
@@ -3294,6 +3311,22 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
else if ( KnowsChildWindow(nSID) )
rState.Put( SfxBoolItem( nSID, HasChildWindow(nSID) ) );
}
+ else if ( nSID == SID_TASKPANE )
+ {
+ if ( !KnowsChildWindow( nSID ) )
+ {
+ OSL_ENSURE( false, "SID_TASKPANE state requested, but no task pane child window exists for this ID!" );
+ rState.DisableItem( nSID );
+ }
+ else if ( !moduleHasToolPanels( *pImp ) )
+ {
+ rState.Put( SfxVisibilityItem( nSID, sal_False ) );
+ }
+ else
+ {
+ rState.Put( SfxBoolItem( nSID, HasChildWindow( nSID ) ) );
+ }
+ }
else if ( KnowsChildWindow(nSID) )
rState.Put( SfxBoolItem( nSID, HasChildWindow(nSID) ) );
else
@@ -3381,3 +3414,37 @@ void SfxViewFrame::SetViewFrame( SfxViewFrame* pFrame )
{
SFX_APP()->SetViewFrame_Impl( pFrame );
}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SfxViewFrame::ActivateToolPanel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL )
+{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
+ // look up the SfxFrame for the given XFrame
+ SfxFrame* pFrame = NULL;
+ for ( pFrame = SfxFrame::GetFirst(); pFrame; pFrame = SfxFrame::GetNext( *pFrame ) )
+ {
+ if ( pFrame->GetFrameInterface() == i_rFrame )
+ break;
+ }
+ SfxViewFrame* pViewFrame = pFrame ? pFrame->GetCurrentViewFrame() : NULL;
+ ENSURE_OR_RETURN_VOID( pViewFrame != NULL, "SfxViewFrame::ActivateToolPanel: did not find an SfxFrame for the given XFrame!" );
+
+ pViewFrame->ActivateToolPanel_Impl( i_rPanelURL );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SfxViewFrame::ActivateToolPanel_Impl( const ::rtl::OUString& i_rPanelURL )
+{
+ // ensure the task pane is visible
+ ENSURE_OR_RETURN_VOID( KnowsChildWindow( SID_TASKPANE ), "SfxViewFrame::ActivateToolPanel: this frame/module does not allow for a task pane!" );
+ if ( !HasChildWindow( SID_TASKPANE ) )
+ ToggleChildWindow( SID_TASKPANE );
+
+ SfxChildWindow* pTaskPaneChildWindow = GetChildWindow( SID_TASKPANE );
+ ENSURE_OR_RETURN_VOID( pTaskPaneChildWindow, "SfxViewFrame::ActivateToolPanel_Impl: just switched it on, but it is not there!" );
+
+ ::sfx2::ITaskPaneToolPanelAccess* pPanelAccess = dynamic_cast< ::sfx2::ITaskPaneToolPanelAccess* >( pTaskPaneChildWindow );
+ ENSURE_OR_RETURN_VOID( pPanelAccess, "SfxViewFrame::ActivateToolPanel_Impl: task pane child window does not implement a required interface!" );
+ pPanelAccess->ActivateToolPanel( i_rPanelURL );
+}
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 4d9016d81f6b..f62ae4c1ddc7 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -129,28 +129,6 @@ SfxPrinterController::SfxPrinterController( const Any& i_rComplete,
StartListening( *mpViewShell );
mpObjectShell = mpViewShell->GetObjectShell();
StartListening( *mpObjectShell );
- m_bOrigStatus = mpObjectShell->IsEnableSetModified();
-
- // check configuration: shall update of printing information in DocInfo set the document to "modified"?
- if ( m_bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() )
- {
- mpObjectShell->EnableSetModified( sal_False );
- m_bNeedsChange = sal_True;
- }
-
- // refresh document info
- uno::Reference<document::XDocumentProperties> xDocProps(mpObjectShell->getDocProperties());
- m_aLastPrintedBy = xDocProps->getPrintedBy();
- m_aLastPrinted = xDocProps->getPrintDate();
-
- xDocProps->setPrintedBy( mpObjectShell->IsUseUserData()
- ? ::rtl::OUString( SvtUserOptions().GetFullName() )
- : ::rtl::OUString() );
- ::DateTime now;
-
- xDocProps->setPrintDate( util::DateTime(
- now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(),
- now.GetDay(), now.GetMonth(), now.GetYear() ) );
}
// initialize extra ui options
@@ -283,6 +261,29 @@ void SfxPrinterController::jobStarted()
{
if ( mpObjectShell )
{
+ m_bOrigStatus = mpObjectShell->IsEnableSetModified();
+
+ // check configuration: shall update of printing information in DocInfo set the document to "modified"?
+ if ( m_bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() )
+ {
+ mpObjectShell->EnableSetModified( sal_False );
+ m_bNeedsChange = sal_True;
+ }
+
+ // refresh document info
+ uno::Reference<document::XDocumentProperties> xDocProps(mpObjectShell->getDocProperties());
+ m_aLastPrintedBy = xDocProps->getPrintedBy();
+ m_aLastPrinted = xDocProps->getPrintDate();
+
+ xDocProps->setPrintedBy( mpObjectShell->IsUseUserData()
+ ? ::rtl::OUString( SvtUserOptions().GetFullName() )
+ : ::rtl::OUString() );
+ ::DateTime now;
+
+ xDocProps->setPrintDate( util::DateTime(
+ now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(),
+ now.GetDay(), now.GetMonth(), now.GetYear() ) );
+
// FIXME: how to get all print options incl. AdditionalOptions easily?
uno::Sequence < beans::PropertyValue > aOpts;
mpObjectShell->Broadcast( SfxPrintingHint( view::PrintableState_JOB_STARTED, aOpts ) );
diff --git a/sfx2/util/hidother.src b/sfx2/util/hidother.src
index 72b178b2d629..bbea19100df9 100644
--- a/sfx2/util/hidother.src
+++ b/sfx2/util/hidother.src
@@ -165,3 +165,4 @@ hidspecial HID_DID_SAVE_PACKED_XML { HelpID = HID_DID_SAVE_PACKED_X
hidspecial HID_HELP_ONHELP { HelpID = HID_HELP_ONHELP; };
hidspecial HID_HELP_TEXT_SELECTION_MODE { HelpID = HID_HELP_TEXT_SELECTION_MODE; };
hidspecial HID_DLG_CHECKFORONLINEUPDATE { HelpID = HID_DLG_CHECKFORONLINEUPDATE; };
+hidspecial HID_TASKPANE_VIEW_MENU { HelpID = HID_TASKPANE_VIEW_MENU; }; \ No newline at end of file
diff --git a/sfx2/win/res/expdesk.ico b/sfx2/win/res/expdesk.ico
deleted file mode 100644
index 06fb6e712e89..000000000000
--- a/sfx2/win/res/expdesk.ico
+++ /dev/null
Binary files differ
diff --git a/sfx2/win/res/expexp.ico b/sfx2/win/res/expexp.ico
deleted file mode 100644
index e0643765f605..000000000000
--- a/sfx2/win/res/expexp.ico
+++ /dev/null
Binary files differ
diff --git a/sfx2/win/res/expfld.ico b/sfx2/win/res/expfld.ico
deleted file mode 100644
index aeefecbdad51..000000000000
--- a/sfx2/win/res/expfld.ico
+++ /dev/null
Binary files differ
diff --git a/sfx2/win/res/expftp.ico b/sfx2/win/res/expftp.ico
deleted file mode 100644
index e1a442067d35..000000000000
--- a/sfx2/win/res/expftp.ico
+++ /dev/null
Binary files differ
diff --git a/sfx2/win/res/exptrash.ico b/sfx2/win/res/exptrash.ico
deleted file mode 100644
index 5c3e956863c3..000000000000
--- a/sfx2/win/res/exptrash.ico
+++ /dev/null
Binary files differ
diff --git a/sfx2/win/res/expwork.ico b/sfx2/win/res/expwork.ico
deleted file mode 100644
index 93fe39c7a492..000000000000
--- a/sfx2/win/res/expwork.ico
+++ /dev/null
Binary files differ
diff --git a/sfx2/win/res/frameset.ico b/sfx2/win/res/frameset.ico
deleted file mode 100644
index c9546f1e4d40..000000000000
--- a/sfx2/win/res/frameset.ico
+++ /dev/null
Binary files differ
diff --git a/sfx2/win/res/search.ico b/sfx2/win/res/search.ico
deleted file mode 100644
index 13e96131e3b8..000000000000
--- a/sfx2/win/res/search.ico
+++ /dev/null
Binary files differ
diff --git a/sfx2/workben/custompanel/CalcWindowState.xcu b/sfx2/workben/custompanel/CalcWindowState.xcu
new file mode 100644
index 000000000000..17629c0bf698
--- /dev/null
+++ b/sfx2/workben/custompanel/CalcWindowState.xcu
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<oor:component-data oor:name="CalcWindowState" oor:package="org.openoffice.Office.UI" xmlns:install="http://openoffice.org/2004/installation" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <node oor:name="UIElements">
+ <node oor:name="States">
+ <node oor:name="private:resource/toolpanel/org.openoffice.example.colorpanel/0000FF" oor:op="replace">
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value>Soylent Blue</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="ImageURL" oor:type="xs:string">
+ <value>vnd.sun.star.extension://UPDATED_IDENTIFIER/panel.png</value>
+ </prop>
+ <prop oor:name="HelpURL" oor:type="xs:string">
+ <value>vnd.sun.star.help://UPDATED_IDENTIFIER/colorpanel</value>
+ </prop>
+ </node>
+ </node>
+ </node>
+</oor:component-data>
diff --git a/sfx2/workben/custompanel/DrawWindowState.xcu b/sfx2/workben/custompanel/DrawWindowState.xcu
new file mode 100644
index 000000000000..6037a3f5a083
--- /dev/null
+++ b/sfx2/workben/custompanel/DrawWindowState.xcu
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<oor:component-data oor:name="DrawWindowState" oor:package="org.openoffice.Office.UI" xmlns:install="http://openoffice.org/2004/installation" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <node oor:name="UIElements">
+ <node oor:name="States">
+ <node oor:name="private:resource/toolpanel/org.openoffice.example.colorpanel/FFFF00" oor:op="replace">
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value>Soylent Yellow</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="ImageURL" oor:type="xs:string">
+ <value>vnd.sun.star.extension://UPDATED_IDENTIFIER/panel.png</value>
+ </prop>
+ <prop oor:name="HelpURL" oor:type="xs:string">
+ <value>vnd.sun.star.help://UPDATED_IDENTIFIER/colorpanel</value>
+ </prop>
+ </node>
+ </node>
+ </node>
+</oor:component-data>
diff --git a/sfx2/workben/custompanel/Factories.xcu b/sfx2/workben/custompanel/Factories.xcu
new file mode 100644
index 000000000000..f8df23e9f40a
--- /dev/null
+++ b/sfx2/workben/custompanel/Factories.xcu
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<oor:component-data oor:name="Factories" oor:package="org.openoffice.Office.UI" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <node oor:name="Registered">
+ <node oor:name="UIElementFactories">
+ <node oor:name="org.openoffice.example.CustomToolPanel" oor:op="replace">
+ <prop oor:name="Type">
+ <value>toolpanel</value>
+ </prop>
+ <prop oor:name="Name">
+ <value>org.openoffice.example.colorpanel</value>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="FactoryImplementation">
+ <value>org.openoffice.example.colorpanel.ToolPanelFactory</value>
+ </prop>
+ </node>
+ </node>
+ </node>
+</oor:component-data>
diff --git a/sfx2/workben/custompanel/ImpressWindowState.xcu b/sfx2/workben/custompanel/ImpressWindowState.xcu
new file mode 100644
index 000000000000..a8fea859bbab
--- /dev/null
+++ b/sfx2/workben/custompanel/ImpressWindowState.xcu
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<oor:component-data oor:name="ImpressWindowState" oor:package="org.openoffice.Office.UI" xmlns:install="http://openoffice.org/2004/installation" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <node oor:name="UIElements">
+ <node oor:name="States">
+ <node oor:name="private:resource/toolpanel/org.openoffice.example.colorpanel/FFCC99" oor:op="replace">
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value>Soylent Orange</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="ImageURL" oor:type="xs:string">
+ <value>vnd.sun.star.extension://UPDATED_IDENTIFIER/panel.png</value>
+ </prop>
+ <prop oor:name="HelpURL" oor:type="xs:string">
+ <value>vnd.sun.star.help://UPDATED_IDENTIFIER/colorpanel</value>
+ </prop>
+ </node>
+ </node>
+ </node>
+</oor:component-data>
diff --git a/sfx2/workben/custompanel/WriterWindowState.xcu b/sfx2/workben/custompanel/WriterWindowState.xcu
new file mode 100644
index 000000000000..248a2e14a3f4
--- /dev/null
+++ b/sfx2/workben/custompanel/WriterWindowState.xcu
@@ -0,0 +1,35 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<oor:component-data oor:name="WriterWindowState" oor:package="org.openoffice.Office.UI" xmlns:install="http://openoffice.org/2004/installation" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <node oor:name="UIElements">
+ <node oor:name="States">
+ <node oor:name="private:resource/toolpanel/org.openoffice.example.colorpanel/00FF00" oor:op="replace">
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value>Soylent Green</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="ImageURL" oor:type="xs:string">
+ <value>vnd.sun.star.extension://UPDATED_IDENTIFIER/panel.png</value>
+ </prop>
+ <prop oor:name="HelpURL" oor:type="xs:string">
+ <value>vnd.sun.star.help://UPDATED_IDENTIFIER/colorpanel</value>
+ </prop>
+ </node>
+ <node oor:name="private:resource/toolpanel/org.openoffice.example.colorpanel/FF0000" oor:op="replace">
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value>Soylent Red</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="ImageURL" oor:type="xs:string">
+ <value>vnd.sun.star.extension://UPDATED_IDENTIFIER/panel.png</value>
+ </prop>
+ <prop oor:name="HelpURL" oor:type="xs:string">
+ <value>vnd.sun.star.help://UPDATED_IDENTIFIER/colorpanel</value>
+ </prop>
+ </node>
+ </node>
+ </node>
+</oor:component-data>
diff --git a/sfx2/workben/custompanel/ctp_factory.cxx b/sfx2/workben/custompanel/ctp_factory.cxx
new file mode 100644
index 000000000000..54880cc5fcc7
--- /dev/null
+++ b/sfx2/workben/custompanel/ctp_factory.cxx
@@ -0,0 +1,167 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_sfx2.hxx"
+
+#include "ctp_factory.hxx"
+#include "ctp_panel.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/lang/NotInitializedException.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+/** === end UNO includes === **/
+
+//......................................................................................................................
+namespace sd { namespace colortoolpanel
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::uno::XComponentContext;
+ using ::com::sun::star::lang::NotInitializedException;
+ using ::com::sun::star::lang::IllegalArgumentException;
+ using ::com::sun::star::lang::XComponent;
+ using ::com::sun::star::ui::XUIElement;
+ using ::com::sun::star::beans::PropertyValue;
+ using ::com::sun::star::container::NoSuchElementException;
+ using ::com::sun::star::beans::PropertyValue;
+ using ::com::sun::star::awt::XWindow;
+ /** === end UNO using === **/
+
+ //==================================================================================================================
+ //= ToolPanelFactory
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ ToolPanelFactory::ToolPanelFactory( const Reference< XComponentContext >& i_rContext )
+ :m_xContext( i_rContext )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ToolPanelFactory::~ToolPanelFactory()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XUIElement > SAL_CALL ToolPanelFactory::createUIElement( const ::rtl::OUString& i_rResourceURL, const Sequence< PropertyValue >& i_rArgs ) throw (NoSuchElementException, IllegalArgumentException, RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if ( !i_rResourceURL.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:resource/toolpanel/org.openoffice.example.colorpanel/" ) ) )
+ throw NoSuchElementException( i_rResourceURL, *this );
+
+ const ::rtl::OUString sColor( i_rResourceURL.copy( i_rResourceURL.lastIndexOf( '/' ) + 1 ) );
+ const sal_Int32 nPanelColor = sColor.toInt32( 16 );
+
+ // retrieve the parent window
+ Reference< XWindow > xParentWindow;
+ const PropertyValue* pArg = i_rArgs.getConstArray();
+ const PropertyValue* pArgEnd = i_rArgs.getConstArray() + i_rArgs.getLength();
+ for ( ; pArg != pArgEnd; ++pArg )
+ {
+ if ( pArg->Name.equalsAscii( "ParentWindow" ) )
+ {
+ xParentWindow.set( pArg->Value, UNO_QUERY );
+ break;
+ }
+ }
+ if ( !xParentWindow.is() )
+ {
+ OSL_ENSURE( false, "ToolPanelFactory::createUIElement: no parent window in the args!" );
+ throw IllegalArgumentException(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No parent window provided in the creation arguments. Cannot create tool panel." ) ),
+ *this,
+ 2
+ );
+ }
+
+ /// create the panel
+ Reference< XUIElement > xUIElement( new PanelUIElement( m_xContext, xParentWindow, i_rResourceURL, nPanelColor ) );
+ return xUIElement;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL ToolPanelFactory::getImplementationName( ) throw (RuntimeException)
+ {
+ return getImplementationName_static();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL ToolPanelFactory::getImplementationName_static( ) throw (RuntimeException)
+ {
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.example.custompanel.ToolPanelFactory" ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL ToolPanelFactory::supportsService( const ::rtl::OUString& i_rServiceName ) throw (RuntimeException)
+ {
+ const Sequence< ::rtl::OUString > aServiceNames( getSupportedServiceNames() );
+ for ( const ::rtl::OUString* serviceName = aServiceNames.getConstArray();
+ serviceName != aServiceNames.getConstArray() + aServiceNames.getLength();
+ ++serviceName
+ )
+ {
+ if ( i_rServiceName == *serviceName )
+ return sal_True;
+ }
+ return sal_False;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL ToolPanelFactory::getSupportedServiceNames() throw (RuntimeException)
+ {
+ return getSupportedServiceNames_static();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL ToolPanelFactory::getSupportedServiceNames_static() throw (RuntimeException)
+ {
+ Sequence< ::rtl::OUString > aServiceNames(1);
+ aServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.example.colorpanel.ToolPanelFactory" ) );
+ return aServiceNames;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XInterface > SAL_CALL ToolPanelFactory::Create( const Reference< XComponentContext >& i_rContext ) throw (RuntimeException)
+ {
+ return *( new ToolPanelFactory( i_rContext ) );
+ }
+
+//......................................................................................................................
+} } // namespace sd::colortoolpanel
+//......................................................................................................................
diff --git a/sfx2/workben/custompanel/ctp_factory.hxx b/sfx2/workben/custompanel/ctp_factory.hxx
new file mode 100644
index 000000000000..8a359f59caaf
--- /dev/null
+++ b/sfx2/workben/custompanel/ctp_factory.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+
+#ifndef SD_WORKBENCH_CTP_FACTORY_HXX
+#define SD_WORKBENCH_CTP_FACTORY_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/ui/XUIElementFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/basemutex.hxx>
+
+//......................................................................................................................
+namespace sd { namespace colortoolpanel
+{
+//......................................................................................................................
+
+ class FactoryGuard;
+
+ //==================================================================================================================
+ //= ToolPanelFactory
+ //==================================================================================================================
+ typedef ::cppu::WeakImplHelper2 < ::com::sun::star::ui::XUIElementFactory
+ , ::com::sun::star::lang::XServiceInfo
+ > ToolPanelFactory_Base;
+ class ToolPanelFactory :public ::cppu::BaseMutex
+ ,public ToolPanelFactory_Base
+ {
+ public:
+ ToolPanelFactory(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext
+ );
+ ~ToolPanelFactory();
+
+ // XUIElementFactory
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > SAL_CALL createUIElement( const ::rtl::OUString& i_rResourceURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_rArgs ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo - static versions
+ static ::rtl::OUString SAL_CALL getImplementationName_static( ) throw (::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static( ) throw (::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext ) throw (::com::sun::star::uno::RuntimeException);
+
+ private:
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+ m_xContext;
+ };
+
+//......................................................................................................................
+} } // namespace sd::colortoolpanel
+//......................................................................................................................
+
+#endif // SD_WORKBENCH_CTP_FACTORY_HXX
diff --git a/sfx2/workben/custompanel/ctp_panel.cxx b/sfx2/workben/custompanel/ctp_panel.cxx
new file mode 100644
index 000000000000..ee94287bedbf
--- /dev/null
+++ b/sfx2/workben/custompanel/ctp_panel.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_sfx2.hxx"
+
+#include "ctp_panel.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/awt/XWindowPeer.hpp>
+#include <com/sun/star/awt/XToolkit.hpp>
+#include <com/sun/star/awt/WindowClass.hpp>
+#include <com/sun/star/awt/WindowAttribute.hpp>
+#include <com/sun/star/awt/PosSize.hpp>
+#include <com/sun/star/awt/XDevice.hpp>
+#include <com/sun/star/awt/XGraphics.hpp>
+#include <com/sun/star/ui/UIElementType.hpp>
+/** === end UNO includes === **/
+
+#include <tools/diagnose_ex.h>
+
+//......................................................................................................................
+namespace sd { namespace colortoolpanel
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::uno::XComponentContext;
+ using ::com::sun::star::awt::XWindow;
+ using ::com::sun::star::lang::DisposedException;
+ using ::com::sun::star::awt::XWindowPeer;
+ using ::com::sun::star::lang::XMultiComponentFactory;
+ using ::com::sun::star::awt::XToolkit;
+ using ::com::sun::star::awt::WindowDescriptor;
+ using ::com::sun::star::awt::WindowClass_SIMPLE;
+ using ::com::sun::star::awt::Rectangle;
+ using ::com::sun::star::awt::PaintEvent;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::awt::XDevice;
+ using ::com::sun::star::awt::XGraphics;
+ using ::com::sun::star::accessibility::XAccessible;
+ using ::com::sun::star::frame::XFrame;
+ /** === end UNO using === **/
+ namespace WindowAttribute = ::com::sun::star::awt::WindowAttribute;
+ namespace PosSize = ::com::sun::star::awt::PosSize;
+ namespace UIElementType = ::com::sun::star::ui::UIElementType;
+
+ //==================================================================================================================
+ //= helpers
+ //==================================================================================================================
+ namespace
+ {
+ Reference< XWindow > lcl_createPlainWindow_nothrow( const Reference< XComponentContext >& i_rContext,
+ const Reference< XWindowPeer >& i_rParentWindow )
+ {
+ try
+ {
+ ENSURE_OR_THROW( i_rContext.is(), "illegal component context" );
+ Reference< XMultiComponentFactory > xFactory( i_rContext->getServiceManager(), UNO_SET_THROW );
+ Reference< XToolkit > xToolkit( xFactory->createInstanceWithContext(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" ) ),
+ i_rContext
+ ), UNO_QUERY_THROW );
+
+ WindowDescriptor aWindow;
+ aWindow.Type = WindowClass_SIMPLE;
+ aWindow.WindowServiceName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "window" ) );
+ aWindow.Parent = i_rParentWindow;
+ aWindow.WindowAttributes = WindowAttribute::BORDER;
+
+ Reference< XWindowPeer > xWindow( xToolkit->createWindow( aWindow ), UNO_SET_THROW );
+ return Reference< XWindow >( xWindow, UNO_QUERY_THROW );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return NULL;
+ }
+ }
+ //==================================================================================================================
+ //= class SingleColorPanel
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ SingleColorPanel::SingleColorPanel( const Reference< XComponentContext >& i_rContext, const Reference< XWindow >& i_rParentWindow, const ::sal_Int32 i_nPanelColor )
+ :SingleColorPanel_Base( m_aMutex )
+ ,m_xWindow()
+ ,m_nPanelColor( i_nPanelColor )
+ {
+ // retrieve the parent window for our to-be-created pane window
+ Reference< XWindowPeer > xParentPeer( i_rParentWindow, UNO_QUERY );
+
+ osl_incrementInterlockedCount( &m_refCount );
+ if ( xParentPeer.is() )
+ {
+ m_xWindow = lcl_createPlainWindow_nothrow( i_rContext, xParentPeer );
+ m_xWindow->addPaintListener( this );
+ if ( m_xWindow.is() )
+ {
+ const Rectangle aPanelAnchorSize( i_rParentWindow->getPosSize() );
+ m_xWindow->setPosSize( 0, 0, aPanelAnchorSize.Width, aPanelAnchorSize.Height, PosSize::POSSIZE );
+ m_xWindow->setVisible( sal_True );
+ }
+ }
+ osl_decrementInterlockedCount( &m_refCount );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ SingleColorPanel::~SingleColorPanel()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XWindow > SAL_CALL SingleColorPanel::getWindow() throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( !m_xWindow.is() )
+ throw DisposedException( ::rtl::OUString(), *this );
+ return m_xWindow;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XAccessible > SAL_CALL SingleColorPanel::createAccessible( const Reference< XAccessible >& i_rParentAccessible ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( !m_xWindow.is() )
+ throw DisposedException( ::rtl::OUString(), *this );
+
+ // TODO: the following is wrong, since it doesn't respect i_rParentAccessible. In a real extension, you should
+ // implement this correctly :)
+ (void)i_rParentAccessible;
+ return Reference< XAccessible >( getWindow(), UNO_QUERY );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SingleColorPanel::windowPaint( const PaintEvent& i_rEvent ) throw (RuntimeException)
+ {
+ try
+ {
+ const Reference< XDevice > xDevice( i_rEvent.Source, UNO_QUERY_THROW );
+ const Reference< XGraphics > xGraphics( xDevice->createGraphics(), UNO_SET_THROW );
+ xGraphics->setFillColor( m_nPanelColor );
+ xGraphics->setLineColor( 0x00FFFFFF );
+
+ const Reference< XWindow > xWindow( i_rEvent.Source, UNO_QUERY_THROW );
+ const Rectangle aWindowRect( xWindow->getPosSize() );
+ xGraphics->drawRect( 0, 0, aWindowRect.Width - 1, aWindowRect.Height - 1 );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SingleColorPanel::disposing( const EventObject& i_rSource ) throw (RuntimeException)
+ {
+ (void)i_rSource;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SingleColorPanel::disposing()
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( !m_xWindow.is() )
+ // already disposed
+ return;
+ m_xWindow->removePaintListener( this );
+ try
+ {
+ Reference< XComponent > xWindowComp( m_xWindow, UNO_QUERY_THROW );
+ xWindowComp->dispose();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ m_xWindow.clear();
+ }
+
+ //==================================================================================================================
+ //= PanelUIElement
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ PanelUIElement::PanelUIElement( const Reference< XComponentContext >& i_rContext, const Reference< XWindow >& i_rParentWindow,
+ const ::rtl::OUString& i_rResourceURL, const ::sal_Int32 i_nPanelColor )
+ :PanelUIElement_Base( m_aMutex )
+ ,m_sResourceURL( i_rResourceURL )
+ ,m_xToolPanel( new SingleColorPanel( i_rContext, i_rParentWindow, i_nPanelColor ) )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ PanelUIElement::~PanelUIElement()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XFrame > SAL_CALL PanelUIElement::getFrame() throw (RuntimeException)
+ {
+ // TODO
+ return NULL;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL PanelUIElement::getResourceURL() throw (RuntimeException)
+ {
+ return m_sResourceURL;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int16 SAL_CALL PanelUIElement::getType() throw (RuntimeException)
+ {
+ return UIElementType::TOOLPANEL;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XInterface > SAL_CALL PanelUIElement::getRealInterface( ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( !m_xToolPanel.is() )
+ throw DisposedException();
+ return m_xToolPanel;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL PanelUIElement::disposing()
+ {
+ Reference< XComponent > xPanelComponent( m_xToolPanel, UNO_QUERY_THROW );
+ m_xToolPanel.clear();
+ xPanelComponent->dispose();
+ }
+
+//......................................................................................................................
+} } // namespace sd::colortoolpanel
+//......................................................................................................................
diff --git a/sfx2/workben/custompanel/ctp_panel.hxx b/sfx2/workben/custompanel/ctp_panel.hxx
new file mode 100644
index 000000000000..39c46c9d93a5
--- /dev/null
+++ b/sfx2/workben/custompanel/ctp_panel.hxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+
+#ifndef SD_WORKBENCH_CTP_PANEL_HXX
+#define SD_WORKBENCH_CTP_PANEL_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/ui/XToolPanel.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/awt/XPaintListener.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/ui/XUIElement.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/compbase2.hxx>
+#include <cppuhelper/compbase1.hxx>
+#include <cppuhelper/basemutex.hxx>
+
+#include <boost/scoped_ptr.hpp>
+
+//......................................................................................................................
+namespace sd { namespace colortoolpanel
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= SingleColorPanel
+ //==================================================================================================================
+ typedef ::cppu::WeakComponentImplHelper2 < ::com::sun::star::ui::XToolPanel
+ , ::com::sun::star::awt::XPaintListener
+ > SingleColorPanel_Base;
+ class SingleColorPanel :public ::cppu::BaseMutex
+ ,public SingleColorPanel_Base
+ {
+ public:
+ SingleColorPanel(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& i_rParentWindow,
+ const ::sal_Int32 i_nPanelColor
+ );
+
+ // XToolPanel
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getWindow() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL createAccessible( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rParentAccessible ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XPaintListener
+ virtual void SAL_CALL windowPaint( const ::com::sun::star::awt::PaintEvent& e ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent equivalents
+ virtual void SAL_CALL disposing();
+
+ protected:
+ ~SingleColorPanel();
+
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xWindow;
+ const sal_Int32 m_nPanelColor;
+ };
+
+ //==================================================================================================================
+ //= PanelUIElement
+ //==================================================================================================================
+ typedef ::cppu::WeakComponentImplHelper1 < ::com::sun::star::ui::XUIElement
+ > PanelUIElement_Base;
+ class PanelUIElement :public ::cppu::BaseMutex
+ ,public PanelUIElement_Base
+ {
+ public:
+ PanelUIElement(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& i_rParentWindow,
+ const ::rtl::OUString& i_rResourceURL,
+ const ::sal_Int32 i_nPanelColor
+ );
+
+ // XUIElement
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getResourceURL() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ protected:
+ ~PanelUIElement();
+
+ private:
+ const ::rtl::OUString m_sResourceURL;
+ ::com::sun::star::uno::Reference< ::com::sun::star::ui::XToolPanel >
+ m_xToolPanel;
+ };
+
+//......................................................................................................................
+} } // namespace sd::colortoolpanel
+//......................................................................................................................
+
+#endif // SD_WORKBENCH_CTP_PANEL_HXX
diff --git a/sfx2/workben/custompanel/ctp_services.cxx b/sfx2/workben/custompanel/ctp_services.cxx
new file mode 100644
index 000000000000..4164e8bc1629
--- /dev/null
+++ b/sfx2/workben/custompanel/ctp_services.cxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_sfx2.hxx"
+
+#include "ctp_factory.hxx"
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+#include <cppuhelper/implementationentry.hxx>
+
+//......................................................................................................................
+namespace sd { namespace colortoolpanel
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ /** === end UNO using === **/
+
+ //==================================================================================================================
+ //= descriptors for the services implemented in this component
+ //==================================================================================================================
+ static struct ::cppu::ImplementationEntry s_aServiceEntries[] =
+ {
+ {
+ ToolPanelFactory::Create,
+ ToolPanelFactory::getImplementationName_static,
+ ToolPanelFactory::getSupportedServiceNames_static,
+ ::cppu::createSingleComponentFactory, NULL, 0
+ },
+ { 0, 0, 0, 0, 0, 0 }
+ };
+
+//......................................................................................................................
+} } // namespace sd::colortoolpanel
+//......................................................................................................................
+
+extern "C"
+{
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** )
+ {
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryKey )
+ {
+ return ::cppu::component_writeInfoHelper( pServiceManager, pRegistryKey, ::sd::colortoolpanel::s_aServiceEntries );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
+ {
+ return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , ::sd::colortoolpanel::s_aServiceEntries );
+ }
+}
diff --git a/sfx2/workben/custompanel/delzip b/sfx2/workben/custompanel/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/sfx2/workben/custompanel/delzip
diff --git a/sfx2/workben/custompanel/description.xml b/sfx2/workben/custompanel/description.xml
new file mode 100644
index 000000000000..a90aa73a77f6
--- /dev/null
+++ b/sfx2/workben/custompanel/description.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<description
+ xmlns="http://openoffice.org/extensions/description/2006"
+ xmlns:d="http://openoffice.org/extensions/description/2006"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+
+ <identifier value="UPDATED_IDENTIFIER"/>
+ <version value="0.1" />
+ <platform value="UPDATED_SUPPORTED_PLATFORM" />
+ <display-name>
+ <name>Custom Tool Panel Example</name>
+ </display-name>
+ <dependencies>
+ <OpenOffice.org-minimal-version value="3.3" d:name="OpenOffice.org 3.3"/>
+ </dependencies>
+</description>
diff --git a/sfx2/workben/custompanel/makefile.mk b/sfx2/workben/custompanel/makefile.mk
new file mode 100644
index 000000000000..1eb20ceed35d
--- /dev/null
+++ b/sfx2/workben/custompanel/makefile.mk
@@ -0,0 +1,120 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General 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=sfx2
+
+TARGET=custompanel
+ENABLE_EXCEPTIONS=TRUE
+LIBTARGET=NO
+EXTENSIONNAME:=custom-tool-panel
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+#-------------------------------------------------------------------
+
+#---- extension version
+EXTENSION_VERSION_BASE=0.1
+.IF ( "$(CWS_WORK_STAMP)" == "" ) || ( "$(UPDATER)" == "YES" )
+ EXTENSION_VERSION=$(EXTENSION_VERSION_BASE)
+.ELSE
+ EXTENSION_VERSION=$(EXTENSION_VERSION_BASE).cws.$(CWS_WORK_STAMP)
+.ENDIF
+
+#---- extension title package name
+EXTENSION_TITLE=Custom Tool Panel Example
+EXTENSION_ZIPNAME=$(EXTENSIONNAME)-$(EXTENSION_VERSION_BASE)-$(RTL_OS:l)-$(RTL_ARCH:l)
+
+#--------------------------------------------------
+
+SHL1DLLPRE=
+SHL1TARGET=$(TARGET).uno
+LIB1TARGET=$(SLB)/$(SHL1TARGET).lib
+LIB1OBJFILES= \
+ $(SLO)/ctp_factory.obj \
+ $(SLO)/ctp_services.obj \
+ $(SLO)/ctp_panel.obj
+
+SHL1STDLIBS= \
+ $(CPPULIB) \
+ $(SALLIB) \
+ $(SALHELPERLIB) \
+ $(CPPUHELPERLIB)
+
+SHL1VERSIONMAP=$(SOLARSRC)/solenv/src/component.map
+SHL1LIBS= $(LIB1TARGET)
+SHL1DEF= $(MISC)/$(SHL1TARGET).def
+SHL1RPATH= OXT
+DEF1NAME= $(SHL1TARGET)
+
+# create Extension -----------------------------
+
+COMPONENT_CONFIGDEST=.
+
+COMPONENT_XCU = \
+ $(EXTENSIONDIR)/WriterWindowState.xcu \
+ $(EXTENSIONDIR)/CalcWindowState.xcu \
+ $(EXTENSIONDIR)/DrawWindowState.xcu \
+ $(EXTENSIONDIR)/ImpressWindowState.xcu \
+ $(EXTENSIONDIR)/Factories.xcu
+
+COMPONENT_LIBRARIES = \
+ $(EXTENSIONDIR)/$(SHL1TARGET)$(DLLPOST)
+
+COMPONENT_IMAGES= \
+ $(EXTENSIONDIR)/panel.png
+
+# ........ dependencies for packaging the extension ........
+EXTENSION_PACKDEPS=makefile.mk $(COMPONENT_IMAGES)
+
+# --- Targets ------------------------------------------------------
+.INCLUDE : extension_pre.mk
+.INCLUDE : target.mk
+.INCLUDE : extension_post.mk
+
+$(EXTENSIONDIR)/%.png : ./%.png
+ @@-$(MKDIRHIER) $(@:d)
+ @$(COPY) $< $@ > $(NULLDEV)
+
+$(EXTENSIONDIR)/WriterWindowState.xcu: ./WriterWindowState.xcu
+ @@-$(MKDIRHIER) $(@:d)
+ $(COMMAND_ECHO)$(TYPE) ./WriterWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/WriterWindowState.xcu
+
+$(EXTENSIONDIR)/CalcWindowState.xcu: ./CalcWindowState.xcu
+ @@-$(MKDIRHIER) $(@:d)
+ $(COMMAND_ECHO)$(TYPE) ./CalcWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/CalcWindowState.xcu
+
+$(EXTENSIONDIR)/DrawWindowState.xcu: ./DrawWindowState.xcu
+ @@-$(MKDIRHIER) $(@:d)
+ $(COMMAND_ECHO)$(TYPE) ./DrawWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/DrawWindowState.xcu
+
+$(EXTENSIONDIR)/ImpressWindowState.xcu: ./ImpressWindowState.xcu
+ @@-$(MKDIRHIER) $(@:d)
+ $(COMMAND_ECHO)$(TYPE) ./ImpressWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/ImpressWindowState.xcu
+
diff --git a/sfx2/workben/custompanel/manifest.xml b/sfx2/workben/custompanel/manifest.xml
new file mode 100644
index 000000000000..9122d16a4189
--- /dev/null
+++ b/sfx2/workben/custompanel/manifest.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
+<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
+ <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-component;type=native"
+ manifest:full-path="custompanel.unoSHARED_EXTENSION"/>
+ <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
+ manifest:full-path="WriterWindowState.xcu"/>
+ <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
+ manifest:full-path="CalcWindowState.xcu"/>
+ <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
+ manifest:full-path="DrawWindowState.xcu"/>
+ <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
+ manifest:full-path="ImpressWindowState.xcu"/>
+ <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
+ manifest:full-path="Factories.xcu"/>
+ <!-- <manifest:file-entry manifest:media-type="image/png"
+ manifest:full-path="panel.png"/>-->
+</manifest:manifest>
diff --git a/sfx2/workben/custompanel/panel.png b/sfx2/workben/custompanel/panel.png
new file mode 100644
index 000000000000..2438714af8a6
--- /dev/null
+++ b/sfx2/workben/custompanel/panel.png
Binary files differ
diff --git a/svx/inc/extrusioncontrols.hxx b/svx/inc/extrusioncontrols.hxx
deleted file mode 100644
index 4560c7463bc9..000000000000
--- a/svx/inc/extrusioncontrols.hxx
+++ /dev/null
@@ -1,390 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef _SVX_EXTRUSION_CONTROLS_HXX
-#define _SVX_EXTRUSION_CONTROLS_HXX
-
-#include <svtools/valueset.hxx>
-#include <svl/lstner.hxx>
-#include <sfx2/tbxctrl.hxx>
-#include <svtools/svtreebx.hxx>
-#ifndef _SV_BUTTON_HXX
-#include <vcl/button.hxx>
-#endif
-#include <vcl/dialog.hxx>
-#include <vcl/field.hxx>
-#include <com/sun/star/frame/XFrame.hpp>
-#include "svx/svxdllapi.h"
-
-class SfxBindings;
-class ToolbarMenu;
-class SfxStatusForwarder;
-
-//========================================================================
-
-namespace svx
-{
-class ToolboxButtonColorUpdater;
-
-class ExtrusionDirectionWindow : public SfxPopupWindow
-{
- using FloatingWindow::StateChanged;
-
-private:
- ToolbarMenu* mpMenu;
- ValueSet* mpDirectionSet;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
-
- SfxStatusForwarder* mpDirectionForewarder;
- SfxStatusForwarder* mpProjectionForewarder;
-
- Image maImgDirection[9];
- Image maImgDirectionH[9];
-
- Image maImgPerspective;
- Image maImgPerspectiveH;
- Image maImgParallel;
- Image maImgParallelH;
-
- bool mbPopupMode;
-
- DECL_LINK( SelectHdl, void * );
- void FillValueSet();
-
- void implSetDirection( sal_Int32 nSkew, bool bEnabled = true );
- void implSetProjection( sal_Int32 nProjection, bool bEnabled = true );
- void implInit();
-
-protected:
- virtual BOOL Close();
- virtual void PopupModeEnd();
-
- /** This function is called when the window gets the focus. It grabs
- the focus to the line ends value set so that it can be controlled with
- the keyboard.
- */
- virtual void GetFocus (void);
-
-public:
- ExtrusionDirectionWindow( USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
- ExtrusionDirectionWindow( USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
- Window* pParentWindow );
- ~ExtrusionDirectionWindow();
-
- void StartSelection();
-
- virtual SfxPopupWindow* Clone() const;
-
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
-};
-
-//========================================================================
-
-class SVX_DLLPUBLIC ExtrusionDirectionControl : public SfxToolBoxControl
-{
-public:
- SFX_DECL_TOOLBOX_CONTROL();
- ExtrusionDirectionControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
- ~ExtrusionDirectionControl();
-
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
- const SfxPoolItem* pState );
- virtual SfxPopupWindowType GetPopupWindowType() const;
- virtual SfxPopupWindow* CreatePopupWindow();
-};
-
-//========================================================================
-
-class ExtrusionDepthWindow : public SfxPopupWindow
-{
- using FloatingWindow::StateChanged;
-
-private:
- ToolbarMenu* mpMenu;
-
- Image maImgDepth0;
- Image maImgDepth1;
- Image maImgDepth2;
- Image maImgDepth3;
- Image maImgDepth4;
- Image maImgDepthInfinity;
-
- Image maImgDepth0h;
- Image maImgDepth1h;
- Image maImgDepth2h;
- Image maImgDepth3h;
- Image maImgDepth4h;
- Image maImgDepthInfinityh;
-
- SfxStatusForwarder* mpDepthForewarder;
- SfxStatusForwarder* mpMetricForewarder;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
-
- bool mbPopupMode;
- FieldUnit meUnit;
- double mfDepth;
- bool mbEnabled;
-
- DECL_LINK( SelectHdl, void * );
-
- void implFillStrings( FieldUnit eUnit );
- void implSetDepth( double fDepth, bool bEnabled );
- void implInit();
-
-protected:
- virtual BOOL Close();
- virtual void PopupModeEnd();
-
- /** This function is called when the window gets the focus. It grabs
- the focus to the line ends value set so that it can be controlled with
- the keyboard.
- */
- virtual void GetFocus (void);
-
-public:
- ExtrusionDepthWindow( USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
- ExtrusionDepthWindow( USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
- Window* pParentWindow );
- ~ExtrusionDepthWindow();
-
- void StartSelection();
-
- virtual SfxPopupWindow* Clone() const;
-
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
-};
-
-//========================================================================
-
-class SVX_DLLPUBLIC ExtrusionDepthControl : public SfxToolBoxControl
-{
-public:
- SFX_DECL_TOOLBOX_CONTROL();
- ExtrusionDepthControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
- ~ExtrusionDepthControl();
-
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
- const SfxPoolItem* pState );
- virtual SfxPopupWindowType GetPopupWindowType() const;
- virtual SfxPopupWindow* CreatePopupWindow();
-};
-
-//========================================================================
-
-class ExtrusionLightingWindow : public SfxPopupWindow
-{
- using FloatingWindow::StateChanged;
-
-private:
- ToolbarMenu* mpMenu;
- ValueSet* mpLightingSet;
-
- Image maImgLightingOff[9];
- Image maImgLightingOn[9];
- Image maImgLightingPreview[9];
-
- Image maImgLightingOffh[9];
- Image maImgLightingOnh[9];
- Image maImgLightingPreviewh[9];
-
- Image maImgBright;
- Image maImgNormal;
- Image maImgDim;
- Image maImgBrighth;
- Image maImgNormalh;
- Image maImgDimh;
-
- SfxStatusForwarder* mpLightingDirectionForewarder;
- SfxStatusForwarder* mpLightingIntensityForewarder;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
-
- bool mbPopupMode;
- int mnLevel;
- bool mbLevelEnabled;
- int mnDirection;
- bool mbDirectionEnabled;
-
- void implSetIntensity( int nLevel, bool bEnabled );
- void implSetDirection( int nDirection, bool bEnabled );
- void implInit();
-
- DECL_LINK( SelectHdl, void * );
-
-protected:
- virtual BOOL Close();
- virtual void PopupModeEnd();
-
- /** This function is called when the window gets the focus. It grabs
- the focus to the line ends value set so that it can be controlled with
- the keyboard.
- */
- virtual void GetFocus (void);
-
-public:
- ExtrusionLightingWindow( USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
- ExtrusionLightingWindow( USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
- Window* pParentWindow );
- ~ExtrusionLightingWindow();
-
- void StartSelection();
-
- virtual SfxPopupWindow* Clone() const;
-
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
-};
-
-//========================================================================
-
-class SVX_DLLPUBLIC ExtrusionLightingControl : public SfxToolBoxControl
-{
-public:
- SFX_DECL_TOOLBOX_CONTROL();
- ExtrusionLightingControl( USHORT nSlotid, USHORT nId, ToolBox& rTbx );
- ~ExtrusionLightingControl();
-
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
- const SfxPoolItem* pState );
- virtual SfxPopupWindowType GetPopupWindowType() const;
- virtual SfxPopupWindow* CreatePopupWindow();
-};
-
-//========================================================================
-
-class ExtrusionSurfaceWindow : public SfxPopupWindow
-{
- using FloatingWindow::StateChanged;
-private:
- ToolbarMenu* mpMenu;
-
- Image maImgSurface1;
- Image maImgSurface2;
- Image maImgSurface3;
- Image maImgSurface4;
- Image maImgSurface1h;
- Image maImgSurface2h;
- Image maImgSurface3h;
- Image maImgSurface4h;
-
- SfxStatusForwarder* mpSurfaceForewarder;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
-
- bool mbPopupMode;
-
- DECL_LINK( SelectHdl, void * );
-
- void implSetSurface( int nSurface, bool bEnabled );
- void implInit();
-
-protected:
- virtual BOOL Close();
- virtual void PopupModeEnd();
-
- /** This function is called when the window gets the focus. It grabs
- the focus to the line ends value set so that it can be controlled with
- the keyboard.
- */
- virtual void GetFocus (void);
-
-public:
- ExtrusionSurfaceWindow( USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
- ExtrusionSurfaceWindow( USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
- Window* pParentWindow );
- ~ExtrusionSurfaceWindow();
-
- void StartSelection();
-
- virtual SfxPopupWindow* Clone() const;
-
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
-};
-
-//========================================================================
-
-class SVX_DLLPUBLIC ExtrusionSurfaceControl : public SfxToolBoxControl
-{
-public:
- SFX_DECL_TOOLBOX_CONTROL();
- ExtrusionSurfaceControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
- ~ExtrusionSurfaceControl();
-
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
- const SfxPoolItem* pState );
- virtual SfxPopupWindowType GetPopupWindowType() const;
- virtual SfxPopupWindow* CreatePopupWindow();
-};
-
-//========================================================================
-
-class SVX_DLLPUBLIC ExtrusionColorControl : public SfxToolBoxControl
-{
-private:
- ToolboxButtonColorUpdater* mpBtnUpdater;
-
-public:
- SFX_DECL_TOOLBOX_CONTROL();
- ExtrusionColorControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
- ~ExtrusionColorControl();
-
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
- const SfxPoolItem* pState );
- virtual SfxPopupWindowType GetPopupWindowType() const;
- virtual SfxPopupWindow* CreatePopupWindow();
-};
-
-//========================================================================
-
-class ExtrusionDepthDialog : public ModalDialog
-{
- FixedText maFLDepth;
- MetricField maMtrDepth;
- OKButton maOKButton;
- CancelButton maCancelButton;
- HelpButton maHelpButton;
-
- FieldUnit meDefaultUnit;
-
-public:
- ExtrusionDepthDialog( Window* pParent, double fDepth, FieldUnit eDefaultUnit );
- ~ExtrusionDepthDialog();
-
- double getDepth() const;
-};
-
-}
-#endif
-
diff --git a/svx/inc/extrusiondepthdialog.hxx b/svx/inc/extrusiondepthdialog.hxx
new file mode 100644
index 000000000000..600e646e8cb6
--- /dev/null
+++ b/svx/inc/extrusiondepthdialog.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_EXTRUSIONDEPTHDIALOG_HXX
+#define _SVX_EXTRUSIONDEPTHDIALOG_HXX
+
+#include "svx/svxdllapi.h"
+
+#include <vcl/fixed.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/button.hxx>
+#include <vcl/field.hxx>
+
+namespace svx {
+
+class ExtrusionDepthDialog : public ModalDialog
+{
+ FixedText maFLDepth;
+ MetricField maMtrDepth;
+ OKButton maOKButton;
+ CancelButton maCancelButton;
+ HelpButton maHelpButton;
+
+ FieldUnit meDefaultUnit;
+
+public:
+ ExtrusionDepthDialog( Window* pParent, double fDepth, FieldUnit eDefaultUnit );
+ ~ExtrusionDepthDialog();
+
+ double getDepth() const;
+};
+
+}
+
+#endif // _SVX_EXTRUSIONDEPTHDIALOG_HXX
+
diff --git a/svx/inc/fontworkgallery.hxx b/svx/inc/fontworkgallery.hxx
index 9f6b1f9f4b2f..40ac3cef966a 100644
--- a/svx/inc/fontworkgallery.hxx
+++ b/svx/inc/fontworkgallery.hxx
@@ -29,16 +29,16 @@
#ifndef _SVX_FONTWORK_GALLERY_DIALOG_HXX
#define _SVX_FONTWORK_GALLERY_DIALOG_HXX
-#ifndef _FIXED_HXX //autogen
+#include "svx/svxdllapi.h"
+
#include <vcl/fixed.hxx>
-#endif
-#include <svtools/valueset.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <vcl/dialog.hxx>
+#include <vcl/field.hxx>
+
+#include <svtools/valueset.hxx>
+
#include <sfx2/tbxctrl.hxx>
-#include "svx/svxdllapi.h"
#include <vector>
@@ -50,7 +50,6 @@ class SdrObject;
class SdrModel;
class SfxBindings;
-class ToolbarMenu;
class SfxStatusForwarder;
//------------------------------------------------------------------------
@@ -58,130 +57,6 @@ class SfxStatusForwarder;
namespace svx
{
-class FontWorkAlignmentWindow : public SfxPopupWindow
-{
- using FloatingWindow::StateChanged;
-private:
- ToolbarMenu* mpMenu;
-
- Image maImgAlgin1;
- Image maImgAlgin2;
- Image maImgAlgin3;
- Image maImgAlgin4;
- Image maImgAlgin5;
- Image maImgAlgin1h;
- Image maImgAlgin2h;
- Image maImgAlgin3h;
- Image maImgAlgin4h;
- Image maImgAlgin5h;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
-
- bool mbPopupMode;
-
- DECL_LINK( SelectHdl, void * );
-
- void implSetAlignment( int nAlignmentMode, bool bEnabled );
- void implInit();
-
-protected:
- virtual BOOL Close();
- virtual void PopupModeEnd();
-
- /** This function is called when the window gets the focus. It grabs
- the focus to the line ends value set so that it can be controlled with
- the keyboard.
- */
- virtual void GetFocus (void);
-
-public:
- FontWorkAlignmentWindow( USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
- FontWorkAlignmentWindow( USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
- Window* pParentWindow );
- ~FontWorkAlignmentWindow();
-
- void StartSelection();
-
- virtual SfxPopupWindow* Clone() const;
-
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
-};
-
-class SVX_DLLPUBLIC FontWorkAlignmentControl : public SfxToolBoxControl
-{
-public:
- SFX_DECL_TOOLBOX_CONTROL();
- FontWorkAlignmentControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
- ~FontWorkAlignmentControl();
-
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
- const SfxPoolItem* pState );
- virtual SfxPopupWindowType GetPopupWindowType() const;
- virtual SfxPopupWindow* CreatePopupWindow();
-};
-
-//------------------------------------------------------------------------
-
-class FontWorkCharacterSpacingWindow : public SfxPopupWindow
-{
- using FloatingWindow::StateChanged;
-private:
- ToolbarMenu* mpMenu;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
-
- bool mbPopupMode;
-
- DECL_LINK( SelectHdl, void * );
-
- void implSetCharacterSpacing( sal_Int32 nCharacterSpacing, bool bEnabled );
- void implSetKernCharacterPairs( sal_Bool bKernOnOff, bool bEnabled );
- void implInit();
-
-protected:
- virtual BOOL Close();
- virtual void PopupModeEnd();
-
- /** This function is called when the window gets the focus. It grabs
- the focus to the line ends value set so that it can be controlled with
- the keyboard.
- */
- virtual void GetFocus (void);
-
-public:
- FontWorkCharacterSpacingWindow( USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
- FontWorkCharacterSpacingWindow( USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
- Window* pParentWindow );
- ~FontWorkCharacterSpacingWindow();
-
- void StartSelection();
-
- virtual SfxPopupWindow* Clone() const;
-
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
-};
-
-class SVX_DLLPUBLIC FontWorkCharacterSpacingControl : public SfxToolBoxControl
-{
-public:
- SFX_DECL_TOOLBOX_CONTROL();
- FontWorkCharacterSpacingControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
- ~FontWorkCharacterSpacingControl();
-
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
- const SfxPoolItem* pState );
- virtual SfxPopupWindowType GetPopupWindowType() const;
- virtual SfxPopupWindow* CreatePopupWindow();
-};
-
-//------------------------------------------------------------------------
-
class SVX_DLLPUBLIC FontWorkShapeTypeControl : public SfxToolBoxControl
{
using SfxToolBoxControl::Select;
@@ -192,8 +67,6 @@ public:
~FontWorkShapeTypeControl();
virtual void Select( BOOL bMod1 = FALSE );
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
- const SfxPoolItem* pState );
virtual SfxPopupWindowType GetPopupWindowType() const;
virtual SfxPopupWindow* CreatePopupWindow();
};
diff --git a/svx/inc/globlmn_tmpl.hrc b/svx/inc/globlmn_tmpl.hrc
index e328a39a0707..be037a1ca3cc 100644
--- a/svx/inc/globlmn_tmpl.hrc
+++ b/svx/inc/globlmn_tmpl.hrc
@@ -1332,17 +1332,38 @@
{\
MenuItem\
{\
- Identifier = SID_TRANSLITERATE_UPPER ; \
- Command = ".uno:ChangeCaseToUpper" ; \
- HelpID = SID_TRANSLITERATE_UPPER ; \
- Text [ en-US ] = "~Uppercase";\
+ Identifier = SID_TRANSLITERATE_SENTENCE_CASE; \
+ Command = ".uno:ChangeCaseToSentenceCase" ; \
+ HelpID = SID_TRANSLITERATE_SENTENCE_CASE; \
+ Text [ en-US ] = "~Sentence case";\
};\
MenuItem\
{\
Identifier = SID_TRANSLITERATE_LOWER; \
Command = ".uno:ChangeCaseToLower" ; \
HelpID = SID_TRANSLITERATE_LOWER; \
- Text [ en-US ] = "~Lowercase";\
+ Text [ en-US ] = "~lowercase";\
+ };\
+ MenuItem\
+ {\
+ Identifier = SID_TRANSLITERATE_UPPER ; \
+ Command = ".uno:ChangeCaseToUpper" ; \
+ HelpID = SID_TRANSLITERATE_UPPER ; \
+ Text [ en-US ] = "~UPPERCASE";\
+ };\
+ MenuItem\
+ {\
+ Identifier = SID_TRANSLITERATE_TITLE_CASE; \
+ Command = ".uno:ChangeCaseToTitleCase" ; \
+ HelpID = SID_TRANSLITERATE_TITLE_CASE; \
+ Text [ en-US ] = "~Capitalize Every Word";\
+ };\
+ MenuItem\
+ {\
+ Identifier = SID_TRANSLITERATE_TOGGLE_CASE; \
+ Command = ".uno:ChangeCaseToToggleCase" ; \
+ HelpID = SID_TRANSLITERATE_TOGGLE_CASE; \
+ Text [ en-US ] = "~tOGGLE cASE";\
};\
MenuItem\
{\
diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc
index 6d9153818cde..1f6fe1538a85 100644
--- a/svx/inc/helpid.hrc
+++ b/svx/inc/helpid.hrc
@@ -278,6 +278,7 @@
#define HID_SVX_SENDMENU_SIGNANDENCRYPT (HID_SVX_START + 245)
#define HID_SVX_TP_APPEARANCE (HID_SVX_START + 246)
#define HID_SVX_TP_DESKTOP (HID_SVX_START + 247)
+#define HID_CT_THES_ALTERNATIVES (HID_SVX_START + 248)
// please adjust ACT_SVX_HID_END2 below if you add entries here!
@@ -285,7 +286,7 @@
// Overrun check ---------------------------------------------------------
// -----------------------------------------------------------------------
-#define ACT_SVX_HID_END (HID_SVX_START+247)
+#define ACT_SVX_HID_END (HID_SVX_START+248)
#if ACT_SVX_HID_END > HID_SVX_END
#error Resource-Ueberlauf in #line, #file
#endif
diff --git a/svx/inc/svdstr.hrc b/svx/inc/svdstr.hrc
index f1c19b4e0895..f1bc8cfdae19 100644
--- a/svx/inc/svdstr.hrc
+++ b/svx/inc/svdstr.hrc
@@ -674,7 +674,7 @@
#define SIP_SA_CIRCRESERVE1 (SIP_Begin + 177)
#define SIP_SA_CIRCRESERVE2 (SIP_Begin + 178)
#define SIP_SA_CIRCRESERVE3 (SIP_Begin + 179)
-//BFS01#define SIP_SDRATTRSET_CIRC (SIP_Begin + 180)
+#define SIP_SA_OBJVISIBLE (SIP_Begin + 180)
#define SIP_SA_OBJMOVEPROTECT (SIP_Begin + 181)
#define SIP_SA_OBJSIZEPROTECT (SIP_Begin + 182)
#define SIP_SA_OBJPRINTABLE (SIP_Begin + 183)
diff --git a/svx/inc/svx/SpellDialogChildWindow.hxx b/svx/inc/svx/SpellDialogChildWindow.hxx
index 034b6372f6f1..3702b643e17e 100644
--- a/svx/inc/svx/SpellDialogChildWindow.hxx
+++ b/svx/inc/svx/SpellDialogChildWindow.hxx
@@ -69,15 +69,19 @@ protected:
@return
returns an empty vector if no error could be found
*/
- virtual SpellPortions GetNextWrongSentence (void) = 0;
+ virtual SpellPortions GetNextWrongSentence (bool bRecheck) = 0;
/** This abstract method applies the changes made in the spelling dialog
to the document.
The dialog always updates its settings when it gets the focus. The document
can rely on the fact that the methods ApplyChangedSentence() is called for the
position that the last GetNextWrongSentence() returned.
+ If 'bRecheck' is set to true then the same sentence should be rechecked once from
+ the start. This should be used too find errors that the user has introduced by
+ manual changes in the edit field, and in order to not miss the still following errors
+ in that sentence.
*/
- virtual void ApplyChangedSentence(const SpellPortions& rChanged) = 0;
+ virtual void ApplyChangedSentence(const SpellPortions& rChanged, bool bRecheck ) = 0;
/** This methods determines whether the application supports AutoCorrection
*/
virtual bool HasAutoCorrection();
diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc
index d193652b57fc..d193652b57fc 100644..100755
--- a/svx/inc/svx/dialogs.hrc
+++ b/svx/inc/svx/dialogs.hrc
diff --git a/svx/inc/svx/extrusioncolorcontrol.hxx b/svx/inc/svx/extrusioncolorcontrol.hxx
new file mode 100644
index 000000000000..ff4a53e65a41
--- /dev/null
+++ b/svx/inc/svx/extrusioncolorcontrol.hxx
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_EXTRUSIONCOLORCONTROL_HXX
+#define _SVX_EXTRUSIONCOLORCONTROL_HXX
+
+#include <sfx2/tbxctrl.hxx>
+#include "svx/svxdllapi.h"
+#include "svx/tbxcolorupdate.hxx"
+
+namespace svx {
+
+class SVX_DLLPUBLIC ExtrusionColorControl : public SfxToolBoxControl
+{
+private:
+ ToolboxButtonColorUpdater* mpBtnUpdater;
+
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ ExtrusionColorControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ ~ExtrusionColorControl();
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+};
+
+}
+
+#endif // _SVX_EXTRUSIONCOLORCONTROL_HXX
+
diff --git a/svx/inc/svx/fmshell.hxx b/svx/inc/svx/fmshell.hxx
index 0688beec65b3..f37eeab8c5e6 100644
--- a/svx/inc/svx/fmshell.hxx
+++ b/svx/inc/svx/fmshell.hxx
@@ -60,6 +60,11 @@ namespace com { namespace sun { namespace star { namespace form {
}
} } } }
+namespace svx
+{
+ class ISdrObjectFilter;
+}
+
//========================================================================
class SVX_DLLPUBLIC FmDesignModeChangedHint : public SfxHint
{
@@ -146,11 +151,28 @@ public:
const OutputDevice& _rDevice,
::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _out_rxControl
) const;
+
::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > GetFormController(
const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm,
const SdrView& _rView,
const OutputDevice& _rDevice
) const;
+
+ /** puts the focus into the document window, if current a form control has the focus. Otherwise, moves the focus
+ to the control belonging to the given SdrUnoObj.
+ */
+ void ToggleControlFocus(
+ const SdrUnoObj& i_rNextCandidate,
+ const SdrView& i_rView,
+ OutputDevice& i_rDevice
+ ) const;
+
+ ::std::auto_ptr< ::svx::ISdrObjectFilter >
+ CreateFocusableControlFilter(
+ const SdrView& i_rView,
+ const OutputDevice& i_rDevice
+ ) const;
+
sal_Bool IsDesignMode() const { return m_bDesignMode; }
void SetDesignMode( sal_Bool _bDesignMode );
diff --git a/svx/inc/svx/fmtools.hxx b/svx/inc/svx/fmtools.hxx
index 36fa180fa348..b39f46e85d14 100644
--- a/svx/inc/svx/fmtools.hxx
+++ b/svx/inc/svx/fmtools.hxx
@@ -76,6 +76,7 @@
#include <comphelper/uno3.hxx>
#include <comphelper/stl_types.hxx>
#include <cppuhelper/implbase1.hxx>
+#include <svl/svstdarr.hxx>
#include <set>
diff --git a/svx/inc/svx/gridctrl.hxx b/svx/inc/svx/gridctrl.hxx
index 6334137bc221..445d986b2c5e 100644
--- a/svx/inc/svx/gridctrl.hxx
+++ b/svx/inc/svx/gridctrl.hxx
@@ -29,6 +29,8 @@
#include <tools/list.hxx>
#include <com/sun/star/sdbc/XRowSet.hpp>
+#include <com/sun/star/sdbc/XRowSetListener.hpp>
+#include <com/sun/star/sdb/XRowsChangeListener.hpp>
#include <com/sun/star/beans/PropertyChangeEvent.hpp>
#include <com/sun/star/util/XNumberFormatter.hpp>
#include <com/sun/star/util/Date.hpp>
@@ -247,6 +249,8 @@ private:
// For that reason we have to listen to some properties of our data source.
::comphelper::OPropertyChangeMultiplexer* m_pDataSourcePropMultiplexer;
FmXGridSourcePropListener* m_pDataSourcePropListener;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XRowsChangeListener>
+ m_xRowSetListener; // get notification when rows were changed
void* m_pFieldListeners;
// property listeners for field values
@@ -523,15 +527,20 @@ public:
void setGridListener( FmGridListener* _pListener ) { m_pGridListener = _pListener; }
// helper class to grant access to selected methods from within the DbCellControl class
- struct GrantCellControlAccess
+ struct GrantControlAccess
{
friend class DbCellControl;
+ friend class RowSetEventListener;
protected:
- GrantCellControlAccess() { }
+ GrantControlAccess() { }
};
/// called when a controller needs to be re-initialized
- void refreshController(sal_uInt16 _nColId, GrantCellControlAccess _aAccess);
+ void refreshController(sal_uInt16 _nColId, GrantControlAccess _aAccess);
+
+ CursorWrapper* GetSeekCursor(GrantControlAccess /*_aAccess*/) const { return m_pSeekCursor; }
+ const DbGridRowRef& GetSeekRow(GrantControlAccess /*_aAccess*/) const { return m_xSeekRow; }
+ void SetSeekPos(sal_Int32 nPos,GrantControlAccess /*_aAccess*/) {m_nSeekPos = nPos;}
/**
@return
@@ -586,6 +595,7 @@ protected:
const DbGridRowRef& GetPaintRow() const { return m_xPaintRow; }
CursorWrapper* GetSeekCursor() const { return m_pSeekCursor; }
+
void ConnectToFields();
void DisconnectFromFields();
diff --git a/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx b/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx
index aa52efd03c41..1fbf0b6add3d 100644
--- a/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx
+++ b/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx
@@ -47,13 +47,16 @@ namespace sdr
sal_uInt16 mnCenterX;
sal_uInt16 mnCenterY;
+ // optional transparency
+ double mfAlpha;
+
virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
public:
OverlayBitmapEx(
const basegfx::B2DPoint& rBasePos,
const BitmapEx& rBitmapEx,
- sal_uInt16 nCenX = 0, sal_uInt16 nCenY = 0);
+ sal_uInt16 nCenX = 0, sal_uInt16 nCenY = 0, double fAlpha = 0.0 );
virtual ~OverlayBitmapEx();
const BitmapEx& getBitmapEx() const { return maBitmapEx; }
diff --git a/svx/inc/svx/sdrmasterpagedescriptor.hxx b/svx/inc/svx/sdrmasterpagedescriptor.hxx
index 8325d2a57fa1..612f2ab927ec 100644
--- a/svx/inc/svx/sdrmasterpagedescriptor.hxx
+++ b/svx/inc/svx/sdrmasterpagedescriptor.hxx
@@ -89,8 +89,6 @@ namespace sdr
// operators
sal_Bool operator==(const MasterPageDescriptor& rCandidate) const;
sal_Bool operator!=(const MasterPageDescriptor& rCandidate) const;
-
- const SfxItemSet& getCorrectFillAttributes() const;
};
} // end of namespace sdr
diff --git a/svx/inc/svx/sdrobjectfilter.hxx b/svx/inc/svx/sdrobjectfilter.hxx
new file mode 100644
index 000000000000..55eda09c99af
--- /dev/null
+++ b/svx/inc/svx/sdrobjectfilter.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+************************************************************************/
+
+#ifndef SDROBJECTFILTER_HXX
+#define SDROBJECTFILTER_HXX
+
+#include "svx/svxdllapi.h"
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+class SdrObject;
+
+//........................................................................
+namespace svx
+{
+//........................................................................
+
+ //====================================================================
+ //= SdrObjectFilter
+ //====================================================================
+ /** specifies a boolean predicate on the set of all SdrObjects - vulgo a filter.
+ */
+ class SVX_DLLPUBLIC SAL_NO_VTABLE ISdrObjectFilter
+ {
+ public:
+ virtual bool includeObject( const SdrObject& i_rObject ) const = 0;
+
+ virtual ~ISdrObjectFilter() = 0;
+ };
+
+//........................................................................
+} // namespace svx
+//........................................................................
+
+#endif // SDROBJECTFILTER_HXX
diff --git a/svx/inc/svx/svddef.hxx b/svx/inc/svx/svddef.hxx
index a758e9c1dba7..a9e5d175680c 100644
--- a/svx/inc/svx/svddef.hxx
+++ b/svx/inc/svx/svddef.hxx
@@ -203,7 +203,8 @@
#define SDRATTR_TRANSFORMREF2X (SDRATTR_NOTPERSIST_FIRST+32) /* 1212 long, def=0 */
#define SDRATTR_TRANSFORMREF2Y (SDRATTR_NOTPERSIST_FIRST+33) /* 1213 long, def=0 */
#define SDRATTR_TEXTDIRECTION (SDRATTR_NOTPERSIST_FIRST+34) /* 1214 V4+++ long, def=0 */
-#define SDRATTR_NOTPERSIST_LAST (SDRATTR_TEXTDIRECTION) /* 1228 V4+++*/ /* 1213*/ /* 1085 */ /* 1040 */ /* 1123 */ /* Pool V1: 1065 */
+#define SDRATTR_OBJVISIBLE (SDRATTR_NOTPERSIST_FIRST+35)
+#define SDRATTR_NOTPERSIST_LAST (SDRATTR_OBJVISIBLE) /* 1228 V4+++*/ /* 1213*/ /* 1085 */ /* 1040 */ /* 1123 */ /* Pool V1: 1065 */
// kein SetItem hierfuer
#define SDRATTR_GRAF_FIRST (SDRATTR_NOTPERSIST_LAST+1) /* 1229 V4+++*/
diff --git a/svx/inc/svx/svdhdl.hxx b/svx/inc/svx/svdhdl.hxx
index d4b4d5d3369e..f96b650d2be4 100644
--- a/svx/inc/svx/svdhdl.hxx
+++ b/svx/inc/svx/svdhdl.hxx
@@ -55,6 +55,7 @@ class SdrHdlList;
class SdrMarkView;
class SdrObject;
class SdrPageView;
+class MouseEvent;
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -184,6 +185,9 @@ protected:
// cleanup marker if one exists
void GetRidOfIAObject();
+private:
+ bool mbMouseOver; // is true if the mouse is over this handle
+
protected:
::sdr::overlay::OverlayObject* CreateOverlayObject(
const basegfx::B2DPoint& rPos,
@@ -241,6 +245,16 @@ public:
virtual BOOL IsFocusHdl() const;
void SetMoveOutside( bool bMoveOutside );
+
+ /** is called when the mouse enters the area of this handle. If the handle changes his
+ visualisation during mouse over it must override this method and call Touch(). */
+ virtual void onMouseEnter(const MouseEvent& rMEvt);
+
+ /** is called when the mouse leaves the area of this handle. If the handle changes his
+ visualisation during mouse over it must override this method and call Touch(). */
+ virtual void onMouseLeave();
+
+ bool isMouseOver() const;
};
////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/svx/inc/svx/svdmrkv.hxx b/svx/inc/svx/svdmrkv.hxx
index eecbc1f2c4f3..fc136b8e5a3c 100644
--- a/svx/inc/svx/svdmrkv.hxx
+++ b/svx/inc/svx/svdmrkv.hxx
@@ -169,6 +169,7 @@ protected:
virtual void SetMarkRects(); // Rects an den PageViews
virtual void CheckMarked(); // MarkList nach Del und Lock Layer durchsuchen...
virtual void AddDragModeHdl(SdrDragMode eMode);
+ virtual BOOL MouseMove(const MouseEvent& rMEvt, Window* pWin);
// add custom handles (used by other apps, e.g. AnchorPos)
virtual void AddCustomHdl();
diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx
index 7acc69ab5b9f..40cc992e96d9 100644
--- a/svx/inc/svx/svdobj.hxx
+++ b/svx/inc/svx/svdobj.hxx
@@ -283,6 +283,7 @@ public:
BOOL bSizProt;
BOOL bNoPrint;
BOOL bClosedObj;
+ bool mbVisible;
SdrLayerID mnLayerID;
public:
@@ -469,10 +470,10 @@ protected:
unsigned bGrouped : 1; // Member eines GroupObjektes?
// Die folgende Flags werden gestreamt
- unsigned bMovProt : 1; // Position geschuetzt
- unsigned bSizProt : 1; // Groesse geschuetzt
- unsigned bNoPrint : 1; // Nicht drucken
-
+ unsigned bMovProt : 1; // If true, the position is protected
+ unsigned bSizProt : 1; // If true, the size is protected
+ unsigned bNoPrint : 1; // If true, the object is not printed.
+ unsigned mbVisible : 1; // If false, the object is not visible on screen (but maybe on printer, depending on bNoprint
// Wenn bEmptyPresObj TRUE ist, handelt es sich um ein
// Praesentationsobjekt, dem noch kein Inhalt zugewiesen
// wurde. Default ist das Flag auf FALSE. Die Verwaltung
@@ -810,6 +811,14 @@ public:
virtual void SetLogicRect(const Rectangle& rRect);
virtual void NbcSetLogicRect(const Rectangle& rRect);
+ /** the defaul is to set the logic rect to the given rectangle rMaxRect. If the shape
+ has an intrinsic aspect ratio it may set the logic rect so the aspect
+ ratio is kept but still inside the rectangle rMaxRect.
+
+ If bShrinkOnly is set to true, the size of the current logic rect will not
+ be changed if it is smaller than the given rectangle rMaxRect. */
+ virtual void AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false );
+
// Drehwinkel und Shear
virtual long GetRotateAngle() const;
virtual long GetShearAngle(FASTBOOL bVertical=FALSE) const;
@@ -1012,6 +1021,8 @@ public:
sal_Bool IsResizeProtect() const { return bSizProt; }
void SetPrintable(sal_Bool bPrn);
sal_Bool IsPrintable() const { return !bNoPrint; }
+ void SetVisible(sal_Bool bVisible);
+ sal_Bool IsVisible() const { return mbVisible; }
void SetEmptyPresObj(sal_Bool bEpt) { bEmptyPresObj=bEpt; }
sal_Bool IsEmptyPresObj() const { return bEmptyPresObj; }
void SetNotVisibleAsMaster(sal_Bool bFlg) { bNotVisibleAsMaster=bFlg; }
diff --git a/svx/inc/svx/svdograf.hxx b/svx/inc/svx/svdograf.hxx
index 89e2d35c9220..23d9204ca891 100644
--- a/svx/inc/svx/svdograf.hxx
+++ b/svx/inc/svx/svdograf.hxx
@@ -202,7 +202,7 @@ public:
virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const;
- void AdjustToMaxRect( const Rectangle& rMaxRect, BOOL bShrinkOnly );
+ virtual void AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
diff --git a/svx/inc/svx/svdomedia.hxx b/svx/inc/svx/svdomedia.hxx
index b572bb989451..5b0980d8bb30 100644
--- a/svx/inc/svx/svdomedia.hxx
+++ b/svx/inc/svx/svdomedia.hxx
@@ -63,6 +63,8 @@ public:
virtual void operator=(const SdrObject& rObj);
+ virtual void AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false );
+
public:
void setURL( const ::rtl::OUString& rURL );
diff --git a/svx/inc/svx/svdotable.hxx b/svx/inc/svx/svdotable.hxx
index a40b33c3ad18..02044f0dbc25 100644
--- a/svx/inc/svx/svdotable.hxx
+++ b/svx/inc/svx/svdotable.hxx
@@ -234,6 +234,7 @@ public:
virtual const Rectangle& GetLogicRect() const;
virtual void NbcSetLogicRect(const Rectangle& rRect);
+ virtual void AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false );
virtual sal_uInt32 GetSnapPointCount() const;
virtual Point GetSnapPoint(sal_uInt32 i) const;
diff --git a/svx/inc/svx/svdpage.hxx b/svx/inc/svx/svdpage.hxx
index 29cf17ec9180..c601fddef181 100644
--- a/svx/inc/svx/svdpage.hxx
+++ b/svx/inc/svx/svdpage.hxx
@@ -376,7 +376,6 @@ private:
public:
// construct/destruct
SdrPageProperties(SdrPage& rSdrPage);
- SdrPageProperties(const SdrPageProperties& rCandidate);
virtual ~SdrPageProperties();
// Notify(...) from baseclass SfxListener
diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc
index b53b5f6dac26..7a90b5c75526 100644
--- a/svx/inc/svx/svxids.hrc
+++ b/svx/inc/svx/svxids.hrc
@@ -383,6 +383,7 @@
#define FN_INSERT_HARD_SPACE (FN_INSERT + 44) /* hard space */
#define FN_INSERT_HARDHYPHEN (FN_INSERT + 85) /* hyphen withou break*/
+//!! be aware to not overwrite something that is used in sw/inc/cmdid.h already !!
#define FN_FORMAT (SID_SW_START + 400)
#define FN_SET_JUSTIFY_PARA (FN_FORMAT + 21)
#define FN_FORMAT_RESET (FN_FORMAT + 69)
@@ -706,6 +707,7 @@
#define SID_ATTR_TEXT_FITTOSIZE ( SID_SVX_START + 367 )
#define SID_ATTR_BRUSH_ROW ( SID_SVX_START + 368 )
#define SID_OPTFILTER_MSOFFICE ( SID_SVX_START + 369 )
+//#define SID_TASKPANE ( SID_SVX_START + 370 ) -> sfxsids.hrc
#define SID_IMAP ( SID_SVX_START + 371 )
#define SID_IMAP_DLG ( SID_SVX_START + 372 )
#define SID_IMAP_SELECT ( SID_SVX_START + 373 )
@@ -1026,7 +1028,7 @@
#define SID_DSBROWSER_EXPLORER ( SID_SVX_START + 764 )
#define SID_FM_CREATE_FIELDCONTROL ( SID_SVX_START + 765 )
#define SID_FM_DATACCESS_DESCRIPTOR ( SID_SVX_START + 766 )
-#define SID_FM_GRABCONTROLFOCUS ( SID_SVX_START + 767 )
+#define SID_FM_TOGGLECONTROLFOCUS ( SID_SVX_START + 767 )
#define SID_FM_SCROLLBAR ( SID_SVX_START + 768 )
#define SID_FM_SPINBUTTON ( SID_SVX_START + 769 )
#define SID_FM_CONVERTTO_SCROLLBAR ( SID_SVX_START + 770 )
@@ -1238,6 +1240,7 @@
#define SID_TABLE_STYLE_SETTINGS (SID_SVX_START+1089)
#define SID_CHAR_DLG_PREVIEW_STRING (SID_SVX_START+1090)
#define SID_RECHECK_DOCUMENT (SID_SVX_START+1091)
+
#define SID_OBJECT_MIRROR (SID_SVX_START+1093)
#define SID_DELETE_POSTIT (SID_SVX_START+1094)
@@ -1249,8 +1252,12 @@
#define SID_DELETEALLBYAUTHOR_POSTIT (SID_SVX_START+1100)
#define SID_INSERT_POSTIT (SID_SVX_START+1101)
+#define SID_TRANSLITERATE_SENTENCE_CASE (SID_SVX_START+1102)
+#define SID_TRANSLITERATE_TITLE_CASE (SID_SVX_START+1103)
+#define SID_TRANSLITERATE_TOGGLE_CASE (SID_SVX_START+1104)
+
// IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
-#define SID_SVX_FIRSTFREE SID_INSERT_POSTIT + 1
+#define SID_SVX_FIRSTFREE (SID_TRANSLITERATE_TOGGLE_CASE + 1)
// --------------------------------------------------------------------------
// Overflow check for slot IDs
diff --git a/svx/inc/svx/sxopitm.hxx b/svx/inc/svx/sxopitm.hxx
index 947660e71cc0..dd402c3a0915 100644
--- a/svx/inc/svx/sxopitm.hxx
+++ b/svx/inc/svx/sxopitm.hxx
@@ -39,4 +39,10 @@ public:
SdrObjPrintableItem(SvStream& rIn): SdrYesNoItem(SDRATTR_OBJPRINTABLE,rIn) {}
};
+class SdrObjVisibleItem: public SdrYesNoItem {
+public:
+ SdrObjVisibleItem(bool bOn=true): SdrYesNoItem(SDRATTR_OBJVISIBLE,bOn) {}
+ SdrObjVisibleItem(SvStream& rIn): SdrYesNoItem(SDRATTR_OBJVISIBLE,rIn) {}
+};
+
#endif
diff --git a/svx/inc/svx/unoshprp.hxx b/svx/inc/svx/unoshprp.hxx
index 27196079db07..fcf86488f7a3 100755..100644
--- a/svx/inc/svx/unoshprp.hxx
+++ b/svx/inc/svx/unoshprp.hxx
@@ -325,6 +325,7 @@
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT , &::getBooleanCppuType(), 0, 0}, \
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_NAME), SDRATTR_OBJECTNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0}, \
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_PRINTABLE), SDRATTR_OBJPRINTABLE , &::getBooleanCppuType(), 0, 0}, \
+ { MAP_CHAR_LEN("Visible"), SDRATTR_OBJVISIBLE , &::getBooleanCppuType(), 0, 0}, \
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT , &::getBooleanCppuType(), 0, 0},\
{ MAP_CHAR_LEN("UINameSingular"), OWN_ATTR_UINAME_SINGULAR , &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \
{ MAP_CHAR_LEN("UINamePlural"), OWN_ATTR_UINAME_PLURAL , &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \
diff --git a/svx/inc/tbunocontroller.hxx b/svx/inc/tbunocontroller.hxx
index fa7329a525e1..266dc917f33e 100644
--- a/svx/inc/tbunocontroller.hxx
+++ b/svx/inc/tbunocontroller.hxx
@@ -75,6 +75,7 @@ class FontHeightToolBoxControl : public svt::ToolboxController,
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException);
void dispatchCommand( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs );
+ using svt::ToolboxController::dispatchCommand;
private:
SvxFontSizeBox_Impl* m_pBox;
diff --git a/svx/inc/tbunosearchcontrollers.hxx b/svx/inc/tbunosearchcontrollers.hxx
new file mode 100644
index 000000000000..aec07042e1fc
--- /dev/null
+++ b/svx/inc/tbunosearchcontrollers.hxx
@@ -0,0 +1,282 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __TBUNOSEARCHCONTROLLERS_HXX_
+#define __TBUNOSEARCHCONTROLLERS_HXX_
+
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/frame/DispatchDescriptor.hpp>
+#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/frame/XDispatchHelper.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XStatusListener.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+
+#include <comphelper/sequenceasvector.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/weak.hxx>
+#include <svtools/toolboxcontroller.hxx>
+#include <vcl/combobox.hxx>
+#include <vcl/window.hxx>
+
+#include <map>
+
+namespace css = ::com::sun::star ;
+namespace svx
+{
+
+class FindTextFieldControl : public ComboBox
+{
+public:
+ FindTextFieldControl( Window* pParent, WinBits nStyle,
+ css::uno::Reference< css::frame::XFrame >& xFrame,
+ css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager );
+ virtual ~FindTextFieldControl();
+
+ virtual void Modify();
+ virtual long PreNotify( NotifyEvent& rNEvt );
+
+ void InitControls_Impl();
+ void Remember_Impl(const String& rStr);
+
+private:
+
+ css::uno::Reference< css::frame::XFrame > m_xFrame;
+ css::uno::Reference< css::lang::XMultiServiceFactory > m_xServiceManager;
+ sal_Bool m_bToClearTextField;
+
+};
+
+class SearchToolbarControllersManager
+{
+public:
+
+ SearchToolbarControllersManager();
+ ~SearchToolbarControllersManager();
+
+ static SearchToolbarControllersManager* createControllersManager();
+
+ void registryController( const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Reference< css::frame::XStatusListener >& xStatusListener, const ::rtl::OUString& sCommandURL );
+ void freeController ( const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Reference< css::frame::XStatusListener >& xStatusListener, const ::rtl::OUString& sCommandURL );
+ css::uno::Reference< css::frame::XStatusListener > findController( const css::uno::Reference< css::frame::XFrame >& xFrame, const ::rtl::OUString& sCommandURL );
+
+private:
+
+ static SearchToolbarControllersManager* m_pInstance;
+
+ typedef ::comphelper::SequenceAsVector< css::beans::PropertyValue > SearchToolbarControllersVec;
+ typedef ::std::map< css::uno::Reference< css::frame::XFrame >, SearchToolbarControllersVec > SearchToolbarControllersMap;
+ SearchToolbarControllersMap aSearchToolbarControllersMap;
+
+};
+
+class FindTextToolbarController : public svt::ToolboxController,
+ public css::lang::XServiceInfo
+{
+public:
+
+ FindTextToolbarController( const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager );
+ ~FindTextToolbarController();
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException );
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException );
+
+ static ::rtl::OUString getImplementationName_Static() throw()
+ {
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svx.FindTextToolboxController" ));
+ }
+
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw();
+
+ // XComponent
+ virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException );
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException );
+
+ // XToolbarController
+ virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw ( css::uno::RuntimeException);
+ virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createItemWindow( const css::uno::Reference< css::awt::XWindow >& Parent ) throw ( css::uno::RuntimeException );
+
+ // XStatusListener
+ virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException );
+
+ DECL_LINK(EditModifyHdl, void*);
+
+private:
+
+ FindTextFieldControl* m_pFindTextFieldControl;
+
+ USHORT m_nDownSearchId; // item position of findbar
+ USHORT m_nUpSearchId; // item position of findbar
+
+};
+
+class DownSearchToolboxController : public svt::ToolboxController,
+ public css::lang::XServiceInfo
+{
+public:
+
+ DownSearchToolboxController( const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager );
+ ~DownSearchToolboxController();
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException );
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException );
+
+ static ::rtl::OUString getImplementationName_Static() throw()
+ {
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svx.DownSearchToolboxController" ));
+ }
+
+ static css::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw();
+
+ // XComponent
+ virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException );
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException );
+
+ // XToolbarController
+ virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw ( css::uno::RuntimeException);
+
+ // XStatusListener
+ virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException );
+
+};
+
+class UpSearchToolboxController : public svt::ToolboxController,
+ public css::lang::XServiceInfo
+{
+public:
+
+ UpSearchToolboxController( const css::uno::Reference< css::lang::XMultiServiceFactory >& rServiceManager );
+ ~UpSearchToolboxController();
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException );
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException );
+
+ static ::rtl::OUString getImplementationName_Static() throw()
+ {
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svx.UpSearchToolboxController" ));
+ }
+
+ static css::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw();
+
+ // XComponent
+ virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException );
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException);
+
+ // XToolbarController
+ virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw ( css::uno::RuntimeException );
+
+ // XStatusListener
+ virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException );
+
+};
+
+// protocol handler for "vnd.sun.star.findbar:*" URLs
+// The dispatch object will be used for shortcut commands for findbar
+class FindbarDispatcher : public css::lang::XServiceInfo,
+ public css::lang::XInitialization,
+ public css::frame::XDispatchProvider,
+ public css::frame::XDispatch,
+ public ::cppu::OWeakObject
+{
+public:
+
+ FindbarDispatcher( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory );
+ virtual ~FindbarDispatcher();
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException );
+ virtual void SAL_CALL acquire() throw();
+ virtual void SAL_CALL release() throw();
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException );
+
+ static ::rtl::OUString getImplementationName_Static() throw()
+ {
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.Impl.FindbarDispatcher" ));
+ }
+
+ static css::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw();
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException );
+
+ // XDispatchProvider
+ virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( const css::util::URL& aURL, const ::rtl::OUString& sTargetFrameName , sal_Int32 nSearchFlags ) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches( const css::uno::Sequence< css::frame::DispatchDescriptor >& lDescriptions ) throw( css::uno::RuntimeException );
+
+ // XDispatch
+ virtual void SAL_CALL dispatch( const css::util::URL& aURL, const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL addStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xListener, const css::util::URL& aURL ) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xListener, const css::util::URL& aURL ) throw( css::uno::RuntimeException );
+
+private:
+
+ css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory;
+ css::uno::Reference< css::frame::XFrame > m_xFrame;
+
+};
+
+// createInstance
+css::uno::Reference< css::uno::XInterface > SAL_CALL FindTextToolbarController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
+css::uno::Reference< css::uno::XInterface > SAL_CALL DownSearchToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
+css::uno::Reference< css::uno::XInterface > SAL_CALL UpSearchToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
+css::uno::Reference< css::uno::XInterface > SAL_CALL FindbarDispatcher_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
+
+}
+
+#endif // __TBUNOSEARCHCONTROLLERS_HXX_
diff --git a/svx/prj/build.lst b/svx/prj/build.lst
index 7fe1114e7e66..9f7597488644 100644
--- a/svx/prj/build.lst
+++ b/svx/prj/build.lst
@@ -30,9 +30,10 @@ sx svx\source\unodraw nmake - all sx_undrw sx_inc NULL
sx svx\source\unogallery nmake - all sx_ungal sx_inc NULL
sx svx\source\gallery2 nmake - all sx_gall sx_inc NULL
sx svx\source\xml nmake - all sx_xml sx_inc NULL
+sx svx\source\core nmake - all sx_core sx_inc NULL
sx svx\source\accessibility nmake - all sx_accessibility sx_inc NULL
sx svx\source\customshapes nmake - all sx_customshapes sx_inc NULL
sx svx\source\toolbars nmake - all sx_toolbars sx_inc NULL
-sx svx\util nmake - all sx_util sx_3deng sx_dlg sx_draw sx_attribute sx_properties sx_contact sx_event sx_animation sx_primitive2d sx_primitive3d sx_overlay sx_fmcmp sx_form sx_gall sx_items sx_mnuc sx_sdi sx_stbc sx_tbxc sx_undrw sx_ungal sx_xml sx_xout sx_accessibility sx_intro sx_customshapes sx_toolbars sx_table sx_smarttags NULL
+sx svx\util nmake - all sx_util sx_3deng sx_dlg sx_draw sx_attribute sx_properties sx_contact sx_event sx_animation sx_primitive2d sx_primitive3d sx_overlay sx_fmcmp sx_form sx_gall sx_items sx_mnuc sx_sdi sx_stbc sx_tbxc sx_undrw sx_ungal sx_xml sx_core sx_xout sx_accessibility sx_intro sx_customshapes sx_toolbars sx_table sx_smarttags NULL
sx svx\source\gengal nmake - all sx_gengal sx_util NULL
sx svx\qa\unoapi nmake - all sx_qa_unoapi NULL
diff --git a/svx/prj/d.lst b/svx/prj/d.lst
index 7d2f508d9d21..2403c04c43a0 100644
--- a/svx/prj/d.lst
+++ b/svx/prj/d.lst
@@ -2,9 +2,6 @@ mkdir: %COMMON_DEST%\bin%_EXT%\hid
mkdir: %COMMON_DEST%\res%_EXT%
mkdir: %_DEST%\xml%_EXT%\uiconfig
mkdir: %_DEST%\xml%_EXT%\uiconfig\global
-mkdir: %_DEST%\xml%_EXT%\uiconfig\global\accelerator
-mkdir: %_DEST%\xml%_EXT%\uiconfig\global\accelerator\en-US
-mkdir: %_DEST%\xml%_EXT%\uiconfig\global\accelerator\es
..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid
..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.*
@@ -35,7 +32,6 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\%__SRC%\inc\svxslots.hxx %_DEST%\inc%_EXT%\svx\svxslots.hxx
..\%__SRC%\inc\globlmn.hrc %_DEST%\inc%_EXT%\svx\globlmn.hrc
..\source\inc\fmresids.hrc %_DEST%\inc%_EXT%\svx\fmresids.hrc
-..\source\items\boxobj.hxx %_DEST%\inc%_EXT%\svx\boxobj.hxx
..\source\dialog\hyprlink.hxx %_DEST%\inc%_EXT%\svx\hyprlink.hxx
../source/customshapes/EnhancedCustomShapeTypeNames.hxx %_DEST%\inc%_EXT%\svx\EnhancedCustomShapeTypeNames.hxx
@@ -46,20 +42,12 @@ mkdir: %_DEST%\inc%_EXT%\svx
../inc/svdglob.hxx %_DEST%\inc%_EXT%\svx\svdglob.hxx
../source/svdraw/svditext.hxx %_DEST%\inc%_EXT%\svx\svditext.hxx
-..\inc\AccessibleSelectionBase.hxx %_DEST%\inc%_EXT%\svx\AccessibleSelectionBase.hxx
-..\inc\AccessibleStaticTextBase.hxx %_DEST%\inc%_EXT%\svx\AccessibleStaticTextBase.hxx
-..\inc\acorrcfg.hxx %_DEST%\inc%_EXT%\svx\acorrcfg.hxx
..\inc\ActionDescriptionProvider.hxx %_DEST%\inc%_EXT%\svx\ActionDescriptionProvider.hxx
..\inc\anchorid.hxx %_DEST%\inc%_EXT%\svx\anchorid.hxx
-..\inc\asiancfg.hxx %_DEST%\inc%_EXT%\svx\asiancfg.hxx
-..\inc\bolnitem.hxx %_DEST%\inc%_EXT%\svx\bolnitem.hxx
-..\inc\bulitem.hxx %_DEST%\inc%_EXT%\svx\bulitem.hxx
-..\inc\charhiddenitem.hxx %_DEST%\inc%_EXT%\svx\charhiddenitem.hxx
..\inc\chrtitem.hxx %_DEST%\inc%_EXT%\svx\chrtitem.hxx
..\inc\clipboardctl.hxx %_DEST%\inc%_EXT%\svx\clipboardctl.hxx
..\inc\clipfmtitem.hxx %_DEST%\inc%_EXT%\svx\clipfmtitem.hxx
..\inc\connctrl.hxx %_DEST%\inc%_EXT%\svx\connctrl.hxx
-..\inc\countryid.hxx %_DEST%\inc%_EXT%\svx\countryid.hxx
..\inc\databaseregistrationui.hxx %_DEST%\inc%_EXT%\svx\databaseregistrationui.hxx
..\inc\dbexch.hrc %_DEST%\inc%_EXT%\svx\dbexch.hrc
..\inc\DescriptionGenerator.hxx %_DEST%\inc%_EXT%\svx\DescriptionGenerator.hxx
@@ -69,52 +57,38 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\editstat.hxx %_DEST%\inc%_EXT%\svx\editstat.hxx
..\inc\editund2.hxx %_DEST%\inc%_EXT%\svx\editund2.hxx
..\inc\eerdll.hxx %_DEST%\inc%_EXT%\svx\editdll.hxx
-..\inc\extrusioncontrols.hxx %_DEST%\inc%_EXT%\svx\extrusioncontrols.hxx
..\inc\flstitem.hxx %_DEST%\inc%_EXT%\svx\flstitem.hxx
+..\inc\extrusioncontrols.hxx %_DEST%\inc%_EXT%\svx\extrusioncontrols.hxx
..\inc\fmgridif.hxx %_DEST%\inc%_EXT%\svx\fmgridif.hxx
..\inc\fmobjfac.hxx %_DEST%\inc%_EXT%\svx\fmobjfac.hxx
-..\inc\fontitem.hxx %_DEST%\inc%_EXT%\svx\fontitem.hxx
..\inc\fontlb.hxx %_DEST%\inc%_EXT%\svx\fontlb.hxx
..\inc\fontworkgallery.hxx %_DEST%\inc%_EXT%\svx\fontworkgallery.hxx
-..\inc\forbiddencharacterstable.hxx %_DEST%\inc%_EXT%\svx\forbiddencharacterstable.hxx
..\inc\formatpaintbrushctrl.hxx %_DEST%\inc%_EXT%\svx\formatpaintbrushctrl.hxx
-..\inc\fwdtitem.hxx %_DEST%\inc%_EXT%\svx\fwdtitem.hxx
..\inc\gallery.hxx %_DEST%\inc%_EXT%\svx\gallery.hxx
..\inc\galbrws.hxx %_DEST%\inc%_EXT%\svx\galbrws.hxx
..\inc\globlac.hrc %_DEST%\inc%_EXT%\svx\globlac.hrc
..\inc\globl3d.hxx %_DEST%\inc%_EXT%\svx\globl3d.hxx
..\inc\grafctrl.hxx %_DEST%\inc%_EXT%\svx\grafctrl.hxx
..\inc\hlnkitem.hxx %_DEST%\inc%_EXT%\svx\hlnkitem.hxx
-..\inc\htmlcfg.hxx %_DEST%\inc%_EXT%\svx\htmlcfg.hxx
..\inc\htmlmode.hxx %_DEST%\inc%_EXT%\svx\htmlmode.hxx
..\inc\hyperdlg.hxx %_DEST%\inc%_EXT%\svx\hyperdlg.hxx
..\inc\imapdlg.hxx %_DEST%\inc%_EXT%\svx\imapdlg.hxx
-..\inc\opengrf.hxx %_DEST%\inc%_EXT%\svx\opengrf.hxx
..\inc\insctrl.hxx %_DEST%\inc%_EXT%\svx\insctrl.hxx
..\inc\layctrl.hxx %_DEST%\inc%_EXT%\svx\layctrl.hxx
..\inc\lboxctrl.hxx %_DEST%\inc%_EXT%\svx\lboxctrl.hxx
..\inc\linectrl.hxx %_DEST%\inc%_EXT%\svx\linectrl.hxx
-..\inc\linkmgr.hxx %_DEST%\inc%_EXT%\svx\linkmgr.hxx
..\inc\measctrl.hxx %_DEST%\inc%_EXT%\svx\measctrl.hxx
..\inc\modctrl.hxx %_DEST%\inc%_EXT%\svx\modctrl.hxx
-..\inc\mscodec.hxx %_DEST%\inc%_EXT%\svx\mscodec.hxx
-..\inc\msoleexp.hxx %_DEST%\inc%_EXT%\svx\msoleexp.hxx
-..\inc\nlbkitem.hxx %_DEST%\inc%_EXT%\svx\nlbkitem.hxx
..\inc\numvset.hxx %_DEST%\inc%_EXT%\svx\numvset.hxx
..\inc\objfac3d.hxx %_DEST%\inc%_EXT%\svx\objfac3d.hxx
..\inc\ofaitem.hxx %_DEST%\inc%_EXT%\svx\ofaitem.hxx
-..\inc\opaqitem.hxx %_DEST%\inc%_EXT%\svx\opaqitem.hxx
..\inc\optgenrl.hxx %_DEST%\inc%_EXT%\svx\optgenrl.hxx
..\inc\optgrid.hxx %_DEST%\inc%_EXT%\svx\optgrid.hxx
-..\inc\optitems.hxx %_DEST%\inc%_EXT%\svx\optitems.hxx
..\inc\orienthelper.hxx %_DEST%\inc%_EXT%\svx\orienthelper.hxx
..\inc\ParseContext.hxx %_DEST%\inc%_EXT%\svx\ParseContext.hxx
..\inc\passwd.hxx %_DEST%\inc%_EXT%\svx\passwd.hxx
..\inc\pfiledlg.hxx %_DEST%\inc%_EXT%\svx\pfiledlg.hxx
-..\inc\pgrditem.hxx %_DEST%\inc%_EXT%\svx\pgrditem.hxx
..\inc\postattr.hxx %_DEST%\inc%_EXT%\svx\postattr.hxx
-..\inc\prntitem.hxx %_DEST%\inc%_EXT%\svx\prntitem.hxx
-..\inc\protitem.hxx %_DEST%\inc%_EXT%\svx\protitem.hxx
..\inc\prtqry.hxx %_DEST%\inc%_EXT%\svx\prtqry.hxx
..\inc\pszctrl.hxx %_DEST%\inc%_EXT%\svx\pszctrl.hxx
..\inc\relfld.hxx %_DEST%\inc%_EXT%\svx\relfld.hxx
@@ -123,7 +97,6 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\rulritem.hxx %_DEST%\inc%_EXT%\svx\rulritem.hxx
..\inc\sdrpaintwindow.hxx %_DEST%\inc%_EXT%\svx\sdrpaintwindow.hxx
..\inc\selctrl.hxx %_DEST%\inc%_EXT%\svx\selctrl.hxx
-..\inc\srchcfg.hxx %_DEST%\inc%_EXT%\svx\srchcfg.hxx
..\inc\srchdlg.hxx %_DEST%\inc%_EXT%\svx\srchdlg.hxx
..\inc\srchitem.hxx %_DEST%\inc%_EXT%\svx\srchitem.hxx
..\inc\svditer.hxx %_DEST%\inc%_EXT%\svx\svditer.hxx
@@ -132,8 +105,6 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\svimbase.hxx %_DEST%\inc%_EXT%\svx\svimbase.hxx
..\inc\svxerr.hxx %_DEST%\inc%_EXT%\svx\svxerr.hxx
..\inc\svxgrahicitem.hxx %_DEST%\inc%_EXT%\svx\svxgrahicitem.hxx
-..\inc\svxmsbas.hxx %_DEST%\inc%_EXT%\svx\svxmsbas.hxx
-..\inc\svxrtf.hxx %_DEST%\inc%_EXT%\svx\svxrtf.hxx
..\inc\swframeposstrings.hxx %_DEST%\inc%_EXT%\svx\swframeposstrings.hxx
..\inc\swframevalidation.hxx %_DEST%\inc%_EXT%\svx\swframevalidation.hxx
..\inc\swframeexample.hxx %_DEST%\inc%_EXT%\svx\swframeexample.hxx
@@ -144,22 +115,15 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\tbxdraw.hxx %_DEST%\inc%_EXT%\svx\tbxdraw.hxx
..\inc\txencbox.hxx %_DEST%\inc%_EXT%\svx\txencbox.hxx
..\inc\txenctab.hxx %_DEST%\inc%_EXT%\svx\txenctab.hxx
-..\inc\txtrange.hxx %_DEST%\inc%_EXT%\svx\txtrange.hxx
..\inc\unoapi.hxx %_DEST%\inc%_EXT%\svx\unoapi.hxx
-..\inc\unoedhlp.hxx %_DEST%\inc%_EXT%\svx\unoedhlp.hxx
-..\inc\unofdesc.hxx %_DEST%\inc%_EXT%\svx\unofdesc.hxx
..\inc\unofill.hxx %_DEST%\inc%_EXT%\svx\unofill.hxx
-..\inc\UnoForbiddenCharsTable.hxx %_DEST%\inc%_EXT%\svx\UnoForbiddenCharsTable.hxx
-..\inc\unolingu.hxx %_DEST%\inc%_EXT%\svx\unolingu.hxx
..\inc\unomaster.hxx %_DEST%\inc%_EXT%\svx\unomaster.hxx
..\inc\UnoNamespaceMap.hxx %_DEST%\inc%_EXT%\svx\UnoNamespaceMap.hxx
-..\inc\unonrule.hxx %_DEST%\inc%_EXT%\svx\unonrule.hxx
..\inc\unopool.hxx %_DEST%\inc%_EXT%\svx\unopool.hxx
..\inc\unoshcol.hxx %_DEST%\inc%_EXT%\svx\unoshcol.hxx
..\inc\verttexttbxctrl.hxx %_DEST%\inc%_EXT%\svx\verttexttbxctrl.hxx
..\inc\wrapfield.hxx %_DEST%\inc%_EXT%\svx\wrapfield.hxx
..\inc\xexch.hxx %_DEST%\inc%_EXT%\svx\xexch.hxx
-..\inc\xmlcnitm.hxx %_DEST%\inc%_EXT%\svx\xmlcnitm.hxx
..\inc\xmleohlp.hxx %_DEST%\inc%_EXT%\svx\xmleohlp.hxx
..\inc\xmlexchg.hxx %_DEST%\inc%_EXT%\svx\xmlexchg.hxx
..\inc\xmlgrhlp.hxx %_DEST%\inc%_EXT%\svx\xmlgrhlp.hxx
@@ -170,38 +134,24 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\zoomctrl.hxx %_DEST%\inc%_EXT%\svx\zoomctrl.hxx
..\inc\svx\xlinjoit.hxx %_DEST%\inc%_EXT%\svx\xlinjoit.hxx
-..\inc\svx\impgrf.hxx %_DEST%\inc%_EXT%\svx\impgrf.hxx
..\inc\svx\dstribut_enum.hxx %_DEST%\inc%_EXT%\svx\dstribut_enum.hxx
..\inc\svx\svdfield.hxx %_DEST%\inc%_EXT%\svx\svdfield.hxx
..\inc\svx\svxitems.hrc %_DEST%\inc%_EXT%\svx\svxitems.hrc
..\inc\svx\svddef.hxx %_DEST%\inc%_EXT%\svx\svddef.hxx
-..\inc\svx\svdfppt.hxx %_DEST%\inc%_EXT%\svx\svdfppt.hxx
..\inc\svx\ipolypolygoneditorcontroller.hxx %_DEST%\inc%_EXT%\svx\ipolypolygoneditorcontroller.hxx
..\inc\svx\polypolygoneditor.hxx %_DEST%\inc%_EXT%\svx\polypolygoneditor.hxx
..\inc\svx\svdsob.hxx %_DEST%\inc%_EXT%\svx\svdsob.hxx
..\inc\svx\svdlayer.hxx %_DEST%\inc%_EXT%\svx\svdlayer.hxx
-..\inc\svx\adjitem.hxx %_DEST%\inc%_EXT%\svx\adjitem.hxx
-..\inc\svx\akrnitem.hxx %_DEST%\inc%_EXT%\svx\akrnitem.hxx
..\inc\svx\algitem.hxx %_DEST%\inc%_EXT%\svx\algitem.hxx
..\inc\svx\simptabl.hxx %_DEST%\inc%_EXT%\svx\simptabl.hxx
..\inc\svx\ctredlin.hxx %_DEST%\inc%_EXT%\svx\ctredlin.hxx
-..\inc\svx\blnkitem.hxx %_DEST%\inc%_EXT%\svx\blnkitem.hxx
..\inc\svx\bmpmask.hxx %_DEST%\inc%_EXT%\svx\bmpmask.hxx
-..\inc\svx\borderline.hxx %_DEST%\inc%_EXT%\svx\borderline.hxx
-..\inc\svx\boxitem.hxx %_DEST%\inc%_EXT%\svx\boxitem.hxx
-..\inc\svx\brkitem.hxx %_DEST%\inc%_EXT%\svx\brkitem.hxx
-..\inc\svx\brshitem.hxx %_DEST%\inc%_EXT%\svx\brshitem.hxx
..\inc\svx\camera3d.hxx %_DEST%\inc%_EXT%\svx\camera3d.hxx
..\inc\svx\charmap.hxx %_DEST%\inc%_EXT%\svx\charmap.hxx
..\inc\svx\checklbx.hxx %_DEST%\inc%_EXT%\svx\checklbx.hxx
-..\inc\svx\cmapitem.hxx %_DEST%\inc%_EXT%\svx\cmapitem.hxx
-..\inc\svx\cntritem.hxx %_DEST%\inc%_EXT%\svx\cntritem.hxx
-..\inc\svx\colritem.hxx %_DEST%\inc%_EXT%\svx\colritem.hxx
..\inc\svx\contdlg.hxx %_DEST%\inc%_EXT%\svx\contdlg.hxx
..\inc\svx\tabarea.hxx %_DEST%\inc%_EXT%\svx\tabarea.hxx
..\inc\svx\tabline.hxx %_DEST%\inc%_EXT%\svx\tabline.hxx
-..\inc\svx\crsditem.hxx %_DEST%\inc%_EXT%\svx\crsditem.hxx
-..\inc\svx\cscoitem.hxx %_DEST%\inc%_EXT%\svx\cscoitem.hxx
..\inc\svx\colrctrl.hxx %_DEST%\inc%_EXT%\svx\colrctrl.hxx
..\inc\svx\cube3d.hxx %_DEST%\inc%_EXT%\svx\cube3d.hxx
..\inc\svx\polygn3d.hxx %_DEST%\inc%_EXT%\svx\polygn3d.hxx
@@ -215,14 +165,10 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\svx\dlgctl3d.hxx %_DEST%\inc%_EXT%\svx\dlgctl3d.hxx
..\inc\svx\dlgctrl.hxx %_DEST%\inc%_EXT%\svx\dlgctrl.hxx
..\inc\svx\dialogs.hrc %_DEST%\inc%_EXT%\svx\dialogs.hrc
-..\inc\svx\escpitem.hxx %_DEST%\inc%_EXT%\svx\escpitem.hxx
..\inc\svx\extrud3d.hxx %_DEST%\inc%_EXT%\svx\extrud3d.hxx
-..\inc\svx\escherex.hxx %_DEST%\inc%_EXT%\svx\escherex.hxx
..\inc\svx\f3dchild.hxx %_DEST%\inc%_EXT%\svx\f3dchild.hxx
-..\inc\svx\fhgtitem.hxx %_DEST%\inc%_EXT%\svx\fhgtitem.hxx
..\inc\svx\fillctrl.hxx %_DEST%\inc%_EXT%\svx\fillctrl.hxx
..\inc\svx\float3d.hxx %_DEST%\inc%_EXT%\svx\float3d.hxx
-..\inc\svx\flditem.hxx %_DEST%\inc%_EXT%\svx\flditem.hxx
..\inc\svx\fntctl.hxx %_DEST%\inc%_EXT%\svx\fntctl.hxx
..\inc\svx\fntctrl.hxx %_DEST%\inc%_EXT%\svx\fntctrl.hxx
..\inc\svx\fntszctl.hxx %_DEST%\inc%_EXT%\svx\fntszctl.hxx
@@ -233,31 +179,16 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\svx\frmsel.hxx %_DEST%\inc%_EXT%\svx\frmsel.hxx
..\inc\svx\graphctl.hxx %_DEST%\inc%_EXT%\svx\graphctl.hxx
..\inc\svx\hdft.hxx %_DEST%\inc%_EXT%\svx\hdft2.hxx
-..\inc\svx\hyznitem.hxx %_DEST%\inc%_EXT%\svx\hyznitem.hxx
..\inc\svx\ifaceids.hxx %_DEST%\inc%_EXT%\svx\ifaceids.hxx
..\inc\svx\itemwin.hxx %_DEST%\inc%_EXT%\svx\itemwin.hxx
-..\inc\svx\keepitem.hxx %_DEST%\inc%_EXT%\svx\keepitem.hxx
-..\inc\svx\kernitem.hxx %_DEST%\inc%_EXT%\svx\kernitem.hxx
..\inc\svx\langbox.hxx %_DEST%\inc%_EXT%\svx\langbox.hxx
-..\inc\svx\langitem.hxx %_DEST%\inc%_EXT%\svx\langitem.hxx
-..\inc\svx\lcolitem.hxx %_DEST%\inc%_EXT%\svx\lcolitem.hxx
-..\inc\svx\lrspitem.hxx %_DEST%\inc%_EXT%\svx\lrspitem.hxx
-..\inc\svx\lspcitem.hxx %_DEST%\inc%_EXT%\svx\lspcitem.hxx
-..\inc\svx\nhypitem.hxx %_DEST%\inc%_EXT%\svx\nhypitem.hxx
..\inc\svx\numinf.hxx %_DEST%\inc%_EXT%\svx\numinf.hxx
..\inc\svx\numfmtsh.hxx %_DEST%\inc%_EXT%\svx\numfmtsh.hxx
..\inc\svx\obj3d.hxx %_DEST%\inc%_EXT%\svx\obj3d.hxx
-..\inc\svx\optlingu.hxx %_DEST%\inc%_EXT%\svx\optlingu.hxx
-..\inc\svx\orphitem.hxx %_DEST%\inc%_EXT%\svx\orphitem.hxx
..\inc\svx\pagectrl.hxx %_DEST%\inc%_EXT%\svx\pagectrl.hxx
..\inc\svx\pageitem.hxx %_DEST%\inc%_EXT%\svx\pageitem.hxx
-..\inc\svx\paperinf.hxx %_DEST%\inc%_EXT%\svx\paperinf.hxx
..\inc\svx\paraprev.hxx %_DEST%\inc%_EXT%\svx\paraprev.hxx
-..\inc\svx\pbinitem.hxx %_DEST%\inc%_EXT%\svx\pbinitem.hxx
-..\inc\svx\pmdlitem.hxx %_DEST%\inc%_EXT%\svx\pmdlitem.hxx
..\inc\svx\polysc3d.hxx %_DEST%\inc%_EXT%\svx\polysc3d.hxx
-..\inc\svx\postitem.hxx %_DEST%\inc%_EXT%\svx\postitem.hxx
-..\inc\svx\prszitem.hxx %_DEST%\inc%_EXT%\svx\prszitem.hxx
..\inc\svx\rectenum.hxx %_DEST%\inc%_EXT%\svx\rectenum.hxx
..\inc\svx\ruler.hxx %_DEST%\inc%_EXT%\svx\ruler.hxx
..\inc\svx\scene3d.hxx %_DEST%\inc%_EXT%\svx\scene3d.hxx
@@ -292,15 +223,8 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\svx\sdtfsitm.hxx %_DEST%\inc%_EXT%\svx\sdtfsitm.hxx
..\inc\svx\sdtmfitm.hxx %_DEST%\inc%_EXT%\svx\sdtmfitm.hxx
..\inc\svx\sdynitm.hxx %_DEST%\inc%_EXT%\svx\sdynitm.hxx
-..\inc\svx\shaditem.hxx %_DEST%\inc%_EXT%\svx\shaditem.hxx
-..\inc\svx\shdditem.hxx %_DEST%\inc%_EXT%\svx\shdditem.hxx
-..\inc\svx\sizeitem.hxx %_DEST%\inc%_EXT%\svx\sizeitem.hxx
..\inc\svx\sphere3d.hxx %_DEST%\inc%_EXT%\svx\sphere3d.hxx
-..\inc\svx\spltitem.hxx %_DEST%\inc%_EXT%\svx\spltitem.hxx
-..\inc\svx\hangulhanja.hxx %_DEST%\inc%_EXT%\svx\hangulhanja.hxx
-..\inc\svx\SpellPortions.hxx %_DEST%\inc%_EXT%\svx\SpellPortions.hxx
..\inc\svx\SpellDialogChildWindow.hxx %_DEST%\inc%_EXT%\svx\SpellDialogChildWindow.hxx
-..\inc\svx\splwrap.hxx %_DEST%\inc%_EXT%\svx\splwrap.hxx
..\inc\svx\stddlg.hxx %_DEST%\inc%_EXT%\svx\stddlg.hxx
..\inc\svx\strarray.hxx %_DEST%\inc%_EXT%\svx\strarray.hxx
..\inc\svx\svdattr.hxx %_DEST%\inc%_EXT%\svx\svdattr.hxx
@@ -351,9 +275,6 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\svx\svdoutl.hxx %_DEST%\inc%_EXT%\svx\svdoutl.hxx
..\inc\svx\svdview.hxx %_DEST%\inc%_EXT%\svx\svdview.hxx
..\inc\svx\svdxcgv.hxx %_DEST%\inc%_EXT%\svx\svdxcgv.hxx
-..\inc\svx\svxbox.hxx %_DEST%\inc%_EXT%\svx\svxbox.hxx
-..\inc\svx\svxfont.hxx %_DEST%\inc%_EXT%\svx\svxfont.hxx
-..\inc\svx\svxenum.hxx %_DEST%\inc%_EXT%\svx\svxenum.hxx
..\inc\svx\svxids.hrc %_DEST%\inc%_EXT%\svx\svxids.hrc
..\inc\svx\sxallitm.hxx %_DEST%\inc%_EXT%\svx\sxallitm.hxx
..\inc\svx\sxcaitm.hxx %_DEST%\inc%_EXT%\svx\sxcaitm.hxx
@@ -397,17 +318,11 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\svx\sxsoitm.hxx %_DEST%\inc%_EXT%\svx\sxsoitm.hxx
..\inc\svx\sxtraitm.hxx %_DEST%\inc%_EXT%\svx\sxtraitm.hxx
..\inc\svx\tbcontrl.hxx %_DEST%\inc%_EXT%\svx\tbcontrl.hxx
-..\inc\svx\thesdlg.hxx %_DEST%\inc%_EXT%\svx\thesdlg.hxx
-..\inc\svx\tstpitem.hxx %_DEST%\inc%_EXT%\svx\tstpitem.hxx
-..\inc\svx\udlnitem.hxx %_DEST%\inc%_EXT%\svx\udlnitem.hxx
-..\inc\svx\ulspitem.hxx %_DEST%\inc%_EXT%\svx\ulspitem.hxx
..\inc\svx\unomid.hxx %_DEST%\inc%_EXT%\svx\unomid.hxx
..\inc\svx\unopage.hxx %_DEST%\inc%_EXT%\svx\unopage.hxx
-..\inc\svx\unoprnms.hxx %_DEST%\inc%_EXT%\svx\unoprnms.hxx
..\inc\svx\unoshape.hxx %_DEST%\inc%_EXT%\svx\unoshape.hxx
..\inc\svx\shapepropertynotifier.hxx %_DEST%\inc%_EXT%\svx\shapepropertynotifier.hxx
..\inc\svx\shapeproperty.hxx %_DEST%\inc%_EXT%\svx\shapeproperty.hxx
-..\inc\svx\unoipset.hxx %_DEST%\inc%_EXT%\svx\unoipset.hxx
..\inc\svx\unoprov.hxx %_DEST%\inc%_EXT%\svx\unoprov.hxx
..\inc\svx\unomod.hxx %_DEST%\inc%_EXT%\svx\unomod.hxx
..\inc\svx\unomodel.hxx %_DEST%\inc%_EXT%\svx\unomodel.hxx
@@ -415,9 +330,6 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\svx\fmsearch.hxx %_DEST%\inc%_EXT%\svx\fmsearch.hxx
..\inc\svx\view3d.hxx %_DEST%\inc%_EXT%\svx\view3d.hxx
..\inc\svx\viewpt3d.hxx %_DEST%\inc%_EXT%\svx\viewpt3d.hxx
-..\inc\svx\wghtitem.hxx %_DEST%\inc%_EXT%\svx\wghtitem.hxx
-..\inc\svx\widwitem.hxx %_DEST%\inc%_EXT%\svx\widwitem.hxx
-..\inc\svx\wrlmitem.hxx %_DEST%\inc%_EXT%\svx\wrlmitem.hxx
..\inc\svx\xbitmap.hxx %_DEST%\inc%_EXT%\svx\xbitmap.hxx
..\inc\svx\xbtmpit.hxx %_DEST%\inc%_EXT%\svx\xbtmpit.hxx
..\inc\svx\xcolit.hxx %_DEST%\inc%_EXT%\svx\xcolit.hxx
@@ -484,21 +396,8 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\svx\viewlayoutitem.hxx %_DEST%\inc%_EXT%\svx\viewlayoutitem.hxx
..\inc\svx\zoomslideritem.hxx %_DEST%\inc%_EXT%\svx\zoomslideritem.hxx
..\inc\svx\zoomsliderctrl.hxx %_DEST%\inc%_EXT%\svx\zoomsliderctrl.hxx
+..\inc\svx\extrusioncolorcontrol.hxx %_DEST%\inc%_EXT%\svx\extrusioncolorcontrol.hxx
-
-..\inc\svx\itemtype.hxx %_DEST%\inc%_EXT%\svx\itemtype.hxx
-..\inc\svx\outliner.hxx %_DEST%\inc%_EXT%\svx\outliner.hxx
-..\inc\svx\paragraphdata.hxx %_DEST%\inc%_EXT%\svx\paragraphdata.hxx
-..\inc\svx\outlobj.hxx %_DEST%\inc%_EXT%\svx\outlobj.hxx
-..\inc\svx\editdata.hxx %_DEST%\inc%_EXT%\svx\editdata.hxx
-..\inc\svx\editeng.hxx %_DEST%\inc%_EXT%\svx\editeng.hxx
-..\inc\svx\eedata.hxx %_DEST%\inc%_EXT%\svx\eedata.hxx
-..\inc\svx\editobj.hxx %_DEST%\inc%_EXT%\svx\editobj.hxx
-..\inc\svx\editview.hxx %_DEST%\inc%_EXT%\svx\editview.hxx
-..\inc\svx\eeitem.hxx %_DEST%\inc%_EXT%\svx\eeitem.hxx
-..\inc\svx\eeitemid.hxx %_DEST%\inc%_EXT%\svx\eeitemid.hxx
-..\inc\svx\svxacorr.hxx %_DEST%\inc%_EXT%\svx\svxacorr.hxx
-..\inc\svx\swafopt.hxx %_DEST%\inc%_EXT%\svx\swafopt.hxx
..\inc\svx\fmmodel.hxx %_DEST%\inc%_EXT%\svx\fmmodel.hxx
..\inc\svx\fmpage.hxx %_DEST%\inc%_EXT%\svx\fmpage.hxx
..\inc\svx\fmview.hxx %_DEST%\inc%_EXT%\svx\fmview.hxx
@@ -506,22 +405,10 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\svx\fmshell.hxx %_DEST%\inc%_EXT%\svx\fmshell.hxx
..\inc\svx\svdouno.hxx %_DEST%\inc%_EXT%\svx\svdouno.hxx
..\inc\svx\deflt3d.hxx %_DEST%\inc%_EXT%\svx\deflt3d.hxx
-..\inc\svx\unotext.hxx %_DEST%\inc%_EXT%\svx\unotext.hxx
-..\inc\svx\unofield.hxx %_DEST%\inc%_EXT%\svx\unofield.hxx
-..\inc\svx\mutxhelp.hxx %_DEST%\inc%_EXT%\svx\mutxhelp.hxx
..\inc\svx\AccessibleTextHelper.hxx %_DEST%\inc%_EXT%\svx\AccessibleTextHelper.hxx
-..\inc\svx\unoviwed.hxx %_DEST%\inc%_EXT%\svx\unoviwed.hxx
-..\inc\svx\unoviwou.hxx %_DEST%\inc%_EXT%\svx\unoviwou.hxx
-..\inc\svx\unoedsrc.hxx %_DEST%\inc%_EXT%\svx\unoedsrc.hxx
-..\inc\svx\unofored.hxx %_DEST%\inc%_EXT%\svx\unofored.hxx
-..\inc\svx\unoforou.hxx %_DEST%\inc%_EXT%\svx\unoforou.hxx
..\inc\svx\e3dundo.hxx %_DEST%\inc%_EXT%\svx\e3dundo.hxx
-..\inc\svx\msdffimp.hxx %_DEST%\inc%_EXT%\svx\msdffimp.hxx
..\inc\svx\msdffdef.hxx %_DEST%\inc%_EXT%\svx\msdffdef.hxx
-..\inc\svx\msfiltertracer.hxx %_DEST%\inc%_EXT%\svx\msfiltertracer.hxx
..\inc\svx\unoshtxt.hxx %_DEST%\inc%_EXT%\svx\unoshtxt.hxx
-..\inc\svx\numitem.hxx %_DEST%\inc%_EXT%\svx\numitem.hxx
-..\inc\svx\numdef.hxx %_DEST%\inc%_EXT%\svx\numdef.hxx
..\inc\svx\fmdmod.hxx %_DEST%\inc%_EXT%\svx\fmdmod.hxx
..\inc\svx\fmgridcl.hxx %_DEST%\inc%_EXT%\svx\fmgridcl.hxx
..\inc\svx\gridctrl.hxx %_DEST%\inc%_EXT%\svx\gridctrl.hxx
@@ -531,27 +418,12 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\svx\grfcrop.hxx %_DEST%\inc%_EXT%\svx\grfcrop.hxx
..\inc\svx\grfflt.hxx %_DEST%\inc%_EXT%\svx\grfflt.hxx
..\inc\svx\svx3ditems.hxx %_DEST%\inc%_EXT%\svx\svx3ditems.hxx
-..\inc\svx\msocximex.hxx %_DEST%\inc%_EXT%\svx\msocximex.hxx
-..\inc\svx\emphitem.hxx %_DEST%\inc%_EXT%\svx\emphitem.hxx
-..\inc\svx\twolinesitem.hxx %_DEST%\inc%_EXT%\svx\twolinesitem.hxx
-..\inc\svx\scripttypeitem.hxx %_DEST%\inc%_EXT%\svx\scripttypeitem.hxx
-..\inc\svx\scriptspaceitem.hxx %_DEST%\inc%_EXT%\svx\scriptspaceitem.hxx
-..\inc\svx\hngpnctitem.hxx %_DEST%\inc%_EXT%\svx\hngpnctitem.hxx
-..\inc\svx\forbiddenruleitem.hxx %_DEST%\inc%_EXT%\svx\forbiddenruleitem.hxx
-..\inc\svx\charscaleitem.hxx %_DEST%\inc%_EXT%\svx\charscaleitem.hxx
-..\inc\svx\charrotateitem.hxx %_DEST%\inc%_EXT%\svx\charrotateitem.hxx
-..\inc\svx\charreliefitem.hxx %_DEST%\inc%_EXT%\svx\charreliefitem.hxx
-..\inc\svx\paravertalignitem.hxx %_DEST%\inc%_EXT%\svx\paravertalignitem.hxx
..\inc\svx\dbaexchange.hxx %_DEST%\inc%_EXT%\svx\dbaexchange.hxx
..\inc\svx\dbaobjectex.hxx %_DEST%\inc%_EXT%\svx\dbaobjectex.hxx
..\inc\svx\ucsubset.hxx %_DEST%\inc%_EXT%\svx\ucsubset.hxx
..\inc\svx\ucsubset.hrc %_DEST%\inc%_EXT%\svx\ucsubset.hrc
..\inc\svx\dataaccessdescriptor.hxx %_DEST%\inc%_EXT%\svx\dataaccessdescriptor.hxx
-..\inc\svx\frmdir.hxx %_DEST%\inc%_EXT%\svx\frmdir.hxx
-..\inc\svx\frmdiritem.hxx %_DEST%\inc%_EXT%\svx\frmdiritem.hxx
..\inc\svx\frmdirlbox.hxx %_DEST%\inc%_EXT%\svx\frmdirlbox.hxx
-..\inc\svx\AccessibleContextBase.hxx %_DEST%\inc%_EXT%\svx\AccessibleContextBase.hxx
-..\inc\svx\AccessibleComponentBase.hxx %_DEST%\inc%_EXT%\svx\AccessibleComponentBase.hxx
..\inc\svx\AccessibleShape.hxx %_DEST%\inc%_EXT%\svx\AccessibleShape.hxx
..\inc\svx\AccessibleGraphicShape.hxx %_DEST%\inc%_EXT%\svx\AccessibleGraphicShape.hxx
..\inc\svx\AccessibleOLEShape.hxx %_DEST%\inc%_EXT%\svx\AccessibleOLEShape.hxx
@@ -564,7 +436,6 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\svx\ChildrenManager.hxx %_DEST%\inc%_EXT%\svx\ChildrenManager.hxx
..\inc\svx\ShapeTypeHandler.hxx %_DEST%\inc%_EXT%\svx\ShapeTypeHandler.hxx
..\inc\svx\SvxShapeTypes.hxx %_DEST%\inc%_EXT%\svx\SvxShapeTypes.hxx
-..\inc\svx\writingmodeitem.hxx %_DEST%\inc%_EXT%\svx\writingmodeitem.hxx
..\inc\svx\svdoashp.hxx %_DEST%\inc%_EXT%\svx\svdoashp.hxx
..\inc\svx\extrusionbar.hxx %_DEST%\inc%_EXT%\svx\extrusionbar.hxx
..\inc\svx\fontworkbar.hxx %_DEST%\inc%_EXT%\svx\fontworkbar.hxx
@@ -577,13 +448,13 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\svx\databaselocationinput.hxx %_DEST%\inc%_EXT%\svx\databaselocationinput.hxx
..\inc\svx\dbcharsethelper.hxx %_DEST%\inc%_EXT%\svx\dbcharsethelper.hxx
..\inc\svx\dbtoolsclient.hxx %_DEST%\inc%_EXT%\svx\dbtoolsclient.hxx
+..\inc\svx\sdrobjectfilter.hxx %_DEST%\inc%_EXT%\svx\sdrobjectfilter.hxx
..\inc\svx\subtoolboxcontrol.hxx %_DEST%\inc%_EXT%\svx\subtoolboxcontrol.hxx
..\inc\svx\svdtext.hxx %_DEST%\inc%_EXT%\svx\svdtext.hxx
..\inc\svx\svdotable.hxx %_DEST%\inc%_EXT%\svx\svdotable.hxx
..\inc\svx\selectioncontroller.hxx %_DEST%\inc%_EXT%\svx\selectioncontroller.hxx
..\inc\svx\helperhittest3d.hxx %_DEST%\inc%_EXT%\svx\helperhittest3d.hxx
-..\inc\svx\optimprove.hxx %_DEST%\inc%_EXT%\svx\optimprove.hxx
mkdir: %_DEST%\inc%_EXT%\svx\sdr
mkdir: %_DEST%\inc%_EXT%\svx\sdr\properties
@@ -619,7 +490,6 @@ mkdir: %_DEST%\inc%_EXT%\svx\sdr\contact
..\inc\svx\sdr\contact\viewobjectcontactredirector.hxx %_DEST%\inc%_EXT%\svx\sdr\contact\viewobjectcontactredirector.hxx
..\inc\svx\sdr\contact\viewobjectcontactofpageobj.hxx %_DEST%\inc%_EXT%\svx\sdr\contact\viewobjectcontactofpageobj.hxx
..\inc\svx\sdr\contact\viewobjectcontactofsdrobj.hxx %_DEST%\inc%_EXT%\svx\sdr\contact\viewobjectcontactofsdrobj.hxx
-..\inc\svx\sdr\contact\vocbitmapbuffer.hxx %_DEST%\inc%_EXT%\svx\sdr\contact\vocbitmapbuffer.hxx
mkdir: %_DEST%\inc%_EXT%\svx\sdr\overlay
..\inc\svx\sdr\overlay\overlayanimatedbitmapex.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlayanimatedbitmapex.hxx
@@ -641,10 +511,6 @@ mkdir: %_DEST%\inc%_EXT%\svx\sdr\primitive2d
..\inc\svx\sdr\primitive2d\sdrprimitivetools.hxx %_DEST%\inc%_EXT%\svx\sdr\primitive2d\sdrprimitivetools.hxx
mkdir: %_DEST%\inc%_EXT%\svx\sdr\animation
-..\inc\svx\sdr\animation\ainfographic.hxx %_DEST%\inc%_EXT%\svx\sdr\animation\ainfographic.hxx
-..\inc\svx\sdr\animation\ainfoscrolltext.hxx %_DEST%\inc%_EXT%\svx\sdr\animation\ainfoscrolltext.hxx
-..\inc\svx\sdr\animation\ainfotext.hxx %_DEST%\inc%_EXT%\svx\sdr\animation\ainfotext.hxx
-..\inc\svx\sdr\animation\animationinfo.hxx %_DEST%\inc%_EXT%\svx\sdr\animation\animationinfo.hxx
..\inc\svx\sdr\animation\animationstate.hxx %_DEST%\inc%_EXT%\svx\sdr\animation\animationstate.hxx
..\inc\svx\sdr\animation\objectanimator.hxx %_DEST%\inc%_EXT%\svx\sdr\animation\objectanimator.hxx
..\inc\svx\sdr\animation\scheduler.hxx %_DEST%\inc%_EXT%\svx\sdr\animation\scheduler.hxx
@@ -679,16 +545,10 @@ mkdir: %_DEST%\inc%_EXT%\svx\sdr\table
..\xml\AccessibleControlShape.xml %_DEST%\xml%_EXT%\AccessibleControlShape.xml
..\xml\AccessibleEditableTextPara.xml %_DEST%\xml%_EXT%\AccessibleEditableTextPara.xml
-..\uiconfig\accelerator\*.xml %_DEST%\xml%_EXT%\uiconfig\global\accelerator\*.xml
-..\uiconfig\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\global\accelerator\en-US\*.xml
-..\uiconfig\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\global\accelerator\es\*.xml
-
..\inc\svx\subtoolboxcontrol.hxx %_DEST%\inc%_EXT%\svx\subtoolboxcontrol.hxx
..\inc\svx\svdtext.hxx %_DEST%\inc%_EXT%\svx\svdtext.hxx
..\inc\svx\svdotable.hxx %_DEST%\inc%_EXT%\svx\svdotable.hxx
..\inc\svx\selectioncontroller.hxx %_DEST%\inc%_EXT%\svx\selectioncontroller.hxx
..\inc\svx\helperhittest3d.hxx %_DEST%\inc%_EXT%\svx\helperhittest3d.hxx
-..\inc\svx\optimprove.hxx %_DEST%\inc%_EXT%\svx\optimprove.hxx
-..\inc\svx\msvbahelper.hxx %_DEST%\inc%_EXT%\svx\msvbahelper.hxx
..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.*
diff --git a/svx/sdi/fmslots.sdi b/svx/sdi/fmslots.sdi
index 83803b2bdaf6..1a368920ab9a 100644
--- a/svx/sdi/fmslots.sdi
+++ b/svx/sdi/fmslots.sdi
@@ -657,7 +657,7 @@ shell FmFormShell
[
ExecMethod = Execute ;
]
- SID_FM_GRABCONTROLFOCUS
+ SID_FM_TOGGLECONTROLFOCUS
[
ExecMethod = Execute ;
]
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 5f243b90067d..240ca9cbd4e1 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -1455,6 +1455,81 @@ SfxVoidItem ChangeCaseToKatakana SID_TRANSLITERATE_KATAGANA
]
//--------------------------------------------------------------------------
+SfxVoidItem ChangeCaseToSentenceCase SID_TRANSLITERATE_SENTENCE_CASE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ChangeCaseToTitleCase SID_TRANSLITERATE_TITLE_CASE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ChangeCaseToToggleCase SID_TRANSLITERATE_TOGGLE_CASE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
SfxVoidItem ChangeCaseToLower SID_TRANSLITERATE_LOWER
()
[
@@ -10834,7 +10909,7 @@ SdrTextFitToSizeTypeItem TextFitToSize SID_ATTR_TEXT_FITTOSIZE
]
//--------------------------------------------------------------------------
-SfxVoidItem Thesaurus SID_THESAURUS
+SfxVoidItem ThesaurusDialog SID_THESAURUS
()
[
/* flags: */
@@ -10843,7 +10918,7 @@ SfxVoidItem Thesaurus SID_THESAURUS
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = TRUE,
- ReadOnlyDoc = TRUE,
+ ReadOnlyDoc = FALSE,
Toggle = FALSE,
Container = FALSE,
RecordAbsolute = FALSE,
@@ -11700,7 +11775,7 @@ SfxVoidItem ZoomVisArea SID_SIZE_VISAREA
]
//--------------------------------------------------------------------------
-SfxVoidItem GrabControlFocus SID_FM_GRABCONTROLFOCUS
+SfxVoidItem ToggleControlFocus SID_FM_TOGGLECONTROLFOCUS
()
[
/* flags: */
diff --git a/svx/source/core/coreservices.cxx b/svx/source/core/coreservices.cxx
new file mode 100644
index 000000000000..1f1d69781756
--- /dev/null
+++ b/svx/source/core/coreservices.cxx
@@ -0,0 +1,183 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+/** this file contains the uno service registrations for all services in the svxcore lib */
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svx.hxx"
+
+#include "sal/types.h"
+#include "osl/diagnose.h"
+#include "cppuhelper/factory.hxx"
+#include "uno/lbnames.h"
+
+using rtl::OUString;
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::lang;
+using namespace com::sun::star::registry;
+
+namespace svx
+{
+extern OUString SAL_CALL ExtrusionDepthController_getImplementationName();
+extern Reference< XInterface > SAL_CALL ExtrusionDepthController_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
+extern Sequence< OUString > SAL_CALL ExtrusionDepthController_getSupportedServiceNames() throw( RuntimeException );
+
+extern OUString SAL_CALL ExtrusionDirectionControl_getImplementationName();
+extern Reference< XInterface > SAL_CALL ExtrusionDirectionControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
+extern Sequence< OUString > SAL_CALL ExtrusionDirectionControl_getSupportedServiceNames() throw( RuntimeException );
+
+extern OUString SAL_CALL ExtrusionLightingControl_getImplementationName();
+extern Reference< XInterface > SAL_CALL ExtrusionLightingControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
+extern Sequence< OUString > SAL_CALL ExtrusionLightingControl_getSupportedServiceNames() throw( RuntimeException );
+
+extern OUString SAL_CALL ExtrusionSurfaceControl_getImplementationName();
+extern Reference< XInterface > SAL_CALL ExtrusionSurfaceControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
+extern Sequence< OUString > SAL_CALL ExtrusionSurfaceControl_getSupportedServiceNames() throw( RuntimeException );
+
+extern OUString SAL_CALL FontWorkAlignmentControl_getImplementationName();
+extern Reference< XInterface > SAL_CALL FontWorkAlignmentControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
+extern Sequence< OUString > SAL_CALL FontWorkAlignmentControl_getSupportedServiceNames() throw( RuntimeException );
+
+extern OUString SAL_CALL FontWorkCharacterSpacingControl_getImplementationName();
+extern Reference< XInterface > SAL_CALL FontWorkCharacterSpacingControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
+extern Sequence< OUString > SAL_CALL FontWorkCharacterSpacingControl_getSupportedServiceNames() throw( RuntimeException );
+}
+
+extern "C"
+{
+
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment (
+ const sal_Char ** ppEnvTypeName, uno_Environment ** )
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
+static void writeInfo (
+ XRegistryKey * pRegistryKey,
+ const OUString& rImplementationName,
+ const Sequence< OUString >& rServices)
+{
+ Reference< XRegistryKey > xNewKey(
+ pRegistryKey->createKey(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + rImplementationName + OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ) );
+
+ for( sal_Int32 i = 0; i < rServices.getLength(); i++ )
+ xNewKey->createKey( rServices.getConstArray()[i]);
+}
+
+SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo (
+ void * , void * pRegistryKey)
+{
+ if( pRegistryKey )
+ {
+ try
+ {
+ XRegistryKey *pKey = reinterpret_cast< XRegistryKey * >( pRegistryKey );
+
+ writeInfo( pKey, ::svx::ExtrusionDepthController_getImplementationName(),::svx::ExtrusionDepthController_getSupportedServiceNames() );
+ writeInfo( pKey, ::svx::ExtrusionDirectionControl_getImplementationName(),::svx::ExtrusionDirectionControl_getSupportedServiceNames() );
+ writeInfo( pKey, ::svx::ExtrusionLightingControl_getImplementationName(),::svx::ExtrusionLightingControl_getSupportedServiceNames() );
+ writeInfo( pKey, ::svx::ExtrusionSurfaceControl_getImplementationName(),::svx::ExtrusionSurfaceControl_getSupportedServiceNames() );
+ writeInfo( pKey, ::svx::FontWorkAlignmentControl_getImplementationName(),::svx::FontWorkAlignmentControl_getSupportedServiceNames() );
+ writeInfo( pKey, ::svx::FontWorkCharacterSpacingControl_getImplementationName(),::svx::FontWorkCharacterSpacingControl_getSupportedServiceNames() );
+ }
+ catch (InvalidRegistryException &)
+ {
+ OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+ }
+ }
+
+ return sal_True;
+}
+
+SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory (
+ const sal_Char * pImplName, void * pServiceManager, void * )
+{
+ void * pRet = 0;
+ if( pServiceManager )
+ {
+ Reference< XSingleServiceFactory > xFactory;
+
+ if( ::svx::ExtrusionDepthController_getImplementationName().equalsAscii( pImplName ) )
+ {
+ xFactory = ::cppu::createSingleFactory(
+ reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+ ::svx::ExtrusionDepthController_getImplementationName(),
+ ::svx::ExtrusionDepthController_createInstance,
+ ::svx::ExtrusionDepthController_getSupportedServiceNames() );
+ }
+ else if( ::svx::ExtrusionDirectionControl_getImplementationName().equalsAscii( pImplName ) )
+ {
+ xFactory = ::cppu::createSingleFactory(
+ reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+ ::svx::ExtrusionDirectionControl_getImplementationName(),
+ ::svx::ExtrusionDirectionControl_createInstance,
+ ::svx::ExtrusionDirectionControl_getSupportedServiceNames() );
+ }
+ else if( ::svx::ExtrusionLightingControl_getImplementationName().equalsAscii( pImplName ) )
+ {
+ xFactory = ::cppu::createSingleFactory(
+ reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+ ::svx::ExtrusionLightingControl_getImplementationName(),
+ ::svx::ExtrusionLightingControl_createInstance,
+ ::svx::ExtrusionLightingControl_getSupportedServiceNames() );
+ }
+ else if( ::svx::ExtrusionSurfaceControl_getImplementationName().equalsAscii( pImplName ) )
+ {
+ xFactory = ::cppu::createSingleFactory(
+ reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+ ::svx::ExtrusionSurfaceControl_getImplementationName(),
+ ::svx::ExtrusionSurfaceControl_createInstance,
+ ::svx::ExtrusionSurfaceControl_getSupportedServiceNames() );
+ }
+ else if( ::svx::FontWorkAlignmentControl_getImplementationName().equalsAscii( pImplName ) )
+ {
+ xFactory = ::cppu::createSingleFactory(
+ reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+ ::svx::FontWorkAlignmentControl_getImplementationName(),
+ ::svx::FontWorkAlignmentControl_createInstance,
+ ::svx::FontWorkAlignmentControl_getSupportedServiceNames() );
+ }
+ else if( ::svx::FontWorkCharacterSpacingControl_getImplementationName().equalsAscii( pImplName ) )
+ {
+ xFactory = ::cppu::createSingleFactory(
+ reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+ ::svx::FontWorkCharacterSpacingControl_getImplementationName(),
+ ::svx::FontWorkCharacterSpacingControl_createInstance,
+ ::svx::FontWorkCharacterSpacingControl_getSupportedServiceNames() );
+ } if( xFactory.is())
+ {
+ xFactory->acquire();
+ pRet = xFactory.get();
+ }
+ }
+
+ return pRet;
+}
+
+}
diff --git a/svx/source/core/makefile.mk b/svx/source/core/makefile.mk
new file mode 100644
index 000000000000..da874894bae6
--- /dev/null
+++ b/svx/source/core/makefile.mk
@@ -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.
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=svx
+TARGET=core
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+SLOFILES = \
+ $(SLO)$/coreservices.obj
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 28ad49c6b65f..36490775cea1 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -468,6 +468,10 @@ sal_Bool EnhancedCustomShape2d::ConvertSequenceToEnhancedCustomShape2dHandle(
const rtl::OUString sSwitched ( RTL_CONSTASCII_USTRINGPARAM( "Switched" ) );
const rtl::OUString sPolar ( RTL_CONSTASCII_USTRINGPARAM( "Polar" ) );
// const rtl::OUString sMap ( RTL_CONSTASCII_USTRINGPARAM( "Map" ) );
+ const rtl::OUString sRefX ( RTL_CONSTASCII_USTRINGPARAM( "RefX" ) );
+ const rtl::OUString sRefY ( RTL_CONSTASCII_USTRINGPARAM( "RefY" ) );
+ const rtl::OUString sRefAngle ( RTL_CONSTASCII_USTRINGPARAM( "RefAngle" ) );
+ const rtl::OUString sRefR ( RTL_CONSTASCII_USTRINGPARAM( "RefR" ) );
const rtl::OUString sRadiusRangeMinimum ( RTL_CONSTASCII_USTRINGPARAM( "RadiusRangeMinimum" ) );
const rtl::OUString sRadiusRangeMaximum ( RTL_CONSTASCII_USTRINGPARAM( "RadiusRangeMaximum" ) );
const rtl::OUString sRangeXMinimum ( RTL_CONSTASCII_USTRINGPARAM( "RangeXMinimum" ) );
@@ -526,6 +530,26 @@ sal_Bool EnhancedCustomShape2d::ConvertSequenceToEnhancedCustomShape2dHandle(
}
}
*/
+ else if ( rPropVal.Name.equals( sRefX ) )
+ {
+ if ( rPropVal.Value >>= rDestinationHandle.nRefX )
+ rDestinationHandle.nFlags |= HANDLE_FLAGS_REFX;
+ }
+ else if ( rPropVal.Name.equals( sRefY ) )
+ {
+ if ( rPropVal.Value >>= rDestinationHandle.nRefY )
+ rDestinationHandle.nFlags |= HANDLE_FLAGS_REFY;
+ }
+ else if ( rPropVal.Name.equals( sRefAngle ) )
+ {
+ if ( rPropVal.Value >>= rDestinationHandle.nRefAngle )
+ rDestinationHandle.nFlags |= HANDLE_FLAGS_REFANGLE;
+ }
+ else if ( rPropVal.Name.equals( sRefR ) )
+ {
+ if ( rPropVal.Value >>= rDestinationHandle.nRefR )
+ rDestinationHandle.nFlags |= HANDLE_FLAGS_REFR;
+ }
else if ( rPropVal.Name.equals( sRadiusRangeMinimum ) )
{
if ( rPropVal.Value >>= rDestinationHandle.aRadiusRangeMinimum )
@@ -1182,131 +1206,141 @@ sal_Bool EnhancedCustomShape2d::SetHandleControllerPosition( const sal_uInt32 nI
Handle aHandle;
if ( ConvertSequenceToEnhancedCustomShape2dHandle( seqHandles[ nIndex ], aHandle ) )
{
- sal_Bool bAdjFirst = aHandle.aPosition.First.Type == EnhancedCustomShapeParameterType::ADJUSTMENT;
- sal_Bool bAdjSecond= aHandle.aPosition.Second.Type == EnhancedCustomShapeParameterType::ADJUSTMENT;
- if ( bAdjFirst || bAdjSecond )
+ Point aP( rPosition.X, rPosition.Y );
+ // apply the negative object rotation to the controller position
+
+ aP.Move( -aLogicRect.Left(), -aLogicRect.Top() );
+ if ( bFlipH )
+ aP.X() = aLogicRect.GetWidth() - aP.X();
+ if ( bFlipV )
+ aP.Y() = aLogicRect.GetHeight() - aP.Y();
+ if ( nRotateAngle )
{
- Point aP( rPosition.X, rPosition.Y );
- // apply the negative object rotation to the controller position
-
- aP.Move( -aLogicRect.Left(), -aLogicRect.Top() );
- if ( bFlipH )
- aP.X() = aLogicRect.GetWidth() - aP.X();
- if ( bFlipV )
- aP.Y() = aLogicRect.GetHeight() - aP.Y();
- if ( nRotateAngle )
- {
- double a = -nRotateAngle * F_PI18000;
- RotatePoint( aP, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), sin( a ), cos( a ) );
- }
- const GeoStat aGeoStat( ((SdrObjCustomShape*)pCustomShapeObj)->GetGeoStat() );
- if ( aGeoStat.nShearWink )
- {
- double nTan = -aGeoStat.nTan;
- if ((bFlipV&&!bFlipH )||(bFlipH&&!bFlipV))
- nTan = -nTan;
- ShearPoint( aP, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), nTan );
- }
+ double a = -nRotateAngle * F_PI18000;
+ RotatePoint( aP, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), sin( a ), cos( a ) );
+ }
+ const GeoStat aGeoStat( ((SdrObjCustomShape*)pCustomShapeObj)->GetGeoStat() );
+ if ( aGeoStat.nShearWink )
+ {
+ double nTan = -aGeoStat.nTan;
+ if ((bFlipV&&!bFlipH )||(bFlipH&&!bFlipV))
+ nTan = -nTan;
+ ShearPoint( aP, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), nTan );
+ }
- double fPos1 = aP.X(); //( bFlipH ) ? aLogicRect.GetWidth() - aP.X() : aP.X();
- double fPos2 = aP.Y(); //( bFlipV ) ? aLogicRect.GetHeight() -aP.Y() : aP.Y();
- fPos1 /= fXScale;
- fPos2 /= fYScale;
+ double fPos1 = aP.X(); //( bFlipH ) ? aLogicRect.GetWidth() - aP.X() : aP.X();
+ double fPos2 = aP.Y(); //( bFlipV ) ? aLogicRect.GetHeight() -aP.Y() : aP.Y();
+ fPos1 /= fXScale;
+ fPos2 /= fYScale;
- if ( aHandle.nFlags & HANDLE_FLAGS_SWITCHED )
+ if ( aHandle.nFlags & HANDLE_FLAGS_SWITCHED )
+ {
+ if ( aLogicRect.GetHeight() > aLogicRect.GetWidth() )
{
- if ( aLogicRect.GetHeight() > aLogicRect.GetWidth() )
- {
- double fX = fPos1;
- double fY = fPos2;
- fPos1 = fY;
- fPos2 = fX;
- }
+ double fX = fPos1;
+ double fY = fPos2;
+ fPos1 = fY;
+ fPos2 = fX;
}
+ }
- sal_Int32 nFirstAdjustmentValue = 0, nSecondAdjustmentValue = 0;
+ sal_Int32 nFirstAdjustmentValue = -1, nSecondAdjustmentValue = -1;
+
+ if ( aHandle.aPosition.First.Type == EnhancedCustomShapeParameterType::ADJUSTMENT )
aHandle.aPosition.First.Value >>= nFirstAdjustmentValue;
+ if ( aHandle.aPosition.Second.Type == EnhancedCustomShapeParameterType::ADJUSTMENT )
aHandle.aPosition.Second.Value>>= nSecondAdjustmentValue;
- if ( aHandle.nFlags & HANDLE_FLAGS_POLAR )
+ if ( aHandle.nFlags & HANDLE_FLAGS_POLAR )
+ {
+ double fXRef, fYRef, fAngle;
+ GetParameter( fXRef, aHandle.aPolar.First, sal_False, sal_False );
+ GetParameter( fYRef, aHandle.aPolar.Second, sal_False, sal_False );
+ const double fDX = fPos1 - fXRef;
+ fAngle = -( atan2( -fPos2 + fYRef, ( ( fDX == 0.0L ) ? 0.000000001 : fDX ) ) / F_PI180 );
+ double fX = ( fPos1 - fXRef );
+ double fY = ( fPos2 - fYRef );
+ double fRadius = sqrt( fX * fX + fY * fY );
+ if ( aHandle.nFlags & HANDLE_FLAGS_RADIUS_RANGE_MINIMUM )
+ {
+ double fMin;
+ GetParameter( fMin, aHandle.aRadiusRangeMinimum, sal_False, sal_False );
+ if ( fRadius < fMin )
+ fRadius = fMin;
+ }
+ if ( aHandle.nFlags & HANDLE_FLAGS_RADIUS_RANGE_MAXIMUM )
+ {
+ double fMax;
+ GetParameter( fMax, aHandle.aRadiusRangeMaximum, sal_False, sal_False );
+ if ( fRadius > fMax )
+ fRadius = fMax;
+ }
+ if ( nFirstAdjustmentValue >= 0 )
+ SetAdjustValueAsDouble( fRadius, nFirstAdjustmentValue );
+ if ( nSecondAdjustmentValue >= 0 )
+ SetAdjustValueAsDouble( fAngle, nSecondAdjustmentValue );
+ }
+ else
+ {
+ if ( aHandle.nFlags & HANDLE_FLAGS_REFX )
+ {
+ nFirstAdjustmentValue = aHandle.nRefX;
+ fPos1 *= 100000.0;
+ fPos1 /= nCoordWidth;
+ }
+ if ( aHandle.nFlags & HANDLE_FLAGS_REFY )
{
- double fXRef, fYRef, fAngle;
- GetParameter( fXRef, aHandle.aPolar.First, sal_False, sal_False );
- GetParameter( fYRef, aHandle.aPolar.Second, sal_False, sal_False );
- const double fDX = fPos1 - fXRef;
- fAngle = -( atan2( -fPos2 + fYRef, ( ( fDX == 0.0L ) ? 0.000000001 : fDX ) ) / F_PI180 );
- double fX = ( fPos1 - fXRef );
- double fY = ( fPos2 - fYRef );
- double fRadius = sqrt( fX * fX + fY * fY );
- if ( aHandle.nFlags & HANDLE_FLAGS_RADIUS_RANGE_MINIMUM )
+ nSecondAdjustmentValue = aHandle.nRefY;
+ fPos2 *= 100000.0;
+ fPos2 /= nCoordHeight;
+ }
+ if ( nFirstAdjustmentValue >= 0 )
+ {
+ if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_X_MINIMUM ) // check if horizontal handle needs to be within a range
{
- double fMin;
- GetParameter( fMin, aHandle.aRadiusRangeMinimum, sal_False, sal_False );
- if ( fRadius < fMin )
- fRadius = fMin;
+ double fXMin;
+ GetParameter( fXMin, aHandle.aXRangeMinimum, sal_False, sal_False );
+ if ( fPos1 < fXMin )
+ fPos1 = fXMin;
}
- if ( aHandle.nFlags & HANDLE_FLAGS_RADIUS_RANGE_MAXIMUM )
+ if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_X_MAXIMUM ) // check if horizontal handle needs to be within a range
{
- double fMax;
- GetParameter( fMax, aHandle.aRadiusRangeMaximum, sal_False, sal_False );
- if ( fRadius > fMax )
- fRadius = fMax;
+ double fXMax;
+ GetParameter( fXMax, aHandle.aXRangeMaximum, sal_False, sal_False );
+ if ( fPos1 > fXMax )
+ fPos1 = fXMax;
}
- if ( bAdjFirst )
- SetAdjustValueAsDouble( fRadius, nFirstAdjustmentValue );
- if ( bAdjSecond )
- SetAdjustValueAsDouble( fAngle, nSecondAdjustmentValue );
+ SetAdjustValueAsDouble( fPos1, nFirstAdjustmentValue );
}
- else
+ if ( nSecondAdjustmentValue >= 0 )
{
- if ( bAdjFirst )
+ if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_Y_MINIMUM ) // check if vertical handle needs to be within a range
{
- if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_X_MINIMUM ) // check if horizontal handle needs to be within a range
- {
- double fXMin;
- GetParameter( fXMin, aHandle.aXRangeMinimum, sal_False, sal_False );
- if ( fPos1 < fXMin )
- fPos1 = fXMin;
- }
- if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_X_MAXIMUM ) // check if horizontal handle needs to be within a range
- {
- double fXMax;
- GetParameter( fXMax, aHandle.aXRangeMaximum, sal_False, sal_False );
- if ( fPos1 > fXMax )
- fPos1 = fXMax;
- }
- SetAdjustValueAsDouble( fPos1, nFirstAdjustmentValue );
+ double fYMin;
+ GetParameter( fYMin, aHandle.aYRangeMinimum, sal_False, sal_False );
+ if ( fPos2 < fYMin )
+ fPos2 = fYMin;
}
- if ( bAdjSecond )
+ if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_Y_MAXIMUM ) // check if vertical handle needs to be within a range
{
- if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_Y_MINIMUM ) // check if vertical handle needs to be within a range
- {
- double fYMin;
- GetParameter( fYMin, aHandle.aYRangeMinimum, sal_False, sal_False );
- if ( fPos2 < fYMin )
- fPos2 = fYMin;
- }
- if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_Y_MAXIMUM ) // check if vertical handle needs to be within a range
- {
- double fYMax;
- GetParameter( fYMax, aHandle.aYRangeMaximum, sal_False, sal_False );
- if ( fPos2 > fYMax )
- fPos2 = fYMax;
- }
- SetAdjustValueAsDouble( fPos2, nSecondAdjustmentValue );
+ double fYMax;
+ GetParameter( fYMax, aHandle.aYRangeMaximum, sal_False, sal_False );
+ if ( fPos2 > fYMax )
+ fPos2 = fYMax;
}
+ SetAdjustValueAsDouble( fPos2, nSecondAdjustmentValue );
}
- // and writing them back into the GeometryItem
- SdrCustomShapeGeometryItem aGeometryItem((SdrCustomShapeGeometryItem&)
- (const SdrCustomShapeGeometryItem&)pCustomShapeObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
- const rtl::OUString sAdjustmentValues( RTL_CONSTASCII_USTRINGPARAM ( "AdjustmentValues" ) );
- com::sun::star::beans::PropertyValue aPropVal;
- aPropVal.Name = sAdjustmentValues;
- aPropVal.Value <<= seqAdjustmentValues;
- aGeometryItem.SetPropertyValue( aPropVal );
- pCustomShapeObj->SetMergedItem( aGeometryItem );
- bRetValue = sal_True;
}
+ // and writing them back into the GeometryItem
+ SdrCustomShapeGeometryItem aGeometryItem((SdrCustomShapeGeometryItem&)
+ (const SdrCustomShapeGeometryItem&)pCustomShapeObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
+ const rtl::OUString sAdjustmentValues( RTL_CONSTASCII_USTRINGPARAM ( "AdjustmentValues" ) );
+ com::sun::star::beans::PropertyValue aPropVal;
+ aPropVal.Name = sAdjustmentValues;
+ aPropVal.Value <<= seqAdjustmentValues;
+ aGeometryItem.SetPropertyValue( aPropVal );
+ pCustomShapeObj->SetMergedItem( aGeometryItem );
+ bRetValue = sal_True;
}
}
return bRetValue;
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.hxx b/svx/source/customshapes/EnhancedCustomShape2d.hxx
index 00df4b04f389..b3b944513e60 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.hxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.hxx
@@ -67,6 +67,10 @@ class SvxMSDffAdjustmentHandle;
#define HANDLE_FLAGS_RANGE_Y_MAXIMUM 0x0100
#define HANDLE_FLAGS_RADIUS_RANGE_MINIMUM 0x0200
#define HANDLE_FLAGS_RADIUS_RANGE_MAXIMUM 0x0400
+#define HANDLE_FLAGS_REFX 0x0800
+#define HANDLE_FLAGS_REFY 0x1000
+#define HANDLE_FLAGS_REFANGLE 0x2000
+#define HANDLE_FLAGS_REFR 0x4000
// MSDFF_HANDLE_FLAGS_RANGE_Y seems to be not defined in
// escher, but we are using it internally in to differentiate
@@ -145,12 +149,20 @@ class EnhancedCustomShape2d : public SfxItemSet
com::sun::star::drawing::EnhancedCustomShapeParameterPair aPosition;
com::sun::star::drawing::EnhancedCustomShapeParameterPair aPolar;
+ sal_Int32 nRefX;
+ sal_Int32 nRefY;
+ sal_Int32 nRefAngle;
+ sal_Int32 nRefR;
+
com::sun::star::drawing::EnhancedCustomShapeParameter aRadiusRangeMinimum;
com::sun::star::drawing::EnhancedCustomShapeParameter aRadiusRangeMaximum;
com::sun::star::drawing::EnhancedCustomShapeParameter aXRangeMinimum;
com::sun::star::drawing::EnhancedCustomShapeParameter aXRangeMaximum;
com::sun::star::drawing::EnhancedCustomShapeParameter aYRangeMinimum;
com::sun::star::drawing::EnhancedCustomShapeParameter aYRangeMaximum;
+
+ Handle() : bMirroredX ( sal_False ), bMirroredY ( sal_False ), bSwitched( sal_False ),
+ nRefX( -1 ), nRefY( -1 ), nRefAngle( -1 ), nRefR( -1 ) {};
};
sal_Bool IsFlipVert() { return bFlipV; };
diff --git a/svx/source/dialog/makefile.mk b/svx/source/dialog/makefile.mk
index 01951caa1471..ac608fae8ec8 100644
--- a/svx/source/dialog/makefile.mk
+++ b/svx/source/dialog/makefile.mk
@@ -74,6 +74,7 @@ SRC2FILES = \
LIB1TARGET=$(SLB)$/$(TARGET)-core.lib
LIB1OBJFILES= \
+ $(SLO)$/checklbx.obj \
$(SLO)$/dialmgr.obj\
$(SLO)$/dlgutil.obj \
$(SLO)$/framelink.obj\
@@ -86,7 +87,6 @@ LIB2TARGET=$(SLB)$/$(TARGET).lib
LIB2OBJFILES= \
$(SLO)$/charmap.obj \
- $(SLO)$/checklbx.obj \
$(SLO)$/connctrl.obj \
$(SLO)$/contwnd.obj \
$(SLO)$/ctredlin.obj \
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 00c1edaa7f04..7705a2dd08df 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -1214,9 +1214,7 @@ void SvxRuler::UpdateTabs()
long nRightFrameMargin = GetRightFrameMargin();
//#i24363# tab stops relative to indent
- const long nParaItemTxtLeft = pRuler_Imp->bIsTabsRelativeToIndent ?
- pParaItem->GetTxtLeft() :
- 0;
+ const long nParaItemTxtLeft = pParaItem->GetTxtLeft();
const long lParaIndent = nLeftFrameMargin + nParaItemTxtLeft;
@@ -1253,7 +1251,7 @@ void SvxRuler::UpdateTabs()
const SvxTabStop *pTab = &(*pTabStopItem)[j];
pTabs[nTabCount+TAB_GAP].nPos =
ConvertHPosPixel(
- lParaIndent + pTab->GetTabPos() + lAppNullOffset);
+ (pRuler_Imp->bIsTabsRelativeToIndent ? lParaIndent : 0 ) + pTab->GetTabPos() + lAppNullOffset);
if(bRTL)
{
pTabs[nTabCount+TAB_GAP].nPos = lParaIndentPix + lRightPixMargin - pTabs[nTabCount+TAB_GAP].nPos;
@@ -1286,13 +1284,37 @@ void SvxRuler::UpdateTabs()
{
for(j = 0; j < nDefTabBuf; ++j)
{
- pTabs[nTabCount + TAB_GAP].nPos =
+ if( j == 0 )
+ {
+ //set the first default tab stop
+ if(pRuler_Imp->bIsTabsRelativeToIndent)
+ {
+ pTabs[nTabCount + TAB_GAP].nPos =
+ (pTabs[nTabCount].nPos + nDefTabDist);
+ pTabs[nTabCount + TAB_GAP].nPos -=
+ ((pTabs[nTabCount + TAB_GAP].nPos - lParaIndentPix)
+ % nDefTabDist );
+ }
+ else
+ {
+ if( pTabs[nTabCount].nPos < 0 )
+ {
+ pTabs[nTabCount + TAB_GAP].nPos = ( pTabs[nTabCount].nPos / nDefTabDist ) * nDefTabDist;
+ }
+ else
+ {
+ pTabs[nTabCount + TAB_GAP].nPos = ( pTabs[nTabCount].nPos / nDefTabDist + 1 ) * nDefTabDist;
+ }
+ }
+
+ }
+ else
+ {
+ //simply add the default distance to the last position
+ pTabs[nTabCount + TAB_GAP].nPos =
pTabs[nTabCount].nPos + nDefTabDist;
+ }
- if(j == 0 )
- pTabs[nTabCount + TAB_GAP].nPos -=
- ((pTabs[nTabCount + TAB_GAP].nPos - lParaIndentPix)
- % nDefTabDist );
if(pTabs[nTabCount+TAB_GAP].nPos >= lRightIndent)
break;
pTabs[nTabCount + TAB_GAP].nStyle = RULER_TAB_DEFAULT;
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index d799aec38eb7..036f700e6e96 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -336,8 +336,18 @@ UINT16 E3dScene::GetObjIdentifier() const
void E3dScene::SetBoundRectDirty()
{
- // avoid resetting aOutRect which in case of this object is model data,
- // not re-creatable view data
+ E3dScene* pScene = GetScene();
+
+ if(pScene == this)
+ {
+ // avoid resetting aOutRect which in case of a 3D scene used as 2d object
+ // is model data,not re-creatable view data
+ }
+ else
+ {
+ // if not the outmost scene it is used as group in 3d, call parent
+ E3dObject::SetBoundRectDirty();
+ }
}
/*************************************************************************
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 97fee2250658..047faef2cb41 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -75,6 +75,7 @@
#include <svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx>
#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
#define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
@@ -1066,77 +1067,39 @@ void E3dView::ConvertMarkedObjTo3D(BOOL bExtrude, basegfx::B2DPoint aPnt1, baseg
struct E3dDepthNeighbour
{
- E3dDepthNeighbour* pNext;
- E3dExtrudeObj* pObj;
-
- E3dDepthNeighbour() { pNext = NULL; pObj = NULL; }
+ E3dDepthNeighbour* mpNext;
+ E3dExtrudeObj* mpObj;
+ basegfx::B2DPolyPolygon maPreparedPolyPolygon;
+
+ E3dDepthNeighbour()
+ : mpNext(0),
+ mpObj(0),
+ maPreparedPolyPolygon()
+ {
+ }
};
struct E3dDepthLayer
{
- E3dDepthLayer* pDown;
- E3dDepthNeighbour* pNext;
-
- E3dDepthLayer() { pDown = NULL; pNext = NULL; }
- ~E3dDepthLayer() { while(pNext) { E3dDepthNeighbour* pSucc = pNext->pNext; delete pNext; pNext = pSucc; }}
-};
-
-bool ImpDoesOverlap(const basegfx::B2DPolygon& rPolygonA, const basegfx::B2DPolygon& rPolygonB)
-{
- bool bRetval(false);
- const basegfx::B2DRange aRangeA(basegfx::tools::getRange(rPolygonA));
- const basegfx::B2DRange aRangeB(basegfx::tools::getRange(rPolygonB));
+ E3dDepthLayer* mpDown;
+ E3dDepthNeighbour* mpNext;
- if(aRangeA.overlaps(aRangeB))
+ E3dDepthLayer()
+ : mpDown(0),
+ mpNext(0)
{
- // A in B ?
- if(basegfx::tools::isInside(rPolygonA, rPolygonB))
- return true;
-
- // B in A ?
- if(basegfx::tools::isInside(rPolygonB, rPolygonA))
- return true;
-
- // A and B the same ?
- if(basegfx::tools::isInside(rPolygonB, rPolygonA, true))
- return true;
}
- return bRetval;
-}
-
-bool ImpDoesOverlap(const basegfx::B2DPolyPolygon& rPolyPolygonA, const basegfx::B2DPolyPolygon& rPolyPolygonB)
-{
- bool bRetval(false);
- const basegfx::B2DRange aRangeA(basegfx::tools::getRange(rPolyPolygonA));
- const basegfx::B2DRange aRangeB(basegfx::tools::getRange(rPolyPolygonB));
-
- if(aRangeA.overlaps(aRangeB))
+ ~E3dDepthLayer()
{
- const sal_uInt32 nCntA(rPolyPolygonA.count());
- const sal_uInt32 nCntB(rPolyPolygonB.count());
-
- for(sal_uInt32 a(0L); !bRetval && a < nCntA; a++)
+ while(mpNext)
{
- const basegfx::B2DPolygon aPolygonA(rPolyPolygonA.getB2DPolygon(a));
-
- if(aPolygonA.isClosed())
- {
- for(sal_uInt32 b(0L); !bRetval && b < nCntB; b++)
- {
- const basegfx::B2DPolygon aPolygonB(rPolyPolygonB.getB2DPolygon(b));
-
- if(aPolygonB.isClosed())
- {
- bRetval = ImpDoesOverlap(aPolygonA, aPolygonB);
- }
- }
- }
+ E3dDepthNeighbour* pSucc = mpNext->mpNext;
+ delete mpNext;
+ mpNext = pSucc;
}
}
-
- return bRetval;
-}
+};
void E3dView::DoDepthArrange(E3dScene* pScene, double fDepth)
{
@@ -1147,39 +1110,41 @@ void E3dView::DoDepthArrange(E3dScene* pScene, double fDepth)
E3dDepthLayer* pBaseLayer = NULL;
E3dDepthLayer* pLayer = NULL;
INT32 nNumLayers = 0;
- //SfxItemPool& rPool = pMod->GetItemPool();
while(aIter.IsMore())
{
- E3dObject* pSubObj = (E3dObject*)aIter.Next();
+ E3dExtrudeObj* pExtrudeObj = dynamic_cast< E3dExtrudeObj* >(aIter.Next());
- if(pSubObj && pSubObj->ISA(E3dExtrudeObj))
+ if(pExtrudeObj)
{
- E3dExtrudeObj* pExtrudeObj = (E3dExtrudeObj*)pSubObj;
- const basegfx::B2DPolyPolygon aExtrudePoly(pExtrudeObj->GetExtrudePolygon());
-
+ const basegfx::B2DPolyPolygon aExtrudePoly(
+ basegfx::tools::prepareForPolygonOperation(pExtrudeObj->GetExtrudePolygon()));
const SfxItemSet& rLocalSet = pExtrudeObj->GetMergedItemSet();
- XFillStyle eLocalFillStyle = ITEMVALUE(rLocalSet, XATTR_FILLSTYLE, XFillStyleItem);
- Color aLocalColor = ((const XFillColorItem&)(rLocalSet.Get(XATTR_FILLCOLOR))).GetColorValue();
+ const XFillStyle eLocalFillStyle = ITEMVALUE(rLocalSet, XATTR_FILLSTYLE, XFillStyleItem);
+ const Color aLocalColor = ((const XFillColorItem&)(rLocalSet.Get(XATTR_FILLCOLOR))).GetColorValue();
- // ExtrudeObj einordnen
+ // sort in ExtrudeObj
if(pLayer)
{
- // Gibt es eine Ueberschneidung mit einem Objekt dieses
- // Layers?
- BOOL bOverlap(FALSE);
- E3dDepthNeighbour* pAct = pLayer->pNext;
+ // do we have overlap with an object of this layer?
+ bool bOverlap(false);
+ E3dDepthNeighbour* pAct = pLayer->mpNext;
while(!bOverlap && pAct)
{
- // ueberlappen sich pAct->pObj und pExtrudeObj ?
- const basegfx::B2DPolyPolygon aActPoly(pAct->pObj->GetExtrudePolygon());
- bOverlap = ImpDoesOverlap(aExtrudePoly, aActPoly);
+ // do pAct->mpObj and pExtrudeObj overlap? Check by
+ // using logical AND clipping
+ const basegfx::B2DPolyPolygon aAndPolyPolygon(
+ basegfx::tools::solvePolygonOperationAnd(
+ aExtrudePoly,
+ pAct->maPreparedPolyPolygon));
+
+ bOverlap = (0 != aAndPolyPolygon.count());
if(bOverlap)
{
// second ciriteria: is another fillstyle or color used?
- const SfxItemSet& rCompareSet = pAct->pObj->GetMergedItemSet();
+ const SfxItemSet& rCompareSet = pAct->mpObj->GetMergedItemSet();
XFillStyle eCompareFillStyle = ITEMVALUE(rCompareSet, XATTR_FILLSTYLE, XFillStyleItem);
@@ -1201,71 +1166,74 @@ void E3dView::DoDepthArrange(E3dScene* pScene, double fDepth)
}
}
- pAct = pAct->pNext;
+ pAct = pAct->mpNext;
}
if(bOverlap)
{
- // ja, beginne einen neuen Layer
- pLayer->pDown = new E3dDepthLayer;
- pLayer = pLayer->pDown;
+ // yes, start a new layer
+ pLayer->mpDown = new E3dDepthLayer;
+ pLayer = pLayer->mpDown;
nNumLayers++;
- pLayer->pNext = new E3dDepthNeighbour;
- pLayer->pNext->pObj = pExtrudeObj;
+ pLayer->mpNext = new E3dDepthNeighbour;
+ pLayer->mpNext->mpObj = pExtrudeObj;
+ pLayer->mpNext->maPreparedPolyPolygon = aExtrudePoly;
}
else
{
- // nein, Objekt kann in aktuellen Layer
+ // no, add to current layer
E3dDepthNeighbour* pNewNext = new E3dDepthNeighbour;
- pNewNext->pObj = pExtrudeObj;
- pNewNext->pNext = pLayer->pNext;
- pLayer->pNext = pNewNext;
+ pNewNext->mpObj = pExtrudeObj;
+ pNewNext->maPreparedPolyPolygon = aExtrudePoly;
+ pNewNext->mpNext = pLayer->mpNext;
+ pLayer->mpNext = pNewNext;
}
}
else
{
- // erster Layer ueberhaupt
+ // first layer ever
pBaseLayer = new E3dDepthLayer;
pLayer = pBaseLayer;
nNumLayers++;
- pLayer->pNext = new E3dDepthNeighbour;
- pLayer->pNext->pObj = pExtrudeObj;
+ pLayer->mpNext = new E3dDepthNeighbour;
+ pLayer->mpNext->mpObj = pExtrudeObj;
+ pLayer->mpNext->maPreparedPolyPolygon = aExtrudePoly;
}
}
}
- // Anzahl Layer steht fest
+ // number of layers is done
if(nNumLayers > 1)
{
- // Arrangement ist notwendig
+ // need to be arranged
double fMinDepth = fDepth * 0.8;
double fStep = (fDepth - fMinDepth) / (double)nNumLayers;
pLayer = pBaseLayer;
while(pLayer)
{
- // an pLayer entlangspazieren
- E3dDepthNeighbour* pAct = pLayer->pNext;
+ // move along layer
+ E3dDepthNeighbour* pAct = pLayer->mpNext;
while(pAct)
{
- // Anpassen
- pAct->pObj->SetMergedItem(SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, sal_uInt32(fMinDepth + 0.5)));
+ // adapt extrude value
+ pAct->mpObj->SetMergedItem(SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, sal_uInt32(fMinDepth + 0.5)));
- // Naechster Eintrag
- pAct = pAct->pNext;
+ // next
+ pAct = pAct->mpNext;
}
- // naechster Layer
- pLayer = pLayer->pDown;
+ // next layer
+ pLayer = pLayer->mpDown;
fMinDepth += fStep;
}
}
- // angelegte Strukturen aufraeumen
+ // cleanup
while(pBaseLayer)
{
- pLayer = pBaseLayer->pDown;
+ pLayer = pBaseLayer->mpDown;
delete pBaseLayer;
pBaseLayer = pLayer;
}
diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx
index 672dd32d28b5..0a6e36219ed3 100644
--- a/svx/source/fmcomp/dbaexchange.cxx
+++ b/svx/source/fmcomp/dbaexchange.cxx
@@ -135,30 +135,19 @@ namespace svx
{
try
{
- // need a query composer for this
- Reference< XSQLQueryComposerFactory > xComposerFac;
- _rxForm->getPropertyValue(FM_PROP_ACTIVE_CONNECTION) >>= xComposerFac;
- Reference< XSQLQueryComposer > xComposer;
- if (xComposerFac.is())
- xComposer = xComposerFac->createQueryComposer();
-
- if (xComposer.is())
+ Reference< XTablesSupplier > xSupTab;
+ _rxForm->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SingleSelectQueryComposer"))) >>= xSupTab;
+
+ if(xSupTab.is())
{
- ::rtl::OUString sActiveCommand;
- _rxForm->getPropertyValue(FM_PROP_ACTIVECOMMAND) >>= sActiveCommand;
- xComposer->setQuery(sActiveCommand);
- Reference< XTablesSupplier > xSupTab(xComposer, UNO_QUERY);
- if(xSupTab.is())
+ Reference< XNameAccess > xNames = xSupTab->getTables();
+ if (xNames.is())
{
- Reference< XNameAccess > xNames = xSupTab->getTables();
- if (xNames.is())
+ Sequence< ::rtl::OUString > aTables = xNames->getElementNames();
+ if (1 == aTables.getLength())
{
- Sequence< ::rtl::OUString > aTables = xNames->getElementNames();
- if (1 == aTables.getLength())
- {
- sCommand = aTables[0];
- nCommandType = CommandType::TABLE;
- }
+ sCommand = aTables[0];
+ nCommandType = CommandType::TABLE;
}
}
}
@@ -457,34 +446,10 @@ namespace svx
String sObjectKind = (CommandType::TABLE == nObjectType) ? String('1') : String('0');
// check if the SQL-statement is modified
- sal_Bool bHasFilterOrSort(sal_False);
::rtl::OUString sCompleteStatement;
try
{
- ::rtl::OUString sFilter, sSort;
- if (::cppu::any2bool(_rxLivingForm->getPropertyValue(FM_PROP_APPLYFILTER)))
- _rxLivingForm->getPropertyValue(FM_PROP_FILTER) >>= sFilter;
- _rxLivingForm->getPropertyValue(FM_PROP_SORT) >>= sSort;
- bHasFilterOrSort = (sFilter.getLength()>0) || (sSort.getLength()>0);
-
_rxLivingForm->getPropertyValue(FM_PROP_ACTIVECOMMAND) >>= sCompleteStatement;
-
- // create a composer
- Reference< XSQLQueryComposerFactory > xFactory( xConnection, UNO_QUERY );
- Reference< XSQLQueryComposer > xComposer;
- if (xFactory.is())
- xComposer = xFactory->createQueryComposer();
-
- // let the composer compose
- if (xComposer.is())
- {
- xComposer->setQuery(sCompleteStatement);
- xComposer->setFilter(sFilter);
- xComposer->setOrder(sSort);
- sCompleteStatement = xComposer->getComposedQuery();
- }
- // Usually, I would expect the result of the composing to be the same as the ActiveCommand property
- // But this code here is pretty old, and I don't know wha the side effects are if I remove it now ...
}
catch(Exception&)
{
@@ -496,7 +461,7 @@ namespace svx
,sConnectionResource
,nObjectType
,sObjectName,xConnection
- ,!((CommandType::QUERY == nObjectType) && !bHasFilterOrSort)
+ ,!((CommandType::QUERY == nObjectType))
,sCompleteStatement);
}
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index cbe9b49b81f1..d64b0c9ab958 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -210,10 +210,11 @@ void FmGridHeader::RequestHelp( const HelpEvent& rHEvt )
Reference< ::com::sun::star::container::XIndexContainer > xColumns(static_cast<FmGridControl*>(GetParent())->GetPeer()->getColumns());
try
{
- Reference< ::com::sun::star::beans::XPropertySet > xColumn;
- ::cppu::extractInterface(xColumn, xColumns->getByIndex(nPos));
+ Reference< ::com::sun::star::beans::XPropertySet > xColumn(xColumns->getByIndex(nPos),UNO_QUERY);
::rtl::OUString aHelpText;
xColumn->getPropertyValue(FM_PROP_HELPTEXT) >>= aHelpText;
+ if ( !aHelpText.getLength() )
+ xColumn->getPropertyValue(FM_PROP_DESCRIPTION) >>= aHelpText;
if ( aHelpText.getLength() )
{
if ( rHEvt.GetMode() & HELPMODE_BALLOON )
@@ -1737,11 +1738,12 @@ void FmGridControl::InitColumnByField(
_pColumn->SetObject( (sal_Int16)nFieldPos );
return;
}
-
+/*
// handle readonly columns
sal_Bool bReadOnly = sal_True;
xField->getPropertyValue( FM_PROP_ISREADONLY ) >>= bReadOnly;
_pColumn->SetReadOnly( bReadOnly );
+*/
}
// the control type is determined by the ColumnServiceName
@@ -1999,7 +2001,11 @@ namespace
{
Reference<XPropertySet> xProp(GetPeer()->getColumns(),UNO_QUERY);
if ( xProp.is() )
+ {
xProp->getPropertyValue(FM_PROP_HELPTEXT) >>= sRetText;
+ if ( !sRetText.getLength() )
+ xProp->getPropertyValue(FM_PROP_DESCRIPTION) >>= sRetText;
+ }
}
break;
case ::svt::BBTYPE_COLUMNHEADERCELL:
@@ -2008,6 +2014,13 @@ namespace
GetModelColumnPos(
sal::static_int_cast< sal_uInt16 >(_nPosition)),
FM_PROP_HELPTEXT);
+ if ( !sRetText.getLength() )
+ sRetText = getColumnPropertyFromPeer(
+ GetPeer(),
+ GetModelColumnPos(
+ sal::static_int_cast< sal_uInt16 >(_nPosition)),
+ FM_PROP_DESCRIPTION);
+
break;
default:
sRetText = DbGridControl::GetAccessibleObjectDescription(_eObjType,_nPosition);
@@ -2029,7 +2042,7 @@ void FmGridControl::Select()
// die HandleColumn wird nicht selektiert
switch (nSelectedColumn)
{
- case -1 : break; // no selection
+ case SAL_MAX_UINT16: break; // no selection
case 0 : nSelectedColumn = SAL_MAX_UINT16; break;
// handle col can't be seledted
default :
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 6a3e4a17f5d7..bb8afd502d43 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -45,6 +45,8 @@
#include <com/sun/star/form/XBoundComponent.hpp>
#include <com/sun/star/script/XEventAttacherManager.hpp>
#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
+#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/XStatement.hpp>
@@ -82,6 +84,7 @@ using namespace ::svt;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdbc;
+using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::form;
@@ -551,6 +554,7 @@ TYPEINIT1( DbFilterField, DbCellControl )
//------------------------------------------------------------------------------
DbCellControl::DbCellControl( DbGridColumn& _rColumn, sal_Bool /*_bText*/ )
:OPropertyChangeListener(m_aMutex)
+ ,m_pFieldChangeBroadcaster(NULL)
,m_bTransparent( sal_False )
,m_bAlignedController( sal_True )
,m_bAccessingValueProperty( sal_False )
@@ -574,6 +578,27 @@ DbCellControl::DbCellControl( DbGridColumn& _rColumn, sal_Bool /*_bText*/ )
implDoPropertyListening( FM_PROP_STATE, sal_False );
implDoPropertyListening( FM_PROP_TEXT, sal_False );
implDoPropertyListening( FM_PROP_EFFECTIVE_VALUE, sal_False );
+
+ // be listener at the bound field as well
+ try
+ {
+ Reference< XPropertySetInfo > xPSI( xColModelProps->getPropertySetInfo(), UNO_SET_THROW );
+ if ( xPSI->hasPropertyByName( FM_PROP_BOUNDFIELD ) )
+ {
+ Reference< XPropertySet > xField;
+ xColModelProps->getPropertyValue( FM_PROP_BOUNDFIELD ) >>= xField;
+ if ( xField.is() )
+ {
+ m_pFieldChangeBroadcaster = new ::comphelper::OPropertyChangeMultiplexer(this, xField);
+ m_pFieldChangeBroadcaster->acquire();
+ m_pFieldChangeBroadcaster->addProperty( FM_PROP_ISREADONLY );
+ }
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_ERROR( "DbCellControl::doPropertyListening: caught an exception!" );
+ }
}
}
@@ -605,17 +630,22 @@ void DbCellControl::doPropertyListening( const ::rtl::OUString& _rPropertyName )
{
implDoPropertyListening( _rPropertyName );
}
-
//------------------------------------------------------------------------------
-DbCellControl::~DbCellControl()
+void lcl_clearBroadCaster(::comphelper::OPropertyChangeMultiplexer*& _pBroadcaster)
{
- if ( m_pModelChangeBroadcaster )
+ if ( _pBroadcaster )
{
- m_pModelChangeBroadcaster->dispose();
- m_pModelChangeBroadcaster->release();
- m_pModelChangeBroadcaster = NULL;
+ _pBroadcaster->dispose();
+ _pBroadcaster->release();
+ _pBroadcaster = NULL;
// no delete, this is done implicitly
}
+}
+//------------------------------------------------------------------------------
+DbCellControl::~DbCellControl()
+{
+ lcl_clearBroadCaster(m_pModelChangeBroadcaster);
+ lcl_clearBroadCaster(m_pFieldChangeBroadcaster);
delete m_pWindow;
delete m_pPainter;
@@ -660,7 +690,14 @@ void DbCellControl::_propertyChanged(const PropertyChangeEvent& _rEvent) throw(R
}
else if ( _rEvent.PropertyName.equals( FM_PROP_READONLY ) )
{
- implAdjustReadOnly( xSourceProps );
+ implAdjustReadOnly( xSourceProps, true);
+ }
+ else if ( _rEvent.PropertyName.equals( FM_PROP_ISREADONLY ) )
+ {
+ sal_Bool bReadOnly = sal_True;
+ _rEvent.NewValue >>= bReadOnly;
+ m_rColumn.SetReadOnly(bReadOnly);
+ implAdjustReadOnly( xSourceProps, false);
}
else if ( _rEvent.PropertyName.equals( FM_PROP_ENABLED ) )
{
@@ -798,7 +835,7 @@ void DbCellControl::ImplInitWindow( Window& rParent, const InitWindowFacet _eIni
}
//------------------------------------------------------------------------------
-void DbCellControl::implAdjustReadOnly( const Reference< XPropertySet >& _rxModel )
+void DbCellControl::implAdjustReadOnly( const Reference< XPropertySet >& _rxModel,bool i_bReadOnly )
{
DBG_ASSERT( m_pWindow, "DbCellControl::implAdjustReadOnly: not to be called without window!" );
DBG_ASSERT( _rxModel.is(), "DbCellControl::implAdjustReadOnly: invalid model!" );
@@ -807,9 +844,12 @@ void DbCellControl::implAdjustReadOnly( const Reference< XPropertySet >& _rxMode
Edit* pEditWindow = dynamic_cast< Edit* >( m_pWindow );
if ( pEditWindow )
{
- sal_Bool bReadOnly = sal_True;
- _rxModel->getPropertyValue( FM_PROP_READONLY ) >>= bReadOnly;
- static_cast< Edit* >( m_pWindow )->SetReadOnly( m_rColumn.IsReadOnly() || bReadOnly );
+ sal_Bool bReadOnly = m_rColumn.IsReadOnly();
+ if ( !bReadOnly )
+ {
+ _rxModel->getPropertyValue( i_bReadOnly ? FM_PROP_READONLY : FM_PROP_ISREADONLY) >>= bReadOnly;
+ }
+ static_cast< Edit* >( m_pWindow )->SetReadOnly( bReadOnly );
}
}
}
@@ -846,7 +886,7 @@ void DbCellControl::Init( Window& rParent, const Reference< XRowSet >& _rxCursor
if ( xModelPSI->hasPropertyByName( FM_PROP_READONLY ) )
{
- implAdjustReadOnly( xModel );
+ implAdjustReadOnly( xModel,true );
}
if ( xModelPSI->hasPropertyByName( FM_PROP_ENABLED ) )
@@ -1003,7 +1043,7 @@ double DbCellControl::GetValue(const Reference< ::com::sun::star::sdb::XColumn >
//------------------------------------------------------------------------------
void DbCellControl::invalidatedController()
{
- m_rColumn.GetParent().refreshController(m_rColumn.GetId(), DbGridControl::GrantCellControlAccess());
+ m_rColumn.GetParent().refreshController(m_rColumn.GetId(), DbGridControl::GrantControlAccess());
}
/*************************************************************************/
@@ -3039,43 +3079,22 @@ void DbFilterField::Update()
if (!xForm.is())
return;
- Reference< XConnection > xConnection(getRowSetConnection(xForm));
- if (!xConnection.is())
- return;
-
- Reference< ::com::sun::star::sdb::XSQLQueryComposerFactory > xFactory(xConnection, UNO_QUERY);
- if (!xFactory.is())
- {
- DBG_ERROR("DbFilterField::Update : used the right place to request the ::com::sun::star::sdb::XSQLQueryComposerFactory interface ?");
- return;
- }
-
- Reference< ::com::sun::star::sdb::XSQLQueryComposer > xComposer = xFactory->createQueryComposer();
- try
- {
- Reference< ::com::sun::star::beans::XPropertySet > xFormAsSet(xForm, UNO_QUERY);
- ::rtl::OUString sStatement;
- xFormAsSet->getPropertyValue(FM_PROP_ACTIVECOMMAND) >>= sStatement;
- xComposer->setQuery(sStatement);
- }
- catch(const Exception&)
- {
- ::comphelper::disposeComponent(xComposer);
- return;
- }
+ Reference<XPropertySet> xFormProp(xForm,UNO_QUERY);
+ Reference< XTablesSupplier > xSupTab;
+ xFormProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SingleSelectQueryComposer"))) >>= xSupTab;
- Reference< ::com::sun::star::beans::XPropertySet > xComposerAsSet(xComposer, UNO_QUERY);
- if (!xComposerAsSet.is())
+ Reference< XConnection > xConnection(getRowSetConnection(xForm));
+ if (!xSupTab.is())
return;
// search the field
- Reference< ::com::sun::star::container::XNameAccess > xFieldNames;
- Reference< ::com::sun::star::container::XNameAccess > xTablesNames;
- Reference< ::com::sun::star::beans::XPropertySet > xComposerFieldAsSet;
+ Reference< XColumnsSupplier > xSupCol(xSupTab,UNO_QUERY);
+ Reference< ::com::sun::star::container::XNameAccess > xFieldNames = xSupCol->getColumns();
+ if (!xFieldNames->hasByName(aName))
+ return;
- ::cppu::extractInterface(xFieldNames, xComposerAsSet->getPropertyValue(FM_PROP_SELECTED_FIELDS));
- ::cppu::extractInterface(xTablesNames, xComposerAsSet->getPropertyValue(FM_PROP_SELECTED_TABLES));
- ::cppu::extractInterface(xComposerFieldAsSet, xFieldNames->getByName(aName));
+ Reference< ::com::sun::star::container::XNameAccess > xTablesNames = xSupTab->getTables();
+ Reference< ::com::sun::star::beans::XPropertySet > xComposerFieldAsSet(xFieldNames->getByName(aName),UNO_QUERY);
if (xComposerFieldAsSet.is() && ::comphelper::hasProperty(FM_PROP_TABLENAME, xComposerFieldAsSet) &&
::comphelper::hasProperty(FM_PROP_FIELDSOURCE, xComposerFieldAsSet))
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 8cc52e4c0b7d..1944bd47dad5 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -44,6 +44,8 @@
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/sdb/XResultSetAccess.hpp>
+#include <com/sun/star/sdb/RowChangeAction.hpp>
+#include <com/sun/star/sdb/XRowsChangeBroadcaster.hpp>
#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
#include <com/sun/star/container/XChild.hpp>
@@ -102,6 +104,39 @@ using namespace com::sun::star::accessibility;
| BROWSER_VLINESFULL \
| BROWSER_HEADERBAR_NEW \
+class RowSetEventListener : public ::cppu::WeakImplHelper1<XRowsChangeListener>
+{
+ DbGridControl* m_pControl;
+public:
+ RowSetEventListener(DbGridControl* i_pControl) : m_pControl(i_pControl)
+ {
+ }
+private:
+ // XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& /*i_aEvt*/) throw ( RuntimeException )
+ {
+ }
+ virtual void SAL_CALL rowsChanged(const ::com::sun::star::sdb::RowsChangeEvent& i_aEvt) throw ( RuntimeException )
+ {
+ if ( i_aEvt.Action == RowChangeAction::UPDATE )
+ {
+ ::DbGridControl::GrantControlAccess aAccess;
+ CursorWrapper* pSeek = m_pControl->GetSeekCursor(aAccess);
+ const DbGridRowRef& rSeekRow = m_pControl->GetSeekRow(aAccess);
+ const Any* pIter = i_aEvt.Bookmarks.getConstArray();
+ const Any* pEnd = pIter + i_aEvt.Bookmarks.getLength();
+ for(;pIter != pEnd;++pIter)
+ {
+ pSeek->moveToBookmark(*pIter);
+ // get the data
+ rSeekRow->SetState(pSeek, sal_True);
+ sal_Int32 nSeekPos = pSeek->getRow() - 1;
+ m_pControl->SetSeekPos(nSeekPos,aAccess);
+ m_pControl->RowModified(nSeekPos);
+ }
+ }
+ }
+};
//==============================================================================
class GridFieldValueListener;
@@ -987,6 +1022,7 @@ DbGridControl::~DbGridControl()
m_pDataSourcePropMultiplexer = NULL;
m_pDataSourcePropListener = NULL;
}
+ m_xRowSetListener.clear();
delete m_pDataCursor;
delete m_pSeekCursor;
@@ -1377,7 +1413,7 @@ sal_Bool DbGridControl::IsPermanentCursorEnabled() const
}
//------------------------------------------------------------------------------
-void DbGridControl::refreshController(sal_uInt16 _nColId, GrantCellControlAccess /*_aAccess*/)
+void DbGridControl::refreshController(sal_uInt16 _nColId, GrantControlAccess /*_aAccess*/)
{
if ((GetCurColumnId() == _nColId) && IsEditing())
{ // the controller which is currently active needs to be refreshed
@@ -1412,6 +1448,7 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt
m_pDataSourcePropMultiplexer = NULL;
m_pDataSourcePropListener = NULL;
}
+ m_xRowSetListener.clear();
// is the new cursor valid ?
// the cursor is only valid if it contains some columns
@@ -1503,7 +1540,7 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt
Reference< XPropertySet > xSet(_xCursor, UNO_QUERY);
if (xSet.is())
{
- // feststellen welche Updatem�glichkeiten bestehen
+ // feststellen welche Updatemoeglichkeiten bestehen
sal_Int32 nConcurrency = ResultSetConcurrency::READ_ONLY;
xSet->getPropertyValue(FM_PROP_RESULTSET_CONCURRENCY) >>= nConcurrency;
@@ -1565,6 +1602,12 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt
xSet->getPropertyValue(FM_PROP_ROWCOUNT) >>= nRecordCount;
m_bRecordCountFinal = ::comphelper::getBOOL(xSet->getPropertyValue(FM_PROP_ROWCOUNTFINAL));
+ m_xRowSetListener = new RowSetEventListener(this);
+ Reference< XRowsChangeBroadcaster> xChangeBroad(xSet,UNO_QUERY);
+ if ( xChangeBroad.is( ) )
+ xChangeBroad->addRowsChangeListener(m_xRowSetListener);
+
+
// insert the currently known rows
// and one row if we are able to insert rows
if (m_nOptions & OPT_INSERT)
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index e02e8664c6ac..8ce3d6e7ba7c 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -43,7 +43,7 @@
#include <svtools/miscopt.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/viewoptions.hxx>
-#include <svl/svtools.hrc>
+#include <svtools/svtools.hrc>
#include <sfx2/app.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/objitem.hxx>
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index f507068b6e2d..96bdd27d62e1 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -78,6 +78,7 @@
#include <svx/fmglob.hxx>
#include <svl/eitem.hxx>
#include <tools/shl.hxx>
+#include <tools/diagnose_ex.h>
#include <svx/svdpage.hxx>
#include <svx/fmmodel.hxx>
#include <svx/dialmgr.hxx>
@@ -98,6 +99,8 @@
#include <svx/svxdlg.hxx> //CHINA001
#include <svx/dialogs.hrc> //CHINA001
+#include "svx/sdrobjectfilter.hxx"
+
#define HANDLE_SQL_ERRORS( action, successflag, context, message ) \
try \
{ \
@@ -544,7 +547,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
case SID_FM_SCROLLBAR:
case SID_FM_SPINBUTTON:
{
- SFX_REQUEST_ARG( rReq, pGrabFocusItem, SfxBoolItem, SID_FM_GRABCONTROLFOCUS, sal_False );
+ SFX_REQUEST_ARG( rReq, pGrabFocusItem, SfxBoolItem, SID_FM_TOGGLECONTROLFOCUS, sal_False );
if ( pGrabFocusItem && pGrabFocusItem->GetValue() )
{ // see below
SfxViewShell* pShell = GetViewShell();
@@ -572,9 +575,9 @@ void FmFormShell::Execute(SfxRequest &rReq)
{
// #99013# if selected with control key, return focus to current view
// do this asynchron, so that the creation can be finished first
- // reusing the SID_FM_GRABCONTROLFOCUS is somewhat hacky ... which it wouldn't if it would have another
+ // reusing the SID_FM_TOGGLECONTROLFOCUS is somewhat hacky ... which it wouldn't if it would have another
// name, so I do not really have a big problem with this ....
- SfxBoolItem aGrabFocusIndicatorItem( SID_FM_GRABCONTROLFOCUS, sal_True );
+ SfxBoolItem aGrabFocusIndicatorItem( SID_FM_TOGGLECONTROLFOCUS, sal_True );
GetViewShell()->GetViewFrame()->GetDispatcher()->Execute( nSlot, SFX_CALLMODE_ASYNCHRON,
&aGrabFocusIndicatorItem, NULL );
}
@@ -595,11 +598,27 @@ void FmFormShell::Execute(SfxRequest &rReq)
}
break;
- case SID_FM_GRABCONTROLFOCUS:
+ case SID_FM_TOGGLECONTROLFOCUS:
{
FmFormView* pFormView = GetFormView();
- if ( pFormView )
+ if ( !pFormView )
+ break;
+
+ // if we execute this ourself, then either the application does not implement an own handling for this,
+ // of we're on the top of the dispatcher stack, which means a control has the focus.
+ // In the latter case, we put the focus to the document window, otherwise, we focus the first control
+ const bool bHasControlFocus = GetImpl()->HasControlFocus();
+ if ( bHasControlFocus )
+ {
+ const OutputDevice* pDevice = GetCurrentViewDevice();
+ Window* pWindow = dynamic_cast< Window* >( const_cast< OutputDevice* >( pDevice ) );
+ if ( pWindow )
+ pWindow->GrabFocus();
+ }
+ else
+ {
pFormView->GrabFirstControlFocus( );
+ }
}
break;
@@ -1353,6 +1372,78 @@ namespace
}
//------------------------------------------------------------------------
+void FmFormShell::ToggleControlFocus( const SdrUnoObj& i_rUnoObject, const SdrView& i_rView, OutputDevice& i_rDevice ) const
+{
+ try
+ {
+ // check if the focus currently is in a control
+ // Well, okay, do it the other way 'round: Check whether the current control of the active controller
+ // actually has the focus. This should be equivalent.
+ const bool bHasControlFocus = GetImpl()->HasControlFocus();
+
+ if ( bHasControlFocus )
+ {
+ Window* pWindow( dynamic_cast< Window* >( &i_rDevice ) );
+ OSL_ENSURE( pWindow, "FmFormShell::ToggleControlFocus: I need a Window, really!" );
+ if ( pWindow )
+ pWindow->GrabFocus();
+ }
+ else
+ {
+ Reference< XControl > xControl;
+ GetFormControl( i_rUnoObject.GetUnoControlModel(), i_rView, i_rDevice, xControl );
+ Reference< XWindow > xControlWindow( xControl, UNO_QUERY );
+ if ( xControlWindow.is() )
+ xControlWindow->setFocus();
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+//------------------------------------------------------------------------
+namespace
+{
+ class FocusableControlsFilter : public ::svx::ISdrObjectFilter
+ {
+ public:
+ FocusableControlsFilter( const SdrView& i_rView, const OutputDevice& i_rDevice )
+ :m_rView( i_rView )
+ ,m_rDevice( i_rDevice )
+ {
+ }
+
+ public:
+ virtual bool includeObject( const SdrObject& i_rObject ) const
+ {
+ const SdrUnoObj* pUnoObj = dynamic_cast< const SdrUnoObj* >( &i_rObject );
+ if ( !pUnoObj )
+ return false;
+
+ Reference< XControl > xControl = pUnoObj->GetUnoControl( m_rView, m_rDevice );
+ return FmXFormView::isFocusable( xControl );
+ }
+
+ private:
+ const SdrView& m_rView;
+ const OutputDevice& m_rDevice;
+ };
+}
+
+//------------------------------------------------------------------------
+::std::auto_ptr< ::svx::ISdrObjectFilter > FmFormShell::CreateFocusableControlFilter( const SdrView& i_rView, const OutputDevice& i_rDevice ) const
+{
+ ::std::auto_ptr< ::svx::ISdrObjectFilter > pFilter;
+
+ if ( !i_rView.IsDesignMode() )
+ pFilter.reset( new FocusableControlsFilter( i_rView, i_rDevice ) );
+
+ return pFilter;
+}
+
+//------------------------------------------------------------------------
SdrUnoObj* FmFormShell::GetFormControl( const Reference< XControlModel >& _rxModel, const SdrView& _rView, const OutputDevice& _rDevice, Reference< XControl >& _out_rxControl ) const
{
if ( !_rxModel.is() )
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 8c752910b15e..52ad139543c5 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -56,6 +56,7 @@
#include "svx/svxids.hrc"
/** === begin UNO includes === **/
+#include <com/sun/star/awt/XWindow2.hpp>
#include <com/sun/star/awt/XCheckBox.hpp>
#include <com/sun/star/awt/XListBox.hpp>
#include <com/sun/star/awt/XTextComponent.hpp>
@@ -941,7 +942,6 @@ void SAL_CALL FmXFormShell::formDeactivated(const EventObject& rEvent) throw( Ru
void FmXFormShell::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::disposing" );
- OSL_TRACE( "--- FmXFormShell::disposing : %p, ........, ........", this );
impl_checkDisposed();
FmXFormShell_BASE::disposing();
@@ -3793,7 +3793,6 @@ void FmXFormShell::SetWizardUsing(sal_Bool _bUseThem)
void FmXFormShell::viewDeactivated( FmFormView& _rCurrentView, sal_Bool _bDeactivateController /* = sal_True */ )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::viewDeactivated" );
- OSL_TRACE( "--- FmXFormShell::viewDeactivated: %p, %p, ........", this, &_rCurrentView );
if ( _rCurrentView.GetImpl() && !_rCurrentView.IsDesignMode() )
{
@@ -3828,7 +3827,6 @@ void FmXFormShell::viewDeactivated( FmFormView& _rCurrentView, sal_Bool _bDeacti
// remove callbacks at the page
if ( pPage )
{
- OSL_TRACE( "--- FmXFormShell::resetHandler : %p, ........, %p", this, pPage );
pPage->GetImpl().SetFormsCreationHdl( Link() );
}
UpdateForms( sal_True );
@@ -3867,7 +3865,6 @@ IMPL_LINK( FmXFormShell, OnFormsCreated, FmFormPage*, /*_pPage*/ )
void FmXFormShell::viewActivated( FmFormView& _rCurrentView, sal_Bool _bSyncAction /* = sal_False */ )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::viewActivated" );
- OSL_TRACE( "--- FmXFormShell::viewActivated : %p, %p, ........", this, &_rCurrentView );
FmFormPage* pPage = _rCurrentView.GetCurPage();
@@ -3897,7 +3894,6 @@ void FmXFormShell::viewActivated( FmFormView& _rCurrentView, sal_Bool _bSyncActi
// set callbacks at the page
if ( pPage )
{
- OSL_TRACE( "--- FmXFormShell::setHandler : %p, ........, %p", this, pPage );
pPage->GetImpl().SetFormsCreationHdl( LINK( this, FmXFormShell, OnFormsCreated ) );
}
@@ -4188,6 +4184,31 @@ void FmXFormShell::handleMouseButtonDown( const SdrViewEvent& _rViewEvent )
}
}
+//------------------------------------------------------------------------------
+bool FmXFormShell::HasControlFocus() const
+{
+ bool bHasControlFocus = false;
+
+ try
+ {
+ Reference< XFormController > xController( getActiveController() );
+ Reference< XControl > xCurrentControl;
+ if ( xController.is() )
+ xCurrentControl.set( xController->getCurrentControl() );
+ if ( xCurrentControl.is() )
+ {
+ Reference< XWindow2 > xPeerWindow( xCurrentControl->getPeer(), UNO_QUERY_THROW );
+ bHasControlFocus = xPeerWindow->hasFocus();
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ return bHasControlFocus;
+}
+
//==============================================================================
//==============================================================================
SearchableControlIterator::SearchableControlIterator(Reference< XInterface> xStartingPoint)
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index 430c52cfa4db..320baea302b7 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -130,7 +130,6 @@ namespace svx
SID_ATTR_LRSPACE, /* 48 */
SID_ATTR_ULSPACE, /* 49 */
SID_ATTR_CHAR_AUTOKERN,
- SID_ATTR_CHAR_OVERLINE,
SID_SET_SUPER_SCRIPT,
SID_SET_SUB_SCRIPT,
SID_CHAR_DLG,
@@ -141,6 +140,7 @@ namespace svx
SID_ATTR_CHAR_RELIEF,
SID_ATTR_PARA_LEFT_TO_RIGHT, /* 950 */
SID_ATTR_PARA_RIGHT_TO_LEFT,
+ SID_ATTR_CHAR_OVERLINE,
0
};
diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx
index 068f4aa8a029..460d2e1cd787 100644
--- a/svx/source/form/fmtools.cxx
+++ b/svx/source/form/fmtools.cxx
@@ -72,6 +72,8 @@
/** === end UNO includes === **/
#include <basic/sbxvar.hxx>
+#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
#include <comphelper/container.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/processfactory.hxx>
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index fd7da1f7eb8f..22681d511b82 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -339,8 +339,6 @@ void FmFormView::GrabFirstControlFocus( sal_Bool _bForceSync )
//------------------------------------------------------------------------
SdrPageView* FmFormView::ShowSdrPage(SdrPage* pPage)
{
- OSL_TRACE( "--- FmFormView::ShowSdrPage : ........, %p, %p", this, pPage );
-
SdrPageView* pPV = E3dView::ShowSdrPage(pPage);
if (pPage)
@@ -377,8 +375,6 @@ SdrPageView* FmFormView::ShowSdrPage(SdrPage* pPage)
//------------------------------------------------------------------------
void FmFormView::HideSdrPage()
{
- OSL_TRACE( "--- FmFormView::HideSdrPage : ........, %p, %p", this, GetCurPage() );
-
// --- 1. deactivate controls
if ( !IsDesignMode() )
DeactivateControls(GetSdrPageView());
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 1b5c7daf371c..0bf6a35abd98 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -823,6 +823,48 @@ void FmXFormView::AutoFocus( sal_Bool _bSync )
else
m_nAutoFocusEvent = Application::PostUserEvent(LINK(this, FmXFormView, OnAutoFocus));
}
+
+// -----------------------------------------------------------------------------
+bool FmXFormView::isFocusable( const Reference< XControl >& i_rControl )
+{
+ if ( !i_rControl.is() )
+ return false;
+
+ try
+ {
+ Reference< XPropertySet > xModelProps( i_rControl->getModel(), UNO_QUERY_THROW );
+
+ // only enabled controls are allowed to participate
+ sal_Bool bEnabled = sal_False;
+ OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_ENABLED ) >>= bEnabled );
+ if ( !bEnabled )
+ return false;
+
+ // check the class id of the control model
+ sal_Int16 nClassId = FormComponentType::CONTROL;
+ OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_CLASSID ) >>= nClassId );
+
+ // controls which are not focussable
+ if ( ( FormComponentType::CONTROL != nClassId )
+ && ( FormComponentType::IMAGEBUTTON != nClassId )
+ && ( FormComponentType::GROUPBOX != nClassId )
+ && ( FormComponentType::FIXEDTEXT != nClassId )
+ && ( FormComponentType::HIDDENCONTROL != nClassId )
+ && ( FormComponentType::IMAGECONTROL != nClassId )
+ && ( FormComponentType::SCROLLBAR != nClassId )
+ && ( FormComponentType::SPINBUTTON!= nClassId )
+ )
+ {
+ return true;
+ }
+ }
+ catch( const Exception& e )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return false;
+}
+
// -----------------------------------------------------------------------------
static Reference< XControl > lcl_firstFocussableControl( const Sequence< Reference< XControl > >& _rControls )
{
@@ -833,47 +875,19 @@ static Reference< XControl > lcl_firstFocussableControl( const Sequence< Referen
const Reference< XControl >* pControlsEnd = _rControls.getConstArray() + _rControls.getLength();
for ( ; pControls != pControlsEnd; ++pControls )
{
- try
- {
- if ( !pControls->is() )
- continue;
-
- Reference< XPropertySet > xModelProps( (*pControls)->getModel(), UNO_QUERY_THROW );
-
- // only enabled controls are allowed to participate
- sal_Bool bEnabled = sal_False;
- OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_ENABLED ) >>= bEnabled );
- if ( !bEnabled )
- continue;
-
- // check the class id of the control model
- sal_Int16 nClassId = FormComponentType::CONTROL;
- OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_CLASSID ) >>= nClassId );
-
- // controls which are not focussable
- if ( ( FormComponentType::CONTROL != nClassId )
- && ( FormComponentType::IMAGEBUTTON != nClassId )
- && ( FormComponentType::GROUPBOX != nClassId )
- && ( FormComponentType::FIXEDTEXT != nClassId )
- && ( FormComponentType::HIDDENCONTROL != nClassId )
- && ( FormComponentType::IMAGECONTROL != nClassId )
- && ( FormComponentType::SCROLLBAR != nClassId )
- && ( FormComponentType::SPINBUTTON!= nClassId )
- )
- {
- xReturn = *pControls;
- break;
- }
- }
- catch( const Exception& e )
+ if ( !pControls->is() )
+ continue;
+
+ if ( FmXFormView::isFocusable( *pControls ) )
{
- (void)e; // make compiler happy
+ xReturn = *pControls;
+ break;
}
-
- if ( !xReturn.is() && _rControls.getLength() )
- xReturn = _rControls[0];
}
+ if ( !xReturn.is() && _rControls.getLength() )
+ xReturn = _rControls[0];
+
return xReturn;
}
@@ -1008,11 +1022,6 @@ IMPL_LINK(FmXFormView, OnAutoFocus, void*, /*EMPTYTAG*/)
}
// -----------------------------------------------------------------------------
-namespace
-{
-}
-
-// -----------------------------------------------------------------------------
void FmXFormView::onCreatedFormObject( FmFormObj& _rFormObject )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::onCreatedFormObject" );
@@ -1590,7 +1599,13 @@ bool FmXFormView::createControlLabelPair( const ::comphelper::ComponentContext&
xLabelModel.set( pLabel->GetUnoControlModel(), UNO_QUERY );
if ( xLabelModel.is() )
{
- xLabelModel->setPropertyValue( FM_PROP_LABEL, makeAny( sFieldName + _rFieldPostfix ) );
+ ::rtl::OUString sLabel;
+ if ( _rxField.is() && _rxField->getPropertySetInfo()->hasPropertyByName(FM_PROP_LABEL) )
+ _rxField->getPropertyValue(FM_PROP_LABEL) >>= sLabel;
+ if ( !sLabel.getLength() )
+ sLabel = sFieldName;
+
+ xLabelModel->setPropertyValue( FM_PROP_LABEL, makeAny( sLabel + _rFieldPostfix ) );
String sObjectLabel( SVX_RES( RID_STR_OBJECT_LABEL ) );
sObjectLabel.SearchAndReplaceAllAscii( "#object#", sFieldName );
xLabelModel->setPropertyValue( FM_PROP_NAME, makeAny( ::rtl::OUString( sObjectLabel ) ) );
diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx
index 5d222e7f5e88..feb160482665 100644
--- a/svx/source/form/formcontrolfactory.cxx
+++ b/svx/source/form/formcontrolfactory.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/form/XFormComponent.hpp>
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun/star/awt/ScrollBarOrientation.hpp>
+#include <com/sun/star/awt/MouseWheelBehavior.hpp>
#include <com/sun/star/form/XGridColumnFactory.hpp>
#include <com/sun/star/style/VerticalAlignment.hpp>
#include <com/sun/star/awt/LineEndFormat.hpp>
@@ -97,6 +98,7 @@ namespace svxform
/** === end UNO using === **/
namespace FormComponentType = ::com::sun::star::form::FormComponentType;
namespace ScrollBarOrientation = ::com::sun::star::awt::ScrollBarOrientation;
+ namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior;
namespace LineEndFormat = ::com::sun::star::awt::LineEndFormat;
namespace ImageScaleMode = ::com::sun::star::awt::ImageScaleMode;
namespace DataType = ::com::sun::star::sdbc::DataType;
@@ -506,6 +508,12 @@ namespace svxform
_rxControlModel->setPropertyValue( FM_PROP_STRICTFORMAT, makeAny( sal_Bool( sal_True ) ) );
}
+ // mouse wheel: don't use it for scrolling by default (i110036)
+ if ( xPSI->hasPropertyByName( FM_PROP_MOUSE_WHEEL_BEHAVIOR ) )
+ {
+ _rxControlModel->setPropertyValue( FM_PROP_MOUSE_WHEEL_BEHAVIOR, makeAny( MouseWheelBehavior::SCROLL_DISABLED ) );
+ }
+
if ( xPSI->hasPropertyByName( FM_PROP_WRITING_MODE ) )
_rxControlModel->setPropertyValue( FM_PROP_WRITING_MODE, makeAny( WritingMode2::CONTEXT ) );
}
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 0c83655042d2..ff60597d70fe 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -2232,7 +2232,7 @@ namespace svxform
{
SdrPaintWindow* pPaintWindow = pFormView->GetPaintWindow( i );
OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
- if ( OUTDEV_WINDOW == rOutDev.GetOutDevType() )
+ if ( ( OUTDEV_WINDOW == rOutDev.GetOutDevType() ) && !aMarkRect.IsEmpty() )
{
pFormView->MakeVisible( aMarkRect, (Window&)rOutDev );
}
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index 7a51348dfaa3..bce51d8d43f5 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -91,9 +91,46 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::form;
using namespace ::com::sun::star::container;
+using namespace ::com::sun::star;
using namespace ::svxform;
using namespace ::svx;
+
+struct ColumnInfo
+{
+ ::rtl::OUString sColumnName;
+ ::rtl::OUString sLabel;
+ bool bColumn;
+ ColumnInfo(const ::rtl::OUString& i_sColumnName,const ::rtl::OUString& i_sLabel)
+ : sColumnName(i_sColumnName)
+ , sLabel(i_sLabel)
+ , bColumn(true)
+ {
+ }
+ ColumnInfo(const ::rtl::OUString& i_sColumnName)
+ : sColumnName(i_sColumnName)
+ , bColumn(false)
+ {
+ }
+};
+
+void lcl_addToList( SvTreeListBox& _rListBox, const uno::Reference< container::XNameAccess>& i_xColumns )
+{
+ uno::Sequence< ::rtl::OUString > aEntries = i_xColumns->getElementNames();
+ const ::rtl::OUString* pEntries = aEntries.getConstArray();
+ sal_Int32 nEntries = aEntries.getLength();
+ for ( sal_Int32 i = 0; i < nEntries; ++i, ++pEntries )
+ {
+ uno::Reference< beans::XPropertySet> xColumn(i_xColumns->getByName(*pEntries),UNO_QUERY_THROW);
+ ::rtl::OUString sLabel;
+ if ( xColumn->getPropertySetInfo()->hasPropertyByName(FM_PROP_LABEL) )
+ xColumn->getPropertyValue(FM_PROP_LABEL) >>= sLabel;
+ if ( sLabel.getLength() )
+ _rListBox.InsertEntry( sLabel,NULL,FALSE,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
+ else
+ _rListBox.InsertEntry( *pEntries,NULL,FALSE,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
+ }
+}
//==================================================================
// class FmFieldWinListBox
//==================================================================
@@ -149,7 +186,8 @@ void FmFieldWinListBox::StartDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPi
aDescriptor[ daConnection ] <<= pTabWin->GetConnection().getTyped();
aDescriptor[ daCommand ] <<= pTabWin->GetObjectName();
aDescriptor[ daCommandType ]<<= pTabWin->GetObjectType();
- aDescriptor[ daColumnName ] <<= ::rtl::OUString( GetEntryText( pSelected ) );
+ ColumnInfo* pInfo = static_cast<ColumnInfo*>(pSelected->GetUserData());
+ aDescriptor[ daColumnName ] <<= pInfo->sColumnName;
TransferableHelper* pTransferColumn = new OColumnTransferable(
aDescriptor, CTF_FIELD_DESCRIPTOR | CTF_CONTROL_EXCHANGE | CTF_COLUMN_DESCRIPTOR
@@ -238,7 +276,8 @@ sal_Bool FmFieldWin::createSelectionControls( )
aDescr[ daCommand ] <<= GetObjectName();
aDescr[ daCommandType ] <<= GetObjectType();
- aDescr[ daColumnName ] <<= ::rtl::OUString( pListBox->GetEntryText( pSelected) );
+ ColumnInfo* pInfo = static_cast<ColumnInfo*>(pSelected->GetUserData());
+ aDescr[ daColumnName ] <<= pInfo->sColumnName;//::rtl::OUString( pListBox->GetEntryText( pSelected) );
// transfer this to the SFX world
SfxUnoAnyItem aDescriptorItem( SID_FM_DATACCESS_DESCRIPTOR, makeAny( aDescr.createPropertyValueSequence() ) );
@@ -344,15 +383,14 @@ void FmFieldWin::UpdateContent(const ::com::sun::star::uno::Reference< ::com::su
// the place, and connectRowset should be replaced with ensureRowSetConnection
// get the fields of the object
- Sequence< ::rtl::OUString> aFieldNames;
- if ( m_aConnection.is() && m_aObjectName.getLength() )
- aFieldNames = getFieldNamesByCommandDescriptor( m_aConnection, m_nObjectType, m_aObjectName );
- // put them into the list
- const ::rtl::OUString* pFieldNames = aFieldNames.getConstArray();
- sal_Int32 nFieldsCount = aFieldNames.getLength();
- for ( sal_Int32 i = 0; i < nFieldsCount; ++i, ++pFieldNames)
- pListBox->InsertEntry( * pFieldNames);
+ if ( m_aConnection.is() && m_aObjectName.getLength() )
+ {
+ Reference< XComponent > xKeepFieldsAlive;
+ Reference< XNameAccess > xColumns = getFieldsByCommandDescriptor( m_aConnection, m_nObjectType, m_aObjectName,xKeepFieldsAlive );
+ if ( xColumns.is() )
+ lcl_addToList(*pListBox,xColumns);
+ }
// Prefix setzen
UniString aPrefix;
diff --git a/svx/source/inc/fmprop.hrc b/svx/source/inc/fmprop.hrc
index 72758a4cac4e..a0592c80b90b 100644
--- a/svx/source/inc/fmprop.hrc
+++ b/svx/source/inc/fmprop.hrc
@@ -174,5 +174,6 @@
#define FM_PROP_INPUT_REQUIRED rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InputRequired" ) )
#define FM_PROP_WRITING_MODE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WritingMode" ) )
#define FM_PROP_MOUSE_WHEEL_BEHAVIOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MouseWheelBehavior" ) )
+#define FM_PROP_DESCRIPTION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Description" ) )
#endif // _SVX_FMPROP_HRC
diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx
index 65a2572cd5af..88d2346b9d20 100644
--- a/svx/source/inc/fmshimp.hxx
+++ b/svx/source/inc/fmshimp.hxx
@@ -481,6 +481,9 @@ public:
// if the form belongs to the controller (extern) displaying a grid, the according internal form will
// be displayed, _xForm else
+ // check if the current control of the active controler has the focus
+ bool HasControlFocus() const;
+
private:
DECL_LINK(OnFoundData, FmFoundRecordInformation*);
DECL_LINK(OnCanceledNotFound, FmFoundRecordInformation*);
diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx
index d643fc4dc403..1131209a384a 100644
--- a/svx/source/inc/fmvwimp.hxx
+++ b/svx/source/inc/fmvwimp.hxx
@@ -240,6 +240,11 @@ public:
void onCreatedFormObject( FmFormObj& _rFormObject );
+ static bool
+ isFocusable(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& i_rControl
+ );
+
private:
FmWinRecList::iterator findWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _rxCC );
//void addWindow(const SdrPageViewWinRec*);
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index c72a59294d6c..acead19ba9ee 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -219,6 +219,7 @@ class DbCellControl
{
private:
::comphelper::OPropertyChangeMultiplexer* m_pModelChangeBroadcaster;
+ ::comphelper::OPropertyChangeMultiplexer* m_pFieldChangeBroadcaster;
private:
sal_Bool m_bTransparent : 1;
@@ -348,7 +349,7 @@ private:
void implDoPropertyListening( const ::rtl::OUString& _rPropertyName, sal_Bool _bWarnIfNotExistent = sal_True );
/// updates the "readonly" setting on m_pWindow, according to the respective property value in the given model
- void implAdjustReadOnly( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
+ void implAdjustReadOnly( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel,bool i_bReadOnly );
/// updates the "enabled" setting on m_pWindow, according to the respective property value in the given model
void implAdjustEnabled( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
diff --git a/svx/source/intro/iso.src b/svx/source/intro/iso.src
index f963d95721fc..ecadfd9d4c6a 100644
--- a/svx/source/intro/iso.src
+++ b/svx/source/intro/iso.src
@@ -30,7 +30,7 @@
#endif
#ifndef _SVTOOLS_HRC
-#include <svl/svtools.hrc>
+#include <svtools/svtools.hrc>
#endif
#include "intro.hrc"
diff --git a/svx/source/intro/makefile.mk b/svx/source/intro/makefile.mk
index 3ed86b3bcda3..4d0686baac04 100644
--- a/svx/source/intro/makefile.mk
+++ b/svx/source/intro/makefile.mk
@@ -36,10 +36,6 @@ TARGET=intro
RSCLOCINC!:=$(RSCLOCINC);$(PRJ)$/RES
-# setting the compiled by $user$ string in the About box
-OOO_VENDOR*=$(USER)$(USERNAME)
-RSCDEFS+=-DOOO_VENDOR="$(OOO_VENDOR)"
-
# --- Allgemein -----------------------------------------------------------
LOCALIZE_ME=intro_tmpl.hrc
diff --git a/svx/source/intro/ooo.src b/svx/source/intro/ooo.src
index b29f3894c0c5..49f6f68fd7e4 100644
--- a/svx/source/intro/ooo.src
+++ b/svx/source/intro/ooo.src
@@ -26,7 +26,7 @@
************************************************************************/
#ifndef _SVTOOLS_HRC
-#include <svl/svtools.hrc>
+#include <svtools/svtools.hrc>
#endif
#ifndef _SVTOOLS_IMAGEMGR_HRC
@@ -93,7 +93,7 @@ ModalDialog RID_DEFAULTABOUT
};
String ABOUT_STR_COPYRIGHT
{
- Text[ en-US ] = "Copyright © 2000, 2010 Oracle and/or its affiliates. All rights reserved.\nThis product was created by " OOO_VENDOR ", based on OpenOffice.org.\nOpenOffice.org acknowledges all community members, especially those mentioned at\n http://www.openoffice.org/welcome/credits.html.";
+ Text[ en-US ] = "Copyright © 2000, 2010 Oracle and/or its affiliates. All rights reserved.\nThis product was created by %OOOVENDOR, based on OpenOffice.org.\nOpenOffice.org acknowledges all community members, especially those mentioned at\n http://www.openoffice.org/welcome/credits.html.";
};
StringArray ABOUT_STR_DEVELOPER_ARY
{
diff --git a/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx b/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx
index ba260e79bba9..cbe9c4a9c615 100644
--- a/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx
+++ b/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx
@@ -61,11 +61,30 @@ namespace sdr
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfMasterPageDescriptor::createViewIndependentPrimitive2DSequence() const
{
drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::attribute::SdrFillAttribute aFill;
+ const SdrPage* pCorrectPage = &GetMasterPageDescriptor().GetOwnerPage();
+ const SdrPageProperties* pCorrectProperties = &pCorrectPage->getSdrPageProperties();
- // build primitive from page fill attributes
- const SfxItemSet& rPageFillAttributes = GetMasterPageDescriptor().getCorrectFillAttributes();
- const drawinglayer::attribute::SdrFillAttribute aFill(
- drawinglayer::primitive2d::createNewSdrFillAttribute(rPageFillAttributes));
+ if(XFILL_NONE == ((const XFillStyleItem&)pCorrectProperties->GetItemSet().Get(XATTR_FILLSTYLE)).GetValue())
+ {
+ pCorrectPage = &GetMasterPageDescriptor().GetUsedPage();
+ pCorrectProperties = &pCorrectPage->getSdrPageProperties();
+ }
+
+ if(pCorrectPage->IsMasterPage() && !pCorrectProperties->GetStyleSheet())
+ {
+ // #i110846# Suppress SdrPage FillStyle for MasterPages without StyleSheets,
+ // else the PoolDefault (XFILL_COLOR and Blue8) will be used. Normally, all
+ // MasterPages should have a StyleSheet excactly for this reason, but historically
+ // e.g. the Notes MasterPage has no StyleSheet set (and there maybe others).
+ pCorrectProperties = 0;
+ }
+
+ if(pCorrectProperties)
+ {
+ // create page fill attributes when correct properties were identified
+ aFill = drawinglayer::primitive2d::createNewSdrFillAttribute(pCorrectProperties->GetItemSet());
+ }
if(!aFill.isDefault())
{
diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
index e486f978fafb..b80b6fcbba88 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
@@ -203,10 +203,18 @@ namespace sdr
}
else
{
- // build primitive from pObject's attributes
- const SfxItemSet& rFillAttributes = rPage.getSdrPageProperties().GetItemSet();
- const drawinglayer::attribute::SdrFillAttribute aFill(
- drawinglayer::primitive2d::createNewSdrFillAttribute(rFillAttributes));
+ drawinglayer::attribute::SdrFillAttribute aFill;
+
+ // #i110846# Suppress SdrPage FillStyle for MasterPages without StyleSheets,
+ // else the PoolDefault (XFILL_COLOR and Blue8) will be used. Normally, all
+ // MasterPages should have a StyleSheet excactly for this reason, but historically
+ // e.g. the Notes MasterPage has no StyleSheet set (and there maybe others).
+ if(rPage.getSdrPageProperties().GetStyleSheet())
+ {
+ // create page fill attributes with correct properties
+ aFill = drawinglayer::primitive2d::createNewSdrFillAttribute(
+ rPage.getSdrPageProperties().GetItemSet());
+ }
if(!aFill.isDefault())
{
diff --git a/svx/source/sdr/contact/viewobjectcontactofgroup.cxx b/svx/source/sdr/contact/viewobjectcontactofgroup.cxx
index 47c2cccbd02d..392b8e923212 100644
--- a/svx/source/sdr/contact/viewobjectcontactofgroup.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofgroup.cxx
@@ -57,51 +57,56 @@ namespace sdr
drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfGroup::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const
{
- const sal_uInt32 nSubHierarchyCount(GetViewContact().GetObjectCount());
+ drawinglayer::primitive2d::Primitive2DSequence xRetval;
- if(nSubHierarchyCount)
+ // check model-view visibility
+ if(isPrimitiveVisible(rDisplayInfo))
{
- const sal_Bool bDoGhostedDisplaying(
- GetObjectContact().DoVisualizeEnteredGroup()
- && !GetObjectContact().isOutputToPrinter()
- && GetObjectContact().getActiveViewContact() == &GetViewContact());
+ const sal_uInt32 nSubHierarchyCount(GetViewContact().GetObjectCount());
- if(bDoGhostedDisplaying)
+ if(nSubHierarchyCount)
{
- rDisplayInfo.ClearGhostedDrawMode();
- }
+ const sal_Bool bDoGhostedDisplaying(
+ GetObjectContact().DoVisualizeEnteredGroup()
+ && !GetObjectContact().isOutputToPrinter()
+ && GetObjectContact().getActiveViewContact() == &GetViewContact());
- // create object hierarchy
- drawinglayer::primitive2d::Primitive2DSequence xRetval(getPrimitive2DSequenceSubHierarchy(rDisplayInfo));
+ if(bDoGhostedDisplaying)
+ {
+ rDisplayInfo.ClearGhostedDrawMode();
+ }
- if(xRetval.hasElements())
- {
- // get ranges
- const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D());
- const ::basegfx::B2DRange aObjectRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xRetval, rViewInformation2D));
- const basegfx::B2DRange aViewRange(rViewInformation2D.getViewport());
+ // create object hierarchy
+ xRetval = getPrimitive2DSequenceSubHierarchy(rDisplayInfo);
- // check geometrical visibility
- if(!aViewRange.isEmpty() && !aViewRange.overlaps(aObjectRange))
+ if(xRetval.hasElements())
{
- // not visible, release
- xRetval.realloc(0);
+ // get ranges
+ const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D());
+ const ::basegfx::B2DRange aObjectRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xRetval, rViewInformation2D));
+ const basegfx::B2DRange aViewRange(rViewInformation2D.getViewport());
+
+ // check geometrical visibility
+ if(!aViewRange.isEmpty() && !aViewRange.overlaps(aObjectRange))
+ {
+ // not visible, release
+ xRetval.realloc(0);
+ }
}
- }
- if(bDoGhostedDisplaying)
+ if(bDoGhostedDisplaying)
+ {
+ rDisplayInfo.SetGhostedDrawMode();
+ }
+ }
+ else
{
- rDisplayInfo.SetGhostedDrawMode();
+ // draw replacement object for group. This will use ViewContactOfGroup::createViewIndependentPrimitive2DSequence
+ // which creates the replacement primitives for an empty group
+ xRetval = ViewObjectContactOfSdrObj::getPrimitive2DSequenceHierarchy(rDisplayInfo);
}
-
- return xRetval;
- }
- else
- {
- // draw replacement object for group. This will use ViewContactOfGroup::createViewIndependentPrimitive2DSequence
- // which creates the replacement primitives for an empty group
- return ViewObjectContactOfSdrObj::getPrimitive2DSequenceHierarchy(rDisplayInfo);
}
+ return xRetval;
}
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
index 8447fe639a28..485afe35f9c1 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
@@ -68,10 +68,17 @@ namespace sdr
return false;
}
- // Test if print output but not printable
- if(GetObjectContact().isOutputToPrinter() && !rObject.IsPrintable())
+ if(GetObjectContact().isOutputToPrinter() )
{
- return false;
+ // Test if print output but not printable
+ if( !rObject.IsPrintable())
+ return false;
+ }
+ else
+ {
+ // test is object is not visible on screen
+ if( !rObject.IsVisible() )
+ return false;
}
// Test for hidden object on MasterPage
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 0aecac047121..1da80b6c245e 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -299,10 +299,14 @@ namespace sdr { namespace contact {
//--------------------------------------------------------------------
void ControlHolder::invalidate() const
{
- Window* pWindow = VCLUnoHelper::GetWindow( m_xControl->getPeer() );
- OSL_ENSURE( pWindow, "ControlHolder::invalidate: no implementation access!" );
- if ( pWindow )
- pWindow->Invalidate();
+ Reference< XWindowPeer > xPeer( m_xControl->getPeer() );
+ if ( xPeer.is() )
+ {
+ Window* pWindow = VCLUnoHelper::GetWindow( xPeer );
+ OSL_ENSURE( pWindow, "ControlHolder::invalidate: no implementation access!" );
+ if ( pWindow )
+ pWindow->Invalidate();
+ }
}
//--------------------------------------------------------------------
@@ -1310,12 +1314,12 @@ namespace sdr { namespace contact {
{
// the layer of our object
SdrLayerID nObjectLayer = _rUnoObject.GetLayer();
- // is the layer we're residing in visible in this view?
- bool bIsObjectLayerVisible = _rPageView.isLayerVisible( nObjectLayer );
+ // is the object we're residing in visible in this view?
+ bool bIsObjectVisible = _rUnoObject.IsVisible() && _rPageView.isLayerVisible( nObjectLayer );
- if ( _bForce || ( bIsObjectLayerVisible != _bIsCurrentlyVisible ) )
+ if ( _bForce || ( bIsObjectVisible != _bIsCurrentlyVisible ) )
{
- _rControl.setVisible( bIsObjectLayerVisible );
+ _rControl.setVisible( bIsObjectVisible );
}
}
}
@@ -1866,7 +1870,8 @@ namespace sdr { namespace contact {
if(pSdrPageView)
{
- const bool bIsLayerVisible(pSdrPageView->GetVisibleLayers().IsSet(getSdrObject().GetLayer()));
+ const SdrObject& rObject = getSdrObject();
+ const bool bIsLayerVisible( rObject.IsVisible() && pSdrPageView->GetVisibleLayers().IsSet(rObject.GetLayer()));
if(rControl.isVisible() != bIsLayerVisible)
{
diff --git a/svx/source/sdr/overlay/overlaybitmapex.cxx b/svx/source/sdr/overlay/overlaybitmapex.cxx
index ac1e5aa4ef1c..2a3a00b25b99 100644
--- a/svx/source/sdr/overlay/overlaybitmapex.cxx
+++ b/svx/source/sdr/overlay/overlaybitmapex.cxx
@@ -27,6 +27,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
+#include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx>
#include <svx/sdr/overlay/overlaybitmapex.hxx>
#include <vcl/salbtype.hxx>
#include <vcl/outdev.hxx>
@@ -41,24 +42,32 @@ namespace sdr
{
drawinglayer::primitive2d::Primitive2DSequence OverlayBitmapEx::createOverlayObjectPrimitive2DSequence()
{
- const drawinglayer::primitive2d::Primitive2DReference aReference(
+ drawinglayer::primitive2d::Primitive2DReference aReference(
new drawinglayer::primitive2d::OverlayBitmapExPrimitive(
getBitmapEx(),
getBasePosition(),
getCenterX(),
getCenterY()));
+ if(basegfx::fTools::more(mfAlpha, 0.0))
+ {
+ const drawinglayer::primitive2d::Primitive2DSequence aNewTransPrimitiveVector(&aReference, 1L);
+ aReference = drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(aNewTransPrimitiveVector, mfAlpha));
+ }
+
return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
}
OverlayBitmapEx::OverlayBitmapEx(
const basegfx::B2DPoint& rBasePos,
const BitmapEx& rBitmapEx,
- sal_uInt16 nCenX, sal_uInt16 nCenY)
+ sal_uInt16 nCenX, sal_uInt16 nCenY, double fAlpha)
: OverlayObjectWithBasePosition(rBasePos, Color(COL_WHITE)),
maBitmapEx(rBitmapEx),
mnCenterX(nCenX),
- mnCenterY(nCenY)
+ mnCenterY(nCenY),
+ mfAlpha(fAlpha)
{
}
diff --git a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
index ac9b6307dd05..2ceea2c69b7d 100644
--- a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
@@ -51,13 +51,11 @@ namespace drawinglayer
if(!getSdrLFSTAttribute().getFill().isDefault()
&& getUnitPolyPolygon().isClosed())
{
- // take care for orientations
- const basegfx::B2DPolyPolygon aOrientedUnitPolyPolygon(
- basegfx::tools::correctOrientations(getUnitPolyPolygon()));
-
+ // #i108255# no need to use correctOrientations here; target is
+ // straight visualisation
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolyPolygonFillPrimitive(
- aOrientedUnitPolyPolygon,
+ getUnitPolyPolygon(),
getTransform(),
getSdrLFSTAttribute().getFill(),
getSdrLFSTAttribute().getFillFloatTransGradient()));
diff --git a/svx/source/svdraw/sdrhittesthelper.cxx b/svx/source/svdraw/sdrhittesthelper.cxx
index 473c09b10f5d..58eef58a9fd6 100644
--- a/svx/source/svdraw/sdrhittesthelper.cxx
+++ b/svx/source/svdraw/sdrhittesthelper.cxx
@@ -60,7 +60,7 @@ SdrObject* SdrObjectPrimitiveHit(
}
else
{
- if(!pVisiLayer || pVisiLayer->IsSet(rObject.GetLayer()))
+ if( rObject.IsVisible() && (!pVisiLayer || pVisiLayer->IsSet(rObject.GetLayer())))
{
// single object, 3d object, empty scene or empty group. Check if
// it's a single 3D object
diff --git a/svx/source/svdraw/sdrmasterpagedescriptor.cxx b/svx/source/svdraw/sdrmasterpagedescriptor.cxx
index 6bcdd8f55856..67b2de8b693c 100644
--- a/svx/source/svdraw/sdrmasterpagedescriptor.cxx
+++ b/svx/source/svdraw/sdrmasterpagedescriptor.cxx
@@ -113,18 +113,6 @@ namespace sdr
|| &maUsedPage != &rCandidate.maUsedPage
|| maVisibleLayers != rCandidate.maVisibleLayers);
}
-
- const SfxItemSet& MasterPageDescriptor::getCorrectFillAttributes() const
- {
- const SfxItemSet& rOwnerPageAtributes = GetOwnerPage().getSdrPageProperties().GetItemSet();
-
- if(XFILL_NONE != ((const XFillStyleItem&)rOwnerPageAtributes.Get(XATTR_FILLSTYLE)).GetValue())
- {
- return rOwnerPageAtributes;
- }
-
- return GetUsedPage().getSdrPageProperties().GetItemSet();
- }
} // end of namespace sdr
//////////////////////////////////////////////////////////////////////////////
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index d831906fa94c..3a3935f819f8 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -189,6 +189,7 @@ SdrItemPool::SdrItemPool(
mppLocalPoolDefaults[SDRATTR_OBJMOVEPROTECT -SDRATTR_START]=new SdrObjMoveProtectItem;
mppLocalPoolDefaults[SDRATTR_OBJSIZEPROTECT -SDRATTR_START]=new SdrObjSizeProtectItem;
mppLocalPoolDefaults[SDRATTR_OBJPRINTABLE -SDRATTR_START]=new SdrObjPrintableItem;
+ mppLocalPoolDefaults[SDRATTR_OBJVISIBLE -SDRATTR_START]=new SdrObjVisibleItem;
mppLocalPoolDefaults[SDRATTR_LAYERID -SDRATTR_START]=new SdrLayerIdItem;
mppLocalPoolDefaults[SDRATTR_LAYERNAME -SDRATTR_START]=new SdrLayerNameItem;
mppLocalPoolDefaults[SDRATTR_OBJECTNAME -SDRATTR_START]=new SdrObjectNameItem;
@@ -546,6 +547,7 @@ void SdrItemPool::TakeItemName(sal_uInt16 nWhich, String& rItemName)
case SDRATTR_OBJMOVEPROTECT : nResId = SIP_SA_OBJMOVEPROTECT;break;
case SDRATTR_OBJSIZEPROTECT : nResId = SIP_SA_OBJSIZEPROTECT;break;
case SDRATTR_OBJPRINTABLE : nResId = SIP_SA_OBJPRINTABLE;break;
+ case SDRATTR_OBJVISIBLE : nResId = SIP_SA_OBJVISIBLE;break;
case SDRATTR_LAYERID : nResId = SIP_SA_LAYERID;break;
case SDRATTR_LAYERNAME : nResId = SIP_SA_LAYERNAME;break;
case SDRATTR_OBJECTNAME : nResId = SIP_SA_OBJECTNAME;break;
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 3b878ce93138..5eae04dbbc87 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -805,6 +805,12 @@ void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark)
void SdrEditView::DeleteMarkedObj()
{
+ // #i110981# return when nothing is to be done at all
+ if(!GetMarkedObjectCount())
+ {
+ return;
+ }
+
// moved breaking action and undo start outside loop
BrkAction();
BegUndo(ImpGetResStr(STR_EditDelete),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_DELETE);
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 48870cda0e02..1ac6d0b89945 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -760,6 +760,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL /*bOnlyH
BOOL bMovProtect=FALSE,bMovProtectDC=FALSE;
BOOL bSizProtect=FALSE,bSizProtectDC=FALSE;
BOOL bPrintable =TRUE ,bPrintableDC=FALSE;
+ BOOL bVisible = TRUE, bVisibleDC=FALSE;
SdrLayerID nLayerId=0; BOOL bLayerDC=FALSE;
XubString aObjName; BOOL bObjNameDC=FALSE,bObjNameSet=FALSE;
long nSnapPosX=0; BOOL bSnapPosXDC=FALSE;
@@ -781,6 +782,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL /*bOnlyH
bMovProtect=pObj->IsMoveProtect();
bSizProtect=pObj->IsResizeProtect();
bPrintable =pObj->IsPrintable();
+ bVisible = pObj->IsVisible();
Rectangle aSnapRect2(pObj->GetSnapRect());
Rectangle aLogicRect2(pObj->GetLogicRect());
nSnapPosX=aSnapRect2.Left();
@@ -798,6 +800,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL /*bOnlyH
if (!bMovProtectDC && bMovProtect!=pObj->IsMoveProtect()) bMovProtectDC=TRUE;
if (!bSizProtectDC && bSizProtect!=pObj->IsResizeProtect()) bSizProtectDC=TRUE;
if (!bPrintableDC && bPrintable !=pObj->IsPrintable()) bPrintableDC=TRUE;
+ if (!bVisibleDC && bVisible !=pObj->IsVisible()) bVisibleDC=TRUE;
if (!bRotAngleDC && nRotAngle !=pObj->GetRotateAngle()) bRotAngleDC=TRUE;
if (!bShrAngleDC && nShrAngle !=pObj->GetShearAngle()) bShrAngleDC=TRUE;
if (!bSnapWdtDC || !bSnapHgtDC || !bSnapPosXDC || !bSnapPosYDC || !bLogicWdtDiff || !bLogicHgtDiff) {
@@ -837,6 +840,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL /*bOnlyH
rAttr.Put(SdrRotateOneItem());
rAttr.Put(SdrHorzShearOneItem());
rAttr.Put(SdrVertShearOneItem());
+
if (nMarkAnz>1) {
rAttr.Put(SdrResizeXAllItem());
rAttr.Put(SdrResizeYAllItem());
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index e31ea11be7d6..8cf83c0429cc 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1090,7 +1090,16 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
if(!bFirstObjectComplete)
{
- aMergePolyPolygonA = aTmpPoly;
+ // #i111987# Also need to collect ORed source shape when more than
+ // a single polygon is involved
+ if(aMergePolyPolygonA.count())
+ {
+ aMergePolyPolygonA = basegfx::tools::solvePolygonOperationOr(aMergePolyPolygonA, aTmpPoly);
+ }
+ else
+ {
+ aMergePolyPolygonA = aTmpPoly;
+ }
}
else
{
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 76bcb828bb24..7235310def0b 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1164,7 +1164,7 @@ BOOL SdrObjEditView::KeyInput(const KeyEvent& rKEvt, Window* pWin)
#endif
if (pTextEditOutlinerView->PostKeyEvent(rKEvt))
{
- if( pMod && !pMod->IsChanged() )
+ if( pMod /* && !pMod->IsChanged() */ )
{
if( pTextEditOutliner && pTextEditOutliner->IsModified() )
pMod->SetChanged( sal_True );
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 445fe60c0670..34a77fcd9e62 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -85,6 +85,11 @@ ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport(SdrModel& rModel):
bLastObjWasPolyWithoutLine(FALSE),bNoLine(FALSE),bNoFill(FALSE),bLastObjWasLine(FALSE)
{
aVD.EnableOutput(FALSE);
+
+ // #i111954# init to no fill and no line initially
+ aVD.SetLineColor();
+ aVD.SetFillColor();
+
aOldLineColor.SetRed( aVD.GetLineColor().GetRed() + 1 ); // invalidate old line color
pLineAttr=new SfxItemSet(rModel.GetItemPool(),XATTR_LINE_FIRST,XATTR_LINE_LAST);
pFillAttr=new SfxItemSet(rModel.GetItemPool(),XATTR_FILL_FIRST,XATTR_FILL_LAST);
@@ -380,17 +385,61 @@ void ImpSdrGDIMetaFileImport::InsertObj( SdrObject* pObj, sal_Bool bScale )
pObj->NbcMove( Size( aOfs.X(), aOfs.Y() ) );
}
- aTmpList.InsertObject( pObj );
- if ( HAS_BASE( SdrPathObj, pObj ) )
+ // #i111954# check object for visibility
+ // used are SdrPathObj, SdrRectObj, SdrCircObj, SdrGrafObj
+ bool bVisible(false);
+
+ if(pObj->HasLineStyle())
+ {
+ bVisible = true;
+ }
+
+ if(!bVisible && pObj->HasFillStyle())
+ {
+ bVisible = true;
+ }
+
+ if(!bVisible)
+ {
+ SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >(pObj);
+
+ if(pTextObj && pTextObj->HasText())
+ {
+ bVisible = true;
+ }
+ }
+
+ if(!bVisible)
{
- FASTBOOL bClosed=pObj->IsClosedObj();
- bLastObjWasPolyWithoutLine=bNoLine && bClosed;
- bLastObjWasLine=!bClosed;
+ SdrGrafObj* pGrafObj = dynamic_cast< SdrGrafObj* >(pObj);
+
+ if(pGrafObj)
+ {
+ // this may be refined to check if the graphic really is visible. It
+ // is here to ensure that graphic objects without fill, line and text
+ // get created
+ bVisible = true;
+ }
+ }
+
+ if(!bVisible)
+ {
+ SdrObject::Free(pObj);
}
else
{
- bLastObjWasPolyWithoutLine = FALSE;
- bLastObjWasLine = FALSE;
+ aTmpList.InsertObject( pObj );
+ if ( HAS_BASE( SdrPathObj, pObj ) )
+ {
+ FASTBOOL bClosed=pObj->IsClosedObj();
+ bLastObjWasPolyWithoutLine=bNoLine && bClosed;
+ bLastObjWasLine=!bClosed;
+ }
+ else
+ {
+ bLastObjWasPolyWithoutLine = FALSE;
+ bLastObjWasLine = FALSE;
+ }
}
}
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 3d90eae6d68c..47a04241e5bb 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -306,7 +306,8 @@ SdrHdl::SdrHdl():
bSelect(FALSE),
b1PixMore(FALSE),
bPlusHdl(FALSE),
- mbMoveOutside(false)
+ mbMoveOutside(false),
+ mbMouseOver(false)
{
}
@@ -324,7 +325,8 @@ SdrHdl::SdrHdl(const Point& rPnt, SdrHdlKind eNewKind):
bSelect(FALSE),
b1PixMore(FALSE),
bPlusHdl(FALSE),
- mbMoveOutside(false)
+ mbMoveOutside(false),
+ mbMouseOver(false)
{
}
@@ -946,6 +948,19 @@ BOOL SdrHdl::IsFocusHdl() const
}
}
+void SdrHdl::onMouseEnter(const MouseEvent& /*rMEvt*/)
+{
+}
+
+void SdrHdl::onMouseLeave()
+{
+}
+
+bool SdrHdl::isMouseOver() const
+{
+ return mbMouseOver;
+}
+
////////////////////////////////////////////////////////////////////////////////////////////////////
// class SdrHdlColor
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index b9598cef4ceb..fffcac00e46c 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1060,6 +1060,44 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
}
}
+/** handle mouse over effects for handles */
+BOOL SdrMarkView::MouseMove(const MouseEvent& rMEvt, Window* pWin)
+{
+ const ULONG nHdlCount = aHdl.GetHdlCount();
+ if( nHdlCount )
+ {
+ SdrHdl* pMouseOverHdl = 0;
+ if( !rMEvt.IsLeaveWindow() && pWin )
+ {
+ Point aMDPos( pWin->PixelToLogic( rMEvt.GetPosPixel() ) );
+ pMouseOverHdl = PickHandle(aMDPos);
+ }
+
+ // notify last mouse over handle that he lost the mouse
+ for(ULONG nHdl = 0; nHdl < nHdlCount; nHdl++ )
+ {
+ SdrHdl* pCurrentHdl = GetHdl(nHdl);
+ if( pCurrentHdl->mbMouseOver )
+ {
+ if( pCurrentHdl != pMouseOverHdl )
+ {
+ pCurrentHdl->mbMouseOver = false;
+ pCurrentHdl->onMouseLeave();
+ }
+ break;
+ }
+ }
+
+ // notify current mouse over handle
+ if( pMouseOverHdl /* && !pMouseOverHdl->mbMouseOver */ )
+ {
+ pMouseOverHdl->mbMouseOver = true;
+ pMouseOverHdl->onMouseEnter(rMEvt);
+ }
+ }
+ return SdrSnapView::MouseMove(rMEvt, pWin);
+}
+
void SdrMarkView::ForceRefToMarked()
{
switch(eDragMode)
@@ -1188,6 +1226,10 @@ void SdrMarkView::CheckMarked()
}
bRaus=bRaus || pPV->GetLockedLayers().IsSet(nLay) || // Layer gesperrt?
!pPV->GetVisibleLayers().IsSet(nLay); // Layer nicht sichtbar?
+
+ if( !bRaus )
+ bRaus = !pObj->IsVisible(); // not visible objects can not be marked
+
if (!bRaus) {
// Joe am 9.3.1997: Gruppierte Objekten koennen nun auch
// markiert werden. Nach EnterGroup muessen aber die Objekte
@@ -1591,7 +1633,7 @@ void SdrMarkView::SetMarkHdlSizePixel(USHORT nSiz)
#define SDRSEARCH_IMPISMASTER 0x80000000 /* MasterPage wird gerade durchsucht */
SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const
{
- if((nOptions & SDRSEARCH_IMPISMASTER) && pObj->IsNotVisibleAsMaster())
+ if(((nOptions & SDRSEARCH_IMPISMASTER) && pObj->IsNotVisibleAsMaster()) || (!pObj->IsVisible()))
{
return NULL;
}
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 1c534fbcbe98..b9d3e24592ee 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -120,6 +120,7 @@
#include <svx/sdrhittesthelper.hxx>
#include <svx/svdundo.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <svx/sdrobjectfilter.hxx>
using namespace ::com::sun::star;
@@ -234,6 +235,7 @@ SdrObjGeoData::SdrObjGeoData():
bSizProt(FALSE),
bNoPrint(FALSE),
bClosedObj(FALSE),
+ mbVisible(true),
mnLayerID(0)
{
DBG_CTOR(SdrObjGeoData,NULL);
@@ -413,6 +415,7 @@ SdrObject::SdrObject()
bEmptyPresObj =FALSE;
bNotVisibleAsMaster=FALSE;
bClosedObj =FALSE;
+ mbVisible = true;
// #i25616#
mbLineIsOutsideGeometry = sal_False;
@@ -1048,6 +1051,7 @@ void SdrObject::operator=(const SdrObject& rObj)
bSizProt=rObj.bSizProt;
bMovProt=rObj.bMovProt;
bNoPrint=rObj.bNoPrint;
+ mbVisible=rObj.mbVisible;
bMarkProt=rObj.bMarkProt;
//EmptyPresObj wird nicht kopiert: nun doch! (25-07-1995, Joe)
bEmptyPresObj =rObj.bEmptyPresObj;
@@ -1686,6 +1690,11 @@ void SdrObject::NbcSetLogicRect(const Rectangle& rRect)
NbcSetSnapRect(rRect);
}
+void SdrObject::AdjustToMaxRect( const Rectangle& rMaxRect, bool /* bShrinkOnly = false */ )
+{
+ SetLogicRect( rMaxRect );
+}
+
void SdrObject::SetSnapRect(const Rectangle& rRect)
{
Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
@@ -1914,6 +1923,7 @@ void SdrObject::SaveGeoData(SdrObjGeoData& rGeo) const
rGeo.bMovProt =bMovProt ;
rGeo.bSizProt =bSizProt ;
rGeo.bNoPrint =bNoPrint ;
+ rGeo.mbVisible =mbVisible ;
rGeo.bClosedObj =bClosedObj ;
rGeo.mnLayerID = mnLayerID;
@@ -1940,6 +1950,7 @@ void SdrObject::RestGeoData(const SdrObjGeoData& rGeo)
bMovProt =rGeo.bMovProt ;
bSizProt =rGeo.bSizProt ;
bNoPrint =rGeo.bNoPrint ;
+ mbVisible =rGeo.mbVisible ;
bClosedObj =rGeo.bClosedObj ;
mnLayerID = rGeo.mnLayerID;
@@ -2147,6 +2158,11 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
SetPrintable(b);
}
+ if (rAttr.GetItemState(SDRATTR_OBJVISIBLE,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ bool b=((const SdrObjVisibleItem*)pPoolItem)->GetValue();
+ SetVisible(b);
+ }
+
SdrLayerID nLayer=SDRLAYER_NOTFOUND;
if (rAttr.GetItemState(SDRATTR_LAYERID,TRUE,&pPoolItem)==SFX_ITEM_SET) {
nLayer=((const SdrLayerIdItem*)pPoolItem)->GetValue();
@@ -2208,6 +2224,7 @@ void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr, FASTBOOL bMerge) const
lcl_SetItem(rAttr,bMerge,SdrObjMoveProtectItem(IsMoveProtect()));
lcl_SetItem(rAttr,bMerge,SdrObjSizeProtectItem(IsResizeProtect()));
lcl_SetItem(rAttr,bMerge,SdrObjPrintableItem(IsPrintable()));
+ lcl_SetItem(rAttr,bMerge,SdrObjVisibleItem(IsVisible()));
lcl_SetItem(rAttr,bMerge,SdrRotateAngleItem(GetRotateAngle()));
lcl_SetItem(rAttr,bMerge,SdrShearAngleItem(GetShearAngle()));
lcl_SetItem(rAttr,bMerge,SdrOneSizeWidthItem(rSnap.GetWidth()-1));
@@ -2686,11 +2703,29 @@ void SdrObject::SetResizeProtect(sal_Bool bProt)
void SdrObject::SetPrintable(sal_Bool bPrn)
{
- bNoPrint=!bPrn;
- SetChanged();
- if (IsInserted() && pModel!=NULL) {
- SdrHint aHint(*this);
- pModel->Broadcast(aHint);
+ if( bPrn == bNoPrint )
+ {
+ bNoPrint=!bPrn;
+ SetChanged();
+ if (IsInserted() && pModel!=NULL)
+ {
+ SdrHint aHint(*this);
+ pModel->Broadcast(aHint);
+ }
+ }
+}
+
+void SdrObject::SetVisible(sal_Bool bVisible)
+{
+ if( bVisible != mbVisible )
+ {
+ mbVisible = bVisible;
+ SetChanged();
+ if (IsInserted() && pModel!=NULL)
+ {
+ SdrHint aHint(*this);
+ pModel->Broadcast(aHint);
+ }
}
}
@@ -3265,4 +3300,11 @@ void SdrObjFactory::RemoveMakeUserDataHdl(const Link& rLink)
rLL.RemoveLink(rLink);
}
+namespace svx
+{
+ ISdrObjectFilter::~ISdrObjectFilter()
+ {
+ }
+}
+
// eof
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index 12cdeac9ef85..4c600cba821f 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -239,8 +239,9 @@ basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, c
else
{
// mirror start, end for geometry creation since model coordinate system is mirrored in Y
- const double fStart(((36000 - nEnd) % 36000) * F_PI18000);
- const double fEnd(((36000 - nStart) % 36000) * F_PI18000);
+ // #i111715# increase numerical correctness by first dividing and not using F_PI1800
+ const double fStart((((36000 - nEnd) % 36000) / 18000.0) * F_PI);
+ const double fEnd((((36000 - nStart) % 36000) / 18000.0) * F_PI);
// create circle segment. This is not closed by default
aCircPolygon = basegfx::tools::createPolygonFromEllipseSegment(
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index dc76855f05cc..3d254aeb39c4 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -1674,6 +1674,11 @@ void SdrEdgeObj::SetEdgeTrackPath( const basegfx::B2DPolyPolygon& rPoly )
*pEdgeTrack = XPolygon( rPoly.getB2DPolygon( 0 ) );
bEdgeTrackDirty = sal_False;
bEdgeTrackUserDefined = sal_True;
+
+ // #i110629# also set aRect and maSnapeRect dependent from pEdgeTrack
+ const Rectangle aPolygonBounds(pEdgeTrack->GetBoundRect());
+ aRect = aPolygonBounds;
+ maSnapRect = aPolygonBounds;
}
}
@@ -2100,7 +2105,7 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV,
// Problem: Gruppenobjekt mit verschiedenen Layern liefert LayerID 0 !!!!
no--;
SdrObject* pObj=pOL->GetObj(no);
- if (rVisLayer.IsSet(pObj->GetLayer()) && // nur sichtbare Objekte
+ if (rVisLayer.IsSet(pObj->GetLayer()) && pObj->IsVisible() && // only visible objects
(pThis==NULL || pObj!=(SdrObject*)pThis) && // nicht an mich selbst connecten
pObj->IsNode())
{
@@ -2206,17 +2211,31 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV,
void SdrEdgeObj::NbcSetSnapRect(const Rectangle& rRect)
{
- Rectangle aOld(GetSnapRect());
- long nMulX = rRect.Right() - rRect.Left();
- long nDivX = aOld.Right() - aOld.Left();
- long nMulY = rRect.Bottom() - rRect.Top();
- long nDivY = aOld.Bottom() - aOld.Top();
- if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; }
- if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; }
- Fraction aX(nMulX, nDivX);
- Fraction aY(nMulY, nDivY);
- NbcResize(aOld.TopLeft(), aX, aY);
- NbcMove(Size(rRect.Left() - aOld.Left(), rRect.Top() - aOld.Top()));
+ const Rectangle aOld(GetSnapRect());
+
+ if(aOld != rRect)
+ {
+ if(aRect.IsEmpty() && 0 == pEdgeTrack->GetPointCount())
+ {
+ // #i110629# When initializing, do not scale on empty Rectangle; this
+ // will mirror the underlying text object (!)
+ aRect = rRect;
+ maSnapRect = rRect;
+ }
+ else
+ {
+ long nMulX = rRect.Right() - rRect.Left();
+ long nDivX = aOld.Right() - aOld.Left();
+ long nMulY = rRect.Bottom() - rRect.Top();
+ long nDivY = aOld.Bottom() - aOld.Top();
+ if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; }
+ if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; }
+ Fraction aX(nMulX, nDivX);
+ Fraction aY(nMulY, nDivY);
+ NbcResize(aOld.TopLeft(), aX, aY);
+ NbcMove(Size(rRect.Left() - aOld.Left(), rRect.Top() - aOld.Top()));
+ }
+ }
}
void SdrEdgeObj::NbcMove(const Size& rSiz)
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 1924235e7003..d1f65c30050d 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1025,7 +1025,7 @@ void SdrGrafObj::ImpSetGrafInfoToAttr()
// -----------------------------------------------------------------------------
-void SdrGrafObj::AdjustToMaxRect( const Rectangle& rMaxRect, BOOL bShrinkOnly )
+void SdrGrafObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly )
{
Size aSize;
Size aMaxSize( rMaxRect.GetSize() );
diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index 4008e9494f2e..9dd615490f9e 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -28,6 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
+#include <vcl/svapp.hxx>
+
#include <svx/svdomedia.hxx>
#include "svdglob.hxx"
#include "svdstr.hrc"
@@ -147,6 +149,53 @@ void SdrMediaObj::operator=(const SdrObject& rObj)
// ------------------------------------------------------------------------------
+void SdrMediaObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly /* = false */ )
+{
+ Size aSize( Application::GetDefaultDevice()->PixelToLogic( getPreferredSize(), MAP_100TH_MM ) );
+ Size aMaxSize( rMaxRect.GetSize() );
+
+ if( aSize.Height() != 0 && aSize.Width() != 0 )
+ {
+ Point aPos( rMaxRect.TopLeft() );
+
+ // Falls Grafik zu gross, wird die Grafik
+ // in die Seite eingepasst
+ if ( (!bShrinkOnly ||
+ ( aSize.Height() > aMaxSize.Height() ) ||
+ ( aSize.Width() > aMaxSize.Width() ) )&&
+ aSize.Height() && aMaxSize.Height() )
+ {
+ float fGrfWH = (float)aSize.Width() /
+ (float)aSize.Height();
+ float fWinWH = (float)aMaxSize.Width() /
+ (float)aMaxSize.Height();
+
+ // Grafik an Pagesize anpassen (skaliert)
+ if ( fGrfWH < fWinWH )
+ {
+ aSize.Width() = (long)(aMaxSize.Height() * fGrfWH);
+ aSize.Height()= aMaxSize.Height();
+ }
+ else if ( fGrfWH > 0.F )
+ {
+ aSize.Width() = aMaxSize.Width();
+ aSize.Height()= (long)(aMaxSize.Width() / fGrfWH);
+ }
+
+ aPos = rMaxRect.Center();
+ }
+
+ if( bShrinkOnly )
+ aPos = aRect.TopLeft();
+
+ aPos.X() -= aSize.Width() / 2;
+ aPos.Y() -= aSize.Height() / 2;
+ SetLogicRect( Rectangle( aPos, aSize ) );
+ }
+}
+
+// ------------------------------------------------------------------------------
+
void SdrMediaObj::setURL( const ::rtl::OUString& rURL )
{
::avmedia::MediaItem aURLItem;
diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx
index f6780bd7c90d..031e8e9dd45b 100644
--- a/svx/source/svdraw/svdotextpathdecomposition.cxx
+++ b/svx/source/svdraw/svdotextpathdecomposition.cxx
@@ -107,15 +107,13 @@ namespace
maLocale(rInfo.mpLocale ? *rInfo.mpLocale : ::com::sun::star::lang::Locale()),
mbRTL(rInfo.mrFont.IsVertical() ? false : rInfo.IsRTL())
{
- if(mnTextLength)
+ if(mnTextLength && rInfo.mpDXArray)
{
maDblDXArray.reserve(mnTextLength);
- const sal_Int32 nFontWidth(0L == maFont.GetWidth() ? maFont.GetHeight() : maFont.GetWidth());
- const double fScaleFactor(0L != nFontWidth ? 1.0 / (double)nFontWidth : 1.0);
for(xub_StrLen a(0); a < mnTextLength; a++)
{
- maDblDXArray.push_back((double)rInfo.mpDXArray[a] * fScaleFactor);
+ maDblDXArray.push_back((double)rInfo.mpDXArray[a]);
}
}
}
@@ -291,7 +289,8 @@ namespace
const double fPolyLength(basegfx::tools::getLength(aPolygonCandidate));
double fPolyEnd(fPolyLength);
double fPolyStart(0.0);
- double fScaleFactor(1.0);
+ double fAutosizeScaleFactor(1.0);
+ bool bAutosizeScale(false);
if(maSdrFormTextAttribute.getFormTextMirror())
{
@@ -352,7 +351,8 @@ namespace
// if scale, prepare scale factor between curve length and text length
if(0.0 != fParagraphTextLength)
{
- fScaleFactor = (fPolyEnd - fPolyStart) / fParagraphTextLength;
+ fAutosizeScaleFactor = (fPolyEnd - fPolyStart) / fParagraphTextLength;
+ bAutosizeScale = true;
}
}
}
@@ -382,10 +382,10 @@ namespace
// prepare portion length. Takes RTL sections into account.
double fPortionLength(pCandidate->getDisplayLength(nUsedTextLength, nNextGlyphLen));
- if(XFT_AUTOSIZE == maSdrFormTextAttribute.getFormTextAdjust())
+ if(bAutosizeScale)
{
- // when scaling, expand portion length
- fPortionLength *= fScaleFactor;
+ // when autosize scaling, expand portion length
+ fPortionLength *= fAutosizeScaleFactor;
}
// create transformation
@@ -397,10 +397,10 @@ namespace
aNewTransformA.scale(aFontScaling.getX(), aFontScaling.getY());
// prepare scaling of text primitive
- if(XFT_AUTOSIZE == maSdrFormTextAttribute.getFormTextAdjust())
+ if(bAutosizeScale)
{
- // when scaling, expand text primitive scaling
- aNewTransformA.scale(fScaleFactor, fScaleFactor);
+ // when autosize scaling, expand text primitive scaling to it
+ aNewTransformA.scale(fAutosizeScaleFactor, fAutosizeScaleFactor);
}
// eventually create shadow primitives from aDecomposition and add to rDecomposition
@@ -497,17 +497,42 @@ namespace
aNewTransformB.translate(aPerpendicular.getX(), aPerpendicular.getY());
}
- // shadow primitive creation
- if(bShadow)
+ if(pCandidate->getText().Len() && nNextGlyphLen)
{
- if(pCandidate->getText().Len() && nNextGlyphLen)
+ const xub_StrLen nPortionIndex(pCandidate->getPortionIndex(nUsedTextLength, nNextGlyphLen));
+ ::std::vector< double > aNewDXArray;
+
+ if(nNextGlyphLen > 1 && pCandidate->getDoubleDXArray().size())
{
+ // copy DXArray for portion
+ aNewDXArray.insert(
+ aNewDXArray.begin(),
+ pCandidate->getDoubleDXArray().begin() + nPortionIndex,
+ pCandidate->getDoubleDXArray().begin() + (nPortionIndex + nNextGlyphLen));
+
+ if(nPortionIndex > 0)
+ {
+ // adapt to portion start
+ double fDXOffset= *(pCandidate->getDoubleDXArray().begin() + (nPortionIndex - 1));
+ ::std::transform(
+ aNewDXArray.begin(), aNewDXArray.end(),
+ aNewDXArray.begin(), ::std::bind2nd(::std::minus<double>(), fDXOffset));
+ }
+
+ if(bAutosizeScale)
+ {
+ // when autosize scaling, adapt to DXArray, too
+ ::std::transform(
+ aNewDXArray.begin(), aNewDXArray.end(),
+ aNewDXArray.begin(), ::std::bind2nd(::std::multiplies<double>(), fAutosizeScaleFactor));
+ }
+ }
+
+ if(bShadow)
+ {
+ // shadow primitive creation
const Color aShadowColor(maSdrFormTextAttribute.getFormTextShdwColor());
const basegfx::BColor aRGBShadowColor(aShadowColor.getBColor());
- const xub_StrLen nPortionIndex(pCandidate->getPortionIndex(nUsedTextLength, nNextGlyphLen));
- const ::std::vector< double > aNewDXArray(
- pCandidate->getDoubleDXArray().begin() + nPortionIndex,
- pCandidate->getDoubleDXArray().begin() + nPortionIndex + nNextGlyphLen);
drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew =
new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
@@ -522,30 +547,25 @@ namespace
mrShadowDecomposition.push_back(pNew);
}
- }
- // primitive creation
- if(pCandidate->getText().Len() && nNextGlyphLen)
- {
- const Color aColor(pCandidate->getFont().GetColor());
- const basegfx::BColor aRGBColor(aColor.getBColor());
- const xub_StrLen nPortionIndex(pCandidate->getPortionIndex(nUsedTextLength, nNextGlyphLen));
- const ::std::vector< double > aNewDXArray(
- pCandidate->getDoubleDXArray().begin() + nPortionIndex,
- pCandidate->getDoubleDXArray().begin() + nPortionIndex + nNextGlyphLen);
-
- drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew =
- new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
- aNewTransformB * aNewTransformA,
- pCandidate->getText(),
- nPortionIndex,
- nNextGlyphLen,
- aNewDXArray,
- aCandidateFontAttribute,
- pCandidate->getLocale(),
- aRGBColor);
-
- mrDecomposition.push_back(pNew);
+ {
+ // primitive creation
+ const Color aColor(pCandidate->getFont().GetColor());
+ const basegfx::BColor aRGBColor(aColor.getBColor());
+
+ drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew =
+ new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
+ aNewTransformB * aNewTransformA,
+ pCandidate->getText(),
+ nPortionIndex,
+ nNextGlyphLen,
+ aNewDXArray,
+ aCandidateFontAttribute,
+ pCandidate->getLocale(),
+ aRGBColor);
+
+ mrDecomposition.push_back(pNew);
+ }
}
// consume from portion // no += here, xub_StrLen is USHORT and the compiler will gererate a warning here
diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx
index e4b27766a265..79e74a3382b8 100644
--- a/svx/source/svdraw/svdoutl.cxx
+++ b/svx/source/svdraw/svdoutl.cxx
@@ -125,5 +125,8 @@ XubString SdrOutliner::CalcFieldValue(const SvxFieldItem& rField, USHORT nPara,
const SdrTextObj* SdrOutliner::GetTextObj() const
{
- return static_cast< SdrTextObj* >( mpTextObj.get() );
+ if( mpTextObj.is() )
+ return static_cast< SdrTextObj* >( mpTextObj.get() );
+ else
+ return 0;
}
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 6dd816d429da..8da0b248f38b 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -1221,18 +1221,6 @@ SdrPageProperties::SdrPageProperties(SdrPage& rSdrPage)
}
}
-SdrPageProperties::SdrPageProperties(const SdrPageProperties& rCandidate)
-: SfxListener(),
- mpSdrPage(rCandidate.mpSdrPage),
- mpStyleSheet(0),
- mpProperties(new SfxItemSet(*rCandidate.mpProperties))
-{
- if(rCandidate.GetStyleSheet())
- {
- ImpAddStyleSheet(*rCandidate.GetStyleSheet());
- }
-}
-
SdrPageProperties::~SdrPageProperties()
{
ImpRemoveStyleSheet();
@@ -1365,6 +1353,8 @@ SdrPage::SdrPage(const SdrPage& rSrcPage)
// Warning: this leads to slicing (see issue 93186) and has to be
// removed as soon as possible.
*this = rSrcPage;
+ OSL_ENSURE(mpSdrPageProperties,
+ "SdrPage::SdrPage: operator= did not create needed SdrPageProperties (!)");
// be careful and correct eListKind, a member of SdrObjList which
// will be changed by the SdrOIbjList::operator= before...
@@ -1382,8 +1372,6 @@ SdrPage::SdrPage(const SdrPage& rSrcPage)
mxUnoPage = NULL;
xComponent->dispose();
}
-
- mpSdrPageProperties = new SdrPageProperties(rSrcPage.getSdrPageProperties());
}
SdrPage::~SdrPage()
@@ -1478,8 +1466,28 @@ void SdrPage::operator=(const SdrPage& rSrcPage)
mbObjectsNotPersistent = rSrcPage.mbObjectsNotPersistent;
{
- delete mpSdrPageProperties;
- mpSdrPageProperties = new SdrPageProperties(rSrcPage.getSdrPageProperties());
+ // #i111122# delete SdrPageProperties when model is different
+ if(mpSdrPageProperties && GetModel() != rSrcPage.GetModel())
+ {
+ delete mpSdrPageProperties;
+ mpSdrPageProperties = 0;
+ }
+
+ if(!mpSdrPageProperties)
+ {
+ mpSdrPageProperties = new SdrPageProperties(*this);
+ }
+ else
+ {
+ mpSdrPageProperties->ClearItem(0);
+ }
+
+ if(!IsMasterPage())
+ {
+ mpSdrPageProperties->PutItemSet(rSrcPage.getSdrPageProperties().GetItemSet());
+ }
+
+ mpSdrPageProperties->SetStyleSheet(rSrcPage.getSdrPageProperties().GetStyleSheet());
}
// Now copy the contained obejcts (by cloning them)
@@ -1659,7 +1667,17 @@ void SdrPage::SetModel(SdrModel* pNewModel)
}
pLayerAdmin->SetModel(pNewModel);
- SdrPageProperties *pNew = new SdrPageProperties(getSdrPageProperties());
+ // create new SdrPageProperties with new model (due to SfxItemSet there)
+ // and copy ItemSet and StyleSheet
+ SdrPageProperties *pNew = new SdrPageProperties(*this);
+
+ if(!IsMasterPage())
+ {
+ pNew->PutItemSet(getSdrPageProperties().GetItemSet());
+ }
+
+ pNew->SetStyleSheet(getSdrPageProperties().GetStyleSheet());
+
delete mpSdrPageProperties;
mpSdrPageProperties = pNew;
}
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index 6239708394bd..bad1401c2305 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -754,6 +754,12 @@ sal_Bool SdrPageView::IsObjMarkable(SdrObject* pObj) const
return sal_False;
}
+ // only visible are markable
+ if( !pObj->IsVisible() )
+ {
+ return sal_False;
+ }
+
// #112440#
if(pObj->ISA(SdrObjGroup))
{
diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src
index ee6cbaea9632..1317a0e1328d 100644
--- a/svx/source/svdraw/svdstr.src
+++ b/svx/source/svdraw/svdstr.src
@@ -2395,6 +2395,11 @@ String SIP_SA_OBJPRINTABLE
Text [ en-US ] = "Object, printable";
};
+String SIP_SA_OBJVISIBLE
+{
+ Text [ en-US ] = "Object, visible";
+};
+
String SIP_SA_LAYERID
{
Text [ en-US ] = "Level ID";
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 856820b6d864..7a4305b9581f 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -1358,6 +1358,10 @@ SdrViewContext SdrView::GetContext() const
for( ULONG nMarkNum = 0; nMarkNum < nMarkAnz && ( bGraf || bMedia ); nMarkNum++ )
{
const SdrObject* pMarkObj = GetMarkedObjectByIndex( nMarkNum );
+ DBG_ASSERT( pMarkObj, "SdrView::GetContext(), null pointer in mark list!" );
+
+ if( !pMarkObj )
+ continue;
if( !pMarkObj->ISA( SdrGrafObj ) )
bGraf = FALSE;
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index d7f16cd15d3c..e928f94d88ec 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -2178,6 +2178,16 @@ void SdrTableObj::NbcSetLogicRect(const Rectangle& rRect)
SetRectsDirty();
}
+
+// --------------------------------------------------------------------
+
+void SdrTableObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool /* bShrinkOnly = false */ )
+{
+ Rectangle aAdjustRect( rMaxRect );
+ aAdjustRect.setHeight( GetLogicRect().getHeight() );
+ SetLogicRect( aAdjustRect );
+}
+
// --------------------------------------------------------------------
void SdrTableObj::NbcMove(const Size& rSiz)
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index a4cab5f3ef16..f98fd57a0480 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -32,9 +32,14 @@
#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
-#ifndef _TOOLBOX_HXX //autogen
+#include <com/sun/star/util/XURLTransformer.hpp>
+#include <com/sun/star/awt/MenuItemStyle.hpp>
+#include <com/sun/star/awt/XPopupMenuExtended.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+
+#include <vos/mutex.hxx>
+
#include <vcl/toolbox.hxx>
-#endif
#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/objsh.hxx>
@@ -42,30 +47,35 @@
#include <vcl/settings.hxx>
#include <svl/intitem.hxx>
#include <editeng/colritem.hxx>
-#include "chrtitem.hxx"
#include <tools/urlobj.hxx>
#include <svx/dialogs.hrc>
-#include "helpid.hrc"
-
#include <svx/svdtrans.hxx>
+#include <svx/sdasitm.hxx>
#include <svx/dialmgr.hxx>
+#include "svx/extrusioncolorcontrol.hxx"
+
+//#include "chrtitem.hxx"
+#include "helpid.hrc"
#include "extrusioncontrols.hxx"
#include "extrusioncontrols.hrc"
-#include <svx/sdasitm.hxx>
-#include "toolbarmenu.hxx"
#include "colorwindow.hxx"
-
-#include <svx/tbxcolorupdate.hxx>
+#include "extrusiondepthdialog.hxx"
////////////
-using namespace svx;
+using ::rtl::OUString;
+using ::svtools::ToolbarMenu;
+
+using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::graphic;
-SFX_IMPL_TOOLBOX_CONTROL( ExtrusionDirectionControl, SfxBoolItem );
+namespace svx
+{
/*************************************************************************
|*
@@ -75,43 +85,17 @@ SFX_IMPL_TOOLBOX_CONTROL( ExtrusionDirectionControl, SfxBoolItem );
static sal_Int32 gSkewList[] = { 135, 90, 45, 180, 0, -360, -135, -90, -45 };
-ExtrusionDirectionWindow::ExtrusionDirectionWindow(
- USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ) :
- SfxPopupWindow( nId,
- rFrame,
- SVX_RES( RID_SVXFLOAT_EXTRUSION_DIRECTION )),
- mxFrame( rFrame ),
- maImgPerspective( SVX_RES( IMG_PERSPECTIVE ) ),
- maImgPerspectiveH( SVX_RES( IMG_PERSPECTIVE_H ) ),
- maImgParallel( SVX_RES( IMG_PARALLEL ) ),
- maImgParallelH( SVX_RES( IMG_PARALLEL_H ) ),
- mbPopupMode ( TRUE )
+ExtrusionDirectionWindow::ExtrusionDirectionWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow )
+: ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_EXTRUSION_DIRECTION ))
+, mrController( rController )
+, maImgPerspective( SVX_RES( IMG_PERSPECTIVE ) )
+, maImgPerspectiveH( SVX_RES( IMG_PERSPECTIVE_H ) )
+, maImgParallel( SVX_RES( IMG_PARALLEL ) )
+, maImgParallelH( SVX_RES( IMG_PARALLEL_H ) )
+, msExtrusionDirection( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDirection" ) )
+, msExtrusionProjection( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionProjection" ) )
{
- implInit();
-}
-
-ExtrusionDirectionWindow::ExtrusionDirectionWindow(
- USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
- Window* pParentWindow ) :
- SfxPopupWindow( nId,
- rFrame,
- pParentWindow,
- SVX_RES( RID_SVXFLOAT_EXTRUSION_DIRECTION )),
- mxFrame( rFrame ),
- maImgPerspective( SVX_RES( IMG_PERSPECTIVE ) ),
- maImgPerspectiveH( SVX_RES( IMG_PERSPECTIVE_H ) ),
- maImgParallel( SVX_RES( IMG_PARALLEL ) ),
- maImgParallelH( SVX_RES( IMG_PARALLEL_H ) ),
- mbPopupMode ( TRUE )
-{
- implInit();
-}
-
-void ExtrusionDirectionWindow::implInit()
-{
- SetHelpId( HID_POPUP_EXTRUSION_DIRECTION );
+ SetHelpId( HID_MENU_EXTRUSION_DIRECTION );
USHORT i;
for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ )
@@ -120,16 +104,10 @@ void ExtrusionDirectionWindow::implInit()
maImgDirectionH[i] = Image( SVX_RES( IMG_DIRECTION_H + i ) );
}
-// mpDirectionForewarder = new SfxStatusForwarder( SID_EXTRUSION_DIRECTION, *this );
-// mpProjectionForewarder = new SfxStatusForwarder( SID_EXTRUSION_PROJECTION, *this );
-
- mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN );
- mpMenu->SetHelpId( HID_MENU_EXTRUSION_DIRECTION );
- mpMenu->SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) );
- mpDirectionSet = new ValueSet( mpMenu, WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT );
+ SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) );
+ mpDirectionSet = createEmptyValueSetControl();
mpDirectionSet->SetHelpId( HID_VALUESET_EXTRUSION_DIRECTION );
- mpDirectionSet->SetHelpId( HID_POPUP_LINEEND_CTRL );
mpDirectionSet->SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) );
mpDirectionSet->SetColCount( 3 );
mpDirectionSet->EnableFullItemMode( FALSE );
@@ -144,55 +122,39 @@ void ExtrusionDirectionWindow::implInit()
mpDirectionSet->SetOutputSizePixel( Size( 72, 72 ) );
- mpMenu->appendEntry( 2, mpDirectionSet );
- mpMenu->appendSeparator();
- mpMenu->appendEntry( 0, String( SVX_RES( STR_PERSPECTIVE ) ), bHighContrast ? maImgPerspectiveH : maImgPerspective );
- mpMenu->appendEntry( 1, String( SVX_RES( STR_PARALLEL ) ), bHighContrast ? maImgParallelH : maImgParallel );
-
- SetOutputSizePixel( mpMenu->getMenuSize() );
- mpMenu->SetOutputSizePixel( GetOutputSizePixel() );
+ appendEntry( 2, mpDirectionSet );
+ appendSeparator();
+ appendEntry( 0, String( SVX_RES( STR_PERSPECTIVE ) ), bHighContrast ? maImgPerspectiveH : maImgPerspective );
+ appendEntry( 1, String( SVX_RES( STR_PARALLEL ) ), bHighContrast ? maImgParallelH : maImgParallel );
- mpMenu->Show();
+ SetOutputSizePixel( getMenuSize() );
FreeResource();
- AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDirection" )));
- AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionProjection" )));
-}
-
-SfxPopupWindow* ExtrusionDirectionWindow::Clone() const
-{
- return new ExtrusionDirectionWindow( GetId(), mxFrame );
+ AddStatusListener( msExtrusionDirection );
+ AddStatusListener( msExtrusionProjection );
}
void ExtrusionDirectionWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
- SfxPopupWindow::DataChanged( rDCEvt );
+ ToolbarMenu::DataChanged( rDCEvt );
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
- USHORT i;
- for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ )
+ for( USHORT i = DIRECTION_NW; i <= DIRECTION_SE; i++ )
{
mpDirectionSet->SetItemImage( i+1, bHighContrast ? maImgDirectionH[ i ] : maImgDirection[ i ] );
}
- mpMenu->setEntryImage( 0, bHighContrast ? maImgPerspectiveH : maImgPerspective );
- mpMenu->setEntryImage( 1, bHighContrast ? maImgParallelH : maImgParallel );
+ setEntryImage( 0, bHighContrast ? maImgPerspectiveH : maImgPerspective );
+ setEntryImage( 1, bHighContrast ? maImgParallelH : maImgParallel );
}
}
// -----------------------------------------------------------------------
-ExtrusionDirectionWindow::~ExtrusionDirectionWindow()
-{
- delete mpMenu;
-}
-
-// -----------------------------------------------------------------------
-
void ExtrusionDirectionWindow::implSetDirection( sal_Int32 nSkew, bool bEnabled )
{
if( mpDirectionSet )
@@ -213,58 +175,47 @@ void ExtrusionDirectionWindow::implSetDirection( sal_Int32 nSkew, bool bEnabled
mpDirectionSet->SetNoSelection();
}
}
- if( mpMenu )
- {
- mpMenu->enableEntry( 2, bEnabled );
- }
+ enableEntry( 2, bEnabled );
}
// -----------------------------------------------------------------------
void ExtrusionDirectionWindow::implSetProjection( sal_Int32 nProjection, bool bEnabled )
{
- if( mpMenu )
- {
- mpMenu->checkEntry( 0, (nProjection == 0) && bEnabled );
- mpMenu->checkEntry( 1, (nProjection == 1 ) && bEnabled );
- mpMenu->enableEntry( 0, bEnabled );
- mpMenu->enableEntry( 1, bEnabled );
- }
+ checkEntry( 0, (nProjection == 0) && bEnabled );
+ checkEntry( 1, (nProjection == 1 ) && bEnabled );
+ enableEntry( 0, bEnabled );
+ enableEntry( 1, bEnabled );
}
// -----------------------------------------------------------------------
-void ExtrusionDirectionWindow::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+void SAL_CALL ExtrusionDirectionWindow::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException )
{
- switch( nSID )
+ if( Event.FeatureURL.Main.equals( msExtrusionDirection ) )
{
- case SID_EXTRUSION_DIRECTION:
+ if( !Event.IsEnabled )
{
- if( eState == SFX_ITEM_DISABLED )
- {
- implSetDirection( -1, false );
- }
- else
- {
- const SfxInt32Item* pStateItem = PTR_CAST( SfxInt32Item, pState );
- if( pStateItem )
- implSetDirection( pStateItem->GetValue(), true );
- }
- break;
+ implSetDirection( -1, false );
}
- case SID_EXTRUSION_PROJECTION:
+ else
{
- if( eState == SFX_ITEM_DISABLED )
- {
- implSetProjection( -1, false );
- }
- else
- {
- const SfxInt32Item* pStateItem = PTR_CAST( SfxInt32Item, pState );
- if( pStateItem )
- implSetProjection( pStateItem->GetValue(), true );
- }
- break;
+ sal_Int32 nValue = 0;
+ if( Event.State >>= nValue )
+ implSetDirection( nValue, true );
+ }
+ }
+ else if( Event.FeatureURL.Main.equals( msExtrusionProjection ) )
+ {
+ if( !Event.IsEnabled )
+ {
+ implSetProjection( -1, false );
+ }
+ else
+ {
+ sal_Int32 nValue = 0;
+ if( Event.State >>= nValue )
+ implSetProjection( nValue, true );
}
}
}
@@ -276,48 +227,24 @@ IMPL_LINK( ExtrusionDirectionWindow, SelectHdl, void *, pControl )
if ( IsInPopupMode() )
EndPopupMode();
-// SfxDispatcher* pDisp = GetBindings().GetDispatcher();
-
if( pControl == mpDirectionSet )
{
- sal_Int32 nSkew = gSkewList[mpDirectionSet->GetSelectItemId()-1];
-
- SfxInt32Item aItem( SID_EXTRUSION_DIRECTION, nSkew );
- rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDirection" ));
-
- Any a;
- INetURLObject aObj( aCommand );
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = aObj.GetURLPath();
- aItem.QueryValue( a );
- aArgs[0].Value = a;
-
- SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >(
- mxFrame->getController(), UNO_QUERY ),
- aCommand,
- aArgs );
+ aArgs[0].Name = msExtrusionDirection.copy(5);
+ aArgs[0].Value <<= (sal_Int32)gSkewList[mpDirectionSet->GetSelectItemId()-1];
-// pDisp->Execute( SID_EXTRUSION_DIRECTION, SFX_CALLMODE_RECORD, &aItem, 0L , 0L );
+ mrController.dispatchCommand( msExtrusionDirection, aArgs );
}
else
{
- int nProjection = mpMenu->getSelectedEntryId();
+ int nProjection = getSelectedEntryId();
if( (nProjection >= 0) && (nProjection < 2 ) )
{
- SfxInt32Item aItem( SID_EXTRUSION_PROJECTION, nProjection );
- rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionProjection" ));
-
- Any a;
- INetURLObject aObj( aCommand );
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = aObj.GetURLPath();
- aItem.QueryValue( a );
- aArgs[0].Value = a;
-
- SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >(
- mxFrame->getController(), UNO_QUERY ),
- aCommand,
- aArgs );
+ aArgs[0].Name = msExtrusionProjection.copy(5);
+ aArgs[0].Value <<= (sal_Int32)nProjection;
+
+ mrController.dispatchCommand( msExtrusionProjection, aArgs );
implSetProjection( nProjection, true );
}
}
@@ -325,94 +252,59 @@ IMPL_LINK( ExtrusionDirectionWindow, SelectHdl, void *, pControl )
return 0;
}
-// -----------------------------------------------------------------------
+// =======================================================================
+// ExtrusionDirectionControl
+// =======================================================================
-void ExtrusionDirectionWindow::FillValueSet()
+ExtrusionDirectionControl::ExtrusionDirectionControl( const Reference< lang::XMultiServiceFactory >& rServiceManager )
+: svt::PopupWindowController( rServiceManager, Reference< frame::XFrame >(), OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDirectionFloater" ) ) )
{
}
// -----------------------------------------------------------------------
-void ExtrusionDirectionWindow::StartSelection()
+::Window* ExtrusionDirectionControl::createPopupWindow( ::Window* pParent )
{
- mpDirectionSet->StartSelection();
+ return new ExtrusionDirectionWindow( *this, m_xFrame, pParent );
}
// -----------------------------------------------------------------------
-
-BOOL ExtrusionDirectionWindow::Close()
-{
- return SfxPopupWindow::Close();
-}
-
-// -----------------------------------------------------------------------
-
-void ExtrusionDirectionWindow::PopupModeEnd()
-{
- if ( IsVisible() )
- {
- mbPopupMode = FALSE;
- }
- SfxPopupWindow::PopupModeEnd();
-}
-
+// XServiceInfo
// -----------------------------------------------------------------------
-void ExtrusionDirectionWindow::GetFocus (void)
-{
- SfxPopupWindow::GetFocus();
- // Grab the focus to the line ends value set so that it can be controlled
- // with the keyboard.
- if( mpDirectionSet )
- mpDirectionSet->GrabFocus();
-}
-
-/*************************************************************************
-|*
-|* SvxLineEndToolBoxControl
-|*
-\************************************************************************/
-
-ExtrusionDirectionControl::ExtrusionDirectionControl(
- USHORT nSlotId, USHORT nId, ToolBox &rTbx )
-: SfxToolBoxControl( nSlotId, nId, rTbx )
+OUString SAL_CALL ExtrusionDirectionControl_getImplementationName()
{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
+ return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.ExtrusionDirectionController" ));
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-ExtrusionDirectionControl::~ExtrusionDirectionControl()
+Sequence< OUString > SAL_CALL ExtrusionDirectionControl_getSupportedServiceNames() throw( RuntimeException )
{
+ Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ));
+ return aSNS;
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-SfxPopupWindowType ExtrusionDirectionControl::GetPopupWindowType() const
+Reference< XInterface > SAL_CALL SAL_CALL ExtrusionDirectionControl_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException )
{
- return SFX_POPUPWINDOW_ONCLICK;
+ return *new ExtrusionDirectionControl( rSMgr );
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-SfxPopupWindow* ExtrusionDirectionControl::CreatePopupWindow()
+OUString SAL_CALL ExtrusionDirectionControl::getImplementationName( ) throw (RuntimeException)
{
- ExtrusionDirectionWindow* pWin = new ExtrusionDirectionWindow( GetId(), m_xFrame, &GetToolBox() );
- pWin->StartPopupMode( &GetToolBox(), TRUE );
- pWin->StartSelection();
- SetPopupWindow( pWin );
- return pWin;
+ return ExtrusionDirectionControl_getImplementationName();
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-void ExtrusionDirectionControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* )
+Sequence< OUString > SAL_CALL ExtrusionDirectionControl::getSupportedServiceNames( ) throw (RuntimeException)
{
- USHORT nId = GetId();
- ToolBox& rTbx = GetToolBox();
-
- rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+ return ExtrusionDirectionControl_getSupportedServiceNames();
}
// ####################################################################
@@ -444,135 +336,66 @@ double ExtrusionDepthDialog::getDepth() const
// ####################################################################
-SFX_IMPL_TOOLBOX_CONTROL( ExtrusionDepthControl, SfxBoolItem );
-
-ExtrusionDepthWindow::ExtrusionDepthWindow(
- USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ) :
- SfxPopupWindow( nId,
- rFrame,
- SVX_RES( RID_SVXFLOAT_EXTRUSION_DEPTH )),
- maImgDepth0( SVX_RES( IMG_DEPTH_0 ) ),
- maImgDepth1( SVX_RES( IMG_DEPTH_1 ) ),
- maImgDepth2( SVX_RES( IMG_DEPTH_2 ) ),
- maImgDepth3( SVX_RES( IMG_DEPTH_3 ) ),
- maImgDepth4( SVX_RES( IMG_DEPTH_4 ) ),
- maImgDepthInfinity( SVX_RES( IMG_DEPTH_INFINITY ) ),
- maImgDepth0h( SVX_RES( IMG_DEPTH_0_H ) ),
- maImgDepth1h( SVX_RES( IMG_DEPTH_1_H ) ),
- maImgDepth2h( SVX_RES( IMG_DEPTH_2_H ) ),
- maImgDepth3h( SVX_RES( IMG_DEPTH_3_H ) ),
- maImgDepth4h( SVX_RES( IMG_DEPTH_4_H ) ),
- maImgDepthInfinityh( SVX_RES( IMG_DEPTH_INFINITY_H ) ),
- mxFrame( rFrame ),
- mbPopupMode ( true ),
- mfDepth( -1.0 ),
- mbEnabled( false )
-{
- implInit();
-}
-
-ExtrusionDepthWindow::ExtrusionDepthWindow( USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
- Window* pParentWindow ) :
- SfxPopupWindow( nId,
- rFrame,
- pParentWindow,
- SVX_RES( RID_SVXFLOAT_EXTRUSION_DEPTH )),
- maImgDepth0( SVX_RES( IMG_DEPTH_0 ) ),
- maImgDepth1( SVX_RES( IMG_DEPTH_1 ) ),
- maImgDepth2( SVX_RES( IMG_DEPTH_2 ) ),
- maImgDepth3( SVX_RES( IMG_DEPTH_3 ) ),
- maImgDepth4( SVX_RES( IMG_DEPTH_4 ) ),
- maImgDepthInfinity( SVX_RES( IMG_DEPTH_INFINITY ) ),
- maImgDepth0h( SVX_RES( IMG_DEPTH_0_H ) ),
- maImgDepth1h( SVX_RES( IMG_DEPTH_1_H ) ),
- maImgDepth2h( SVX_RES( IMG_DEPTH_2_H ) ),
- maImgDepth3h( SVX_RES( IMG_DEPTH_3_H ) ),
- maImgDepth4h( SVX_RES( IMG_DEPTH_4_H ) ),
- maImgDepthInfinityh( SVX_RES( IMG_DEPTH_INFINITY_H ) ),
- mxFrame( rFrame ),
- mbPopupMode ( true ),
- mfDepth( -1.0 ),
- mbEnabled( false )
-{
- implInit();
-}
-
-void ExtrusionDepthWindow::implInit()
-{
- SetHelpId( HID_POPUP_EXTRUSION_DEPTH );
-
-// mpDepthForewarder = new SfxStatusForwarder( SID_EXTRUSION_DEPTH, *this );
-// mpMetricForewarder = new SfxStatusForwarder( SID_ATTR_METRIC, *this );
-
- mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN );
- mpMenu->SetHelpId( HID_MENU_EXTRUSION_DEPTH );
+double aDepthListInch[] = { 0, 1270,2540,5080,10160 };
+double aDepthListMM[] = { 0, 1000, 2500, 5000, 10000 };
- mpMenu->SetSelectHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) );
+ExtrusionDepthWindow::ExtrusionDepthWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow )
+: ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_EXTRUSION_DEPTH ))
+, mrController( rController )
+, maImgDepth0( SVX_RES( IMG_DEPTH_0 ) )
+, maImgDepth1( SVX_RES( IMG_DEPTH_1 ) )
+, maImgDepth2( SVX_RES( IMG_DEPTH_2 ) )
+, maImgDepth3( SVX_RES( IMG_DEPTH_3 ) )
+, maImgDepth4( SVX_RES( IMG_DEPTH_4 ) )
+, maImgDepthInfinity( SVX_RES( IMG_DEPTH_INFINITY ) )
+, maImgDepth0h( SVX_RES( IMG_DEPTH_0_H ) )
+, maImgDepth1h( SVX_RES( IMG_DEPTH_1_H ) )
+, maImgDepth2h( SVX_RES( IMG_DEPTH_2_H ) )
+, maImgDepth3h( SVX_RES( IMG_DEPTH_3_H ) )
+, maImgDepth4h( SVX_RES( IMG_DEPTH_4_H ) )
+, maImgDepthInfinityh( SVX_RES( IMG_DEPTH_INFINITY_H ) )
+, mfDepth( -1.0 )
+, msExtrusionDepth( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDepth" ) )
+, msMetricUnit( RTL_CONSTASCII_USTRINGPARAM( ".uno:MetricUnit" ) )
+{
+ SetHelpId( HID_MENU_EXTRUSION_DEPTH );
+
+ SetSelectHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) );
bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
String aEmpty;
- mpMenu->appendEntry( 0, aEmpty, bHighContrast ? maImgDepth0h : maImgDepth0 );
- mpMenu->appendEntry( 1, aEmpty, bHighContrast ? maImgDepth1h : maImgDepth1 );
- mpMenu->appendEntry( 2, aEmpty, bHighContrast ? maImgDepth2h : maImgDepth2 );
- mpMenu->appendEntry( 3, aEmpty, bHighContrast ? maImgDepth3h : maImgDepth3 );
- mpMenu->appendEntry( 4, aEmpty, bHighContrast ? maImgDepth4h : maImgDepth4 );
- mpMenu->appendEntry( 5, String( SVX_RES( STR_INFINITY ) ), bHighContrast ? maImgDepthInfinityh : maImgDepthInfinity );
- mpMenu->appendEntry( 6, String( SVX_RES( STR_CUSTOM ) ) );
+ appendEntry( 0, aEmpty, bHighContrast ? maImgDepth0h : maImgDepth0 );
+ appendEntry( 1, aEmpty, bHighContrast ? maImgDepth1h : maImgDepth1 );
+ appendEntry( 2, aEmpty, bHighContrast ? maImgDepth2h : maImgDepth2 );
+ appendEntry( 3, aEmpty, bHighContrast ? maImgDepth3h : maImgDepth3 );
+ appendEntry( 4, aEmpty, bHighContrast ? maImgDepth4h : maImgDepth4 );
+ appendEntry( 5, String( SVX_RES( STR_INFINITY ) ), bHighContrast ? maImgDepthInfinityh : maImgDepthInfinity );
+ appendEntry( 6, String( SVX_RES( STR_CUSTOM ) ) );
- SetOutputSizePixel( mpMenu->getMenuSize() );
- mpMenu->SetOutputSizePixel( GetOutputSizePixel() );
-
- mpMenu->Show();
+ SetOutputSizePixel( getMenuSize() );
FreeResource();
- AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDepth" )));
- AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:MetricUnit" )));
-// rBindings.Update( SID_ATTR_METRIC );
-// rBindings.Update( SID_EXTRUSION_DEPTH );
-}
-
-SfxPopupWindow* ExtrusionDepthWindow::Clone() const
-{
- return new ExtrusionDepthWindow( GetId(), mxFrame );
+ AddStatusListener( msExtrusionDepth );
+ AddStatusListener( msMetricUnit );
}
// -----------------------------------------------------------------------
-ExtrusionDepthWindow::~ExtrusionDepthWindow()
+void ExtrusionDepthWindow::implSetDepth( double fDepth )
{
-// delete mpDepthForewarder;
-// delete mpMetricForewarder;
-
- delete mpMenu;
-}
-
-// -----------------------------------------------------------------------
-
-double aDepthListInch[] = { 0, 1270,2540,5080,10160 };
-double aDepthListMM[] = { 0, 1000, 2500, 5000, 10000 };
-
-void ExtrusionDepthWindow::implSetDepth( double fDepth, bool bEnabled )
-{
- mbEnabled = bEnabled;
mfDepth = fDepth;
- if( mpMenu )
+ int i;
+ for( i = 0; i < 7; i++ )
{
- int i;
- for( i = 0; i < 7; i++ )
+ if( i == 5 )
{
- if( i == 5 )
- {
- mpMenu->checkEntry( i, (fDepth >= 338666) && bEnabled );
- }
- else if( i != 6 )
- {
- mpMenu->checkEntry( i, (fDepth == (IsMetric( meUnit ) ? aDepthListMM[i] : aDepthListInch[i]) && bEnabled ) );
- }
- mpMenu->enableEntry( i, bEnabled );
+ checkEntry( i, fDepth >= 338666 );
+ }
+ else if( i != 6 )
+ {
+ checkEntry( i, (fDepth == (IsMetric( meUnit ) ? aDepthListMM[i] : aDepthListInch[i]) ) );
}
}
}
@@ -587,38 +410,37 @@ void ExtrusionDepthWindow::implFillStrings( FieldUnit eUnit )
for( int i = 0; i < 5; i++ )
{
String aStr( SVX_RES( nResource + i ) );
- mpMenu->setEntryText( i, aStr );
+ setEntryText( i, aStr );
};
}
// -----------------------------------------------------------------------
-void ExtrusionDepthWindow::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+void SAL_CALL ExtrusionDepthWindow::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException )
{
- switch( nSID )
+ if( Event.FeatureURL.Main.equals( msExtrusionDepth ) )
{
- case SID_EXTRUSION_DEPTH:
+ if( !Event.IsEnabled )
{
- if( eState == SFX_ITEM_DISABLED )
- {
- implSetDepth( 0, false );
- }
- else
- {
- const SvxDoubleItem* pStateItem = PTR_CAST( SvxDoubleItem, pState );
- if( pStateItem )
- implSetDepth( pStateItem->GetValue(), true );
- }
- break;
+ implSetDepth( 0 );
}
- case SID_ATTR_METRIC:
+ else
+ {
+ double fValue = 0.0;
+ if( Event.State >>= fValue )
+ implSetDepth( fValue );
+ }
+ }
+ else if( Event.FeatureURL.Main.equals( msMetricUnit ) )
+ {
+ if( Event.IsEnabled )
{
- const SfxUInt16Item* pStateItem = PTR_CAST( SfxUInt16Item, pState );
- if( pStateItem )
+ sal_Int32 nValue = 0;
+ if( Event.State >>= nValue )
{
- implFillStrings( (FieldUnit)pStateItem->GetValue() );
+ implFillStrings( static_cast<FieldUnit>(nValue) );
if( mfDepth >= 0.0 )
- implSetDepth( mfDepth, mbEnabled );
+ implSetDepth( mfDepth );
}
}
}
@@ -628,18 +450,18 @@ void ExtrusionDepthWindow::StateChanged( USHORT nSID, SfxItemState eState, const
void ExtrusionDepthWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
- SfxPopupWindow::DataChanged( rDCEvt );
+ ToolbarMenu::DataChanged( rDCEvt );
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
- mpMenu->setEntryImage( 0, bHighContrast ? maImgDepth0h : maImgDepth0 );
- mpMenu->setEntryImage( 1, bHighContrast ? maImgDepth1h : maImgDepth1 );
- mpMenu->setEntryImage( 2, bHighContrast ? maImgDepth2h : maImgDepth2 );
- mpMenu->setEntryImage( 3, bHighContrast ? maImgDepth3h : maImgDepth3 );
- mpMenu->setEntryImage( 4, bHighContrast ? maImgDepth4h : maImgDepth4 );
- mpMenu->setEntryImage( 5, bHighContrast ? maImgDepthInfinityh : maImgDepthInfinity );
+ setEntryImage( 0, bHighContrast ? maImgDepth0h : maImgDepth0 );
+ setEntryImage( 1, bHighContrast ? maImgDepth1h : maImgDepth1 );
+ setEntryImage( 2, bHighContrast ? maImgDepth2h : maImgDepth2 );
+ setEntryImage( 3, bHighContrast ? maImgDepth3h : maImgDepth3 );
+ setEntryImage( 4, bHighContrast ? maImgDepth4h : maImgDepth4 );
+ setEntryImage( 5, bHighContrast ? maImgDepthInfinityh : maImgDepthInfinity );
}
}
@@ -648,9 +470,7 @@ void ExtrusionDepthWindow::DataChanged( const DataChangedEvent& rDCEvt )
IMPL_LINK( ExtrusionDepthWindow, SelectHdl, void *, EMPTYARG )
{
-// SfxDispatcher* pDisp = GetBindings().GetDispatcher();
-
- int nSelected = mpMenu->getSelectedEntryId();
+ int nSelected = getSelectedEntryId();
if( nSelected != -1 )
{
if( nSelected == 6 )
@@ -658,24 +478,16 @@ IMPL_LINK( ExtrusionDepthWindow, SelectHdl, void *, EMPTYARG )
if ( IsInPopupMode() )
EndPopupMode();
- SvxDoubleItem aDepthItem( mfDepth, SID_EXTRUSION_DEPTH );
- SfxUInt16Item aMetricItem(
- SID_ATTR_METRIC, sal::static_int_cast< UINT16 >( meUnit ) );
- rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDepthDialog" ));
+ const rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDepthDialog" ));
Any a;
Sequence< PropertyValue > aArgs( 2 );
aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Depth" ));
- aDepthItem.QueryValue( a );
- aArgs[0].Value = a;
+ aArgs[0].Value <<= mfDepth;
aArgs[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Metric" ));
- aMetricItem.QueryValue( a );
- aArgs[1].Value = a;
+ aArgs[1].Value <<= static_cast<sal_Int32>( meUnit );
- SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >(
- mxFrame->getController(), UNO_QUERY ),
- aCommand,
- aArgs );
+ mrController.dispatchCommand( aCommand, aArgs );
}
else
{
@@ -690,21 +502,12 @@ IMPL_LINK( ExtrusionDepthWindow, SelectHdl, void *, EMPTYARG )
fDepth = IsMetric( meUnit ) ? aDepthListMM[nSelected] : aDepthListInch[nSelected];
}
- SvxDoubleItem aItem( fDepth, SID_EXTRUSION_DEPTH );
- rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDepth" ));
-
- Any a;
- INetURLObject aObj( aCommand );
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = aObj.GetURLPath();
- aItem.QueryValue( a );
- aArgs[0].Value = a;
+ aArgs[0].Name = msExtrusionDepth.copy(5);
+ aArgs[0].Value <<= fDepth;
- SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >(
- mxFrame->getController(), UNO_QUERY ),
- aCommand,
- aArgs );
- implSetDepth( fDepth, true );
+ mrController.dispatchCommand( msExtrusionDepth, aArgs );
+ implSetDepth( fDepth );
if ( IsInPopupMode() )
EndPopupMode();
@@ -713,143 +516,83 @@ IMPL_LINK( ExtrusionDepthWindow, SelectHdl, void *, EMPTYARG )
return 0;
}
-// -----------------------------------------------------------------------
+// =======================================================================
+// ExtrusionDirectionControl
+// =======================================================================
-void ExtrusionDepthWindow::StartSelection()
+ExtrusionDepthController::ExtrusionDepthController( const Reference< lang::XMultiServiceFactory >& rServiceManager )
+: svt::PopupWindowController( rServiceManager, Reference< frame::XFrame >(), OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDepthFloater" ) ) )
{
}
// -----------------------------------------------------------------------
-BOOL ExtrusionDepthWindow::Close()
+::Window* ExtrusionDepthController::createPopupWindow( ::Window* pParent )
{
- return SfxPopupWindow::Close();
+ return new ExtrusionDepthWindow( *this, m_xFrame, pParent );
}
-// -----------------------------------------------------------------------
-
-void ExtrusionDepthWindow::PopupModeEnd()
-{
- if ( IsVisible() )
- {
- mbPopupMode = FALSE;
- }
- SfxPopupWindow::PopupModeEnd();
-}
// -----------------------------------------------------------------------
-
-void ExtrusionDepthWindow::GetFocus (void)
-{
- SfxPopupWindow::GetFocus();
- // Grab the focus to the line ends value set so that it can be controlled
- // with the keyboard.
- if( mpMenu )
- mpMenu->GrabFocus();
-}
-
-// ========================================================================
-
-ExtrusionDepthControl::ExtrusionDepthControl(
- USHORT nSlotId, USHORT nId, ToolBox &rTbx )
-: SfxToolBoxControl( nSlotId, nId, rTbx )
-{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
-}
-
+// XServiceInfo
// -----------------------------------------------------------------------
-ExtrusionDepthControl::~ExtrusionDepthControl()
+OUString SAL_CALL ExtrusionDepthController_getImplementationName()
{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.ExtrusionDepthController" ));
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-SfxPopupWindowType ExtrusionDepthControl::GetPopupWindowType() const
+Sequence< OUString > SAL_CALL ExtrusionDepthController_getSupportedServiceNames() throw( RuntimeException )
{
- return SFX_POPUPWINDOW_ONCLICK;
+ Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.PopupMenuController" ));
+ return aSNS;
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-SfxPopupWindow* ExtrusionDepthControl::CreatePopupWindow()
+Reference< XInterface > SAL_CALL SAL_CALL ExtrusionDepthController_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException )
{
- ExtrusionDepthWindow* pWin = new ExtrusionDepthWindow( GetId(), m_xFrame, &GetToolBox() );
- pWin->StartPopupMode( &GetToolBox(), TRUE );
- pWin->StartSelection();
- SetPopupWindow( pWin );
- return pWin;
+ return *new ExtrusionDepthController( rSMgr );
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-void ExtrusionDepthControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* )
+OUString SAL_CALL ExtrusionDepthController::getImplementationName( ) throw (RuntimeException)
{
- USHORT nId = GetId();
- ToolBox& rTbx = GetToolBox();
-
- rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+ return ExtrusionDepthController_getImplementationName();
}
-// ####################################################################
+// --------------------------------------------------------------------
-SFX_IMPL_TOOLBOX_CONTROL( ExtrusionLightingControl, SfxBoolItem );
-
-ExtrusionLightingWindow::ExtrusionLightingWindow(
- USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ) :
- SfxPopupWindow( nId,
- rFrame,
- SVX_RES( RID_SVXFLOAT_EXTRUSION_LIGHTING ) ),
- maImgBright( SVX_RES( IMG_LIGHTING_BRIGHT ) ),
- maImgNormal( SVX_RES( IMG_LIGHTING_NORMAL ) ),
- maImgDim( SVX_RES( IMG_LIGHTING_DIM ) ),
- maImgBrighth( SVX_RES( IMG_LIGHTING_BRIGHT_H ) ),
- maImgNormalh( SVX_RES( IMG_LIGHTING_NORMAL_H ) ),
- maImgDimh( SVX_RES( IMG_LIGHTING_DIM_H ) ),
- mxFrame( rFrame ),
- mbPopupMode( true ),
- mnLevel( 0 ),
- mbLevelEnabled( false ),
- mnDirection( FROM_FRONT ),
- mbDirectionEnabled( false )
+Sequence< OUString > SAL_CALL ExtrusionDepthController::getSupportedServiceNames( ) throw (RuntimeException)
{
- implInit();
+ return ExtrusionDepthController_getSupportedServiceNames();
}
-// -----------------------------------------------------------------------
-ExtrusionLightingWindow::ExtrusionLightingWindow(
- USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
- Window* pParentWindow ) :
- SfxPopupWindow( nId,
- rFrame,
- pParentWindow,
- SVX_RES( RID_SVXFLOAT_EXTRUSION_LIGHTING ) ),
- maImgBright( SVX_RES( IMG_LIGHTING_BRIGHT ) ),
- maImgNormal( SVX_RES( IMG_LIGHTING_NORMAL ) ),
- maImgDim( SVX_RES( IMG_LIGHTING_DIM ) ),
- maImgBrighth( SVX_RES( IMG_LIGHTING_BRIGHT_H ) ),
- maImgNormalh( SVX_RES( IMG_LIGHTING_NORMAL_H ) ),
- maImgDimh( SVX_RES( IMG_LIGHTING_DIM_H ) ),
- mxFrame( rFrame ),
- mbPopupMode( true ),
- mnLevel( 0 ),
- mbLevelEnabled( false ),
- mnDirection( FROM_FRONT ),
- mbDirectionEnabled( false )
-{
- implInit();
-}
-
-// -----------------------------------------------------------------------
+// ####################################################################
-void ExtrusionLightingWindow::implInit()
+// -------------------------------------------------------------------------
+
+ExtrusionLightingWindow::ExtrusionLightingWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow )
+: ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_EXTRUSION_LIGHTING ))
+, mrController( rController )
+, maImgBright( SVX_RES( IMG_LIGHTING_BRIGHT ) )
+, maImgNormal( SVX_RES( IMG_LIGHTING_NORMAL ) )
+, maImgDim( SVX_RES( IMG_LIGHTING_DIM ) )
+, maImgBrighth( SVX_RES( IMG_LIGHTING_BRIGHT_H ) )
+, maImgNormalh( SVX_RES( IMG_LIGHTING_NORMAL_H ) )
+, maImgDimh( SVX_RES( IMG_LIGHTING_DIM_H ) )
+, mnLevel( 0 )
+, mbLevelEnabled( false )
+, mnDirection( FROM_FRONT )
+, mbDirectionEnabled( false )
+, msExtrusionLightingDirection( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionLightingDirection" ))
+, msExtrusionLightingIntensity( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionLightingIntensity" ))
{
- SetHelpId( HID_POPUP_EXTRUSION_LIGHTING );
-
USHORT i;
for( i = FROM_TOP_LEFT; i <= FROM_BOTTOM_RIGHT; i++ )
{
@@ -864,17 +607,12 @@ void ExtrusionLightingWindow::implInit()
maImgLightingPreviewh[i] = Image( SVX_RES( IMG_LIGHT_PREVIEW_H + i ) );
}
-// mpLightingDirectionForewarder = new SfxStatusForwarder( SID_EXTRUSION_LIGHTING_DIRECTION, *this );
-// mpLightingIntensityForewarder = new SfxStatusForwarder( SID_EXTRUSION_LIGHTING_INTENSITY, *this );
-
- mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN );
- mpMenu->SetHelpId( HID_MENU_EXTRUSION_LIGHTING );
- mpMenu->SetSelectHdl( LINK( this, ExtrusionLightingWindow, SelectHdl ) );
+ SetHelpId( HID_MENU_EXTRUSION_LIGHTING );
+ SetSelectHdl( LINK( this, ExtrusionLightingWindow, SelectHdl ) );
- mpLightingSet = new ValueSet( mpMenu, WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT );
+ mpLightingSet = createEmptyValueSetControl();
mpLightingSet->SetHelpId( HID_VALUESET_EXTRUSION_LIGHTING );
- mpLightingSet->SetHelpId( HID_POPUP_LINEEND_CTRL );
mpLightingSet->SetSelectHdl( LINK( this, ExtrusionLightingWindow, SelectHdl ) );
mpLightingSet->SetColCount( 3 );
mpLightingSet->EnableFullItemMode( FALSE );
@@ -894,35 +632,18 @@ void ExtrusionLightingWindow::implInit()
}
mpLightingSet->SetOutputSizePixel( Size( 72, 72 ) );
- mpMenu->appendEntry( 3, mpLightingSet );
- mpMenu->appendSeparator();
- mpMenu->appendEntry( 0, String( SVX_RES( STR_BRIGHT ) ), bHighContrast ? maImgBrighth : maImgBright );
- mpMenu->appendEntry( 1, String( SVX_RES( STR_NORMAL ) ), bHighContrast ? maImgNormalh : maImgNormal );
- mpMenu->appendEntry( 2, String( SVX_RES( STR_DIM ) ), bHighContrast ? maImgDimh : maImgDim );
-
- SetOutputSizePixel( mpMenu->getMenuSize() );
- mpMenu->SetOutputSizePixel( GetOutputSizePixel() );
+ appendEntry( 3, mpLightingSet );
+ appendSeparator();
+ appendEntry( 0, String( SVX_RES( STR_BRIGHT ) ), bHighContrast ? maImgBrighth : maImgBright );
+ appendEntry( 1, String( SVX_RES( STR_NORMAL ) ), bHighContrast ? maImgNormalh : maImgNormal );
+ appendEntry( 2, String( SVX_RES( STR_DIM ) ), bHighContrast ? maImgDimh : maImgDim );
- mpMenu->Show();
+ SetOutputSizePixel( getMenuSize() );
FreeResource();
- AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionLightingDirection" )));
- AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionLightingIntensity" )));
-}
-
-// -----------------------------------------------------------------------
-
-SfxPopupWindow* ExtrusionLightingWindow::Clone() const
-{
- return new ExtrusionLightingWindow( GetId(), mxFrame );
-}
-
-// -----------------------------------------------------------------------
-
-ExtrusionLightingWindow::~ExtrusionLightingWindow()
-{
- delete mpMenu;
+ AddStatusListener( msExtrusionLightingDirection );
+ AddStatusListener( msExtrusionLightingIntensity );
}
// -----------------------------------------------------------------------
@@ -934,8 +655,8 @@ void ExtrusionLightingWindow::implSetIntensity( int nLevel, bool bEnabled )
int i = 0;
for( i = 0; i < 3; i++ )
{
- mpMenu->checkEntry( i, (i == nLevel) && bEnabled );
- mpMenu->enableEntry( i, bEnabled );
+ checkEntry( i, (i == nLevel) && bEnabled );
+ enableEntry( i, bEnabled );
}
}
@@ -971,42 +692,37 @@ void ExtrusionLightingWindow::implSetDirection( int nDirection, bool bEnabled )
}
}
- mpMenu->enableEntry( 3, bEnabled );
+ enableEntry( 3, bEnabled );
}
// -----------------------------------------------------------------------
-void ExtrusionLightingWindow::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+void SAL_CALL ExtrusionLightingWindow::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException )
{
- switch( nSID )
+ if( Event.FeatureURL.Main.equals( msExtrusionLightingIntensity ) )
{
- case SID_EXTRUSION_LIGHTING_INTENSITY:
+ if( !Event.IsEnabled )
{
- if( eState == SFX_ITEM_DISABLED )
- {
- implSetIntensity( 0, false );
- }
- else
- {
- const SfxInt32Item* pStateItem = PTR_CAST( SfxInt32Item, pState );
- if( pStateItem )
- implSetIntensity( pStateItem->GetValue(), true );
- }
- break;
+ implSetIntensity( 0, false );
}
- case SID_EXTRUSION_LIGHTING_DIRECTION:
+ else
{
- if( eState == SFX_ITEM_DISABLED )
- {
- implSetDirection( 0, false );
- }
- else
- {
- const SfxInt32Item* pStateItem = PTR_CAST( SfxInt32Item, pState );
- if( pStateItem )
- implSetDirection( pStateItem->GetValue(), true );
- }
- break;
+ sal_Int32 nValue = 0;
+ if( Event.State >>= nValue )
+ implSetIntensity( nValue, true );
+ }
+ }
+ else if( Event.FeatureURL.Main.equals( msExtrusionLightingDirection ) )
+ {
+ if( !Event.IsEnabled )
+ {
+ implSetDirection( 0, false );
+ }
+ else
+ {
+ sal_Int32 nValue = 0;
+ if( Event.State >>= nValue )
+ implSetDirection( nValue, true );
}
}
}
@@ -1015,16 +731,16 @@ void ExtrusionLightingWindow::StateChanged( USHORT nSID, SfxItemState eState, co
void ExtrusionLightingWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
- SfxPopupWindow::DataChanged( rDCEvt );
+ ToolbarMenu::DataChanged( rDCEvt );
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
implSetDirection( mnDirection, mbDirectionEnabled );
- mpMenu->setEntryImage( 0, bHighContrast ? maImgBrighth : maImgBright );
- mpMenu->setEntryImage( 1, bHighContrast ? maImgNormalh : maImgNormal );
- mpMenu->setEntryImage( 2, bHighContrast ? maImgDimh : maImgDim );
+ setEntryImage( 0, bHighContrast ? maImgBrighth : maImgBright );
+ setEntryImage( 1, bHighContrast ? maImgNormalh : maImgNormal );
+ setEntryImage( 2, bHighContrast ? maImgDimh : maImgDim );
}
}
@@ -1035,31 +751,19 @@ IMPL_LINK( ExtrusionLightingWindow, SelectHdl, void *, pControl )
if ( IsInPopupMode() )
EndPopupMode();
-// SfxDispatcher* pDisp = GetBindings().GetDispatcher();
-
- if( pControl == mpMenu )
+ if( pControl == this )
{
- int nLevel = mpMenu->getSelectedEntryId();
+ int nLevel = getSelectedEntryId();
if( nLevel >= 0 )
{
if( nLevel != 3 )
{
- SfxInt32Item aItem( SID_EXTRUSION_LIGHTING_INTENSITY, nLevel );
- rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionLightingIntensity" ));
-
- Any a;
- INetURLObject aObj( aCommand );
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = aObj.GetURLPath();
- aItem.QueryValue( a );
- aArgs[0].Value = a;
+ aArgs[0].Name = msExtrusionLightingIntensity.copy(5);
+ aArgs[0].Value <<= (sal_Int32)nLevel;
- SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >(
- mxFrame->getController(), UNO_QUERY ),
- aCommand,
- aArgs );
+ mrController.dispatchCommand( msExtrusionLightingIntensity, aArgs );
-// pDisp->Execute( SID_EXTRUSION_LIGHTING_INTENSITY, SFX_CALLMODE_RECORD, &aItem, 0L , 0L );
implSetIntensity( nLevel, true );
}
}
@@ -1072,21 +776,11 @@ IMPL_LINK( ExtrusionLightingWindow, SelectHdl, void *, pControl )
{
nDirection--;
- SfxInt32Item aItem( SID_EXTRUSION_LIGHTING_DIRECTION, nDirection );
- rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionLightingDirection" ));
-
- Any a;
- INetURLObject aObj( aCommand );
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = aObj.GetURLPath();
- aItem.QueryValue( a );
- aArgs[0].Value = a;
+ aArgs[0].Name = msExtrusionLightingDirection.copy(5);
+ aArgs[0].Value <<= (sal_Int32)nDirection;
- SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >(
- mxFrame->getController(), UNO_QUERY ),
- aCommand,
- aArgs );
-// pDisp->Execute( SID_EXTRUSION_LIGHTING_DIRECTION, SFX_CALLMODE_RECORD, &aItem, 0L , 0L );
+ mrController.dispatchCommand( msExtrusionLightingDirection, aArgs );
implSetDirection( nDirection, true );
}
@@ -1096,229 +790,122 @@ IMPL_LINK( ExtrusionLightingWindow, SelectHdl, void *, pControl )
return 0;
}
-// -----------------------------------------------------------------------
+// ========================================================================
-void ExtrusionLightingWindow::StartSelection()
+ExtrusionLightingControl::ExtrusionLightingControl( const Reference< lang::XMultiServiceFactory >& rServiceManager )
+: svt::PopupWindowController( rServiceManager, Reference< frame::XFrame >(), OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDirectionFloater" ) ) )
{
}
// -----------------------------------------------------------------------
-BOOL ExtrusionLightingWindow::Close()
+::Window* ExtrusionLightingControl::createPopupWindow( ::Window* pParent )
{
- return SfxPopupWindow::Close();
+ return new ExtrusionLightingWindow( *this, m_xFrame, pParent );
}
// -----------------------------------------------------------------------
-
-void ExtrusionLightingWindow::PopupModeEnd()
-{
- if ( IsVisible() )
- {
- mbPopupMode = FALSE;
- }
- SfxPopupWindow::PopupModeEnd();
-}
-
+// XServiceInfo
// -----------------------------------------------------------------------
-void ExtrusionLightingWindow::GetFocus (void)
-{
- SfxPopupWindow::GetFocus();
- // Grab the focus to the line ends value set so that it can be controlled
- // with the keyboard.
- if( mpMenu )
- mpMenu->GrabFocus();
-}
-
-// ========================================================================
-
-ExtrusionLightingControl::ExtrusionLightingControl( USHORT nSlotId, USHORT nId, ToolBox &rTbx )
-: SfxToolBoxControl( nSlotId, nId, rTbx )
+OUString SAL_CALL ExtrusionLightingControl_getImplementationName()
{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
+ return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.ExtrusionLightingController" ));
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-ExtrusionLightingControl::~ExtrusionLightingControl()
+Sequence< OUString > SAL_CALL ExtrusionLightingControl_getSupportedServiceNames() throw( RuntimeException )
{
+ Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ));
+ return aSNS;
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-SfxPopupWindowType ExtrusionLightingControl::GetPopupWindowType() const
+Reference< XInterface > SAL_CALL SAL_CALL ExtrusionLightingControl_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException )
{
- return SFX_POPUPWINDOW_ONCLICK;
+ return *new ExtrusionLightingControl( rSMgr );
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-SfxPopupWindow* ExtrusionLightingControl::CreatePopupWindow()
+OUString SAL_CALL ExtrusionLightingControl::getImplementationName( ) throw (RuntimeException)
{
- ExtrusionLightingWindow* pWin = new ExtrusionLightingWindow( GetId(), m_xFrame, &GetToolBox() );
- pWin->StartPopupMode( &GetToolBox(), TRUE );
- pWin->StartSelection();
- SetPopupWindow( pWin );
- return pWin;
+ return ExtrusionLightingControl_getImplementationName();
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-void ExtrusionLightingControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* )
+Sequence< OUString > SAL_CALL ExtrusionLightingControl::getSupportedServiceNames( ) throw (RuntimeException)
{
- USHORT nId = GetId();
- ToolBox& rTbx = GetToolBox();
-
- rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+ return ExtrusionLightingControl_getSupportedServiceNames();
}
// ####################################################################
-SFX_IMPL_TOOLBOX_CONTROL( ExtrusionSurfaceControl, SfxBoolItem );
-
-ExtrusionSurfaceWindow::ExtrusionSurfaceWindow(
- USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ) :
-
- SfxPopupWindow( nId,
- rFrame,
- SVX_RES( RID_SVXFLOAT_EXTRUSION_SURFACE )),
- maImgSurface1( SVX_RES( IMG_WIRE_FRAME ) ),
- maImgSurface2( SVX_RES( IMG_MATTE ) ),
- maImgSurface3( SVX_RES( IMG_PLASTIC ) ),
- maImgSurface4( SVX_RES( IMG_METAL ) ),
- maImgSurface1h( SVX_RES( IMG_WIRE_FRAME_H ) ),
- maImgSurface2h( SVX_RES( IMG_MATTE_H ) ),
- maImgSurface3h( SVX_RES( IMG_PLASTIC_H ) ),
- maImgSurface4h( SVX_RES( IMG_METAL_H ) ),
- mxFrame( rFrame ),
- mbPopupMode( true )
+ExtrusionSurfaceWindow::ExtrusionSurfaceWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow )
+: ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_EXTRUSION_SURFACE ))
+, mrController( rController )
+, maImgSurface1( SVX_RES( IMG_WIRE_FRAME ) )
+, maImgSurface2( SVX_RES( IMG_MATTE ) )
+, maImgSurface3( SVX_RES( IMG_PLASTIC ) )
+, maImgSurface4( SVX_RES( IMG_METAL ) )
+, maImgSurface1h( SVX_RES( IMG_WIRE_FRAME_H ) )
+, maImgSurface2h( SVX_RES( IMG_MATTE_H ) )
+, maImgSurface3h( SVX_RES( IMG_PLASTIC_H ) )
+, maImgSurface4h( SVX_RES( IMG_METAL_H ) )
+, msExtrusionSurface( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionSurface" ))
{
- implInit();
-}
-
-ExtrusionSurfaceWindow::ExtrusionSurfaceWindow(
- USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
- Window* pParentWindow ) :
-
- SfxPopupWindow( nId,
- rFrame,
- pParentWindow,
- SVX_RES( RID_SVXFLOAT_EXTRUSION_SURFACE )),
- maImgSurface1( SVX_RES( IMG_WIRE_FRAME ) ),
- maImgSurface2( SVX_RES( IMG_MATTE ) ),
- maImgSurface3( SVX_RES( IMG_PLASTIC ) ),
- maImgSurface4( SVX_RES( IMG_METAL ) ),
- maImgSurface1h( SVX_RES( IMG_WIRE_FRAME_H ) ),
- maImgSurface2h( SVX_RES( IMG_MATTE_H ) ),
- maImgSurface3h( SVX_RES( IMG_PLASTIC_H ) ),
- maImgSurface4h( SVX_RES( IMG_METAL_H ) ),
- mxFrame( rFrame ),
- mbPopupMode( true )
-{
- implInit();
-}
-
-// -----------------------------------------------------------------------
-
-void ExtrusionSurfaceWindow::implInit()
-{
- SetHelpId( HID_POPUP_EXTRUSION_SURFACE );
-
bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
-// mpSurfaceForewarder = new SfxStatusForwarder( SID_EXTRUSION_SURFACE, *this );
-
- mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN );
- mpMenu->SetHelpId( HID_MENU_EXTRUSION_SURFACE );
- mpMenu->SetSelectHdl( LINK( this, ExtrusionSurfaceWindow, SelectHdl ) );
+ SetHelpId( HID_MENU_EXTRUSION_SURFACE );
+ SetSelectHdl( LINK( this, ExtrusionSurfaceWindow, SelectHdl ) );
- mpMenu->appendEntry( 0, String( SVX_RES( STR_WIREFRAME ) ), bHighContrast ? maImgSurface1h : maImgSurface1 );
- mpMenu->appendEntry( 1, String( SVX_RES( STR_MATTE ) ), bHighContrast ? maImgSurface2h : maImgSurface2 );
- mpMenu->appendEntry( 2, String( SVX_RES( STR_PLASTIC ) ), bHighContrast ? maImgSurface3h : maImgSurface3 );
- mpMenu->appendEntry( 3, String( SVX_RES( STR_METAL ) ), bHighContrast ? maImgSurface4h : maImgSurface4 );
+ appendEntry( 0, String( SVX_RES( STR_WIREFRAME ) ), bHighContrast ? maImgSurface1h : maImgSurface1 );
+ appendEntry( 1, String( SVX_RES( STR_MATTE ) ), bHighContrast ? maImgSurface2h : maImgSurface2 );
+ appendEntry( 2, String( SVX_RES( STR_PLASTIC ) ), bHighContrast ? maImgSurface3h : maImgSurface3 );
+ appendEntry( 3, String( SVX_RES( STR_METAL ) ), bHighContrast ? maImgSurface4h : maImgSurface4 );
- SetOutputSizePixel( mpMenu->getMenuSize() );
- mpMenu->SetOutputSizePixel( GetOutputSizePixel() );
-
- mpMenu->Show();
+ SetOutputSizePixel( getMenuSize() );
FreeResource();
- AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionSurface" )));
-// rBindings.Update( SID_EXTRUSION_SURFACE );
-}
-
-// -----------------------------------------------------------------------
-
-SfxPopupWindow* ExtrusionSurfaceWindow::Clone() const
-{
- return new ExtrusionSurfaceWindow( GetId(), mxFrame );
-}
-
-// -----------------------------------------------------------------------
-
-ExtrusionSurfaceWindow::~ExtrusionSurfaceWindow()
-{
-// delete mpSurfaceForewarder;
- delete mpMenu;
+ AddStatusListener( msExtrusionSurface );
}
// -----------------------------------------------------------------------
void ExtrusionSurfaceWindow::implSetSurface( int nSurface, bool bEnabled )
{
- if( mpMenu )
+// if( mpMenu )
{
int i;
for( i = 0; i < 4; i++ )
{
- mpMenu->checkEntry( i, (i == nSurface) && bEnabled );
- mpMenu->enableEntry( i, bEnabled );
+ checkEntry( i, (i == nSurface) && bEnabled );
+ enableEntry( i, bEnabled );
}
}
}
// -----------------------------------------------------------------------
-void ExtrusionSurfaceWindow::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+void SAL_CALL ExtrusionSurfaceWindow::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException )
{
- switch( nSID )
+ if( Event.FeatureURL.Main.equals( msExtrusionSurface ) )
{
- case SID_EXTRUSION_SURFACE:
+ if( !Event.IsEnabled )
{
- if( eState == SFX_ITEM_DISABLED )
- {
- implSetSurface( 0, false );
- }
- else
- {
- const SfxInt32Item* pStateItem = PTR_CAST( SfxInt32Item, pState );
- if( pStateItem )
- implSetSurface( pStateItem->GetValue(), true );
- }
- break;
+ implSetSurface( 0, false );
+ }
+ else
+ {
+ sal_Int32 nValue = 0;
+ if( Event.State >>= nValue )
+ implSetSurface( nValue, true );
}
- }
-}
-
-// -----------------------------------------------------------------------
-
-void ExtrusionSurfaceWindow::DataChanged( const DataChangedEvent& rDCEvt )
-{
- SfxPopupWindow::DataChanged( rDCEvt );
-
- if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
- {
- bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
-
- mpMenu->appendEntry( 0, String( SVX_RES( STR_WIREFRAME ) ), bHighContrast ? maImgSurface1h : maImgSurface1 );
- mpMenu->appendEntry( 1, String( SVX_RES( STR_MATTE ) ), bHighContrast ? maImgSurface2h : maImgSurface2 );
- mpMenu->appendEntry( 2, String( SVX_RES( STR_PLASTIC ) ), bHighContrast ? maImgSurface3h : maImgSurface3 );
- mpMenu->appendEntry( 3, String( SVX_RES( STR_METAL ) ), bHighContrast ? maImgSurface4h : maImgSurface4 );
}
}
@@ -1329,26 +916,14 @@ IMPL_LINK( ExtrusionSurfaceWindow, SelectHdl, void *, EMPTYARG )
if ( IsInPopupMode() )
EndPopupMode();
-// SfxDispatcher* pDisp = GetBindings().GetDispatcher();
-
- sal_Int32 nSurface = mpMenu->getSelectedEntryId();
+ sal_Int32 nSurface = getSelectedEntryId();
if( nSurface >= 0 )
{
- SfxInt32Item aItem( SID_EXTRUSION_SURFACE, nSurface );
- rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionSurface" ));
-
- Any a;
- INetURLObject aObj( aCommand );
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = aObj.GetURLPath();
- aItem.QueryValue( a );
- aArgs[0].Value = a;
+ aArgs[0].Name = msExtrusionSurface.copy(5);
+ aArgs[0].Value <<= (sal_Int32)nSurface;
- SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >(
- mxFrame->getController(), UNO_QUERY ),
- aCommand,
- aArgs );
-// pDisp->Execute( SID_EXTRUSION_SURFACE, SFX_CALLMODE_RECORD, &aItem, 0L , 0L );
+ mrController.dispatchCommand( msExtrusionSurface, aArgs );
implSetSurface( nSurface, true );
}
@@ -1356,83 +931,57 @@ IMPL_LINK( ExtrusionSurfaceWindow, SelectHdl, void *, EMPTYARG )
return 0;
}
-// -----------------------------------------------------------------------
+// ========================================================================
-void ExtrusionSurfaceWindow::StartSelection()
+ExtrusionSurfaceControl::ExtrusionSurfaceControl( const Reference< lang::XMultiServiceFactory >& rServiceManager )
+: svt::PopupWindowController( rServiceManager, Reference< frame::XFrame >(), OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionSurfaceFloater" ) ) )
{
}
// -----------------------------------------------------------------------
-BOOL ExtrusionSurfaceWindow::Close()
+::Window* ExtrusionSurfaceControl::createPopupWindow( ::Window* pParent )
{
- return SfxPopupWindow::Close();
+ return new ExtrusionSurfaceWindow( *this, m_xFrame, pParent );
}
// -----------------------------------------------------------------------
-
-void ExtrusionSurfaceWindow::PopupModeEnd()
-{
- if ( IsVisible() )
- {
- mbPopupMode = FALSE;
- }
- SfxPopupWindow::PopupModeEnd();
-}
-
+// XServiceInfo
// -----------------------------------------------------------------------
-void ExtrusionSurfaceWindow::GetFocus (void)
+OUString SAL_CALL ExtrusionSurfaceControl_getImplementationName()
{
- SfxPopupWindow::GetFocus();
- // Grab the focus to the line ends value set so that it can be controlled
- // with the keyboard.
- if( mpMenu )
- mpMenu->GrabFocus();
+ return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.ExtrusionSurfaceController" ));
}
-// ========================================================================
+// --------------------------------------------------------------------
-ExtrusionSurfaceControl::ExtrusionSurfaceControl(
- USHORT nSlotId, USHORT nId, ToolBox &rTbx )
-: SfxToolBoxControl( nSlotId, nId, rTbx )
+Sequence< OUString > SAL_CALL ExtrusionSurfaceControl_getSupportedServiceNames() throw( RuntimeException )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
+ Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ));
+ return aSNS;
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-ExtrusionSurfaceControl::~ExtrusionSurfaceControl()
+Reference< XInterface > SAL_CALL SAL_CALL ExtrusionSurfaceControl_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException )
{
+ return *new ExtrusionSurfaceControl( rSMgr );
}
-// -----------------------------------------------------------------------
-
-SfxPopupWindowType ExtrusionSurfaceControl::GetPopupWindowType() const
-{
- return SFX_POPUPWINDOW_ONCLICK;
-}
-
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-SfxPopupWindow* ExtrusionSurfaceControl::CreatePopupWindow()
+OUString SAL_CALL ExtrusionSurfaceControl::getImplementationName( ) throw (RuntimeException)
{
- ExtrusionSurfaceWindow* pWin = new ExtrusionSurfaceWindow( GetId(), m_xFrame, &GetToolBox() );
- pWin->StartPopupMode( &GetToolBox(), TRUE );
- pWin->StartSelection();
- SetPopupWindow( pWin );
- return pWin;
+ return ExtrusionSurfaceControl_getImplementationName();
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-void ExtrusionSurfaceControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* )
+Sequence< OUString > SAL_CALL ExtrusionSurfaceControl::getSupportedServiceNames( ) throw (RuntimeException)
{
- USHORT nId = GetId();
- ToolBox& rTbx = GetToolBox();
-
- rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+ return ExtrusionSurfaceControl_getSupportedServiceNames();
}
//========================================================================
@@ -1498,3 +1047,5 @@ void ExtrusionColorControl::StateChanged( USHORT nSID, SfxItemState eState, cons
rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
}
+
+}
diff --git a/svx/source/tbxctrls/extrusioncontrols.hxx b/svx/source/tbxctrls/extrusioncontrols.hxx
new file mode 100644
index 000000000000..3dd8272b6940
--- /dev/null
+++ b/svx/source/tbxctrls/extrusioncontrols.hxx
@@ -0,0 +1,260 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_EXTRUSION_CONTROLS_HXX
+#define _SVX_EXTRUSION_CONTROLS_HXX
+
+#include "svx/svxdllapi.h"
+
+#include <svtools/valueset.hxx>
+#include <svtools/svtreebx.hxx>
+#include <vcl/button.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/field.hxx>
+#include <vcl/fixed.hxx>
+
+#include <svtools/toolbarmenu.hxx>
+#include <svtools/popupwindowcontroller.hxx>
+#include <svtools/popupmenucontrollerbase.hxx>
+
+class SfxBindings;
+class SfxStatusForwarder;
+
+//========================================================================
+
+namespace svx
+{
+class ToolboxButtonColorUpdater;
+
+class ExtrusionDirectionWindow : public svtools::ToolbarMenu
+{
+public:
+ ExtrusionDirectionWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow );
+
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+private:
+ svt::ToolboxController& mrController;
+ ValueSet* mpDirectionSet;
+
+ Image maImgDirection[9];
+ Image maImgDirectionH[9];
+
+ Image maImgPerspective;
+ Image maImgPerspectiveH;
+ Image maImgParallel;
+ Image maImgParallelH;
+
+ const rtl::OUString msExtrusionDirection;
+ const rtl::OUString msExtrusionProjection;
+
+ DECL_LINK( SelectHdl, void * );
+ void FillValueSet();
+
+ void implSetDirection( sal_Int32 nSkew, bool bEnabled = true );
+ void implSetProjection( sal_Int32 nProjection, bool bEnabled = true );
+
+};
+
+//========================================================================
+
+class ExtrusionDirectionControl : public svt::PopupWindowController
+{
+public:
+ ExtrusionDirectionControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
+
+ virtual ::Window* createPopupWindow( ::Window* pParent );
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
+
+ using svt::PopupWindowController::createPopupWindow;
+};
+
+//========================================================================
+
+class ExtrusionDepthWindow : public svtools::ToolbarMenu
+{
+private:
+ svt::ToolboxController& mrController;
+
+ Image maImgDepth0;
+ Image maImgDepth1;
+ Image maImgDepth2;
+ Image maImgDepth3;
+ Image maImgDepth4;
+ Image maImgDepthInfinity;
+
+ Image maImgDepth0h;
+ Image maImgDepth1h;
+ Image maImgDepth2h;
+ Image maImgDepth3h;
+ Image maImgDepth4h;
+ Image maImgDepthInfinityh;
+
+ FieldUnit meUnit;
+ double mfDepth;
+
+ const rtl::OUString msExtrusionDepth;
+ const rtl::OUString msMetricUnit;
+
+ DECL_LINK( SelectHdl, void * );
+
+ void implFillStrings( FieldUnit eUnit );
+ void implSetDepth( double fDepth );
+
+public:
+ ExtrusionDepthWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow );
+
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+};
+
+//========================================================================
+
+class ExtrusionDepthController : public svt::PopupWindowController
+{
+public:
+ ExtrusionDepthController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
+
+ virtual ::Window* createPopupWindow( ::Window* pParent );
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
+
+ using svt::PopupWindowController::createPopupWindow;
+};
+
+//========================================================================
+
+class ExtrusionLightingWindow : public svtools::ToolbarMenu
+{
+private:
+ svt::ToolboxController& mrController;
+ ValueSet* mpLightingSet;
+
+ Image maImgLightingOff[9];
+ Image maImgLightingOn[9];
+ Image maImgLightingPreview[9];
+
+ Image maImgLightingOffh[9];
+ Image maImgLightingOnh[9];
+ Image maImgLightingPreviewh[9];
+
+ Image maImgBright;
+ Image maImgNormal;
+ Image maImgDim;
+ Image maImgBrighth;
+ Image maImgNormalh;
+ Image maImgDimh;
+
+ int mnLevel;
+ bool mbLevelEnabled;
+ int mnDirection;
+ bool mbDirectionEnabled;
+
+ const rtl::OUString msExtrusionLightingDirection;
+ const rtl::OUString msExtrusionLightingIntensity;
+
+ void implSetIntensity( int nLevel, bool bEnabled );
+ void implSetDirection( int nDirection, bool bEnabled );
+
+ DECL_LINK( SelectHdl, void * );
+public:
+ ExtrusionLightingWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow );
+
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+};
+
+//========================================================================
+
+class ExtrusionLightingControl : public svt::PopupWindowController
+{
+public:
+ ExtrusionLightingControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
+
+ virtual ::Window* createPopupWindow( ::Window* pParent );
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
+
+ using svt::PopupWindowController::createPopupWindow;
+};
+
+//========================================================================
+
+class ExtrusionSurfaceWindow : public svtools::ToolbarMenu
+{
+private:
+ svt::ToolboxController& mrController;
+
+ Image maImgSurface1;
+ Image maImgSurface2;
+ Image maImgSurface3;
+ Image maImgSurface4;
+ Image maImgSurface1h;
+ Image maImgSurface2h;
+ Image maImgSurface3h;
+ Image maImgSurface4h;
+
+ const rtl::OUString msExtrusionSurface;
+
+ DECL_LINK( SelectHdl, void * );
+
+ void implSetSurface( int nSurface, bool bEnabled );
+
+public:
+ ExtrusionSurfaceWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow );
+
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
+};
+
+//========================================================================
+
+class ExtrusionSurfaceControl : public svt::PopupWindowController
+{
+public:
+ ExtrusionSurfaceControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
+
+ virtual ::Window* createPopupWindow( ::Window* pParent );
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
+
+ using svt::PopupWindowController::createPopupWindow;
+};
+
+//========================================================================
+
+}
+#endif
+
diff --git a/svx/source/tbxctrls/extrusioncontrols.src b/svx/source/tbxctrls/extrusioncontrols.src
index 0cf4cafdc58c..084606439cc3 100644
--- a/svx/source/tbxctrls/extrusioncontrols.src
+++ b/svx/source/tbxctrls/extrusioncontrols.src
@@ -30,9 +30,9 @@
#define MASKCOLOR MaskColor = Color { Red=0xFFFF; Green=0x0000; Blue=0xFFFF; };
-FloatingWindow RID_SVXFLOAT_EXTRUSION_DIRECTION
+DockingWindow RID_SVXFLOAT_EXTRUSION_DIRECTION
{
- Border = TRUE ;
+ Border = FALSE ;
Hide = TRUE ;
SVLook = TRUE ;
Sizeable = FALSE ;
@@ -200,9 +200,9 @@ FloatingWindow RID_SVXFLOAT_EXTRUSION_DIRECTION
};
};
-FloatingWindow RID_SVXFLOAT_EXTRUSION_DEPTH
+DockingWindow RID_SVXFLOAT_EXTRUSION_DEPTH
{
- Border = TRUE ;
+ Border = FALSE ;
Hide = TRUE ;
SVLook = TRUE ;
Sizeable = FALSE ;
@@ -289,9 +289,10 @@ FloatingWindow RID_SVXFLOAT_EXTRUSION_DEPTH
};
};
-FloatingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING
+
+DockingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING
{
- Border = TRUE ;
+ Border = FALSE ;
Hide = TRUE ;
SVLook = TRUE ;
Sizeable = FALSE ;
@@ -605,9 +606,9 @@ FloatingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING
};
};
-FloatingWindow RID_SVXFLOAT_EXTRUSION_SURFACE
+DockingWindow RID_SVXFLOAT_EXTRUSION_SURFACE
{
- Border = TRUE ;
+ Border = FALSE ;
Hide = TRUE ;
SVLook = TRUE ;
Sizeable = FALSE ;
@@ -703,7 +704,7 @@ ModalDialog RID_SVX_MDLG_EXTRUSION_DEPTH
MetricField MTR_DEPTH
{
//HelpId = HID_SD_CTL_FAVORITES ;
- Border = TRUE ;
+ Border = FALSE ;
Pos = MAP_APPFONT ( 3 , 14 ) ;
Size = MAP_APPFONT ( WIDTH - 50 - 12, 12 ) ;
TabStop = TRUE ;
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 1b4f89ca1e8c..1216a7863b79 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -27,40 +27,53 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
+
#include <com/sun/star/text/WritingMode.hpp>
-#include <sfx2/app.hxx>
+
+#include <vcl/toolbox.hxx>
+
#include <svl/itempool.hxx>
-#include <svx/fmmodel.hxx>
+
+#include <svtools/toolbarmenu.hxx>
+#include <svtools/popupwindowcontroller.hxx>
+#include <svtools/popupmenucontrollerbase.hxx>
+
+#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
-#include <dlgutil.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/frmdiritem.hxx>
+
+#include <svx/fmmodel.hxx>
#include <svx/svxids.hrc>
#include <svx/dialmgr.hxx>
#include <svx/dialogs.hrc>
-#include "gallery.hxx"
#include <svx/svdpage.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdview.hxx>
#include <svx/svdoutl.hxx>
-#include <editeng/eeitem.hxx>
-#include <editeng/frmdiritem.hxx>
-#include "toolbarmenu.hxx"
+
+#include "gallery.hxx"
+#include <dlgutil.hxx>
#include "fontworkgallery.hxx"
#include "fontworkgallery.hrc"
#include <algorithm>
-#ifndef _TOOLBOX_HXX //autogen
-#include <vcl/toolbox.hxx>
-#endif
-#ifndef _SVX_HELPID_HRC
#include "helpid.hrc"
-#endif
-using namespace svx;
+
+using ::rtl::OUString;
+using ::svtools::ToolbarMenu;
+
+using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::frame;
+
+namespace svx
+{
const int nColCount = 4;
const int nLineCount = 4;
@@ -291,7 +304,7 @@ IMPL_LINK( FontWorkGalleryDialog, DoubleClickFavoriteHdl, void*, EMPTYARG )
return( 0L );
}
-// -----------------------------------------------------------------------
+//------------------------------------------------------------------------
SFX_IMPL_TOOLBOX_CONTROL( FontWorkShapeTypeControl, SfxStringItem );
FontWorkShapeTypeControl::FontWorkShapeTypeControl( USHORT nSlotId, USHORT nId, ToolBox &rTbx )
@@ -325,143 +338,104 @@ SfxPopupWindow* FontWorkShapeTypeControl::CreatePopupWindow()
// -----------------------------------------------------------------------
-void FontWorkShapeTypeControl::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
-{
- SfxToolBoxControl::StateChanged( nSID, eState, pState );
-}
-
-// -----------------------------------------------------------------------
-
void FontWorkShapeTypeControl::Select( BOOL )
{
}
-// ####################################################################
+// ========================================================================
+// FontWorkAlignmentWindow
+// ========================================================================
-SFX_IMPL_TOOLBOX_CONTROL( FontWorkAlignmentControl, SfxBoolItem );
-
-FontWorkAlignmentWindow::FontWorkAlignmentWindow(
- USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ) :
-
- SfxPopupWindow( nId,
- rFrame,
- SVX_RES( RID_SVXFLOAT_FONTWORK_ALIGNMENT )),
- maImgAlgin1( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16 ) ),
- maImgAlgin2( SVX_RES( IMG_FONTWORK_ALIGN_CENTER_16 ) ),
- maImgAlgin3( SVX_RES( IMG_FONTWORK_ALIGN_RIGHT_16 ) ),
- maImgAlgin4( SVX_RES( IMG_FONTWORK_ALIGN_WORD_16 ) ),
- maImgAlgin5( SVX_RES( IMG_FONTWORK_ALIGN_STRETCH_16 ) ),
- maImgAlgin1h( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16_H ) ),
- maImgAlgin2h( SVX_RES( IMG_FONTWORK_ALIGN_CENTER_16_H ) ),
- maImgAlgin3h( SVX_RES( IMG_FONTWORK_ALIGN_RIGHT_16_H ) ),
- maImgAlgin4h( SVX_RES( IMG_FONTWORK_ALIGN_WORD_16_H ) ),
- maImgAlgin5h( SVX_RES( IMG_FONTWORK_ALIGN_STRETCH_16_H ) ),
- mxFrame( rFrame ),
- mbPopupMode( true )
-{
- SetHelpId( HID_WIN_FONTWORK_ALIGN );
- implInit();
-}
-
-FontWorkAlignmentWindow::FontWorkAlignmentWindow(
- USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
- Window* /*pParentWindow*/ ) :
-
- SfxPopupWindow( nId,
- rFrame,
- SVX_RES( RID_SVXFLOAT_FONTWORK_ALIGNMENT )),
- maImgAlgin1( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16 ) ),
- maImgAlgin2( SVX_RES( IMG_FONTWORK_ALIGN_CENTER_16 ) ),
- maImgAlgin3( SVX_RES( IMG_FONTWORK_ALIGN_RIGHT_16 ) ),
- maImgAlgin4( SVX_RES( IMG_FONTWORK_ALIGN_WORD_16 ) ),
- maImgAlgin5( SVX_RES( IMG_FONTWORK_ALIGN_STRETCH_16 ) ),
- maImgAlgin1h( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16_H ) ),
- maImgAlgin2h( SVX_RES( IMG_FONTWORK_ALIGN_CENTER_16_H ) ),
- maImgAlgin3h( SVX_RES( IMG_FONTWORK_ALIGN_RIGHT_16_H ) ),
- maImgAlgin4h( SVX_RES( IMG_FONTWORK_ALIGN_WORD_16_H ) ),
- maImgAlgin5h( SVX_RES( IMG_FONTWORK_ALIGN_STRETCH_16_H ) ),
- mxFrame( rFrame ),
- mbPopupMode( true )
-{
- SetHelpId( HID_WIN_FONTWORK_ALIGN );
- implInit();
-}
-
-void FontWorkAlignmentWindow::implInit()
+class FontWorkAlignmentWindow : public ToolbarMenu
+{
+public:
+ FontWorkAlignmentWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, Window* pParentWindow );
+
+ virtual void SAL_CALL statusChanged( const frame::FeatureStateEvent& Event ) throw ( RuntimeException );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+private:
+ svt::ToolboxController& mrController;
+
+ Image maImgAlgin1;
+ Image maImgAlgin2;
+ Image maImgAlgin3;
+ Image maImgAlgin4;
+ Image maImgAlgin5;
+ Image maImgAlgin1h;
+ Image maImgAlgin2h;
+ Image maImgAlgin3h;
+ Image maImgAlgin4h;
+ Image maImgAlgin5h;
+
+ const rtl::OUString msFontworkAlignment;
+
+ DECL_LINK( SelectHdl, void * );
+
+ void implSetAlignment( int nAlignmentMode, bool bEnabled );
+};
+
+FontWorkAlignmentWindow::FontWorkAlignmentWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, Window* pParentWindow )
+: ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_FONTWORK_ALIGNMENT ))
+, mrController( rController )
+, maImgAlgin1( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16 ) )
+, maImgAlgin2( SVX_RES( IMG_FONTWORK_ALIGN_CENTER_16 ) )
+, maImgAlgin3( SVX_RES( IMG_FONTWORK_ALIGN_RIGHT_16 ) )
+, maImgAlgin4( SVX_RES( IMG_FONTWORK_ALIGN_WORD_16 ) )
+, maImgAlgin5( SVX_RES( IMG_FONTWORK_ALIGN_STRETCH_16 ) )
+, maImgAlgin1h( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16_H ) )
+, maImgAlgin2h( SVX_RES( IMG_FONTWORK_ALIGN_CENTER_16_H ) )
+, maImgAlgin3h( SVX_RES( IMG_FONTWORK_ALIGN_RIGHT_16_H ) )
+, maImgAlgin4h( SVX_RES( IMG_FONTWORK_ALIGN_WORD_16_H ) )
+, maImgAlgin5h( SVX_RES( IMG_FONTWORK_ALIGN_STRETCH_16_H ) )
+, msFontworkAlignment( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkAlignment" ) )
{
- SetHelpId( HID_POPUP_FONTWORK_ALIGN );
-
bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
- mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN );
- mpMenu->SetHelpId( HID_POPUP_FONTWORK_ALIGN );
- mpMenu->SetSelectHdl( LINK( this, FontWorkAlignmentWindow, SelectHdl ) );
-
- mpMenu->appendEntry( 0, String( SVX_RES( STR_ALIGN_LEFT ) ), bHighContrast ? maImgAlgin1h : maImgAlgin1 );
- mpMenu->appendEntry( 1, String( SVX_RES( STR_ALIGN_CENTER ) ), bHighContrast ? maImgAlgin2h : maImgAlgin2 );
- mpMenu->appendEntry( 2, String( SVX_RES( STR_ALIGN_RIGHT ) ), bHighContrast ? maImgAlgin3h : maImgAlgin3 );
- mpMenu->appendEntry( 3, String( SVX_RES( STR_ALIGN_WORD ) ), bHighContrast ? maImgAlgin4h : maImgAlgin4 );
- mpMenu->appendEntry( 4, String( SVX_RES( STR_ALIGN_STRETCH ) ), bHighContrast ? maImgAlgin5h : maImgAlgin5 );
+ SetHelpId( HID_POPUP_FONTWORK_ALIGN );
+ SetSelectHdl( LINK( this, FontWorkAlignmentWindow, SelectHdl ) );
- SetOutputSizePixel( mpMenu->getMenuSize() );
- mpMenu->SetOutputSizePixel( GetOutputSizePixel() );
+ appendEntry( 0, String( SVX_RES( STR_ALIGN_LEFT ) ), bHighContrast ? maImgAlgin1h : maImgAlgin1 );
+ appendEntry( 1, String( SVX_RES( STR_ALIGN_CENTER ) ), bHighContrast ? maImgAlgin2h : maImgAlgin2 );
+ appendEntry( 2, String( SVX_RES( STR_ALIGN_RIGHT ) ), bHighContrast ? maImgAlgin3h : maImgAlgin3 );
+ appendEntry( 3, String( SVX_RES( STR_ALIGN_WORD ) ), bHighContrast ? maImgAlgin4h : maImgAlgin4 );
+ appendEntry( 4, String( SVX_RES( STR_ALIGN_STRETCH ) ), bHighContrast ? maImgAlgin5h : maImgAlgin5 );
- mpMenu->Show();
+ SetOutputSizePixel( getMenuSize() );
FreeResource();
- AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkAlignment" )));
-}
-
-SfxPopupWindow* FontWorkAlignmentWindow::Clone() const
-{
- return new FontWorkAlignmentWindow( GetId(), mxFrame );
-}
-
-// -----------------------------------------------------------------------
-
-FontWorkAlignmentWindow::~FontWorkAlignmentWindow()
-{
- delete mpMenu;
+ AddStatusListener( msFontworkAlignment );
}
// -----------------------------------------------------------------------
void FontWorkAlignmentWindow::implSetAlignment( int nSurface, bool bEnabled )
{
- if( mpMenu )
+ int i;
+ for( i = 0; i < 5; i++ )
{
- int i;
- for( i = 0; i < 5; i++ )
- {
- mpMenu->checkEntry( i, (i == nSurface) && bEnabled );
- mpMenu->enableEntry( i, bEnabled );
- }
+ checkEntry( i, (i == nSurface) && bEnabled );
+ enableEntry( i, bEnabled );
}
}
// -----------------------------------------------------------------------
-void FontWorkAlignmentWindow::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+void SAL_CALL FontWorkAlignmentWindow::statusChanged( const frame::FeatureStateEvent& Event ) throw ( RuntimeException )
{
- switch( nSID )
+ if( Event.FeatureURL.Main.equals( msFontworkAlignment ) )
{
- case SID_FONTWORK_ALIGNMENT:
+ if( !Event.IsEnabled )
{
- if( eState == SFX_ITEM_DISABLED )
- {
- implSetAlignment( 0, false );
- }
- else
- {
- const SfxInt32Item* pStateItem = PTR_CAST( SfxInt32Item, pState );
- if( pStateItem )
- implSetAlignment( pStateItem->GetValue(), true );
- }
- break;
+ implSetAlignment( 0, false );
+ }
+ else
+ {
+ sal_Int32 nValue = 0;
+ if( Event.State >>= nValue )
+ implSetAlignment( nValue, true );
}
}
}
@@ -470,17 +444,17 @@ void FontWorkAlignmentWindow::StateChanged( USHORT nSID, SfxItemState eState, co
void FontWorkAlignmentWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
- SfxPopupWindow::DataChanged( rDCEvt );
+ ToolbarMenu::DataChanged( rDCEvt );
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
- mpMenu->appendEntry( 0, String( SVX_RES( STR_ALIGN_LEFT ) ), bHighContrast ? maImgAlgin1h : maImgAlgin1 );
- mpMenu->appendEntry( 1, String( SVX_RES( STR_ALIGN_CENTER ) ), bHighContrast ? maImgAlgin2h : maImgAlgin2 );
- mpMenu->appendEntry( 2, String( SVX_RES( STR_ALIGN_RIGHT ) ), bHighContrast ? maImgAlgin3h : maImgAlgin3 );
- mpMenu->appendEntry( 3, String( SVX_RES( STR_ALIGN_WORD ) ), bHighContrast ? maImgAlgin4h : maImgAlgin4 );
- mpMenu->appendEntry( 4, String( SVX_RES( STR_ALIGN_STRETCH ) ), bHighContrast ? maImgAlgin5h : maImgAlgin5 );
+ appendEntry( 0, String( SVX_RES( STR_ALIGN_LEFT ) ), bHighContrast ? maImgAlgin1h : maImgAlgin1 );
+ appendEntry( 1, String( SVX_RES( STR_ALIGN_CENTER ) ), bHighContrast ? maImgAlgin2h : maImgAlgin2 );
+ appendEntry( 2, String( SVX_RES( STR_ALIGN_RIGHT ) ), bHighContrast ? maImgAlgin3h : maImgAlgin3 );
+ appendEntry( 3, String( SVX_RES( STR_ALIGN_WORD ) ), bHighContrast ? maImgAlgin4h : maImgAlgin4 );
+ appendEntry( 4, String( SVX_RES( STR_ALIGN_STRETCH ) ), bHighContrast ? maImgAlgin5h : maImgAlgin5 );
}
}
@@ -491,25 +465,14 @@ IMPL_LINK( FontWorkAlignmentWindow, SelectHdl, void *, EMPTYARG )
if ( IsInPopupMode() )
EndPopupMode();
-// SfxDispatcher* pDisp = GetBindings().GetDispatcher();
-
- sal_Int32 nAlignment = mpMenu->getSelectedEntryId();
+ sal_Int32 nAlignment = getSelectedEntryId();
if( nAlignment >= 0 )
{
- SfxInt32Item aItem( SID_FONTWORK_ALIGNMENT, nAlignment );
- rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkAlignment" ));
-
- Any a;
- INetURLObject aObj( aCommand );
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = aObj.GetURLPath();
- aItem.QueryValue( a );
- aArgs[0].Value = a;
+ aArgs[0].Name = msFontworkAlignment.copy(5);
+ aArgs[0].Value <<= (sal_Int32)nAlignment;
- SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >(
- mxFrame->getController(), UNO_QUERY ),
- aCommand,
- aArgs );
+ mrController.dispatchCommand( msFontworkAlignment, aArgs );
implSetAlignment( nAlignment, true );
}
@@ -517,250 +480,191 @@ IMPL_LINK( FontWorkAlignmentWindow, SelectHdl, void *, EMPTYARG )
return 0;
}
-// -----------------------------------------------------------------------
+// ========================================================================
+// FontWorkAlignmentControl
+// ========================================================================
-void FontWorkAlignmentWindow::StartSelection()
+class FontWorkAlignmentControl : public svt::PopupWindowController
{
-}
+public:
+ FontWorkAlignmentControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
-// -----------------------------------------------------------------------
+ virtual ::Window* createPopupWindow( ::Window* pParent );
-BOOL FontWorkAlignmentWindow::Close()
-{
- return SfxPopupWindow::Close();
-}
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
-// -----------------------------------------------------------------------
+ using svt::PopupWindowController::createPopupWindow;
+};
-void FontWorkAlignmentWindow::PopupModeEnd()
-{
- if ( IsVisible() )
- {
- mbPopupMode = FALSE;
- }
- SfxPopupWindow::PopupModeEnd();
-}
// -----------------------------------------------------------------------
-void FontWorkAlignmentWindow::GetFocus (void)
+FontWorkAlignmentControl::FontWorkAlignmentControl( const Reference< lang::XMultiServiceFactory >& rServiceManager )
+: svt::PopupWindowController( rServiceManager, Reference< frame::XFrame >(), OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkAlignment" ) ) )
{
- SfxPopupWindow::GetFocus();
- // Grab the focus to the line ends value set so that it can be controlled
- // with the keyboard.
- if( mpMenu )
- mpMenu->GrabFocus();
}
-// ========================================================================
+// -----------------------------------------------------------------------
-FontWorkAlignmentControl::FontWorkAlignmentControl(
- USHORT nSlotId, USHORT nId, ToolBox &rTbx )
-: SfxToolBoxControl( nSlotId, nId, rTbx )
+::Window* FontWorkAlignmentControl::createPopupWindow( ::Window* pParent )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
+ return new FontWorkAlignmentWindow( *this, m_xFrame, pParent );
}
// -----------------------------------------------------------------------
+// XServiceInfo
+// -----------------------------------------------------------------------
-FontWorkAlignmentControl::~FontWorkAlignmentControl()
+OUString SAL_CALL FontWorkAlignmentControl_getImplementationName()
{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.FontWorkAlignmentController" ));
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-SfxPopupWindowType FontWorkAlignmentControl::GetPopupWindowType() const
+Sequence< OUString > SAL_CALL FontWorkAlignmentControl_getSupportedServiceNames() throw( RuntimeException )
{
- return SFX_POPUPWINDOW_ONCLICK;
+ Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ));
+ return aSNS;
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-SfxPopupWindow* FontWorkAlignmentControl::CreatePopupWindow()
+Reference< XInterface > SAL_CALL SAL_CALL FontWorkAlignmentControl_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException )
{
- FontWorkAlignmentWindow* pWin = new FontWorkAlignmentWindow( GetId(), m_xFrame, &GetToolBox() );
- pWin->StartPopupMode( &GetToolBox(), TRUE );
- pWin->StartSelection();
- SetPopupWindow( pWin );
- return pWin;
+ return *new FontWorkAlignmentControl( rSMgr );
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-void FontWorkAlignmentControl::StateChanged( USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* /*pState*/ )
+OUString SAL_CALL FontWorkAlignmentControl::getImplementationName( ) throw (RuntimeException)
{
- USHORT nId = GetId();
- ToolBox& rTbx = GetToolBox();
-
- rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+ return FontWorkAlignmentControl_getImplementationName();
}
-// ####################################################################
-
-SFX_IMPL_TOOLBOX_CONTROL( FontWorkCharacterSpacingControl, SfxBoolItem );
+// --------------------------------------------------------------------
-FontWorkCharacterSpacingWindow::FontWorkCharacterSpacingWindow(
- USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ) :
-
- SfxPopupWindow( nId,
- rFrame,
- SVX_RES( RID_SVXFLOAT_FONTWORK_CHARSPACING )),
- mxFrame( rFrame ),
- mbPopupMode( true )
+Sequence< OUString > SAL_CALL FontWorkAlignmentControl::getSupportedServiceNames( ) throw (RuntimeException)
{
- SetHelpId( HID_WIN_FONTWORK_CHARSPACE );
- implInit();
+ return FontWorkAlignmentControl_getSupportedServiceNames();
}
-FontWorkCharacterSpacingWindow::FontWorkCharacterSpacingWindow(
- USHORT nId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
- Window* pParentWindow ) :
- SfxPopupWindow( nId,
- rFrame,
- pParentWindow,
- SVX_RES( RID_SVXFLOAT_FONTWORK_CHARSPACING )),
- mxFrame( rFrame ),
- mbPopupMode( true )
-{
- SetHelpId( HID_WIN_FONTWORK_CHARSPACE );
- implInit();
-}
+// ####################################################################
-void FontWorkCharacterSpacingWindow::implInit()
+class FontWorkCharacterSpacingWindow : public ToolbarMenu
{
- SetHelpId( HID_POPUP_FONTWORK_CHARSPACE );
+public:
+ FontWorkCharacterSpacingWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, Window* pParentWindow );
-// bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
+private:
+ svt::ToolboxController& mrController;
- mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN );
- mpMenu->SetHelpId( HID_POPUP_FONTWORK_CHARSPACE );
- mpMenu->SetSelectHdl( LINK( this, FontWorkCharacterSpacingWindow, SelectHdl ) );
+ const rtl::OUString msFontworkCharacterSpacing;
+ const rtl::OUString msFontworkKernCharacterPairs;
- mpMenu->appendEntry( 0, String( SVX_RES( STR_CHARS_SPACING_VERY_TIGHT ) ), MIB_RADIOCHECK );
- mpMenu->appendEntry( 1, String( SVX_RES( STR_CHARS_SPACING_TIGHT ) ), MIB_RADIOCHECK );
- mpMenu->appendEntry( 2, String( SVX_RES( STR_CHARS_SPACING_NORMAL ) ), MIB_RADIOCHECK );
- mpMenu->appendEntry( 3, String( SVX_RES( STR_CHARS_SPACING_LOOSE ) ), MIB_RADIOCHECK );
- mpMenu->appendEntry( 4, String( SVX_RES( STR_CHARS_SPACING_VERY_LOOSE ) ), MIB_RADIOCHECK );
- mpMenu->appendEntry( 5, String( SVX_RES( STR_CHARS_SPACING_CUSTOM ) ), MIB_RADIOCHECK );
- mpMenu->appendSeparator();
- mpMenu->appendEntry( 6, String( SVX_RES( STR_CHARS_SPACING_KERN_PAIRS ) ), MIB_CHECKABLE );
+ DECL_LINK( SelectHdl, void * );
- SetOutputSizePixel( mpMenu->getMenuSize() );
- mpMenu->SetOutputSizePixel( GetOutputSizePixel() );
+ void implSetCharacterSpacing( sal_Int32 nCharacterSpacing, bool bEnabled );
+ void implSetKernCharacterPairs( sal_Bool bKernOnOff, bool bEnabled );
- mpMenu->Show();
-
- FreeResource();
+};
- AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkCharacterSpacing" )));
-}
+// -----------------------------------------------------------------------
-SfxPopupWindow* FontWorkCharacterSpacingWindow::Clone() const
+FontWorkCharacterSpacingWindow::FontWorkCharacterSpacingWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, Window* pParentWindow )
+: ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_FONTWORK_CHARSPACING ))
+, mrController( rController )
+, msFontworkCharacterSpacing( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkCharacterSpacing" ) )
+, msFontworkKernCharacterPairs( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkKernCharacterPairs" ) )
{
- return new FontWorkCharacterSpacingWindow( GetId(), mxFrame );
-}
+ SetHelpId( HID_POPUP_FONTWORK_CHARSPACE );
+ SetSelectHdl( LINK( this, FontWorkCharacterSpacingWindow, SelectHdl ) );
-// -----------------------------------------------------------------------
+ appendEntry( 0, String( SVX_RES( STR_CHARS_SPACING_VERY_TIGHT ) ), MIB_RADIOCHECK );
+ appendEntry( 1, String( SVX_RES( STR_CHARS_SPACING_TIGHT ) ), MIB_RADIOCHECK );
+ appendEntry( 2, String( SVX_RES( STR_CHARS_SPACING_NORMAL ) ), MIB_RADIOCHECK );
+ appendEntry( 3, String( SVX_RES( STR_CHARS_SPACING_LOOSE ) ), MIB_RADIOCHECK );
+ appendEntry( 4, String( SVX_RES( STR_CHARS_SPACING_VERY_LOOSE ) ), MIB_RADIOCHECK );
+ appendEntry( 5, String( SVX_RES( STR_CHARS_SPACING_CUSTOM ) ), MIB_RADIOCHECK );
+ appendSeparator();
+ appendEntry( 6, String( SVX_RES( STR_CHARS_SPACING_KERN_PAIRS ) ), MIB_CHECKABLE );
-FontWorkCharacterSpacingWindow::~FontWorkCharacterSpacingWindow()
-{
- delete mpMenu;
+ SetOutputSizePixel( getMenuSize() );
+
+ FreeResource();
+
+ AddStatusListener( msFontworkCharacterSpacing );
+ AddStatusListener( msFontworkKernCharacterPairs );
}
// -----------------------------------------------------------------------
void FontWorkCharacterSpacingWindow::implSetCharacterSpacing( sal_Int32 nCharacterSpacing, bool bEnabled )
{
- if( mpMenu )
+ sal_Int32 i;
+ for ( i = 0; i < 6; i++ )
{
- sal_Int32 i;
- for ( i = 0; i < 6; i++ )
- {
- mpMenu->checkEntry( i, sal_False );
- mpMenu->enableEntry( i, bEnabled );
- }
- if ( nCharacterSpacing != -1 )
+ checkEntry( i, sal_False );
+ enableEntry( i, bEnabled );
+ }
+ if ( nCharacterSpacing != -1 )
+ {
+ sal_Int32 nEntry;
+ switch( nCharacterSpacing )
{
- sal_Int32 nEntry;
- switch( nCharacterSpacing )
- {
- case 80 : nEntry = 0; break;
- case 90 : nEntry = 1; break;
- case 100 : nEntry = 2; break;
- case 120 : nEntry = 3; break;
- case 150 : nEntry = 4; break;
- default : nEntry = 5; break;
- }
- mpMenu->checkEntry( nEntry, bEnabled );
+ case 80 : nEntry = 0; break;
+ case 90 : nEntry = 1; break;
+ case 100 : nEntry = 2; break;
+ case 120 : nEntry = 3; break;
+ case 150 : nEntry = 4; break;
+ default : nEntry = 5; break;
}
+ checkEntry( nEntry, bEnabled );
}
}
+// -----------------------------------------------------------------------
+
void FontWorkCharacterSpacingWindow::implSetKernCharacterPairs( sal_Bool, bool bEnabled )
{
- if( mpMenu )
- {
- mpMenu->enableEntry( 6, bEnabled );
- mpMenu->checkEntry( 6, bEnabled );
- }
+ enableEntry( 6, bEnabled );
+ checkEntry( 6, bEnabled );
}
// -----------------------------------------------------------------------
-void FontWorkCharacterSpacingWindow::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+void SAL_CALL FontWorkCharacterSpacingWindow::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException )
{
- switch( nSID )
+ if( Event.FeatureURL.Main.equals( msFontworkCharacterSpacing ) )
{
- case SID_FONTWORK_CHARACTER_SPACING:
+ if( !Event.IsEnabled )
{
- if( eState == SFX_ITEM_DISABLED )
- implSetCharacterSpacing( 0, false );
- else
- {
- const SfxInt32Item* pStateItem = PTR_CAST( SfxInt32Item, pState );
- if( pStateItem )
- implSetCharacterSpacing( pStateItem->GetValue(), true );
- }
+ implSetCharacterSpacing( 0, false );
}
- break;
-
- case SID_FONTWORK_KERN_CHARACTER_PAIRS :
+ else
{
- if( eState == SFX_ITEM_DISABLED )
- implSetKernCharacterPairs( 0, false );
- else
- {
- const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pState );
- if( pStateItem )
- implSetKernCharacterPairs( pStateItem->GetValue(), true );
- }
+ sal_Int32 nValue = 0;
+ if( Event.State >>= nValue )
+ implSetCharacterSpacing( nValue, true );
}
- break;
}
-}
-
-// -----------------------------------------------------------------------
-
-void FontWorkCharacterSpacingWindow::DataChanged( const DataChangedEvent& rDCEvt )
-{
- SfxPopupWindow::DataChanged( rDCEvt );
-
- if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
+ else if( Event.FeatureURL.Main.equals( msFontworkKernCharacterPairs ) )
{
-// bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
-
- mpMenu->appendEntry( 0, String( SVX_RES( STR_CHARS_SPACING_VERY_TIGHT ) ), MIB_CHECKABLE );
- mpMenu->appendEntry( 1, String( SVX_RES( STR_CHARS_SPACING_TIGHT ) ), MIB_CHECKABLE );
- mpMenu->appendEntry( 2, String( SVX_RES( STR_CHARS_SPACING_NORMAL ) ), MIB_CHECKABLE );
- mpMenu->appendEntry( 3, String( SVX_RES( STR_CHARS_SPACING_LOOSE ) ), MIB_CHECKABLE );
- mpMenu->appendEntry( 4, String( SVX_RES( STR_CHARS_SPACING_VERY_LOOSE ) ), MIB_CHECKABLE );
- mpMenu->appendEntry( 5, String( SVX_RES( STR_CHARS_SPACING_CUSTOM ) ), MIB_CHECKABLE );
- mpMenu->appendSeparator();
- mpMenu->appendEntry( 6, String( SVX_RES( STR_CHARS_SPACING_KERN_PAIRS ) ), MIB_CHECKABLE );
+ if( !Event.IsEnabled )
+ {
+ implSetKernCharacterPairs( 0, false );
+ }
+ else
+ {
+ sal_Bool bValue = sal_False;
+ if( Event.State >>= bValue )
+ implSetKernCharacterPairs( bValue, true );
+ }
}
}
@@ -771,7 +675,7 @@ IMPL_LINK( FontWorkCharacterSpacingWindow, SelectHdl, void *, EMPTYARG )
if ( IsInPopupMode() )
EndPopupMode();
- sal_Int32 nSelection = mpMenu->getSelectedEntryId();
+ sal_Int32 nSelection = getSelectedEntryId();
sal_Int32 nCharacterSpacing;
switch( nSelection )
{
@@ -784,53 +688,31 @@ IMPL_LINK( FontWorkCharacterSpacingWindow, SelectHdl, void *, EMPTYARG )
}
if ( nSelection == 5 ) // custom spacing
{
- SfxInt32Item aItem( SID_FONTWORK_CHARACTER_SPACING, nCharacterSpacing );
- rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkCharacterSpacingDialog" ));
-
- Any a;
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontworkCharacterSpacing" ));
- aItem.QueryValue( a );
- aArgs[0].Value = a;
- SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >(
- mxFrame->getController(), UNO_QUERY ),
- aCommand,
- aArgs );
+ aArgs[0].Name = msFontworkCharacterSpacing.copy(5);
+ aArgs[0].Value <<= (sal_Int32)nCharacterSpacing;
+
+ mrController.dispatchCommand( OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkCharacterSpacingDialog" )), aArgs );
}
else if ( nSelection == 6 ) // KernCharacterPairs
{
- sal_Bool bOnOff = sal_True;
- SfxBoolItem aItem( SID_FONTWORK_KERN_CHARACTER_PAIRS, bOnOff );
rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkKernCharacterPairs" ));
- Any a;
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontworkKernCharacterPairs" ));
- aItem.QueryValue( a );
- aArgs[0].Value = a;
- SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >(
- mxFrame->getController(), UNO_QUERY ),
- aCommand,
- aArgs );
-
- implSetKernCharacterPairs( bOnOff, true );
+ aArgs[0].Name = msFontworkKernCharacterPairs.copy(5);
+ aArgs[0].Value <<= (sal_Bool) sal_True;
+
+ mrController.dispatchCommand( msFontworkKernCharacterPairs, aArgs );
+
+ implSetKernCharacterPairs( sal_True, true );
}
else if( nSelection >= 0 )
{
- SfxInt32Item aItem( SID_FONTWORK_CHARACTER_SPACING, nCharacterSpacing );
- rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkCharacterSpacing" ));
-
- Any a;
- INetURLObject aObj( aCommand );
Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = aObj.GetURLPath();
- aItem.QueryValue( a );
- aArgs[0].Value = a;
+ aArgs[0].Name = msFontworkCharacterSpacing.copy(5);
+ aArgs[0].Value <<=( sal_Int32)nCharacterSpacing;
- SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >(
- mxFrame->getController(), UNO_QUERY ),
- aCommand,
- aArgs );
+ mrController.dispatchCommand( msFontworkCharacterSpacing, aArgs );
implSetCharacterSpacing( nCharacterSpacing, true );
}
@@ -838,86 +720,79 @@ IMPL_LINK( FontWorkCharacterSpacingWindow, SelectHdl, void *, EMPTYARG )
return 0;
}
-// -----------------------------------------------------------------------
+// ========================================================================
+// FontWorkCharacterSpacingControl
+// ========================================================================
-void FontWorkCharacterSpacingWindow::StartSelection()
+class FontWorkCharacterSpacingControl : public svt::PopupWindowController
{
-}
+public:
+ FontWorkCharacterSpacingControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
-// -----------------------------------------------------------------------
+ virtual ::Window* createPopupWindow( ::Window* pParent );
-BOOL FontWorkCharacterSpacingWindow::Close()
-{
- return SfxPopupWindow::Close();
-}
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
+
+ using svt::PopupWindowController::createPopupWindow;
+};
-// -----------------------------------------------------------------------
-void FontWorkCharacterSpacingWindow::PopupModeEnd()
+FontWorkCharacterSpacingControl::FontWorkCharacterSpacingControl( const Reference< lang::XMultiServiceFactory >& rServiceManager )
+: svt::PopupWindowController( rServiceManager, Reference< frame::XFrame >(), OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkCharacterSpacingFloater" ) ) )
{
- if ( IsVisible() )
- {
- mbPopupMode = FALSE;
- }
- SfxPopupWindow::PopupModeEnd();
}
// -----------------------------------------------------------------------
-void FontWorkCharacterSpacingWindow::GetFocus (void)
+::Window* FontWorkCharacterSpacingControl::createPopupWindow( ::Window* pParent )
{
- SfxPopupWindow::GetFocus();
- // Grab the focus to the line ends value set so that it can be controlled
- // with the keyboard.
- if( mpMenu )
- mpMenu->GrabFocus();
+ return new FontWorkCharacterSpacingWindow( *this, m_xFrame, pParent );
}
-// ========================================================================
+// -----------------------------------------------------------------------
+// XServiceInfo
+// -----------------------------------------------------------------------
-FontWorkCharacterSpacingControl::FontWorkCharacterSpacingControl(
- USHORT nSlotId, USHORT nId, ToolBox &rTbx )
-: SfxToolBoxControl( nSlotId, nId, rTbx )
+OUString SAL_CALL FontWorkCharacterSpacingControl_getImplementationName()
{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
+ return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.FontWorkCharacterSpacingController" ));
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-FontWorkCharacterSpacingControl::~FontWorkCharacterSpacingControl()
+Sequence< OUString > SAL_CALL FontWorkCharacterSpacingControl_getSupportedServiceNames() throw( RuntimeException )
{
+ Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ));
+ return aSNS;
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-SfxPopupWindowType FontWorkCharacterSpacingControl::GetPopupWindowType() const
+Reference< XInterface > SAL_CALL SAL_CALL FontWorkCharacterSpacingControl_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException )
{
- return SFX_POPUPWINDOW_ONCLICK;
+ return *new FontWorkCharacterSpacingControl( rSMgr );
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-SfxPopupWindow* FontWorkCharacterSpacingControl::CreatePopupWindow()
+OUString SAL_CALL FontWorkCharacterSpacingControl::getImplementationName( ) throw (RuntimeException)
{
- FontWorkCharacterSpacingWindow* pWin = new FontWorkCharacterSpacingWindow( GetId(), m_xFrame, &GetToolBox() );
- pWin->StartPopupMode( &GetToolBox(), TRUE );
- pWin->StartSelection();
- SetPopupWindow( pWin );
- return pWin;
+ return FontWorkCharacterSpacingControl_getImplementationName();
}
-// -----------------------------------------------------------------------
+// --------------------------------------------------------------------
-void FontWorkCharacterSpacingControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* )
+Sequence< OUString > SAL_CALL FontWorkCharacterSpacingControl::getSupportedServiceNames( ) throw (RuntimeException)
{
- USHORT nId = GetId();
- ToolBox& rTbx = GetToolBox();
-
- rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+ return FontWorkCharacterSpacingControl_getSupportedServiceNames();
}
-// -----------------------------------------------------------------------
+// ========================================================================
+// FontworkCharacterSpacingDialog
+// ========================================================================
FontworkCharacterSpacingDialog::FontworkCharacterSpacingDialog( Window* pParent, sal_Int32 nScale )
: ModalDialog( pParent, SVX_RES( RID_SVX_MDLG_FONTWORK_CHARSPACING ) ),
@@ -939,3 +814,5 @@ sal_Int32 FontworkCharacterSpacingDialog::getScale() const
{
return (sal_Int32)maMtrScale.GetValue();
}
+
+}
diff --git a/svx/source/tbxctrls/fontworkgallery.src b/svx/source/tbxctrls/fontworkgallery.src
index 88c294407860..e5f52158b4b6 100644
--- a/svx/source/tbxctrls/fontworkgallery.src
+++ b/svx/source/tbxctrls/fontworkgallery.src
@@ -55,7 +55,7 @@ ModalDialog RID_SVX_MDLG_FONTWORK_GALLERY
Control CTL_FAVORITES
{
HelpId = HID_CTL_FONTWORK_FAVORITES ;
- Border = TRUE ;
+ Border = FALSE ;
Pos = MAP_APPFONT ( 3 , 14 ) ;
Size = MAP_APPFONT ( WIDTH - 6,
HEIGHT - RSC_CD_PUSHBUTTON_HEIGHT -
@@ -92,9 +92,9 @@ ModalDialog RID_SVX_MDLG_FONTWORK_GALLERY
};
};
-FloatingWindow RID_SVXFLOAT_FONTWORK_ALIGNMENT
+DockingWindow RID_SVXFLOAT_FONTWORK_ALIGNMENT
{
- Border = TRUE ;
+ Border = FALSE ;
Hide = TRUE ;
SVLook = TRUE ;
Sizeable = FALSE ;
@@ -227,9 +227,9 @@ FloatingWindow RID_SVXFLOAT_FONTWORK_ALIGNMENT
};
};
-FloatingWindow RID_SVXFLOAT_FONTWORK_CHARSPACING
+DockingWindow RID_SVXFLOAT_FONTWORK_CHARSPACING
{
- Border = TRUE ;
+ Border = FALSE ;
Hide = TRUE ;
SVLook = TRUE ;
Sizeable = FALSE ;
@@ -306,7 +306,7 @@ ModalDialog RID_SVX_MDLG_FONTWORK_CHARSPACING
};
MetricField MF_VALUE
{
- Border = TRUE ;
+ Border = FALSE ;
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 32 , 12 ) ;
TabStop = TRUE ;
diff --git a/svx/source/tbxctrls/makefile.mk b/svx/source/tbxctrls/makefile.mk
index 47da008e87a3..73a178d97594 100644
--- a/svx/source/tbxctrls/makefile.mk
+++ b/svx/source/tbxctrls/makefile.mk
@@ -44,7 +44,6 @@ LIB1OBJFILES= \
$(SLO)$/fontworkgallery.obj\
$(SLO)$/extrusioncontrols.obj \
$(SLO)$/tbcontrl.obj \
- $(SLO)$/toolbarmenu.obj \
$(SLO)$/tbxcolorupdate.obj
LIB2TARGET= $(SLB)$/$(TARGET).lib
@@ -62,7 +61,8 @@ LIB2OBJFILES= \
$(SLO)$/verttexttbxctrl.obj \
$(SLO)$/subtoolboxcontrol.obj \
$(SLO)$/tbxcolor.obj \
- $(SLO)$/tbunocontroller.obj
+ $(SLO)$/tbunocontroller.obj \
+ $(SLO)$/tbunosearchcontrollers.obj
SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
new file mode 100644
index 000000000000..f4f03170a90f
--- /dev/null
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -0,0 +1,867 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svx.hxx"
+
+#include "tbunosearchcontrollers.hxx"
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XLayoutManager.hpp>
+#include <com/sun/star/ui/XUIElement.hpp>
+#include <com/sun/star/util/URL.hpp>
+
+#include <toolkit/helper/vclunohelper.hxx>
+#include <vcl/toolbox.hxx>
+#include <vcl/svapp.hxx>
+#include <vos/mutex.hxx>
+
+namespace svx
+{
+
+static const ::rtl::OUString SEARCHITEM_SEARCHSTRING = ::rtl::OUString::createFromAscii("SearchItem.SearchString");
+static const ::rtl::OUString SEARCHITEM_SEARCHBACKWARD = ::rtl::OUString::createFromAscii("SearchItem.Backward");
+
+static const ::rtl::OUString COMMAND_EXECUTESEARCH = ::rtl::OUString::createFromAscii(".uno:ExecuteSearch");
+static const ::rtl::OUString COMMAND_FINDTEXT = ::rtl::OUString::createFromAscii(".uno:FindText") ;
+static const ::rtl::OUString COMMAND_DOWNSEARCH = ::rtl::OUString::createFromAscii(".uno:DownSearch");
+static const ::rtl::OUString COMMAND_UPSEARCH = ::rtl::OUString::createFromAscii(".uno:UpSearch") ;
+static const ::rtl::OUString COMMAND_APPENDSEARCHHISTORY = ::rtl::OUString::createFromAscii("AppendSearchHistory");
+
+static const ::rtl::OUString SERVICENAME_URLTRANSFORMER = ::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer");
+static const sal_Int32 REMEMBER_SIZE = 10;
+
+void impl_executeSearch( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr, const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Sequence< css::beans::PropertyValue >& lArgs )
+{
+ css::uno::Reference< css::util::XURLTransformer > xURLTransformer( rSMgr->createInstance(SERVICENAME_URLTRANSFORMER), css::uno::UNO_QUERY );
+ if ( xURLTransformer.is() )
+ {
+ css::util::URL aURL;
+ aURL.Complete = COMMAND_EXECUTESEARCH;
+ xURLTransformer->parseStrict(aURL);
+
+ css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider(xFrame, css::uno::UNO_QUERY);
+ if ( xDispatchProvider.is() )
+ {
+ css::uno::Reference< css::frame::XDispatch > xDispatch = xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 );
+ if ( xDispatch.is() && aURL.Complete.getLength() > 0 )
+ xDispatch->dispatch( aURL, lArgs );
+ }
+ }
+}
+
+FindTextFieldControl::FindTextFieldControl( Window* pParent, WinBits nStyle,
+ css::uno::Reference< css::frame::XFrame >& xFrame,
+ css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager) :
+ ComboBox( pParent, nStyle ),
+ m_xFrame(xFrame),
+ m_xServiceManager(xServiceManager),
+ m_bToClearTextField(sal_True)
+{
+ InitControls_Impl();
+}
+
+FindTextFieldControl::~FindTextFieldControl()
+{
+}
+
+void FindTextFieldControl::InitControls_Impl()
+{
+ SetText( String( ::rtl::OUString::createFromAscii("Find") ) );
+ SetControlForeground(COL_GRAY);
+
+ EnableAutocomplete(TRUE, TRUE);
+}
+
+void FindTextFieldControl::Remember_Impl(const String& rStr)
+{
+ USHORT nCount = GetEntryCount();
+
+ for (USHORT i=0; i<nCount; ++i)
+ {
+ if ( rStr == GetEntry(i))
+ return;
+ }
+
+ if (nCount == REMEMBER_SIZE)
+ RemoveEntry(REMEMBER_SIZE-1);
+
+ InsertEntry(rStr, 0);
+}
+
+void FindTextFieldControl::Modify()
+{
+ ComboBox::Modify();
+
+ SetControlForeground( Color( COL_BLACK ) );
+}
+
+long FindTextFieldControl::PreNotify( NotifyEvent& rNEvt )
+{
+ long nRet= ComboBox::PreNotify( rNEvt );
+
+ switch ( rNEvt.GetType() )
+ {
+ case EVENT_KEYINPUT:
+ {
+ const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
+ sal_Bool bCtrl = pKeyEvent->GetKeyCode().IsMod1();
+ sal_Bool bAlt = pKeyEvent->GetKeyCode().IsMod2();
+ sal_Bool bShift = pKeyEvent->GetKeyCode().IsShift();
+ sal_uInt16 nCode = pKeyEvent->GetKeyCode().GetCode();
+
+ if ( (bCtrl && bAlt && KEY_F == nCode) || KEY_ESCAPE == nCode )
+ GrabFocusToDocument();
+
+ if ( KEY_RETURN == nCode )
+ {
+ Remember_Impl(GetText());
+
+ ::rtl::OUString sFindText = GetText();
+ css::uno::Sequence< css::beans::PropertyValue > lArgs(2);
+
+ lArgs[0].Name = SEARCHITEM_SEARCHSTRING;
+ lArgs[0].Value <<= sFindText;
+
+ lArgs[1].Name = SEARCHITEM_SEARCHBACKWARD;
+ if (bShift)
+ lArgs[1].Value <<= sal_True;
+ else
+ lArgs[1].Value <<= sal_False;
+
+ impl_executeSearch(m_xServiceManager, m_xFrame, lArgs);
+ }
+ break;
+ }
+
+ case EVENT_GETFOCUS:
+ if ( m_bToClearTextField )
+ {
+ SetText( String() );
+ m_bToClearTextField = sal_False;
+ }
+ SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
+ break;
+
+ case EVENT_LOSEFOCUS:
+ if ( GetText().Len() == 0 )
+ {
+ SetText( String( ::rtl::OUString::createFromAscii("Find") ) );
+ SetControlForeground(COL_GRAY);
+ m_bToClearTextField = sal_True;
+ }
+ break;
+ }
+
+ return nRet;
+}
+
+
+//-----------------------------------------------------------------------------------------------------------
+// SearchToolbarControllersManager
+
+SearchToolbarControllersManager* SearchToolbarControllersManager::m_pInstance = 0;
+
+SearchToolbarControllersManager::SearchToolbarControllersManager()
+{
+}
+
+SearchToolbarControllersManager::~SearchToolbarControllersManager()
+{
+}
+
+SearchToolbarControllersManager* SearchToolbarControllersManager::createControllersManager()
+{
+ if (!m_pInstance)
+ m_pInstance = new SearchToolbarControllersManager();
+
+ return m_pInstance;
+}
+
+void SearchToolbarControllersManager::registryController( const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Reference< css::frame::XStatusListener >& xStatusListener, const ::rtl::OUString& sCommandURL )
+{
+ SearchToolbarControllersMap::iterator pIt = aSearchToolbarControllersMap.find(xFrame);
+ if (pIt == aSearchToolbarControllersMap.end())
+ {
+ SearchToolbarControllersVec lControllers(1);
+ lControllers[0].Name = sCommandURL;
+ lControllers[0].Value <<= xStatusListener;
+ aSearchToolbarControllersMap.insert(SearchToolbarControllersMap::value_type(xFrame, lControllers));
+ }
+ else
+ {
+ sal_Int32 nSize = pIt->second.size();
+ for (sal_Int32 i=0; i<nSize; ++i)
+ {
+ if (pIt->second[i].Name.equals(sCommandURL))
+ return;
+ }
+
+ pIt->second.resize(nSize+1);
+ pIt->second[nSize].Name = sCommandURL;
+ pIt->second[nSize].Value <<= xStatusListener;
+ }
+}
+
+void SearchToolbarControllersManager::freeController( const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Reference< css::frame::XStatusListener >& /*xStatusListener*/, const ::rtl::OUString& sCommandURL )
+{
+ SearchToolbarControllersMap::iterator pIt = aSearchToolbarControllersMap.find(xFrame);
+ if (pIt != aSearchToolbarControllersMap.end())
+ {
+ for (SearchToolbarControllersVec::iterator pItCtrl=pIt->second.begin(); pItCtrl!=pIt->second.end(); ++pItCtrl)
+ {
+ if (pItCtrl->Name.equals(sCommandURL))
+ {
+ pIt->second.erase(pItCtrl);
+ break;
+ }
+ }
+
+ if (pIt->second.empty())
+ aSearchToolbarControllersMap.erase(pIt);
+ }
+}
+
+css::uno::Reference< css::frame::XStatusListener > SearchToolbarControllersManager::findController( const css::uno::Reference< css::frame::XFrame >& xFrame, const ::rtl::OUString& sCommandURL )
+{
+ css::uno::Reference< css::frame::XStatusListener > xStatusListener;
+
+ SearchToolbarControllersMap::iterator pIt = aSearchToolbarControllersMap.find(xFrame);
+ if (pIt != aSearchToolbarControllersMap.end())
+ {
+ for (SearchToolbarControllersVec::iterator pItCtrl =pIt->second.begin(); pItCtrl != pIt->second.end(); ++pItCtrl)
+ {
+ if (pItCtrl->Name.equals(sCommandURL))
+ {
+ pItCtrl->Value >>= xStatusListener;
+ break;
+ }
+ }
+ }
+
+ return xStatusListener;
+}
+
+//-----------------------------------------------------------------------------------------------------------
+// FindTextToolbarController
+
+FindTextToolbarController::FindTextToolbarController( const css::uno::Reference< css::lang::XMultiServiceFactory >& rServiceManager )
+ :svt::ToolboxController( rServiceManager,
+ css::uno::Reference< css::frame::XFrame >(),
+ COMMAND_FINDTEXT )
+{
+}
+
+FindTextToolbarController::~FindTextToolbarController()
+{
+}
+
+// XInterface
+css::uno::Any SAL_CALL FindTextToolbarController::queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException )
+{
+ css::uno::Any a = ToolboxController::queryInterface( aType );
+ if ( a.hasValue() )
+ return a;
+
+ return ::cppu::queryInterface( aType, static_cast< css::lang::XServiceInfo* >( this ) );
+}
+
+void SAL_CALL FindTextToolbarController::acquire() throw ()
+{
+ ToolboxController::acquire();
+}
+
+void SAL_CALL FindTextToolbarController::release() throw ()
+{
+ ToolboxController::release();
+}
+
+// XServiceInfo
+::rtl::OUString SAL_CALL FindTextToolbarController::getImplementationName() throw( css::uno::RuntimeException )
+{
+ return getImplementationName_Static();
+}
+
+sal_Bool SAL_CALL FindTextToolbarController::supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException )
+{
+ const css::uno::Sequence< ::rtl::OUString > aSNL( getSupportedServiceNames() );
+ const ::rtl::OUString * pArray = aSNL.getConstArray();
+
+ for( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
+ if( pArray[i] == ServiceName )
+ return true;
+
+ return false;
+}
+
+css::uno::Sequence< ::rtl::OUString > SAL_CALL FindTextToolbarController::getSupportedServiceNames() throw( css::uno::RuntimeException )
+{
+ return getSupportedServiceNames_Static();
+}
+
+css::uno::Sequence< ::rtl::OUString > FindTextToolbarController::getSupportedServiceNames_Static() throw()
+{
+ css::uno::Sequence< ::rtl::OUString > aSNS( 1 );
+ aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ) );
+ return aSNS;
+}
+
+// XComponent
+void SAL_CALL FindTextToolbarController::dispose() throw ( css::uno::RuntimeException )
+{
+ vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+
+ SearchToolbarControllersManager::createControllersManager()->freeController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL);
+
+ svt::ToolboxController::dispose();
+ delete m_pFindTextFieldControl;
+ m_pFindTextFieldControl = 0;
+}
+
+// XInitialization
+void SAL_CALL FindTextToolbarController::initialize( const css::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException)
+{
+ svt::ToolboxController::initialize(aArguments);
+
+ Window* pWindow = VCLUnoHelper::GetWindow( getParent() );
+ ToolBox* pToolBox = (ToolBox*)pWindow;
+ if ( pToolBox )
+ {
+ USHORT nItemCount = pToolBox->GetItemCount();
+ for ( USHORT i=0; i<nItemCount; ++i )
+ {
+ ::rtl::OUString sItemCommand = pToolBox->GetItemCommand(i);
+ if ( sItemCommand.equals( COMMAND_DOWNSEARCH ) )
+ m_nDownSearchId = i;
+ else if (sItemCommand.equals( COMMAND_UPSEARCH ))
+ m_nUpSearchId = i;
+ }
+ }
+
+ SearchToolbarControllersManager::createControllersManager()->registryController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL);
+}
+
+// XToolbarController
+void SAL_CALL FindTextToolbarController::execute( sal_Int16 /*KeyModifier*/ ) throw ( css::uno::RuntimeException )
+{
+}
+
+css::uno::Reference< css::awt::XWindow > SAL_CALL FindTextToolbarController::createItemWindow( const css::uno::Reference< css::awt::XWindow >& Parent ) throw ( css::uno::RuntimeException )
+{
+ css::uno::Reference< css::awt::XWindow > xItemWindow;
+
+ css::uno::Reference< css::awt::XWindow > xParent( Parent );
+ Window* pParent = VCLUnoHelper::GetWindow( xParent );
+ if ( pParent )
+ {
+ ToolBox* pToolbar = ( ToolBox* )pParent;
+ m_pFindTextFieldControl = new FindTextFieldControl( pToolbar, WinBits( WB_DROPDOWN | WB_VSCROLL), m_xFrame, m_xServiceManager );
+
+ Size aSize(100, m_pFindTextFieldControl->GetTextHeight() + 200);
+ m_pFindTextFieldControl->SetSizePixel( aSize );
+ m_pFindTextFieldControl->SetModifyHdl(LINK(this, FindTextToolbarController, EditModifyHdl));
+ }
+ xItemWindow = VCLUnoHelper::GetInterface( m_pFindTextFieldControl );
+
+ return xItemWindow;
+}
+
+// XStatusListener
+void SAL_CALL FindTextToolbarController::statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException )
+{
+ vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ if ( m_bDisposed )
+ return;
+
+ ::rtl::OUString aFeatureURL = rEvent.FeatureURL.Complete;
+ if (aFeatureURL.equalsAscii("AppendSearchHistory"))
+ {
+ m_pFindTextFieldControl->Remember_Impl(m_pFindTextFieldControl->GetText());
+ }
+}
+
+IMPL_LINK( FindTextToolbarController, EditModifyHdl, void *, EMPTYARG )
+{
+ // enable or disable item DownSearch/UpSearch of findbar
+ Window* pWindow = VCLUnoHelper::GetWindow( getParent() );
+ ToolBox* pToolBox = (ToolBox*)pWindow;
+ if ( pToolBox && m_pFindTextFieldControl )
+ {
+ if (m_pFindTextFieldControl->GetText().Len()>0)
+ {
+ if ( !pToolBox->IsItemEnabled(m_nDownSearchId) )
+ pToolBox->EnableItem(m_nDownSearchId, sal_True);
+ if ( !pToolBox->IsItemEnabled(m_nUpSearchId) )
+ pToolBox->EnableItem(m_nUpSearchId, sal_True);
+ }
+ else
+ {
+ if ( pToolBox->IsItemEnabled(m_nDownSearchId) )
+ pToolBox->EnableItem(m_nDownSearchId, sal_False);
+ if ( pToolBox->IsItemEnabled(m_nUpSearchId) )
+ pToolBox->EnableItem(m_nUpSearchId, sal_False);
+ }
+ }
+
+ return 0;
+}
+
+//-----------------------------------------------------------------------------------------------------------
+// class DownSearchToolboxController
+
+DownSearchToolboxController::DownSearchToolboxController(const css::uno::Reference< css::lang::XMultiServiceFactory >& rServiceManager )
+ : svt::ToolboxController( rServiceManager,
+ css::uno::Reference< css::frame::XFrame >(),
+ COMMAND_DOWNSEARCH )
+{
+}
+
+DownSearchToolboxController::~DownSearchToolboxController()
+{
+}
+
+// XInterface
+css::uno::Any SAL_CALL DownSearchToolboxController::queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException )
+{
+ css::uno::Any a = ToolboxController::queryInterface( aType );
+ if ( a.hasValue() )
+ return a;
+
+ return ::cppu::queryInterface( aType, static_cast< css::lang::XServiceInfo* >( this ) );
+}
+
+void SAL_CALL DownSearchToolboxController::acquire() throw ()
+{
+ ToolboxController::acquire();
+}
+
+void SAL_CALL DownSearchToolboxController::release() throw ()
+{
+ ToolboxController::release();
+}
+
+// XServiceInfo
+::rtl::OUString SAL_CALL DownSearchToolboxController::getImplementationName() throw( css::uno::RuntimeException )
+{
+ return getImplementationName_Static();
+}
+
+sal_Bool SAL_CALL DownSearchToolboxController::supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException )
+{
+ const css::uno::Sequence< ::rtl::OUString > aSNL( getSupportedServiceNames() );
+ const ::rtl::OUString * pArray = aSNL.getConstArray();
+
+ for( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
+ if( pArray[i] == ServiceName )
+ return true;
+
+ return false;
+}
+
+css::uno::Sequence< ::rtl::OUString > SAL_CALL DownSearchToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException )
+{
+ return getSupportedServiceNames_Static();
+}
+
+css::uno::Sequence< ::rtl::OUString > DownSearchToolboxController::getSupportedServiceNames_Static() throw()
+{
+ css::uno::Sequence< ::rtl::OUString > aSNS( 1 );
+ aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ));
+ return aSNS;
+}
+
+// XComponent
+void SAL_CALL DownSearchToolboxController::dispose() throw ( css::uno::RuntimeException )
+{
+ vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+
+ SearchToolbarControllersManager::createControllersManager()->freeController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL);
+
+ svt::ToolboxController::dispose();
+}
+
+// XInitialization
+void SAL_CALL DownSearchToolboxController::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException )
+{
+ svt::ToolboxController::initialize( aArguments );
+ SearchToolbarControllersManager::createControllersManager()->registryController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL);
+}
+
+// XToolbarController
+void SAL_CALL DownSearchToolboxController::execute( sal_Int16 /*KeyModifier*/ ) throw ( css::uno::RuntimeException)
+{
+ if ( m_bDisposed )
+ throw css::lang::DisposedException();
+
+ ::rtl::OUString sFindText;
+ Window* pWindow = VCLUnoHelper::GetWindow( getParent() );
+ ToolBox* pToolBox = (ToolBox*)pWindow;
+ if ( pToolBox )
+ {
+ USHORT nItemCount = pToolBox->GetItemCount();
+ for ( USHORT i=0; i<nItemCount; ++i )
+ {
+ ::rtl::OUString sItemCommand = pToolBox->GetItemCommand(i);
+ if ( sItemCommand.equals( COMMAND_FINDTEXT ) )
+ {
+ Window* pItemWin = pToolBox->GetItemWindow(i);
+ if (pItemWin)
+ sFindText = pItemWin->GetText();
+ break;
+ }
+ }
+ }
+
+ css::uno::Sequence< css::beans::PropertyValue > lArgs(2);
+ lArgs[0].Name = SEARCHITEM_SEARCHSTRING;
+ lArgs[0].Value <<= sFindText;
+ lArgs[1].Name = SEARCHITEM_SEARCHBACKWARD;
+ lArgs[1].Value <<= sal_False;
+
+ impl_executeSearch(m_xServiceManager, m_xFrame, lArgs);
+
+ css::frame::FeatureStateEvent aEvent;
+ aEvent.FeatureURL.Complete = COMMAND_APPENDSEARCHHISTORY;
+ css::uno::Reference< css::frame::XStatusListener > xStatusListener = SearchToolbarControllersManager::createControllersManager()->findController(m_xFrame, COMMAND_FINDTEXT);
+ if (xStatusListener.is())
+ xStatusListener->statusChanged( aEvent );
+}
+
+// XStatusListener
+void SAL_CALL DownSearchToolboxController::statusChanged( const css::frame::FeatureStateEvent& /*rEvent*/ ) throw ( css::uno::RuntimeException )
+{
+ vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ if ( m_bDisposed )
+ return;
+}
+
+//-----------------------------------------------------------------------------------------------------------
+// class UpSearchToolboxController
+
+UpSearchToolboxController::UpSearchToolboxController( const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager )
+ :svt::ToolboxController( rServiceManager,
+ css::uno::Reference< css::frame::XFrame >(),
+ COMMAND_UPSEARCH )
+{
+}
+
+UpSearchToolboxController::~UpSearchToolboxController()
+{
+}
+
+// XInterface
+css::uno::Any SAL_CALL UpSearchToolboxController::queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException )
+{
+ css::uno::Any a = ToolboxController::queryInterface( aType );
+ if ( a.hasValue() )
+ return a;
+
+ return ::cppu::queryInterface( aType, static_cast< css::lang::XServiceInfo* >( this ) );
+}
+
+void SAL_CALL UpSearchToolboxController::acquire() throw ()
+{
+ ToolboxController::acquire();
+}
+
+void SAL_CALL UpSearchToolboxController::release() throw ()
+{
+ ToolboxController::release();
+}
+
+// XServiceInfo
+::rtl::OUString SAL_CALL UpSearchToolboxController::getImplementationName() throw( css::uno::RuntimeException )
+{
+ return getImplementationName_Static();
+}
+
+sal_Bool SAL_CALL UpSearchToolboxController::supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException )
+{
+ const css::uno::Sequence< ::rtl::OUString > aSNL( getSupportedServiceNames() );
+ const ::rtl::OUString * pArray = aSNL.getConstArray();
+
+ for( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
+ if( pArray[i] == ServiceName )
+ return true;
+
+ return false;
+}
+
+css::uno::Sequence< ::rtl::OUString > SAL_CALL UpSearchToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException )
+{
+ return getSupportedServiceNames_Static();
+}
+
+css::uno::Sequence< ::rtl::OUString > UpSearchToolboxController::getSupportedServiceNames_Static() throw()
+{
+ css::uno::Sequence< ::rtl::OUString > aSNS( 1 );
+ aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ) );
+ return aSNS;
+}
+
+// XComponent
+void SAL_CALL UpSearchToolboxController::dispose() throw ( css::uno::RuntimeException )
+{
+ vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+
+ SearchToolbarControllersManager::createControllersManager()->freeController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL);
+
+ svt::ToolboxController::dispose();
+}
+
+// XInitialization
+void SAL_CALL UpSearchToolboxController::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException )
+{
+ svt::ToolboxController::initialize( aArguments );
+ SearchToolbarControllersManager::createControllersManager()->registryController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL);
+}
+
+// XToolbarController
+void SAL_CALL UpSearchToolboxController::execute( sal_Int16 /*KeyModifier*/ ) throw ( css::uno::RuntimeException )
+{
+ if ( m_bDisposed )
+ throw css::lang::DisposedException();
+
+ ::rtl::OUString sFindText;
+ Window* pWindow = VCLUnoHelper::GetWindow( getParent() );
+ ToolBox* pToolBox = (ToolBox*)pWindow;
+ if ( pToolBox )
+ {
+ USHORT nItemCount = pToolBox->GetItemCount();
+ for ( USHORT i=0; i<nItemCount; ++i )
+ {
+ ::rtl::OUString sItemCommand = pToolBox->GetItemCommand(i);
+ if ( sItemCommand.equals( COMMAND_FINDTEXT ) )
+ {
+ Window* pItemWin = pToolBox->GetItemWindow(i);
+ if (pItemWin)
+ sFindText = pItemWin->GetText();
+ break;
+ }
+ }
+ }
+
+ css::uno::Sequence< css::beans::PropertyValue > lArgs(2);
+ lArgs[0].Name = SEARCHITEM_SEARCHSTRING;
+ lArgs[0].Value <<= sFindText;
+ lArgs[1].Name = SEARCHITEM_SEARCHBACKWARD;
+ lArgs[1].Value <<= sal_True;
+
+ impl_executeSearch(m_xServiceManager, m_xFrame, lArgs);
+
+ css::frame::FeatureStateEvent aEvent;
+ aEvent.FeatureURL.Complete = COMMAND_APPENDSEARCHHISTORY;
+ css::uno::Reference< css::frame::XStatusListener > xStatusListener = SearchToolbarControllersManager::createControllersManager()->findController(m_xFrame, COMMAND_FINDTEXT);
+ if (xStatusListener.is())
+ xStatusListener->statusChanged( aEvent );
+}
+
+// XStatusListener
+void SAL_CALL UpSearchToolboxController::statusChanged( const css::frame::FeatureStateEvent& /*rEvent*/ ) throw ( css::uno::RuntimeException )
+{
+ vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
+ if ( m_bDisposed )
+ return;
+}
+
+//-----------------------------------------------------------------------------------------------------------
+// class FindbarDispatcher
+
+FindbarDispatcher::FindbarDispatcher(const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory)
+ : m_xFactory( xFactory )
+{
+}
+
+FindbarDispatcher::~FindbarDispatcher()
+{
+ m_xFactory = NULL;
+ m_xFrame = NULL;
+}
+
+// XInterface
+css::uno::Any SAL_CALL FindbarDispatcher::queryInterface( const css::uno::Type& aType ) throw( css::uno::RuntimeException )
+{
+ css::uno::Any aReturn( ::cppu::queryInterface( aType,
+ static_cast< css::lang::XServiceInfo* >(this),
+ static_cast< css::lang::XInitialization* >(this),
+ static_cast< css::frame::XDispatchProvider* >(this),
+ static_cast< css::frame::XDispatch* >(this)) );
+
+ if ( aReturn.hasValue() )
+ return aReturn;
+
+ return OWeakObject::queryInterface( aType );
+}
+
+void SAL_CALL FindbarDispatcher::acquire() throw()
+{
+ OWeakObject::acquire();
+}
+
+void SAL_CALL FindbarDispatcher::release() throw()
+{
+ OWeakObject::release();
+}
+
+// XServiceInfo
+::rtl::OUString SAL_CALL FindbarDispatcher::getImplementationName() throw( css::uno::RuntimeException )
+{
+ return getImplementationName_Static();
+}
+
+sal_Bool SAL_CALL FindbarDispatcher::supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException )
+{
+ return (
+ ServiceName.equalsAscii("com.sun.star.comp.svx.FindbarDispatcher") ||
+ ServiceName.equalsAscii("com.sun.star.frame.ProtocolHandler")
+ );
+}
+
+css::uno::Sequence< ::rtl::OUString > SAL_CALL FindbarDispatcher::getSupportedServiceNames() throw( css::uno::RuntimeException )
+{
+ return getSupportedServiceNames_Static();
+}
+
+css::uno::Sequence< ::rtl::OUString > FindbarDispatcher::getSupportedServiceNames_Static() throw()
+{
+ css::uno::Sequence< ::rtl::OUString > aSNS( 2 );
+ aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.FindbarDispatcher" ));
+ aSNS.getArray()[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ProtocolHandler" ));
+ return aSNS;
+}
+
+// XInitialization
+void SAL_CALL FindbarDispatcher::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException )
+{
+ if ( aArguments.getLength() )
+ aArguments[0] >>= m_xFrame;
+}
+
+// XDispatchProvider
+css::uno::Reference< css::frame::XDispatch > SAL_CALL FindbarDispatcher::queryDispatch( const css::util::URL& aURL, const ::rtl::OUString& /*sTargetFrameName*/, sal_Int32 /*nSearchFlags*/ ) throw( css::uno::RuntimeException )
+{
+ css::uno::Reference< css::frame::XDispatch > xDispatch;
+
+ if ( aURL.Protocol.equalsAscii("vnd.sun.star.findbar:") )
+ xDispatch = this;
+
+ return xDispatch;
+}
+
+css::uno::Sequence < css::uno::Reference< css::frame::XDispatch > > SAL_CALL FindbarDispatcher::queryDispatches( const css::uno::Sequence < css::frame::DispatchDescriptor >& seqDescripts ) throw( css::uno::RuntimeException )
+{
+ sal_Int32 nCount = seqDescripts.getLength();
+ css::uno::Sequence < css::uno::Reference < XDispatch > > lDispatcher( nCount );
+
+ for( sal_Int32 i=0; i<nCount; ++i )
+ lDispatcher[i] = queryDispatch( seqDescripts[i].FeatureURL, seqDescripts[i].FrameName, seqDescripts[i].SearchFlags );
+
+ return lDispatcher;
+}
+
+// XDispatch
+void SAL_CALL FindbarDispatcher::dispatch( const css::util::URL& aURL, const css::uno::Sequence < css::beans::PropertyValue >& /*lArgs*/ ) throw( css::uno::RuntimeException )
+{
+ //vnd.sun.star.findbar:FocusToFindbar - set cursor to the FindTextFieldControl of the findbar
+ if ( aURL.Path.equalsAscii("FocusToFindbar") )
+ {
+ css::uno::Reference< css::beans::XPropertySet > xPropSet(m_xFrame, css::uno::UNO_QUERY);
+ if(!xPropSet.is())
+ return;
+
+ css::uno::Reference< css::frame::XLayoutManager > xLayoutManager;
+ css::uno::Any aValue = xPropSet->getPropertyValue( ::rtl::OUString::createFromAscii("LayoutManager") );
+ aValue >>= xLayoutManager;
+ if (!xLayoutManager.is())
+ return;
+
+ const ::rtl::OUString sResourceURL = ::rtl::OUString::createFromAscii("private:resource/toolbar/findbar");
+ css::uno::Reference< css::ui::XUIElement > xUIElement = xLayoutManager->getElement(sResourceURL);
+ if (!xUIElement.is())
+ return;
+
+ css::uno::Reference< css::awt::XWindow > xWindow(xUIElement->getRealInterface(), css::uno::UNO_QUERY);
+ Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
+ ToolBox* pToolBox = (ToolBox*)pWindow;
+ if ( pToolBox )
+ {
+ USHORT nItemCount = pToolBox->GetItemCount();
+ for ( USHORT i=0; i<nItemCount; ++i )
+ {
+ ::rtl::OUString sItemCommand = pToolBox->GetItemCommand(i);
+ if ( sItemCommand.equalsAscii(".uno:FindText") )
+ {
+ Window* pItemWin = pToolBox->GetItemWindow( i );
+ if ( pItemWin )
+ {
+ pItemWin->GrabFocus();
+ return;
+ }
+ }
+ }
+ }
+
+ }
+}
+
+void SAL_CALL FindbarDispatcher::addStatusListener( const css::uno::Reference< css::frame::XStatusListener >& /*xControl*/, const css::util::URL& /*aURL*/ ) throw ( css::uno::RuntimeException )
+{
+}
+
+void SAL_CALL FindbarDispatcher::removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& /*xControl*/, const css::util::URL& /*aURL*/ ) throw ( css::uno::RuntimeException )
+{
+}
+
+//-----------------------------------------------------------------------------------------------------------
+// create Instance
+
+css::uno::Reference< css::uno::XInterface > SAL_CALL FindTextToolbarController_createInstance(
+ const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr )
+{
+ return *new FindTextToolbarController( rSMgr );
+}
+
+css::uno::Reference< css::uno::XInterface > SAL_CALL DownSearchToolboxController_createInstance(
+ const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr )
+{
+ return *new DownSearchToolboxController( rSMgr );
+}
+
+css::uno::Reference< css::uno::XInterface > SAL_CALL UpSearchToolboxController_createInstance(
+ const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr )
+{
+ return *new UpSearchToolboxController( rSMgr );
+}
+
+css::uno::Reference< css::uno::XInterface > SAL_CALL FindbarDispatcher_createInstance(
+ const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr )
+{
+ return *new FindbarDispatcher( rSMgr );
+}
+
+//-----------------------------------------------------------------------------------------------------------
+}
diff --git a/svx/source/tbxctrls/toolbarmenu.cxx b/svx/source/tbxctrls/toolbarmenu.cxx
deleted file mode 100644
index 3875e0471c7d..000000000000
--- a/svx/source/tbxctrls/toolbarmenu.cxx
+++ /dev/null
@@ -1,1029 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svx.hxx"
-#include <vcl/menu.hxx>
-#include <vcl/decoview.hxx>
-#include <vcl/image.hxx>
-
-#include "toolbarmenu.hxx"
-
-const int EXTRAITEMHEIGHT = 4;
-const int SEPARATOR_HEIGHT = 8;
-
-class ToolbarMenuEntry
-{
-public:
- int mnEntryId;
- MenuItemBits mnBits;
- Size maSize;
-
- bool mbHasText;
- bool mbHasImage;
- bool mbHasControl;
- bool mbChecked;
- bool mbEnabled;
-
- String maText;
- Image maImage;
- Control* mpControl;
-
-public:
- ToolbarMenuEntry( int nEntryId, const String& rText, MenuItemBits nBits );
- ToolbarMenuEntry( int nEntryId, const Image& rImage, MenuItemBits nBits );
- ToolbarMenuEntry( int nEntryId, const Image& rImage, const String& rText, MenuItemBits nBits );
- ToolbarMenuEntry( int nEntryId, Control* pControl, MenuItemBits nBits );
- ToolbarMenuEntry( int nEntryId, const String& rText, Control* pControl, MenuItemBits nBits );
- ~ToolbarMenuEntry();
-
- void init( int nEntryId, MenuItemBits nBits );
-};
-
-void ToolbarMenuEntry::init( int nEntryId, MenuItemBits nBits )
-{
- mnEntryId = nEntryId;
- mnBits = nBits;
-
- mbHasText = false;
- mbHasImage = false;
- mbHasControl = false;
- mbChecked = false;
- mbEnabled = true;
-
- mpControl = NULL;
-}
-
-ToolbarMenuEntry::ToolbarMenuEntry( int nEntryId, const String& rText, MenuItemBits nBits )
-{
- init( nEntryId, nBits );
-
- maText = rText;
- mbHasText = true;
-}
-
-ToolbarMenuEntry::ToolbarMenuEntry( int nEntryId, const Image& rImage, MenuItemBits nBits )
-{
- init( nEntryId, nBits );
-
- maImage = rImage;
- mbHasImage = true;
-}
-
-ToolbarMenuEntry::ToolbarMenuEntry( int nEntryId, const Image& rImage, const String& rText, MenuItemBits nBits )
-{
- init( nEntryId, nBits );
-
- maText = rText;
- mbHasText = true;
-
- maImage = rImage;
- mbHasImage = true;
-}
-
-ToolbarMenuEntry::ToolbarMenuEntry( int nEntryId, Control* pControl, MenuItemBits nBits )
-{
- init( nEntryId, nBits );
-
- if( pControl )
- {
- mpControl = pControl;
- mpControl->Show();
- }
-}
-
-ToolbarMenuEntry::ToolbarMenuEntry( int nEntryId, const String& rText, Control* pControl, MenuItemBits nBits )
-{
- init( nEntryId, nBits );
-
- maText = rText;
- mbHasText = true;
-
- if( pControl )
- {
- mpControl = pControl;
- mpControl->Show();
- }
-}
-
-ToolbarMenuEntry::~ToolbarMenuEntry()
-{
- delete mpControl;
-}
-
-ToolbarMenu::ToolbarMenu( Window* pParent, WinBits nStyle ) :
- Control( pParent, nStyle )
-{
- mnCheckPos = 0;
- mnImagePos = 0;
- mnTextPos = 0;
-
- mnHighlightedEntry = -1;
- mnSelectedEntry = -1;
- initWindow();
-}
-
-ToolbarMenu::~ToolbarMenu()
-{
- // delete all menu entries
- const int nEntryCount = maEntryVector.size();
- int nEntry;
- for( nEntry = 0; nEntry < nEntryCount; nEntry++ )
- {
- delete maEntryVector[nEntry];
- }
-}
-
-int ToolbarMenu::getSelectedEntryId() const
-{
- ToolbarMenuEntry* pEntry = implGetEntry( mnSelectedEntry );
- return pEntry ? pEntry->mnEntryId : -1;
-}
-
-int ToolbarMenu::getHighlightedEntryId() const
-{
- ToolbarMenuEntry* pEntry = implGetEntry( mnHighlightedEntry );
- return pEntry ? pEntry->mnEntryId : -1;
-}
-
-void ToolbarMenu::checkEntry( int nEntryId, bool bChecked )
-{
- ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId );
- if( pEntry && pEntry->mbChecked != bChecked )
- {
- pEntry->mbChecked = bChecked;
- Invalidate();
- }
-}
-
-bool ToolbarMenu::isEntryChecked( int nEntryId ) const
-{
- ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId );
- return pEntry && pEntry->mbChecked;
-}
-
-void ToolbarMenu::enableEntry( int nEntryId, bool bEnable )
-{
- ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId );
- if( pEntry && pEntry->mbEnabled != bEnable )
- {
- pEntry->mbEnabled = bEnable;
- if( pEntry->mpControl )
- {
- pEntry->mpControl->Enable( bEnable );
-
- // hack for the valueset to make it paint itself anew
- pEntry->mpControl->Resize();
- }
- Invalidate();
- }
-}
-
-bool ToolbarMenu::isEntryEnabled( int nEntryId ) const
-{
- ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId );
- return pEntry && pEntry->mbEnabled;
-}
-
-void ToolbarMenu::setEntryText( int nEntryId, const String& rStr )
-{
- ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId );
- if( pEntry && pEntry->maText != rStr )
- {
- pEntry->maText = rStr;
- maSize = implCalcSize();
- if( IsVisible() )
- Invalidate();
- }
-}
-
-const String& ToolbarMenu::getEntryText( int nEntryId ) const
-{
- ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId );
- if( pEntry )
- return pEntry->maText;
- else
- {
- static String aEmptyStr;
- return aEmptyStr;
- }
-}
-
-void ToolbarMenu::setEntryImage( int nEntryId, const Image& rImage )
-{
- ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId );
- if( pEntry && pEntry->maImage != rImage )
- {
- pEntry->maImage = rImage;
- maSize = implCalcSize();
- if( IsVisible() )
- Invalidate();
- }
-}
-
-const Image& ToolbarMenu::getEntryImage( int nEntryId ) const
-{
- ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId );
- if( pEntry )
- return pEntry->maImage;
- else
- {
- static Image aEmptyImage;
- return aEmptyImage;
- }
-}
-
-void ToolbarMenu::initWindow()
-{
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
-
- SetPointFont( rStyleSettings.GetMenuFont() );
- SetBackground( Wallpaper( rStyleSettings.GetMenuColor() ) );
- SetTextColor( rStyleSettings.GetMenuTextColor() );
- SetTextFillColor();
- SetLineColor();
-
- maSize = implCalcSize();
-}
-
-Size ToolbarMenu::implCalcSize()
-{
- const long nFontHeight = GetTextHeight();
- long nExtra = nFontHeight/4;
-
- Size aSz;
- Size aMaxImgSz;
- long nMaxTextWidth = 0;
- long nMinMenuItemHeight = nFontHeight;
- sal_Bool bCheckable = sal_False;
-
- const int nEntryCount = maEntryVector.size();
- int nEntry;
-
- const StyleSettings& rSettings = GetSettings().GetStyleSettings();
- if ( rSettings.GetUseImagesInMenus() )
- {
- nMinMenuItemHeight = 16;
-
- for( nEntry = 0; nEntry < nEntryCount; nEntry++ )
- {
- ToolbarMenuEntry* pEntry = maEntryVector[nEntry];
- if( pEntry && pEntry->mbHasImage )
- {
- Size aImgSz = pEntry->maImage.GetSizePixel();
- if ( aImgSz.Height() > aMaxImgSz.Height() )
- aMaxImgSz.Height() = aImgSz.Height();
- if ( aImgSz.Height() > nMinMenuItemHeight )
- nMinMenuItemHeight = aImgSz.Height();
- break;
- }
- }
- }
-
- for( nEntry = 0; nEntry < nEntryCount; nEntry++ )
- {
- ToolbarMenuEntry* pEntry = maEntryVector[nEntry];
-
- if( pEntry )
- {
- pEntry->maSize.Height() = 0;
- pEntry->maSize.Width() = 0;
-
-
- if ( ( pEntry->mnBits ) & ( MIB_RADIOCHECK | MIB_CHECKABLE ) )
- bCheckable = sal_True;
-
- // Image:
- if( pEntry->mbHasImage )
- {
- Size aImgSz = pEntry->maImage.GetSizePixel();
- if ( (aImgSz.Width() + 4) > aMaxImgSz.Width() )
- aMaxImgSz.Width() = aImgSz.Width() + 4;
- if ( (aImgSz.Height() + 4) > aMaxImgSz.Height() )
- aMaxImgSz.Height() = aImgSz.Height() + 4;
- if ( (aImgSz.Height() + 4) > pEntry->maSize.Height() )
- pEntry->maSize.Height() = aImgSz.Height() + 4;
- }
- }
- }
-
- int gfxExtra = Max( nExtra, 7L );
-
- mnCheckPos = nExtra;
-// mnImagePos = mnCheckPos + nFontHeight/2 + gfxExtra;
- mnImagePos = nExtra;
- mnTextPos = mnImagePos + aMaxImgSz.Width();
-
- for( nEntry = 0; nEntry < nEntryCount; nEntry++ )
- {
- ToolbarMenuEntry* pEntry = maEntryVector[nEntry];
-
- if( pEntry )
- {
- // Text:
- if( pEntry->mbHasText )
- {
- long nTextWidth = GetCtrlTextWidth( pEntry->maText );
- if ( nTextWidth > nMaxTextWidth )
- nMaxTextWidth = nTextWidth;
- long nTextHeight = GetTextHeight();
-
- pEntry->maSize.Height() = Max( Max( nTextHeight, pEntry->maSize.Height() ), nMinMenuItemHeight );
- }
-
- // Control:
- if( pEntry->mpControl )
- {
- long nTextWidth = pEntry->mbHasText ? GetCtrlTextWidth( pEntry->maText ) : -mnTextPos;
-
- Size aControlSize( pEntry->mpControl->GetOutputSizePixel() );
-
- if( nTextWidth )
- nTextWidth += nExtra;
-
- nTextWidth += aControlSize.Width();
-
- if ( nTextWidth > nMaxTextWidth )
- nMaxTextWidth = nTextWidth;
-
- if ( aControlSize.Height() > pEntry->maSize.Height() )
- pEntry->maSize.Height() = aControlSize.Height();
- }
-
- pEntry->maSize.Height() += EXTRAITEMHEIGHT;
-
- aSz.Height() += pEntry->maSize.Height();
- }
- else
- {
- aSz.Height() += SEPARATOR_HEIGHT;
- }
- }
-
- if ( aMaxImgSz.Width() )
- mnTextPos += gfxExtra;
- if ( bCheckable )
- mnTextPos += 16;
-
-
- aSz.Width() = mnTextPos + nMaxTextWidth;
- aSz.Width() += 2*nExtra;
-
- // positionate controls
- int nY = 0;
- for( nEntry = 0; nEntry < nEntryCount; nEntry++ )
- {
- ToolbarMenuEntry* pEntry = maEntryVector[nEntry];
-
- if( pEntry )
- {
- if( pEntry->mpControl )
- {
- Size aControlSize( pEntry->mpControl->GetOutputSizePixel() );
- Point aControlPos( pEntry->mbHasText ? mnTextPos : ( aSz.Width() - aControlSize.Width() ) / 2, nY);
- if( pEntry->mbHasText )
- aControlPos.X() += GetCtrlTextWidth( pEntry->maText ) + 4*gfxExtra;
-
- pEntry->mpControl->SetPosPixel( aControlPos );
- }
-
- nY += pEntry->maSize.Height();
- }
- else
- {
- nY += SEPARATOR_HEIGHT;
- }
- }
-
- return aSz;
-}
-
-void ToolbarMenu::GetFocus()
-{
-/*
- if( mnHighlightedEntry == -1 )
- {
- implChangeHighlightEntry( 0 );
- }
-*/
- Control::GetFocus();
-}
-
-void ToolbarMenu::LoseFocus()
-{
- if( mnHighlightedEntry != -1 )
- {
- implChangeHighlightEntry( -1 );
- }
- Control::LoseFocus();
-}
-
-void ToolbarMenu::appendEntry( int nEntryId, const String& rStr, MenuItemBits nItemBits )
-{
- appendEntry( new ToolbarMenuEntry( nEntryId, rStr, nItemBits ) );
-}
-
-void ToolbarMenu::appendEntry( int nEntryId, const Image& rImage, MenuItemBits nItemBits )
-{
- appendEntry( new ToolbarMenuEntry( nEntryId, rImage, nItemBits ) );
-}
-
-void ToolbarMenu::appendEntry( int nEntryId, const String& rStr, const Image& rImage, MenuItemBits nItemBits )
-{
- appendEntry( new ToolbarMenuEntry( nEntryId, rImage, rStr, nItemBits ) );
-}
-
-void ToolbarMenu::appendEntry( int nEntryId, Control* pControl, MenuItemBits nItemBits )
-{
- appendEntry( new ToolbarMenuEntry( nEntryId, pControl, nItemBits ) );
-}
-
-void ToolbarMenu::appendEntry( int nEntryId, const String& rStr, Control* pControl, MenuItemBits nItemBits )
-{
- appendEntry( new ToolbarMenuEntry( nEntryId, rStr, pControl, nItemBits ) );
-}
-
-void ToolbarMenu::appendEntry( ToolbarMenuEntry* pEntry )
-{
- maEntryVector.push_back( pEntry );
- maSize = implCalcSize();
- if( IsVisible() )
- Invalidate();
-}
-
-void ToolbarMenu::appendSeparator()
-{
- appendEntry( 0 );
-}
-
-void ToolbarMenu::Resize()
-{
- Window::Resize();
-}
-
-ToolbarMenuEntry* ToolbarMenu::implGetEntry( int nEntry ) const
-{
- if( (nEntry < 0) || (nEntry >= (int)maEntryVector.size() ) )
- return NULL;
-
- return maEntryVector[nEntry];
-}
-
-ToolbarMenuEntry* ToolbarMenu::implSearchEntry( int nEntryId ) const
-{
- const int nEntryCount = maEntryVector.size();
- int nEntry;
- for( nEntry = 0; nEntry < nEntryCount; nEntry++ )
- {
- ToolbarMenuEntry* p = maEntryVector[nEntry];
- if( p && p->mnEntryId == nEntryId )
- {
- return p;
- }
- }
-
- return NULL;
-}
-
-void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight )
-{
- Size aSz = GetOutputSizePixel();
- long nY = 0;
- long nX = 0;
-
- const int nEntryCount = maEntryVector.size();
- int nEntry;
- for( nEntry = 0; nEntry < nEntryCount; nEntry++ )
- {
- ToolbarMenuEntry* p = maEntryVector[nEntry];
- if( p )
- {
- if(nEntry == nHighlightEntry)
- {
-// bool bRestoreLineColor = false;
- Color oldLineColor;
-/*
- if( bHighlight && ((p->mpControl == NULL) || (p->mbHasText)) )
- {
- if( p->mbEnabled )
- {
- SetFillColor( GetSettings().GetStyleSettings().GetMenuHighlightColor() );
- }
- else
- {
- SetFillColor();
- oldLineColor = GetLineColor();
- SetLineColor( GetSettings().GetStyleSettings().GetMenuHighlightColor() );
- bRestoreLineColor = true;
- }
- }
- else
-*/
- SetFillColor( GetSettings().GetStyleSettings().GetMenuColor() );
-
- Rectangle aRect( Point( nX, nY ), Size( aSz.Width(), p->maSize.Height() ) );
- if( p->mnBits & MIB_POPUPSELECT )
- {
- long nFontHeight = GetTextHeight();
- aRect.Right() -= nFontHeight + nFontHeight/4;
- }
- DrawRect( aRect );
- implPaint( p, bHighlight );
-
- if( bHighlight && ((p->mpControl == NULL) || (p->mbHasText)) )
- {
- aRect.nLeft += 1;
- aRect.nTop += 1;
- aRect.nBottom -= 1;
- aRect.nRight -= 1;
- DrawSelectionBackground( aRect, true, false, TRUE, TRUE );
- }
-/*
- if( bRestoreLineColor )
- SetLineColor( oldLineColor );
-*/
- maHighlightHdl.Call( this );
- break;
- }
-
- nY += p->maSize.Height();
- }
- else
- {
- nY += SEPARATOR_HEIGHT;
- }
- }
-}
-
-void ToolbarMenu::implSelectEntry( int nSelectedEntry )
-{
- mnSelectedEntry = nSelectedEntry;
-
- ToolbarMenuEntry* pEntry = NULL;
- if( nSelectedEntry != -1 )
- pEntry = maEntryVector[ nSelectedEntry ];
-
- if( pEntry )
- maSelectHdl.Call( this );
-}
-
-void ToolbarMenu::MouseButtonDown( const MouseEvent& rMEvt )
-{
- implHighlightEntry( rMEvt, true );
-
- implSelectEntry( mnHighlightedEntry );
-}
-
-void ToolbarMenu::MouseButtonUp( const MouseEvent& )
-{
-}
-
-void ToolbarMenu::MouseMove( const MouseEvent& rMEvt )
-{
- if ( !IsVisible() )
- return;
-
- implHighlightEntry( rMEvt, false );
-}
-
-void ToolbarMenu::implHighlightEntry( const MouseEvent& rMEvt, bool bMBDown )
-{
- long nY = 0;
- long nMouseY = rMEvt.GetPosPixel().Y();
- Size aOutSz = GetOutputSizePixel();
- if ( ( nMouseY >= 0 ) && ( nMouseY < aOutSz.Height() ) )
- {
- bool bHighlighted = FALSE;
-
- const int nEntryCount = maEntryVector.size();
- int nEntry;
- for( nEntry = 0; nEntry < nEntryCount; nEntry++ )
- {
- ToolbarMenuEntry* pEntry = maEntryVector[nEntry];
- if( pEntry )
- {
- long nOldY = nY;
- nY += pEntry->maSize.Height();
- if ( ( nOldY <= nMouseY ) && ( nY > nMouseY ) )
- {
- if( bMBDown )
- {
- if( nEntry != mnHighlightedEntry )
- {
- implChangeHighlightEntry( nEntry );
- }
- }
- else
- {
- if ( nEntry != mnHighlightedEntry )
- {
- implChangeHighlightEntry( nEntry );
- }
- }
- bHighlighted = true;
- }
- }
- else
- {
- nY += SEPARATOR_HEIGHT;
- }
- }
- if ( !bHighlighted )
- implChangeHighlightEntry( -1 );
- }
- else
- {
- implChangeHighlightEntry( -1 );
- }
-}
-
-void ToolbarMenu::implChangeHighlightEntry( int nEntry )
-{
- if( mnHighlightedEntry != -1 )
- {
- implHighlightEntry( mnHighlightedEntry, false );
- }
-
- mnHighlightedEntry = nEntry;
- if( mnHighlightedEntry != -1 )
- {
- implHighlightEntry( mnHighlightedEntry, true );
- }
-}
-
-ToolbarMenuEntry* ToolbarMenu::implCursorUpDown( bool bUp, bool bHomeEnd )
-{
- int n = mnHighlightedEntry;
- if( n == -1 )
- {
- if( bUp )
- n = 0;
- else
- n = maEntryVector.size()-1;
- }
-
- int nLoop = n;
-
- if( bHomeEnd )
- {
- // absolute positioning
- if( bUp )
- {
- n = maEntryVector.size();
- nLoop = n-1;
- }
- else
- {
- n = -1;
- nLoop = n+1;
- }
- }
-
- do
- {
- if( bUp )
- {
- if ( n )
- n--;
- else
- if( mnHighlightedEntry == -1 )
- n = maEntryVector.size()-1;
-// else
-// break;
- }
- else
- {
- if( n < ((int)maEntryVector.size()-1) )
- n++;
- else
- if( mnHighlightedEntry == -1 )
- n = 0;
-// else
-// break;
- }
-
- ToolbarMenuEntry* pData = maEntryVector[n];
- if( pData )
- {
- implChangeHighlightEntry( n );
- return pData;
- }
- } while ( n != nLoop );
-
- return 0;
-}
-
-void ToolbarMenu::KeyInput( const KeyEvent& rKEvent )
-{
- USHORT nCode = rKEvent.GetKeyCode().GetCode();
- switch ( nCode )
- {
- case KEY_UP:
- case KEY_DOWN:
- {
- int nOldEntry = mnHighlightedEntry;
- ToolbarMenuEntry*p = implCursorUpDown( nCode == KEY_UP, false );
- if( p && p->mpControl && !p->mbHasText )
- {
- p->mpControl->GrabFocus();
- if( nOldEntry != mnHighlightedEntry )
- {
- KeyCode aKeyCode( (nCode == KEY_UP) ? KEY_END : KEY_HOME );
- KeyEvent aKeyEvent( 0, aKeyCode );
- p->mpControl->KeyInput( aKeyEvent );
- }
- }
- }
- break;
- case KEY_END:
- case KEY_HOME:
- {
- ToolbarMenuEntry* p = implCursorUpDown( nCode == KEY_END, true );
- if( p && p->mpControl && !p->mbHasText )
- {
- p->mpControl->GrabFocus();
- KeyCode aKeyCode( KEY_HOME );
- KeyEvent aKeyEvent( 0, aKeyCode );
- p->mpControl->KeyInput( aKeyEvent );
- }
- }
- break;
- case KEY_F6:
- case KEY_ESCAPE:
- {
- // Ctrl-F6 acts like ESC here, the menu bar however will then put the focus in the document
- if( nCode == KEY_F6 && !rKEvent.GetKeyCode().IsMod1() )
- break;
-
- implSelectEntry( -1 );
-/*
- if ( !pMenu->pStartedFrom )
- {
- StopExecute();
- KillActivePopup();
- }
- else if ( pMenu->pStartedFrom->bIsMenuBar )
- {
- // Forward...
- ((MenuBarWindow*)((MenuBar*)pMenu->pStartedFrom)->ImplGetWindow())->KeyInput( rKEvent );
- }
- else
- {
- StopExecute();
- ToolbarMenu* pFloat = ((PopupMenu*)pMenu->pStartedFrom)->ImplGetFloatingWindow();
- pFloat->GrabFocus();
- pFloat->KillActivePopup();
- }
-*/
- }
- break;
-
- case KEY_RETURN:
- {
- ToolbarMenuEntry* pEntry = implGetEntry( mnHighlightedEntry );
- if ( pEntry && pEntry->mbEnabled )
- {
- if( pEntry->mpControl )
- {
- pEntry->mpControl->GrabFocus();
- }
- else
- {
- implSelectEntry( mnHighlightedEntry );
- }
- }
- // else
- // StopExecute();
- }
- break;
- default:
- {
-/*
- xub_Unicode nCharCode = rKEvent.GetCharCode();
- USHORT nPos;
- USHORT nDuplicates = 0;
- MenuItemData* pData = nCharCode ? pMenu->GetItemList()->SearchItem( nCharCode, nPos, nDuplicates, nHighlightedItem ) : NULL;
- if ( pData )
- {
- if ( pData->pSubMenu || nDuplicates > 1 )
- {
- implChangeHighlightEntry( nPos );
- HighlightChanged( 0 );
- }
- else
- {
- nHighlightedItem = nPos;
- EndExecute();
- }
- }
- else
- {
- // Bei ungueltigen Tasten Beepen, aber nicht bei HELP und F-Tasten
- if ( !rKEvent.GetKeyCode().IsControlMod() && ( nCode != KEY_HELP ) && ( rKEvent.GetKeyCode().GetGroup() != KEYGROUP_FKEYS ) )
- Sound::Beep();
- FloatingWindow::KeyInput( rKEvent );
- }
- */
- }
- }
-}
-
-void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
-{
- const long nFontHeight = GetTextHeight();
- const long nExtra = nFontHeight/4;
-
- DecorationView aDecoView( this );
- const StyleSettings& rSettings = GetSettings().GetStyleSettings();
-
- const Size aOutSz( GetOutputSizePixel() );
-// const long nMaxY = aOutSz.Height();
-
- Point aTopLeft, aTmpPos;
-
- const int nEntryCount = maEntryVector.size();
- int nEntry;
- for( nEntry = 0; nEntry < nEntryCount; nEntry++ )
- {
- ToolbarMenuEntry* pEntry = maEntryVector[nEntry];
- Point aPos( aTopLeft );
-
- USHORT nTextStyle = 0;
- USHORT nSymbolStyle = 0;
- USHORT nImageStyle = 0;
- if( pEntry && !pEntry->mbEnabled )
- {
- nTextStyle |= TEXT_DRAW_DISABLE;
- nSymbolStyle |= SYMBOL_DRAW_DISABLE;
- nImageStyle |= IMAGE_DRAW_DISABLE;
- }
-
- // Separator
- if( pEntry == NULL )
- {
- if( pThisOnly == NULL )
- {
- aTmpPos.Y() = aPos.Y() + ((SEPARATOR_HEIGHT-2)/2);
- aTmpPos.X() = aPos.X() + 2;
-
- SetLineColor( rSettings.GetShadowColor() );
- DrawLine( aTmpPos, Point( aOutSz.Width() - 3, aTmpPos.Y() ) );
- aTmpPos.Y()++;
- SetLineColor( rSettings.GetLightColor() );
- DrawLine( aTmpPos, Point( aOutSz.Width() - 3, aTmpPos.Y() ) );
- SetLineColor();
- }
-
- aTopLeft.Y() += SEPARATOR_HEIGHT;
- }
- else
- {
- if( !pThisOnly || ( pEntry == pThisOnly ) )
- {
- if( pThisOnly && bHighlighted )
- SetTextColor( rSettings.GetMenuHighlightTextColor() );
-
- long nTextOffsetY = ((pEntry->maSize.Height()-nFontHeight)/2);
-
- // Image
- if( pEntry->mbHasImage )
- {
- aTmpPos.X() = aPos.X() + mnImagePos;
- aTmpPos.Y() = aPos.Y();
- aTmpPos.Y() += (pEntry->maSize.Height()-pEntry->maImage.GetSizePixel().Height())/2;
- DrawImage( aTmpPos, pEntry->maImage, nImageStyle );
- }
- // Text:
- if( pEntry->mbHasText )
- {
- aTmpPos.X() = aPos.X() + mnTextPos;
- aTmpPos.Y() = aPos.Y();
- aTmpPos.Y() += nTextOffsetY;
- USHORT nStyle = nTextStyle|TEXT_DRAW_MNEMONIC;
-
- DrawCtrlText( aTmpPos, pEntry->maText, 0, pEntry->maText.Len(), nStyle );
- }
- // CheckMark
- if( pEntry->mbChecked )
- {
- if( pEntry->mbHasImage )
- {
- aTmpPos.X() = aPos.X() + mnImagePos;
- aTmpPos.Y() = aPos.Y();
- aTmpPos.Y() += (pEntry->maSize.Height()-pEntry->maImage.GetSizePixel().Height())/2;
-
- Rectangle aRect( aTmpPos, pEntry->maImage.GetSizePixel() );
- aRect.nLeft -= 2;
- aRect.nTop -= 2;
- aRect.nRight += 2;
- aRect.nBottom += 2;
- DrawSelectionBackground( aRect, false, true, TRUE, TRUE );
- }
- else
- {
- Rectangle aRect;
- SymbolType eSymbol;
- aTmpPos.Y() = aPos.Y();
- aTmpPos.Y() += nExtra/2;
- aTmpPos.Y() += pEntry->maSize.Height() / 2;
- if ( pEntry->mnBits & MIB_RADIOCHECK )
- {
- aTmpPos.X() = aPos.X() + mnCheckPos;
- eSymbol = SYMBOL_RADIOCHECKMARK;
- aTmpPos.Y() -= nFontHeight/4;
- aRect = Rectangle( aTmpPos, Size( nFontHeight/2, nFontHeight/2 ) );
- }
- else
- {
- aTmpPos.X() = aPos.X() + mnCheckPos;
- eSymbol = SYMBOL_CHECKMARK;
- aTmpPos.Y() -= nFontHeight/4;
- aRect = Rectangle( aTmpPos, Size( (nFontHeight*25)/40, nFontHeight/2 ) );
- }
- aDecoView.DrawSymbol( aRect, eSymbol, GetTextColor(), nSymbolStyle );
- }
- }
-
- if( pThisOnly && bHighlighted )
- SetTextColor( rSettings.GetMenuTextColor() );
- }
-
- aTopLeft.Y() += pEntry->maSize.Height();
- }
- }
-}
-
-void ToolbarMenu::Paint( const Rectangle& )
-{
- implPaint();
-
- if( mnHighlightedEntry != -1 )
- implHighlightEntry( mnHighlightedEntry, true );
-}
-
-void ToolbarMenu::RequestHelp( const HelpEvent& rHEvt )
-{
- Window::RequestHelp( rHEvt );
-}
-
-void ToolbarMenu::StateChanged( StateChangedType nType )
-{
- Control::StateChanged( nType );
-
- if ( ( nType == STATE_CHANGE_CONTROLFOREGROUND ) || ( nType == STATE_CHANGE_CONTROLBACKGROUND ) )
- {
- initWindow();
- Invalidate();
- }
-}
-
-void ToolbarMenu::DataChanged( const DataChangedEvent& rDCEvt )
-{
- Control::DataChanged( rDCEvt );
-
- if ( (rDCEvt.GetType() == DATACHANGED_FONTS) ||
- (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) ||
- ((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
- (rDCEvt.GetFlags() & SETTINGS_STYLE)) )
- {
- initWindow();
- Invalidate();
- }
-}
-
-void ToolbarMenu::Command( const CommandEvent& rCEvt )
-{
- if ( rCEvt.GetCommand() == COMMAND_WHEEL )
- {
- const CommandWheelData* pData = rCEvt.GetWheelData();
- if( !pData->GetModifier() && ( pData->GetMode() == COMMAND_WHEEL_SCROLL ) )
- {
- implCursorUpDown( pData->GetDelta() > 0L, false );
- }
- }
-}
diff --git a/svx/source/tbxctrls/toolbarmenu.hxx b/svx/source/tbxctrls/toolbarmenu.hxx
deleted file mode 100644
index 30f56c92b943..000000000000
--- a/svx/source/tbxctrls/toolbarmenu.hxx
+++ /dev/null
@@ -1,90 +0,0 @@
-#include <vcl/ctrl.hxx>
-
-#include <vector>
-
-class ToolbarMenuEntry;
-typedef std::vector< ToolbarMenuEntry * > ToolbarMenuEntryVector;
-
-class ToolbarMenu : public Control
-{
-private:
- ToolbarMenuEntryVector maEntryVector;
-
- int mnCheckPos;
- int mnImagePos;
- int mnTextPos;
-
- int mnHighlightedEntry;
- int mnSelectedEntry;
-
- Size maSize;
-
- Link maHighlightHdl;
- Link maSelectHdl;
-
- void StateChanged( StateChangedType nType );
- void DataChanged( const DataChangedEvent& rDCEvt );
-
- void initWindow();
-
- Size implCalcSize();
-
- void appendEntry( ToolbarMenuEntry* pEntry );
-
- void implPaint( ToolbarMenuEntry* pThisOnly = NULL, bool bHighlight = false );
-
- void implHighlightEntry( int nHighlightEntry, bool bHighlight );
- void implHighlightEntry( const MouseEvent& rMEvt, bool bMBDown );
-
- void implChangeHighlightEntry( int nEntry );
- void implSelectEntry( int nSelectedEntry );
-
- ToolbarMenuEntry* implCursorUpDown( bool bUp, bool bHomeEnd );
- ToolbarMenuEntry* implGetEntry( int nEntry ) const;
- ToolbarMenuEntry* implSearchEntry( int nEntryId ) const;
-
-public:
- ToolbarMenu( Window* pParent, WinBits nStyle );
- ~ToolbarMenu();
-
- virtual void MouseMove( const MouseEvent& rMEvt );
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void MouseButtonUp( const MouseEvent& rMEvt );
- virtual void KeyInput( const KeyEvent& rKEvent );
- virtual void Command( const CommandEvent& rCEvt );
- virtual void Paint( const Rectangle& rRect );
- virtual void RequestHelp( const HelpEvent& rHEvt );
- virtual void Resize();
- virtual void GetFocus();
- virtual void LoseFocus();
-
- void appendEntry( int nEntryId, const String& rStr, MenuItemBits nItemBits = 0 );
- void appendEntry( int nEntryId, const Image& rImage, MenuItemBits nItemBits = 0 );
- void appendEntry( int nEntryId, const String& rStr, const Image& rImage, MenuItemBits nItemBits = 0 );
- void appendEntry( int nEntryId, Control* pControl, MenuItemBits nItemBits = 0 );
- void appendEntry( int nEntryId, const String& rStr, Control* pControl, MenuItemBits nItemBits = 0 );
- void appendSeparator();
-
- void checkEntry( int nEntryId, bool bCheck = true );
- bool isEntryChecked( int nEntryId ) const;
-
- void enableEntry( int nEntryId, bool bEnable = true );
- bool isEntryEnabled( int nEntryId ) const;
-
- void setEntryText( int nEntryId, const String& rStr );
- const String& getEntryText( int nEntryId ) const;
-
- void setEntryImage( int nEntryId, const Image& rImage );
- const Image& getEntryImage( int nEntryId ) const;
-
- const Size& getMenuSize() const { return maSize; }
-
- void SetHighlightHdl( const Link& rLink ) { maHighlightHdl = rLink; }
- const Link& GetHighlightHdl() const { return maHighlightHdl; }
-
- void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
- const Link& GetSelectHdl() const { return maSelectHdl; }
-
- int getSelectedEntryId() const;
- int getHighlightedEntryId() const;
-};
diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx
index daf1f23d4442..3005289268b9 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -53,7 +53,8 @@
#include "chrtitem.hxx"
#include <svx/extrusionbar.hxx>
-#include "extrusioncontrols.hxx"
+#include "extrusiondepthdialog.hxx"
+
using namespace ::svx;
using namespace ::rtl;
diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx
index 5dd4814c6ab5..bf7a848d71c6 100644
--- a/svx/source/unodraw/unoctabl.cxx
+++ b/svx/source/unodraw/unoctabl.cxx
@@ -39,6 +39,7 @@
#include "recoveryui.hxx"
#include "xmlgrhlp.hxx"
#include "tbunocontroller.hxx"
+#include "tbunosearchcontrollers.hxx"
using namespace ::com::sun::star;
using namespace ::rtl;
@@ -233,9 +234,7 @@ uno::Reference< uno::XInterface > SAL_CALL create_EnhancedCustomShapeEngine( con
// export this service
//
-#ifndef SVX_LIGHT
#include "UnoGraphicExporter.hxx"
-#endif
#include "unogalthemeprovider.hxx"
#include <com/sun/star/registry/XRegistryKey.hpp>
#include "sal/types.h"
@@ -244,6 +243,15 @@ uno::Reference< uno::XInterface > SAL_CALL create_EnhancedCustomShapeEngine( con
#include "uno/lbnames.h"
#include <svx/sdr/primitive2d/primitiveFactory2d.hxx>
+/*
+namespace svx
+{
+extern OUString SAL_CALL ExtrusionDepthController_getImplementationName();
+extern uno::Reference< uno::XInterface > SAL_CALL ExtrusionDepthController_createInstance(const uno::Reference< lang::XMultiServiceFactory > &) throw( uno::RuntimeException );
+extern uno::Sequence< OUString > SAL_CALL ExtrusionDepthController_getSupportedServiceNames() throw( uno::RuntimeException );
+}
+*/
+
extern "C"
{
@@ -279,10 +287,14 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo (
writeInfo( pKey, SvxUnoColorTable::getImplementationName_Static(), SvxUnoColorTable::getSupportedServiceNames_Static() );
writeInfo( pKey, EnhancedCustomShapeEngine_getImplementationName(), EnhancedCustomShapeEngine_getSupportedServiceNames() );
writeInfo( pKey, svx::RecoveryUI::st_getImplementationName(), svx::RecoveryUI::st_getSupportedServiceNames() );
-#ifndef SVX_LIGHT
writeInfo( pKey, svx::GraphicExporter_getImplementationName(), svx::GraphicExporter_getSupportedServiceNames() );
-#endif
writeInfo( pKey, svx::FontHeightToolBoxControl::getImplementationName_Static(), svx::FontHeightToolBoxControl::getSupportedServiceNames_Static() );
+
+ writeInfo( pKey, svx::FindTextToolbarController::getImplementationName_Static(), svx::FindTextToolbarController::getSupportedServiceNames_Static() );
+ writeInfo( pKey, svx::DownSearchToolboxController::getImplementationName_Static(), svx::DownSearchToolboxController::getSupportedServiceNames_Static() );
+ writeInfo( pKey, svx::UpSearchToolboxController::getImplementationName_Static(), svx::UpSearchToolboxController::getSupportedServiceNames_Static() );
+ writeInfo( pKey, svx::FindbarDispatcher::getImplementationName_Static(), svx::FindbarDispatcher::getSupportedServiceNames_Static() );
+
writeInfo( pKey, ::unogallery::GalleryThemeProvider_getImplementationName(),::unogallery::GalleryThemeProvider_getSupportedServiceNames() );
// XPrimitiveFactory2D
@@ -292,6 +304,7 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo (
writeInfo( pKey, ::svx::SvXMLGraphicImportHelper_getImplementationName(),::svx::SvXMLGraphicImportHelper_getSupportedServiceNames() );
writeInfo( pKey, ::svx::SvXMLGraphicExportHelper_getImplementationName(),::svx::SvXMLGraphicExportHelper_getSupportedServiceNames() );
+// writeInfo( pKey, ::svx::ExtrusionDepthController_getImplementationName(),::svx::ExtrusionDepthController_getSupportedServiceNames() );
}
catch (registry::InvalidRegistryException &)
{
@@ -338,7 +351,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory (
svx::RecoveryUI::st_createInstance,
svx::RecoveryUI::st_getSupportedServiceNames() );
}
-#ifndef SVX_LIGHT
else if( svx::GraphicExporter_getImplementationName().equalsAscii( pImplName ) )
{
xFactory = ::cppu::createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
@@ -346,7 +358,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory (
svx::GraphicExporter_createInstance,
svx::GraphicExporter_getSupportedServiceNames() );
}
-#endif
else if ( svx::FontHeightToolBoxControl::getImplementationName_Static().equalsAscii( pImplName ) )
{
xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
@@ -354,6 +365,34 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory (
svx::FontHeightToolBoxControl_createInstance,
svx::FontHeightToolBoxControl::getSupportedServiceNames_Static() );
}
+ else if ( svx::FindTextToolbarController::getImplementationName_Static().equalsAscii( pImplName ) )
+ {
+ xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
+ svx::FindTextToolbarController::getImplementationName_Static(),
+ svx::FindTextToolbarController_createInstance,
+ svx::FindTextToolbarController::getSupportedServiceNames_Static() );
+ }
+ else if ( svx::DownSearchToolboxController::getImplementationName_Static().equalsAscii( pImplName ) )
+ {
+ xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
+ svx::DownSearchToolboxController::getImplementationName_Static(),
+ svx::DownSearchToolboxController_createInstance,
+ svx::DownSearchToolboxController::getSupportedServiceNames_Static() );
+ }
+ else if ( svx::UpSearchToolboxController::getImplementationName_Static().equalsAscii( pImplName ) )
+ {
+ xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
+ svx::UpSearchToolboxController::getImplementationName_Static(),
+ svx::UpSearchToolboxController_createInstance,
+ svx::UpSearchToolboxController::getSupportedServiceNames_Static() );
+ }
+ else if ( svx::FindbarDispatcher::getImplementationName_Static().equalsAscii( pImplName ) )
+ {
+ xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
+ svx::FindbarDispatcher::getImplementationName_Static(),
+ svx::FindbarDispatcher_createInstance,
+ svx::FindbarDispatcher::getSupportedServiceNames_Static() );
+ }
else if( ::unogallery::GalleryThemeProvider_getImplementationName().equalsAscii( pImplName ) )
{
xFactory = ::cppu::createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
@@ -385,7 +424,16 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory (
::svx::SvXMLGraphicExportHelper_createInstance,
::svx::SvXMLGraphicExportHelper_getSupportedServiceNames() );
}
-
+/*
+ else if( ::svx::ExtrusionDepthController_getImplementationName().equalsAscii( pImplName ) )
+ {
+ xFactory = ::cppu::createSingleFactory(
+ reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
+ ::svx::ExtrusionDepthController_getImplementationName(),
+ ::svx::ExtrusionDepthController_createInstance,
+ ::svx::ExtrusionDepthController_getSupportedServiceNames() );
+ }
+*/
if( xFactory.is())
{
xFactory->acquire();
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 9fea6a6fda5d..9d5e1695c5cb 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -654,11 +654,17 @@ void SvxDrawPage::GetTypeAndInventor( sal_uInt16& rType, sal_uInt32& rInventor,
if( nTempType == UHASHMAP_NOTFOUND )
{
- if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TableShape")) )
+ if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TableShape")) ||
+ aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.TableShape")) )
{
rInventor = SdrInventor;
rType = OBJ_TABLE;
}
+ else if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.MediaShape" )) )
+ {
+ rInventor = SdrInventor;
+ rType = OBJ_MEDIA;
+ }
}
else if(nTempType & E3D_INVENTOR_FLAG)
{
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 13b8e758ce12..d860f4973fd2 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2771,6 +2771,16 @@ bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper
}
break;
}
+ case SDRATTR_OBJVISIBLE:
+ {
+ sal_Bool bVisible = sal_Bool();
+ if( rValue >>= bVisible )
+ {
+ mpObj->SetVisible(bVisible);
+ return true;
+ }
+ break;
+ }
case SDRATTR_OBJSIZEPROTECT:
{
sal_Bool bResizeProtect = sal_Bool();
@@ -3147,11 +3157,15 @@ bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper
}
case SDRATTR_OBJPRINTABLE:
- rValue = uno::makeAny( (sal_Bool) mpObj->IsPrintable() );
+ rValue <<= static_cast<sal_Bool>( mpObj->IsPrintable() );
+ break;
+
+ case SDRATTR_OBJVISIBLE:
+ rValue <<= static_cast<sal_Bool>( mpObj->IsVisible() );
break;
case SDRATTR_OBJSIZEPROTECT:
- rValue = uno::makeAny( (sal_Bool)mpObj->IsResizeProtect() );
+ rValue <<= static_cast<sal_Bool>( mpObj->IsResizeProtect() );
break;
case OWN_ATTR_PAGE_NUMBER:
diff --git a/svx/uiconfig/accelerator/default.xml b/svx/uiconfig/accelerator/default.xml
deleted file mode 100644
index dafd9e022f12..000000000000
--- a/svx/uiconfig/accelerator/default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_S" accel:shift="true" accel:mod1="true" xlink:href=".uno:SaveAs"/>
- <accel:item accel:code="KEY_Y" accel:shift="true" accel:mod1="true" xlink:href=".uno:Repeat"/>
-</accel:acceleratorlist>
diff --git a/svx/uiconfig/accelerator/en-US/default.xml b/svx/uiconfig/accelerator/en-US/default.xml
deleted file mode 100644
index 67a6e9127c8a..000000000000
--- a/svx/uiconfig/accelerator/en-US/default.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_Q" accel:mod1="true" xlink:href=".uno:Quit"/>
- <accel:item accel:code="KEY_N" accel:shift="true" accel:mod1="true" xlink:href=".uno:NewDoc"/>
- <accel:item accel:code="KEY_O" accel:mod1="true" xlink:href=".uno:Open"/>
- <accel:item accel:code="KEY_OPEN" xlink:href=".uno:Open"/>
- <accel:item accel:code="KEY_P" accel:mod1="true" xlink:href=".uno:Print"/>
- <accel:item accel:code="KEY_S" accel:mod1="true" xlink:href=".uno:Save"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" xlink:href=".uno:AddDirect"/>
- <accel:item accel:code="KEY_W" accel:mod1="true" xlink:href=".uno:CloseWin"/>
- <accel:item accel:code="KEY_F4" accel:mod1="true" xlink:href=".uno:CloseWin"/>
- <accel:item accel:code="KEY_X" accel:mod1="true" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_CUT" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_C" accel:mod1="true" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_INSERT" accel:mod1="true" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_COPY" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_V" accel:mod1="true" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_INSERT" accel:shift="true" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_PASTE" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_DELETE" xlink:href=".uno:Delete"/>
- <accel:item accel:code="KEY_A" accel:mod1="true" xlink:href=".uno:SelectAll"/>
- <accel:item accel:code="KEY_F" accel:mod1="true" xlink:href=".uno:SearchDialog"/>
- <accel:item accel:code="KEY_Q" accel:shift="true" accel:mod1="true" xlink:href=".uno:BasicBreak"/>
- <accel:item accel:code="KEY_F4" xlink:href=".uno:ViewDataSourceBrowser"/>
- <accel:item accel:code="KEY_F5" accel:mod1="true" xlink:href=".uno:GrabControlFocus"/>
- <accel:item accel:code="KEY_F7" accel:shift="true" accel:mod1="true" xlink:href=".uno:HangulHanjaConversion"/>
- <accel:item accel:code="KEY_F11" accel:mod2="true" xlink:href=".uno:MacroDialog"/>
-</accel:acceleratorlist>
diff --git a/svx/uiconfig/accelerator/es/default.xml b/svx/uiconfig/accelerator/es/default.xml
deleted file mode 100644
index 71ba6212d275..000000000000
--- a/svx/uiconfig/accelerator/es/default.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_Q" accel:mod1="true" xlink:href=".uno:Quit"/>
- <accel:item accel:code="KEY_N" accel:shift="true" accel:mod1="true" xlink:href=".uno:NewDoc"/>
- <accel:item accel:code="KEY_A" accel:mod1="true" xlink:href=".uno:Open"/>
- <accel:item accel:code="KEY_OPEN" xlink:href=".uno:Open"/>
- <accel:item accel:code="KEY_P" accel:mod1="true" xlink:href=".uno:Print"/>
- <accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:Save"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:AddDirect"/>
- <accel:item accel:code="KEY_W" accel:mod1="true" xlink:href=".uno:CloseWin"/>
- <accel:item accel:code="KEY_F4" accel:mod1="true" xlink:href=".uno:CloseWin"/>
- <accel:item accel:code="KEY_X" accel:mod1="true" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_CUT" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_C" accel:mod1="true" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_INSERT" accel:mod1="true" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_COPY" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_V" accel:mod1="true" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_INSERT" accel:shift="true" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_PASTE" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_DELETE" xlink:href=".uno:Delete"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:SelectAll"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:SearchDialog"/>
- <accel:item accel:code="KEY_Q" accel:shift="true" accel:mod1="true" xlink:href=".uno:BasicBreak"/>
- <accel:item accel:code="KEY_F4" xlink:href=".uno:ViewDataSourceBrowser"/>
- <accel:item accel:code="KEY_F5" accel:mod1="true" xlink:href=".uno:GrabControlFocus"/>
- <accel:item accel:code="KEY_F7" accel:shift="true" accel:mod1="true" xlink:href=".uno:HangulHanjaConversion"/>
- <accel:item accel:code="KEY_F11" accel:mod2="true" xlink:href=".uno:MacroDialog"/>
-</accel:acceleratorlist>
diff --git a/svx/util/makefile.mk b/svx/util/makefile.mk
index 0006fa2ff5fe..050decc8d4f5 100644
--- a/svx/util/makefile.mk
+++ b/svx/util/makefile.mk
@@ -45,6 +45,10 @@ SHL1TARGET= svxcore$(DLLPOSTFIX)
SHL1IMPLIB= isvxcore
SHL1USE_EXPORTS=name
+SHL1OBJS= \
+ $(SLO)$/coreservices.obj
+
+
SHL1LIBS= \
$(SLB)$/animation.lib \
$(SLB)$/attribute.lib \
diff --git a/svx/workben/msview/msview.cxx b/svx/workben/msview/msview.cxx
index 32d556b31626..baee57ad75dc 100644
--- a/svx/workben/msview/msview.cxx
+++ b/svx/workben/msview/msview.cxx
@@ -34,7 +34,7 @@
#include <boost/shared_ptr.hpp>
#include <sot/storage.hxx>
#ifndef _SVTOOLS_HRC
-#include <svl/svtools.hrc>
+#include <svtools/svtools.hrc>
#endif
#include <sal/main.h>
diff --git a/ucb/prj/build.lst b/ucb/prj/build.lst
index a4d7ef6b4f6b..dad79213047e 100644
--- a/ucb/prj/build.lst
+++ b/ucb/prj/build.lst
@@ -1,4 +1,4 @@
-uc ucb : cppuhelper CURL:curl OPENSSL:openssl NEON:neon LIBXML2:libxml2 offapi sal salhelper ucbhelper udkapi comphelper NULL
+uc ucb : cppuhelper CURL:curl OPENSSL:openssl NEON:neon LIBXML2:libxml2 offapi sal salhelper ucbhelper udkapi comphelper tools NULL
uc ucb usr1 - all uc_mkout NULL
uc ucb\inc nmake - all uc_inc NULL
uc ucb\source\regexp nmake - all uc_regexp uc_inc NULL
@@ -14,4 +14,5 @@ uc ucb\source\ucp\webdav nmake - all uc_webdav uc_inc NULL
uc ucb\source\ucp\package nmake - all uc_package uc_inc NULL
uc ucb\source\ucp\tdoc nmake - all uc_tdoc uc_inc NULL
uc ucb\source\ucp\expand nmake - all uc_expand uc_inc NULL
+uc ucb\source\ucp\ext nmake - all uc_ext uc_inc NULL
uc ucb\qa\unoapi nmake - all uc_qa_unoapi NULL
diff --git a/ucb/source/ucp/ext/makefile.mk b/ucb/source/ucp/ext/makefile.mk
new file mode 100644
index 000000000000..23c30b3bda5b
--- /dev/null
+++ b/ucb/source/ucp/ext/makefile.mk
@@ -0,0 +1,65 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.4 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General 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 = ucb
+TARGET = ucpext.uno
+ENABLE_EXCEPTIONS = TRUE
+
+.INCLUDE : settings.mk
+DLLPRE =
+
+SLOFILES= \
+ $(SLO)$/ucpext_provider.obj \
+ $(SLO)$/ucpext_content.obj \
+ $(SLO)$/ucpext_services.obj \
+ $(SLO)$/ucpext_resultset.obj \
+ $(SLO)$/ucpext_datasupplier.obj
+
+SHL1STDLIBS = \
+ $(UCBHELPERLIB) \
+ $(COMPHELPERLIB) \
+ $(CPPUHELPERLIB) \
+ $(CPPULIB) \
+ $(SALLIB) \
+ $(SALHELPERLIB)
+
+SHL1VERSIONMAP = $(SOLARENV)/src/component.map
+SHL1TARGET = $(TARGET)
+
+SHL1DEPN =
+SHL1IMPLIB = i$(TARGET)
+SHL1LIBS = $(SLB)$/$(TARGET).lib
+SHL1DEF = $(MISC)$/$(SHL1TARGET).def
+
+DEF1NAME = $(SHL1TARGET)
+
+.INCLUDE : target.mk
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
new file mode 100644
index 000000000000..7b7ada742840
--- /dev/null
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -0,0 +1,672 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_ucb.hxx"
+
+#include "ucpext_content.hxx"
+
+#include "ucpext_content.hxx"
+#include "ucpext_provider.hxx"
+#include "ucpext_resultset.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/beans/XPropertyAccess.hpp>
+#include <com/sun/star/lang/IllegalAccessException.hpp>
+#include <com/sun/star/sdbc/XRow.hpp>
+#include <com/sun/star/ucb/XCommandInfo.hpp>
+#include <com/sun/star/ucb/XPersistentPropertySet.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/io/XActiveDataSink.hpp>
+#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
+#include <com/sun/star/ucb/OpenMode.hpp>
+#include <com/sun/star/ucb/UnsupportedDataSinkException.hpp>
+#include <com/sun/star/ucb/UnsupportedOpenModeException.hpp>
+#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
+#include <com/sun/star/ucb/OpenMode.hpp>
+#include <com/sun/star/ucb/XDynamicResultSet.hpp>
+#include <com/sun/star/lang/IllegalAccessException.hpp>
+#include <com/sun/star/deployment/XPackageInformationProvider.hpp>
+/** === end UNO includes === **/
+
+#include <ucbhelper/contentidentifier.hxx>
+#include <ucbhelper/propertyvalueset.hxx>
+#include <ucbhelper/cancelcommandexecution.hxx>
+#include <ucbhelper/content.hxx>
+#include <tools/diagnose_ex.h>
+#include <comphelper/string.hxx>
+#include <comphelper/componentcontext.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <rtl/uri.hxx>
+
+#include <algorithm>
+
+//......................................................................................................................
+namespace ucb { namespace ucp { namespace ext
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::lang::XMultiServiceFactory;
+ using ::com::sun::star::ucb::XContentIdentifier;
+ using ::com::sun::star::ucb::IllegalIdentifierException;
+ using ::com::sun::star::ucb::XContent;
+ using ::com::sun::star::ucb::XCommandEnvironment;
+ using ::com::sun::star::ucb::Command;
+ using ::com::sun::star::ucb::CommandAbortedException;
+ using ::com::sun::star::beans::Property;
+ using ::com::sun::star::lang::IllegalArgumentException;
+ using ::com::sun::star::beans::PropertyValue;
+ using ::com::sun::star::ucb::OpenCommandArgument2;
+ using ::com::sun::star::ucb::XDynamicResultSet;
+ using ::com::sun::star::ucb::UnsupportedOpenModeException;
+ using ::com::sun::star::io::XOutputStream;
+ using ::com::sun::star::io::XActiveDataSink;
+ using ::com::sun::star::io::XInputStream;
+ using ::com::sun::star::ucb::UnsupportedDataSinkException;
+ using ::com::sun::star::ucb::UnsupportedCommandException;
+ using ::com::sun::star::sdbc::XRow;
+ using ::com::sun::star::beans::XPropertySet;
+ using ::com::sun::star::beans::PropertyChangeEvent;
+ using ::com::sun::star::lang::IllegalAccessException;
+ using ::com::sun::star::ucb::CommandInfo;
+ using ::com::sun::star::deployment::XPackageInformationProvider;
+ /** === end UNO using === **/
+ namespace OpenMode = ::com::sun::star::ucb::OpenMode;
+ namespace PropertyAttribute = ::com::sun::star::beans::PropertyAttribute;
+
+ //==================================================================================================================
+ //= helper
+ //==================================================================================================================
+ namespace
+ {
+ //--------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString lcl_compose( const ::rtl::OUString& i_rBaseURL, const ::rtl::OUString& i_rRelativeURL )
+ {
+ ENSURE_OR_RETURN( i_rBaseURL.getLength(), "illegal base URL", i_rRelativeURL );
+
+ ::rtl::OUStringBuffer aComposer( i_rBaseURL );
+ if ( i_rBaseURL.getStr()[ i_rBaseURL.getLength() - 1 ] != '/' )
+ aComposer.append( sal_Unicode( '/' ) );
+ aComposer.append( i_rRelativeURL );
+ return aComposer.makeStringAndClear();
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ struct SelectPropertyName : public ::std::unary_function< Property, ::rtl::OUString >
+ {
+ const ::rtl::OUString& operator()( const Property& i_rProperty ) const
+ {
+ return i_rProperty.Name;
+ }
+ };
+ }
+
+ //==================================================================================================================
+ //= Content
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ Content::Content( const Reference< XMultiServiceFactory >& i_rORB, ::ucbhelper::ContentProviderImplHelper* i_pProvider,
+ const Reference< XContentIdentifier >& i_rIdentifier )
+ :Content_Base( i_rORB, i_pProvider, i_rIdentifier )
+ ,m_eExtContentType( E_UNKNOWN )
+ ,m_aIsFolder()
+ ,m_aContentType()
+ ,m_sExtensionId()
+ ,m_sPathIntoExtension()
+ {
+ const ::rtl::OUString sURL( getIdentifier()->getContentIdentifier() );
+ if ( denotesRootContent( sURL ) )
+ {
+ m_eExtContentType = E_ROOT;
+ }
+ else
+ {
+ const ::rtl::OUString sRelativeURL( sURL.copy( ContentProvider::getRootURL().getLength() ) );
+ const sal_Int32 nSepPos = sRelativeURL.indexOf( '/' );
+ if ( ( nSepPos == -1 ) || ( nSepPos == sRelativeURL.getLength() - 1 ) )
+ {
+ m_eExtContentType = E_EXTENSION_ROOT;
+ }
+ else
+ {
+ m_eExtContentType = E_EXTENSION_CONTENT;
+ }
+ }
+
+ if ( m_eExtContentType != E_ROOT )
+ {
+ const ::rtl::OUString sRootURL = ContentProvider::getRootURL();
+ m_sExtensionId = sURL.copy( sRootURL.getLength() );
+
+ const sal_Int32 nNextSep = m_sExtensionId.indexOf( '/' );
+ if ( nNextSep > -1 )
+ {
+ m_sPathIntoExtension = m_sExtensionId.copy( nNextSep + 1 );
+ m_sExtensionId = m_sExtensionId.copy( 0, nNextSep );
+ }
+ m_sExtensionId = Content::decodeIdentifier( m_sExtensionId );
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Content::~Content()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL Content::getImplementationName() throw( RuntimeException )
+ {
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.ucp.ext.Content" ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL Content::getSupportedServiceNames() throw( RuntimeException )
+ {
+ Sequence< ::rtl::OUString > aServiceNames(2);
+ aServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.Content" ) );
+ aServiceNames[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.ExtensionContent" ) );
+ return aServiceNames;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL Content::getContentType() throw( RuntimeException )
+ {
+ impl_determineContentType();
+ return *m_aContentType;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Any SAL_CALL Content::execute( const Command& aCommand, sal_Int32 /* CommandId */, const Reference< XCommandEnvironment >& i_rEvironment )
+ throw( Exception, CommandAbortedException, RuntimeException )
+ {
+ Any aRet;
+
+ if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getPropertyValues" ) ) )
+ {
+ Sequence< Property > Properties;
+ if ( !( aCommand.Argument >>= Properties ) )
+ {
+ ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException(
+ ::rtl::OUString(), *this, -1 ) ),
+ i_rEvironment );
+ // unreachable
+ }
+
+ aRet <<= getPropertyValues( Properties, i_rEvironment );
+ }
+ else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "setPropertyValues" ) ) )
+ {
+ Sequence< PropertyValue > aProperties;
+ if ( !( aCommand.Argument >>= aProperties ) )
+ {
+ ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException(
+ ::rtl::OUString(), *this, -1 ) ),
+ i_rEvironment );
+ // unreachable
+ }
+
+ if ( !aProperties.getLength() )
+ {
+ ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException(
+ ::rtl::OUString(), *this, -1 ) ),
+ i_rEvironment );
+ // unreachable
+ }
+
+ aRet <<= setPropertyValues( aProperties, i_rEvironment );
+ }
+ else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getPropertySetInfo" ) ) )
+ {
+ // implemented by base class.
+ aRet <<= getPropertySetInfo( i_rEvironment );
+ }
+ else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getCommandInfo" ) ) )
+ {
+ // implemented by base class.
+ aRet <<= getCommandInfo( i_rEvironment );
+ }
+ else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "open" ) ) )
+ {
+ OpenCommandArgument2 aOpenCommand;
+ if ( !( aCommand.Argument >>= aOpenCommand ) )
+ {
+ ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException(
+ ::rtl::OUString(), *this, -1 ) ),
+ i_rEvironment );
+ // unreachable
+ }
+
+ sal_Bool bOpenFolder =
+ ( ( aOpenCommand.Mode == OpenMode::ALL ) ||
+ ( aOpenCommand.Mode == OpenMode::FOLDERS ) ||
+ ( aOpenCommand.Mode == OpenMode::DOCUMENTS ) );
+
+
+ if ( bOpenFolder && impl_isFolder() )
+ {
+ Reference< XDynamicResultSet > xSet = new ResultSet(
+ m_xSMgr, this, aOpenCommand, i_rEvironment );
+ aRet <<= xSet;
+ }
+
+ if ( aOpenCommand.Sink.is() )
+ {
+ const ::rtl::OUString sPhysicalContentURL( getPhysicalURL() );
+ ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEvironment );
+ aRet = aRequestedContent.executeCommand( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ), makeAny( aOpenCommand ) );
+ }
+ }
+
+ else
+ {
+ ::ucbhelper::cancelCommandExecution( makeAny( UnsupportedCommandException(
+ ::rtl::OUString(), *this ) ),
+ i_rEvironment );
+ // unreachable
+ }
+
+ return aRet;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL Content::abort( sal_Int32 ) throw( RuntimeException )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString Content::encodeIdentifier( const ::rtl::OUString& i_rIdentifier )
+ {
+ return ::rtl::Uri::encode( i_rIdentifier, rtl_UriCharClassRegName, rtl_UriEncodeIgnoreEscapes,
+ RTL_TEXTENCODING_UTF8 );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString Content::decodeIdentifier( const ::rtl::OUString& i_rIdentifier )
+ {
+ return ::rtl::Uri::decode( i_rIdentifier, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool Content::denotesRootContent( const ::rtl::OUString& i_rContentIdentifier )
+ {
+ const ::rtl::OUString sRootURL( ContentProvider::getRootURL() );
+ if ( i_rContentIdentifier == sRootURL )
+ return true;
+
+ // the root URL contains only two trailing /, but we also recognize 3 of them as denoting the root URL
+ if ( i_rContentIdentifier.match( sRootURL )
+ && ( i_rContentIdentifier.getLength() == sRootURL.getLength() + 1 )
+ && ( i_rContentIdentifier[ i_rContentIdentifier.getLength() - 1 ] == '/' )
+ )
+ return true;
+
+ return false;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString Content::getParentURL()
+ {
+ const ::rtl::OUString sRootURL( ContentProvider::getRootURL() );
+
+ switch ( m_eExtContentType )
+ {
+ case E_ROOT:
+ // don't have a parent
+ return sRootURL;
+
+ case E_EXTENSION_ROOT:
+ // our parent is the root itself
+ return sRootURL;
+
+ case E_EXTENSION_CONTENT:
+ {
+ const ::rtl::OUString sURL = m_xIdentifier->getContentIdentifier();
+
+ // cut the root URL
+ ENSURE_OR_BREAK( sURL.match( sRootURL, 0 ), "illegal URL structure - no root" );
+ ::rtl::OUString sRelativeURL( sURL.copy( sRootURL.getLength() ) );
+
+ // cut the extension ID
+ const ::rtl::OUString sSeparatedExtensionId( encodeIdentifier( m_sExtensionId ) + ::rtl::OUString( sal_Unicode( '/' ) ) );
+ ENSURE_OR_BREAK( sRelativeURL.match( sSeparatedExtensionId ), "illegal URL structure - no extension ID" );
+ sRelativeURL = sRelativeURL.copy( sSeparatedExtensionId.getLength() );
+
+ // cut the final slash (if any)
+ ENSURE_OR_BREAK( sRelativeURL.getLength(), "illegal URL structure - ExtensionContent should have a level below the extension ID" );
+ if ( sRelativeURL.getStr()[ sRelativeURL.getLength() - 1 ] == '/' )
+ sRelativeURL = sRelativeURL.copy( 0, sRelativeURL.getLength() - 1 );
+
+ // remove the last segment
+ const sal_Int32 nLastSep = sRelativeURL.lastIndexOf( '/' );
+ sRelativeURL = sRelativeURL.copy( 0, nLastSep != -1 ? nLastSep : 0 );
+
+ ::rtl::OUStringBuffer aComposer;
+ aComposer.append( sRootURL );
+ aComposer.append( sSeparatedExtensionId );
+ aComposer.append( sRelativeURL );
+ return aComposer.makeStringAndClear();
+ }
+
+ default:
+ OSL_ENSURE( false, "Content::getParentURL: unhandled case!" );
+ break;
+ }
+ return ::rtl::OUString();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XRow > Content::getArtificialNodePropertyValues( const Reference< XMultiServiceFactory >& i_rORB,
+ const Sequence< Property >& i_rProperties, const ::rtl::OUString& i_rTitle )
+ {
+ // note: empty sequence means "get values of all supported properties".
+ ::rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( i_rORB );
+
+ const sal_Int32 nCount = i_rProperties.getLength();
+ if ( nCount )
+ {
+ Reference< XPropertySet > xAdditionalPropSet;
+
+ const Property* pProps = i_rProperties.getConstArray();
+ for ( sal_Int32 n = 0; n < nCount; ++n )
+ {
+ const Property& rProp = pProps[ n ];
+
+ // Process Core properties.
+ if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ContentType" ) ) )
+ {
+ xRow->appendString ( rProp, ContentProvider::getArtificialNodeContentType() );
+ }
+ else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) )
+ {
+ xRow->appendString ( rProp, i_rTitle );
+ }
+ else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) )
+ {
+ xRow->appendBoolean( rProp, sal_False );
+ }
+ else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) ) )
+ {
+ xRow->appendBoolean( rProp, sal_True );
+ }
+ else
+ {
+ // append empty entry.
+ xRow->appendVoid( rProp );
+ }
+ }
+ }
+ else
+ {
+ // Append all Core Properties.
+ xRow->appendString ( Property( ::rtl::OUString::createFromAscii( "ContentType" ),
+ -1,
+ getCppuType( static_cast< const ::rtl::OUString * >( 0 ) ),
+ PropertyAttribute::BOUND | PropertyAttribute::READONLY ),
+ ContentProvider::getArtificialNodeContentType() );
+ xRow->appendString ( Property( ::rtl::OUString::createFromAscii( "Title" ),
+ -1,
+ getCppuType( static_cast< const ::rtl::OUString * >( 0 ) ),
+ PropertyAttribute::BOUND | PropertyAttribute::READONLY ),
+ i_rTitle );
+ xRow->appendBoolean( Property( ::rtl::OUString::createFromAscii( "IsDocument" ),
+ -1,
+ getCppuBooleanType(),
+ PropertyAttribute::BOUND | PropertyAttribute::READONLY ),
+ sal_False );
+ xRow->appendBoolean( Property( ::rtl::OUString::createFromAscii( "IsFolder" ),
+ -1,
+ getCppuBooleanType(),
+ PropertyAttribute::BOUND | PropertyAttribute::READONLY ),
+ sal_True );
+ }
+
+ return Reference< XRow >( xRow.get() );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString Content::getPhysicalURL() const
+ {
+ ENSURE_OR_RETURN( m_eExtContentType != E_ROOT, "illegal call", ::rtl::OUString() );
+
+ // create an ucb::XContent for the physical file within the deployed extension
+ const ::comphelper::ComponentContext aContext( m_xSMgr );
+ const Reference< XPackageInformationProvider > xPackageInfo(
+ aContext.getSingleton( "com.sun.star.deployment.PackageInformationProvider" ), UNO_QUERY_THROW );
+ const ::rtl::OUString sPackageLocation( xPackageInfo->getPackageLocation( m_sExtensionId ) );
+
+ if ( m_sPathIntoExtension.getLength() == 0 )
+ return sPackageLocation;
+ return lcl_compose( sPackageLocation, m_sPathIntoExtension );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XRow > Content::getPropertyValues( const Sequence< Property >& i_rProperties, const Reference< XCommandEnvironment >& i_rEnv )
+ {
+ ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex );
+
+ switch ( m_eExtContentType )
+ {
+ case E_ROOT:
+ return getArtificialNodePropertyValues( m_xSMgr, i_rProperties, ContentProvider::getRootURL() );
+ case E_EXTENSION_ROOT:
+ return getArtificialNodePropertyValues( m_xSMgr, i_rProperties, m_sExtensionId );
+ case E_EXTENSION_CONTENT:
+ {
+ const ::rtl::OUString sPhysicalContentURL( getPhysicalURL() );
+ ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEnv );
+
+ // translate the property request
+ Sequence< ::rtl::OUString > aPropertyNames( i_rProperties.getLength() );
+ ::std::transform(
+ i_rProperties.getConstArray(),
+ i_rProperties.getConstArray() + i_rProperties.getLength(),
+ aPropertyNames.getArray(),
+ SelectPropertyName()
+ );
+ const Sequence< Any > aPropertyValues = aRequestedContent.getPropertyValues( aPropertyNames );
+ const ::rtl::Reference< ::ucbhelper::PropertyValueSet > xValueRow = new ::ucbhelper::PropertyValueSet( m_xSMgr );
+ sal_Int32 i=0;
+ for ( const Any* value = aPropertyValues.getConstArray();
+ value != aPropertyValues.getConstArray() + aPropertyValues.getLength();
+ ++value, ++i
+ )
+ {
+ xValueRow->appendObject( aPropertyNames[i], *value );
+ }
+ return xValueRow.get();
+ }
+
+ default:
+ OSL_ENSURE( false, "Content::getPropertyValues: unhandled case!" );
+ break;
+ }
+
+ OSL_ENSURE( false, "Content::getPropertyValues: unreachable!" );
+ return NULL;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< Any > Content::setPropertyValues( const Sequence< PropertyValue >& i_rValues, const Reference< XCommandEnvironment >& /* xEnv */)
+ {
+ ::osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex );
+
+ Sequence< Any > aRet( i_rValues.getLength() );
+ Sequence< PropertyChangeEvent > aChanges( i_rValues.getLength() );
+
+ PropertyChangeEvent aEvent;
+ aEvent.Source = static_cast< cppu::OWeakObject * >( this );
+ aEvent.Further = sal_False;
+ aEvent.PropertyHandle = -1;
+
+ const PropertyValue* pValues = i_rValues.getConstArray();
+ const sal_Int32 nCount = i_rValues.getLength();
+
+ for ( sal_Int32 n = 0; n < nCount; ++n, ++pValues )
+ {
+ // all our properties are read-only ...
+ aRet[ n ] <<= IllegalAccessException( ::rtl::OUString::createFromAscii( "property is read-only." ), *this );
+ }
+
+ return aRet;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< CommandInfo > Content::getCommands( const Reference< XCommandEnvironment > & /*xEnv*/ )
+ {
+ sal_uInt32 nCommandCount = 5;
+ static const CommandInfo aCommandInfoTable[] =
+ {
+ ///////////////////////////////////////////////////////////////
+ // Mandatory commands
+ ///////////////////////////////////////////////////////////////
+ CommandInfo(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ),
+ -1,
+ getCppuVoidType()
+ ),
+ CommandInfo(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ),
+ -1,
+ getCppuVoidType()
+ ),
+ CommandInfo(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ),
+ -1,
+ getCppuType(
+ static_cast< Sequence< Property > * >( 0 ) )
+ ),
+ CommandInfo(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ),
+ -1,
+ getCppuType(
+ static_cast< Sequence< PropertyValue > * >( 0 ) )
+ )
+ ///////////////////////////////////////////////////////////////
+ // Optional standard commands
+ ///////////////////////////////////////////////////////////////
+ , CommandInfo(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ),
+ -1,
+ getCppuType( static_cast< OpenCommandArgument2 * >( 0 ) )
+ )
+ };
+
+ return Sequence< CommandInfo >( aCommandInfoTable, nCommandCount );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< Property > Content::getProperties( const Reference< XCommandEnvironment > & /*xEnv*/ )
+ {
+ static Property aProperties[] =
+ {
+ Property(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ),
+ -1,
+ getCppuType( static_cast< const ::rtl::OUString * >( 0 ) ),
+ PropertyAttribute::BOUND | PropertyAttribute::READONLY
+ ),
+ Property(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ),
+ -1,
+ getCppuBooleanType(),
+ PropertyAttribute::BOUND | PropertyAttribute::READONLY
+ ),
+ Property(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ),
+ -1,
+ getCppuBooleanType(),
+ PropertyAttribute::BOUND | PropertyAttribute::READONLY
+ ),
+ Property(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ),
+ -1,
+ getCppuType( static_cast< const ::rtl::OUString * >( 0 ) ),
+ PropertyAttribute::BOUND | PropertyAttribute::READONLY
+ )
+ };
+ return Sequence< Property >( aProperties, sizeof( aProperties ) / sizeof( aProperties[0] ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool Content::impl_isFolder()
+ {
+ if ( !!m_aIsFolder )
+ return *m_aIsFolder;
+
+ bool bIsFolder = false;
+ try
+ {
+ Sequence< Property > aProps(1);
+ aProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) );
+ Reference< XRow > xRow( getPropertyValues( aProps, NULL ), UNO_SET_THROW );
+ bIsFolder = xRow->getBoolean(1);
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ m_aIsFolder.reset( bIsFolder );
+ return *m_aIsFolder;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void Content::impl_determineContentType()
+ {
+ if ( !!m_aContentType )
+ return;
+
+ m_aContentType.reset( ContentProvider::getArtificialNodeContentType() );
+ if ( m_eExtContentType == E_EXTENSION_CONTENT )
+ {
+ try
+ {
+ Sequence< Property > aProps(1);
+ aProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) );
+ Reference< XRow > xRow( getPropertyValues( aProps, NULL ), UNO_SET_THROW );
+ m_aContentType.reset( xRow->getString(1) );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+ }
+
+//......................................................................................................................
+} } } // namespace ucp::ext
+//......................................................................................................................
diff --git a/ucb/source/ucp/ext/ucpext_content.hxx b/ucb/source/ucp/ext/ucpext_content.hxx
new file mode 100644
index 000000000000..36380d8a7d68
--- /dev/null
+++ b/ucb/source/ucp/ext/ucpext_content.hxx
@@ -0,0 +1,154 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+
+#ifndef UCB_UCPEXT_CONTENT_HXX
+#define UCB_UCPEXT_CONTENT_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/sdbc/XRow.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+/** === end UNO includes === **/
+
+#include <rtl/ref.hxx>
+#include <ucbhelper/contenthelper.hxx>
+
+#include <list>
+#include <boost/optional.hpp>
+
+//......................................................................................................................
+namespace ucb { namespace ucp { namespace ext
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= ExtensionContentType
+ //==================================================================================================================
+ enum ExtensionContentType
+ {
+ E_ROOT,
+ E_EXTENSION_ROOT,
+ E_EXTENSION_CONTENT,
+
+ E_UNKNOWN
+ };
+
+ //==================================================================================================================
+ //= ContentProvider
+ //==================================================================================================================
+ typedef ::ucbhelper::ContentImplHelper Content_Base;
+ class Content : public Content_Base
+ {
+ public:
+ Content(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ ::ucbhelper::ContentProviderImplHelper* pProvider,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentIdentifier >& Identifier
+ );
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >
+ getArtificialNodePropertyValues(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMgr,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& rProperties,
+ const ::rtl::OUString& rTitle
+ );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >
+ getPropertyValues(
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& rProperties,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& xEnv
+ );
+
+ static ::rtl::OUString
+ encodeIdentifier( const ::rtl::OUString& i_rIdentifier );
+ static ::rtl::OUString
+ decodeIdentifier( const ::rtl::OUString& i_rIdentifier );
+
+ virtual ::rtl::OUString getParentURL();
+
+ ExtensionContentType getExtensionContentType() const { return m_eExtContentType; }
+
+ /** retrieves the URL of the underlying physical content. Not to be called when getExtensionContentType()
+ returns E_ROOT.
+ */
+ ::rtl::OUString getPhysicalURL() const;
+
+ protected:
+ virtual ~Content();
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XContent
+ virtual rtl::OUString SAL_CALL getContentType() throw( com::sun::star::uno::RuntimeException );
+
+ // XCommandProcessor
+ virtual com::sun::star::uno::Any SAL_CALL
+ execute(
+ const com::sun::star::ucb::Command& aCommand,
+ sal_Int32 CommandId,
+ const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& Environment
+ )
+ throw ( ::com::sun::star::uno::Exception
+ , ::com::sun::star::ucb::CommandAbortedException
+ , ::com::sun::star::uno::RuntimeException
+ );
+
+ virtual void SAL_CALL
+ abort(
+ sal_Int32 CommandId
+ )
+ throw ( ::com::sun::star::uno::RuntimeException
+ );
+
+ private:
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > getProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& i_rEnv );
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::ucb::CommandInfo > getCommands( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& i_rEnv );
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+ setPropertyValues(
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rValues,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& xEnv
+ );
+
+ static bool denotesRootContent( const ::rtl::OUString& i_rContentIdentifier );
+
+ bool impl_isFolder();
+ void impl_determineContentType();
+
+ private:
+ ExtensionContentType m_eExtContentType;
+ ::boost::optional< bool > m_aIsFolder;
+ ::boost::optional< ::rtl::OUString > m_aContentType;
+ ::rtl::OUString m_sExtensionId;
+ ::rtl::OUString m_sPathIntoExtension;
+ };
+
+//......................................................................................................................
+} } } // namespace ucb::ucp::ext
+//......................................................................................................................
+
+#endif // UCB_UCPEXT_CONTENT_HXX
diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
new file mode 100644
index 000000000000..a3a9cc6876ff
--- /dev/null
+++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
@@ -0,0 +1,375 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_ucb.hxx"
+
+#include "ucpext_datasupplier.hxx"
+#include "ucpext_content.hxx"
+#include "ucpext_provider.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/deployment/XPackageInformationProvider.hpp>
+/** === end UNO includes === **/
+
+#include <ucbhelper/contentidentifier.hxx>
+#include <comphelper/componentcontext.hxx>
+#include <ucbhelper/providerhelper.hxx>
+#include <ucbhelper/content.hxx>
+#include <ucbhelper/propertyvalueset.hxx>
+#include <tools/diagnose_ex.h>
+#include <rtl/ustrbuf.hxx>
+
+#include <vector>
+#include <boost/shared_ptr.hpp>
+
+//......................................................................................................................
+namespace ucb { namespace ucp { namespace ext
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::ucb::XContent;
+ using ::com::sun::star::ucb::XContentIdentifier;
+ using ::com::sun::star::sdbc::XRow;
+ using ::com::sun::star::lang::XMultiServiceFactory;
+ using ::com::sun::star::ucb::IllegalIdentifierException;
+ using ::com::sun::star::ucb::ResultSetException;
+ using ::com::sun::star::deployment::XPackageInformationProvider;
+ using ::com::sun::star::beans::Property;
+ using ::com::sun::star::sdbc::XResultSet;
+ using ::com::sun::star::sdbc::XRow;
+ using ::com::sun::star::ucb::XCommandEnvironment;
+ /** === end UNO using === **/
+ //==================================================================================================================
+ //= ResultListEntry
+ //==================================================================================================================
+ struct ResultListEntry
+ {
+ ::rtl::OUString sId;
+ Reference< XContentIdentifier > xId;
+ ::rtl::Reference< Content > pContent;
+ Reference< XRow > xRow;
+ };
+
+ typedef ::std::vector< ResultListEntry > ResultList;
+
+ //==================================================================================================================
+ //= DataSupplier_Impl
+ //==================================================================================================================
+ struct DataSupplier_Impl
+ {
+ ::osl::Mutex m_aMutex;
+ ResultList m_aResults;
+ ::rtl::Reference< Content > m_xContent;
+ Reference< XMultiServiceFactory > m_xSMgr;
+ sal_Int32 m_nOpenMode;
+
+ DataSupplier_Impl( const Reference< XMultiServiceFactory >& i_rORB, const ::rtl::Reference< Content >& i_rContent,
+ const sal_Int32 i_nOpenMode )
+ :m_xContent( i_rContent )
+ ,m_xSMgr( i_rORB )
+ ,m_nOpenMode( i_nOpenMode )
+ {
+ }
+ ~DataSupplier_Impl();
+ };
+
+ //------------------------------------------------------------------------------------------------------------------
+ DataSupplier_Impl::~DataSupplier_Impl()
+ {
+ }
+
+ //==================================================================================================================
+ //= helper
+ //==================================================================================================================
+ namespace
+ {
+ ::rtl::OUString lcl_compose( const ::rtl::OUString& i_rBaseURL, const ::rtl::OUString& i_rRelativeURL )
+ {
+ ENSURE_OR_RETURN( i_rBaseURL.getLength(), "illegal base URL", i_rRelativeURL );
+
+ ::rtl::OUStringBuffer aComposer( i_rBaseURL );
+ if ( i_rBaseURL.getStr()[ i_rBaseURL.getLength() - 1 ] != '/' )
+ aComposer.append( sal_Unicode( '/' ) );
+ aComposer.append( i_rRelativeURL );
+ return aComposer.makeStringAndClear();
+ }
+ }
+
+
+ //==================================================================================================================
+ //= DataSupplier
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ DataSupplier::DataSupplier( const Reference< XMultiServiceFactory >& i_rORB,
+ const ::rtl::Reference< Content >& i_rContent,
+ const sal_Int32 i_nOpenMode )
+ :m_pImpl( new DataSupplier_Impl( i_rORB, i_rContent, i_nOpenMode ) )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void DataSupplier::fetchData()
+ {
+ try
+ {
+ const ::comphelper::ComponentContext aContext( m_pImpl->m_xSMgr );
+ const Reference< XPackageInformationProvider > xPackageInfo(
+ aContext.getSingleton( "com.sun.star.deployment.PackageInformationProvider" ), UNO_QUERY_THROW );
+
+ const ::rtl::OUString sContentIdentifier( m_pImpl->m_xContent->getIdentifier()->getContentIdentifier() );
+
+ switch ( m_pImpl->m_xContent->getExtensionContentType() )
+ {
+ case E_ROOT:
+ {
+ Sequence< Sequence< ::rtl::OUString > > aExtensionInfo( xPackageInfo->getExtensionList() );
+ for ( const Sequence< ::rtl::OUString >* pExtInfo = aExtensionInfo.getConstArray();
+ pExtInfo != aExtensionInfo.getConstArray() + aExtensionInfo.getLength();
+ ++pExtInfo
+ )
+ {
+ ENSURE_OR_CONTINUE( pExtInfo->getLength() > 0, "illegal extension info" );
+
+ const ::rtl::OUString& rLocalId = (*pExtInfo)[0];
+ ResultListEntry aEntry;
+ aEntry.sId = ContentProvider::getRootURL() + Content::encodeIdentifier( rLocalId ) + ::rtl::OUString( sal_Unicode( '/' ) );
+ m_pImpl->m_aResults.push_back( aEntry );
+ }
+ }
+ break;
+ case E_EXTENSION_ROOT:
+ case E_EXTENSION_CONTENT:
+ {
+ const ::rtl::OUString sPackageLocation( m_pImpl->m_xContent->getPhysicalURL() );
+ ::ucbhelper::Content aWrappedContent( sPackageLocation, getResultSet()->getEnvironment() );
+
+ // obtain the properties which our result set is set up for from the wrapped content
+ Sequence< ::rtl::OUString > aPropertyNames(1);
+ aPropertyNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) );
+
+ const Reference< XResultSet > xFolderContent( aWrappedContent.createCursor( aPropertyNames ), UNO_SET_THROW );
+ const Reference< XRow > xContentRow( xFolderContent, UNO_QUERY_THROW );
+ while ( xFolderContent->next() )
+ {
+ ResultListEntry aEntry;
+ aEntry.sId = lcl_compose( sContentIdentifier, xContentRow->getString( 1 ) );
+ m_pImpl->m_aResults.push_back( aEntry );
+ }
+ }
+ break;
+ default:
+ OSL_ENSURE( false, "DataSupplier::fetchData: unimplemented content type!" );
+ break;
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ DataSupplier::~DataSupplier()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 i_nIndex )
+ {
+ ::osl::Guard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex );
+
+ if ( i_nIndex < m_pImpl->m_aResults.size() )
+ {
+ const ::rtl::OUString sId = m_pImpl->m_aResults[ i_nIndex ].sId;
+ if ( sId.getLength() )
+ return sId;
+ }
+
+ OSL_ENSURE( false, "DataSupplier::queryContentIdentifierString: illegal index, or illegal result entry id!" );
+ return ::rtl::OUString();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XContentIdentifier > DataSupplier::queryContentIdentifier( sal_uInt32 i_nIndex )
+ {
+ ::osl::Guard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex );
+
+ if ( i_nIndex < m_pImpl->m_aResults.size() )
+ {
+ Reference< XContentIdentifier > xId( m_pImpl->m_aResults[ i_nIndex ].xId );
+ if ( xId.is() )
+ return xId;
+ }
+
+ ::rtl::OUString sId = queryContentIdentifierString( i_nIndex );
+ if ( sId.getLength() )
+ {
+ Reference< XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( sId );
+ m_pImpl->m_aResults[ i_nIndex ].xId = xId;
+ return xId;
+ }
+
+ return Reference< XContentIdentifier >();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XContent > DataSupplier::queryContent( sal_uInt32 i_nIndex )
+ {
+ ::osl::Guard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex );
+ ENSURE_OR_RETURN( i_nIndex < m_pImpl->m_aResults.size(), "illegal index!", NULL );
+
+
+ ::rtl::Reference< Content > pContent( m_pImpl->m_aResults[ i_nIndex ].pContent );
+ if ( pContent.is() )
+ return pContent.get();
+
+ Reference< XContentIdentifier > xId( queryContentIdentifier( i_nIndex ) );
+ if ( xId.is() )
+ {
+ try
+ {
+ Reference< XContent > xContent( m_pImpl->m_xContent->getProvider()->queryContent( xId ) );
+ pContent.set( dynamic_cast< Content* >( xContent.get() ) );
+ OSL_ENSURE( pContent.is() || !xContent.is(), "DataSupplier::queryContent: invalid content implementation!" );
+ m_pImpl->m_aResults[ i_nIndex ].pContent = pContent;
+ return pContent.get();
+
+ }
+ catch ( const IllegalIdentifierException& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ return Reference< XContent >();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool DataSupplier::getResult( sal_uInt32 i_nIndex )
+ {
+ ::osl::ClearableGuard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex );
+
+ if ( m_pImpl->m_aResults.size() > i_nIndex )
+ // result already present.
+ return sal_True;
+
+ return sal_False;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_uInt32 DataSupplier::totalCount()
+ {
+ ::osl::ClearableGuard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex );
+ return m_pImpl->m_aResults.size();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_uInt32 DataSupplier::currentCount()
+ {
+ return m_pImpl->m_aResults.size();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool DataSupplier::isCountFinal()
+ {
+ return sal_True;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XRow > DataSupplier::queryPropertyValues( sal_uInt32 i_nIndex )
+ {
+ ::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
+ ENSURE_OR_RETURN( i_nIndex < m_pImpl->m_aResults.size(), "DataSupplier::queryPropertyValues: illegal index!", NULL );
+
+ Reference< XRow > xRow = m_pImpl->m_aResults[ i_nIndex ].xRow;
+ if ( xRow.is() )
+ return xRow;
+
+ ENSURE_OR_RETURN( queryContent( i_nIndex ).is(), "could not retrieve the content", NULL );
+
+ switch ( m_pImpl->m_xContent->getExtensionContentType() )
+ {
+ case E_ROOT:
+ {
+ const ::rtl::OUString& rId( m_pImpl->m_aResults[ i_nIndex ].sId );
+ const ::rtl::OUString sRootURL( ContentProvider::getRootURL() );
+ ::rtl::OUString sTitle = Content::decodeIdentifier( rId.copy( sRootURL.getLength() ) );
+ if ( ( sTitle.getLength() > 0 ) && ( sTitle[ sTitle.getLength() - 1 ] == '/' ) )
+ sTitle = sTitle.copy( 0, sTitle.getLength() - 1 );
+ xRow = Content::getArtificialNodePropertyValues( m_pImpl->m_xSMgr, getResultSet()->getProperties(), sTitle );
+ }
+ break;
+
+ case E_EXTENSION_ROOT:
+ case E_EXTENSION_CONTENT:
+ {
+ xRow = m_pImpl->m_aResults[ i_nIndex ].pContent->getPropertyValues(
+ getResultSet()->getProperties(), getResultSet()->getEnvironment() );
+ }
+ break;
+ default:
+ OSL_ENSURE( false, "DataSupplier::queryPropertyValues: unhandled case!" );
+ break;
+ }
+
+ m_pImpl->m_aResults[ i_nIndex ].xRow = xRow;
+ return xRow;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void DataSupplier::releasePropertyValues( sal_uInt32 i_nIndex )
+ {
+ ::osl::Guard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex );
+
+ if ( i_nIndex < m_pImpl->m_aResults.size() )
+ m_pImpl->m_aResults[ i_nIndex ].xRow.clear();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void DataSupplier::close()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void DataSupplier::validate() throw( ResultSetException )
+ {
+ }
+
+//......................................................................................................................
+} } } // namespace ucp::ext
+//......................................................................................................................
diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.hxx b/ucb/source/ucp/ext/ucpext_datasupplier.hxx
new file mode 100644
index 000000000000..526491cd678b
--- /dev/null
+++ b/ucb/source/ucp/ext/ucpext_datasupplier.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+
+#ifndef UCB_UCPEXT_DATA_SUPPLIER_HXX
+#define UCB_UCPEXT_DATA_SUPPLIER_HXX
+
+#include <rtl/ref.hxx>
+#include <ucbhelper/resultset.hxx>
+
+#include <boost/scoped_ptr.hpp>
+
+//......................................................................................................................
+namespace ucb { namespace ucp { namespace ext
+{
+//......................................................................................................................
+
+ struct DataSupplier_Impl;
+ class Content;
+
+ //==================================================================================================================
+ //= DataSupplier
+ //==================================================================================================================
+ typedef ::ucbhelper::ResultSetDataSupplier DataSupplier_Base;
+ class DataSupplier : public ::ucbhelper::ResultSetDataSupplier
+ {
+ public:
+ DataSupplier(
+ const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& i_rORB,
+ const rtl::Reference< Content >& rContent,
+ const sal_Int32 nOpenMode
+ );
+
+ void fetchData();
+
+ protected:
+ virtual ~DataSupplier();
+
+ virtual rtl::OUString queryContentIdentifierString( sal_uInt32 nIndex );
+ virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier > queryContentIdentifier( sal_uInt32 nIndex );
+ virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContent > queryContent( sal_uInt32 nIndex );
+
+ virtual sal_Bool getResult( sal_uInt32 nIndex );
+
+ virtual sal_uInt32 totalCount();
+ virtual sal_uInt32 currentCount();
+ virtual sal_Bool isCountFinal();
+
+ virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XRow > queryPropertyValues( sal_uInt32 nIndex );
+ virtual void releasePropertyValues( sal_uInt32 nIndex );
+
+ virtual void close();
+
+ virtual void validate() throw( com::sun::star::ucb::ResultSetException );
+
+ private:
+ ::boost::scoped_ptr< DataSupplier_Impl > m_pImpl;
+ };
+
+//......................................................................................................................
+} } } // namespace ucp::ext
+//......................................................................................................................
+
+#endif // UCB_UCPEXT_DATA_SUPPLIER_HXX
diff --git a/ucb/source/ucp/ext/ucpext_provider.cxx b/ucb/source/ucp/ext/ucpext_provider.cxx
new file mode 100644
index 000000000000..0fbad1d8cf17
--- /dev/null
+++ b/ucb/source/ucp/ext/ucpext_provider.cxx
@@ -0,0 +1,208 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_ucb.hxx"
+
+#include "ucpext_provider.hxx"
+#include "ucpext_content.hxx"
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+#include <ucbhelper/contentidentifier.hxx>
+#include <osl/diagnose.h>
+#include <osl/mutex.hxx>
+#include <comphelper/componentcontext.hxx>
+#include <rtl/ustrbuf.hxx>
+
+//......................................................................................................................
+namespace ucb { namespace ucp { namespace ext
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::lang::XMultiServiceFactory;
+ using ::com::sun::star::ucb::XContentIdentifier;
+ using ::com::sun::star::ucb::IllegalIdentifierException;
+ using ::com::sun::star::ucb::XContent;
+ using ::com::sun::star::uno::XComponentContext;
+ /** === end UNO using === **/
+
+ //==================================================================================================================
+ //= ContentProvider
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ ContentProvider::ContentProvider( const Reference< XMultiServiceFactory >& i_rServiceManager )
+ :ContentProvider_Base( i_rServiceManager )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ContentProvider::~ContentProvider()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL ContentProvider::getImplementationName_static() throw (RuntimeException)
+ {
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.ucp.ext.ContentProvider" ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL ContentProvider::getImplementationName() throw (RuntimeException)
+ {
+ return getImplementationName_static();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL ContentProvider::getSupportedServiceNames_static( ) throw (RuntimeException)
+ {
+ Sequence< ::rtl::OUString > aServiceNames(2);
+ aServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.ContentProvider" ) );
+ aServiceNames[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.ExtensionContentProvider" ) );
+ return aServiceNames;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL ContentProvider::getSupportedServiceNames( ) throw (RuntimeException)
+ {
+ return getSupportedServiceNames_static();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XInterface > ContentProvider::Create( const Reference< XComponentContext >& i_rContext )
+ {
+ const ::comphelper::ComponentContext aContext( i_rContext );
+ return *( new ContentProvider( aContext.getLegacyServiceFactory() ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString ContentProvider::getRootURL()
+ {
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.extension://" ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString ContentProvider::getArtificialNodeContentType()
+ {
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.extension-content" ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ namespace
+ {
+ void lcl_ensureAndTransfer( ::rtl::OUString& io_rIdentifierFragment, ::rtl::OUStringBuffer& o_rNormalization, const sal_Unicode i_nLeadingChar )
+ {
+ if ( ( io_rIdentifierFragment.getLength() == 0 ) || ( io_rIdentifierFragment[0] != i_nLeadingChar ) )
+ throw IllegalIdentifierException();
+ io_rIdentifierFragment = io_rIdentifierFragment.copy( 1 );
+ o_rNormalization.append( i_nLeadingChar );
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XContent > SAL_CALL ContentProvider::queryContent( const Reference< XContentIdentifier >& i_rIdentifier )
+ throw( IllegalIdentifierException, RuntimeException )
+ {
+ // Check URL scheme...
+ const ::rtl::OUString sScheme( rtl::OUString::createFromAscii( "vnd.sun.star.extension" ) );
+ if ( !i_rIdentifier->getContentProviderScheme().equalsIgnoreAsciiCase( sScheme ) )
+ throw IllegalIdentifierException();
+
+ // normalize the identifier
+ const ::rtl::OUString sIdentifier( i_rIdentifier->getContentIdentifier() );
+
+ // the scheme needs to be lower-case
+ ::rtl::OUStringBuffer aComposer;
+ aComposer.append( sIdentifier.copy( 0, sScheme.getLength() ).toAsciiLowerCase() );
+
+ // one : is required after the scheme
+ ::rtl::OUString sRemaining( sIdentifier.copy( sScheme.getLength() ) );
+ lcl_ensureAndTransfer( sRemaining, aComposer, ':' );
+
+ // and at least one /
+ lcl_ensureAndTransfer( sRemaining, aComposer, '/' );
+
+ // the normalized form requires one additional /, but we also accept identifiers which don't have it
+ if ( sRemaining.getLength() == 0 )
+ {
+ // the root content is a special case, it requires ///
+ aComposer.appendAscii( "//" );
+ }
+ else
+ {
+ if ( sRemaining[0] != '/' )
+ {
+ aComposer.append( sal_Unicode( '/' ) );
+ aComposer.append( sRemaining );
+ }
+ else
+ {
+ lcl_ensureAndTransfer( sRemaining, aComposer, '/' );
+ // by now, we moved "vnd.sun.star.extension://" from the URL to aComposer
+ if ( sRemaining.getLength() == 0 )
+ {
+ // again, it's the root content, but one / is missing
+ aComposer.append( sal_Unicode( '/' ) );
+ }
+ else
+ {
+ aComposer.append( sRemaining );
+ }
+ }
+ }
+ const Reference< XContentIdentifier > xNormalizedIdentifier( new ::ucbhelper::ContentIdentifier( m_xSMgr, aComposer.makeStringAndClear() ) );
+
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ // check if a content with given id already exists...
+ Reference< XContent > xContent( queryExistingContent( xNormalizedIdentifier ).get() );
+ if ( xContent.is() )
+ return xContent;
+
+ // create a new content
+ xContent = new Content( m_xSMgr, this, xNormalizedIdentifier );
+ if ( !xContent->getIdentifier().is() )
+ throw IllegalIdentifierException();
+
+ registerNewContent( xContent );
+ return xContent;
+ }
+
+//......................................................................................................................
+} } } // namespace ucb::ucp::ext
+//......................................................................................................................
diff --git a/ucb/source/ucp/ext/ucpext_provider.hxx b/ucb/source/ucp/ext/ucpext_provider.hxx
new file mode 100644
index 000000000000..1f41fdd0f084
--- /dev/null
+++ b/ucb/source/ucp/ext/ucpext_provider.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+
+#ifndef UCB_UCPEXT_CONTENT_PROVIDER_HXX
+#define UCB_UCPEXT_CONTENT_PROVIDER_HXX
+
+#include <ucbhelper/providerhelper.hxx>
+
+//......................................................................................................................
+namespace ucb { namespace ucp { namespace ext
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= ContentProvider
+ //==================================================================================================================
+ typedef ::ucbhelper::ContentProviderImplHelper ContentProvider_Base;
+ class ContentProvider : public ContentProvider_Base
+ {
+ public:
+ ContentProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_rServiceManager );
+ virtual ~ContentProvider();
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo - static versions
+ static ::rtl::OUString SAL_CALL getImplementationName_static( ) throw (::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static() throw (::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext );
+
+ // XContentProvider
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent > SAL_CALL queryContent( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentIdentifier >& Identifier ) throw (::com::sun::star::ucb::IllegalIdentifierException, ::com::sun::star::uno::RuntimeException);
+
+ public:
+ static ::rtl::OUString getRootURL();
+ static ::rtl::OUString getArtificialNodeContentType();
+ };
+
+//......................................................................................................................
+} } } // namespace ucb::ucp::ext
+//......................................................................................................................
+
+#endif // UCB_UCPEXT_CONTENT_PROVIDER_HXX
diff --git a/ucb/source/ucp/ext/ucpext_resultset.cxx b/ucb/source/ucp/ext/ucpext_resultset.cxx
new file mode 100644
index 000000000000..d8a2eb8e9914
--- /dev/null
+++ b/ucb/source/ucp/ext/ucpext_resultset.cxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+
+#include "precompiled_ucb.hxx"
+
+#include "ucpext_resultset.hxx"
+#include "ucpext_content.hxx"
+#include "ucpext_datasupplier.hxx"
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+#include <ucbhelper/resultset.hxx>
+
+//......................................................................................................................
+namespace ucb { namespace ucp { namespace ext
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::lang::XMultiServiceFactory;
+ using ::com::sun::star::ucb::XContentIdentifier;
+ using ::com::sun::star::ucb::OpenCommandArgument2;
+ using ::com::sun::star::ucb::XCommandEnvironment;
+ /** === end UNO using === **/
+
+ //==================================================================================================================
+ //= ResultSet
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ ResultSet::ResultSet( const Reference< XMultiServiceFactory >& i_rORB, const ::rtl::Reference< Content >& i_rContent,
+ const OpenCommandArgument2& i_rCommand, const Reference< XCommandEnvironment >& i_rEnv )
+ :ResultSetImplHelper( i_rORB, i_rCommand )
+ ,m_xEnvironment( i_rEnv )
+ ,m_xContent( i_rContent )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void ResultSet::initStatic()
+ {
+ ::rtl::Reference< DataSupplier > pDataSupplier( new DataSupplier(
+ m_xSMgr,
+ m_xContent,
+ m_aCommand.Mode
+ ) );
+ m_xResultSet1 = new ::ucbhelper::ResultSet(
+ m_xSMgr,
+ m_aCommand.Properties,
+ pDataSupplier.get(),
+ m_xEnvironment
+ );
+ pDataSupplier->fetchData();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void ResultSet::initDynamic()
+ {
+ initStatic();
+ m_xResultSet2 = m_xResultSet1;
+ }
+
+//......................................................................................................................
+} } } // namespace ucp::ext
+//......................................................................................................................
diff --git a/ucb/source/ucp/ext/ucpext_resultset.hxx b/ucb/source/ucp/ext/ucpext_resultset.hxx
new file mode 100644
index 000000000000..2924197a0fdc
--- /dev/null
+++ b/ucb/source/ucp/ext/ucpext_resultset.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+
+#ifndef UCB_UCPEXT_RESULT_SET_HXX
+#define UCB_UCPEXT_RESULT_SET_HXX
+
+#include <rtl/ref.hxx>
+#include <ucbhelper/resultsethelper.hxx>
+
+//......................................................................................................................
+namespace ucb { namespace ucp { namespace ext
+{
+//......................................................................................................................
+
+ class Content;
+
+ //==================================================================================================================
+ //= ResultSet
+ //==================================================================================================================
+ class ResultSet : public ::ucbhelper::ResultSetImplHelper
+ {
+ public:
+ ResultSet(
+ const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& i_rORB,
+ const rtl::Reference< Content >& i_rContent,
+ const com::sun::star::ucb::OpenCommandArgument2& i_rCommand,
+ const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& i_rEnv
+ );
+
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > m_xEnvironment;
+ ::rtl::Reference< Content > m_xContent;
+
+ private:
+ virtual void initStatic();
+ virtual void initDynamic();
+ };
+
+//......................................................................................................................
+} } } // namespace ucp::ext
+//......................................................................................................................
+
+#endif // UCB_UCPEXT_RESULT_SET_HXX
diff --git a/ucb/source/ucp/ext/ucpext_services.cxx b/ucb/source/ucp/ext/ucpext_services.cxx
new file mode 100644
index 000000000000..8daa33f5cf8c
--- /dev/null
+++ b/ucb/source/ucp/ext/ucpext_services.cxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+
+#include "precompiled_ucb.hxx"
+
+#include "ucpext_provider.hxx"
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+#include <cppuhelper/implementationentry.hxx>
+
+//......................................................................................................................
+namespace ucb { namespace ucp { namespace ext
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::lang::XSingleComponentFactory;
+ /** === end UNO using === **/
+
+ //==================================================================================================================
+ //= descriptors for the services implemented in this component
+ //==================================================================================================================
+ static struct ::cppu::ImplementationEntry s_aServiceEntries[] =
+ {
+ {
+ ContentProvider::Create,
+ ContentProvider::getImplementationName_static,
+ ContentProvider::getSupportedServiceNames_static,
+ ::cppu::createOneInstanceComponentFactory, NULL, 0
+ },
+ { 0, 0, 0, 0, 0, 0 }
+ };
+
+//......................................................................................................................
+} } } // namespace ucb::ucp::ext
+//......................................................................................................................
+
+extern "C"
+{
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** )
+ {
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryKey )
+ {
+ return ::cppu::component_writeInfoHelper( pServiceManager, pRegistryKey, ::ucb::ucp::ext::s_aServiceEntries );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
+ {
+ return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , ::ucb::ucp::ext::s_aServiceEntries );
+ }
+}
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index 4183b852735e..2b0182fd2a83 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -684,5 +684,17 @@ UUIInteractionHelper::handlePasswordRequest(
true /* bool bMSCryptoMode */);
return true;
}
+
+ task::PasswordRequest aPasswordRequest;
+ if( aAnyRequest >>= aPasswordRequest )
+ {
+ handlePasswordRequest_(getParentProperty(),
+ aPasswordRequest.Mode,
+ rRequest->getContinuations(),
+ rtl::OUString(),
+ false /* bool bMSCryptoMode */);
+ return true;
+ }
+
return false;
}
diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx
index d37376abdd00..3176171c4865 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -37,7 +37,7 @@
#include "com/sun/star/task/XInteractionRetry.hpp"
#include "tools/errinf.hxx" // ErrorHandler, ErrorContext, ...
-#include "svl/svtools.hrc" // RID_ERRHDL
+#include "svtools/svtools.hrc" // RID_ERRHDL
#include "ids.hrc"
#include "getcontinuations.hxx"
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index e883bd60848d..0879e3574da3 100644..100755
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -868,14 +868,15 @@ UUIInteractionHelper::handleRequest_impl(
return true;
// @@@ Todo #i29340#: activate!
-// ucb::NameClashResolveRequest aNameClashResolveRequest;
-// if (aAnyRequest >>= aNameClashResolveRequest)
-// {
-// handleNameClashResolveRequest(aNameClashResolveRequest,
-// rRequest->getContinuations());
-// return true;
-// }
-
+#if 0
+ ucb::NameClashResolveRequest aNameClashResolveRequest;
+ if (aAnyRequest >>= aNameClashResolveRequest)
+ {
+ handleNameClashResolveRequest(aNameClashResolveRequest,
+ rRequest->getContinuations());
+ return true;
+ }
+#endif
if ( handleMasterPasswordRequest( rRequest ) )
return true;
@@ -1187,6 +1188,8 @@ executeMessageBox(
return aResult;
}
+// @@@ Todo #i29340#: activate!
+#if 0
enum NameClashResolveDialogResult { ABORT, RENAME, OVERWRITE };
NameClashResolveDialogResult
@@ -1214,9 +1217,11 @@ executeSimpleNameClashResolveDialog(
"executeSimpleNameClashResolveDialog not yet implemented!" );
return ABORT;
}
-
+#endif
} // namespace
+// @@@ Todo #i29340#: activate!
+#if 0
void
UUIInteractionHelper::handleNameClashResolveRequest(
ucb::NameClashResolveRequest const & rRequest,
@@ -1284,6 +1289,7 @@ UUIInteractionHelper::handleNameClashResolveRequest(
break;
}
}
+#endif
void
UUIInteractionHelper::handleGenericErrorRequest(
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index 6402653d3bda..581099462845 100644..100755
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -215,6 +215,8 @@ private:
com::sun::star::task::XInteractionRequest > const & rRequest)
SAL_THROW((com::sun::star::uno::RuntimeException));
+// @@@ Todo #i29340#: activate!
+#if 0
void
handleNameClashResolveRequest(
com::sun::star::ucb::NameClashResolveRequest const & rRequest,
@@ -223,6 +225,7 @@ private:
com::sun::star::task::XInteractionContinuation > > const &
rContinuations)
SAL_THROW((com::sun::star::uno::RuntimeException));
+#endif
bool
handleMasterPasswordRequest(
diff --git a/xmlhelp/prj/d.lst b/xmlhelp/prj/d.lst
index 5f208e51c20f..1cfa107f73b9 100644
--- a/xmlhelp/prj/d.lst
+++ b/xmlhelp/prj/d.lst
@@ -4,6 +4,4 @@
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.*
..\%__SRC%\class\*.jar %_DEST%\bin%_EXT%\*.*
..\util\ucpchelp.xml %_DEST%\xml%_EXT%\ucpchelp.xml
-..\inc\xmlhelp\compilehelp.hxx %_DEST%\inc%_EXT%\xmlhelp\compilehelp.hxx
-..\inc\xmlhelp\helplinkerdllapi.h %_DEST%\inc%_EXT%\xmlhelp\helplinkerdllapi.h
-..\%__SRC%\lib\ihelplinker.lib %_DEST%\lib%_EXT%\ihelplinker.lib \ No newline at end of file
+..\%__SRC%\lib\ihelplinker.lib %_DEST%\lib%_EXT%\ihelplinker.lib
diff --git a/xmloff/inc/SchXMLExport.hxx b/xmloff/inc/SchXMLExport.hxx
index d6227754a5f2..49a471a31729 100644
--- a/xmloff/inc/SchXMLExport.hxx
+++ b/xmloff/inc/SchXMLExport.hxx
@@ -81,7 +81,7 @@ public:
void SetProgress( sal_Int32 nPercentage );
- UniReference< XMLPropertySetMapper > GetPropertySetMapper() const { return maExportHelper.GetPropertySetMapper(); }
+ UniReference< XMLPropertySetMapper > GetPropertySetMapper() const;
// XServiceInfo ( : SvXMLExport )
virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx
index 858371a1805b..7168b2b811a8 100644
--- a/xmloff/inc/SchXMLImport.hxx
+++ b/xmloff/inc/SchXMLImport.hxx
@@ -69,6 +69,8 @@ enum SchXMLChartElemTokenMap
enum SchXMLPlotAreaElemTokenMap
{
+ XML_TOK_PA_COORDINATE_REGION_EXT,
+ XML_TOK_PA_COORDINATE_REGION,
XML_TOK_PA_AXIS,
XML_TOK_PA_SERIES,
XML_TOK_PA_WALL,
diff --git a/xmloff/inc/xmlnmspe.hxx b/xmloff/inc/xmlnmspe.hxx
index 49c484a1ab17..7b7b7e131ec7 100644
--- a/xmloff/inc/xmlnmspe.hxx
+++ b/xmloff/inc/xmlnmspe.hxx
@@ -87,8 +87,10 @@ const sal_uInt16 XML_NAMESPACE_##prefix##_EXT_IDX = key;
XML_NAMESPACE_EXT( OFFICE, 37U )
XML_NAMESPACE_EXT( TABLE, 38U )
+XML_NAMESPACE_EXT( CHART, 39U )
+XML_NAMESPACE_EXT( DRAW, 40U )
-#define _XML_OLD_NAMESPACE_BASE 39U
+#define _XML_OLD_NAMESPACE_BASE 41U
// namespaces used in the technical preview (SO 5.2)
XML_OLD_NAMESPACE( FO, 0U )
diff --git a/xmloff/inc/xmloff/SchXMLExportHelper.hxx b/xmloff/inc/xmloff/SchXMLExportHelper.hxx
index 64f579a7c252..bf60d44d63fd 100644
--- a/xmloff/inc/xmloff/SchXMLExportHelper.hxx
+++ b/xmloff/inc/xmloff/SchXMLExportHelper.hxx
@@ -40,41 +40,9 @@
#include <queue>
#include <vector>
-namespace com { namespace sun { namespace star {
- namespace chart {
- class XDiagram;
- class XChartDocument;
- struct ChartSeriesAddress;
- }
- namespace chart2 {
- class XDiagram;
- class XChartDocument;
- class XDataSeries;
- namespace data
- {
- class XDataProvider;
- class XDataSequence;
- }
- }
- namespace drawing {
- class XShape;
- class XShapes;
- }
- namespace task {
- class XStatusIndicator;
- }
- namespace frame {
- class XModel;
- }
- namespace xml {
- namespace sax {
- class XAttributeList;
-}}}}}
-
class SvXMLAutoStylePoolP;
-class XMLChartExportPropertyMapper;
class SvXMLExport;
-class XMLPropertyHandlerFactory;
+class SchXMLExportHelper_Impl;
/** With this class you can export a <chart:chart> element containing
its data as <table:table> element or without internal table. In
@@ -84,153 +52,22 @@ class XMLPropertyHandlerFactory;
class XMLOFF_DLLPUBLIC SchXMLExportHelper : public UniRefBase
{
public:
- // first: data sequence for label, second: data sequence for values.
- typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >,
- ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > > tLabelValuesDataPair;
- typedef ::std::vector< tLabelValuesDataPair > tDataSequenceCont;
-
-private:
- SvXMLExport& mrExport;
- SvXMLAutoStylePoolP& mrAutoStylePool;
- UniReference< XMLPropertyHandlerFactory > mxPropertyHandlerFactory;
- UniReference< XMLPropertySetMapper > mxPropertySetMapper;
- UniReference< XMLChartExportPropertyMapper > mxExpPropMapper;
-
- rtl::OUString msTableName;
- rtl::OUStringBuffer msStringBuffer;
- rtl::OUString msString;
-
- // members filled by InitRangeSegmentationProperties (retrieved from DataProvider)
- sal_Bool mbHasSeriesLabels;
- sal_Bool mbHasCategoryLabels; //if the categories are only automatically generated this will be false
- sal_Bool mbRowSourceColumns;
- rtl::OUString msChartAddress;
- rtl::OUString msTableNumberList;
- ::com::sun::star::uno::Sequence< sal_Int32 > maSequenceMapping;
-
- rtl::OUString msCLSID;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > mxAdditionalShapes;
-
- tDataSequenceCont m_aDataSequencesToExport;
- rtl::OUString maCategoriesRange;
-
- /** first parseDocument: collect autostyles and store names in this queue
- second parseDocument: export content and use names from this queue
- */
- ::std::queue< ::rtl::OUString > maAutoStyleNameQueue;
- SAL_DLLPRIVATE void CollectAutoStyle(
- const std::vector< XMLPropertyState >& aStates );
- SAL_DLLPRIVATE void AddAutoStyleAttribute(
- const std::vector< XMLPropertyState >& aStates );
-
- SAL_DLLPRIVATE SvXMLAutoStylePoolP& GetAutoStylePoolP()
- { return mrAutoStylePool; }
-
- /// if bExportContent is false the auto-styles are collected
- SAL_DLLPRIVATE void parseDocument( com::sun::star::uno::Reference<
- com::sun::star::chart::XChartDocument >& rChartDoc,
- sal_Bool bExportContent,
- sal_Bool bIncludeTable = sal_False );
- SAL_DLLPRIVATE void exportTable();
- SAL_DLLPRIVATE void exportPlotArea(
- com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > xDiagram,
- com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > xNewDiagram,
- const ::com::sun::star::awt::Size & rPageSize,
- sal_Bool bExportContent,
- sal_Bool bIncludeTable );
- SAL_DLLPRIVATE void exportAxes( const com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > & xDiagram,
- const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram,
- sal_Bool bExportContent );
-
- SAL_DLLPRIVATE void exportSeries(
- const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram,
- const ::com::sun::star::awt::Size & rPageSize,
- sal_Bool bExportContent,
- sal_Bool bHasTwoYAxes );
- SAL_DLLPRIVATE void exportCandleStickSeries(
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XDataSeries > > & aSeriesSeq,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XDiagram > & xDiagram,
- sal_Bool bJapaneseCandleSticks,
- sal_Bool bExportContent );
- SAL_DLLPRIVATE void exportDataPoints(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet > & xSeriesProperties,
- sal_Int32 nSeriesLength,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XDiagram > & xDiagram,
- sal_Bool bExportContent );
- SAL_DLLPRIVATE void exportRegressionCurve(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XDataSeries > & xSeries,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet > & xSeriesProp,
- const ::com::sun::star::awt::Size & rPageSize,
- sal_Bool bExportContent );
-
- /// add svg position as attribute for current element
- SAL_DLLPRIVATE void addPosition( const ::com::sun::star::awt::Point & rPosition );
- SAL_DLLPRIVATE void addPosition( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape );
- /// add svg size as attribute for current element
- SAL_DLLPRIVATE void addSize( const ::com::sun::star::awt::Size & rSize );
- SAL_DLLPRIVATE void addSize( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape );
- /// fills the member msString with the appropriate String (i.e. "A3")
- SAL_DLLPRIVATE void getCellAddress( sal_Int32 nCol, sal_Int32 nRow );
- /// exports a string as a paragraph element
- SAL_DLLPRIVATE void exportText( const ::rtl::OUString& rText, bool bConvertTabsLFs = false );
- SAL_DLLPRIVATE void exportErrorBarRanges();
-
- SAL_DLLPRIVATE SchXMLExportHelper(SchXMLExportHelper &); // not defined
- SAL_DLLPRIVATE void operator =(SchXMLExportHelper &); // not defined
-
-public:
SchXMLExportHelper( SvXMLExport& rExport,
SvXMLAutoStylePoolP& rASPool );
virtual ~SchXMLExportHelper();
- // auto-styles
- /// parse chart and collect all auto-styles used in current pool
- void collectAutoStyles( com::sun::star::uno::Reference<
- com::sun::star::chart::XChartDocument > rChartDoc );
- /// write the styles collected into the current pool as <style:style> elements
- void exportAutoStyles();
-
- /** export the <chart:chart> element corresponding to rChartDoc
- if bIncludeTable is true, the chart data is exported as <table:table>
- element (inside the chart element).
-
- Otherwise the external references stored in the chart document are used
- for writing the corresponding attributes at series
-
- All attributes contained in xAttrList are written at the chart element,
- which ist the outer element of a chart. So these attributes can easily
- be parsed again by the container
- */
- void exportChart( com::sun::star::uno::Reference<
- com::sun::star::chart::XChartDocument > rChartDoc,
- sal_Bool bIncludeTable );
-
/// returns the string corresponding to the current FileFormat CLSID for Chart
const rtl::OUString& getChartCLSID();
- UniReference< XMLPropertySetMapper > GetPropertySetMapper() const { return mxPropertySetMapper; }
-
- void SetChartRangeAddress( const ::rtl::OUString& rAddress )
- { msChartAddress = rAddress; }
- void SetTableNumberList( const ::rtl::OUString& rList )
- { msTableNumberList = rList; }
-
- void InitRangeSegmentationProperties(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XChartDocument > & xChartDoc );
+private:
+ SchXMLExportHelper(); // not defined
+ SchXMLExportHelper(SchXMLExportHelper &); // not defined
+ void operator =(SchXMLExportHelper &); // not defined
- ::com::sun::star::awt::Size getPageSize(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XChartDocument > & xChartDoc ) const;
+private:
+ SchXMLExportHelper_Impl* m_pImpl;
+ friend class SchXMLExport;
};
#endif // _XMLOFF_SCH_XMLEXPORTHELPER_HXX_
diff --git a/xmloff/inc/xmloff/shapeexport.hxx b/xmloff/inc/xmloff/shapeexport.hxx
index 1b30658ef89c..e583a208fd83 100644
--- a/xmloff/inc/xmloff/shapeexport.hxx
+++ b/xmloff/inc/xmloff/shapeexport.hxx
@@ -111,7 +111,8 @@ enum XmlShapeType
XmlShapeTypePresPageShape, // "com.sun.star.presentation.PageShape"
XmlShapeTypePresOLE2Shape, // "com.sun.star.presentation.OLE2Shape"
XmlShapeTypePresChartShape, // "com.sun.star.presentation.ChartShape"
- XmlShapeTypePresSheetShape, // "com.sun.star.presentation.OLE2Shape"
+ XmlShapeTypePresSheetShape, // "com.sun.star.presentation.CalcShape"
+ XmlShapeTypePresTableShape, // "com.sun.star.presentation.TableShape"
XmlShapeTypePresOrgChartShape, // "com.sun.star.presentation.OrgChartShape"
XmlShapeTypePresNotesShape, // "com.sun.star.presentation.NotesShape"
XmlShapeTypeHandoutShape, // "com.sun.star.presentation.HandoutShape"
@@ -121,8 +122,9 @@ enum XmlShapeType
XmlShapeTypePresSlideNumberShape, // "com.sun.star.presentation.SlideNumberShape"
XmlShapeTypePresDateTimeShape, // "com.sun.star.presentation.DateTimeShape"
- XmlShapeTypeDrawCustomShape, // "com.sun.star.draw.CustomShape"
- XmlShapeTypeDrawMediaShape, // "com.sun.star.draw.MediaShape"
+ XmlShapeTypeDrawCustomShape, // "com.sun.star.drawing.CustomShape"
+ XmlShapeTypeDrawMediaShape, // "com.sun.star.drawing.MediaShape"
+ XmlShapeTypePresMediaShape, // "com.sun.star.presentation.MediaShape"
XmlShapeTypeDrawTableShape, // "com.sun.star.drawing.TableShape"
@@ -189,6 +191,9 @@ private:
SAL_DLLPRIVATE UniReference< SvXMLExportPropertyMapper > GetPropertySetMapper() const { return mxPropertySetMapper; }
const rtl::OUString msZIndex;
+ const rtl::OUString msPrintable;
+ const rtl::OUString msVisible;
+
const rtl::OUString msEmptyPres;
const rtl::OUString msModel;
const rtl::OUString msStartShape;
diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx
index 82dc69e59ee3..19eb9a3854df 100644
--- a/xmloff/inc/xmloff/xmltoken.hxx
+++ b/xmloff/inc/xmloff/xmltoken.hxx
@@ -148,6 +148,9 @@ namespace xmloff { namespace token {
XML_NP_TABLE_EXT,
XML_N_TABLE_EXT,
+ XML_NP_DRAW_EXT,
+ XML_N_DRAW_EXT,
+
// units
XML_UNIT_MM,
XML_UNIT_M,
@@ -2548,6 +2551,9 @@ namespace xmloff { namespace token {
XML_DIMENSION,
XML_VALIDATION_NAME,
+ XML_SCREEN,
+ XML_PRINTER,
+
// XForms tokens
// already defined: XML_ACTION, XML_VERSION, XML_ENCODING,
// XML_REPLACE, XML_SEPARATOR, XML_TYPE, XML_ID
@@ -3095,6 +3101,11 @@ namespace xmloff { namespace token {
XML_ENDS_WITH,
XML_DOES_NOT_END_WITH,
+ //chart
+ XML_NP_CHART_EXT,
+ XML_N_CHART_EXT,
+ XML_COORDINATE_REGION,
+
XML_TOKEN_END
};
diff --git a/xmloff/qa/unoapi/knownissues.xcl b/xmloff/qa/unoapi/knownissues.xcl
index 401d33d9a889..ac15aad11e71 100644
--- a/xmloff/qa/unoapi/knownissues.xcl
+++ b/xmloff/qa/unoapi/knownissues.xcl
@@ -10,17 +10,6 @@ xmloff.Impress.XMLImporter::com::sun::star::xml::sax::XDocumentHandler
xmloff.Impress.XMLMetaImporter::com::sun::star::xml::sax::XDocumentHandler
xmloff.Impress.XMLStylesImporter::com::sun::star::xml::sax::XDocumentHandler
-### i86555 ###
-xmloff.Chart.XMLExporter::com::sun::star::document::XFilter
-xmloff.Chart.XMLContentExporter::com::sun::star::document::XFilter
-xmloff.Impress.XMLSettingsExporter::com::sun::star::document::XFilter
-xmloff.Impress.XMLMetaExporter::com::sun::star::document::XFilter
-xmloff.Impress.XMLImporter::com::sun::star::document::XFilter
-xmloff.Impress.XMLExporter::com::sun::star::document::XFilter
-xmloff.Draw.XMLContentExporter::com::sun::star::document::XFilter
-xmloff.Draw.XMLMetaExporter::com::sun::star::document::XFilter
-xmloff.Draw.XMLSettingsImporter::com::sun::star::document::XFilter
-
### i87695 ###
xmloff.Draw.XMLStylesExporter
xmloff.Impress.XMLStylesExporter
diff --git a/xmloff/qa/unoapi/xmloff.sce b/xmloff/qa/unoapi/xmloff.sce
index c73533f4e4e8..69166aec6204 100644
--- a/xmloff/qa/unoapi/xmloff.sce
+++ b/xmloff/qa/unoapi/xmloff.sce
@@ -3,7 +3,7 @@
#111102# -o xmloff.Chart.XMLExporter
#111102# -o xmloff.Chart.XMLImporter
#111102# -o xmloff.Chart.XMLStylesExporter
-#111102# -o xmloff.Chart.XMLStylesImporter
+#111102# #i112047 -o xmloff.Chart.XMLStylesImporter
-o xmloff.Draw.XMLContentExporter
-o xmloff.Draw.XMLContentImporter
-o xmloff.Draw.XMLExporter
@@ -16,7 +16,7 @@
-o xmloff.Draw.XMLStylesImporter
#i111224 -o xmloff.Impress.XMLContentExporter
-o xmloff.Impress.XMLContentImporter
--o xmloff.Impress.XMLExporter
+#i112048 -o xmloff.Impress.XMLExporter
#i111111# -o xmloff.Impress.XMLImporter
-o xmloff.Impress.XMLMetaExporter
-o xmloff.Impress.XMLMetaImporter
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index ccc400305044..c4abc4172959 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -76,6 +76,7 @@
#include <com/sun/star/chart/X3DDisplay.hpp>
#include <com/sun/star/chart/XStatisticDisplay.hpp>
#include <com/sun/star/chart/XSecondAxisTitleSupplier.hpp>
+#include <com/sun/star/chart/XDiagramPositioning.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
@@ -116,6 +117,161 @@ using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
using ::std::vector;
+// ========================================
+// class SchXMLExportHelper_Impl
+// ========================================
+
+class SchXMLExportHelper_Impl
+{
+public:
+ // first: data sequence for label, second: data sequence for values.
+ typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >,
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > > tLabelValuesDataPair;
+ typedef ::std::vector< tLabelValuesDataPair > tDataSequenceCont;
+
+public:
+ SchXMLExportHelper_Impl( SvXMLExport& rExport,
+ SvXMLAutoStylePoolP& rASPool );
+
+ virtual ~SchXMLExportHelper_Impl();
+
+ // auto-styles
+ /// parse chart and collect all auto-styles used in current pool
+ void collectAutoStyles( com::sun::star::uno::Reference<
+ com::sun::star::chart::XChartDocument > rChartDoc );
+
+ /// write the styles collected into the current pool as <style:style> elements
+ void exportAutoStyles();
+
+ /** export the <chart:chart> element corresponding to rChartDoc
+ if bIncludeTable is true, the chart data is exported as <table:table>
+ element (inside the chart element).
+
+ Otherwise the external references stored in the chart document are used
+ for writing the corresponding attributes at series
+
+ All attributes contained in xAttrList are written at the chart element,
+ which ist the outer element of a chart. So these attributes can easily
+ be parsed again by the container
+ */
+ void exportChart( com::sun::star::uno::Reference<
+ com::sun::star::chart::XChartDocument > rChartDoc,
+ sal_Bool bIncludeTable );
+
+ UniReference< XMLPropertySetMapper > GetPropertySetMapper() const;
+
+ void SetChartRangeAddress( const ::rtl::OUString& rAddress )
+ { msChartAddress = rAddress; }
+ void SetTableNumberList( const ::rtl::OUString& rList )
+ { msTableNumberList = rList; }
+
+ void InitRangeSegmentationProperties(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument > & xChartDoc );
+
+ ::com::sun::star::awt::Size getPageSize(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument > & xChartDoc ) const;
+
+ /** first parseDocument: collect autostyles and store names in this queue
+ second parseDocument: export content and use names from this queue
+ */
+ ::std::queue< ::rtl::OUString > maAutoStyleNameQueue;
+ void CollectAutoStyle(
+ const std::vector< XMLPropertyState >& aStates );
+ void AddAutoStyleAttribute(
+ const std::vector< XMLPropertyState >& aStates );
+
+ SvXMLAutoStylePoolP& GetAutoStylePoolP()
+ { return mrAutoStylePool; }
+
+ /// if bExportContent is false the auto-styles are collected
+ void parseDocument( com::sun::star::uno::Reference<
+ com::sun::star::chart::XChartDocument >& rChartDoc,
+ sal_Bool bExportContent,
+ sal_Bool bIncludeTable = sal_False );
+ void exportTable();
+ void exportPlotArea(
+ com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > xDiagram,
+ com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > xNewDiagram,
+ const ::com::sun::star::awt::Size & rPageSize,
+ sal_Bool bExportContent,
+ sal_Bool bIncludeTable );
+ void exportCoordinateRegion( const com::sun::star::uno::Reference< com::sun::star::chart::XDiagram >& xDiagram );
+ void exportAxes( const com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > & xDiagram,
+ const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram,
+ sal_Bool bExportContent );
+
+ void exportSeries(
+ const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram,
+ const ::com::sun::star::awt::Size & rPageSize,
+ sal_Bool bExportContent,
+ sal_Bool bHasTwoYAxes );
+ void exportCandleStickSeries(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XDataSeries > > & aSeriesSeq,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XDiagram > & xDiagram,
+ sal_Bool bJapaneseCandleSticks,
+ sal_Bool bExportContent );
+ void exportDataPoints(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & xSeriesProperties,
+ sal_Int32 nSeriesLength,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XDiagram > & xDiagram,
+ sal_Bool bExportContent );
+ void exportRegressionCurve(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XDataSeries > & xSeries,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & xSeriesProp,
+ const ::com::sun::star::awt::Size & rPageSize,
+ sal_Bool bExportContent );
+
+ /// add svg position as attribute for current element
+ void addPosition( const ::com::sun::star::awt::Point & rPosition );
+ void addPosition( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape );
+ /// add svg size as attribute for current element
+ void addSize( const ::com::sun::star::awt::Size & rSize );
+ void addSize( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape );
+ /// fills the member msString with the appropriate String (i.e. "A3")
+ void getCellAddress( sal_Int32 nCol, sal_Int32 nRow );
+ /// exports a string as a paragraph element
+ void exportText( const ::rtl::OUString& rText, bool bConvertTabsLFs = false );
+ void exportErrorBarRanges();
+
+ SchXMLExportHelper_Impl(SchXMLExportHelper_Impl &); // not defined
+ void operator =(SchXMLExportHelper_Impl &); // not defined
+
+public:
+ SvXMLExport& mrExport;
+ SvXMLAutoStylePoolP& mrAutoStylePool;
+ UniReference< XMLPropertyHandlerFactory > mxPropertyHandlerFactory;
+ UniReference< XMLPropertySetMapper > mxPropertySetMapper;
+ UniReference< XMLChartExportPropertyMapper > mxExpPropMapper;
+
+ rtl::OUString msTableName;
+ rtl::OUStringBuffer msStringBuffer;
+ rtl::OUString msString;
+
+ // members filled by InitRangeSegmentationProperties (retrieved from DataProvider)
+ sal_Bool mbHasSeriesLabels;
+ sal_Bool mbHasCategoryLabels; //if the categories are only automatically generated this will be false
+ sal_Bool mbRowSourceColumns;
+ rtl::OUString msChartAddress;
+ rtl::OUString msTableNumberList;
+ ::com::sun::star::uno::Sequence< sal_Int32 > maSequenceMapping;
+
+ rtl::OUString msCLSID;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > mxAdditionalShapes;
+
+ tDataSequenceCont m_aDataSequencesToExport;
+ rtl::OUString maCategoriesRange;
+};
+
namespace
{
Reference< uno::XComponentContext > lcl_getComponentContext()
@@ -354,7 +510,7 @@ tLabelAndValueRange lcl_getLabelAndValueRangeByRole(
const Sequence< Reference< chart2::data::XLabeledDataSequence > > & aSeqCnt,
const OUString & rRole,
const Reference< chart2::XChartDocument > & xDoc,
- SchXMLExportHelper::tDataSequenceCont & rOutSequencesToExport )
+ SchXMLExportHelper_Impl::tDataSequenceCont & rOutSequencesToExport )
{
tLabelAndValueRange aResult;
@@ -371,7 +527,7 @@ tLabelAndValueRange lcl_getLabelAndValueRangeByRole(
aResult.second = lcl_ConvertRange( xValueSeq->getSourceRangeRepresentation(), xDoc );
if( xLabelSeq.is() || xValueSeq.is())
- rOutSequencesToExport.push_back( SchXMLExportHelper::tLabelValuesDataPair( xLabelSeq, xValueSeq ));
+ rOutSequencesToExport.push_back( SchXMLExportHelper_Impl::tLabelValuesDataPair( xLabelSeq, xValueSeq ));
}
return aResult;
@@ -453,10 +609,10 @@ OUString lcl_getLabelString( const Reference< chart2::data::XDataSequence > & xL
}
sal_Int32 lcl_getMaxSequenceLength(
- const SchXMLExportHelper::tDataSequenceCont & rContainer )
+ const SchXMLExportHelper_Impl::tDataSequenceCont & rContainer )
{
sal_Int32 nResult = 0;
- for( SchXMLExportHelper::tDataSequenceCont::const_iterator aIt( rContainer.begin());
+ for( SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aIt( rContainer.begin());
aIt != rContainer.end(); ++aIt )
{
if( aIt->second.is())
@@ -571,7 +727,7 @@ template< class T >
};
-typedef ::std::map< sal_Int32, SchXMLExportHelper::tLabelValuesDataPair >
+typedef ::std::map< sal_Int32, SchXMLExportHelper_Impl::tLabelValuesDataPair >
lcl_DataSequenceMap;
struct lcl_SequenceToMapElement :
@@ -594,7 +750,7 @@ struct lcl_SequenceToMapElement :
};
void lcl_ReorderInternalSequencesAccordingToTheirRangeName(
- SchXMLExportHelper::tDataSequenceCont & rInOutSequences )
+ SchXMLExportHelper_Impl::tDataSequenceCont & rInOutSequences )
{
lcl_DataSequenceMap aIndexSequenceMap;
::std::transform( rInOutSequences.begin(), rInOutSequences.end(),
@@ -611,7 +767,7 @@ void lcl_ReorderInternalSequencesAccordingToTheirRangeName(
// fill empty columns
for( ; nIndex < aIt->first; ++nIndex )
rInOutSequences.push_back(
- SchXMLExportHelper::tDataSequenceCont::value_type( 0, 0 ));
+ SchXMLExportHelper_Impl::tDataSequenceCont::value_type( 0, 0 ));
OSL_ASSERT( nIndex == aIt->first );
rInOutSequences.push_back( aIt->second );
}
@@ -619,7 +775,7 @@ void lcl_ReorderInternalSequencesAccordingToTheirRangeName(
lcl_TableData lcl_getDataForLocalTable(
- const SchXMLExportHelper::tDataSequenceCont & aSequencesToExport,
+ const SchXMLExportHelper_Impl::tDataSequenceCont & aSequencesToExport,
const Reference< chart::XComplexDescriptionAccess >& xComplexDescriptionAccess,
const OUString& rCategoriesRange,
bool bSeriesFromColumns,
@@ -641,10 +797,10 @@ lcl_TableData lcl_getDataForLocalTable(
aResult.aComplexRowDescriptions = xComplexDescriptionAccess->getComplexRowDescriptions();
}
- SchXMLExportHelper::tDataSequenceCont::size_type nNumSequences = aSequencesToExport.size();
- SchXMLExportHelper::tDataSequenceCont::const_iterator aBegin( aSequencesToExport.begin());
- SchXMLExportHelper::tDataSequenceCont::const_iterator aEnd( aSequencesToExport.end());
- SchXMLExportHelper::tDataSequenceCont::const_iterator aIt( aBegin );
+ SchXMLExportHelper_Impl::tDataSequenceCont::size_type nNumSequences = aSequencesToExport.size();
+ SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aBegin( aSequencesToExport.begin());
+ SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aEnd( aSequencesToExport.end());
+ SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aIt( aBegin );
size_t nMaxSequenceLength( lcl_getMaxSequenceLength( aSequencesToExport ));
size_t nCategoriesLength( aSimpleCategories.getLength() );
@@ -832,7 +988,53 @@ struct SchXMLDataPointStruct
// class SchXMLExportHelper
// ========================================
-SchXMLExportHelper::SchXMLExportHelper(
+SchXMLExportHelper::SchXMLExportHelper( SvXMLExport& rExport, SvXMLAutoStylePoolP& rASPool )
+ : m_pImpl( new SchXMLExportHelper_Impl( rExport, rASPool ) )
+{
+}
+
+SchXMLExportHelper::~SchXMLExportHelper()
+{
+ delete m_pImpl;
+}
+
+const OUString& SchXMLExportHelper::getChartCLSID()
+{
+ return m_pImpl->msCLSID;
+}
+
+UniReference< XMLPropertySetMapper > SchXMLExportHelper_Impl::GetPropertySetMapper() const
+{
+ return mxPropertySetMapper;
+}
+
+void SchXMLExportHelper_Impl::exportAutoStyles()
+{
+ if( mxExpPropMapper.is())
+ {
+ //ToDo: when embedded in calc/writer this is not necessary because the
+ // numberformatter is shared between both documents
+ mrExport.exportAutoDataStyles();
+
+ // export chart auto styles
+ mrAutoStylePool.exportXML(
+ XML_STYLE_FAMILY_SCH_CHART_ID
+ , mrExport.GetDocHandler(),
+ mrExport.GetMM100UnitConverter(),
+ mrExport.GetNamespaceMap()
+ );
+
+ // export auto styles for additional shapes
+ mrExport.GetShapeExport()->exportAutoStyles();
+ // and for text in additional shapes
+ mrExport.GetTextParagraphExport()->exportTextAutoStyles();
+ }
+}
+
+// private methods
+// ---------------
+
+SchXMLExportHelper_Impl::SchXMLExportHelper_Impl(
SvXMLExport& rExport,
SvXMLAutoStylePoolP& rASPool ) :
mrExport( rExport ),
@@ -901,56 +1103,22 @@ SchXMLExportHelper::SchXMLExportHelper(
String( 'T' ));
}
-SchXMLExportHelper::~SchXMLExportHelper() {}
-
-const OUString& SchXMLExportHelper::getChartCLSID()
-{
- return msCLSID;
-}
-
-void SchXMLExportHelper::exportAutoStyles()
+SchXMLExportHelper_Impl::~SchXMLExportHelper_Impl()
{
- if( mxExpPropMapper.is())
- {
- //ToDo: when embedded in calc/writer this is not necessary because the
- // numberformatter is shared between both documents
- mrExport.exportAutoDataStyles();
-
- // export chart auto styles
- mrAutoStylePool.exportXML(
- XML_STYLE_FAMILY_SCH_CHART_ID
- , mrExport.GetDocHandler(),
- mrExport.GetMM100UnitConverter(),
- mrExport.GetNamespaceMap()
- );
-
- // export auto styles for additional shapes
- mrExport.GetShapeExport()->exportAutoStyles();
- // and for text in additional shapes
- mrExport.GetTextParagraphExport()->exportTextAutoStyles();
- }
}
-void SchXMLExportHelper::collectAutoStyles( Reference< chart::XChartDocument > rChartDoc )
+void SchXMLExportHelper_Impl::collectAutoStyles( Reference< chart::XChartDocument > rChartDoc )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogContext, "xmloff", "bm", "::SchXMLExportHelper::collectAutoStyles" );
-
parseDocument( rChartDoc, sal_False );
}
-void SchXMLExportHelper::exportChart( Reference< chart::XChartDocument > rChartDoc,
+void SchXMLExportHelper_Impl::exportChart( Reference< chart::XChartDocument > rChartDoc,
sal_Bool bIncludeTable )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogContext, "xmloff", "bm", "::SchXMLExportHelper::exportChart" );
-
parseDocument( rChartDoc, sal_True, bIncludeTable );
DBG_ASSERT( maAutoStyleNameQueue.empty(), "There are still remaining autostyle names in the queue" );
}
-
-// private methods
-// ---------------
-
::rtl::OUString lcl_GetStringFromNumberSequence( const ::com::sun::star::uno::Sequence< sal_Int32 >& rSequenceMapping, bool bRemoveOneFromEachIndex /*should be true if having categories*/ )
{
const sal_Int32* pArray = rSequenceMapping.getConstArray();
@@ -975,7 +1143,7 @@ void SchXMLExportHelper::exportChart( Reference< chart::XChartDocument > rChartD
}
/// if bExportContent is false the auto-styles are collected
-void SchXMLExportHelper::parseDocument( Reference< chart::XChartDocument >& rChartDoc,
+void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& rChartDoc,
sal_Bool bExportContent,
sal_Bool bIncludeTable )
{
@@ -1425,7 +1593,7 @@ void lcl_exportComplexLabel( const Sequence< OUString >& rComplexLabel, SvXMLExp
}
}
-void SchXMLExportHelper::exportTable()
+void SchXMLExportHelper_Impl::exportTable()
{
// table element
// -------------
@@ -1602,7 +1770,7 @@ void SchXMLExportHelper::exportTable()
OSL_ASSERT( bHasOwnData || (aRowDescriptions_RangeIter == aRowDescriptions_RangeEnd) );
}
-void SchXMLExportHelper::exportPlotArea(
+void SchXMLExportHelper_Impl::exportPlotArea(
Reference< chart::XDiagram > xDiagram,
Reference< chart2::XDiagram > xNewDiagram,
const awt::Size & rPageSize,
@@ -1762,9 +1930,12 @@ void SchXMLExportHelper::exportPlotArea(
}
}
- // element
+ // plot-area element
pElPlotArea = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_PLOT_AREA, sal_True, sal_True );
+ //inner position rectangle element
+ exportCoordinateRegion( xDiagram );
+
// light sources (inside plot area element)
if( bIs3DChart &&
rShapeExport.is())
@@ -1925,7 +2096,27 @@ void SchXMLExportHelper::exportPlotArea(
delete pElPlotArea;
}
-void SchXMLExportHelper::exportAxes(
+void SchXMLExportHelper_Impl::exportCoordinateRegion( const uno::Reference< chart::XDiagram >& xDiagram )
+{
+ const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
+ if( nCurrentODFVersion <= SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older
+ return;
+ if( nCurrentODFVersion != SvtSaveOptions::ODFVER_LATEST )//export only if extensions are enabled //#i100778# todo: change this dependent on fileformat evolution
+ return;
+
+ Reference< chart::XDiagramPositioning > xDiaPos( xDiagram, uno::UNO_QUERY );
+ DBG_ASSERT( xDiaPos.is(), "Invalid xDiaPos as parameter" );
+ if( !xDiaPos.is() )
+ return;
+
+ awt::Rectangle aRect( xDiaPos->calculateDiagramPositionExcludingAxes() );
+ addPosition( awt::Point(aRect.X,aRect.Y) );
+ addSize( awt::Size(aRect.Width,aRect.Height) );
+
+ SvXMLElementExport aCoordinateRegion( mrExport, XML_NAMESPACE_CHART_EXT, XML_COORDINATE_REGION, sal_True, sal_True );//#i100778# todo: change to chart namespace in future - dependent on fileformat
+}
+
+void SchXMLExportHelper_Impl::exportAxes(
const Reference< chart::XDiagram > & xDiagram,
const Reference< chart2::XDiagram > & xNewDiagram,
sal_Bool bExportContent )
@@ -2527,7 +2718,7 @@ void SchXMLExportHelper::exportAxes(
}
}
-void SchXMLExportHelper::exportSeries(
+void SchXMLExportHelper_Impl::exportSeries(
const Reference< chart2::XDiagram > & xNewDiagram,
const awt::Size & rPageSize,
sal_Bool bExportContent,
@@ -2896,7 +3087,7 @@ void SchXMLExportHelper::exportSeries(
}
}
-void SchXMLExportHelper::exportRegressionCurve(
+void SchXMLExportHelper_Impl::exportRegressionCurve(
const Reference< chart2::XDataSeries > & xSeries,
const Reference< beans::XPropertySet > & xSeriesProp,
const awt::Size & rPageSize,
@@ -3003,7 +3194,7 @@ void SchXMLExportHelper::exportRegressionCurve(
}
}
-void SchXMLExportHelper::exportCandleStickSeries(
+void SchXMLExportHelper_Impl::exportCandleStickSeries(
const Sequence< Reference< chart2::XDataSeries > > & aSeriesSeq,
const Reference< chart2::XDiagram > & xDiagram,
sal_Bool bJapaneseCandleSticks,
@@ -3121,7 +3312,7 @@ void SchXMLExportHelper::exportCandleStickSeries(
}
}
-void SchXMLExportHelper::exportDataPoints(
+void SchXMLExportHelper_Impl::exportDataPoints(
const uno::Reference< beans::XPropertySet > & xSeriesProperties,
sal_Int32 nSeriesLength,
const uno::Reference< chart2::XDiagram > & xDiagram,
@@ -3369,7 +3560,7 @@ void SchXMLExportHelper::exportDataPoints(
}
-void SchXMLExportHelper::getCellAddress( sal_Int32 nCol, sal_Int32 nRow )
+void SchXMLExportHelper_Impl::getCellAddress( sal_Int32 nCol, sal_Int32 nRow )
{
msStringBuffer.append( (sal_Unicode)'.' );
if( nCol < 26 )
@@ -3389,7 +3580,7 @@ void SchXMLExportHelper::getCellAddress( sal_Int32 nCol, sal_Int32 nRow )
msStringBuffer.append( nRow + (sal_Int32)1 );
}
-void SchXMLExportHelper::addPosition( const awt::Point & rPosition )
+void SchXMLExportHelper_Impl::addPosition( const awt::Point & rPosition )
{
mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rPosition.X );
msString = msStringBuffer.makeStringAndClear();
@@ -3400,13 +3591,13 @@ void SchXMLExportHelper::addPosition( const awt::Point & rPosition )
mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_Y, msString );
}
-void SchXMLExportHelper::addPosition( Reference< drawing::XShape > xShape )
+void SchXMLExportHelper_Impl::addPosition( Reference< drawing::XShape > xShape )
{
if( xShape.is())
addPosition( xShape->getPosition());
}
-void SchXMLExportHelper::addSize( const awt::Size & rSize )
+void SchXMLExportHelper_Impl::addSize( const awt::Size & rSize )
{
mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rSize.Width );
msString = msStringBuffer.makeStringAndClear();
@@ -3417,13 +3608,13 @@ void SchXMLExportHelper::addSize( const awt::Size & rSize )
mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_HEIGHT, msString );
}
-void SchXMLExportHelper::addSize( Reference< drawing::XShape > xShape )
+void SchXMLExportHelper_Impl::addSize( Reference< drawing::XShape > xShape )
{
if( xShape.is())
addSize( xShape->getSize() );
}
-awt::Size SchXMLExportHelper::getPageSize( const Reference< chart2::XChartDocument > & xChartDoc ) const
+awt::Size SchXMLExportHelper_Impl::getPageSize( const Reference< chart2::XChartDocument > & xChartDoc ) const
{
awt::Size aSize( 8000, 7000 );
uno::Reference< embed::XVisualObject > xVisualObject( xChartDoc, uno::UNO_QUERY );
@@ -3434,13 +3625,13 @@ awt::Size SchXMLExportHelper::getPageSize( const Reference< chart2::XChartDocume
return aSize;
}
-void SchXMLExportHelper::CollectAutoStyle( const std::vector< XMLPropertyState >& aStates )
+void SchXMLExportHelper_Impl::CollectAutoStyle( const std::vector< XMLPropertyState >& aStates )
{
if( !aStates.empty() )
maAutoStyleNameQueue.push( GetAutoStylePoolP().Add( XML_STYLE_FAMILY_SCH_CHART_ID, aStates ));
}
-void SchXMLExportHelper::AddAutoStyleAttribute( const std::vector< XMLPropertyState >& aStates )
+void SchXMLExportHelper_Impl::AddAutoStyleAttribute( const std::vector< XMLPropertyState >& aStates )
{
if( !aStates.empty() )
{
@@ -3451,7 +3642,7 @@ void SchXMLExportHelper::AddAutoStyleAttribute( const std::vector< XMLPropertySt
}
}
-void SchXMLExportHelper::exportText( const OUString& rText, bool bConvertTabsLFs )
+void SchXMLExportHelper_Impl::exportText( const OUString& rText, bool bConvertTabsLFs )
{
SchXMLTools::exportText( mrExport, rText, bConvertTabsLFs );
}
@@ -3468,6 +3659,8 @@ SchXMLExport::SchXMLExport(
maAutoStylePool( *this ),
maExportHelper( *this, maAutoStylePool )
{
+ if( getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST )
+ _GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT);
}
@@ -3484,7 +3677,7 @@ SchXMLExport::~SchXMLExport()
sal_uInt32 SchXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass )
{
Reference< chart2::XChartDocument > xChartDoc( GetModel(), uno::UNO_QUERY );
- maExportHelper.InitRangeSegmentationProperties( xChartDoc );
+ maExportHelper.m_pImpl->InitRangeSegmentationProperties( xChartDoc );
return SvXMLExport::exportDoc( eClass );
}
@@ -3507,8 +3700,8 @@ void SchXMLExport::_ExportAutoStyles()
Reference< chart::XChartDocument > xChartDoc( GetModel(), uno::UNO_QUERY );
if( xChartDoc.is())
{
- maExportHelper.collectAutoStyles( xChartDoc );
- maExportHelper.exportAutoStyles();
+ maExportHelper.m_pImpl->collectAutoStyles( xChartDoc );
+ maExportHelper.m_pImpl->exportAutoStyles();
}
else
{
@@ -3557,13 +3750,13 @@ void SchXMLExport::_ExportContent()
aAny = xProp->getPropertyValue(
OUString::createFromAscii( "ChartRangeAddress" ));
aAny >>= sChartAddress;
- maExportHelper.SetChartRangeAddress( sChartAddress );
+ maExportHelper.m_pImpl->SetChartRangeAddress( sChartAddress );
OUString sTableNumberList;
aAny = xProp->getPropertyValue(
OUString::createFromAscii( "TableNumberList" ));
aAny >>= sTableNumberList;
- maExportHelper.SetTableNumberList( sTableNumberList );
+ maExportHelper.m_pImpl->SetTableNumberList( sTableNumberList );
// do not include own table if there are external addresses
bIncludeTable = (sChartAddress.getLength() == 0);
@@ -3576,7 +3769,7 @@ void SchXMLExport::_ExportContent()
}
}
}
- maExportHelper.exportChart( xChartDoc, bIncludeTable );
+ maExportHelper.m_pImpl->exportChart( xChartDoc, bIncludeTable );
}
else
{
@@ -3591,7 +3784,12 @@ void SchXMLExport::SetProgress( sal_Int32 nPercentage )
mxStatusIndicator->setValue( nPercentage );
}
-void SchXMLExportHelper::InitRangeSegmentationProperties( const Reference< chart2::XChartDocument > & xChartDoc )
+UniReference< XMLPropertySetMapper > SchXMLExport::GetPropertySetMapper() const
+{
+ return maExportHelper.m_pImpl->GetPropertySetMapper();
+}
+
+void SchXMLExportHelper_Impl::InitRangeSegmentationProperties( const Reference< chart2::XChartDocument > & xChartDoc )
{
if( xChartDoc.is())
try
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
index 6afbaecb551c..587070202c9c 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -281,6 +281,8 @@ const SvXMLTokenMap& SchXMLImportHelper::GetPlotAreaElemTokenMap()
{
static __FAR_DATA SvXMLTokenMapEntry aPlotAreaElemTokenMap[] =
{
+ { XML_NAMESPACE_CHART_EXT, XML_COORDINATE_REGION, XML_TOK_PA_COORDINATE_REGION_EXT },
+ { XML_NAMESPACE_CHART, XML_COORDINATE_REGION, XML_TOK_PA_COORDINATE_REGION },
{ XML_NAMESPACE_CHART, XML_AXIS, XML_TOK_PA_AXIS },
{ XML_NAMESPACE_CHART, XML_SERIES, XML_TOK_PA_SERIES },
{ XML_NAMESPACE_CHART, XML_WALL, XML_TOK_PA_WALL },
@@ -657,6 +659,7 @@ SchXMLImport::SchXMLImport(
SvXMLImport( xServiceFactory, nImportFlags )
{
GetNamespaceMap().Add( GetXMLToken(XML_NP_XLINK), GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK );
+ GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT);
mbIsGraphicLoadOnDemandSupported = false;
}
@@ -670,6 +673,7 @@ SchXMLImport::SchXMLImport(
: SvXMLImport( xServiceFactory, xModel, rGrfContainer )
{
GetNamespaceMap().Add( GetXMLToken(XML_NP_XLINK), GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK );
+ GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT);
// get status indicator (if requested)
if( bShowProgress )
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index ec5c4b2130c1..61dab1fb52cb 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -61,6 +61,7 @@
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/chart/X3DDisplay.hpp>
#include <com/sun/star/chart/XStatisticDisplay.hpp>
+#include <com/sun/star/chart/XDiagramPositioning.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
@@ -199,8 +200,8 @@ SchXMLPlotAreaContext::SchXMLPlotAreaContext(
mnSeries( 0 ),
m_aGlobalSeriesImportInfo( rAllRangeAddressesAvailable ),
maSceneImportHelper( rImport ),
- mbHasSize(false),
- mbHasPosition(false),
+ m_aOuterPositioning( rImport ),
+ m_aInnerPositioning( rImport ),
mbPercentStacked(false),
m_bAxisPositionAttributeImported(false),
m_rXLinkHRefAttributeToIndicateDataProvider(rXLinkHRefAttributeToIndicateDataProvider),
@@ -296,15 +297,6 @@ SchXMLPlotAreaContext::~SchXMLPlotAreaContext()
void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
{
- uno::Any aTransMatrixAny;
-
- // initialize size and position
- uno::Reference< drawing::XShape > xDiaShape( mxDiagram, uno::UNO_QUERY );
- bool bHasSizeWidth = false;
- bool bHasSizeHeight = false;
- bool bHasPositionX = false;
- bool bHasPositionY = false;
-
// parse attributes
sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
const SvXMLTokenMap& rAttrTokenMap = mrImportHelper.GetPlotAreaAttrTokenMap();
@@ -320,20 +312,10 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
switch( rAttrTokenMap.Get( nPrefix, aLocalName ))
{
case XML_TOK_PA_X:
- GetImport().GetMM100UnitConverter().convertMeasure( maPosition.X, aValue );
- bHasPositionX = true;
- break;
case XML_TOK_PA_Y:
- GetImport().GetMM100UnitConverter().convertMeasure( maPosition.Y, aValue );
- bHasPositionY = true;
- break;
case XML_TOK_PA_WIDTH:
- GetImport().GetMM100UnitConverter().convertMeasure( maSize.Width, aValue );
- bHasSizeWidth = true;
- break;
case XML_TOK_PA_HEIGHT:
- GetImport().GetMM100UnitConverter().convertMeasure( maSize.Height, aValue );
- bHasSizeHeight = true;
+ m_aOuterPositioning.readPositioningAttribute( nPrefix, aLocalName, aValue );
break;
case XML_TOK_PA_STYLE_NAME:
msAutoStyleName = aValue;
@@ -369,9 +351,6 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
}
}
- mbHasSize = bHasSizeWidth && bHasSizeHeight;
- mbHasPosition = bHasPositionX && bHasPositionY;
-
if( ! mxNewDoc.is())
{
uno::Reference< beans::XPropertySet > xDocProp( mrImportHelper.GetChartDocument(), uno::UNO_QUERY );
@@ -426,14 +405,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Lines")), pPropStyleContext, pStylesCtxt );
//handle automatic position and size
- bool bAutoSize = false;
- bool bAutoPosition = false;
- SchXMLTools::getPropertyFromContext(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticSize")), pPropStyleContext, pStylesCtxt ) >>= bAutoSize;
- SchXMLTools::getPropertyFromContext(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticPosition")), pPropStyleContext, pStylesCtxt ) >>= bAutoPosition;
- mbHasSize = mbHasSize && !bAutoSize;
- mbHasPosition = mbHasPosition && !bAutoPosition;
+ m_aOuterPositioning.readAutomaticPositioningProperties( pPropStyleContext, pStylesCtxt );
//correct default starting angle for old 3D pies
if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan3_0( GetImport().GetModel() ) )
@@ -548,6 +520,13 @@ SvXMLImportContext* SchXMLPlotAreaContext::CreateChildContext(
switch( rTokenMap.Get( nPrefix, rLocalName ))
{
+ case XML_TOK_PA_COORDINATE_REGION_EXT:
+ case XML_TOK_PA_COORDINATE_REGION:
+ {
+ pContext = new SchXMLCoordinateRegionContext( GetImport(), nPrefix, rLocalName, m_aInnerPositioning );
+ }
+ break;
+
case XML_TOK_PA_AXIS:
{
bool bAddMissingXAxisForNetCharts = false;
@@ -711,13 +690,22 @@ void SchXMLPlotAreaContext::EndElement()
}
// set changed size and position after properties (esp. 3d)
- uno::Reference< drawing::XShape > xDiaShape( mxDiagram, uno::UNO_QUERY );
- if( xDiaShape.is())
+
+ uno::Reference< chart::XDiagramPositioning > xDiaPos( mxDiagram, uno::UNO_QUERY );
+ if( xDiaPos.is())
{
- if( mbHasSize )
- xDiaShape->setSize( maSize );
- if( mbHasPosition )
- xDiaShape->setPosition( maPosition );
+ if( !m_aOuterPositioning.isAutomatic() )
+ {
+ if( m_aInnerPositioning.hasPosSize() )
+ xDiaPos->setDiagramPositionExcludingAxes( m_aInnerPositioning.getRectangle() );
+ else if( m_aOuterPositioning.hasPosSize() )
+ {
+ if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan3_3( GetImport().GetModel() ) ) //old version of OOo did write a wrong rectangle for the diagram size
+ xDiaPos->setDiagramPositionIncludingAxesAndAxisTitles( m_aOuterPositioning.getRectangle() );
+ else
+ xDiaPos->setDiagramPositionIncludingAxes( m_aOuterPositioning.getRectangle() );
+ }
+ }
}
CorrectAxisPositions();
@@ -1681,6 +1669,134 @@ void SchXMLCategoriesContext::StartElement( const uno::Reference< xml::sax::XAtt
// ========================================
+SchXMLPositonAttributesHelper::SchXMLPositonAttributesHelper( SvXMLImport& rImporter )
+ : m_rImport( rImporter )
+ , m_aPosition(0,0)
+ , m_aSize(0,0)
+ , m_bHasSizeWidth( false )
+ , m_bHasSizeHeight( false )
+ , m_bHasPositionX( false )
+ , m_bHasPositionY( false )
+ , m_bAutoSize( false )
+ , m_bAutoPosition( false )
+{
+}
+
+SchXMLPositonAttributesHelper::~SchXMLPositonAttributesHelper()
+{
+}
+
+bool SchXMLPositonAttributesHelper::hasSize() const
+{
+ return m_bHasSizeWidth && m_bHasSizeHeight;
+}
+bool SchXMLPositonAttributesHelper::hasPosition() const
+{
+ return m_bHasPositionX && m_bHasPositionY;
+}
+bool SchXMLPositonAttributesHelper::hasPosSize() const
+{
+ return hasPosition() && hasSize();
+}
+bool SchXMLPositonAttributesHelper::isAutomatic() const
+{
+ return m_bAutoSize || m_bAutoPosition;
+}
+awt::Point SchXMLPositonAttributesHelper::getPosition() const
+{
+ return m_aPosition;
+}
+awt::Size SchXMLPositonAttributesHelper::getSize() const
+{
+ return m_aSize;
+}
+awt::Rectangle SchXMLPositonAttributesHelper::getRectangle() const
+{
+ return awt::Rectangle( m_aPosition.X, m_aPosition.Y, m_aSize.Width, m_aSize.Height );
+}
+
+bool SchXMLPositonAttributesHelper::readPositioningAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue )
+{
+ //returns true if the attribute was proccessed
+ bool bReturn = true;
+
+ if( XML_NAMESPACE_SVG == nPrefix )
+ {
+ if( IsXMLToken( rLocalName, XML_X ) )
+ {
+ m_rImport.GetMM100UnitConverter().convertMeasure( m_aPosition.X, rValue );
+ m_bHasPositionX = true;
+ }
+ else if( IsXMLToken( rLocalName, XML_Y ) )
+ {
+ m_rImport.GetMM100UnitConverter().convertMeasure( m_aPosition.Y, rValue );
+ m_bHasPositionY = true;
+ }
+ else if( IsXMLToken( rLocalName, XML_WIDTH ) )
+ {
+ m_rImport.GetMM100UnitConverter().convertMeasure( m_aSize.Width, rValue );
+ m_bHasSizeWidth = true;
+ }
+ else if( IsXMLToken( rLocalName, XML_HEIGHT ) )
+ {
+ m_rImport.GetMM100UnitConverter().convertMeasure( m_aSize.Height, rValue );
+ m_bHasSizeHeight = true;
+ }
+ else
+ bReturn = false;
+ }
+ else
+ bReturn = false;
+
+ return bReturn;
+}
+
+
+void SchXMLPositonAttributesHelper::readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt )
+{
+ if( pPropStyleContext && pStylesCtxt )
+ {
+ //handle automatic position and size
+ SchXMLTools::getPropertyFromContext(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticSize")), pPropStyleContext, pStylesCtxt ) >>= m_bAutoSize;
+ SchXMLTools::getPropertyFromContext(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticPosition")), pPropStyleContext, pStylesCtxt ) >>= m_bAutoPosition;
+ }
+}
+
+// ========================================
+
+SchXMLCoordinateRegionContext::SchXMLCoordinateRegionContext(
+ SvXMLImport& rImport
+ , sal_uInt16 nPrefix
+ , const rtl::OUString& rLocalName
+ , SchXMLPositonAttributesHelper& rPositioning )
+ : SvXMLImportContext( rImport, nPrefix, rLocalName )
+ , m_rPositioning( rPositioning )
+{
+}
+
+SchXMLCoordinateRegionContext::~SchXMLCoordinateRegionContext()
+{
+}
+
+void SchXMLCoordinateRegionContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ // parse attributes
+ sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
+
+ for( sal_Int16 i = 0; i < nAttrCount; i++ )
+ {
+ rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
+ rtl::OUString aLocalName;
+ rtl::OUString aValue = xAttrList->getValueByIndex( i );
+ USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ m_rPositioning.readPositioningAttribute( nPrefix, aLocalName, aValue );
+ }
+}
+
+// ========================================
+
SchXMLWallFloorContext::SchXMLWallFloorContext(
SchXMLImportHelper& rImpHelper,
SvXMLImport& rImport,
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx
index 56aa3e78c814..1f0de466dcb1 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx
@@ -66,6 +66,43 @@ private:
SchXML3DSceneAttributesHelper();
};
+// ----------------------------------------
+
+class SchXMLPositonAttributesHelper
+{
+public:
+ SchXMLPositonAttributesHelper( SvXMLImport& rImporter );
+ ~SchXMLPositonAttributesHelper();
+
+ bool readPositioningAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue );
+ void readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt );
+
+ bool hasPosSize() const;
+ bool isAutomatic() const;
+ ::com::sun::star::awt::Rectangle getRectangle() const;
+
+
+private:
+ bool hasSize() const;
+ bool hasPosition() const;
+ ::com::sun::star::awt::Size getSize() const;
+ ::com::sun::star::awt::Point getPosition() const;
+
+ SvXMLImport& m_rImport;
+
+ ::com::sun::star::awt::Point m_aPosition;
+ ::com::sun::star::awt::Size m_aSize;
+
+ bool m_bHasSizeWidth;
+ bool m_bHasSizeHeight;
+ bool m_bHasPositionX;
+ bool m_bHasPositionY;
+ sal_Bool m_bAutoSize;
+ sal_Bool m_bAutoPosition;
+};
+
+// ----------------------------------------
+
class SchXMLPlotAreaContext : public SvXMLImportContext
{
public:
@@ -110,10 +147,8 @@ private:
GlobalSeriesImportInfo m_aGlobalSeriesImportInfo;
SchXML3DSceneAttributesHelper maSceneImportHelper;
- ::com::sun::star::awt::Size maSize;
- ::com::sun::star::awt::Point maPosition;
- bool mbHasSize;
- bool mbHasPosition;
+ SchXMLPositonAttributesHelper m_aOuterPositioning;//including axes and axes titles
+ SchXMLPositonAttributesHelper m_aInnerPositioning;//excluding axes and axes titles
bool mbPercentStacked;
bool m_bAxisPositionAttributeImported;
::rtl::OUString msAutoStyleName;
@@ -216,6 +251,23 @@ public:
// ----------------------------------------
+class SchXMLCoordinateRegionContext : public SvXMLImportContext
+{
+public:
+ SchXMLCoordinateRegionContext(
+ SvXMLImport& rImport
+ , sal_uInt16 nPrefix
+ , const rtl::OUString& rLocalName
+ , SchXMLPositonAttributesHelper& rPositioning );
+ virtual ~SchXMLCoordinateRegionContext();
+ virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+private:
+ SchXMLPositonAttributesHelper& m_rPositioning;
+};
+
+// ----------------------------------------
+
class SchXMLWallFloorContext : public SvXMLImportContext
{
public:
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index 32fe36197a32..582e5aead326 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -757,6 +757,29 @@ void setBuildIDAtImportInfo( uno::Reference< frame::XModel > xModel, Reference<
SvXMLMetaDocumentContext::setBuildId( aGenerator, xImportInfo );
}
+bool isDocumentGeneratedWithOpenOfficeOlderThan3_3( const uno::Reference< frame::XModel >& xChartModel )
+{
+ bool bResult = isDocumentGeneratedWithOpenOfficeOlderThan3_0( xChartModel );
+ if( !bResult )
+ {
+ ::rtl::OUString aGenerator( lcl_getGeneratorFromModel(xChartModel) );
+ if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/3") ) ) != -1 )
+ {
+ if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/300m") ) ) != -1 )
+ {
+ sal_Int32 nBuilId = lcl_getBuildIDFromGenerator( lcl_getGeneratorFromModel(xChartModel) );
+ if( nBuilId>0 && nBuilId<9491 ) //9491 is build id of dev300m76
+ bResult= true;
+ }
+ else if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/310m") ) ) != -1 )
+ bResult= true;
+ else if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/320m") ) ) != -1 )
+ bResult= true;
+ }
+ }
+ return bResult;
+}
+
bool isDocumentGeneratedWithOpenOfficeOlderThan3_0( const uno::Reference< frame::XModel >& xChartModel )
{
bool bResult = isDocumentGeneratedWithOpenOfficeOlderThan2_3( xChartModel );
diff --git a/xmloff/source/chart/SchXMLTools.hxx b/xmloff/source/chart/SchXMLTools.hxx
index 0b77d8e6d38a..bcc39ae3d114 100644
--- a/xmloff/source/chart/SchXMLTools.hxx
+++ b/xmloff/source/chart/SchXMLTools.hxx
@@ -54,6 +54,7 @@ namespace SchXMLTools
bool isDocumentGeneratedWithOpenOfficeOlderThan2_3( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel);
bool isDocumentGeneratedWithOpenOfficeOlderThan2_4( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel);
bool isDocumentGeneratedWithOpenOfficeOlderThan3_0( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel);
+ bool isDocumentGeneratedWithOpenOfficeOlderThan3_3( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel);
void setBuildIDAtImportInfo( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel
, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xImportInfo );
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index c10ac0a23c03..b1ba8520c1db 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -387,7 +387,7 @@ void SvXMLExport::_InitCtor()
mpNamespaceMap->Add( GetXMLToken(XML_NP_OOOC), GetXMLToken(XML_N_OOOC), XML_NAMESPACE_OOOC );
mpNamespaceMap->Add( GetXMLToken(XML_NP_OF), GetXMLToken(XML_N_OF), XML_NAMESPACE_OF );
- if (getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST)
+ if (getDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
mpNamespaceMap->Add(
GetXMLToken(XML_NP_TABLE_EXT), GetXMLToken(XML_N_TABLE_EXT), XML_NAMESPACE_TABLE_EXT);
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 597a1d50b0f9..c791fe4077d4 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -99,6 +99,7 @@ sal_Char __READONLY_DATA sXML_np__text[] = "_text";
sal_Char __READONLY_DATA sXML_np__table[] = "_table";
sal_Char __READONLY_DATA sXML_np__table_ext[] = "_table_ooo";
sal_Char __READONLY_DATA sXML_np__draw[] = "_draw";
+sal_Char __READONLY_DATA sXML_np__draw_ext[] = "_draw_ooo";
sal_Char __READONLY_DATA sXML_np__dr3d[] = "_dr3d";
sal_Char __READONLY_DATA sXML_np__fo[] = "_fo";
sal_Char __READONLY_DATA sXML_np__xlink[] = "_xlink";
@@ -263,6 +264,9 @@ void SvXMLImport::_InitCtor()
mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__draw ) ),
GetXMLToken(XML_N_DRAW),
XML_NAMESPACE_DRAW );
+ mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__draw_ext ) ),
+ GetXMLToken(XML_N_DRAW_EXT),
+ XML_NAMESPACE_DRAW_EXT );
mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM (sXML_np__dr3d ) ),
GetXMLToken(XML_N_DR3D),
XML_NAMESPACE_DR3D );
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 9b2fb9eea891..83735b77d02c 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -156,6 +156,9 @@ namespace xmloff { namespace token {
TOKEN( "tableooo", XML_NP_TABLE_EXT ),
TOKEN( "http://openoffice.org/2009/table", XML_N_TABLE_EXT ),
+ TOKEN( "drawooo", XML_NP_DRAW_EXT ),
+ TOKEN( "http://openoffice.org/2010/draw", XML_N_DRAW_EXT ),
+
// units
TOKEN( "mm", XML_UNIT_MM ),
TOKEN( "m", XML_UNIT_M ),
@@ -2552,6 +2555,9 @@ namespace xmloff { namespace token {
TOKEN( "dimension", XML_DIMENSION ),
TOKEN( "validation-name", XML_VALIDATION_NAME ),
+ TOKEN( "screen", XML_SCREEN ),
+ TOKEN( "printer", XML_PRINTER ),
+
// XForms token
TOKEN( "model", XML_MODEL ),
TOKEN( "schema", XML_SCHEMA ),
@@ -3096,6 +3102,10 @@ namespace xmloff { namespace token {
TOKEN( "ends-with", XML_ENDS_WITH ),
TOKEN( "does-not-end-with", XML_DOES_NOT_END_WITH ),
+ TOKEN( "chartooo", XML_NP_CHART_EXT ),
+ TOKEN( "http://openoffice.org/2010/chart", XML_N_CHART_EXT ),
+ TOKEN( "coordinate-region", XML_COORDINATE_REGION ),
+
#if OSL_DEBUG_LEVEL > 0
{ 0, NULL, NULL, XML_TOKEN_END }
#else
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 249ce18331d9..862326495a70 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -641,12 +641,17 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent
GetXMLToken(XML_N_ANIMATION),
XML_NAMESPACE_ANIMATION);
- if( getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST )
+ if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
{
_GetNamespaceMap().Add(
GetXMLToken(XML_NP_OFFICE_EXT),
GetXMLToken(XML_N_OFFICE_EXT),
XML_NAMESPACE_OFFICE_EXT);
+
+ _GetNamespaceMap().Add(
+ GetXMLToken(XML_NP_DRAW_EXT),
+ GetXMLToken(XML_N_DRAW_EXT),
+ XML_NAMESPACE_DRAW_EXT);
}
GetShapeExport()->enableLayerExport();
@@ -2808,7 +2813,7 @@ void SdXMLExport::collectAnnotationAutoStyles( const Reference<XDrawPage>& xDraw
void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage )
{
// do not export in ODF 1.2 or older
- if( getDefaultVersion() != SvtSaveOptions::ODFVER_LATEST )
+ if( getDefaultVersion() <= SvtSaveOptions::ODFVER_012 )
return;
Reference< XAnnotationAccess > xAnnotationAccess( xDrawPage, UNO_QUERY );
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index c4f398524a2f..d3dd99967ae9 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -83,6 +83,8 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp,
// #88546# init to FALSE
mbHandleProgressBar( sal_False ),
msZIndex( RTL_CONSTASCII_USTRINGPARAM("ZOrder") ),
+ msPrintable( RTL_CONSTASCII_USTRINGPARAM("Printable") ),
+ msVisible( RTL_CONSTASCII_USTRINGPARAM("Visible") ),
msEmptyPres( RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") ),
msModel( RTL_CONSTASCII_USTRINGPARAM("Model") ),
msStartShape( RTL_CONSTASCII_USTRINGPARAM("StartShape") ),
@@ -471,6 +473,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
mrExport.getInterfaceToIdentifierMapper().registerReference( xConnection );
break;
}
+ case XmlShapeTypePresTableShape:
case XmlShapeTypeDrawTableShape:
{
try
@@ -704,6 +707,39 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
}
}
+ // export draw:display (do not export in ODF 1.2 or older)
+ if( xSet.is() && ( mrExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) )
+ {
+ if( aShapeInfo.meShapeType != XmlShapeTypeDrawPageShape && aShapeInfo.meShapeType != XmlShapeTypePresPageShape &&
+ aShapeInfo.meShapeType != XmlShapeTypeHandoutShape )
+
+ try
+ {
+ sal_Bool bVisible = sal_True;
+ sal_Bool bPrintable = sal_True;
+
+ xSet->getPropertyValue(msVisible) >>= bVisible;
+ xSet->getPropertyValue(msPrintable) >>= bPrintable;
+
+ XMLTokenEnum eDisplayToken = XML_TOKEN_INVALID;
+ const unsigned short nDisplay = (bVisible ? 2 : 0) | (bPrintable ? 1 : 0);
+ switch( nDisplay )
+ {
+ case 0: eDisplayToken = XML_NONE; break;
+ case 1: eDisplayToken = XML_PRINTER; break;
+ case 2: eDisplayToken = XML_SCREEN; break;
+ // case 3: eDisplayToken = XML_ALWAYS break; this is the default
+ }
+
+ if( eDisplayToken != XML_TOKEN_INVALID )
+ mrExport.AddAttribute(XML_NAMESPACE_DRAW_EXT, XML_DISPLAY, eDisplayToken );
+ }
+ catch( uno::Exception& )
+ {
+ DBG_ERROR( "XMLShapeExport::exportShape(), exception caught!" );
+ }
+ }
+
// #82003# test export count
// #91587# ALWAYS increment since now ALL to be exported shapes are counted.
if(mrExport.GetShapeExport()->IsHandleProgressBarEnabled())
@@ -797,6 +833,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
break;
}
+ case XmlShapeTypePresTableShape:
case XmlShapeTypeDrawTableShape:
{
ImpExportTableShape( xShape, aShapeInfo.meShapeType, nFeatures, pRefPoint );
@@ -866,6 +903,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
break;
}
+ case XmlShapeTypePresMediaShape:
case XmlShapeTypeDrawMediaShape:
{
ImpExportMediaShape( xShape, aShapeInfo.meShapeType, nFeatures, pRefPoint );
@@ -1125,7 +1163,7 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x
// get info about presentation shape
uno::Reference <beans::XPropertySet> xPropSet(xShape, uno::UNO_QUERY);
- if(xPropSet.is())
+ if(xPropSet.is()) try
{
rtl::OUString sCLSID;
if(xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("CLSID"))) >>= sCLSID)
@@ -1137,16 +1175,22 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x
}
}
}
+ catch( uno::Exception& )
+ {
+ DBG_ERROR( "XMLShapeExport::ImpCalcShapeType(), expected ole shape to have the CLSID property?" );
+ }
}
else if(aType.EqualsAscii("Chart", 26, 5)) { eShapeType = XmlShapeTypePresChartShape; }
else if(aType.EqualsAscii("OrgChart", 26, 8)) { eShapeType = XmlShapeTypePresOrgChartShape; }
- else if(aType.EqualsAscii("TableShape", 26, 10)) { eShapeType = XmlShapeTypePresSheetShape; }
+ else if(aType.EqualsAscii("CalcShape", 26, 9)) { eShapeType = XmlShapeTypePresSheetShape; }
+ else if(aType.EqualsAscii("TableShape", 26, 10)) { eShapeType = XmlShapeTypePresTableShape; }
else if(aType.EqualsAscii("Notes", 26, 5)) { eShapeType = XmlShapeTypePresNotesShape; }
else if(aType.EqualsAscii("HandoutShape", 26, 12)) { eShapeType = XmlShapeTypeHandoutShape; }
else if(aType.EqualsAscii("HeaderShape", 26, 11)) { eShapeType = XmlShapeTypePresHeaderShape; }
else if(aType.EqualsAscii("FooterShape", 26, 11)) { eShapeType = XmlShapeTypePresFooterShape; }
else if(aType.EqualsAscii("SlideNumberShape", 26, 16)) { eShapeType = XmlShapeTypePresSlideNumberShape; }
else if(aType.EqualsAscii("DateTimeShape", 26, 13)) { eShapeType = XmlShapeTypePresDateTimeShape; }
+ else if(aType.EqualsAscii("MediaShape", 26, 10)) { eShapeType = XmlShapeTypePresMediaShape; }
}
}
}
diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx
index fb1d15f57350..d13b5e24e2db 100644
--- a/xmloff/source/draw/shapeexport2.cxx
+++ b/xmloff/source/draw/shapeexport2.cxx
@@ -31,7 +31,6 @@
#include <com/sun/star/text/XText.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
-#include <com/sun/star/chart/XChartDocument.hpp>
#include <com/sun/star/drawing/CircleKind.hpp>
#include <com/sun/star/drawing/ConnectorType.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
@@ -1247,27 +1246,6 @@ void XMLShapeExport::ImpExportChartShape(
SvXMLAttributeList* pAttrList )
{
ImpExportOLE2Shape( xShape, eShapeType, nFeatures, pRefPoint, pAttrList );
-/*
- // Transformation
- ImpExportNewTrans(xPropSet, nFeatures, pRefPoint);
-
- uno::Reference< chart::XChartDocument > xChartDoc;
- if( !bIsEmptyPresObj )
- xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Model") ) ) >>= xChartDoc;
-
- if( xChartDoc.is() )
- {
- // export chart data if the flag is not set (default)
- sal_Bool bExportOwnData = ( nFeatures & SEF_EXPORT_NO_CHART_DATA ) == 0;
- mrExport.GetChartExport()->exportChart( xChartDoc, bExportOwnData );
- }
- else
- {
- // write chart object (fake for now, replace later)
- SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_CHART, XML_CHART, sal_True, sal_True);
- }
- }
-*/
}
//////////////////////////////////////////////////////////////////////////////
@@ -1996,7 +1974,7 @@ void XMLShapeExport::ImpExportPluginShape(
void XMLShapeExport::ImpExportMediaShape(
const uno::Reference< drawing::XShape >& xShape,
- XmlShapeType, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint)
+ XmlShapeType eShapeType, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint)
{
const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
if(xPropSet.is())
@@ -2004,6 +1982,9 @@ void XMLShapeExport::ImpExportMediaShape(
// Transformation
ImpExportNewTrans(xPropSet, nFeatures, pRefPoint);
+ if(eShapeType == XmlShapeTypePresMediaShape)
+ ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_OBJECT) );
+
sal_Bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210#
SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DRAW,
XML_FRAME, bCreateNewline, sal_True );
diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx
index 710d343ba42c..3f52fcd50084 100644
--- a/xmloff/source/draw/shapeexport4.cxx
+++ b/xmloff/source/draw/shapeexport4.cxx
@@ -1095,7 +1095,7 @@ void XMLShapeExport::ImpExportCustomShape(
}
}
-void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape >& xShape, XmlShapeType /*eShapeType*/, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint )
+void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint )
{
uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
uno::Reference< container::XNamed > xNamed(xShape, uno::UNO_QUERY);
@@ -1109,8 +1109,8 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape
sal_Bool bIsEmptyPresObj = sal_False;
// presentation settings
-// if(eShapeType == XmlShapeTypePresTableShape)
-// bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_TABLE) );
+ if(eShapeType == XmlShapeTypePresTableShape)
+ bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_TABLE) );
const bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 );
const bool bExportEmbedded(0 != (mrExport.getExportFlags() & EXPORT_EMBEDDED));
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index dc362136a3fe..b073e1e28d40 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -167,6 +167,8 @@ SdXMLShapeContext::SdXMLShapeContext(
, mnZOrder(-1)
, maSize(1, 1)
, maPosition(0, 0)
+, mbVisible(true)
+, mbPrintable(true)
{
}
@@ -444,6 +446,20 @@ void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape)
xMultiPropertyStates->setAllPropertiesToDefault();
}
+ if( !mbVisible || !mbPrintable ) try
+ {
+ uno::Reference< beans::XPropertySet > xSet( xShape, uno::UNO_QUERY_THROW );
+ if( !mbVisible )
+ xSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Visible" ) ), uno::Any( sal_False ) );
+
+ if( !mbPrintable )
+ xSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Printable" ) ), uno::Any( sal_False ) );
+ }
+ catch( Exception& )
+ {
+ DBG_ERROR( "SdXMLShapeContext::AddShape(), exception caught!" );
+ }
+
// #107848#
if(!mbTemporaryShape && (!GetImport().HasTextImport()
|| !GetImport().GetTextImport()->IsInsideDeleteContext()))
@@ -777,7 +793,7 @@ void SdXMLShapeContext::SetThumbnail()
void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue )
{
bool bHaveXmlId( false );
- if( XML_NAMESPACE_DRAW == nPrefix )
+ if( (XML_NAMESPACE_DRAW == nPrefix) || (XML_NAMESPACE_DRAW_EXT == nPrefix) )
{
if( IsXMLToken( rLocalName, XML_ZINDEX ) )
{
@@ -807,6 +823,11 @@ void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUStr
{
mnTransform.SetString(rValue, GetImport().GetMM100UnitConverter());
}
+ else if( IsXMLToken( rLocalName, XML_DISPLAY ) )
+ {
+ mbVisible = IsXMLToken( rValue, XML_ALWAYS ) || IsXMLToken( rValue, XML_SCREEN );
+ mbPrintable = IsXMLToken( rValue, XML_ALWAYS ) || IsXMLToken( rValue, XML_PRINTER );
+ }
}
else if( XML_NAMESPACE_PRESENTATION == nPrefix )
{
@@ -2565,7 +2586,7 @@ void SdXMLObjectShapeContext::StartElement( const ::com::sun::star::uno::Referen
}
else if( IsXMLToken( maPresentationClass, XML_PRESENTATION_TABLE ) )
{
- pService = "com.sun.star.presentation.TableShape";
+ pService = "com.sun.star.presentation.CalcShape";
}
else if( IsXMLToken( maPresentationClass, XML_PRESENTATION_OBJECT ) )
{
@@ -2922,8 +2943,21 @@ void SdXMLPluginShapeContext::StartElement( const ::com::sun::star::uno::Referen
const char* pService;
+ sal_Bool bIsPresShape = sal_False;
+
if( mbMedia )
+ {
pService = "com.sun.star.drawing.MediaShape";
+
+ bIsPresShape = maPresentationClass.getLength() && GetImport().GetShapeImport()->IsPresentationShapesSupported();
+ if( bIsPresShape )
+ {
+ if( IsXMLToken( maPresentationClass, XML_PRESENTATION_OBJECT ) )
+ {
+ pService = "com.sun.star.presentation.MediaShape";
+ }
+ }
+ }
else
pService = "com.sun.star.drawing.PluginShape";
@@ -2933,6 +2967,23 @@ void SdXMLPluginShapeContext::StartElement( const ::com::sun::star::uno::Referen
{
SetLayer();
+ if(bIsPresShape)
+ {
+ uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
+ if(xProps.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() );
+ if( xPropsInfo.is() )
+ {
+ if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") )))
+ xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") ), ::cppu::bool2any( sal_False ) );
+
+ if( mbIsUserTransformed && xPropsInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IsPlaceholderDependent") )))
+ xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("IsPlaceholderDependent") ), ::cppu::bool2any( sal_False ) );
+ }
+ }
+ }
+
// set pos, size, shear and rotate
SetTransformation();
GetImport().GetShapeImport()->finishShape( mxShape, mxAttrList, mxShapes );
@@ -3556,8 +3607,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc
{
const char* pService = "com.sun.star.drawing.TableShape";
- sal_Bool bIsPresShape = sal_False; //maPresentationClass.getLength() && GetImport().GetShapeImport()->IsPresentationShapesSupported();
-/*
+ sal_Bool bIsPresShape = maPresentationClass.getLength() && GetImport().GetShapeImport()->IsPresentationShapesSupported();
if( bIsPresShape )
{
if( IsXMLToken( maPresentationClass, XML_PRESENTATION_TABLE ) )
@@ -3565,7 +3615,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc
pService = "com.sun.star.presentation.TableShape";
}
}
-*/
+
AddShape( pService );
if( mxShape.is() )
diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx
index 18453a8936af..bf15534fc260 100644
--- a/xmloff/source/draw/ximpshap.hxx
+++ b/xmloff/source/draw/ximpshap.hxx
@@ -83,6 +83,9 @@ protected:
com::sun::star::awt::Size maSize;
com::sun::star::awt::Point maPosition;
+ bool mbVisible;
+ bool mbPrintable;
+
/** if bSupportsStyle is false, auto styles will be set but not a style */
void SetStyle( bool bSupportsStyle = true );
void SetLayer();
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index 88abf8ad988a..115b06c4c2ad 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -2034,10 +2034,7 @@ namespace xmloff
OAttributeMetaData::getFormAttributeName(eStringPropertyIds[i]),
aStringPropertyNames[i]);
- // Since as per ODF 1.2, xlink:href and xlink:type need to exist either both or none,
- // we need to write xlink:type, too, even if it carries no information.
- // #i111035# / 2010-04-141/ frank.schoenheit@sun.com
- AddAttributeASCII( XML_NAMESPACE_XLINK, "type", "simple" );
+ // #i112082# xlink:type is added as part of exportTargetLocationAttribute
// now export the data source name or databaselocation or connection resource
::rtl::OUString sPropValue;
diff --git a/xmloff/source/forms/valueproperties.cxx b/xmloff/source/forms/valueproperties.cxx
index 3515dcf96010..1c44db963944 100644
--- a/xmloff/source/forms/valueproperties.cxx
+++ b/xmloff/source/forms/valueproperties.cxx
@@ -116,7 +116,7 @@ namespace xmloff
void OValuePropertiesMetaData::getValueLimitPropertyNames(sal_Int16 _nFormComponentType,
sal_Char const * & _rpMinValuePropertyName, sal_Char const * & _rpMaxValuePropertyName)
{
- _rpMinValuePropertyName = _rpMinValuePropertyName = NULL;
+ _rpMinValuePropertyName = _rpMaxValuePropertyName = NULL;
switch (_nFormComponentType)
{
case FormComponentType::DATEFIELD:
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index 7affab134134..ad3a1f96752f 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -353,6 +353,8 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
// get the current row
Reference< XCellRange > xCellRange( xIndexAccess->getByIndex(rowIndex), UNO_QUERY_THROW );
+ OUString sDefaultCellStyle;
+
// table:style-name
if( pTableInfo.get() )
{
@@ -360,11 +362,11 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
const OUString sStyleName( pTableInfo->maRowStyleMap[xKey] );
if( sStyleName.getLength() )
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, sStyleName );
- }
- const OUString sDefaultCellStyle( pTableInfo->maDefaultRowCellStyles[rowIndex] );
- if( sDefaultCellStyle.getLength() )
- mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DEFAULT_CELL_STYLE_NAME, sDefaultCellStyle );
+ sDefaultCellStyle = pTableInfo->maDefaultRowCellStyles[rowIndex];
+ if( sDefaultCellStyle.getLength() )
+ mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DEFAULT_CELL_STYLE_NAME, sDefaultCellStyle );
+ }
// write row element
SvXMLElementExport tableRowElement( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_ROW, sal_True, sal_True );
diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx
index 0a0437426a3c..7cf96abea2e2 100644
--- a/xmloff/source/text/XMLSectionExport.cxx
+++ b/xmloff/source/text/XMLSectionExport.cxx
@@ -917,7 +917,7 @@ void XMLSectionExport::ExportBaseIndexSource(
void XMLSectionExport::ExportBaseIndexBody(
SectionTypeEnum
- #ifdef DBG_UTIL
+ #if OSL_DEBUG_LEVEL > 0
eType
#endif
,
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index bc01112d9b03..87710d310d76 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -119,7 +119,7 @@ using namespace ::com::sun::star::lang;
using namespace ::xmloff::token;
using ::com::sun::star::util::DateTime;
using namespace ::com::sun::star::ucb;
-
+using namespace ::com::sun::star;
using ::comphelper::UStringLess;
@@ -1823,8 +1823,28 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
Reference<XTextContent> xTextContent(xTmp, UNO_QUERY);
if (m_pImpl->m_xText.is() && xRange.is())
{
- m_pImpl->m_xText->insertTextContent(
- xRange, xTextContent, sal_True);
+ // #i107225# the combined characters need to be inserted first
+ // the selected text has to be removed afterwards
+ m_pImpl->m_xText->insertTextContent( xRange->getStart(), xTextContent, sal_True );
+
+ if( xRange->getString().getLength() )
+ {
+ try
+ {
+ uno::Reference< text::XTextCursor > xCrsr = xRange->getText()->createTextCursorByRange( xRange->getStart() );
+ xCrsr->goLeft( 1, true );
+ uno::Reference< beans::XPropertySet> xCrsrProperties( xCrsr, uno::UNO_QUERY_THROW );
+ //the hard properties of the removed text need to be applied to the combined characters field
+ pStyle->FillPropertySet( xCrsrProperties );
+ xCrsr->collapseToEnd();
+ xCrsr->gotoRange( xRange->getEnd(), true );
+ xCrsr->setString( ::rtl::OUString() );
+ }
+ catch( const uno::Exception& rEx )
+ {
+ (void)rEx;
+ }
+ }
}
}
}
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
index b30c24b4b419..1d9e67d23d28 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
@@ -653,6 +653,8 @@ void ElementDescriptor::readTreeControlModel( StyleBag * all_styles )
// collect elements
readDefaults();
+ readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
readSelectionTypeAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("SelectionType") ),
OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":selectiontype") ) );
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index e3bce073b0b1..a0968eb007d5 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -930,6 +930,9 @@ void TreeControlElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
+ ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("tabstop") ),
+ _xAttributes );
ctx.importSelectionTypeProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("SelectionType") ),
OUString( RTL_CONSTASCII_USTRINGPARAM("selectiontype") ),
_xAttributes );