summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2.cxx2
-rw-r--r--basctl/source/basicide/basidesh.cxx2
-rw-r--r--basctl/source/basicide/basobj2.cxx18
-rw-r--r--basctl/source/basicide/macrodlg.cxx16
-rw-r--r--basic/inc/basic/sbmod.hxx4
-rw-r--r--basic/inc/basic/sbxvar.hxx12
-rw-r--r--[-rwxr-xr-x]basic/source/classes/sb.cxx130
-rwxr-xr-xbasic/source/classes/sbunoobj.cxx23
-rw-r--r--basic/source/comp/codegen.cxx12
-rw-r--r--basic/source/comp/dim.cxx70
-rw-r--r--basic/source/comp/exprgen.cxx73
-rw-r--r--basic/source/comp/exprtree.cxx10
-rw-r--r--basic/source/comp/makefile.mk33
-rwxr-xr-xbasic/source/comp/sbcomp.cxx2
-rw-r--r--basic/source/inc/expr.hxx3
-rw-r--r--basic/source/inc/parser.hxx5
-rw-r--r--basic/source/inc/sbintern.hxx6
-rw-r--r--basic/source/inc/sbunoobj.hxx1
-rw-r--r--basic/source/inc/symtbl.hxx3
-rw-r--r--basic/source/runtime/methods1.cxx14
-rw-r--r--basic/source/runtime/step0.cxx223
-rw-r--r--basic/source/sbx/sbxbool.cxx18
-rw-r--r--basic/source/sbx/sbxbyte.cxx10
-rw-r--r--basic/source/sbx/sbxchar.cxx15
-rw-r--r--basic/source/sbx/sbxconv.hxx16
-rw-r--r--basic/source/sbx/sbxcurr.cxx26
-rw-r--r--basic/source/sbx/sbxdate.cxx12
-rw-r--r--basic/source/sbx/sbxdbl.cxx10
-rw-r--r--basic/source/sbx/sbxdec.cxx20
-rw-r--r--basic/source/sbx/sbxdec.hxx4
-rw-r--r--basic/source/sbx/sbxint.cxx38
-rw-r--r--basic/source/sbx/sbxlng.cxx10
-rw-r--r--basic/source/sbx/sbxres.cxx2
-rw-r--r--basic/source/sbx/sbxres.hxx2
-rw-r--r--basic/source/sbx/sbxscan.cxx37
-rw-r--r--basic/source/sbx/sbxsng.cxx10
-rw-r--r--basic/source/sbx/sbxstr.cxx50
-rw-r--r--basic/source/sbx/sbxuint.cxx10
-rw-r--r--basic/source/sbx/sbxulng.cxx10
-rw-r--r--basic/source/sbx/sbxvalue.cxx105
-rw-r--r--basic/source/sbx/sbxvar.cxx40
-rw-r--r--canvas/source/cairo/cairo_canvashelper.cxx1
-rw-r--r--canvas/source/vcl/canvashelper_texturefill.cxx1
-rw-r--r--chart2/source/controller/main/ChartController_Tools.cxx12
-rwxr-xr-xchart2/source/model/main/ChartModel.cxx1
-rw-r--r--comphelper/source/misc/uieventslogger.cxx9
-rw-r--r--configmgr/source/README1
-rw-r--r--configmgr/source/access.cxx23
-rw-r--r--configmgr/source/additions.hxx43
-rw-r--r--configmgr/source/broadcaster.cxx63
-rw-r--r--configmgr/source/components.cxx138
-rw-r--r--configmgr/source/components.hxx15
-rw-r--r--configmgr/source/data.cxx44
-rw-r--r--configmgr/source/data.hxx23
-rw-r--r--configmgr/source/modifications.cxx21
-rw-r--r--configmgr/source/modifications.hxx2
-rw-r--r--configmgr/source/update.cxx17
-rw-r--r--configmgr/source/xcdparser.cxx2
-rw-r--r--configmgr/source/xcsparser.cxx10
-rw-r--r--configmgr/source/xcuparser.cxx30
-rw-r--r--configmgr/source/xcuparser.hxx6
-rw-r--r--connectivity/source/commontools/formattedcolumnvalue.cxx13
-rw-r--r--connectivity/source/drivers/odbcbase/OTools.cxx2
-rw-r--r--cui/source/customize/cfg.cxx27
-rw-r--r--cui/source/options/optimprove2.cxx18
-rw-r--r--dbaccess/source/core/api/KeySet.cxx44
-rw-r--r--dbaccess/source/core/api/KeySet.hxx1
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx17
-rw-r--r--dbaccess/source/core/inc/DatabaseDataProvider.hxx27
-rw-r--r--dbaccess/source/core/misc/DatabaseDataProvider.cxx95
-rw-r--r--dbaccess/source/ui/app/AppController.cxx11
-rw-r--r--dbaccess/source/ui/app/subcomponentmanager.cxx10
-rw-r--r--dbaccess/source/ui/app/subcomponentmanager.hxx3
-rw-r--r--desktop/inc/app.hxx3
-rw-r--r--desktop/source/app/app.cxx20
-rw-r--r--desktop/source/app/appfirststart.cxx102
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx26
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx406
-rwxr-xr-x[-rw-r--r--]desktop/util/verinfo.rc8
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/applauncher/ooo/verinfo.rc4
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/applauncher/verinfo.rc8
-rw-r--r--desktop/win32/source/officeloader/officeloader.cxx1
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx7
-rw-r--r--editeng/inc/editeng/unoipset.hxx1
-rw-r--r--editeng/source/editeng/eehtml.cxx12
-rwxr-xr-xediteng/source/editeng/impedit.hxx3
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/impedit4.cxx369
-rw-r--r--editeng/source/misc/svxacorr.cxx24
-rw-r--r--editeng/source/uno/unoipset.cxx21
-rw-r--r--extensions/source/oooimprovement/onlogrotate_job.cxx43
-rw-r--r--extensions/source/plugin/unx/npnapi.cxx31
-rw-r--r--extensions/source/plugin/unx/nppapi.cxx31
-rw-r--r--extras/source/autotext/lang/fr/acor_fr-FR.datbin31897 -> 4650 bytes
-rw-r--r--extras/source/autotext/lang/pt-BR/acor_pt-BR.datbin469488 -> 40513 bytes
-rw-r--r--filter/source/config/fragments/filters/MathML_XML__Math_.xcu2
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/ras_Export.xcu2
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/svg_Export.xcu2
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/tif_Export.xcu2
-rw-r--r--filter/source/config/fragments/internalgraphicfilters/xpm_Export.xcu2
-rw-r--r--filter/source/graphicfilter/egif/dlgegif.cxx108
-rw-r--r--filter/source/graphicfilter/egif/dlgegif.hrc36
-rw-r--r--filter/source/graphicfilter/egif/dlgegif.hxx71
-rw-r--r--filter/source/graphicfilter/egif/dlgegif.src118
-rw-r--r--filter/source/graphicfilter/egif/egif.cxx28
-rw-r--r--filter/source/graphicfilter/egif/egifstr.src39
-rw-r--r--filter/source/graphicfilter/egif/exports.map1
-rw-r--r--filter/source/graphicfilter/egif/makefile.mk9
-rw-r--r--filter/source/graphicfilter/egif/strings.hrc28
-rw-r--r--filter/source/graphicfilter/eos2met/dlgeos2.cxx179
-rw-r--r--filter/source/graphicfilter/eos2met/dlgeos2.hrc41
-rw-r--r--filter/source/graphicfilter/eos2met/dlgeos2.hxx80
-rw-r--r--filter/source/graphicfilter/eos2met/dlgeos2.src162
-rw-r--r--filter/source/graphicfilter/eos2met/eos2met.cxx28
-rw-r--r--filter/source/graphicfilter/eos2met/eos2mstr.src38
-rw-r--r--filter/source/graphicfilter/eos2met/exports.map1
-rw-r--r--filter/source/graphicfilter/eos2met/makefile.mk9
-rw-r--r--filter/source/graphicfilter/eos2met/strings.hrc29
-rw-r--r--filter/source/graphicfilter/epbm/dlgepbm.cxx99
-rw-r--r--filter/source/graphicfilter/epbm/dlgepbm.hrc34
-rw-r--r--filter/source/graphicfilter/epbm/dlgepbm.hxx71
-rw-r--r--filter/source/graphicfilter/epbm/dlgepbm.src106
-rw-r--r--filter/source/graphicfilter/epbm/epbm.cxx28
-rw-r--r--filter/source/graphicfilter/epbm/epbmstr.src35
-rw-r--r--filter/source/graphicfilter/epbm/exports.map1
-rw-r--r--filter/source/graphicfilter/epbm/makefile.mk8
-rw-r--r--filter/source/graphicfilter/epbm/strings.hrc27
-rw-r--r--filter/source/graphicfilter/epgm/dlgepgm.cxx97
-rw-r--r--filter/source/graphicfilter/epgm/dlgepgm.hrc34
-rw-r--r--filter/source/graphicfilter/epgm/dlgepgm.hxx71
-rw-r--r--filter/source/graphicfilter/epgm/dlgepgm.src105
-rw-r--r--filter/source/graphicfilter/epgm/epgm.cxx28
-rw-r--r--filter/source/graphicfilter/epgm/epgmstr.src35
-rw-r--r--filter/source/graphicfilter/epgm/exports.map1
-rw-r--r--filter/source/graphicfilter/epgm/makefile.mk8
-rw-r--r--filter/source/graphicfilter/epgm/strings.hrc27
-rw-r--r--filter/source/graphicfilter/epict/dlgepct.cxx183
-rw-r--r--filter/source/graphicfilter/epict/dlgepct.hrc41
-rw-r--r--filter/source/graphicfilter/epict/dlgepct.hxx80
-rw-r--r--filter/source/graphicfilter/epict/dlgepct.src163
-rw-r--r--filter/source/graphicfilter/epict/epict.cxx28
-rw-r--r--filter/source/graphicfilter/epict/epictstr.src38
-rw-r--r--filter/source/graphicfilter/epict/exports.map1
-rw-r--r--filter/source/graphicfilter/epict/makefile.mk8
-rw-r--r--filter/source/graphicfilter/epict/strings.hrc29
-rw-r--r--filter/source/graphicfilter/eppm/dlgeppm.cxx96
-rw-r--r--filter/source/graphicfilter/eppm/dlgeppm.hrc34
-rw-r--r--filter/source/graphicfilter/eppm/dlgeppm.hxx71
-rw-r--r--filter/source/graphicfilter/eppm/dlgeppm.src106
-rw-r--r--filter/source/graphicfilter/eppm/eppm.cxx27
-rw-r--r--filter/source/graphicfilter/eppm/eppmstr.src35
-rw-r--r--filter/source/graphicfilter/eppm/exports.map1
-rw-r--r--filter/source/graphicfilter/eppm/makefile.mk8
-rw-r--r--filter/source/graphicfilter/eppm/strings.hrc27
-rw-r--r--filter/source/graphicfilter/eps/dlgeps.cxx206
-rw-r--r--filter/source/graphicfilter/eps/dlgeps.hrc43
-rw-r--r--filter/source/graphicfilter/eps/dlgeps.hxx82
-rw-r--r--filter/source/graphicfilter/eps/dlgeps.src160
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx28
-rw-r--r--filter/source/graphicfilter/eps/exports.map1
-rw-r--r--filter/source/graphicfilter/eps/makefile.mk6
-rw-r--r--filter/source/pdf/pdfexport.cxx14
-rw-r--r--forms/source/component/FormComponent.cxx104
-rw-r--r--forms/source/component/ImageControl.cxx177
-rw-r--r--forms/source/component/ImageControl.hxx15
-rw-r--r--forms/source/component/imgprod.cxx3
-rw-r--r--forms/source/inc/FormComponent.hxx22
-rw-r--r--forms/source/inc/frm_strings.hxx1
-rw-r--r--forms/source/inc/property.hrc2
-rw-r--r--forms/source/misc/property.cxx1
-rw-r--r--framework/inc/classes/framelistanalyzer.hxx25
-rw-r--r--framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx1
-rw-r--r--framework/prj/d.lst1
-rw-r--r--framework/source/accelerators/acceleratorconfiguration.cxx5
-rw-r--r--framework/source/loadenv/loadenv.cxx3
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx72
-rw-r--r--framework/util/makefile.mk2
-rw-r--r--i18npool/source/transliteration/transliterationImpl.cxx1
-rwxr-xr-xi18npool/source/transliteration/transliteration_body.cxx273
-rw-r--r--l10ntools/java/jpropex/java/JPropEx.java17
-rw-r--r--l10ntools/prj/build.lst3
-rw-r--r--l10ntools/prj/d.lst16
-rwxr-xr-x[-rw-r--r--]l10ntools/scripts/localize.pl2
-rw-r--r--l10ntools/scripts/makefile.mk59
-rw-r--r--l10ntools/scripts/tool/sdf.py11
-rw-r--r--l10ntools/scripts/tool/xhtex.py2
-rw-r--r--l10ntools/scripts/tool/xtxex.py3
-rwxr-xr-xl10ntools/scripts/xhtex4
-rwxr-xr-xl10ntools/scripts/xtxex4
-rw-r--r--l10ntools/source/help/HelpIndexerTool.java24
-rw-r--r--l10ntools/source/help/HelpLinker.cxx117
-rw-r--r--libegg/source/eggtrayicon.c7
-rw-r--r--libegg/source/makefile.mk2
-rw-r--r--more_fonts/fonts/ttf_dejavu/makefile.mk6
-rw-r--r--more_fonts/prj/d.lst4
-rw-r--r--moz/makefile.mk3
-rw-r--r--moz/patches/brokenmakefile.patch13
-rw-r--r--offapi/com/sun/star/awt/UnoControlComboBoxModel.idl6
-rw-r--r--offapi/com/sun/star/awt/UnoControlListBoxModel.idl11
-rw-r--r--offapi/com/sun/star/configuration/XUpdate.idl6
-rw-r--r--offapi/com/sun/star/sheet/DataPilotSourceDimension.idl8
-rw-r--r--offapi/com/sun/star/sheet/DimensionFlags.idl74
-rw-r--r--offapi/com/sun/star/sheet/makefile.mk1
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs356
-rw-r--r--officecfg/registry/schema/org/openoffice/Setup.xcs9
-rw-r--r--[-rwxr-xr-x]ooo_custom_images/dev_nologo_broffice/introabout/intro.pngbin14999 -> 12219 bytes
-rw-r--r--[-rwxr-xr-x]ooo_custom_images/nologo_broffice/introabout/intro.pngbin11692 -> 9412 bytes
-rw-r--r--oovbaapi/ooo/vba/excel/XGlobals.idl7
-rw-r--r--oovbaapi/ooo/vba/excel/XWorksheet.idl2
-rw-r--r--oox/prj/d.lst1
-rw-r--r--postprocess/checkdeliver/checkdeliver.pl3
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java10
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java7
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java9
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java4
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java3
-rw-r--r--[-rwxr-xr-x]reportbuilder/util/description.xml2
-rw-r--r--reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx18
-rw-r--r--sal/inc/rtl/math.h20
-rw-r--r--sal/osl/w32/signal.cxx2
-rw-r--r--sal/rtl/source/math.cxx292
-rw-r--r--sal/textenc/convertadobe.tab2
-rw-r--r--sax/source/tools/fastserializer.cxx66
-rw-r--r--sc/inc/ViewSettingsSequenceDefines.hxx2
-rw-r--r--sc/inc/dpobject.hxx4
-rw-r--r--sc/inc/dpsave.hxx1
-rw-r--r--sc/inc/pivot.hxx1
-rw-r--r--sc/inc/scmatrix.hxx11
-rw-r--r--sc/inc/unonames.hxx1
-rw-r--r--[-rwxr-xr-x]sc/source/core/data/dpobject.cxx35
-rw-r--r--sc/source/core/data/dpsave.cxx5
-rw-r--r--[-rwxr-xr-x]sc/source/core/data/dptabsrc.cxx6
-rw-r--r--sc/source/core/data/pivot2.cxx1
-rw-r--r--sc/source/core/data/table2.cxx11
-rw-r--r--sc/source/core/tool/interpr1.cxx27
-rwxr-xr-x[-rw-r--r--]sc/source/core/tool/interpr4.cxx13
-rw-r--r--sc/source/core/tool/interpr5.cxx19
-rw-r--r--sc/source/core/tool/scmatrix.cxx5
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx10
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx5
-rw-r--r--sc/source/ui/dbgui/pvlaydlg.cxx57
-rw-r--r--sc/source/ui/inc/pvlaydlg.hxx1
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx1
-rw-r--r--sc/source/ui/vba/makefile.mk92
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx610
-rw-r--r--sc/source/ui/vba/vbaglobals.cxx28
-rw-r--r--sc/source/ui/vba/vbaglobals.hxx3
-rw-r--r--sc/source/ui/vba/vbanames.cxx5
-rwxr-xr-xsc/source/ui/vba/vbarange.cxx48
-rw-r--r--sc/source/ui/vba/vbaworkbook.cxx19
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx2
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx45
-rw-r--r--sc/source/ui/vba/vbaworksheet.hxx6
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx2
-rw-r--r--sc/source/ui/view/gridwin2.cxx13
-rw-r--r--sc/source/ui/view/prevwsh.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx8
-rw-r--r--[-rwxr-xr-x]scp2/source/ooo/file_ooo.scp6
-rw-r--r--scp2/source/ooo/file_resource_ooo.scp6
-rwxr-xr-xscp2/source/ooo/module_lang_template.scp6
-rw-r--r--scripting/source/basprov/basmodnode.cxx14
-rw-r--r--scripting/source/basprov/basprov.cxx2
-rwxr-xr-x[-rw-r--r--]sd/inc/FactoryIds.hxx3
-rwxr-xr-xsd/source/core/sdpage.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/filter/ppt/propread.cxx128
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/CustomAnimationList.hxx1
-rwxr-xr-xsd/source/ui/app/strings.src4
-rwxr-xr-xsd/source/ui/dlg/PaneChildWindows.cxx26
-rwxr-xr-xsd/source/ui/inc/strings.hrc1
-rw-r--r--sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx4
-rw-r--r--sd/source/ui/slidesorter/model/SlideSorterModel.cxx2
-rw-r--r--sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx2
-rw-r--r--sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx8
-rwxr-xr-xsd/source/ui/toolpanel/ToolPanelViewShell.cxx17
-rwxr-xr-xsd/source/ui/toolpanel/controls/DocumentHelper.cxx93
-rwxr-xr-xsd/source/ui/view/GraphicViewShellBase.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/ImpressViewShellBase.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/OutlineViewShellBase.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/PresentationViewShellBase.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/SlideSorterViewShellBase.cxx2
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx2
-rwxr-xr-xsd/source/ui/view/sdwindow.cxx4
-rw-r--r--sdext/prj/build.lst2
-rw-r--r--sdext/prj/d.lst2
-rw-r--r--sdext/source/minimizer/aboutdialog.cxx276
-rw-r--r--sdext/source/minimizer/aboutdialog.hxx91
-rw-r--r--sdext/source/minimizer/informationdialog.cxx7
-rw-r--r--[-rwxr-xr-x]sdext/source/minimizer/makefile.mk15
-rw-r--r--sdext/source/minimizer/pppoptimizerdialog.cxx6
-rw-r--r--sdext/source/minimizer/pppoptimizertoken.cxx3
-rw-r--r--sdext/source/minimizer/pppoptimizertoken.hxx3
-rw-r--r--sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu26
-rw-r--r--sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs24
-rw-r--r--sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp10
-rw-r--r--[-rwxr-xr-x]sdext/source/presenter/makefile.mk36
-rw-r--r--setup_native/source/packinfo/spellchecker_selection.txt1
-rw-r--r--sfx2/inc/sfx2/docfac.hxx2
-rw-r--r--sfx2/inc/sfx2/docfile.hxx1
-rw-r--r--sfx2/inc/sfx2/viewfrm.hxx1
-rw-r--r--sfx2/inc/sfx2/viewsh.hxx4
-rw-r--r--sfx2/inc/viewfac.hxx17
-rw-r--r--sfx2/source/dialog/taskpane.cxx9
-rw-r--r--sfx2/source/doc/DocumentMetadataAccess.cxx25
-rw-r--r--sfx2/source/doc/docfac.cxx19
-rw-r--r--sfx2/source/doc/docfile.cxx47
-rw-r--r--sfx2/source/doc/doctemplates.cxx2
-rw-r--r--[-rwxr-xr-x]sfx2/source/doc/objmisc.cxx2
-rw-r--r--sfx2/source/doc/objserv.cxx9
-rw-r--r--sfx2/source/doc/objstor.cxx36
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx7
-rw-r--r--sfx2/source/view/frmload.cxx2
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx51
-rw-r--r--sfx2/source/view/viewfac.cxx19
-rw-r--r--sfx2/source/view/viewfrm.cxx94
-rw-r--r--solenv/bin/build.pl7
-rwxr-xr-xsolenv/bin/deliver.pl14
-rw-r--r--solenv/bin/modules/RepositoryHelper.pm17
-rw-r--r--solenv/bin/transform_description.pl4
-rw-r--r--solenv/inc/extension_helplink.mk80
-rw-r--r--solenv/inc/extension_post.mk4
-rw-r--r--solenv/inc/minor.mk6
-rw-r--r--[-rwxr-xr-x]solenv/inc/tg_help.mk30
-rwxr-xr-xsolenv/inc/tg_xmerge.mk17
-rw-r--r--sot/source/sdstor/stgio.cxx2
-rw-r--r--starmath/inc/starmath.hrc2
-rwxr-xr-xstarmath/source/smres.src4
-rwxr-xr-x[-rw-r--r--]starmath/source/view.cxx2
-rw-r--r--svtools/inc/svtools/svtools.hrc19
-rw-r--r--svtools/inc/svtools/svtreebx.hxx1
-rw-r--r--svtools/inc/svtools/table/tabledatawindow.hxx1
-rw-r--r--svtools/source/contnr/svimpbox.cxx8
-rw-r--r--svtools/source/contnr/svtreebx.cxx5
-rw-r--r--svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx143
-rw-r--r--svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx18
-rw-r--r--svtools/source/filter.vcl/filter/dlgejpg.cxx96
-rw-r--r--svtools/source/filter.vcl/filter/dlgejpg.hrc39
-rw-r--r--svtools/source/filter.vcl/filter/dlgejpg.hxx72
-rw-r--r--svtools/source/filter.vcl/filter/dlgejpg.src136
-rw-r--r--svtools/source/filter.vcl/filter/dlgepng.cxx90
-rw-r--r--svtools/source/filter.vcl/filter/dlgepng.hrc35
-rw-r--r--svtools/source/filter.vcl/filter/dlgepng.hxx71
-rw-r--r--svtools/source/filter.vcl/filter/dlgepng.src119
-rw-r--r--svtools/source/filter.vcl/filter/dlgexpor.cxx442
-rw-r--r--svtools/source/filter.vcl/filter/dlgexpor.hrc58
-rw-r--r--svtools/source/filter.vcl/filter/dlgexpor.hxx127
-rw-r--r--svtools/source/filter.vcl/filter/dlgexpor.src315
-rwxr-xr-xsvtools/source/filter.vcl/filter/exportdialog.cxx1513
-rwxr-xr-xsvtools/source/filter.vcl/filter/exportdialog.hrc99
-rwxr-xr-xsvtools/source/filter.vcl/filter/exportdialog.hxx216
-rwxr-xr-xsvtools/source/filter.vcl/filter/exportdialog.src505
-rw-r--r--svtools/source/filter.vcl/filter/filter.cxx10
-rw-r--r--svtools/source/filter.vcl/filter/makefile.mk35
-rw-r--r--svtools/source/filter.vcl/filter/strings.hrc27
-rw-r--r--svtools/source/filter.vcl/filter/strings.src85
-rw-r--r--svtools/source/graphic/provider.cxx8
-rw-r--r--svtools/source/table/defaultinputhandler.cxx1
-rw-r--r--svtools/source/table/tabledatawindow.cxx7
-rw-r--r--svtools/source/uno/treecontrolpeer.cxx18
-rw-r--r--svtools/source/uno/wizard/unowizard.cxx2
-rw-r--r--svx/source/dialog/checklbx.cxx9
-rwxr-xr-x[-rw-r--r--]svx/source/dialog/svxruler.cxx25
-rw-r--r--svx/source/unodraw/unoshape.cxx1
-rw-r--r--sw/inc/undobj.hxx6
-rw-r--r--sw/source/core/attr/cellatr.cxx11
-rw-r--r--sw/source/core/doc/docedt.cxx33
-rw-r--r--sw/source/core/txtnode/txtedt.cxx271
-rw-r--r--sw/source/core/undo/makefile.mk1
-rw-r--r--sw/source/core/undo/unovwr.cxx136
-rw-r--r--sw/source/core/unocore/unotbl.cxx9
-rw-r--r--sw/source/ui/uiview/pview.cxx2
-rw-r--r--sw/source/ui/uiview/srcview.cxx2
-rw-r--r--sw/source/ui/uiview/view0.cxx2
-rw-r--r--sw/source/ui/web/wview.cxx2
-rw-r--r--swext/mediawiki/build.xml16
-rw-r--r--swext/mediawiki/help/makefile.mk60
-rw-r--r--swext/prj/build.lst2
-rw-r--r--sysui/desktop/cleanversion/makefile.mk2
-rw-r--r--[-rwxr-xr-x]testautomation/dbaccess/optional/includes/db_Mozilla.inc34
-rw-r--r--[-rwxr-xr-x]testautomation/dbaccess/optional/includes/frm_FormFilter.inc10
-rw-r--r--[-rwxr-xr-x]testautomation/dbaccess/optional/includes/frm_Forms.inc10
-rw-r--r--[-rwxr-xr-x]testautomation/dbaccess/optional/includes/rpt_Formating.inc12
-rw-r--r--[-rwxr-xr-x]testautomation/dbaccess/optional/includes/xf_Submission.inc9
-rw-r--r--[-rwxr-xr-x]testautomation/framework/optional/includes/security_certification_dialogs.inc2
-rwxr-xr-xtestautomation/framework/required/includes/window_functions.inc3
-rwxr-xr-xtestautomation/global/win/dial_a_c.win10
-rwxr-xr-xtestautomation/global/win/dial_d_h.win28
-rwxr-xr-xtestautomation/global/win/dial_i_o.win11
-rwxr-xr-xtestautomation/global/win/dial_p_s.win28
-rwxr-xr-xtestautomation/global/win/dial_t_z.win6
-rwxr-xr-xtestautomation/global/win/edia_a_c.win10
-rwxr-xr-xtestautomation/global/win/edia_d_h.win27
-rwxr-xr-xtestautomation/global/win/edia_i_o.win14
-rwxr-xr-x[-rw-r--r--]testautomation/global/win/edia_p_s.win46
-rwxr-xr-xtestautomation/global/win/edia_t_z.win5
-rw-r--r--testautomation/graphics/optional/includes/global/export_graphic.inc197
-rw-r--r--testautomation/graphics/optional/includes/global/export_graphic_2.inc652
-rw-r--r--testautomation/graphics/required/includes/global/id_opt_2.inc33
-rw-r--r--testautomation/graphics/required/includes/impress/im_003_.inc3
-rw-r--r--testautomation/graphics/tools/id_tools.inc80
-rw-r--r--testautomation/writer/optional/includes/loadsave/w_loadsave.inc7
-rw-r--r--toolkit/inc/toolkit/awt/vclxwindows.hxx24
-rw-r--r--toolkit/inc/toolkit/controls/unocontrols.hxx57
-rw-r--r--toolkit/inc/toolkit/helper/solarrelease.hxx27
-rw-r--r--toolkit/source/awt/vclxwindow.cxx3
-rw-r--r--toolkit/source/awt/vclxwindows.cxx138
-rw-r--r--toolkit/source/controls/tree/treecontrol.cxx1
-rw-r--r--toolkit/source/controls/unocontrols.cxx223
-rw-r--r--toolkit/source/helper/unowrapper.cxx15
-rw-r--r--tools/source/generic/poly.cxx5
-rw-r--r--ucb/source/core/ucb.cxx151
-rw-r--r--ucb/source/core/ucb.hxx6
-rw-r--r--unotools/inc/unotools/ucbhelper.hxx1
-rw-r--r--unotools/source/config/menuoptions.cxx561
-rw-r--r--unotools/source/ucbhelper/ucbhelper.cxx49
-rw-r--r--uui/source/iahndl-authentication.cxx2
-rw-r--r--vbahelper/inc/vbahelper/vbahelper.hxx7
-rw-r--r--vbahelper/source/msforms/vbauserform.cxx47
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx24
-rw-r--r--vcl/aqua/source/a11y/aqua11yselectionwrapper.mm25
-rw-r--r--vcl/aqua/source/gdi/salgdi.cxx12
-rw-r--r--vcl/aqua/source/gdi/salnativewidgets.cxx8
-rw-r--r--vcl/inc/vcl/arrange.hxx14
-rw-r--r--vcl/inc/vcl/combobox.hxx1
-rw-r--r--vcl/prj/d.lst1
-rw-r--r--vcl/source/control/combobox.cxx8
-rw-r--r--vcl/source/gdi/gdimtf.cxx4
-rwxr-xr-xvcl/source/gdi/print3.cxx22
-rw-r--r--vcl/source/window/seleng.cxx19
-rw-r--r--vcl/source/window/syswin.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkutil.cxx2
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx3
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx64
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkframe.hxx4
-rw-r--r--vcl/unx/source/app/wmadaptor.cxx9
-rw-r--r--vcl/util/makefile.mk2
-rw-r--r--[-rwxr-xr-x]vcl/win/source/gdi/winlayout.cxx4
-rw-r--r--xml2cmp/source/xcd/main.cxx2
-rw-r--r--xmlhelp/prj/d.lst3
-rw-r--r--xmlhelp/util/delzip0
-rw-r--r--xmlhelp/util/embed.xsl83
-rw-r--r--xmlhelp/util/idxcaption.xsl34
-rw-r--r--xmlhelp/util/idxcontent.xsl104
-rw-r--r--xmlhelp/util/main_transform.xsl972
-rw-r--r--xmlhelp/util/makefile.mk6
-rw-r--r--xmloff/inc/xmloff/xmltoken.hxx3
-rw-r--r--xmloff/source/chart/PropertyMap.hxx2
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx42
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx70
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx23
-rw-r--r--xmloff/source/chart/SchXMLTools.hxx2
-rw-r--r--xmloff/source/core/xmltoken.cxx7
-rw-r--r--xmlsecurity/tools/demo/util2.cxx6
453 files changed, 9943 insertions, 9820 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 9f97e1766c3b..d0a8ca1a6ddb 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -365,7 +365,7 @@ BOOL ModulWindow::BasicExecute()
break;
}
}
- else if ( !pMethod || ( nStart < nCurMethodStart ) )
+ else if ( !pMethod || ( nStart < nCurMethodStart && !pM->IsHidden() ) )
{
pMethod = pM;
nCurMethodStart = nStart;
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 2f9303756e09..55dec2566205 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -155,7 +155,7 @@ public:
TYPEINIT1( BasicIDEShell, SfxViewShell );
-SFX_IMPL_VIEWFACTORY( BasicIDEShell, IDEResId( SVX_INTERFACE_BASIDE_VIEWSH ) )
+SFX_IMPL_NAMED_VIEWFACTORY( BasicIDEShell, "Default" )
{
SFX_VIEW_REGISTRATION( BasicDocShell );
}
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index 3604866b4202..9604a8bd9933 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -364,13 +364,23 @@ Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, con
SbModuleRef xModule = new SbModule( rModName );
xModule->SetSource32( aOUSource );
USHORT nCount = xModule->GetMethods()->Count();
- aSeqMethods.realloc( nCount );
-
+ USHORT nRealCount = nCount;
for ( USHORT i = 0; i < nCount; i++ )
{
SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( i );
+ if( pMethod->IsHidden() )
+ --nRealCount;
+ }
+ aSeqMethods.realloc( nRealCount );
+
+ USHORT iTarget = 0;
+ for ( USHORT i = 0 ; i < nCount; ++i )
+ {
+ SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( i );
+ if( pMethod->IsHidden() )
+ continue;
DBG_ASSERT( pMethod, "Method not found! (NULL)" );
- aSeqMethods.getArray()[ i ] = pMethod->GetName();
+ aSeqMethods.getArray()[ iTarget++ ] = pMethod->GetName();
}
}
@@ -392,7 +402,7 @@ BOOL HasMethod( const ScriptDocument& rDocument, const String& rLibName, const S
if ( pMethods )
{
SbMethod* pMethod = (SbMethod*)pMethods->Find( rMethName, SbxCLASS_METHOD );
- if ( pMethod )
+ if ( pMethod && !pMethod->IsHidden() )
bHasMethod = TRUE;
}
}
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 41a5fa488950..24bc5beacb30 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -554,11 +554,15 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
// Die Macros sollen in der Reihenfolge angezeigt werden,
// wie sie im Modul stehen.
MacroList aMacros;
- USHORT nMacros = pModule->GetMethods()->Count();
- USHORT nMethod;
- for ( nMethod = 0; nMethod < nMacros; nMethod++ )
+ USHORT nMacroCount = pModule->GetMethods()->Count();
+ USHORT nRealMacroCount = 0;
+ USHORT iMeth;
+ for ( iMeth = 0; iMeth < nMacroCount; iMeth++ )
{
- SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( nMethod );
+ SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( iMeth );
+ if( pMethod->IsHidden() )
+ continue;
+ ++nRealMacroCount;
DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" );
ULONG nPos = LIST_APPEND;
// Eventuell weiter vorne ?
@@ -580,8 +584,8 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
}
aMacroBox.SetUpdateMode( FALSE );
- for ( nMethod = 0; nMethod < nMacros; nMethod++ )
- aMacroBox.InsertEntry( aMacros.GetObject( nMethod )->GetName() );
+ for ( iMeth = 0; iMeth < nRealMacroCount; iMeth++ )
+ aMacroBox.InsertEntry( aMacros.GetObject( iMeth )->GetName() );
aMacroBox.SetUpdateMode( TRUE );
if ( aMacroBox.GetEntryCount() )
diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx
index bccf8212f10e..abb482f7bfe5 100644
--- a/basic/inc/basic/sbmod.hxx
+++ b/basic/inc/basic/sbmod.hxx
@@ -44,6 +44,7 @@ class SbProcedureProperty;
class SbIfaceMapperMethod;
class SbClassModuleObject;
+struct ClassModuleRunInitItem;
struct SbClassData;
class SbModuleImpl;
@@ -71,6 +72,7 @@ protected:
SbxObjectRef pDocObject; // an impl object ( used by Document Modules )
bool bIsProxyModule;
+ static void implProcessModuleRunInit( ClassModuleRunInitItem& rItem );
void StartDefinitions();
SbMethod* GetMethod( const String&, SbxDataType );
SbProperty* GetProperty( const String&, SbxDataType );
@@ -134,7 +136,7 @@ public:
void SetVBACompat( BOOL bCompat );
INT32 GetModuleType() { return mnType; }
void SetModuleType( INT32 nType ) { mnType = nType; }
- bool GetIsProxyModule() { return bIsProxyModule; }
+ bool isProxyModule() { return bIsProxyModule; }
void AddVarName( const String& aName );
void RemoveVars();
::com::sun::star::uno::Reference< ::com::sun::star::script::XInvocation > GetUnoModule();
diff --git a/basic/inc/basic/sbxvar.hxx b/basic/inc/basic/sbxvar.hxx
index 4d9d19b52a59..0cddcbdf8d17 100644
--- a/basic/inc/basic/sbxvar.hxx
+++ b/basic/inc/basic/sbxvar.hxx
@@ -178,7 +178,7 @@ struct SbxValues
sal_uInt64 uInt64;
int nInt;
unsigned int nUInt;
- String* pString;
+ ::rtl::OUString* pOUString;
SbxDecimal* pDecimal;
SbxBase* pObj;
@@ -212,7 +212,7 @@ struct SbxValues
SbxValues( double _nDouble ): nDouble( _nDouble ), eType(SbxDOUBLE) {}
SbxValues( int _nInt ): nInt( _nInt ), eType(SbxINT) {}
SbxValues( unsigned int _nUInt ): nUInt( _nUInt ), eType(SbxUINT) {}
- SbxValues( const String* _pString ): pString( (String*) _pString ), eType(SbxSTRING) {}
+ SbxValues( const ::rtl::OUString* _pString ): pOUString( (::rtl::OUString*)_pString ), eType(SbxSTRING) {}
SbxValues( SbxBase* _pObj ): pObj( _pObj ), eType(SbxOBJECT) {}
SbxValues( sal_Unicode* _pChar ): pChar( _pChar ), eType(SbxLPSTR) {}
SbxValues( void* _pData ): pData( _pData ), eType(SbxPOINTER) {}
@@ -237,7 +237,8 @@ class SbxValue : public SbxBase
SbxValue* TheRealValue() const;
protected:
SbxValues aData; // Data
- String aPic; // Picture-String
+ ::rtl::OUString aPic; // Picture-String
+ String aToolString; // tool string copy
virtual void Broadcast( ULONG ); // Broadcast-Call
virtual ~SbxValue();
@@ -303,6 +304,7 @@ public:
UINT16 GetErr() const;
const String& GetString() const;
const String& GetCoreString() const;
+ ::rtl::OUString GetOUString() const;
SbxDecimal* GetDecimal() const;
SbxBase* GetObject() const;
BOOL HasObject() const;
@@ -325,8 +327,8 @@ public:
BOOL PutDate( double );
BOOL PutBool( BOOL );
BOOL PutErr( USHORT );
- BOOL PutStringExt( const String& ); // with extended analysis (International, "TRUE"/"FALSE")
- BOOL PutString( const String& );
+ BOOL PutStringExt( const ::rtl::OUString& ); // with extended analysis (International, "TRUE"/"FALSE")
+ BOOL PutString( const ::rtl::OUString& );
BOOL PutString( const sal_Unicode* ); // Type = SbxSTRING
BOOL PutpChar( const sal_Unicode* ); // Type = SbxLPSTR
BOOL PutDecimal( SbxDecimal* pDecimal );
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index e28b0a304f28..056c2ea38c4c 100755..100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -57,6 +57,7 @@
#include <vos/mutex.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include "errobject.hxx"
+#include <hash_map>
#include <com/sun/star/script/ModuleType.hpp>
#include <com/sun/star/script/ModuleInfo.hpp>
@@ -552,6 +553,39 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
USHORT nFlags_ = pProp->GetFlags();
pProp->SetFlag( SBX_NO_BROADCAST );
SbxProperty* pNewProp = new SbxProperty( *pProp );
+
+ // Special handling for modules instances and collections, they need
+ // to be instantiated, otherwise all refer to the same base object
+ SbxDataType eVarType = pProp->GetType();
+ if( eVarType == SbxOBJECT )
+ {
+ SbxBase* pObjBase = pProp->GetObject();
+ SbxObject* pObj = PTR_CAST(SbxObject,pObjBase);
+ if( pObj != NULL )
+ {
+ String aObjClass = pObj->GetClassName();
+ (void)aObjClass;
+
+ SbClassModuleObject* pClassModuleObj = PTR_CAST(SbClassModuleObject,pObjBase);
+ if( pClassModuleObj != NULL )
+ {
+ SbModule* pLclClassModule = pClassModuleObj->getClassModule();
+ SbClassModuleObject* pNewObj = new SbClassModuleObject( pLclClassModule );
+ pNewObj->SetName( pProp->GetName() );
+ pNewObj->SetParent( pLclClassModule->pParent );
+ pNewProp->PutObject( pNewObj );
+ }
+ else if( aObjClass.EqualsIgnoreCaseAscii( "Collection" ) )
+ {
+ String aCollectionName( RTL_CONSTASCII_USTRINGPARAM("Collection") );
+ BasicCollection* pNewCollection = new BasicCollection( aCollectionName );
+ pNewCollection->SetName( pProp->GetName() );
+ pNewCollection->SetParent( pClassModule->pParent );
+ pNewProp->PutObject( pNewCollection );
+ }
+ }
+ }
+
pNewProp->ResetFlag( SBX_NO_BROADCAST );
pNewProp->SetParent( this );
pProps->PutDirect( pNewProp, i );
@@ -726,6 +760,7 @@ SbClassData::SbClassData( void )
void SbClassData::clear( void )
{
mxIfaces->Clear();
+ maRequiredTypes.clear();
}
SbClassFactory::SbClassFactory( void )
@@ -981,6 +1016,72 @@ SbModule* StarBASIC::FindModule( const String& rName )
return NULL;
}
+
+struct ClassModuleRunInitItem
+{
+ SbModule* m_pModule;
+ bool m_bProcessing;
+ bool m_bRunInitDone;
+ //ModuleVector m_vModulesDependingOnThisModule;
+
+ ClassModuleRunInitItem( void )
+ : m_pModule( NULL )
+ , m_bProcessing( false )
+ , m_bRunInitDone( false )
+ {}
+ ClassModuleRunInitItem( SbModule* pModule )
+ : m_pModule( pModule )
+ , m_bProcessing( false )
+ , m_bRunInitDone( false )
+ {}
+};
+
+typedef std::hash_map< ::rtl::OUString, ClassModuleRunInitItem,
+ ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > ModuleInitDependencyMap;
+
+static ModuleInitDependencyMap* GpMIDMap = NULL;
+
+void SbModule::implProcessModuleRunInit( ClassModuleRunInitItem& rItem )
+{
+ ModuleInitDependencyMap& rMIDMap = *GpMIDMap;
+
+ rItem.m_bProcessing = true;
+
+ //bool bAnyDependencies = true;
+ SbModule* pModule = rItem.m_pModule;
+ if( pModule->pClassData != NULL )
+ {
+ StringVector& rReqTypes = pModule->pClassData->maRequiredTypes;
+ if( rReqTypes.size() > 0 )
+ {
+ for( StringVector::iterator it = rReqTypes.begin() ; it != rReqTypes.end() ; ++it )
+ {
+ String& rStr = *it;
+
+ // Is required type a class module?
+ ModuleInitDependencyMap::iterator itFind = rMIDMap.find( rStr );
+ if( itFind != rMIDMap.end() )
+ {
+ ClassModuleRunInitItem& rParentItem = itFind->second;
+ if( rParentItem.m_bProcessing )
+ {
+ // TODO: raise error?
+ DBG_ERROR( "Cyclic module dependency detected" );
+ continue;
+ }
+
+ if( !rParentItem.m_bRunInitDone )
+ implProcessModuleRunInit( rParentItem );
+ }
+ }
+ }
+ }
+
+ pModule->RunInit();
+ rItem.m_bRunInitDone = true;
+ rItem.m_bProcessing = false;
+}
+
// Run Init-Code of all modules (including inserted libraries)
void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit )
{
@@ -994,10 +1095,33 @@ void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit )
// compile modules first then RunInit ( otherwise there is
// can be order dependency, e.g. classmodule A has a member
// of of type classmodule B and classmodule B hasn't been compiled yet )
+
+ // Consider required types to init in right order. Class modules
+ // that are required by other modules have to be initialized first.
+ ModuleInitDependencyMap aMIDMap;
+ GpMIDMap = &aMIDMap;
for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ )
{
SbModule* pModule = (SbModule*)pModules->Get( nMod );
- pModule->RunInit();
+ String aModuleName = pModule->GetName();
+ if( pModule->isProxyModule() )
+ aMIDMap[aModuleName] = ClassModuleRunInitItem( pModule );
+ }
+
+ ModuleInitDependencyMap::iterator it;
+ for( it = aMIDMap.begin() ; it != aMIDMap.end(); ++it )
+ {
+ ClassModuleRunInitItem& rItem = it->second;
+ SbModule::implProcessModuleRunInit( rItem );
+ }
+ GpMIDMap = NULL;
+
+ // Call RunInit on standard modules
+ for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ )
+ {
+ SbModule* pModule = (SbModule*)pModules->Get( nMod );
+ if( !pModule->isProxyModule() )
+ pModule->RunInit();
}
// Check all objects if they are BASIC,
@@ -1962,7 +2086,7 @@ void BasicCollection::CollItem( SbxArray* pPar_ )
if( nIndex >= 0 && nIndex < (INT32)xItemArray->Count32() )
pRes = xItemArray->Get32( nIndex );
if( !pRes )
- SetError( SbxERR_BAD_INDEX );
+ SetError( SbERR_BAD_ARGUMENT );
else
*(pPar_->Get(0)) = *pRes;
}
@@ -1980,6 +2104,6 @@ void BasicCollection::CollRemove( SbxArray* pPar_ )
if( nIndex >= 0 && nIndex < (INT32)xItemArray->Count32() )
xItemArray->Remove32( nIndex );
else
- SetError( SbxERR_BAD_INDEX );
+ SetError( SbERR_BAD_ARGUMENT );
}
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 9ee07fde1413..79f55faf37b6 100755
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -71,6 +71,7 @@
#include <com/sun/star/bridge/oleautomation/Date.hpp>
#include <com/sun/star/bridge/oleautomation/Decimal.hpp>
#include <com/sun/star/bridge/oleautomation/Currency.hpp>
+#include <com/sun/star/bridge/oleautomation/XAutomationObject.hpp>
using com::sun::star::uno::Reference;
@@ -300,7 +301,12 @@ SbUnoObject* createOLEObject_Impl( const String& aType )
SbUnoObject* pUnoObj = NULL;
if( xOLEFactory.is() )
{
- Reference< XInterface > xOLEObject = xOLEFactory->createInstance( aType );
+ // some type names available in VBA can not be directly used in COM
+ ::rtl::OUString aOLEType = aType;
+ if ( aOLEType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SAXXMLReader30" ) ) ) )
+ aOLEType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Msxml2.SAXXMLReader.3.0" ) );
+
+ Reference< XInterface > xOLEObject = xOLEFactory->createInstance( aOLEType );
if( xOLEObject.is() )
{
Any aAny;
@@ -1460,7 +1466,7 @@ Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty
aRetVal.setValue( &c , getCharCppuType() );
break;
}
- case TypeClass_STRING: aRetVal <<= ::rtl::OUString( pVar->GetString() ); break;
+ case TypeClass_STRING: aRetVal <<= pVar->GetOUString(); break;
case TypeClass_FLOAT: aRetVal <<= pVar->GetSingle(); break;
case TypeClass_DOUBLE: aRetVal <<= pVar->GetDouble(); break;
//case TypeClass_OCTET: break;
@@ -2265,6 +2271,7 @@ Reference< XInvocation > createDynamicInvocationFor( const Any& aAny );
SbUnoObject::SbUnoObject( const String& aName_, const Any& aUnoObj_ )
: SbxObject( aName_ )
, bNeedIntrospection( TRUE )
+ , bIgnoreNativeCOMObjectMembers( FALSE )
{
static Reference< XIntrospection > xIntrospection;
@@ -2310,6 +2317,12 @@ SbUnoObject::SbUnoObject( const String& aName_, const Any& aUnoObj_ )
bNeedIntrospection = FALSE;
return;
}
+
+ // Ignore introspection based members for COM objects to avoid
+ // hiding of equally named COM symbols, e.g. XInvocation::getValue
+ Reference< oleautomation::XAutomationObject > xAutomationObject( aUnoObj_, UNO_QUERY );
+ if( xAutomationObject.is() )
+ bIgnoreNativeCOMObjectMembers = TRUE;
}
maTmpUnoObj = aUnoObj_;
@@ -2553,7 +2566,7 @@ SbxVariable* SbUnoObject::Find( const String& rName, SbxClassType t )
if( !pRes )
{
::rtl::OUString aUName( rName );
- if( mxUnoAccess.is() )
+ if( mxUnoAccess.is() && !bIgnoreNativeCOMObjectMembers )
{
if( mxExactName.is() )
{
@@ -2713,10 +2726,12 @@ void SbUnoObject::implCreateAll( void )
// Instrospection besorgen
Reference< XIntrospectionAccess > xAccess = mxUnoAccess;
- if( !xAccess.is() )
+ if( !xAccess.is() || bIgnoreNativeCOMObjectMembers )
{
if( mxInvocation.is() )
xAccess = mxInvocation->getIntrospection();
+ else if( bIgnoreNativeCOMObjectMembers )
+ return;
}
if( !xAccess.is() )
return;
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx
index 46f829b382e8..93fb18baf86e 100644
--- a/basic/source/comp/codegen.cxx
+++ b/basic/source/comp/codegen.cxx
@@ -138,11 +138,10 @@ void SbiCodeGen::Save()
pCLASSFAC->AddClassModule( &rMod );
nIfaceCount = pParser->aIfaceVector.size();
+ if( !rMod.pClassData )
+ rMod.pClassData = new SbClassData;
if( nIfaceCount )
{
- if( !rMod.pClassData )
- rMod.pClassData = new SbClassData;
-
for( int i = 0 ; i < nIfaceCount ; i++ )
{
const String& rIfaceName = pParser->aIfaceVector[i];
@@ -152,6 +151,8 @@ void SbiCodeGen::Save()
pIfaces->Insert( pIfaceVar, pIfaces->Count() );
}
}
+
+ rMod.pClassData->maRequiredTypes = pParser->aRequiredTypes;
}
else
{
@@ -161,6 +162,7 @@ void SbiCodeGen::Save()
rMod.mnType = com::sun::star::script::ModuleType::NORMAL;
rMod.bIsProxyModule = false;
}
+
if( pParser->bText )
p->SetFlag( SBIMG_COMPARETEXT );
// GlobalCode-Flag
@@ -257,6 +259,10 @@ void SbiCodeGen::Save()
if( !pProc->IsPublic() )
pMeth->SetFlag( SBX_PRIVATE );
+ // Declare? -> Hidden
+ if( pProc->GetLib().Len() > 0 )
+ pMeth->SetFlag( SBX_HIDDEN );
+
pMeth->nStart = pProc->GetAddr();
pMeth->nLine1 = pProc->GetLine1();
pMeth->nLine2 = pProc->GetLine2();
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index bff3d22dd9b0..59d77e3f3757 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -161,6 +161,9 @@ void SbiParser::TypeDecl( SbiSymDef& rDef, BOOL bAsNewAlreadyParsed )
// In den String-Pool uebernehmen
rDef.SetTypeId( aGblStrings.Add( aCompleteName ) );
+
+ if( rDef.IsNew() && pProc == NULL )
+ aRequiredTypes.push_back( aCompleteName );
}
eType = SbxOBJECT;
break;
@@ -874,7 +877,7 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl )
}
if( bCompatible && Peek() == PARAMARRAY )
{
- if( bByVal || bByVal || bOptional )
+ if( bByVal || bOptional )
Error( SbERR_UNEXPECTED, PARAMARRAY );
Next();
bParamArray = TRUE;
@@ -946,6 +949,8 @@ void SbiParser::DefDeclare( BOOL bPrivate )
Error( SbERR_UNEXPECTED, eCurTok );
else
{
+ bool bFunction = (eCurTok == FUNCTION);
+
SbiProcDef* pDef = ProcDecl( TRUE );
if( pDef )
{
@@ -970,7 +975,70 @@ void SbiParser::DefDeclare( BOOL bPrivate )
aPublics.Add( pDef );
if ( pDef )
+ {
pDef->SetPublic( !bPrivate );
+
+ // New declare handling
+ if( pDef->GetLib().Len() > 0 )
+ {
+ if( bNewGblDefs && nGblChain == 0 )
+ {
+ nGblChain = aGen.Gen( _JUMP, 0 );
+ bNewGblDefs = FALSE;
+ }
+
+ USHORT nSavLine = nLine;
+ aGen.Statement();
+ pDef->Define();
+ pDef->SetLine1( nSavLine );
+ pDef->SetLine2( nSavLine );
+
+ SbiSymPool& rPool = pDef->GetParams();
+ USHORT nParCount = rPool.GetSize();
+
+ SbxDataType eType = pDef->GetType();
+ if( bFunction )
+ aGen.Gen( _PARAM, 0, sal::static_int_cast< UINT16 >( eType ) );
+
+ if( nParCount > 1 )
+ {
+ aGen.Gen( _ARGC );
+
+ for( USHORT i = 1 ; i < nParCount ; ++i )
+ {
+ SbiSymDef* pParDef = rPool.Get( i );
+ SbxDataType eParType = pParDef->GetType();
+
+ aGen.Gen( _PARAM, i, sal::static_int_cast< UINT16 >( eParType ) );
+ aGen.Gen( _ARGV );
+
+ USHORT nTyp = sal::static_int_cast< USHORT >( pParDef->GetType() );
+ if( pParDef->IsByVal() )
+ {
+ // Reset to avoid additional byval in call to wrapper function
+ pParDef->SetByVal( FALSE );
+ nTyp |= 0x8000;
+ }
+ aGen.Gen( _ARGTYP, nTyp );
+ }
+ }
+
+ aGen.Gen( _LIB, aGblStrings.Add( pDef->GetLib() ) );
+
+ SbiOpcode eOp = pDef->IsCdecl() ? _CALLC : _CALL;
+ USHORT nId = pDef->GetId();
+ if( pDef->GetAlias().Len() )
+ nId = ( nId & 0x8000 ) | aGblStrings.Add( pDef->GetAlias() );
+ if( nParCount > 1 )
+ nId |= 0x8000;
+ aGen.Gen( eOp, nId, sal::static_int_cast< UINT16 >( eType ) );
+
+ if( bFunction )
+ aGen.Gen( _PUT );
+
+ aGen.Gen( _LEAVE );
+ }
+ }
}
}
}
diff --git a/basic/source/comp/exprgen.cxx b/basic/source/comp/exprgen.cxx
index 60869307aecf..3e034af204f5 100644
--- a/basic/source/comp/exprgen.cxx
+++ b/basic/source/comp/exprgen.cxx
@@ -115,13 +115,8 @@ void SbiExprNode::Gen( RecursiveMode eRecMode )
}
else
{
- SbiProcDef* pProc = aVar.pDef->GetProcDef();
- // per DECLARE definiert?
- if( pProc && pProc->GetLib().Len() )
- eOp = pProc->IsCdecl() ? _CALLC : _CALL;
- else
- eOp = ( aVar.pDef->GetScope() == SbRTL ) ? _RTL :
- (aVar.pDef->IsGlobal() ? _FIND_G : _FIND);
+ eOp = ( aVar.pDef->GetScope() == SbRTL ) ? _RTL :
+ (aVar.pDef->IsGlobal() ? _FIND_G : _FIND);
}
if( eOp == _FIND )
@@ -187,17 +182,6 @@ void SbiExprNode::GenElement( SbiOpcode eOp )
aVar.pPar->Gen();
}
- SbiProcDef* pProc = aVar.pDef->GetProcDef();
- // per DECLARE definiert?
- if( pProc )
- {
- // Dann evtl. einen LIB-Befehl erzeugen
- if( pProc->GetLib().Len() )
- pGen->Gen( _LIB, pGen->GetParser()->aGblStrings.Add( pProc->GetLib() ) );
- // und den Aliasnamen nehmen
- if( pProc->GetAlias().Len() )
- nId = ( nId & 0x8000 ) | pGen->GetParser()->aGblStrings.Add( pProc->GetAlias() );
- }
pGen->Gen( eOp, nId, sal::static_int_cast< UINT16 >( GetType() ) );
if( aVar.pvMorePar )
@@ -223,13 +207,8 @@ void SbiExprList::Gen()
{
pParser->aGen.Gen( _ARGC );
// AB 10.1.96: Typ-Anpassung bei DECLARE
- USHORT nCount = 1, nParAnz = 0;
- SbiSymPool* pPool = NULL;
- if( pProc )
- {
- pPool = &pProc->GetParams();
- nParAnz = pPool->GetSize();
- }
+ USHORT nCount = 1 /*, nParAnz = 0*/;
+// SbiSymPool* pPool = NULL;
for( SbiExpression* pExpr = pFirst; pExpr; pExpr = pExpr->pNext,nCount++ )
{
pExpr->Gen();
@@ -239,6 +218,7 @@ void SbiExprList::Gen()
USHORT nSid = pParser->aGblStrings.Add( pExpr->GetName() );
pParser->aGen.Gen( _ARGN, nSid );
+ /* TODO: Check after Declare concept change
// AB 10.1.96: Typanpassung bei named -> passenden Parameter suchen
if( pProc )
{
@@ -246,39 +226,26 @@ void SbiExprList::Gen()
pParser->Error( SbERR_NO_NAMED_ARGS );
// Spaeter, wenn Named Args bei DECLARE moeglich
- /*
- for( USHORT i = 1 ; i < nParAnz ; i++ )
- {
- SbiSymDef* pDef = pPool->Get( i );
- const String& rName = pDef->GetName();
- if( rName.Len() )
- {
- if( pExpr->GetName().ICompare( rName )
- == COMPARE_EQUAL )
- {
- pParser->aGen.Gen( _ARGTYP, pDef->GetType() );
- break;
- }
- }
- }
- */
+ //for( USHORT i = 1 ; i < nParAnz ; i++ )
+ //{
+ // SbiSymDef* pDef = pPool->Get( i );
+ // const String& rName = pDef->GetName();
+ // if( rName.Len() )
+ // {
+ // if( pExpr->GetName().ICompare( rName )
+ // == COMPARE_EQUAL )
+ // {
+ // pParser->aGen.Gen( _ARGTYP, pDef->GetType() );
+ // break;
+ // }
+ // }
+ //}
}
+ */
}
else
{
pParser->aGen.Gen( _ARGV );
-
- // Funktion mit DECLARE -> Typ-Anpassung
- if( pProc && nCount < nParAnz )
- {
- SbiSymDef* pDef = pPool->Get( nCount );
- USHORT nTyp = sal::static_int_cast< USHORT >(
- pDef->GetType() );
- // Zusätzliches Flag für BYVAL einbauen
- if( pDef->IsByVal() )
- nTyp |= 0x8000;
- pParser->aGen.Gen( _ARGTYP, nTyp );
- }
}
}
}
diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx
index 42969b98d0d8..7a4ea5965558 100644
--- a/basic/source/comp/exprtree.cxx
+++ b/basic/source/comp/exprtree.cxx
@@ -338,15 +338,6 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
// damit erwischen wir n% = 5 : print n
eType = eDefType;
}
- // Funktion?
- if( pDef->GetProcDef() )
- {
- SbiProcDef* pProc = pDef->GetProcDef();
- if( pPar && pProc->GetLib().Len() ) // DECLARE benutzt?
- pPar->SetProc( pProc );
- // Wenn keine Pars, vorerst nichts machen
- // Pruefung auf Typ-Anzahl waere denkbar
- }
// Typcheck bei Variablen:
// ist explizit im Scanner etwas anderes angegeben?
// Bei Methoden ist dies OK!
@@ -868,7 +859,6 @@ SbiExprList::SbiExprList( SbiParser* p )
{
pParser = p;
pFirst = NULL;
- pProc = NULL;
nExpr =
nDim = 0;
bError =
diff --git a/basic/source/comp/makefile.mk b/basic/source/comp/makefile.mk
index bd3c750df355..d65f6a431e43 100644
--- a/basic/source/comp/makefile.mk
+++ b/basic/source/comp/makefile.mk
@@ -34,39 +34,26 @@ TARGET=comp
.INCLUDE : settings.mk
-CXXFILES= \
- sbcomp.cxx \
- dim.cxx \
- exprtree.cxx \
- exprnode.cxx \
- exprgen.cxx \
- codegen.cxx \
- io.cxx \
- loops.cxx \
- parser.cxx \
- scanner.cxx \
- token.cxx \
- symtbl.cxx \
- buffer.cxx
-
SLOFILES= \
- $(SLO)$/sbcomp.obj \
+ $(SLO)$/buffer.obj \
+ $(SLO)$/codegen.obj \
$(SLO)$/dim.obj \
- $(SLO)$/exprtree.obj \
- $(SLO)$/exprnode.obj \
$(SLO)$/exprgen.obj \
- $(SLO)$/codegen.obj \
+ $(SLO)$/exprnode.obj \
+ $(SLO)$/exprtree.obj \
$(SLO)$/io.obj \
$(SLO)$/loops.obj \
$(SLO)$/parser.obj \
+ $(SLO)$/sbcomp.obj \
$(SLO)$/scanner.obj \
- $(SLO)$/token.obj \
$(SLO)$/symtbl.obj \
- $(SLO)$/buffer.obj
+ $(SLO)$/token.obj
EXCEPTIONSFILES= \
- $(SLO)$/parser.obj \
- $(SLO)$/exprtree.obj
+ $(SLO)$/codegen.obj \
+ $(SLO)$/dim.obj \
+ $(SLO)$/exprtree.obj \
+ $(SLO)$/parser.obj
# --- Targets --------------------------------------------------------------
diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx
index e6fe73177dd2..5b7e5c70591d 100755
--- a/basic/source/comp/sbcomp.cxx
+++ b/basic/source/comp/sbcomp.cxx
@@ -261,7 +261,7 @@ void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, INT32 nCallLvl,
{
aStr.AppendAscii( "Entering " );
}
- String aModuleName = pModule->GetName();
+ String aModuleName = pTraceMod->GetName();
aStr += aModuleName;
if( pMethod != NULL )
{
diff --git a/basic/source/inc/expr.hxx b/basic/source/inc/expr.hxx
index 9b8f51d09dea..851d0d6f1fe5 100644
--- a/basic/source/inc/expr.hxx
+++ b/basic/source/inc/expr.hxx
@@ -234,7 +234,6 @@ class SbiExprList { // Basisklasse fuer Parameter und Dims
protected:
SbiParser* pParser; // Parser
SbiExpression* pFirst; // Expressions
- SbiProcDef* pProc; // DECLARE-Funktion (Parameter-Anpassung)
short nExpr; // Anzahl Expressions
short nDim; // Anzahl Dimensionen
BOOL bError; // TRUE: Fehler
@@ -249,8 +248,6 @@ public:
SbiExpression* Get( short );
BOOL Test( const SbiProcDef& ); // Parameter-Checks
void Gen(); // Code-Erzeugung
- // Setzen einer Funktionsdefinition zum Abgleich der Parameter
- void SetProc( SbiProcDef* p ) { pProc = p; }
void addExpression( SbiExpression* pExpr );
};
diff --git a/basic/source/inc/parser.hxx b/basic/source/inc/parser.hxx
index 1161c4ed259d..733a65db7f61 100644
--- a/basic/source/inc/parser.hxx
+++ b/basic/source/inc/parser.hxx
@@ -34,7 +34,7 @@
#include <vector>
-typedef ::std::vector< String > IfaceVector;
+typedef ::std::vector< String > StringVector;
struct SbiParseStack;
@@ -81,7 +81,8 @@ public:
BOOL bText; // OPTION COMPARE TEXT
BOOL bExplicit; // TRUE: OPTION EXPLICIT
BOOL bClassModule; // TRUE: OPTION ClassModule
- IfaceVector aIfaceVector; // Holds all interfaces implemented by a class module
+ StringVector aIfaceVector; // Holds all interfaces implemented by a class module
+ StringVector aRequiredTypes; // Types used in Dim As New <type> outside subs
SbxDataType eDefTypes[26]; // DEFxxx-Datentypen
SbiParser( StarBASIC*, SbModule* );
diff --git a/basic/source/inc/sbintern.hxx b/basic/source/inc/sbintern.hxx
index 59cfe21d25a8..4c54e2301bd5 100644
--- a/basic/source/inc/sbintern.hxx
+++ b/basic/source/inc/sbintern.hxx
@@ -50,10 +50,16 @@ public:
virtual SbxObject* CreateObject( const String& );
};
+typedef ::std::vector< String > StringVector;
+
struct SbClassData
{
SbxArrayRef mxIfaces;
+ // types this module depends on because of use in Dim As New <type>
+ // needed for initialization order of class modules
+ StringVector maRequiredTypes;
+
SbClassData( void );
~SbClassData( void )
{ clear(); }
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index 2d9836e3530e..78afa9783ca8 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -52,6 +52,7 @@ class SbUnoObject: public SbxObject
::com::sun::star::uno::Reference< ::com::sun::star::beans::XExactName > mxExactName;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XExactName > mxExactNameInvocation;
BOOL bNeedIntrospection;
+ BOOL bIgnoreNativeCOMObjectMembers;
::com::sun::star::uno::Any maTmpUnoObj; // Only to save obj for doIntrospection!
// Hilfs-Methode zum Anlegen der dbg_-Properties
diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx
index 9bd8cfd49754..f2fbaa0ac1f1 100644
--- a/basic/source/inc/symtbl.hxx
+++ b/basic/source/inc/symtbl.hxx
@@ -159,7 +159,8 @@ public:
void SetOptional() { bOpt = TRUE; }
void SetParamArray() { bParamArray = TRUE; }
void SetWithEvents() { bWithEvents = TRUE; }
- void SetByVal() { bByVal = TRUE; }
+ void SetByVal( BOOL bByVal_ = TRUE )
+ { bByVal = bByVal_; }
void SetStatic( BOOL bAsStatic = TRUE ) { bStatic = bAsStatic; }
void SetNew() { bNew = TRUE; }
void SetDefinedAs() { bAs = TRUE; }
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index bbb3e930e012..2a536eae65be 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -520,11 +520,13 @@ RTLFUNC(DoEvents)
(void)pBasic;
(void)bWrite;
(void)rPar;
- Timer aTimer;
- aTimer.SetTimeout( 1 );
- aTimer.Start();
- while ( aTimer.IsActive() )
- Application::Yield();
+ // Dummy implementation as the following code leads
+ // to performance problems for unknown reasons
+ //Timer aTimer;
+ //aTimer.SetTimeout( 1 );
+ //aTimer.Start();
+ //while ( aTimer.IsActive() )
+ // Application::Reschedule();
}
RTLFUNC(GetGUIVersion)
@@ -1553,8 +1555,6 @@ RTLFUNC(Join)
}
-typedef ::std::vector< String > StringVector;
-
RTLFUNC(Split)
{
(void)pBasic;
diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx
index ea40f0c65877..2acf59ca6b71 100644
--- a/basic/source/runtime/step0.cxx
+++ b/basic/source/runtime/step0.cxx
@@ -424,144 +424,143 @@ void SbiRuntime::StepPUT()
void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, bool bHandleDefaultProp )
{
// #67733 Typen mit Array-Flag sind auch ok
- SbxDataType eValType = refVal->GetType();
+
+ // Check var, !object is no error for sure if, only if type is fixed
SbxDataType eVarType = refVar->GetType();
- if( (eValType != SbxOBJECT
- && eValType != SbxEMPTY
-// seems like when using the default method its possible for objects
-// to be empty ( no broadcast has taken place yet ) or the actual value is
-
- && !bHandleDefaultProp
- && !(eValType & SbxARRAY)) ||
- (eVarType != SbxOBJECT
- && eVarType != SbxEMPTY
- && !bHandleDefaultProp
- && !(eVarType & SbxARRAY) ) )
+ if( !bHandleDefaultProp && eVarType != SbxOBJECT && !(eVarType & SbxARRAY) && refVar->IsFixed() )
{
Error( SbERR_INVALID_USAGE_OBJECT );
+ return;
}
- else
+
+ // Check value, !object is no error for sure if, only if type is fixed
+ SbxDataType eValType = refVal->GetType();
+// bool bGetValObject = false;
+ if( !bHandleDefaultProp && eValType != SbxOBJECT && !(eValType & SbxARRAY) && refVal->IsFixed() )
{
- // Getting in here causes problems with objects with default properties
- // if they are SbxEMPTY I guess
- if ( !bHandleDefaultProp || ( bHandleDefaultProp && refVal->GetType() == SbxOBJECT ) )
+ Error( SbERR_INVALID_USAGE_OBJECT );
+ return;
+ }
+
+ // Getting in here causes problems with objects with default properties
+ // if they are SbxEMPTY I guess
+ if ( !bHandleDefaultProp || ( bHandleDefaultProp && eValType == SbxOBJECT ) )
+ {
+ // Auf refVal GetObject fuer Collections ausloesen
+ SbxBase* pObjVarObj = refVal->GetObject();
+ if( pObjVarObj )
{
- // Auf refVal GetObject fuer Collections ausloesen
- SbxBase* pObjVarObj = refVal->GetObject();
- if( pObjVarObj )
- {
- SbxVariableRef refObjVal = PTR_CAST(SbxObject,pObjVarObj);
+ SbxVariableRef refObjVal = PTR_CAST(SbxObject,pObjVarObj);
- // #67733 Typen mit Array-Flag sind auch ok
- if( refObjVal )
- refVal = refObjVal;
- else if( !(eValType & SbxARRAY) )
- refVal = NULL;
- }
+ // #67733 Typen mit Array-Flag sind auch ok
+ if( refObjVal )
+ refVal = refObjVal;
+ else if( !(eValType & SbxARRAY) )
+ refVal = NULL;
}
+ }
- // #52896 Wenn Uno-Sequences bzw. allgemein Arrays einer als
- // Object deklarierten Variable zugewiesen werden, kann hier
- // refVal ungueltig sein!
- if( !refVal )
+ // #52896 Wenn Uno-Sequences bzw. allgemein Arrays einer als
+ // Object deklarierten Variable zugewiesen werden, kann hier
+ // refVal ungueltig sein!
+ if( !refVal )
+ {
+ Error( SbERR_INVALID_USAGE_OBJECT );
+ }
+ else
+ {
+ // Store auf die eigene Methode (innerhalb einer Function)?
+ BOOL bFlagsChanged = FALSE;
+ USHORT n = 0;
+ if( (SbxVariable*) refVar == (SbxVariable*) pMeth )
{
- Error( SbERR_INVALID_USAGE_OBJECT );
+ bFlagsChanged = TRUE;
+ n = refVar->GetFlags();
+ refVar->SetFlag( SBX_WRITE );
}
- else
- {
- // Store auf die eigene Methode (innerhalb einer Function)?
- BOOL bFlagsChanged = FALSE;
- USHORT n = 0;
- if( (SbxVariable*) refVar == (SbxVariable*) pMeth )
- {
- bFlagsChanged = TRUE;
- n = refVar->GetFlags();
- refVar->SetFlag( SBX_WRITE );
- }
- SbProcedureProperty* pProcProperty = PTR_CAST(SbProcedureProperty,(SbxVariable*)refVar);
- if( pProcProperty )
- pProcProperty->setSet( true );
+ SbProcedureProperty* pProcProperty = PTR_CAST(SbProcedureProperty,(SbxVariable*)refVar);
+ if( pProcProperty )
+ pProcProperty->setSet( true );
- if ( bHandleDefaultProp )
+ if ( bHandleDefaultProp )
+ {
+ // get default properties for lhs & rhs where necessary
+ // SbxVariable* defaultProp = NULL; unused variable
+ bool bLHSHasDefaultProp = false;
+ // LHS try determine if a default prop exists
+ if ( refVar->GetType() == SbxOBJECT )
{
- // get default properties for lhs & rhs where necessary
- // SbxVariable* defaultProp = NULL; unused variable
- bool bLHSHasDefaultProp = false;
- // LHS try determine if a default prop exists
- if ( refVar->GetType() == SbxOBJECT )
+ SbxVariable* pDflt = getDefaultProp( refVar );
+ if ( pDflt )
{
- SbxVariable* pDflt = getDefaultProp( refVar );
- if ( pDflt )
- {
- refVar = pDflt;
- bLHSHasDefaultProp = true;
- }
+ refVar = pDflt;
+ bLHSHasDefaultProp = true;
}
- // RHS only get a default prop is the rhs has one
- if ( refVal->GetType() == SbxOBJECT )
- {
- // check if lhs is a null object
- // if it is then use the object not the default property
- SbxObject* pObj = NULL;
+ }
+ // RHS only get a default prop is the rhs has one
+ if ( refVal->GetType() == SbxOBJECT )
+ {
+ // check if lhs is a null object
+ // if it is then use the object not the default property
+ SbxObject* pObj = NULL;
- pObj = PTR_CAST(SbxObject,(SbxVariable*)refVar);
+ pObj = PTR_CAST(SbxObject,(SbxVariable*)refVar);
- // calling GetObject on a SbxEMPTY variable raises
- // object not set errors, make sure its an Object
- if ( !pObj && refVar->GetType() == SbxOBJECT )
- {
- SbxBase* pObjVarObj = refVar->GetObject();
- pObj = PTR_CAST(SbxObject,pObjVarObj);
- }
- SbxVariable* pDflt = NULL;
- if ( pObj || bLHSHasDefaultProp )
- // lhs is either a valid object || or has a defaultProp
- pDflt = getDefaultProp( refVal );
- if ( pDflt )
- refVal = pDflt;
+ // calling GetObject on a SbxEMPTY variable raises
+ // object not set errors, make sure its an Object
+ if ( !pObj && refVar->GetType() == SbxOBJECT )
+ {
+ SbxBase* pObjVarObj = refVar->GetObject();
+ pObj = PTR_CAST(SbxObject,pObjVarObj);
}
+ SbxVariable* pDflt = NULL;
+ if ( pObj || bLHSHasDefaultProp )
+ // lhs is either a valid object || or has a defaultProp
+ pDflt = getDefaultProp( refVal );
+ if ( pDflt )
+ refVal = pDflt;
}
+ }
- // Handle withevents
- BOOL bWithEvents = refVar->IsSet( SBX_WITH_EVENTS );
- if ( bWithEvents )
- {
- Reference< XInterface > xComListener;
-
- SbxBase* pObj = refVal->GetObject();
- SbUnoObject* pUnoObj = (pObj != NULL) ? PTR_CAST(SbUnoObject,pObj) : NULL;
- if( pUnoObj != NULL )
- {
- Any aControlAny = pUnoObj->getUnoAny();
- String aDeclareClassName = refVar->GetDeclareClassName();
- ::rtl::OUString aVBAType = aDeclareClassName;
- ::rtl::OUString aPrefix = refVar->GetName();
- SbxObjectRef xScopeObj = refVar->GetParent();
- xComListener = createComListener( aControlAny, aVBAType, aPrefix, xScopeObj );
-
- refVal->SetDeclareClassName( aDeclareClassName );
- refVal->SetComListener( xComListener ); // Hold reference
- }
+ // Handle withevents
+ BOOL bWithEvents = refVar->IsSet( SBX_WITH_EVENTS );
+ if ( bWithEvents )
+ {
+ Reference< XInterface > xComListener;
- *refVar = *refVal;
- }
- else
+ SbxBase* pObj = refVal->GetObject();
+ SbUnoObject* pUnoObj = (pObj != NULL) ? PTR_CAST(SbUnoObject,pObj) : NULL;
+ if( pUnoObj != NULL )
{
- *refVar = *refVal;
+ Any aControlAny = pUnoObj->getUnoAny();
+ String aDeclareClassName = refVar->GetDeclareClassName();
+ ::rtl::OUString aVBAType = aDeclareClassName;
+ ::rtl::OUString aPrefix = refVar->GetName();
+ SbxObjectRef xScopeObj = refVar->GetParent();
+ xComListener = createComListener( aControlAny, aVBAType, aPrefix, xScopeObj );
+
+ refVal->SetDeclareClassName( aDeclareClassName );
+ refVal->SetComListener( xComListener ); // Hold reference
}
- // lhs is a property who's value is currently (Empty e.g. no broadcast yet)
- // in this case if there is a default prop involved the value of the
- // default property may infact be void so the type will also be SbxEMPTY
- // in this case we do not want to call checkUnoStructCopy 'cause that will
- // cause an error also
- if ( !bHandleDefaultProp || ( bHandleDefaultProp && ( refVar->GetType() != SbxEMPTY ) ) )
- // #67607 Uno-Structs kopieren
- checkUnoStructCopy( refVal, refVar );
- if( bFlagsChanged )
- refVar->SetFlags( n );
+ *refVar = *refVal;
}
+ else
+ {
+ *refVar = *refVal;
+ }
+
+ // lhs is a property who's value is currently (Empty e.g. no broadcast yet)
+ // in this case if there is a default prop involved the value of the
+ // default property may infact be void so the type will also be SbxEMPTY
+ // in this case we do not want to call checkUnoStructCopy 'cause that will
+ // cause an error also
+ if ( !bHandleDefaultProp || ( bHandleDefaultProp && ( refVar->GetType() != SbxEMPTY ) ) )
+ // #67607 Uno-Structs kopieren
+ checkUnoStructCopy( refVal, refVar );
+ if( bFlagsChanged )
+ refVar->SetFlags( n );
}
}
diff --git a/basic/source/sbx/sbxbool.cxx b/basic/source/sbx/sbxbool.cxx
index 728b8e1472b0..3216e401b707 100644
--- a/basic/source/sbx/sbxbool.cxx
+++ b/basic/source/sbx/sbxbool.cxx
@@ -87,21 +87,20 @@ enum SbxBOOL ImpGetBool( const SbxValues* p )
case SbxSTRING:
case SbxLPSTR:
nRes = SbxFALSE;
- if( p->pString )
+ if ( p->pOUString )
{
- if( p->pString->EqualsIgnoreCaseAscii( SbxRes( STRING_TRUE ) ) )
+ if( p->pOUString->equalsIgnoreAsciiCase( SbxRes( STRING_TRUE ) ) )
nRes = SbxTRUE;
- else if( !p->pString->EqualsIgnoreCaseAscii( SbxRes( STRING_FALSE ) ) )
+ else if( p->pOUString->equalsIgnoreAsciiCase( SbxRes( STRING_FALSE ) ) )
{
// Jetzt kann es noch in eine Zahl konvertierbar sein
BOOL bError = TRUE;
double n;
SbxDataType t;
USHORT nLen = 0;
- String s( *p->pString );
- if( ImpScan( s, n, t, &nLen ) == SbxERR_OK )
+ if( ImpScan( *p->pOUString, n, t, &nLen ) == SbxERR_OK )
{
- if( nLen == s.Len() )
+ if( nLen == p->pOUString->getLength() )
{
bError = FALSE;
if( n != 0.0 )
@@ -202,9 +201,10 @@ void ImpPutBool( SbxValues* p, INT16 n )
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
- p->pString = new XubString;
- *p->pString = SbxRes( n ? STRING_TRUE : STRING_FALSE );
+ if ( !p->pOUString )
+ p->pOUString = new ::rtl::OUString( SbxRes( n ? STRING_TRUE : STRING_FALSE ) );
+ else
+ *p->pOUString = SbxRes( n ? STRING_TRUE : STRING_FALSE );
break;
case SbxOBJECT:
diff --git a/basic/source/sbx/sbxbyte.cxx b/basic/source/sbx/sbxbyte.cxx
index 8485b7105e21..e13c63967fc3 100644
--- a/basic/source/sbx/sbxbyte.cxx
+++ b/basic/source/sbx/sbxbyte.cxx
@@ -165,13 +165,13 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
+ if( !p->pOUString )
nRes = 0;
else
{
double d;
SbxDataType t;
- if( ImpScan( *p->pString, d, t, NULL ) != SbxERR_OK )
+ if( ImpScan( *p->pOUString, d, t, NULL ) != SbxERR_OK )
nRes = 0;
else if( d > SbxMAXBYTE )
{
@@ -279,9 +279,9 @@ void ImpPutByte( SbxValues* p, BYTE n )
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
- p->pString = new XubString;
- ImpCvtNum( (double) n, 0, *p->pString );
+ if( !p->pOUString )
+ p->pOUString = new ::rtl::OUString;
+ ImpCvtNum( (double) n, 0, *p->pOUString );
break;
case SbxOBJECT:
{
diff --git a/basic/source/sbx/sbxchar.cxx b/basic/source/sbx/sbxchar.cxx
index f9bca67a28d9..bd4ce91f451b 100644
--- a/basic/source/sbx/sbxchar.cxx
+++ b/basic/source/sbx/sbxchar.cxx
@@ -39,7 +39,7 @@ using namespace rtl;
xub_Unicode ImpGetChar( const SbxValues* p )
{
SbxValues aTmp;
- xub_Unicode nRes;
+ xub_Unicode nRes = 0;
start:
switch( +p->eType )
{
@@ -156,13 +156,11 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
- nRes = 0;
- else
+ if ( p->pOUString )
{
double d;
SbxDataType t;
- if( ImpScan( *p->pString, d, t, NULL ) != SbxERR_OK )
+ if( ImpScan( *p->pOUString, d, t, NULL ) != SbxERR_OK )
nRes = 0;
else if( d > SbxMAXCHAR )
{
@@ -274,9 +272,10 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
- p->pString = new XubString;
- *p->pString = n;
+ if ( !p->pOUString )
+ p->pOUString = new ::rtl::OUString( n );
+ else
+ *p->pOUString = ::rtl::OUString( n );
break;
case SbxOBJECT:
{
diff --git a/basic/source/sbx/sbxconv.hxx b/basic/source/sbx/sbxconv.hxx
index c1ada75286ab..16fec542cded 100644
--- a/basic/source/sbx/sbxconv.hxx
+++ b/basic/source/sbx/sbxconv.hxx
@@ -33,13 +33,13 @@
class SbxArray;
// SBXSCAN.CXX
-extern void ImpCvtNum( double nNum, short nPrec, String& rRes, BOOL bCoreString=FALSE );
+extern void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, BOOL bCoreString=FALSE );
extern SbxError ImpScan
- ( const String& rSrc, double& nVal, SbxDataType& rType, USHORT* pLen,
+ ( const ::rtl::OUString& rSrc, double& nVal, SbxDataType& rType, USHORT* pLen,
BOOL bAllowIntntl=FALSE, BOOL bOnlyIntntl=FALSE );
// mit erweiterter Auswertung (International, "TRUE"/"FALSE")
-extern BOOL ImpConvStringExt( String& rSrc, SbxDataType eTargetType );
+extern BOOL ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType );
// SBXINT.CXX
@@ -116,9 +116,9 @@ void ImpPutDate( SbxValues*, double );
// SBXSTR.CXX
-String ImpGetString( const SbxValues* );
-String ImpGetCoreString( const SbxValues* );
-void ImpPutString( SbxValues*, const String* );
+::rtl::OUString ImpGetString( const SbxValues* );
+::rtl::OUString ImpGetCoreString( const SbxValues* );
+void ImpPutString( SbxValues*, const ::rtl::OUString* );
// SBXCHAR.CXX
@@ -145,7 +145,7 @@ enum SbxBOOL ImpGetBool( const SbxValues* );
void ImpPutBool( SbxValues*, INT16 );
// ByteArry <--> String
-SbxArray* StringToByteArray(const String& rStr);
-String ByteArrayToString(SbxArray* pArr);
+SbxArray* StringToByteArray(const ::rtl::OUString& rStr);
+::rtl::OUString ByteArrayToString(SbxArray* pArr);
#endif
diff --git a/basic/source/sbx/sbxcurr.cxx b/basic/source/sbx/sbxcurr.cxx
index 74380f84a75f..e27b11d5166c 100644
--- a/basic/source/sbx/sbxcurr.cxx
+++ b/basic/source/sbx/sbxcurr.cxx
@@ -37,8 +37,8 @@
#include <basic/sbxvar.hxx>
#include "sbxconv.hxx"
-static String ImpCurrencyToString( const SbxINT64& );
-static SbxINT64 ImpStringToCurrency( const String& );
+static ::rtl::OUString ImpCurrencyToString( const SbxINT64& );
+static SbxINT64 ImpStringToCurrency( const ::rtl::OUString& );
SbxINT64 ImpGetCurrency( const SbxValues* p )
{
@@ -121,10 +121,10 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
+ if( !p->pOUString )
nRes.SetNull();
else
- nRes = ImpStringToCurrency( *p->pString );
+ nRes = ImpStringToCurrency( *p->pOUString );
break;
case SbxOBJECT:
{
@@ -224,10 +224,10 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
- p->pString = new XubString;
+ if( !p->pOUString )
+ p->pOUString = new ::rtl::OUString;
- *p->pString = ImpCurrencyToString( r );
+ *p->pOUString = ImpCurrencyToString( r );
break;
case SbxOBJECT:
{
@@ -319,7 +319,7 @@ start:
// Hilfs-Funktionen zur Wandlung
-static String ImpCurrencyToString( const SbxINT64 &r )
+static ::rtl::OUString ImpCurrencyToString( const SbxINT64 &r )
{
BigInt a10000 = 10000;
@@ -331,20 +331,20 @@ static String ImpCurrencyToString( const SbxINT64 &r )
aFrac %= a10000;
aFrac += a10000;
- String aString;
+ ::rtl::OUString aString;
if( r.nHigh < 0 )
- aString = '-';
+ aString = ::rtl::OUString( (sal_Unicode)'-' );
aString += aInt.GetString();
- aString += '.';
+ aString += ::rtl::OUString( (sal_Unicode)'.' );
aString += aFrac.GetString().GetBuffer()+1;
return aString;
}
-static SbxINT64 ImpStringToCurrency( const String &r )
+static SbxINT64 ImpStringToCurrency( const ::rtl::OUString &r )
{
int nDec = 4;
String aStr;
- const sal_Unicode* p = r.GetBuffer();
+ const sal_Unicode* p = r.getStr();
if( *p == '-' )
aStr += *p++;
diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx
index 8dffb2758749..1ac8c254ca6b 100644
--- a/basic/source/sbx/sbxdate.cxx
+++ b/basic/source/sbx/sbxdate.cxx
@@ -86,7 +86,7 @@ double ImpGetDate( const SbxValues* p )
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
+ if( !p->pOUString )
nRes = 0;
else
{
@@ -125,7 +125,7 @@ double ImpGetDate( const SbxValues* p )
pFormatter->PutandConvertEntry( aStr, nCheckPos, nType,
nIndex, LANGUAGE_GERMAN, eLangType );
- BOOL bSuccess = pFormatter->IsNumberFormat( *p->pString, nIndex, nRes );
+ BOOL bSuccess = pFormatter->IsNumberFormat( *p->pOUString, nIndex, nRes );
if ( bSuccess )
{
short nType_ = pFormatter->GetType( nIndex );
@@ -243,8 +243,8 @@ start:
case SbxSTRING:
case SbxLPSTR:
{
- if( !p->pString )
- p->pString = new XubString;
+ if( !p->pOUString )
+ p->pOUString = new ::rtl::OUString;
Color* pColor;
LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
@@ -294,7 +294,9 @@ start:
nIndex,
LANGUAGE_GERMAN,
eLangType );
- pFormatter->GetOutputString( n, nIndex, *p->pString, &pColor );
+ String aTmpString;
+ pFormatter->GetOutputString( n, nIndex, aTmpString, &pColor );
+ *p->pOUString = aTmpString;
delete pFormatter;
break;
}
diff --git a/basic/source/sbx/sbxdbl.cxx b/basic/source/sbx/sbxdbl.cxx
index 460f331c59b8..be55d3409131 100644
--- a/basic/source/sbx/sbxdbl.cxx
+++ b/basic/source/sbx/sbxdbl.cxx
@@ -76,7 +76,7 @@ double ImpGetDouble( const SbxValues* p )
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
+ if( !p->pOUString )
{
nRes = 0;
if ( SbiRuntime::isVBAEnabled() )// VBA only behaviour
@@ -86,7 +86,7 @@ double ImpGetDouble( const SbxValues* p )
{
double d;
SbxDataType t;
- if( ImpScan( *p->pString, d, t, NULL ) != SbxERR_OK )
+ if( ImpScan( *p->pOUString, d, t, NULL ) != SbxERR_OK )
{
nRes = 0;
if ( SbiRuntime::isVBAEnabled() )// VBA only behaviour
@@ -188,9 +188,9 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
- p->pString = new XubString;
- ImpCvtNum( (double) n, 14, *p->pString, bCoreString );
+ if( !p->pOUString )
+ p->pOUString = new ::rtl::OUString;
+ ImpCvtNum( (double) n, 14, *p->pOUString, bCoreString );
break;
case SbxOBJECT:
{
diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx
index 319b0aac366c..2191d91c8d82 100644
--- a/basic/source/sbx/sbxdec.cxx
+++ b/basic/source/sbx/sbxdec.cxx
@@ -211,7 +211,7 @@ void SbxDecimal::setUInt( unsigned int val )
// sbxscan.cxx
void ImpGetIntntlSep( sal_Unicode& rcDecimalSep, sal_Unicode& rcThousandSep );
-bool SbxDecimal::setString( String* pString )
+bool SbxDecimal::setString( ::rtl::OUString* pOUString )
{
static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US );
@@ -224,11 +224,11 @@ bool SbxDecimal::setString( String* pString )
HRESULT hResult;
if( cDecimalSep != '.' || cThousandSep != ',' )
{
- int nLen = pString->Len();
+ int nLen = pOUString->getLength();
sal_Unicode* pBuffer = new sal_Unicode[nLen + 1];
pBuffer[nLen] = 0;
- const sal_Unicode* pSrc = pString->GetBuffer();
+ const sal_Unicode* pSrc = pOUString->getStr();
int i;
for( i = 0 ; i < nLen ; ++i )
pBuffer[i] = pSrc[i];
@@ -248,7 +248,7 @@ bool SbxDecimal::setString( String* pString )
}
else
{
- hResult = VarDecFromStr( (OLECHAR*)pString->GetBuffer(), nLANGID, 0, &maDec );
+ hResult = VarDecFromStr( (OLECHAR*)pOUString->getStr(), nLANGID, 0, &maDec );
}
bRet = ( hResult == S_OK );
return bRet;
@@ -373,7 +373,7 @@ bool SbxDecimal::setSingle( float val ) { (void)val; return false; }
bool SbxDecimal::setDouble( double val ) { (void)val; return false; }
void SbxDecimal::setInt( int val ) { (void)val; }
void SbxDecimal::setUInt( unsigned int val ) { (void)val; }
-bool SbxDecimal::setString( String* pString ) { (void)pString; return false; }
+bool SbxDecimal::setString( ::rtl::OUString* pOUString ) { (void)pOUString; return false; }
bool SbxDecimal::getChar( sal_Unicode& rVal ) { (void)rVal; return false; }
bool SbxDecimal::getByte( BYTE& rVal ) { (void)rVal; return false; }
@@ -388,7 +388,7 @@ bool SbxDecimal::getUInt( unsigned int& rVal ) { (void)rVal; return false; }
#endif
-bool SbxDecimal::getString( String& rString )
+bool SbxDecimal::getString( ::rtl::OUString& rString )
{
#ifdef WIN32
static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US );
@@ -528,7 +528,7 @@ start:
case SbxLPSTR:
case SbxSTRING:
case SbxBYREF | SbxSTRING:
- pnDecRes->setString( p->pString ); break;
+ pnDecRes->setString( p->pOUString ); break;
case SbxOBJECT:
{
SbxValue* pVal = PTR_CAST(SbxValue,p->pObj);
@@ -670,10 +670,10 @@ start:
case SbxLPSTR:
case SbxSTRING:
case SbxBYREF | SbxSTRING:
- if( !p->pString )
- p->pString = new XubString;
+ if( !p->pOUString )
+ p->pOUString = new ::rtl::OUString;
// ImpCvtNum( (double) n, 0, *p->pString );
- pDec->getString( *p->pString );
+ pDec->getString( *p->pOUString );
break;
case SbxOBJECT:
{
diff --git a/basic/source/sbx/sbxdec.hxx b/basic/source/sbx/sbxdec.hxx
index 03f97bec5992..cd80bbad282e 100644
--- a/basic/source/sbx/sbxdec.hxx
+++ b/basic/source/sbx/sbxdec.hxx
@@ -85,7 +85,7 @@ public:
bool setDouble( double val );
void setInt( int val );
void setUInt( unsigned int val );
- bool setString( String* pString );
+ bool setString( ::rtl::OUString* pOUString );
void setDecimal( SbxDecimal* pDecimal )
{
#ifdef WIN32
@@ -106,7 +106,7 @@ public:
bool getDouble( double& rVal );
bool getInt( int& rVal );
bool getUInt( unsigned int& rVal );
- bool getString( String& rString );
+ bool getString( ::rtl::OUString& rString );
bool operator -= ( const SbxDecimal &r );
bool operator += ( const SbxDecimal &r );
diff --git a/basic/source/sbx/sbxint.cxx b/basic/source/sbx/sbxint.cxx
index 406b8599e568..47c38aecb1c2 100644
--- a/basic/source/sbx/sbxint.cxx
+++ b/basic/source/sbx/sbxint.cxx
@@ -154,13 +154,13 @@ start:
case SbxLPSTR:
case SbxSTRING:
case SbxBYREF | SbxSTRING:
- if( !p->pString )
+ if( !p->pOUString )
nRes = 0;
else
{
double d;
SbxDataType t;
- if( ImpScan( *p->pString, d, t, NULL ) != SbxERR_OK )
+ if( ImpScan( *p->pOUString, d, t, NULL ) != SbxERR_OK )
nRes = 0;
else if( d > SbxMAXINT )
{
@@ -275,9 +275,9 @@ start:
case SbxLPSTR:
case SbxSTRING:
case SbxBYREF | SbxSTRING:
- if( !p->pString )
- p->pString = new XubString;
- ImpCvtNum( (double) n, 0, *p->pString );
+ if( !p->pOUString )
+ p->pOUString = new ::rtl::OUString;
+ ImpCvtNum( (double) n, 0, *p->pOUString );
break;
case SbxOBJECT:
{
@@ -456,20 +456,19 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
+ if( !p->pOUString )
nRes = 0;
else
{
- ::rtl::OUString aOUStr( *p->pString );
::rtl::OString aOStr = ::rtl::OUStringToOString
- ( aOUStr, RTL_TEXTENCODING_ASCII_US );
+ ( *p->pOUString, RTL_TEXTENCODING_ASCII_US );
nRes = aOStr.toInt64();
if( nRes == 0 )
{
// Check if really 0 or invalid conversion
double d;
SbxDataType t;
- if( ImpScan( *p->pString, d, t, NULL ) != SbxERR_OK )
+ if( ImpScan( *p->pOUString, d, t, NULL ) != SbxERR_OK )
nRes = 0;
else
nRes = ImpDoubleToSalInt64( d );
@@ -575,13 +574,12 @@ start:
case SbxSTRING:
case SbxLPSTR:
{
- if( !p->pString )
- p->pString = new XubString;
+ if( !p->pOUString )
+ p->pOUString = new ::rtl::OUString;
::rtl::OString aOStr = ::rtl::OString::valueOf( n );
- ::rtl::OUString aOUStr = ::rtl::OStringToOUString
+ (*p->pOUString) = ::rtl::OStringToOUString
( aOStr, RTL_TEXTENCODING_ASCII_US );
- (*p->pString) = aOUStr;
break;
}
case SbxOBJECT:
@@ -745,20 +743,19 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
+ if( !p->pOUString )
nRes = 0;
else
{
- ::rtl::OUString aOUStr( *p->pString );
::rtl::OString aOStr = ::rtl::OUStringToOString
- ( aOUStr, RTL_TEXTENCODING_ASCII_US );
+ ( *p->pOUString, RTL_TEXTENCODING_ASCII_US );
sal_Int64 n64 = aOStr.toInt64();
if( n64 == 0 )
{
// Check if really 0 or invalid conversion
double d;
SbxDataType t;
- if( ImpScan( *p->pString, d, t, NULL ) != SbxERR_OK )
+ if( ImpScan( *p->pOUString, d, t, NULL ) != SbxERR_OK )
nRes = 0;
else if( d > SbxMAXSALUINT64 )
{
@@ -879,16 +876,15 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
- p->pString = new XubString;
+ if( !p->pOUString )
+ p->pOUString = new ::rtl::OUString;
if( n > SbxMAXSALINT64 )
SbxBase::SetError( SbxERR_CONVERSION );
else
{
::rtl::OString aOStr = ::rtl::OString::valueOf( (sal_Int64)n );
- ::rtl::OUString aOUStr = ::rtl::OStringToOUString
+ (*p->pOUString) = ::rtl::OStringToOUString
( aOStr, RTL_TEXTENCODING_ASCII_US );
- (*p->pString) = aOUStr;
}
break;
case SbxOBJECT:
diff --git a/basic/source/sbx/sbxlng.cxx b/basic/source/sbx/sbxlng.cxx
index c84b087dfc33..1cf2d84061f9 100644
--- a/basic/source/sbx/sbxlng.cxx
+++ b/basic/source/sbx/sbxlng.cxx
@@ -119,13 +119,13 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
+ if( !p->pOUString )
nRes = 0;
else
{
double d;
SbxDataType t;
- if( ImpScan( *p->pString, d, t, NULL ) != SbxERR_OK )
+ if( ImpScan( *p->pOUString, d, t, NULL ) != SbxERR_OK )
nRes = 0;
else if( d > SbxMAXLNG )
{
@@ -240,9 +240,9 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
- p->pString = new XubString;
- ImpCvtNum( (double) n, 0, *p->pString );
+ if( !p->pOUString )
+ p->pOUString = new ::rtl::OUString;
+ ImpCvtNum( (double) n, 0, *p->pOUString );
break;
case SbxOBJECT:
{
diff --git a/basic/source/sbx/sbxres.cxx b/basic/source/sbx/sbxres.cxx
index f42c400afd91..369349e72069 100644
--- a/basic/source/sbx/sbxres.cxx
+++ b/basic/source/sbx/sbxres.cxx
@@ -86,6 +86,6 @@ const char* GetSbxRes( USHORT nId )
}
SbxRes::SbxRes( USHORT nId )
- : XubString( String::CreateFromAscii( GetSbxRes( nId ) ) )
+ : ::rtl::OUString( ::rtl::OUString::createFromAscii( GetSbxRes( nId ) ) )
{}
diff --git a/basic/source/sbx/sbxres.hxx b/basic/source/sbx/sbxres.hxx
index 8cd0ad26e951..8ed3c7054278 100644
--- a/basic/source/sbx/sbxres.hxx
+++ b/basic/source/sbx/sbxres.hxx
@@ -75,7 +75,7 @@
#define SBXRES_MAX 44
-class SbxRes : public String
+class SbxRes : public ::rtl::OUString
{
public:
SbxRes( USHORT );
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 3d45818e6401..b8aad9bbf2e4 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -71,10 +71,10 @@ void ImpGetIntntlSep( sal_Unicode& rcDecimalSep, sal_Unicode& rcThousandSep )
// Das ganze gibt auch noch einen Konversionsfehler, wenn der Datentyp
// Fixed ist und das ganze nicht hineinpasst!
-SbxError ImpScan( const XubString& rWSrc, double& nVal, SbxDataType& rType,
+SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType,
USHORT* pLen, BOOL bAllowIntntl, BOOL bOnlyIntntl )
{
- ByteString aBStr( rWSrc, RTL_TEXTENCODING_ASCII_US );
+ ::rtl::OString aBStr( ::rtl::OUStringToOString( rWSrc, RTL_TEXTENCODING_ASCII_US ) );
// Bei International Komma besorgen
char cIntntlComma, cIntntl1000;
@@ -100,7 +100,7 @@ SbxError ImpScan( const XubString& rWSrc, double& nVal, SbxDataType& rType,
cIntntl1000 = (char)cThousandSep;
}
- const char* pStart = aBStr.GetBuffer();
+ const char* pStart = aBStr.getStr();
const char* p = pStart;
char buf[ 80 ], *q = buf;
BOOL bRes = TRUE;
@@ -391,7 +391,7 @@ static void myftoa( double nNum, char * pBuf, short nPrec, short nExpWidth,
#pragma warning(disable: 4748) // "... because optimizations are disabled ..."
#endif
-void ImpCvtNum( double nNum, short nPrec, XubString& rRes, BOOL bCoreString )
+void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, BOOL bCoreString )
{
char *q;
char cBuf[ 40 ], *p = cBuf;
@@ -415,18 +415,18 @@ void ImpCvtNum( double nNum, short nPrec, XubString& rRes, BOOL bCoreString )
if( *p == cDecimalSep ) p--;
while( *q ) *++p = *q++;
*++p = 0;
- rRes = String::CreateFromAscii( cBuf );
+ rRes = ::rtl::OUString::createFromAscii( cBuf );
}
#ifdef _MSC_VER
#pragma optimize( "", on )
#endif
-BOOL ImpConvStringExt( XubString& rSrc, SbxDataType eTargetType )
+BOOL ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType )
{
// Merken, ob ueberhaupt was geaendert wurde
BOOL bChanged = FALSE;
- String aNewString;
+ ::rtl::OUString aNewString;
// Nur Spezial-Fälle behandeln, als Default tun wir nichts
switch( eTargetType )
@@ -436,7 +436,7 @@ BOOL ImpConvStringExt( XubString& rSrc, SbxDataType eTargetType )
case SbxDOUBLE:
case SbxCURRENCY:
{
- ByteString aBStr( rSrc, RTL_TEXTENCODING_ASCII_US );
+ ::rtl::OString aBStr( ::rtl::OUStringToOString( rSrc, RTL_TEXTENCODING_ASCII_US ) );
// Komma besorgen
sal_Unicode cDecimalSep, cThousandSep;
@@ -446,10 +446,11 @@ BOOL ImpConvStringExt( XubString& rSrc, SbxDataType eTargetType )
// Ersetzen, wenn DecimalSep kein '.' (nur den ersten)
if( cDecimalSep != (sal_Unicode)'.' )
{
- USHORT nPos = aNewString.Search( cDecimalSep );
- if( nPos != STRING_NOTFOUND )
+ sal_Int32 nPos = aNewString.indexOf( cDecimalSep );
+ if( nPos != -1 )
{
- aNewString.SetChar( nPos, '.' );
+ sal_Unicode* pStr = (sal_Unicode*)aNewString.getStr();
+ pStr[nPos] = (sal_Unicode)'.';
bChanged = TRUE;
}
}
@@ -459,15 +460,15 @@ BOOL ImpConvStringExt( XubString& rSrc, SbxDataType eTargetType )
// Bei BOOL TRUE und FALSE als String pruefen
case SbxBOOL:
{
- if( rSrc.EqualsIgnoreCaseAscii( "true" ) )
+ if( rSrc.equalsIgnoreAsciiCaseAscii( "true" ) )
{
- aNewString = String::CreateFromInt32(SbxTRUE);
+ aNewString = ::rtl::OUString::valueOf( (sal_Int32)SbxTRUE );
bChanged = TRUE;
}
else
- if( rSrc.EqualsIgnoreCaseAscii( "false" ) )
+ if( rSrc.equalsIgnoreAsciiCaseAscii( "false" ) )
{
- aNewString = String::CreateFromInt32(SbxFALSE);
+ aNewString = ::rtl::OUString::valueOf( (sal_Int32)SbxFALSE );
bChanged = TRUE;
}
break;
@@ -935,7 +936,11 @@ void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const
//old: printfmtnum( GetDouble(), rRes, *pFmt );
}
else
- ImpCvtNum( GetDouble(), nComma, rRes );
+ {
+ ::rtl::OUString aTmpString( rRes );
+ ImpCvtNum( GetDouble(), nComma, aTmpString );
+ rRes = aTmpString;
+ }
break;
case SbxSTRING:
if( pFmt )
diff --git a/basic/source/sbx/sbxsng.cxx b/basic/source/sbx/sbxsng.cxx
index 82507dbe15e9..70ef1653666b 100644
--- a/basic/source/sbx/sbxsng.cxx
+++ b/basic/source/sbx/sbxsng.cxx
@@ -112,13 +112,13 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
+ if( !p->pOUString )
nRes = 0;
else
{
double d;
SbxDataType t;
- if( ImpScan( *p->pString, d, t, NULL ) != SbxERR_OK )
+ if( ImpScan( *p->pOUString, d, t, NULL ) != SbxERR_OK )
nRes = 0;
else if( d > SbxMAXSNG )
{
@@ -237,9 +237,9 @@ start:
case SbxSTRING:
case SbxLPSTR:
{
- if( !p->pString )
- p->pString = new XubString;
- ImpCvtNum( (double) n, 6, *p->pString );
+ if( !p->pOUString )
+ p->pOUString = new ::rtl::OUString;
+ ImpCvtNum( (double) n, 6, *p->pOUString );
break;
}
case SbxOBJECT:
diff --git a/basic/source/sbx/sbxstr.cxx b/basic/source/sbx/sbxstr.cxx
index 6deb2da29ba1..b4156a116ddc 100644
--- a/basic/source/sbx/sbxstr.cxx
+++ b/basic/source/sbx/sbxstr.cxx
@@ -44,12 +44,12 @@ using namespace rtl;
// Die Konversion eines Items auf String wird ueber die Put-Methoden
// der einzelnen Datentypen abgewickelt, um doppelten Code zu vermeiden.
-XubString ImpGetString( const SbxValues* p )
+::rtl::OUString ImpGetString( const SbxValues* p )
{
SbxValues aTmp;
- XubString aRes;
+ ::rtl::OUString aRes;
aTmp.eType = SbxSTRING;
- aTmp.pString = &aRes;
+ aTmp.pOUString = &aRes;
switch( +p->eType )
{
case SbxNULL:
@@ -86,8 +86,8 @@ XubString ImpGetString( const SbxValues* p )
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( p->pString )
- aRes = *p->pString;
+ if ( p->pOUString )
+ *aTmp.pOUString = *p->pOUString;
break;
case SbxOBJECT:
{
@@ -109,7 +109,7 @@ XubString ImpGetString( const SbxValues* p )
case SbxERROR:
// Hier wird der String "Error n" erzeugt
aRes = SbxRes( STRING_ERRORMSG );
- aRes += p->nUShort; break;
+ aRes += ::rtl::OUString( p->nUShort ); break;
case SbxDATE:
ImpPutDate( &aTmp, p->nDouble ); break;
@@ -145,7 +145,7 @@ XubString ImpGetString( const SbxValues* p )
}
// AB 10.4.97, neue Funktion fuer SbxValue::GetCoreString()
-XubString ImpGetCoreString( const SbxValues* p )
+::rtl::OUString ImpGetCoreString( const SbxValues* p )
{
// Vorerst nur fuer double
if( ( p->eType & (~SbxBYREF) ) == SbxDOUBLE )
@@ -153,7 +153,6 @@ XubString ImpGetCoreString( const SbxValues* p )
SbxValues aTmp;
XubString aRes;
aTmp.eType = SbxSTRING;
- aTmp.pString = &aRes;
if( p->eType == SbxDOUBLE )
ImpPutDouble( &aTmp, p->nDouble, /*bCoreString=*/TRUE );
else
@@ -164,15 +163,15 @@ XubString ImpGetCoreString( const SbxValues* p )
return ImpGetString( p );
}
-void ImpPutString( SbxValues* p, const XubString* n )
+void ImpPutString( SbxValues* p, const ::rtl::OUString* n )
{
SbxValues aTmp;
aTmp.eType = SbxSTRING;
- XubString* pTmp = NULL;
+ ::rtl::OUString* pTmp = NULL;
// Sicherheitshalber, falls ein NULL-Ptr kommt
if( !n )
- n = pTmp = new XubString;
- aTmp.pString = (XubString*) n;
+ n = pTmp = new ::rtl::OUString;
+ aTmp.pOUString = (::rtl::OUString*)n;
switch( +p->eType )
{
case SbxCHAR:
@@ -209,14 +208,15 @@ void ImpPutString( SbxValues* p, const XubString* n )
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( n->Len() )
+ if( n->getLength() )
{
- if( !p->pString )
- p->pString = new XubString;
- *p->pString = *n;
+ if( !p->pOUString )
+ p->pOUString = new ::rtl::OUString( *n );
+ else
+ *p->pOUString = *n;
}
else
- delete p->pString, p->pString = NULL;
+ delete p->pOUString, p->pOUString = NULL;
break;
case SbxOBJECT:
{
@@ -258,18 +258,18 @@ void ImpPutString( SbxValues* p, const XubString* n )
}
// Convert string to an array of bytes, preserving unicode (2bytes per character)
-SbxArray* StringToByteArray(const String& rStr)
+SbxArray* StringToByteArray(const ::rtl::OUString& rStr)
{
- USHORT nArraySize = rStr.Len() * 2;
- const sal_Unicode* pSrc = rStr.GetBuffer();
+ sal_Int32 nArraySize = rStr.getLength() * 2;
+ const sal_Unicode* pSrc = rStr.getStr();
SbxDimArray* pArray = new SbxDimArray(SbxBYTE);
bool bIncIndex = ( IsBaseIndexOne() && SbiRuntime::isVBAEnabled() );
if( nArraySize )
{
if( bIncIndex )
- pArray->AddDim( 1, nArraySize );
+ pArray->AddDim32( 1, nArraySize );
else
- pArray->AddDim( 0, nArraySize-1 );
+ pArray->AddDim32( 0, nArraySize-1 );
}
else
{
@@ -290,7 +290,7 @@ SbxArray* StringToByteArray(const String& rStr)
}
// Convert an array of bytes to string (2bytes per character)
-String ByteArrayToString(SbxArray* pArr)
+::rtl::OUString ByteArrayToString(SbxArray* pArr)
{
USHORT nCount = pArr->Count();
OUStringBuffer aStrBuf;
@@ -315,7 +315,5 @@ String ByteArrayToString(SbxArray* pArr)
aStrBuf.append(aChar);
}
- String aStr(aStrBuf.makeStringAndClear());
-
- return aStr;
+ return aStrBuf.makeStringAndClear();
}
diff --git a/basic/source/sbx/sbxuint.cxx b/basic/source/sbx/sbxuint.cxx
index ce0aea70b062..5b75a24d6d26 100644
--- a/basic/source/sbx/sbxuint.cxx
+++ b/basic/source/sbx/sbxuint.cxx
@@ -151,13 +151,13 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
+ if( !p->pOUString )
nRes = 0;
else
{
double d;
SbxDataType t;
- if( ImpScan( *p->pString, d, t, NULL ) != SbxERR_OK )
+ if( ImpScan( *p->pOUString, d, t, NULL ) != SbxERR_OK )
nRes = 0;
else if( d > SbxMAXUINT )
{
@@ -272,9 +272,9 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
- p->pString = new XubString;
- ImpCvtNum( (double) n, 0, *p->pString );
+ if( !p->pOUString )
+ p->pOUString = new ::rtl::OUString;
+ ImpCvtNum( (double) n, 0, *p->pOUString );
break;
case SbxOBJECT:
{
diff --git a/basic/source/sbx/sbxulng.cxx b/basic/source/sbx/sbxulng.cxx
index 3dd81b8c616d..e0f6f3fa421d 100644
--- a/basic/source/sbx/sbxulng.cxx
+++ b/basic/source/sbx/sbxulng.cxx
@@ -127,13 +127,13 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
+ if( !p->pOUString )
nRes = 0;
else
{
double d;
SbxDataType t;
- if( ImpScan( *p->pString, d, t, NULL ) != SbxERR_OK )
+ if( ImpScan( *p->pOUString, d, t, NULL ) != SbxERR_OK )
nRes = 0;
else if( d > SbxMAXULNG )
{
@@ -246,9 +246,9 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
- p->pString = new XubString;
- ImpCvtNum( (double) n, 0, *p->pString );
+ if( !p->pOUString )
+ p->pOUString = new ::rtl::OUString;
+ ImpCvtNum( (double) n, 0, *p->pOUString );
break;
case SbxOBJECT:
{
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 7ee31af70556..4ea4836b701b 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -236,7 +236,7 @@ SbxValue::SbxValue( SbxDataType t, void* p ) : SbxBase()
case SbxSINGLE: n |= SbxBYREF; aData.pSingle = (float*) p; break;
case SbxDATE:
case SbxDOUBLE: n |= SbxBYREF; aData.pDouble = (double*) p; break;
- case SbxSTRING: n |= SbxBYREF; aData.pString = (XubString*) p; break;
+ case SbxSTRING: n |= SbxBYREF; aData.pOUString = (::rtl::OUString*) p; break;
case SbxERROR:
case SbxUSHORT:
case SbxBOOL: n |= SbxBYREF; aData.pUShort = (UINT16*) p; break;
@@ -280,8 +280,8 @@ SbxValue::SbxValue( const SbxValue& r )
switch( aData.eType )
{
case SbxSTRING:
- if( aData.pString )
- aData.pString = new XubString( *aData.pString );
+ if( aData.pOUString )
+ aData.pOUString = new ::rtl::OUString( *aData.pOUString );
break;
case SbxOBJECT:
if( aData.pObj )
@@ -309,7 +309,7 @@ SbxValue& SbxValue::operator=( const SbxValue& r )
&& aData.pObj && ( aData.pObj->GetType() == (SbxARRAY | SbxBYTE) )
&& (r.aData.eType == SbxSTRING) )
{
- String aStr = r.GetString();
+ ::rtl::OUString aStr = r.GetString();
SbxArray* pArr = StringToByteArray(aStr);
PutObject(pArr);
return *this;
@@ -323,7 +323,7 @@ SbxValue& SbxValue::operator=( const SbxValue& r )
SbxArray* pArr = PTR_CAST(SbxArray, pObj);
if( pArr )
{
- String aStr = ByteArrayToString( pArr );
+ ::rtl::OUString aStr = ByteArrayToString( pArr );
PutString(aStr);
return *this;
}
@@ -385,7 +385,7 @@ void SbxValue::Clear()
case SbxVOID:
break;
case SbxSTRING:
- delete aData.pString; aData.pString = NULL;
+ delete aData.pOUString; aData.pOUString = NULL;
break;
case SbxOBJECT:
if( aData.pObj )
@@ -551,9 +551,9 @@ BOOL SbxValue::Get( SbxValues& rRes ) const
case SbxULONG: rRes.nULong = ImpGetULong( &p->aData ); break;
case SbxLPSTR:
case SbxSTRING: p->aPic = ImpGetString( &p->aData );
- rRes.pString = &p->aPic; break;
+ rRes.pOUString = &p->aPic; break;
case SbxCoreSTRING: p->aPic = ImpGetCoreString( &p->aData );
- rRes.pString = &p->aPic; break;
+ rRes.pOUString = &p->aPic; break;
case SbxINT:
#if SAL_TYPES_SIZEOFINT == 2
rRes.nInt = (int) ImpGetInteger( &p->aData );
@@ -618,13 +618,11 @@ const XubString& SbxValue::GetString() const
SbxValues aRes;
aRes.eType = SbxSTRING;
if( Get( aRes ) )
- // Geht in Ordnung, da Ptr eine Kopie ist
- return *aRes.pString;
+ ((SbxValue*) this)->aToolString = *aRes.pOUString;
else
- {
- ((SbxValue*) this)->aPic.Erase();
- return aPic;
- }
+ ((SbxValue*) this)->aToolString.Erase();
+
+ return aToolString;
}
const XubString& SbxValue::GetCoreString() const
@@ -632,13 +630,22 @@ const XubString& SbxValue::GetCoreString() const
SbxValues aRes;
aRes.eType = SbxCoreSTRING;
if( Get( aRes ) )
- // Geht in Ordnung, da Ptr eine Kopie ist
- return *aRes.pString;
+ ((SbxValue*) this)->aToolString = *aRes.pOUString;
else
- {
- ((SbxValue*) this)->aPic.Erase();
- return aPic;
- }
+ ((SbxValue*) this)->aToolString.Erase();
+
+ return aToolString;
+}
+
+::rtl::OUString SbxValue::GetOUString() const
+{
+ ::rtl::OUString aResult;
+ SbxValues aRes;
+ aRes.eType = SbxSTRING;
+ if( Get( aRes ) )
+ aResult = *aRes.pOUString;
+
+ return aResult;
}
BOOL SbxValue::HasObject() const
@@ -727,7 +734,7 @@ BOOL SbxValue::Put( const SbxValues& rVal )
case SbxUSHORT: ImpPutUShort( &p->aData, rVal.nUShort ); break;
case SbxULONG: ImpPutULong( &p->aData, rVal.nULong ); break;
case SbxLPSTR:
- case SbxSTRING: ImpPutString( &p->aData, rVal.pString ); break;
+ case SbxSTRING: ImpPutString( &p->aData, rVal.pOUString ); break;
case SbxINT:
#if SAL_TYPES_SIZEOFINT == 2
ImpPutInteger( &p->aData, (INT16) rVal.nInt );
@@ -803,10 +810,10 @@ BOOL SbxValue::Put( const SbxValues& rVal )
// werden koennen, wenn Floats mit ',' als Dezimaltrenner oder BOOLs
// explizit mit "TRUE" oder "FALSE" angegeben werden.
// Implementierung in ImpConvStringExt (SBXSCAN.CXX)
-BOOL SbxValue::PutStringExt( const XubString& r )
+BOOL SbxValue::PutStringExt( const ::rtl::OUString& r )
{
// Kopieren, bei Unicode gleich konvertieren
- String aStr( r );
+ ::rtl::OUString aStr( r );
// Eigenen Typ bestimmen (nicht wie in Put() mit TheRealValue(),
// Objekte werden sowieso nicht behandelt)
@@ -820,9 +827,9 @@ BOOL SbxValue::PutStringExt( const XubString& r )
// sonst Original (Unicode bleibt erhalten)
BOOL bRet;
if( ImpConvStringExt( aStr, eTargetType ) )
- aRes.pString = (XubString*)&aStr;
+ aRes.pOUString = (::rtl::OUString*)&aStr;
else
- aRes.pString = (XubString*)&r;
+ aRes.pOUString = (::rtl::OUString*)&r;
// #34939: Bei Strings. die eine Zahl enthalten und wenn this einen
// Num-Typ hat, Fixed-Flag setzen, damit der Typ nicht veraendert wird
@@ -851,10 +858,10 @@ BOOL SbxValue::PutStringExt( const XubString& r )
BOOL SbxValue::PutString( const xub_Unicode* p )
{
- XubString aVal( p );
+ ::rtl::OUString aVal( p );
SbxValues aRes;
aRes.eType = SbxSTRING;
- aRes.pString = &aVal;
+ aRes.pOUString = &aVal;
Put( aRes );
return BOOL( !IsError() );
}
@@ -909,19 +916,19 @@ BOOL SbxValue::fillAutomationDecimal
BOOL SbxValue::PutpChar( const xub_Unicode* p )
{
- XubString aVal( p );
+ ::rtl::OUString aVal( p );
SbxValues aRes;
aRes.eType = SbxLPSTR;
- aRes.pString = &aVal;
+ aRes.pOUString = &aVal;
Put( aRes );
return BOOL( !IsError() );
}
-BOOL SbxValue::PutString( const XubString& r )
+BOOL SbxValue::PutString( const ::rtl::OUString& r )
{
SbxValues aRes;
aRes.eType = SbxSTRING;
- aRes.pString = (XubString*) &r;
+ aRes.pOUString = (::rtl::OUString*) &r;
Put( aRes );
return BOOL( !IsError() );
}
@@ -986,14 +993,14 @@ BOOL SbxValue::ImpIsNumeric( BOOL bOnlyIntntl ) const
SbxDataType t = GetType();
if( t == SbxSTRING )
{
- if( aData.pString )
+ if( aData.pOUString )
{
- XubString s( *aData.pString );
+ ::rtl::OUString s( *aData.pOUString );
double n;
SbxDataType t2;
USHORT nLen = 0;
if( ImpScan( s, n, t2, &nLen, /*bAllowIntntl*/FALSE, bOnlyIntntl ) == SbxERR_OK )
- return BOOL( nLen == s.Len() );
+ return BOOL( nLen == s.getLength() );
}
return FALSE;
}
@@ -1046,7 +1053,7 @@ BOOL SbxValue::SetType( SbxDataType t )
switch( aData.eType )
{
case SbxSTRING:
- delete aData.pString;
+ delete aData.pOUString;
break;
case SbxOBJECT:
if( aData.pObj && aData.pObj != this )
@@ -1163,14 +1170,14 @@ BOOL SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
Get( aL );
// #30576: Erstmal testen, ob Wandlung geklappt hat
- if( aL.pString != NULL && aR.pString != NULL )
+ if( aL.pOUString != NULL && aR.pOUString != NULL )
{
- *aL.pString += *aR.pString;
+ *aL.pOUString += *aR.pOUString;
}
// Nicht einmal Left OK?
- else if( aL.pString == NULL )
+ else if( aL.pOUString == NULL )
{
- aL.pString = new String();
+ aL.pOUString = new ::rtl::OUString();
}
Put( aL );
}
@@ -1493,17 +1500,17 @@ BOOL SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
if( Get( aL ) && rOp.Get( aR ) ) switch( eOp )
{
case SbxEQ:
- bRes = BOOL( *aL.pString == *aR.pString ); break;
+ bRes = BOOL( *aL.pOUString == *aR.pOUString ); break;
case SbxNE:
- bRes = BOOL( *aL.pString != *aR.pString ); break;
+ bRes = BOOL( *aL.pOUString != *aR.pOUString ); break;
case SbxLT:
- bRes = BOOL( *aL.pString < *aR.pString ); break;
+ bRes = BOOL( *aL.pOUString < *aR.pOUString ); break;
case SbxGT:
- bRes = BOOL( *aL.pString > *aR.pString ); break;
+ bRes = BOOL( *aL.pOUString > *aR.pOUString ); break;
case SbxLE:
- bRes = BOOL( *aL.pString <= *aR.pString ); break;
+ bRes = BOOL( *aL.pOUString <= *aR.pOUString ); break;
case SbxGE:
- bRes = BOOL( *aL.pString >= *aR.pString ); break;
+ bRes = BOOL( *aL.pOUString >= *aR.pOUString ); break;
default:
SetError( SbxERR_NOTIMP );
}
@@ -1668,9 +1675,9 @@ BOOL SbxValue::LoadData( SvStream& r, USHORT )
XubString aVal;
r.ReadByteString( aVal, RTL_TEXTENCODING_ASCII_US );
if( aVal.Len() )
- aData.pString = new XubString( aVal );
+ aData.pOUString = new ::rtl::OUString( aVal );
else
- aData.pString = NULL; // JSM 22.09.1995
+ aData.pOUString = NULL; // JSM 22.09.1995
break;
}
case SbxERROR:
@@ -1781,9 +1788,9 @@ BOOL SbxValue::StoreData( SvStream& r ) const
break;
}
case SbxSTRING:
- if( aData.pString )
+ if( aData.pOUString )
{
- r.WriteByteString( *aData.pString, RTL_TEXTENCODING_ASCII_US );
+ r.WriteByteString( *aData.pOUString, RTL_TEXTENCODING_ASCII_US );
}
else
{
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 20060f1f7493..58e3c1ae92c2 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -239,9 +239,9 @@ const XubString& SbxVariable::GetName( SbxNameType t ) const
if( i )
aTmp += ',';
if( q->nFlags & SBX_OPTIONAL )
- aTmp += SbxRes( STRING_OPTIONAL );
+ aTmp += String( SbxRes( STRING_OPTIONAL ) );
if( q->eType & SbxBYREF )
- aTmp += SbxRes( STRING_BYREF );
+ aTmp += String( SbxRes( STRING_BYREF ) );
aTmp += q->aName;
cType = ' ';
// Kurzer Typ? Dann holen, evtl. ist dieser 0.
@@ -263,12 +263,12 @@ const XubString& SbxVariable::GetName( SbxNameType t ) const
// langer Typ?
if( t != SbxNAME_SHORT )
{
- aTmp += SbxRes( STRING_AS );
+ aTmp += String( SbxRes( STRING_AS ) );
if( nt < 32 )
- aTmp += SbxRes(
- sal::static_int_cast< USHORT >( STRING_TYPES + nt ) );
+ aTmp += String( SbxRes(
+ sal::static_int_cast< USHORT >( STRING_TYPES + nt ) ) );
else
- aTmp += SbxRes( STRING_ANY );
+ aTmp += String( SbxRes( STRING_ANY ) );
}
}
}
@@ -276,15 +276,15 @@ const XubString& SbxVariable::GetName( SbxNameType t ) const
// Langer Typ? Dann holen
if( t == SbxNAME_LONG_TYPES && et != SbxEMPTY )
{
- aTmp += SbxRes( STRING_AS );
+ aTmp += String( SbxRes( STRING_AS ) );
if( et < 32 )
- aTmp += SbxRes(
- sal::static_int_cast< USHORT >( STRING_TYPES + et ) );
+ aTmp += String( SbxRes(
+ sal::static_int_cast< USHORT >( STRING_TYPES + et ) ) );
else
- aTmp += SbxRes( STRING_ANY );
+ aTmp += String( SbxRes( STRING_ANY ) );
}
- ((SbxVariable*) this)->aPic = aTmp;
- return aPic;
+ ((SbxVariable*) this)->aToolString = aTmp;
+ return aToolString;
}
// Einen simplen Hashcode erzeugen: Es werden die ersten 6 Zeichen gewertet.
@@ -431,9 +431,10 @@ BOOL SbxVariable::LoadData( SvStream& rStrm, USHORT nVer )
if( nType == SbxNULL && GetClass() == SbxCLASS_METHOD )
nType = SbxEMPTY;
SbxValues aTmp;
- XubString aVal;
+ String aTmpString;
+ ::rtl::OUString aVal;
aTmp.eType = aData.eType = (SbxDataType) nType;
- aTmp.pString = &aVal;
+ aTmp.pOUString = &aVal;
switch( nType )
{
case SbxBOOL:
@@ -445,10 +446,10 @@ BOOL SbxVariable::LoadData( SvStream& rStrm, USHORT nVer )
case SbxSINGLE:
{
// Floats als ASCII
- rStrm.ReadByteString( aVal, RTL_TEXTENCODING_ASCII_US );
+ rStrm.ReadByteString( aTmpString, RTL_TEXTENCODING_ASCII_US );
double d;
SbxDataType t;
- if( ImpScan( aVal, d, t, NULL ) != SbxERR_OK || t == SbxDOUBLE )
+ if( ImpScan( aTmpString, d, t, NULL ) != SbxERR_OK || t == SbxDOUBLE )
{
aTmp.nSingle = 0;
return FALSE;
@@ -460,9 +461,9 @@ BOOL SbxVariable::LoadData( SvStream& rStrm, USHORT nVer )
case SbxDOUBLE:
{
// Floats als ASCII
- rStrm.ReadByteString( aVal, RTL_TEXTENCODING_ASCII_US );
+ rStrm.ReadByteString( aTmpString, RTL_TEXTENCODING_ASCII_US );
SbxDataType t;
- if( ImpScan( aVal, aTmp.nDouble, t, NULL ) != SbxERR_OK )
+ if( ImpScan( aTmpString, aTmp.nDouble, t, NULL ) != SbxERR_OK )
{
aTmp.nDouble = 0;
return FALSE;
@@ -470,7 +471,8 @@ BOOL SbxVariable::LoadData( SvStream& rStrm, USHORT nVer )
break;
}
case SbxSTRING:
- rStrm.ReadByteString( aVal, RTL_TEXTENCODING_ASCII_US );
+ rStrm.ReadByteString( aTmpString, RTL_TEXTENCODING_ASCII_US );
+ aVal = aTmpString;
break;
case SbxEMPTY:
case SbxNULL:
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index eec6a09fb215..60647d4f8224 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -1395,6 +1395,7 @@ namespace cairocanvas
::rtl::math::approxEqual( aMatrix.x0, 0 ) &&
::rtl::math::approxEqual( aMatrix.y0, 0 ) )
cairo_set_operator( mpCairo.get(), CAIRO_OPERATOR_SOURCE );
+ cairo_pattern_set_extend( cairo_get_source(mpCairo.get()), CAIRO_EXTEND_PAD );
cairo_rectangle( mpCairo.get(), 0, 0, aBitmapSize.Width, aBitmapSize.Height );
cairo_clip( mpCairo.get() );
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index 637b3af3315e..c1e71ceb943f 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -704,6 +704,7 @@ namespace vclcanvas
{
::basegfx::B2DRectangle aRect(0.0, 0.0, 1.0, 1.0);
::basegfx::B2DRectangle aTextureDeviceRect;
+ ::basegfx::B2DHomMatrix aTextureTransform;
::canvas::tools::calcTransformedRectBounds( aTextureDeviceRect,
aRect,
aTextureTransform );
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index ffe752f43a7a..779e3c32f1e7 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -827,16 +827,14 @@ bool ChartController::executeDispatch_Delete()
else
{
//remove additional shape
- uno::Reference< drawing::XShape > xShape( m_aSelection.getSelectedAdditionalShape() );
- if( xShape.is() )
+ impl_ClearSelection();
{
- impl_ClearSelection();
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ if ( m_pDrawViewWrapper )
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex());
- if( m_pDrawViewWrapper )
- m_pDrawViewWrapper->UnmarkAll();
+ m_pDrawViewWrapper->DeleteMarked();
+ bReturn = true;
}
- bReturn = DrawModelWrapper::removeShape( xShape );
}
}
return bReturn;
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 950169395c95..5a30d97118c5 100755
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -1043,6 +1043,7 @@ void SAL_CALL ChartModel::setVisualAreaSize( ::sal_Int64 nAspect, const awt::Siz
{
if( nAspect == embed::Aspects::MSOLE_CONTENT )
{
+ ControllerLockGuard aLockGuard( this );
bool bChanged =
(m_aVisualAreaSize.Width != aSize.Width ||
m_aVisualAreaSize.Height != aSize.Height);
diff --git a/comphelper/source/misc/uieventslogger.cxx b/comphelper/source/misc/uieventslogger.cxx
index 710c08fdd706..738a5ec6a8d3 100644
--- a/comphelper/source/misc/uieventslogger.cxx
+++ b/comphelper/source/misc/uieventslogger.cxx
@@ -175,6 +175,7 @@ namespace comphelper
static const OUString FN_ROTATEDLOG;
static const OUString LOGROTATE_EVENTNAME;
static const OUString URL_UNO;
+ static const OUString URL_SPECIAL;
static const OUString URL_FILE;
};
}
@@ -209,6 +210,7 @@ namespace comphelper
const OUString UiEventsLogger_Impl::LOGROTATE_EVENTNAME = OUString::createFromAscii("onOOoImprovementLogRotated");
const OUString UiEventsLogger_Impl::URL_UNO = OUString::createFromAscii(".uno:");
+ const OUString UiEventsLogger_Impl::URL_SPECIAL = OUString::createFromAscii(".special:");
const OUString UiEventsLogger_Impl::URL_FILE = OUString::createFromAscii("file:");
@@ -347,7 +349,12 @@ namespace comphelper
const Sequence<PropertyValue>& args)
{
if(!m_Active) return;
- if(!url.Complete.match(URL_UNO) && !url.Complete.match(URL_FILE)) return;
+ if(!url.Complete.match(URL_UNO)
+ && !url.Complete.match(URL_FILE)
+ && !url.Complete.match(URL_SPECIAL))
+ {
+ return;
+ }
checkIdleTimeout();
Sequence<OUString> logdata = Sequence<OUString>(COLUMNS);
diff --git a/configmgr/source/README b/configmgr/source/README
index b731043d34ed..b00990d1eeb2 100644
--- a/configmgr/source/README
+++ b/configmgr/source/README
@@ -70,6 +70,7 @@ writemodfile.cxx
broadcaster.cxx
Notification management.
+additions.hxx
update.cxx
Extension manager interface.
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 190db364cdfe..eda60e6d612a 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -798,13 +798,22 @@ void Access::initBroadcasterAndChanges(
css::uno::Any(), css::uno::Any()));
//TODO: non-void ReplacedElement
}
- //TODO: if (allChanges != 0) {
- // allChanges->push_back(
- // css::util::ElementChange(
- // css::uno::makeAny(...),
- // css::uno::Any(), css::uno::Any()));
- // //TODO: non-void ReplacedElement
- //}
+ if (allChanges != 0) {
+ rtl::OUStringBuffer path(
+ getRelativePathRepresentation());
+ if (path.getLength() != 0) {
+ path.append(sal_Unicode('/'));
+ }
+ path.append(
+ Data::createSegment(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")),
+ i->first));
+ allChanges->push_back(
+ css::util::ElementChange(
+ css::uno::makeAny(path.makeStringAndClear()),
+ css::uno::Any(), css::uno::Any()));
+ //TODO: non-void ReplacedElement
+ }
}
// else: spurious Modifications::Node not representing a change
break;
diff --git a/configmgr/source/additions.hxx b/configmgr/source/additions.hxx
new file mode 100644
index 000000000000..f34373c7f742
--- /dev/null
+++ b/configmgr/source/additions.hxx
@@ -0,0 +1,43 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#ifndef INCLUDED_CONFIGMGR_SOURCE_ADDITIONS_HXX
+#define INCLUDED_CONFIGMGR_SOURCE_ADDITIONS_HXX
+
+#include "sal/config.h"
+
+#include <list>
+
+#include "path.hxx"
+
+namespace configmgr {
+
+typedef std::list< Path > Additions;
+
+}
+
+#endif
diff --git a/configmgr/source/broadcaster.cxx b/configmgr/source/broadcaster.cxx
index bb77039dcc8f..ab59d333d6d3 100644
--- a/configmgr/source/broadcaster.cxx
+++ b/configmgr/source/broadcaster.cxx
@@ -32,13 +32,17 @@
#include "com/sun/star/beans/XPropertyChangeListener.hpp"
#include "com/sun/star/container/XContainerListener.hpp"
#include "com/sun/star/lang/DisposedException.hpp"
+#include "com/sun/star/lang/WrappedTargetRuntimeException.hpp"
#include "com/sun/star/lang/XEventListener.hpp"
+#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Exception.hpp"
#include "com/sun/star/uno/Reference.hxx"
-#include "com/sun/star/uno/RuntimeException.hpp"
#include "com/sun/star/uno/XInterface.hpp"
#include "com/sun/star/util/XChangesListener.hpp"
+#include "cppuhelper/exc_hlp.hxx"
#include "osl/diagnose.hxx"
+#include "rtl/string.h"
+#include "rtl/ustrbuf.hxx"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
@@ -50,6 +54,13 @@ namespace {
namespace css = com::sun::star;
+void appendMessage(
+ rtl::OUStringBuffer & buffer, css::uno::Exception const & exception)
+{
+ buffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("; "));
+ buffer.append(exception.Message);
+}
+
}
void Broadcaster::addDisposeNotification(
@@ -108,14 +119,16 @@ void Broadcaster::addChangesNotification(
}
void Broadcaster::send() {
- bool exception = false;
+ css::uno::Any exception;
+ rtl::OUStringBuffer messages;
for (DisposeNotifications::iterator i(disposeNotifications_.begin());
i != disposeNotifications_.end(); ++i) {
try {
i->listener->disposing(i->event);
} catch (css::lang::DisposedException &) {
- } catch (css::uno::Exception &) {
- exception = true;
+ } catch (css::uno::Exception & e) {
+ exception = cppu::getCaughtException();
+ appendMessage(messages, e);
}
}
for (ContainerNotifications::iterator i(
@@ -125,8 +138,9 @@ void Broadcaster::send() {
try {
i->listener->elementInserted(i->event);
} catch (css::lang::DisposedException &) {
- } catch (css::uno::Exception &) {
- exception = true;
+ } catch (css::uno::Exception & e) {
+ exception = cppu::getCaughtException();
+ appendMessage(messages, e);
}
}
for (ContainerNotifications::iterator i(
@@ -136,8 +150,9 @@ void Broadcaster::send() {
try {
i->listener->elementRemoved(i->event);
} catch (css::lang::DisposedException &) {
- } catch (css::uno::Exception &) {
- exception = true;
+ } catch (css::uno::Exception & e) {
+ exception = cppu::getCaughtException();
+ appendMessage(messages, e);
}
}
for (ContainerNotifications::iterator i(
@@ -147,8 +162,9 @@ void Broadcaster::send() {
try {
i->listener->elementReplaced(i->event);
} catch (css::lang::DisposedException &) {
- } catch (css::uno::Exception &) {
- exception = true;
+ } catch (css::uno::Exception & e) {
+ exception = cppu::getCaughtException();
+ appendMessage(messages, e);
}
}
for (PropertyChangeNotifications::iterator i(
@@ -158,8 +174,9 @@ void Broadcaster::send() {
try {
i->listener->propertyChange(i->event);
} catch (css::lang::DisposedException &) {
- } catch (css::uno::Exception &) {
- exception = true;
+ } catch (css::uno::Exception & e) {
+ exception = cppu::getCaughtException();
+ appendMessage(messages, e);
}
}
for (PropertiesChangeNotifications::iterator i(
@@ -169,8 +186,9 @@ void Broadcaster::send() {
try {
i->listener->propertiesChange(i->event);
} catch (css::lang::DisposedException &) {
- } catch (css::uno::Exception &) {
- exception = true;
+ } catch (css::uno::Exception & e) {
+ exception = cppu::getCaughtException();
+ appendMessage(messages, e);
}
}
for (ChangesNotifications::iterator i(changesNotifications_.begin());
@@ -178,16 +196,19 @@ void Broadcaster::send() {
try {
i->listener->changesOccurred(i->event);
} catch (css::lang::DisposedException &) {
- } catch (css::uno::Exception &) {
- exception = true;
+ } catch (css::uno::Exception & e) {
+ exception = cppu::getCaughtException();
+ appendMessage(messages, e);
}
}
- if (exception) { //TODO
- throw css::uno::RuntimeException(
- rtl::OUString(
+ if (exception.hasValue()) {
+ throw css::lang::WrappedTargetRuntimeException(
+ (rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
- "configmgr exceptions during listener notification")),
- css::uno::Reference< css::uno::XInterface >());
+ "configmgr exceptions during listener notification")) +
+ messages.makeStringAndClear()),
+ css::uno::Reference< css::uno::XInterface >(),
+ exception);
}
}
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 04e6317c959d..33b0eca3f65f 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -54,10 +54,12 @@
#include "rtl/ustring.hxx"
#include "sal/types.h"
+#include "additions.hxx"
#include "components.hxx"
#include "data.hxx"
#include "modifications.hxx"
#include "node.hxx"
+#include "nodemap.hxx"
#include "parsemanager.hxx"
#include "partial.hxx"
#include "rootaccess.hxx"
@@ -86,12 +88,12 @@ typedef std::list< UnresolvedListItem > UnresolvedList;
void parseXcsFile(
rtl::OUString const & url, int layer, Data & data, Partial const * partial,
- Modifications * modifications)
+ Modifications * modifications, Additions * additions)
SAL_THROW((
css::container::NoSuchElementException, css::uno::RuntimeException))
{
- OSL_ASSERT(partial == 0 && modifications == 0);
- (void) partial; (void) modifications;
+ OSL_ASSERT(partial == 0 && modifications == 0 && additions == 0);
+ (void) partial; (void) modifications; (void) additions;
OSL_VERIFY(
rtl::Reference< ParseManager >(
new ParseManager(url, new XcsParser(layer, data)))->parse());
@@ -99,14 +101,16 @@ void parseXcsFile(
void parseXcuFile(
rtl::OUString const & url, int layer, Data & data, Partial const * partial,
- Modifications * modifications)
+ Modifications * modifications, Additions * additions)
SAL_THROW((
css::container::NoSuchElementException, css::uno::RuntimeException))
{
OSL_VERIFY(
rtl::Reference< ParseManager >(
new ParseManager(
- url, new XcuParser(layer, data, partial, modifications)))->
+ url,
+ new XcuParser(
+ layer, data, partial, modifications, additions)))->
parse());
}
@@ -116,6 +120,29 @@ rtl::OUString expand(rtl::OUString const & str) {
return s;
}
+bool canRemoveFromLayer(int layer, rtl::Reference< Node > const & node) {
+ OSL_ASSERT(node.is());
+ if (node->getLayer() > layer && node->getLayer() < Data::NO_LAYER) {
+ return false;
+ }
+ switch (node->kind()) {
+ case Node::KIND_LOCALIZED_PROPERTY:
+ case Node::KIND_GROUP:
+ for (NodeMap::iterator i(node->getMembers().begin());
+ i != node->getMembers().end(); ++i)
+ {
+ if (!canRemoveFromLayer(layer, i->second)) {
+ return false;
+ }
+ }
+ return true;
+ case Node::KIND_SET:
+ return node->getMembers().empty();
+ default: // Node::KIND_PROPERTY, Node::KIND_LOCALIZED_VALUE
+ return true;
+ }
+}
+
static bool singletonCreated = false;
static Components * singleton = 0;
@@ -218,7 +245,7 @@ void Components::insertExtensionXcsFile(
bool shared, rtl::OUString const & fileUri)
{
try {
- parseXcsFile(fileUri, shared ? 9 : 13, data_, 0, 0);
+ parseXcsFile(fileUri, shared ? 9 : 13, data_, 0, 0, 0);
} catch (css::container::NoSuchElementException & e) {
throw css::uno::RuntimeException(
(rtl::OUString(
@@ -233,9 +260,12 @@ void Components::insertExtensionXcuFile(
bool shared, rtl::OUString const & fileUri, Modifications * modifications)
{
OSL_ASSERT(modifications != 0);
+ int layer = shared ? 10 : 14;
+ Additions * adds = data_.addExtensionXcuAdditions(fileUri, layer);
try {
- parseXcuFile(fileUri, shared ? 10 : 14, data_, 0, modifications);
+ parseXcuFile(fileUri, layer, data_, 0, modifications, adds);
} catch (css::container::NoSuchElementException & e) {
+ data_.removeExtensionXcuAdditions(fileUri);
throw css::uno::RuntimeException(
(rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
@@ -245,6 +275,58 @@ void Components::insertExtensionXcuFile(
}
}
+void Components::removeExtensionXcuFile(
+ rtl::OUString const & fileUri, Modifications * modifications)
+{
+ //TODO: Ideally, exactly the data coming from the specified xcu file would
+ // be removed. However, not enough information is recorded in the in-memory
+ // data structures to do so. So, as a workaround, all those set elements
+ // that were freshly added by the xcu and have afterwards been left
+ // unchanged or have only had their properties changed in the user layer are
+ // removed (and nothing else). The heuristic to determine
+ // whether a node has been left unchanged is to check the layer ID (as
+ // usual) and additionally to check that the node does not recursively
+ // contain any non-empty sets (multiple extension xcu files are merged into
+ // one layer, so checking layer ID alone is not enough). Since
+ // item->additions records all additions of set members in textual order,
+ // the latter check works well when iterating through item->additions in
+ // reverse order.
+ OSL_ASSERT(modifications != 0);
+ rtl::Reference< Data::ExtensionXcu > item(
+ data_.removeExtensionXcuAdditions(fileUri));
+ if (item.is()) {
+ for (Additions::reverse_iterator i(item->additions.rbegin());
+ i != item->additions.rend(); ++i)
+ {
+ rtl::Reference< Node > parent;
+ NodeMap const * map = &data_.components;
+ rtl::Reference< Node > node;
+ for (Path::const_iterator j(i->begin()); j != i->end(); ++j) {
+ parent = node;
+ node = Data::findNode(Data::NO_LAYER, *map, *j);
+ if (!node.is()) {
+ break;
+ }
+ map = &node->getMembers();
+ }
+ if (node.is()) {
+ OSL_ASSERT(parent.is());
+ if (parent->kind() == Node::KIND_SET) {
+ OSL_ASSERT(
+ node->kind() == Node::KIND_GROUP ||
+ node->kind() == Node::KIND_SET);
+ if (canRemoveFromLayer(item->layer, node)) {
+ parent->getMembers().erase(i->back());
+ data_.modifications.remove(*i);
+ modifications->add(*i);
+ }
+ }
+ }
+ }
+ writeModifications();
+ }
+}
+
void Components::insertModificationXcuFile(
rtl::OUString const & fileUri,
std::set< rtl::OUString > const & includedPaths,
@@ -254,7 +336,7 @@ void Components::insertModificationXcuFile(
OSL_ASSERT(modifications != 0);
try {
Partial part(includedPaths, excludedPaths);
- parseXcuFile(fileUri, Data::NO_LAYER, data_, &part, modifications);
+ parseXcuFile(fileUri, Data::NO_LAYER, data_, &part, modifications, 0);
} catch (css::uno::Exception & e) { //TODO: more specific exception catching
OSL_TRACE(
"configmgr error inserting %s: %s",
@@ -377,7 +459,8 @@ Components::Components(
"${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("uno")
":BUNDLED_EXTENSIONS_USER}/registry/"
"com.sun.star.comp.deployment.configuration."
- "PackageRegistryBackend/configmgr.ini"))));
+ "PackageRegistryBackend/configmgr.ini"))),
+ false);
parseXcsXcuIniLayer(
9,
expand(
@@ -386,8 +469,9 @@ Components::Components(
"${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("uno")
":SHARED_EXTENSIONS_USER}/registry/"
"com.sun.star.comp.deployment.configuration."
- "PackageRegistryBackend/configmgr.ini"))));
- parseXcsXcuLayer( //TODO: migrate
+ "PackageRegistryBackend/configmgr.ini"))),
+ true);
+ parseXcsXcuLayer(
11,
expand(
rtl::OUString(
@@ -396,6 +480,8 @@ Components::Components(
":UNO_USER_PACKAGES_CACHE}/registry/"
"com.sun.star.comp.deployment.configuration."
"PackageRegistryBackend/registry"))));
+ // can be dropped once old UserInstallation format can no longer exist
+ // (probably OOo 4)
parseXcsXcuIniLayer(
13,
expand(
@@ -404,7 +490,8 @@ Components::Components(
"${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("uno")
":UNO_USER_PACKAGES_CACHE}/registry/"
"com.sun.star.comp.deployment.configuration."
- "PackageRegistryBackend/configmgr.ini"))));
+ "PackageRegistryBackend/configmgr.ini"))),
+ true);
try {
parseModificationLayer();
} catch (css::uno::Exception & e) { //TODO: more specific exception catching
@@ -470,7 +557,7 @@ void Components::parseFiles(
file.match(extension, file.getLength() - extension.getLength()))
{
try {
- (*parseFile)(stat.getFileURL(), layer, data_, 0, 0);
+ (*parseFile)(stat.getFileURL(), layer, data_, 0, 0, 0);
} catch (css::container::NoSuchElementException & e) {
throw css::uno::RuntimeException(
(rtl::OUString(
@@ -486,19 +573,26 @@ void Components::parseFiles(
void Components::parseFileList(
int layer, FileParser * parseFile, rtl::OUString const & urls,
- rtl::Bootstrap const & ini)
+ rtl::Bootstrap const & ini, bool recordAdditions)
{
for (sal_Int32 i = 0;;) {
rtl::OUString url(urls.getToken(0, ' ', i));
if (url.getLength() != 0) {
ini.expandMacrosFrom(url); //TODO: detect failure
+ Additions * adds = 0;
+ if (recordAdditions) {
+ adds = data_.addExtensionXcuAdditions(url, layer);
+ }
try {
- (*parseFile)(url, layer, data_, 0, 0);
+ (*parseFile)(url, layer, data_, 0, 0, adds);
} catch (css::container::NoSuchElementException & e) {
OSL_TRACE(
"configmgr file does not exist: %s",
rtl::OUStringToOString(
e.Message, RTL_TEXTENCODING_UTF8).getStr());
+ if (adds != 0) {
+ data_.removeExtensionXcuAdditions(url);
+ }
}
}
if (i == -1) {
@@ -610,18 +704,20 @@ void Components::parseXcsXcuLayer(int layer, rtl::OUString const & url) {
url + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/data")), false);
}
-void Components::parseXcsXcuIniLayer(int layer, rtl::OUString const & url) {
+void Components::parseXcsXcuIniLayer(
+ int layer, rtl::OUString const & url, bool recordAdditions)
+{
//TODO: rtl::Bootstrap::getFrom "first trie[s] to retrieve the value via the
// global function"
rtl::Bootstrap ini(url);
rtl::OUString urls;
if (ini.getFrom(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SCHEMA")), urls))
{
- parseFileList(layer, &parseXcsFile, urls, ini);
+ parseFileList(layer, &parseXcsFile, urls, ini, false);
}
if (ini.getFrom(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATA")), urls))
{
- parseFileList(layer + 1, &parseXcuFile, urls, ini);
+ parseFileList(layer + 1, &parseXcuFile, urls, ini, recordAdditions);
}
}
@@ -650,13 +746,13 @@ rtl::OUString Components::getModificationFileUrl() const {
void Components::parseModificationLayer() {
try {
- parseXcuFile(getModificationFileUrl(), Data::NO_LAYER, data_, 0, 0);
+ parseXcuFile(getModificationFileUrl(), Data::NO_LAYER, data_, 0, 0, 0);
} catch (css::container::NoSuchElementException &) {
OSL_TRACE(
"configmgr user registrymodifications.xcu does not (yet) exist");
// Migrate old user layer data (can be removed once migration is no
- // longer relevant; also see hack for xsi namespace in XmlReader
- // constructor):
+ // longer relevant, probably OOo 4; also see hack for xsi namespace in
+ // XmlReader constructor):
parseFiles(
Data::NO_LAYER, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".xcu")),
&parseXcuFile,
diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx
index 2e635680c1ce..880ac95d34a8 100644
--- a/configmgr/source/components.hxx
+++ b/configmgr/source/components.hxx
@@ -38,7 +38,10 @@
#include "com/sun/star/uno/Reference.hxx"
#include "rtl/ref.hxx"
+#include "additions.hxx"
#include "data.hxx"
+#include "modifications.hxx"
+#include "nodemap.hxx"
#include "path.hxx"
namespace com { namespace sun { namespace star {
@@ -56,7 +59,6 @@ namespace rtl {
namespace configmgr {
class Broadcaster;
-class Modifications;
class Node;
class Partial;
class RootAccess;
@@ -98,6 +100,9 @@ public:
bool shared, rtl::OUString const & fileUri,
Modifications * modifications);
+ void removeExtensionXcuFile(
+ rtl::OUString const & fileUri, Modifications * modifications);
+
void insertModificationXcuFile(
rtl::OUString const & fileUri,
std::set< rtl::OUString > const & includedPaths,
@@ -109,7 +114,8 @@ public:
private:
typedef void FileParser(
- rtl::OUString const &, int, Data &, Partial const *, Modifications *);
+ rtl::OUString const &, int, Data &, Partial const *, Modifications *,
+ Additions *);
Components(
com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
@@ -123,13 +129,14 @@ private:
void parseFileList(
int layer, FileParser * parseFile, rtl::OUString const & urls,
- rtl::Bootstrap const & ini);
+ rtl::Bootstrap const & ini, bool recordAdditions);
void parseXcdFiles(int layer, rtl::OUString const & url);
void parseXcsXcuLayer(int layer, rtl::OUString const & url);
- void parseXcsXcuIniLayer(int layer, rtl::OUString const & url);
+ void parseXcsXcuIniLayer(
+ int layer, rtl::OUString const & url, bool recordAdditions);
void parseModuleLayer(int layer, rtl::OUString const & url);
diff --git a/configmgr/source/data.cxx b/configmgr/source/data.cxx
index e12f9596940b..50466ca0532c 100644
--- a/configmgr/source/data.cxx
+++ b/configmgr/source/data.cxx
@@ -36,11 +36,13 @@
#include "osl/diagnose.h"
#include "rtl/ref.hxx"
#include "rtl/string.h"
+#include "rtl/textenc.h"
#include "rtl/ustrbuf.hxx"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
#include "sal/types.h"
+#include "additions.hxx"
#include "data.hxx"
#include "groupnode.hxx"
#include "node.hxx"
@@ -325,4 +327,46 @@ rtl::Reference< Node > Data::getTemplate(
return findNode(layer, templates, fullName);
}
+Additions * Data::addExtensionXcuAdditions(
+ rtl::OUString const & url, int layer)
+{
+ rtl::Reference< ExtensionXcu > item(new ExtensionXcu);
+ ExtensionXcuAdditions::iterator i(
+ extensionXcuAdditions_.insert(
+ ExtensionXcuAdditions::value_type(
+ url, rtl::Reference< ExtensionXcu >())).first);
+ if (i->second.is()) {
+ throw css::uno::RuntimeException(
+ (rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "already added extension xcu ")) +
+ url),
+ css::uno::Reference< css::uno::XInterface >());
+ }
+ i->second = item;
+ item->layer = layer;
+ return &item->additions;
+}
+
+rtl::Reference< Data::ExtensionXcu > Data::removeExtensionXcuAdditions(
+ rtl::OUString const & url)
+{
+ ExtensionXcuAdditions::iterator i(extensionXcuAdditions_.find(url));
+ if (i == extensionXcuAdditions_.end()) {
+ // This can happen, as migration of pre OOo 3.3 UserInstallation
+ // extensions in dp_registry::backend::configuration::BackendImpl::
+ // PackageImpl::processPackage_ can cause just-in-time creation of
+ // extension xcu files that are never added via addExtensionXcuAdditions
+ // (also, there might be url spelling differences between calls to
+ // addExtensionXcuAdditions and removeExtensionXcuAdditions?):
+ OSL_TRACE(
+ "unknown configmgr::Data::removeExtensionXcuAdditions(%s)",
+ rtl::OUStringToOString(url, RTL_TEXTENCODING_UTF8).getStr());
+ return rtl::Reference< ExtensionXcu >();
+ }
+ rtl::Reference< ExtensionXcu > item(i->second);
+ extensionXcuAdditions_.erase(i);
+ return item;
+}
+
}
diff --git a/configmgr/source/data.hxx b/configmgr/source/data.hxx
index 52353d066b67..8f5f7af0d86e 100644
--- a/configmgr/source/data.hxx
+++ b/configmgr/source/data.hxx
@@ -31,18 +31,20 @@
#include "sal/config.h"
#include <climits>
+#include <map>
#include <vector>
#include "boost/noncopyable.hpp"
#include "rtl/ref.hxx"
+#include "rtl/ustring.hxx"
#include "sal/types.h"
+#include "salhelper/simplereferenceobject.hxx"
+#include "additions.hxx"
#include "modifications.hxx"
#include "nodemap.hxx"
#include "path.hxx"
-namespace rtl { class OUString; }
-
namespace configmgr {
class Node;
@@ -50,6 +52,11 @@ class Node;
struct Data: private boost::noncopyable {
enum { NO_LAYER = INT_MAX };
+ struct ExtensionXcu: public salhelper::SimpleReferenceObject {
+ int layer;
+ Additions additions;
+ };
+
NodeMap templates;
NodeMap components;
@@ -80,6 +87,18 @@ struct Data: private boost::noncopyable {
rtl::Reference< Node > getTemplate(
int layer, rtl::OUString const & fullName) const;
+
+ Additions * addExtensionXcuAdditions(
+ rtl::OUString const & url, int layer);
+
+ rtl::Reference< ExtensionXcu > removeExtensionXcuAdditions(
+ rtl::OUString const & url);
+
+private:
+ typedef std::map< rtl::OUString, rtl::Reference< ExtensionXcu > >
+ ExtensionXcuAdditions;
+
+ ExtensionXcuAdditions extensionXcuAdditions_;
};
}
diff --git a/configmgr/source/modifications.cxx b/configmgr/source/modifications.cxx
index 2ad3b5ef8bd1..add18ceaa1ea 100644
--- a/configmgr/source/modifications.cxx
+++ b/configmgr/source/modifications.cxx
@@ -59,6 +59,27 @@ void Modifications::add(Path const & path) {
p->children.clear();
}
+void Modifications::remove(Path const & path) {
+ OSL_ASSERT(!path.empty());
+ Node * p = &root_;
+ for (Path::const_iterator i(path.begin());;) {
+ Node::Children::iterator j(p->children.find(*i));
+ if (j == p->children.end()) {
+ break;
+ }
+ if (++i == path.end()) {
+ p->children.erase(j);
+ if (p->children.empty()) {
+ Path parent(path);
+ parent.pop_back();
+ remove(parent);
+ }
+ break;
+ }
+ p = &j->second;
+ }
+}
+
Modifications::Node const & Modifications::getRoot() const {
return root_;
}
diff --git a/configmgr/source/modifications.hxx b/configmgr/source/modifications.hxx
index e29a10150148..c28b1aadd192 100644
--- a/configmgr/source/modifications.hxx
+++ b/configmgr/source/modifications.hxx
@@ -54,6 +54,8 @@ public:
void add(Path const & path);
+ void remove(Path const & path);
+
Node const & getRoot() const;
private:
diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx
index 4c1d59d5d054..403b761a5abd 100644
--- a/configmgr/source/update.cxx
+++ b/configmgr/source/update.cxx
@@ -89,6 +89,9 @@ private:
sal_Bool shared, rtl::OUString const & fileUri)
throw (css::uno::RuntimeException);
+ virtual void SAL_CALL removeExtensionXcuFile(rtl::OUString const & fileUri)
+ throw (css::uno::RuntimeException);
+
virtual void SAL_CALL insertModificationXcuFile(
rtl::OUString const & fileUri,
css::uno::Sequence< rtl::OUString > const & includedPaths,
@@ -120,6 +123,20 @@ void Service::insertExtensionXcuFile(
bc.send();
}
+void Service::removeExtensionXcuFile(rtl::OUString const & fileUri)
+ throw (css::uno::RuntimeException)
+{
+ Broadcaster bc;
+ {
+ osl::MutexGuard g(lock);
+ Modifications mods;
+ Components::getSingleton().removeExtensionXcuFile(fileUri, &mods);
+ Components::getSingleton().initGlobalBroadcaster(
+ mods, rtl::Reference< RootAccess >(), &bc);
+ }
+ bc.send();
+}
+
void Service::insertModificationXcuFile(
rtl::OUString const & fileUri,
css::uno::Sequence< rtl::OUString > const & includedPaths,
diff --git a/configmgr/source/xcdparser.cxx b/configmgr/source/xcdparser.cxx
index 498254b35644..ad774d5ca3e3 100644
--- a/configmgr/source/xcdparser.cxx
+++ b/configmgr/source/xcdparser.cxx
@@ -137,7 +137,7 @@ bool XcdParser::startElement(
if (ns == XmlReader::NAMESPACE_OOR &&
name.equals(RTL_CONSTASCII_STRINGPARAM("component-data")))
{
- nestedParser_ = new XcuParser(layer_ + 1, data_, 0, 0);
+ nestedParser_ = new XcuParser(layer_ + 1, data_, 0, 0, 0);
nesting_ = 1;
return nestedParser_->startElement(reader, ns, name);
}
diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx
index 79e122759fc8..37b46494c6a7 100644
--- a/configmgr/source/xcsparser.cxx
+++ b/configmgr/source/xcsparser.cxx
@@ -321,15 +321,19 @@ void XcsParser::endElement(XmlReader const & reader) {
} else {
switch (state_) {
case STATE_COMPONENT_SCHEMA:
+ // To support old, broken extensions with .xcs files that contain
+ // empty <component-schema> elements:
+ state_ = STATE_COMPONENT_DONE;
+ break;
+ case STATE_TEMPLATES:
+ state_ = STATE_TEMPLATES_DONE;
+ break;
case STATE_TEMPLATES_DONE:
throw css::uno::RuntimeException(
(rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("no component element in ")) +
reader.getUrl()),
css::uno::Reference< css::uno::XInterface >());
- case STATE_TEMPLATES:
- state_ = STATE_TEMPLATES_DONE;
- break;
case STATE_COMPONENT_DONE:
break;
default:
diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx
index cd1e6e55d085..91f3b244c5a8 100644
--- a/configmgr/source/xcuparser.cxx
+++ b/configmgr/source/xcuparser.cxx
@@ -68,12 +68,13 @@ namespace css = com::sun::star;
XcuParser::XcuParser(
int layer, Data & data, Partial const * partial,
- Modifications * broadcastModifications):
+ Modifications * broadcastModifications, Additions * additions):
valueParser_(layer), data_(data),
partial_(partial), broadcastModifications_(broadcastModifications),
- recordModifications_(layer == Data::NO_LAYER),
+ additions_(additions), recordModifications_(layer == Data::NO_LAYER),
trackPath_(
- partial_ != 0 || broadcastModifications_ != 0 || recordModifications_)
+ partial_ != 0 || broadcastModifications_ != 0 || additions_ != 0 ||
+ recordModifications_)
{}
XcuParser::~XcuParser() {}
@@ -624,7 +625,7 @@ void XcuParser::handleLocpropValue(
pop = true;
}
if (trackPath_) {
- recordModification();
+ recordModification(false);
if (pop) {
path_.pop_back();
}
@@ -638,7 +639,7 @@ void XcuParser::handleLocpropValue(
locprop->getMembers().erase(i);
}
state_.push(State(true));
- recordModification();
+ recordModification(false);
break;
default:
throw css::uno::RuntimeException(
@@ -750,7 +751,7 @@ void XcuParser::handleUnknownGroupProp(
prop->setFinalized(valueParser_.getLayer());
}
state_.push(State(prop, name, state_.top().locked));
- recordModification();
+ recordModification(false);
break;
}
// fall through
@@ -800,7 +801,7 @@ void XcuParser::handlePlainGroupProp(
property,
(state_.top().locked ||
finalizedLayer < valueParser_.getLayer())));
- recordModification();
+ recordModification(false);
break;
case OPERATION_REMOVE:
if (!property->isExtension()) {
@@ -814,7 +815,7 @@ void XcuParser::handlePlainGroupProp(
}
group->getMembers().erase(propertyIndex);
state_.push(State(true)); // ignore children
- recordModification();
+ recordModification(false);
break;
}
}
@@ -863,7 +864,7 @@ void XcuParser::handleLocalizedGroupProp(
replacement, name,
(state_.top().locked ||
finalizedLayer < valueParser_.getLayer())));
- recordModification();
+ recordModification(false);
}
break;
case OPERATION_REMOVE:
@@ -1070,7 +1071,7 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) {
member->setFinalized(finalizedLayer);
member->setMandatory(mandatoryLayer);
state_.push(State(member, name, false));
- recordModification();
+ recordModification(i == set->getMembers().end());
}
break;
case OPERATION_FUSE:
@@ -1084,7 +1085,7 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) {
member->setFinalized(finalizedLayer);
member->setMandatory(mandatoryLayer);
state_.push(State(member, name, false));
- recordModification();
+ recordModification(true);
}
} else {
state_.push(
@@ -1104,15 +1105,18 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) {
set->getMembers().erase(i);
}
state_.push(State(true));
- recordModification();
+ recordModification(false);
break;
}
}
-void XcuParser::recordModification() {
+void XcuParser::recordModification(bool addition) {
if (broadcastModifications_ != 0) {
broadcastModifications_->add(path_);
}
+ if (addition && additions_ != 0) {
+ additions_->push_back(path_);
+ }
if (recordModifications_) {
data_.modifications.add(path_);
}
diff --git a/configmgr/source/xcuparser.hxx b/configmgr/source/xcuparser.hxx
index 64108451b4ef..02ef4e5ff117 100644
--- a/configmgr/source/xcuparser.hxx
+++ b/configmgr/source/xcuparser.hxx
@@ -35,6 +35,7 @@
#include "rtl/ref.hxx"
#include "rtl/ustring.hxx"
+#include "additions.hxx"
#include "node.hxx"
#include "nodemap.hxx"
#include "parser.hxx"
@@ -59,7 +60,7 @@ class XcuParser: public Parser {
public:
XcuParser(
int layer, Data & data, Partial const * partial,
- Modifications * broadcastModifications);
+ Modifications * broadcastModifications, Additions * additions);
private:
virtual ~XcuParser();
@@ -108,7 +109,7 @@ private:
void handleSetNode(XmlReader & reader, SetNode * set);
- void recordModification();
+ void recordModification(bool addition);
struct State {
rtl::Reference< Node > node; // empty iff ignore or <items>
@@ -141,6 +142,7 @@ private:
Data & data_;
Partial const * partial_;
Modifications * broadcastModifications_;
+ Additions * additions_;
bool recordModifications_;
bool trackPath_;
rtl::OUString componentName_;
diff --git a/connectivity/source/commontools/formattedcolumnvalue.cxx b/connectivity/source/commontools/formattedcolumnvalue.cxx
index 3707b7fdb65d..d63c83524389 100644
--- a/connectivity/source/commontools/formattedcolumnvalue.cxx
+++ b/connectivity/source/commontools/formattedcolumnvalue.cxx
@@ -326,9 +326,16 @@ namespace dbtools
::rtl::OUString sStringValue;
if ( m_pData->m_xColumn.is() )
{
- sStringValue = DBTypeConversion::getValue(
- m_pData->m_xColumn, m_pData->m_xFormatter, m_pData->m_aNullDate, m_pData->m_nFormatKey, m_pData->m_nKeyType
- );
+ if ( m_pData->m_bNumericField )
+ {
+ sStringValue = DBTypeConversion::getValue(
+ m_pData->m_xColumn, m_pData->m_xFormatter, m_pData->m_aNullDate, m_pData->m_nFormatKey, m_pData->m_nKeyType
+ );
+ }
+ else
+ {
+ sStringValue = m_pData->m_xColumn->getString();
+ }
}
return sStringValue;
}
diff --git a/connectivity/source/drivers/odbcbase/OTools.cxx b/connectivity/source/drivers/odbcbase/OTools.cxx
index 43de55e3505c..d598de8bc12d 100644
--- a/connectivity/source/drivers/odbcbase/OTools.cxx
+++ b/connectivity/source/drivers/odbcbase/OTools.cxx
@@ -578,7 +578,7 @@ Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection,
// StarView zu lang ist oder der Treiber kann die Laenge der
// Daten nicht im voraus bestimmen - also als MemoryStream
// speichern.
- while ((pcbValue == SQL_NO_TOTAL ) || pcbValue > nMaxLen)
+ while ((pcbValue == SQL_NO_TOTAL ) || nLen > nMaxLen)
{
// Bei Strings wird der Puffer nie ganz ausgenutzt
// (das letzte Byte ist immer ein NULL-Byte, das
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index c706e2f8a6a8..bdfc0764a944 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1176,7 +1176,11 @@ bool MenuSaveInData::LoadSubMenus(
const OUString& rBaseTitle,
SvxConfigEntry* pParentData )
{
- SvxEntries* pEntries = pParentData->GetEntries();
+ SvxEntries* pEntries = pParentData->GetEntries();
+
+ // Don't access non existing menu configuration!
+ if ( !xMenuSettings.is() )
+ return true;
for ( sal_Int32 nIndex = 0; nIndex < xMenuSettings->getCount(); nIndex++ )
{
@@ -2593,17 +2597,20 @@ IMPL_LINK( SvxMenuConfigPage, SelectMenu, ListBox *, pBox )
SvxConfigEntry* pMenuData = GetTopLevelSelection();
PopupMenu* pPopup = aModifyTopLevelButton.GetPopupMenu();
- pPopup->EnableItem( ID_DELETE, pMenuData->IsDeletable() );
- pPopup->EnableItem( ID_RENAME, pMenuData->IsRenamable() );
- pPopup->EnableItem( ID_MOVE, pMenuData->IsMovable() );
+ if ( pMenuData )
+ {
+ pPopup->EnableItem( ID_DELETE, pMenuData->IsDeletable() );
+ pPopup->EnableItem( ID_RENAME, pMenuData->IsRenamable() );
+ pPopup->EnableItem( ID_MOVE, pMenuData->IsMovable() );
- SvxEntries* pEntries = pMenuData->GetEntries();
- SvxEntries::const_iterator iter = pEntries->begin();
+ SvxEntries* pEntries = pMenuData->GetEntries();
+ SvxEntries::const_iterator iter = pEntries->begin();
- for ( ; iter != pEntries->end(); iter++ )
- {
- SvxConfigEntry* pEntry = *iter;
- InsertEntryIntoUI( pEntry );
+ for ( ; iter != pEntries->end(); iter++ )
+ {
+ SvxConfigEntry* pEntry = *iter;
+ InsertEntryIntoUI( pEntry );
+ }
}
UpdateButtonStates();
diff --git a/cui/source/options/optimprove2.cxx b/cui/source/options/optimprove2.cxx
index 0078c0e77551..b2127d2680e8 100644
--- a/cui/source/options/optimprove2.cxx
+++ b/cui/source/options/optimprove2.cxx
@@ -52,6 +52,7 @@
#include <comphelper/synchronousdispatch.hxx>
#include <comphelper/uieventslogger.hxx>
#include <tools/testtoolloader.hxx>
+#include <osl/file.hxx>
#define C2S(s) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s))
@@ -61,6 +62,18 @@ namespace uno = ::com::sun::star::uno;
namespace util = ::com::sun::star::util;
using namespace com::sun::star::system;
+
+namespace
+{
+ bool lcl_doesLogfileExist(const ::rtl::OUString& sLogPath)
+ {
+ ::rtl::OUString sLogFile( sLogPath );
+ sLogFile += C2S("/Current.csv");
+ ::osl::File aLogFile(sLogFile);
+ return aLogFile.open(osl_File_OpenFlag_Read) == ::osl::FileBase::E_None;
+ }
+}
+
// class SvxImprovementOptionsPage ---------------------------------------
SvxImprovementOptionsPage::SvxImprovementOptionsPage( Window* pParent, const SfxItemSet& rSet ) :
@@ -143,7 +156,10 @@ IMPL_LINK( SvxImprovementOptionsPage, HandleShowData, PushButton*, EMPTYARG )
uno::Reference< lang::XComponent > xDoc = ::comphelper::SynchronousDispatch::dispatch(
xDesktop, sLogFile, C2S("_default"), 0, aArgs );
if ( xDoc.is() )
+ {
+ dynamic_cast<Dialog*>(GetParent())->EndDialog( RET_CANCEL );
return 1;
+ }
}
return 0;
@@ -244,11 +260,13 @@ void SvxImprovementOptionsPage::Reset( const SfxItemSet& /*rSet*/ )
if ( xSubst.is() )
sPath = xSubst->substituteVariables( sPath, sal_False );
m_sLogPath = sPath;
+ m_aShowDataPB.Enable(lcl_doesLogfileExist(m_sLogPath));
}
}
}
catch( uno::Exception& )
{
+ m_aShowDataPB.Enable(false);
}
}
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index cee1887832d2..6ee7a2b8ea4c 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -201,13 +201,6 @@ void OKeySet::findTableColumnsMatching_throw(const Any& i_aTable
,const Reference<XDatabaseMetaData>& i_xMeta
,const Reference<XNameAccess>& i_xQueryColumns)
{
- ::rtl::OUString sCatalog,sSchema,sTable;
- Reference<XPropertySet> xTableProp(i_aTable,UNO_QUERY);
- Any aCatalog = xTableProp->getPropertyValue(PROPERTY_CATALOGNAME);
- aCatalog >>= sCatalog;
- xTableProp->getPropertyValue(PROPERTY_SCHEMANAME) >>= sSchema;
- xTableProp->getPropertyValue(PROPERTY_NAME) >>= sTable;
-
// first ask the database itself for the best columns which can be used
Sequence< ::rtl::OUString> aBestColumnNames;
Reference<XNameAccess> xKeyColumns = getPrimaryKeyColumns_throw(i_aTable);
@@ -216,10 +209,6 @@ void OKeySet::findTableColumnsMatching_throw(const Any& i_aTable
const Reference<XColumnsSupplier> xTblColSup(i_aTable,UNO_QUERY_THROW);
const Reference<XNameAccess> xTblColumns = xTblColSup->getColumns();
- const ::rtl::OUString sComposedUpdateTableName = dbtools::composeTableName( i_xMeta, sCatalog, sSchema, sTable, sal_False, ::dbtools::eInDataManipulation );
- ::dbaccess::getColumnPositions(i_xQueryColumns,aBestColumnNames,sComposedUpdateTableName,(*m_pKeyColumnNames),true);
- ::dbaccess::getColumnPositions(i_xQueryColumns,xTblColumns->getElementNames(),sComposedUpdateTableName,(*m_pColumnNames),true);
-
// locate parameter in select columns
Reference<XParametersSupplier> xParaSup(m_xComposer,UNO_QUERY);
Reference<XIndexAccess> xQueryParameters = xParaSup->getParameters();
@@ -230,7 +219,26 @@ void OKeySet::findTableColumnsMatching_throw(const Any& i_aTable
Reference<XPropertySet> xPara(xQueryParameters->getByIndex(i),UNO_QUERY_THROW);
xPara->getPropertyValue(PROPERTY_REALNAME) >>= aParameterColumns[i];
}
- ::dbaccess::getColumnPositions(i_xQueryColumns,aParameterColumns,sComposedUpdateTableName,(*m_pParameterNames),true);
+
+ if ( m_sUpdateTableName.getLength() )
+ {
+ ::dbaccess::getColumnPositions(i_xQueryColumns,aBestColumnNames,m_sUpdateTableName,(*m_pKeyColumnNames),true);
+ ::dbaccess::getColumnPositions(i_xQueryColumns,xTblColumns->getElementNames(),m_sUpdateTableName,(*m_pColumnNames),true);
+ ::dbaccess::getColumnPositions(i_xQueryColumns,aParameterColumns,m_sUpdateTableName,(*m_pParameterNames),true);
+ }
+ else
+ {
+ ::rtl::OUString sCatalog,sSchema,sTable;
+ Reference<XPropertySet> xTableProp(i_aTable,UNO_QUERY);
+ Any aCatalog = xTableProp->getPropertyValue(PROPERTY_CATALOGNAME);
+ aCatalog >>= sCatalog;
+ xTableProp->getPropertyValue(PROPERTY_SCHEMANAME) >>= sSchema;
+ xTableProp->getPropertyValue(PROPERTY_NAME) >>= sTable;
+ const ::rtl::OUString sComposedUpdateTableName = dbtools::composeTableName( i_xMeta, sCatalog, sSchema, sTable, sal_False, ::dbtools::eInDataManipulation );
+ ::dbaccess::getColumnPositions(i_xQueryColumns,aBestColumnNames,sComposedUpdateTableName,(*m_pKeyColumnNames),true);
+ ::dbaccess::getColumnPositions(i_xQueryColumns,xTblColumns->getElementNames(),sComposedUpdateTableName,(*m_pColumnNames),true);
+ ::dbaccess::getColumnPositions(i_xQueryColumns,aParameterColumns,sComposedUpdateTableName,(*m_pParameterNames),true);
+ }
SelectColumnsMetaData::const_iterator aPosIter = m_pKeyColumnNames->begin();
SelectColumnsMetaData::const_iterator aPosEnd = m_pKeyColumnNames->end();
@@ -817,10 +825,12 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
for (;aAutoIter != aAutoEnd; ++aAutoIter)
{
// we will only fetch values which are keycolumns
- if ( m_pKeyColumnNames->find(*aAutoIter) != aEnd )
+ SelectColumnsMetaData::iterator aFind = m_pKeyColumnNames->find(*aAutoIter);
+ if ( aFind != aEnd )
{
sMaxStmt += sMax;
- sMaxStmt += ::dbtools::quoteName( sQuote,*aAutoIter);
+ sMaxStmt += ::dbtools::quoteName( sQuote,aFind->second.sRealName
+);
sMaxStmt += sMaxEnd;
}
}
@@ -831,7 +841,9 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
::rtl::OUString sStmt = ::rtl::OUString::createFromAscii("SELECT ");
sStmt += sMaxStmt;
sStmt += ::rtl::OUString::createFromAscii("FROM ");
- sStmt += m_aSelectComposedTableName;
+ ::rtl::OUString sCatalog,sSchema,sTable;
+ ::dbtools::qualifiedNameComponents(m_xConnection->getMetaData(),m_sUpdateTableName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
+ sStmt += ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable );
try
{
// now fetch the autoincrement values
@@ -1667,7 +1679,7 @@ void OKeySet::impl_convertValue_throw(const ORowSetRow& _rInsertRow,const Select
sal_Int32 nIndex = sValue.indexOf('.');
if ( nIndex != -1 )
{
- aValue = sValue.copy(0,nIndex + (i_aMetaData.nScale > 0 ? i_aMetaData.nScale + 1 : 0));
+ aValue = sValue.copy(0,::std::min(sValue.getLength(),nIndex + (i_aMetaData.nScale > 0 ? i_aMetaData.nScale + 1 : 0)));
}
}
break;
diff --git a/dbaccess/source/core/api/KeySet.hxx b/dbaccess/source/core/api/KeySet.hxx
index 694593e6c608..212ec237699e 100644
--- a/dbaccess/source/core/api/KeySet.hxx
+++ b/dbaccess/source/core/api/KeySet.hxx
@@ -112,7 +112,6 @@ namespace dbaccess
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow> m_xRow;
::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryAnalyzer > m_xComposer;
::rtl::OUString m_sUpdateTableName;
- ::rtl::OUString m_aSelectComposedTableName;
::std::vector< ::rtl::OUString > m_aFilterColumns;
sal_Bool m_bRowCountFinal;
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 69520d043c52..2f9a58c975b7 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1266,13 +1266,13 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
// Feldnamen
sal_uInt16 i;
for (i=0;i< pLhs->count();i++)
- pCondition->getChild(i)->parseNodeToPredicateStr( aName, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) );
+ pLhs->getChild(i)->parseNodeToPredicateStr( aName, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) );
// Kriterium
aItem.Handle = pCondition->getChild(1)->getNodeType();
aValue = pCondition->getChild(1)->getTokenValue();
for(i=0;i< pRhs->count();i++)
- pCondition->getChild(i)->parseNodeToPredicateStr(aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) );
+ pRhs->getChild(i)->parseNodeToPredicateStr(aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) );
aItem.Name = aName;
aItem.Value <<= aValue;
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 4615c65fc042..7678cfbba62e 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -1569,16 +1569,7 @@ sal_Bool ODocumentDefinition::saveAs()
Reference<XNameContainer> xNC(pDocuSave->getContent(),UNO_QUERY);
if ( xNC.is() )
{
- if ( m_pImpl->m_aProps.aTitle == pDocuSave->getName() )
- {
- Reference<XEmbedPersist> xPersist(m_xEmbeddedObject,UNO_QUERY);
- if ( xPersist.is() )
- {
- xPersist->storeOwn();
- notifyDataSourceModified();
- }
- }
- else
+ if ( m_pImpl->m_aProps.aTitle != pDocuSave->getName() )
{
try
{
@@ -1618,6 +1609,12 @@ sal_Bool ODocumentDefinition::saveAs()
DBG_UNHANDLED_EXCEPTION();
}
}
+ Reference<XEmbedPersist> xPersist(m_xEmbeddedObject,UNO_QUERY);
+ if ( xPersist.is() )
+ {
+ xPersist->storeOwn();
+ notifyDataSourceModified();
+ }
}
}
}
diff --git a/dbaccess/source/core/inc/DatabaseDataProvider.hxx b/dbaccess/source/core/inc/DatabaseDataProvider.hxx
index e1ceb4dde6f2..e75c980e2a93 100644
--- a/dbaccess/source/core/inc/DatabaseDataProvider.hxx
+++ b/dbaccess/source/core/inc/DatabaseDataProvider.hxx
@@ -33,11 +33,12 @@
#include "com/sun/star/lang/XServiceInfo.hpp"
#include "com/sun/star/chart2/data/XDatabaseDataProvider.hpp"
#include "com/sun/star/chart2/XInternalDataProvider.hpp"
+#include <com/sun/star/chart/XComplexDescriptionAccess.hpp>
#include <com/sun/star/sdbc/XRowSet.hpp>
#include <com/sun/star/sdbc/XParameters.hpp>
#include <com/sun/star/container/XChild.hpp>
-#include "cppuhelper/compbase3.hxx"
+#include "cppuhelper/compbase4.hxx"
#include "cppuhelper/basemutex.hxx"
#include "cppuhelper/propertysetmixin.hxx"
#include <cppuhelper/implementationentry.hxx>
@@ -52,8 +53,9 @@ namespace dbaccess
{
class DatabaseDataSource;
-typedef ::cppu::WeakComponentImplHelper3< ::com::sun::star::chart2::data::XDatabaseDataProvider
+typedef ::cppu::WeakComponentImplHelper4< ::com::sun::star::chart2::data::XDatabaseDataProvider
, ::com::sun::star::container::XChild
+ , ::com::sun::star::chart::XComplexDescriptionAccess
, ::com::sun::star::lang::XServiceInfo > TDatabaseDataProvider;
class DatabaseDataProvider: private ::cppu::BaseMutex,
@@ -187,6 +189,26 @@ private:
// conatiner::XChild
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
+
+ // ____ XComplexDescriptionAccess ____
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > > SAL_CALL getComplexRowDescriptions() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setComplexRowDescriptions( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > >& aRowDescriptions ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > > SAL_CALL getComplexColumnDescriptions() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setComplexColumnDescriptions( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > >& aColumnDescriptions ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ XChartDataArray (base of XComplexDescriptionAccess) ____
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL getData() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > >& aData ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowDescriptions() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRowDescriptions ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getColumnDescriptions() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aColumnDescriptions ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ XChartData (base of XChartDataArray) ____
+ virtual void SAL_CALL addChartDataChangeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeChartDataChangeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener )throw (::com::sun::star::uno::RuntimeException);
+ virtual double SAL_CALL getNotANumber()throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isNotANumber(double nNumber )throw (::com::sun::star::uno::RuntimeException);
private:
DatabaseDataProvider(DatabaseDataProvider &); // not defined
void operator =(DatabaseDataProvider &); // not defined
@@ -229,6 +251,7 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xActiveConnection;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xRowSet;
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XInternalDataProvider > m_xInternal;
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart::XComplexDescriptionAccess > m_xComplexDescriptionAccess;
::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XRangeXMLConversion> m_xRangeConversion;
::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler> m_xHandler;
// the object doin' most of the work - an SDB-rowset
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index a83b04d93471..802e052297f9 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -43,6 +43,7 @@
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
+#include <com/sun/star/sdbc/XColumnLocate.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/chart/XChartDataArray.hpp>
@@ -72,6 +73,7 @@ DatabaseDataProvider::DatabaseDataProvider(uno::Reference< uno::XComponentContex
{
m_xInternal.set( m_xContext->getServiceManager()->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.chart.InternalDataProvider")),m_xContext ), uno::UNO_QUERY );
m_xRangeConversion.set(m_xInternal,uno::UNO_QUERY);
+ m_xComplexDescriptionAccess.set(m_xInternal,uno::UNO_QUERY);
osl_incrementInterlockedCount( &m_refCount );
{
@@ -315,6 +317,75 @@ uno::Reference< chart2::data::XDataSequence > SAL_CALL DatabaseDataProvider::cre
}
return xData;
}
+
+uno::Sequence< uno::Sequence< rtl::OUString > > SAL_CALL DatabaseDataProvider::getComplexRowDescriptions() throw (uno::RuntimeException)
+{
+ return m_xComplexDescriptionAccess->getComplexRowDescriptions();
+}
+void SAL_CALL DatabaseDataProvider::setComplexRowDescriptions( const uno::Sequence< uno::Sequence< ::rtl::OUString > >& aRowDescriptions ) throw (uno::RuntimeException)
+{
+ m_xComplexDescriptionAccess->setComplexRowDescriptions(aRowDescriptions);
+}
+uno::Sequence< uno::Sequence< rtl::OUString > > SAL_CALL DatabaseDataProvider::getComplexColumnDescriptions() throw (uno::RuntimeException)
+{
+ return m_xComplexDescriptionAccess->getComplexColumnDescriptions();
+}
+void SAL_CALL DatabaseDataProvider::setComplexColumnDescriptions( const uno::Sequence< uno::Sequence< rtl::OUString > >& aColumnDescriptions ) throw (uno::RuntimeException)
+{
+ m_xComplexDescriptionAccess->setComplexColumnDescriptions(aColumnDescriptions);
+}
+// ____ XChartDataArray ____
+uno::Sequence< uno::Sequence< double > > SAL_CALL DatabaseDataProvider::getData() throw (uno::RuntimeException)
+{
+ return m_xComplexDescriptionAccess->getData();
+}
+
+void SAL_CALL DatabaseDataProvider::setData( const uno::Sequence< uno::Sequence< double > >& rDataInRows ) throw (uno::RuntimeException)
+{
+ m_xComplexDescriptionAccess->setData(rDataInRows);
+}
+
+void SAL_CALL DatabaseDataProvider::setRowDescriptions( const uno::Sequence< rtl::OUString >& aRowDescriptions ) throw (uno::RuntimeException)
+{
+ m_xComplexDescriptionAccess->setRowDescriptions(aRowDescriptions);
+}
+
+void SAL_CALL DatabaseDataProvider::setColumnDescriptions( const uno::Sequence< rtl::OUString >& aColumnDescriptions ) throw (uno::RuntimeException)
+{
+ m_xComplexDescriptionAccess->setColumnDescriptions(aColumnDescriptions);
+}
+
+uno::Sequence< rtl::OUString > SAL_CALL DatabaseDataProvider::getRowDescriptions() throw (uno::RuntimeException)
+{
+ return m_xComplexDescriptionAccess->getRowDescriptions();
+}
+
+uno::Sequence< rtl::OUString > SAL_CALL DatabaseDataProvider::getColumnDescriptions() throw (uno::RuntimeException)
+{
+ return m_xComplexDescriptionAccess->getColumnDescriptions();
+}
+
+// ____ XChartData (base of XChartDataArray) ____
+void SAL_CALL DatabaseDataProvider::addChartDataChangeEventListener(const uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& x) throw (uno::RuntimeException)
+{
+ m_xComplexDescriptionAccess->addChartDataChangeEventListener(x);
+}
+
+void SAL_CALL DatabaseDataProvider::removeChartDataChangeEventListener(const uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& x) throw (uno::RuntimeException)
+{
+ m_xComplexDescriptionAccess->removeChartDataChangeEventListener(x);
+}
+
+double SAL_CALL DatabaseDataProvider::getNotANumber() throw (uno::RuntimeException)
+{
+ return m_xComplexDescriptionAccess->getNotANumber();
+}
+
+::sal_Bool SAL_CALL DatabaseDataProvider::isNotANumber( double nNumber ) throw (uno::RuntimeException)
+{
+ return m_xComplexDescriptionAccess->isNotANumber(nNumber);
+}
+
// -----------------------------------------------------------------------------
uno::Reference< sheet::XRangeSelection > SAL_CALL DatabaseDataProvider::getRangeSelection() throw (uno::RuntimeException)
@@ -616,26 +687,28 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat
uno::Reference< sdbc::XResultSet> xRes(m_xRowSet,uno::UNO_QUERY_THROW);
uno::Reference< sdbc::XRow> xRow(m_xRowSet,uno::UNO_QUERY_THROW);
uno::Reference< sdbc::XResultSetMetaData> xResultSetMetaData = uno::Reference< sdbc::XResultSetMetaDataSupplier>(m_xRowSet,uno::UNO_QUERY)->getMetaData();
+ uno::Reference< sdbc::XColumnLocate> xColumnLocate(m_xRowSet,uno::UNO_QUERY_THROW);
::std::vector<sal_Int32> aColumnTypes;
uno::Sequence< uno::Any > aLabelArgs(1);
const sal_Int32 nCount = aColumns.getLength();
if ( nCount )
aColumnTypes.push_back(xResultSetMetaData->getColumnType(1));
- for (sal_Int32 i = 1; i < nCount; ++i)
- {
- aColumnTypes.push_back(xResultSetMetaData->getColumnType(i+1));
- } // for (sal_Int32 i = 1; i < nCount; ++i)
+ ::std::vector< sal_Int32 > aColumnPositions;
const ::rtl::OUString* pIter = aColumns.getConstArray();
const ::rtl::OUString* pEnd = pIter + aColumns.getLength();
for(sal_Int32 k = 0;pIter != pEnd;++pIter,++k)
{
+ aColumnPositions.push_back(xColumnLocate->findColumn(*pIter));
uno::Reference< beans::XPropertySet> xColumn(xColumns->getByName(*pIter),uno::UNO_QUERY);
+ sal_Int32 nType = sdbc::DataType::VARCHAR;
if ( xColumn.is() )
{
m_aNumberFormats.insert( ::std::map< ::rtl::OUString,uno::Any>::value_type(::rtl::OUString::valueOf(k),xColumn->getPropertyValue(PROPERTY_NUMBERFORMAT)));
+ xColumn->getPropertyValue(PROPERTY_TYPE) >>= nType;
}
+ aColumnTypes.push_back(nType);
}
::std::vector< ::rtl::OUString > aRowLabels;
@@ -649,9 +722,17 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat
aValue.fill(1,aColumnTypes[0],xRow);
aRowLabels.push_back(aValue.getString());
::std::vector< double > aRow;
- for (sal_Int32 j = _bHasCategories ? 2 : 1,i = 0; j <= nCount; ++j,++i)
+ ::std::vector< sal_Int32 >::iterator aColumnPosIter = aColumnPositions.begin();
+ ::std::vector< sal_Int32 >::iterator aColumnPosEnd = aColumnPositions.end();
+ sal_Int32 i = 0;
+ if ( _bHasCategories )
{
- aValue.fill(j,aColumnTypes[j-1],xRow);
+ ++aColumnPosIter;
+ ++i;
+ }
+ for (; aColumnPosIter != aColumnPosEnd; ++aColumnPosIter,++i)
+ {
+ aValue.fill(*aColumnPosIter,aColumnTypes[i],xRow);
if ( aValue.isNull() )
{
double nValue;
@@ -660,7 +741,7 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat
}
else
aRow.push_back(aValue.getDouble());
- } // for (sal_Int32 j = 2,i = 0; j <= nCount; ++j,++i)
+ }
aDataValues.push_back(aRow);
} // while( xRes->next() && (!m_RowLimit || nRowCount < m_RowLimit) )
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 1905193a4f04..9d659c26e707 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1347,7 +1347,9 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
InvalidateAll();
break;
case SID_DB_APP_DSRELDESIGN:
- if ( !m_pSubComponentManager->activateSubFrame( ::rtl::OUString(), SID_DB_APP_DSRELDESIGN, E_OPEN_DESIGN ) )
+ {
+ Reference< XComponent > xRelationDesigner;
+ if ( !m_pSubComponentManager->activateSubFrame( ::rtl::OUString(), SID_DB_APP_DSRELDESIGN, E_OPEN_DESIGN, xRelationDesigner ) )
{
SharedConnection xConnection( ensureConnection() );
if ( xConnection.is() )
@@ -1359,7 +1361,8 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
onDocumentOpened( ::rtl::OUString(), SID_DB_APP_DSRELDESIGN, E_OPEN_DESIGN, xComponent, NULL );
}
}
- break;
+ }
+ break;
case SID_DB_APP_DSUSERADMIN:
{
SharedConnection xConnection( ensureConnection() );
@@ -1844,7 +1847,7 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const
case E_REPORT:
case E_FORM:
{
- if ( !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode ) )
+ if ( !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode, xRet ) )
{
::std::auto_ptr< OLinkedDocumentsAccess > aHelper = getDocumentsAccess( _eType );
if ( !aHelper->isConnected() )
@@ -1861,7 +1864,7 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const
case E_QUERY:
case E_TABLE:
{
- if ( !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode ) )
+ if ( !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode, xRet ) )
{
SharedConnection xConnection( ensureConnection() );
if ( !xConnection.is() )
diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx
index 56fbc30f46e7..9b56120c3ea0 100644
--- a/dbaccess/source/ui/app/subcomponentmanager.cxx
+++ b/dbaccess/source/ui/app/subcomponentmanager.cxx
@@ -529,7 +529,8 @@ namespace dbaui
}
//------------------------------------------------------------------------------------------------------------------
- bool SubComponentManager::activateSubFrame( const ::rtl::OUString& _rName, const sal_Int32 _nComponentType, const ElementOpenMode _eOpenMode ) const
+ bool SubComponentManager::activateSubFrame( const ::rtl::OUString& _rName, const sal_Int32 _nComponentType,
+ const ElementOpenMode _eOpenMode, Reference< XComponent >& o_rComponent ) const
{
::osl::MutexGuard aGuard( m_pData->getMutex() );
@@ -546,6 +547,13 @@ namespace dbaui
const Reference< XTopWindow > xTopWindow( xFrame->getContainerWindow(), UNO_QUERY_THROW );
xTopWindow->toFront();
+ if ( pos->xModel.is() )
+ o_rComponent = pos->xModel.get();
+ else if ( pos->xController.is() )
+ o_rComponent = pos->xController.get();
+ else
+ o_rComponent = pos->xFrame.get();
+
return true;
}
diff --git a/dbaccess/source/ui/app/subcomponentmanager.hxx b/dbaccess/source/ui/app/subcomponentmanager.hxx
index f7f93ab6a53b..72b0a548e533 100644
--- a/dbaccess/source/ui/app/subcomponentmanager.hxx
+++ b/dbaccess/source/ui/app/subcomponentmanager.hxx
@@ -90,7 +90,8 @@ namespace dbaui
bool activateSubFrame(
const ::rtl::OUString& _rName,
const sal_Int32 _nComponentType,
- const ElementOpenMode _eOpenMode
+ const ElementOpenMode _eOpenMode,
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& o_rComponent
) const;
/** closes all frames of the given component
diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index 8867a940a6ad..fa7550812bbe 100644
--- a/desktop/inc/app.hxx
+++ b/desktop/inc/app.hxx
@@ -134,6 +134,9 @@ class Desktop : public Application
static sal_Bool IsFirstStartWizardNeeded();
static sal_Bool CheckExtensionDependencies();
+ static void DoRestartActionsIfNecessary( sal_Bool bQuickStart );
+ static void SetRestartState();
+
void SynchronizeExtensionRepositories();
void SetSplashScreenText( const ::rtl::OUString& rText );
void SetSplashScreenProgress( sal_Int32 );
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index b60af4ede03e..e0f976df34ed 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1558,6 +1558,7 @@ void Desktop::Main()
std::auto_ptr<SvtLanguageOptions> pLanguageOptions;
std::auto_ptr<SvtPathOptions> pPathOptions;
+ Reference< ::com::sun::star::task::XRestartManager > xRestartManager;
sal_Bool bRestartRequested( sal_False );
sal_Bool bUseSystemFileDialog(sal_True);
int nAcquireCount( 0 );
@@ -1761,7 +1762,6 @@ void Desktop::Main()
impl_checkRecoveryState(bCrashed, bExistsRecoveryData, bExistsSessionData);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} impl_checkRecoveryState" );
- Reference< ::com::sun::star::task::XRestartManager > xRestartManager;
{
::comphelper::ComponentContext aContext( xSMgr );
xRestartManager.set( aContext.getSingleton( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.OfficeRestartManager" ) ) ), UNO_QUERY );
@@ -1922,6 +1922,10 @@ void Desktop::Main()
// The configuration error handler currently is only for startup
aConfigErrHandler.deactivate();
+ // Acquire solar mutex just before we enter our message loop
+ if ( nAcquireCount )
+ Application::AcquireSolarMutex( nAcquireCount );
+
// call Application::Execute to process messages in vcl message loop
RTL_LOGFILE_PRODUCT_TRACE( "PERFORMANCE - enter Application::Execute()" );
@@ -1932,7 +1936,16 @@ void Desktop::Main()
com::sun::star::uno::ContextLayer layer2(
new svt::JavaContext( com::sun::star::uno::getCurrentContext() ) );
- Execute();
+ // check whether the shutdown is caused by restart just before entering the Execute
+ bRestartRequested = bRestartRequested || ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
+
+ if ( !bRestartRequested )
+ {
+ // if this run of the office is triggered by restart, some additional actions should be done
+ DoRestartActionsIfNecessary( !pCmdLineArgs->IsInvisible() && !pCmdLineArgs->IsNoQuickstart() );
+
+ Execute();
+ }
}
catch(const com::sun::star::document::CorruptedFilterConfigurationException& exFilterCfg)
{
@@ -1946,6 +1959,9 @@ void Desktop::Main()
}
}
+ if ( bRestartRequested )
+ SetRestartState();
+
if (xGlobalBroadcaster.is())
{
css::document::EventObject aEvent;
diff --git a/desktop/source/app/appfirststart.cxx b/desktop/source/app/appfirststart.cxx
index 2f0d4ab9e538..c06d94fd0812 100644
--- a/desktop/source/app/appfirststart.cxx
+++ b/desktop/source/app/appfirststart.cxx
@@ -36,12 +36,14 @@
#include <comphelper/processfactory.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/util/XChangesBatch.hpp>
#include "app.hxx"
-using rtl::OUString;
-using namespace desktop;
-using namespace com::sun::star::beans;
+using ::rtl::OUString;
+using namespace ::desktop;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::beans;
static const OUString sConfigSrvc( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" ) );
static const OUString sAccessSrvc( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationUpdateAccess" ) );
@@ -128,24 +130,29 @@ sal_Bool Desktop::LicenseNeedsAcceptance()
*/
}
-/* Local function - was the wizard completed already? */
-static sal_Bool impl_isFirstStart()
+/* Local function - get access to the configuration */
+static Reference< XPropertySet > impl_getConfigurationAccess( const OUString& rPath )
{
- try {
- Reference < XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
+ Reference < XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
- // get configuration provider
- Reference< XMultiServiceFactory > theConfigProvider = Reference< XMultiServiceFactory >(
- xFactory->createInstance(sConfigSrvc), UNO_QUERY_THROW);
+ // get configuration provider
+ Reference< XMultiServiceFactory > xConfigProvider = Reference< XMultiServiceFactory >(
+ xFactory->createInstance( sConfigSrvc ), UNO_QUERY_THROW );
- Sequence< Any > theArgs(1);
- NamedValue v(OUString::createFromAscii("NodePath"), makeAny(OUString::createFromAscii("org.openoffice.Setup/Office")));
- theArgs[0] <<= v;
+ Sequence< Any > aArgs( 1 );
+ NamedValue aValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "NodePath" ) ), makeAny( rPath ) );
+ aArgs[0] <<= aValue;
+ return Reference< XPropertySet >(
+ xConfigProvider->createInstanceWithArguments( sAccessSrvc, aArgs ), UNO_QUERY_THROW );
+}
- Reference< XPropertySet > pset = Reference< XPropertySet >(
- theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs), UNO_QUERY_THROW);
+/* Local function - was the wizard completed already? */
+static sal_Bool impl_isFirstStart()
+{
+ try {
+ Reference< XPropertySet > xPSet = impl_getConfigurationAccess( OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Setup/Office" ) ) );
- Any result = pset->getPropertyValue(OUString::createFromAscii("FirstStartWizardCompleted"));
+ Any result = xPSet->getPropertyValue(OUString::createFromAscii("FirstStartWizardCompleted"));
sal_Bool bCompleted = sal_False;
if ((result >>= bCompleted) && bCompleted)
return sal_False; // wizard was already completed
@@ -219,20 +226,9 @@ static sal_Bool impl_isLicenseAccepted()
try
{
- Reference < XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
-
- // get configuration provider
- Reference< XMultiServiceFactory > theConfigProvider = Reference< XMultiServiceFactory >(
- xFactory->createInstance(sConfigSrvc), UNO_QUERY_THROW);
+ Reference< XPropertySet > xPSet = impl_getConfigurationAccess( OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Setup/Office" ) ) );
- Sequence< Any > theArgs(1);
- NamedValue v(OUString::createFromAscii("NodePath"),
- makeAny(OUString::createFromAscii("org.openoffice.Setup/Office")));
- theArgs[0] <<= v;
- Reference< XPropertySet > pset = Reference< XPropertySet >(
- theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs), UNO_QUERY_THROW);
-
- Any result = pset->getPropertyValue(OUString::createFromAscii("LicenseAcceptDate"));
+ Any result = xPSet->getPropertyValue(OUString::createFromAscii("LicenseAcceptDate"));
OUString aAcceptDate;
if (result >>= aAcceptDate)
@@ -272,3 +268,51 @@ sal_Bool Desktop::IsFirstStartWizardNeeded()
return impl_isFirstStart() || !impl_isLicenseAccepted();
}
+void Desktop::DoRestartActionsIfNecessary( sal_Bool bQuickStart )
+{
+ if ( bQuickStart )
+ {
+ try
+ {
+ Reference< XPropertySet > xPSet = impl_getConfigurationAccess( OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Setup/Office" ) ) );
+
+ OUString sPropName( RTL_CONSTASCII_USTRINGPARAM( "OfficeRestartInProgress" ) );
+ Any aRestart = xPSet->getPropertyValue( sPropName );
+ sal_Bool bRestart = sal_False;
+ if ( ( aRestart >>= bRestart ) && bRestart )
+ {
+ xPSet->setPropertyValue( sPropName, makeAny( sal_False ) );
+ Reference< util::XChangesBatch >( xPSet, UNO_QUERY_THROW )->commitChanges();
+
+ Sequence< Any > aSeq( 2 );
+ aSeq[0] <<= sal_True;
+ aSeq[1] <<= sal_True;
+
+ Reference < XInitialization > xQuickstart( ::comphelper::getProcessServiceFactory()->createInstance(
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.office.Quickstart" ) ) ),UNO_QUERY_THROW );
+ xQuickstart->initialize( aSeq );
+ }
+ }
+ catch( uno::Exception& )
+ {
+ // this is no critical operation so it should not prevent office from starting
+ }
+ }
+}
+
+void Desktop::SetRestartState()
+{
+ try
+ {
+ Reference< XPropertySet > xPSet = impl_getConfigurationAccess( OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Setup/Office" ) ) );
+ OUString sPropName( RTL_CONSTASCII_USTRINGPARAM( "OfficeRestartInProgress" ) );
+ xPSet->setPropertyValue( sPropName, makeAny( sal_True ) );
+ Reference< util::XChangesBatch >( xPSet, UNO_QUERY_THROW )->commitChanges();
+ }
+ catch( uno::Exception& )
+ {
+ // this is no critical operation, ignore the exception
+ }
+
+}
+
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 3c6680065db5..1e7ee5bfac8a 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -139,7 +139,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
void addDataToDb(OUString const & url, ConfigurationBackendDb::Data const & data);
::boost::optional<ConfigurationBackendDb::Data> readDataFromDb(OUString const & url);
- void deleteDataFromDb(OUString const & url);
+ OUString deleteDataFromDb(OUString const & url);
::std::list<OUString> getAllIniEntries();
public:
@@ -240,10 +240,18 @@ void BackendImpl::addDataToDb(
return data;
}
-void BackendImpl::deleteDataFromDb(OUString const & url)
+OUString BackendImpl::deleteDataFromDb(OUString const & url)
{
- if (m_backendDb.get())
+ OUString url2(url);
+ if (m_backendDb.get()) {
+ boost::optional< ConfigurationBackendDb::Data > data(
+ m_backendDb->getEntry(url));
+ if (data) {
+ url2 = expandUnoRcTerm(data->iniEntry);
+ }
m_backendDb->removeEntry(url);
+ }
+ return url2;
}
::std::list<OUString> BackendImpl::getAllIniEntries()
@@ -717,11 +725,11 @@ void BackendImpl::PackageImpl::processPackage_(
//rebuilding the directory structure.
rtl::OUString url2(
rtl::OStringToOUString(i->first, RTL_TEXTENCODING_UTF8));
- ConfigurationBackendDb::Data data;
if (url2 != url) {
bool schema = i->second.equalsIgnoreAsciiCase(
"vnd.sun.star.configuration-schema");
OUString url_replaced(url2);
+ ConfigurationBackendDb::Data data;
if (!schema)
{
const OUString sModFolder = that->createFolder(OUString(), xCmdEnv);
@@ -734,6 +742,7 @@ void BackendImpl::PackageImpl::processPackage_(
deleteTempFolder(sModFolder);
}
that->addToConfigmgrIni(schema, url_replaced, xCmdEnv);
+ data.iniEntry = dp_misc::makeRcTerm(url_replaced);
that->addDataToDb(url2, data);
}
that->m_registeredPackages->erase(i->first);
@@ -750,9 +759,12 @@ void BackendImpl::PackageImpl::processPackage_(
OSL_ASSERT(0);
}
}
- that->deleteDataFromDb(getURL());
-
- //TODO: revoking at runtime, possible, sensible?
+ url = that->deleteDataFromDb(url);
+ if (!m_isSchema) {
+ com::sun::star::configuration::Update::get(
+ that->m_xComponentContext)->removeExtensionXcuFile(
+ expandUnoRcUrl(url));
+ }
}
}
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index bc17a1f7163d..5a5efe825cfb 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -80,6 +80,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
::rtl::Reference<AbortChannel> const & abortChannel,
Reference<XCommandEnvironment> const & xCmdEnv );
+ bool extensionContainsCompiledHelp();
public:
PackageImpl(
::rtl::Reference<PackageRegistryBackend> const & myBackend,
@@ -100,7 +101,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
Reference<XCommandEnvironment> const & xCmdEnv );
void implProcessHelp( Reference< deployment::XPackage > xPackage, bool doRegisterPackage,
- Reference<ucb::XCommandEnvironment> const & xCmdEnv);
+ bool compiledHelp, Reference<ucb::XCommandEnvironment> const & xCmdEnv);
void implCollectXhpFiles( const rtl::OUString& aDir,
std::vector< rtl::OUString >& o_rXhpFileVector );
@@ -259,6 +260,57 @@ BackendImpl * BackendImpl::PackageImpl::getMyBackend() const
return pBackend;
}
+
+bool BackendImpl::PackageImpl::extensionContainsCompiledHelp()
+{
+ bool bCompiled = true;
+ rtl::OUString aExpandedHelpURL = dp_misc::expandUnoRcUrl(getURL());
+
+ ::osl::Directory helpFolder(aExpandedHelpURL);
+ if ( helpFolder.open() == ::osl::File::E_None)
+ {
+ //iterate over the contents of the help folder
+ //We assume that all folders withing the help folder contain language specific
+ //help files. If just one of them does not contain compiled help then this
+ //function returns false.
+ ::osl::DirectoryItem item;
+ ::osl::File::RC errorNext = ::osl::File::E_None;
+ while ((errorNext = helpFolder.getNextItem(item)) == ::osl::File::E_None)
+ {
+ //No find the language folders
+ ::osl::FileStatus stat(FileStatusMask_Type | FileStatusMask_FileName |FileStatusMask_FileURL);
+ if (item.getFileStatus(stat) == ::osl::File::E_None)
+ {
+ if (stat.getFileType() != ::osl::FileStatus::Directory)
+ continue;
+
+ //look if there is the folder help.idxl in the language folder
+ OUString compUrl(stat.getFileURL() + OUSTR("/help.idxl"));
+ ::osl::Directory compiledFolder(compUrl);
+ if (compiledFolder.open() != ::osl::File::E_None)
+ {
+ bCompiled = false;
+ break;
+ }
+ }
+ else
+ {
+ //Error
+ OSL_ASSERT(0);
+ bCompiled = false;
+ break;
+ }
+ }
+ if (errorNext != ::osl::File::E_NOENT
+ && errorNext != ::osl::File::E_None)
+ {
+ //Error
+ OSL_ASSERT(0);
+ bCompiled = false;
+ }
+ }
+ return bCompiled;
+}
//______________________________________________________________________________
beans::Optional< beans::Ambiguous<sal_Bool> >
BackendImpl::PackageImpl::isRegistered_(
@@ -289,7 +341,8 @@ void BackendImpl::PackageImpl::processPackage_(
BackendImpl* that = getMyBackend();
Reference< deployment::XPackage > xThisPackage( this );
- that->implProcessHelp( xThisPackage, doRegisterPackage, xCmdEnv);
+ that->implProcessHelp( xThisPackage, doRegisterPackage,
+ extensionContainsCompiledHelp(), xCmdEnv);
}
beans::Optional< OUString > BackendImpl::PackageImpl::getRegistrationDataURL()
@@ -316,213 +369,220 @@ static rtl::OUString aHelpStr( rtl::OUString::createFromAscii( "help" ) );
void BackendImpl::implProcessHelp
-( Reference< deployment::XPackage > xPackage, bool doRegisterPackage,
+( Reference< deployment::XPackage > xPackage, bool doRegisterPackage, bool compiledHelp,
Reference<ucb::XCommandEnvironment> const & xCmdEnv)
{
OSL_ASSERT(xPackage.is());
if (doRegisterPackage)
{
HelpBackendDb::Data data;
- const OUString sHelpFolder = createFolder(OUString(), xCmdEnv);
- data.dataUrl = sHelpFolder;
-
- Reference< ucb::XSimpleFileAccess > xSFA = getFileAccess();
- rtl::OUString aHelpURL = xPackage->getURL();
- rtl::OUString aExpandedHelpURL = dp_misc::expandUnoRcUrl( aHelpURL );
- rtl::OUString aName = xPackage->getName();
- if( !xSFA->isFolder( aExpandedHelpURL ) )
+
+ if (compiledHelp)
{
- rtl::OUString aErrStr = getResourceString( RID_STR_HELPPROCESSING_GENERAL_ERROR );
- aErrStr += rtl::OUString::createFromAscii( "No help folder" );
- OWeakObject* oWeakThis = static_cast<OWeakObject *>(this);
- throw deployment::DeploymentException( rtl::OUString(), oWeakThis,
- makeAny( uno::Exception( aErrStr, oWeakThis ) ) );
+ data.dataUrl = xPackage->getURL();
}
-
- Reference<XComponentContext> const & xContext = getComponentContext();
- Reference< script::XInvocation > xInvocation;
- if( xContext.is() )
+ else
{
- try
+ const OUString sHelpFolder = createFolder(OUString(), xCmdEnv);
+ data.dataUrl = sHelpFolder;
+
+ Reference< ucb::XSimpleFileAccess > xSFA = getFileAccess();
+ rtl::OUString aHelpURL = xPackage->getURL();
+ rtl::OUString aExpandedHelpURL = dp_misc::expandUnoRcUrl( aHelpURL );
+ rtl::OUString aName = xPackage->getName();
+ if( !xSFA->isFolder( aExpandedHelpURL ) )
{
- xInvocation = Reference< script::XInvocation >(
- xContext->getServiceManager()->createInstanceWithContext( rtl::OUString::createFromAscii(
- "com.sun.star.help.HelpIndexer" ), xContext ) , UNO_QUERY );
+ rtl::OUString aErrStr = getResourceString( RID_STR_HELPPROCESSING_GENERAL_ERROR );
+ aErrStr += rtl::OUString::createFromAscii( "No help folder" );
+ OWeakObject* oWeakThis = static_cast<OWeakObject *>(this);
+ throw deployment::DeploymentException( rtl::OUString(), oWeakThis,
+ makeAny( uno::Exception( aErrStr, oWeakThis ) ) );
}
- catch (Exception &)
+
+ Reference<XComponentContext> const & xContext = getComponentContext();
+ Reference< script::XInvocation > xInvocation;
+ if( xContext.is() )
{
- // i98680: Survive missing lucene
+ try
+ {
+ xInvocation = Reference< script::XInvocation >(
+ xContext->getServiceManager()->createInstanceWithContext( rtl::OUString::createFromAscii(
+ "com.sun.star.help.HelpIndexer" ), xContext ) , UNO_QUERY );
+ }
+ catch (Exception &)
+ {
+ // i98680: Survive missing lucene
+ }
}
- }
- // Scan languages
- Sequence< rtl::OUString > aLanguageFolderSeq = xSFA->getFolderContents( aExpandedHelpURL, true );
- sal_Int32 nLangCount = aLanguageFolderSeq.getLength();
- const rtl::OUString* pSeq = aLanguageFolderSeq.getConstArray();
- for( sal_Int32 iLang = 0 ; iLang < nLangCount ; ++iLang )
- {
- rtl::OUString aLangURL = pSeq[iLang];
- if( xSFA->isFolder( aLangURL ) )
+ // Scan languages
+ Sequence< rtl::OUString > aLanguageFolderSeq = xSFA->getFolderContents( aExpandedHelpURL, true );
+ sal_Int32 nLangCount = aLanguageFolderSeq.getLength();
+ const rtl::OUString* pSeq = aLanguageFolderSeq.getConstArray();
+ for( sal_Int32 iLang = 0 ; iLang < nLangCount ; ++iLang )
{
- std::vector< rtl::OUString > aXhpFileVector;
-
- // calculate jar file URL
- sal_Int32 indexStartSegment = aLangURL.lastIndexOf('/');
- // for example "/en"
- OUString langFolderURLSegment(
- aLangURL.copy(
- indexStartSegment + 1, aLangURL.getLength() - indexStartSegment - 1));
-
- //create the folder in the "temporary folder"
- ::ucbhelper::Content langFolderContent;
- const OUString langFolderDest = makeURL(sHelpFolder, langFolderURLSegment);
- const OUString langFolderDestExpanded = ::dp_misc::expandUnoRcUrl(langFolderDest);
- ::dp_misc::create_folder(
- &langFolderContent,
- langFolderDest, xCmdEnv);
-
- rtl::OUString aJarFile(
- makeURL(sHelpFolder, langFolderURLSegment + aSlash + aHelpStr +
- OUSTR(".jar")));
- aJarFile = ::dp_misc::expandUnoRcUrl(aJarFile);
-
- rtl::OUString aEncodedJarFilePath = rtl::Uri::encode(
- aJarFile, rtl_UriCharClassPchar,
- rtl_UriEncodeIgnoreEscapes,
- RTL_TEXTENCODING_UTF8 );
- rtl::OUString aDestBasePath = rtl::OUString::createFromAscii( "vnd.sun.star.pkg://" );
- aDestBasePath += aEncodedJarFilePath;
- aDestBasePath += rtl::OUString::createFromAscii( "/" );
-
- sal_Int32 nLenLangFolderURL = aLangURL.getLength() + 1;
-
- Sequence< rtl::OUString > aSubLangSeq = xSFA->getFolderContents( aLangURL, true );
- sal_Int32 nSubLangCount = aSubLangSeq.getLength();
- const rtl::OUString* pSubLangSeq = aSubLangSeq.getConstArray();
- for( sal_Int32 iSubLang = 0 ; iSubLang < nSubLangCount ; ++iSubLang )
+ rtl::OUString aLangURL = pSeq[iLang];
+ if( xSFA->isFolder( aLangURL ) )
{
- rtl::OUString aSubFolderURL = pSubLangSeq[iSubLang];
- if( !xSFA->isFolder( aSubFolderURL ) )
- continue;
+ std::vector< rtl::OUString > aXhpFileVector;
+
+ // calculate jar file URL
+ sal_Int32 indexStartSegment = aLangURL.lastIndexOf('/');
+ // for example "/en"
+ OUString langFolderURLSegment(
+ aLangURL.copy(
+ indexStartSegment + 1, aLangURL.getLength() - indexStartSegment - 1));
+
+ //create the folder in the "temporary folder"
+ ::ucbhelper::Content langFolderContent;
+ const OUString langFolderDest = makeURL(sHelpFolder, langFolderURLSegment);
+ const OUString langFolderDestExpanded = ::dp_misc::expandUnoRcUrl(langFolderDest);
+ ::dp_misc::create_folder(
+ &langFolderContent,
+ langFolderDest, xCmdEnv);
+
+ rtl::OUString aJarFile(
+ makeURL(sHelpFolder, langFolderURLSegment + aSlash + aHelpStr +
+ OUSTR(".jar")));
+ aJarFile = ::dp_misc::expandUnoRcUrl(aJarFile);
+
+ rtl::OUString aEncodedJarFilePath = rtl::Uri::encode(
+ aJarFile, rtl_UriCharClassPchar,
+ rtl_UriEncodeIgnoreEscapes,
+ RTL_TEXTENCODING_UTF8 );
+ rtl::OUString aDestBasePath = rtl::OUString::createFromAscii( "vnd.sun.star.pkg://" );
+ aDestBasePath += aEncodedJarFilePath;
+ aDestBasePath += rtl::OUString::createFromAscii( "/" );
+
+ sal_Int32 nLenLangFolderURL = aLangURL.getLength() + 1;
+
+ Sequence< rtl::OUString > aSubLangSeq = xSFA->getFolderContents( aLangURL, true );
+ sal_Int32 nSubLangCount = aSubLangSeq.getLength();
+ const rtl::OUString* pSubLangSeq = aSubLangSeq.getConstArray();
+ for( sal_Int32 iSubLang = 0 ; iSubLang < nSubLangCount ; ++iSubLang )
+ {
+ rtl::OUString aSubFolderURL = pSubLangSeq[iSubLang];
+ if( !xSFA->isFolder( aSubFolderURL ) )
+ continue;
- implCollectXhpFiles( aSubFolderURL, aXhpFileVector );
+ implCollectXhpFiles( aSubFolderURL, aXhpFileVector );
- // Copy to package (later: move?)
- rtl::OUString aDestPath = aDestBasePath;
- rtl::OUString aPureFolderName = aSubFolderURL.copy( nLenLangFolderURL );
- aDestPath += aPureFolderName;
- xSFA->copy( aSubFolderURL, aDestPath );
- }
+ // Copy to package (later: move?)
+ rtl::OUString aDestPath = aDestBasePath;
+ rtl::OUString aPureFolderName = aSubFolderURL.copy( nLenLangFolderURL );
+ aDestPath += aPureFolderName;
+ xSFA->copy( aSubFolderURL, aDestPath );
+ }
- // Call compiler
- sal_Int32 nXhpFileCount = aXhpFileVector.size();
- rtl::OUString* pXhpFiles = new rtl::OUString[nXhpFileCount];
- for( sal_Int32 iXhp = 0 ; iXhp < nXhpFileCount ; ++iXhp )
- {
- rtl::OUString aXhpFile = aXhpFileVector[iXhp];
- rtl::OUString aXhpRelFile = aXhpFile.copy( nLenLangFolderURL );
- pXhpFiles[iXhp] = aXhpRelFile;
- }
+ // Call compiler
+ sal_Int32 nXhpFileCount = aXhpFileVector.size();
+ rtl::OUString* pXhpFiles = new rtl::OUString[nXhpFileCount];
+ for( sal_Int32 iXhp = 0 ; iXhp < nXhpFileCount ; ++iXhp )
+ {
+ rtl::OUString aXhpFile = aXhpFileVector[iXhp];
+ rtl::OUString aXhpRelFile = aXhpFile.copy( nLenLangFolderURL );
+ pXhpFiles[iXhp] = aXhpRelFile;
+ }
- rtl::OUString aOfficeHelpPath( SvtPathOptions().GetHelpPath() );
- rtl::OUString aOfficeHelpPathFileURL;
- ::osl::File::getFileURLFromSystemPath( aOfficeHelpPath, aOfficeHelpPathFileURL );
+ rtl::OUString aOfficeHelpPath( SvtPathOptions().GetHelpPath() );
+ rtl::OUString aOfficeHelpPathFileURL;
+ ::osl::File::getFileURLFromSystemPath( aOfficeHelpPath, aOfficeHelpPathFileURL );
- HelpProcessingErrorInfo aErrorInfo;
- bool bSuccess = compileExtensionHelp(
- aOfficeHelpPathFileURL, aHelpStr, aLangURL,
- nXhpFileCount, pXhpFiles,
- langFolderDestExpanded, aErrorInfo );
+ HelpProcessingErrorInfo aErrorInfo;
+ bool bSuccess = compileExtensionHelp(
+ aOfficeHelpPathFileURL, aHelpStr, aLangURL,
+ nXhpFileCount, pXhpFiles,
+ langFolderDestExpanded, aErrorInfo );
- if( bSuccess && xInvocation.is() )
- {
- Sequence<uno::Any> aParamsSeq( 6 );
-
- aParamsSeq[0] = uno::makeAny( rtl::OUString::createFromAscii( "-lang" ) );
-
- rtl::OUString aLang;
- sal_Int32 nLastSlash = aLangURL.lastIndexOf( '/' );
- if( nLastSlash != -1 )
- aLang = aLangURL.copy( nLastSlash + 1 );
- else
- aLang = rtl::OUString::createFromAscii( "en" );
- aParamsSeq[1] = uno::makeAny( aLang );
-
- aParamsSeq[2] = uno::makeAny( rtl::OUString::createFromAscii( "-mod" ) );
- aParamsSeq[3] = uno::makeAny( rtl::OUString::createFromAscii( "help" ) );
-
- aParamsSeq[4] = uno::makeAny( rtl::OUString::createFromAscii( "-zipdir" ) );
- rtl::OUString aSystemPath;
- osl::FileBase::getSystemPathFromFileURL(
- langFolderDestExpanded, aSystemPath );
- aParamsSeq[5] = uno::makeAny( aSystemPath );
-
- Sequence< sal_Int16 > aOutParamIndex;
- Sequence< uno::Any > aOutParam;
- uno::Any aRet = xInvocation->invoke( rtl::OUString::createFromAscii( "createIndex" ),
- aParamsSeq, aOutParamIndex, aOutParam );
- }
-
- if( !bSuccess )
- {
- USHORT nErrStrId = 0;
- switch( aErrorInfo.m_eErrorClass )
+ if( bSuccess && xInvocation.is() )
{
- case HELPPROCESSING_GENERAL_ERROR:
- case HELPPROCESSING_INTERNAL_ERROR: nErrStrId = RID_STR_HELPPROCESSING_GENERAL_ERROR; break;
- case HELPPROCESSING_XMLPARSING_ERROR: nErrStrId = RID_STR_HELPPROCESSING_XMLPARSING_ERROR; break;
- default: ;
- };
-
- rtl::OUString aErrStr;
- if( nErrStrId != 0 )
+ Sequence<uno::Any> aParamsSeq( 6 );
+
+ aParamsSeq[0] = uno::makeAny( rtl::OUString::createFromAscii( "-lang" ) );
+
+ rtl::OUString aLang;
+ sal_Int32 nLastSlash = aLangURL.lastIndexOf( '/' );
+ if( nLastSlash != -1 )
+ aLang = aLangURL.copy( nLastSlash + 1 );
+ else
+ aLang = rtl::OUString::createFromAscii( "en" );
+ aParamsSeq[1] = uno::makeAny( aLang );
+
+ aParamsSeq[2] = uno::makeAny( rtl::OUString::createFromAscii( "-mod" ) );
+ aParamsSeq[3] = uno::makeAny( rtl::OUString::createFromAscii( "help" ) );
+
+ aParamsSeq[4] = uno::makeAny( rtl::OUString::createFromAscii( "-zipdir" ) );
+ rtl::OUString aSystemPath;
+ osl::FileBase::getSystemPathFromFileURL(
+ langFolderDestExpanded, aSystemPath );
+ aParamsSeq[5] = uno::makeAny( aSystemPath );
+
+ Sequence< sal_Int16 > aOutParamIndex;
+ Sequence< uno::Any > aOutParam;
+ uno::Any aRet = xInvocation->invoke( rtl::OUString::createFromAscii( "createIndex" ),
+ aParamsSeq, aOutParamIndex, aOutParam );
+ }
+
+ if( !bSuccess )
{
- aErrStr = getResourceString( nErrStrId );
-
- // Remoce CR/LF
- rtl::OUString aErrMsg( aErrorInfo.m_aErrorMsg );
- sal_Unicode nCR = 13, nLF = 10;
- sal_Int32 nSearchCR = aErrMsg.indexOf( nCR );
- sal_Int32 nSearchLF = aErrMsg.indexOf( nLF );
- sal_Int32 nCopy;
- if( nSearchCR != -1 || nSearchLF != -1 )
+ USHORT nErrStrId = 0;
+ switch( aErrorInfo.m_eErrorClass )
{
- if( nSearchCR == -1 )
- nCopy = nSearchLF;
- else if( nSearchLF == -1 )
- nCopy = nSearchCR;
- else
- nCopy = ( nSearchCR < nSearchLF ) ? nSearchCR : nSearchLF;
-
- aErrMsg = aErrMsg.copy( 0, nCopy );
- }
- aErrStr += aErrMsg;
- if( nErrStrId == RID_STR_HELPPROCESSING_XMLPARSING_ERROR && aErrorInfo.m_aXMLParsingFile.getLength() )
+ case HELPPROCESSING_GENERAL_ERROR:
+ case HELPPROCESSING_INTERNAL_ERROR: nErrStrId = RID_STR_HELPPROCESSING_GENERAL_ERROR; break;
+ case HELPPROCESSING_XMLPARSING_ERROR: nErrStrId = RID_STR_HELPPROCESSING_XMLPARSING_ERROR; break;
+ default: ;
+ };
+
+ rtl::OUString aErrStr;
+ if( nErrStrId != 0 )
{
- aErrStr += rtl::OUString::createFromAscii( " in " );
-
- rtl::OUString aDecodedFile = rtl::Uri::decode( aErrorInfo.m_aXMLParsingFile,
- rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
- aErrStr += aDecodedFile;
- if( aErrorInfo.m_nXMLParsingLine != -1 )
+ aErrStr = getResourceString( nErrStrId );
+
+ // Remoce CR/LF
+ rtl::OUString aErrMsg( aErrorInfo.m_aErrorMsg );
+ sal_Unicode nCR = 13, nLF = 10;
+ sal_Int32 nSearchCR = aErrMsg.indexOf( nCR );
+ sal_Int32 nSearchLF = aErrMsg.indexOf( nLF );
+ sal_Int32 nCopy;
+ if( nSearchCR != -1 || nSearchLF != -1 )
{
- aErrStr += rtl::OUString::createFromAscii( ", line " );
- aErrStr += ::rtl::OUString::valueOf( aErrorInfo.m_nXMLParsingLine );
+ if( nSearchCR == -1 )
+ nCopy = nSearchLF;
+ else if( nSearchLF == -1 )
+ nCopy = nSearchCR;
+ else
+ nCopy = ( nSearchCR < nSearchLF ) ? nSearchCR : nSearchLF;
+
+ aErrMsg = aErrMsg.copy( 0, nCopy );
+ }
+ aErrStr += aErrMsg;
+ if( nErrStrId == RID_STR_HELPPROCESSING_XMLPARSING_ERROR && aErrorInfo.m_aXMLParsingFile.getLength() )
+ {
+ aErrStr += rtl::OUString::createFromAscii( " in " );
+
+ rtl::OUString aDecodedFile = rtl::Uri::decode( aErrorInfo.m_aXMLParsingFile,
+ rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
+ aErrStr += aDecodedFile;
+ if( aErrorInfo.m_nXMLParsingLine != -1 )
+ {
+ aErrStr += rtl::OUString::createFromAscii( ", line " );
+ aErrStr += ::rtl::OUString::valueOf( aErrorInfo.m_nXMLParsingLine );
+ }
}
}
- }
- OWeakObject* oWeakThis = static_cast<OWeakObject *>(this);
- throw deployment::DeploymentException( rtl::OUString(), oWeakThis,
- makeAny( uno::Exception( aErrStr, oWeakThis ) ) );
+ OWeakObject* oWeakThis = static_cast<OWeakObject *>(this);
+ throw deployment::DeploymentException( rtl::OUString(), oWeakThis,
+ makeAny( uno::Exception( aErrStr, oWeakThis ) ) );
+ }
}
}
}
-
//Writing the data entry replaces writing the flag file. If we got to this
//point the registration was successful.
addDataToDb(xPackage->getURL(), data);
- }
+ } //if (doRegisterPackage)
else
{
deleteDataFromDb(xPackage->getURL());
diff --git a/desktop/util/verinfo.rc b/desktop/util/verinfo.rc
index 038953f2aa79..7d589956ec83 100644..100755
--- a/desktop/util/verinfo.rc
+++ b/desktop/util/verinfo.rc
@@ -68,25 +68,25 @@ VS_VERSION_INFO versioninfo
block "040704E4"
{
// German StringTable
- value "CompanyName", "Oracle, Inc.\0"
+ value "CompanyName", "Oracle\0"
value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
value "FileVersion", PPS(VER_LEVEL) "\0"
value "ProductVersion", PPS(VER_LEVEL) "\0"
value "OriginalFilename", "SOFFICE.EXE\0"
value "InternalName", "SOFFICE\0"
- value "LegalCopyright", S_CRIGHT " Oracle, Inc.\0"
+ value "LegalCopyright", S_CRIGHT " Oracle and/or its affiliates. All rights reserved.\0"
}
#else
block "040904E4"
{
// International StringTable
- value "CompanyName", "Oracle, Inc.\0"
+ value "CompanyName", "Oracle\0"
value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
value "FileVersion", PPS(VER_LEVEL) "\0"
value "ProductVersion", PPS(VER_LEVEL) "\0"
value "OriginalFilename", "SOFFICE.EXE\0"
value "InternalName", "SOFFICE\0"
- value "LegalCopyright", S_CRIGHT " Oracle, Inc.\0"
+ value "LegalCopyright", S_CRIGHT " Oracle and/or its affiliates. All rights reserved.\0"
}
#endif
}
diff --git a/desktop/win32/source/applauncher/ooo/verinfo.rc b/desktop/win32/source/applauncher/ooo/verinfo.rc
index ce698ba80333..c13e723527fc 100644..100755
--- a/desktop/win32/source/applauncher/ooo/verinfo.rc
+++ b/desktop/win32/source/applauncher/ooo/verinfo.rc
@@ -69,7 +69,7 @@ VS_VERSION_INFO versioninfo
value "ProductVersion", PPS(VER_LEVEL) "\0"
value "OriginalFilename", PPS(RES_APP_NAME) ".exe\0"
value "InternalName", PPS(RES_APP_NAME) "\0"
- value "LegalCopyright", S_CRIGHT " Sun Microsystems, Inc.\0"
+ value "LegalCopyright", S_CRIGHT " Oracle and/or its affiliates. All rights reserved.\0"
}
#else
block "040904E4"
@@ -81,7 +81,7 @@ VS_VERSION_INFO versioninfo
value "ProductVersion", PPS(VER_LEVEL) "\0"
value "OriginalFilename", PPS(RES_APP_NAME) ".exe\0"
value "InternalName", PPS(RES_APP_NAME) "\0"
- value "LegalCopyright", S_CRIGHT " Sun Microsystems, Inc.\0"
+ value "LegalCopyright", S_CRIGHT " Oracle and/or its affiliates. All rights reserved.\0"
}
#endif
}
diff --git a/desktop/win32/source/applauncher/verinfo.rc b/desktop/win32/source/applauncher/verinfo.rc
index 0db55c58c4b2..c0ff71494014 100644..100755
--- a/desktop/win32/source/applauncher/verinfo.rc
+++ b/desktop/win32/source/applauncher/verinfo.rc
@@ -68,25 +68,25 @@ VS_VERSION_INFO versioninfo
block "040704E4"
{
// German StringTable
- value "CompanyName", "Sun Microsystems, Inc.\0"
+ value "CompanyName", "Oracle\0"
value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
value "FileVersion", PPS(VER_LEVEL) "\0"
value "ProductVersion", PPS(VER_LEVEL) "\0"
value "OriginalFilename", PPS(RES_APP_NAME) ".exe\0"
value "InternalName", PPS(RES_APP_NAME) "\0"
- value "LegalCopyright", S_CRIGHT " Sun Microsystems, Inc.\0"
+ value "LegalCopyright", S_CRIGHT " Oracle and/or its affiliates. All rights reserved.\0"
}
#else
block "040904E4"
{
// International StringTable
- value "CompanyName", "Sun Microsystems, Inc.\0"
+ value "CompanyName", "Oracle\0"
value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
value "FileVersion", PPS(VER_LEVEL) "\0"
value "ProductVersion", PPS(VER_LEVEL) "\0"
value "OriginalFilename", PPS(RES_APP_NAME) ".exe\0"
value "InternalName", PPS(RES_APP_NAME) "\0"
- value "LegalCopyright", S_CRIGHT " Sun Microsystems, Inc.\0"
+ value "LegalCopyright", S_CRIGHT " Oracle and/or its affiliates. All rights reserved.\0"
}
#endif
}
diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx
index 7c2dafc79bbb..b85a72555935 100644
--- a/desktop/win32/source/officeloader/officeloader.cxx
+++ b/desktop/win32/source/officeloader/officeloader.cxx
@@ -339,6 +339,7 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
p = desktop_win32::commandLineAppend(p, argv[i]);
}
}
+
p = desktop_win32::commandLineAppend(
p, MY_STRING(L"\" \"-env:OOO_CWD="));
if (cwdLen == 0) {
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index dc954de7bb2a..0d2be85f9872 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1206,7 +1206,12 @@ namespace drawinglayer
mpOutputDevice->SetLineColor(Color(aHairlineColor));
mpOutputDevice->SetFillColor();
aHairLinePolyPolygon.transform(maCurrentTransformation);
- LineInfo aLineInfo(LINE_SOLID, basegfx::fround(rLine.getWidth()));
+
+ // #i113922# LineWidth needs to be transformed, too
+ const basegfx::B2DVector aDiscreteUnit(maCurrentTransformation * basegfx::B2DVector(rLine.getWidth(), 0.0));
+ const double fDiscreteLineWidth(aDiscreteUnit.getLength());
+
+ LineInfo aLineInfo(LINE_SOLID, basegfx::fround(fDiscreteLineWidth));
aLineInfo.SetLineJoin(rLine.getLineJoin());
for(sal_uInt32 a(0); a < aHairLinePolyPolygon.count(); a++)
diff --git a/editeng/inc/editeng/unoipset.hxx b/editeng/inc/editeng/unoipset.hxx
index 3cd3053e4c3e..8a28df5cbe28 100644
--- a/editeng/inc/editeng/unoipset.hxx
+++ b/editeng/inc/editeng/unoipset.hxx
@@ -64,6 +64,7 @@ public:
sal_Bool AreThereOwnUsrAnys() const { return (pCombiList ? sal_True : sal_False); }
::com::sun::star::uno::Any* GetUsrAnyForID(sal_uInt16 nWID) const;
void AddUsrAnyForID(const ::com::sun::star::uno::Any& rAny, sal_uInt16 nWID);
+ void ClearAllUsrAny();
com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > getPropertySetInfo() const;
const SfxItemPropertyMapEntry* getPropertyMapEntries() const {return _pMap;}
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index 569b80639b6b..e8a2aaad22e2 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -43,7 +43,7 @@
#include <editeng/wghtitem.hxx>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
-
+#include <tools/tenccvt.hxx>
#define ACTION_INSERTTEXT 1
#define ACTION_INSERTPARABRK 2
@@ -66,6 +66,16 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, const String& rBaseURL, SvKeyValu
nNumberingLevel = 0;
bFieldsInserted = FALSE;
+ DBG_ASSERT( RTL_TEXTENCODING_DONTKNOW == GetSrcEncoding( ), "EditHTMLParser::EditHTMLParser: Where does the encoding come from?" );
+ DBG_ASSERT( !IsSwitchToUCS2(), "EditHTMLParser::::EditHTMLParser: Switch to UCS2?" );
+
+ // Altough the real default encoding is ISO8859-1, we use MS-1252
+ // als default encoding.
+ SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) );
+
+ // If the file starts with a BOM, switch to UCS2.
+ SetSwitchToUCS2( TRUE );
+
if ( pHTTPHeaderAttrs )
SetEncodingByHTTPHeader( pHTTPHeaderAttrs );
}
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index ede5acacc698..c8f5e2948665 100755
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -51,6 +51,7 @@
#include <com/sun/star/i18n/CharacterIteratorMode.hpp>
#include <com/sun/star/i18n/WordType.hpp>
#include <com/sun/star/i18n/XExtendedInputSequenceChecker.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
#include <i18npool/lang.h>
#include <vos/ref.hxx>
@@ -1002,6 +1003,8 @@ public:
void SetAutoCompleteText( const String& rStr, sal_Bool bUpdateTipWindow );
EditSelection TransliterateText( const EditSelection& rSelection, sal_Int32 nTransliterationMode );
+ short ReplaceTextOnly( ContentNode* pNode, USHORT nCurrentStart, xub_StrLen nLen, const String& rText, const ::com::sun::star::uno::Sequence< sal_Int32 >& rOffsets );
+
void SetAsianCompressionMode( USHORT n );
USHORT GetAsianCompressionMode() const { return nAsianCompressionMode; }
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 5a54c054016b..46a0668394f2 100644..100755
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -76,6 +76,9 @@
#include <com/sun/star/linguistic2/XThesaurus.hpp>
#include <com/sun/star/linguistic2/XMeaning.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
+#include <com/sun/star/i18n/WordType.hpp>
+#include <com/sun/star/i18n/TransliterationModules.hpp>
+#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
#include <unotools/transliterationwrapper.hxx>
#include <unotools/textsearch.hxx>
#include <comphelper/processfactory.hxx>
@@ -83,6 +86,8 @@
#include <svtools/rtfkeywd.hxx>
#include <editeng/edtdlg.hxx>
+#include <vector>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
@@ -2811,8 +2816,23 @@ void ImpEditEngine::SetAutoCompleteText( const String& rStr, sal_Bool bClearTipW
#endif // !SVX_LIGHT
}
+
+struct TransliterationChgData
+{
+ USHORT nStart;
+ xub_StrLen nLen;
+ EditSelection aSelection;
+ String aNewText;
+ uno::Sequence< sal_Int32 > aOffsets;
+};
+
+
EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection, sal_Int32 nTransliterationMode )
{
+ uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() );
+ if (!_xBI.is())
+ return rSelection;
+
EditSelection aSel( rSelection );
aSel.Adjust( aEditDoc );
@@ -2821,8 +2841,8 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
EditSelection aNewSel( aSel );
- USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
- USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+ const USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+ const USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
BOOL bChanges = FALSE;
BOOL bLenChanged = FALSE;
@@ -2845,83 +2865,266 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
USHORT nCurrentEnd = nEndPos;
sal_uInt16 nLanguage = LANGUAGE_SYSTEM;
- do
- {
- if ( bConsiderLanguage )
+ // since we don't use Hiragana/Katakana or half-width/full-width transliterations here
+ // it is fine to use ANYWORD_IGNOREWHITESPACES. (ANY_WORD btw is broken and will
+ // occasionaly miss words in consecutive sentences). Also with ANYWORD_IGNOREWHITESPACES
+ // text like 'just-in-time' will be converted to 'Just-In-Time' which seems to be the
+ // proper thing to do.
+ const sal_Int16 nWordType = i18n::WordType::ANYWORD_IGNOREWHITESPACES;
+
+ //! In order to have less trouble with changing text size, e.g. because
+ //! of ligatures or � (German small sz) being resolved, we need to process
+ //! the text replacements from end to start.
+ //! This way the offsets for the yet to be changed words will be
+ //! left unchanged by the already replaced text.
+ //! For this we temporarily save the changes to be done in this vector
+ std::vector< TransliterationChgData > aChanges;
+ TransliterationChgData aChgData;
+
+ if (nTransliterationMode == i18n::TransliterationModulesExtra::TITLE_CASE)
+ {
+ // for 'capitalize every word' we need to iterate over each word
+
+ i18n::Boundary aSttBndry;
+ i18n::Boundary aEndBndry;
+ aSttBndry = _xBI->getWordBoundary(
+ *pNode, nStartPos,
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, nStartPos + 1 ) ) ),
+ nWordType, TRUE /*prefer forward direction*/);
+ aEndBndry = _xBI->getWordBoundary(
+ *pNode, nEndPos,
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, nEndPos + 1 ) ) ),
+ nWordType, FALSE /*prefer backward direction*/);
+
+ // prevent backtracking to the previous word if selection is at word boundary
+ if (aSttBndry.endPos <= nStartPos)
+ {
+ aSttBndry = _xBI->nextWord(
+ *pNode, aSttBndry.endPos,
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, aSttBndry.endPos + 1 ) ) ),
+ nWordType);
+ }
+ // prevent advancing to the next word if selection is at word boundary
+ if (aEndBndry.startPos >= nEndPos)
{
- nLanguage = GetLanguage( EditPaM( pNode, nCurrentStart+1 ), &nCurrentEnd );
- if ( nCurrentEnd > nEndPos )
- nCurrentEnd = nEndPos;
+ aEndBndry = _xBI->previousWord(
+ *pNode, aEndBndry.startPos,
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, aEndBndry.startPos + 1 ) ) ),
+ nWordType);
}
- xub_StrLen nLen = nCurrentEnd - nCurrentStart;
+ i18n::Boundary aCurWordBndry( aSttBndry );
+ while (aCurWordBndry.startPos <= aEndBndry.startPos)
+ {
+ nCurrentStart = (xub_StrLen)aCurWordBndry.startPos;
+ nCurrentEnd = (xub_StrLen)aCurWordBndry.endPos;
+ sal_Int32 nLen = nCurrentEnd - nCurrentStart;
+ DBG_ASSERT( nLen > 0, "invalid word length of 0" );
+#if OSL_DEBUG_LEVEL > 1
+ String aText( pNode->Copy( nCurrentStart, nLen ) );
+#endif
+
+ Sequence< sal_Int32 > aOffsets;
+ String aNewText( aTranslitarationWrapper.transliterate( *pNode,
+ GetLanguage( EditPaM( pNode, nCurrentStart + 1 ) ),
+ nCurrentStart, nLen, &aOffsets ));
+
+ if (!pNode->Equals( aNewText, nCurrentStart, nLen ))
+ {
+ aChgData.nStart = nCurrentStart;
+ aChgData.nLen = nLen;
+ aChgData.aSelection = EditSelection( EditPaM( pNode, nCurrentStart ), EditPaM( pNode, nCurrentEnd ) );
+ aChgData.aNewText = aNewText;
+ aChgData.aOffsets = aOffsets;
+ aChanges.push_back( aChgData );
+ }
+#if OSL_DEBUG_LEVEL > 1
+ String aSelTxt ( GetSelected( aChgData.aSelection ) );
+ (void) aSelTxt;
+#endif
+
+ aCurWordBndry = _xBI->nextWord( *pNode, nCurrentEnd,
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, nCurrentEnd + 1 ) ) ),
+ nWordType);
+ }
+ DBG_ASSERT( nCurrentEnd >= aEndBndry.endPos, "failed to reach end of transliteration" );
+ }
+ else if (nTransliterationMode == i18n::TransliterationModulesExtra::SENTENCE_CASE)
+ {
+ // for 'sentence case' we need to iterate sentence by sentence
+
+ sal_Int32 nLastStart = _xBI->beginOfSentence(
+ *pNode, nEndPos,
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, nEndPos + 1 ) ) ) );
+ sal_Int32 nLastEnd = _xBI->endOfSentence(
+ *pNode, nLastStart,
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, nLastStart + 1 ) ) ) );
- Sequence <sal_Int32> aOffsets;
- String aNewText( aTranslitarationWrapper.transliterate( *pNode, nLanguage, nCurrentStart, nLen, &aOffsets ) );
+ // extend nCurrentStart, nCurrentEnd to the current sentence boundaries
+ nCurrentStart = _xBI->beginOfSentence(
+ *pNode, nStartPos,
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, nStartPos + 1 ) ) ) );
+ nCurrentEnd = _xBI->endOfSentence(
+ *pNode, nCurrentStart,
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, nCurrentStart + 1 ) ) ) );
- if( ( nLen != aNewText.Len() ) || !pNode->Equals( aNewText, nCurrentStart, nLen ) )
+ // prevent backtracking to the previous sentence if selection starts at end of a sentence
+ if (nCurrentEnd <= nStartPos)
{
- bChanges = TRUE;
- if ( nLen != aNewText.Len() )
- bLenChanged = TRUE;
+ // now nCurrentStart is probably located on a non-letter word. (unless we
+ // are in Asian text with no spaces...)
+ // Thus to get the real sentence start we should locate the next real word,
+ // that is one found by DICTIONARY_WORD
+ i18n::Boundary aBndry = _xBI->nextWord( *pNode, nCurrentEnd,
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, nCurrentEnd + 1 ) ) ),
+ i18n::WordType::DICTIONARY_WORD);
+
+ // now get new current sentence boundaries
+ nCurrentStart = _xBI->beginOfSentence(
+ *pNode, aBndry.startPos,
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, aBndry.startPos + 1 ) ) ) );
+ nCurrentEnd = _xBI->endOfSentence(
+ *pNode, nCurrentStart,
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, nCurrentStart + 1 ) ) ) );
+ }
+ // prevent advancing to the next sentence if selection ends at start of a sentence
+ if (nLastStart >= nEndPos)
+ {
+ // now nCurrentStart is probably located on a non-letter word. (unless we
+ // are in Asian text with no spaces...)
+ // Thus to get the real sentence start we should locate the previous real word,
+ // that is one found by DICTIONARY_WORD
+ i18n::Boundary aBndry = _xBI->previousWord( *pNode, nLastStart,
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, nLastStart + 1 ) ) ),
+ i18n::WordType::DICTIONARY_WORD);
+ nLastEnd = _xBI->endOfSentence(
+ *pNode, aBndry.startPos,
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, aBndry.startPos + 1 ) ) ) );
+ if (nCurrentEnd > nLastEnd)
+ nCurrentEnd = nLastEnd;
+ }
-#ifndef SVX_LIGHT
- // Create UndoAction on Demand....
- if ( !pUndo && IsUndoEnabled() && !IsInUndo() )
- {
- ESelection aESel( CreateESel( aSel ) );
- pUndo = new EditUndoTransliteration( this, aESel, nTransliterationMode );
+ while (nCurrentStart < nLastEnd)
+ {
+ sal_Int32 nLen = nCurrentEnd - nCurrentStart;
+ DBG_ASSERT( nLen > 0, "invalid word length of 0" );
+#if OSL_DEBUG_LEVEL > 1
+ String aText( pNode->Copy( nCurrentStart, nLen ) );
+#endif
- if ( ( nStartNode == nEndNode ) && !aSel.Min().GetNode()->GetCharAttribs().HasAttrib( aSel.Min().GetIndex(), aSel.Max().GetIndex() ) )
- pUndo->SetText( aSel.Min().GetNode()->Copy( aSel.Min().GetIndex(), aSel.Max().GetIndex()-aSel.Min().GetIndex() ) );
- else
- pUndo->SetText( CreateBinTextObject( aSel, NULL ) );
+ Sequence< sal_Int32 > aOffsets;
+ String aNewText( aTranslitarationWrapper.transliterate( *pNode,
+ GetLanguage( EditPaM( pNode, nCurrentStart + 1 ) ),
+ nCurrentStart, nLen, &aOffsets ));
+
+ if (!pNode->Equals( aNewText, nCurrentStart, nLen ))
+ {
+ aChgData.nStart = nCurrentStart;
+ aChgData.nLen = nLen;
+ aChgData.aSelection = EditSelection( EditPaM( pNode, nCurrentStart ), EditPaM( pNode, nCurrentEnd ) );
+ aChgData.aNewText = aNewText;
+ aChgData.aOffsets = aOffsets;
+ aChanges.push_back( aChgData );
}
-#endif
- // Change text without loosing the attributes
- USHORT nCharsAfterTransliteration =
- sal::static_int_cast< USHORT >(aOffsets.getLength());
- const sal_Int32* pOffsets = aOffsets.getConstArray();
- short nDiffs = 0;
- for ( USHORT n = 0; n < nCharsAfterTransliteration; n++ )
+ i18n::Boundary aFirstWordBndry;
+ aFirstWordBndry = _xBI->nextWord(
+ *pNode, nCurrentEnd,
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, nCurrentEnd + 1 ) ) ),
+ nWordType);
+ nCurrentStart = aFirstWordBndry.startPos;
+ nCurrentEnd = _xBI->endOfSentence(
+ *pNode, nCurrentStart,
+ SvxCreateLocale( GetLanguage( EditPaM( pNode, nCurrentStart + 1 ) ) ) );
+ }
+ DBG_ASSERT( nCurrentEnd >= nLastEnd, "failed to reach end of transliteration" );
+ }
+ else
+ {
+ do
+ {
+ if ( bConsiderLanguage )
{
- USHORT nCurrentPos = nCurrentStart+n;
- sal_Int32 nDiff = (nCurrentPos-nDiffs) - pOffsets[n];
+ nLanguage = GetLanguage( EditPaM( pNode, nCurrentStart+1 ), &nCurrentEnd );
+ if ( nCurrentEnd > nEndPos )
+ nCurrentEnd = nEndPos;
+ }
- if ( !nDiff )
- {
- DBG_ASSERT( nCurrentPos < pNode->Len(), "TransliterateText - String smaller than expected!" );
- pNode->SetChar( nCurrentPos, aNewText.GetChar(n) );
- }
- else if ( nDiff < 0 )
- {
- // Replace first char, delete the rest...
- DBG_ASSERT( nCurrentPos < pNode->Len(), "TransliterateText - String smaller than expected!" );
- pNode->SetChar( nCurrentPos, aNewText.GetChar(n) );
+ xub_StrLen nLen = nCurrentEnd - nCurrentStart;
- DBG_ASSERT( (nCurrentPos+1) < pNode->Len(), "TransliterateText - String smaller than expected!" );
- GetEditDoc().RemoveChars( EditPaM( pNode, nCurrentPos+1 ), sal::static_int_cast< USHORT >(-nDiff) );
- }
- else
- {
- DBG_ASSERT( nDiff == 1, "TransliterateText - Diff other than expected! But should work..." );
- GetEditDoc().InsertText( EditPaM( pNode, nCurrentPos ), aNewText.GetChar(n) );
+ Sequence< sal_Int32 > aOffsets;
+ String aNewText( aTranslitarationWrapper.transliterate( *pNode, nLanguage, nCurrentStart, nLen, &aOffsets ) );
- }
- nDiffs = sal::static_int_cast< short >(nDiffs + nDiff);
+ if (!pNode->Equals( aNewText, nCurrentStart, nLen ))
+ {
+ aChgData.nStart = nCurrentStart;
+ aChgData.nLen = nLen;
+ aChgData.aSelection = EditSelection( EditPaM( pNode, nCurrentStart ), EditPaM( pNode, nCurrentEnd ) );
+ aChgData.aNewText = aNewText;
+ aChgData.aOffsets = aOffsets;
+ aChanges.push_back( aChgData );
}
- if ( nNode == nEndNode )
- aNewSel.Max().GetIndex() =
- aNewSel.Max().GetIndex() + nDiffs;
+ nCurrentStart = nCurrentEnd;
+ } while( nCurrentEnd < nEndPos );
+ }
+
+ if (aChanges.size() > 0)
+ {
+#ifndef SVX_LIGHT
+ // Create a single UndoAction on Demand for all the changes ...
+ if ( !pUndo && IsUndoEnabled() && !IsInUndo() )
+ {
+ // adjust selection to include all changes
+ for (size_t i = 0; i < aChanges.size(); ++i)
+ {
+ const EditSelection &rSel = aChanges[i].aSelection;
+ if (aSel.Min().GetNode() == rSel.Min().GetNode() &&
+ aSel.Min().GetIndex() > rSel.Min().GetIndex())
+ aSel.Min().SetIndex( rSel.Min().GetIndex() );
+ if (aSel.Max().GetNode() == rSel.Max().GetNode() &&
+ aSel.Max().GetIndex() < rSel.Max().GetIndex())
+ aSel.Max().SetIndex( rSel.Max().GetIndex() );
+ }
+ aNewSel = aSel;
+
+ ESelection aESel( CreateESel( aSel ) );
+ pUndo = new EditUndoTransliteration( this, aESel, nTransliterationMode );
+
+ const bool bSingleNode = aSel.Min().GetNode()== aSel.Max().GetNode();
+ const bool bHasAttribs = aSel.Min().GetNode()->GetCharAttribs().HasAttrib( aSel.Min().GetIndex(), aSel.Max().GetIndex() );
+ if (bSingleNode && !bHasAttribs)
+ pUndo->SetText( aSel.Min().GetNode()->Copy( aSel.Min().GetIndex(), aSel.Max().GetIndex()-aSel.Min().GetIndex() ) );
+ else
+ pUndo->SetText( CreateBinTextObject( aSel, NULL ) );
+ }
+#endif
+
+ // now apply the changes from end to start to leave the offsets of the
+ // yet unchanged text parts remain the same.
+ for (size_t i = 0; i < aChanges.size(); ++i)
+ {
+ const TransliterationChgData &rData = aChanges[ aChanges.size() - 1 - i ];
- ParaPortion* pParaPortion = GetParaPortions()[nNode];
- pParaPortion->MarkSelectionInvalid( nCurrentStart, std::max< USHORT >( nCurrentStart+nLen, nCurrentStart+aNewText.Len() ) );
+ bChanges = TRUE;
+ if (rData.nLen != rData.aNewText.Len())
+ bLenChanged = TRUE;
+ // Change text without loosing the attributes
+ USHORT nDiffs = ReplaceTextOnly( rData.aSelection.Min().GetNode(),
+ rData.nStart, rData.nLen, rData.aNewText, rData.aOffsets );
+
+ // adjust selection in end node to possibly changed size
+ if (aSel.Max().GetNode() == rData.aSelection.Max().GetNode())
+ aNewSel.Max().GetIndex() = aNewSel.Max().GetIndex() + nDiffs;
+
+ USHORT nSelNode = aEditDoc.GetPos( rData.aSelection.Min().GetNode() );
+ ParaPortion* pParaPortion = GetParaPortions()[nSelNode];
+ pParaPortion->MarkSelectionInvalid( rData.nStart,
+ std::max< USHORT >( rData.nStart + rData.nLen,
+ rData.nStart + rData.aNewText.Len() ) );
}
- nCurrentStart = nCurrentEnd;
- } while( nCurrentEnd < nEndPos );
+ } // if (aChanges.size() > 0)
}
#ifndef SVX_LIGHT
@@ -2945,6 +3148,52 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
return aNewSel;
}
+
+short ImpEditEngine::ReplaceTextOnly(
+ ContentNode* pNode,
+ USHORT nCurrentStart, xub_StrLen nLen,
+ const String& rNewText,
+ const uno::Sequence< sal_Int32 >& rOffsets )
+{
+ (void) nLen;
+
+ // Change text without loosing the attributes
+ USHORT nCharsAfterTransliteration =
+ sal::static_int_cast< USHORT >(rOffsets.getLength());
+ const sal_Int32* pOffsets = rOffsets.getConstArray();
+ short nDiffs = 0;
+ for ( USHORT n = 0; n < nCharsAfterTransliteration; n++ )
+ {
+ USHORT nCurrentPos = nCurrentStart+n;
+ sal_Int32 nDiff = (nCurrentPos-nDiffs) - pOffsets[n];
+
+ if ( !nDiff )
+ {
+ DBG_ASSERT( nCurrentPos < pNode->Len(), "TransliterateText - String smaller than expected!" );
+ pNode->SetChar( nCurrentPos, rNewText.GetChar(n) );
+ }
+ else if ( nDiff < 0 )
+ {
+ // Replace first char, delete the rest...
+ DBG_ASSERT( nCurrentPos < pNode->Len(), "TransliterateText - String smaller than expected!" );
+ pNode->SetChar( nCurrentPos, rNewText.GetChar(n) );
+
+ DBG_ASSERT( (nCurrentPos+1) < pNode->Len(), "TransliterateText - String smaller than expected!" );
+ GetEditDoc().RemoveChars( EditPaM( pNode, nCurrentPos+1 ), sal::static_int_cast< USHORT >(-nDiff) );
+ }
+ else
+ {
+ DBG_ASSERT( nDiff == 1, "TransliterateText - Diff other than expected! But should work..." );
+ GetEditDoc().InsertText( EditPaM( pNode, nCurrentPos ), rNewText.GetChar(n) );
+
+ }
+ nDiffs = sal::static_int_cast< short >(nDiffs + nDiff);
+ }
+
+ return nDiffs;
+}
+
+
void ImpEditEngine::SetAsianCompressionMode( USHORT n )
{
if ( n != nAsianCompressionMode )
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 64343517c69f..f969a8033f08 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1243,27 +1243,25 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
else if ( bIsNextRun && !IsAutoCorrectChar( cChar ) )
{
// Remove the NBSP if it wasn't an autocorrection
- if ( NeedsHardspaceAutocorr( rTxt.GetChar( nInsPos - 1 ) ) &&
+ if ( nInsPos != 0 && NeedsHardspaceAutocorr( rTxt.GetChar( nInsPos - 1 ) ) &&
cChar != ' ' && cChar != '\t' && cChar != CHAR_HARDBLANK )
{
// Look for the last HARD_SPACE
xub_StrLen nPos = nInsPos - 1;
- bool bFound = false;
- while ( nPos != STRING_NOTFOUND && !bFound )
+ bool bContinue = true;
+ while ( bContinue )
{
- sal_Unicode cTmpChar = rTxt.GetChar( nPos );
+ const sal_Unicode cTmpChar = rTxt.GetChar( nPos );
if ( cTmpChar == CHAR_HARDBLANK )
- bFound = true;
- else if ( !NeedsHardspaceAutocorr( cTmpChar ) )
- nPos = STRING_NOTFOUND;
+ {
+ rDoc.Delete( nPos, nPos + 1 );
+ nRet = AddNonBrkSpace;
+ bContinue = false;
+ }
+ else if ( !NeedsHardspaceAutocorr( cTmpChar ) || nPos == 0 )
+ bContinue = false;
nPos--;
}
-
- if ( bFound && nPos != STRING_NOTFOUND )
- {
- rDoc.Delete( nPos + 1, nPos + 2 );
- nRet = AddNonBrkSpace;
- }
}
}
}
diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index 39ab3507c5d3..6ba232010390 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -71,15 +71,7 @@ SvxItemPropertySet::SvxItemPropertySet( const SfxItemPropertyMapEntry* pMap, Sfx
//----------------------------------------------------------------------
SvxItemPropertySet::~SvxItemPropertySet()
{
-/*
- if(pItemPool)
- delete pItemPool;
- pItemPool = NULL;
-*/
-
- if(pCombiList)
- delete pCombiList;
- pCombiList = NULL;
+ ClearAllUsrAny();
}
//----------------------------------------------------------------------
@@ -111,6 +103,17 @@ void SvxItemPropertySet::AddUsrAnyForID(const uno::Any& rAny, sal_uInt16 nWID)
pCombiList->Insert(pNew);
}
+//----------------------------------------------------------------------
+
+void SvxItemPropertySet::ClearAllUsrAny()
+{
+ if(pCombiList)
+ delete pCombiList;
+ pCombiList = NULL;
+}
+
+//----------------------------------------------------------------------
+
sal_Bool SvxUnoCheckForPositiveValue( const uno::Any& rVal )
{
sal_Bool bConvert = sal_True; // the default is that all metric items must be converted
diff --git a/extensions/source/oooimprovement/onlogrotate_job.cxx b/extensions/source/oooimprovement/onlogrotate_job.cxx
index a92044b87d7e..3007ada42aba 100644
--- a/extensions/source/oooimprovement/onlogrotate_job.cxx
+++ b/extensions/source/oooimprovement/onlogrotate_job.cxx
@@ -35,15 +35,21 @@
#include "soapsender.hxx"
#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/frame/XTerminateListener.hpp>
#include <osl/mutex.hxx>
#include <osl/thread.hxx>
#include <osl/time.h>
+#include <cppuhelper/implbase1.hxx>
+#include <memory>
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::task;
using namespace ::com::sun::star::uno;
+using ::com::sun::star::frame::XTerminateListener;
+using ::com::sun::star::frame::XDesktop;
using ::com::sun::star::ucb::XSimpleFileAccess;
using ::rtl::OUString;
using ::std::vector;
@@ -102,7 +108,8 @@ namespace
public:
OnLogRotateThread(Reference<XMultiServiceFactory> sf);
virtual void SAL_CALL run();
- void disposing();
+ OnLogRotateThread* disposing();
+
private:
Reference<XMultiServiceFactory> m_ServiceFactory;
::osl::Mutex m_ServiceFactoryMutex;
@@ -135,11 +142,35 @@ namespace
}
}
- void OnLogRotateThread::disposing()
+ OnLogRotateThread* OnLogRotateThread::disposing()
{
::osl::Guard< ::osl::Mutex> service_factory_guard(m_ServiceFactoryMutex);
m_ServiceFactory.clear();
+ return this;
}
+
+ class OnLogRotateThreadWatcher : public ::cppu::WeakImplHelper1<XTerminateListener>
+ {
+ public:
+ OnLogRotateThreadWatcher(Reference<XMultiServiceFactory> sf)
+ : m_Thread(new OnLogRotateThread(sf))
+ {
+ m_Thread->create();
+ }
+ virtual ~OnLogRotateThreadWatcher()
+ { m_Thread->disposing()->terminate(); };
+
+ // XTerminateListener
+ virtual void SAL_CALL queryTermination(const EventObject&) throw(RuntimeException)
+ { };
+ virtual void SAL_CALL notifyTermination(const EventObject&) throw(RuntimeException)
+ { m_Thread->disposing()->terminate(); };
+ // XEventListener
+ virtual void SAL_CALL disposing(const EventObject&) throw(RuntimeException)
+ { m_Thread->disposing()->terminate(); };
+ private:
+ ::std::auto_ptr<OnLogRotateThread> m_Thread;
+ };
}
namespace oooimprovement
@@ -163,9 +194,11 @@ namespace oooimprovement
const Reference<XJobListener>& listener)
throw(RuntimeException)
{
- OnLogRotateThread* thread = new OnLogRotateThread(m_ServiceFactory);
- thread->create();
-
+ Reference<XDesktop> xDesktop(
+ m_ServiceFactory->createInstance(OUString::createFromAscii("com.sun.star.frame.Desktop")),
+ UNO_QUERY);
+ if(xDesktop.is())
+ xDesktop->addTerminateListener(Reference<XTerminateListener>(new OnLogRotateThreadWatcher(m_ServiceFactory)));
Any result;
listener->jobFinished(Reference<XAsyncJob>(this), result);
}
diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx
index 003b4d0943a5..4a88577c5b71 100644
--- a/extensions/source/plugin/unx/npnapi.cxx
+++ b/extensions/source/plugin/unx/npnapi.cxx
@@ -1,10 +1,29 @@
/*************************************************************************
-
- Source Code Control System - Header
-
- $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/extensions/source/plugin/unx/npnapi.cxx,v 1.11 2008-01-14 14:53:25 ihi Exp $
-
-*************************************************************************/
+ *
+ * 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_extensions.hxx"
diff --git a/extensions/source/plugin/unx/nppapi.cxx b/extensions/source/plugin/unx/nppapi.cxx
index ea0f34241a1e..82be7ae3c2df 100644
--- a/extensions/source/plugin/unx/nppapi.cxx
+++ b/extensions/source/plugin/unx/nppapi.cxx
@@ -1,10 +1,29 @@
/*************************************************************************
-
- Source Code Control System - Header
-
- $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/extensions/source/plugin/unx/nppapi.cxx,v 1.7 2008-01-14 14:53:38 ihi Exp $
-
-*************************************************************************/
+ *
+ * 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_extensions.hxx"
diff --git a/extras/source/autotext/lang/fr/acor_fr-FR.dat b/extras/source/autotext/lang/fr/acor_fr-FR.dat
index 0179749c780e..c2277b6e0d54 100644
--- a/extras/source/autotext/lang/fr/acor_fr-FR.dat
+++ b/extras/source/autotext/lang/fr/acor_fr-FR.dat
Binary files differ
diff --git a/extras/source/autotext/lang/pt-BR/acor_pt-BR.dat b/extras/source/autotext/lang/pt-BR/acor_pt-BR.dat
index ddfc5f8fae45..8ff201c2c3c7 100644
--- a/extras/source/autotext/lang/pt-BR/acor_pt-BR.dat
+++ b/extras/source/autotext/lang/pt-BR/acor_pt-BR.dat
Binary files differ
diff --git a/filter/source/config/fragments/filters/MathML_XML__Math_.xcu b/filter/source/config/fragments/filters/MathML_XML__Math_.xcu
index b6ab09ac89cd..7c80e41f6030 100644
--- a/filter/source/config/fragments/filters/MathML_XML__Math_.xcu
+++ b/filter/source/config/fragments/filters/MathML_XML__Math_.xcu
@@ -1,5 +1,5 @@
<node oor:name="MathML XML (Math)" oor:op="replace">
- <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE ENCRYPTION</value></prop>
+ <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE</value></prop>
<prop oor:name="UIComponent"/>
<prop oor:name="FilterService"/>
<prop oor:name="UserData"><value></value></prop>
diff --git a/filter/source/config/fragments/internalgraphicfilters/ras_Export.xcu b/filter/source/config/fragments/internalgraphicfilters/ras_Export.xcu
index aabae28a10c4..69aa0147ea36 100644
--- a/filter/source/config/fragments/internalgraphicfilters/ras_Export.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/ras_Export.xcu
@@ -2,7 +2,7 @@
<prop oor:name="Type"><value>ras_Sun_Rasterfile</value></prop>
<prop oor:name="FormatName"><value>era</value></prop>
<prop oor:name="RealFilterName"/>
- <prop oor:name="UIComponent"/>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
<prop oor:name="UIName">
<value xml:lang="en-US">RAS - Sun Raster Image</value>
</prop>
diff --git a/filter/source/config/fragments/internalgraphicfilters/svg_Export.xcu b/filter/source/config/fragments/internalgraphicfilters/svg_Export.xcu
index 72653869a68d..30b7122a654d 100644
--- a/filter/source/config/fragments/internalgraphicfilters/svg_Export.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/svg_Export.xcu
@@ -2,7 +2,7 @@
<prop oor:name="Type"><value>svg_Scalable_Vector_Graphics</value></prop>
<prop oor:name="FormatName"><value>SVESVG</value></prop>
<prop oor:name="RealFilterName"/>
- <prop oor:name="UIComponent"/>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
<prop oor:name="UIName">
<value xml:lang="en-US">SVG - Scalable Vector Graphics</value>
</prop>
diff --git a/filter/source/config/fragments/internalgraphicfilters/tif_Export.xcu b/filter/source/config/fragments/internalgraphicfilters/tif_Export.xcu
index a7d39ebdc8a4..791335acce1f 100644
--- a/filter/source/config/fragments/internalgraphicfilters/tif_Export.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/tif_Export.xcu
@@ -2,7 +2,7 @@
<prop oor:name="Type"><value>tif_Tag_Image_File</value></prop>
<prop oor:name="FormatName"><value>eti</value></prop>
<prop oor:name="RealFilterName"/>
- <prop oor:name="UIComponent"/>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
<prop oor:name="UIName">
<value xml:lang="en-US">TIFF - Tagged Image File Format</value>
</prop>
diff --git a/filter/source/config/fragments/internalgraphicfilters/xpm_Export.xcu b/filter/source/config/fragments/internalgraphicfilters/xpm_Export.xcu
index ee1effb786e9..660a240a6678 100644
--- a/filter/source/config/fragments/internalgraphicfilters/xpm_Export.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/xpm_Export.xcu
@@ -2,7 +2,7 @@
<prop oor:name="Type"><value>xpm_XPM</value></prop>
<prop oor:name="FormatName"><value>exp</value></prop>
<prop oor:name="RealFilterName"/>
- <prop oor:name="UIComponent"/>
+ <prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
<prop oor:name="UIName">
<value xml:lang="en-US">XPM - X PixMap</value>
</prop>
diff --git a/filter/source/graphicfilter/egif/dlgegif.cxx b/filter/source/graphicfilter/egif/dlgegif.cxx
deleted file mode 100644
index a9f1e60708b2..000000000000
--- a/filter/source/graphicfilter/egif/dlgegif.cxx
+++ /dev/null
@@ -1,108 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_filter.hxx"
-#ifndef GCC
-#endif
-#include <tools/ref.hxx>
-#include <svtools/FilterConfigItem.hxx>
-#include <vcl/msgbox.hxx>
-#include "dlgegif.hxx"
-#include "dlgegif.hrc"
-#include "strings.hrc"
-
-/*************************************************************************
-|*
-|* Ctor
-|*
-\************************************************************************/
-
-DlgExportEGIF::DlgExportEGIF( FltCallDialogParameter& rPara ) :
- ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_GIF, *rPara.pResMgr ) ),
- rFltCallPara ( rPara ),
- aCbxInterlaced ( this, ResId( CBX_INTERLACED, *rPara.pResMgr ) ),
- aCbxTranslucent ( this, ResId( CBX_TRANSLUCENT, *rPara.pResMgr ) ),
- aGrpMode ( this, ResId( GRP_MODE, *rPara.pResMgr ) ),
- aGrpDraw ( this, ResId( GRP_DRAW, *rPara.pResMgr ) ),
- aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ),
- aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ),
- aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ),
- pMgr ( rPara.pResMgr )
-{
- FreeResource();
-
- String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/GIF" ) );
- pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData );
-
- String aInterlaceStr( ResId( KEY_INTER, *pMgr ) );
- String aTranslucentStr( ResId( KEY_TRANS, *pMgr ) );
- // Config-Parameter lesen
- sal_Bool bInterlaced = pConfigItem->ReadInt32( aInterlaceStr, 1 ) != 0;
- sal_Bool bTranslucent = pConfigItem->ReadInt32( aTranslucentStr, 1 ) != 0;
-
- aCbxInterlaced.Check( bInterlaced );
- aCbxTranslucent.Check( bTranslucent );
-
- aBtnOK.SetClickHdl( LINK( this, DlgExportEGIF, OK ) );
-}
-
-DlgExportEGIF::~DlgExportEGIF()
-{
- delete pConfigItem;
-}
-
-/*************************************************************************
-|*
-|* Speichert eingestellte Werte in ini-Datei
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportEGIF, OK, void *, EMPTYARG )
-{
-
- // Config-Parameter schreiben
- String aInterlaceStr( ResId( KEY_INTER, *pMgr ) );
- String aTranslucentStr( ResId( KEY_TRANS, *pMgr ) );
-
- sal_Int32 nValue = 0;
- if ( aCbxInterlaced.IsChecked() )
- nValue++;
- pConfigItem->WriteInt32( aInterlaceStr, nValue );
-
- nValue = 0;
- if ( aCbxTranslucent.IsChecked() )
- nValue++;
- pConfigItem->WriteInt32( aTranslucentStr, nValue );
- rFltCallPara.aFilterData = pConfigItem->GetFilterData();
- EndDialog( RET_OK );
-
- return 0;
-}
-
-
-
diff --git a/filter/source/graphicfilter/egif/dlgegif.hrc b/filter/source/graphicfilter/egif/dlgegif.hrc
deleted file mode 100644
index a2f9f4feb488..000000000000
--- a/filter/source/graphicfilter/egif/dlgegif.hrc
+++ /dev/null
@@ -1,36 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include "filter.hrc"
-
-#define BTN_OK 1
-#define BTN_CANCEL 1
-#define BTN_HELP 1
-#define FI_DESCR 1
-#define GRP_MODE 1
-#define GRP_DRAW 2
-#define CBX_INTERLACED 1
-#define CBX_TRANSLUCENT 2
diff --git a/filter/source/graphicfilter/egif/dlgegif.hxx b/filter/source/graphicfilter/egif/dlgegif.hxx
deleted file mode 100644
index 0dbe48a065a3..000000000000
--- a/filter/source/graphicfilter/egif/dlgegif.hxx
+++ /dev/null
@@ -1,71 +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 _DLGEGIF_HXX_
-#define _DLGEGIF_HXX_
-
-#include <svtools/fltcall.hxx>
-#include <vcl/dialog.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
-
-/*************************************************************************
-|*
-|* Dialog zum Einstellen von Filteroptionen
-|*
-\************************************************************************/
-
-class FilterConfigItem;
-class ResMgr;
-
-class DlgExportEGIF : public ModalDialog
-{
-private:
-
- FltCallDialogParameter& rFltCallPara;
-
- CheckBox aCbxInterlaced;
- CheckBox aCbxTranslucent;
- FixedLine aGrpMode;
- FixedLine aGrpDraw;
- OKButton aBtnOK;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
-
- FilterConfigItem* pConfigItem;
- ResMgr* pMgr;
-
- DECL_LINK( OK, void * );
-
-public:
- DlgExportEGIF( FltCallDialogParameter& rPara );
- ~DlgExportEGIF();
-};
-
-#endif // _DLGEGIF_HXX_
-
diff --git a/filter/source/graphicfilter/egif/dlgegif.src b/filter/source/graphicfilter/egif/dlgegif.src
deleted file mode 100644
index 39f96bb7ac7a..000000000000
--- a/filter/source/graphicfilter/egif/dlgegif.src
+++ /dev/null
@@ -1,118 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "dlgegif.hrc"
-ModalDialog DLG_EXPORT_GIF
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 169 , 70 ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Text [ en-US ] = "GIF Options" ;
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 113 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 113 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 113 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- FixedLine GRP_MODE
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 100 , 8 ) ;
- Text [ en-US ] = "Mode" ;
- };
- CheckBox CBX_INTERLACED
- {
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 86 , 12 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Interlaced" ;
- };
- FixedLine GRP_DRAW
- {
- Pos = MAP_APPFONT ( 6 , 32 ) ;
- Size = MAP_APPFONT ( 100 , 8 ) ;
- Text [ en-US ] = "Drawing objects" ;
- };
- CheckBox CBX_TRANSLUCENT
- {
- Pos = MAP_APPFONT ( 12 , 43 ) ;
- Size = MAP_APPFONT ( 86 , 12 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Save ~transparency" ;
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
index 349f0a8bd7ba..56715487148b 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -36,9 +36,6 @@
#include <svtools/fltcall.hxx>
#include <svtools/FilterConfigItem.hxx>
#include "giflzwc.hxx"
-#include "strings.hrc"
-#include "dlgegif.hrc"
-#include "dlgegif.hxx"
// -------------
// - GIFWriter -
@@ -574,28 +571,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGrap
}
// ------------------------------------------------------------------------
-
-extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara )
-{
- BOOL bRet = FALSE;
-
- if ( rPara.pWindow )
- {
- ByteString aResMgrName( "egi" );
- ResMgr* pResMgr;
-
- pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
-
- if( pResMgr )
- {
- rPara.pResMgr = pResMgr;
- bRet = ( DlgExportEGIF( rPara ).Execute() == RET_OK );
- delete pResMgr;
- }
- else
- bRet = TRUE;
- }
-
- return bRet;
-}
-
diff --git a/filter/source/graphicfilter/egif/egifstr.src b/filter/source/graphicfilter/egif/egifstr.src
deleted file mode 100644
index ea258019d543..000000000000
--- a/filter/source/graphicfilter/egif/egifstr.src
+++ /dev/null
@@ -1,39 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#include "strings.hrc"
-
-// Key fuer den Dialog
-String KEY_INTER
-{
- Text = "Interlaced";
-};
-String KEY_TRANS
-{
- Text = "Translucent";
-};
diff --git a/filter/source/graphicfilter/egif/exports.map b/filter/source/graphicfilter/egif/exports.map
index 61e4682c6551..d4e28c44700c 100644
--- a/filter/source/graphicfilter/egif/exports.map
+++ b/filter/source/graphicfilter/egif/exports.map
@@ -1,7 +1,6 @@
UDK_3_0_0 {
global:
GraphicExport;
- DoExportDialog;
local:
*;
diff --git a/filter/source/graphicfilter/egif/makefile.mk b/filter/source/graphicfilter/egif/makefile.mk
index 27dae4906046..5579a301e020 100644
--- a/filter/source/graphicfilter/egif/makefile.mk
+++ b/filter/source/graphicfilter/egif/makefile.mk
@@ -42,20 +42,13 @@ DEPTARGET=vegif
CDEFS+= -DEDITDEBUG
.ENDIF
-SRS1NAME=$(TARGET)
-SRC1FILES = dlgegif.src \
- egifstr.src
.IF "$(L10N_framework)"==""
SLOFILES= $(SLO)$/egif.obj \
- $(SLO)$/dlgegif.obj \
- $(SLO)$/giflzwc.obj
+ $(SLO)$/giflzwc.obj
.ENDIF
# ==========================================================================
-RESLIB1NAME=$(TARGET2)
-RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs
-
.IF "$(L10N_framework)"==""
SHL1TARGET= egi$(DLLPOSTFIX)
SHL1IMPLIB= egif
diff --git a/filter/source/graphicfilter/egif/strings.hrc b/filter/source/graphicfilter/egif/strings.hrc
deleted file mode 100644
index 1566c0dfee81..000000000000
--- a/filter/source/graphicfilter/egif/strings.hrc
+++ /dev/null
@@ -1,28 +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.
- *
- ************************************************************************/
-#define KEY_INTER 256
-#define KEY_TRANS 257
diff --git a/filter/source/graphicfilter/eos2met/dlgeos2.cxx b/filter/source/graphicfilter/eos2met/dlgeos2.cxx
deleted file mode 100644
index 4c5bf1b0a429..000000000000
--- a/filter/source/graphicfilter/eos2met/dlgeos2.cxx
+++ /dev/null
@@ -1,179 +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_filter.hxx"
-#ifndef GCC
-#endif
-#include <com/sun/star/awt/Size.hpp>
-#include <vcl/msgbox.hxx>
-#include <svtools/FilterConfigItem.hxx>
-#include "dlgeos2.hxx"
-#include "dlgeos2.hrc"
-#include "strings.hrc"
-
-/*************************************************************************
-|*
-|* Ctor
-|*
-\************************************************************************/
-
-DlgExportEMET::DlgExportEMET( FltCallDialogParameter& rPara ) :
- ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_EMET, *rPara.pResMgr ) ),
- rFltCallPara ( rPara ),
- aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ),
- aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ),
- aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ),
- aRbOriginal ( this, ResId( RB_ORIGINAL, *rPara.pResMgr ) ),
- aRbSize ( this, ResId( RB_SIZE, *rPara.pResMgr ) ),
- aGrpMode ( this, ResId( GRP_MODE, *rPara.pResMgr ) ),
- aFtSizeX ( this, ResId( FT_SIZEX, *rPara.pResMgr ) ),
- aMtfSizeX ( this, ResId( MTF_SIZEX, *rPara.pResMgr ) ),
- aFtSizeY ( this, ResId( FT_SIZEY, *rPara.pResMgr ) ),
- aMtfSizeY ( this, ResId( MTF_SIZEY, *rPara.pResMgr ) ),
- aGrpSize ( this, ResId( GRP_SIZE, *rPara.pResMgr ) ),
- pMgr ( rPara.pResMgr )
-{
- FreeResource();
-
- String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/MET" ) );
- pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData );
-
- aBtnOK.SetClickHdl( LINK( this, DlgExportEMET, OK ) );
- aRbOriginal.SetClickHdl( LINK( this, DlgExportEMET, ClickRbOriginal ) );
- aRbSize.SetClickHdl( LINK( this, DlgExportEMET, ClickRbSize ) );
-
- // Config-Parameter lesen
- sal_Int32 nMode = pConfigItem->ReadInt32( String( ResId( KEY_MODE, *pMgr ) ), 0 );
- ::com::sun::star::awt::Size aDefault( 10000, 10000 );
- ::com::sun::star::awt::Size aSize;
- aSize = pConfigItem->ReadSize( String( ResId( KEY_SIZE, *pMgr ) ), aDefault );
-
- aMtfSizeX.SetDefaultUnit( FUNIT_MM );
- aMtfSizeY.SetDefaultUnit( FUNIT_MM );
-
- aMtfSizeX.SetValue( aSize.Width );
- aMtfSizeY.SetValue( aSize.Height );
-
- switch ( rPara.eFieldUnit )
- {
-// case FUNIT_NONE :
-// case FUNIT_KM :
-// case FUNIT_PERCENT :
-// case FUNIT_CUSTOM :
-// case FUNIT_MILE :
-// case FUNIT_FOOT :
-// case FUNIT_M :
- case FUNIT_MM :
- case FUNIT_CM :
- case FUNIT_TWIP :
- case FUNIT_POINT :
- case FUNIT_PICA :
- case FUNIT_INCH :
- case FUNIT_100TH_MM :
- {
- aMtfSizeX.SetUnit( rPara.eFieldUnit );
- aMtfSizeY.SetUnit( rPara.eFieldUnit );
- }
- break;
- default:
- break; // multiple other value not handled -Wall
- }
- if ( nMode == 1 )
- {
- aRbSize.Check( TRUE );
- ClickRbSize( NULL );
- }
- else
- {
- aRbOriginal.Check( TRUE );
- ClickRbOriginal( NULL );
- }
-}
-
-DlgExportEMET::~DlgExportEMET()
-{
- delete pConfigItem;
-}
-
-/*************************************************************************
-|*
-|* Speichert eingestellte Werte in ini-Datei
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportEMET, OK, void *, EMPTYARG )
-{
- // Config-Parameter schreiben
- ::com::sun::star::awt::Size aSize(
- (sal_Int32)MetricField::ConvertDoubleValue( aMtfSizeX.GetValue(), 2, aMtfSizeX.GetUnit(), MAP_100TH_MM ),
- (sal_Int32)MetricField::ConvertDoubleValue( aMtfSizeY.GetValue(), 2, aMtfSizeY.GetUnit(), MAP_100TH_MM ) );
- sal_Int32 nStrMode = ( aRbSize.IsChecked() ) ? 1 : 0;
-
- pConfigItem->WriteInt32( String( ResId( KEY_MODE, *pMgr ) ), nStrMode );
- pConfigItem->WriteSize( String( ResId( KEY_SIZE, *pMgr ) ), aSize );
- rFltCallPara.aFilterData = pConfigItem->GetFilterData();
- EndDialog( RET_OK );
-
- return 0;
-}
-
-/*************************************************************************
-|*
-|* Enabled/Disabled Controls
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportEMET, ClickRbOriginal, void*, EMPTYARG )
-{
- aGrpSize.Disable();
- aFtSizeX.Disable();
- aMtfSizeX.Disable();
- aFtSizeY.Disable();
- aMtfSizeY.Disable();
-
- return 0;
-}
-
-
-/*************************************************************************
-|*
-|* Enabled/Disabled Controls
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportEMET, ClickRbSize, void*, EMPTYARG )
-{
- aGrpSize.Enable();
- aFtSizeX.Enable();
- aMtfSizeX.Enable();
- aFtSizeY.Enable();
- aMtfSizeY.Enable();
-
- return 0;
-}
-
diff --git a/filter/source/graphicfilter/eos2met/dlgeos2.hrc b/filter/source/graphicfilter/eos2met/dlgeos2.hrc
deleted file mode 100644
index 5e4ec5b160fc..000000000000
--- a/filter/source/graphicfilter/eos2met/dlgeos2.hrc
+++ /dev/null
@@ -1,41 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include "filter.hrc"
-
-#define BTN_OK 1
-#define BTN_CANCEL 1
-#define BTN_HELP 1
-#define CBX_SIZE 2
-#define MTF_SIZEX 1
-#define MTF_SIZEY 2
-#define FT_SIZEX 1
-#define FT_SIZEY 2
-#define GRP_SIZE 1
-#define GRP_MODE 2
-#define RB_ORIGINAL 1
-#define RB_SIZE 2
-
diff --git a/filter/source/graphicfilter/eos2met/dlgeos2.hxx b/filter/source/graphicfilter/eos2met/dlgeos2.hxx
deleted file mode 100644
index 6387be453494..000000000000
--- a/filter/source/graphicfilter/eos2met/dlgeos2.hxx
+++ /dev/null
@@ -1,80 +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 _DLGEOS2_HXX_
-#define _DLGEOS2_HXX_
-#include <svtools/fltcall.hxx>
-#include <vcl/dialog.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/field.hxx>
-
-/*************************************************************************
-|*
-|* Dialog zum Einstellen von Filteroptionen bei Vektorformaten
-|*
-\************************************************************************/
-
-class FilterConfigItem;
-class ResMgr;
-
-class DlgExportEMET : public ModalDialog
-{
-private:
-
- FltCallDialogParameter& rFltCallPara;
-
- OKButton aBtnOK;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
-
- RadioButton aRbOriginal;
- RadioButton aRbSize;
- FixedLine aGrpMode;
-
- FixedText aFtSizeX;
- MetricField aMtfSizeX;
- FixedText aFtSizeY;
- MetricField aMtfSizeY;
- FixedLine aGrpSize;
-
- FilterConfigItem* pConfigItem;
- ResMgr* pMgr;
-
- DECL_LINK( OK, void* p );
- DECL_LINK( ClickRbOriginal,void* p );
- DECL_LINK( ClickRbSize,void* p );
-
-public:
- DlgExportEMET( FltCallDialogParameter& rPara );
- ~DlgExportEMET();
-};
-
-
-#endif // _DLGEMET_HXX_
-
diff --git a/filter/source/graphicfilter/eos2met/dlgeos2.src b/filter/source/graphicfilter/eos2met/dlgeos2.src
deleted file mode 100644
index 6c9e474e25db..000000000000
--- a/filter/source/graphicfilter/eos2met/dlgeos2.src
+++ /dev/null
@@ -1,162 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#include "dlgeos2.hrc"
-
-ModalDialog DLG_EXPORT_EMET
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 178 , 89 ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Text [ en-US ] = "MET Options" ;
- MetricField MTF_SIZEX
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 60 , 55 ) ;
- Size = MAP_APPFONT ( 50 , 12 ) ;
- TabStop = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 100 ;
- Maximum = 99999 ;
- StrictFormat = TRUE ;
- DecimalDigits = 2 ;
- Unit = FUNIT_MM ;
- First = 100 ;
- Last = 99999 ;
- SpinSize = 100 ;
- };
- MetricField MTF_SIZEY
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 60 , 71 ) ;
- Size = MAP_APPFONT ( 50 , 12 ) ;
- TabStop = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 100 ;
- Maximum = 99999 ;
- StrictFormat = TRUE ;
- DecimalDigits = 2 ;
- Unit = FUNIT_MM ;
- First = 100 ;
- Last = 99999 ;
- SpinSize = 100 ;
- };
- FixedLine GRP_SIZE
- {
- Pos = MAP_APPFONT ( 6 , 44 ) ;
- Size = MAP_APPFONT ( 110 , 8 ) ;
- Text [ en-US ] = "Size" ;
- };
- FixedText FT_SIZEX
- {
- Pos = MAP_APPFONT ( 12 , 56 ) ;
- Size = MAP_APPFONT ( 45 , 10 ) ;
- Text [ en-US ] = "Width" ;
- };
- FixedText FT_SIZEY
- {
- Pos = MAP_APPFONT ( 12 , 72 ) ;
- Size = MAP_APPFONT ( 45 , 10 ) ;
- Text [ en-US ] = "Height" ;
- };
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 122 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 122 , 24 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 122 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- RadioButton RB_ORIGINAL
- {
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 98 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Original" ;
- };
- RadioButton RB_SIZE
- {
- Pos = MAP_APPFONT ( 12 , 28 ) ;
- Size = MAP_APPFONT ( 98 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Size" ;
- };
- FixedLine GRP_MODE
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 110 , 8 ) ;
- Text [ en-US ] = "Mode" ;
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx
index 8e8d03a22561..4fce357a91e8 100644
--- a/filter/source/graphicfilter/eos2met/eos2met.cxx
+++ b/filter/source/graphicfilter/eos2met/eos2met.cxx
@@ -45,8 +45,6 @@
#include <vcl/svapp.hxx>
#include <vcl/msgbox.hxx>
#include <svl/solar.hrc>
-#include "strings.hrc"
-#include "dlgeos2.hxx"
// -----------------------------Feld-Typen-------------------------------
@@ -2594,29 +2592,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream & rStream, Graphic & rGr
}
}
-//================== GraphicDialog - die exportierte Funktion ================
-
-extern "C" BOOL SAL_CALL DoExportDialog( FltCallDialogParameter& rPara )
-{
- BOOL bRet = FALSE;
-
- if ( rPara.pWindow )
- {
- ByteString aResMgrName( "eme" );
- ResMgr* pResMgr;
-
- pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
-
- if( pResMgr )
- {
- rPara.pResMgr = pResMgr;
- bRet = ( DlgExportEMET( rPara ).Execute() == RET_OK );
- delete pResMgr;
- }
- else
- bRet = TRUE;
- }
-
- return bRet;
-}
-
diff --git a/filter/source/graphicfilter/eos2met/eos2mstr.src b/filter/source/graphicfilter/eos2met/eos2mstr.src
deleted file mode 100644
index 8afebcb7564c..000000000000
--- a/filter/source/graphicfilter/eos2met/eos2mstr.src
+++ /dev/null
@@ -1,38 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "strings.hrc"
-
-String KEY_MODE
-{
- Text = "ExportMode";
-};
-
-String KEY_SIZE
-{
- Text = "Size";
-};
diff --git a/filter/source/graphicfilter/eos2met/exports.map b/filter/source/graphicfilter/eos2met/exports.map
index 61e4682c6551..d4e28c44700c 100644
--- a/filter/source/graphicfilter/eos2met/exports.map
+++ b/filter/source/graphicfilter/eos2met/exports.map
@@ -1,7 +1,6 @@
UDK_3_0_0 {
global:
GraphicExport;
- DoExportDialog;
local:
*;
diff --git a/filter/source/graphicfilter/eos2met/makefile.mk b/filter/source/graphicfilter/eos2met/makefile.mk
index 9f8deb74c7ca..da9ac4b53e15 100644
--- a/filter/source/graphicfilter/eos2met/makefile.mk
+++ b/filter/source/graphicfilter/eos2met/makefile.mk
@@ -42,17 +42,12 @@ DEPTARGET=veos2met
CDEFS+= -DEDITDEBUG
.ENDIF
-SRS1NAME=$(TARGET)
-SRC1FILES= dlgeos2.src \
- eos2mstr.src
.IF "$(L10N_framework)"==""
-SLOFILES = $(SLO)$/eos2met.obj \
- $(SLO)$/dlgeos2.obj
+SLOFILES = $(SLO)$/eos2met.obj
+
.ENDIF
# ==========================================================================
-RESLIB1NAME=$(TARGET2)
-RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs
.IF "$(L10N_framework)"==""
SHL1TARGET= eme$(DLLPOSTFIX)
SHL1IMPLIB= eos2met
diff --git a/filter/source/graphicfilter/eos2met/strings.hrc b/filter/source/graphicfilter/eos2met/strings.hrc
deleted file mode 100644
index 7834e3ea2bc0..000000000000
--- a/filter/source/graphicfilter/eos2met/strings.hrc
+++ /dev/null
@@ -1,29 +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.
- *
- ************************************************************************/
-#define KEY_MODE 260
-#define KEY_SIZE 261
-
diff --git a/filter/source/graphicfilter/epbm/dlgepbm.cxx b/filter/source/graphicfilter/epbm/dlgepbm.cxx
deleted file mode 100644
index 932fb7ff5bb9..000000000000
--- a/filter/source/graphicfilter/epbm/dlgepbm.cxx
+++ /dev/null
@@ -1,99 +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_filter.hxx"
-#ifndef GCC
-#endif
-
-#include <tools/ref.hxx>
-#include <svtools/FilterConfigItem.hxx>
-#include <vcl/msgbox.hxx>
-#include "dlgepbm.hxx"
-#include "dlgepbm.hrc"
-#include "strings.hrc"
-
-/*************************************************************************
-|*
-|* Ctor
-|*
-\************************************************************************/
-
-DlgExportEPBM::DlgExportEPBM( FltCallDialogParameter& rPara ) :
- ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_EPBM, *rPara.pResMgr ) ),
- rFltCallPara ( rPara ),
- aGrpFormat ( this, ResId( GRP_FORMAT, *rPara.pResMgr ) ),
- aRBRaw ( this, ResId( RB_RAW, *rPara.pResMgr ) ),
- aRBASCII ( this, ResId( RB_ASCII, *rPara.pResMgr ) ),
- aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ),
- aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ),
- aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ),
- pMgr ( rPara.pResMgr )
-{
- FreeResource();
-
- // Config-Parameter lesen
-
- String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/PBM" ) );
- pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData );
- sal_Int32 nFormat = pConfigItem->ReadInt32( String( ResId( KEY_FORMAT, *pMgr ) ), 1 );
-
- BOOL bCheck = FALSE;
- if ( !nFormat )
- bCheck ^= TRUE;
-
- aRBRaw.Check( bCheck );
- bCheck ^= TRUE;
- aRBASCII.Check( bCheck );
-
- aBtnOK.SetClickHdl( LINK( this, DlgExportEPBM, OK ) );
-}
-
-DlgExportEPBM::~DlgExportEPBM()
-{
- delete pConfigItem;
-}
-
-/*************************************************************************
-|*
-|* Speichert eingestellte Werte in ini-Datei
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportEPBM, OK, void *, EMPTYARG )
-{
-
- // Config-Parameter schreiben
- sal_Int32 nFormat = 0;
- if ( aRBASCII.IsChecked() )
- nFormat++;
- pConfigItem->WriteInt32( String( ResId( KEY_FORMAT, *pMgr ) ), nFormat );
- rFltCallPara.aFilterData = pConfigItem->GetFilterData();
- EndDialog( RET_OK );
-
- return 0;
-}
diff --git a/filter/source/graphicfilter/epbm/dlgepbm.hrc b/filter/source/graphicfilter/epbm/dlgepbm.hrc
deleted file mode 100644
index 876dfa840997..000000000000
--- a/filter/source/graphicfilter/epbm/dlgepbm.hrc
+++ /dev/null
@@ -1,34 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include "filter.hrc"
-
-#define BTN_OK 1
-#define BTN_CANCEL 1
-#define BTN_HELP 1
-#define GRP_FORMAT 1
-#define RB_RAW 1
-#define RB_ASCII 2
diff --git a/filter/source/graphicfilter/epbm/dlgepbm.hxx b/filter/source/graphicfilter/epbm/dlgepbm.hxx
deleted file mode 100644
index 780eac366020..000000000000
--- a/filter/source/graphicfilter/epbm/dlgepbm.hxx
+++ /dev/null
@@ -1,71 +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 _DLGEPBM_HXX_
-#define _DLGEPBM_HXX_
-#include <svtools/fltcall.hxx>
-#include <vcl/dialog.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/field.hxx>
-#include <svtools/stdctrl.hxx>
-
-
-/*************************************************************************
-|*
-|* Dialog zum Einstellen von Filteroptionen
-|*
-\************************************************************************/
-
-class ResMgr;
-
-class FilterConfigItem;
-class DlgExportEPBM : public ModalDialog
-{
-private:
-
- FltCallDialogParameter& rFltCallPara;
-
- FixedLine aGrpFormat;
- RadioButton aRBRaw;
- RadioButton aRBASCII;
- OKButton aBtnOK;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
-
- FilterConfigItem* pConfigItem;
- ResMgr* pMgr;
-
- DECL_LINK( OK, void * );
-
-public:
- DlgExportEPBM( FltCallDialogParameter& rPara );
- ~DlgExportEPBM();
-};
-
-#endif // _DLGEPBM_HXX_
diff --git a/filter/source/graphicfilter/epbm/dlgepbm.src b/filter/source/graphicfilter/epbm/dlgepbm.src
deleted file mode 100644
index b4e6eb2decf2..000000000000
--- a/filter/source/graphicfilter/epbm/dlgepbm.src
+++ /dev/null
@@ -1,106 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "dlgepbm.hrc"
-ModalDialog DLG_EXPORT_EPBM
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 133 , 63 ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Text [ en-US ] = "PBM Options" ;
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 73 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 73 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 73 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- FixedLine GRP_FORMAT
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 60 , 8 ) ;
- Text [ en-US ] = "File format";
- };
- RadioButton RB_RAW
- {
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 45 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Binary";
- };
- RadioButton RB_ASCII
- {
- Pos = MAP_APPFONT ( 12 , 28 ) ;
- Size = MAP_APPFONT ( 45 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Text";
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/filter/source/graphicfilter/epbm/epbm.cxx b/filter/source/graphicfilter/epbm/epbm.cxx
index 8786f2983a56..b4f5b9b680ce 100644
--- a/filter/source/graphicfilter/epbm/epbm.cxx
+++ b/filter/source/graphicfilter/epbm/epbm.cxx
@@ -35,9 +35,6 @@
#include <svl/solar.hrc>
#include <svtools/fltcall.hxx>
#include <svtools/FilterConfigItem.hxx>
-#include "strings.hrc"
-#include "dlgepbm.hrc"
-#include "dlgepbm.hxx"
//============================ PBMWriter ==================================
@@ -215,28 +212,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGrap
}
// ------------------------------------------------------------------------
-
-extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara )
-{
- BOOL bRet = FALSE;
-
- if ( rPara.pWindow )
- {
- ByteString aResMgrName( "epb" );
- ResMgr* pResMgr;
-
- pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
-
- if( pResMgr )
- {
- rPara.pResMgr = pResMgr;
- bRet = ( DlgExportEPBM( rPara ).Execute() == RET_OK );
- delete pResMgr;
- }
- else
- bRet = TRUE;
- }
-
- return bRet;
-}
-
diff --git a/filter/source/graphicfilter/epbm/epbmstr.src b/filter/source/graphicfilter/epbm/epbmstr.src
deleted file mode 100644
index 8424505dbcd1..000000000000
--- a/filter/source/graphicfilter/epbm/epbmstr.src
+++ /dev/null
@@ -1,35 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#include "strings.hrc"
-
-// Key fuer den Dialog
-String KEY_FORMAT
-{
- Text = "FileFormat";
-};
diff --git a/filter/source/graphicfilter/epbm/exports.map b/filter/source/graphicfilter/epbm/exports.map
index 61e4682c6551..d4e28c44700c 100644
--- a/filter/source/graphicfilter/epbm/exports.map
+++ b/filter/source/graphicfilter/epbm/exports.map
@@ -1,7 +1,6 @@
UDK_3_0_0 {
global:
GraphicExport;
- DoExportDialog;
local:
*;
diff --git a/filter/source/graphicfilter/epbm/makefile.mk b/filter/source/graphicfilter/epbm/makefile.mk
index 3b248222cda1..609eae204aa4 100644
--- a/filter/source/graphicfilter/epbm/makefile.mk
+++ b/filter/source/graphicfilter/epbm/makefile.mk
@@ -42,17 +42,11 @@ DEPTARGET=vepbm
CDEFS+= -DEDITDEBUG
.ENDIF
-SRS1NAME=$(TARGET)
-SRC1FILES= dlgepbm.src \
- epbmstr.src
.IF "$(L10N_framework)"==""
-SLOFILES = $(SLO)$/epbm.obj \
- $(SLO)$/dlgepbm.obj
+SLOFILES = $(SLO)$/epbm.obj
.ENDIF
# ==========================================================================
-RESLIB1NAME=$(TARGET2)
-RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs
.IF "$(L10N_framework)"==""
SHL1TARGET= epb$(DLLPOSTFIX)
SHL1IMPLIB= epbm
diff --git a/filter/source/graphicfilter/epbm/strings.hrc b/filter/source/graphicfilter/epbm/strings.hrc
deleted file mode 100644
index 122719e87d4b..000000000000
--- a/filter/source/graphicfilter/epbm/strings.hrc
+++ /dev/null
@@ -1,27 +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.
- *
- ************************************************************************/
-#define KEY_FORMAT 256
diff --git a/filter/source/graphicfilter/epgm/dlgepgm.cxx b/filter/source/graphicfilter/epgm/dlgepgm.cxx
deleted file mode 100644
index 3aa960b25a26..000000000000
--- a/filter/source/graphicfilter/epgm/dlgepgm.cxx
+++ /dev/null
@@ -1,97 +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_filter.hxx"
-#ifndef GCC
-#endif
-
-#include <tools/ref.hxx>
-#include <svtools/FilterConfigItem.hxx>
-#include <vcl/msgbox.hxx>
-#include "dlgepgm.hxx"
-#include "dlgepgm.hrc"
-#include "strings.hrc"
-
-/*************************************************************************
-|*
-|* Ctor
-|*
-\************************************************************************/
-
-DlgExportEPGM::DlgExportEPGM( FltCallDialogParameter& rPara ) :
- ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_EPGM, *rPara.pResMgr ) ),
- rFltCallPara ( rPara ),
- aGrpFormat ( this, ResId( GRP_FORMAT, *rPara.pResMgr ) ),
- aRBRaw ( this, ResId( RB_RAW, *rPara.pResMgr ) ),
- aRBASCII ( this, ResId( RB_ASCII, *rPara.pResMgr ) ),
- aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ),
- aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ),
- aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ),
- pMgr ( rPara.pResMgr )
-{
- FreeResource();
-
- // Config-Parameter lesen
-
- String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/PGM" ) );
- pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData );
- sal_Int32 nFormat = pConfigItem->ReadInt32( String( ResId( KEY_FORMAT, *pMgr ) ), 0 );
-
- BOOL bCheck = FALSE;
- if ( !nFormat )
- bCheck ^= TRUE;
- aRBRaw.Check( bCheck );
- bCheck ^= TRUE;
- aRBASCII.Check( bCheck );
-
- aBtnOK.SetClickHdl( LINK( this, DlgExportEPGM, OK ) );
-}
-
-DlgExportEPGM::~DlgExportEPGM()
-{
- delete pConfigItem;
-}
-
-/*************************************************************************
-|*
-|* Speichert eingestellte Werte in ini-Datei
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportEPGM, OK, void *, EMPTYARG )
-{
- // Config-Parameter schreiben
- sal_Int32 nFormat = 0;
- if ( aRBASCII.IsChecked() )
- nFormat++;
- pConfigItem->WriteInt32( String( ResId( KEY_FORMAT, *pMgr ) ), nFormat );
- rFltCallPara.aFilterData = pConfigItem->GetFilterData();
- EndDialog( RET_OK );
-
- return 0;
-}
diff --git a/filter/source/graphicfilter/epgm/dlgepgm.hrc b/filter/source/graphicfilter/epgm/dlgepgm.hrc
deleted file mode 100644
index 876dfa840997..000000000000
--- a/filter/source/graphicfilter/epgm/dlgepgm.hrc
+++ /dev/null
@@ -1,34 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include "filter.hrc"
-
-#define BTN_OK 1
-#define BTN_CANCEL 1
-#define BTN_HELP 1
-#define GRP_FORMAT 1
-#define RB_RAW 1
-#define RB_ASCII 2
diff --git a/filter/source/graphicfilter/epgm/dlgepgm.hxx b/filter/source/graphicfilter/epgm/dlgepgm.hxx
deleted file mode 100644
index 3eb91bdb5fc6..000000000000
--- a/filter/source/graphicfilter/epgm/dlgepgm.hxx
+++ /dev/null
@@ -1,71 +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 _DLGEPGM_HXX_
-#define _DLGEPGM_HXX_
-#include <svtools/fltcall.hxx>
-#include <vcl/dialog.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/field.hxx>
-#include <svtools/stdctrl.hxx>
-
-
-/*************************************************************************
-|*
-|* Dialog zum Einstellen von Filteroptionen
-|*
-\************************************************************************/
-
-class FilterConfigItem;
-class ResMgr;
-
-class DlgExportEPGM : public ModalDialog
-{
-private:
-
- FltCallDialogParameter& rFltCallPara;
-
- FixedLine aGrpFormat;
- RadioButton aRBRaw;
- RadioButton aRBASCII;
- OKButton aBtnOK;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
-
- FilterConfigItem* pConfigItem;
- ResMgr* pMgr;
-
- DECL_LINK( OK, void * );
-
-public:
- DlgExportEPGM( FltCallDialogParameter& rPara );
- ~DlgExportEPGM();
-};
-
-#endif // _DLGEPGM_HXX_
diff --git a/filter/source/graphicfilter/epgm/dlgepgm.src b/filter/source/graphicfilter/epgm/dlgepgm.src
deleted file mode 100644
index 39e91d29fdf5..000000000000
--- a/filter/source/graphicfilter/epgm/dlgepgm.src
+++ /dev/null
@@ -1,105 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "dlgepgm.hrc"
-ModalDialog DLG_EXPORT_EPGM
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 133 , 63 ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Text [ en-US ] = "PGM Options" ;
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 73 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 73 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 73 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- FixedLine GRP_FORMAT
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 60 , 8 ) ;
- Text [ en-US ] = "File format";
- };
- RadioButton RB_RAW
- {
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 45 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Binary";
- };
- RadioButton RB_ASCII
- {
- Pos = MAP_APPFONT ( 12 , 28 ) ;
- Size = MAP_APPFONT ( 45 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Text";
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/filter/source/graphicfilter/epgm/epgm.cxx b/filter/source/graphicfilter/epgm/epgm.cxx
index 93da8ff48b7a..1f5da40dee43 100644
--- a/filter/source/graphicfilter/epgm/epgm.cxx
+++ b/filter/source/graphicfilter/epgm/epgm.cxx
@@ -35,9 +35,6 @@
#include <svl/solar.hrc>
#include <svtools/fltcall.hxx>
#include <svtools/FilterConfigItem.hxx>
-#include "strings.hrc"
-#include "dlgepgm.hrc"
-#include "dlgepgm.hxx"
//============================ PGMWriter ==================================
@@ -240,28 +237,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGrap
}
// ------------------------------------------------------------------------
-
-extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara )
-{
- BOOL bRet = FALSE;
-
- if ( rPara.pWindow )
- {
- ByteString aResMgrName( "epg" );
- ResMgr* pResMgr;
-
- pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
-
- if( pResMgr )
- {
- rPara.pResMgr = pResMgr;
- bRet = ( DlgExportEPGM( rPara ).Execute() == RET_OK );
- delete pResMgr;
- }
- else
- bRet = TRUE;
- }
-
- return bRet;
-}
-
diff --git a/filter/source/graphicfilter/epgm/epgmstr.src b/filter/source/graphicfilter/epgm/epgmstr.src
deleted file mode 100644
index 8424505dbcd1..000000000000
--- a/filter/source/graphicfilter/epgm/epgmstr.src
+++ /dev/null
@@ -1,35 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#include "strings.hrc"
-
-// Key fuer den Dialog
-String KEY_FORMAT
-{
- Text = "FileFormat";
-};
diff --git a/filter/source/graphicfilter/epgm/exports.map b/filter/source/graphicfilter/epgm/exports.map
index 61e4682c6551..d4e28c44700c 100644
--- a/filter/source/graphicfilter/epgm/exports.map
+++ b/filter/source/graphicfilter/epgm/exports.map
@@ -1,7 +1,6 @@
UDK_3_0_0 {
global:
GraphicExport;
- DoExportDialog;
local:
*;
diff --git a/filter/source/graphicfilter/epgm/makefile.mk b/filter/source/graphicfilter/epgm/makefile.mk
index 70ab5ec93c68..63d961feec97 100644
--- a/filter/source/graphicfilter/epgm/makefile.mk
+++ b/filter/source/graphicfilter/epgm/makefile.mk
@@ -43,17 +43,11 @@ DEPTARGET=vepgm
CDEFS+= -DEDITDEBUG
.ENDIF
-SRS1NAME=$(TARGET)
-SRC1FILES= dlgepgm.src \
- epgmstr.src
.IF "$(L10N_framework)"==""
-SLOFILES = $(SLO)$/epgm.obj \
- $(SLO)$/dlgepgm.obj
+SLOFILES = $(SLO)$/epgm.obj
.ENDIF
# ==========================================================================
-RESLIB1NAME=$(TARGET2)
-RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs
.IF "$(L10N_framework)"==""
SHL1TARGET= epg$(DLLPOSTFIX)
SHL1IMPLIB= epgm
diff --git a/filter/source/graphicfilter/epgm/strings.hrc b/filter/source/graphicfilter/epgm/strings.hrc
deleted file mode 100644
index 122719e87d4b..000000000000
--- a/filter/source/graphicfilter/epgm/strings.hrc
+++ /dev/null
@@ -1,27 +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.
- *
- ************************************************************************/
-#define KEY_FORMAT 256
diff --git a/filter/source/graphicfilter/epict/dlgepct.cxx b/filter/source/graphicfilter/epict/dlgepct.cxx
deleted file mode 100644
index c274dc873560..000000000000
--- a/filter/source/graphicfilter/epict/dlgepct.cxx
+++ /dev/null
@@ -1,183 +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_filter.hxx"
-#ifndef GCC
-#endif
-
-#include <vcl/msgbox.hxx>
-#include <svtools/FilterConfigItem.hxx>
-#include <com/sun/star/awt/Size.hpp>
-#include "dlgepct.hxx"
-#include "dlgepct.hrc"
-#include "strings.hrc"
-
-/*************************************************************************
-|*
-|* Ctor
-|*
-\************************************************************************/
-
-DlgExportEPCT::DlgExportEPCT( FltCallDialogParameter& rPara ) :
- ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_EPCT, *rPara.pResMgr ) ),
- rFltCallPara ( rPara ),
- aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ),
- aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ),
- aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ),
- aRbOriginal ( this, ResId( RB_ORIGINAL, *rPara.pResMgr ) ),
- aRbSize ( this, ResId( RB_SIZE, *rPara.pResMgr ) ),
- aGrpMode ( this, ResId( GRP_MODE, *rPara.pResMgr ) ),
- aFtSizeX ( this, ResId( FT_SIZEX, *rPara.pResMgr ) ),
- aMtfSizeX ( this, ResId( MTF_SIZEX, *rPara.pResMgr ) ),
- aFtSizeY ( this, ResId( FT_SIZEY, *rPara.pResMgr ) ),
- aMtfSizeY ( this, ResId( MTF_SIZEY, *rPara.pResMgr ) ),
- aGrpSize ( this, ResId( GRP_SIZE, *rPara.pResMgr ) ),
- pMgr ( rPara.pResMgr )
-{
- FreeResource();
-
- String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/PCT" ) );
- pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData );
-
- aBtnOK.SetClickHdl( LINK( this, DlgExportEPCT, OK ) );
- aRbOriginal.SetClickHdl( LINK( this, DlgExportEPCT, ClickRbOriginal ) );
- aRbSize.SetClickHdl( LINK( this, DlgExportEPCT, ClickRbSize ) );
-
- // Config-Parameter lesen
- sal_Int32 nStrMode = pConfigItem->ReadInt32( String( ResId( KEY_MODE, *pMgr ) ), 0 );
- ::com::sun::star::awt::Size aDefault( 10000, 10000 );
- ::com::sun::star::awt::Size aSize;
- aSize = pConfigItem->ReadSize( String( ResId( KEY_SIZE, *pMgr ) ), aDefault );
-
- aMtfSizeX.SetDefaultUnit( FUNIT_MM );
- aMtfSizeY.SetDefaultUnit( FUNIT_MM );
- aMtfSizeX.SetValue( aSize.Width );
- aMtfSizeY.SetValue( aSize.Height );
-
- switch ( rPara.eFieldUnit )
- {
- case FUNIT_NONE :
- case FUNIT_KM :
- case FUNIT_PERCENT :
- case FUNIT_CUSTOM :
- case FUNIT_MILE :
- case FUNIT_FOOT :
- case FUNIT_M :
- break; // -Wall not handled.
- case FUNIT_MM :
- case FUNIT_CM :
- case FUNIT_TWIP :
- case FUNIT_POINT :
- case FUNIT_PICA :
- case FUNIT_INCH :
- case FUNIT_100TH_MM :
- {
- aMtfSizeX.SetUnit( rPara.eFieldUnit );
- aMtfSizeY.SetUnit( rPara.eFieldUnit );
- }
- break;
- }
- if ( nStrMode == 1 )
- {
- aRbSize.Check( TRUE );
- ClickRbSize( NULL );
- }
- else
- {
- aRbOriginal.Check( TRUE );
- ClickRbOriginal( NULL );
- }
-}
-
-DlgExportEPCT::~DlgExportEPCT()
-{
- delete pConfigItem;
-}
-
-/*************************************************************************
-|*
-|* Speichert eingestellte Werte in ini-Datei
-|*
-\**************************************** ********************************/
-
-IMPL_LINK( DlgExportEPCT, OK, void *, EMPTYARG )
-{
- // Config-Parameter schreiben
- ::com::sun::star::awt::Size aSize(
- (sal_Int32)MetricField::ConvertDoubleValue( aMtfSizeX.GetValue(), 2, aMtfSizeX.GetUnit(), MAP_100TH_MM ),
- (sal_Int32)MetricField::ConvertDoubleValue( aMtfSizeY.GetValue(), 2, aMtfSizeY.GetUnit(), MAP_100TH_MM ) );
-
- sal_Int32 nStrMode = 0;
- if ( aRbSize.IsChecked() )
- nStrMode++;
-
- pConfigItem->WriteInt32( String( ResId( KEY_MODE, *pMgr ) ), nStrMode );
- pConfigItem->WriteSize( String( ResId( KEY_SIZE, *pMgr ) ), aSize );
- rFltCallPara.aFilterData = pConfigItem->GetFilterData();
- EndDialog( RET_OK );
-
- return 0;
-}
-
-/*************************************************************************
-|*
-|* Enabled/Disabled Controls
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportEPCT, ClickRbOriginal, void*, EMPTYARG )
-{
- aGrpSize.Disable();
- aFtSizeX.Disable();
- aMtfSizeX.Disable();
- aFtSizeY.Disable();
- aMtfSizeY.Disable();
-
- return 0;
-}
-
-
-/*************************************************************************
-|*
-|* Enabled/Disabled Controls
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportEPCT, ClickRbSize, void*, EMPTYARG )
-{
- aGrpSize.Enable();
- aFtSizeX.Enable();
- aMtfSizeX.Enable();
- aFtSizeY.Enable();
- aMtfSizeY.Enable();
-
- return 0;
-}
-
-
-
diff --git a/filter/source/graphicfilter/epict/dlgepct.hrc b/filter/source/graphicfilter/epict/dlgepct.hrc
deleted file mode 100644
index 0f92aa9bda3c..000000000000
--- a/filter/source/graphicfilter/epict/dlgepct.hrc
+++ /dev/null
@@ -1,41 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include <filter.hrc>
-
-#define BTN_OK 1
-#define BTN_CANCEL 1
-#define BTN_HELP 1
-#define CBX_SIZE 2
-#define MTF_SIZEX 1
-#define MTF_SIZEY 2
-#define FT_SIZEX 1
-#define FT_SIZEY 2
-#define GRP_SIZE 1
-#define GRP_MODE 2
-#define RB_ORIGINAL 1
-#define RB_SIZE 2
-
diff --git a/filter/source/graphicfilter/epict/dlgepct.hxx b/filter/source/graphicfilter/epict/dlgepct.hxx
deleted file mode 100644
index e879822ab1f5..000000000000
--- a/filter/source/graphicfilter/epict/dlgepct.hxx
+++ /dev/null
@@ -1,80 +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 _DLGEPCT_HXX_
-#define _DLGEPCT_HXX_
-
-#include <vcl/dialog.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/field.hxx>
-#include <svtools/fltcall.hxx>
-
-/*************************************************************************
-|*
-|* Dialog zum Einstellen von Filteroptionen bei Vektorformaten
-|*
-\************************************************************************/
-
-class FilterConfigItem;
-class ResMgr;
-
-class DlgExportEPCT : public ModalDialog
-{
-private:
-
- FltCallDialogParameter& rFltCallPara;
-
- OKButton aBtnOK;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
-
- RadioButton aRbOriginal;
- RadioButton aRbSize;
- FixedLine aGrpMode;
-
- FixedText aFtSizeX;
- MetricField aMtfSizeX;
- FixedText aFtSizeY;
- MetricField aMtfSizeY;
- FixedLine aGrpSize;
-
- FilterConfigItem* pConfigItem;
- ResMgr* pMgr;
-
- DECL_LINK( OK, void* p );
- DECL_LINK( ClickRbOriginal,void* p );
- DECL_LINK( ClickRbSize,void* p );
-
-public:
- DlgExportEPCT( FltCallDialogParameter& rPara );
- ~DlgExportEPCT();
-};
-
-#endif // _DLGEPCT_HXX_
-
diff --git a/filter/source/graphicfilter/epict/dlgepct.src b/filter/source/graphicfilter/epict/dlgepct.src
deleted file mode 100644
index d503c53cf89c..000000000000
--- a/filter/source/graphicfilter/epict/dlgepct.src
+++ /dev/null
@@ -1,163 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "dlgepct.hrc"
-
-ModalDialog DLG_EXPORT_EPCT
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 178 , 89 ) ;
- Text [ en-US ] = "PICT Options" ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- MetricField MTF_SIZEX
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 60 , 55 ) ;
- Size = MAP_APPFONT ( 50 , 12 ) ;
- TabStop = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 100 ;
- Maximum = 99999 ;
- StrictFormat = TRUE ;
- DecimalDigits = 2 ;
- Unit = FUNIT_MM ;
- First = 100 ;
- Last = 99999 ;
- SpinSize = 100 ;
- };
- MetricField MTF_SIZEY
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 60 , 71 ) ;
- Size = MAP_APPFONT ( 50 , 12 ) ;
- TabStop = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 100 ;
- Maximum = 99999 ;
- StrictFormat = TRUE ;
- DecimalDigits = 2 ;
- Unit = FUNIT_MM ;
- First = 100 ;
- Last = 99999 ;
- SpinSize = 100 ;
- };
- FixedLine GRP_SIZE
- {
- Pos = MAP_APPFONT ( 6 , 44 ) ;
- Size = MAP_APPFONT ( 110 , 8 ) ;
- Text [ en-US ] = "Size" ;
- };
- FixedText FT_SIZEX
- {
- Pos = MAP_APPFONT ( 12 , 57 ) ;
- Size = MAP_APPFONT ( 45 , 8 ) ;
- Text [ en-US ] = "Width" ;
- };
- FixedText FT_SIZEY
- {
- Pos = MAP_APPFONT ( 12 , 73 ) ;
- Size = MAP_APPFONT ( 45 , 8 ) ;
- Text [ en-US ] = "Height" ;
- };
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 122 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 122 , 24 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 122 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- RadioButton RB_ORIGINAL
- {
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 98 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Original" ;
- };
- RadioButton RB_SIZE
- {
- Pos = MAP_APPFONT ( 12 , 28 ) ;
- Size = MAP_APPFONT ( 98 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Size" ;
- };
- FixedLine GRP_MODE
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 110 , 8 ) ;
- Text [ en-US ] = "Mode" ;
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx
index 699c966ea109..53bdfbdad6ff 100644
--- a/filter/source/graphicfilter/epict/epict.cxx
+++ b/filter/source/graphicfilter/epict/epict.cxx
@@ -48,9 +48,6 @@
#include <vcl/gdimtf.hxx>
#include <tools/bigint.hxx>
-#include "strings.hrc"
-#include "dlgepct.hrc"
-#include "dlgepct.hxx"
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
@@ -2331,28 +2328,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicExport(SvStream & rStream, Graphic & rGra
}
}
-//================== GraphicDialog - die exportierte Funktion ================
-
-extern "C" BOOL SAL_CALL DoExportDialog( FltCallDialogParameter& rPara )
-{
- BOOL bRet = FALSE;
-
- if ( rPara.pWindow )
- {
- ByteString aResMgrName( "ept" );
- ResMgr* pResMgr;
-
- pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
-
- if( pResMgr )
- {
- rPara.pResMgr = pResMgr;
- bRet = ( DlgExportEPCT( rPara ).Execute() == RET_OK );
- delete pResMgr;
- }
- else
- bRet = TRUE;
- }
-
- return bRet;
-}
diff --git a/filter/source/graphicfilter/epict/epictstr.src b/filter/source/graphicfilter/epict/epictstr.src
deleted file mode 100644
index 8afebcb7564c..000000000000
--- a/filter/source/graphicfilter/epict/epictstr.src
+++ /dev/null
@@ -1,38 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "strings.hrc"
-
-String KEY_MODE
-{
- Text = "ExportMode";
-};
-
-String KEY_SIZE
-{
- Text = "Size";
-};
diff --git a/filter/source/graphicfilter/epict/exports.map b/filter/source/graphicfilter/epict/exports.map
index 61e4682c6551..d4e28c44700c 100644
--- a/filter/source/graphicfilter/epict/exports.map
+++ b/filter/source/graphicfilter/epict/exports.map
@@ -1,7 +1,6 @@
UDK_3_0_0 {
global:
GraphicExport;
- DoExportDialog;
local:
*;
diff --git a/filter/source/graphicfilter/epict/makefile.mk b/filter/source/graphicfilter/epict/makefile.mk
index a7c99eb3f732..1e030e52dd9b 100644
--- a/filter/source/graphicfilter/epict/makefile.mk
+++ b/filter/source/graphicfilter/epict/makefile.mk
@@ -43,17 +43,11 @@ DEPTARGET=vepict
CDEFS+= -DEDITDEBUG
.ENDIF
-SRS1NAME=$(TARGET)
-SRC1FILES = dlgepct.src \
- epictstr.src
.IF "$(L10N_framework)"==""
-SLOFILES = $(SLO)$/epict.obj \
- $(SLO)$/dlgepct.obj
+SLOFILES = $(SLO)$/epict.obj
.ENDIF
# ==========================================================================
-RESLIB1NAME=$(TARGET2)
-RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs
.IF "$(L10N_framework)"==""
SHL1TARGET= ept$(DLLPOSTFIX)
SHL1IMPLIB= epict
diff --git a/filter/source/graphicfilter/epict/strings.hrc b/filter/source/graphicfilter/epict/strings.hrc
deleted file mode 100644
index 7834e3ea2bc0..000000000000
--- a/filter/source/graphicfilter/epict/strings.hrc
+++ /dev/null
@@ -1,29 +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.
- *
- ************************************************************************/
-#define KEY_MODE 260
-#define KEY_SIZE 261
-
diff --git a/filter/source/graphicfilter/eppm/dlgeppm.cxx b/filter/source/graphicfilter/eppm/dlgeppm.cxx
deleted file mode 100644
index 23822bfebf7c..000000000000
--- a/filter/source/graphicfilter/eppm/dlgeppm.cxx
+++ /dev/null
@@ -1,96 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_filter.hxx"
-#ifndef GCC
-#endif
-#include <tools/ref.hxx>
-#include <svtools/FilterConfigItem.hxx>
-#include <vcl/msgbox.hxx>
-#include "dlgeppm.hxx"
-#include "dlgeppm.hrc"
-#include "strings.hrc"
-
-/*************************************************************************
-|*
-|* Ctor
-|*
-\************************************************************************/
-
-DlgExportEPPM::DlgExportEPPM( FltCallDialogParameter& rPara ) :
- ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_EPPM, *rPara.pResMgr ) ),
- rFltCallPara ( rPara ),
- aGrpFormat ( this, ResId( GRP_FORMAT, *rPara.pResMgr ) ),
- aRBRaw ( this, ResId( RB_RAW, *rPara.pResMgr ) ),
- aRBASCII ( this, ResId( RB_ASCII, *rPara.pResMgr ) ),
- aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ),
- aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ),
- aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ),
- pMgr ( rPara.pResMgr )
-{
- FreeResource();
-
- // Config-Parameter lesen
-
- String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/PPM" ) );
- pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData );
- sal_Int32 nFormat = pConfigItem->ReadInt32( String( ResId( KEY_FORMAT, *pMgr ) ), 0 );
-
- BOOL bCheck = FALSE;
- if ( !nFormat )
- bCheck ^= TRUE;
- aRBRaw.Check( bCheck );
- bCheck ^= TRUE;
- aRBASCII.Check( bCheck );
-
- aBtnOK.SetClickHdl( LINK( this, DlgExportEPPM, OK ) );
-}
-
-DlgExportEPPM::~DlgExportEPPM()
-{
- delete pConfigItem;
-}
-
-/*************************************************************************
-|*
-|* Speichert eingestellte Werte in ini-Datei
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportEPPM, OK, void *, EMPTYARG )
-{
- // Config-Parameter schreiben
- sal_Int32 nFormat = 0;
- if ( aRBASCII.IsChecked() )
- nFormat++;
- pConfigItem->WriteInt32( String( ResId( KEY_FORMAT, *pMgr ) ), nFormat );
- rFltCallPara.aFilterData = pConfigItem->GetFilterData();
- EndDialog( RET_OK );
-
- return 0;
-}
diff --git a/filter/source/graphicfilter/eppm/dlgeppm.hrc b/filter/source/graphicfilter/eppm/dlgeppm.hrc
deleted file mode 100644
index 876dfa840997..000000000000
--- a/filter/source/graphicfilter/eppm/dlgeppm.hrc
+++ /dev/null
@@ -1,34 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include "filter.hrc"
-
-#define BTN_OK 1
-#define BTN_CANCEL 1
-#define BTN_HELP 1
-#define GRP_FORMAT 1
-#define RB_RAW 1
-#define RB_ASCII 2
diff --git a/filter/source/graphicfilter/eppm/dlgeppm.hxx b/filter/source/graphicfilter/eppm/dlgeppm.hxx
deleted file mode 100644
index a03ca3ad24f0..000000000000
--- a/filter/source/graphicfilter/eppm/dlgeppm.hxx
+++ /dev/null
@@ -1,71 +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 _DLGEPPM_HXX_
-#define _DLGEPPM_HXX_
-#include <svtools/fltcall.hxx>
-#include <vcl/dialog.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/field.hxx>
-#include <svtools/stdctrl.hxx>
-
-
-/*************************************************************************
-|*
-|* Dialog zum Einstellen von Filteroptionen
-|*
-\************************************************************************/
-
-class FilterConfigItem;
-class ResMgr;
-
-class DlgExportEPPM : public ModalDialog
-{
-private:
-
- FltCallDialogParameter& rFltCallPara;
-
- FixedLine aGrpFormat;
- RadioButton aRBRaw;
- RadioButton aRBASCII;
- OKButton aBtnOK;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
-
- FilterConfigItem* pConfigItem;
- ResMgr* pMgr;
-
- DECL_LINK( OK, void * );
-
-public:
- DlgExportEPPM( FltCallDialogParameter& rPara );
- ~DlgExportEPPM();
-};
-
-#endif // _DLGEPPM_HXX_
diff --git a/filter/source/graphicfilter/eppm/dlgeppm.src b/filter/source/graphicfilter/eppm/dlgeppm.src
deleted file mode 100644
index bf6c6ec653cb..000000000000
--- a/filter/source/graphicfilter/eppm/dlgeppm.src
+++ /dev/null
@@ -1,106 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "dlgeppm.hrc"
-ModalDialog DLG_EXPORT_EPPM
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 133 , 63 ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Text [ en-US ] = "PPM Options" ;
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 73 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 73 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 73 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- FixedLine GRP_FORMAT
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 60 , 8 ) ;
- Text [ en-US ] = "File format";
- };
- RadioButton RB_RAW
- {
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 45 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Binary";
- };
- RadioButton RB_ASCII
- {
- Pos = MAP_APPFONT ( 12 , 28 ) ;
- Size = MAP_APPFONT ( 45 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Text";
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/filter/source/graphicfilter/eppm/eppm.cxx b/filter/source/graphicfilter/eppm/eppm.cxx
index d65a81ce98a1..856b2abf352b 100644
--- a/filter/source/graphicfilter/eppm/eppm.cxx
+++ b/filter/source/graphicfilter/eppm/eppm.cxx
@@ -35,9 +35,6 @@
#include <svl/solar.hrc>
#include <svtools/fltcall.hxx>
#include <svtools/FilterConfigItem.hxx>
-#include "strings.hrc"
-#include "dlgeppm.hrc"
-#include "dlgeppm.hxx"
//============================ PPMWriter ==================================
@@ -248,27 +245,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGrap
// ------------------------------------------------------------------------
-extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara )
-{
- BOOL bRet = FALSE;
-
- if ( rPara.pWindow )
- {
- ByteString aResMgrName( "epp" );
- ResMgr* pResMgr;
-
- pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
-
- if( pResMgr )
- {
- rPara.pResMgr = pResMgr;
- bRet = ( DlgExportEPPM( rPara ).Execute() == RET_OK );
- delete pResMgr;
- }
- else
- bRet = TRUE;
- }
-
- return bRet;
-}
-
diff --git a/filter/source/graphicfilter/eppm/eppmstr.src b/filter/source/graphicfilter/eppm/eppmstr.src
deleted file mode 100644
index 8424505dbcd1..000000000000
--- a/filter/source/graphicfilter/eppm/eppmstr.src
+++ /dev/null
@@ -1,35 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#include "strings.hrc"
-
-// Key fuer den Dialog
-String KEY_FORMAT
-{
- Text = "FileFormat";
-};
diff --git a/filter/source/graphicfilter/eppm/exports.map b/filter/source/graphicfilter/eppm/exports.map
index 61e4682c6551..d4e28c44700c 100644
--- a/filter/source/graphicfilter/eppm/exports.map
+++ b/filter/source/graphicfilter/eppm/exports.map
@@ -1,7 +1,6 @@
UDK_3_0_0 {
global:
GraphicExport;
- DoExportDialog;
local:
*;
diff --git a/filter/source/graphicfilter/eppm/makefile.mk b/filter/source/graphicfilter/eppm/makefile.mk
index 44e6ca11d34a..6a41d81f1da6 100644
--- a/filter/source/graphicfilter/eppm/makefile.mk
+++ b/filter/source/graphicfilter/eppm/makefile.mk
@@ -42,17 +42,11 @@ DEPTARGET=veppm
CDEFS+= -DEDITDEBUG
.ENDIF
-SRS1NAME=$(TARGET)
-SRC1FILES= dlgeppm.src \
- eppmstr.src
.IF "$(L10N_framework)"==""
-SLOFILES = $(SLO)$/eppm.obj \
- $(SLO)$/dlgeppm.obj
+SLOFILES = $(SLO)$/eppm.obj
.ENDIF
# ==========================================================================
-RESLIB1NAME=$(TARGET2)
-RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs
.IF "$(L10N_framework)"==""
SHL1TARGET= epp$(DLLPOSTFIX)
SHL1IMPLIB= eppm
diff --git a/filter/source/graphicfilter/eppm/strings.hrc b/filter/source/graphicfilter/eppm/strings.hrc
deleted file mode 100644
index 122719e87d4b..000000000000
--- a/filter/source/graphicfilter/eppm/strings.hrc
+++ /dev/null
@@ -1,27 +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.
- *
- ************************************************************************/
-#define KEY_FORMAT 256
diff --git a/filter/source/graphicfilter/eps/dlgeps.cxx b/filter/source/graphicfilter/eps/dlgeps.cxx
deleted file mode 100644
index c6f2abba5912..000000000000
--- a/filter/source/graphicfilter/eps/dlgeps.cxx
+++ /dev/null
@@ -1,206 +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_filter.hxx"
-#ifndef GCC
-#endif
-
-#include <tools/ref.hxx>
-#include <vcl/msgbox.hxx>
-#include <svtools/FilterConfigItem.hxx>
-#include "dlgeps.hxx"
-#include "dlgeps.hrc"
-#include "strings.hrc"
-
-/*************************************************************************
-|*
-|* Ctor
-|*
-\************************************************************************/
-
-DlgExportEPS::DlgExportEPS( FltCallDialogParameter& rPara ) :
- ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_EPS, *rPara.pResMgr ) ),
- rFltCallPara ( rPara ),
- aGrpPreview ( this, ResId( GRP_PREVIEW, *rPara.pResMgr ) ),
- aCBPreviewTiff ( this, ResId( CB_PREVIEW_TIFF, *rPara.pResMgr ) ),
- aCBPreviewEPSI ( this, ResId( CB_PREVIEW_EPSI, *rPara.pResMgr ) ),
- aGrpVersion ( this, ResId( GRP_VERSION, *rPara.pResMgr ) ),
- aRBLevel1 ( this, ResId( RB_LEVEL1, *rPara.pResMgr ) ),
- aRBLevel2 ( this, ResId( RB_LEVEL2, *rPara.pResMgr ) ),
- aGrpColor ( this, ResId( GRP_COLOR, *rPara.pResMgr ) ),
- aRBColor ( this, ResId( RB_COLOR, *rPara.pResMgr ) ),
- aRBGrayscale ( this, ResId( RB_GRAYSCALE, *rPara.pResMgr ) ),
- aGrpCompression ( this, ResId( GRP_COMPRESSION, *rPara.pResMgr ) ),
- aRBCompressionLZW ( this, ResId( RB_COMPRESSION_LZW, *rPara.pResMgr ) ),
- aRBCompressionNone ( this, ResId( RB_COMPRESSION_NONE, *rPara.pResMgr ) ),
- aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ),
- aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ),
- aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ),
- pMgr ( rPara.pResMgr )
-{
- FreeResource();
-
- String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/EPS" ) );
- pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData );
-
- // Config-Parameter lesen
- String sPreview( RTL_CONSTASCII_USTRINGPARAM( "Preview" ) );
- String sVersion( RTL_CONSTASCII_USTRINGPARAM( "Version" ) );
- String sColorFormat( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) );
- String sCompressionMode( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) );
- String sTextMode( RTL_CONSTASCII_USTRINGPARAM( "TextMode" ) );
-
- sal_Int32 nPreview = pConfigItem->ReadInt32( sPreview, 0 );
- sal_Int32 nVersion = pConfigItem->ReadInt32( sVersion, 2 );
- sal_Int32 nColor = pConfigItem->ReadInt32( sColorFormat, 0 );
- sal_Int32 nCompr = pConfigItem->ReadInt32( sCompressionMode, 2 );
-
- /* SJ: The following line is not superfluous, reading the item will also #106652#
- create the corresponding FilterData Property. Since all filter
- are no longer accessing the configuration itself, we have fill the
- FilterData sequence with all available configuration items */
- pConfigItem->ReadInt32( sTextMode, 0 );
-
- BOOL bCheck = FALSE;
- if ( nPreview & 1 )
- bCheck = TRUE;
- aCBPreviewTiff.Check( bCheck );
- if ( nPreview & 2 )
- bCheck = TRUE;
- aCBPreviewEPSI.Check( bCheck );
-
- bCheck = FALSE;
- if ( nVersion == 1 )
- bCheck ^= TRUE;
- aRBLevel1.Check( bCheck );
- bCheck ^= TRUE;
- aRBLevel2.Check( bCheck );
-
- bCheck = FALSE;
- if ( nColor == 1 )
- bCheck ^= TRUE;
- aRBColor.Check( bCheck );
- bCheck ^= TRUE;
- aRBGrayscale.Check( bCheck );
-
- bCheck = FALSE;
- if ( nCompr == 1 )
- bCheck ^= TRUE;
- aRBCompressionLZW.Check( bCheck );
- bCheck ^= TRUE;
- aRBCompressionNone.Check( bCheck );
-
- if ( aRBLevel1.IsChecked() )
- {
- aRBColor.Disable();
- aRBGrayscale.Disable();
- aRBCompressionNone.Disable();
- aRBCompressionLZW.Disable();
- aRBCompressionNone.Disable();
- }
-
- aBtnOK.SetClickHdl( LINK( this, DlgExportEPS, OK ) );
- aRBLevel1.SetClickHdl( LINK( this, DlgExportEPS, LEVEL1 ) );
- aRBLevel2.SetClickHdl( LINK( this, DlgExportEPS, LEVEL2 ) );
-}
-
-DlgExportEPS::~DlgExportEPS()
-{
- delete pConfigItem;
-}
-
-/*************************************************************************
-|*
-|* Speichert eingestellte Werte in ini-Datei
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportEPS, OK, void *, EMPTYARG )
-{
-
- // Config-Parameter schreiben
- sal_Int32 nCheck = 0;
- if ( aCBPreviewTiff.IsChecked() )
- nCheck++;
- if ( aCBPreviewEPSI.IsChecked() )
- nCheck += 2;
-
- String sPreview( RTL_CONSTASCII_USTRINGPARAM( "Preview" ) );
- pConfigItem->WriteInt32( sPreview, nCheck );
-
- nCheck = 1;
- if ( aRBLevel2.IsChecked() )
- nCheck++;
- String sVersion( RTL_CONSTASCII_USTRINGPARAM( "Version" ) );
- pConfigItem->WriteInt32( sVersion, nCheck );
-
- nCheck = 1;
- if ( aRBGrayscale.IsChecked() )
- nCheck++;
- String sColorFormat( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) );
- pConfigItem->WriteInt32( sColorFormat, nCheck );
-
- nCheck = 1;
- if ( aRBCompressionNone.IsChecked() )
- nCheck++;
- String sCompressionMode( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) );
- pConfigItem->WriteInt32( sCompressionMode, nCheck );
-
- rFltCallPara.aFilterData = pConfigItem->GetFilterData();
- EndDialog( RET_OK );
-
- return 0;
-}
-
-//------------------------------------------------------------------------
-
-IMPL_LINK( DlgExportEPS, LEVEL1, void*, EMPTYARG )
-{
- if ( aRBLevel1.IsChecked() )
- {
- aRBColor.Disable();
- aRBGrayscale.Disable();
- aRBCompressionLZW.Disable();
- aRBCompressionNone.Disable();
- }
- return 0;
-}
-
-//------------------------------------------------------------------------
-
-IMPL_LINK( DlgExportEPS, LEVEL2, void*, EMPTYARG )
-{
- if ( aRBLevel2.IsChecked() )
- {
- aRBColor.Enable();
- aRBGrayscale.Enable();
- aRBCompressionLZW.Enable();
- aRBCompressionNone.Enable();
- }
- return 0;
-}
diff --git a/filter/source/graphicfilter/eps/dlgeps.hrc b/filter/source/graphicfilter/eps/dlgeps.hrc
deleted file mode 100644
index 061c8b2db6cb..000000000000
--- a/filter/source/graphicfilter/eps/dlgeps.hrc
+++ /dev/null
@@ -1,43 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include "filter.hrc"
-
-#define BTN_OK 1
-#define BTN_CANCEL 1
-#define BTN_HELP 1
-#define GRP_PREVIEW 1
-#define GRP_VERSION 2
-#define GRP_COLOR 3
-#define GRP_COMPRESSION 4
-#define CB_PREVIEW_TIFF 1
-#define CB_PREVIEW_EPSI 2
-#define RB_LEVEL1 1
-#define RB_LEVEL2 2
-#define RB_COLOR 3
-#define RB_GRAYSCALE 4
-#define RB_COMPRESSION_LZW 5
-#define RB_COMPRESSION_NONE 6
diff --git a/filter/source/graphicfilter/eps/dlgeps.hxx b/filter/source/graphicfilter/eps/dlgeps.hxx
deleted file mode 100644
index ada390b44e87..000000000000
--- a/filter/source/graphicfilter/eps/dlgeps.hxx
+++ /dev/null
@@ -1,82 +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 _DLGEPS_HXX_
-#define _DLGEPS_HXX_
-#include <svtools/fltcall.hxx>
-#include <vcl/dialog.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/field.hxx>
-#include <vcl/lstbox.hxx>
-#include <svtools/stdctrl.hxx>
-
-
-/*************************************************************************
-|*
-|* Dialog zum Einstellen von Filteroptionen
-|*
-\************************************************************************/
-
-class FilterConfigItem;
-class ResMgr;
-
-class DlgExportEPS : public ModalDialog
-{
-private:
-
- FltCallDialogParameter& rFltCallPara;
-
- FixedLine aGrpPreview;
- CheckBox aCBPreviewTiff;
- CheckBox aCBPreviewEPSI;
- FixedLine aGrpVersion;
- RadioButton aRBLevel1;
- RadioButton aRBLevel2;
- FixedLine aGrpColor;
- RadioButton aRBColor;
- RadioButton aRBGrayscale;
- FixedLine aGrpCompression;
- RadioButton aRBCompressionLZW;
- RadioButton aRBCompressionNone;
- OKButton aBtnOK;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
-
- FilterConfigItem* pConfigItem;
- ResMgr* pMgr;
-
- DECL_LINK( OK, void * );
- DECL_LINK( LEVEL1, void* );
- DECL_LINK( LEVEL2, void* );
-
-public:
- DlgExportEPS( FltCallDialogParameter& rPara );
- ~DlgExportEPS();
-};
-
-#endif // _DLGEPS_HXX_
diff --git a/filter/source/graphicfilter/eps/dlgeps.src b/filter/source/graphicfilter/eps/dlgeps.src
deleted file mode 100644
index 31ddccd5be4f..000000000000
--- a/filter/source/graphicfilter/eps/dlgeps.src
+++ /dev/null
@@ -1,160 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "dlgeps.hrc"
-ModalDialog DLG_EXPORT_EPS
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 230, 161 ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Text [ en-US ] = "EPS Export Options";
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 174 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 174, 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 174 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
-
- FixedLine GRP_PREVIEW
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 162 , 8 ) ;
- Text [ en-US ] = "Preview";
- };
- CheckBox CB_PREVIEW_TIFF
- {
- Pos = MAP_APPFONT ( 12, 14 ) ;
- Size = MAP_APPFONT ( 150 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Image ~preview (TIFF)";
- };
- CheckBox CB_PREVIEW_EPSI
- {
- Pos = MAP_APPFONT ( 12 , 28 ) ;
- Size = MAP_APPFONT ( 150, 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Interchange (EPSI)";
- };
- FixedLine GRP_VERSION
- {
- Pos = MAP_APPFONT ( 6, 41 ) ;
- Size = MAP_APPFONT ( 162 , 8 ) ;
- Text [ en-US ] = "Version";
- };
- RadioButton RB_LEVEL1
- {
- Pos = MAP_APPFONT ( 12 , 52 ) ;
- Size = MAP_APPFONT ( 150 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Level ~1";
- };
- RadioButton RB_LEVEL2
- {
- Pos = MAP_APPFONT ( 12 , 66 ) ;
- Size = MAP_APPFONT ( 150, 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Level ~2";
- };
-
- FixedLine GRP_COLOR
- {
- Pos = MAP_APPFONT ( 6 , 79 ) ;
- Size = MAP_APPFONT ( 162 , 8 ) ;
- Text [ en-US ] = "Color format";
- };
- RadioButton RB_COLOR
- {
- Pos = MAP_APPFONT ( 12 , 90 ) ;
- Size = MAP_APPFONT ( 150, 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Color";
- };
- RadioButton RB_GRAYSCALE
- {
- Pos = MAP_APPFONT ( 12 , 104 ) ;
- Size = MAP_APPFONT ( 150, 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Grayscale";
- };
-
- FixedLine GRP_COMPRESSION
- {
- Pos = MAP_APPFONT ( 6 , 117 ) ;
- Size = MAP_APPFONT ( 162 , 8 ) ;
- Text [ en-US ] = "Compression";
- };
- RadioButton RB_COMPRESSION_LZW
- {
- Pos = MAP_APPFONT ( 12, 128 );
- Size = MAP_APPFONT ( 150, 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "LZW encoding";
- };
- RadioButton RB_COMPRESSION_NONE
- {
- Pos = MAP_APPFONT ( 12, 141 ) ;
- Size = MAP_APPFONT ( 150, 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "None";
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 4db7093e81a5..7c3a26844bc6 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -48,8 +48,6 @@
#include <svtools/FilterConfigItem.hxx>
#include <vcl/graphictools.hxx>
#include "strings.hrc"
-#include "dlgeps.hrc"
-#include "dlgeps.hxx"
#include <math.h>
@@ -2739,29 +2737,3 @@ extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream & rStream, Graphic & rGr
return aPSWriter.WritePS( rGraphic, rStream, pFilterConfigItem );
}
-//---------------------------------------------------------------------------------
-
-extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara )
-{
- BOOL bRet = FALSE;
-
- if ( rPara.pWindow )
- {
- ByteString aResMgrName( "eps" );
- ResMgr* pResMgr;
-
- pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
-
- if( pResMgr )
- {
- rPara.pResMgr = pResMgr;
- bRet = ( DlgExportEPS( rPara ).Execute() == RET_OK );
- delete pResMgr;
- }
- else
- bRet = TRUE;
- }
-
- return bRet;
-}
-
diff --git a/filter/source/graphicfilter/eps/exports.map b/filter/source/graphicfilter/eps/exports.map
index 61e4682c6551..d4e28c44700c 100644
--- a/filter/source/graphicfilter/eps/exports.map
+++ b/filter/source/graphicfilter/eps/exports.map
@@ -1,7 +1,6 @@
UDK_3_0_0 {
global:
GraphicExport;
- DoExportDialog;
local:
*;
diff --git a/filter/source/graphicfilter/eps/makefile.mk b/filter/source/graphicfilter/eps/makefile.mk
index 189972e80e6e..8ed7f1610014 100644
--- a/filter/source/graphicfilter/eps/makefile.mk
+++ b/filter/source/graphicfilter/eps/makefile.mk
@@ -44,12 +44,10 @@ CDEFS+= -DEDITDEBUG
.ENDIF
SRS1NAME=$(TARGET)
-SRC1FILES = dlgeps.src \
- epsstr.src
+SRC1FILES = epsstr.src
.IF "$(L10N_framework)"==""
EXCEPTIONSFILES=$(SLO)$/eps.obj
-SLOFILES = $(SLO)$/eps.obj \
- $(SLO)$/dlgeps.obj
+SLOFILES = $(SLO)$/eps.obj
.ENDIF
# ==========================================================================
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 8115f36d76f8..43f6f1faf2f1 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -791,7 +791,7 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
pPDFExtOutDevData->SetIsReduceImageResolution( mbReduceImageResolution );
pPDFExtOutDevData->SetIsExportNamedDestinations( mbExportBmkToDest );
- Sequence< PropertyValue > aRenderOptions( 6 );
+ Sequence< PropertyValue > aRenderOptions( 5 );
aRenderOptions[ 0 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "RenderDevice" ) );
aRenderOptions[ 0 ].Value <<= Reference< awt::XDevice >( pXDevice );
aRenderOptions[ 1 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotesPages" ) );
@@ -801,10 +801,14 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
aRenderOptions[ 2 ].Value <<= sal_True;
aRenderOptions[ 3 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsLastPage" ) );
aRenderOptions[ 3 ].Value <<= sal_False;
- aRenderOptions[ 4 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) );
- aRenderOptions[ 4 ].Value <<= aPageRange;
- aRenderOptions[ 5 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages" ) );
- aRenderOptions[ 5 ].Value <<= mbSkipEmptyPages;
+ aRenderOptions[ 4 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages" ) );
+ aRenderOptions[ 4 ].Value <<= mbSkipEmptyPages;
+ #if 0
+ // #i113919# writer has to begun "PageRange" for itself changing its renderer count
+ // we should unify this behavior but not for OOo 3.3
+ aRenderOptions[ 5 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) );
+ aRenderOptions[ 5 ].Value <<= aPageRange;
+ #endif
if( aPageRange.getLength() || !aSelection.hasValue() )
{
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 148e4c9aa298..f9d3ffab9709 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -507,14 +507,12 @@ DBG_NAME(OControlModel)
//------------------------------------------------------------------
Sequence<sal_Int8> SAL_CALL OControlModel::getImplementationId() throw(RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getImplementationId" );
return OImplementationIds::getImplementationId(getTypes());
}
//------------------------------------------------------------------
Sequence<Type> SAL_CALL OControlModel::getTypes() throw(RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getTypes" );
TypeBag aTypes( _getTypes() );
Reference< XTypeProvider > xProv;
@@ -527,7 +525,6 @@ Sequence<Type> SAL_CALL OControlModel::getTypes() throw(RuntimeException)
//------------------------------------------------------------------------------
Sequence<Type> OControlModel::_getTypes()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::_getTypes" );
return TypeBag( OComponentHelper::getTypes(),
OPropertySetAggregationHelper::getTypes(),
OControlModel_BASE::getTypes()
@@ -537,7 +534,6 @@ Sequence<Type> OControlModel::_getTypes()
//------------------------------------------------------------------
Any SAL_CALL OControlModel::queryAggregation(const Type& _rType) throw (RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::queryAggregation" );
// base class 1
Any aReturn(OComponentHelper::queryAggregation(_rType));
@@ -561,7 +557,6 @@ Any SAL_CALL OControlModel::queryAggregation(const Type& _rType) throw (RuntimeE
//------------------------------------------------------------------------------
void OControlModel::readHelpTextCompatibly(const staruno::Reference< stario::XObjectInputStream >& _rxInStream)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::readHelpTextCompatibly" );
::rtl::OUString sHelpText;
::comphelper::operator>>( _rxInStream, sHelpText);
try
@@ -578,7 +573,6 @@ void OControlModel::readHelpTextCompatibly(const staruno::Reference< stario::XOb
//------------------------------------------------------------------------------
void OControlModel::writeHelpTextCompatibly(const staruno::Reference< stario::XObjectOutputStream >& _rxOutStream)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::writeHelpTextCompatibly" );
::rtl::OUString sHelpText;
try
{
@@ -609,7 +603,6 @@ OControlModel::OControlModel(
// the native look is ugly ....
// #i37342# / 2004-11-19 / frank.schoenheit@sun.com
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::OControlModel" );
DBG_CTOR(OControlModel, NULL);
if (_rUnoControlModelTypeName.getLength()) // the is a model we have to aggregate
{
@@ -651,7 +644,6 @@ OControlModel::OControlModel( const OControlModel* _pOriginal, const Reference<
,m_nTabIndex( FRM_DEFAULT_TABINDEX )
,m_nClassId( FormComponentType::CONTROL )
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::OControlModel(copy)" );
DBG_CTOR( OControlModel, NULL );
DBG_ASSERT( _pOriginal, "OControlModel::OControlModel: invalid original!" );
@@ -696,14 +688,12 @@ OControlModel::~OControlModel()
//------------------------------------------------------------------
void OControlModel::clonedFrom( const OControlModel* /*_pOriginal*/ )
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::clonedFrom" );
// nothing to do in this base class
}
//------------------------------------------------------------------------------
void OControlModel::doResetDelegator()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::doResetDelegator" );
if (m_xAggregate.is())
m_xAggregate->setDelegator(NULL);
}
@@ -711,7 +701,6 @@ void OControlModel::doResetDelegator()
//------------------------------------------------------------------------------
void OControlModel::doSetDelegator()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::doSetDelegator" );
increment(m_refCount);
if (m_xAggregate.is())
{
@@ -724,14 +713,12 @@ void OControlModel::doSetDelegator()
//------------------------------------------------------------------------------
InterfaceRef SAL_CALL OControlModel::getParent() throw(RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getParent" );
return m_xParent;
}
//------------------------------------------------------------------------------
void SAL_CALL OControlModel::setParent(const InterfaceRef& _rxParent) throw(com::sun::star::lang::NoSupportException, RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::setParent" );
osl::MutexGuard aGuard(m_aMutex);
Reference<XComponent> xComp(m_xParent, UNO_QUERY);
@@ -749,7 +736,6 @@ void SAL_CALL OControlModel::setParent(const InterfaceRef& _rxParent) throw(com:
//------------------------------------------------------------------------------
::rtl::OUString SAL_CALL OControlModel::getName() throw(RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getName" );
::rtl::OUString aReturn;
OPropertySetHelper::getFastPropertyValue(PROPERTY_ID_NAME) >>= aReturn;
return aReturn;
@@ -758,7 +744,6 @@ void SAL_CALL OControlModel::setParent(const InterfaceRef& _rxParent) throw(com:
//------------------------------------------------------------------------------
void SAL_CALL OControlModel::setName(const ::rtl::OUString& _rName) throw(RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::setName" );
setFastPropertyValue(PROPERTY_ID_NAME, makeAny(_rName));
}
@@ -766,7 +751,6 @@ void SAL_CALL OControlModel::setName(const ::rtl::OUString& _rName) throw(Runtim
//------------------------------------------------------------------------------
sal_Bool SAL_CALL OControlModel::supportsService(const rtl::OUString& _rServiceName) throw ( RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::supportsService" );
Sequence<rtl::OUString> aSupported = getSupportedServiceNames();
const rtl::OUString* pSupported = aSupported.getConstArray();
for (sal_Int32 i=0; i<aSupported.getLength(); ++i, ++pSupported)
@@ -778,7 +762,6 @@ sal_Bool SAL_CALL OControlModel::supportsService(const rtl::OUString& _rServiceN
//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OControlModel::getAggregateServiceNames()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getAggregateServiceNames" );
Sequence< ::rtl::OUString > aAggServices;
Reference< XServiceInfo > xInfo;
if ( query_aggregation( m_xAggregate, xInfo ) )
@@ -789,7 +772,6 @@ Sequence< ::rtl::OUString > OControlModel::getAggregateServiceNames()
//------------------------------------------------------------------------------
Sequence<rtl::OUString> SAL_CALL OControlModel::getSupportedServiceNames() throw(RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getSupportedServiceNames" );
return ::comphelper::concatSequences(
getAggregateServiceNames(),
getSupportedServiceNames_Static()
@@ -799,7 +781,6 @@ Sequence<rtl::OUString> SAL_CALL OControlModel::getSupportedServiceNames() throw
//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL OControlModel::getSupportedServiceNames_Static() throw( RuntimeException )
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getSupportedServiceNames_Static" );
Sequence< ::rtl::OUString > aServiceNames( 2 );
aServiceNames[ 0 ] = FRM_SUN_FORMCOMPONENT;
aServiceNames[ 1 ] = ::rtl::OUString::createFromAscii( "com.sun.star.form.FormControlModel" );
@@ -810,7 +791,6 @@ Sequence< ::rtl::OUString > SAL_CALL OControlModel::getSupportedServiceNames_Sta
//------------------------------------------------------------------------------
void SAL_CALL OControlModel::disposing(const com::sun::star::lang::EventObject& _rSource) throw (RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::disposing" );
// release the parent
if (_rSource.Source == m_xParent)
{
@@ -832,7 +812,6 @@ void SAL_CALL OControlModel::disposing(const com::sun::star::lang::EventObject&
//-----------------------------------------------------------------------------
void OControlModel::disposing()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::disposing" );
OPropertySetAggregationHelper::disposing();
Reference<com::sun::star::lang::XComponent> xComp;
@@ -847,7 +826,6 @@ void OControlModel::disposing()
//------------------------------------------------------------------------------
void OControlModel::writeAggregate( const Reference< XObjectOutputStream >& _rxOutStream ) const
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::writeAggregate" );
Reference< XPersistObject > xPersist;
if ( query_aggregation( m_xAggregate, xPersist ) )
xPersist->write( _rxOutStream );
@@ -856,7 +834,6 @@ void OControlModel::writeAggregate( const Reference< XObjectOutputStream >& _rxO
//------------------------------------------------------------------------------
void OControlModel::readAggregate( const Reference< XObjectInputStream >& _rxInStream )
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::readAggregate" );
Reference< XPersistObject > xPersist;
if ( query_aggregation( m_xAggregate, xPersist ) )
xPersist->read( _rxInStream );
@@ -866,7 +843,6 @@ void OControlModel::readAggregate( const Reference< XObjectInputStream >& _rxInS
void SAL_CALL OControlModel::write(const Reference<stario::XObjectOutputStream>& _rxOutStream)
throw(stario::IOException, RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::write" );
osl::MutexGuard aGuard(m_aMutex);
// 1. Schreiben des UnoControls
@@ -912,7 +888,6 @@ void SAL_CALL OControlModel::write(const Reference<stario::XObjectOutputStream>&
//------------------------------------------------------------------------------
void OControlModel::read(const Reference<stario::XObjectInputStream>& InStream) throw (::com::sun::star::io::IOException, RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::read" );
osl::MutexGuard aGuard(m_aMutex);
Reference<stario::XMarkableStream> xMark(InStream, UNO_QUERY);
@@ -966,7 +941,6 @@ void OControlModel::read(const Reference<stario::XObjectInputStream>& InStream)
//------------------------------------------------------------------------------
PropertyState OControlModel::getPropertyStateByHandle( sal_Int32 _nHandle )
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getPropertyStateByHandle" );
// simply compare the current and the default value
Any aCurrentValue = getPropertyDefaultByHandle( _nHandle );
Any aDefaultValue; getFastPropertyValue( aDefaultValue, _nHandle );
@@ -983,7 +957,6 @@ PropertyState OControlModel::getPropertyStateByHandle( sal_Int32 _nHandle )
//------------------------------------------------------------------------------
void OControlModel::setPropertyToDefaultByHandle( sal_Int32 _nHandle)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::setPropertyToDefaultByHandle" );
Any aDefault = getPropertyDefaultByHandle( _nHandle );
Any aConvertedValue, aOldValue;
@@ -997,7 +970,6 @@ void OControlModel::setPropertyToDefaultByHandle( sal_Int32 _nHandle)
//------------------------------------------------------------------------------
Any OControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getPropertyDefaultByHandle" );
Any aReturn;
switch ( _nHandle )
{
@@ -1030,7 +1002,6 @@ Any OControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
//------------------------------------------------------------------------------
void OControlModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getFastPropertyValue" );
switch ( _nHandle )
{
case PROPERTY_ID_NAME:
@@ -1062,7 +1033,6 @@ sal_Bool OControlModel::convertFastPropertyValue(
Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue)
throw (com::sun::star::lang::IllegalArgumentException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::convertFastPropertyValue" );
sal_Bool bModified(sal_False);
switch (_nHandle)
{
@@ -1092,7 +1062,6 @@ sal_Bool OControlModel::convertFastPropertyValue(
void OControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const Any& _rValue)
throw (Exception)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::setFastPropertyValue_NoBroadcast" );
switch (_nHandle)
{
case PROPERTY_ID_NAME:
@@ -1125,7 +1094,6 @@ void OControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const A
//------------------------------------------------------------------------------
void OControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::describeFixedProperties" );
BEGIN_DESCRIBE_BASE_PROPERTIES( 4 )
DECL_PROP2 (CLASSID, sal_Int16, READONLY, TRANSIENT);
DECL_PROP1 (NAME, ::rtl::OUString, BOUND);
@@ -1137,7 +1105,6 @@ void OControlModel::describeFixedProperties( Sequence< Property >& _rProps ) con
//------------------------------------------------------------------------------
void OControlModel::describeAggregateProperties( Sequence< Property >& /* [out] */ _rAggregateProps ) const
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::describeAggregateProperties" );
if ( m_xAggregateSet.is() )
{
Reference< XPropertySetInfo > xPSI( m_xAggregateSet->getPropertySetInfo() );
@@ -1149,14 +1116,12 @@ void OControlModel::describeAggregateProperties( Sequence< Property >& /* [out]
//------------------------------------------------------------------------------
::osl::Mutex& OControlModel::getMutex()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getMutex" );
return m_aMutex;
}
//------------------------------------------------------------------------------
void OControlModel::describeFixedAndAggregateProperties( Sequence< Property >& _out_rFixedProperties, Sequence< Property >& _out_rAggregateProperties ) const
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::describeFixedAndAggregateProperties" );
describeFixedProperties( _out_rFixedProperties );
describeAggregateProperties( _out_rAggregateProperties );
}
@@ -1164,49 +1129,42 @@ void OControlModel::describeFixedAndAggregateProperties( Sequence< Property >& _
//------------------------------------------------------------------------------
Reference< XMultiPropertySet > OControlModel::getPropertiesInterface()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getPropertiesInterface" );
return Reference< XMultiPropertySet >( *this, UNO_QUERY );
}
//------------------------------------------------------------------------------
Reference< XPropertySetInfo> SAL_CALL OControlModel::getPropertySetInfo() throw( RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getPropertySetInfo" );
return createPropertySetInfo( getInfoHelper() );
}
//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OControlModel::getInfoHelper()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getInfoHelper" );
return m_aPropertyBagHelper.getInfoHelper();
}
//--------------------------------------------------------------------
void SAL_CALL OControlModel::addProperty( const ::rtl::OUString& _rName, ::sal_Int16 _nAttributes, const Any& _rInitialValue ) throw (PropertyExistException, IllegalTypeException, IllegalArgumentException, RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::addProperty" );
m_aPropertyBagHelper.addProperty( _rName, _nAttributes, _rInitialValue );
}
//--------------------------------------------------------------------
void SAL_CALL OControlModel::removeProperty( const ::rtl::OUString& _rName ) throw (UnknownPropertyException, NotRemoveableException, RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::removeProperty" );
m_aPropertyBagHelper.removeProperty( _rName );
}
//--------------------------------------------------------------------
Sequence< PropertyValue > SAL_CALL OControlModel::getPropertyValues() throw (RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getPropertyValues" );
return m_aPropertyBagHelper.getPropertyValues();
}
//--------------------------------------------------------------------
void SAL_CALL OControlModel::setPropertyValues( const Sequence< PropertyValue >& _rProps ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::setPropertyValues" );
m_aPropertyBagHelper.setPropertyValues( _rProps );
}
@@ -1249,7 +1207,6 @@ Any SAL_CALL OBoundControlModel::queryAggregation( const Type& _rType ) throw (R
Any aReturn( OControlModel::queryAggregation(_rType) );
if (!aReturn.hasValue())
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::queryAggregation" );
aReturn = OBoundControlModel_BASE1::queryInterface(_rType);
if ( !aReturn.hasValue() && m_bCommitable )
@@ -1427,10 +1384,19 @@ void OBoundControlModel::implInitValuePropertyListening( ) const
}
//-----------------------------------------------------------------------------
+void OBoundControlModel::initOwnValueProperty( const ::rtl::OUString& i_rValuePropertyName )
+{
+ OSL_PRECOND( !m_sValuePropertyName.getLength() && -1 == m_nValuePropertyAggregateHandle,
+ "OBoundControlModel::initOwnValueProperty: value property is already initialized!" );
+ OSL_ENSURE( i_rValuePropertyName.getLength(), "OBoundControlModel::initOwnValueProperty: invalid property name!" );
+ m_sValuePropertyName = i_rValuePropertyName;
+}
+
+//-----------------------------------------------------------------------------
void OBoundControlModel::initValueProperty( const ::rtl::OUString& _rValuePropertyName, sal_Int32 _nValuePropertyExternalHandle )
{
OSL_PRECOND( !m_sValuePropertyName.getLength() && -1 == m_nValuePropertyAggregateHandle,
- "OBoundControlModel::initValueProperty: already called before!" );
+ "OBoundControlModel::initValueProperty: value property is already initialized!" );
OSL_ENSURE( _rValuePropertyName.getLength(), "OBoundControlModel::initValueProperty: invalid property name!" );
OSL_ENSURE( _nValuePropertyExternalHandle != -1, "OBoundControlModel::initValueProperty: invalid property handle!" );
@@ -1495,7 +1461,6 @@ Sequence< Type > OBoundControlModel::_getTypes()
//-----------------------------------------------------------------------------
void OBoundControlModel::disposing()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::_getTypes" );
OControlModel::disposing();
::osl::ClearableMutexGuard aGuard(m_aMutex);
@@ -1533,6 +1498,29 @@ void OBoundControlModel::disposing()
}
//------------------------------------------------------------------------------
+void OBoundControlModel::onValuePropertyChange( ControlModelLock& i_rControLock )
+{
+ if ( hasExternalValueBinding() )
+ { // the control value changed, while we have an external value binding
+ // -> forward the value to it
+ if ( m_eControlValueChangeInstigator != eExternalBinding )
+ transferControlValueToExternal( i_rControLock );
+ }
+ else if ( !m_bCommitable && m_xColumnUpdate.is() )
+ { // the control value changed, while we are bound to a database column,
+ // but not committable (which means changes in the control have to be reflected to
+ // the underlying database column immediately)
+ // -> forward the value to the database column
+ if ( m_eControlValueChangeInstigator != eDbColumnBinding )
+ commitControlValueToDbColumn( false );
+ }
+
+ // validate the new value
+ if ( m_bSupportsValidation )
+ recheckValidity( true );
+}
+
+//------------------------------------------------------------------------------
void OBoundControlModel::_propertyChanged( const PropertyChangeEvent& _rEvt ) throw ( RuntimeException )
{
ControlModelLock aLock( *this );
@@ -1543,26 +1531,8 @@ void OBoundControlModel::_propertyChanged( const PropertyChangeEvent& _rEvt ) th
"OBoundControlModel::_propertyChanged: where did this come from (2)?" );
if ( _rEvt.PropertyName == m_sValuePropertyName )
- { // our control value changed
-
- if ( hasExternalValueBinding() )
- { // the control value changed, while we have an external value binding
- // -> forward the value to it
- if ( m_eControlValueChangeInstigator != eExternalBinding )
- transferControlValueToExternal( aLock );
- }
- else if ( !m_bCommitable && m_xColumnUpdate.is() )
- { // the control value changed, while we are bound to a database column,
- // but not committable (which means changes in the control have to be reflected to
- // the underlying database column immediately)
- // -> forward the value to the database column
- if ( m_eControlValueChangeInstigator != eDbColumnBinding )
- commitControlValueToDbColumn( false );
- }
-
- // validate the new value
- if ( m_bSupportsValidation )
- recheckValidity( true );
+ {
+ onValuePropertyChange( aLock );
}
}
@@ -1673,7 +1643,6 @@ void SAL_CALL OBoundControlModel::disposing(const com::sun::star::lang::EventObj
//------------------------------------------------------------------------------
StringSequence SAL_CALL OBoundControlModel::getSupportedServiceNames() throw(RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::disposing" );
return ::comphelper::concatSequences(
getAggregateServiceNames(),
getSupportedServiceNames_Static()
@@ -1696,7 +1665,6 @@ Sequence< ::rtl::OUString > SAL_CALL OBoundControlModel::getSupportedServiceName
//------------------------------------------------------------------------------
void SAL_CALL OBoundControlModel::write( const Reference<stario::XObjectOutputStream>& _rxOutStream ) throw(stario::IOException, RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getSupportedServiceNames_Static" );
OControlModel::write(_rxOutStream);
osl::MutexGuard aGuard(m_aMutex);
@@ -1797,7 +1765,6 @@ void SAL_CALL OBoundControlModel::read( const Reference< stario::XObjectInputStr
//------------------------------------------------------------------------------
void OBoundControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) const
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OBoundControlModel::getFastPropertyValue" );
switch (nHandle)
{
case PROPERTY_ID_INPUT_REQUIRED:
@@ -1866,7 +1833,6 @@ sal_Bool OBoundControlModel::convertFastPropertyValue(
//------------------------------------------------------------------------------
Any OBoundControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::convertFastPropertyValue" );
Any aDefault;
switch ( _nHandle )
{
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index f74e82135708..3a7e05404d75 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -151,11 +151,14 @@ OImageControlModel::OImageControlModel(const Reference<XMultiServiceFactory>& _r
:OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_IMAGECONTROL, FRM_SUN_CONTROL_IMAGECONTROL, sal_False, sal_False, sal_False )
// use the old control name for compytibility reasons
,m_pImageProducer( NULL )
+ ,m_bExternalGraphic( true )
,m_bReadOnly( sal_False )
+ ,m_sImageURL()
+ ,m_xGraphicObject()
{
DBG_CTOR( OImageControlModel, NULL );
m_nClassId = FormComponentType::IMAGECONTROL;
- initValueProperty( PROPERTY_IMAGE_URL, PROPERTY_ID_IMAGE_URL);
+ initOwnValueProperty( PROPERTY_IMAGE_URL );
implConstruct();
}
@@ -165,22 +168,20 @@ OImageControlModel::OImageControlModel( const OImageControlModel* _pOriginal, co
:OBoundControlModel( _pOriginal, _rxFactory )
// use the old control name for compytibility reasons
,m_pImageProducer( NULL )
+ ,m_bExternalGraphic( true )
+ ,m_bReadOnly( _pOriginal->m_bReadOnly )
+ ,m_sImageURL( _pOriginal->m_sImageURL )
+ ,m_xGraphicObject( _pOriginal->m_xGraphicObject )
{
DBG_CTOR( OImageControlModel, NULL );
implConstruct();
- m_bReadOnly = _pOriginal->m_bReadOnly;
osl_incrementInterlockedCount( &m_refCount );
{
// simulate a propertyChanged event for the ImageURL
// 2003-05-15 - #109591# - fs@openoffice.org
- Any aImageURL;
- getFastPropertyValue( aImageURL, PROPERTY_ID_IMAGE_URL );
- ::rtl::OUString sImageURL;
- aImageURL >>= sImageURL;
-
::osl::MutexGuard aGuard( m_aMutex );
- impl_handleNewImageURL_lck( sImageURL, eOther );
+ impl_handleNewImageURL_lck( eOther );
}
osl_decrementInterlockedCount( &m_refCount );
}
@@ -244,32 +245,20 @@ sal_Bool OImageControlModel::approveDbColumnType( sal_Int32 _nColumnType )
return ImageStoreInvalid != lcl_getImageStoreType( _nColumnType );
}
-
-//------------------------------------------------------------------------------
-void OImageControlModel::_propertyChanged( const PropertyChangeEvent& _rEvent )
- throw( RuntimeException )
-{
- if ( m_xColumnUpdate.is() )
- {
- OBoundControlModel::_propertyChanged( _rEvent );
- }
- else
- { // we're not bound. In this case, we have to manually care for updating the
- // image producer, since the base class will not do this
- ::rtl::OUString sImageURL;
- _rEvent.NewValue >>= sImageURL;
-
- ::osl::MutexGuard aGuard( m_aMutex );
- impl_handleNewImageURL_lck( sImageURL, eOther );
- }
-}
-
//------------------------------------------------------------------------------
void OImageControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) const
{
switch (nHandle)
{
- case PROPERTY_ID_READONLY : rValue <<= (sal_Bool)m_bReadOnly; break;
+ case PROPERTY_ID_READONLY:
+ rValue <<= (sal_Bool)m_bReadOnly;
+ break;
+ case PROPERTY_ID_IMAGE_URL:
+ rValue <<= m_sImageURL;
+ break;
+ case PROPERTY_ID_GRAPHIC:
+ rValue <<= m_xGraphicObject.is() ? m_xGraphicObject->getGraphic() : Reference< XGraphic >();
+ break;
default:
OBoundControlModel::getFastPropertyValue(rValue, nHandle);
}
@@ -285,8 +274,51 @@ void OImageControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, con
m_bReadOnly = getBOOL(rValue);
break;
+ case PROPERTY_ID_IMAGE_URL:
+ OSL_VERIFY( rValue >>= m_sImageURL );
+ impl_handleNewImageURL_lck( eOther );
+ {
+ ControlModelLock aLock( *this );
+ // that's a fake ... onValuePropertyChange expects to receive the only lock to our instance,
+ // but we're already called with our mutex locked ...
+ onValuePropertyChange( aLock );
+ }
+ break;
+
+ case PROPERTY_ID_GRAPHIC:
+ {
+ Reference< XGraphic > xGraphic;
+ OSL_VERIFY( rValue >>= xGraphic );
+ if ( !xGraphic.is() )
+ m_xGraphicObject.clear();
+ else
+ {
+ m_xGraphicObject = GraphicObject::create( m_aContext.getUNOContext() );
+ m_xGraphicObject->setGraphic( xGraphic );
+ }
+
+ if ( m_bExternalGraphic )
+ {
+ // if that's an external graphic, i.e. one which has not been loaded by ourselves in response to a
+ // new image URL, then also adjust our ImageURL.
+ ::rtl::OUString sNewImageURL;
+ if ( m_xGraphicObject.is() )
+ {
+ sNewImageURL = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.GraphicObject:" ) );
+ sNewImageURL = sNewImageURL + m_xGraphicObject->getUniqueID();
+ }
+ m_sImageURL = sNewImageURL;
+ // TODO: speaking strictly, this would need to be notified, since ImageURL is a bound property. However,
+ // this method here is called with a locked mutex, so we cannot simply call listeners ...
+ // I think the missing notification (and thus clients which potentially cannot observe the change)
+ // is less severe than the potential deadlock ...
+ }
+ }
+ break;
+
default:
OBoundControlModel::setFastPropertyValue_NoBroadcast(nHandle, rValue);
+ break;
}
}
@@ -299,6 +331,15 @@ sal_Bool OImageControlModel::convertFastPropertyValue(Any& rConvertedValue, Any&
case PROPERTY_ID_READONLY :
return tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bReadOnly);
+ case PROPERTY_ID_IMAGE_URL:
+ return tryPropertyValue( rConvertedValue, rOldValue, rValue, m_sImageURL );
+
+ case PROPERTY_ID_GRAPHIC:
+ {
+ const Reference< XGraphic > xGraphic( getFastPropertyValue( PROPERTY_ID_GRAPHIC ), UNO_QUERY );
+ return tryPropertyValue( rConvertedValue, rOldValue, rValue, xGraphic );
+ }
+
default:
return OBoundControlModel::convertFastPropertyValue(rConvertedValue, rOldValue, nHandle, rValue);
}
@@ -307,13 +348,25 @@ sal_Bool OImageControlModel::convertFastPropertyValue(Any& rConvertedValue, Any&
//------------------------------------------------------------------------------
void OImageControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
- BEGIN_DESCRIBE_PROPERTIES( 2, OBoundControlModel )
- DECL_BOOL_PROP1 ( READONLY, BOUND );
- DECL_PROP1 ( TABINDEX, sal_Int16, BOUND );
+ BEGIN_DESCRIBE_PROPERTIES( 4, OBoundControlModel )
+ DECL_IFACE_PROP2( GRAPHIC, XGraphic, BOUND, TRANSIENT );
+ DECL_PROP1 ( IMAGE_URL, ::rtl::OUString, BOUND );
+ DECL_BOOL_PROP1 ( READONLY, BOUND );
+ DECL_PROP1 ( TABINDEX, sal_Int16, BOUND );
END_DESCRIBE_PROPERTIES();
}
//------------------------------------------------------------------------------
+void OImageControlModel::describeAggregateProperties( Sequence< Property >& /* [out] */ o_rAggregateProperties ) const
+{
+ OBoundControlModel::describeAggregateProperties( o_rAggregateProperties );
+ // remove ImageULR and Graphic properties, we "overload" them. This is because our aggregate synchronizes those
+ // two, but we have an own sychronization mechanism.
+ RemoveProperty( o_rAggregateProperties, PROPERTY_IMAGE_URL );
+ RemoveProperty( o_rAggregateProperties, PROPERTY_GRAPHIC );
+}
+
+//------------------------------------------------------------------------------
::rtl::OUString OImageControlModel::getServiceName() throw ( ::com::sun::star::uno::RuntimeException)
{
return FRM_COMPONENT_IMAGECONTROL; // old (non-sun) name for compatibility !
@@ -411,18 +464,18 @@ sal_Bool OImageControlModel::impl_updateStreamForURL_lck( const ::rtl::OUString&
}
//------------------------------------------------------------------------------
-sal_Bool OImageControlModel::impl_handleNewImageURL_lck( const ::rtl::OUString& _rURL, ValueChangeInstigator _eInstigator )
+sal_Bool OImageControlModel::impl_handleNewImageURL_lck( ValueChangeInstigator _eInstigator )
{
switch ( lcl_getImageStoreType( getFieldType() ) )
{
case ImageStoreBinary:
- if ( impl_updateStreamForURL_lck( _rURL, _eInstigator ) )
+ if ( impl_updateStreamForURL_lck( m_sImageURL, _eInstigator ) )
return sal_True;
break;
case ImageStoreLink:
{
- ::rtl::OUString sCommitURL( _rURL );
+ ::rtl::OUString sCommitURL( m_sImageURL );
if ( m_sDocumentURL.getLength() )
sCommitURL = URIHelper::simpleNormalizedMakeRelative( m_sDocumentURL, sCommitURL );
OSL_ENSURE( m_xColumnUpdate.is(), "OImageControlModel::impl_handleNewImageURL_lck: no bound field, but ImageStoreLink?!" );
@@ -435,7 +488,7 @@ sal_Bool OImageControlModel::impl_handleNewImageURL_lck( const ::rtl::OUString&
break;
case ImageStoreInvalid:
- OSL_ENSURE( false, "OImageControlModel::impl_handleNewImageURL_lck: invalid current field type!" );
+ OSL_ENSURE( false, "OImageControlModel::impl_handleNewImageURL_lck: image storage type type!" );
break;
}
@@ -462,10 +515,7 @@ sal_Bool OImageControlModel::commitControlValueToDbColumn( bool _bPostReset )
else
{
::osl::MutexGuard aGuard(m_aMutex);
-
- ::rtl::OUString sImageURL;
- m_xAggregateSet->getPropertyValue( PROPERTY_IMAGE_URL ) >>= sImageURL;
- return impl_handleNewImageURL_lck( sImageURL, eDbColumnBinding );
+ return impl_handleNewImageURL_lck( eDbColumnBinding );
}
return sal_True;
@@ -523,7 +573,13 @@ Any OImageControlModel::translateDbColumnToControlValue()
{
switch ( lcl_getImageStoreType( getFieldType() ) )
{
- case ImageStoreBinary: return makeAny( m_xColumn->getBinaryStream() );
+ case ImageStoreBinary:
+ {
+ Reference< XInputStream > xImageStream( m_xColumn->getBinaryStream() );
+ if ( m_xColumn->wasNull() )
+ xImageStream.clear();
+ return makeAny( xImageStream );
+ }
case ImageStoreLink:
{
::rtl::OUString sImageLink( m_xColumn->getString() );
@@ -539,6 +595,12 @@ Any OImageControlModel::translateDbColumnToControlValue()
}
//------------------------------------------------------------------------------
+Any OImageControlModel::getControlValue( ) const
+{
+ return makeAny( m_sImageURL );
+}
+
+//------------------------------------------------------------------------------
void OImageControlModel::doSetControlValue( const Any& _rValue )
{
DBG_ASSERT( GetImageProducer() && m_xImageProducer.is(), "OImageControlModel::doSetControlValue: no image producer!" );
@@ -593,11 +655,6 @@ void OImageControlModel::doSetControlValue( const Any& _rValue )
void SAL_CALL OImageControlModel::disposing()
{
OBoundControlModel::disposing();
-
- {
- ::osl::MutexGuard aGuard( m_aMutex ); // setControlValue expects this
- setControlValue( Any(), eOther );
- }
}
//------------------------------------------------------------------------------
@@ -634,11 +691,17 @@ void SAL_CALL OImageControlModel::startProduction( ) throw (RuntimeException)
//------------------------------------------------------------------------------
IMPL_LINK( OImageControlModel, OnImageImportDone, ::Graphic*, i_pGraphic )
{
- ENSURE_OR_RETURN( i_pGraphic, "OImageControlModel::OnImageImportDone: illegal graphic!", 0L );
- setPropertyValue(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Graphic" ) ),
- makeAny( Image( i_pGraphic->GetBitmapEx() ).GetXGraphic() )
- );
+ const Reference< XGraphic > xGraphic( i_pGraphic != NULL ? Image( i_pGraphic->GetBitmapEx() ).GetXGraphic() : NULL );
+ m_bExternalGraphic = false;
+ try
+ {
+ setPropertyValue( PROPERTY_GRAPHIC, makeAny( xGraphic ) );
+ }
+ catch ( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ m_bExternalGraphic = true;
return 1L;
}
@@ -794,16 +857,16 @@ bool OImageControlControl::implInsertGraphics()
implClearGraphics( sal_False );
sal_Bool bIsLink = sal_False;
xController->getValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0) >>= bIsLink;
+ // Force bIsLink to be TRUE if we're bound to a field. Though we initialized the file picker with IsLink=TRUE
+ // in this case, and disabled the respective control, there might be picker implementations which do not
+ // respect this, and return IsLink=FALSE here. In this case, "normalize" the flag.
+ // #i112659# / 2010-08-26 / frank.schoenheit@oracle.com
+ bIsLink |= bHasField;
if ( !bIsLink )
{
Graphic aGraphic;
aDialog.GetGraphic( aGraphic );
-
- Reference< graphic::XGraphicObject > xGrfObj = graphic::GraphicObject::create( m_aContext.getUNOContext() );
- xGrfObj->setGraphic( aGraphic.GetXGraphic() );
- rtl::OUString sObjectID( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.GraphicObject:" ) );
- sObjectID = sObjectID + xGrfObj->getUniqueID();
- xSet->setPropertyValue( PROPERTY_IMAGE_URL, makeAny( ::rtl::OUString( sObjectID ) ) );
+ xSet->setPropertyValue( PROPERTY_GRAPHIC, makeAny( aGraphic.GetXGraphic() ) );
}
else
xSet->setPropertyValue( PROPERTY_IMAGE_URL, makeAny( ::rtl::OUString( aDialog.GetPath() ) ) );
diff --git a/forms/source/component/ImageControl.hxx b/forms/source/component/ImageControl.hxx
index c31216fc8aca..853c4aadffbf 100644
--- a/forms/source/component/ImageControl.hxx
+++ b/forms/source/component/ImageControl.hxx
@@ -33,6 +33,7 @@
#include <com/sun/star/form/XImageProducerSupplier.hpp>
#include <com/sun/star/awt/XMouseListener.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/graphic/XGraphicObject.hpp>
#include <comphelper/propmultiplex.hxx>
#include <comphelper/implementationreference.hxx>
#include <cppuhelper/implbase2.hxx>
@@ -57,7 +58,11 @@ class OImageControlModel
{
::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageProducer> m_xImageProducer;
ImageProducer* m_pImageProducer;
+ bool m_bExternalGraphic;
sal_Bool m_bReadOnly;
+ ::rtl::OUString m_sImageURL;
+ ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject >
+ m_xGraphicObject;
::rtl::OUString m_sDocumentURL;
protected:
@@ -86,9 +91,6 @@ public:
// OComponentHelper
virtual void SAL_CALL disposing();
- // OPropertyChangeListener
- virtual void _propertyChanged( const ::com::sun::star::beans::PropertyChangeEvent& ) throw(::com::sun::star::uno::RuntimeException);
-
// XPersistObject
virtual ::rtl::OUString SAL_CALL getServiceName() throw ( ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL write(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
@@ -103,6 +105,9 @@ public:
virtual void SAL_CALL startProduction( ) throw (::com::sun::star::uno::RuntimeException);
// OControlModel's property handling
+ virtual void describeAggregateProperties(
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
+ ) const;
virtual void describeFixedProperties(
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps
) const;
@@ -119,6 +124,8 @@ protected:
translateDbColumnToControlValue( );
virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset );
+ virtual ::com::sun::star::uno::Any
+ getControlValue( ) const;
virtual void doSetControlValue( const ::com::sun::star::uno::Any& _rValue );
virtual sal_Bool approveDbColumnType(sal_Int32 _nColumnType);
@@ -134,7 +141,7 @@ protected:
@precond
our own mutex is locked
*/
- sal_Bool impl_handleNewImageURL_lck( const ::rtl::OUString& _rURL, ValueChangeInstigator _eInstigator );
+ sal_Bool impl_handleNewImageURL_lck( ValueChangeInstigator _eInstigator );
/** updates the binary stream, created from loading the file which the given URL points to, into our
bound field, or the control itself if there is no bound field
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index 7e0293be334e..07abd703281d 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -351,6 +351,9 @@ void ImageProducer::startProduction() throw(::com::sun::star::uno::RuntimeExcept
// delete interfaces in temporary list
for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() )
delete (::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons;
+
+ if ( maDoneHdl.IsSet() )
+ maDoneHdl.Call( NULL );
}
}
}
diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx
index de72e2b392e8..0c8b421008a3 100644
--- a/forms/source/inc/FormComponent.hxx
+++ b/forms/source/inc/FormComponent.hxx
@@ -759,6 +759,18 @@ protected:
sal_Int32 _nValuePropertyExternalHandle
);
+ /** initializes the part of the class which is related to the control value.
+
+ <p>In opposite to ->initValueProperty, this method is to be used for value properties which are <em>not</em>
+ implemented by our aggregate, but by ourselves.</p>
+
+ <p>Certain functionality is not available when using own value properties. This includes binding to an external
+ value and external validation. (This is not a conceptual limit, but simply missing implementation.)</p>
+ */
+ void initOwnValueProperty(
+ const ::rtl::OUString& i_rValuePropertyName
+ );
+
/** suspends listening at the value property
<p>As long as this listening is suspended, changes in the value property will not be
@@ -782,6 +794,16 @@ protected:
*/
void resumeValueListening( );
+ /** (to be) called when the value property changed
+
+ Normally, this is done automatically, since the value property is a property of our aggregate, and we're
+ a listener at this property.
+ However, in some cases the value property might not be an aggregate property, but a property of the
+ delegator instance. In this case, you'll need to call <code>onValuePropertyChange</code> whenever this
+ property changes.
+ */
+ void onValuePropertyChange( ControlModelLock& i_rControLock );
+
/** starts listening at the aggregate, for changes in the given property
<p>The OBoundControlModel automatically registers a multiplexer which listens for
diff --git a/forms/source/inc/frm_strings.hxx b/forms/source/inc/frm_strings.hxx
index 8a8105d2e1a7..1e3b1b1bd312 100644
--- a/forms/source/inc/frm_strings.hxx
+++ b/forms/source/inc/frm_strings.hxx
@@ -141,6 +141,7 @@ namespace frm
FORMS_CONSTASCII_STRING( PROPERTY_SUBMIT_METHOD, "SubmitMethod" );
FORMS_CONSTASCII_STRING( PROPERTY_SUBMIT_ENCODING, "SubmitEncoding" );
FORMS_CONSTASCII_STRING( PROPERTY_IMAGE_URL, "ImageURL" );
+ FORMS_CONSTASCII_STRING( PROPERTY_GRAPHIC, "Graphic" );
FORMS_CONSTASCII_STRING( PROPERTY_IMAGE_POSITION, "ImagePosition" );
FORMS_CONSTASCII_STRING( PROPERTY_EMPTY_IS_NULL, "ConvertEmptyToNull" );
FORMS_CONSTASCII_STRING( PROPERTY_LISTSOURCETYPE, "ListSourceType" );
diff --git a/forms/source/inc/property.hrc b/forms/source/inc/property.hrc
index c1064e6d56b9..0582ce36c6ee 100644
--- a/forms/source/inc/property.hrc
+++ b/forms/source/inc/property.hrc
@@ -61,7 +61,7 @@ namespace frm
#define PROPERTY_ID_WRITING_MODE (PROPERTY_ID_START + 20)
#define PROPERTY_ID_CONTEXT_WRITING_MODE (PROPERTY_ID_START + 21)
#define PROPERTY_ID_VERTICAL_ALIGN (PROPERTY_ID_START + 22)
- // free
+#define PROPERTY_ID_GRAPHIC (PROPERTY_ID_START + 23)
// free
// free
// free
diff --git a/forms/source/misc/property.cxx b/forms/source/misc/property.cxx
index 04bc9c8c8911..fffb7557ad5e 100644
--- a/forms/source/misc/property.cxx
+++ b/forms/source/misc/property.cxx
@@ -134,6 +134,7 @@ void PropertyInfoService::initialize()
ADD_PROP_ASSIGNMENT(SUBMIT_METHOD);
ADD_PROP_ASSIGNMENT(SUBMIT_ENCODING);
ADD_PROP_ASSIGNMENT(IMAGE_URL);
+ ADD_PROP_ASSIGNMENT(GRAPHIC);
ADD_PROP_ASSIGNMENT(EMPTY_IS_NULL);
ADD_PROP_ASSIGNMENT(LISTSOURCETYPE);
ADD_PROP_ASSIGNMENT(LISTSOURCE);
diff --git a/framework/inc/classes/framelistanalyzer.hxx b/framework/inc/classes/framelistanalyzer.hxx
index 518870b354f1..4ab3c4532cdc 100644
--- a/framework/inc/classes/framelistanalyzer.hxx
+++ b/framework/inc/classes/framelistanalyzer.hxx
@@ -29,13 +29,6 @@
#define __FRAMEWORK_CLASSES_FRAMELISTANALYZER_HXX_
//_______________________________________________
-// my own includes
-
-#include <threadhelp/threadhelpbase.hxx>
-#include <macros/debug.hxx>
-#include <general.h>
-
-//_______________________________________________
// interface includes
#include <com/sun/star/frame/XFrame.hpp>
@@ -88,10 +81,10 @@ class FrameListAnalyzer
public:
/** provides access to the frame container, which should be analyzed. */
- const css::uno::Reference< css::frame::XFramesSupplier >& m_xSupplier;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFramesSupplier >& m_xSupplier;
/** hold the reference frame, which is used e.g. to detect other frames with the same model. */
- const css::uno::Reference< css::frame::XFrame >& m_xReferenceFrame;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& m_xReferenceFrame;
/** enable/disable some special analyzing steps.
see impl_analyze() for further informations. */
@@ -100,19 +93,19 @@ class FrameListAnalyzer
/** contains all frames, which uses the same model like the reference frame.
Will be filled only if m_eDetectMode has set the flag E_MODEL.
The reference frame is never part of this list! */
- css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > m_lModelFrames;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > > m_lModelFrames;
/** contains all frames, which does not contain the same model like the reference frame.
Filling of it can't be supressed by m_eDetectMode.
The reference frame is never part of this list!
All frames inside this list are visible ones. */
- css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > m_lOtherVisibleFrames;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > > m_lOtherVisibleFrames;
/** contains all frames, which does not contain the same model like the reference frame.
Filling of it can't be supressed by m_eDetectMode.
The reference frame is never part of this list!
All frames inside this list are hidden ones. */
- css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > m_lOtherHiddenFrames;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > > m_lOtherHiddenFrames;
/** points to the help frame.
Will be set only, if any other frame (means different from the reference frame)
@@ -137,7 +130,7 @@ class FrameListAnalyzer
Analyzing of the help frame ignores the visible state of any frame.
But note: a hidden help frame indicates a wrong state!
*/
- css::uno::Reference< css::frame::XFrame > m_xHelp;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xHelp;
/** points to the frame, which contains the backing component.
Will be set only, if any other frame (means different from the reference frame)
@@ -163,7 +156,7 @@ class FrameListAnalyzer
Analyzing of the help frame ignores the visible state of any frame.
But note: a hidden backing mode frame indicates a wrong state!
*/
- css::uno::Reference< css::frame::XFrame > m_xBackingComponent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xBackingComponent;
/** is set to true only, if the reference frame is a hidden one.
This value is undefined if m_eDetectMode doesn't have set the flag E_HIDDEN! */
@@ -200,8 +193,8 @@ class FrameListAnalyzer
analyze steps. Note: Some member values will be undefined, if
an analyze step will be disabled.
*/
- FrameListAnalyzer( const css::uno::Reference< css::frame::XFramesSupplier >& xSupplier ,
- const css::uno::Reference< css::frame::XFrame >& xReferenceFrame ,
+ FrameListAnalyzer( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFramesSupplier >& xSupplier ,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xReferenceFrame ,
sal_uInt32 eDetectMode );
virtual ~FrameListAnalyzer();
diff --git a/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx b/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
index 9c5f9c89afe6..856746139b68 100644
--- a/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
+++ b/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
@@ -219,6 +219,7 @@ namespace framework
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xModuleImageManager;
+ com::sun::star::uno::Reference< com::sun::star::uno::XInterface > m_xModuleAcceleratorManager;
};
}
diff --git a/framework/prj/d.lst b/framework/prj/d.lst
index 7f260f07cf65..fe6077f57bc8 100644
--- a/framework/prj/d.lst
+++ b/framework/prj/d.lst
@@ -42,6 +42,7 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar
..\inc\classes\menuextensionsupplier.hxx %_DEST%\inc%_EXT%\framework\menuextensionsupplier.hxx
..\inc\interaction\preventduplicateinteraction.hxx %_DEST%\inc%_EXT%\framework\preventduplicateinteraction.hxx
..\inc\helper\titlehelper.hxx %_DEST%\inc%_EXT%\framework\titlehelper.hxx
+..\inc\classes\framelistanalyzer.hxx %_DEST%\inc%_EXT%\framework\framelistanalyzer.hxx
..\uiconfig\startmodule\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\menubar\*.xml
..\uiconfig\startmodule\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\toolbar\*.xml
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index b81ef5aecf0e..43772f5c4273 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -1248,11 +1248,12 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util:
if (! xHAccess.is ())
return;
- const sal_Int32 c = aEvent.Changes.getLength();
+ css::util::ChangesEvent aReceivedEvents( aEvent );
+ const sal_Int32 c = aReceivedEvents.Changes.getLength();
sal_Int32 i = 0;
for (i=0; i<c; ++i)
{
- const css::util::ElementChange& aChange = aEvent.Changes[i];
+ const css::util::ElementChange& aChange = aReceivedEvents.Changes[i];
// Only path of form "PrimaryKeys/Modules/Module['<module_name>']/Key['<command_url>']/Command[<locale>]" will
// be interesting for use. Sometimes short path values are given also by the broadcaster ... but they must be ignored :-)
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 99dd3107f162..75bcc4c4587f 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -103,6 +103,7 @@
#include <unotools/moduleoptions.hxx>
#include <svtools/sfxecode.hxx>
#include <unotools/processfactory.hxx>
+#include <unotools/ucbhelper.hxx>
#include <comphelper/configurationhelper.hxx>
#include <rtl/ustrbuf.hxx>
#include <vcl/svapp.hxx>
@@ -1407,7 +1408,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded()
// don't check the complete URL here.
// use its main part - ignore optional jumpmarks!
const ::rtl::OUString sURL = xModel->getURL();
- if (!m_aURL.Main.equals(sURL))
+ if (!::utl::UCBContentHelper::EqualURLs( m_aURL.Main, sURL ))
{
xTask.clear ();
continue;
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index 193bd63b5ad5..607efce4d4d6 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -776,26 +776,29 @@ void SAL_CALL ModuleUIConfigurationManager::dispose() throw (::com::sun::star::u
css::lang::EventObject aEvent( xThis );
m_aListenerContainer.disposeAndClear( aEvent );
- {
- ResetableGuard aGuard( m_aLock );
- try
- {
- if ( m_xModuleImageManager.is() )
- m_xModuleImageManager->dispose();
- }
- catch ( Exception& )
- {
- }
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
+ ResetableGuard aGuard( m_aLock );
+ Reference< XComponent > xModuleImageManager( m_xModuleImageManager );
+ m_xModuleImageManager.clear();
+ m_xModuleAcceleratorManager.clear();
+ m_aUIElements[LAYER_USERDEFINED].clear();
+ m_aUIElements[LAYER_DEFAULT].clear();
+ m_xDefaultConfigStorage.clear();
+ m_xUserConfigStorage.clear();
+ m_xUserRootCommit.clear();
+ m_bConfigRead = false;
+ m_bModified = false;
+ m_bDisposed = true;
+ aGuard.unlock();
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
- m_xModuleImageManager.clear();
- m_aUIElements[LAYER_USERDEFINED].clear();
- m_aUIElements[LAYER_DEFAULT].clear();
- m_xDefaultConfigStorage.clear();
- m_xUserConfigStorage.clear();
- m_xUserRootCommit.clear();
- m_bConfigRead = false;
- m_bModified = false;
- m_bDisposed = true;
+ try
+ {
+ if ( xModuleImageManager.is() )
+ xModuleImageManager->dispose();
+ }
+ catch ( Exception& )
+ {
}
}
@@ -1370,30 +1373,35 @@ Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getImageManager()
}
return Reference< XInterface >( m_xModuleImageManager, UNO_QUERY );
-
-// return Reference< XInterface >();
}
Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getShortCutManager() throw (::com::sun::star::uno::RuntimeException)
{
ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
Reference< XMultiServiceFactory > xSMGR = m_xServiceManager;
- ::rtl::OUString aModule = /*m_aModuleShortName*/m_aModuleIdentifier;
- aGuard.unlock();
+ ::rtl::OUString aModule = m_aModuleIdentifier;
- Reference< XInterface > xManager = xSMGR->createInstance(SERVICENAME_MODULEACCELERATORCONFIGURATION);
- Reference< XInitialization > xInit (xManager, UNO_QUERY_THROW);
+ if ( !m_xModuleAcceleratorManager.is() )
+ {
+ Reference< XInterface > xManager = xSMGR->createInstance(SERVICENAME_MODULEACCELERATORCONFIGURATION);
+ Reference< XInitialization > xInit (xManager, UNO_QUERY_THROW);
- PropertyValue aProp;
- aProp.Name = ::rtl::OUString::createFromAscii("ModuleIdentifier");
- aProp.Value <<= aModule;
+ PropertyValue aProp;
+ aProp.Name = ::rtl::OUString::createFromAscii("ModuleIdentifier");
+ aProp.Value <<= aModule;
- Sequence< Any > lArgs(1);
- lArgs[0] <<= aProp;
+ Sequence< Any > lArgs(1);
+ lArgs[0] <<= aProp;
- xInit->initialize(lArgs);
+ xInit->initialize(lArgs);
+ m_xModuleAcceleratorManager = Reference< XInterface >( xManager, UNO_QUERY );
+ }
- return xManager;
+ return m_xModuleAcceleratorManager;
}
Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getEventsManager() throw (::com::sun::star::uno::RuntimeException)
diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk
index 91532cda76e2..edc5f67ce60a 100644
--- a/framework/util/makefile.mk
+++ b/framework/util/makefile.mk
@@ -50,7 +50,6 @@ LIB1OBJFILES= \
$(SLO)$/protocolhandlercache.obj \
$(SLO)$/networkdomain.obj \
$(SLO)$/configaccess.obj \
- $(SLO)$/framelistanalyzer.obj \
$(SLO)$/shareablemutex.obj \
$(SLO)$/itemcontainer.obj \
$(SLO)$/rootitemcontainer.obj \
@@ -99,6 +98,7 @@ LIB2OBJFILES= \
$(SLO)$/configimporter.obj \
$(SLO)$/menuextensionsupplier.obj \
$(SLO)$/preventduplicateinteraction.obj \
+ $(SLO)$/framelistanalyzer.obj \
$(SLO)$/titlehelper.obj
# --- import classes library ---------------------------------------------------
diff --git a/i18npool/source/transliteration/transliterationImpl.cxx b/i18npool/source/transliteration/transliterationImpl.cxx
index dfadecfd5eb7..2109c310b233 100644
--- a/i18npool/source/transliteration/transliterationImpl.cxx
+++ b/i18npool/source/transliteration/transliterationImpl.cxx
@@ -295,7 +295,6 @@ OUString SAL_CALL
TransliterationImpl::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
Sequence< sal_Int32 >& offset ) throw(RuntimeException)
{
-
if (numCascade == 0)
return inStr;
diff --git a/i18npool/source/transliteration/transliteration_body.cxx b/i18npool/source/transliteration/transliteration_body.cxx
index b58347826470..43222b7a41eb 100755
--- a/i18npool/source/transliteration/transliteration_body.cxx
+++ b/i18npool/source/transliteration/transliteration_body.cxx
@@ -35,6 +35,7 @@
#include <comphelper/processfactory.hxx>
#include <osl/diagnose.h>
+#include <string.h>
#include "characterclassificationImpl.hxx"
#include "breakiteratorImpl.hxx"
@@ -96,7 +97,7 @@ static sal_uInt8 lcl_getMappingTypeForToggleCase( sal_uInt8 nMappingType, sal_Un
nRes = MappingTypeLowerToUpper;
else
{
- OSL_ENSURE( nType & 0x01 /* upper case */, "uppercase character expected! 'Toggle case' failed?" );
+ // should also work properly for non-upper characters like white spacs, numbers, ...
nRes = MappingTypeUpperToLower;
}
}
@@ -330,185 +331,143 @@ Transliteration_titlecase::Transliteration_titlecase()
implementationName = "com.sun.star.i18n.Transliteration.Transliteration_titlecase";
}
-rtl::OUString SAL_CALL Transliteration_titlecase::transliterate(
- const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
- Sequence< sal_Int32 >& /*offset*/ )
- throw(RuntimeException)
+#if 0
+struct LigatureData
{
- Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- CharacterClassificationImpl aCharClassImpl( xMSF );
-
- // possible problem: the locale is not exactly specific for each word in the text...
- OUString aRes( aCharClassImpl.toTitle( inStr, startPos, nCount, aLocale ) );
- return aRes;
+ sal_uInt32 cChar;
+ sal_Char * pUtf8Text;
+};
+
+// available Unicode ligatures:
+// http://www.unicode.org/charts
+// http://www.unicode.org/charts/PDF/UFB00.pdf
+static LigatureData aLigatures[] =
+{
+ { 0x0FB00, "ff" },
+ { 0x0FB01, "fi" },
+ { 0x0FB02, "fl" },
+ { 0x0FB03, "ffi" },
+ { 0x0FB04, "ffl" },
+ { 0x0FB05, "ft" },
+ { 0x0FB06, "st" },
+
+ { 0x0FB13, "\xD5\xB4\xD5\xB6" }, // Armenian small men now
+ { 0x0FB14, "\xD5\xB4\xD5\xA5" }, // Armenian small men ech
+ { 0x0FB15, "\xD5\xB4\xD5\xAB" }, // Armenian small men ini
+ { 0x0FB16, "\xD5\xBE\xD5\xB6" }, // Armenian small vew now
+ { 0x0FB17, "\xD5\xB4\xD5\xAD" }, // Armenian small men xeh
+ { 0x00000, "" }
+};
+
+static inline bool lcl_IsLigature( sal_uInt32 cChar )
+{
+ return (0x0FB00 <= cChar && cChar <= 0x0FB06) || (0x0FB13 <= cChar && cChar <= 0x0FB17);
}
-Transliteration_sentencecase::Transliteration_sentencecase()
+static rtl::OUString lcl_ResolveLigature( sal_uInt32 cChar )
{
- nMappingType = MappingTypeToTitle; // though only to be applied to the first word...
- transliterationName = "sentence(generic)";
- implementationName = "com.sun.star.i18n.Transliteration.Transliteration_sentencecase";
+ rtl::OUString aRes;
+ if (lcl_IsLigature( cChar ))
+ {
+ LigatureData *pFound = NULL;
+ LigatureData *pData = aLigatures;
+ while (!pFound && pData->cChar != 0)
+ {
+ if (pData->cChar == cChar)
+ pFound = pData;
+ ++pData;
+ }
+ if (pFound)
+ aRes = rtl::OUString( pFound->pUtf8Text, strlen( pFound->pUtf8Text ), RTL_TEXTENCODING_UTF8 );
+ }
+ else
+ aRes = rtl::OUString( &cChar, 1 );
+ return aRes;
}
+#endif // if 0
-rtl::OUString SAL_CALL Transliteration_sentencecase::transliterate(
+static rtl::OUString transliterate_titlecase_Impl(
const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
+ const Locale &rLocale,
Sequence< sal_Int32 >& offset )
throw(RuntimeException)
{
- // inspired from Transliteration_body::transliterate
- sal_Int32 nOffCount = 0, i;
- bool bPoint = true;
- if (useOffset)
- {
- for( i = 0; i < nCount; ++i ) {
- sal_Unicode c = inStr.getStr()[ i + startPos ];
- if( sal_Unicode('.') == c || sal_Unicode('!') == c || sal_Unicode('?') == c ) {
- bPoint = true;
- nOffCount++;
- }
- else if( unicode::isAlpha( c ) || unicode::isDigit( c ) )
- {
- const Mapping* map = 0;
- if( bPoint && unicode::isLower( c ))
- {
- map = &casefolding::getValue(&c, 0, 1, aLocale, MappingTypeLowerToUpper);
- bPoint = false;
- }
- else if (!bPoint && unicode::isUpper( c ))
- {
- map = &casefolding::getValue(&c, 0, 1, aLocale, MappingTypeUpperToLower);
- }
-
- if(map == 0)
- {
- nOffCount++;
- }
- else
- {
- nOffCount += map->nmap;
- }
- }
- else
- {
- nOffCount++;
- }
- }
- }
-
- bPoint = true;
- rtl::OUStringBuffer result;
+ const OUString aText( inStr.copy( startPos, nCount ) );
- if (useOffset)
+ OUString aRes;
+ if (aText.getLength() > 0)
{
- result.ensureCapacity(nOffCount);
- if ( nOffCount != offset.getLength() )
- offset.realloc( nOffCount );
- }
-
-
- sal_Int32 j = 0;
- sal_Int32 * pArr = offset.getArray();
- for( i = 0; i < nCount; ++i ) {
- sal_Unicode c = inStr.getStr()[ i + startPos ];
- if( sal_Unicode('.') == c || sal_Unicode('!') == c || sal_Unicode('?') == c ) {
- bPoint = true;
- result.append(c);
- pArr[j++] = i + startPos;
- }
- else if( unicode::isAlpha( c ) || unicode::isDigit( c ) )
- {
- const Mapping* map = 0;
- if( bPoint && unicode::isLower( c ))
- {
- map = &casefolding::getValue(&c, 0, 1, aLocale, MappingTypeLowerToUpper);
- }
- else if (!bPoint && unicode::isUpper( c ))
- {
- map = &casefolding::getValue(&c, 0, 1, aLocale, MappingTypeUpperToLower);
- }
-
- if(map == 0)
- {
- result.append( c );
- pArr[j++] = i + startPos;
- }
- else
- {
- for (sal_Int32 k = 0; k < map->nmap; k++)
- {
- result.append( map->map[k] );
- pArr[j++] = i + startPos;
- }
- }
- bPoint = false;
- }
- else
+ Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
+ CharacterClassificationImpl aCharClassImpl( xMSF );
+
+ // because aCharClassImpl.toTitle does not handle ligatures or ß but will raise
+ // an exception we need to handle the first chara manually...
+
+ // we don't want to change surrogates by accident, thuse we use proper code point iteration
+ sal_Int32 nPos = 0;
+ sal_uInt32 cFirstChar = aText.iterateCodePoints( &nPos );
+ OUString aResolvedLigature( &cFirstChar, 1 ); //lcl_ResolveLigature( cFirstChar ) );
+ // toUpper can be used to properly resolve ligatures and characters like ß
+ aResolvedLigature = aCharClassImpl.toUpper( aResolvedLigature, 0, aResolvedLigature.getLength(), rLocale );
+ // since toTitle will leave all-uppercase text unchanged we first need to
+ // use toLower to bring possible 2nd and following charas in lowercase
+ aResolvedLigature = aCharClassImpl.toLower( aResolvedLigature, 0, aResolvedLigature.getLength(), rLocale );
+ sal_Int32 nResolvedLen = aResolvedLigature.getLength();
+
+ // now we can properly use toTitle to get the expected result for the resolved string.
+ // The rest of the text should just become lowercase.
+ aRes = aCharClassImpl.toTitle( aResolvedLigature, 0, nResolvedLen, rLocale );
+ aRes += aCharClassImpl.toLower( aText, 1, aText.getLength() - 1, rLocale );
+ offset.realloc( aRes.getLength() );
+
+ sal_Int32 *pOffset = offset.getArray();
+ sal_Int32 nLen = offset.getLength();
+ for (sal_Int32 i = 0; i < nLen; ++i)
{
- result.append( c );
- pArr[j++] = i + startPos;
+ sal_Int32 nIdx = 0;
+ if (i >= nResolvedLen)
+ nIdx = i - nResolvedLen + 1;
+ pOffset[i] = nIdx;
}
}
- return result.makeStringAndClear();
+#if OSL_DEBUG_LEVEL > 1
+ const sal_Int32 *pCOffset = offset.getConstArray();
+ (void) pCOffset;
+#endif
+
+ return aRes;
}
-#if 0
-// TL: alternative implemntation try. But breakiterator has its problem too since
-// beginOfSentence does not work as expected with '.'. See comment below.
-// For the time being I will leave this code here as a from-scratch sample if the
-// breakiterator works better at some point...
-rtl::OUString SAL_CALL Transliteration_sentencecase::transliterate(
- const OUString& inStr, sal_Int32 nStartPos, sal_Int32 nCount,
- Sequence< sal_Int32 >& /*offset*/ )
+
+// this function expects to be called on a word-by-word basis,
+// namely that startPos points to the first char of the word
+rtl::OUString SAL_CALL Transliteration_titlecase::transliterate(
+ const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
+ Sequence< sal_Int32 >& offset )
throw(RuntimeException)
{
- OUString aRes( inStr.copy( nStartPos, nCount ) );
+ return transliterate_titlecase_Impl( inStr, startPos, nCount, aLocale, offset );
+}
- if (nStartPos >= 0 && nStartPos < inStr.getLength() && nCount > 0)
- {
- Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- BreakIteratorImpl brk( xMSF );
- sal_Int32 nSentenceStart = -1, nOldSentenceStart = -1;
- sal_Int32 nPos = nStartPos + nCount - 1;
- while (nPos >= nStartPos && nPos != -1)
- {
- // possible problem: the locale is not exactly specific for each sentence in the text,
- // but it is the only one we have...
- nOldSentenceStart = nSentenceStart;
- nSentenceStart = brk.beginOfSentence( inStr, nPos, aLocale );
-
- // since the breakiterator completely ignores '.' characvters as end-of-sentence when
- // the next word is lower case we need to take care of that ourself. The drawback:
- // la mid-sentence abbreviation like e.g. will now be identified as end-of-sentence. :-(
- // Well, at least the other product does it in the same way...
- sal_Int32 nFullStopPos = inStr.lastIndexOf( (sal_Unicode)'.', nPos );
- nPos = nSentenceStart;
- if (nFullStopPos > 0 && nFullStopPos > nSentenceStart)
- {
- Boundary aBd2 = brk.nextWord( inStr, nFullStopPos, aLocale, WordType::DICTIONARY_WORD );
- nSentenceStart = aBd2.startPos;
- nPos = nFullStopPos;
- }
+Transliteration_sentencecase::Transliteration_sentencecase()
+{
+ nMappingType = MappingTypeToTitle; // though only to be applied to the first word...
+ transliterationName = "sentence(generic)";
+ implementationName = "com.sun.star.i18n.Transliteration.Transliteration_sentencecase";
+}
- if (nSentenceStart < nOldSentenceStart || nOldSentenceStart == -1)
- {
- // the sentence start might be a quotation mark or some kind of bracket, thus
- // we need the first dictionary word starting or following this position
- // Boundary aBd1 = brk.nextWord( inStr, nSentenceStart, aLocale, WordType::DICTIONARY_WORD );
- Boundary aBd2 = brk.getWordBoundary( inStr, nSentenceStart, aLocale, WordType::DICTIONARY_WORD, true );
- // OUString aWord1( inStr.copy( aBd1.startPos, aBd1.endPos - aBd1.startPos + 1 ) );
- OUString aWord2( inStr.copy( aBd2.startPos, aBd2.endPos - aBd2.startPos + 1 ) );
- }
- else
- break; // prevent endless loop
- // continue with previous sentence
- if (nPos != -1)
- --nPos;
- }
- }
- return aRes;
+// this function expects to be called on a sentence-by-sentence basis,
+// namely that startPos points to the first word (NOT first char!) in the sentence
+rtl::OUString SAL_CALL Transliteration_sentencecase::transliterate(
+ const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
+ Sequence< sal_Int32 >& offset )
+ throw(RuntimeException)
+{
+ return transliterate_titlecase_Impl( inStr, startPos, nCount, aLocale, offset );
}
-#endif
+
} } } }
+
diff --git a/l10ntools/java/jpropex/java/JPropEx.java b/l10ntools/java/jpropex/java/JPropEx.java
index be59d7f29479..f068f93ad18b 100644
--- a/l10ntools/java/jpropex/java/JPropEx.java
+++ b/l10ntools/java/jpropex/java/JPropEx.java
@@ -126,8 +126,8 @@ public class JPropEx
{
key = (String) e.nextElement();
currentStr = (SdfEntity) dolly.clone();
- // Set the new LID and the string text
- currentStr.setLid( key );
+ // Set the new GID and the string text
+ currentStr.setGid( key );
value = prop.getProperty( key , "" );
//if( value.equals("") ) System.err.println("Warning: in file "+inputFileArg+" the string with the key "+key+" has a empty string!");
str = (prop.getProperty( key )).replaceAll("\t" , " " ); // remove tab
@@ -145,8 +145,11 @@ public class JPropEx
//String path = makeAbs( inputFileArg );
path = path.replace( rootArg + "/" , "" );
path = path.replace("/","\\");
- return new SdfEntity( projectArg , path , "" /* dummy1 */ , resourceType , "", "" , "" , "" , "" /* dummy2 */ ,
- sourceLanguage , "", "" , "" , "" , "2002-02-02 02:02:02" );
+ // TODO: Make this static
+ java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ String date = dateformat.format( new Date() );
+ return new SdfEntity( projectArg , path , "0" /* dummy1 */ , resourceType , "", "" , "" , "" , "0" /* dummy2 */ ,
+ sourceLanguage , "", "" , "" , "" , date );
}
private void merge()
@@ -208,7 +211,7 @@ public class JPropEx
key = (String) e.nextElement();
sourceString = sourceProp.getProperty( key );
curStr = (SdfEntity) dolly.clone();
- curStr.setLid( key );
+ curStr.setGid( key );
for( Enumeration lang = langs.elements(); lang.hasMoreElements(); ) // merge in every language
{
curEntity = (SdfEntity) curStr.clone();
@@ -218,12 +221,12 @@ public class JPropEx
if( mergedEntity == null )
{
// in case there is no translation then fallback to the en-US source string
- ( (java.util.Properties) props.get( curLang )).setProperty( curEntity.getLid() , sourceString );
+ ( (java.util.Properties) props.get( curLang )).setProperty( curEntity.getGid() , sourceString );
}
else
{
// Set the merged text from the sdf file
- ( (java.util.Properties) props.get( curLang )).setProperty( mergedEntity.getLid() , mergedEntity.getText() ); // TODO: Quoting ???
+ ( (java.util.Properties) props.get( curLang )).setProperty( mergedEntity.getGid() , mergedEntity.getText() ); // TODO: Quoting ???
}
}
diff --git a/l10ntools/prj/build.lst b/l10ntools/prj/build.lst
index 8387154897b3..d8a2e8c00649 100644
--- a/l10ntools/prj/build.lst
+++ b/l10ntools/prj/build.lst
@@ -1,6 +1,7 @@
-tr l10ntools : tools LIBXSLT:libxslt BERKELEYDB:berkeleydb LUCENE:lucene NULL
+tr l10ntools : tools LIBXSLT:libxslt BERKELEYDB:berkeleydb LUCENE:lucene PYTHON:python NULL
tr l10ntools usr1 - all tr_mkout NULL
tr l10ntools\inc nmake - all tr_inc NULL
+tr l10ntools\scripts nmake - all tr_scripts NULL
tr l10ntools\source nmake - all tr_src tr_inc NULL
tr l10ntools\layout nmake - all rt_layout tr_src tr_inc NULL
tr l10ntools\java\jpropex nmake - all tr_blah NULL
diff --git a/l10ntools/prj/d.lst b/l10ntools/prj/d.lst
index 53c846832fca..9d493e1e9673 100644
--- a/l10ntools/prj/d.lst
+++ b/l10ntools/prj/d.lst
@@ -47,14 +47,18 @@ mkdir: %_DEST%\bin%_EXT%\help\com\sun\star\help
..\scripts\localize %_DEST%\bin%_EXT%\localize
..\scripts\fast_merge.pl %_DEST%\bin%_EXT%\fast_merge.pl
..\scripts\keyidGen.pl %_DEST%\bin%_EXT%\keyidGen.pl
-..\scripts\tool\const.py %_DEST%\bin%_EXT%\const.py
-..\scripts\tool\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py
-..\scripts\tool\xtxex.py %_DEST%\bin%_EXT%\xtxex.py
-..\scripts\tool\sdf.py %_DEST%\bin%_EXT%\sdf.py
-..\scripts\tool\xhtex.py %_DEST%\bin%_EXT%\xhtex.py
-..\scripts\tool\pseudo.py %_DEST%\bin%_EXT%\pseudo.py
..\scripts\xtxex %_DEST%\bin%_EXT%\xtxex
..\scripts\xhtex %_DEST%\bin%_EXT%\xhtex
+..\%__SRC%\bin\const.py %_DEST%\bin%_EXT%\const.py
+..\%__SRC%\bin\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py
+..\%__SRC%\bin\pseudo.py %_DEST%\bin%_EXT%\pseudo.py
+..\%__SRC%\bin\sdf.py %_DEST%\bin%_EXT%\sdf.py
+..\%__SRC%\bin\const.pyc %_DEST%\bin%_EXT%\const.pyc
+..\%__SRC%\bin\l10ntool.pyc %_DEST%\bin%_EXT%\l10ntool.pyc
+..\%__SRC%\bin\pseudo.pyc %_DEST%\bin%_EXT%\pseudo.pyc
+..\%__SRC%\bin\sdf.pyc %_DEST%\bin%_EXT%\sdf.pyc
+..\%__SRC%\bin\xhtex.py %_DEST%\bin%_EXT%\xhtex.py
+..\%__SRC%\bin\xtxex.py %_DEST%\bin%_EXT%\xtxex.py
..\inc\export.hxx %_DEST%\inc%_EXT%\l10ntools\export.hxx
..\inc\l10ntools\directory.hxx %_DEST%\inc%_EXT%\l10ntools\directory.hxx
diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl
index 4b7040d6583d..7a9d8beb6f15 100644..100755
--- a/l10ntools/scripts/localize.pl
+++ b/l10ntools/scripts/localize.pl
@@ -492,7 +492,7 @@ sub collectfiles{
# -e
# if ( -x $command ){
if( $command ){
- if( !$bVerbose ){ $args .= " -QQ "; }
+ if( !$bVerbose ){ $args .= " "; }
$args .= " -e -f $localizeSDF -l ";
my $bFlag="";
if( $bAll ) {$args .= " en-US";}
diff --git a/l10ntools/scripts/makefile.mk b/l10ntools/scripts/makefile.mk
new file mode 100644
index 000000000000..8bfa64e3fbad
--- /dev/null
+++ b/l10ntools/scripts/makefile.mk
@@ -0,0 +1,59 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+
+# Copy *.py files into output tree and call a script once to
+# force python to create the *.pyc files.
+
+PRJ=..
+TARGET = l10ntools_dummy_pyc
+
+.INCLUDE: settings.mk
+
+.IF "$(SYSTEM_PYTHON)"!="YES"
+PYTHON=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(SOLARBINDIR)/python
+.ELSE # "$(SYSTEM_PYTHON)"!="YES"
+PYTHON=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) python
+.ENDIF # "$(SYSTEM_PYTHON)"!="YES"
+
+PYFILES = $(BIN)$/const.py \
+ $(BIN)$/l10ntool.py \
+ $(BIN)$/pseudo.py \
+ $(BIN)$/sdf.py \
+ $(BIN)$/xhtex.py \
+ $(BIN)$/xtxex.py
+
+.INCLUDE: target.mk
+
+.IGNORE : create_pyc
+ALLTAR : create_pyc
+create_pyc : $(PYFILES)
+ @$(PYTHON) $(BIN)/xtxex.py >& /dev/null
+
+$(BIN)$/%.py : tool/%.py
+ @$(COPY) $< $@
+
+
diff --git a/l10ntools/scripts/tool/sdf.py b/l10ntools/scripts/tool/sdf.py
index 2afcbaf4bb1f..96afbed1452c 100644
--- a/l10ntools/scripts/tool/sdf.py
+++ b/l10ntools/scripts/tool/sdf.py
@@ -26,6 +26,7 @@
#*************************************************************************
from pseudo import PseudoSet,PseudoOrderedDict
+from time import gmtime, strftime
class SdfData:
_filename = "";
@@ -113,8 +114,8 @@ class SdfEntity:
const._TITLE_POS = 13
const._DATE_POS = 14
- def __init__(self, project="", source_file="", dummy1="", resource_type="", gid="", lid="", helpid="", platform="", dummy2="", langid="",
- text="", helptext="", quickhelptext="", title="", date="2002-02-02 02:02:02"):
+ def __init__(self, project="", source_file="", dummy1="0", resource_type="", gid="", lid="", helpid="", platform="", dummy2="0", langid="",
+ text="", helptext="", quickhelptext="", title="", date=""):
self.project = project;
self.source_file = source_file;
self.dummy1 = dummy1;
@@ -129,7 +130,11 @@ class SdfEntity:
self.helptext = helptext;
self.quickhelptext = quickhelptext;
self.title = title;
- self.date = date;
+ if date != "":
+ self.date = date;
+ else:
+ self.date = strftime("%Y-%m-%d %H:%M:%S",gmtime())
+
def set_properties(self, line):
splitted = line.split("\t")
diff --git a/l10ntools/scripts/tool/xhtex.py b/l10ntools/scripts/tool/xhtex.py
index c427a7feccdd..ae973aacc555 100644
--- a/l10ntools/scripts/tool/xhtex.py
+++ b/l10ntools/scripts/tool/xhtex.py
@@ -108,7 +108,7 @@ class Xhtex(AbstractL10nTool):
def parse_file(self, filename):
document = ""
try:
- f = open(filename,"r+")
+ f = open(filename,"r")
document = f.read()
except IOError:
print "ERROR: Can not read file " + filename
diff --git a/l10ntools/scripts/tool/xtxex.py b/l10ntools/scripts/tool/xtxex.py
index 2c5f132530a6..96912754b7df 100644
--- a/l10ntools/scripts/tool/xtxex.py
+++ b/l10ntools/scripts/tool/xtxex.py
@@ -39,7 +39,8 @@ class Xtxex(AbstractL10nTool):
def merge_file(self, inputfilename, outputfilename, parsed_file_ref, lang, is_forced_lang, sdfdata):
# Special handling for en-US files
if lang == "en-US":
- mod_outputfilename = outputfilename.replace("_en-US",'')
+ mod_outputfilename = outputfilename
+ # mod here if needed
self.copy_file(inputfilename, mod_outputfilename)
return
# merge usual lang
diff --git a/l10ntools/scripts/xhtex b/l10ntools/scripts/xhtex
index ca307cf2d4a4..5409f179777d 100755
--- a/l10ntools/scripts/xhtex
+++ b/l10ntools/scripts/xhtex
@@ -39,8 +39,8 @@ else
fi
else
if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
- exec python -B $SOLARVERSION/$INPATH/bin/xhtex.py "$@"
+ exec python $SOLARVERSION/$INPATH/bin/xhtex.py "$@"
else
- exec python -B $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xhtex.py "$@"
+ exec python $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xhtex.py "$@"
fi
fi
diff --git a/l10ntools/scripts/xtxex b/l10ntools/scripts/xtxex
index fb54c1aee36c..39da89fd81ce 100755
--- a/l10ntools/scripts/xtxex
+++ b/l10ntools/scripts/xtxex
@@ -39,9 +39,9 @@ else
fi
else
if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
- exec python -B $SOLARVERSION/$INPATH/bin/xtxex.py "$@"
+ exec python $SOLARVERSION/$INPATH/bin/xtxex.py "$@"
else
- exec python -B $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xtxex.py "$@"
+ exec python $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xtxex.py "$@"
fi
fi
diff --git a/l10ntools/source/help/HelpIndexerTool.java b/l10ntools/source/help/HelpIndexerTool.java
index 2a49f964d48f..a39b5399e38d 100644
--- a/l10ntools/source/help/HelpIndexerTool.java
+++ b/l10ntools/source/help/HelpIndexerTool.java
@@ -72,6 +72,9 @@ public class HelpIndexerTool
String aSegmentName = "";
// Scan arguments
+ //If this tool is invoked in the build process for extensions help,
+ //then -extension must be set.
+ boolean bExtension = false;
boolean bLang = false;
boolean bMod = false;
boolean bZipDir = false;
@@ -83,7 +86,11 @@ public class HelpIndexerTool
int nArgCount = args.length;
for( int i = 0 ; i < nArgCount ; i++ )
{
- if( "-lang".equals(args[i]) )
+ if( "-extension".equals(args[i]) )
+ {
+ bExtension = true;
+ }
+ else if( "-lang".equals(args[i]) )
{
if( i + 1 < nArgCount )
{
@@ -142,20 +149,21 @@ public class HelpIndexerTool
bSegmentName = true;
}
i++;
- if (!(bCfsName && bSegmentName))
- {
- System.out.println("Usage: HelpIndexer -checkcfsandsegname _0 _3 (2 arguments needed)");
- System.exit( -1 );
- }
+ if (!(bCfsName && bSegmentName))
+ {
+ System.out.println("Usage: HelpIndexer -checkcfsandsegname _0 _3 (2 arguments needed)");
+ System.exit( -1 );
+ }
}
}
- if( !bLang || !bMod || !bZipDir || (!bOutput && !bExtensionMode) )
+ if( !bLang || !bMod || !bZipDir || (!bOutput && !bExtensionMode && !bExtension) )
{
if( bExtensionMode )
return;
System.out.println("Usage: HelpIndexer -lang ISOLangCode -mod HelpModule -zipdir TempZipDir -o OutputZipFile");
+ System.out.println("Usage: HelpIndexer -extension -lang ISOLangCode -mod HelpModule -zipdir PathToLangDir");
System.exit( -1 );
}
@@ -199,7 +207,7 @@ public class HelpIndexerTool
System.out.println( "Checking segment file " + aSegmentName+ ": " + (bSegmentFileOk ? "Found" : "Not found") );
}
- if( bExtensionMode )
+ if( bExtensionMode || bExtension)
{
if( !bSrcDir )
{
diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx
index 94139f89de1e..411859bfe994 100644
--- a/l10ntools/source/help/HelpLinker.cxx
+++ b/l10ntools/source/help/HelpLinker.cxx
@@ -269,6 +269,8 @@ private:
fs::path idxContentStylesheet;
fs::path zipdir;
fs::path outputFile;
+ std::string extsource;
+ std::string extdestination;
std::string module;
std::string lang;
std::string hid;
@@ -762,18 +764,9 @@ void HelpLinker::main( std::vector<std::string> &args,
const rtl::OUString* pOfficeHelpPath )
throw( HelpProcessingException )
{
- rtl::OUString aOfficeHelpPath;
-
bExtensionMode = false;
- if( pExtensionPath && pExtensionPath->length() > 0 && pOfficeHelpPath )
- {
- helpFiles.clear();
- bExtensionMode = true;
- extensionPath = *pExtensionPath;
- sourceRoot = fs::path(extensionPath);
- extensionDestination = *pDestination;
- aOfficeHelpPath = *pOfficeHelpPath;
- }
+ helpFiles.clear();
+
if (args.size() > 0 && args[0][0] == '@')
{
std::vector<std::string> stringList;
@@ -793,10 +786,34 @@ void HelpLinker::main( std::vector<std::string> &args,
}
size_t i = 0;
-
+ bool bSrcOption = false;
while (i < args.size())
{
- if (args[i].compare("-src") == 0)
+ if (args[i].compare("-extlangsrc") == 0)
+ {
+ ++i;
+ if (i >= args.size())
+ {
+ std::stringstream aStrStream;
+ aStrStream << "extension source missing" << std::endl;
+ throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
+ }
+ extsource = args[i];
+ }
+ else if (args[i].compare("-extlangdest") == 0)
+ {
+ //If this argument is not provided then the location provided in -extsource will
+ //also be the destination
+ ++i;
+ if (i >= args.size())
+ {
+ std::stringstream aStrStream;
+ aStrStream << "extension destination missing" << std::endl;
+ throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
+ }
+ extdestination = args[i];
+ }
+ else if (args[i].compare("-src") == 0)
{
++i;
if (i >= args.size())
@@ -805,9 +822,8 @@ void HelpLinker::main( std::vector<std::string> &args,
aStrStream << "sourceroot missing" << std::endl;
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
}
-
- if( !bExtensionMode )
- sourceRoot = fs::path(args[i], fs::native);
+ bSrcOption = true;
+ sourceRoot = fs::path(args[i], fs::native);
}
else if (args[i].compare("-sty") == 0)
{
@@ -933,21 +949,70 @@ void HelpLinker::main( std::vector<std::string> &args,
++i;
}
+ //We can be called from the helplinker executable or the extension manager
+ //In the latter case extsource is not used.
+ if( (pExtensionPath && pExtensionPath->length() > 0 && pOfficeHelpPath)
+ || !extsource.empty())
+ {
+ bExtensionMode = true;
+ if (!extsource.empty())
+ {
+ //called from helplinker.exe, pExtensionPath and pOfficeHelpPath
+ //should be NULL
+ sourceRoot = fs::path(extsource, fs::native);
+ extensionPath = sourceRoot.toUTF8();
+
+ if (extdestination.empty())
+ {
+ std::stringstream aStrStream;
+ aStrStream << "-extlangdest is missing" << std::endl;
+ throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
+ }
+ else
+ {
+ //Convert from system path to file URL!!!
+ fs::path p(extdestination, fs::native);
+ extensionDestination = p.toUTF8();
+ }
+ }
+ else
+ { //called from extension manager
+ extensionPath = *pExtensionPath;
+ sourceRoot = fs::path(extensionPath);
+ extensionDestination = *pDestination;
+ }
+ //check if -src option was used. This option must not be used
+ //when extension help is compiled.
+ if (bSrcOption)
+ {
+ std::stringstream aStrStream;
+ aStrStream << "-src must not be used together with -extsource missing" << std::endl;
+ throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
+ }
+ }
+
if (!bExtensionMode && zipdir.empty())
{
std::stringstream aStrStream;
aStrStream << "no index dir given" << std::endl;
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
}
- if (!bExtensionMode && idxCaptionStylesheet.empty())
+
+ if (!bExtensionMode && idxCaptionStylesheet.empty()
+ || !extsource.empty() && idxCaptionStylesheet.empty())
{
+ //No extension mode and extension mode using commandline
+ //!extsource.empty indicates extension mode using commandline
+ // -idxcaption paramter is required
std::stringstream aStrStream;
aStrStream << "no index caption stylesheet given" << std::endl;
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
}
- else if ( bExtensionMode )
+ else if ( bExtensionMode && extsource.empty())
{
- rtl::OUString aIdxCaptionPathFileURL( aOfficeHelpPath );
+ //This part is used when compileExtensionHelp is called from the extensions manager.
+ //If extension help is compiled using helplinker in the build process
+ rtl::OUString aIdxCaptionPathFileURL( *pOfficeHelpPath );
aIdxCaptionPathFileURL += rtl::OUString::createFromAscii( "/idxcaption.xsl" );
rtl::OString aOStr_IdxCaptionPathFileURL( rtl::OUStringToOString
@@ -956,15 +1021,23 @@ void HelpLinker::main( std::vector<std::string> &args,
idxCaptionStylesheet = fs::path( aStdStr_IdxCaptionPathFileURL );
}
- if (!bExtensionMode && idxContentStylesheet.empty())
+
+ if (!bExtensionMode && idxContentStylesheet.empty()
+ || !extsource.empty() && idxContentStylesheet.empty())
{
+ //No extension mode and extension mode using commandline
+ //!extsource.empty indicates extension mode using commandline
+ // -idxcontent paramter is required
std::stringstream aStrStream;
aStrStream << "no index content stylesheet given" << std::endl;
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
}
- else if ( bExtensionMode )
+ else if ( bExtensionMode && extsource.empty())
{
- rtl::OUString aIdxContentPathFileURL( aOfficeHelpPath );
+ //If extension help is compiled using helplinker in the build process
+ //then -idxcontent must be supplied
+ //This part is used when compileExtensionHelp is called from the extensions manager.
+ rtl::OUString aIdxContentPathFileURL( *pOfficeHelpPath );
aIdxContentPathFileURL += rtl::OUString::createFromAscii( "/idxcontent.xsl" );
rtl::OString aOStr_IdxContentPathFileURL( rtl::OUStringToOString
diff --git a/libegg/source/eggtrayicon.c b/libegg/source/eggtrayicon.c
index 603e66fbc99d..a03bbd00b9ea 100644
--- a/libegg/source/eggtrayicon.c
+++ b/libegg/source/eggtrayicon.c
@@ -230,10 +230,11 @@ egg_tray_icon_manager_filter (GdkXEvent *xevent, GdkEvent *event, gpointer user_
{
EggTrayIcon *icon = user_data;
XEvent *xev = (XEvent *)xevent;
+ (void)event;
if (xev->xany.type == ClientMessage &&
xev->xclient.message_type == icon->manager_atom &&
- xev->xclient.data.l[1] == icon->selection_atom)
+ (Atom)(xev->xclient.data.l[1]) == icon->selection_atom)
{
egg_tray_icon_update_manager_window (icon, TRUE);
}
@@ -383,6 +384,7 @@ egg_tray_icon_manager_window_destroyed (EggTrayIcon *icon)
static gboolean
transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
{
+ (void)user_data;
gdk_window_clear_area (widget->window, event->area.x, event->area.y,
event->area.width, event->area.height);
return FALSE;
@@ -392,6 +394,8 @@ static void
make_transparent_again (GtkWidget *widget, GtkStyle *previous_style,
gpointer user_data)
{
+ (void)previous_style;
+ (void)user_data;
gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
}
@@ -401,6 +405,7 @@ make_transparent (GtkWidget *widget, gpointer user_data)
if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget))
return;
+ (void)user_data;
gtk_widget_set_app_paintable (widget, TRUE);
gtk_widget_set_double_buffered (widget, FALSE);
gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
diff --git a/libegg/source/makefile.mk b/libegg/source/makefile.mk
index e1dae4abcaa2..3bc9b808b15a 100644
--- a/libegg/source/makefile.mk
+++ b/libegg/source/makefile.mk
@@ -63,7 +63,7 @@ SHL1LIBS= $(SLB)$/eggtray.lib
# --- Targets ----------------------------------
.ENDIF # L10N_framework
-.IF "$(OS)$(CPU)" == "LINUXX"
+.IF "$(OS)$(CPU)" == "LINUXX" && "$(LIBRARY_PATH)" != ""
EXTRALIBPATHS+=-L$(LIBRARY_PATH)
.ENDIF # "$(OS)$(CPU)" == "LINUXX"
.INCLUDE : target.mk
diff --git a/more_fonts/fonts/ttf_dejavu/makefile.mk b/more_fonts/fonts/ttf_dejavu/makefile.mk
index f9fa78a7664b..090661bbde02 100644
--- a/more_fonts/fonts/ttf_dejavu/makefile.mk
+++ b/more_fonts/fonts/ttf_dejavu/makefile.mk
@@ -36,9 +36,9 @@ TARGET=ttf_dejavu
# --- Files --------------------------------------------------------
-TARFILE_NAME=dejavu-fonts-ttf-2.30
-TARFILE_MD5=fe5b3e2b7c4577f30dc001054365653e
-TARFILE_ROOTDIR=dejavu-fonts-ttf-2.30
+TARFILE_NAME=dejavu-fonts-ttf-2.32
+TARFILE_MD5=37282537d0ed1a087b1c8f050dc812d9
+TARFILE_ROOTDIR=dejavu-fonts-ttf-2.32
PATCH_FILES=
diff --git a/more_fonts/prj/d.lst b/more_fonts/prj/d.lst
index 261aae0b2d28..6dba097941ac 100644
--- a/more_fonts/prj/d.lst
+++ b/more_fonts/prj/d.lst
@@ -1,8 +1,8 @@
mkdir: %COMMON_DEST%\pck%_EXT%
..\fonts\fc_local.conf %COMMON_DEST%\pck%_EXT%\fc_local.conf
# TODO: replace explicit versions by wildcard when the build system learns to handle them
-..\%__SRC%\misc\build\dejavu-fonts-ttf-2.30\ttf\*.ttf %COMMON_DEST%\pck%_EXT%\*.ttf
-..\%__SRC%\misc\build\dejavu-fonts-ttf-2.30\LICENSE %COMMON_DEST%\pck%_EXT%\LICENSE_dejavu
+..\%__SRC%\misc\build\dejavu-fonts-ttf-2.32\ttf\*.ttf %COMMON_DEST%\pck%_EXT%\*.ttf
+..\%__SRC%\misc\build\dejavu-fonts-ttf-2.32\LICENSE %COMMON_DEST%\pck%_EXT%\LICENSE_dejavu
..\%__SRC%\misc\build\liberation-fonts-ttf-1.06.0.20100721/Liberation*.ttf %COMMON_DEST%\pck%_EXT%\*.ttf
..\%__SRC%\misc\build\liberation-fonts-ttf-1.06.0.20100721/License.txt %COMMON_DEST%\pck%_EXT%\LICENSE_liberation
..\%__SRC%\misc\build\gentiumbasic-fonts-1.10\*.ttf %COMMON_DEST%\pck%_EXT%\*.ttf
diff --git a/moz/makefile.mk b/moz/makefile.mk
index 9629f7138b74..feb2c50343ee 100644
--- a/moz/makefile.mk
+++ b/moz/makefile.mk
@@ -86,7 +86,8 @@ PATCH_FILES = \
patches/dtoa.patch \
patches/respect_disable_pango.patch \
patches/arm_build_fix.patch \
- patches/link_fontconfig.patch
+ patches/link_fontconfig.patch \
+ patches/brokenmakefile.patch
# This file is needed for the W32 build when BUILD_MOZAB is set
# (currently only vc8/vs2005 is supported when BUILD_MOZAB is set)
diff --git a/moz/patches/brokenmakefile.patch b/moz/patches/brokenmakefile.patch
new file mode 100644
index 000000000000..20d88014b932
--- /dev/null
+++ b/moz/patches/brokenmakefile.patch
@@ -0,0 +1,13 @@
+--- misc/mozilla/mailnews/extensions/smime/build/Makefile.in 2010-09-04 16:00:38.000000000 +0100
++++ misc/build/mozilla/mailnews/extensions/smime/build/Makefile.in 2010-09-04 16:02:24.000000000 +0100
+@@ -79,10 +79,6 @@
+ $(DIST)/lib/$(LIB_PREFIX)msgsmime_s.$(LIB_SUFFIX) \
+ $(NULL)
+
+-ifndef MOZ_STATIC_MAIL_BUILD
+-SHARED_LIBRARY_LIBS + = $(DIST)/lib/$(LIB_PREFIX)msgbsutl_s.$(LIB_SUFFIX)
+-endif
+-
+ EXTRA_DSO_LDOPTS = \
+ $(LIBS_DIR) \
+ $(EXTRA_DSO_LIBS) \
diff --git a/offapi/com/sun/star/awt/UnoControlComboBoxModel.idl b/offapi/com/sun/star/awt/UnoControlComboBoxModel.idl
index 83057417edbf..eedd7b78c346 100644
--- a/offapi/com/sun/star/awt/UnoControlComboBoxModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlComboBoxModel.idl
@@ -39,6 +39,7 @@
#include <com/sun/star/util/Color.idl>
#endif
+#include <com/sun/star/awt/XItemList.idl>
//=============================================================================
@@ -225,6 +226,11 @@ published service UnoControlComboBoxModel
this is possible.</p>
*/
[optional, property] short MouseWheelBehavior;
+
+ /** allows mmanipulating the list of items in the combo box more fine-grained than the
+ <member>StringItemList</member> property.
+ */
+ [optional] interface XItemList;
};
//=============================================================================
diff --git a/offapi/com/sun/star/awt/UnoControlListBoxModel.idl b/offapi/com/sun/star/awt/UnoControlListBoxModel.idl
index 1cd36de93231..1ecf338bf095 100644
--- a/offapi/com/sun/star/awt/UnoControlListBoxModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlListBoxModel.idl
@@ -213,8 +213,19 @@ published service UnoControlListBoxModel
/** allows mmanipulating the list of items in the list box more fine-grained than the
<member>StringItemList</member> property.
+
+ @since OOo 3.3
*/
[optional] interface XItemList;
+
+ /** specifies where an item separator - a horizontal line - is drawn.
+
+ <p>If this is not <NULL/>, then a horizontal line will be drawn between the item at the given position,
+ and the following item.</p>
+
+ @since OOo 3.3
+ */
+ [optional, property, maybevoid] short ItemSeparatorPos;
};
//=============================================================================
diff --git a/offapi/com/sun/star/configuration/XUpdate.idl b/offapi/com/sun/star/configuration/XUpdate.idl
index 7514cbcb1b7f..c3316ea5dc45 100644
--- a/offapi/com/sun/star/configuration/XUpdate.idl
+++ b/offapi/com/sun/star/configuration/XUpdate.idl
@@ -40,7 +40,13 @@ module com { module sun { module star { module configuration {
*/
interface XUpdate {
void insertExtensionXcsFile([in] boolean shared, [in] string fileUri);
+
void insertExtensionXcuFile([in] boolean shared, [in] string fileUri);
+
+ void removeExtensionXcuFile([in] string fileUri);
+ // fileUri must exactly match corresponding insertExtensionXcuFile
+ // argument
+
void insertModificationXcuFile(
[in] string fileUri, [in] sequence< string > includedPaths,
[in] sequence< string > excludedPaths);
diff --git a/offapi/com/sun/star/sheet/DataPilotSourceDimension.idl b/offapi/com/sun/star/sheet/DataPilotSourceDimension.idl
index bb652252c33e..9f5961731a05 100644
--- a/offapi/com/sun/star/sheet/DataPilotSourceDimension.idl
+++ b/offapi/com/sun/star/sheet/DataPilotSourceDimension.idl
@@ -156,6 +156,14 @@ published service DataPilotSourceDimension
*/
[property] sequence< com::sun::star::sheet::TableFilterField > Filter;
+ //-------------------------------------------------------------------------
+
+ /** contains flags that control the usage of the dimension.
+
+ @see com::sun::star::sheet::DimensionFlags
+ */
+ [readonly, property, optional] long Flags;
+
};
//=============================================================================
diff --git a/offapi/com/sun/star/sheet/DimensionFlags.idl b/offapi/com/sun/star/sheet/DimensionFlags.idl
new file mode 100644
index 000000000000..2edb2368e863
--- /dev/null
+++ b/offapi/com/sun/star/sheet/DimensionFlags.idl
@@ -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.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sheet_DimensionFlags_idl__
+#define __com_sun_star_sheet_DimensionFlags_idl__
+
+//=============================================================================
+
+module com { module sun { module star { module sheet {
+
+//=============================================================================
+
+/** used to specify flags for a dimension in a data pilot source.
+
+ @see com::sun::star::sheet::DataPilotSourceDimension
+ */
+published constants DimensionFlags
+{
+ //-------------------------------------------------------------------------
+
+ /** The dimension cannot be used in column orientation.
+ */
+ const long NO_COLUMN_ORIENTATION = 1;
+
+ //-------------------------------------------------------------------------
+
+ /** The dimension cannot be used in row orientation.
+ */
+ const long NO_ROW_ORIENTATION = 2;
+
+ //-------------------------------------------------------------------------
+
+ /** The dimension cannot be used in page orientation.
+ */
+ const long NO_PAGE_ORIENTATION = 4;
+
+ //-------------------------------------------------------------------------
+
+ /** The dimension cannot be used in data orientation.
+ */
+ const long NO_DATA_ORIENTATION = 8;
+
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/sheet/makefile.mk b/offapi/com/sun/star/sheet/makefile.mk
index 016378178f29..65e8d5c40491 100644
--- a/offapi/com/sun/star/sheet/makefile.mk
+++ b/offapi/com/sun/star/sheet/makefile.mk
@@ -122,6 +122,7 @@ IDLFILES=\
DatabaseRange.idl\
DatabaseRanges.idl\
DatabaseRangesEnumeration.idl\
+ DimensionFlags.idl\
DocumentSettings.idl\
ExternalDocLink.idl\
ExternalDocLinks.idl\
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 02e05a932952..9bc07c592f0f 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -4368,69 +4368,133 @@
<info>
<desc>Specifies default settings of graphic export dialogs.</desc>
</info>
- <group oor:name="BMP">
+ <prop oor:name="PixelExportUnit" oor:type="xs:int">
+ <info>
+ <desc>Specifies the unit default that is used in the the graphic export dialog if exporting pixel graphics.</desc>
+ </info>
+ <constraints>
+ <enumeration oor:value="0">
+ <info>
+ <desc>inches</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="1">
+ <info>
+ <desc>cm</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="2">
+ <info>
+ <desc>mm</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="3">
+ <info>
+ <desc>points</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="4">
+ <info>
+ <desc>pica</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="5">
+ <info>
+ <desc>pixels</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="-1">
+ <info>
+ <desc>default (depends to the metric settings in tools/options)</desc>
+ </info>
+ </enumeration>
+ </constraints>
+ <value>-1</value>
+ </prop>
+ <prop oor:name="PixelExportResolutionUnit" oor:type="xs:int">
+ <info>
+ <desc>Specifies the unit default for the resolution that is used in the the graphic export dialog if exporting pixel graphics.</desc>
+ </info>
+ <constraints>
+ <enumeration oor:value="0">
+ <info>
+ <desc>pixels/inch</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="1">
+ <info>
+ <desc>pixels/cm</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="2">
+ <info>
+ <desc>pixels/meter</desc>
+ </info>
+ </enumeration>
+ </constraints>
+ <value>0</value>
+ </prop>
+ <prop oor:name="PixelExportResolution" oor:type="xs:int">
+ <info>
+ <desc>Specifies the logical width of a graphic. [UNIT=1/100 mm].</desc>
+ </info>
+ <constraints>
+ <minInclusive oor:value="1">
+ <info>
+ <desc>Represents the lowest value that can be entered in the dialog.</desc>
+ </info>
+ </minInclusive>
+ </constraints>
+ <value>96</value>
+ </prop>
+ <prop oor:name="MaxFilesizeForRealtimePreview" oor:type="xs:int">
+ <info>
+ <desc>Specifies the maximum raw graphic size in bytes up to which the realtime preview is enabled, for fast computers this value may be enlarged</desc>
+ </info>
+ <value>4000000</value>
+ </prop>
+ <prop oor:name="VectorExportUnit" oor:type="xs:int">
+ <info>
+ <desc>Specifies the unit default that is used in the the graphic export dialog if exporting vector graphics.</desc>
+ </info>
+ <constraints>
+ <enumeration oor:value="0">
+ <info>
+ <desc>inches</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="1">
+ <info>
+ <desc>cm</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="2">
+ <info>
+ <desc>mm</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="3">
+ <info>
+ <desc>points</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="4">
+ <info>
+ <desc>pica</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="-1">
+ <info>
+ <desc>default (depends to the metric settings in tools/options)</desc>
+ </info>
+ </enumeration>
+ </constraints>
+ <value>-1</value>
+ </prop>
+ <group oor:name="BMP">
<info>
<desc>Specifies default settings of the Windows Bitmap export dialog.</desc>
</info>
- <prop oor:name="ExportMode" oor:type="xs:int">
- <!-- OldPath: BMP-EXPORT-MODE -->
- <!-- OldLocation: fltopt.ini -->
- <!-- UIHints: File Export Filetype BMP-MS Windows - [dialog] BMP Options -->
- <info>
- <desc>Specifies usable export modes.</desc>
- <label>Mode - Original / Resolution / Size</label>
- </info>
- <constraints>
- <enumeration oor:value="0">
- <info>
- <desc>Original size</desc>
- </info>
- </enumeration>
- <enumeration oor:value="1">
- <info>
- <desc>Logical size (dpi/pixel ratio)</desc>
- </info>
- </enumeration>
- <enumeration oor:value="2">
- <info>
- <desc>Given size</desc>
- </info>
- </enumeration>
- </constraints>
- <value>0</value>
- </prop>
- <prop oor:name="Resolution" oor:type="xs:int">
- <!-- OldPath: BMP-EXPORT-RES -->
- <!-- OldLocation: fltopt.ini -->
- <!-- UIHints: File Export Filetype BMP-MS Windows - [dialog] BMP Options -->
- <info>
- <desc>Specifies resolution which is to be used if export mode is 1. [UNIT=dpi]</desc>
- <label>Resolution</label>
- </info>
- <constraints>
- <enumeration oor:value="75">
- <info>
- <desc>75</desc>
- </info>
- </enumeration>
- <enumeration oor:value="150">
- <info>
- <desc>150</desc>
- </info>
- </enumeration>
- <enumeration oor:value="300">
- <info>
- <desc>300</desc>
- </info>
- </enumeration>
- <enumeration oor:value="600">
- <info>
- <desc>600</desc>
- </info>
- </enumeration>
- </constraints>
- <value>75</value>
- </prop>
<prop oor:name="Color" oor:type="xs:int">
<!-- OldLocation: fltopt.ini -->
<!-- UIHints: File Export Filetype BMP-MS Windows - [dialog] BMP Options -->
@@ -4492,13 +4556,6 @@
</info>
<value>true</value>
</prop>
- <node-ref oor:name="Size" oor:node-type="LogicalGraphicSize">
- <info>
- <desc>Specifies the logical size of a graphic. [UNIT=1/100 mm].</desc>
- </info>
- <!-- OldLocation: fltopt.ini -->
- <!-- UIHints: File Export Filetype BMP-MS Windows - [dialog] BMP Options -->
- </node-ref>
</group>
<group oor:name="EPS">
<!-- OldLocation: fltopt.ini -->
@@ -4706,72 +4763,6 @@
<value>0</value>
</prop>
</group>
- <group oor:name="MET">
- <info>
- <desc>Specifies if graphics are exported with the original- or selected size.</desc>
- </info>
- <prop oor:name="ExportMode" oor:type="xs:int">
- <!-- OldPath: MET-EXPORT-MODE -->
- <!-- OldLocation: fltopt.ini -->
- <!-- UIHints: File Export Filetype MET-OS/2 Metafile -->
- <info>
- <desc>Specifies if graphics are exported with the original- or selected size.</desc>
- </info>
- <constraints>
- <enumeration oor:value="0">
- <info>
- <desc>Original size</desc>
- </info>
- </enumeration>
- <enumeration oor:value="1">
- <info>
- <desc>Given size</desc>
- </info>
- </enumeration>
- </constraints>
- <value>0</value>
- </prop>
- <node-ref oor:name="Size" oor:node-type="LogicalGraphicSize">
- <info>
- <desc>Specifies the logical size of a graphic. [UNIT=1/100 mm].</desc>
- </info>
- <!-- OldLocation: fltopt.ini -->
- <!-- UIHints: File Export Filetype MET-MS Windows - [dialog] MET Options -->
- </node-ref>
- </group>
- <group oor:name="PCT">
- <info>
- <desc>Specifies default settings of the PCT - Mac Pict export dialog.</desc>
- </info>
- <prop oor:name="ExportMode" oor:type="xs:int">
- <!-- OldPath: PCT-EXPORT-MODE -->
- <!-- OldLocation: fltopt.ini -->
- <!-- UIHints: File Export Filetype PCT-Mac Pict -->
- <info>
- <desc>Specifies if graphics are exported with original- or selected size.</desc>
- </info>
- <constraints>
- <enumeration oor:value="0">
- <info>
- <desc>Original size</desc>
- </info>
- </enumeration>
- <enumeration oor:value="1">
- <info>
- <desc>Given size</desc>
- </info>
- </enumeration>
- </constraints>
- <value>0</value>
- </prop>
- <node-ref oor:name="Size" oor:node-type="LogicalGraphicSize">
- <info>
- <desc>Specifies the logical size of a graphic. [UNIT=1/100 mm].</desc>
- </info>
- <!-- OldLocation: fltopt.ini -->
- <!-- UIHints: File Export Filetype PCT-MS Windows - [dialog] PCT Options -->
- </node-ref>
- </group>
<group oor:name="PBM">
<info>
<desc>Specifies default settings of the PBM - Portable Bitmap export dialog.</desc>
@@ -4850,105 +4841,6 @@
<value>1</value>
</prop>
</group>
- <group oor:name="SVM">
- <info>
- <desc>Specifies default settings of the SVM - StarView Meta File export dialog.</desc>
- </info>
- <prop oor:name="ExportMode" oor:type="xs:int">
- <!-- OldPath: SVM-EXPORT-MODE -->
- <!-- OldLocation: fltopt.ini -->
- <!-- UIHints: File Export Filetype SVM - StarView Metafile -->
- <info>
- <desc>Specifies if graphics should be exported with the original- or selected size.</desc>
- </info>
- <constraints>
- <enumeration oor:value="0">
- <info>
- <desc>Original size</desc>
- </info>
- </enumeration>
- <enumeration oor:value="1">
- <info>
- <desc>Given size</desc>
- </info>
- </enumeration>
- </constraints>
- <value>0</value>
- </prop>
- <node-ref oor:name="Size" oor:node-type="LogicalGraphicSize">
- <info>
- <desc>Specifies the logical size of a graphic. [UNIT=1/100 mm].</desc>
- </info>
- <!-- OldLocation: fltopt.ini -->
- <!-- UIHints: File Export Filetype SVM - StarView Metafile - [dialog] SVM Options -->
- </node-ref>
- </group>
- <group oor:name="WMF">
- <info>
- <desc>Specifies default settings of the WMF - Windows Metafile export dialog.</desc>
- </info>
- <prop oor:name="ExportMode" oor:type="xs:int">
- <!-- OldPath: WMF-EXPORT-MODE -->
- <!-- OldLocation: fltopt.ini -->
- <!-- UIHints: File Export Filetype WMF -MS Windows Metafile -->
- <info>
- <desc>Specifies if graphics should be exported with the original- or selected size.</desc>
- </info>
- <constraints>
- <enumeration oor:value="0">
- <info>
- <desc>Original size</desc>
- </info>
- </enumeration>
- <enumeration oor:value="1">
- <info>
- <desc>Given size</desc>
- </info>
- </enumeration>
- </constraints>
- <value>0</value>
- </prop>
- <node-ref oor:name="Size" oor:node-type="LogicalGraphicSize">
- <info>
- <desc>Specifies the logical size of a graphic. [UNIT=1/100 mm].</desc>
- </info>
- <!-- OldLocation: fltopt.ini -->
- <!-- UIHints: File Export Filetype WMF - MS Windows Metafile - [dialog] WMF Options -->
- </node-ref>
- </group>
- <group oor:name="EMF">
- <info>
- <desc>Specifies default settings of the EMF - Enhanced Metafile export dialog.</desc>
- </info>
- <prop oor:name="ExportMode" oor:type="xs:int">
- <!-- OldPath: EMF-EXPORT-MODE -->
- <!-- OldLocation: fltopt.ini -->
- <!-- UIHints: File - Export -->
- <info>
- <desc>Specifies if graphics should be exported with the original- or selected size.</desc>
- </info>
- <constraints>
- <enumeration oor:value="0">
- <info>
- <desc>Original size</desc>
- </info>
- </enumeration>
- <enumeration oor:value="1">
- <info>
- <desc>Given size</desc>
- </info>
- </enumeration>
- </constraints>
- <value>0</value>
- </prop>
- <node-ref oor:name="Size" oor:node-type="LogicalGraphicSize">
- <info>
- <desc>Specifies the logical size of a graphic. [UNIT=1/100 mm].</desc>
- </info>
- <!-- OldLocation: fltopt.ini -->
- <!-- UIHints: File Export Filetype EMF - Enhanced Metafile - [dialog] EMF Options -->
- </node-ref>
- </group>
<group oor:name="PNG">
<info>
<desc>Specifies default settings of the PNG - Portable Network Graphic export dialog.</desc>
diff --git a/officecfg/registry/schema/org/openoffice/Setup.xcs b/officecfg/registry/schema/org/openoffice/Setup.xcs
index 76c4bb17782b..62d3fdcce85d 100644
--- a/officecfg/registry/schema/org/openoffice/Setup.xcs
+++ b/officecfg/registry/schema/org/openoffice/Setup.xcs
@@ -395,7 +395,14 @@
<author>AS</author>
<desc>Contains all of the document factories that were installed during setup.</desc>
</info>
- </set>
+ </set>
+ <prop oor:name="OfficeRestartInProgress" oor:type="xs:boolean">
+ <info>
+ <author>MAV</author>
+ <desc>The entry specifies that we are in restart process</desc>
+ </info>
+ <value>false</value>
+ </prop>
</group>
<group oor:name="L10N">
<info>
diff --git a/ooo_custom_images/dev_nologo_broffice/introabout/intro.png b/ooo_custom_images/dev_nologo_broffice/introabout/intro.png
index 16951ee34a8e..b2cd51dc7999 100755..100644
--- a/ooo_custom_images/dev_nologo_broffice/introabout/intro.png
+++ b/ooo_custom_images/dev_nologo_broffice/introabout/intro.png
Binary files differ
diff --git a/ooo_custom_images/nologo_broffice/introabout/intro.png b/ooo_custom_images/nologo_broffice/introabout/intro.png
index 4f8c83890b04..20c495182648 100755..100644
--- a/ooo_custom_images/nologo_broffice/introabout/intro.png
+++ b/ooo_custom_images/nologo_broffice/introabout/intro.png
Binary files differ
diff --git a/oovbaapi/ooo/vba/excel/XGlobals.idl b/oovbaapi/ooo/vba/excel/XGlobals.idl
index 6ed51b2aa4c4..d79196b00927 100644
--- a/oovbaapi/ooo/vba/excel/XGlobals.idl
+++ b/oovbaapi/ooo/vba/excel/XGlobals.idl
@@ -42,6 +42,10 @@
#ifndef __ooo_vba_XAssistant_idl__
#include <ooo/vba/XAssistant.idl>
#endif
+#ifndef __ooo_vba_excel_XApplication_idl__
+#include <ooo/vba/excel/XApplication.idl>
+#endif
+
module ooo { module vba { module excel {
interface XRange;
@@ -55,6 +59,9 @@ interface XGlobals: com::sun::star::uno::XInterface
[attribute, readonly] ooo::vba::XAssistant Assistant;
[attribute, readonly] any Selection;
[attribute, readonly] XWorkbook ThisWorkbook;
+ [attribute, readonly] ooo::vba::excel::XApplication Excel;
+ [attribute, readonly] any Debug;
+
void Calculate() raises(com::sun::star::script::BasicErrorException);
XRange Cells([in] any RowIndex, [in] any ColumnIndex);
diff --git a/oovbaapi/ooo/vba/excel/XWorksheet.idl b/oovbaapi/ooo/vba/excel/XWorksheet.idl
index fb6261bc06c0..3eb8337798d6 100644
--- a/oovbaapi/ooo/vba/excel/XWorksheet.idl
+++ b/oovbaapi/ooo/vba/excel/XWorksheet.idl
@@ -66,12 +66,14 @@ interface XWorksheet
[attribute, readonly] boolean ProtectionMode;
[attribute, readonly] boolean ProtectContents;
[attribute, readonly] boolean ProtectDrawingObjects;
+ [attribute, readonly] boolean ProtectScenarios;
[attribute, readonly] XRange UsedRange;
[attribute, readonly] XWorksheet Next;
[attribute, readonly] XWorksheet Previous;
[attribute, readonly] string CodeName;
[attribute, readonly] short Index;
[attribute] long EnableSelection;
+ [attribute] boolean AutoFilterMode;
void Activate();
void Calculate( );
diff --git a/oox/prj/d.lst b/oox/prj/d.lst
index 482a270926a3..f20db064d7b2 100644
--- a/oox/prj/d.lst
+++ b/oox/prj/d.lst
@@ -36,7 +36,6 @@ mkdir: %_DEST%\inc%_EXT%\oox\xls
..\inc\oox\ole\vbaproject.hxx %_DEST%\inc%_EXT%\oox\ole\vbaproject.hxx
..\inc\oox\vml\vmldrawing.hxx %_DEST%\inc%_EXT%\oox\vml\vmldrawing.hxx
..\inc\oox\vml\vmlshape.hxx %_DEST%\inc%_EXT%\oox\vml\vmlshape.hxx
-..\inc\oox\xls\excelvbaproject.hxx %_DEST%\inc%_EXT%\oox\xls\excelvbaproject.hxx
dos: sh -c "if test %OS% = MACOSX; then create-bundle %_DEST%\lib%_EXT%\*.dylib; fi"
diff --git a/postprocess/checkdeliver/checkdeliver.pl b/postprocess/checkdeliver/checkdeliver.pl
index a2c3800940ca..45005591c9a2 100644
--- a/postprocess/checkdeliver/checkdeliver.pl
+++ b/postprocess/checkdeliver/checkdeliver.pl
@@ -165,7 +165,8 @@ sub check
foreach ( <DELIVERLOG> ) {
next if ( /^LINK / );
# What's this modules' repository?
- if ( /COPY (\w[\w\s-]*?)\/$module\/prj\/build.lst/ ) {
+ if ( /COPY\s+(.+?)\/$module\/prj\/build.lst/ ) {
+# if ( /COPY (\w[\w\s-]*?)\/$module\/prj\/build.lst/ ) {
$repository = $1;
}
# For now we concentrate on binaries, located in 'bin' or 'lib' and 'misc/build/<...>/[bin|lib]'.
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java
index 74fe1728fc5f..f3c5ef383057 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java
@@ -81,7 +81,15 @@ public class TableCellLayoutController extends SectionLayoutController
}
else if ( "float".equals(valueType))
{
- attributeMap.setAttribute(OfficeNamespaces.OFFICE_NS, FormatValueUtility.VALUE, "1.#NAN");
+ attributeMap.setAttribute(OfficeNamespaces.OFFICE_NS,
+ FormatValueUtility.VALUE, "NaN");
+ }
+ // #i114108#: except on form elements, the only value-type that can
+ // occur without an accomanying value attribute is "string"
+ else if (!"string".equals(valueType))
+ {
+ attributeMap.setAttribute(OfficeNamespaces.OFFICE_NS,
+ FormatValueUtility.VALUE_TYPE, "string");
}
}
catch (Exception e)
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java b/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java
index d4046424e07d..b41252a17089 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java
@@ -138,6 +138,10 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
public static final String VERTICAL_POS = "vertical-pos";
private static final String ZERO_CM = "0cm";
+ /** the verison of the ODF specification to which generated documents
+ * shall conform. */
+ public static final String ODF_VERSION = "1.2";
+
protected static class BufferState
{
@@ -376,7 +380,8 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
rootAttributes.addNamespaceDeclaration("xsd", OfficeNamespaces.XSD_NS);
rootAttributes.addNamespaceDeclaration("xsi", OfficeNamespaces.XSI_NS);
rootAttributes.addNamespaceDeclaration("grddl", OfficeNamespaces.GRDDL_NS);
- rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.2");
+ rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version",
+ ODF_VERSION);
this.rootXmlWriter.writeXmlDeclaration("UTF-8");
this.rootXmlWriter.writeTag(OfficeNamespaces.OFFICE_NS, "document-content", rootAttributes, XmlWriterSupport.OPEN);
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java b/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java
index 9b2e6b33b5f7..54b7d0d0159c 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java
@@ -117,11 +117,11 @@ public class StylesWriter
{
globals
});
- writeAutomaticStylesSection(new OfficeStylesCollection[]
+ writeCommonStylesSection(new OfficeStylesCollection[]
{
globals
});
- writeCommonStylesSection(new OfficeStylesCollection[]
+ writeAutomaticStylesSection(new OfficeStylesCollection[]
{
globals
});
@@ -374,11 +374,12 @@ public class StylesWriter
rootAttributes.addNamespaceDeclaration("xsd", OfficeNamespaces.XSD_NS);
rootAttributes.addNamespaceDeclaration("xsi", OfficeNamespaces.XSI_NS);
rootAttributes.addNamespaceDeclaration("grddl", OfficeNamespaces.GRDDL_NS);
- rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.2");
+ rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version",
+ OfficeDocumentReportTarget.ODF_VERSION);
this.xmlWriter.writeXmlDeclaration("UTF-8");
this.xmlWriter.writeTag(OfficeNamespaces.OFFICE_NS,
- "document-content", rootAttributes, XmlWriterSupport.OPEN);
+ "document-styles", rootAttributes, XmlWriterSupport.OPEN);
}
public void close()
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java b/reportbuilder/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java
index 11351b656ea1..d2c4ebd96e3c 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java
@@ -624,7 +624,9 @@ public class SpreadsheetRawReportTarget extends OfficeDocumentReportTarget
final Section tableColumnProperties = new Section();
tableColumnProperties.setType("table-column-properties");
tableColumnProperties.setNamespace(style.getNamespace());
- tableColumnProperties.setAttribute(style.getNamespace(), "column-width", columnWidth + getUnitsOfMeasure(null));
+ final String width = String.format("%f", columnWidth);
+ tableColumnProperties.setAttribute(style.getNamespace(),
+ "column-width", width + getUnitsOfMeasure(null));
style.addNode(tableColumnProperties);
final AttributeList myAttrList = new AttributeList();
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java b/reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java
index 7c90bf1fd0ec..9f3746086b87 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java
@@ -1269,7 +1269,8 @@ public class TextRawReportTarget extends OfficeDocumentReportTarget
rootAttributes.addNamespaceDeclaration("office", OfficeNamespaces.OFFICE_NS);
rootAttributes.addNamespaceDeclaration("config", OfficeNamespaces.CONFIG);
rootAttributes.addNamespaceDeclaration("ooo", OfficeNamespaces.OO2004_NS);
- rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.0");
+ rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version",
+ OfficeDocumentReportTarget.ODF_VERSION);
final OutputStream outputStream = getOutputRepository().createOutputStream("settings.xml", "text/xml");
final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), createTagDescription());
xmlWriter.setAlwaysAddNamespace(true);
diff --git a/reportbuilder/util/description.xml b/reportbuilder/util/description.xml
index c274526edc06..9461172d55f1 100755..100644
--- a/reportbuilder/util/description.xml
+++ b/reportbuilder/util/description.xml
@@ -3,7 +3,7 @@
xmlns:d="http://openoffice.org/extensions/description/2006"
xmlns:xlink="http://www.w3.org/1999/xlink">
<display-name>
- <name lang="en-US">Oracle Report Builder</name>
+ <name lang="en-US">Report Builder</name>
<!-- <name lang="en-US">Oracle(TM) Report Builder</name> -->
</display-name>
<registration>
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index 3fa6b42e625b..d3a557c3ff6b 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -29,6 +29,7 @@
#include "xmlExportDocumentHandler.hxx"
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/chart2/data/XDatabaseDataProvider.hpp>
+#include <com/sun/star/chart/XComplexDescriptionAccess.hpp>
#include <com/sun/star/reflection/XProxyFactory.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
#include <comphelper/sequence.hxx>
@@ -338,12 +339,27 @@ void SAL_CALL ExportDocumentHandler::initialize( const uno::Sequence< uno::Any >
// set ourself as delegator
m_xProxy->setDelegator( *this );
-
const ::rtl::OUString sCommand = m_xDatabaseDataProvider->getCommand();
if ( sCommand.getLength() )
m_aColumns = ::dbtools::getFieldNamesByCommandDescriptor(m_xDatabaseDataProvider->getActiveConnection()
,m_xDatabaseDataProvider->getCommandType()
,sCommand);
+
+ uno::Reference< chart::XComplexDescriptionAccess > xDataProvider(m_xDatabaseDataProvider,uno::UNO_QUERY);
+ if ( xDataProvider.is() )
+ {
+ m_aColumns.realloc(1);
+ uno::Sequence< uno::Sequence< ::rtl::OUString > > aColumnNames = xDataProvider->getComplexColumnDescriptions();
+ for(sal_Int32 i = 0 ; i < aColumnNames.getLength();++i)
+ {
+ if ( aColumnNames[i].getLength() )
+ {
+ sal_Int32 nCount = m_aColumns.getLength();
+ m_aColumns.realloc(nCount+1);
+ m_aColumns[nCount] = aColumnNames[i][0];
+ }
+ }
+ }
}
// --------------------------------------------------------------------------------
uno::Any SAL_CALL ExportDocumentHandler::queryInterface( const uno::Type& _rType ) throw (uno::RuntimeException)
diff --git a/sal/inc/rtl/math.h b/sal/inc/rtl/math.h
index 872d526b8835..985ce700b049 100644
--- a/sal/inc/rtl/math.h
+++ b/sal/inc/rtl/math.h
@@ -140,9 +140,8 @@ enum rtl_math_DecimalPlaces
/** Conversions analogous to sprintf() using internal rounding.
- +/-HUGE_VAL are converted to "1.#INF" and "-1.#INF", NAN values are
- converted to "1.#NAN" and "-1.#NAN", of course using cDecSeparator instead
- of '.'.
+ +/-HUGE_VAL are converted to "INF" and "-INF", NAN values are
+ converted to "NaN".
@param pResult
Returns the resulting byte string. Must itself not be null, and must point
@@ -216,9 +215,8 @@ void SAL_CALL rtl_math_doubleToString(rtl_String ** pResult,
/** Conversions analogous to sprintf() using internal rounding.
- +/-HUGE_VAL are converted to "1.#INF" and "-1.#INF", NAN values are
- converted to "1.#NAN" and "-1.#NAN", of course using cDecSeparator instead
- of '.'.
+ +/-HUGE_VAL are converted to "INF" and "-INF", NAN values are
+ converted to "NaN".
@param pResult
Returns the resulting Unicode string. Must itself not be null, and must
@@ -296,8 +294,9 @@ void SAL_CALL rtl_math_doubleToUString(rtl_uString ** pResult,
Leading tabs (0x09) and spaces (0x20) are eaten. Overflow returns
+/-HUGE_VAL, underflow 0. In both cases pStatus is set to
rtl_math_ConversionStatus_OutOfRange, otherwise to
- rtl_math_ConversionStatus_Ok. "+/-1.#INF" is recognized as +/-HUGE_VAL,
- pStatus is set to rtl_math_ConversionStatus_OutOfRange. "+/-1.#NAN" is
+ rtl_math_ConversionStatus_Ok. "INF", "-INF" and "+/-1.#INF" are
+ recognized as +/-HUGE_VAL, pStatus is set to
+ rtl_math_ConversionStatus_OutOfRange. "NaN" and "+/-1.#NAN" are
recognized and the value is set to +/-NAN, pStatus is set to
rtl_math_ConversionStatus_Ok.
@@ -333,8 +332,9 @@ double SAL_CALL rtl_math_stringToDouble(
Leading tabs (U+0009) and spaces (U+0020) are eaten. Overflow returns
+/-HUGE_VAL, underflow 0. In both cases pStatus is set to
rtl_math_ConversionStatus_OutOfRange, otherwise to
- rtl_math_ConversionStatus_Ok. "+/-1.#INF" is recognized as +/-HUGE_VAL,
- pStatus is set to rtl_math_ConversionStatus_OutOfRange. "+/-1.#NAN" is
+ rtl_math_ConversionStatus_Ok. "INF", "-INF" and "+/-1.#INF" are
+ recognized as +/-HUGE_VAL, pStatus is set to
+ rtl_math_ConversionStatus_OutOfRange. "NaN" and "+/-1.#NAN" are
recognized and the value is set to +/-NAN, pStatus is set to
rtl_math_ConversionStatus_Ok.
diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx
index f893f7520d40..a74baaefc057 100644
--- a/sal/osl/w32/signal.cxx
+++ b/sal/osl/w32/signal.cxx
@@ -188,7 +188,7 @@ static BOOL ReportCrash( LPEXCEPTION_POINTERS lpEP )
sntprintf( szBuffer, elementsof(szBuffer),
_T("%s -p %u -excp 0x%p -t %u%s"),
- aPath,
+ static_cast<sal_Char*>( aPath ),
GetCurrentProcessId(),
lpEP,
GetCurrentThreadId(),
diff --git a/sal/rtl/source/math.cxx b/sal/rtl/source/math.cxx
index 7d0e3cea0c0d..d983c5726230 100644
--- a/sal/rtl/source/math.cxx
+++ b/sal/rtl/source/math.cxx
@@ -318,44 +318,37 @@ inline void doubleToString(StringT ** pResult,
if ( rtl::math::isNan( fValue ) )
{
- sal_Int32 nCapacity = RTL_CONSTASCII_LENGTH("-1.#NAN");
+ // #i112652# XMLSchema-2
+ sal_Int32 nCapacity = RTL_CONSTASCII_LENGTH("NaN");
if (pResultCapacity == 0)
{
pResultCapacity = &nCapacity;
T::createBuffer(pResult, pResultCapacity);
nResultOffset = 0;
}
-
- if ( bSign )
- T::appendAscii(pResult, pResultCapacity, &nResultOffset,
- RTL_CONSTASCII_STRINGPARAM("-"));
- T::appendAscii(pResult, pResultCapacity, &nResultOffset,
- RTL_CONSTASCII_STRINGPARAM("1"));
- T::appendChar(pResult, pResultCapacity, &nResultOffset, cDecSeparator);
T::appendAscii(pResult, pResultCapacity, &nResultOffset,
- RTL_CONSTASCII_STRINGPARAM("#NAN"));
+ RTL_CONSTASCII_STRINGPARAM("NaN"));
+
return;
}
bool bHuge = fValue == HUGE_VAL; // g++ 3.0.1 requires it this way...
if ( bHuge || rtl::math::isInf( fValue ) )
{
- sal_Int32 nCapacity = RTL_CONSTASCII_LENGTH("-1.#INF");
+ // #i112652# XMLSchema-2
+ sal_Int32 nCapacity = RTL_CONSTASCII_LENGTH("-INF");
if (pResultCapacity == 0)
{
pResultCapacity = &nCapacity;
T::createBuffer(pResult, pResultCapacity);
nResultOffset = 0;
}
-
if ( bSign )
T::appendAscii(pResult, pResultCapacity, &nResultOffset,
RTL_CONSTASCII_STRINGPARAM("-"));
T::appendAscii(pResult, pResultCapacity, &nResultOffset,
- RTL_CONSTASCII_STRINGPARAM("1"));
- T::appendChar(pResult, pResultCapacity, &nResultOffset, cDecSeparator);
- T::appendAscii(pResult, pResultCapacity, &nResultOffset,
- RTL_CONSTASCII_STRINGPARAM("#INF"));
+ RTL_CONSTASCII_STRINGPARAM("INF"));
+
return;
}
@@ -736,158 +729,185 @@ inline double stringToDouble(CharT const * pBegin, CharT const * pEnd,
++p0;
}
CharT const * p = p0;
+ bool bDone = false;
- // leading zeros and group separators may be safely ignored
- while (p != pEnd && (*p == CharT('0') || *p == cGroupSeparator))
- ++p;
-
- long nValExp = 0; // carry along exponent of mantissa
-
- // integer part of mantissa
- for (; p != pEnd; ++p)
+ // #i112652# XMLSchema-2
+ if (3 >= (pEnd - p))
{
- CharT c = *p;
- if (isDigit(c))
+ if ((CharT('N') == p[0]) && (CharT('a') == p[1])
+ && (CharT('N') == p[2]))
{
- fVal = fVal * 10.0 + static_cast< double >( c - CharT('0') );
- ++nValExp;
+ p += 3;
+ rtl::math::setNan( &fVal );
+ bDone = true;
+ }
+ else if ((CharT('I') == p[0]) && (CharT('N') == p[1])
+ && (CharT('F') == p[2]))
+ {
+ p += 3;
+ fVal = HUGE_VAL;
+ eStatus = rtl_math_ConversionStatus_OutOfRange;
+ bDone = true;
}
- else if (c != cGroupSeparator)
- break;
}
- // fraction part of mantissa
- if (p != pEnd && *p == cDecSeparator)
+ if (!bDone) // do not recognize e.g. NaN1.23
{
- ++p;
- double fFrac = 0.0;
- long nFracExp = 0;
- while (p != pEnd && *p == CharT('0'))
- {
- --nFracExp;
+ // leading zeros and group separators may be safely ignored
+ while (p != pEnd && (*p == CharT('0') || *p == cGroupSeparator))
++p;
- }
- if ( nValExp == 0 )
- nValExp = nFracExp - 1; // no integer part => fraction exponent
- // one decimal digit needs ld(10) ~= 3.32 bits
- static const int nSigs = (DBL_MANT_DIG / 3) + 1;
- int nDigs = 0;
+
+ long nValExp = 0; // carry along exponent of mantissa
+
+ // integer part of mantissa
for (; p != pEnd; ++p)
{
CharT c = *p;
- if (!isDigit(c))
- break;
- if ( nDigs < nSigs )
- { // further digits (more than nSigs) don't have any significance
- fFrac = fFrac * 10.0 + static_cast< double >( c - CharT('0') );
- --nFracExp;
- ++nDigs;
+ if (isDigit(c))
+ {
+ fVal = fVal * 10.0 + static_cast< double >( c - CharT('0') );
+ ++nValExp;
}
+ else if (c != cGroupSeparator)
+ break;
}
- if ( fFrac != 0.0 )
- fVal += rtl::math::pow10Exp( fFrac, nFracExp );
- else if ( nValExp < 0 )
- nValExp = 0; // no digit other than 0 after decimal point
- }
-
- if ( nValExp > 0 )
- --nValExp; // started with offset +1 at the first mantissa digit
- // Exponent
- if (p != p0 && p != pEnd && (*p == CharT('E') || *p == CharT('e')))
- {
- ++p;
- bool bExpSign;
- if (p != pEnd && *p == CharT('-'))
+ // fraction part of mantissa
+ if (p != pEnd && *p == cDecSeparator)
{
- bExpSign = true;
++p;
- }
- else
- {
- bExpSign = false;
- if (p != pEnd && *p == CharT('+'))
- ++p;
- }
- if ( fVal == 0.0 )
- { // no matter what follows, zero stays zero, but carry on the offset
- while (p != pEnd && isDigit(*p))
+ double fFrac = 0.0;
+ long nFracExp = 0;
+ while (p != pEnd && *p == CharT('0'))
+ {
+ --nFracExp;
++p;
- }
- else
- {
- bool bOverFlow = false;
- long nExp = 0;
+ }
+ if ( nValExp == 0 )
+ nValExp = nFracExp - 1; // no integer part => fraction exponent
+ // one decimal digit needs ld(10) ~= 3.32 bits
+ static const int nSigs = (DBL_MANT_DIG / 3) + 1;
+ int nDigs = 0;
for (; p != pEnd; ++p)
{
CharT c = *p;
if (!isDigit(c))
break;
- int i = c - CharT('0');
- if ( long10Overflow( nExp, i ) )
- bOverFlow = true;
- else
- nExp = nExp * 10 + i;
- }
- if ( nExp )
- {
- if ( bExpSign )
- nExp = -nExp;
- long nAllExp = ( bOverFlow ? 0 : nExp + nValExp );
- if ( nAllExp > DBL_MAX_10_EXP || (bOverFlow && !bExpSign) )
- { // overflow
- fVal = HUGE_VAL;
- eStatus = rtl_math_ConversionStatus_OutOfRange;
- }
- else if ( nAllExp < DBL_MIN_10_EXP || (bOverFlow && bExpSign) )
- { // underflow
- fVal = 0.0;
- eStatus = rtl_math_ConversionStatus_OutOfRange;
- }
- else if ( nExp > DBL_MAX_10_EXP || nExp < DBL_MIN_10_EXP )
- { // compensate exponents
- fVal = rtl::math::pow10Exp( fVal, -nValExp );
- fVal = rtl::math::pow10Exp( fVal, nAllExp );
+ if ( nDigs < nSigs )
+ { // further digits (more than nSigs) don't have any
+ // significance
+ fFrac = fFrac * 10.0 + static_cast<double>(c - CharT('0'));
+ --nFracExp;
+ ++nDigs;
}
- else
- fVal = rtl::math::pow10Exp( fVal, nExp ); // normal
}
+ if ( fFrac != 0.0 )
+ fVal += rtl::math::pow10Exp( fFrac, nFracExp );
+ else if ( nValExp < 0 )
+ nValExp = 0; // no digit other than 0 after decimal point
}
- }
- else if (p - p0 == 2 && p != pEnd && p[0] == CharT('#')
- && p[-1] == cDecSeparator && p[-2] == CharT('1'))
- {
- if (pEnd - p >= 4 && p[1] == CharT('I') && p[2] == CharT('N')
- && p[3] == CharT('F'))
+
+ if ( nValExp > 0 )
+ --nValExp; // started with offset +1 at the first mantissa digit
+
+ // Exponent
+ if (p != p0 && p != pEnd && (*p == CharT('E') || *p == CharT('e')))
{
- // "1.#INF", "+1.#INF", "-1.#INF"
- p += 4;
- fVal = HUGE_VAL;
- eStatus = rtl_math_ConversionStatus_OutOfRange;
- // Eat any further digits:
- while (p != pEnd && isDigit(*p))
+ ++p;
+ bool bExpSign;
+ if (p != pEnd && *p == CharT('-'))
+ {
+ bExpSign = true;
++p;
+ }
+ else
+ {
+ bExpSign = false;
+ if (p != pEnd && *p == CharT('+'))
+ ++p;
+ }
+ if ( fVal == 0.0 )
+ { // no matter what follows, zero stays zero, but carry on the
+ // offset
+ while (p != pEnd && isDigit(*p))
+ ++p;
+ }
+ else
+ {
+ bool bOverFlow = false;
+ long nExp = 0;
+ for (; p != pEnd; ++p)
+ {
+ CharT c = *p;
+ if (!isDigit(c))
+ break;
+ int i = c - CharT('0');
+ if ( long10Overflow( nExp, i ) )
+ bOverFlow = true;
+ else
+ nExp = nExp * 10 + i;
+ }
+ if ( nExp )
+ {
+ if ( bExpSign )
+ nExp = -nExp;
+ long nAllExp = ( bOverFlow ? 0 : nExp + nValExp );
+ if ( nAllExp > DBL_MAX_10_EXP || (bOverFlow && !bExpSign) )
+ { // overflow
+ fVal = HUGE_VAL;
+ eStatus = rtl_math_ConversionStatus_OutOfRange;
+ }
+ else if ((nAllExp < DBL_MIN_10_EXP) ||
+ (bOverFlow && bExpSign) )
+ { // underflow
+ fVal = 0.0;
+ eStatus = rtl_math_ConversionStatus_OutOfRange;
+ }
+ else if ( nExp > DBL_MAX_10_EXP || nExp < DBL_MIN_10_EXP )
+ { // compensate exponents
+ fVal = rtl::math::pow10Exp( fVal, -nValExp );
+ fVal = rtl::math::pow10Exp( fVal, nAllExp );
+ }
+ else
+ fVal = rtl::math::pow10Exp( fVal, nExp ); // normal
+ }
+ }
}
- else if (pEnd - p >= 4 && p[1] == CharT('N') && p[2] == CharT('A')
- && p[3] == CharT('N'))
+ else if (p - p0 == 2 && p != pEnd && p[0] == CharT('#')
+ && p[-1] == cDecSeparator && p[-2] == CharT('1'))
{
- // "1.#NAN", "+1.#NAN", "-1.#NAN"
- p += 4;
- rtl::math::setNan( &fVal );
- if (bSign)
+ if (pEnd - p >= 4 && p[1] == CharT('I') && p[2] == CharT('N')
+ && p[3] == CharT('F'))
{
- union {
- double sd;
- sal_math_Double md;
- } m;
- m.sd = fVal;
- m.md.w32_parts.msw |= 0x80000000; // create negative NaN
- fVal = m.sd;
- bSign = false; // don't negate again
+ // "1.#INF", "+1.#INF", "-1.#INF"
+ p += 4;
+ fVal = HUGE_VAL;
+ eStatus = rtl_math_ConversionStatus_OutOfRange;
+ // Eat any further digits:
+ while (p != pEnd && isDigit(*p))
+ ++p;
+ }
+ else if (pEnd - p >= 4 && p[1] == CharT('N') && p[2] == CharT('A')
+ && p[3] == CharT('N'))
+ {
+ // "1.#NAN", "+1.#NAN", "-1.#NAN"
+ p += 4;
+ rtl::math::setNan( &fVal );
+ if (bSign)
+ {
+ union {
+ double sd;
+ sal_math_Double md;
+ } m;
+ m.sd = fVal;
+ m.md.w32_parts.msw |= 0x80000000; // create negative NaN
+ fVal = m.sd;
+ bSign = false; // don't negate again
+ }
+ // Eat any further digits:
+ while (p != pEnd && isDigit(*p))
+ ++p;
}
- // Eat any further digits:
- while (p != pEnd && isDigit(*p))
- ++p;
}
}
diff --git a/sal/textenc/convertadobe.tab b/sal/textenc/convertadobe.tab
index b657256d7bfe..31ec3305933b 100644
--- a/sal/textenc/convertadobe.tab
+++ b/sal/textenc/convertadobe.tab
@@ -185,6 +185,7 @@ rtl::textenc::BmpUnicodeToSingleByteRange const unicodeToAdobeSymbolEncoding[]
{ 0x23D0, 0x23D0 - 0x23D0, 0xBE }, { 0x25CA, 0x25CA - 0x25CA, 0xE0 },
{ 0x2660, 0x2660 - 0x2660, 0xAA }, { 0x2663, 0x2663 - 0x2663, 0xA7 },
{ 0x2665, 0x2665 - 0x2665, 0xA9 }, { 0x2666, 0x2666 - 0x2666, 0xA8 },
+ { 0xF000, 0xF0FF - 0xF000, 0x00 }, // symbol aliasing U+F0XX->S+00XX
{ 0xF6D9, 0xF6D9 - 0xF6D9, 0xD3 }, { 0xF6DA, 0xF6DA - 0xF6DA, 0xD2 },
{ 0xF6DB, 0xF6DB - 0xF6DB, 0xD4 }, { 0xF8E5, 0xF8E5 - 0xF8E5, 0x60 },
{ 0xF8E8, 0xF8EA - 0xF8E8, 0xE2 } };
@@ -251,6 +252,7 @@ rtl::textenc::BmpUnicodeToSingleByteRange const unicodeToAdobeDingbatsEncoding[]
{ 0x2756, 0x2756 - 0x2756, 0x76 }, { 0x2758, 0x275E - 0x2758, 0x78 },
{ 0x2761, 0x2767 - 0x2761, 0xA1 }, { 0x2776, 0x2794 - 0x2776, 0xB6 },
{ 0x2798, 0x27AF - 0x2798, 0xD8 }, { 0x27B1, 0x27BE - 0x27B1, 0xF1 },
+ { 0xF000, 0xF0FF - 0xF000, 0x00 }, // symbol aliasing U+F0XX->S+00XX
{ 0xF8D7, 0xF8E4 - 0xF8D7, 0x80 }};
rtl::textenc::BmpUnicodeToSingleByteConverterData const
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index b0318516b72c..af89761a2c86 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -27,6 +27,7 @@
#include "fastserializer.hxx"
#include <rtl/ustrbuf.hxx>
+#include <rtl/byteseq.hxx>
#include <com/sun/star/xml/Attribute.hpp>
#include <com/sun/star/xml/FastAttribute.hpp>
@@ -41,6 +42,7 @@ using ::rtl::OUStringToOString;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::RuntimeException;
using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::uno::toUnoSequence;
using ::com::sun::star::xml::FastAttribute;
using ::com::sun::star::xml::Attribute;
using ::com::sun::star::xml::sax::SAXException;
@@ -52,15 +54,15 @@ using ::com::sun::star::io::NotConnectedException;
using ::com::sun::star::io::IOException;
using ::com::sun::star::io::BufferSizeExceededException;
-static Sequence< sal_Int8 > aClosingBracket((sal_Int8 *)">", 1);
-static Sequence< sal_Int8 > aSlashAndClosingBracket((sal_Int8 *)"/>", 2);
-static Sequence< sal_Int8 > aColon((sal_Int8 *)":", 1);
-static Sequence< sal_Int8 > aOpeningBracket((sal_Int8 *)"<", 1);
-static Sequence< sal_Int8 > aOpeningBracketAndSlash((sal_Int8 *)"</", 2);
-static Sequence< sal_Int8 > aQuote((sal_Int8 *)"\"", 1);
-static Sequence< sal_Int8 > aEqualSignAndQuote((sal_Int8 *)"=\"", 2);
-static Sequence< sal_Int8 > aSpace((sal_Int8 *)" ", 1);
-static Sequence< sal_Int8 > aXmlHeader((sal_Int8*) "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n", 56);
+static rtl::ByteSequence aClosingBracket((const sal_Int8 *)">", 1);
+static rtl::ByteSequence aSlashAndClosingBracket((const sal_Int8 *)"/>", 2);
+static rtl::ByteSequence aColon((const sal_Int8 *)":", 1);
+static rtl::ByteSequence aOpeningBracket((const sal_Int8 *)"<", 1);
+static rtl::ByteSequence aOpeningBracketAndSlash((const sal_Int8 *)"</", 2);
+static rtl::ByteSequence aQuote((const sal_Int8 *)"\"", 1);
+static rtl::ByteSequence aEqualSignAndQuote((const sal_Int8 *)"=\"", 2);
+static rtl::ByteSequence aSpace((const sal_Int8 *)" ", 1);
+static rtl::ByteSequence aXmlHeader((const sal_Int8*) "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n", 56);
#define HAS_NAMESPACE(x) ((x & 0xffff0000) != 0)
#define NAMESPACE(x) (x >> 16)
@@ -74,7 +76,7 @@ namespace sax_fastparser {
{
if (!mxOutputStream.is())
return;
- writeBytes(aXmlHeader);
+ writeBytes(toUnoSequence(aXmlHeader));
}
OUString FastSaxSerializer::escapeXml( const OUString& s )
@@ -116,7 +118,7 @@ namespace sax_fastparser {
{
if( HAS_NAMESPACE( nElement ) ) {
writeBytes(mxFastTokenHandler->getUTF8Identifier(NAMESPACE(nElement)));
- writeBytes(aColon);
+ writeBytes(toUnoSequence(aColon));
writeBytes(mxFastTokenHandler->getUTF8Identifier(TOKEN(nElement)));
} else
writeBytes(mxFastTokenHandler->getUTF8Identifier(nElement));
@@ -128,12 +130,12 @@ namespace sax_fastparser {
if (!mxOutputStream.is())
return;
- writeBytes(aOpeningBracket);
+ writeBytes(toUnoSequence(aOpeningBracket));
writeId(Element);
writeFastAttributeList(Attribs);
- writeBytes(aClosingBracket);
+ writeBytes(toUnoSequence(aClosingBracket));
}
void SAL_CALL FastSaxSerializer::startUnknownElement( const OUString& Namespace, const OUString& Name, const Reference< XFastAttributeList >& Attribs )
@@ -142,19 +144,19 @@ namespace sax_fastparser {
if (!mxOutputStream.is())
return;
- writeBytes(aOpeningBracket);
+ writeBytes(toUnoSequence(aOpeningBracket));
if (Namespace.getLength())
{
write(Namespace);
- writeBytes(aColon);
+ writeBytes(toUnoSequence(aColon));
}
write(Name);
writeFastAttributeList(Attribs);
- writeBytes(aClosingBracket);
+ writeBytes(toUnoSequence(aClosingBracket));
}
void SAL_CALL FastSaxSerializer::endFastElement( ::sal_Int32 Element )
@@ -163,11 +165,11 @@ namespace sax_fastparser {
if (!mxOutputStream.is())
return;
- writeBytes(aOpeningBracketAndSlash);
+ writeBytes(toUnoSequence(aOpeningBracketAndSlash));
writeId(Element);
- writeBytes(aClosingBracket);
+ writeBytes(toUnoSequence(aClosingBracket));
}
void SAL_CALL FastSaxSerializer::endUnknownElement( const OUString& Namespace, const OUString& Name )
@@ -176,17 +178,17 @@ namespace sax_fastparser {
if (!mxOutputStream.is())
return;
- writeBytes(aOpeningBracketAndSlash);
+ writeBytes(toUnoSequence(aOpeningBracketAndSlash));
if (Namespace.getLength())
{
write(Namespace);
- writeBytes(aColon);
+ writeBytes(toUnoSequence(aColon));
}
write(Name);
- writeBytes(aClosingBracket);
+ writeBytes(toUnoSequence(aClosingBracket));
}
void SAL_CALL FastSaxSerializer::singleFastElement( ::sal_Int32 Element, const Reference< XFastAttributeList >& Attribs )
@@ -195,12 +197,12 @@ namespace sax_fastparser {
if (!mxOutputStream.is())
return;
- writeBytes(aOpeningBracket);
+ writeBytes(toUnoSequence(aOpeningBracket));
writeId(Element);
writeFastAttributeList(Attribs);
- writeBytes(aSlashAndClosingBracket);
+ writeBytes(toUnoSequence(aSlashAndClosingBracket));
}
void SAL_CALL FastSaxSerializer::singleUnknownElement( const OUString& Namespace, const OUString& Name, const Reference< XFastAttributeList >& Attribs )
@@ -209,19 +211,19 @@ namespace sax_fastparser {
if (!mxOutputStream.is())
return;
- writeBytes(aOpeningBracket);
+ writeBytes(toUnoSequence(aOpeningBracket));
if (Namespace.getLength())
{
write(Namespace);
- writeBytes(aColon);
+ writeBytes(toUnoSequence(aColon));
}
write(Name);
writeFastAttributeList(Attribs);
- writeBytes(aSlashAndClosingBracket);
+ writeBytes(toUnoSequence(aSlashAndClosingBracket));
}
void SAL_CALL FastSaxSerializer::characters( const OUString& aChars )
@@ -251,12 +253,12 @@ namespace sax_fastparser {
sal_Int32 nAttrLength = aAttrSeq.getLength();
for (sal_Int32 i = 0; i < nAttrLength; i++)
{
- writeBytes(aSpace);
+ writeBytes(toUnoSequence(aSpace));
write(pAttr[i].Name);
- writeBytes(aEqualSignAndQuote);
+ writeBytes(toUnoSequence(aEqualSignAndQuote));
write(escapeXml(pAttr[i].Value));
- writeBytes(aQuote);
+ writeBytes(toUnoSequence(aQuote));
}
Sequence< FastAttribute > aFastAttrSeq = Attribs->getFastAttributes();
@@ -264,16 +266,16 @@ namespace sax_fastparser {
sal_Int32 nFastAttrLength = aFastAttrSeq.getLength();
for (sal_Int32 j = 0; j < nFastAttrLength; j++)
{
- writeBytes(aSpace);
+ writeBytes(toUnoSequence(aSpace));
sal_Int32 nToken = pFastAttr[j].Token;
writeId(nToken);
- writeBytes(aEqualSignAndQuote);
+ writeBytes(toUnoSequence(aEqualSignAndQuote));
write(escapeXml(Attribs->getValue(pFastAttr[j].Token)));
- writeBytes(aQuote);
+ writeBytes(toUnoSequence(aQuote));
}
}
diff --git a/sc/inc/ViewSettingsSequenceDefines.hxx b/sc/inc/ViewSettingsSequenceDefines.hxx
index f23229d31a43..07c3d2b375e0 100644
--- a/sc/inc/ViewSettingsSequenceDefines.hxx
+++ b/sc/inc/ViewSettingsSequenceDefines.hxx
@@ -103,6 +103,6 @@
#define SC_PAGEVIEWZOOMVALUE "PageViewZoomValue"
#define SC_SHOWPAGEBREAKPREVIEW "ShowPageBreakPreview"
#define SC_VIEWID "ViewId"
-#define SC_VIEW "View"
+#define SC_VIEW "view"
#endif
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 44aa1daa9a92..e1b88919dad6 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -186,7 +186,7 @@ public:
bool IsDataDescriptionCell(const ScAddress& rPos);
bool IsDimNameInUse(const ::rtl::OUString& rName) const;
- String GetDimName( long nDim, BOOL& rIsDataLayout );
+ String GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags = NULL );
BOOL IsDuplicated( long nDim );
long GetDimCount();
void GetHeaderPositionData(const ScAddress& rPos, ::com::sun::star::sheet::DataPilotTableHeaderData& rData);
@@ -259,6 +259,8 @@ public:
PivotField* pRefColFields = NULL, SCSIZE nRefColCount = 0,
PivotField* pRefRowFields = NULL, SCSIZE nRefRowCount = 0,
PivotField* pRefPageFields = NULL, SCSIZE nRefPageCount = 0 );
+
+ static bool IsOrientationAllowed( USHORT nOrient, sal_Int32 nDimFlags );
};
diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx
index bfff0b97a168..8272b850b27e 100644
--- a/sc/inc/dpsave.hxx
+++ b/sc/inc/dpsave.hxx
@@ -140,6 +140,7 @@ public:
void SetSubTotals(long nCount, const USHORT* pFuncs);
long GetSubTotalsCount() const { return nSubTotalCount; }
USHORT GetSubTotalFunc(long nIndex) const { return pSubTotalFuncs[nIndex]; }
+ bool HasShowEmpty() const;
void SetShowEmpty(BOOL bSet);
BOOL GetShowEmpty() const { return BOOL(nShowEmptyMode); }
void SetFunction(USHORT nNew); // enum GeneralFunction
diff --git a/sc/inc/pivot.hxx b/sc/inc/pivot.hxx
index 915a311411c4..489f272bc8ba 100644
--- a/sc/inc/pivot.hxx
+++ b/sc/inc/pivot.hxx
@@ -141,6 +141,7 @@ struct ScDPLabelData
SCsCOL mnCol;
USHORT mnFuncMask; /// Page/Column/Row subtotal function.
sal_Int32 mnUsedHier; /// Used hierarchy.
+ sal_Int32 mnFlags; /// Flags from the DataPilotSource dimension
bool mbShowAll; /// true = Show all (also empty) results.
bool mbIsValue; /// true = Sum or count in data field.
diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
index 9857d675b7ab..b788672aa715 100644
--- a/sc/inc/scmatrix.hxx
+++ b/sc/inc/scmatrix.hxx
@@ -99,6 +99,7 @@ class SC_DLLPUBLIC ScMatrix
mutable ULONG nRefCnt; // reference count
SCSIZE nColCount;
SCSIZE nRowCount;
+ bool mbCloneIfConst; // Whether the matrix is cloned with a CloneIfConst() call.
void ResetIsString();
void DeleteIsString();
@@ -171,11 +172,19 @@ public:
/** If nC*nR results in more than GetElementsMax() entries, a 1x1 matrix is
created instead and a double error value (errStackOverflow) is set.
Compare nC and nR with a GetDimensions() call to check. */
- ScMatrix( SCSIZE nC, SCSIZE nR) : nRefCnt(0) { CreateMatrix( nC, nR); }
+ ScMatrix( SCSIZE nC, SCSIZE nR) : nRefCnt(0), mbCloneIfConst(true) { CreateMatrix( nC, nR); }
/** Clone the matrix. */
ScMatrix* Clone() const;
+ /** Clone the matrix if mbCloneIfConst (immutable) is set, otherwise
+ return _this_ matrix, to be assigned to a ScMatrixRef. */
+ ScMatrix* CloneIfConst();
+
+ /** Set the matrix to (im)mutable for CloneIfConst(), only the interpreter
+ should do this and know the consequences. */
+ inline void SetImmutable( bool bVal ) { mbCloneIfConst = bVal; }
+
/**
* Resize the matrix to specified new dimension. Note that this operation
* clears all stored values.
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index 2d011f425398..1e56743d8129 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -565,6 +565,7 @@
#define SC_UNO_FIELD_SUBTOTALNAME "FieldSubtotalName"
#define SC_UNO_GRANDTOTAL_NAME "GrandTotalName"
#define SC_UNO_HAS_HIDDEN_MEMBER "HasHiddenMember"
+#define SC_UNO_FLAGS "Flags"
// (preliminary:)
#define SC_UNO_REFVALUE "ReferenceValue"
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index e994339f4a9a..29ba9f15dc92 100755..100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -65,6 +65,7 @@
#include <com/sun/star/sheet/DataPilotTableHeaderData.hpp>
#include <com/sun/star/sheet/DataPilotTablePositionData.hpp>
#include <com/sun/star/sheet/DataPilotTablePositionType.hpp>
+#include <com/sun/star/sheet/DimensionFlags.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
@@ -845,7 +846,7 @@ bool ScDPObject::IsDimNameInUse(const OUString& rName) const
return false;
}
-String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout )
+String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags )
{
rIsDataLayout = FALSE;
String aRet;
@@ -879,6 +880,10 @@ String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout )
rIsDataLayout = TRUE;
else
aRet = String( aName );
+
+ if (pFlags)
+ *pFlags = ScUnoHelpFunctions::GetLongProperty( xDimProp,
+ rtl::OUString::createFromAscii(SC_UNO_FLAGS), 0 );
}
}
}
@@ -2003,6 +2008,8 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
GetHierarchies(nDim, pNewLabel->maHiers);
GetMembers(nDim, GetUsedHierarchy(nDim), pNewLabel->maMembers);
lcl_FillLabelData(*pNewLabel, xDimProp);
+ pNewLabel->mnFlags = ScUnoHelpFunctions::GetLongProperty( xDimProp,
+ rtl::OUString::createFromAscii(SC_UNO_FLAGS), 0 );
rParam.maLabelArray.push_back(pNewLabel);
}
}
@@ -2231,6 +2238,32 @@ void ScDPObject::ConvertOrientation( ScDPSaveData& rSaveData,
}
}
+// static
+bool ScDPObject::IsOrientationAllowed( USHORT nOrient, sal_Int32 nDimFlags )
+{
+ bool bAllowed = true;
+ switch (nOrient)
+ {
+ case sheet::DataPilotFieldOrientation_PAGE:
+ bAllowed = ( nDimFlags & sheet::DimensionFlags::NO_PAGE_ORIENTATION ) == 0;
+ break;
+ case sheet::DataPilotFieldOrientation_COLUMN:
+ bAllowed = ( nDimFlags & sheet::DimensionFlags::NO_COLUMN_ORIENTATION ) == 0;
+ break;
+ case sheet::DataPilotFieldOrientation_ROW:
+ bAllowed = ( nDimFlags & sheet::DimensionFlags::NO_ROW_ORIENTATION ) == 0;
+ break;
+ case sheet::DataPilotFieldOrientation_DATA:
+ bAllowed = ( nDimFlags & sheet::DimensionFlags::NO_DATA_ORIENTATION ) == 0;
+ break;
+ default:
+ {
+ // allowed to remove from previous orientation
+ }
+ }
+ return bAllowed;
+}
+
// -----------------------------------------------------------------------
// static
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index dd493bb0df6c..bad05968bf72 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -410,6 +410,11 @@ void ScDPSaveDimension::SetSubTotals(long nCount, const USHORT* pFuncs)
bSubTotalDefault = FALSE;
}
+bool ScDPSaveDimension::HasShowEmpty() const
+{
+ return nShowEmptyMode != SC_DPSAVEMODE_DONTKNOW;
+}
+
void ScDPSaveDimension::SetShowEmpty(BOOL bSet)
{
nShowEmptyMode = bSet;
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index da40e6e230c4..b4ca5dbc7330 100755..100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -1576,6 +1576,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPDimension::getPropertySetIn
static SfxItemPropertyMapEntry aDPDimensionMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNO_FILTER), 0, &getCppuType((uno::Sequence<sheet::TableFilterField>*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNO_FLAGS), 0, &getCppuType((sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNO_FUNCTION), 0, &getCppuType((sheet::GeneralFunction*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_ISDATALA), 0, &getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNO_NUMBERFO), 0, &getCppuType((sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
@@ -1753,6 +1754,11 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const rtl::OUString& aPropert
aRet <<= mpSubtotalName.get() ? *mpSubtotalName : OUString::createFromAscii("");
else if (aNameStr.EqualsAscii(SC_UNO_HAS_HIDDEN_MEMBER))
aRet <<= mbHasHiddenMember;
+ else if (aNameStr.EqualsAscii(SC_UNO_FLAGS))
+ {
+ sal_Int32 nFlags = 0; // tabular data: all orientations are possible
+ aRet <<= nFlags;
+ }
else
{
DBG_ERROR("unknown property");
diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx
index 5a6174bc0129..ddac72f0230b 100644
--- a/sc/source/core/data/pivot2.cxx
+++ b/sc/source/core/data/pivot2.cxx
@@ -82,6 +82,7 @@ ScDPLabelData::ScDPLabelData( const String& rName, short nCol, bool bIsValue ) :
mnCol( nCol ),
mnFuncMask( PIVOT_FUNC_NONE ),
mnUsedHier( 0 ),
+ mnFlags( 0 ),
mbShowAll( false ),
mbIsValue( bIsValue )
{
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index d54e16b8cbd7..4223c05c4f83 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -3100,10 +3100,13 @@ void ScTable::SetDrawPageSize(bool bResetStreamValid, bool bUpdateNoteCaptionPos
ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer();
if( pDrawLayer )
{
- long x = GetColOffset( MAXCOL + 1 );
- long y = GetRowOffset( MAXROW + 1 );
- x = (long) ((double) x * HMM_PER_TWIPS);
- y = (long) ((double) y * HMM_PER_TWIPS);
+ double fValX = GetColOffset( MAXCOL + 1 ) * HMM_PER_TWIPS;
+ double fValY = GetRowOffset( MAXROW + 1 ) * HMM_PER_TWIPS;
+ const long nMax = ::std::numeric_limits<long>::max();
+ // #i113884# Avoid int32 overflow with possible negative results than can cause bad effects.
+ // If the draw page size is smaller than all rows, only the bottom of the sheet is affected.
+ long x = ( fValX > (double)nMax ) ? nMax : (long) fValX;
+ long y = ( fValY > (double)nMax ) ? nMax : (long) fValY;
if ( IsLayoutRTL() ) // IsNegativePage
x = -x;
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 461bdcccf27c..fcc7a24e7a42 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2481,22 +2481,13 @@ void ScInterpreter::ScN()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScN" );
USHORT nErr = nGlobalError;
nGlobalError = 0;
- double fVal;
- if ( GetRawStackType() == svString )
- {
- fVal = 0.0;
- Pop();
- }
- else
- {
- // Temporarily override the ConvertStringToValue() error for
- // GetCellValue() / GetCellValueOrZero()
- USHORT nSErr = mnStringNoValueError;
- mnStringNoValueError = errCellNoValue;
- fVal = GetDouble();
- mnStringNoValueError = nSErr;
- }
- if ( nGlobalError == NOTAVAILABLE || nGlobalError == errIllegalArgument )
+ // Temporarily override the ConvertStringToValue() error for
+ // GetCellValue() / GetCellValueOrZero()
+ USHORT nSErr = mnStringNoValueError;
+ mnStringNoValueError = errCellNoValue;
+ double fVal = GetDouble();
+ mnStringNoValueError = nSErr;
+ if ( nGlobalError == NOTAVAILABLE || nGlobalError == errCellNoValue )
nGlobalError = 0; // N(#NA) and N("text") are ok
if ( !nGlobalError && nErr != NOTAVAILABLE )
nGlobalError = nErr;
@@ -7092,10 +7083,6 @@ void ScInterpreter::ScText()
case svDouble:
fVal = PopDouble();
break;
- case svString:
- aStr = PopString();
- bString = true;
- break;
default:
{
FormulaTokenRef xTok( PopToken());
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 5c326001ff02..47cde7186067 100644..100755
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -231,6 +231,12 @@ double ScInterpreter::ConvertStringToValue( const String& rStr )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ConvertStringToValue" );
double fValue = 0.0;
+ if (mnStringNoValueError == errCellNoValue)
+ {
+ // Requested that all strings result in 0, error handled by caller.
+ SetError( mnStringNoValueError);
+ return fValue;
+ }
::rtl::OUString aStr( rStr);
rtl_math_ConversionStatus eStatus;
sal_Int32 nParseEnd;
@@ -3964,5 +3970,10 @@ StackVar ScInterpreter::Interpret()
while( maxsp-- )
(*p++)->DecRef();
- return xResult->GetType();
+ StackVar eType = xResult->GetType();
+ if (eType == svMatrix)
+ // Results are immutable in case they would be reused as input for new
+ // interpreters.
+ static_cast<ScToken*>(xResult.operator->())->GetMatrix()->SetImmutable( true);
+ return eType;
}
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index ba4322a3281a..73794cf15b2d 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -310,6 +310,9 @@ ScMatrixRef ScInterpreter::GetNewMat(SCSIZE nC, SCSIZE nR)
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetNewMat" );
ScMatrix* pMat = new ScMatrix( nC, nR);
pMat->SetErrorInterpreter( this);
+ // A temporary matrix is mutable and ScMatrix::CloneIfConst() returns the
+ // very matrix.
+ pMat->SetImmutable( false);
SCSIZE nCols, nRows;
pMat->GetDimensions( nCols, nRows);
if ( nCols != nC || nRows != nR )
@@ -2069,23 +2072,25 @@ bool ScInterpreter::CheckMatrix(BOOL _bLOG,BOOL _bTrendGrowth,BYTE& nCase,SCSIZE
{
PushIllegalArgument();
return false;
- } // if (!pMatY->IsValue(i))
- } // for ( SCSIZE i = 0; i < nCountY; i++ )
+ }
+ }
+
if ( _bLOG )
{
+ ScMatrixRef pNewY = pMatY->CloneIfConst();
for (SCSIZE nElem = 0; nElem < nCountY; nElem++)
{
- const double fVal = pMatY->GetDouble(nElem);
+ const double fVal = pNewY->GetDouble(nElem);
if (fVal <= 0.0)
{
PushIllegalArgument();
return false;
}
else
- pMatY->PutDouble(log(fVal), nElem);
- } // for (nElem = 0; nElem < nCountY; nElem++)
- } // if ( _bRKP )
-
+ pNewY->PutDouble(log(fVal), nElem);
+ }
+ pMatY = pNewY;
+ }
if (pMatX)
{
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index fbb859b64ebf..2ecc20f53405 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -81,6 +81,11 @@ ScMatrix* ScMatrix::Clone() const
return pScMat;
}
+ScMatrix* ScMatrix::CloneIfConst()
+{
+ return (mbCloneIfConst || IsEternalRef()) ? Clone() : this;
+}
+
void ScMatrix::Resize( SCSIZE nC, SCSIZE nR)
{
Clear();
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index e43ff21a114d..f8cba5ecf6c3 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -503,9 +503,13 @@ void ScXMLExportDataPilot::WriteMembers(ScDPSaveDimension* pDim)
void ScXMLExportDataPilot::WriteLevels(ScDPSaveDimension* pDim)
{
- rtl::OUStringBuffer sBuffer;
- SvXMLUnitConverter::convertBool(sBuffer, pDim->GetShowEmpty());
- rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SHOW_EMPTY, sBuffer.makeStringAndClear());
+ // #i114202# GetShowEmpty is only valid if HasShowEmpty is true.
+ if (pDim->HasShowEmpty())
+ {
+ rtl::OUStringBuffer sBuffer;
+ SvXMLUnitConverter::convertBool(sBuffer, pDim->GetShowEmpty());
+ rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SHOW_EMPTY, sBuffer.makeStringAndClear());
+ }
SvXMLElementExport aElemDPL(rExport, XML_NAMESPACE_TABLE, XML_DATA_PILOT_LEVEL, sal_True, sal_True);
WriteSubTotals(pDim);
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index 6b04993ba0bc..b5a19ef0ec9b 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -735,8 +735,9 @@ ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHOR
for (long nDim=0; nDim<nDimCount; nDim++)
{
BOOL bIsDataLayout;
- String aName = rDPObj.GetDimName( nDim, bIsDataLayout );
- if ( !bIsDataLayout && !rDPObj.IsDuplicated( nDim ) )
+ sal_Int32 nDimFlags = 0;
+ String aName = rDPObj.GetDimName( nDim, bIsDataLayout, &nDimFlags );
+ if ( !bIsDataLayout && !rDPObj.IsDuplicated( nDim ) && ScDPObject::IsOrientationAllowed( nOrient, nDimFlags ) )
{
const ScDPSaveDimension* pDimension = pSaveData ? pSaveData->GetExistingDimensionByName(aName) : 0;
if ( !pDimension || (pDimension->GetOrientation() != nOrient) )
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index 1eca44a787ed..56d7e3550cda 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -567,7 +567,9 @@ void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Po
}
}
- if ( (toArr->back().get() == NULL)
+ bool bAllowed = IsOrientationAllowed( fData.mnCol, eToType );
+ if ( bAllowed
+ && (toArr->back().get() == NULL)
&& (!Contains( toArr, fData.mnCol, nAt )) )
{
// ggF. in anderem Fenster entfernen
@@ -714,7 +716,8 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF
{
ScDPFuncData fData( *((*fromArr)[nFromIndex]) );
- if ( Contains( fromArr, fData.mnCol, nAt ) )
+ bool bAllowed = IsOrientationAllowed( fData.mnCol, eToType );
+ if ( bAllowed && Contains( fromArr, fData.mnCol, nAt ) )
{
fromWnd->DelField( nAt );
Remove( fromArr, nAt );
@@ -935,21 +938,41 @@ PointerStyle ScDPLayoutDlg::NotifyMouseMove( const Point& rAt )
if ( bIsDrag )
{
Point aPos = ScreenToOutputPixel( rAt );
+ ScDPFieldType eCheckTarget = TYPE_SELECT;
if ( aRectPage.IsInside( aPos ) )
- ePtr = lclGetPointerForField( TYPE_PAGE );
+ eCheckTarget = TYPE_PAGE;
else if ( aRectCol.IsInside( aPos ) )
- ePtr = lclGetPointerForField( TYPE_COL );
+ eCheckTarget = TYPE_COL;
else if ( aRectRow.IsInside( aPos ) )
- ePtr = lclGetPointerForField( TYPE_ROW );
+ eCheckTarget = TYPE_ROW;
else if ( aRectData.IsInside( aPos ) )
- ePtr = lclGetPointerForField( TYPE_DATA );
+ eCheckTarget = TYPE_DATA;
else if ( eDnDFromType != TYPE_SELECT )
ePtr = POINTER_PIVOT_DELETE;
else if ( aRectSelect.IsInside( aPos ) )
ePtr = lclGetPointerForField( TYPE_SELECT );
else
ePtr = POINTER_NOTALLOWED;
+
+ if ( eCheckTarget != TYPE_SELECT )
+ {
+ // check if the target orientation is allowed for this field
+ ScDPFuncDataVec* fromArr = NULL;
+ switch ( eDnDFromType )
+ {
+ case TYPE_PAGE: fromArr = &aPageArr; break;
+ case TYPE_COL: fromArr = &aColArr; break;
+ case TYPE_ROW: fromArr = &aRowArr; break;
+ case TYPE_DATA: fromArr = &aDataArr; break;
+ case TYPE_SELECT: fromArr = &aSelectArr; break;
+ }
+ ScDPFuncData fData( *((*fromArr)[nDnDFromIndex]) );
+ if (IsOrientationAllowed( fData.mnCol, eCheckTarget ))
+ ePtr = lclGetPointerForField( eCheckTarget );
+ else
+ ePtr = POINTER_NOTALLOWED;
+ }
}
return ePtr;
@@ -1218,6 +1241,28 @@ String ScDPLayoutDlg::GetLabelString( SCsCOL nCol )
return String();
}
+//----------------------------------------------------------------------------
+
+bool ScDPLayoutDlg::IsOrientationAllowed( SCsCOL nCol, ScDPFieldType eType )
+{
+ bool bAllowed = true;
+ ScDPLabelData* pData = GetLabelData( nCol );
+ DBG_ASSERT( pData, "LabelData not found" );
+ if (pData)
+ {
+ sheet::DataPilotFieldOrientation eOrient = sheet::DataPilotFieldOrientation_HIDDEN;
+ switch (eType)
+ {
+ case TYPE_PAGE: eOrient = sheet::DataPilotFieldOrientation_PAGE; break;
+ case TYPE_COL: eOrient = sheet::DataPilotFieldOrientation_COLUMN; break;
+ case TYPE_ROW: eOrient = sheet::DataPilotFieldOrientation_ROW; break;
+ case TYPE_DATA: eOrient = sheet::DataPilotFieldOrientation_DATA; break;
+ case TYPE_SELECT: eOrient = sheet::DataPilotFieldOrientation_HIDDEN; break;
+ }
+ bAllowed = ScDPObject::IsOrientationAllowed( (USHORT)eOrient, pData->mnFlags );
+ }
+ return bAllowed;
+}
//----------------------------------------------------------------------------
diff --git a/sc/source/ui/inc/pvlaydlg.hxx b/sc/source/ui/inc/pvlaydlg.hxx
index c74b9e028d2f..e16c3266510e 100644
--- a/sc/source/ui/inc/pvlaydlg.hxx
+++ b/sc/source/ui/inc/pvlaydlg.hxx
@@ -198,6 +198,7 @@ private:
Point DlgPos2WndPos ( const Point& rPt, Window& rWnd );
ScDPLabelData* GetLabelData ( SCsCOL nCol, size_t* pPos = NULL );
String GetLabelString ( SCsCOL nCol );
+ bool IsOrientationAllowed( SCsCOL nCol, ScDPFieldType eType );
String GetFuncString ( USHORT& rFuncMask, BOOL bIsValue = TRUE );
BOOL Contains ( ScDPFuncDataVec* pArr, SCsCOL nCol, size_t& nAt );
void Remove ( ScDPFuncDataVec* pArr, size_t nAt );
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index b4313c1d7a32..28cc2a823928 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -144,7 +144,6 @@ private:
ScNavigatorSettings* pNavSettings;
// used in first Activate
- ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > aPendingUserData;
BOOL bFirstActivate;
BOOL bActiveDrawSh;
diff --git a/sc/source/ui/vba/makefile.mk b/sc/source/ui/vba/makefile.mk
index 4cb7e3eb064b..92bb3fd39db0 100644
--- a/sc/source/ui/vba/makefile.mk
+++ b/sc/source/ui/vba/makefile.mk
@@ -47,63 +47,63 @@ INCPRE=$(INCCOM)$/$(TARGET)
# ------------------------------------------------------------------
SLOFILES= \
- $(SLO)$/vbaglobals.obj \
- $(SLO)$/vbaworkbook.obj \
- $(SLO)$/vbaworksheets.obj \
+ $(SLO)$/excelvbahelper.obj \
+ $(SLO)$/service.obj \
$(SLO)$/vbaapplication.obj \
- $(SLO)$/vbarange.obj \
- $(SLO)$/vbaname.obj \
- $(SLO)$/vbanames.obj \
- $(SLO)$/vbacomment.obj \
- $(SLO)$/vbacomments.obj \
- $(SLO)$/vbaworkbooks.obj \
- $(SLO)$/vbaworksheet.obj \
- $(SLO)$/vbaoutline.obj \
- $(SLO)$/vbafont.obj\
- $(SLO)$/excelvbahelper.obj\
- $(SLO)$/vbainterior.obj\
- $(SLO)$/vbawsfunction.obj\
- $(SLO)$/vbawindow.obj\
- $(SLO)$/vbachart.obj\
- $(SLO)$/vbachartobject.obj\
- $(SLO)$/vbachartobjects.obj\
- $(SLO)$/vbaseriescollection.obj\
- $(SLO)$/vbadialogs.obj \
- $(SLO)$/vbadialog.obj \
- $(SLO)$/vbapivottable.obj \
- $(SLO)$/vbapivotcache.obj \
- $(SLO)$/vbapivottables.obj \
- $(SLO)$/vbawindows.obj \
- $(SLO)$/vbapalette.obj \
+ $(SLO)$/vbaassistant.obj \
+ $(SLO)$/vbaaxes.obj \
+ $(SLO)$/vbaaxis.obj \
+ $(SLO)$/vbaaxistitle.obj \
$(SLO)$/vbaborders.obj \
$(SLO)$/vbacharacters.obj \
- $(SLO)$/vbavalidation.obj \
- $(SLO)$/vbasheetobject.obj \
- $(SLO)$/vbasheetobjects.obj \
- $(SLO)$/vbaoleobject.obj \
- $(SLO)$/vbaoleobjects.obj \
- $(SLO)$/vbatextboxshape.obj \
- $(SLO)$/vbapane.obj \
- $(SLO)$/vbatextframe.obj \
- $(SLO)$/vbacharttitle.obj \
+ $(SLO)$/vbachart.obj \
+ $(SLO)$/vbachartobject.obj \
+ $(SLO)$/vbachartobjects.obj \
$(SLO)$/vbacharts.obj \
- $(SLO)$/vbaaxistitle.obj \
- $(SLO)$/vbaaxes.obj \
- $(SLO)$/vbaaxis.obj \
- $(SLO)$/vbaformat.obj \
+ $(SLO)$/vbacharttitle.obj \
+ $(SLO)$/vbacomment.obj \
+ $(SLO)$/vbacomments.obj \
$(SLO)$/vbacondition.obj \
+ $(SLO)$/vbadialog.obj \
+ $(SLO)$/vbadialogs.obj \
+ $(SLO)$/vbaeventshelper.obj \
+ $(SLO)$/vbafont.obj \
+ $(SLO)$/vbaformat.obj \
$(SLO)$/vbaformatcondition.obj \
$(SLO)$/vbaformatconditions.obj \
- $(SLO)$/vbastyle.obj \
- $(SLO)$/vbastyles.obj \
- $(SLO)$/vbaassistant.obj \
+ $(SLO)$/vbaglobals.obj \
$(SLO)$/vbahyperlink.obj \
$(SLO)$/vbahyperlinks.obj \
- $(SLO)$/vbapagesetup.obj \
+ $(SLO)$/vbainterior.obj \
+ $(SLO)$/vbaname.obj \
+ $(SLO)$/vbanames.obj \
+ $(SLO)$/vbaoleobject.obj \
+ $(SLO)$/vbaoleobjects.obj \
+ $(SLO)$/vbaoutline.obj \
$(SLO)$/vbapagebreak.obj \
$(SLO)$/vbapagebreaks.obj \
- $(SLO)$/vbaeventshelper.obj \
- $(SLO)$/service.obj
+ $(SLO)$/vbapagesetup.obj \
+ $(SLO)$/vbapalette.obj \
+ $(SLO)$/vbapane.obj \
+ $(SLO)$/vbapivotcache.obj \
+ $(SLO)$/vbapivottable.obj \
+ $(SLO)$/vbapivottables.obj \
+ $(SLO)$/vbarange.obj \
+ $(SLO)$/vbaseriescollection.obj \
+ $(SLO)$/vbasheetobject.obj \
+ $(SLO)$/vbasheetobjects.obj \
+ $(SLO)$/vbastyle.obj \
+ $(SLO)$/vbastyles.obj \
+ $(SLO)$/vbatextboxshape.obj \
+ $(SLO)$/vbatextframe.obj \
+ $(SLO)$/vbavalidation.obj \
+ $(SLO)$/vbawindow.obj \
+ $(SLO)$/vbawindows.obj \
+ $(SLO)$/vbaworkbook.obj \
+ $(SLO)$/vbaworkbooks.obj \
+ $(SLO)$/vbaworksheet.obj \
+ $(SLO)$/vbaworksheets.obj \
+ $(SLO)$/vbawsfunction.obj
.ENDIF
# --- Targets ------------------------------------------------------
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 8f5aba5c4acb..f3965393e919 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -88,12 +88,6 @@
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-// Enable our own join detection for Intersection and Union
-// should be more efficient than using ScRangeList::Join ( because
-// we already are testing the same things )
-
-#define OWN_JOIN 1
-
// #TODO is this defined somewhere else?
#if ( defined UNX ) || ( defined OS2 ) //unix
#define FILE_PATH_SEPERATOR "/"
@@ -302,7 +296,8 @@ ScVbaApplication::getActiveCell() throw (uno::RuntimeException )
sal_Int32 nCursorX = pTabView->GetCurX();
sal_Int32 nCursorY = pTabView->GetCurY();
- return new ScVbaRange( this, mxContext, xRange->getCellRangeByPosition( nCursorX, nCursorY, nCursorX, nCursorY ) );
+ uno::Reference< XHelperInterface > xParent( excel::getUnoSheetModuleObj( xRange ), uno::UNO_QUERY_THROW );
+ return new ScVbaRange( xParent, mxContext, xRange->getCellRangeByPosition( nCursorX, nCursorY, nCursorX, nCursorY ) );
}
uno::Any SAL_CALL
@@ -805,412 +800,289 @@ ScVbaApplication::PathSeparator( ) throw (script::BasicErrorException, uno::Run
return sPathSep;
}
-typedef std::list< ScRange > Ranges;
-typedef std::list< ScRangeList > RangesList;
+// ----------------------------------------------------------------------------
+// Helpers for Intersect and Union
+
+namespace {
+
+typedef ::std::list< ScRange > ListOfScRange;
-void lcl_addRangesToVec( RangesList& vRanges, const uno::Any& aArg ) throw ( script::BasicErrorException, uno::RuntimeException )
+/** Appends all ranges of a VBA Range object in the passed Any to the list of ranges. */
+void lclAddToListOfScRange( ListOfScRange& rList, const uno::Any& rArg )
+ throw (script::BasicErrorException, uno::RuntimeException)
{
- ScRangeList theRanges;
- uno::Reference< excel::XRange > xRange( aArg, uno::UNO_QUERY_THROW );
- uno::Reference< XCollection > xCol( xRange->Areas( uno::Any() ), uno::UNO_QUERY_THROW );
- sal_Int32 nCount = xCol->getCount();
- for( sal_Int32 i = 1; i <= nCount; ++i )
+ if( rArg.hasValue() )
{
- uno::Reference< excel::XRange > xAreaRange( xCol->Item( uno::makeAny( sal_Int32(i) ), uno::Any() ), uno::UNO_QUERY_THROW );
- uno::Reference< sheet::XCellRangeAddressable > xAddressable( xAreaRange->getCellRange(), uno::UNO_QUERY_THROW );
- table::CellRangeAddress addr = xAddressable->getRangeAddress();
- ScRange refRange;
- ScUnoConversion::FillScRange( refRange, addr );
- theRanges.Append( refRange );
+ uno::Reference< excel::XRange > xRange( rArg, uno::UNO_QUERY_THROW );
+ uno::Reference< XCollection > xCol( xRange->Areas( uno::Any() ), uno::UNO_QUERY_THROW );
+ for( sal_Int32 nIdx = 1, nCount = xCol->getCount(); nIdx <= nCount; ++nIdx )
+ {
+ uno::Reference< excel::XRange > xAreaRange( xCol->Item( uno::Any( nIdx ), uno::Any() ), uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XCellRangeAddressable > xAddressable( xAreaRange->getCellRange(), uno::UNO_QUERY_THROW );
+ ScRange aScRange;
+ ScUnoConversion::FillScRange( aScRange, xAddressable->getRangeAddress() );
+ rList.push_back( aScRange );
+ }
}
- vRanges.push_back( theRanges );
}
-void lcl_addRangeToVec( Ranges& vRanges, const uno::Any& aArg ) throw ( script::BasicErrorException, uno::RuntimeException )
+/** Returns true, if the passed ranges can be expressed by a single range. The
+ new range will be contained in r1 then, the range r2 can be removed. */
+bool lclTryJoin( ScRange& r1, const ScRange& r2 )
{
- uno::Reference< excel::XRange > xRange( aArg, uno::UNO_QUERY_THROW );
- uno::Reference< XCollection > xCol( xRange->Areas( uno::Any() ), uno::UNO_QUERY_THROW );
- sal_Int32 nCount = xCol->getCount();
- for( sal_Int32 i = 1; i <= nCount; ++i )
+ // 1) r2 is completely inside r1
+ if( r1.In( r2 ) )
+ return true;
+
+ // 2) r1 is completely inside r2
+ if( r2.In( r1 ) )
{
- uno::Reference< excel::XRange > xAreaRange( xCol->Item( uno::makeAny( sal_Int32(i) ), uno::Any() ), uno::UNO_QUERY_THROW );
- uno::Reference< sheet::XCellRangeAddressable > xAddressable( xAreaRange->getCellRange(), uno::UNO_QUERY_THROW );
- table::CellRangeAddress addr = xAddressable->getRangeAddress();
- ScRange refRange;
- ScUnoConversion::FillScRange( refRange, addr );
- vRanges.push_back( refRange );
+ r1 = r2;
+ return true;
}
-}
-bool lcl_canJoin( ScRange& r1, ScRange& r2 )
-{
- bool bCanJoin = false;
- SCCOL startEndColDiff = r2.aStart.Col() - r1.aEnd.Col();
- SCROW startEndRowDiff = r2.aStart.Row() - r1.aEnd.Row();
- SCCOL startColDiff = r2.aStart.Col() - r1.aStart.Col();
- SCCOL endColDiff = r2.aEnd.Col() - r1.aEnd.Col();
- SCROW startRowDiff = r2.aStart.Row() - r1.aStart.Row();
- SCROW endRowDiff = r2.aEnd.Row() - r1.aEnd.Row();
- if ( ( startRowDiff == endRowDiff ) && startRowDiff == 0 && startColDiff >=0 && endColDiff > 0 && ( startEndColDiff <= 1 && startEndColDiff >= -r1.aEnd.Col() ) )
- bCanJoin = true;
- else if ( ( startColDiff == endColDiff ) && startColDiff == 0 && startRowDiff >= 0 && endRowDiff > 0 && ( startEndRowDiff <= 1 && startEndRowDiff >= -r1.aEnd.Row() ) )
- bCanJoin = true;
-#ifdef DEBUG
- String sr1;
- String sr2;
- r1.Format( sr1, SCA_VALID ) ;
- r2.Format( sr2, SCA_VALID ) ;
- OSL_TRACE(" canJoin address %s with %s %s ( startRowDiff(%d), endRowDiff(%d), startColDiff(%d) endColDiff(%d) startEndRowDiff(%d), startEndColDiff(%d) ",
- rtl::OUStringToOString( sr1, RTL_TEXTENCODING_UTF8 ).getStr(),
- rtl::OUStringToOString( sr2, RTL_TEXTENCODING_UTF8 ).getStr(), bCanJoin ? "true" : "false", startRowDiff, endRowDiff, startColDiff, endColDiff, startEndRowDiff, startEndColDiff );
-#endif
- return bCanJoin;
-}
-// strips out ranges that contain other ranges, also
-// if the borders of the intersecting ranges are alligned
-// then the the range is extended to the larger
-// e.g. Range("A4:D10"), Range("B4:E10") would be combined
-// to Range("A4:E10")
-void lcl_strip_containedRanges( Ranges& vRanges )
-{
- // get rid of ranges that are surrounded by other ranges
- Ranges::iterator it_outer = vRanges.begin();
- while( it_outer != vRanges.end() )
+ SCCOL n1L = r1.aStart.Col();
+ SCCOL n1R = r1.aEnd.Col();
+ SCROW n1T = r1.aStart.Row();
+ SCROW n1B = r1.aEnd.Row();
+ SCCOL n2L = r2.aStart.Col();
+ SCCOL n2R = r2.aEnd.Col();
+ SCROW n2T = r2.aStart.Row();
+ SCROW n2B = r2.aEnd.Row();
+
+ // 3) r1 and r2 have equal upper and lower border
+ if( (n1T == n2T) && (n1B == n2B) )
{
- bool it_outer_erased = false; // true = it_outer erased from vRanges
- Ranges::iterator it_inner = vRanges.begin();
- /* Exit the inner loop if outer iterator has been erased in its last
- iteration (this means it has been joined to last it_inner, or that
- the it_inner contains it completely). The inner loop will restart
- with next element of the outer loop, and all elements (from the
- beginning of the list) will be checked against that new element. */
- while( !it_outer_erased && (it_inner != vRanges.end()) )
+ // check that r1 overlaps or touches r2
+ if( ((n1L < n2L) && (n2L - 1 <= n1R)) || ((n2L < n1L) && (n1L - 1 <= n2R)) )
{
- bool it_inner_erased = false; // true = it_inner erased from vRanges
- if ( it_outer != it_inner )
- {
-#ifdef DEBUG
- String r1;
- String r2;
- it_outer->Format( r1, SCA_VALID ) ;
- it_inner->Format( r2, SCA_VALID ) ;
- OSL_TRACE( "try strip/join address %s with %s ",
- rtl::OUStringToOString( r1, RTL_TEXTENCODING_UTF8 ).getStr(),
- rtl::OUStringToOString( r2, RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
- if ( it_outer->In( *it_inner ) )
- {
- it_inner = vRanges.erase( it_inner );
- it_inner_erased = true;
- }
- else if ( it_inner->In( *it_outer ) )
- {
- it_outer = vRanges.erase( it_outer );
- it_outer_erased = true;
- }
-#ifndef OWN_JOIN
- else if ( (*it_inner).aStart.Row() == (*it_outer).aStart.Row()
- && (*it_inner).aEnd.Row() == (*it_outer).aEnd.Row() )
- {
- it_outer->ExtendTo( *it_inner );
- it_inner = vRanges.erase( it_inner );
- it_inner_erased = true;
- }
-#else
- else if ( lcl_canJoin( *it_outer, *it_inner ) )
- {
- it_outer->ExtendTo( *it_inner );
- it_inner = vRanges.erase( it_inner );
- it_inner_erased = true;
- }
- else if ( lcl_canJoin( *it_inner, *it_outer) )
- {
- it_inner->ExtendTo( *it_outer );
- it_outer = vRanges.erase( it_outer );
- it_outer_erased = true;
- }
-#endif
- }
- /* If it_inner has not been erased from vRanges, continue inner
- loop with next element. Otherwise, it_inner already points to
- the next element (return value of list::erase()). */
- if( !it_inner_erased )
- ++it_inner;
+ r1.aStart.SetCol( ::std::min( n1L, n2L ) );
+ r1.aEnd.SetCol( ::std::max( n1R, n2R ) );
+ return true;
}
- /* If it_outer has not been erased from vRanges, continue outer loop
- with next element. Otherwise, it_outer already points to the next
- element (return value of list::erase()). */
- if( !it_outer_erased )
- ++it_outer;
+ return false;
}
+ // 4) r1 and r2 have equal left and right border
+ if( (n1L == n2L) && (n1R == n2R) )
+ {
+ // check that r1 overlaps or touches r2
+ if( ((n1T < n2T) && (n2T + 1 <= n1B)) || ((n2T < n1T) && (n1T + 1 <= n2B)) )
+ {
+ r1.aStart.SetRow( ::std::min( n1T, n2T ) );
+ r1.aEnd.SetRow( ::std::max( n1B, n2B ) );
+ return true;
+ }
+ return false;
+ }
+
+ // 5) cannot join these ranges
+ return false;
}
-Ranges
-lcl_intersectionImpl( ScRangeList& rl1, ScRangeList& rl2 )
+/** Strips out ranges that are contained by other ranges, joins ranges that can be joined
+ together (aligned borders, e.g. A4:D10 and B4:E10 would be combined to A4:E10. */
+void lclJoinRanges( ListOfScRange& rList )
{
- Ranges intersections;
- for ( USHORT x = 0 ; x < rl1.Count(); ++x )
+ ListOfScRange::iterator aOuterIt = rList.begin();
+ while( aOuterIt != rList.end() )
{
- for ( USHORT y = 0 ; y < rl2.Count(); ++y )
+ bool bAnyErased = false; // true = any range erased from rList
+ ListOfScRange::iterator aInnerIt = rList.begin();
+ while( aInnerIt != rList.end() )
{
-#ifdef DEBUG
- String r1;
- String r2;
- rl1.GetObject( x )->Format( r1, SCA_VALID ) ;
- rl2.GetObject( y )->Format( r2, SCA_VALID ) ;
- OSL_TRACE( "comparing address %s with %s ",
- rtl::OUStringToOString( r1, RTL_TEXTENCODING_UTF8 ).getStr(),
- rtl::OUStringToOString( r2, RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
- if( rl1.GetObject( x )->Intersects( *rl2.GetObject( y ) ) )
+ bool bInnerErased = false; // true = aInnerIt erased from rList
+ // do not compare a range with itself
+ if( (aOuterIt != aInnerIt) && lclTryJoin( *aOuterIt, *aInnerIt ) )
{
- ScRange aIntersection = ScRange( Max( rl1.GetObject( x )->aStart.Col(), rl2.GetObject( y )->aStart.Col() ),
- Max( rl1.GetObject( x )->aStart.Row(), rl2.GetObject( y )->aStart.Row() ),
- Max( rl1.GetObject( x )->aStart.Tab(), rl2.GetObject( y )->aStart.Tab() ),
- Min( rl1.GetObject( x )->aEnd.Col(), rl2.GetObject( y )->aEnd.Col() ),
- Min( rl1.GetObject( x )->aEnd.Row(), rl2.GetObject( y )->aEnd.Row() ),
- Min( rl1.GetObject( x )->aEnd.Tab(), rl2.GetObject( y )->aEnd.Tab() ) );
- intersections.push_back( aIntersection );
+ // aOuterIt points to joined range, aInnerIt will be removed
+ aInnerIt = rList.erase( aInnerIt );
+ bInnerErased = bAnyErased = true;
}
+ /* If aInnerIt has been erased from rList, it already points to
+ the next element (return value of list::erase()). */
+ if( !bInnerErased )
+ ++aInnerIt;
}
+ // if any range has been erased, repeat outer loop with the same range
+ if( !bAnyErased )
+ ++aOuterIt;
}
- lcl_strip_containedRanges( intersections );
- return intersections;
}
-// Intersection of a set of ranges ( where each range is represented by a ScRangeList e.g.
-// any range can be a multi-area range )
-// An intersection is performed between each range in the set of ranges.
-// The resulting set of intersections is then processed to strip out any
-// intersections that contain other intersections ( and also ranges that directly line up
-// are joined ) ( see lcl_strip_containedRanges )
-RangesList lcl_intersections( RangesList& vRanges )
+/** Intersects the passed list with all ranges of a VBA Range object in the passed Any. */
+void lclIntersectRanges( ListOfScRange& rList, const uno::Any& rArg )
+ throw (script::BasicErrorException, uno::RuntimeException)
{
- RangesList intersections;
- RangesList::iterator it = vRanges.begin();
- while( it != vRanges.end() )
+ // extract the ranges from the passed argument, will throw on invalid data
+ ListOfScRange aList2;
+ lclAddToListOfScRange( aList2, rArg );
+ // do nothing, if the passed list is already empty
+ if( !rList.empty() && !aList2.empty() )
{
- Ranges intermediateList;
- for( RangesList::iterator it_inner = vRanges.begin(); it_inner != vRanges.end(); ++it_inner )
+ // save original list in a local
+ ListOfScRange aList1;
+ aList1.swap( rList );
+ // join ranges from passed argument
+ lclJoinRanges( aList2 );
+ // calculate intersection of the ranges in both lists
+ for( ListOfScRange::const_iterator aOuterIt = aList1.begin(), aOuterEnd = aList1.end(); aOuterIt != aOuterEnd; ++aOuterIt )
{
- if ( it != it_inner )
+ for( ListOfScRange::const_iterator aInnerIt = aList2.begin(), aInnerEnd = aList2.end(); aInnerIt != aInnerEnd; ++aInnerIt )
{
- Ranges ranges = lcl_intersectionImpl( *it, *it_inner );
- for ( Ranges::iterator range_it = ranges.begin(); range_it != ranges.end(); ++range_it )
- intermediateList.push_back( *range_it );
+ if( aOuterIt->Intersects( *aInnerIt ) )
+ {
+ ScRange aIsectRange(
+ Max( aOuterIt->aStart.Col(), aInnerIt->aStart.Col() ),
+ Max( aOuterIt->aStart.Row(), aInnerIt->aStart.Row() ),
+ Max( aOuterIt->aStart.Tab(), aInnerIt->aStart.Tab() ),
+ Min( aOuterIt->aEnd.Col(), aInnerIt->aEnd.Col() ),
+ Min( aOuterIt->aEnd.Row(), aInnerIt->aEnd.Row() ),
+ Min( aOuterIt->aEnd.Tab(), aInnerIt->aEnd.Tab() ) );
+ rList.push_back( aIsectRange );
+ }
}
}
- it = vRanges.erase( it ); // remove it so we don't include it in the next pass.
- // 'it' is removed uncontidionally from vRanges, so the while loop will terminate
-
- ScRangeList argIntersect;
- lcl_strip_containedRanges( intermediateList );
-
- for( Ranges::iterator it_inter = intermediateList.begin(); it_inter != intermediateList.end(); ++it_inter )
-#ifndef OWN_JOIN
- argIntersect.Join( *it_inter );
-#else
- argIntersect.Append( *it_inter );
-#endif
-
- intersections.push_back( argIntersect );
- }
- return intersections;
-}
-
-uno::Reference< excel::XRange > SAL_CALL
-ScVbaApplication::Intersect( const uno::Reference< excel::XRange >& Arg1, const uno::Reference< excel::XRange >& Arg2, const uno::Any& Arg3, const uno::Any& Arg4, const uno::Any& Arg5, const uno::Any& Arg6, const uno::Any& Arg7, const uno::Any& Arg8, const uno::Any& Arg9, const uno::Any& Arg10, const uno::Any& Arg11, const uno::Any& Arg12, const uno::Any& Arg13, const uno::Any& Arg14, const uno::Any& Arg15, const uno::Any& Arg16, const uno::Any& Arg17, const uno::Any& Arg18, const uno::Any& Arg19, const uno::Any& Arg20, const uno::Any& Arg21, const uno::Any& Arg22, const uno::Any& Arg23, const uno::Any& Arg24, const uno::Any& Arg25, const uno::Any& Arg26, const uno::Any& Arg27, const uno::Any& Arg28, const uno::Any& Arg29, const uno::Any& Arg30 ) throw (script::BasicErrorException, uno::RuntimeException)
-{
- if ( !Arg1.is() || !Arg2.is() )
- DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
-
- RangesList vRanges;
- lcl_addRangesToVec( vRanges, uno::makeAny( Arg1 ) );
- lcl_addRangesToVec( vRanges, uno::makeAny( Arg2 ) );
-
- if ( Arg3.hasValue() )
- lcl_addRangesToVec( vRanges, Arg3 );
- if ( Arg4.hasValue() )
- lcl_addRangesToVec( vRanges, Arg4 );
- if ( Arg5.hasValue() )
- lcl_addRangesToVec( vRanges, Arg5 );
- if ( Arg6.hasValue() )
- lcl_addRangesToVec( vRanges, Arg6 );
- if ( Arg7.hasValue() )
- lcl_addRangesToVec( vRanges, Arg7 );
- if ( Arg8.hasValue() )
- lcl_addRangesToVec( vRanges, Arg8 );
- if ( Arg9.hasValue() )
- lcl_addRangesToVec( vRanges, Arg9 );
- if ( Arg10.hasValue() )
- lcl_addRangesToVec( vRanges, Arg10 );
- if ( Arg11.hasValue() )
- lcl_addRangesToVec( vRanges, Arg11 );
- if ( Arg12.hasValue() )
- lcl_addRangesToVec( vRanges, Arg12 );
- if ( Arg13.hasValue() )
- lcl_addRangesToVec( vRanges, Arg13 );
- if ( Arg14.hasValue() )
- lcl_addRangesToVec( vRanges, Arg14 );
- if ( Arg15.hasValue() )
- lcl_addRangesToVec( vRanges, Arg15 );
- if ( Arg16.hasValue() )
- lcl_addRangesToVec( vRanges, Arg16 );
- if ( Arg17.hasValue() )
- lcl_addRangesToVec( vRanges, Arg17 );
- if ( Arg18.hasValue() )
- lcl_addRangesToVec( vRanges, Arg18 );
- if ( Arg19.hasValue() )
- lcl_addRangesToVec( vRanges, Arg19 );
- if ( Arg20.hasValue() )
- lcl_addRangesToVec( vRanges, Arg20 );
- if ( Arg21.hasValue() )
- lcl_addRangesToVec( vRanges, Arg21 );
- if ( Arg22.hasValue() )
- lcl_addRangesToVec( vRanges, Arg22 );
- if ( Arg23.hasValue() )
- lcl_addRangesToVec( vRanges, Arg23 );
- if ( Arg24.hasValue() )
- lcl_addRangesToVec( vRanges, Arg24 );
- if ( Arg25.hasValue() )
- lcl_addRangesToVec( vRanges, Arg25 );
- if ( Arg26.hasValue() )
- lcl_addRangesToVec( vRanges, Arg26 );
- if ( Arg27.hasValue() )
- lcl_addRangesToVec( vRanges, Arg27 );
- if ( Arg28.hasValue() )
- lcl_addRangesToVec( vRanges, Arg28 );
- if ( Arg29.hasValue() )
- lcl_addRangesToVec( vRanges, Arg29 );
- if ( Arg30.hasValue() )
- lcl_addRangesToVec( vRanges, Arg30 );
-
- uno::Reference< excel::XRange > xRefRange;
-
- ScRangeList aCellRanges;
- // first pass - gets the set of all possible interections of Arg1..ArgN
- RangesList intersections = lcl_intersections( vRanges );
- // second pass - gets the intersections of the intersections ( don't ask, but this
- // is what seems to happen )
- if ( intersections.size() > 1)
- intersections = lcl_intersections( intersections );
- for( RangesList::iterator it = intersections.begin(); it != intersections.end(); ++it )
- {
- for ( USHORT x = 0 ; x < it->Count(); ++x )
-#ifndef OWN_JOIN
- aCellRanges.Join( *it->GetObject(x) );
-#else
- aCellRanges.Append( *it->GetObject(x) );
-#endif
+ // again, join the result ranges
+ lclJoinRanges( rList );
}
-
- uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- ScDocShell* pDocShell = excel::getDocShell( xModel );
- if ( aCellRanges.Count() == 1 )
- {
- uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pDocShell, *aCellRanges.First() ));
- xRefRange = new ScVbaRange( excel::getUnoSheetModuleObj( xRange ), mxContext, xRange );
- }
- else if ( aCellRanges.Count() > 1 )
- {
- uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDocShell, aCellRanges ) );
- xRefRange = new ScVbaRange( excel::getUnoSheetModuleObj( xRanges ) , mxContext, xRanges );
-
- }
- return xRefRange;
}
-uno::Reference< excel::XRange > SAL_CALL
-ScVbaApplication::Union( const uno::Reference< excel::XRange >& Arg1, const uno::Reference< excel::XRange >& Arg2, const uno::Any& Arg3, const uno::Any& Arg4, const uno::Any& Arg5, const uno::Any& Arg6, const uno::Any& Arg7, const uno::Any& Arg8, const uno::Any& Arg9, const uno::Any& Arg10, const uno::Any& Arg11, const uno::Any& Arg12, const uno::Any& Arg13, const uno::Any& Arg14, const uno::Any& Arg15, const uno::Any& Arg16, const uno::Any& Arg17, const uno::Any& Arg18, const uno::Any& Arg19, const uno::Any& Arg20, const uno::Any& Arg21, const uno::Any& Arg22, const uno::Any& Arg23, const uno::Any& Arg24, const uno::Any& Arg25, const uno::Any& Arg26, const uno::Any& Arg27, const uno::Any& Arg28, const uno::Any& Arg29, const uno::Any& Arg30 ) throw (script::BasicErrorException, uno::RuntimeException)
+/** Creates a VBA Range object from the passed list of ranges. */
+uno::Reference< excel::XRange > lclCreateVbaRange(
+ const uno::Reference< uno::XComponentContext >& rxContext,
+ const uno::Reference< frame::XModel >& rxModel,
+ const ListOfScRange& rList ) throw (uno::RuntimeException)
{
- if ( !Arg1.is() || !Arg2.is() )
- DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
-
- uno::Reference< excel::XRange > xRange;
- Ranges vRanges;
- lcl_addRangeToVec( vRanges, uno::makeAny( Arg1 ) );
- lcl_addRangeToVec( vRanges, uno::makeAny( Arg2 ) );
-
- if ( Arg3.hasValue() )
- lcl_addRangeToVec( vRanges, Arg3 );
- if ( Arg4.hasValue() )
- lcl_addRangeToVec( vRanges, Arg4 );
- if ( Arg5.hasValue() )
- lcl_addRangeToVec( vRanges, Arg5 );
- if ( Arg6.hasValue() )
- lcl_addRangeToVec( vRanges, Arg6 );
- if ( Arg7.hasValue() )
- lcl_addRangeToVec( vRanges, Arg7 );
- if ( Arg8.hasValue() )
- lcl_addRangeToVec( vRanges, Arg8 );
- if ( Arg9.hasValue() )
- lcl_addRangeToVec( vRanges, Arg9 );
- if ( Arg10.hasValue() )
- lcl_addRangeToVec( vRanges, Arg10 );
- if ( Arg11.hasValue() )
- lcl_addRangeToVec( vRanges, Arg11 );
- if ( Arg12.hasValue() )
- lcl_addRangeToVec( vRanges, Arg12 );
- if ( Arg13.hasValue() )
- lcl_addRangeToVec( vRanges, Arg13 );
- if ( Arg14.hasValue() )
- lcl_addRangeToVec( vRanges, Arg14 );
- if ( Arg15.hasValue() )
- lcl_addRangeToVec( vRanges, Arg15 );
- if ( Arg16.hasValue() )
- lcl_addRangeToVec( vRanges, Arg16 );
- if ( Arg17.hasValue() )
- lcl_addRangeToVec( vRanges, Arg17 );
- if ( Arg18.hasValue() )
- lcl_addRangeToVec( vRanges, Arg18 );
- if ( Arg19.hasValue() )
- lcl_addRangeToVec( vRanges, Arg19 );
- if ( Arg20.hasValue() )
- lcl_addRangeToVec( vRanges, Arg20 );
- if ( Arg21.hasValue() )
- lcl_addRangeToVec( vRanges, Arg21 );
- if ( Arg22.hasValue() )
- lcl_addRangeToVec( vRanges, Arg22 );
- if ( Arg23.hasValue() )
- lcl_addRangeToVec( vRanges, Arg23 );
- if ( Arg24.hasValue() )
- lcl_addRangeToVec( vRanges, Arg24 );
- if ( Arg25.hasValue() )
- lcl_addRangeToVec( vRanges, Arg25 );
- if ( Arg26.hasValue() )
- lcl_addRangeToVec( vRanges, Arg26 );
- if ( Arg27.hasValue() )
- lcl_addRangeToVec( vRanges, Arg27 );
- if ( Arg28.hasValue() )
- lcl_addRangeToVec( vRanges, Arg28 );
- if ( Arg29.hasValue() )
- lcl_addRangeToVec( vRanges, Arg29 );
- if ( Arg30.hasValue() )
- lcl_addRangeToVec( vRanges, Arg30 );
+ ScDocShell* pDocShell = excel::getDocShell( rxModel );
+ if( !pDocShell ) throw uno::RuntimeException();
ScRangeList aCellRanges;
- lcl_strip_containedRanges( vRanges );
+ for( ListOfScRange::const_iterator aIt = rList.begin(), aEnd = rList.end(); aIt != aEnd; ++aIt )
+ aCellRanges.Append( *aIt );
- for( Ranges::iterator it = vRanges.begin(); it != vRanges.end(); ++it )
- aCellRanges.Append( *it );
-
- uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- ScDocShell* pDocShell = excel::getDocShell( xModel );
- if ( aCellRanges.Count() == 1 )
+ if( aCellRanges.Count() == 1 )
{
- // normal range
- uno::Reference< table::XCellRange > xCalcRange( new ScCellRangeObj( pDocShell, *aCellRanges.First() ) );
- xRange = new ScVbaRange( excel::getUnoSheetModuleObj( xCalcRange ), mxContext, xCalcRange );
+ uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pDocShell, *aCellRanges.First() ) );
+ return new ScVbaRange( excel::getUnoSheetModuleObj( xRange ), rxContext, xRange );
}
- else if ( aCellRanges.Count() > 1 ) // Multi-Area
+ if( aCellRanges.Count() > 1 )
{
uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDocShell, aCellRanges ) );
- xRange = new ScVbaRange( excel::getUnoSheetModuleObj( xRanges ), mxContext, xRanges );
+ return new ScVbaRange( excel::getUnoSheetModuleObj( xRanges ), rxContext, xRanges );
}
-
- // #FIXME need proper (WorkSheet) parent
- return xRange;
+ return 0;
+}
+
+} // namespace
+
+// ----------------------------------------------------------------------------
+
+uno::Reference< excel::XRange > SAL_CALL ScVbaApplication::Intersect(
+ const uno::Reference< excel::XRange >& rArg1, const uno::Reference< excel::XRange >& rArg2,
+ const uno::Any& rArg3, const uno::Any& rArg4, const uno::Any& rArg5, const uno::Any& rArg6,
+ const uno::Any& rArg7, const uno::Any& rArg8, const uno::Any& rArg9, const uno::Any& rArg10,
+ const uno::Any& rArg11, const uno::Any& rArg12, const uno::Any& rArg13, const uno::Any& rArg14,
+ const uno::Any& rArg15, const uno::Any& rArg16, const uno::Any& rArg17, const uno::Any& rArg18,
+ const uno::Any& rArg19, const uno::Any& rArg20, const uno::Any& rArg21, const uno::Any& rArg22,
+ const uno::Any& rArg23, const uno::Any& rArg24, const uno::Any& rArg25, const uno::Any& rArg26,
+ const uno::Any& rArg27, const uno::Any& rArg28, const uno::Any& rArg29, const uno::Any& rArg30 )
+ throw (script::BasicErrorException, uno::RuntimeException)
+{
+ if( !rArg1.is() || !rArg2.is() )
+ DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() );
+
+ // initialize the result list with 1st parameter, join its ranges together
+ ListOfScRange aList;
+ lclAddToListOfScRange( aList, uno::Any( rArg1 ) );
+ lclJoinRanges( aList );
+
+ // process all other parameters, this updates the list with intersection
+ lclIntersectRanges( aList, uno::Any( rArg2 ) );
+ lclIntersectRanges( aList, rArg3 );
+ lclIntersectRanges( aList, rArg4 );
+ lclIntersectRanges( aList, rArg5 );
+ lclIntersectRanges( aList, rArg6 );
+ lclIntersectRanges( aList, rArg7 );
+ lclIntersectRanges( aList, rArg8 );
+ lclIntersectRanges( aList, rArg9 );
+ lclIntersectRanges( aList, rArg10 );
+ lclIntersectRanges( aList, rArg11 );
+ lclIntersectRanges( aList, rArg12 );
+ lclIntersectRanges( aList, rArg13 );
+ lclIntersectRanges( aList, rArg14 );
+ lclIntersectRanges( aList, rArg15 );
+ lclIntersectRanges( aList, rArg16 );
+ lclIntersectRanges( aList, rArg17 );
+ lclIntersectRanges( aList, rArg18 );
+ lclIntersectRanges( aList, rArg19 );
+ lclIntersectRanges( aList, rArg20 );
+ lclIntersectRanges( aList, rArg21 );
+ lclIntersectRanges( aList, rArg22 );
+ lclIntersectRanges( aList, rArg23 );
+ lclIntersectRanges( aList, rArg24 );
+ lclIntersectRanges( aList, rArg25 );
+ lclIntersectRanges( aList, rArg26 );
+ lclIntersectRanges( aList, rArg27 );
+ lclIntersectRanges( aList, rArg28 );
+ lclIntersectRanges( aList, rArg29 );
+ lclIntersectRanges( aList, rArg30 );
+
+ // create the VBA Range object
+ return lclCreateVbaRange( mxContext, getCurrentDocument(), aList );
+}
+
+uno::Reference< excel::XRange > SAL_CALL ScVbaApplication::Union(
+ const uno::Reference< excel::XRange >& rArg1, const uno::Reference< excel::XRange >& rArg2,
+ const uno::Any& rArg3, const uno::Any& rArg4, const uno::Any& rArg5, const uno::Any& rArg6,
+ const uno::Any& rArg7, const uno::Any& rArg8, const uno::Any& rArg9, const uno::Any& rArg10,
+ const uno::Any& rArg11, const uno::Any& rArg12, const uno::Any& rArg13, const uno::Any& rArg14,
+ const uno::Any& rArg15, const uno::Any& rArg16, const uno::Any& rArg17, const uno::Any& rArg18,
+ const uno::Any& rArg19, const uno::Any& rArg20, const uno::Any& rArg21, const uno::Any& rArg22,
+ const uno::Any& rArg23, const uno::Any& rArg24, const uno::Any& rArg25, const uno::Any& rArg26,
+ const uno::Any& rArg27, const uno::Any& rArg28, const uno::Any& rArg29, const uno::Any& rArg30 )
+ throw (script::BasicErrorException, uno::RuntimeException)
+{
+ if( !rArg1.is() || !rArg2.is() )
+ DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() );
+
+ ListOfScRange aList;
+ lclAddToListOfScRange( aList, uno::Any( rArg1 ) );
+ lclAddToListOfScRange( aList, uno::Any( rArg2 ) );
+ lclAddToListOfScRange( aList, rArg3 );
+ lclAddToListOfScRange( aList, rArg4 );
+ lclAddToListOfScRange( aList, rArg5 );
+ lclAddToListOfScRange( aList, rArg6 );
+ lclAddToListOfScRange( aList, rArg7 );
+ lclAddToListOfScRange( aList, rArg8 );
+ lclAddToListOfScRange( aList, rArg9 );
+ lclAddToListOfScRange( aList, rArg10 );
+ lclAddToListOfScRange( aList, rArg11 );
+ lclAddToListOfScRange( aList, rArg12 );
+ lclAddToListOfScRange( aList, rArg13 );
+ lclAddToListOfScRange( aList, rArg14 );
+ lclAddToListOfScRange( aList, rArg15 );
+ lclAddToListOfScRange( aList, rArg16 );
+ lclAddToListOfScRange( aList, rArg17 );
+ lclAddToListOfScRange( aList, rArg18 );
+ lclAddToListOfScRange( aList, rArg19 );
+ lclAddToListOfScRange( aList, rArg20 );
+ lclAddToListOfScRange( aList, rArg21 );
+ lclAddToListOfScRange( aList, rArg22 );
+ lclAddToListOfScRange( aList, rArg23 );
+ lclAddToListOfScRange( aList, rArg24 );
+ lclAddToListOfScRange( aList, rArg25 );
+ lclAddToListOfScRange( aList, rArg26 );
+ lclAddToListOfScRange( aList, rArg27 );
+ lclAddToListOfScRange( aList, rArg28 );
+ lclAddToListOfScRange( aList, rArg29 );
+ lclAddToListOfScRange( aList, rArg30 );
+
+ // simply join together all ranges as much as possible, strip out covered ranges etc.
+ lclJoinRanges( aList );
+
+ // create the VBA Range object
+ return lclCreateVbaRange( mxContext, getCurrentDocument(), aList );
}
void
diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx
index 03f3ecd3c50c..c70a7f83726d 100644
--- a/sc/source/ui/vba/vbaglobals.cxx
+++ b/sc/source/ui/vba/vbaglobals.cxx
@@ -80,6 +80,15 @@ ScVbaGlobals::getApplication() throw (uno::RuntimeException)
return mxApplication;
}
+
+uno::Reference<excel::XApplication > SAL_CALL
+ScVbaGlobals::getExcel() throw (uno::RuntimeException)
+{
+ return getApplication();
+}
+
+
+
uno::Reference< excel::XWorkbook > SAL_CALL
ScVbaGlobals::getActiveWorkbook() throw (uno::RuntimeException)
{
@@ -219,6 +228,25 @@ ScVbaGlobals::Rows( const uno::Any& aIndex ) throw (uno::RuntimeException)
}
+
+uno::Any SAL_CALL
+ScVbaGlobals::getDebug() throw (uno::RuntimeException)
+{
+ try // return empty object on error
+ {
+ uno::Sequence< uno::Any > aArgs( 1 );
+ aArgs[ 0 ] <<= uno::Reference< XHelperInterface >( this );
+ uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW );
+ uno::Reference< uno::XInterface > xVBADebug = xServiceManager->createInstanceWithArgumentsAndContext(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.Debug" ) ), aArgs, mxContext );
+ return uno::Any( xVBADebug );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ return uno::Any();
+}
+
uno::Sequence< ::rtl::OUString > SAL_CALL
ScVbaGlobals::getAvailableServiceNames( ) throw (uno::RuntimeException)
{
diff --git a/sc/source/ui/vba/vbaglobals.hxx b/sc/source/ui/vba/vbaglobals.hxx
index ae34d710240f..f22e5b19faa4 100644
--- a/sc/source/ui/vba/vbaglobals.hxx
+++ b/sc/source/ui/vba/vbaglobals.hxx
@@ -82,7 +82,8 @@ typedef ::cppu::ImplInheritanceHelper1< VbaGlobalsBase, ov::excel::XGlobals > Sc
virtual css::uno::Any SAL_CALL Names( const css::uno::Any& aIndex ) throw ( css::uno::RuntimeException );
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Intersect( const css::uno::Reference< ov::excel::XRange >& Arg1, const css::uno::Reference< ov::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Union( const css::uno::Reference< ov::excel::XRange >& Arg1, const css::uno::Reference< ov::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
-
+ virtual css::uno::Reference< ov::excel::XApplication > SAL_CALL getExcel() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getDebug() throw (css::uno::RuntimeException);
// XMultiServiceFactory
diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx
index 2304874bdb1b..9fd22bf89f7a 100644
--- a/sc/source/ui/vba/vbanames.cxx
+++ b/sc/source/ui/vba/vbanames.cxx
@@ -173,11 +173,6 @@ ScVbaNames::getElementType() throw( css::uno::RuntimeException )
uno::Reference< container::XEnumeration >
ScVbaNames::createEnumeration() throw (uno::RuntimeException)
{
- if ( mxNames.is() )
- {
- uno::Reference< container::XEnumerationAccess > xAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
- return xAccess->createEnumeration();
- }
uno::Reference< container::XEnumerationAccess > xEnumAccess( mxNames, uno::UNO_QUERY_THROW );
return new NamesEnumeration( this, mxContext, xEnumAccess->createEnumeration(), mxModel , mxNames );
}
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index b50199f025d0..455af075306c 100755
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1206,6 +1206,14 @@ inline table::CellRangeAddress lclGetRangeAddress( const uno::Reference< RangeTy
return uno::Reference< sheet::XCellRangeAddressable >( rxCellRange, uno::UNO_QUERY_THROW )->getRangeAddress();
}
+void lclClearRange( const uno::Reference< table::XCellRange >& rxCellRange ) throw (uno::RuntimeException)
+{
+ using namespace ::com::sun::star::sheet::CellFlags;
+ sal_Int32 nFlags = VALUE | DATETIME | STRING | ANNOTATION | FORMULA | HARDATTR | STYLES | EDITATTR | FORMATTED;
+ uno::Reference< sheet::XSheetOperation > xSheetOperation( rxCellRange, uno::UNO_QUERY_THROW );
+ xSheetOperation->clearContents( nFlags );
+}
+
uno::Reference< sheet::XSheetCellRange > lclExpandToMerged( const uno::Reference< table::XCellRange >& rxCellRange, bool bRecursive ) throw (uno::RuntimeException)
{
uno::Reference< sheet::XSheetCellRange > xNewCellRange( rxCellRange, uno::UNO_QUERY_THROW );
@@ -1251,15 +1259,27 @@ void lclExpandAndMerge( const uno::Reference< table::XCellRange >& rxCellRange,
// Calc cannot merge over merged ranges, always unmerge first
xMerge->merge( sal_False );
if( bMerge )
+ {
+ // clear all contents of the covered cells (not the top-left cell)
+ table::CellRangeAddress aRangeAddr = lclGetRangeAddress( rxCellRange );
+ sal_Int32 nLastColIdx = aRangeAddr.EndColumn - aRangeAddr.StartColumn;
+ sal_Int32 nLastRowIdx = aRangeAddr.EndRow - aRangeAddr.StartRow;
+ // clear cells of top row, right of top-left cell
+ if( nLastColIdx > 0 )
+ lclClearRange( rxCellRange->getCellRangeByPosition( 1, 0, nLastColIdx, 0 ) );
+ // clear all rows below top row
+ if( nLastRowIdx > 0 )
+ lclClearRange( rxCellRange->getCellRangeByPosition( 0, 1, nLastColIdx, nLastRowIdx ) );
+ // merge the range
xMerge->merge( sal_True );
- // FIXME need to check whether all the cell contents are retained or lost by popping up a dialog
+ }
}
util::TriState lclGetMergedState( const uno::Reference< table::XCellRange >& rxCellRange ) throw (uno::RuntimeException)
{
/* 1) Check if range is completely inside one single merged range. To do
this, try to extend from top-left cell only (not from entire range).
- This will excude cases where this range consists of several merged
+ This will exclude cases where this range consists of several merged
ranges (or parts of them). */
table::CellRangeAddress aRangeAddr = lclGetRangeAddress( rxCellRange );
uno::Reference< table::XCellRange > xTopLeft( rxCellRange->getCellRangeByPosition( 0, 0, 0, 0 ), uno::UNO_SET_THROW );
@@ -1508,7 +1528,8 @@ ScVbaRange::setValue( const uno::Any &aValue ) throw (uno::RuntimeException)
void
ScVbaRange::Clear() throw (uno::RuntimeException)
{
- sal_Int32 nFlags = sheet::CellFlags::VALUE | sheet::CellFlags::STRING | sheet::CellFlags::HARDATTR | sheet::CellFlags::FORMATTED | sheet::CellFlags::EDITATTR | sheet::CellFlags::FORMULA;
+ using namespace ::com::sun::star::sheet::CellFlags;
+ sal_Int32 nFlags = VALUE | DATETIME | STRING | FORMULA | HARDATTR | EDITATTR | FORMATTED;
ClearContents( nFlags );
}
@@ -2294,8 +2315,7 @@ ScVbaRange::Columns(const uno::Any& aIndex ) throw (uno::RuntimeException)
void
ScVbaRange::setMergeCells( const uno::Any& aIsMerged ) throw (script::BasicErrorException, uno::RuntimeException)
{
- bool bMerge = false;
- aIsMerged >>= bMerge;
+ bool bMerge = extractBoolFromAny( aIsMerged );
if( mxRanges.is() )
{
@@ -2496,7 +2516,8 @@ ScVbaRange::setWrapText( const uno::Any& aIsWrapped ) throw (script::BasicErrorE
}
uno::Reference< beans::XPropertySet > xProps(mxRange, ::uno::UNO_QUERY_THROW );
- xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsTextWrapped" ) ), aIsWrapped );
+ bool bIsWrapped = extractBoolFromAny( aIsWrapped );
+ xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsTextWrapped" ) ), uno::Any( bIsWrapped ) );
}
uno::Any
@@ -2875,13 +2896,11 @@ ScVbaRange::setHidden( const uno::Any& _hidden ) throw (uno::RuntimeException)
return;
}
- sal_Bool bHidden = sal_False;
- _hidden >>= bHidden;
-
+ bool bHidden = extractBoolFromAny( _hidden );
try
{
uno::Reference< beans::XPropertySet > xProps = getRowOrColumnProps( mxRange, mbIsRows );
- xProps->setPropertyValue( ISVISIBLE, uno::makeAny( !bHidden ) );
+ xProps->setPropertyValue( ISVISIBLE, uno::Any( !bHidden ) );
}
catch( uno::Exception& e )
{
@@ -2978,7 +2997,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
// return a Range object that represents the first cell where that information is found.
rtl::OUString sWhat;
sal_Int32 nWhat = 0;
- float fWhat = 0.0;
+ double fWhat = 0.0;
// string.
if( What >>= sWhat )
@@ -3010,6 +3029,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
{
uno::Reference< util::XSearchDescriptor > xDescriptor = xSearch->createSearchDescriptor();
xDescriptor->setSearchString( sSearch );
+ xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHREGEXP ) ), uno::Any( true ) );
uno::Reference< excel::XRange > xAfterRange;
uno::Reference< table::XCellRange > xStartCell;
@@ -3115,8 +3135,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
ScGlobal::SetSearchItem( newOptions );
- uno::Reference< util::XSearchDescriptor > xSearchDescriptor( xDescriptor, uno::UNO_QUERY );
- uno::Reference< uno::XInterface > xInterface = xStartCell.is() ? xSearch->findNext( xStartCell, xSearchDescriptor) : xSearch->findFirst( xSearchDescriptor );
+ uno::Reference< uno::XInterface > xInterface = xStartCell.is() ? xSearch->findNext( xStartCell, xDescriptor) : xSearch->findFirst( xDescriptor );
uno::Reference< table::XCellRange > xCellRange( xInterface, uno::UNO_QUERY );
if ( xCellRange.is() )
{
@@ -4910,8 +4929,7 @@ void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::Ru
if( m_Areas->getCount() > 1 )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not set Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
- sal_Bool bShowDetail = sal_False;
- aShowDetail >>= bShowDetail;
+ bool bShowDetail = extractBoolFromAny( aShowDetail );
RangeHelper helper( mxRange );
uno::Reference< sheet::XSheetCellCursor > xSheetCellCursor = helper.getSheetCellCursor();
diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx
index 365c8b35a00c..28469c4685a2 100644
--- a/sc/source/ui/vba/vbaworkbook.cxx
+++ b/sc/source/ui/vba/vbaworkbook.cxx
@@ -50,6 +50,7 @@
#include "vbanames.hxx" // Amelia Wang
#include "nameuno.hxx"
#include "docoptio.hxx"
+#include "unonames.hxx"
// Much of the impl. for the equivalend UNO module is
// sc/source/ui/unoobj/docuno.cxx, viewuno.cxx
@@ -208,7 +209,6 @@ ScVbaWorkbook::ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface
ScVbaWorkbook::ScVbaWorkbook( uno::Sequence< uno::Any> const & args,
uno::Reference< uno::XComponentContext> const & xContext ) : ScVbaWorkbook_BASE( args, xContext )
-
{
init();
}
@@ -216,21 +216,24 @@ ScVbaWorkbook::ScVbaWorkbook( uno::Sequence< uno::Any> const & args,
uno::Reference< excel::XWorksheet >
ScVbaWorkbook::getActiveSheet() throw (uno::RuntimeException)
{
- uno::Reference< frame::XModel > xModel( getCurrentExcelDoc( mxContext ) );
- uno::Reference< sheet::XSpreadsheet > xSheet;
+ uno::Reference< frame::XModel > xModel( getCurrentExcelDoc( mxContext ), uno::UNO_SET_THROW );
uno::Reference< sheet::XSpreadsheetView > xView( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
- if ( xView.is() )
- xSheet = xView->getActiveSheet();
- return new ScVbaWorksheet( this, mxContext, xSheet, xModel );
+ uno::Reference< beans::XPropertySet > xSheetProps( xView->getActiveSheet(), uno::UNO_QUERY_THROW );
+ // #162503# return the original document module wrapper object, instead of a new instance
+ ::rtl::OUString aCodeName;
+ xSheetProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_CODENAME ) ) ) >>= aCodeName;
+ ScDocShell* pShell = excel::getDocShell( xModel );
+ if( !pShell )
+ throw uno::RuntimeException();
+ return uno::Reference< excel::XWorksheet >( getUnoDocModule( aCodeName, pShell ), uno::UNO_QUERY_THROW );
}
+
uno::Any SAL_CALL
ScVbaWorkbook::Sheets( const uno::Any& aIndex ) throw (uno::RuntimeException)
{
return Worksheets( aIndex );
}
-
-
uno::Any SAL_CALL
ScVbaWorkbook::Worksheets( const uno::Any& aIndex ) throw (uno::RuntimeException)
{
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index 5298f60e0943..7efee1505dcb 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -76,7 +76,7 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >&
uno::Reference<script::XLibraryContainer> xLibContainer = pShell->GetBasicContainer();
uno::Reference<script::vba::XVBACompatibility> xVBACompat( xLibContainer, uno::UNO_QUERY_THROW );
xVBACompat->setVBACompatibilityMode( sal_True );
- String aPrjName( RTL_CONSTASCII_USTRINGPARAM( "VBAProject" ) );
+ String aPrjName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
pShell->GetBasicManager()->SetName( aPrjName );
if( xLibContainer.is() )
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 4eab79813474..6ee6fa1f6b19 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XCalculatable.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
+#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
#include <com/sun/star/sheet/XSheetCellRange.hpp>
#include <com/sun/star/sheet/XSheetCellCursor.hpp>
#include <com/sun/star/sheet/XSheetAnnotationsSupplier.hpp>
@@ -319,6 +320,40 @@ ScVbaWorksheet::setEnableSelection( sal_Int32 nSelection ) throw (uno::RuntimeEx
}
+uno::Reference< beans::XPropertySet > ScVbaWorksheet::getFirstDBRangeProperties() throw (uno::RuntimeException)
+{
+ uno::Reference< beans::XPropertySet > xModelProps( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xDBRangesIA( xModelProps->getPropertyValue(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DatabaseRanges" ) ) ), uno::UNO_QUERY_THROW );
+
+ for( sal_Int32 nIndex = 0, nCount = xDBRangesIA->getCount(); nIndex < nCount; ++nIndex )
+ {
+ uno::Reference< sheet::XCellRangeReferrer > xDBRange( xDBRangesIA->getByIndex( nIndex ), uno::UNO_QUERY_THROW );
+ // check if the database area is on this sheet
+ uno::Reference< sheet::XCellRangeAddressable > xRangeAddr( xDBRange->getReferredCells(), uno::UNO_QUERY_THROW );
+ if( getSheetID() == xRangeAddr->getRangeAddress().Sheet )
+ return uno::Reference< beans::XPropertySet >( xDBRange, uno::UNO_QUERY_THROW );
+ }
+ return uno::Reference< beans::XPropertySet >();
+}
+
+sal_Bool SAL_CALL ScVbaWorksheet::getAutoFilterMode() throw (uno::RuntimeException)
+{
+ uno::Reference< beans::XPropertySet > xDBRangeProps = getFirstDBRangeProperties();
+ sal_Bool bAutoFilterMode = sal_False;
+ return
+ xDBRangeProps.is() &&
+ (xDBRangeProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AutoFilter" ) ) ) >>= bAutoFilterMode) &&
+ bAutoFilterMode;
+}
+
+void SAL_CALL ScVbaWorksheet::setAutoFilterMode( sal_Bool bAutoFilterMode ) throw (uno::RuntimeException)
+{
+ uno::Reference< beans::XPropertySet > xDBRangeProps = getFirstDBRangeProperties();
+ if( xDBRangeProps.is() )
+ xDBRangeProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AutoFilter" ) ), uno::Any( bAutoFilterMode ) );
+}
+
uno::Reference< excel::XRange >
ScVbaWorksheet::getUsedRange() throw (uno::RuntimeException)
{
@@ -379,7 +414,7 @@ ScVbaWorksheet::getStandardHeight() throw (uno::RuntimeException)
sal_Bool
ScVbaWorksheet::getProtectionMode() throw (uno::RuntimeException)
{
- return false;
+ return sal_False;
}
sal_Bool
@@ -392,7 +427,13 @@ ScVbaWorksheet::getProtectContents()throw (uno::RuntimeException)
sal_Bool
ScVbaWorksheet::getProtectDrawingObjects() throw (uno::RuntimeException)
{
- return false;
+ return sal_False;
+}
+
+sal_Bool
+ScVbaWorksheet::getProtectScenarios() throw (uno::RuntimeException)
+{
+ return sal_False;
}
void
diff --git a/sc/source/ui/vba/vbaworksheet.hxx b/sc/source/ui/vba/vbaworksheet.hxx
index 196a195258d7..78bcc2503a49 100644
--- a/sc/source/ui/vba/vbaworksheet.hxx
+++ b/sc/source/ui/vba/vbaworksheet.hxx
@@ -68,6 +68,9 @@ class ScVbaWorksheet : public WorksheetImpl_BASE
css::uno::Reference< css::container::XNameAccess > getFormControls();
css::uno::Any getControlShape( const rtl::OUString& sName );
+
+ css::uno::Reference< css::beans::XPropertySet > getFirstDBRangeProperties() throw (css::uno::RuntimeException);
+
protected:
ScVbaWorksheet( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext );
@@ -95,6 +98,7 @@ public:
virtual ::sal_Bool SAL_CALL getProtectionMode() throw (css::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL getProtectContents() throw (css::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL getProtectDrawingObjects() throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getProtectScenarios() throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getUsedRange() throw (css::uno::RuntimeException) ;
virtual css::uno::Any SAL_CALL ChartObjects( const css::uno::Any& Index ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XOutline > SAL_CALL Outline( ) throw (css::uno::RuntimeException);
@@ -106,6 +110,8 @@ public:
virtual sal_Int16 SAL_CALL getIndex() throw (css::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getEnableSelection() throw (css::uno::RuntimeException);
virtual void SAL_CALL setEnableSelection( sal_Int32 nSelection ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getAutoFilterMode() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAutoFilterMode( sal_Bool bAutoFilterMode ) throw (css::uno::RuntimeException);
// Methods
virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index 5344e6b3a9be..7fa5196a6b04 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -52,7 +52,7 @@
#include "vbaglobals.hxx"
#include "vbaworksheet.hxx"
#include "vbaworkbook.hxx"
-#include <unonames.hxx>
+#include "unonames.hxx"
using namespace ::ooo::vba;
using namespace ::com::sun::star;
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index a64814d952ef..ec584213898c 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -309,10 +309,17 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
aPosRect, nOrient, nDimPos );
UpdateDragRect( bHasRange && bMove, aPosRect );
+ BOOL bIsDataLayout;
+ sal_Int32 nDimFlags = 0;
+ String aDimName = pDragDPObj->GetDimName( nDPField, bIsDataLayout, &nDimFlags );
+ bool bAllowed = !bHasRange || ScDPObject::IsOrientationAllowed( nOrient, nDimFlags );
+
if (bMove) // set mouse pointer
{
PointerStyle ePointer = POINTER_PIVOT_DELETE;
- if ( bHasRange )
+ if ( !bAllowed )
+ ePointer = POINTER_NOTALLOWED;
+ else if ( bHasRange )
switch (nOrient)
{
case sheet::DataPilotFieldOrientation_COLUMN: ePointer = POINTER_PIVOT_COL; break;
@@ -327,15 +334,13 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
if (!bHasRange)
nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
- BOOL bIsDataLayout;
- String aDimName = pDragDPObj->GetDimName( nDPField, bIsDataLayout );
if ( bIsDataLayout && ( nOrient != sheet::DataPilotFieldOrientation_COLUMN &&
nOrient != sheet::DataPilotFieldOrientation_ROW ) )
{
// removing data layout is not allowed
pViewData->GetView()->ErrorMessage(STR_PIVOT_MOVENOTALLOWED);
}
- else
+ else if ( bAllowed )
{
ScDPSaveData aSaveData( *pDragDPObj->GetSaveData() );
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 38d5144274c5..48ffd4fd39a4 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -108,7 +108,7 @@ SFX_IMPL_INTERFACE( ScPreviewShell, SfxViewShell, ScResId(SCSTR_PREVIEWSHELL) )
SFX_POPUPMENU_REGISTRATION(ScResId(RID_POPUP_PREVIEW));
}
-SFX_IMPL_VIEWFACTORY( ScPreviewShell, ScResId(STR_NONAME) )
+SFX_IMPL_NAMED_VIEWFACTORY( ScPreviewShell, "PrintPreview" )
{
SFX_VIEW_REGISTRATION(ScDocShell);
}
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index 1733cf2e19b5..2fc2bba072d9 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -102,7 +102,7 @@ SFX_IMPL_INTERFACE(ScTabViewShell,SfxViewShell,ScResId(SCSTR_TABVIEWSHELL))
//-->Added by PengYunQuan for Validity Cell Range Picker
}
-SFX_IMPL_VIEWFACTORY( ScTabViewShell, ScResId(STR_NONAME) )
+SFX_IMPL_NAMED_VIEWFACTORY( ScTabViewShell, "Default" )
{
SFX_VIEW_REGISTRATION(ScDocShell);
}
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index ed09ec85ee8c..0835d08de9fd 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -173,13 +173,6 @@ void __EXPORT ScTabViewShell::Activate(BOOL bMDI)
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_NAVIGATOR_UPDATEALL ) );
bFirstActivate = FALSE;
- if ( aPendingUserData.hasElements() )
- {
- // #89897# read user data from print preview now, after ctor
- DoReadUserDataSequence( aPendingUserData );
- aPendingUserData.realloc( 0 );
- }
-
// #116278# ReadExtOptions (view settings from Excel import) must also be done
// after the ctor, because of the potential calls to Window::Show.
// Even after the fix for #104887# (Window::Show no longer notifies the access
@@ -1924,7 +1917,6 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
if ( pOldSh && pOldSh->ISA( ScPreviewShell ) )
{
ScPreviewShell* pPreviewShell = ((ScPreviewShell*)pOldSh);
- aPendingUserData = pPreviewShell->GetSourceData(); // used in Activate
nForceDesignMode = pPreviewShell->GetSourceDesignMode();
}
diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp
index 66cb1d60f476..ed8c67d5e736 100755..100644
--- a/scp2/source/ooo/file_ooo.scp
+++ b/scp2/source/ooo/file_ooo.scp
@@ -391,12 +391,6 @@ STD_FILTER_FILE( gid_File_Filter_Iti, iti)
STD_RES_FILE( gid_File_Res_Eps, eps )
-STD_RES_FILE( gid_File_Res_Egi, egi )
-
-STD_RES_FILE( gid_File_Res_Ept, ept )
-
-STD_RES_FILE( gid_File_Res_Eme, eme )
-
File gid_File_Help_Common_Zip
Dir = gid_Dir_Help_Isolanguage;
ARCHIVE_TXT_FILE_BODY;
diff --git a/scp2/source/ooo/file_resource_ooo.scp b/scp2/source/ooo/file_resource_ooo.scp
index 9f2b40614392..edaea2027944 100644
--- a/scp2/source/ooo/file_resource_ooo.scp
+++ b/scp2/source/ooo/file_resource_ooo.scp
@@ -45,12 +45,6 @@ STD_RES_FILE( gid_File_Res_Dbw, dbw )
STD_RES_FILE( gid_File_Res_Dkt, dkt)
-STD_RES_FILE( gid_File_Res_Epb, epb )
-
-STD_RES_FILE( gid_File_Res_Epg, epg )
-
-STD_RES_FILE( gid_File_Res_Epp, epp )
-
STD_RES_FILE( gid_File_Res_Eur, eur )
STD_RES_FILE( gid_File_Res_Frm, frm)
diff --git a/scp2/source/ooo/module_lang_template.scp b/scp2/source/ooo/module_lang_template.scp
index 7ecd4747cdea..8ffeadc2e99a 100755
--- a/scp2/source/ooo/module_lang_template.scp
+++ b/scp2/source/ooo/module_lang_template.scp
@@ -66,9 +66,6 @@ Module gid_Module_Langpack_Resource_Template
gid_File_Res_Dbw,
gid_File_Res_Dkt,
gid_File_Res_Editeng,
- gid_File_Res_Epb,
- gid_File_Res_Epg,
- gid_File_Res_Epp,
gid_File_Res_Eur,
gid_File_Res_For,
gid_File_Res_Forui,
@@ -110,9 +107,6 @@ Module gid_Module_Langpack_Resource_Template
gid_File_Res_Stt,
gid_File_Res_Tfu,
gid_File_Res_Eps,
- gid_File_Res_Egi,
- gid_File_Res_Ept,
- gid_File_Res_Eme,
gid_File_Res_UpdChk,
gid_File_Res_Upd);
End
diff --git a/scripting/source/basprov/basmodnode.cxx b/scripting/source/basprov/basmodnode.cxx
index 22f9e40571a4..fe6ed69fccab 100644
--- a/scripting/source/basprov/basmodnode.cxx
+++ b/scripting/source/basprov/basmodnode.cxx
@@ -97,14 +97,22 @@ namespace basprov
if ( pMethods )
{
sal_Int32 nCount = pMethods->Count();
- aChildNodes.realloc( nCount );
+ sal_Int32 nRealCount = 0;
+ for ( sal_Int32 i = 0; i < nCount; ++i )
+ {
+ SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Get( static_cast< USHORT >( i ) ) );
+ if ( pMethod && !pMethod->IsHidden() )
+ ++nRealCount;
+ }
+ aChildNodes.realloc( nRealCount );
Reference< browse::XBrowseNode >* pChildNodes = aChildNodes.getArray();
+ sal_Int32 iTarget = 0;
for ( sal_Int32 i = 0; i < nCount; ++i )
{
SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Get( static_cast< USHORT >( i ) ) );
- if ( pMethod )
- pChildNodes[i] = static_cast< browse::XBrowseNode* >( new BasicMethodNodeImpl( m_xContext, m_sScriptingContext, pMethod, m_bIsAppScript ) );
+ if ( pMethod && !pMethod->IsHidden() )
+ pChildNodes[iTarget++] = static_cast< browse::XBrowseNode* >( new BasicMethodNodeImpl( m_xContext, m_sScriptingContext, pMethod, m_bIsAppScript ) );
}
}
}
diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx
index abd61f6c1285..69cc6f40cd3d 100644
--- a/scripting/source/basprov/basprov.cxx
+++ b/scripting/source/basprov/basprov.cxx
@@ -412,7 +412,7 @@ namespace basprov
if ( pMethods )
{
SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Find( aMethod, SbxCLASS_METHOD ) );
- if ( pMethod )
+ if ( pMethod && !pMethod->IsHidden() )
{
if ( m_pDocBasicManager == pBasicMgr )
xScript = new BasicScriptImpl( aDescription, pMethod, *m_pDocBasicManager, m_xInvocationContext );
diff --git a/sd/inc/FactoryIds.hxx b/sd/inc/FactoryIds.hxx
index 66477a1faf67..4f2346942fc9 100644..100755
--- a/sd/inc/FactoryIds.hxx
+++ b/sd/inc/FactoryIds.hxx
@@ -42,8 +42,7 @@ enum ViewShellFactoryIds
DRAW_FACTORY_ID = 1,
SLIDE_SORTER_FACTORY_ID = 2,
OUTLINE_FACTORY_ID = 3,
- PRESENTATION_FACTORY_ID = 4,
- PREVIEW_FACTORY_ID = 5
+ PRESENTATION_FACTORY_ID = 4
};
} // end of namespace sd
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 82a841a199c8..971bb2340069 100755
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2355,7 +2355,7 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
}
}
- if ( pObj && ( pObj->IsEmptyPresObj() || !pObj->ISA(SdrGrafObj) ) )
+ if ( pObj && (pObj->GetUserCall() || bInit) && ( pObj->IsEmptyPresObj() || !pObj->ISA(SdrGrafObj) ) )
pObj->AdjustToMaxRect( aRect );
return pObj;
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 54acab192cb5..ff1250bdf090 100644..100755
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -29,6 +29,7 @@
#include "precompiled_sd.hxx"
#include <propread.hxx>
#include <tools/bigint.hxx>
+#include "tools/debug.hxx"
#include "rtl/tencinfo.h"
#include "rtl/textenc.h"
@@ -90,6 +91,17 @@ void PropItem::Clear()
// -----------------------------------------------------------------------
+static xub_StrLen lcl_getMaxSafeStrLen(sal_uInt32 nSize)
+{
+ nSize -= 1; //Drop NULL terminator
+
+ //If it won't fit in a string, clip it to the max size that does
+ if (nSize > STRING_MAXLEN)
+ nSize = STRING_MAXLEN;
+
+ return nSize;
+}
+
BOOL PropItem::Read( String& rString, sal_uInt32 nStringType, sal_Bool bAlign )
{
sal_uInt32 i, nItemSize, nType, nItemPos;
@@ -108,36 +120,43 @@ BOOL PropItem::Read( String& rString, sal_uInt32 nStringType, sal_Bool bAlign )
{
case VT_LPSTR :
{
- if ( (sal_uInt16)nItemSize )
+ if ( nItemSize )
{
- sal_Char* pString = new sal_Char[ (sal_uInt16)nItemSize ];
- if ( mnTextEnc == RTL_TEXTENCODING_UCS2 )
+ try
{
- nItemSize >>= 1;
- if ( (sal_uInt16)nItemSize > 1 )
+ sal_Char* pString = new sal_Char[ nItemSize ];
+ if ( mnTextEnc == RTL_TEXTENCODING_UCS2 )
{
- sal_Unicode* pWString = (sal_Unicode*)pString;
- for ( i = 0; i < (sal_uInt16)nItemSize; i++ )
- *this >> pWString[ i ];
- rString = String( pWString, (sal_uInt16)nItemSize - 1 );
- }
- else
- rString = String();
- bRetValue = sal_True;
- }
- else
- {
- SvMemoryStream::Read( pString, (sal_uInt16)nItemSize );
- if ( pString[ (sal_uInt16)nItemSize - 1 ] == 0 )
- {
- if ( (sal_uInt16)nItemSize > 1 )
- rString = String( ByteString( pString ), mnTextEnc );
+ nItemSize >>= 1;
+ if ( nItemSize > 1 )
+ {
+ sal_Unicode* pWString = (sal_Unicode*)pString;
+ for ( i = 0; i < nItemSize; i++ )
+ *this >> pWString[ i ];
+ rString = String( pWString, lcl_getMaxSafeStrLen(nItemSize) );
+ }
else
rString = String();
bRetValue = sal_True;
}
+ else
+ {
+ SvMemoryStream::Read( pString, nItemSize );
+ if ( pString[ nItemSize - 1 ] == 0 )
+ {
+ if ( nItemSize > 1 )
+ rString = String( ByteString( pString ), mnTextEnc );
+ else
+ rString = String();
+ bRetValue = sal_True;
+ }
+ }
+ delete[] pString;
+ }
+ catch( const std::bad_alloc& )
+ {
+ DBG_ERROR( "sd PropItem::Read bad alloc" );
}
- delete[] pString;
}
if ( bAlign )
SeekRel( ( 4 - ( nItemSize & 3 ) ) & 3 ); // dword align
@@ -148,18 +167,25 @@ BOOL PropItem::Read( String& rString, sal_uInt32 nStringType, sal_Bool bAlign )
{
if ( nItemSize )
{
- sal_Unicode* pString = new sal_Unicode[ (sal_uInt16)nItemSize ];
- for ( i = 0; i < (sal_uInt16)nItemSize; i++ )
- *this >> pString[ i ];
- if ( pString[ i - 1 ] == 0 )
+ try
{
- if ( (sal_uInt16)nItemSize > 1 )
- rString = String( pString, (sal_uInt16)nItemSize - 1 );
- else
- rString = String();
- bRetValue = sal_True;
+ sal_Unicode* pString = new sal_Unicode[ nItemSize ];
+ for ( i = 0; i < nItemSize; i++ )
+ *this >> pString[ i ];
+ if ( pString[ i - 1 ] == 0 )
+ {
+ if ( (sal_uInt16)nItemSize > 1 )
+ rString = String( pString, lcl_getMaxSafeStrLen(nItemSize) );
+ else
+ rString = String();
+ bRetValue = sal_True;
+ }
+ delete[] pString;
+ }
+ catch( const std::bad_alloc& )
+ {
+ DBG_ERROR( "sd PropItem::Read bad alloc" );
}
- delete[] pString;
}
if ( bAlign && ( nItemSize & 1 ) )
SeekRel( 2 ); // dword align
@@ -349,24 +375,31 @@ sal_Bool Section::GetDictionary( Dictionary& rDict )
for ( sal_uInt32 i = 0; i < nDictCount; i++ )
{
aStream >> nId >> nSize;
- if ( (sal_uInt16)nSize )
+ if ( nSize )
{
String aString;
nPos = aStream.Tell();
- sal_Char* pString = new sal_Char[ (sal_uInt16)nSize ];
- aStream.Read( pString, (sal_uInt16)nSize );
- if ( mnTextEnc == RTL_TEXTENCODING_UCS2 )
+ try
{
- nSize >>= 1;
- aStream.Seek( nPos );
- sal_Unicode* pWString = (sal_Unicode*)pString;
- for ( i = 0; i < (sal_uInt16)nSize; i++ )
- aStream >> pWString[ i ];
- aString = String( pWString, (sal_uInt16)nSize - 1 );
+ sal_Char* pString = new sal_Char[ nSize ];
+ aStream.Read( pString, nSize );
+ if ( mnTextEnc == RTL_TEXTENCODING_UCS2 )
+ {
+ nSize >>= 1;
+ aStream.Seek( nPos );
+ sal_Unicode* pWString = (sal_Unicode*)pString;
+ for ( i = 0; i < nSize; i++ )
+ aStream >> pWString[ i ];
+ aString = String( pWString, lcl_getMaxSafeStrLen(nSize) );
+ }
+ else
+ aString = String( ByteString( pString, lcl_getMaxSafeStrLen(nSize) ), mnTextEnc );
+ delete[] pString;
+ }
+ catch( const std::bad_alloc& )
+ {
+ DBG_ERROR( "sd Section::GetDictionary bad alloc" );
}
- else
- aString = String( ByteString( pString, (sal_uInt16)nSize - 1 ), mnTextEnc );
- delete[] pString;
if ( !aString.Len() )
break;
aDict.AddProperty( nId, aString );
@@ -500,6 +533,11 @@ void Section::Read( SvStorageStream *pStrm )
}
if ( nPropSize )
{
+ if ( nPropSize > nStrmSize )
+ {
+ nPropCount = 0;
+ break;
+ }
pStrm->Seek( nPropOfs + nSecOfs );
sal_uInt8* pBuf = new sal_uInt8[ nPropSize ];
pStrm->Read( pBuf, nPropSize );
diff --git a/sd/source/ui/animations/CustomAnimationList.hxx b/sd/source/ui/animations/CustomAnimationList.hxx
index 2fe96440030e..66b1e2c6a436 100644..100755
--- a/sd/source/ui/animations/CustomAnimationList.hxx
+++ b/sd/source/ui/animations/CustomAnimationList.hxx
@@ -47,6 +47,7 @@ public:
virtual void onSelect() = 0;
virtual void onDoubleClick() = 0;
virtual void onContextMenu( USHORT nSelectedPopupEntry ) = 0;
+ virtual ~ICustomAnimationListController() {}
};
class CustomAnimationList : public SvTreeListBox, public ISequenceListener
diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src
index e992e7016f04..bb1199fdd352 100755
--- a/sd/source/ui/app/strings.src
+++ b/sd/source/ui/app/strings.src
@@ -86,10 +86,6 @@ String RID_APPTITLE
{
Text = "StarImpress 4.0" ;
};
-String STR_DEFAULTVIEW
-{
- Text [ en-US ] = "Default" ;
-};
String STR_NULL
{
Text [ en-US ] = "None" ;
diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx
index 181fc8433c22..f9f181b0e44d 100755
--- a/sd/source/ui/dlg/PaneChildWindows.cxx
+++ b/sd/source/ui/dlg/PaneChildWindows.cxx
@@ -37,6 +37,9 @@
#include "strings.hrc"
#include "sdresid.hxx"
+#include <com/sun/star/drawing/framework/XConfigurationController.hpp>
+#include <com/sun/star/drawing/framework/ResourceActivationMode.hpp>
+
#include <sfx2/app.hxx>
#include <sfx2/dockwin.hxx>
#include <sfx2/bindings.hxx>
@@ -47,6 +50,9 @@ namespace sd {
using ::com::sun::star::uno::Reference;
using ::com::sun::star::drawing::framework::XResourceId;
+using ::com::sun::star::drawing::framework::XConfigurationController;
+using ::com::sun::star::drawing::framework::ResourceActivationMode_ADD;
+using ::com::sun::star::drawing::framework::ResourceActivationMode_REPLACE;
SFX_IMPL_DOCKINGWINDOW(LeftPaneImpressChildWindow, SID_LEFT_PANE_IMPRESS)
SFX_IMPL_DOCKINGWINDOW(LeftPaneDrawChildWindow, SID_LEFT_PANE_DRAW)
@@ -151,6 +157,26 @@ ToolPanelChildWindow::ToolPanelChildWindow( ::Window* i_pParentWindow, USHORT i_
:PaneChildWindow( i_pParentWindow, i_nId, i_pBindings, i_pChildWindowInfo,
FLT_TOOL_PANEL_DOCKING_WINDOW, STR_RIGHT_PANE_TITLE, SFX_ALIGN_RIGHT )
{
+ // just in case this window has been created by SFX, instead our resource framework: Ensure that the resource framework
+ // activates the task pane, so it is really filled with content (in opposite to the other SFX applications, the
+ // child window registered for SID_TASKPANE is not responsible for its content, but here in SD, it's the ToolPanelViewShell
+ // which has this responsibility. And this view shell is created implicitly via the resource framework.)
+ // #i113788# / 2010-09-03 / frank.schoenheit@oracle.com
+ SfxDockingWindow* pDockingWindow = dynamic_cast< SfxDockingWindow* >( GetWindow() );
+ ViewShellBase* pViewShellBase = ViewShellBase::GetViewShellBase( pDockingWindow->GetBindings().GetDispatcher()->GetFrame() );
+ ENSURE_OR_RETURN_VOID( pViewShellBase != NULL, "ToolPanelChildWindow::ToolPanelChildWindow: no view shell access!" );
+
+ const ::boost::shared_ptr< framework::FrameworkHelper > pFrameworkHelper( framework::FrameworkHelper::Instance( *pViewShellBase ) );
+ ENSURE_OR_RETURN_VOID( pFrameworkHelper.get(), "ToolPanelChildWindow::ToolPanelChildWindow: no framework helper for the view shell!" );
+ Reference<XConfigurationController> xConfigController( pFrameworkHelper->GetConfigurationController() );
+ ENSURE_OR_RETURN_VOID( xConfigController.is(), "ToolPanelChildWindow::ToolPanelChildWindow: no config controller!" );
+ xConfigController->requestResourceActivation(
+ framework::FrameworkHelper::CreateResourceId( framework::FrameworkHelper::msRightPaneURL ),
+ ResourceActivationMode_ADD );
+ xConfigController->requestResourceActivation(
+ framework::FrameworkHelper::CreateResourceId( framework::FrameworkHelper::msTaskPaneURL, framework::FrameworkHelper::msRightPaneURL ),
+ ResourceActivationMode_REPLACE
+ );
}
//----------------------------------------------------------------------------------------------------------------------
diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc
index d9dc93a1ef20..7f5086057e5c 100755
--- a/sd/source/ui/inc/strings.hrc
+++ b/sd/source/ui/inc/strings.hrc
@@ -28,7 +28,6 @@
#ifndef _SD_CFGID_HXX
#include "cfgids.hxx"
#endif
-#define STR_DEFAULTVIEW (RID_APP_START)
#define STR_NULL (RID_APP_START+3)
#define STR_INSERTPAGE (RID_APP_START+35)
#define STR_INSERTLAYER (RID_APP_START+37)
diff --git a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
index 6a85192f8418..76e9e411e81e 100644
--- a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
@@ -273,15 +273,19 @@ VisibleAreaScroller::VisibleAreaScroller (
// jump to within this distance of the final value and start the
// animation from there.
if (abs(aStart.X()-aEnd.X()) > gnMaxScrollDistance)
+ {
if (aStart.X() < aEnd.X())
maStart.X() = aEnd.X()-gnMaxScrollDistance;
else
maStart.X() = aEnd.X()+gnMaxScrollDistance;
+ }
if (abs(aStart.Y()-aEnd.Y()) > gnMaxScrollDistance)
+ {
if (aStart.Y() < aEnd.Y())
maStart.Y() = aEnd.Y()-gnMaxScrollDistance;
else
maStart.Y() = aEnd.Y()+gnMaxScrollDistance;
+ }
}
diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index 5eaf64db7bf8..be964715f1a6 100644
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -700,6 +700,7 @@ void SlideSorterModel::UpdateIndices (const sal_Int32 nFirstIndex)
{
SharedPageDescriptor& rpDescriptor (maPageDescriptors[nDescriptorIndex]);
if (rpDescriptor)
+ {
if (nDescriptorIndex < nFirstIndex)
{
if (rpDescriptor->GetPageIndex()!=nDescriptorIndex)
@@ -711,6 +712,7 @@ void SlideSorterModel::UpdateIndices (const sal_Int32 nFirstIndex)
{
rpDescriptor->SetPageIndex(nDescriptorIndex);
}
+ }
}
}
diff --git a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
index 1d98a217ff90..5f322e65141d 100644
--- a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
+++ b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
@@ -450,6 +450,7 @@ void PageObjectRun::ResetOffsets (const controller::Animator::AnimationMode eMod
{
model::SharedPageDescriptor pDescriptor(rModel.GetPageDescriptor(nIndex+mnStartIndex));
if (pDescriptor)
+ {
if (eMode == controller::Animator::AM_Animated)
maStartOffset[nIndex] = pDescriptor->GetVisualState().GetLocationOffset();
else
@@ -459,6 +460,7 @@ void PageObjectRun::ResetOffsets (const controller::Animator::AnimationMode eMod
rView.RequestRepaint(aOldBoundingBox);
rView.RequestRepaint(pDescriptor);
}
+ }
maEndOffset[nIndex] = Point(0,0);
}
if (eMode == controller::Animator::AM_Animated)
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
index 8d5b1cfbcdc8..a0bc19edb470 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
@@ -234,10 +234,12 @@ void PageObjectPainter::PaintPreview (
const Bitmap aPreview (GetPreviewBitmap(rpDescriptor, &rDevice));
if ( ! aPreview.IsEmpty())
+ {
if (aPreview.GetSizePixel() != aBox.GetSize())
rDevice.DrawBitmap(aBox.TopLeft(), aBox.GetSize(), aPreview);
else
rDevice.DrawBitmap(aBox.TopLeft(), aPreview);
+ }
}
}
@@ -342,10 +344,12 @@ void PageObjectPainter::PaintPageNumber (
// (preferred) or brighter font color.
const sal_Int32 nFontLuminance (aPageNumberColor.GetLuminance());
if (abs(nBackgroundLuminance - nFontLuminance) < 60)
+ {
if (nBackgroundLuminance > nFontLuminance-30)
aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberBrightBackground));
else
aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberDarkBackground));
+ }
}
}
@@ -387,10 +391,10 @@ Bitmap& PageObjectPainter::GetBackgroundForState (
const OutputDevice& rReferenceDevice)
{
enum State { None = 0x00, Selected = 0x01, MouseOver = 0x02, Focused = 0x04 };
- const State eState (State(
+ const int eState =
(rpDescriptor->HasState(model::PageDescriptor::ST_Selected) ? Selected : None)
| (rpDescriptor->HasState(model::PageDescriptor::ST_MouseOver) ? MouseOver : None)
- | (rpDescriptor->HasState(model::PageDescriptor::ST_Focused) ? Focused : None)));
+ | (rpDescriptor->HasState(model::PageDescriptor::ST_Focused) ? Focused : None);
switch (eState)
{
diff --git a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
index c62faf29ca50..f193b2ece851 100755
--- a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
+++ b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
@@ -512,12 +512,20 @@ ToolPanelViewShell::ToolPanelViewShell( SfxViewFrame* pFrame, ViewShellBase& rVi
SetName( String( RTL_CONSTASCII_USTRINGPARAM( "ToolPanelViewShell" ) ) );
+ // Some recent changes to the toolpanel make it necessary to create the
+ // accessibility object now. Creating it on demand would lead to a
+ // pointer cycle in the tree of accessibility objects and would lead
+ // e.g. the accerciser AT tool into an infinite loop.
+ // It would be nice to get rid of this workaround in the future.
+ if (mpContentWindow.get())
+ mpContentWindow->SetAccessible(mpImpl->CreateAccessible(*mpContentWindow));
+
// For accessibility we have to shortly hide the content window. This
// triggers the construction of a new accessibility object for the new
// view shell. (One is created earlier while the construtor of the base
// class is executed. At that time the correct accessibility object can
// not be constructed.)
- if ( mpContentWindow.get() )
+ if (mpContentWindow.get())
{
mpContentWindow->Hide();
mpContentWindow->Show();
@@ -633,7 +641,12 @@ DockingWindow* ToolPanelViewShell::GetDockingWindow()
Reference< XAccessible > ToolPanelViewShell::CreateAccessibleDocumentView( ::sd::Window* i_pWindow )
{
ENSURE_OR_RETURN( i_pWindow, "ToolPanelViewShell::CreateAccessibleDocumentView: illegal window!", NULL );
- return mpImpl->CreateAccessible( *i_pWindow );
+ // As said above, we have to create the accessibility object
+ // (unconditionally) in the constructor, not here on demand, or
+ // otherwise we would create a cycle in the tree of accessible objects
+ // which could lead to infinite loops in AT tools.
+ // return mpImpl->CreateAccessible( *i_pWindow );
+ return Reference<XAccessible>();
}
// ---------------------------------------------------------------------------------------------------------------------
diff --git a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
index b9040e72283f..c5919b7aa7ee 100755
--- a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
+++ b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
@@ -503,45 +503,78 @@ SdPage* DocumentHelper::ProvideMasterPage (
SdPage* pMasterPage,
const ::boost::shared_ptr<std::vector<SdPage*> >& rpPageList)
{
- SdPage* pMasterPageInDocument = NULL;
-
- // Get notes master page.
+ // Make sure that both the master page and its notes master exist
+ // in the source document. If one is missing then return without
+ // making any changes.
+ if (pMasterPage == NULL)
+ {
+ // The caller should make sure that the master page is valid.
+ OSL_ASSERT(pMasterPage != NULL);
+ return NULL;
+ }
SdDrawDocument* pSourceDocument = static_cast<SdDrawDocument*>(pMasterPage->GetModel());
+ if (pSourceDocument == NULL)
+ return NULL;
SdPage* pNotesMasterPage = static_cast<SdPage*>(
- pSourceDocument->GetMasterPage (pMasterPage->GetPageNum()+1));
- if (pNotesMasterPage != NULL)
+ pSourceDocument->GetMasterPage(pMasterPage->GetPageNum()+1));
+ if (pNotesMasterPage == NULL)
{
- // When the given master page or its associated notes master page do
- // not already belong to the document we have to create copies of
- // them and insert them into the document.
-
- // Determine the position where the new master pages are inserted.
- // By default they are inserted at the end. When we assign to a
- // master page then insert after the last of the (selected) pages.
- USHORT nInsertionIndex = rTargetDocument.GetMasterPageCount();
- if (rpPageList->front()->IsMasterPage())
+ // The model is not in a valid state. Maybe a new master page
+ // is being (not finished yet) created? Return without making
+ // any changes.
+ return NULL;
+ }
+
+ SdPage* pMasterPageInDocument = NULL;
+ // Search for a master page with the same name as the given one in
+ // the target document.
+ const XubString sMasterPageLayoutName (pMasterPage->GetLayoutName());
+ for (USHORT nIndex=0,nCount=rTargetDocument.GetMasterPageCount(); nIndex<nCount; ++nIndex)
+ {
+ SdPage* pCandidate = static_cast<SdPage*>(rTargetDocument.GetMasterPage(nIndex));
+ if (pCandidate!=NULL
+ && sMasterPageLayoutName==pCandidate->GetLayoutName())
{
- nInsertionIndex = rpPageList->back()->GetPageNum();
+ // The requested master page does already exist in the
+ // target document, return it.
+ return pCandidate;
}
+ }
- if (pMasterPage->GetModel() != &rTargetDocument)
- {
- pMasterPageInDocument = AddMasterPage (rTargetDocument, pMasterPage, nInsertionIndex);
- if( rTargetDocument.IsUndoEnabled() )
+ // The given master page does not already belong to the target
+ // document so we have to create copies and insert them into the
+ // targer document.
+
+ // Determine the position where the new master pages are inserted.
+ // By default they are inserted at the end. When we assign to a
+ // master page then insert after the last of the (selected) pages.
+ USHORT nInsertionIndex = rTargetDocument.GetMasterPageCount();
+ if (rpPageList->front()->IsMasterPage())
+ {
+ nInsertionIndex = rpPageList->back()->GetPageNum();
+ }
+
+ // Clone the master page.
+ if (pMasterPage->GetModel() != &rTargetDocument)
+ {
+ pMasterPageInDocument = AddMasterPage (rTargetDocument, pMasterPage, nInsertionIndex);
+ if( rTargetDocument.IsUndoEnabled() )
rTargetDocument.AddUndo(
rTargetDocument.GetSdrUndoFactory().CreateUndoNewPage(*pMasterPageInDocument));
- }
- else
- pMasterPageInDocument = pMasterPage;
- if (pNotesMasterPage->GetModel() != &rTargetDocument)
- {
- SdPage* pClonedNotesMasterPage
- = AddMasterPage (rTargetDocument, pNotesMasterPage, nInsertionIndex+1);
- if( rTargetDocument.IsUndoEnabled() )
- rTargetDocument.AddUndo(
- rTargetDocument.GetSdrUndoFactory().CreateUndoNewPage(*pClonedNotesMasterPage));
- }
}
+ else
+ pMasterPageInDocument = pMasterPage;
+
+ // Clone the notes master.
+ if (pNotesMasterPage->GetModel() != &rTargetDocument)
+ {
+ SdPage* pClonedNotesMasterPage
+ = AddMasterPage (rTargetDocument, pNotesMasterPage, nInsertionIndex+1);
+ if( rTargetDocument.IsUndoEnabled() )
+ rTargetDocument.AddUndo(
+ rTargetDocument.GetSdrUndoFactory().CreateUndoNewPage(*pClonedNotesMasterPage));
+ }
+
return pMasterPageInDocument;
}
diff --git a/sd/source/ui/view/GraphicViewShellBase.cxx b/sd/source/ui/view/GraphicViewShellBase.cxx
index 759103760bfe..99e45a0d05d6 100755
--- a/sd/source/ui/view/GraphicViewShellBase.cxx
+++ b/sd/source/ui/view/GraphicViewShellBase.cxx
@@ -62,7 +62,7 @@ SfxViewShell* __EXPORT GraphicViewShellBase::CreateInstance (
void GraphicViewShellBase::RegisterFactory( USHORT nPrio )
{
pFactory = new SfxViewFactory(
- &CreateInstance,&InitFactory,nPrio,SdResId(STR_DEFAULTVIEW));
+ &CreateInstance,&InitFactory,nPrio,"Default");
InitFactory();
}
void GraphicViewShellBase::InitFactory()
diff --git a/sd/source/ui/view/ImpressViewShellBase.cxx b/sd/source/ui/view/ImpressViewShellBase.cxx
index 0cd5971eb51e..69906fbfd5d8 100644..100755
--- a/sd/source/ui/view/ImpressViewShellBase.cxx
+++ b/sd/source/ui/view/ImpressViewShellBase.cxx
@@ -62,7 +62,7 @@ SfxViewShell* __EXPORT ImpressViewShellBase::CreateInstance (
void ImpressViewShellBase::RegisterFactory( USHORT nPrio )
{
pFactory = new SfxViewFactory(
- &CreateInstance,&InitFactory,nPrio,SdResId(STR_DEFAULTVIEW));
+ &CreateInstance,&InitFactory,nPrio,"Default");
InitFactory();
}
void ImpressViewShellBase::InitFactory()
diff --git a/sd/source/ui/view/OutlineViewShellBase.cxx b/sd/source/ui/view/OutlineViewShellBase.cxx
index 762219c88016..3c31155a9fb5 100644..100755
--- a/sd/source/ui/view/OutlineViewShellBase.cxx
+++ b/sd/source/ui/view/OutlineViewShellBase.cxx
@@ -60,7 +60,7 @@ SfxViewShell* __EXPORT OutlineViewShellBase::CreateInstance (
void OutlineViewShellBase::RegisterFactory( USHORT nPrio )
{
pFactory = new SfxViewFactory(
- &CreateInstance,&InitFactory,nPrio,SdResId(STR_DEFAULTVIEW));
+ &CreateInstance,&InitFactory,nPrio,"Outline");
InitFactory();
}
void OutlineViewShellBase::InitFactory()
diff --git a/sd/source/ui/view/PresentationViewShellBase.cxx b/sd/source/ui/view/PresentationViewShellBase.cxx
index a16b12d3cb63..0fcb421a9888 100644..100755
--- a/sd/source/ui/view/PresentationViewShellBase.cxx
+++ b/sd/source/ui/view/PresentationViewShellBase.cxx
@@ -70,7 +70,7 @@ SfxViewShell* __EXPORT PresentationViewShellBase::CreateInstance (
void PresentationViewShellBase::RegisterFactory( USHORT nPrio )
{
pFactory = new SfxViewFactory(
- &CreateInstance,&InitFactory,nPrio,SdResId(STR_DEFAULTVIEW));
+ &CreateInstance,&InitFactory,nPrio,"FullScreenPresentation");
InitFactory();
}
void PresentationViewShellBase::InitFactory()
diff --git a/sd/source/ui/view/SlideSorterViewShellBase.cxx b/sd/source/ui/view/SlideSorterViewShellBase.cxx
index 466f699b1bb0..7944d2cf4b2e 100644..100755
--- a/sd/source/ui/view/SlideSorterViewShellBase.cxx
+++ b/sd/source/ui/view/SlideSorterViewShellBase.cxx
@@ -64,7 +64,7 @@ SfxViewShell* __EXPORT SlideSorterViewShellBase::CreateInstance (
void SlideSorterViewShellBase::RegisterFactory( USHORT nPrio )
{
pFactory = new SfxViewFactory(
- &CreateInstance,&InitFactory,nPrio,SdResId(STR_DEFAULTVIEW));
+ &CreateInstance,&InitFactory,nPrio,"SlideSorter");
InitFactory();
}
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 1e18ad5c5ee9..c748ffbc05e0 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -258,7 +258,7 @@ SfxViewShell* __EXPORT ViewShellBase::CreateInstance (
void ViewShellBase::RegisterFactory( USHORT nPrio )
{
pFactory = new SfxViewFactory(
- &CreateInstance,&InitFactory,nPrio,SdResId(STR_DEFAULTVIEW));
+ &CreateInstance,&InitFactory,nPrio,"Default");
InitFactory();
}
void ViewShellBase::InitFactory()
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index 28873b3946a3..ed5dda39037c 100755
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -1165,11 +1165,11 @@ void Window::DropScroll(const Point& rMousePos)
Window::CreateAccessible (void)
{
if (mpViewShell != NULL)
- return mpViewShell->CreateAccessibleDocumentView (this);
+ return mpViewShell->CreateAccessibleDocumentView (this);
else
{
OSL_TRACE ("::sd::Window::CreateAccessible: no view shell");
- return ::Window::CreateAccessible ();
+ return ::Window::CreateAccessible ();
}
}
diff --git a/sdext/prj/build.lst b/sdext/prj/build.lst
index c593a265f26e..3603afbae866 100644
--- a/sdext/prj/build.lst
+++ b/sdext/prj/build.lst
@@ -1,4 +1,4 @@
-dx sdext : l10n offuh comphelper unotools readlicense_oo cppu tools cppuhelper sal javaunohelper officecfg XPDF:xpdf LIBXSLT:libxslt NULL
+dx sdext : l10n offuh comphelper unotools readlicense_oo cppu tools cppuhelper sal javaunohelper officecfg XPDF:xpdf LIBXSLT:libxslt xmlhelp NULL
dx sdext usr1 - all sdext_mkout NULL
dx sdext\prj get - all sdext_prj NULL
dx sdext\source\minimizer nmake - all sdext_minimizer sdext_minimizer_rdoooe sdext_minimizer_rdooo sdext_inc NULL
diff --git a/sdext/prj/d.lst b/sdext/prj/d.lst
index 71a91653c3d2..bcaa4308bcb9 100644
--- a/sdext/prj/d.lst
+++ b/sdext/prj/d.lst
@@ -5,4 +5,6 @@ mkdir: %_DEST%\bin%_EXT%\pdfimport
..\%__SRC%\bin\pdfunzip.* %_DEST%\bin%_EXT%\pdfunzip.*
..\%__SRC%\bin\pdfimport.oxt %_DEST%\bin%_EXT%\pdfimport\pdfimport.oxt
..\%__SRC%\bin\presentation-minimizer.oxt %_DEST%\bin%_EXT%\minimizer\presentation-minimizer.oxt
+..\%__SRC%\bin\presentation_minimizer_develop.zip %_DEST%\bin%_EXT%\minimizer\presentation_minimizer_develop.zip
..\%__SRC%\bin\presenter-screen.oxt %_DEST%\bin%_EXT%\presenter\presenter-screen.oxt
+..\%__SRC%\bin\presenter-screen_develop.zip %_DEST%\bin%_EXT%\presenter\presenter-screen_develop.zip
diff --git a/sdext/source/minimizer/aboutdialog.cxx b/sdext/source/minimizer/aboutdialog.cxx
deleted file mode 100644
index f495da9994ea..000000000000
--- a/sdext/source/minimizer/aboutdialog.cxx
+++ /dev/null
@@ -1,276 +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_sdext.hxx"
-
-#include "aboutdialog.hxx"
-#include "optimizationstats.hxx"
-#include "fileopendialog.hxx"
-#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
-
-// ---------------
-// - ABOUTDIALOG -
-// ---------------
-
-using namespace ::rtl;
-using namespace ::com::sun::star::ui;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::util;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::frame;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::script;
-using namespace ::com::sun::star::container;
-
-#define ABOUT_DIALOG_WIDTH 200
-#define ABOUT_DIALOG_HEIGHT 155
-
-// -----------------------------------------------------------------------------
-
-
-rtl::OUString InsertFixedText( AboutDialog& rAboutDialog, const rtl::OUString& rControlName, const OUString& rLabel,
- sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Bool bMultiLine, sal_Int16 nTabIndex )
-{
- OUString pNames[] = {
- TKGet( TK_Height ),
- TKGet( TK_Label ),
- TKGet( TK_MultiLine ),
- TKGet( TK_PositionX ),
- TKGet( TK_PositionY ),
- TKGet( TK_Step ),
- TKGet( TK_TabIndex ),
- TKGet( TK_Width ) };
-
- Any pValues[] = {
- Any( nHeight ),
- Any( rLabel ),
- Any( bMultiLine ),
- Any( nXPos ),
- Any( nYPos ),
- Any( (sal_Int16)0 ),
- Any( nTabIndex ),
- Any( nWidth ) };
-
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
-
- Sequence< rtl::OUString > aNames( pNames, nCount );
- Sequence< Any > aValues( pValues, nCount );
-
- rAboutDialog.insertFixedText( rControlName, aNames, aValues );
- return rControlName;
-}
-
-#if 0
-rtl::OUString InsertSeparator( AboutDialog& rAboutDialog, const OUString& rControlName, sal_Int32 nOrientation,
- sal_Int32 nPosX, sal_Int32 nPosY, sal_Int32 nWidth, sal_Int32 nHeight )
-{
- OUString pNames[] = {
- TKGet( TK_Height ),
- TKGet( TK_Orientation ),
- TKGet( TK_PositionX ),
- TKGet( TK_PositionY ),
- TKGet( TK_Step ),
- TKGet( TK_Width ) };
-
- Any pValues[] = {
- Any( nHeight ),
- Any( nOrientation ),
- Any( nPosX ),
- Any( nPosY ),
- Any( sal_Int16( 0 ) ),
- Any( nWidth ) };
-
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
-
- Sequence< rtl::OUString > aNames( pNames, nCount );
- Sequence< Any > aValues( pValues, nCount );
-
- rAboutDialog.insertControlModel( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedLineModel" ) ),
- rControlName, aNames, aValues );
- return rControlName;
-}
-
-#endif
-
-rtl::OUString InsertImage( AboutDialog& rAboutDialog, const OUString& rControlName, const OUString& rURL,
- sal_Int32 nPosX, sal_Int32 nPosY, sal_Int32 nWidth, sal_Int32 nHeight )
-{
- OUString pNames[] = {
- TKGet( TK_Border ),
- TKGet( TK_Height ),
- TKGet( TK_ImageURL ),
- TKGet( TK_PositionX ),
- TKGet( TK_PositionY ),
- TKGet( TK_ScaleImage ),
- TKGet( TK_Width ) };
-
- Any pValues[] = {
- Any( sal_Int16( 1 ) ),
- Any( nHeight ),
- Any( rURL ),
- Any( nPosX ),
- Any( nPosY ),
- Any( sal_False ),
- Any( nWidth ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
-
- Sequence< rtl::OUString > aNames( pNames, nCount );
- Sequence< Any > aValues( pValues, nCount );
-
- rAboutDialog.insertImage( rControlName, aNames, aValues );
- return rControlName;
-}
-
-rtl::OUString InsertButton( AboutDialog& rAboutDialog, const OUString& rControlName, Reference< XActionListener >& xActionListener,
- sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex, PPPOptimizerTokenEnum nResID )
-{
- OUString pNames[] = {
- TKGet( TK_Enabled ),
- TKGet( TK_Height ),
- TKGet( TK_Label ),
- TKGet( TK_PositionX ),
- TKGet( TK_PositionY ),
- TKGet( TK_PushButtonType ),
- TKGet( TK_Step ),
- TKGet( TK_TabIndex ),
- TKGet( TK_Width ) };
-
- Any pValues[] = {
- Any( sal_True ),
- Any( nHeight ),
- Any( rAboutDialog.getString( nResID ) ),
- Any( nXPos ),
- Any( nYPos ),
- Any( static_cast< sal_Int16 >( PushButtonType_OK ) ),
- Any( (sal_Int16)0 ),
- Any( nTabIndex ),
- Any( nWidth ) };
-
-
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
-
- Sequence< rtl::OUString > aNames( pNames, nCount );
- Sequence< Any > aValues( pValues, nCount );
-
- rAboutDialog.insertButton( rControlName, xActionListener, aNames, aValues );
- return rControlName;
-}
-
-void AboutDialog::InitDialog()
-{
- // setting the dialog properties
- OUString pNames[] = {
- rtl::OUString::createFromAscii( "BackgroundColor" ) ,
- TKGet( TK_Closeable ),
- TKGet( TK_Height ),
- TKGet( TK_Moveable ),
- TKGet( TK_PositionX ),
- TKGet( TK_PositionY ),
- TKGet( TK_Title ),
- TKGet( TK_Width ) };
-
- Any pValues[] = {
- Any( sal_Int32( 0xffffff ) ),
- Any( sal_True ),
- Any( sal_Int32( ABOUT_DIALOG_HEIGHT ) ),
- Any( sal_True ),
- Any( sal_Int32( 113 ) ),
- Any( sal_Int32( 42 ) ),
- Any( getString( STR_ABOUT_VERSION2 ) ),
- Any( sal_Int32( ABOUT_DIALOG_WIDTH ) ) };
-
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
-
- Sequence< rtl::OUString > aNames( pNames, nCount );
- Sequence< Any > aValues( pValues, nCount );
-
- rtl::OUString sBitmapPath( getPath( TK_BitmapPath ) );
- rtl::OUString sBitmap( rtl::OUString::createFromAscii( "/aboutlogo.png" ) );
- rtl::OUString sURL( sBitmapPath += sBitmap );
-
- mxDialogModelMultiPropertySet->setPropertyValues( aNames, aValues );
- sal_Int32 nWidth = getMapsFromPixels( 387 );
- if ( nWidth )
- mxDialogModelPropertySet->setPropertyValue( TKGet( TK_Width ), Any( nWidth ) );
- else
- nWidth = ABOUT_DIALOG_WIDTH;
-
-// int nHeight = (int) getMapsFromPixels( 95 );
-
- InsertImage( *this, rtl::OUString( rtl::OUString::createFromAscii( "aboutimage" ) ), sURL, 0, 0, nWidth, 60 );
- InsertFixedText( *this, rtl::OUString( rtl::OUString::createFromAscii( "fixedtext" ) ), getString( STR_ABOUT_PRN ), 9, 66, nWidth - 18, 50, sal_True, 0 );
-// InsertSeparator( *this, rtl::OUString( rtl::OUString::createFromAscii( "separator" ) ), 0, 0, ABOUT_DIALOG_HEIGHT - 25, nWidth, 8 );
- InsertButton( *this, rtl::OUString( rtl::OUString::createFromAscii( "button" ) ), mxActionListener, ( nWidth / 2 ) - 25, 120, 50, 14, 1, STR_OK );
-}
-
-// -----------------------------------------------------------------------------
-
-AboutDialog::AboutDialog( const Reference< XComponentContext > &rxMSF, Reference< XFrame >& rxFrame ) :
- UnoDialog( rxMSF, rxFrame ),
- ConfigurationAccess( rxMSF, NULL ),
- mxMSF( rxMSF ),
- mxFrame( rxFrame ),
- mxActionListener( new AboutActionListener( *this ) )
-{
- Reference< XFrame > xFrame( mxController->getFrame() );
- Reference< XWindow > xContainerWindow( xFrame->getContainerWindow() );
- Reference< XWindowPeer > xWindowPeer( xContainerWindow, UNO_QUERY_THROW );
- createWindowPeer( xWindowPeer );
-
- InitDialog();
-}
-
-// -----------------------------------------------------------------------------
-
-AboutDialog::~AboutDialog()
-{
-}
-
-// -----------------------------------------------------------------------------
-
-sal_Bool AboutDialog::execute()
-{
- UnoDialog::execute();
- return mbStatus;
-}
-
-// -----------------------------------------------------------------------------
-
-void AboutActionListener::actionPerformed( const ActionEvent& rEvent )
- throw ( com::sun::star::uno::RuntimeException )
-{
- if ( rEvent.ActionCommand == rtl::OUString( rtl::OUString::createFromAscii( "button" ) ) )
- {
- mrAboutDialog.endExecute( sal_True );
- }
-}
-void AboutActionListener::disposing( const ::com::sun::star::lang::EventObject& /* Source */ )
- throw ( com::sun::star::uno::RuntimeException )
-{
-}
diff --git a/sdext/source/minimizer/aboutdialog.hxx b/sdext/source/minimizer/aboutdialog.hxx
deleted file mode 100644
index 3bc402fb2543..000000000000
--- a/sdext/source/minimizer/aboutdialog.hxx
+++ /dev/null
@@ -1,91 +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 ABOUTDIALOG_HXX
-#define ABOUTDIALOG_HXX
-#include <vector>
-#include "unodialog.hxx"
-#include "configurationaccess.hxx"
-#include "pppoptimizertoken.hxx"
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/awt/XItemListener.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/uno/Sequence.h>
-#include <com/sun/star/text/XTextRange.hpp>
-#include <com/sun/star/drawing/XShapes.hpp>
-#include <com/sun/star/container/XIndexAccess.hpp>
-#include <com/sun/star/frame/XController.hpp>
-#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/awt/XItemEventBroadcaster.hpp>
-#include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/awt/PushButtonType.hpp>
-
-#define DIALOG_WIDTH 310
-#define DIALOG_HEIGHT 210
-#define BUTTON_WIDTH 50
-#define BUTTON_HEIGHT 14
-
-// -------------------
-// - OPTIMIZERDIALOG -
-// -------------------
-class AboutDialog : public UnoDialog, public ConfigurationAccess
-{
-public :
-
- AboutDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF, com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame );
- ~AboutDialog();
-
- sal_Bool execute();
-
-private :
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >mxMSF;
- com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
- com::sun::star::uno::Reference< com::sun::star::awt::XActionListener > mxActionListener;
-
- void InitDialog();
-
-public :
-
- com::sun::star::uno::Reference< com::sun::star::frame::XFrame>& GetFrame() { return mxFrame; };
- const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& GetComponentContext() { return mxMSF; };
-};
-
-class AboutActionListener : public ::cppu::WeakImplHelper1< com::sun::star::awt::XActionListener >
-{
-public:
- AboutActionListener( AboutDialog& rAboutDialog ) : mrAboutDialog( rAboutDialog ){};
-
- virtual void SAL_CALL actionPerformed( const ::com::sun::star::awt::ActionEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( com::sun::star::uno::RuntimeException);
-private:
-
- AboutDialog& mrAboutDialog;
-};
-
-#endif // ABOUTDIALOG_HXX
diff --git a/sdext/source/minimizer/informationdialog.cxx b/sdext/source/minimizer/informationdialog.cxx
index 3c4dbf69895d..089c81f55a6a 100644
--- a/sdext/source/minimizer/informationdialog.cxx
+++ b/sdext/source/minimizer/informationdialog.cxx
@@ -265,7 +265,7 @@ void InformationDialog::InitDialog()
Any( sal_True ),
Any( sal_Int32( 245 ) ),
Any( sal_Int32( 115 ) ),
- Any( getString( STR_ABOUT2 ) ),
+ Any( getString( STR_SUN_OPTIMIZATION_WIZARD2 ) ),
Any( sal_Int32( DIALOG_WIDTH ) ) };
sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
@@ -321,7 +321,6 @@ void InformationDialog::InitDialog()
const OUString aOldSizePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%OLDFILESIZE" ) );
const OUString aNewSizePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%NEWFILESIZE" ) );
const OUString aTitlePlaceholder( aTitle.getLength() ? OUString::createFromAscii( "%TITLE" ) : OUString::createFromAscii( "'%TITLE'" ) );
- const OUString aExtensionPlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%EXTENSIONNAME" ) );
sal_Int32 i = aInfoString.indexOf( aOldSizePlaceholder, 0 );
if ( i >= 0 )
@@ -335,10 +334,6 @@ void InformationDialog::InitDialog()
if ( k >= 0 )
aInfoString = aInfoString.replaceAt( k, aTitlePlaceholder.getLength(), aTitle );
- sal_Int32 l = aInfoString.indexOf( aExtensionPlaceholder, 0 );
- if ( l >= 0 )
- aInfoString = aInfoString.replaceAt( l, aExtensionPlaceholder.getLength(), getString( STR_SUN_OPTIMIZATION_WIZARD2 ) );
-
com::sun::star::uno::Reference< com::sun::star::awt::XItemListener > xItemListener;
InsertImage( *this, rtl::OUString( rtl::OUString::createFromAscii( "aboutimage" ) ), ImpGetStandardImage( rtl::OUString::createFromAscii( "private:standardimage/query" ) ), 5, 5, 25, 25 );
InsertFixedText( *this, rtl::OUString( rtl::OUString::createFromAscii( "fixedtext" ) ), aInfoString, PAGE_POS_X, 6, PAGE_WIDTH, 24, sal_True, 0 );
diff --git a/sdext/source/minimizer/makefile.mk b/sdext/source/minimizer/makefile.mk
index 8a3a385fc8f2..969a0cb1f248 100755..100644
--- a/sdext/source/minimizer/makefile.mk
+++ b/sdext/source/minimizer/makefile.mk
@@ -61,7 +61,6 @@ SLOFILES= $(SLO)$/unodialog.obj \
$(SLO)$/pppoptimizerdialog.obj \
$(SLO)$/fileopendialog.obj \
$(SLO)$/optimizationstats.obj \
- $(SLO)$/aboutdialog.obj \
$(SLO)$/graphiccollector.obj \
$(SLO)$/pagecollector.obj \
$(SLO)$/informationdialog.obj
@@ -81,6 +80,8 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1RPATH= OXT
DEF1NAME= $(SHL1TARGET)
+COMPONENT_XCU_REPLACEMENT=s/@MINIMIZEREXTENSIONPRODUCTNAME@/Presentation Minimizer/g
+
COMPONENT_MERGED_XCU= \
$(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/Addons.xcu \
$(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/ProtocolHandler.xcu \
@@ -115,6 +116,18 @@ COMPONENT_HELP= \
# make sure to add your custom files here
EXTENSION_PACKDEPS=$(COMPONENT_BITMAPS) $(COMPONENT_IMAGES) $(COMPONENT_HELP)
+ZIP2TARGET= presentation_minimizer_develop
+.IF "$(WITH_LANG)"!=""
+ZIP2DIR= $(MISC)/$(EXTENSIONNAME)_in/merge
+.ELSE # "$(WITH_LANG)"!=""
+ZIP2DIR= registry/data
+.ENDIF # "$(WITH_LANG)"!=""
+ZIP2EXT= .zip
+ZIP2FLAGS=-r
+ZIP2LIST= \
+ org/openoffice/Office/Addons.xcu \
+ org/openoffice/Office/extension/*.xcu
+
# --- Targets ----------------------------------
.INCLUDE : extension_pre.mk
diff --git a/sdext/source/minimizer/pppoptimizerdialog.cxx b/sdext/source/minimizer/pppoptimizerdialog.cxx
index 854d4d9cebcd..b56f82b10543 100644
--- a/sdext/source/minimizer/pppoptimizerdialog.cxx
+++ b/sdext/source/minimizer/pppoptimizerdialog.cxx
@@ -30,7 +30,6 @@
#include "pppoptimizerdialog.hxx"
#include "optimizerdialog.hxx"
-#include "aboutdialog.hxx"
using namespace ::rtl;
using namespace ::com::sun::star::uno;
@@ -175,11 +174,6 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL,
if ( mpOptimizerDialog )
mpOptimizerDialog->UpdateStatus( rArguments );
}
- else if ( rURL.Path.compareToAscii( "about" ) == 0 )
- {
- AboutDialog aAboutDialog( mxMSF, mxFrame );
- aAboutDialog.execute();
- }
}
}
diff --git a/sdext/source/minimizer/pppoptimizertoken.cxx b/sdext/source/minimizer/pppoptimizertoken.cxx
index b36078ea2af4..e44116c02bf8 100644
--- a/sdext/source/minimizer/pppoptimizertoken.cxx
+++ b/sdext/source/minimizer/pppoptimizertoken.cxx
@@ -286,9 +286,6 @@ static const TokenTable pTokenTableArray[] =
{ "STR_DEFAULT_SESSION", STR_DEFAULT_SESSION },
{ "STR_MODIFY_WARNING", STR_MODIFY_WARNING },
{ "STR_YES", STR_YES },
- { "STR_ABOUT2", STR_ABOUT2 },
- { "STR_ABOUT_VERSION2", STR_ABOUT_VERSION2 },
- { "STR_ABOUT_PRN", STR_ABOUT_PRN },
{ "STR_OK", STR_OK },
{ "STR_INFO_1", STR_INFO_1 },
{ "STR_INFO_2", STR_INFO_2 },
diff --git a/sdext/source/minimizer/pppoptimizertoken.hxx b/sdext/source/minimizer/pppoptimizertoken.hxx
index 9f544dd1a5bf..553a771c05f3 100644
--- a/sdext/source/minimizer/pppoptimizertoken.hxx
+++ b/sdext/source/minimizer/pppoptimizertoken.hxx
@@ -262,9 +262,6 @@ enum PPPOptimizerTokenEnum
STR_DEFAULT_SESSION,
STR_MODIFY_WARNING,
STR_YES,
- STR_ABOUT2,
- STR_ABOUT_VERSION2,
- STR_ABOUT_PRN,
STR_OK,
STR_INFO_1,
STR_INFO_2,
diff --git a/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu b/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu
index 251818079fe5..08324953d32c 100644
--- a/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu
+++ b/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu
@@ -11,7 +11,7 @@
<node oor:name="Strings">
<prop oor:name="STR_SUN_OPTIMIZATION_WIZARD2">
- <value xml:lang="en-US">Oracle Presentation Minimizer</value>
+ <value xml:lang="en-US">@MINIMIZEREXTENSIONPRODUCTNAME@</value>
</prop>
<prop oor:name="STR_STEPS">
<value xml:lang="en-US">Steps</value>
@@ -35,12 +35,12 @@
<value xml:lang="en-US">Introduction</value>
</prop>
<prop oor:name="STR_INTRODUCTION_T">
- <value xml:lang="en-US">The Oracle Presentation Minimizer is used to reduce the file size of the current presentation. Images will be compressed and data, that is no longer needed, will be removed.
+ <value xml:lang="en-US">The @MINIMIZEREXTENSIONPRODUCTNAME@ is used to reduce the file size of the current presentation. Images will be compressed and data, that is no longer needed, will be removed.
At the last step of the wizard you can choose to apply the changes to the current presentation or to create an optimized new version of the presentation.</value>
</prop>
<prop oor:name="STR_CHOSE_SETTINGS">
- <value xml:lang="en-US">~Choose settings for Oracle Presentation Minimizer</value>
+ <value xml:lang="en-US">~Choose settings for @MINIMIZEREXTENSIONPRODUCTNAME@</value>
</prop>
<prop oor:name="STR_REMOVE">
<value xml:lang="en-US">~Delete</value>
@@ -181,32 +181,20 @@ The current presentation contains no OLE objects.</value>
<prop oor:name="STR_YES">
<value xml:lang="en-US">~Yes</value>
</prop>
- <prop oor:name="STR_ABOUT2">
- <value xml:lang="en-US">Oracle Presentation Minimizer</value>
- </prop>
- <prop oor:name="STR_ABOUT_VERSION2">
- <value xml:lang="en-US">About Oracle Presentation Minimizer 1.0.2</value>
- </prop>
- <prop oor:name="STR_ABOUT_PRN">
- <value xml:lang="en-US">Copyright © 2000, 2010 Oracle and/or its affiliates. All rights reserved.
-
-This product has been created with contributions from the OpenOffice.org community, of which Oracle is a principal member. OpenOffice.org acknowledges all community members, especially those mentioned at http://www.openoffice.org/welcome/credits.html
- </value>
- </prop>
<prop oor:name="STR_OK">
<value xml:lang="en-US">OK</value>
</prop>
<prop oor:name="STR_INFO_1">
- <value xml:lang="en-US">The %EXTENSIONNAME has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to %NEWFILESIZE MB.</value>
+ <value xml:lang="en-US">The @MINIMIZEREXTENSIONPRODUCTNAME@ has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to %NEWFILESIZE MB.</value>
</prop>
<prop oor:name="STR_INFO_2">
- <value xml:lang="en-US">The %EXTENSIONNAME has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to approximated %NEWFILESIZE MB.</value>
+ <value xml:lang="en-US">The @MINIMIZEREXTENSIONPRODUCTNAME@ has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to approximated %NEWFILESIZE MB.</value>
</prop>
<prop oor:name="STR_INFO_3">
- <value xml:lang="en-US">The %EXTENSIONNAME has successfully updated the presentation '%TITLE'. The file size has changed to %NEWFILESIZE MB.</value>
+ <value xml:lang="en-US">The @MINIMIZEREXTENSIONPRODUCTNAME@ has successfully updated the presentation '%TITLE'. The file size has changed to %NEWFILESIZE MB.</value>
</prop>
<prop oor:name="STR_INFO_4">
- <value xml:lang="en-US">The %EXTENSIONNAME has successfully updated the presentation '%TITLE'. The file size has changed to approximated %NEWFILESIZE MB.</value>
+ <value xml:lang="en-US">The @MINIMIZEREXTENSIONPRODUCTNAME@ has successfully updated the presentation '%TITLE'. The file size has changed to approximated %NEWFILESIZE MB.</value>
</prop>
<prop oor:name="STR_DUPLICATING_PRESENTATION">
<value xml:lang="en-US">Duplicating presentation...</value>
diff --git a/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs b/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs
index 59c947750064..f121768e0e72 100644
--- a/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs
+++ b/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs
@@ -106,7 +106,7 @@
<prop oor:name="HelpFile" oor:type="xs:string"/>
<group oor:name="Strings">
<prop oor:name="STR_SUN_OPTIMIZATION_WIZARD2" oor:type="xs:string" oor:localized="true">
- <value>Oracle Presentation Minimizer</value>
+ <value>Presentation Minimizer</value>
</prop>
<prop oor:name="STR_STEPS" oor:type="xs:string" oor:localized="true">
<value>Steps</value>
@@ -130,7 +130,7 @@
<value>Introduction</value>
</prop>
<prop oor:name="STR_INTRODUCTION_T" oor:type="xs:string" oor:localized="true">
- <value>The Oracle Presentation Minimizer is used to reduce the file size of the current presentation. Images will be compressed and data, that is no longer needed, will be removed.
+ <value>The Presentation Minimizer is used to reduce the file size of the current presentation. Images will be compressed and data, that is no longer needed, will be removed.
At the last step of the wizard you can choose to apply the changes to the current presentation or to create an optimized new version of the presentation.</value>
</prop>
@@ -279,32 +279,20 @@ The current presentation contains no OLE objects.</value>
<prop oor:name="STR_YES" oor:type="xs:string" oor:localized="true">
<value>~Yes</value>
</prop>
- <prop oor:name="STR_ABOUT2" oor:type="xs:string" oor:localized="true">
- <value>Oracle Presentation Minimizer</value>
- </prop>
- <prop oor:name="STR_ABOUT_VERSION2" oor:type="xs:string" oor:localized="true">
- <value>About Oracle Presentation Minimizer 1.0.2</value>
- </prop>
- <prop oor:name="STR_ABOUT_PRN" oor:type="xs:string" oor:localized="true">
- <value>Copyright © 2000, 2010 Oracle and/or its affiliates. All rights reserved.
-
-This product has been created with contributions from the OpenOffice.org community, of which Oracle is a principal member. OpenOffice.org acknowledges all community members, especially those mentioned at http://www.openoffice.org/welcome/credits.html/value>
- </value>
- </prop>
<prop oor:name="STR_OK" oor:type="xs:string" oor:localized="true">
<value>OK</value>
</prop>
<prop oor:name="STR_INFO_1" oor:type="xs:string" oor:localized="true">
- <value>The %EXTENSIONNAME has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to %NEWFILESIZE MB.</value>
+ <value>The Presentation Minimizer has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to %NEWFILESIZE MB.</value>
</prop>
<prop oor:name="STR_INFO_2" oor:type="xs:string" oor:localized="true">
- <value>The %EXTENSIONNAME has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to approximated %NEWFILESIZE MB.</value>
+ <value>The Presentation Minimizer has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to approximated %NEWFILESIZE MB.</value>
</prop>
<prop oor:name="STR_INFO_3" oor:type="xs:string" oor:localized="true">
- <value>The %EXTENSIONNAME has successfully updated the presentation '%TITLE'. The file size has changed to %NEWFILESIZE MB.</value>
+ <value>The Presentation Minimizer has successfully updated the presentation '%TITLE'. The file size has changed to %NEWFILESIZE MB.</value>
</prop>
<prop oor:name="STR_INFO_4" oor:type="xs:string" oor:localized="true">
- <value>The %EXTENSIONNAME has successfully updated the presentation '%TITLE'. The file size has changed to approximated %NEWFILESIZE MB.</value>
+ <value>The Presentation Minimizer has successfully updated the presentation '%TITLE'. The file size has changed to approximated %NEWFILESIZE MB.</value>
</prop>
<prop oor:name="STR_DUPLICATING_PRESENTATION" oor:type="xs:string" oor:localized="true">
<value>Duplicating presentation...</value>
diff --git a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp
index a1172d540d7e..ba8f29bb497f 100644
--- a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp
+++ b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp
@@ -33,16 +33,16 @@
<meta>
<topic id="textpresenterxml" indexer="include" status="PUBLISH">
- <title xml-lang="en-US" id="tit" l10n="NEW">Oracle Presenter Console Keyboard Shortcuts</title>
+ <title xml-lang="en-US" id="tit" l10n="NEW">@PRESENTEREXTENSIONPRODUCTNAME@ Keyboard Shortcuts</title>
<filename>/com.sun.PresenterScreen-PLATFORMID/presenter.xhp</filename>
</topic>
</meta>
<body>
<bookmark xml-lang="en-US" branch="hid/com.sun.PresenterScreen" id="bm_id3138439" localize="false"/>
-<bookmark xml-lang="en-US" branch="index" id="bm_id0921200912285678"><bookmark_value>Presenter Console shortcuts</bookmark_value>
+<bookmark xml-lang="en-US" branch="index" id="bm_id0921200912285678"><bookmark_value>@PRESENTEREXTENSIONPRODUCTNAME@ shortcuts</bookmark_value>
</bookmark>
-<paragraph xml-lang="en-US" id="hd_id0921201912165661" role="heading" level="1" l10n="NEW">Oracle Presenter Console Keyboard Shortcuts</paragraph>
- <paragraph xml-lang="en-US" id="par_id0921201912165656" role="paragraph" l10n="NEW">When running a slide show using the Oracle Presenter Console, you can use the following keys:</paragraph>
+<paragraph xml-lang="en-US" id="hd_id0921201912165661" role="heading" level="1" l10n="NEW">@PRESENTEREXTENSIONPRODUCTNAME@ Keyboard Shortcuts</paragraph>
+ <paragraph xml-lang="en-US" id="par_id0921201912165656" role="paragraph" l10n="NEW">When running a slide show using the @PRESENTEREXTENSIONPRODUCTNAME@, you can use the following keys:</paragraph>
<table id="tbl_id0921200901051232">
<tablerow>
<tablecell>
@@ -158,7 +158,7 @@
</tablerow>
<tablerow>
<tablecell>
- <paragraph xml-lang="en-US" id="par_id0921200901104566" role="tablecontent" l10n="NEW">Show the Presenter Console</paragraph>
+ <paragraph xml-lang="en-US" id="par_id0921200901104566" role="tablecontent" l10n="NEW">Show the @PRESENTEREXTENSIONPRODUCTNAME@</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id0921200901104544" role="tablecontent" l10n="NEW">Ctrl-'1'</paragraph>
diff --git a/sdext/source/presenter/makefile.mk b/sdext/source/presenter/makefile.mk
index 08a3470fc24d..a26cf54b3694 100755..100644
--- a/sdext/source/presenter/makefile.mk
+++ b/sdext/source/presenter/makefile.mk
@@ -32,11 +32,16 @@ GEN_HID=FALSE
EXTNAME=PresenterScreen
ENABLE_EXCEPTIONS=TRUE
+# survive zip dependencies
+MAXLINELENGTH:=80000
# --- Settings ----------------------------------
.INCLUDE : rtlbootstrap.mk
.INCLUDE : settings.mk
+
+PACKAGE=com.sun.PresenterScreen-$(PLATFORMID)
+
.IF "$(L10N_framework)"==""
.INCLUDE : $(PRJ)$/util$/makefile.pmk
@@ -107,6 +112,12 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1RPATH= OXT
DEF1NAME= $(SHL1TARGET)
+ZIP2TARGET= presenter-screen_develop
+ZIP2DIR= $(COMMONMISC)
+ZIP2EXT= .zip
+ZIP2FLAGS=-r
+ZIP2LIST= */com.sun.PresenterScreen/*.xhp
+
ZIP1TARGET= presenter-screen
ZIP1DIR= $(MISC)$/$(TARGET)
ZIP1EXT= .oxt
@@ -248,10 +259,6 @@ PLATFORMID:=$(RTL_OS:l)_$(RTL_ARCH:l)
COMPONENT_HELP= \
$(ZIP1DIR)$/help/component.txt \
$(foreach,l,$(alllangiso) $(ZIP1DIR)$/help$/$l$/com.sun.PresenterScreen-$(PLATFORMID)$/presenter.xhp)
-# $(ZIP1DIR)$/help$/en-US$/com.sun.PresenterScreen-$(PLATFORMID)$/presenter.xhp
-
-# no localization yet - see #i107498#
-# $(foreach,l,$(alllangiso) $(ZIP1DIR)$/help$/$l$/com.sun.PresenterScreen-$(PLATFORMID)$/presenter.xhp)
ZIP1DEPS= \
$(PACKLICS) \
@@ -262,14 +269,25 @@ ZIP1DEPS= \
$(COMPONENT_IMAGES) \
$(COMPONENT_LIBRARY) \
$(COMPONENT_HELP)
+
# $(COMPONENT_MERGED_XCU) \
+LINKNAME:=help
+XHPLINKSRC:=$(ZIP1DIR)/help
+
+my_XHPFILES= \
+ presenter.xhp
+
+LINKLINKFILES= \
+ $(PACKAGE)/{$(my_XHPFILES)}
# --- Targets ----------------------------------
.ENDIF # L10N_framework
.INCLUDE : target.mk
+.INCLUDE : extension_helplink.mk
+
.IF "$(L10N_framework)"==""
$(SLO)$/PresenterComponent.obj : $(INCCOM)$/PresenterExtensionIdentifier.hxx
@@ -284,10 +302,12 @@ $(ZIP1DIR)$/help$/component.txt : help$/$$(@:f)
@@-$(MKDIRHIER) $(@:d)
$(COPY) $< $@
-$(ZIP1DIR)$/help$/%$/com.sun.PresenterScreen-$(PLATFORMID)$/presenter.xhp : $(COMMONMISC)/%/com.sun.PresenterScreen/presenter.xhp
+$(ZIP1DIR)/help/%/com.sun.PresenterScreen-$(PLATFORMID)/presenter.xhp : $(COMMONMISC)/%/com.sun.PresenterScreen/presenter.xhp
@echo creating $@
- @@-$(MKDIRHIER) $(@:d)
- $(TYPE) $< | sed "s/PLATFORMID/$(PLATFORMID)/" > $@
+ @-$(MKDIRHIER) $(@:d)
+ $(TYPE) $< | sed "s/PLATFORMID/$(PLATFORMID)/" | sed 's/@PRESENTEREXTENSIONPRODUCTNAME@/Presenter Console/g' > $@
+
+$(ZIP1TARGETN) : $(HELPLINKALLTARGETS)
$(COMPONENT_BITMAPS) : bitmaps$/$$(@:f)
@-$(MKDIRHIER) $(@:d)
@@ -370,7 +390,7 @@ DESCRIPTION_TMP:=$(ZIP1DIR)$/description.xml.tmp
PHONYDESC=.PHONY
.ENDIF # "$(LAST_WITH_LANG)"!="$(WITH_LANG)"
$(DESCRIPTION) $(PHONYDESC) : $$(@:f)
- @@-$(MKDIRHIER) $(@:d)
+ @-$(MKDIRHIER) $(@:d)
$(PERL) $(SOLARENV)$/bin$/licinserter.pl description.xml registry/LICENSE_xxx $(DESCRIPTION_TMP)
@echo LAST_WITH_LANG=$(WITH_LANG) > $(ZIP1DIR)_lang_track.mk
$(TYPE) $(DESCRIPTION_TMP) | sed s/UPDATED_PLATFORM/$(PLATFORMID)/ > $@
diff --git a/setup_native/source/packinfo/spellchecker_selection.txt b/setup_native/source/packinfo/spellchecker_selection.txt
index 8d5cb0fc83b8..5853a97b141e 100644
--- a/setup_native/source/packinfo/spellchecker_selection.txt
+++ b/setup_native/source/packinfo/spellchecker_selection.txt
@@ -44,6 +44,7 @@ sr = "sr,en-US"
sh = "sr,en-US"
sw = "sw,en-US"
th = "th,en-US"
+uk = "ru,en-US"
vi = "vi,en-US,fr"
zh-TW = "EMPTY,en-US"
zh-CN = "EMPTY,en-US"
diff --git a/sfx2/inc/sfx2/docfac.hxx b/sfx2/inc/sfx2/docfac.hxx
index 7468394d2617..89062d7b7263 100644
--- a/sfx2/inc/sfx2/docfac.hxx
+++ b/sfx2/inc/sfx2/docfac.hxx
@@ -94,7 +94,7 @@ public:
USHORT GetViewFactoryCount() const;
SfxViewFactory& GetViewFactory(USHORT i = 0) const;
- /// returns the view factory whose GetViewName delivers the requested logical name
+ /// returns the view factory whose GetAPIViewName or GetLegacyViewName delivers the requested logical name
SfxViewFactory* GetViewFactoryByViewName( const String& i_rViewName ) const;
// Filter
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index 48ffc5727dc1..0cb57e7a414d 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -320,7 +320,6 @@ public:
static com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag > GetVersionList(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
- static sal_Bool EqualURLs( const ::rtl::OUString& aFirstURL, const ::rtl::OUString& aSecondURL );
static ::rtl::OUString CreateTempCopyWithExt( const ::rtl::OUString& aURL );
static sal_Bool CallApproveHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler, ::com::sun::star::uno::Any aRequest, sal_Bool bAllowAbort );
diff --git a/sfx2/inc/sfx2/viewfrm.hxx b/sfx2/inc/sfx2/viewfrm.hxx
index d376236bf830..affa836486e6 100644
--- a/sfx2/inc/sfx2/viewfrm.hxx
+++ b/sfx2/inc/sfx2/viewfrm.hxx
@@ -253,6 +253,7 @@ public:
private:
SAL_DLLPRIVATE BOOL SwitchToViewShell_Impl( USHORT nNo, BOOL bIsIndex = FALSE );
SAL_DLLPRIVATE void PopShellAndSubShells_Impl( SfxViewShell& i_rViewShell );
+ SAL_DLLPRIVATE void SaveCurrentViewData_Impl( const USHORT i_nNewViewId );
/** loads the given existing document into the given frame
diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx
index 8465a238cd5b..ee8dfb1ca57c 100644
--- a/sfx2/inc/sfx2/viewsh.hxx
+++ b/sfx2/inc/sfx2/viewsh.hxx
@@ -123,13 +123,13 @@ public: \
static SfxViewFactory&Factory() { return *pFactory; } \
static void InitFactory()
-#define SFX_IMPL_VIEWFACTORY(Class, rResId) \
+#define SFX_IMPL_NAMED_VIEWFACTORY(Class, AsciiViewName) \
SfxViewFactory* Class::pFactory; \
SfxViewShell* __EXPORT Class::CreateInstance(SfxViewFrame *pFrame, SfxViewShell *pOldView) \
{ return new Class(pFrame, pOldView); } \
void Class::RegisterFactory( USHORT nPrio ) \
{ \
- pFactory = new SfxViewFactory(&CreateInstance,&InitFactory,nPrio,rResId);\
+ pFactory = new SfxViewFactory(&CreateInstance,&InitFactory,nPrio,AsciiViewName);\
InitFactory(); \
} \
void Class::InitFactory()
diff --git a/sfx2/inc/viewfac.hxx b/sfx2/inc/viewfac.hxx
index 6f9ae1d3cb37..b0f0abdba3b3 100644
--- a/sfx2/inc/viewfac.hxx
+++ b/sfx2/inc/viewfac.hxx
@@ -46,24 +46,29 @@ class SFX2_DLLPUBLIC SfxViewFactory
{
public:
SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI,
- USHORT nOrdinal, const ResId& aDescrResId );
+ USHORT nOrdinal, const sal_Char* asciiViewName );
~SfxViewFactory();
SfxViewShell *CreateInstance(SfxViewFrame *pViewFrame, SfxViewShell *pOldSh);
void InitFactory();
- String GetDescription() const
- { return String( aDescription ); }
USHORT GetOrdinal() const { return nOrd; }
- /// returns an API-compatible view name. For the moment, this is "view" with an appended ordinal/ID
- String GetViewName() const;
+ /// returns a legacy view name. This is "view" with an appended ordinal/ID.
+ String GetLegacyViewName() const;
+
+ /** returns a API-compatible view name.
+
+ For details on which view names are specified, see the XModel2.getAvailableViewControllerNames
+ documentation.
+ */
+ String GetAPIViewName() const;
private:
SfxViewCtor fnCreate;
SfxViewInit fnInit;
USHORT nOrd;
- ResId aDescription;
+ const String m_sViewName;
};
#endif
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index f25485a1401c..30fe2460d512 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -253,10 +253,11 @@ namespace sfx2
pWindow->SetHelpId( HID_TASKPANE_WINDOW );
pWindow->SetOutputSizePixel( Size( 300, 450 ) );
- pWindow->Show();
dynamic_cast< SfxDockingWindow* >( pWindow )->Initialize( i_pInfo );
SetHideNotDelete( TRUE );
+
+ pWindow->Show();
}
//------------------------------------------------------------------------------------------------------------------
@@ -584,6 +585,7 @@ namespace sfx2
return;
::rtl::OUString sFirstVisiblePanelResource;
+ ::rtl::OUString sFirstPanelResource;
const Sequence< ::rtl::OUString > aUIElements( aWindowStateConfig.getNodeNames() );
for ( const ::rtl::OUString* resource = aUIElements.getConstArray();
@@ -594,6 +596,8 @@ namespace sfx2
if ( !impl_isToolPanelResource( *resource ) )
continue;
+ sFirstPanelResource = *resource;
+
::utl::OConfigurationNode aResourceNode( aWindowStateConfig.openNode( *resource ) );
::svt::PToolPanel pCustomPanel( new CustomToolPanel( aResourceNode, m_xFrame ) );
@@ -620,6 +624,9 @@ namespace sfx2
sFirstVisiblePanelResource = *resource;
}
+ if ( sFirstVisiblePanelResource.getLength() == 0 )
+ sFirstVisiblePanelResource = sFirstPanelResource;
+
if ( sFirstVisiblePanelResource.getLength() )
{
::boost::optional< size_t > aPanelPos( GetPanelPos( sFirstVisiblePanelResource ) );
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 9625ea958830..df0781be8877 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -45,6 +45,8 @@
#include <rtl/uuid.h>
#include <rtl/ustrbuf.hxx>
+#include <rtl/uri.hxx>
+#include <rtl/bootstrap.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/makesequence.hxx>
@@ -136,6 +138,24 @@ uno::Reference<rdf::XURI> createBaseURI(
throw uno::RuntimeException();
}
+ // #i108078# workaround non-hierarchical vnd.sun.star.expand URIs
+ // this really should be done somewhere else, not here.
+ ::rtl::OUString pkgURI(i_rPkgURI);
+ if (pkgURI.matchIgnoreAsciiCaseAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.expand:")))
+ {
+ // expand it here (makeAbsolute requires hierarchical URI)
+ pkgURI = pkgURI.copy( RTL_CONSTASCII_LENGTH("vnd.sun.star.expand:") );
+ if (pkgURI.getLength() != 0) {
+ pkgURI = ::rtl::Uri::decode(
+ pkgURI, rtl_UriDecodeStrict, RTL_TEXTENCODING_UTF8);
+ if (pkgURI.getLength() == 0) {
+ throw uno::RuntimeException();
+ }
+ ::rtl::Bootstrap::expandMacros(pkgURI);
+ }
+ }
+
const uno::Reference<lang::XMultiComponentFactory> xServiceFactory(
i_xContext->getServiceManager(), uno::UNO_SET_THROW);
const uno::Reference<uri::XUriReferenceFactory> xUriFactory(
@@ -146,11 +166,12 @@ uno::Reference<rdf::XURI> createBaseURI(
uno::Reference< uri::XUriReference > xBaseURI;
const uno::Reference< uri::XUriReference > xPkgURI(
- xUriFactory->parse(i_rPkgURI), uno::UNO_SET_THROW );
+ xUriFactory->parse(pkgURI), uno::UNO_SET_THROW );
xPkgURI->clearFragment();
+
// need to know whether the storage is a FileSystemStorage
// XServiceInfo would be better, but it is not implemented
-// if ( i_rPkgURI.getLength() && ::utl::UCBContentHelper::IsFolder(i_rPkgURI) )
+// if ( pkgURI.getLength() && ::utl::UCBContentHelper::IsFolder(pkgURI) )
if (true) {
xBaseURI.set( xPkgURI, uno::UNO_SET_THROW );
#if 0
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index bfd67210ec44..4311559f94af 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -159,6 +159,21 @@ void SfxObjectFactory::RegisterViewFactory
SfxViewFactory &rFactory
)
{
+#if OSL_DEBUG_LEVEL > 0
+ {
+ const String sViewName( rFactory.GetAPIViewName() );
+ for ( sal_uInt16 i = 0; i < pImpl->aViewFactoryArr.Count(); ++i )
+ {
+ if ( !pImpl->aViewFactoryArr[i]->GetAPIViewName().Equals( sViewName ) )
+ continue;
+ ByteString sMessage( "SfxObjectFactory::RegisterViewFactory: duplicate view name '" );
+ sMessage += ByteString( sViewName, RTL_TEXTENCODING_ASCII_US );
+ sMessage += "'!";
+ OSL_ENSURE( false, sMessage.GetBuffer() );
+ break;
+ }
+ }
+#endif
sal_uInt16 nPos;
for ( nPos = 0;
nPos < pImpl->aViewFactoryArr.Count() &&
@@ -467,7 +482,9 @@ SfxViewFactory* SfxObjectFactory::GetViewFactoryByViewName( const String& i_rVie
)
{
SfxViewFactory& rViewFac( GetViewFactory( nViewNo ) );
- if ( rViewFac.GetViewName() == i_rViewName )
+ if ( ( rViewFac.GetAPIViewName() == i_rViewName )
+ || ( rViewFac.GetLegacyViewName() == i_rViewName )
+ )
return &rViewFac;
}
return NULL;
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 1dea202e0d0e..29081e8e8418 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -3717,53 +3717,6 @@ void SfxMedium::SetCachedSignatureState_Impl( sal_uInt16 nState )
pImp->m_nSignatureState = nState;
}
-//----------------------------------------------------------------
-sal_Bool SfxMedium::EqualURLs( const ::rtl::OUString& aFirstURL, const ::rtl::OUString& aSecondURL )
-{
- sal_Bool bResult = sal_False;
-
- if ( aFirstURL.getLength() && aSecondURL.getLength() )
- {
- INetURLObject aFirst( aFirstURL );
- INetURLObject aSecond( aSecondURL );
-
- if ( aFirst.GetProtocol() != INET_PROT_NOT_VALID && aSecond.GetProtocol() != INET_PROT_NOT_VALID )
- {
- try
- {
- ::ucbhelper::ContentBroker* pBroker = ::ucbhelper::ContentBroker::get();
- if ( !pBroker )
- throw uno::RuntimeException();
-
- uno::Reference< ::com::sun::star::ucb::XContentIdentifierFactory > xIdFac
- = pBroker->getContentIdentifierFactoryInterface();
- if ( !xIdFac.is() )
- throw uno::RuntimeException();
-
- uno::Reference< ::com::sun::star::ucb::XContentIdentifier > xIdFirst
- = xIdFac->createContentIdentifier( aFirst.GetMainURL( INetURLObject::NO_DECODE ) );
- uno::Reference< ::com::sun::star::ucb::XContentIdentifier > xIdSecond
- = xIdFac->createContentIdentifier( aSecond.GetMainURL( INetURLObject::NO_DECODE ) );
-
- if ( xIdFirst.is() && xIdSecond.is() )
- {
- uno::Reference< ::com::sun::star::ucb::XContentProvider > xProvider =
- pBroker->getContentProviderInterface();
- if ( !xProvider.is() )
- throw uno::RuntimeException();
- bResult = !xProvider->compareContentIds( xIdFirst, xIdSecond );
- }
- }
- catch( uno::Exception& )
- {
- OSL_ENSURE( sal_False, "Can't compare URL's, treat as different!\n" );
- }
- }
- }
-
- return bResult;
-}
-
BOOL SfxMedium::HasStorage_Impl() const
{
return pImp->xStorage.is();
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index b921f2d97f1f..71f3683c0006 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -1919,7 +1919,7 @@ sal_Bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName,
aStoreArgs[1].Value <<= rTemplateName;
::rtl::OUString aCurrentDocumentURL = rStorable->getLocation();
- if( !SfxMedium::EqualURLs( aNewTemplateTargetURL, rStorable->getLocation() ))
+ if( !::utl::UCBContentHelper::EqualURLs( aNewTemplateTargetURL, rStorable->getLocation() ))
rStorable->storeToURL( aNewTemplateTargetURL, aStoreArgs );
else
rStorable->store();
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index addb648ef2e9..e386b2382acf 100755..100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -732,7 +732,7 @@ void SfxObjectShell::FreeSharedFile( const ::rtl::OUString& aTempFileURL )
SetSharedXMLFlag( sal_False );
if ( IsDocShared() && aTempFileURL.getLength()
- && !SfxMedium::EqualURLs( aTempFileURL, GetSharedFileURL() ) )
+ && !::utl::UCBContentHelper::EqualURLs( aTempFileURL, GetSharedFileURL() ) )
{
if ( pImp->m_bAllowShareControlFileClean )
{
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 066f366b09bd..bb0e6939ead8 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1344,8 +1344,13 @@ sal_uInt16 SfxObjectShell::ImplGetSignatureState( sal_Bool bScriptingContent )
void SfxObjectShell::ImplSign( sal_Bool bScriptingContent )
{
// Check if it is stored in OASIS format...
- if ( GetMedium() && GetMedium()->GetFilter()
- && ( !GetMedium()->GetFilter()->IsOwnFormat() || !GetMedium()->HasStorage_Impl() ) )
+ if ( GetMedium()
+ && GetMedium()->GetFilter()
+ && GetMedium()->GetName().Len()
+ && ( !GetMedium()->GetFilter()->IsOwnFormat()
+ || !GetMedium()->HasStorage_Impl()
+ )
+ )
{
// Only OASIS and OOo6.x formats will be handled further
InfoBox( NULL, SfxResId( RID_XMLSEC_INFO_WRONGDOCFORMAT ) ).Execute();
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 6c4bdf56ba26..037493c61252 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1189,7 +1189,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
if ( pMedium
&& pMedium->GetName().CompareIgnoreCaseToAscii( "private:stream", 14 ) != COMPARE_EQUAL
&& rMedium.GetName().CompareIgnoreCaseToAscii( "private:stream", 14 ) != COMPARE_EQUAL
- && SfxMedium::EqualURLs( pMedium->GetName(), rMedium.GetName() ) )
+ && ::utl::UCBContentHelper::EqualURLs( pMedium->GetName(), rMedium.GetName() ) )
{
bStoreToSameLocation = sal_True;
AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Save" ) ) );
@@ -1917,7 +1917,25 @@ sal_Bool SfxObjectShell::ConnectTmpStorage_Impl(
bResult = SaveCompleted( xTmpStorage );
if ( bResult )
+ {
pImp->pBasicManager->setStorage( xTmpStorage );
+
+ // Get rid of this workaround after issue i113914 is fixed
+ try
+ {
+ uno::Reference< script::XStorageBasedLibraryContainer > xBasicLibraries( pImp->xBasicLibraries, uno::UNO_QUERY_THROW );
+ xBasicLibraries->setRootStorage( xTmpStorage );
+ }
+ catch( uno::Exception& )
+ {}
+ try
+ {
+ uno::Reference< script::XStorageBasedLibraryContainer > xDialogLibraries( pImp->xDialogLibraries, uno::UNO_QUERY_THROW );
+ xDialogLibraries->setRootStorage( xTmpStorage );
+ }
+ catch( uno::Exception& )
+ {}
+ }
}
catch( uno::Exception& )
{}
@@ -2063,6 +2081,22 @@ sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed )
// TODO/LATER: may be this code will be replaced, but not sure
// Set storage in document library containers
pImp->pBasicManager->setStorage( xStorage );
+
+ // Get rid of this workaround after issue i113914 is fixed
+ try
+ {
+ uno::Reference< script::XStorageBasedLibraryContainer > xBasicLibraries( pImp->xBasicLibraries, uno::UNO_QUERY_THROW );
+ xBasicLibraries->setRootStorage( xStorage );
+ }
+ catch( uno::Exception& )
+ {}
+ try
+ {
+ uno::Reference< script::XStorageBasedLibraryContainer > xDialogLibraries( pImp->xDialogLibraries, uno::UNO_QUERY_THROW );
+ xDialogLibraries->setRootStorage( xStorage );
+ }
+ catch( uno::Exception& )
+ {}
}
else
{
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 7ef9fe0d2f19..846cc669b9a7 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -95,6 +95,7 @@
#include <framework/titlehelper.hxx>
#include <comphelper/numberedcollection.hxx>
#include <unotools/ucbstreamhelper.hxx>
+#include <unotools/ucbhelper.hxx>
//________________________________________________________________________________________________________
// includes of my own project
@@ -2648,7 +2649,7 @@ void SfxBaseModel::impl_store( const ::rtl::OUString& sURL
sal_Bool bSaved = sal_False;
if ( !bSaveTo && m_pData->m_pObjectShell && sURL.getLength()
&& sURL.compareToAscii( "private:stream", 14 ) != COMPARE_EQUAL
- && SfxMedium::EqualURLs( getLocation(), sURL ) )
+ && ::utl::UCBContentHelper::EqualURLs( getLocation(), sURL ) )
{
// this is the same file URL as the current document location, try to use storeOwn if possible
@@ -3811,7 +3812,7 @@ css::uno::Sequence< ::rtl::OUString > SAL_CALL SfxBaseModel::getAvailableViewCon
Sequence< ::rtl::OUString > aViewNames( nViewFactoryCount );
for ( sal_Int32 nViewNo = 0; nViewNo < nViewFactoryCount; ++nViewNo )
- aViewNames[nViewNo] = rDocumentFactory.GetViewFactory( nViewNo ).GetViewName();
+ aViewNames[nViewNo] = rDocumentFactory.GetViewFactory( nViewNo ).GetAPIViewName();
return aViewNames;
}
@@ -3825,7 +3826,7 @@ css::uno::Reference< css::frame::XController2 > SAL_CALL SfxBaseModel::createDef
SfxModelGuard aGuard( *this );
const SfxObjectFactory& rDocumentFactory = GetObjectShell()->GetFactory();
- const ::rtl::OUString sDefaultViewName = rDocumentFactory.GetViewFactory( 0 ).GetViewName();
+ const ::rtl::OUString sDefaultViewName = rDocumentFactory.GetViewFactory( 0 ).GetAPIViewName();
aGuard.clear();
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index ed158ce009e3..df252b831803 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -650,7 +650,7 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA
// ensure the ID of the to-be-created view is in the descriptor, if possible
const sal_Int16 nViewId = impl_determineEffectiveViewId_nothrow( *xDoc, aDescriptor );
const sal_Int16 nViewNo = xDoc->GetFactory().GetViewNo_Impl( nViewId, 0 );
- const ::rtl::OUString sViewName( xDoc->GetFactory().GetViewFactory( nViewNo ).GetViewName() );
+ const ::rtl::OUString sViewName( xDoc->GetFactory().GetViewFactory( nViewNo ).GetAPIViewName() );
// if the document is created hidden, prevent it from being deleted until it is shown or disposed
impl_lockHiddenDocument( *xDoc, aDescriptor );
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index f5c24b195af7..cda5fd0bdd7d 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -118,6 +118,7 @@ using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::RuntimeException;
using ::com::sun::star::uno::UNO_QUERY_THROW;
+using ::com::sun::star::uno::UNO_SET_THROW;
using ::com::sun::star::lang::DisposedException;
using ::com::sun::star::awt::XWindow;
using ::com::sun::star::frame::XController;
@@ -579,7 +580,7 @@ Reference< XWindow > SAL_CALL SfxBaseController::getComponentWindow() throw (Run
::rtl::OUString sViewName;
if ( nViewNo < rDocFac.GetViewFactoryCount() )
- sViewName = rDocFac.GetViewFactory( nViewNo ).GetViewName();
+ sViewName = rDocFac.GetViewFactory( nViewNo ).GetAPIViewName();
return sViewName;
}
@@ -1421,20 +1422,52 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
// if so, forward it to the view/shell.
if ( !bHasPluginMode && !bHasJumpMark )
{
+ // Note that this might not be the ideal place here. Restoring view data should, IMO, be the
+ // responsibility of the loader, not an implementation detail burried here deep within the controller's
+ // implementation.
+ // What I think should be done to replace the below code:
+ // - change SfxBaseController::restoreViewData to also accept a PropertyValue[] (it currently accepts
+ // a string only), and forward it to its ViewShell's ReadUserDataSequence
+ // - change the frame loader so that when a new document is loaded (as opposed to an existing
+ // document being loaded into a new frame), the model's view data is examine the very same
+ // way as below, and the proper view data is set via XController::restoreViewData
+ // - extend SfxViewFrame::SwitchToViewShell_Impl. Currently, it cares for the case where a non-PrintPreview
+ // view is exchanged, and sets the old view's data at the model. It should also care for the other
+ // way, were the PrintPreview view is left: in this case, the new view should also be initialized
+ // with the model's view data
try
{
- Reference< XViewDataSupplier > xViewDataSupplier( getModel(), UNO_QUERY );
- Reference< XIndexAccess > xViewData;
- if ( xViewDataSupplier.is() )
- xViewData = xViewDataSupplier->getViewData();
- if ( xViewData.is() && xViewData->getCount() > 0 )
+ Reference< XViewDataSupplier > xViewDataSupplier( getModel(), UNO_QUERY_THROW );
+ Reference< XIndexAccess > xViewData( xViewDataSupplier->getViewData(), UNO_SET_THROW );
+
+ // find the view data item whose ViewId matches the ID of the view we're just connecting to
+ const SfxObjectFactory& rDocFactory( rDoc.GetFactory() );
+ const sal_Int32 nCount = xViewData->getCount();
+ sal_Int32 nViewDataIndex = 0;
+ for ( sal_Int32 i=0; i<nCount; ++i )
{
- Sequence< PropertyValue > aViewData;
- if ( ( xViewData->getByIndex( 0 ) >>= aViewData ) && ( aViewData.getLength() ) )
+ const ::comphelper::NamedValueCollection aViewData( xViewData->getByIndex(i) );
+ ::rtl::OUString sViewId( aViewData.getOrDefault( "ViewId", ::rtl::OUString() ) );
+ if ( sViewId.getLength() == 0 )
+ continue;
+
+ const SfxViewFactory* pViewFactory = rDocFactory.GetViewFactoryByViewName( sViewId );
+ if ( pViewFactory == NULL )
+ continue;
+
+ if ( pViewFactory->GetOrdinal() == pViewFrame->GetCurViewId() )
{
- m_pData->m_pViewShell->ReadUserDataSequence( aViewData, TRUE );
+ nViewDataIndex = i;
+ break;
}
}
+ if ( nViewDataIndex < nCount )
+ {
+ Sequence< PropertyValue > aViewData;
+ OSL_VERIFY( xViewData->getByIndex( nViewDataIndex ) >>= aViewData );
+ if ( aViewData.getLength() > 0 )
+ m_pData->m_pViewShell->ReadUserDataSequence( aViewData, TRUE );
+ }
}
catch( const Exception& )
{
diff --git a/sfx2/source/view/viewfac.cxx b/sfx2/source/view/viewfac.cxx
index b58bbc2840da..f9469e8a9f88 100644
--- a/sfx2/source/view/viewfac.cxx
+++ b/sfx2/source/view/viewfac.cxx
@@ -49,7 +49,7 @@ void SfxViewFactory::InitFactory()
(*fnInit)();
}
-String SfxViewFactory::GetViewName() const
+String SfxViewFactory::GetLegacyViewName() const
{
::rtl::OUStringBuffer aViewName;
aViewName.appendAscii( "view" );
@@ -57,18 +57,27 @@ String SfxViewFactory::GetViewName() const
return aViewName.makeStringAndClear();
}
+String SfxViewFactory::GetAPIViewName() const
+{
+ if ( m_sViewName.Len() > 0 )
+ return m_sViewName;
+
+ if ( GetOrdinal() == 0 )
+ return String::CreateFromAscii( "Default" );
+
+ return GetLegacyViewName();
+}
+
// CTOR / DTOR -----------------------------------------------------------
SfxViewFactory::SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI,
- USHORT nOrdinal, const ResId& aDescrResId ):
+ USHORT nOrdinal, const sal_Char* asciiViewName ):
fnCreate(fnC),
fnInit(fnI),
nOrd(nOrdinal),
- aDescription(aDescrResId.GetId(), *aDescrResId.GetResMgr())
+ m_sViewName( String::CreateFromAscii( asciiViewName ) )
{
- aDescription.SetRT(aDescrResId.GetRT());
DBG_CTOR(SfxViewFactory, 0);
-// SFX_APP()->RegisterViewFactory_Impl(*this);
}
SfxViewFactory::~SfxViewFactory()
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index dcda416a3d16..6222721d9b83 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -75,6 +75,8 @@
#include <com/sun/star/uri/XVndSunStarScriptUrl.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
+#include <com/sun/star/document/XViewDataSupplier.hpp>
+#include <com/sun/star/container/XIndexContainer.hpp>
#include <rtl/ustrbuf.hxx>
#include <unotools/localfilehelper.hxx>
@@ -96,6 +98,7 @@
#include <comphelper/storagehelper.hxx>
#include <svtools/asynclink.hxx>
#include <svl/sharecontrolfile.hxx>
+#include <framework/framelistanalyzer.hxx>
#include <boost/optional.hpp>
@@ -106,6 +109,8 @@ using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::lang;
using ::com::sun::star::awt::XWindow;
using ::com::sun::star::beans::PropertyValue;
+using ::com::sun::star::document::XViewDataSupplier;
+using ::com::sun::star::container::XIndexContainer;
namespace css = ::com::sun::star;
#ifndef GCC
@@ -2085,7 +2090,25 @@ SfxViewFrame* SfxViewFrame::LoadViewIntoFrame_Impl_NoThrow( const SfxObjectShell
{
::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
Reference < XFrame > xDesktop( aContext.createComponent( "com.sun.star.frame.Desktop" ), UNO_QUERY_THROW );
- xFrame.set( xDesktop->findFrame( DEFINE_CONST_UNICODE("_blank"), 0 ), UNO_SET_THROW );
+
+ if ( !i_bHidden )
+ {
+ try
+ {
+ // if there is a backing component, use it
+ Reference< XFramesSupplier > xTaskSupplier( xDesktop , css::uno::UNO_QUERY_THROW );
+ ::framework::FrameListAnalyzer aAnalyzer( xTaskSupplier, Reference< XFrame >(), ::framework::FrameListAnalyzer::E_BACKINGCOMPONENT );
+
+ if ( aAnalyzer.m_xBackingComponent.is() )
+ xFrame = aAnalyzer.m_xBackingComponent;
+ }
+ catch( uno::Exception& )
+ {}
+ }
+
+ if ( !xFrame.is() )
+ xFrame.set( xDesktop->findFrame( DEFINE_CONST_UNICODE("_blank"), 0 ), UNO_SET_THROW );
+
bOwnFrame = true;
}
@@ -2235,6 +2258,72 @@ SfxViewFrame* SfxViewFrame::Get( const Reference< XController>& i_rController, c
//--------------------------------------------------------------------
+void SfxViewFrame::SaveCurrentViewData_Impl( const USHORT i_nNewViewId )
+{
+ SfxViewShell* pCurrentShell = GetViewShell();
+ ENSURE_OR_RETURN_VOID( pCurrentShell != NULL, "SfxViewFrame::SaveCurrentViewData_Impl: no current view shell -> no current view data!" );
+
+ // determine the logical (API) view name
+ const SfxObjectFactory& rDocFactory( pCurrentShell->GetObjectShell()->GetFactory() );
+ const sal_uInt16 nCurViewNo = rDocFactory.GetViewNo_Impl( GetCurViewId(), 0 );
+ const String sCurrentViewName = rDocFactory.GetViewFactory( nCurViewNo ).GetAPIViewName();
+ const sal_uInt16 nNewViewNo = rDocFactory.GetViewNo_Impl( i_nNewViewId, 0 );
+ const String sNewViewName = rDocFactory.GetViewFactory( nNewViewNo ).GetAPIViewName();
+ if ( ( sCurrentViewName.Len() == 0 ) || ( sNewViewName.Len() == 0 ) )
+ {
+ // can't say anything about the view, the respective application did not yet migrate its code to
+ // named view factories => bail out
+ OSL_ENSURE( false, "SfxViewFrame::SaveCurrentViewData_Impl: views without API names? Shouldn't happen anymore?" );
+ return;
+ }
+ OSL_ENSURE( !sNewViewName.Equals( sCurrentViewName ), "SfxViewFrame::SaveCurrentViewData_Impl: suspicious: new and old view name are identical!" );
+
+ // save the view data only when we're moving from a non-print-preview to the print-preview view
+ if ( !sNewViewName.EqualsAscii( "PrintPreview" ) )
+ return;
+
+ // retrieve the view data from the view
+ Sequence< PropertyValue > aViewData;
+ pCurrentShell->WriteUserDataSequence( aViewData );
+
+ try
+ {
+ // retrieve view data (for *all* views) from the model
+ const Reference< XController > xController( pCurrentShell->GetController(), UNO_SET_THROW );
+ const Reference< XViewDataSupplier > xViewDataSupplier( xController->getModel(), UNO_QUERY_THROW );
+ const Reference< XIndexContainer > xViewData( xViewDataSupplier->getViewData(), UNO_QUERY_THROW );
+
+ // look up the one view data item which corresponds to our current view, and remove it
+ const sal_Int32 nCount = xViewData->getCount();
+ for ( sal_Int32 i=0; i<nCount; ++i )
+ {
+ const ::comphelper::NamedValueCollection aCurViewData( xViewData->getByIndex(i) );
+ ::rtl::OUString sViewId( aCurViewData.getOrDefault( "ViewId", ::rtl::OUString() ) );
+ if ( sViewId.getLength() == 0 )
+ continue;
+
+ const SfxViewFactory* pViewFactory = rDocFactory.GetViewFactoryByViewName( sViewId );
+ if ( pViewFactory == NULL )
+ continue;
+
+ if ( pViewFactory->GetOrdinal() == GetCurViewId() )
+ {
+ xViewData->removeByIndex(i);
+ break;
+ }
+ }
+
+ // then replace it with the most recent view data we just obtained
+ xViewData->insertByIndex( 0, makeAny( aViewData ) );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+//--------------------------------------------------------------------
+
sal_Bool SfxViewFrame::SwitchToViewShell_Impl
(
sal_uInt16 nViewIdOrNo, /* > 0
@@ -2297,6 +2386,9 @@ sal_Bool SfxViewFrame::SwitchToViewShell_Impl
SfxObjectFactory& rDocFact = GetObjectShell()->GetFactory();
const USHORT nViewId = ( bIsIndex || !nViewIdOrNo ) ? rDocFact.GetViewFactory( nViewIdOrNo ).GetOrdinal() : nViewIdOrNo;
+ // save the view data of the old view, so it can be restored later on (when needed)
+ SaveCurrentViewData_Impl( nViewId );
+
// create and load new ViewShell
SfxViewShell* pNewSh = LoadViewIntoFrame_Impl(
*GetObjectShell(),
diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index 987d7fbb5bea..bff6e870f2e9 100644
--- a/solenv/bin/build.pl
+++ b/solenv/bin/build.pl
@@ -670,7 +670,9 @@ sub build_all {
prepare_build_from_with_branches(\%global_deps_hash, \%reversed_full_deps_hash);
}
if ($build_all_cont || $build_since) {
+ store_weights(\%global_deps_hash);
prepare_build_all_cont(\%global_deps_hash);
+ %weights_hash = ();
};
if ($generate_config) {
%add_to_config = %global_deps_hash;
@@ -1322,7 +1324,10 @@ sub find_indep_prj {
$Dependencies = shift;
if (scalar keys %$Dependencies) {
foreach my $job (keys %$Dependencies) {
- push(@candidates, $job) if (!scalar keys %{$$Dependencies{$job}});
+ if (!scalar keys %{$$Dependencies{$job}}) {
+ push(@candidates, $job);
+ last if (!$processes_to_run);
+ };
};
if (scalar @candidates) {
$all_dependent = 0;
diff --git a/solenv/bin/deliver.pl b/solenv/bin/deliver.pl
index ab91ae34c01f..5c604d27b309 100755
--- a/solenv/bin/deliver.pl
+++ b/solenv/bin/deliver.pl
@@ -43,7 +43,7 @@ use File::Spec;
( $script_name = $0 ) =~ s/^.*\b(\w+)\.pl$/$1/;
-$id_str = ' $Revision$ ';
+$id_str = ' $Revision: 275594 $ ';
$id_str =~ /Revision:\s+(\S+)\s+\$/
? ($script_rev = $1) : ($script_rev = "-");
@@ -404,6 +404,8 @@ sub parse_options
{
my $arg;
my $dontdeletecommon = 0;
+ $opt_silent = 1 if ( defined $ENV{VERBOSE} && $ENV{VERBOSE} eq 'FALSE');
+ $opt_verbose = 1 if ( defined $ENV{VERBOSE} && $ENV{VERBOSE} eq 'TRUE');
while ( $arg = shift @ARGV ) {
$arg =~ /^-force$/ and $opt_force = 1 and next;
$arg =~ /^-check$/ and $opt_check = 1 and $opt_verbose = 1 and next;
@@ -423,15 +425,13 @@ sub parse_options
}
$dest = $arg;
}
- $opt_silent = 1 if ( !defined $ENV{VERBOSE} || (defined $ENV{VERBOSE} && $ENV{VERBOSE} eq 'FALSE')) && ( ! $opt_verbose );
- $opt_verbose = 1 if ( defined $ENV{VERBOSE} && $ENV{VERBOSE} eq 'TRUE') && ( ! $opt_silent );
# $dest and $opt_zip or $opt_delete are mutually exclusive
if ( $dest and ($opt_zip || $opt_delete) ) {
usage(1);
}
# $opt_silent and $opt_check or $opt_verbose are mutually exclusive
if ( ($opt_check or $opt_verbose) and $opt_silent ) {
- print STDERR "Error on command line: options '-check'/'-verbose' and '-quiet' are mutually exclusive.\n";
+ print STDERR "Error on command line: options '-check' and '-quiet' are mutually exclusive.\n";
usage(1);
}
if ($dontdeletecommon) {
@@ -679,6 +679,12 @@ sub glob_line
}
else {
# no globbing but renaming possible
+ # #i89066#
+ if (-d $to && -f $from) {
+ my $filename = File::Basename::basename($from);
+ $to .= '/' if ($to !~ /[\\|\/]$/);
+ $to .= $filename;
+ };
push(@globbed_files, [$from, $to]);
}
if ( $opt_checkdlst ) {
diff --git a/solenv/bin/modules/RepositoryHelper.pm b/solenv/bin/modules/RepositoryHelper.pm
index 7677376be70e..8ea7996f6bc6 100644
--- a/solenv/bin/modules/RepositoryHelper.pm
+++ b/solenv/bin/modules/RepositoryHelper.pm
@@ -118,21 +118,26 @@ sub search_for_hg {
sub search_via_build_lst {
my $self = shift;
- my @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names
+# my @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names
+ my @possible_build_lists = ('build.lst'); # build lists names
my $previous_dir = '';
my $rep_root_candidate = $self->{INITIAL_DIRECTORY};
do {
- foreach (@possible_build_lists) {# ('build.lst', 'build.xlist');
- if (-e $rep_root_candidate . '/prj/'.$_) {
+ foreach (@possible_build_lists) {
+ my $test_file;
+ if ($rep_root_candidate eq '/') {
+ $test_file = '/prj/' . $_;
+ } else {
+ $test_file = $rep_root_candidate . '/prj/' . $_;
+ };
+ if (-e $test_file) {
$self->{REPOSITORY_ROOT} = File::Basename::dirname($rep_root_candidate);
return 1;
- } elsif ($rep_root_candidate eq $previous_dir) {
- return 0;
};
};
$previous_dir = $rep_root_candidate;
$rep_root_candidate = File::Basename::dirname(Cwd::realpath($rep_root_candidate));
- return 0 if (!$rep_root_candidate);
+ return 0 if ((!$rep_root_candidate) || ($rep_root_candidate eq $previous_dir));
}
while (chdir "$rep_root_candidate");
};
diff --git a/solenv/bin/transform_description.pl b/solenv/bin/transform_description.pl
index 0d6ab34583b3..87dcb21deb53 100644
--- a/solenv/bin/transform_description.pl
+++ b/solenv/bin/transform_description.pl
@@ -55,9 +55,9 @@ sub parse_args
# check which languages to use
my $languages = $ENV{WITH_LANG};
- if ( ! defined $languages )
+ if ( ( ! defined $languages ) || ( "$languages" eq "" ) )
{
- print STDERR "$0: WITH_LANG not set, defaulting to 'en-US'\n";
+ print STDERR "$0: WITH_LANG not set or empty, defaulting to 'en-US'\n";
$languages = "en-US";
}
@languages = split ( ' ', $languages );
diff --git a/solenv/inc/extension_helplink.mk b/solenv/inc/extension_helplink.mk
new file mode 100644
index 000000000000..e375696bda18
--- /dev/null
+++ b/solenv/inc/extension_helplink.mk
@@ -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.
+#
+#*************************************************************************
+
+my_cp:=$(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/juh.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/parser.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/unoil.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/ridl.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/jurt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/xmlsearch.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/LuceneHelpWrapper.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/HelpIndexerTool.jar$
+
+.IF "$(SYSTEM_LUCENE)" == "YES"
+my_cp!:=$(my_cp)$(PATH_SEPERATOR)$(LUCENE_CORE_JAR)$(PATH_SEPERATOR)$(LUCENE_ANALYZERS_JAR)
+.ELSE
+my_cp!:=$(my_cp)$(PATH_SEPERATOR)$(SOLARBINDIR)/lucene-core-2.3.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/lucene-analyzers-2.3.jar
+.ENDIF
+
+.IF "$(SYSTEM_DB)" != "YES"
+JAVA_LIBRARY_PATH= -Djava.library.path=$(SOLARSHAREDBIN)
+.ENDIF
+
+#aux_alllangiso*:=$(foreach,i,$(alllangiso) $(foreach,j,$(aux_langdirs) $(eq,$i,$j $i $(NULL))))
+aux_alllangiso*:=$(alllangiso)
+
+#########################################################
+
+
+HELPLINKALLTARGETS=$(foreach,i,$(aux_alllangiso) $(MISC)/$(TARGET)_$(LINKNAME)_$i.done)
+HELPLINKALLADDEDDEPS=$(foreach,i,$(aux_alllangiso) $(subst,LANGUAGE,$i $(LINKADDEDDPES)))
+
+ALLTAR : $(HELPLINKALLTARGETS)
+
+.IF "$(SYSTEM_DB)" != "YES"
+JAVA_LIBRARY_PATH= -Djava.library.path=$(SOLARSHAREDBIN)
+.ENDIF
+
+XSL_DIR*:=$(SOLARBINDIR)
+XHPLINKSRC*:=$(XHPDEST)
+STY_SWITCH:= -sty $(XSL_DIR)/embed.xsl
+
+.IF "$(XHPFILES)"!="" && "$(HELP_OUT)"!=""
+$(foreach,i,$(LINKLINKFILES) $(XHPLINKSRC)/{$(aux_alllangiso)}/$i) : $(HELP_OUT)/$(TARGET).done
+LINKDEPS+=$(HELP_OUT)/xhp_changed.flag
+.ENDIF # "$(XHPFILES)"!="" && "$(HELP_OUT)"!=""
+
+$(HELPLINKALLTARGETS) : $(foreach,i,$(LINKLINKFILES) $(XHPLINKSRC)/$$(@:b:s/_/./:e:s/.//)/$i) $(subst,LANGUAGE,$$(@:b:s/_/./:e:s/.//) $(LINKDEPS))
+ @echo Building help index for $(@:b:s/_/./:e:s/.//)
+ $(COMMAND_ECHO)$(HELPLINKER) -mod $(LINKNAME) -extlangsrc $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} $(STY_SWITCH) -extlangdest $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} -idxcaption $(XSL_DIR)/idxcaption.xsl -idxcontent $(XSL_DIR)/idxcontent.xsl $(LINKLINKFILES)
+ $(COMMAND_ECHO)cd $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} && zip -u -r $(LINKNAME).jar $(PACKAGE)/* $(CHECKZIPRESULT)
+.IF "$(SOLAR_JAVA)" == "TRUE"
+# cleanup index dir
+ -$(RM) $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))}/$(LINKNAME).idxl/*
+.IF "$(CHECK_LUCENCE_INDEXER_OUTPUT)" == ""
+ $(COMMAND_ECHO)$(JAVAI) $(JAVAIFLAGS) $(JAVA_LIBRARY_PATH) -cp "$(my_cp)" com.sun.star.help.HelpIndexerTool -extension -lang $(@:b:s/_/./:e:s/.//) -mod $(LINKNAME) -zipdir $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} && $(TOUCH) $@
+.ELSE
+ $(COMMAND_ECHO)$(JAVAI) $(JAVAIFLAGS) $(JAVA_LIBRARY_PATH) -cp "$(my_cp)" com.sun.star.help.HelpIndexerTool -extension -lang $(@:b:s/_/./:e:s/.//) -mod $(LINKNAME) -zipdir $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} -checkcfsandsegname _0 _3 && $(TOUCH) $@
+.ENDIF
+.ELSE
+ -$(RM) $(XHPLINKSRC)/$(@:b)/content/*.*
+ -$(RM) $(XHPLINKSRC)/$(@:b)/caption/*.*
+.ENDIF
+
diff --git a/solenv/inc/extension_post.mk b/solenv/inc/extension_post.mk
index 47b62d20dd12..f221ff7ebe4a 100644
--- a/solenv/inc/extension_post.mk
+++ b/solenv/inc/extension_post.mk
@@ -39,7 +39,11 @@ fixme4=$(fixme:n)
$(EXTENSIONDIR)/$(COMPONENT_CONFIGDEST)/%.xcu : %.xcu
# ugly hacking to workaround prepended first source path
@@-$(MKDIRHIER) $(subst,$(fixme2),$(MISC) $(@:d))
+.IF "$(COMPONENT_XCU_REPLACEMENT)"!=""
+ $(TYPE) $< | sed '$(COMPONENT_XCU_REPLACEMENT)' > $(subst,$(fixme2),$(MISC) $@)
+.ELSE # "$(COMPONENT_REPLACEMENT)"!=""
$(GNUCOPY) $< $(subst,$(fixme2),$(MISC) $@)
+.ENDIF # "$(COMPONENT_REPLACEMENT)"!=""
$(EXTENSIONDIR)/$(COMPONENT_CONFIGDESTSCHEMA)/%.xcs : %.xcs
@@-$(MKDIRHIER) $(subst,$(fixme4),$(MISC) $(@:d))
diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk
index dccfa1008d68..18cd8b0c92dd 100644
--- a/solenv/inc/minor.mk
+++ b/solenv/inc/minor.mk
@@ -1,5 +1,5 @@
RSCVERSION=300
-RSCREVISION=300m87(Build:9522)
-BUILD=9522
-LAST_MINOR=m87
+RSCREVISION=300m88(Build:9528)
+BUILD=9528
+LAST_MINOR=m88
SOURCEVERSION=DEV300
diff --git a/solenv/inc/tg_help.mk b/solenv/inc/tg_help.mk
index 89f1ebabec6c..cce5b9ee62b2 100755..100644
--- a/solenv/inc/tg_help.mk
+++ b/solenv/inc/tg_help.mk
@@ -31,23 +31,31 @@
aux_alllangiso*:=$(alllangiso)
SHELL_PACKAGE:=$(subst,/,$/ $(PACKAGE))
-HLANGXHPFILES:=$(foreach,i,$(XHPFILES) $(foreach,j,$(aux_alllangiso) $(COMMONMISC)$/$j$/$(SHELL_PACKAGE)$/$(i:f)))
-ALLTAR : $(COMMONMISC)$/$(TARGET).done $(COMMONMISC)$/xhp_changed.flag optix
+.IF "$(XHPDEST)"==""
+XHPDEST*:=$(COMMONMISC)
+HELP_OUT:=$(COMMONMISC)
+.ELSE # "$(XHPDEST)"==""
+HELP_OUT:=$(MISC)
+.ENDIF # "$(XHPDEST)"==""
+
+HLANGXHPFILES*:=$(foreach,i,$(XHPFILES) $(foreach,j,$(aux_alllangiso) $(XHPDEST)$/$j$/$(SHELL_PACKAGE)$/$(i:f)))
+
+ALLTAR : $(HELP_OUT)$/$(TARGET).done $(HELP_OUT)$/xhp_changed.flag optix
$(HLANGXHPFILES) : $$(@:d)thisdir.created
-$(COMMONMISC)$/{$(aux_alllangiso)}$/$(SHELL_PACKAGE)$/%.xhp :| %.xhp
+$(XHPDEST)$/{$(aux_alllangiso)}$/$(SHELL_PACKAGE)$/%.xhp :| %.xhp
@$(TOUCH) $@
# internal dependencies not sufficient to trigger merge?
# @$(NULL)
-$(COMMONMISC)$/$(TARGET).done : $(HLANGXHPFILES)
+$(HELP_OUT)$/$(TARGET).done : $(HLANGXHPFILES)
.IF "$(WITH_LANG)"!=""
- $(AUGMENT_LIBRARY_PATH) $(HELPEX) -p $(PRJNAME) -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(COMMONMISC) -y $(SHELL_PACKAGE) -l all -lf $(aux_alllangiso:t",") -m $(LOCALIZESDF) && $(TOUCH) $@
+ $(AUGMENT_LIBRARY_PATH) $(HELPEX) -p $(PRJNAME) -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(XHPDEST) -y $(SHELL_PACKAGE) -l all -lf $(aux_alllangiso:t",") -m $(LOCALIZESDF) && $(TOUCH) $@
.ELSE # "$(WITH_LANG)"!=""
- cp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES)))) $(COMMONMISC)$/en-US$/$(SHELL_PACKAGE) && $(TOUCH) $@
+ cp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES)))) $(XHPDEST)$/en-US$/$(SHELL_PACKAGE) && $(TOUCH) $@
.ENDIF # "$(WITH_LANG)"!=""
.IF "$(OS)"=="SOLARIS"
@$(ECHONL) " "
@@ -55,24 +63,24 @@ $(COMMONMISC)$/$(TARGET).done : $(HLANGXHPFILES)
@$(ECHONL)
.ENDIF # "$(OS)"=="SOLARIS"
-$(COMMONMISC)$/xhp_changed.flag : $(HLANGXHPFILES)
+$(HELP_OUT)$/xhp_changed.flag : $(HLANGXHPFILES)
@$(TOUCH) $@
# urks - dmake mixes up operators and strings :-(
.IF "$(HLANGXHPFILES:s/defined/xxx/)"!=""
.IF "$(HELPTRANSPHONY)"!=""
-$(COMMONMISC)$/$(TARGET).done .PHONY :
+$(HELP_OUT)$/$(TARGET).done .PHONY :
.ELSE # "$(HELPTRANSPHONY)"!=""
-$(COMMONMISC)$/$(TARGET).done : makefile.mk
+$(HELP_OUT)$/$(TARGET).done : makefile.mk
.IF "$(WITH_LANG)"!=""
-$(COMMONMISC)$/$(TARGET).done : $(LOCALIZESDF)
+$(HELP_OUT)$/$(TARGET).done : $(LOCALIZESDF)
.ENDIF # "$(WITH_LANG)"!=""
.ENDIF # "$(HELPTRANSPHONY)"!=""
.ENDIF # "$(HLANGXHPFILES)"!=""
-optix: $(COMMONMISC)$/$(TARGET).done
+optix: $(HELP_OUT)$/$(TARGET).done
@echo done
%.created :
diff --git a/solenv/inc/tg_xmerge.mk b/solenv/inc/tg_xmerge.mk
index fa3e2297184f..6ff412bb022f 100755
--- a/solenv/inc/tg_xmerge.mk
+++ b/solenv/inc/tg_xmerge.mk
@@ -27,33 +27,32 @@
.IF "$(XTXFILES)"!=""
-ALLTAR : $(MISC)/$(TARGET).xtx.pmerge.mk $(XTXFILES)
+L10NEXT*=.txt
+XTX_TARGET_PATH*=$(MISC)/$(TARGET)
-.IF "$(L10NEXT)"==""
-L10NEXT:=.txt
-.ENDIF
+ALLTAR : $(XTX_TARGET_PATH).xtx.pmerge.mk $(XTXFILES)
-$(MISC)/$(TARGET).xtx.pmerge.mk : $(XTXFILES)
+$(XTX_TARGET_PATH).xtx.pmerge.mk : $(XTXFILES)
$(XTXFILES) : $(LOCALIZESDF)
-.INCLUDE .IGNORE : $(MISC)/$(TARGET).xtx.pmerge.mk
+.INCLUDE .IGNORE : $(XTX_TARGET_PATH).xtx.pmerge.mk
.IF "$(alllangiso)"!="$(last_merge)"
XTXMERGEPHONY:=.PHONY
.ENDIF # "$(alllangiso)" != "$(last_merge)"
-$(MISC)/$(TARGET)/%$(L10NEXT) $(XTXMERGEPHONY) : %.xtx
+$(XTX_TARGET_PATH)/%$(L10NEXT) $(XTXMERGEPHONY) : %.xtx
@@-$(MKDIRHIER) $(@:d)
.IF "$(WITH_LANG)"==""
- $(COMMAND_ECHO)$(COPY) $< $@
+ $(COMMAND_ECHO)$(COPY) $< $(@:d)$(@:b)_en-US$(L10NEXT)
.ELSE # "$(WITH_LANG)"==""
@@-$(RM) $@
$(COMMAND_ECHO)@noop $(assign XTXMERGELIST+:=$(<:f))
$(COMMAND_ECHO)@noop $(assign XTXDESTDIR:=$(@:d))
.ENDIF # "$(WITH_LANG)"==""
-$(MISC)/$(TARGET).xtx.pmerge.mk : $(XTXMERGELIST)
+$(XTX_TARGET_PATH).xtx.pmerge.mk : $(XTXMERGELIST)
.IF "$(WITH_LANG)"!=""
# xtxex command file requirements:
# - one file per line
diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx
index 00dd454233e2..2c18429b9d64 100644
--- a/sot/source/sdstor/stgio.cxx
+++ b/sot/source/sdstor/stgio.cxx
@@ -158,7 +158,7 @@ class EasyFat
public:
EasyFat( StgIo & rIo, StgStrm *pFatStream, INT32 nPSize );
- ~EasyFat() { delete pFat; delete pFree; }
+ ~EasyFat() { delete[] pFat; delete[] pFree; }
INT32 GetPageSize() { return nPageSize; }
INT32 Count() { return nPages; }
INT32 operator[]( INT32 nOffset ) { return pFat[ nOffset ]; }
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index d73ea27a0d45..8d156792e1d3 100644
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -107,7 +107,7 @@
#define RID_READSYMBOLERROR (RID_APP_START + 203)
#define RID_NOMATHTYPEFACEWARNING (RID_APP_START + 204)
#define RID_OBJECTNAME (RID_APP_START + 501)
-#define RID_VIEWNAME (RID_APP_START + 502)
+ // free
#define RID_UNDOEDITNAME (RID_APP_START + 503)
#define RID_UNDOFORMATNAME (RID_APP_START + 504)
#define RID_APPICO (RID_APP_START + 601)
diff --git a/starmath/source/smres.src b/starmath/source/smres.src
index 7d3525bd2a29..c35d77c9afcf 100755
--- a/starmath/source/smres.src
+++ b/starmath/source/smres.src
@@ -1379,10 +1379,6 @@ String RID_OBJECTNAME
{
Text = "SMath3" ;
};
-String RID_VIEWNAME
-{
- Text = "StarMath" ;
-};
String RID_UNDOEDITNAME
{
Text = "Edit" ;
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 0087595703ca..3920c65e941c 100644..100755
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -749,7 +749,7 @@ SFX_IMPL_INTERFACE(SmViewShell, SfxViewShell, SmResId(0))
}
-SFX_IMPL_VIEWFACTORY(SmViewShell, SmResId(RID_VIEWNAME))
+SFX_IMPL_NAMED_VIEWFACTORY(SmViewShell, "Default")
{
SFX_VIEW_REGISTRATION(SmDocShell);
}
diff --git a/svtools/inc/svtools/svtools.hrc b/svtools/inc/svtools/svtools.hrc
index a57a0f5bb0fe..3dd2f0706a2e 100644
--- a/svtools/inc/svtools/svtools.hrc
+++ b/svtools/inc/svtools/svtools.hrc
@@ -38,22 +38,12 @@
//.............................................................................
// various unsorted stuff
-#define DLG_EXPORT_PIX (RID_SVTOOLS_START+1)
-#define DLG_EXPORT_VEC (RID_SVTOOLS_START+2)
#define DLG_TWAIN_SOURCE (RID_SVTOOLS_START+3)
#define DLG_SVT_EXPLORERFILE (RID_SVTOOLS_START+4)
#define DLG_SVT_QUERYFOLDERNAME (RID_SVTOOLS_START+5)
#define DLG_SVT_QUERYDELETE (RID_SVTOOLS_START+6)
-#define EXPORT_DIALOG_TITLE (RID_SVTOOLS_START+4)
-#define KEY_MODE (RID_SVTOOLS_START+5)
-#define KEY_RES (RID_SVTOOLS_START+6)
-#define KEY_SIZE (RID_SVTOOLS_START+7)
-
-#define KEY_COLORS (RID_SVTOOLS_START+9)
-#define KEY_RLE_CODING (RID_SVTOOLS_START+10)
-
#define STR_SVT_AUTOMATIC_COLOR (RID_SVTOOLS_START+16)
#define STR_SVT_FILEVIEW_COLUMN_TITLE (RID_SVTOOLS_START + 20)
@@ -289,17 +279,16 @@
//.............................................................................
// dialogs
-
-#define DLG_EXPORT_JPG_START (RID_SVTOOLS_START+110)
-#define DLG_EXPORT_JPG (RID_SVTOOLS_START+111)
-#define DLG_EXPORT_JPG_END (RID_SVTOOLS_START+112)
+#define DLG_EXPORT_START (STR_ARR_SVT_LANGUAGE_TABLE_END + 1)
+#define DLG_EXPORT (DLG_EXPORT_START)
+#define DLG_EXPORT_TITLE (DLG_EXPORT_START+1)
+#define DLG_EXPORT_END (DLG_EXPORT_TITLE)
#define DLG_LOGIN (RID_SVTOOLS_START+113)
#define DLG_ADDRESSBOOKSOURCE (RID_SVTOOLS_START+114)
#define DLG_REGISTRATION_REQUEST (RID_SVTOOLS_START+115)
-#define DLG_EXPORT_EPNG (RID_SVTOOLS_START+116)
//.............................................................................
// bitmaps
diff --git a/svtools/inc/svtools/svtreebx.hxx b/svtools/inc/svtools/svtreebx.hxx
index a600b91db1c4..787e0956888f 100644
--- a/svtools/inc/svtools/svtreebx.hxx
+++ b/svtools/inc/svtools/svtreebx.hxx
@@ -156,6 +156,7 @@ protected:
virtual void CursorMoved( SvLBoxEntry* pNewCursor );
virtual void PreparePaint( SvLBoxEntry* );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual void StateChanged( StateChangedType nStateChange );
void InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground);
BOOL IsCellFocusEnabled() const;
diff --git a/svtools/inc/svtools/table/tabledatawindow.hxx b/svtools/inc/svtools/table/tabledatawindow.hxx
index 9a6ece489119..829feecd5836 100644
--- a/svtools/inc/svtools/table/tabledatawindow.hxx
+++ b/svtools/inc/svtools/table/tabledatawindow.hxx
@@ -55,7 +55,6 @@ namespace svt { namespace table
Link m_aMouseButtonDownHdl;
Link m_aMouseButtonUpHdl;
Link m_aSelectHdl;
- RowPos m_nRowAlreadySelected;
public:
TableDataWindow( TableControl_Impl& _rTableControl );
inline void SetMouseButtonDownHdl( const Link& rLink ) { m_aMouseButtonDownHdl = rLink; }
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 484584828b9f..35324d551858 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2172,14 +2172,6 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
SelAllDestrAnch( FALSE, TRUE ); // DeselectAll();
SetCursor( pEntry );
- DBG_ERROR( "Please report what you did to get this assertion to FS!" );
- // The entry which has been double-clicked changed - and we select it, again.
- // I have situations where this behaviour does not make any sense at all - even more, it
- // leads to hacks to revert it's results.
- // So I'm not sure if this behaviour here is nonsense (which I believe at the moment),
- // or if there are really scenarious where it dones make sense ....
- // 07.12.2001 - 95727 - fs@openoffice.org
-
return;
}
if( pEntry->HasChilds() || pEntry->HasChildsOnDemand() )
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx
index b11a3f12ddf3..a8635c99d127 100644
--- a/svtools/source/contnr/svtreebx.cxx
+++ b/svtools/source/contnr/svtreebx.cxx
@@ -2516,6 +2516,11 @@ void SvTreeListBox::DataChanged( const DataChangedEvent& rDCEvt )
Control::DataChanged( rDCEvt );
}
+void SvTreeListBox::StateChanged( StateChangedType i_nStateChange )
+{
+ SvLBox::StateChanged( i_nStateChange );
+}
+
void SvTreeListBox::InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground)
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
diff --git a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
index 8ca6ba2b124e..1c4eeeff1bbf 100644
--- a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
+++ b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
@@ -36,9 +36,7 @@
#include <osl/module.hxx>
#include <svl/solar.hrc>
#include <svtools/fltcall.hxx>
-#include "dlgexpor.hxx"
-#include "dlgejpg.hxx"
-#include "dlgepng.hxx"
+#include "exportdialog.hxx"
#include <uno/mapping.hxx>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/document/XViewDataSupplier.hpp>
@@ -49,12 +47,6 @@
#include <unotools/syslocale.hxx>
#include "vcl/svapp.hxx"
-#if (defined OS2 && !defined ICC)
-#define EXPDLG_FUNCTION_NAME "_DoExportDialog"
-#else
-#define EXPDLG_FUNCTION_NAME "DoExportDialog"
-#endif
-
using namespace ::rtl;
using namespace ::com::sun::star;
@@ -93,9 +85,10 @@ uno::Sequence< OUString > SAL_CALL SvFilterOptionsDialog_getSupportedServiceName
// -----------------------------------------------------------------------------
-SvFilterOptionsDialog::SvFilterOptionsDialog( const uno::Reference< lang::XMultiServiceFactory > & xMgr ) :
- rxMgr ( xMgr ),
- eFieldUnit ( FUNIT_CM )
+SvFilterOptionsDialog::SvFilterOptionsDialog( const uno::Reference< lang::XMultiServiceFactory > xMgr ) :
+ mxMgr ( xMgr ),
+ meFieldUnit ( FUNIT_CM ),
+ mbExportSelection ( sal_False )
{
}
@@ -148,18 +141,18 @@ uno::Sequence< beans::PropertyValue > SvFilterOptionsDialog::getPropertyValues()
throw ( uno::RuntimeException )
{
sal_Int32 i, nCount;
- for ( i = 0, nCount = aMediaDescriptor.getLength(); i < nCount; i++ )
+ for ( i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; i++ )
{
- if ( aMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) )
+ if ( maMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) )
break;
}
if ( i == nCount )
- aMediaDescriptor.realloc( ++nCount );
+ maMediaDescriptor.realloc( ++nCount );
// the "FilterData" Property is an Any that will contain our PropertySequence of Values
- aMediaDescriptor[ i ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "FilterData" ) );
- aMediaDescriptor[ i ].Value <<= aFilterDataSequence;
- return aMediaDescriptor;
+ maMediaDescriptor[ i ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "FilterData" ) );
+ maMediaDescriptor[ i ].Value <<= maFilterDataSequence;
+ return maMediaDescriptor;
}
void SvFilterOptionsDialog::setPropertyValues( const uno::Sequence< beans::PropertyValue > & aProps )
@@ -167,15 +160,18 @@ void SvFilterOptionsDialog::setPropertyValues( const uno::Sequence< beans::Prope
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException )
{
- aMediaDescriptor = aProps;
+ maMediaDescriptor = aProps;
sal_Int32 i, nCount;
- for ( i = 0, nCount = aMediaDescriptor.getLength(); i < nCount; i++ )
+ for ( i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; i++ )
{
- if ( aMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) )
+ if ( maMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) )
{
- aMediaDescriptor[ i ].Value >>= aFilterDataSequence;
- break;
+ maMediaDescriptor[ i ].Value >>= maFilterDataSequence;
+ }
+ else if ( maMediaDescriptor[ i ].Name.equalsAscii( "SelectionOnly" ) )
+ {
+ maMediaDescriptor[ i ].Value >>= mbExportSelection;
}
}
}
@@ -184,7 +180,7 @@ void SvFilterOptionsDialog::setPropertyValues( const uno::Sequence< beans::Prope
void SvFilterOptionsDialog::setTitle( const OUString& aTitle )
throw ( uno::RuntimeException )
{
- aDialogTitle = aTitle;
+ maDialogTitle = aTitle;
}
sal_Int16 SvFilterOptionsDialog::execute()
@@ -194,13 +190,13 @@ sal_Int16 SvFilterOptionsDialog::execute()
String aFilterNameStr( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) );
String aInternalFilterName;
- sal_Int32 j, nCount = aMediaDescriptor.getLength();
+ sal_Int32 j, nCount = maMediaDescriptor.getLength();
for ( j = 0; j < nCount; j++ )
{
- if ( aMediaDescriptor[ j ].Name.equals( aFilterNameStr ) )
+ if ( maMediaDescriptor[ j ].Name.equals( aFilterNameStr ) )
{
OUString aStr;
- aMediaDescriptor[ j ].Value >>= aStr;
+ maMediaDescriptor[ j ].Value >>= aStr;
aInternalFilterName = aStr;
aInternalFilterName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "draw_" ) ), String(), 0 );
aInternalFilterName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "impress_" ) ), String(), 0 );
@@ -219,79 +215,24 @@ sal_Int16 SvFilterOptionsDialog::execute()
}
if ( nFormat < nFilterCount )
{
- FltCallDialogParameter aFltCallDlgPara( Application::GetDefDialogParent(), NULL, eFieldUnit );
- aFltCallDlgPara.aFilterData = aFilterDataSequence;
-
- String aFilterName( aGraphicFilter.pConfig->GetExportFilterName( nFormat ) );
- if ( aGraphicFilter.pConfig->IsExportInternalFilter( nFormat ) )
- {
- // Export-Dialog fuer Bitmap's, SVM's und WMF's
- if( ( aFilterName.EqualsIgnoreCaseAscii( EXP_BMP ) ) ||
- ( aFilterName.EqualsIgnoreCaseAscii( EXP_SVMETAFILE ) ) ||
- ( aFilterName.EqualsIgnoreCaseAscii( EXP_WMF ) ) ||
- ( aFilterName.EqualsIgnoreCaseAscii( EXP_EMF ) ) ||
- ( aFilterName.EqualsIgnoreCaseAscii( EXP_JPEG ) )||
- ( aFilterName.EqualsIgnoreCaseAscii( EXP_PNG ) ) )
- {
- ByteString aResMgrName( "svt", 3 );
- ResMgr* pResMgr;
-
- pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
- aFltCallDlgPara.pResMgr = pResMgr;
- // JPEG-Dialog
- if( aFilterName.EqualsIgnoreCaseAscii( EXP_JPEG ) )
- {
- if ( DlgExportEJPG( aFltCallDlgPara ).Execute() == RET_OK )
- nRet = ui::dialogs::ExecutableDialogResults::OK;
- }
- else if ( aFilterName.EqualsIgnoreCaseAscii( EXP_PNG ) )
- {
- if ( DlgExportEPNG( aFltCallDlgPara ).Execute() == RET_OK )
- nRet = ui::dialogs::ExecutableDialogResults::OK;
- }
- else if( aFilterName.EqualsIgnoreCaseAscii( EXP_BMP ) )
- {
- // Fuer Vektorformate nehmen wir den Vektor-Dialog
- aFltCallDlgPara.aFilterExt = aGraphicFilter.pConfig->GetExportFormatShortName( nFormat );
- if ( DlgExportPix( aFltCallDlgPara ).Execute() == RET_OK )
- nRet = ui::dialogs::ExecutableDialogResults::OK;
- }
- else
- {
- aFltCallDlgPara.aFilterExt = aGraphicFilter.pConfig->GetExportFormatShortName( nFormat );
- if ( DlgExportVec( aFltCallDlgPara ).Execute() == RET_OK )
- nRet = ui::dialogs::ExecutableDialogResults::OK;
- }
- delete pResMgr;
- }
- }
- else // ladbare Filter
- {
- xub_StrLen i, nTokenCount = aGraphicFilter.aFilterPath.GetTokenCount( ';' );
- for ( i = 0; i < nTokenCount; i++ )
- {
-
- OUString aPathURL;
-
- ::osl::FileBase::getFileURLFromSystemPath( aGraphicFilter.aFilterPath.GetToken( i ), aPathURL );
- aPathURL += String( '/' );
-
- OUString aSystemPath;
- ::osl::FileBase::getSystemPathFromFileURL( aPathURL, aSystemPath );
- aSystemPath += OUString( aFilterName );
-
- osl::Module aLibrary( aSystemPath );
- PFilterDlgCall pFunc = (PFilterDlgCall) aLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPDLG_FUNCTION_NAME ) );
- // Dialog in DLL ausfuehren
- if( pFunc )
- {
- if ( (*pFunc)( aFltCallDlgPara ) )
- nRet = ui::dialogs::ExecutableDialogResults::OK;
- }
- }
- }
+ FltCallDialogParameter aFltCallDlgPara( Application::GetDefDialogParent(), NULL, meFieldUnit );
+ aFltCallDlgPara.aFilterData = maFilterDataSequence;
+
+ ByteString aResMgrName( "svt", 3 );
+ ResMgr* pResMgr;
+
+ pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
+ aFltCallDlgPara.pResMgr = pResMgr;
+
+ aFltCallDlgPara.aFilterExt = aGraphicFilter.pConfig->GetExportFormatShortName( nFormat );
+ sal_Bool bIsPixelFormat( aGraphicFilter.pConfig->IsExportPixelFormat( nFormat ) );
+ if ( ExportDialog( aFltCallDlgPara, mxMgr, mxSourceDocument, mbExportSelection, bIsPixelFormat ).Execute() == RET_OK )
+ nRet = ui::dialogs::ExecutableDialogResults::OK;
+
+ delete pResMgr;
+
// taking the out parameter from the dialog
- aFilterDataSequence = aFltCallDlgPara.aFilterData;
+ maFilterDataSequence = aFltCallDlgPara.aFilterData;
}
}
return nRet;
@@ -301,6 +242,8 @@ sal_Int16 SvFilterOptionsDialog::execute()
void SvFilterOptionsDialog::setSourceDocument( const uno::Reference< lang::XComponent >& xDoc )
throw ( lang::IllegalArgumentException, uno::RuntimeException )
{
+ mxSourceDocument = xDoc;
+
// try to set the corresponding metric unit
String aConfigPath;
uno::Reference< lang::XServiceInfo > xServiceInfo
@@ -320,7 +263,7 @@ void SvFilterOptionsDialog::setSourceDocument( const uno::Reference< lang::XComp
aPropertyName = String( RTL_CONSTASCII_USTRINGPARAM( "Metric" ) );
else
aPropertyName = String( RTL_CONSTASCII_USTRINGPARAM( "NonMetric" ) );
- eFieldUnit = (FieldUnit)aConfigItem.ReadInt32( aPropertyName, FUNIT_CM );
+ meFieldUnit = (FieldUnit)aConfigItem.ReadInt32( aPropertyName, FUNIT_CM );
}
}
}
diff --git a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx
index a55fc4c84520..16592bac8df7 100644
--- a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx
+++ b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx
@@ -46,18 +46,22 @@ class SvFilterOptionsDialog : public cppu::WeakImplHelper5
com::sun::star::lang::XServiceInfo
>
{
- const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > &
- rxMgr;
+ const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
+ mxMgr;
com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
- aMediaDescriptor;
+ maMediaDescriptor;
com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
- aFilterDataSequence;
- rtl::OUString aDialogTitle;
- FieldUnit eFieldUnit;
+ maFilterDataSequence;
+ com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
+ mxSourceDocument;
+
+ rtl::OUString maDialogTitle;
+ FieldUnit meFieldUnit;
+ sal_Bool mbExportSelection;
public:
- SvFilterOptionsDialog( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB );
+ SvFilterOptionsDialog( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > _rxORB );
~SvFilterOptionsDialog();
// XInterface
diff --git a/svtools/source/filter.vcl/filter/dlgejpg.cxx b/svtools/source/filter.vcl/filter/dlgejpg.cxx
deleted file mode 100644
index 377697023de3..000000000000
--- a/svtools/source/filter.vcl/filter/dlgejpg.cxx
+++ /dev/null
@@ -1,96 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svtools.hxx"
-#include "dlgejpg.hxx"
-#include "dlgejpg.hrc"
-#include "strings.hrc"
-#include <svtools/FilterConfigItem.hxx>
-
-#define KEY_QUALITY "Quality"
-#define KEY_GRAYSCALES "ColorMode"
-
-/*************************************************************************
-|*
-|* Ctor
-|*
-\************************************************************************/
-
-DlgExportEJPG::DlgExportEJPG( FltCallDialogParameter& rPara ) :
- ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_JPG, *rPara.pResMgr ) ),
- rFltCallPara ( rPara ),
- aFiDescr ( this, ResId( FI_DESCR, *rPara.pResMgr ) ),
- aNumFldQuality ( this, ResId( NUM_FLD_QUALITY, *rPara.pResMgr ) ),
- aGrpQuality ( this, ResId( GRP_QUALITY, *rPara.pResMgr ) ),
- aRbGray ( this, ResId( RB_GRAY, *rPara.pResMgr ) ),
- aRbRGB ( this, ResId( RB_RGB, *rPara.pResMgr ) ),
- aGrpColors ( this, ResId( GRP_COLORS, *rPara.pResMgr ) ),
- aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ),
- aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ),
- aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) )
-{
- FreeResource();
- String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/JPG" ) );
- pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData );
-
- // reading filter options
- sal_Int32 nQuality = pConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( KEY_QUALITY ) ), 75 );
- sal_Int32 nColorMode = pConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( KEY_GRAYSCALES ) ), 0 );
- aNumFldQuality.SetValue( nQuality );
-
- if ( nColorMode )
- aRbGray.Check( sal_True );
- else
- aRbRGB.Check( sal_True );
-
- aBtnOK.SetClickHdl( LINK( this, DlgExportEJPG, OK ) );
-}
-
-
-/*************************************************************************
-|*
-|* Speichert eingestellte Werte in ini-Datei
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportEJPG, OK, void *, EMPTYARG )
-{
- // Config-Parameter schreiben
- pConfigItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( KEY_QUALITY ) ), (sal_Int32)aNumFldQuality.GetValue() );
- pConfigItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( KEY_GRAYSCALES ) ), aRbGray.IsChecked() ? 1 : 0 );
- rFltCallPara.aFilterData = pConfigItem->GetFilterData();
- EndDialog( RET_OK );
- return 0;
-}
-
-DlgExportEJPG::~DlgExportEJPG()
-{
- delete pConfigItem;
-}
-
-
diff --git a/svtools/source/filter.vcl/filter/dlgejpg.hrc b/svtools/source/filter.vcl/filter/dlgejpg.hrc
deleted file mode 100644
index 90a3c1d162be..000000000000
--- a/svtools/source/filter.vcl/filter/dlgejpg.hrc
+++ /dev/null
@@ -1,39 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include <svtools/svtools.hrc>
-
-#define BTN_OK 1
-#define BTN_CANCEL 1
-#define BTN_HELP 1
-#define FI_DESCR 1
-#define NUM_FLD_QUALITY 1
-#define GRP_QUALITY 1
-#define GRP_COLORS 2
-#define RB_GRAY 1
-#define RB_RGB 2
-
-
diff --git a/svtools/source/filter.vcl/filter/dlgejpg.hxx b/svtools/source/filter.vcl/filter/dlgejpg.hxx
deleted file mode 100644
index d80682574a54..000000000000
--- a/svtools/source/filter.vcl/filter/dlgejpg.hxx
+++ /dev/null
@@ -1,72 +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 _DLGEJPG_HXX_
-#define _DLGEJPG_HXX_
-
-#include <vcl/dialog.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/field.hxx>
-#include <vcl/lstbox.hxx>
-#include <vcl/msgbox.hxx>
-#include <svtools/stdctrl.hxx>
-#include <svtools/fltcall.hxx>
-
-/*************************************************************************
-|*
-|* Dialog zum Einstellen von Filteroptionen
-|*
-\************************************************************************/
-class FilterConfigItem;
-class DlgExportEJPG : public ModalDialog
-{
-private:
-
- FltCallDialogParameter& rFltCallPara;
-
- FixedInfo aFiDescr;
- NumericField aNumFldQuality;
- FixedLine aGrpQuality;
- RadioButton aRbGray;
- RadioButton aRbRGB;
- FixedLine aGrpColors;
- OKButton aBtnOK;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
- FilterConfigItem* pConfigItem;
-
- DECL_LINK( OK, void * );
-
-public:
- DlgExportEJPG( FltCallDialogParameter& rDlgPara );
- ~DlgExportEJPG();
-};
-
-#endif // _DLGEJPG_HXX_
-
diff --git a/svtools/source/filter.vcl/filter/dlgejpg.src b/svtools/source/filter.vcl/filter/dlgejpg.src
deleted file mode 100644
index fd224f22c409..000000000000
--- a/svtools/source/filter.vcl/filter/dlgejpg.src
+++ /dev/null
@@ -1,136 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "dlgejpg.hrc"
-ModalDialog DLG_EXPORT_JPG
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 159 , 92 ) ;
- Text [ en-US ] = "JPEG Options" ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 103 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 103 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 103 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- FixedLine GRP_QUALITY
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 90 , 8 ) ;
- Text [ en-US ] = "Quality" ;
- };
- FixedText FI_DESCR
- {
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 81 , 16 ) ;
- Text [ en-US ] = "1: min. quality\n100: max. quality" ;
- };
- NumericField NUM_FLD_QUALITY
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 33 ) ;
- Size = MAP_APPFONT ( 50 , 12 ) ;
- TabStop = TRUE ;
- Spin = TRUE ;
- Minimum = 1;
- Maximum = 100 ;
- StrictFormat = TRUE ;
- Last = 100 ;
- Repeat = TRUE ;
- };
- FixedLine GRP_COLORS
- {
- Pos = MAP_APPFONT ( 6 , 51 ) ;
- Size = MAP_APPFONT ( 90 , 8 ) ;
- Text [ en-US ] = "Color resolution" ;
- };
- RadioButton RB_GRAY
- {
- Pos = MAP_APPFONT ( 12 , 62 ) ;
- Size = MAP_APPFONT ( 81 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Grayscale" ;
- };
- RadioButton RB_RGB
- {
- Pos = MAP_APPFONT ( 12 , 76 ) ;
- Size = MAP_APPFONT ( 81 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "True Colors" ;
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/svtools/source/filter.vcl/filter/dlgepng.cxx b/svtools/source/filter.vcl/filter/dlgepng.cxx
deleted file mode 100644
index bd551e9a4bda..000000000000
--- a/svtools/source/filter.vcl/filter/dlgepng.cxx
+++ /dev/null
@@ -1,90 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svtools.hxx"
-#include <tools/ref.hxx>
-#include <vcl/msgbox.hxx>
-#include "dlgepng.hxx"
-#include "dlgepng.hrc"
-
-using namespace ::rtl;
-using namespace ::com::sun::star::uno;
-
-/*************************************************************************
-|*
-|* Ctor
-|*
-\************************************************************************/
-
-DlgExportEPNG::DlgExportEPNG( FltCallDialogParameter& rPara ) :
- ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_EPNG, *rPara.pResMgr ) ),
- FilterConfigItem ( OUString( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/PNG" ) ), &rPara.aFilterData ),
- rFltCallPara ( rPara ),
- aGrpCompression ( this, ResId( GRP_COMPRESSION, *rPara.pResMgr ) ),
- aFiCompression ( this, ResId( FI_COMPRESSION, *rPara.pResMgr ) ),
- aNumCompression ( this, ResId( NUM_COMPRESSION, *rPara.pResMgr ) ),
- aCbxInterlaced ( this, ResId( CBX_INTERLACED, *rPara.pResMgr ) ),
- aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ),
- aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ),
- aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ),
- pMgr ( rPara.pResMgr )
-{
- FreeResource();
-
- // Config-Parameter lesen
- sal_Int32 nCompression = ReadInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "Compression" ) ), 6 );
- if ( ( nCompression < 0 ) || ( nCompression > 9 ) )
- nCompression = 6;
- aNumCompression.SetValue( nCompression );
-
- sal_Int32 nInterlaced = ReadInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), 0 );
- sal_Bool bInterlaced = nInterlaced != 0;
- aCbxInterlaced.Check( bInterlaced );
-
- aBtnOK.SetClickHdl( LINK( this, DlgExportEPNG, OK ) );
-}
-
-/*************************************************************************
-|*
-|* Speichert eingestellte Werte in ini-Datei
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportEPNG, OK, void *, EMPTYARG )
-{
- // Config-Parameter schreiben
- WriteInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "Compression" ) ), static_cast<sal_Int32>(aNumCompression.GetValue()) );
- sal_Int32 nInterlace = 0;
- if ( aCbxInterlaced.IsChecked() )
- nInterlace++;
- WriteInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), nInterlace );
- rFltCallPara.aFilterData = GetFilterData();
- EndDialog( RET_OK );
-
- return 0;
-}
diff --git a/svtools/source/filter.vcl/filter/dlgepng.hrc b/svtools/source/filter.vcl/filter/dlgepng.hrc
deleted file mode 100644
index b3ffaab3ab1e..000000000000
--- a/svtools/source/filter.vcl/filter/dlgepng.hrc
+++ /dev/null
@@ -1,35 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include <svtools/svtools.hrc>
-
-#define BTN_OK 1
-#define BTN_CANCEL 1
-#define BTN_HELP 1
-#define GRP_COMPRESSION 1
-#define FI_COMPRESSION 1
-#define NUM_COMPRESSION 1
-#define CBX_INTERLACED 1
diff --git a/svtools/source/filter.vcl/filter/dlgepng.hxx b/svtools/source/filter.vcl/filter/dlgepng.hxx
deleted file mode 100644
index 469985afee59..000000000000
--- a/svtools/source/filter.vcl/filter/dlgepng.hxx
+++ /dev/null
@@ -1,71 +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 _DLGEPNG_HXX_
-#define _DLGEPNG_HXX_
-#include <svtools/fltcall.hxx>
-#include <vcl/dialog.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/field.hxx>
-#include <svtools/stdctrl.hxx>
-#include <svtools/FilterConfigItem.hxx>
-
-
-/*************************************************************************
-|*
-|* Dialog zum Einstellen von Filteroptionen
-|*
-\************************************************************************/
-
-class ResMgr;
-
-class DlgExportEPNG : public ModalDialog, FilterConfigItem
-{
-
- private:
-
- FltCallDialogParameter& rFltCallPara;
-
- FixedLine aGrpCompression;
- FixedInfo aFiCompression;
- NumericField aNumCompression;
- CheckBox aCbxInterlaced;
- OKButton aBtnOK;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
- ResMgr* pMgr;
-
- DECL_LINK( OK, void * );
-
- public:
-
- DlgExportEPNG( FltCallDialogParameter& rPara );
-};
-
-#endif // _DLGEPNG_HXX_
diff --git a/svtools/source/filter.vcl/filter/dlgepng.src b/svtools/source/filter.vcl/filter/dlgepng.src
deleted file mode 100644
index aa778842dc48..000000000000
--- a/svtools/source/filter.vcl/filter/dlgepng.src
+++ /dev/null
@@ -1,119 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "dlgepng.hrc"
-ModalDialog DLG_EXPORT_EPNG
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 169 , 64 ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Text [ en-US ] = "PNG Options" ;
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 113 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 113 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 113 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- FixedLine GRP_COMPRESSION
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 100 , 8 ) ;
- Text[ en-US ] = "Mode";
- };
- FixedText FI_COMPRESSION
- {
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 80 , 8 ) ;
- Text[ en-US ] = "~Compression 0..9";
- };
- NumericField NUM_COMPRESSION
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 25 ) ;
- Size = MAP_APPFONT ( 40 , 12 ) ;
- TabStop = TRUE ;
- Spin = TRUE ;
- Minimum = 0 ;
- Maximum = 9 ;
- First = 0 ;
- Last = 9 ;
- StrictFormat = TRUE ;
- Repeat = TRUE ;
- };
- CheckBox CBX_INTERLACED
- {
- Pos = MAP_APPFONT ( 12 , 43 ) ;
- Size = MAP_APPFONT ( 80 , 12 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Interlaced" ;
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/svtools/source/filter.vcl/filter/dlgexpor.cxx b/svtools/source/filter.vcl/filter/dlgexpor.cxx
deleted file mode 100644
index b4b7c0fc949d..000000000000
--- a/svtools/source/filter.vcl/filter/dlgexpor.cxx
+++ /dev/null
@@ -1,442 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svtools.hxx"
-
-#ifndef GCC
-# pragma hdrstop
-#endif
-
-#include <tools/ref.hxx>
-#include <svtools/FilterConfigItem.hxx>
-#include <com/sun/star/awt/Size.hpp>
-#include <vcl/msgbox.hxx>
-#include "dlgexpor.hxx"
-#include "dlgexpor.hrc"
-#include "strings.hrc"
-
-/*************************************************************************
-|*
-|* Ctor
-|*
-\************************************************************************/
-
-DlgExportPix::DlgExportPix( FltCallDialogParameter& rPara ) :
- ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_PIX, *rPara.pResMgr ) ),
- rFltCallPara ( rPara ),
- aBtnOK ( this, ResId( BTN_OK_PIX, *rPara.pResMgr ) ),
- aBtnCancel ( this, ResId( BTN_CANCEL_PIX, *rPara.pResMgr ) ),
- aBtnHelp ( this, ResId( BTN_HELP_PIX, *rPara.pResMgr ) ),
- aLbColors ( this, ResId( LB_COLORS, *rPara.pResMgr ) ),
- aCbxRLE ( this, ResId( CBX_RLE, *rPara.pResMgr ) ),
- aGrpColors ( this, ResId( GRP_COLORS, *rPara.pResMgr ) ),
- aRbOriginal ( this, ResId( RB_ORIGINAL_PIX, *rPara.pResMgr ) ),
- aRbRes ( this, ResId( RB_RES_PIX, *rPara.pResMgr ) ),
- aRbSize ( this, ResId( RB_SIZE_PIX, *rPara.pResMgr ) ),
- aFtSizeX ( this, ResId( FT_SIZEX_PIX, *rPara.pResMgr ) ),
- aMtfSizeX ( this, ResId( MTF_SIZEX_PIX, *rPara.pResMgr ) ),
- aFtSizeY ( this, ResId( FT_SIZEY_PIX, *rPara.pResMgr ) ),
- aMtfSizeY ( this, ResId( MTF_SIZEY_PIX, *rPara.pResMgr ) ),
- aGrpMode ( this, ResId( GRP_MODE_PIX, *rPara.pResMgr ) ),
- aCbbRes ( this, ResId( CBB_RES_PIX, *rPara.pResMgr ) ),
- pMgr ( rPara.pResMgr ),
- aExt ( rPara.aFilterExt )
-{
- aExt.ToUpperAscii();
- String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/" ) );
- aFilterConfigPath.Append( aExt );
- pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData );
-
- String aTitle( aExt );
- FreeResource();
-
- aBtnOK.SetClickHdl( LINK( this, DlgExportPix, OK ) );
- aRbOriginal.SetClickHdl( LINK( this, DlgExportPix, ClickRbOriginal ) );
- aRbRes.SetClickHdl( LINK( this, DlgExportPix, ClickRbRes ) );
- aRbSize.SetClickHdl( LINK( this, DlgExportPix, ClickRbSize ) );
- aLbColors.SetSelectHdl( LINK( this, DlgExportPix, SelectLbColors ) );
-
- aTitle.ToUpperAscii();
- aTitle += String( ResId( EXPORT_DIALOG_TITLE, *pMgr ) );
- SetText( aTitle );
-
- // Config-Parameter lesen
- sal_Int32 nColors = pConfigItem->ReadInt32( String( ResId( KEY_COLORS, *pMgr ) ), 0 );
- sal_Int32 nMode = pConfigItem->ReadInt32( String( ResId( KEY_MODE, *pMgr ) ), 0 );
- sal_Int32 nRes = pConfigItem->ReadInt32( String( ResId( KEY_RES, *pMgr ) ), 75 );
- sal_Bool bRleCoding = pConfigItem->ReadBool( String( ResId( KEY_RLE_CODING, *pMgr ) ), sal_True );
-
- aLbColors.SelectEntryPos( Min( (sal_uInt16) 7, (sal_uInt16)nColors ) );
-
- String aStrRes( String::CreateFromInt32( nRes ) );
- aStrRes.Append( String( RTL_CONSTASCII_USTRINGPARAM( " DPI" ) ) );
- aCbbRes.SetText( aStrRes );
-
- ::com::sun::star::awt::Size aDefault( 10000, 10000 );
- ::com::sun::star::awt::Size aSize;
- aSize = pConfigItem->ReadSize( String( ResId( KEY_SIZE, *pMgr ) ), aDefault );
-
- aCbxRLE.Check( bRleCoding );
-
- aMtfSizeX.SetDefaultUnit( FUNIT_MM );
- aMtfSizeY.SetDefaultUnit( FUNIT_MM );
-
- aMtfSizeX.SetValue( aSize.Width );
- aMtfSizeY.SetValue( aSize.Height );
-
- switch ( rPara.eFieldUnit )
- {
-// case FUNIT_NONE :
-// case FUNIT_KM :
-// case FUNIT_PERCENT :
-// case FUNIT_CUSTOM :
-// case FUNIT_MILE :
-// case FUNIT_FOOT :
-// case FUNIT_M :
- case FUNIT_MM :
- case FUNIT_CM :
- case FUNIT_TWIP :
- case FUNIT_POINT :
- case FUNIT_PICA :
- case FUNIT_INCH :
- case FUNIT_100TH_MM :
- {
- aMtfSizeX.SetUnit( rPara.eFieldUnit );
- aMtfSizeY.SetUnit( rPara.eFieldUnit );
- }
- break;
-
- default:
- break; // -Wall multiple values not handled.
- }
-
- switch ( nMode )
- {
- case 2 :
- {
- aRbSize.Check( TRUE );
- ClickRbSize( NULL );
- }
- break;
- case 1 :
- {
- aRbRes.Check( TRUE );
- ClickRbRes( NULL );
- }
- break;
- default :
- {
- aRbOriginal.Check( TRUE );
- ClickRbOriginal( NULL );
- }
- break;
- }
- SelectLbColors( &aLbColors );
-}
-
-DlgExportPix::~DlgExportPix()
-{
- delete pConfigItem;
-}
-
-
-/*************************************************************************
-|*
-|* Speichert eingestellte Werte in ini-Datei
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportPix, OK, void *, EMPTYARG )
-{
- // Config-Parameter schreiben
-
- sal_Int32 nRes = Max( Min( aCbbRes.GetText().ToInt32(), sal_Int32( 600 ) ), sal_Int32( 75 ) );
- ::com::sun::star::awt::Size aSize(
- static_cast<long>(MetricField::ConvertDoubleValue( static_cast<double>(aMtfSizeX.GetValue()), 2, aMtfSizeX.GetUnit(), MAP_100TH_MM )),
- static_cast<long>(MetricField::ConvertDoubleValue( static_cast<double>(aMtfSizeY.GetValue()), 2, aMtfSizeY.GetUnit(), MAP_100TH_MM )) );
-
- sal_Int32 nMode;
- if ( aRbRes.IsChecked() )
- nMode = 1;
- else if ( aRbSize.IsChecked() )
- nMode = 2;
- else
- nMode = 0;
-
- pConfigItem->WriteInt32( String( ResId( KEY_MODE, *pMgr ) ), nMode );
- pConfigItem->WriteInt32( String( ResId( KEY_RES, *pMgr ) ), nRes );
- pConfigItem->WriteSize( String( ResId( KEY_SIZE, *pMgr ) ), aSize );
- pConfigItem->WriteInt32( String( ResId( KEY_COLORS, *pMgr ) ), (sal_Int32)aLbColors.GetSelectEntryPos() );
- pConfigItem->WriteBool( String( ResId( KEY_RLE_CODING, *pMgr ) ), aCbxRLE.IsChecked() );
- rFltCallPara.aFilterData = pConfigItem->GetFilterData();
- EndDialog( RET_OK );
-
- return 0;
-}
-
-/*************************************************************************
-|*
-|* Enabled/Disabled Controls
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportPix, ClickRbOriginal, void*, EMPTYARG )
-{
- aCbbRes.Disable();
-
- aFtSizeX.Disable();
- aMtfSizeX.Disable();
- aFtSizeY.Disable();
- aMtfSizeY.Disable();
-
- return 0;
-}
-
-
-/*************************************************************************
-|*
-|* Enabled/Disabled Controls
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportPix, ClickRbRes, void*, EMPTYARG )
-{
- aCbbRes.Enable();
-
- aFtSizeX.Disable();
- aMtfSizeX.Disable();
- aFtSizeY.Disable();
- aMtfSizeY.Disable();
-
- return 0;
-}
-
-
-/*************************************************************************
-|*
-|* Enabled/Disabled Controls
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportPix, ClickRbSize, void*, EMPTYARG )
-{
- aFtSizeX.Enable();
- aMtfSizeX.Enable();
- aFtSizeY.Enable();
- aMtfSizeY.Enable();
-
- aCbbRes.Disable();
-
- return 0;
-}
-
-
-/*************************************************************************
-|*
-|* Enabled/Disabled Controls
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportPix, SelectLbColors, void*, EMPTYARG )
-{
- const USHORT nLbPos = aLbColors.GetSelectEntryPos();
-
- if ( ( nLbPos >= 3 ) && ( nLbPos <= 6 ) )
- aCbxRLE.Enable();
- else
- aCbxRLE.Disable();
-
- return 0L;
-}
-
-
-/******************************************************************************/
-
-
-/*************************************************************************
-|*
-|* Ctor
-|*
-\************************************************************************/
-
-DlgExportVec::DlgExportVec( FltCallDialogParameter& rPara ) :
- ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_VEC, *rPara.pResMgr ) ),
- rFltCallPara ( rPara ),
- aBtnOK ( this, ResId( BTN_OK_VEC, *rPara.pResMgr ) ),
- aBtnCancel ( this, ResId( BTN_CANCEL_VEC, *rPara.pResMgr ) ),
- aBtnHelp ( this, ResId( BTN_HELP_VEC, *rPara.pResMgr ) ),
- aRbOriginal ( this, ResId( RB_ORIGINAL_VEC, *rPara.pResMgr ) ),
- aRbSize ( this, ResId( RB_SIZE_VEC, *rPara.pResMgr ) ),
- aGrpMode ( this, ResId( GRP_MODE_VEC, *rPara.pResMgr ) ),
- aFtSizeX ( this, ResId( FT_SIZEX_VEC, *rPara.pResMgr ) ),
- aMtfSizeX ( this, ResId( MTF_SIZEX_VEC, *rPara.pResMgr ) ),
- aFtSizeY ( this, ResId( FT_SIZEY_VEC, *rPara.pResMgr ) ),
- aMtfSizeY ( this, ResId( MTF_SIZEY_VEC, *rPara.pResMgr ) ),
- aGrpSize ( this, ResId( GRP_SIZE_VEC, *rPara.pResMgr ) ),
- pMgr ( rPara.pResMgr ),
- aExt ( rPara.aFilterExt )
-{
- aExt.ToUpperAscii();
- String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/" ) );
- aFilterConfigPath.Append( aExt );
- pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData );
-
- String aTitle( aExt );
- FreeResource();
-
- aBtnOK.SetClickHdl( LINK( this, DlgExportVec, OK ) );
- aRbOriginal.SetClickHdl( LINK( this, DlgExportVec, ClickRbOriginal ) );
- aRbSize.SetClickHdl( LINK( this, DlgExportVec, ClickRbSize ) );
-
- aTitle.ToUpperAscii();
- aTitle += String( ResId( EXPORT_DIALOG_TITLE, *pMgr ) );
- SetText( aTitle );
-
- // reading config-parameter
- sal_Int32 nMode = pConfigItem->ReadInt32( String( ResId( KEY_MODE, *pMgr ) ), 0 );
-
- ::com::sun::star::awt::Size aDefault( 10000, 10000 );
- ::com::sun::star::awt::Size aSize;
- aSize = pConfigItem->ReadSize( String( ResId( KEY_SIZE, *pMgr ) ), aDefault );
-
- aMtfSizeX.SetDefaultUnit( FUNIT_MM );
- aMtfSizeY.SetDefaultUnit( FUNIT_MM );
- aMtfSizeX.SetValue( aSize.Width );
- aMtfSizeY.SetValue( aSize.Height );
-
- switch ( rPara.eFieldUnit )
- {
-// case FUNIT_NONE :
-// case FUNIT_KM :
-// case FUNIT_PERCENT :
-// case FUNIT_CUSTOM :
-// case FUNIT_MILE :
-// case FUNIT_FOOT :
- case FUNIT_MM :
- case FUNIT_CM :
- case FUNIT_M :
- case FUNIT_TWIP :
- case FUNIT_POINT :
- case FUNIT_PICA :
- case FUNIT_INCH :
- case FUNIT_100TH_MM :
- {
- aMtfSizeX.SetUnit( rPara.eFieldUnit );
- aMtfSizeY.SetUnit( rPara.eFieldUnit );
- }
- break;
- default:
- break; // -Wall Multiple values not handled.
- }
-
- switch ( nMode )
- {
- case 1 :
- {
- aRbSize.Check( TRUE );
- ClickRbSize( NULL );
- }
- break;
-
- default :
- {
- aRbOriginal.Check( TRUE );
- ClickRbOriginal( NULL );
- }
- break;
- }
-}
-
-DlgExportVec::~DlgExportVec()
-{
- delete pConfigItem;
-}
-/*************************************************************************
-|*
-|* Speichert eingestellte Werte in ini-Datei
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportVec, OK, void *, EMPTYARG )
-{
- // Config-Parameter schreiben
- ::com::sun::star::awt::Size aSize(
- static_cast<long>(MetricField::ConvertDoubleValue( static_cast<double>(aMtfSizeX.GetValue()), 2, aMtfSizeX.GetUnit(), MAP_100TH_MM )),
- static_cast<long>(MetricField::ConvertDoubleValue( static_cast<double>(aMtfSizeY.GetValue()), 2, aMtfSizeY.GetUnit(), MAP_100TH_MM )) );
-
- sal_Int32 nMode;
- if ( aRbSize.IsChecked() )
- nMode = 1;
- else
- nMode = 0;
-
- pConfigItem->WriteInt32( String( ResId( KEY_MODE, *pMgr ) ), nMode );
- pConfigItem->WriteSize( String( ResId( KEY_SIZE, *pMgr ) ), aSize );
- rFltCallPara.aFilterData = pConfigItem->GetFilterData();
- EndDialog( RET_OK );
-
- return 0;
-}
-
-/*************************************************************************
-|*
-|* Enabled/Disabled Controls
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportVec, ClickRbOriginal, void*, EMPTYARG )
-{
- aGrpSize.Disable();
- aFtSizeX.Disable();
- aMtfSizeX.Disable();
- aFtSizeY.Disable();
- aMtfSizeY.Disable();
-
- return 0;
-}
-
-
-/*************************************************************************
-|*
-|* Enabled/Disabled Controls
-|*
-\************************************************************************/
-
-IMPL_LINK( DlgExportVec, ClickRbSize, void*, EMPTYARG )
-{
- aGrpSize.Enable();
- aFtSizeX.Enable();
- aMtfSizeX.Enable();
- aFtSizeY.Enable();
- aMtfSizeY.Enable();
-
- return 0;
-}
-
-
-
diff --git a/svtools/source/filter.vcl/filter/dlgexpor.hrc b/svtools/source/filter.vcl/filter/dlgexpor.hrc
deleted file mode 100644
index 69870c9b00b0..000000000000
--- a/svtools/source/filter.vcl/filter/dlgexpor.hrc
+++ /dev/null
@@ -1,58 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include <svtools/svtools.hrc>
-
-#define BTN_OK_PIX 1
-#define BTN_CANCEL_PIX 1
-#define BTN_HELP_PIX 1
-#define CBX_RES_PIX 1
-#define CBX_SIZE_PIX 2
-#define CBX_RLE 3
-#define CBB_RES_PIX 1
-#define LB_COLORS 1
-#define MTF_SIZEX_PIX 1
-#define MTF_SIZEY_PIX 2
-#define FT_SIZEX_PIX 1
-#define FT_SIZEY_PIX 2
-#define GRP_MODE_PIX 1
-#define GRP_COLORS 4
-#define RB_ORIGINAL_PIX 1
-#define RB_RES_PIX 2
-#define RB_SIZE_PIX 3
-
-#define BTN_OK_VEC 1
-#define BTN_CANCEL_VEC 1
-#define BTN_HELP_VEC 1
-#define CBX_SIZE_VEC 2
-#define MTF_SIZEX_VEC 1
-#define MTF_SIZEY_VEC 2
-#define FT_SIZEX_VEC 1
-#define FT_SIZEY_VEC 2
-#define GRP_SIZE_VEC 1
-#define GRP_MODE_VEC 2
-#define RB_ORIGINAL_VEC 1
-#define RB_SIZE_VEC 2
diff --git a/svtools/source/filter.vcl/filter/dlgexpor.hxx b/svtools/source/filter.vcl/filter/dlgexpor.hxx
deleted file mode 100644
index 8c7b2d462e70..000000000000
--- a/svtools/source/filter.vcl/filter/dlgexpor.hxx
+++ /dev/null
@@ -1,127 +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 _DLGEXPOR_HXX_
-#define _DLGEXPOR_HXX_
-
-#include <svtools/fltcall.hxx>
-#include <vcl/dialog.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/field.hxx>
-#include <vcl/lstbox.hxx>
-
-/*************************************************************************
-|*
-|* Dialog zum Einstellen von Filteroptionen bei Pixelformaten
-|*
-\************************************************************************/
-
-class FilterConfigItem;
-class DlgExportPix : public ModalDialog
-{
-private:
-
- FltCallDialogParameter& rFltCallPara;
-
- OKButton aBtnOK;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
-
- ListBox aLbColors;
- CheckBox aCbxRLE;
- FixedLine aGrpColors;
-
- RadioButton aRbOriginal;
- RadioButton aRbRes;
- RadioButton aRbSize;
- FixedText aFtSizeX;
- MetricField aMtfSizeX;
- FixedText aFtSizeY;
- MetricField aMtfSizeY;
- FixedLine aGrpMode;
- ComboBox aCbbRes;
-
- FilterConfigItem* pConfigItem;
- ResMgr* pMgr;
-
- String aExt;
-
- DECL_LINK( OK, void* p );
- DECL_LINK( ClickRbOriginal,void* p );
- DECL_LINK( ClickRbRes,void* p );
- DECL_LINK( ClickRbSize,void* p );
- DECL_LINK( SelectLbColors, void* p );
-
-public:
- DlgExportPix( FltCallDialogParameter& rPara );
- ~DlgExportPix();
-};
-
-
-/*************************************************************************
-|*
-|* Dialog zum Einstellen von Filteroptionen bei Vektorformaten
-|*
-\************************************************************************/
-class DlgExportVec : public ModalDialog
-{
-private:
-
- FltCallDialogParameter& rFltCallPara;
-
- OKButton aBtnOK;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
-
- RadioButton aRbOriginal;
- RadioButton aRbSize;
- FixedLine aGrpMode;
-
- FixedText aFtSizeX;
- MetricField aMtfSizeX;
- FixedText aFtSizeY;
- MetricField aMtfSizeY;
- FixedLine aGrpSize;
-
- FilterConfigItem* pConfigItem;
- ResMgr* pMgr;
-
- String aExt;
-
- DECL_LINK( OK, void* p );
- DECL_LINK( ClickRbOriginal,void* p );
- DECL_LINK( ClickRbSize,void* p );
-
-public:
- DlgExportVec( FltCallDialogParameter& rPara );
- ~DlgExportVec();
-};
-
-#endif // _DLGEXPOR_HXX_
-
diff --git a/svtools/source/filter.vcl/filter/dlgexpor.src b/svtools/source/filter.vcl/filter/dlgexpor.src
deleted file mode 100644
index 7573b394d72f..000000000000
--- a/svtools/source/filter.vcl/filter/dlgexpor.src
+++ /dev/null
@@ -1,315 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#include "dlgexpor.hrc"
-
-ModalDialog DLG_EXPORT_PIX
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 178 , 135 ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- FixedLine GRP_COLORS
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 110 , 8 ) ;
- Text [ en-US ] = "Color resolution" ;
- };
- ListBox LB_COLORS
- {
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 98 , 90 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- AutoHScroll = TRUE ;
- StringList [ en-US ] =
- {
- < "Original" ; Default ; > ;
- < "1 Bit - Threshold Value" ; Default ; > ;
- < "1 Bit - Dithering" ; Default ; > ;
- < "4 Bit - Grayscale" ; Default ; > ;
- < "4 Bit - Color Palette" ; Default ; > ;
- < "8 Bit - Grayscales" ; Default ; > ;
- < "8 Bit - Color Palette" ; Default ; > ;
- < "24 Bit - True Colors" ; Default ; > ;
- };
- };
- CheckBox CBX_RLE
- {
- Pos = MAP_APPFONT ( 12 , 31 ) ;
- Size = MAP_APPFONT ( 98 , 12 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "RLE coding" ;
- };
- FixedLine GRP_MODE_PIX
- {
- Pos = MAP_APPFONT ( 6 , 48 ) ;
- Size = MAP_APPFONT ( 110 , 8 ) ;
- Text [ en-US ] = "Mode" ;
- };
- RadioButton RB_ORIGINAL_PIX
- {
- Pos = MAP_APPFONT ( 12 , 59 ) ;
- Size = MAP_APPFONT ( 98 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Original" ;
- };
- RadioButton RB_RES_PIX
- {
- Pos = MAP_APPFONT ( 12 , 73 ) ;
- Size = MAP_APPFONT ( 55 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Resolution" ;
- };
- ComboBox CBB_RES_PIX
- {
- Pos = MAP_APPFONT ( 70 , 73 ) ;
- Size = MAP_APPFONT ( 40 , 50 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- StringList =
- {
- "75 DPI" ;
- "150 DPI" ;
- "300 DPI" ;
- "600 DPI" ;
- };
- };
- RadioButton RB_SIZE_PIX
- {
- Pos = MAP_APPFONT ( 12 , 87 ) ;
- Size = MAP_APPFONT ( 98 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Size" ;
- };
- MetricField MTF_SIZEX_PIX
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 60 , 101 ) ;
- Size = MAP_APPFONT ( 50 , 12 ) ;
- TabStop = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 100 ;
- Maximum = 99999 ;
- StrictFormat = TRUE ;
- DecimalDigits = 2 ;
- Unit = FUNIT_MM ;
- First = 100 ;
- Last = 99999 ;
- SpinSize = 100 ;
- };
- FixedText FT_SIZEX_PIX
- {
- Pos = MAP_APPFONT ( 18 , 102 ) ;
- Size = MAP_APPFONT ( 41 , 10 ) ;
- Text [ en-US ] = "Width" ;
- };
- MetricField MTF_SIZEY_PIX
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 60 , 117 ) ;
- Size = MAP_APPFONT ( 50 , 12 ) ;
- TabStop = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 100 ;
- Maximum = 99999 ;
- StrictFormat = TRUE ;
- DecimalDigits = 2 ;
- Unit = FUNIT_MM ;
- First = 100 ;
- Last = 99999 ;
- SpinSize = 100 ;
- };
- FixedText FT_SIZEY_PIX
- {
- Pos = MAP_APPFONT ( 18 , 118 ) ;
- Size = MAP_APPFONT ( 41 , 10 ) ;
- Text [ en-US ] = "Height" ;
- };
- OKButton BTN_OK_PIX
- {
- Pos = MAP_APPFONT ( 122 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL_PIX
- {
- Pos = MAP_APPFONT ( 122 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP_PIX
- {
- Pos = MAP_APPFONT ( 122 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
-};
-ModalDialog DLG_EXPORT_VEC
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 178 , 89 ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
-
- FixedLine GRP_MODE_VEC
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 110 , 8 ) ;
- Text [ en-US ] = "Mode" ;
- };
- RadioButton RB_ORIGINAL_VEC
- {
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 98 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Original" ;
- };
- RadioButton RB_SIZE_VEC
- {
- Pos = MAP_APPFONT ( 12 , 28 ) ;
- Size = MAP_APPFONT ( 98 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Size" ;
- };
- FixedLine GRP_SIZE_VEC
- {
- Pos = MAP_APPFONT ( 6 , 44 ) ;
- Size = MAP_APPFONT ( 110 , 8 ) ;
- Text [ en-US ] = "Size" ;
- };
- FixedText FT_SIZEX_VEC
- {
- Pos = MAP_APPFONT ( 12 , 56 ) ;
- Size = MAP_APPFONT ( 45 , 10 ) ;
- Text [ en-US ] = "Width" ;
- };
- MetricField MTF_SIZEX_VEC
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 60 , 55 ) ;
- Size = MAP_APPFONT ( 50 , 12 ) ;
- TabStop = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 100 ;
- Maximum = 99999 ;
- StrictFormat = TRUE ;
- DecimalDigits = 2 ;
- Unit = FUNIT_MM ;
- First = 100 ;
- Last = 99999 ;
- SpinSize = 100 ;
- };
- FixedText FT_SIZEY_VEC
- {
- Pos = MAP_APPFONT ( 12 , 72 ) ;
- Size = MAP_APPFONT ( 45 , 10 ) ;
- Text [ en-US ] = "Height" ;
- };
- MetricField MTF_SIZEY_VEC
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 60 , 71 ) ;
- Size = MAP_APPFONT ( 50 , 12 ) ;
- TabStop = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 100 ;
- Maximum = 99999 ;
- StrictFormat = TRUE ;
- DecimalDigits = 2 ;
- Unit = FUNIT_MM ;
- First = 100 ;
- Last = 99999 ;
- SpinSize = 100 ;
- };
- OKButton BTN_OK_VEC
- {
- Pos = MAP_APPFONT ( 122 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL_VEC
- {
- Pos = MAP_APPFONT ( 122 , 24 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP_VEC
- {
- Pos = MAP_APPFONT ( 122 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/svtools/source/filter.vcl/filter/exportdialog.cxx b/svtools/source/filter.vcl/filter/exportdialog.cxx
new file mode 100755
index 000000000000..c04b587b6278
--- /dev/null
+++ b/svtools/source/filter.vcl/filter/exportdialog.cxx
@@ -0,0 +1,1513 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svtools.hxx"
+
+#ifndef GCC
+# pragma hdrstop
+#endif
+
+#include <tools/ref.hxx>
+#include <tools/stream.hxx>
+#include <svtools/filter.hxx>
+#include <svtools/FilterConfigItem.hxx>
+#include <com/sun/star/io/XStream.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/drawing/XDrawView.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/graphic/XPrimitiveFactory2D.hpp>
+#include <com/sun/star/geometry/AffineMatrix2D.hpp>
+#include <com/sun/star/document/XExporter.hpp>
+#include <com/sun/star/document/XFilter.hpp>
+#include <unotools/streamwrap.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/outdev.hxx>
+#include <vcl/graph.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include "exportdialog.hxx"
+#include "exportdialog.hrc"
+
+#define FORMAT_UNKNOWN 0
+#define FORMAT_JPG 1
+#define FORMAT_PNG 2
+#define FORMAT_BMP 3
+#define FORMAT_GIF 4
+#define FORMAT_PBM 5
+#define FORMAT_PGM 6
+#define FORMAT_PPM 7
+#define FORMAT_PCT 8
+#define FORMAT_RAS 9
+#define FORMAT_TIF 10
+#define FORMAT_XPM 11
+#define FORMAT_WMF 12
+#define FORMAT_EMF 13
+#define FORMAT_EPS 14
+#define FORMAT_MET 15
+#define FORMAT_SVG 16
+#define FORMAT_SVM 17
+
+#define UNIT_DEFAULT -1
+#define UNIT_INCH 0
+#define UNIT_CM 1
+#define UNIT_MM 2
+#define UNIT_POINT 3
+#define UNIT_PIXEL 4
+#define UNIT_MAX_ID UNIT_PIXEL
+
+using namespace ::com::sun::star;
+
+static sal_Int16 GetFilterFormat( String& rExt )
+{
+ sal_Int16 nFormat = FORMAT_UNKNOWN;
+ ByteString aExt( rExt, RTL_TEXTENCODING_UTF8 );
+ if ( aExt.Equals( "JPG" ) )
+ nFormat = FORMAT_JPG;
+ else if ( aExt.Equals( "PNG" ) )
+ nFormat = FORMAT_PNG;
+ else if ( aExt.Equals( "BMP" ) )
+ nFormat = FORMAT_BMP;
+ else if ( aExt.Equals( "GIF" ) )
+ nFormat = FORMAT_GIF;
+ else if ( aExt.Equals( "PBM" ) )
+ nFormat = FORMAT_PBM;
+ else if ( aExt.Equals( "PGM" ) )
+ nFormat = FORMAT_PGM;
+ else if ( aExt.Equals( "PPM" ) )
+ nFormat = FORMAT_PPM;
+ else if ( aExt.Equals( "PCT" ) )
+ nFormat = FORMAT_PCT;
+ else if ( aExt.Equals( "RAS" ) )
+ nFormat = FORMAT_RAS;
+ else if ( aExt.Equals( "TIF" ) )
+ nFormat = FORMAT_TIF;
+ else if ( aExt.Equals( "XPM" ) )
+ nFormat = FORMAT_XPM;
+ else if ( aExt.Equals( "WMF" ) )
+ nFormat = FORMAT_WMF;
+ else if ( aExt.Equals( "EMF" ) )
+ nFormat = FORMAT_EMF;
+ else if ( aExt.Equals( "EPS" ) )
+ nFormat = FORMAT_EPS;
+ else if ( aExt.Equals( "MET" ) )
+ nFormat = FORMAT_MET;
+ else if ( aExt.Equals( "SVG" ) )
+ nFormat = FORMAT_SVG;
+ else if ( aExt.Equals( "SVM" ) )
+ nFormat = FORMAT_SVM;
+ return nFormat;
+}
+
+static MapUnit GetMapUnit( sal_Int32 nUnit )
+{
+ MapUnit aMapUnit( MAP_PIXEL );
+ switch( nUnit )
+ {
+ case UNIT_INCH : aMapUnit = MAP_INCH; break;
+ case UNIT_CM : aMapUnit = MAP_CM; break;
+ case UNIT_MM : aMapUnit = MAP_MM; break;
+ case UNIT_POINT : aMapUnit = MAP_POINT; break;
+ case UNIT_PIXEL : aMapUnit = MAP_PIXEL; break;
+ }
+ return aMapUnit;
+}
+
+sal_Int32 ExportDialog::GetDefaultUnit()
+{
+ sal_Int32 nDefaultUnit = UNIT_CM;
+ switch( mrFltCallPara.eFieldUnit )
+ {
+// case FUNIT_NONE :
+// case FUNIT_PERCENT :
+// case FUNIT_CUSTOM :
+ default: nDefaultUnit = UNIT_CM; break;
+
+ case FUNIT_MILE : // PASSTHROUGH INTENDED
+ case FUNIT_FOOT :
+ case FUNIT_TWIP :
+ case FUNIT_PICA : nDefaultUnit = UNIT_INCH; break;
+
+ case FUNIT_KM : // PASSTHROUGH INTENDED
+ case FUNIT_M :
+ case FUNIT_100TH_MM : nDefaultUnit = UNIT_CM; break;
+
+ case FUNIT_INCH : nDefaultUnit = UNIT_INCH; break;
+ case FUNIT_CM : nDefaultUnit = UNIT_CM; break;
+ case FUNIT_MM : nDefaultUnit = UNIT_MM; break;
+ case FUNIT_POINT : nDefaultUnit = UNIT_POINT; break;
+ }
+ return nDefaultUnit;
+}
+
+static basegfx::B2DRange GetShapeRangeForXShape( const uno::Reference< drawing::XShape >& rxShape,
+ const uno::Reference< graphic::XPrimitiveFactory2D >& rxPrimitiveFactory2D, const uno::Sequence< beans::PropertyValue >& rViewInformation )
+{
+ basegfx::B2DRange aShapeRange;
+
+ const uno::Sequence< beans::PropertyValue > aParams;
+ const uno::Sequence< uno::Reference< graphic::XPrimitive2D > > aPrimitiveSequence( rxPrimitiveFactory2D->createPrimitivesFromXShape( rxShape, aParams ) );
+
+ const sal_Int32 nCount = aPrimitiveSequence.getLength();
+ for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
+ {
+ const geometry::RealRectangle2D aRect( aPrimitiveSequence[ nIndex ]->getRange( rViewInformation ) );
+ aShapeRange.expand( basegfx::B2DTuple( aRect.X1, aRect.Y1 ) );
+ aShapeRange.expand( basegfx::B2DTuple( aRect.X2, aRect.Y2 ) );
+ }
+ return aShapeRange;
+}
+
+uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( sal_Bool bUpdateConfig )
+{
+ if ( bUpdateConfig )
+ {
+ sal_Int32 nUnit = maLbSizeX.GetSelectEntryPos();
+ if ( nUnit < 0 )
+ nUnit = UNIT_CM;
+
+ if ( ( mnInitialResolutionUnit == UNIT_DEFAULT ) && ( nUnit == GetDefaultUnit() ) )
+ nUnit = UNIT_DEFAULT;
+
+ // updating ui configuration
+ if ( mbIsPixelFormat )
+ {
+ if ( nUnit > UNIT_MAX_ID )
+ nUnit = UNIT_PIXEL;
+
+ sal_Int32 nResolution = maNfResolution.GetValue();
+ if ( nResolution < 1 )
+ nResolution = 96;
+
+ mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportUnit" ) ), nUnit );
+ mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolution" ) ), nResolution );
+ mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolutionUnit" ) ), maLbResolution.GetSelectEntryPos() );
+ }
+ else
+ {
+ if ( nUnit >= UNIT_PIXEL )
+ nUnit = UNIT_CM;
+
+ mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "VectorExportUnit" ) ), nUnit );
+ }
+ }
+
+ FilterConfigItem* pFilterOptions;
+ if ( bUpdateConfig )
+ pFilterOptions = mpFilterOptionsItem;
+ else
+ {
+ uno::Sequence< beans::PropertyValue > aFilterData( mpFilterOptionsItem->GetFilterData() );
+ pFilterOptions = new FilterConfigItem( &aFilterData );
+ }
+
+ const String sLogicalWidth( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalWidth" ) ) );
+ const String sLogicalHeight( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalHeight" ) ) );
+ if ( mbIsPixelFormat )
+ {
+ pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelWidth" ) ), static_cast< sal_Int32 >( maSize.Width ) );
+ pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelHeight" ) ), static_cast< sal_Int32 >( maSize.Height ) );
+ if ( maResolution.Width && maResolution.Height )
+ {
+ const double f100thmmPerPixelX = 100000.0 / maResolution.Width;
+ const double f100thmmPerPixelY = 100000.0 / maResolution.Height;
+ sal_Int32 nLogicalWidth = static_cast< sal_Int32 >( f100thmmPerPixelX * maSize.Width );
+ sal_Int32 nLogicalHeight= static_cast< sal_Int32 >( f100thmmPerPixelY * maSize.Height );
+ if ( nLogicalWidth && nLogicalHeight )
+ {
+ pFilterOptions->WriteInt32( sLogicalWidth, nLogicalWidth );
+ pFilterOptions->WriteInt32( sLogicalHeight, nLogicalHeight );
+ }
+ }
+ }
+ else
+ {
+ pFilterOptions->WriteInt32( sLogicalWidth, static_cast< sal_Int32 >( maSize.Width ) );
+ pFilterOptions->WriteInt32( sLogicalHeight, static_cast< sal_Int32 >( maSize.Height ) );
+ }
+ switch ( mnFormat )
+ {
+ case FORMAT_JPG :
+ {
+ sal_Int32 nColor = maLbColorDepth.GetSelectEntryPos();
+ if ( nColor == 1 )
+ nColor = 0;
+ else
+ nColor = 1;
+ pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorMode" ) ), nColor );
+ pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Quality" ) ), static_cast< sal_Int32 >( maSbCompression.GetThumbPos() ) );
+ }
+ break;
+
+ case FORMAT_PNG :
+ {
+ pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Compression" ) ), static_cast< sal_Int32 >( maSbCompression.GetThumbPos() ) );
+ sal_Int32 nInterlace = 0;
+ if ( maCbInterlaced.IsChecked() )
+ nInterlace++;
+ pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), nInterlace );
+ }
+ break;
+
+ case FORMAT_BMP :
+ {
+ pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Color" ) ), maLbColorDepth.GetSelectEntryPos() + 1 );
+ pFilterOptions->WriteBool( String( RTL_CONSTASCII_USTRINGPARAM( "RLE_Coding" ) ), maCbRLEEncoding.IsChecked() );
+ }
+ break;
+
+ case FORMAT_GIF :
+ {
+ sal_Int32 nValue = 0;
+ if ( maCbInterlaced.IsChecked() )
+ nValue++;
+ pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), nValue );
+
+ nValue = 0;
+ if ( maCbSaveTransparency.IsChecked() )
+ nValue++;
+ pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Translucent" ) ), nValue );
+ }
+ break;
+
+ case FORMAT_PBM :
+ case FORMAT_PGM :
+ case FORMAT_PPM :
+ {
+ sal_Int32 nFormat = 0;
+ if ( maRbText.IsChecked() )
+ nFormat++;
+ pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), nFormat );
+ }
+ break;
+
+ case FORMAT_EPS :
+ {
+ sal_Int32 nCheck = 0;
+ if ( maCbEPSPreviewTIFF.IsChecked() )
+ nCheck++;
+ if ( maCbEPSPreviewEPSI.IsChecked() )
+ nCheck += 2;
+ pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Preview" ) ), nCheck );
+
+ nCheck = 1;
+ if ( maRbEPSLevel2.IsChecked() )
+ nCheck++;
+ pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ), nCheck );
+
+ nCheck = 1;
+ if ( maRbEPSColorFormat2.IsChecked() )
+ nCheck++;
+ pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) ), nCheck );
+
+ nCheck = 1;
+ if ( maRbEPSCompressionNone.IsChecked() )
+ nCheck++;
+ pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) ), nCheck );
+ }
+ break;
+ }
+
+ uno::Sequence< beans::PropertyValue > aRet( pFilterOptions->GetFilterData() );
+ if ( bUpdateConfig == sal_False )
+ delete pFilterOptions;
+ return aRet;
+}
+
+//
+awt::Size ExportDialog::GetOriginalSize()
+{
+ basegfx::B2DRange aShapesRange;
+
+ if ( mxPage.is () )
+ {
+ uno::Reference< beans::XPropertySet > xPagePropSet( mxPage, uno::UNO_QUERY );
+ if ( xPagePropSet.is() )
+ {
+ sal_Int32 nWidth = 0;
+ sal_Int32 nHeight= 0;
+ com::sun::star::uno::Any aAny;
+ aAny = xPagePropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ) ) );
+ aAny >>= nWidth;
+ aAny = xPagePropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Height" ) ) );
+ aAny >>= nHeight;
+ aShapesRange = basegfx::B2DRange( 0, 0, nWidth, nHeight );
+ }
+ }
+ else
+ {
+ uno::Reference< graphic::XPrimitiveFactory2D > xPrimitiveFactory(
+ mxMgr->createInstance( String( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.graphic.PrimitiveFactory2D" ) ) ), uno::UNO_QUERY );
+ if ( xPrimitiveFactory.is() )
+ {
+ basegfx::B2DHomMatrix aViewTransformation( Application::GetDefaultDevice()->GetViewTransformation() );
+ com::sun::star::geometry::AffineMatrix2D aTransformation;
+ aTransformation.m00 = aViewTransformation.get(0,0);
+ aTransformation.m01 = aViewTransformation.get(0,1);
+ aTransformation.m02 = aViewTransformation.get(0,2);
+ aTransformation.m10 = aViewTransformation.get(1,0);
+ aTransformation.m11 = aViewTransformation.get(1,1);
+ aTransformation.m12 = aViewTransformation.get(1,2);
+
+ const rtl::OUString sViewTransformation( RTL_CONSTASCII_USTRINGPARAM( "ViewTransformation" ) );
+ uno::Sequence< beans::PropertyValue > aViewInformation( 1 );
+ aViewInformation[ 0 ].Value <<= aTransformation;
+ aViewInformation[ 0 ].Name = sViewTransformation;
+
+ if ( mxShape.is() )
+ aShapesRange = GetShapeRangeForXShape( mxShape, xPrimitiveFactory, aViewInformation );
+ else if ( mxShapes.is() )
+ {
+ const sal_Int32 nCount = mxShapes->getCount();
+ for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
+ {
+ uno::Reference< drawing::XShape > xShape;
+ mxShapes->getByIndex( nIndex ) >>= xShape;
+ aShapesRange.expand( GetShapeRangeForXShape( xShape, xPrimitiveFactory, aViewInformation ) );
+ }
+ }
+ }
+ }
+ return awt::Size( aShapesRange.getWidth(), aShapesRange.getHeight() );
+}
+
+void ExportDialog::GetGraphicSource()
+{
+ if ( mxSourceDocument.is() )
+ {
+ uno::Reference< frame::XModel > xModel( mxSourceDocument, uno::UNO_QUERY );
+ if ( xModel.is() )
+ {
+ uno::Reference< frame::XController > xController( xModel->getCurrentController() );
+ if ( xController.is() )
+ {
+ if ( mbExportSelection ) // check if there is a selection
+ {
+ uno::Reference< view::XSelectionSupplier > xSelectionSupplier( xController, uno::UNO_QUERY );
+ if ( xSelectionSupplier.is() )
+ {
+ uno::Any aAny( xSelectionSupplier->getSelection() );
+ if ( ! ( aAny >>= mxShapes ) )
+ aAny >>= mxShape;
+ }
+ }
+ if ( !mxShape.is() && !mxShapes.is() )
+ {
+ uno::Reference< drawing::XDrawView > xDrawView( xController, uno::UNO_QUERY );
+ if ( xDrawView.is() )
+ {
+ uno::Reference< drawing::XDrawPage > xCurrentPage( xDrawView->getCurrentPage() );
+ if ( xCurrentPage.is() )
+ {
+ mxPage = xCurrentPage; // exporting whole page
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+sal_Bool ExportDialog::GetGraphicStream()
+{
+ sal_Bool bRet = sal_False;
+
+ if ( !IsTempExportAvailable() )
+ {
+ delete mpTempStream, mpTempStream = new SvMemoryStream();
+ maBitmap = Bitmap();
+ return bRet;
+ }
+
+ sal_Bool bRecreateOutputStream = mpTempStream->Tell() == 0;
+
+ static uno::Sequence< beans::PropertyValue > aOldFilterData;
+ uno::Sequence< beans::PropertyValue > aNewFilterData( GetFilterData( sal_False ) );
+ if ( aOldFilterData != aNewFilterData )
+ {
+ aOldFilterData = aNewFilterData;
+ bRecreateOutputStream = sal_True;
+ }
+ try
+ {
+ if ( bRecreateOutputStream )
+ {
+ delete mpTempStream, mpTempStream = new SvMemoryStream();
+ maBitmap = Bitmap();
+
+ uno::Reference < io::XStream > xStream( new utl::OStreamWrapper( *mpTempStream ) );
+ uno::Reference < io::XOutputStream > xOutputStream( xStream->getOutputStream() );
+
+ uno::Reference< document::XExporter > xGraphicExporter(
+ mxMgr->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicExportFilter") ) ), uno::UNO_QUERY_THROW );
+ uno::Reference< document::XFilter > xFilter( xGraphicExporter, uno::UNO_QUERY_THROW );
+
+ sal_Int32 nProperties = 2;
+ uno::Sequence< beans::PropertyValue > aFilterData( nProperties );
+
+
+ rtl::OUString sFormat( maExt );
+ uno::Sequence< beans::PropertyValue > aDescriptor( 3 );
+ aDescriptor[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OutputStream") );
+ aDescriptor[0].Value <<= xOutputStream;
+ aDescriptor[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FilterName") );
+ aDescriptor[1].Value <<= sFormat;
+ aDescriptor[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FilterData") );
+ aDescriptor[2].Value <<= aNewFilterData;
+
+ uno::Reference< lang::XComponent > xSourceDoc;
+ if ( mxPage.is() )
+ xSourceDoc = uno::Reference< lang::XComponent >( mxPage, uno::UNO_QUERY_THROW );
+ else if ( mxShapes.is() )
+ xSourceDoc = uno::Reference< lang::XComponent >( mxShapes, uno::UNO_QUERY_THROW );
+ else if ( mxShape.is() )
+ xSourceDoc = uno::Reference< lang::XComponent >( mxShape, uno::UNO_QUERY_THROW );;
+ if ( xSourceDoc.is() )
+ {
+ xGraphicExporter->setSourceDocument( xSourceDoc );
+ xFilter->filter( aDescriptor );
+ bRet = sal_True;
+
+ if ( mnFormat == FORMAT_JPG )
+ {
+ mpTempStream->Seek( STREAM_SEEK_TO_BEGIN );
+ maBitmap = GetGraphicBitmap( *mpTempStream );
+ mpTempStream->Seek( STREAM_SEEK_TO_END );
+ }
+ }
+ }
+ else
+ bRet = sal_True;
+ }
+ catch( uno::Exception& )
+ {
+
+ // ups
+
+ }
+ return bRet;
+}
+
+Bitmap ExportDialog::GetGraphicBitmap( SvStream& rInputStream )
+{
+ Bitmap aRet;
+ Graphic aGraphic;
+ GraphicFilter aFilter( sal_False );
+ if ( aFilter.ImportGraphic( aGraphic, String(), rInputStream, GRFILTER_FORMAT_NOTFOUND, NULL, 0, NULL ) == GRFILTER_OK )
+ {
+ aRet = aGraphic.GetBitmap();
+ }
+ return aRet;
+}
+
+sal_uInt32 ExportDialog::GetRawFileSize() const
+{
+ sal_uInt64 nRawFileSize = 0;
+ if ( mbIsPixelFormat )
+ {
+ sal_Int32 nBitsPerPixel = 24;
+ String aEntry( maLbColorDepth.GetSelectEntry() );
+ if ( ms1BitTreshold == aEntry )
+ nBitsPerPixel = 1;
+ else if ( ms1BitDithered == aEntry )
+ nBitsPerPixel = 1;
+ else if ( ms4BitGrayscale == aEntry )
+ nBitsPerPixel = 4;
+ else if ( ms4BitColorPalette == aEntry )
+ nBitsPerPixel = 8;
+ else if ( ms8BitGrayscale == aEntry )
+ nBitsPerPixel = 8;
+ else if ( ms8BitColorPalette == aEntry )
+ nBitsPerPixel = 8;
+ else if ( ms24BitColor == aEntry )
+ nBitsPerPixel = 24;
+
+ if ( mbIsPixelFormat )
+ {
+ nRawFileSize = ( maSize.Width * nBitsPerPixel + 7 ) &~ 7; // rounding up to 8 bits
+ nRawFileSize /= 8; // in bytes
+ nRawFileSize *= maSize.Height;
+ }
+ if ( nRawFileSize > SAL_MAX_UINT32 )
+ nRawFileSize = 0;
+ }
+ return static_cast< sal_uInt32 >( nRawFileSize );
+}
+
+// checks if the source dimension/resolution is not too big
+// to determine the exact graphic output size and preview for jpg
+sal_Bool ExportDialog::IsTempExportAvailable() const
+{
+ return GetRawFileSize() < static_cast< sal_uInt32 >( mnMaxFilesizeForRealtimePreview );
+}
+
+ExportDialog::ExportDialog( FltCallDialogParameter& rPara,
+ const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > rxMgr,
+ const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rxSourceDocument,
+ sal_Bool bExportSelection, sal_Bool bIsPixelFormat ) :
+ ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT, *rPara.pResMgr ) ),
+ mrFltCallPara ( rPara ),
+ mpMgr ( rPara.pResMgr ),
+ mxMgr ( rxMgr ),
+ mxSourceDocument ( rxSourceDocument ),
+ maFlExportSize ( this, ResId( FL_EXPORT_SIZE, *rPara.pResMgr ) ),
+ maFtSizeX ( this, ResId( FT_SIZEX, *rPara.pResMgr ) ),
+ maMfSizeX ( this, ResId( MF_SIZEX, *rPara.pResMgr ) ),
+ maLbSizeX ( this, ResId( LB_SIZEX, *rPara.pResMgr ) ),
+ maFtSizeY ( this, ResId( FT_SIZEY, *rPara.pResMgr ) ),
+ maMfSizeY ( this, ResId( MF_SIZEY, *rPara.pResMgr ) ),
+ maLbSizeY ( this, ResId( LB_SIZEY, *rPara.pResMgr ) ),
+ maFtResolution ( this, ResId( FT_RESOLUTION, *rPara.pResMgr ) ),
+ maNfResolution ( this, ResId( NF_RESOLUTION, *rPara.pResMgr ) ),
+ maLbResolution ( this, ResId( LB_RESOLUTION, *rPara.pResMgr ) ),
+ maFlColorDepth ( this, ResId( FL_COLOR_DEPTH, *rPara.pResMgr ) ),
+ maLbColorDepth ( this, ResId( LB_COLOR_DEPTH, *rPara.pResMgr ) ),
+ maFlJPGQuality ( this, ResId( FL_JPG_QUALITY, *rPara.pResMgr ) ),
+ maFlMode ( this, ResId( FL_MODE, *rPara.pResMgr ) ),
+ maFlPBMOptions ( this, ResId( FL_PBM_OPTIONS, *rPara.pResMgr ) ),
+ maSbCompression ( this, ResId( SB_COMPRESSION, *rPara.pResMgr ) ),
+ maNfCompression ( this, ResId( NF_COMPRESSION, *rPara.pResMgr ) ),
+ maFtJPGMin ( this, ResId( FT_JPG_MIN, *rPara.pResMgr ) ),
+ maFtJPGMax ( this, ResId( FT_JPG_MAX, *rPara.pResMgr ) ),
+ maFtPNGMin ( this, ResId( FT_PNG_MIN, *rPara.pResMgr ) ),
+ maFtPNGMax ( this, ResId( FT_PNG_MAX, *rPara.pResMgr ) ),
+ maCbJPGPreview ( this, ResId( CB_JPG_PREVIEW, *rPara.pResMgr ) ),
+ maCbInterlaced ( this, ResId( CB_INTERLACED, *rPara.pResMgr ) ),
+ maCbRLEEncoding ( this, ResId( CB_RLE_ENCODING, *rPara.pResMgr ) ),
+ maFlGIFDrawingObjects ( this, ResId( FL_GIF_DRAWING_OBJECTS, *rPara.pResMgr ) ),
+ maCbSaveTransparency ( this, ResId( CB_SAVE_TRANSPARENCY, *rPara.pResMgr ) ),
+ maRbBinary ( this, ResId( RB_BINARY, *rPara.pResMgr ) ),
+ maRbText ( this, ResId( RB_TEXT, *rPara.pResMgr ) ),
+ maFlEPSPreview ( this, ResId( FL_EPS_PREVIEW, *rPara.pResMgr ) ),
+ maCbEPSPreviewTIFF ( this, ResId( CB_EPS_PREVIEW_TIFF, *rPara.pResMgr ) ),
+ maCbEPSPreviewEPSI ( this, ResId( CB_EPS_PREVIEW_EPSI, *rPara.pResMgr ) ),
+ maFlEPSVersion ( this, ResId( FL_EPS_VERSION, *rPara.pResMgr ) ),
+ maRbEPSLevel1 ( this, ResId( RB_EPS_LEVEL1, *rPara.pResMgr ) ),
+ maRbEPSLevel2 ( this, ResId( RB_EPS_LEVEL2, *rPara.pResMgr ) ),
+ maFlEPSColorFormat ( this, ResId( FL_EPS_COLOR_FORMAT, *rPara.pResMgr ) ),
+ maRbEPSColorFormat1 ( this, ResId( RB_EPS_COLOR_FORMAT1, *rPara.pResMgr ) ),
+ maRbEPSColorFormat2 ( this, ResId( RB_EPS_COLOR_FORMAT2, *rPara.pResMgr ) ),
+ maFlCompression ( this, ResId( FL_COMPRESSION, *rPara.pResMgr ) ),
+ maRbEPSCompressionLZW ( this, ResId( RB_EPS_COMPRESSION_LZW, *rPara.pResMgr ) ),
+ maRbEPSCompressionNone ( this, ResId( RB_EPS_COMPRESSION_NONE, *rPara.pResMgr ) ),
+ maFlEstimatedSize ( this, ResId( FL_ESTIMATED_SIZE, *rPara.pResMgr ) ),
+ maFtEstimatedSize ( this, ResId( FT_ESTIMATED_SIZE, *rPara.pResMgr ) ),
+ msEstimatedSizePix1 ( ResId( STR_ESTIMATED_SIZE_PIX_1, *rPara.pResMgr ) ),
+ msEstimatedSizePix2 ( ResId( STR_ESTIMATED_SIZE_PIX_2, *rPara.pResMgr ) ),
+ msEstimatedSizeVec ( ResId( STR_ESTIMATED_SIZE_VEC, *rPara.pResMgr ) ),
+ maFlButtons ( this, ResId( FL_BUTTONS, *rPara.pResMgr ) ),
+ maFbJPGPreview ( this, ResId( FB_JPG_PREVIEW, *rPara.pResMgr ) ),
+ maSbZoom ( this, ResId( SB_ZOOM, *rPara.pResMgr ) ),
+ maNfZoom ( this, ResId( NF_ZOOM, *rPara.pResMgr ) ),
+ maSbJPGPreviewHorz ( this, ResId( SB_JPG_PREVIEW_HORZ, *rPara.pResMgr ) ),
+ maSbJPGPreviewVert ( this, ResId( SB_JPG_PREVIEW_VERT, *rPara.pResMgr ) ),
+ maBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ),
+ maBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ),
+ maBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ),
+ ms1BitTreshold ( ResId( STR_1BIT_THRESHOLD, *rPara.pResMgr ) ),
+ ms1BitDithered ( ResId( STR_1BIT_DITHERED, *rPara.pResMgr ) ),
+ ms4BitGrayscale ( ResId( STR_4BIT_GRAYSCALE, *rPara.pResMgr ) ),
+ ms4BitColorPalette ( ResId( STR_4BIT_COLOR_PALETTE, *rPara.pResMgr ) ),
+ ms8BitGrayscale ( ResId( STR_8BIT_GRAYSCALE, *rPara.pResMgr ) ),
+ ms8BitColorPalette ( ResId( STR_8BIT_COLOR_PALETTE, *rPara.pResMgr ) ),
+ ms24BitColor ( ResId( STR_24BIT_TRUE_COLOR, *rPara.pResMgr ) ),
+ maExt ( rPara.aFilterExt ),
+ mnFormat ( FORMAT_UNKNOWN ),
+ mnMaxFilesizeForRealtimePreview( 0 ),
+ mpTempStream ( new SvMemoryStream() ),
+ maOriginalSize ( awt::Size( 0, 0 ) ),
+ mbPreview ( sal_False ),
+ mbIsPixelFormat ( bIsPixelFormat ),
+ mbExportSelection ( bExportSelection ),
+ mbPreserveAspectRatio ( sal_True )
+{
+ GetGraphicSource();
+
+ maExt.ToUpperAscii();
+
+ String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/" ) );
+ mpOptionsItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData );
+ aFilterConfigPath.Append( maExt );
+ mpFilterOptionsItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData );
+
+ mnInitialResolutionUnit = mbIsPixelFormat
+ ? mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportUnit" ) ), UNIT_DEFAULT )
+ : mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "VectorExportUnit" ) ), UNIT_DEFAULT );
+
+ mnMaxFilesizeForRealtimePreview = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "MaxFilesizeForRealtimePreview" ) ), 0 );
+ maFtEstimatedSize.SetText( String( RTL_CONSTASCII_USTRINGPARAM( " \n " ) ) );
+
+ String aTitle( maExt );
+ aTitle += String( ResId( DLG_EXPORT_TITLE, *mpMgr ) );
+ SetText( aTitle );
+
+ mnFormat = GetFilterFormat( maExt );
+
+ Size aResolution( Application::GetDefaultDevice()->LogicToPixel( Size( 100, 100 ), MAP_CM ) );
+ maResolution.Width = aResolution.Width();
+ maResolution.Height= aResolution.Height();
+ maOriginalSize = GetOriginalSize();
+ if ( bIsPixelFormat )
+ {
+ double fPixelsPer100thmm = static_cast< double >( maResolution.Width ) / 100000.0;
+ maSize = awt::Size( static_cast< sal_Int32 >( ( fPixelsPer100thmm * maOriginalSize.Width ) + 0.5 ),
+ static_cast< sal_Int32 >( ( fPixelsPer100thmm * maOriginalSize.Height ) + 0.5 ) );
+ }
+ else
+ {
+ maSize = maOriginalSize;
+ }
+
+ // Size
+ maLbSizeX.SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) );
+
+ maSbCompression.SetScrollHdl( LINK( this, ExportDialog, SbCompressionUpdateHdl ) );
+ maNfCompression.SetModifyHdl( LINK( this, ExportDialog, UpdateHdl ) );
+
+ maMfSizeX.SetModifyHdl( LINK( this, ExportDialog, UpdateHdlMtfSizeX ) );
+ maMfSizeY.SetModifyHdl( LINK( this, ExportDialog, UpdateHdlMtfSizeY ) );
+
+ maNfResolution.SetModifyHdl( LINK( this, ExportDialog, UpdateHdlNfResolution ) );
+ maLbResolution.SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) );
+
+ maLbColorDepth.SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) );
+
+ maCbInterlaced.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+
+ maCbSaveTransparency.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+
+ maCbEPSPreviewTIFF.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+ maCbEPSPreviewEPSI.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+
+ maRbEPSCompressionLZW.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+ maRbEPSCompressionNone.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+
+ maRbBinary.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+ maRbText.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+
+
+ // JPG Preview
+// maCbJPGPreview.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+maCbJPGPreview.Enable( sal_False );
+
+ maSbJPGPreviewVert.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) );
+ maSbJPGPreviewHorz.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) );
+ maSbZoom.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) );
+
+ // BMP
+ maCbRLEEncoding.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+
+ // EPS
+ maRbEPSLevel1.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+ maRbEPSLevel2.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+
+ maBtnOK.SetClickHdl( LINK( this, ExportDialog, OK ) );
+
+ setupLayout();
+ updateControls();
+
+ FreeResource();
+}
+
+void ExportDialog::createSizeControls( vcl::RowOrColumn& rLayout )
+{
+ size_t nIndex;
+ Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) );
+ long nIndent = aBorder.Width();
+
+ // Size controls
+ rLayout.addWindow( &maFlExportSize );
+
+ Size aLbMax( maLbSizeX.GetSizePixel() );
+ aLbMax.Width() = Max( aLbMax.Width(), maLbResolution.GetSizePixel().Width() );
+
+ boost::shared_ptr< vcl::LabelColumn > xSizeColumns( new vcl::LabelColumn( &rLayout ) );
+ rLayout.addChild( xSizeColumns );
+
+ // row 1
+ boost::shared_ptr< vcl::RowOrColumn > xColumn( new vcl::RowOrColumn( xSizeColumns.get(), false ) );
+ xSizeColumns->addRow( &maFtSizeX, xColumn, nIndent );
+ Size aMinSize( maMfSizeX.GetSizePixel() );
+ nIndex = xColumn->addWindow( &maMfSizeX );
+ xColumn->setMinimumSize( nIndex, aMinSize );
+ nIndex = xColumn->addWindow( &maLbSizeX );
+ xColumn->setMinimumSize( nIndex, aLbMax );
+
+ // row 2
+ xColumn = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xSizeColumns.get(), false ) );
+ xSizeColumns->addRow( &maFtSizeY, xColumn, nIndent );
+ nIndex = xColumn->addWindow( &maMfSizeY );
+ xColumn->setMinimumSize( nIndex, aMinSize );
+ nIndex = xColumn->addWindow( &maLbSizeY );
+ xColumn->setMinimumSize( nIndex, aLbMax );
+
+ // row 3
+ if ( mbIsPixelFormat ) // TODO: (metafileresolutionsupport)
+ {
+ xColumn = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xSizeColumns.get(), false ) );
+ xSizeColumns->addRow( &maFtResolution, xColumn, nIndent );
+ nIndex = xColumn->addWindow( &maNfResolution );
+ xColumn->setMinimumSize( nIndex, aMinSize );
+ nIndex = xColumn->addWindow( &maLbResolution );
+ xColumn->setMinimumSize( nIndex, aLbMax );
+ }
+
+ sal_Int32 nUnit = mnInitialResolutionUnit;
+ if ( nUnit == UNIT_DEFAULT )
+ nUnit = GetDefaultUnit();
+
+ if ( !mbIsPixelFormat )
+ {
+ maLbSizeX.RemoveEntry( UNIT_PIXEL ); // removing pixel
+ if ( nUnit >= UNIT_PIXEL )
+ nUnit = UNIT_CM;
+ }
+ else if ( nUnit > UNIT_MAX_ID )
+ nUnit = UNIT_PIXEL;
+ if ( nUnit < 0 )
+ nUnit = UNIT_CM;
+ maLbSizeX.SelectEntryPos( static_cast< USHORT >( nUnit ) );
+
+ if ( mbIsPixelFormat ) // TODO: (metafileresolutionsupport) should be supported for vector formats also... this makes
+ { // sense eg for bitmap fillings in metafiles, to preserve high dpi output
+ // (atm without special vector support the bitmaps are rendered with 96dpi)
+ sal_Int32 nResolution = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolution" ) ), 96 );
+ if ( nResolution < 1 )
+ nResolution = 96;
+ maNfResolution.SetValue( nResolution );
+
+ sal_Int32 nResolutionUnit = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolutionUnit" ) ), 1 );
+ if ( ( nResolutionUnit < 0 ) || ( nResolutionUnit > 2 ) )
+ nResolutionUnit = 1;
+ maLbResolution.SelectEntryPos( static_cast< USHORT >( nResolutionUnit ) );
+ }
+
+ boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) );
+ rLayout.addChild( xSpacer );
+}
+
+void ExportDialog::createColorDepthControls( vcl::RowOrColumn& rLayout )
+{
+ // Color Depth
+ Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) );
+ long nIndent = aBorder.Width();
+
+ boost::shared_ptr< vcl::RowOrColumn > xRow( new vcl::RowOrColumn( &rLayout, false ) );
+ rLayout.addChild( xRow );
+ xRow->addWindow( &maFlColorDepth );
+
+ xRow = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( &rLayout, false ) );
+ rLayout.addChild( xRow );
+ boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) );
+ xRow->addChild( xIndenter );
+ boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) );
+ xIndenter->setChild( xRows );
+ xRows->addWindow( &maLbColorDepth );
+
+ boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) );
+ rLayout.addChild( xSpacer );
+}
+
+void ExportDialog::createScrollBar( vcl::RowOrColumn& rLayout )
+{
+ boost::shared_ptr< vcl::RowOrColumn > xRow( new vcl::RowOrColumn( &rLayout, false ) );
+ rLayout.addChild( xRow );
+
+ Size aMinSize( maSbCompression.GetSizePixel() );
+ size_t nIndex = xRow->addWindow( &maSbCompression );
+ xRow->setMinimumSize( nIndex, aMinSize );
+ aMinSize = maNfCompression.GetSizePixel();
+ nIndex = xRow->addWindow( &maNfCompression );
+ xRow->setMinimumSize( nIndex, aMinSize );
+}
+
+void ExportDialog::createFilterOptions( vcl::RowOrColumn& rLayout )
+{
+ Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) );
+ long nIndent = aBorder.Width();
+
+ switch( mnFormat )
+ {
+ case FORMAT_JPG :
+ {
+ sal_Int32 nColor = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorMode" ) ), 0 );
+ if ( nColor == 1 )
+ nColor = 0;
+ else
+ nColor = 1;
+ maLbColorDepth.InsertEntry( ms8BitGrayscale );
+ maLbColorDepth.InsertEntry( ms24BitColor );
+ maLbColorDepth.SelectEntryPos( nColor );
+ createColorDepthControls( maLayout );
+
+ rLayout.addWindow( &maFlJPGQuality );
+
+ // Quality
+ boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) );
+ rLayout.addChild( xIndenter );
+ boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) );
+ xIndenter->setChild( xRows );
+ createScrollBar( *xRows.get() );
+ xRows->addWindow( &maFtJPGMin );
+ xRows->addWindow( &maFtJPGMax );
+ if ( maCbJPGPreview.IsEnabled() )
+ xRows->addWindow( &maCbJPGPreview );
+
+ boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) );
+ rLayout.addChild( xSpacer );
+
+ sal_Int32 nQuality = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Quality" ) ), 75 );
+ if ( ( nQuality < 1 ) || ( nQuality > 100 ) )
+ nQuality = 75;
+
+ maSbCompression.SetRangeMin( 1 );
+ maSbCompression.SetRangeMax( 100 );
+ maNfCompression.SetMin( 1 );
+ maNfCompression.SetMax( 100 );
+ maNfCompression.SetValue( nQuality );
+ maNfCompression.SetStrictFormat( sal_True );
+ if ( maCbJPGPreview.IsEnabled() )
+ maCbJPGPreview.Check( sal_False );
+ }
+ break;
+ case FORMAT_PNG :
+ {
+ rLayout.addWindow( &maFlCompression );
+
+ // Compression 1..9
+ boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) );
+ rLayout.addChild( xIndenter );
+ boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) );
+ xIndenter->setChild( xRows );
+ createScrollBar( *xRows.get() );
+ xRows->addWindow( &maFtPNGMin );
+ xRows->addWindow( &maFtPNGMax );
+ boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) );
+ rLayout.addChild( xSpacer );
+
+ // Interlaced
+ rLayout.addWindow( &maFlMode );
+ xIndenter.reset( new vcl::Indenter( &rLayout, nIndent ) );
+ rLayout.addChild( xIndenter );
+ xRows.reset( new vcl::RowOrColumn( &rLayout, true ) );
+ xIndenter->setChild( xRows );
+ xRows->addWindow( &maCbInterlaced );
+
+ xSpacer.reset( new vcl::Spacer( &rLayout, 2 ) );
+ rLayout.addChild( xSpacer );
+
+ sal_Int32 nCompression = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Compression" ) ), 6 );
+ if ( ( nCompression < 1 ) || ( nCompression > 9 ) )
+ nCompression = 6;
+ maSbCompression.SetRangeMin( 1 );
+ maSbCompression.SetRangeMax( 9 );
+ maNfCompression.SetMin( 1 );
+ maNfCompression.SetMax( 9 );
+ maNfCompression.SetValue( 9 );
+ maNfCompression.SetStrictFormat( sal_True );
+
+ maCbInterlaced.Check( mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), 0 ) != 0 );
+ }
+ break;
+ case FORMAT_BMP :
+ {
+ sal_Int32 nColor = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Color" ) ), 0 );
+ if ( nColor == 0 )
+ nColor = 6;
+ else
+ nColor--;
+ maLbColorDepth.InsertEntry( ms1BitTreshold );
+ maLbColorDepth.InsertEntry( ms1BitDithered );
+ maLbColorDepth.InsertEntry( ms4BitGrayscale );
+ maLbColorDepth.InsertEntry( ms4BitColorPalette );
+ maLbColorDepth.InsertEntry( ms8BitGrayscale );
+ maLbColorDepth.InsertEntry( ms8BitColorPalette );
+ maLbColorDepth.InsertEntry( ms24BitColor );
+ maLbColorDepth.SelectEntryPos( nColor );
+ createColorDepthControls( maLayout );
+
+ rLayout.addWindow( &maFlCompression );
+ // RLE coding
+ boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) );
+ rLayout.addChild( xIndenter );
+ boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) );
+ xIndenter->setChild( xRows );
+ xRows->addWindow( &maCbRLEEncoding );
+ boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) );
+ rLayout.addChild( xSpacer );
+
+ maCbRLEEncoding.Check( mpFilterOptionsItem->ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "RLE_Coding" ) ), sal_True ) );
+ }
+ break;
+ case FORMAT_GIF :
+ {
+ rLayout.addWindow( &maFlMode );
+ boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) );
+ rLayout.addChild( xIndenter );
+ boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) );
+ xIndenter->setChild( xRows );
+ xRows->addWindow( &maCbInterlaced );
+ boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) );
+ rLayout.addChild( xSpacer );
+
+ rLayout.addWindow( &maFlGIFDrawingObjects );
+ xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( &rLayout, nIndent ) );
+ rLayout.addChild( xIndenter );
+ xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( &rLayout, true ) );
+ xIndenter->setChild( xRows );
+ xRows->addWindow( &maCbSaveTransparency );
+ xSpacer.reset( new vcl::Spacer( &rLayout, 2 ) );
+ rLayout.addChild( xSpacer );
+
+ maCbInterlaced.Check( mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), 1 ) != 0 );
+ maCbSaveTransparency.Check( mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Translucent" ) ), 1 ) != 0 );
+ }
+ break;
+ case FORMAT_PBM :
+ case FORMAT_PGM :
+ case FORMAT_PPM :
+ {
+ rLayout.addWindow( &maFlJPGQuality );
+
+ // RB Binary / Text
+ boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) );
+ rLayout.addChild( xIndenter );
+ boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) );
+ xIndenter->setChild( xRows );
+ xRows->addWindow( &maRbBinary );
+ xRows->addWindow( &maRbText );
+ boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) );
+ rLayout.addChild( xSpacer );
+
+ sal_Int32 nFormat = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), 1 );
+ maRbBinary.Check( nFormat == 0 );
+ maRbText.Check( nFormat != 0 );
+ }
+ break;
+ case FORMAT_EPS :
+ {
+ boost::shared_ptr< vcl::RowOrColumn > xColumns( new vcl::RowOrColumn( &rLayout, false ) );
+ rLayout.addChild( xColumns );
+ boost::shared_ptr< vcl::RowOrColumn > xLeft( new vcl::RowOrColumn( &rLayout, true ) );
+ xColumns->addChild( xLeft );
+
+ xLeft->addWindow( &maFlEPSPreview );
+ boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( xLeft.get(), nIndent ) );
+ xLeft->addChild( xIndenter );
+ boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( xLeft.get(), true ) );
+ xIndenter->setChild( xRows );
+ xRows->addWindow( &maCbEPSPreviewTIFF );
+ xRows->addWindow( &maCbEPSPreviewEPSI );
+ boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( xLeft.get(), 2 ) );
+ xLeft->addChild( xSpacer );
+
+ xLeft->addWindow( &maFlEPSVersion );
+ xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( xLeft.get(), nIndent ) );
+ xLeft->addChild( xIndenter );
+ xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xLeft.get(), true ) );
+ xIndenter->setChild( xRows );
+ xRows->addWindow( &maRbEPSLevel1 );
+ xRows->addWindow( &maRbEPSLevel2 );
+ xSpacer.reset( new vcl::Spacer( xLeft.get(), 2 ) );
+ xLeft->addChild( xSpacer );
+
+ boost::shared_ptr< vcl::RowOrColumn > xRight( new vcl::RowOrColumn( &rLayout, true ) );
+ xColumns->addChild( xRight );
+
+ xRight->addWindow( &maFlEPSColorFormat );
+ xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( xRight.get(), nIndent ) );
+ xRight->addChild( xIndenter );
+ xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xRight.get(), true ) );
+ xIndenter->setChild( xRows );
+ xRows->addWindow( &maRbEPSColorFormat1 );
+ xRows->addWindow( &maRbEPSColorFormat2 );
+ xSpacer.reset( new vcl::Spacer( xRight.get(), 2 ) );
+ xRight->addChild( xSpacer );
+
+ xRight->addWindow( &maFlCompression );
+ xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( xRight.get(), nIndent ) );
+ xRight->addChild( xIndenter );
+ xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xRight.get(), true ) );
+ xIndenter->setChild( xRows );
+ xRows->addWindow( &maRbEPSCompressionLZW );
+ xRows->addWindow( &maRbEPSCompressionNone );
+
+ xSpacer.reset( new vcl::Spacer( &rLayout, 2 ) );
+ rLayout.addChild( xSpacer );
+
+ sal_Int32 nPreview = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Preview" ) ), 0 );
+ sal_Int32 nVersion = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ), 2 );
+ sal_Int32 nColor = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) ), 0 );
+ sal_Int32 nCompr = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) ), 2 );
+
+ mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "TextMode" ) ), 0 );
+
+ maCbEPSPreviewTIFF.Check( ( nPreview & 1 ) != 0 );
+ maCbEPSPreviewEPSI.Check( ( nPreview & 2 ) != 0 );
+
+ maRbEPSLevel1.Check( nVersion == 1 );
+ maRbEPSLevel2.Check( nVersion == 2 );
+
+ maRbEPSColorFormat1.Check( nColor == 1 );
+ maRbEPSColorFormat2.Check( nColor != 1 );
+
+ maRbEPSCompressionLZW.Check( nCompr == 1 );
+ maRbEPSCompressionNone.Check( nCompr != 1 );
+ }
+ break;
+ }
+}
+
+void ExportDialog::createButtons( vcl::RowOrColumn& rLayout )
+{
+ rLayout.addWindow( &maFlButtons );
+ boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) );
+ rLayout.addChild( xSpacer );
+
+ Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) );
+
+ boost::shared_ptr< vcl::RowOrColumn > xButtons( new vcl::RowOrColumn( &rLayout, false ) );
+ size_t nIndex = rLayout.addChild( xButtons );
+ rLayout.setBorders( nIndex, aBorder.Width(), 0, aBorder.Width(), aBorder.Width() );
+
+ Size aMinSize( maBtnCancel.GetSizePixel() );
+ // insert help button
+ xButtons->setMinimumSize( xButtons->addWindow( &maBtnHelp ), aMinSize );
+
+ // insert a spacer, cancel and OK buttons are right aligned
+
+ xSpacer.reset( new vcl::Spacer( xButtons.get(), 2 ) );
+ xButtons->addChild( xSpacer );
+ xButtons->setMinimumSize( xButtons->addWindow( &maBtnOK ), aMinSize );
+ xButtons->setMinimumSize( xButtons->addWindow( &maBtnCancel ), aMinSize );
+}
+
+void ExportDialog::setupLayout()
+{
+ Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) );
+ maLayout.setParentWindow( this );
+ maLayout.setOuterBorder( aBorder.Width() );
+
+ createSizeControls( maLayout );
+ createFilterOptions( maLayout );
+
+ if ( mnMaxFilesizeForRealtimePreview || mbIsPixelFormat )
+ {
+ maLayout.addWindow( &maFlEstimatedSize );
+ maLayout.addWindow( &maFtEstimatedSize );
+ }
+ createButtons( maLayout );
+
+ maLayout.show();
+ maDialogSize = maLayout.getOptimalSize( WINDOWSIZE_PREFERRED );
+ maLayout.setManagedArea( Rectangle( Point(), maDialogSize ) );
+ SetOutputSizePixel( Size( mbPreview ? maDialogSize.Width() * 2 : maDialogSize.Width(), maDialogSize.Height() ) );
+
+ maRectFlButtons = Rectangle( maFlButtons.GetPosPixel(), maFlButtons.GetSizePixel() );
+ maRectBtnHelp = Rectangle( maBtnHelp.GetPosPixel(), maBtnHelp.GetSizePixel() );
+ maRectBtnOK = Rectangle( maBtnOK.GetPosPixel(), maBtnOK.GetSizePixel() );
+ maRectBtnCancel = Rectangle( maBtnCancel.GetPosPixel(), maBtnOK.GetSizePixel() );
+
+ maLbSizeY.Hide();
+}
+
+static rtl::OUString ImpValueOfInKB( const sal_Int64& rVal )
+{
+ double fVal( static_cast<double>( rVal ) );
+ fVal /= ( 1 << 10 );
+ fVal += 0.05;
+ rtl::OUStringBuffer aVal( rtl::OUString::valueOf( fVal ) );
+ sal_Int32 nX( rtl::OUString( aVal.getStr() ).indexOf( '.', 0 ) );
+ if ( nX > 0 )
+ aVal.setLength( nX + 2 );
+ return aVal.makeStringAndClear();
+}
+
+sal_Int32 static GetZoomValueFromThumbPos( sal_Int32 nThumbPos )
+{
+ sal_Int32 nProz = 0;
+ if ( nThumbPos <= 50 )
+ nProz = nThumbPos * 2; // so a range of 50 represents 100%
+ else
+ nProz = ( ( nThumbPos - 50 ) * 60 ) + 100; // we want to scale up to 3000%
+ return nProz;
+}
+
+void ExportDialog::updatePreview()
+{
+ // JPG
+// maCbJPGPreview.Enable( IsTempExportAvailable() );
+
+// if ( maCbJPGPreview.IsEnabled() && maCbJPGPreview.IsChecked() )
+ if ( mbPreview )
+ {
+ long nScrollBarSize = Application::GetSettings().GetStyleSettings().GetScrollBarSize();
+
+ Point aPreviewPos( maDialogSize.Width(), 0 );
+ Size aPreviewSize( maDialogSize.Width(), maFlButtons.GetPosPixel().Y() );
+
+ Point aFixedBitmapPos( aPreviewPos );
+ Size aFixedBitmapSize( aPreviewSize );
+
+ maSbZoom.Show( sal_False );
+ maSbZoom.SetPosPixel( Point( aPreviewPos.X(), aPreviewPos.Y() ) );
+ maSbZoom.SetSizePixel( Size( aPreviewSize.Width() / 4, nScrollBarSize ) );
+ maNfZoom.Show( sal_False );
+ maNfZoom.SetPosPixel( Point( aPreviewPos.X() + aPreviewSize.Width() / 4, aPreviewPos.Y() ) );
+ maNfZoom.SetSizePixel( Size( aPreviewSize.Width() / 6, nScrollBarSize ) );
+ maNfZoom.SetValue( GetZoomValueFromThumbPos( maSbZoom.GetThumbPos() ) );
+ maFbJPGPreview.Show( sal_True );
+
+ sal_Int32 nZoom = GetZoomValueFromThumbPos( maSbZoom.GetThumbPos() );
+ double fSizePixelX = static_cast< double >( maSize.Width * nZoom ) / 100.0;
+ double fSizePixelY = static_cast< double >( maSize.Height * nZoom ) / 100.0;
+
+ double fXRatio = fSizePixelX / maSize.Width; // the size of each pixel
+ double fYRatio = fSizePixelY / maSize.Height;
+
+ sal_Bool bHorzSb = fSizePixelX > aFixedBitmapSize.Width();
+ sal_Bool bVertSb = fSizePixelY > aFixedBitmapSize.Height();
+ if ( bHorzSb )
+ {
+ aFixedBitmapSize.Height() -= nScrollBarSize;
+
+ maSbJPGPreviewHorz.Show( sal_True );
+ maSbJPGPreviewHorz.SetPosPixel( Point( aFixedBitmapPos.X(), aFixedBitmapPos.Y() + aFixedBitmapSize.Height() ) );
+ maSbJPGPreviewHorz.SetSizePixel( Size( aFixedBitmapSize.Width(), nScrollBarSize ) );
+ }
+ else
+ {
+ maSbJPGPreviewHorz.Show( sal_False );
+ }
+
+
+ if ( bVertSb )
+ {
+ aFixedBitmapSize.Width() -= nScrollBarSize;
+
+ maSbJPGPreviewVert.Show( sal_True );
+ maSbJPGPreviewVert.SetPosPixel( Point( aFixedBitmapPos.X() + aFixedBitmapSize.Width(), aFixedBitmapPos.Y() ) );
+ maSbJPGPreviewVert.SetSizePixel( Size( nScrollBarSize, aFixedBitmapSize.Height() ) );
+ }
+ else
+ {
+ maSbJPGPreviewVert.Show( sal_False );
+ }
+
+ Point aPos( 0, 0 );
+ Size aSize;
+ if ( fXRatio > 1.0 )
+ {
+ aSize.Width() = maSize.Width > aFixedBitmapSize.Width() ? maSize.Width : aFixedBitmapSize.Width();
+ aSize.Width() /= fXRatio;
+ }
+ else
+ {
+ aSize.Width() = maSize.Width < aFixedBitmapSize.Width() ? maSize.Width : aFixedBitmapSize.Width();
+ aSize.Width() /= fXRatio;
+ }
+
+ if ( fYRatio > 1.0 )
+ {
+ aSize.Height() = maSize.Height > aFixedBitmapSize.Height() ? maSize.Height : aFixedBitmapSize.Height();
+ aSize.Height() /= fYRatio;
+ }
+ else
+ {
+ aSize.Height() = maSize.Height < aFixedBitmapSize.Height() ? maSize.Height : aFixedBitmapSize.Height();
+ aSize.Height() /= fYRatio;
+ }
+
+ if ( aSize.Width() < maSize.Width )
+ {
+ sal_Int32 nXDiff = static_cast< sal_Int32 >( ( ( ( maSize.Width - aSize.Width() ) * maSbJPGPreviewHorz.GetThumbPos() ) / 100.0 ) );
+ aPos.X() += nXDiff;
+ }
+ if ( aSize.Height() < maSize.Height )
+ {
+ sal_Int32 nYDiff = static_cast< sal_Int32 >( ( ( ( maSize.Height - aSize.Height() ) * maSbJPGPreviewVert.GetThumbPos() ) / 100.0 ) );
+ aPos.Y() += nYDiff;
+ }
+
+ Bitmap aCroppedBitmap( maBitmap );
+ aCroppedBitmap.Crop( Rectangle( aPos, aSize ) );
+ aSize = aCroppedBitmap.GetSizePixel();
+ aSize = Size( aSize.Width() * fXRatio, aSize.Height() * fYRatio );
+ aCroppedBitmap.Scale( aSize );
+
+ if ( aSize.Width() > aFixedBitmapSize.Width() )
+ aSize.Width() = aFixedBitmapSize.Width();
+ if ( aSize.Height() > aFixedBitmapSize.Height() )
+ aSize.Height() = aFixedBitmapSize.Height();
+ Point aPoint( aFixedBitmapPos );
+ if ( aSize.Width() < aFixedBitmapSize.Width() )
+ aPoint.X() += ( aFixedBitmapSize.Width() - aSize.Width() ) / 2;
+ if ( aSize.Height() < aFixedBitmapSize.Height() )
+ aPoint.Y() += ( aFixedBitmapSize.Height() - aSize.Height() ) / 2;
+
+ maFbJPGPreview.SetPosPixel( aPoint );
+ maFbJPGPreview.SetSizePixel( aSize );
+ maFbJPGPreview.SetBitmap( aCroppedBitmap );
+
+ SetOutputSizePixel( Size( maDialogSize.Width() * 2, maDialogSize.Height() ) );
+
+ maFlButtons.SetSizePixel( Size( maRectFlButtons.GetWidth() * 2, maRectFlButtons.GetHeight() ) );
+ maBtnHelp.SetPosPixel( Point( maRectBtnHelp.Left() + maDialogSize.Width(), maRectBtnHelp.Top() ) );
+ maBtnOK.SetPosPixel( Point( maRectBtnOK.Left() + maDialogSize.Width(), maRectBtnOK.Top() ) );
+ maBtnCancel.SetPosPixel( Point( maRectBtnCancel.Left() + maDialogSize.Width(), maRectBtnCancel.Top() ) );
+ }
+ else
+ {
+ maSbZoom.Show( sal_False );
+ maNfZoom.Show( sal_False );
+ maFbJPGPreview.Show( sal_False );
+ maSbJPGPreviewHorz.Show( sal_False );
+ maSbJPGPreviewVert.Show( sal_False );
+
+ SetOutputSizePixel( maDialogSize );
+
+ maFlButtons.SetSizePixel( Size( maRectFlButtons.GetWidth(), maRectFlButtons.GetHeight() ) );
+ maBtnHelp.SetPosPixel( Point( maRectBtnHelp.Left(), maRectBtnHelp.Top() ) );
+ maBtnOK.SetPosPixel( Point( maRectBtnOK.Left(), maRectBtnOK.Top() ) );
+ maBtnCancel.SetPosPixel( Point( maRectBtnCancel.Left(), maRectBtnCancel.Top() ) );
+ }
+}
+
+void ExportDialog::updateControls()
+{
+ GetGraphicStream();
+
+ // Size Controls
+ if ( !mbIsPixelFormat )
+ {
+ awt::Size aSize100thmm( maSize );
+ Size aSize( LogicToLogic( Size( aSize100thmm.Width * 100, aSize100thmm.Height * 100 ), MAP_100TH_MM,
+ MapMode( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) ) );
+ maMfSizeX.SetValue( aSize.Width() );
+ maMfSizeY.SetValue( aSize.Height() );
+ }
+ else
+ {
+ MapUnit aMapUnit( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) );
+ if ( aMapUnit == MAP_PIXEL )
+ { // calculating pixel count via resolution and original graphic size
+ maMfSizeX.SetDecimalDigits( 0 );
+ maMfSizeY.SetDecimalDigits( 0 );
+ maMfSizeX.SetValue( maSize.Width );
+ maMfSizeY.SetValue( maSize.Height );
+ }
+ else
+ {
+ maMfSizeX.SetDecimalDigits( 2 );
+ maMfSizeY.SetDecimalDigits( 2 );
+ double fRatio;
+ switch( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) )
+ {
+ case MAP_INCH : fRatio = static_cast< double >( maResolution.Width ) * 0.0254; break;
+ case MAP_MM : fRatio = static_cast< double >( maResolution.Width ) * 0.001; break;
+ case MAP_POINT :fRatio = ( static_cast< double >( maResolution.Width ) * 0.0254 ) / 72.0; break;
+ default:
+ case MAP_CM : fRatio = static_cast< double >( maResolution.Width ) * 0.01; break;
+ }
+ maMfSizeX.SetValue( static_cast< sal_Int32 >( ( static_cast< double >( maSize.Width * 100 ) / fRatio ) + 0.5 ) );
+ maMfSizeY.SetValue( static_cast< sal_Int32 >( ( static_cast< double >( maSize.Height * 100 ) / fRatio ) + 0.5 ) );
+ }
+ }
+ sal_Int32 nResolution = 0;
+ switch( maLbResolution.GetSelectEntryPos() )
+ {
+ case 0 : nResolution = maResolution.Width / 100; break; // pixels / cm
+ case 2 : nResolution = maResolution.Width; break; // pixels / meter
+ default:
+ case 1 : nResolution = maResolution.Width * 0.0254; break; // pixels / inch
+ }
+ maNfResolution.SetValue( nResolution );
+
+ if ( maSbCompression.IsVisible() )
+ maSbCompression.SetThumbPos( maNfCompression.GetValue() );
+
+ // updating estimated size
+ sal_Int64 nRealFileSize( mpTempStream->Tell() );
+ if ( mbIsPixelFormat )
+ {
+ String aEst( nRealFileSize ? msEstimatedSizePix2 : msEstimatedSizePix1 );
+ sal_Int64 nRawFileSize( GetRawFileSize() );
+ xub_StrLen nInd = aEst.Search( '%' );
+ aEst.Replace( nInd, 2, ImpValueOfInKB( nRawFileSize ) );
+
+ if ( nRealFileSize )
+ {
+ nInd = aEst.Search( '%', nInd );
+ aEst.Replace( nInd, 2, ImpValueOfInKB( nRealFileSize ) );
+ }
+ maFtEstimatedSize.SetText( aEst );
+ }
+ else
+ {
+ if ( mnMaxFilesizeForRealtimePreview )
+ {
+ String aEst( msEstimatedSizeVec );
+ xub_StrLen nInd = aEst.Search( '%', 0 );
+ aEst.Replace( nInd, 2, ImpValueOfInKB( nRealFileSize ) );
+ maFtEstimatedSize.SetText( aEst );
+ }
+ }
+ updatePreview();
+
+ // EPS
+ if ( maRbEPSLevel1.IsVisible() )
+ {
+ sal_Bool bEnabled = maRbEPSLevel1.IsChecked() == sal_False;
+ maRbEPSColorFormat1.Enable( bEnabled );
+ maRbEPSColorFormat2.Enable( bEnabled );
+ maRbEPSCompressionLZW.Enable( bEnabled );
+ maRbEPSCompressionNone.Enable( bEnabled );
+ }
+}
+
+ExportDialog::~ExportDialog()
+{
+ delete mpFilterOptionsItem;
+ delete mpOptionsItem;
+}
+
+
+/*************************************************************************
+|*
+|* Speichert eingestellte Werte in ini-Datei
+|*
+\************************************************************************/
+IMPL_LINK( ExportDialog, UpdateHdl, void *, EMPTYARG )
+{
+ updateControls();
+ return 0;
+}
+
+IMPL_LINK( ExportDialog, UpdateHdlMtfSizeX, void *, EMPTYARG )
+{
+ double fRatio = static_cast< double >( maOriginalSize.Height ) / maOriginalSize.Width;
+
+ if ( mbIsPixelFormat )
+ {
+ switch( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) )
+ {
+ case MAP_INCH : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.0254 * maMfSizeX.GetValue() / 100.0 + 0.5 ); break;
+ case MAP_CM : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.01 * maMfSizeX.GetValue() / 100.0 + 0.5 ); break;
+ case MAP_MM : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.001 * maMfSizeX.GetValue() / 100.0 + 0.5 ); break;
+ case MAP_POINT : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.0254 * maMfSizeX.GetValue() / 100.0 * 72 + 0.5 ); break;
+ default:
+ case MAP_PIXEL : maSize.Width = maMfSizeX.GetValue(); break;
+ }
+ maSize.Height = static_cast< sal_Int32 >( fRatio * maSize.Width + 0.5 );
+ }
+ else
+ {
+ Fraction aFract( 1, 100 );
+ sal_Int32 nWidth = maMfSizeX.GetValue();
+ sal_Int32 nHeight= static_cast< sal_Int32 >( nWidth * fRatio );
+ const Size aSource( static_cast< sal_Int32 >( nWidth ), static_cast< sal_Int32 >( nHeight ) );
+ MapMode aSourceMapMode( GetMapUnit( maLbSizeX.GetSelectEntryPos() ),Point(), aFract, aFract );
+ Size aDest( LogicToLogic( aSource, aSourceMapMode, MAP_100TH_MM ) );
+
+ maSize.Width = aDest.Width();
+ if ( mbPreserveAspectRatio )
+ maSize.Height = aDest.Height();
+ }
+ updateControls();
+ return 0;
+}
+
+IMPL_LINK( ExportDialog, UpdateHdlMtfSizeY, void *, EMPTYARG )
+{
+ double fRatio = static_cast< double >( maOriginalSize.Width ) / maOriginalSize.Height;
+
+ if ( mbIsPixelFormat )
+ {
+ switch( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) )
+ {
+ case MAP_INCH : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.0254 * maMfSizeY.GetValue() / 100.0 + 0.5 ); break;
+ case MAP_CM : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.01 * maMfSizeY.GetValue() / 100.0 + 0.5 ); break;
+ case MAP_MM : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.001 * maMfSizeY.GetValue() / 100.0 + 0.5 ); break;
+ case MAP_POINT : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.0254 * maMfSizeY.GetValue() / 100.0 * 72 + 0.5 ); break;
+ default:
+ case MAP_PIXEL : maSize.Height = maMfSizeY.GetValue(); break;
+ }
+ maSize.Width = static_cast< sal_Int32 >( fRatio * maSize.Height + 0.5 );
+ }
+ else
+ {
+ Fraction aFract( 1, 100 );
+ sal_Int32 nHeight= maMfSizeY.GetValue();
+ sal_Int32 nWidth = static_cast< sal_Int32 >( nHeight * fRatio );
+ const Size aSource( static_cast< sal_Int32 >( nWidth ), static_cast< sal_Int32 >( nHeight ) );
+ MapMode aSourceMapMode( GetMapUnit( maLbSizeX.GetSelectEntryPos() ),Point(), aFract, aFract );
+ Size aDest( LogicToLogic( aSource, aSourceMapMode, MAP_100TH_MM ) );
+
+ maSize.Height = aDest.Height();
+ if ( mbPreserveAspectRatio )
+ maSize.Width = aDest.Width();
+ }
+ updateControls();
+ return 0;
+}
+
+IMPL_LINK( ExportDialog, UpdateHdlNfResolution, void *, EMPTYARG )
+{
+ sal_Int32 nResolution = maNfResolution.GetValue();
+ if ( maLbResolution.GetSelectEntryPos() == 0 ) // pixels / cm
+ nResolution *= 100;
+ else if ( maLbResolution.GetSelectEntryPos() == 1 ) // pixels / inch
+ nResolution = static_cast< sal_Int32 >( ( ( static_cast< double >( nResolution ) + 0.5 ) / 0.0254 ) );
+ maResolution.Width = nResolution;
+ maResolution.Height= nResolution;
+
+ updateControls();
+ return 0;
+}
+
+IMPL_LINK( ExportDialog, SbCompressionUpdateHdl, void *, EMPTYARG )
+{
+ maNfCompression.SetValue( maSbCompression.GetThumbPos() );
+ updateControls();
+ return 0;
+}
+
+IMPL_LINK( ExportDialog, OK, void *, EMPTYARG )
+{
+ // writing config parameter
+
+
+ mrFltCallPara.aFilterData = GetFilterData( sal_True );
+ EndDialog( RET_OK );
+
+ return 0;
+}
+
diff --git a/svtools/source/filter.vcl/filter/exportdialog.hrc b/svtools/source/filter.vcl/filter/exportdialog.hrc
new file mode 100755
index 000000000000..e230bcd2c5c3
--- /dev/null
+++ b/svtools/source/filter.vcl/filter/exportdialog.hrc
@@ -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 <svtools/svtools.hrc>
+
+#define BTN_OK 1
+#define BTN_CANCEL 1
+#define BTN_HELP 1
+
+#define FL_EXPORT_SIZE 1
+#define FL_COLOR_DEPTH 2
+#define FL_JPG_QUALITY 3
+#define FL_COMPRESSION 4
+#define FL_MODE 5
+#define FL_GIF_DRAWING_OBJECTS 6
+#define FL_PBM_OPTIONS 7
+#define FL_EPS_PREVIEW 8
+#define FL_EPS_VERSION 9
+#define FL_EPS_COLOR_FORMAT 10
+#define FL_ESTIMATED_SIZE 11
+#define FL_BUTTONS 12
+
+#define FT_SIZEX 1
+#define FT_SIZEY 2
+#define FT_RESOLUTION 3
+#define FT_JPG_MIN 4
+#define FT_JPG_MAX 5
+#define FT_PNG_MIN 6
+#define FT_PNG_MAX 7
+#define FT_ESTIMATED_SIZE 8
+
+#define NF_RESOLUTION 1
+#define NF_COMPRESSION 2
+#define NF_ZOOM 3
+
+#define MF_SIZEX 1
+#define MF_SIZEY 2
+
+#define LB_SIZEX 1
+#define LB_SIZEY 2
+#define LB_RESOLUTION 3
+#define LB_COLOR_DEPTH 4
+
+#define RB_BINARY 1
+#define RB_TEXT 2
+#define RB_EPS_LEVEL1 3
+#define RB_EPS_LEVEL2 4
+#define RB_EPS_COLOR_FORMAT1 5
+#define RB_EPS_COLOR_FORMAT2 6
+#define RB_EPS_COMPRESSION_LZW 7
+#define RB_EPS_COMPRESSION_NONE 8
+
+#define CB_JPG_PREVIEW 1
+#define CB_INTERLACED 2
+#define CB_RLE_ENCODING 3
+#define CB_SAVE_TRANSPARENCY 4
+#define CB_EPS_PREVIEW_TIFF 5
+#define CB_EPS_PREVIEW_EPSI 6
+
+#define FB_JPG_PREVIEW 1
+
+#define SB_COMPRESSION 1
+#define SB_JPG_PREVIEW_HORZ 2
+#define SB_JPG_PREVIEW_VERT 3
+#define SB_ZOOM 4
+
+#define STR_1BIT_THRESHOLD 1
+#define STR_1BIT_DITHERED 2
+#define STR_4BIT_GRAYSCALE 3
+#define STR_4BIT_COLOR_PALETTE 4
+#define STR_8BIT_GRAYSCALE 5
+#define STR_8BIT_COLOR_PALETTE 6
+#define STR_24BIT_TRUE_COLOR 7
+#define STR_ESTIMATED_SIZE_PIX_1 8
+#define STR_ESTIMATED_SIZE_PIX_2 9
+#define STR_ESTIMATED_SIZE_VEC 10
diff --git a/svtools/source/filter.vcl/filter/exportdialog.hxx b/svtools/source/filter.vcl/filter/exportdialog.hxx
new file mode 100755
index 000000000000..20a9ac3ea832
--- /dev/null
+++ b/svtools/source/filter.vcl/filter/exportdialog.hxx
@@ -0,0 +1,216 @@
+/*************************************************************************
+ *
+ * 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 _EXPORTDIALOG_HXX_
+#define _EXPORTDIALOG_HXX_
+
+#include <svtools/fltcall.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/field.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/arrange.hxx>
+#include <vcl/scrbar.hxx>
+#include <com/sun/star/document/XExporter.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+
+/*************************************************************************
+|*
+|* Dialog zum Einstellen von Filteroptionen bei Pixelformaten
+|*
+\************************************************************************/
+
+class FilterConfigItem;
+class ExportDialog : public ModalDialog
+{
+private:
+
+ FltCallDialogParameter&
+ mrFltCallPara;
+
+ ResMgr* mpMgr;
+
+ const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
+ mxMgr;
+ const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >&
+ mxSourceDocument;
+
+ FixedLine maFlExportSize;
+ FixedText maFtSizeX;
+ MetricField maMfSizeX;
+ ListBox maLbSizeX;
+ FixedText maFtSizeY;
+ MetricField maMfSizeY;
+ ListBox maLbSizeY;
+ FixedText maFtResolution;
+ NumericField maNfResolution;
+ ListBox maLbResolution;
+ FixedLine maFlColorDepth;
+ ListBox maLbColorDepth;
+ FixedLine maFlJPGQuality;
+ FixedLine maFlMode;
+ FixedLine maFlPBMOptions;
+ ScrollBar maSbCompression;
+ NumericField maNfCompression;
+ FixedText maFtJPGMin;
+ FixedText maFtJPGMax;
+ FixedText maFtPNGMin;
+ FixedText maFtPNGMax;
+ CheckBox maCbJPGPreview;
+ CheckBox maCbInterlaced;
+ CheckBox maCbRLEEncoding;
+ FixedLine maFlGIFDrawingObjects;
+ CheckBox maCbSaveTransparency;
+ RadioButton maRbBinary;
+ RadioButton maRbText;
+ FixedLine maFlEPSPreview;
+ CheckBox maCbEPSPreviewTIFF;
+ CheckBox maCbEPSPreviewEPSI;
+ FixedLine maFlEPSVersion;
+ RadioButton maRbEPSLevel1;
+ RadioButton maRbEPSLevel2;
+ FixedLine maFlEPSColorFormat;
+ RadioButton maRbEPSColorFormat1;
+ RadioButton maRbEPSColorFormat2;
+ FixedLine maFlCompression;
+ RadioButton maRbEPSCompressionLZW;
+ RadioButton maRbEPSCompressionNone;
+ FixedLine maFlEstimatedSize;
+ FixedText maFtEstimatedSize;
+ String msEstimatedSizePix1;
+ String msEstimatedSizePix2;
+ String msEstimatedSizeVec;
+ FixedLine maFlButtons;
+ FixedBitmap maFbJPGPreview;
+ ScrollBar maSbZoom;
+ NumericField maNfZoom;
+ ScrollBar maSbJPGPreviewHorz;
+ ScrollBar maSbJPGPreviewVert;
+ OKButton maBtnOK;
+ CancelButton maBtnCancel;
+ HelpButton maBtnHelp;
+
+ String ms1BitTreshold;
+ String ms1BitDithered;
+ String ms4BitGrayscale;
+ String ms4BitColorPalette;
+ String ms8BitGrayscale;
+ String ms8BitColorPalette;
+ String ms24BitColor;
+
+ vcl::RowOrColumn maLayout;
+ Size maDialogSize;
+
+ FilterConfigItem* mpOptionsItem;
+ FilterConfigItem* mpFilterOptionsItem;
+
+ String maExt;
+ String maEstimatedSizeText;
+ sal_Int16 mnFormat;
+ sal_Int32 mnMaxFilesizeForRealtimePreview;
+
+ Rectangle maRectFlButtons;
+ Rectangle maRectBtnHelp;
+ Rectangle maRectBtnOK;
+ Rectangle maRectBtnCancel;
+
+ SvStream* mpTempStream;
+ Bitmap maBitmap;
+
+ com::sun::star::awt::Size
+ maOriginalSize; // the original graphic size in 1/100mm
+ com::sun::star::awt::Size
+ maSize; // for vector graphics it always contains the logical size in 1/100mm
+
+ sal_Bool mbPreview;
+ sal_Bool mbIsPixelFormat;
+ sal_Bool mbExportSelection;
+ sal_Bool mbPreserveAspectRatio;
+
+ sal_Int32 mnInitialResolutionUnit;
+
+ // for pixel graphics it always contains the pixel count
+ com::sun::star::awt::Size
+ maResolution; // it always contains the number of pixels per meter
+
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShape >
+ mxShape;
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >
+ mxShapes;
+ com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage >
+ mxPage;
+
+
+ DECL_LINK( UpdateHdl,void* p );
+ DECL_LINK( UpdateHdlMtfSizeX,void* p );
+ DECL_LINK( UpdateHdlMtfSizeY,void* p );
+ DECL_LINK( UpdateHdlNfResolution,void* p );
+ DECL_LINK( SbCompressionUpdateHdl,void* p );
+ DECL_LINK( NfCompressionUpdateHdlX,void* p );
+
+ DECL_LINK( OK, void* p );
+
+ void createSizeControls( vcl::RowOrColumn& );
+ void createColorDepthControls( vcl::RowOrColumn& );
+ void createFilterOptions( vcl::RowOrColumn& );
+ void createButtons( vcl::RowOrColumn& );
+ void createScrollBar( vcl::RowOrColumn& );
+ void setupLayout();
+ void updatePreview();
+ void updateControls();
+
+ void GetGraphicSource();
+ sal_Bool GetGraphicStream();
+ Bitmap GetGraphicBitmap( SvStream& rStream );
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
+ GetFilterData( sal_Bool bUpdateConfig );
+
+ sal_uInt32 GetRawFileSize() const;
+ sal_Bool IsTempExportAvailable() const;
+
+ com::sun::star::awt::Size
+ GetOriginalSize();
+
+ sal_Int32 GetDefaultUnit();
+
+public:
+ ExportDialog( FltCallDialogParameter& rPara,
+ const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > rxMgr,
+ const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rxSourceDocument,
+ sal_Bool bExportSelection, sal_Bool bIsExportVectorFormat );
+ ~ExportDialog();
+};
+
+
+
+#endif // _EXPORTDIALOG_HXX_
+
diff --git a/svtools/source/filter.vcl/filter/exportdialog.src b/svtools/source/filter.vcl/filter/exportdialog.src
new file mode 100755
index 000000000000..065fcee6ba18
--- /dev/null
+++ b/svtools/source/filter.vcl/filter/exportdialog.src
@@ -0,0 +1,505 @@
+/*************************************************************************
+ *
+ * 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 "exportdialog.hrc"
+
+String DLG_EXPORT_TITLE
+{
+ Text [ en-US ] = " Options" ;
+};
+
+ModalDialog DLG_EXPORT
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 178 , 135 ) ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+
+ FixedLine FL_EXPORT_SIZE
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 110 , 8 ) ;
+ Text [ en-US ] = "Size" ;
+ };
+ FixedText FT_SIZEX
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 41 , 10 ) ;
+ Text [ en-US ] = "Width:" ;
+ };
+ MetricField MF_SIZEX
+ {
+ Hide = TRUE;
+ Border = TRUE;
+ Size = MAP_APPFONT ( 30, 12 ) ;
+ TabStop = TRUE;
+ Repeat = TRUE;
+ Spin = FALSE;
+ StrictFormat = TRUE;
+ DecimalDigits = 2;
+ Unit = FUNIT_NONE;
+ Maximum = 99999;
+ Last = 255;
+ };
+ ListBox LB_SIZEX
+ {
+ Hide = TRUE;
+ Border = TRUE ;
+ Size = MAP_APPFONT ( 60, 80 ) ;
+ DropDown = TRUE ;
+ Sort = FALSE ;
+ StringList [ en-US ] =
+ {
+ < "inches" ; > ;
+ < "cm" ; Default ; > ;
+ < "mm" ; > ;
+ < "points" ; > ;
+ < "pixels" ; > ;
+ };
+ };
+ FixedText FT_SIZEY
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 41 , 10 ) ;
+ Text [ en-US ] = "Height:" ;
+ };
+ MetricField MF_SIZEY
+ {
+ Hide = TRUE;
+ Border = TRUE;
+ Size = MAP_APPFONT ( 30, 12 );
+ TabStop = TRUE;
+ Repeat = TRUE;
+ Spin = FALSE;
+ StrictFormat = TRUE;
+ DecimalDigits = 2;
+ Unit = FUNIT_NONE;
+ Maximum = 99999;
+ Last = 255 ;
+ };
+ ListBox LB_SIZEY
+ {
+ Hide = TRUE;
+ Border = TRUE ;
+ Size = MAP_APPFONT ( 60, 80 ) ;
+ DropDown = TRUE ;
+ Sort = FALSE ;
+ StringList [ en-US ] =
+ {
+ < "inches" ; > ;
+ < "cm" ; Default ; > ;
+ < "mm" ; > ;
+ < "points" ; > ;
+ < "pixels" ; > ;
+ };
+ };
+ FixedText FT_RESOLUTION
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 41 , 10 ) ;
+ Text [ en-US ] = "Resolution:" ;
+ };
+ NumericField NF_RESOLUTION
+ {
+ Hide = TRUE;
+ Border = TRUE ;
+ Size = MAP_APPFONT ( 30, 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = FALSE ;
+ Maximum = 99999;
+ Last = 255 ;
+ };
+ ListBox LB_RESOLUTION
+ {
+ Hide = TRUE;
+ Border = TRUE ;
+ Size = MAP_APPFONT ( 60, 80 ) ;
+ DropDown = TRUE ;
+ Sort = FALSE ;
+ StringList [ en-US ] =
+ {
+ < "pixels/cm" ; > ;
+ < "pixels/inch" ; Default ; > ;
+ < "pixels/meter" ; > ;
+ };
+ };
+ FixedLine FL_COLOR_DEPTH
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 110 , 8 ) ;
+ Text [ en-US ] = "Color Depth" ;
+ };
+ ListBox LB_COLOR_DEPTH
+ {
+ Hide = TRUE;
+ Border = TRUE ;
+ Size = MAP_APPFONT ( 60, 80 ) ;
+ DropDown = TRUE ;
+ Sort = FALSE ;
+ };
+ String STR_1BIT_THRESHOLD
+ {
+ Text [ en-US ] = "1 bit threshold";
+ };
+ String STR_1BIT_DITHERED
+ {
+ Text [ en-US ] = "1 bit dithered";
+ };
+ String STR_4BIT_GRAYSCALE
+ {
+ Text [ en-US ] = "4 bit grayscale";
+ };
+ String STR_4BIT_COLOR_PALETTE
+ {
+ Text [ en-US ] = "4 bit color";
+ };
+ String STR_8BIT_GRAYSCALE
+ {
+ Text [ en-US ] = "8 bit grayscale";
+ };
+ String STR_8BIT_COLOR_PALETTE
+ {
+ Text [ en-US ] = "8 bit color";
+ };
+ String STR_24BIT_TRUE_COLOR
+ {
+ Text [ en-US ] = "24 bit true color";
+ };
+ FixedLine FL_JPG_QUALITY
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 110 , 8 ) ;
+ Text [ en-US ] = "Quality" ;
+ };
+ FixedLine FL_COMPRESSION
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 110 , 8 ) ;
+ Text [ en-US ] = "Compression" ;
+ };
+ FixedLine FL_MODE
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 110 , 8 ) ;
+ Text [ en-US ] = "Mode" ;
+ };
+ FixedLine FL_PBM_OPTIONS
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 110 , 8 ) ;
+ Text [ en-US ] = "File Format" ;
+ };
+ ScrollBar SB_COMPRESSION
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 48, 10 ) ;
+ VScroll = FALSE ;
+ HScroll = TRUE;
+ Drag = TRUE ;
+ };
+ NumericField NF_COMPRESSION
+ {
+ Hide = TRUE;
+ Border = TRUE ;
+ Size = MAP_APPFONT ( 30, 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = FALSE ;
+ Maximum = 99999;
+ Last = 255 ;
+ };
+ FixedText FT_JPG_MIN
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 41 , 10 ) ;
+ Text [ en-US ] = "1 is minimum Quality and smallest file size." ;
+ };
+ FixedText FT_JPG_MAX
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 41 , 10 ) ;
+ Text [ en-US ] = "100 is maximum Quality and biggest file size." ;
+ };
+ FixedText FT_PNG_MIN
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 41 , 10 ) ;
+ Text [ en-US ] = "0 is biggest file size and fastest loading." ;
+ };
+ FixedText FT_PNG_MAX
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 41 , 10 ) ;
+ Text [ en-US ] = "9 is smallest file size and slowest loading." ;
+ };
+ CheckBox CB_JPG_PREVIEW
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text [ en-US ] = "Preview" ;
+ };
+ CheckBox CB_INTERLACED
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text [ en-US ] = "Interlaced" ;
+ };
+ CheckBox CB_RLE_ENCODING
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text [ en-US ] = "RLE encoding" ;
+ };
+ FixedLine FL_GIF_DRAWING_OBJECTS
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 110 , 8 ) ;
+ Text [ en-US ] = "Drawing Objects" ;
+ };
+ CheckBox CB_SAVE_TRANSPARENCY
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text [ en-US ] = "Save transparency" ;
+ };
+ RadioButton RB_BINARY
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 105 , 10 ) ;
+ Text [ en-US ] = "Binary" ;
+ };
+ RadioButton RB_TEXT
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 105 , 10 ) ;
+ Text [ en-US ] = "Text" ;
+ };
+ FixedLine FL_EPS_PREVIEW
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 110 , 8 ) ;
+ Text [ en-US ] = "Preview" ;
+ };
+ CheckBox CB_EPS_PREVIEW_TIFF
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text [ en-US ] = "Image Preview (TIFF)" ;
+ };
+ CheckBox CB_EPS_PREVIEW_EPSI
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text [ en-US ] = "Interchange (EPSI)" ;
+ };
+ FixedLine FL_EPS_VERSION
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 41 , 10 ) ;
+ Text [ en-US ] = "Version" ;
+ };
+ RadioButton RB_EPS_LEVEL1
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 105 , 10 ) ;
+ Text [ en-US ] = "Level 1" ;
+ };
+ RadioButton RB_EPS_LEVEL2
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 105 , 10 ) ;
+ Text [ en-US ] = "Level 2" ;
+ };
+ FixedLine FL_EPS_COLOR_FORMAT
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 41 , 10 ) ;
+ Text [ en-US ] = "Color format" ;
+ };
+ RadioButton RB_EPS_COLOR_FORMAT1
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 105 , 10 ) ;
+ Text [ en-US ] = "Color" ;
+ };
+ RadioButton RB_EPS_COLOR_FORMAT2
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 105 , 10 ) ;
+ Text [ en-US ] = "Grayscale" ;
+ };
+ RadioButton RB_EPS_COMPRESSION_LZW
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 105 , 10 ) ;
+ Text [ en-US ] = "LZW encoding" ;
+ };
+ RadioButton RB_EPS_COMPRESSION_NONE
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 105 , 10 ) ;
+ Text [ en-US ] = "None" ;
+ };
+ FixedLine FL_ESTIMATED_SIZE
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 41 , 10 ) ;
+ };
+ FixedText FT_ESTIMATED_SIZE
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 41 , 10 ) ;
+ };
+ String STR_ESTIMATED_SIZE_PIX_1
+ {
+ Text [ en-US ] = "The picture needs about %1 KB of memory.";
+ };
+ String STR_ESTIMATED_SIZE_PIX_2
+ {
+ Text [ en-US ] = "The picture needs about %1 KB of memory,\n the file size is %2 KB.";
+ };
+ String STR_ESTIMATED_SIZE_VEC
+ {
+ Text [ en-US ] = "The file size is %1 KB.";
+ };
+ FixedLine FL_BUTTONS
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 41 , 10 ) ;
+ };
+ FixedBitmap FB_JPG_PREVIEW
+ {
+ Hide = TRUE;
+ OutputSize = TRUE ;
+ Scale = TRUE;
+ Border = TRUE;
+ };
+ ScrollBar SB_ZOOM
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 48, 10 );
+ VScroll = FALSE;
+ HScroll = TRUE;
+ Drag = TRUE;
+ MinPos = 5;
+ MaxPos = 100;
+ ThumbPos = 50;
+ };
+ NumericField NF_ZOOM
+ {
+ Hide = TRUE;
+ Border = TRUE ;
+ Size = MAP_APPFONT ( 30, 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = FALSE ;
+ Maximum = 3000;
+ Last = 255 ;
+ };
+ ScrollBar SB_JPG_PREVIEW_HORZ
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 48, 10 );
+ VScroll = FALSE;
+ HScroll = TRUE;
+ Drag = TRUE;
+ MinPos = 0;
+ MaxPos = 100;
+ ThumbPos = 50;
+ };
+ ScrollBar SB_JPG_PREVIEW_VERT
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 48, 10 );
+ VScroll = TRUE;
+ HScroll = FALSE;
+ Drag = TRUE;
+ MinPos = 0;
+ MaxPos = 100;
+ ThumbPos = 50;
+ };
+ OKButton BTN_OK
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_CANCEL
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ HelpButton BTN_HELP
+ {
+ Hide = TRUE;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/svtools/source/filter.vcl/filter/filter.cxx b/svtools/source/filter.vcl/filter/filter.cxx
index db1f4c11cf94..65f51ce212f4 100644
--- a/svtools/source/filter.vcl/filter/filter.cxx
+++ b/svtools/source/filter.vcl/filter/filter.cxx
@@ -52,7 +52,7 @@
#include "xbmread.hxx"
#include "xpmread.hxx"
#include <svl/solar.hrc>
-#include "strings.hrc"
+#include <svtools/svtools.hrc>
#include "sgffilt.hxx"
#include "osl/module.hxx"
#include <com/sun/star/uno/Reference.h>
@@ -752,7 +752,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r
if ( rGraphic.GetType() != GRAPHIC_NONE )
{
- sal_Int32 nMode = rConfigItem.ReadInt32( String( ResId( KEY_MODE, *pResMgr ) ), -1 );
+ sal_Int32 nMode = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ExportMode" ) ), -1 );
if ( nMode == -1 ) // the property is not there, this is possible, if the graphic filter
{ // is called via UnoGraphicExporter and not from a graphic export Dialog
@@ -782,7 +782,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r
Bitmap aBitmap( rGraphic.GetBitmap() );
MapMode aMap( MAP_100TH_INCH );
- sal_Int32 nDPI = rConfigItem.ReadInt32( String( ResId( KEY_RES, *pResMgr ) ), 75 );
+ sal_Int32 nDPI = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Resolution" ) ), 75 );
Fraction aFrac( 1, Min( Max( nDPI, sal_Int32( 75 ) ), sal_Int32( 600 ) ) );
aMap.SetScaleX( aFrac );
@@ -806,7 +806,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r
else
aGraphic = rGraphic;
- sal_Int32 nColors = rConfigItem.ReadInt32( String( ResId( KEY_COLORS, *pResMgr ) ), 0 ); // #92767#
+ sal_Int32 nColors = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Color" ) ), 0 ); // #92767#
if ( nColors ) // graphic conversion necessary ?
{
BitmapEx aBmpEx( aGraphic.GetBitmapEx() );
@@ -1771,7 +1771,7 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
aBmp = aGraphic.GetBitmap();
}
ResMgr* pResMgr = CREATERESMGR( svt );
- sal_Bool bRleCoding = aConfigItem.ReadBool( String( ResId( KEY_RLE_CODING, *pResMgr ) ), sal_True );
+ sal_Bool bRleCoding = aConfigItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "RLE_Coding" ) ), sal_True );
// Wollen wir RLE-Kodiert speichern?
aBmp.Write( rOStm, bRleCoding );
delete pResMgr;
diff --git a/svtools/source/filter.vcl/filter/makefile.mk b/svtools/source/filter.vcl/filter/makefile.mk
index 272bb9a76b03..11d35150bda8 100644
--- a/svtools/source/filter.vcl/filter/makefile.mk
+++ b/svtools/source/filter.vcl/filter/makefile.mk
@@ -41,16 +41,11 @@ SOLARINC+=-I../../inc
# --- Files --------------------------------------------------------
SRS1NAME=$(TARGET)
-SRC1FILES= strings.src \
- dlgexpor.src \
- dlgepng.src \
- dlgejpg.src
+SRC1FILES=exportdialog.src
SLOFILES= $(SLO)$/filter.obj \
$(SLO)$/filter2.obj \
- $(SLO)$/dlgexpor.obj \
- $(SLO)$/dlgejpg.obj \
- $(SLO)$/dlgepng.obj \
+ $(SLO)$/exportdialog.obj \
$(SLO)$/sgfbram.obj \
$(SLO)$/sgvmain.obj \
$(SLO)$/sgvtext.obj \
@@ -59,28 +54,26 @@ SLOFILES= $(SLO)$/filter.obj \
$(SLO)$/FilterConfigCache.obj \
$(SLO)$/SvFilterOptionsDialog.obj
+EXCEPTIONSFILES= $(SLO)$/exportdialog.obj
+
EXCEPTIONSNOOPTFILES= $(SLO)$/filter.obj \
$(SLO)$/FilterConfigItem.obj \
$(SLO)$/FilterConfigCache.obj \
$(SLO)$/SvFilterOptionsDialog.obj
LIB1TARGET= $(SLB)$/$(TARGET).uno.lib
-LIB1OBJFILES= \
- $(SLO)$/dlgexpor.obj \
- $(SLO)$/dlgejpg.obj \
- $(SLO)$/dlgepng.obj \
- $(SLO)$/SvFilterOptionsDialog.obj
+LIB1OBJFILES= $(SLO)$/exportdialog.obj \
+ $(SLO)$/SvFilterOptionsDialog.obj
LIB2TARGET= $(SLB)$/$(TARGET).lib
-LIB2OBJFILES= \
- $(SLO)$/filter.obj \
- $(SLO)$/filter2.obj \
- $(SLO)$/sgfbram.obj \
- $(SLO)$/sgvmain.obj \
- $(SLO)$/sgvtext.obj \
- $(SLO)$/sgvspln.obj \
- $(SLO)$/FilterConfigItem.obj \
- $(SLO)$/FilterConfigCache.obj
+LIB2OBJFILES= $(SLO)$/filter.obj \
+ $(SLO)$/filter2.obj \
+ $(SLO)$/sgfbram.obj \
+ $(SLO)$/sgvmain.obj \
+ $(SLO)$/sgvtext.obj \
+ $(SLO)$/sgvspln.obj \
+ $(SLO)$/FilterConfigItem.obj \
+ $(SLO)$/FilterConfigCache.obj
# --- Targets -------------------------------------------------------
diff --git a/svtools/source/filter.vcl/filter/strings.hrc b/svtools/source/filter.vcl/filter/strings.hrc
deleted file mode 100644
index 0eea67fb2338..000000000000
--- a/svtools/source/filter.vcl/filter/strings.hrc
+++ /dev/null
@@ -1,27 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include <svtools/svtools.hrc>
diff --git a/svtools/source/filter.vcl/filter/strings.src b/svtools/source/filter.vcl/filter/strings.src
deleted file mode 100644
index 60e628ee0b5c..000000000000
--- a/svtools/source/filter.vcl/filter/strings.src
+++ /dev/null
@@ -1,85 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "strings.hrc"
-
-String EXPORT_DIALOG_TITLE
-{
- Text [ en-US ] = " Options" ;
-};
-
-String KEY_MODE
-{
- Text = "ExportMode" ;
-};
-
-String KEY_RES
-{
- Text = "Resolution" ;
-};
-
-String KEY_SIZE
-{
- Text = "Size" ;
-};
-
-String KEY_COLORS
-{
- Text = "Color" ;
-};
-
-String KEY_RLE_CODING
-{
- Text = "RLE_Coding" ;
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index fbf95406a63a..f1674dcd7d4a 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -231,19 +231,19 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadStandardImage( co
if( ( 0 == rResourceURL.getToken( 0, '/', nIndex ).compareToAscii( "private:standardimage" ) ) )
{
rtl::OUString sImageName( rResourceURL.copy( nIndex ) );
- if ( sImageName.compareToAscii( "info" ) )
+ if ( sImageName.equalsAscii( "info" ) )
{
xRet = InfoBox::GetStandardImage().GetXGraphic();
}
- else if ( sImageName.compareToAscii( "warning" ) )
+ else if ( sImageName.equalsAscii( "warning" ) )
{
xRet = WarningBox::GetStandardImage().GetXGraphic();
}
- else if ( sImageName.compareToAscii( "error" ) )
+ else if ( sImageName.equalsAscii( "error" ) )
{
xRet = ErrorBox::GetStandardImage().GetXGraphic();
}
- else if ( sImageName.compareToAscii( "query" ) )
+ else if ( sImageName.equalsAscii( "query" ) )
{
xRet = QueryBox::GetStandardImage().GetXGraphic();
}
diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx
index ad8f7a7562d3..f6a58ad17efe 100644
--- a/svtools/source/table/defaultinputhandler.cxx
+++ b/svtools/source/table/defaultinputhandler.cxx
@@ -173,6 +173,7 @@ namespace svt { namespace table
if ( ( pActions->nKeyCode == nKeyCode ) && ( pActions->nKeyModifier == rKeyCode.GetAllModifier() ) )
{
bHandled = _rControl.dispatchAction( pActions->eAction );
+ bHandled = true; // always handled issue #i114340
break;
}
}
diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx
index e2e1ce5353fe..bbd7f6829369 100644
--- a/svtools/source/table/tabledatawindow.cxx
+++ b/svtools/source/table/tabledatawindow.cxx
@@ -45,7 +45,6 @@ namespace svt { namespace table
TableDataWindow::TableDataWindow( TableControl_Impl& _rTableControl )
:Window( &_rTableControl.getAntiImpl() )
,m_rTableControl ( _rTableControl )
- ,m_nRowAlreadySelected( -1 )
{
// by default, use the background as determined by the style settings
const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() );
@@ -110,15 +109,17 @@ namespace svt { namespace table
{
Point aPoint = rMEvt.GetPosPixel();
RowPos nCurRow = m_rTableControl.getCurrentRow(aPoint);
+ std::vector<RowPos> selectedRows(m_rTableControl.getSelectedRows());
if ( !m_rTableControl.getInputHandler()->MouseButtonDown( m_rTableControl, rMEvt ) )
Window::MouseButtonDown( rMEvt );
else
{
if(nCurRow >= 0 && m_rTableControl.getSelEngine()->GetSelectionMode() != NO_SELECTION)
{
- if( m_nRowAlreadySelected != nCurRow )
+ bool found = std::find(selectedRows.begin(),selectedRows.end(), nCurRow) != selectedRows.end();
+
+ if( !found )
{
- m_nRowAlreadySelected = nCurRow;
m_aSelectHdl.Call( NULL );
}
}
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index 7fb1a007960f..d1ea854cce61 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -1322,6 +1322,21 @@ void TreeControlPeer::setProperty( const ::rtl::OUString& PropertyName, const An
switch( GetPropertyId( PropertyName ) )
{
+ case BASEPROPERTY_HIDEINACTIVESELECTION:
+ {
+ sal_Bool bEnabled = sal_False;
+ if ( aValue >>= bEnabled )
+ {
+ WinBits nStyle = rTree.GetWindowBits();
+ if ( bEnabled )
+ nStyle |= WB_HIDESELECTION;
+ else
+ nStyle &= ~WB_HIDESELECTION;
+ rTree.SetWindowBits( nStyle );
+ }
+ }
+ break;
+
case BASEPROPERTY_TREE_SELECTIONTYPE:
{
SelectionType eSelectionType;
@@ -1412,6 +1427,9 @@ Any TreeControlPeer::getProperty( const ::rtl::OUString& PropertyName ) throw(Ru
UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
switch(nPropId)
{
+ case BASEPROPERTY_HIDEINACTIVESELECTION:
+ return Any( ( rTree.GetWindowBits() & WB_HIDESELECTION ) != 0 ? sal_True : sal_False );
+
case BASEPROPERTY_TREE_SELECTIONTYPE:
{
SelectionType eSelectionType;
diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx
index 9440c0e69f26..147b11aceb11 100644
--- a/svtools/source/uno/wizard/unowizard.cxx
+++ b/svtools/source/uno/wizard/unowizard.cxx
@@ -414,7 +414,7 @@ namespace svt { namespace uno
::osl::MutexGuard aGuard( m_aMutex );
WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
- ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::getCurrentPage: invalid dialog implementation!" );
+ ENSURE_OR_RETURN( pWizardImpl, "Wizard::getCurrentPage: invalid dialog implementation!", Reference< XWizardPage >() );
return pWizardImpl->getCurrentWizardPage();
}
diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx
index c54634017392..80096ce70f32 100644
--- a/svx/source/dialog/checklbx.cxx
+++ b/svx/source/dialog/checklbx.cxx
@@ -212,7 +212,7 @@ void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( rMEvt.IsLeft() )
{
- Point aPnt = rMEvt.GetPosPixel();
+ const Point aPnt = rMEvt.GetPosPixel();
SvLBoxEntry* pEntry = GetEntry( aPnt );
if ( pEntry )
@@ -230,6 +230,13 @@ void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt )
{
ToggleCheckButton( pEntry );
SvTreeListBox::MouseButtonDown( rMEvt );
+
+ // check if the entry below the mouse changed during the base method call. This is possible if,
+ // for instance, a handler invoked by the base class tampers with the list entries.
+ const SvLBoxEntry* pNewEntry = GetEntry( aPnt );
+ if ( pNewEntry != pEntry )
+ return;
+
if ( bCheck != ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ) )
CheckButtonHdl();
return;
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 7705a2dd08df..8000de0d2103 100644..100755
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -59,6 +59,28 @@
#define RULER_TAB_RTL ((USHORT)0x0010)
#endif
+#include <comphelper/uieventslogger.hxx>
+
+namespace
+{
+ void lcl_logRulerUse(const ::rtl::OUString& sURL) //#i99729#
+ {
+ using namespace ::com::sun::star;
+ util::URL aTargetURL;
+ aTargetURL.Complete = sURL;
+ aTargetURL.Main = sURL;
+ if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
+ {
+ ::rtl::OUString sAppName;
+ uno::Sequence<beans::PropertyValue> source;
+ ::comphelper::UiEventsLogger::appendDispatchOrigin(source, sAppName, ::rtl::OUString::createFromAscii("SfxRuler"));
+ ::comphelper::UiEventsLogger::logDispatch(aTargetURL, source);
+ }
+ }
+}
+
+
+
// STATIC DATA -----------------------------------------------------------
#define CTRL_ITEM_COUNT 14
@@ -2806,6 +2828,7 @@ void __EXPORT SvxRuler::Click()
*/
{
+ lcl_logRulerUse(::rtl::OUString::createFromAscii(".special://SfxRuler/Click"));
Ruler::Click();
if( bActive )
{
@@ -3440,6 +3463,7 @@ long __EXPORT SvxRuler::StartDrag()
*/
{
+ lcl_logRulerUse(::rtl::OUString::createFromAscii(".special://SfxRuler/StartDrag"));
BOOL bContentProtected = pRuler_Imp->aProtectItem.IsCntntProtected();
if(!bValid)
return FALSE;
@@ -3559,6 +3583,7 @@ void __EXPORT SvxRuler::EndDrag()
*/
{
+ lcl_logRulerUse(::rtl::OUString::createFromAscii(".special://SfxRuler/EndDrag"));
const BOOL bUndo = IsDragCanceled();
const long lPos = GetDragPos();
DrawLine_Impl(lTabPos, 6, bHorz);
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index d860f4973fd2..9c5affc38f9b 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -708,6 +708,7 @@ void SvxItemPropertySet_ObtainSettingsFromPropertySet(const SvxItemPropertySet&
// next entry
++aSrcIt;
}
+ const_cast< SvxItemPropertySet& >(rPropSet).ClearAllUsrAny();
}
}
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index cf92a707e40f..7f16e4e4d44c 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -27,9 +27,7 @@
#ifndef SW_UNDOBJ_HXX
#define SW_UNDOBJ_HXX
-// --> OD 2006-11-01 #130889#
#include <vector>
-// <--
#include <memory>
#include <boost/shared_ptr.hpp>
@@ -1718,7 +1716,7 @@ public:
struct _UndoTransliterate_Data;
class SwUndoTransliterate : public SwUndo, public SwUndRng
{
- _UndoTransliterate_Data *pData, *pLastData;
+ std::vector< _UndoTransliterate_Data * > aChanges;
sal_uInt32 nType;
public:
@@ -1732,7 +1730,7 @@ public:
void AddChanges( SwTxtNode& rTNd, xub_StrLen nStart, xub_StrLen nLen,
::com::sun::star::uno::Sequence <sal_Int32>& rOffsets );
- BOOL HasData() const {return 0 != pData; }
+ BOOL HasData() const { return aChanges.size() > 0; }
};
//--------------------------------------------------------------------
diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx
index 8032d3506a27..f492696ef8ac 100644
--- a/sw/source/core/attr/cellatr.cxx
+++ b/sw/source/core/attr/cellatr.cxx
@@ -28,9 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <float.h>
+#include <rtl/math.hxx>
-#include <float.h>
#include <hintids.hxx> // fuer RES_..
#include <cellatr.hxx>
#include <calc.hxx>
@@ -249,8 +250,12 @@ SwTblBoxValue::SwTblBoxValue( const double nVal )
int SwTblBoxValue::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
- return nValue == ((SwTblBoxValue&)rAttr).nValue;
+ ASSERT(SfxPoolItem::operator==(rAttr), "SwTblBoxValue: item not equal");
+ SwTblBoxValue const& rOther( static_cast<SwTblBoxValue const&>(rAttr) );
+ // items with NaN should be equal to enable pooling
+ return ::rtl::math::isNan(nValue)
+ ? ::rtl::math::isNan(rOther.nValue)
+ : (nValue == rOther.nValue);
}
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 31484ac303dd..bdcf8caaff7b 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -38,6 +38,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/i18n/WordType.hdl>
#include <unotools/charclass.hxx>
+#include <unotools/transliterationwrapper.hxx>
#include <fmtanchr.hxx>
#include <fmtcntnt.hxx>
#include <fmtpdsc.hxx>
@@ -72,6 +73,8 @@
#include <unoflatpara.hxx>
#include <SwGrammarMarkUp.hxx>
+#include <vector>
+
using ::rtl::OUString;
using namespace ::com::sun::star;
using namespace ::com::sun::star::linguistic2;
@@ -2653,8 +2656,9 @@ bool SwDoc::DelFullPara( SwPaM& rPam )
}
-void SwDoc::TransliterateText( const SwPaM& rPaM,
- utl::TransliterationWrapper& rTrans )
+void SwDoc::TransliterateText(
+ const SwPaM& rPaM,
+ utl::TransliterationWrapper& rTrans )
{
SwUndoTransliterate* pUndo;
if( DoesUndo() )
@@ -2663,15 +2667,17 @@ void SwDoc::TransliterateText( const SwPaM& rPaM,
pUndo = 0;
const SwPosition* pStt = rPaM.Start(),
- * pEnd = pStt == rPaM.GetPoint() ? rPaM.GetMark()
- : rPaM.GetPoint();
- ULONG nSttNd = pStt->nNode.GetIndex(), nEndNd = pEnd->nNode.GetIndex();
+ * pEnd = rPaM.End();
+ ULONG nSttNd = pStt->nNode.GetIndex(),
+ nEndNd = pEnd->nNode.GetIndex();
xub_StrLen nSttCnt = pStt->nContent.GetIndex(),
nEndCnt = pEnd->nContent.GetIndex();
SwTxtNode* pTNd = pStt->nNode.GetNode().GetTxtNode();
- if( pStt == pEnd && pTNd ) // no region ?
+ if( pStt == pEnd && pTNd ) // no selection?
{
+ // set current word as 'area of effect'
+
Boundary aBndry;
if( pBreakIt->GetBreakIter().is() )
aBndry = pBreakIt->GetBreakIter()->getWordBoundary(
@@ -2687,21 +2693,24 @@ void SwDoc::TransliterateText( const SwPaM& rPaM,
}
}
- if( nSttNd != nEndNd )
+ if( nSttNd != nEndNd ) // is more than one text node involved?
{
+ // iterate over all effected text nodes, the first and the last one
+ // may be incomplete because the selection starts and/or ends there
+
SwNodeIndex aIdx( pStt->nNode );
if( nSttCnt )
{
aIdx++;
if( pTNd )
- pTNd->TransliterateText( rTrans, nSttCnt,
- pTNd->GetTxt().Len(), pUndo );
+ pTNd->TransliterateText( rTrans, nSttCnt, pTNd->GetTxt().Len(), pUndo );
}
for( ; aIdx.GetIndex() < nEndNd; aIdx++ )
+ {
if( 0 != ( pTNd = aIdx.GetNode().GetTxtNode() ))
- pTNd->TransliterateText( rTrans, 0, pTNd->GetTxt().Len(),
- pUndo );
+ pTNd->TransliterateText( rTrans, 0, pTNd->GetTxt().Len(), pUndo );
+ }
if( nEndCnt && 0 != ( pTNd = pEnd->nNode.GetNode().GetTxtNode() ))
pTNd->TransliterateText( rTrans, 0, nEndCnt, pUndo );
@@ -2721,6 +2730,8 @@ void SwDoc::TransliterateText( const SwPaM& rPaM,
}
SetModified();
}
+
+
#define MAX_REDLINE_COUNT 250
// -----------------------------------------------------------------------------
void SwDoc::checkRedlining(RedlineMode_t& _rReadlineMode)
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 944eb70b2c3d..0630dbd722b6 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -36,6 +36,7 @@
#include <time.h> // clock()
#include <tools/stream.hxx>
#endif
+
#include <hintids.hxx>
#include <vcl/svapp.hxx>
#include <svl/itemiter.hxx>
@@ -46,9 +47,6 @@
#include <editeng/hangulhanja.hxx>
#include <SwSmartTagMgr.hxx>
#include <linguistic/lngprops.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/i18n/WordType.hdl>
-#include <com/sun/star/i18n/ScriptType.hdl>
#include <unotools/transliterationwrapper.hxx>
#include <unotools/charclass.hxx>
#include <dlelstnr.hxx>
@@ -86,6 +84,15 @@
#include <unomid.h>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/i18n/WordType.hdl>
+#include <com/sun/star/i18n/ScriptType.hdl>
+#include <com/sun/star/i18n/TransliterationModules.hpp>
+#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
+
+#include <vector>
+
+
using rtl::OUString;
using namespace ::com::sun::star;
using namespace ::com::sun::star::frame;
@@ -1578,49 +1585,247 @@ void SwLinguStatistik::Flush()
#endif
+
+struct TransliterationChgData
+{
+ xub_StrLen nStart;
+ xub_StrLen nLen;
+ String sChanged;
+ Sequence< sal_Int32 > aOffsets;
+};
+
// change text to Upper/Lower/Hiragana/Katagana/...
-void SwTxtNode::TransliterateText( utl::TransliterationWrapper& rTrans,
- xub_StrLen nStt, xub_StrLen nEnd, SwUndoTransliterate* pUndo )
+void SwTxtNode::TransliterateText(
+ utl::TransliterationWrapper& rTrans,
+ xub_StrLen nStt, xub_StrLen nEnd,
+ SwUndoTransliterate* pUndo )
{
- if( nStt < nEnd )
+ if (nStt < nEnd && pBreakIt->GetBreakIter().is())
{
- SwLanguageIterator* pIter;
- if( rTrans.needLanguageForTheMode() )
- pIter = new SwLanguageIterator( *this, nStt );
- else
- pIter = 0;
+ // since we don't use Hiragana/Katakana or half-width/full-width transliterations here
+ // it is fine to use ANYWORD_IGNOREWHITESPACES. (ANY_WORD btw is broken and will
+ // occasionaly miss words in consecutive sentences). Also with ANYWORD_IGNOREWHITESPACES
+ // text like 'just-in-time' will be converted to 'Just-In-Time' which seems to be the
+ // proper thing to do.
+ const sal_Int16 nWordType = WordType::ANYWORD_IGNOREWHITESPACES;
+
+ //! In order to have less trouble with changing text size, e.g. because
+ //! of ligatures or � (German small sz) being resolved, we need to process
+ //! the text replacements from end to start.
+ //! This way the offsets for the yet to be changed words will be
+ //! left unchanged by the already replaced text.
+ //! For this we temporarily save the changes to be done in this vector
+ std::vector< TransliterationChgData > aChanges;
+ TransliterationChgData aChgData;
+
+ if (rTrans.getType() == (sal_uInt32)TransliterationModulesExtra::TITLE_CASE)
+ {
+ // for 'capitalize every word' we need to iterate over each word
+
+ Boundary aSttBndry;
+ Boundary aEndBndry;
+ aSttBndry = pBreakIt->GetBreakIter()->getWordBoundary(
+ GetTxt(), nStt,
+ pBreakIt->GetLocale( GetLang( nStt ) ),
+ nWordType,
+ TRUE /*prefer forward direction*/);
+ aEndBndry = pBreakIt->GetBreakIter()->getWordBoundary(
+ GetTxt(), nEnd,
+ pBreakIt->GetLocale( GetLang( nEnd ) ),
+ nWordType,
+ FALSE /*prefer backward direction*/);
+
+ // prevent backtracking to the previous word if selection is at word boundary
+ if (aSttBndry.endPos <= nStt)
+ {
+ aSttBndry = pBreakIt->GetBreakIter()->nextWord(
+ GetTxt(), aSttBndry.endPos,
+ pBreakIt->GetLocale( GetLang( aSttBndry.endPos ) ),
+ nWordType);
+ }
+ // prevent advancing to the next word if selection is at word boundary
+ if (aEndBndry.startPos >= nEnd)
+ {
+ aEndBndry = pBreakIt->GetBreakIter()->previousWord(
+ GetTxt(), aEndBndry.startPos,
+ pBreakIt->GetLocale( GetLang( aEndBndry.startPos ) ),
+ nWordType);
+ }
- xub_StrLen nEndPos;
- sal_uInt16 nLang;
- do {
- if( pIter )
+ Boundary aCurWordBndry( aSttBndry );
+ while (aCurWordBndry.startPos <= aEndBndry.startPos)
{
- nLang = pIter->GetLanguage();
- nEndPos = pIter->GetChgPos();
- if( nEndPos > nEnd )
- nEndPos = nEnd;
+ nStt = (xub_StrLen)aCurWordBndry.startPos;
+ nEnd = (xub_StrLen)aCurWordBndry.endPos;
+ sal_Int32 nLen = nEnd - nStt;
+ DBG_ASSERT( nLen > 0, "invalid word length of 0" );
+#if OSL_DEBUG_LEVEL > 1
+ String aText( GetTxt().Copy( nStt, nLen ) );
+#endif
+
+ Sequence <sal_Int32> aOffsets;
+ String sChgd( rTrans.transliterate( GetTxt(), GetLang( nStt ), nStt, nLen, &aOffsets ));
+
+ if (!m_Text.Equals( sChgd, nStt, nLen ))
+ {
+ aChgData.nStart = nStt;
+ aChgData.nLen = nLen;
+ aChgData.sChanged = sChgd;
+ aChgData.aOffsets = aOffsets;
+ aChanges.push_back( aChgData );
+ }
+
+ aCurWordBndry = pBreakIt->GetBreakIter()->nextWord(
+ GetTxt(), nEnd,
+ pBreakIt->GetLocale( GetLang( nEnd ) ),
+ nWordType);
}
- else
+ }
+ else if (rTrans.getType() == (sal_uInt32)TransliterationModulesExtra::SENTENCE_CASE)
+ {
+ // for 'sentence case' we need to iterate sentence by sentence
+
+ sal_Int32 nLastStart = pBreakIt->GetBreakIter()->beginOfSentence(
+ GetTxt(), nEnd,
+ pBreakIt->GetLocale( GetLang( nEnd ) ) );
+ sal_Int32 nLastEnd = pBreakIt->GetBreakIter()->endOfSentence(
+ GetTxt(), nLastStart,
+ pBreakIt->GetLocale( GetLang( nLastStart ) ) );
+
+ // extend nStt, nEnd to the current sentence boundaries
+ sal_Int32 nCurrentStart = pBreakIt->GetBreakIter()->beginOfSentence(
+ GetTxt(), nStt,
+ pBreakIt->GetLocale( GetLang( nStt ) ) );
+ sal_Int32 nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence(
+ GetTxt(), nCurrentStart,
+ pBreakIt->GetLocale( GetLang( nCurrentStart ) ) );
+
+ // prevent backtracking to the previous sentence if selection starts at end of a sentence
+ if (nCurrentEnd <= nStt)
+ {
+ // now nCurrentStart is probably located on a non-letter word. (unless we
+ // are in Asian text with no spaces...)
+ // Thus to get the real sentence start we should locate the next real word,
+ // that is one found by DICTIONARY_WORD
+ i18n::Boundary aBndry = pBreakIt->GetBreakIter()->nextWord(
+ GetTxt(), nCurrentEnd,
+ pBreakIt->GetLocale( GetLang( nCurrentEnd ) ),
+ i18n::WordType::DICTIONARY_WORD);
+
+ // now get new current sentence boundaries
+ nCurrentStart = pBreakIt->GetBreakIter()->beginOfSentence(
+ GetTxt(), aBndry.startPos,
+ pBreakIt->GetLocale( GetLang( aBndry.startPos) ) );
+ nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence(
+ GetTxt(), nCurrentStart,
+ pBreakIt->GetLocale( GetLang( nCurrentStart) ) );
+ }
+ // prevent advancing to the next sentence if selection ends at start of a sentence
+ if (nLastStart >= nEnd)
{
- nLang = LANGUAGE_SYSTEM;
- nEndPos = nEnd;
+ // now nCurrentStart is probably located on a non-letter word. (unless we
+ // are in Asian text with no spaces...)
+ // Thus to get the real sentence start we should locate the previous real word,
+ // that is one found by DICTIONARY_WORD
+ i18n::Boundary aBndry = pBreakIt->GetBreakIter()->previousWord(
+ GetTxt(), nLastStart,
+ pBreakIt->GetLocale( GetLang( nLastStart) ),
+ i18n::WordType::DICTIONARY_WORD);
+ nLastEnd = pBreakIt->GetBreakIter()->endOfSentence(
+ GetTxt(), aBndry.startPos,
+ pBreakIt->GetLocale( GetLang( aBndry.startPos) ) );
+ if (nCurrentEnd > nLastEnd)
+ nCurrentEnd = nLastEnd;
}
- xub_StrLen nLen = nEndPos - nStt;
- Sequence <sal_Int32> aOffsets;
- String sChgd( rTrans.transliterate( m_Text, nLang, nStt, nLen,
- &aOffsets ));
- if( !m_Text.Equals( sChgd, nStt, nLen ) )
+ while (nCurrentStart < nLastEnd)
{
- if ( pUndo )
+ sal_Int32 nLen = nCurrentEnd - nCurrentStart;
+ DBG_ASSERT( nLen > 0, "invalid word length of 0" );
+#if OSL_DEBUG_LEVEL > 1
+ String aText( GetTxt().Copy( nCurrentStart, nLen ) );
+#endif
+
+ Sequence <sal_Int32> aOffsets;
+ String sChgd( rTrans.transliterate( GetTxt(),
+ GetLang( nCurrentStart ), nCurrentStart, nLen, &aOffsets ));
+
+ if (!m_Text.Equals( sChgd, nStt, nLen ))
{
- pUndo->AddChanges( *this, nStt, nLen, aOffsets );
+ aChgData.nStart = nCurrentStart;
+ aChgData.nLen = nLen;
+ aChgData.sChanged = sChgd;
+ aChgData.aOffsets = aOffsets;
+ aChanges.push_back( aChgData );
}
- ReplaceTextOnly( nStt, nLen, sChgd, aOffsets );
+
+ Boundary aFirstWordBndry;
+ aFirstWordBndry = pBreakIt->GetBreakIter()->nextWord(
+ GetTxt(), nCurrentEnd,
+ pBreakIt->GetLocale( GetLang( nCurrentEnd ) ),
+ nWordType);
+ nCurrentStart = aFirstWordBndry.startPos;
+ nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence(
+ GetTxt(), nCurrentStart,
+ pBreakIt->GetLocale( GetLang( nCurrentStart ) ) );
}
- nStt = nEndPos;
- } while( nEndPos < nEnd && pIter && pIter->Next() );
- delete pIter;
+ }
+ else
+ {
+ // here we may transliterate over complete language portions...
+
+ SwLanguageIterator* pIter;
+ if( rTrans.needLanguageForTheMode() )
+ pIter = new SwLanguageIterator( *this, nStt );
+ else
+ pIter = 0;
+
+ xub_StrLen nEndPos;
+ sal_uInt16 nLang;
+ do {
+ if( pIter )
+ {
+ nLang = pIter->GetLanguage();
+ nEndPos = pIter->GetChgPos();
+ if( nEndPos > nEnd )
+ nEndPos = nEnd;
+ }
+ else
+ {
+ nLang = LANGUAGE_SYSTEM;
+ nEndPos = nEnd;
+ }
+ xub_StrLen nLen = nEndPos - nStt;
+
+ Sequence <sal_Int32> aOffsets;
+ String sChgd( rTrans.transliterate( m_Text, nLang, nStt, nLen, &aOffsets ));
+
+ if (!m_Text.Equals( sChgd, nStt, nLen ))
+ {
+ aChgData.nStart = nStt;
+ aChgData.nLen = nLen;
+ aChgData.sChanged = sChgd;
+ aChgData.aOffsets = aOffsets;
+ aChanges.push_back( aChgData );
+ }
+
+ nStt = nEndPos;
+ } while( nEndPos < nEnd && pIter && pIter->Next() );
+ delete pIter;
+ }
+
+ if (aChanges.size() > 0)
+ {
+ // now apply the changes from end to start to leave the offsets of the
+ // yet unchanged text parts remain the same.
+ for (size_t i = 0; i < aChanges.size(); ++i)
+ {
+ TransliterationChgData &rData = aChanges[ aChanges.size() - 1 - i ];
+ if (pUndo)
+ pUndo->AddChanges( *this, rData.nStart, rData.nLen, rData.aOffsets );
+ ReplaceTextOnly( rData.nStart, rData.nLen, rData.sChanged, rData.aOffsets );
+ }
+ }
}
}
diff --git a/sw/source/core/undo/makefile.mk b/sw/source/core/undo/makefile.mk
index d6e6766a0fd4..c381761adba1 100644
--- a/sw/source/core/undo/makefile.mk
+++ b/sw/source/core/undo/makefile.mk
@@ -49,6 +49,7 @@ EXCEPTIONSFILES = \
$(SLO)$/unattr.obj \
$(SLO)$/undobj.obj \
$(SLO)$/undraw.obj \
+ $(SLO)$/unovwr.obj \
$(SLO)$/untbl.obj
SLOFILES = \
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index 8254d431b079..91549c84a57e 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -352,16 +352,14 @@ SwRewriter SwUndoOverwrite::GetRewriter() const
struct _UndoTransliterate_Data
{
- String sText;
- _UndoTransliterate_Data* pNext;
- SwHistory* pHistory;
- Sequence <sal_Int32>* pOffsets;
- ULONG nNdIdx;
- xub_StrLen nStart, nLen;
-
- _UndoTransliterate_Data( ULONG nNd, xub_StrLen nStt, xub_StrLen nStrLen,
- const String& rTxt )
- : sText( rTxt ), pNext( 0 ), pHistory( 0 ), pOffsets( 0 ),
+ String sText;
+ SwHistory* pHistory;
+ Sequence< sal_Int32 >* pOffsets;
+ ULONG nNdIdx;
+ xub_StrLen nStart, nLen;
+
+ _UndoTransliterate_Data( ULONG nNd, xub_StrLen nStt, xub_StrLen nStrLen, const String& rTxt )
+ : sText( rTxt ), pHistory( 0 ), pOffsets( 0 ),
nNdIdx( nNd ), nStart( nStt ), nLen( nStrLen )
{}
~_UndoTransliterate_Data() { delete pOffsets; delete pHistory; }
@@ -369,22 +367,17 @@ struct _UndoTransliterate_Data
void SetChangeAtNode( SwDoc& rDoc );
};
-SwUndoTransliterate::SwUndoTransliterate( const SwPaM& rPam,
- const utl::TransliterationWrapper& rTrans )
- : SwUndo( UNDO_TRANSLITERATE ), SwUndRng( rPam ),
- pData( 0 ), pLastData( 0 ), nType( rTrans.getType() )
+SwUndoTransliterate::SwUndoTransliterate(
+ const SwPaM& rPam,
+ const utl::TransliterationWrapper& rTrans )
+ : SwUndo( UNDO_TRANSLITERATE ), SwUndRng( rPam ), nType( rTrans.getType() )
{
}
SwUndoTransliterate::~SwUndoTransliterate()
{
- _UndoTransliterate_Data* pD = pData;
- while( pD )
- {
- pData = pD;
- pD = pD->pNext;
- delete pData;
- }
+ for (size_t i = 0; i < aChanges.size(); ++i)
+ delete aChanges[i];
}
void SwUndoTransliterate::Undo( SwUndoIter& rUndoIter )
@@ -393,8 +386,12 @@ void SwUndoTransliterate::Undo( SwUndoIter& rUndoIter )
BOOL bUndo = rDoc.DoesUndo();
rDoc.DoUndo( FALSE );
- for( _UndoTransliterate_Data* pD = pData; pD; pD = pD->pNext )
- pD->SetChangeAtNode( rDoc );
+ // since the changes were added to the vector from the end of the string/node towards
+ // the start, we need to revert them from the start towards the end now to keep the
+ // offset information of the undo data in sync with the changing text.
+ // Thus we need to iterate from the end of the vector to the start
+ for (sal_Int32 i = aChanges.size() - 1; i >= 0; --i)
+ aChanges[i]->SetChangeAtNode( rDoc );
rDoc.DoUndo( bUndo );
SetPaM( rUndoIter, TRUE );
@@ -413,8 +410,7 @@ void SwUndoTransliterate::Repeat( SwUndoIter& rUndoIter )
SwPaM& rPam = *rUndoIter.pAktPam;
SwDoc& rDoc = rUndoIter.GetDoc();
- utl::TransliterationWrapper aTrans(
- ::comphelper::getProcessServiceFactory(), nType );
+ utl::TransliterationWrapper aTrans( ::comphelper::getProcessServiceFactory(), nType );
rDoc.TransliterateText( rPam, aTrans );
rUndoIter.pLastUndoObj = this;
@@ -428,67 +424,63 @@ void SwUndoTransliterate::AddChanges( SwTxtNode& rTNd,
_UndoTransliterate_Data* pNew = new _UndoTransliterate_Data(
rTNd.GetIndex(), nStart, (xub_StrLen)nOffsLen,
rTNd.GetTxt().Copy( nStart, nLen ));
- if( pData )
- pLastData->pNext = pNew;
- else
- pData = pNew;
- pLastData = pNew;
+
+ aChanges.push_back( pNew );
const sal_Int32* pOffsets = rOffsets.getConstArray();
// where did we need less memory ?
const sal_Int32* p = pOffsets;
for( long n = 0; n < nOffsLen; ++n, ++p )
- if( *p != ( nStart + n ))
+ if( *p != ( nStart + n ))
+ {
+ // create the Offset array
+ pNew->pOffsets = new Sequence <sal_Int32> ( nLen );
+ sal_Int32* pIdx = pNew->pOffsets->getArray();
+ p = pOffsets;
+ long nMyOff, nNewVal = nStart;
+ for( n = 0, nMyOff = nStart; n < nOffsLen; ++p, ++n, ++nMyOff )
{
- // create the Offset array
- pNew->pOffsets = new Sequence <sal_Int32> ( nLen );
- sal_Int32* pIdx = pNew->pOffsets->getArray();
- p = pOffsets;
- long nMyOff, nNewVal = nStart;
- for( n = 0, nMyOff = nStart; n < nOffsLen; ++p, ++n, ++nMyOff )
+ if( *p < nMyOff )
{
- if( *p < nMyOff )
- {
- // something is deleted
- nMyOff = *p;
- *(pIdx-1) = nNewVal++;
- }
- else if( *p > nMyOff )
- {
- for( ; *p > nMyOff; ++nMyOff )
- *pIdx++ = nNewVal;
- --nMyOff;
- --n;
- --p;
- }
- else
- *pIdx++ = nNewVal++;
+ // something is deleted
+ nMyOff = *p;
+ *(pIdx-1) = nNewVal++;
}
-
- // and then we need to save the attributes/bookmarks
- // but this data must moved every time to the last in the chain!
- _UndoTransliterate_Data* pD = pData;
- while( pD != pNew )
+ else if( *p > nMyOff )
{
- if( pD->nNdIdx == pNew->nNdIdx && pD->pHistory )
- {
- // same node and have a history?
- pNew->pHistory = pD->pHistory;
- pD->pHistory = 0;
- break; // more can't exist
- }
- pD = pD->pNext;
+ for( ; *p > nMyOff; ++nMyOff )
+ *pIdx++ = nNewVal;
+ --nMyOff;
+ --n;
+ --p;
}
+ else
+ *pIdx++ = nNewVal++;
+ }
- if( !pNew->pHistory )
+ // and then we need to save the attributes/bookmarks
+ // but this data must moved every time to the last in the chain!
+ for (size_t i = 0; i + 1 < aChanges.size(); ++i) // check all changes but not the current one
+ {
+ _UndoTransliterate_Data* pD = aChanges[i];
+ if( pD->nNdIdx == pNew->nNdIdx && pD->pHistory )
{
- pNew->pHistory = new SwHistory;
- SwRegHistory aRHst( rTNd, pNew->pHistory );
- pNew->pHistory->CopyAttr( rTNd.GetpSwpHints(),
- pNew->nNdIdx, 0, rTNd.GetTxt().Len(), false );
+ // same node and have a history?
+ pNew->pHistory = pD->pHistory;
+ pD->pHistory = 0;
+ break; // more can't exist
}
- break;
}
+
+ if( !pNew->pHistory )
+ {
+ pNew->pHistory = new SwHistory;
+ SwRegHistory aRHst( rTNd, pNew->pHistory );
+ pNew->pHistory->CopyAttr( rTNd.GetpSwpHints(),
+ pNew->nNdIdx, 0, rTNd.GetTxt().Len(), false );
+ }
+ break;
+ }
}
void _UndoTransliterate_Data::SetChangeAtNode( SwDoc& rDoc )
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index b7098710802b..fdc382ad99d9 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1009,12 +1009,9 @@ void SwXCell::setFormula(const OUString& rFormula) throw( uno::RuntimeException
double SwXCell::getValue(void) throw( uno::RuntimeException )
{
vos::OGuard aGuard(Application::GetSolarMutex());
- double fRet = lcl_getValue( *this );
- //lcl_getValue was changed thus it can return nan values,
- //so I make this additional nan check here to not change the behaviour
- //but maybe it would even be more correct to just return nan here? ... todo?
- if( ::rtl::math::isNan( fRet ) )
- fRet = 0.0;
+
+ double const fRet = lcl_getValue( *this );
+ // #i112652# a table cell may contain NaN as a value, do not filter that
return fRet;
}
/*-- 11.12.98 10:56:26---------------------------------------------------
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index d499add5ad53..27fe1a65641f 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -108,7 +108,7 @@
using namespace ::com::sun::star;
-SFX_IMPL_VIEWFACTORY(SwPagePreView, SW_RES(STR_NONAME))
+SFX_IMPL_NAMED_VIEWFACTORY(SwPagePreView, "PrintPreview")
{
SFX_VIEW_REGISTRATION(SwDocShell);
SFX_VIEW_REGISTRATION(SwWebDocShell);
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index 801ecba22c73..667beb8ab4ca 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -125,7 +125,7 @@ using ::com::sun::star::util::SearchOptions;
-SFX_IMPL_VIEWFACTORY(SwSrcView, SW_RES(STR_NONAME))
+SFX_IMPL_NAMED_VIEWFACTORY(SwSrcView, "SourceView")
{
SFX_VIEW_REGISTRATION(SwWebDocShell);
}
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index 9d905a4c3443..93a29f699f5a 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -105,7 +105,7 @@ using ::rtl::OUString;
#include <unomid.h>
-SFX_IMPL_VIEWFACTORY(SwView, SW_RES(STR_NONAME))
+SFX_IMPL_NAMED_VIEWFACTORY(SwView, "Default")
{
if ( SvtModuleOptions().IsWriter() )
{
diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx
index 9a55aaf94a28..1822ab2de4e8 100644
--- a/sw/source/ui/web/wview.cxx
+++ b/sw/source/ui/web/wview.cxx
@@ -93,7 +93,7 @@
#include <swslots.hxx>
-SFX_IMPL_VIEWFACTORY(SwWebView, SW_RES(STR_NONAME))
+SFX_IMPL_NAMED_VIEWFACTORY(SwWebView, "Default")
{
SFX_VIEW_REGISTRATION(SwWebDocShell);
}
diff --git a/swext/mediawiki/build.xml b/swext/mediawiki/build.xml
index ff96fe578ca6..8dea0dce0bd2 100644
--- a/swext/mediawiki/build.xml
+++ b/swext/mediawiki/build.xml
@@ -123,15 +123,6 @@
<filter token="WIKIEXTENSIONFILENAME" value="${name}"/>
</filterset>
</copy>
- <copy todir="${out}/misc/${target}/package_tmp/help" overwrite="true" encoding="UTF-8">
- <fileset dir="${out}/misc/${target}/help" includes="**/*.xhp" casesensitive="yes"/>
- <filterset>
- <filter token="WIKIEXTENSIONPRODUCTNAME" value="Wiki Publisher"/>
- <filter token="WIKIEXTENSIONID" value="com.sun.wiki-publisher"/>
- <filter token="WIKIEXTENSIONFILENAME" value="${name}"/>
- </filterset>
- <mapper type="regexp" from="^(.*[/\\])com.sun.sun-mediawiki([/\\].*)" to="\1com.sun.wiki-publisher\2"/>
- </copy>
</target>
<target name="uno-package" depends="tmpdir, xcumerge, jar, init">
@@ -149,6 +140,8 @@
<zipfileset dir="src" includes="uno-extension-manifest.xml" casesensitive="yes" fullpath="META-INF/manifest.xml"/>
<zipfileset dir="dialogs" includes="**/*.xdl,**/*.xba,**/*.xlb" casesensitive="yes" prefix="WikiEditor"/>
<zipfileset dir="${out}/misc/${target}/license" includes="LICENSE*" casesensitive="yes" prefix="license"/>
+ <zipfileset dir="${out}/misc/${target}/help" includes="**/*.idxl/*,**/*.*_,**/*.jar" casesensitive="yes" prefix="help"/>
+ <zipfileset dir="${out}/misc/${target}/help" includes="**/*.xhp" casesensitive="yes" prefix="help"/>
<zipfileset dir="src" includes="THIRDPARTYLICENSEREADME.html" casesensitive="yes" prefix="license"/>
</zip>
</target>
@@ -161,14 +154,15 @@
<fileset dir="${out}/misc/${target}/registry/schema/org/openoffice/Office/Custom" includes="*.xcs" casesensitive="yes"/>
<fileset dir="${out}/misc/${target}/registry/data/org/openoffice/Office" includes="ProtocolHandler.xcu,Paths.xcu" casesensitive="yes"/>
<fileset dir="${out}/misc/${target}/merge/org/openoffice/Office/Custom" includes="*.xcu" casesensitive="yes"/>
- <fileset dir="${out}/misc/${target}/merge/org/openoffice/Office" includes="*.xcu" casesensitive="yes"/>
+ <fileset dir="${out}/misc/${target}/merge/org/openoffice/Office" includes="*.xcu" excludes="**/ProtocolHandler.xcu,**/Paths.xcu" casesensitive="yes"/>
<!-- FIXME: currently the build xcu files can not be used since the tag containing x-default attribute is thrown away, issue 99378
<fileset dir="${out}/misc/${target}/merge/org/openoffice/TypeDetection" includes="*.xcu" casesensitive="yes"/>
-->
<fileset dir="src/registry/data/org/openoffice/TypeDetection" includes="*.xcu" casesensitive="yes"/>
<zipfileset file="src/filter/odt2mediawiki.xsl" casesensitive="yes" fullpath="filter/odt2mediawiki.xsl"/>
<zipfileset file="src/filter/mediawiki.ott" casesensitive="yes" fullpath="templates/MediaWiki/mediawiki.ott"/>
- <zipfileset dir="${out}/misc/${target}/help" includes="**/*.xhp,component.txt" casesensitive="yes" prefix="help"/>
+ <zipfileset dir="${out}/misc/${target}/help" includes="component.txt" casesensitive="yes" prefix="help"/>
+ <zipfileset dir="${out}/misc/${target}_merge/help" includes="**/*.xhp" casesensitive="yes" prefix="help"/>
<zipfileset dir="dialogs" includes="**/*.xdl,**/*.xba,**/*.xlb" casesensitive="yes" prefix="WikiEditor"/>
<zipfileset dir="src" includes="uno-extension-manifest.xml" casesensitive="yes" fullpath="META-INF/manifest.xml"/>
<zipfileset dir="${out}/misc/${target}/license" includes="LICENSE*" casesensitive="yes" prefix="license"/>
diff --git a/swext/mediawiki/help/makefile.mk b/swext/mediawiki/help/makefile.mk
index 1cb200a1860f..1804ec2b668a 100644
--- a/swext/mediawiki/help/makefile.mk
+++ b/swext/mediawiki/help/makefile.mk
@@ -30,16 +30,29 @@ PRJNAME=swext
TARGET=$(PRJNAME)_help
.INCLUDE : settings.mk
-.INCLUDE : target.mk
-
-.IF "$(ENABLE_MEDIAWIKI)" == "YES"
-PACKAGE=com.sun.sun-mediawiki
+.IF "$(WITH_LANG)"!=""
# workaround for the problem in help, the help uses en instead of en-US
-MEDIAWIKI_LANG= en $(alllangiso)
+MEDIAWIKI_LANG=$(uniq en $(alllangiso))
+aux_alllangiso:=$(MEDIAWIKI_LANG)
+.ELSE # "$(WITH_LANG)"!=""
+aux_alllangiso:=$(defaultlangiso)
+MEDIAWIKI_LANG=$(uniq en $(alllangiso))
+.ENDIF # "$(WITH_LANG)"!=""
+
+.IF "$(ENABLE_MEDIAWIKI)" != "YES"
+all:
+ @echo Building mediawiki disabled...
+.ELSE # "$(ENABLE_MEDIAWIKI)" != "YES"
+
+PACKAGE=com.sun.wiki-publisher
-OUT_MEDIAWIKI=$(MISC)$/mediawiki
-OUT_HELP=$(OUT_MEDIAWIKI)$/help
+OUT_MEDIAWIKI:=$(MISC)$/mediawiki
+
+LINKNAME:=help
+XHPLINKSRC:=$(OUT_MEDIAWIKI)/help
+
+XHPDEST=$(OUT_MEDIAWIKI)_merge/help
XHPFILES= \
wiki.xhp\
@@ -48,26 +61,27 @@ XHPFILES= \
wikisend.xhp\
wikisettings.xhp
-HLANGXHPFILES:=$(foreach,i,$(XHPFILES) $(foreach,j,$(MEDIAWIKI_LANG) $(OUT_HELP)$/$j$/$(PACKAGE)$/$(i:f)))
+LINKLINKFILES= \
+ $(PACKAGE)/{$(XHPFILES)}
-ALLTAR : $(OUT_MEDIAWIKI)$/$(TARGET).done $(OUT_HELP)$/component.txt
+# define with own language set
+HLANGXHPFILES=$(foreach,i,$(XHPFILES) $(foreach,j,$(MEDIAWIKI_LANG) $(XHPDEST)$/$j$/$(PACKAGE)$/$(i:f)))
-#$(OUT_MEDIAWIKI)$/xhp_changed.flag optix
-
-$(OUT_HELP)$/component.txt : component.txt
- $(COPY) component.txt $(OUT_HELP)$/component.txt
+.INCLUDE : target.mk
+.INCLUDE : tg_help.mk
+.INCLUDE : extension_helplink.mk
-$(HLANGXHPFILES) : #$$(@:d)thisdir.created
- -$(MKDIRHIER) $(@:d)
- $(TOUCH) $(@:d)thisdir.created
+ALLTAR : $(OUT_MEDIAWIKI)/help/component.txt
-$(OUT_HELP)$/{$(MEDIAWIKI_LANG)}$/$(PACKAGE)$/%.xhp :| %.xhp
- @$(TOUCH) $@
-# internal dependencies not sufficient to trigger merge?
-# @$(NULL)
+$(OUT_MEDIAWIKI)/help/component.txt : component.txt
+ @-$(MKDIRHIER) $(@:d)
+ $(COMMAND_ECHO)$(COPY) component.txt $@
+$(OUT_MEDIAWIKI)/help/%.xhp : $(OUT_MEDIAWIKI)_merge/help/%.xhp
+ @-$(MKDIRHIER) $(@:d)
+ $(COMMAND_ECHO)cat $< | sed -e 's/@WIKIEXTENSIONPRODUCTNAME@/Wiki Publisher/g' | \
+ sed 's/@WIKIEXTENSIONID@/com.sun.wiki-publisher/g' | \
+ sed 's/@WIKIEXTENSIONFILENAME@/wiki-publisher/g' > $@
-$(OUT_MEDIAWIKI)$/$(TARGET).done : $(LOCALIZESDF) $(XHPFILES) $(HLANGXHPFILES)
- @$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(HELPEX) -p $(PRJNAME) -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(OUT_HELP) -y $(PACKAGE) -l all -lf $(MEDIAWIKI_LANG:t",") -m $(LOCALIZESDF) && $(TOUCH) $@
-.ENDIF
+.ENDIF # "$(ENABLE_MEDIAWIKI)" != "YES"
diff --git a/swext/prj/build.lst b/swext/prj/build.lst
index eb1aaca61422..aa07df358770 100644
--- a/swext/prj/build.lst
+++ b/swext/prj/build.lst
@@ -1,4 +1,4 @@
-swext swext : officecfg l10n javaunohelper ridljar unoil jurt APACHE_COMMONS:apache-commons readlicense_oo xsltml NULL
+swext swext : officecfg l10n javaunohelper ridljar unoil jurt APACHE_COMMONS:apache-commons readlicense_oo xsltml xmlhelp NULL
swext swext usr1 - all swext_mkout NULL
swext swext\mediawiki\help nmake - all swext_mwhelp NULL
swext swext\mediawiki\src\registry\schema\org\openoffice\Office\Custom nmake - all swext_mwschema NULL
diff --git a/sysui/desktop/cleanversion/makefile.mk b/sysui/desktop/cleanversion/makefile.mk
index 71a0d7e3dfd9..40651af2d17b 100644
--- a/sysui/desktop/cleanversion/makefile.mk
+++ b/sysui/desktop/cleanversion/makefile.mk
@@ -43,7 +43,7 @@ ALLTAR: $(MISC)$/cleanup.flag
# version changed - bin previous trees
$(MISC)$/cleanup.flag : ..$/productversion.mk
- rm -rf `ls $(MISC) | grep -v -x $(MISC)$/logs` && $(TOUCH) $@
+ rm -rf `ls -d $(MISC)$/* | sed '/\/logs$/d'` && $(TOUCH) $@
.ENDIF # "$(MISC)"!=""
diff --git a/testautomation/dbaccess/optional/includes/db_Mozilla.inc b/testautomation/dbaccess/optional/includes/db_Mozilla.inc
index 45cf9456d290..236b6a5e79ed 100755..100644
--- a/testautomation/dbaccess/optional/includes/db_Mozilla.inc
+++ b/testautomation/dbaccess/optional/includes/db_Mozilla.inc
@@ -32,22 +32,35 @@
'\***********************************************************************
sub db_Mozilla
- ' Information for this test under
- ' http://wiki.services.openoffice.org/wiki/Database_Automatic_Testing#Testing_the_mozilla_Address_book
-
- if fCreateMozillaAddressbookDatasource(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb")) then
-
- tQueryAddressbook(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb"))
- tSortAddressbook(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb"))
- else
+ if(gPlatform = "osx") then
+ ' on Mac platform the Mozilla address book is not available
+ ' so I call only the testcases to satisfied the database
tQueryAddressbook("")
tSortAddressbook("")
+ else
+
+ ' Information for this test under
+ ' http://wiki.services.openoffice.org/wiki/Database_Automatic_Testing#Testing_the_mozilla_Address_book
+
+ if fCreateMozillaAddressbookDatasource(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb")) then
+
+ tQueryAddressbook(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb"))
+ tSortAddressbook(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb"))
+ else
+ tQueryAddressbook("")
+ tSortAddressbook("")
+ endif
endif
end sub
'-------------------------------------------------------------------------
testcase tQueryAddressbook( sFileName )
+ if(gPlatform = "osx") then
+ printlog "mozilla address book not available on Mac"
+ goto endsub
+ endif
+
if ( not fOpenDatabase(sFileName) ) then
warnlog "Database can't be open"
printlog "May be you find a solution under http://wiki.services.openoffice.org/wiki/Database_Automatic_Testing#Testing_the_mozilla_Address_book"
@@ -86,6 +99,11 @@ endcase
'-------------------------------------------------------------------------
testcase tSortAddressbook( sFileName )
+ if(gPlatform = "osx") then
+ printlog "mozilla address book not available on Mac"
+ goto endsub
+ endif
+
Dim sRecordCount as String
'/// open the database file created in the bas file
diff --git a/testautomation/dbaccess/optional/includes/frm_FormFilter.inc b/testautomation/dbaccess/optional/includes/frm_FormFilter.inc
index bdcf1c4bc63b..74edeb1df3aa 100755..100644
--- a/testautomation/dbaccess/optional/includes/frm_FormFilter.inc
+++ b/testautomation/dbaccess/optional/includes/frm_FormFilter.inc
@@ -47,7 +47,9 @@ testcase tLoadForm
Kontext "DocumentWriter"
'/// press CTRL + F5 to get into the first textbox
printlog "press CTRL + F5 to get into the first textbox"
- DocumentWriter.TypeKeys "<MOD1 F5>" , true
+ DocumentWriter.TypeKeys "<MOD1 F6>" , true
+ wait(1000)
+ DocumentWriter.TypeKeys "<MOD1 F5>" , true
'sleep(1)
'DocumentWriter.TypeKeys "<MOD1 C>" , true
'sleep(1)
@@ -59,6 +61,8 @@ testcase tLoadForm
wait(1000)
'/// insert 2 in the first textbox
printlog "insert 2 in the first textbox"
+ DocumentWriter.TypeKeys "<MOD1 F6>" , true
+ wait(1000)
DocumentWriter.TypeKeys "<MOD1 F5>" , true
sleep(1)
DocumentWriter.TypeKeys "2" , true
@@ -69,7 +73,7 @@ testcase tLoadForm
FM_FF_Execute
wait(1000)
printlog "workaround issue 102010"
- DocumentWriter.TypeKeys "<MOD1 F6>" , true
+ DocumentWriter.TypeKeys "<MOD1 F6>" , true
sleep(1)
DocumentWriter.TypeKeys "<MOD1 F5>" , true
sleep(1)
@@ -94,6 +98,8 @@ testcase tLoadForm
wait(1000)
'/// insert into the second textbox like '%2'
printlog "insert into the second textbox like '%2'"
+ DocumentWriter.TypeKeys "<MOD1 F6>" , true
+ wait(1000)
DocumentWriter.TypeKeys "<MOD1 F5>" , true
sleep(1)
DocumentWriter.TypeKeys "<TAB>" , true
diff --git a/testautomation/dbaccess/optional/includes/frm_Forms.inc b/testautomation/dbaccess/optional/includes/frm_Forms.inc
index b31a064e60ee..630e1920cbce 100755..100644
--- a/testautomation/dbaccess/optional/includes/frm_Forms.inc
+++ b/testautomation/dbaccess/optional/includes/frm_Forms.inc
@@ -173,7 +173,7 @@ testcase tCreateForm
'/// insert a textfield
printlog "insert a textfield"
Edit.Click
- call hDrawingWithSelection ( 50, 20, 60, 30 )
+ call hDrawingWithSelection ( 50, 30, 60, 40 )
sleep(1)
Kontext "FormControls"
@@ -543,7 +543,7 @@ testcase tCreateSubForms
'/// insert a textfield
printlog "insert a textfield"
Edit.Click
- call hDrawingWithSelection ( 50, 20, 60, 30 )
+ call hDrawingWithSelection ( 50, 30, 60, 40 )
sleep(1)
Kontext "FormControls"
@@ -638,7 +638,7 @@ testcase tCreateSubForms
'/// insert a textfield
printlog "insert a textfield"
'Edit.Click
- call hDrawingWithSelection ( 50, 40, 60, 50 )
+ call hDrawingWithSelection ( 50, 50, 60, 60 )
sleep(1)
Kontext "FormControls"
@@ -672,6 +672,8 @@ testcase tCheckSubForm
'/// set cursor into the first control
printlog "set cursor into the first control"
Kontext "DocumentWriter"
+ DocumentWriter.TypeKeys "<MOD1 F6>" , true
+ wait(1000)
DocumentWriter.TypeKeys "<MOD1 F5>" , true
sleep(1)
@@ -749,7 +751,7 @@ testcase tCreateSubFormsNewMethod
'/// insert a textfield
printlog "insert a textfield"
Edit.Click
- call hDrawingWithSelection ( 50, 20, 60, 30 )
+ call hDrawingWithSelection ( 50, 30, 60, 40 )
sleep(1)
Kontext "FormControls"
diff --git a/testautomation/dbaccess/optional/includes/rpt_Formating.inc b/testautomation/dbaccess/optional/includes/rpt_Formating.inc
index e2671728b168..4bde542bd176 100755..100644
--- a/testautomation/dbaccess/optional/includes/rpt_Formating.inc
+++ b/testautomation/dbaccess/optional/includes/rpt_Formating.inc
@@ -62,9 +62,9 @@ testcase tConditionalFormating
sleep(1)
Kontext "ReportDesign"
- ReportDesign.MouseDown ( 30, 50 )
- ReportDesign.MouseMove ( 40, 60 )
- ReportDesign.MouseUp ( 40, 60 )
+ ReportDesign.MouseDown ( 30, 40 )
+ ReportDesign.MouseMove ( 40, 50 )
+ ReportDesign.MouseUp ( 40, 50 )
sleep(1)
'/// open the conditional formating dialog via the menu
@@ -129,9 +129,9 @@ testcase tGrowAndShrink
sleep(1)
Kontext "ReportDesign"
- ReportDesign.MouseDown ( 30, 50 )
- ReportDesign.MouseMove ( 40, 60 )
- ReportDesign.MouseUp ( 40, 60 )
+ ReportDesign.MouseDown ( 30, 40 )
+ ReportDesign.MouseMove ( 40, 50 )
+ ReportDesign.MouseUp ( 40, 50 )
sleep(1)
'/// open the conditional formating dialog via the menu
diff --git a/testautomation/dbaccess/optional/includes/xf_Submission.inc b/testautomation/dbaccess/optional/includes/xf_Submission.inc
index ad24c621b867..05f0da768cdf 100755..100644
--- a/testautomation/dbaccess/optional/includes/xf_Submission.inc
+++ b/testautomation/dbaccess/optional/includes/xf_Submission.inc
@@ -41,6 +41,8 @@ end sub
'-------------------------------------------------------------------------
testcase tDataNavigatorSubmission
+ Dim sSubmitPath as string
+
'/// open new XML Form
printlog "open new XML Form"
@@ -101,11 +103,8 @@ testcase tDataNavigatorSubmission
'/// add a submission
Kontext "XFormAddSubmission"
SubmitName.setText("submission1")
- if ( gPlatgroup = "w95" ) then
- SubmitAction.setText("file:///" + ConvertPath(gOfficePath,"lin") + "user/work/test.xml")
- else
- SubmitAction.setText("file://" + gOfficePath + "user/work/test.xml")
- endif
+ sSubmitPath = "file:///" + gOfficePath + "user/work/test.xml"
+ SubmitAction.setText( hStringReplaceChar( sSubmitPath, "\", "/" ) )
SubmitMethod.select 2
'/// close the add submission dialog
diff --git a/testautomation/framework/optional/includes/security_certification_dialogs.inc b/testautomation/framework/optional/includes/security_certification_dialogs.inc
index ee7605ad1cce..c367285956ae 100755..100644
--- a/testautomation/framework/optional/includes/security_certification_dialogs.inc
+++ b/testautomation/framework/optional/includes/security_certification_dialogs.inc
@@ -86,7 +86,7 @@ testcase tCertificationDialogs
kontext "DigitalSignature"
if ( DigitalSignature.exists( 2 ) ) then
printlog( CFN & "Digital signatures is open" )
- DigitalSignature.cancel()
+ DigitalSignature.close()
else
if ( gApplication <> "MASTERDOCUMENT" ) then
warnlog( CFN & "Digital Signatures Dialog is not open" )
diff --git a/testautomation/framework/required/includes/window_functions.inc b/testautomation/framework/required/includes/window_functions.inc
index 6917639d30f8..008248a1c57d 100755
--- a/testautomation/framework/required/includes/window_functions.inc
+++ b/testautomation/framework/required/includes/window_functions.inc
@@ -196,9 +196,6 @@ end sub
testcase tCheckWindowTitle( sApplication as string, sReference as string )
- if ( sApplication = "soffice" ) then
-
-
printlog( "Update test for the office window titles" )
' This is a Testtool-only problem that the product name is not displayed
diff --git a/testautomation/global/win/dial_a_c.win b/testautomation/global/win/dial_a_c.win
index dfb4686ad750..18f695c91c41 100755
--- a/testautomation/global/win/dial_a_c.win
+++ b/testautomation/global/win/dial_a_c.win
@@ -261,16 +261,6 @@ AnimationenZulassen sd:CheckBox:DLG_START_PRESENTATION:CBX_ANIMATION_ALLOWED
DiawechselAufHintergrund SD:CHECKBOX:DLG_START_PRESENTATION:CBX_CHANGE_PAGE
PraesentationImmerImVordergrund sd:CheckBox:DLG_START_PRESENTATION:CBX_ALWAYS_ON_TOP
-*BMPOptionen svtools:ModalDialog:DLG_EXPORT_PIX
-Farbaufloesung svtools:ListBox:DLG_EXPORT_PIX:LB_COLORS
-RLEKodierung svtools:CheckBox:DLG_EXPORT_PIX:CBX_RLE
-Original svtools:RadioButton:DLG_EXPORT_PIX:RB_ORIGINAL_PIX
-Aufloesung svtools:RadioButton:DLG_EXPORT_PIX:RB_RES_PIX
-DPI svtools:ComboBox:DLG_EXPORT_PIX:CBB_RES_PIX
-Groesse svtools:RadioButton:DLG_EXPORT_PIX:RB_SIZE_PIX
-Breite svtools:MetricField:DLG_EXPORT_PIX:MTF_SIZEX_PIX
-Hoehe svtools:MetricField:DLG_EXPORT_PIX:MTF_SIZEY_PIX
-
*Browser SID_BROWSER
*ChineseTranslation svx:CB_USE_VARIANTS:DLG_CHINESETRANSLATION
diff --git a/testautomation/global/win/dial_d_h.win b/testautomation/global/win/dial_d_h.win
index ab6183ad7724..af40d36b23e1 100755
--- a/testautomation/global/win/dial_d_h.win
+++ b/testautomation/global/win/dial_d_h.win
@@ -270,22 +270,6 @@ Titel SW:EDIT:DLG_FLD_INPUT:ED_LABEL
EingabeText sw:MultiLineEdit:DLG_FLD_INPUT:ED_EDIT
Weiter SW:PUSHBUTTON:DLG_FLD_INPUT:PB_NEXT
-*EMFOptionen svtools:ModalDialog:DLG_EXPORT_VEC
-Original svtools:RadioButton:DLG_EXPORT_VEC:RB_ORIGINAL_VEC
-Groesse svtools:RadioButton:DLG_EXPORT_VEC:RB_SIZE_VEC
-Breite svtools:MetricField:DLG_EXPORT_VEC:MTF_SIZEX_VEC
-Hoehe svtools:MetricField:DLG_EXPORT_VEC:MTF_SIZEY_VEC
-
-*EPSOptionen filter:ModalDialog:DLG_EXPORT_EPS
-VorschauTif filter:CheckBox:DLG_EXPORT_EPS:CB_PREVIEW_TIFF
-InterchangeEPSI filter:CheckBox:DLG_EXPORT_EPS:CB_PREVIEW_EPSI
-Level1 filter:RadioButton:DLG_EXPORT_EPS:RB_LEVEL1
-Level2 filter:RadioButton:DLG_EXPORT_EPS:RB_LEVEL2
-Farbe filter:RadioButton:DLG_EXPORT_EPS:RB_COLOR
-Graustufen filter:RadioButton:DLG_EXPORT_EPS:RB_GRAYSCALE
-LZWKodierung filter:RadioButton:DLG_EXPORT_EPS:RB_COMPRESSION_LZW
-Keine filter:RadioButton:DLG_EXPORT_EPS:RB_COMPRESSION_NONE
-
*EtikettenSynchronisieren HID_SYNC_BTN
Synchronisieren SW:PUSHBUTTON:DLG_SYNC_BTN:BTN_SYNC
@@ -403,14 +387,6 @@ Loeschen HID_FLDVAR_DELETE
*Filterauswahl HID_DLG_FILTER_SELECT
Filter uui:ListBox:DLG_FILTER_SELECT:LB_FILTERS
-*FilterDlg svtools:ModalDialog:DLG_EXPORT_PIX
-Original svtools:RadioButton:DLG_EXPORT_PIX:RB_ORIGINAL_PIX
-Aufloesung svtools:RadioButton:DLG_EXPORT_PIX:RB_RES_PIX
-Groesse svtools:RadioButton:DLG_EXPORT_PIX:RB_SIZE_PIX
-AufloesungDPI svtools:ComboBox:DLG_EXPORT_PIX:CBB_RES_PIX
-Breite svtools:MetricField:DLG_EXPORT_PIX:MTF_SIZEX_PIX
-Hoehe svtools:MetricField:DLG_EXPORT_PIX:MTF_SIZEY_PIX
-
*Fontwork SID_FONTWORK
KreisAuswahl HID_FONTWORK_CTL_FORMS
Aus HID_FONTWORK_TBI_STYLE_OFF
@@ -479,10 +455,6 @@ Aktualisieren HID_TEMPLDLG_UPDATEBYEXAMPLE
Vorlagenliste HID_TEMPLATE_FMT
Gruppenliste HID_TEMPLATE_FILTER
-*GifOptionen filter:ModalDialog:DLG_EXPORT_GIF
-Interlace filter:CheckBox:DLG_EXPORT_GIF:CBX_INTERLACED
-TransparentSpeichern filter:CheckBox:DLG_EXPORT_GIF:CBX_TRANSLUCENT
-
*GridControlDialogStarter ACTIVE
ShowGridcontrol sym:showGridcontrol
diff --git a/testautomation/global/win/dial_i_o.win b/testautomation/global/win/dial_i_o.win
index aa965b42f51d..9b100efecbea 100755
--- a/testautomation/global/win/dial_i_o.win
+++ b/testautomation/global/win/dial_i_o.win
@@ -105,11 +105,6 @@ Vorschau sd:PushButton:DLG_VECTORIZE:BTN_PREVIEW
+Interaktion TabInteraktion
-*JPEGOptionen svtools:ModalDialog:DLG_EXPORT_JPG
-Qualitaet svtools:NumericField:DLG_EXPORT_JPG:NUM_FLD_QUALITY
-Graustufen svtools:RadioButton:DLG_EXPORT_JPG:RB_GRAY
-Echtfarben svtools:RadioButton:DLG_EXPORT_JPG:RB_RGB
-
*Kommentar HID_REDLINING_DLG
KommentarText HID_REDLINING_EDIT
Zurueck HID_REDLINING_PREV
@@ -259,12 +254,6 @@ Vorgaben1 sc:ImageButton:RID_SCDLG_TABOP:RB_FORMULARANGE
Vorgaben2 sc:ImageButton:RID_SCDLG_TABOP:RB_ROWCELL
Vorgaben3 sc:ImageButton:RID_SCDLG_TABOP:RB_COLCELL
-*MetOptionen FILTER:MODALDIALOG:DLG_EXPORT_EMET
-Original FILTER:RADIOBUTTON:DLG_EXPORT_EMET:RB_ORIGINAL
-Groesse FILTER:RADIOBUTTON:DLG_EXPORT_EMET:RB_SIZE
-Breite FILTER:METRICFIELD:DLG_EXPORT_EMET:MTF_SIZEX
-Hoehe FILTER:METRICFIELD:DLG_EXPORT_EMET:MTF_SIZEY
-
*ModuleBearbeiten HID_EDIT_MODULES
Sprache cui:ListBox:RID_SVXDLG_EDIT_MODULES:LB_EDIT_MODULES_LANGUAGE
Module HID_CLB_EDIT_MODULES_MODULES
diff --git a/testautomation/global/win/dial_p_s.win b/testautomation/global/win/dial_p_s.win
index 84d1978a30d9..3aebf3710902 100755
--- a/testautomation/global/win/dial_p_s.win
+++ b/testautomation/global/win/dial_p_s.win
@@ -19,25 +19,11 @@ SchutzAufheben HID_CHG_PROTECT
PasswortEingabe sfx2:Edit:DLG_PASSWD:ED_PASSWD_USER
PasswortBestaetigen sfx2:Edit:DLG_PASSWD:ED_PASSWD_CONFIRM
-*PBMOptionen filter:ModalDialog:DLG_EXPORT_EPBM
-Binaer filter:RadioButton:DLG_EXPORT_EPBM:RB_RAW
-Ascii filter:RadioButton:DLG_EXPORT_EPBM:RB_ASCII
-
*PfadeAuswaehlen HID_MULTIPATH
Pfade HID_OPTIONS_MULTIPATH_LIST
Hinzufuegen cui:PUSHBUTTON:RID_SVXDLG_MULTIPATH:BTN_ADD_MULTIPATH
Loeschen cui:PUSHBUTTON:RID_SVXDLG_MULTIPATH:BTN_DEL_MULTIPATH
-*PGMOptionen filter:ModalDialog:DLG_EXPORT_EPGM
-Binaer filter:RadioButton:DLG_EXPORT_EPGM:RB_RAW
-Ascii filter:RadioButton:DLG_EXPORT_EPGM:RB_ASCII
-
-*PICTOPtionen filter:ModalDialog:DLG_EXPORT_EPCT
-Original filter:RadioButton:DLG_EXPORT_EPCT:RB_ORIGINAL
-Groesse filter:RadioButton:DLG_EXPORT_EPCT:RB_SIZE
-Breite filter:MetricField:DLG_EXPORT_EPCT:MTF_SIZEX
-Hoehe filter:MetricField:DLG_EXPORT_EPCT:MTF_SIZEY
-
*Pipette SID_BMPMASK svx:DockingWindow:RID_SVXDLG_BMPMASK
PipetteKnopf HID_BMPMASK_TBI_PIPETTE
Farbfeld HID_BMPMASK_CTL_PIPETTE
@@ -79,14 +65,6 @@ DateiUrl cui:EDIT:MD_INSERT_OBJECT_PLUGIN:ED_FILEURL
Durchsuchen cui:PUSHBUTTON:MD_INSERT_OBJECT_PLUGIN:BTN_FILEURL
Optionen cui:MULTILINEEDIT:MD_INSERT_OBJECT_PLUGIN:ED_PLUGINS_OPTIONS
-*PNGOptionen svtools:ModalDialog:DLG_EXPORT_EPNG
-Kompression svtools:NumericField:DLG_EXPORT_EPNG:NUM_COMPRESSION
-Interlaced svtools:CheckBox:DLG_EXPORT_EPNG:CBX_INTERLACED
-
-*PPMOptionen filter:ModalDialog:DLG_EXPORT_EPPM
-Binaer filter:RadioButton:DLG_EXPORT_EPPM:RB_RAW
-Ascii filter:RadioButton:DLG_EXPORT_EPPM:RB_ASCII
-
*QuelleAuswaehlen HID_DATAPILOT_TYPE
AktuelleSelektion sc:RadioButton:RID_SCDLG_DAPITYPE:BTN_SELECTION
AngemeldeteDatenquelle sc:RadioButton:RID_SCDLG_DAPITYPE:BTN_DATABASE
@@ -374,12 +352,6 @@ Persistent sc:CheckBox:RID_SCDLG_FILTER:BTN_DEST_PERS
+Stylist Gestalter
-*SVMOptionen svtools:ModalDialog:DLG_EXPORT_VEC
-Original svtools:RadioButton:DLG_EXPORT_VEC:RB_ORIGINAL_VEC
-Groesse svtools:RadioButton:DLG_EXPORT_VEC:RB_SIZE_VEC
-Breite svtools:MetricField:DLG_EXPORT_VEC:MTF_SIZEX_VEC
-Hoehe svtools:MetricField:DLG_EXPORT_VEC:MTF_SIZEY_VEC
-
*SymboleMath starmath:ModalDialog:RID_SYMBOLDIALOG
Symbolset starmath:ListBox:RID_SYMBOLDIALOG:1
Bearbeiten starmath:PushButton:RID_SYMBOLDIALOG:1
diff --git a/testautomation/global/win/dial_t_z.win b/testautomation/global/win/dial_t_z.win
index 1f317fd412da..4cec83ed566b 100755
--- a/testautomation/global/win/dial_t_z.win
+++ b/testautomation/global/win/dial_t_z.win
@@ -261,12 +261,6 @@ Neu sw:PushButton:DLG_BIB_BASE:PB_NEW
Loeschen sw:PushButton:DLG_BIB_BASE:PB_DELETE
Umbenennen sw:PushButton:DLG_BIB_BASE:PB_RENAME
-*WMFOptionen svtools:ModalDialog:DLG_EXPORT_VEC
-Original svtools:RadioButton:DLG_EXPORT_VEC:RB_ORIGINAL_VEC
-Groesse svtools:RadioButton:DLG_EXPORT_VEC:RB_SIZE_VEC
-Breite svtools:MetricField:DLG_EXPORT_VEC:MTF_SIZEX_VEC
-Hoehe svtools:MetricField:DLG_EXPORT_VEC:MTF_SIZEY_VEC
-
*Zahlenformat HID_NUMBERFORMAT
Kategorie cui:ListBox:RID_SVXPAGE_NUMBERFORMAT:LB_CATEGORY
KategorieFormat HID_NUMBERFORMAT_LB_FORMAT
diff --git a/testautomation/global/win/edia_a_c.win b/testautomation/global/win/edia_a_c.win
index a062d5db9cf0..717bf83edb4e 100755
--- a/testautomation/global/win/edia_a_c.win
+++ b/testautomation/global/win/edia_a_c.win
@@ -330,6 +330,16 @@ Custom3 HID_BIB_CUSTOM3_POS
Custom4 HID_BIB_CUSTOM4_POS
Custom5 HID_BIB_CUSTOM5_POS
+*BMPOptions svtools:ModalDialog:DLG_EXPORT
+Exportwidth svtools:MetricField:DLG_EXPORT:MF_SIZEX
+Exportmeasurement svtools:ListBox:DLG_EXPORT:LB_SIZEX
+Exportheight svtools:MetricField:DLG_EXPORT:MF_SIZEY
+Resolution svtools:NumericField:DLG_EXPORT:NF_RESOLUTION
+Resolutionmeasurement svtools:ListBox:DLG_EXPORT:LB_RESOLUTION
+Colordepth svtools:ListBox:DLG_EXPORT:LB_COLOR_DEPTH
+Compression svtools:CheckBox:DLG_EXPORT:CB_RLE_ENCODING
+
+
*Breakpoints basctl:ModalDialog:RID_BASICIDE_BREAKPOINTDLG
BreakpointsList basctl:ComboBox:RID_BASICIDE_BREAKPOINTDLG:RID_CB_BRKPOINTS
NewButton basctl:PushButton:RID_BASICIDE_BREAKPOINTDLG:RID_PB_NEW
diff --git a/testautomation/global/win/edia_d_h.win b/testautomation/global/win/edia_d_h.win
index 19ba11ec6695..6b4f2f41c3b8 100755
--- a/testautomation/global/win/edia_d_h.win
+++ b/testautomation/global/win/edia_d_h.win
@@ -97,6 +97,24 @@ Modify starmath:PushButton:RID_SYMDEFINEDIALOG:2
Delete starmath:PushButton:RID_SYMDEFINEDIALOG:3
Symbols HID_SMA_CONTROL_FONTCHAR_VIEW
+*EMFOptions svtools:ModalDialog:DLG_EXPORT
+Exportwidth svtools:MetricField:DLG_EXPORT:MF_SIZEX
+Exportmeasurement svtools:ListBox:DLG_EXPORT:LB_SIZEX
+Exportheight svtools:MetricField:DLG_EXPORT:MF_SIZEY
+
+*EPSOptions svtools:ModalDialog:DLG_EXPORT
+Exportwidth svtools:MetricField:DLG_EXPORT:MF_SIZEX
+Exportmeasurement svtools:ListBox:DLG_EXPORT:LB_SIZEX
+Exportheight svtools:MetricField:DLG_EXPORT:MF_SIZEY
+Preview svtools:CheckBox:DLG_EXPORT:CB_EPS_PREVIEW_TIFF
+Epsi svtools:CheckBox:DLG_EXPORT:CB_EPS_PREVIEW_EPSI
+Color svtools:RadioButton:DLG_EXPORT:RB_EPS_COLOR_FORMAT1
+Greyscale svtools:RadioButton:DLG_EXPORT:RB_EPS_COLOR_FORMAT2
+Level1 svtools:RadioButton:DLG_EXPORT:RB_EPS_LEVEL1
+Level2 svtools:RadioButton:DLG_EXPORT:RB_EPS_LEVEL2
+LZWEncoding svtools:RadioButton:DLG_EXPORT:RB_EPS_COMPRESSION_LZW
+NoneCompression svtools:RadioButton:DLG_EXPORT:RB_EPS_COMPRESSION_NONE
+
*ExecuteSQLCommand dbaccess:ModalDialog:DLG_DIRECTSQL
CommandToExecute dbaccess:MultiLineEdit:DLG_DIRECTSQL:ME_SQL
ExecuteBtn dbaccess:PushButton:DLG_DIRECTSQL:PB_EXECUTE
@@ -439,6 +457,15 @@ View HID_GALLERY_WINDOW
*GalleryNewTitle HID_GALLERY_TITLE
Title HID_GALLERY_TITLE_EDIT
+*GIFOptions svtools:ModalDialog:DLG_EXPORT
+Exportwidth svtools:MetricField:DLG_EXPORT:MF_SIZEX
+Exportmeasurement svtools:ListBox:DLG_EXPORT:LB_SIZEX
+Exportheight svtools:MetricField:DLG_EXPORT:MF_SIZEY
+Resolution svtools:NumericField:DLG_EXPORT:NF_RESOLUTION
+Resolutionmeasurement svtools:ListBox:DLG_EXPORT:LB_RESOLUTION
+Interlaced svtools:CheckBox:DLG_EXPORT:CB_INTERLACED
+Transparency svtools:CheckBox:DLG_EXPORT:CB_SAVE_TRANSPARENCY
+
*HelpAgent HID_HELPAGENT_WINDOW
*HangulHanjaConversion HID_DIALOG_HANGULHANJA
diff --git a/testautomation/global/win/edia_i_o.win b/testautomation/global/win/edia_i_o.win
index c2353a085c3b..61cea83b3a36 100755
--- a/testautomation/global/win/edia_i_o.win
+++ b/testautomation/global/win/edia_i_o.win
@@ -152,6 +152,15 @@ FielsInvolved HID_RELDLG_KEYFIELDS
LeftFieldCell HID_RELATIONDIALOG_LEFTFIELDCELL
RightFieldCell HID_RELATIONDIALOG_RIGHTFIELDCELL
+*JPGOptions svtools:ModalDialog:DLG_EXPORT
+Exportwidth svtools:MetricField:DLG_EXPORT:MF_SIZEX
+Exportmeasurement svtools:ListBox:DLG_EXPORT:LB_SIZEX
+Exportheight svtools:MetricField:DLG_EXPORT:MF_SIZEY
+Resolution svtools:NumericField:DLG_EXPORT:NF_RESOLUTION
+Resolutionmeasurement svtools:ListBox:DLG_EXPORT:LB_RESOLUTION
+Colordepth svtools:ListBox:DLG_EXPORT:LB_COLOR_DEPTH
+Quality svtools:NumericField:DLG_EXPORT:NF_COMPRESSION
+
*LabelFieldSelection extensions:ModalDialog:RID_DLG_SELECTLABELCONTROL
*LicenseAgreementDialog HID_LICENSEDIALOG
@@ -226,6 +235,11 @@ PhoneBusiness HID_MM_HEADER_11
Email HID_MM_HEADER_12
Gender HID_MM_HEADER_13
+*METOptions svtools:ModalDialog:DLG_EXPORT
+Exportwidth svtools:MetricField:DLG_EXPORT:MF_SIZEX
+Exportmeasurement svtools:ListBox:DLG_EXPORT:LB_SIZEX
+Exportheight svtools:MetricField:DLG_EXPORT:MF_SIZEY
+
*Mplayer HID_AVMEDIA_PLAYERWINDOW
Mopen HID_AVMEDIA_TOOLBOXITEM_OPEN
mInsert HID_AVMEDIA_TOOLBOXITEM_INSERT
diff --git a/testautomation/global/win/edia_p_s.win b/testautomation/global/win/edia_p_s.win
index a97b3b3ed8be..dfba150f0800 100644..100755
--- a/testautomation/global/win/edia_p_s.win
+++ b/testautomation/global/win/edia_p_s.win
@@ -25,6 +25,20 @@ OldPassword svx:Edit:RID_SVXDLG_PASSWORD:ED_OLD_PASSWD
NewPassword svx:Edit:RID_SVXDLG_PASSWORD:ED_NEW_PASSWD
Confirm svx:Edit:RID_SVXDLG_PASSWORD:ED_REPEAT_PASSWD
+*PBMOptions svtools:ModalDialog:DLG_EXPORT
+Exportwidth svtools:MetricField:DLG_EXPORT:MF_SIZEX
+Exportmeasurement svtools:ListBox:DLG_EXPORT:LB_SIZEX
+Exportheight svtools:MetricField:DLG_EXPORT:MF_SIZEY
+Resolution svtools:NumericField:DLG_EXPORT:NF_RESOLUTION
+Resolutionmeasurement svtools:ListBox:DLG_EXPORT:LB_RESOLUTION
+QualityBinary svtools:RadioButton:DLG_EXPORT:RB_BINARY
+QualityText svtools:RadioButton:DLG_EXPORT:RB_TEXT
+
+*PCTOptions svtools:ModalDialog:DLG_EXPORT
+ Exportwidth svtools:MetricField:DLG_EXPORT:MF_SIZEX
+ Exportmeasurement svtools:ListBox:DLG_EXPORT:LB_SIZEX
+ Exportheight svtools:MetricField:DLG_EXPORT:MF_SIZEY
+
*PDFOptions HID_FILTER_PDF_OPTIONS
RangeAll filter:RadioButton:RID_PDF_TAB_GENER:RB_ALL
RangePages filter:RadioButton:RID_PDF_TAB_GENER:RB_RANGE
@@ -63,6 +77,34 @@ HideMenubar filter:CheckBox:RID_PDF_TAB_VPREFER:CB_UOP_HIDEVMENUBAR
HideToolbar filter:CheckBox:RID_PDF_TAB_VPREFER:CB_UOP_HIDEVTOOLBAR
HideWindowControls filter:CheckBox:RID_PDF_TAB_VPREFER:CB_UOP_HIDEVWINCTRL
+*PGMOptions svtools:ModalDialog:DLG_EXPORT
+Exportwidth svtools:MetricField:DLG_EXPORT:MF_SIZEX
+Exportmeasurement svtools:ListBox:DLG_EXPORT:LB_SIZEX
+Exportheight svtools:MetricField:DLG_EXPORT:MF_SIZEY
+Resolution svtools:NumericField:DLG_EXPORT:NF_RESOLUTION
+Resolutionmeasurement svtools:ListBox:DLG_EXPORT:LB_RESOLUTION
+QualityBinary svtools:RadioButton:DLG_EXPORT:RB_BINARY
+QualityText svtools:RadioButton:DLG_EXPORT:RB_TEXT
+
+*PNGOptions svtools:ModalDialog:DLG_EXPORT
+Exportwidth svtools:MetricField:DLG_EXPORT:MF_SIZEX
+Exportmeasurement svtools:ListBox:DLG_EXPORT:LB_SIZEX
+Exportheight svtools:MetricField:DLG_EXPORT:MF_SIZEY
+Resolution svtools:NumericField:DLG_EXPORT:NF_RESOLUTION
+Resolutionmeasurement svtools:ListBox:DLG_EXPORT:LB_RESOLUTION
+Compression svtools:NumericField:DLG_EXPORT:NF_COMPRESSION
+Interlaced svtools:CheckBox:DLG_EXPORT:CB_INTERLACED
+
+
+*PPMOptions svtools:ModalDialog:DLG_EXPORT
+Exportwidth svtools:MetricField:DLG_EXPORT:MF_SIZEX
+Exportmeasurement svtools:ListBox:DLG_EXPORT:LB_SIZEX
+Exportheight svtools:MetricField:DLG_EXPORT:MF_SIZEY
+Resolution svtools:NumericField:DLG_EXPORT:NF_RESOLUTION
+Resolutionmeasurement svtools:ListBox:DLG_EXPORT:LB_RESOLUTION
+QualityBinary svtools:RadioButton:DLG_EXPORT:RB_BINARY
+QualityText svtools:RadioButton:DLG_EXPORT:RB_TEXT
+
*Posterize SID_GRFFILTER_POSTER
PosterColors cui:NumericField:RID_SVX_GRFFILTER_DLG_POSTER:DLG_FILTERPOSTER_NUM_POSTER
@@ -625,3 +667,7 @@ Remove cui:PushButton:RID_SVXDLG_WEBCONNECTION_INFO:PB_REMOVE
RemoveAll cui:PushButton:RID_SVXDLG_WEBCONNECTION_INFO:PB_REMOVEALL
changePassword cui:PushButton:RID_SVXDLG_WEBCONNECTION_INFO:PB_CHANGE
+*SVMOptions svtools:ModalDialog:DLG_EXPORT
+Exportwidth svtools:MetricField:DLG_EXPORT:MF_SIZEX
+Exportmeasurement svtools:ListBox:DLG_EXPORT:LB_SIZEX
+Exportheight svtools:MetricField:DLG_EXPORT:MF_SIZEY \ No newline at end of file
diff --git a/testautomation/global/win/edia_t_z.win b/testautomation/global/win/edia_t_z.win
index 4e3e0cd2a1be..79297769c7d2 100755
--- a/testautomation/global/win/edia_t_z.win
+++ b/testautomation/global/win/edia_t_z.win
@@ -236,6 +236,11 @@ NextBtn HID_FIRSTSTART_NEXT
OKBtn HID_FIRSTSTART_FINISH
CancelBtn HID_FIRSTSTART_CANCEL
+*WMFOptions svtools:ModalDialog:DLG_EXPORT
+Exportwidth svtools:MetricField:DLG_EXPORT:MF_SIZEX
+Exportmeasurement svtools:ListBox:DLG_EXPORT:LB_SIZEX
+Exportheight svtools:MetricField:DLG_EXPORT:MF_SIZEY
+
*XFormAddInstance HID_XFORMS_ADDINSTANCE_DLG
InstanceName svx:Edit:RID_SVXDLG_ADD_INSTANCE:ED_INST_NAME
InstanceURL SID_OPENURL
diff --git a/testautomation/graphics/optional/includes/global/export_graphic.inc b/testautomation/graphics/optional/includes/global/export_graphic.inc
index fd2cf45f9800..f4c34ec36795 100644
--- a/testautomation/graphics/optional/includes/global/export_graphic.inc
+++ b/testautomation/graphics/optional/includes/global/export_graphic.inc
@@ -43,34 +43,24 @@ testcase tEPS
hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString )
if ( hCallExport ( OutputGrafikTBO , sFilter ) ) then
- Kontext "EPSOptionen"
- if ( EPSOptionen.Exists( 2 ) ) then
+ Kontext "EPSOptions"
+ if ( EPSOptions.Exists( 2 ) ) then
printlog "check if all properties have the right count, and depend on each other"
- ' they do not affect annything, i can check (TBO)
- ' VorschauTIF.Check
- ' InterchangeEPSI.Check
+
Level1.Check
- if Farbe.IsEnabled then warnlog " :-("
- if Graustufen.IsEnabled then warnlog " :-("
- if LZWKodierung.IsEnabled then warnlog " :-("
- if Keine.IsEnabled then warnlog " :-("
- ' if (TextEinstellungen.IsEnabled <> TRUE) then warnlog " :-("
+ if Color.IsEnabled then warnlog " :-("
+ if Greyscale.IsEnabled then warnlog " :-("
+ if LZWEncoding.IsEnabled then warnlog " :-("
+ if NoneCompression.IsEnabled then warnlog " :-("
+
Level2.Check
- if (Farbe.IsEnabled <> TRUE) then warnlog " :-("
- if (Graustufen.IsEnabled <> TRUE) then warnlog " :-("
- if (LZWKodierung.IsEnabled <> TRUE) then warnlog " :-("
- if (Keine.IsEnabled <> TRUE) then warnlog " :-("
- ' if (TextEinstellungen.IsEnabled <> TRUE) then warnlog " :-("
- printlog "'Color Resolution' listbox contains eight items"
- ' x = TextEinstellungen.GetItemCount
- ' if x <> 2 then warnlog "'TextEinstellungen' Count is wrong; should:2, is:" + x
- ' for i = 1 to x
- ' TextEinstellungen.Select i
- ' sleep 1
- ' Printlog " - " + i + ": '" +TextEinstellungen.GetSelText + "'"
- ' next i
+ if (Color.IsEnabled <> TRUE) then warnlog " :-("
+ if (Greyscale.IsEnabled <> TRUE) then warnlog " :-("
+ if (LZWEncoding.IsEnabled <> TRUE) then warnlog " :-("
+ if (NoneCompression.IsEnabled <> TRUE) then warnlog " :-("
+
printlog "leave dialog with cancel -> there has to be no file created!"
- hCloseDialog( EPSOptionen, "cancel" )
+ hCloseDialog( EPSOptions, "cancel" )
if ( FileExists( OutputGrafikTBO+sExt ) ) then ' inspired by bug #99932 Graphic is exported though cancel is pressed
warnlog "Dialog was canceled, but file got saved, too :-( - i35177"
@@ -89,10 +79,9 @@ testcase tEPS
printlog( "Save the file" )
if ( hCallExport( OutputGrafikTBO, sFilter ) ) then
- Kontext "EPSOptionen"
- if ( EPSOptionen.Exists( 2 ) ) then
- printlog "TextEinstellungen.select 2"
- hCloseDialog( EPSOptionen, "ok" )
+ Kontext "EPSOptions"
+ if ( EPSOptions.Exists( 2 ) ) then
+ hCloseDialog( EPSOptions, "ok" )
else
warnlog( "No export options dialog was displayed" )
endif
@@ -127,24 +116,13 @@ testcase tPCT
printlog "open the document"
sDocument = convertpath( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString )
hFileOpen( sDocument )
-
+ printlog "----------1st: Trying export and canceling it."
if ( hCallExport( OutputGrafikTBO , sFilter ) ) then
-
- Kontext "PICTOptionen"
+ Kontext "PCTOptions"
printlog( "Export options dialog" )
- if ( PICTOptionen.Exists( 2 ) ) then
-
- printlog "check if all properties have the right count, and depend on each other"
- Original.Check
- if Breite.IsEnabled then warnlog " :-("
- if Hoehe.IsEnabled then warnlog " :-("
- Groesse.Check
- Breite.More
- Hoehe.Less
-
+ if PCTOptions.Exists(2) then
printlog "leave dialog with cancel -> there has to be no file created!"
- hCloseDialog( PICTOptionen, "cancel" )
-
+ hCloseDialog( PCTOptions, "cancel" )
if ( FileExists( OutputGrafikTBO + sExt ) ) then
warnlog( "#i35177# - dialog <PictOptions> canceled, still the file was saved" )
endif
@@ -157,33 +135,25 @@ testcase tPCT
Warnlog " '" + sFilter + "' has a problem"
Active.OK
end if
-
end if
- printlog " now save it realy and load the file afterwards"
+ printlog "----------2nd: now save it really and load the file afterwards"
if ( hCallExport( OutputGrafikTBO, sFilter ) ) then
- Kontext "PICTOptionen"
+ Kontext "PCTOptions"
printlog( "Export options dialog" )
- if ( PICTOptionen.Exists( 2 ) ) then
- Groesse.Check
- Breite.Less
- Hoehe.More
- hCloseDialog( PICTOptionen, "ok" )
+ if ( PCTOptions.Exists( 2 ) ) then
+ hCloseDialog( PCTOptions, "ok" )
else
warnlog( "No export options dialog was displayed" )
endif
-
sOutputFile = OutputGrafikTBO+sExt
-
if ( hWaitForOutputFile( sOutputFile ) ) then
-
- printlog( "Close file and re-insert graphics into new document" )
+ printlog "Close file and re-insert graphics into new document"
hInsertGraphicsToNewFile( sOutputFile ) ' local helper function, see bottom of this file
else
warnlog( "File was not saved: " & sOutputFile )
endif
-
endif
hFileReOpen( sDocument )
@@ -197,16 +167,16 @@ testcase tPCT
endif
endif
+ printlog "----------3rd: exporting part of the picture and inserting into new file."
hTypeKeys ("<escape><tab>")
fGetSizeXY sx1, sY, TRUE
if ( hCallExport( OutputGrafikTBO + "1", sFilter, TRUE ) ) then
- Kontext "PICTOptionen"
+ Kontext "PCTOptions"
printlog( "Export options dialog" )
- if ( PICTOptionen.Exists( 2 ) ) then
- Original.Check
- hCloseDialog( PICTOptionen, "ok" )
+ if ( PCTOptions.Exists( 2 ) ) then
+ hCloseDialog( PCTOptions, "ok" )
else
warnlog( "No export options dialog was displayed" )
endif
@@ -226,22 +196,29 @@ testcase tPCT
endif
hFileReOpen( "" )
+ printlog "----------4th: exporting rectangle and reload file."
hRechteckErstellen ( 10, 10, 30, 40 )
if ( hCallExport( OutputGrafikTBO + "2" , sFilter, TRUE ) ) then
- Kontext "PICTOptionen"
+ Kontext "PCTOptions"
printlog( "Export options dialog" )
- if ( PICTOptionen.Exists( 2 ) ) then
- Groesse.Check
- Breite.SetText "9"
- Hoehe.SetText "9"
- Groesse.Check
-
- printlog "Check 'Size' one more time to make the change go through"
- sx1 = Breite.GetText
- sY = Hoehe.GetText
- hCloseDialog( PICTOptionen, "ok" )
+ if ( PCTOptions.Exists( 2 ) ) then
+ Exportwidth.SetText "9"
+ if Exportmeasurement.GetSelText = "inches" then
+ sx1 = (Exportwidth.GetText)+ """"
+ printlog "sx1= " & sx1
+ else
+ sx1 = (Exportwidth.GetText)+ "cm"
+ endif
+
+ if Exportmeasurement.GetSelText = "inches" then
+ sY = (Exportheight.GetText)+ """"
+ printlog "sY= " & sY
+ else
+ sY = (Exportheight.GetText)+ "cm"
+ endif
+ hCloseDialog( PCTOptions, "ok" )
else
warnlog( "No export options dialog was displayed" )
endif
@@ -262,34 +239,6 @@ testcase tPCT
if ( not bTemp ) then warnlog "Selected original size NOT OK :-("
endif
- if ( hCallExport( OutputGrafikTBO + "3", sFilter, TRUE ) ) then
-
- Kontext "PICTOptionen"
- printlog( "Export options dialog" )
- if ( PICTOptionen.Exists( 2 ) ) then
- Groesse.Check
- sX2 = Breite.GetText
- if (LiberalMeasurement(sx1, sX2)) <> TRUE then
- if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) then
- Printlog "Width was ok. Expected: " + sx1 + "' was: '" + sX2 + "'"
- else
- warnLog "Width is different expected: '" + sx1 + "' is: '" + sX2 + "'"
- endif
- endif
- sY2 = Hoehe.GetText
- if (LiberalMeasurement(sY, sY2)) <> TRUE then
- if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) then
- Printlog "Height was ok. Expected: " + sY + "' was: '" + sY2 + "'"
- else
- warnLog "Height is different expected: '" + sY + "' is: '" + sY2 + "'"
- endif
- endif
- hCloseDialog( PICTOptionen, "cancel" )
- else
- warnlog( "No export options dialog was displayed" )
- endif
- endif
-
call hCloseDocument
endcase 'tPCT
@@ -305,15 +254,17 @@ testcase tPBM
printlog "Save it"
if ( hCallExport (OutputGrafikTBO , sFilter ) ) then
- Kontext "PBMOptionen"
- if ( PBMOptionen.Exists( 2 ) ) then
- Ascii.Check
- hCloseDialog( PBMOptionen, "ok" )
+ Kontext "PBMOptions"
+ if ( PBMOptions.Exists( 2 ) ) then
+ QualityBinary.Check
+ QualityText.Check
+ hCloseDialog( PBMOptions, "ok" )
else
warnlog( "No export options dialog was displayed" )
endif
printlog( "Close file and re-insert graphics into new document" )
+ sleep (1)
hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file
endif
@@ -333,10 +284,11 @@ testcase tPGM
printlog "Save it"
if ( hCallExport (OutputGrafikTBO , sFilter ) ) then
- Kontext "PGMOptionen"
- if ( PGMOptionen.Exists( 2 ) ) then
- Ascii.Check
- hCloseDialog( PGMOptionen, "ok" )
+ Kontext "PGMOptions"
+ if ( PGMOptions.Exists( 2 ) ) then
+ QualityBinary.Check
+ QualityText.Check
+ hCloseDialog( PGMOptions, "ok" )
else
warnlog( "No export options dialog was displayed" )
endif
@@ -361,10 +313,11 @@ testcase tPPM
printlog "Save it"
if ( hCallExport (OutputGrafikTBO , sFilter ) ) then
- Kontext "PPMOptionen"
- if ( PPMOptionen.Exists( 2 ) ) then
- Ascii.Check
- hCloseDialog( PPMOptionen, "ok" )
+ Kontext "PPMOptions"
+ if ( PPMOptions.Exists( 2 ) ) then
+ QualityBinary.Check
+ QualityText.Check
+ hCloseDialog( PPMOptions, "ok" )
else
warnlog( "No export options dialog was displayed" )
endif
@@ -452,16 +405,17 @@ testcase tGIF
printlog "save it"
if ( hCallExport( OutputGrafikTBO, sFilter ) ) then
- Kontext "GIFOptionen"
- if GIFOptionen.Exists (2) then
- Interlace.Uncheck
- TransparentSpeichern.UnCheck
- hCloseDialog( GIFOptionen, "ok" )
+ Kontext "GIFOptions"
+ if GIFOptions.Exists (2) then
+ Interlaced.Uncheck
+ Transparency.UnCheck
+ hCloseDialog( GIFOptions, "ok" )
else
warnlog( "No export options dialog was displayed" )
endif
printlog( "Close file and re-insert graphics into new document" )
+ sleep (1)
hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file
endif
@@ -481,11 +435,10 @@ testcase tJPEG
printlog " save it "
if ( hCallExport( OutputGrafikTBO , sFilter ) ) then
- Kontext "JpegOptionen"
- if ( JpegOptionen.Exists( 2 ) ) then
- Echtfarben.Check
- Qualitaet.ToMin
- hCloseDialog( JpegOptionen, "ok" )
+ Kontext "JPGOptions"
+ if ( JPGOptions.Exists( 2 ) ) then
+ Quality.ToMin
+ hCloseDialog( JPGOptions, "ok" )
else
warnlog( "No export options dialog was displayed" )
endif
@@ -502,7 +455,7 @@ endcase 'tJPEG
'*******************************************************************************
function hInsertGraphicsToNewFile( sOutputFile as string )
-
+ sleep (1)
if ( FileExists( sOutputFile ) ) then
hFileReOpen( "" )
Call hGrafikEinfuegen( sOutputFile )
diff --git a/testautomation/graphics/optional/includes/global/export_graphic_2.inc b/testautomation/graphics/optional/includes/global/export_graphic_2.inc
index 5e0a2f3ec811..3beefb13dd64 100644
--- a/testautomation/graphics/optional/includes/global/export_graphic_2.inc
+++ b/testautomation/graphics/optional/includes/global/export_graphic_2.inc
@@ -44,13 +44,13 @@ testcase tPNG
hFileOpen( gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString )
if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
- Kontext "PNGOptionen"
- if PNGOptionen.Exists (2) then
- Kompression.ToMax
+ Kontext "PNGOptions"
+ if PNGOptions.Exists (2) then
+ Compression.ToMax
Interlaced.UnCheck
- PNGOptionen.OK
+ PNGOptions.OK
iWaitIndex = 0
- do while PNGOptionen.Exists AND iWaitIndex < 30
+ do while PNGOptions.Exists AND iWaitIndex < 30
sleep (1)
iWaitIndex = iWaitIndex + 1
loop
@@ -87,25 +87,19 @@ testcase tSVM
sFilter = "SVM - StarView Metafile (.svm)"
sExt = ".svm"
-
+ printlog "opening test file"
sDocument = ConvertPath ( gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString)
hFileOpen sDocument
+ printlog "Trying export and canceling it.."
if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
- Kontext "SVMOptionen"
- if SVMOptionen.Exists (2) then
- Original.Check
- if Breite.IsEnabled then
- warnlog " :-("
- endif
- if Hoehe.IsEnabled then
- warnlog " :-("
- endif
- Groesse.Check
- Breite.More
- Hoehe.Less
- SVMOptionen.Cancel
+ Kontext "SVMOptions"
+ if SVMOptions.Exists (2) then
+ Exportwidth.More
+ Exportheight.Less
+ SVMOptions.Cancel
sleep 5
+ printlog "Checking if directory is still empty.."
if ( dir(OutputGrafikTBO+sExt) = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed
Printlog "ok :-)"
else
@@ -122,13 +116,14 @@ testcase tSVM
Active.OK
end if
end if
+
+ printlog "Doing real SVM export."
if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
- Kontext "SVMOptionen"
- if SVMOptionen.Exists (2) then
- Groesse.Check
- Breite.Less
- Hoehe.More
- SVMOptionen.OK
+ Kontext "SVMOptions"
+ if SVMOptions.Exists (2) then
+ Exportwidth.Less
+ Exportheight.More
+ SVMOptions.OK
sleep 5
endif
if ( dir(OutputGrafikTBO+sExt) <> "") then
@@ -136,56 +131,77 @@ testcase tSVM
else
warnlog "File didn't get saved :-("
endif
- hCloseDocument ()
- sleep 5
- hNewDocument()
- sleep 5
- Call hGrafikEinfuegen ( OutputGrafikTBO+sExt )
endif
+ printlog "Closing TestDoc."
hCloseDocument ()
+ sleep 5
+ printlog "Opening new doc and inserting exported file."
+ hNewDocument()
+ sleep 5
+ Call hGrafikEinfuegen ( OutputGrafikTBO+sExt )
+ printlog "Closing doc with inserted file."
+ hCloseDocument ()
+
+ printlog "Loading testdoc."
hFileOpen (sDocument)
sleep (10)
-
+ printlog "Making doc editable."
call fMakeDocumentWritable
-
+ printlog "Selecting part of doc."
hTypeKeys ("<escape><tab>")
+ printlog "getting size of part. "
fGetSizeXY sx1, sY, TRUE
+ printlog "exporting part of doc."
if hCallExport (OutputGrafikTBO & "1" , sFilter, TRUE ) = TRUE then
- Kontext "SVMOptionen"
- if SVMOptionen.Exists (2) then
- Original.Check
- SVMOptionen.OK
- sleep 5
- endif
+ Kontext "SVMOptions"
+ SVMOptions.OK
+ sleep 5
if ( dir(OutputGrafikTBO & "1" & sExt) <> "") then
Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "1" & sExt & "'"
else
warnlog "File didn't get saved :-("
endif
+ printlog "Closing testdoc."
hCloseDocument ()
sleep 5
+ printlog "Opening new doc."
hNewDocument()
sleep 5
+ printlog "Inserting exported part of Testdoc."
Call hGrafikEinfuegen ( OutputGrafikTBO & "1" & sExt )
bTemp = FALSE
+ printlog "checking size of inserted file."
fGetSizeXY sx1, sY, bTemp
if (bTemp = FALSE) then
warnlog "Selected original size NOT OK :-("
endif
endif
+ printlog "closing doc."
hCloseDocument ()
+
+ printlog "opening new doc."
hNewDocument()
+ printlog "inserting Rectangle."
hRechteckErstellen ( 10, 10, 30, 40 )
+ printlog "Exporting Rectangle"
if hCallExport (OutputGrafikTBO & "2" , sFilter, TRUE ) = TRUE then
- Kontext "SVMOptionen"
- if SVMOptionen.Exists (2) then
- Groesse.Check
- Breite.SetText "9"
- Hoehe.SetText "9"
- Groesse.Check 'Check to make settings go throught
- sx1 = Breite.GetText
- sY = Hoehe.GetText
- SVMOptionen.OK
+ Kontext "SVMOptions"
+ if SVMOptions.Exists (2) then
+ Exportwidth.SetText "9"
+ if Exportmeasurement.GetSelText = "inches" then
+ sx1 = (Exportwidth.GetText)+ """"
+ printlog "sx1= " & sx1
+ else
+ sx1 = (Exportwidth.GetText)+ "cm"
+ endif
+
+ if Exportmeasurement.GetSelText = "inches" then
+ sY = (Exportheight.GetText)+ """"
+ printlog "sY= " & sY
+ else
+ sY = (Exportwidth.GetText)+ "cm"
+ endif
+ SVMOptions.OK
sleep 5
endif
if ( dir(OutputGrafikTBO & "2" & sExt) <> "") then
@@ -193,8 +209,10 @@ testcase tSVM
else
warnlog "File didn't get saved :-("
endif
+ printlog "Closing doc."
hCloseDocument ()
sleep 5
+ printlog "Opening exported rectangle."
hFileOpen (OutputGrafikTBO & "2" & sExt)
kontext "Filterauswahl"
if Filterauswahl.exists then
@@ -204,6 +222,7 @@ testcase tSVM
endif
kontext "DocumentDraw"
DocumentDraw.TypeKeys ("<escape><tab>")
+ printlog "Selecting and checking size.."
ContextOriginalSize
bTemp = FALSE
fGetSizeXY sx1, sY, bTemp
@@ -211,31 +230,8 @@ testcase tSVM
warnlog "Selected original size NOT OK :-("
endif
endif
- if hCallExport (OutputGrafikTBO & "3" , sFilter, TRUE ) = TRUE then
- Kontext "SVMOptionen"
- if SVMOptionen.Exists (2) then
- Groesse.Check
- sX2 = Breite.GetText
- if (LiberalMeasurement(sx1, sX2)) <> TRUE then
- if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) then
- Printlog "Width was ok. Expected: " & sx1 & "' was: '" & sX2 & "'"
- else
- warnLog "Width is different expected: '" & sx1 & "' is: '" & sX2 & "'"
- endif
- endif
- sY2 = Hoehe.GetText
- if (LiberalMeasurement(sY, sY2)) <> TRUE then
- if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) then
- Printlog "Height was ok. Expected: " & sY & "' was: '" & sY2 & "'"
- else
- warnLog "Height is different expected: '" & sY & "' is: '" & sY2 & "'"
- endif
- endif
- SVMOptionen.Cancel
- sleep 5
- endif
- endif
+ printlog "Closing doc."
call hCloseDocument
endcase 'tSVM
@@ -657,7 +653,7 @@ endcase 'tSVG
'-------------------------------------------------------------------------------
testcase tBMP
-qaerrorlog
+
dim x as integer
dim i as integer
dim bTemp as boolean
@@ -668,50 +664,24 @@ qaerrorlog
dim sY2 as string
dim sDocument as string
- '/// open the document
+ printlog "open the Test-document"
sDocument = ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString)
hFileOpen sDocument
- if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then
- Kontext "BMPOptionen"
- if BMPOptionen.Exists (2) then
- '/// check if all properties have the right count, and depend on each other ///'
- '/// 'Color Resolution' listbox contains eight items ///'
- x = Farbaufloesung.GetItemCount
- if x <> 8 then warnlog "Color Resolution Count is wrong; should be:8, is:" + x
+ printlog "Trying to export and canceling.."
+ if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then
+ Kontext "BMPOptions"
+ if BMPOptions.Exists (2) then
+ x = Colordepth.GetItemCount
+ if x <> 7 then warnlog "Color Resolution Count is wrong; should be:7, is:" + x
for i = 1 to x
- Farbaufloesung.Select i
+ Colordepth.Select i
sleep 1
- Printlog " - " + i + ": '" +Farbaufloesung.GetSelText + "'"
- '/// checkbox RLE coding has to be enabled only for '4 and 8 bit' color palettes ///'
- if ((i > 3) AND (i < 8)) then
- if RLEKodierung.IsEnabled <> TRUE then warnlog "'RLE coding' is not checkable :-("
- else
- if RLEKodierung.IsEnabled <> FALSE then warnlog "'RLE coding' is checkable :-("
- endif
+ Printlog " - " + i + ": '" +Colordepth.GetSelText + "'"
next i
- '/// if Mode 'original' is selected, DPI///'
- Original.Check
- if DPI.IsEnabled then warnlog " :-("
- if Breite.IsEnabled then warnlog " :-("
- if Hoehe.IsEnabled then warnlog " :-("
- Aufloesung.Check
- x = DPI.GetItemCount
- '/// 'DPI' listbox contains eight items ///'
- if x <> 4 then warnlog "'DPI' Count is wrong; should be:4, is:" + x
- for i = 1 to x
- DPI.Select i
- Printlog " - " + i + ": '" +DPI.GetSelText + "'"
- next i
- if Breite.IsEnabled then warnlog " :-("
- if Hoehe.IsEnabled then warnlog " :-("
- Groesse.Check
- if DPI.IsEnabled then warnlog " :-("
- Breite.More
- Hoehe.Less
Sleep 1
- '/// leave dialog with cancel -> there has to be no file created! ///'
- BMPOptionen.Cancel
+ printlog "Leave dialog with cancel -> there has to be no file created!"
+ BMPOptions.Cancel
sleep 5
if ( dir(OutputGrafikTBO+".bmp") = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed
Printlog "ok :-)"
@@ -729,15 +699,14 @@ qaerrorlog
Active.OK
end if
end if
- Printlog "'/// now save it realy and load the file afterwards ///'"
+
+ Printlog " now save it really and load the file afterwards"
if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then
- Kontext "BMPOptionen"
- if BMPOptionen.Exists (2) then
- Farbaufloesung.Select 7
- RLEKodierung.Check
- Aufloesung.Check
- DPI.Select 3
- BMPOptionen.OK
+ Kontext "BMPOptions"
+ if BMPOptions.Exists (2) then
+ Colordepth.Select 7
+ Compression.Check
+ BMPOptions.OK
sleep 5
endif
if ( dir(OutputGrafikTBO+".bmp") <> "") then
@@ -745,14 +714,18 @@ qaerrorlog
else
warnlog "File didn't get saved :-("
endif
+ printlog "Closing doc."
hCloseDocument ()
sleep 5
+ printlog "Opening new doc."
hNewDocument()
sleep 5
+ printlog "Inserting exported file."
Call hGrafikEinfuegen ( OutputGrafikTBO+".bmp" )
endif
+ printlog "Closing doc again."
hCloseDocument ()
- Printlog "'/// now save a SELECTION in ORIGINAL SIZE and load the file afterwards ///'"
+ Printlog "Now save a SELECTION in and load the file afterwards"
hFileOpen (sDocument)
kontext "Filterauswahl"
@@ -762,51 +735,58 @@ qaerrorlog
goto endsub
endif
- ' check if the document is writable
+ printlog "check if the document is writable"
call fMakeDocumentWritable
hTypeKeys ("<escape><tab>")
fGetSizeXY sx1, sy, TRUE
- if hCallExport (OutputGrafikTBO + "1" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
- Kontext "BMPOptionen"
- if BMPOptionen.Exists (2) then
- Original.Check
- BMPOptionen.OK
- sleep 5
- endif
- if ( dir(OutputGrafikTBO + "1"+".bmp") <> "") then
- Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "1"+".bmp" + "'"
- else
- warnlog "File didn't get saved :-("
- endif
- hCloseDocument ()
- sleep 5
- hNewDocument()
- sleep 5
- Call hGrafikEinfuegen ( OutputGrafikTBO + "1"+".bmp" )
- bTemp = FALSE
- fGetSizeXY sx1, sY, bTemp
- if (bTemp = FALSE) then
- warnlog "Selected original size NOT OK :-("
+ if hCallExport (OutputGrafikTBO + "1" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
+ Kontext "BMPOptions"
+ if BMPOptions.Exists (2) then
+ BMPOptions.OK
+ sleep 5
+ endif
+ if ( dir(OutputGrafikTBO + "1"+".bmp") <> "") then
+ Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "1"+".bmp" + "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hNewDocument()
+ sleep 5
+ Call hGrafikEinfuegen ( OutputGrafikTBO + "1"+".bmp" )
+ bTemp = FALSE
+ fGetSizeXY sx1, sY, bTemp
+ if (bTemp = FALSE) then
+ warnlog "Selected original size NOT OK :-("
endif
endif
hCloseDocument ()
- Printlog "'/// now CREATE a rectangle, select it, save it in SIZE and load the file afterwards ///'"
+ Printlog "Now create a rectangle, select it, save it in SIZE and load the file afterwards"
hNewDocument()
hTypeKeys "<TAB>"
gMouseClick 50, 50
hRechteckErstellen ( 10, 10, 30, 40 )
if hCallExport (OutputGrafikTBO + "2" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
- Kontext "BMPOptionen"
- if BMPOptionen.Exists (2) then
- Groesse.Check
- Breite.SetText "9"
- Hoehe.SetText "9"
- Groesse.Check 'Press "Size" one more time in order to make the change go through"
- sx1 = Breite.GetText
- sY = Hoehe.GetText
- BMPOptionen.OK
+ Kontext "BMPOptions"
+ if BMPOptions.Exists (2) then
+ Exportwidth.SetText "9"
+ if Exportmeasurement.GetSelText = "inches" then
+ sx1 = (Exportwidth.GetText)+ """"
+ printlog "sx1= " & sx1
+ else
+ sx1 = (Exportwidth.GetText)+ "cm"
+ endif
+
+ if Exportmeasurement.GetSelText = "inches" then
+ sY = (Exportheight.GetText)+ """"
+ printlog "sY= " & sY
+ else
+ sY = (Exportwidth.GetText)+ "cm"
+ endif
+ BMPOptions.OK
sleep 5
endif
if ( dir(OutputGrafikTBO + "2"+".bmp") <> "") then
@@ -814,6 +794,7 @@ qaerrorlog
else
warnlog "File didn't get saved :-("
endif
+ printlog "Closing doc."
hCloseDocument ()
sleep 5
hFileOpen (OutputGrafikTBO + "2"+".bmp")
@@ -834,31 +815,6 @@ qaerrorlog
endif
endif
- if hCallExport (OutputGrafikTBO + "3" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
- Kontext "BMPOptionen"
- if BMPOptionen.Exists (2) then
- Groesse.Check
- sX2 = Breite.GetText
- if (LiberalMeasurement(sx1, sX2)) <> TRUE then
- if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) then
- Printlog "Width was ok. Expected: " + sx1 + "' was: '" + sX2 + "'"
- else
- warnLog "Width is different expected: '" + sx1 + "' is: '" + sX2 + "'"
- endif
- endif
- sY2 = Hoehe.GetText
- if (LiberalMeasurement(sY, sY2)) <> TRUE then
- if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) then
- Printlog "Height was ok. Expected: " + sY + "' was: '" + sY2 + "'"
- else
- warnLog "Height is different expected: '" + sY + "' is: '" + sY2 + "'"
- endif
- endif
- BMPOptionen.Cancel
- sleep 5
- endif
- endif
-
call hCloseDocument
endcase 'tBMP
@@ -884,19 +840,11 @@ testcase tEMF
hFileOpen sDocument
if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
- Kontext "SVMOptionen"
- if SVMOptionen.Exists (2) then
- Original.Check
- if Breite.IsEnabled then
- warnlog " :-("
- endif
- if Hoehe.IsEnabled then
- warnlog " :-("
- endif
- Groesse.Check
- Breite.More
- Hoehe.Less
- SVMOptionen.Cancel
+ Kontext "EMFOptions"
+ if EMFOptions.Exists (2) then
+ Exportwidth.More
+ Exportheight.Less
+ EMFOptions.Cancel
sleep 5
if ( dir(OutputGrafikTBO+sExt) = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed
Printlog "ok :-)"
@@ -915,12 +863,11 @@ testcase tEMF
end if
end if
if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
- Kontext "SVMOptionen"
- if SVMOptionen.Exists (2) then
- Groesse.Check
- Breite.Less
- Hoehe.More
- SVMOptionen.OK
+ Kontext "EMFOptions"
+ if EMFOptions.Exists (2) then
+ Exportwidth.More
+ Exportheight.Less
+ EMFOptions.OK
sleep 5
endif
if ( dir(OutputGrafikTBO+sExt) <> "") then
@@ -935,53 +882,26 @@ testcase tEMF
Call hGrafikEinfuegen ( OutputGrafikTBO+sExt )
endif
hCloseDocument ()
- hFileOpen (sDocument)
- kontext "Filterauswahl"
- if Filterauswahl.Exists(10) then
- Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted."
- Filterauswahl.Cancel
- goto endsub
- endif
- printlog "making doc editable if it is readonly"
- call fMakeDocumentWritable
- hTypeKeys ("<escape><tab>")
- fGetSizeXY sx1, sY, TRUE
- if hCallExport (OutputGrafikTBO & "1" , sFilter, TRUE ) = TRUE then
- Kontext "SVMOptionen"
- if SVMOptionen.Exists (2) then
- Original.Check
- SVMOptionen.OK
- sleep 5
- endif
- if ( dir(OutputGrafikTBO & "1" & sExt) <> "") then
- Printlog "Ok :-) saved as: '" & OutputGrafikTBO & "1" & sExt & "'"
- else
- warnlog "File didn't get saved :-("
- endif
- hCloseDocument ()
- sleep 5
- hNewDocument()
- sleep 5
- Call hGrafikEinfuegen ( OutputGrafikTBO & "1" & sExt )
- bTemp = FALSE
- fGetSizeXY sx1, sY, bTemp
- if (bTemp = FALSE) then
- warnlog "Selected original size NOT OK :-("
- endif
- endif
- hCloseDocument ()
+
hNewDocument()
hRechteckErstellen ( 10, 10, 30, 40 )
if hCallExport (OutputGrafikTBO & "2" , sFilter, TRUE ) = TRUE then
- Kontext "SVMOptionen"
- if SVMOptionen.Exists (2) then
- Groesse.Check
- Breite.SetText "9"
- Hoehe.SetText "9"
- Groesse.Check 'Press "Size" one more time to make the change go through"
- sx1 = Breite.GetText
- sY = Hoehe.GetText
- SVMOptionen.OK
+ Kontext "EMFOptions"
+ if EMFOptions.Exists (2) then
+ Exportwidth.SetText "9"
+ if Exportmeasurement.GetSelText = "inches" then
+ sx1 = (Exportwidth.GetText)+ """"
+ printlog "sx1= " & sx1
+ else
+ sx1 = (Exportwidth.GetText)+ "cm"
+ endif
+ if Exportmeasurement.GetSelText = "inches" then
+ sY = (Exportheight.GetText)+ """"
+ printlog "sY= " & sY
+ else
+ sY = (Exportwidth.GetText)+ "cm"
+ endif
+ EMFOptions.OK
sleep 5
endif
if ( dir(OutputGrafikTBO & "2" & sExt) <> "") then
@@ -1002,10 +922,9 @@ testcase tEMF
endif
if hCallExport (OutputGrafikTBO & "3" , sFilter, TRUE ) = TRUE then
- Kontext "SVMOptionen"
- if SVMOptionen.Exists (2) then
- Groesse.Check
- sX2 = Breite.GetText
+ Kontext "EMFOptions"
+ if EMFOptions.Exists (2) then
+ sX2 = Exportwidth.GetText
if (LiberalMeasurement(sx1, sX2)) <> TRUE then
if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) then
Printlog "Width was ok. Expected: " & sx1 & "' was: '" & sX2 & "'"
@@ -1013,7 +932,7 @@ testcase tEMF
warnLog "Width is different expected: '" & sx1 & "' is: '" & sX2 & "'"
endif
endif
- sY2 = Hoehe.GetText
+ sY2 = Exportheight.GetText
if (LiberalMeasurement(sY, sY2)) <> TRUE then
if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) then
Printlog "Height was ok. Expected: " & sY & "' was: '" & sY2 & "'"
@@ -1021,7 +940,7 @@ testcase tEMF
warnLog "Height is different expected: '" & sY & "' is: '" & sY2 & "'"
endif
endif
- SVMOptionen.Cancel
+ EMFOptions.Cancel
sleep 5
endif
endif
@@ -1050,32 +969,26 @@ testcase tMET
sExt = ".met"
sDocument = gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString
+ printlog "loading Test File"
hFileOpen sDocument
+ printlog "----------1st: Trying to export and then canceling it"
if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
- Kontext "METOptionen"
- if METOptionen.Exists (2) then
- Original.Check
- if Breite.IsEnabled then
- warnlog " :-("
- endif
- if Hoehe.IsEnabled then
- warnlog " :-("
- endif
- Groesse.Check
- sTemp = Breite.getText
- Breite.More
- if (sTemp = Breite.getText) then
+ Kontext "METOptions"
+ if METOptions.Exists (2) then
+ sTemp = Exportwidth.getText
+ Exportwidth.More
+ if (sTemp = Exportwidth.getText) then
qaErrorLog "Width didn't change on pressing button 'More' #112225#"
- Breite.setText "10"
- Hoehe.setText "10"
+ Exportwidth.setText "10"
endif
- sTemp = Hoehe.getText
- Hoehe.Less
- if (sTemp = Hoehe.getText) then
+ sTemp = Exportheight.getText
+ Exportheight.Less
+ if (sTemp = Exportheight.getText) then
warnlog "Height didn't change on pressing button 'Less'"
endif
- METOptionen.Cancel
+ printlog "Canceling export..."
+ METOptions.Cancel
sleep 5
if ( dir(OutputGrafikTBO+sExt) = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed
Printlog "ok :-)"
@@ -1093,25 +1006,24 @@ testcase tMET
Active.OK
end if
end if
+ printlog "----------2nd: doing real export.."
if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
- Kontext "METOptionen"
- if METOptionen.Exists (2) then
- Groesse.Check
- sTemp = Breite.getText
- Breite.Less
- if (sTemp = Breite.getText) then
+ Kontext "METOptions"
+ if METOptions.Exists (2) then
+ sTemp = Exportwidth.getText
+ Exportwidth.Less
+ if (sTemp = Exportwidth.getText) then
warnlog "Width didn't change on pressing button 'Less'"
endif
- sTemp = Hoehe.getText
- Hoehe.More
- if (sTemp = Hoehe.getText) then
+ sTemp = Exportheight.getText
+ Exportheight.More
+ if (sTemp = Exportheight.getText) then
qaErrorLog "Height didn't change on pressing button 'More' #112225#"
- Breite.setText "10"
- Hoehe.setText "10"
+ Exportwidth.setText "10"
endif
- METOptionen.OK
+ METOptions.OK
iWaitIndex = 0
- do while METOptionen.Exists AND iWaitIndex < 30
+ do while METOptions.Exists AND iWaitIndex < 30
sleep (1)
iWaitIndex = iWaitIndex + 1
loop
@@ -1121,28 +1033,33 @@ testcase tMET
else
warnlog "File didn't get saved :-("
endif
+ printlog "Closing test doc."
hCloseDocument ()
sleep 5
+ printlog "----------3rd: Inserting export into new doc."
+ printlog "Opening new doc."
hNewDocument()
sleep 5
+ printlog "Inserting the exported file..."
Call hGrafikEinfuegen ( OutputGrafikTBO+sExt )
endif
+ printlog "Closing file with inserted graphic."
hCloseDocument ()
+ printlog "----------4th: Exporting part of test doc."
+ printlog "Opening test file.."
hFileOpen (sDocument)
sleep (10)
-
printlog "making doc editable if it is readonly"
call fMakeDocumentWritable
-
+ printlog "Selecting part of doc for export.."
hTypeKeys ("<escape><tab>")
fGetSizeXY sx1, sY, TRUE
if hCallExport (OutputGrafikTBO & "1" , sFilter, TRUE ) = TRUE then
- Kontext "METOptionen"
- if METOptionen.Exists (2) then
- Original.Check
- METOptionen.OK
+ Kontext "METOptions"
+ if METOptions.Exists (2) then
+ METOptions.OK
iWaitIndex = 0
- do while METOptionen.Exists AND iWaitIndex < 30
+ do while METOptions.Exists AND iWaitIndex < 30
sleep (1)
iWaitIndex = iWaitIndex + 1
loop
@@ -1152,32 +1069,51 @@ testcase tMET
else
warnlog "File didn't get saved :-("
endif
+ printlog "Closing testfile"
hCloseDocument ()
sleep 5
+ printlog "----------5th: Inserting exported part into new doc."
+ printlog "Opening new file.."
hNewDocument()
sleep 5
+ printlog "inserting exported part."
Call hGrafikEinfuegen ( OutputGrafikTBO & "1" & sExt )
bTemp = FALSE
+ printlog "Checking size."
fGetSizeXY sx1, sY, bTemp
if (bTemp = FALSE) then
warnlog "Selected original size NOT OK :-("
endif
endif
+ printlog "Closing doc."
hCloseDocument ()
+ printlog "----------6th: exporting fresh rectangle."
+ printlog "opening new file."
hNewDocument()
+ printlog "inserting rectangle."
hRechteckErstellen ( 10, 10, 30, 40 )
+ printlog "Exporting rectangle.."
if hCallExport (OutputGrafikTBO & "2" , sFilter, TRUE ) = TRUE then
- Kontext "METOptionen"
- if METOptionen.Exists (2) then
- Groesse.Check
- Breite.SetText "9"
- Hoehe.SetText "9"
- Groesse.Check ' Click "Size" one more time to make the changes go through.
- sx1 = Breite.GetText
- sY = Hoehe.GetText
- METOptionen.OK
+ Kontext "METOptions"
+ if METOptions.Exists (2) then
+ Exportwidth.SetText "9"
+ if Exportmeasurement.GetSelText = "inches" then
+ sx1 = (Exportwidth.GetText)+ """"
+ printlog "sx1= " & sx1
+ else
+ sx1 = (Exportwidth.GetText)+ "cm"
+ endif
+
+ if Exportmeasurement.GetSelText = "inches" then
+ sY = (Exportheight.GetText)+ """"
+ printlog "sY= " & sY
+ else
+ sY = (Exportwidth.GetText)+ "cm"
+ endif
+
+ METOptions.OK
iWaitIndex = 0
- do while METOptionen.Exists AND iWaitIndex < 30
+ do while METOptions.Exists AND iWaitIndex < 30
sleep (1)
iWaitIndex = iWaitIndex + 1
loop
@@ -1187,11 +1123,14 @@ testcase tMET
else
warnlog "File didn't get saved :-("
endif
+ printlog "closing doc."
hCloseDocument ()
sleep 5
+ printlog "----------7th:Opening exported file with rectangle"
hFileOpen (OutputGrafikTBO & "2" & sExt)
kontext "DocumentDraw"
DocumentDraw.TypeKeys ("<escape><tab>")
+ printlog "Checking file size."
ContextOriginalSize
bTemp = FALSE
fGetSizeXY sx1, sY, bTemp
@@ -1199,30 +1138,6 @@ testcase tMET
warnlog "Selected original size NOT OK :-("
endif
endif
- if hCallExport (OutputGrafikTBO & "3" , sFilter, TRUE ) = TRUE then
- Kontext "METOptionen"
- if METOptionen.Exists (2) then
- Groesse.Check
- sX2 = Breite.GetText
- if (LiberalMeasurement(sx1, sX2)) <> TRUE then
- if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) then
- Printlog "Width was ok. Expected: " & sx1 & "' was: '" & sX2 & "'"
- else
- warnLog "Width is different expected: '" & sx1 & "' is: '" & sX2 & "'"
- endif
- endif
- sY2 = Hoehe.GetText
- if (LiberalMeasurement(sY, sY2)) <> TRUE then
- if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) then
- Printlog "Height was ok. Expected: " & sY & "' was: '" & sY2 & "'"
- else
- warnLog "Height is different expected: '" & sY & "' is: '" & sY2 & "'"
- endif
- endif
- METOptionen.Cancel
- sleep 5
- endif
- endif
call hCloseDocument
endcase 'tMET
@@ -1270,27 +1185,20 @@ testcase tWMF
sFilter = "WMF - Windows Metafile (.wmf)"
sExt = ".wmf"
-
sDocument = gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString
+ printlog "Loading testdoc."
hFileOpen sDocument
+ printlog "Starting export as WMF and canceling.."
if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
- Kontext "SVMOptionen"
- if SVMOptionen.Exists (2) then
- Original.Check
- if Breite.IsEnabled then
- warnlog " :-("
- endif
- if Hoehe.IsEnabled then
- warnlog " :-("
- endif
- Groesse.Check
- Breite.More
- Hoehe.Less
- SVMOptionen.Cancel
+ Kontext "WMFOptions"
+ if WMFOptions.Exists (2) then
+ Exportwidth.Less
+ Exportheight.More
+ WMFOptions.Cancel
sleep 5
if ( dir(OutputGrafikTBO+sExt) = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed
- Printlog "ok :-)"
+ Printlog "ok :-), nothing exported due to canceling."
else
warnlog "Dialog was canceled, but file got saved, too :-( - i35177"
endif
@@ -1305,15 +1213,15 @@ testcase tWMF
Active.OK
end if
end if
+ printlog "Doing real export."
if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
- Kontext "SVMOptionen"
- if SVMOptionen.Exists (2) then
- Groesse.Check
- Breite.Less
- Hoehe.More
- SVMOptionen.OK
+ Kontext "WMFOptions"
+ if WMFOptions.Exists (2) then
+ Exportwidth.Less
+ Exportheight.More
+ WMFOptions.OK
iWaitIndex = 0
- do while SVMOptionen.Exists AND iWaitIndex < 30
+ do while WMFOptions.Exists AND iWaitIndex < 30
sleep (1)
iWaitIndex = iWaitIndex + 1
loop
@@ -1323,13 +1231,18 @@ testcase tWMF
else
warnlog "File didn't get saved :-("
endif
+ Printlog "Closing test doc."
hCloseDocument ()
sleep 5
+ printlog "Opening new odc."
hNewDocument()
sleep 5
+ printlog "Inserting exported graphic."
Call hGrafikEinfuegen ( OutputGrafikTBO+sExt )
endif
+ printlog "Closing."
hCloseDocument ()
+ Printlog "Opening exported file."
hFileOpen (sDocument)
sleep (10)
@@ -1339,12 +1252,11 @@ testcase tWMF
hTypeKeys ("<escape><tab>")
fGetSizeXY sx1, sY, TRUE
if hCallExport (OutputGrafikTBO & "1" , sFilter, TRUE ) = TRUE then
- Kontext "SVMOptionen"
- if SVMOptionen.Exists (2) then
- Original.Check
- SVMOptionen.OK
+ Kontext "WMFOptions"
+ if WMFOptions.Exists (2) then
+ WMFOptions.OK
iWaitIndex = 0
- do while SVMOptionen.Exists AND iWaitIndex < 30
+ do while WMFOptions.Exists AND iWaitIndex < 30
sleep (1)
iWaitIndex = iWaitIndex + 1
loop
@@ -1369,17 +1281,25 @@ testcase tWMF
hNewDocument()
hRechteckErstellen ( 10, 10, 30, 40 )
if hCallExport (OutputGrafikTBO & "2" , sFilter, TRUE ) = TRUE then
- Kontext "SVMOptionen"
- if SVMOptionen.Exists (2) then
- Groesse.Check
- Breite.SetText "9"
- Hoehe.SetText "9"
- Groesse.Check 'Check "Size" to make changes really go through.
- sx1 = Breite.GetText
- sY = Hoehe.GetText
- SVMOptionen.OK
+ Kontext "WMFOptions"
+ if WMFOptions.Exists (2) then
+ Exportwidth.SetText "9"
+ if Exportmeasurement.GetSelText = "inches" then
+ sx1 = (Exportwidth.GetText)+ """"
+ printlog "sx1= " & sx1
+ else
+ sx1 = (Exportwidth.GetText)+ "cm"
+ endif
+
+ if Exportmeasurement.GetSelText = "inches" then
+ sY = (Exportheight.GetText)+ """"
+ printlog "sY= " & sY
+ else
+ sY = (Exportwidth.GetText)+ "cm"
+ endif
+ WMFOptions.OK
iWaitIndex = 0
- do while SVMOptionen.Exists AND iWaitIndex < 30
+ do while WMFOptions.Exists AND iWaitIndex < 30
sleep (1)
iWaitIndex = iWaitIndex + 1
loop
@@ -1401,30 +1321,6 @@ testcase tWMF
warnlog "Selected original size NOT OK :-("
endif
endif
- if hCallExport (OutputGrafikTBO & "3" , sFilter, TRUE ) = TRUE then
- Kontext "SVMOptionen"
- if SVMOptionen.Exists (2) then
- Groesse.Check
- sX2 = Breite.GetText
- if (LiberalMeasurement(sx1, sX2)) <> TRUE then
- if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) then
- Printlog "Width was ok. Expected: " & sx1 & "' was: '" & sX2 & "'"
- else
- warnLog "Width is different expected: '" & sx1 & "' is: '" & sX2 & "'"
- endif
- endif
- sY2 = Hoehe.GetText
- if (LiberalMeasurement(sY, sY2)) <> TRUE then
- if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) then
- Printlog "Height was ok. Expected: " & sY & "' was: '" & sY2 & "'"
- else
- warnLog "Height is different expected: '" & sY & "' is: '" & sY2 & "'"
- endif
- endif
- SVMOptionen.Cancel
- sleep 5
- endif
- endif
call hCloseDocument
endcase 'tWMF
diff --git a/testautomation/graphics/required/includes/global/id_opt_2.inc b/testautomation/graphics/required/includes/global/id_opt_2.inc
index b959b718582c..8d38b2b9dc92 100644
--- a/testautomation/graphics/required/includes/global/id_opt_2.inc
+++ b/testautomation/graphics/required/includes/global/id_opt_2.inc
@@ -64,39 +64,6 @@ testcase tToolsOptionsMeasurementUnit (sApplication as string)
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- FileExport
- Kontext "ExportierenDlg"
- Dateiname.SetText "adagio"
- Dateityp.Select "BMP - Windows Bitmap (.bmp)"
- if AutomatischeDateinamenserweiterung.Exists then
- AutomatischeDateinamenserweiterung.Check
- else
- warnlog( "Automatic Filename Extension checkbox is mising" )
- endif
- Speichern.Click
- kontext "AlienWarning"
- if AlienWarning.exists(5) then
- warnlog "#i41983# Alien Warning on export not allowed"
- AlienWarning.OK
- endif
- Kontext "Messagebox"
- if Messagebox.Exists(2) then
- Messagebox.Yes
- endif
- Sleep 3
- Kontext "BMPOptionen"
- Groesse.Check
- sUnitDialog = getMeasUnit(Breite.getText) ' (2)
- if (getMeasUnit(Hoehe.getText) <> sUnitDialog) then
- warnlog " Measurement Unit is different for Width:'" + sUnitDialog + "' and Hight:'" + getMeasUnit(Hoehe.getText) + "'"
- else
- printlog "Measurement Unit is same for Width:'" + sUnitDialog + "' and Hight:'" + getMeasUnit(Hoehe.getText) + "'"
- endif
- if (sUnitOptions <> sUnitDialog) then
- printlog "#109705# Measurement Unit is different for Options:'" + sUnitOptions + "' and BMP Dialog:'" + sUnitDialog + "' (1) <> (2)"
- endif
- BMPOptionen.Cancel
-
Format3D_Effects
Kontext "Drei_D_Effekte"
Geometrie.Click
diff --git a/testautomation/graphics/required/includes/impress/im_003_.inc b/testautomation/graphics/required/includes/impress/im_003_.inc
index 3c73b7827d21..b8b5a6330f17 100644
--- a/testautomation/graphics/required/includes/impress/im_003_.inc
+++ b/testautomation/graphics/required/includes/impress/im_003_.inc
@@ -222,6 +222,9 @@ testcase tiViewToolbar_1
hUseAsyncSlot( "EditSelectAll" )
Kontext "DocumentImpress"
DocumentImpress.typeKeys("<DELETE>",true)
+
+ printlog "use the empty layout"
+ call sSelectEmptyLayout
printlog "Insert->Graphic... : global\input\graf_inp\desp.bmp "
hUseAsyncSlot( "InsertGraphicsFromFile" )
diff --git a/testautomation/graphics/tools/id_tools.inc b/testautomation/graphics/tools/id_tools.inc
index 4f919dfe36fe..57bac12e8ce8 100644
--- a/testautomation/graphics/tools/id_tools.inc
+++ b/testautomation/graphics/tools/id_tools.inc
@@ -104,10 +104,10 @@ function LiberalMeasurement ( sShould$, sActual$) as Boolean
printlog "took units from http://gsl.openoffice.org/source/browse/gsl/vcl/source/src/units.src"
select case GetMeasUnit(sShould$)
case "mm", "ミリ", "公厘" : iTolerance = 2.0 '01, 81, 88
- case "cm","センãƒ","厘米","公分" : iTolerance = 0.5 '01, 81, 86, 88
+ case "cm","セン�","厘米","公分" : iTolerance = 0.5 '01, 81, 86, 88
case chr$(34) : iTolerance = 2.5
case "pi","ピクセル" : iTolerance = 2.5 '01, 81
- case "pt", "ãƒã‚¤ãƒ³ãƒˆ" : iTolerance = 2.5 '01, 81
+ case "pt", "�イント" : iTolerance = 2.5 '01, 81
case "" : iTolerance = 1.5 ' cm is presubposition in old functions
case else
iTolerance = 2.5
@@ -268,43 +268,49 @@ function fMakeDocumentWritable() as boolean
end function
'-------------------------------------------------------------------------------
-
function fGetSizeXY (sX as string, sY as string, bGet as boolean) as Boolean
- dim sTx as string
- dim sTy as string
- dim bReturn as boolean
-
- bReturn = True
- try
- ContextPositionAndSize
- catch
- warnlog "couldn't call 'ContextPositionAndSize' no object selected ?"
- endcatch
- kontext
- active.SetPage TabPositionAndSize
- kontext "TabPositionAndSize"
- if TabPositionAndSize.exists (5) then
- sTx = Width.GetText
- sTy = Height.GetText
- TabPositionAndSize.OK
- else
- warnlog "Couldn't switch tab page :-( "
- endif
- if bGet then ' Get the Values only
- sY = sTy
- sX = sTx
- else ' Get the Values and COMPARE them
- if (LiberalMeasurement (sX,sTx) <> TRUE) then
- warnlog "width is different :-( should: '"+sX+"' is: '"+sTx+"'" + "eventually a result of i35519"
- bReturn = False
- endif
- if (LiberalMeasurement (sY,sTy) <> TRUE) then
- warnlog "hight is different :-( should: '"+sY+"' is: '"+sTy+"'" + "eventually a result of i35519"
- bReturn = False
- endif
- bGet = bReturn
- endif
+ dim sTx as string
+ dim sTy as string
+ dim bReturn as boolean
+
+ bReturn = True
+ try
+ printlog "Trying to open Position and size Dialog.."
+ ContextPositionAndSize
+ catch
+ warnlog "couldn't call 'ContextPositionAndSize' no object selected ?"
+ endcatch
+ kontext
+ active.SetPage TabPositionAndSize
+ kontext "TabPositionAndSize"
+ printlog "Getting some sizes from Position and Size dialog."
+ if TabPositionAndSize.exists (5) then
+ sTx = Width.GetText
+ printlog "Width, sTx=" & sTx
+ sTy = Height.GetText
+ printlog "Height, sTy=" & sTy
+ TabPositionAndSize.OK
+ else
+ warnlog "Couldn't switch tab page :-( "
+ endif
+ if bGet then ' Get the Values only
+ sY = sTy
+ printlog "sY=" & sY
+ sX = sTx
+ printlog "sX=" & sX
+ else ' Get the Values and COMPARE them
+ if (LiberalMeasurement (sX,sTx) <> TRUE) then
+ warnlog "width is different :-( XXXXXXXXXXXXX should: '"+sX+"' is: '"+sTx+"'" + "eventually a result of i35519"
+ bReturn = False
+ endif
+ if (LiberalMeasurement (sY,sTy) <> TRUE) then
+ warnlog "hight is different :-( xxxxxxxxxxxx should: '"+sY+"' is: '"+sTy+"'" + "eventually a result of i35519"
+ bReturn = False
+ endif
+ bGet = bReturn
+ endif
end function
+
'-------------------------------------------------------------------------
function hCallExport ( cFileName as String , sFilter as String, optional bSelection as boolean ) as Boolean
diff --git a/testautomation/writer/optional/includes/loadsave/w_loadsave.inc b/testautomation/writer/optional/includes/loadsave/w_loadsave.inc
index 7454f733665d..e4871e78f400 100644
--- a/testautomation/writer/optional/includes/loadsave/w_loadsave.inc
+++ b/testautomation/writer/optional/includes/loadsave/w_loadsave.inc
@@ -52,6 +52,7 @@ testcase tExportAllReadableFormatsIntoODF
Dim SavedCorrectly as Boolean
Dim sExportFilter as string
Dim sExportFile as string
+ Dim sExceptionFile as string
Dim i as Integer
WorkDirectory = ( ConvertPath ( gOfficePath + "user\work\" + gPlatgroup + "\export\"))
@@ -77,8 +78,12 @@ testcase tExportAllReadableFormatsIntoODF
For i = 1 to listCount(ImportFileList())
printlog "- " & i & ". load: " & ImportFileList(i)
sExportFile = ImportFileList(i)
+ sExceptionFile = DateiExtract ( sExportFile )
+ printlog sExceptionFile
if GetExtention ( sExportFile ) = "psw" then
- QAErrorlog "#i102221#Pocket Word filter puts General I/O Error"
+ QAErrorlog "#i102221#Pocket Word filter puts General I/O Error"
+ elseif LCase( sExceptionFile ) = "swdos.txt" then
+ QAErrorlog "#i114062#General I/O error loading StarWriter DOS file"
else
Call hFileOpen ( ImportFileList(i) )
printlog "- done"
diff --git a/toolkit/inc/toolkit/awt/vclxwindows.hxx b/toolkit/inc/toolkit/awt/vclxwindows.hxx
index 80e3a37279d3..fb110cb74391 100644
--- a/toolkit/inc/toolkit/awt/vclxwindows.hxx
+++ b/toolkit/inc/toolkit/awt/vclxwindows.hxx
@@ -747,8 +747,10 @@ public:
// ----------------------------------------------------
// class VCLXComboBox
// ----------------------------------------------------
-class VCLXComboBox : public ::com::sun::star::awt::XComboBox,
- public VCLXEdit
+typedef ::cppu::ImplInheritanceHelper2 < VCLXEdit
+ , ::com::sun::star::awt::XComboBox
+ , ::com::sun::star::awt::XItemListListener > VCLXComboBox_Base;
+class VCLXComboBox : public VCLXComboBox_Base
{
private:
ActionListenerMultiplexer maActionListeners;
@@ -763,15 +765,6 @@ public:
VCLXComboBox();
~VCLXComboBox();
- // ::com::sun::star::uno::XInterface
- ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
- void SAL_CALL release() throw() { OWeakObject::release(); }
-
- // ::com::sun::star::lang::XTypeProvider
- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
- ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
-
// ::com::sun::star::lang::XComponent
void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
@@ -802,6 +795,15 @@ public:
void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException);
+ // XItemListListener
+ virtual void SAL_CALL listItemInserted( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL listItemRemoved( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL listItemModified( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL allItemsRemoved( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL itemListChanged( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_rEvent ) throw (::com::sun::star::uno::RuntimeException);
+
static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds );
virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); }
};
diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx
index 6223e47a6871..01ff047ee3de 100644
--- a/toolkit/inc/toolkit/controls/unocontrols.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrols.hxx
@@ -727,6 +727,8 @@ typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel
> UnoControlListBoxModel_Base;
class TOOLKIT_DLLPUBLIC UnoControlListBoxModel :public UnoControlListBoxModel_Base
{
+protected:
+ UnoControlListBoxModel(bool asComboBox);
public:
UnoControlListBoxModel();
UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource );
@@ -748,7 +750,9 @@ public:
::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoControlListBoxModel, UnoControlModel, szServiceName2_UnoControlListBoxModel )
+ //DECLIMPL_SERVICEINFO_DERIVED( UnoControlListBoxModel, UnoControlModel, szServiceName2_UnoControlListBoxModel )
+ ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::awt::XItemList
virtual ::sal_Int32 SAL_CALL getItemCount() throw (::com::sun::star::uno::RuntimeException);
@@ -806,7 +810,7 @@ private:
void impl_getStringItemList( ::std::vector< ::rtl::OUString >& o_rStringItems ) const;
void impl_setStringItemList_nolck( const ::std::vector< ::rtl::OUString >& i_rStringItems );
-private:
+protected:
::boost::scoped_ptr< UnoControlListBoxModel_Data > m_pData;
::cppu::OInterfaceContainerHelper m_aItemListListeners;
};
@@ -878,7 +882,9 @@ public:
virtual void SAL_CALL itemListChanged( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoListBoxControl, UnoControlBase, szServiceName2_UnoControlListBox )
+ // DECLIMPL_SERVICEINFO_DERIVED( UnoListBoxControl, UnoControlBase, szServiceName2_UnoControlListBox )
+ ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
protected:
void ImplUpdateSelectedItemsProperty();
@@ -895,7 +901,7 @@ private:
// ----------------------------------------------------
// class UnoControlComboBoxModel
// ----------------------------------------------------
-class UnoControlComboBoxModel : public UnoControlModel
+class UnoControlComboBoxModel : public UnoControlListBoxModel
{
protected:
::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
@@ -903,7 +909,7 @@ protected:
public:
UnoControlComboBoxModel();
- UnoControlComboBoxModel( const UnoControlComboBoxModel& rModel ) : UnoControlModel( rModel ) {;}
+ UnoControlComboBoxModel( const UnoControlComboBoxModel& rModel ) : UnoControlListBoxModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlComboBoxModel( *this ); }
@@ -912,17 +918,23 @@ public:
// ::com::sun::star::beans::XMultiPropertySet
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ // OPropertySetHelper
+ void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoControlComboBoxModel, UnoControlModel, szServiceName2_UnoControlComboBoxModel )
+ ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+ // DECLIMPL_SERVICEINFO_DERIVED( UnoControlComboBoxModel, UnoControlModel, szServiceName2_UnoControlComboBoxModel )
};
// ----------------------------------------------------
// class UnoComboBoxControl
// ----------------------------------------------------
-class UnoComboBoxControl : public UnoEditControl,
- public ::com::sun::star::awt::XComboBox
+class UnoComboBoxControl : public UnoEditControl
+ , public ::com::sun::star::awt::XComboBox
+ , public ::com::sun::star::awt::XItemListener
+ , public ::com::sun::star::awt::XItemListListener
{
private:
ActionListenerMultiplexer maActionListeners;
@@ -933,12 +945,15 @@ public:
UnoComboBoxControl();
::rtl::OUString GetComponentServiceName();
+ void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoEditControl::disposing( Source ); }
+ void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoEditControl::queryInterface(rType); }
::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
void SAL_CALL acquire() throw() { OWeakAggObject::acquire(); }
void SAL_CALL release() throw() { OWeakAggObject::release(); }
- void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
// ::com::sun::star::lang::XTypeProvider
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
@@ -958,8 +973,28 @@ public:
sal_Int16 SAL_CALL getDropDownLineCount( ) throw(::com::sun::star::uno::RuntimeException);
void SAL_CALL setDropDownLineCount( sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException);
+ // XUnoControl
+ virtual sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model) throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XItemListListener
+ virtual void SAL_CALL listItemInserted( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL listItemRemoved( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL listItemModified( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL allItemsRemoved( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL itemListChanged( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XItemListener
+ virtual void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
+
// ::com::sun::star::lang::XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoComboBoxControl, UnoEditControl, szServiceName2_UnoControlComboBox )
+ ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+ //DECLIMPL_SERVICEINFO_DERIVED( UnoComboBoxControl, UnoEditControl, szServiceName2_UnoControlComboBox )
+protected:
+ virtual void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal );
+ virtual void updateFromModel();
+ ActionListenerMultiplexer& getActionListeners();
+ ItemListenerMultiplexer& getItemListeners();
};
diff --git a/toolkit/inc/toolkit/helper/solarrelease.hxx b/toolkit/inc/toolkit/helper/solarrelease.hxx
index d8938b41c220..e45a1b6ee2c3 100644
--- a/toolkit/inc/toolkit/helper/solarrelease.hxx
+++ b/toolkit/inc/toolkit/helper/solarrelease.hxx
@@ -41,15 +41,36 @@ namespace toolkit
class ReleaseSolarMutex
{
sal_uInt32 mnLockCount;
+ const bool mbRescheduleDuringAcquire;
+
public:
- ReleaseSolarMutex()
+ enum
{
- mnLockCount = Application::ReleaseSolarMutex();
+ RescheduleDuringAcquire = true
+ };
+
+ public:
+ ReleaseSolarMutex( const bool i_rescheduleDuringAcquire = false )
+ :mnLockCount( Application::ReleaseSolarMutex() )
+ ,mbRescheduleDuringAcquire( i_rescheduleDuringAcquire )
+ {
+
}
~ReleaseSolarMutex()
{
- Application::AcquireSolarMutex( mnLockCount );
+ if ( mnLockCount > 0 )
+ {
+ if ( mbRescheduleDuringAcquire )
+ {
+ while ( !Application::GetSolarMutex().tryToAcquire() )
+ {
+ Application::Reschedule();
+ }
+ --mnLockCount;
+ }
+ Application::AcquireSolarMutex( mnLockCount );
+ }
}
};
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index efc2c40c6baa..1022d78a43ed 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -92,6 +92,7 @@ using ::com::sun::star::style::VerticalAlignment_MAKE_FIXED_SIZE;
namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior;
+using ::toolkit::ReleaseSolarMutex;
//====================================================================
//= misc helpers
@@ -339,7 +340,7 @@ IMPL_LINK( VCLXWindowImpl, OnProcessCallbacks, void*, EMPTYARG )
}
{
- ::toolkit::ReleaseSolarMutex aReleaseSolar;
+ ReleaseSolarMutex aReleaseSolar( ReleaseSolarMutex::RescheduleDuringAcquire );
for ( CallbackArray::const_iterator loop = aCallbacksCopy.begin();
loop != aCallbacksCopy.end();
++loop
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 4a68b4c80e3f..db34c840f8eb 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -2363,15 +2363,23 @@ sal_Int16 VCLXDialog::execute() throw(::com::sun::star::uno::RuntimeException)
Dialog* pDlg = (Dialog*) GetWindow();
Window* pParent = pDlg->GetWindow( WINDOW_PARENTOVERLAP );
Window* pOldParent = NULL;
+ Window* pSetParent = NULL;
if ( pParent && !pParent->IsReallyVisible() )
{
pOldParent = pDlg->GetParent();
Window* pFrame = pDlg->GetWindow( WINDOW_FRAME );
if( pFrame != pDlg )
+ {
pDlg->SetParent( pFrame );
+ pSetParent = pFrame;
+ }
}
+
nRet = pDlg->Execute();
- if ( pOldParent )
+
+ // set the parent back only in case no new parent was set from outside
+ // in other words, revert only own changes
+ if ( pOldParent && pDlg->GetParent() == pSetParent )
pDlg->SetParent( pOldParent );
}
return nRet;
@@ -3896,20 +3904,6 @@ VCLXComboBox::~VCLXComboBox()
#endif
}
-// ::com::sun::star::uno::XInterface
-::com::sun::star::uno::Any VCLXComboBox::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
-{
- ::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType,
- SAL_STATIC_CAST( ::com::sun::star::awt::XComboBox*, this ) );
- return (aRet.hasValue() ? aRet : VCLXEdit::queryInterface( rType ));
-}
-
-// ::com::sun::star::lang::XTypeProvider
-IMPL_XTYPEPROVIDER_START( VCLXComboBox )
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XComboBox>* ) NULL ),
- VCLXEdit::getTypes()
-IMPL_XTYPEPROVIDER_END
-
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > VCLXComboBox::CreateAccessibleContext()
{
::vos::OGuard aGuard( GetMutex() );
@@ -3973,8 +3967,12 @@ void VCLXComboBox::addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUStr
for ( sal_uInt16 n = 0; n < aItems.getLength(); n++ )
{
pBox->InsertEntry( aItems.getConstArray()[n], nP );
- if ( (sal_uInt16)nPos < 0xFFFF ) // Nicht wenn 0xFFFF, weil LIST_APPEND
- nP++;
+ if ( nP == 0xFFFF )
+ {
+ OSL_ENSURE( false, "VCLXComboBox::addItems: too many entries!" );
+ // skip remaining entries, list cannot hold them, anyway
+ break;
+ }
}
}
}
@@ -4078,14 +4076,8 @@ void VCLXComboBox::setProperty( const ::rtl::OUString& PropertyName, const ::com
::com::sun::star::uno::Sequence< ::rtl::OUString> aItems;
if ( Value >>= aItems )
{
- sal_Bool bUpdate = pComboBox->IsUpdateMode();
- pComboBox->SetUpdateMode( sal_False );
pComboBox->Clear();
- const ::rtl::OUString* pStrings = aItems.getConstArray();
- sal_Int32 nItems = aItems.getLength();
- for ( sal_Int32 n = 0; n < nItems; n++ )
- pComboBox->InsertEntry( pStrings[n], LISTBOX_APPEND );
- pComboBox->SetUpdateMode( bUpdate );
+ addItems( aItems, 0 );
}
}
break;
@@ -4255,6 +4247,104 @@ void VCLXComboBox::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) thr
nLines = nL;
}
}
+void SAL_CALL VCLXComboBox::listItemInserted( const ItemListEvent& i_rEvent ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ ComboBox* pComboBox = dynamic_cast< ComboBox* >( GetWindow() );
+
+ ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemInserted: no ComboBox?!" );
+ ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition <= sal_Int32( pComboBox->GetEntryCount() ) ),
+ "VCLXComboBox::listItemInserted: illegal (inconsistent) item position!" );
+ pComboBox->InsertEntry(
+ i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : ::rtl::OUString(),
+ i_rEvent.ItemImageURL.IsPresent ? lcl_getImageFromURL( i_rEvent.ItemImageURL.Value ) : Image(),
+ i_rEvent.ItemPosition );
+}
+
+void SAL_CALL VCLXComboBox::listItemRemoved( const ItemListEvent& i_rEvent ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ ComboBox* pComboBox = dynamic_cast< ComboBox* >( GetWindow() );
+
+ ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemRemoved: no ComboBox?!" );
+ ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < sal_Int32( pComboBox->GetEntryCount() ) ),
+ "VCLXComboBox::listItemRemoved: illegal (inconsistent) item position!" );
+
+ pComboBox->RemoveEntry( i_rEvent.ItemPosition );
+}
+
+void SAL_CALL VCLXComboBox::listItemModified( const ItemListEvent& i_rEvent ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ ComboBox* pComboBox = dynamic_cast< ComboBox* >( GetWindow() );
+
+ ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemModified: no ComboBox?!" );
+ ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < sal_Int32( pComboBox->GetEntryCount() ) ),
+ "VCLXComboBox::listItemModified: illegal (inconsistent) item position!" );
+
+ // VCL's ComboBox does not support changing an entry's text or image, so remove and re-insert
+
+ const ::rtl::OUString sNewText = i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : ::rtl::OUString( pComboBox->GetEntry( i_rEvent.ItemPosition ) );
+ const Image aNewImage( i_rEvent.ItemImageURL.IsPresent ? lcl_getImageFromURL( i_rEvent.ItemImageURL.Value ) : pComboBox->GetEntryImage( i_rEvent.ItemPosition ) );
+
+ pComboBox->RemoveEntry( i_rEvent.ItemPosition );
+ pComboBox->InsertEntry( sNewText, aNewImage, i_rEvent.ItemPosition );
+}
+
+void SAL_CALL VCLXComboBox::allItemsRemoved( const EventObject& i_rEvent ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ ComboBox* pComboBox = dynamic_cast< ComboBox* >( GetWindow() );
+ ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemModified: no ComboBox?!" );
+
+ pComboBox->Clear();
+
+ (void)i_rEvent;
+}
+
+void SAL_CALL VCLXComboBox::itemListChanged( const EventObject& i_rEvent ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ ComboBox* pComboBox = dynamic_cast< ComboBox* >( GetWindow() );
+ ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemModified: no ComboBox?!" );
+
+ pComboBox->Clear();
+
+ uno::Reference< beans::XPropertySet > xPropSet( i_rEvent.Source, uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySetInfo > xPSI( xPropSet->getPropertySetInfo(), uno::UNO_QUERY_THROW );
+ // bool localize = xPSI->hasPropertyByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ) ) );
+ uno::Reference< resource::XStringResourceResolver > xStringResourceResolver;
+ if ( xPSI->hasPropertyByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ) ) ) )
+ {
+ xStringResourceResolver.set(
+ xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ) ) ),
+ uno::UNO_QUERY
+ );
+ }
+
+
+ Reference< XItemList > xItemList( i_rEvent.Source, uno::UNO_QUERY_THROW );
+ uno::Sequence< beans::Pair< ::rtl::OUString, ::rtl::OUString > > aItems = xItemList->getAllItems();
+ for ( sal_Int32 i=0; i<aItems.getLength(); ++i )
+ {
+ ::rtl::OUString aLocalizationKey( aItems[i].First );
+ if ( xStringResourceResolver.is() && aLocalizationKey.getLength() != 0 && aLocalizationKey[0] == '&' )
+ {
+ aLocalizationKey = xStringResourceResolver->resolveString(aLocalizationKey.copy( 1 ));
+ }
+ pComboBox->InsertEntry( aLocalizationKey, lcl_getImageFromURL( aItems[i].Second ) );
+ }
+}
+void SAL_CALL VCLXComboBox::disposing( const EventObject& i_rEvent ) throw (RuntimeException)
+{
+ // just disambiguate
+ VCLXEdit::disposing( i_rEvent );
+}
// ----------------------------------------------------
// class VCLXFormattedSpinField
diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx
index 8606792fdf2f..d56ca82bb845 100644
--- a/toolkit/source/controls/tree/treecontrol.cxx
+++ b/toolkit/source/controls/tree/treecontrol.cxx
@@ -76,6 +76,7 @@ UnoTreeModel::UnoTreeModel()
ImplRegisterProperty( BASEPROPERTY_TREE_SHOWSROOTHANDLES );
ImplRegisterProperty( BASEPROPERTY_TREE_ROWHEIGHT );
ImplRegisterProperty( BASEPROPERTY_TREE_INVOKESSTOPNODEEDITING );
+ ImplRegisterProperty( BASEPROPERTY_HIDEINACTIVESELECTION );
}
UnoTreeModel::UnoTreeModel( const UnoTreeModel& rModel )
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 6599b039600f..d0961188d06c 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -80,6 +80,18 @@ using ::com::sun::star::graphic::XGraphic;
using ::com::sun::star::uno::Reference;
using namespace ::toolkit;
+#define IMPL_SERVICEINFO_DERIVED( ImplName, BaseClass, ServiceName ) \
+ ::rtl::OUString SAL_CALL ImplName::getImplementationName( ) throw(::com::sun::star::uno::RuntimeException) { return ::rtl::OUString::createFromAscii( "stardiv.Toolkit." #ImplName ); } \
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL ImplName::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) \
+ { \
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames = BaseClass::getSupportedServiceNames( ); \
+ aNames.realloc( aNames.getLength() + 1 ); \
+ aNames[ aNames.getLength() - 1 ] = ::rtl::OUString::createFromAscii( ServiceName ); \
+ return aNames; \
+ } \
+
+
+
// ----------------------------------------------------
// class UnoControlEditModel
// ----------------------------------------------------
@@ -1826,6 +1838,13 @@ UnoControlListBoxModel::UnoControlListBoxModel()
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXListBox );
}
+// ---------------------------------------------------------------------------------------------------------------------
+UnoControlListBoxModel::UnoControlListBoxModel(bool)
+ :UnoControlListBoxModel_Base()
+ ,m_pData( new UnoControlListBoxModel_Data( *this ) )
+ ,m_aItemListListeners( GetMutex() )
+{
+}
// ---------------------------------------------------------------------------------------------------------------------
UnoControlListBoxModel::UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource )
@@ -1837,12 +1856,12 @@ UnoControlListBoxModel::UnoControlListBoxModel( const UnoControlListBoxModel& i_
UnoControlListBoxModel::~UnoControlListBoxModel()
{
}
+IMPL_SERVICEINFO_DERIVED( UnoControlListBoxModel, UnoControlModel, szServiceName2_UnoControlListBoxModel )
// ---------------------------------------------------------------------------------------------------------------------
::rtl::OUString UnoControlListBoxModel::getServiceName() throw(::com::sun::star::uno::RuntimeException)
{
return ::rtl::OUString::createFromAscii( szServiceName_UnoControlListBoxModel );
}
-
// ---------------------------------------------------------------------------------------------------------------------
uno::Any UnoControlListBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
{
@@ -2270,6 +2289,7 @@ UnoListBoxControl::UnoListBoxControl()
{
return ::rtl::OUString::createFromAscii( "listbox" );
}
+IMPL_SERVICEINFO_DERIVED( UnoListBoxControl, UnoControlBase, szServiceName2_UnoControlListBox )
void UnoListBoxControl::dispose() throw(uno::RuntimeException)
{
@@ -2687,28 +2707,19 @@ ItemListenerMultiplexer& UnoListBoxControl::getItemListeners()
// ----------------------------------------------------
// class UnoControlComboBoxModel
// ----------------------------------------------------
-UnoControlComboBoxModel::UnoControlComboBoxModel()
+UnoControlComboBoxModel::UnoControlComboBoxModel() : UnoControlListBoxModel(true)
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXComboBox );
}
-::rtl::OUString UnoControlComboBoxModel::getServiceName() throw(::com::sun::star::uno::RuntimeException)
-{
- return ::rtl::OUString::createFromAscii( szServiceName_UnoControlComboBoxModel );
-}
+IMPL_SERVICEINFO_DERIVED( UnoControlComboBoxModel, UnoControlModel, szServiceName2_UnoControlComboBoxModel )
-uno::Any UnoControlComboBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
+uno::Reference< beans::XPropertySetInfo > UnoControlComboBoxModel::getPropertySetInfo( ) throw(uno::RuntimeException)
{
- if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
- {
- uno::Any aAny;
- aAny <<= ::rtl::OUString::createFromAscii( szServiceName_UnoControlComboBox );
- return aAny;
- }
- return UnoControlModel::ImplGetDefaultValue( nPropId );
+ static uno::Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
+ return xInfo;
}
-
-
+// ---------------------------------------------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& UnoControlComboBoxModel::getInfoHelper()
{
static UnoPropertyArrayHelper* pHelper = NULL;
@@ -2720,14 +2731,53 @@ uno::Any UnoControlComboBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) cons
return *pHelper;
}
-// beans::XMultiPropertySet
-uno::Reference< beans::XPropertySetInfo > UnoControlComboBoxModel::getPropertySetInfo( ) throw(uno::RuntimeException)
+
+::rtl::OUString UnoControlComboBoxModel::getServiceName() throw(::com::sun::star::uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
- return xInfo;
+ return ::rtl::OUString::createFromAscii( szServiceName_UnoControlComboBoxModel );
}
+void SAL_CALL UnoControlComboBoxModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const uno::Any& rValue ) throw (uno::Exception)
+{
+ UnoControlModel::setFastPropertyValue_NoBroadcast( nHandle, rValue );
+ if ( nHandle == BASEPROPERTY_STRINGITEMLIST && !m_pData->m_bSettingLegacyProperty)
+ {
+ // synchronize the legacy StringItemList property with our list items
+ Sequence< ::rtl::OUString > aStringItemList;
+ Any aPropValue;
+ getFastPropertyValue( aPropValue, BASEPROPERTY_STRINGITEMLIST );
+ OSL_VERIFY( aPropValue >>= aStringItemList );
+
+ ::std::vector< ListItem > aItems( aStringItemList.getLength() );
+ ::std::transform(
+ aStringItemList.getConstArray(),
+ aStringItemList.getConstArray() + aStringItemList.getLength(),
+ aItems.begin(),
+ CreateListItem()
+ );
+ m_pData->setAllItems( aItems );
+
+ // since an XItemListListener does not have a "all items modified" or some such method,
+ // we simulate this by notifying removal of all items, followed by insertion of all new
+ // items
+ lang::EventObject aEvent;
+ aEvent.Source = *this;
+ m_aItemListListeners.notifyEach( &XItemListListener::itemListChanged, aEvent );
+ // TODO: OPropertySetHelper calls into this method with the mutex locked ...
+ // which is wrong for the above notifications ...
+ }
+}
+uno::Any UnoControlComboBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
+{
+ if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
+ {
+ uno::Any aAny;
+ aAny <<= ::rtl::OUString::createFromAscii( szServiceName_UnoControlComboBox );
+ return aAny;
+ }
+ return UnoControlModel::ImplGetDefaultValue( nPropId );
+}
// ----------------------------------------------------
// class UnoComboBoxControl
@@ -2739,35 +2789,65 @@ UnoComboBoxControl::UnoComboBoxControl()
maComponentInfos.nWidth = 100;
maComponentInfos.nHeight = 12;
}
+IMPL_SERVICEINFO_DERIVED( UnoComboBoxControl, UnoEditControl, szServiceName2_UnoControlComboBox )
::rtl::OUString UnoComboBoxControl::GetComponentServiceName()
{
return ::rtl::OUString::createFromAscii( "combobox" );
}
-// uno::XInterface
+void UnoComboBoxControl::dispose() throw(uno::RuntimeException)
+{
+ lang::EventObject aEvt;
+ aEvt.Source = (::cppu::OWeakObject*)this;
+ maActionListeners.disposeAndClear( aEvt );
+ maItemListeners.disposeAndClear( aEvt );
+ UnoControl::dispose();
+}
uno::Any UnoComboBoxControl::queryAggregation( const uno::Type & rType ) throw(uno::RuntimeException)
{
uno::Any aRet = ::cppu::queryInterface( rType,
SAL_STATIC_CAST( awt::XComboBox*, this ) );
+ if ( !aRet.hasValue() )
+ {
+ aRet = ::cppu::queryInterface( rType,
+ SAL_STATIC_CAST( awt::XItemListener*, this ) );
+ if ( !aRet.hasValue() )
+ {
+ aRet = ::cppu::queryInterface( rType,
+ SAL_STATIC_CAST( awt::XItemListListener*, this ) );
+ }
+ }
return (aRet.hasValue() ? aRet : UnoEditControl::queryAggregation( rType ));
}
-
// lang::XTypeProvider
IMPL_XTYPEPROVIDER_START( UnoComboBoxControl )
getCppuType( ( uno::Reference< awt::XComboBox>* ) NULL ),
+ getCppuType( ( uno::Reference< awt::XItemListener>* ) NULL ),
+ getCppuType( ( uno::Reference< awt::XItemListListener>* ) NULL ),
UnoEditControl::getTypes()
IMPL_XTYPEPROVIDER_END
-void UnoComboBoxControl::dispose() throw(uno::RuntimeException)
+void UnoComboBoxControl::updateFromModel()
{
- lang::EventObject aEvt;
- aEvt.Source = (::cppu::OWeakObject*)this;
- maActionListeners.disposeAndClear( aEvt );
- maItemListeners.disposeAndClear( aEvt );
- UnoControl::dispose();
+ UnoEditControl::updateFromModel();
+
+ Reference< XItemListListener > xItemListListener( getPeer(), UNO_QUERY );
+ ENSURE_OR_RETURN_VOID( xItemListListener.is(), "UnoComboBoxControl::updateFromModel: a peer which is no ItemListListener?!" );
+
+ EventObject aEvent( getModel() );
+ xItemListListener->itemListChanged( aEvent );
}
+void UnoComboBoxControl::ImplSetPeerProperty( const ::rtl::OUString& rPropName, const uno::Any& rVal )
+{
+ if ( rPropName == GetPropertyName( BASEPROPERTY_STRINGITEMLIST ) )
+ // do not forward this to our peer. We are a XItemListListener at our model, and changes in the string item
+ // list (which is a legacy property) will, later, arrive as changes in the ItemList. Those latter changes
+ // will be forwarded to the peer, which will update itself accordingly.
+ return;
+ UnoEditControl::ImplSetPeerProperty( rPropName, rVal );
+}
void UnoComboBoxControl::createPeer( const uno::Reference< awt::XToolkit > & rxToolkit, const uno::Reference< awt::XWindowPeer > & rParentPeer ) throw(uno::RuntimeException)
{
UnoEditControl::createPeer( rxToolkit, rParentPeer );
@@ -2818,6 +2898,93 @@ void UnoComboBoxControl::removeItemListener(const uno::Reference < awt::XItemLis
}
maItemListeners.removeInterface( l );
}
+void UnoComboBoxControl::itemStateChanged( const awt::ItemEvent& rEvent ) throw(uno::RuntimeException)
+{
+ if ( maItemListeners.getLength() )
+ {
+ try
+ {
+ maItemListeners.itemStateChanged( rEvent );
+ }
+ catch( const Exception& e )
+ {
+#if OSL_DEBUG_LEVEL == 0
+ (void) e; // suppress warning
+#else
+ ::rtl::OString sMessage( "UnoComboBoxControl::itemStateChanged: caught an exception:\n" );
+ sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US );
+ OSL_ENSURE( sal_False, sMessage.getStr() );
+#endif
+ }
+ }
+}
+sal_Bool SAL_CALL UnoComboBoxControl::setModel( const uno::Reference< awt::XControlModel >& i_rModel ) throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( GetMutex() );
+
+ const Reference< XItemList > xOldItems( getModel(), UNO_QUERY );
+ OSL_ENSURE( xOldItems.is() || !getModel().is(), "UnoComboBoxControl::setModel: illegal old model!" );
+ const Reference< XItemList > xNewItems( i_rModel, UNO_QUERY );
+ OSL_ENSURE( xNewItems.is() || !i_rModel.is(), "UnoComboBoxControl::setModel: illegal new model!" );
+
+ if ( !UnoEditControl::setModel( i_rModel ) )
+ return sal_False;
+
+ if ( xOldItems.is() )
+ xOldItems->removeItemListListener( this );
+ if ( xNewItems.is() )
+ xNewItems->addItemListListener( this );
+
+ return sal_True;
+}
+
+void SAL_CALL UnoComboBoxControl::listItemInserted( const awt::ItemListEvent& i_rEvent ) throw (uno::RuntimeException)
+{
+ const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY );
+ OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoComboBoxControl::listItemInserted: invalid peer!" );
+ if ( xPeerListener.is() )
+ xPeerListener->listItemInserted( i_rEvent );
+}
+
+void SAL_CALL UnoComboBoxControl::listItemRemoved( const awt::ItemListEvent& i_rEvent ) throw (uno::RuntimeException)
+{
+ const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY );
+ OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoComboBoxControl::listItemRemoved: invalid peer!" );
+ if ( xPeerListener.is() )
+ xPeerListener->listItemRemoved( i_rEvent );
+}
+
+void SAL_CALL UnoComboBoxControl::listItemModified( const awt::ItemListEvent& i_rEvent ) throw (uno::RuntimeException)
+{
+ const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY );
+ OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoComboBoxControl::listItemModified: invalid peer!" );
+ if ( xPeerListener.is() )
+ xPeerListener->listItemModified( i_rEvent );
+}
+
+void SAL_CALL UnoComboBoxControl::allItemsRemoved( const lang::EventObject& i_rEvent ) throw (uno::RuntimeException)
+{
+ const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY );
+ OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoComboBoxControl::allItemsRemoved: invalid peer!" );
+ if ( xPeerListener.is() )
+ xPeerListener->allItemsRemoved( i_rEvent );
+}
+
+void SAL_CALL UnoComboBoxControl::itemListChanged( const lang::EventObject& i_rEvent ) throw (uno::RuntimeException)
+{
+ const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY );
+ OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoComboBoxControl::itemListChanged: invalid peer!" );
+ if ( xPeerListener.is() )
+ xPeerListener->itemListChanged( i_rEvent );
+}
+ActionListenerMultiplexer& UnoComboBoxControl::getActionListeners()
+{
+ return maActionListeners;
+}
+ItemListenerMultiplexer& UnoComboBoxControl::getItemListeners()
+{
+ return maItemListeners;
+}
void UnoComboBoxControl::addItem( const ::rtl::OUString& aItem, sal_Int16 nPos ) throw(uno::RuntimeException)
{
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx
index d7cec7c17354..c36ae29d4531 100644
--- a/toolkit/source/helper/unowrapper.cxx
+++ b/toolkit/source/helper/unowrapper.cxx
@@ -318,12 +318,17 @@ void UnoWrapper::WindowDestroyed( Window* pWindow )
Window* pTopWindowChild = pWindow->GetWindow( WINDOW_FIRSTTOPWINDOWCHILD );
while ( pTopWindowChild )
{
- OSL_ENSURE( pTopWindowChild->GetParent() == pWindow, "UnoWrapper::WindowDestroyed: inconsistency in the SystemWindow relationship!" );
+ OSL_ENSURE( pTopWindowChild->GetParent() == pWindow,
+ "UnoWrapper::WindowDestroyed: inconsistency in the SystemWindow relationship!" );
- uno::Reference< lang::XComponent > xComp( pTopWindowChild->GetComponentInterface( FALSE ), uno::UNO_QUERY );
- pTopWindowChild = pTopWindowChild->GetWindow( WINDOW_NEXTTOPWINDOWSIBLING );
- if ( xComp.is() )
- xComp->dispose();
+ Window* pNextTopChild = pTopWindowChild->GetWindow( WINDOW_NEXTTOPWINDOWSIBLING );
+
+ //the window still could be on the stack, so we have to
+ // use lazy delete ( it will automatically
+ // disconnect from the currently destroyed parent window )
+ pTopWindowChild->doLazyDelete();
+
+ pTopWindowChild = pNextTopChild;
}
}
}
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 2290cfdbe7c2..e9f98b07adbd 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -243,6 +243,11 @@ void ImplPolygon::ImplSetSize( USHORT nNewSize, BOOL bResize )
void ImplPolygon::ImplSplit( USHORT nPos, USHORT nSpace, ImplPolygon* pInitPoly )
{
const ULONG nSpaceSize = nSpace * sizeof( Point );
+
+ //Can't fit this in :-(, throw ?
+ if (mnPoints + nSpace > USHRT_MAX)
+ return;
+
const USHORT nNewSize = mnPoints + nSpace;
if( nPos >= mnPoints )
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index c13ec9d367c8..30f7e32f3828 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -43,6 +43,7 @@
#include <com/sun/star/ucb/XParameterizedContentProvider.hpp>
#include <com/sun/star/ucb/XContentProviderFactory.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
@@ -182,6 +183,63 @@ void makeAndAppendXMLName(
}
}
+bool createContentProviderData(
+ const rtl::OUString & rProvider,
+ const uno::Reference< container::XHierarchicalNameAccess >& rxHierNameAccess,
+ ContentProviderData & rInfo)
+{
+ // Obtain service name.
+ rtl::OUStringBuffer aKeyBuffer (rProvider);
+ aKeyBuffer.appendAscii( "/ServiceName" );
+
+ rtl::OUString aValue;
+ try
+ {
+ if ( !( rxHierNameAccess->getByHierarchicalName(
+ aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
+ {
+ OSL_ENSURE( false,
+ "UniversalContentBroker::getContentProviderData - "
+ "Error getting item value!" );
+ }
+ }
+ catch (container::NoSuchElementException &)
+ {
+ return false;
+ }
+
+ rInfo.ServiceName = aValue;
+
+ // Obtain URL Template.
+ aKeyBuffer.append(rProvider);
+ aKeyBuffer.appendAscii( "/URLTemplate" );
+
+ if ( !( rxHierNameAccess->getByHierarchicalName(
+ aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
+ {
+ OSL_ENSURE( false,
+ "UniversalContentBroker::getContentProviderData - "
+ "Error getting item value!" );
+ }
+
+ rInfo.URLTemplate = aValue;
+
+ // Obtain Arguments.
+ aKeyBuffer.append(rProvider);
+ aKeyBuffer.appendAscii( "/Arguments" );
+
+ if ( !( rxHierNameAccess->getByHierarchicalName(
+ aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
+ {
+ OSL_ENSURE( false,
+ "UniversalContentBroker::getContentProviderData - "
+ "Error getting item value!" );
+ }
+
+ rInfo.Arguments = aValue;
+ return true;
+}
+
}
//=========================================================================
@@ -647,28 +705,10 @@ void SAL_CALL UniversalContentBroker::changesOccurred( const util::ChangesEvent&
sal_Int32 nCount = Event.Changes.getLength();
if ( nCount )
{
+ uno::Reference< container::XHierarchicalNameAccess > xHierNameAccess;
+ Event.Base >>= xHierNameAccess;
- uno::Reference< lang::XMultiServiceFactory > xConfigProv(
- m_xSMgr->createInstance(
- rtl::OUString::createFromAscii(
- "com.sun.star.configuration.ConfigurationProvider" ) ),
- uno::UNO_QUERY_THROW );
-
- uno::Sequence< uno::Any > aArguments( 1 );
- beans::PropertyValue aProperty;
- aProperty.Name
- = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) );
- aProperty.Value <<= Event.Base;
- aArguments[ 0 ] <<= aProperty;
-
- uno::Reference< uno::XInterface > xInterface(
- xConfigProv->createInstanceWithArguments(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.configuration.ConfigurationAccess" ) ),
- aArguments ) );
-
- uno::Reference< container::XHierarchicalNameAccess >
- xHierNameAccess( xInterface, uno::UNO_QUERY_THROW );
+ OSL_ASSERT( xHierNameAccess.is() );
const util::ElementChange* pElementChanges
= Event.Changes.getConstArray();
@@ -682,9 +722,18 @@ void SAL_CALL UniversalContentBroker::changesOccurred( const util::ChangesEvent&
ContentProviderData aInfo;
- createContentProviderData(aKey, xHierNameAccess, aInfo);
-
- aData.push_back(aInfo);
+ // Removal of UCPs from the configuration leads to changesOccurred
+ // notifications, too, but it is hard to tell for a given
+ // ElementChange whether it is an addition or a removal, so as a
+ // heuristic consider as removals those that cause a
+ // NoSuchElementException in createContentProviderData.
+ //
+ // For now, removal of UCPs from the configuration is simply ignored
+ // (and not reflected in the UCB's data structures):
+ if (createContentProviderData(aKey, xHierNameAccess, aInfo))
+ {
+ aData.push_back(aInfo);
+ }
}
prepareAndRegister(aData);
@@ -852,7 +901,10 @@ bool UniversalContentBroker::getContentProviderData(
makeAndAppendXMLName( aElemBuffer, pElems[ n ] );
aElemBuffer.appendAscii( "']" );
- createContentProviderData(aElemBuffer.makeStringAndClear(), xHierNameAccess, aInfo);
+ OSL_VERIFY(
+ createContentProviderData(
+ aElemBuffer.makeStringAndClear(), xHierNameAccess,
+ aInfo));
rListToFill.push_back( aInfo );
}
@@ -884,55 +936,6 @@ bool UniversalContentBroker::getContentProviderData(
return true;
}
-void UniversalContentBroker::createContentProviderData(
- const rtl::OUString & rProvider,
- const uno::Reference< container::XHierarchicalNameAccess >& rxHierNameAccess,
- ContentProviderData & rInfo)
-{
- // Obtain service name.
- rtl::OUStringBuffer aKeyBuffer (rProvider);
- aKeyBuffer.appendAscii( "/ServiceName" );
-
- rtl::OUString aValue;
- if ( !( rxHierNameAccess->getByHierarchicalName(
- aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
- {
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - "
- "Error getting item value!" );
- }
-
- rInfo.ServiceName = aValue;
-
- // Obtain URL Template.
- aKeyBuffer.append(rProvider);
- aKeyBuffer.appendAscii( "/URLTemplate" );
-
- if ( !( rxHierNameAccess->getByHierarchicalName(
- aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
- {
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - "
- "Error getting item value!" );
- }
-
- rInfo.URLTemplate = aValue;
-
- // Obtain Arguments.
- aKeyBuffer.append(rProvider);
- aKeyBuffer.appendAscii( "/Arguments" );
-
- if ( !( rxHierNameAccess->getByHierarchicalName(
- aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
- {
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - "
- "Error getting item value!" );
- }
-
- rInfo.Arguments = aValue;
-}
-
//=========================================================================
//
// ProviderListEntry_Impl implementation.
diff --git a/ucb/source/core/ucb.hxx b/ucb/source/core/ucb.hxx
index 0e44c5bc99b5..d2f6e4e4c41e 100644
--- a/ucb/source/core/ucb.hxx
+++ b/ucb/source/core/ucb.hxx
@@ -40,7 +40,6 @@
#include <com/sun/star/util/XChangesListener.hpp>
#include <com/sun/star/util/XChangesNotifier.hpp>
#include <com/sun/star/container/XContainer.hpp>
-#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <rtl/ustrbuf.hxx>
#include <cppuhelper/weak.hxx>
@@ -204,11 +203,6 @@ private:
void prepareAndRegister( const ucbhelper::ContentProviderDataList& rData);
- void createContentProviderData(
- const rtl::OUString& rProvider,
- const com::sun::star::uno::Reference< com::sun::star::container::XHierarchicalNameAccess >& rxHierNameAccess,
- ucbhelper::ContentProviderData& rInfo);
-
com::sun::star::uno::Reference<
com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
diff --git a/unotools/inc/unotools/ucbhelper.hxx b/unotools/inc/unotools/ucbhelper.hxx
index 687868adbdb4..38b355439c2b 100644
--- a/unotools/inc/unotools/ucbhelper.hxx
+++ b/unotools/inc/unotools/ucbhelper.hxx
@@ -80,6 +80,7 @@ namespace utl
static sal_Bool FindInPath( const String& rPath, const String& rName, String& rFile, char cDelim = ';', BOOL bAllowWildCards = TRUE );
static sal_Bool Find( const String& rFolder, const String& rName, String& rFile, BOOL bAllowWildCards = FALSE );
static sal_Bool IsSubPath( const ::rtl::OUString& rPath, const ::rtl::OUString& rChildCandidate, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentProvider >& xContentProvider = ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentProvider >() );
+ static sal_Bool EqualURLs( const ::rtl::OUString& aFirstURL, const ::rtl::OUString& aSecondURL );
};
}
diff --git a/unotools/source/config/menuoptions.cxx b/unotools/source/config/menuoptions.cxx
deleted file mode 100644
index 2c5756c2140c..000000000000
--- a/unotools/source/config/menuoptions.cxx
+++ /dev/null
@@ -1,561 +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_unotools.hxx"
-#ifndef GCC
-#endif
-
-//_________________________________________________________________________________________________________________
-// includes
-//_________________________________________________________________________________________________________________
-
-#include <unotools/menuoptions.hxx>
-#include <unotools/configmgr.hxx>
-#include <unotools/configitem.hxx>
-#include <tools/debug.hxx>
-#include <com/sun/star/uno/Any.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <vcl/svapp.hxx>
-
-#include <rtl/logfile.hxx>
-#include "itemholder1.hxx"
-
-//_________________________________________________________________________________________________________________
-// namespaces
-//_________________________________________________________________________________________________________________
-
-using namespace ::utl ;
-using namespace ::rtl ;
-using namespace ::osl ;
-using namespace ::com::sun::star::uno ;
-
-//_________________________________________________________________________________________________________________
-// const
-//_________________________________________________________________________________________________________________
-
-#define ROOTNODE_MENU OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/View/Menu" ))
-#define DEFAULT_DONTHIDEDISABLEDENTRIES sal_False
-#define DEFAULT_FOLLOWMOUSE sal_True
-#define DEFAULT_MENUICONS 2
-
-#define PROPERTYNAME_DONTHIDEDISABLEDENTRIES OUString(RTL_CONSTASCII_USTRINGPARAM("DontHideDisabledEntry" ))
-#define PROPERTYNAME_FOLLOWMOUSE OUString(RTL_CONSTASCII_USTRINGPARAM("FollowMouse" ))
-#define PROPERTYNAME_SHOWICONSINMENUES OUString(RTL_CONSTASCII_USTRINGPARAM("ShowIconsInMenues" ))
-#define PROPERTYNAME_SYSTEMICONSINMENUES OUString(RTL_CONSTASCII_USTRINGPARAM("IsSystemIconsInMenus" ))
-
-#define PROPERTYHANDLE_DONTHIDEDISABLEDENTRIES 0
-#define PROPERTYHANDLE_FOLLOWMOUSE 1
-#define PROPERTYHANDLE_SHOWICONSINMENUES 2
-#define PROPERTYHANDLE_SYSTEMICONSINMENUES 3
-
-#define PROPERTYCOUNT 4
-
-#include <tools/link.hxx>
-#include <tools/list.hxx>
-DECLARE_LIST( LinkList, Link * )
-
-//_________________________________________________________________________________________________________________
-// private declarations!
-//_________________________________________________________________________________________________________________
-
-class SvtMenuOptions_Impl : public ConfigItem
-{
- //-------------------------------------------------------------------------------------------------------------
- // private member
- //-------------------------------------------------------------------------------------------------------------
-
- private:
- LinkList aList;
- sal_Bool m_bDontHideDisabledEntries ; /// cache "DontHideDisabledEntries" of Menu section
- sal_Bool m_bFollowMouse ; /// cache "FollowMouse" of Menu section
- sal_Int16 m_nMenuIcons ; /// cache "MenuIcons" of Menu section
-
- //-------------------------------------------------------------------------------------------------------------
- // public methods
- //-------------------------------------------------------------------------------------------------------------
-
- public:
-
- //---------------------------------------------------------------------------------------------------------
- // constructor / destructor
- //---------------------------------------------------------------------------------------------------------
-
- SvtMenuOptions_Impl();
- ~SvtMenuOptions_Impl();
-
- void AddListener( const Link& rLink );
- void RemoveListener( const Link& rLink );
-
- //---------------------------------------------------------------------------------------------------------
- // overloaded methods of baseclass
- //---------------------------------------------------------------------------------------------------------
-
- /*-****************************************************************************************************//**
- @short called for notify of configmanager
- @descr These method is called from the ConfigManager before application ends or from the
- PropertyChangeListener if the sub tree broadcasts changes. You must update your
- internal values.
-
- @seealso baseclass ConfigItem
-
- @param "seqPropertyNames" is the list of properties which should be updated.
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
-
- virtual void Notify( const Sequence< OUString >& seqPropertyNames );
-
- /*-****************************************************************************************************//**
- @short write changes to configuration
- @descr These method writes the changed values into the sub tree
- and should always called in our destructor to guarantee consistency of config data.
-
- @seealso baseclass ConfigItem
-
- @param -
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
-
- virtual void Commit();
-
- //---------------------------------------------------------------------------------------------------------
- // public interface
- //---------------------------------------------------------------------------------------------------------
-
- /*-****************************************************************************************************//**
- @short access method to get internal values
- @descr These method give us a chance to regulate acces to ouer internal values.
- It's not used in the moment - but it's possible for the feature!
-
- @seealso -
-
- @param -
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
-
- sal_Bool IsEntryHidingEnabled() const
- { return m_bDontHideDisabledEntries; }
-
- sal_Bool IsFollowMouseEnabled() const
- { return m_bFollowMouse; }
-
- sal_Int16 GetMenuIconsState() const
- { return m_nMenuIcons; }
-
- void SetEntryHidingState ( sal_Bool bState )
- {
- m_bDontHideDisabledEntries = bState;
- SetModified();
- for ( USHORT n=0; n<aList.Count(); n++ )
- aList.GetObject(n)->Call( this );
- Commit();
- }
-
- void SetFollowMouseState ( sal_Bool bState )
- {
- m_bFollowMouse = bState;
- SetModified();
- for ( USHORT n=0; n<aList.Count(); n++ )
- aList.GetObject(n)->Call( this );
- Commit();
- }
-
- void SetMenuIconsState ( sal_Int16 bState )
- {
- m_nMenuIcons = bState;
- SetModified();
- for ( USHORT n=0; n<aList.Count(); n++ )
- aList.GetObject(n)->Call( this );
- Commit();
- }
-
- //-------------------------------------------------------------------------------------------------------------
- // private methods
- //-------------------------------------------------------------------------------------------------------------
-
- private:
-
- /*-****************************************************************************************************//**
- @short return list of fix key names of ouer configuration management which represent oue module tree
- @descr These methods return a static const list of key names. We need it to get needed values from our
- configuration management.
-
- @seealso -
-
- @param -
- @return A list of needed configuration keys is returned.
-
- @onerror -
- *//*-*****************************************************************************************************/
-
- static Sequence< OUString > impl_GetPropertyNames();
-};
-
-//_________________________________________________________________________________________________________________
-// definitions
-//_________________________________________________________________________________________________________________
-
-//*****************************************************************************************************************
-// constructor
-//*****************************************************************************************************************
-SvtMenuOptions_Impl::SvtMenuOptions_Impl()
- // Init baseclasses first
- : ConfigItem ( ROOTNODE_MENU )
- // Init member then.
- , m_bDontHideDisabledEntries ( DEFAULT_DONTHIDEDISABLEDENTRIES )
- , m_bFollowMouse ( DEFAULT_FOLLOWMOUSE )
- , m_nMenuIcons ( DEFAULT_MENUICONS )
-{
- // Use our static list of configuration keys to get his values.
- Sequence< OUString > seqNames = impl_GetPropertyNames();
- Sequence< Any > seqValues = GetProperties( seqNames ) ;
-
- // Safe impossible cases.
- // We need values from ALL configuration keys.
- // Follow assignment use order of values in relation to our list of key names!
- DBG_ASSERT( !(seqNames.getLength()!=seqValues.getLength()), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nI miss some values of configuration keys!\n" );
-
- sal_Bool bMenuIcons = true;
- sal_Bool bSystemMenuIcons = true;
-
- // Copy values from list in right order to ouer internal member.
- sal_Int32 nPropertyCount = seqValues.getLength() ;
- sal_Int32 nProperty = 0 ;
- for( nProperty=0; nProperty<nPropertyCount; ++nProperty )
- {
- // Safe impossible cases.
- // Check any for valid value.
- DBG_ASSERT( !(seqValues[nProperty].hasValue()==sal_False), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nInvalid property value for property detected!\n" );
- switch( nProperty )
- {
- case PROPERTYHANDLE_DONTHIDEDISABLEDENTRIES : {
- DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\DontHideDisabledEntry\"?" );
- seqValues[nProperty] >>= m_bDontHideDisabledEntries;
- }
- break;
-
- case PROPERTYHANDLE_FOLLOWMOUSE : {
- DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\FollowMouse\"?" );
- seqValues[nProperty] >>= m_bFollowMouse;
- }
- break;
- case PROPERTYHANDLE_SHOWICONSINMENUES : {
- DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\ShowIconsInMenues\"?" );
- seqValues[nProperty] >>= bMenuIcons;
- }
- break;
- case PROPERTYHANDLE_SYSTEMICONSINMENUES : {
- DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\IsSystemIconsInMenus\"?" );
- seqValues[nProperty] >>= bSystemMenuIcons;
- }
- break;
- }
- }
-
- m_nMenuIcons = bSystemMenuIcons ? 2 : bMenuIcons;
-
- EnableNotification( seqNames );
-}
-
-//*****************************************************************************************************************
-// destructor
-//*****************************************************************************************************************
-SvtMenuOptions_Impl::~SvtMenuOptions_Impl()
-{
- // Flush data to configuration!
- // User has no chance to do that.
- if( IsModified() == sal_True )
- {
- Commit();
- }
-
- for ( USHORT n=0; n<aList.Count(); )
- delete aList.Remove(n);
-}
-
-//*****************************************************************************************************************
-// public method
-//*****************************************************************************************************************
-void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames )
-{
- // Use given list of updated properties to get his values from configuration directly!
- Sequence< Any > seqValues = GetProperties( seqPropertyNames );
- // Safe impossible cases.
- // We need values from ALL notified configuration keys.
- DBG_ASSERT( !(seqPropertyNames.getLength()!=seqValues.getLength()), "SvtMenuOptions_Impl::Notify()\nI miss some values of configuration keys!\n" );
-
- sal_Bool bMenuIcons = true;
- sal_Bool bSystemMenuIcons = true;
-
- // Step over list of property names and get right value from coreesponding value list to set it on internal members!
- sal_Int32 nCount = seqPropertyNames.getLength();
- for( sal_Int32 nProperty=0; nProperty<nCount; ++nProperty )
- {
- if( seqPropertyNames[nProperty] == PROPERTYNAME_DONTHIDEDISABLEDENTRIES )
- {
- DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::Notify()\nWho has changed the value type of \"Office.Common\\View\\Menu\\DontHideDisabledEntry\"?" );
- seqValues[nProperty] >>= m_bDontHideDisabledEntries;
- }
- else if( seqPropertyNames[nProperty] == PROPERTYNAME_FOLLOWMOUSE )
- {
- DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::Notify()\nWho has changed the value type of \"Office.Common\\View\\Menu\\FollowMouse\"?" );
- seqValues[nProperty] >>= m_bFollowMouse;
- }
- else if( seqPropertyNames[nProperty] == PROPERTYNAME_SHOWICONSINMENUES )
- {
- DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\ShowIconsInMenues\"?" );
- seqValues[nProperty] >>= bMenuIcons;
- }
- else if( seqPropertyNames[nProperty] == PROPERTYNAME_SYSTEMICONSINMENUES )
- {
- DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\IsSystemIconsInMenus\"?" );
- seqValues[nProperty] >>= bSystemMenuIcons;
- }
-
- #if OSL_DEBUG_LEVEL > 1
- else DBG_ASSERT( sal_False, "SvtMenuOptions_Impl::Notify()\nUnkown property detected ... I can't handle these!\n" );
- #endif
- }
-
- m_nMenuIcons = bSystemMenuIcons ? 2 : bMenuIcons;
-
- for ( USHORT n=0; n<aList.Count(); n++ )
- aList.GetObject(n)->Call( this );
-}
-
-//*****************************************************************************************************************
-// public method
-//*****************************************************************************************************************
-void SvtMenuOptions_Impl::Commit()
-{
- // Get names of supported properties, create a list for values and copy current values to it.
- Sequence< OUString > seqNames = impl_GetPropertyNames();
- sal_Int32 nCount = seqNames.getLength();
- Sequence< Any > seqValues ( nCount );
- for( sal_Int32 nProperty=0; nProperty<nCount; ++nProperty )
- {
- switch( nProperty )
- {
- case PROPERTYHANDLE_DONTHIDEDISABLEDENTRIES : {
- seqValues[nProperty] <<= m_bDontHideDisabledEntries;
- }
- break;
-
- case PROPERTYHANDLE_FOLLOWMOUSE : {
- seqValues[nProperty] <<= m_bFollowMouse;
- }
- break;
- //Output cache of current setting as possibly modified by System Theme for older version
- case PROPERTYHANDLE_SHOWICONSINMENUES : {
- seqValues[nProperty] <<=(sal_Bool)(Application::GetSettings().GetStyleSettings().GetUseImagesInMenus());
- }
- break;
- case PROPERTYHANDLE_SYSTEMICONSINMENUES : {
- seqValues[nProperty] <<= (m_nMenuIcons == 2 ? sal_True : sal_False) ;
- }
- break;
- }
- }
- // Set properties in configuration.
- PutProperties( seqNames, seqValues );
-}
-
-//*****************************************************************************************************************
-// private method
-//*****************************************************************************************************************
-Sequence< OUString > SvtMenuOptions_Impl::impl_GetPropertyNames()
-{
- // Build static list of configuration key names.
- static const OUString pProperties[] =
- {
- PROPERTYNAME_DONTHIDEDISABLEDENTRIES ,
- PROPERTYNAME_FOLLOWMOUSE ,
- PROPERTYNAME_SHOWICONSINMENUES ,
- PROPERTYNAME_SYSTEMICONSINMENUES
- };
- // Initialize return sequence with these list ...
- static const Sequence< OUString > seqPropertyNames( pProperties, PROPERTYCOUNT );
- // ... and return it.
- return seqPropertyNames;
-}
-
-void SvtMenuOptions_Impl::AddListener( const Link& rLink )
-{
- aList.Insert( new Link( rLink ) );
-}
-
-void SvtMenuOptions_Impl::RemoveListener( const Link& rLink )
-{
- for ( USHORT n=0; n<aList.Count(); n++ )
- {
- if ( (*aList.GetObject(n) ) == rLink )
- {
- delete aList.Remove(n);
- break;
- }
- }
-}
-
-//*****************************************************************************************************************
-// initialize static member
-// DON'T DO IT IN YOUR HEADER!
-// see definition for further informations
-//*****************************************************************************************************************
-SvtMenuOptions_Impl* SvtMenuOptions::m_pDataContainer = NULL ;
-sal_Int32 SvtMenuOptions::m_nRefCount = 0 ;
-
-//*****************************************************************************************************************
-// constructor
-//*****************************************************************************************************************
-SvtMenuOptions::SvtMenuOptions()
-{
- // Global access, must be guarded (multithreading!).
- MutexGuard aGuard( GetOwnStaticMutex() );
- // Increase ouer refcount ...
- ++m_nRefCount;
- // ... and initialize ouer data container only if it not already!
- if( m_pDataContainer == NULL )
- {
- RTL_LOGFILE_CONTEXT(aLog, "unotools ( ??? ) ::SvtMenuOptions_Impl::ctor()");
- m_pDataContainer = new SvtMenuOptions_Impl();
-
- ItemHolder1::holdConfigItem(E_MENUOPTIONS);
- }
-}
-
-//*****************************************************************************************************************
-// destructor
-//*****************************************************************************************************************
-SvtMenuOptions::~SvtMenuOptions()
-{
- // Global access, must be guarded (multithreading!)
- MutexGuard aGuard( GetOwnStaticMutex() );
- // Decrease ouer refcount.
- --m_nRefCount;
- // If last instance was deleted ...
- // we must destroy ouer static data container!
- if( m_nRefCount <= 0 )
- {
- delete m_pDataContainer;
- m_pDataContainer = NULL;
- }
-}
-
-//*****************************************************************************************************************
-// public method
-//*****************************************************************************************************************
-sal_Bool SvtMenuOptions::IsEntryHidingEnabled() const
-{
- MutexGuard aGuard( GetOwnStaticMutex() );
- return m_pDataContainer->IsEntryHidingEnabled();
-}
-
-//*****************************************************************************************************************
-// public method
-//*****************************************************************************************************************
-sal_Bool SvtMenuOptions::IsFollowMouseEnabled() const
-{
- MutexGuard aGuard( GetOwnStaticMutex() );
- return m_pDataContainer->IsFollowMouseEnabled();
-}
-
-//*****************************************************************************************************************
-// public method
-//*****************************************************************************************************************
-void SvtMenuOptions::SetEntryHidingState( sal_Bool bState )
-{
- MutexGuard aGuard( GetOwnStaticMutex() );
- m_pDataContainer->SetEntryHidingState( bState );
-}
-
-//*****************************************************************************************************************
-// public method
-//*****************************************************************************************************************
-void SvtMenuOptions::SetFollowMouseState( sal_Bool bState )
-{
- MutexGuard aGuard( GetOwnStaticMutex() );
- m_pDataContainer->SetFollowMouseState( bState );
-}
-
-//*****************************************************************************************************************
-// public method
-//*****************************************************************************************************************
-sal_Int16 SvtMenuOptions::GetMenuIconsState() const
-{
- MutexGuard aGuard( GetOwnStaticMutex() );
- return m_pDataContainer->GetMenuIconsState();
-}
-
-//*****************************************************************************************************************
-// public method
-//*****************************************************************************************************************
-void SvtMenuOptions::SetMenuIconsState( sal_Int16 bState )
-{
- MutexGuard aGuard( GetOwnStaticMutex() );
- m_pDataContainer->SetMenuIconsState( bState );
-}
-
-//*****************************************************************************************************************
-// private method
-//*****************************************************************************************************************
-Mutex& SvtMenuOptions::GetOwnStaticMutex()
-{
- // Initialize static mutex only for one time!
- static Mutex* pMutex = NULL;
- // If these method first called (Mutex not already exist!) ...
- if( pMutex == NULL )
- {
- // ... we must create a new one. Protect follow code with the global mutex -
- // It must be - we create a static variable!
- MutexGuard aGuard( Mutex::getGlobalMutex() );
- // We must check our pointer again - because it can be that another instance of ouer class will be fastr then these!
- if( pMutex == NULL )
- {
- // Create the new mutex and set it for return on static variable.
- static Mutex aMutex;
- pMutex = &aMutex;
- }
- }
- // Return new created or already existing mutex object.
- return *pMutex;
-}
-
-void SvtMenuOptions::AddListener( const Link& rLink )
-{
- m_pDataContainer->AddListener( rLink );
-}
-
-void SvtMenuOptions::RemoveListener( const Link& rLink )
-{
- m_pDataContainer->RemoveListener( rLink );
-}
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index 4160f2f2f443..8befb8a0f209 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -872,5 +872,54 @@ sal_Bool UCBContentHelper::IsSubPath( const ::rtl::OUString& rPath, const ::rtl:
return bResult;
}
+// -----------------------------------------------------------------------
+sal_Bool UCBContentHelper::EqualURLs( const ::rtl::OUString& aFirstURL, const ::rtl::OUString& aSecondURL )
+{
+ sal_Bool bResult = sal_False;
+
+ if ( aFirstURL.getLength() && aSecondURL.getLength() )
+ {
+ INetURLObject aFirst( aFirstURL );
+ INetURLObject aSecond( aSecondURL );
+
+ if ( aFirst.GetProtocol() != INET_PROT_NOT_VALID && aSecond.GetProtocol() != INET_PROT_NOT_VALID )
+ {
+ try
+ {
+ ::ucbhelper::ContentBroker* pBroker = ::ucbhelper::ContentBroker::get();
+ if ( !pBroker )
+ throw uno::RuntimeException();
+
+ uno::Reference< ::com::sun::star::ucb::XContentIdentifierFactory > xIdFac
+ = pBroker->getContentIdentifierFactoryInterface();
+ if ( !xIdFac.is() )
+ throw uno::RuntimeException();
+
+ uno::Reference< ::com::sun::star::ucb::XContentIdentifier > xIdFirst
+ = xIdFac->createContentIdentifier( aFirst.GetMainURL( INetURLObject::NO_DECODE ) );
+ uno::Reference< ::com::sun::star::ucb::XContentIdentifier > xIdSecond
+ = xIdFac->createContentIdentifier( aSecond.GetMainURL( INetURLObject::NO_DECODE ) );
+
+ if ( xIdFirst.is() && xIdSecond.is() )
+ {
+ uno::Reference< ::com::sun::star::ucb::XContentProvider > xProvider =
+ pBroker->getContentProviderInterface();
+ if ( !xProvider.is() )
+ throw uno::RuntimeException();
+ bResult = !xProvider->compareContentIds( xIdFirst, xIdSecond );
+ }
+ }
+ catch( uno::Exception& )
+ {
+ OSL_ENSURE( sal_False, "Can't compare URL's, treat as different!\n" );
+ }
+ }
+ }
+
+ return bResult;
+}
+
+
+
} // namespace utl
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index 6d65eb67055e..11f6627ed8b9 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -269,7 +269,7 @@ handleAuthenticationRequest_(
aInfo.SetCanRememberPassword(
ePreferredRememberMode != eAlternateRememberMode);
aInfo.SetIsRememberPassword(
- eDefaultRememberMode != ucb::RememberAuthentication_NO);
+ ePreferredRememberMode == eDefaultRememberMode);
aInfo.SetIsRememberPersistent(
ePreferredRememberMode == ucb::RememberAuthentication_PERSISTENT);
diff --git a/vbahelper/inc/vbahelper/vbahelper.hxx b/vbahelper/inc/vbahelper/vbahelper.hxx
index a1eca84bbdf8..ccabb9114f2d 100644
--- a/vbahelper/inc/vbahelper/vbahelper.hxx
+++ b/vbahelper/inc/vbahelper/vbahelper.hxx
@@ -90,6 +90,13 @@ namespace ooo
VBAHELPER_DLLPUBLIC void PrintOutHelper( SfxViewShell* pViewShell, const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName, sal_Bool bSelection );
VBAHELPER_DLLPUBLIC void PrintPreviewHelper( const css::uno::Any& EnableChanges, SfxViewShell* );
+ /** Extracts a boolean value from the passed Any, which may contain sal_Bool or an integer or floating-point value.
+ Returns false, if the Any is empty or contains an incompatible type. */
+ VBAHELPER_DLLPUBLIC bool extractBoolFromAny( bool& rbValue, const css::uno::Any& rAny );
+ /** Extracts a boolean value from the passed Any, which may contain sal_Bool or an integer or floating-point value.
+ Throws, if the Any is empty or contains an incompatible type. */
+ VBAHELPER_DLLPUBLIC bool extractBoolFromAny( const css::uno::Any& rAny ) throw (css::uno::RuntimeException);
+
VBAHELPER_DLLPUBLIC rtl::OUString getAnyAsString( const css::uno::Any& pvargItem ) throw ( css::uno::RuntimeException );
VBAHELPER_DLLPUBLIC rtl::OUString VBAToRegexp(const rtl::OUString &rIn, bool bForLike = false); // needs to be in an uno service ( already this code is duplicated in basic )
VBAHELPER_DLLPUBLIC double getPixelTo100thMillimeterConversionFactor( css::uno::Reference< css::awt::XDevice >& xDevice, sal_Bool bVertical);
diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx
index 2a4cecfc2338..a1333e0a655b 100644
--- a/vbahelper/source/msforms/vbauserform.cxx
+++ b/vbahelper/source/msforms/vbauserform.cxx
@@ -153,28 +153,41 @@ void SAL_CALL
ScVbaUserForm::setValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
{
uno::Any aObject = getValue( aPropertyName );
- // The Object *must* support XDefaultProperty here because getValue will
- // only return properties that are Objects ( e.g. controls )
- // e.g. Userform1.aControl = something
- // 'aControl' has to support XDefaultProperty to make sense here
- uno::Reference< script::XDefaultProperty > xDfltProp( aObject, uno::UNO_QUERY_THROW );
- rtl::OUString aDfltPropName = xDfltProp->getDefaultPropertyName();
- uno::Reference< beans::XIntrospectionAccess > xUnoAccess( getIntrospectionAccess( aObject ) );
- uno::Reference< beans::XPropertySet > xPropSet( xUnoAccess->queryAdapter( ::getCppuType( (const uno::Reference< beans::XPropertySet > *)0 ) ), uno::UNO_QUERY_THROW );
- xPropSet->setPropertyValue( aDfltPropName, aValue );
+
+ // in case the dialog is already closed the VBA implementation should not throw exceptions
+ if ( aObject.hasValue() )
+ {
+ // The Object *must* support XDefaultProperty here because getValue will
+ // only return properties that are Objects ( e.g. controls )
+ // e.g. Userform1.aControl = something
+ // 'aControl' has to support XDefaultProperty to make sense here
+ uno::Reference< script::XDefaultProperty > xDfltProp( aObject, uno::UNO_QUERY_THROW );
+ rtl::OUString aDfltPropName = xDfltProp->getDefaultPropertyName();
+ uno::Reference< beans::XIntrospectionAccess > xUnoAccess( getIntrospectionAccess( aObject ) );
+ uno::Reference< beans::XPropertySet > xPropSet( xUnoAccess->queryAdapter( ::getCppuType( (const uno::Reference< beans::XPropertySet > *)0 ) ), uno::UNO_QUERY_THROW );
+ xPropSet->setPropertyValue( aDfltPropName, aValue );
+ }
}
uno::Any SAL_CALL
ScVbaUserForm::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException)
{
- uno::Reference< awt::XControl > xDialogControl( m_xDialog, uno::UNO_QUERY_THROW );
- uno::Reference< awt::XControlContainer > xContainer( m_xDialog, uno::UNO_QUERY_THROW );
- uno::Reference< awt::XControl > xControl = xContainer->getControl( aPropertyName );
- ScVbaControlFactory aFac( mxContext, xControl, m_xModel );
- uno::Reference< msforms::XControl > xVBAControl( aFac.createControl( xDialogControl->getModel() ) );
- ScVbaControl* pControl = dynamic_cast< ScVbaControl* >( xVBAControl.get() );
- pControl->setGeometryHelper( new UserFormGeometryHelper( mxContext, xControl ) );
- return uno::makeAny( xVBAControl );
+ uno::Any aResult;
+
+ // in case the dialog is already closed the VBA implementation should not throw exceptions
+ if ( m_xDialog.is() )
+ {
+ uno::Reference< awt::XControl > xDialogControl( m_xDialog, uno::UNO_QUERY_THROW );
+ uno::Reference< awt::XControlContainer > xContainer( m_xDialog, uno::UNO_QUERY_THROW );
+ uno::Reference< awt::XControl > xControl = xContainer->getControl( aPropertyName );
+ ScVbaControlFactory aFac( mxContext, xControl, m_xModel );
+ uno::Reference< msforms::XControl > xVBAControl( aFac.createControl( xDialogControl->getModel() ) );
+ ScVbaControl* pControl = dynamic_cast< ScVbaControl* >( xVBAControl.get() );
+ pControl->setGeometryHelper( new UserFormGeometryHelper( mxContext, xControl ) );
+ aResult = uno::makeAny( xVBAControl );
+ }
+
+ return aResult;
}
::sal_Bool SAL_CALL
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 7cd82dff9536..14f4e3ff1363 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -625,6 +625,30 @@ void PrintOutHelper( SfxViewShell* pViewShell, const uno::Any& From, const uno::
dispatchExecute( pViewShell, SID_VIEWSHELL1 );
}
+bool extractBoolFromAny( bool& rbValue, const uno::Any& rAny )
+{
+ if( rAny >>= rbValue ) return true;
+
+ sal_Int64 nSigned = 0;
+ if( rAny >>= nSigned ) { rbValue = nSigned != 0; return true; }
+
+ sal_uInt64 nUnsigned = 0;
+ if( rAny >>= nUnsigned ) { rbValue = nUnsigned > 0; return true; }
+
+ double fDouble = 0.0;
+ if( rAny >>= fDouble ) { rbValue = fDouble != 0.0; return true; }
+
+ return false;
+}
+
+bool extractBoolFromAny( const uno::Any& rAny ) throw (uno::RuntimeException)
+{
+ bool bValue = false;
+ if( extractBoolFromAny( bValue, rAny ) )
+ return bValue;
+ throw uno::RuntimeException();
+}
+
rtl::OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeException )
{
uno::Type aType = pvargItem.getValueType();
diff --git a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm b/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
index 53ab6dd36128..804cf108dba8 100644
--- a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
@@ -40,20 +40,23 @@ using namespace ::com::sun::star::uno;
+(id)selectedChildrenAttributeForElement:(AquaA11yWrapper *)wrapper
{
Reference< XAccessibleSelection > xAccessibleSelection = [ wrapper accessibleSelection ];
- NSMutableArray * children = [ [ NSMutableArray alloc ] init ];
-
- try {
- sal_Int32 n = xAccessibleSelection -> getSelectedAccessibleChildCount();
- for ( sal_Int32 i=0 ; i < n ; ++i ) {
- [ children addObject: [ AquaA11yFactory wrapperForAccessible: xAccessibleSelection -> getSelectedAccessibleChild( i ) ] ];
+ if( xAccessibleSelection.is() )
+ {
+ NSMutableArray * children = [ [ NSMutableArray alloc ] init ];
+ try {
+ sal_Int32 n = xAccessibleSelection -> getSelectedAccessibleChildCount();
+ for ( sal_Int32 i=0 ; i < n ; ++i ) {
+ [ children addObject: [ AquaA11yFactory wrapperForAccessible: xAccessibleSelection -> getSelectedAccessibleChild( i ) ] ];
+ }
+
+ return children;
+
+ } catch ( Exception& e)
+ {
}
-
- return children;
-
- } catch ( Exception& e) {
- return nil;
}
+ return nil;
}
diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx
index 96569aa80120..b04fd9c75af7 100644
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@ -1453,16 +1453,24 @@ BOOL AquaSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight,
// prepare the target context
NSGraphicsContext* pOrigNSCtx = [NSGraphicsContext currentContext];
+ [pOrigNSCtx retain];
+
+ // create new context
NSGraphicsContext* pDrawNSCtx = [NSGraphicsContext graphicsContextWithGraphicsPort: mrContext flipped: IsFlipped()];
+ // set it, setCurrentContext also releases the prviously set one
[NSGraphicsContext setCurrentContext: pDrawNSCtx];
+
// draw the EPS
const NSRect aDstRect = {{nX,nY},{nWidth,nHeight}};
const BOOL bOK = [xEpsImage drawInRect: aDstRect];
+
+ // restore the NSGraphicsContext
+ [NSGraphicsContext setCurrentContext: pOrigNSCtx];
+ [pOrigNSCtx release]; // restore the original retain count
+
CGContextRestoreGState( mrContext );
// mark the destination rectangle as updated
RefreshRect( aDstRect );
- // restore the NSGraphicsContext, TODO: do we need this?
- [NSGraphicsContext setCurrentContext: pOrigNSCtx];
return bOK;
}
diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx b/vcl/aqua/source/gdi/salnativewidgets.cxx
index 6e206977b5c4..9ce2b8a5a518 100644
--- a/vcl/aqua/source/gdi/salnativewidgets.cxx
+++ b/vcl/aqua/source/gdi/salnativewidgets.cxx
@@ -1366,10 +1366,12 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
w = aCtrlBoundRect.GetWidth();
if( w < 3+2*FOCUS_RING_WIDTH )
w = 3+2*FOCUS_RING_WIDTH;
- h = TEXT_EDIT_HEIGHT_NORMAL;
+ h = TEXT_EDIT_HEIGHT_NORMAL+2*FOCUS_RING_WIDTH;
+ if( h < aCtrlBoundRect.GetHeight() )
+ h = aCtrlBoundRect.GetHeight();
- rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*FOCUS_RING_WIDTH-2, h-2 ) );
- rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
+ rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*(FOCUS_RING_WIDTH+1), h-2*(FOCUS_RING_WIDTH+1) ) );
+ rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
toReturn = TRUE;
}
diff --git a/vcl/inc/vcl/arrange.hxx b/vcl/inc/vcl/arrange.hxx
index 8846d9bbe948..83568609f87b 100644
--- a/vcl/inc/vcl/arrange.hxx
+++ b/vcl/inc/vcl/arrange.hxx
@@ -48,7 +48,7 @@ namespace vcl
or a child WindowArranger (a node in the hierarchy), but never both
*/
- class WindowArranger
+ class VCL_DLLPUBLIC WindowArranger
{
protected:
struct Element
@@ -189,7 +189,7 @@ namespace vcl
}
};
- class RowOrColumn : public WindowArranger
+ class VCL_DLLPUBLIC RowOrColumn : public WindowArranger
{
long m_nBorderWidth;
bool m_bColumn;
@@ -230,7 +230,7 @@ namespace vcl
long getBorderWidth() const { return m_nBorderWidth; }
};
- class LabeledElement : public WindowArranger
+ class VCL_DLLPUBLIC LabeledElement : public WindowArranger
{
WindowArranger::Element m_aLabel;
WindowArranger::Element m_aElement;
@@ -274,7 +274,7 @@ namespace vcl
{ return m_aElement.getOptimalSize( i_eType ); }
};
- class LabelColumn : public RowOrColumn
+ class VCL_DLLPUBLIC LabelColumn : public RowOrColumn
{
long getLabelWidth() const;
public:
@@ -291,7 +291,7 @@ namespace vcl
size_t addRow( Window* i_pLabel, Window* i_pElement, long i_nIndent = 0 );
};
- class Indenter : public WindowArranger
+ class VCL_DLLPUBLIC Indenter : public WindowArranger
{
long m_nIndent;
WindowArranger::Element m_aElement;
@@ -325,7 +325,7 @@ namespace vcl
{ setChild( boost::shared_ptr<WindowArranger>( i_pChild ), i_nExpandPrio ); }
};
- class Spacer : public WindowArranger
+ class VCL_DLLPUBLIC Spacer : public WindowArranger
{
WindowArranger::Element m_aElement;
Size m_aSize;
@@ -351,7 +351,7 @@ namespace vcl
virtual bool isVisible() const { return true; }
};
- class MatrixArranger : public WindowArranger
+ class VCL_DLLPUBLIC MatrixArranger : public WindowArranger
{
long m_nBorderX;
long m_nBorderY;
diff --git a/vcl/inc/vcl/combobox.hxx b/vcl/inc/vcl/combobox.hxx
index e35474a84d53..640c70e7116f 100644
--- a/vcl/inc/vcl/combobox.hxx
+++ b/vcl/inc/vcl/combobox.hxx
@@ -138,6 +138,7 @@ public:
USHORT GetEntryPos( const XubString& rStr ) const;
USHORT GetEntryPos( const void* pData ) const;
+ Image GetEntryImage( USHORT nPos ) const;
XubString GetEntry( USHORT nPos ) const;
USHORT GetEntryCount() const;
diff --git a/vcl/prj/d.lst b/vcl/prj/d.lst
index 38c025b5a5af..d0baec53b720 100644
--- a/vcl/prj/d.lst
+++ b/vcl/prj/d.lst
@@ -17,6 +17,7 @@ mkdir: %_DEST%\inc%_EXT%\vcl
..\inc\vcl\alpha.hxx %_DEST%\inc%_EXT%\vcl\alpha.hxx
..\inc\vcl\animate.hxx %_DEST%\inc%_EXT%\vcl\animate.hxx
..\inc\vcl\apptypes.hxx %_DEST%\inc%_EXT%\vcl\apptypes.hxx
+..\inc\vcl\arrange.hxx %_DEST%\inc%_EXT%\vcl\arrange.hxx
..\inc\vcl\bitmap.hxx %_DEST%\inc%_EXT%\vcl\bitmap.hxx
..\inc\vcl\bitmapex.hxx %_DEST%\inc%_EXT%\vcl\bitmapex.hxx
..\inc\vcl\bmpacc.hxx %_DEST%\inc%_EXT%\vcl\bmpacc.hxx
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 8efa3404a44a..5b2e8755e5c8 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -1010,6 +1010,14 @@ void ComboBox::Clear()
mpImplLB->Clear();
CallEventListeners( VCLEVENT_COMBOBOX_ITEMREMOVED, (void*) sal_IntPtr(-1) );
}
+// -----------------------------------------------------------------------
+
+Image ComboBox::GetEntryImage( USHORT nPos ) const
+{
+ if ( mpImplLB->GetEntryList()->HasEntryImage( nPos ) )
+ return mpImplLB->GetEntryList()->GetEntryImage( nPos );
+ return Image();
+}
// -----------------------------------------------------------------------
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 818a31a10c0f..d36a18a1afba 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -873,8 +873,8 @@ void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY )
{
aOffset = aMapVDev.LogicToPixel( aBaseOffset, GetPrefMapMode() );
MapMode aMap( aMapVDev.GetMapMode() );
- aOffset.Width() = aOffset.Width() * (double)aMap.GetScaleX();
- aOffset.Height() = aOffset.Height() * (double)aMap.GetScaleY();
+ aOffset.Width() = static_cast<long>(aOffset.Width() * (double)aMap.GetScaleX());
+ aOffset.Height() = static_cast<long>(aOffset.Height() * (double)aMap.GetScaleY());
}
else
aOffset = aMapVDev.LogicToLogic( aBaseOffset, GetPrefMapMode(), aMapVDev.GetMapMode() );
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 8b4bf5163839..d8581cc3fa7a 100755
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -175,6 +175,7 @@ public:
// if set, pages are centered and trimmed onto the fixed page
Size maFixedPageSize;
sal_Int32 mnDefaultPaperBin;
+ sal_Int32 mnFixedPaperBin;
ImplPrinterControllerData() :
mbFirstPage( sal_True ),
@@ -182,7 +183,8 @@ public:
mbReversePageOrder( sal_False ),
meJobState( view::PrintableState_JOB_STARTED ),
mpProgress( NULL ),
- mnDefaultPaperBin( -1 )
+ mnDefaultPaperBin( -1 ),
+ mnFixedPaperBin( -1 )
{}
~ImplPrinterControllerData() { delete mpProgress; }
@@ -728,6 +730,7 @@ void PrinterController::setPrinter( const boost::shared_ptr<Printer>& i_rPrinter
setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ),
makeAny( rtl::OUString( i_rPrinter->GetName() ) ) );
mpImplData->mnDefaultPaperBin = mpImplData->mpPrinter->GetPaperBin();
+ mpImplData->mnFixedPaperBin = -1;
}
bool PrinterController::setupPrinter( Window* i_pParent )
@@ -735,15 +738,20 @@ bool PrinterController::setupPrinter( Window* i_pParent )
bool bRet = false;
if( mpImplData->mpPrinter.get() )
{
+ // get old data
Size aPaperSize( mpImplData->mpPrinter->PixelToLogic(
mpImplData->mpPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
+ USHORT nPaperBin = mpImplData->mpPrinter->GetPaperBin();
+
+ // call driver setup
bRet = mpImplData->mpPrinter->Setup( i_pParent );
if( bRet )
{
- // was the papersize overridden ? if so we need to take action
+ // was papersize or bin overridden ? if so we need to take action
Size aNewPaperSize( mpImplData->mpPrinter->PixelToLogic(
mpImplData->mpPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
- if( aNewPaperSize != aPaperSize )
+ USHORT nNewPaperBin = mpImplData->mpPrinter->GetPaperBin();
+ if( aNewPaperSize != aPaperSize || nNewPaperBin != nPaperBin )
{
mpImplData->maFixedPageSize = aNewPaperSize;
mpImplData->maPageCache.invalidate();
@@ -752,6 +760,7 @@ bool PrinterController::setupPrinter( Window* i_pParent )
aOverrideSize.Height = aNewPaperSize.Height();
setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OverridePageSize" ) ),
makeAny( aOverrideSize ) );
+ mpImplData->mnFixedPaperBin = nNewPaperBin;
}
}
}
@@ -1149,8 +1158,13 @@ void PrinterController::printFilteredPage( int i_nPage )
mpImplData->mpPrinter->SetMapMode( MAP_100TH_MM );
// aPageSize was filtered through mpImplData->getRealPaperSize already by getFilteredPageFile()
mpImplData->mpPrinter->SetPaperSizeUser( aPageSize.aSize, ! mpImplData->isFixedPageSize() );
+ if( mpImplData->mnFixedPaperBin != -1 &&
+ mpImplData->mpPrinter->GetPaperBin() != mpImplData->mnFixedPaperBin )
+ {
+ mpImplData->mpPrinter->SetPaperBin( mpImplData->mnFixedPaperBin );
+ }
- // if full paper are is meant, move the output to accomodate for pageoffset
+ // if full paper is meant to be used, move the output to accomodate for pageoffset
if( aPageSize.bFullPaper )
{
Point aPageOffset( mpImplData->mpPrinter->GetPageOffset() );
diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index d4ee01c26d61..322b2937b5c9 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -218,8 +218,15 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
Point aPos = rMEvt.GetPosPixel();
aLastMove = rMEvt;
- pWin->CaptureMouse();
- nFlags |= SELENG_IN_SEL;
+ if( !rMEvt.IsRight() )
+ {
+ pWin->CaptureMouse();
+ nFlags |= SELENG_IN_SEL;
+ }
+ else
+ {
+ nModifier = 0;
+ }
switch ( nModifier )
{
@@ -327,7 +334,7 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
|*
*************************************************************************/
-BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& /* rMEvt */ )
+BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt )
{
aWTimer.Stop();
//DbgOut("Up");
@@ -336,7 +343,11 @@ BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& /* rMEvt */ )
nFlags &= ~(SELENG_CMDEVT | SELENG_WAIT_UPEVT | SELENG_IN_SEL);
return FALSE;
}
- pWin->ReleaseMouse();
+
+ if( !rMEvt.IsRight() )
+ {
+ pWin->ReleaseMouse();
+ }
if( (nFlags & SELENG_WAIT_UPEVT) && !(nFlags & SELENG_CMDEVT) &&
eSelMode != SINGLE_SELECTION)
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index f3624ef56f59..f6a37658b79f 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -773,7 +773,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
BOOL bWrapped = FALSE;
while( pWin )
{
- if( !pWin->ImplIsRealParentPath( this ) &&
+ if( !pWin->ImplIsRealParentPath( this ) && ( pWin != this ) &&
pWin->ImplGetWindow()->IsTopWindow() && pWin->mpWindowImpl->mbReallyVisible )
{
SalFrameGeometry g = pWin->mpWindowImpl->mpFrame->GetGeometry();
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index ad33cdf67de6..076e36291ae6 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -91,7 +91,7 @@ atk_wrapper_focus_idle_handler (gpointer data)
// also emit state-changed:focused event under the same condition.
{
AtkObjectWrapper* wrapper_obj = ATK_OBJECT_WRAPPER (atk_obj);
- if( !wrapper_obj->mpText && wrapper_obj->mpContext )
+ if( wrapper_obj && !wrapper_obj->mpText && wrapper_obj->mpContext )
{
uno::Any any = wrapper_obj->mpContext->queryInterface( accessibility::XAccessibleText::static_type(NULL) );
if ( typelib_TypeClass_INTERFACE == any.pType->eTypeClass &&
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index b8a3ac773a8f..447a970f6bcd 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -1047,8 +1047,9 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
GtkRequisition aReq;
gtk_widget_size_request( widget, &aReq );
Rectangle aEditRect = rControlRegion;
+ long nHeight = (aEditRect.GetHeight() > aReq.height+1) ? aEditRect.GetHeight() : aReq.height+1;
aEditRect = Rectangle( aEditRect.TopLeft(),
- Size( aEditRect.GetWidth(), aReq.height+1 ) );
+ Size( aEditRect.GetWidth(), nHeight ) );
rNativeBoundingRegion = aEditRect;
rNativeContentRegion = rNativeBoundingRegion;
returnVal = TRUE;
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index c6ff16f8395b..e8b55ebfa895 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1452,12 +1452,6 @@ void GtkSalFrame::setMinMaxSize()
aHints |= GDK_HINT_MAX_SIZE;
}
}
- if( m_bFullscreen )
- {
- aGeo.max_width = m_aMaxSize.Width();
- aGeo.max_height = m_aMaxSize.Height();
- aHints |= GDK_HINT_MAX_SIZE;
- }
if( aHints )
gtk_window_set_geometry_hints( GTK_WINDOW(m_pWindow),
NULL,
@@ -1832,7 +1826,11 @@ void GtkSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
// workaround different legacy version window managers have different opinions about
// _NET_WM_STATE_FULLSCREEN (Metacity <-> KWin)
if( ! getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
+ {
+ if( !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
+ gtk_window_set_resizable( GTK_WINDOW(m_pWindow), TRUE );
gtk_window_fullscreen( GTK_WINDOW( m_pWindow ) );
+ }
if( bVisible )
Show( TRUE );
}
@@ -1863,11 +1861,8 @@ void GtkSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
{
if( bFullScreen )
{
- if( getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
- {
- if( !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
- gtk_window_set_resizable( GTK_WINDOW(m_pWindow), TRUE );
- }
+ if( !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
+ gtk_window_set_resizable( GTK_WINDOW(m_pWindow), TRUE );
gtk_window_fullscreen( GTK_WINDOW(m_pWindow) );
moveToScreen( nScreen );
Size aScreenSize = pDisp->GetScreenSize( m_nScreen );
@@ -1879,11 +1874,8 @@ void GtkSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
else
{
gtk_window_unfullscreen( GTK_WINDOW(m_pWindow) );
- if( getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
- {
- if( !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
- gtk_window_set_resizable( GTK_WINDOW(m_pWindow), FALSE );
- }
+ if( !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
+ gtk_window_set_resizable( GTK_WINDOW(m_pWindow), FALSE );
moveToScreen( nScreen );
}
}
@@ -2849,12 +2841,52 @@ gboolean GtkSalFrame::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer f
return FALSE;
}
+IMPL_LINK( GtkSalFrame, ImplDelayedFullScreenHdl, void*, EMPTYARG )
+{
+ Atom nStateAtom = getDisplay()->getWMAdaptor()->getAtom(vcl_sal::WMAdaptor::NET_WM_STATE);
+ Atom nFSAtom = getDisplay()->getWMAdaptor()->getAtom(vcl_sal::WMAdaptor::NET_WM_STATE_FULLSCREEN );
+ if( nStateAtom && nFSAtom )
+ {
+ /* #i110881# workaround a gtk issue (see https://bugzilla.redhat.com/show_bug.cgi?id=623191#c8)
+ gtk_window_fullscreen can fail due to a race condition, request an additional status change
+ to fullscreen to be safe
+ */
+ XEvent aEvent;
+ aEvent.type = ClientMessage;
+ aEvent.xclient.display = getDisplay()->GetDisplay();
+ aEvent.xclient.window = GDK_WINDOW_XWINDOW(m_pWindow->window);
+ aEvent.xclient.message_type = nStateAtom;
+ aEvent.xclient.format = 32;
+ aEvent.xclient.data.l[0] = 1;
+ aEvent.xclient.data.l[1] = nFSAtom;
+ aEvent.xclient.data.l[2] = 0;
+ aEvent.xclient.data.l[3] = 0;
+ aEvent.xclient.data.l[4] = 0;
+ XSendEvent( getDisplay()->GetDisplay(),
+ getDisplay()->GetRootWindow( m_nScreen ),
+ False,
+ SubstructureNotifyMask | SubstructureRedirectMask,
+ &aEvent
+ );
+ }
+
+ return 0;
+}
+
gboolean GtkSalFrame::signalMap( GtkWidget*, GdkEvent*, gpointer frame )
{
GtkSalFrame* pThis = (GtkSalFrame*)frame;
GTK_YIELD_GRAB();
+ if( pThis->m_bFullscreen )
+ {
+ /* #i110881# workaorund a gtk issue (see https://bugzilla.redhat.com/show_bug.cgi?id=623191#c8)
+ gtk_window_fullscreen can run into a race condition with the window's showstate
+ */
+ Application::PostUserEvent( LINK( pThis, GtkSalFrame, ImplDelayedFullScreenHdl ) );
+ }
+
bool bSetFocus = pThis->m_bSetFocusOnMap;
pThis->m_bSetFocusOnMap = false;
if( ImplGetSVData()->mbIsTestTool )
diff --git a/vcl/unx/inc/plugins/gtk/gtkframe.hxx b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
index 18dd476fc2c4..d47e5fb50fca 100644
--- a/vcl/unx/inc/plugins/gtk/gtkframe.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
@@ -38,6 +38,8 @@
#include <vcl/salframe.hxx>
#include <vcl/sysdata.hxx>
+#include "tools/link.hxx"
+
#include <list>
#include <vector>
@@ -265,6 +267,8 @@ class GtkSalFrame : public SalFrame
void setMinMaxSize();
void createNewWindow( XLIB_Window aParent, bool bXEmbed, int nScreen );
void askForXEmbedFocus( sal_Int32 nTimecode );
+
+ DECL_LINK( ImplDelayedFullScreenHdl, void* );
public:
GtkSalFrame( SalFrame* pParent, ULONG nStyle );
GtkSalFrame( SystemParentData* pSysData );
diff --git a/vcl/unx/source/app/wmadaptor.cxx b/vcl/unx/source/app/wmadaptor.cxx
index 1a116fcbe8d6..aa2e4c84ef24 100644
--- a/vcl/unx/source/app/wmadaptor.cxx
+++ b/vcl/unx/source/app/wmadaptor.cxx
@@ -2180,6 +2180,15 @@ void NetWMAdaptor::showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const
if( m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ] )
{
pFrame->mbFullScreen = bFullScreen;
+ if( bFullScreen )
+ {
+ if( m_aWMAtoms[ MOTIF_WM_HINTS ] )
+ {
+ XDeleteProperty( m_pDisplay,
+ pFrame->GetShellWindow(),
+ m_aWMAtoms[ MOTIF_WM_HINTS ] );
+ }
+ }
if( pFrame->bMapped_ )
{
// window already mapped, send WM a message
diff --git a/vcl/util/makefile.mk b/vcl/util/makefile.mk
index 04bc3f13ce4d..b864b7cb2685 100644
--- a/vcl/util/makefile.mk
+++ b/vcl/util/makefile.mk
@@ -391,7 +391,7 @@ SHL4STDLIBS+= $(XRANDR_LIBS)
.ENDIF
.ENDIF
-.IF "$(OS)$(CPU)" == "LINUXX"
+.IF "$(OS)$(CPU)" == "LINUXX" && "$(LIBRARY_PATH)" != ""
EXTRALIBPATHS+=-L$(LIBRARY_PATH)
.ENDIF # "$(OS)$(CPU)" == "LINUXX"
.ENDIF # "$(ENABLE_GTK)" != ""
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 806d3b420b33..bc80cbf94fb8 100755..100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -2203,7 +2203,9 @@ void UniscribeLayout::Simplify( bool /*bIsBase*/ )
const int k = mpGlyphs2Chars[ i ];
mpGlyphs2Chars[ j ] = k;
const int nRelGlyphPos = (j++) - rVI.mnMinGlyphPos;
- mpLogClusters[ k ] = static_cast<WORD>(nRelGlyphPos);
+ if( k < 0) // extra glyphs are already mapped
+ continue;
+ mpLogClusters[ k ] = static_cast<WORD>(nRelGlyphPos);
}
rVI.mnEndGlyphPos = j;
diff --git a/xml2cmp/source/xcd/main.cxx b/xml2cmp/source/xcd/main.cxx
index a4c1c0638e82..d692149d2523 100644
--- a/xml2cmp/source/xcd/main.cxx
+++ b/xml2cmp/source/xcd/main.cxx
@@ -88,7 +88,7 @@ Do_SingleFileCommandLine(const CommandLine & i_rCommandLine)
bool bLoadResult = aParser.LoadFile(i_rCommandLine.XmlSrcFile());
if (! bLoadResult)
{
- std::cerr << "Error: File %s could not be loaded." << i_rCommandLine.XmlSrcFile() << std::endl;
+ std::cerr << "Error: File " << i_rCommandLine.XmlSrcFile() << " could not be loaded." << std::endl;
return 1;
}
diff --git a/xmlhelp/prj/d.lst b/xmlhelp/prj/d.lst
index 1cfa107f73b9..67fe323757bb 100644
--- a/xmlhelp/prj/d.lst
+++ b/xmlhelp/prj/d.lst
@@ -4,4 +4,7 @@
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.*
..\%__SRC%\class\*.jar %_DEST%\bin%_EXT%\*.*
..\util\ucpchelp.xml %_DEST%\xml%_EXT%\ucpchelp.xml
+..\util\*.xsl %_DEST%\bin%_EXT%\*.*
..\%__SRC%\lib\ihelplinker.lib %_DEST%\lib%_EXT%\ihelplinker.lib
+..\%__SRC%\bin\helpxsl.zip %_DEST%\pck%_EXT%\helpxsl.zip
+
diff --git a/xmlhelp/util/delzip b/xmlhelp/util/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/xmlhelp/util/delzip
diff --git a/xmlhelp/util/embed.xsl b/xmlhelp/util/embed.xsl
new file mode 100644
index 000000000000..3a4e3ef80f61
--- /dev/null
+++ b/xmlhelp/util/embed.xsl
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output indent="yes" method="xml"/>
+
+<!-- SPECIFY YOUR FILE SYSTEM ROOT PATH TO THE HELP FILES -->
+<xsl:param name="fsroot" select="'file:///handbuch/WORKBENCH/helpcontent2/source/'"/>
+
+<!--
+######################################################
+All others
+######################################################
+-->
+<xsl:template match="/">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="*|@*|comment()|processing-instruction()|text()">
+ <xsl:copy>
+ <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="*|@*|comment()|processing-instruction()|text()" mode="embedded">
+ <xsl:copy>
+ <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()" mode="embedded"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="bookmark" mode="embedded" />
+<xsl:template match="ahelp" mode="embedded">
+ <xsl:apply-templates mode="embedded"/>
+</xsl:template>
+
+<xsl:template match="paragraph[@role='heading']">
+ <title>
+ <xsl:apply-templates/>
+ </title>
+</xsl:template>
+
+<xsl:template match="paragraph[@role=*]">
+ <paragraph>
+ <xsl:apply-templates/>
+ </paragraph>
+</xsl:template>
+
+<xsl:template match="sort">
+ <xsl:apply-templates/>
+</xsl:template>
+
+
+<!--
+######################################################
+EMBED
+######################################################
+-->
+<xsl:template match="embed">
+
+ <xsl:variable name="href"><xsl:value-of select="substring-before(concat($fsroot,@href),'#')"/></xsl:variable>
+ <xsl:variable name="anchor"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
+ <xsl:variable name="doc" select="document($href)"/>
+ <xsl:apply-templates select="$doc//section[@id=$anchor]" mode="embedded"/>
+ <xsl:if test="not($doc//section[@id=$anchor])"> <!-- fallback for embeds that actually should be embedvars -->
+ <paragraph role="paragraph"><xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/></paragraph>
+ </xsl:if>
+</xsl:template>
+
+<!--
+######################################################
+EMBEDVAR
+######################################################
+-->
+<xsl:template match="embedvar">
+ <xsl:if test="not(@href='text/shared/00/00000004.xhp#wie')"> <!-- special treatment if howtoget links -->
+ <xsl:variable name="href"><xsl:value-of select="substring-before(concat($fsroot,@href),'#')"/></xsl:variable>
+ <xsl:variable name="anchor"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
+ <xsl:variable name="doc" select="document($href)"/>
+ <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
+ </xsl:if>
+
+ <!-- FPE: embedvars, that point to "text/shared/00/00000004.xml#wie" will only be resolved in the main_transform -->
+
+</xsl:template>
+</xsl:stylesheet>
diff --git a/xmlhelp/util/idxcaption.xsl b/xmlhelp/util/idxcaption.xsl
new file mode 100644
index 000000000000..7570fa5c7870
--- /dev/null
+++ b/xmlhelp/util/idxcaption.xsl
@@ -0,0 +1,34 @@
+<xsl:stylesheet version="1.0" encoding="UTF-8"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:office="http://openoffice.org/2000/office"
+ xmlns:style="http://openoffice.org/2000/style"
+ xmlns:table="http://openoffice.org/2000/table"
+ xmlns:draw="http://openoffice.org/2000/drawing"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:meta="http://openoffice.org/2000/meta"
+ xmlns:number="http://openoffice.org/2000/datastyle"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:chart="http://openoffice.org/2000/chart"
+ xmlns:help="http://openoffice.org/2000/help"
+ xmlns:index="http://sun.com/2000/XMLSearch"
+ xmlns:text="http://openoffice.org/2000/text">
+
+<xsl:param name="Language" select="'en-US'"/>
+<xsl:output method="text" encoding="UTF-8"/>
+
+<xsl:template match="/">
+ <xsl:apply-templates select="//title" mode="include"/>
+ <xsl:apply-templates select="//paragraph[@role='heading']" mode="include"/>
+</xsl:template>
+
+<xsl:template match="*" mode="include">
+ <xsl:value-of select="."/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="*"/>
+
+</xsl:stylesheet>
+
diff --git a/xmlhelp/util/idxcontent.xsl b/xmlhelp/util/idxcontent.xsl
new file mode 100644
index 000000000000..aa371d7f9255
--- /dev/null
+++ b/xmlhelp/util/idxcontent.xsl
@@ -0,0 +1,104 @@
+<xsl:stylesheet version="1.0" encoding="UTF-8"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:office="http://openoffice.org/2000/office"
+ xmlns:style="http://openoffice.org/2000/style"
+ xmlns:table="http://openoffice.org/2000/table"
+ xmlns:draw="http://openoffice.org/2000/drawing"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:meta="http://openoffice.org/2000/meta"
+ xmlns:number="http://openoffice.org/2000/datastyle"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:chart="http://openoffice.org/2000/chart"
+ xmlns:help="http://openoffice.org/2000/help"
+ xmlns:index="http://sun.com/2000/XMLSearch"
+ xmlns:text="http://openoffice.org/2000/text">
+
+<xsl:param name="Language" select="'en-US'"/>
+<xsl:output method="text" encoding="UTF-8"/>
+
+<xsl:template match="helpdocument|body">
+ <xsl:choose>
+ <xsl:when test="meta/topic[@indexer='exclude']"/>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="title">
+ <xsl:value-of select="."/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="table">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="tablecell">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="tablerow">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="list">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="listitem">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="item">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="emph">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="paragraph">
+ <xsl:value-of select="."/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="section">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="bookmark">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="bookmark_value">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="link">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="ahelp[@visibility='visible']">
+ <xsl:value-of select="."/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="*"/>
+
+</xsl:stylesheet>
+
+
diff --git a/xmlhelp/util/main_transform.xsl b/xmlhelp/util/main_transform.xsl
new file mode 100644
index 000000000000..d9b6c3229696
--- /dev/null
+++ b/xmlhelp/util/main_transform.xsl
@@ -0,0 +1,972 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+<!--***********************************************************************
+ This is the main transformation style sheet for transforming.
+ Only use with OOo 2.0
+ Owner: fpe@openoffice.org
+ =========================================================================
+ Changes Log
+ May 24 2004 Created
+ Aug 24 2004 Fixed for help2 CWS
+ Aug 27 2004 Added css link, fixed missing embed-mode for variable
+ Removed width/height for images
+ Sep 03 2004 Modularized xsl, added some embedded modes
+ Oct 08 2004 Fixed bug wrong mode "embedded" for links
+ Added embedded modes for embed and embedvar (for cascaded embeds)
+ Added <p> tags around falsely embedded pars and vars
+ Dec 08 2004 #i38483#, fixed wrong handling of web links
+ #i37377#, fixed missing usage of Database parameter for switching
+ Jan 04 2005 #i38905#, fixed buggy branding replacement template
+ Mar 17 2005 #i43972#, added language info to image URL, evaluate Language parameter
+ evaluate new localize attribute in images
+ May 10 2005 #i48785#, fixed wrong setting of distrib variable
+ Aug 16 2005 workaround for #i53365#
+ Aug 19 2005 fixed missing list processing in embedded sections
+ Aug 19 2005 #i53535#, fixed wrong handling of Database parameter
+ Oct 17 2006 #i70462#, disabled sorting to avoid output of error messages to console
+ Jun 15 2009 #i101799#, fixed wrong handling of http URLs with anchors
+***********************************************************************//-->
+
+<!--
+
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+ Copyright 2000, 2010 Oracle and/or its affiliates.
+
+ OpenOffice.org - a multi-platform office productivity suite
+
+ This file is part of OpenOffice.org.
+
+ OpenOffice.org is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License version 3
+ only, as published by the Free Software Foundation.
+
+ OpenOffice.org is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License version 3 for more details
+ (a copy is included in the LICENSE file that accompanied this code).
+
+ You should have received a copy of the GNU Lesser General Public License
+ version 3 along with OpenOffice.org. If not, see
+ <http://www.openoffice.org/license.html>
+ for a copy of the LGPLv3 License.
+
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output indent="yes" method="html"/>
+
+<!--
+############################
+# Variables and Parameters #
+############################
+//-->
+
+<!-- General Usage -->
+<xsl:variable name="am" select="'&amp;'"/>
+<xsl:variable name="sl" select="'/'"/>
+<xsl:variable name="qt" select="'&quot;'"/>
+
+<!-- generic Icon alt text -->
+<xsl:variable name="alttext" select="'text/shared/00/icon_alt.xhp'"/>
+
+<!-- For calculating pixel sizes -->
+<xsl:variable name="dpi" select="'96'"/>
+<xsl:variable name="dpcm" select="'38'"/>
+
+<!-- Product brand variables used in the help files -->
+<xsl:variable name="brand1" select="'$[officename]'"/>
+<xsl:variable name="brand2" select="'$[officeversion]'"/>
+<xsl:variable name="brand3" select="'%PRODUCTNAME'"/>
+<xsl:variable name="brand4" select="'%PRODUCTVERSION'"/>
+
+<!-- meta data variables from the help file -->
+<xsl:variable name="filename" select="/helpdocument/meta/topic/filename"/>
+<xsl:variable name="topic_id" select="/helpdocument/meta/topic/@id"/>
+<xsl:variable name="topic_status" select="/helpdocument/meta/topic/@status"/>
+<xsl:variable name="title" select="/helpdocument/meta/topic/title"/>
+<xsl:variable name="doclang" select="/helpdocument/meta/topic/title/@xml-lang"/>
+
+<!-- Module and the corresponding switching values-->
+<xsl:param name="Database" select="'swriter'"/>
+<xsl:variable name="module" select="$Database"/>
+<xsl:variable name="appl">
+ <xsl:choose>
+ <xsl:when test="$module = 'swriter'"><xsl:value-of select="'WRITER'"/></xsl:when>
+ <xsl:when test="$module = 'scalc'"><xsl:value-of select="'CALC'"/></xsl:when>
+ <xsl:when test="$module = 'sdraw'"><xsl:value-of select="'DRAW'"/></xsl:when>
+ <xsl:when test="$module = 'simpress'"><xsl:value-of select="'IMPRESS'"/></xsl:when>
+ <xsl:when test="$module = 'schart'"><xsl:value-of select="'CHART'"/></xsl:when>
+ <xsl:when test="$module = 'sbasic'"><xsl:value-of select="'BASIC'"/></xsl:when>
+ <xsl:when test="$module = 'smath'"><xsl:value-of select="'MATH'"/></xsl:when>
+ </xsl:choose>
+</xsl:variable>
+
+ <!-- the other parameters given by the help caller -->
+<xsl:param name="System" select="'WIN'"/>
+<xsl:param name="productname" select="'Office'"/>
+<xsl:param name="productversion" select="''"/>
+<xsl:variable name="pversion">
+ <xsl:value-of select="translate($productversion,' ','')"/>
+</xsl:variable>
+<!-- this is were the images are -->
+<xsl:param name="imgrepos" select="''"/>
+<xsl:param name="Id" />
+<!-- (lame) distinction between OS and Commercial -->
+<xsl:param name="distrib">
+ <xsl:choose>
+ <xsl:when test="starts-with($productname,'OpenOffice')">
+ <xsl:value-of select="'OpenSource'"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="'COMMERCIAL'"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:param>
+<xsl:param name="Language" select="'en-US'"/>
+<xsl:variable name="lang" select="$Language"/>
+
+<xsl:param name="ExtensionId" select="''"/>
+<xsl:param name="ExtensionPath" select="''"/>
+
+
+ <!-- parts of help and image urls -->
+<xsl:variable name="help_url_prefix" select="'vnd.sun.star.help://'"/>
+<xsl:variable name="img_url_prefix" select="concat('vnd.sun.star.zip://',$imgrepos,'/')"/>
+<xsl:variable name="urlpost" select="concat('?Language=',$lang,$am,'System=',$System,$am,'UseDB=no')"/>
+<xsl:variable name="urlpre" select="$help_url_prefix" />
+<xsl:variable name="linkprefix" select="$urlpre"/>
+<xsl:variable name="linkpostfix" select="$urlpost"/>
+
+<xsl:variable name="css" select="'default.css'"/>
+
+<!-- images for notes, tips and warnings -->
+<xsl:variable name="note_img" select="concat($img_url_prefix,'res/helpimg/note.png')"/>
+<xsl:variable name="tip_img" select="concat($img_url_prefix,'res/helpimg/tip.png')"/>
+<xsl:variable name="warning_img" select="concat($img_url_prefix,'res/helpimg/warning.png')"/>
+
+<!--
+#############
+# Templates #
+#############
+//-->
+
+<!-- Create the document skeleton -->
+<xsl:template match="/">
+ <xsl:variable name="csslink" select="concat($urlpre,'/',$urlpost)"/>
+ <html>
+ <head>
+ <title><xsl:value-of select="$title"/></title>
+ <link href="{$csslink}" rel="Stylesheet" type="text/css" /> <!-- stylesheet link -->
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
+ </head>
+ <body lang="{$lang}">
+ <xsl:apply-templates select="/helpdocument/body"/>
+ </body>
+ </html>
+</xsl:template>
+
+<!-- AHELP -->
+<xsl:template match="ahelp">
+ <xsl:if test="not(@visibility='hidden')"><span class="avis"><xsl:apply-templates /></span></xsl:if>
+</xsl:template>
+
+<!-- ALT -->
+<xsl:template match="alt"/>
+
+<!-- BOOKMARK -->
+<xsl:template match="bookmark">
+ <a name="{@id}"></a>
+ <xsl:choose>
+ <xsl:when test="starts-with(@branch,'hid')" />
+ <xsl:otherwise><xsl:apply-templates /></xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+<xsl:template match="bookmark" mode="embedded" />
+
+<!-- BOOKMARK_VALUE -->
+<xsl:template match="bookmark_value" />
+
+<!-- BR -->
+<xsl:template match="br"><br /></xsl:template>
+
+<!-- CAPTION -->
+<xsl:template match="caption" />
+
+<!-- CASE -->
+<xsl:template match="case"><xsl:call-template name="insertcase" /></xsl:template>
+<xsl:template match="case" mode="embedded">
+ <xsl:call-template name="insertcase">
+ <xsl:with-param name="embedded" select="'yes'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- CASEINLINE -->
+<xsl:template match="caseinline"><xsl:call-template name="insertcase" /></xsl:template>
+<xsl:template match="caseinline" mode="embedded">
+ <xsl:call-template name="insertcase">
+ <xsl:with-param name="embedded" select="'yes'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- COMMENT -->
+<xsl:template match="comment" />
+<xsl:template match="comment" mode="embedded"/>
+
+<!-- CREATED -->
+<xsl:template match="created" />
+
+<!-- DEFAULT -->
+<xsl:template match="default"><xsl:call-template name="insertdefault" /></xsl:template>
+<xsl:template match="default" mode="embedded">
+ <xsl:call-template name="insertdefault">
+ <xsl:with-param name="embedded" select="'yes'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- DEFAULTINLINE -->
+<xsl:template match="defaultinline"><xsl:call-template name="insertdefault" /></xsl:template>
+<xsl:template match="defaultinline" mode="embedded">
+ <xsl:call-template name="insertdefault">
+ <xsl:with-param name="embedded" select="'yes'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- EMBED -->
+<xsl:template match="embed"><xsl:call-template name="resolveembed"/></xsl:template>
+<xsl:template match="embed" mode="embedded"><xsl:call-template name="resolveembed"/></xsl:template>
+
+<!-- EMBEDVAR -->
+<xsl:template match="embedvar"><xsl:call-template name="resolveembedvar"/></xsl:template>
+<xsl:template match="embedvar" mode="embedded"><xsl:call-template name="resolveembedvar"/></xsl:template>
+
+<!-- EMPH -->
+<xsl:template match="emph">
+ <span class="emph"><xsl:apply-templates /></span>
+</xsl:template>
+<xsl:template match="emph" mode="embedded">
+ <span class="emph"><xsl:apply-templates /></span>
+</xsl:template>
+
+<!-- FILENAME -->
+<xsl:template match="filename" />
+
+<!-- HISTORY -->
+<xsl:template match="history" />
+
+<!-- IMAGE -->
+<xsl:template match="image"><xsl:call-template name="insertimage"/></xsl:template>
+<xsl:template match="image" mode="embedded"><xsl:call-template name="insertimage"/></xsl:template>
+
+<!-- ITEM -->
+<xsl:template match="item"><span class="{@type}"><xsl:apply-templates /></span></xsl:template>
+<xsl:template match="item" mode="embedded"><span class="{@type}"><xsl:apply-templates /></span></xsl:template>
+
+<!-- LASTEDITED -->
+<xsl:template match="lastedited" />
+
+<!-- LINK -->
+<xsl:template match="link">
+ <xsl:choose> <!-- don't insert the heading link to itself -->
+ <xsl:when test="(concat('/',@href) = /helpdocument/meta/topic/filename) or (@href = /helpdocument/meta/topic/filename)">
+ <xsl:apply-templates />
+ </xsl:when>
+ <xsl:when test="contains(child::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
+ <xsl:call-template name="insert_howtoget">
+ <xsl:with-param name="linkhref" select="@href"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="createlink" />
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+<xsl:template match="link" mode="embedded">
+ <xsl:call-template name="createlink"/>
+</xsl:template>
+
+<!-- LIST -->
+<xsl:template match="list">
+ <xsl:choose>
+ <xsl:when test="@type='ordered'">
+ <ol>
+ <xsl:if test="@startwith">
+ <xsl:attribute name="start"><xsl:value-of select="@startwith"/></xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates />
+ </ol>
+ </xsl:when>
+ <xsl:otherwise>
+ <ul><xsl:apply-templates /></ul>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="list" mode="embedded">
+ <xsl:choose>
+ <xsl:when test="@type='ordered'">
+ <ol>
+ <xsl:if test="@startwith">
+ <xsl:attribute name="start"><xsl:value-of select="@startwith"/></xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates mode="embedded"/>
+ </ol>
+ </xsl:when>
+ <xsl:otherwise>
+ <ul><xsl:apply-templates mode="embedded"/></ul>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- LISTITEM -->
+<xsl:template match="listitem">
+ <li><xsl:apply-templates /></li>
+</xsl:template>
+
+<xsl:template match="listitem" mode="embedded">
+ <li><xsl:apply-templates mode="embedded"/></li>
+</xsl:template>
+
+<!-- META, SEE HEADER -->
+<xsl:template match="meta" />
+
+<!-- OBJECT (UNUSED) -->
+<xsl:template match="object" />
+
+<!-- PARAGRAPH -->
+<xsl:template match="paragraph">
+ <xsl:choose>
+
+ <xsl:when test="@role='heading'">
+ <xsl:call-template name="insertheading">
+ <xsl:with-param name="level" select="@level"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains(' note warning tip ',@role)">
+ <xsl:call-template name="insertnote">
+ <xsl:with-param name="type" select="@role" />
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
+ <xsl:apply-templates />
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:call-template name="insertpara" />
+ </xsl:otherwise>
+
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="paragraph" mode="embedded">
+ <xsl:choose>
+
+ <xsl:when test="@role='heading'"> <!-- increase the level of headings that are embedded -->
+ <!--
+ The internal sablotron processor does not seem to support the number function.
+ Therefore, we need a workaround for
+ <xsl:variable name="level"><xsl:value-of select="number(@level)+1"/></xsl:variable>
+ -->
+ <xsl:variable name="newlevel">
+ <xsl:choose>
+ <xsl:when test="@level='1'"><xsl:value-of select="'2'"/></xsl:when>
+ <xsl:when test="@level='2'"><xsl:value-of select="'2'"/></xsl:when>
+ <xsl:when test="@level='3'"><xsl:value-of select="'3'"/></xsl:when>
+ <xsl:when test="@level='4'"><xsl:value-of select="'4'"/></xsl:when>
+ <xsl:when test="@level='5'"><xsl:value-of select="'5'"/></xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:call-template name="insertheading">
+ <xsl:with-param name="level" select="$newlevel"/>
+ <xsl:with-param name="embedded" select="'yes'"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains(' note warning tip ',@role)">
+ <xsl:call-template name="insertnote">
+ <xsl:with-param name="type" select="@role" />
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
+ <xsl:apply-templates />
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:call-template name="insertpara" />
+ </xsl:otherwise>
+
+ </xsl:choose>
+</xsl:template>
+
+
+<!-- SECTION -->
+<xsl:template match="section">
+ <a name="{@id}"></a>
+
+ <xsl:choose>
+
+ <xsl:when test="@id='relatedtopics'">
+ <div class="relatedtopics">
+ <xsl:variable name="href"><xsl:value-of select="concat($urlpre,'shared/text/shared/00/00000004.xhp',$urlpost)"/></xsl:variable>
+ <xsl:variable name="anchor"><xsl:value-of select="'related'"/></xsl:variable>
+ <xsl:variable name="doc" select="document($href)"/>
+ <p class="related">
+ <xsl:apply-templates select="$doc//variable[@id=$anchor]"/>
+ </p>
+ <div class="relatedbody">
+ <xsl:apply-templates />
+ </div>
+ </div>
+ </xsl:when>
+
+ <xsl:when test="@id='howtoget'">
+ <xsl:call-template name="insert_howtoget" />
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+
+ </xsl:choose>
+
+</xsl:template>
+
+
+<!-- SECTION -->
+<xsl:template match="section" mode="embedded">
+ <a name="{@id}"></a>
+ <xsl:apply-templates mode="embedded"/>
+</xsl:template>
+
+<!-- SORT -->
+<xsl:template match="sort" >
+ <!-- sorting disabled due to #i70462#
+ <xsl:apply-templates><xsl:sort select="descendant::paragraph"/></xsl:apply-templates>
+ //-->
+ <xsl:apply-templates />
+</xsl:template>
+<xsl:template match="sort" mode="embedded">
+<!-- sorting disabled due to #i70462#
+ <xsl:apply-templates><xsl:sort select="descendant::paragraph"/></xsl:apply-templates>
+ //-->
+ <xsl:apply-templates />
+</xsl:template>
+
+<!-- SWITCH -->
+<xsl:template match="switch"><xsl:apply-templates /></xsl:template>
+<xsl:template match="switch" mode="embedded"><xsl:apply-templates /></xsl:template>
+
+<!-- SWITCHINLINE -->
+<xsl:template match="switchinline"><xsl:apply-templates /></xsl:template>
+<xsl:template match="switchinline" mode="embedded"><xsl:apply-templates mode="embedded"/></xsl:template>
+
+<!-- TABLE -->
+<xsl:template match="table"><xsl:call-template name="inserttable"/></xsl:template>
+<xsl:template match="table" mode="embedded"><xsl:call-template name="inserttable"/></xsl:template>
+
+<!-- TABLECELL -->
+<xsl:template match="tablecell"><td valign="top"><xsl:apply-templates /></td></xsl:template>
+<xsl:template match="tablecell" mode="icontable"><td valign="top"><xsl:apply-templates/></td></xsl:template>
+<xsl:template match="tablecell" mode="embedded"><td valign="top"><xsl:apply-templates mode="embedded"/></td></xsl:template>
+
+<!-- TABLEROW -->
+<xsl:template match="tablerow"><tr><xsl:apply-templates /></tr></xsl:template>
+<xsl:template match="tablerow" mode="icontable"><tr><xsl:apply-templates mode="icontable"/></tr></xsl:template>
+<xsl:template match="tablerow" mode="embedded"><tr><xsl:apply-templates mode="embedded"/></tr></xsl:template>
+
+<!-- TITLE -->
+<xsl:template match="title"/>
+
+<!-- TOPIC -->
+<xsl:template match="topic"/>
+
+<!-- VARIABLE -->
+<xsl:template match="variable"><a name="{@id}"></a><xsl:apply-templates /></xsl:template>
+<xsl:template match="variable" mode="embedded"><a name="{@id}"></a><xsl:apply-templates mode="embedded"/></xsl:template>
+
+<xsl:template match="text()">
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="text()" mode="embedded">
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- In case of missing help files -->
+<xsl:template match="help-id-missing"><xsl:value-of select="$Id"/></xsl:template>
+
+<!--
+###################
+# NAMED TEMPLATES #
+###################
+//-->
+
+<!-- Branding -->
+<xsl:template name="brand" >
+ <xsl:param name="string"/>
+
+ <xsl:choose>
+
+ <xsl:when test="contains($string,$brand1)">
+ <xsl:variable name="newstr">
+ <xsl:value-of select="substring-before($string,$brand1)"/>
+ <xsl:value-of select="$productname"/>
+ <xsl:value-of select="substring-after($string,$brand1)"/>
+ </xsl:variable>
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string" select="$newstr"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains($string,$brand2)">
+ <xsl:variable name="newstr">
+ <xsl:value-of select="substring-before($string,$brand2)"/>
+ <xsl:value-of select="$pversion"/>
+ <xsl:value-of select="substring-after($string,$brand2)"/>
+ </xsl:variable>
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string" select="$newstr"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains($string,$brand3)">
+ <xsl:variable name="newstr">
+ <xsl:value-of select="substring-before($string,$brand3)"/>
+ <xsl:value-of select="$productname"/>
+ <xsl:value-of select="substring-after($string,$brand3)"/>
+ </xsl:variable>
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string" select="$newstr"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains($string,$brand4)">
+ <xsl:variable name="newstr">
+ <xsl:value-of select="substring-before($string,$brand4)"/>
+ <xsl:value-of select="$pversion"/>
+ <xsl:value-of select="substring-after($string,$brand4)"/>
+ </xsl:variable>
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string" select="$newstr"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:value-of select="$string"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+</xsl:template>
+
+
+<!-- Insert Paragraph -->
+<xsl:template name="insertpara">
+ <xsl:variable name="role">
+ <xsl:choose>
+ <xsl:when test="ancestor::table">
+ <xsl:value-of select="concat(@role,'intable')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@role"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <p class="{$role}"><xsl:apply-templates /></p>
+</xsl:template>
+
+<!-- Insert "How to get Link" -->
+<xsl:template name="insert_howtoget">
+ <xsl:param name="linkhref" />
+ <xsl:variable name="archive" select="'shared'"/>
+ <xsl:variable name="tmp_href"><xsl:value-of select="concat($urlpre,'shared/text/shared/00/00000004.xhp',$urlpost)"/></xsl:variable>
+ <xsl:variable name="tmp_doc" select="document($tmp_href)"/>
+ <table class="howtoget" width="100%" border="1" cellpadding="3" cellspacing="0">
+ <tr>
+ <td>
+ <p class="howtogetheader"><xsl:apply-templates select="$tmp_doc//variable[@id='wie']"/></p>
+ <div class="howtogetbody">
+ <xsl:choose>
+ <xsl:when test="$linkhref = ''"> <!-- new style -->
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:otherwise> <!-- old style -->
+ <xsl:variable name="archive1"><xsl:value-of select="concat(substring-before(substring-after($linkhref,'text/'),'/'),'/')"/></xsl:variable>
+ <xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive1,substring-before($linkhref,'#'),$urlpost)"/></xsl:variable>
+ <xsl:variable name="anc"><xsl:value-of select="substring-after($linkhref,'#')"/></xsl:variable>
+ <xsl:variable name="docum" select="document($href)"/>
+
+ <xsl:call-template name="insertembed">
+ <xsl:with-param name="doc" select="$docum" />
+ <xsl:with-param name="anchor" select="$anc" />
+ </xsl:call-template>
+
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+</xsl:template>
+
+<!-- Create a link -->
+<xsl:template name="createlink">
+<xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
+<xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="starts-with(@href,'http://')"> <!-- web links -->
+ <a href="{@href}"><xsl:apply-templates /></a>
+ </xsl:when>
+ <xsl:when test="contains(@href,'#')">
+ <xsl:variable name="anchor"><xsl:value-of select="concat('#',substring-after(@href,'#'))"/></xsl:variable>
+ <xsl:variable name="href"><xsl:value-of select="concat($linkprefix,$archive,substring-before(@href,'#'),$linkpostfix,$dbpostfix,$anchor)"/></xsl:variable>
+ <a href="{$href}"><xsl:apply-templates /></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="href"><xsl:value-of select="concat($linkprefix,$archive,@href,$linkpostfix,$dbpostfix)"/></xsl:variable>
+ <a href="{$href}"><xsl:apply-templates /></a>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- Insert Note, Warning, or Tip -->
+<xsl:template name="insertnote">
+ <xsl:param name="type" /> <!-- note, tip, or warning -->
+ <xsl:variable name="imgsrc">
+ <xsl:choose>
+ <xsl:when test="$type='note'"><xsl:value-of select="$note_img"/></xsl:when>
+ <xsl:when test="$type='tip'"><xsl:value-of select="$tip_img"/></xsl:when>
+ <xsl:when test="$type='warning'"><xsl:value-of select="$warning_img"/></xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="'shared'"/></xsl:call-template></xsl:variable>
+ <xsl:variable name="alt">
+ <xsl:variable name="href"><xsl:value-of select="concat($urlpre,'shared/',$alttext,$urlpost,$dbpostfix)"/></xsl:variable>
+ <xsl:variable name="anchor"><xsl:value-of select="concat('alt_',$type)"/></xsl:variable>
+ <xsl:variable name="doc" select="document($href)"/>
+ <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
+ </xsl:variable>
+ <div class="{$type}">
+ <table border="0" class="{$type}" cellspacing="0" cellpadding="5">
+ <tr>
+ <td><img src="{$imgsrc}" alt="{$alt}" title="{$alt}"/></td>
+ <td><xsl:apply-templates /></td>
+ </tr>
+ </table>
+ </div>
+ <br/>
+</xsl:template>
+
+<!-- Insert a heading -->
+<xsl:template name="insertheading">
+ <xsl:param name="level" />
+ <xsl:param name="embedded" />
+ <xsl:text disable-output-escaping="yes">&lt;h</xsl:text><xsl:value-of select="$level"/><xsl:text disable-output-escaping="yes">&gt;</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text disable-output-escaping="yes">&lt;/h</xsl:text><xsl:value-of select="$level"/><xsl:text disable-output-escaping="yes">&gt;</xsl:text>
+</xsl:template>
+
+<!-- Evaluate a case or caseinline switch -->
+<xsl:template name="insertcase">
+ <xsl:param name="embedded" />
+ <xsl:choose>
+ <xsl:when test="parent::switch[@select='sys'] or parent::switchinline[@select='sys']">
+ <xsl:if test="@select = $System">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="parent::switch[@select='appl'] or parent::switchinline[@select='appl']">
+ <xsl:if test="@select = $appl">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="parent::switch[@select='distrib'] or parent::switchinline[@select='distrib']">
+ <xsl:if test="@select = $distrib">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<!-- Evaluate a default or defaultinline switch -->
+<xsl:template name="insertdefault">
+ <xsl:param name="embedded" />
+
+ <xsl:choose>
+ <xsl:when test="parent::switch[@select='sys'] or parent::switchinline[@select='sys']">
+ <xsl:if test="not(../child::case[@select=$System]) and not(../child::caseinline[@select=$System])">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="parent::switch[@select='appl'] or parent::switchinline[@select='appl']">
+ <xsl:if test="not(../child::case[@select=$appl]) and not(../child::caseinline[@select=$appl])">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="parent::switch[@select='distrib'] or parent::switchinline[@select='distrib']">
+ <xsl:if test="not(../child::case[@select=$distrib]) and not(../child::caseinline[@select=$distrib])">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<!-- evaluate embeds -->
+<xsl:template name="insertembed">
+ <xsl:param name="doc" />
+ <xsl:param name="anchor" />
+ <!-- different embed targets (also falsely used embed instead embedvar) -->
+ <xsl:choose>
+ <xsl:when test="$doc//section[@id=$anchor]"> <!-- first test for a section of that name -->
+ <xsl:apply-templates select="$doc//section[@id=$anchor]" mode="embedded"/>
+ </xsl:when>
+ <xsl:when test="$doc//paragraph[@id=$anchor]"> <!-- then test for a para of that name -->
+ <p class="embedded">
+ <xsl:apply-templates select="$doc//paragraph[@id=$anchor]" mode="embedded"/>
+ </p>
+ </xsl:when>
+ <xsl:when test="$doc//variable[@id=$anchor]"> <!-- then test for a variable of that name -->
+ <p class="embedded">
+ <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
+ </p>
+ </xsl:when>
+ <xsl:otherwise> <!-- then give up -->
+ <p class="bug">D'oh! You found a bug (<xsl:value-of select="@href"/> not found).</p>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- Insert an image -->
+<xsl:template name="insertimage">
+
+ <xsl:variable name="fpath">
+ <xsl:call-template name="getfpath">
+ <xsl:with-param name="s"><xsl:value-of select="@src"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="fname">
+ <xsl:call-template name="getfname">
+ <xsl:with-param name="s"><xsl:value-of select="@src"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="src">
+ <xsl:choose>
+ <xsl:when test="not($ExtensionId='') and starts-with(@src,$ExtensionId)">
+ <xsl:value-of select="concat($ExtensionPath,'/',@src)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="(@localize='true') and not($lang='en-US')">
+ <xsl:value-of select="concat($img_url_prefix,$fpath,$lang,'/',$fname)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat($img_url_prefix,$fpath,$fname)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!--<xsl:variable name="src"><xsl:value-of select="concat($img_url_prefix,@src)"/></xsl:variable>-->
+ <xsl:variable name="alt"><xsl:value-of select="./alt"/></xsl:variable>
+ <xsl:variable name="width" select="''"/> <!-- Images don't all have the correct size -->
+ <xsl:variable name="height" select="''"/><!-- Image don't all have the correct size -->
+ <img src="{$src}" alt="{$alt}" title="{$alt}">
+ <xsl:if test="not($width='')"><xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute></xsl:if>
+ <xsl:if test="not($height='')"><xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute></xsl:if>
+ </img>
+</xsl:template>
+
+<!-- Insert a Table -->
+<xsl:template name="inserttable">
+ <xsl:variable name="imgsrc"> <!-- see if we are in an image table -->
+ <xsl:value-of select="tablerow/tablecell[1]/paragraph[1]/image/@src"/>
+ </xsl:variable>
+
+ <xsl:choose>
+
+ <xsl:when test="count(descendant::tablecell)=1">
+ <table border="0" class="onecell" cellpadding="0" cellspacing="0">
+ <xsl:apply-templates />
+ </table>
+ </xsl:when>
+
+ <xsl:when test="descendant::tablecell[1]/descendant::image">
+ <table border="0" class="icontable" cellpadding="5" cellspacing="0">
+ <xsl:apply-templates mode="icontable"/>
+ </table>
+ </xsl:when>
+
+ <xsl:when test="@class='wide'">
+ <table border="1" class="{@class}" cellpadding="0" cellspacing="0" width="100%" >
+ <xsl:apply-templates />
+ </table>
+ </xsl:when>
+
+ <xsl:when test="not(@class='')">
+ <table border="1" class="{@class}" cellpadding="0" cellspacing="0" >
+ <xsl:apply-templates />
+ </table>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <table border="1" class="border" cellpadding="0" cellspacing="0" >
+ <xsl:apply-templates />
+ </table>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <br/>
+</xsl:template>
+
+<xsl:template name="resolveembed">
+ <div class="embedded">
+ <xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
+ <xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
+ <xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive,substring-before(@href,'#'),$urlpost,$dbpostfix)"/></xsl:variable>
+ <xsl:variable name="anc"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
+ <xsl:variable name="docum" select="document($href)"/>
+
+ <xsl:call-template name="insertembed">
+ <xsl:with-param name="doc" select="$docum" />
+ <xsl:with-param name="anchor" select="$anc" />
+ </xsl:call-template>
+
+ </div>
+</xsl:template>
+
+<xsl:template name="resolveembedvar">
+ <xsl:if test="not(@href='text/shared/00/00000004.xhp#wie')"> <!-- special treatment if howtoget links -->
+ <xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
+ <xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
+ <xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive,substring-before(@href,'#'),$urlpost,$dbpostfix)"/></xsl:variable>
+ <xsl:variable name="anchor"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
+ <xsl:variable name="doc" select="document($href)"/>
+ <xsl:choose>
+ <xsl:when test="$doc//variable[@id=$anchor]"> <!-- test for a variable of that name -->
+ <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise> <!-- or give up -->
+ <span class="bug">[<xsl:value-of select="@href"/> not found].</span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+</xsl:template>
+
+<!-- Apply -->
+<xsl:template name="apply">
+ <xsl:param name="embedded" />
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="getfpath">
+ <xsl:param name="s"/>
+ <xsl:param name="p"/>
+ <xsl:choose>
+ <xsl:when test="contains($s,'/')">
+ <xsl:call-template name="getfpath">
+ <xsl:with-param name="p"><xsl:value-of select="concat($p,substring-before($s,'/'),'/')"/></xsl:with-param>
+ <xsl:with-param name="s"><xsl:value-of select="substring-after($s,'/')"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$p"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="getfname">
+ <xsl:param name="s"/>
+ <xsl:choose>
+ <xsl:when test="contains($s,'/')">
+ <xsl:call-template name="getfname">
+ <xsl:with-param name="s"><xsl:value-of select="substring-after($s,'/')"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$s"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="createDBpostfix">
+ <xsl:param name="archive"/>
+ <xsl:variable name="newDB">
+ <xsl:choose>
+ <xsl:when test="(substring($archive,1,6) = 'shared')"><xsl:value-of select="$Database"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="substring-before($archive,'/')"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:value-of select="concat($am,'DbPAR=',$newDB)"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xmlhelp/util/makefile.mk b/xmlhelp/util/makefile.mk
index 10206670b5f8..66551f15bffc 100644
--- a/xmlhelp/util/makefile.mk
+++ b/xmlhelp/util/makefile.mk
@@ -74,5 +74,11 @@ DEF1NAME=$(SHL1TARGET)
# --- Targets ----------------------------------------------------------
+ZIP1TARGET=helpxsl
+ZIP1FLAGS= -u -r
+#ZIP1DIR=$(PRJ)$/source$/auxiliary
+ZIP1LIST=main_transform*.xsl idxcaption.xsl idxcontent.xsl
+
+
.INCLUDE: target.mk
diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx
index f4843d54ace1..80238a075973 100644
--- a/xmloff/inc/xmloff/xmltoken.hxx
+++ b/xmloff/inc/xmloff/xmltoken.hxx
@@ -3110,6 +3110,9 @@ namespace xmloff { namespace token {
XML_DIAGONAL_BL_TR_WIDTHS,
XML_DIAGONAL_TL_BR_WIDTHS,
+ XML_OUTSIDE_MINIMUM,//#i114142#
+ XML_OUTSIDE_MAXIMUM,//#i114142#
+
XML_TOKEN_END
};
diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx
index 0616040148b5..79a59ab6910f 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -223,6 +223,8 @@ SvXMLEnumMapEntry aXMLChartAxisLabelPositionEnumMap[] =
{ ::xmloff::token::XML_NEAR_AXIS_OTHER_SIDE, ::com::sun::star::chart::ChartAxisLabelPosition_NEAR_AXIS_OTHER_SIDE },
{ ::xmloff::token::XML_OUTSIDE_START, ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_START },
{ ::xmloff::token::XML_OUTSIDE_END, ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_END },
+ { ::xmloff::token::XML_OUTSIDE_MINIMUM, ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_START },//#i114142#
+ { ::xmloff::token::XML_OUTSIDE_MAXIMUM, ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_END },//#i114142#
{ ::xmloff::token::XML_TOKEN_INVALID, 0 }
};
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index c4abc4172959..e6f6fc6d9340 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -1688,20 +1688,16 @@ void SchXMLExportHelper_Impl::exportTable()
{
mrExport.AddAttribute( XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_STRING );
SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True );
- // write the original range name as id into the local table
- // to allow a correct re-association when copying via clipboard
+ exportText( *aIt );
+ if( nC < nComplexCount )
+ lcl_exportComplexLabel( rComplexColumnDescriptions[nC++], mrExport );
if( !bHasOwnData && aColumnDescriptions_RangeIter != aColumnDescriptions_RangeEnd )
{
+ // remind the original range to allow a correct re-association when copying via clipboard
if ((*aColumnDescriptions_RangeIter).getLength())
- {
- mrExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT,
- *aColumnDescriptions_RangeIter);
- }
+ SchXMLTools::exportRangeToSomewhere( mrExport, *aColumnDescriptions_RangeIter );
++aColumnDescriptions_RangeIter;
}
- exportText( *aIt );
- if( nC < nComplexCount )
- lcl_exportComplexLabel( rComplexColumnDescriptions[nC++], mrExport );
}
OSL_ASSERT( bHasOwnData || aColumnDescriptions_RangeIter == aColumnDescriptions_RangeEnd );
} // closing row and header-rows elements
@@ -1725,17 +1721,15 @@ void SchXMLExportHelper_Impl::exportTable()
SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True );
if( aRowDescriptionsIter != aData.aRowDescriptions.end())
{
- // write the original range name as id into the local table
- // to allow a correct re-association when copying via clipboard
- if( !bHasOwnData && aRowDescriptions_RangeIter != aRowDescriptions_RangeEnd )
- {
- mrExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT,
- *aRowDescriptions_RangeIter++);
- }
exportText( *aRowDescriptionsIter );
++aRowDescriptionsIter;
if( nC < nComplexCount )
lcl_exportComplexLabel( rComplexRowDescriptions[nC++], mrExport );
+ if( !bHasOwnData && aRowDescriptions_RangeIter != aRowDescriptions_RangeEnd )
+ {
+ // remind the original range to allow a correct re-association when copying via clipboard
+ SchXMLTools::exportRangeToSomewhere( mrExport, *aRowDescriptions_RangeIter++ );
+ }
}
}
@@ -1748,19 +1742,15 @@ void SchXMLExportHelper_Impl::exportTable()
mrExport.AddAttribute( XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_FLOAT );
mrExport.AddAttribute( XML_NAMESPACE_OFFICE, XML_VALUE, msString );
SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True );
- // write the original range name as id into the local table to
- // allow a correct re-association when copying via clipboard
+ exportText( msString, false ); // do not convert tabs and lfs
if( ( !bHasOwnData && aDataRangeIter != aDataRangeEndIter ) &&
- ( mbRowSourceColumns || (aColIt == aRowIt->begin())) )
+ ( mbRowSourceColumns || (aColIt == aRowIt->begin()) ) )
{
+ // remind the original range to allow a correct re-association when copying via clipboard
if ((*aDataRangeIter).getLength())
- {
- mrExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT,
- *aDataRangeIter);
- }
+ SchXMLTools::exportRangeToSomewhere( mrExport, *aDataRangeIter );
++aDataRangeIter;
}
- exportText( msString, false ); // do not convert tabs and lfs
}
}
}
@@ -3063,6 +3053,10 @@ void SchXMLExportHelper_Impl::exportSeries(
{
// add style name attribute
AddAutoStyleAttribute( aPropertyStates );
+
+ const SvtSaveOptions::ODFDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFDefaultVersion() );
+ if( nCurrentVersion >= SvtSaveOptions::ODFVER_012 )
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_DIMENSION, XML_Y );//#i114149#
SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_ERROR_INDICATOR, sal_True, sal_True );
}
else // autostyles
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index d82970858ebe..d3f0670f672d 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -34,6 +34,7 @@
#include "SchXMLImport.hxx"
#include "SchXMLTools.hxx"
#include "transporttypes.hxx"
+#include "XMLStringBufferImportContext.hxx"
#include <tools/debug.hxx>
#include <rtl/math.hxx>
#include "xmlnmspe.hxx"
@@ -687,6 +688,35 @@ SvXMLImportContext* SchXMLTableRowContext::CreateChildContext(
return pContext;
}
+//---------------------------------------------------------------------------------------------------
+//---------------------------------------------------------------------------------------------------
+
+class SchXMLRangeSomewhereContext : public SvXMLImportContext
+{
+//#i113950# previously the range was exported to attribute text:id,
+//but that attribute does not allow arbitrary strings anymore
+//so we need to find an alternative to save that range info for copy/paste scenario ...
+//-> use description at an empty group element for now
+
+private:
+ ::rtl::OUString& mrRangeString;
+ ::rtl::OUStringBuffer maRangeStringBuffer;
+
+public:
+ SchXMLRangeSomewhereContext( SvXMLImport& rImport,
+ const ::rtl::OUString& rLocalName,
+ ::rtl::OUString& rRangeString );
+ virtual ~SchXMLRangeSomewhereContext();
+
+ virtual SvXMLImportContext* CreateChildContext(
+ USHORT nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual void EndElement();
+};
+
+//---------------------------------------------------------------------------------------------------
+//---------------------------------------------------------------------------------------------------
// ========================================
// classes for cells and their content
@@ -778,11 +808,18 @@ SvXMLImportContext* SchXMLTableCellContext::CreateChildContext(
pContext = new SchXMLTextListContext( GetImport(), rLocalName, *rCell.pComplexString );
mbReadText = sal_False;//don't apply text from <text:p>
}
- // <text:p> element - read text and range-id
+ // <text:p> element - read text (and range from text:id old version)
else if( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( rLocalName, XML_P ) )
{
pContext = new SchXMLParagraphContext( GetImport(), rLocalName, maCellContent, &maRangeId );
}
+ // <draw:g> element - read range
+ else if( nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( rLocalName, XML_G ) )
+ {
+ //#i113950# previously the range was exported to attribute text:id, but that attribute does not allow arbitrary strings anymore
+ //so we need to find an alternative to save that range info for copy/paste scenario ... -> use description at an empty group element for now
+ pContext = new SchXMLRangeSomewhereContext( GetImport(), rLocalName, maRangeId );
+ }
else
{
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
@@ -1148,3 +1185,34 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
}
}
+//---------------------------------------------------------------------------------------------------
+
+SchXMLRangeSomewhereContext::SchXMLRangeSomewhereContext( SvXMLImport& rImport,
+ const OUString& rLocalName,
+ OUString& rRangeString ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_TEXT, rLocalName ),
+ mrRangeString( rRangeString )
+{
+}
+
+SchXMLRangeSomewhereContext::~SchXMLRangeSomewhereContext()
+{
+}
+
+SvXMLImportContext* SchXMLRangeSomewhereContext::CreateChildContext(
+ USHORT nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& )
+{
+ if( XML_NAMESPACE_SVG == nPrefix && IsXMLToken( rLocalName, XML_DESC ) )
+ {
+ return new XMLStringBufferImportContext(
+ GetImport(), nPrefix, rLocalName, maRangeStringBuffer );
+ }
+ return new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+}
+
+void SchXMLRangeSomewhereContext::EndElement()
+{
+ mrRangeString = maRangeStringBuffer.makeStringAndClear();
+}
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index 582e5aead326..b2a90e534771 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -600,6 +600,29 @@ void exportText( SvXMLExport& rExport, const OUString& rText, bool bConvertTabsL
}
}
+void exportRangeToSomewhere( SvXMLExport& rExport, const ::rtl::OUString& rValue )
+{
+ //with issue #i366# and CWS chart20 ranges for error bars were introduced
+ //to keep them during copy paste from calc to impress for example it
+ //was necessary to introduce a mapping between the used ranges within calc and the data written to the local table
+ //this is why we write this ranges here
+
+ //#i113950# first the range was exported to attribute text:id, but that attribute does not allow arbitrary strings anymore within ODF 1.2
+ //as an alternative the range info is now saved into the description at an empty group element (not very nice, but ODF conform)
+
+ const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
+ if( nCurrentODFVersion == SvtSaveOptions::ODFVER_010 || nCurrentODFVersion == SvtSaveOptions::ODFVER_011 )
+ return;//svg:desc is not allowed at draw:g in ODF1.0; but as the ranges for error bars are anyhow not allowed within ODF1.0 nor ODF1.1 we do not need the information
+
+ SvXMLElementExport aEmptyShapeGroup( rExport, XML_NAMESPACE_DRAW,
+ ::xmloff::token::GetXMLToken( ::xmloff::token::XML_G ),
+ sal_True, sal_False );
+ SvXMLElementExport aDescription( rExport, XML_NAMESPACE_SVG,
+ ::xmloff::token::GetXMLToken( ::xmloff::token::XML_DESC ),
+ sal_True, sal_False );
+ rExport.GetDocHandler()->characters( rValue );
+}
+
Reference< chart2::XRegressionCurve > getRegressionCurve(
const Reference< chart2::XDataSeries > & xDataSeries )
{
diff --git a/xmloff/source/chart/SchXMLTools.hxx b/xmloff/source/chart/SchXMLTools.hxx
index bcc39ae3d114..d8841bf3861b 100644
--- a/xmloff/source/chart/SchXMLTools.hxx
+++ b/xmloff/source/chart/SchXMLTools.hxx
@@ -105,6 +105,8 @@ namespace SchXMLTools
void exportText( SvXMLExport& rExport, const ::rtl::OUString& rText, bool bConvertTabsLFs );
+ void exportRangeToSomewhere( SvXMLExport& rExport, const ::rtl::OUString& rValue );
+
/** returns the properties of the equation of the first regression curve
that is no mean-value line
*/
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index a3d4a0c48d02..d65bafe583df 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -3082,8 +3082,8 @@ namespace xmloff { namespace token {
TOKEN( "axis-label-position", XML_AXIS_LABEL_POSITION ),
TOKEN( "near-axis", XML_NEAR_AXIS ),
TOKEN( "near-axis-other-side", XML_NEAR_AXIS_OTHER_SIDE ),
- TOKEN( "outside-minimum", XML_OUTSIDE_START ),
- TOKEN( "outside-maximum", XML_OUTSIDE_END ),
+ TOKEN( "outside-start", XML_OUTSIDE_START ),
+ TOKEN( "outside-end", XML_OUTSIDE_END ),
TOKEN( "tick-mark-position", XML_TICK_MARK_POSITION ),
TOKEN( "at-labels", XML_AT_LABELS ),
TOKEN( "at-axis", XML_AT_AXIS ),
@@ -3110,6 +3110,9 @@ namespace xmloff { namespace token {
TOKEN( "diagonal-bl-tr-widths", XML_DIAGONAL_BL_TR_WIDTHS ),
TOKEN( "diagonal-tl-br-widths", XML_DIAGONAL_TL_BR_WIDTHS ),
+ TOKEN( "outside-minimum", XML_OUTSIDE_MINIMUM ),
+ TOKEN( "outside-maximum", XML_OUTSIDE_MAXIMUM ),
+
#if OSL_DEBUG_LEVEL > 0
{ 0, NULL, NULL, XML_TOKEN_END }
#else
diff --git a/xmlsecurity/tools/demo/util2.cxx b/xmlsecurity/tools/demo/util2.cxx
index 955cb94a0474..0ec576d8d3f8 100644
--- a/xmlsecurity/tools/demo/util2.cxx
+++ b/xmlsecurity/tools/demo/util2.cxx
@@ -384,7 +384,7 @@ void QueryPrintSignatureDetails( const SignatureInformations& SignatureInformati
{
char cShowDetails;
fprintf( stdout, "\nDisplay details (y/n) [y]?" );
- fflush(stdin);
+ fflush( stdout );
fscanf( stdin, "%c", &cShowDetails);
if ( cShowDetails == 'y' )
{
@@ -409,7 +409,7 @@ int QuerySelectNumber( int nMin, int nMax )
do
{
fprintf( stdout, "\nSelect <%d-%d>:", nMin, nMax ) ;
- fflush(stdin);
+ fflush( stdout );
fscanf( stdin, "%d", &sel ) ;
} while( ( sel < nMin ) || ( sel > nMax ) );
@@ -420,7 +420,7 @@ long QueryVerifySignature()
{
char answer;
fprintf( stdout, "\nFound a signature - verify this one (y/n) [y]?" );
- fflush(stdin);
+ fflush( stdout );
fscanf( stdin, "%c", &answer);
return (answer == 'n')?0:1;
}